all files / tests/ unitTests.js

76.57% Statements 81690/106692
41.73% Branches 15954/38233
72.87% Functions 19905/27315
80.51% Lines 77994/96869
135 statements, 51 functions, 83 branches Ignored     
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 62350 62351 62352 62353 62354 62355 62356 62357 62358 62359 62360 62361 62362 62363 62364 62365 62366 62367 62368 62369 62370 62371 62372 62373 62374 62375 62376 62377 62378 62379 62380 62381 62382 62383 62384 62385 62386 62387 62388 62389 62390 62391 62392 62393 62394 62395 62396 62397 62398 62399 62400 62401 62402 62403 62404 62405 62406 62407 62408 62409 62410 62411 62412 62413 62414 62415 62416 62417 62418 62419 62420 62421 62422 62423 62424 62425 62426 62427 62428 62429 62430 62431 62432 62433 62434 62435 62436 62437 62438 62439 62440 62441 62442 62443 62444 62445 62446 62447 62448 62449 62450 62451 62452 62453 62454 62455 62456 62457 62458 62459 62460 62461 62462 62463 62464 62465 62466 62467 62468 62469 62470 62471 62472 62473 62474 62475 62476 62477 62478 62479 62480 62481 62482 62483 62484 62485 62486 62487 62488 62489 62490 62491 62492 62493 62494 62495 62496 62497 62498 62499 62500 62501 62502 62503 62504 62505 62506 62507 62508 62509 62510 62511 62512 62513 62514 62515 62516 62517 62518 62519 62520 62521 62522 62523 62524 62525 62526 62527 62528 62529 62530 62531 62532 62533 62534 62535 62536 62537 62538 62539 62540 62541 62542 62543 62544 62545 62546 62547 62548 62549 62550 62551 62552 62553 62554 62555 62556 62557 62558 62559 62560 62561 62562 62563 62564 62565 62566 62567 62568 62569 62570 62571 62572 62573 62574 62575 62576 62577 62578 62579 62580 62581 62582 62583 62584 62585 62586 62587 62588 62589 62590 62591 62592 62593 62594 62595 62596 62597 62598 62599 62600 62601 62602 62603 62604 62605 62606 62607 62608 62609 62610 62611 62612 62613 62614 62615 62616 62617 62618 62619 62620 62621 62622 62623 62624 62625 62626 62627 62628 62629 62630 62631 62632 62633 62634 62635 62636 62637 62638 62639 62640 62641 62642 62643 62644 62645 62646 62647 62648 62649 62650 62651 62652 62653 62654 62655 62656 62657 62658 62659 62660 62661 62662 62663 62664 62665 62666 62667 62668 62669 62670 62671 62672 62673 62674 62675 62676 62677 62678 62679 62680 62681 62682 62683 62684 62685 62686 62687 62688 62689 62690 62691 62692 62693 62694 62695 62696 62697 62698 62699 62700 62701 62702 62703 62704 62705 62706 62707 62708 62709 62710 62711 62712 62713 62714 62715 62716 62717 62718 62719 62720 62721 62722 62723 62724 62725 62726 62727 62728 62729 62730 62731 62732 62733 62734 62735 62736 62737 62738 62739 62740 62741 62742 62743 62744 62745 62746 62747 62748 62749 62750 62751 62752 62753 62754 62755 62756 62757 62758 62759 62760 62761 62762 62763 62764 62765 62766 62767 62768 62769 62770 62771 62772 62773 62774 62775 62776 62777 62778 62779 62780 62781 62782 62783 62784 62785 62786 62787 62788 62789 62790 62791 62792 62793 62794 62795 62796 62797 62798 62799 62800 62801 62802 62803 62804 62805 62806 62807 62808 62809 62810 62811 62812 62813 62814 62815 62816 62817 62818 62819 62820 62821 62822 62823 62824 62825 62826 62827 62828 62829 62830 62831 62832 62833 62834 62835 62836 62837 62838 62839 62840 62841 62842 62843 62844 62845 62846 62847 62848 62849 62850 62851 62852 62853 62854 62855 62856 62857 62858 62859 62860 62861 62862 62863 62864 62865 62866 62867 62868 62869 62870 62871 62872 62873 62874 62875 62876 62877 62878 62879 62880 62881 62882 62883 62884 62885 62886 62887 62888 62889 62890 62891 62892 62893 62894 62895 62896 62897 62898 62899 62900 62901 62902 62903 62904 62905 62906 62907 62908 62909 62910 62911 62912 62913 62914 62915 62916 62917 62918 62919 62920 62921 62922 62923 62924 62925 62926 62927 62928 62929 62930 62931 62932 62933 62934 62935 62936 62937 62938 62939 62940 62941 62942 62943 62944 62945 62946 62947 62948 62949 62950 62951 62952 62953 62954 62955 62956 62957 62958 62959 62960 62961 62962 62963 62964 62965 62966 62967 62968 62969 62970 62971 62972 62973 62974 62975 62976 62977 62978 62979 62980 62981 62982 62983 62984 62985 62986 62987 62988 62989 62990 62991 62992 62993 62994 62995 62996 62997 62998 62999 63000 63001 63002 63003 63004 63005 63006 63007 63008 63009 63010 63011 63012 63013 63014 63015 63016 63017 63018 63019 63020 63021 63022 63023 63024 63025 63026 63027 63028 63029 63030 63031 63032 63033 63034 63035 63036 63037 63038 63039 63040 63041 63042 63043 63044 63045 63046 63047 63048 63049 63050 63051 63052 63053 63054 63055 63056 63057 63058 63059 63060 63061 63062 63063 63064 63065 63066 63067 63068 63069 63070 63071 63072 63073 63074 63075 63076 63077 63078 63079 63080 63081 63082 63083 63084 63085 63086 63087 63088 63089 63090 63091 63092 63093 63094 63095 63096 63097 63098 63099 63100 63101 63102 63103 63104 63105 63106 63107 63108 63109 63110 63111 63112 63113 63114 63115 63116 63117 63118 63119 63120 63121 63122 63123 63124 63125 63126 63127 63128 63129 63130 63131 63132 63133 63134 63135 63136 63137 63138 63139 63140 63141 63142 63143 63144 63145 63146 63147 63148 63149 63150 63151 63152 63153 63154 63155 63156 63157 63158 63159 63160 63161 63162 63163 63164 63165 63166 63167 63168 63169 63170 63171 63172 63173 63174 63175 63176 63177 63178 63179 63180 63181 63182 63183 63184 63185 63186 63187 63188 63189 63190 63191 63192 63193 63194 63195 63196 63197 63198 63199 63200 63201 63202 63203 63204 63205 63206 63207 63208 63209 63210 63211 63212 63213 63214 63215 63216 63217 63218 63219 63220 63221 63222 63223 63224 63225 63226 63227 63228 63229 63230 63231 63232 63233 63234 63235 63236 63237 63238 63239 63240 63241 63242 63243 63244 63245 63246 63247 63248 63249 63250 63251 63252 63253 63254 63255 63256 63257 63258 63259 63260 63261 63262 63263 63264 63265 63266 63267 63268 63269 63270 63271 63272 63273 63274 63275 63276 63277 63278 63279 63280 63281 63282 63283 63284 63285 63286 63287 63288 63289 63290 63291 63292 63293 63294 63295 63296 63297 63298 63299 63300 63301 63302 63303 63304 63305 63306 63307 63308 63309 63310 63311 63312 63313 63314 63315 63316 63317 63318 63319 63320 63321 63322 63323 63324 63325 63326 63327 63328 63329 63330 63331 63332 63333 63334 63335 63336 63337 63338 63339 63340 63341 63342 63343 63344 63345 63346 63347 63348 63349 63350 63351 63352 63353 63354 63355 63356 63357 63358 63359 63360 63361 63362 63363 63364 63365 63366 63367 63368 63369 63370 63371 63372 63373 63374 63375 63376 63377 63378 63379 63380 63381 63382 63383 63384 63385 63386 63387 63388 63389 63390 63391 63392 63393 63394 63395 63396 63397 63398 63399 63400 63401 63402 63403 63404 63405 63406 63407 63408 63409 63410 63411 63412 63413 63414 63415 63416 63417 63418 63419 63420 63421 63422 63423 63424 63425 63426 63427 63428 63429 63430 63431 63432 63433 63434 63435 63436 63437 63438 63439 63440 63441 63442 63443 63444 63445 63446 63447 63448 63449 63450 63451 63452 63453 63454 63455 63456 63457 63458 63459 63460 63461 63462 63463 63464 63465 63466 63467 63468 63469 63470 63471 63472 63473 63474 63475 63476 63477 63478 63479 63480 63481 63482 63483 63484 63485 63486 63487 63488 63489 63490 63491 63492 63493 63494 63495 63496 63497 63498 63499 63500 63501 63502 63503 63504 63505 63506 63507 63508 63509 63510 63511 63512 63513 63514 63515 63516 63517 63518 63519 63520 63521 63522 63523 63524 63525 63526 63527 63528 63529 63530 63531 63532 63533 63534 63535 63536 63537 63538 63539 63540 63541 63542 63543 63544 63545 63546 63547 63548 63549 63550 63551 63552 63553 63554 63555 63556 63557 63558 63559 63560 63561 63562 63563 63564 63565 63566 63567 63568 63569 63570 63571 63572 63573 63574 63575 63576 63577 63578 63579 63580 63581 63582 63583 63584 63585 63586 63587 63588 63589 63590 63591 63592 63593 63594 63595 63596 63597 63598 63599 63600 63601 63602 63603 63604 63605 63606 63607 63608 63609 63610 63611 63612 63613 63614 63615 63616 63617 63618 63619 63620 63621 63622 63623 63624 63625 63626 63627 63628 63629 63630 63631 63632 63633 63634 63635 63636 63637 63638 63639 63640 63641 63642 63643 63644 63645 63646 63647 63648 63649 63650 63651 63652 63653 63654 63655 63656 63657 63658 63659 63660 63661 63662 63663 63664 63665 63666 63667 63668 63669 63670 63671 63672 63673 63674 63675 63676 63677 63678 63679 63680 63681 63682 63683 63684 63685 63686 63687 63688 63689 63690 63691 63692 63693 63694 63695 63696 63697 63698 63699 63700 63701 63702 63703 63704 63705 63706 63707 63708 63709 63710 63711 63712 63713 63714 63715 63716 63717 63718 63719 63720 63721 63722 63723 63724 63725 63726 63727 63728 63729 63730 63731 63732 63733 63734 63735 63736 63737 63738 63739 63740 63741 63742 63743 63744 63745 63746 63747 63748 63749 63750 63751 63752 63753 63754 63755 63756 63757 63758 63759 63760 63761 63762 63763 63764 63765 63766 63767 63768 63769 63770 63771 63772 63773 63774 63775 63776 63777 63778 63779 63780 63781 63782 63783 63784 63785 63786 63787 63788 63789 63790 63791 63792 63793 63794 63795 63796 63797 63798 63799 63800 63801 63802 63803 63804 63805 63806 63807 63808 63809 63810 63811 63812 63813 63814 63815 63816 63817 63818 63819 63820 63821 63822 63823 63824 63825 63826 63827 63828 63829 63830 63831 63832 63833 63834 63835 63836 63837 63838 63839 63840 63841 63842 63843 63844 63845 63846 63847 63848 63849 63850 63851 63852 63853 63854 63855 63856 63857 63858 63859 63860 63861 63862 63863 63864 63865 63866 63867 63868 63869 63870 63871 63872 63873 63874 63875 63876 63877 63878 63879 63880 63881 63882 63883 63884 63885 63886 63887 63888 63889 63890 63891 63892 63893 63894 63895 63896 63897 63898 63899 63900 63901 63902 63903 63904 63905 63906 63907 63908 63909 63910 63911 63912 63913 63914 63915 63916 63917 63918 63919 63920 63921 63922 63923 63924 63925 63926 63927 63928 63929 63930 63931 63932 63933 63934 63935 63936 63937 63938 63939 63940 63941 63942 63943 63944 63945 63946 63947 63948 63949 63950 63951 63952 63953 63954 63955 63956 63957 63958 63959 63960 63961 63962 63963 63964 63965 63966 63967 63968 63969 63970 63971 63972 63973 63974 63975 63976 63977 63978 63979 63980 63981 63982 63983 63984 63985 63986 63987 63988 63989 63990 63991 63992 63993 63994 63995 63996 63997 63998 63999 64000 64001 64002 64003 64004 64005 64006 64007 64008 64009 64010 64011 64012 64013 64014 64015 64016 64017 64018 64019 64020 64021 64022 64023 64024 64025 64026 64027 64028 64029 64030 64031 64032 64033 64034 64035 64036 64037 64038 64039 64040 64041 64042 64043 64044 64045 64046 64047 64048 64049 64050 64051 64052 64053 64054 64055 64056 64057 64058 64059 64060 64061 64062 64063 64064 64065 64066 64067 64068 64069 64070 64071 64072 64073 64074 64075 64076 64077 64078 64079 64080 64081 64082 64083 64084 64085 64086 64087 64088 64089 64090 64091 64092 64093 64094 64095 64096 64097 64098 64099 64100 64101 64102 64103 64104 64105 64106 64107 64108 64109 64110 64111 64112 64113 64114 64115 64116 64117 64118 64119 64120 64121 64122 64123 64124 64125 64126 64127 64128 64129 64130 64131 64132 64133 64134 64135 64136 64137 64138 64139 64140 64141 64142 64143 64144 64145 64146 64147 64148 64149 64150 64151 64152 64153 64154 64155 64156 64157 64158 64159 64160 64161 64162 64163 64164 64165 64166 64167 64168 64169 64170 64171 64172 64173 64174 64175 64176 64177 64178 64179 64180 64181 64182 64183 64184 64185 64186 64187 64188 64189 64190 64191 64192 64193 64194 64195 64196 64197 64198 64199 64200 64201 64202 64203 64204 64205 64206 64207 64208 64209 64210 64211 64212 64213 64214 64215 64216 64217 64218 64219 64220 64221 64222 64223 64224 64225 64226 64227 64228 64229 64230 64231 64232 64233 64234 64235 64236 64237 64238 64239 64240 64241 64242 64243 64244 64245 64246 64247 64248 64249 64250 64251 64252 64253 64254 64255 64256 64257 64258 64259 64260 64261 64262 64263 64264 64265 64266 64267 64268 64269 64270 64271 64272 64273 64274 64275 64276 64277 64278 64279 64280 64281 64282 64283 64284 64285 64286 64287 64288 64289 64290 64291 64292 64293 64294 64295 64296 64297 64298 64299 64300 64301 64302 64303 64304 64305 64306 64307 64308 64309 64310 64311 64312 64313 64314 64315 64316 64317 64318 64319 64320 64321 64322 64323 64324 64325 64326 64327 64328 64329 64330 64331 64332 64333 64334 64335 64336 64337 64338 64339 64340 64341 64342 64343 64344 64345 64346 64347 64348 64349 64350 64351 64352 64353 64354 64355 64356 64357 64358 64359 64360 64361 64362 64363 64364 64365 64366 64367 64368 64369 64370 64371 64372 64373 64374 64375 64376 64377 64378 64379 64380 64381 64382 64383 64384 64385 64386 64387 64388 64389 64390 64391 64392 64393 64394 64395 64396 64397 64398 64399 64400 64401 64402 64403 64404 64405 64406 64407 64408 64409 64410 64411 64412 64413 64414 64415 64416 64417 64418 64419 64420 64421 64422 64423 64424 64425 64426 64427 64428 64429 64430 64431 64432 64433 64434 64435 64436 64437 64438 64439 64440 64441 64442 64443 64444 64445 64446 64447 64448 64449 64450 64451 64452 64453 64454 64455 64456 64457 64458 64459 64460 64461 64462 64463 64464 64465 64466 64467 64468 64469 64470 64471 64472 64473 64474 64475 64476 64477 64478 64479 64480 64481 64482 64483 64484 64485 64486 64487 64488 64489 64490 64491 64492 64493 64494 64495 64496 64497 64498 64499 64500 64501 64502 64503 64504 64505 64506 64507 64508 64509 64510 64511 64512 64513 64514 64515 64516 64517 64518 64519 64520 64521 64522 64523 64524 64525 64526 64527 64528 64529 64530 64531 64532 64533 64534 64535 64536 64537 64538 64539 64540 64541 64542 64543 64544 64545 64546 64547 64548 64549 64550 64551 64552 64553 64554 64555 64556 64557 64558 64559 64560 64561 64562 64563 64564 64565 64566 64567 64568 64569 64570 64571 64572 64573 64574 64575 64576 64577 64578 64579 64580 64581 64582 64583 64584 64585 64586 64587 64588 64589 64590 64591 64592 64593 64594 64595 64596 64597 64598 64599 64600 64601 64602 64603 64604 64605 64606 64607 64608 64609 64610 64611 64612 64613 64614 64615 64616 64617 64618 64619 64620 64621 64622 64623 64624 64625 64626 64627 64628 64629 64630 64631 64632 64633 64634 64635 64636 64637 64638 64639 64640 64641 64642 64643 64644 64645 64646 64647 64648 64649 64650 64651 64652 64653 64654 64655 64656 64657 64658 64659 64660 64661 64662 64663 64664 64665 64666 64667 64668 64669 64670 64671 64672 64673 64674 64675 64676 64677 64678 64679 64680 64681 64682 64683 64684 64685 64686 64687 64688 64689 64690 64691 64692 64693 64694 64695 64696 64697 64698 64699 64700 64701 64702 64703 64704 64705 64706 64707 64708 64709 64710 64711 64712 64713 64714 64715 64716 64717 64718 64719 64720 64721 64722 64723 64724 64725 64726 64727 64728 64729 64730 64731 64732 64733 64734 64735 64736 64737 64738 64739 64740 64741 64742 64743 64744 64745 64746 64747 64748 64749 64750 64751 64752 64753 64754 64755 64756 64757 64758 64759 64760 64761 64762 64763 64764 64765 64766 64767 64768 64769 64770 64771 64772 64773 64774 64775 64776 64777 64778 64779 64780 64781 64782 64783 64784 64785 64786 64787 64788 64789 64790 64791 64792 64793 64794 64795 64796 64797 64798 64799 64800 64801 64802 64803 64804 64805 64806 64807 64808 64809 64810 64811 64812 64813 64814 64815 64816 64817 64818 64819 64820 64821 64822 64823 64824 64825 64826 64827 64828 64829 64830 64831 64832 64833 64834 64835 64836 64837 64838 64839 64840 64841 64842 64843 64844 64845 64846 64847 64848 64849 64850 64851 64852 64853 64854 64855 64856 64857 64858 64859 64860 64861 64862 64863 64864 64865 64866 64867 64868 64869 64870 64871 64872 64873 64874 64875 64876 64877 64878 64879 64880 64881 64882 64883 64884 64885 64886 64887 64888 64889 64890 64891 64892 64893 64894 64895 64896 64897 64898 64899 64900 64901 64902 64903 64904 64905 64906 64907 64908 64909 64910 64911 64912 64913 64914 64915 64916 64917 64918 64919 64920 64921 64922 64923 64924 64925 64926 64927 64928 64929 64930 64931 64932 64933 64934 64935 64936 64937 64938 64939 64940 64941 64942 64943 64944 64945 64946 64947 64948 64949 64950 64951 64952 64953 64954 64955 64956 64957 64958 64959 64960 64961 64962 64963 64964 64965 64966 64967 64968 64969 64970 64971 64972 64973 64974 64975 64976 64977 64978 64979 64980 64981 64982 64983 64984 64985 64986 64987 64988 64989 64990 64991 64992 64993 64994 64995 64996 64997 64998 64999 65000 65001 65002 65003 65004 65005 65006 65007 65008 65009 65010 65011 65012 65013 65014 65015 65016 65017 65018 65019 65020 65021 65022 65023 65024 65025 65026 65027 65028 65029 65030 65031 65032 65033 65034 65035 65036 65037 65038 65039 65040 65041 65042 65043 65044 65045 65046 65047 65048 65049 65050 65051 65052 65053 65054 65055 65056 65057 65058 65059 65060 65061 65062 65063 65064 65065 65066 65067 65068 65069 65070 65071 65072 65073 65074 65075 65076 65077 65078 65079 65080 65081 65082 65083 65084 65085 65086 65087 65088 65089 65090 65091 65092 65093 65094 65095 65096 65097 65098 65099 65100 65101 65102 65103 65104 65105 65106 65107 65108 65109 65110 65111 65112 65113 65114 65115 65116 65117 65118 65119 65120 65121 65122 65123 65124 65125 65126 65127 65128 65129 65130 65131 65132 65133 65134 65135 65136 65137 65138 65139 65140 65141 65142 65143 65144 65145 65146 65147 65148 65149 65150 65151 65152 65153 65154 65155 65156 65157 65158 65159 65160 65161 65162 65163 65164 65165 65166 65167 65168 65169 65170 65171 65172 65173 65174 65175 65176 65177 65178 65179 65180 65181 65182 65183 65184 65185 65186 65187 65188 65189 65190 65191 65192 65193 65194 65195 65196 65197 65198 65199 65200 65201 65202 65203 65204 65205 65206 65207 65208 65209 65210 65211 65212 65213 65214 65215 65216 65217 65218 65219 65220 65221 65222 65223 65224 65225 65226 65227 65228 65229 65230 65231 65232 65233 65234 65235 65236 65237 65238 65239 65240 65241 65242 65243 65244 65245 65246 65247 65248 65249 65250 65251 65252 65253 65254 65255 65256 65257 65258 65259 65260 65261 65262 65263 65264 65265 65266 65267 65268 65269 65270 65271 65272 65273 65274 65275 65276 65277 65278 65279 65280 65281 65282 65283 65284 65285 65286 65287 65288 65289 65290 65291 65292 65293 65294 65295 65296 65297 65298 65299 65300 65301 65302 65303 65304 65305 65306 65307 65308 65309 65310 65311 65312 65313 65314 65315 65316 65317 65318 65319 65320 65321 65322 65323 65324 65325 65326 65327 65328 65329 65330 65331 65332 65333 65334 65335 65336 65337 65338 65339 65340 65341 65342 65343 65344 65345 65346 65347 65348 65349 65350 65351 65352 65353 65354 65355 65356 65357 65358 65359 65360 65361 65362 65363 65364 65365 65366 65367 65368 65369 65370 65371 65372 65373 65374 65375 65376 65377 65378 65379 65380 65381 65382 65383 65384 65385 65386 65387 65388 65389 65390 65391 65392 65393 65394 65395 65396 65397 65398 65399 65400 65401 65402 65403 65404 65405 65406 65407 65408 65409 65410 65411 65412 65413 65414 65415 65416 65417 65418 65419 65420 65421 65422 65423 65424 65425 65426 65427 65428 65429 65430 65431 65432 65433 65434 65435 65436 65437 65438 65439 65440 65441 65442 65443 65444 65445 65446 65447 65448 65449 65450 65451 65452 65453 65454 65455 65456 65457 65458 65459 65460 65461 65462 65463 65464 65465 65466 65467 65468 65469 65470 65471 65472 65473 65474 65475 65476 65477 65478 65479 65480 65481 65482 65483 65484 65485 65486 65487 65488 65489 65490 65491 65492 65493 65494 65495 65496 65497 65498 65499 65500 65501 65502 65503 65504 65505 65506 65507 65508 65509 65510 65511 65512 65513 65514 65515 65516 65517 65518 65519 65520 65521 65522 65523 65524 65525 65526 65527 65528 65529 65530 65531 65532 65533 65534 65535 65536 65537 65538 65539 65540 65541 65542 65543 65544 65545 65546 65547 65548 65549 65550 65551 65552 65553 65554 65555 65556 65557 65558 65559 65560 65561 65562 65563 65564 65565 65566 65567 65568 65569 65570 65571 65572 65573 65574 65575 65576 65577 65578 65579 65580 65581 65582 65583 65584 65585 65586 65587 65588 65589 65590 65591 65592 65593 65594 65595 65596 65597 65598 65599 65600 65601 65602 65603 65604 65605 65606 65607 65608 65609 65610 65611 65612 65613 65614 65615 65616 65617 65618 65619 65620 65621 65622 65623 65624 65625 65626 65627 65628 65629 65630 65631 65632 65633 65634 65635 65636 65637 65638 65639 65640 65641 65642 65643 65644 65645 65646 65647 65648 65649 65650 65651 65652 65653 65654 65655 65656 65657 65658 65659 65660 65661 65662 65663 65664 65665 65666 65667 65668 65669 65670 65671 65672 65673 65674 65675 65676 65677 65678 65679 65680 65681 65682 65683 65684 65685 65686 65687 65688 65689 65690 65691 65692 65693 65694 65695 65696 65697 65698 65699 65700 65701 65702 65703 65704 65705 65706 65707 65708 65709 65710 65711 65712 65713 65714 65715 65716 65717 65718 65719 65720 65721 65722 65723 65724 65725 65726 65727 65728 65729 65730 65731 65732 65733 65734 65735 65736 65737 65738 65739 65740 65741 65742 65743 65744 65745 65746 65747 65748 65749 65750 65751 65752 65753 65754 65755 65756 65757 65758 65759 65760 65761 65762 65763 65764 65765 65766 65767 65768 65769 65770 65771 65772 65773 65774 65775 65776 65777 65778 65779 65780 65781 65782 65783 65784 65785 65786 65787 65788 65789 65790 65791 65792 65793 65794 65795 65796 65797 65798 65799 65800 65801 65802 65803 65804 65805 65806 65807 65808 65809 65810 65811 65812 65813 65814 65815 65816 65817 65818 65819 65820 65821 65822 65823 65824 65825 65826 65827 65828 65829 65830 65831 65832 65833 65834 65835 65836 65837 65838 65839 65840 65841 65842 65843 65844 65845 65846 65847 65848 65849 65850 65851 65852 65853 65854 65855 65856 65857 65858 65859 65860 65861 65862 65863 65864 65865 65866 65867 65868 65869 65870 65871 65872 65873 65874 65875 65876 65877 65878 65879 65880 65881 65882 65883 65884 65885 65886 65887 65888 65889 65890 65891 65892 65893 65894 65895 65896 65897 65898 65899 65900 65901 65902 65903 65904 65905 65906 65907 65908 65909 65910 65911 65912 65913 65914 65915 65916 65917 65918 65919 65920 65921 65922 65923 65924 65925 65926 65927 65928 65929 65930 65931 65932 65933 65934 65935 65936 65937 65938 65939 65940 65941 65942 65943 65944 65945 65946 65947 65948 65949 65950 65951 65952 65953 65954 65955 65956 65957 65958 65959 65960 65961 65962 65963 65964 65965 65966 65967 65968 65969 65970 65971 65972 65973 65974 65975 65976 65977 65978 65979 65980 65981 65982 65983 65984 65985 65986 65987 65988 65989 65990 65991 65992 65993 65994 65995 65996 65997 65998 65999 66000 66001 66002 66003 66004 66005 66006 66007 66008 66009 66010 66011 66012 66013 66014 66015 66016 66017 66018 66019 66020 66021 66022 66023 66024 66025 66026 66027 66028 66029 66030 66031 66032 66033 66034 66035 66036 66037 66038 66039 66040 66041 66042 66043 66044 66045 66046 66047 66048 66049 66050 66051 66052 66053 66054 66055 66056 66057 66058 66059 66060 66061 66062 66063 66064 66065 66066 66067 66068 66069 66070 66071 66072 66073 66074 66075 66076 66077 66078 66079 66080 66081 66082 66083 66084 66085 66086 66087 66088 66089 66090 66091 66092 66093 66094 66095 66096 66097 66098 66099 66100 66101 66102 66103 66104 66105 66106 66107 66108 66109 66110 66111 66112 66113 66114 66115 66116 66117 66118 66119 66120 66121 66122 66123 66124 66125 66126 66127 66128 66129 66130 66131 66132 66133 66134 66135 66136 66137 66138 66139 66140 66141 66142 66143 66144 66145 66146 66147 66148 66149 66150 66151 66152 66153 66154 66155 66156 66157 66158 66159 66160 66161 66162 66163 66164 66165 66166 66167 66168 66169 66170 66171 66172 66173 66174 66175 66176 66177 66178 66179 66180 66181 66182 66183 66184 66185 66186 66187 66188 66189 66190 66191 66192 66193 66194 66195 66196 66197 66198 66199 66200 66201 66202 66203 66204 66205 66206 66207 66208 66209 66210 66211 66212 66213 66214 66215 66216 66217 66218 66219 66220 66221 66222 66223 66224 66225 66226 66227 66228 66229 66230 66231 66232 66233 66234 66235 66236 66237 66238 66239 66240 66241 66242 66243 66244 66245 66246 66247 66248 66249 66250 66251 66252 66253 66254 66255 66256 66257 66258 66259 66260 66261 66262 66263 66264 66265 66266 66267 66268 66269 66270 66271 66272 66273 66274 66275 66276 66277 66278 66279 66280 66281 66282 66283 66284 66285 66286 66287 66288 66289 66290 66291 66292 66293 66294 66295 66296 66297 66298 66299 66300 66301 66302 66303 66304 66305 66306 66307 66308 66309 66310 66311 66312 66313 66314 66315 66316 66317 66318 66319 66320 66321 66322 66323 66324 66325 66326 66327 66328 66329 66330 66331 66332 66333 66334 66335 66336 66337 66338 66339 66340 66341 66342 66343 66344 66345 66346 66347 66348 66349 66350 66351 66352 66353 66354 66355 66356 66357 66358 66359 66360 66361 66362 66363 66364 66365 66366 66367 66368 66369 66370 66371 66372 66373 66374 66375 66376 66377 66378 66379 66380 66381 66382 66383 66384 66385 66386 66387 66388 66389 66390 66391 66392 66393 66394 66395 66396 66397 66398 66399 66400 66401 66402 66403 66404 66405 66406 66407 66408 66409 66410 66411 66412 66413 66414 66415 66416 66417 66418 66419 66420 66421 66422 66423 66424 66425 66426 66427 66428 66429 66430 66431 66432 66433 66434 66435 66436 66437 66438 66439 66440 66441 66442 66443 66444 66445 66446 66447 66448 66449 66450 66451 66452 66453 66454 66455 66456 66457 66458 66459 66460 66461 66462 66463 66464 66465 66466 66467 66468 66469 66470 66471 66472 66473 66474 66475 66476 66477 66478 66479 66480 66481 66482 66483 66484 66485 66486 66487 66488 66489 66490 66491 66492 66493 66494 66495 66496 66497 66498 66499 66500 66501 66502 66503 66504 66505 66506 66507 66508 66509 66510 66511 66512 66513 66514 66515 66516 66517 66518 66519 66520 66521 66522 66523 66524 66525 66526 66527 66528 66529 66530 66531 66532 66533 66534 66535 66536 66537 66538 66539 66540 66541 66542 66543 66544 66545 66546 66547 66548 66549 66550 66551 66552 66553 66554 66555 66556 66557 66558 66559 66560 66561 66562 66563 66564 66565 66566 66567 66568 66569 66570 66571 66572 66573 66574 66575 66576 66577 66578 66579 66580 66581 66582 66583 66584 66585 66586 66587 66588 66589 66590 66591 66592 66593 66594 66595 66596 66597 66598 66599 66600 66601 66602 66603 66604 66605 66606 66607 66608 66609 66610 66611 66612 66613 66614 66615 66616 66617 66618 66619 66620 66621 66622 66623 66624 66625 66626 66627 66628 66629 66630 66631 66632 66633 66634 66635 66636 66637 66638 66639 66640 66641 66642 66643 66644 66645 66646 66647 66648 66649 66650 66651 66652 66653 66654 66655 66656 66657 66658 66659 66660 66661 66662 66663 66664 66665 66666 66667 66668 66669 66670 66671 66672 66673 66674 66675 66676 66677 66678 66679 66680 66681 66682 66683 66684 66685 66686 66687 66688 66689 66690 66691 66692 66693 66694 66695 66696 66697 66698 66699 66700 66701 66702 66703 66704 66705 66706 66707 66708 66709 66710 66711 66712 66713 66714 66715 66716 66717 66718 66719 66720 66721 66722 66723 66724 66725 66726 66727 66728 66729 66730 66731 66732 66733 66734 66735 66736 66737 66738 66739 66740 66741 66742 66743 66744 66745 66746 66747 66748 66749 66750 66751 66752 66753 66754 66755 66756 66757 66758 66759 66760 66761 66762 66763 66764 66765 66766 66767 66768 66769 66770 66771 66772 66773 66774 66775 66776 66777 66778 66779 66780 66781 66782 66783 66784 66785 66786 66787 66788 66789 66790 66791 66792 66793 66794 66795 66796 66797 66798 66799 66800 66801 66802 66803 66804 66805 66806 66807 66808 66809 66810 66811 66812 66813 66814 66815 66816 66817 66818 66819 66820 66821 66822 66823 66824 66825 66826 66827 66828 66829 66830 66831 66832 66833 66834 66835 66836 66837 66838 66839 66840 66841 66842 66843 66844 66845 66846 66847 66848 66849 66850 66851 66852 66853 66854 66855 66856 66857 66858 66859 66860 66861 66862 66863 66864 66865 66866 66867 66868 66869 66870 66871 66872 66873 66874 66875 66876 66877 66878 66879 66880 66881 66882 66883 66884 66885 66886 66887 66888 66889 66890 66891 66892 66893 66894 66895 66896 66897 66898 66899 66900 66901 66902 66903 66904 66905 66906 66907 66908 66909 66910 66911 66912 66913 66914 66915 66916 66917 66918 66919 66920 66921 66922 66923 66924 66925 66926 66927 66928 66929 66930 66931 66932 66933 66934 66935 66936 66937 66938 66939 66940 66941 66942 66943 66944 66945 66946 66947 66948 66949 66950 66951 66952 66953 66954 66955 66956 66957 66958 66959 66960 66961 66962 66963 66964 66965 66966 66967 66968 66969 66970 66971 66972 66973 66974 66975 66976 66977 66978 66979 66980 66981 66982 66983 66984 66985 66986 66987 66988 66989 66990 66991 66992 66993 66994 66995 66996 66997 66998 66999 67000 67001 67002 67003 67004 67005 67006 67007 67008 67009 67010 67011 67012 67013 67014 67015 67016 67017 67018 67019 67020 67021 67022 67023 67024 67025 67026 67027 67028 67029 67030 67031 67032 67033 67034 67035 67036 67037 67038 67039 67040 67041 67042 67043 67044 67045 67046 67047 67048 67049 67050 67051 67052 67053 67054 67055 67056 67057 67058 67059 67060 67061 67062 67063 67064 67065 67066 67067 67068 67069 67070 67071 67072 67073 67074 67075 67076 67077 67078 67079 67080 67081 67082 67083 67084 67085 67086 67087 67088 67089 67090 67091 67092 67093 67094 67095 67096 67097 67098 67099 67100 67101 67102 67103 67104 67105 67106 67107 67108 67109 67110 67111 67112 67113 67114 67115 67116 67117 67118 67119 67120 67121 67122 67123 67124 67125 67126 67127 67128 67129 67130 67131 67132 67133 67134 67135 67136 67137 67138 67139 67140 67141 67142 67143 67144 67145 67146 67147 67148 67149 67150 67151 67152 67153 67154 67155 67156 67157 67158 67159 67160 67161 67162 67163 67164 67165 67166 67167 67168 67169 67170 67171 67172 67173 67174 67175 67176 67177 67178 67179 67180 67181 67182 67183 67184 67185 67186 67187 67188 67189 67190 67191 67192 67193 67194 67195 67196 67197 67198 67199 67200 67201 67202 67203 67204 67205 67206 67207 67208 67209 67210 67211 67212 67213 67214 67215 67216 67217 67218 67219 67220 67221 67222 67223 67224 67225 67226 67227 67228 67229 67230 67231 67232 67233 67234 67235 67236 67237 67238 67239 67240 67241 67242 67243 67244 67245 67246 67247 67248 67249 67250 67251 67252 67253 67254 67255 67256 67257 67258 67259 67260 67261 67262 67263 67264 67265 67266 67267 67268 67269 67270 67271 67272 67273 67274 67275 67276 67277 67278 67279 67280 67281 67282 67283 67284 67285 67286 67287 67288 67289 67290 67291 67292 67293 67294 67295 67296 67297 67298 67299 67300 67301 67302 67303 67304 67305 67306 67307 67308 67309 67310 67311 67312 67313 67314 67315 67316 67317 67318 67319 67320 67321 67322 67323 67324 67325 67326 67327 67328 67329 67330 67331 67332 67333 67334 67335 67336 67337 67338 67339 67340 67341 67342 67343 67344 67345 67346 67347 67348 67349 67350 67351 67352 67353 67354 67355 67356 67357 67358 67359 67360 67361 67362 67363 67364 67365 67366 67367 67368 67369 67370 67371 67372 67373 67374 67375 67376 67377 67378 67379 67380 67381 67382 67383 67384 67385 67386 67387 67388 67389 67390 67391 67392 67393 67394 67395 67396 67397 67398 67399 67400 67401 67402 67403 67404 67405 67406 67407 67408 67409 67410 67411 67412 67413 67414 67415 67416 67417 67418 67419 67420 67421 67422 67423 67424 67425 67426 67427 67428 67429 67430 67431 67432 67433 67434 67435 67436 67437 67438 67439 67440 67441 67442 67443 67444 67445 67446 67447 67448 67449 67450 67451 67452 67453 67454 67455 67456 67457 67458 67459 67460 67461 67462 67463 67464 67465 67466 67467 67468 67469 67470 67471 67472 67473 67474 67475 67476 67477 67478 67479 67480 67481 67482 67483 67484 67485 67486 67487 67488 67489 67490 67491 67492 67493 67494 67495 67496 67497 67498 67499 67500 67501 67502 67503 67504 67505 67506 67507 67508 67509 67510 67511 67512 67513 67514 67515 67516 67517 67518 67519 67520 67521 67522 67523 67524 67525 67526 67527 67528 67529 67530 67531 67532 67533 67534 67535 67536 67537 67538 67539 67540 67541 67542 67543 67544 67545 67546 67547 67548 67549 67550 67551 67552 67553 67554 67555 67556 67557 67558 67559 67560 67561 67562 67563 67564 67565 67566 67567 67568 67569 67570 67571 67572 67573 67574 67575 67576 67577 67578 67579 67580 67581 67582 67583 67584 67585 67586 67587 67588 67589 67590 67591 67592 67593 67594 67595 67596 67597 67598 67599 67600 67601 67602 67603 67604 67605 67606 67607 67608 67609 67610 67611 67612 67613 67614 67615 67616 67617 67618 67619 67620 67621 67622 67623 67624 67625 67626 67627 67628 67629 67630 67631 67632 67633 67634 67635 67636 67637 67638 67639 67640 67641 67642 67643 67644 67645 67646 67647 67648 67649 67650 67651 67652 67653 67654 67655 67656 67657 67658 67659 67660 67661 67662 67663 67664 67665 67666 67667 67668 67669 67670 67671 67672 67673 67674 67675 67676 67677 67678 67679 67680 67681 67682 67683 67684 67685 67686 67687 67688 67689 67690 67691 67692 67693 67694 67695 67696 67697 67698 67699 67700 67701 67702 67703 67704 67705 67706 67707 67708 67709 67710 67711 67712 67713 67714 67715 67716 67717 67718 67719 67720 67721 67722 67723 67724 67725 67726 67727 67728 67729 67730 67731 67732 67733 67734 67735 67736 67737 67738 67739 67740 67741 67742 67743 67744 67745 67746 67747 67748 67749 67750 67751 67752 67753 67754 67755 67756 67757 67758 67759 67760 67761 67762 67763 67764 67765 67766 67767 67768 67769 67770 67771 67772 67773 67774 67775 67776 67777 67778 67779 67780 67781 67782 67783 67784 67785 67786 67787 67788 67789 67790 67791 67792 67793 67794 67795 67796 67797 67798 67799 67800 67801 67802 67803 67804 67805 67806 67807 67808 67809 67810 67811 67812 67813 67814 67815 67816 67817 67818 67819 67820 67821 67822 67823 67824 67825 67826 67827 67828 67829 67830 67831 67832 67833 67834 67835 67836 67837 67838 67839 67840 67841 67842 67843 67844 67845 67846 67847 67848 67849 67850 67851 67852 67853 67854 67855 67856 67857 67858 67859 67860 67861 67862 67863 67864 67865 67866 67867 67868 67869 67870 67871 67872 67873 67874 67875 67876 67877 67878 67879 67880 67881 67882 67883 67884 67885 67886 67887 67888 67889 67890 67891 67892 67893 67894 67895 67896 67897 67898 67899 67900 67901 67902 67903 67904 67905 67906 67907 67908 67909 67910 67911 67912 67913 67914 67915 67916 67917 67918 67919 67920 67921 67922 67923 67924 67925 67926 67927 67928 67929 67930 67931 67932 67933 67934 67935 67936 67937 67938 67939 67940 67941 67942 67943 67944 67945 67946 67947 67948 67949 67950 67951 67952 67953 67954 67955 67956 67957 67958 67959 67960 67961 67962 67963 67964 67965 67966 67967 67968 67969 67970 67971 67972 67973 67974 67975 67976 67977 67978 67979 67980 67981 67982 67983 67984 67985 67986 67987 67988 67989 67990 67991 67992 67993 67994 67995 67996 67997 67998 67999 68000 68001 68002 68003 68004 68005 68006 68007 68008 68009 68010 68011 68012 68013 68014 68015 68016 68017 68018 68019 68020 68021 68022 68023 68024 68025 68026 68027 68028 68029 68030 68031 68032 68033 68034 68035 68036 68037 68038 68039 68040 68041 68042 68043 68044 68045 68046 68047 68048 68049 68050 68051 68052 68053 68054 68055 68056 68057 68058 68059 68060 68061 68062 68063 68064 68065 68066 68067 68068 68069 68070 68071 68072 68073 68074 68075 68076 68077 68078 68079 68080 68081 68082 68083 68084 68085 68086 68087 68088 68089 68090 68091 68092 68093 68094 68095 68096 68097 68098 68099 68100 68101 68102 68103 68104 68105 68106 68107 68108 68109 68110 68111 68112 68113 68114 68115 68116 68117 68118 68119 68120 68121 68122 68123 68124 68125 68126 68127 68128 68129 68130 68131 68132 68133 68134 68135 68136 68137 68138 68139 68140 68141 68142 68143 68144 68145 68146 68147 68148 68149 68150 68151 68152 68153 68154 68155 68156 68157 68158 68159 68160 68161 68162 68163 68164 68165 68166 68167 68168 68169 68170 68171 68172 68173 68174 68175 68176 68177 68178 68179 68180 68181 68182 68183 68184 68185 68186 68187 68188 68189 68190 68191 68192 68193 68194 68195 68196 68197 68198 68199 68200 68201 68202 68203 68204 68205 68206 68207 68208 68209 68210 68211 68212 68213 68214 68215 68216 68217 68218 68219 68220 68221 68222 68223 68224 68225 68226 68227 68228 68229 68230 68231 68232 68233 68234 68235 68236 68237 68238 68239 68240 68241 68242 68243 68244 68245 68246 68247 68248 68249 68250 68251 68252 68253 68254 68255 68256 68257 68258 68259 68260 68261 68262 68263 68264 68265 68266 68267 68268 68269 68270 68271 68272 68273 68274 68275 68276 68277 68278 68279 68280 68281 68282 68283 68284 68285 68286 68287 68288 68289 68290 68291 68292 68293 68294 68295 68296 68297 68298 68299 68300 68301 68302 68303 68304 68305 68306 68307 68308 68309 68310 68311 68312 68313 68314 68315 68316 68317 68318 68319 68320 68321 68322 68323 68324 68325 68326 68327 68328 68329 68330 68331 68332 68333 68334 68335 68336 68337 68338 68339 68340 68341 68342 68343 68344 68345 68346 68347 68348 68349 68350 68351 68352 68353 68354 68355 68356 68357 68358 68359 68360 68361 68362 68363 68364 68365 68366 68367 68368 68369 68370 68371 68372 68373 68374 68375 68376 68377 68378 68379 68380 68381 68382 68383 68384 68385 68386 68387 68388 68389 68390 68391 68392 68393 68394 68395 68396 68397 68398 68399 68400 68401 68402 68403 68404 68405 68406 68407 68408 68409 68410 68411 68412 68413 68414 68415 68416 68417 68418 68419 68420 68421 68422 68423 68424 68425 68426 68427 68428 68429 68430 68431 68432 68433 68434 68435 68436 68437 68438 68439 68440 68441 68442 68443 68444 68445 68446 68447 68448 68449 68450 68451 68452 68453 68454 68455 68456 68457 68458 68459 68460 68461 68462 68463 68464 68465 68466 68467 68468 68469 68470 68471 68472 68473 68474 68475 68476 68477 68478 68479 68480 68481 68482 68483 68484 68485 68486 68487 68488 68489 68490 68491 68492 68493 68494 68495 68496 68497 68498 68499 68500 68501 68502 68503 68504 68505 68506 68507 68508 68509 68510 68511 68512 68513 68514 68515 68516 68517 68518 68519 68520 68521 68522 68523 68524 68525 68526 68527 68528 68529 68530 68531 68532 68533 68534 68535 68536 68537 68538 68539 68540 68541 68542 68543 68544 68545 68546 68547 68548 68549 68550 68551 68552 68553 68554 68555 68556 68557 68558 68559 68560 68561 68562 68563 68564 68565 68566 68567 68568 68569 68570 68571 68572 68573 68574 68575 68576 68577 68578 68579 68580 68581 68582 68583 68584 68585 68586 68587 68588 68589 68590 68591 68592 68593 68594 68595 68596 68597 68598 68599 68600 68601 68602 68603 68604 68605 68606 68607 68608 68609 68610 68611 68612 68613 68614 68615 68616 68617 68618 68619 68620 68621 68622 68623 68624 68625 68626 68627 68628 68629 68630 68631 68632 68633 68634 68635 68636 68637 68638 68639 68640 68641 68642 68643 68644 68645 68646 68647 68648 68649 68650 68651 68652 68653 68654 68655 68656 68657 68658 68659 68660 68661 68662 68663 68664 68665 68666 68667 68668 68669 68670 68671 68672 68673 68674 68675 68676 68677 68678 68679 68680 68681 68682 68683 68684 68685 68686 68687 68688 68689 68690 68691 68692 68693 68694 68695 68696 68697 68698 68699 68700 68701 68702 68703 68704 68705 68706 68707 68708 68709 68710 68711 68712 68713 68714 68715 68716 68717 68718 68719 68720 68721 68722 68723 68724 68725 68726 68727 68728 68729 68730 68731 68732 68733 68734 68735 68736 68737 68738 68739 68740 68741 68742 68743 68744 68745 68746 68747 68748 68749 68750 68751 68752 68753 68754 68755 68756 68757 68758 68759 68760 68761 68762 68763 68764 68765 68766 68767 68768 68769 68770 68771 68772 68773 68774 68775 68776 68777 68778 68779 68780 68781 68782 68783 68784 68785 68786 68787 68788 68789 68790 68791 68792 68793 68794 68795 68796 68797 68798 68799 68800 68801 68802 68803 68804 68805 68806 68807 68808 68809 68810 68811 68812 68813 68814 68815 68816 68817 68818 68819 68820 68821 68822 68823 68824 68825 68826 68827 68828 68829 68830 68831 68832 68833 68834 68835 68836 68837 68838 68839 68840 68841 68842 68843 68844 68845 68846 68847 68848 68849 68850 68851 68852 68853 68854 68855 68856 68857 68858 68859 68860 68861 68862 68863 68864 68865 68866 68867 68868 68869 68870 68871 68872 68873 68874 68875 68876 68877 68878 68879 68880 68881 68882 68883 68884 68885 68886 68887 68888 68889 68890 68891 68892 68893 68894 68895 68896 68897 68898 68899 68900 68901 68902 68903 68904 68905 68906 68907 68908 68909 68910 68911 68912 68913 68914 68915 68916 68917 68918 68919 68920 68921 68922 68923 68924 68925 68926 68927 68928 68929 68930 68931 68932 68933 68934 68935 68936 68937 68938 68939 68940 68941 68942 68943 68944 68945 68946 68947 68948 68949 68950 68951 68952 68953 68954 68955 68956 68957 68958 68959 68960 68961 68962 68963 68964 68965 68966 68967 68968 68969 68970 68971 68972 68973 68974 68975 68976 68977 68978 68979 68980 68981 68982 68983 68984 68985 68986 68987 68988 68989 68990 68991 68992 68993 68994 68995 68996 68997 68998 68999 69000 69001 69002 69003 69004 69005 69006 69007 69008 69009 69010 69011 69012 69013 69014 69015 69016 69017 69018 69019 69020 69021 69022 69023 69024 69025 69026 69027 69028 69029 69030 69031 69032 69033 69034 69035 69036 69037 69038 69039 69040 69041 69042 69043 69044 69045 69046 69047 69048 69049 69050 69051 69052 69053 69054 69055 69056 69057 69058 69059 69060 69061 69062 69063 69064 69065 69066 69067 69068 69069 69070 69071 69072 69073 69074 69075 69076 69077 69078 69079 69080 69081 69082 69083 69084 69085 69086 69087 69088 69089 69090 69091 69092 69093 69094 69095 69096 69097 69098 69099 69100 69101 69102 69103 69104 69105 69106 69107 69108 69109 69110 69111 69112 69113 69114 69115 69116 69117 69118 69119 69120 69121 69122 69123 69124 69125 69126 69127 69128 69129 69130 69131 69132 69133 69134 69135 69136 69137 69138 69139 69140 69141 69142 69143 69144 69145 69146 69147 69148 69149 69150 69151 69152 69153 69154 69155 69156 69157 69158 69159 69160 69161 69162 69163 69164 69165 69166 69167 69168 69169 69170 69171 69172 69173 69174 69175 69176 69177 69178 69179 69180 69181 69182 69183 69184 69185 69186 69187 69188 69189 69190 69191 69192 69193 69194 69195 69196 69197 69198 69199 69200 69201 69202 69203 69204 69205 69206 69207 69208 69209 69210 69211 69212 69213 69214 69215 69216 69217 69218 69219 69220 69221 69222 69223 69224 69225 69226 69227 69228 69229 69230 69231 69232 69233 69234 69235 69236 69237 69238 69239 69240 69241 69242 69243 69244 69245 69246 69247 69248 69249 69250 69251 69252 69253 69254 69255 69256 69257 69258 69259 69260 69261 69262 69263 69264 69265 69266 69267 69268 69269 69270 69271 69272 69273 69274 69275 69276 69277 69278 69279 69280 69281 69282 69283 69284 69285 69286 69287 69288 69289 69290 69291 69292 69293 69294 69295 69296 69297 69298 69299 69300 69301 69302 69303 69304 69305 69306 69307 69308 69309 69310 69311 69312 69313 69314 69315 69316 69317 69318 69319 69320 69321 69322 69323 69324 69325 69326 69327 69328 69329 69330 69331 69332 69333 69334 69335 69336 69337 69338 69339 69340 69341 69342 69343 69344 69345 69346 69347 69348 69349 69350 69351 69352 69353 69354 69355 69356 69357 69358 69359 69360 69361 69362 69363 69364 69365 69366 69367 69368 69369 69370 69371 69372 69373 69374 69375 69376 69377 69378 69379 69380 69381 69382 69383 69384 69385 69386 69387 69388 69389 69390 69391 69392 69393 69394 69395 69396 69397 69398 69399 69400 69401 69402 69403 69404 69405 69406 69407 69408 69409 69410 69411 69412 69413 69414 69415 69416 69417 69418 69419 69420 69421 69422 69423 69424 69425 69426 69427 69428 69429 69430 69431 69432 69433 69434 69435 69436 69437 69438 69439 69440 69441 69442 69443 69444 69445 69446 69447 69448 69449 69450 69451 69452 69453 69454 69455 69456 69457 69458 69459 69460 69461 69462 69463 69464 69465 69466 69467 69468 69469 69470 69471 69472 69473 69474 69475 69476 69477 69478 69479 69480 69481 69482 69483 69484 69485 69486 69487 69488 69489 69490 69491 69492 69493 69494 69495 69496 69497 69498 69499 69500 69501 69502 69503 69504 69505 69506 69507 69508 69509 69510 69511 69512 69513 69514 69515 69516 69517 69518 69519 69520 69521 69522 69523 69524 69525 69526 69527 69528 69529 69530 69531 69532 69533 69534 69535 69536 69537 69538 69539 69540 69541 69542 69543 69544 69545 69546 69547 69548 69549 69550 69551 69552 69553 69554 69555 69556 69557 69558 69559 69560 69561 69562 69563 69564 69565 69566 69567 69568 69569 69570 69571 69572 69573 69574 69575 69576 69577 69578 69579 69580 69581 69582 69583 69584 69585 69586 69587 69588 69589 69590 69591 69592 69593 69594 69595 69596 69597 69598 69599 69600 69601 69602 69603 69604 69605 69606 69607 69608 69609 69610 69611 69612 69613 69614 69615 69616 69617 69618 69619 69620 69621 69622 69623 69624 69625 69626 69627 69628 69629 69630 69631 69632 69633 69634 69635 69636 69637 69638 69639 69640 69641 69642 69643 69644 69645 69646 69647 69648 69649 69650 69651 69652 69653 69654 69655 69656 69657 69658 69659 69660 69661 69662 69663 69664 69665 69666 69667 69668 69669 69670 69671 69672 69673 69674 69675 69676 69677 69678 69679 69680 69681 69682 69683 69684 69685 69686 69687 69688 69689 69690 69691 69692 69693 69694 69695 69696 69697 69698 69699 69700 69701 69702 69703 69704 69705 69706 69707 69708 69709 69710 69711 69712 69713 69714 69715 69716 69717 69718 69719 69720 69721 69722 69723 69724 69725 69726 69727 69728 69729 69730 69731 69732 69733 69734 69735 69736 69737 69738 69739 69740 69741 69742 69743 69744 69745 69746 69747 69748 69749 69750 69751 69752 69753 69754 69755 69756 69757 69758 69759 69760 69761 69762 69763 69764 69765 69766 69767 69768 69769 69770 69771 69772 69773 69774 69775 69776 69777 69778 69779 69780 69781 69782 69783 69784 69785 69786 69787 69788 69789 69790 69791 69792 69793 69794 69795 69796 69797 69798 69799 69800 69801 69802 69803 69804 69805 69806 69807 69808 69809 69810 69811 69812 69813 69814 69815 69816 69817 69818 69819 69820 69821 69822 69823 69824 69825 69826 69827 69828 69829 69830 69831 69832 69833 69834 69835 69836 69837 69838 69839 69840 69841 69842 69843 69844 69845 69846 69847 69848 69849 69850 69851 69852 69853 69854 69855 69856 69857 69858 69859 69860 69861 69862 69863 69864 69865 69866 69867 69868 69869 69870 69871 69872 69873 69874 69875 69876 69877 69878 69879 69880 69881 69882 69883 69884 69885 69886 69887 69888 69889 69890 69891 69892 69893 69894 69895 69896 69897 69898 69899 69900 69901 69902 69903 69904 69905 69906 69907 69908 69909 69910 69911 69912 69913 69914 69915 69916 69917 69918 69919 69920 69921 69922 69923 69924 69925 69926 69927 69928 69929 69930 69931 69932 69933 69934 69935 69936 69937 69938 69939 69940 69941 69942 69943 69944 69945 69946 69947 69948 69949 69950 69951 69952 69953 69954 69955 69956 69957 69958 69959 69960 69961 69962 69963 69964 69965 69966 69967 69968 69969 69970 69971 69972 69973 69974 69975 69976 69977 69978 69979 69980 69981 69982 69983 69984 69985 69986 69987 69988 69989 69990 69991 69992 69993 69994 69995 69996 69997 69998 69999 70000 70001 70002 70003 70004 70005 70006 70007 70008 70009 70010 70011 70012 70013 70014 70015 70016 70017 70018 70019 70020 70021 70022 70023 70024 70025 70026 70027 70028 70029 70030 70031 70032 70033 70034 70035 70036 70037 70038 70039 70040 70041 70042 70043 70044 70045 70046 70047 70048 70049 70050 70051 70052 70053 70054 70055 70056 70057 70058 70059 70060 70061 70062 70063 70064 70065 70066 70067 70068 70069 70070 70071 70072 70073 70074 70075 70076 70077 70078 70079 70080 70081 70082 70083 70084 70085 70086 70087 70088 70089 70090 70091 70092 70093 70094 70095 70096 70097 70098 70099 70100 70101 70102 70103 70104 70105 70106 70107 70108 70109 70110 70111 70112 70113 70114 70115 70116 70117 70118 70119 70120 70121 70122 70123 70124 70125 70126 70127 70128 70129 70130 70131 70132 70133 70134 70135 70136 70137 70138 70139 70140 70141 70142 70143 70144 70145 70146 70147 70148 70149 70150 70151 70152 70153 70154 70155 70156 70157 70158 70159 70160 70161 70162 70163 70164 70165 70166 70167 70168 70169 70170 70171 70172 70173 70174 70175 70176 70177 70178 70179 70180 70181 70182 70183 70184 70185 70186 70187 70188 70189 70190 70191 70192 70193 70194 70195 70196 70197 70198 70199 70200 70201 70202 70203 70204 70205 70206 70207 70208 70209 70210 70211 70212 70213 70214 70215 70216 70217 70218 70219 70220 70221 70222 70223 70224 70225 70226 70227 70228 70229 70230 70231 70232 70233 70234 70235 70236 70237 70238 70239 70240 70241 70242 70243 70244 70245 70246 70247 70248 70249 70250 70251 70252 70253 70254 70255 70256 70257 70258 70259 70260 70261 70262 70263 70264 70265 70266 70267 70268 70269 70270 70271 70272 70273 70274 70275 70276 70277 70278 70279 70280 70281 70282 70283 70284 70285 70286 70287 70288 70289 70290 70291 70292 70293 70294 70295 70296 70297 70298 70299 70300 70301 70302 70303 70304 70305 70306 70307 70308 70309 70310 70311 70312 70313 70314 70315 70316 70317 70318 70319 70320 70321 70322 70323 70324 70325 70326 70327 70328 70329 70330 70331 70332 70333 70334 70335 70336 70337 70338 70339 70340 70341 70342 70343 70344 70345 70346 70347 70348 70349 70350 70351 70352 70353 70354 70355 70356 70357 70358 70359 70360 70361 70362 70363 70364 70365 70366 70367 70368 70369 70370 70371 70372 70373 70374 70375 70376 70377 70378 70379 70380 70381 70382 70383 70384 70385 70386 70387 70388 70389 70390 70391 70392 70393 70394 70395 70396 70397 70398 70399 70400 70401 70402 70403 70404 70405 70406 70407 70408 70409 70410 70411 70412 70413 70414 70415 70416 70417 70418 70419 70420 70421 70422 70423 70424 70425 70426 70427 70428 70429 70430 70431 70432 70433 70434 70435 70436 70437 70438 70439 70440 70441 70442 70443 70444 70445 70446 70447 70448 70449 70450 70451 70452 70453 70454 70455 70456 70457 70458 70459 70460 70461 70462 70463 70464 70465 70466 70467 70468 70469 70470 70471 70472 70473 70474 70475 70476 70477 70478 70479 70480 70481 70482 70483 70484 70485 70486 70487 70488 70489 70490 70491 70492 70493 70494 70495 70496 70497 70498 70499 70500 70501 70502 70503 70504 70505 70506 70507 70508 70509 70510 70511 70512 70513 70514 70515 70516 70517 70518 70519 70520 70521 70522 70523 70524 70525 70526 70527 70528 70529 70530 70531 70532 70533 70534 70535 70536 70537 70538 70539 70540 70541 70542 70543 70544 70545 70546 70547 70548 70549 70550 70551 70552 70553 70554 70555 70556 70557 70558 70559 70560 70561 70562 70563 70564 70565 70566 70567 70568 70569 70570 70571 70572 70573 70574 70575 70576 70577 70578 70579 70580 70581 70582 70583 70584 70585 70586 70587 70588 70589 70590 70591 70592 70593 70594 70595 70596 70597 70598 70599 70600 70601 70602 70603 70604 70605 70606 70607 70608 70609 70610 70611 70612 70613 70614 70615 70616 70617 70618 70619 70620 70621 70622 70623 70624 70625 70626 70627 70628 70629 70630 70631 70632 70633 70634 70635 70636 70637 70638 70639 70640 70641 70642 70643 70644 70645 70646 70647 70648 70649 70650 70651 70652 70653 70654 70655 70656 70657 70658 70659 70660 70661 70662 70663 70664 70665 70666 70667 70668 70669 70670 70671 70672 70673 70674 70675 70676 70677 70678 70679 70680 70681 70682 70683 70684 70685 70686 70687 70688 70689 70690 70691 70692 70693 70694 70695 70696 70697 70698 70699 70700 70701 70702 70703 70704 70705 70706 70707 70708 70709 70710 70711 70712 70713 70714 70715 70716 70717 70718 70719 70720 70721 70722 70723 70724 70725 70726 70727 70728 70729 70730 70731 70732 70733 70734 70735 70736 70737 70738 70739 70740 70741 70742 70743 70744 70745 70746 70747 70748 70749 70750 70751 70752 70753 70754 70755 70756 70757 70758 70759 70760 70761 70762 70763 70764 70765 70766 70767 70768 70769 70770 70771 70772 70773 70774 70775 70776 70777 70778 70779 70780 70781 70782 70783 70784 70785 70786 70787 70788 70789 70790 70791 70792 70793 70794 70795 70796 70797 70798 70799 70800 70801 70802 70803 70804 70805 70806 70807 70808 70809 70810 70811 70812 70813 70814 70815 70816 70817 70818 70819 70820 70821 70822 70823 70824 70825 70826 70827 70828 70829 70830 70831 70832 70833 70834 70835 70836 70837 70838 70839 70840 70841 70842 70843 70844 70845 70846 70847 70848 70849 70850 70851 70852 70853 70854 70855 70856 70857 70858 70859 70860 70861 70862 70863 70864 70865 70866 70867 70868 70869 70870 70871 70872 70873 70874 70875 70876 70877 70878 70879 70880 70881 70882 70883 70884 70885 70886 70887 70888 70889 70890 70891 70892 70893 70894 70895 70896 70897 70898 70899 70900 70901 70902 70903 70904 70905 70906 70907 70908 70909 70910 70911 70912 70913 70914 70915 70916 70917 70918 70919 70920 70921 70922 70923 70924 70925 70926 70927 70928 70929 70930 70931 70932 70933 70934 70935 70936 70937 70938 70939 70940 70941 70942 70943 70944 70945 70946 70947 70948 70949 70950 70951 70952 70953 70954 70955 70956 70957 70958 70959 70960 70961 70962 70963 70964 70965 70966 70967 70968 70969 70970 70971 70972 70973 70974 70975 70976 70977 70978 70979 70980 70981 70982 70983 70984 70985 70986 70987 70988 70989 70990 70991 70992 70993 70994 70995 70996 70997 70998 70999 71000 71001 71002 71003 71004 71005 71006 71007 71008 71009 71010 71011 71012 71013 71014 71015 71016 71017 71018 71019 71020 71021 71022 71023 71024 71025 71026 71027 71028 71029 71030 71031 71032 71033 71034 71035 71036 71037 71038 71039 71040 71041 71042 71043 71044 71045 71046 71047 71048 71049 71050 71051 71052 71053 71054 71055 71056 71057 71058 71059 71060 71061 71062 71063 71064 71065 71066 71067 71068 71069 71070 71071 71072 71073 71074 71075 71076 71077 71078 71079 71080 71081 71082 71083 71084 71085 71086 71087 71088 71089 71090 71091 71092 71093 71094 71095 71096 71097 71098 71099 71100 71101 71102 71103 71104 71105 71106 71107 71108 71109 71110 71111 71112 71113 71114 71115 71116 71117 71118 71119 71120 71121 71122 71123 71124 71125 71126 71127 71128 71129 71130 71131 71132 71133 71134 71135 71136 71137 71138 71139 71140 71141 71142 71143 71144 71145 71146 71147 71148 71149 71150 71151 71152 71153 71154 71155 71156 71157 71158 71159 71160 71161 71162 71163 71164 71165 71166 71167 71168 71169 71170 71171 71172 71173 71174 71175 71176 71177 71178 71179 71180 71181 71182 71183 71184 71185 71186 71187 71188 71189 71190 71191 71192 71193 71194 71195 71196 71197 71198 71199 71200 71201 71202 71203 71204 71205 71206 71207 71208 71209 71210 71211 71212 71213 71214 71215 71216 71217 71218 71219 71220 71221 71222 71223 71224 71225 71226 71227 71228 71229 71230 71231 71232 71233 71234 71235 71236 71237 71238 71239 71240 71241 71242 71243 71244 71245 71246 71247 71248 71249 71250 71251 71252 71253 71254 71255 71256 71257 71258 71259 71260 71261 71262 71263 71264 71265 71266 71267 71268 71269 71270 71271 71272 71273 71274 71275 71276 71277 71278 71279 71280 71281 71282 71283 71284 71285 71286 71287 71288 71289 71290 71291 71292 71293 71294 71295 71296 71297 71298 71299 71300 71301 71302 71303 71304 71305 71306 71307 71308 71309 71310 71311 71312 71313 71314 71315 71316 71317 71318 71319 71320 71321 71322 71323 71324 71325 71326 71327 71328 71329 71330 71331 71332 71333 71334 71335 71336 71337 71338 71339 71340 71341 71342 71343 71344 71345 71346 71347 71348 71349 71350 71351 71352 71353 71354 71355 71356 71357 71358 71359 71360 71361 71362 71363 71364 71365 71366 71367 71368 71369 71370 71371 71372 71373 71374 71375 71376 71377 71378 71379 71380 71381 71382 71383 71384 71385 71386 71387 71388 71389 71390 71391 71392 71393 71394 71395 71396 71397 71398 71399 71400 71401 71402 71403 71404 71405 71406 71407 71408 71409 71410 71411 71412 71413 71414 71415 71416 71417 71418 71419 71420 71421 71422 71423 71424 71425 71426 71427 71428 71429 71430 71431 71432 71433 71434 71435 71436 71437 71438 71439 71440 71441 71442 71443 71444 71445 71446 71447 71448 71449 71450 71451 71452 71453 71454 71455 71456 71457 71458 71459 71460 71461 71462 71463 71464 71465 71466 71467 71468 71469 71470 71471 71472 71473 71474 71475 71476 71477 71478 71479 71480 71481 71482 71483 71484 71485 71486 71487 71488 71489 71490 71491 71492 71493 71494 71495 71496 71497 71498 71499 71500 71501 71502 71503 71504 71505 71506 71507 71508 71509 71510 71511 71512 71513 71514 71515 71516 71517 71518 71519 71520 71521 71522 71523 71524 71525 71526 71527 71528 71529 71530 71531 71532 71533 71534 71535 71536 71537 71538 71539 71540 71541 71542 71543 71544 71545 71546 71547 71548 71549 71550 71551 71552 71553 71554 71555 71556 71557 71558 71559 71560 71561 71562 71563 71564 71565 71566 71567 71568 71569 71570 71571 71572 71573 71574 71575 71576 71577 71578 71579 71580 71581 71582 71583 71584 71585 71586 71587 71588 71589 71590 71591 71592 71593 71594 71595 71596 71597 71598 71599 71600 71601 71602 71603 71604 71605 71606 71607 71608 71609 71610 71611 71612 71613 71614 71615 71616 71617 71618 71619 71620 71621 71622 71623 71624 71625 71626 71627 71628 71629 71630 71631 71632 71633 71634 71635 71636 71637 71638 71639 71640 71641 71642 71643 71644 71645 71646 71647 71648 71649 71650 71651 71652 71653 71654 71655 71656 71657 71658 71659 71660 71661 71662 71663 71664 71665 71666 71667 71668 71669 71670 71671 71672 71673 71674 71675 71676 71677 71678 71679 71680 71681 71682 71683 71684 71685 71686 71687 71688 71689 71690 71691 71692 71693 71694 71695 71696 71697 71698 71699 71700 71701 71702 71703 71704 71705 71706 71707 71708 71709 71710 71711 71712 71713 71714 71715 71716 71717 71718 71719 71720 71721 71722 71723 71724 71725 71726 71727 71728 71729 71730 71731 71732 71733 71734 71735 71736 71737 71738 71739 71740 71741 71742 71743 71744 71745 71746 71747 71748 71749 71750 71751 71752 71753 71754 71755 71756 71757 71758 71759 71760 71761 71762 71763 71764 71765 71766 71767 71768 71769 71770 71771 71772 71773 71774 71775 71776 71777 71778 71779 71780 71781 71782 71783 71784 71785 71786 71787 71788 71789 71790 71791 71792 71793 71794 71795 71796 71797 71798 71799 71800 71801 71802 71803 71804 71805 71806 71807 71808 71809 71810 71811 71812 71813 71814 71815 71816 71817 71818 71819 71820 71821 71822 71823 71824 71825 71826 71827 71828 71829 71830 71831 71832 71833 71834 71835 71836 71837 71838 71839 71840 71841 71842 71843 71844 71845 71846 71847 71848 71849 71850 71851 71852 71853 71854 71855 71856 71857 71858 71859 71860 71861 71862 71863 71864 71865 71866 71867 71868 71869 71870 71871 71872 71873 71874 71875 71876 71877 71878 71879 71880 71881 71882 71883 71884 71885 71886 71887 71888 71889 71890 71891 71892 71893 71894 71895 71896 71897 71898 71899 71900 71901 71902 71903 71904 71905 71906 71907 71908 71909 71910 71911 71912 71913 71914 71915 71916 71917 71918 71919 71920 71921 71922 71923 71924 71925 71926 71927 71928 71929 71930 71931 71932 71933 71934 71935 71936 71937 71938 71939 71940 71941 71942 71943 71944 71945 71946 71947 71948 71949 71950 71951 71952 71953 71954 71955 71956 71957 71958 71959 71960 71961 71962 71963 71964 71965 71966 71967 71968 71969 71970 71971 71972 71973 71974 71975 71976 71977 71978 71979 71980 71981 71982 71983 71984 71985 71986 71987 71988 71989 71990 71991 71992 71993 71994 71995 71996 71997 71998 71999 72000 72001 72002 72003 72004 72005 72006 72007 72008 72009 72010 72011 72012 72013 72014 72015 72016 72017 72018 72019 72020 72021 72022 72023 72024 72025 72026 72027 72028 72029 72030 72031 72032 72033 72034 72035 72036 72037 72038 72039 72040 72041 72042 72043 72044 72045 72046 72047 72048 72049 72050 72051 72052 72053 72054 72055 72056 72057 72058 72059 72060 72061 72062 72063 72064 72065 72066 72067 72068 72069 72070 72071 72072 72073 72074 72075 72076 72077 72078 72079 72080 72081 72082 72083 72084 72085 72086 72087 72088 72089 72090 72091 72092 72093 72094 72095 72096 72097 72098 72099 72100 72101 72102 72103 72104 72105 72106 72107 72108 72109 72110 72111 72112 72113 72114 72115 72116 72117 72118 72119 72120 72121 72122 72123 72124 72125 72126 72127 72128 72129 72130 72131 72132 72133 72134 72135 72136 72137 72138 72139 72140 72141 72142 72143 72144 72145 72146 72147 72148 72149 72150 72151 72152 72153 72154 72155 72156 72157 72158 72159 72160 72161 72162 72163 72164 72165 72166 72167 72168 72169 72170 72171 72172 72173 72174 72175 72176 72177 72178 72179 72180 72181 72182 72183 72184 72185 72186 72187 72188 72189 72190 72191 72192 72193 72194 72195 72196 72197 72198 72199 72200 72201 72202 72203 72204 72205 72206 72207 72208 72209 72210 72211 72212 72213 72214 72215 72216 72217 72218 72219 72220 72221 72222 72223 72224 72225 72226 72227 72228 72229 72230 72231 72232 72233 72234 72235 72236 72237 72238 72239 72240 72241 72242 72243 72244 72245 72246 72247 72248 72249 72250 72251 72252 72253 72254 72255 72256 72257 72258 72259 72260 72261 72262 72263 72264 72265 72266 72267 72268 72269 72270 72271 72272 72273 72274 72275 72276 72277 72278 72279 72280 72281 72282 72283 72284 72285 72286 72287 72288 72289 72290 72291 72292 72293 72294 72295 72296 72297 72298 72299 72300 72301 72302 72303 72304 72305 72306 72307 72308 72309 72310 72311 72312 72313 72314 72315 72316 72317 72318 72319 72320 72321 72322 72323 72324 72325 72326 72327 72328 72329 72330 72331 72332 72333 72334 72335 72336 72337 72338 72339 72340 72341 72342 72343 72344 72345 72346 72347 72348 72349 72350 72351 72352 72353 72354 72355 72356 72357 72358 72359 72360 72361 72362 72363 72364 72365 72366 72367 72368 72369 72370 72371 72372 72373 72374 72375 72376 72377 72378 72379 72380 72381 72382 72383 72384 72385 72386 72387 72388 72389 72390 72391 72392 72393 72394 72395 72396 72397 72398 72399 72400 72401 72402 72403 72404 72405 72406 72407 72408 72409 72410 72411 72412 72413 72414 72415 72416 72417 72418 72419 72420 72421 72422 72423 72424 72425 72426 72427 72428 72429 72430 72431 72432 72433 72434 72435 72436 72437 72438 72439 72440 72441 72442 72443 72444 72445 72446 72447 72448 72449 72450 72451 72452 72453 72454 72455 72456 72457 72458 72459 72460 72461 72462 72463 72464 72465 72466 72467 72468 72469 72470 72471 72472 72473 72474 72475 72476 72477 72478 72479 72480 72481 72482 72483 72484 72485 72486 72487 72488 72489 72490 72491 72492 72493 72494 72495 72496 72497 72498 72499 72500 72501 72502 72503 72504 72505 72506 72507 72508 72509 72510 72511 72512 72513 72514 72515 72516 72517 72518 72519 72520 72521 72522 72523 72524 72525 72526 72527 72528 72529 72530 72531 72532 72533 72534 72535 72536 72537 72538 72539 72540 72541 72542 72543 72544 72545 72546 72547 72548 72549 72550 72551 72552 72553 72554 72555 72556 72557 72558 72559 72560 72561 72562 72563 72564 72565 72566 72567 72568 72569 72570 72571 72572 72573 72574 72575 72576 72577 72578 72579 72580 72581 72582 72583 72584 72585 72586 72587 72588 72589 72590 72591 72592 72593 72594 72595 72596 72597 72598 72599 72600 72601 72602 72603 72604 72605 72606 72607 72608 72609 72610 72611 72612 72613 72614 72615 72616 72617 72618 72619 72620 72621 72622 72623 72624 72625 72626 72627 72628 72629 72630 72631 72632 72633 72634 72635 72636 72637 72638 72639 72640 72641 72642 72643 72644 72645 72646 72647 72648 72649 72650 72651 72652 72653 72654 72655 72656 72657 72658 72659 72660 72661 72662 72663 72664 72665 72666 72667 72668 72669 72670 72671 72672 72673 72674 72675 72676 72677 72678 72679 72680 72681 72682 72683 72684 72685 72686 72687 72688 72689 72690 72691 72692 72693 72694 72695 72696 72697 72698 72699 72700 72701 72702 72703 72704 72705 72706 72707 72708 72709 72710 72711 72712 72713 72714 72715 72716 72717 72718 72719 72720 72721 72722 72723 72724 72725 72726 72727 72728 72729 72730 72731 72732 72733 72734 72735 72736 72737 72738 72739 72740 72741 72742 72743 72744 72745 72746 72747 72748 72749 72750 72751 72752 72753 72754 72755 72756 72757 72758 72759 72760 72761 72762 72763 72764 72765 72766 72767 72768 72769 72770 72771 72772 72773 72774 72775 72776 72777 72778 72779 72780 72781 72782 72783 72784 72785 72786 72787 72788 72789 72790 72791 72792 72793 72794 72795 72796 72797 72798 72799 72800 72801 72802 72803 72804 72805 72806 72807 72808 72809 72810 72811 72812 72813 72814 72815 72816 72817 72818 72819 72820 72821 72822 72823 72824 72825 72826 72827 72828 72829 72830 72831 72832 72833 72834 72835 72836 72837 72838 72839 72840 72841 72842 72843 72844 72845 72846 72847 72848 72849 72850 72851 72852 72853 72854 72855 72856 72857 72858 72859 72860 72861 72862 72863 72864 72865 72866 72867 72868 72869 72870 72871 72872 72873 72874 72875 72876 72877 72878 72879 72880 72881 72882 72883 72884 72885 72886 72887 72888 72889 72890 72891 72892 72893 72894 72895 72896 72897 72898 72899 72900 72901 72902 72903 72904 72905 72906 72907 72908 72909 72910 72911 72912 72913 72914 72915 72916 72917 72918 72919 72920 72921 72922 72923 72924 72925 72926 72927 72928 72929 72930 72931 72932 72933 72934 72935 72936 72937 72938 72939 72940 72941 72942 72943 72944 72945 72946 72947 72948 72949 72950 72951 72952 72953 72954 72955 72956 72957 72958 72959 72960 72961 72962 72963 72964 72965 72966 72967 72968 72969 72970 72971 72972 72973 72974 72975 72976 72977 72978 72979 72980 72981 72982 72983 72984 72985 72986 72987 72988 72989 72990 72991 72992 72993 72994 72995 72996 72997 72998 72999 73000 73001 73002 73003 73004 73005 73006 73007 73008 73009 73010 73011 73012 73013 73014 73015 73016 73017 73018 73019 73020 73021 73022 73023 73024 73025 73026 73027 73028 73029 73030 73031 73032 73033 73034 73035 73036 73037 73038 73039 73040 73041 73042 73043 73044 73045 73046 73047 73048 73049 73050 73051 73052 73053 73054 73055 73056 73057 73058 73059 73060 73061 73062 73063 73064 73065 73066 73067 73068 73069 73070 73071 73072 73073 73074 73075 73076 73077 73078 73079 73080 73081 73082 73083 73084 73085 73086 73087 73088 73089 73090 73091 73092 73093 73094 73095 73096 73097 73098 73099 73100 73101 73102 73103 73104 73105 73106 73107 73108 73109 73110 73111 73112 73113 73114 73115 73116 73117 73118 73119 73120 73121 73122 73123 73124 73125 73126 73127 73128 73129 73130 73131 73132 73133 73134 73135 73136 73137 73138 73139 73140 73141 73142 73143 73144 73145 73146 73147 73148 73149 73150 73151 73152 73153 73154 73155 73156 73157 73158 73159 73160 73161 73162 73163 73164 73165 73166 73167 73168 73169 73170 73171 73172 73173 73174 73175 73176 73177 73178 73179 73180 73181 73182 73183 73184 73185 73186 73187 73188 73189 73190 73191 73192 73193 73194 73195 73196 73197 73198 73199 73200 73201 73202 73203 73204 73205 73206 73207 73208 73209 73210 73211 73212 73213 73214 73215 73216 73217 73218 73219 73220 73221 73222 73223 73224 73225 73226 73227 73228 73229 73230 73231 73232 73233 73234 73235 73236 73237 73238 73239 73240 73241 73242 73243 73244 73245 73246 73247 73248 73249 73250 73251 73252 73253 73254 73255 73256 73257 73258 73259 73260 73261 73262 73263 73264 73265 73266 73267 73268 73269 73270 73271 73272 73273 73274 73275 73276 73277 73278 73279 73280 73281 73282 73283 73284 73285 73286 73287 73288 73289 73290 73291 73292 73293 73294 73295 73296 73297 73298 73299 73300 73301 73302 73303 73304 73305 73306 73307 73308 73309 73310 73311 73312 73313 73314 73315 73316 73317 73318 73319 73320 73321 73322 73323 73324 73325 73326 73327 73328 73329 73330 73331 73332 73333 73334 73335 73336 73337 73338 73339 73340 73341 73342 73343 73344 73345 73346 73347 73348 73349 73350 73351 73352 73353 73354 73355 73356 73357 73358 73359 73360 73361 73362 73363 73364 73365 73366 73367 73368 73369 73370 73371 73372 73373 73374 73375 73376 73377 73378 73379 73380 73381 73382 73383 73384 73385 73386 73387 73388 73389 73390 73391 73392 73393 73394 73395 73396 73397 73398 73399 73400 73401 73402 73403 73404 73405 73406 73407 73408 73409 73410 73411 73412 73413 73414 73415 73416 73417 73418 73419 73420 73421 73422 73423 73424 73425 73426 73427 73428 73429 73430 73431 73432 73433 73434 73435 73436 73437 73438 73439 73440 73441 73442 73443 73444 73445 73446 73447 73448 73449 73450 73451 73452 73453 73454 73455 73456 73457 73458 73459 73460 73461 73462 73463 73464 73465 73466 73467 73468 73469 73470 73471 73472 73473 73474 73475 73476 73477 73478 73479 73480 73481 73482 73483 73484 73485 73486 73487 73488 73489 73490 73491 73492 73493 73494 73495 73496 73497 73498 73499 73500 73501 73502 73503 73504 73505 73506 73507 73508 73509 73510 73511 73512 73513 73514 73515 73516 73517 73518 73519 73520 73521 73522 73523 73524 73525 73526 73527 73528 73529 73530 73531 73532 73533 73534 73535 73536 73537 73538 73539 73540 73541 73542 73543 73544 73545 73546 73547 73548 73549 73550 73551 73552 73553 73554 73555 73556 73557 73558 73559 73560 73561 73562 73563 73564 73565 73566 73567 73568 73569 73570 73571 73572 73573 73574 73575 73576 73577 73578 73579 73580 73581 73582 73583 73584 73585 73586 73587 73588 73589 73590 73591 73592 73593 73594 73595 73596 73597 73598 73599 73600 73601 73602 73603 73604 73605 73606 73607 73608 73609 73610 73611 73612 73613 73614 73615 73616 73617 73618 73619 73620 73621 73622 73623 73624 73625 73626 73627 73628 73629 73630 73631 73632 73633 73634 73635 73636 73637 73638 73639 73640 73641 73642 73643 73644 73645 73646 73647 73648 73649 73650 73651 73652 73653 73654 73655 73656 73657 73658 73659 73660 73661 73662 73663 73664 73665 73666 73667 73668 73669 73670 73671 73672 73673 73674 73675 73676 73677 73678 73679 73680 73681 73682 73683 73684 73685 73686 73687 73688 73689 73690 73691 73692 73693 73694 73695 73696 73697 73698 73699 73700 73701 73702 73703 73704 73705 73706 73707 73708 73709 73710 73711 73712 73713 73714 73715 73716 73717 73718 73719 73720 73721 73722 73723 73724 73725 73726 73727 73728 73729 73730 73731 73732 73733 73734 73735 73736 73737 73738 73739 73740 73741 73742 73743 73744 73745 73746 73747 73748 73749 73750 73751 73752 73753 73754 73755 73756 73757 73758 73759 73760 73761 73762 73763 73764 73765 73766 73767 73768 73769 73770 73771 73772 73773 73774 73775 73776 73777 73778 73779 73780 73781 73782 73783 73784 73785 73786 73787 73788 73789 73790 73791 73792 73793 73794 73795 73796 73797 73798 73799 73800 73801 73802 73803 73804 73805 73806 73807 73808 73809 73810 73811 73812 73813 73814 73815 73816 73817 73818 73819 73820 73821 73822 73823 73824 73825 73826 73827 73828 73829 73830 73831 73832 73833 73834 73835 73836 73837 73838 73839 73840 73841 73842 73843 73844 73845 73846 73847 73848 73849 73850 73851 73852 73853 73854 73855 73856 73857 73858 73859 73860 73861 73862 73863 73864 73865 73866 73867 73868 73869 73870 73871 73872 73873 73874 73875 73876 73877 73878 73879 73880 73881 73882 73883 73884 73885 73886 73887 73888 73889 73890 73891 73892 73893 73894 73895 73896 73897 73898 73899 73900 73901 73902 73903 73904 73905 73906 73907 73908 73909 73910 73911 73912 73913 73914 73915 73916 73917 73918 73919 73920 73921 73922 73923 73924 73925 73926 73927 73928 73929 73930 73931 73932 73933 73934 73935 73936 73937 73938 73939 73940 73941 73942 73943 73944 73945 73946 73947 73948 73949 73950 73951 73952 73953 73954 73955 73956 73957 73958 73959 73960 73961 73962 73963 73964 73965 73966 73967 73968 73969 73970 73971 73972 73973 73974 73975 73976 73977 73978 73979 73980 73981 73982 73983 73984 73985 73986 73987 73988 73989 73990 73991 73992 73993 73994 73995 73996 73997 73998 73999 74000 74001 74002 74003 74004 74005 74006 74007 74008 74009 74010 74011 74012 74013 74014 74015 74016 74017 74018 74019 74020 74021 74022 74023 74024 74025 74026 74027 74028 74029 74030 74031 74032 74033 74034 74035 74036 74037 74038 74039 74040 74041 74042 74043 74044 74045 74046 74047 74048 74049 74050 74051 74052 74053 74054 74055 74056 74057 74058 74059 74060 74061 74062 74063 74064 74065 74066 74067 74068 74069 74070 74071 74072 74073 74074 74075 74076 74077 74078 74079 74080 74081 74082 74083 74084 74085 74086 74087 74088 74089 74090 74091 74092 74093 74094 74095 74096 74097 74098 74099 74100 74101 74102 74103 74104 74105 74106 74107 74108 74109 74110 74111 74112 74113 74114 74115 74116 74117 74118 74119 74120 74121 74122 74123 74124 74125 74126 74127 74128 74129 74130 74131 74132 74133 74134 74135 74136 74137 74138 74139 74140 74141 74142 74143 74144 74145 74146 74147 74148 74149 74150 74151 74152 74153 74154 74155 74156 74157 74158 74159 74160 74161 74162 74163 74164 74165 74166 74167 74168 74169 74170 74171 74172 74173 74174 74175 74176 74177 74178 74179 74180 74181 74182 74183 74184 74185 74186 74187 74188 74189 74190 74191 74192 74193 74194 74195 74196 74197 74198 74199 74200 74201 74202 74203 74204 74205 74206 74207 74208 74209 74210 74211 74212 74213 74214 74215 74216 74217 74218 74219 74220 74221 74222 74223 74224 74225 74226 74227 74228 74229 74230 74231 74232 74233 74234 74235 74236 74237 74238 74239 74240 74241 74242 74243 74244 74245 74246 74247 74248 74249 74250 74251 74252 74253 74254 74255 74256 74257 74258 74259 74260 74261 74262 74263 74264 74265 74266 74267 74268 74269 74270 74271 74272 74273 74274 74275 74276 74277 74278 74279 74280 74281 74282 74283 74284 74285 74286 74287 74288 74289 74290 74291 74292 74293 74294 74295 74296 74297 74298 74299 74300 74301 74302 74303 74304 74305 74306 74307 74308 74309 74310 74311 74312 74313 74314 74315 74316 74317 74318 74319 74320 74321 74322 74323 74324 74325 74326 74327 74328 74329 74330 74331 74332 74333 74334 74335 74336 74337 74338 74339 74340 74341 74342 74343 74344 74345 74346 74347 74348 74349 74350 74351 74352 74353 74354 74355 74356 74357 74358 74359 74360 74361 74362 74363 74364 74365 74366 74367 74368 74369 74370 74371 74372 74373 74374 74375 74376 74377 74378 74379 74380 74381 74382 74383 74384 74385 74386 74387 74388 74389 74390 74391 74392 74393 74394 74395 74396 74397 74398 74399 74400 74401 74402 74403 74404 74405 74406 74407 74408 74409 74410 74411 74412 74413 74414 74415 74416 74417 74418 74419 74420 74421 74422 74423 74424 74425 74426 74427 74428 74429 74430 74431 74432 74433 74434 74435 74436 74437 74438 74439 74440 74441 74442 74443 74444 74445 74446 74447 74448 74449 74450 74451 74452 74453 74454 74455 74456 74457 74458 74459 74460 74461 74462 74463 74464 74465 74466 74467 74468 74469 74470 74471 74472 74473 74474 74475 74476 74477 74478 74479 74480 74481 74482 74483 74484 74485 74486 74487 74488 74489 74490 74491 74492 74493 74494 74495 74496 74497 74498 74499 74500 74501 74502 74503 74504 74505 74506 74507 74508 74509 74510 74511 74512 74513 74514 74515 74516 74517 74518 74519 74520 74521 74522 74523 74524 74525 74526 74527 74528 74529 74530 74531 74532 74533 74534 74535 74536 74537 74538 74539 74540 74541 74542 74543 74544 74545 74546 74547 74548 74549 74550 74551 74552 74553 74554 74555 74556 74557 74558 74559 74560 74561 74562 74563 74564 74565 74566 74567 74568 74569 74570 74571 74572 74573 74574 74575 74576 74577 74578 74579 74580 74581 74582 74583 74584 74585 74586 74587 74588 74589 74590 74591 74592 74593 74594 74595 74596 74597 74598 74599 74600 74601 74602 74603 74604 74605 74606 74607 74608 74609 74610 74611 74612 74613 74614 74615 74616 74617 74618 74619 74620 74621 74622 74623 74624 74625 74626 74627 74628 74629 74630 74631 74632 74633 74634 74635 74636 74637 74638 74639 74640 74641 74642 74643 74644 74645 74646 74647 74648 74649 74650 74651 74652 74653 74654 74655 74656 74657 74658 74659 74660 74661 74662 74663 74664 74665 74666 74667 74668 74669 74670 74671 74672 74673 74674 74675 74676 74677 74678 74679 74680 74681 74682 74683 74684 74685 74686 74687 74688 74689 74690 74691 74692 74693 74694 74695 74696 74697 74698 74699 74700 74701 74702 74703 74704 74705 74706 74707 74708 74709 74710 74711 74712 74713 74714 74715 74716 74717 74718 74719 74720 74721 74722 74723 74724 74725 74726 74727 74728 74729 74730 74731 74732 74733 74734 74735 74736 74737 74738 74739 74740 74741 74742 74743 74744 74745 74746 74747 74748 74749 74750 74751 74752 74753 74754 74755 74756 74757 74758 74759 74760 74761 74762 74763 74764 74765 74766 74767 74768 74769 74770 74771 74772 74773 74774 74775 74776 74777 74778 74779 74780 74781 74782 74783 74784 74785 74786 74787 74788 74789 74790 74791 74792 74793 74794 74795 74796 74797 74798 74799 74800 74801 74802 74803 74804 74805 74806 74807 74808 74809 74810 74811 74812 74813 74814 74815 74816 74817 74818 74819 74820 74821 74822 74823 74824 74825 74826 74827 74828 74829 74830 74831 74832 74833 74834 74835 74836 74837 74838 74839 74840 74841 74842 74843 74844 74845 74846 74847 74848 74849 74850 74851 74852 74853 74854 74855 74856 74857 74858 74859 74860 74861 74862 74863 74864 74865 74866 74867 74868 74869 74870 74871 74872 74873 74874 74875 74876 74877 74878 74879 74880 74881 74882 74883 74884 74885 74886 74887 74888 74889 74890 74891 74892 74893 74894 74895 74896 74897 74898 74899 74900 74901 74902 74903 74904 74905 74906 74907 74908 74909 74910 74911 74912 74913 74914 74915 74916 74917 74918 74919 74920 74921 74922 74923 74924 74925 74926 74927 74928 74929 74930 74931 74932 74933 74934 74935 74936 74937 74938 74939 74940 74941 74942 74943 74944 74945 74946 74947 74948 74949 74950 74951 74952 74953 74954 74955 74956 74957 74958 74959 74960 74961 74962 74963 74964 74965 74966 74967 74968 74969 74970 74971 74972 74973 74974 74975 74976 74977 74978 74979 74980 74981 74982 74983 74984 74985 74986 74987 74988 74989 74990 74991 74992 74993 74994 74995 74996 74997 74998 74999 75000 75001 75002 75003 75004 75005 75006 75007 75008 75009 75010 75011 75012 75013 75014 75015 75016 75017 75018 75019 75020 75021 75022 75023 75024 75025 75026 75027 75028 75029 75030 75031 75032 75033 75034 75035 75036 75037 75038 75039 75040 75041 75042 75043 75044 75045 75046 75047 75048 75049 75050 75051 75052 75053 75054 75055 75056 75057 75058 75059 75060 75061 75062 75063 75064 75065 75066 75067 75068 75069 75070 75071 75072 75073 75074 75075 75076 75077 75078 75079 75080 75081 75082 75083 75084 75085 75086 75087 75088 75089 75090 75091 75092 75093 75094 75095 75096 75097 75098 75099 75100 75101 75102 75103 75104 75105 75106 75107 75108 75109 75110 75111 75112 75113 75114 75115 75116 75117 75118 75119 75120 75121 75122 75123 75124 75125 75126 75127 75128 75129 75130 75131 75132 75133 75134 75135 75136 75137 75138 75139 75140 75141 75142 75143 75144 75145 75146 75147 75148 75149 75150 75151 75152 75153 75154 75155 75156 75157 75158 75159 75160 75161 75162 75163 75164 75165 75166 75167 75168 75169 75170 75171 75172 75173 75174 75175 75176 75177 75178 75179 75180 75181 75182 75183 75184 75185 75186 75187 75188 75189 75190 75191 75192 75193 75194 75195 75196 75197 75198 75199 75200 75201 75202 75203 75204 75205 75206 75207 75208 75209 75210 75211 75212 75213 75214 75215 75216 75217 75218 75219 75220 75221 75222 75223 75224 75225 75226 75227 75228 75229 75230 75231 75232 75233 75234 75235 75236 75237 75238 75239 75240 75241 75242 75243 75244 75245 75246 75247 75248 75249 75250 75251 75252 75253 75254 75255 75256 75257 75258 75259 75260 75261 75262 75263 75264 75265 75266 75267 75268 75269 75270 75271 75272 75273 75274 75275 75276 75277 75278 75279 75280 75281 75282 75283 75284 75285 75286 75287 75288 75289 75290 75291 75292 75293 75294 75295 75296 75297 75298 75299 75300 75301 75302 75303 75304 75305 75306 75307 75308 75309 75310 75311 75312 75313 75314 75315 75316 75317 75318 75319 75320 75321 75322 75323 75324 75325 75326 75327 75328 75329 75330 75331 75332 75333 75334 75335 75336 75337 75338 75339 75340 75341 75342 75343 75344 75345 75346 75347 75348 75349 75350 75351 75352 75353 75354 75355 75356 75357 75358 75359 75360 75361 75362 75363 75364 75365 75366 75367 75368 75369 75370 75371 75372 75373 75374 75375 75376 75377 75378 75379 75380 75381 75382 75383 75384 75385 75386 75387 75388 75389 75390 75391 75392 75393 75394 75395 75396 75397 75398 75399 75400 75401 75402 75403 75404 75405 75406 75407 75408 75409 75410 75411 75412 75413 75414 75415 75416 75417 75418 75419 75420 75421 75422 75423 75424 75425 75426 75427 75428 75429 75430 75431 75432 75433 75434 75435 75436 75437 75438 75439 75440 75441 75442 75443 75444 75445 75446 75447 75448 75449 75450 75451 75452 75453 75454 75455 75456 75457 75458 75459 75460 75461 75462 75463 75464 75465 75466 75467 75468 75469 75470 75471 75472 75473 75474 75475 75476 75477 75478 75479 75480 75481 75482 75483 75484 75485 75486 75487 75488 75489 75490 75491 75492 75493 75494 75495 75496 75497 75498 75499 75500 75501 75502 75503 75504 75505 75506 75507 75508 75509 75510 75511 75512 75513 75514 75515 75516 75517 75518 75519 75520 75521 75522 75523 75524 75525 75526 75527 75528 75529 75530 75531 75532 75533 75534 75535 75536 75537 75538 75539 75540 75541 75542 75543 75544 75545 75546 75547 75548 75549 75550 75551 75552 75553 75554 75555 75556 75557 75558 75559 75560 75561 75562 75563 75564 75565 75566 75567 75568 75569 75570 75571 75572 75573 75574 75575 75576 75577 75578 75579 75580 75581 75582 75583 75584 75585 75586 75587 75588 75589 75590 75591 75592 75593 75594 75595 75596 75597 75598 75599 75600 75601 75602 75603 75604 75605 75606 75607 75608 75609 75610 75611 75612 75613 75614 75615 75616 75617 75618 75619 75620 75621 75622 75623 75624 75625 75626 75627 75628 75629 75630 75631 75632 75633 75634 75635 75636 75637 75638 75639 75640 75641 75642 75643 75644 75645 75646 75647 75648 75649 75650 75651 75652 75653 75654 75655 75656 75657 75658 75659 75660 75661 75662 75663 75664 75665 75666 75667 75668 75669 75670 75671 75672 75673 75674 75675 75676 75677 75678 75679 75680 75681 75682 75683 75684 75685 75686 75687 75688 75689 75690 75691 75692 75693 75694 75695 75696 75697 75698 75699 75700 75701 75702 75703 75704 75705 75706 75707 75708 75709 75710 75711 75712 75713 75714 75715 75716 75717 75718 75719 75720 75721 75722 75723 75724 75725 75726 75727 75728 75729 75730 75731 75732 75733 75734 75735 75736 75737 75738 75739 75740 75741 75742 75743 75744 75745 75746 75747 75748 75749 75750 75751 75752 75753 75754 75755 75756 75757 75758 75759 75760 75761 75762 75763 75764 75765 75766 75767 75768 75769 75770 75771 75772 75773 75774 75775 75776 75777 75778 75779 75780 75781 75782 75783 75784 75785 75786 75787 75788 75789 75790 75791 75792 75793 75794 75795 75796 75797 75798 75799 75800 75801 75802 75803 75804 75805 75806 75807 75808 75809 75810 75811 75812 75813 75814 75815 75816 75817 75818 75819 75820 75821 75822 75823 75824 75825 75826 75827 75828 75829 75830 75831 75832 75833 75834 75835 75836 75837 75838 75839 75840 75841 75842 75843 75844 75845 75846 75847 75848 75849 75850 75851 75852 75853 75854 75855 75856 75857 75858 75859 75860 75861 75862 75863 75864 75865 75866 75867 75868 75869 75870 75871 75872 75873 75874 75875 75876 75877 75878 75879 75880 75881 75882 75883 75884 75885 75886 75887 75888 75889 75890 75891 75892 75893 75894 75895 75896 75897 75898 75899 75900 75901 75902 75903 75904 75905 75906 75907 75908 75909 75910 75911 75912 75913 75914 75915 75916 75917 75918 75919 75920 75921 75922 75923 75924 75925 75926 75927 75928 75929 75930 75931 75932 75933 75934 75935 75936 75937 75938 75939 75940 75941 75942 75943 75944 75945 75946 75947 75948 75949 75950 75951 75952 75953 75954 75955 75956 75957 75958 75959 75960 75961 75962 75963 75964 75965 75966 75967 75968 75969 75970 75971 75972 75973 75974 75975 75976 75977 75978 75979 75980 75981 75982 75983 75984 75985 75986 75987 75988 75989 75990 75991 75992 75993 75994 75995 75996 75997 75998 75999 76000 76001 76002 76003 76004 76005 76006 76007 76008 76009 76010 76011 76012 76013 76014 76015 76016 76017 76018 76019 76020 76021 76022 76023 76024 76025 76026 76027 76028 76029 76030 76031 76032 76033 76034 76035 76036 76037 76038 76039 76040 76041 76042 76043 76044 76045 76046 76047 76048 76049 76050 76051 76052 76053 76054 76055 76056 76057 76058 76059 76060 76061 76062 76063 76064 76065 76066 76067 76068 76069 76070 76071 76072 76073 76074 76075 76076 76077 76078 76079 76080 76081 76082 76083 76084 76085 76086 76087 76088 76089 76090 76091 76092 76093 76094 76095 76096 76097 76098 76099 76100 76101 76102 76103 76104 76105 76106 76107 76108 76109 76110 76111 76112 76113 76114 76115 76116 76117 76118 76119 76120 76121 76122 76123 76124 76125 76126 76127 76128 76129 76130 76131 76132 76133 76134 76135 76136 76137 76138 76139 76140 76141 76142 76143 76144 76145 76146 76147 76148 76149 76150 76151 76152 76153 76154 76155 76156 76157 76158 76159 76160 76161 76162 76163 76164 76165 76166 76167 76168 76169 76170 76171 76172 76173 76174 76175 76176 76177 76178 76179 76180 76181 76182 76183 76184 76185 76186 76187 76188 76189 76190 76191 76192 76193 76194 76195 76196 76197 76198 76199 76200 76201 76202 76203 76204 76205 76206 76207 76208 76209 76210 76211 76212 76213 76214 76215 76216 76217 76218 76219 76220 76221 76222 76223 76224 76225 76226 76227 76228 76229 76230 76231 76232 76233 76234 76235 76236 76237 76238 76239 76240 76241 76242 76243 76244 76245 76246 76247 76248 76249 76250 76251 76252 76253 76254 76255 76256 76257 76258 76259 76260 76261 76262 76263 76264 76265 76266 76267 76268 76269 76270 76271 76272 76273 76274 76275 76276 76277 76278 76279 76280 76281 76282 76283 76284 76285 76286 76287 76288 76289 76290 76291 76292 76293 76294 76295 76296 76297 76298 76299 76300 76301 76302 76303 76304 76305 76306 76307 76308 76309 76310 76311 76312 76313 76314 76315 76316 76317 76318 76319 76320 76321 76322 76323 76324 76325 76326 76327 76328 76329 76330 76331 76332 76333 76334 76335 76336 76337 76338 76339 76340 76341 76342 76343 76344 76345 76346 76347 76348 76349 76350 76351 76352 76353 76354 76355 76356 76357 76358 76359 76360 76361 76362 76363 76364 76365 76366 76367 76368 76369 76370 76371 76372 76373 76374 76375 76376 76377 76378 76379 76380 76381 76382 76383 76384 76385 76386 76387 76388 76389 76390 76391 76392 76393 76394 76395 76396 76397 76398 76399 76400 76401 76402 76403 76404 76405 76406 76407 76408 76409 76410 76411 76412 76413 76414 76415 76416 76417 76418 76419 76420 76421 76422 76423 76424 76425 76426 76427 76428 76429 76430 76431 76432 76433 76434 76435 76436 76437 76438 76439 76440 76441 76442 76443 76444 76445 76446 76447 76448 76449 76450 76451 76452 76453 76454 76455 76456 76457 76458 76459 76460 76461 76462 76463 76464 76465 76466 76467 76468 76469 76470 76471 76472 76473 76474 76475 76476 76477 76478 76479 76480 76481 76482 76483 76484 76485 76486 76487 76488 76489 76490 76491 76492 76493 76494 76495 76496 76497 76498 76499 76500 76501 76502 76503 76504 76505 76506 76507 76508 76509 76510 76511 76512 76513 76514 76515 76516 76517 76518 76519 76520 76521 76522 76523 76524 76525 76526 76527 76528 76529 76530 76531 76532 76533 76534 76535 76536 76537 76538 76539 76540 76541 76542 76543 76544 76545 76546 76547 76548 76549 76550 76551 76552 76553 76554 76555 76556 76557 76558 76559 76560 76561 76562 76563 76564 76565 76566 76567 76568 76569 76570 76571 76572 76573 76574 76575 76576 76577 76578 76579 76580 76581 76582 76583 76584 76585 76586 76587 76588 76589 76590 76591 76592 76593 76594 76595 76596 76597 76598 76599 76600 76601 76602 76603 76604 76605 76606 76607 76608 76609 76610 76611 76612 76613 76614 76615 76616 76617 76618 76619 76620 76621 76622 76623 76624 76625 76626 76627 76628 76629 76630 76631 76632 76633 76634 76635 76636 76637 76638 76639 76640 76641 76642 76643 76644 76645 76646 76647 76648 76649 76650 76651 76652 76653 76654 76655 76656 76657 76658 76659 76660 76661 76662 76663 76664 76665 76666 76667 76668 76669 76670 76671 76672 76673 76674 76675 76676 76677 76678 76679 76680 76681 76682 76683 76684 76685 76686 76687 76688 76689 76690 76691 76692 76693 76694 76695 76696 76697 76698 76699 76700 76701 76702 76703 76704 76705 76706 76707 76708 76709 76710 76711 76712 76713 76714 76715 76716 76717 76718 76719 76720 76721 76722 76723 76724 76725 76726 76727 76728 76729 76730 76731 76732 76733 76734 76735 76736 76737 76738 76739 76740 76741 76742 76743 76744 76745 76746 76747 76748 76749 76750 76751 76752 76753 76754 76755 76756 76757 76758 76759 76760 76761 76762 76763 76764 76765 76766 76767 76768 76769 76770 76771 76772 76773 76774 76775 76776 76777 76778 76779 76780 76781 76782 76783 76784 76785 76786 76787 76788 76789 76790 76791 76792 76793 76794 76795 76796 76797 76798 76799 76800 76801 76802 76803 76804 76805 76806 76807 76808 76809 76810 76811 76812 76813 76814 76815 76816 76817 76818 76819 76820 76821 76822 76823 76824 76825 76826 76827 76828 76829 76830 76831 76832 76833 76834 76835 76836 76837 76838 76839 76840 76841 76842 76843 76844 76845 76846 76847 76848 76849 76850 76851 76852 76853 76854 76855 76856 76857 76858 76859 76860 76861 76862 76863 76864 76865 76866 76867 76868 76869 76870 76871 76872 76873 76874 76875 76876 76877 76878 76879 76880 76881 76882 76883 76884 76885 76886 76887 76888 76889 76890 76891 76892 76893 76894 76895 76896 76897 76898 76899 76900 76901 76902 76903 76904 76905 76906 76907 76908 76909 76910 76911 76912 76913 76914 76915 76916 76917 76918 76919 76920 76921 76922 76923 76924 76925 76926 76927 76928 76929 76930 76931 76932 76933 76934 76935 76936 76937 76938 76939 76940 76941 76942 76943 76944 76945 76946 76947 76948 76949 76950 76951 76952 76953 76954 76955 76956 76957 76958 76959 76960 76961 76962 76963 76964 76965 76966 76967 76968 76969 76970 76971 76972 76973 76974 76975 76976 76977 76978 76979 76980 76981 76982 76983 76984 76985 76986 76987 76988 76989 76990 76991 76992 76993 76994 76995 76996 76997 76998 76999 77000 77001 77002 77003 77004 77005 77006 77007 77008 77009 77010 77011 77012 77013 77014 77015 77016 77017 77018 77019 77020 77021 77022 77023 77024 77025 77026 77027 77028 77029 77030 77031 77032 77033 77034 77035 77036 77037 77038 77039 77040 77041 77042 77043 77044 77045 77046 77047 77048 77049 77050 77051 77052 77053 77054 77055 77056 77057 77058 77059 77060 77061 77062 77063 77064 77065 77066 77067 77068 77069 77070 77071 77072 77073 77074 77075 77076 77077 77078 77079 77080 77081 77082 77083 77084 77085 77086 77087 77088 77089 77090 77091 77092 77093 77094 77095 77096 77097 77098 77099 77100 77101 77102 77103 77104 77105 77106 77107 77108 77109 77110 77111 77112 77113 77114 77115 77116 77117 77118 77119 77120 77121 77122 77123 77124 77125 77126 77127 77128 77129 77130 77131 77132 77133 77134 77135 77136 77137 77138 77139 77140 77141 77142 77143 77144 77145 77146 77147 77148 77149 77150 77151 77152 77153 77154 77155 77156 77157 77158 77159 77160 77161 77162 77163 77164 77165 77166 77167 77168 77169 77170 77171 77172 77173 77174 77175 77176 77177 77178 77179 77180 77181 77182 77183 77184 77185 77186 77187 77188 77189 77190 77191 77192 77193 77194 77195 77196 77197 77198 77199 77200 77201 77202 77203 77204 77205 77206 77207 77208 77209 77210 77211 77212 77213 77214 77215 77216 77217 77218 77219 77220 77221 77222 77223 77224 77225 77226 77227 77228 77229 77230 77231 77232 77233 77234 77235 77236 77237 77238 77239 77240 77241 77242 77243 77244 77245 77246 77247 77248 77249 77250 77251 77252 77253 77254 77255 77256 77257 77258 77259 77260 77261 77262 77263 77264 77265 77266 77267 77268 77269 77270 77271 77272 77273 77274 77275 77276 77277 77278 77279 77280 77281 77282 77283 77284 77285 77286 77287 77288 77289 77290 77291 77292 77293 77294 77295 77296 77297 77298 77299 77300 77301 77302 77303 77304 77305 77306 77307 77308 77309 77310 77311 77312 77313 77314 77315 77316 77317 77318 77319 77320 77321 77322 77323 77324 77325 77326 77327 77328 77329 77330 77331 77332 77333 77334 77335 77336 77337 77338 77339 77340 77341 77342 77343 77344 77345 77346 77347 77348 77349 77350 77351 77352 77353 77354 77355 77356 77357 77358 77359 77360 77361 77362 77363 77364 77365 77366 77367 77368 77369 77370 77371 77372 77373 77374 77375 77376 77377 77378 77379 77380 77381 77382 77383 77384 77385 77386 77387 77388 77389 77390 77391 77392 77393 77394 77395 77396 77397 77398 77399 77400 77401 77402 77403 77404 77405 77406 77407 77408 77409 77410 77411 77412 77413 77414 77415 77416 77417 77418 77419 77420 77421 77422 77423 77424 77425 77426 77427 77428 77429 77430 77431 77432 77433 77434 77435 77436 77437 77438 77439 77440 77441 77442 77443 77444 77445 77446 77447 77448 77449 77450 77451 77452 77453 77454 77455 77456 77457 77458 77459 77460 77461 77462 77463 77464 77465 77466 77467 77468 77469 77470 77471 77472 77473 77474 77475 77476 77477 77478 77479 77480 77481 77482 77483 77484 77485 77486 77487 77488 77489 77490 77491 77492 77493 77494 77495 77496 77497 77498 77499 77500 77501 77502 77503 77504 77505 77506 77507 77508 77509 77510 77511 77512 77513 77514 77515 77516 77517 77518 77519 77520 77521 77522 77523 77524 77525 77526 77527 77528 77529 77530 77531 77532 77533 77534 77535 77536 77537 77538 77539 77540 77541 77542 77543 77544 77545 77546 77547 77548 77549 77550 77551 77552 77553 77554 77555 77556 77557 77558 77559 77560 77561 77562 77563 77564 77565 77566 77567 77568 77569 77570 77571 77572 77573 77574 77575 77576 77577 77578 77579 77580 77581 77582 77583 77584 77585 77586 77587 77588 77589 77590 77591 77592 77593 77594 77595 77596 77597 77598 77599 77600 77601 77602 77603 77604 77605 77606 77607 77608 77609 77610 77611 77612 77613 77614 77615 77616 77617 77618 77619 77620 77621 77622 77623 77624 77625 77626 77627 77628 77629 77630 77631 77632 77633 77634 77635 77636 77637 77638 77639 77640 77641 77642 77643 77644 77645 77646 77647 77648 77649 77650 77651 77652 77653 77654 77655 77656 77657 77658 77659 77660 77661 77662 77663 77664 77665 77666 77667 77668 77669 77670 77671 77672 77673 77674 77675 77676 77677 77678 77679 77680 77681 77682 77683 77684 77685 77686 77687 77688 77689 77690 77691 77692 77693 77694 77695 77696 77697 77698 77699 77700 77701 77702 77703 77704 77705 77706 77707 77708 77709 77710 77711 77712 77713 77714 77715 77716 77717 77718 77719 77720 77721 77722 77723 77724 77725 77726 77727 77728 77729 77730 77731 77732 77733 77734 77735 77736 77737 77738 77739 77740 77741 77742 77743 77744 77745 77746 77747 77748 77749 77750 77751 77752 77753 77754 77755 77756 77757 77758 77759 77760 77761 77762 77763 77764 77765 77766 77767 77768 77769 77770 77771 77772 77773 77774 77775 77776 77777 77778 77779 77780 77781 77782 77783 77784 77785 77786 77787 77788 77789 77790 77791 77792 77793 77794 77795 77796 77797 77798 77799 77800 77801 77802 77803 77804 77805 77806 77807 77808 77809 77810 77811 77812 77813 77814 77815 77816 77817 77818 77819 77820 77821 77822 77823 77824 77825 77826 77827 77828 77829 77830 77831 77832 77833 77834 77835 77836 77837 77838 77839 77840 77841 77842 77843 77844 77845 77846 77847 77848 77849 77850 77851 77852 77853 77854 77855 77856 77857 77858 77859 77860 77861 77862 77863 77864 77865 77866 77867 77868 77869 77870 77871 77872 77873 77874 77875 77876 77877 77878 77879 77880 77881 77882 77883 77884 77885 77886 77887 77888 77889 77890 77891 77892 77893 77894 77895 77896 77897 77898 77899 77900 77901 77902 77903 77904 77905 77906 77907 77908 77909 77910 77911 77912 77913 77914 77915 77916 77917 77918 77919 77920 77921 77922 77923 77924 77925 77926 77927 77928 77929 77930 77931 77932 77933 77934 77935 77936 77937 77938 77939 77940 77941 77942 77943 77944 77945 77946 77947 77948 77949 77950 77951 77952 77953 77954 77955 77956 77957 77958 77959 77960 77961 77962 77963 77964 77965 77966 77967 77968 77969 77970 77971 77972 77973 77974 77975 77976 77977 77978 77979 77980 77981 77982 77983 77984 77985 77986 77987 77988 77989 77990 77991 77992 77993 77994 77995 77996 77997 77998 77999 78000 78001 78002 78003 78004 78005 78006 78007 78008 78009 78010 78011 78012 78013 78014 78015 78016 78017 78018 78019 78020 78021 78022 78023 78024 78025 78026 78027 78028 78029 78030 78031 78032 78033 78034 78035 78036 78037 78038 78039 78040 78041 78042 78043 78044 78045 78046 78047 78048 78049 78050 78051 78052 78053 78054 78055 78056 78057 78058 78059 78060 78061 78062 78063 78064 78065 78066 78067 78068 78069 78070 78071 78072 78073 78074 78075 78076 78077 78078 78079 78080 78081 78082 78083 78084 78085 78086 78087 78088 78089 78090 78091 78092 78093 78094 78095 78096 78097 78098 78099 78100 78101 78102 78103 78104 78105 78106 78107 78108 78109 78110 78111 78112 78113 78114 78115 78116 78117 78118 78119 78120 78121 78122 78123 78124 78125 78126 78127 78128 78129 78130 78131 78132 78133 78134 78135 78136 78137 78138 78139 78140 78141 78142 78143 78144 78145 78146 78147 78148 78149 78150 78151 78152 78153 78154 78155 78156 78157 78158 78159 78160 78161 78162 78163 78164 78165 78166 78167 78168 78169 78170 78171 78172 78173 78174 78175 78176 78177 78178 78179 78180 78181 78182 78183 78184 78185 78186 78187 78188 78189 78190 78191 78192 78193 78194 78195 78196 78197 78198 78199 78200 78201 78202 78203 78204 78205 78206 78207 78208 78209 78210 78211 78212 78213 78214 78215 78216 78217 78218 78219 78220 78221 78222 78223 78224 78225 78226 78227 78228 78229 78230 78231 78232 78233 78234 78235 78236 78237 78238 78239 78240 78241 78242 78243 78244 78245 78246 78247 78248 78249 78250 78251 78252 78253 78254 78255 78256 78257 78258 78259 78260 78261 78262 78263 78264 78265 78266 78267 78268 78269 78270 78271 78272 78273 78274 78275 78276 78277 78278 78279 78280 78281 78282 78283 78284 78285 78286 78287 78288 78289 78290 78291 78292 78293 78294 78295 78296 78297 78298 78299 78300 78301 78302 78303 78304 78305 78306 78307 78308 78309 78310 78311 78312 78313 78314 78315 78316 78317 78318 78319 78320 78321 78322 78323 78324 78325 78326 78327 78328 78329 78330 78331 78332 78333 78334 78335 78336 78337 78338 78339 78340 78341 78342 78343 78344 78345 78346 78347 78348 78349 78350 78351 78352 78353 78354 78355 78356 78357 78358 78359 78360 78361 78362 78363 78364 78365 78366 78367 78368 78369 78370 78371 78372 78373 78374 78375 78376 78377 78378 78379 78380 78381 78382 78383 78384 78385 78386 78387 78388 78389 78390 78391 78392 78393 78394 78395 78396 78397 78398 78399 78400 78401 78402 78403 78404 78405 78406 78407 78408 78409 78410 78411 78412 78413 78414 78415 78416 78417 78418 78419 78420 78421 78422 78423 78424 78425 78426 78427 78428 78429 78430 78431 78432 78433 78434 78435 78436 78437 78438 78439 78440 78441 78442 78443 78444 78445 78446 78447 78448 78449 78450 78451 78452 78453 78454 78455 78456 78457 78458 78459 78460 78461 78462 78463 78464 78465 78466 78467 78468 78469 78470 78471 78472 78473 78474 78475 78476 78477 78478 78479 78480 78481 78482 78483 78484 78485 78486 78487 78488 78489 78490 78491 78492 78493 78494 78495 78496 78497 78498 78499 78500 78501 78502 78503 78504 78505 78506 78507 78508 78509 78510 78511 78512 78513 78514 78515 78516 78517 78518 78519 78520 78521 78522 78523 78524 78525 78526 78527 78528 78529 78530 78531 78532 78533 78534 78535 78536 78537 78538 78539 78540 78541 78542 78543 78544 78545 78546 78547 78548 78549 78550 78551 78552 78553 78554 78555 78556 78557 78558 78559 78560 78561 78562 78563 78564 78565 78566 78567 78568 78569 78570 78571 78572 78573 78574 78575 78576 78577 78578 78579 78580 78581 78582 78583 78584 78585 78586 78587 78588 78589 78590 78591 78592 78593 78594 78595 78596 78597 78598 78599 78600 78601 78602 78603 78604 78605 78606 78607 78608 78609 78610 78611 78612 78613 78614 78615 78616 78617 78618 78619 78620 78621 78622 78623 78624 78625 78626 78627 78628 78629 78630 78631 78632 78633 78634 78635 78636 78637 78638 78639 78640 78641 78642 78643 78644 78645 78646 78647 78648 78649 78650 78651 78652 78653 78654 78655 78656 78657 78658 78659 78660 78661 78662 78663 78664 78665 78666 78667 78668 78669 78670 78671 78672 78673 78674 78675 78676 78677 78678 78679 78680 78681 78682 78683 78684 78685 78686 78687 78688 78689 78690 78691 78692 78693 78694 78695 78696 78697 78698 78699 78700 78701 78702 78703 78704 78705 78706 78707 78708 78709 78710 78711 78712 78713 78714 78715 78716 78717 78718 78719 78720 78721 78722 78723 78724 78725 78726 78727 78728 78729 78730 78731 78732 78733 78734 78735 78736 78737 78738 78739 78740 78741 78742 78743 78744 78745 78746 78747 78748 78749 78750 78751 78752 78753 78754 78755 78756 78757 78758 78759 78760 78761 78762 78763 78764 78765 78766 78767 78768 78769 78770 78771 78772 78773 78774 78775 78776 78777 78778 78779 78780 78781 78782 78783 78784 78785 78786 78787 78788 78789 78790 78791 78792 78793 78794 78795 78796 78797 78798 78799 78800 78801 78802 78803 78804 78805 78806 78807 78808 78809 78810 78811 78812 78813 78814 78815 78816 78817 78818 78819 78820 78821 78822 78823 78824 78825 78826 78827 78828 78829 78830 78831 78832 78833 78834 78835 78836 78837 78838 78839 78840 78841 78842 78843 78844 78845 78846 78847 78848 78849 78850 78851 78852 78853 78854 78855 78856 78857 78858 78859 78860 78861 78862 78863 78864 78865 78866 78867 78868 78869 78870 78871 78872 78873 78874 78875 78876 78877 78878 78879 78880 78881 78882 78883 78884 78885 78886 78887 78888 78889 78890 78891 78892 78893 78894 78895 78896 78897 78898 78899 78900 78901 78902 78903 78904 78905 78906 78907 78908 78909 78910 78911 78912 78913 78914 78915 78916 78917 78918 78919 78920 78921 78922 78923 78924 78925 78926 78927 78928 78929 78930 78931 78932 78933 78934 78935 78936 78937 78938 78939 78940 78941 78942 78943 78944 78945 78946 78947 78948 78949 78950 78951 78952 78953 78954 78955 78956 78957 78958 78959 78960 78961 78962 78963 78964 78965 78966 78967 78968 78969 78970 78971 78972 78973 78974 78975 78976 78977 78978 78979 78980 78981 78982 78983 78984 78985 78986 78987 78988 78989 78990 78991 78992 78993 78994 78995 78996 78997 78998 78999 79000 79001 79002 79003 79004 79005 79006 79007 79008 79009 79010 79011 79012 79013 79014 79015 79016 79017 79018 79019 79020 79021 79022 79023 79024 79025 79026 79027 79028 79029 79030 79031 79032 79033 79034 79035 79036 79037 79038 79039 79040 79041 79042 79043 79044 79045 79046 79047 79048 79049 79050 79051 79052 79053 79054 79055 79056 79057 79058 79059 79060 79061 79062 79063 79064 79065 79066 79067 79068 79069 79070 79071 79072 79073 79074 79075 79076 79077 79078 79079 79080 79081 79082 79083 79084 79085 79086 79087 79088 79089 79090 79091 79092 79093 79094 79095 79096 79097 79098 79099 79100 79101 79102 79103 79104 79105 79106 79107 79108 79109 79110 79111 79112 79113 79114 79115 79116 79117 79118 79119 79120 79121 79122 79123 79124 79125 79126 79127 79128 79129 79130 79131 79132 79133 79134 79135 79136 79137 79138 79139 79140 79141 79142 79143 79144 79145 79146 79147 79148 79149 79150 79151 79152 79153 79154 79155 79156 79157 79158 79159 79160 79161 79162 79163 79164 79165 79166 79167 79168 79169 79170 79171 79172 79173 79174 79175 79176 79177 79178 79179 79180 79181 79182 79183 79184 79185 79186 79187 79188 79189 79190 79191 79192 79193 79194 79195 79196 79197 79198 79199 79200 79201 79202 79203 79204 79205 79206 79207 79208 79209 79210 79211 79212 79213 79214 79215 79216 79217 79218 79219 79220 79221 79222 79223 79224 79225 79226 79227 79228 79229 79230 79231 79232 79233 79234 79235 79236 79237 79238 79239 79240 79241 79242 79243 79244 79245 79246 79247 79248 79249 79250 79251 79252 79253 79254 79255 79256 79257 79258 79259 79260 79261 79262 79263 79264 79265 79266 79267 79268 79269 79270 79271 79272 79273 79274 79275 79276 79277 79278 79279 79280 79281 79282 79283 79284 79285 79286 79287 79288 79289 79290 79291 79292 79293 79294 79295 79296 79297 79298 79299 79300 79301 79302 79303 79304 79305 79306 79307 79308 79309 79310 79311 79312 79313 79314 79315 79316 79317 79318 79319 79320 79321 79322 79323 79324 79325 79326 79327 79328 79329 79330 79331 79332 79333 79334 79335 79336 79337 79338 79339 79340 79341 79342 79343 79344 79345 79346 79347 79348 79349 79350 79351 79352 79353 79354 79355 79356 79357 79358 79359 79360 79361 79362 79363 79364 79365 79366 79367 79368 79369 79370 79371 79372 79373 79374 79375 79376 79377 79378 79379 79380 79381 79382 79383 79384 79385 79386 79387 79388 79389 79390 79391 79392 79393 79394 79395 79396 79397 79398 79399 79400 79401 79402 79403 79404 79405 79406 79407 79408 79409 79410 79411 79412 79413 79414 79415 79416 79417 79418 79419 79420 79421 79422 79423 79424 79425 79426 79427 79428 79429 79430 79431 79432 79433 79434 79435 79436 79437 79438 79439 79440 79441 79442 79443 79444 79445 79446 79447 79448 79449 79450 79451 79452 79453 79454 79455 79456 79457 79458 79459 79460 79461 79462 79463 79464 79465 79466 79467 79468 79469 79470 79471 79472 79473 79474 79475 79476 79477 79478 79479 79480 79481 79482 79483 79484 79485 79486 79487 79488 79489 79490 79491 79492 79493 79494 79495 79496 79497 79498 79499 79500 79501 79502 79503 79504 79505 79506 79507 79508 79509 79510 79511 79512 79513 79514 79515 79516 79517 79518 79519 79520 79521 79522 79523 79524 79525 79526 79527 79528 79529 79530 79531 79532 79533 79534 79535 79536 79537 79538 79539 79540 79541 79542 79543 79544 79545 79546 79547 79548 79549 79550 79551 79552 79553 79554 79555 79556 79557 79558 79559 79560 79561 79562 79563 79564 79565 79566 79567 79568 79569 79570 79571 79572 79573 79574 79575 79576 79577 79578 79579 79580 79581 79582 79583 79584 79585 79586 79587 79588 79589 79590 79591 79592 79593 79594 79595 79596 79597 79598 79599 79600 79601 79602 79603 79604 79605 79606 79607 79608 79609 79610 79611 79612 79613 79614 79615 79616 79617 79618 79619 79620 79621 79622 79623 79624 79625 79626 79627 79628 79629 79630 79631 79632 79633 79634 79635 79636 79637 79638 79639 79640 79641 79642 79643 79644 79645 79646 79647 79648 79649 79650 79651 79652 79653 79654 79655 79656 79657 79658 79659 79660 79661 79662 79663 79664 79665 79666 79667 79668 79669 79670 79671 79672 79673 79674 79675 79676 79677 79678 79679 79680 79681 79682 79683 79684 79685 79686 79687 79688 79689 79690 79691 79692 79693 79694 79695 79696 79697 79698 79699 79700 79701 79702 79703 79704 79705 79706 79707 79708 79709 79710 79711 79712 79713 79714 79715 79716 79717 79718 79719 79720 79721 79722 79723 79724 79725 79726 79727 79728 79729 79730 79731 79732 79733 79734 79735 79736 79737 79738 79739 79740 79741 79742 79743 79744 79745 79746 79747 79748 79749 79750 79751 79752 79753 79754 79755 79756 79757 79758 79759 79760 79761 79762 79763 79764 79765 79766 79767 79768 79769 79770 79771 79772 79773 79774 79775 79776 79777 79778 79779 79780 79781 79782 79783 79784 79785 79786 79787 79788 79789 79790 79791 79792 79793 79794 79795 79796 79797 79798 79799 79800 79801 79802 79803 79804 79805 79806 79807 79808 79809 79810 79811 79812 79813 79814 79815 79816 79817 79818 79819 79820 79821 79822 79823 79824 79825 79826 79827 79828 79829 79830 79831 79832 79833 79834 79835 79836 79837 79838 79839 79840 79841 79842 79843 79844 79845 79846 79847 79848 79849 79850 79851 79852 79853 79854 79855 79856 79857 79858 79859 79860 79861 79862 79863 79864 79865 79866 79867 79868 79869 79870 79871 79872 79873 79874 79875 79876 79877 79878 79879 79880 79881 79882 79883 79884 79885 79886 79887 79888 79889 79890 79891 79892 79893 79894 79895 79896 79897 79898 79899 79900 79901 79902 79903 79904 79905 79906 79907 79908 79909 79910 79911 79912 79913 79914 79915 79916 79917 79918 79919 79920 79921 79922 79923 79924 79925 79926 79927 79928 79929 79930 79931 79932 79933 79934 79935 79936 79937 79938 79939 79940 79941 79942 79943 79944 79945 79946 79947 79948 79949 79950 79951 79952 79953 79954 79955 79956 79957 79958 79959 79960 79961 79962 79963 79964 79965 79966 79967 79968 79969 79970 79971 79972 79973 79974 79975 79976 79977 79978 79979 79980 79981 79982 79983 79984 79985 79986 79987 79988 79989 79990 79991 79992 79993 79994 79995 79996 79997 79998 79999 80000 80001 80002 80003 80004 80005 80006 80007 80008 80009 80010 80011 80012 80013 80014 80015 80016 80017 80018 80019 80020 80021 80022 80023 80024 80025 80026 80027 80028 80029 80030 80031 80032 80033 80034 80035 80036 80037 80038 80039 80040 80041 80042 80043 80044 80045 80046 80047 80048 80049 80050 80051 80052 80053 80054 80055 80056 80057 80058 80059 80060 80061 80062 80063 80064 80065 80066 80067 80068 80069 80070 80071 80072 80073 80074 80075 80076 80077 80078 80079 80080 80081 80082 80083 80084 80085 80086 80087 80088 80089 80090 80091 80092 80093 80094 80095 80096 80097 80098 80099 80100 80101 80102 80103 80104 80105 80106 80107 80108 80109 80110 80111 80112 80113 80114 80115 80116 80117 80118 80119 80120 80121 80122 80123 80124 80125 80126 80127 80128 80129 80130 80131 80132 80133 80134 80135 80136 80137 80138 80139 80140 80141 80142 80143 80144 80145 80146 80147 80148 80149 80150 80151 80152 80153 80154 80155 80156 80157 80158 80159 80160 80161 80162 80163 80164 80165 80166 80167 80168 80169 80170 80171 80172 80173 80174 80175 80176 80177 80178 80179 80180 80181 80182 80183 80184 80185 80186 80187 80188 80189 80190 80191 80192 80193 80194 80195 80196 80197 80198 80199 80200 80201 80202 80203 80204 80205 80206 80207 80208 80209 80210 80211 80212 80213 80214 80215 80216 80217 80218 80219 80220 80221 80222 80223 80224 80225 80226 80227 80228 80229 80230 80231 80232 80233 80234 80235 80236 80237 80238 80239 80240 80241 80242 80243 80244 80245 80246 80247 80248 80249 80250 80251 80252 80253 80254 80255 80256 80257 80258 80259 80260 80261 80262 80263 80264 80265 80266 80267 80268 80269 80270 80271 80272 80273 80274 80275 80276 80277 80278 80279 80280 80281 80282 80283 80284 80285 80286 80287 80288 80289 80290 80291 80292 80293 80294 80295 80296 80297 80298 80299 80300 80301 80302 80303 80304 80305 80306 80307 80308 80309 80310 80311 80312 80313 80314 80315 80316 80317 80318 80319 80320 80321 80322 80323 80324 80325 80326 80327 80328 80329 80330 80331 80332 80333 80334 80335 80336 80337 80338 80339 80340 80341 80342 80343 80344 80345 80346 80347 80348 80349 80350 80351 80352 80353 80354 80355 80356 80357 80358 80359 80360 80361 80362 80363 80364 80365 80366 80367 80368 80369 80370 80371 80372 80373 80374 80375 80376 80377 80378 80379 80380 80381 80382 80383 80384 80385 80386 80387 80388 80389 80390 80391 80392 80393 80394 80395 80396 80397 80398 80399 80400 80401 80402 80403 80404 80405 80406 80407 80408 80409 80410 80411 80412 80413 80414 80415 80416 80417 80418 80419 80420 80421 80422 80423 80424 80425 80426 80427 80428 80429 80430 80431 80432 80433 80434 80435 80436 80437 80438 80439 80440 80441 80442 80443 80444 80445 80446 80447 80448 80449 80450 80451 80452 80453 80454 80455 80456 80457 80458 80459 80460 80461 80462 80463 80464 80465 80466 80467 80468 80469 80470 80471 80472 80473 80474 80475 80476 80477 80478 80479 80480 80481 80482 80483 80484 80485 80486 80487 80488 80489 80490 80491 80492 80493 80494 80495 80496 80497 80498 80499 80500 80501 80502 80503 80504 80505 80506 80507 80508 80509 80510 80511 80512 80513 80514 80515 80516 80517 80518 80519 80520 80521 80522 80523 80524 80525 80526 80527 80528 80529 80530 80531 80532 80533 80534 80535 80536 80537 80538 80539 80540 80541 80542 80543 80544 80545 80546 80547 80548 80549 80550 80551 80552 80553 80554 80555 80556 80557 80558 80559 80560 80561 80562 80563 80564 80565 80566 80567 80568 80569 80570 80571 80572 80573 80574 80575 80576 80577 80578 80579 80580 80581 80582 80583 80584 80585 80586 80587 80588 80589 80590 80591 80592 80593 80594 80595 80596 80597 80598 80599 80600 80601 80602 80603 80604 80605 80606 80607 80608 80609 80610 80611 80612 80613 80614 80615 80616 80617 80618 80619 80620 80621 80622 80623 80624 80625 80626 80627 80628 80629 80630 80631 80632 80633 80634 80635 80636 80637 80638 80639 80640 80641 80642 80643 80644 80645 80646 80647 80648 80649 80650 80651 80652 80653 80654 80655 80656 80657 80658 80659 80660 80661 80662 80663 80664 80665 80666 80667 80668 80669 80670 80671 80672 80673 80674 80675 80676 80677 80678 80679 80680 80681 80682 80683 80684 80685 80686 80687 80688 80689 80690 80691 80692 80693 80694 80695 80696 80697 80698 80699 80700 80701 80702 80703 80704 80705 80706 80707 80708 80709 80710 80711 80712 80713 80714 80715 80716 80717 80718 80719 80720 80721 80722 80723 80724 80725 80726 80727 80728 80729 80730 80731 80732 80733 80734 80735 80736 80737 80738 80739 80740 80741 80742 80743 80744 80745 80746 80747 80748 80749 80750 80751 80752 80753 80754 80755 80756 80757 80758 80759 80760 80761 80762 80763 80764 80765 80766 80767 80768 80769 80770 80771 80772 80773 80774 80775 80776 80777 80778 80779 80780 80781 80782 80783 80784 80785 80786 80787 80788 80789 80790 80791 80792 80793 80794 80795 80796 80797 80798 80799 80800 80801 80802 80803 80804 80805 80806 80807 80808 80809 80810 80811 80812 80813 80814 80815 80816 80817 80818 80819 80820 80821 80822 80823 80824 80825 80826 80827 80828 80829 80830 80831 80832 80833 80834 80835 80836 80837 80838 80839 80840 80841 80842 80843 80844 80845 80846 80847 80848 80849 80850 80851 80852 80853 80854 80855 80856 80857 80858 80859 80860 80861 80862 80863 80864 80865 80866 80867 80868 80869 80870 80871 80872 80873 80874 80875 80876 80877 80878 80879 80880 80881 80882 80883 80884 80885 80886 80887 80888 80889 80890 80891 80892 80893 80894 80895 80896 80897 80898 80899 80900 80901 80902 80903 80904 80905 80906 80907 80908 80909 80910 80911 80912 80913 80914 80915 80916 80917 80918 80919 80920 80921 80922 80923 80924 80925 80926 80927 80928 80929 80930 80931 80932 80933 80934 80935 80936 80937 80938 80939 80940 80941 80942 80943 80944 80945 80946 80947 80948 80949 80950 80951 80952 80953 80954 80955 80956 80957 80958 80959 80960 80961 80962 80963 80964 80965 80966 80967 80968 80969 80970 80971 80972 80973 80974 80975 80976 80977 80978 80979 80980 80981 80982 80983 80984 80985 80986 80987 80988 80989 80990 80991 80992 80993 80994 80995 80996 80997 80998 80999 81000 81001 81002 81003 81004 81005 81006 81007 81008 81009 81010 81011 81012 81013 81014 81015 81016 81017 81018 81019 81020 81021 81022 81023 81024 81025 81026 81027 81028 81029 81030 81031 81032 81033 81034 81035 81036 81037 81038 81039 81040 81041 81042 81043 81044 81045 81046 81047 81048 81049 81050 81051 81052 81053 81054 81055 81056 81057 81058 81059 81060 81061 81062 81063 81064 81065 81066 81067 81068 81069 81070 81071 81072 81073 81074 81075 81076 81077 81078 81079 81080 81081 81082 81083 81084 81085 81086 81087 81088 81089 81090 81091 81092 81093 81094 81095 81096 81097 81098 81099 81100 81101 81102 81103 81104 81105 81106 81107 81108 81109 81110 81111 81112 81113 81114 81115 81116 81117 81118 81119 81120 81121 81122 81123 81124 81125 81126 81127 81128 81129 81130 81131 81132 81133 81134 81135 81136 81137 81138 81139 81140 81141 81142 81143 81144 81145 81146 81147 81148 81149 81150 81151 81152 81153 81154 81155 81156 81157 81158 81159 81160 81161 81162 81163 81164 81165 81166 81167 81168 81169 81170 81171 81172 81173 81174 81175 81176 81177 81178 81179 81180 81181 81182 81183 81184 81185 81186 81187 81188 81189 81190 81191 81192 81193 81194 81195 81196 81197 81198 81199 81200 81201 81202 81203 81204 81205 81206 81207 81208 81209 81210 81211 81212 81213 81214 81215 81216 81217 81218 81219 81220 81221 81222 81223 81224 81225 81226 81227 81228 81229 81230 81231 81232 81233 81234 81235 81236 81237 81238 81239 81240 81241 81242 81243 81244 81245 81246 81247 81248 81249 81250 81251 81252 81253 81254 81255 81256 81257 81258 81259 81260 81261 81262 81263 81264 81265 81266 81267 81268 81269 81270 81271 81272 81273 81274 81275 81276 81277 81278 81279 81280 81281 81282 81283 81284 81285 81286 81287 81288 81289 81290 81291 81292 81293 81294 81295 81296 81297 81298 81299 81300 81301 81302 81303 81304 81305 81306 81307 81308 81309 81310 81311 81312 81313 81314 81315 81316 81317 81318 81319 81320 81321 81322 81323 81324 81325 81326 81327 81328 81329 81330 81331 81332 81333 81334 81335 81336 81337 81338 81339 81340 81341 81342 81343 81344 81345 81346 81347 81348 81349 81350 81351 81352 81353 81354 81355 81356 81357 81358 81359 81360 81361 81362 81363 81364 81365 81366 81367 81368 81369 81370 81371 81372 81373 81374 81375 81376 81377 81378 81379 81380 81381 81382 81383 81384 81385 81386 81387 81388 81389 81390 81391 81392 81393 81394 81395 81396 81397 81398 81399 81400 81401 81402 81403 81404 81405 81406 81407 81408 81409 81410 81411 81412 81413 81414 81415 81416 81417 81418 81419 81420 81421 81422 81423 81424 81425 81426 81427 81428 81429 81430 81431 81432 81433 81434 81435 81436 81437 81438 81439 81440 81441 81442 81443 81444 81445 81446 81447 81448 81449 81450 81451 81452 81453 81454 81455 81456 81457 81458 81459 81460 81461 81462 81463 81464 81465 81466 81467 81468 81469 81470 81471 81472 81473 81474 81475 81476 81477 81478 81479 81480 81481 81482 81483 81484 81485 81486 81487 81488 81489 81490 81491 81492 81493 81494 81495 81496 81497 81498 81499 81500 81501 81502 81503 81504 81505 81506 81507 81508 81509 81510 81511 81512 81513 81514 81515 81516 81517 81518 81519 81520 81521 81522 81523 81524 81525 81526 81527 81528 81529 81530 81531 81532 81533 81534 81535 81536 81537 81538 81539 81540 81541 81542 81543 81544 81545 81546 81547 81548 81549 81550 81551 81552 81553 81554 81555 81556 81557 81558 81559 81560 81561 81562 81563 81564 81565 81566 81567 81568 81569 81570 81571 81572 81573 81574 81575 81576 81577 81578 81579 81580 81581 81582 81583 81584 81585 81586 81587 81588 81589 81590 81591 81592 81593 81594 81595 81596 81597 81598 81599 81600 81601 81602 81603 81604 81605 81606 81607 81608 81609 81610 81611 81612 81613 81614 81615 81616 81617 81618 81619 81620 81621 81622 81623 81624 81625 81626 81627 81628 81629 81630 81631 81632 81633 81634 81635 81636 81637 81638 81639 81640 81641 81642 81643 81644 81645 81646 81647 81648 81649 81650 81651 81652 81653 81654 81655 81656 81657 81658 81659 81660 81661 81662 81663 81664 81665 81666 81667 81668 81669 81670 81671 81672 81673 81674 81675 81676 81677 81678 81679 81680 81681 81682 81683 81684 81685 81686 81687 81688 81689 81690 81691 81692 81693 81694 81695 81696 81697 81698 81699 81700 81701 81702 81703 81704 81705 81706 81707 81708 81709 81710 81711 81712 81713 81714 81715 81716 81717 81718 81719 81720 81721 81722 81723 81724 81725 81726 81727 81728 81729 81730 81731 81732 81733 81734 81735 81736 81737 81738 81739 81740 81741 81742 81743 81744 81745 81746 81747 81748 81749 81750 81751 81752 81753 81754 81755 81756 81757 81758 81759 81760 81761 81762 81763 81764 81765 81766 81767 81768 81769 81770 81771 81772 81773 81774 81775 81776 81777 81778 81779 81780 81781 81782 81783 81784 81785 81786 81787 81788 81789 81790 81791 81792 81793 81794 81795 81796 81797 81798 81799 81800 81801 81802 81803 81804 81805 81806 81807 81808 81809 81810 81811 81812 81813 81814 81815 81816 81817 81818 81819 81820 81821 81822 81823 81824 81825 81826 81827 81828 81829 81830 81831 81832 81833 81834 81835 81836 81837 81838 81839 81840 81841 81842 81843 81844 81845 81846 81847 81848 81849 81850 81851 81852 81853 81854 81855 81856 81857 81858 81859 81860 81861 81862 81863 81864 81865 81866 81867 81868 81869 81870 81871 81872 81873 81874 81875 81876 81877 81878 81879 81880 81881 81882 81883 81884 81885 81886 81887 81888 81889 81890 81891 81892 81893 81894 81895 81896 81897 81898 81899 81900 81901 81902 81903 81904 81905 81906 81907 81908 81909 81910 81911 81912 81913 81914 81915 81916 81917 81918 81919 81920 81921 81922 81923 81924 81925 81926 81927 81928 81929 81930 81931 81932 81933 81934 81935 81936 81937 81938 81939 81940 81941 81942 81943 81944 81945 81946 81947 81948 81949 81950 81951 81952 81953 81954 81955 81956 81957 81958 81959 81960 81961 81962 81963 81964 81965 81966 81967 81968 81969 81970 81971 81972 81973 81974 81975 81976 81977 81978 81979 81980 81981 81982 81983 81984 81985 81986 81987 81988 81989 81990 81991 81992 81993 81994 81995 81996 81997 81998 81999 82000 82001 82002 82003 82004 82005 82006 82007 82008 82009 82010 82011 82012 82013 82014 82015 82016 82017 82018 82019 82020 82021 82022 82023 82024 82025 82026 82027 82028 82029 82030 82031 82032 82033 82034 82035 82036 82037 82038 82039 82040 82041 82042 82043 82044 82045 82046 82047 82048 82049 82050 82051 82052 82053 82054 82055 82056 82057 82058 82059 82060 82061 82062 82063 82064 82065 82066 82067 82068 82069 82070 82071 82072 82073 82074 82075 82076 82077 82078 82079 82080 82081 82082 82083 82084 82085 82086 82087 82088 82089 82090 82091 82092 82093 82094 82095 82096 82097 82098 82099 82100 82101 82102 82103 82104 82105 82106 82107 82108 82109 82110 82111 82112 82113 82114 82115 82116 82117 82118 82119 82120 82121 82122 82123 82124 82125 82126 82127 82128 82129 82130 82131 82132 82133 82134 82135 82136 82137 82138 82139 82140 82141 82142 82143 82144 82145 82146 82147 82148 82149 82150 82151 82152 82153 82154 82155 82156 82157 82158 82159 82160 82161 82162 82163 82164 82165 82166 82167 82168 82169 82170 82171 82172 82173 82174 82175 82176 82177 82178 82179 82180 82181 82182 82183 82184 82185 82186 82187 82188 82189 82190 82191 82192 82193 82194 82195 82196 82197 82198 82199 82200 82201 82202 82203 82204 82205 82206 82207 82208 82209 82210 82211 82212 82213 82214 82215 82216 82217 82218 82219 82220 82221 82222 82223 82224 82225 82226 82227 82228 82229 82230 82231 82232 82233 82234 82235 82236 82237 82238 82239 82240 82241 82242 82243 82244 82245 82246 82247 82248 82249 82250 82251 82252 82253 82254 82255 82256 82257 82258 82259 82260 82261 82262 82263 82264 82265 82266 82267 82268 82269 82270 82271 82272 82273 82274 82275 82276 82277 82278 82279 82280 82281 82282 82283 82284 82285 82286 82287 82288 82289 82290 82291 82292 82293 82294 82295 82296 82297 82298 82299 82300 82301 82302 82303 82304 82305 82306 82307 82308 82309 82310 82311 82312 82313 82314 82315 82316 82317 82318 82319 82320 82321 82322 82323 82324 82325 82326 82327 82328 82329 82330 82331 82332 82333 82334 82335 82336 82337 82338 82339 82340 82341 82342 82343 82344 82345 82346 82347 82348 82349 82350 82351 82352 82353 82354 82355 82356 82357 82358 82359 82360 82361 82362 82363 82364 82365 82366 82367 82368 82369 82370 82371 82372 82373 82374 82375 82376 82377 82378 82379 82380 82381 82382 82383 82384 82385 82386 82387 82388 82389 82390 82391 82392 82393 82394 82395 82396 82397 82398 82399 82400 82401 82402 82403 82404 82405 82406 82407 82408 82409 82410 82411 82412 82413 82414 82415 82416 82417 82418 82419 82420 82421 82422 82423 82424 82425 82426 82427 82428 82429 82430 82431 82432 82433 82434 82435 82436 82437 82438 82439 82440 82441 82442 82443 82444 82445 82446 82447 82448 82449 82450 82451 82452 82453 82454 82455 82456 82457 82458 82459 82460 82461 82462 82463 82464 82465 82466 82467 82468 82469 82470 82471 82472 82473 82474 82475 82476 82477 82478 82479 82480 82481 82482 82483 82484 82485 82486 82487 82488 82489 82490 82491 82492 82493 82494 82495 82496 82497 82498 82499 82500 82501 82502 82503 82504 82505 82506 82507 82508 82509 82510 82511 82512 82513 82514 82515 82516 82517 82518 82519 82520 82521 82522 82523 82524 82525 82526 82527 82528 82529 82530 82531 82532 82533 82534 82535 82536 82537 82538 82539 82540 82541 82542 82543 82544 82545 82546 82547 82548 82549 82550 82551 82552 82553 82554 82555 82556 82557 82558 82559 82560 82561 82562 82563 82564 82565 82566 82567 82568 82569 82570 82571 82572 82573 82574 82575 82576 82577 82578 82579 82580 82581 82582 82583 82584 82585 82586 82587 82588 82589 82590 82591 82592 82593 82594 82595 82596 82597 82598 82599 82600 82601 82602 82603 82604 82605 82606 82607 82608 82609 82610 82611 82612 82613 82614 82615 82616 82617 82618 82619 82620 82621 82622 82623 82624 82625 82626 82627 82628 82629 82630 82631 82632 82633 82634 82635 82636 82637 82638 82639 82640 82641 82642 82643 82644 82645 82646 82647 82648 82649 82650 82651 82652 82653 82654 82655 82656 82657 82658 82659 82660 82661 82662 82663 82664 82665 82666 82667 82668 82669 82670 82671 82672 82673 82674 82675 82676 82677 82678 82679 82680 82681 82682 82683 82684 82685 82686 82687 82688 82689 82690 82691 82692 82693 82694 82695 82696 82697 82698 82699 82700 82701 82702 82703 82704 82705 82706 82707 82708 82709 82710 82711 82712 82713 82714 82715 82716 82717 82718 82719 82720 82721 82722 82723 82724 82725 82726 82727 82728 82729 82730 82731 82732 82733 82734 82735 82736 82737 82738 82739 82740 82741 82742 82743 82744 82745 82746 82747 82748 82749 82750 82751 82752 82753 82754 82755 82756 82757 82758 82759 82760 82761 82762 82763 82764 82765 82766 82767 82768 82769 82770 82771 82772 82773 82774 82775 82776 82777 82778 82779 82780 82781 82782 82783 82784 82785 82786 82787 82788 82789 82790 82791 82792 82793 82794 82795 82796 82797 82798 82799 82800 82801 82802 82803 82804 82805 82806 82807 82808 82809 82810 82811 82812 82813 82814 82815 82816 82817 82818 82819 82820 82821 82822 82823 82824 82825 82826 82827 82828 82829 82830 82831 82832 82833 82834 82835 82836 82837 82838 82839 82840 82841 82842 82843 82844 82845 82846 82847 82848 82849 82850 82851 82852 82853 82854 82855 82856 82857 82858 82859 82860 82861 82862 82863 82864 82865 82866 82867 82868 82869 82870 82871 82872 82873 82874 82875 82876 82877 82878 82879 82880 82881 82882 82883 82884 82885 82886 82887 82888 82889 82890 82891 82892 82893 82894 82895 82896 82897 82898 82899 82900 82901 82902 82903 82904 82905 82906 82907 82908 82909 82910 82911 82912 82913 82914 82915 82916 82917 82918 82919 82920 82921 82922 82923 82924 82925 82926 82927 82928 82929 82930 82931 82932 82933 82934 82935 82936 82937 82938 82939 82940 82941 82942 82943 82944 82945 82946 82947 82948 82949 82950 82951 82952 82953 82954 82955 82956 82957 82958 82959 82960 82961 82962 82963 82964 82965 82966 82967 82968 82969 82970 82971 82972 82973 82974 82975 82976 82977 82978 82979 82980 82981 82982 82983 82984 82985 82986 82987 82988 82989 82990 82991 82992 82993 82994 82995 82996 82997 82998 82999 83000 83001 83002 83003 83004 83005 83006 83007 83008 83009 83010 83011 83012 83013 83014 83015 83016 83017 83018 83019 83020 83021 83022 83023 83024 83025 83026 83027 83028 83029 83030 83031 83032 83033 83034 83035 83036 83037 83038 83039 83040 83041 83042 83043 83044 83045 83046 83047 83048 83049 83050 83051 83052 83053 83054 83055 83056 83057 83058 83059 83060 83061 83062 83063 83064 83065 83066 83067 83068 83069 83070 83071 83072 83073 83074 83075 83076 83077 83078 83079 83080 83081 83082 83083 83084 83085 83086 83087 83088 83089 83090 83091 83092 83093 83094 83095 83096 83097 83098 83099 83100 83101 83102 83103 83104 83105 83106 83107 83108 83109 83110 83111 83112 83113 83114 83115 83116 83117 83118 83119 83120 83121 83122 83123 83124 83125 83126 83127 83128 83129 83130 83131 83132 83133 83134 83135 83136 83137 83138 83139 83140 83141 83142 83143 83144 83145 83146 83147 83148 83149 83150 83151 83152 83153 83154 83155 83156 83157 83158 83159 83160 83161 83162 83163 83164 83165 83166 83167 83168 83169 83170 83171 83172 83173 83174 83175 83176 83177 83178 83179 83180 83181 83182 83183 83184 83185 83186 83187 83188 83189 83190 83191 83192 83193 83194 83195 83196 83197 83198 83199 83200 83201 83202 83203 83204 83205 83206 83207 83208 83209 83210 83211 83212 83213 83214 83215 83216 83217 83218 83219 83220 83221 83222 83223 83224 83225 83226 83227 83228 83229 83230 83231 83232 83233 83234 83235 83236 83237 83238 83239 83240 83241 83242 83243 83244 83245 83246 83247 83248 83249 83250 83251 83252 83253 83254 83255 83256 83257 83258 83259 83260 83261 83262 83263 83264 83265 83266 83267 83268 83269 83270 83271 83272 83273 83274 83275 83276 83277 83278 83279 83280 83281 83282 83283 83284 83285 83286 83287 83288 83289 83290 83291 83292 83293 83294 83295 83296 83297 83298 83299 83300 83301 83302 83303 83304 83305 83306 83307 83308 83309 83310 83311 83312 83313 83314 83315 83316 83317 83318 83319 83320 83321 83322 83323 83324 83325 83326 83327 83328 83329 83330 83331 83332 83333 83334 83335 83336 83337 83338 83339 83340 83341 83342 83343 83344 83345 83346 83347 83348 83349 83350 83351 83352 83353 83354 83355 83356 83357 83358 83359 83360 83361 83362 83363 83364 83365 83366 83367 83368 83369 83370 83371 83372 83373 83374 83375 83376 83377 83378 83379 83380 83381 83382 83383 83384 83385 83386 83387 83388 83389 83390 83391 83392 83393 83394 83395 83396 83397 83398 83399 83400 83401 83402 83403 83404 83405 83406 83407 83408 83409 83410 83411 83412 83413 83414 83415 83416 83417 83418 83419 83420 83421 83422 83423 83424 83425 83426 83427 83428 83429 83430 83431 83432 83433 83434 83435 83436 83437 83438 83439 83440 83441 83442 83443 83444 83445 83446 83447 83448 83449 83450 83451 83452 83453 83454 83455 83456 83457 83458 83459 83460 83461 83462 83463 83464 83465 83466 83467 83468 83469 83470 83471 83472 83473 83474 83475 83476 83477 83478 83479 83480 83481 83482 83483 83484 83485 83486 83487 83488 83489 83490 83491 83492 83493 83494 83495 83496 83497 83498 83499 83500 83501 83502 83503 83504 83505 83506 83507 83508 83509 83510 83511 83512 83513 83514 83515 83516 83517 83518 83519 83520 83521 83522 83523 83524 83525 83526 83527 83528 83529 83530 83531 83532 83533 83534 83535 83536 83537 83538 83539 83540 83541 83542 83543 83544 83545 83546 83547 83548 83549 83550 83551 83552 83553 83554 83555 83556 83557 83558 83559 83560 83561 83562 83563 83564 83565 83566 83567 83568 83569 83570 83571 83572 83573 83574 83575 83576 83577 83578 83579 83580 83581 83582 83583 83584 83585 83586 83587 83588 83589 83590 83591 83592 83593 83594 83595 83596 83597 83598 83599 83600 83601 83602 83603 83604 83605 83606 83607 83608 83609 83610 83611 83612 83613 83614 83615 83616 83617 83618 83619 83620 83621 83622 83623 83624 83625 83626 83627 83628 83629 83630 83631 83632 83633 83634 83635 83636 83637 83638 83639 83640 83641 83642 83643 83644 83645 83646 83647 83648 83649 83650 83651 83652 83653 83654 83655 83656 83657 83658 83659 83660 83661 83662 83663 83664 83665 83666 83667 83668 83669 83670 83671 83672 83673 83674 83675 83676 83677 83678 83679 83680 83681 83682 83683 83684 83685 83686 83687 83688 83689 83690 83691 83692 83693 83694 83695 83696 83697 83698 83699 83700 83701 83702 83703 83704 83705 83706 83707 83708 83709 83710 83711 83712 83713 83714 83715 83716 83717 83718 83719 83720 83721 83722 83723 83724 83725 83726 83727 83728 83729 83730 83731 83732 83733 83734 83735 83736 83737 83738 83739 83740 83741 83742 83743 83744 83745 83746 83747 83748 83749 83750 83751 83752 83753 83754 83755 83756 83757 83758 83759 83760 83761 83762 83763 83764 83765 83766 83767 83768 83769 83770 83771 83772 83773 83774 83775 83776 83777 83778 83779 83780 83781 83782 83783 83784 83785 83786 83787 83788 83789 83790 83791 83792 83793 83794 83795 83796 83797 83798 83799 83800 83801 83802 83803 83804 83805 83806 83807 83808 83809 83810 83811 83812 83813 83814 83815 83816 83817 83818 83819 83820 83821 83822 83823 83824 83825 83826 83827 83828 83829 83830 83831 83832 83833 83834 83835 83836 83837 83838 83839 83840 83841 83842 83843 83844 83845 83846 83847 83848 83849 83850 83851 83852 83853 83854 83855 83856 83857 83858 83859 83860 83861 83862 83863 83864 83865 83866 83867 83868 83869 83870 83871 83872 83873 83874 83875 83876 83877 83878 83879 83880 83881 83882 83883 83884 83885 83886 83887 83888 83889 83890 83891 83892 83893 83894 83895 83896 83897 83898 83899 83900 83901 83902 83903 83904 83905 83906 83907 83908 83909 83910 83911 83912 83913 83914 83915 83916 83917 83918 83919 83920 83921 83922 83923 83924 83925 83926 83927 83928 83929 83930 83931 83932 83933 83934 83935 83936 83937 83938 83939 83940 83941 83942 83943 83944 83945 83946 83947 83948 83949 83950 83951 83952 83953 83954 83955 83956 83957 83958 83959 83960 83961 83962 83963 83964 83965 83966 83967 83968 83969 83970 83971 83972 83973 83974 83975 83976 83977 83978 83979 83980 83981 83982 83983 83984 83985 83986 83987 83988 83989 83990 83991 83992 83993 83994 83995 83996 83997 83998 83999 84000 84001 84002 84003 84004 84005 84006 84007 84008 84009 84010 84011 84012 84013 84014 84015 84016 84017 84018 84019 84020 84021 84022 84023 84024 84025 84026 84027 84028 84029 84030 84031 84032 84033 84034 84035 84036 84037 84038 84039 84040 84041 84042 84043 84044 84045 84046 84047 84048 84049 84050 84051 84052 84053 84054 84055 84056 84057 84058 84059 84060 84061 84062 84063 84064 84065 84066 84067 84068 84069 84070 84071 84072 84073 84074 84075 84076 84077 84078 84079 84080 84081 84082 84083 84084 84085 84086 84087 84088 84089 84090 84091 84092 84093 84094 84095 84096 84097 84098 84099 84100 84101 84102 84103 84104 84105 84106 84107 84108 84109 84110 84111 84112 84113 84114 84115 84116 84117 84118 84119 84120 84121 84122 84123 84124 84125 84126 84127 84128 84129 84130 84131 84132 84133 84134 84135 84136 84137 84138 84139 84140 84141 84142 84143 84144 84145 84146 84147 84148 84149 84150 84151 84152 84153 84154 84155 84156 84157 84158 84159 84160 84161 84162 84163 84164 84165 84166 84167 84168 84169 84170 84171 84172 84173 84174 84175 84176 84177 84178 84179 84180 84181 84182 84183 84184 84185 84186 84187 84188 84189 84190 84191 84192 84193 84194 84195 84196 84197 84198 84199 84200 84201 84202 84203 84204 84205 84206 84207 84208 84209 84210 84211 84212 84213 84214 84215 84216 84217 84218 84219 84220 84221 84222 84223 84224 84225 84226 84227 84228 84229 84230 84231 84232 84233 84234 84235 84236 84237 84238 84239 84240 84241 84242 84243 84244 84245 84246 84247 84248 84249 84250 84251 84252 84253 84254 84255 84256 84257 84258 84259 84260 84261 84262 84263 84264 84265 84266 84267 84268 84269 84270 84271 84272 84273 84274 84275 84276 84277 84278 84279 84280 84281 84282 84283 84284 84285 84286 84287 84288 84289 84290 84291 84292 84293 84294 84295 84296 84297 84298 84299 84300 84301 84302 84303 84304 84305 84306 84307 84308 84309 84310 84311 84312 84313 84314 84315 84316 84317 84318 84319 84320 84321 84322 84323 84324 84325 84326 84327 84328 84329 84330 84331 84332 84333 84334 84335 84336 84337 84338 84339 84340 84341 84342 84343 84344 84345 84346 84347 84348 84349 84350 84351 84352 84353 84354 84355 84356 84357 84358 84359 84360 84361 84362 84363 84364 84365 84366 84367 84368 84369 84370 84371 84372 84373 84374 84375 84376 84377 84378 84379 84380 84381 84382 84383 84384 84385 84386 84387 84388 84389 84390 84391 84392 84393 84394 84395 84396 84397 84398 84399 84400 84401 84402 84403 84404 84405 84406 84407 84408 84409 84410 84411 84412 84413 84414 84415 84416 84417 84418 84419 84420 84421 84422 84423 84424 84425 84426 84427 84428 84429 84430 84431 84432 84433 84434 84435 84436 84437 84438 84439 84440 84441 84442 84443 84444 84445 84446 84447 84448 84449 84450 84451 84452 84453 84454 84455 84456 84457 84458 84459 84460 84461 84462 84463 84464 84465 84466 84467 84468 84469 84470 84471 84472 84473 84474 84475 84476 84477 84478 84479 84480 84481 84482 84483 84484 84485 84486 84487 84488 84489 84490 84491 84492 84493 84494 84495 84496 84497 84498 84499 84500 84501 84502 84503 84504 84505 84506 84507 84508 84509 84510 84511 84512 84513 84514 84515 84516 84517 84518 84519 84520 84521 84522 84523 84524 84525 84526 84527 84528 84529 84530 84531 84532 84533 84534 84535 84536 84537 84538 84539 84540 84541 84542 84543 84544 84545 84546 84547 84548 84549 84550 84551 84552 84553 84554 84555 84556 84557 84558 84559 84560 84561 84562 84563 84564 84565 84566 84567 84568 84569 84570 84571 84572 84573 84574 84575 84576 84577 84578 84579 84580 84581 84582 84583 84584 84585 84586 84587 84588 84589 84590 84591 84592 84593 84594 84595 84596 84597 84598 84599 84600 84601 84602 84603 84604 84605 84606 84607 84608 84609 84610 84611 84612 84613 84614 84615 84616 84617 84618 84619 84620 84621 84622 84623 84624 84625 84626 84627 84628 84629 84630 84631 84632 84633 84634 84635 84636 84637 84638 84639 84640 84641 84642 84643 84644 84645 84646 84647 84648 84649 84650 84651 84652 84653 84654 84655 84656 84657 84658 84659 84660 84661 84662 84663 84664 84665 84666 84667 84668 84669 84670 84671 84672 84673 84674 84675 84676 84677 84678 84679 84680 84681 84682 84683 84684 84685 84686 84687 84688 84689 84690 84691 84692 84693 84694 84695 84696 84697 84698 84699 84700 84701 84702 84703 84704 84705 84706 84707 84708 84709 84710 84711 84712 84713 84714 84715 84716 84717 84718 84719 84720 84721 84722 84723 84724 84725 84726 84727 84728 84729 84730 84731 84732 84733 84734 84735 84736 84737 84738 84739 84740 84741 84742 84743 84744 84745 84746 84747 84748 84749 84750 84751 84752 84753 84754 84755 84756 84757 84758 84759 84760 84761 84762 84763 84764 84765 84766 84767 84768 84769 84770 84771 84772 84773 84774 84775 84776 84777 84778 84779 84780 84781 84782 84783 84784 84785 84786 84787 84788 84789 84790 84791 84792 84793 84794 84795 84796 84797 84798 84799 84800 84801 84802 84803 84804 84805 84806 84807 84808 84809 84810 84811 84812 84813 84814 84815 84816 84817 84818 84819 84820 84821 84822 84823 84824 84825 84826 84827 84828 84829 84830 84831 84832 84833 84834 84835 84836 84837 84838 84839 84840 84841 84842 84843 84844 84845 84846 84847 84848 84849 84850 84851 84852 84853 84854 84855 84856 84857 84858 84859 84860 84861 84862 84863 84864 84865 84866 84867 84868 84869 84870 84871 84872 84873 84874 84875 84876 84877 84878 84879 84880 84881 84882 84883 84884 84885 84886 84887 84888 84889 84890 84891 84892 84893 84894 84895 84896 84897 84898 84899 84900 84901 84902 84903 84904 84905 84906 84907 84908 84909 84910 84911 84912 84913 84914 84915 84916 84917 84918 84919 84920 84921 84922 84923 84924 84925 84926 84927 84928 84929 84930 84931 84932 84933 84934 84935 84936 84937 84938 84939 84940 84941 84942 84943 84944 84945 84946 84947 84948 84949 84950 84951 84952 84953 84954 84955 84956 84957 84958 84959 84960 84961 84962 84963 84964 84965 84966 84967 84968 84969 84970 84971 84972 84973 84974 84975 84976 84977 84978 84979 84980 84981 84982 84983 84984 84985 84986 84987 84988 84989 84990 84991 84992 84993 84994 84995 84996 84997 84998 84999 85000 85001 85002 85003 85004 85005 85006 85007 85008 85009 85010 85011 85012 85013 85014 85015 85016 85017 85018 85019 85020 85021 85022 85023 85024 85025 85026 85027 85028 85029 85030 85031 85032 85033 85034 85035 85036 85037 85038 85039 85040 85041 85042 85043 85044 85045 85046 85047 85048 85049 85050 85051 85052 85053 85054 85055 85056 85057 85058 85059 85060 85061 85062 85063 85064 85065 85066 85067 85068 85069 85070 85071 85072 85073 85074 85075 85076 85077 85078 85079 85080 85081 85082 85083 85084 85085 85086 85087 85088 85089 85090 85091 85092 85093 85094 85095 85096 85097 85098 85099 85100 85101 85102 85103 85104 85105 85106 85107 85108 85109 85110 85111 85112 85113 85114 85115 85116 85117 85118 85119 85120 85121 85122 85123 85124 85125 85126 85127 85128 85129 85130 85131 85132 85133 85134 85135 85136 85137 85138 85139 85140 85141 85142 85143 85144 85145 85146 85147 85148 85149 85150 85151 85152 85153 85154 85155 85156 85157 85158 85159 85160 85161 85162 85163 85164 85165 85166 85167 85168 85169 85170 85171 85172 85173 85174 85175 85176 85177 85178 85179 85180 85181 85182 85183 85184 85185 85186 85187 85188 85189 85190 85191 85192 85193 85194 85195 85196 85197 85198 85199 85200 85201 85202 85203 85204 85205 85206 85207 85208 85209 85210 85211 85212 85213 85214 85215 85216 85217 85218 85219 85220 85221 85222 85223 85224 85225 85226 85227 85228 85229 85230 85231 85232 85233 85234 85235 85236 85237 85238 85239 85240 85241 85242 85243 85244 85245 85246 85247 85248 85249 85250 85251 85252 85253 85254 85255 85256 85257 85258 85259 85260 85261 85262 85263 85264 85265 85266 85267 85268 85269 85270 85271 85272 85273 85274 85275 85276 85277 85278 85279 85280 85281 85282 85283 85284 85285 85286 85287 85288 85289 85290 85291 85292 85293 85294 85295 85296 85297 85298 85299 85300 85301 85302 85303 85304 85305 85306 85307 85308 85309 85310 85311 85312 85313 85314 85315 85316 85317 85318 85319 85320 85321 85322 85323 85324 85325 85326 85327 85328 85329 85330 85331 85332 85333 85334 85335 85336 85337 85338 85339 85340 85341 85342 85343 85344 85345 85346 85347 85348 85349 85350 85351 85352 85353 85354 85355 85356 85357 85358 85359 85360 85361 85362 85363 85364 85365 85366 85367 85368 85369 85370 85371 85372 85373 85374 85375 85376 85377 85378 85379 85380 85381 85382 85383 85384 85385 85386 85387 85388 85389 85390 85391 85392 85393 85394 85395 85396 85397 85398 85399 85400 85401 85402 85403 85404 85405 85406 85407 85408 85409 85410 85411 85412 85413 85414 85415 85416 85417 85418 85419 85420 85421 85422 85423 85424 85425 85426 85427 85428 85429 85430 85431 85432 85433 85434 85435 85436 85437 85438 85439 85440 85441 85442 85443 85444 85445 85446 85447 85448 85449 85450 85451 85452 85453 85454 85455 85456 85457 85458 85459 85460 85461 85462 85463 85464 85465 85466 85467 85468 85469 85470 85471 85472 85473 85474 85475 85476 85477 85478 85479 85480 85481 85482 85483 85484 85485 85486 85487 85488 85489 85490 85491 85492 85493 85494 85495 85496 85497 85498 85499 85500 85501 85502 85503 85504 85505 85506 85507 85508 85509 85510 85511 85512 85513 85514 85515 85516 85517 85518 85519 85520 85521 85522 85523 85524 85525 85526 85527 85528 85529 85530 85531 85532 85533 85534 85535 85536 85537 85538 85539 85540 85541 85542 85543 85544 85545 85546 85547 85548 85549 85550 85551 85552 85553 85554 85555 85556 85557 85558 85559 85560 85561 85562 85563 85564 85565 85566 85567 85568 85569 85570 85571 85572 85573 85574 85575 85576 85577 85578 85579 85580 85581 85582 85583 85584 85585 85586 85587 85588 85589 85590 85591 85592 85593 85594 85595 85596 85597 85598 85599 85600 85601 85602 85603 85604 85605 85606 85607 85608 85609 85610 85611 85612 85613 85614 85615 85616 85617 85618 85619 85620 85621 85622 85623 85624 85625 85626 85627 85628 85629 85630 85631 85632 85633 85634 85635 85636 85637 85638 85639 85640 85641 85642 85643 85644 85645 85646 85647 85648 85649 85650 85651 85652 85653 85654 85655 85656 85657 85658 85659 85660 85661 85662 85663 85664 85665 85666 85667 85668 85669 85670 85671 85672 85673 85674 85675 85676 85677 85678 85679 85680 85681 85682 85683 85684 85685 85686 85687 85688 85689 85690 85691 85692 85693 85694 85695 85696 85697 85698 85699 85700 85701 85702 85703 85704 85705 85706 85707 85708 85709 85710 85711 85712 85713 85714 85715 85716 85717 85718 85719 85720 85721 85722 85723 85724 85725 85726 85727 85728 85729 85730 85731 85732 85733 85734 85735 85736 85737 85738 85739 85740 85741 85742 85743 85744 85745 85746 85747 85748 85749 85750 85751 85752 85753 85754 85755 85756 85757 85758 85759 85760 85761 85762 85763 85764 85765 85766 85767 85768 85769 85770 85771 85772 85773 85774 85775 85776 85777 85778 85779 85780 85781 85782 85783 85784 85785 85786 85787 85788 85789 85790 85791 85792 85793 85794 85795 85796 85797 85798 85799 85800 85801 85802 85803 85804 85805 85806 85807 85808 85809 85810 85811 85812 85813 85814 85815 85816 85817 85818 85819 85820 85821 85822 85823 85824 85825 85826 85827 85828 85829 85830 85831 85832 85833 85834 85835 85836 85837 85838 85839 85840 85841 85842 85843 85844 85845 85846 85847 85848 85849 85850 85851 85852 85853 85854 85855 85856 85857 85858 85859 85860 85861 85862 85863 85864 85865 85866 85867 85868 85869 85870 85871 85872 85873 85874 85875 85876 85877 85878 85879 85880 85881 85882 85883 85884 85885 85886 85887 85888 85889 85890 85891 85892 85893 85894 85895 85896 85897 85898 85899 85900 85901 85902 85903 85904 85905 85906 85907 85908 85909 85910 85911 85912 85913 85914 85915 85916 85917 85918 85919 85920 85921 85922 85923 85924 85925 85926 85927 85928 85929 85930 85931 85932 85933 85934 85935 85936 85937 85938 85939 85940 85941 85942 85943 85944 85945 85946 85947 85948 85949 85950 85951 85952 85953 85954 85955 85956 85957 85958 85959 85960 85961 85962 85963 85964 85965 85966 85967 85968 85969 85970 85971 85972 85973 85974 85975 85976 85977 85978 85979 85980 85981 85982 85983 85984 85985 85986 85987 85988 85989 85990 85991 85992 85993 85994 85995 85996 85997 85998 85999 86000 86001 86002 86003 86004 86005 86006 86007 86008 86009 86010 86011 86012 86013 86014 86015 86016 86017 86018 86019 86020 86021 86022 86023 86024 86025 86026 86027 86028 86029 86030 86031 86032 86033 86034 86035 86036 86037 86038 86039 86040 86041 86042 86043 86044 86045 86046 86047 86048 86049 86050 86051 86052 86053 86054 86055 86056 86057 86058 86059 86060 86061 86062 86063 86064 86065 86066 86067 86068 86069 86070 86071 86072 86073 86074 86075 86076 86077 86078 86079 86080 86081 86082 86083 86084 86085 86086 86087 86088 86089 86090 86091 86092 86093 86094 86095 86096 86097 86098 86099 86100 86101 86102 86103 86104 86105 86106 86107 86108 86109 86110 86111 86112 86113 86114 86115 86116 86117 86118 86119 86120 86121 86122 86123 86124 86125 86126 86127 86128 86129 86130 86131 86132 86133 86134 86135 86136 86137 86138 86139 86140 86141 86142 86143 86144 86145 86146 86147 86148 86149 86150 86151 86152 86153 86154 86155 86156 86157 86158 86159 86160 86161 86162 86163 86164 86165 86166 86167 86168 86169 86170 86171 86172 86173 86174 86175 86176 86177 86178 86179 86180 86181 86182 86183 86184 86185 86186 86187 86188 86189 86190 86191 86192 86193 86194 86195 86196 86197 86198 86199 86200 86201 86202 86203 86204 86205 86206 86207 86208 86209 86210 86211 86212 86213 86214 86215 86216 86217 86218 86219 86220 86221 86222 86223 86224 86225 86226 86227 86228 86229 86230 86231 86232 86233 86234 86235 86236 86237 86238 86239 86240 86241 86242 86243 86244 86245 86246 86247 86248 86249 86250 86251 86252 86253 86254 86255 86256 86257 86258 86259 86260 86261 86262 86263 86264 86265 86266 86267 86268 86269 86270 86271 86272 86273 86274 86275 86276 86277 86278 86279 86280 86281 86282 86283 86284 86285 86286 86287 86288 86289 86290 86291 86292 86293 86294 86295 86296 86297 86298 86299 86300 86301 86302 86303 86304 86305 86306 86307 86308 86309 86310 86311 86312 86313 86314 86315 86316 86317 86318 86319 86320 86321 86322 86323 86324 86325 86326 86327 86328 86329 86330 86331 86332 86333 86334 86335 86336 86337 86338 86339 86340 86341 86342 86343 86344 86345 86346 86347 86348 86349 86350 86351 86352 86353 86354 86355 86356 86357 86358 86359 86360 86361 86362 86363 86364 86365 86366 86367 86368 86369 86370 86371 86372 86373 86374 86375 86376 86377 86378 86379 86380 86381 86382 86383 86384 86385 86386 86387 86388 86389 86390 86391 86392 86393 86394 86395 86396 86397 86398 86399 86400 86401 86402 86403 86404 86405 86406 86407 86408 86409 86410 86411 86412 86413 86414 86415 86416 86417 86418 86419 86420 86421 86422 86423 86424 86425 86426 86427 86428 86429 86430 86431 86432 86433 86434 86435 86436 86437 86438 86439 86440 86441 86442 86443 86444 86445 86446 86447 86448 86449 86450 86451 86452 86453 86454 86455 86456 86457 86458 86459 86460 86461 86462 86463 86464 86465 86466 86467 86468 86469 86470 86471 86472 86473 86474 86475 86476 86477 86478 86479 86480 86481 86482 86483 86484 86485 86486 86487 86488 86489 86490 86491 86492 86493 86494 86495 86496 86497 86498 86499 86500 86501 86502 86503 86504 86505 86506 86507 86508 86509 86510 86511 86512 86513 86514 86515 86516 86517 86518 86519 86520 86521 86522 86523 86524 86525 86526 86527 86528 86529 86530 86531 86532 86533 86534 86535 86536 86537 86538 86539 86540 86541 86542 86543 86544 86545 86546 86547 86548 86549 86550 86551 86552 86553 86554 86555 86556 86557 86558 86559 86560 86561 86562 86563 86564 86565 86566 86567 86568 86569 86570 86571 86572 86573 86574 86575 86576 86577 86578 86579 86580 86581 86582 86583 86584 86585 86586 86587 86588 86589 86590 86591 86592 86593 86594 86595 86596 86597 86598 86599 86600 86601 86602 86603 86604 86605 86606 86607 86608 86609 86610 86611 86612 86613 86614 86615 86616 86617 86618 86619 86620 86621 86622 86623 86624 86625 86626 86627 86628 86629 86630 86631 86632 86633 86634 86635 86636 86637 86638 86639 86640 86641 86642 86643 86644 86645 86646 86647 86648 86649 86650 86651 86652 86653 86654 86655 86656 86657 86658 86659 86660 86661 86662 86663 86664 86665 86666 86667 86668 86669 86670 86671 86672 86673 86674 86675 86676 86677 86678 86679 86680 86681 86682 86683 86684 86685 86686 86687 86688 86689 86690 86691 86692 86693 86694 86695 86696 86697 86698 86699 86700 86701 86702 86703 86704 86705 86706 86707 86708 86709 86710 86711 86712 86713 86714 86715 86716 86717 86718 86719 86720 86721 86722 86723 86724 86725 86726 86727 86728 86729 86730 86731 86732 86733 86734 86735 86736 86737 86738 86739 86740 86741 86742 86743 86744 86745 86746 86747 86748 86749 86750 86751 86752 86753 86754 86755 86756 86757 86758 86759 86760 86761 86762 86763 86764 86765 86766 86767 86768 86769 86770 86771 86772 86773 86774 86775 86776 86777 86778 86779 86780 86781 86782 86783 86784 86785 86786 86787 86788 86789 86790 86791 86792 86793 86794 86795 86796 86797 86798 86799 86800 86801 86802 86803 86804 86805 86806 86807 86808 86809 86810 86811 86812 86813 86814 86815 86816 86817 86818 86819 86820 86821 86822 86823 86824 86825 86826 86827 86828 86829 86830 86831 86832 86833 86834 86835 86836 86837 86838 86839 86840 86841 86842 86843 86844 86845 86846 86847 86848 86849 86850 86851 86852 86853 86854 86855 86856 86857 86858 86859 86860 86861 86862 86863 86864 86865 86866 86867 86868 86869 86870 86871 86872 86873 86874 86875 86876 86877 86878 86879 86880 86881 86882 86883 86884 86885 86886 86887 86888 86889 86890 86891 86892 86893 86894 86895 86896 86897 86898 86899 86900 86901 86902 86903 86904 86905 86906 86907 86908 86909 86910 86911 86912 86913 86914 86915 86916 86917 86918 86919 86920 86921 86922 86923 86924 86925 86926 86927 86928 86929 86930 86931 86932 86933 86934 86935 86936 86937 86938 86939 86940 86941 86942 86943 86944 86945 86946 86947 86948 86949 86950 86951 86952 86953 86954 86955 86956 86957 86958 86959 86960 86961 86962 86963 86964 86965 86966 86967 86968 86969 86970 86971 86972 86973 86974 86975 86976 86977 86978 86979 86980 86981 86982 86983 86984 86985 86986 86987 86988 86989 86990 86991 86992 86993 86994 86995 86996 86997 86998 86999 87000 87001 87002 87003 87004 87005 87006 87007 87008 87009 87010 87011 87012 87013 87014 87015 87016 87017 87018 87019 87020 87021 87022 87023 87024 87025 87026 87027 87028 87029 87030 87031 87032 87033 87034 87035 87036 87037 87038 87039 87040 87041 87042 87043 87044 87045 87046 87047 87048 87049 87050 87051 87052 87053 87054 87055 87056 87057 87058 87059 87060 87061 87062 87063 87064 87065 87066 87067 87068 87069 87070 87071 87072 87073 87074 87075 87076 87077 87078 87079 87080 87081 87082 87083 87084 87085 87086 87087 87088 87089 87090 87091 87092 87093 87094 87095 87096 87097 87098 87099 87100 87101 87102 87103 87104 87105 87106 87107 87108 87109 87110 87111 87112 87113 87114 87115 87116 87117 87118 87119 87120 87121 87122 87123 87124 87125 87126 87127 87128 87129 87130 87131 87132 87133 87134 87135 87136 87137 87138 87139 87140 87141 87142 87143 87144 87145 87146 87147 87148 87149 87150 87151 87152 87153 87154 87155 87156 87157 87158 87159 87160 87161 87162 87163 87164 87165 87166 87167 87168 87169 87170 87171 87172 87173 87174 87175 87176 87177 87178 87179 87180 87181 87182 87183 87184 87185 87186 87187 87188 87189 87190 87191 87192 87193 87194 87195 87196 87197 87198 87199 87200 87201 87202 87203 87204 87205 87206 87207 87208 87209 87210 87211 87212 87213 87214 87215 87216 87217 87218 87219 87220 87221 87222 87223 87224 87225 87226 87227 87228 87229 87230 87231 87232 87233 87234 87235 87236 87237 87238 87239 87240 87241 87242 87243 87244 87245 87246 87247 87248 87249 87250 87251 87252 87253 87254 87255 87256 87257 87258 87259 87260 87261 87262 87263 87264 87265 87266 87267 87268 87269 87270 87271 87272 87273 87274 87275 87276 87277 87278 87279 87280 87281 87282 87283 87284 87285 87286 87287 87288 87289 87290 87291 87292 87293 87294 87295 87296 87297 87298 87299 87300 87301 87302 87303 87304 87305 87306 87307 87308 87309 87310 87311 87312 87313 87314 87315 87316 87317 87318 87319 87320 87321 87322 87323 87324 87325 87326 87327 87328 87329 87330 87331 87332 87333 87334 87335 87336 87337 87338 87339 87340 87341 87342 87343 87344 87345 87346 87347 87348 87349 87350 87351 87352 87353 87354 87355 87356 87357 87358 87359 87360 87361 87362 87363 87364 87365 87366 87367 87368 87369 87370 87371 87372 87373 87374 87375 87376 87377 87378 87379 87380 87381 87382 87383 87384 87385 87386 87387 87388 87389 87390 87391 87392 87393 87394 87395 87396 87397 87398 87399 87400 87401 87402 87403 87404 87405 87406 87407 87408 87409 87410 87411 87412 87413 87414 87415 87416 87417 87418 87419 87420 87421 87422 87423 87424 87425 87426 87427 87428 87429 87430 87431 87432 87433 87434 87435 87436 87437 87438 87439 87440 87441 87442 87443 87444 87445 87446 87447 87448 87449 87450 87451 87452 87453 87454 87455 87456 87457 87458 87459 87460 87461 87462 87463 87464 87465 87466 87467 87468 87469 87470 87471 87472 87473 87474 87475 87476 87477 87478 87479 87480 87481 87482 87483 87484 87485 87486 87487 87488 87489 87490 87491 87492 87493 87494 87495 87496 87497 87498 87499 87500 87501 87502 87503 87504 87505 87506 87507 87508 87509 87510 87511 87512 87513 87514 87515 87516 87517 87518 87519 87520 87521 87522 87523 87524 87525 87526 87527 87528 87529 87530 87531 87532 87533 87534 87535 87536 87537 87538 87539 87540 87541 87542 87543 87544 87545 87546 87547 87548 87549 87550 87551 87552 87553 87554 87555 87556 87557 87558 87559 87560 87561 87562 87563 87564 87565 87566 87567 87568 87569 87570 87571 87572 87573 87574 87575 87576 87577 87578 87579 87580 87581 87582 87583 87584 87585 87586 87587 87588 87589 87590 87591 87592 87593 87594 87595 87596 87597 87598 87599 87600 87601 87602 87603 87604 87605 87606 87607 87608 87609 87610 87611 87612 87613 87614 87615 87616 87617 87618 87619 87620 87621 87622 87623 87624 87625 87626 87627 87628 87629 87630 87631 87632 87633 87634 87635 87636 87637 87638 87639 87640 87641 87642 87643 87644 87645 87646 87647 87648 87649 87650 87651 87652 87653 87654 87655 87656 87657 87658 87659 87660 87661 87662 87663 87664 87665 87666 87667 87668 87669 87670 87671 87672 87673 87674 87675 87676 87677 87678 87679 87680 87681 87682 87683 87684 87685 87686 87687 87688 87689 87690 87691 87692 87693 87694 87695 87696 87697 87698 87699 87700 87701 87702 87703 87704 87705 87706 87707 87708 87709 87710 87711 87712 87713 87714 87715 87716 87717 87718 87719 87720 87721 87722 87723 87724 87725 87726 87727 87728 87729 87730 87731 87732 87733 87734 87735 87736 87737 87738 87739 87740 87741 87742 87743 87744 87745 87746 87747 87748 87749 87750 87751 87752 87753 87754 87755 87756 87757 87758 87759 87760 87761 87762 87763 87764 87765 87766 87767 87768 87769 87770 87771 87772 87773 87774 87775 87776 87777 87778 87779 87780 87781 87782 87783 87784 87785 87786 87787 87788 87789 87790 87791 87792 87793 87794 87795 87796 87797 87798 87799 87800 87801 87802 87803 87804 87805 87806 87807 87808 87809 87810 87811 87812 87813 87814 87815 87816 87817 87818 87819 87820 87821 87822 87823 87824 87825 87826 87827 87828 87829 87830 87831 87832 87833 87834 87835 87836 87837 87838 87839 87840 87841 87842 87843 87844 87845 87846 87847 87848 87849 87850 87851 87852 87853 87854 87855 87856 87857 87858 87859 87860 87861 87862 87863 87864 87865 87866 87867 87868 87869 87870 87871 87872 87873 87874 87875 87876 87877 87878 87879 87880 87881 87882 87883 87884 87885 87886 87887 87888 87889 87890 87891 87892 87893 87894 87895 87896 87897 87898 87899 87900 87901 87902 87903 87904 87905 87906 87907 87908 87909 87910 87911 87912 87913 87914 87915 87916 87917 87918 87919 87920 87921 87922 87923 87924 87925 87926 87927 87928 87929 87930 87931 87932 87933 87934 87935 87936 87937 87938 87939 87940 87941 87942 87943 87944 87945 87946 87947 87948 87949 87950 87951 87952 87953 87954 87955 87956 87957 87958 87959 87960 87961 87962 87963 87964 87965 87966 87967 87968 87969 87970 87971 87972 87973 87974 87975 87976 87977 87978 87979 87980 87981 87982 87983 87984 87985 87986 87987 87988 87989 87990 87991 87992 87993 87994 87995 87996 87997 87998 87999 88000 88001 88002 88003 88004 88005 88006 88007 88008 88009 88010 88011 88012 88013 88014 88015 88016 88017 88018 88019 88020 88021 88022 88023 88024 88025 88026 88027 88028 88029 88030 88031 88032 88033 88034 88035 88036 88037 88038 88039 88040 88041 88042 88043 88044 88045 88046 88047 88048 88049 88050 88051 88052 88053 88054 88055 88056 88057 88058 88059 88060 88061 88062 88063 88064 88065 88066 88067 88068 88069 88070 88071 88072 88073 88074 88075 88076 88077 88078 88079 88080 88081 88082 88083 88084 88085 88086 88087 88088 88089 88090 88091 88092 88093 88094 88095 88096 88097 88098 88099 88100 88101 88102 88103 88104 88105 88106 88107 88108 88109 88110 88111 88112 88113 88114 88115 88116 88117 88118 88119 88120 88121 88122 88123 88124 88125 88126 88127 88128 88129 88130 88131 88132 88133 88134 88135 88136 88137 88138 88139 88140 88141 88142 88143 88144 88145 88146 88147 88148 88149 88150 88151 88152 88153 88154 88155 88156 88157 88158 88159 88160 88161 88162 88163 88164 88165 88166 88167 88168 88169 88170 88171 88172 88173 88174 88175 88176 88177 88178 88179 88180 88181 88182 88183 88184 88185 88186 88187 88188 88189 88190 88191 88192 88193 88194 88195 88196 88197 88198 88199 88200 88201 88202 88203 88204 88205 88206 88207 88208 88209 88210 88211 88212 88213 88214 88215 88216 88217 88218 88219 88220 88221 88222 88223 88224 88225 88226 88227 88228 88229 88230 88231 88232 88233 88234 88235 88236 88237 88238 88239 88240 88241 88242 88243 88244 88245 88246 88247 88248 88249 88250 88251 88252 88253 88254 88255 88256 88257 88258 88259 88260 88261 88262 88263 88264 88265 88266 88267 88268 88269 88270 88271 88272 88273 88274 88275 88276 88277 88278 88279 88280 88281 88282 88283 88284 88285 88286 88287 88288 88289 88290 88291 88292 88293 88294 88295 88296 88297 88298 88299 88300 88301 88302 88303 88304 88305 88306 88307 88308 88309 88310 88311 88312 88313 88314 88315 88316 88317 88318 88319 88320 88321 88322 88323 88324 88325 88326 88327 88328 88329 88330 88331 88332 88333 88334 88335 88336 88337 88338 88339 88340 88341 88342 88343 88344 88345 88346 88347 88348 88349 88350 88351 88352 88353 88354 88355 88356 88357 88358 88359 88360 88361 88362 88363 88364 88365 88366 88367 88368 88369 88370 88371 88372 88373 88374 88375 88376 88377 88378 88379 88380 88381 88382 88383 88384 88385 88386 88387 88388 88389 88390 88391 88392 88393 88394 88395 88396 88397 88398 88399 88400 88401 88402 88403 88404 88405 88406 88407 88408 88409 88410 88411 88412 88413 88414 88415 88416 88417 88418 88419 88420 88421 88422 88423 88424 88425 88426 88427 88428 88429 88430 88431 88432 88433 88434 88435 88436 88437 88438 88439 88440 88441 88442 88443 88444 88445 88446 88447 88448 88449 88450 88451 88452 88453 88454 88455 88456 88457 88458 88459 88460 88461 88462 88463 88464 88465 88466 88467 88468 88469 88470 88471 88472 88473 88474 88475 88476 88477 88478 88479 88480 88481 88482 88483 88484 88485 88486 88487 88488 88489 88490 88491 88492 88493 88494 88495 88496 88497 88498 88499 88500 88501 88502 88503 88504 88505 88506 88507 88508 88509 88510 88511 88512 88513 88514 88515 88516 88517 88518 88519 88520 88521 88522 88523 88524 88525 88526 88527 88528 88529 88530 88531 88532 88533 88534 88535 88536 88537 88538 88539 88540 88541 88542 88543 88544 88545 88546 88547 88548 88549 88550 88551 88552 88553 88554 88555 88556 88557 88558 88559 88560 88561 88562 88563 88564 88565 88566 88567 88568 88569 88570 88571 88572 88573 88574 88575 88576 88577 88578 88579 88580 88581 88582 88583 88584 88585 88586 88587 88588 88589 88590 88591 88592 88593 88594 88595 88596 88597 88598 88599 88600 88601 88602 88603 88604 88605 88606 88607 88608 88609 88610 88611 88612 88613 88614 88615 88616 88617 88618 88619 88620 88621 88622 88623 88624 88625 88626 88627 88628 88629 88630 88631 88632 88633 88634 88635 88636 88637 88638 88639 88640 88641 88642 88643 88644 88645 88646 88647 88648 88649 88650 88651 88652 88653 88654 88655 88656 88657 88658 88659 88660 88661 88662 88663 88664 88665 88666 88667 88668 88669 88670 88671 88672 88673 88674 88675 88676 88677 88678 88679 88680 88681 88682 88683 88684 88685 88686 88687 88688 88689 88690 88691 88692 88693 88694 88695 88696 88697 88698 88699 88700 88701 88702 88703 88704 88705 88706 88707 88708 88709 88710 88711 88712 88713 88714 88715 88716 88717 88718 88719 88720 88721 88722 88723 88724 88725 88726 88727 88728 88729 88730 88731 88732 88733 88734 88735 88736 88737 88738 88739 88740 88741 88742 88743 88744 88745 88746 88747 88748 88749 88750 88751 88752 88753 88754 88755 88756 88757 88758 88759 88760 88761 88762 88763 88764 88765 88766 88767 88768 88769 88770 88771 88772 88773 88774 88775 88776 88777 88778 88779 88780 88781 88782 88783 88784 88785 88786 88787 88788 88789 88790 88791 88792 88793 88794 88795 88796 88797 88798 88799 88800 88801 88802 88803 88804 88805 88806 88807 88808 88809 88810 88811 88812 88813 88814 88815 88816 88817 88818 88819 88820 88821 88822 88823 88824 88825 88826 88827 88828 88829 88830 88831 88832 88833 88834 88835 88836 88837 88838 88839 88840 88841 88842 88843 88844 88845 88846 88847 88848 88849 88850 88851 88852 88853 88854 88855 88856 88857 88858 88859 88860 88861 88862 88863 88864 88865 88866 88867 88868 88869 88870 88871 88872 88873 88874 88875 88876 88877 88878 88879 88880 88881 88882 88883 88884 88885 88886 88887 88888 88889 88890 88891 88892 88893 88894 88895 88896 88897 88898 88899 88900 88901 88902 88903 88904 88905 88906 88907 88908 88909 88910 88911 88912 88913 88914 88915 88916 88917 88918 88919 88920 88921 88922 88923 88924 88925 88926 88927 88928 88929 88930 88931 88932 88933 88934 88935 88936 88937 88938 88939 88940 88941 88942 88943 88944 88945 88946 88947 88948 88949 88950 88951 88952 88953 88954 88955 88956 88957 88958 88959 88960 88961 88962 88963 88964 88965 88966 88967 88968 88969 88970 88971 88972 88973 88974 88975 88976 88977 88978 88979 88980 88981 88982 88983 88984 88985 88986 88987 88988 88989 88990 88991 88992 88993 88994 88995 88996 88997 88998 88999 89000 89001 89002 89003 89004 89005 89006 89007 89008 89009 89010 89011 89012 89013 89014 89015 89016 89017 89018 89019 89020 89021 89022 89023 89024 89025 89026 89027 89028 89029 89030 89031 89032 89033 89034 89035 89036 89037 89038 89039 89040 89041 89042 89043 89044 89045 89046 89047 89048 89049 89050 89051 89052 89053 89054 89055 89056 89057 89058 89059 89060 89061 89062 89063 89064 89065 89066 89067 89068 89069 89070 89071 89072 89073 89074 89075 89076 89077 89078 89079 89080 89081 89082 89083 89084 89085 89086 89087 89088 89089 89090 89091 89092 89093 89094 89095 89096 89097 89098 89099 89100 89101 89102 89103 89104 89105 89106 89107 89108 89109 89110 89111 89112 89113 89114 89115 89116 89117 89118 89119 89120 89121 89122 89123 89124 89125 89126 89127 89128 89129 89130 89131 89132 89133 89134 89135 89136 89137 89138 89139 89140 89141 89142 89143 89144 89145 89146 89147 89148 89149 89150 89151 89152 89153 89154 89155 89156 89157 89158 89159 89160 89161 89162 89163 89164 89165 89166 89167 89168 89169 89170 89171 89172 89173 89174 89175 89176 89177 89178 89179 89180 89181 89182 89183 89184 89185 89186 89187 89188 89189 89190 89191 89192 89193 89194 89195 89196 89197 89198 89199 89200 89201 89202 89203 89204 89205 89206 89207 89208 89209 89210 89211 89212 89213 89214 89215 89216 89217 89218 89219 89220 89221 89222 89223 89224 89225 89226 89227 89228 89229 89230 89231 89232 89233 89234 89235 89236 89237 89238 89239 89240 89241 89242 89243 89244 89245 89246 89247 89248 89249 89250 89251 89252 89253 89254 89255 89256 89257 89258 89259 89260 89261 89262 89263 89264 89265 89266 89267 89268 89269 89270 89271 89272 89273 89274 89275 89276 89277 89278 89279 89280 89281 89282 89283 89284 89285 89286 89287 89288 89289 89290 89291 89292 89293 89294 89295 89296 89297 89298 89299 89300 89301 89302 89303 89304 89305 89306 89307 89308 89309 89310 89311 89312 89313 89314 89315 89316 89317 89318 89319 89320 89321 89322 89323 89324 89325 89326 89327 89328 89329 89330 89331 89332 89333 89334 89335 89336 89337 89338 89339 89340 89341 89342 89343 89344 89345 89346 89347 89348 89349 89350 89351 89352 89353 89354 89355 89356 89357 89358 89359 89360 89361 89362 89363 89364 89365 89366 89367 89368 89369 89370 89371 89372 89373 89374 89375 89376 89377 89378 89379 89380 89381 89382 89383 89384 89385 89386 89387 89388 89389 89390 89391 89392 89393 89394 89395 89396 89397 89398 89399 89400 89401 89402 89403 89404 89405 89406 89407 89408 89409 89410 89411 89412 89413 89414 89415 89416 89417 89418 89419 89420 89421 89422 89423 89424 89425 89426 89427 89428 89429 89430 89431 89432 89433 89434 89435 89436 89437 89438 89439 89440 89441 89442 89443 89444 89445 89446 89447 89448 89449 89450 89451 89452 89453 89454 89455 89456 89457 89458 89459 89460 89461 89462 89463 89464 89465 89466 89467 89468 89469 89470 89471 89472 89473 89474 89475 89476 89477 89478 89479 89480 89481 89482 89483 89484 89485 89486 89487 89488 89489 89490 89491 89492 89493 89494 89495 89496 89497 89498 89499 89500 89501 89502 89503 89504 89505 89506 89507 89508 89509 89510 89511 89512 89513 89514 89515 89516 89517 89518 89519 89520 89521 89522 89523 89524 89525 89526 89527 89528 89529 89530 89531 89532 89533 89534 89535 89536 89537 89538 89539 89540 89541 89542 89543 89544 89545 89546 89547 89548 89549 89550 89551 89552 89553 89554 89555 89556 89557 89558 89559 89560 89561 89562 89563 89564 89565 89566 89567 89568 89569 89570 89571 89572 89573 89574 89575 89576 89577 89578 89579 89580 89581 89582 89583 89584 89585 89586 89587 89588 89589 89590 89591 89592 89593 89594 89595 89596 89597 89598 89599 89600 89601 89602 89603 89604 89605 89606 89607 89608 89609 89610 89611 89612 89613 89614 89615 89616 89617 89618 89619 89620 89621 89622 89623 89624 89625 89626 89627 89628 89629 89630 89631 89632 89633 89634 89635 89636 89637 89638 89639 89640 89641 89642 89643 89644 89645 89646 89647 89648 89649 89650 89651 89652 89653 89654 89655 89656 89657 89658 89659 89660 89661 89662 89663 89664 89665 89666 89667 89668 89669 89670 89671 89672 89673 89674 89675 89676 89677 89678 89679 89680 89681 89682 89683 89684 89685 89686 89687 89688 89689 89690 89691 89692 89693 89694 89695 89696 89697 89698 89699 89700 89701 89702 89703 89704 89705 89706 89707 89708 89709 89710 89711 89712 89713 89714 89715 89716 89717 89718 89719 89720 89721 89722 89723 89724 89725 89726 89727 89728 89729 89730 89731 89732 89733 89734 89735 89736 89737 89738 89739 89740 89741 89742 89743 89744 89745 89746 89747 89748 89749 89750 89751 89752 89753 89754 89755 89756 89757 89758 89759 89760 89761 89762 89763 89764 89765 89766 89767 89768 89769 89770 89771 89772 89773 89774 89775 89776 89777 89778 89779 89780 89781 89782 89783 89784 89785 89786 89787 89788 89789 89790 89791 89792 89793 89794 89795 89796 89797 89798 89799 89800 89801 89802 89803 89804 89805 89806 89807 89808 89809 89810 89811 89812 89813 89814 89815 89816 89817 89818 89819 89820 89821 89822 89823 89824 89825 89826 89827 89828 89829 89830 89831 89832 89833 89834 89835 89836 89837 89838 89839 89840 89841 89842 89843 89844 89845 89846 89847 89848 89849 89850 89851 89852 89853 89854 89855 89856 89857 89858 89859 89860 89861 89862 89863 89864 89865 89866 89867 89868 89869 89870 89871 89872 89873 89874 89875 89876 89877 89878 89879 89880 89881 89882 89883 89884 89885 89886 89887 89888 89889 89890 89891 89892 89893 89894 89895 89896 89897 89898 89899 89900 89901 89902 89903 89904 89905 89906 89907 89908 89909 89910 89911 89912 89913 89914 89915 89916 89917 89918 89919 89920 89921 89922 89923 89924 89925 89926 89927 89928 89929 89930 89931 89932 89933 89934 89935 89936 89937 89938 89939 89940 89941 89942 89943 89944 89945 89946 89947 89948 89949 89950 89951 89952 89953 89954 89955 89956 89957 89958 89959 89960 89961 89962 89963 89964 89965 89966 89967 89968 89969 89970 89971 89972 89973 89974 89975 89976 89977 89978 89979 89980 89981 89982 89983 89984 89985 89986 89987 89988 89989 89990 89991 89992 89993 89994 89995 89996 89997 89998 89999 90000 90001 90002 90003 90004 90005 90006 90007 90008 90009 90010 90011 90012 90013 90014 90015 90016 90017 90018 90019 90020 90021 90022 90023 90024 90025 90026 90027 90028 90029 90030 90031 90032 90033 90034 90035 90036 90037 90038 90039 90040 90041 90042 90043 90044 90045 90046 90047 90048 90049 90050 90051 90052 90053 90054 90055 90056 90057 90058 90059 90060 90061 90062 90063 90064 90065 90066 90067 90068 90069 90070 90071 90072 90073 90074 90075 90076 90077 90078 90079 90080 90081 90082 90083 90084 90085 90086 90087 90088 90089 90090 90091 90092 90093 90094 90095 90096 90097 90098 90099 90100 90101 90102 90103 90104 90105 90106 90107 90108 90109 90110 90111 90112 90113 90114 90115 90116 90117 90118 90119 90120 90121 90122 90123 90124 90125 90126 90127 90128 90129 90130 90131 90132 90133 90134 90135 90136 90137 90138 90139 90140 90141 90142 90143 90144 90145 90146 90147 90148 90149 90150 90151 90152 90153 90154 90155 90156 90157 90158 90159 90160 90161 90162 90163 90164 90165 90166 90167 90168 90169 90170 90171 90172 90173 90174 90175 90176 90177 90178 90179 90180 90181 90182 90183 90184 90185 90186 90187 90188 90189 90190 90191 90192 90193 90194 90195 90196 90197 90198 90199 90200 90201 90202 90203 90204 90205 90206 90207 90208 90209 90210 90211 90212 90213 90214 90215 90216 90217 90218 90219 90220 90221 90222 90223 90224 90225 90226 90227 90228 90229 90230 90231 90232 90233 90234 90235 90236 90237 90238 90239 90240 90241 90242 90243 90244 90245 90246 90247 90248 90249 90250 90251 90252 90253 90254 90255 90256 90257 90258 90259 90260 90261 90262 90263 90264 90265 90266 90267 90268 90269 90270 90271 90272 90273 90274 90275 90276 90277 90278 90279 90280 90281 90282 90283 90284 90285 90286 90287 90288 90289 90290 90291 90292 90293 90294 90295 90296 90297 90298 90299 90300 90301 90302 90303 90304 90305 90306 90307 90308 90309 90310 90311 90312 90313 90314 90315 90316 90317 90318 90319 90320 90321 90322 90323 90324 90325 90326 90327 90328 90329 90330 90331 90332 90333 90334 90335 90336 90337 90338 90339 90340 90341 90342 90343 90344 90345 90346 90347 90348 90349 90350 90351 90352 90353 90354 90355 90356 90357 90358 90359 90360 90361 90362 90363 90364 90365 90366 90367 90368 90369 90370 90371 90372 90373 90374 90375 90376 90377 90378 90379 90380 90381 90382 90383 90384 90385 90386 90387 90388 90389 90390 90391 90392 90393 90394 90395 90396 90397 90398 90399 90400 90401 90402 90403 90404 90405 90406 90407 90408 90409 90410 90411 90412 90413 90414 90415 90416 90417 90418 90419 90420 90421 90422 90423 90424 90425 90426 90427 90428 90429 90430 90431 90432 90433 90434 90435 90436 90437 90438 90439 90440 90441 90442 90443 90444 90445 90446 90447 90448 90449 90450 90451 90452 90453 90454 90455 90456 90457 90458 90459 90460 90461 90462 90463 90464 90465 90466 90467 90468 90469 90470 90471 90472 90473 90474 90475 90476 90477 90478 90479 90480 90481 90482 90483 90484 90485 90486 90487 90488 90489 90490 90491 90492 90493 90494 90495 90496 90497 90498 90499 90500 90501 90502 90503 90504 90505 90506 90507 90508 90509 90510 90511 90512 90513 90514 90515 90516 90517 90518 90519 90520 90521 90522 90523 90524 90525 90526 90527 90528 90529 90530 90531 90532 90533 90534 90535 90536 90537 90538 90539 90540 90541 90542 90543 90544 90545 90546 90547 90548 90549 90550 90551 90552 90553 90554 90555 90556 90557 90558 90559 90560 90561 90562 90563 90564 90565 90566 90567 90568 90569 90570 90571 90572 90573 90574 90575 90576 90577 90578 90579 90580 90581 90582 90583 90584 90585 90586 90587 90588 90589 90590 90591 90592 90593 90594 90595 90596 90597 90598 90599 90600 90601 90602 90603 90604 90605 90606 90607 90608 90609 90610 90611 90612 90613 90614 90615 90616 90617 90618 90619 90620 90621 90622 90623 90624 90625 90626 90627 90628 90629 90630 90631 90632 90633 90634 90635 90636 90637 90638 90639 90640 90641 90642 90643 90644 90645 90646 90647 90648 90649 90650 90651 90652 90653 90654 90655 90656 90657 90658 90659 90660 90661 90662 90663 90664 90665 90666 90667 90668 90669 90670 90671 90672 90673 90674 90675 90676 90677 90678 90679 90680 90681 90682 90683 90684 90685 90686 90687 90688 90689 90690 90691 90692 90693 90694 90695 90696 90697 90698 90699 90700 90701 90702 90703 90704 90705 90706 90707 90708 90709 90710 90711 90712 90713 90714 90715 90716 90717 90718 90719 90720 90721 90722 90723 90724 90725 90726 90727 90728 90729 90730 90731 90732 90733 90734 90735 90736 90737 90738 90739 90740 90741 90742 90743 90744 90745 90746 90747 90748 90749 90750 90751 90752 90753 90754 90755 90756 90757 90758 90759 90760 90761 90762 90763 90764 90765 90766 90767 90768 90769 90770 90771 90772 90773 90774 90775 90776 90777 90778 90779 90780 90781 90782 90783 90784 90785 90786 90787 90788 90789 90790 90791 90792 90793 90794 90795 90796 90797 90798 90799 90800 90801 90802 90803 90804 90805 90806 90807 90808 90809 90810 90811 90812 90813 90814 90815 90816 90817 90818 90819 90820 90821 90822 90823 90824 90825 90826 90827 90828 90829 90830 90831 90832 90833 90834 90835 90836 90837 90838 90839 90840 90841 90842 90843 90844 90845 90846 90847 90848 90849 90850 90851 90852 90853 90854 90855 90856 90857 90858 90859 90860 90861 90862 90863 90864 90865 90866 90867 90868 90869 90870 90871 90872 90873 90874 90875 90876 90877 90878 90879 90880 90881 90882 90883 90884 90885 90886 90887 90888 90889 90890 90891 90892 90893 90894 90895 90896 90897 90898 90899 90900 90901 90902 90903 90904 90905 90906 90907 90908 90909 90910 90911 90912 90913 90914 90915 90916 90917 90918 90919 90920 90921 90922 90923 90924 90925 90926 90927 90928 90929 90930 90931 90932 90933 90934 90935 90936 90937 90938 90939 90940 90941 90942 90943 90944 90945 90946 90947 90948 90949 90950 90951 90952 90953 90954 90955 90956 90957 90958 90959 90960 90961 90962 90963 90964 90965 90966 90967 90968 90969 90970 90971 90972 90973 90974 90975 90976 90977 90978 90979 90980 90981 90982 90983 90984 90985 90986 90987 90988 90989 90990 90991 90992 90993 90994 90995 90996 90997 90998 90999 91000 91001 91002 91003 91004 91005 91006 91007 91008 91009 91010 91011 91012 91013 91014 91015 91016 91017 91018 91019 91020 91021 91022 91023 91024 91025 91026 91027 91028 91029 91030 91031 91032 91033 91034 91035 91036 91037 91038 91039 91040 91041 91042 91043 91044 91045 91046 91047 91048 91049 91050 91051 91052 91053 91054 91055 91056 91057 91058 91059 91060 91061 91062 91063 91064 91065 91066 91067 91068 91069 91070 91071 91072 91073 91074 91075 91076 91077 91078 91079 91080 91081 91082 91083 91084 91085 91086 91087 91088 91089 91090 91091 91092 91093 91094 91095 91096 91097 91098 91099 91100 91101 91102 91103 91104 91105 91106 91107 91108 91109 91110 91111 91112 91113 91114 91115 91116 91117 91118 91119 91120 91121 91122 91123 91124 91125 91126 91127 91128 91129 91130 91131 91132 91133 91134 91135 91136 91137 91138 91139 91140 91141 91142 91143 91144 91145 91146 91147 91148 91149 91150 91151 91152 91153 91154 91155 91156 91157 91158 91159 91160 91161 91162 91163 91164 91165 91166 91167 91168 91169 91170 91171 91172 91173 91174 91175 91176 91177 91178 91179 91180 91181 91182 91183 91184 91185 91186 91187 91188 91189 91190 91191 91192 91193 91194 91195 91196 91197 91198 91199 91200 91201 91202 91203 91204 91205 91206 91207 91208 91209 91210 91211 91212 91213 91214 91215 91216 91217 91218 91219 91220 91221 91222 91223 91224 91225 91226 91227 91228 91229 91230 91231 91232 91233 91234 91235 91236 91237 91238 91239 91240 91241 91242 91243 91244 91245 91246 91247 91248 91249 91250 91251 91252 91253 91254 91255 91256 91257 91258 91259 91260 91261 91262 91263 91264 91265 91266 91267 91268 91269 91270 91271 91272 91273 91274 91275 91276 91277 91278 91279 91280 91281 91282 91283 91284 91285 91286 91287 91288 91289 91290 91291 91292 91293 91294 91295 91296 91297 91298 91299 91300 91301 91302 91303 91304 91305 91306 91307 91308 91309 91310 91311 91312 91313 91314 91315 91316 91317 91318 91319 91320 91321 91322 91323 91324 91325 91326 91327 91328 91329 91330 91331 91332 91333 91334 91335 91336 91337 91338 91339 91340 91341 91342 91343 91344 91345 91346 91347 91348 91349 91350 91351 91352 91353 91354 91355 91356 91357 91358 91359 91360 91361 91362 91363 91364 91365 91366 91367 91368 91369 91370 91371 91372 91373 91374 91375 91376 91377 91378 91379 91380 91381 91382 91383 91384 91385 91386 91387 91388 91389 91390 91391 91392 91393 91394 91395 91396 91397 91398 91399 91400 91401 91402 91403 91404 91405 91406 91407 91408 91409 91410 91411 91412 91413 91414 91415 91416 91417 91418 91419 91420 91421 91422 91423 91424 91425 91426 91427 91428 91429 91430 91431 91432 91433 91434 91435 91436 91437 91438 91439 91440 91441 91442 91443 91444 91445 91446 91447 91448 91449 91450 91451 91452 91453 91454 91455 91456 91457 91458 91459 91460 91461 91462 91463 91464 91465 91466 91467 91468 91469 91470 91471 91472 91473 91474 91475 91476 91477 91478 91479 91480 91481 91482 91483 91484 91485 91486 91487 91488 91489 91490 91491 91492 91493 91494 91495 91496 91497 91498 91499 91500 91501 91502 91503 91504 91505 91506 91507 91508 91509 91510 91511 91512 91513 91514 91515 91516 91517 91518 91519 91520 91521 91522 91523 91524 91525 91526 91527 91528 91529 91530 91531 91532 91533 91534 91535 91536 91537 91538 91539 91540 91541 91542 91543 91544 91545 91546 91547 91548 91549 91550 91551 91552 91553 91554 91555 91556 91557 91558 91559 91560 91561 91562 91563 91564 91565 91566 91567 91568 91569 91570 91571 91572 91573 91574 91575 91576 91577 91578 91579 91580 91581 91582 91583 91584 91585 91586 91587 91588 91589 91590 91591 91592 91593 91594 91595 91596 91597 91598 91599 91600 91601 91602 91603 91604 91605 91606 91607 91608 91609 91610 91611 91612 91613 91614 91615 91616 91617 91618 91619 91620 91621 91622 91623 91624 91625 91626 91627 91628 91629 91630 91631 91632 91633 91634 91635 91636 91637 91638 91639 91640 91641 91642 91643 91644 91645 91646 91647 91648 91649 91650 91651 91652 91653 91654 91655 91656 91657 91658 91659 91660 91661 91662 91663 91664 91665 91666 91667 91668 91669 91670 91671 91672 91673 91674 91675 91676 91677 91678 91679 91680 91681 91682 91683 91684 91685 91686 91687 91688 91689 91690 91691 91692 91693 91694 91695 91696 91697 91698 91699 91700 91701 91702 91703 91704 91705 91706 91707 91708 91709 91710 91711 91712 91713 91714 91715 91716 91717 91718 91719 91720 91721 91722 91723 91724 91725 91726 91727 91728 91729 91730 91731 91732 91733 91734 91735 91736 91737 91738 91739 91740 91741 91742 91743 91744 91745 91746 91747 91748 91749 91750 91751 91752 91753 91754 91755 91756 91757 91758 91759 91760 91761 91762 91763 91764 91765 91766 91767 91768 91769 91770 91771 91772 91773 91774 91775 91776 91777 91778 91779 91780 91781 91782 91783 91784 91785 91786 91787 91788 91789 91790 91791 91792 91793 91794 91795 91796 91797 91798 91799 91800 91801 91802 91803 91804 91805 91806 91807 91808 91809 91810 91811 91812 91813 91814 91815 91816 91817 91818 91819 91820 91821 91822 91823 91824 91825 91826 91827 91828 91829 91830 91831 91832 91833 91834 91835 91836 91837 91838 91839 91840 91841 91842 91843 91844 91845 91846 91847 91848 91849 91850 91851 91852 91853 91854 91855 91856 91857 91858 91859 91860 91861 91862 91863 91864 91865 91866 91867 91868 91869 91870 91871 91872 91873 91874 91875 91876 91877 91878 91879 91880 91881 91882 91883 91884 91885 91886 91887 91888 91889 91890 91891 91892 91893 91894 91895 91896 91897 91898 91899 91900 91901 91902 91903 91904 91905 91906 91907 91908 91909 91910 91911 91912 91913 91914 91915 91916 91917 91918 91919 91920 91921 91922 91923 91924 91925 91926 91927 91928 91929 91930 91931 91932 91933 91934 91935 91936 91937 91938 91939 91940 91941 91942 91943 91944 91945 91946 91947 91948 91949 91950 91951 91952 91953 91954 91955 91956 91957 91958 91959 91960 91961 91962 91963 91964 91965 91966 91967 91968 91969 91970 91971 91972 91973 91974 91975 91976 91977 91978 91979 91980 91981 91982 91983 91984 91985 91986 91987 91988 91989 91990 91991 91992 91993 91994 91995 91996 91997 91998 91999 92000 92001 92002 92003 92004 92005 92006 92007 92008 92009 92010 92011 92012 92013 92014 92015 92016 92017 92018 92019 92020 92021 92022 92023 92024 92025 92026 92027 92028 92029 92030 92031 92032 92033 92034 92035 92036 92037 92038 92039 92040 92041 92042 92043 92044 92045 92046 92047 92048 92049 92050 92051 92052 92053 92054 92055 92056 92057 92058 92059 92060 92061 92062 92063 92064 92065 92066 92067 92068 92069 92070 92071 92072 92073 92074 92075 92076 92077 92078 92079 92080 92081 92082 92083 92084 92085 92086 92087 92088 92089 92090 92091 92092 92093 92094 92095 92096 92097 92098 92099 92100 92101 92102 92103 92104 92105 92106 92107 92108 92109 92110 92111 92112 92113 92114 92115 92116 92117 92118 92119 92120 92121 92122 92123 92124 92125 92126 92127 92128 92129 92130 92131 92132 92133 92134 92135 92136 92137 92138 92139 92140 92141 92142 92143 92144 92145 92146 92147 92148 92149 92150 92151 92152 92153 92154 92155 92156 92157 92158 92159 92160 92161 92162 92163 92164 92165 92166 92167 92168 92169 92170 92171 92172 92173 92174 92175 92176 92177 92178 92179 92180 92181 92182 92183 92184 92185 92186 92187 92188 92189 92190 92191 92192 92193 92194 92195 92196 92197 92198 92199 92200 92201 92202 92203 92204 92205 92206 92207 92208 92209 92210 92211 92212 92213 92214 92215 92216 92217 92218 92219 92220 92221 92222 92223 92224 92225 92226 92227 92228 92229 92230 92231 92232 92233 92234 92235 92236 92237 92238 92239 92240 92241 92242 92243 92244 92245 92246 92247 92248 92249 92250 92251 92252 92253 92254 92255 92256 92257 92258 92259 92260 92261 92262 92263 92264 92265 92266 92267 92268 92269 92270 92271 92272 92273 92274 92275 92276 92277 92278 92279 92280 92281 92282 92283 92284 92285 92286 92287 92288 92289 92290 92291 92292 92293 92294 92295 92296 92297 92298 92299 92300 92301 92302 92303 92304 92305 92306 92307 92308 92309 92310 92311 92312 92313 92314 92315 92316 92317 92318 92319 92320 92321 92322 92323 92324 92325 92326 92327 92328 92329 92330 92331 92332 92333 92334 92335 92336 92337 92338 92339 92340 92341 92342 92343 92344 92345 92346 92347 92348 92349 92350 92351 92352 92353 92354 92355 92356 92357 92358 92359 92360 92361 92362 92363 92364 92365 92366 92367 92368 92369 92370 92371 92372 92373 92374 92375 92376 92377 92378 92379 92380 92381 92382 92383 92384 92385 92386 92387 92388 92389 92390 92391 92392 92393 92394 92395 92396 92397 92398 92399 92400 92401 92402 92403 92404 92405 92406 92407 92408 92409 92410 92411 92412 92413 92414 92415 92416 92417 92418 92419 92420 92421 92422 92423 92424 92425 92426 92427 92428 92429 92430 92431 92432 92433 92434 92435 92436 92437 92438 92439 92440 92441 92442 92443 92444 92445 92446 92447 92448 92449 92450 92451 92452 92453 92454 92455 92456 92457 92458 92459 92460 92461 92462 92463 92464 92465 92466 92467 92468 92469 92470 92471 92472 92473 92474 92475 92476 92477 92478 92479 92480 92481 92482 92483 92484 92485 92486 92487 92488 92489 92490 92491 92492 92493 92494 92495 92496 92497 92498 92499 92500 92501 92502 92503 92504 92505 92506 92507 92508 92509 92510 92511 92512 92513 92514 92515 92516 92517 92518 92519 92520 92521 92522 92523 92524 92525 92526 92527 92528 92529 92530 92531 92532 92533 92534 92535 92536 92537 92538 92539 92540 92541 92542 92543 92544 92545 92546 92547 92548 92549 92550 92551 92552 92553 92554 92555 92556 92557 92558 92559 92560 92561 92562 92563 92564 92565 92566 92567 92568 92569 92570 92571 92572 92573 92574 92575 92576 92577 92578 92579 92580 92581 92582 92583 92584 92585 92586 92587 92588 92589 92590 92591 92592 92593 92594 92595 92596 92597 92598 92599 92600 92601 92602 92603 92604 92605 92606 92607 92608 92609 92610 92611 92612 92613 92614 92615 92616 92617 92618 92619 92620 92621 92622 92623 92624 92625 92626 92627 92628 92629 92630 92631 92632 92633 92634 92635 92636 92637 92638 92639 92640 92641 92642 92643 92644 92645 92646 92647 92648 92649 92650 92651 92652 92653 92654 92655 92656 92657 92658 92659 92660 92661 92662 92663 92664 92665 92666 92667 92668 92669 92670 92671 92672 92673 92674 92675 92676 92677 92678 92679 92680 92681 92682 92683 92684 92685 92686 92687 92688 92689 92690 92691 92692 92693 92694 92695 92696 92697 92698 92699 92700 92701 92702 92703 92704 92705 92706 92707 92708 92709 92710 92711 92712 92713 92714 92715 92716 92717 92718 92719 92720 92721 92722 92723 92724 92725 92726 92727 92728 92729 92730 92731 92732 92733 92734 92735 92736 92737 92738 92739 92740 92741 92742 92743 92744 92745 92746 92747 92748 92749 92750 92751 92752 92753 92754 92755 92756 92757 92758 92759 92760 92761 92762 92763 92764 92765 92766 92767 92768 92769 92770 92771 92772 92773 92774 92775 92776 92777 92778 92779 92780 92781 92782 92783 92784 92785 92786 92787 92788 92789 92790 92791 92792 92793 92794 92795 92796 92797 92798 92799 92800 92801 92802 92803 92804 92805 92806 92807 92808 92809 92810 92811 92812 92813 92814 92815 92816 92817 92818 92819 92820 92821 92822 92823 92824 92825 92826 92827 92828 92829 92830 92831 92832 92833 92834 92835 92836 92837 92838 92839 92840 92841 92842 92843 92844 92845 92846 92847 92848 92849 92850 92851 92852 92853 92854 92855 92856 92857 92858 92859 92860 92861 92862 92863 92864 92865 92866 92867 92868 92869 92870 92871 92872 92873 92874 92875 92876 92877 92878 92879 92880 92881 92882 92883 92884 92885 92886 92887 92888 92889 92890 92891 92892 92893 92894 92895 92896 92897 92898 92899 92900 92901 92902 92903 92904 92905 92906 92907 92908 92909 92910 92911 92912 92913 92914 92915 92916 92917 92918 92919 92920 92921 92922 92923 92924 92925 92926 92927 92928 92929 92930 92931 92932 92933 92934 92935 92936 92937 92938 92939 92940 92941 92942 92943 92944 92945 92946 92947 92948 92949 92950 92951 92952 92953 92954 92955 92956 92957 92958 92959 92960 92961 92962 92963 92964 92965 92966 92967 92968 92969 92970 92971 92972 92973 92974 92975 92976 92977 92978 92979 92980 92981 92982 92983 92984 92985 92986 92987 92988 92989 92990 92991 92992 92993 92994 92995 92996 92997 92998 92999 93000 93001 93002 93003 93004 93005 93006 93007 93008 93009 93010 93011 93012 93013 93014 93015 93016 93017 93018 93019 93020 93021 93022 93023 93024 93025 93026 93027 93028 93029 93030 93031 93032 93033 93034 93035 93036 93037 93038 93039 93040 93041 93042 93043 93044 93045 93046 93047 93048 93049 93050 93051 93052 93053 93054 93055 93056 93057 93058 93059 93060 93061 93062 93063 93064 93065 93066 93067 93068 93069 93070 93071 93072 93073 93074 93075 93076 93077 93078 93079 93080 93081 93082 93083 93084 93085 93086 93087 93088 93089 93090 93091 93092 93093 93094 93095 93096 93097 93098 93099 93100 93101 93102 93103 93104 93105 93106 93107 93108 93109 93110 93111 93112 93113 93114 93115 93116 93117 93118 93119 93120 93121 93122 93123 93124 93125 93126 93127 93128 93129 93130 93131 93132 93133 93134 93135 93136 93137 93138 93139 93140 93141 93142 93143 93144 93145 93146 93147 93148 93149 93150 93151 93152 93153 93154 93155 93156 93157 93158 93159 93160 93161 93162 93163 93164 93165 93166 93167 93168 93169 93170 93171 93172 93173 93174 93175 93176 93177 93178 93179 93180 93181 93182 93183 93184 93185 93186 93187 93188 93189 93190 93191 93192 93193 93194 93195 93196 93197 93198 93199 93200 93201 93202 93203 93204 93205 93206 93207 93208 93209 93210 93211 93212 93213 93214 93215 93216 93217 93218 93219 93220 93221 93222 93223 93224 93225 93226 93227 93228 93229 93230 93231 93232 93233 93234 93235 93236 93237 93238 93239 93240 93241 93242 93243 93244 93245 93246 93247 93248 93249 93250 93251 93252 93253 93254 93255 93256 93257 93258 93259 93260 93261 93262 93263 93264 93265 93266 93267 93268 93269 93270 93271 93272 93273 93274 93275 93276 93277 93278 93279 93280 93281 93282 93283 93284 93285 93286 93287 93288 93289 93290 93291 93292 93293 93294 93295 93296 93297 93298 93299 93300 93301 93302 93303 93304 93305 93306 93307 93308 93309 93310 93311 93312 93313 93314 93315 93316 93317 93318 93319 93320 93321 93322 93323 93324 93325 93326 93327 93328 93329 93330 93331 93332 93333 93334 93335 93336 93337 93338 93339 93340 93341 93342 93343 93344 93345 93346 93347 93348 93349 93350 93351 93352 93353 93354 93355 93356 93357 93358 93359 93360 93361 93362 93363 93364 93365 93366 93367 93368 93369 93370 93371 93372 93373 93374 93375 93376 93377 93378 93379 93380 93381 93382 93383 93384 93385 93386 93387 93388 93389 93390 93391 93392 93393 93394 93395 93396 93397 93398 93399 93400 93401 93402 93403 93404 93405 93406 93407 93408 93409 93410 93411 93412 93413 93414 93415 93416 93417 93418 93419 93420 93421 93422 93423 93424 93425 93426 93427 93428 93429 93430 93431 93432 93433 93434 93435 93436 93437 93438 93439 93440 93441 93442 93443 93444 93445 93446 93447 93448 93449 93450 93451 93452 93453 93454 93455 93456 93457 93458 93459 93460 93461 93462 93463 93464 93465 93466 93467 93468 93469 93470 93471 93472 93473 93474 93475 93476 93477 93478 93479 93480 93481 93482 93483 93484 93485 93486 93487 93488 93489 93490 93491 93492 93493 93494 93495 93496 93497 93498 93499 93500 93501 93502 93503 93504 93505 93506 93507 93508 93509 93510 93511 93512 93513 93514 93515 93516 93517 93518 93519 93520 93521 93522 93523 93524 93525 93526 93527 93528 93529 93530 93531 93532 93533 93534 93535 93536 93537 93538 93539 93540 93541 93542 93543 93544 93545 93546 93547 93548 93549 93550 93551 93552 93553 93554 93555 93556 93557 93558 93559 93560 93561 93562 93563 93564 93565 93566 93567 93568 93569 93570 93571 93572 93573 93574 93575 93576 93577 93578 93579 93580 93581 93582 93583 93584 93585 93586 93587 93588 93589 93590 93591 93592 93593 93594 93595 93596 93597 93598 93599 93600 93601 93602 93603 93604 93605 93606 93607 93608 93609 93610 93611 93612 93613 93614 93615 93616 93617 93618 93619 93620 93621 93622 93623 93624 93625 93626 93627 93628 93629 93630 93631 93632 93633 93634 93635 93636 93637 93638 93639 93640 93641 93642 93643 93644 93645 93646 93647 93648 93649 93650 93651 93652 93653 93654 93655 93656 93657 93658 93659 93660 93661 93662 93663 93664 93665 93666 93667 93668 93669 93670 93671 93672 93673 93674 93675 93676 93677 93678 93679 93680 93681 93682 93683 93684 93685 93686 93687 93688 93689 93690 93691 93692 93693 93694 93695 93696 93697 93698 93699 93700 93701 93702 93703 93704 93705 93706 93707 93708 93709 93710 93711 93712 93713 93714 93715 93716 93717 93718 93719 93720 93721 93722 93723 93724 93725 93726 93727 93728 93729 93730 93731 93732 93733 93734 93735 93736 93737 93738 93739 93740 93741 93742 93743 93744 93745 93746 93747 93748 93749 93750 93751 93752 93753 93754 93755 93756 93757 93758 93759 93760 93761 93762 93763 93764 93765 93766 93767 93768 93769 93770 93771 93772 93773 93774 93775 93776 93777 93778 93779 93780 93781 93782 93783 93784 93785 93786 93787 93788 93789 93790 93791 93792 93793 93794 93795 93796 93797 93798 93799 93800 93801 93802 93803 93804 93805 93806 93807 93808 93809 93810 93811 93812 93813 93814 93815 93816 93817 93818 93819 93820 93821 93822 93823 93824 93825 93826 93827 93828 93829 93830 93831 93832 93833 93834 93835 93836 93837 93838 93839 93840 93841 93842 93843 93844 93845 93846 93847 93848 93849 93850 93851 93852 93853 93854 93855 93856 93857 93858 93859 93860 93861 93862 93863 93864 93865 93866 93867 93868 93869 93870 93871 93872 93873 93874 93875 93876 93877 93878 93879 93880 93881 93882 93883 93884 93885 93886 93887 93888 93889 93890 93891 93892 93893 93894 93895 93896 93897 93898 93899 93900 93901 93902 93903 93904 93905 93906 93907 93908 93909 93910 93911 93912 93913 93914 93915 93916 93917 93918 93919 93920 93921 93922 93923 93924 93925 93926 93927 93928 93929 93930 93931 93932 93933 93934 93935 93936 93937 93938 93939 93940 93941 93942 93943 93944 93945 93946 93947 93948 93949 93950 93951 93952 93953 93954 93955 93956 93957 93958 93959 93960 93961 93962 93963 93964 93965 93966 93967 93968 93969 93970 93971 93972 93973 93974 93975 93976 93977 93978 93979 93980 93981 93982 93983 93984 93985 93986 93987 93988 93989 93990 93991 93992 93993 93994 93995 93996 93997 93998 93999 94000 94001 94002 94003 94004 94005 94006 94007 94008 94009 94010 94011 94012 94013 94014 94015 94016 94017 94018 94019 94020 94021 94022 94023 94024 94025 94026 94027 94028 94029 94030 94031 94032 94033 94034 94035 94036 94037 94038 94039 94040 94041 94042 94043 94044 94045 94046 94047 94048 94049 94050 94051 94052 94053 94054 94055 94056 94057 94058 94059 94060 94061 94062 94063 94064 94065 94066 94067 94068 94069 94070 94071 94072 94073 94074 94075 94076 94077 94078 94079 94080 94081 94082 94083 94084 94085 94086 94087 94088 94089 94090 94091 94092 94093 94094 94095 94096 94097 94098 94099 94100 94101 94102 94103 94104 94105 94106 94107 94108 94109 94110 94111 94112 94113 94114 94115 94116 94117 94118 94119 94120 94121 94122 94123 94124 94125 94126 94127 94128 94129 94130 94131 94132 94133 94134 94135 94136 94137 94138 94139 94140 94141 94142 94143 94144 94145 94146 94147 94148 94149 94150 94151 94152 94153 94154 94155 94156 94157 94158 94159 94160 94161 94162 94163 94164 94165 94166 94167 94168 94169 94170 94171 94172 94173 94174 94175 94176 94177 94178 94179 94180 94181 94182 94183 94184 94185 94186 94187 94188 94189 94190 94191 94192 94193 94194 94195 94196 94197 94198 94199 94200 94201 94202 94203 94204 94205 94206 94207 94208 94209 94210 94211 94212 94213 94214 94215 94216 94217 94218 94219 94220 94221 94222 94223 94224 94225 94226 94227 94228 94229 94230 94231 94232 94233 94234 94235 94236 94237 94238 94239 94240 94241 94242 94243 94244 94245 94246 94247 94248 94249 94250 94251 94252 94253 94254 94255 94256 94257 94258 94259 94260 94261 94262 94263 94264 94265 94266 94267 94268 94269 94270 94271 94272 94273 94274 94275 94276 94277 94278 94279 94280 94281 94282 94283 94284 94285 94286 94287 94288 94289 94290 94291 94292 94293 94294 94295 94296 94297 94298 94299 94300 94301 94302 94303 94304 94305 94306 94307 94308 94309 94310 94311 94312 94313 94314 94315 94316 94317 94318 94319 94320 94321 94322 94323 94324 94325 94326 94327 94328 94329 94330 94331 94332 94333 94334 94335 94336 94337 94338 94339 94340 94341 94342 94343 94344 94345 94346 94347 94348 94349 94350 94351 94352 94353 94354 94355 94356 94357 94358 94359 94360 94361 94362 94363 94364 94365 94366 94367 94368 94369 94370 94371 94372 94373 94374 94375 94376 94377 94378 94379 94380 94381 94382 94383 94384 94385 94386 94387 94388 94389 94390 94391 94392 94393 94394 94395 94396 94397 94398 94399 94400 94401 94402 94403 94404 94405 94406 94407 94408 94409 94410 94411 94412 94413 94414 94415 94416 94417 94418 94419 94420 94421 94422 94423 94424 94425 94426 94427 94428 94429 94430 94431 94432 94433 94434 94435 94436 94437 94438 94439 94440 94441 94442 94443 94444 94445 94446 94447 94448 94449 94450 94451 94452 94453 94454 94455 94456 94457 94458 94459 94460 94461 94462 94463 94464 94465 94466 94467 94468 94469 94470 94471 94472 94473 94474 94475 94476 94477 94478 94479 94480 94481 94482 94483 94484 94485 94486 94487 94488 94489 94490 94491 94492 94493 94494 94495 94496 94497 94498 94499 94500 94501 94502 94503 94504 94505 94506 94507 94508 94509 94510 94511 94512 94513 94514 94515 94516 94517 94518 94519 94520 94521 94522 94523 94524 94525 94526 94527 94528 94529 94530 94531 94532 94533 94534 94535 94536 94537 94538 94539 94540 94541 94542 94543 94544 94545 94546 94547 94548 94549 94550 94551 94552 94553 94554 94555 94556 94557 94558 94559 94560 94561 94562 94563 94564 94565 94566 94567 94568 94569 94570 94571 94572 94573 94574 94575 94576 94577 94578 94579 94580 94581 94582 94583 94584 94585 94586 94587 94588 94589 94590 94591 94592 94593 94594 94595 94596 94597 94598 94599 94600 94601 94602 94603 94604 94605 94606 94607 94608 94609 94610 94611 94612 94613 94614 94615 94616 94617 94618 94619 94620 94621 94622 94623 94624 94625 94626 94627 94628 94629 94630 94631 94632 94633 94634 94635 94636 94637 94638 94639 94640 94641 94642 94643 94644 94645 94646 94647 94648 94649 94650 94651 94652 94653 94654 94655 94656 94657 94658 94659 94660 94661 94662 94663 94664 94665 94666 94667 94668 94669 94670 94671 94672 94673 94674 94675 94676 94677 94678 94679 94680 94681 94682 94683 94684 94685 94686 94687 94688 94689 94690 94691 94692 94693 94694 94695 94696 94697 94698 94699 94700 94701 94702 94703 94704 94705 94706 94707 94708 94709 94710 94711 94712 94713 94714 94715 94716 94717 94718 94719 94720 94721 94722 94723 94724 94725 94726 94727 94728 94729 94730 94731 94732 94733 94734 94735 94736 94737 94738 94739 94740 94741 94742 94743 94744 94745 94746 94747 94748 94749 94750 94751 94752 94753 94754 94755 94756 94757 94758 94759 94760 94761 94762 94763 94764 94765 94766 94767 94768 94769 94770 94771 94772 94773 94774 94775 94776 94777 94778 94779 94780 94781 94782 94783 94784 94785 94786 94787 94788 94789 94790 94791 94792 94793 94794 94795 94796 94797 94798 94799 94800 94801 94802 94803 94804 94805 94806 94807 94808 94809 94810 94811 94812 94813 94814 94815 94816 94817 94818 94819 94820 94821 94822 94823 94824 94825 94826 94827 94828 94829 94830 94831 94832 94833 94834 94835 94836 94837 94838 94839 94840 94841 94842 94843 94844 94845 94846 94847 94848 94849 94850 94851 94852 94853 94854 94855 94856 94857 94858 94859 94860 94861 94862 94863 94864 94865 94866 94867 94868 94869 94870 94871 94872 94873 94874 94875 94876 94877 94878 94879 94880 94881 94882 94883 94884 94885 94886 94887 94888 94889 94890 94891 94892 94893 94894 94895 94896 94897 94898 94899 94900 94901 94902 94903 94904 94905 94906 94907 94908 94909 94910 94911 94912 94913 94914 94915 94916 94917 94918 94919 94920 94921 94922 94923 94924 94925 94926 94927 94928 94929 94930 94931 94932 94933 94934 94935 94936 94937 94938 94939 94940 94941 94942 94943 94944 94945 94946 94947 94948 94949 94950 94951 94952 94953 94954 94955 94956 94957 94958 94959 94960 94961 94962 94963 94964 94965 94966 94967 94968 94969 94970 94971 94972 94973 94974 94975 94976 94977 94978 94979 94980 94981 94982 94983 94984 94985 94986 94987 94988 94989 94990 94991 94992 94993 94994 94995 94996 94997 94998 94999 95000 95001 95002 95003 95004 95005 95006 95007 95008 95009 95010 95011 95012 95013 95014 95015 95016 95017 95018 95019 95020 95021 95022 95023 95024 95025 95026 95027 95028 95029 95030 95031 95032 95033 95034 95035 95036 95037 95038 95039 95040 95041 95042 95043 95044 95045 95046 95047 95048 95049 95050 95051 95052 95053 95054 95055 95056 95057 95058 95059 95060 95061 95062 95063 95064 95065 95066 95067 95068 95069 95070 95071 95072 95073 95074 95075 95076 95077 95078 95079 95080 95081 95082 95083 95084 95085 95086 95087 95088 95089 95090 95091 95092 95093 95094 95095 95096 95097 95098 95099 95100 95101 95102 95103 95104 95105 95106 95107 95108 95109 95110 95111 95112 95113 95114 95115 95116 95117 95118 95119 95120 95121 95122 95123 95124 95125 95126 95127 95128 95129 95130 95131 95132 95133 95134 95135 95136 95137 95138 95139 95140 95141 95142 95143 95144 95145 95146 95147 95148 95149 95150 95151 95152 95153 95154 95155 95156 95157 95158 95159 95160 95161 95162 95163 95164 95165 95166 95167 95168 95169 95170 95171 95172 95173 95174 95175 95176 95177 95178 95179 95180 95181 95182 95183 95184 95185 95186 95187 95188 95189 95190 95191 95192 95193 95194 95195 95196 95197 95198 95199 95200 95201 95202 95203 95204 95205 95206 95207 95208 95209 95210 95211 95212 95213 95214 95215 95216 95217 95218 95219 95220 95221 95222 95223 95224 95225 95226 95227 95228 95229 95230 95231 95232 95233 95234 95235 95236 95237 95238 95239 95240 95241 95242 95243 95244 95245 95246 95247 95248 95249 95250 95251 95252 95253 95254 95255 95256 95257 95258 95259 95260 95261 95262 95263 95264 95265 95266 95267 95268 95269 95270 95271 95272 95273 95274 95275 95276 95277 95278 95279 95280 95281 95282 95283 95284 95285 95286 95287 95288 95289 95290 95291 95292 95293 95294 95295 95296 95297 95298 95299 95300 95301 95302 95303 95304 95305 95306 95307 95308 95309 95310 95311 95312 95313 95314 95315 95316 95317 95318 95319 95320 95321 95322 95323 95324 95325 95326 95327 95328 95329 95330 95331 95332 95333 95334 95335 95336 95337 95338 95339 95340 95341 95342 95343 95344 95345 95346 95347 95348 95349 95350 95351 95352 95353 95354 95355 95356 95357 95358 95359 95360 95361 95362 95363 95364 95365 95366 95367 95368 95369 95370 95371 95372 95373 95374 95375 95376 95377 95378 95379 95380 95381 95382 95383 95384 95385 95386 95387 95388 95389 95390 95391 95392 95393 95394 95395 95396 95397 95398 95399 95400 95401 95402 95403 95404 95405 95406 95407 95408 95409 95410 95411 95412 95413 95414 95415 95416 95417 95418 95419 95420 95421 95422 95423 95424 95425 95426 95427 95428 95429 95430 95431 95432 95433 95434 95435 95436 95437 95438 95439 95440 95441 95442 95443 95444 95445 95446 95447 95448 95449 95450 95451 95452 95453 95454 95455 95456 95457 95458 95459 95460 95461 95462 95463 95464 95465 95466 95467 95468 95469 95470 95471 95472 95473 95474 95475 95476 95477 95478 95479 95480 95481 95482 95483 95484 95485 95486 95487 95488 95489 95490 95491 95492 95493 95494 95495 95496 95497 95498 95499 95500 95501 95502 95503 95504 95505 95506 95507 95508 95509 95510 95511 95512 95513 95514 95515 95516 95517 95518 95519 95520 95521 95522 95523 95524 95525 95526 95527 95528 95529 95530 95531 95532 95533 95534 95535 95536 95537 95538 95539 95540 95541 95542 95543 95544 95545 95546 95547 95548 95549 95550 95551 95552 95553 95554 95555 95556 95557 95558 95559 95560 95561 95562 95563 95564 95565 95566 95567 95568 95569 95570 95571 95572 95573 95574 95575 95576 95577 95578 95579 95580 95581 95582 95583 95584 95585 95586 95587 95588 95589 95590 95591 95592 95593 95594 95595 95596 95597 95598 95599 95600 95601 95602 95603 95604 95605 95606 95607 95608 95609 95610 95611 95612 95613 95614 95615 95616 95617 95618 95619 95620 95621 95622 95623 95624 95625 95626 95627 95628 95629 95630 95631 95632 95633 95634 95635 95636 95637 95638 95639 95640 95641 95642 95643 95644 95645 95646 95647 95648 95649 95650 95651 95652 95653 95654 95655 95656 95657 95658 95659 95660 95661 95662 95663 95664 95665 95666 95667 95668 95669 95670 95671 95672 95673 95674 95675 95676 95677 95678 95679 95680 95681 95682 95683 95684 95685 95686 95687 95688 95689 95690 95691 95692 95693 95694 95695 95696 95697 95698 95699 95700 95701 95702 95703 95704 95705 95706 95707 95708 95709 95710 95711 95712 95713 95714 95715 95716 95717 95718 95719 95720 95721 95722 95723 95724 95725 95726 95727 95728 95729 95730 95731 95732 95733 95734 95735 95736 95737 95738 95739 95740 95741 95742 95743 95744 95745 95746 95747 95748 95749 95750 95751 95752 95753 95754 95755 95756 95757 95758 95759 95760 95761 95762 95763 95764 95765 95766 95767 95768 95769 95770 95771 95772 95773 95774 95775 95776 95777 95778 95779 95780 95781 95782 95783 95784 95785 95786 95787 95788 95789 95790 95791 95792 95793 95794 95795 95796 95797 95798 95799 95800 95801 95802 95803 95804 95805 95806 95807 95808 95809 95810 95811 95812 95813 95814 95815 95816 95817 95818 95819 95820 95821 95822 95823 95824 95825 95826 95827 95828 95829 95830 95831 95832 95833 95834 95835 95836 95837 95838 95839 95840 95841 95842 95843 95844 95845 95846 95847 95848 95849 95850 95851 95852 95853 95854 95855 95856 95857 95858 95859 95860 95861 95862 95863 95864 95865 95866 95867 95868 95869 95870 95871 95872 95873 95874 95875 95876 95877 95878 95879 95880 95881 95882 95883 95884 95885 95886 95887 95888 95889 95890 95891 95892 95893 95894 95895 95896 95897 95898 95899 95900 95901 95902 95903 95904 95905 95906 95907 95908 95909 95910 95911 95912 95913 95914 95915 95916 95917 95918 95919 95920 95921 95922 95923 95924 95925 95926 95927 95928 95929 95930 95931 95932 95933 95934 95935 95936 95937 95938 95939 95940 95941 95942 95943 95944 95945 95946 95947 95948 95949 95950 95951 95952 95953 95954 95955 95956 95957 95958 95959 95960 95961 95962 95963 95964 95965 95966 95967 95968 95969 95970 95971 95972 95973 95974 95975 95976 95977 95978 95979 95980 95981 95982 95983 95984 95985 95986 95987 95988 95989 95990 95991 95992 95993 95994 95995 95996 95997 95998 95999 96000 96001 96002 96003 96004 96005 96006 96007 96008 96009 96010 96011 96012 96013 96014 96015 96016 96017 96018 96019 96020 96021 96022 96023 96024 96025 96026 96027 96028 96029 96030 96031 96032 96033 96034 96035 96036 96037 96038 96039 96040 96041 96042 96043 96044 96045 96046 96047 96048 96049 96050 96051 96052 96053 96054 96055 96056 96057 96058 96059 96060 96061 96062 96063 96064 96065 96066 96067 96068 96069 96070 96071 96072 96073 96074 96075 96076 96077 96078 96079 96080 96081 96082 96083 96084 96085 96086 96087 96088 96089 96090 96091 96092 96093 96094 96095 96096 96097 96098 96099 96100 96101 96102 96103 96104 96105 96106 96107 96108 96109 96110 96111 96112 96113 96114 96115 96116 96117 96118 96119 96120 96121 96122 96123 96124 96125 96126 96127 96128 96129 96130 96131 96132 96133 96134 96135 96136 96137 96138 96139 96140 96141 96142 96143 96144 96145 96146 96147 96148 96149 96150 96151 96152 96153 96154 96155 96156 96157 96158 96159 96160 96161 96162 96163 96164 96165 96166 96167 96168 96169 96170 96171 96172 96173 96174 96175 96176 96177 96178 96179 96180 96181 96182 96183 96184 96185 96186 96187 96188 96189 96190 96191 96192 96193 96194 96195 96196 96197 96198 96199 96200 96201 96202 96203 96204 96205 96206 96207 96208 96209 96210 96211 96212 96213 96214 96215 96216 96217 96218 96219 96220 96221 96222 96223 96224 96225 96226 96227 96228 96229 96230 96231 96232 96233 96234 96235 96236 96237 96238 96239 96240 96241 96242 96243 96244 96245 96246 96247 96248 96249 96250 96251 96252 96253 96254 96255 96256 96257 96258 96259 96260 96261 96262 96263 96264 96265 96266 96267 96268 96269 96270 96271 96272 96273 96274 96275 96276 96277 96278 96279 96280 96281 96282 96283 96284 96285 96286 96287 96288 96289 96290 96291 96292 96293 96294 96295 96296 96297 96298 96299 96300 96301 96302 96303 96304 96305 96306 96307 96308 96309 96310 96311 96312 96313 96314 96315 96316 96317 96318 96319 96320 96321 96322 96323 96324 96325 96326 96327 96328 96329 96330 96331 96332 96333 96334 96335 96336 96337 96338 96339 96340 96341 96342 96343 96344 96345 96346 96347 96348 96349 96350 96351 96352 96353 96354 96355 96356 96357 96358 96359 96360 96361 96362 96363 96364 96365 96366 96367 96368 96369 96370 96371 96372 96373 96374 96375 96376 96377 96378 96379 96380 96381 96382 96383 96384 96385 96386 96387 96388 96389 96390 96391 96392 96393 96394 96395 96396 96397 96398 96399 96400 96401 96402 96403 96404 96405 96406 96407 96408 96409 96410 96411 96412 96413 96414 96415 96416 96417 96418 96419 96420 96421 96422 96423 96424 96425 96426 96427 96428 96429 96430 96431 96432 96433 96434 96435 96436 96437 96438 96439 96440 96441 96442 96443 96444 96445 96446 96447 96448 96449 96450 96451 96452 96453 96454 96455 96456 96457 96458 96459 96460 96461 96462 96463 96464 96465 96466 96467 96468 96469 96470 96471 96472 96473 96474 96475 96476 96477 96478 96479 96480 96481 96482 96483 96484 96485 96486 96487 96488 96489 96490 96491 96492 96493 96494 96495 96496 96497 96498 96499 96500 96501 96502 96503 96504 96505 96506 96507 96508 96509 96510 96511 96512 96513 96514 96515 96516 96517 96518 96519 96520 96521 96522 96523 96524 96525 96526 96527 96528 96529 96530 96531 96532 96533 96534 96535 96536 96537 96538 96539 96540 96541 96542 96543 96544 96545 96546 96547 96548 96549 96550 96551 96552 96553 96554 96555 96556 96557 96558 96559 96560 96561 96562 96563 96564 96565 96566 96567 96568 96569 96570 96571 96572 96573 96574 96575 96576 96577 96578 96579 96580 96581 96582 96583 96584 96585 96586 96587 96588 96589 96590 96591 96592 96593 96594 96595 96596 96597 96598 96599 96600 96601 96602 96603 96604 96605 96606 96607 96608 96609 96610 96611 96612 96613 96614 96615 96616 96617 96618 96619 96620 96621 96622 96623 96624 96625 96626 96627 96628 96629 96630 96631 96632 96633 96634 96635 96636 96637 96638 96639 96640 96641 96642 96643 96644 96645 96646 96647 96648 96649 96650 96651 96652 96653 96654 96655 96656 96657 96658 96659 96660 96661 96662 96663 96664 96665 96666 96667 96668 96669 96670 96671 96672 96673 96674 96675 96676 96677 96678 96679 96680 96681 96682 96683 96684 96685 96686 96687 96688 96689 96690 96691 96692 96693 96694 96695 96696 96697 96698 96699 96700 96701 96702 96703 96704 96705 96706 96707 96708 96709 96710 96711 96712 96713 96714 96715 96716 96717 96718 96719 96720 96721 96722 96723 96724 96725 96726 96727 96728 96729 96730 96731 96732 96733 96734 96735 96736 96737 96738 96739 96740 96741 96742 96743 96744 96745 96746 96747 96748 96749 96750 96751 96752 96753 96754 96755 96756 96757 96758 96759 96760 96761 96762 96763 96764 96765 96766 96767 96768 96769 96770 96771 96772 96773 96774 96775 96776 96777 96778 96779 96780 96781 96782 96783 96784 96785 96786 96787 96788 96789 96790 96791 96792 96793 96794 96795 96796 96797 96798 96799 96800 96801 96802 96803 96804 96805 96806 96807 96808 96809 96810 96811 96812 96813 96814 96815 96816 96817 96818 96819 96820 96821 96822 96823 96824 96825 96826 96827 96828 96829 96830 96831 96832 96833 96834 96835 96836 96837 96838 96839 96840 96841 96842 96843 96844 96845 96846 96847 96848 96849 96850 96851 96852 96853 96854 96855 96856 96857 96858 96859 96860 96861 96862 96863 96864 96865 96866 96867 96868 96869 96870 96871 96872 96873 96874 96875 96876 96877 96878 96879 96880 96881 96882 96883 96884 96885 96886 96887 96888 96889 96890 96891 96892 96893 96894 96895 96896 96897 96898 96899 96900 96901 96902 96903 96904 96905 96906 96907 96908 96909 96910 96911 96912 96913 96914 96915 96916 96917 96918 96919 96920 96921 96922 96923 96924 96925 96926 96927 96928 96929 96930 96931 96932 96933 96934 96935 96936 96937 96938 96939 96940 96941 96942 96943 96944 96945 96946 96947 96948 96949 96950 96951 96952 96953 96954 96955 96956 96957 96958 96959 96960 96961 96962 96963 96964 96965 96966 96967 96968 96969 96970 96971 96972 96973 96974 96975 96976 96977 96978 96979 96980 96981 96982 96983 96984 96985 96986 96987 96988 96989 96990 96991 96992 96993 96994 96995 96996 96997 96998 96999 97000 97001 97002 97003 97004 97005 97006 97007 97008 97009 97010 97011 97012 97013 97014 97015 97016 97017 97018 97019 97020 97021 97022 97023 97024 97025 97026 97027 97028 97029 97030 97031 97032 97033 97034 97035 97036 97037 97038 97039 97040 97041 97042 97043 97044 97045 97046 97047 97048 97049 97050 97051 97052 97053 97054 97055 97056 97057 97058 97059 97060 97061 97062 97063 97064 97065 97066 97067 97068 97069 97070 97071 97072 97073 97074 97075 97076 97077 97078 97079 97080 97081 97082 97083 97084 97085 97086 97087 97088 97089 97090 97091 97092 97093 97094 97095 97096 97097 97098 97099 97100 97101 97102 97103 97104 97105 97106 97107 97108 97109 97110 97111 97112 97113 97114 97115 97116 97117 97118 97119 97120 97121 97122 97123 97124 97125 97126 97127 97128 97129 97130 97131 97132 97133 97134 97135 97136 97137 97138 97139 97140 97141 97142 97143 97144 97145 97146 97147 97148 97149 97150 97151 97152 97153 97154 97155 97156 97157 97158 97159 97160 97161 97162 97163 97164 97165 97166 97167 97168 97169 97170 97171 97172 97173 97174 97175 97176 97177 97178 97179 97180 97181 97182 97183 97184 97185 97186 97187 97188 97189 97190 97191 97192 97193 97194 97195 97196 97197 97198 97199 97200 97201 97202 97203 97204 97205 97206 97207 97208 97209 97210 97211 97212 97213 97214 97215 97216 97217 97218 97219 97220 97221 97222 97223 97224 97225 97226 97227 97228 97229 97230 97231 97232 97233 97234 97235 97236 97237 97238 97239 97240 97241 97242 97243 97244 97245 97246 97247 97248 97249 97250 97251 97252 97253 97254 97255 97256 97257 97258 97259 97260 97261 97262 97263 97264 97265 97266 97267 97268 97269 97270 97271 97272 97273 97274 97275 97276 97277 97278 97279 97280 97281 97282 97283 97284 97285 97286 97287 97288 97289 97290 97291 97292 97293 97294 97295 97296 97297 97298 97299 97300 97301 97302 97303 97304 97305 97306 97307 97308 97309 97310 97311 97312 97313 97314 97315 97316 97317 97318 97319 97320 97321 97322 97323 97324 97325 97326 97327 97328 97329 97330 97331 97332 97333 97334 97335 97336 97337 97338 97339 97340 97341 97342 97343 97344 97345 97346 97347 97348 97349 97350 97351 97352 97353 97354 97355 97356 97357 97358 97359 97360 97361 97362 97363 97364 97365 97366 97367 97368 97369 97370 97371 97372 97373 97374 97375 97376 97377 97378 97379 97380 97381 97382 97383 97384 97385 97386 97387 97388 97389 97390 97391 97392 97393 97394 97395 97396 97397 97398 97399 97400 97401 97402 97403 97404 97405 97406 97407 97408 97409 97410 97411 97412 97413 97414 97415 97416 97417 97418 97419 97420 97421 97422 97423 97424 97425 97426 97427 97428 97429 97430 97431 97432 97433 97434 97435 97436 97437 97438 97439 97440 97441 97442 97443 97444 97445 97446 97447 97448 97449 97450 97451 97452 97453 97454 97455 97456 97457 97458 97459 97460 97461 97462 97463 97464 97465 97466 97467 97468 97469 97470 97471 97472 97473 97474 97475 97476 97477 97478 97479 97480 97481 97482 97483 97484 97485 97486 97487 97488 97489 97490 97491 97492 97493 97494 97495 97496 97497 97498 97499 97500 97501 97502 97503 97504 97505 97506 97507 97508 97509 97510 97511 97512 97513 97514 97515 97516 97517 97518 97519 97520 97521 97522 97523 97524 97525 97526 97527 97528 97529 97530 97531 97532 97533 97534 97535 97536 97537 97538 97539 97540 97541 97542 97543 97544 97545 97546 97547 97548 97549 97550 97551 97552 97553 97554 97555 97556 97557 97558 97559 97560 97561 97562 97563 97564 97565 97566 97567 97568 97569 97570 97571 97572 97573 97574 97575 97576 97577 97578 97579 97580 97581 97582 97583 97584 97585 97586 97587 97588 97589 97590 97591 97592 97593 97594 97595 97596 97597 97598 97599 97600 97601 97602 97603 97604 97605 97606 97607 97608 97609 97610 97611 97612 97613 97614 97615 97616 97617 97618 97619 97620 97621 97622 97623 97624 97625 97626 97627 97628 97629 97630 97631 97632 97633 97634 97635 97636 97637 97638 97639 97640 97641 97642 97643 97644 97645 97646 97647 97648 97649 97650 97651 97652 97653 97654 97655 97656 97657 97658 97659 97660 97661 97662 97663 97664 97665 97666 97667 97668 97669 97670 97671 97672 97673 97674 97675 97676 97677 97678 97679 97680 97681 97682 97683 97684 97685 97686 97687 97688 97689 97690 97691 97692 97693 97694 97695 97696 97697 97698 97699 97700 97701 97702 97703 97704 97705 97706 97707 97708 97709 97710 97711 97712 97713 97714 97715 97716 97717 97718 97719 97720 97721 97722 97723 97724 97725 97726 97727 97728 97729 97730 97731 97732 97733 97734 97735 97736 97737 97738 97739 97740 97741 97742 97743 97744 97745 97746 97747 97748 97749 97750 97751 97752 97753 97754 97755 97756 97757 97758 97759 97760 97761 97762 97763 97764 97765 97766 97767 97768 97769 97770 97771 97772 97773 97774 97775 97776 97777 97778 97779 97780 97781 97782 97783 97784 97785 97786 97787 97788 97789 97790 97791 97792 97793 97794 97795 97796 97797 97798 97799 97800 97801 97802 97803 97804 97805 97806 97807 97808 97809 97810 97811 97812 97813 97814 97815 97816 97817 97818 97819 97820 97821 97822 97823 97824 97825 97826 97827 97828 97829 97830 97831 97832 97833 97834 97835 97836 97837 97838 97839 97840 97841 97842 97843 97844 97845 97846 97847 97848 97849 97850 97851 97852 97853 97854 97855 97856 97857 97858 97859 97860 97861 97862 97863 97864 97865 97866 97867 97868 97869 97870 97871 97872 97873 97874 97875 97876 97877 97878 97879 97880 97881 97882 97883 97884 97885 97886 97887 97888 97889 97890 97891 97892 97893 97894 97895 97896 97897 97898 97899 97900 97901 97902 97903 97904 97905 97906 97907 97908 97909 97910 97911 97912 97913 97914 97915 97916 97917 97918 97919 97920 97921 97922 97923 97924 97925 97926 97927 97928 97929 97930 97931 97932 97933 97934 97935 97936 97937 97938 97939 97940 97941 97942 97943 97944 97945 97946 97947 97948 97949 97950 97951 97952 97953 97954 97955 97956 97957 97958 97959 97960 97961 97962 97963 97964 97965 97966 97967 97968 97969 97970 97971 97972 97973 97974 97975 97976 97977 97978 97979 97980 97981 97982 97983 97984 97985 97986 97987 97988 97989 97990 97991 97992 97993 97994 97995 97996 97997 97998 97999 98000 98001 98002 98003 98004 98005 98006 98007 98008 98009 98010 98011 98012 98013 98014 98015 98016 98017 98018 98019 98020 98021 98022 98023 98024 98025 98026 98027 98028 98029 98030 98031 98032 98033 98034 98035 98036 98037 98038 98039 98040 98041 98042 98043 98044 98045 98046 98047 98048 98049 98050 98051 98052 98053 98054 98055 98056 98057 98058 98059 98060 98061 98062 98063 98064 98065 98066 98067 98068 98069 98070 98071 98072 98073 98074 98075 98076 98077 98078 98079 98080 98081 98082 98083 98084 98085 98086 98087 98088 98089 98090 98091 98092 98093 98094 98095 98096 98097 98098 98099 98100 98101 98102 98103 98104 98105 98106 98107 98108 98109 98110 98111 98112 98113 98114 98115 98116 98117 98118 98119 98120 98121 98122 98123 98124 98125 98126 98127 98128 98129 98130 98131 98132 98133 98134 98135 98136 98137 98138 98139 98140 98141 98142 98143 98144 98145 98146 98147 98148 98149 98150 98151 98152 98153 98154 98155 98156 98157 98158 98159 98160 98161 98162 98163 98164 98165 98166 98167 98168 98169 98170 98171 98172 98173 98174 98175 98176 98177 98178 98179 98180 98181 98182 98183 98184 98185 98186 98187 98188 98189 98190 98191 98192 98193 98194 98195 98196 98197 98198 98199 98200 98201 98202 98203 98204 98205 98206 98207 98208 98209 98210 98211 98212 98213 98214 98215 98216 98217 98218 98219 98220 98221 98222 98223 98224 98225 98226 98227 98228 98229 98230 98231 98232 98233 98234 98235 98236 98237 98238 98239 98240 98241 98242 98243 98244 98245 98246 98247 98248 98249 98250 98251 98252 98253 98254 98255 98256 98257 98258 98259 98260 98261 98262 98263 98264 98265 98266 98267 98268 98269 98270 98271 98272 98273 98274 98275 98276 98277 98278 98279 98280 98281 98282 98283 98284 98285 98286 98287 98288 98289 98290 98291 98292 98293 98294 98295 98296 98297 98298 98299 98300 98301 98302 98303 98304 98305 98306 98307 98308 98309 98310 98311 98312 98313 98314 98315 98316 98317 98318 98319 98320 98321 98322 98323 98324 98325 98326 98327 98328 98329 98330 98331 98332 98333 98334 98335 98336 98337 98338 98339 98340 98341 98342 98343 98344 98345 98346 98347 98348 98349 98350 98351 98352 98353 98354 98355 98356 98357 98358 98359 98360 98361 98362 98363 98364 98365 98366 98367 98368 98369 98370 98371 98372 98373 98374 98375 98376 98377 98378 98379 98380 98381 98382 98383 98384 98385 98386 98387 98388 98389 98390 98391 98392 98393 98394 98395 98396 98397 98398 98399 98400 98401 98402 98403 98404 98405 98406 98407 98408 98409 98410 98411 98412 98413 98414 98415 98416 98417 98418 98419 98420 98421 98422 98423 98424 98425 98426 98427 98428 98429 98430 98431 98432 98433 98434 98435 98436 98437 98438 98439 98440 98441 98442 98443 98444 98445 98446 98447 98448 98449 98450 98451 98452 98453 98454 98455 98456 98457 98458 98459 98460 98461 98462 98463 98464 98465 98466 98467 98468 98469 98470 98471 98472 98473 98474 98475 98476 98477 98478 98479 98480 98481 98482 98483 98484 98485 98486 98487 98488 98489 98490 98491 98492 98493 98494 98495 98496 98497 98498 98499 98500 98501 98502 98503 98504 98505 98506 98507 98508 98509 98510 98511 98512 98513 98514 98515 98516 98517 98518 98519 98520 98521 98522 98523 98524 98525 98526 98527 98528 98529 98530 98531 98532 98533 98534 98535 98536 98537 98538 98539 98540 98541 98542 98543 98544 98545 98546 98547 98548 98549 98550 98551 98552 98553 98554 98555 98556 98557 98558 98559 98560 98561 98562 98563 98564 98565 98566 98567 98568 98569 98570 98571 98572 98573 98574 98575 98576 98577 98578 98579 98580 98581 98582 98583 98584 98585 98586 98587 98588 98589 98590 98591 98592 98593 98594 98595 98596 98597 98598 98599 98600 98601 98602 98603 98604 98605 98606 98607 98608 98609 98610 98611 98612 98613 98614 98615 98616 98617 98618 98619 98620 98621 98622 98623 98624 98625 98626 98627 98628 98629 98630 98631 98632 98633 98634 98635 98636 98637 98638 98639 98640 98641 98642 98643 98644 98645 98646 98647 98648 98649 98650 98651 98652 98653 98654 98655 98656 98657 98658 98659 98660 98661 98662 98663 98664 98665 98666 98667 98668 98669 98670 98671 98672 98673 98674 98675 98676 98677 98678 98679 98680 98681 98682 98683 98684 98685 98686 98687 98688 98689 98690 98691 98692 98693 98694 98695 98696 98697 98698 98699 98700 98701 98702 98703 98704 98705 98706 98707 98708 98709 98710 98711 98712 98713 98714 98715 98716 98717 98718 98719 98720 98721 98722 98723 98724 98725 98726 98727 98728 98729 98730 98731 98732 98733 98734 98735 98736 98737 98738 98739 98740 98741 98742 98743 98744 98745 98746 98747 98748 98749 98750 98751 98752 98753 98754 98755 98756 98757 98758 98759 98760 98761 98762 98763 98764 98765 98766 98767 98768 98769 98770 98771 98772 98773 98774 98775 98776 98777 98778 98779 98780 98781 98782 98783 98784 98785 98786 98787 98788 98789 98790 98791 98792 98793 98794 98795 98796 98797 98798 98799 98800 98801 98802 98803 98804 98805 98806 98807 98808 98809 98810 98811 98812 98813 98814 98815 98816 98817 98818 98819 98820 98821 98822 98823 98824 98825 98826 98827 98828 98829 98830 98831 98832 98833 98834 98835 98836 98837 98838 98839 98840 98841 98842 98843 98844 98845 98846 98847 98848 98849 98850 98851 98852 98853 98854 98855 98856 98857 98858 98859 98860 98861 98862 98863 98864 98865 98866 98867 98868 98869 98870 98871 98872 98873 98874 98875 98876 98877 98878 98879 98880 98881 98882 98883 98884 98885 98886 98887 98888 98889 98890 98891 98892 98893 98894 98895 98896 98897 98898 98899 98900 98901 98902 98903 98904 98905 98906 98907 98908 98909 98910 98911 98912 98913 98914 98915 98916 98917 98918 98919 98920 98921 98922 98923 98924 98925 98926 98927 98928 98929 98930 98931 98932 98933 98934 98935 98936 98937 98938 98939 98940 98941 98942 98943 98944 98945 98946 98947 98948 98949 98950 98951 98952 98953 98954 98955 98956 98957 98958 98959 98960 98961 98962 98963 98964 98965 98966 98967 98968 98969 98970 98971 98972 98973 98974 98975 98976 98977 98978 98979 98980 98981 98982 98983 98984 98985 98986 98987 98988 98989 98990 98991 98992 98993 98994 98995 98996 98997 98998 98999 99000 99001 99002 99003 99004 99005 99006 99007 99008 99009 99010 99011 99012 99013 99014 99015 99016 99017 99018 99019 99020 99021 99022 99023 99024 99025 99026 99027 99028 99029 99030 99031 99032 99033 99034 99035 99036 99037 99038 99039 99040 99041 99042 99043 99044 99045 99046 99047 99048 99049 99050 99051 99052 99053 99054 99055 99056 99057 99058 99059 99060 99061 99062 99063 99064 99065 99066 99067 99068 99069 99070 99071 99072 99073 99074 99075 99076 99077 99078 99079 99080 99081 99082 99083 99084 99085 99086 99087 99088 99089 99090 99091 99092 99093 99094 99095 99096 99097 99098 99099 99100 99101 99102 99103 99104 99105 99106 99107 99108 99109 99110 99111 99112 99113 99114 99115 99116 99117 99118 99119 99120 99121 99122 99123 99124 99125 99126 99127 99128 99129 99130 99131 99132 99133 99134 99135 99136 99137 99138 99139 99140 99141 99142 99143 99144 99145 99146 99147 99148 99149 99150 99151 99152 99153 99154 99155 99156 99157 99158 99159 99160 99161 99162 99163 99164 99165 99166 99167 99168 99169 99170 99171 99172 99173 99174 99175 99176 99177 99178 99179 99180 99181 99182 99183 99184 99185 99186 99187 99188 99189 99190 99191 99192 99193 99194 99195 99196 99197 99198 99199 99200 99201 99202 99203 99204 99205 99206 99207 99208 99209 99210 99211 99212 99213 99214 99215 99216 99217 99218 99219 99220 99221 99222 99223 99224 99225 99226 99227 99228 99229 99230 99231 99232 99233 99234 99235 99236 99237 99238 99239 99240 99241 99242 99243 99244 99245 99246 99247 99248 99249 99250 99251 99252 99253 99254 99255 99256 99257 99258 99259 99260 99261 99262 99263 99264 99265 99266 99267 99268 99269 99270 99271 99272 99273 99274 99275 99276 99277 99278 99279 99280 99281 99282 99283 99284 99285 99286 99287 99288 99289 99290 99291 99292 99293 99294 99295 99296 99297 99298 99299 99300 99301 99302 99303 99304 99305 99306 99307 99308 99309 99310 99311 99312 99313 99314 99315 99316 99317 99318 99319 99320 99321 99322 99323 99324 99325 99326 99327 99328 99329 99330 99331 99332 99333 99334 99335 99336 99337 99338 99339 99340 99341 99342 99343 99344 99345 99346 99347 99348 99349 99350 99351 99352 99353 99354 99355 99356 99357 99358 99359 99360 99361 99362 99363 99364 99365 99366 99367 99368 99369 99370 99371 99372 99373 99374 99375 99376 99377 99378 99379 99380 99381 99382 99383 99384 99385 99386 99387 99388 99389 99390 99391 99392 99393 99394 99395 99396 99397 99398 99399 99400 99401 99402 99403 99404 99405 99406 99407 99408 99409 99410 99411 99412 99413 99414 99415 99416 99417 99418 99419 99420 99421 99422 99423 99424 99425 99426 99427 99428 99429 99430 99431 99432 99433 99434 99435 99436 99437 99438 99439 99440 99441 99442 99443 99444 99445 99446 99447 99448 99449 99450 99451 99452 99453 99454 99455 99456 99457 99458 99459 99460 99461 99462 99463 99464 99465 99466 99467 99468 99469 99470 99471 99472 99473 99474 99475 99476 99477 99478 99479 99480 99481 99482 99483 99484 99485 99486 99487 99488 99489 99490 99491 99492 99493 99494 99495 99496 99497 99498 99499 99500 99501 99502 99503 99504 99505 99506 99507 99508 99509 99510 99511 99512 99513 99514 99515 99516 99517 99518 99519 99520 99521 99522 99523 99524 99525 99526 99527 99528 99529 99530 99531 99532 99533 99534 99535 99536 99537 99538 99539 99540 99541 99542 99543 99544 99545 99546 99547 99548 99549 99550 99551 99552 99553 99554 99555 99556 99557 99558 99559 99560 99561 99562 99563 99564 99565 99566 99567 99568 99569 99570 99571 99572 99573 99574 99575 99576 99577 99578 99579 99580 99581 99582 99583 99584 99585 99586 99587 99588 99589 99590 99591 99592 99593 99594 99595 99596 99597 99598 99599 99600 99601 99602 99603 99604 99605 99606 99607 99608 99609 99610 99611 99612 99613 99614 99615 99616 99617 99618 99619 99620 99621 99622 99623 99624 99625 99626 99627 99628 99629 99630 99631 99632 99633 99634 99635 99636 99637 99638 99639 99640 99641 99642 99643 99644 99645 99646 99647 99648 99649 99650 99651 99652 99653 99654 99655 99656 99657 99658 99659 99660 99661 99662 99663 99664 99665 99666 99667 99668 99669 99670 99671 99672 99673 99674 99675 99676 99677 99678 99679 99680 99681 99682 99683 99684 99685 99686 99687 99688 99689 99690 99691 99692 99693 99694 99695 99696 99697 99698 99699 99700 99701 99702 99703 99704 99705 99706 99707 99708 99709 99710 99711 99712 99713 99714 99715 99716 99717 99718 99719 99720 99721 99722 99723 99724 99725 99726 99727 99728 99729 99730 99731 99732 99733 99734 99735 99736 99737 99738 99739 99740 99741 99742 99743 99744 99745 99746 99747 99748 99749 99750 99751 99752 99753 99754 99755 99756 99757 99758 99759 99760 99761 99762 99763 99764 99765 99766 99767 99768 99769 99770 99771 99772 99773 99774 99775 99776 99777 99778 99779 99780 99781 99782 99783 99784 99785 99786 99787 99788 99789 99790 99791 99792 99793 99794 99795 99796 99797 99798 99799 99800 99801 99802 99803 99804 99805 99806 99807 99808 99809 99810 99811 99812 99813 99814 99815 99816 99817 99818 99819 99820 99821 99822 99823 99824 99825 99826 99827 99828 99829 99830 99831 99832 99833 99834 99835 99836 99837 99838 99839 99840 99841 99842 99843 99844 99845 99846 99847 99848 99849 99850 99851 99852 99853 99854 99855 99856 99857 99858 99859 99860 99861 99862 99863 99864 99865 99866 99867 99868 99869 99870 99871 99872 99873 99874 99875 99876 99877 99878 99879 99880 99881 99882 99883 99884 99885 99886 99887 99888 99889 99890 99891 99892 99893 99894 99895 99896 99897 99898 99899 99900 99901 99902 99903 99904 99905 99906 99907 99908 99909 99910 99911 99912 99913 99914 99915 99916 99917 99918 99919 99920 99921 99922 99923 99924 99925 99926 99927 99928 99929 99930 99931 99932 99933 99934 99935 99936 99937 99938 99939 99940 99941 99942 99943 99944 99945 99946 99947 99948 99949 99950 99951 99952 99953 99954 99955 99956 99957 99958 99959 99960 99961 99962 99963 99964 99965 99966 99967 99968 99969 99970 99971 99972 99973 99974 99975 99976 99977 99978 99979 99980 99981 99982 99983 99984 99985 99986 99987 99988 99989 99990 99991 99992 99993 99994 99995 99996 99997 99998 99999 100000 100001 100002 100003 100004 100005 100006 100007 100008 100009 100010 100011 100012 100013 100014 100015 100016 100017 100018 100019 100020 100021 100022 100023 100024 100025 100026 100027 100028 100029 100030 100031 100032 100033 100034 100035 100036 100037 100038 100039 100040 100041 100042 100043 100044 100045 100046 100047 100048 100049 100050 100051 100052 100053 100054 100055 100056 100057 100058 100059 100060 100061 100062 100063 100064 100065 100066 100067 100068 100069 100070 100071 100072 100073 100074 100075 100076 100077 100078 100079 100080 100081 100082 100083 100084 100085 100086 100087 100088 100089 100090 100091 100092 100093 100094 100095 100096 100097 100098 100099 100100 100101 100102 100103 100104 100105 100106 100107 100108 100109 100110 100111 100112 100113 100114 100115 100116 100117 100118 100119 100120 100121 100122 100123 100124 100125 100126 100127 100128 100129 100130 100131 100132 100133 100134 100135 100136 100137 100138 100139 100140 100141 100142 100143 100144 100145 100146 100147 100148 100149 100150 100151 100152 100153 100154 100155 100156 100157 100158 100159 100160 100161 100162 100163 100164 100165 100166 100167 100168 100169 100170 100171 100172 100173 100174 100175 100176 100177 100178 100179 100180 100181 100182 100183 100184 100185 100186 100187 100188 100189 100190 100191 100192 100193 100194 100195 100196 100197 100198 100199 100200 100201 100202 100203 100204 100205 100206 100207 100208 100209 100210 100211 100212 100213 100214 100215 100216 100217 100218 100219 100220 100221 100222 100223 100224 100225 100226 100227 100228 100229 100230 100231 100232 100233 100234 100235 100236 100237 100238 100239 100240 100241 100242 100243 100244 100245 100246 100247 100248 100249 100250 100251 100252 100253 100254 100255 100256 100257 100258 100259 100260 100261 100262 100263 100264 100265 100266 100267 100268 100269 100270 100271 100272 100273 100274 100275 100276 100277 100278 100279 100280 100281 100282 100283 100284 100285 100286 100287 100288 100289 100290 100291 100292 100293 100294 100295 100296 100297 100298 100299 100300 100301 100302 100303 100304 100305 100306 100307 100308 100309 100310 100311 100312 100313 100314 100315 100316 100317 100318 100319 100320 100321 100322 100323 100324 100325 100326 100327 100328 100329 100330 100331 100332 100333 100334 100335 100336 100337 100338 100339 100340 100341 100342 100343 100344 100345 100346 100347 100348 100349 100350 100351 100352 100353 100354 100355 100356 100357 100358 100359 100360 100361 100362 100363 100364 100365 100366 100367 100368 100369 100370 100371 100372 100373 100374 100375 100376 100377 100378 100379 100380 100381 100382 100383 100384 100385 100386 100387 100388 100389 100390 100391 100392 100393 100394 100395 100396 100397 100398 100399 100400 100401 100402 100403 100404 100405 100406 100407 100408 100409 100410 100411 100412 100413 100414 100415 100416 100417 100418 100419 100420 100421 100422 100423 100424 100425 100426 100427 100428 100429 100430 100431 100432 100433 100434 100435 100436 100437 100438 100439 100440 100441 100442 100443 100444 100445 100446 100447 100448 100449 100450 100451 100452 100453 100454 100455 100456 100457 100458 100459 100460 100461 100462 100463 100464 100465 100466 100467 100468 100469 100470 100471 100472 100473 100474 100475 100476 100477 100478 100479 100480 100481 100482 100483 100484 100485 100486 100487 100488 100489 100490 100491 100492 100493 100494 100495 100496 100497 100498 100499 100500 100501 100502 100503 100504 100505 100506 100507 100508 100509 100510 100511 100512 100513 100514 100515 100516 100517 100518 100519 100520 100521 100522 100523 100524 100525 100526 100527 100528 100529 100530 100531 100532 100533 100534 100535 100536 100537 100538 100539 100540 100541 100542 100543 100544 100545 100546 100547 100548 100549 100550 100551 100552 100553 100554 100555 100556 100557 100558 100559 100560 100561 100562 100563 100564 100565 100566 100567 100568 100569 100570 100571 100572 100573 100574 100575 100576 100577 100578 100579 100580 100581 100582 100583 100584 100585 100586 100587 100588 100589 100590 100591 100592 100593 100594 100595 100596 100597 100598 100599 100600 100601 100602 100603 100604 100605 100606 100607 100608 100609 100610 100611 100612 100613 100614 100615 100616 100617 100618 100619 100620 100621 100622 100623 100624 100625 100626 100627 100628 100629 100630 100631 100632 100633 100634 100635 100636 100637 100638 100639 100640 100641 100642 100643 100644 100645 100646 100647 100648 100649 100650 100651 100652 100653 100654 100655 100656 100657 100658 100659 100660 100661 100662 100663 100664 100665 100666 100667 100668 100669 100670 100671 100672 100673 100674 100675 100676 100677 100678 100679 100680 100681 100682 100683 100684 100685 100686 100687 100688 100689 100690 100691 100692 100693 100694 100695 100696 100697 100698 100699 100700 100701 100702 100703 100704 100705 100706 100707 100708 100709 100710 100711 100712 100713 100714 100715 100716 100717 100718 100719 100720 100721 100722 100723 100724 100725 100726 100727 100728 100729 100730 100731 100732 100733 100734 100735 100736 100737 100738 100739 100740 100741 100742 100743 100744 100745 100746 100747 100748 100749 100750 100751 100752 100753 100754 100755 100756 100757 100758 100759 100760 100761 100762 100763 100764 100765 100766 100767 100768 100769 100770 100771 100772 100773 100774 100775 100776 100777 100778 100779 100780 100781 100782 100783 100784 100785 100786 100787 100788 100789 100790 100791 100792 100793 100794 100795 100796 100797 100798 100799 100800 100801 100802 100803 100804 100805 100806 100807 100808 100809 100810 100811 100812 100813 100814 100815 100816 100817 100818 100819 100820 100821 100822 100823 100824 100825 100826 100827 100828 100829 100830 100831 100832 100833 100834 100835 100836 100837 100838 100839 100840 100841 100842 100843 100844 100845 100846 100847 100848 100849 100850 100851 100852 100853 100854 100855 100856 100857 100858 100859 100860 100861 100862 100863 100864 100865 100866 100867 100868 100869 100870 100871 100872 100873 100874 100875 100876 100877 100878 100879 100880 100881 100882 100883 100884 100885 100886 100887 100888 100889 100890 100891 100892 100893 100894 100895 100896 100897 100898 100899 100900 100901 100902 100903 100904 100905 100906 100907 100908 100909 100910 100911 100912 100913 100914 100915 100916 100917 100918 100919 100920 100921 100922 100923 100924 100925 100926 100927 100928 100929 100930 100931 100932 100933 100934 100935 100936 100937 100938 100939 100940 100941 100942 100943 100944 100945 100946 100947 100948 100949 100950 100951 100952 100953 100954 100955 100956 100957 100958 100959 100960 100961 100962 100963 100964 100965 100966 100967 100968 100969 100970 100971 100972 100973 100974 100975 100976 100977 100978 100979 100980 100981 100982 100983 100984 100985 100986 100987 100988 100989 100990 100991 100992 100993 100994 100995 100996 100997 100998 100999 101000 101001 101002 101003 101004 101005 101006 101007 101008 101009 101010 101011 101012 101013 101014 101015 101016 101017 101018 101019 101020 101021 101022 101023 101024 101025 101026 101027 101028 101029 101030 101031 101032 101033 101034 101035 101036 101037 101038 101039 101040 101041 101042 101043 101044 101045 101046 101047 101048 101049 101050 101051 101052 101053 101054 101055 101056 101057 101058 101059 101060 101061 101062 101063 101064 101065 101066 101067 101068 101069 101070 101071 101072 101073 101074 101075 101076 101077 101078 101079 101080 101081 101082 101083 101084 101085 101086 101087 101088 101089 101090 101091 101092 101093 101094 101095 101096 101097 101098 101099 101100 101101 101102 101103 101104 101105 101106 101107 101108 101109 101110 101111 101112 101113 101114 101115 101116 101117 101118 101119 101120 101121 101122 101123 101124 101125 101126 101127 101128 101129 101130 101131 101132 101133 101134 101135 101136 101137 101138 101139 101140 101141 101142 101143 101144 101145 101146 101147 101148 101149 101150 101151 101152 101153 101154 101155 101156 101157 101158 101159 101160 101161 101162 101163 101164 101165 101166 101167 101168 101169 101170 101171 101172 101173 101174 101175 101176 101177 101178 101179 101180 101181 101182 101183 101184 101185 101186 101187 101188 101189 101190 101191 101192 101193 101194 101195 101196 101197 101198 101199 101200 101201 101202 101203 101204 101205 101206 101207 101208 101209 101210 101211 101212 101213 101214 101215 101216 101217 101218 101219 101220 101221 101222 101223 101224 101225 101226 101227 101228 101229 101230 101231 101232 101233 101234 101235 101236 101237 101238 101239 101240 101241 101242 101243 101244 101245 101246 101247 101248 101249 101250 101251 101252 101253 101254 101255 101256 101257 101258 101259 101260 101261 101262 101263 101264 101265 101266 101267 101268 101269 101270 101271 101272 101273 101274 101275 101276 101277 101278 101279 101280 101281 101282 101283 101284 101285 101286 101287 101288 101289 101290 101291 101292 101293 101294 101295 101296 101297 101298 101299 101300 101301 101302 101303 101304 101305 101306 101307 101308 101309 101310 101311 101312 101313 101314 101315 101316 101317 101318 101319 101320 101321 101322 101323 101324 101325 101326 101327 101328 101329 101330 101331 101332 101333 101334 101335 101336 101337 101338 101339 101340 101341 101342 101343 101344 101345 101346 101347 101348 101349 101350 101351 101352 101353 101354 101355 101356 101357 101358 101359 101360 101361 101362 101363 101364 101365 101366 101367 101368 101369 101370 101371 101372 101373 101374 101375 101376 101377 101378 101379 101380 101381 101382 101383 101384 101385 101386 101387 101388 101389 101390 101391 101392 101393 101394 101395 101396 101397 101398 101399 101400 101401 101402 101403 101404 101405 101406 101407 101408 101409 101410 101411 101412 101413 101414 101415 101416 101417 101418 101419 101420 101421 101422 101423 101424 101425 101426 101427 101428 101429 101430 101431 101432 101433 101434 101435 101436 101437 101438 101439 101440 101441 101442 101443 101444 101445 101446 101447 101448 101449 101450 101451 101452 101453 101454 101455 101456 101457 101458 101459 101460 101461 101462 101463 101464 101465 101466 101467 101468 101469 101470 101471 101472 101473 101474 101475 101476 101477 101478 101479 101480 101481 101482 101483 101484 101485 101486 101487 101488 101489 101490 101491 101492 101493 101494 101495 101496 101497 101498 101499 101500 101501 101502 101503 101504 101505 101506 101507 101508 101509 101510 101511 101512 101513 101514 101515 101516 101517 101518 101519 101520 101521 101522 101523 101524 101525 101526 101527 101528 101529 101530 101531 101532 101533 101534 101535 101536 101537 101538 101539 101540 101541 101542 101543 101544 101545 101546 101547 101548 101549 101550 101551 101552 101553 101554 101555 101556 101557 101558 101559 101560 101561 101562 101563 101564 101565 101566 101567 101568 101569 101570 101571 101572 101573 101574 101575 101576 101577 101578 101579 101580 101581 101582 101583 101584 101585 101586 101587 101588 101589 101590 101591 101592 101593 101594 101595 101596 101597 101598 101599 101600 101601 101602 101603 101604 101605 101606 101607 101608 101609 101610 101611 101612 101613 101614 101615 101616 101617 101618 101619 101620 101621 101622 101623 101624 101625 101626 101627 101628 101629 101630 101631 101632 101633 101634 101635 101636 101637 101638 101639 101640 101641 101642 101643 101644 101645 101646 101647 101648 101649 101650 101651 101652 101653 101654 101655 101656 101657 101658 101659 101660 101661 101662 101663 101664 101665 101666 101667 101668 101669 101670 101671 101672 101673 101674 101675 101676 101677 101678 101679 101680 101681 101682 101683 101684 101685 101686 101687 101688 101689 101690 101691 101692 101693 101694 101695 101696 101697 101698 101699 101700 101701 101702 101703 101704 101705 101706 101707 101708 101709 101710 101711 101712 101713 101714 101715 101716 101717 101718 101719 101720 101721 101722 101723 101724 101725 101726 101727 101728 101729 101730 101731 101732 101733 101734 101735 101736 101737 101738 101739 101740 101741 101742 101743 101744 101745 101746 101747 101748 101749 101750 101751 101752 101753 101754 101755 101756 101757 101758 101759 101760 101761 101762 101763 101764 101765 101766 101767 101768 101769 101770 101771 101772 101773 101774 101775 101776 101777 101778 101779 101780 101781 101782 101783 101784 101785 101786 101787 101788 101789 101790 101791 101792 101793 101794 101795 101796 101797 101798 101799 101800 101801 101802 101803 101804 101805 101806 101807 101808 101809 101810 101811 101812 101813 101814 101815 101816 101817 101818 101819 101820 101821 101822 101823 101824 101825 101826 101827 101828 101829 101830 101831 101832 101833 101834 101835 101836 101837 101838 101839 101840 101841 101842 101843 101844 101845 101846 101847 101848 101849 101850 101851 101852 101853 101854 101855 101856 101857 101858 101859 101860 101861 101862 101863 101864 101865 101866 101867 101868 101869 101870 101871 101872 101873 101874 101875 101876 101877 101878 101879 101880 101881 101882 101883 101884 101885 101886 101887 101888 101889 101890 101891 101892 101893 101894 101895 101896 101897 101898 101899 101900 101901 101902 101903 101904 101905 101906 101907 101908 101909 101910 101911 101912 101913 101914 101915 101916 101917 101918 101919 101920 101921 101922 101923 101924 101925 101926 101927 101928 101929 101930 101931 101932 101933 101934 101935 101936 101937 101938 101939 101940 101941 101942 101943 101944 101945 101946 101947 101948 101949 101950 101951 101952 101953 101954 101955 101956 101957 101958 101959 101960 101961 101962 101963 101964 101965 101966 101967 101968 101969 101970 101971 101972 101973 101974 101975 101976 101977 101978 101979 101980 101981 101982 101983 101984 101985 101986 101987 101988 101989 101990 101991 101992 101993 101994 101995 101996 101997 101998 101999 102000 102001 102002 102003 102004 102005 102006 102007 102008 102009 102010 102011 102012 102013 102014 102015 102016 102017 102018 102019 102020 102021 102022 102023 102024 102025 102026 102027 102028 102029 102030 102031 102032 102033 102034 102035 102036 102037 102038 102039 102040 102041 102042 102043 102044 102045 102046 102047 102048 102049 102050 102051 102052 102053 102054 102055 102056 102057 102058 102059 102060 102061 102062 102063 102064 102065 102066 102067 102068 102069 102070 102071 102072 102073 102074 102075 102076 102077 102078 102079 102080 102081 102082 102083 102084 102085 102086 102087 102088 102089 102090 102091 102092 102093 102094 102095 102096 102097 102098 102099 102100 102101 102102 102103 102104 102105 102106 102107 102108 102109 102110 102111 102112 102113 102114 102115 102116 102117 102118 102119 102120 102121 102122 102123 102124 102125 102126 102127 102128 102129 102130 102131 102132 102133 102134 102135 102136 102137 102138 102139 102140 102141 102142 102143 102144 102145 102146 102147 102148 102149 102150 102151 102152 102153 102154 102155 102156 102157 102158 102159 102160 102161 102162 102163 102164 102165 102166 102167 102168 102169 102170 102171 102172 102173 102174 102175 102176 102177 102178 102179 102180 102181 102182 102183 102184 102185 102186 102187 102188 102189 102190 102191 102192 102193 102194 102195 102196 102197 102198 102199 102200 102201 102202 102203 102204 102205 102206 102207 102208 102209 102210 102211 102212 102213 102214 102215 102216 102217 102218 102219 102220 102221 102222 102223 102224 102225 102226 102227 102228 102229 102230 102231 102232 102233 102234 102235 102236 102237 102238 102239 102240 102241 102242 102243 102244 102245 102246 102247 102248 102249 102250 102251 102252 102253 102254 102255 102256 102257 102258 102259 102260 102261 102262 102263 102264 102265 102266 102267 102268 102269 102270 102271 102272 102273 102274 102275 102276 102277 102278 102279 102280 102281 102282 102283 102284 102285 102286 102287 102288 102289 102290 102291 102292 102293 102294 102295 102296 102297 102298 102299 102300 102301 102302 102303 102304 102305 102306 102307 102308 102309 102310 102311 102312 102313 102314 102315 102316 102317 102318 102319 102320 102321 102322 102323 102324 102325 102326 102327 102328 102329 102330 102331 102332 102333 102334 102335 102336 102337 102338 102339 102340 102341 102342 102343 102344 102345 102346 102347 102348 102349 102350 102351 102352 102353 102354 102355 102356 102357 102358 102359 102360 102361 102362 102363 102364 102365 102366 102367 102368 102369 102370 102371 102372 102373 102374 102375 102376 102377 102378 102379 102380 102381 102382 102383 102384 102385 102386 102387 102388 102389 102390 102391 102392 102393 102394 102395 102396 102397 102398 102399 102400 102401 102402 102403 102404 102405 102406 102407 102408 102409 102410 102411 102412 102413 102414 102415 102416 102417 102418 102419 102420 102421 102422 102423 102424 102425 102426 102427 102428 102429 102430 102431 102432 102433 102434 102435 102436 102437 102438 102439 102440 102441 102442 102443 102444 102445 102446 102447 102448 102449 102450 102451 102452 102453 102454 102455 102456 102457 102458 102459 102460 102461 102462 102463 102464 102465 102466 102467 102468 102469 102470 102471 102472 102473 102474 102475 102476 102477 102478 102479 102480 102481 102482 102483 102484 102485 102486 102487 102488 102489 102490 102491 102492 102493 102494 102495 102496 102497 102498 102499 102500 102501 102502 102503 102504 102505 102506 102507 102508 102509 102510 102511 102512 102513 102514 102515 102516 102517 102518 102519 102520 102521 102522 102523 102524 102525 102526 102527 102528 102529 102530 102531 102532 102533 102534 102535 102536 102537 102538 102539 102540 102541 102542 102543 102544 102545 102546 102547 102548 102549 102550 102551 102552 102553 102554 102555 102556 102557 102558 102559 102560 102561 102562 102563 102564 102565 102566 102567 102568 102569 102570 102571 102572 102573 102574 102575 102576 102577 102578 102579 102580 102581 102582 102583 102584 102585 102586 102587 102588 102589 102590 102591 102592 102593 102594 102595 102596 102597 102598 102599 102600 102601 102602 102603 102604 102605 102606 102607 102608 102609 102610 102611 102612 102613 102614 102615 102616 102617 102618 102619 102620 102621 102622 102623 102624 102625 102626 102627 102628 102629 102630 102631 102632 102633 102634 102635 102636 102637 102638 102639 102640 102641 102642 102643 102644 102645 102646 102647 102648 102649 102650 102651 102652 102653 102654 102655 102656 102657 102658 102659 102660 102661 102662 102663 102664 102665 102666 102667 102668 102669 102670 102671 102672 102673 102674 102675 102676 102677 102678 102679 102680 102681 102682 102683 102684 102685 102686 102687 102688 102689 102690 102691 102692 102693 102694 102695 102696 102697 102698 102699 102700 102701 102702 102703 102704 102705 102706 102707 102708 102709 102710 102711 102712 102713 102714 102715 102716 102717 102718 102719 102720 102721 102722 102723 102724 102725 102726 102727 102728 102729 102730 102731 102732 102733 102734 102735 102736 102737 102738 102739 102740 102741 102742 102743 102744 102745 102746 102747 102748 102749 102750 102751 102752 102753 102754 102755 102756 102757 102758 102759 102760 102761 102762 102763 102764 102765 102766 102767 102768 102769 102770 102771 102772 102773 102774 102775 102776 102777 102778 102779 102780 102781 102782 102783 102784 102785 102786 102787 102788 102789 102790 102791 102792 102793 102794 102795 102796 102797 102798 102799 102800 102801 102802 102803 102804 102805 102806 102807 102808 102809 102810 102811 102812 102813 102814 102815 102816 102817 102818 102819 102820 102821 102822 102823 102824 102825 102826 102827 102828 102829 102830 102831 102832 102833 102834 102835 102836 102837 102838 102839 102840 102841 102842 102843 102844 102845 102846 102847 102848 102849 102850 102851 102852 102853 102854 102855 102856 102857 102858 102859 102860 102861 102862 102863 102864 102865 102866 102867 102868 102869 102870 102871 102872 102873 102874 102875 102876 102877 102878 102879 102880 102881 102882 102883 102884 102885 102886 102887 102888 102889 102890 102891 102892 102893 102894 102895 102896 102897 102898 102899 102900 102901 102902 102903 102904 102905 102906 102907 102908 102909 102910 102911 102912 102913 102914 102915 102916 102917 102918 102919 102920 102921 102922 102923 102924 102925 102926 102927 102928 102929 102930 102931 102932 102933 102934 102935 102936 102937 102938 102939 102940 102941 102942 102943 102944 102945 102946 102947 102948 102949 102950 102951 102952 102953 102954 102955 102956 102957 102958 102959 102960 102961 102962 102963 102964 102965 102966 102967 102968 102969 102970 102971 102972 102973 102974 102975 102976 102977 102978 102979 102980 102981 102982 102983 102984 102985 102986 102987 102988 102989 102990 102991 102992 102993 102994 102995 102996 102997 102998 102999 103000 103001 103002 103003 103004 103005 103006 103007 103008 103009 103010 103011 103012 103013 103014 103015 103016 103017 103018 103019 103020 103021 103022 103023 103024 103025 103026 103027 103028 103029 103030 103031 103032 103033 103034 103035 103036 103037 103038 103039 103040 103041 103042 103043 103044 103045 103046 103047 103048 103049 103050 103051 103052 103053 103054 103055 103056 103057 103058 103059 103060 103061 103062 103063 103064 103065 103066 103067 103068 103069 103070 103071 103072 103073 103074 103075 103076 103077 103078 103079 103080 103081 103082 103083 103084 103085 103086 103087 103088 103089 103090 103091 103092 103093 103094 103095 103096 103097 103098 103099 103100 103101 103102 103103 103104 103105 103106 103107 103108 103109 103110 103111 103112 103113 103114 103115 103116 103117 103118 103119 103120 103121 103122 103123 103124 103125 103126 103127 103128 103129 103130 103131 103132 103133 103134 103135 103136 103137 103138 103139 103140 103141 103142 103143 103144 103145 103146 103147 103148 103149 103150 103151 103152 103153 103154 103155 103156 103157 103158 103159 103160 103161 103162 103163 103164 103165 103166 103167 103168 103169 103170 103171 103172 103173 103174 103175 103176 103177 103178 103179 103180 103181 103182 103183 103184 103185 103186 103187 103188 103189 103190 103191 103192 103193 103194 103195 103196 103197 103198 103199 103200 103201 103202 103203 103204 103205 103206 103207 103208 103209 103210 103211 103212 103213 103214 103215 103216 103217 103218 103219 103220 103221 103222 103223 103224 103225 103226 103227 103228 103229 103230 103231 103232 103233 103234 103235 103236 103237 103238 103239 103240 103241 103242 103243 103244 103245 103246 103247 103248 103249 103250 103251 103252 103253 103254 103255 103256 103257 103258 103259 103260 103261 103262 103263 103264 103265 103266 103267 103268 103269 103270 103271 103272 103273 103274 103275 103276 103277 103278 103279 103280 103281 103282 103283 103284 103285 103286 103287 103288 103289 103290 103291 103292 103293 103294 103295 103296 103297 103298 103299 103300 103301 103302 103303 103304 103305 103306 103307 103308 103309 103310 103311 103312 103313 103314 103315 103316 103317 103318 103319 103320 103321 103322 103323 103324 103325 103326 103327 103328 103329 103330 103331 103332 103333 103334 103335 103336 103337 103338 103339 103340 103341 103342 103343 103344 103345 103346 103347 103348 103349 103350 103351 103352 103353 103354 103355 103356 103357 103358 103359 103360 103361 103362 103363 103364 103365 103366 103367 103368 103369 103370 103371 103372 103373 103374 103375 103376 103377 103378 103379 103380 103381 103382 103383 103384 103385 103386 103387 103388 103389 103390 103391 103392 103393 103394 103395 103396 103397 103398 103399 103400 103401 103402 103403 103404 103405 103406 103407 103408 103409 103410 103411 103412 103413 103414 103415 103416 103417 103418 103419 103420 103421 103422 103423 103424 103425 103426 103427 103428 103429 103430 103431 103432 103433 103434 103435 103436 103437 103438 103439 103440 103441 103442 103443 103444 103445 103446 103447 103448 103449 103450 103451 103452 103453 103454 103455 103456 103457 103458 103459 103460 103461 103462 103463 103464 103465 103466 103467 103468 103469 103470 103471 103472 103473 103474 103475 103476 103477 103478 103479 103480 103481 103482 103483 103484 103485 103486 103487 103488 103489 103490 103491 103492 103493 103494 103495 103496 103497 103498 103499 103500 103501 103502 103503 103504 103505 103506 103507 103508 103509 103510 103511 103512 103513 103514 103515 103516 103517 103518 103519 103520 103521 103522 103523 103524 103525 103526 103527 103528 103529 103530 103531 103532 103533 103534 103535 103536 103537 103538 103539 103540 103541 103542 103543 103544 103545 103546 103547 103548 103549 103550 103551 103552 103553 103554 103555 103556 103557 103558 103559 103560 103561 103562 103563 103564 103565 103566 103567 103568 103569 103570 103571 103572 103573 103574 103575 103576 103577 103578 103579 103580 103581 103582 103583 103584 103585 103586 103587 103588 103589 103590 103591 103592 103593 103594 103595 103596 103597 103598 103599 103600 103601 103602 103603 103604 103605 103606 103607 103608 103609 103610 103611 103612 103613 103614 103615 103616 103617 103618 103619 103620 103621 103622 103623 103624 103625 103626 103627 103628 103629 103630 103631 103632 103633 103634 103635 103636 103637 103638 103639 103640 103641 103642 103643 103644 103645 103646 103647 103648 103649 103650 103651 103652 103653 103654 103655 103656 103657 103658 103659 103660 103661 103662 103663 103664 103665 103666 103667 103668 103669 103670 103671 103672 103673 103674 103675 103676 103677 103678 103679 103680 103681 103682 103683 103684 103685 103686 103687 103688 103689 103690 103691 103692 103693 103694 103695 103696 103697 103698 103699 103700 103701 103702 103703 103704 103705 103706 103707 103708 103709 103710 103711 103712 103713 103714 103715 103716 103717 103718 103719 103720 103721 103722 103723 103724 103725 103726 103727 103728 103729 103730 103731 103732 103733 103734 103735 103736 103737 103738 103739 103740 103741 103742 103743 103744 103745 103746 103747 103748 103749 103750 103751 103752 103753 103754 103755 103756 103757 103758 103759 103760 103761 103762 103763 103764 103765 103766 103767 103768 103769 103770 103771 103772 103773 103774 103775 103776 103777 103778 103779 103780 103781 103782 103783 103784 103785 103786 103787 103788 103789 103790 103791 103792 103793 103794 103795 103796 103797 103798 103799 103800 103801 103802 103803 103804 103805 103806 103807 103808 103809 103810 103811 103812 103813 103814 103815 103816 103817 103818 103819 103820 103821 103822 103823 103824 103825 103826 103827 103828 103829 103830 103831 103832 103833 103834 103835 103836 103837 103838 103839 103840 103841 103842 103843 103844 103845 103846 103847 103848 103849 103850 103851 103852 103853 103854 103855 103856 103857 103858 103859 103860 103861 103862 103863 103864 103865 103866 103867 103868 103869 103870 103871 103872 103873 103874 103875 103876 103877 103878 103879 103880 103881 103882 103883 103884 103885 103886 103887 103888 103889 103890 103891 103892 103893 103894 103895 103896 103897 103898 103899 103900 103901 103902 103903 103904 103905 103906 103907 103908 103909 103910 103911 103912 103913 103914 103915 103916 103917 103918 103919 103920 103921 103922 103923 103924 103925 103926 103927 103928 103929 103930 103931 103932 103933 103934 103935 103936 103937 103938 103939 103940 103941 103942 103943 103944 103945 103946 103947 103948 103949 103950 103951 103952 103953 103954 103955 103956 103957 103958 103959 103960 103961 103962 103963 103964 103965 103966 103967 103968 103969 103970 103971 103972 103973 103974 103975 103976 103977 103978 103979 103980 103981 103982 103983 103984 103985 103986 103987 103988 103989 103990 103991 103992 103993 103994 103995 103996 103997 103998 103999 104000 104001 104002 104003 104004 104005 104006 104007 104008 104009 104010 104011 104012 104013 104014 104015 104016 104017 104018 104019 104020 104021 104022 104023 104024 104025 104026 104027 104028 104029 104030 104031 104032 104033 104034 104035 104036 104037 104038 104039 104040 104041 104042 104043 104044 104045 104046 104047 104048 104049 104050 104051 104052 104053 104054 104055 104056 104057 104058 104059 104060 104061 104062 104063 104064 104065 104066 104067 104068 104069 104070 104071 104072 104073 104074 104075 104076 104077 104078 104079 104080 104081 104082 104083 104084 104085 104086 104087 104088 104089 104090 104091 104092 104093 104094 104095 104096 104097 104098 104099 104100 104101 104102 104103 104104 104105 104106 104107 104108 104109 104110 104111 104112 104113 104114 104115 104116 104117 104118 104119 104120 104121 104122 104123 104124 104125 104126 104127 104128 104129 104130 104131 104132 104133 104134 104135 104136 104137 104138 104139 104140 104141 104142 104143 104144 104145 104146 104147 104148 104149 104150 104151 104152 104153 104154 104155 104156 104157 104158 104159 104160 104161 104162 104163 104164 104165 104166 104167 104168 104169 104170 104171 104172 104173 104174 104175 104176 104177 104178 104179 104180 104181 104182 104183 104184 104185 104186 104187 104188 104189 104190 104191 104192 104193 104194 104195 104196 104197 104198 104199 104200 104201 104202 104203 104204 104205 104206 104207 104208 104209 104210 104211 104212 104213 104214 104215 104216 104217 104218 104219 104220 104221 104222 104223 104224 104225 104226 104227 104228 104229 104230 104231 104232 104233 104234 104235 104236 104237 104238 104239 104240 104241 104242 104243 104244 104245 104246 104247 104248 104249 104250 104251 104252 104253 104254 104255 104256 104257 104258 104259 104260 104261 104262 104263 104264 104265 104266 104267 104268 104269 104270 104271 104272 104273 104274 104275 104276 104277 104278 104279 104280 104281 104282 104283 104284 104285 104286 104287 104288 104289 104290 104291 104292 104293 104294 104295 104296 104297 104298 104299 104300 104301 104302 104303 104304 104305 104306 104307 104308 104309 104310 104311 104312 104313 104314 104315 104316 104317 104318 104319 104320 104321 104322 104323 104324 104325 104326 104327 104328 104329 104330 104331 104332 104333 104334 104335 104336 104337 104338 104339 104340 104341 104342 104343 104344 104345 104346 104347 104348 104349 104350 104351 104352 104353 104354 104355 104356 104357 104358 104359 104360 104361 104362 104363 104364 104365 104366 104367 104368 104369 104370 104371 104372 104373 104374 104375 104376 104377 104378 104379 104380 104381 104382 104383 104384 104385 104386 104387 104388 104389 104390 104391 104392 104393 104394 104395 104396 104397 104398 104399 104400 104401 104402 104403 104404 104405 104406 104407 104408 104409 104410 104411 104412 104413 104414 104415 104416 104417 104418 104419 104420 104421 104422 104423 104424 104425 104426 104427 104428 104429 104430 104431 104432 104433 104434 104435 104436 104437 104438 104439 104440 104441 104442 104443 104444 104445 104446 104447 104448 104449 104450 104451 104452 104453 104454 104455 104456 104457 104458 104459 104460 104461 104462 104463 104464 104465 104466 104467 104468 104469 104470 104471 104472 104473 104474 104475 104476 104477 104478 104479 104480 104481 104482 104483 104484 104485 104486 104487 104488 104489 104490 104491 104492 104493 104494 104495 104496 104497 104498 104499 104500 104501 104502 104503 104504 104505 104506 104507 104508 104509 104510 104511 104512 104513 104514 104515 104516 104517 104518 104519 104520 104521 104522 104523 104524 104525 104526 104527 104528 104529 104530 104531 104532 104533 104534 104535 104536 104537 104538 104539 104540 104541 104542 104543 104544 104545 104546 104547 104548 104549 104550 104551 104552 104553 104554 104555 104556 104557 104558 104559 104560 104561 104562 104563 104564 104565 104566 104567 104568 104569 104570 104571 104572 104573 104574 104575 104576 104577 104578 104579 104580 104581 104582 104583 104584 104585 104586 104587 104588 104589 104590 104591 104592 104593 104594 104595 104596 104597 104598 104599 104600 104601 104602 104603 104604 104605 104606 104607 104608 104609 104610 104611 104612 104613 104614 104615 104616 104617 104618 104619 104620 104621 104622 104623 104624 104625 104626 104627 104628 104629 104630 104631 104632 104633 104634 104635 104636 104637 104638 104639 104640 104641 104642 104643 104644 104645 104646 104647 104648 104649 104650 104651 104652 104653 104654 104655 104656 104657 104658 104659 104660 104661 104662 104663 104664 104665 104666 104667 104668 104669 104670 104671 104672 104673 104674 104675 104676 104677 104678 104679 104680 104681 104682 104683 104684 104685 104686 104687 104688 104689 104690 104691 104692 104693 104694 104695 104696 104697 104698 104699 104700 104701 104702 104703 104704 104705 104706 104707 104708 104709 104710 104711 104712 104713 104714 104715 104716 104717 104718 104719 104720 104721 104722 104723 104724 104725 104726 104727 104728 104729 104730 104731 104732 104733 104734 104735 104736 104737 104738 104739 104740 104741 104742 104743 104744 104745 104746 104747 104748 104749 104750 104751 104752 104753 104754 104755 104756 104757 104758 104759 104760 104761 104762 104763 104764 104765 104766 104767 104768 104769 104770 104771 104772 104773 104774 104775 104776 104777 104778 104779 104780 104781 104782 104783 104784 104785 104786 104787 104788 104789 104790 104791 104792 104793 104794 104795 104796 104797 104798 104799 104800 104801 104802 104803 104804 104805 104806 104807 104808 104809 104810 104811 104812 104813 104814 104815 104816 104817 104818 104819 104820 104821 104822 104823 104824 104825 104826 104827 104828 104829 104830 104831 104832 104833 104834 104835 104836 104837 104838 104839 104840 104841 104842 104843 104844 104845 104846 104847 104848 104849 104850 104851 104852 104853 104854 104855 104856 104857 104858 104859 104860 104861 104862 104863 104864 104865 104866 104867 104868 104869 104870 104871 104872 104873 104874 104875 104876 104877 104878 104879 104880 104881 104882 104883 104884 104885 104886 104887 104888 104889 104890 104891 104892 104893 104894 104895 104896 104897 104898 104899 104900 104901 104902 104903 104904 104905 104906 104907 104908 104909 104910 104911 104912 104913 104914 104915 104916 104917 104918 104919 104920 104921 104922 104923 104924 104925 104926 104927 104928 104929 104930 104931 104932 104933 104934 104935 104936 104937 104938 104939 104940 104941 104942 104943 104944 104945 104946 104947 104948 104949 104950 104951 104952 104953 104954 104955 104956 104957 104958 104959 104960 104961 104962 104963 104964 104965 104966 104967 104968 104969 104970 104971 104972 104973 104974 104975 104976 104977 104978 104979 104980 104981 104982 104983 104984 104985 104986 104987 104988 104989 104990 104991 104992 104993 104994 104995 104996 104997 104998 104999 105000 105001 105002 105003 105004 105005 105006 105007 105008 105009 105010 105011 105012 105013 105014 105015 105016 105017 105018 105019 105020 105021 105022 105023 105024 105025 105026 105027 105028 105029 105030 105031 105032 105033 105034 105035 105036 105037 105038 105039 105040 105041 105042 105043 105044 105045 105046 105047 105048 105049 105050 105051 105052 105053 105054 105055 105056 105057 105058 105059 105060 105061 105062 105063 105064 105065 105066 105067 105068 105069 105070 105071 105072 105073 105074 105075 105076 105077 105078 105079 105080 105081 105082 105083 105084 105085 105086 105087 105088 105089 105090 105091 105092 105093 105094 105095 105096 105097 105098 105099 105100 105101 105102 105103 105104 105105 105106 105107 105108 105109 105110 105111 105112 105113 105114 105115 105116 105117 105118 105119 105120 105121 105122 105123 105124 105125 105126 105127 105128 105129 105130 105131 105132 105133 105134 105135 105136 105137 105138 105139 105140 105141 105142 105143 105144 105145 105146 105147 105148 105149 105150 105151 105152 105153 105154 105155 105156 105157 105158 105159 105160 105161 105162 105163 105164 105165 105166 105167 105168 105169 105170 105171 105172 105173 105174 105175 105176 105177 105178 105179 105180 105181 105182 105183 105184 105185 105186 105187 105188 105189 105190 105191 105192 105193 105194 105195 105196 105197 105198 105199 105200 105201 105202 105203 105204 105205 105206 105207 105208 105209 105210 105211 105212 105213 105214 105215 105216 105217 105218 105219 105220 105221 105222 105223 105224 105225 105226 105227 105228 105229 105230 105231 105232 105233 105234 105235 105236 105237 105238 105239 105240 105241 105242 105243 105244 105245 105246 105247 105248 105249 105250 105251 105252 105253 105254 105255 105256 105257 105258 105259 105260 105261 105262 105263 105264 105265 105266 105267 105268 105269 105270 105271 105272 105273 105274 105275 105276 105277 105278 105279 105280 105281 105282 105283 105284 105285 105286 105287 105288 105289 105290 105291 105292 105293 105294 105295 105296 105297 105298 105299 105300 105301 105302 105303 105304 105305 105306 105307 105308 105309 105310 105311 105312 105313 105314 105315 105316 105317 105318 105319 105320 105321 105322 105323 105324 105325 105326 105327 105328 105329 105330 105331 105332 105333 105334 105335 105336 105337 105338 105339 105340 105341 105342 105343 105344 105345 105346 105347 105348 105349 105350 105351 105352 105353 105354 105355 105356 105357 105358 105359 105360 105361 105362 105363 105364 105365 105366 105367 105368 105369 105370 105371 105372 105373 105374 105375 105376 105377 105378 105379 105380 105381 105382 105383 105384 105385 105386 105387 105388 105389 105390 105391 105392 105393 105394 105395 105396 105397 105398 105399 105400 105401 105402 105403 105404 105405 105406 105407 105408 105409 105410 105411 105412 105413 105414 105415 105416 105417 105418 105419 105420 105421 105422 105423 105424 105425 105426 105427 105428 105429 105430 105431 105432 105433 105434 105435 105436 105437 105438 105439 105440 105441 105442 105443 105444 105445 105446 105447 105448 105449 105450 105451 105452 105453 105454 105455 105456 105457 105458 105459 105460 105461 105462 105463 105464 105465 105466 105467 105468 105469 105470 105471 105472 105473 105474 105475 105476 105477 105478 105479 105480 105481 105482 105483 105484 105485 105486 105487 105488 105489 105490 105491 105492 105493 105494 105495 105496 105497 105498 105499 105500 105501 105502 105503 105504 105505 105506 105507 105508 105509 105510 105511 105512 105513 105514 105515 105516 105517 105518 105519 105520 105521 105522 105523 105524 105525 105526 105527 105528 105529 105530 105531 105532 105533 105534 105535 105536 105537 105538 105539 105540 105541 105542 105543 105544 105545 105546 105547 105548 105549 105550 105551 105552 105553 105554 105555 105556 105557 105558 105559 105560 105561 105562 105563 105564 105565 105566 105567 105568 105569 105570 105571 105572 105573 105574 105575 105576 105577 105578 105579 105580 105581 105582 105583 105584 105585 105586 105587 105588 105589 105590 105591 105592 105593 105594 105595 105596 105597 105598 105599 105600 105601 105602 105603 105604 105605 105606 105607 105608 105609 105610 105611 105612 105613 105614 105615 105616 105617 105618 105619 105620 105621 105622 105623 105624 105625 105626 105627 105628 105629 105630 105631 105632 105633 105634 105635 105636 105637 105638 105639 105640 105641 105642 105643 105644 105645 105646 105647 105648 105649 105650 105651 105652 105653 105654 105655 105656 105657 105658 105659 105660 105661 105662 105663 105664 105665 105666 105667 105668 105669 105670 105671 105672 105673 105674 105675 105676 105677 105678 105679 105680 105681 105682 105683 105684 105685 105686 105687 105688 105689 105690 105691 105692 105693 105694 105695 105696 105697 105698 105699 105700 105701 105702 105703 105704 105705 105706 105707 105708 105709 105710 105711 105712 105713 105714 105715 105716 105717 105718 105719 105720 105721 105722 105723 105724 105725 105726 105727 105728 105729 105730 105731 105732 105733 105734 105735 105736 105737 105738 105739 105740 105741 105742 105743 105744 105745 105746 105747 105748 105749 105750 105751 105752 105753 105754 105755 105756 105757 105758 105759 105760 105761 105762 105763 105764 105765 105766 105767 105768 105769 105770 105771 105772 105773 105774 105775 105776 105777 105778 105779 105780 105781 105782 105783 105784 105785 105786 105787 105788 105789 105790 105791 105792 105793 105794 105795 105796 105797 105798 105799 105800 105801 105802 105803 105804 105805 105806 105807 105808 105809 105810 105811 105812 105813 105814 105815 105816 105817 105818 105819 105820 105821 105822 105823 105824 105825 105826 105827 105828 105829 105830 105831 105832 105833 105834 105835 105836 105837 105838 105839 105840 105841 105842 105843 105844 105845 105846 105847 105848 105849 105850 105851 105852 105853 105854 105855 105856 105857 105858 105859 105860 105861 105862 105863 105864 105865 105866 105867 105868 105869 105870 105871 105872 105873 105874 105875 105876 105877 105878 105879 105880 105881 105882 105883 105884 105885 105886 105887 105888 105889 105890 105891 105892 105893 105894 105895 105896 105897 105898 105899 105900 105901 105902 105903 105904 105905 105906 105907 105908 105909 105910 105911 105912 105913 105914 105915 105916 105917 105918 105919 105920 105921 105922 105923 105924 105925 105926 105927 105928 105929 105930 105931 105932 105933 105934 105935 105936 105937 105938 105939 105940 105941 105942 105943 105944 105945 105946 105947 105948 105949 105950 105951 105952 105953 105954 105955 105956 105957 105958 105959 105960 105961 105962 105963 105964 105965 105966 105967 105968 105969 105970 105971 105972 105973 105974 105975 105976 105977 105978 105979 105980 105981 105982 105983 105984 105985 105986 105987 105988 105989 105990 105991 105992 105993 105994 105995 105996 105997 105998 105999 106000 106001 106002 106003 106004 106005 106006 106007 106008 106009 106010 106011 106012 106013 106014 106015 106016 106017 106018 106019 106020 106021 106022 106023 106024 106025 106026 106027 106028 106029 106030 106031 106032 106033 106034 106035 106036 106037 106038 106039 106040 106041 106042 106043 106044 106045 106046 106047 106048 106049 106050 106051 106052 106053 106054 106055 106056 106057 106058 106059 106060 106061 106062 106063 106064 106065 106066 106067 106068 106069 106070 106071 106072 106073 106074 106075 106076 106077 106078 106079 106080 106081 106082 106083 106084 106085 106086 106087 106088 106089 106090 106091 106092 106093 106094 106095 106096 106097 106098 106099 106100 106101 106102 106103 106104 106105 106106 106107 106108 106109 106110 106111 106112 106113 106114 106115 106116 106117 106118 106119 106120 106121 106122 106123 106124 106125 106126 106127 106128 106129 106130 106131 106132 106133 106134 106135 106136 106137 106138 106139 106140 106141 106142 106143 106144 106145 106146 106147 106148 106149 106150 106151 106152 106153 106154 106155 106156 106157 106158 106159 106160 106161 106162 106163 106164 106165 106166 106167 106168 106169 106170 106171 106172 106173 106174 106175 106176 106177 106178 106179 106180 106181 106182 106183 106184 106185 106186 106187 106188 106189 106190 106191 106192 106193 106194 106195 106196 106197 106198 106199 106200 106201 106202 106203 106204 106205 106206 106207 106208 106209 106210 106211 106212 106213 106214 106215 106216 106217 106218 106219 106220 106221 106222 106223 106224 106225 106226 106227 106228 106229 106230 106231 106232 106233 106234 106235 106236 106237 106238 106239 106240 106241 106242 106243 106244 106245 106246 106247 106248 106249 106250 106251 106252 106253 106254 106255 106256 106257 106258 106259 106260 106261 106262 106263 106264 106265 106266 106267 106268 106269 106270 106271 106272 106273 106274 106275 106276 106277 106278 106279 106280 106281 106282 106283 106284 106285 106286 106287 106288 106289 106290 106291 106292 106293 106294 106295 106296 106297 106298 106299 106300 106301 106302 106303 106304 106305 106306 106307 106308 106309 106310 106311 106312 106313 106314 106315 106316 106317 106318 106319 106320 106321 106322 106323 106324 106325 106326 106327 106328 106329 106330 106331 106332 106333 106334 106335 106336 106337 106338 106339 106340 106341 106342 106343 106344 106345 106346 106347 106348 106349 106350 106351 106352 106353 106354 106355 106356 106357 106358 106359 106360 106361 106362 106363 106364 106365 106366 106367 106368 106369 106370 106371 106372 106373 106374 106375 106376 106377 106378 106379 106380 106381 106382 106383 106384 106385 106386 106387 106388 106389 106390 106391 106392 106393 106394 106395 106396 106397 106398 106399 106400 106401 106402 106403 106404 106405 106406 106407 106408 106409 106410 106411 106412 106413 106414 106415 106416 106417 106418 106419 106420 106421 106422 106423 106424 106425 106426 106427 106428 106429 106430 106431 106432 106433 106434 106435 106436 106437 106438 106439 106440 106441 106442 106443 106444 106445 106446 106447 106448 106449 106450 106451 106452 106453 106454 106455 106456 106457 106458 106459 106460 106461 106462 106463 106464 106465 106466 106467 106468 106469 106470 106471 106472 106473 106474 106475 106476 106477 106478 106479 106480 106481 106482 106483 106484 106485 106486 106487 106488 106489 106490 106491 106492 106493 106494 106495 106496 106497 106498 106499 106500 106501 106502 106503 106504 106505 106506 106507 106508 106509 106510 106511 106512 106513 106514 106515 106516 106517 106518 106519 106520 106521 106522 106523 106524 106525 106526 106527 106528 106529 106530 106531 106532 106533 106534 106535 106536 106537 106538 106539 106540 106541 106542 106543 106544 106545 106546 106547 106548 106549 106550 106551 106552 106553 106554 106555 106556 106557 106558 106559 106560 106561 106562 106563 106564 106565 106566 106567 106568 106569 106570 106571 106572 106573 106574 106575 106576 106577 106578 106579 106580 106581 106582 106583 106584 106585 106586 106587 106588 106589 106590 106591 106592 106593 106594 106595 106596 106597 106598 106599 106600 106601 106602 106603 106604 106605 106606 106607 106608 106609 106610 106611 106612 106613 106614 106615 106616 106617 106618 106619 106620 106621 106622 106623 106624 106625 106626 106627 106628 106629 106630 106631 106632 106633 106634 106635 106636 106637 106638 106639 106640 106641 106642 106643 106644 106645 106646 106647 106648 106649 106650 106651 106652 106653 106654 106655 106656 106657 106658 106659 106660 106661 106662 106663 106664 106665 106666 106667 106668 106669 106670 106671 106672 106673 106674 106675 106676 106677 106678 106679 106680 106681 106682 106683 106684 106685 106686 106687 106688 106689 106690 106691 106692 106693 106694 106695 106696 106697 106698 106699 106700 106701 106702 106703 106704 106705 106706 106707 106708 106709 106710 106711 106712 106713 106714 106715 106716 106717 106718 106719 106720 106721 106722 106723 106724 106725 106726 106727 106728 106729 106730 106731 106732 106733 106734 106735 106736 106737 106738 106739 106740 106741 106742 106743 106744 106745 106746 106747 106748 106749 106750 106751 106752 106753 106754 106755 106756 106757 106758 106759 106760 106761 106762 106763 106764 106765 106766 106767 106768 106769 106770 106771 106772 106773 106774 106775 106776 106777 106778 106779 106780 106781 106782 106783 106784 106785 106786 106787 106788 106789 106790 106791 106792 106793 106794 106795 106796 106797 106798 106799 106800 106801 106802 106803 106804 106805 106806 106807 106808 106809 106810 106811 106812 106813 106814 106815 106816 106817 106818 106819 106820 106821 106822 106823 106824 106825 106826 106827 106828 106829 106830 106831 106832 106833 106834 106835 106836 106837 106838 106839 106840 106841 106842 106843 106844 106845 106846 106847 106848 106849 106850 106851 106852 106853 106854 106855 106856 106857 106858 106859 106860 106861 106862 106863 106864 106865 106866 106867 106868 106869 106870 106871 106872 106873 106874 106875 106876 106877 106878 106879 106880 106881 106882 106883 106884 106885 106886 106887 106888 106889 106890 106891 106892 106893 106894 106895 106896 106897 106898 106899 106900 106901 106902 106903 106904 106905 106906 106907 106908 106909 106910 106911 106912 106913 106914 106915 106916 106917 106918 106919 106920 106921 106922 106923 106924 106925 106926 106927 106928 106929 106930 106931 106932 106933 106934 106935 106936 106937 106938 106939 106940 106941 106942 106943 106944 106945 106946 106947 106948 106949 106950 106951 106952 106953 106954 106955 106956 106957 106958 106959 106960 106961 106962 106963 106964 106965 106966 106967 106968 106969 106970 106971 106972 106973 106974 106975 106976 106977 106978 106979 106980 106981 106982 106983 106984 106985 106986 106987 106988 106989 106990 106991 106992 106993 106994 106995 106996 106997 106998 106999 107000 107001 107002 107003 107004 107005 107006 107007 107008 107009 107010 107011 107012 107013 107014 107015 107016 107017 107018 107019 107020 107021 107022 107023 107024 107025 107026 107027 107028 107029 107030 107031 107032 107033 107034 107035 107036 107037 107038 107039 107040 107041 107042 107043 107044 107045 107046 107047 107048 107049 107050 107051 107052 107053 107054 107055 107056 107057 107058 107059 107060 107061 107062 107063 107064 107065 107066 107067 107068 107069 107070 107071 107072 107073 107074 107075 107076 107077 107078 107079 107080 107081 107082 107083 107084 107085 107086 107087 107088 107089 107090 107091 107092 107093 107094 107095 107096 107097 107098 107099 107100 107101 107102 107103 107104 107105 107106 107107 107108 107109 107110 107111 107112 107113 107114 107115 107116 107117 107118 107119 107120 107121 107122 107123 107124 107125 107126 107127 107128 107129 107130 107131 107132 107133 107134 107135 107136 107137 107138 107139 107140 107141 107142 107143 107144 107145 107146 107147 107148 107149 107150 107151 107152 107153 107154 107155 107156 107157 107158 107159 107160 107161 107162 107163 107164 107165 107166 107167 107168 107169 107170 107171 107172 107173 107174 107175 107176 107177 107178 107179 107180 107181 107182 107183 107184 107185 107186 107187 107188 107189 107190 107191 107192 107193 107194 107195 107196 107197 107198 107199 107200 107201 107202 107203 107204 107205 107206 107207 107208 107209 107210 107211 107212 107213 107214 107215 107216 107217 107218 107219 107220 107221 107222 107223 107224 107225 107226 107227 107228 107229 107230 107231 107232 107233 107234 107235 107236 107237 107238 107239 107240 107241 107242 107243 107244 107245 107246 107247 107248 107249 107250 107251 107252 107253 107254 107255 107256 107257 107258 107259 107260 107261 107262 107263 107264 107265 107266 107267 107268 107269 107270 107271 107272 107273 107274 107275 107276 107277 107278 107279 107280 107281 107282 107283 107284 107285 107286 107287 107288 107289 107290 107291 107292 107293 107294 107295 107296 107297 107298 107299 107300 107301 107302 107303 107304 107305 107306 107307 107308 107309 107310 107311 107312 107313 107314 107315 107316 107317 107318 107319 107320 107321 107322 107323 107324 107325 107326 107327 107328 107329 107330 107331 107332 107333 107334 107335 107336 107337 107338 107339 107340 107341 107342 107343 107344 107345 107346 107347 107348 107349 107350 107351 107352 107353 107354 107355 107356 107357 107358 107359 107360 107361 107362 107363 107364 107365 107366 107367 107368 107369 107370 107371 107372 107373 107374 107375 107376 107377 107378 107379 107380 107381 107382 107383 107384 107385 107386 107387 107388 107389 107390 107391 107392 107393 107394 107395 107396 107397 107398 107399 107400 107401 107402 107403 107404 107405 107406 107407 107408 107409 107410 107411 107412 107413 107414 107415 107416 107417 107418 107419 107420 107421 107422 107423 107424 107425 107426 107427 107428 107429 107430 107431 107432 107433 107434 107435 107436 107437 107438 107439 107440 107441 107442 107443 107444 107445 107446 107447 107448 107449 107450 107451 107452 107453 107454 107455 107456 107457 107458 107459 107460 107461 107462 107463 107464 107465 107466 107467 107468 107469 107470 107471 107472 107473 107474 107475 107476 107477 107478 107479 107480 107481 107482 107483 107484 107485 107486 107487 107488 107489 107490 107491 107492 107493 107494 107495 107496 107497 107498 107499 107500 107501 107502 107503 107504 107505 107506 107507 107508 107509 107510 107511 107512 107513 107514 107515 107516 107517 107518 107519 107520 107521 107522 107523 107524 107525 107526 107527 107528 107529 107530 107531 107532 107533 107534 107535 107536 107537 107538 107539 107540 107541 107542 107543 107544 107545 107546 107547 107548 107549 107550 107551 107552 107553 107554 107555 107556 107557 107558 107559 107560 107561 107562 107563 107564 107565 107566 107567 107568 107569 107570 107571 107572 107573 107574 107575 107576 107577 107578 107579 107580 107581 107582 107583 107584 107585 107586 107587 107588 107589 107590 107591 107592 107593 107594 107595 107596 107597 107598 107599 107600 107601 107602 107603 107604 107605 107606 107607 107608 107609 107610 107611 107612 107613 107614 107615 107616 107617 107618 107619 107620 107621 107622 107623 107624 107625 107626 107627 107628 107629 107630 107631 107632 107633 107634 107635 107636 107637 107638 107639 107640 107641 107642 107643 107644 107645 107646 107647 107648 107649 107650 107651 107652 107653 107654 107655 107656 107657 107658 107659 107660 107661 107662 107663 107664 107665 107666 107667 107668 107669 107670 107671 107672 107673 107674 107675 107676 107677 107678 107679 107680 107681 107682 107683 107684 107685 107686 107687 107688 107689 107690 107691 107692 107693 107694 107695 107696 107697 107698 107699 107700 107701 107702 107703 107704 107705 107706 107707 107708 107709 107710 107711 107712 107713 107714 107715 107716 107717 107718 107719 107720 107721 107722 107723 107724 107725 107726 107727 107728 107729 107730 107731 107732 107733 107734 107735 107736 107737 107738 107739 107740 107741 107742 107743 107744 107745 107746 107747 107748 107749 107750 107751 107752 107753 107754 107755 107756 107757 107758 107759 107760 107761 107762 107763 107764 107765 107766 107767 107768 107769 107770 107771 107772 107773 107774 107775 107776 107777 107778 107779 107780 107781 107782 107783 107784 107785 107786 107787 107788 107789 107790 107791 107792 107793 107794 107795 107796 107797 107798 107799 107800 107801 107802 107803 107804 107805 107806 107807 107808 107809 107810 107811 107812 107813 107814 107815 107816 107817 107818 107819 107820 107821 107822 107823 107824 107825 107826 107827 107828 107829 107830 107831 107832 107833 107834 107835 107836 107837 107838 107839 107840 107841 107842 107843 107844 107845 107846 107847 107848 107849 107850 107851 107852 107853 107854 107855 107856 107857 107858 107859 107860 107861 107862 107863 107864 107865 107866 107867 107868 107869 107870 107871 107872 107873 107874 107875 107876 107877 107878 107879 107880 107881 107882 107883 107884 107885 107886 107887 107888 107889 107890 107891 107892 107893 107894 107895 107896 107897 107898 107899 107900 107901 107902 107903 107904 107905 107906 107907 107908 107909 107910 107911 107912 107913 107914 107915 107916 107917 107918 107919 107920 107921 107922 107923 107924 107925 107926 107927 107928 107929 107930 107931 107932 107933 107934 107935 107936 107937 107938 107939 107940 107941 107942 107943 107944 107945 107946 107947 107948 107949 107950 107951 107952 107953 107954 107955 107956 107957 107958 107959 107960 107961 107962 107963 107964 107965 107966 107967 107968 107969 107970 107971 107972 107973 107974 107975 107976 107977 107978 107979 107980 107981 107982 107983 107984 107985 107986 107987 107988 107989 107990 107991 107992 107993 107994 107995 107996 107997 107998 107999 108000 108001 108002 108003 108004 108005 108006 108007 108008 108009 108010 108011 108012 108013 108014 108015 108016 108017 108018 108019 108020 108021 108022 108023 108024 108025 108026 108027 108028 108029 108030 108031 108032 108033 108034 108035 108036 108037 108038 108039 108040 108041 108042 108043 108044 108045 108046 108047 108048 108049 108050 108051 108052 108053 108054 108055 108056 108057 108058 108059 108060 108061 108062 108063 108064 108065 108066 108067 108068 108069 108070 108071 108072 108073 108074 108075 108076 108077 108078 108079 108080 108081 108082 108083 108084 108085 108086 108087 108088 108089 108090 108091 108092 108093 108094 108095 108096 108097 108098 108099 108100 108101 108102 108103 108104 108105 108106 108107 108108 108109 108110 108111 108112 108113 108114 108115 108116 108117 108118 108119 108120 108121 108122 108123 108124 108125 108126 108127 108128 108129 108130 108131 108132 108133 108134 108135 108136 108137 108138 108139 108140 108141 108142 108143 108144 108145 108146 108147 108148 108149 108150 108151 108152 108153 108154 108155 108156 108157 108158 108159 108160 108161 108162 108163 108164 108165 108166 108167 108168 108169 108170 108171 108172 108173 108174 108175 108176 108177 108178 108179 108180 108181 108182 108183 108184 108185 108186 108187 108188 108189 108190 108191 108192 108193 108194 108195 108196 108197 108198 108199 108200 108201 108202 108203 108204 108205 108206 108207 108208 108209 108210 108211 108212 108213 108214 108215 108216 108217 108218 108219 108220 108221 108222 108223 108224 108225 108226 108227 108228 108229 108230 108231 108232 108233 108234 108235 108236 108237 108238 108239 108240 108241 108242 108243 108244 108245 108246 108247 108248 108249 108250 108251 108252 108253 108254 108255 108256 108257 108258 108259 108260 108261 108262 108263 108264 108265 108266 108267 108268 108269 108270 108271 108272 108273 108274 108275 108276 108277 108278 108279 108280 108281 108282 108283 108284 108285 108286 108287 108288 108289 108290 108291 108292 108293 108294 108295 108296 108297 108298 108299 108300 108301 108302 108303 108304 108305 108306 108307 108308 108309 108310 108311 108312 108313 108314 108315 108316 108317 108318 108319 108320 108321 108322 108323 108324 108325 108326 108327 108328 108329 108330 108331 108332 108333 108334 108335 108336 108337 108338 108339 108340 108341 108342 108343 108344 108345 108346 108347 108348 108349 108350 108351 108352 108353 108354 108355 108356 108357 108358 108359 108360 108361 108362 108363 108364 108365 108366 108367 108368 108369 108370 108371 108372 108373 108374 108375 108376 108377 108378 108379 108380 108381 108382 108383 108384 108385 108386 108387 108388 108389 108390 108391 108392 108393 108394 108395 108396 108397 108398 108399 108400 108401 108402 108403 108404 108405 108406 108407 108408 108409 108410 108411 108412 108413 108414 108415 108416 108417 108418 108419 108420 108421 108422 108423 108424 108425 108426 108427 108428 108429 108430 108431 108432 108433 108434 108435 108436 108437 108438 108439 108440 108441 108442 108443 108444 108445 108446 108447 108448 108449 108450 108451 108452 108453 108454 108455 108456 108457 108458 108459 108460 108461 108462 108463 108464 108465 108466 108467 108468 108469 108470 108471 108472 108473 108474 108475 108476 108477 108478 108479 108480 108481 108482 108483 108484 108485 108486 108487 108488 108489 108490 108491 108492 108493 108494 108495 108496 108497 108498 108499 108500 108501 108502 108503 108504 108505 108506 108507 108508 108509 108510 108511 108512 108513 108514 108515 108516 108517 108518 108519 108520 108521 108522 108523 108524 108525 108526 108527 108528 108529 108530 108531 108532 108533 108534 108535 108536 108537 108538 108539 108540 108541 108542 108543 108544 108545 108546 108547 108548 108549 108550 108551 108552 108553 108554 108555 108556 108557 108558 108559 108560 108561 108562 108563 108564 108565 108566 108567 108568 108569 108570 108571 108572 108573 108574 108575 108576 108577 108578 108579 108580 108581 108582 108583 108584 108585 108586 108587 108588 108589 108590 108591 108592 108593 108594 108595 108596 108597 108598 108599 108600 108601 108602 108603 108604 108605 108606 108607 108608 108609 108610 108611 108612 108613 108614 108615 108616 108617 108618 108619 108620 108621 108622 108623 108624 108625 108626 108627 108628 108629 108630 108631 108632 108633 108634 108635 108636 108637 108638 108639 108640 108641 108642 108643 108644 108645 108646 108647 108648 108649 108650 108651 108652 108653 108654 108655 108656 108657 108658 108659 108660 108661 108662 108663 108664 108665 108666 108667 108668 108669 108670 108671 108672 108673 108674 108675 108676 108677 108678 108679 108680 108681 108682 108683 108684 108685 108686 108687 108688 108689 108690 108691 108692 108693 108694 108695 108696 108697 108698 108699 108700 108701 108702 108703 108704 108705 108706 108707 108708 108709 108710 108711 108712 108713 108714 108715 108716 108717 108718 108719 108720 108721 108722 108723 108724 108725 108726 108727 108728 108729 108730 108731 108732 108733 108734 108735 108736 108737 108738 108739 108740 108741 108742 108743 108744 108745 108746 108747 108748 108749 108750 108751 108752 108753 108754 108755 108756 108757 108758 108759 108760 108761 108762 108763 108764 108765 108766 108767 108768 108769 108770 108771 108772 108773 108774 108775 108776 108777 108778 108779 108780 108781 108782 108783 108784 108785 108786 108787 108788 108789 108790 108791 108792 108793 108794 108795 108796 108797 108798 108799 108800 108801 108802 108803 108804 108805 108806 108807 108808 108809 108810 108811 108812 108813 108814 108815 108816 108817 108818 108819 108820 108821 108822 108823 108824 108825 108826 108827 108828 108829 108830 108831 108832 108833 108834 108835 108836 108837 108838 108839 108840 108841 108842 108843 108844 108845 108846 108847 108848 108849 108850 108851 108852 108853 108854 108855 108856 108857 108858 108859 108860 108861 108862 108863 108864 108865 108866 108867 108868 108869 108870 108871 108872 108873 108874 108875 108876 108877 108878 108879 108880 108881 108882 108883 108884 108885 108886 108887 108888 108889 108890 108891 108892 108893 108894 108895 108896 108897 108898 108899 108900 108901 108902 108903 108904 108905 108906 108907 108908 108909 108910 108911 108912 108913 108914 108915 108916 108917 108918 108919 108920 108921 108922 108923 108924 108925 108926 108927 108928 108929 108930 108931 108932 108933 108934 108935 108936 108937 108938 108939 108940 108941 108942 108943 108944 108945 108946 108947 108948 108949 108950 108951 108952 108953 108954 108955 108956 108957 108958 108959 108960 108961 108962 108963 108964 108965 108966 108967 108968 108969 108970 108971 108972 108973 108974 108975 108976 108977 108978 108979 108980 108981 108982 108983 108984 108985 108986 108987 108988 108989 108990 108991 108992 108993 108994 108995 108996 108997 108998 108999 109000 109001 109002 109003 109004 109005 109006 109007 109008 109009 109010 109011 109012 109013 109014 109015 109016 109017 109018 109019 109020 109021 109022 109023 109024 109025 109026 109027 109028 109029 109030 109031 109032 109033 109034 109035 109036 109037 109038 109039 109040 109041 109042 109043 109044 109045 109046 109047 109048 109049 109050 109051 109052 109053 109054 109055 109056 109057 109058 109059 109060 109061 109062 109063 109064 109065 109066 109067 109068 109069 109070 109071 109072 109073 109074 109075 109076 109077 109078 109079 109080 109081 109082 109083 109084 109085 109086 109087 109088 109089 109090 109091 109092 109093 109094 109095 109096 109097 109098 109099 109100 109101 109102 109103 109104 109105 109106 109107 109108 109109 109110 109111 109112 109113 109114 109115 109116 109117 109118 109119 109120 109121 109122 109123 109124 109125 109126 109127 109128 109129 109130 109131 109132 109133 109134 109135 109136 109137 109138 109139 109140 109141 109142 109143 109144 109145 109146 109147 109148 109149 109150 109151 109152 109153 109154 109155 109156 109157 109158 109159 109160 109161 109162 109163 109164 109165 109166 109167 109168 109169 109170 109171 109172 109173 109174 109175 109176 109177 109178 109179 109180 109181 109182 109183 109184 109185 109186 109187 109188 109189 109190 109191 109192 109193 109194 109195 109196 109197 109198 109199 109200 109201 109202 109203 109204 109205 109206 109207 109208 109209 109210 109211 109212 109213 109214 109215 109216 109217 109218 109219 109220 109221 109222 109223 109224 109225 109226 109227 109228 109229 109230 109231 109232 109233 109234 109235 109236 109237 109238 109239 109240 109241 109242 109243 109244 109245 109246 109247 109248 109249 109250 109251 109252 109253 109254 109255 109256 109257 109258 109259 109260 109261 109262 109263 109264 109265 109266 109267 109268 109269 109270 109271 109272 109273 109274 109275 109276 109277 109278 109279 109280 109281 109282 109283 109284 109285 109286 109287 109288 109289 109290 109291 109292 109293 109294 109295 109296 109297 109298 109299 109300 109301 109302 109303 109304 109305 109306 109307 109308 109309 109310 109311 109312 109313 109314 109315 109316 109317 109318 109319 109320 109321 109322 109323 109324 109325 109326 109327 109328 109329 109330 109331 109332 109333 109334 109335 109336 109337 109338 109339 109340 109341 109342 109343 109344 109345 109346 109347 109348 109349 109350 109351 109352 109353 109354 109355 109356 109357 109358 109359 109360 109361 109362 109363 109364 109365 109366 109367 109368 109369 109370 109371 109372 109373 109374 109375 109376 109377 109378 109379 109380 109381 109382 109383 109384 109385 109386 109387 109388 109389 109390 109391 109392 109393 109394 109395 109396 109397 109398 109399 109400 109401 109402 109403 109404 109405 109406 109407 109408 109409 109410 109411 109412 109413 109414 109415 109416 109417 109418 109419 109420 109421 109422 109423 109424 109425 109426 109427 109428 109429 109430 109431 109432 109433 109434 109435 109436 109437 109438 109439 109440 109441 109442 109443 109444 109445 109446 109447 109448 109449 109450 109451 109452 109453 109454 109455 109456 109457 109458 109459 109460 109461 109462 109463 109464 109465 109466 109467 109468 109469 109470 109471 109472 109473 109474 109475 109476 109477 109478 109479 109480 109481 109482 109483 109484 109485 109486 109487 109488 109489 109490 109491 109492 109493 109494 109495 109496 109497 109498 109499 109500 109501 109502 109503 109504 109505 109506 109507 109508 109509 109510 109511 109512 109513 109514 109515 109516 109517 109518 109519 109520 109521 109522 109523 109524 109525 109526 109527 109528 109529 109530 109531 109532 109533 109534 109535 109536 109537 109538 109539 109540 109541 109542 109543 109544 109545 109546 109547 109548 109549 109550 109551 109552 109553 109554 109555 109556 109557 109558 109559 109560 109561 109562 109563 109564 109565 109566 109567 109568 109569 109570 109571 109572 109573 109574 109575 109576 109577 109578 109579 109580 109581 109582 109583 109584 109585 109586 109587 109588 109589 109590 109591 109592 109593 109594 109595 109596 109597 109598 109599 109600 109601 109602 109603 109604 109605 109606 109607 109608 109609 109610 109611 109612 109613 109614 109615 109616 109617 109618 109619 109620 109621 109622 109623 109624 109625 109626 109627 109628 109629 109630 109631 109632 109633 109634 109635 109636 109637 109638 109639 109640 109641 109642 109643 109644 109645 109646 109647 109648 109649 109650 109651 109652 109653 109654 109655 109656 109657 109658 109659 109660 109661 109662 109663 109664 109665 109666 109667 109668 109669 109670 109671 109672 109673 109674 109675 109676 109677 109678 109679 109680 109681 109682 109683 109684 109685 109686 109687 109688 109689 109690 109691 109692 109693 109694 109695 109696 109697 109698 109699 109700 109701 109702 109703 109704 109705 109706 109707 109708 109709 109710 109711 109712 109713 109714 109715 109716 109717 109718 109719 109720 109721 109722 109723 109724 109725 109726 109727 109728 109729 109730 109731 109732 109733 109734 109735 109736 109737 109738 109739 109740 109741 109742 109743 109744 109745 109746 109747 109748 109749 109750 109751 109752 109753 109754 109755 109756 109757 109758 109759 109760 109761 109762 109763 109764 109765 109766 109767 109768 109769 109770 109771 109772 109773 109774 109775 109776 109777 109778 109779 109780 109781 109782 109783 109784 109785 109786 109787 109788 109789 109790 109791 109792 109793 109794 109795 109796 109797 109798 109799 109800 109801 109802 109803 109804 109805 109806 109807 109808 109809 109810 109811 109812 109813 109814 109815 109816 109817 109818 109819 109820 109821 109822 109823 109824 109825 109826 109827 109828 109829 109830 109831 109832 109833 109834 109835 109836 109837 109838 109839 109840 109841 109842 109843 109844 109845 109846 109847 109848 109849 109850 109851 109852 109853 109854 109855 109856 109857 109858 109859 109860 109861 109862 109863 109864 109865 109866 109867 109868 109869 109870 109871 109872 109873 109874 109875 109876 109877 109878 109879 109880 109881 109882 109883 109884 109885 109886 109887 109888 109889 109890 109891 109892 109893 109894 109895 109896 109897 109898 109899 109900 109901 109902 109903 109904 109905 109906 109907 109908 109909 109910 109911 109912 109913 109914 109915 109916 109917 109918 109919 109920 109921 109922 109923 109924 109925 109926 109927 109928 109929 109930 109931 109932 109933 109934 109935 109936 109937 109938 109939 109940 109941 109942 109943 109944 109945 109946 109947 109948 109949 109950 109951 109952 109953 109954 109955 109956 109957 109958 109959 109960 109961 109962 109963 109964 109965 109966 109967 109968 109969 109970 109971 109972 109973 109974 109975 109976 109977 109978 109979 109980 109981 109982 109983 109984 109985 109986 109987 109988 109989 109990 109991 109992 109993 109994 109995 109996 109997 109998 109999 110000 110001 110002 110003 110004 110005 110006 110007 110008 110009 110010 110011 110012 110013 110014 110015 110016 110017 110018 110019 110020 110021 110022 110023 110024 110025 110026 110027 110028 110029 110030 110031 110032 110033 110034 110035 110036 110037 110038 110039 110040 110041 110042 110043 110044 110045 110046 110047 110048 110049 110050 110051 110052 110053 110054 110055 110056 110057 110058 110059 110060 110061 110062 110063 110064 110065 110066 110067 110068 110069 110070 110071 110072 110073 110074 110075 110076 110077 110078 110079 110080 110081 110082 110083 110084 110085 110086 110087 110088 110089 110090 110091 110092 110093 110094 110095 110096 110097 110098 110099 110100 110101 110102 110103 110104 110105 110106 110107 110108 110109 110110 110111 110112 110113 110114 110115 110116 110117 110118 110119 110120 110121 110122 110123 110124 110125 110126 110127 110128 110129 110130 110131 110132 110133 110134 110135 110136 110137 110138 110139 110140 110141 110142 110143 110144 110145 110146 110147 110148 110149 110150 110151 110152 110153 110154 110155 110156 110157 110158 110159 110160 110161 110162 110163 110164 110165 110166 110167 110168 110169 110170 110171 110172 110173 110174 110175 110176 110177 110178 110179 110180 110181 110182 110183 110184 110185 110186 110187 110188 110189 110190 110191 110192 110193 110194 110195 110196 110197 110198 110199 110200 110201 110202 110203 110204 110205 110206 110207 110208 110209 110210 110211 110212 110213 110214 110215 110216 110217 110218 110219 110220 110221 110222 110223 110224 110225 110226 110227 110228 110229 110230 110231 110232 110233 110234 110235 110236 110237 110238 110239 110240 110241 110242 110243 110244 110245 110246 110247 110248 110249 110250 110251 110252 110253 110254 110255 110256 110257 110258 110259 110260 110261 110262 110263 110264 110265 110266 110267 110268 110269 110270 110271 110272 110273 110274 110275 110276 110277 110278 110279 110280 110281 110282 110283 110284 110285 110286 110287 110288 110289 110290 110291 110292 110293 110294 110295 110296 110297 110298 110299 110300 110301 110302 110303 110304 110305 110306 110307 110308 110309 110310 110311 110312 110313 110314 110315 110316 110317 110318 110319 110320 110321 110322 110323 110324 110325 110326 110327 110328 110329 110330 110331 110332 110333 110334 110335 110336 110337 110338 110339 110340 110341 110342 110343 110344 110345 110346 110347 110348 110349 110350 110351 110352 110353 110354 110355 110356 110357 110358 110359 110360 110361 110362 110363 110364 110365 110366 110367 110368 110369 110370 110371 110372 110373 110374 110375 110376 110377 110378 110379 110380 110381 110382 110383 110384 110385 110386 110387 110388 110389 110390 110391 110392 110393 110394 110395 110396 110397 110398 110399 110400 110401 110402 110403 110404 110405 110406 110407 110408 110409 110410 110411 110412 110413 110414 110415 110416 110417 110418 110419 110420 110421 110422 110423 110424 110425 110426 110427 110428 110429 110430 110431 110432 110433 110434 110435 110436 110437 110438 110439 110440 110441 110442 110443 110444 110445 110446 110447 110448 110449 110450 110451 110452 110453 110454 110455 110456 110457 110458 110459 110460 110461 110462 110463 110464 110465 110466 110467 110468 110469 110470 110471 110472 110473 110474 110475 110476 110477 110478 110479 110480 110481 110482 110483 110484 110485 110486 110487 110488 110489 110490 110491 110492 110493 110494 110495 110496 110497 110498 110499 110500 110501 110502 110503 110504 110505 110506 110507 110508 110509 110510 110511 110512 110513 110514 110515 110516 110517 110518 110519 110520 110521 110522 110523 110524 110525 110526 110527 110528 110529 110530 110531 110532 110533 110534 110535 110536 110537 110538 110539 110540 110541 110542 110543 110544 110545 110546 110547 110548 110549 110550 110551 110552 110553 110554 110555 110556 110557 110558 110559 110560 110561 110562 110563 110564 110565 110566 110567 110568 110569 110570 110571 110572 110573 110574 110575 110576 110577 110578 110579 110580 110581 110582 110583 110584 110585 110586 110587 110588 110589 110590 110591 110592 110593 110594 110595 110596 110597 110598 110599 110600 110601 110602 110603 110604 110605 110606 110607 110608 110609 110610 110611 110612 110613 110614 110615 110616 110617 110618 110619 110620 110621 110622 110623 110624 110625 110626 110627 110628 110629 110630 110631 110632 110633 110634 110635 110636 110637 110638 110639 110640 110641 110642 110643 110644 110645 110646 110647 110648 110649 110650 110651 110652 110653 110654 110655 110656 110657 110658 110659 110660 110661 110662 110663 110664 110665 110666 110667 110668 110669 110670 110671 110672 110673 110674 110675 110676 110677 110678 110679 110680 110681 110682 110683 110684 110685 110686 110687 110688 110689 110690 110691 110692 110693 110694 110695 110696 110697 110698 110699 110700 110701 110702 110703 110704 110705 110706 110707 110708 110709 110710 110711 110712 110713 110714 110715 110716 110717 110718 110719 110720 110721 110722 110723 110724 110725 110726 110727 110728 110729 110730 110731 110732 110733 110734 110735 110736 110737 110738 110739 110740 110741 110742 110743 110744 110745 110746 110747 110748 110749 110750 110751 110752 110753 110754 110755 110756 110757 110758 110759 110760 110761 110762 110763 110764 110765 110766 110767 110768 110769 110770 110771 110772 110773 110774 110775 110776 110777 110778 110779 110780 110781 110782 110783 110784 110785 110786 110787 110788 110789 110790 110791 110792 110793 110794 110795 110796 110797 110798 110799 110800 110801 110802 110803 110804 110805 110806 110807 110808 110809 110810 110811 110812 110813 110814 110815 110816 110817 110818 110819 110820 110821 110822 110823 110824 110825 110826 110827 110828 110829 110830 110831 110832 110833 110834 110835 110836 110837 110838 110839 110840 110841 110842 110843 110844 110845 110846 110847 110848 110849 110850 110851 110852 110853 110854 110855 110856 110857 110858 110859 110860 110861 110862 110863 110864 110865 110866 110867 110868 110869 110870 110871 110872 110873 110874 110875 110876 110877 110878 110879 110880 110881 110882 110883 110884 110885 110886 110887 110888 110889 110890 110891 110892 110893 110894 110895 110896 110897 110898 110899 110900 110901 110902 110903 110904 110905 110906 110907 110908 110909 110910 110911 110912 110913 110914 110915 110916 110917 110918 110919 110920 110921 110922 110923 110924 110925 110926 110927 110928 110929 110930 110931 110932 110933 110934 110935 110936 110937 110938 110939 110940 110941 110942 110943 110944 110945 110946 110947 110948 110949 110950 110951 110952 110953 110954 110955 110956 110957 110958 110959 110960 110961 110962 110963 110964 110965 110966 110967 110968 110969 110970 110971 110972 110973 110974 110975 110976 110977 110978 110979 110980 110981 110982 110983 110984 110985 110986 110987 110988 110989 110990 110991 110992 110993 110994 110995 110996 110997 110998 110999 111000 111001 111002 111003 111004 111005 111006 111007 111008 111009 111010 111011 111012 111013 111014 111015 111016 111017 111018 111019 111020 111021 111022 111023 111024 111025 111026 111027 111028 111029 111030 111031 111032 111033 111034 111035 111036 111037 111038 111039 111040 111041 111042 111043 111044 111045 111046 111047 111048 111049 111050 111051 111052 111053 111054 111055 111056 111057 111058 111059 111060 111061 111062 111063 111064 111065 111066 111067 111068 111069 111070 111071 111072 111073 111074 111075 111076 111077 111078 111079 111080 111081 111082 111083 111084 111085 111086 111087 111088 111089 111090 111091 111092 111093 111094 111095 111096 111097 111098 111099 111100 111101 111102 111103 111104 111105 111106 111107 111108 111109 111110 111111 111112 111113 111114 111115 111116 111117 111118 111119 111120 111121 111122 111123 111124 111125 111126 111127 111128 111129 111130 111131 111132 111133 111134 111135 111136 111137 111138 111139 111140 111141 111142 111143 111144 111145 111146 111147 111148 111149 111150 111151 111152 111153 111154 111155 111156 111157 111158 111159 111160 111161 111162 111163 111164 111165 111166 111167 111168 111169 111170 111171 111172 111173 111174 111175 111176 111177 111178 111179 111180 111181 111182 111183 111184 111185 111186 111187 111188 111189 111190 111191 111192 111193 111194 111195 111196 111197 111198 111199 111200 111201 111202 111203 111204 111205 111206 111207 111208 111209 111210 111211 111212 111213 111214 111215 111216 111217 111218 111219 111220 111221 111222 111223 111224 111225 111226 111227 111228 111229 111230 111231 111232 111233 111234 111235 111236 111237 111238 111239 111240 111241 111242 111243 111244 111245 111246 111247 111248 111249 111250 111251 111252 111253 111254 111255 111256 111257 111258 111259 111260 111261 111262 111263 111264 111265 111266 111267 111268 111269 111270 111271 111272 111273 111274 111275 111276 111277 111278 111279 111280 111281 111282 111283 111284 111285 111286 111287 111288 111289 111290 111291 111292 111293 111294 111295 111296 111297 111298 111299 111300 111301 111302 111303 111304 111305 111306 111307 111308 111309 111310 111311 111312 111313 111314 111315 111316 111317 111318 111319 111320 111321 111322 111323 111324 111325 111326 111327 111328 111329 111330 111331 111332 111333 111334 111335 111336 111337 111338 111339 111340 111341 111342 111343 111344 111345 111346 111347 111348 111349 111350 111351 111352 111353 111354 111355 111356 111357 111358 111359 111360 111361 111362 111363 111364 111365 111366 111367 111368 111369 111370 111371 111372 111373 111374 111375 111376 111377 111378 111379 111380 111381 111382 111383 111384 111385 111386 111387 111388 111389 111390 111391 111392 111393 111394 111395 111396 111397 111398 111399 111400 111401 111402 111403 111404 111405 111406 111407 111408 111409 111410 111411 111412 111413 111414 111415 111416 111417 111418 111419 111420 111421 111422 111423 111424 111425 111426 111427 111428 111429 111430 111431 111432 111433 111434 111435 111436 111437 111438 111439 111440 111441 111442 111443 111444 111445 111446 111447 111448 111449 111450 111451 111452 111453 111454 111455 111456 111457 111458 111459 111460 111461 111462 111463 111464 111465 111466 111467 111468 111469 111470 111471 111472 111473 111474 111475 111476 111477 111478 111479 111480 111481 111482 111483 111484 111485 111486 111487 111488 111489 111490 111491 111492 111493 111494 111495 111496 111497 111498 111499 111500 111501 111502 111503 111504 111505 111506 111507 111508 111509 111510 111511 111512 111513 111514 111515 111516 111517 111518 111519 111520 111521 111522 111523 111524 111525 111526 111527 111528 111529 111530 111531 111532 111533 111534 111535 111536 111537 111538 111539 111540 111541 111542 111543 111544 111545 111546 111547 111548 111549 111550 111551 111552 111553 111554 111555 111556 111557 111558 111559 111560 111561 111562 111563 111564 111565 111566 111567 111568 111569 111570 111571 111572 111573 111574 111575 111576 111577 111578 111579 111580 111581 111582 111583 111584 111585 111586 111587 111588 111589 111590 111591 111592 111593 111594 111595 111596 111597 111598 111599 111600 111601 111602 111603 111604 111605 111606 111607 111608 111609 111610 111611 111612 111613 111614 111615 111616 111617 111618 111619 111620 111621 111622 111623 111624 111625 111626 111627 111628 111629 111630 111631 111632 111633 111634 111635 111636 111637 111638 111639 111640 111641 111642 111643 111644 111645 111646 111647 111648 111649 111650 111651 111652 111653 111654 111655 111656 111657 111658 111659 111660 111661 111662 111663 111664 111665 111666 111667 111668 111669 111670 111671 111672 111673 111674 111675 111676 111677 111678 111679 111680 111681 111682 111683 111684 111685 111686 111687 111688 111689 111690 111691 111692 111693 111694 111695 111696 111697 111698 111699 111700 111701 111702 111703 111704 111705 111706 111707 111708 111709 111710 111711 111712 111713 111714 111715 111716 111717 111718 111719 111720 111721 111722 111723 111724 111725 111726 111727 111728 111729 111730 111731 111732 111733 111734 111735 111736 111737 111738 111739 111740 111741 111742 111743 111744 111745 111746 111747 111748 111749 111750 111751 111752 111753 111754 111755 111756 111757 111758 111759 111760 111761 111762 111763 111764 111765 111766 111767 111768 111769 111770 111771 111772 111773 111774 111775 111776 111777 111778 111779 111780 111781 111782 111783 111784 111785 111786 111787 111788 111789 111790 111791 111792 111793 111794 111795 111796 111797 111798 111799 111800 111801 111802 111803 111804 111805 111806 111807 111808 111809 111810 111811 111812 111813 111814 111815 111816 111817 111818 111819 111820 111821 111822 111823 111824 111825 111826 111827 111828 111829 111830 111831 111832 111833 111834 111835 111836 111837 111838 111839 111840 111841 111842 111843 111844 111845 111846 111847 111848 111849 111850 111851 111852 111853 111854 111855 111856 111857 111858 111859 111860 111861 111862 111863 111864 111865 111866 111867 111868 111869 111870 111871 111872 111873 111874 111875 111876 111877 111878 111879 111880 111881 111882 111883 111884 111885 111886 111887 111888 111889 111890 111891 111892 111893 111894 111895 111896 111897 111898 111899 111900 111901 111902 111903 111904 111905 111906 111907 111908 111909 111910 111911 111912 111913 111914 111915 111916 111917 111918 111919 111920 111921 111922 111923 111924 111925 111926 111927 111928 111929 111930 111931 111932 111933 111934 111935 111936 111937 111938 111939 111940 111941 111942 111943 111944 111945 111946 111947 111948 111949 111950 111951 111952 111953 111954 111955 111956 111957 111958 111959 111960 111961 111962 111963 111964 111965 111966 111967 111968 111969 111970 111971 111972 111973 111974 111975 111976 111977 111978 111979 111980 111981 111982 111983 111984 111985 111986 111987 111988 111989 111990 111991 111992 111993 111994 111995 111996 111997 111998 111999 112000 112001 112002 112003 112004 112005 112006 112007 112008 112009 112010 112011 112012 112013 112014 112015 112016 112017 112018 112019 112020 112021 112022 112023 112024 112025 112026 112027 112028 112029 112030 112031 112032 112033 112034 112035 112036 112037 112038 112039 112040 112041 112042 112043 112044 112045 112046 112047 112048 112049 112050 112051 112052 112053 112054 112055 112056 112057 112058 112059 112060 112061 112062 112063 112064 112065 112066 112067 112068 112069 112070 112071 112072 112073 112074 112075 112076 112077 112078 112079 112080 112081 112082 112083 112084 112085 112086 112087 112088 112089 112090 112091 112092 112093 112094 112095 112096 112097 112098 112099 112100 112101 112102 112103 112104 112105 112106 112107 112108 112109 112110 112111 112112 112113 112114 112115 112116 112117 112118 112119 112120 112121 112122 112123 112124 112125 112126 112127 112128 112129 112130 112131 112132 112133 112134 112135 112136 112137 112138 112139 112140 112141 112142 112143 112144 112145 112146 112147 112148 112149 112150 112151 112152 112153 112154 112155 112156 112157 112158 112159 112160 112161 112162 112163 112164 112165 112166 112167 112168 112169 112170 112171 112172 112173 112174 112175 112176 112177 112178 112179 112180 112181 112182 112183 112184 112185 112186 112187 112188 112189 112190 112191 112192 112193 112194 112195 112196 112197 112198 112199 112200 112201 112202 112203 112204 112205 112206 112207 112208 112209 112210 112211 112212 112213 112214 112215 112216 112217 112218 112219 112220 112221 112222 112223 112224 112225 112226 112227 112228 112229 112230 112231 112232 112233 112234 112235 112236 112237 112238 112239 112240 112241 112242 112243 112244 112245 112246 112247 112248 112249 112250 112251 112252 112253 112254 112255 112256 112257 112258 112259 112260 112261 112262 112263 112264 112265 112266 112267 112268 112269 112270 112271 112272 112273 112274 112275 112276 112277 112278 112279 112280 112281 112282 112283 112284 112285 112286 112287 112288 112289 112290 112291 112292 112293 112294 112295 112296 112297 112298 112299 112300 112301 112302 112303 112304 112305 112306 112307 112308 112309 112310 112311 112312 112313 112314 112315 112316 112317 112318 112319 112320 112321 112322 112323 112324 112325 112326 112327 112328 112329 112330 112331 112332 112333 112334 112335 112336 112337 112338 112339 112340 112341 112342 112343 112344 112345 112346 112347 112348 112349 112350 112351 112352 112353 112354 112355 112356 112357 112358 112359 112360 112361 112362 112363 112364 112365 112366 112367 112368 112369 112370 112371 112372 112373 112374 112375 112376 112377 112378 112379 112380 112381 112382 112383 112384 112385 112386 112387 112388 112389 112390 112391 112392 112393 112394 112395 112396 112397 112398 112399 112400 112401 112402 112403 112404 112405 112406 112407 112408 112409 112410 112411 112412 112413 112414 112415 112416 112417 112418 112419 112420 112421 112422 112423 112424 112425 112426 112427 112428 112429 112430 112431 112432 112433 112434 112435 112436 112437 112438 112439 112440 112441 112442 112443 112444 112445 112446 112447 112448 112449 112450 112451 112452 112453 112454 112455 112456 112457 112458 112459 112460 112461 112462 112463 112464 112465 112466 112467 112468 112469 112470 112471 112472 112473 112474 112475 112476 112477 112478 112479 112480 112481 112482 112483 112484 112485 112486 112487 112488 112489 112490 112491 112492 112493 112494 112495 112496 112497 112498 112499 112500 112501 112502 112503 112504 112505 112506 112507 112508 112509 112510 112511 112512 112513 112514 112515 112516 112517 112518 112519 112520 112521 112522 112523 112524 112525 112526 112527 112528 112529 112530 112531 112532 112533 112534 112535 112536 112537 112538 112539 112540 112541 112542 112543 112544 112545 112546 112547 112548 112549 112550 112551 112552 112553 112554 112555 112556 112557 112558 112559 112560 112561 112562 112563 112564 112565 112566 112567 112568 112569 112570 112571 112572 112573 112574 112575 112576 112577 112578 112579 112580 112581 112582 112583 112584 112585 112586 112587 112588 112589 112590 112591 112592 112593 112594 112595 112596 112597 112598 112599 112600 112601 112602 112603 112604 112605 112606 112607 112608 112609 112610 112611 112612 112613 112614 112615 112616 112617 112618 112619 112620 112621 112622 112623 112624 112625 112626 112627 112628 112629 112630 112631 112632 112633 112634 112635 112636 112637 112638 112639 112640 112641 112642 112643 112644 112645 112646 112647 112648 112649 112650 112651 112652 112653 112654 112655 112656 112657 112658 112659 112660 112661 112662 112663 112664 112665 112666 112667 112668 112669 112670 112671 112672 112673 112674 112675 112676 112677 112678 112679 112680 112681 112682 112683 112684 112685 112686 112687 112688 112689 112690 112691 112692 112693 112694 112695 112696 112697 112698 112699 112700 112701 112702 112703 112704 112705 112706 112707 112708 112709 112710 112711 112712 112713 112714 112715 112716 112717 112718 112719 112720 112721 112722 112723 112724 112725 112726 112727 112728 112729 112730 112731 112732 112733 112734 112735 112736 112737 112738 112739 112740 112741 112742 112743 112744 112745 112746 112747 112748 112749 112750 112751 112752 112753 112754 112755 112756 112757 112758 112759 112760 112761 112762 112763 112764 112765 112766 112767 112768 112769 112770 112771 112772 112773 112774 112775 112776 112777 112778 112779 112780 112781 112782 112783 112784 112785 112786 112787 112788 112789 112790 112791 112792 112793 112794 112795 112796 112797 112798 112799 112800 112801 112802 112803 112804 112805 112806 112807 112808 112809 112810 112811 112812 112813 112814 112815 112816 112817 112818 112819 112820 112821 112822 112823 112824 112825 112826 112827 112828 112829 112830 112831 112832 112833 112834 112835 112836 112837 112838 112839 112840 112841 112842 112843 112844 112845 112846 112847 112848 112849 112850 112851 112852 112853 112854 112855 112856 112857 112858 112859 112860 112861 112862 112863 112864 112865 112866 112867 112868 112869 112870 112871 112872 112873 112874 112875 112876 112877 112878 112879 112880 112881 112882 112883 112884 112885 112886 112887 112888 112889 112890 112891 112892 112893 112894 112895 112896 112897 112898 112899 112900 112901 112902 112903 112904 112905 112906 112907 112908 112909 112910 112911 112912 112913 112914 112915 112916 112917 112918 112919 112920 112921 112922 112923 112924 112925 112926 112927 112928 112929 112930 112931 112932 112933 112934 112935 112936 112937 112938 112939 112940 112941 112942 112943 112944 112945 112946 112947 112948 112949 112950 112951 112952 112953 112954 112955 112956 112957 112958 112959 112960 112961 112962 112963 112964 112965 112966 112967 112968 112969 112970 112971 112972 112973 112974 112975 112976 112977 112978 112979 112980 112981 112982 112983 112984 112985 112986 112987 112988 112989 112990 112991 112992 112993 112994 112995 112996 112997 112998 112999 113000 113001 113002 113003 113004 113005 113006 113007 113008 113009 113010 113011 113012 113013 113014 113015 113016 113017 113018 113019 113020 113021 113022 113023 113024 113025 113026 113027 113028 113029 113030 113031 113032 113033 113034 113035 113036 113037 113038 113039 113040 113041 113042 113043 113044 113045 113046 113047 113048 113049 113050 113051 113052 113053 113054 113055 113056 113057 113058 113059 113060 113061 113062 113063 113064 113065 113066 113067 113068 113069 113070 113071 113072 113073 113074 113075 113076 113077 113078 113079 113080 113081 113082 113083 113084 113085 113086 113087 113088 113089 113090 113091 113092 113093 113094 113095 113096 113097 113098 113099 113100 113101 113102 113103 113104 113105 113106 113107 113108 113109 113110 113111 113112 113113 113114 113115 113116 113117 113118 113119 113120 113121 113122 113123 113124 113125 113126 113127 113128 113129 113130 113131 113132 113133 113134 113135 113136 113137 113138 113139 113140 113141 113142 113143 113144 113145 113146 113147 113148 113149 113150 113151 113152 113153 113154 113155 113156 113157 113158 113159 113160 113161 113162 113163 113164 113165 113166 113167 113168 113169 113170 113171 113172 113173 113174 113175 113176 113177 113178 113179 113180 113181 113182 113183 113184 113185 113186 113187 113188 113189 113190 113191 113192 113193 113194 113195 113196 113197 113198 113199 113200 113201 113202 113203 113204 113205 113206 113207 113208 113209 113210 113211 113212 113213 113214 113215 113216 113217 113218 113219 113220 113221 113222 113223 113224 113225 113226 113227 113228 113229 113230 113231 113232 113233 113234 113235 113236 113237 113238 113239 113240 113241 113242 113243 113244 113245 113246 113247 113248 113249 113250 113251 113252 113253 113254 113255 113256 113257 113258 113259 113260 113261 113262 113263 113264 113265 113266 113267 113268 113269 113270 113271 113272 113273 113274 113275 113276 113277 113278 113279 113280 113281 113282 113283 113284 113285 113286 113287 113288 113289 113290 113291 113292 113293 113294 113295 113296 113297 113298 113299 113300 113301 113302 113303 113304 113305 113306 113307 113308 113309 113310 113311 113312 113313 113314 113315 113316 113317 113318 113319 113320 113321 113322 113323 113324 113325 113326 113327 113328 113329 113330 113331 113332 113333 113334 113335 113336 113337 113338 113339 113340 113341 113342 113343 113344 113345 113346 113347 113348 113349 113350 113351 113352 113353 113354 113355 113356 113357 113358 113359 113360 113361 113362 113363 113364 113365 113366 113367 113368 113369 113370 113371 113372 113373 113374 113375 113376 113377 113378 113379 113380 113381 113382 113383 113384 113385 113386 113387 113388 113389 113390 113391 113392 113393 113394 113395 113396 113397 113398 113399 113400 113401 113402 113403 113404 113405 113406 113407 113408 113409 113410 113411 113412 113413 113414 113415 113416 113417 113418 113419 113420 113421 113422 113423 113424 113425 113426 113427 113428 113429 113430 113431 113432 113433 113434 113435 113436 113437 113438 113439 113440 113441 113442 113443 113444 113445 113446 113447 113448 113449 113450 113451 113452 113453 113454 113455 113456 113457 113458 113459 113460 113461 113462 113463 113464 113465 113466 113467 113468 113469 113470 113471 113472 113473 113474 113475 113476 113477 113478 113479 113480 113481 113482 113483 113484 113485 113486 113487 113488 113489 113490 113491 113492 113493 113494 113495 113496 113497 113498 113499 113500 113501 113502 113503 113504 113505 113506 113507 113508 113509 113510 113511 113512 113513 113514 113515 113516 113517 113518 113519 113520 113521 113522 113523 113524 113525 113526 113527 113528 113529 113530 113531 113532 113533 113534 113535 113536 113537 113538 113539 113540 113541 113542 113543 113544 113545 113546 113547 113548 113549 113550 113551 113552 113553 113554 113555 113556 113557 113558 113559 113560 113561 113562 113563 113564 113565 113566 113567 113568 113569 113570 113571 113572 113573 113574 113575 113576 113577 113578 113579 113580 113581 113582 113583 113584 113585 113586 113587 113588 113589 113590 113591 113592 113593 113594 113595 113596 113597 113598 113599 113600 113601 113602 113603 113604 113605 113606 113607 113608 113609 113610 113611 113612 113613 113614 113615 113616 113617 113618 113619 113620 113621 113622 113623 113624 113625 113626 113627 113628 113629 113630 113631 113632 113633 113634 113635 113636 113637 113638 113639 113640 113641 113642 113643 113644 113645 113646 113647 113648 113649 113650 113651 113652 113653 113654 113655 113656 113657 113658 113659 113660 113661 113662 113663 113664 113665 113666 113667 113668 113669 113670 113671 113672 113673 113674 113675 113676 113677 113678 113679 113680 113681 113682 113683 113684 113685 113686 113687 113688 113689 113690 113691 113692 113693 113694 113695 113696 113697 113698 113699 113700 113701 113702 113703 113704 113705 113706 113707 113708 113709 113710 113711 113712 113713 113714 113715 113716 113717 113718 113719 113720 113721 113722 113723 113724 113725 113726 113727 113728 113729 113730 113731 113732 113733 113734 113735 113736 113737 113738 113739 113740 113741 113742 113743 113744 113745 113746 113747 113748 113749 113750 113751 113752 113753 113754 113755 113756 113757 113758 113759 113760 113761 113762 113763 113764 113765 113766 113767 113768 113769 113770 113771 113772 113773 113774 113775 113776 113777 113778 113779 113780 113781 113782 113783 113784 113785 113786 113787 113788 113789 113790 113791 113792 113793 113794 113795 113796 113797 113798 113799 113800 113801 113802 113803 113804 113805 113806 113807 113808 113809 113810 113811 113812 113813 113814 113815 113816 113817 113818 113819 113820 113821 113822 113823 113824 113825 113826 113827 113828 113829 113830 113831 113832 113833 113834 113835 113836 113837 113838 113839 113840 113841 113842 113843 113844 113845 113846 113847 113848 113849 113850 113851 113852 113853 113854 113855 113856 113857 113858 113859 113860 113861 113862 113863 113864 113865 113866 113867 113868 113869 113870 113871 113872 113873 113874 113875 113876 113877 113878 113879 113880 113881 113882 113883 113884 113885 113886 113887 113888 113889 113890 113891 113892 113893 113894 113895 113896 113897 113898 113899 113900 113901 113902 113903 113904 113905 113906 113907 113908 113909 113910 113911 113912 113913 113914 113915 113916 113917 113918 113919 113920 113921 113922 113923 113924 113925 113926 113927 113928 113929 113930 113931 113932 113933 113934 113935 113936 113937 113938 113939 113940 113941 113942 113943 113944 113945 113946 113947 113948 113949 113950 113951 113952 113953 113954 113955 113956 113957 113958 113959 113960 113961 113962 113963 113964 113965 113966 113967 113968 113969 113970 113971 113972 113973 113974 113975 113976 113977 113978 113979 113980 113981 113982 113983 113984 113985 113986 113987 113988 113989 113990 113991 113992 113993 113994 113995 113996 113997 113998 113999 114000 114001 114002 114003 114004 114005 114006 114007 114008 114009 114010 114011 114012 114013 114014 114015 114016 114017 114018 114019 114020 114021 114022 114023 114024 114025 114026 114027 114028 114029 114030 114031 114032 114033 114034 114035 114036 114037 114038 114039 114040 114041 114042 114043 114044 114045 114046 114047 114048 114049 114050 114051 114052 114053 114054 114055 114056 114057 114058 114059 114060 114061 114062 114063 114064 114065 114066 114067 114068 114069 114070 114071 114072 114073 114074 114075 114076 114077 114078 114079 114080 114081 114082 114083 114084 114085 114086 114087 114088 114089 114090 114091 114092 114093 114094 114095 114096 114097 114098 114099 114100 114101 114102 114103 114104 114105 114106 114107 114108 114109 114110 114111 114112 114113 114114 114115 114116 114117 114118 114119 114120 114121 114122 114123 114124 114125 114126 114127 114128 114129 114130 114131 114132 114133 114134 114135 114136 114137 114138 114139 114140 114141 114142 114143 114144 114145 114146 114147 114148 114149 114150 114151 114152 114153 114154 114155 114156 114157 114158 114159 114160 114161 114162 114163 114164 114165 114166 114167 114168 114169 114170 114171 114172 114173 114174 114175 114176 114177 114178 114179 114180 114181 114182 114183 114184 114185 114186 114187 114188 114189 114190 114191 114192 114193 114194 114195 114196 114197 114198 114199 114200 114201 114202 114203 114204 114205 114206 114207 114208 114209 114210 114211 114212 114213 114214 114215 114216 114217 114218 114219 114220 114221 114222 114223 114224 114225 114226 114227 114228 114229 114230 114231 114232 114233 114234 114235 114236 114237 114238 114239 114240 114241 114242 114243 114244 114245 114246 114247 114248 114249 114250 114251 114252 114253 114254 114255 114256 114257 114258 114259 114260 114261 114262 114263 114264 114265 114266 114267 114268 114269 114270 114271 114272 114273 114274 114275 114276 114277 114278 114279 114280 114281 114282 114283 114284 114285 114286 114287 114288 114289 114290 114291 114292 114293 114294 114295 114296 114297 114298 114299 114300 114301 114302 114303 114304 114305 114306 114307 114308 114309 114310 114311 114312 114313 114314 114315 114316 114317 114318 114319 114320 114321 114322 114323 114324 114325 114326 114327 114328 114329 114330 114331 114332 114333 114334 114335 114336 114337 114338 114339 114340 114341 114342 114343 114344 114345 114346 114347 114348 114349 114350 114351 114352 114353 114354 114355 114356 114357 114358 114359 114360 114361 114362 114363 114364 114365 114366 114367 114368 114369 114370 114371 114372 114373 114374 114375 114376 114377 114378 114379 114380 114381 114382 114383 114384 114385 114386 114387 114388 114389 114390 114391 114392 114393 114394 114395 114396 114397 114398 114399 114400 114401 114402 114403 114404 114405 114406 114407 114408 114409 114410 114411 114412 114413 114414 114415 114416 114417 114418 114419 114420 114421 114422 114423 114424 114425 114426 114427 114428 114429 114430 114431 114432 114433 114434 114435 114436 114437 114438 114439 114440 114441 114442 114443 114444 114445 114446 114447 114448 114449 114450 114451 114452 114453 114454 114455 114456 114457 114458 114459 114460 114461 114462 114463 114464 114465 114466 114467 114468 114469 114470 114471 114472 114473 114474 114475 114476 114477 114478 114479 114480 114481 114482 114483 114484 114485 114486 114487 114488 114489 114490 114491 114492 114493 114494 114495 114496 114497 114498 114499 114500 114501 114502 114503 114504 114505 114506 114507 114508 114509 114510 114511 114512 114513 114514 114515 114516 114517 114518 114519 114520 114521 114522 114523 114524 114525 114526 114527 114528 114529 114530 114531 114532 114533 114534 114535 114536 114537 114538 114539 114540 114541 114542 114543 114544 114545 114546 114547 114548 114549 114550 114551 114552 114553 114554 114555 114556 114557 114558 114559 114560 114561 114562 114563 114564 114565 114566 114567 114568 114569 114570 114571 114572 114573 114574 114575 114576 114577 114578 114579 114580 114581 114582 114583 114584 114585 114586 114587 114588 114589 114590 114591 114592 114593 114594 114595 114596 114597 114598 114599 114600 114601 114602 114603 114604 114605 114606 114607 114608 114609 114610 114611 114612 114613 114614 114615 114616 114617 114618 114619 114620 114621 114622 114623 114624 114625 114626 114627 114628 114629 114630 114631 114632 114633 114634 114635 114636 114637 114638 114639 114640 114641 114642 114643 114644 114645 114646 114647 114648 114649 114650 114651 114652 114653 114654 114655 114656 114657 114658 114659 114660 114661 114662 114663 114664 114665 114666 114667 114668 114669 114670 114671 114672 114673 114674 114675 114676 114677 114678 114679 114680 114681 114682 114683 114684 114685 114686 114687 114688 114689 114690 114691 114692 114693 114694 114695 114696 114697 114698 114699 114700 114701 114702 114703 114704 114705 114706 114707 114708 114709 114710 114711 114712 114713 114714 114715 114716 114717 114718 114719 114720 114721 114722 114723 114724 114725 114726 114727 114728 114729 114730 114731 114732 114733 114734 114735 114736 114737 114738 114739 114740 114741 114742 114743 114744 114745 114746 114747 114748 114749 114750 114751 114752 114753 114754 114755 114756 114757 114758 114759 114760 114761 114762 114763 114764 114765 114766 114767 114768 114769 114770 114771 114772 114773 114774 114775 114776 114777 114778 114779 114780 114781 114782 114783 114784 114785 114786 114787 114788 114789 114790 114791 114792 114793 114794 114795 114796 114797 114798 114799 114800 114801 114802 114803 114804 114805 114806 114807 114808 114809 114810 114811 114812 114813 114814 114815 114816 114817 114818 114819 114820 114821 114822 114823 114824 114825 114826 114827 114828 114829 114830 114831 114832 114833 114834 114835 114836 114837 114838 114839 114840 114841 114842 114843 114844 114845 114846 114847 114848 114849 114850 114851 114852 114853 114854 114855 114856 114857 114858 114859 114860 114861 114862 114863 114864 114865 114866 114867 114868 114869 114870 114871 114872 114873 114874 114875 114876 114877 114878 114879 114880 114881 114882 114883 114884 114885 114886 114887 114888 114889 114890 114891 114892 114893 114894 114895 114896 114897 114898 114899 114900 114901 114902 114903 114904 114905 114906 114907 114908 114909 114910 114911 114912 114913 114914 114915 114916 114917 114918 114919 114920 114921 114922 114923 114924 114925 114926 114927 114928 114929 114930 114931 114932 114933 114934 114935 114936 114937 114938 114939 114940 114941 114942 114943 114944 114945 114946 114947 114948 114949 114950 114951 114952 114953 114954 114955 114956 114957 114958 114959 114960 114961 114962 114963 114964 114965 114966 114967 114968 114969 114970 114971 114972 114973 114974 114975 114976 114977 114978 114979 114980 114981 114982 114983 114984 114985 114986 114987 114988 114989 114990 114991 114992 114993 114994 114995 114996 114997 114998 114999 115000 115001 115002 115003 115004 115005 115006 115007 115008 115009 115010 115011 115012 115013 115014 115015 115016 115017 115018 115019 115020 115021 115022 115023 115024 115025 115026 115027 115028 115029 115030 115031 115032 115033 115034 115035 115036 115037 115038 115039 115040 115041 115042 115043 115044 115045 115046 115047 115048 115049 115050 115051 115052 115053 115054 115055 115056 115057 115058 115059 115060 115061 115062 115063 115064 115065 115066 115067 115068 115069 115070 115071 115072 115073 115074 115075 115076 115077 115078 115079 115080 115081 115082 115083 115084 115085 115086 115087 115088 115089 115090 115091 115092 115093 115094 115095 115096 115097 115098 115099 115100 115101 115102 115103 115104 115105 115106 115107 115108 115109 115110 115111 115112 115113 115114 115115 115116 115117 115118 115119 115120 115121 115122 115123 115124 115125 115126 115127 115128 115129 115130 115131 115132 115133 115134 115135 115136 115137 115138 115139 115140 115141 115142 115143 115144 115145 115146 115147 115148 115149 115150 115151 115152 115153 115154 115155 115156 115157 115158 115159 115160 115161 115162 115163 115164 115165 115166 115167 115168 115169 115170 115171 115172 115173 115174 115175 115176 115177 115178 115179 115180 115181 115182 115183 115184 115185 115186 115187 115188 115189 115190 115191 115192 115193 115194 115195 115196 115197 115198 115199 115200 115201 115202 115203 115204 115205 115206 115207 115208 115209 115210 115211 115212 115213 115214 115215 115216 115217 115218 115219 115220 115221 115222 115223 115224 115225 115226 115227 115228 115229 115230 115231 115232 115233 115234 115235 115236 115237 115238 115239 115240 115241 115242 115243 115244 115245 115246 115247 115248 115249 115250 115251 115252 115253 115254 115255 115256 115257 115258 115259 115260 115261 115262 115263 115264 115265 115266 115267 115268 115269 115270 115271 115272 115273 115274 115275 115276 115277 115278 115279 115280 115281 115282 115283 115284 115285 115286 115287 115288 115289 115290 115291 115292 115293 115294 115295 115296 115297 115298 115299 115300 115301 115302 115303 115304 115305 115306 115307 115308 115309 115310 115311 115312 115313 115314 115315 115316 115317 115318 115319 115320 115321 115322 115323 115324 115325 115326 115327 115328 115329 115330 115331 115332 115333 115334 115335 115336 115337 115338 115339 115340 115341 115342 115343 115344 115345 115346 115347 115348 115349 115350 115351 115352 115353 115354 115355 115356 115357 115358 115359 115360 115361 115362 115363 115364 115365 115366 115367 115368 115369 115370 115371 115372 115373 115374 115375 115376 115377 115378 115379 115380 115381 115382 115383 115384 115385 115386 115387 115388 115389 115390 115391 115392 115393 115394 115395 115396 115397 115398 115399 115400 115401 115402 115403 115404 115405 115406 115407 115408 115409 115410 115411 115412 115413 115414 115415 115416 115417 115418 115419 115420 115421 115422 115423 115424 115425 115426 115427 115428 115429 115430 115431 115432 115433 115434 115435 115436 115437 115438 115439 115440 115441 115442 115443 115444 115445 115446 115447 115448 115449 115450 115451 115452 115453 115454 115455 115456 115457 115458 115459 115460 115461 115462 115463 115464 115465 115466 115467 115468 115469 115470 115471 115472 115473 115474 115475 115476 115477 115478 115479 115480 115481 115482 115483 115484 115485 115486 115487 115488 115489 115490 115491 115492 115493 115494 115495 115496 115497 115498 115499 115500 115501 115502 115503 115504 115505 115506 115507 115508 115509 115510 115511 115512 115513 115514 115515 115516 115517 115518 115519 115520 115521 115522 115523 115524 115525 115526 115527 115528 115529 115530 115531 115532 115533 115534 115535 115536 115537 115538 115539 115540 115541 115542 115543 115544 115545 115546 115547 115548 115549 115550 115551 115552 115553 115554 115555 115556 115557 115558 115559 115560 115561 115562 115563 115564 115565 115566 115567 115568 115569 115570 115571 115572 115573 115574 115575 115576 115577 115578 115579 115580 115581 115582 115583 115584 115585 115586 115587 115588 115589 115590 115591 115592 115593 115594 115595 115596 115597 115598 115599 115600 115601 115602 115603 115604 115605 115606 115607 115608 115609 115610 115611 115612 115613 115614 115615 115616 115617 115618 115619 115620 115621 115622 115623 115624 115625 115626 115627 115628 115629 115630 115631 115632 115633 115634 115635 115636 115637 115638 115639 115640 115641 115642 115643 115644 115645 115646 115647 115648 115649 115650 115651 115652 115653 115654 115655 115656 115657 115658 115659 115660 115661 115662 115663 115664 115665 115666 115667 115668 115669 115670 115671 115672 115673 115674 115675 115676 115677 115678 115679 115680 115681 115682 115683 115684 115685 115686 115687 115688 115689 115690 115691 115692 115693 115694 115695 115696 115697 115698 115699 115700 115701 115702 115703 115704 115705 115706 115707 115708 115709 115710 115711 115712 115713 115714 115715 115716 115717 115718 115719 115720 115721 115722 115723 115724 115725 115726 115727 115728 115729 115730 115731 115732 115733 115734 115735 115736 115737 115738 115739 115740 115741 115742 115743 115744 115745 115746 115747 115748 115749 115750 115751 115752 115753 115754 115755 115756 115757 115758 115759 115760 115761 115762 115763 115764 115765 115766 115767 115768 115769 115770 115771 115772 115773 115774 115775 115776 115777 115778 115779 115780 115781 115782 115783 115784 115785 115786 115787 115788 115789 115790 115791 115792 115793 115794 115795 115796 115797 115798 115799 115800 115801 115802 115803 115804 115805 115806 115807 115808 115809 115810 115811 115812 115813 115814 115815 115816 115817 115818 115819 115820 115821 115822 115823 115824 115825 115826 115827 115828 115829 115830 115831 115832 115833 115834 115835 115836 115837 115838 115839 115840 115841 115842 115843 115844 115845 115846 115847 115848 115849 115850 115851 115852 115853 115854 115855 115856 115857 115858 115859 115860 115861 115862 115863 115864 115865 115866 115867 115868 115869 115870 115871 115872 115873 115874 115875 115876 115877 115878 115879 115880 115881 115882 115883 115884 115885 115886 115887 115888 115889 115890 115891 115892 115893 115894 115895 115896 115897 115898 115899 115900 115901 115902 115903 115904 115905 115906 115907 115908 115909 115910 115911 115912 115913 115914 115915 115916 115917 115918 115919 115920 115921 115922 115923 115924 115925 115926 115927 115928 115929 115930 115931 115932 115933 115934 115935 115936 115937 115938 115939 115940 115941 115942 115943 115944 115945 115946 115947 115948 115949 115950 115951 115952 115953 115954 115955 115956 115957 115958 115959 115960 115961 115962 115963 115964 115965 115966 115967 115968 115969 115970 115971 115972 115973 115974 115975 115976 115977 115978 115979 115980 115981 115982 115983 115984 115985 115986 115987 115988 115989 115990 115991 115992 115993 115994 115995 115996 115997 115998 115999 116000 116001 116002 116003 116004 116005 116006 116007 116008 116009 116010 116011 116012 116013 116014 116015 116016 116017 116018 116019 116020 116021 116022 116023 116024 116025 116026 116027 116028 116029 116030 116031 116032 116033 116034 116035 116036 116037 116038 116039 116040 116041 116042 116043 116044 116045 116046 116047 116048 116049 116050 116051 116052 116053 116054 116055 116056 116057 116058 116059 116060 116061 116062 116063 116064 116065 116066 116067 116068 116069 116070 116071 116072 116073 116074 116075 116076 116077 116078 116079 116080 116081 116082 116083 116084 116085 116086 116087 116088 116089 116090 116091 116092 116093 116094 116095 116096 116097 116098 116099 116100 116101 116102 116103 116104 116105 116106 116107 116108 116109 116110 116111 116112 116113 116114 116115 116116 116117 116118 116119 116120 116121 116122 116123 116124 116125 116126 116127 116128 116129 116130 116131 116132 116133 116134 116135 116136 116137 116138 116139 116140 116141 116142 116143 116144 116145 116146 116147 116148 116149 116150 116151 116152 116153 116154 116155 116156 116157 116158 116159 116160 116161 116162 116163 116164 116165 116166 116167 116168 116169 116170 116171 116172 116173 116174 116175 116176 116177 116178 116179 116180 116181 116182 116183 116184 116185 116186 116187 116188 116189 116190 116191 116192 116193 116194 116195 116196 116197 116198 116199 116200 116201 116202 116203 116204 116205 116206 116207 116208 116209 116210 116211 116212 116213 116214 116215 116216 116217 116218 116219 116220 116221 116222 116223 116224 116225 116226 116227 116228 116229 116230 116231 116232 116233 116234 116235 116236 116237 116238 116239 116240 116241 116242 116243 116244 116245 116246 116247 116248 116249 116250 116251 116252 116253 116254 116255 116256 116257 116258 116259 116260 116261 116262 116263 116264 116265 116266 116267 116268 116269 116270 116271 116272 116273 116274 116275 116276 116277 116278 116279 116280 116281 116282 116283 116284 116285 116286 116287 116288 116289 116290 116291 116292 116293 116294 116295 116296 116297 116298 116299 116300 116301 116302 116303 116304 116305 116306 116307 116308 116309 116310 116311 116312 116313 116314 116315 116316 116317 116318 116319 116320 116321 116322 116323 116324 116325 116326 116327 116328 116329 116330 116331 116332 116333 116334 116335 116336 116337 116338 116339 116340 116341 116342 116343 116344 116345 116346 116347 116348 116349 116350 116351 116352 116353 116354 116355 116356 116357 116358 116359 116360 116361 116362 116363 116364 116365 116366 116367 116368 116369 116370 116371 116372 116373 116374 116375 116376 116377 116378 116379 116380 116381 116382 116383 116384 116385 116386 116387 116388 116389 116390 116391 116392 116393 116394 116395 116396 116397 116398 116399 116400 116401 116402 116403 116404 116405 116406 116407 116408 116409 116410 116411 116412 116413 116414 116415 116416 116417 116418 116419 116420 116421 116422 116423 116424 116425 116426 116427 116428 116429 116430 116431 116432 116433 116434 116435 116436 116437 116438 116439 116440 116441 116442 116443 116444 116445 116446 116447 116448 116449 116450 116451 116452 116453 116454 116455 116456 116457 116458 116459 116460 116461 116462 116463 116464 116465 116466 116467 116468 116469 116470 116471 116472 116473 116474 116475 116476 116477 116478 116479 116480 116481 116482 116483 116484 116485 116486 116487 116488 116489 116490 116491 116492 116493 116494 116495 116496 116497 116498 116499 116500 116501 116502 116503 116504 116505 116506 116507 116508 116509 116510 116511 116512 116513 116514 116515 116516 116517 116518 116519 116520 116521 116522 116523 116524 116525 116526 116527 116528 116529 116530 116531 116532 116533 116534 116535 116536 116537 116538 116539 116540 116541 116542 116543 116544 116545 116546 116547 116548 116549 116550 116551 116552 116553 116554 116555 116556 116557 116558 116559 116560 116561 116562 116563 116564 116565 116566 116567 116568 116569 116570 116571 116572 116573 116574 116575 116576 116577 116578 116579 116580 116581 116582 116583 116584 116585 116586 116587 116588 116589 116590 116591 116592 116593 116594 116595 116596 116597 116598 116599 116600 116601 116602 116603 116604 116605 116606 116607 116608 116609 116610 116611 116612 116613 116614 116615 116616 116617 116618 116619 116620 116621 116622 116623 116624 116625 116626 116627 116628 116629 116630 116631 116632 116633 116634 116635 116636 116637 116638 116639 116640 116641 116642 116643 116644 116645 116646 116647 116648 116649 116650 116651 116652 116653 116654 116655 116656 116657 116658 116659 116660 116661 116662 116663 116664 116665 116666 116667 116668 116669 116670 116671 116672 116673 116674 116675 116676 116677 116678 116679 116680 116681 116682 116683 116684 116685 116686 116687 116688 116689 116690 116691 116692 116693 116694 116695 116696 116697 116698 116699 116700 116701 116702 116703 116704 116705 116706 116707 116708 116709 116710 116711 116712 116713 116714 116715 116716 116717 116718 116719 116720 116721 116722 116723 116724 116725 116726 116727 116728 116729 116730 116731 116732 116733 116734 116735 116736 116737 116738 116739 116740 116741 116742 116743 116744 116745 116746 116747 116748 116749 116750 116751 116752 116753 116754 116755 116756 116757 116758 116759 116760 116761 116762 116763 116764 116765 116766 116767 116768 116769 116770 116771 116772 116773 116774 116775 116776 116777 116778 116779 116780 116781 116782 116783 116784 116785 116786 116787 116788 116789 116790 116791 116792 116793 116794 116795 116796 116797 116798 116799 116800 116801 116802 116803 116804 116805 116806 116807 116808 116809 116810 116811 116812 116813 116814 116815 116816 116817 116818 116819 116820 116821 116822 116823 116824 116825 116826 116827 116828 116829 116830 116831 116832 116833 116834 116835 116836 116837 116838 116839 116840 116841 116842 116843 116844 116845 116846 116847 116848 116849 116850 116851 116852 116853 116854 116855 116856 116857 116858 116859 116860 116861 116862 116863 116864 116865 116866 116867 116868 116869 116870 116871 116872 116873 116874 116875 116876 116877 116878 116879 116880 116881 116882 116883 116884 116885 116886 116887 116888 116889 116890 116891 116892 116893 116894 116895 116896 116897 116898 116899 116900 116901 116902 116903 116904 116905 116906 116907 116908 116909 116910 116911 116912 116913 116914 116915 116916 116917 116918 116919 116920 116921 116922 116923 116924 116925 116926 116927 116928 116929 116930 116931 116932 116933 116934 116935 116936 116937 116938 116939 116940 116941 116942 116943 116944 116945 116946 116947 116948 116949 116950 116951 116952 116953 116954 116955 116956 116957 116958 116959 116960 116961 116962 116963 116964 116965 116966 116967 116968 116969 116970 116971 116972 116973 116974 116975 116976 116977 116978 116979 116980 116981 116982 116983 116984 116985 116986 116987 116988 116989 116990 116991 116992 116993 116994 116995 116996 116997 116998 116999 117000 117001 117002 117003 117004 117005 117006 117007 117008 117009 117010 117011 117012 117013 117014 117015 117016 117017 117018 117019 117020 117021 117022 117023 117024 117025 117026 117027 117028 117029 117030 117031 117032 117033 117034 117035 117036 117037 117038 117039 117040 117041 117042 117043 117044 117045 117046 117047 117048 117049 117050 117051 117052 117053 117054 117055 117056 117057 117058 117059 117060 117061 117062 117063 117064 117065 117066 117067 117068 117069 117070 117071 117072 117073 117074 117075 117076 117077 117078 117079 117080 117081 117082 117083 117084 117085 117086 117087 117088 117089 117090 117091 117092 117093 117094 117095 117096 117097 117098 117099 117100 117101 117102 117103 117104 117105 117106 117107 117108 117109 117110 117111 117112 117113 117114 117115 117116 117117 117118 117119 117120 117121 117122 117123 117124 117125 117126 117127 117128 117129 117130 117131 117132 117133 117134 117135 117136 117137 117138 117139 117140 117141 117142 117143 117144 117145 117146 117147 117148 117149 117150 117151 117152 117153 117154 117155 117156 117157 117158 117159 117160 117161 117162 117163 117164 117165 117166 117167 117168 117169 117170 117171 117172 117173 117174 117175 117176 117177 117178 117179 117180 117181 117182 117183 117184 117185 117186 117187 117188 117189 117190 117191 117192 117193 117194 117195 117196 117197 117198 117199 117200 117201 117202 117203 117204 117205 117206 117207 117208 117209 117210 117211 117212 117213 117214 117215 117216 117217 117218 117219 117220 117221 117222 117223 117224 117225 117226 117227 117228 117229 117230 117231 117232 117233 117234 117235 117236 117237 117238 117239 117240 117241 117242 117243 117244 117245 117246 117247 117248 117249 117250 117251 117252 117253 117254 117255 117256 117257 117258 117259 117260 117261 117262 117263 117264 117265 117266 117267 117268 117269 117270 117271 117272 117273 117274 117275 117276 117277 117278 117279 117280 117281 117282 117283 117284 117285 117286 117287 117288 117289 117290 117291 117292 117293 117294 117295 117296 117297 117298 117299 117300 117301 117302 117303 117304 117305 117306 117307 117308 117309 117310 117311 117312 117313 117314 117315 117316 117317 117318 117319 117320 117321 117322 117323 117324 117325 117326 117327 117328 117329 117330 117331 117332 117333 117334 117335 117336 117337 117338 117339 117340 117341 117342 117343 117344 117345 117346 117347 117348 117349 117350 117351 117352 117353 117354 117355 117356 117357 117358 117359 117360 117361 117362 117363 117364 117365 117366 117367 117368 117369 117370 117371 117372 117373 117374 117375 117376 117377 117378 117379 117380 117381 117382 117383 117384 117385 117386 117387 117388 117389 117390 117391 117392 117393 117394 117395 117396 117397 117398 117399 117400 117401 117402 117403 117404 117405 117406 117407 117408 117409 117410 117411 117412 117413 117414 117415 117416 117417 117418 117419 117420 117421 117422 117423 117424 117425 117426 117427 117428 117429 117430 117431 117432 117433 117434 117435 117436 117437 117438 117439 117440 117441 117442 117443 117444 117445 117446 117447 117448 117449 117450 117451 117452 117453 117454 117455 117456 117457 117458 117459 117460 117461 117462 117463 117464 117465 117466 117467 117468 117469 117470 117471 117472 117473 117474 117475 117476 117477 117478 117479 117480 117481 117482 117483 117484 117485 117486 117487 117488 117489 117490 117491 117492 117493 117494 117495 117496 117497 117498 117499 117500 117501 117502 117503 117504 117505 117506 117507 117508 117509 117510 117511 117512 117513 117514 117515 117516 117517 117518 117519 117520 117521 117522 117523 117524 117525 117526 117527 117528 117529 117530 117531 117532 117533 117534 117535 117536 117537 117538 117539 117540 117541 117542 117543 117544 117545 117546 117547 117548 117549 117550 117551 117552 117553 117554 117555 117556 117557 117558 117559 117560 117561 117562 117563 117564 117565 117566 117567 117568 117569 117570 117571 117572 117573 117574 117575 117576 117577 117578 117579 117580 117581 117582 117583 117584 117585 117586 117587 117588 117589 117590 117591 117592 117593 117594 117595 117596 117597 117598 117599 117600 117601 117602 117603 117604 117605 117606 117607 117608 117609 117610 117611 117612 117613 117614 117615 117616 117617 117618 117619 117620 117621 117622 117623 117624 117625 117626 117627 117628 117629 117630 117631 117632 117633 117634 117635 117636 117637 117638 117639 117640 117641 117642 117643 117644 117645 117646 117647 117648 117649 117650 117651 117652 117653 117654 117655 117656 117657 117658 117659 117660 117661 117662 117663 117664 117665 117666 117667 117668 117669 117670 117671 117672 117673 117674 117675 117676 117677 117678 117679 117680 117681 117682 117683 117684 117685 117686 117687 117688 117689 117690 117691 117692 117693 117694 117695 117696 117697 117698 117699 117700 117701 117702 117703 117704 117705 117706 117707 117708 117709 117710 117711 117712 117713 117714 117715 117716 117717 117718 117719 117720 117721 117722 117723 117724 117725 117726 117727 117728 117729 117730 117731 117732 117733 117734 117735 117736 117737 117738 117739 117740 117741 117742 117743 117744 117745 117746 117747 117748 117749 117750 117751 117752 117753 117754 117755 117756 117757 117758 117759 117760 117761 117762 117763 117764 117765 117766 117767 117768 117769 117770 117771 117772 117773 117774 117775 117776 117777 117778 117779 117780 117781 117782 117783 117784 117785 117786 117787 117788 117789 117790 117791 117792 117793 117794 117795 117796 117797 117798 117799 117800 117801 117802 117803 117804 117805 117806 117807 117808 117809 117810 117811 117812 117813 117814 117815 117816 117817 117818 117819 117820 117821 117822 117823 117824 117825 117826 117827 117828 117829 117830 117831 117832 117833 117834 117835 117836 117837 117838 117839 117840 117841 117842 117843 117844 117845 117846 117847 117848 117849 117850 117851 117852 117853 117854 117855 117856 117857 117858 117859 117860 117861 117862 117863 117864 117865 117866 117867 117868 117869 117870 117871 117872 117873 117874 117875 117876 117877 117878 117879 117880 117881 117882 117883 117884 117885 117886 117887 117888 117889 117890 117891 117892 117893 117894 117895 117896 117897 117898 117899 117900 117901 117902 117903 117904 117905 117906 117907 117908 117909 117910 117911 117912 117913 117914 117915 117916 117917 117918 117919 117920 117921 117922 117923 117924 117925 117926 117927 117928 117929 117930 117931 117932 117933 117934 117935 117936 117937 117938 117939 117940 117941 117942 117943 117944 117945 117946 117947 117948 117949 117950 117951 117952 117953 117954 117955 117956 117957 117958 117959 117960 117961 117962 117963 117964 117965 117966 117967 117968 117969 117970 117971 117972 117973 117974 117975 117976 117977 117978 117979 117980 117981 117982 117983 117984 117985 117986 117987 117988 117989 117990 117991 117992 117993 117994 117995 117996 117997 117998 117999 118000 118001 118002 118003 118004 118005 118006 118007 118008 118009 118010 118011 118012 118013 118014 118015 118016 118017 118018 118019 118020 118021 118022 118023 118024 118025 118026 118027 118028 118029 118030 118031 118032 118033 118034 118035 118036 118037 118038 118039 118040 118041 118042 118043 118044 118045 118046 118047 118048 118049 118050 118051 118052 118053 118054 118055 118056 118057 118058 118059 118060 118061 118062 118063 118064 118065 118066 118067 118068 118069 118070 118071 118072 118073 118074 118075 118076 118077 118078 118079 118080 118081 118082 118083 118084 118085 118086 118087 118088 118089 118090 118091 118092 118093 118094 118095 118096 118097 118098 118099 118100 118101 118102 118103 118104 118105 118106 118107 118108 118109 118110 118111 118112 118113 118114 118115 118116 118117 118118 118119 118120 118121 118122 118123 118124 118125 118126 118127 118128 118129 118130 118131 118132 118133 118134 118135 118136 118137 118138 118139 118140 118141 118142 118143 118144 118145 118146 118147 118148 118149 118150 118151 118152 118153 118154 118155 118156 118157 118158 118159 118160 118161 118162 118163 118164 118165 118166 118167 118168 118169 118170 118171 118172 118173 118174 118175 118176 118177 118178 118179 118180 118181 118182 118183 118184 118185 118186 118187 118188 118189 118190 118191 118192 118193 118194 118195 118196 118197 118198 118199 118200 118201 118202 118203 118204 118205 118206 118207 118208 118209 118210 118211 118212 118213 118214 118215 118216 118217 118218 118219 118220 118221 118222 118223 118224 118225 118226 118227 118228 118229 118230 118231 118232 118233 118234 118235 118236 118237 118238 118239 118240 118241 118242 118243 118244 118245 118246 118247 118248 118249 118250 118251 118252 118253 118254 118255 118256 118257 118258 118259 118260 118261 118262 118263 118264 118265 118266 118267 118268 118269 118270 118271 118272 118273 118274 118275 118276 118277 118278 118279 118280 118281 118282 118283 118284 118285 118286 118287 118288 118289 118290 118291 118292 118293 118294 118295 118296 118297 118298 118299 118300 118301 118302 118303 118304 118305 118306 118307 118308 118309 118310 118311 118312 118313 118314 118315 118316 118317 118318 118319 118320 118321 118322 118323 118324 118325 118326 118327 118328 118329 118330 118331 118332 118333 118334 118335 118336 118337 118338 118339 118340 118341 118342 118343 118344 118345 118346 118347 118348 118349 118350 118351 118352 118353 118354 118355 118356 118357 118358 118359 118360 118361 118362 118363 118364 118365 118366 118367 118368 118369 118370 118371 118372 118373 118374 118375 118376 118377 118378 118379 118380 118381 118382 118383 118384 118385 118386 118387 118388 118389 118390 118391 118392 118393 118394 118395 118396 118397 118398 118399 118400 118401 118402 118403 118404 118405 118406 118407 118408 118409 118410 118411 118412 118413 118414 118415 118416 118417 118418 118419 118420 118421 118422 118423 118424 118425 118426 118427 118428 118429 118430 118431 118432 118433 118434 118435 118436 118437 118438 118439 118440 118441 118442 118443 118444 118445 118446 118447 118448 118449 118450 118451 118452 118453 118454 118455 118456 118457 118458 118459 118460 118461 118462 118463 118464 118465 118466 118467 118468 118469 118470 118471 118472 118473 118474 118475 118476 118477 118478 118479 118480 118481 118482 118483 118484 118485 118486 118487 118488 118489 118490 118491 118492 118493 118494 118495 118496 118497 118498 118499 118500 118501 118502 118503 118504 118505 118506 118507 118508 118509 118510 118511 118512 118513 118514 118515 118516 118517 118518 118519 118520 118521 118522 118523 118524 118525 118526 118527 118528 118529 118530 118531 118532 118533 118534 118535 118536 118537 118538 118539 118540 118541 118542 118543 118544 118545 118546 118547 118548 118549 118550 118551 118552 118553 118554 118555 118556 118557 118558 118559 118560 118561 118562 118563 118564 118565 118566 118567 118568 118569 118570 118571 118572 118573 118574 118575 118576 118577 118578 118579 118580 118581 118582 118583 118584 118585 118586 118587 118588 118589 118590 118591 118592 118593 118594 118595 118596 118597 118598 118599 118600 118601 118602 118603 118604 118605 118606 118607 118608 118609 118610 118611 118612 118613 118614 118615 118616 118617 118618 118619 118620 118621 118622 118623 118624 118625 118626 118627 118628 118629 118630 118631 118632 118633 118634 118635 118636 118637 118638 118639 118640 118641 118642 118643 118644 118645 118646 118647 118648 118649 118650 118651 118652 118653 118654 118655 118656 118657 118658 118659 118660 118661 118662 118663 118664 118665 118666 118667 118668 118669 118670 118671 118672 118673 118674 118675 118676 118677 118678 118679 118680 118681 118682 118683 118684 118685 118686 118687 118688 118689 118690 118691 118692 118693 118694 118695 118696 118697 118698 118699 118700 118701 118702 118703 118704 118705 118706 118707 118708 118709 118710 118711 118712 118713 118714 118715 118716 118717 118718 118719 118720 118721 118722 118723 118724 118725 118726 118727 118728 118729 118730 118731 118732 118733 118734 118735 118736 118737 118738 118739 118740 118741 118742 118743 118744 118745 118746 118747 118748 118749 118750 118751 118752 118753 118754 118755 118756 118757 118758 118759 118760 118761 118762 118763 118764 118765 118766 118767 118768 118769 118770 118771 118772 118773 118774 118775 118776 118777 118778 118779 118780 118781 118782 118783 118784 118785 118786 118787 118788 118789 118790 118791 118792 118793 118794 118795 118796 118797 118798 118799 118800 118801 118802 118803 118804 118805 118806 118807 118808 118809 118810 118811 118812 118813 118814 118815 118816 118817 118818 118819 118820 118821 118822 118823 118824 118825 118826 118827 118828 118829 118830 118831 118832 118833 118834 118835 118836 118837 118838 118839 118840 118841 118842 118843 118844 118845 118846 118847 118848 118849 118850 118851 118852 118853 118854 118855 118856 118857 118858 118859 118860 118861 118862 118863 118864 118865 118866 118867 118868 118869 118870 118871 118872 118873 118874 118875 118876 118877 118878 118879 118880 118881 118882 118883 118884 118885 118886 118887 118888 118889 118890 118891 118892 118893 118894 118895 118896 118897 118898 118899 118900 118901 118902 118903 118904 118905 118906 118907 118908 118909 118910 118911 118912 118913 118914 118915 118916 118917 118918 118919 118920 118921 118922 118923 118924 118925 118926 118927 118928 118929 118930 118931 118932 118933 118934 118935 118936 118937 118938 118939 118940 118941 118942 118943 118944 118945 118946 118947 118948 118949 118950 118951 118952 118953 118954 118955 118956 118957 118958 118959 118960 118961 118962 118963 118964 118965 118966 118967 118968 118969 118970 118971 118972 118973 118974 118975 118976 118977 118978 118979 118980 118981 118982 118983 118984 118985 118986 118987 118988 118989 118990 118991 118992 118993 118994 118995 118996 118997 118998 118999 119000 119001 119002 119003 119004 119005 119006 119007 119008 119009 119010 119011 119012 119013 119014 119015 119016 119017 119018 119019 119020 119021 119022 119023 119024 119025 119026 119027 119028 119029 119030 119031 119032 119033 119034 119035 119036 119037 119038 119039 119040 119041 119042 119043 119044 119045 119046 119047 119048 119049 119050 119051 119052 119053 119054 119055 119056 119057 119058 119059 119060 119061 119062 119063 119064 119065 119066 119067 119068 119069 119070 119071 119072 119073 119074 119075 119076 119077 119078 119079 119080 119081 119082 119083 119084 119085 119086 119087 119088 119089 119090 119091 119092 119093 119094 119095 119096 119097 119098 119099 119100 119101 119102 119103 119104 119105 119106 119107 119108 119109 119110 119111 119112 119113 119114 119115 119116 119117 119118 119119 119120 119121 119122 119123 119124 119125 119126 119127 119128 119129 119130 119131 119132 119133 119134 119135 119136 119137 119138 119139 119140 119141 119142 119143 119144 119145 119146 119147 119148 119149 119150 119151 119152 119153 119154 119155 119156 119157 119158 119159 119160 119161 119162 119163 119164 119165 119166 119167 119168 119169 119170 119171 119172 119173 119174 119175 119176 119177 119178 119179 119180 119181 119182 119183 119184 119185 119186 119187 119188 119189 119190 119191 119192 119193 119194 119195 119196 119197 119198 119199 119200 119201 119202 119203 119204 119205 119206 119207 119208 119209 119210 119211 119212 119213 119214 119215 119216 119217 119218 119219 119220 119221 119222 119223 119224 119225 119226 119227 119228 119229 119230 119231 119232 119233 119234 119235 119236 119237 119238 119239 119240 119241 119242 119243 119244 119245 119246 119247 119248 119249 119250 119251 119252 119253 119254 119255 119256 119257 119258 119259 119260 119261 119262 119263 119264 119265 119266 119267 119268 119269 119270 119271 119272 119273 119274 119275 119276 119277 119278 119279 119280 119281 119282 119283 119284 119285 119286 119287 119288 119289 119290 119291 119292 119293 119294 119295 119296 119297 119298 119299 119300 119301 119302 119303 119304 119305 119306 119307 119308 119309 119310 119311 119312 119313 119314 119315 119316 119317 119318 119319 119320 119321 119322 119323 119324 119325 119326 119327 119328 119329 119330 119331 119332 119333 119334 119335 119336 119337 119338 119339 119340 119341 119342 119343 119344 119345 119346 119347 119348 119349 119350 119351 119352 119353 119354 119355 119356 119357 119358 119359 119360 119361 119362 119363 119364 119365 119366 119367 119368 119369 119370 119371 119372 119373 119374 119375 119376 119377 119378 119379 119380 119381 119382 119383 119384 119385 119386 119387 119388 119389 119390 119391 119392 119393 119394 119395 119396 119397 119398 119399 119400 119401 119402 119403 119404 119405 119406 119407 119408 119409 119410 119411 119412 119413 119414 119415 119416 119417 119418 119419 119420 119421 119422 119423 119424 119425 119426 119427 119428 119429 119430 119431 119432 119433 119434 119435 119436 119437 119438 119439 119440 119441 119442 119443 119444 119445 119446 119447 119448 119449 119450 119451 119452 119453 119454 119455 119456 119457 119458 119459 119460 119461 119462 119463 119464 119465 119466 119467 119468 119469 119470 119471 119472 119473 119474 119475 119476 119477 119478 119479 119480 119481 119482 119483 119484 119485 119486 119487 119488 119489 119490 119491 119492 119493 119494 119495 119496 119497 119498 119499 119500 119501 119502 119503 119504 119505 119506 119507 119508 119509 119510 119511 119512 119513 119514 119515 119516 119517 119518 119519 119520 119521 119522 119523 119524 119525 119526 119527 119528 119529 119530 119531 119532 119533 119534 119535 119536 119537 119538 119539 119540 119541 119542 119543 119544 119545 119546 119547 119548 119549 119550 119551 119552 119553 119554 119555 119556 119557 119558 119559 119560 119561 119562 119563 119564 119565 119566 119567 119568 119569 119570 119571 119572 119573 119574 119575 119576 119577 119578 119579 119580 119581 119582 119583 119584 119585 119586 119587 119588 119589 119590 119591 119592 119593 119594 119595 119596 119597 119598 119599 119600 119601 119602 119603 119604 119605 119606 119607 119608 119609 119610 119611 119612 119613 119614 119615 119616 119617 119618 119619 119620 119621 119622 119623 119624 119625 119626 119627 119628 119629 119630 119631 119632 119633 119634 119635 119636 119637 119638 119639 119640 119641 119642 119643 119644 119645 119646 119647 119648 119649 119650 119651 119652 119653 119654 119655 119656 119657 119658 119659 119660 119661 119662 119663 119664 119665 119666 119667 119668 119669 119670 119671 119672 119673 119674 119675 119676 119677 119678 119679 119680 119681 119682 119683 119684 119685 119686 119687 119688 119689 119690 119691 119692 119693 119694 119695 119696 119697 119698 119699 119700 119701 119702 119703 119704 119705 119706 119707 119708 119709 119710 119711 119712 119713 119714 119715 119716 119717 119718 119719 119720 119721 119722 119723 119724 119725 119726 119727 119728 119729 119730 119731 119732 119733 119734 119735 119736 119737 119738 119739 119740 119741 119742 119743 119744 119745 119746 119747 119748 119749 119750 119751 119752 119753 119754 119755 119756 119757 119758 119759 119760 119761 119762 119763 119764 119765 119766 119767 119768 119769 119770 119771 119772 119773 119774 119775 119776 119777 119778 119779 119780 119781 119782 119783 119784 119785 119786 119787 119788 119789 119790 119791 119792 119793 119794 119795 119796 119797 119798 119799 119800 119801 119802 119803 119804 119805 119806 119807 119808 119809 119810 119811 119812 119813 119814 119815 119816 119817 119818 119819 119820 119821 119822 119823 119824 119825 119826 119827 119828 119829 119830 119831 119832 119833 119834 119835 119836 119837 119838 119839 119840 119841 119842 119843 119844 119845 119846 119847 119848 119849 119850 119851 119852 119853 119854 119855 119856 119857 119858 119859 119860 119861 119862 119863 119864 119865 119866 119867 119868 119869 119870 119871 119872 119873 119874 119875 119876 119877 119878 119879 119880 119881 119882 119883 119884 119885 119886 119887 119888 119889 119890 119891 119892 119893 119894 119895 119896 119897 119898 119899 119900 119901 119902 119903 119904 119905 119906 119907 119908 119909 119910 119911 119912 119913 119914 119915 119916 119917 119918 119919 119920 119921 119922 119923 119924 119925 119926 119927 119928 119929 119930 119931 119932 119933 119934 119935 119936 119937 119938 119939 119940 119941 119942 119943 119944 119945 119946 119947 119948 119949 119950 119951 119952 119953 119954 119955 119956 119957 119958 119959 119960 119961 119962 119963 119964 119965 119966 119967 119968 119969 119970 119971 119972 119973 119974 119975 119976 119977 119978 119979 119980 119981 119982 119983 119984 119985 119986 119987 119988 119989 119990 119991 119992 119993 119994 119995 119996 119997 119998 119999 120000 120001 120002 120003 120004 120005 120006 120007 120008 120009 120010 120011 120012 120013 120014 120015 120016 120017 120018 120019 120020 120021 120022 120023 120024 120025 120026 120027 120028 120029 120030 120031 120032 120033 120034 120035 120036 120037 120038 120039 120040 120041 120042 120043 120044 120045 120046 120047 120048 120049 120050 120051 120052 120053 120054 120055 120056 120057 120058 120059 120060 120061 120062 120063 120064 120065 120066 120067 120068 120069 120070 120071 120072 120073 120074 120075 120076 120077 120078 120079 120080 120081 120082 120083 120084 120085 120086 120087 120088 120089 120090 120091 120092 120093 120094 120095 120096 120097 120098 120099 120100 120101 120102 120103 120104 120105 120106 120107 120108 120109 120110 120111 120112 120113 120114 120115 120116 120117 120118 120119 120120 120121 120122 120123 120124 120125 120126 120127 120128 120129 120130 120131 120132 120133 120134 120135 120136 120137 120138 120139 120140 120141 120142 120143 120144 120145 120146 120147 120148 120149 120150 120151 120152 120153 120154 120155 120156 120157 120158 120159 120160 120161 120162 120163 120164 120165 120166 120167 120168 120169 120170 120171 120172 120173 120174 120175 120176 120177 120178 120179 120180 120181 120182 120183 120184 120185 120186 120187 120188 120189 120190 120191 120192 120193 120194 120195 120196 120197 120198 120199 120200 120201 120202 120203 120204 120205 120206 120207 120208 120209 120210 120211 120212 120213 120214 120215 120216 120217 120218 120219 120220 120221 120222 120223 120224 120225 120226 120227 120228 120229 120230 120231 120232 120233 120234 120235 120236 120237 120238 120239 120240 120241 120242 120243 120244 120245 120246 120247 120248 120249 120250 120251 120252 120253 120254 120255 120256 120257 120258 120259 120260 120261 120262 120263 120264 120265 120266 120267 120268 120269 120270 120271 120272 120273 120274 120275 120276 120277 120278 120279 120280 120281 120282 120283 120284 120285 120286 120287 120288 120289 120290 120291 120292 120293 120294 120295 120296 120297 120298 120299 120300 120301 120302 120303 120304 120305 120306 120307 120308 120309 120310 120311 120312 120313 120314 120315 120316 120317 120318 120319 120320 120321 120322 120323 120324 120325 120326 120327 120328 120329 120330 120331 120332 120333 120334 120335 120336 120337 120338 120339 120340 120341 120342 120343 120344 120345 120346 120347 120348 120349 120350 120351 120352 120353 120354 120355 120356 120357 120358 120359 120360 120361 120362 120363 120364 120365 120366 120367 120368 120369 120370 120371 120372 120373 120374 120375 120376 120377 120378 120379 120380 120381 120382 120383 120384 120385 120386 120387 120388 120389 120390 120391 120392 120393 120394 120395 120396 120397 120398 120399 120400 120401 120402 120403 120404 120405 120406 120407 120408 120409 120410 120411 120412 120413 120414 120415 120416 120417 120418 120419 120420 120421 120422 120423 120424 120425 120426 120427 120428 120429 120430 120431 120432 120433 120434 120435 120436 120437 120438 120439 120440 120441 120442 120443 120444 120445 120446 120447 120448 120449 120450 120451 120452 120453 120454 120455 120456 120457 120458 120459 120460 120461 120462 120463 120464 120465 120466 120467 120468 120469 120470 120471 120472 120473 120474 120475 120476 120477 120478 120479 120480 120481 120482 120483 120484 120485 120486 120487 120488 120489 120490 120491 120492 120493 120494 120495 120496 120497 120498 120499 120500 120501 120502 120503 120504 120505 120506 120507 120508 120509 120510 120511 120512 120513 120514 120515 120516 120517 120518 120519 120520 120521 120522 120523 120524 120525 120526 120527 120528 120529 120530 120531 120532 120533 120534 120535 120536 120537 120538 120539 120540 120541 120542 120543 120544 120545 120546 120547 120548 120549 120550 120551 120552 120553 120554 120555 120556 120557 120558 120559 120560 120561 120562 120563 120564 120565 120566 120567 120568 120569 120570 120571 120572 120573 120574 120575 120576 120577 120578 120579 120580 120581 120582 120583 120584 120585 120586 120587 120588 120589 120590 120591 120592 120593 120594 120595 120596 120597 120598 120599 120600 120601 120602 120603 120604 120605 120606 120607 120608 120609 120610 120611 120612 120613 120614 120615 120616 120617 120618 120619 120620 120621 120622 120623 120624 120625 120626 120627 120628 120629 120630 120631 120632 120633 120634 120635 120636 120637 120638 120639 120640 120641 120642 120643 120644 120645 120646 120647 120648 120649 120650 120651 120652 120653 120654 120655 120656 120657 120658 120659 120660 120661 120662 120663 120664 120665 120666 120667 120668 120669 120670 120671 120672 120673 120674 120675 120676 120677 120678 120679 120680 120681 120682 120683 120684 120685 120686 120687 120688 120689 120690 120691 120692 120693 120694 120695 120696 120697 120698 120699 120700 120701 120702 120703 120704 120705 120706 120707 120708 120709 120710 120711 120712 120713 120714 120715 120716 120717 120718 120719 120720 120721 120722 120723 120724 120725 120726 120727 120728 120729 120730 120731 120732 120733 120734 120735 120736 120737 120738 120739 120740 120741 120742 120743 120744 120745 120746 120747 120748 120749 120750 120751 120752 120753 120754 120755 120756 120757 120758 120759 120760 120761 120762 120763 120764 120765 120766 120767 120768 120769 120770 120771 120772 120773 120774 120775 120776 120777 120778 120779 120780 120781 120782 120783 120784 120785 120786 120787 120788 120789 120790 120791 120792 120793 120794 120795 120796 120797 120798 120799 120800 120801 120802 120803 120804 120805 120806 120807 120808 120809 120810 120811 120812 120813 120814 120815 120816 120817 120818 120819 120820 120821 120822 120823 120824 120825 120826 120827 120828 120829 120830 120831 120832 120833 120834 120835 120836 120837 120838 120839 120840 120841 120842 120843 120844 120845 120846 120847 120848 120849 120850 120851 120852 120853 120854 120855 120856 120857 120858 120859 120860 120861 120862 120863 120864 120865 120866 120867 120868 120869 120870 120871 120872 120873 120874 120875 120876 120877 120878 120879 120880 120881 120882 120883 120884 120885 120886 120887 120888 120889 120890 120891 120892 120893 120894 120895 120896 120897 120898 120899 120900 120901 120902 120903 120904 120905 120906 120907 120908 120909 120910 120911 120912 120913 120914 120915 120916 120917 120918 120919 120920 120921 120922 120923 120924 120925 120926 120927 120928 120929 120930 120931 120932 120933 120934 120935 120936 120937 120938 120939 120940 120941 120942 120943 120944 120945 120946 120947 120948 120949 120950 120951 120952 120953 120954 120955 120956 120957 120958 120959 120960 120961 120962 120963 120964 120965 120966 120967 120968 120969 120970 120971 120972 120973 120974 120975 120976 120977 120978 120979 120980 120981 120982 120983 120984 120985 120986 120987 120988 120989 120990 120991 120992 120993 120994 120995 120996 120997 120998 120999 121000 121001 121002 121003 121004 121005 121006 121007 121008 121009 121010 121011 121012 121013 121014 121015 121016 121017 121018 121019 121020 121021 121022 121023 121024 121025 121026 121027 121028 121029 121030 121031 121032 121033 121034 121035 121036 121037 121038 121039 121040 121041 121042 121043 121044 121045 121046 121047 121048 121049 121050 121051 121052 121053 121054 121055 121056 121057 121058 121059 121060 121061 121062 121063 121064 121065 121066 121067 121068 121069 121070 121071 121072 121073 121074 121075 121076 121077 121078 121079 121080 121081 121082 121083 121084 121085 121086 121087 121088 121089 121090 121091 121092 121093 121094 121095 121096 121097 121098 121099 121100 121101 121102 121103 121104 121105 121106 121107 121108 121109 121110 121111 121112 121113 121114 121115 121116 121117 121118 121119 121120 121121 121122 121123 121124 121125 121126 121127 121128 121129 121130 121131 121132 121133 121134 121135 121136 121137 121138 121139 121140 121141 121142 121143 121144 121145 121146 121147 121148 121149 121150 121151 121152 121153 121154 121155 121156 121157 121158 121159 121160 121161 121162 121163 121164 121165 121166 121167 121168 121169 121170 121171 121172 121173 121174 121175 121176 121177 121178 121179 121180 121181 121182 121183 121184 121185 121186 121187 121188 121189 121190 121191 121192 121193 121194 121195 121196 121197 121198 121199 121200 121201 121202 121203 121204 121205 121206 121207 121208 121209 121210 121211 121212 121213 121214 121215 121216 121217 121218 121219 121220 121221 121222 121223 121224 121225 121226 121227 121228 121229 121230 121231 121232 121233 121234 121235 121236 121237 121238 121239 121240 121241 121242 121243 121244 121245 121246 121247 121248 121249 121250 121251 121252 121253 121254 121255 121256 121257 121258 121259 121260 121261 121262 121263 121264 121265 121266 121267 121268 121269 121270 121271 121272 121273 121274 121275 121276 121277 121278 121279 121280 121281 121282 121283 121284 121285 121286 121287 121288 121289 121290 121291 121292 121293 121294 121295 121296 121297 121298 121299 121300 121301 121302 121303 121304 121305 121306 121307 121308 121309 121310 121311 121312 121313 121314 121315 121316 121317 121318 121319 121320 121321 121322 121323 121324 121325 121326 121327 121328 121329 121330 121331 121332 121333 121334 121335 121336 121337 121338 121339 121340 121341 121342 121343 121344 121345 121346 121347 121348 121349 121350 121351 121352 121353 121354 121355 121356 121357 121358 121359 121360 121361 121362 121363 121364 121365 121366 121367 121368 121369 121370 121371 121372 121373 121374 121375 121376 121377 121378 121379 121380 121381 121382 121383 121384 121385 121386 121387 121388 121389 121390 121391 121392 121393 121394 121395 121396 121397 121398 121399 121400 121401 121402 121403 121404 121405 121406 121407 121408 121409 121410 121411 121412 121413 121414 121415 121416 121417 121418 121419 121420 121421 121422 121423 121424 121425 121426 121427 121428 121429 121430 121431 121432 121433 121434 121435 121436 121437 121438 121439 121440 121441 121442 121443 121444 121445 121446 121447 121448 121449 121450 121451 121452 121453 121454 121455 121456 121457 121458 121459 121460 121461 121462 121463 121464 121465 121466 121467 121468 121469 121470 121471 121472 121473 121474 121475 121476 121477 121478 121479 121480 121481 121482 121483 121484 121485 121486 121487 121488 121489 121490 121491 121492 121493 121494 121495 121496 121497 121498 121499 121500 121501 121502 121503 121504 121505 121506 121507 121508 121509 121510 121511 121512 121513 121514 121515 121516 121517 121518 121519 121520 121521 121522 121523 121524 121525 121526 121527 121528 121529 121530 121531 121532 121533 121534 121535 121536 121537 121538 121539 121540 121541 121542 121543 121544 121545 121546 121547 121548 121549 121550 121551 121552 121553 121554 121555 121556 121557 121558 121559 121560 121561 121562 121563 121564 121565 121566 121567 121568 121569 121570 121571 121572 121573 121574 121575 121576 121577 121578 121579 121580 121581 121582 121583 121584 121585 121586 121587 121588 121589 121590 121591 121592 121593 121594 121595 121596 121597 121598 121599 121600 121601 121602 121603 121604 121605 121606 121607 121608 121609 121610 121611 121612 121613 121614 121615 121616 121617 121618 121619 121620 121621 121622 121623 121624 121625 121626 121627 121628 121629 121630 121631 121632 121633 121634 121635 121636 121637 121638 121639 121640 121641 121642 121643 121644 121645 121646 121647 121648 121649 121650 121651 121652 121653 121654 121655 121656 121657 121658 121659 121660 121661 121662 121663 121664 121665 121666 121667 121668 121669 121670 121671 121672 121673 121674 121675 121676 121677 121678 121679 121680 121681 121682 121683 121684 121685 121686 121687 121688 121689 121690 121691 121692 121693 121694 121695 121696 121697 121698 121699 121700 121701 121702 121703 121704 121705 121706 121707 121708 121709 121710 121711 121712 121713 121714 121715 121716 121717 121718 121719 121720 121721 121722 121723 121724 121725 121726 121727 121728 121729 121730 121731 121732 121733 121734 121735 121736 121737 121738 121739 121740 121741 121742 121743 121744 121745 121746 121747 121748 121749 121750 121751 121752 121753 121754 121755 121756 121757 121758 121759 121760 121761 121762 121763 121764 121765 121766 121767 121768 121769 121770 121771 121772 121773 121774 121775 121776 121777 121778 121779 121780 121781 121782 121783 121784 121785 121786 121787 121788 121789 121790 121791 121792 121793 121794 121795 121796 121797 121798 121799 121800 121801 121802 121803 121804 121805 121806 121807 121808 121809 121810 121811 121812 121813 121814 121815 121816 121817 121818 121819 121820 121821 121822 121823 121824 121825 121826 121827 121828 121829 121830 121831 121832 121833 121834 121835 121836 121837 121838 121839 121840 121841 121842 121843 121844 121845 121846 121847 121848 121849 121850 121851 121852 121853 121854 121855 121856 121857 121858 121859 121860 121861 121862 121863 121864 121865 121866 121867 121868 121869 121870 121871 121872 121873 121874 121875 121876 121877 121878 121879 121880 121881 121882 121883 121884 121885 121886 121887 121888 121889 121890 121891 121892 121893 121894 121895 121896 121897 121898 121899 121900 121901 121902 121903 121904 121905 121906 121907 121908 121909 121910 121911 121912 121913 121914 121915 121916 121917 121918 121919 121920 121921 121922 121923 121924 121925 121926 121927 121928 121929 121930 121931 121932 121933 121934 121935 121936 121937 121938 121939 121940 121941 121942 121943 121944 121945 121946 121947 121948 121949 121950 121951 121952 121953 121954 121955 121956 121957 121958 121959 121960 121961 121962 121963 121964 121965 121966 121967 121968 121969 121970 121971 121972 121973 121974 121975 121976 121977 121978 121979 121980 121981 121982 121983 121984 121985 121986 121987 121988 121989 121990 121991 121992 121993 121994 121995 121996 121997 121998 121999 122000 122001 122002 122003 122004 122005 122006 122007 122008 122009 122010 122011 122012 122013 122014 122015 122016 122017 122018 122019 122020 122021 122022 122023 122024 122025 122026 122027 122028 122029 122030 122031 122032 122033 122034 122035 122036 122037 122038 122039 122040 122041 122042 122043 122044 122045 122046 122047 122048 122049 122050 122051 122052 122053 122054 122055 122056 122057 122058 122059 122060 122061 122062 122063 122064 122065 122066 122067 122068 122069 122070 122071 122072 122073 122074 122075 122076 122077 122078 122079 122080 122081 122082 122083 122084 122085 122086 122087 122088 122089 122090 122091 122092 122093 122094 122095 122096 122097 122098 122099 122100 122101 122102 122103 122104 122105 122106 122107 122108 122109 122110 122111 122112 122113 122114 122115 122116 122117 122118 122119 122120 122121 122122 122123 122124 122125 122126 122127 122128 122129 122130 122131 122132 122133 122134 122135 122136 122137 122138 122139 122140 122141 122142 122143 122144 122145 122146 122147 122148 122149 122150 122151 122152 122153 122154 122155 122156 122157 122158 122159 122160 122161 122162 122163 122164 122165 122166 122167 122168 122169 122170 122171 122172 122173 122174 122175 122176 122177 122178 122179 122180 122181 122182 122183 122184 122185 122186 122187 122188 122189 122190 122191 122192 122193 122194 122195 122196 122197 122198 122199 122200 122201 122202 122203 122204 122205 122206 122207 122208 122209 122210 122211 122212 122213 122214 122215 122216 122217 122218 122219 122220 122221 122222 122223 122224 122225 122226 122227 122228 122229 122230 122231 122232 122233 122234 122235 122236 122237 122238 122239 122240 122241 122242 122243 122244 122245 122246 122247 122248 122249 122250 122251 122252 122253 122254 122255 122256 122257 122258 122259 122260 122261 122262 122263 122264 122265 122266 122267 122268 122269 122270 122271 122272 122273 122274 122275 122276 122277 122278 122279 122280 122281 122282 122283 122284 122285 122286 122287 122288 122289 122290 122291 122292 122293 122294 122295 122296 122297 122298 122299 122300 122301 122302 122303 122304 122305 122306 122307 122308 122309 122310 122311 122312 122313 122314 122315 122316 122317 122318 122319 122320 122321 122322 122323 122324 122325 122326 122327 122328 122329 122330 122331 122332 122333 122334 122335 122336 122337 122338 122339 122340 122341 122342 122343 122344 122345 122346 122347 122348 122349 122350 122351 122352 122353 122354 122355 122356 122357 122358 122359 122360 122361 122362 122363 122364 122365 122366 122367 122368 122369 122370 122371 122372 122373 122374 122375 122376 122377 122378 122379 122380 122381 122382 122383 122384 122385 122386 122387 122388 122389 122390 122391 122392 122393 122394 122395 122396 122397 122398 122399 122400 122401 122402 122403 122404 122405 122406 122407 122408 122409 122410 122411 122412 122413 122414 122415 122416 122417 122418 122419 122420 122421 122422 122423 122424 122425 122426 122427 122428 122429 122430 122431 122432 122433 122434 122435 122436 122437 122438 122439 122440 122441 122442 122443 122444 122445 122446 122447 122448 122449 122450 122451 122452 122453 122454 122455 122456 122457 122458 122459 122460 122461 122462 122463 122464 122465 122466 122467 122468 122469 122470 122471 122472 122473 122474 122475 122476 122477 122478 122479 122480 122481 122482 122483 122484 122485 122486 122487 122488 122489 122490 122491 122492 122493 122494 122495 122496 122497 122498 122499 122500 122501 122502 122503 122504 122505 122506 122507 122508 122509 122510 122511 122512 122513 122514 122515 122516 122517 122518 122519 122520 122521 122522 122523 122524 122525 122526 122527 122528 122529 122530 122531 122532 122533 122534 122535 122536 122537 122538 122539 122540 122541 122542 122543 122544 122545 122546 122547 122548 122549 122550 122551 122552 122553 122554 122555 122556 122557 122558 122559 122560 122561 122562 122563 122564 122565 122566 122567 122568 122569 122570 122571 122572 122573 122574 122575 122576 122577 122578 122579 122580 122581 122582 122583 122584 122585 122586 122587 122588 122589 122590 122591 122592 122593 122594 122595 122596 122597 122598 122599 122600 122601 122602 122603 122604 122605 122606 122607 122608 122609 122610 122611 122612 122613 122614 122615 122616 122617 122618 122619 122620 122621 122622 122623 122624 122625 122626 122627 122628 122629 122630 122631 122632 122633 122634 122635 122636 122637 122638 122639 122640 122641 122642 122643 122644 122645 122646 122647 122648 122649 122650 122651 122652 122653 122654 122655 122656 122657 122658 122659 122660 122661 122662 122663 122664 122665 122666 122667 122668 122669 122670 122671 122672 122673 122674 122675 122676 122677 122678 122679 122680 122681 122682 122683 122684 122685 122686 122687 122688 122689 122690 122691 122692 122693 122694 122695 122696 122697 122698 122699 122700 122701 122702 122703 122704 122705 122706 122707 122708 122709 122710 122711 122712 122713 122714 122715 122716 122717 122718 122719 122720 122721 122722 122723 122724 122725 122726 122727 122728 122729 122730 122731 122732 122733 122734 122735 122736 122737 122738 122739 122740 122741 122742 122743 122744 122745 122746 122747 122748 122749 122750 122751 122752 122753 122754 122755 122756 122757 122758 122759 122760 122761 122762 122763 122764 122765 122766 122767 122768 122769 122770 122771 122772 122773 122774 122775 122776 122777 122778 122779 122780 122781 122782 122783 122784 122785 122786 122787 122788 122789 122790 122791 122792 122793 122794 122795 122796 122797 122798 122799 122800 122801 122802 122803 122804 122805 122806 122807 122808 122809 122810 122811 122812 122813 122814 122815 122816 122817 122818 122819 122820 122821 122822 122823 122824 122825 122826 122827 122828 122829 122830 122831 122832 122833 122834 122835 122836 122837 122838 122839 122840 122841 122842 122843 122844 122845 122846 122847 122848 122849 122850 122851 122852 122853 122854 122855 122856 122857 122858 122859 122860 122861 122862 122863 122864 122865 122866 122867 122868 122869 122870 122871 122872 122873 122874 122875 122876 122877 122878 122879 122880 122881 122882 122883 122884 122885 122886 122887 122888 122889 122890 122891 122892 122893 122894 122895 122896 122897 122898 122899 122900 122901 122902 122903 122904 122905 122906 122907 122908 122909 122910 122911 122912 122913 122914 122915 122916 122917 122918 122919 122920 122921 122922 122923 122924 122925 122926 122927 122928 122929 122930 122931 122932 122933 122934 122935 122936 122937 122938 122939 122940 122941 122942 122943 122944 122945 122946 122947 122948 122949 122950 122951 122952 122953 122954 122955 122956 122957 122958 122959 122960 122961 122962 122963 122964 122965 122966 122967 122968 122969 122970 122971 122972 122973 122974 122975 122976 122977 122978 122979 122980 122981 122982 122983 122984 122985 122986 122987 122988 122989 122990 122991 122992 122993 122994 122995 122996 122997 122998 122999 123000 123001 123002 123003 123004 123005 123006 123007 123008 123009 123010 123011 123012 123013 123014 123015 123016 123017 123018 123019 123020 123021 123022 123023 123024 123025 123026 123027 123028 123029 123030 123031 123032 123033 123034 123035 123036 123037 123038 123039 123040 123041 123042 123043 123044 123045 123046 123047 123048 123049 123050 123051 123052 123053 123054 123055 123056 123057 123058 123059 123060 123061 123062 123063 123064 123065 123066 123067 123068 123069 123070 123071 123072 123073 123074 123075 123076 123077 123078 123079 123080 123081 123082 123083 123084 123085 123086 123087 123088 123089 123090 123091 123092 123093 123094 123095 123096 123097 123098 123099 123100 123101 123102 123103 123104 123105 123106 123107 123108 123109 123110 123111 123112 123113 123114 123115 123116 123117 123118 123119 123120 123121 123122 123123 123124 123125 123126 123127 123128 123129 123130 123131 123132 123133 123134 123135 123136 123137 123138 123139 123140 123141 123142 123143 123144 123145 123146 123147 123148 123149 123150 123151 123152 123153 123154 123155 123156 123157 123158 123159 123160 123161 123162 123163 123164 123165 123166 123167 123168 123169 123170 123171 123172 123173 123174 123175 123176 123177 123178 123179 123180 123181 123182 123183 123184 123185 123186 123187 123188 123189 123190 123191 123192 123193 123194 123195 123196 123197 123198 123199 123200 123201 123202 123203 123204 123205 123206 123207 123208 123209 123210 123211 123212 123213 123214 123215 123216 123217 123218 123219 123220 123221 123222 123223 123224 123225 123226 123227 123228 123229 123230 123231 123232 123233 123234 123235 123236 123237 123238 123239 123240 123241 123242 123243 123244 123245 123246 123247 123248 123249 123250 123251 123252 123253 123254 123255 123256 123257 123258 123259 123260 123261 123262 123263 123264 123265 123266 123267 123268 123269 123270 123271 123272 123273 123274 123275 123276 123277 123278 123279 123280 123281 123282 123283 123284 123285 123286 123287 123288 123289 123290 123291 123292 123293 123294 123295 123296 123297 123298 123299 123300 123301 123302 123303 123304 123305 123306 123307 123308 123309 123310 123311 123312 123313 123314 123315 123316 123317 123318 123319 123320 123321 123322 123323 123324 123325 123326 123327 123328 123329 123330 123331 123332 123333 123334 123335 123336 123337 123338 123339 123340 123341 123342 123343 123344 123345 123346 123347 123348 123349 123350 123351 123352 123353 123354 123355 123356 123357 123358 123359 123360 123361 123362 123363 123364 123365 123366 123367 123368 123369 123370 123371 123372 123373 123374 123375 123376 123377 123378 123379 123380 123381 123382 123383 123384 123385 123386 123387 123388 123389 123390 123391 123392 123393 123394 123395 123396 123397 123398 123399 123400 123401 123402 123403 123404 123405 123406 123407 123408 123409 123410 123411 123412 123413 123414 123415 123416 123417 123418 123419 123420 123421 123422 123423 123424 123425 123426 123427 123428 123429 123430 123431 123432 123433 123434 123435 123436 123437 123438 123439 123440 123441 123442 123443 123444 123445 123446 123447 123448 123449 123450 123451 123452 123453 123454 123455 123456 123457 123458 123459 123460 123461 123462 123463 123464 123465 123466 123467 123468 123469 123470 123471 123472 123473 123474 123475 123476 123477 123478 123479 123480 123481 123482 123483 123484 123485 123486 123487 123488 123489 123490 123491 123492 123493 123494 123495 123496 123497 123498 123499 123500 123501 123502 123503 123504 123505 123506 123507 123508 123509 123510 123511 123512 123513 123514 123515 123516 123517 123518 123519 123520 123521 123522 123523 123524 123525 123526 123527 123528 123529 123530 123531 123532 123533 123534 123535 123536 123537 123538 123539 123540 123541 123542 123543 123544 123545 123546 123547 123548 123549 123550 123551 123552 123553 123554 123555 123556 123557 123558 123559 123560 123561 123562 123563 123564 123565 123566 123567 123568 123569 123570 123571 123572 123573 123574 123575 123576 123577 123578 123579 123580 123581 123582 123583 123584 123585 123586 123587 123588 123589 123590 123591 123592 123593 123594 123595 123596 123597 123598 123599 123600 123601 123602 123603 123604 123605 123606 123607 123608 123609 123610 123611 123612 123613 123614 123615 123616 123617 123618 123619 123620 123621 123622 123623 123624 123625 123626 123627 123628 123629 123630 123631 123632 123633 123634 123635 123636 123637 123638 123639 123640 123641 123642 123643 123644 123645 123646 123647 123648 123649 123650 123651 123652 123653 123654 123655 123656 123657 123658 123659 123660 123661 123662 123663 123664 123665 123666 123667 123668 123669 123670 123671 123672 123673 123674 123675 123676 123677 123678 123679 123680 123681 123682 123683 123684 123685 123686 123687 123688 123689 123690 123691 123692 123693 123694 123695 123696 123697 123698 123699 123700 123701 123702 123703 123704 123705 123706 123707 123708 123709 123710 123711 123712 123713 123714 123715 123716 123717 123718 123719 123720 123721 123722 123723 123724 123725 123726 123727 123728 123729 123730 123731 123732 123733 123734 123735 123736 123737 123738 123739 123740 123741 123742 123743 123744 123745 123746 123747 123748 123749 123750 123751 123752 123753 123754 123755 123756 123757 123758 123759 123760 123761 123762 123763 123764 123765 123766 123767 123768 123769 123770 123771 123772 123773 123774 123775 123776 123777 123778 123779 123780 123781 123782 123783 123784 123785 123786 123787 123788 123789 123790 123791 123792 123793 123794 123795 123796 123797 123798 123799 123800 123801 123802 123803 123804 123805 123806 123807 123808 123809 123810 123811 123812 123813 123814 123815 123816 123817 123818 123819 123820 123821 123822 123823 123824 123825 123826 123827 123828 123829 123830 123831 123832 123833 123834 123835 123836 123837 123838 123839 123840 123841 123842 123843 123844 123845 123846 123847 123848 123849 123850 123851 123852 123853 123854 123855 123856 123857 123858 123859 123860 123861 123862 123863 123864 123865 123866 123867 123868 123869 123870 123871 123872 123873 123874 123875 123876 123877 123878 123879 123880 123881 123882 123883 123884 123885 123886 123887 123888 123889 123890 123891 123892 123893 123894 123895 123896 123897 123898 123899 123900 123901 123902 123903 123904 123905 123906 123907 123908 123909 123910 123911 123912 123913 123914 123915 123916 123917 123918 123919 123920 123921 123922 123923 123924 123925 123926 123927 123928 123929 123930 123931 123932 123933 123934 123935 123936 123937 123938 123939 123940 123941 123942 123943 123944 123945 123946 123947 123948 123949 123950 123951 123952 123953 123954 123955 123956 123957 123958 123959 123960 123961 123962 123963 123964 123965 123966 123967 123968 123969 123970 123971 123972 123973 123974 123975 123976 123977 123978 123979 123980 123981 123982 123983 123984 123985 123986 123987 123988 123989 123990 123991 123992 123993 123994 123995 123996 123997 123998 123999 124000 124001 124002 124003 124004 124005 124006 124007 124008 124009 124010 124011 124012 124013 124014 124015 124016 124017 124018 124019 124020 124021 124022 124023 124024 124025 124026 124027 124028 124029 124030 124031 124032 124033 124034 124035 124036 124037 124038 124039 124040 124041 124042 124043 124044 124045 124046 124047 124048 124049 124050 124051 124052 124053 124054 124055 124056 124057 124058 124059 124060 124061 124062 124063 124064 124065 124066 124067 124068 124069 124070 124071 124072 124073 124074 124075 124076 124077 124078 124079 124080 124081 124082 124083 124084 124085 124086 124087 124088 124089 124090 124091 124092 124093 124094 124095 124096 124097 124098 124099 124100 124101 124102 124103 124104 124105 124106 124107 124108 124109 124110 124111 124112 124113 124114 124115 124116 124117 124118 124119 124120 124121 124122 124123 124124 124125 124126 124127 124128 124129 124130 124131 124132 124133 124134 124135 124136 124137 124138 124139 124140 124141 124142 124143 124144 124145 124146 124147 124148 124149 124150 124151 124152 124153 124154 124155 124156 124157 124158 124159 124160 124161 124162 124163 124164 124165 124166 124167 124168 124169 124170 124171 124172 124173 124174 124175 124176 124177 124178 124179 124180 124181 124182 124183 124184 124185 124186 124187 124188 124189 124190 124191 124192 124193 124194 124195 124196 124197 124198 124199 124200 124201 124202 124203 124204 124205 124206 124207 124208 124209 124210 124211 124212 124213 124214 124215 124216 124217 124218 124219 124220 124221 124222 124223 124224 124225 124226 124227 124228 124229 124230 124231 124232 124233 124234 124235 124236 124237 124238 124239 124240 124241 124242 124243 124244 124245 124246 124247 124248 124249 124250 124251 124252 124253 124254 124255 124256 124257 124258 124259 124260 124261 124262 124263 124264 124265 124266 124267 124268 124269 124270 124271 124272 124273 124274 124275 124276 124277 124278 124279 124280 124281 124282 124283 124284 124285 124286 124287 124288 124289 124290 124291 124292 124293 124294 124295 124296 124297 124298 124299 124300 124301 124302 124303 124304 124305 124306 124307 124308 124309 124310 124311 124312 124313 124314 124315 124316 124317 124318 124319 124320 124321 124322 124323 124324 124325 124326 124327 124328 124329 124330 124331 124332 124333 124334 124335 124336 124337 124338 124339 124340 124341 124342 124343 124344 124345 124346 124347 124348 124349 124350 124351 124352 124353 124354 124355 124356 124357 124358 124359 124360 124361 124362 124363 124364 124365 124366 124367 124368 124369 124370 124371 124372 124373 124374 124375 124376 124377 124378 124379 124380 124381 124382 124383 124384 124385 124386 124387 124388 124389 124390 124391 124392 124393 124394 124395 124396 124397 124398 124399 124400 124401 124402 124403 124404 124405 124406 124407 124408 124409 124410 124411 124412 124413 124414 124415 124416 124417 124418 124419 124420 124421 124422 124423 124424 124425 124426 124427 124428 124429 124430 124431 124432 124433 124434 124435 124436 124437 124438 124439 124440 124441 124442 124443 124444 124445 124446 124447 124448 124449 124450 124451 124452 124453 124454 124455 124456 124457 124458 124459 124460 124461 124462 124463 124464 124465 124466 124467 124468 124469 124470 124471 124472 124473 124474 124475 124476 124477 124478 124479 124480 124481 124482 124483 124484 124485 124486 124487 124488 124489 124490 124491 124492 124493 124494 124495 124496 124497 124498 124499 124500 124501 124502 124503 124504 124505 124506 124507 124508 124509 124510 124511 124512 124513 124514 124515 124516 124517 124518 124519 124520 124521 124522 124523 124524 124525 124526 124527 124528 124529 124530 124531 124532 124533 124534 124535 124536 124537 124538 124539 124540 124541 124542 124543 124544 124545 124546 124547 124548 124549 124550 124551 124552 124553 124554 124555 124556 124557 124558 124559 124560 124561 124562 124563 124564 124565 124566 124567 124568 124569 124570 124571 124572 124573 124574 124575 124576 124577 124578 124579 124580 124581 124582 124583 124584 124585 124586 124587 124588 124589 124590 124591 124592 124593 124594 124595 124596 124597 124598 124599 124600 124601 124602 124603 124604 124605 124606 124607 124608 124609 124610 124611 124612 124613 124614 124615 124616 124617 124618 124619 124620 124621 124622 124623 124624 124625 124626 124627 124628 124629 124630 124631 124632 124633 124634 124635 124636 124637 124638 124639 124640 124641 124642 124643 124644 124645 124646 124647 124648 124649 124650 124651 124652 124653 124654 124655 124656 124657 124658 124659 124660 124661 124662 124663 124664 124665 124666 124667 124668 124669 124670 124671 124672 124673 124674 124675 124676 124677 124678 124679 124680 124681 124682 124683 124684 124685 124686 124687 124688 124689 124690 124691 124692 124693 124694 124695 124696 124697 124698 124699 124700 124701 124702 124703 124704 124705 124706 124707 124708 124709 124710 124711 124712 124713 124714 124715 124716 124717 124718 124719 124720 124721 124722 124723 124724 124725 124726 124727 124728 124729 124730 124731 124732 124733 124734 124735 124736 124737 124738 124739 124740 124741 124742 124743 124744 124745 124746 124747 124748 124749 124750 124751 124752 124753 124754 124755 124756 124757 124758 124759 124760 124761 124762 124763 124764 124765 124766 124767 124768 124769 124770 124771 124772 124773 124774 124775 124776 124777 124778 124779 124780 124781 124782 124783 124784 124785 124786 124787 124788 124789 124790 124791 124792 124793 124794 124795 124796 124797 124798 124799 124800 124801 124802 124803 124804 124805 124806 124807 124808 124809 124810 124811 124812 124813 124814 124815 124816 124817 124818 124819 124820 124821 124822 124823 124824 124825 124826 124827 124828 124829 124830 124831 124832 124833 124834 124835 124836 124837 124838 124839 124840 124841 124842 124843 124844 124845 124846 124847 124848 124849 124850 124851 124852 124853 124854 124855 124856 124857 124858 124859 124860 124861 124862 124863 124864 124865 124866 124867 124868 124869 124870 124871 124872 124873 124874 124875 124876 124877 124878 124879 124880 124881 124882 124883 124884 124885 124886 124887 124888 124889 124890 124891 124892 124893 124894 124895 124896 124897 124898 124899 124900 124901 124902 124903 124904 124905 124906 124907 124908 124909 124910 124911 124912 124913 124914 124915 124916 124917 124918 124919 124920 124921 124922 124923 124924 124925 124926 124927 124928 124929 124930 124931 124932 124933 124934 124935 124936 124937 124938 124939 124940 124941 124942 124943 124944 124945 124946 124947 124948 124949 124950 124951 124952 124953 124954 124955 124956 124957 124958 124959 124960 124961 124962 124963 124964 124965 124966 124967 124968 124969 124970 124971 124972 124973 124974 124975 124976 124977 124978 124979 124980 124981 124982 124983 124984 124985 124986 124987 124988 124989 124990 124991 124992 124993 124994 124995 124996 124997 124998 124999 125000 125001 125002 125003 125004 125005 125006 125007 125008 125009 125010 125011 125012 125013 125014 125015 125016 125017 125018 125019 125020 125021 125022 125023 125024 125025 125026 125027 125028 125029 125030 125031 125032 125033 125034 125035 125036 125037 125038 125039 125040 125041 125042 125043 125044 125045 125046 125047 125048 125049 125050 125051 125052 125053 125054 125055 125056 125057 125058 125059 125060 125061 125062 125063 125064 125065 125066 125067 125068 125069 125070 125071 125072 125073 125074 125075 125076 125077 125078 125079 125080 125081 125082 125083 125084 125085 125086 125087 125088 125089 125090 125091 125092 125093 125094 125095 125096 125097 125098 125099 125100 125101 125102 125103 125104 125105 125106 125107 125108 125109 125110 125111 125112 125113 125114 125115 125116 125117 125118 125119 125120 125121 125122 125123 125124 125125 125126 125127 125128 125129 125130 125131 125132 125133 125134 125135 125136 125137 125138 125139 125140 125141 125142 125143 125144 125145 125146 125147 125148 125149 125150 125151 125152 125153 125154 125155 125156 125157 125158 125159 125160 125161 125162 125163 125164 125165 125166 125167 125168 125169 125170 125171 125172 125173 125174 125175 125176 125177 125178 125179 125180 125181 125182 125183 125184 125185 125186 125187 125188 125189 125190 125191 125192 125193 125194 125195 125196 125197 125198 125199 125200 125201 125202 125203 125204 125205 125206 125207 125208 125209 125210 125211 125212 125213 125214 125215 125216 125217 125218 125219 125220 125221 125222 125223 125224 125225 125226 125227 125228 125229 125230 125231 125232 125233 125234 125235 125236 125237 125238 125239 125240 125241 125242 125243 125244 125245 125246 125247 125248 125249 125250 125251 125252 125253 125254 125255 125256 125257 125258 125259 125260 125261 125262 125263 125264 125265 125266 125267 125268 125269 125270 125271 125272 125273 125274 125275 125276 125277 125278 125279 125280 125281 125282 125283 125284 125285 125286 125287 125288 125289 125290 125291 125292 125293 125294 125295 125296 125297 125298 125299 125300 125301 125302 125303 125304 125305 125306 125307 125308 125309 125310 125311 125312 125313 125314 125315 125316 125317 125318 125319 125320 125321 125322 125323 125324 125325 125326 125327 125328 125329 125330 125331 125332 125333 125334 125335 125336 125337 125338 125339 125340 125341 125342 125343 125344 125345 125346 125347 125348 125349 125350 125351 125352 125353 125354 125355 125356 125357 125358 125359 125360 125361 125362 125363 125364 125365 125366 125367 125368 125369 125370 125371 125372 125373 125374 125375 125376 125377 125378 125379 125380 125381 125382 125383 125384 125385 125386 125387 125388 125389 125390 125391 125392 125393 125394 125395 125396 125397 125398 125399 125400 125401 125402 125403 125404 125405 125406 125407 125408 125409 125410 125411 125412 125413 125414 125415 125416 125417 125418 125419 125420 125421 125422 125423 125424 125425 125426 125427 125428 125429 125430 125431 125432 125433 125434 125435 125436 125437 125438 125439 125440 125441 125442 125443 125444 125445 125446 125447 125448 125449 125450 125451 125452 125453 125454 125455 125456 125457 125458 125459 125460 125461 125462 125463 125464 125465 125466 125467 125468 125469 125470 125471 125472 125473 125474 125475 125476 125477 125478 125479 125480 125481 125482 125483 125484 125485 125486 125487 125488 125489 125490 125491 125492 125493 125494 125495 125496 125497 125498 125499 125500 125501 125502 125503 125504 125505 125506 125507 125508 125509 125510 125511 125512 125513 125514 125515 125516 125517 125518 125519 125520 125521 125522 125523 125524 125525 125526 125527 125528 125529 125530 125531 125532 125533 125534 125535 125536 125537 125538 125539 125540 125541 125542 125543 125544 125545 125546 125547 125548 125549 125550 125551 125552 125553 125554 125555 125556 125557 125558 125559 125560 125561 125562 125563 125564 125565 125566 125567 125568 125569 125570 125571 125572 125573 125574 125575 125576 125577 125578 125579 125580 125581 125582 125583 125584 125585 125586 125587 125588 125589 125590 125591 125592 125593 125594 125595 125596 125597 125598 125599 125600 125601 125602 125603 125604 125605 125606 125607 125608 125609 125610 125611 125612 125613 125614 125615 125616 125617 125618 125619 125620 125621 125622 125623 125624 125625 125626 125627 125628 125629 125630 125631 125632 125633 125634 125635 125636 125637 125638 125639 125640 125641 125642 125643 125644 125645 125646 125647 125648 125649 125650 125651 125652 125653 125654 125655 125656 125657 125658 125659 125660 125661 125662 125663 125664 125665 125666 125667 125668 125669 125670 125671 125672 125673 125674 125675 125676 125677 125678 125679 125680 125681 125682 125683 125684 125685 125686 125687 125688 125689 125690 125691 125692 125693 125694 125695 125696 125697 125698 125699 125700 125701 125702 125703 125704 125705 125706 125707 125708 125709 125710 125711 125712 125713 125714 125715 125716 125717 125718 125719 125720 125721 125722 125723 125724 125725 125726 125727 125728 125729 125730 125731 125732 125733 125734 125735 125736 125737 125738 125739 125740 125741 125742 125743 125744 125745 125746 125747 125748 125749 125750 125751 125752 125753 125754 125755 125756 125757 125758 125759 125760 125761 125762 125763 125764 125765 125766 125767 125768 125769 125770 125771 125772 125773 125774 125775 125776 125777 125778 125779 125780 125781 125782 125783 125784 125785 125786 125787 125788 125789 125790 125791 125792 125793 125794 125795 125796 125797 125798 125799 125800 125801 125802 125803 125804 125805 125806 125807 125808 125809 125810 125811 125812 125813 125814 125815 125816 125817 125818 125819 125820 125821 125822 125823 125824 125825 125826 125827 125828 125829 125830 125831 125832 125833 125834 125835 125836 125837 125838 125839 125840 125841 125842 125843 125844 125845 125846 125847 125848 125849 125850 125851 125852 125853 125854 125855 125856 125857 125858 125859 125860 125861 125862 125863 125864 125865 125866 125867 125868 125869 125870 125871 125872 125873 125874 125875 125876 125877 125878 125879 125880 125881 125882 125883 125884 125885 125886 125887 125888 125889 125890 125891 125892 125893 125894 125895 125896 125897 125898 125899 125900 125901 125902 125903 125904 125905 125906 125907 125908 125909 125910 125911 125912 125913 125914 125915 125916 125917 125918 125919 125920 125921 125922 125923 125924 125925 125926 125927 125928 125929 125930 125931 125932 125933 125934 125935 125936 125937 125938 125939 125940 125941 125942 125943 125944 125945 125946 125947 125948 125949 125950 125951 125952 125953 125954 125955 125956 125957 125958 125959 125960 125961 125962 125963 125964 125965 125966 125967 125968 125969 125970 125971 125972 125973 125974 125975 125976 125977 125978 125979 125980 125981 125982 125983 125984 125985 125986 125987 125988 125989 125990 125991 125992 125993 125994 125995 125996 125997 125998 125999 126000 126001 126002 126003 126004 126005 126006 126007 126008 126009 126010 126011 126012 126013 126014 126015 126016 126017 126018 126019 126020 126021 126022 126023 126024 126025 126026 126027 126028 126029 126030 126031 126032 126033 126034 126035 126036 126037 126038 126039 126040 126041 126042 126043 126044 126045 126046 126047 126048 126049 126050 126051 126052 126053 126054 126055 126056 126057 126058 126059 126060 126061 126062 126063 126064 126065 126066 126067 126068 126069 126070 126071 126072 126073 126074 126075 126076 126077 126078 126079 126080 126081 126082 126083 126084 126085 126086 126087 126088 126089 126090 126091 126092 126093 126094 126095 126096 126097 126098 126099 126100 126101 126102 126103 126104 126105 126106 126107 126108 126109 126110 126111 126112 126113 126114 126115 126116 126117 126118 126119 126120 126121 126122 126123 126124 126125 126126 126127 126128 126129 126130 126131 126132 126133 126134 126135 126136 126137 126138 126139 126140 126141 126142 126143 126144 126145 126146 126147 126148 126149 126150 126151 126152 126153 126154 126155 126156 126157 126158 126159 126160 126161 126162 126163 126164 126165 126166 126167 126168 126169 126170 126171 126172 126173 126174 126175 126176 126177 126178 126179 126180 126181 126182 126183 126184 126185 126186 126187 126188 126189 126190 126191 126192 126193 126194 126195 126196 126197 126198 126199 126200 126201 126202 126203 126204 126205 126206 126207 126208 126209 126210 126211 126212 126213 126214 126215 126216 126217 126218 126219 126220 126221 126222 126223 126224 126225 126226 126227 126228 126229 126230 126231 126232 126233 126234 126235 126236 126237 126238 126239 126240 126241 126242 126243 126244 126245 126246 126247 126248 126249 126250 126251 126252 126253 126254 126255 126256 126257 126258 126259 126260 126261 126262 126263 126264 126265 126266 126267 126268 126269 126270 126271 126272 126273 126274 126275 126276 126277 126278 126279 126280 126281 126282 126283 126284 126285 126286 126287 126288 126289 126290 126291 126292 126293 126294 126295 126296 126297 126298 126299 126300 126301 126302 126303 126304 126305 126306 126307 126308 126309 126310 126311 126312 126313 126314 126315 126316 126317 126318 126319 126320 126321 126322 126323 126324 126325 126326 126327 126328 126329 126330 126331 126332 126333 126334 126335 126336 126337 126338 126339 126340 126341 126342 126343 126344 126345 126346 126347 126348 126349 126350 126351 126352 126353 126354 126355 126356 126357 126358 126359 126360 126361 126362 126363 126364 126365 126366 126367 126368 126369 126370 126371 126372 126373 126374 126375 126376 126377 126378 126379 126380 126381 126382 126383 126384 126385 126386 126387 126388 126389 126390 126391 126392 126393 126394 126395 126396 126397 126398 126399 126400 126401 126402 126403 126404 126405 126406 126407 126408 126409 126410 126411 126412 126413 126414 126415 126416 126417 126418 126419 126420 126421 126422 126423 126424 126425 126426 126427 126428 126429 126430 126431 126432 126433 126434 126435 126436 126437 126438 126439 126440 126441 126442 126443 126444 126445 126446 126447 126448 126449 126450 126451 126452 126453 126454 126455 126456 126457 126458 126459 126460 126461 126462 126463 126464 126465 126466 126467 126468 126469 126470 126471 126472 126473 126474 126475 126476 126477 126478 126479 126480 126481 126482 126483 126484 126485 126486 126487 126488 126489 126490 126491 126492 126493 126494 126495 126496 126497 126498 126499 126500 126501 126502 126503 126504 126505 126506 126507 126508 126509 126510 126511 126512 126513 126514 126515 126516 126517 126518 126519 126520 126521 126522 126523 126524 126525 126526 126527 126528 126529 126530 126531 126532 126533 126534 126535 126536 126537 126538 126539 126540 126541 126542 126543 126544 126545 126546 126547 126548 126549 126550 126551 126552 126553 126554 126555 126556 126557 126558 126559 126560 126561 126562 126563 126564 126565 126566 126567 126568 126569 126570 126571 126572 126573 126574 126575 126576 126577 126578 126579 126580 126581 126582 126583 126584 126585 126586 126587 126588 126589 126590 126591 126592 126593 126594 126595 126596 126597 126598 126599 126600 126601 126602 126603 126604 126605 126606 126607 126608 126609 126610 126611 126612 126613 126614 126615 126616 126617 126618 126619 126620 126621 126622 126623 126624 126625 126626 126627 126628 126629 126630 126631 126632 126633 126634 126635 126636 126637 126638 126639 126640 126641 126642 126643 126644 126645 126646 126647 126648 126649 126650 126651 126652 126653 126654 126655 126656 126657 126658 126659 126660 126661 126662 126663 126664 126665 126666 126667 126668 126669 126670 126671 126672 126673 126674 126675 126676 126677 126678 126679 126680 126681 126682 126683 126684 126685 126686 126687 126688 126689 126690 126691 126692 126693 126694 126695 126696 126697 126698 126699 126700 126701 126702 126703 126704 126705 126706 126707 126708 126709 126710 126711 126712 126713 126714 126715 126716 126717 126718 126719 126720 126721 126722 126723 126724 126725 126726 126727 126728 126729 126730 126731 126732 126733 126734 126735 126736 126737 126738 126739 126740 126741 126742 126743 126744 126745 126746 126747 126748 126749 126750 126751 126752 126753 126754 126755 126756 126757 126758 126759 126760 126761 126762 126763 126764 126765 126766 126767 126768 126769 126770 126771 126772 126773 126774 126775 126776 126777 126778 126779 126780 126781 126782 126783 126784 126785 126786 126787 126788 126789 126790 126791 126792 126793 126794 126795 126796 126797 126798 126799 126800 126801 126802 126803 126804 126805 126806 126807 126808 126809 126810 126811 126812 126813 126814 126815 126816 126817 126818 126819 126820 126821 126822 126823 126824 126825 126826 126827 126828 126829 126830 126831 126832 126833 126834 126835 126836 126837 126838 126839 126840 126841 126842 126843 126844 126845 126846 126847 126848 126849 126850 126851 126852 126853 126854 126855 126856 126857 126858 126859 126860 126861 126862 126863 126864 126865 126866 126867 126868 126869 126870 126871 126872 126873 126874 126875 126876 126877 126878 126879 126880 126881 126882 126883 126884 126885 126886 126887 126888 126889 126890 126891 126892 126893 126894 126895 126896 126897 126898 126899 126900 126901 126902 126903 126904 126905 126906 126907 126908 126909 126910 126911 126912 126913 126914 126915 126916 126917 126918 126919 126920 126921 126922 126923 126924 126925 126926 126927 126928 126929 126930 126931 126932 126933 126934 126935 126936 126937 126938 126939 126940 126941 126942 126943 126944 126945 126946 126947 126948 126949 126950 126951 126952 126953 126954 126955 126956 126957 126958 126959 126960 126961 126962 126963 126964 126965 126966 126967 126968 126969 126970 126971 126972 126973 126974 126975 126976 126977 126978 126979 126980 126981 126982 126983 126984 126985 126986 126987 126988 126989 126990 126991 126992 126993 126994 126995 126996 126997 126998 126999 127000 127001 127002 127003 127004 127005 127006 127007 127008 127009 127010 127011 127012 127013 127014 127015 127016 127017 127018 127019 127020 127021 127022 127023 127024 127025 127026 127027 127028 127029 127030 127031 127032 127033 127034 127035 127036 127037 127038 127039 127040 127041 127042 127043 127044 127045 127046 127047 127048 127049 127050 127051 127052 127053 127054 127055 127056 127057 127058 127059 127060 127061 127062 127063 127064 127065 127066 127067 127068 127069 127070 127071 127072 127073 127074 127075 127076 127077 127078 127079 127080 127081 127082 127083 127084 127085 127086 127087 127088 127089 127090 127091 127092 127093 127094 127095 127096 127097 127098 127099 127100 127101 127102 127103 127104 127105 127106 127107 127108 127109 127110 127111 127112 127113 127114 127115 127116 127117 127118 127119 127120 127121 127122 127123 127124 127125 127126 127127 127128 127129 127130 127131 127132 127133 127134 127135 127136 127137 127138 127139 127140 127141 127142 127143 127144 127145 127146 127147 127148 127149 127150 127151 127152 127153 127154 127155 127156 127157 127158 127159 127160 127161 127162 127163 127164 127165 127166 127167 127168 127169 127170 127171 127172 127173 127174 127175 127176 127177 127178 127179 127180 127181 127182 127183 127184 127185 127186 127187 127188 127189 127190 127191 127192 127193 127194 127195 127196 127197 127198 127199 127200 127201 127202 127203 127204 127205 127206 127207 127208 127209 127210 127211 127212 127213 127214 127215 127216 127217 127218 127219 127220 127221 127222 127223 127224 127225 127226 127227 127228 127229 127230 127231 127232 127233 127234 127235 127236 127237 127238 127239 127240 127241 127242 127243 127244 127245 127246 127247 127248 127249 127250 127251 127252 127253 127254 127255 127256 127257 127258 127259 127260 127261 127262 127263 127264 127265 127266 127267 127268 127269 127270 127271 127272 127273 127274 127275 127276 127277 127278 127279 127280 127281 127282 127283 127284 127285 127286 127287 127288 127289 127290 127291 127292 127293 127294 127295 127296 127297 127298 127299 127300 127301 127302 127303 127304 127305 127306 127307 127308 127309 127310 127311 127312 127313 127314 127315 127316 127317 127318 127319 127320 127321 127322 127323 127324 127325 127326 127327 127328 127329 127330 127331 127332 127333 127334 127335 127336 127337 127338 127339 127340 127341 127342 127343 127344 127345 127346 127347 127348 127349 127350 127351 127352 127353 127354 127355 127356 127357 127358 127359 127360 127361 127362 127363 127364 127365 127366 127367 127368 127369 127370 127371 127372 127373 127374 127375 127376 127377 127378 127379 127380 127381 127382 127383 127384 127385 127386 127387 127388 127389 127390 127391 127392 127393 127394 127395 127396 127397 127398 127399 127400 127401 127402 127403 127404 127405 127406 127407 127408 127409 127410 127411 127412 127413 127414 127415 127416 127417 127418 127419 127420 127421 127422 127423 127424 127425 127426 127427 127428 127429 127430 127431 127432 127433 127434 127435 127436 127437 127438 127439 127440 127441 127442 127443 127444 127445 127446 127447 127448 127449 127450 127451 127452 127453 127454 127455 127456 127457 127458 127459 127460 127461 127462 127463 127464 127465 127466 127467 127468 127469 127470 127471 127472 127473 127474 127475 127476 127477 127478 127479 127480 127481 127482 127483 127484 127485 127486 127487 127488 127489 127490 127491 127492 127493 127494 127495 127496 127497 127498 127499 127500 127501 127502 127503 127504 127505 127506 127507 127508 127509 127510 127511 127512 127513 127514 127515 127516 127517 127518 127519 127520 127521 127522 127523 127524 127525 127526 127527 127528 127529 127530 127531 127532 127533 127534 127535 127536 127537 127538 127539 127540 127541 127542 127543 127544 127545 127546 127547 127548 127549 127550 127551 127552 127553 127554 127555 127556 127557 127558 127559 127560 127561 127562 127563 127564 127565 127566 127567 127568 127569 127570 127571 127572 127573 127574 127575 127576 127577 127578 127579 127580 127581 127582 127583 127584 127585 127586 127587 127588 127589 127590 127591 127592 127593 127594 127595 127596 127597 127598 127599 127600 127601 127602 127603 127604 127605 127606 127607 127608 127609 127610 127611 127612 127613 127614 127615 127616 127617 127618 127619 127620 127621 127622 127623 127624 127625 127626 127627 127628 127629 127630 127631 127632 127633 127634 127635 127636 127637 127638 127639 127640 127641 127642 127643 127644 127645 127646 127647 127648 127649 127650 127651 127652 127653 127654 127655 127656 127657 127658 127659 127660 127661 127662 127663 127664 127665 127666 127667 127668 127669 127670 127671 127672 127673 127674 127675 127676 127677 127678 127679 127680 127681 127682 127683 127684 127685 127686 127687 127688 127689 127690 127691 127692 127693 127694 127695 127696 127697 127698 127699 127700 127701 127702 127703 127704 127705 127706 127707 127708 127709 127710 127711 127712 127713 127714 127715 127716 127717 127718 127719 127720 127721 127722 127723 127724 127725 127726 127727 127728 127729 127730 127731 127732 127733 127734 127735 127736 127737 127738 127739 127740 127741 127742 127743 127744 127745 127746 127747 127748 127749 127750 127751 127752 127753 127754 127755 127756 127757 127758 127759 127760 127761 127762 127763 127764 127765 127766 127767 127768 127769 127770 127771 127772 127773 127774 127775 127776 127777 127778 127779 127780 127781 127782 127783 127784 127785 127786 127787 127788 127789 127790 127791 127792 127793 127794 127795 127796 127797 127798 127799 127800 127801 127802 127803 127804 127805 127806 127807 127808 127809 127810 127811 127812 127813 127814 127815 127816 127817 127818 127819 127820 127821 127822 127823 127824 127825 127826 127827 127828 127829 127830 127831 127832 127833 127834 127835 127836 127837 127838 127839 127840 127841 127842 127843 127844 127845 127846 127847 127848 127849 127850 127851 127852 127853 127854 127855 127856 127857 127858 127859 127860 127861 127862 127863 127864 127865 127866 127867 127868 127869 127870 127871 127872 127873 127874 127875 127876 127877 127878 127879 127880 127881 127882 127883 127884 127885 127886 127887 127888 127889 127890 127891 127892 127893 127894 127895 127896 127897 127898 127899 127900 127901 127902 127903 127904 127905 127906 127907 127908 127909 127910 127911 127912 127913 127914 127915 127916 127917 127918 127919 127920 127921 127922 127923 127924 127925 127926 127927 127928 127929 127930 127931 127932 127933 127934 127935 127936 127937 127938 127939 127940 127941 127942 127943 127944 127945 127946 127947 127948 127949 127950 127951 127952 127953 127954 127955 127956 127957 127958 127959 127960 127961 127962 127963 127964 127965 127966 127967 127968 127969 127970 127971 127972 127973 127974 127975 127976 127977 127978 127979 127980 127981 127982 127983 127984 127985 127986 127987 127988 127989 127990 127991 127992 127993 127994 127995 127996 127997 127998 127999 128000 128001 128002 128003 128004 128005 128006 128007 128008 128009 128010 128011 128012 128013 128014 128015 128016 128017 128018 128019 128020 128021 128022 128023 128024 128025 128026 128027 128028 128029 128030 128031 128032 128033 128034 128035 128036 128037 128038 128039 128040 128041 128042 128043 128044 128045 128046 128047 128048 128049 128050 128051 128052 128053 128054 128055 128056 128057 128058 128059 128060 128061 128062 128063 128064 128065 128066 128067 128068 128069 128070 128071 128072 128073 128074 128075 128076 128077 128078 128079 128080 128081 128082 128083 128084 128085 128086 128087 128088 128089 128090 128091 128092 128093 128094 128095 128096 128097 128098 128099 128100 128101 128102 128103 128104 128105 128106 128107 128108 128109 128110 128111 128112 128113 128114 128115 128116 128117 128118 128119 128120 128121 128122 128123 128124 128125 128126 128127 128128 128129 128130 128131 128132 128133 128134 128135 128136 128137 128138 128139 128140 128141 128142 128143 128144 128145 128146 128147 128148 128149 128150 128151 128152 128153 128154 128155 128156 128157 128158 128159 128160 128161 128162 128163 128164 128165 128166 128167 128168 128169 128170 128171 128172 128173 128174 128175 128176 128177 128178 128179 128180 128181 128182 128183 128184 128185 128186 128187 128188 128189 128190 128191 128192 128193 128194 128195 128196 128197 128198 128199 128200 128201 128202 128203 128204 128205 128206 128207 128208 128209 128210 128211 128212 128213 128214 128215 128216 128217 128218 128219 128220 128221 128222 128223 128224 128225 128226 128227 128228 128229 128230 128231 128232 128233 128234 128235 128236 128237 128238 128239 128240 128241 128242 128243 128244 128245 128246 128247 128248 128249 128250 128251 128252 128253 128254 128255 128256 128257 128258 128259 128260 128261 128262 128263 128264 128265 128266 128267 128268 128269 128270 128271 128272 128273 128274 128275 128276 128277 128278 128279 128280 128281 128282 128283 128284 128285 128286 128287 128288 128289 128290 128291 128292 128293 128294 128295 128296 128297 128298 128299 128300 128301 128302 128303 128304 128305 128306 128307 128308 128309 128310 128311 128312 128313 128314 128315 128316 128317 128318 128319 128320 128321 128322 128323 128324 128325 128326 128327 128328 128329 128330 128331 128332 128333 128334 128335 128336 128337 128338 128339 128340 128341 128342 128343 128344 128345 128346 128347 128348 128349 128350 128351 128352 128353 128354 128355 128356 128357 128358 128359 128360 128361 128362 128363 128364 128365 128366 128367 128368 128369 128370 128371 128372 128373 128374 128375 128376 128377 128378 128379 128380 128381 128382 128383 128384 128385 128386 128387 128388 128389 128390 128391 128392 128393 128394 128395 128396 128397 128398 128399 128400 128401 128402 128403 128404 128405 128406 128407 128408 128409 128410 128411 128412 128413 128414 128415 128416 128417 128418 128419 128420 128421 128422 128423 128424 128425 128426 128427 128428 128429 128430 128431 128432 128433 128434 128435 128436 128437 128438 128439 128440 128441 128442 128443 128444 128445 128446 128447 128448 128449 128450 128451 128452 128453 128454 128455 128456 128457 128458 128459 128460 128461 128462 128463 128464 128465 128466 128467 128468 128469 128470 128471 128472 128473 128474 128475 128476 128477 128478 128479 128480 128481 128482 128483 128484 128485 128486 128487 128488 128489 128490 128491 128492 128493 128494 128495 128496 128497 128498 128499 128500 128501 128502 128503 128504 128505 128506 128507 128508 128509 128510 128511 128512 128513 128514 128515 128516 128517 128518 128519 128520 128521 128522 128523 128524 128525 128526 128527 128528 128529 128530 128531 128532 128533 128534 128535 128536 128537 128538 128539 128540 128541 128542 128543 128544 128545 128546 128547 128548 128549 128550 128551 128552 128553 128554 128555 128556 128557 128558 128559 128560 128561 128562 128563 128564 128565 128566 128567 128568 128569 128570 128571 128572 128573 128574 128575 128576 128577 128578 128579 128580 128581 128582 128583 128584 128585 128586 128587 128588 128589 128590 128591 128592 128593 128594 128595 128596 128597 128598 128599 128600 128601 128602 128603 128604 128605 128606 128607 128608 128609 128610 128611 128612 128613 128614 128615 128616 128617 128618 128619 128620 128621 128622 128623 128624 128625 128626 128627 128628 128629 128630 128631 128632 128633 128634 128635 128636 128637 128638 128639 128640 128641 128642 128643 128644 128645 128646 128647 128648 128649 128650 128651 128652 128653 128654 128655 128656 128657 128658 128659 128660 128661 128662 128663 128664 128665 128666 128667 128668 128669 128670 128671 128672 128673 128674 128675 128676 128677 128678 128679 128680 128681 128682 128683 128684 128685 128686 128687 128688 128689 128690 128691 128692 128693 128694 128695 128696 128697 128698 128699 128700 128701 128702 128703 128704 128705 128706 128707 128708 128709 128710 128711 128712 128713 128714 128715 128716 128717 128718 128719 128720 128721 128722 128723 128724 128725 128726 128727 128728 128729 128730 128731 128732 128733 128734 128735 128736 128737 128738 128739 128740 128741 128742 128743 128744 128745 128746 128747 128748 128749 128750 128751 128752 128753 128754 128755 128756 128757 128758 128759 128760 128761 128762 128763 128764 128765 128766 128767 128768 128769 128770 128771 128772 128773 128774 128775 128776 128777 128778 128779 128780 128781 128782 128783 128784 128785 128786 128787 128788 128789 128790 128791 128792 128793 128794 128795 128796 128797 128798 128799 128800 128801 128802 128803 128804 128805 128806 128807 128808 128809 128810 128811 128812 128813 128814 128815 128816 128817 128818 128819 128820 128821 128822 128823 128824 128825 128826 128827 128828 128829 128830 128831 128832 128833 128834 128835 128836 128837 128838 128839 128840 128841 128842 128843 128844 128845 128846 128847 128848 128849 128850 128851 128852 128853 128854 128855 128856 128857 128858 128859 128860 128861 128862 128863 128864 128865 128866 128867 128868 128869 128870 128871 128872 128873 128874 128875 128876 128877 128878 128879 128880 128881 128882 128883 128884 128885 128886 128887 128888 128889 128890 128891 128892 128893 128894 128895 128896 128897 128898 128899 128900 128901 128902 128903 128904 128905 128906 128907 128908 128909 128910 128911 128912 128913 128914 128915 128916 128917 128918 128919 128920 128921 128922 128923 128924 128925 128926 128927 128928 128929 128930 128931 128932 128933 128934 128935 128936 128937 128938 128939 128940 128941 128942 128943 128944 128945 128946 128947 128948 128949 128950 128951 128952 128953 128954 128955 128956 128957 128958 128959 128960 128961 128962 128963 128964 128965 128966 128967 128968 128969 128970 128971 128972 128973 128974 128975 128976 128977 128978 128979 128980 128981 128982 128983 128984 128985 128986 128987 128988 128989 128990 128991 128992 128993 128994 128995 128996 128997 128998 128999 129000 129001 129002 129003 129004 129005 129006 129007 129008 129009 129010 129011 129012 129013 129014 129015 129016 129017 129018 129019 129020 129021 129022 129023 129024 129025 129026 129027 129028 129029 129030 129031 129032 129033 129034 129035 129036 129037 129038 129039 129040 129041 129042 129043 129044 129045 129046 129047 129048 129049 129050 129051 129052 129053 129054 129055 129056 129057 129058 129059 129060 129061 129062 129063 129064 129065 129066 129067 129068 129069 129070 129071 129072 129073 129074 129075 129076 129077 129078 129079 129080 129081 129082 129083 129084 129085 129086 129087 129088 129089 129090 129091 129092 129093 129094 129095 129096 129097 129098 129099 129100 129101 129102 129103 129104 129105 129106 129107 129108 129109 129110 129111 129112 129113 129114 129115 129116 129117 129118 129119 129120 129121 129122 129123 129124 129125 129126 129127 129128 129129 129130 129131 129132 129133 129134 129135 129136 129137 129138 129139 129140 129141 129142 129143 129144 129145 129146 129147 129148 129149 129150 129151 129152 129153 129154 129155 129156 129157 129158 129159 129160 129161 129162 129163 129164 129165 129166 129167 129168 129169 129170 129171 129172 129173 129174 129175 129176 129177 129178 129179 129180 129181 129182 129183 129184 129185 129186 129187 129188 129189 129190 129191 129192 129193 129194 129195 129196 129197 129198 129199 129200 129201 129202 129203 129204 129205 129206 129207 129208 129209 129210 129211 129212 129213 129214 129215 129216 129217 129218 129219 129220 129221 129222 129223 129224 129225 129226 129227 129228 129229 129230 129231 129232 129233 129234 129235 129236 129237 129238 129239 129240 129241 129242 129243 129244 129245 129246 129247 129248 129249 129250 129251 129252 129253 129254 129255 129256 129257 129258 129259 129260 129261 129262 129263 129264 129265 129266 129267 129268 129269 129270 129271 129272 129273 129274 129275 129276 129277 129278 129279 129280 129281 129282 129283 129284 129285 129286 129287 129288 129289 129290 129291 129292 129293 129294 129295 129296 129297 129298 129299 129300 129301 129302 129303 129304 129305 129306 129307 129308 129309 129310 129311 129312 129313 129314 129315 129316 129317 129318 129319 129320 129321 129322 129323 129324 129325 129326 129327 129328 129329 129330 129331 129332 129333 129334 129335 129336 129337 129338 129339 129340 129341 129342 129343 129344 129345 129346 129347 129348 129349 129350 129351 129352 129353 129354 129355 129356 129357 129358 129359 129360 129361 129362 129363 129364 129365 129366 129367 129368 129369 129370 129371 129372 129373 129374 129375 129376 129377 129378 129379 129380 129381 129382 129383 129384 129385 129386 129387 129388 129389 129390 129391 129392 129393 129394 129395 129396 129397 129398 129399 129400 129401 129402 129403 129404 129405 129406 129407 129408 129409 129410 129411 129412 129413 129414 129415 129416 129417 129418 129419 129420 129421 129422 129423 129424 129425 129426 129427 129428 129429 129430 129431 129432 129433 129434 129435 129436 129437 129438 129439 129440 129441 129442 129443 129444 129445 129446 129447 129448 129449 129450 129451 129452 129453 129454 129455 129456 129457 129458 129459 129460 129461 129462 129463 129464 129465 129466 129467 129468 129469 129470 129471 129472 129473 129474 129475 129476 129477 129478 129479 129480 129481 129482 129483 129484 129485 129486 129487 129488 129489 129490 129491 129492 129493 129494 129495 129496 129497 129498 129499 129500 129501 129502 129503 129504 129505 129506 129507 129508 129509 129510 129511 129512 129513 129514 129515 129516 129517 129518 129519 129520 129521 129522 129523 129524 129525 129526 129527 129528 129529 129530 129531 129532 129533 129534 129535 129536 129537 129538 129539 129540 129541 129542 129543 129544 129545 129546 129547 129548 129549 129550 129551 129552 129553 129554 129555 129556 129557 129558 129559 129560 129561 129562 129563 129564 129565 129566 129567 129568 129569 129570 129571 129572 129573 129574 129575 129576 129577 129578 129579 129580 129581 129582 129583 129584 129585 129586 129587 129588 129589 129590 129591 129592 129593 129594 129595 129596 129597 129598 129599 129600 129601 129602 129603 129604 129605 129606 129607 129608 129609 129610 129611 129612 129613 129614 129615 129616 129617 129618 129619 129620 129621 129622 129623 129624 129625 129626 129627 129628 129629 129630 129631 129632 129633 129634 129635 129636 129637 129638 129639 129640 129641 129642 129643 129644 129645 129646 129647 129648 129649 129650 129651 129652 129653 129654 129655 129656 129657 129658 129659 129660 129661 129662 129663 129664 129665 129666 129667 129668 129669 129670 129671 129672 129673 129674 129675 129676 129677 129678 129679 129680 129681 129682 129683 129684 129685 129686 129687 129688 129689 129690 129691 129692 129693 129694 129695 129696 129697 129698 129699 129700 129701 129702 129703 129704 129705 129706 129707 129708 129709 129710 129711 129712 129713 129714 129715 129716 129717 129718 129719 129720 129721 129722 129723 129724 129725 129726 129727 129728 129729 129730 129731 129732 129733 129734 129735 129736 129737 129738 129739 129740 129741 129742 129743 129744 129745 129746 129747 129748 129749 129750 129751 129752 129753 129754 129755 129756 129757 129758 129759 129760 129761 129762 129763 129764 129765 129766 129767 129768 129769 129770 129771 129772 129773 129774 129775 129776 129777 129778 129779 129780 129781 129782 129783 129784 129785 129786 129787 129788 129789 129790 129791 129792 129793 129794 129795 129796 129797 129798 129799 129800 129801 129802 129803 129804 129805 129806 129807 129808 129809 129810 129811 129812 129813 129814 129815 129816 129817 129818 129819 129820 129821 129822 129823 129824 129825 129826 129827 129828 129829 129830 129831 129832 129833 129834 129835 129836 129837 129838 129839 129840 129841 129842 129843 129844 129845 129846 129847 129848 129849 129850 129851 129852 129853 129854 129855 129856 129857 129858 129859 129860 129861 129862 129863 129864 129865 129866 129867 129868 129869 129870 129871 129872 129873 129874 129875 129876 129877 129878 129879 129880 129881 129882 129883 129884 129885 129886 129887 129888 129889 129890 129891 129892 129893 129894 129895 129896 129897 129898 129899 129900 129901 129902 129903 129904 129905 129906 129907 129908 129909 129910 129911 129912 129913 129914 129915 129916 129917 129918 129919 129920 129921 129922 129923 129924 129925 129926 129927 129928 129929 129930 129931 129932 129933 129934 129935 129936 129937 129938 129939 129940 129941 129942 129943 129944 129945 129946 129947 129948 129949 129950 129951 129952 129953 129954 129955 129956 129957 129958 129959 129960 129961 129962 129963 129964 129965 129966 129967 129968 129969 129970 129971 129972 129973 129974 129975 129976 129977 129978 129979 129980 129981 129982 129983 129984 129985 129986 129987 129988 129989 129990 129991 129992 129993 129994 129995 129996 129997 129998 129999 130000 130001 130002 130003 130004 130005 130006 130007 130008 130009 130010 130011 130012 130013 130014 130015 130016 130017 130018 130019 130020 130021 130022 130023 130024 130025 130026 130027 130028 130029 130030 130031 130032 130033 130034 130035 130036 130037 130038 130039 130040 130041 130042 130043 130044 130045 130046 130047 130048 130049 130050 130051 130052 130053 130054 130055 130056 130057 130058 130059 130060 130061 130062 130063 130064 130065 130066 130067 130068 130069 130070 130071 130072 130073 130074 130075 130076 130077 130078 130079 130080 130081 130082 130083 130084 130085 130086 130087 130088 130089 130090 130091 130092 130093 130094 130095 130096 130097 130098 130099 130100 130101 130102 130103 130104 130105 130106 130107 130108 130109 130110 130111 130112 130113 130114 130115 130116 130117 130118 130119 130120 130121 130122 130123 130124 130125 130126 130127 130128 130129 130130 130131 130132 130133 130134 130135 130136 130137 130138 130139 130140 130141 130142 130143 130144 130145 130146 130147 130148 130149 130150 130151 130152 130153 130154 130155 130156 130157 130158 130159 130160 130161 130162 130163 130164 130165 130166 130167 130168 130169 130170 130171 130172 130173 130174 130175 130176 130177 130178 130179 130180 130181 130182 130183 130184 130185 130186 130187 130188 130189 130190 130191 130192 130193 130194 130195 130196 130197 130198 130199 130200 130201 130202 130203 130204 130205 130206 130207 130208 130209 130210 130211 130212 130213 130214 130215 130216 130217 130218 130219 130220 130221 130222 130223 130224 130225 130226 130227 130228 130229 130230 130231 130232 130233 130234 130235 130236 130237 130238 130239 130240 130241 130242 130243 130244 130245 130246 130247 130248 130249 130250 130251 130252 130253 130254 130255 130256 130257 130258 130259 130260 130261 130262 130263 130264 130265 130266 130267 130268 130269 130270 130271 130272 130273 130274 130275 130276 130277 130278 130279 130280 130281 130282 130283 130284 130285 130286 130287 130288 130289 130290 130291 130292 130293 130294 130295 130296 130297 130298 130299 130300 130301 130302 130303 130304 130305 130306 130307 130308 130309 130310 130311 130312 130313 130314 130315 130316 130317 130318 130319 130320 130321 130322 130323 130324 130325 130326 130327 130328 130329 130330 130331 130332 130333 130334 130335 130336 130337 130338 130339 130340 130341 130342 130343 130344 130345 130346 130347 130348 130349 130350 130351 130352 130353 130354 130355 130356 130357 130358 130359 130360 130361 130362 130363 130364 130365 130366 130367 130368 130369 130370 130371 130372 130373 130374 130375 130376 130377 130378 130379 130380 130381 130382 130383 130384 130385 130386 130387 130388 130389 130390 130391 130392 130393 130394 130395 130396 130397 130398 130399 130400 130401 130402 130403 130404 130405 130406 130407 130408 130409 130410 130411 130412 130413 130414 130415 130416 130417 130418 130419 130420 130421 130422 130423 130424 130425 130426 130427 130428 130429 130430 130431 130432 130433 130434 130435 130436 130437 130438 130439 130440 130441 130442 130443 130444 130445 130446 130447 130448 130449 130450 130451 130452 130453 130454 130455 130456 130457 130458 130459 130460 130461 130462 130463 130464 130465 130466 130467 130468 130469 130470 130471 130472 130473 130474 130475 130476 130477 130478 130479 130480 130481 130482 130483 130484 130485 130486 130487 130488 130489 130490 130491 130492 130493 130494 130495 130496 130497 130498 130499 130500 130501 130502 130503 130504 130505 130506 130507 130508 130509 130510 130511 130512 130513 130514 130515 130516 130517 130518 130519 130520 130521 130522 130523 130524 130525 130526 130527 130528 130529 130530 130531 130532 130533 130534 130535 130536 130537 130538 130539 130540 130541 130542 130543 130544 130545 130546 130547 130548 130549 130550 130551 130552 130553 130554 130555 130556 130557 130558 130559 130560 130561 130562 130563 130564 130565 130566 130567 130568 130569 130570 130571 130572 130573 130574 130575 130576 130577 130578 130579 130580 130581 130582 130583 130584 130585 130586 130587 130588 130589 130590 130591 130592 130593 130594 130595 130596 130597 130598 130599 130600 130601 130602 130603 130604 130605 130606 130607 130608 130609 130610 130611 130612 130613 130614 130615 130616 130617 130618 130619 130620 130621 130622 130623 130624 130625 130626 130627 130628 130629 130630 130631 130632 130633 130634 130635 130636 130637 130638 130639 130640 130641 130642 130643 130644 130645 130646 130647 130648 130649 130650 130651 130652 130653 130654 130655 130656 130657 130658 130659 130660 130661 130662 130663 130664 130665 130666 130667 130668 130669 130670 130671 130672 130673 130674 130675 130676 130677 130678 130679 130680 130681 130682 130683 130684 130685 130686 130687 130688 130689 130690 130691 130692 130693 130694 130695 130696 130697 130698 130699 130700 130701 130702 130703 130704 130705 130706 130707 130708 130709 130710 130711 130712 130713 130714 130715 130716 130717 130718 130719 130720 130721 130722 130723 130724 130725 130726 130727 130728 130729 130730 130731 130732 130733 130734 130735 130736 130737 130738 130739 130740 130741 130742 130743 130744 130745 130746 130747 130748 130749 130750 130751 130752 130753 130754 130755 130756 130757 130758 130759 130760 130761 130762 130763 130764 130765 130766 130767 130768 130769 130770 130771 130772 130773 130774 130775 130776 130777 130778 130779 130780 130781 130782 130783 130784 130785 130786 130787 130788 130789 130790 130791 130792 130793 130794 130795 130796 130797 130798 130799 130800 130801 130802 130803 130804 130805 130806 130807 130808 130809 130810 130811 130812 130813 130814 130815 130816 130817 130818 130819 130820 130821 130822 130823 130824 130825 130826 130827 130828 130829 130830 130831 130832 130833 130834 130835 130836 130837 130838 130839 130840 130841 130842 130843 130844 130845 130846 130847 130848 130849 130850 130851 130852 130853 130854 130855 130856 130857 130858 130859 130860 130861 130862 130863 130864 130865 130866 130867 130868 130869 130870 130871 130872 130873 130874 130875 130876 130877 130878 130879 130880 130881 130882 130883 130884 130885 130886 130887 130888 130889 130890 130891 130892 130893 130894 130895 130896 130897 130898 130899 130900 130901 130902 130903 130904 130905 130906 130907 130908 130909 130910 130911 130912 130913 130914 130915 130916 130917 130918 130919 130920 130921 130922 130923 130924 130925 130926 130927 130928 130929 130930 130931 130932 130933 130934 130935 130936 130937 130938 130939 130940 130941 130942 130943 130944 130945 130946 130947 130948 130949 130950 130951 130952 130953 130954 130955 130956 130957 130958 130959 130960 130961 130962 130963 130964 130965 130966 130967 130968 130969 130970 130971 130972 130973 130974 130975 130976 130977 130978 130979 130980 130981 130982 130983 130984 130985 130986 130987 130988 130989 130990 130991 130992 130993 130994 130995 130996 130997 130998 130999 131000 131001 131002 131003 131004 131005 131006 131007 131008 131009 131010 131011 131012 131013 131014 131015 131016 131017 131018 131019 131020 131021 131022 131023 131024 131025 131026 131027 131028 131029 131030 131031 131032 131033 131034 131035 131036 131037 131038 131039 131040 131041 131042 131043 131044 131045 131046 131047 131048 131049 131050 131051 131052 131053 131054 131055 131056 131057 131058 131059 131060 131061 131062 131063 131064 131065 131066 131067 131068 131069 131070 131071 131072 131073 131074 131075 131076 131077 131078 131079 131080 131081 131082 131083 131084 131085 131086 131087 131088 131089 131090 131091 131092 131093 131094 131095 131096 131097 131098 131099 131100 131101 131102 131103 131104 131105 131106 131107 131108 131109 131110 131111 131112 131113 131114 131115 131116 131117 131118 131119 131120 131121 131122 131123 131124 131125 131126 131127 131128 131129 131130 131131 131132 131133 131134 131135 131136 131137 131138 131139 131140 131141 131142 131143 131144 131145 131146 131147 131148 131149 131150 131151 131152 131153 131154 131155 131156 131157 131158 131159 131160 131161 131162 131163 131164 131165 131166 131167 131168 131169 131170 131171 131172 131173 131174 131175 131176 131177 131178 131179 131180 131181 131182 131183 131184 131185 131186 131187 131188 131189 131190 131191 131192 131193 131194 131195 131196 131197 131198 131199 131200 131201 131202 131203 131204 131205 131206 131207 131208 131209 131210 131211 131212 131213 131214 131215 131216 131217 131218 131219 131220 131221 131222 131223 131224 131225 131226 131227 131228 131229 131230 131231 131232 131233 131234 131235 131236 131237 131238 131239 131240 131241 131242 131243 131244 131245 131246 131247 131248 131249 131250 131251 131252 131253 131254 131255 131256 131257 131258 131259 131260 131261 131262 131263 131264 131265 131266 131267 131268 131269 131270 131271 131272 131273 131274 131275 131276 131277 131278 131279 131280 131281 131282 131283 131284 131285 131286 131287 131288 131289 131290 131291 131292 131293 131294 131295 131296 131297 131298 131299 131300 131301 131302 131303 131304 131305 131306 131307 131308 131309 131310 131311 131312 131313 131314 131315 131316 131317 131318 131319 131320 131321 131322 131323 131324 131325 131326 131327 131328 131329 131330 131331 131332 131333 131334 131335 131336 131337 131338 131339 131340 131341 131342 131343 131344 131345 131346 131347 131348 131349 131350 131351 131352 131353 131354 131355 131356 131357 131358 131359 131360 131361 131362 131363 131364 131365 131366 131367 131368 131369 131370 131371 131372 131373 131374 131375 131376 131377 131378 131379 131380 131381 131382 131383 131384 131385 131386 131387 131388 131389 131390 131391 131392 131393 131394 131395 131396 131397 131398 131399 131400 131401 131402 131403 131404 131405 131406 131407 131408 131409 131410 131411 131412 131413 131414 131415 131416 131417 131418 131419 131420 131421 131422 131423 131424 131425 131426 131427 131428 131429 131430 131431 131432 131433 131434 131435 131436 131437 131438 131439 131440 131441 131442 131443 131444 131445 131446 131447 131448 131449 131450 131451 131452 131453 131454 131455 131456 131457 131458 131459 131460 131461 131462 131463 131464 131465 131466 131467 131468 131469 131470 131471 131472 131473 131474 131475 131476 131477 131478 131479 131480 131481 131482 131483 131484 131485 131486 131487 131488 131489 131490 131491 131492 131493 131494 131495 131496 131497 131498 131499 131500 131501 131502 131503 131504 131505 131506 131507 131508 131509 131510 131511 131512 131513 131514 131515 131516 131517 131518 131519 131520 131521 131522 131523 131524 131525 131526 131527 131528 131529 131530 131531 131532 131533 131534 131535 131536 131537 131538 131539 131540 131541 131542 131543 131544 131545 131546 131547 131548 131549 131550 131551 131552 131553 131554 131555 131556 131557 131558 131559 131560 131561 131562 131563 131564 131565 131566 131567 131568 131569 131570 131571 131572 131573 131574 131575 131576 131577 131578 131579 131580 131581 131582 131583 131584 131585 131586 131587 131588 131589 131590 131591 131592 131593 131594 131595 131596 131597 131598 131599 131600 131601 131602 131603 131604 131605 131606 131607 131608 131609 131610 131611 131612 131613 131614 131615 131616 131617 131618 131619 131620 131621 131622 131623 131624 131625 131626 131627 131628 131629 131630 131631 131632 131633 131634 131635 131636 131637 131638 131639 131640 131641 131642 131643 131644 131645 131646 131647 131648 131649 131650 131651 131652 131653 131654 131655 131656 131657 131658 131659 131660 131661 131662 131663 131664 131665 131666 131667 131668 131669 131670 131671 131672 131673 131674 131675 131676 131677 131678 131679 131680 131681 131682 131683 131684 131685 131686 131687 131688 131689 131690 131691 131692 131693 131694 131695 131696 131697 131698 131699 131700 131701 131702 131703 131704 131705 131706 131707 131708 131709 131710 131711 131712 131713 131714 131715 131716 131717 131718 131719 131720 131721 131722 131723 131724 131725 131726 131727 131728 131729 131730 131731 131732 131733 131734 131735 131736 131737 131738 131739 131740 131741 131742 131743 131744 131745 131746 131747 131748 131749 131750 131751 131752 131753 131754 131755 131756 131757 131758 131759 131760 131761 131762 131763 131764 131765 131766 131767 131768 131769 131770 131771 131772 131773 131774 131775 131776 131777 131778 131779 131780 131781 131782 131783 131784 131785 131786 131787 131788 131789 131790 131791 131792 131793 131794 131795 131796 131797 131798 131799 131800 131801 131802 131803 131804 131805 131806 131807 131808 131809 131810 131811 131812 131813 131814 131815 131816 131817 131818 131819 131820 131821 131822 131823 131824 131825 131826 131827 131828 131829 131830 131831 131832 131833 131834 131835 131836 131837 131838 131839 131840 131841 131842 131843 131844 131845 131846 131847 131848 131849 131850 131851 131852 131853 131854 131855 131856 131857 131858 131859 131860 131861 131862 131863 131864 131865 131866 131867 131868 131869 131870 131871 131872 131873 131874 131875 131876 131877 131878 131879 131880 131881 131882 131883 131884 131885 131886 131887 131888 131889 131890 131891 131892 131893 131894 131895 131896 131897 131898 131899 131900 131901 131902 131903 131904 131905 131906 131907 131908 131909 131910 131911 131912 131913 131914 131915 131916 131917 131918 131919 131920 131921 131922 131923 131924 131925 131926 131927 131928 131929 131930 131931 131932 131933 131934 131935 131936 131937 131938 131939 131940 131941 131942 131943 131944 131945 131946 131947 131948 131949 131950 131951 131952 131953 131954 131955 131956 131957 131958 131959 131960 131961 131962 131963 131964 131965 131966 131967 131968 131969 131970 131971 131972 131973 131974 131975 131976 131977 131978 131979 131980 131981 131982 131983 131984 131985 131986 131987 131988 131989 131990 131991 131992 131993 131994 131995 131996 131997 131998 131999 132000 132001 132002 132003 132004 132005 132006 132007 132008 132009 132010 132011 132012 132013 132014 132015 132016 132017 132018 132019 132020 132021 132022 132023 132024 132025 132026 132027 132028 132029 132030 132031 132032 132033 132034 132035 132036 132037 132038 132039 132040 132041 132042 132043 132044 132045 132046 132047 132048 132049 132050 132051 132052 132053 132054 132055 132056 132057 132058 132059 132060 132061 132062 132063 132064 132065 132066 132067 132068 132069 132070 132071 132072 132073 132074 132075 132076 132077 132078 132079 132080 132081 132082 132083 132084 132085 132086 132087 132088 132089 132090 132091 132092 132093 132094 132095 132096 132097 132098 132099 132100 132101 132102 132103 132104 132105 132106 132107 132108 132109 132110 132111 132112 132113 132114 132115 132116 132117 132118 132119 132120 132121 132122 132123 132124 132125 132126 132127 132128 132129 132130 132131 132132 132133 132134 132135 132136 132137 132138 132139 132140 132141 132142 132143 132144 132145 132146 132147 132148 132149 132150 132151 132152 132153 132154 132155 132156 132157 132158 132159 132160 132161 132162 132163 132164 132165 132166 132167 132168 132169 132170 132171 132172 132173 132174 132175 132176 132177 132178 132179 132180 132181 132182 132183 132184 132185 132186 132187 132188 132189 132190 132191 132192 132193 132194 132195 132196 132197 132198 132199 132200 132201 132202 132203 132204 132205 132206 132207 132208 132209 132210 132211 132212 132213 132214 132215 132216 132217 132218 132219 132220 132221 132222 132223 132224 132225 132226 132227 132228 132229 132230 132231 132232 132233 132234 132235 132236 132237 132238 132239 132240 132241 132242 132243 132244 132245 132246 132247 132248 132249 132250 132251 132252 132253 132254 132255 132256 132257 132258 132259 132260 132261 132262 132263 132264 132265 132266 132267 132268 132269 132270 132271 132272 132273 132274 132275 132276 132277 132278 132279 132280 132281 132282 132283 132284 132285 132286 132287 132288 132289 132290 132291 132292 132293 132294 132295 132296 132297 132298 132299 132300 132301 132302 132303 132304 132305 132306 132307 132308 132309 132310 132311 132312 132313 132314 132315 132316 132317 132318 132319 132320 132321 132322 132323 132324 132325 132326 132327 132328 132329 132330 132331 132332 132333 132334 132335 132336 132337 132338 132339 132340 132341 132342 132343 132344 132345 132346 132347 132348 132349 132350 132351 132352 132353 132354 132355 132356 132357 132358 132359 132360 132361 132362 132363 132364 132365 132366 132367 132368 132369 132370 132371 132372 132373 132374 132375 132376 132377 132378 132379 132380 132381 132382 132383 132384 132385 132386 132387 132388 132389 132390 132391 132392 132393 132394 132395 132396 132397 132398 132399 132400 132401 132402 132403 132404 132405 132406 132407 132408 132409 132410 132411 132412 132413 132414 132415 132416 132417 132418 132419 132420 132421 132422 132423 132424 132425 132426 132427 132428 132429 132430 132431 132432 132433 132434 132435 132436 132437 132438 132439 132440 132441 132442 132443 132444 132445 132446 132447 132448 132449 132450 132451 132452 132453 132454 132455 132456 132457 132458 132459 132460 132461 132462 132463 132464 132465 132466 132467 132468 132469 132470 132471 132472 132473 132474 132475 132476 132477 132478 132479 132480 132481 132482 132483 132484 132485 132486 132487 132488 132489 132490 132491 132492 132493 132494 132495 132496 132497 132498 132499 132500 132501 132502 132503 132504 132505 132506 132507 132508 132509 132510 132511 132512 132513 132514 132515 132516 132517 132518 132519 132520 132521 132522 132523 132524 132525 132526 132527 132528 132529 132530 132531 132532 132533 132534 132535 132536 132537 132538 132539 132540 132541 132542 132543 132544 132545 132546 132547 132548 132549 132550 132551 132552 132553 132554 132555 132556 132557 132558 132559 132560 132561 132562 132563 132564 132565 132566 132567 132568 132569 132570 132571 132572 132573 132574 132575 132576 132577 132578 132579 132580 132581 132582 132583 132584 132585 132586 132587 132588 132589 132590 132591 132592 132593 132594 132595 132596 132597 132598 132599 132600 132601 132602 132603 132604 132605 132606 132607 132608 132609 132610 132611 132612 132613 132614 132615 132616 132617 132618 132619 132620 132621 132622 132623 132624 132625 132626 132627 132628 132629 132630 132631 132632 132633 132634 132635 132636 132637 132638 132639 132640 132641 132642 132643 132644 132645 132646 132647 132648 132649 132650 132651 132652 132653 132654 132655 132656 132657 132658 132659 132660 132661 132662 132663 132664 132665 132666 132667 132668 132669 132670 132671 132672 132673 132674 132675 132676 132677 132678 132679 132680 132681 132682 132683 132684 132685 132686 132687 132688 132689 132690 132691 132692 132693 132694 132695 132696 132697 132698 132699 132700 132701 132702 132703 132704 132705 132706 132707 132708 132709 132710 132711 132712 132713 132714 132715 132716 132717 132718 132719 132720 132721 132722 132723 132724 132725 132726 132727 132728 132729 132730 132731 132732 132733 132734 132735 132736 132737 132738 132739 132740 132741 132742 132743 132744 132745 132746 132747 132748 132749 132750 132751 132752 132753 132754 132755 132756 132757 132758 132759 132760 132761 132762 132763 132764 132765 132766 132767 132768 132769 132770 132771 132772 132773 132774 132775 132776 132777 132778 132779 132780 132781 132782 132783 132784 132785 132786 132787 132788 132789 132790 132791 132792 132793 132794 132795 132796 132797 132798 132799 132800 132801 132802 132803 132804 132805 132806 132807 132808 132809 132810 132811 132812 132813 132814 132815 132816 132817 132818 132819 132820 132821 132822 132823 132824 132825 132826 132827 132828 132829 132830 132831 132832 132833 132834 132835 132836 132837 132838 132839 132840 132841 132842 132843 132844 132845 132846 132847 132848 132849 132850 132851 132852 132853 132854 132855 132856 132857 132858 132859 132860 132861 132862 132863 132864 132865 132866 132867 132868 132869 132870 132871 132872 132873 132874 132875 132876 132877 132878 132879 132880 132881 132882 132883 132884 132885 132886 132887 132888 132889 132890 132891 132892 132893 132894 132895 132896 132897 132898 132899 132900 132901 132902 132903 132904 132905 132906 132907 132908 132909 132910 132911 132912 132913 132914 132915 132916 132917 132918 132919 132920 132921 132922 132923 132924 132925 132926 132927 132928 132929 132930 132931 132932 132933 132934 132935 132936 132937 132938 132939 132940 132941 132942 132943 132944 132945 132946 132947 132948 132949 132950 132951 132952 132953 132954 132955 132956 132957 132958 132959 132960 132961 132962 132963 132964 132965 132966 132967 132968 132969 132970 132971 132972 132973 132974 132975 132976 132977 132978 132979 132980 132981 132982 132983 132984 132985 132986 132987 132988 132989 132990 132991 132992 132993 132994 132995 132996 132997 132998 132999 133000 133001 133002 133003 133004 133005 133006 133007 133008 133009 133010 133011 133012 133013 133014 133015 133016 133017 133018 133019 133020 133021 133022 133023 133024 133025 133026 133027 133028 133029 133030 133031 133032 133033 133034 133035 133036 133037 133038 133039 133040 133041 133042 133043 133044 133045 133046 133047 133048 133049 133050 133051 133052 133053 133054 133055 133056 133057 133058 133059 133060 133061 133062 133063 133064 133065 133066 133067 133068 133069 133070 133071 133072 133073 133074 133075 133076 133077 133078 133079 133080 133081 133082 133083 133084 133085 133086 133087 133088 133089 133090 133091 133092 133093 133094 133095 133096 133097 133098 133099 133100 133101 133102 133103 133104 133105 133106 133107 133108 133109 133110 133111 133112 133113 133114 133115 133116 133117 133118 133119 133120 133121 133122 133123 133124 133125 133126 133127 133128 133129 133130 133131 133132 133133 133134 133135 133136 133137 133138 133139 133140 133141 133142 133143 133144 133145 133146 133147 133148 133149 133150 133151 133152 133153 133154 133155 133156 133157 133158 133159 133160 133161 133162 133163 133164 133165 133166 133167 133168 133169 133170 133171 133172 133173 133174 133175 133176 133177 133178 133179 133180 133181 133182 133183 133184 133185 133186 133187 133188 133189 133190 133191 133192 133193 133194 133195 133196 133197 133198 133199 133200 133201 133202 133203 133204 133205 133206 133207 133208 133209 133210 133211 133212 133213 133214 133215 133216 133217 133218 133219 133220 133221 133222 133223 133224 133225 133226 133227 133228 133229 133230 133231 133232 133233 133234 133235 133236 133237 133238 133239 133240 133241 133242 133243 133244 133245 133246 133247 133248 133249 133250 133251 133252 133253 133254 133255 133256 133257 133258 133259 133260 133261 133262 133263 133264 133265 133266 133267 133268 133269 133270 133271 133272 133273 133274 133275 133276 133277 133278 133279 133280 133281 133282 133283 133284 133285 133286 133287 133288 133289 133290 133291 133292 133293 133294 133295 133296 133297 133298 133299 133300 133301 133302 133303 133304 133305 133306 133307 133308 133309 133310 133311 133312 133313 133314 133315 133316 133317 133318 133319 133320 133321 133322 133323 133324 133325 133326 133327 133328 133329 133330 133331 133332 133333 133334 133335 133336 133337 133338 133339 133340 133341 133342 133343 133344 133345 133346 133347 133348 133349 133350 133351 133352 133353 133354 133355 133356 133357 133358 133359 133360 133361 133362 133363 133364 133365 133366 133367 133368 133369 133370 133371 133372 133373 133374 133375 133376 133377 133378 133379 133380 133381 133382 133383 133384 133385 133386 133387 133388 133389 133390 133391 133392 133393 133394 133395 133396 133397 133398 133399 133400 133401 133402 133403 133404 133405 133406 133407 133408 133409 133410 133411 133412 133413 133414 133415 133416 133417 133418 133419 133420 133421 133422 133423 133424 133425 133426 133427 133428 133429 133430 133431 133432 133433 133434 133435 133436 133437 133438 133439 133440 133441 133442 133443 133444 133445 133446 133447 133448 133449 133450 133451 133452 133453 133454 133455 133456 133457 133458 133459 133460 133461 133462 133463 133464 133465 133466 133467 133468 133469 133470 133471 133472 133473 133474 133475 133476 133477 133478 133479 133480 133481 133482 133483 133484 133485 133486 133487 133488 133489 133490 133491 133492 133493 133494 133495 133496 133497 133498 133499 133500 133501 133502 133503 133504 133505 133506 133507 133508 133509 133510 133511 133512 133513 133514 133515 133516 133517 133518 133519 133520 133521 133522 133523 133524 133525 133526 133527 133528 133529 133530 133531 133532 133533 133534 133535 133536 133537 133538 133539 133540 133541 133542 133543 133544 133545 133546 133547 133548 133549 133550 133551 133552 133553 133554 133555 133556 133557 133558 133559 133560 133561 133562 133563 133564 133565 133566 133567 133568 133569 133570 133571 133572 133573 133574 133575 133576 133577 133578 133579 133580 133581 133582 133583 133584 133585 133586 133587 133588 133589 133590 133591 133592 133593 133594 133595 133596 133597 133598 133599 133600 133601 133602 133603 133604 133605 133606 133607 133608 133609 133610 133611 133612 133613 133614 133615 133616 133617 133618 133619 133620 133621 133622 133623 133624 133625 133626 133627 133628 133629 133630 133631 133632 133633 133634 133635 133636 133637 133638 133639 133640 133641 133642 133643 133644 133645 133646 133647 133648 133649 133650 133651 133652 133653 133654 133655 133656 133657 133658 133659 133660 133661 133662 133663 133664 133665 133666 133667 133668 133669 133670 133671 133672 133673 133674 133675 133676 133677 133678 133679 133680 133681 133682 133683 133684 133685 133686 133687 133688 133689 133690 133691 133692 133693 133694 133695 133696 133697 133698 133699 133700 133701 133702 133703 133704 133705 133706 133707 133708 133709 133710 133711 133712 133713 133714 133715 133716 133717 133718 133719 133720 133721 133722 133723 133724 133725 133726 133727 133728 133729 133730 133731 133732 133733 133734 133735 133736 133737 133738 133739 133740 133741 133742 133743 133744 133745 133746 133747 133748 133749 133750 133751 133752 133753 133754 133755 133756 133757 133758 133759 133760 133761 133762 133763 133764 133765 133766 133767 133768 133769 133770 133771 133772 133773 133774 133775 133776 133777 133778 133779 133780 133781 133782 133783 133784 133785 133786 133787 133788 133789 133790 133791 133792 133793 133794 133795 133796 133797 133798 133799 133800 133801 133802 133803 133804 133805 133806 133807 133808 133809 133810 133811 133812 133813 133814 133815 133816 133817 133818 133819 133820 133821 133822 133823 133824 133825 133826 133827 133828 133829 133830 133831 133832 133833 133834 133835 133836 133837 133838 133839 133840 133841 133842 133843 133844 133845 133846 133847 133848 133849 133850 133851 133852 133853 133854 133855 133856 133857 133858 133859 133860 133861 133862 133863 133864 133865 133866 133867 133868 133869 133870 133871 133872 133873 133874 133875 133876 133877 133878 133879 133880 133881 133882 133883 133884 133885 133886 133887 133888 133889 133890 133891 133892 133893 133894 133895 133896 133897 133898 133899 133900 133901 133902 133903 133904 133905 133906 133907 133908 133909 133910 133911 133912 133913 133914 133915 133916 133917 133918 133919 133920 133921 133922 133923 133924 133925 133926 133927 133928 133929 133930 133931 133932 133933 133934 133935 133936 133937 133938 133939 133940 133941 133942 133943 133944 133945 133946 133947 133948 133949 133950 133951 133952 133953 133954 133955 133956 133957 133958 133959 133960 133961 133962 133963 133964 133965 133966 133967 133968 133969 133970 133971 133972 133973 133974 133975 133976 133977 133978 133979 133980 133981 133982 133983 133984 133985 133986 133987 133988 133989 133990 133991 133992 133993 133994 133995 133996 133997 133998 133999 134000 134001 134002 134003 134004 134005 134006 134007 134008 134009 134010 134011 134012 134013 134014 134015 134016 134017 134018 134019 134020 134021 134022 134023 134024 134025 134026 134027 134028 134029 134030 134031 134032 134033 134034 134035 134036 134037 134038 134039 134040 134041 134042 134043 134044 134045 134046 134047 134048 134049 134050 134051 134052 134053 134054 134055 134056 134057 134058 134059 134060 134061 134062 134063 134064 134065 134066 134067 134068 134069 134070 134071 134072 134073 134074 134075 134076 134077 134078 134079 134080 134081 134082 134083 134084 134085 134086 134087 134088 134089 134090 134091 134092 134093 134094 134095 134096 134097 134098 134099 134100 134101 134102 134103 134104 134105 134106 134107 134108 134109 134110 134111 134112 134113 134114 134115 134116 134117 134118 134119 134120 134121 134122 134123 134124 134125 134126 134127 134128 134129 134130 134131 134132 134133 134134 134135 134136 134137 134138 134139 134140 134141 134142 134143 134144 134145 134146 134147 134148 134149 134150 134151 134152 134153 134154 134155 134156 134157 134158 134159 134160 134161 134162 134163 134164 134165 134166 134167 134168 134169 134170 134171 134172 134173 134174 134175 134176 134177 134178 134179 134180 134181 134182 134183 134184 134185 134186 134187 134188 134189 134190 134191 134192 134193 134194 134195 134196 134197 134198 134199 134200 134201 134202 134203 134204 134205 134206 134207 134208 134209 134210 134211 134212 134213 134214 134215 134216 134217 134218 134219 134220 134221 134222 134223 134224 134225 134226 134227 134228 134229 134230 134231 134232 134233 134234 134235 134236 134237 134238 134239 134240 134241 134242 134243 134244 134245 134246 134247 134248 134249 134250 134251 134252 134253 134254 134255 134256 134257 134258 134259 134260 134261 134262 134263 134264 134265 134266 134267 134268 134269 134270 134271 134272 134273 134274 134275 134276 134277 134278 134279 134280 134281 134282 134283 134284 134285 134286 134287 134288 134289 134290 134291 134292 134293 134294 134295 134296 134297 134298 134299 134300 134301 134302 134303 134304 134305 134306 134307 134308 134309 134310 134311 134312 134313 134314 134315 134316 134317 134318 134319 134320 134321 134322 134323 134324 134325 134326 134327 134328 134329 134330 134331 134332 134333 134334 134335 134336 134337 134338 134339 134340 134341 134342 134343 134344 134345 134346 134347 134348 134349 134350 134351 134352 134353 134354 134355 134356 134357 134358 134359 134360 134361 134362 134363 134364 134365 134366 134367 134368 134369 134370 134371 134372 134373 134374 134375 134376 134377 134378 134379 134380 134381 134382 134383 134384 134385 134386 134387 134388 134389 134390 134391 134392 134393 134394 134395 134396 134397 134398 134399 134400 134401 134402 134403 134404 134405 134406 134407 134408 134409 134410 134411 134412 134413 134414 134415 134416 134417 134418 134419 134420 134421 134422 134423 134424 134425 134426 134427 134428 134429 134430 134431 134432 134433 134434 134435 134436 134437 134438 134439 134440 134441 134442 134443 134444 134445 134446 134447 134448 134449 134450 134451 134452 134453 134454 134455 134456 134457 134458 134459 134460 134461 134462 134463 134464 134465 134466 134467 134468 134469 134470 134471 134472 134473 134474 134475 134476 134477 134478 134479 134480 134481 134482 134483 134484 134485 134486 134487 134488 134489 134490 134491 134492 134493 134494 134495 134496 134497 134498 134499 134500 134501 134502 134503 134504 134505 134506 134507 134508 134509 134510 134511 134512 134513 134514 134515 134516 134517 134518 134519 134520 134521 134522 134523 134524 134525 134526 134527 134528 134529 134530 134531 134532 134533 134534 134535 134536 134537 134538 134539 134540 134541 134542 134543 134544 134545 134546 134547 134548 134549 134550 134551 134552 134553 134554 134555 134556 134557 134558 134559 134560 134561 134562 134563 134564 134565 134566 134567 134568 134569 134570 134571 134572 134573 134574 134575 134576 134577 134578 134579 134580 134581 134582 134583 134584 134585 134586 134587 134588 134589 134590 134591 134592 134593 134594 134595 134596 134597 134598 134599 134600 134601 134602 134603 134604 134605 134606 134607 134608 134609 134610 134611 134612 134613 134614 134615 134616 134617 134618 134619 134620 134621 134622 134623 134624 134625 134626 134627 134628 134629 134630 134631 134632 134633 134634 134635 134636 134637 134638 134639 134640 134641 134642 134643 134644 134645 134646 134647 134648 134649 134650 134651 134652 134653 134654 134655 134656 134657 134658 134659 134660 134661 134662 134663 134664 134665 134666 134667 134668 134669 134670 134671 134672 134673 134674 134675 134676 134677 134678 134679 134680 134681 134682 134683 134684 134685 134686 134687 134688 134689 134690 134691 134692 134693 134694 134695 134696 134697 134698 134699 134700 134701 134702 134703 134704 134705 134706 134707 134708 134709 134710 134711 134712 134713 134714 134715 134716 134717 134718 134719 134720 134721 134722 134723 134724 134725 134726 134727 134728 134729 134730 134731 134732 134733 134734 134735 134736 134737 134738 134739 134740 134741 134742 134743 134744 134745 134746 134747 134748 134749 134750 134751 134752 134753 134754 134755 134756 134757 134758 134759 134760 134761 134762 134763 134764 134765 134766 134767 134768 134769 134770 134771 134772 134773 134774 134775 134776 134777 134778 134779 134780 134781 134782 134783 134784 134785 134786 134787 134788 134789 134790 134791 134792 134793 134794 134795 134796 134797 134798 134799 134800 134801 134802 134803 134804 134805 134806 134807 134808 134809 134810 134811 134812 134813 134814 134815 134816 134817 134818 134819 134820 134821 134822 134823 134824 134825 134826 134827 134828 134829 134830 134831 134832 134833 134834 134835 134836 134837 134838 134839 134840 134841 134842 134843 134844 134845 134846 134847 134848 134849 134850 134851 134852 134853 134854 134855 134856 134857 134858 134859 134860 134861 134862 134863 134864 134865 134866 134867 134868 134869 134870 134871 134872 134873 134874 134875 134876 134877 134878 134879 134880 134881 134882 134883 134884 134885 134886 134887 134888 134889 134890 134891 134892 134893 134894 134895 134896 134897 134898 134899 134900 134901 134902 134903 134904 134905 134906 134907 134908 134909 134910 134911 134912 134913 134914 134915 134916 134917 134918 134919 134920 134921 134922 134923 134924 134925 134926 134927 134928 134929 134930 134931 134932 134933 134934 134935 134936 134937 134938 134939 134940 134941 134942 134943 134944 134945 134946 134947 134948 134949 134950 134951 134952 134953 134954 134955 134956 134957 134958 134959 134960 134961 134962 134963 134964 134965 134966 134967 134968 134969 134970 134971 134972 134973 134974 134975 134976 134977 134978 134979 134980 134981 134982 134983 134984 134985 134986 134987 134988 134989 134990 134991 134992 134993 134994 134995 134996 134997 134998 134999 135000 135001 135002 135003 135004 135005 135006 135007 135008 135009 135010 135011 135012 135013 135014 135015 135016 135017 135018 135019 135020 135021 135022 135023 135024 135025 135026 135027 135028 135029 135030 135031 135032 135033 135034 135035 135036 135037 135038 135039 135040 135041 135042 135043 135044 135045 135046 135047 135048 135049 135050 135051 135052 135053 135054 135055 135056 135057 135058 135059 135060 135061 135062 135063 135064 135065 135066 135067 135068 135069 135070 135071 135072 135073 135074 135075 135076 135077 135078 135079 135080 135081 135082 135083 135084 135085 135086 135087 135088 135089 135090 135091 135092 135093 135094 135095 135096 135097 135098 135099 135100 135101 135102 135103 135104 135105 135106 135107 135108 135109 135110 135111 135112 135113 135114 135115 135116 135117 135118 135119 135120 135121 135122 135123 135124 135125 135126 135127 135128 135129 135130 135131 135132 135133 135134 135135 135136 135137 135138 135139 135140 135141 135142 135143 135144 135145 135146 135147 135148 135149 135150 135151 135152 135153 135154 135155 135156 135157 135158 135159 135160 135161 135162 135163 135164 135165 135166 135167 135168 135169 135170 135171 135172 135173 135174 135175 135176 135177 135178 135179 135180 135181 135182 135183 135184 135185 135186 135187 135188 135189 135190 135191 135192 135193 135194 135195 135196 135197 135198 135199 135200 135201 135202 135203 135204 135205 135206 135207 135208 135209 135210 135211 135212 135213 135214 135215 135216 135217 135218 135219 135220 135221 135222 135223 135224 135225 135226 135227 135228 135229 135230 135231 135232 135233 135234 135235 135236 135237 135238 135239 135240 135241 135242 135243 135244 135245 135246 135247 135248 135249 135250 135251 135252 135253 135254 135255 135256 135257 135258 135259 135260 135261 135262 135263 135264 135265 135266 135267 135268 135269 135270 135271 135272 135273 135274 135275 135276 135277 135278 135279 135280 135281 135282 135283 135284 135285 135286 135287 135288 135289 135290 135291 135292 135293 135294 135295 135296 135297 135298 135299 135300 135301 135302 135303 135304 135305 135306 135307 135308 135309 135310 135311 135312 135313 135314 135315 135316 135317 135318 135319 135320 135321 135322 135323 135324 135325 135326 135327 135328 135329 135330 135331 135332 135333 135334 135335 135336 135337 135338 135339 135340 135341 135342 135343 135344 135345 135346 135347 135348 135349 135350 135351 135352 135353 135354 135355 135356 135357 135358 135359 135360 135361 135362 135363 135364 135365 135366 135367 135368 135369 135370 135371 135372 135373 135374 135375 135376 135377 135378 135379 135380 135381 135382 135383 135384 135385 135386 135387 135388 135389 135390 135391 135392 135393 135394 135395 135396 135397 135398 135399 135400 135401 135402 135403 135404 135405 135406 135407 135408 135409 135410 135411 135412 135413 135414 135415 135416 135417 135418 135419 135420 135421 135422 135423 135424 135425 135426 135427 135428 135429 135430 135431 135432 135433 135434 135435 135436 135437 135438 135439 135440 135441 135442 135443 135444 135445 135446 135447 135448 135449 135450 135451 135452 135453 135454 135455 135456 135457 135458 135459 135460 135461 135462 135463 135464 135465 135466 135467 135468 135469 135470 135471 135472 135473 135474 135475 135476 135477 135478 135479 135480 135481 135482 135483 135484 135485 135486 135487 135488 135489 135490 135491 135492 135493 135494 135495 135496 135497 135498 135499 135500 135501 135502 135503 135504 135505 135506 135507 135508 135509 135510 135511 135512 135513 135514 135515 135516 135517 135518 135519 135520 135521 135522 135523 135524 135525 135526 135527 135528 135529 135530 135531 135532 135533 135534 135535 135536 135537 135538 135539 135540 135541 135542 135543 135544 135545 135546 135547 135548 135549 135550 135551 135552 135553 135554 135555 135556 135557 135558 135559 135560 135561 135562 135563 135564 135565 135566 135567 135568 135569 135570 135571 135572 135573 135574 135575 135576 135577 135578 135579 135580 135581 135582 135583 135584 135585 135586 135587 135588 135589 135590 135591 135592 135593 135594 135595 135596 135597 135598 135599 135600 135601 135602 135603 135604 135605 135606 135607 135608 135609 135610 135611 135612 135613 135614 135615 135616 135617 135618 135619 135620 135621 135622 135623 135624 135625 135626 135627 135628 135629 135630 135631 135632 135633 135634 135635 135636 135637 135638 135639 135640 135641 135642 135643 135644 135645 135646 135647 135648 135649 135650 135651 135652 135653 135654 135655 135656 135657 135658 135659 135660 135661 135662 135663 135664 135665 135666 135667 135668 135669 135670 135671 135672 135673 135674 135675 135676 135677 135678 135679 135680 135681 135682 135683 135684 135685 135686 135687 135688 135689 135690 135691 135692 135693 135694 135695 135696 135697 135698 135699 135700 135701 135702 135703 135704 135705 135706 135707 135708 135709 135710 135711 135712 135713 135714 135715 135716 135717 135718 135719 135720 135721 135722 135723 135724 135725 135726 135727 135728 135729 135730 135731 135732 135733 135734 135735 135736 135737 135738 135739 135740 135741 135742 135743 135744 135745 135746 135747 135748 135749 135750 135751 135752 135753 135754 135755 135756 135757 135758 135759 135760 135761 135762 135763 135764 135765 135766 135767 135768 135769 135770 135771 135772 135773 135774 135775 135776 135777 135778 135779 135780 135781 135782 135783 135784 135785 135786 135787 135788 135789 135790 135791 135792 135793 135794 135795 135796 135797 135798 135799 135800 135801 135802 135803 135804 135805 135806 135807 135808 135809 135810 135811 135812 135813 135814 135815 135816 135817 135818 135819 135820 135821 135822 135823 135824 135825 135826 135827 135828 135829 135830 135831 135832 135833 135834 135835 135836 135837 135838 135839 135840 135841 135842 135843 135844 135845 135846 135847 135848 135849 135850 135851 135852 135853 135854 135855 135856 135857 135858 135859 135860 135861 135862 135863 135864 135865 135866 135867 135868 135869 135870 135871 135872 135873 135874 135875 135876 135877 135878 135879 135880 135881 135882 135883 135884 135885 135886 135887 135888 135889 135890 135891 135892 135893 135894 135895 135896 135897 135898 135899 135900 135901 135902 135903 135904 135905 135906 135907 135908 135909 135910 135911 135912 135913 135914 135915 135916 135917 135918 135919 135920 135921 135922 135923 135924 135925 135926 135927 135928 135929 135930 135931 135932 135933 135934 135935 135936 135937 135938 135939 135940 135941 135942 135943 135944 135945 135946 135947 135948 135949 135950 135951 135952 135953 135954 135955 135956 135957 135958 135959 135960 135961 135962 135963 135964 135965 135966 135967 135968 135969 135970 135971 135972 135973 135974 135975 135976 135977 135978 135979 135980 135981 135982 135983 135984 135985 135986 135987 135988 135989 135990 135991 135992 135993 135994 135995 135996 135997 135998 135999 136000 136001 136002 136003 136004 136005 136006 136007 136008 136009 136010 136011 136012 136013 136014 136015 136016 136017 136018 136019 136020 136021 136022 136023 136024 136025 136026 136027 136028 136029 136030 136031 136032 136033 136034 136035 136036 136037 136038 136039 136040 136041 136042 136043 136044 136045 136046 136047 136048 136049 136050 136051 136052 136053 136054 136055 136056 136057 136058 136059 136060 136061 136062 136063 136064 136065 136066 136067 136068 136069 136070 136071 136072 136073 136074 136075 136076 136077 136078 136079 136080 136081 136082 136083 136084 136085 136086 136087 136088 136089 136090 136091 136092 136093 136094 136095 136096 136097 136098 136099 136100 136101 136102 136103 136104 136105 136106 136107 136108 136109 136110 136111 136112 136113 136114 136115 136116 136117 136118 136119 136120 136121 136122 136123 136124 136125 136126 136127 136128 136129 136130 136131 136132 136133 136134 136135 136136 136137 136138 136139 136140 136141 136142 136143 136144 136145 136146 136147 136148 136149 136150 136151 136152 136153 136154 136155 136156 136157 136158 136159 136160 136161 136162 136163 136164 136165 136166 136167 136168 136169 136170 136171 136172 136173 136174 136175 136176 136177 136178 136179 136180 136181 136182 136183 136184 136185 136186 136187 136188 136189 136190 136191 136192 136193 136194 136195 136196 136197 136198 136199 136200 136201 136202 136203 136204 136205 136206 136207 136208 136209 136210 136211 136212 136213 136214 136215 136216 136217 136218 136219 136220 136221 136222 136223 136224 136225 136226 136227 136228 136229 136230 136231 136232 136233 136234 136235 136236 136237 136238 136239 136240 136241 136242 136243 136244 136245 136246 136247 136248 136249 136250 136251 136252 136253 136254 136255 136256 136257 136258 136259 136260 136261 136262 136263 136264 136265 136266 136267 136268 136269 136270 136271 136272 136273 136274 136275 136276 136277 136278 136279 136280 136281 136282 136283 136284 136285 136286 136287 136288 136289 136290 136291 136292 136293 136294 136295 136296 136297 136298 136299 136300 136301 136302 136303 136304 136305 136306 136307 136308 136309 136310 136311 136312 136313 136314 136315 136316 136317 136318 136319 136320 136321 136322 136323 136324 136325 136326 136327 136328 136329 136330 136331 136332 136333 136334 136335 136336 136337 136338 136339 136340 136341 136342 136343 136344 136345 136346 136347 136348 136349 136350 136351 136352 136353 136354 136355 136356 136357 136358 136359 136360 136361 136362 136363 136364 136365 136366 136367 136368 136369 136370 136371 136372 136373 136374 136375 136376 136377 136378 136379 136380 136381 136382 136383 136384 136385 136386 136387 136388 136389 136390 136391 136392 136393 136394 136395 136396 136397 136398 136399 136400 136401 136402 136403 136404 136405 136406 136407 136408 136409 136410 136411 136412 136413 136414 136415 136416 136417 136418 136419 136420 136421 136422 136423 136424 136425 136426 136427 136428 136429 136430 136431 136432 136433 136434 136435 136436 136437 136438 136439 136440 136441 136442 136443 136444 136445 136446 136447 136448 136449 136450 136451 136452 136453 136454 136455 136456 136457 136458 136459 136460 136461 136462 136463 136464 136465 136466 136467 136468 136469 136470 136471 136472 136473 136474 136475 136476 136477 136478 136479 136480 136481 136482 136483 136484 136485 136486 136487 136488 136489 136490 136491 136492 136493 136494 136495 136496 136497 136498 136499 136500 136501 136502 136503 136504 136505 136506 136507 136508 136509 136510 136511 136512 136513 136514 136515 136516 136517 136518 136519 136520 136521 136522 136523 136524 136525 136526 136527 136528 136529 136530 136531 136532 136533 136534 136535 136536 136537 136538 136539 136540 136541 136542 136543 136544 136545 136546 136547 136548 136549 136550 136551 136552 136553 136554 136555 136556 136557 136558 136559 136560 136561 136562 136563 136564 136565 136566 136567 136568 136569 136570 136571 136572 136573 136574 136575 136576 136577 136578 136579 136580 136581 136582 136583 136584 136585 136586 136587 136588 136589 136590 136591 136592 136593 136594 136595 136596 136597 136598 136599 136600 136601 136602 136603 136604 136605 136606 136607 136608 136609 136610 136611 136612 136613 136614 136615 136616 136617 136618 136619 136620 136621 136622 136623 136624 136625 136626 136627 136628 136629 136630 136631 136632 136633 136634 136635 136636 136637 136638 136639 136640 136641 136642 136643 136644 136645 136646 136647 136648 136649 136650 136651 136652 136653 136654 136655 136656 136657 136658 136659 136660 136661 136662 136663 136664 136665 136666 136667 136668 136669 136670 136671 136672 136673 136674 136675 136676 136677 136678 136679 136680 136681 136682 136683 136684 136685 136686 136687 136688 136689 136690 136691 136692 136693 136694 136695 136696 136697 136698 136699 136700 136701 136702 136703 136704 136705 136706 136707 136708 136709 136710 136711 136712 136713 136714 136715 136716 136717 136718 136719 136720 136721 136722 136723 136724 136725 136726 136727 136728 136729 136730 136731 136732 136733 136734 136735 136736 136737 136738 136739 136740 136741 136742 136743 136744 136745 136746 136747 136748 136749 136750 136751 136752 136753 136754 136755 136756 136757 136758 136759 136760 136761 136762 136763 136764 136765 136766 136767 136768 136769 136770 136771 136772 136773 136774 136775 136776 136777 136778 136779 136780 136781 136782 136783 136784 136785 136786 136787 136788 136789 136790 136791 136792 136793 136794 136795 136796 136797 136798 136799 136800 136801 136802 136803 136804 136805 136806 136807 136808 136809 136810 136811 136812 136813 136814 136815 136816 136817 136818 136819 136820 136821 136822 136823 136824 136825 136826 136827 136828 136829 136830 136831 136832 136833 136834 136835 136836 136837 136838 136839 136840 136841 136842 136843 136844 136845 136846 136847 136848 136849 136850 136851 136852 136853 136854 136855 136856 136857 136858 136859 136860 136861 136862 136863 136864 136865 136866 136867 136868 136869 136870 136871 136872 136873 136874 136875 136876 136877 136878 136879 136880 136881 136882 136883 136884 136885 136886 136887 136888 136889 136890 136891 136892 136893 136894 136895 136896 136897 136898 136899 136900 136901 136902 136903 136904 136905 136906 136907 136908 136909 136910 136911 136912 136913 136914 136915 136916 136917 136918 136919 136920 136921 136922 136923 136924 136925 136926 136927 136928 136929 136930 136931 136932 136933 136934 136935 136936 136937 136938 136939 136940 136941 136942 136943 136944 136945 136946 136947 136948 136949 136950 136951 136952 136953 136954 136955 136956 136957 136958 136959 136960 136961 136962 136963 136964 136965 136966 136967 136968 136969 136970 136971 136972 136973 136974 136975 136976 136977 136978 136979 136980 136981 136982 136983 136984 136985 136986 136987 136988 136989 136990 136991 136992 136993 136994 136995 136996 136997 136998 136999 137000 137001 137002 137003 137004 137005 137006 137007 137008 137009 137010 137011 137012 137013 137014 137015 137016 137017 137018 137019 137020 137021 137022 137023 137024 137025 137026 137027 137028 137029 137030 137031 137032 137033 137034 137035 137036 137037 137038 137039 137040 137041 137042 137043 137044 137045 137046 137047 137048 137049 137050 137051 137052 137053 137054 137055 137056 137057 137058 137059 137060 137061 137062 137063 137064 137065 137066 137067 137068 137069 137070 137071 137072 137073 137074 137075 137076 137077 137078 137079 137080 137081 137082 137083 137084 137085 137086 137087 137088 137089 137090 137091 137092 137093 137094 137095 137096 137097 137098 137099 137100 137101 137102 137103 137104 137105 137106 137107 137108 137109 137110 137111 137112 137113 137114 137115 137116 137117 137118 137119 137120 137121 137122 137123 137124 137125 137126 137127 137128 137129 137130 137131 137132 137133 137134 137135 137136 137137 137138 137139 137140 137141 137142 137143 137144 137145 137146 137147 137148 137149 137150 137151 137152 137153 137154 137155 137156 137157 137158 137159 137160 137161 137162 137163 137164 137165 137166 137167 137168 137169 137170 137171 137172 137173 137174 137175 137176 137177 137178 137179 137180 137181 137182 137183 137184 137185 137186 137187 137188 137189 137190 137191 137192 137193 137194 137195 137196 137197 137198 137199 137200 137201 137202 137203 137204 137205 137206 137207 137208 137209 137210 137211 137212 137213 137214 137215 137216 137217 137218 137219 137220 137221 137222 137223 137224 137225 137226 137227 137228 137229 137230 137231 137232 137233 137234 137235 137236 137237 137238 137239 137240 137241 137242 137243 137244 137245 137246 137247 137248 137249 137250 137251 137252 137253 137254 137255 137256 137257 137258 137259 137260 137261 137262 137263 137264 137265 137266 137267 137268 137269 137270 137271 137272 137273 137274 137275 137276 137277 137278 137279 137280 137281 137282 137283 137284 137285 137286 137287 137288 137289 137290 137291 137292 137293 137294 137295 137296 137297 137298 137299 137300 137301 137302 137303 137304 137305 137306 137307 137308 137309 137310 137311 137312 137313 137314 137315 137316 137317 137318 137319 137320 137321 137322 137323 137324 137325 137326 137327 137328 137329 137330 137331 137332 137333 137334 137335 137336 137337 137338 137339 137340 137341 137342 137343 137344 137345 137346 137347 137348 137349 137350 137351 137352 137353 137354 137355 137356 137357 137358 137359 137360 137361 137362 137363 137364 137365 137366 137367 137368 137369 137370 137371 137372 137373 137374 137375 137376 137377 137378 137379 137380 137381 137382 137383 137384 137385 137386 137387 137388 137389 137390 137391 137392 137393 137394 137395 137396 137397 137398 137399 137400 137401 137402 137403 137404 137405 137406 137407 137408 137409 137410 137411 137412 137413 137414 137415 137416 137417 137418 137419 137420 137421 137422 137423 137424 137425 137426 137427 137428 137429 137430 137431 137432 137433 137434 137435 137436 137437 137438 137439 137440 137441 137442 137443 137444 137445 137446 137447 137448 137449 137450 137451 137452 137453 137454 137455 137456 137457 137458 137459 137460 137461 137462 137463 137464 137465 137466 137467 137468 137469 137470 137471 137472 137473 137474 137475 137476 137477 137478 137479 137480 137481 137482 137483 137484 137485 137486 137487 137488 137489 137490 137491 137492 137493 137494 137495 137496 137497 137498 137499 137500 137501 137502 137503 137504 137505 137506 137507 137508 137509 137510 137511 137512 137513 137514 137515 137516 137517 137518 137519 137520 137521 137522 137523 137524 137525 137526 137527 137528 137529 137530 137531 137532 137533 137534 137535 137536 137537 137538 137539 137540 137541 137542 137543 137544 137545 137546 137547 137548 137549 137550 137551 137552 137553 137554 137555 137556 137557 137558 137559 137560 137561 137562 137563 137564 137565 137566 137567 137568 137569 137570 137571 137572 137573 137574 137575 137576 137577 137578 137579 137580 137581 137582 137583 137584 137585 137586 137587 137588 137589 137590 137591 137592 137593 137594 137595 137596 137597 137598 137599 137600 137601 137602 137603 137604 137605 137606 137607 137608 137609 137610 137611 137612 137613 137614 137615 137616 137617 137618 137619 137620 137621 137622 137623 137624 137625 137626 137627 137628 137629 137630 137631 137632 137633 137634 137635 137636 137637 137638 137639 137640 137641 137642 137643 137644 137645 137646 137647 137648 137649 137650 137651 137652 137653 137654 137655 137656 137657 137658 137659 137660 137661 137662 137663 137664 137665 137666 137667 137668 137669 137670 137671 137672 137673 137674 137675 137676 137677 137678 137679 137680 137681 137682 137683 137684 137685 137686 137687 137688 137689 137690 137691 137692 137693 137694 137695 137696 137697 137698 137699 137700 137701 137702 137703 137704 137705 137706 137707 137708 137709 137710 137711 137712 137713 137714 137715 137716 137717 137718 137719 137720 137721 137722 137723 137724 137725 137726 137727 137728 137729 137730 137731 137732 137733 137734 137735 137736 137737 137738 137739 137740 137741 137742 137743 137744 137745 137746 137747 137748 137749 137750 137751 137752 137753 137754 137755 137756 137757 137758 137759 137760 137761 137762 137763 137764 137765 137766 137767 137768 137769 137770 137771 137772 137773 137774 137775 137776 137777 137778 137779 137780 137781 137782 137783 137784 137785 137786 137787 137788 137789 137790 137791 137792 137793 137794 137795 137796 137797 137798 137799 137800 137801 137802 137803 137804 137805 137806 137807 137808 137809 137810 137811 137812 137813 137814 137815 137816 137817 137818 137819 137820 137821 137822 137823 137824 137825 137826 137827 137828 137829 137830 137831 137832 137833 137834 137835 137836 137837 137838 137839 137840 137841 137842 137843 137844 137845 137846 137847 137848 137849 137850 137851 137852 137853 137854 137855 137856 137857 137858 137859 137860 137861 137862 137863 137864 137865 137866 137867 137868 137869 137870 137871 137872 137873 137874 137875 137876 137877 137878 137879 137880 137881 137882 137883 137884 137885 137886 137887 137888 137889 137890 137891 137892 137893 137894 137895 137896 137897 137898 137899 137900 137901 137902 137903 137904 137905 137906 137907 137908 137909 137910 137911 137912 137913 137914 137915 137916 137917 137918 137919 137920 137921 137922 137923 137924 137925 137926 137927 137928 137929 137930 137931 137932 137933 137934 137935 137936 137937 137938 137939 137940 137941 137942 137943 137944 137945 137946 137947 137948 137949 137950 137951 137952 137953 137954 137955 137956 137957 137958 137959 137960 137961 137962 137963 137964 137965 137966 137967 137968 137969 137970 137971 137972 137973 137974 137975 137976 137977 137978 137979 137980 137981 137982 137983 137984 137985 137986 137987 137988 137989 137990 137991 137992 137993 137994 137995 137996 137997 137998 137999 138000 138001 138002 138003 138004 138005 138006 138007 138008 138009 138010 138011 138012 138013 138014 138015 138016 138017 138018 138019 138020 138021 138022 138023 138024 138025 138026 138027 138028 138029 138030 138031 138032 138033 138034 138035 138036 138037 138038 138039 138040 138041 138042 138043 138044 138045 138046 138047 138048 138049 138050 138051 138052 138053 138054 138055 138056 138057 138058 138059 138060 138061 138062 138063 138064 138065 138066 138067 138068 138069 138070 138071 138072 138073 138074 138075 138076 138077 138078 138079 138080 138081 138082 138083 138084 138085 138086 138087 138088 138089 138090 138091 138092 138093 138094 138095 138096 138097 138098 138099 138100 138101 138102 138103 138104 138105 138106 138107 138108 138109 138110 138111 138112 138113 138114 138115 138116 138117 138118 138119 138120 138121 138122 138123 138124 138125 138126 138127 138128 138129 138130 138131 138132 138133 138134 138135 138136 138137 138138 138139 138140 138141 138142 138143 138144 138145 138146 138147 138148 138149 138150 138151 138152 138153 138154 138155 138156 138157 138158 138159 138160 138161 138162 138163 138164 138165 138166 138167 138168 138169 138170 138171 138172 138173 138174 138175 138176 138177 138178 138179 138180 138181 138182 138183 138184 138185 138186 138187 138188 138189 138190 138191 138192 138193 138194 138195 138196 138197 138198 138199 138200 138201 138202 138203 138204 138205 138206 138207 138208 138209 138210 138211 138212 138213 138214 138215 138216 138217 138218 138219 138220 138221 138222 138223 138224 138225 138226 138227 138228 138229 138230 138231 138232 138233 138234 138235 138236 138237 138238 138239 138240 138241 138242 138243 138244 138245 138246 138247 138248 138249 138250 138251 138252 138253 138254 138255 138256 138257 138258 138259 138260 138261 138262 138263 138264 138265 138266 138267 138268 138269 138270 138271 138272 138273 138274 138275 138276 138277 138278 138279 138280 138281 138282 138283 138284 138285 138286 138287 138288 138289 138290 138291 138292 138293 138294 138295 138296 138297 138298 138299 138300 138301 138302 138303 138304 138305 138306 138307 138308 138309 138310 138311 138312 138313 138314 138315 138316 138317 138318 138319 138320 138321 138322 138323 138324 138325 138326 138327 138328 138329 138330 138331 138332 138333 138334 138335 138336 138337 138338 138339 138340 138341 138342 138343 138344 138345 138346 138347 138348 138349 138350 138351 138352 138353 138354 138355 138356 138357 138358 138359 138360 138361 138362 138363 138364 138365 138366 138367 138368 138369 138370 138371 138372 138373 138374 138375 138376 138377 138378 138379 138380 138381 138382 138383 138384 138385 138386 138387 138388 138389 138390 138391 138392 138393 138394 138395 138396 138397 138398 138399 138400 138401 138402 138403 138404 138405 138406 138407 138408 138409 138410 138411 138412 138413 138414 138415 138416 138417 138418 138419 138420 138421 138422 138423 138424 138425 138426 138427 138428 138429 138430 138431 138432 138433 138434 138435 138436 138437 138438 138439 138440 138441 138442 138443 138444 138445 138446 138447 138448 138449 138450 138451 138452 138453 138454 138455 138456 138457 138458 138459 138460 138461 138462 138463 138464 138465 138466 138467 138468 138469 138470 138471 138472 138473 138474 138475 138476 138477 138478 138479 138480 138481 138482 138483 138484 138485 138486 138487 138488 138489 138490 138491 138492 138493 138494 138495 138496 138497 138498 138499 138500 138501 138502 138503 138504 138505 138506 138507 138508 138509 138510 138511 138512 138513 138514 138515 138516 138517 138518 138519 138520 138521 138522 138523 138524 138525 138526 138527 138528 138529 138530 138531 138532 138533 138534 138535 138536 138537 138538 138539 138540 138541 138542 138543 138544 138545 138546 138547 138548 138549 138550 138551 138552 138553 138554 138555 138556 138557 138558 138559 138560 138561 138562 138563 138564 138565 138566 138567 138568 138569 138570 138571 138572 138573 138574 138575 138576 138577 138578 138579 138580 138581 138582 138583 138584 138585 138586 138587 138588 138589 138590 138591 138592 138593 138594 138595 138596 138597 138598 138599 138600 138601 138602 138603 138604 138605 138606 138607 138608 138609 138610 138611 138612 138613 138614 138615 138616 138617 138618 138619 138620 138621 138622 138623 138624 138625 138626 138627 138628 138629 138630 138631 138632 138633 138634 138635 138636 138637 138638 138639 138640 138641 138642 138643 138644 138645 138646 138647 138648 138649 138650 138651 138652 138653 138654 138655 138656 138657 138658 138659 138660 138661 138662 138663 138664 138665 138666 138667 138668 138669 138670 138671 138672 138673 138674 138675 138676 138677 138678 138679 138680 138681 138682 138683 138684 138685 138686 138687 138688 138689 138690 138691 138692 138693 138694 138695 138696 138697 138698 138699 138700 138701 138702 138703 138704 138705 138706 138707 138708 138709 138710 138711 138712 138713 138714 138715 138716 138717 138718 138719 138720 138721 138722 138723 138724 138725 138726 138727 138728 138729 138730 138731 138732 138733 138734 138735 138736 138737 138738 138739 138740 138741 138742 138743 138744 138745 138746 138747 138748 138749 138750 138751 138752 138753 138754 138755 138756 138757 138758 138759 138760 138761 138762 138763 138764 138765 138766 138767 138768 138769 138770 138771 138772 138773 138774 138775 138776 138777 138778 138779 138780 138781 138782 138783 138784 138785 138786 138787 138788 138789 138790 138791 138792 138793 138794 138795 138796 138797 138798 138799 138800 138801 138802 138803 138804 138805 138806 138807 138808 138809 138810 138811 138812 138813 138814 138815 138816 138817 138818 138819 138820 138821 138822 138823 138824 138825 138826 138827 138828 138829 138830 138831 138832 138833 138834 138835 138836 138837 138838 138839 138840 138841 138842 138843 138844 138845 138846 138847 138848 138849 138850 138851 138852 138853 138854 138855 138856 138857 138858 138859 138860 138861 138862 138863 138864 138865 138866 138867 138868 138869 138870 138871 138872 138873 138874 138875 138876 138877 138878 138879 138880 138881 138882 138883 138884 138885 138886 138887 138888 138889 138890 138891 138892 138893 138894 138895 138896 138897 138898 138899 138900 138901 138902 138903 138904 138905 138906 138907 138908 138909 138910 138911 138912 138913 138914 138915 138916 138917 138918 138919 138920 138921 138922 138923 138924 138925 138926 138927 138928 138929 138930 138931 138932 138933 138934 138935 138936 138937 138938 138939 138940 138941 138942 138943 138944 138945 138946 138947 138948 138949 138950 138951 138952 138953 138954 138955 138956 138957 138958 138959 138960 138961 138962 138963 138964 138965 138966 138967 138968 138969 138970 138971 138972 138973 138974 138975 138976 138977 138978 138979 138980 138981 138982 138983 138984 138985 138986 138987 138988 138989 138990 138991 138992 138993 138994 138995 138996 138997 138998 138999 139000 139001 139002 139003 139004 139005 139006 139007 139008 139009 139010 139011 139012 139013 139014 139015 139016 139017 139018 139019 139020 139021 139022 139023 139024 139025 139026 139027 139028 139029 139030 139031 139032 139033 139034 139035 139036 139037 139038 139039 139040 139041 139042 139043 139044 139045 139046 139047 139048 139049 139050 139051 139052 139053 139054 139055 139056 139057 139058 139059 139060 139061 139062 139063 139064 139065 139066 139067 139068 139069 139070 139071 139072 139073 139074 139075 139076 139077 139078 139079 139080 139081 139082 139083 139084 139085 139086 139087 139088 139089 139090 139091 139092 139093 139094 139095 139096 139097 139098 139099 139100 139101 139102 139103 139104 139105 139106 139107 139108 139109 139110 139111 139112 139113 139114 139115 139116 139117 139118 139119 139120 139121 139122 139123 139124 139125 139126 139127 139128 139129 139130 139131 139132 139133 139134 139135 139136 139137 139138 139139 139140 139141 139142 139143 139144 139145 139146 139147 139148 139149 139150 139151 139152 139153 139154 139155 139156 139157 139158 139159 139160 139161 139162 139163 139164 139165 139166 139167 139168 139169 139170 139171 139172 139173 139174 139175 139176 139177 139178 139179 139180 139181 139182 139183 139184 139185 139186 139187 139188 139189 139190 139191 139192 139193 139194 139195 139196 139197 139198 139199 139200 139201 139202 139203 139204 139205 139206 139207 139208 139209 139210 139211 139212 139213 139214 139215 139216 139217 139218 139219 139220 139221 139222 139223 139224 139225 139226 139227 139228 139229 139230 139231 139232 139233 139234 139235 139236 139237 139238 139239 139240 139241 139242 139243 139244 139245 139246 139247 139248 139249 139250 139251 139252 139253 139254 139255 139256 139257 139258 139259 139260 139261 139262 139263 139264 139265 139266 139267 139268 139269 139270 139271 139272 139273 139274 139275 139276 139277 139278 139279 139280 139281 139282 139283 139284 139285 139286 139287 139288 139289 139290 139291 139292 139293 139294 139295 139296 139297 139298 139299 139300 139301 139302 139303 139304 139305 139306 139307 139308 139309 139310 139311 139312 139313 139314 139315 139316 139317 139318 139319 139320 139321 139322 139323 139324 139325 139326 139327 139328 139329 139330 139331 139332 139333 139334 139335 139336 139337 139338 139339 139340 139341 139342 139343 139344 139345 139346 139347 139348 139349 139350 139351 139352 139353 139354 139355 139356 139357 139358 139359 139360 139361 139362 139363 139364 139365 139366 139367 139368 139369 139370 139371 139372 139373 139374 139375 139376 139377 139378 139379 139380 139381 139382 139383 139384 139385 139386 139387 139388 139389 139390 139391 139392 139393 139394 139395 139396 139397 139398 139399 139400 139401 139402 139403 139404 139405 139406 139407 139408 139409 139410 139411 139412 139413 139414 139415 139416 139417 139418 139419 139420 139421 139422 139423 139424 139425 139426 139427 139428 139429 139430 139431 139432 139433 139434 139435 139436 139437 139438 139439 139440 139441 139442 139443 139444 139445 139446 139447 139448 139449 139450 139451 139452 139453 139454 139455 139456 139457 139458 139459 139460 139461 139462 139463 139464 139465 139466 139467 139468 139469 139470 139471 139472 139473 139474 139475 139476 139477 139478 139479 139480 139481 139482 139483 139484 139485 139486 139487 139488 139489 139490 139491 139492 139493 139494 139495 139496 139497 139498 139499 139500 139501 139502 139503 139504 139505 139506 139507 139508 139509 139510 139511 139512 139513 139514 139515 139516 139517 139518 139519 139520 139521 139522 139523 139524 139525 139526 139527 139528 139529 139530 139531 139532 139533 139534 139535 139536 139537 139538 139539 139540 139541 139542 139543 139544 139545 139546 139547 139548 139549 139550 139551 139552 139553 139554 139555 139556 139557 139558 139559 139560 139561 139562 139563 139564 139565 139566 139567 139568 139569 139570 139571 139572 139573 139574 139575 139576 139577 139578 139579 139580 139581 139582 139583 139584 139585 139586 139587 139588 139589 139590 139591 139592 139593 139594 139595 139596 139597 139598 139599 139600 139601 139602 139603 139604 139605 139606 139607 139608 139609 139610 139611 139612 139613 139614 139615 139616 139617 139618 139619 139620 139621 139622 139623 139624 139625 139626 139627 139628 139629 139630 139631 139632 139633 139634 139635 139636 139637 139638 139639 139640 139641 139642 139643 139644 139645 139646 139647 139648 139649 139650 139651 139652 139653 139654 139655 139656 139657 139658 139659 139660 139661 139662 139663 139664 139665 139666 139667 139668 139669 139670 139671 139672 139673 139674 139675 139676 139677 139678 139679 139680 139681 139682 139683 139684 139685 139686 139687 139688 139689 139690 139691 139692 139693 139694 139695 139696 139697 139698 139699 139700 139701 139702 139703 139704 139705 139706 139707 139708 139709 139710 139711 139712 139713 139714 139715 139716 139717 139718 139719 139720 139721 139722 139723 139724 139725 139726 139727 139728 139729 139730 139731 139732 139733 139734 139735 139736 139737 139738 139739 139740 139741 139742 139743 139744 139745 139746 139747 139748 139749 139750 139751 139752 139753 139754 139755 139756 139757 139758 139759 139760 139761 139762 139763 139764 139765 139766 139767 139768 139769 139770 139771 139772 139773 139774 139775 139776 139777 139778 139779 139780 139781 139782 139783 139784 139785 139786 139787 139788 139789 139790 139791 139792 139793 139794 139795 139796 139797 139798 139799 139800 139801 139802 139803 139804 139805 139806 139807 139808 139809 139810 139811 139812 139813 139814 139815 139816 139817 139818 139819 139820 139821 139822 139823 139824 139825 139826 139827 139828 139829 139830 139831 139832 139833 139834 139835 139836 139837 139838 139839 139840 139841 139842 139843 139844 139845 139846 139847 139848 139849 139850 139851 139852 139853 139854 139855 139856 139857 139858 139859 139860 139861 139862 139863 139864 139865 139866 139867 139868 139869 139870 139871 139872 139873 139874 139875 139876 139877 139878 139879 139880 139881 139882 139883 139884 139885 139886 139887 139888 139889 139890 139891 139892 139893 139894 139895 139896 139897 139898 139899 139900 139901 139902 139903 139904 139905 139906 139907 139908 139909 139910 139911 139912 139913 139914 139915 139916 139917 139918 139919 139920 139921 139922 139923 139924 139925 139926 139927 139928 139929 139930 139931 139932 139933 139934 139935 139936 139937 139938 139939 139940 139941 139942 139943 139944 139945 139946 139947 139948 139949 139950 139951 139952 139953 139954 139955 139956 139957 139958 139959 139960 139961 139962 139963 139964 139965 139966 139967 139968 139969 139970 139971 139972 139973 139974 139975 139976 139977 139978 139979 139980 139981 139982 139983 139984 139985 139986 139987 139988 139989 139990 139991 139992 139993 139994 139995 139996 139997 139998 139999 140000 140001 140002 140003 140004 140005 140006 140007 140008 140009 140010 140011 140012 140013 140014 140015 140016 140017 140018 140019 140020 140021 140022 140023 140024 140025 140026 140027 140028 140029 140030 140031 140032 140033 140034 140035 140036 140037 140038 140039 140040 140041 140042 140043 140044 140045 140046 140047 140048 140049 140050 140051 140052 140053 140054 140055 140056 140057 140058 140059 140060 140061 140062 140063 140064 140065 140066 140067 140068 140069 140070 140071 140072 140073 140074 140075 140076 140077 140078 140079 140080 140081 140082 140083 140084 140085 140086 140087 140088 140089 140090 140091 140092 140093 140094 140095 140096 140097 140098 140099 140100 140101 140102 140103 140104 140105 140106 140107 140108 140109 140110 140111 140112 140113 140114 140115 140116 140117 140118 140119 140120 140121 140122 140123 140124 140125 140126 140127 140128 140129 140130 140131 140132 140133 140134 140135 140136 140137 140138 140139 140140 140141 140142 140143 140144 140145 140146 140147 140148 140149 140150 140151 140152 140153 140154 140155 140156 140157 140158 140159 140160 140161 140162 140163 140164 140165 140166 140167 140168 140169 140170 140171 140172 140173 140174 140175 140176 140177 140178 140179 140180 140181 140182 140183 140184 140185 140186 140187 140188 140189 140190 140191 140192 140193 140194 140195 140196 140197 140198 140199 140200 140201 140202 140203 140204 140205 140206 140207 140208 140209 140210 140211 140212 140213 140214 140215 140216 140217 140218 140219 140220 140221 140222 140223 140224 140225 140226 140227 140228 140229 140230 140231 140232 140233 140234 140235 140236 140237 140238 140239 140240 140241 140242 140243 140244 140245 140246 140247 140248 140249 140250 140251 140252 140253 140254 140255 140256 140257 140258 140259 140260 140261 140262 140263 140264 140265 140266 140267 140268 140269 140270 140271 140272 140273 140274 140275 140276 140277 140278 140279 140280 140281 140282 140283 140284 140285 140286 140287 140288 140289 140290 140291 140292 140293 140294 140295 140296 140297 140298 140299 140300 140301 140302 140303 140304 140305 140306 140307 140308 140309 140310 140311 140312 140313 140314 140315 140316 140317 140318 140319 140320 140321 140322 140323 140324 140325 140326 140327 140328 140329 140330 140331 140332 140333 140334 140335 140336 140337 140338 140339 140340 140341 140342 140343 140344 140345 140346 140347 140348 140349 140350 140351 140352 140353 140354 140355 140356 140357 140358 140359 140360 140361 140362 140363 140364 140365 140366 140367 140368 140369 140370 140371 140372 140373 140374 140375 140376 140377 140378 140379 140380 140381 140382 140383 140384 140385 140386 140387 140388 140389 140390 140391 140392 140393 140394 140395 140396 140397 140398 140399 140400 140401 140402 140403 140404 140405 140406 140407 140408 140409 140410 140411 140412 140413 140414 140415 140416 140417 140418 140419 140420 140421 140422 140423 140424 140425 140426 140427 140428 140429 140430 140431 140432 140433 140434 140435 140436 140437 140438 140439 140440 140441 140442 140443 140444 140445 140446 140447 140448 140449 140450 140451 140452 140453 140454 140455 140456 140457 140458 140459 140460 140461 140462 140463 140464 140465 140466 140467 140468 140469 140470 140471 140472 140473 140474 140475 140476 140477 140478 140479 140480 140481 140482 140483 140484 140485 140486 140487 140488 140489 140490 140491 140492 140493 140494 140495 140496 140497 140498 140499 140500 140501 140502 140503 140504 140505 140506 140507 140508 140509 140510 140511 140512 140513 140514 140515 140516 140517 140518 140519 140520 140521 140522 140523 140524 140525 140526 140527 140528 140529 140530 140531 140532 140533 140534 140535 140536 140537 140538 140539 140540 140541 140542 140543 140544 140545 140546 140547 140548 140549 140550 140551 140552 140553 140554 140555 140556 140557 140558 140559 140560 140561 140562 140563 140564 140565 140566 140567 140568 140569 140570 140571 140572 140573 140574 140575 140576 140577 140578 140579 140580 140581 140582 140583 140584 140585 140586 140587 140588 140589 140590 140591 140592 140593 140594 140595 140596 140597 140598 140599 140600 140601 140602 140603 140604 140605 140606 140607 140608 140609 140610 140611 140612 140613 140614 140615 140616 140617 140618 140619 140620 140621 140622 140623 140624 140625 140626 140627 140628 140629 140630 140631 140632 140633 140634 140635 140636 140637 140638 140639 140640 140641 140642 140643 140644 140645 140646 140647 140648 140649 140650 140651 140652 140653 140654 140655 140656 140657 140658 140659 140660 140661 140662 140663 140664 140665 140666 140667 140668 140669 140670 140671 140672 140673 140674 140675 140676 140677 140678 140679 140680 140681 140682 140683 140684 140685 140686 140687 140688 140689 140690 140691 140692 140693 140694 140695 140696 140697 140698 140699 140700 140701 140702 140703 140704 140705 140706 140707 140708 140709 140710 140711 140712 140713 140714 140715 140716 140717 140718 140719 140720 140721 140722 140723 140724 140725 140726 140727 140728 140729 140730 140731 140732 140733 140734 140735 140736 140737 140738 140739 140740 140741 140742 140743 140744 140745 140746 140747 140748 140749 140750 140751 140752 140753 140754 140755 140756 140757 140758 140759 140760 140761 140762 140763 140764 140765 140766 140767 140768 140769 140770 140771 140772 140773 140774 140775 140776 140777 140778 140779 140780 140781 140782 140783 140784 140785 140786 140787 140788 140789 140790 140791 140792 140793 140794 140795 140796 140797 140798 140799 140800 140801 140802 140803 140804 140805 140806 140807 140808 140809 140810 140811 140812 140813 140814 140815 140816 140817 140818 140819 140820 140821 140822 140823 140824 140825 140826 140827 140828 140829 140830 140831 140832 140833 140834 140835 140836 140837 140838 140839 140840 140841 140842 140843 140844 140845 140846 140847 140848 140849 140850 140851 140852 140853 140854 140855 140856 140857 140858 140859 140860 140861 140862 140863 140864 140865 140866 140867 140868 140869 140870 140871 140872 140873 140874 140875 140876 140877 140878 140879 140880 140881 140882 140883 140884 140885 140886 140887 140888 140889 140890 140891 140892 140893 140894 140895 140896 140897 140898 140899 140900 140901 140902 140903 140904 140905 140906 140907 140908 140909 140910 140911 140912 140913 140914 140915 140916 140917 140918 140919 140920 140921 140922 140923 140924 140925 140926 140927 140928 140929 140930 140931 140932 140933 140934 140935 140936 140937 140938 140939 140940 140941 140942 140943 140944 140945 140946 140947 140948 140949 140950 140951 140952 140953 140954 140955 140956 140957 140958 140959 140960 140961 140962 140963 140964 140965 140966 140967 140968 140969 140970 140971 140972 140973 140974 140975 140976 140977 140978 140979 140980 140981 140982 140983 140984 140985 140986 140987 140988 140989 140990 140991 140992 140993 140994 140995 140996 140997 140998 140999 141000 141001 141002 141003 141004 141005 141006 141007 141008 141009 141010 141011 141012 141013 141014 141015 141016 141017 141018 141019 141020 141021 141022 141023 141024 141025 141026 141027 141028 141029 141030 141031 141032 141033 141034 141035 141036 141037 141038 141039 141040 141041 141042 141043 141044 141045 141046 141047 141048 141049 141050 141051 141052 141053 141054 141055 141056 141057 141058 141059 141060 141061 141062 141063 141064 141065 141066 141067 141068 141069 141070 141071 141072 141073 141074 141075 141076 141077 141078 141079 141080 141081 141082 141083 141084 141085 141086 141087 141088 141089 141090 141091 141092 141093 141094 141095 141096 141097 141098 141099 141100 141101 141102 141103 141104 141105 141106 141107 141108 141109 141110 141111 141112 141113 141114 141115 141116 141117 141118 141119 141120 141121 141122 141123 141124 141125 141126 141127 141128 141129 141130 141131 141132 141133 141134 141135 141136 141137 141138 141139 141140 141141 141142 141143 141144 141145 141146 141147 141148 141149 141150 141151 141152 141153 141154 141155 141156 141157 141158 141159 141160 141161 141162 141163 141164 141165 141166 141167 141168 141169 141170 141171 141172 141173 141174 141175 141176 141177 141178 141179 141180 141181 141182 141183 141184 141185 141186 141187 141188 141189 141190 141191 141192 141193 141194 141195 141196 141197 141198 141199 141200 141201 141202 141203 141204 141205 141206 141207 141208 141209 141210 141211 141212 141213 141214 141215 141216 141217 141218 141219 141220 141221 141222 141223 141224 141225 141226 141227 141228 141229 141230 141231 141232 141233 141234 141235 141236 141237 141238 141239 141240 141241 141242 141243 141244 141245 141246 141247 141248 141249 141250 141251 141252 141253 141254 141255 141256 141257 141258 141259 141260 141261 141262 141263 141264 141265 141266 141267 141268 141269 141270 141271 141272 141273 141274 141275 141276 141277 141278 141279 141280 141281 141282 141283 141284 141285 141286 141287 141288 141289 141290 141291 141292 141293 141294 141295 141296 141297 141298 141299 141300 141301 141302 141303 141304 141305 141306 141307 141308 141309 141310 141311 141312 141313 141314 141315 141316 141317 141318 141319 141320 141321 141322 141323 141324 141325 141326 141327 141328 141329 141330 141331 141332 141333 141334 141335 141336 141337 141338 141339 141340 141341 141342 141343 141344 141345 141346 141347 141348 141349 141350 141351 141352 141353 141354 141355 141356 141357 141358 141359 141360 141361 141362 141363 141364 141365 141366 141367 141368 141369 141370 141371 141372 141373 141374 141375 141376 141377 141378 141379 141380 141381 141382 141383 141384 141385 141386 141387 141388 141389 141390 141391 141392 141393 141394 141395 141396 141397 141398 141399 141400 141401 141402 141403 141404 141405 141406 141407 141408 141409 141410 141411 141412 141413 141414 141415 141416 141417 141418 141419 141420 141421 141422 141423 141424 141425 141426 141427 141428 141429 141430 141431 141432 141433 141434 141435 141436 141437 141438 141439 141440 141441 141442 141443 141444 141445 141446 141447 141448 141449 141450 141451 141452 141453 141454 141455 141456 141457 141458 141459 141460 141461 141462 141463 141464 141465 141466 141467 141468 141469 141470 141471 141472 141473 141474 141475 141476 141477 141478 141479 141480 141481 141482 141483 141484 141485 141486 141487 141488 141489 141490 141491 141492 141493 141494 141495 141496 141497 141498 141499 141500 141501 141502 141503 141504 141505 141506 141507 141508 141509 141510 141511 141512 141513 141514 141515 141516 141517 141518 141519 141520 141521 141522 141523 141524 141525 141526 141527 141528 141529 141530 141531 141532 141533 141534 141535 141536 141537 141538 141539 141540 141541 141542 141543 141544 141545 141546 141547 141548 141549 141550 141551 141552 141553 141554 141555 141556 141557 141558 141559 141560 141561 141562 141563 141564 141565 141566 141567 141568 141569 141570 141571 141572 141573 141574 141575 141576 141577 141578 141579 141580 141581 141582 141583 141584 141585 141586 141587 141588 141589 141590 141591 141592 141593 141594 141595 141596 141597 141598 141599 141600 141601 141602 141603 141604 141605 141606 141607 141608 141609 141610 141611 141612 141613 141614 141615 141616 141617 141618 141619 141620 141621 141622 141623 141624 141625 141626 141627 141628 141629 141630 141631 141632 141633 141634 141635 141636 141637 141638 141639 141640 141641 141642 141643 141644 141645 141646 141647 141648 141649 141650 141651 141652 141653 141654 141655 141656 141657 141658 141659 141660 141661 141662 141663 141664 141665 141666 141667 141668 141669 141670 141671 141672 141673 141674 141675 141676 141677 141678 141679 141680 141681 141682 141683 141684 141685 141686 141687 141688 141689 141690 141691 141692 141693 141694 141695 141696 141697 141698 141699 141700 141701 141702 141703 141704 141705 141706 141707 141708 141709 141710 141711 141712 141713 141714 141715 141716 141717 141718 141719 141720 141721 141722 141723 141724 141725 141726 141727 141728 141729 141730 141731 141732 141733 141734 141735 141736 141737 141738 141739 141740 141741 141742 141743 141744 141745 141746 141747 141748 141749 141750 141751 141752 141753 141754 141755 141756 141757 141758 141759 141760 141761 141762 141763 141764 141765 141766 141767 141768 141769 141770 141771 141772 141773 141774 141775 141776 141777 141778 141779 141780 141781 141782 141783 141784 141785 141786 141787 141788 141789 141790 141791 141792 141793 141794 141795 141796 141797 141798 141799 141800 141801 141802 141803 141804 141805 141806 141807 141808 141809 141810 141811 141812 141813 141814 141815 141816 141817 141818 141819 141820 141821 141822 141823 141824 141825 141826 141827 141828 141829 141830 141831 141832 141833 141834 141835 141836 141837 141838 141839 141840 141841 141842 141843 141844 141845 141846 141847 141848 141849 141850 141851 141852 141853 141854 141855 141856 141857 141858 141859 141860 141861 141862 141863 141864 141865 141866 141867 141868 141869 141870 141871 141872 141873 141874 141875 141876 141877 141878 141879 141880 141881 141882 141883 141884 141885 141886 141887 141888 141889 141890 141891 141892 141893 141894 141895 141896 141897 141898 141899 141900 141901 141902 141903 141904 141905 141906 141907 141908 141909 141910 141911 141912 141913 141914 141915 141916 141917 141918 141919 141920 141921 141922 141923 141924 141925 141926 141927 141928 141929 141930 141931 141932 141933 141934 141935 141936 141937 141938 141939 141940 141941 141942 141943 141944 141945 141946 141947 141948 141949 141950 141951 141952 141953 141954 141955 141956 141957 141958 141959 141960 141961 141962 141963 141964 141965 141966 141967 141968 141969 141970 141971 141972 141973 141974 141975 141976 141977 141978 141979 141980 141981 141982 141983 141984 141985 141986 141987 141988 141989 141990 141991 141992 141993 141994 141995 141996 141997 141998 141999 142000 142001 142002 142003 142004 142005 142006 142007 142008 142009 142010 142011 142012 142013 142014 142015 142016 142017 142018 142019 142020 142021 142022 142023 142024 142025 142026 142027 142028 142029 142030 142031 142032 142033 142034 142035 142036 142037 142038 142039 142040 142041 142042 142043 142044 142045 142046 142047 142048 142049 142050 142051 142052 142053 142054 142055 142056 142057 142058 142059 142060 142061 142062 142063 142064 142065 142066 142067 142068 142069 142070 142071 142072 142073 142074 142075 142076 142077 142078 142079 142080 142081 142082 142083 142084 142085 142086 142087 142088 142089 142090 142091 142092 142093 142094 142095 142096 142097 142098 142099 142100 142101 142102 142103 142104 142105 142106 142107 142108 142109 142110 142111 142112 142113 142114 142115 142116 142117 142118 142119 142120 142121 142122 142123 142124 142125 142126 142127 142128 142129 142130 142131 142132 142133 142134 142135 142136 142137 142138 142139 142140 142141 142142 142143 142144 142145 142146 142147 142148 142149 142150 142151 142152 142153 142154 142155 142156 142157 142158 142159 142160 142161 142162 142163 142164 142165 142166 142167 142168 142169 142170 142171 142172 142173 142174 142175 142176 142177 142178 142179 142180 142181 142182 142183 142184 142185 142186 142187 142188 142189 142190 142191 142192 142193 142194 142195 142196 142197 142198 142199 142200 142201 142202 142203 142204 142205 142206 142207 142208 142209 142210 142211 142212 142213 142214 142215 142216 142217 142218 142219 142220 142221 142222 142223 142224 142225 142226 142227 142228 142229 142230 142231 142232 142233 142234 142235 142236 142237 142238 142239 142240 142241 142242 142243 142244 142245 142246 142247 142248 142249 142250 142251 142252 142253 142254 142255 142256 142257 142258 142259 142260 142261 142262 142263 142264 142265 142266 142267 142268 142269 142270 142271 142272 142273 142274 142275 142276 142277 142278 142279 142280 142281 142282 142283 142284 142285 142286 142287 142288 142289 142290 142291 142292 142293 142294 142295 142296 142297 142298 142299 142300 142301 142302 142303 142304 142305 142306 142307 142308 142309 142310 142311 142312 142313 142314 142315 142316 142317 142318 142319 142320 142321 142322 142323 142324 142325 142326 142327 142328 142329 142330 142331 142332 142333 142334 142335 142336 142337 142338 142339 142340 142341 142342 142343 142344 142345 142346 142347 142348 142349 142350 142351 142352 142353 142354 142355 142356 142357 142358 142359 142360 142361 142362 142363 142364 142365 142366 142367 142368 142369 142370 142371 142372 142373 142374 142375 142376 142377 142378 142379 142380 142381 142382 142383 142384 142385 142386 142387 142388 142389 142390 142391 142392 142393 142394 142395 142396 142397 142398 142399 142400 142401 142402 142403 142404 142405 142406 142407 142408 142409 142410 142411 142412 142413 142414 142415 142416 142417 142418 142419 142420 142421 142422 142423 142424 142425 142426 142427 142428 142429 142430 142431 142432 142433 142434 142435 142436 142437 142438 142439 142440 142441 142442 142443 142444 142445 142446 142447 142448 142449 142450 142451 142452 142453 142454 142455 142456 142457 142458 142459 142460 142461 142462 142463 142464 142465 142466 142467 142468 142469 142470 142471 142472 142473 142474 142475 142476 142477 142478 142479 142480 142481 142482 142483 142484 142485 142486 142487 142488 142489 142490 142491 142492 142493 142494 142495 142496 142497 142498 142499 142500 142501 142502 142503 142504 142505 142506 142507 142508 142509 142510 142511 142512 142513 142514 142515 142516 142517 142518 142519 142520 142521 142522 142523 142524 142525 142526 142527 142528 142529 142530 142531 142532 142533 142534 142535 142536 142537 142538 142539 142540 142541 142542 142543 142544 142545 142546 142547 142548 142549 142550 142551 142552 142553 142554 142555 142556 142557 142558 142559 142560 142561 142562 142563 142564 142565 142566 142567 142568 142569 142570 142571 142572 142573 142574 142575 142576 142577 142578 142579 142580 142581 142582 142583 142584 142585 142586 142587 142588 142589 142590 142591 142592 142593 142594 142595 142596 142597 142598 142599 142600 142601 142602 142603 142604 142605 142606 142607 142608 142609 142610 142611 142612 142613 142614 142615 142616 142617 142618 142619 142620 142621 142622 142623 142624 142625 142626 142627 142628 142629 142630 142631 142632 142633 142634 142635 142636 142637 142638 142639 142640 142641 142642 142643 142644 142645 142646 142647 142648 142649 142650 142651 142652 142653 142654 142655 142656 142657 142658 142659 142660 142661 142662 142663 142664 142665 142666 142667 142668 142669 142670 142671 142672 142673 142674 142675 142676 142677 142678 142679 142680 142681 142682 142683 142684 142685 142686 142687 142688 142689 142690 142691 142692 142693 142694 142695 142696 142697 142698 142699 142700 142701 142702 142703 142704 142705 142706 142707 142708 142709 142710 142711 142712 142713 142714 142715 142716 142717 142718 142719 142720 142721 142722 142723 142724 142725 142726 142727 142728 142729 142730 142731 142732 142733 142734 142735 142736 142737 142738 142739 142740 142741 142742 142743 142744 142745 142746 142747 142748 142749 142750 142751 142752 142753 142754 142755 142756 142757 142758 142759 142760 142761 142762 142763 142764 142765 142766 142767 142768 142769 142770 142771 142772 142773 142774 142775 142776 142777 142778 142779 142780 142781 142782 142783 142784 142785 142786 142787 142788 142789 142790 142791 142792 142793 142794 142795 142796 142797 142798 142799 142800 142801 142802 142803 142804 142805 142806 142807 142808 142809 142810 142811 142812 142813 142814 142815 142816 142817 142818 142819 142820 142821 142822 142823 142824 142825 142826 142827 142828 142829 142830 142831 142832 142833 142834 142835 142836 142837 142838 142839 142840 142841 142842 142843 142844 142845 142846 142847 142848 142849 142850 142851 142852 142853 142854 142855 142856 142857 142858 142859 142860 142861 142862 142863 142864 142865 142866 142867 142868 142869 142870 142871 142872 142873 142874 142875 142876 142877 142878 142879 142880 142881 142882 142883 142884 142885 142886 142887 142888 142889 142890 142891 142892 142893 142894 142895 142896 142897 142898 142899 142900 142901 142902 142903 142904 142905 142906 142907 142908 142909 142910 142911 142912 142913 142914 142915 142916 142917 142918 142919 142920 142921 142922 142923 142924 142925 142926 142927 142928 142929 142930 142931 142932 142933 142934 142935 142936 142937 142938 142939 142940 142941 142942 142943 142944 142945 142946 142947 142948 142949 142950 142951 142952 142953 142954 142955 142956 142957 142958 142959 142960 142961 142962 142963 142964 142965 142966 142967 142968 142969 142970 142971 142972 142973 142974 142975 142976 142977 142978 142979 142980 142981 142982 142983 142984 142985 142986 142987 142988 142989 142990 142991 142992 142993 142994 142995 142996 142997 142998 142999 143000 143001 143002 143003 143004 143005 143006 143007 143008 143009 143010 143011 143012 143013 143014 143015 143016 143017 143018 143019 143020 143021 143022 143023 143024 143025 143026 143027 143028 143029 143030 143031 143032 143033 143034 143035 143036 143037 143038 143039 143040 143041 143042 143043 143044 143045 143046 143047 143048 143049 143050 143051 143052 143053 143054 143055 143056 143057 143058 143059 143060 143061 143062 143063 143064 143065 143066 143067 143068 143069 143070 143071 143072 143073 143074 143075 143076 143077 143078 143079 143080 143081 143082 143083 143084 143085 143086 143087 143088 143089 143090 143091 143092 143093 143094 143095 143096 143097 143098 143099 143100 143101 143102 143103 143104 143105 143106 143107 143108 143109 143110 143111 143112 143113 143114 143115 143116 143117 143118 143119 143120 143121 143122 143123 143124 143125 143126 143127 143128 143129 143130 143131 143132 143133 143134 143135 143136 143137 143138 143139 143140 143141 143142 143143 143144 143145 143146 143147 143148 143149 143150 143151 143152 143153 143154 143155 143156 143157 143158 143159 143160 143161 143162 143163 143164 143165 143166 143167 143168 143169 143170 143171 143172 143173 143174 143175 143176 143177 143178 143179 143180 143181 143182 143183 143184 143185 143186 143187 143188 143189 143190 143191 143192 143193 143194 143195 143196 143197 143198 143199 143200 143201 143202 143203 143204 143205 143206 143207 143208 143209 143210 143211 143212 143213 143214 143215 143216 143217 143218 143219 143220 143221 143222 143223 143224 143225 143226 143227 143228 143229 143230 143231 143232 143233 143234 143235 143236 143237 143238 143239 143240 143241 143242 143243 143244 143245 143246 143247 143248 143249 143250 143251 143252 143253 143254 143255 143256 143257 143258 143259 143260 143261 143262 143263 143264 143265 143266 143267 143268 143269 143270 143271 143272 143273 143274 143275 143276 143277 143278 143279 143280 143281 143282 143283 143284 143285 143286 143287 143288 143289 143290 143291 143292 143293 143294 143295 143296 143297 143298 143299 143300 143301 143302 143303 143304 143305 143306 143307 143308 143309 143310 143311 143312 143313 143314 143315 143316 143317 143318 143319 143320 143321 143322 143323 143324 143325 143326 143327 143328 143329 143330 143331 143332 143333 143334 143335 143336 143337 143338 143339 143340 143341 143342 143343 143344 143345 143346 143347 143348 143349 143350 143351 143352 143353 143354 143355 143356 143357 143358 143359 143360 143361 143362 143363 143364 143365 143366 143367 143368 143369 143370 143371 143372 143373 143374 143375 143376 143377 143378 143379 143380 143381 143382 143383 143384 143385 143386 143387 143388 143389 143390 143391 143392 143393 143394 143395 143396 143397 143398 143399 143400 143401 143402 143403 143404 143405 143406 143407 143408 143409 143410 143411 143412 143413 143414 143415 143416 143417 143418 143419 143420 143421 143422 143423 143424 143425 143426 143427 143428 143429 143430 143431 143432 143433 143434 143435 143436 143437 143438 143439 143440 143441 143442 143443 143444 143445 143446 143447 143448 143449 143450 143451 143452 143453 143454 143455 143456 143457 143458 143459 143460 143461 143462 143463 143464 143465 143466 143467 143468 143469 143470 143471 143472 143473 143474 143475 143476 143477 143478 143479 143480 143481 143482 143483 143484 143485 143486 143487 143488 143489 143490 143491 143492 143493 143494 143495 143496 143497 143498 143499 143500 143501 143502 143503 143504 143505 143506 143507 143508 143509 143510 143511 143512 143513 143514 143515 143516 143517 143518 143519 143520 143521 143522 143523 143524 143525 143526 143527 143528 143529 143530 143531 143532 143533 143534 143535 143536 143537 143538 143539 143540 143541 143542 143543 143544 143545 143546 143547 143548 143549 143550 143551 143552 143553 143554 143555 143556 143557 143558 143559 143560 143561 143562 143563 143564 143565 143566 143567 143568 143569 143570 143571 143572 143573 143574 143575 143576 143577 143578 143579 143580 143581 143582 143583 143584 143585 143586 143587 143588 143589 143590 143591 143592 143593 143594 143595 143596 143597 143598 143599 143600 143601 143602 143603 143604 143605 143606 143607 143608 143609 143610 143611 143612 143613 143614 143615 143616 143617 143618 143619 143620 143621 143622 143623 143624 143625 143626 143627 143628 143629 143630 143631 143632 143633 143634 143635 143636 143637 143638 143639 143640 143641 143642 143643 143644 143645 143646 143647 143648 143649 143650 143651 143652 143653 143654 143655 143656 143657 143658 143659 143660 143661 143662 143663 143664 143665 143666 143667 143668 143669 143670 143671 143672 143673 143674 143675 143676 143677 143678 143679 143680 143681 143682 143683 143684 143685 143686 143687 143688 143689 143690 143691 143692 143693 143694 143695 143696 143697 143698 143699 143700 143701 143702 143703 143704 143705 143706 143707 143708 143709 143710 143711 143712 143713 143714 143715 143716 143717 143718 143719 143720 143721 143722 143723 143724 143725 143726 143727 143728 143729 143730 143731 143732 143733 143734 143735 143736 143737 143738 143739 143740 143741 143742 143743 143744 143745 143746 143747 143748 143749 143750 143751 143752 143753 143754 143755 143756 143757 143758 143759 143760 143761 143762 143763 143764 143765 143766 143767 143768 143769 143770 143771 143772 143773 143774 143775 143776 143777 143778 143779 143780 143781 143782 143783 143784 143785 143786 143787 143788 143789 143790 143791 143792 143793 143794 143795 143796 143797 143798 143799 143800 143801 143802 143803 143804 143805 143806 143807 143808 143809 143810 143811 143812 143813 143814 143815 143816 143817 143818 143819 143820 143821 143822 143823 143824 143825 143826 143827 143828 143829 143830 143831 143832 143833 143834 143835 143836 143837 143838 143839 143840 143841 143842 143843 143844 143845 143846 143847 143848 143849 143850 143851 143852 143853 143854 143855 143856 143857 143858 143859 143860 143861 143862 143863 143864 143865 143866 143867 143868 143869 143870 143871 143872 143873 143874 143875 143876 143877 143878 143879 143880 143881 143882 143883 143884 143885 143886 143887 143888 143889 143890 143891 143892 143893 143894 143895 143896 143897 143898 143899 143900 143901 143902 143903 143904 143905 143906 143907 143908 143909 143910 143911 143912 143913 143914 143915 143916 143917 143918 143919 143920 143921 143922 143923 143924 143925 143926 143927 143928 143929 143930 143931 143932 143933 143934 143935 143936 143937 143938 143939 143940 143941 143942 143943 143944 143945 143946 143947 143948 143949 143950 143951 143952 143953 143954 143955 143956 143957 143958 143959 143960 143961 143962 143963 143964 143965 143966 143967 143968 143969 143970 143971 143972 143973 143974 143975 143976 143977 143978 143979 143980 143981 143982 143983 143984 143985 143986 143987 143988 143989 143990 143991 143992 143993 143994 143995 143996 143997 143998 143999 144000 144001 144002 144003 144004 144005 144006 144007 144008 144009 144010 144011 144012 144013 144014 144015 144016 144017 144018 144019 144020 144021 144022 144023 144024 144025 144026 144027 144028 144029 144030 144031 144032 144033 144034 144035 144036 144037 144038 144039 144040 144041 144042 144043 144044 144045 144046 144047 144048 144049 144050 144051 144052 144053 144054 144055 144056 144057 144058 144059 144060 144061 144062 144063 144064 144065 144066 144067 144068 144069 144070 144071 144072 144073 144074 144075 144076 144077 144078 144079 144080 144081 144082 144083 144084 144085 144086 144087 144088 144089 144090 144091 144092 144093 144094 144095 144096 144097 144098 144099 144100 144101 144102 144103 144104 144105 144106 144107 144108 144109 144110 144111 144112 144113 144114 144115 144116 144117 144118 144119 144120 144121 144122 144123 144124 144125 144126 144127 144128 144129 144130 144131 144132 144133 144134 144135 144136 144137 144138 144139 144140 144141 144142 144143 144144 144145 144146 144147 144148 144149 144150 144151 144152 144153 144154 144155 144156 144157 144158 144159 144160 144161 144162 144163 144164 144165 144166 144167 144168 144169 144170 144171 144172 144173 144174 144175 144176 144177 144178 144179 144180 144181 144182 144183 144184 144185 144186 144187 144188 144189 144190 144191 144192 144193 144194 144195 144196 144197 144198 144199 144200 144201 144202 144203 144204 144205 144206 144207 144208 144209 144210 144211 144212 144213 144214 144215 144216 144217 144218 144219 144220 144221 144222 144223 144224 144225 144226 144227 144228 144229 144230 144231 144232 144233 144234 144235 144236 144237 144238 144239 144240 144241 144242 144243 144244 144245 144246 144247 144248 144249 144250 144251 144252 144253 144254 144255 144256 144257 144258 144259 144260 144261 144262 144263 144264 144265 144266 144267 144268 144269 144270 144271 144272 144273 144274 144275 144276 144277 144278 144279 144280 144281 144282 144283 144284 144285 144286 144287 144288 144289 144290 144291 144292 144293 144294 144295 144296 144297 144298 144299 144300 144301 144302 144303 144304 144305 144306 144307 144308 144309 144310 144311 144312 144313 144314 144315 144316 144317 144318 144319 144320 144321 144322 144323 144324 144325 144326 144327 144328 144329 144330 144331 144332 144333 144334 144335 144336 144337 144338 144339 144340 144341 144342 144343 144344 144345 144346 144347 144348 144349 144350 144351 144352 144353 144354 144355 144356 144357 144358 144359 144360 144361 144362 144363 144364 144365 144366 144367 144368 144369 144370 144371 144372 144373 144374 144375 144376 144377 144378 144379 144380 144381 144382 144383 144384 144385 144386 144387 144388 144389 144390 144391 144392 144393 144394 144395 144396 144397 144398 144399 144400 144401 144402 144403 144404 144405 144406 144407 144408 144409 144410 144411 144412 144413 144414 144415 144416 144417 144418 144419 144420 144421 144422 144423 144424 144425 144426 144427 144428 144429 144430 144431 144432 144433 144434 144435 144436 144437 144438 144439 144440 144441 144442 144443 144444 144445 144446 144447 144448 144449 144450 144451 144452 144453 144454 144455 144456 144457 144458 144459 144460 144461 144462 144463 144464 144465 144466 144467 144468 144469 144470 144471 144472 144473 144474 144475 144476 144477 144478 144479 144480 144481 144482 144483 144484 144485 144486 144487 144488 144489 144490 144491 144492 144493 144494 144495 144496 144497 144498 144499 144500 144501 144502 144503 144504 144505 144506 144507 144508 144509 144510 144511 144512 144513 144514 144515 144516 144517 144518 144519 144520 144521 144522 144523 144524 144525 144526 144527 144528 144529 144530 144531 144532 144533 144534 144535 144536 144537 144538 144539 144540 144541 144542 144543 144544 144545 144546 144547 144548 144549 144550 144551 144552 144553 144554 144555 144556 144557 144558 144559 144560 144561 144562 144563 144564 144565 144566 144567 144568 144569 144570 144571 144572 144573 144574 144575 144576 144577 144578 144579 144580 144581 144582 144583 144584 144585 144586 144587 144588 144589 144590 144591 144592 144593 144594 144595 144596 144597 144598 144599 144600 144601 144602 144603 144604 144605 144606 144607 144608 144609 144610 144611 144612 144613 144614 144615 144616 144617 144618 144619 144620 144621 144622 144623 144624 144625 144626 144627 144628 144629 144630 144631 144632 144633 144634 144635 144636 144637 144638 144639 144640 144641 144642 144643 144644 144645 144646 144647 144648 144649 144650 144651 144652 144653 144654 144655 144656 144657 144658 144659 144660 144661 144662 144663 144664 144665 144666 144667 144668 144669 144670 144671 144672 144673 144674 144675 144676 144677 144678 144679 144680 144681 144682 144683 144684 144685 144686 144687 144688 144689 144690 144691 144692 144693 144694 144695 144696 144697 144698 144699 144700 144701 144702 144703 144704 144705 144706 144707 144708 144709 144710 144711 144712 144713 144714 144715 144716 144717 144718 144719 144720 144721 144722 144723 144724 144725 144726 144727 144728 144729 144730 144731 144732 144733 144734 144735 144736 144737 144738 144739 144740 144741 144742 144743 144744 144745 144746 144747 144748 144749 144750 144751 144752 144753 144754 144755 144756 144757 144758 144759 144760 144761 144762 144763 144764 144765 144766 144767 144768 144769 144770 144771 144772 144773 144774 144775 144776 144777 144778 144779 144780 144781 144782 144783 144784 144785 144786 144787 144788 144789 144790 144791 144792 144793 144794 144795 144796 144797 144798 144799 144800 144801 144802 144803 144804 144805 144806 144807 144808 144809 144810 144811 144812 144813 144814 144815 144816 144817 144818 144819 144820 144821 144822 144823 144824 144825 144826 144827 144828 144829 144830 144831 144832 144833 144834 144835 144836 144837 144838 144839 144840 144841 144842 144843 144844 144845 144846 144847 144848 144849 144850 144851 144852 144853 144854 144855 144856 144857 144858 144859 144860 144861 144862 144863 144864 144865 144866 144867 144868 144869 144870 144871 144872 144873 144874 144875 144876 144877 144878 144879 144880 144881 144882 144883 144884 144885 144886 144887 144888 144889 144890 144891 144892 144893 144894 144895 144896 144897 144898 144899 144900 144901 144902 144903 144904 144905 144906 144907 144908 144909 144910 144911 144912 144913 144914 144915 144916 144917 144918 144919 144920 144921 144922 144923 144924 144925 144926 144927 144928 144929 144930 144931 144932 144933 144934 144935 144936 144937 144938 144939 144940 144941 144942 144943 144944 144945 144946 144947 144948 144949 144950 144951 144952 144953 144954 144955 144956 144957 144958 144959 144960 144961 144962 144963 144964 144965 144966 144967 144968 144969 144970 144971 144972 144973 144974 144975 144976 144977 144978 144979 144980 144981 144982 144983 144984 144985 144986 144987 144988 144989 144990 144991 144992 144993 144994 144995 144996 144997 144998 144999 145000 145001 145002 145003 145004 145005 145006 145007 145008 145009 145010 145011 145012 145013 145014 145015 145016 145017 145018 145019 145020 145021 145022 145023 145024 145025 145026 145027 145028 145029 145030 145031 145032 145033 145034 145035 145036 145037 145038 145039 145040 145041 145042 145043 145044 145045 145046 145047 145048 145049 145050 145051 145052 145053 145054 145055 145056 145057 145058 145059 145060 145061 145062 145063 145064 145065 145066 145067 145068 145069 145070 145071 145072 145073 145074 145075 145076 145077 145078 145079 145080 145081 145082 145083 145084 145085 145086 145087 145088 145089 145090 145091 145092 145093 145094 145095 145096 145097 145098 145099 145100 145101 145102 145103 145104 145105 145106 145107 145108 145109 145110 145111 145112 145113 145114 145115 145116 145117 145118 145119 145120 145121 145122 145123 145124 145125 145126 145127 145128 145129 145130 145131 145132 145133 145134 145135 145136 145137 145138 145139 145140 145141 145142 145143 145144 145145 145146 145147 145148 145149 145150 145151 145152 145153 145154 145155 145156 145157 145158 145159 145160 145161 145162 145163 145164 145165 145166 145167 145168 145169 145170 145171 145172 145173 145174 145175 145176 145177 145178 145179 145180 145181 145182 145183 145184 145185 145186 145187 145188 145189 145190 145191 145192 145193 145194 145195 145196 145197 145198 145199 145200 145201 145202 145203 145204 145205 145206 145207 145208 145209 145210 145211 145212 145213 145214 145215 145216 145217 145218 145219 145220 145221 145222 145223 145224 145225 145226 145227 145228 145229 145230 145231 145232 145233 145234 145235 145236 145237 145238 145239 145240 145241 145242 145243 145244 145245 145246 145247 145248 145249 145250 145251 145252 145253 145254 145255 145256 145257 145258 145259 145260 145261 145262 145263 145264 145265 145266 145267 145268 145269 145270 145271 145272 145273 145274 145275 145276 145277 145278 145279 145280 145281 145282 145283 145284 145285 145286 145287 145288 145289 145290 145291 145292 145293 145294 145295 145296 145297 145298 145299 145300 145301 145302 145303 145304 145305 145306 145307 145308 145309 145310 145311 145312 145313 145314 145315 145316 145317 145318 145319 145320 145321 145322 145323 145324 145325 145326 145327 145328 145329 145330 145331 145332 145333 145334 145335 145336 145337 145338 145339 145340 145341 145342 145343 145344 145345 145346 145347 145348 145349 145350 145351 145352 145353 145354 145355 145356 145357 145358 145359 145360 145361 145362 145363 145364 145365 145366 145367 145368 145369 145370 145371 145372 145373 145374 145375 145376 145377 145378 145379 145380 145381 145382 145383 145384 145385 145386 145387 145388 145389 145390 145391 145392 145393 145394 145395 145396 145397 145398 145399 145400 145401 145402 145403 145404 145405 145406 145407 145408 145409 145410 145411 145412 145413 145414 145415 145416 145417 145418 145419 145420 145421 145422 145423 145424 145425 145426 145427 145428 145429 145430 145431 145432 145433 145434 145435 145436 145437 145438 145439 145440 145441 145442 145443 145444 145445 145446 145447 145448 145449 145450 145451 145452 145453 145454 145455 145456 145457 145458 145459 145460 145461 145462 145463 145464 145465 145466 145467 145468 145469 145470 145471 145472 145473 145474 145475 145476 145477 145478 145479 145480 145481 145482 145483 145484 145485 145486 145487 145488 145489 145490 145491 145492 145493 145494 145495 145496 145497 145498 145499 145500 145501 145502 145503 145504 145505 145506 145507 145508 145509 145510 145511 145512 145513 145514 145515 145516 145517 145518 145519 145520 145521 145522 145523 145524 145525 145526 145527 145528 145529 145530 145531 145532 145533 145534 145535 145536 145537 145538 145539 145540 145541 145542 145543 145544 145545 145546 145547 145548 145549 145550 145551 145552 145553 145554 145555 145556 145557 145558 145559 145560 145561 145562 145563 145564 145565 145566 145567 145568 145569 145570 145571 145572 145573 145574 145575 145576 145577 145578 145579 145580 145581 145582 145583 145584 145585 145586 145587 145588 145589 145590 145591 145592 145593 145594 145595 145596 145597 145598 145599 145600 145601 145602 145603 145604 145605 145606 145607 145608 145609 145610 145611 145612 145613 145614 145615 145616 145617 145618 145619 145620 145621 145622 145623 145624 145625 145626 145627 145628 145629 145630 145631 145632 145633 145634 145635 145636 145637 145638 145639 145640 145641 145642 145643 145644 145645 145646 145647 145648 145649 145650 145651 145652 145653 145654 145655 145656 145657 145658 145659 145660 145661 145662 145663 145664 145665 145666 145667 145668 145669 145670 145671 145672 145673 145674 145675 145676 145677 145678 145679 145680 145681 145682 145683 145684 145685 145686 145687 145688 145689 145690 145691 145692 145693 145694 145695 145696 145697 145698 145699 145700 145701 145702 145703 145704 145705 145706 145707 145708 145709 145710 145711 145712 145713 145714 145715 145716 145717 145718 145719 145720 145721 145722 145723 145724 145725 145726 145727 145728 145729 145730 145731 145732 145733 145734 145735 145736 145737 145738 145739 145740 145741 145742 145743 145744 145745 145746 145747 145748 145749 145750 145751 145752 145753 145754 145755 145756 145757 145758 145759 145760 145761 145762 145763 145764 145765 145766 145767 145768 145769 145770 145771 145772 145773 145774 145775 145776 145777 145778 145779 145780 145781 145782 145783 145784 145785 145786 145787 145788 145789 145790 145791 145792 145793 145794 145795 145796 145797 145798 145799 145800 145801 145802 145803 145804 145805 145806 145807 145808 145809 145810 145811 145812 145813 145814 145815 145816 145817 145818 145819 145820 145821 145822 145823 145824 145825 145826 145827 145828 145829 145830 145831 145832 145833 145834 145835 145836 145837 145838 145839 145840 145841 145842 145843 145844 145845 145846 145847 145848 145849 145850 145851 145852 145853 145854 145855 145856 145857 145858 145859 145860 145861 145862 145863 145864 145865 145866 145867 145868 145869 145870 145871 145872 145873 145874 145875 145876 145877 145878 145879 145880 145881 145882 145883 145884 145885 145886 145887 145888 145889 145890 145891 145892 145893 145894 145895 145896 145897 145898 145899 145900 145901 145902 145903 145904 145905 145906 145907 145908 145909 145910 145911 145912 145913 145914 145915 145916 145917 145918 145919 145920 145921 145922 145923 145924 145925 145926 145927 145928 145929 145930 145931 145932 145933 145934 145935 145936 145937 145938 145939 145940 145941 145942 145943 145944 145945 145946 145947 145948 145949 145950 145951 145952 145953 145954 145955 145956 145957 145958 145959 145960 145961 145962 145963 145964 145965 145966 145967 145968 145969 145970 145971 145972 145973 145974 145975 145976 145977 145978 145979 145980 145981 145982 145983 145984 145985 145986 145987 145988 145989 145990 145991 145992 145993 145994 145995 145996 145997 145998 145999 146000 146001 146002 146003 146004 146005 146006 146007 146008 146009 146010 146011 146012 146013 146014 146015 146016 146017 146018 146019 146020 146021 146022 146023 146024 146025 146026 146027 146028 146029 146030 146031 146032 146033 146034 146035 146036 146037 146038 146039 146040 146041 146042 146043 146044 146045 146046 146047 146048 146049 146050 146051 146052 146053 146054 146055 146056 146057 146058 146059 146060 146061 146062 146063 146064 146065 146066 146067 146068 146069 146070 146071 146072 146073 146074 146075 146076 146077 146078 146079 146080 146081 146082 146083 146084 146085 146086 146087 146088 146089 146090 146091 146092 146093 146094 146095 146096 146097 146098 146099 146100 146101 146102 146103 146104 146105 146106 146107 146108 146109 146110 146111 146112 146113 146114 146115 146116 146117 146118 146119 146120 146121 146122 146123 146124 146125 146126 146127 146128 146129 146130 146131 146132 146133 146134 146135 146136 146137 146138 146139 146140 146141 146142 146143 146144 146145 146146 146147 146148 146149 146150 146151 146152 146153 146154 146155 146156 146157 146158 146159 146160 146161 146162 146163 146164 146165 146166 146167 146168 146169 146170 146171 146172 146173 146174 146175 146176 146177 146178 146179 146180 146181 146182 146183 146184 146185 146186 146187 146188 146189 146190 146191 146192 146193 146194 146195 146196 146197 146198 146199 146200 146201 146202 146203 146204 146205 146206 146207 146208 146209 146210 146211 146212 146213 146214 146215 146216 146217 146218 146219 146220 146221 146222 146223 146224 146225 146226 146227 146228 146229 146230 146231 146232 146233 146234 146235 146236 146237 146238 146239 146240 146241 146242 146243 146244 146245 146246 146247 146248 146249 146250 146251 146252 146253 146254 146255 146256 146257 146258 146259 146260 146261 146262 146263 146264 146265 146266 146267 146268 146269 146270 146271 146272 146273 146274 146275 146276 146277 146278 146279 146280 146281 146282 146283 146284 146285 146286 146287 146288 146289 146290 146291 146292 146293 146294 146295 146296 146297 146298 146299 146300 146301 146302 146303 146304 146305 146306 146307 146308 146309 146310 146311 146312 146313 146314 146315 146316 146317 146318 146319 146320 146321 146322 146323 146324 146325 146326 146327 146328 146329 146330 146331 146332 146333 146334 146335 146336 146337 146338 146339 146340 146341 146342 146343 146344 146345 146346 146347 146348 146349 146350 146351 146352 146353 146354 146355 146356 146357 146358 146359 146360 146361 146362 146363 146364 146365 146366 146367 146368 146369 146370 146371 146372 146373 146374 146375 146376 146377 146378 146379 146380 146381 146382 146383 146384 146385 146386 146387 146388 146389 146390 146391 146392 146393 146394 146395 146396 146397 146398 146399 146400 146401 146402 146403 146404 146405 146406 146407 146408 146409 146410 146411 146412 146413 146414 146415 146416 146417 146418 146419 146420 146421 146422 146423 146424 146425 146426 146427 146428 146429 146430 146431 146432 146433 146434 146435 146436 146437 146438 146439 146440 146441 146442 146443 146444 146445 146446 146447 146448 146449 146450 146451 146452 146453 146454 146455 146456 146457 146458 146459 146460 146461 146462 146463 146464 146465 146466 146467 146468 146469 146470 146471 146472 146473 146474 146475 146476 146477 146478 146479 146480 146481 146482 146483 146484 146485 146486 146487 146488 146489 146490 146491 146492 146493 146494 146495 146496 146497 146498 146499 146500 146501 146502 146503 146504 146505 146506 146507 146508 146509 146510 146511 146512 146513 146514 146515 146516 146517 146518 146519 146520 146521 146522 146523 146524 146525 146526 146527 146528 146529 146530 146531 146532 146533 146534 146535 146536 146537 146538 146539 146540 146541 146542 146543 146544 146545 146546 146547 146548 146549 146550 146551 146552 146553 146554 146555 146556 146557 146558 146559 146560 146561 146562 146563 146564 146565 146566 146567 146568 146569 146570 146571 146572 146573 146574 146575 146576 146577 146578 146579 146580 146581 146582 146583 146584 146585 146586 146587 146588 146589 146590 146591 146592 146593 146594 146595 146596 146597 146598 146599 146600 146601 146602 146603 146604 146605 146606 146607 146608 146609 146610 146611 146612 146613 146614 146615 146616 146617 146618 146619 146620 146621 146622 146623 146624 146625 146626 146627 146628 146629 146630 146631 146632 146633 146634 146635 146636 146637 146638 146639 146640 146641 146642 146643 146644 146645 146646 146647 146648 146649 146650 146651 146652 146653 146654 146655 146656 146657 146658 146659 146660 146661 146662 146663 146664 146665 146666 146667 146668 146669 146670 146671 146672 146673 146674 146675 146676 146677 146678 146679 146680 146681 146682 146683 146684 146685 146686 146687 146688 146689 146690 146691 146692 146693 146694 146695 146696 146697 146698 146699 146700 146701 146702 146703 146704 146705 146706 146707 146708 146709 146710 146711 146712 146713 146714 146715 146716 146717 146718 146719 146720 146721 146722 146723 146724 146725 146726 146727 146728 146729 146730 146731 146732 146733 146734 146735 146736 146737 146738 146739 146740 146741 146742 146743 146744 146745 146746 146747 146748 146749 146750 146751 146752 146753 146754 146755 146756 146757 146758 146759 146760 146761 146762 146763 146764 146765 146766 146767 146768 146769 146770 146771 146772 146773 146774 146775 146776 146777 146778 146779 146780 146781 146782 146783 146784 146785 146786 146787 146788 146789 146790 146791 146792 146793 146794 146795 146796 146797 146798 146799 146800 146801 146802 146803 146804 146805 146806 146807 146808 146809 146810 146811 146812 146813 146814 146815 146816 146817 146818 146819 146820 146821 146822 146823 146824 146825 146826 146827 146828 146829 146830 146831 146832 146833 146834 146835 146836 146837 146838 146839 146840 146841 146842 146843 146844 146845 146846 146847 146848 146849 146850 146851 146852 146853 146854 146855 146856 146857 146858 146859 146860 146861 146862 146863 146864 146865 146866 146867 146868 146869 146870 146871 146872 146873 146874 146875 146876 146877 146878 146879 146880 146881 146882 146883 146884 146885 146886 146887 146888 146889 146890 146891 146892 146893 146894 146895 146896 146897 146898 146899 146900 146901 146902 146903 146904 146905 146906 146907 146908 146909 146910 146911 146912 146913 146914 146915 146916 146917 146918 146919 146920 146921 146922 146923 146924 146925 146926 146927 146928 146929 146930 146931 146932 146933 146934 146935 146936 146937 146938 146939 146940 146941 146942 146943 146944 146945 146946 146947 146948 146949 146950 146951 146952 146953 146954 146955 146956 146957 146958 146959 146960 146961 146962 146963 146964 146965 146966 146967 146968 146969 146970 146971 146972 146973 146974 146975 146976 146977 146978 146979 146980 146981 146982 146983 146984 146985 146986 146987 146988 146989 146990 146991 146992 146993 146994 146995 146996 146997 146998 146999 147000 147001 147002 147003 147004 147005 147006 147007 147008 147009 147010 147011 147012 147013 147014 147015 147016 147017 147018 147019 147020 147021 147022 147023 147024 147025 147026 147027 147028 147029 147030 147031 147032 147033 147034 147035 147036 147037 147038 147039 147040 147041 147042 147043 147044 147045 147046 147047 147048 147049 147050 147051 147052 147053 147054 147055 147056 147057 147058 147059 147060 147061 147062 147063 147064 147065 147066 147067 147068 147069 147070 147071 147072 147073 147074 147075 147076 147077 147078 147079 147080 147081 147082 147083 147084 147085 147086 147087 147088 147089 147090 147091 147092 147093 147094 147095 147096 147097 147098 147099 147100 147101 147102 147103 147104 147105 147106 147107 147108 147109 147110 147111 147112 147113 147114 147115 147116 147117 147118 147119 147120 147121 147122 147123 147124 147125 147126 147127 147128 147129 147130 147131 147132 147133 147134 147135 147136 147137 147138 147139 147140 147141 147142 147143 147144 147145 147146 147147 147148 147149 147150 147151 147152 147153 147154 147155 147156 147157 147158 147159 147160 147161 147162 147163 147164 147165 147166 147167 147168 147169 147170 147171 147172 147173 147174 147175 147176 147177 147178 147179 147180 147181 147182 147183 147184 147185 147186 147187 147188 147189 147190 147191 147192 147193 147194 147195 147196 147197 147198 147199 147200 147201 147202 147203 147204 147205 147206 147207 147208 147209 147210 147211 147212 147213 147214 147215 147216 147217 147218 147219 147220 147221 147222 147223 147224 147225 147226 147227 147228 147229 147230 147231 147232 147233 147234 147235 147236 147237 147238 147239 147240 147241 147242 147243 147244 147245 147246 147247 147248 147249 147250 147251 147252 147253 147254 147255 147256 147257 147258 147259 147260 147261 147262 147263 147264 147265 147266 147267 147268 147269 147270 147271 147272 147273 147274 147275 147276 147277 147278 147279 147280 147281 147282 147283 147284 147285 147286 147287 147288 147289 147290 147291 147292 147293 147294 147295 147296 147297 147298 147299 147300 147301 147302 147303 147304 147305 147306 147307 147308 147309 147310 147311 147312 147313 147314 147315 147316 147317 147318 147319 147320 147321 147322 147323 147324 147325 147326 147327 147328 147329 147330 147331 147332 147333 147334 147335 147336 147337 147338 147339 147340 147341 147342 147343 147344 147345 147346 147347 147348 147349 147350 147351 147352 147353 147354 147355 147356 147357 147358 147359 147360 147361 147362 147363 147364 147365 147366 147367 147368 147369 147370 147371 147372 147373 147374 147375 147376 147377 147378 147379 147380 147381 147382 147383 147384 147385 147386 147387 147388 147389 147390 147391 147392 147393 147394 147395 147396 147397 147398 147399 147400 147401 147402 147403 147404 147405 147406 147407 147408 147409 147410 147411 147412 147413 147414 147415 147416 147417 147418 147419 147420 147421 147422 147423 147424 147425 147426 147427 147428 147429 147430 147431 147432 147433 147434 147435 147436 147437 147438 147439 147440 147441 147442 147443 147444 147445 147446 147447 147448 147449 147450 147451 147452 147453 147454 147455 147456 147457 147458 147459 147460 147461 147462 147463 147464 147465 147466 147467 147468 147469 147470 147471 147472 147473 147474 147475 147476 147477 147478 147479 147480 147481 147482 147483 147484 147485 147486 147487 147488 147489 147490 147491 147492 147493 147494 147495 147496 147497 147498 147499 147500 147501 147502 147503 147504 147505 147506 147507 147508 147509 147510 147511 147512 147513 147514 147515 147516 147517 147518 147519 147520 147521 147522 147523 147524 147525 147526 147527 147528 147529 147530 147531 147532 147533 147534 147535 147536 147537 147538 147539 147540 147541 147542 147543 147544 147545 147546 147547 147548 147549 147550 147551 147552 147553 147554 147555 147556 147557 147558 147559 147560 147561 147562 147563 147564 147565 147566 147567 147568 147569 147570 147571 147572 147573 147574 147575 147576 147577 147578 147579 147580 147581 147582 147583 147584 147585 147586 147587 147588 147589 147590 147591 147592 147593 147594 147595 147596 147597 147598 147599 147600 147601 147602 147603 147604 147605 147606 147607 147608 147609 147610 147611 147612 147613 147614 147615 147616 147617 147618 147619 147620 147621 147622 147623 147624 147625 147626 147627 147628 147629 147630 147631 147632 147633 147634 147635 147636 147637 147638 147639 147640 147641 147642 147643 147644 147645 147646 147647 147648 147649 147650 147651 147652 147653 147654 147655 147656 147657 147658 147659 147660 147661 147662 147663 147664 147665 147666 147667 147668 147669 147670 147671 147672 147673 147674 147675 147676 147677 147678 147679 147680 147681 147682 147683 147684 147685 147686 147687 147688 147689 147690 147691 147692 147693 147694 147695 147696 147697 147698 147699 147700 147701 147702 147703 147704 147705 147706 147707 147708 147709 147710 147711 147712 147713 147714 147715 147716 147717 147718 147719 147720 147721 147722 147723 147724 147725 147726 147727 147728 147729 147730 147731 147732 147733 147734 147735 147736 147737 147738 147739 147740 147741 147742 147743 147744 147745 147746 147747 147748 147749 147750 147751 147752 147753 147754 147755 147756 147757 147758 147759 147760 147761 147762 147763 147764 147765 147766 147767 147768 147769 147770 147771 147772 147773 147774 147775 147776 147777 147778 147779 147780 147781 147782 147783 147784 147785 147786 147787 147788 147789 147790 147791 147792 147793 147794 147795 147796 147797 147798 147799 147800 147801 147802 147803 147804 147805 147806 147807 147808 147809 147810 147811 147812 147813 147814 147815 147816 147817 147818 147819 147820 147821 147822 147823 147824 147825 147826 147827 147828 147829 147830 147831 147832 147833 147834 147835 147836 147837 147838 147839 147840 147841 147842 147843 147844 147845 147846 147847 147848 147849 147850 147851 147852 147853 147854 147855 147856 147857 147858 147859 147860 147861 147862 147863 147864 147865 147866 147867 147868 147869 147870 147871 147872 147873 147874 147875 147876 147877 147878 147879 147880 147881 147882 147883 147884 147885 147886 147887 147888 147889 147890 147891 147892 147893 147894 147895 147896 147897 147898 147899 147900 147901 147902 147903 147904 147905 147906 147907 147908 147909 147910 147911 147912 147913 147914 147915 147916 147917 147918 147919 147920 147921 147922 147923 147924 147925 147926 147927 147928 147929 147930 147931 147932 147933 147934 147935 147936 147937 147938 147939 147940 147941 147942 147943 147944 147945 147946 147947 147948 147949 147950 147951 147952 147953 147954 147955 147956 147957 147958 147959 147960 147961 147962 147963 147964 147965 147966 147967 147968 147969 147970 147971 147972 147973 147974 147975 147976 147977 147978 147979 147980 147981 147982 147983 147984 147985 147986 147987 147988 147989 147990 147991 147992 147993 147994 147995 147996 147997 147998 147999 148000 148001 148002 148003 148004 148005 148006 148007 148008 148009 148010 148011 148012 148013 148014 148015 148016 148017 148018 148019 148020 148021 148022 148023 148024 148025 148026 148027 148028 148029 148030 148031 148032 148033 148034 148035 148036 148037 148038 148039 148040 148041 148042 148043 148044 148045 148046 148047 148048 148049 148050 148051 148052 148053 148054 148055 148056 148057 148058 148059 148060 148061 148062 148063 148064 148065 148066 148067 148068 148069 148070 148071 148072 148073 148074 148075 148076 148077 148078 148079 148080 148081 148082 148083 148084 148085 148086 148087 148088 148089 148090 148091 148092 148093 148094 148095 148096 148097 148098 148099 148100 148101 148102 148103 148104 148105 148106 148107 148108 148109 148110 148111 148112 148113 148114 148115 148116 148117 148118 148119 148120 148121 148122 148123 148124 148125 148126 148127 148128 148129 148130 148131 148132 148133 148134 148135 148136 148137 148138 148139 148140 148141 148142 148143 148144 148145 148146 148147 148148 148149 148150 148151 148152 148153 148154 148155 148156 148157 148158 148159 148160 148161 148162 148163 148164 148165 148166 148167 148168 148169 148170 148171 148172 148173 148174 148175 148176 148177 148178 148179 148180 148181 148182 148183 148184 148185 148186 148187 148188 148189 148190 148191 148192 148193 148194 148195 148196 148197 148198 148199 148200 148201 148202 148203 148204 148205 148206 148207 148208 148209 148210 148211 148212 148213 148214 148215 148216 148217 148218 148219 148220 148221 148222 148223 148224 148225 148226 148227 148228 148229 148230 148231 148232 148233 148234 148235 148236 148237 148238 148239 148240 148241 148242 148243 148244 148245 148246 148247 148248 148249 148250 148251 148252 148253 148254 148255 148256 148257 148258 148259 148260 148261 148262 148263 148264 148265 148266 148267 148268 148269 148270 148271 148272 148273 148274 148275 148276 148277 148278 148279 148280 148281 148282 148283 148284 148285 148286 148287 148288 148289 148290 148291 148292 148293 148294 148295 148296 148297 148298 148299 148300 148301 148302 148303 148304 148305 148306 148307 148308 148309 148310 148311 148312 148313 148314 148315 148316 148317 148318 148319 148320 148321 148322 148323 148324 148325 148326 148327 148328 148329 148330 148331 148332 148333 148334 148335 148336 148337 148338 148339 148340 148341 148342 148343 148344 148345 148346 148347 148348 148349 148350 148351 148352 148353 148354 148355 148356 148357 148358 148359 148360 148361 148362 148363 148364 148365 148366 148367 148368 148369 148370 148371 148372 148373 148374 148375 148376 148377 148378 148379 148380 148381 148382 148383 148384 148385 148386 148387 148388 148389 148390 148391 148392 148393 148394 148395 148396 148397 148398 148399 148400 148401 148402 148403 148404 148405 148406 148407 148408 148409 148410 148411 148412 148413 148414 148415 148416 148417 148418 148419 148420 148421 148422 148423 148424 148425 148426 148427 148428 148429 148430 148431 148432 148433 148434 148435 148436 148437 148438 148439 148440 148441 148442 148443 148444 148445 148446 148447 148448 148449 148450 148451 148452 148453 148454 148455 148456 148457 148458 148459 148460 148461 148462 148463 148464 148465 148466 148467 148468 148469 148470 148471 148472 148473 148474 148475 148476 148477 148478 148479 148480 148481 148482 148483 148484 148485 148486 148487 148488 148489 148490 148491 148492 148493 148494 148495 148496 148497 148498 148499 148500 148501 148502 148503 148504 148505 148506 148507 148508 148509 148510 148511 148512 148513 148514 148515 148516 148517 148518 148519 148520 148521 148522 148523 148524 148525 148526 148527 148528 148529 148530 148531 148532 148533 148534 148535 148536 148537 148538 148539 148540 148541 148542 148543 148544 148545 148546 148547 148548 148549 148550 148551 148552 148553 148554 148555 148556 148557 148558 148559 148560 148561 148562 148563 148564 148565 148566 148567 148568 148569 148570 148571 148572 148573 148574 148575 148576 148577 148578 148579 148580 148581 148582 148583 148584 148585 148586 148587 148588 148589 148590 148591 148592 148593 148594 148595 148596 148597 148598 148599 148600 148601 148602 148603 148604 148605 148606 148607 148608 148609 148610 148611 148612 148613 148614 148615 148616 148617 148618 148619 148620 148621 148622 148623 148624 148625 148626 148627 148628 148629 148630 148631 148632 148633 148634 148635 148636 148637 148638 148639 148640 148641 148642 148643 148644 148645 148646 148647 148648 148649 148650 148651 148652 148653 148654 148655 148656 148657 148658 148659 148660 148661 148662 148663 148664 148665 148666 148667 148668 148669 148670 148671 148672 148673 148674 148675 148676 148677 148678 148679 148680 148681 148682 148683 148684 148685 148686 148687 148688 148689 148690 148691 148692 148693 148694 148695 148696 148697 148698 148699 148700 148701 148702 148703 148704 148705 148706 148707 148708 148709 148710 148711 148712 148713 148714 148715 148716 148717 148718 148719 148720 148721 148722 148723 148724 148725 148726 148727 148728 148729 148730 148731 148732 148733 148734 148735 148736 148737 148738 148739 148740 148741 148742 148743 148744 148745 148746 148747 148748 148749 148750 148751 148752 148753 148754 148755 148756 148757 148758 148759 148760 148761 148762 148763 148764 148765 148766 148767 148768 148769 148770 148771 148772 148773 148774 148775 148776 148777 148778 148779 148780 148781 148782 148783 148784 148785 148786 148787 148788 148789 148790 148791 148792 148793 148794 148795 148796 148797 148798 148799 148800 148801 148802 148803 148804 148805 148806 148807 148808 148809 148810 148811 148812 148813 148814 148815 148816 148817 148818 148819 148820 148821 148822 148823 148824 148825 148826 148827 148828 148829 148830 148831 148832 148833 148834 148835 148836 148837 148838 148839 148840 148841 148842 148843 148844 148845 148846 148847 148848 148849 148850 148851 148852 148853 148854 148855 148856 148857 148858 148859 148860 148861 148862 148863 148864 148865 148866 148867 148868 148869 148870 148871 148872 148873 148874 148875 148876 148877 148878 148879 148880 148881 148882 148883 148884 148885 148886 148887 148888 148889 148890 148891 148892 148893 148894 148895 148896 148897 148898 148899 148900 148901 148902 148903 148904 148905 148906 148907 148908 148909 148910 148911 148912 148913 148914 148915 148916 148917 148918 148919 148920 148921 148922 148923 148924 148925 148926 148927 148928 148929 148930 148931 148932 148933 148934 148935 148936 148937 148938 148939 148940 148941 148942 148943 148944 148945 148946 148947 148948 148949 148950 148951 148952 148953 148954 148955 148956 148957 148958 148959 148960 148961 148962 148963 148964 148965 148966 148967 148968 148969 148970 148971 148972 148973 148974 148975 148976 148977 148978 148979 148980 148981 148982 148983 148984 148985 148986 148987 148988 148989 148990 148991 148992 148993 148994 148995 148996 148997 148998 148999 149000 149001 149002 149003 149004 149005 149006 149007 149008 149009 149010 149011 149012 149013 149014 149015 149016 149017 149018 149019 149020 149021 149022 149023 149024 149025 149026 149027 149028 149029 149030 149031 149032 149033 149034 149035 149036 149037 149038 149039 149040 149041 149042 149043 149044 149045 149046 149047 149048 149049 149050 149051 149052 149053 149054 149055 149056 149057 149058 149059 149060 149061 149062 149063 149064 149065 149066 149067 149068 149069 149070 149071 149072 149073 149074 149075 149076 149077 149078 149079 149080 149081 149082 149083 149084 149085 149086 149087 149088 149089 149090 149091 149092 149093 149094 149095 149096 149097 149098 149099 149100 149101 149102 149103 149104 149105 149106 149107 149108 149109 149110 149111 149112 149113 149114 149115 149116 149117 149118 149119 149120 149121 149122 149123 149124 149125 149126 149127 149128 149129 149130 149131 149132 149133 149134 149135 149136 149137 149138 149139 149140 149141 149142 149143 149144 149145 149146 149147 149148 149149 149150 149151 149152 149153 149154 149155 149156 149157 149158 149159 149160 149161 149162 149163 149164 149165 149166 149167 149168 149169 149170 149171 149172 149173 149174 149175 149176 149177 149178 149179 149180 149181 149182 149183 149184 149185 149186 149187 149188 149189 149190 149191 149192 149193 149194 149195 149196 149197 149198 149199 149200 149201 149202 149203 149204 149205 149206 149207 149208 149209 149210 149211 149212 149213 149214 149215 149216 149217 149218 149219 149220 149221 149222 149223 149224 149225 149226 149227 149228 149229 149230 149231 149232 149233 149234 149235 149236 149237 149238 149239 149240 149241 149242 149243 149244 149245 149246 149247 149248 149249 149250 149251 149252 149253 149254 149255 149256 149257 149258 149259 149260 149261 149262 149263 149264 149265 149266 149267 149268 149269 149270 149271 149272 149273 149274 149275 149276 149277 149278 149279 149280 149281 149282 149283 149284 149285 149286 149287 149288 149289 149290 149291 149292 149293 149294 149295 149296 149297 149298 149299 149300 149301 149302 149303 149304 149305 149306 149307 149308 149309 149310 149311 149312 149313 149314 149315 149316 149317 149318 149319 149320 149321 149322 149323 149324 149325 149326 149327 149328 149329 149330 149331 149332 149333 149334 149335 149336 149337 149338 149339 149340 149341 149342 149343 149344 149345 149346 149347 149348 149349 149350 149351 149352 149353 149354 149355 149356 149357 149358 149359 149360 149361 149362 149363 149364 149365 149366 149367 149368 149369 149370 149371 149372 149373 149374 149375 149376 149377 149378 149379 149380 149381 149382 149383 149384 149385 149386 149387 149388 149389 149390 149391 149392 149393 149394 149395 149396 149397 149398 149399 149400 149401 149402 149403 149404 149405 149406 149407 149408 149409 149410 149411 149412 149413 149414 149415 149416 149417 149418 149419 149420 149421 149422 149423 149424 149425 149426 149427 149428 149429 149430 149431 149432 149433 149434 149435 149436 149437 149438 149439 149440 149441 149442 149443 149444 149445 149446 149447 149448 149449 149450 149451 149452 149453 149454 149455 149456 149457 149458 149459 149460 149461 149462 149463 149464 149465 149466 149467 149468 149469 149470 149471 149472 149473 149474 149475 149476 149477 149478 149479 149480 149481 149482 149483 149484 149485 149486 149487 149488 149489 149490 149491 149492 149493 149494 149495 149496 149497 149498 149499 149500 149501 149502 149503 149504 149505 149506 149507 149508 149509 149510 149511 149512 149513 149514 149515 149516 149517 149518 149519 149520 149521 149522 149523 149524 149525 149526 149527 149528 149529 149530 149531 149532 149533 149534 149535 149536 149537 149538 149539 149540 149541 149542 149543 149544 149545 149546 149547 149548 149549 149550 149551 149552 149553 149554 149555 149556 149557 149558 149559 149560 149561 149562 149563 149564 149565 149566 149567 149568 149569 149570 149571 149572 149573 149574 149575 149576 149577 149578 149579 149580 149581 149582 149583 149584 149585 149586 149587 149588 149589 149590 149591 149592 149593 149594 149595 149596 149597 149598 149599 149600 149601 149602 149603 149604 149605 149606 149607 149608 149609 149610 149611 149612 149613 149614 149615 149616 149617 149618 149619 149620 149621 149622 149623 149624 149625 149626 149627 149628 149629 149630 149631 149632 149633 149634 149635 149636 149637 149638 149639 149640 149641 149642 149643 149644 149645 149646 149647 149648 149649 149650 149651 149652 149653 149654 149655 149656 149657 149658 149659 149660 149661 149662 149663 149664 149665 149666 149667 149668 149669 149670 149671 149672 149673 149674 149675 149676 149677 149678 149679 149680 149681 149682 149683 149684 149685 149686 149687 149688 149689 149690 149691 149692 149693 149694 149695 149696 149697 149698 149699 149700 149701 149702 149703 149704 149705 149706 149707 149708 149709 149710 149711 149712 149713 149714 149715 149716 149717 149718 149719 149720 149721 149722 149723 149724 149725 149726 149727 149728 149729 149730 149731 149732 149733 149734 149735 149736 149737 149738 149739 149740 149741 149742 149743 149744 149745 149746 149747 149748 149749 149750 149751 149752 149753 149754 149755 149756 149757 149758 149759 149760 149761 149762 149763 149764 149765 149766 149767 149768 149769 149770 149771 149772 149773 149774 149775 149776 149777 149778 149779 149780 149781 149782 149783 149784 149785 149786 149787 149788 149789 149790 149791 149792 149793 149794 149795 149796 149797 149798 149799 149800 149801 149802 149803 149804 149805 149806 149807 149808 149809 149810 149811 149812 149813 149814 149815 149816 149817 149818 149819 149820 149821 149822 149823 149824 149825 149826 149827 149828 149829 149830 149831 149832 149833 149834 149835 149836 149837 149838 149839 149840 149841 149842 149843 149844 149845 149846 149847 149848 149849 149850 149851 149852 149853 149854 149855 149856 149857 149858 149859 149860 149861 149862 149863 149864 149865 149866 149867 149868 149869 149870 149871 149872 149873 149874 149875 149876 149877 149878 149879 149880 149881 149882 149883 149884 149885 149886 149887 149888 149889 149890 149891 149892 149893 149894 149895 149896 149897 149898 149899 149900 149901 149902 149903 149904 149905 149906 149907 149908 149909 149910 149911 149912 149913 149914 149915 149916 149917 149918 149919 149920 149921 149922 149923 149924 149925 149926 149927 149928 149929 149930 149931 149932 149933 149934 149935 149936 149937 149938 149939 149940 149941 149942 149943 149944 149945 149946 149947 149948 149949 149950 149951 149952 149953 149954 149955 149956 149957 149958 149959 149960 149961 149962 149963 149964 149965 149966 149967 149968 149969 149970 149971 149972 149973 149974 149975 149976 149977 149978 149979 149980 149981 149982 149983 149984 149985 149986 149987 149988 149989 149990 149991 149992 149993 149994 149995 149996 149997 149998 149999 150000 150001 150002 150003 150004 150005 150006 150007 150008 150009 150010 150011 150012 150013 150014 150015 150016 150017 150018 150019 150020 150021 150022 150023 150024 150025 150026 150027 150028 150029 150030 150031 150032 150033 150034 150035 150036 150037 150038 150039 150040 150041 150042 150043 150044 150045 150046 150047 150048 150049 150050 150051 150052 150053 150054 150055 150056 150057 150058 150059 150060 150061 150062 150063 150064 150065 150066 150067 150068 150069 150070 150071 150072 150073 150074 150075 150076 150077 150078 150079 150080 150081 150082 150083 150084 150085 150086 150087 150088 150089 150090 150091 150092 150093 150094 150095 150096 150097 150098 150099 150100 150101 150102 150103 150104 150105 150106 150107 150108 150109 150110 150111 150112 150113 150114 150115 150116 150117 150118 150119 150120 150121 150122 150123 150124 150125 150126 150127 150128 150129 150130 150131 150132 150133 150134 150135 150136 150137 150138 150139 150140 150141 150142 150143 150144 150145 150146 150147 150148 150149 150150 150151 150152 150153 150154 150155 150156 150157 150158 150159 150160 150161 150162 150163 150164 150165 150166 150167 150168 150169 150170 150171 150172 150173 150174 150175 150176 150177 150178 150179 150180 150181 150182 150183 150184 150185 150186 150187 150188 150189 150190 150191 150192 150193 150194 150195 150196 150197 150198 150199 150200 150201 150202 150203 150204 150205 150206 150207 150208 150209 150210 150211 150212 150213 150214 150215 150216 150217 150218 150219 150220 150221 150222 150223 150224 150225 150226 150227 150228 150229 150230 150231 150232 150233 150234 150235 150236 150237 150238 150239 150240 150241 150242 150243 150244 150245 150246 150247 150248 150249 150250 150251 150252 150253 150254 150255 150256 150257 150258 150259 150260 150261 150262 150263 150264 150265 150266 150267 150268 150269 150270 150271 150272 150273 150274 150275 150276 150277 150278 150279 150280 150281 150282 150283 150284 150285 150286 150287 150288 150289 150290 150291 150292 150293 150294 150295 150296 150297 150298 150299 150300 150301 150302 150303 150304 150305 150306 150307 150308 150309 150310 150311 150312 150313 150314 150315 150316 150317 150318 150319 150320 150321 150322 150323 150324 150325 150326 150327 150328 150329 150330 150331 150332 150333 150334 150335 150336 150337 150338 150339 150340 150341 150342 150343 150344 150345 150346 150347 150348 150349 150350 150351 150352 150353 150354 150355 150356 150357 150358 150359 150360 150361 150362 150363 150364 150365 150366 150367 150368 150369 150370 150371 150372 150373 150374 150375 150376 150377 150378 150379 150380 150381 150382 150383 150384 150385 150386 150387 150388 150389 150390 150391 150392 150393 150394 150395 150396 150397 150398 150399 150400 150401 150402 150403 150404 150405 150406 150407 150408 150409 150410 150411 150412 150413 150414 150415 150416 150417 150418 150419 150420 150421 150422 150423 150424 150425 150426 150427 150428 150429 150430 150431 150432 150433 150434 150435 150436 150437 150438 150439 150440 150441 150442 150443 150444 150445 150446 150447 150448 150449 150450 150451 150452 150453 150454 150455 150456 150457 150458 150459 150460 150461 150462 150463 150464 150465 150466 150467 150468 150469 150470 150471 150472 150473 150474 150475 150476 150477 150478 150479 150480 150481 150482 150483 150484 150485 150486 150487 150488 150489 150490 150491 150492 150493 150494 150495 150496 150497 150498 150499 150500 150501 150502 150503 150504 150505 150506 150507 150508 150509 150510 150511 150512 150513 150514 150515 150516 150517 150518 150519 150520 150521 150522 150523 150524 150525 150526 150527 150528 150529 150530 150531 150532 150533 150534 150535 150536 150537 150538 150539 150540 150541 150542 150543 150544 150545 150546 150547 150548 150549 150550 150551 150552 150553 150554 150555 150556 150557 150558 150559 150560 150561 150562 150563 150564 150565 150566 150567 150568 150569 150570 150571 150572 150573 150574 150575 150576 150577 150578 150579 150580 150581 150582 150583 150584 150585 150586 150587 150588 150589 150590 150591 150592 150593 150594 150595 150596 150597 150598 150599 150600 150601 150602 150603 150604 150605 150606 150607 150608 150609 150610 150611 150612 150613 150614 150615 150616 150617 150618 150619 150620 150621 150622 150623 150624 150625 150626 150627 150628 150629 150630 150631 150632 150633 150634 150635 150636 150637 150638 150639 150640 150641 150642 150643 150644 150645 150646 150647 150648 150649 150650 150651 150652 150653 150654 150655 150656 150657 150658 150659 150660 150661 150662 150663 150664 150665 150666 150667 150668 150669 150670 150671 150672 150673 150674 150675 150676 150677 150678 150679 150680 150681 150682 150683 150684 150685 150686 150687 150688 150689 150690 150691 150692 150693 150694 150695 150696 150697 150698 150699 150700 150701 150702 150703 150704 150705 150706 150707 150708 150709 150710 150711 150712 150713 150714 150715 150716 150717 150718 150719 150720 150721 150722 150723 150724 150725 150726 150727 150728 150729 150730 150731 150732 150733 150734 150735 150736 150737 150738 150739 150740 150741 150742 150743 150744 150745 150746 150747 150748 150749 150750 150751 150752 150753 150754 150755 150756 150757 150758 150759 150760 150761 150762 150763 150764 150765 150766 150767 150768 150769 150770 150771 150772 150773 150774 150775 150776 150777 150778 150779 150780 150781 150782 150783 150784 150785 150786 150787 150788 150789 150790 150791 150792 150793 150794 150795 150796 150797 150798 150799 150800 150801 150802 150803 150804 150805 150806 150807 150808 150809 150810 150811 150812 150813 150814 150815 150816 150817 150818 150819 150820 150821 150822 150823 150824 150825 150826 150827 150828 150829 150830 150831 150832 150833 150834 150835 150836 150837 150838 150839 150840 150841 150842 150843 150844 150845 150846 150847 150848 150849 150850 150851 150852 150853 150854 150855 150856 150857 150858 150859 150860 150861 150862 150863 150864 150865 150866 150867 150868 150869 150870 150871 150872 150873 150874 150875 150876 150877 150878 150879 150880 150881 150882 150883 150884 150885 150886 150887 150888 150889 150890 150891 150892 150893 150894 150895 150896 150897 150898 150899 150900 150901 150902 150903 150904 150905 150906 150907 150908 150909 150910 150911 150912 150913 150914 150915 150916 150917 150918 150919 150920 150921 150922 150923 150924 150925 150926 150927 150928 150929 150930 150931 150932 150933 150934 150935 150936 150937 150938 150939 150940 150941 150942 150943 150944 150945 150946 150947 150948 150949 150950 150951 150952 150953 150954 150955 150956 150957 150958 150959 150960 150961 150962 150963 150964 150965 150966 150967 150968 150969 150970 150971 150972 150973 150974 150975 150976 150977 150978 150979 150980 150981 150982 150983 150984 150985 150986 150987 150988 150989 150990 150991 150992 150993 150994 150995 150996 150997 150998 150999 151000 151001 151002 151003 151004 151005 151006 151007 151008 151009 151010 151011 151012 151013 151014 151015 151016 151017 151018 151019 151020 151021 151022 151023 151024 151025 151026 151027 151028 151029 151030 151031 151032 151033 151034 151035 151036 151037 151038 151039 151040 151041 151042 151043 151044 151045 151046 151047 151048 151049 151050 151051 151052 151053 151054 151055 151056 151057 151058 151059 151060 151061 151062 151063 151064 151065 151066 151067 151068 151069 151070 151071 151072 151073 151074 151075 151076 151077 151078 151079 151080 151081 151082 151083 151084 151085 151086 151087 151088 151089 151090 151091 151092 151093 151094 151095 151096 151097 151098 151099 151100 151101 151102 151103 151104 151105 151106 151107 151108 151109 151110 151111 151112 151113 151114 151115 151116 151117 151118 151119 151120 151121 151122 151123 151124 151125 151126 151127 151128 151129 151130 151131 151132 151133 151134 151135 151136 151137 151138 151139 151140 151141 151142 151143 151144 151145 151146 151147 151148 151149 151150 151151 151152 151153 151154 151155 151156 151157 151158 151159 151160 151161 151162 151163 151164 151165 151166 151167 151168 151169 151170 151171 151172 151173 151174 151175 151176 151177 151178 151179 151180 151181 151182 151183 151184 151185 151186 151187 151188 151189 151190 151191 151192 151193 151194 151195 151196 151197 151198 151199 151200 151201 151202 151203 151204 151205 151206 151207 151208 151209 151210 151211 151212 151213 151214 151215 151216 151217 151218 151219 151220 151221 151222 151223 151224 151225 151226 151227 151228 151229 151230 151231 151232 151233 151234 151235 151236 151237 151238 151239 151240 151241 151242 151243 151244 151245 151246 151247 151248 151249 151250 151251 151252 151253 151254 151255 151256 151257 151258 151259 151260 151261 151262 151263 151264 151265 151266 151267 151268 151269 151270 151271 151272 151273 151274 151275 151276 151277 151278 151279 151280 151281 151282 151283 151284 151285 151286 151287 151288 151289 151290 151291 151292 151293 151294 151295 151296 151297 151298 151299 151300 151301 151302 151303 151304 151305 151306 151307 151308 151309 151310 151311 151312 151313 151314 151315 151316 151317 151318 151319 151320 151321 151322 151323 151324 151325 151326 151327 151328 151329 151330 151331 151332 151333 151334 151335 151336 151337 151338 151339 151340 151341 151342 151343 151344 151345 151346 151347 151348 151349 151350 151351 151352 151353 151354 151355 151356 151357 151358 151359 151360 151361 151362 151363 151364 151365 151366 151367 151368 151369 151370 151371 151372 151373 151374 151375 151376 151377 151378 151379 151380 151381 151382 151383 151384 151385 151386 151387 151388 151389 151390 151391 151392 151393 151394 151395 151396 151397 151398 151399 151400 151401 151402 151403 151404 151405 151406 151407 151408 151409 151410 151411 151412 151413 151414 151415 151416 151417 151418 151419 151420 151421 151422 151423 151424 151425 151426 151427 151428 151429 151430 151431 151432 151433 151434 151435 151436 151437 151438 151439 151440 151441 151442 151443 151444 151445 151446 151447 151448 151449 151450 151451 151452 151453 151454 151455 151456 151457 151458 151459 151460 151461 151462 151463 151464 151465 151466 151467 151468 151469 151470 151471 151472 151473 151474 151475 151476 151477 151478 151479 151480 151481 151482 151483 151484 151485 151486 151487 151488 151489 151490 151491 151492 151493 151494 151495 151496 151497 151498 151499 151500 151501 151502 151503 151504 151505 151506 151507 151508 151509 151510 151511 151512 151513 151514 151515 151516 151517 151518 151519 151520 151521 151522 151523 151524 151525 151526 151527 151528 151529 151530 151531 151532 151533 151534 151535 151536 151537 151538 151539 151540 151541 151542 151543 151544 151545 151546 151547 151548 151549 151550 151551 151552 151553 151554 151555 151556 151557 151558 151559 151560 151561 151562 151563 151564 151565 151566 151567 151568 151569 151570 151571 151572 151573 151574 151575 151576 151577 151578 151579 151580 151581 151582 151583 151584 151585 151586 151587 151588 151589 151590 151591 151592 151593 151594 151595 151596 151597 151598 151599 151600 151601 151602 151603 151604 151605 151606 151607 151608 151609 151610 151611 151612 151613 151614 151615 151616 151617 151618 151619 151620 151621 151622 151623 151624 151625 151626 151627 151628 151629 151630 151631 151632 151633 151634 151635 151636 151637 151638 151639 151640 151641 151642 151643 151644 151645 151646 151647 151648 151649 151650 151651 151652 151653 151654 151655 151656 151657 151658 151659 151660 151661 151662 151663 151664 151665 151666 151667 151668 151669 151670 151671 151672 151673 151674 151675 151676 151677 151678 151679 151680 151681 151682 151683 151684 151685 151686 151687 151688 151689 151690 151691 151692 151693 151694 151695 151696 151697 151698 151699 151700 151701 151702 151703 151704 151705 151706 151707 151708 151709 151710 151711 151712 151713 151714 151715 151716 151717 151718 151719 151720 151721 151722 151723 151724 151725 151726 151727 151728 151729 151730 151731 151732 151733 151734 151735 151736 151737 151738 151739 151740 151741 151742 151743 151744 151745 151746 151747 151748 151749 151750 151751 151752 151753 151754 151755 151756 151757 151758 151759 151760 151761 151762 151763 151764 151765 151766 151767 151768 151769 151770 151771 151772 151773 151774 151775 151776 151777 151778 151779 151780 151781 151782 151783 151784 151785 151786 151787 151788 151789 151790 151791 151792 151793 151794 151795 151796 151797 151798 151799 151800 151801 151802 151803 151804 151805 151806 151807 151808 151809 151810 151811 151812 151813 151814 151815 151816 151817 151818 151819 151820 151821 151822 151823 151824 151825 151826 151827 151828 151829 151830 151831 151832 151833 151834 151835 151836 151837 151838 151839 151840 151841 151842 151843 151844 151845 151846 151847 151848 151849 151850 151851 151852 151853 151854 151855 151856 151857 151858 151859 151860 151861 151862 151863 151864 151865 151866 151867 151868 151869 151870 151871 151872 151873 151874 151875 151876 151877 151878 151879 151880 151881 151882 151883 151884 151885 151886 151887 151888 151889 151890 151891 151892 151893 151894 151895 151896 151897 151898 151899 151900 151901 151902 151903 151904 151905 151906 151907 151908 151909 151910 151911 151912 151913 151914 151915 151916 151917 151918 151919 151920 151921 151922 151923 151924 151925 151926 151927 151928 151929 151930 151931 151932 151933 151934 151935 151936 151937 151938 151939 151940 151941 151942 151943 151944 151945 151946 151947 151948 151949 151950 151951 151952 151953 151954 151955 151956 151957 151958 151959 151960 151961 151962 151963 151964 151965 151966 151967 151968 151969 151970 151971 151972 151973 151974 151975 151976 151977 151978 151979 151980 151981 151982 151983 151984 151985 151986 151987 151988 151989 151990 151991 151992 151993 151994 151995 151996 151997 151998 151999 152000 152001 152002 152003 152004 152005 152006 152007 152008 152009 152010 152011 152012 152013 152014 152015 152016 152017 152018 152019 152020 152021 152022 152023 152024 152025 152026 152027 152028 152029 152030 152031 152032 152033 152034 152035 152036 152037 152038 152039 152040 152041 152042 152043 152044 152045 152046 152047 152048 152049 152050 152051 152052 152053 152054 152055 152056 152057 152058 152059 152060 152061 152062 152063 152064 152065 152066 152067 152068 152069 152070 152071 152072 152073 152074 152075 152076 152077 152078 152079 152080 152081 152082 152083 152084 152085 152086 152087 152088 152089 152090 152091 152092 152093 152094 152095 152096 152097 152098 152099 152100 152101 152102 152103 152104 152105 152106 152107 152108 152109 152110 152111 152112 152113 152114 152115 152116 152117 152118 152119 152120 152121 152122 152123 152124 152125 152126 152127 152128 152129 152130 152131 152132 152133 152134 152135 152136 152137 152138 152139 152140 152141 152142 152143 152144 152145 152146 152147 152148 152149 152150 152151 152152 152153 152154 152155 152156 152157 152158 152159 152160 152161 152162 152163 152164 152165 152166 152167 152168 152169 152170 152171 152172 152173 152174 152175 152176 152177 152178 152179 152180 152181 152182 152183 152184 152185 152186 152187 152188 152189 152190 152191 152192 152193 152194 152195 152196 152197 152198 152199 152200 152201 152202 152203 152204 152205 152206 152207 152208 152209 152210 152211 152212 152213 152214 152215 152216 152217 152218 152219 152220 152221 152222 152223 152224 152225 152226 152227 152228 152229 152230 152231 152232 152233 152234 152235 152236 152237 152238 152239 152240 152241 152242 152243 152244 152245 152246 152247 152248 152249 152250 152251 152252 152253 152254 152255 152256 152257 152258 152259 152260 152261 152262 152263 152264 152265 152266 152267 152268 152269 152270 152271 152272 152273 152274 152275 152276 152277 152278 152279 152280 152281 152282 152283 152284 152285 152286 152287 152288 152289 152290 152291 152292 152293 152294 152295 152296 152297 152298 152299 152300 152301 152302 152303 152304 152305 152306 152307 152308 152309 152310 152311 152312 152313 152314 152315 152316 152317 152318 152319 152320 152321 152322 152323 152324 152325 152326 152327 152328 152329 152330 152331 152332 152333 152334 152335 152336 152337 152338 152339 152340 152341 152342 152343 152344 152345 152346 152347 152348 152349 152350 152351 152352 152353 152354 152355 152356 152357 152358 152359 152360 152361 152362 152363 152364 152365 152366 152367 152368 152369 152370 152371 152372 152373 152374 152375 152376 152377 152378 152379 152380 152381 152382 152383 152384 152385 152386 152387 152388 152389 152390 152391 152392 152393 152394 152395 152396 152397 152398 152399 152400 152401 152402 152403 152404 152405 152406 152407 152408 152409 152410 152411 152412 152413 152414 152415 152416 152417 152418 152419 152420 152421 152422 152423 152424 152425 152426 152427 152428 152429 152430 152431 152432 152433 152434 152435 152436 152437 152438 152439 152440 152441 152442 152443 152444 152445 152446 152447 152448 152449 152450 152451 152452 152453 152454 152455 152456 152457 152458 152459 152460 152461 152462 152463 152464 152465 152466 152467 152468 152469 152470 152471 152472 152473 152474 152475 152476 152477 152478 152479 152480 152481 152482 152483 152484 152485 152486 152487 152488 152489 152490 152491 152492 152493 152494 152495 152496 152497 152498 152499 152500 152501 152502 152503 152504 152505 152506 152507 152508 152509 152510 152511 152512 152513 152514 152515 152516 152517 152518 152519 152520 152521 152522 152523 152524 152525 152526 152527 152528 152529 152530 152531 152532 152533 152534 152535 152536 152537 152538 152539 152540 152541 152542 152543 152544 152545 152546 152547 152548 152549 152550 152551 152552 152553 152554 152555 152556 152557 152558 152559 152560 152561 152562 152563 152564 152565 152566 152567 152568 152569 152570 152571 152572 152573 152574 152575 152576 152577 152578 152579 152580 152581 152582 152583 152584 152585 152586 152587 152588 152589 152590 152591 152592 152593 152594 152595 152596 152597 152598 152599 152600 152601 152602 152603 152604 152605 152606 152607 152608 152609 152610 152611 152612 152613 152614 152615 152616 152617 152618 152619 152620 152621 152622 152623 152624 152625 152626 152627 152628 152629 152630 152631 152632 152633 152634 152635 152636 152637 152638 152639 152640 152641 152642 152643 152644 152645 152646 152647 152648 152649 152650 152651 152652 152653 152654 152655 152656 152657 152658 152659 152660 152661 152662 152663 152664 152665 152666 152667 152668 152669 152670 152671 152672 152673 152674 152675 152676 152677 152678 152679 152680 152681 152682 152683 152684 152685 152686 152687 152688 152689 152690 152691 152692 152693 152694 152695 152696 152697 152698 152699 152700 152701 152702 152703 152704 152705 152706 152707 152708 152709 152710 152711 152712 152713 152714 152715 152716 152717 152718 152719 152720 152721 152722 152723 152724 152725 152726 152727 152728 152729 152730 152731 152732 152733 152734 152735 152736 152737 152738 152739 152740 152741 152742 152743 152744 152745 152746 152747 152748 152749 152750 152751 152752 152753 152754 152755 152756 152757 152758 152759 152760 152761 152762 152763 152764 152765 152766 152767 152768 152769 152770 152771 152772 152773 152774 152775 152776 152777 152778 152779 152780 152781 152782 152783 152784 152785 152786 152787 152788 152789 152790 152791 152792 152793 152794 152795 152796 152797 152798 152799 152800 152801 152802 152803 152804 152805 152806 152807 152808 152809 152810 152811 152812 152813 152814 152815 152816 152817 152818 152819 152820 152821 152822 152823 152824 152825 152826 152827 152828 152829 152830 152831 152832 152833 152834 152835 152836 152837 152838 152839 152840 152841 152842 152843 152844 152845 152846 152847 152848 152849 152850 152851 152852 152853 152854 152855 152856 152857 152858 152859 152860 152861 152862 152863 152864 152865 152866 152867 152868 152869 152870 152871 152872 152873 152874 152875 152876 152877 152878 152879 152880 152881 152882 152883 152884 152885 152886 152887 152888 152889 152890 152891 152892 152893 152894 152895 152896 152897 152898 152899 152900 152901 152902 152903 152904 152905 152906 152907 152908 152909 152910 152911 152912 152913 152914 152915 152916 152917 152918 152919 152920 152921 152922 152923 152924 152925 152926 152927 152928 152929 152930 152931 152932 152933 152934 152935 152936 152937 152938 152939 152940 152941 152942 152943 152944 152945 152946 152947 152948 152949 152950 152951 152952 152953 152954 152955 152956 152957 152958 152959 152960 152961 152962 152963 152964 152965 152966 152967 152968 152969 152970 152971 152972 152973 152974 152975 152976 152977 152978 152979 152980 152981 152982 152983 152984 152985 152986 152987 152988 152989 152990 152991 152992 152993 152994 152995 152996 152997 152998 152999 153000 153001 153002 153003 153004 153005 153006 153007 153008 153009 153010 153011 153012 153013 153014 153015 153016 153017 153018 153019 153020 153021 153022 153023 153024 153025 153026 153027 153028 153029 153030 153031 153032 153033 153034 153035 153036 153037 153038 153039 153040 153041 153042 153043 153044 153045 153046 153047 153048 153049 153050 153051 153052 153053 153054 153055 153056 153057 153058 153059 153060 153061 153062 153063 153064 153065 153066 153067 153068 153069 153070 153071 153072 153073 153074 153075 153076 153077 153078 153079 153080 153081 153082 153083 153084 153085 153086 153087 153088 153089 153090 153091 153092 153093 153094 153095 153096 153097 153098 153099 153100 153101 153102 153103 153104 153105 153106 153107 153108 153109 153110 153111 153112 153113 153114 153115 153116 153117 153118 153119 153120 153121 153122 153123 153124 153125 153126 153127 153128 153129 153130 153131 153132 153133 153134 153135 153136 153137 153138 153139 153140 153141 153142 153143 153144 153145 153146 153147 153148 153149 153150 153151 153152 153153 153154 153155 153156 153157 153158 153159 153160 153161 153162 153163 153164 153165 153166 153167 153168 153169 153170 153171 153172 153173 153174 153175 153176 153177 153178 153179 153180 153181 153182 153183 153184 153185 153186 153187 153188 153189 153190 153191 153192 153193 153194 153195 153196 153197 153198 153199 153200 153201 153202 153203 153204 153205 153206 153207 153208 153209 153210 153211 153212 153213 153214 153215 153216 153217 153218 153219 153220 153221 153222 153223 153224 153225 153226 153227 153228 153229 153230 153231 153232 153233 153234 153235 153236 153237 153238 153239 153240 153241 153242 153243 153244 153245 153246 153247 153248 153249 153250 153251 153252 153253 153254 153255 153256 153257 153258 153259 153260 153261 153262 153263 153264 153265 153266 153267 153268 153269 153270 153271 153272 153273 153274 153275 153276 153277 153278 153279 153280 153281 153282 153283 153284 153285 153286 153287 153288 153289 153290 153291 153292 153293 153294 153295 153296 153297 153298 153299 153300 153301 153302 153303 153304 153305 153306 153307 153308 153309 153310 153311 153312 153313 153314 153315 153316 153317 153318 153319 153320 153321 153322 153323 153324 153325 153326 153327 153328 153329 153330 153331 153332 153333 153334 153335 153336 153337 153338 153339 153340 153341 153342 153343 153344 153345 153346 153347 153348 153349 153350 153351 153352 153353 153354 153355 153356 153357 153358 153359 153360 153361 153362 153363 153364 153365 153366 153367 153368 153369 153370 153371 153372 153373 153374 153375 153376 153377 153378 153379 153380 153381 153382 153383 153384 153385 153386 153387 153388 153389 153390 153391 153392 153393 153394 153395 153396 153397 153398 153399 153400 153401 153402 153403 153404 153405 153406 153407 153408 153409 153410 153411 153412 153413 153414 153415 153416 153417 153418 153419 153420 153421 153422 153423 153424 153425 153426 153427 153428 153429 153430 153431 153432 153433 153434 153435 153436 153437 153438 153439 153440 153441 153442 153443 153444 153445 153446 153447 153448 153449 153450 153451 153452 153453 153454 153455 153456 153457 153458 153459 153460 153461 153462 153463 153464 153465 153466 153467 153468 153469 153470 153471 153472 153473 153474 153475 153476 153477 153478 153479 153480 153481 153482 153483 153484 153485 153486 153487 153488 153489 153490 153491 153492 153493 153494 153495 153496 153497 153498 153499 153500 153501 153502 153503 153504 153505 153506 153507 153508 153509 153510 153511 153512 153513 153514 153515 153516 153517 153518 153519 153520 153521 153522 153523 153524 153525 153526 153527 153528 153529 153530 153531 153532 153533 153534 153535 153536 153537 153538 153539 153540 153541 153542 153543 153544 153545 153546 153547 153548 153549 153550 153551 153552 153553 153554 153555 153556 153557 153558 153559 153560 153561 153562 153563 153564 153565 153566 153567 153568 153569 153570 153571 153572 153573 153574 153575 153576 153577 153578 153579 153580 153581 153582 153583 153584 153585 153586 153587 153588 153589 153590 153591 153592 153593 153594 153595 153596 153597 153598 153599 153600 153601 153602 153603 153604 153605 153606 153607 153608 153609 153610 153611 153612 153613 153614 153615 153616 153617 153618 153619 153620 153621 153622 153623 153624 153625 153626 153627 153628 153629 153630 153631 153632 153633 153634 153635 153636 153637 153638 153639 153640 153641 153642 153643 153644 153645 153646 153647 153648 153649 153650 153651 153652 153653 153654 153655 153656 153657 153658 153659 153660 153661 153662 153663 153664 153665 153666 153667 153668 153669 153670 153671 153672 153673 153674 153675 153676 153677 153678 153679 153680 153681 153682 153683 153684 153685 153686 153687 153688 153689 153690 153691 153692 153693 153694 153695 153696 153697 153698 153699 153700 153701 153702 153703 153704 153705 153706 153707 153708 153709 153710 153711 153712 153713 153714 153715 153716 153717 153718 153719 153720 153721 153722 153723 153724 153725 153726 153727 153728 153729 153730 153731 153732 153733 153734 153735 153736 153737 153738 153739 153740 153741 153742 153743 153744 153745 153746 153747 153748 153749 153750 153751 153752 153753 153754 153755 153756 153757 153758 153759 153760 153761 153762 153763 153764 153765 153766 153767 153768 153769 153770 153771 153772 153773 153774 153775 153776 153777 153778 153779 153780 153781 153782 153783 153784 153785 153786 153787 153788 153789 153790 153791 153792 153793 153794 153795 153796 153797 153798 153799 153800 153801 153802 153803 153804 153805 153806 153807 153808 153809 153810 153811 153812 153813 153814 153815 153816 153817 153818 153819 153820 153821 153822 153823 153824 153825 153826 153827 153828 153829 153830 153831 153832 153833 153834 153835 153836 153837 153838 153839 153840 153841 153842 153843 153844 153845 153846 153847 153848 153849 153850 153851 153852 153853 153854 153855 153856 153857 153858 153859 153860 153861 153862 153863 153864 153865 153866 153867 153868 153869 153870 153871 153872 153873 153874 153875 153876 153877 153878 153879 153880 153881 153882 153883 153884 153885 153886 153887 153888 153889 153890 153891 153892 153893 153894 153895 153896 153897 153898 153899 153900 153901 153902 153903 153904 153905 153906 153907 153908 153909 153910 153911 153912 153913 153914 153915 153916 153917 153918 153919 153920 153921 153922 153923 153924 153925 153926 153927 153928 153929 153930 153931 153932 153933 153934 153935 153936 153937 153938 153939 153940 153941 153942 153943 153944 153945 153946 153947 153948 153949 153950 153951 153952 153953 153954 153955 153956 153957 153958 153959 153960 153961 153962 153963 153964 153965 153966 153967 153968 153969 153970 153971 153972 153973 153974 153975 153976 153977 153978 153979 153980 153981 153982 153983 153984 153985 153986 153987 153988 153989 153990 153991 153992 153993 153994 153995 153996 153997 153998 153999 154000 154001 154002 154003 154004 154005 154006 154007 154008 154009 154010 154011 154012 154013 154014 154015 154016 154017 154018 154019 154020 154021 154022 154023 154024 154025 154026 154027 154028 154029 154030 154031 154032 154033 154034 154035 154036 154037 154038 154039 154040 154041 154042 154043 154044 154045 154046 154047 154048 154049 154050 154051 154052 154053 154054 154055 154056 154057 154058 154059 154060 154061 154062 154063 154064 154065 154066 154067 154068 154069 154070 154071 154072 154073 154074 154075 154076 154077 154078 154079 154080 154081 154082 154083 154084 154085 154086 154087 154088 154089 154090 154091 154092 154093 154094 154095 154096 154097 154098 154099 154100 154101 154102 154103 154104 154105 154106 154107 154108 154109 154110 154111 154112 154113 154114 154115 154116 154117 154118 154119 154120 154121 154122 154123 154124 154125 154126 154127 154128 154129 154130 154131 154132 154133 154134 154135 154136 154137 154138 154139 154140 154141 154142 154143 154144 154145 154146 154147 154148 154149 154150 154151 154152 154153 154154 154155 154156 154157 154158 154159 154160 154161 154162 154163 154164 154165 154166 154167 154168 154169 154170 154171 154172 154173 154174 154175 154176 154177 154178 154179 154180 154181 154182 154183 154184 154185 154186 154187 154188 154189 154190 154191 154192 154193 154194 154195 154196 154197 154198 154199 154200 154201 154202 154203 154204 154205 154206 154207 154208 154209 154210 154211 154212 154213 154214 154215 154216 154217 154218 154219 154220 154221 154222 154223 154224 154225 154226 154227 154228 154229 154230 154231 154232 154233 154234 154235 154236 154237 154238 154239 154240 154241 154242 154243 154244 154245 154246 154247 154248 154249 154250 154251 154252 154253 154254 154255 154256 154257 154258 154259 154260 154261 154262 154263 154264 154265 154266 154267 154268 154269 154270 154271 154272 154273 154274 154275 154276 154277 154278 154279 154280 154281 154282 154283 154284 154285 154286 154287 154288 154289 154290 154291 154292 154293 154294 154295 154296 154297 154298 154299 154300 154301 154302 154303 154304 154305 154306 154307 154308 154309 154310 154311 154312 154313 154314 154315 154316 154317 154318 154319 154320 154321 154322 154323 154324 154325 154326 154327 154328 154329 154330 154331 154332 154333 154334 154335 154336 154337 154338 154339 154340 154341 154342 154343 154344 154345 154346 154347 154348 154349 154350 154351 154352 154353 154354 154355 154356 154357 154358 154359 154360 154361 154362 154363 154364 154365 154366 154367 154368 154369 154370 154371 154372 154373 154374 154375 154376 154377 154378 154379 154380 154381 154382 154383 154384 154385 154386 154387 154388 154389 154390 154391 154392 154393 154394 154395 154396 154397 154398 154399 154400 154401 154402 154403 154404 154405 154406 154407 154408 154409 154410 154411 154412 154413 154414 154415 154416 154417 154418 154419 154420 154421 154422 154423 154424 154425 154426 154427 154428 154429 154430 154431 154432 154433 154434 154435 154436 154437 154438 154439 154440 154441 154442 154443 154444 154445 154446 154447 154448 154449 154450 154451 154452 154453 154454 154455 154456 154457 154458 154459 154460 154461 154462 154463 154464 154465 154466 154467 154468 154469 154470 154471 154472 154473 154474 154475 154476 154477 154478 154479 154480 154481 154482 154483 154484 154485 154486 154487 154488 154489 154490 154491 154492 154493 154494 154495 154496 154497 154498 154499 154500 154501 154502 154503 154504 154505 154506 154507 154508 154509 154510 154511 154512 154513 154514 154515 154516 154517 154518 154519 154520 154521 154522 154523 154524 154525 154526 154527 154528 154529 154530 154531 154532 154533 154534 154535 154536 154537 154538 154539 154540 154541 154542 154543 154544 154545 154546 154547 154548 154549 154550 154551 154552 154553 154554 154555 154556 154557 154558 154559 154560 154561 154562 154563 154564 154565 154566 154567 154568 154569 154570 154571 154572 154573 154574 154575 154576 154577 154578 154579 154580 154581 154582 154583 154584 154585 154586 154587 154588 154589 154590 154591 154592 154593 154594 154595 154596 154597 154598 154599 154600 154601 154602 154603 154604 154605 154606 154607 154608 154609 154610 154611 154612 154613 154614 154615 154616 154617 154618 154619 154620 154621 154622 154623 154624 154625 154626 154627 154628 154629 154630 154631 154632 154633 154634 154635 154636 154637 154638 154639 154640 154641 154642 154643 154644 154645 154646 154647 154648 154649 154650 154651 154652 154653 154654 154655 154656 154657 154658 154659 154660 154661 154662 154663 154664 154665 154666 154667 154668 154669 154670 154671 154672 154673 154674 154675 154676 154677 154678 154679 154680 154681 154682 154683 154684 154685 154686 154687 154688 154689 154690 154691 154692 154693 154694 154695 154696 154697 154698 154699 154700 154701 154702 154703 154704 154705 154706 154707 154708 154709 154710 154711 154712 154713 154714 154715 154716 154717 154718 154719 154720 154721 154722 154723 154724 154725 154726 154727 154728 154729 154730 154731 154732 154733 154734 154735 154736 154737 154738 154739 154740 154741 154742 154743 154744 154745 154746 154747 154748 154749 154750 154751 154752 154753 154754 154755 154756 154757 154758 154759 154760 154761 154762 154763 154764 154765 154766 154767 154768 154769 154770 154771 154772 154773 154774 154775 154776 154777 154778 154779 154780 154781 154782 154783 154784 154785 154786 154787 154788 154789 154790 154791 154792 154793 154794 154795 154796 154797 154798 154799 154800 154801 154802 154803 154804 154805 154806 154807 154808 154809 154810 154811 154812 154813 154814 154815 154816 154817 154818 154819 154820 154821 154822 154823 154824 154825 154826 154827 154828 154829 154830 154831 154832 154833 154834 154835 154836 154837 154838 154839 154840 154841 154842 154843 154844 154845 154846 154847 154848 154849 154850 154851 154852 154853 154854 154855 154856 154857 154858 154859 154860 154861 154862 154863 154864 154865 154866 154867 154868 154869 154870 154871 154872 154873 154874 154875 154876 154877 154878 154879 154880 154881 154882 154883 154884 154885 154886 154887 154888 154889 154890 154891 154892 154893 154894 154895 154896 154897 154898 154899 154900 154901 154902 154903 154904 154905 154906 154907 154908 154909 154910 154911 154912 154913 154914 154915 154916 154917 154918 154919 154920 154921 154922 154923 154924 154925 154926 154927 154928 154929 154930 154931 154932 154933 154934 154935 154936 154937 154938 154939 154940 154941 154942 154943 154944 154945 154946 154947 154948 154949 154950 154951 154952 154953 154954 154955 154956 154957 154958 154959 154960 154961 154962 154963 154964 154965 154966 154967 154968 154969 154970 154971 154972 154973 154974 154975 154976 154977 154978 154979 154980 154981 154982 154983 154984 154985 154986 154987 154988 154989 154990 154991 154992 154993 154994 154995 154996 154997 154998 154999 155000 155001 155002 155003 155004 155005 155006 155007 155008 155009 155010 155011 155012 155013 155014 155015 155016 155017 155018 155019 155020 155021 155022 155023 155024 155025 155026 155027 155028 155029 155030 155031 155032 155033 155034 155035 155036 155037 155038 155039 155040 155041 155042 155043 155044 155045 155046 155047 155048 155049 155050 155051 155052 155053 155054 155055 155056 155057 155058 155059 155060 155061 155062 155063 155064 155065 155066 155067 155068 155069 155070 155071 155072 155073 155074 155075 155076 155077 155078 155079 155080 155081 155082 155083 155084 155085 155086 155087 155088 155089 155090 155091 155092 155093 155094 155095 155096 155097 155098 155099 155100 155101 155102 155103 155104 155105 155106 155107 155108 155109 155110 155111 155112 155113 155114 155115 155116 155117 155118 155119 155120 155121 155122 155123 155124 155125 155126 155127 155128 155129 155130 155131 155132 155133 155134 155135 155136 155137 155138 155139 155140 155141 155142 155143 155144 155145 155146 155147 155148 155149 155150 155151 155152 155153 155154 155155 155156 155157 155158 155159 155160 155161 155162 155163 155164 155165 155166 155167 155168 155169 155170 155171 155172 155173 155174 155175 155176 155177 155178 155179 155180 155181 155182 155183 155184 155185 155186 155187 155188 155189 155190 155191 155192 155193 155194 155195 155196 155197 155198 155199 155200 155201 155202 155203 155204 155205 155206 155207 155208 155209 155210 155211 155212 155213 155214 155215 155216 155217 155218 155219 155220 155221 155222 155223 155224 155225 155226 155227 155228 155229 155230 155231 155232 155233 155234 155235 155236 155237 155238 155239 155240 155241 155242 155243 155244 155245 155246 155247 155248 155249 155250 155251 155252 155253 155254 155255 155256 155257 155258 155259 155260 155261 155262 155263 155264 155265 155266 155267 155268 155269 155270 155271 155272 155273 155274 155275 155276 155277 155278 155279 155280 155281 155282 155283 155284 155285 155286 155287 155288 155289 155290 155291 155292 155293 155294 155295 155296 155297 155298 155299 155300 155301 155302 155303 155304 155305 155306 155307 155308 155309 155310 155311 155312 155313 155314 155315 155316 155317 155318 155319 155320 155321 155322 155323 155324 155325 155326 155327 155328 155329 155330 155331 155332 155333 155334 155335 155336 155337 155338 155339 155340 155341 155342 155343 155344 155345 155346 155347 155348 155349 155350 155351 155352 155353 155354 155355 155356 155357 155358 155359 155360 155361 155362 155363 155364 155365 155366 155367 155368 155369 155370 155371 155372 155373 155374 155375 155376 155377 155378 155379 155380 155381 155382 155383 155384 155385 155386 155387 155388 155389 155390 155391 155392 155393 155394 155395 155396 155397 155398 155399 155400 155401 155402 155403 155404 155405 155406 155407 155408 155409 155410 155411 155412 155413 155414 155415 155416 155417 155418 155419 155420 155421 155422 155423 155424 155425 155426 155427 155428 155429 155430 155431 155432 155433 155434 155435 155436 155437 155438 155439 155440 155441 155442 155443 155444 155445 155446 155447 155448 155449 155450 155451 155452 155453 155454 155455 155456 155457 155458 155459 155460 155461 155462 155463 155464 155465 155466 155467 155468 155469 155470 155471 155472 155473 155474 155475 155476 155477 155478 155479 155480 155481 155482 155483 155484 155485 155486 155487 155488 155489 155490 155491 155492 155493 155494 155495 155496 155497 155498 155499 155500 155501 155502 155503 155504 155505 155506 155507 155508 155509 155510 155511 155512 155513 155514 155515 155516 155517 155518 155519 155520 155521 155522 155523 155524 155525 155526 155527 155528 155529 155530 155531 155532 155533 155534 155535 155536 155537 155538 155539 155540 155541 155542 155543 155544 155545 155546 155547 155548 155549 155550 155551 155552 155553 155554 155555 155556 155557 155558 155559 155560 155561 155562 155563 155564 155565 155566 155567 155568 155569 155570 155571 155572 155573 155574 155575 155576 155577 155578 155579 155580 155581 155582 155583 155584 155585 155586 155587 155588 155589 155590 155591 155592 155593 155594 155595 155596 155597 155598 155599 155600 155601 155602 155603 155604 155605 155606 155607 155608 155609 155610 155611 155612 155613 155614 155615 155616 155617 155618 155619 155620 155621 155622 155623 155624 155625 155626 155627 155628 155629 155630 155631 155632 155633 155634 155635 155636 155637 155638 155639 155640 155641 155642 155643 155644 155645 155646 155647 155648 155649 155650 155651 155652 155653 155654 155655 155656 155657 155658 155659 155660 155661 155662 155663 155664 155665 155666 155667 155668 155669 155670 155671 155672 155673 155674 155675 155676 155677 155678 155679 155680 155681 155682 155683 155684 155685 155686 155687 155688 155689 155690 155691 155692 155693 155694 155695 155696 155697 155698 155699 155700 155701 155702 155703 155704 155705 155706 155707 155708 155709 155710 155711 155712 155713 155714 155715 155716 155717 155718 155719 155720 155721 155722 155723 155724 155725 155726 155727 155728 155729 155730 155731 155732 155733 155734 155735 155736 155737 155738 155739 155740 155741 155742 155743 155744 155745 155746 155747 155748 155749 155750 155751 155752 155753 155754 155755 155756 155757 155758 155759 155760 155761 155762 155763 155764 155765 155766 155767 155768 155769 155770 155771 155772 155773 155774 155775 155776 155777 155778 155779 155780 155781 155782 155783 155784 155785 155786 155787 155788 155789 155790 155791 155792 155793 155794 155795 155796 155797 155798 155799 155800 155801 155802 155803 155804 155805 155806 155807 155808 155809 155810 155811 155812 155813 155814 155815 155816 155817 155818 155819 155820 155821 155822 155823 155824 155825 155826 155827 155828 155829 155830 155831 155832 155833 155834 155835 155836 155837 155838 155839 155840 155841 155842 155843 155844 155845 155846 155847 155848 155849 155850 155851 155852 155853 155854 155855 155856 155857 155858 155859 155860 155861 155862 155863 155864 155865 155866 155867 155868 155869 155870 155871 155872 155873 155874 155875 155876 155877 155878 155879 155880 155881 155882 155883 155884 155885 155886 155887 155888 155889 155890 155891 155892 155893 155894 155895 155896 155897 155898 155899 155900 155901 155902 155903 155904 155905 155906 155907 155908 155909 155910 155911 155912 155913 155914 155915 155916 155917 155918 155919 155920 155921 155922 155923 155924 155925 155926 155927 155928 155929 155930 155931 155932 155933 155934 155935 155936 155937 155938 155939 155940 155941 155942 155943 155944 155945 155946 155947 155948 155949 155950 155951 155952 155953 155954 155955 155956 155957 155958 155959 155960 155961 155962 155963 155964 155965 155966 155967 155968 155969 155970 155971 155972 155973 155974 155975 155976 155977 155978 155979 155980 155981 155982 155983 155984 155985 155986 155987 155988 155989 155990 155991 155992 155993 155994 155995 155996 155997 155998 155999 156000 156001 156002 156003 156004 156005 156006 156007 156008 156009 156010 156011 156012 156013 156014 156015 156016 156017 156018 156019 156020 156021 156022 156023 156024 156025 156026 156027 156028 156029 156030 156031 156032 156033 156034 156035 156036 156037 156038 156039 156040 156041 156042 156043 156044 156045 156046 156047 156048 156049 156050 156051 156052 156053 156054 156055 156056 156057 156058 156059 156060 156061 156062 156063 156064 156065 156066 156067 156068 156069 156070 156071 156072 156073 156074 156075 156076 156077 156078 156079 156080 156081 156082 156083 156084 156085 156086 156087 156088 156089 156090 156091 156092 156093 156094 156095 156096 156097 156098 156099 156100 156101 156102 156103 156104 156105 156106 156107 156108 156109 156110 156111 156112 156113 156114 156115 156116 156117 156118 156119 156120 156121 156122 156123 156124 156125 156126 156127 156128 156129 156130 156131 156132 156133 156134 156135 156136 156137 156138 156139 156140 156141 156142 156143 156144 156145 156146 156147 156148 156149 156150 156151 156152 156153 156154 156155 156156 156157 156158 156159 156160 156161 156162 156163 156164 156165 156166 156167 156168 156169 156170 156171 156172 156173 156174 156175 156176 156177 156178 156179 156180 156181 156182 156183 156184 156185 156186 156187 156188 156189 156190 156191 156192 156193 156194 156195 156196 156197 156198 156199 156200 156201 156202 156203 156204 156205 156206 156207 156208 156209 156210 156211 156212 156213 156214 156215 156216 156217 156218 156219 156220 156221 156222 156223 156224 156225 156226 156227 156228 156229 156230 156231 156232 156233 156234 156235 156236 156237 156238 156239 156240 156241 156242 156243 156244 156245 156246 156247 156248 156249 156250 156251 156252 156253 156254 156255 156256 156257 156258 156259 156260 156261 156262 156263 156264 156265 156266 156267 156268 156269 156270 156271 156272 156273 156274 156275 156276 156277 156278 156279 156280 156281 156282 156283 156284 156285 156286 156287 156288 156289 156290 156291 156292 156293 156294 156295 156296 156297 156298 156299 156300 156301 156302 156303 156304 156305 156306 156307 156308 156309 156310 156311 156312 156313 156314 156315 156316 156317 156318 156319 156320 156321 156322 156323 156324 156325 156326 156327 156328 156329 156330 156331 156332 156333 156334 156335 156336 156337 156338 156339 156340 156341 156342 156343 156344 156345 156346 156347 156348 156349 156350 156351 156352 156353 156354 156355 156356 156357 156358 156359 156360 156361 156362 156363 156364 156365 156366 156367 156368 156369 156370 156371 156372 156373 156374 156375 156376 156377 156378 156379 156380 156381 156382 156383 156384 156385 156386 156387 156388 156389 156390 156391 156392 156393 156394 156395 156396 156397 156398 156399 156400 156401 156402 156403 156404 156405 156406 156407 156408 156409 156410 156411 156412 156413 156414 156415 156416 156417 156418 156419 156420 156421 156422 156423 156424 156425 156426 156427 156428 156429 156430 156431 156432 156433 156434 156435 156436 156437 156438 156439 156440 156441 156442 156443 156444 156445 156446 156447 156448 156449 156450 156451 156452 156453 156454 156455 156456 156457 156458 156459 156460 156461 156462 156463 156464 156465 156466 156467 156468 156469 156470 156471 156472 156473 156474 156475 156476 156477 156478 156479 156480 156481 156482 156483 156484 156485 156486 156487 156488 156489 156490 156491 156492 156493 156494 156495 156496 156497 156498 156499 156500 156501 156502 156503 156504 156505 156506 156507 156508 156509 156510 156511 156512 156513 156514 156515 156516 156517 156518 156519 156520 156521 156522 156523 156524 156525 156526 156527 156528 156529 156530 156531 156532 156533 156534 156535 156536 156537 156538 156539 156540 156541 156542 156543 156544 156545 156546 156547 156548 156549 156550 156551 156552 156553 156554 156555 156556 156557 156558 156559 156560 156561 156562 156563 156564 156565 156566 156567 156568 156569 156570 156571 156572 156573 156574 156575 156576 156577 156578 156579 156580 156581 156582 156583 156584 156585 156586 156587 156588 156589 156590 156591 156592 156593 156594 156595 156596 156597 156598 156599 156600 156601 156602 156603 156604 156605 156606 156607 156608 156609 156610 156611 156612 156613 156614 156615 156616 156617 156618 156619 156620 156621 156622 156623 156624 156625 156626 156627 156628 156629 156630 156631 156632 156633 156634 156635 156636 156637 156638 156639 156640 156641 156642 156643 156644 156645 156646 156647 156648 156649 156650 156651 156652 156653 156654 156655 156656 156657 156658 156659 156660 156661 156662 156663 156664 156665 156666 156667 156668 156669 156670 156671 156672 156673 156674 156675 156676 156677 156678 156679 156680 156681 156682 156683 156684 156685 156686 156687 156688 156689 156690 156691 156692 156693 156694 156695 156696 156697 156698 156699 156700 156701 156702 156703 156704 156705 156706 156707 156708 156709 156710 156711 156712 156713 156714 156715 156716 156717 156718 156719 156720 156721 156722 156723 156724 156725 156726 156727 156728 156729 156730 156731 156732 156733 156734 156735 156736 156737 156738 156739 156740 156741 156742 156743 156744 156745 156746 156747 156748 156749 156750 156751 156752 156753 156754 156755 156756 156757 156758 156759 156760 156761 156762 156763 156764 156765 156766 156767 156768 156769 156770 156771 156772 156773 156774 156775 156776 156777 156778 156779 156780 156781 156782 156783 156784 156785 156786 156787 156788 156789 156790 156791 156792 156793 156794 156795 156796 156797 156798 156799 156800 156801 156802 156803 156804 156805 156806 156807 156808 156809 156810 156811 156812 156813 156814 156815 156816 156817 156818 156819 156820 156821 156822 156823 156824 156825 156826 156827 156828 156829 156830 156831 156832 156833 156834 156835 156836 156837 156838 156839 156840 156841 156842 156843 156844 156845 156846 156847 156848 156849 156850 156851 156852 156853 156854 156855 156856 156857 156858 156859 156860 156861 156862 156863 156864 156865 156866 156867 156868 156869 156870 156871 156872 156873 156874 156875 156876 156877 156878 156879 156880 156881 156882 156883 156884 156885 156886 156887 156888 156889 156890 156891 156892 156893 156894 156895 156896 156897 156898 156899 156900 156901 156902 156903 156904 156905 156906 156907 156908 156909 156910 156911 156912 156913 156914 156915 156916 156917 156918 156919 156920 156921 156922 156923 156924 156925 156926 156927 156928 156929 156930 156931 156932 156933 156934 156935 156936 156937 156938 156939 156940 156941 156942 156943 156944 156945 156946 156947 156948 156949 156950 156951 156952 156953 156954 156955 156956 156957 156958 156959 156960 156961 156962 156963 156964 156965 156966 156967 156968 156969 156970 156971 156972 156973 156974 156975 156976 156977 156978 156979 156980 156981 156982 156983 156984 156985 156986 156987 156988 156989 156990 156991 156992 156993 156994 156995 156996 156997 156998 156999 157000 157001 157002 157003 157004 157005 157006 157007 157008 157009 157010 157011 157012 157013 157014 157015 157016 157017 157018 157019 157020 157021 157022 157023 157024 157025 157026 157027 157028 157029 157030 157031 157032 157033 157034 157035 157036 157037 157038 157039 157040 157041 157042 157043 157044 157045 157046 157047 157048 157049 157050 157051 157052 157053 157054 157055 157056 157057 157058 157059 157060 157061 157062 157063 157064 157065 157066 157067 157068 157069 157070 157071 157072 157073 157074 157075 157076 157077 157078 157079 157080 157081 157082 157083 157084 157085 157086 157087 157088 157089 157090 157091 157092 157093 157094 157095 157096 157097 157098 157099 157100 157101 157102 157103 157104 157105 157106 157107 157108 157109 157110 157111 157112 157113 157114 157115 157116 157117 157118 157119 157120 157121 157122 157123 157124 157125 157126 157127 157128 157129 157130 157131 157132 157133 157134 157135 157136 157137 157138 157139 157140 157141 157142 157143 157144 157145 157146 157147 157148 157149 157150 157151 157152 157153 157154 157155 157156 157157 157158 157159 157160 157161 157162 157163 157164 157165 157166 157167 157168 157169 157170 157171 157172 157173 157174 157175 157176 157177 157178 157179 157180 157181 157182 157183 157184 157185 157186 157187 157188 157189 157190 157191 157192 157193 157194 157195 157196 157197 157198 157199 157200 157201 157202 157203 157204 157205 157206 157207 157208 157209 157210 157211 157212 157213 157214 157215 157216 157217 157218 157219 157220 157221 157222 157223 157224 157225 157226 157227 157228 157229 157230 157231 157232 157233 157234 157235 157236 157237 157238 157239 157240 157241 157242 157243 157244 157245 157246 157247 157248 157249 157250 157251 157252 157253 157254 157255 157256 157257 157258 157259 157260 157261 157262 157263 157264 157265 157266 157267 157268 157269 157270 157271 157272 157273 157274 157275 157276 157277 157278 157279 157280 157281 157282 157283 157284 157285 157286 157287 157288 157289 157290 157291 157292 157293 157294 157295 157296 157297 157298 157299 157300 157301 157302 157303 157304 157305 157306 157307 157308 157309 157310 157311 157312 157313 157314 157315 157316 157317 157318 157319 157320 157321 157322 157323 157324 157325 157326 157327 157328 157329 157330 157331 157332 157333 157334 157335 157336 157337 157338 157339 157340 157341 157342 157343 157344 157345 157346 157347 157348 157349 157350 157351 157352 157353 157354 157355 157356 157357 157358 157359 157360 157361 157362 157363 157364 157365 157366 157367 157368 157369 157370 157371 157372 157373 157374 157375 157376 157377 157378 157379 157380 157381 157382 157383 157384 157385 157386 157387 157388 157389 157390 157391 157392 157393 157394 157395 157396 157397 157398 157399 157400 157401 157402 157403 157404 157405 157406 157407 157408 157409 157410 157411 157412 157413 157414 157415 157416 157417 157418 157419 157420 157421 157422 157423 157424 157425 157426 157427 157428 157429 157430 157431 157432 157433 157434 157435 157436 157437 157438 157439 157440 157441 157442 157443 157444 157445 157446 157447 157448 157449 157450 157451 157452 157453 157454 157455 157456 157457 157458 157459 157460 157461 157462 157463 157464 157465 157466 157467 157468 157469 157470 157471 157472 157473 157474 157475 157476 157477 157478 157479 157480 157481 157482 157483 157484 157485 157486 157487 157488 157489 157490 157491 157492 157493 157494 157495 157496 157497 157498 157499 157500 157501 157502 157503 157504 157505 157506 157507 157508 157509 157510 157511 157512 157513 157514 157515 157516 157517 157518 157519 157520 157521 157522 157523 157524 157525 157526 157527 157528 157529 157530 157531 157532 157533 157534 157535 157536 157537 157538 157539 157540 157541 157542 157543 157544 157545 157546 157547 157548 157549 157550 157551 157552 157553 157554 157555 157556 157557 157558 157559 157560 157561 157562 157563 157564 157565 157566 157567 157568 157569 157570 157571 157572 157573 157574 157575 157576 157577 157578 157579 157580 157581 157582 157583 157584 157585 157586 157587 157588 157589 157590 157591 157592 157593 157594 157595 157596 157597 157598 157599 157600 157601 157602 157603 157604 157605 157606 157607 157608 157609 157610 157611 157612 157613 157614 157615 157616 157617 157618 157619 157620 157621 157622 157623 157624 157625 157626 157627 157628 157629 157630 157631 157632 157633 157634 157635 157636 157637 157638 157639 157640 157641 157642 157643 157644 157645 157646 157647 157648 157649 157650 157651 157652 157653 157654 157655 157656 157657 157658 157659 157660 157661 157662 157663 157664 157665 157666 157667 157668 157669 157670 157671 157672 157673 157674 157675 157676 157677 157678 157679 157680 157681 157682 157683 157684 157685 157686 157687 157688 157689 157690 157691 157692 157693 157694 157695 157696 157697 157698 157699 157700 157701 157702 157703 157704 157705 157706 157707 157708 157709 157710 157711 157712 157713 157714 157715 157716 157717 157718 157719 157720 157721 157722 157723 157724 157725 157726 157727 157728 157729 157730 157731 157732 157733 157734 157735 157736 157737 157738 157739 157740 157741 157742 157743 157744 157745 157746 157747 157748 157749 157750 157751 157752 157753 157754 157755 157756 157757 157758 157759 157760 157761 157762 157763 157764 157765 157766 157767 157768 157769 157770 157771 157772 157773 157774 157775 157776 157777 157778 157779 157780 157781 157782 157783 157784 157785 157786 157787 157788 157789 157790 157791 157792 157793 157794 157795 157796 157797 157798 157799 157800 157801 157802 157803 157804 157805 157806 157807 157808 157809 157810 157811 157812 157813 157814 157815 157816 157817 157818 157819 157820 157821 157822 157823 157824 157825 157826 157827 157828 157829 157830 157831 157832 157833 157834 157835 157836 157837 157838 157839 157840 157841 157842 157843 157844 157845 157846 157847 157848 157849 157850 157851 157852 157853 157854 157855 157856 157857 157858 157859 157860 157861 157862 157863 157864 157865 157866 157867 157868 157869 157870 157871 157872 157873 157874 157875 157876 157877 157878 157879 157880 157881 157882 157883 157884 157885 157886 157887 157888 157889 157890 157891 157892 157893 157894 157895 157896 157897 157898 157899 157900 157901 157902 157903 157904 157905 157906 157907 157908 157909 157910 157911 157912 157913 157914 157915 157916 157917 157918 157919 157920 157921 157922 157923 157924 157925 157926 157927 157928 157929 157930 157931 157932 157933 157934 157935 157936 157937 157938 157939 157940 157941 157942 157943 157944 157945 157946 157947 157948 157949 157950 157951 157952 157953 157954 157955 157956 157957 157958 157959 157960 157961 157962 157963 157964 157965 157966 157967 157968 157969 157970 157971 157972 157973 157974 157975 157976 157977 157978 157979 157980 157981 157982 157983 157984 157985 157986 157987 157988 157989 157990 157991 157992 157993 157994 157995 157996 157997 157998 157999 158000 158001 158002 158003 158004 158005 158006 158007 158008 158009 158010 158011 158012 158013 158014 158015 158016 158017 158018 158019 158020 158021 158022 158023 158024 158025 158026 158027 158028 158029 158030 158031 158032 158033 158034 158035 158036 158037 158038 158039 158040 158041 158042 158043 158044 158045 158046 158047 158048 158049 158050 158051 158052 158053 158054 158055 158056 158057 158058 158059 158060 158061 158062 158063 158064 158065 158066 158067 158068 158069 158070 158071 158072 158073 158074 158075 158076 158077 158078 158079 158080 158081 158082 158083 158084 158085 158086 158087 158088 158089 158090 158091 158092 158093 158094 158095 158096 158097 158098 158099 158100 158101 158102 158103 158104 158105 158106 158107 158108 158109 158110 158111 158112 158113 158114 158115 158116 158117 158118 158119 158120 158121 158122 158123 158124 158125 158126 158127 158128 158129 158130 158131 158132 158133 158134 158135 158136 158137 158138 158139 158140 158141 158142 158143 158144 158145 158146 158147 158148 158149 158150 158151 158152 158153 158154 158155 158156 158157 158158 158159 158160 158161 158162 158163 158164 158165 158166 158167 158168 158169 158170 158171 158172 158173 158174 158175 158176 158177 158178 158179 158180 158181 158182 158183 158184 158185 158186 158187 158188 158189 158190 158191 158192 158193 158194 158195 158196 158197 158198 158199 158200 158201 158202 158203 158204 158205 158206 158207 158208 158209 158210 158211 158212 158213 158214 158215 158216 158217 158218 158219 158220 158221 158222 158223 158224 158225 158226 158227 158228 158229 158230 158231 158232 158233 158234 158235 158236 158237 158238 158239 158240 158241 158242 158243 158244 158245 158246 158247 158248 158249 158250 158251 158252 158253 158254 158255 158256 158257 158258 158259 158260 158261 158262 158263 158264 158265 158266 158267 158268 158269 158270 158271 158272 158273 158274 158275 158276 158277 158278 158279 158280 158281 158282 158283 158284 158285 158286 158287 158288 158289 158290 158291 158292 158293 158294 158295 158296 158297 158298 158299 158300 158301 158302 158303 158304 158305 158306 158307 158308 158309 158310 158311 158312 158313 158314 158315 158316 158317 158318 158319 158320 158321 158322 158323 158324 158325 158326 158327 158328 158329 158330 158331 158332 158333 158334 158335 158336 158337 158338 158339 158340 158341 158342 158343 158344 158345 158346 158347 158348 158349 158350 158351 158352 158353 158354 158355 158356 158357 158358 158359 158360 158361 158362 158363 158364 158365 158366 158367 158368 158369 158370 158371 158372 158373 158374 158375 158376 158377 158378 158379 158380 158381 158382 158383 158384 158385 158386 158387 158388 158389 158390 158391 158392 158393 158394 158395 158396 158397 158398 158399 158400 158401 158402 158403 158404 158405 158406 158407 158408 158409 158410 158411 158412 158413 158414 158415 158416 158417 158418 158419 158420 158421 158422 158423 158424 158425 158426 158427 158428 158429 158430 158431 158432 158433 158434 158435 158436 158437 158438 158439 158440 158441 158442 158443 158444 158445 158446 158447 158448 158449 158450 158451 158452 158453 158454 158455 158456 158457 158458 158459 158460 158461 158462 158463 158464 158465 158466 158467 158468 158469 158470 158471 158472 158473 158474 158475 158476 158477 158478 158479 158480 158481 158482 158483 158484 158485 158486 158487 158488 158489 158490 158491 158492 158493 158494 158495 158496 158497 158498 158499 158500 158501 158502 158503 158504 158505 158506 158507 158508 158509 158510 158511 158512 158513 158514 158515 158516 158517 158518 158519 158520 158521 158522 158523 158524 158525 158526 158527 158528 158529 158530 158531 158532 158533 158534 158535 158536 158537 158538 158539 158540 158541 158542 158543 158544 158545 158546 158547 158548 158549 158550 158551 158552 158553 158554 158555 158556 158557 158558 158559 158560 158561 158562 158563 158564 158565 158566 158567 158568 158569 158570 158571 158572 158573 158574 158575 158576 158577 158578 158579 158580 158581 158582 158583 158584 158585 158586 158587 158588 158589 158590 158591 158592 158593 158594 158595 158596 158597 158598 158599 158600 158601 158602 158603 158604 158605 158606 158607 158608 158609 158610 158611 158612 158613 158614 158615 158616 158617 158618 158619 158620 158621 158622 158623 158624 158625 158626 158627 158628 158629 158630 158631 158632 158633 158634 158635 158636 158637 158638 158639 158640 158641 158642 158643 158644 158645 158646 158647 158648 158649 158650 158651 158652 158653 158654 158655 158656 158657 158658 158659 158660 158661 158662 158663 158664 158665 158666 158667 158668 158669 158670 158671 158672 158673 158674 158675 158676 158677 158678 158679 158680 158681 158682 158683 158684 158685 158686 158687 158688 158689 158690 158691 158692 158693 158694 158695 158696 158697 158698 158699 158700 158701 158702 158703 158704 158705 158706 158707 158708 158709 158710 158711 158712 158713 158714 158715 158716 158717 158718 158719 158720 158721 158722 158723 158724 158725 158726 158727 158728 158729 158730 158731 158732 158733 158734 158735 158736 158737 158738 158739 158740 158741 158742 158743 158744 158745 158746 158747 158748 158749 158750 158751 158752 158753 158754 158755 158756 158757 158758 158759 158760 158761 158762 158763 158764 158765 158766 158767 158768 158769 158770 158771 158772 158773 158774 158775 158776 158777 158778 158779 158780 158781 158782 158783 158784 158785 158786 158787 158788 158789 158790 158791 158792 158793 158794 158795 158796 158797 158798 158799 158800 158801 158802 158803 158804 158805 158806 158807 158808 158809 158810 158811 158812 158813 158814 158815 158816 158817 158818 158819 158820 158821 158822 158823 158824 158825 158826 158827 158828 158829 158830 158831 158832 158833 158834 158835 158836 158837 158838 158839 158840 158841 158842 158843 158844 158845 158846 158847 158848 158849 158850 158851 158852 158853 158854 158855 158856 158857 158858 158859 158860 158861 158862 158863 158864 158865 158866 158867 158868 158869 158870 158871 158872 158873 158874 158875 158876 158877 158878 158879 158880 158881 158882 158883 158884 158885 158886 158887 158888 158889 158890 158891 158892 158893 158894 158895 158896 158897 158898 158899 158900 158901 158902 158903 158904 158905 158906 158907 158908 158909 158910 158911 158912 158913 158914 158915 158916 158917 158918 158919 158920 158921 158922 158923 158924 158925 158926 158927 158928 158929 158930 158931 158932 158933 158934 158935 158936 158937 158938 158939 158940 158941 158942 158943 158944 158945 158946 158947 158948 158949 158950 158951 158952 158953 158954 158955 158956 158957 158958 158959 158960 158961 158962 158963 158964 158965 158966 158967 158968 158969 158970 158971 158972 158973 158974 158975 158976 158977 158978 158979 158980 158981 158982 158983 158984 158985 158986 158987 158988 158989 158990 158991 158992 158993 158994 158995 158996 158997 158998 158999 159000 159001 159002 159003 159004 159005 159006 159007 159008 159009 159010 159011 159012 159013 159014 159015 159016 159017 159018 159019 159020 159021 159022 159023 159024 159025 159026 159027 159028 159029 159030 159031 159032 159033 159034 159035 159036 159037 159038 159039 159040 159041 159042 159043 159044 159045 159046 159047 159048 159049 159050 159051 159052 159053 159054 159055 159056 159057 159058 159059 159060 159061 159062 159063 159064 159065 159066 159067 159068 159069 159070 159071 159072 159073 159074 159075 159076 159077 159078 159079 159080 159081 159082 159083 159084 159085 159086 159087 159088 159089 159090 159091 159092 159093 159094 159095 159096 159097 159098 159099 159100 159101 159102 159103 159104 159105 159106 159107 159108 159109 159110 159111 159112 159113 159114 159115 159116 159117 159118 159119 159120 159121 159122 159123 159124 159125 159126 159127 159128 159129 159130 159131 159132 159133 159134 159135 159136 159137 159138 159139 159140 159141 159142 159143 159144 159145 159146 159147 159148 159149 159150 159151 159152 159153 159154 159155 159156 159157 159158 159159 159160 159161 159162 159163 159164 159165 159166 159167 159168 159169 159170 159171 159172 159173 159174 159175 159176 159177 159178 159179 159180 159181 159182 159183 159184 159185 159186 159187 159188 159189 159190 159191 159192 159193 159194 159195 159196 159197 159198 159199 159200 159201 159202 159203 159204 159205 159206 159207 159208 159209 159210 159211 159212 159213 159214 159215 159216 159217 159218 159219 159220 159221 159222 159223 159224 159225 159226 159227 159228 159229 159230 159231 159232 159233 159234 159235 159236 159237 159238 159239 159240 159241 159242 159243 159244 159245 159246 159247 159248 159249 159250 159251 159252 159253 159254 159255 159256 159257 159258 159259 159260 159261 159262 159263 159264 159265 159266 159267 159268 159269 159270 159271 159272 159273 159274 159275 159276 159277 159278 159279 159280 159281 159282 159283 159284 159285 159286 159287 159288 159289 159290 159291 159292 159293 159294 159295 159296 159297 159298 159299 159300 159301 159302 159303 159304 159305 159306 159307 159308 159309 159310 159311 159312 159313 159314 159315 159316 159317 159318 159319 159320 159321 159322 159323 159324 159325 159326 159327 159328 159329 159330 159331 159332 159333 159334 159335 159336 159337 159338 159339 159340 159341 159342 159343 159344 159345 159346 159347 159348 159349 159350 159351 159352 159353 159354 159355 159356 159357 159358 159359 159360 159361 159362 159363 159364 159365 159366 159367 159368 159369 159370 159371 159372 159373 159374 159375 159376 159377 159378 159379 159380 159381 159382 159383 159384 159385 159386 159387 159388 159389 159390 159391 159392 159393 159394 159395 159396 159397 159398 159399 159400 159401 159402 159403 159404 159405 159406 159407 159408 159409 159410 159411 159412 159413 159414 159415 159416 159417 159418 159419 159420 159421 159422 159423 159424 159425 159426 159427 159428 159429 159430 159431 159432 159433 159434 159435 159436 159437 159438 159439 159440 159441 159442 159443 159444 159445 159446 159447 159448 159449 159450 159451 159452 159453 159454 159455 159456 159457 159458 159459 159460 159461 159462 159463 159464 159465 159466 159467 159468 159469 159470 159471 159472 159473 159474 159475 159476 159477 159478 159479 159480 159481 159482 159483 159484 159485 159486 159487 159488 159489 159490 159491 159492 159493 159494 159495 159496 159497 159498 159499 159500 159501 159502 159503 159504 159505 159506 159507 159508 159509 159510 159511 159512 159513 159514 159515 159516 159517 159518 159519 159520 159521 159522 159523 159524 159525 159526 159527 159528 159529 159530 159531 159532 159533 159534 159535 159536 159537 159538 159539 159540 159541 159542 159543 159544 159545 159546 159547 159548 159549 159550 159551 159552 159553 159554 159555 159556 159557 159558 159559 159560 159561 159562 159563 159564 159565 159566 159567 159568 159569 159570 159571 159572 159573 159574 159575 159576 159577 159578 159579 159580 159581 159582 159583 159584 159585 159586 159587 159588 159589 159590 159591 159592 159593 159594 159595 159596 159597 159598 159599 159600 159601 159602 159603 159604 159605 159606 159607 159608 159609 159610 159611 159612 159613 159614 159615 159616 159617 159618 159619 159620 159621 159622 159623 159624 159625 159626 159627 159628 159629 159630 159631 159632 159633 159634 159635 159636 159637 159638 159639 159640 159641 159642 159643 159644 159645 159646 159647 159648 159649 159650 159651 159652 159653 159654 159655 159656 159657 159658 159659 159660 159661 159662 159663 159664 159665 159666 159667 159668 159669 159670 159671 159672 159673 159674 159675 159676 159677 159678 159679 159680 159681 159682 159683 159684 159685 159686 159687 159688 159689 159690 159691 159692 159693 159694 159695 159696 159697 159698 159699 159700 159701 159702 159703 159704 159705 159706 159707 159708 159709 159710 159711 159712 159713 159714 159715 159716 159717 159718 159719 159720 159721 159722 159723 159724 159725 159726 159727 159728 159729 159730 159731 159732 159733 159734 159735 159736 159737 159738 159739 159740 159741 159742 159743 159744 159745 159746 159747 159748 159749 159750 159751 159752 159753 159754 159755 159756 159757 159758 159759 159760 159761 159762 159763 159764 159765 159766 159767 159768 159769 159770 159771 159772 159773 159774 159775 159776 159777 159778 159779 159780 159781 159782 159783 159784 159785 159786 159787 159788 159789 159790 159791 159792 159793 159794 159795 159796 159797 159798 159799 159800 159801 159802 159803 159804 159805 159806 159807 159808 159809 159810 159811 159812 159813 159814 159815 159816 159817 159818 159819 159820 159821 159822 159823 159824 159825 159826 159827 159828 159829 159830 159831 159832 159833 159834 159835 159836 159837 159838 159839 159840 159841 159842 159843 159844 159845 159846 159847 159848 159849 159850 159851 159852 159853 159854 159855 159856 159857 159858 159859 159860 159861 159862 159863 159864 159865 159866 159867 159868 159869 159870 159871 159872 159873 159874 159875 159876 159877 159878 159879 159880 159881 159882 159883 159884 159885 159886 159887 159888 159889 159890 159891 159892 159893 159894 159895 159896 159897 159898 159899 159900 159901 159902 159903 159904 159905 159906 159907 159908 159909 159910 159911 159912 159913 159914 159915 159916 159917 159918 159919 159920 159921 159922 159923 159924 159925 159926 159927 159928 159929 159930 159931 159932 159933 159934 159935 159936 159937 159938 159939 159940 159941 159942 159943 159944 159945 159946 159947 159948 159949 159950 159951 159952 159953 159954 159955 159956 159957 159958 159959 159960 159961 159962 159963 159964 159965 159966 159967 159968 159969 159970 159971 159972 159973 159974 159975 159976 159977 159978 159979 159980 159981 159982 159983 159984 159985 159986 159987 159988 159989 159990 159991 159992 159993 159994 159995 159996 159997 159998 159999 160000 160001 160002 160003 160004 160005 160006 160007 160008 160009 160010 160011 160012 160013 160014 160015 160016 160017 160018 160019 160020 160021 160022 160023 160024 160025 160026 160027 160028 160029 160030 160031 160032 160033 160034 160035 160036 160037 160038 160039 160040 160041 160042 160043 160044 160045 160046 160047 160048 160049 160050 160051 160052 160053 160054 160055 160056 160057 160058 160059 160060 160061 160062 160063 160064 160065 160066 160067 160068 160069 160070 160071 160072 160073 160074 160075 160076 160077 160078 160079 160080 160081 160082 160083 160084 160085 160086 160087 160088 160089 160090 160091 160092 160093 160094 160095 160096 160097 160098 160099 160100 160101 160102 160103 160104 160105 160106 160107 160108 160109 160110 160111 160112 160113 160114 160115 160116 160117 160118 160119 160120 160121 160122 160123 160124 160125 160126 160127 160128 160129 160130 160131 160132 160133 160134 160135 160136 160137 160138 160139 160140 160141 160142 160143 160144 160145 160146 160147 160148 160149 160150 160151 160152 160153 160154 160155 160156 160157 160158 160159 160160 160161 160162 160163 160164 160165 160166 160167 160168 160169 160170 160171 160172 160173 160174 160175 160176 160177 160178 160179 160180 160181 160182 160183 160184 160185 160186 160187 160188 160189 160190 160191 160192 160193 160194 160195 160196 160197 160198 160199 160200 160201 160202 160203 160204 160205 160206 160207 160208 160209 160210 160211 160212 160213 160214 160215 160216 160217 160218 160219 160220 160221 160222 160223 160224 160225 160226 160227 160228 160229 160230 160231 160232 160233 160234 160235 160236 160237 160238 160239 160240 160241 160242 160243 160244 160245 160246 160247 160248 160249 160250 160251 160252 160253 160254 160255 160256 160257 160258 160259 160260 160261 160262 160263 160264 160265 160266 160267 160268 160269 160270 160271 160272 160273 160274 160275 160276 160277 160278 160279 160280 160281 160282 160283 160284 160285 160286 160287 160288 160289 160290 160291 160292 160293 160294 160295 160296 160297 160298 160299 160300 160301 160302 160303 160304 160305 160306 160307 160308 160309 160310 160311 160312 160313 160314 160315 160316 160317 160318 160319 160320 160321 160322 160323 160324 160325 160326 160327 160328 160329 160330 160331 160332 160333 160334 160335 160336 160337 160338 160339 160340 160341 160342 160343 160344 160345 160346 160347 160348 160349 160350 160351 160352 160353 160354 160355 160356 160357 160358 160359 160360 160361 160362 160363 160364 160365 160366 160367 160368 160369 160370 160371 160372 160373 160374 160375 160376 160377 160378 160379 160380 160381 160382 160383 160384 160385 160386 160387 160388 160389 160390 160391 160392 160393 160394 160395 160396 160397 160398 160399 160400 160401 160402 160403 160404 160405 160406 160407 160408 160409 160410 160411 160412 160413 160414 160415 160416 160417 160418 160419 160420 160421 160422 160423 160424 160425 160426 160427 160428 160429 160430 160431 160432 160433 160434 160435 160436 160437 160438 160439 160440 160441 160442 160443 160444 160445 160446 160447 160448 160449 160450 160451 160452 160453 160454 160455 160456 160457 160458 160459 160460 160461 160462 160463 160464 160465 160466 160467 160468 160469 160470 160471 160472 160473 160474 160475 160476 160477 160478 160479 160480 160481 160482 160483 160484 160485 160486 160487 160488 160489 160490 160491 160492 160493 160494 160495 160496 160497 160498 160499 160500 160501 160502 160503 160504 160505 160506 160507 160508 160509 160510 160511 160512 160513 160514 160515 160516 160517 160518 160519 160520 160521 160522 160523 160524 160525 160526 160527 160528 160529 160530 160531 160532 160533 160534 160535 160536 160537 160538 160539 160540 160541 160542 160543 160544 160545 160546 160547 160548 160549 160550 160551 160552 160553 160554 160555 160556 160557 160558 160559 160560 160561 160562 160563 160564 160565 160566 160567 160568 160569 160570 160571 160572 160573 160574 160575 160576 160577 160578 160579 160580 160581 160582 160583 160584 160585 160586 160587 160588 160589 160590 160591 160592 160593 160594 160595 160596 160597 160598 160599 160600 160601 160602 160603 160604 160605 160606 160607 160608 160609 160610 160611 160612 160613 160614 160615 160616 160617 160618 160619 160620 160621 160622 160623 160624 160625 160626 160627 160628 160629 160630 160631 160632 160633 160634 160635 160636 160637 160638 160639 160640 160641 160642 160643 160644 160645 160646 160647 160648 160649 160650 160651 160652 160653 160654 160655 160656 160657 160658 160659 160660 160661 160662 160663 160664 160665 160666 160667 160668 160669 160670 160671 160672 160673 160674 160675 160676 160677 160678 160679 160680 160681 160682 160683 160684 160685 160686 160687 160688 160689 160690 160691 160692 160693 160694 160695 160696 160697 160698 160699 160700 160701 160702 160703 160704 160705 160706 160707 160708 160709 160710 160711 160712 160713 160714 160715 160716 160717 160718 160719 160720 160721 160722 160723 160724 160725 160726 160727 160728 160729 160730 160731 160732 160733 160734 160735 160736 160737 160738 160739 160740 160741 160742 160743 160744 160745 160746 160747 160748 160749 160750 160751 160752 160753 160754 160755 160756 160757 160758 160759 160760 160761 160762 160763 160764 160765 160766 160767 160768 160769 160770 160771 160772 160773 160774 160775 160776 160777 160778 160779 160780 160781 160782 160783 160784 160785 160786 160787 160788 160789 160790 160791 160792 160793 160794 160795 160796 160797 160798 160799 160800 160801 160802 160803 160804 160805 160806 160807 160808 160809 160810 160811 160812 160813 160814 160815 160816 160817 160818 160819 160820 160821 160822 160823 160824 160825 160826 160827 160828 160829 160830 160831 160832 160833 160834 160835 160836 160837 160838 160839 160840 160841 160842 160843 160844 160845 160846 160847 160848 160849 160850 160851 160852 160853 160854 160855 160856 160857 160858 160859 160860 160861 160862 160863 160864 160865 160866 160867 160868 160869 160870 160871 160872 160873 160874 160875 160876 160877 160878 160879 160880 160881 160882 160883 160884 160885 160886 160887 160888 160889 160890 160891 160892 160893 160894 160895 160896 160897 160898 160899 160900 160901 160902 160903 160904 160905 160906 160907 160908 160909 160910 160911 160912 160913 160914 160915 160916 160917 160918 160919 160920 160921 160922 160923 160924 160925 160926 160927 160928 160929 160930 160931 160932 160933 160934 160935 160936 160937 160938 160939 160940 160941 160942 160943 160944 160945 160946 160947 160948 160949 160950 160951 160952 160953 160954 160955 160956 160957 160958 160959 160960 160961 160962 160963 160964 160965 160966 160967 160968 160969 160970 160971 160972 160973 160974 160975 160976 160977 160978 160979 160980 160981 160982 160983 160984 160985 160986 160987 160988 160989 160990 160991 160992 160993 160994 160995 160996 160997 160998 160999 161000 161001 161002 161003 161004 161005 161006 161007 161008 161009 161010 161011 161012 161013 161014 161015 161016 161017 161018 161019 161020 161021 161022 161023 161024 161025 161026 161027 161028 161029 161030 161031 161032 161033 161034 161035 161036 161037 161038 161039 161040 161041 161042 161043 161044 161045 161046 161047 161048 161049 161050 161051 161052 161053 161054 161055 161056 161057 161058 161059 161060 161061 161062 161063 161064 161065 161066 161067 161068 161069 161070 161071 161072 161073 161074 161075 161076 161077 161078 161079 161080 161081 161082 161083 161084 161085 161086 161087 161088 161089 161090 161091 161092 161093 161094 161095 161096 161097 161098 161099 161100 161101 161102 161103 161104 161105 161106 161107 161108 161109 161110 161111 161112 161113 161114 161115 161116 161117 161118 161119 161120 161121 161122 161123 161124 161125 161126 161127 161128 161129 161130 161131 161132 161133 161134 161135 161136 161137 161138 161139 161140 161141 161142 161143 161144 161145 161146 161147 161148 161149 161150 161151 161152 161153 161154 161155 161156 161157 161158 161159 161160 161161 161162 161163 161164 161165 161166 161167 161168 161169 161170 161171 161172 161173 161174 161175 161176 161177 161178 161179 161180 161181 161182 161183 161184 161185 161186 161187 161188 161189 161190 161191 161192 161193 161194 161195 161196 161197 161198 161199 161200 161201 161202 161203 161204 161205 161206 161207 161208 161209 161210 161211 161212 161213 161214 161215 161216 161217 161218 161219 161220 161221 161222 161223 161224 161225 161226 161227 161228 161229 161230 161231 161232 161233 161234 161235 161236 161237 161238 161239 161240 161241 161242 161243 161244 161245 161246 161247 161248 161249 161250 161251 161252 161253 161254 161255 161256 161257 161258 161259 161260 161261 161262 161263 161264 161265 161266 161267 161268 161269 161270 161271 161272 161273 161274 161275 161276 161277 161278 161279 161280 161281 161282 161283 161284 161285 161286 161287 161288 161289 161290 161291 161292 161293 161294 161295 161296 161297 161298 161299 161300 161301 161302 161303 161304 161305 161306 161307 161308 161309 161310 161311 161312 161313 161314 161315 161316 161317 161318 161319 161320 161321 161322 161323 161324 161325 161326 161327 161328 161329 161330 161331 161332 161333 161334 161335 161336 161337 161338 161339 161340 161341 161342 161343 161344 161345 161346 161347 161348 161349 161350 161351 161352 161353 161354 161355 161356 161357 161358 161359 161360 161361 161362 161363 161364 161365 161366 161367 161368 161369 161370 161371 161372 161373 161374 161375 161376 161377 161378 161379 161380 161381 161382 161383 161384 161385 161386 161387 161388 161389 161390 161391 161392 161393 161394 161395 161396 161397 161398 161399 161400 161401 161402 161403 161404 161405 161406 161407 161408 161409 161410 161411 161412 161413 161414 161415 161416 161417 161418 161419 161420 161421 161422 161423 161424 161425 161426 161427 161428 161429 161430 161431 161432 161433 161434 161435 161436 161437 161438 161439 161440 161441 161442 161443 161444 161445 161446 161447 161448 161449 161450 161451 161452 161453 161454 161455 161456 161457 161458 161459 161460 161461 161462 161463 161464 161465 161466 161467 161468 161469 161470 161471 161472 161473 161474 161475 161476 161477 161478 161479 161480 161481 161482 161483 161484 161485 161486 161487 161488 161489 161490 161491 161492 161493 161494 161495 161496 161497 161498 161499 161500 161501 161502 161503 161504 161505 161506 161507 161508 161509 161510 161511 161512 161513 161514 161515 161516 161517 161518 161519 161520 161521 161522 161523 161524 161525 161526 161527 161528 161529 161530 161531 161532 161533 161534 161535 161536 161537 161538 161539 161540 161541 161542 161543 161544 161545 161546 161547 161548 161549 161550 161551 161552 161553 161554 161555 161556 161557 161558 161559 161560 161561 161562 161563 161564 161565 161566 161567 161568 161569 161570 161571 161572 161573 161574 161575 161576 161577 161578 161579 161580 161581 161582 161583 161584 161585 161586 161587 161588 161589 161590 161591 161592 161593 161594 161595 161596 161597 161598 161599 161600 161601 161602 161603 161604 161605 161606 161607 161608 161609 161610 161611 161612 161613 161614 161615 161616 161617 161618 161619 161620 161621 161622 161623 161624 161625 161626 161627 161628 161629 161630 161631 161632 161633 161634 161635 161636 161637 161638 161639 161640 161641 161642 161643 161644 161645 161646 161647 161648 161649 161650 161651 161652 161653 161654 161655 161656 161657 161658 161659 161660 161661 161662 161663 161664 161665 161666 161667 161668 161669 161670 161671 161672 161673 161674 161675 161676 161677 161678 161679 161680 161681 161682 161683 161684 161685 161686 161687 161688 161689 161690 161691 161692 161693 161694 161695 161696 161697 161698 161699 161700 161701 161702 161703 161704 161705 161706 161707 161708 161709 161710 161711 161712 161713 161714 161715 161716 161717 161718 161719 161720 161721 161722 161723 161724 161725 161726 161727 161728 161729 161730 161731 161732 161733 161734 161735 161736 161737 161738 161739 161740 161741 161742 161743 161744 161745 161746 161747 161748 161749 161750 161751 161752 161753 161754 161755 161756 161757 161758 161759 161760 161761 161762 161763 161764 161765 161766 161767 161768 161769 161770 161771 161772 161773 161774 161775 161776 161777 161778 161779 161780 161781 161782 161783 161784 161785 161786 161787 161788 161789 161790 161791 161792 161793 161794 161795 161796 161797 161798 161799 161800 161801 161802 161803 161804 161805 161806 161807 161808 161809 161810 161811 161812 161813 161814 161815 161816 161817 161818 161819 161820 161821 161822 161823 161824 161825 161826 161827 161828 161829 161830 161831 161832 161833 161834 161835 161836 161837 161838 161839 161840 161841 161842 161843 161844 161845 161846 161847 161848 161849 161850 161851 161852 161853 161854 161855 161856 161857 161858 161859 161860 161861 161862 161863 161864 161865 161866 161867 161868 161869 161870 161871 161872 161873 161874 161875 161876 161877 161878 161879 161880 161881 161882 161883 161884 161885 161886 161887 161888 161889 161890 161891 161892 161893 161894 161895 161896 161897 161898 161899 161900 161901 161902 161903 161904 161905 161906 161907 161908 161909 161910 161911 161912 161913 161914 161915 161916 161917 161918 161919 161920 161921 161922 161923 161924 161925 161926 161927 161928 161929 161930 161931 161932 161933 161934 161935 161936 161937 161938 161939 161940 161941 161942 161943 161944 161945 161946 161947 161948 161949 161950 161951 161952 161953 161954 161955 161956 161957 161958 161959 161960 161961 161962 161963 161964 161965 161966 161967 161968 161969 161970 161971 161972 161973 161974 161975 161976 161977 161978 161979 161980 161981 161982 161983 161984 161985 161986 161987 161988 161989 161990 161991 161992 161993 161994 161995 161996 161997 161998 161999 162000 162001 162002 162003 162004 162005 162006 162007 162008 162009 162010 162011 162012 162013 162014 162015 162016 162017 162018 162019 162020 162021 162022 162023 162024 162025 162026 162027 162028 162029 162030 162031 162032 162033 162034 162035 162036 162037 162038 162039 162040 162041 162042 162043 162044 162045 162046 162047 162048 162049 162050 162051 162052 162053 162054 162055 162056 162057 162058 162059 162060 162061 162062 162063 162064 162065 162066 162067 162068 162069 162070 162071 162072 162073 162074 162075 162076 162077 162078 162079 162080 162081 162082 162083 162084 162085 162086 162087 162088 162089 162090 162091 162092 162093 162094 162095 162096 162097 162098 162099 162100 162101 162102 162103 162104 162105 162106 162107 162108 162109 162110 162111 162112 162113 162114 162115 162116 162117 162118 162119 162120 162121 162122 162123 162124 162125 162126 162127 162128 162129 162130 162131 162132 162133 162134 162135 162136 162137 162138 162139 162140 162141 162142 162143 162144 162145 162146 162147 162148 162149 162150 162151 162152 162153 162154 162155 162156 162157 162158 162159 162160 162161 162162 162163 162164 162165 162166 162167 162168 162169 162170 162171 162172 162173 162174 162175 162176 162177 162178 162179 162180 162181 162182 162183 162184 162185 162186 162187 162188 162189 162190 162191 162192 162193 162194 162195 162196 162197 162198 162199 162200 162201 162202 162203 162204 162205 162206 162207 162208 162209 162210 162211 162212 162213 162214 162215 162216 162217 162218 162219 162220 162221 162222 162223 162224 162225 162226 162227 162228 162229 162230 162231 162232 162233 162234 162235 162236 162237 162238 162239 162240 162241 162242 162243 162244 162245 162246 162247 162248 162249 162250 162251 162252 162253 162254 162255 162256 162257 162258 162259 162260 162261 162262 162263 162264 162265 162266 162267 162268 162269 162270 162271 162272 162273 162274 162275 162276 162277 162278 162279 162280 162281 162282 162283 162284 162285 162286 162287 162288 162289 162290 162291 162292 162293 162294 162295 162296 162297 162298 162299 162300 162301 162302 162303 162304 162305 162306 162307 162308 162309 162310 162311 162312 162313 162314 162315 162316 162317 162318 162319 162320 162321 162322 162323 162324 162325 162326 162327 162328 162329 162330 162331 162332 162333 162334 162335 162336 162337 162338 162339 162340 162341 162342 162343 162344 162345 162346 162347 162348 162349 162350 162351 162352 162353 162354 162355 162356 162357 162358 162359 162360 162361 162362 162363 162364 162365 162366 162367 162368 162369 162370 162371 162372 162373 162374 162375 162376 162377 162378 162379 162380 162381 162382 162383 162384 162385 162386 162387 162388 162389 162390 162391 162392 162393 162394 162395 162396 162397 162398 162399 162400 162401 162402 162403 162404 162405 162406 162407 162408 162409 162410 162411 162412 162413 162414 162415 162416 162417 162418 162419 162420 162421 162422 162423 162424 162425 162426 162427 162428 162429 162430 162431 162432 162433 162434 162435 162436 162437 162438 162439 162440 162441 162442 162443 162444 162445 162446 162447 162448 162449 162450 162451 162452 162453 162454 162455 162456 162457 162458 162459 162460 162461 162462 162463 162464 162465 162466 162467 162468 162469 162470 162471 162472 162473 162474 162475 162476 162477 162478 162479 162480 162481 162482 162483 162484 162485 162486 162487 162488 162489 162490 162491 162492 162493 162494 162495 162496 162497 162498 162499 162500 162501 162502 162503 162504 162505 162506 162507 162508 162509 162510 162511 162512 162513 162514 162515 162516 162517 162518 162519 162520 162521 162522 162523 162524 162525 162526 162527 162528 162529 162530 162531 162532 162533 162534 162535 162536 162537 162538 162539 162540 162541 162542 162543 162544 162545 162546 162547 162548 162549 162550 162551 162552 162553 162554 162555 162556 162557 162558 162559 162560 162561 162562 162563 162564 162565 162566 162567 162568 162569 162570 162571 162572 162573 162574 162575 162576 162577 162578 162579 162580 162581 162582 162583 162584 162585 162586 162587 162588 162589 162590 162591 162592 162593 162594 162595 162596 162597 162598 162599 162600 162601 162602 162603 162604 162605 162606 162607 162608 162609 162610 162611 162612 162613 162614 162615 162616 162617 162618 162619 162620 162621 162622 162623 162624 162625 162626 162627 162628 162629 162630 162631 162632 162633 162634 162635 162636 162637 162638 162639 162640 162641 162642 162643 162644 162645 162646 162647 162648 162649 162650 162651 162652 162653 162654 162655 162656 162657 162658 162659 162660 162661 162662 162663 162664 162665 162666 162667 162668 162669 162670 162671 162672 162673 162674 162675 162676 162677 162678 162679 162680 162681 162682 162683 162684 162685 162686 162687 162688 162689 162690 162691 162692 162693 162694 162695 162696 162697 162698 162699 162700 162701 162702 162703 162704 162705 162706 162707 162708 162709 162710 162711 162712 162713 162714 162715 162716 162717 162718 162719 162720 162721 162722 162723 162724 162725 162726 162727 162728 162729 162730 162731 162732 162733 162734 162735 162736 162737 162738 162739 162740 162741 162742 162743 162744 162745 162746 162747 162748 162749 162750 162751 162752 162753 162754 162755 162756 162757 162758 162759 162760 162761 162762 162763 162764 162765 162766 162767 162768 162769 162770 162771 162772 162773 162774 162775 162776 162777 162778 162779 162780 162781 162782 162783 162784 162785 162786 162787 162788 162789 162790 162791 162792 162793 162794 162795 162796 162797 162798 162799 162800 162801 162802 162803 162804 162805 162806 162807 162808 162809 162810 162811 162812 162813 162814 162815 162816 162817 162818 162819 162820 162821 162822 162823 162824 162825 162826 162827 162828 162829 162830 162831 162832 162833 162834 162835 162836 162837 162838 162839 162840 162841 162842 162843 162844 162845 162846 162847 162848 162849 162850 162851 162852 162853 162854 162855 162856 162857 162858 162859 162860 162861 162862 162863 162864 162865 162866 162867 162868 162869 162870 162871 162872 162873 162874 162875 162876 162877 162878 162879 162880 162881 162882 162883 162884 162885 162886 162887 162888 162889 162890 162891 162892 162893 162894 162895 162896 162897 162898 162899 162900 162901 162902 162903 162904 162905 162906 162907 162908 162909 162910 162911 162912 162913 162914 162915 162916 162917 162918 162919 162920 162921 162922 162923 162924 162925 162926 162927 162928 162929 162930 162931 162932 162933 162934 162935 162936 162937 162938 162939 162940 162941 162942 162943 162944 162945 162946 162947 162948 162949 162950 162951 162952 162953 162954 162955 162956 162957 162958 162959 162960 162961 162962 162963 162964 162965 162966 162967 162968 162969 162970 162971 162972 162973 162974 162975 162976 162977 162978 162979 162980 162981 162982 162983 162984 162985 162986 162987 162988 162989 162990 162991 162992 162993 162994 162995 162996 162997 162998 162999 163000 163001 163002 163003 163004 163005 163006 163007 163008 163009 163010 163011 163012 163013 163014 163015 163016 163017 163018 163019 163020 163021 163022 163023 163024 163025 163026 163027 163028 163029 163030 163031 163032 163033 163034 163035 163036 163037 163038 163039 163040 163041 163042 163043 163044 163045 163046 163047 163048 163049 163050 163051 163052 163053 163054 163055 163056 163057 163058 163059 163060 163061 163062 163063 163064 163065 163066 163067 163068 163069 163070 163071 163072 163073 163074 163075 163076 163077 163078 163079 163080 163081 163082 163083 163084 163085 163086 163087 163088 163089 163090 163091 163092 163093 163094 163095 163096 163097 163098 163099 163100 163101 163102 163103 163104 163105 163106 163107 163108 163109 163110 163111 163112 163113 163114 163115 163116 163117 163118 163119 163120 163121 163122 163123 163124 163125 163126 163127 163128 163129 163130 163131 163132 163133 163134 163135 163136 163137 163138 163139 163140 163141 163142 163143 163144 163145 163146 163147 163148 163149 163150 163151 163152 163153 163154 163155 163156 163157 163158 163159 163160 163161 163162 163163 163164 163165 163166 163167 163168 163169 163170 163171 163172 163173 163174 163175 163176 163177 163178 163179 163180 163181 163182 163183 163184 163185 163186 163187 163188 163189 163190 163191 163192 163193 163194 163195 163196 163197 163198 163199 163200 163201 163202 163203 163204 163205 163206 163207 163208 163209 163210 163211 163212 163213 163214 163215 163216 163217 163218 163219 163220 163221 163222 163223 163224 163225 163226 163227 163228 163229 163230 163231 163232 163233 163234 163235 163236 163237 163238 163239 163240 163241 163242 163243 163244 163245 163246 163247 163248 163249 163250 163251 163252 163253 163254 163255 163256 163257 163258 163259 163260 163261 163262 163263 163264 163265 163266 163267 163268 163269 163270 163271 163272 163273 163274 163275 163276 163277 163278 163279 163280 163281 163282 163283 163284 163285 163286 163287 163288 163289 163290 163291 163292 163293 163294 163295 163296 163297 163298 163299 163300 163301 163302 163303 163304 163305 163306 163307 163308 163309 163310 163311 163312 163313 163314 163315 163316 163317 163318 163319 163320 163321 163322 163323 163324 163325 163326 163327 163328 163329 163330 163331 163332 163333 163334 163335 163336 163337 163338 163339 163340 163341 163342 163343 163344 163345 163346 163347 163348 163349 163350 163351 163352 163353 163354 163355 163356 163357 163358 163359 163360 163361 163362 163363 163364 163365 163366 163367 163368 163369 163370 163371 163372 163373 163374 163375 163376 163377 163378 163379 163380 163381 163382 163383 163384 163385 163386 163387 163388 163389 163390 163391 163392 163393 163394 163395 163396 163397 163398 163399 163400 163401 163402 163403 163404 163405 163406 163407 163408 163409 163410 163411 163412 163413 163414 163415 163416 163417 163418 163419 163420 163421 163422 163423 163424 163425 163426 163427 163428 163429 163430 163431 163432 163433 163434 163435 163436 163437 163438 163439 163440 163441 163442 163443 163444 163445 163446 163447 163448 163449 163450 163451 163452 163453 163454 163455 163456 163457 163458 163459 163460 163461 163462 163463 163464 163465 163466 163467 163468 163469 163470 163471 163472 163473 163474 163475 163476 163477 163478 163479 163480 163481 163482 163483 163484 163485 163486 163487 163488 163489 163490 163491 163492 163493 163494 163495 163496 163497 163498 163499 163500 163501 163502 163503 163504 163505 163506 163507 163508 163509 163510 163511 163512 163513 163514 163515 163516 163517 163518 163519 163520 163521 163522 163523 163524 163525 163526 163527 163528 163529 163530 163531 163532 163533 163534 163535 163536 163537 163538 163539 163540 163541 163542 163543 163544 163545 163546 163547 163548 163549 163550 163551 163552 163553 163554 163555 163556 163557 163558 163559 163560 163561 163562 163563 163564 163565 163566 163567 163568 163569 163570 163571 163572 163573 163574 163575 163576 163577 163578 163579 163580 163581 163582 163583 163584 163585 163586 163587 163588 163589 163590 163591 163592 163593 163594 163595 163596 163597 163598 163599 163600 163601 163602 163603 163604 163605 163606 163607 163608 163609 163610 163611 163612 163613 163614 163615 163616 163617 163618 163619 163620 163621 163622 163623 163624 163625 163626 163627 163628 163629 163630 163631 163632 163633 163634 163635 163636 163637 163638 163639 163640 163641 163642 163643 163644 163645 163646 163647 163648 163649 163650 163651 163652 163653 163654 163655 163656 163657 163658 163659 163660 163661 163662 163663 163664 163665 163666 163667 163668 163669 163670 163671 163672 163673 163674 163675 163676 163677 163678 163679 163680 163681 163682 163683 163684 163685 163686 163687 163688 163689 163690 163691 163692 163693 163694 163695 163696 163697 163698 163699 163700 163701 163702 163703 163704 163705 163706 163707 163708 163709 163710 163711 163712 163713 163714 163715 163716 163717 163718 163719 163720 163721 163722 163723 163724 163725 163726 163727 163728 163729 163730 163731 163732 163733 163734 163735 163736 163737 163738 163739 163740 163741 163742 163743 163744 163745 163746 163747 163748 163749 163750 163751 163752 163753 163754 163755 163756 163757 163758 163759 163760 163761 163762 163763 163764 163765 163766 163767 163768 163769 163770 163771 163772 163773 163774 163775 163776 163777 163778 163779 163780 163781 163782 163783 163784 163785 163786 163787 163788 163789 163790 163791 163792 163793 163794 163795 163796 163797 163798 163799 163800 163801 163802 163803 163804 163805 163806 163807 163808 163809 163810 163811 163812 163813 163814 163815 163816 163817 163818 163819 163820 163821 163822 163823 163824 163825 163826 163827 163828 163829 163830 163831 163832 163833 163834 163835 163836 163837 163838 163839 163840 163841 163842 163843 163844 163845 163846 163847 163848 163849 163850 163851 163852 163853 163854 163855 163856 163857 163858 163859 163860 163861 163862 163863 163864 163865 163866 163867 163868 163869 163870 163871 163872 163873 163874 163875 163876 163877 163878 163879 163880 163881 163882 163883 163884 163885 163886 163887 163888 163889 163890 163891 163892 163893 163894 163895 163896 163897 163898 163899 163900 163901 163902 163903 163904 163905 163906 163907 163908 163909 163910 163911 163912 163913 163914 163915 163916 163917 163918 163919 163920 163921 163922 163923 163924 163925 163926 163927 163928 163929 163930 163931 163932 163933 163934 163935 163936 163937 163938 163939 163940 163941 163942 163943 163944 163945 163946 163947 163948 163949 163950 163951 163952 163953 163954 163955 163956 163957 163958 163959 163960 163961 163962 163963 163964 163965 163966 163967 163968 163969 163970 163971 163972 163973 163974 163975 163976 163977 163978 163979 163980 163981 163982 163983 163984 163985 163986 163987 163988 163989 163990 163991 163992 163993 163994 163995 163996 163997 163998 163999 164000 164001 164002 164003 164004 164005 164006 164007 164008 164009 164010 164011 164012 164013 164014 164015 164016 164017 164018 164019 164020 164021 164022 164023 164024 164025 164026 164027 164028 164029 164030 164031 164032 164033 164034 164035 164036 164037 164038 164039 164040 164041 164042 164043 164044 164045 164046 164047 164048 164049 164050 164051 164052 164053 164054 164055 164056 164057 164058 164059 164060 164061 164062 164063 164064 164065 164066 164067 164068 164069 164070 164071 164072 164073 164074 164075 164076 164077 164078 164079 164080 164081 164082 164083 164084 164085 164086 164087 164088 164089 164090 164091 164092 164093 164094 164095 164096 164097 164098 164099 164100 164101 164102 164103 164104 164105 164106 164107 164108 164109 164110 164111 164112 164113 164114 164115 164116 164117 164118 164119 164120 164121 164122 164123 164124 164125 164126 164127 164128 164129 164130 164131 164132 164133 164134 164135 164136 164137 164138 164139 164140 164141 164142 164143 164144 164145 164146 164147 164148 164149 164150 164151 164152 164153 164154 164155 164156 164157 164158 164159 164160 164161 164162 164163 164164 164165 164166 164167 164168 164169 164170 164171 164172 164173 164174 164175 164176 164177 164178 164179 164180 164181 164182 164183 164184 164185 164186 164187 164188 164189 164190 164191 164192 164193 164194 164195 164196 164197 164198 164199 164200 164201 164202 164203 164204 164205 164206 164207 164208 164209 164210 164211 164212 164213 164214 164215 164216 164217 164218 164219 164220 164221 164222 164223 164224 164225 164226 164227 164228 164229 164230 164231 164232 164233 164234 164235 164236 164237 164238 164239 164240 164241 164242 164243 164244 164245 164246 164247 164248 164249 164250 164251 164252 164253 164254 164255 164256 164257 164258 164259 164260 164261 164262 164263 164264 164265 164266 164267 164268 164269 164270 164271 164272 164273 164274 164275 164276 164277 164278 164279 164280 164281 164282 164283 164284 164285 164286 164287 164288 164289 164290 164291 164292 164293 164294 164295 164296 164297 164298 164299 164300 164301 164302 164303 164304 164305 164306 164307 164308 164309 164310 164311 164312 164313 164314 164315 164316 164317 164318 164319 164320 164321 164322 164323 164324 164325 164326 164327 164328 164329 164330 164331 164332 164333 164334 164335 164336 164337 164338 164339 164340 164341 164342 164343 164344 164345 164346 164347 164348 164349 164350 164351 164352 164353 164354 164355 164356 164357 164358 164359 164360 164361 164362 164363 164364 164365 164366 164367 164368 164369 164370 164371 164372 164373 164374 164375 164376 164377 164378 164379 164380 164381 164382 164383 164384 164385 164386 164387 164388 164389 164390 164391 164392 164393 164394 164395 164396 164397 164398 164399 164400 164401 164402 164403 164404 164405 164406 164407 164408 164409 164410 164411 164412 164413 164414 164415 164416 164417 164418 164419 164420 164421 164422 164423 164424 164425 164426 164427 164428 164429 164430 164431 164432 164433 164434 164435 164436 164437 164438 164439 164440 164441 164442 164443 164444 164445 164446 164447 164448 164449 164450 164451 164452 164453 164454 164455 164456 164457 164458 164459 164460 164461 164462 164463 164464 164465 164466 164467 164468 164469 164470 164471 164472 164473 164474 164475 164476 164477 164478 164479 164480 164481 164482 164483 164484 164485 164486 164487 164488 164489 164490 164491 164492 164493 164494 164495 164496 164497 164498 164499 164500 164501 164502 164503 164504 164505 164506 164507 164508 164509 164510 164511 164512 164513 164514 164515 164516 164517 164518 164519 164520 164521 164522 164523 164524 164525 164526 164527 164528 164529 164530 164531 164532 164533 164534 164535 164536 164537 164538 164539 164540 164541 164542 164543 164544 164545 164546 164547 164548 164549 164550 164551 164552 164553 164554 164555 164556 164557 164558 164559 164560 164561 164562 164563 164564 164565 164566 164567 164568 164569 164570 164571 164572 164573 164574 164575 164576 164577 164578 164579 164580 164581 164582 164583 164584 164585 164586 164587 164588 164589 164590 164591 164592 164593 164594 164595 164596 164597 164598 164599 164600 164601 164602 164603 164604 164605 164606 164607 164608 164609 164610 164611 164612 164613 164614 164615 164616 164617 164618 164619 164620 164621 164622 164623 164624 164625 164626 164627 164628 164629 164630 164631 164632 164633 164634 164635 164636 164637 164638 164639 164640 164641 164642 164643 164644 164645 164646 164647 164648 164649 164650 164651 164652 164653 164654 164655 164656 164657 164658 164659 164660 164661 164662 164663 164664 164665 164666 164667 164668 164669 164670 164671 164672 164673 164674 164675 164676 164677 164678 164679 164680 164681 164682 164683 164684 164685 164686 164687 164688 164689 164690 164691 164692 164693 164694 164695 164696 164697 164698 164699 164700 164701 164702 164703 164704 164705 164706 164707 164708 164709 164710 164711 164712 164713 164714 164715 164716 164717 164718 164719 164720 164721 164722 164723 164724 164725 164726 164727 164728 164729 164730 164731 164732 164733 164734 164735 164736 164737 164738 164739 164740 164741 164742 164743 164744 164745 164746 164747 164748 164749 164750 164751 164752 164753 164754 164755 164756 164757 164758 164759 164760 164761 164762 164763 164764 164765 164766 164767 164768 164769 164770 164771 164772 164773 164774 164775 164776 164777 164778 164779 164780 164781 164782 164783 164784 164785 164786 164787 164788 164789 164790 164791 164792 164793 164794 164795 164796 164797 164798 164799 164800 164801 164802 164803 164804 164805 164806 164807 164808 164809 164810 164811 164812 164813 164814 164815 164816 164817 164818 164819 164820 164821 164822 164823 164824 164825 164826 164827 164828 164829 164830 164831 164832 164833 164834 164835 164836 164837 164838 164839 164840 164841 164842 164843 164844 164845 164846 164847 164848 164849 164850 164851 164852 164853 164854 164855 164856 164857 164858 164859 164860 164861 164862 164863 164864 164865 164866 164867 164868 164869 164870 164871 164872 164873 164874 164875 164876 164877 164878 164879 164880 164881 164882 164883 164884 164885 164886 164887 164888 164889 164890 164891 164892 164893 164894 164895 164896 164897 164898 164899 164900 164901 164902 164903 164904 164905 164906 164907 164908 164909 164910 164911 164912 164913 164914 164915 164916 164917 164918 164919 164920 164921 164922 164923 164924 164925 164926 164927 164928 164929 164930 164931 164932 164933 164934 164935 164936 164937 164938 164939 164940 164941 164942 164943 164944 164945 164946 164947 164948 164949 164950 164951 164952 164953 164954 164955 164956 164957 164958 164959 164960 164961 164962 164963 164964 164965 164966 164967 164968 164969 164970 164971 164972 164973 164974 164975 164976 164977 164978 164979 164980 164981 164982 164983 164984 164985 164986 164987 164988 164989 164990 164991 164992 164993 164994 164995 164996 164997 164998 164999 165000 165001 165002 165003 165004 165005 165006 165007 165008 165009 165010 165011 165012 165013 165014 165015 165016 165017 165018 165019 165020 165021 165022 165023 165024 165025 165026 165027 165028 165029 165030 165031 165032 165033 165034 165035 165036 165037 165038 165039 165040 165041 165042 165043 165044 165045 165046 165047 165048 165049 165050 165051 165052 165053 165054 165055 165056 165057 165058 165059 165060 165061 165062 165063 165064 165065 165066 165067 165068 165069 165070 165071 165072 165073 165074 165075 165076 165077 165078 165079 165080 165081 165082 165083 165084 165085 165086 165087 165088 165089 165090 165091 165092 165093 165094 165095 165096 165097 165098 165099 165100 165101 165102 165103 165104 165105 165106 165107 165108 165109 165110 165111 165112 165113 165114 165115 165116 165117 165118 165119 165120 165121 165122 165123 165124 165125 165126 165127 165128 165129 165130 165131 165132 165133 165134 165135 165136 165137 165138 165139 165140 165141 165142 165143 165144 165145 165146 165147 165148 165149 165150 165151 165152 165153 165154 165155 165156 165157 165158 165159 165160 165161 165162 165163 165164 165165 165166 165167 165168 165169 165170 165171 165172 165173 165174 165175 165176 165177 165178 165179 165180 165181 165182 165183 165184 165185 165186 165187 165188 165189 165190 165191 165192 165193 165194 165195 165196 165197 165198 165199 165200 165201 165202 165203 165204 165205 165206 165207 165208 165209 165210 165211 165212 165213 165214 165215 165216 165217 165218 165219 165220 165221 165222 165223 165224 165225 165226 165227 165228 165229 165230 165231 165232 165233 165234 165235 165236 165237 165238 165239 165240 165241 165242 165243 165244 165245 165246 165247 165248 165249 165250 165251 165252 165253 165254 165255 165256 165257 165258 165259 165260 165261 165262 165263 165264 165265 165266 165267 165268 165269 165270 165271 165272 165273 165274 165275 165276 165277 165278 165279 165280 165281 165282 165283 165284 165285 165286 165287 165288 165289 165290 165291 165292 165293 165294 165295 165296 165297 165298 165299 165300 165301 165302 165303 165304 165305 165306 165307 165308 165309 165310 165311 165312 165313 165314 165315 165316 165317 165318 165319 165320 165321 165322 165323 165324 165325 165326 165327 165328 165329 165330 165331 165332 165333 165334 165335 165336 165337 165338 165339 165340 165341 165342 165343 165344 165345 165346 165347 165348 165349 165350 165351 165352 165353 165354 165355 165356 165357 165358 165359 165360 165361 165362 165363 165364 165365 165366 165367 165368 165369 165370 165371 165372 165373 165374 165375 165376 165377 165378 165379 165380 165381 165382 165383 165384 165385 165386 165387 165388 165389 165390 165391 165392 165393 165394 165395 165396 165397 165398 165399 165400 165401 165402 165403 165404 165405 165406 165407 165408 165409 165410 165411 165412 165413 165414 165415 165416 165417 165418 165419 165420 165421 165422 165423 165424 165425 165426 165427 165428 165429 165430 165431 165432 165433 165434 165435 165436 165437 165438 165439 165440 165441 165442 165443 165444 165445 165446 165447 165448 165449 165450 165451 165452 165453 165454 165455 165456 165457 165458 165459 165460 165461 165462 165463 165464 165465 165466 165467 165468 165469 165470 165471 165472 165473 165474 165475 165476 165477 165478 165479 165480 165481 165482 165483 165484 165485 165486 165487 165488 165489 165490 165491 165492 165493 165494 165495 165496 165497 165498 165499 165500 165501 165502 165503 165504 165505 165506 165507 165508 165509 165510 165511 165512 165513 165514 165515 165516 165517 165518 165519 165520 165521 165522 165523 165524 165525 165526 165527 165528 165529 165530 165531 165532 165533 165534 165535 165536 165537 165538 165539 165540 165541 165542 165543 165544 165545 165546 165547 165548 165549 165550 165551 165552 165553 165554 165555 165556 165557 165558 165559 165560 165561 165562 165563 165564 165565 165566 165567 165568 165569 165570 165571 165572 165573 165574 165575 165576 165577 165578 165579 165580 165581 165582 165583 165584 165585 165586 165587 165588 165589 165590 165591 165592 165593 165594 165595 165596 165597 165598 165599 165600 165601 165602 165603 165604 165605 165606 165607 165608 165609 165610 165611 165612 165613 165614 165615 165616 165617 165618 165619 165620 165621 165622 165623 165624 165625 165626 165627 165628 165629 165630 165631 165632 165633 165634 165635 165636 165637 165638 165639 165640 165641 165642 165643 165644 165645 165646 165647 165648 165649 165650 165651 165652 165653 165654 165655 165656 165657 165658 165659 165660 165661 165662 165663 165664 165665 165666 165667 165668 165669 165670 165671 165672 165673 165674 165675 165676 165677 165678 165679 165680 165681 165682 165683 165684 165685 165686 165687 165688 165689 165690 165691 165692 165693 165694 165695 165696 165697 165698 165699 165700 165701 165702 165703 165704 165705 165706 165707 165708 165709 165710 165711 165712 165713 165714 165715 165716 165717 165718 165719 165720 165721 165722 165723 165724 165725 165726 165727 165728 165729 165730 165731 165732 165733 165734 165735 165736 165737 165738 165739 165740 165741 165742 165743 165744 165745 165746 165747 165748 165749 165750 165751 165752 165753 165754 165755 165756 165757 165758 165759 165760 165761 165762 165763 165764 165765 165766 165767 165768 165769 165770 165771 165772 165773 165774 165775 165776 165777 165778 165779 165780 165781 165782 165783 165784 165785 165786 165787 165788 165789 165790 165791 165792 165793 165794 165795 165796 165797 165798 165799 165800 165801 165802 165803 165804 165805 165806 165807 165808 165809 165810 165811 165812 165813 165814 165815 165816 165817 165818 165819 165820 165821 165822 165823 165824 165825 165826 165827 165828 165829 165830 165831 165832 165833 165834 165835 165836 165837 165838 165839 165840 165841 165842 165843 165844 165845 165846 165847 165848 165849 165850 165851 165852 165853 165854 165855 165856 165857 165858 165859 165860 165861 165862 165863 165864 165865 165866 165867 165868 165869 165870 165871 165872 165873 165874 165875 165876 165877 165878 165879 165880 165881 165882 165883 165884 165885 165886 165887 165888 165889 165890 165891 165892 165893 165894 165895 165896 165897 165898 165899 165900 165901 165902 165903 165904 165905 165906 165907 165908 165909 165910 165911 165912 165913 165914 165915 165916 165917 165918 165919 165920 165921 165922 165923 165924 165925 165926 165927 165928 165929 165930 165931 165932 165933 165934 165935 165936 165937 165938 165939 165940 165941 165942 165943 165944 165945 165946 165947 165948 165949 165950 165951 165952 165953 165954 165955 165956 165957 165958 165959 165960 165961 165962 165963 165964 165965 165966 165967 165968 165969 165970 165971 165972 165973 165974 165975 165976 165977 165978 165979 165980 165981 165982 165983 165984 165985 165986 165987 165988 165989 165990 165991 165992 165993 165994 165995 165996 165997 165998 165999 166000 166001 166002 166003 166004 166005 166006 166007 166008 166009 166010 166011 166012 166013 166014 166015 166016 166017 166018 166019 166020 166021 166022 166023 166024 166025 166026 166027 166028 166029 166030 166031 166032 166033 166034 166035 166036 166037 166038 166039 166040 166041 166042 166043 166044 166045 166046 166047 166048 166049 166050 166051 166052 166053 166054 166055 166056 166057 166058 166059 166060 166061 166062 166063 166064 166065 166066 166067 166068 166069 166070 166071 166072 166073 166074 166075 166076 166077 166078 166079 166080 166081 166082 166083 166084 166085 166086 166087 166088 166089 166090 166091 166092 166093 166094 166095 166096 166097 166098 166099 166100 166101 166102 166103 166104 166105 166106 166107 166108 166109 166110 166111 166112 166113 166114 166115 166116 166117 166118 166119 166120 166121 166122 166123 166124 166125 166126 166127 166128 166129 166130 166131 166132 166133 166134 166135 166136 166137 166138 166139 166140 166141 166142 166143 166144 166145 166146 166147 166148 166149 166150 166151 166152 166153 166154 166155 166156 166157 166158 166159 166160 166161 166162 166163 166164 166165 166166 166167 166168 166169 166170 166171 166172 166173 166174 166175 166176 166177 166178 166179 166180 166181 166182 166183 166184 166185 166186 166187 166188 166189 166190 166191 166192 166193 166194 166195 166196 166197 166198 166199 166200 166201 166202 166203 166204 166205 166206 166207 166208 166209 166210 166211 166212 166213 166214 166215 166216 166217 166218 166219 166220 166221 166222 166223 166224 166225 166226 166227 166228 166229 166230 166231 166232 166233 166234 166235 166236 166237 166238 166239 166240 166241 166242 166243 166244 166245 166246 166247 166248 166249 166250 166251 166252 166253 166254 166255 166256 166257 166258 166259 166260 166261 166262 166263 166264 166265 166266 166267 166268 166269 166270 166271 166272 166273 166274 166275 166276 166277 166278 166279 166280 166281 166282 166283 166284 166285 166286 166287 166288 166289 166290 166291 166292 166293 166294 166295 166296 166297 166298 166299 166300 166301 166302 166303 166304 166305 166306 166307 166308 166309 166310 166311 166312 166313 166314 166315 166316 166317 166318 166319 166320 166321 166322 166323 166324 166325 166326 166327 166328 166329 166330 166331 166332 166333 166334 166335 166336 166337 166338 166339 166340 166341 166342 166343 166344 166345 166346 166347 166348 166349 166350 166351 166352 166353 166354 166355 166356 166357 166358 166359 166360 166361 166362 166363 166364 166365 166366 166367 166368 166369 166370 166371 166372 166373 166374 166375 166376 166377 166378 166379 166380 166381 166382 166383 166384 166385 166386 166387 166388 166389 166390 166391 166392 166393 166394 166395 166396 166397 166398 166399 166400 166401 166402 166403 166404 166405 166406 166407 166408 166409 166410 166411 166412 166413 166414 166415 166416 166417 166418 166419 166420 166421 166422 166423 166424 166425 166426 166427 166428 166429 166430 166431 166432 166433 166434 166435 166436 166437 166438 166439 166440 166441 166442 166443 166444 166445 166446 166447 166448 166449 166450 166451 166452 166453 166454 166455 166456 166457 166458 166459 166460 166461 166462 166463 166464 166465 166466 166467 166468 166469 166470 166471 166472 166473 166474 166475 166476 166477 166478 166479 166480 166481 166482 166483 166484 166485 166486 166487 166488 166489 166490 166491 166492 166493 166494 166495 166496 166497 166498 166499 166500 166501 166502 166503 166504 166505 166506 166507 166508 166509 166510 166511 166512 166513 166514 166515 166516 166517 166518 166519 166520 166521 166522 166523 166524 166525 166526 166527 166528 166529 166530 166531 166532 166533 166534 166535 166536 166537 166538 166539 166540 166541 166542 166543 166544 166545 166546 166547 166548 166549 166550 166551 166552 166553 166554 166555 166556 166557 166558 166559 166560 166561 166562 166563 166564 166565 166566 166567 166568 166569 166570 166571 166572 166573 166574 166575 166576 166577 166578 166579 166580 166581 166582 166583 166584 166585 166586 166587 166588 166589 166590 166591 166592 166593 166594 166595 166596 166597 166598 166599 166600 166601 166602 166603 166604 166605 166606 166607 166608 166609 166610 166611 166612 166613 166614 166615 166616 166617 166618 166619 166620 166621 166622 166623 166624 166625 166626 166627 166628 166629 166630 166631 166632 166633 166634 166635 166636 166637 166638 166639 166640 166641 166642 166643 166644 166645 166646 166647 166648 166649 166650 166651 166652 166653 166654 166655 166656 166657 166658 166659 166660 166661 166662 166663 166664 166665 166666 166667 166668 166669 166670 166671 166672 166673 166674 166675 166676 166677 166678 166679 166680 166681 166682 166683 166684 166685 166686 166687 166688 166689 166690 166691 166692 166693 166694 166695 166696 166697 166698 166699 166700 166701 166702 166703 166704 166705 166706 166707 166708 166709 166710 166711 166712 166713 166714 166715 166716 166717 166718 166719 166720 166721 166722 166723 166724 166725 166726 166727 166728 166729 166730 166731 166732 166733 166734 166735 166736 166737 166738 166739 166740 166741 166742 166743 166744 166745 166746 166747 166748 166749 166750 166751 166752 166753 166754 166755 166756 166757 166758 166759 166760 166761 166762 166763 166764 166765 166766 166767 166768 166769 166770 166771 166772 166773 166774 166775 166776 166777 166778 166779 166780 166781 166782 166783 166784 166785 166786 166787 166788 166789 166790 166791 166792 166793 166794 166795 166796 166797 166798 166799 166800 166801 166802 166803 166804 166805 166806 166807 166808 166809 166810 166811 166812 166813 166814 166815 166816 166817 166818 166819 166820 166821 166822 166823 166824 166825 166826 166827 166828 166829 166830 166831 166832 166833 166834 166835 166836 166837 166838 166839 166840 166841 166842 166843 166844 166845 166846 166847 166848 166849 166850 166851 166852 166853 166854 166855 166856 166857 166858 166859 166860 166861 166862 166863 166864 166865 166866 166867 166868 166869 166870 166871 166872 166873 166874 166875 166876 166877 166878 166879 166880 166881 166882 166883 166884 166885 166886 166887 166888 166889 166890 166891 166892 166893 166894 166895 166896 166897 166898 166899 166900 166901 166902 166903 166904 166905 166906 166907 166908 166909 166910 166911 166912 166913 166914 166915 166916 166917 166918 166919 166920 166921 166922 166923 166924 166925 166926 166927 166928 166929 166930 166931 166932 166933 166934 166935 166936 166937 166938 166939 166940 166941 166942 166943 166944 166945 166946 166947 166948 166949 166950 166951 166952 166953 166954 166955 166956 166957 166958 166959 166960 166961 166962 166963 166964 166965 166966 166967 166968 166969 166970 166971 166972 166973 166974 166975 166976 166977 166978 166979 166980 166981 166982 166983 166984 166985 166986 166987 166988 166989 166990 166991 166992 166993 166994 166995 166996 166997 166998 166999 167000 167001 167002 167003 167004 167005 167006 167007 167008 167009 167010 167011 167012 167013 167014 167015 167016 167017 167018 167019 167020 167021 167022 167023 167024 167025 167026 167027 167028 167029 167030 167031 167032 167033 167034 167035 167036 167037 167038 167039 167040 167041 167042 167043 167044 167045 167046 167047 167048 167049 167050 167051 167052 167053 167054 167055 167056 167057 167058 167059 167060 167061 167062 167063 167064 167065 167066 167067 167068 167069 167070 167071 167072 167073 167074 167075 167076 167077 167078 167079 167080 167081 167082 167083 167084 167085 167086 167087 167088 167089 167090 167091 167092 167093 167094 167095 167096 167097 167098 167099 167100 167101 167102 167103 167104 167105 167106 167107 167108 167109 167110 167111 167112 167113 167114 167115 167116 167117 167118 167119 167120 167121 167122 167123 167124 167125 167126 167127 167128 167129 167130 167131 167132 167133 167134 167135 167136 167137 167138 167139 167140 167141 167142 167143 167144 167145 167146 167147 167148 167149 167150 167151 167152 167153 167154 167155 167156 167157 167158 167159 167160 167161 167162 167163 167164 167165 167166 167167 167168 167169 167170 167171 167172 167173 167174 167175 167176 167177 167178 167179 167180 167181 167182 167183 167184 167185 167186 167187 167188 167189 167190 167191 167192 167193 167194 167195 167196 167197 167198 167199 167200 167201 167202 167203 167204 167205 167206 167207 167208 167209 167210 167211 167212 167213 167214 167215 167216 167217 167218 167219 167220 167221 167222 167223 167224 167225 167226 167227 167228 167229 167230 167231 167232 167233 167234 167235 167236 167237 167238 167239 167240 167241 167242 167243 167244 167245 167246 167247 167248 167249 167250 167251 167252 167253 167254 167255 167256 167257 167258 167259 167260 167261 167262 167263 167264 167265 167266 167267 167268 167269 167270 167271 167272 167273 167274 167275 167276 167277 167278 167279 167280 167281 167282 167283 167284 167285 167286 167287 167288 167289 167290 167291 167292 167293 167294 167295 167296 167297 167298 167299 167300 167301 167302 167303 167304 167305 167306 167307 167308 167309 167310 167311 167312 167313 167314 167315 167316 167317 167318 167319 167320 167321 167322 167323 167324 167325 167326 167327 167328 167329 167330 167331 167332 167333 167334 167335 167336 167337 167338 167339 167340 167341 167342 167343 167344 167345 167346 167347 167348 167349 167350 167351 167352 167353 167354 167355 167356 167357 167358 167359 167360 167361 167362 167363 167364 167365 167366 167367 167368 167369 167370 167371 167372 167373 167374 167375 167376 167377 167378 167379 167380 167381 167382 167383 167384 167385 167386 167387 167388 167389 167390 167391 167392 167393 167394 167395 167396 167397 167398 167399 167400 167401 167402 167403 167404 167405 167406 167407 167408 167409 167410 167411 167412 167413 167414 167415 167416 167417 167418 167419 167420 167421 167422 167423 167424 167425 167426 167427 167428 167429 167430 167431 167432 167433 167434 167435 167436 167437 167438 167439 167440 167441 167442 167443 167444 167445 167446 167447 167448 167449 167450 167451 167452 167453 167454 167455 167456 167457 167458 167459 167460 167461 167462 167463 167464 167465 167466 167467 167468 167469 167470 167471 167472 167473 167474 167475 167476 167477 167478 167479 167480 167481 167482 167483 167484 167485 167486 167487 167488 167489 167490 167491 167492 167493 167494 167495 167496 167497 167498 167499 167500 167501 167502 167503 167504 167505 167506 167507 167508 167509 167510 167511 167512 167513 167514 167515 167516 167517 167518 167519 167520 167521 167522 167523 167524 167525 167526 167527 167528 167529 167530 167531 167532 167533 167534 167535 167536 167537 167538 167539 167540 167541 167542 167543 167544 167545 167546 167547 167548 167549 167550 167551 167552 167553 167554 167555 167556 167557 167558 167559 167560 167561 167562 167563 167564 167565 167566 167567 167568 167569 167570 167571 167572 167573 167574 167575 167576 167577 167578 167579 167580 167581 167582 167583 167584 167585 167586 167587 167588 167589 167590 167591 167592 167593 167594 167595 167596 167597 167598 167599 167600 167601 167602 167603 167604 167605 167606 167607 167608 167609 167610 167611 167612 167613 167614 167615 167616 167617 167618 167619 167620 167621 167622 167623 167624 167625 167626 167627 167628 167629 167630 167631 167632 167633 167634 167635 167636 167637 167638 167639 167640 167641 167642 167643 167644 167645 167646 167647 167648 167649 167650 167651 167652 167653 167654 167655 167656 167657 167658 167659 167660 167661 167662 167663 167664 167665 167666 167667 167668 167669 167670 167671 167672 167673 167674 167675 167676 167677 167678 167679 167680 167681 167682 167683 167684 167685 167686 167687 167688 167689 167690 167691 167692 167693 167694 167695 167696 167697 167698 167699 167700 167701 167702 167703 167704 167705 167706 167707 167708 167709 167710 167711 167712 167713 167714 167715 167716 167717 167718 167719 167720 167721 167722 167723 167724 167725 167726 167727 167728 167729 167730 167731 167732 167733 167734 167735 167736 167737 167738 167739 167740 167741 167742 167743 167744 167745 167746 167747 167748 167749 167750 167751 167752 167753 167754 167755 167756 167757 167758 167759 167760 167761 167762 167763 167764 167765 167766 167767 167768 167769 167770 167771 167772 167773 167774 167775 167776 167777 167778 167779 167780 167781 167782 167783 167784 167785 167786 167787 167788 167789 167790 167791 167792 167793 167794 167795 167796 167797 167798 167799 167800 167801 167802 167803 167804 167805 167806 167807 167808 167809 167810 167811 167812 167813 167814 167815 167816 167817 167818 167819 167820 167821 167822 167823 167824 167825 167826 167827 167828 167829 167830 167831 167832 167833 167834 167835 167836 167837 167838 167839 167840 167841 167842 167843 167844 167845 167846 167847 167848 167849 167850 167851 167852 167853 167854 167855 167856 167857 167858 167859 167860 167861 167862 167863 167864 167865 167866 167867 167868 167869 167870 167871 167872 167873 167874 167875 167876 167877 167878 167879 167880 167881 167882 167883 167884 167885 167886 167887 167888 167889 167890 167891 167892 167893 167894 167895 167896 167897 167898 167899 167900 167901 167902 167903 167904 167905 167906 167907 167908 167909 167910 167911 167912 167913 167914 167915 167916 167917 167918 167919 167920 167921 167922 167923 167924 167925 167926 167927 167928 167929 167930 167931 167932 167933 167934 167935 167936 167937 167938 167939 167940 167941 167942 167943 167944 167945 167946 167947 167948 167949 167950 167951 167952 167953 167954 167955 167956 167957 167958 167959 167960 167961 167962 167963 167964 167965 167966 167967 167968 167969 167970 167971 167972 167973 167974 167975 167976 167977 167978 167979 167980 167981 167982 167983 167984 167985 167986 167987 167988 167989 167990 167991 167992 167993 167994 167995 167996 167997 167998 167999 168000 168001 168002 168003 168004 168005 168006 168007 168008 168009 168010 168011 168012 168013 168014 168015 168016 168017 168018 168019 168020 168021 168022 168023 168024 168025 168026 168027 168028 168029 168030 168031 168032 168033 168034 168035 168036 168037 168038 168039 168040 168041 168042 168043 168044 168045 168046 168047 168048 168049 168050 168051 168052 168053 168054 168055 168056 168057 168058 168059 168060 168061 168062 168063 168064 168065 168066 168067 168068 168069 168070 168071 168072 168073 168074 168075 168076 168077 168078 168079 168080 168081 168082 168083 168084 168085 168086 168087 168088 168089 168090 168091 168092 168093 168094 168095 168096 168097 168098 168099 168100 168101 168102 168103 168104 168105 168106 168107 168108 168109 168110 168111 168112 168113 168114 168115 168116 168117 168118 168119 168120 168121 168122 168123 168124 168125 168126 168127 168128 168129 168130 168131 168132 168133 168134 168135 168136 168137 168138 168139 168140 168141 168142 168143 168144 168145 168146 168147 168148 168149 168150 168151 168152 168153 168154 168155 168156 168157 168158 168159 168160 168161 168162 168163 168164 168165 168166 168167 168168 168169 168170 168171 168172 168173 168174 168175 168176 168177 168178 168179 168180 168181 168182 168183 168184 168185 168186 168187 168188 168189 168190 168191 168192 168193 168194 168195 168196 168197 168198 168199 168200 168201 168202 168203 168204 168205 168206 168207 168208 168209 168210 168211 168212 168213 168214 168215 168216 168217 168218 168219 168220 168221 168222 168223 168224 168225 168226 168227 168228 168229 168230 168231 168232 168233 168234 168235 168236 168237 168238 168239 168240 168241 168242 168243 168244 168245 168246 168247 168248 168249 168250 168251 168252 168253 168254 168255 168256 168257 168258 168259 168260 168261 168262 168263 168264 168265 168266 168267 168268 168269 168270 168271 168272 168273 168274 168275 168276 168277 168278 168279 168280 168281 168282 168283 168284 168285 168286 168287 168288 168289 168290 168291 168292 168293 168294 168295 168296 168297 168298 168299 168300 168301 168302 168303 168304 168305 168306 168307 168308 168309 168310 168311 168312 168313 168314 168315 168316 168317 168318 168319 168320 168321 168322 168323 168324 168325 168326 168327 168328 168329 168330 168331 168332 168333 168334 168335 168336 168337 168338 168339 168340 168341 168342 168343 168344 168345 168346 168347 168348 168349 168350 168351 168352 168353 168354 168355 168356 168357 168358 168359 168360 168361 168362 168363 168364 168365 168366 168367 168368 168369 168370 168371 168372 168373 168374 168375 168376 168377 168378 168379 168380 168381 168382 168383 168384 168385 168386 168387 168388 168389 168390 168391 168392 168393 168394 168395 168396 168397 168398 168399 168400 168401 168402 168403 168404 168405 168406 168407 168408 168409 168410 168411 168412 168413 168414 168415 168416 168417 168418 168419 168420 168421 168422 168423 168424 168425 168426 168427 168428 168429 168430 168431 168432 168433 168434 168435 168436 168437 168438 168439 168440 168441 168442 168443 168444 168445 168446 168447 168448 168449 168450 168451 168452 168453 168454 168455 168456 168457 168458 168459 168460 168461 168462 168463 168464 168465 168466 168467 168468 168469 168470 168471 168472 168473 168474 168475 168476 168477 168478 168479 168480 168481 168482 168483 168484 168485 168486 168487 168488 168489 168490 168491 168492 168493 168494 168495 168496 168497 168498 168499 168500 168501 168502 168503 168504 168505 168506 168507 168508 168509 168510 168511 168512 168513 168514 168515 168516 168517 168518 168519 168520 168521 168522 168523 168524 168525 168526 168527 168528 168529 168530 168531 168532 168533 168534 168535 168536 168537 168538 168539 168540 168541 168542 168543 168544 168545 168546 168547 168548 168549 168550 168551 168552 168553 168554 168555 168556 168557 168558 168559 168560 168561 168562 168563 168564 168565 168566 168567 168568 168569 168570 168571 168572 168573 168574 168575 168576 168577 168578 168579 168580 168581 168582 168583 168584 168585 168586 168587 168588 168589 168590 168591 168592 168593 168594 168595 168596 168597 168598 168599 168600 168601 168602 168603 168604 168605 168606 168607 168608 168609 168610 168611 168612 168613 168614 168615 168616 168617 168618 168619 168620 168621 168622 168623 168624 168625 168626 168627 168628 168629 168630 168631 168632 168633 168634 168635 168636 168637 168638 168639 168640 168641 168642 168643 168644 168645 168646 168647 168648 168649 168650 168651 168652 168653 168654 168655 168656 168657 168658 168659 168660 168661 168662 168663 168664 168665 168666 168667 168668 168669 168670 168671 168672 168673 168674 168675 168676 168677 168678 168679 168680 168681 168682 168683 168684 168685 168686 168687 168688 168689 168690 168691 168692 168693 168694 168695 168696 168697 168698 168699 168700 168701 168702 168703 168704 168705 168706 168707 168708 168709 168710 168711 168712 168713 168714 168715 168716 168717 168718 168719 168720 168721 168722 168723 168724 168725 168726 168727 168728 168729 168730 168731 168732 168733 168734 168735 168736 168737 168738 168739 168740 168741 168742 168743 168744 168745 168746 168747 168748 168749 168750 168751 168752 168753 168754 168755 168756 168757 168758 168759 168760 168761 168762 168763 168764 168765 168766 168767 168768 168769 168770 168771 168772 168773 168774 168775 168776 168777 168778 168779 168780 168781 168782 168783 168784 168785 168786 168787 168788 168789 168790 168791 168792 168793 168794 168795 168796 168797 168798 168799 168800 168801 168802 168803 168804 168805 168806 168807 168808 168809 168810 168811 168812 168813 168814 168815 168816 168817 168818 168819 168820 168821 168822 168823 168824 168825 168826 168827 168828 168829 168830 168831 168832 168833 168834 168835 168836 168837 168838 168839 168840 168841 168842 168843 168844 168845 168846 168847 168848 168849 168850 168851 168852 168853 168854 168855 168856 168857 168858 168859 168860 168861 168862 168863 168864 168865 168866 168867 168868 168869 168870 168871 168872 168873 168874 168875 168876 168877 168878 168879 168880 168881 168882 168883 168884 168885 168886 168887 168888 168889 168890 168891 168892 168893 168894 168895 168896 168897 168898 168899 168900 168901 168902 168903 168904 168905 168906 168907 168908 168909 168910 168911 168912 168913 168914 168915 168916 168917 168918 168919 168920 168921 168922 168923 168924 168925 168926 168927 168928 168929 168930 168931 168932 168933 168934 168935 168936 168937 168938 168939 168940 168941 168942 168943 168944 168945 168946 168947 168948 168949 168950 168951 168952 168953 168954 168955 168956 168957 168958 168959 168960 168961 168962 168963 168964 168965 168966 168967 168968 168969 168970 168971 168972 168973 168974 168975 168976 168977 168978 168979 168980 168981 168982 168983 168984 168985 168986 168987 168988 168989 168990 168991 168992 168993 168994 168995 168996 168997 168998 168999 169000 169001 169002 169003 169004 169005 169006 169007 169008 169009 169010 169011 169012 169013 169014 169015 169016 169017 169018 169019 169020 169021 169022 169023 169024 169025 169026 169027 169028 169029 169030 169031 169032 169033 169034 169035 169036 169037 169038 169039 169040 169041 169042 169043 169044 169045 169046 169047 169048 169049 169050 169051 169052 169053 169054 169055 169056 169057 169058 169059 169060 169061 169062 169063 169064 169065 169066 169067 169068 169069 169070 169071 169072 169073 169074 169075 169076 169077 169078 169079 169080 169081 169082 169083 169084 169085 169086 169087 169088 169089 169090 169091 169092 169093 169094 169095 169096 169097 169098 169099 169100 169101 169102 169103 169104 169105 169106 169107 169108 169109 169110 169111 169112 169113 169114 169115 169116 169117 169118 169119 169120 169121 169122 169123 169124 169125 169126 169127 169128 169129 169130 169131 169132 169133 169134 169135 169136 169137 169138 169139 169140 169141 169142 169143 169144 169145 169146 169147 169148 169149 169150 169151 169152 169153 169154 169155 169156 169157 169158 169159 169160 169161 169162 169163 169164 169165 169166 169167 169168 169169 169170 169171 169172 169173 169174 169175 169176 169177 169178 169179 169180 169181 169182 169183 169184 169185 169186 169187 169188 169189 169190 169191 169192 169193 169194 169195 169196 169197 169198 169199 169200 169201 169202 169203 169204 169205 169206 169207 169208 169209 169210 169211 169212 169213 169214 169215 169216 169217 169218 169219 169220 169221 169222 169223 169224 169225 169226 169227 169228 169229 169230 169231 169232 169233 169234 169235 169236 169237 169238 169239 169240 169241 169242 169243 169244 169245 169246 169247 169248 169249 169250 169251 169252 169253 169254 169255 169256 169257 169258 169259 169260 169261 169262 169263 169264 169265 169266 169267 169268 169269 169270 169271 169272 169273 169274 169275 169276 169277 169278 169279 169280 169281 169282 169283 169284 169285 169286 169287 169288 169289 169290 169291 169292 169293 169294 169295 169296 169297 169298 169299 169300 169301 169302 169303 169304 169305 169306 169307 169308 169309 169310 169311 169312 169313 169314 169315 169316 169317 169318 169319 169320 169321 169322 169323 169324 169325 169326 169327 169328 169329 169330 169331 169332 169333 169334 169335 169336 169337 169338 169339 169340 169341 169342 169343 169344 169345 169346 169347 169348 169349 169350 169351 169352 169353 169354 169355 169356 169357 169358 169359 169360 169361 169362 169363 169364 169365 169366 169367 169368 169369 169370 169371 169372 169373 169374 169375 169376 169377 169378 169379 169380 169381 169382 169383 169384 169385 169386 169387 169388 169389 169390 169391 169392 169393 169394 169395 169396 169397 169398 169399 169400 169401 169402 169403 169404 169405 169406 169407 169408 169409 169410 169411 169412 169413 169414 169415 169416 169417 169418 169419 169420 169421 169422 169423 169424 169425 169426 169427 169428 169429 169430 169431 169432 169433 169434 169435 169436 169437 169438 169439 169440 169441 169442 169443 169444 169445 169446 169447 169448 169449 169450 169451 169452 169453 169454 169455 169456 169457 169458 169459 169460 169461 169462 169463 169464 169465 169466 169467 169468 169469 169470 169471 169472 169473 169474 169475 169476 169477 169478 169479 169480 169481 169482 169483 169484 169485 169486 169487 169488 169489 169490 169491 169492 169493 169494 169495 169496 169497 169498 169499 169500 169501 169502 169503 169504 169505 169506 169507 169508 169509 169510 169511 169512 169513 169514 169515 169516 169517 169518 169519 169520 169521 169522 169523 169524 169525 169526 169527 169528 169529 169530 169531 169532 169533 169534 169535 169536 169537 169538 169539 169540 169541 169542 169543 169544 169545 169546 169547 169548 169549 169550 169551 169552 169553 169554 169555 169556 169557 169558 169559 169560 169561 169562 169563 169564 169565 169566 169567 169568 169569 169570 169571 169572 169573 169574 169575 169576 169577 169578 169579 169580 169581 169582 169583 169584 169585 169586 169587 169588 169589 169590 169591 169592 169593 169594 169595 169596 169597 169598 169599 169600 169601 169602 169603 169604 169605 169606 169607 169608 169609 169610 169611 169612 169613 169614 169615 169616 169617 169618 169619 169620 169621 169622 169623 169624 169625 169626 169627 169628 169629 169630 169631 169632 169633 169634 169635 169636 169637 169638 169639 169640 169641 169642 169643 169644 169645 169646 169647 169648 169649 169650 169651 169652 169653 169654 169655 169656 169657 169658 169659 169660 169661 169662 169663 169664 169665 169666 169667 169668 169669 169670 169671 169672 169673 169674 169675 169676 169677 169678 169679 169680 169681 169682 169683 169684 169685 169686 169687 169688 169689 169690 169691 169692 169693 169694 169695 169696 169697 169698 169699 169700 169701 169702 169703 169704 169705 169706 169707 169708 169709 169710 169711 169712 169713 169714 169715 169716 169717 169718 169719 169720 169721 169722 169723 169724 169725 169726 169727 169728 169729 169730 169731 169732 169733 169734 169735 169736 169737 169738 169739 169740 169741 169742 169743 169744 169745 169746 169747 169748 169749 169750 169751 169752 169753 169754 169755 169756 169757 169758 169759 169760 169761 169762 169763 169764 169765 169766 169767 169768 169769 169770 169771 169772 169773 169774 169775 169776 169777 169778 169779 169780 169781 169782 169783 169784 169785 169786 169787 169788 169789 169790 169791 169792 169793 169794 169795 169796 169797 169798 169799 169800 169801 169802 169803 169804 169805 169806 169807 169808 169809 169810 169811 169812 169813 169814 169815 169816 169817 169818 169819 169820 169821 169822 169823 169824 169825 169826 169827 169828 169829 169830 169831 169832 169833 169834 169835 169836 169837 169838 169839 169840 169841 169842 169843 169844 169845 169846 169847 169848 169849 169850 169851 169852 169853 169854 169855 169856 169857 169858 169859 169860 169861 169862 169863 169864 169865 169866 169867 169868 169869 169870 169871 169872 169873 169874 169875 169876 169877 169878 169879 169880 169881 169882 169883 169884 169885 169886 169887 169888 169889 169890 169891 169892 169893 169894 169895 169896 169897 169898 169899 169900 169901 169902 169903 169904 169905 169906 169907 169908 169909 169910 169911 169912 169913 169914 169915 169916 169917 169918 169919 169920 169921 169922 169923 169924 169925 169926 169927 169928 169929 169930 169931 169932 169933 169934 169935 169936 169937 169938 169939 169940 169941 169942 169943 169944 169945 169946 169947 169948 169949 169950 169951 169952 169953 169954 169955 169956 169957 169958 169959 169960 169961 169962 169963 169964 169965 169966 169967 169968 169969 169970 169971 169972 169973 169974 169975 169976 169977 169978 169979 169980 169981 169982 169983 169984 169985 169986 169987 169988 169989 169990 169991 169992 169993 169994 169995 169996 169997 169998 169999 170000 170001 170002 170003 170004 170005 170006 170007 170008 170009 170010 170011 170012 170013 170014 170015 170016 170017 170018 170019 170020 170021 170022 170023 170024 170025 170026 170027 170028 170029 170030 170031 170032 170033 170034 170035 170036 170037 170038 170039 170040 170041 170042 170043 170044 170045 170046 170047 170048 170049 170050 170051 170052 170053 170054 170055 170056 170057 170058 170059 170060 170061 170062 170063 170064 170065 170066 170067 170068 170069 170070 170071 170072 170073 170074 170075 170076 170077 170078 170079 170080 170081 170082 170083 170084 170085 170086 170087 170088 170089 170090 170091 170092 170093 170094 170095 170096 170097 170098 170099 170100 170101 170102 170103 170104 170105 170106 170107 170108 170109 170110 170111 170112 170113 170114 170115 170116 170117 170118 170119 170120 170121 170122 170123 170124 170125 170126 170127 170128 170129 170130 170131 170132 170133 170134 170135 170136 170137 170138 170139 170140 170141 170142 170143 170144 170145 170146 170147 170148 170149 170150 170151 170152 170153 170154 170155 170156 170157 170158 170159 170160 170161 170162 170163 170164 170165 170166 170167 170168 170169 170170 170171 170172 170173 170174 170175 170176 170177 170178 170179 170180 170181 170182 170183 170184 170185 170186 170187 170188 170189 170190 170191 170192 170193 170194 170195 170196 170197 170198 170199 170200 170201 170202 170203 170204 170205 170206 170207 170208 170209 170210 170211 170212 170213 170214 170215 170216 170217 170218 170219 170220 170221 170222 170223 170224 170225 170226 170227 170228 170229 170230 170231 170232 170233 170234 170235 170236 170237 170238 170239 170240 170241 170242 170243 170244 170245 170246 170247 170248 170249 170250 170251 170252 170253 170254 170255 170256 170257 170258 170259 170260 170261 170262 170263 170264 170265 170266 170267 170268 170269 170270 170271 170272 170273 170274 170275 170276 170277 170278 170279 170280 170281 170282 170283 170284 170285 170286 170287 170288 170289 170290 170291 170292 170293 170294 170295 170296 170297 170298 170299 170300 170301 170302 170303 170304 170305 170306 170307 170308 170309 170310 170311 170312 170313 170314 170315 170316 170317 170318 170319 170320 170321 170322 170323 170324 170325 170326 170327 170328 170329 170330 170331 170332 170333 170334 170335 170336 170337 170338 170339 170340 170341 170342 170343 170344 170345 170346 170347 170348 170349 170350 170351 170352 170353 170354 170355 170356 170357 170358 170359 170360 170361 170362 170363 170364 170365 170366 170367 170368 170369 170370 170371 170372 170373 170374 170375 170376 170377 170378 170379 170380 170381 170382 170383 170384 170385 170386 170387 170388 170389 170390 170391 170392 170393 170394 170395 170396 170397 170398 170399 170400 170401 170402 170403 170404 170405 170406 170407 170408 170409 170410 170411 170412 170413 170414 170415 170416 170417 170418 170419 170420 170421 170422 170423 170424 170425 170426 170427 170428 170429 170430 170431 170432 170433 170434 170435 170436 170437 170438 170439 170440 170441 170442 170443 170444 170445 170446 170447 170448 170449 170450 170451 170452 170453 170454 170455 170456 170457 170458 170459 170460 170461 170462 170463 170464 170465 170466 170467 170468 170469 170470 170471 170472 170473 170474 170475 170476 170477 170478 170479 170480 170481 170482 170483 170484 170485 170486 170487 170488 170489 170490 170491 170492 170493 170494 170495 170496 170497 170498 170499 170500 170501 170502 170503 170504 170505 170506 170507 170508 170509 170510 170511 170512 170513 170514 170515 170516 170517 170518 170519 170520 170521 170522 170523 170524 170525 170526 170527 170528 170529 170530 170531 170532 170533 170534 170535 170536 170537 170538 170539 170540 170541 170542 170543 170544 170545 170546 170547 170548 170549 170550 170551 170552 170553 170554 170555 170556 170557 170558 170559 170560 170561 170562 170563 170564 170565 170566 170567 170568 170569 170570 170571 170572 170573 170574 170575 170576 170577 170578 170579 170580 170581 170582 170583 170584 170585 170586 170587 170588 170589 170590 170591 170592 170593 170594 170595 170596 170597 170598 170599 170600 170601 170602 170603 170604 170605 170606 170607 170608 170609 170610 170611 170612 170613 170614 170615 170616 170617 170618 170619 170620 170621 170622 170623 170624 170625 170626 170627 170628 170629 170630 170631 170632 170633 170634 170635 170636 170637 170638 170639 170640 170641 170642 170643 170644 170645 170646 170647 170648 170649 170650 170651 170652 170653 170654 170655 170656 170657 170658 170659 170660 170661 170662 170663 170664 170665 170666 170667 170668 170669 170670 170671 170672 170673 170674 170675 170676 170677 170678 170679 170680 170681 170682 170683 170684 170685 170686 170687 170688 170689 170690 170691 170692 170693 170694 170695 170696 170697 170698 170699 170700 170701 170702 170703 170704 170705 170706 170707 170708 170709 170710 170711 170712 170713 170714 170715 170716 170717 170718 170719 170720 170721 170722 170723 170724 170725 170726 170727 170728 170729 170730 170731 170732 170733 170734 170735 170736 170737 170738 170739 170740 170741 170742 170743 170744 170745 170746 170747 170748 170749 170750 170751 170752 170753 170754 170755 170756 170757 170758 170759 170760 170761 170762 170763 170764 170765 170766 170767 170768 170769 170770 170771 170772 170773 170774 170775 170776 170777 170778 170779 170780 170781 170782 170783 170784 170785 170786 170787 170788 170789 170790 170791 170792 170793 170794 170795 170796 170797 170798 170799 170800 170801 170802 170803 170804 170805 170806 170807 170808 170809 170810 170811 170812 170813 170814 170815 170816 170817 170818 170819 170820 170821 170822 170823 170824 170825 170826 170827 170828 170829 170830 170831 170832 170833 170834 170835 170836 170837 170838 170839 170840 170841 170842 170843 170844 170845 170846 170847 170848 170849 170850 170851 170852 170853 170854 170855 170856 170857 170858 170859 170860 170861 170862 170863 170864 170865 170866 170867 170868 170869 170870 170871 170872 170873 170874 170875 170876 170877 170878 170879 170880 170881 170882 170883 170884 170885 170886 170887 170888 170889 170890 170891 170892 170893 170894 170895 170896 170897 170898 170899 170900 170901 170902 170903 170904 170905 170906 170907 170908 170909 170910 170911 170912 170913 170914 170915 170916 170917 170918 170919 170920 170921 170922 170923 170924 170925 170926 170927 170928 170929 170930 170931 170932 170933 170934 170935 170936 170937 170938 170939 170940 170941 170942 170943 170944 170945 170946 170947 170948 170949 170950 170951 170952 170953 170954 170955 170956 170957 170958 170959 170960 170961 170962 170963 170964 170965 170966 170967 170968 170969 170970 170971 170972 170973 170974 170975 170976 170977 170978 170979 170980 170981 170982 170983 170984 170985 170986 170987 170988 170989 170990 170991 170992 170993 170994 170995 170996 170997 170998 170999 171000 171001 171002 171003 171004 171005 171006 171007 171008 171009 171010 171011 171012 171013 171014 171015 171016 171017 171018 171019 171020 171021 171022 171023 171024 171025 171026 171027 171028 171029 171030 171031 171032 171033 171034 171035 171036 171037 171038 171039 171040 171041 171042 171043 171044 171045 171046 171047 171048 171049 171050 171051 171052 171053 171054 171055 171056 171057 171058 171059 171060 171061 171062 171063 171064 171065 171066 171067 171068 171069 171070 171071 171072 171073 171074 171075 171076 171077 171078 171079 171080 171081 171082 171083 171084 171085 171086 171087 171088 171089 171090 171091 171092 171093 171094 171095 171096 171097 171098 171099 171100 171101 171102 171103 171104 171105 171106 171107 171108 171109 171110 171111 171112 171113 171114 171115 171116 171117 171118 171119 171120 171121 171122 171123 171124 171125 171126 171127 171128 171129 171130 171131 171132 171133 171134 171135 171136 171137 171138 171139 171140 171141 171142 171143 171144 171145 171146 171147 171148 171149 171150 171151 171152 171153 171154 171155 171156 171157 171158 171159 171160 171161 171162 171163 171164 171165 171166 171167 171168 171169 171170 171171 171172 171173 171174 171175 171176 171177 171178 171179 171180 171181 171182 171183 171184 171185 171186 171187 171188 171189 171190 171191 171192 171193 171194 171195 171196 171197 171198 171199 171200 171201 171202 171203 171204 171205 171206 171207 171208 171209 171210 171211 171212 171213 171214 171215 171216 171217 171218 171219 171220 171221 171222 171223 171224 171225 171226 171227 171228 171229 171230 171231 171232 171233 171234 171235 171236 171237 171238 171239 171240 171241 171242 171243 171244 171245 171246 171247 171248 171249 171250 171251 171252 171253 171254 171255 171256 171257 171258 171259 171260 171261 171262 171263 171264 171265 171266 171267 171268 171269 171270 171271 171272 171273 171274 171275 171276 171277 171278 171279 171280 171281 171282 171283 171284 171285 171286 171287 171288 171289 171290 171291 171292 171293 171294 171295 171296 171297 171298 171299 171300 171301 171302 171303 171304 171305 171306 171307 171308 171309 171310 171311 171312 171313 171314 171315 171316 171317 171318 171319 171320 171321 171322 171323 171324 171325 171326 171327 171328 171329 171330 171331 171332 171333 171334 171335 171336 171337 171338 171339 171340 171341 171342 171343 171344 171345 171346 171347 171348 171349 171350 171351 171352 171353 171354 171355 171356 171357 171358 171359 171360 171361 171362 171363 171364 171365 171366 171367 171368 171369 171370 171371 171372 171373 171374 171375 171376 171377 171378 171379 171380 171381 171382 171383 171384 171385 171386 171387 171388 171389 171390 171391 171392 171393 171394 171395 171396 171397 171398 171399 171400 171401 171402 171403 171404 171405 171406 171407 171408 171409 171410 171411 171412 171413 171414 171415 171416 171417 171418 171419 171420 171421 171422 171423 171424 171425 171426 171427 171428 171429 171430 171431 171432 171433 171434 171435 171436 171437 171438 171439 171440 171441 171442 171443 171444 171445 171446 171447 171448 171449 171450 171451 171452 171453 171454 171455 171456 171457 171458 171459 171460 171461 171462 171463 171464 171465 171466 171467 171468 171469 171470 171471 171472 171473 171474 171475 171476 171477 171478 171479 171480 171481 171482 171483 171484 171485 171486 171487 171488 171489 171490 171491 171492 171493 171494 171495 171496 171497 171498 171499 171500 171501 171502 171503 171504 171505 171506 171507 171508 171509 171510 171511 171512 171513 171514 171515 171516 171517 171518 171519 171520 171521 171522 171523 171524 171525 171526 171527 171528 171529 171530 171531 171532 171533 171534 171535 171536 171537 171538 171539 171540 171541 171542 171543 171544 171545 171546 171547 171548 171549 171550 171551 171552 171553 171554 171555 171556 171557 171558 171559 171560 171561 171562 171563 171564 171565 171566 171567 171568 171569 171570 171571 171572 171573 171574 171575 171576 171577 171578 171579 171580 171581 171582 171583 171584 171585 171586 171587 171588 171589 171590 171591 171592 171593 171594 171595 171596 171597 171598 171599 171600 171601 171602 171603 171604 171605 171606 171607 171608 171609 171610 171611 171612 171613 171614 171615 171616 171617 171618 171619 171620 171621 171622 171623 171624 171625 171626 171627 171628 171629 171630 171631 171632 171633 171634 171635 171636 171637 171638 171639 171640 171641 171642 171643 171644 171645 171646 171647 171648 171649 171650 171651 171652 171653 171654 171655 171656 171657 171658 171659 171660 171661 171662 171663 171664 171665 171666 171667 171668 171669 171670 171671 171672 171673 171674 171675 171676 171677 171678 171679 171680 171681 171682 171683 171684 171685 171686 171687 171688 171689 171690 171691 171692 171693 171694 171695 171696 171697 171698 171699 171700 171701 171702 171703 171704 171705 171706 171707 171708 171709 171710 171711 171712 171713 171714 171715 171716 171717 171718 171719 171720 171721 171722 171723 171724 171725 171726 171727 171728 171729 171730 171731 171732 171733 171734 171735 171736 171737 171738 171739 171740 171741 171742 171743 171744 171745 171746 171747 171748 171749 171750 171751 171752 171753 171754 171755 171756 171757 171758 171759 171760 171761 171762 171763 171764 171765 171766 171767 171768 171769 171770 171771 171772 171773 171774 171775 171776 171777 171778 171779 171780 171781 171782 171783 171784 171785 171786 171787 171788 171789 171790 171791 171792 171793 171794 171795 171796 171797 171798 171799 171800 171801 171802 171803 171804 171805 171806 171807 171808 171809 171810 171811 171812 171813 171814 171815 171816 171817 171818 171819 171820 171821 171822 171823 171824 171825 171826 171827 171828 171829 171830 171831 171832 171833 171834 171835 171836 171837 171838 171839 171840 171841 171842 171843 171844 171845 171846 171847 171848 171849 171850 171851 171852 171853 171854 171855 171856 171857 171858 171859 171860 171861 171862 171863 171864 171865 171866 171867 171868 171869 171870 171871 171872 171873 171874 171875 171876 171877 171878 171879 171880 171881 171882 171883 171884 171885 171886 171887 171888 171889 171890 171891 171892 171893 171894 171895 171896 171897 171898 171899 171900 171901 171902 171903 171904 171905 171906 171907 171908 171909 171910 171911 171912 171913 171914 171915 171916 171917 171918 171919 171920 171921 171922 171923 171924 171925 171926 171927 171928 171929 171930 171931 171932 171933 171934 171935 171936 171937 171938 171939 171940 171941 171942 171943 171944 171945 171946 171947 171948 171949 171950 171951 171952 171953 171954 171955 171956 171957 171958 171959 171960 171961 171962 171963 171964 171965 171966 171967 171968 171969 171970 171971 171972 171973 171974 171975 171976 171977 171978 171979 171980 171981 171982 171983 171984 171985 171986 171987 171988 171989 171990 171991 171992 171993 171994 171995 171996 171997 171998 171999 172000 172001 172002 172003 172004 172005 172006 172007 172008 172009 172010 172011 172012 172013 172014 172015 172016 172017 172018 172019 172020 172021 172022 172023 172024 172025 172026 172027 172028 172029 172030 172031 172032 172033 172034 172035 172036 172037 172038 172039 172040 172041 172042 172043 172044 172045 172046 172047 172048 172049 172050 172051 172052 172053 172054 172055 172056 172057 172058 172059 172060 172061 172062 172063 172064 172065 172066 172067 172068 172069 172070 172071 172072 172073 172074 172075 172076 172077 172078 172079 172080 172081 172082 172083 172084 172085 172086 172087 172088 172089 172090 172091 172092 172093 172094 172095 172096 172097 172098 172099 172100 172101 172102 172103 172104 172105 172106 172107 172108 172109 172110 172111 172112 172113 172114 172115 172116 172117 172118 172119 172120 172121 172122 172123 172124 172125 172126 172127 172128 172129 172130 172131 172132 172133 172134 172135 172136 172137 172138 172139 172140 172141 172142 172143 172144 172145 172146 172147 172148 172149 172150 172151 172152 172153 172154 172155 172156 172157 172158 172159 172160 172161 172162 172163 172164 172165 172166 172167 172168 172169 172170 172171 172172 172173 172174 172175 172176 172177 172178 172179 172180 172181 172182 172183 172184 172185 172186 172187 172188 172189 172190 172191 172192 172193 172194 172195 172196 172197 172198 172199 172200 172201 172202 172203 172204 172205 172206 172207 172208 172209 172210 172211 172212 172213 172214 172215 172216 172217 172218 172219 172220 172221 172222 172223 172224 172225 172226 172227 172228 172229 172230 172231 172232 172233 172234 172235 172236 172237 172238 172239 172240 172241 172242 172243 172244 172245 172246 172247 172248 172249 172250 172251 172252 172253 172254 172255 172256 172257 172258 172259 172260 172261 172262 172263 172264 172265 172266 172267 172268 172269 172270 172271 172272 172273 172274 172275 172276 172277 172278 172279 172280 172281 172282 172283 172284 172285 172286 172287 172288 172289 172290 172291 172292 172293 172294 172295 172296 172297 172298 172299 172300 172301 172302 172303 172304 172305 172306 172307 172308 172309 172310 172311 172312 172313 172314 172315 172316 172317 172318 172319 172320 172321 172322 172323 172324 172325 172326 172327 172328 172329 172330 172331 172332 172333 172334 172335 172336 172337 172338 172339 172340 172341 172342 172343 172344 172345 172346 172347 172348 172349 172350 172351 172352 172353 172354 172355 172356 172357 172358 172359 172360 172361 172362 172363 172364 172365 172366 172367 172368 172369 172370 172371 172372 172373 172374 172375 172376 172377 172378 172379 172380 172381 172382 172383 172384 172385 172386 172387 172388 172389 172390 172391 172392 172393 172394 172395 172396 172397 172398 172399 172400 172401 172402 172403 172404 172405 172406 172407 172408 172409 172410 172411 172412 172413 172414 172415 172416 172417 172418 172419 172420 172421 172422 172423 172424 172425 172426 172427 172428 172429 172430 172431 172432 172433 172434 172435 172436 172437 172438 172439 172440 172441 172442 172443 172444 172445 172446 172447 172448 172449 172450 172451 172452 172453 172454 172455 172456 172457 172458 172459 172460 172461 172462 172463 172464 172465 172466 172467 172468 172469 172470 172471 172472 172473 172474 172475 172476 172477 172478 172479 172480 172481 172482 172483 172484 172485 172486 172487 172488 172489 172490 172491 172492 172493 172494 172495 172496 172497 172498 172499 172500 172501 172502 172503 172504 172505 172506 172507 172508 172509 172510 172511 172512 172513 172514 172515 172516 172517 172518 172519 172520 172521 172522 172523 172524 172525 172526 172527 172528 172529 172530 172531 172532 172533 172534 172535 172536 172537 172538 172539 172540 172541 172542 172543 172544 172545 172546 172547 172548 172549 172550 172551 172552 172553 172554 172555 172556 172557 172558 172559 172560 172561 172562 172563 172564 172565 172566 172567 172568 172569 172570 172571 172572 172573 172574 172575 172576 172577 172578 172579 172580 172581 172582 172583 172584 172585 172586 172587 172588 172589 172590 172591 172592 172593 172594 172595 172596 172597 172598 172599 172600 172601 172602 172603 172604 172605 172606 172607 172608 172609 172610 172611 172612 172613 172614 172615 172616 172617 172618 172619 172620 172621 172622 172623 172624 172625 172626 172627 172628 172629 172630 172631 172632 172633 172634 172635 172636 172637 172638 172639 172640 172641 172642 172643 172644 172645 172646 172647 172648 172649 172650 172651 172652 172653 172654 172655 172656 172657 172658 172659 172660 172661 172662 172663 172664 172665 172666 172667 172668 172669 172670 172671 172672 172673 172674 172675 172676 172677 172678 172679 172680 172681 172682 172683 172684 172685 172686 172687 172688 172689 172690 172691 172692 172693 172694 172695 172696 172697 172698 172699 172700 172701 172702 172703 172704 172705 172706 172707 172708 172709 172710 172711 172712 172713 172714 172715 172716 172717 172718 172719 172720 172721 172722 172723 172724 172725 172726 172727 172728 172729 172730 172731 172732 172733 172734 172735 172736 172737 172738 172739 172740 172741 172742 172743 172744 172745 172746 172747 172748 172749 172750 172751 172752 172753 172754 172755 172756 172757 172758 172759 172760 172761 172762 172763 172764 172765 172766 172767 172768 172769 172770 172771 172772 172773 172774 172775 172776 172777 172778 172779 172780 172781 172782 172783 172784 172785 172786 172787 172788 172789 172790 172791 172792 172793 172794 172795 172796 172797 172798 172799 172800 172801 172802 172803 172804 172805 172806 172807 172808 172809 172810 172811 172812 172813 172814 172815 172816 172817 172818 172819 172820 172821 172822 172823 172824 172825 172826 172827 172828 172829 172830 172831 172832 172833 172834 172835 172836 172837 172838 172839 172840 172841 172842 172843 172844 172845 172846 172847 172848 172849 172850 172851 172852 172853 172854 172855 172856 172857 172858 172859 172860 172861 172862 172863 172864 172865 172866 172867 172868 172869 172870 172871 172872 172873 172874 172875 172876 172877 172878 172879 172880 172881 172882 172883 172884 172885 172886 172887 172888 172889 172890 172891 172892 172893 172894 172895 172896 172897 172898 172899 172900 172901 172902 172903 172904 172905 172906 172907 172908 172909 172910 172911 172912 172913 172914 172915 172916 172917 172918 172919 172920 172921 172922 172923 172924 172925 172926 172927 172928 172929 172930 172931 172932 172933 172934 172935 172936 172937 172938 172939 172940 172941 172942 172943 172944 172945 172946 172947 172948 172949 172950 172951 172952 172953 172954 172955 172956 172957 172958 172959 172960 172961 172962 172963 172964 172965 172966 172967 172968 172969 172970 172971 172972 172973 172974 172975 172976 172977 172978 172979 172980 172981 172982 172983 172984 172985 172986 172987 172988 172989 172990 172991 172992 172993 172994 172995 172996 172997 172998 172999 173000 173001 173002 173003 173004 173005 173006 173007 173008 173009 173010 173011 173012 173013 173014 173015 173016 173017 173018 173019 173020 173021 173022 173023 173024 173025 173026 173027 173028 173029 173030 173031 173032 173033 173034 173035 173036 173037 173038 173039 173040 173041 173042 173043 173044 173045 173046 173047 173048 173049 173050 173051 173052 173053 173054 173055 173056 173057 173058 173059 173060 173061 173062 173063 173064 173065 173066 173067 173068 173069 173070 173071 173072 173073 173074 173075 173076 173077 173078 173079 173080 173081 173082 173083 173084 173085 173086 173087 173088 173089 173090 173091 173092 173093 173094 173095 173096 173097 173098 173099 173100 173101 173102 173103 173104 173105 173106 173107 173108 173109 173110 173111 173112 173113 173114 173115 173116 173117 173118 173119 173120 173121 173122 173123 173124 173125 173126 173127 173128 173129 173130 173131 173132 173133 173134 173135 173136 173137 173138 173139 173140 173141 173142 173143 173144 173145 173146 173147 173148 173149 173150 173151 173152 173153 173154 173155 173156 173157 173158 173159 173160 173161 173162 173163 173164 173165 173166 173167 173168 173169 173170 173171 173172 173173 173174 173175 173176 173177 173178 173179 173180 173181 173182 173183 173184 173185 173186 173187 173188 173189 173190 173191 173192 173193 173194 173195 173196 173197 173198 173199 173200 173201 173202 173203 173204 173205 173206 173207 173208 173209 173210 173211 173212 173213 173214 173215 173216 173217 173218 173219 173220 173221 173222 173223 173224 173225 173226 173227 173228 173229 173230 173231 173232 173233 173234 173235 173236 173237 173238 173239 173240 173241 173242 173243 173244 173245 173246 173247 173248 173249 173250 173251 173252 173253 173254 173255 173256 173257 173258 173259 173260 173261 173262 173263 173264 173265 173266 173267 173268 173269 173270 173271 173272 173273 173274 173275 173276 173277 173278 173279 173280 173281 173282 173283 173284 173285 173286 173287 173288 173289 173290 173291 173292 173293 173294 173295 173296 173297 173298 173299 173300 173301 173302 173303 173304 173305 173306 173307 173308 173309 173310 173311 173312 173313 173314 173315 173316 173317 173318 173319 173320 173321 173322 173323 173324 173325 173326 173327 173328 173329 173330 173331 173332 173333 173334 173335 173336 173337 173338 173339 173340 173341 173342 173343 173344 173345 173346 173347 173348 173349 173350 173351 173352 173353 173354 173355 173356 173357 173358 173359 173360 173361 173362 173363 173364 173365 173366 173367 173368 173369 173370 173371 173372 173373 173374 173375 173376 173377 173378 173379 173380 173381 173382 173383 173384 173385 173386 173387 173388 173389 173390 173391 173392 173393 173394 173395 173396 173397 173398 173399 173400 173401 173402 173403 173404 173405 173406 173407 173408 173409 173410 173411 173412 173413 173414 173415 173416 173417 173418 173419 173420 173421 173422 173423 173424 173425 173426 173427 173428 173429 173430 173431 173432 173433 173434 173435 173436 173437 173438 173439 173440 173441 173442 173443 173444 173445 173446 173447 173448 173449 173450 173451 173452 173453 173454 173455 173456 173457 173458 173459 173460 173461 173462 173463 173464 173465 173466 173467 173468 173469 173470 173471 173472 173473 173474 173475 173476 173477 173478 173479 173480 173481 173482 173483 173484 173485 173486 173487 173488 173489 173490 173491 173492 173493 173494 173495 173496 173497 173498 173499 173500 173501 173502 173503 173504 173505 173506 173507 173508 173509 173510 173511 173512 173513 173514 173515 173516 173517 173518 173519 173520 173521 173522 173523 173524 173525 173526 173527 173528 173529 173530 173531 173532 173533 173534 173535 173536 173537 173538 173539 173540 173541 173542 173543 173544 173545 173546 173547 173548 173549 173550 173551 173552 173553 173554 173555 173556 173557 173558 173559 173560 173561 173562 173563 173564 173565 173566 173567 173568 173569 173570 173571 173572 173573 173574 173575 173576 173577 173578 173579 173580 173581 173582 173583 173584 173585 173586 173587 173588 173589 173590 173591 173592 173593 173594 173595 173596 173597 173598 173599 173600 173601 173602 173603 173604 173605 173606 173607 173608 173609 173610 173611 173612 173613 173614 173615 173616 173617 173618 173619 173620 173621 173622 173623 173624 173625 173626 173627 173628 173629 173630 173631 173632 173633 173634 173635 173636 173637 173638 173639 173640 173641 173642 173643 173644 173645 173646 173647 173648 173649 173650 173651 173652 173653 173654 173655 173656 173657 173658 173659 173660 173661 173662 173663 173664 173665 173666 173667 173668 173669 173670 173671 173672 173673 173674 173675 173676 173677 173678 173679 173680 173681 173682 173683 173684 173685 173686 173687 173688 173689 173690 173691 173692 173693 173694 173695 173696 173697 173698 173699 173700 173701 173702 173703 173704 173705 173706 173707 173708 173709 173710 173711 173712 173713 173714 173715 173716 173717 173718 173719 173720 173721 173722 173723 173724 173725 173726 173727 173728 173729 173730 173731 173732 173733 173734 173735 173736 173737 173738 173739 173740 173741 173742 173743 173744 173745 173746 173747 173748 173749 173750 173751 173752 173753 173754 173755 173756 173757 173758 173759 173760 173761 173762 173763 173764 173765 173766 173767 173768 173769 173770 173771 173772 173773 173774 173775 173776 173777 173778 173779 173780 173781 173782 173783 173784 173785 173786 173787 173788 173789 173790 173791 173792 173793 173794 173795 173796 173797 173798 173799 173800 173801 173802 173803 173804 173805 173806 173807 173808 173809 173810 173811 173812 173813 173814 173815 173816 173817 173818 173819 173820 173821 173822 173823 173824 173825 173826 173827 173828 173829 173830 173831 173832 173833 173834 173835 173836 173837 173838 173839 173840 173841 173842 173843 173844 173845 173846 173847 173848 173849 173850 173851 173852 173853 173854 173855 173856 173857 173858 173859 173860 173861 173862 173863 173864 173865 173866 173867 173868 173869 173870 173871 173872 173873 173874 173875 173876 173877 173878 173879 173880 173881 173882 173883 173884 173885 173886 173887 173888 173889 173890 173891 173892 173893 173894 173895 173896 173897 173898 173899 173900 173901 173902 173903 173904 173905 173906 173907 173908 173909 173910 173911 173912 173913 173914 173915 173916 173917 173918 173919 173920 173921 173922 173923 173924 173925 173926 173927 173928 173929 173930 173931 173932 173933 173934 173935 173936 173937 173938 173939 173940 173941 173942 173943 173944 173945 173946 173947 173948 173949 173950 173951 173952 173953 173954 173955 173956 173957 173958 173959 173960 173961 173962 173963 173964 173965 173966 173967 173968 173969 173970 173971 173972 173973 173974 173975 173976 173977 173978 173979 173980 173981 173982 173983 173984 173985 173986 173987 173988 173989 173990 173991 173992 173993 173994 173995 173996 173997 173998 173999 174000 174001 174002 174003 174004 174005 174006 174007 174008 174009 174010 174011 174012 174013 174014 174015 174016 174017 174018 174019 174020 174021 174022 174023 174024 174025 174026 174027 174028 174029 174030 174031 174032 174033 174034 174035 174036 174037 174038 174039 174040 174041 174042 174043 174044 174045 174046 174047 174048 174049 174050 174051 174052 174053 174054 174055 174056 174057 174058 174059 174060 174061 174062 174063 174064 174065 174066 174067 174068 174069 174070 174071 174072 174073 174074 174075 174076 174077 174078 174079 174080 174081 174082 174083 174084 174085 174086 174087 174088 174089 174090 174091 174092 174093 174094 174095 174096 174097 174098 174099 174100 174101 174102 174103 174104 174105 174106 174107 174108 174109 174110 174111 174112 174113 174114 174115 174116 174117 174118 174119 174120 174121 174122 174123 174124 174125 174126 174127 174128 174129 174130 174131 174132 174133 174134 174135 174136 174137 174138 174139 174140 174141 174142 174143 174144 174145 174146 174147 174148 174149 174150 174151 174152 174153 174154 174155 174156 174157 174158 174159 174160 174161 174162 174163 174164 174165 174166 174167 174168 174169 174170 174171 174172 174173 174174 174175 174176 174177 174178 174179 174180 174181 174182 174183 174184 174185 174186 174187 174188 174189 174190 174191 174192 174193 174194 174195 174196 174197 174198 174199 174200 174201 174202 174203 174204 174205 174206 174207 174208 174209 174210 174211 174212 174213 174214 174215 174216 174217 174218 174219 174220 174221 174222 174223 174224 174225 174226 174227 174228 174229 174230 174231 174232 174233 174234 174235 174236 174237 174238 174239 174240 174241 174242 174243 174244 174245 174246 174247 174248 174249 174250 174251 174252 174253 174254 174255 174256 174257 174258 174259 174260 174261 174262 174263 174264 174265 174266 174267 174268 174269 174270 174271 174272 174273 174274 174275 174276 174277 174278 174279 174280 174281 174282 174283 174284 174285 174286 174287 174288 174289 174290 174291 174292 174293 174294 174295 174296 174297 174298 174299 174300 174301 174302 174303 174304 174305 174306 174307 174308 174309 174310 174311 174312 174313 174314 174315 174316 174317 174318 174319 174320 174321 174322 174323 174324 174325 174326 174327 174328 174329 174330 174331 174332 174333 174334 174335 174336 174337 174338 174339 174340 174341 174342 174343 174344 174345 174346 174347 174348 174349 174350 174351 174352 174353 174354 174355 174356 174357 174358 174359 174360 174361 174362 174363 174364 174365 174366 174367 174368 174369 174370 174371 174372 174373 174374 174375 174376 174377 174378 174379 174380 174381 174382 174383 174384 174385 174386 174387 174388 174389 174390 174391 174392 174393 174394 174395 174396 174397 174398 174399 174400 174401 174402 174403 174404 174405 174406 174407 174408 174409 174410 174411 174412 174413 174414 174415 174416 174417 174418 174419 174420 174421 174422 174423 174424 174425 174426 174427 174428 174429 174430 174431 174432 174433 174434 174435 174436 174437 174438 174439 174440 174441 174442 174443 174444 174445 174446 174447 174448 174449 174450 174451 174452 174453 174454 174455 174456 174457 174458 174459 174460 174461 174462 174463 174464 174465 174466 174467 174468 174469 174470 174471 174472 174473 174474 174475 174476 174477 174478 174479 174480 174481 174482 174483 174484 174485 174486 174487 174488 174489 174490 174491 174492 174493 174494 174495 174496 174497 174498 174499 174500 174501 174502 174503 174504 174505 174506 174507 174508 174509 174510 174511 174512 174513 174514 174515 174516 174517 174518 174519 174520 174521 174522 174523 174524 174525 174526 174527 174528 174529 174530 174531 174532 174533 174534 174535 174536 174537 174538 174539 174540 174541 174542 174543 174544 174545 174546 174547 174548 174549 174550 174551 174552 174553 174554 174555 174556 174557 174558 174559 174560 174561 174562 174563 174564 174565 174566 174567 174568 174569 174570 174571 174572 174573 174574 174575 174576 174577 174578 174579 174580 174581 174582 174583 174584 174585 174586 174587 174588 174589 174590 174591 174592 174593 174594 174595 174596 174597 174598 174599 174600 174601 174602 174603 174604 174605 174606 174607 174608 174609 174610 174611 174612 174613 174614 174615 174616 174617 174618 174619 174620 174621 174622 174623 174624 174625 174626 174627 174628 174629 174630 174631 174632 174633 174634 174635 174636 174637 174638 174639 174640 174641 174642 174643 174644 174645 174646 174647 174648 174649 174650 174651 174652 174653 174654 174655 174656 174657 174658 174659 174660 174661 174662 174663 174664 174665 174666 174667 174668 174669 174670 174671 174672 174673 174674 174675 174676 174677 174678 174679 174680 174681 174682 174683 174684 174685 174686 174687 174688 174689 174690 174691 174692 174693 174694 174695 174696 174697 174698 174699 174700 174701 174702 174703 174704 174705 174706 174707 174708 174709 174710 174711 174712 174713 174714 174715 174716 174717 174718 174719 174720 174721 174722 174723 174724 174725 174726 174727 174728 174729 174730 174731 174732 174733 174734 174735 174736 174737 174738 174739 174740 174741 174742 174743 174744 174745 174746 174747 174748 174749 174750 174751 174752 174753 174754 174755 174756 174757 174758 174759 174760 174761 174762 174763 174764 174765 174766 174767 174768 174769 174770 174771 174772 174773 174774 174775 174776 174777 174778 174779 174780 174781 174782 174783 174784 174785 174786 174787 174788 174789 174790 174791 174792 174793 174794 174795 174796 174797 174798 174799 174800 174801 174802 174803 174804 174805 174806 174807 174808 174809 174810 174811 174812 174813 174814 174815 174816 174817 174818 174819 174820 174821 174822 174823 174824 174825 174826 174827 174828 174829 174830 174831 174832 174833 174834 174835 174836 174837 174838 174839 174840 174841 174842 174843 174844 174845 174846 174847 174848 174849 174850 174851 174852 174853 174854 174855 174856 174857 174858 174859 174860 174861 174862 174863 174864 174865 174866 174867 174868 174869 174870 174871 174872 174873 174874 174875 174876 174877 174878 174879 174880 174881 174882 174883 174884 174885 174886 174887 174888 174889 174890 174891 174892 174893 174894 174895 174896 174897 174898 174899 174900 174901 174902 174903 174904 174905 174906 174907 174908 174909 174910 174911 174912 174913 174914 174915 174916 174917 174918 174919 174920 174921 174922 174923 174924 174925 174926 174927 174928 174929 174930 174931 174932 174933 174934 174935 174936 174937 174938 174939 174940 174941 174942 174943 174944 174945 174946 174947 174948 174949 174950 174951 174952 174953 174954 174955 174956 174957 174958 174959 174960 174961 174962 174963 174964 174965 174966 174967 174968 174969 174970 174971 174972 174973 174974 174975 174976 174977 174978 174979 174980 174981 174982 174983 174984 174985 174986 174987 174988 174989 174990 174991 174992 174993 174994 174995 174996 174997 174998 174999 175000 175001 175002 175003 175004 175005 175006 175007 175008 175009 175010 175011 175012 175013 175014 175015 175016 175017 175018 175019 175020 175021 175022 175023 175024 175025 175026 175027 175028 175029 175030 175031 175032 175033 175034 175035 175036 175037 175038 175039 175040 175041 175042 175043 175044 175045 175046 175047 175048 175049 175050 175051 175052 175053 175054 175055 175056 175057 175058 175059 175060 175061 175062 175063 175064 175065 175066 175067 175068 175069 175070 175071 175072 175073 175074 175075 175076 175077 175078 175079 175080 175081 175082 175083 175084 175085 175086 175087 175088 175089 175090 175091 175092 175093 175094 175095 175096 175097 175098 175099 175100 175101 175102 175103 175104 175105 175106 175107 175108 175109 175110 175111 175112 175113 175114 175115 175116 175117 175118 175119 175120 175121 175122 175123 175124 175125 175126 175127 175128 175129 175130 175131 175132 175133 175134 175135 175136 175137 175138 175139 175140 175141 175142 175143 175144 175145 175146 175147 175148 175149 175150 175151 175152 175153 175154 175155 175156 175157 175158 175159 175160 175161 175162 175163 175164 175165 175166 175167 175168 175169 175170 175171 175172 175173 175174 175175 175176 175177 175178 175179 175180 175181 175182 175183 175184 175185 175186 175187 175188 175189 175190 175191 175192 175193 175194 175195 175196 175197 175198 175199 175200 175201 175202 175203 175204 175205 175206 175207 175208 175209 175210 175211 175212 175213 175214 175215 175216 175217 175218 175219 175220 175221 175222 175223 175224 175225 175226 175227 175228 175229 175230 175231 175232 175233 175234 175235 175236 175237 175238 175239 175240 175241 175242 175243 175244 175245 175246 175247 175248 175249 175250 175251 175252 175253 175254 175255 175256 175257 175258 175259 175260 175261 175262 175263 175264 175265 175266 175267 175268 175269 175270 175271 175272 175273 175274 175275 175276 175277 175278 175279 175280 175281 175282 175283 175284 175285 175286 175287 175288 175289 175290 175291 175292 175293 175294 175295 175296 175297 175298 175299 175300 175301 175302 175303 175304 175305 175306 175307 175308 175309 175310 175311 175312 175313 175314 175315 175316 175317 175318 175319 175320 175321 175322 175323 175324 175325 175326 175327 175328 175329 175330 175331 175332 175333 175334 175335 175336 175337 175338 175339 175340 175341 175342 175343 175344 175345 175346 175347 175348 175349 175350 175351 175352 175353 175354 175355 175356 175357 175358 175359 175360 175361 175362 175363 175364 175365 175366 175367 175368 175369 175370 175371 175372 175373 175374 175375 175376 175377 175378 175379 175380 175381 175382 175383 175384 175385 175386 175387 175388 175389 175390 175391 175392 175393 175394 175395 175396 175397 175398 175399 175400 175401 175402 175403 175404 175405 175406 175407 175408 175409 175410 175411 175412 175413 175414 175415 175416 175417 175418 175419 175420 175421 175422 175423 175424 175425 175426 175427 175428 175429 175430 175431 175432 175433 175434 175435 175436 175437 175438 175439 175440 175441 175442 175443 175444 175445 175446 175447 175448 175449 175450 175451 175452 175453 175454 175455 175456 175457 175458 175459 175460 175461 175462 175463 175464 175465 175466 175467 175468 175469 175470 175471 175472 175473 175474 175475 175476 175477 175478 175479 175480 175481 175482 175483 175484 175485 175486 175487 175488 175489 175490 175491 175492 175493 175494 175495 175496 175497 175498 175499 175500 175501 175502 175503 175504 175505 175506 175507 175508 175509 175510 175511 175512 175513 175514 175515 175516 175517 175518 175519 175520 175521 175522 175523 175524 175525 175526 175527 175528 175529 175530 175531 175532 175533 175534 175535 175536 175537 175538 175539 175540 175541 175542 175543 175544 175545 175546 175547 175548 175549 175550 175551 175552 175553 175554 175555 175556 175557 175558 175559 175560 175561 175562 175563 175564 175565 175566 175567 175568 175569 175570 175571 175572 175573 175574 175575 175576 175577 175578 175579 175580 175581 175582 175583 175584 175585 175586 175587 175588 175589 175590 175591 175592 175593 175594 175595 175596 175597 175598 175599 175600 175601 175602 175603 175604 175605 175606 175607 175608 175609 175610 175611 175612 175613 175614 175615 175616 175617 175618 175619 175620 175621 175622 175623 175624 175625 175626 175627 175628 175629 175630 175631 175632 175633 175634 175635 175636 175637 175638 175639 175640 175641 175642 175643 175644 175645 175646 175647 175648 175649 175650 175651 175652 175653 175654 175655 175656 175657 175658 175659 175660 175661 175662 175663 175664 175665 175666 175667 175668 175669 175670 175671 175672 175673 175674 175675 175676 175677 175678 175679 175680 175681 175682 175683 175684 175685 175686 175687 175688 175689 175690 175691 175692 175693 175694 175695 175696 175697 175698 175699 175700 175701 175702 175703 175704 175705 175706 175707 175708 175709 175710 175711 175712 175713 175714 175715 175716 175717 175718 175719 175720 175721 175722 175723 175724 175725 175726 175727 175728 175729 175730 175731 175732 175733 175734 175735 175736 175737 175738 175739 175740 175741 175742 175743 175744 175745 175746 175747 175748 175749 175750 175751 175752 175753 175754 175755 175756 175757 175758 175759 175760 175761 175762 175763 175764 175765 175766 175767 175768 175769 175770 175771 175772 175773 175774 175775 175776 175777 175778 175779 175780 175781 175782 175783 175784 175785 175786 175787 175788 175789 175790 175791 175792 175793 175794 175795 175796 175797 175798 175799 175800 175801 175802 175803 175804 175805 175806 175807 175808 175809 175810 175811 175812 175813 175814 175815 175816 175817 175818 175819 175820 175821 175822 175823 175824 175825 175826 175827 175828 175829 175830 175831 175832 175833 175834 175835 175836 175837 175838 175839 175840 175841 175842 175843 175844 175845 175846 175847 175848 175849 175850 175851 175852 175853 175854 175855 175856 175857 175858 175859 175860 175861 175862 175863 175864 175865 175866 175867 175868 175869 175870 175871 175872 175873 175874 175875 175876 175877 175878 175879 175880 175881 175882 175883 175884 175885 175886 175887 175888 175889 175890 175891 175892 175893 175894 175895 175896 175897 175898 175899 175900 175901 175902 175903 175904 175905 175906 175907 175908 175909 175910 175911 175912 175913 175914 175915 175916 175917 175918 175919 175920 175921 175922 175923 175924 175925 175926 175927 175928 175929 175930 175931 175932 175933 175934 175935 175936 175937 175938 175939 175940 175941 175942 175943 175944 175945 175946 175947 175948 175949 175950 175951 175952 175953 175954 175955 175956 175957 175958 175959 175960 175961 175962 175963 175964 175965 175966 175967 175968 175969 175970 175971 175972 175973 175974 175975 175976 175977 175978 175979 175980 175981 175982 175983 175984 175985 175986 175987 175988 175989 175990 175991 175992 175993 175994 175995 175996 175997 175998 175999 176000 176001 176002 176003 176004 176005 176006 176007 176008 176009 176010 176011 176012 176013 176014 176015 176016 176017 176018 176019 176020 176021 176022 176023 176024 176025 176026 176027 176028 176029 176030 176031 176032 176033 176034 176035 176036 176037 176038 176039 176040 176041 176042 176043 176044 176045 176046 176047 176048 176049 176050 176051 176052 176053 176054 176055 176056 176057 176058 176059 176060 176061 176062 176063 176064 176065 176066 176067 176068 176069 176070 176071 176072 176073 176074 176075 176076 176077 176078 176079 176080 176081 176082 176083 176084 176085 176086 176087 176088 176089 176090 176091 176092 176093 176094 176095 176096 176097 176098 176099 176100 176101 176102 176103 176104 176105 176106 176107 176108 176109 176110 176111 176112 176113 176114 176115 176116 176117 176118 176119 176120 176121 176122 176123 176124 176125 176126 176127 176128 176129 176130 176131 176132 176133 176134 176135 176136 176137 176138 176139 176140 176141 176142 176143 176144 176145 176146 176147 176148 176149 176150 176151 176152 176153 176154 176155 176156 176157 176158 176159 176160 176161 176162 176163 176164 176165 176166 176167 176168 176169 176170 176171 176172 176173 176174 176175 176176 176177 176178 176179 176180 176181 176182 176183 176184 176185 176186 176187 176188 176189 176190 176191 176192 176193 176194 176195 176196 176197 176198 176199 176200 176201 176202 176203 176204 176205 176206 176207 176208 176209 176210 176211 176212 176213 176214 176215 176216 176217 176218 176219 176220 176221 176222 176223 176224 176225 176226 176227 176228 176229 176230 176231 176232 176233 176234 176235 176236 176237 176238 176239 176240 176241 176242 176243 176244 176245 176246 176247 176248 176249 176250 176251 176252 176253 176254 176255 176256 176257 176258 176259 176260 176261 176262 176263 176264 176265 176266 176267 176268 176269 176270 176271 176272 176273 176274 176275 176276 176277 176278 176279 176280 176281 176282 176283 176284 176285 176286 176287 176288 176289 176290 176291 176292 176293 176294 176295 176296 176297 176298 176299 176300 176301 176302 176303 176304 176305 176306 176307 176308 176309 176310 176311 176312 176313 176314 176315 176316 176317 176318 176319 176320 176321 176322 176323 176324 176325 176326 176327 176328 176329 176330 176331 176332 176333 176334 176335 176336 176337 176338 176339 176340 176341 176342 176343 176344 176345 176346 176347 176348 176349 176350 176351 176352 176353 176354 176355 176356 176357 176358 176359 176360 176361 176362 176363 176364 176365 176366 176367 176368 176369 176370 176371 176372 176373 176374 176375 176376 176377 176378 176379 176380 176381 176382 176383 176384 176385 176386 176387 176388 176389 176390 176391 176392 176393 176394 176395 176396 176397 176398 176399 176400 176401 176402 176403 176404 176405 176406 176407 176408 176409 176410 176411 176412 176413 176414 176415 176416 176417 176418 176419 176420 176421 176422 176423 176424 176425 176426 176427 176428 176429 176430 176431 176432 176433 176434 176435 176436 176437 176438 176439 176440 176441 176442 176443 176444 176445 176446 176447 176448 176449 176450 176451 176452 176453 176454 176455 176456 176457 176458 176459 176460 176461 176462 176463 176464 176465 176466 176467 176468 176469 176470 176471 176472 176473 176474 176475 176476 176477 176478 176479 176480 176481 176482 176483 176484 176485 176486 176487 176488 176489 176490 176491 176492 176493 176494 176495 176496 176497 176498 176499 176500 176501 176502 176503 176504 176505 176506 176507 176508 176509 176510 176511 176512 176513 176514 176515 176516 176517 176518 176519 176520 176521 176522 176523 176524 176525 176526 176527 176528 176529 176530 176531 176532 176533 176534 176535 176536 176537 176538 176539 176540 176541 176542 176543 176544 176545 176546 176547 176548 176549 176550 176551 176552 176553 176554 176555 176556 176557 176558 176559 176560 176561 176562 176563 176564 176565 176566 176567 176568 176569 176570 176571 176572 176573 176574 176575 176576 176577 176578 176579 176580 176581 176582 176583 176584 176585 176586 176587 176588 176589 176590 176591 176592 176593 176594 176595 176596 176597 176598 176599 176600 176601 176602 176603 176604 176605 176606 176607 176608 176609 176610 176611 176612 176613 176614 176615 176616 176617 176618 176619 176620 176621 176622 176623 176624 176625 176626 176627 176628 176629 176630 176631 176632 176633 176634 176635 176636 176637 176638 176639 176640 176641 176642 176643 176644 176645 176646 176647 176648 176649 176650 176651 176652 176653 176654 176655 176656 176657 176658 176659 176660 176661 176662 176663 176664 176665 176666 176667 176668 176669 176670 176671 176672 176673 176674 176675 176676 176677 176678 176679 176680 176681 176682 176683 176684 176685 176686 176687 176688 176689 176690 176691 176692 176693 176694 176695 176696 176697 176698 176699 176700 176701 176702 176703 176704 176705 176706 176707 176708 176709 176710 176711 176712 176713 176714 176715 176716 176717 176718 176719 176720 176721 176722 176723 176724 176725 176726 176727 176728 176729 176730 176731 176732 176733 176734 176735 176736 176737 176738 176739 176740 176741 176742 176743 176744 176745 176746 176747 176748 176749 176750 176751 176752 176753 176754 176755 176756 176757 176758 176759 176760 176761 176762 176763 176764 176765 176766 176767 176768 176769 176770 176771 176772 176773 176774 176775 176776 176777 176778 176779 176780 176781 176782 176783 176784 176785 176786 176787 176788 176789 176790 176791 176792 176793 176794 176795 176796 176797 176798 176799 176800 176801 176802 176803 176804 176805 176806 176807 176808 176809 176810 176811 176812 176813 176814 176815 176816 176817 176818 176819 176820 176821 176822 176823 176824 176825 176826 176827 176828 176829 176830 176831 176832 176833 176834 176835 176836 176837 176838 176839 176840 176841 176842 176843 176844 176845 176846 176847 176848 176849 176850 176851 176852 176853 176854 176855 176856 176857 176858 176859 176860 176861 176862 176863 176864 176865 176866 176867 176868 176869 176870 176871 176872 176873 176874 176875 176876 176877 176878 176879 176880 176881 176882 176883 176884 176885 176886 176887 176888 176889 176890 176891 176892 176893 176894 176895 176896 176897 176898 176899 176900 176901 176902 176903 176904 176905 176906 176907 176908 176909 176910 176911 176912 176913 176914 176915 176916 176917 176918 176919 176920 176921 176922 176923 176924 176925 176926 176927 176928 176929 176930 176931 176932 176933 176934 176935 176936 176937 176938 176939 176940 176941 176942 176943 176944 176945 176946 176947 176948 176949 176950 176951 176952 176953 176954 176955 176956 176957 176958 176959 176960 176961 176962 176963 176964 176965 176966 176967 176968 176969 176970 176971 176972 176973 176974 176975 176976 176977 176978 176979 176980 176981 176982 176983 176984 176985 176986 176987 176988 176989 176990 176991 176992 176993 176994 176995 176996 176997 176998 176999 177000 177001 177002 177003 177004 177005 177006 177007 177008 177009 177010 177011 177012 177013 177014 177015 177016 177017 177018 177019 177020 177021 177022 177023 177024 177025 177026 177027 177028 177029 177030 177031 177032 177033 177034 177035 177036 177037 177038 177039 177040 177041 177042 177043 177044 177045 177046 177047 177048 177049 177050 177051 177052 177053 177054 177055 177056 177057 177058 177059 177060 177061 177062 177063 177064 177065 177066 177067 177068 177069 177070 177071 177072 177073 177074 177075 177076 177077 177078 177079 177080 177081 177082 177083 177084 177085 177086 177087 177088 177089 177090 177091 177092 177093 177094 177095 177096 177097 177098 177099 177100 177101 177102 177103 177104 177105 177106 177107 177108 177109 177110 177111 177112 177113 177114 177115 177116 177117 177118 177119 177120 177121 177122 177123 177124 177125 177126 177127 177128 177129 177130 177131 177132 177133 177134 177135 177136 177137 177138 177139 177140 177141 177142 177143 177144 177145 177146 177147 177148 177149 177150 177151 177152 177153 177154 177155 177156 177157 177158 177159 177160 177161 177162 177163 177164 177165 177166 177167 177168 177169 177170 177171 177172 177173 177174 177175 177176 177177 177178 177179 177180 177181 177182 177183 177184 177185 177186 177187 177188 177189 177190 177191 177192 177193 177194 177195 177196 177197 177198 177199 177200 177201 177202 177203 177204 177205 177206 177207 177208 177209 177210 177211 177212 177213 177214 177215 177216 177217 177218 177219 177220 177221 177222 177223 177224 177225 177226 177227 177228 177229 177230 177231 177232 177233 177234 177235 177236 177237 177238 177239 177240 177241 177242 177243 177244 177245 177246 177247 177248 177249 177250 177251 177252 177253 177254 177255 177256 177257 177258 177259 177260 177261 177262 177263 177264 177265 177266 177267 177268 177269 177270 177271 177272 177273 177274 177275 177276 177277 177278 177279 177280 177281 177282 177283 177284 177285 177286 177287 177288 177289 177290 177291 177292 177293 177294 177295 177296 177297 177298 177299 177300 177301 177302 177303 177304 177305 177306 177307 177308 177309 177310 177311 177312 177313 177314 177315 177316 177317 177318 177319 177320 177321 177322 177323 177324 177325 177326 177327 177328 177329 177330 177331 177332 177333 177334 177335 177336 177337 177338 177339 177340 177341 177342 177343 177344 177345 177346 177347 177348 177349 177350 177351 177352 177353 177354 177355 177356 177357 177358 177359 177360 177361 177362 177363 177364 177365 177366 177367 177368 177369 177370 177371 177372 177373 177374 177375 177376 177377 177378 177379 177380 177381 177382 177383 177384 177385 177386 177387 177388 177389 177390 177391 177392 177393 177394 177395 177396 177397 177398 177399 177400 177401 177402 177403 177404 177405 177406 177407 177408 177409 177410 177411 177412 177413 177414 177415 177416 177417 177418 177419 177420 177421 177422 177423 177424 177425 177426 177427 177428 177429 177430 177431 177432 177433 177434 177435 177436 177437 177438 177439 177440 177441 177442 177443 177444 177445 177446 177447 177448 177449 177450 177451 177452 177453 177454 177455 177456 177457 177458 177459 177460 177461 177462 177463 177464 177465 177466 177467 177468 177469 177470 177471 177472 177473 177474 177475 177476 177477 177478 177479 177480 177481 177482 177483 177484 177485 177486 177487 177488 177489 177490 177491 177492 177493 177494 177495 177496 177497 177498 177499 177500 177501 177502 177503 177504 177505 177506 177507 177508 177509 177510 177511 177512 177513 177514 177515 177516 177517 177518 177519 177520 177521 177522 177523 177524 177525 177526 177527 177528 177529 177530 177531 177532 177533 177534 177535 177536 177537 177538 177539 177540 177541 177542 177543 177544 177545 177546 177547 177548 177549 177550 177551 177552 177553 177554 177555 177556 177557 177558 177559 177560 177561 177562 177563 177564 177565 177566 177567 177568 177569 177570 177571 177572 177573 177574 177575 177576 177577 177578 177579 177580 177581 177582 177583 177584 177585 177586 177587 177588 177589 177590 177591 177592 177593 177594 177595 177596 177597 177598 177599 177600 177601 177602 177603 177604 177605 177606 177607 177608 177609 177610 177611 177612 177613 177614 177615 177616 177617 177618 177619 177620 177621 177622 177623 177624 177625 177626 177627 177628 177629 177630 177631 177632 177633 177634 177635 177636 177637 177638 177639 177640 177641 177642 177643 177644 177645 177646 177647 177648 177649 177650 177651 177652 177653 177654 177655 177656 177657 177658 177659 177660 177661 177662 177663 177664 177665 177666 177667 177668 177669 177670 177671 177672 177673 177674 177675 177676 177677 177678 177679 177680 177681 177682 177683 177684 177685 177686 177687 177688 177689 177690 177691 177692 177693 177694 177695 177696 177697 177698 177699 177700 177701 177702 177703 177704 177705 177706 177707 177708 177709 177710 177711 177712 177713 177714 177715 177716 177717 177718 177719 177720 177721 177722 177723 177724 177725 177726 177727 177728 177729 177730 177731 177732 177733 177734 177735 177736 177737 177738 177739 177740 177741 177742 177743 177744 177745 177746 177747 177748 177749 177750 177751 177752 177753 177754 177755 177756 177757 177758 177759 177760 177761 177762 177763 177764 177765 177766 177767 177768 177769 177770 177771 177772 177773 177774 177775 177776 177777 177778 177779 177780 177781 177782 177783 177784 177785 177786 177787 177788 177789 177790 177791 177792 177793 177794 177795 177796 177797 177798 177799 177800 177801 177802 177803 177804 177805 177806 177807 177808 177809 177810 177811 177812 177813 177814 177815 177816 177817 177818 177819 177820 177821 177822 177823 177824 177825 177826 177827 177828 177829 177830 177831 177832 177833 177834 177835 177836 177837 177838 177839 177840 177841 177842 177843 177844 177845 177846 177847 177848 177849 177850 177851 177852 177853 177854 177855 177856 177857 177858 177859 177860 177861 177862 177863 177864 177865 177866 177867 177868 177869 177870 177871 177872 177873 177874 177875 177876 177877 177878 177879 177880 177881 177882 177883 177884 177885 177886 177887 177888 177889 177890 177891 177892 177893 177894 177895 177896 177897 177898 177899 177900 177901 177902 177903 177904 177905 177906 177907 177908 177909 177910 177911 177912 177913 177914 177915 177916 177917 177918 177919 177920 177921 177922 177923 177924 177925 177926 177927 177928 177929 177930 177931 177932 177933 177934 177935 177936 177937 177938 177939 177940 177941 177942 177943 177944 177945 177946 177947 177948 177949 177950 177951 177952 177953 177954 177955 177956 177957 177958 177959 177960 177961 177962 177963 177964 177965 177966 177967 177968 177969 177970 177971 177972 177973 177974 177975 177976 177977 177978 177979 177980 177981 177982 177983 177984 177985 177986 177987 177988 177989 177990 177991 177992 177993 177994 177995 177996 177997 177998 177999 178000 178001 178002 178003 178004 178005 178006 178007 178008 178009 178010 178011 178012 178013 178014 178015 178016 178017 178018 178019 178020 178021 178022 178023 178024 178025 178026 178027 178028 178029 178030 178031 178032 178033 178034 178035 178036 178037 178038 178039 178040 178041 178042 178043 178044 178045 178046 178047 178048 178049 178050 178051 178052 178053 178054 178055 178056 178057 178058 178059 178060 178061 178062 178063 178064 178065 178066 178067 178068 178069 178070 178071 178072 178073 178074 178075 178076 178077 178078 178079 178080 178081 178082 178083 178084 178085 178086 178087 178088 178089 178090 178091 178092 178093 178094 178095 178096 178097 178098 178099 178100 178101 178102 178103 178104 178105 178106 178107 178108 178109 178110 178111 178112 178113 178114 178115 178116 178117 178118 178119 178120 178121 178122 178123 178124 178125 178126 178127 178128 178129 178130 178131 178132 178133 178134 178135 178136 178137 178138 178139 178140 178141 178142 178143 178144 178145 178146 178147 178148 178149 178150 178151 178152 178153 178154 178155 178156 178157 178158 178159 178160 178161 178162 178163 178164 178165 178166 178167 178168 178169 178170 178171 178172 178173 178174 178175 178176 178177 178178 178179 178180 178181 178182 178183 178184 178185 178186 178187 178188 178189 178190 178191 178192 178193 178194 178195 178196 178197 178198 178199 178200 178201 178202 178203 178204 178205 178206 178207 178208 178209 178210 178211 178212 178213 178214 178215 178216 178217 178218 178219 178220 178221 178222 178223 178224 178225 178226 178227 178228 178229 178230 178231 178232 178233 178234 178235 178236 178237 178238 178239 178240 178241 178242 178243 178244 178245 178246 178247 178248 178249 178250 178251 178252 178253 178254 178255 178256 178257 178258 178259 178260 178261 178262 178263 178264 178265 178266 178267 178268 178269 178270 178271 178272 178273 178274 178275 178276 178277 178278 178279 178280 178281 178282 178283 178284 178285 178286 178287 178288 178289 178290 178291 178292 178293 178294 178295 178296 178297 178298 178299 178300 178301 178302 178303 178304 178305 178306 178307 178308 178309 178310 178311 178312 178313 178314 178315 178316 178317 178318 178319 178320 178321 178322 178323 178324 178325 178326 178327 178328 178329 178330 178331 178332 178333 178334 178335 178336 178337 178338 178339 178340 178341 178342 178343 178344 178345 178346 178347 178348 178349 178350 178351 178352 178353 178354 178355 178356 178357 178358 178359 178360 178361 178362 178363 178364 178365 178366 178367 178368 178369 178370 178371 178372 178373 178374 178375 178376 178377 178378 178379 178380 178381 178382 178383 178384 178385 178386 178387 178388 178389 178390 178391 178392 178393 178394 178395 178396 178397 178398 178399 178400 178401 178402 178403 178404 178405 178406 178407 178408 178409 178410 178411 178412 178413 178414 178415 178416 178417 178418 178419 178420 178421 178422 178423 178424 178425 178426 178427 178428 178429 178430 178431 178432 178433 178434 178435 178436 178437 178438 178439 178440 178441 178442 178443 178444 178445 178446 178447 178448 178449 178450 178451 178452 178453 178454 178455 178456 178457 178458 178459 178460 178461 178462 178463 178464 178465 178466 178467 178468 178469 178470 178471 178472 178473 178474 178475 178476 178477 178478 178479 178480 178481 178482 178483 178484 178485 178486 178487 178488 178489 178490 178491 178492 178493 178494 178495 178496 178497 178498 178499 178500 178501 178502 178503 178504 178505 178506 178507 178508 178509 178510 178511 178512 178513 178514 178515 178516 178517 178518 178519 178520 178521 178522 178523 178524 178525 178526 178527 178528 178529 178530 178531 178532 178533 178534 178535 178536 178537 178538 178539 178540 178541 178542 178543 178544 178545 178546 178547 178548 178549 178550 178551 178552 178553 178554 178555 178556 178557 178558 178559 178560 178561 178562 178563 178564 178565 178566 178567 178568 178569 178570 178571 178572 178573 178574 178575 178576 178577 178578 178579 178580 178581 178582 178583 178584 178585 178586 178587 178588 178589 178590 178591 178592 178593 178594 178595 178596 178597 178598 178599 178600 178601 178602 178603 178604 178605 178606 178607 178608 178609 178610 178611 178612 178613 178614 178615 178616 178617 178618 178619 178620 178621 178622 178623 178624 178625 178626 178627 178628 178629 178630 178631 178632 178633 178634 178635 178636 178637 178638 178639 178640 178641 178642 178643 178644 178645 178646 178647 178648 178649 178650 178651 178652 178653 178654 178655 178656 178657 178658 178659 178660 178661 178662 178663 178664 178665 178666 178667 178668 178669 178670 178671 178672 178673 178674 178675 178676 178677 178678 178679 178680 178681 178682 178683 178684 178685 178686 178687 178688 178689 178690 178691 178692 178693 178694 178695 178696 178697 178698 178699 178700 178701 178702 178703 178704 178705 178706 178707 178708 178709 178710 178711 178712 178713 178714 178715 178716 178717 178718 178719 178720 178721 178722 178723 178724 178725 178726 178727 178728 178729 178730 178731 178732 178733 178734 178735 178736 178737 178738 178739 178740 178741 178742 178743 178744 178745 178746 178747 178748 178749 178750 178751 178752 178753 178754 178755 178756 178757 178758 178759 178760 178761 178762 178763 178764 178765 178766 178767 178768 178769 178770 178771 178772 178773 178774 178775 178776 178777 178778 178779 178780 178781 178782 178783 178784 178785 178786 178787 178788 178789 178790 178791 178792 178793 178794 178795 178796 178797 178798 178799 178800 178801 178802 178803 178804 178805 178806 178807 178808 178809 178810 178811 178812 178813 178814 178815 178816 178817 178818 178819 178820 178821 178822 178823 178824 178825 178826 178827 178828 178829 178830 178831 178832 178833 178834 178835 178836 178837 178838 178839 178840 178841 178842 178843 178844 178845 178846 178847 178848 178849 178850 178851 178852 178853 178854 178855 178856 178857 178858 178859 178860 178861 178862 178863 178864 178865 178866 178867 178868 178869 178870 178871 178872 178873 178874 178875 178876 178877 178878 178879 178880 178881 178882 178883 178884 178885 178886 178887 178888 178889 178890 178891 178892 178893 178894 178895 178896 178897 178898 178899 178900 178901 178902 178903 178904 178905 178906 178907 178908 178909 178910 178911 178912 178913 178914 178915 178916 178917 178918 178919 178920 178921 178922 178923 178924 178925 178926 178927 178928 178929 178930 178931 178932 178933 178934 178935 178936 178937 178938 178939 178940 178941 178942 178943 178944 178945 178946 178947 178948 178949 178950 178951 178952 178953 178954 178955 178956 178957 178958 178959 178960 178961 178962 178963 178964 178965 178966 178967 178968 178969 178970 178971 178972 178973 178974 178975 178976 178977 178978 178979 178980 178981 178982 178983 178984 178985 178986 178987 178988 178989 178990 178991 178992 178993 178994 178995 178996 178997 178998 178999 179000 179001 179002 179003 179004 179005 179006 179007 179008 179009 179010 179011 179012 179013 179014 179015 179016 179017 179018 179019 179020 179021 179022 179023 179024 179025 179026 179027 179028 179029 179030 179031 179032 179033 179034 179035 179036 179037 179038 179039 179040 179041 179042 179043 179044 179045 179046 179047 179048 179049 179050 179051 179052 179053 179054 179055 179056 179057 179058 179059 179060 179061 179062 179063 179064 179065 179066 179067 179068 179069 179070 179071 179072 179073 179074 179075 179076 179077 179078 179079 179080 179081 179082 179083 179084 179085 179086 179087 179088 179089 179090 179091 179092 179093 179094 179095 179096 179097 179098 179099 179100 179101 179102 179103 179104 179105 179106 179107 179108 179109 179110 179111 179112 179113 179114 179115 179116 179117 179118 179119 179120 179121 179122 179123 179124 179125 179126 179127 179128 179129 179130 179131 179132 179133 179134 179135 179136 179137 179138 179139 179140 179141 179142 179143 179144 179145 179146 179147 179148 179149 179150 179151 179152 179153 179154 179155 179156 179157 179158 179159 179160 179161 179162 179163 179164 179165 179166 179167 179168 179169 179170 179171 179172 179173 179174 179175 179176 179177 179178 179179 179180 179181 179182 179183 179184 179185 179186 179187 179188 179189 179190 179191 179192 179193 179194 179195 179196 179197 179198 179199 179200 179201 179202 179203 179204 179205 179206 179207 179208 179209 179210 179211 179212 179213 179214 179215 179216 179217 179218 179219 179220 179221 179222 179223 179224 179225 179226 179227 179228 179229 179230 179231 179232 179233 179234 179235 179236 179237 179238 179239 179240 179241 179242 179243 179244 179245 179246 179247 179248 179249 179250 179251 179252 179253 179254 179255 179256 179257 179258 179259 179260 179261 179262 179263 179264 179265 179266 179267 179268 179269 179270 179271 179272 179273 179274 179275 179276 179277 179278 179279 179280 179281 179282 179283 179284 179285 179286 179287 179288 179289 179290 179291 179292 179293 179294 179295 179296 179297 179298 179299 179300 179301 179302 179303 179304 179305 179306 179307 179308 179309 179310 179311 179312 179313 179314 179315 179316 179317 179318 179319 179320 179321 179322 179323 179324 179325 179326 179327 179328 179329 179330 179331 179332 179333 179334 179335 179336 179337 179338 179339 179340 179341 179342 179343 179344 179345 179346 179347 179348 179349 179350 179351 179352 179353 179354 179355 179356 179357 179358 179359 179360 179361 179362 179363 179364 179365 179366 179367 179368 179369 179370 179371 179372 179373 179374 179375 179376 179377 179378 179379 179380 179381 179382 179383 179384 179385 179386 179387 179388 179389 179390 179391 179392 179393 179394 179395 179396 179397 179398 179399 179400 179401 179402 179403 179404 179405 179406 179407 179408 179409 179410 179411 179412 179413 179414 179415 179416 179417 179418 179419 179420 179421 179422 179423 179424 179425 179426 179427 179428 179429 179430 179431 179432 179433 179434 179435 179436 179437 179438 179439 179440 179441 179442 179443 179444 179445 179446 179447 179448 179449 179450 179451 179452 179453 179454 179455 179456 179457 179458 179459 179460 179461 179462 179463 179464 179465 179466 179467 179468 179469 179470 179471 179472 179473 179474 179475 179476 179477 179478 179479 179480 179481 179482 179483 179484 179485 179486 179487 179488 179489 179490 179491 179492 179493 179494 179495 179496 179497 179498 179499 179500 179501 179502 179503 179504 179505 179506 179507 179508 179509 179510 179511 179512 179513 179514 179515 179516 179517 179518 179519 179520 179521 179522 179523 179524 179525 179526 179527 179528 179529 179530 179531 179532 179533 179534 179535 179536 179537 179538 179539 179540 179541 179542 179543 179544 179545 179546 179547 179548 179549 179550 179551 179552 179553 179554 179555 179556 179557 179558 179559 179560 179561 179562 179563 179564 179565 179566 179567 179568 179569 179570 179571 179572 179573 179574 179575 179576 179577 179578 179579 179580 179581 179582 179583 179584 179585 179586 179587 179588 179589 179590 179591 179592 179593 179594 179595 179596 179597 179598 179599 179600 179601 179602 179603 179604 179605 179606 179607 179608 179609 179610 179611 179612 179613 179614 179615 179616 179617 179618 179619 179620 179621 179622 179623 179624 179625 179626 179627 179628 179629 179630 179631 179632 179633 179634 179635 179636 179637 179638 179639 179640 179641 179642 179643 179644 179645 179646 179647 179648 179649 179650 179651 179652 179653 179654 179655 179656 179657 179658 179659 179660 179661 179662 179663 179664 179665 179666 179667 179668 179669 179670 179671 179672 179673 179674 179675 179676 179677 179678 179679 179680 179681 179682 179683 179684 179685 179686 179687 179688 179689 179690 179691 179692 179693 179694 179695 179696 179697 179698 179699 179700 179701 179702 179703 179704 179705 179706 179707 179708 179709 179710 179711 179712 179713 179714 179715 179716 179717 179718 179719 179720 179721 179722 179723 179724 179725 179726 179727 179728 179729 179730 179731 179732 179733 179734 179735 179736 179737 179738 179739 179740 179741 179742 179743 179744 179745 179746 179747 179748 179749 179750 179751 179752 179753 179754 179755 179756 179757 179758 179759 179760 179761 179762 179763 179764 179765 179766 179767 179768 179769 179770 179771 179772 179773 179774 179775 179776 179777 179778 179779 179780 179781 179782 179783 179784 179785 179786 179787 179788 179789 179790 179791 179792 179793 179794 179795 179796 179797 179798 179799 179800 179801 179802 179803 179804 179805 179806 179807 179808 179809 179810 179811 179812 179813 179814 179815 179816 179817 179818 179819 179820 179821 179822 179823 179824 179825 179826 179827 179828 179829 179830 179831 179832 179833 179834 179835 179836 179837 179838 179839 179840 179841 179842 179843 179844 179845 179846 179847 179848 179849 179850 179851 179852 179853 179854 179855 179856 179857 179858 179859 179860 179861 179862 179863 179864 179865 179866 179867 179868 179869 179870 179871 179872 179873 179874 179875 179876 179877 179878 179879 179880 179881 179882 179883 179884 179885 179886 179887 179888 179889 179890 179891 179892 179893 179894 179895 179896 179897 179898 179899 179900 179901 179902 179903 179904 179905 179906 179907 179908 179909 179910 179911 179912 179913 179914 179915 179916 179917 179918 179919 179920 179921 179922 179923 179924 179925 179926 179927 179928 179929 179930 179931 179932 179933 179934 179935 179936 179937 179938 179939 179940 179941 179942 179943 179944 179945 179946 179947 179948 179949 179950 179951 179952 179953 179954 179955 179956 179957 179958 179959 179960 179961 179962 179963 179964 179965 179966 179967 179968 179969 179970 179971 179972 179973 179974 179975 179976 179977 179978 179979 179980 179981 179982 179983 179984 179985 179986 179987 179988 179989 179990 179991 179992 179993 179994 179995 179996 179997 179998 179999 180000 180001 180002 180003 180004 180005 180006 180007 180008 180009 180010 180011 180012 180013 180014 180015 180016 180017 180018 180019 180020 180021 180022 180023 180024 180025 180026 180027 180028 180029 180030 180031 180032 180033 180034 180035 180036 180037 180038 180039 180040 180041 180042 180043 180044 180045 180046 180047 180048 180049 180050 180051 180052 180053 180054 180055 180056 180057 180058 180059 180060 180061 180062 180063 180064 180065 180066 180067 180068 180069 180070 180071 180072 180073 180074 180075 180076 180077 180078 180079 180080 180081 180082 180083 180084 180085 180086 180087 180088 180089 180090 180091 180092 180093 180094 180095 180096 180097 180098 180099 180100 180101 180102 180103 180104 180105 180106 180107 180108 180109 180110 180111 180112 180113 180114 180115 180116 180117 180118 180119 180120 180121 180122 180123 180124 180125 180126 180127 180128 180129 180130 180131 180132 180133 180134 180135 180136 180137 180138 180139 180140 180141 180142 180143 180144 180145 180146 180147 180148 180149 180150 180151 180152 180153 180154 180155 180156 180157 180158 180159 180160 180161 180162 180163 180164 180165 180166 180167 180168 180169 180170 180171 180172 180173 180174 180175 180176 180177 180178 180179 180180 180181 180182 180183 180184 180185 180186 180187 180188 180189 180190 180191 180192 180193 180194 180195 180196 180197 180198 180199 180200 180201 180202 180203 180204 180205 180206 180207 180208 180209 180210 180211 180212 180213 180214 180215 180216 180217 180218 180219 180220 180221 180222 180223 180224 180225 180226 180227 180228 180229 180230 180231 180232 180233 180234 180235 180236 180237 180238 180239 180240 180241 180242 180243 180244 180245 180246 180247 180248 180249 180250 180251 180252 180253 180254 180255 180256 180257 180258 180259 180260 180261 180262 180263 180264 180265 180266 180267 180268 180269 180270 180271 180272 180273 180274 180275 180276 180277 180278 180279 180280 180281 180282 180283 180284 180285 180286 180287 180288 180289 180290 180291 180292 180293 180294 180295 180296 180297 180298 180299 180300 180301 180302 180303 180304 180305 180306 180307 180308 180309 180310 180311 180312 180313 180314 180315 180316 180317 180318 180319 180320 180321 180322 180323 180324 180325 180326 180327 180328 180329 180330 180331 180332 180333 180334 180335 180336 180337 180338 180339 180340 180341 180342 180343 180344 180345 180346 180347 180348 180349 180350 180351 180352 180353 180354 180355 180356 180357 180358 180359 180360 180361 180362 180363 180364 180365 180366 180367 180368 180369 180370 180371 180372 180373 180374 180375 180376 180377 180378 180379 180380 180381 180382 180383 180384 180385 180386 180387 180388 180389 180390 180391 180392 180393 180394 180395 180396 180397 180398 180399 180400 180401 180402 180403 180404 180405 180406 180407 180408 180409 180410 180411 180412 180413 180414 180415 180416 180417 180418 180419 180420 180421 180422 180423 180424 180425 180426 180427 180428 180429 180430 180431 180432 180433 180434 180435 180436 180437 180438 180439 180440 180441 180442 180443 180444 180445 180446 180447 180448 180449 180450 180451 180452 180453 180454 180455 180456 180457 180458 180459 180460 180461 180462 180463 180464 180465 180466 180467 180468 180469 180470 180471 180472 180473 180474 180475 180476 180477 180478 180479 180480 180481 180482 180483 180484 180485 180486 180487 180488 180489 180490 180491 180492 180493 180494 180495 180496 180497 180498 180499 180500 180501 180502 180503 180504 180505 180506 180507 180508 180509 180510 180511 180512 180513 180514 180515 180516 180517 180518 180519 180520 180521 180522 180523 180524 180525 180526 180527 180528 180529 180530 180531 180532 180533 180534 180535 180536 180537 180538 180539 180540 180541 180542 180543 180544 180545 180546 180547 180548 180549 180550 180551 180552 180553 180554 180555 180556 180557 180558 180559 180560 180561 180562 180563 180564 180565 180566 180567 180568 180569 180570 180571 180572 180573 180574 180575 180576 180577 180578 180579 180580 180581 180582 180583 180584 180585 180586 180587 180588 180589 180590 180591 180592 180593 180594 180595 180596 180597 180598 180599 180600 180601 180602 180603 180604 180605 180606 180607 180608 180609 180610 180611 180612 180613 180614 180615 180616 180617 180618 180619 180620 180621 180622 180623 180624 180625 180626 180627 180628 180629 180630 180631 180632 180633 180634 180635 180636 180637 180638 180639 180640 180641 180642 180643 180644 180645 180646 180647 180648 180649 180650 180651 180652 180653 180654 180655 180656 180657 180658 180659 180660 180661 180662 180663 180664 180665 180666 180667 180668 180669 180670 180671 180672 180673 180674 180675 180676 180677 180678 180679 180680 180681 180682 180683 180684 180685 180686 180687 180688 180689 180690 180691 180692 180693 180694 180695 180696 180697 180698 180699 180700 180701 180702 180703 180704 180705 180706 180707 180708 180709 180710 180711 180712 180713 180714 180715 180716 180717 180718 180719 180720 180721 180722 180723 180724 180725 180726 180727 180728 180729 180730 180731 180732 180733 180734 180735 180736 180737 180738 180739 180740 180741 180742 180743 180744 180745 180746 180747 180748 180749 180750 180751 180752 180753 180754 180755 180756 180757 180758 180759 180760 180761 180762 180763 180764 180765 180766 180767 180768 180769 180770 180771 180772 180773 180774 180775 180776 180777 180778 180779 180780 180781 180782 180783 180784 180785 180786 180787 180788 180789 180790 180791 180792 180793 180794 180795 180796 180797 180798 180799 180800 180801 180802 180803 180804 180805 180806 180807 180808 180809 180810 180811 180812 180813 180814 180815 180816 180817 180818 180819 180820 180821 180822 180823 180824 180825 180826 180827 180828 180829 180830 180831 180832 180833 180834 180835 180836 180837 180838 180839 180840 180841 180842 180843 180844 180845 180846 180847 180848 180849 180850 180851 180852 180853 180854 180855 180856 180857 180858 180859 180860 180861 180862 180863 180864 180865 180866 180867 180868 180869 180870 180871 180872 180873 180874 180875 180876 180877 180878 180879 180880 180881 180882 180883 180884 180885 180886 180887 180888 180889 180890 180891 180892 180893 180894 180895 180896 180897 180898 180899 180900 180901 180902 180903 180904 180905 180906 180907 180908 180909 180910 180911 180912 180913 180914 180915 180916 180917 180918 180919 180920 180921 180922 180923 180924 180925 180926 180927 180928 180929 180930 180931 180932 180933 180934 180935 180936 180937 180938 180939 180940 180941 180942 180943 180944 180945 180946 180947 180948 180949 180950 180951 180952 180953 180954 180955 180956 180957 180958 180959 180960 180961 180962 180963 180964 180965 180966 180967 180968 180969 180970 180971 180972 180973 180974 180975 180976 180977 180978 180979 180980 180981 180982 180983 180984 180985 180986 180987 180988 180989 180990 180991 180992 180993 180994 180995 180996 180997 180998 180999 181000 181001 181002 181003 181004 181005 181006 181007 181008 181009 181010 181011 181012 181013 181014 181015 181016 181017 181018 181019 181020 181021 181022 181023 181024 181025 181026 181027 181028 181029 181030 181031 181032 181033 181034 181035 181036 181037 181038 181039 181040 181041 181042 181043 181044 181045 181046 181047 181048 181049 181050 181051 181052 181053 181054 181055 181056 181057 181058 181059 181060 181061 181062 181063 181064 181065 181066 181067 181068 181069 181070 181071 181072 181073 181074 181075 181076 181077 181078 181079 181080 181081 181082 181083 181084 181085 181086 181087 181088 181089 181090 181091 181092 181093 181094 181095 181096 181097 181098 181099 181100 181101 181102 181103 181104 181105 181106 181107 181108 181109 181110 181111 181112 181113 181114 181115 181116 181117 181118 181119 181120 181121 181122 181123 181124 181125 181126 181127 181128 181129 181130 181131 181132 181133 181134 181135 181136 181137 181138 181139 181140 181141 181142 181143 181144 181145 181146 181147 181148 181149 181150 181151 181152 181153 181154 181155 181156 181157 181158 181159 181160 181161 181162 181163 181164 181165 181166 181167 181168 181169 181170 181171 181172 181173 181174 181175 181176 181177 181178 181179 181180 181181 181182 181183 181184 181185 181186 181187 181188 181189 181190 181191 181192 181193 181194 181195 181196 181197 181198 181199 181200 181201 181202 181203 181204 181205 181206 181207 181208 181209 181210 181211 181212 181213 181214 181215 181216 181217 181218 181219 181220 181221 181222 181223 181224 181225 181226 181227 181228 181229 181230 181231 181232 181233 181234 181235 181236 181237 181238 181239 181240 181241 181242 181243 181244 181245 181246 181247 181248 181249 181250 181251 181252 181253 181254 181255 181256 181257 181258 181259 181260 181261 181262 181263 181264 181265 181266 181267 181268 181269 181270 181271 181272 181273 181274 181275 181276 181277 181278 181279 181280 181281 181282 181283 181284 181285 181286 181287 181288 181289 181290 181291 181292 181293 181294 181295 181296 181297 181298 181299 181300 181301 181302 181303 181304 181305 181306 181307 181308 181309 181310 181311 181312 181313 181314 181315 181316 181317 181318 181319 181320 181321 181322 181323 181324 181325 181326 181327 181328 181329 181330 181331 181332 181333 181334 181335 181336 181337 181338 181339 181340 181341 181342 181343 181344 181345 181346 181347 181348 181349 181350 181351 181352 181353 181354 181355 181356 181357 181358 181359 181360 181361 181362 181363 181364 181365 181366 181367 181368 181369 181370 181371 181372 181373 181374 181375 181376 181377 181378 181379 181380 181381 181382 181383 181384 181385 181386 181387 181388 181389 181390 181391 181392 181393 181394 181395 181396 181397 181398 181399 181400 181401 181402 181403 181404 181405 181406 181407 181408 181409 181410 181411 181412 181413 181414 181415 181416 181417 181418 181419 181420 181421 181422 181423 181424 181425 181426 181427 181428 181429 181430 181431 181432 181433 181434 181435 181436 181437 181438 181439 181440 181441 181442 181443 181444 181445 181446 181447 181448 181449 181450 181451 181452 181453 181454 181455 181456 181457 181458 181459 181460 181461 181462 181463 181464 181465 181466 181467 181468 181469 181470 181471 181472 181473 181474 181475 181476 181477 181478 181479 181480 181481 181482 181483 181484 181485 181486 181487 181488 181489 181490 181491 181492 181493 181494 181495 181496 181497 181498 181499 181500 181501 181502 181503 181504 181505 181506 181507 181508 181509 181510 181511 181512 181513 181514 181515 181516 181517 181518 181519 181520 181521 181522 181523 181524 181525 181526 181527 181528 181529 181530 181531 181532 181533 181534 181535 181536 181537 181538 181539 181540 181541 181542 181543 181544 181545 181546 181547 181548 181549 181550 181551 181552 181553 181554 181555 181556 181557 181558 181559 181560 181561 181562 181563 181564 181565 181566 181567 181568 181569 181570 181571 181572 181573 181574 181575 181576 181577 181578 181579 181580 181581 181582 181583 181584 181585 181586 181587 181588 181589 181590 181591 181592 181593 181594 181595 181596 181597 181598 181599 181600 181601 181602 181603 181604 181605 181606 181607 181608 181609 181610 181611 181612 181613 181614 181615 181616 181617 181618 181619 181620 181621 181622 181623 181624 181625 181626 181627 181628 181629 181630 181631 181632 181633 181634 181635 181636 181637 181638 181639 181640 181641 181642 181643 181644 181645 181646 181647 181648 181649 181650 181651 181652 181653 181654 181655 181656 181657 181658 181659 181660 181661 181662 181663 181664 181665 181666 181667 181668 181669 181670 181671 181672 181673 181674 181675 181676 181677 181678 181679 181680 181681 181682 181683 181684 181685 181686 181687 181688 181689 181690 181691 181692 181693 181694 181695 181696 181697 181698 181699 181700 181701 181702 181703 181704 181705 181706 181707 181708 181709 181710 181711 181712 181713 181714 181715 181716 181717 181718 181719 181720 181721 181722 181723 181724 181725 181726 181727 181728 181729 181730 181731 181732 181733 181734 181735 181736 181737 181738 181739 181740 181741 181742 181743 181744 181745 181746 181747 181748 181749 181750 181751 181752 181753 181754 181755 181756 181757 181758 181759 181760 181761 181762 181763 181764 181765 181766 181767 181768 181769 181770 181771 181772 181773 181774 181775 181776 181777 181778 181779 181780 181781 181782 181783 181784 181785 181786 181787 181788 181789 181790 181791 181792 181793 181794 181795 181796 181797 181798 181799 181800 181801 181802 181803 181804 181805 181806 181807 181808 181809 181810 181811 181812 181813 181814 181815 181816 181817 181818 181819 181820 181821 181822 181823 181824 181825 181826 181827 181828 181829 181830 181831 181832 181833 181834 181835 181836 181837 181838 181839 181840 181841 181842 181843 181844 181845 181846 181847 181848 181849 181850 181851 181852 181853 181854 181855 181856 181857 181858 181859 181860 181861 181862 181863 181864 181865 181866 181867 181868 181869 181870 181871 181872 181873 181874 181875 181876 181877 181878 181879 181880 181881 181882 181883 181884 181885 181886 181887 181888 181889 181890 181891 181892 181893 181894 181895 181896 181897 181898 181899 181900 181901 181902 181903 181904 181905 181906 181907 181908 181909 181910 181911 181912 181913 181914 181915 181916 181917 181918 181919 181920 181921 181922 181923 181924 181925 181926 181927 181928 181929 181930 181931 181932 181933 181934 181935 181936 181937 181938 181939 181940 181941 181942 181943 181944 181945 181946 181947 181948 181949 181950 181951 181952 181953 181954 181955 181956 181957 181958 181959 181960 181961 181962 181963 181964 181965 181966 181967 181968 181969 181970 181971 181972 181973 181974 181975 181976 181977 181978 181979 181980 181981 181982 181983 181984 181985 181986 181987 181988 181989 181990 181991 181992 181993 181994 181995 181996 181997 181998 181999 182000 182001 182002 182003 182004 182005 182006 182007 182008 182009 182010 182011 182012 182013 182014 182015 182016 182017 182018 182019 182020 182021 182022 182023 182024 182025 182026 182027 182028 182029 182030 182031 182032 182033 182034 182035 182036 182037 182038 182039 182040 182041 182042 182043 182044 182045 182046 182047 182048 182049 182050 182051 182052 182053 182054 182055 182056 182057 182058 182059 182060 182061 182062 182063 182064 182065 182066 182067 182068 182069 182070 182071 182072 182073 182074 182075 182076 182077 182078 182079 182080 182081 182082 182083 182084 182085 182086 182087 182088 182089 182090 182091 182092 182093 182094 182095 182096 182097 182098 182099 182100 182101 182102 182103 182104 182105 182106 182107 182108 182109 182110 182111 182112 182113 182114 182115 182116 182117 182118 182119 182120 182121 182122 182123 182124 182125 182126 182127 182128 182129 182130 182131 182132 182133 182134 182135 182136 182137 182138 182139 182140 182141 182142 182143 182144 182145 182146 182147 182148 182149 182150 182151 182152 182153 182154 182155 182156 182157 182158 182159 182160 182161 182162 182163 182164 182165 182166 182167 182168 182169 182170 182171 182172 182173 182174 182175 182176 182177 182178 182179 182180 182181 182182 182183 182184 182185 182186 182187 182188 182189 182190 182191 182192 182193 182194 182195 182196 182197 182198 182199 182200 182201 182202 182203 182204 182205 182206 182207 182208 182209 182210 182211 182212 182213 182214 182215 182216 182217 182218 182219 182220 182221 182222 182223 182224 182225 182226 182227 182228 182229 182230 182231 182232 182233 182234 182235 182236 182237 182238 182239 182240 182241 182242 182243 182244 182245 182246 182247 182248 182249 182250 182251 182252 182253 182254 182255 182256 182257 182258 182259 182260 182261 182262 182263 182264 182265 182266 182267 182268 182269 182270 182271 182272 182273 182274 182275 182276 182277 182278 182279 182280 182281 182282 182283 182284 182285 182286 182287 182288 182289 182290 182291 182292 182293 182294 182295 182296 182297 182298 182299 182300 182301 182302 182303 182304 182305 182306 182307 182308 182309 182310 182311 182312 182313 182314 182315 182316 182317 182318 182319 182320 182321 182322 182323 182324 182325 182326 182327 182328 182329 182330 182331 182332 182333 182334 182335 182336 182337 182338 182339 182340 182341 182342 182343 182344 182345 182346 182347 182348 182349 182350 182351 182352 182353 182354 182355 182356 182357 182358 182359 182360 182361 182362 182363 182364 182365 182366 182367 182368 182369 182370 182371 182372 182373 182374 182375 182376 182377 182378 182379 182380 182381 182382 182383 182384 182385 182386 182387 182388 182389 182390 182391 182392 182393 182394 182395 182396 182397 182398 182399 182400 182401 182402 182403 182404 182405 182406 182407 182408 182409 182410 182411 182412 182413 182414 182415 182416 182417 182418 182419 182420 182421 182422 182423 182424 182425 182426 182427 182428 182429 182430 182431 182432 182433 182434 182435 182436 182437 182438 182439 182440 182441 182442 182443 182444 182445 182446 182447 182448 182449 182450 182451 182452 182453 182454 182455 182456 182457 182458 182459 182460 182461 182462 182463 182464 182465 182466 182467 182468 182469 182470 182471 182472 182473 182474 182475 182476 182477 182478 182479 182480 182481 182482 182483 182484 182485 182486 182487 182488 182489 182490 182491 182492 182493 182494 182495 182496 182497 182498 182499 182500 182501 182502 182503 182504 182505 182506 182507 182508 182509 182510 182511 182512 182513 182514 182515 182516 182517 182518 182519 182520 182521 182522 182523 182524 182525 182526 182527 182528 182529 182530 182531 182532 182533 182534 182535 182536 182537 182538 182539 182540 182541 182542 182543 182544 182545 182546 182547 182548 182549 182550 182551 182552 182553 182554 182555 182556 182557 182558 182559 182560 182561 182562 182563 182564 182565 182566 182567 182568 182569 182570 182571 182572 182573 182574 182575 182576 182577 182578 182579 182580 182581 182582 182583 182584 182585 182586 182587 182588 182589 182590 182591 182592 182593 182594 182595 182596 182597 182598 182599 182600 182601 182602 182603 182604 182605 182606 182607 182608 182609 182610 182611 182612 182613 182614 182615 182616 182617 182618 182619 182620 182621 182622 182623 182624 182625 182626 182627 182628 182629 182630 182631 182632 182633 182634 182635 182636 182637 182638 182639 182640 182641 182642 182643 182644 182645 182646 182647 182648 182649 182650 182651 182652 182653 182654 182655 182656 182657 182658 182659 182660 182661 182662 182663 182664 182665 182666 182667 182668 182669 182670 182671 182672 182673 182674 182675 182676 182677 182678 182679 182680 182681 182682 182683 182684 182685 182686 182687 182688 182689 182690 182691 182692 182693 182694 182695 182696 182697 182698 182699 182700 182701 182702 182703 182704 182705 182706 182707 182708 182709 182710 182711 182712 182713 182714 182715 182716 182717 182718 182719 182720 182721 182722 182723 182724 182725 182726 182727 182728 182729 182730 182731 182732 182733 182734 182735 182736 182737 182738 182739 182740 182741 182742 182743 182744 182745 182746 182747 182748 182749 182750 182751 182752 182753 182754 182755 182756 182757 182758 182759 182760 182761 182762 182763 182764 182765 182766 182767 182768 182769 182770 182771 182772 182773 182774 182775 182776 182777 182778 182779 182780 182781 182782 182783 182784 182785 182786 182787 182788 182789 182790 182791 182792 182793 182794 182795 182796 182797 182798 182799 182800 182801 182802 182803 182804 182805 182806 182807 182808 182809 182810 182811 182812 182813 182814 182815 182816 182817 182818 182819 182820 182821 182822 182823 182824 182825 182826 182827 182828 182829 182830 182831 182832 182833 182834 182835 182836 182837 182838 182839 182840 182841 182842 182843 182844 182845 182846 182847 182848 182849 182850 182851 182852 182853 182854 182855 182856 182857 182858 182859 182860 182861 182862 182863 182864 182865 182866 182867 182868 182869 182870 182871 182872 182873 182874 182875 182876 182877 182878 182879 182880 182881 182882 182883 182884 182885 182886 182887 182888 182889 182890 182891 182892 182893 182894 182895 182896 182897 182898 182899 182900 182901 182902 182903 182904 182905 182906 182907 182908 182909 182910 182911 182912 182913 182914 182915 182916 182917 182918 182919 182920 182921 182922 182923 182924 182925 182926 182927 182928 182929 182930 182931 182932 182933 182934 182935 182936 182937 182938 182939 182940 182941 182942 182943 182944 182945 182946 182947 182948 182949 182950 182951 182952 182953 182954 182955 182956 182957 182958 182959 182960 182961 182962 182963 182964 182965 182966 182967 182968 182969 182970 182971 182972 182973 182974 182975 182976 182977 182978 182979 182980 182981 182982 182983 182984 182985 182986 182987 182988 182989 182990 182991 182992 182993 182994 182995 182996 182997 182998 182999 183000 183001 183002 183003 183004 183005 183006 183007 183008 183009 183010 183011 183012 183013 183014 183015 183016 183017 183018 183019 183020 183021 183022 183023 183024 183025 183026 183027 183028 183029 183030 183031 183032 183033 183034 183035 183036 183037 183038 183039 183040 183041 183042 183043 183044 183045 183046 183047 183048 183049 183050 183051 183052 183053 183054 183055 183056 183057 183058 183059 183060 183061 183062 183063 183064 183065 183066 183067 183068 183069 183070 183071 183072 183073 183074 183075 183076 183077 183078 183079 183080 183081 183082 183083 183084 183085 183086 183087 183088 183089 183090 183091 183092 183093 183094 183095 183096 183097 183098 183099 183100 183101 183102 183103 183104 183105 183106 183107 183108 183109 183110 183111 183112 183113 183114 183115 183116 183117 183118 183119 183120 183121 183122 183123 183124 183125 183126 183127 183128 183129 183130 183131 183132 183133 183134 183135 183136 183137 183138 183139 183140 183141 183142 183143 183144 183145 183146 183147 183148 183149 183150 183151 183152 183153 183154 183155 183156 183157 183158 183159 183160 183161 183162 183163 183164 183165 183166 183167 183168 183169 183170 183171 183172 183173 183174 183175 183176 183177 183178 183179 183180 183181 183182 183183 183184 183185 183186 183187 183188 183189 183190 183191 183192 183193 183194 183195 183196 183197 183198 183199 183200 183201 183202 183203 183204 183205 183206 183207 183208 183209 183210 183211 183212 183213 183214 183215 183216 183217 183218 183219 183220 183221 183222 183223 183224 183225 183226 183227 183228 183229 183230 183231 183232 183233 183234 183235 183236 183237 183238 183239 183240 183241 183242 183243 183244 183245 183246 183247 183248 183249 183250 183251 183252 183253 183254 183255 183256 183257 183258 183259 183260 183261 183262 183263 183264 183265 183266 183267 183268 183269 183270 183271 183272 183273 183274 183275 183276 183277 183278 183279 183280 183281 183282 183283 183284 183285 183286 183287 183288 183289 183290 183291 183292 183293 183294 183295 183296 183297 183298 183299 183300 183301 183302 183303 183304 183305 183306 183307 183308 183309 183310 183311 183312 183313 183314 183315 183316 183317 183318 183319 183320 183321 183322 183323 183324 183325 183326 183327 183328 183329 183330 183331 183332 183333 183334 183335 183336 183337 183338 183339 183340 183341 183342 183343 183344 183345 183346 183347 183348 183349 183350 183351 183352 183353 183354 183355 183356 183357 183358 183359 183360 183361 183362 183363 183364 183365 183366 183367 183368 183369 183370 183371 183372 183373 183374 183375 183376 183377 183378 183379 183380 183381 183382 183383 183384 183385 183386 183387 183388 183389 183390 183391 183392 183393 183394 183395 183396 183397 183398 183399 183400 183401 183402 183403 183404 183405 183406 183407 183408 183409 183410 183411 183412 183413 183414 183415 183416 183417 183418 183419 183420 183421 183422 183423 183424 183425 183426 183427 183428 183429 183430 183431 183432 183433 183434 183435 183436 183437 183438 183439 183440 183441 183442 183443 183444 183445 183446 183447 183448 183449 183450 183451 183452 183453 183454 183455 183456 183457 183458 183459 183460 183461 183462 183463 183464 183465 183466 183467 183468 183469 183470 183471 183472 183473 183474 183475 183476 183477 183478 183479 183480 183481 183482 183483 183484 183485 183486 183487 183488 183489 183490 183491 183492 183493 183494 183495 183496 183497 183498 183499 183500 183501 183502 183503 183504 183505 183506 183507 183508 183509 183510 183511 183512 183513 183514 183515 183516 183517 183518 183519 183520 183521 183522 183523 183524 183525 183526 183527 183528 183529 183530 183531 183532 183533 183534 183535 183536 183537 183538 183539 183540 183541 183542 183543 183544 183545 183546 183547 183548 183549 183550 183551 183552 183553 183554 183555 183556 183557 183558 183559 183560 183561 183562 183563 183564 183565 183566 183567 183568 183569 183570 183571 183572 183573 183574 183575 183576 183577 183578 183579 183580 183581 183582 183583 183584 183585 183586 183587 183588 183589 183590 183591 183592 183593 183594 183595 183596 183597 183598 183599 183600 183601 183602 183603 183604 183605 183606 183607 183608 183609 183610 183611 183612 183613 183614 183615 183616 183617 183618 183619 183620 183621 183622 183623 183624 183625 183626 183627 183628 183629 183630 183631 183632 183633 183634 183635 183636 183637 183638 183639 183640 183641 183642 183643 183644 183645 183646 183647 183648 183649 183650 183651 183652 183653 183654 183655 183656 183657 183658 183659 183660 183661 183662 183663 183664 183665 183666 183667 183668 183669 183670 183671 183672 183673 183674 183675 183676 183677 183678 183679 183680 183681 183682 183683 183684 183685 183686 183687 183688 183689 183690 183691 183692 183693 183694 183695 183696 183697 183698 183699 183700 183701 183702 183703 183704 183705 183706 183707 183708 183709 183710 183711 183712 183713 183714 183715 183716 183717 183718 183719 183720 183721 183722 183723 183724 183725 183726 183727 183728 183729 183730 183731 183732 183733 183734 183735 183736 183737 183738 183739 183740 183741 183742 183743 183744 183745 183746 183747 183748 183749 183750 183751 183752 183753 183754 183755 183756 183757 183758 183759 183760 183761 183762 183763 183764 183765 183766 183767 183768 183769 183770 183771 183772 183773 183774 183775 183776 183777 183778 183779 183780 183781 183782 183783 183784 183785 183786 183787 183788 183789 183790 183791 183792 183793 183794 183795 183796 183797 183798 183799 183800 183801 183802 183803 183804 183805 183806 183807 183808 183809 183810 183811 183812 183813 183814 183815 183816 183817 183818 183819 183820 183821 183822 183823 183824 183825 183826 183827 183828 183829 183830 183831 183832 183833 183834 183835 183836 183837 183838 183839 183840 183841 183842 183843 183844 183845 183846 183847 183848 183849 183850 183851 183852 183853 183854 183855 183856 183857 183858 183859 183860 183861 183862 183863 183864 183865 183866 183867 183868 183869 183870 183871 183872 183873 183874 183875 183876 183877 183878 183879 183880 183881 183882 183883 183884 183885 183886 183887 183888 183889 183890 183891 183892 183893 183894 183895 183896 183897 183898 183899 183900 183901 183902 183903 183904 183905 183906 183907 183908 183909 183910 183911 183912 183913 183914 183915 183916 183917 183918 183919 183920 183921 183922 183923 183924 183925 183926 183927 183928 183929 183930 183931 183932 183933 183934 183935 183936 183937 183938 183939 183940 183941 183942 183943 183944 183945 183946 183947 183948 183949 183950 183951 183952 183953 183954 183955 183956 183957 183958 183959 183960 183961 183962 183963 183964 183965 183966 183967 183968 183969 183970 183971 183972 183973 183974 183975 183976 183977 183978 183979 183980 183981 183982 183983 183984 183985 183986 183987 183988 183989 183990 183991 183992 183993 183994 183995 183996 183997 183998 183999 184000 184001 184002 184003 184004 184005 184006 184007 184008 184009 184010 184011 184012 184013 184014 184015 184016 184017 184018 184019 184020 184021 184022 184023 184024 184025 184026 184027 184028 184029 184030 184031 184032 184033 184034 184035 184036 184037 184038 184039 184040 184041 184042 184043 184044 184045 184046 184047 184048 184049 184050 184051 184052 184053 184054 184055 184056 184057 184058 184059 184060 184061 184062 184063 184064 184065 184066 184067 184068 184069 184070 184071 184072 184073 184074 184075 184076 184077 184078 184079 184080 184081 184082 184083 184084 184085 184086 184087 184088 184089 184090 184091 184092 184093 184094 184095 184096 184097 184098 184099 184100 184101 184102 184103 184104 184105 184106 184107 184108 184109 184110 184111 184112 184113 184114 184115 184116 184117 184118 184119 184120 184121 184122 184123 184124 184125 184126 184127 184128 184129 184130 184131 184132 184133 184134 184135 184136 184137 184138 184139 184140 184141 184142 184143 184144 184145 184146 184147 184148 184149 184150 184151 184152 184153 184154 184155 184156 184157 184158 184159 184160 184161 184162 184163 184164 184165 184166 184167 184168 184169 184170 184171 184172 184173 184174 184175 184176 184177 184178 184179 184180 184181 184182 184183 184184 184185 184186 184187 184188 184189 184190 184191 184192 184193 184194 184195 184196 184197 184198 184199 184200 184201 184202 184203 184204 184205 184206 184207 184208 184209 184210 184211 184212 184213 184214 184215 184216 184217 184218 184219 184220 184221 184222 184223 184224 184225 184226 184227 184228 184229 184230 184231 184232 184233 184234 184235 184236 184237 184238 184239 184240 184241 184242 184243 184244 184245 184246 184247 184248 184249 184250 184251 184252 184253 184254 184255 184256 184257 184258 184259 184260 184261 184262 184263 184264 184265 184266 184267 184268 184269 184270 184271 184272 184273 184274 184275 184276 184277 184278 184279 184280 184281 184282 184283 184284 184285 184286 184287 184288 184289 184290 184291 184292 184293 184294 184295 184296 184297 184298 184299 184300 184301 184302 184303 184304 184305 184306 184307 184308 184309 184310 184311 184312 184313 184314 184315 184316 184317 184318 184319 184320 184321 184322 184323 184324 184325 184326 184327 184328 184329 184330 184331 184332 184333 184334 184335 184336 184337 184338 184339 184340 184341 184342 184343 184344 184345 184346 184347 184348 184349 184350 184351 184352 184353 184354 184355 184356 184357 184358 184359 184360 184361 184362 184363 184364 184365 184366 184367 184368 184369 184370 184371 184372 184373 184374 184375 184376 184377 184378 184379 184380 184381 184382 184383 184384 184385 184386 184387 184388 184389 184390 184391 184392 184393 184394 184395 184396 184397 184398 184399 184400 184401 184402 184403 184404 184405 184406 184407 184408 184409 184410 184411 184412 184413 184414 184415 184416 184417 184418 184419 184420 184421 184422 184423 184424 184425 184426 184427 184428 184429 184430 184431 184432 184433 184434 184435 184436 184437 184438 184439 184440 184441 184442 184443 184444 184445 184446 184447 184448 184449 184450 184451 184452 184453 184454 184455 184456 184457 184458 184459 184460 184461 184462 184463 184464 184465 184466 184467 184468 184469 184470 184471 184472 184473 184474 184475 184476 184477 184478 184479 184480 184481 184482 184483 184484 184485 184486 184487 184488 184489 184490 184491 184492 184493 184494 184495 184496 184497 184498 184499 184500 184501 184502 184503 184504 184505 184506 184507 184508 184509 184510 184511 184512 184513 184514 184515 184516 184517 184518 184519 184520 184521 184522 184523 184524 184525 184526 184527 184528 184529 184530 184531 184532 184533 184534 184535 184536 184537 184538 184539 184540 184541 184542 184543 184544 184545 184546 184547 184548 184549 184550 184551 184552 184553 184554 184555 184556 184557 184558 184559 184560 184561 184562 184563 184564 184565 184566 184567 184568 184569 184570 184571 184572 184573 184574 184575 184576 184577 184578 184579 184580 184581 184582 184583 184584 184585 184586 184587 184588 184589 184590 184591 184592 184593 184594 184595 184596 184597 184598 184599 184600 184601 184602 184603 184604 184605 184606 184607 184608 184609 184610 184611 184612 184613 184614 184615 184616 184617 184618 184619 184620 184621 184622 184623 184624 184625 184626 184627 184628 184629 184630 184631 184632 184633 184634 184635 184636 184637 184638 184639 184640 184641 184642 184643 184644 184645 184646 184647 184648 184649 184650 184651 184652 184653 184654 184655 184656 184657 184658 184659 184660 184661 184662 184663 184664 184665 184666 184667 184668 184669 184670 184671 184672 184673 184674 184675 184676 184677 184678 184679 184680 184681 184682 184683 184684 184685 184686 184687 184688 184689 184690 184691 184692 184693 184694 184695 184696 184697 184698 184699 184700 184701 184702 184703 184704 184705 184706 184707 184708 184709 184710 184711 184712 184713 184714 184715 184716 184717 184718 184719 184720 184721 184722 184723 184724 184725 184726 184727 184728 184729 184730 184731 184732 184733 184734 184735 184736 184737 184738 184739 184740 184741 184742 184743 184744 184745 184746 184747 184748 184749 184750 184751 184752 184753 184754 184755 184756 184757 184758 184759 184760 184761 184762 184763 184764 184765 184766 184767 184768 184769 184770 184771 184772 184773 184774 184775 184776 184777 184778 184779 184780 184781 184782 184783 184784 184785 184786 184787 184788 184789 184790 184791 184792 184793 184794 184795 184796 184797 184798 184799 184800 184801 184802 184803 184804 184805 184806 184807 184808 184809 184810 184811 184812 184813 184814 184815 184816 184817 184818 184819 184820 184821 184822 184823 184824 184825 184826 184827 184828 184829 184830 184831 184832 184833 184834 184835 184836 184837 184838 184839 184840 184841 184842 184843 184844 184845 184846 184847 184848 184849 184850 184851 184852 184853 184854 184855 184856 184857 184858 184859 184860 184861 184862 184863 184864 184865 184866 184867 184868 184869 184870 184871 184872 184873 184874 184875 184876 184877 184878 184879 184880 184881 184882 184883 184884 184885 184886 184887 184888 184889 184890 184891 184892 184893 184894 184895 184896 184897 184898 184899 184900 184901 184902 184903 184904 184905 184906 184907 184908 184909 184910 184911 184912 184913 184914 184915 184916 184917 184918 184919 184920 184921 184922 184923 184924 184925 184926 184927 184928 184929 184930 184931 184932 184933 184934 184935 184936 184937 184938 184939 184940 184941 184942 184943 184944 184945 184946 184947 184948 184949 184950 184951 184952 184953 184954 184955 184956 184957 184958 184959 184960 184961 184962 184963 184964 184965 184966 184967 184968 184969 184970 184971 184972 184973 184974 184975 184976 184977 184978 184979 184980 184981 184982 184983 184984 184985 184986 184987 184988 184989 184990 184991 184992 184993 184994 184995 184996 184997 184998 184999 185000 185001 185002 185003 185004 185005 185006 185007 185008 185009 185010 185011 185012 185013 185014 185015 185016 185017 185018 185019 185020 185021 185022 185023 185024 185025 185026 185027 185028 185029 185030 185031 185032 185033 185034 185035 185036 185037 185038 185039 185040 185041 185042 185043 185044 185045 185046 185047 185048 185049 185050 185051 185052 185053 185054 185055 185056 185057 185058 185059 185060 185061 185062 185063 185064 185065 185066 185067 185068 185069 185070 185071 185072 185073 185074 185075 185076 185077 185078 185079 185080 185081 185082 185083 185084 185085 185086 185087 185088 185089 185090 185091 185092 185093 185094 185095 185096 185097 185098 185099 185100 185101 185102 185103 185104 185105 185106 185107 185108 185109 185110 185111 185112 185113 185114 185115 185116 185117 185118 185119 185120 185121 185122 185123 185124 185125 185126 185127 185128 185129 185130 185131 185132 185133 185134 185135 185136 185137 185138 185139 185140 185141 185142 185143 185144 185145 185146 185147 185148 185149 185150 185151 185152 185153 185154 185155 185156 185157 185158 185159 185160 185161 185162 185163 185164 185165 185166 185167 185168 185169 185170 185171 185172 185173 185174 185175 185176 185177 185178 185179 185180 185181 185182 185183 185184 185185 185186 185187 185188 185189 185190 185191 185192 185193 185194 185195 185196 185197 185198 185199 185200 185201 185202 185203 185204 185205 185206 185207 185208 185209 185210 185211 185212 185213 185214 185215 185216 185217 185218 185219 185220 185221 185222 185223 185224 185225 185226 185227 185228 185229 185230 185231 185232 185233 185234 185235 185236 185237 185238 185239 185240 185241 185242 185243 185244 185245 185246 185247 185248 185249 185250 185251 185252 185253 185254 185255 185256 185257 185258 185259 185260 185261 185262 185263 185264 185265 185266 185267 185268 185269 185270 185271 185272 185273 185274 185275 185276 185277 185278 185279 185280 185281 185282 185283 185284 185285 185286 185287 185288 185289 185290 185291 185292 185293 185294 185295 185296 185297 185298 185299 185300 185301 185302 185303 185304 185305 185306 185307 185308 185309 185310 185311 185312 185313 185314 185315 185316 185317 185318 185319 185320 185321 185322 185323 185324 185325 185326 185327 185328 185329 185330 185331 185332 185333 185334 185335 185336 185337 185338 185339 185340 185341 185342 185343 185344 185345 185346 185347 185348 185349 185350 185351 185352 185353 185354 185355 185356 185357 185358 185359 185360 185361 185362 185363 185364 185365 185366 185367 185368 185369 185370 185371 185372 185373 185374 185375 185376 185377 185378 185379 185380 185381 185382 185383 185384 185385 185386 185387 185388 185389 185390 185391 185392 185393 185394 185395 185396 185397 185398 185399 185400 185401 185402 185403 185404 185405 185406 185407 185408 185409 185410 185411 185412 185413 185414 185415 185416 185417 185418 185419 185420 185421 185422 185423 185424 185425 185426 185427 185428 185429 185430 185431 185432 185433 185434 185435 185436 185437 185438 185439 185440 185441 185442 185443 185444 185445 185446 185447 185448 185449 185450 185451 185452 185453 185454 185455 185456 185457 185458 185459 185460 185461 185462 185463 185464 185465 185466 185467 185468 185469 185470 185471 185472 185473 185474 185475 185476 185477 185478 185479 185480 185481 185482 185483 185484 185485 185486 185487 185488 185489 185490 185491 185492 185493 185494 185495 185496 185497 185498 185499 185500 185501 185502 185503 185504 185505 185506 185507 185508 185509 185510 185511 185512 185513 185514 185515 185516 185517 185518 185519 185520 185521 185522 185523 185524 185525 185526 185527 185528 185529 185530 185531 185532 185533 185534 185535 185536 185537 185538 185539 185540 185541 185542 185543 185544 185545 185546 185547 185548 185549 185550 185551 185552 185553 185554 185555 185556 185557 185558 185559 185560 185561 185562 185563 185564 185565 185566 185567 185568 185569 185570 185571 185572 185573 185574 185575 185576 185577 185578 185579 185580 185581 185582 185583 185584 185585 185586 185587 185588 185589 185590 185591 185592 185593 185594 185595 185596 185597 185598 185599 185600 185601 185602 185603 185604 185605 185606 185607 185608 185609 185610 185611 185612 185613 185614 185615 185616 185617 185618 185619 185620 185621 185622 185623 185624 185625 185626 185627 185628 185629 185630 185631 185632 185633 185634 185635 185636 185637 185638 185639 185640 185641 185642 185643 185644 185645 185646 185647 185648 185649 185650 185651 185652 185653 185654 185655 185656 185657 185658 185659 185660 185661 185662 185663 185664 185665 185666 185667 185668 185669 185670 185671 185672 185673 185674 185675 185676 185677 185678 185679 185680 185681 185682 185683 185684 185685 185686 185687 185688 185689 185690 185691 185692 185693 185694 185695 185696 185697 185698 185699 185700 185701 185702 185703 185704 185705 185706 185707 185708 185709 185710 185711 185712 185713 185714 185715 185716 185717 185718 185719 185720 185721 185722 185723 185724 185725 185726 185727 185728 185729 185730 185731 185732 185733 185734 185735 185736 185737 185738 185739 185740 185741 185742 185743 185744 185745 185746 185747 185748 185749 185750 185751 185752 185753 185754 185755 185756 185757 185758 185759 185760 185761 185762 185763 185764 185765 185766 185767 185768 185769 185770 185771 185772 185773 185774 185775 185776 185777 185778 185779 185780 185781 185782 185783 185784 185785 185786 185787 185788 185789 185790 185791 185792 185793 185794 185795 185796 185797 185798 185799 185800 185801 185802 185803 185804 185805 185806 185807 185808 185809 185810 185811 185812 185813 185814 185815 185816 185817 185818 185819 185820 185821 185822 185823 185824 185825 185826 185827 185828 185829 185830 185831 185832 185833 185834 185835 185836 185837 185838 185839 185840 185841 185842 185843 185844 185845 185846 185847 185848 185849 185850 185851 185852 185853 185854 185855 185856 185857 185858 185859 185860 185861 185862 185863 185864 185865 185866 185867 185868 185869 185870 185871 185872 185873 185874 185875 185876 185877 185878 185879 185880 185881 185882 185883 185884 185885 185886 185887 185888 185889 185890 185891 185892 185893 185894 185895 185896 185897 185898 185899 185900 185901 185902 185903 185904 185905 185906 185907 185908 185909 185910 185911 185912 185913 185914 185915 185916 185917 185918 185919 185920 185921 185922 185923 185924 185925 185926 185927 185928 185929 185930 185931 185932 185933 185934 185935 185936 185937 185938 185939 185940 185941 185942 185943 185944 185945 185946 185947 185948 185949 185950 185951 185952 185953 185954 185955 185956 185957 185958 185959 185960 185961 185962 185963 185964 185965 185966 185967 185968 185969 185970 185971 185972 185973 185974 185975 185976 185977 185978 185979 185980 185981 185982 185983 185984 185985 185986 185987 185988 185989 185990 185991 185992 185993 185994 185995 185996 185997 185998 185999 186000 186001 186002 186003 186004 186005 186006 186007 186008 186009 186010 186011 186012 186013 186014 186015 186016 186017 186018 186019 186020 186021 186022 186023 186024 186025 186026 186027 186028 186029 186030 186031 186032 186033 186034 186035 186036 186037 186038 186039 186040 186041 186042 186043 186044 186045 186046 186047 186048 186049 186050 186051 186052 186053 186054 186055 186056 186057 186058 186059 186060 186061 186062 186063 186064 186065 186066 186067 186068 186069 186070 186071 186072 186073 186074 186075 186076 186077 186078 186079 186080 186081 186082 186083 186084 186085 186086 186087 186088 186089 186090 186091 186092 186093 186094 186095 186096 186097 186098 186099 186100 186101 186102 186103 186104 186105 186106 186107 186108 186109 186110 186111 186112 186113 186114 186115 186116 186117 186118 186119 186120 186121 186122 186123 186124 186125 186126 186127 186128 186129 186130 186131 186132 186133 186134 186135 186136 186137 186138 186139 186140 186141 186142 186143 186144 186145 186146 186147 186148 186149 186150 186151 186152 186153 186154 186155 186156 186157 186158 186159 186160 186161 186162 186163 186164 186165 186166 186167 186168 186169 186170 186171 186172 186173 186174 186175 186176 186177 186178 186179 186180 186181 186182 186183 186184 186185 186186 186187 186188 186189 186190 186191 186192 186193 186194 186195 186196 186197 186198 186199 186200 186201 186202 186203 186204 186205 186206 186207 186208 186209 186210 186211 186212 186213 186214 186215 186216 186217 186218 186219 186220 186221 186222 186223 186224 186225 186226 186227 186228 186229 186230 186231 186232 186233 186234 186235 186236 186237 186238 186239 186240 186241 186242 186243 186244 186245 186246 186247 186248 186249 186250 186251 186252 186253 186254 186255 186256 186257 186258 186259 186260 186261 186262 186263 186264 186265 186266 186267 186268 186269 186270 186271 186272 186273 186274 186275 186276 186277 186278 186279 186280 186281 186282 186283 186284 186285 186286 186287 186288 186289 186290 186291 186292 186293 186294 186295 186296 186297 186298 186299 186300 186301 186302 186303 186304 186305 186306 186307 186308 186309 186310 186311 186312 186313 186314 186315 186316 186317 186318 186319 186320 186321 186322 186323 186324 186325 186326 186327 186328 186329 186330 186331 186332 186333 186334 186335 186336 186337 186338 186339 186340 186341 186342 186343 186344 186345 186346 186347 186348 186349 186350 186351 186352 186353 186354 186355 186356 186357 186358 186359 186360 186361 186362 186363 186364 186365 186366 186367 186368 186369 186370 186371 186372 186373 186374 186375 186376 186377 186378 186379 186380 186381 186382 186383 186384 186385 186386 186387 186388 186389 186390 186391 186392 186393 186394 186395 186396 186397 186398 186399 186400 186401 186402 186403 186404 186405 186406 186407 186408 186409 186410 186411 186412 186413 186414 186415 186416 186417 186418 186419 186420 186421 186422 186423 186424 186425 186426 186427 186428 186429 186430 186431 186432 186433 186434 186435 186436 186437 186438 186439 186440 186441 186442 186443 186444 186445 186446 186447 186448 186449 186450 186451 186452 186453 186454 186455 186456 186457 186458 186459 186460 186461 186462 186463 186464 186465 186466 186467 186468 186469 186470 186471 186472 186473 186474 186475 186476 186477 186478 186479 186480 186481 186482 186483 186484 186485 186486 186487 186488 186489 186490 186491 186492 186493 186494 186495 186496 186497 186498 186499 186500 186501 186502 186503 186504 186505 186506 186507 186508 186509 186510 186511 186512 186513 186514 186515 186516 186517 186518 186519 186520 186521 186522 186523 186524 186525 186526 186527 186528 186529 186530 186531 186532 186533 186534 186535 186536 186537 186538 186539 186540 186541 186542 186543 186544 186545 186546 186547 186548 186549 186550 186551 186552 186553 186554 186555 186556 186557 186558 186559 186560 186561 186562 186563 186564 186565 186566 186567 186568 186569 186570 186571 186572 186573 186574 186575 186576 186577 186578 186579 186580 186581 186582 186583 186584 186585 186586 186587 186588 186589 186590 186591 186592 186593 186594 186595 186596 186597 186598 186599 186600 186601 186602 186603 186604 186605 186606 186607 186608 186609 186610 186611 186612 186613 186614 186615 186616 186617 186618 186619 186620 186621 186622 186623 186624 186625 186626 186627 186628 186629 186630 186631 186632 186633 186634 186635 186636 186637 186638 186639 186640 186641 186642 186643 186644 186645 186646 186647 186648 186649 186650 186651 186652 186653 186654 186655 186656 186657 186658 186659 186660 186661 186662 186663 186664 186665 186666 186667 186668 186669 186670 186671 186672 186673 186674 186675 186676 186677 186678 186679 186680 186681 186682 186683 186684 186685 186686 186687 186688 186689 186690 186691 186692 186693 186694 186695 186696 186697 186698 186699 186700 186701 186702 186703 186704 186705 186706 186707 186708 186709 186710 186711 186712 186713 186714 186715 186716 186717 186718 186719 186720 186721 186722 186723 186724 186725 186726 186727 186728 186729 186730 186731 186732 186733 186734 186735 186736 186737 186738 186739 186740 186741 186742 186743 186744 186745 186746 186747 186748 186749 186750 186751 186752 186753 186754 186755 186756 186757 186758 186759 186760 186761 186762 186763 186764 186765 186766 186767 186768 186769 186770 186771 186772 186773 186774 186775 186776 186777 186778 186779 186780 186781 186782 186783 186784 186785 186786 186787 186788 186789 186790 186791 186792 186793 186794 186795 186796 186797 186798 186799 186800 186801 186802 186803 186804 186805 186806 186807 186808 186809 186810 186811 186812 186813 186814 186815 186816 186817 186818 186819 186820 186821 186822 186823 186824 186825 186826 186827 186828 186829 186830 186831 186832 186833 186834 186835 186836 186837 186838 186839 186840 186841 186842 186843 186844 186845 186846 186847 186848 186849 186850 186851 186852 186853 186854 186855 186856 186857 186858 186859 186860 186861 186862 186863 186864 186865 186866 186867 186868 186869 186870 186871 186872 186873 186874 186875 186876 186877 186878 186879 186880 186881 186882 186883 186884 186885 186886 186887 186888 186889 186890 186891 186892 186893 186894 186895 186896 186897 186898 186899 186900 186901 186902 186903 186904 186905 186906 186907 186908 186909 186910 186911 186912 186913 186914 186915 186916 186917 186918 186919 186920 186921 186922 186923 186924 186925 186926 186927 186928 186929 186930 186931 186932 186933 186934 186935 186936 186937 186938 186939 186940 186941 186942 186943 186944 186945 186946 186947 186948 186949 186950 186951 186952 186953 186954 186955 186956 186957 186958 186959 186960 186961 186962 186963 186964 186965 186966 186967 186968 186969 186970 186971 186972 186973 186974 186975 186976 186977 186978 186979 186980 186981 186982 186983 186984 186985 186986 186987 186988 186989 186990 186991 186992 186993 186994 186995 186996 186997 186998 186999 187000 187001 187002 187003 187004 187005 187006 187007 187008 187009 187010 187011 187012 187013 187014 187015 187016 187017 187018 187019 187020 187021 187022 187023 187024 187025 187026 187027 187028 187029 187030 187031 187032 187033 187034 187035 187036 187037 187038 187039 187040 187041 187042 187043 187044 187045 187046 187047 187048 187049 187050 187051 187052 187053 187054 187055 187056 187057 187058 187059 187060 187061 187062 187063 187064 187065 187066 187067 187068 187069 187070 187071 187072 187073 187074 187075 187076 187077 187078 187079 187080 187081 187082 187083 187084 187085 187086 187087 187088 187089 187090 187091 187092 187093 187094 187095 187096 187097 187098 187099 187100 187101 187102 187103 187104 187105 187106 187107 187108 187109 187110 187111 187112 187113 187114 187115 187116 187117 187118 187119 187120 187121 187122 187123 187124 187125 187126 187127 187128 187129 187130 187131 187132 187133 187134 187135 187136 187137 187138 187139 187140 187141 187142 187143 187144 187145 187146 187147 187148 187149 187150 187151 187152 187153 187154 187155 187156 187157 187158 187159 187160 187161 187162 187163 187164 187165 187166 187167 187168 187169 187170 187171 187172 187173 187174 187175 187176 187177 187178 187179 187180 187181 187182 187183 187184 187185 187186 187187 187188 187189 187190 187191 187192 187193 187194 187195 187196 187197 187198 187199 187200 187201 187202 187203 187204 187205 187206 187207 187208 187209 187210 187211 187212 187213 187214 187215 187216 187217 187218 187219 187220 187221 187222 187223 187224 187225 187226 187227 187228 187229 187230 187231 187232 187233 187234 187235 187236 187237 187238 187239 187240 187241 187242 187243 187244 187245 187246 187247 187248 187249 187250 187251 187252 187253 187254 187255 187256 187257 187258 187259 187260 187261 187262 187263 187264 187265 187266 187267 187268 187269 187270 187271 187272 187273 187274 187275 187276 187277 187278 187279 187280 187281 187282 187283 187284 187285 187286 187287 187288 187289 187290 187291 187292 187293 187294 187295 187296 187297 187298 187299 187300 187301 187302 187303 187304 187305 187306 187307 187308 187309 187310 187311 187312 187313 187314 187315 187316 187317 187318 187319 187320 187321 187322 187323 187324 187325 187326 187327 187328 187329 187330 187331 187332 187333 187334 187335 187336 187337 187338 187339 187340 187341 187342 187343 187344 187345 187346 187347 187348 187349 187350 187351 187352 187353 187354 187355 187356 187357 187358 187359 187360 187361 187362 187363 187364 187365 187366 187367 187368 187369 187370 187371 187372 187373 187374 187375 187376 187377 187378 187379 187380 187381 187382 187383 187384 187385 187386 187387 187388 187389 187390 187391 187392 187393 187394 187395 187396 187397 187398 187399 187400 187401 187402 187403 187404 187405 187406 187407 187408 187409 187410 187411 187412 187413 187414 187415 187416 187417 187418 187419 187420 187421 187422 187423 187424 187425 187426 187427 187428 187429 187430 187431 187432 187433 187434 187435 187436 187437 187438 187439 187440 187441 187442 187443 187444 187445 187446 187447 187448 187449 187450 187451 187452 187453 187454 187455 187456 187457 187458 187459 187460 187461 187462 187463 187464 187465 187466 187467 187468 187469 187470 187471 187472 187473 187474 187475 187476 187477 187478 187479 187480 187481 187482 187483 187484 187485 187486 187487 187488 187489 187490 187491 187492 187493 187494 187495 187496 187497 187498 187499 187500 187501 187502 187503 187504 187505 187506 187507 187508 187509 187510 187511 187512 187513 187514 187515 187516 187517 187518 187519 187520 187521 187522 187523 187524 187525 187526 187527 187528 187529 187530 187531 187532 187533 187534 187535 187536 187537 187538 187539 187540 187541 187542 187543 187544 187545 187546 187547 187548 187549 187550 187551 187552 187553 187554 187555 187556 187557 187558 187559 187560 187561 187562 187563 187564 187565 187566 187567 187568 187569 187570 187571 187572 187573 187574 187575 187576 187577 187578 187579 187580 187581 187582 187583 187584 187585 187586 187587 187588 187589 187590 187591 187592 187593 187594 187595 187596 187597 187598 187599 187600 187601 187602 187603 187604 187605 187606 187607 187608 187609 187610 187611 187612 187613 187614 187615 187616 187617 187618 187619 187620 187621 187622 187623 187624 187625 187626 187627 187628 187629 187630 187631 187632 187633 187634 187635 187636 187637 187638 187639 187640 187641 187642 187643 187644 187645 187646 187647 187648 187649 187650 187651 187652 187653 187654 187655 187656 187657 187658 187659 187660 187661 187662 187663 187664 187665 187666 187667 187668 187669 187670 187671 187672 187673 187674 187675 187676 187677 187678 187679 187680 187681 187682 187683 187684 187685 187686 187687 187688 187689 187690 187691 187692 187693 187694 187695 187696 187697 187698 187699 187700 187701 187702 187703 187704 187705 187706 187707 187708 187709 187710 187711 187712 187713 187714 187715 187716 187717 187718 187719 187720 187721 187722 187723 187724 187725 187726 187727 187728 187729 187730 187731 187732 187733 187734 187735 187736 187737 187738 187739 187740 187741 187742 187743 187744 187745 187746 187747 187748 187749 187750 187751 187752 187753 187754 187755 187756 187757 187758 187759 187760 187761 187762 187763 187764 187765 187766 187767 187768 187769 187770 187771 187772 187773 187774 187775 187776 187777 187778 187779 187780 187781 187782 187783 187784 187785 187786 187787 187788 187789 187790 187791 187792 187793 187794 187795 187796 187797 187798 187799 187800 187801 187802 187803 187804 187805 187806 187807 187808 187809 187810 187811 187812 187813 187814 187815 187816 187817 187818 187819 187820 187821 187822 187823 187824 187825 187826 187827 187828 187829 187830 187831 187832 187833 187834 187835 187836 187837 187838 187839 187840 187841 187842 187843 187844 187845 187846 187847 187848 187849 187850 187851 187852 187853 187854 187855 187856 187857 187858 187859 187860 187861 187862 187863 187864 187865 187866 187867 187868 187869 187870 187871 187872 187873 187874 187875 187876 187877 187878 187879 187880 187881 187882 187883 187884 187885 187886 187887 187888 187889 187890 187891 187892 187893 187894 187895 187896 187897 187898 187899 187900 187901 187902 187903 187904 187905 187906 187907 187908 187909 187910 187911 187912 187913 187914 187915 187916 187917 187918 187919 187920 187921 187922 187923 187924 187925 187926 187927 187928 187929 187930 187931 187932 187933 187934 187935 187936 187937 187938 187939 187940 187941 187942 187943 187944 187945 187946 187947 187948 187949 187950 187951 187952 187953 187954 187955 187956 187957 187958 187959 187960 187961 187962 187963 187964 187965 187966 187967 187968 187969 187970 187971 187972 187973 187974 187975 187976 187977 187978 187979 187980 187981 187982 187983 187984 187985 187986 187987 187988 187989 187990 187991 187992 187993 187994 187995 187996 187997 187998 187999 188000 188001 188002 188003 188004 188005 188006 188007 188008 188009 188010 188011 188012 188013 188014 188015 188016 188017 188018 188019 188020 188021 188022 188023 188024 188025 188026 188027 188028 188029 188030 188031 188032 188033 188034 188035 188036 188037 188038 188039 188040 188041 188042 188043 188044 188045 188046 188047 188048 188049 188050 188051 188052 188053 188054 188055 188056 188057 188058 188059 188060 188061 188062 188063 188064 188065 188066 188067 188068 188069 188070 188071 188072 188073 188074 188075 188076 188077 188078 188079 188080 188081 188082 188083 188084 188085 188086 188087 188088 188089 188090 188091 188092 188093 188094 188095 188096 188097 188098 188099 188100 188101 188102 188103 188104 188105 188106 188107 188108 188109 188110 188111 188112 188113 188114 188115 188116 188117 188118 188119 188120 188121 188122 188123 188124 188125 188126 188127 188128 188129 188130 188131 188132 188133 188134 188135 188136 188137 188138 188139 188140 188141 188142 188143 188144 188145 188146 188147 188148 188149 188150 188151 188152 188153 188154 188155 188156 188157 188158 188159 188160 188161 188162 188163 188164 188165 188166 188167 188168 188169 188170 188171 188172 188173 188174 188175 188176 188177 188178 188179 188180 188181 188182 188183 188184 188185 188186 188187 188188 188189 188190 188191 188192 188193 188194 188195 188196 188197 188198 188199 188200 188201 188202 188203 188204 188205 188206 188207 188208 188209 188210 188211 188212 188213 188214 188215 188216 188217 188218 188219 188220 188221 188222 188223 188224 188225 188226 188227 188228 188229 188230 188231 188232 188233 188234 188235 188236 188237 188238 188239 188240 188241 188242 188243 188244 188245 188246 188247 188248 188249 188250 188251 188252 188253 188254 188255 188256 188257 188258 188259 188260 188261 188262 188263 188264 188265 188266 188267 188268 188269 188270 188271 188272 188273 188274 188275 188276 188277 188278 188279 188280 188281 188282 188283 188284 188285 188286 188287 188288 188289 188290 188291 188292 188293 188294 188295 188296 188297 188298 188299 188300 188301 188302 188303 188304 188305 188306 188307 188308 188309 188310 188311 188312 188313 188314 188315 188316 188317 188318 188319 188320 188321 188322 188323 188324 188325 188326 188327 188328 188329 188330 188331 188332 188333 188334 188335 188336 188337 188338 188339 188340 188341 188342 188343 188344 188345 188346 188347 188348 188349 188350 188351 188352 188353 188354 188355 188356 188357 188358 188359 188360 188361 188362 188363 188364 188365 188366 188367 188368 188369 188370 188371 188372 188373 188374 188375 188376 188377 188378 188379 188380 188381 188382 188383 188384 188385 188386 188387 188388 188389 188390 188391 188392 188393 188394 188395 188396 188397 188398 188399 188400 188401 188402 188403 188404 188405 188406 188407 188408 188409 188410 188411 188412 188413 188414 188415 188416 188417 188418 188419 188420 188421 188422 188423 188424 188425 188426 188427 188428 188429 188430 188431 188432 188433 188434 188435 188436 188437 188438 188439 188440 188441 188442 188443 188444 188445 188446 188447 188448 188449 188450 188451 188452 188453 188454 188455 188456 188457 188458 188459 188460 188461 188462 188463 188464 188465 188466 188467 188468 188469 188470 188471 188472 188473 188474 188475 188476 188477 188478 188479 188480 188481 188482 188483 188484 188485 188486 188487 188488 188489 188490 188491 188492 188493 188494 188495 188496 188497 188498 188499 188500 188501 188502 188503 188504 188505 188506 188507 188508 188509 188510 188511 188512 188513 188514 188515 188516 188517 188518 188519 188520 188521 188522 188523 188524 188525 188526 188527 188528 188529 188530 188531 188532 188533 188534 188535 188536 188537 188538 188539 188540 188541 188542 188543 188544 188545 188546 188547 188548 188549 188550 188551 188552 188553 188554 188555 188556 188557 188558 188559 188560 188561 188562 188563 188564 188565 188566 188567 188568 188569 188570 188571 188572 188573 188574 188575 188576 188577 188578 188579 188580 188581 188582 188583 188584 188585 188586 188587 188588 188589 188590 188591 188592 188593 188594 188595 188596 188597 188598 188599 188600 188601 188602 188603 188604 188605 188606 188607 188608 188609 188610 188611 188612 188613 188614 188615 188616 188617 188618 188619 188620 188621 188622 188623 188624 188625 188626 188627 188628 188629 188630 188631 188632 188633 188634 188635 188636 188637 188638 188639 188640 188641 188642 188643 188644 188645 188646 188647 188648 188649 188650 188651 188652 188653 188654 188655 188656 188657 188658 188659 188660 188661 188662 188663 188664 188665 188666 188667 188668 188669 188670 188671 188672 188673 188674 188675 188676 188677 188678 188679 188680 188681 188682 188683 188684 188685 188686 188687 188688 188689 188690 188691 188692 188693 188694 188695 188696 188697 188698 188699 188700 188701 188702 188703 188704 188705 188706 188707 188708 188709 188710 188711 188712 188713 188714 188715 188716 188717 188718 188719 188720 188721 188722 188723 188724 188725 188726 188727 188728 188729 188730 188731 188732 188733 188734 188735 188736 188737 188738 188739 188740 188741 188742 188743 188744 188745 188746 188747 188748 188749 188750 188751 188752 188753 188754 188755 188756 188757 188758 188759 188760 188761 188762 188763 188764 188765 188766 188767 188768 188769 188770 188771 188772 188773 188774 188775 188776 188777 188778 188779 188780 188781 188782 188783 188784 188785 188786 188787 188788 188789 188790 188791 188792 188793 188794 188795 188796 188797 188798 188799 188800 188801 188802 188803 188804 188805 188806 188807 188808 188809 188810 188811 188812 188813 188814 188815 188816 188817 188818 188819 188820 188821 188822 188823 188824 188825 188826 188827 188828 188829 188830 188831 188832 188833 188834 188835 188836 188837 188838 188839 188840 188841 188842 188843 188844 188845 188846 188847 188848 188849 188850 188851 188852 188853 188854 188855 188856 188857 188858 188859 188860 188861 188862 188863 188864 188865 188866 188867 188868 188869 188870 188871 188872 188873 188874 188875 188876 188877 188878 188879 188880 188881 188882 188883 188884 188885 188886 188887 188888 188889 188890 188891 188892 188893 188894 188895 188896 188897 188898 188899 188900 188901 188902 188903 188904 188905 188906 188907 188908 188909 188910 188911 188912 188913 188914 188915 188916 188917 188918 188919 188920 188921 188922 188923 188924 188925 188926 188927 188928 188929 188930 188931 188932 188933 188934 188935 188936 188937 188938 188939 188940 188941 188942 188943 188944 188945 188946 188947 188948 188949 188950 188951 188952 188953 188954 188955 188956 188957 188958 188959 188960 188961 188962 188963 188964 188965 188966 188967 188968 188969 188970 188971 188972 188973 188974 188975 188976 188977 188978 188979 188980 188981 188982 188983 188984 188985 188986 188987 188988 188989 188990 188991 188992 188993 188994 188995 188996 188997 188998 188999 189000 189001 189002 189003 189004 189005 189006 189007 189008 189009 189010 189011 189012 189013 189014 189015 189016 189017 189018 189019 189020 189021 189022 189023 189024 189025 189026 189027 189028 189029 189030 189031 189032 189033 189034 189035 189036 189037 189038 189039 189040 189041 189042 189043 189044 189045 189046 189047 189048 189049 189050 189051 189052 189053 189054 189055 189056 189057 189058 189059 189060 189061 189062 189063 189064 189065 189066 189067 189068 189069 189070 189071 189072 189073 189074 189075 189076 189077 189078 189079 189080 189081 189082 189083 189084 189085 189086 189087 189088 189089 189090 189091 189092 189093 189094 189095 189096 189097 189098 189099 189100 189101 189102 189103 189104 189105 189106 189107 189108 189109 189110 189111 189112 189113 189114 189115 189116 189117 189118 189119 189120 189121 189122 189123 189124 189125 189126 189127 189128 189129 189130 189131 189132 189133 189134 189135 189136 189137 189138 189139 189140 189141 189142 189143 189144 189145 189146 189147 189148 189149 189150 189151 189152 189153 189154 189155 189156 189157 189158 189159 189160 189161 189162 189163 189164 189165 189166 189167 189168 189169 189170 189171 189172 189173 189174 189175 189176 189177 189178 189179 189180 189181 189182 189183 189184 189185 189186 189187 189188 189189 189190 189191 189192 189193 189194 189195 189196 189197 189198 189199 189200 189201 189202 189203 189204 189205 189206 189207 189208 189209 189210 189211 189212 189213 189214 189215 189216 189217 189218 189219 189220 189221 189222 189223 189224 189225 189226 189227 189228 189229 189230 189231 189232 189233 189234 189235 189236 189237 189238 189239 189240 189241 189242 189243 189244 189245 189246 189247 189248 189249 189250 189251 189252 189253 189254 189255 189256 189257 189258 189259 189260 189261 189262 189263 189264 189265 189266 189267 189268 189269 189270 189271 189272 189273 189274 189275 189276 189277 189278 189279 189280 189281 189282 189283 189284 189285 189286 189287 189288 189289 189290 189291 189292 189293 189294 189295 189296 189297 189298 189299 189300 189301 189302 189303 189304 189305 189306 189307 189308 189309 189310 189311 189312 189313 189314 189315 189316 189317 189318 189319 189320 189321 189322 189323 189324 189325 189326 189327 189328 189329 189330 189331 189332 189333 189334 189335 189336 189337 189338 189339 189340 189341 189342 189343 189344 189345 189346 189347 189348 189349 189350 189351 189352 189353 189354 189355 189356 189357 189358 189359 189360 189361 189362 189363 189364 189365 189366 189367 189368 189369 189370 189371 189372 189373 189374 189375 189376 189377 189378 189379 189380 189381 189382 189383 189384 189385 189386 189387 189388 189389 189390 189391 189392 189393 189394 189395 189396 189397 189398 189399 189400 189401 189402 189403 189404 189405 189406 189407 189408 189409 189410 189411 189412 189413 189414 189415 189416 189417 189418 189419 189420 189421 189422 189423 189424 189425 189426 189427 189428 189429 189430 189431 189432 189433 189434 189435 189436 189437 189438 189439 189440 189441 189442 189443 189444 189445 189446 189447 189448 189449 189450 189451 189452 189453 189454 189455 189456 189457 189458 189459 189460 189461 189462 189463 189464 189465 189466 189467 189468 189469 189470 189471 189472 189473 189474 189475 189476 189477 189478 189479 189480 189481 189482 189483 189484 189485 189486 189487 189488 189489 189490 189491 189492 189493 189494 189495 189496 189497 189498 189499 189500 189501 189502 189503 189504 189505 189506 189507 189508 189509 189510 189511 189512 189513 189514 189515 189516 189517 189518 189519 189520 189521 189522 189523 189524 189525 189526 189527 189528 189529 189530 189531 189532 189533 189534 189535 189536 189537 189538 189539 189540 189541 189542 189543 189544 189545 189546 189547 189548 189549 189550 189551 189552 189553 189554 189555 189556 189557 189558 189559 189560 189561 189562 189563 189564 189565 189566 189567 189568 189569 189570 189571 189572 189573 189574 189575 189576 189577 189578 189579 189580 189581 189582 189583 189584 189585 189586 189587 189588 189589 189590 189591 189592 189593 189594 189595 189596 189597 189598 189599 189600 189601 189602 189603 189604 189605 189606 189607 189608 189609 189610 189611 189612 189613 189614 189615 189616 189617 189618 189619 189620 189621 189622 189623 189624 189625 189626 189627 189628 189629 189630 189631 189632 189633 189634 189635 189636 189637 189638 189639 189640 189641 189642 189643 189644 189645 189646 189647 189648 189649 189650 189651 189652 189653 189654 189655 189656 189657 189658 189659 189660 189661 189662 189663 189664 189665 189666 189667 189668 189669 189670 189671 189672 189673 189674 189675 189676 189677 189678 189679 189680 189681 189682 189683 189684 189685 189686 189687 189688 189689 189690 189691 189692 189693 189694 189695 189696 189697 189698 189699 189700 189701 189702 189703 189704 189705 189706 189707 189708 189709 189710 189711 189712 189713 189714 189715 189716 189717 189718 189719 189720 189721 189722 189723 189724 189725 189726 189727 189728 189729 189730 189731 189732 189733 189734 189735 189736 189737 189738 189739 189740 189741 189742 189743 189744 189745 189746 189747 189748 189749 189750 189751 189752 189753 189754 189755 189756 189757 189758 189759 189760 189761 189762 189763 189764 189765 189766 189767 189768 189769 189770 189771 189772 189773 189774 189775 189776 189777 189778 189779 189780 189781 189782 189783 189784 189785 189786 189787 189788 189789 189790 189791 189792 189793 189794 189795 189796 189797 189798 189799 189800 189801 189802 189803 189804 189805 189806 189807 189808 189809 189810 189811 189812 189813 189814 189815 189816 189817 189818 189819 189820 189821 189822 189823 189824 189825 189826 189827 189828 189829 189830 189831 189832 189833 189834 189835 189836 189837 189838 189839 189840 189841 189842 189843 189844 189845 189846 189847 189848 189849 189850 189851 189852 189853 189854 189855 189856 189857 189858 189859 189860 189861 189862 189863 189864 189865 189866 189867 189868 189869 189870 189871 189872 189873 189874 189875 189876 189877 189878 189879 189880 189881 189882 189883 189884 189885 189886 189887 189888 189889 189890 189891 189892 189893 189894 189895 189896 189897 189898 189899 189900 189901 189902 189903 189904 189905 189906 189907 189908 189909 189910 189911 189912 189913 189914 189915 189916 189917 189918 189919 189920 189921 189922 189923 189924 189925 189926 189927 189928 189929 189930 189931 189932 189933 189934 189935 189936 189937 189938 189939 189940 189941 189942 189943 189944 189945 189946 189947 189948 189949 189950 189951 189952 189953 189954 189955 189956 189957 189958 189959 189960 189961 189962 189963 189964 189965 189966 189967 189968 189969 189970 189971 189972 189973 189974 189975 189976 189977 189978 189979 189980 189981 189982 189983 189984 189985 189986 189987 189988 189989 189990 189991 189992 189993 189994 189995 189996 189997 189998 189999 190000 190001 190002 190003 190004 190005 190006 190007 190008 190009 190010 190011 190012 190013 190014 190015 190016 190017 190018 190019 190020 190021 190022 190023 190024 190025 190026 190027 190028 190029 190030 190031 190032 190033 190034 190035 190036 190037 190038 190039 190040 190041 190042 190043 190044 190045 190046 190047 190048 190049 190050 190051 190052 190053 190054 190055 190056 190057 190058 190059 190060 190061 190062 190063 190064 190065 190066 190067 190068 190069 190070 190071 190072 190073 190074 190075 190076 190077 190078 190079 190080 190081 190082 190083 190084 190085 190086 190087 190088 190089 190090 190091 190092 190093 190094 190095 190096 190097 190098 190099 190100 190101 190102 190103 190104 190105 190106 190107 190108 190109 190110 190111 190112 190113 190114 190115 190116 190117 190118 190119 190120 190121 190122 190123 190124 190125 190126 190127 190128 190129 190130 190131 190132 190133 190134 190135 190136 190137 190138 190139 190140 190141 190142 190143 190144 190145 190146 190147 190148 190149 190150 190151 190152 190153 190154 190155 190156 190157 190158 190159 190160 190161 190162 190163 190164 190165 190166 190167 190168 190169 190170 190171 190172 190173 190174 190175 190176 190177 190178 190179 190180 190181 190182 190183 190184 190185 190186 190187 190188 190189 190190 190191 190192 190193 190194 190195 190196 190197 190198 190199 190200 190201 190202 190203 190204 190205 190206 190207 190208 190209 190210 190211 190212 190213 190214 190215 190216 190217 190218 190219 190220 190221 190222 190223 190224 190225 190226 190227 190228 190229 190230 190231 190232 190233 190234 190235 190236 190237 190238 190239 190240 190241 190242 190243 190244 190245 190246 190247 190248 190249 190250 190251 190252 190253 190254 190255 190256 190257 190258 190259 190260 190261 190262 190263 190264 190265 190266 190267 190268 190269 190270 190271 190272 190273 190274 190275 190276 190277 190278 190279 190280 190281 190282 190283 190284 190285 190286 190287 190288 190289 190290 190291 190292 190293 190294 190295 190296 190297 190298 190299 190300 190301 190302 190303 190304 190305 190306 190307 190308 190309 190310 190311 190312 190313 190314 190315 190316 190317 190318 190319 190320 190321 190322 190323 190324 190325 190326 190327 190328 190329 190330 190331 190332 190333 190334 190335 190336 190337 190338 190339 190340 190341 190342 190343 190344 190345 190346 190347 190348 190349 190350 190351 190352 190353 190354 190355 190356 190357 190358 190359 190360 190361 190362 190363 190364 190365 190366 190367 190368 190369 190370 190371 190372 190373 190374 190375 190376 190377 190378 190379 190380 190381 190382 190383 190384 190385 190386 190387 190388 190389 190390 190391 190392 190393 190394 190395 190396 190397 190398 190399 190400 190401 190402 190403 190404 190405 190406 190407 190408 190409 190410 190411 190412 190413 190414 190415 190416 190417 190418 190419 190420 190421 190422 190423 190424 190425 190426 190427 190428 190429 190430 190431 190432 190433 190434 190435 190436 190437 190438 190439 190440 190441 190442 190443 190444 190445 190446 190447 190448 190449 190450 190451 190452 190453 190454 190455 190456 190457 190458 190459 190460 190461 190462 190463 190464 190465 190466 190467 190468 190469 190470 190471 190472 190473 190474 190475 190476 190477 190478 190479 190480 190481 190482 190483 190484 190485 190486 190487 190488 190489 190490 190491 190492 190493 190494 190495 190496 190497 190498 190499 190500 190501 190502 190503 190504 190505 190506 190507 190508 190509 190510 190511 190512 190513 190514 190515 190516 190517 190518 190519 190520 190521 190522 190523 190524 190525 190526 190527 190528 190529 190530 190531 190532 190533 190534 190535 190536 190537 190538 190539 190540 190541 190542 190543 190544 190545 190546 190547 190548 190549 190550 190551 190552 190553 190554 190555 190556 190557 190558 190559 190560 190561 190562 190563 190564 190565 190566 190567 190568 190569 190570 190571 190572 190573 190574 190575 190576 190577 190578 190579 190580 190581 190582 190583 190584 190585 190586 190587 190588 190589 190590 190591 190592 190593 190594 190595 190596 190597 190598 190599 190600 190601 190602 190603 190604 190605 190606 190607 190608 190609 190610 190611 190612 190613 190614 190615 190616 190617 190618 190619 190620 190621 190622 190623 190624 190625 190626 190627 190628 190629 190630 190631 190632 190633 190634 190635 190636 190637 190638 190639 190640 190641 190642 190643 190644 190645 190646 190647 190648 190649 190650 190651 190652 190653 190654 190655 190656 190657 190658 190659 190660 190661 190662 190663 190664 190665 190666 190667 190668 190669 190670 190671 190672 190673 190674 190675 190676 190677 190678 190679 190680 190681 190682 190683 190684 190685 190686 190687 190688 190689 190690 190691 190692 190693 190694 190695 190696 190697 190698 190699 190700 190701 190702 190703 190704 190705 190706 190707 190708 190709 190710 190711 190712 190713 190714 190715 190716 190717 190718 190719 190720 190721 190722 190723 190724 190725 190726 190727 190728 190729 190730 190731 190732 190733 190734 190735 190736 190737 190738 190739 190740 190741 190742 190743 190744 190745 190746 190747 190748 190749 190750 190751 190752 190753 190754 190755 190756 190757 190758 190759 190760 190761 190762 190763 190764 190765 190766 190767 190768 190769 190770 190771 190772 190773 190774 190775 190776 190777 190778 190779 190780 190781 190782 190783 190784 190785 190786 190787 190788 190789 190790 190791 190792 190793 190794 190795 190796 190797 190798 190799 190800 190801 190802 190803 190804 190805 190806 190807 190808 190809 190810 190811 190812 190813 190814 190815 190816 190817 190818 190819 190820 190821 190822 190823 190824 190825 190826 190827 190828 190829 190830 190831 190832 190833 190834 190835 190836 190837 190838 190839 190840 190841 190842 190843 190844 190845 190846 190847 190848 190849 190850 190851 190852 190853 190854 190855 190856 190857 190858 190859 190860 190861 190862 190863 190864 190865 190866 190867 190868 190869 190870 190871 190872 190873 190874 190875 190876 190877 190878 190879 190880 190881 190882 190883 190884 190885 190886 190887 190888 190889 190890 190891 190892 190893 190894 190895 190896 190897 190898 190899 190900 190901 190902 190903 190904 190905 190906 190907 190908 190909 190910 190911 190912 190913 190914 190915 190916 190917 190918 190919 190920 190921 190922 190923 190924 190925 190926 190927 190928 190929 190930 190931 190932 190933 190934 190935 190936 190937 190938 190939 190940 190941 190942 190943 190944 190945 190946 190947 190948 190949 190950 190951 190952 190953 190954 190955 190956 190957 190958 190959 190960 190961 190962 190963 190964 190965 190966 190967 190968 190969 190970 190971 190972 190973 190974 190975 190976 190977 190978 190979 190980 190981 190982 190983 190984 190985 190986 190987 190988 190989 190990 190991 190992 190993 190994 190995 190996 190997 190998 190999 191000 191001 191002 191003 191004 191005 191006 191007 191008 191009 191010 191011 191012 191013 191014 191015 191016 191017 191018 191019 191020 191021 191022 191023 191024 191025 191026 191027 191028 191029 191030 191031 191032 191033 191034 191035 191036 191037 191038 191039 191040 191041 191042 191043 191044 191045 191046 191047 191048 191049 191050 191051 191052 191053 191054 191055 191056 191057 191058 191059 191060 191061 191062 191063 191064 191065 191066 191067 191068 191069 191070 191071 191072 191073 191074 191075 191076 191077 191078 191079 191080 191081 191082 191083 191084 191085 191086 191087 191088 191089 191090 191091 191092 191093 191094 191095 191096 191097 191098 191099 191100 191101 191102 191103 191104 191105 191106 191107 191108 191109 191110 191111 191112 191113 191114 191115 191116 191117 191118 191119 191120 191121 191122 191123 191124 191125 191126 191127 191128 191129 191130 191131 191132 191133 191134 191135 191136 191137 191138 191139 191140 191141 191142 191143 191144 191145 191146 191147 191148 191149 191150 191151 191152 191153 191154 191155 191156 191157 191158 191159 191160 191161 191162 191163 191164 191165 191166 191167 191168 191169 191170 191171 191172 191173 191174 191175 191176 191177 191178 191179 191180 191181 191182 191183 191184 191185 191186 191187 191188 191189 191190 191191 191192 191193 191194 191195 191196 191197 191198 191199 191200 191201 191202 191203 191204 191205 191206 191207 191208 191209 191210 191211 191212 191213 191214 191215 191216 191217 191218 191219 191220 191221 191222 191223 191224 191225 191226 191227 191228 191229 191230 191231 191232 191233 191234 191235 191236 191237 191238 191239 191240 191241 191242 191243 191244 191245 191246 191247 191248 191249 191250 191251 191252 191253 191254 191255 191256 191257 191258 191259 191260 191261 191262 191263 191264 191265 191266 191267 191268 191269 191270 191271 191272 191273 191274 191275 191276 191277 191278 191279 191280 191281 191282 191283 191284 191285 191286 191287 191288 191289 191290 191291 191292 191293 191294 191295 191296 191297 191298 191299 191300 191301 191302 191303 191304 191305 191306 191307 191308 191309 191310 191311 191312 191313 191314 191315 191316 191317 191318 191319 191320 191321 191322 191323 191324 191325 191326 191327 191328 191329 191330 191331 191332 191333 191334 191335 191336 191337 191338 191339 191340 191341 191342 191343 191344 191345 191346 191347 191348 191349 191350 191351 191352 191353 191354 191355 191356 191357 191358 191359 191360 191361 191362 191363 191364 191365 191366 191367 191368 191369 191370 191371 191372 191373 191374 191375 191376 191377 191378 191379 191380 191381 191382 191383 191384 191385 191386 191387 191388 191389 191390 191391 191392 191393 191394 191395 191396 191397 191398 191399 191400 191401 191402 191403 191404 191405 191406 191407 191408 191409 191410 191411 191412 191413 191414 191415 191416 191417 191418 191419 191420 191421 191422 191423 191424 191425 191426 191427 191428 191429 191430 191431 191432 191433 191434 191435 191436 191437 191438 191439 191440 191441 191442 191443 191444 191445 191446 191447 191448 191449 191450 191451 191452 191453 191454 191455 191456 191457 191458 191459 191460 191461 191462 191463 191464 191465 191466 191467 191468 191469 191470 191471 191472 191473 191474 191475 191476 191477 191478 191479 191480 191481 191482 191483 191484 191485 191486 191487 191488 191489 191490 191491 191492 191493 191494 191495 191496 191497 191498 191499 191500 191501 191502 191503 191504 191505 191506 191507 191508 191509 191510 191511 191512 191513 191514 191515 191516 191517 191518 191519 191520 191521 191522 191523 191524 191525 191526 191527 191528 191529 191530 191531 191532 191533 191534 191535 191536 191537 191538 191539 191540 191541 191542 191543 191544 191545 191546 191547 191548 191549 191550 191551 191552 191553 191554 191555 191556 191557 191558 191559 191560 191561 191562 191563 191564 191565 191566 191567 191568 191569 191570 191571 191572 191573 191574 191575 191576 191577 191578 191579 191580 191581 191582 191583 191584 191585 191586 191587 191588 191589 191590 191591 191592 191593 191594 191595 191596 191597 191598 191599 191600 191601 191602 191603 191604 191605 191606 191607 191608 191609 191610 191611 191612 191613 191614 191615 191616 191617 191618 191619 191620 191621 191622 191623 191624 191625 191626 191627 191628 191629 191630 191631 191632 191633 191634 191635 191636 191637 191638 191639 191640 191641 191642 191643 191644 191645 191646 191647 191648 191649 191650 191651 191652 191653 191654 191655 191656 191657 191658 191659 191660 191661 191662 191663 191664 191665 191666 191667 191668 191669 191670 191671 191672 191673 191674 191675 191676 191677 191678 191679 191680 191681 191682 191683 191684 191685 191686 191687 191688 191689 191690 191691 191692 191693 191694 191695 191696 191697 191698 191699 191700 191701 191702 191703 191704 191705 191706 191707 191708 191709 191710 191711 191712 191713 191714 191715 191716 191717 191718 191719 191720 191721 191722 191723 191724 191725 191726 191727 191728 191729 191730 191731 191732 191733 191734 191735 191736 191737 191738 191739 191740 191741 191742 191743 191744 191745 191746 191747 191748 191749 191750 191751 191752 191753 191754 191755 191756 191757 191758 191759 191760 191761 191762 191763 191764 191765 191766 191767 191768 191769 191770 191771 191772 191773 191774 191775 191776 191777 191778 191779 191780 191781 191782 191783 191784 191785 191786 191787 191788 191789 191790 191791 191792 191793 191794 191795 191796 191797 191798 191799 191800 191801 191802 191803 191804 191805 191806 191807 191808 191809 191810 191811 191812 191813 191814 191815 191816 191817 191818 191819 191820 191821 191822 191823 191824 191825 191826 191827 191828 191829 191830 191831 191832 191833 191834 191835 191836 191837 191838 191839 191840 191841 191842 191843 191844 191845 191846 191847 191848 191849 191850 191851 191852 191853 191854 191855 191856 191857 191858 191859 191860 191861 191862 191863 191864 191865 191866 191867 191868 191869 191870 191871 191872 191873 191874 191875 191876 191877 191878 191879 191880 191881 191882 191883 191884 191885 191886 191887 191888 191889 191890 191891 191892 191893 191894 191895 191896 191897 191898 191899 191900 191901 191902 191903 191904 191905 191906 191907 191908 191909 191910 191911 191912 191913 191914 191915 191916 191917 191918 191919 191920 191921 191922 191923 191924 191925 191926 191927 191928 191929 191930 191931 191932 191933 191934 191935 191936 191937 191938 191939 191940 191941 191942 191943 191944 191945 191946 191947 191948 191949 191950 191951 191952 191953 191954 191955 191956 191957 191958 191959 191960 191961 191962 191963 191964 191965 191966 191967 191968 191969 191970 191971 191972 191973 191974 191975 191976 191977 191978 191979 191980 191981 191982 191983 191984 191985 191986 191987 191988 191989 191990 191991 191992 191993 191994 191995 191996 191997 191998 191999 192000 192001 192002 192003 192004 192005 192006 192007 192008 192009 192010 192011 192012 192013 192014 192015 192016 192017 192018 192019 192020 192021 192022 192023 192024 192025 192026 192027 192028 192029 192030 192031 192032 192033 192034 192035 192036 192037 192038 192039 192040 192041 192042 192043 192044 192045 192046 192047 192048 192049 192050 192051 192052 192053 192054 192055 192056 192057 192058 192059 192060 192061 192062 192063 192064 192065 192066 192067 192068 192069 192070 192071 192072 192073 192074 192075 192076 192077 192078 192079 192080 192081 192082 192083 192084 192085 192086 192087 192088 192089 192090 192091 192092 192093 192094 192095 192096 192097 192098 192099 192100 192101 192102 192103 192104 192105 192106 192107 192108 192109 192110 192111 192112 192113 192114 192115 192116 192117 192118 192119 192120 192121 192122 192123 192124 192125 192126 192127 192128 192129 192130 192131 192132 192133 192134 192135 192136 192137 192138 192139 192140 192141 192142 192143 192144 192145 192146 192147 192148 192149 192150 192151 192152 192153 192154 192155 192156 192157 192158 192159 192160 192161 192162 192163 192164 192165 192166 192167 192168 192169 192170 192171 192172 192173 192174 192175 192176 192177 192178 192179 192180 192181 192182 192183 192184 192185 192186 192187 192188 192189 192190 192191 192192 192193 192194 192195 192196 192197 192198 192199 192200 192201 192202 192203 192204 192205 192206 192207 192208 192209 192210 192211 192212 192213 192214 192215 192216 192217 192218 192219 192220 192221 192222 192223 192224 192225 192226 192227 192228 192229 192230 192231 192232 192233 192234 192235 192236 192237 192238 192239 192240 192241 192242 192243 192244 192245 192246 192247 192248 192249 192250 192251 192252 192253 192254 192255 192256 192257 192258 192259 192260 192261 192262 192263 192264 192265 192266 192267 192268 192269 192270 192271 192272 192273 192274 192275 192276 192277 192278 192279 192280 192281 192282 192283 192284 192285 192286 192287 192288 192289 192290 192291 192292 192293 192294 192295 192296 192297 192298 192299 192300 192301 192302 192303 192304 192305 192306 192307 192308 192309 192310 192311 192312 192313 192314 192315 192316 192317 192318 192319 192320 192321 192322 192323 192324 192325 192326 192327 192328 192329 192330 192331 192332 192333 192334 192335 192336 192337 192338 192339 192340 192341 192342 192343 192344 192345 192346 192347 192348 192349 192350 192351 192352 192353 192354 192355 192356 192357 192358 192359 192360 192361 192362 192363 192364 192365 192366 192367 192368 192369 192370 192371 192372 192373 192374 192375 192376 192377 192378 192379 192380 192381 192382 192383 192384 192385 192386 192387 192388 192389 192390 192391 192392 192393 192394 192395 192396 192397 192398 192399 192400 192401 192402 192403 192404 192405 192406 192407 192408 192409 192410 192411 192412 192413 192414 192415 192416 192417 192418 192419 192420 192421 192422 192423 192424 192425 192426 192427 192428 192429 192430 192431 192432 192433 192434 192435 192436 192437 192438 192439 192440 192441 192442 192443 192444 192445 192446 192447 192448 192449 192450 192451 192452 192453 192454 192455 192456 192457 192458 192459 192460 192461 192462 192463 192464 192465 192466 192467 192468 192469 192470 192471 192472 192473 192474 192475 192476 192477 192478 192479 192480 192481 192482 192483 192484 192485 192486 192487 192488 192489 192490 192491 192492 192493 192494 192495 192496 192497 192498 192499 192500 192501 192502 192503 192504 192505 192506 192507 192508 192509 192510 192511 192512 192513 192514 192515 192516 192517 192518 192519 192520 192521 192522 192523 192524 192525 192526 192527 192528 192529 192530 192531 192532 192533 192534 192535 192536 192537 192538 192539 192540 192541 192542 192543 192544 192545 192546 192547 192548 192549 192550 192551 192552 192553 192554 192555 192556 192557 192558 192559 192560 192561 192562 192563 192564 192565 192566 192567 192568 192569 192570 192571 192572 192573 192574 192575 192576 192577 192578 192579 192580 192581 192582 192583 192584 192585 192586 192587 192588 192589 192590 192591 192592 192593 192594 192595 192596 192597 192598 192599 192600 192601 192602 192603 192604 192605 192606 192607 192608 192609 192610 192611 192612 192613 192614 192615 192616 192617 192618 192619 192620 192621 192622 192623 192624 192625 192626 192627 192628 192629 192630 192631 192632 192633 192634 192635 192636 192637 192638 192639 192640 192641 192642 192643 192644 192645 192646 192647 192648 192649 192650 192651 192652 192653 192654 192655 192656 192657 192658 192659 192660 192661 192662 192663 192664 192665 192666 192667 192668 192669 192670 192671 192672 192673 192674 192675 192676 192677 192678 192679 192680 192681 192682 192683 192684 192685 192686 192687 192688 192689 192690 192691 192692 192693 192694 192695 192696 192697 192698 192699 192700 192701 192702 192703 192704 192705 192706 192707 192708 192709 192710 192711 192712 192713 192714 192715 192716 192717 192718 192719 192720 192721 192722 192723 192724 192725 192726 192727 192728 192729 192730 192731 192732 192733 192734 192735 192736 192737 192738 192739 192740 192741 192742 192743 192744 192745 192746 192747 192748 192749 192750 192751 192752 192753 192754 192755 192756 192757 192758 192759 192760 192761 192762 192763 192764 192765 192766 192767 192768 192769 192770 192771 192772 192773 192774 192775 192776 192777 192778 192779 192780 192781 192782 192783 192784 192785 192786 192787 192788 192789 192790 192791 192792 192793 192794 192795 192796 192797 192798 192799 192800 192801 192802 192803 192804 192805 192806 192807 192808 192809 192810 192811 192812 192813 192814 192815 192816 192817 192818 192819 192820 192821 192822 192823 192824 192825 192826 192827 192828 192829 192830 192831 192832 192833 192834 192835 192836 192837 192838 192839 192840 192841 192842 192843 192844 192845 192846 192847 192848 192849 192850 192851 192852 192853 192854 192855 192856 192857 192858 192859 192860 192861 192862 192863 192864 192865 192866 192867 192868 192869 192870 192871 192872 192873 192874 192875 192876 192877 192878 192879 192880 192881 192882 192883 192884 192885 192886 192887 192888 192889 192890 192891 192892 192893 192894 192895 192896 192897 192898 192899 192900 192901 192902 192903 192904 192905 192906 192907 192908 192909 192910 192911 192912 192913 192914 192915 192916 192917 192918 192919 192920 192921 192922 192923 192924 192925 192926 192927 192928 192929 192930 192931 192932 192933 192934 192935 192936 192937 192938 192939 192940 192941 192942 192943 192944 192945 192946 192947 192948 192949 192950 192951 192952 192953 192954 192955 192956 192957 192958 192959 192960 192961 192962 192963 192964 192965 192966 192967 192968 192969 192970 192971 192972 192973 192974 192975 192976 192977 192978 192979 192980 192981 192982 192983 192984 192985 192986 192987 192988 192989 192990 192991 192992 192993 192994 192995 192996 192997 192998 192999 193000 193001 193002 193003 193004 193005 193006 193007 193008 193009 193010 193011 193012 193013 193014 193015 193016 193017 193018 193019 193020 193021 193022 193023 193024 193025 193026 193027 193028 193029 193030 193031 193032 193033 193034 193035 193036 193037 193038 193039 193040 193041 193042 193043 193044 193045 193046 193047 193048 193049 193050 193051 193052 193053 193054 193055 193056 193057 193058 193059 193060 193061 193062 193063 193064 193065 193066 193067 193068 193069 193070 193071 193072 193073 193074 193075 193076 193077 193078 193079 193080 193081 193082 193083 193084 193085 193086 193087 193088 193089 193090 193091 193092 193093 193094 193095 193096 193097 193098 193099 193100 193101 193102 193103 193104 193105 193106 193107 193108 193109 193110 193111 193112 193113 193114 193115 193116 193117 193118 193119 193120 193121 193122 193123 193124 193125 193126 193127 193128 193129 193130 193131 193132 193133 193134 193135 193136 193137 193138 193139 193140 193141 193142 193143 193144 193145 193146 193147 193148 193149 193150 193151 193152 193153 193154 193155 193156 193157 193158 193159 193160 193161 193162 193163 193164 193165 193166 193167 193168 193169 193170 193171 193172 193173 193174 193175 193176 193177 193178 193179 193180 193181 193182 193183 193184 193185 193186 193187 193188 193189 193190 193191 193192 193193 193194 193195 193196 193197 193198 193199 193200 193201 193202 193203 193204 193205 193206 193207 193208 193209 193210 193211 193212 193213 193214 193215 193216 193217 193218 193219 193220 193221 193222 193223 193224 193225 193226 193227 193228 193229 193230 193231 193232 193233 193234 193235 193236 193237 193238 193239 193240 193241 193242 193243 193244 193245 193246 193247 193248 193249 193250 193251 193252 193253 193254 193255 193256 193257 193258 193259 193260 193261 193262 193263 193264 193265 193266 193267 193268 193269 193270 193271 193272 193273 193274 193275 193276 193277 193278 193279 193280 193281 193282 193283 193284 193285 193286 193287 193288 193289 193290 193291 193292 193293 193294 193295 193296 193297 193298 193299 193300 193301 193302 193303 193304 193305 193306 193307 193308 193309 193310 193311 193312 193313 193314 193315 193316 193317 193318 193319 193320 193321 193322 193323 193324 193325 193326 193327 193328 193329 193330 193331 193332 193333 193334 193335 193336 193337 193338 193339 193340 193341 193342 193343 193344 193345 193346 193347 193348 193349 193350 193351 193352 193353 193354 193355 193356 193357 193358 193359 193360 193361 193362 193363 193364 193365 193366 193367 193368 193369 193370 193371 193372 193373 193374 193375 193376 193377 193378 193379 193380 193381 193382 193383 193384 193385 193386 193387 193388 193389 193390 193391 193392 193393 193394 193395 193396 193397 193398 193399 193400 193401 193402 193403 193404 193405 193406 193407 193408 193409 193410 193411 193412 193413 193414 193415 193416 193417 193418 193419 193420 193421 193422 193423 193424 193425 193426 193427 193428 193429 193430 193431 193432 193433 193434 193435 193436 193437 193438 193439 193440 193441 193442 193443 193444 193445 193446 193447 193448 193449 193450 193451 193452 193453 193454 193455 193456 193457 193458 193459 193460 193461 193462 193463 193464 193465 193466 193467 193468 193469 193470 193471 193472 193473 193474 193475 193476 193477 193478 193479 193480 193481 193482 193483 193484 193485 193486 193487 193488 193489 193490 193491 193492 193493 193494 193495 193496 193497 193498 193499 193500 193501 193502 193503 193504 193505 193506 193507 193508 193509 193510 193511 193512 193513 193514 193515 193516 193517 193518 193519 193520 193521 193522 193523 193524 193525 193526 193527 193528 193529 193530 193531 193532 193533 193534 193535 193536 193537 193538 193539 193540 193541 193542 193543 193544 193545 193546 193547 193548 193549 193550 193551 193552 193553 193554 193555 193556 193557 193558 193559 193560 193561 193562 193563 193564 193565 193566 193567 193568 193569 193570 193571 193572 193573 193574 193575 193576 193577 193578 193579 193580 193581 193582 193583 193584 193585 193586 193587 193588 193589 193590 193591 193592 193593 193594 193595 193596 193597 193598 193599 193600 193601 193602 193603 193604 193605 193606 193607 193608 193609 193610 193611 193612 193613 193614 193615 193616 193617 193618 193619 193620 193621 193622 193623 193624 193625 193626 193627 193628 193629 193630 193631 193632 193633 193634 193635 193636 193637 193638 193639 193640 193641 193642 193643 193644 193645 193646 193647 193648 193649 193650 193651 193652 193653 193654 193655 193656 193657 193658 193659 193660 193661 193662 193663 193664 193665 193666 193667 193668 193669 193670 193671 193672 193673 193674 193675 193676 193677 193678 193679 193680 193681 193682 193683 193684 193685 193686 193687 193688 193689 193690 193691 193692 193693 193694 193695 193696 193697 193698 193699 193700 193701 193702 193703 193704 193705 193706 193707 193708 193709 193710 193711 193712 193713 193714 193715 193716 193717 193718 193719 193720 193721 193722 193723 193724 193725 193726 193727 193728 193729 193730 193731 193732 193733 193734 193735 193736 193737 193738 193739 193740 193741 193742 193743 193744 193745 193746 193747 193748 193749 193750 193751 193752 193753 193754 193755 193756 193757 193758 193759 193760 193761 193762 193763 193764 193765 193766 193767 193768 193769 193770 193771 193772 193773 193774 193775 193776 193777 193778 193779 193780 193781 193782 193783 193784 193785 193786 193787 193788 193789 193790 193791 193792 193793 193794 193795 193796 193797 193798 193799 193800 193801 193802 193803 193804 193805 193806 193807 193808 193809 193810 193811 193812 193813 193814 193815 193816 193817 193818 193819 193820 193821 193822 193823 193824 193825 193826 193827 193828 193829 193830 193831 193832 193833 193834 193835 193836 193837 193838 193839 193840 193841 193842 193843 193844 193845 193846 193847 193848 193849 193850 193851 193852 193853 193854 193855 193856 193857 193858 193859 193860 193861 193862 193863 193864 193865 193866 193867 193868 193869 193870 193871 193872 193873 193874 193875 193876 193877 193878 193879 193880 193881 193882 193883 193884 193885 193886 193887 193888 193889 193890 193891 193892 193893 193894 193895 193896 193897 193898 193899 193900 193901 193902 193903 193904 193905 193906 193907 193908 193909 193910 193911 193912 193913 193914 193915 193916 193917 193918 193919 193920 193921 193922 193923 193924 193925 193926 193927 193928 193929 193930 193931 193932 193933 193934 193935 193936 193937 193938 193939 193940 193941 193942 193943 193944 193945 193946 193947 193948 193949 193950 193951 193952 193953 193954 193955 193956 193957 193958 193959 193960 193961 193962 193963 193964 193965 193966 193967 193968 193969 193970 193971 193972 193973 193974 193975 193976 193977 193978 193979 193980 193981 193982 193983 193984 193985 193986 193987 193988 193989 193990 193991 193992 193993 193994 193995 193996 193997 193998 193999 194000 194001 194002 194003 194004 194005 194006 194007 194008 194009 194010 194011 194012 194013 194014 194015 194016 194017 194018 194019 194020 194021 194022 194023 194024 194025 194026 194027 194028 194029 194030 194031 194032 194033 194034 194035 194036 194037 194038 194039 194040 194041 194042 194043 194044 194045 194046 194047 194048 194049 194050 194051 194052 194053 194054 194055 194056 194057 194058 194059 194060 194061 194062 194063 194064 194065 194066 194067 194068 194069 194070 194071 194072 194073 194074 194075 194076 194077 194078 194079 194080 194081 194082 194083 194084 194085 194086 194087 194088 194089 194090 194091 194092 194093 194094 194095 194096 194097 194098 194099 194100 194101 194102 194103 194104 194105 194106 194107 194108 194109 194110 194111 194112 194113 194114 194115 194116 194117 194118 194119 194120 194121 194122 194123 194124 194125 194126 194127 194128 194129 194130 194131 194132 194133 194134 194135 194136 194137 194138 194139 194140 194141 194142 194143 194144 194145 194146 194147 194148 194149 194150 194151 194152 194153 194154 194155 194156 194157 194158 194159 194160 194161 194162 194163 194164 194165 194166 194167 194168 194169 194170 194171 194172 194173 194174 194175 194176 194177 194178 194179 194180 194181 194182 194183 194184 194185 194186 194187 194188 194189 194190 194191 194192 194193 194194 194195 194196 194197 194198 194199 194200 194201 194202 194203 194204 194205 194206 194207 194208 194209 194210 194211 194212 194213 194214 194215 194216 194217 194218 194219 194220 194221 194222 194223 194224 194225 194226 194227 194228 194229 194230 194231 194232 194233 194234 194235 194236 194237 194238 194239 194240 194241 194242 194243 194244 194245 194246 194247 194248 194249 194250 194251 194252 194253 194254 194255 194256 194257 194258 194259 194260 194261 194262 194263 194264 194265 194266 194267 194268 194269 194270 194271 194272 194273 194274 194275 194276 194277 194278 194279 194280 194281 194282 194283 194284 194285 194286 194287 194288 194289 194290 194291 194292 194293 194294 194295 194296 194297 194298 194299 194300 194301 194302 194303 194304 194305 194306 194307 194308 194309 194310 194311 194312 194313 194314 194315 194316 194317 194318 194319 194320 194321 194322 194323 194324 194325 194326 194327 194328 194329 194330 194331 194332 194333 194334 194335 194336 194337 194338 194339 194340 194341 194342 194343 194344 194345 194346 194347 194348 194349 194350 194351 194352 194353 194354 194355 194356 194357 194358 194359 194360 194361 194362 194363 194364 194365 194366 194367 194368 194369 194370 194371 194372 194373 194374 194375 194376 194377 194378 194379 194380 194381 194382 194383 194384 194385 194386 194387 194388 194389 194390 194391 194392 194393 194394 194395 194396 194397 194398 194399 194400 194401 194402 194403 194404 194405 194406 194407 194408 194409 194410 194411 194412 194413 194414 194415 194416 194417 194418 194419 194420 194421 194422 194423 194424 194425 194426 194427 194428 194429 194430 194431 194432 194433 194434 194435 194436 194437 194438 194439 194440 194441 194442 194443 194444 194445 194446 194447 194448 194449 194450 194451 194452 194453 194454 194455 194456 194457 194458 194459 194460 194461 194462 194463 194464 194465 194466 194467 194468 194469 194470 194471 194472 194473 194474 194475 194476 194477 194478 194479 194480 194481 194482 194483 194484 194485 194486 194487 194488 194489 194490 194491 194492 194493 194494 194495 194496 194497 194498 194499 194500 194501 194502 194503 194504 194505 194506 194507 194508 194509 194510 194511 194512 194513 194514 194515 194516 194517 194518 194519 194520 194521 194522 194523 194524 194525 194526 194527 194528 194529 194530 194531 194532 194533 194534 194535 194536 194537 194538 194539 194540 194541 194542 194543 194544 194545 194546 194547 194548 194549 194550 194551 194552 194553 194554 194555 194556 194557 194558 194559 194560 194561 194562 194563 194564 194565 194566 194567 194568 194569 194570 194571 194572 194573 194574 194575 194576 194577 194578 194579 194580 194581 194582 194583 194584 194585 194586 194587 194588 194589 194590 194591 194592 194593 194594 194595 194596 194597 194598 194599 194600 194601 194602 194603 194604 194605 194606 194607 194608 194609 194610 194611 194612 194613 194614 194615 194616 194617 194618 194619 194620 194621 194622 194623 194624 194625 194626 194627 194628 194629 194630 194631 194632 194633 194634 194635 194636 194637 194638 194639 194640 194641 194642 194643 194644 194645 194646 194647 194648 194649 194650 194651 194652 194653 194654 194655 194656 194657 194658 194659 194660 194661 194662 194663 194664 194665 194666 194667 194668 194669 194670 194671 194672 194673 194674 194675 194676 194677 194678 194679 194680 194681 194682 194683 194684 194685 194686 194687 194688 194689 194690 194691 194692 194693 194694 194695 194696 194697 194698 194699 194700 194701 194702 194703 194704 194705 194706 194707 194708 194709 194710 194711 194712 194713 194714 194715 194716 194717 194718 194719 194720 194721 194722 194723 194724 194725 194726 194727 194728 194729 194730 194731 194732 194733 194734 194735 194736 194737 194738 194739 194740 194741 194742 194743 194744 194745 194746 194747 194748 194749 194750 194751 194752 194753 194754 194755 194756 194757 194758 194759 194760 194761 194762 194763 194764 194765 194766 194767 194768 194769 194770 194771 194772 194773 194774 194775 194776 194777 194778 194779 194780 194781 194782 194783 194784 194785 194786 194787 194788 194789 194790 194791 194792 194793 194794 194795 194796 194797 194798 194799 194800 194801 194802 194803 194804 194805 194806 194807 194808 194809 194810 194811 194812 194813 194814 194815 194816 194817 194818 194819 194820 194821 194822 194823 194824 194825 194826 194827 194828 194829 194830 194831 194832 194833 194834 194835 194836 194837 194838 194839 194840 194841 194842 194843 194844 194845 194846 194847 194848 194849 194850 194851 194852 194853 194854 194855 194856 194857 194858 194859 194860 194861 194862 194863 194864 194865 194866 194867 194868 194869 194870 194871 194872 194873 194874 194875 194876 194877 194878 194879 194880 194881 194882 194883 194884 194885 194886 194887 194888 194889 194890 194891 194892 194893 194894 194895 194896 194897 194898 194899 194900 194901 194902 194903 194904 194905 194906 194907 194908 194909 194910 194911 194912 194913 194914 194915 194916 194917 194918 194919 194920 194921 194922 194923 194924 194925 194926 194927 194928 194929 194930 194931 194932 194933 194934 194935 194936 194937 194938 194939 194940 194941 194942 194943 194944 194945 194946 194947 194948 194949 194950 194951 194952 194953 194954 194955 194956 194957 194958 194959 194960 194961 194962 194963 194964 194965 194966 194967 194968 194969 194970 194971 194972 194973 194974 194975 194976 194977 194978 194979 194980 194981 194982 194983 194984 194985 194986 194987 194988 194989 194990 194991 194992 194993 194994 194995 194996 194997 194998 194999 195000 195001 195002 195003 195004 195005 195006 195007 195008 195009 195010 195011 195012 195013 195014 195015 195016 195017 195018 195019 195020 195021 195022 195023 195024 195025 195026 195027 195028 195029 195030 195031 195032 195033 195034 195035 195036 195037 195038 195039 195040 195041 195042 195043 195044 195045 195046 195047 195048 195049 195050 195051 195052 195053 195054 195055 195056 195057 195058 195059 195060 195061 195062 195063 195064 195065 195066 195067 195068 195069 195070 195071 195072 195073 195074 195075 195076 195077 195078 195079 195080 195081 195082 195083 195084 195085 195086 195087 195088 195089 195090 195091 195092 195093 195094 195095 195096 195097 195098 195099 195100 195101 195102 195103 195104 195105 195106 195107 195108 195109 195110 195111 195112 195113 195114 195115 195116 195117 195118 195119 195120 195121 195122 195123 195124 195125 195126 195127 195128 195129 195130 195131 195132 195133 195134 195135 195136 195137 195138 195139 195140 195141 195142 195143 195144 195145 195146 195147 195148 195149 195150 195151 195152 195153 195154 195155 195156 195157 195158 195159 195160 195161 195162 195163 195164 195165 195166 195167 195168 195169 195170 195171 195172 195173 195174 195175 195176 195177 195178 195179 195180 195181 195182 195183 195184 195185 195186 195187 195188 195189 195190 195191 195192 195193 195194 195195 195196 195197 195198 195199 195200 195201 195202 195203 195204 195205 195206 195207 195208 195209 195210 195211 195212 195213 195214 195215 195216 195217 195218 195219 195220 195221 195222 195223 195224 195225 195226 195227 195228 195229 195230 195231 195232 195233 195234 195235 195236 195237 195238 195239 195240 195241 195242 195243 195244 195245 195246 195247 195248 195249 195250 195251 195252 195253 195254 195255 195256 195257 195258 195259 195260 195261 195262 195263 195264 195265 195266 195267 195268 195269 195270 195271 195272 195273 195274 195275 195276 195277 195278 195279 195280 195281 195282 195283 195284 195285 195286 195287 195288 195289 195290 195291 195292 195293 195294 195295 195296 195297 195298 195299 195300 195301 195302 195303 195304 195305 195306 195307 195308 195309 195310 195311 195312 195313 195314 195315 195316 195317 195318 195319 195320 195321 195322 195323 195324 195325 195326 195327 195328 195329 195330 195331 195332 195333 195334 195335 195336 195337 195338 195339 195340 195341 195342 195343 195344 195345 195346 195347 195348 195349 195350 195351 195352 195353 195354 195355 195356 195357 195358 195359 195360 195361 195362 195363 195364 195365 195366 195367 195368 195369 195370 195371 195372 195373 195374 195375 195376 195377 195378 195379 195380 195381 195382 195383 195384 195385 195386 195387 195388 195389 195390 195391 195392 195393 195394 195395 195396 195397 195398 195399 195400 195401 195402 195403 195404 195405 195406 195407 195408 195409 195410 195411 195412 195413 195414 195415 195416 195417 195418 195419 195420 195421 195422 195423 195424 195425 195426 195427 195428 195429 195430 195431 195432 195433 195434 195435 195436 195437 195438 195439 195440 195441 195442 195443 195444 195445 195446 195447 195448 195449 195450 195451 195452 195453 195454 195455 195456 195457 195458 195459 195460 195461 195462 195463 195464 195465 195466 195467 195468 195469 195470 195471 195472 195473 195474 195475 195476 195477 195478 195479 195480 195481 195482 195483 195484 195485 195486 195487 195488 195489 195490 195491 195492 195493 195494 195495 195496 195497 195498 195499 195500 195501 195502 195503 195504 195505 195506 195507 195508 195509 195510 195511 195512 195513 195514 195515 195516 195517 195518 195519 195520 195521 195522 195523 195524 195525 195526 195527 195528 195529 195530 195531 195532 195533 195534 195535 195536 195537 195538 195539 195540 195541 195542 195543 195544 195545 195546 195547 195548 195549 195550 195551 195552 195553 195554 195555 195556 195557 195558 195559 195560 195561 195562 195563 195564 195565 195566 195567 195568 195569 195570 195571 195572 195573 195574 195575 195576 195577 195578 195579 195580 195581 195582 195583 195584 195585 195586 195587 195588 195589 195590 195591 195592 195593 195594 195595 195596 195597 195598 195599 195600 195601 195602 195603 195604 195605 195606 195607 195608 195609 195610 195611 195612 195613 195614 195615 195616 195617 195618 195619 195620 195621 195622 195623 195624 195625 195626 195627 195628 195629 195630 195631 195632 195633 195634 195635 195636 195637 195638 195639 195640 195641 195642 195643 195644 195645 195646 195647 195648 195649 195650 195651 195652 195653 195654 195655 195656 195657 195658 195659 195660 195661 195662 195663 195664 195665 195666 195667 195668 195669 195670 195671 195672 195673 195674 195675 195676 195677 195678 195679 195680 195681 195682 195683 195684 195685 195686 195687 195688 195689 195690 195691 195692 195693 195694 195695 195696 195697 195698 195699 195700 195701 195702 195703 195704 195705 195706 195707 195708 195709 195710 195711 195712 195713 195714 195715 195716 195717 195718 195719 195720 195721 195722 195723 195724 195725 195726 195727 195728 195729 195730 195731 195732 195733 195734 195735 195736 195737 195738 195739 195740 195741 195742 195743 195744 195745 195746 195747 195748 195749 195750 195751 195752 195753 195754 195755 195756 195757 195758 195759 195760 195761 195762 195763 195764 195765 195766 195767 195768 195769 195770 195771 195772 195773 195774 195775 195776 195777 195778 195779 195780 195781 195782 195783 195784 195785 195786 195787 195788 195789 195790 195791 195792 195793 195794 195795 195796 195797 195798 195799 195800 195801 195802 195803 195804 195805 195806 195807 195808 195809 195810 195811 195812 195813 195814 195815 195816 195817 195818 195819 195820 195821 195822 195823 195824 195825 195826 195827 195828 195829 195830 195831 195832 195833 195834 195835 195836 195837 195838 195839 195840 195841 195842 195843 195844 195845 195846 195847 195848 195849 195850 195851 195852 195853 195854 195855 195856 195857 195858 195859 195860 195861 195862 195863 195864 195865 195866 195867 195868 195869 195870 195871 195872 195873 195874 195875 195876 195877 195878 195879 195880 195881 195882 195883 195884 195885 195886 195887 195888 195889 195890 195891 195892 195893 195894 195895 195896 195897 195898 195899 195900 195901 195902 195903 195904 195905 195906 195907 195908 195909 195910 195911 195912 195913 195914 195915 195916 195917 195918 195919 195920 195921 195922 195923 195924 195925 195926 195927 195928 195929 195930 195931 195932 195933 195934 195935 195936 195937 195938 195939 195940 195941 195942 195943 195944 195945 195946 195947 195948 195949 195950 195951 195952 195953 195954 195955 195956 195957 195958 195959 195960 195961 195962 195963 195964 195965 195966 195967 195968 195969 195970 195971 195972 195973 195974 195975 195976 195977 195978 195979 195980 195981 195982 195983 195984 195985 195986 195987 195988 195989 195990 195991 195992 195993 195994 195995 195996 195997 195998 195999 196000 196001 196002 196003 196004 196005 196006 196007 196008 196009 196010 196011 196012 196013 196014 196015 196016 196017 196018 196019 196020 196021 196022 196023 196024 196025 196026 196027 196028 196029 196030 196031 196032 196033 196034 196035 196036 196037 196038 196039 196040 196041 196042 196043 196044 196045 196046 196047 196048 196049 196050 196051 196052 196053 196054 196055 196056 196057 196058 196059 196060 196061 196062 196063 196064 196065 196066 196067 196068 196069 196070 196071 196072 196073 196074 196075 196076 196077 196078 196079 196080 196081 196082 196083 196084 196085 196086 196087 196088 196089 196090 196091 196092 196093 196094 196095 196096 196097 196098 196099 196100 196101 196102 196103 196104 196105 196106 196107 196108 196109 196110 196111 196112 196113 196114 196115 196116 196117 196118 196119 196120 196121 196122 196123 196124 196125 196126 196127 196128 196129 196130 196131 196132 196133 196134 196135 196136 196137 196138 196139 196140 196141 196142 196143 196144 196145 196146 196147 196148 196149 196150 196151 196152 196153 196154 196155 196156 196157 196158 196159 196160 196161 196162 196163 196164 196165 196166 196167 196168 196169 196170 196171 196172 196173 196174 196175 196176 196177 196178 196179 196180 196181 196182 196183 196184 196185 196186 196187 196188 196189 196190 196191 196192 196193 196194 196195 196196 196197 196198 196199 196200 196201 196202 196203 196204 196205 196206 196207 196208 196209 196210 196211 196212 196213 196214 196215 196216 196217 196218 196219 196220 196221 196222 196223 196224 196225 196226 196227 196228 196229 196230 196231 196232 196233 196234 196235 196236 196237 196238 196239 196240 196241 196242 196243 196244 196245 196246 196247 196248 196249 196250 196251 196252 196253 196254 196255 196256 196257 196258 196259 196260 196261 196262 196263 196264 196265 196266 196267 196268 196269 196270 196271 196272 196273 196274 196275 196276 196277 196278 196279 196280 196281 196282 196283 196284 196285 196286 196287 196288 196289 196290 196291 196292 196293 196294 196295 196296 196297 196298 196299 196300 196301 196302 196303 196304 196305 196306 196307 196308 196309 196310 196311 196312 196313 196314 196315 196316 196317 196318 196319 196320 196321 196322 196323 196324 196325 196326 196327 196328 196329 196330 196331 196332 196333 196334 196335 196336 196337 196338 196339 196340 196341 196342 196343 196344 196345 196346 196347 196348 196349 196350 196351 196352 196353 196354 196355 196356 196357 196358 196359 196360 196361 196362 196363 196364 196365 196366 196367 196368 196369 196370 196371 196372 196373 196374 196375 196376 196377 196378 196379 196380 196381 196382 196383 196384 196385 196386 196387 196388 196389 196390 196391 196392 196393 196394 196395 196396 196397 196398 196399 196400 196401 196402 196403 196404 196405 196406 196407 196408 196409 196410 196411 196412 196413 196414 196415 196416 196417 196418 196419 196420 196421 196422 196423 196424 196425 196426 196427 196428 196429 196430 196431 196432 196433 196434 196435 196436 196437 196438 196439 196440 196441 196442 196443 196444 196445 196446 196447 196448 196449 196450 196451 196452 196453 196454 196455 196456 196457 196458 196459 196460 196461 196462 196463 196464 196465 196466 196467 196468 196469 196470 196471 196472 196473 196474 196475 196476 196477 196478 196479 196480 196481 196482 196483 196484 196485 196486 196487 196488 196489 196490 196491 196492 196493 196494 196495 196496 196497 196498 196499 196500 196501 196502 196503 196504 196505 196506 196507 196508 196509 196510 196511 196512 196513 196514 196515 196516 196517 196518 196519 196520 196521 196522 196523 196524 196525 196526 196527 196528 196529 196530 196531 196532 196533 196534 196535 196536 196537 196538 196539 196540 196541 196542 196543 196544 196545 196546 196547 196548 196549 196550 196551 196552 196553 196554 196555 196556 196557 196558 196559 196560 196561 196562 196563 196564 196565 196566 196567 196568 196569 196570 196571 196572 196573 196574 196575 196576 196577 196578 196579 196580 196581 196582 196583 196584 196585 196586 196587 196588 196589 196590 196591 196592 196593 196594 196595 196596 196597 196598 196599 196600 196601 196602 196603 196604 196605 196606 196607 196608 196609 196610 196611 196612 196613 196614 196615 196616 196617 196618 196619 196620 196621 196622 196623 196624 196625 196626 196627 196628 196629 196630 196631 196632 196633 196634 196635 196636 196637 196638 196639 196640 196641 196642 196643 196644 196645 196646 196647 196648 196649 196650 196651 196652 196653 196654 196655 196656 196657 196658 196659 196660 196661 196662 196663 196664 196665 196666 196667 196668 196669 196670 196671 196672 196673 196674 196675 196676 196677 196678 196679 196680 196681 196682 196683 196684 196685 196686 196687 196688 196689 196690 196691 196692 196693 196694 196695 196696 196697 196698 196699 196700 196701 196702 196703 196704 196705 196706 196707 196708 196709 196710 196711 196712 196713 196714 196715 196716 196717 196718 196719 196720 196721 196722 196723 196724 196725 196726 196727 196728 196729 196730 196731 196732 196733 196734 196735 196736 196737 196738 196739 196740 196741 196742 196743 196744 196745 196746 196747 196748 196749 196750 196751 196752 196753 196754 196755 196756 196757 196758 196759 196760 196761 196762 196763 196764 196765 196766 196767 196768 196769 196770 196771 196772 196773 196774 196775 196776 196777 196778 196779 196780 196781 196782 196783 196784 196785 196786 196787 196788 196789 196790 196791 196792 196793 196794 196795 196796 196797 196798 196799 196800 196801 196802 196803 196804 196805 196806 196807 196808 196809 196810 196811 196812 196813 196814 196815 196816 196817 196818 196819 196820 196821 196822 196823 196824 196825 196826 196827 196828 196829 196830 196831 196832 196833 196834 196835 196836 196837 196838 196839 196840 196841 196842 196843 196844 196845 196846 196847 196848 196849 196850 196851 196852 196853 196854 196855 196856 196857 196858 196859 196860 196861 196862 196863 196864 196865 196866 196867 196868 196869 196870 196871 196872 196873 196874 196875 196876 196877 196878 196879 196880 196881 196882 196883 196884 196885 196886 196887 196888 196889 196890 196891 196892 196893 196894 196895 196896 196897 196898 196899 196900 196901 196902 196903 196904 196905 196906 196907 196908 196909 196910 196911 196912 196913 196914 196915 196916 196917 196918 196919 196920 196921 196922 196923 196924 196925 196926 196927 196928 196929 196930 196931 196932 196933 196934 196935 196936 196937 196938 196939 196940 196941 196942 196943 196944 196945 196946 196947 196948 196949 196950 196951 196952 196953 196954 196955 196956 196957 196958 196959 196960 196961 196962 196963 196964 196965 196966 196967 196968 196969 196970 196971 196972 196973 196974 196975 196976 196977 196978 196979 196980 196981 196982 196983 196984 196985 196986 196987 196988 196989 196990 196991 196992 196993 196994 196995 196996 196997 196998 196999 197000 197001 197002 197003 197004 197005 197006 197007 197008 197009 197010 197011 197012 197013 197014 197015 197016 197017 197018 197019 197020 197021 197022 197023 197024 197025 197026 197027 197028 197029 197030 197031 197032 197033 197034 197035 197036 197037 197038 197039 197040 197041 197042 197043 197044 197045 197046 197047 197048 197049 197050 197051 197052 197053 197054 197055 197056 197057 197058 197059 197060 197061 197062 197063 197064 197065 197066 197067 197068 197069 197070 197071 197072 197073 197074 197075 197076 197077 197078 197079 197080 197081 197082 197083 197084 197085 197086 197087 197088 197089 197090 197091 197092 197093 197094 197095 197096 197097 197098 197099 197100 197101 197102 197103 197104 197105 197106 197107 197108 197109 197110 197111 197112 197113 197114 197115 197116 197117 197118 197119 197120 197121 197122 197123 197124 197125 197126 197127 197128 197129 197130 197131 197132 197133 197134 197135 197136 197137 197138 197139 197140 197141 197142 197143 197144 197145 197146 197147 197148 197149 197150 197151 197152 197153 197154 197155 197156 197157 197158 197159 197160 197161 197162 197163 197164 197165 197166 197167 197168 197169 197170 197171 197172 197173 197174 197175 197176 197177 197178 197179 197180 197181 197182 197183 197184 197185 197186 197187 197188 197189 197190 197191 197192 197193 197194 197195 197196 197197 197198 197199 197200 197201 197202 197203 197204 197205 197206 197207 197208 197209 197210 197211 197212 197213 197214 197215 197216 197217 197218 197219 197220 197221 197222 197223 197224 197225 197226 197227 197228 197229 197230 197231 197232 197233 197234 197235 197236 197237 197238 197239 197240 197241 197242 197243 197244 197245 197246 197247 197248 197249 197250 197251 197252 197253 197254 197255 197256 197257 197258 197259 197260 197261 197262 197263 197264 197265 197266 197267 197268 197269 197270 197271 197272 197273 197274 197275 197276 197277 197278 197279 197280 197281 197282 197283 197284 197285 197286 197287 197288 197289 197290 197291 197292 197293 197294 197295 197296 197297 197298 197299 197300 197301 197302 197303 197304 197305 197306 197307 197308 197309 197310 197311 197312 197313 197314 197315 197316 197317 197318 197319 197320 197321 197322 197323 197324 197325 197326 197327 197328 197329 197330 197331 197332 197333 197334 197335 197336 197337 197338 197339 197340 197341 197342 197343 197344 197345 197346 197347 197348 197349 197350 197351 197352 197353 197354 197355 197356 197357 197358 197359 197360 197361 197362 197363 197364 197365 197366 197367 197368 197369 197370 197371 197372 197373 197374 197375 197376 197377 197378 197379 197380 197381 197382 197383 197384 197385 197386 197387 197388 197389 197390 197391 197392 197393 197394 197395 197396 197397 197398 197399 197400 197401 197402 197403 197404 197405 197406 197407 197408 197409 197410 197411 197412 197413 197414 197415 197416 197417 197418 197419 197420 197421 197422 197423 197424 197425 197426 197427 197428 197429 197430 197431 197432 197433 197434 197435 197436 197437 197438 197439 197440 197441 197442 197443 197444 197445 197446 197447 197448 197449 197450 197451 197452 197453 197454 197455 197456 197457 197458 197459 197460 197461 197462 197463 197464 197465 197466 197467 197468 197469 197470 197471 197472 197473 197474 197475 197476 197477 197478 197479 197480 197481 197482 197483 197484 197485 197486 197487 197488 197489 197490 197491 197492 197493 197494 197495 197496 197497 197498 197499 197500 197501 197502 197503 197504 197505 197506 197507 197508 197509 197510 197511 197512 197513 197514 197515 197516 197517 197518 197519 197520 197521 197522 197523 197524 197525 197526 197527 197528 197529 197530 197531 197532 197533 197534 197535 197536 197537 197538 197539 197540 197541 197542 197543 197544 197545 197546 197547 197548 197549 197550 197551 197552 197553 197554 197555 197556 197557 197558 197559 197560 197561 197562 197563 197564 197565 197566 197567 197568 197569 197570 197571 197572 197573 197574 197575 197576 197577 197578 197579 197580 197581 197582 197583 197584 197585 197586 197587 197588 197589 197590 197591 197592 197593 197594 197595 197596 197597 197598 197599 197600 197601 197602 197603 197604 197605 197606 197607 197608 197609 197610 197611 197612 197613 197614 197615 197616 197617 197618 197619 197620 197621 197622 197623 197624 197625 197626 197627 197628 197629 197630 197631 197632 197633 197634 197635 197636 197637 197638 197639 197640 197641 197642 197643 197644 197645 197646 197647 197648 197649 197650 197651 197652 197653 197654 197655 197656 197657 197658 197659 197660 197661 197662 197663 197664 197665 197666 197667 197668 197669 197670 197671 197672 197673 197674 197675 197676 197677 197678 197679 197680 197681 197682 197683 197684 197685 197686 197687 197688 197689 197690 197691 197692 197693 197694 197695 197696 197697 197698 197699 197700 197701 197702 197703 197704 197705 197706 197707 197708 197709 197710 197711 197712 197713 197714 197715 197716 197717 197718 197719 197720 197721 197722 197723 197724 197725 197726 197727 197728 197729 197730 197731 197732 197733 197734 197735 197736 197737 197738 197739 197740 197741 197742 197743 197744 197745 197746 197747 197748 197749 197750 197751 197752 197753 197754 197755 197756 197757 197758 197759 197760 197761 197762 197763 197764 197765 197766 197767 197768 197769 197770 197771 197772 197773 197774 197775 197776 197777 197778 197779 197780 197781 197782 197783 197784 197785 197786 197787 197788 197789 197790 197791 197792 197793 197794 197795 197796 197797 197798 197799 197800 197801 197802 197803 197804 197805 197806 197807 197808 197809 197810 197811 197812 197813 197814 197815 197816 197817 197818 197819 197820 197821 197822 197823 197824 197825 197826 197827 197828 197829 197830 197831 197832 197833 197834 197835 197836 197837 197838 197839 197840 197841 197842 197843 197844 197845 197846 197847 197848 197849 197850 197851 197852 197853 197854 197855 197856 197857 197858 197859 197860 197861 197862 197863 197864 197865 197866 197867 197868 197869 197870 197871 197872 197873 197874 197875 197876 197877 197878 197879 197880 197881 197882 197883 197884 197885 197886 197887 197888 197889 197890 197891 197892 197893 197894 197895 197896 197897 197898 197899 197900 197901 197902 197903 197904 197905 197906 197907 197908 197909 197910 197911 197912 197913 197914 197915 197916 197917 197918 197919 197920 197921 197922 197923 197924 197925 197926 197927 197928 197929 197930 197931 197932 197933 197934 197935 197936 197937 197938 197939 197940 197941 197942 197943 197944 197945 197946 197947 197948 197949 197950 197951 197952 197953 197954 197955 197956 197957 197958 197959 197960 197961 197962 197963 197964 197965 197966 197967 197968 197969 197970 197971 197972 197973 197974 197975 197976 197977 197978 197979 197980 197981 197982 197983 197984 197985 197986 197987 197988 197989 197990 197991 197992 197993 197994 197995 197996 197997 197998 197999 198000 198001 198002 198003 198004 198005 198006 198007 198008 198009 198010 198011 198012 198013 198014 198015 198016 198017 198018 198019 198020 198021 198022 198023 198024 198025 198026 198027 198028 198029 198030 198031 198032 198033 198034 198035 198036 198037 198038 198039 198040 198041 198042 198043 198044 198045 198046 198047 198048 198049 198050 198051 198052 198053 198054 198055 198056 198057 198058 198059 198060 198061 198062 198063 198064 198065 198066 198067 198068 198069 198070 198071 198072 198073 198074 198075 198076 198077 198078 198079 198080 198081 198082 198083 198084 198085 198086 198087 198088 198089 198090 198091 198092 198093 198094 198095 198096 198097 198098 198099 198100 198101 198102 198103 198104 198105 198106 198107 198108 198109 198110 198111 198112 198113 198114 198115 198116 198117 198118 198119 198120 198121 198122 198123 198124 198125 198126 198127 198128 198129 198130 198131 198132 198133 198134 198135 198136 198137 198138 198139 198140 198141 198142 198143 198144 198145 198146 198147 198148 198149 198150 198151 198152 198153 198154 198155 198156 198157 198158 198159 198160 198161 198162 198163 198164 198165 198166 198167 198168 198169 198170 198171 198172 198173 198174 198175 198176 198177 198178 198179 198180 198181 198182 198183 198184 198185 198186 198187 198188 198189 198190 198191 198192 198193 198194 198195 198196 198197 198198 198199 198200 198201 198202 198203 198204 198205 198206 198207 198208 198209 198210 198211 198212 198213 198214 198215 198216 198217 198218 198219 198220 198221 198222 198223 198224 198225 198226 198227 198228 198229 198230 198231 198232 198233 198234 198235 198236 198237 198238 198239 198240 198241 198242 198243 198244 198245 198246 198247 198248 198249 198250 198251 198252 198253 198254 198255 198256 198257 198258 198259 198260 198261 198262 198263 198264 198265 198266 198267 198268 198269 198270 198271 198272 198273 198274 198275 198276 198277 198278 198279 198280 198281 198282 198283 198284 198285 198286 198287 198288 198289 198290 198291 198292 198293 198294 198295 198296 198297 198298 198299 198300 198301 198302 198303 198304 198305 198306 198307 198308 198309 198310 198311 198312 198313 198314 198315 198316 198317 198318 198319 198320 198321 198322 198323 198324 198325 198326 198327 198328 198329 198330 198331 198332 198333 198334 198335 198336 198337 198338 198339 198340 198341 198342 198343 198344 198345 198346 198347 198348 198349 198350 198351 198352 198353 198354 198355 198356 198357 198358 198359 198360 198361 198362 198363 198364 198365 198366 198367 198368 198369 198370 198371 198372 198373 198374 198375 198376 198377 198378 198379 198380 198381 198382 198383 198384 198385 198386 198387 198388 198389 198390 198391 198392 198393 198394 198395 198396 198397 198398 198399 198400 198401 198402 198403 198404 198405 198406 198407 198408 198409 198410 198411 198412 198413 198414 198415 198416 198417 198418 198419 198420 198421 198422 198423 198424 198425 198426 198427 198428 198429 198430 198431 198432 198433 198434 198435 198436 198437 198438 198439 198440 198441 198442 198443 198444 198445 198446 198447 198448 198449 198450 198451 198452 198453 198454 198455 198456 198457 198458 198459 198460 198461 198462 198463 198464 198465 198466 198467 198468 198469 198470 198471 198472 198473 198474 198475 198476 198477 198478 198479 198480 198481 198482 198483 198484 198485 198486 198487 198488 198489 198490 198491 198492 198493 198494 198495 198496 198497 198498 198499 198500 198501 198502 198503 198504 198505 198506 198507 198508 198509 198510 198511 198512 198513 198514 198515 198516 198517 198518 198519 198520 198521 198522 198523 198524 198525 198526 198527 198528 198529 198530 198531 198532 198533 198534 198535 198536 198537 198538 198539 198540 198541 198542 198543 198544 198545 198546 198547 198548 198549 198550 198551 198552 198553 198554 198555 198556 198557 198558 198559 198560 198561 198562 198563 198564 198565 198566 198567 198568 198569 198570 198571 198572 198573 198574 198575 198576 198577 198578 198579 198580 198581 198582 198583 198584 198585 198586 198587 198588 198589 198590 198591 198592 198593 198594 198595 198596 198597 198598 198599 198600 198601 198602 198603 198604 198605 198606 198607 198608 198609 198610 198611 198612 198613 198614 198615 198616 198617 198618 198619 198620 198621 198622 198623 198624 198625 198626 198627 198628 198629 198630 198631 198632 198633 198634 198635 198636 198637 198638 198639 198640 198641 198642 198643 198644 198645 198646 198647 198648 198649 198650 198651 198652 198653 198654 198655 198656 198657 198658 198659 198660 198661 198662 198663 198664 198665 198666 198667 198668 198669 198670 198671 198672 198673 198674 198675 198676 198677 198678 198679 198680 198681 198682 198683 198684 198685 198686 198687 198688 198689 198690 198691 198692 198693 198694 198695 198696 198697 198698 198699 198700 198701 198702 198703 198704 198705 198706 198707 198708 198709 198710 198711 198712 198713 198714 198715 198716 198717 198718 198719 198720 198721 198722 198723 198724 198725 198726 198727 198728 198729 198730 198731 198732 198733 198734 198735 198736 198737 198738 198739 198740 198741 198742 198743 198744 198745 198746 198747 198748 198749 198750 198751 198752 198753 198754 198755 198756 198757 198758 198759 198760 198761 198762 198763 198764 198765 198766 198767 198768 198769 198770 198771 198772 198773 198774 198775 198776 198777 198778 198779 198780 198781 198782 198783 198784 198785 198786 198787 198788 198789 198790 198791 198792 198793 198794 198795 198796 198797 198798 198799 198800 198801 198802 198803 198804 198805 198806 198807 198808 198809 198810 198811 198812 198813 198814 198815 198816 198817 198818 198819 198820 198821 198822 198823 198824 198825 198826 198827 198828 198829 198830 198831 198832 198833 198834 198835 198836 198837 198838 198839 198840 198841 198842 198843 198844 198845 198846 198847 198848 198849 198850 198851 198852 198853 198854 198855 198856 198857 198858 198859 198860 198861 198862 198863 198864 198865 198866 198867 198868 198869 198870 198871 198872 198873 198874 198875 198876 198877 198878 198879 198880 198881 198882 198883 198884 198885 198886 198887 198888 198889 198890 198891 198892 198893 198894 198895 198896 198897 198898 198899 198900 198901 198902 198903 198904 198905 198906 198907 198908 198909 198910 198911 198912 198913 198914 198915 198916 198917 198918 198919 198920 198921 198922 198923 198924 198925 198926 198927 198928 198929 198930 198931 198932 198933 198934 198935 198936 198937 198938 198939 198940 198941 198942 198943 198944 198945 198946 198947 198948 198949 198950 198951 198952 198953 198954 198955 198956 198957 198958 198959 198960 198961 198962 198963 198964 198965 198966 198967 198968 198969 198970 198971 198972 198973 198974 198975 198976 198977 198978 198979 198980 198981 198982 198983 198984 198985 198986 198987 198988 198989 198990 198991 198992 198993 198994 198995 198996 198997 198998 198999 199000 199001 199002 199003 199004 199005 199006 199007 199008 199009 199010 199011 199012 199013 199014 199015 199016 199017 199018 199019 199020 199021 199022 199023 199024 199025 199026 199027 199028 199029 199030 199031 199032 199033 199034 199035 199036 199037 199038 199039 199040 199041 199042 199043 199044 199045 199046 199047 199048 199049 199050 199051 199052 199053 199054 199055 199056 199057 199058 199059 199060 199061 199062 199063 199064 199065 199066 199067 199068 199069 199070 199071 199072 199073 199074 199075 199076 199077 199078 199079 199080 199081 199082 199083 199084 199085 199086 199087 199088 199089 199090 199091 199092 199093 199094 199095 199096 199097 199098 199099 199100 199101 199102 199103 199104 199105 199106 199107 199108 199109 199110 199111 199112 199113 199114 199115 199116 199117 199118 199119 199120 199121 199122 199123 199124 199125 199126 199127 199128 199129 199130 199131 199132 199133 199134 199135 199136 199137 199138 199139 199140 199141 199142 199143 199144 199145 199146 199147 199148 199149 199150 199151 199152 199153 199154 199155 199156 199157 199158 199159 199160 199161 199162 199163 199164 199165 199166 199167 199168 199169 199170 199171 199172 199173 199174 199175 199176 199177 199178 199179 199180 199181 199182 199183 199184 199185 199186 199187 199188 199189 199190 199191 199192 199193 199194 199195 199196 199197 199198 199199 199200 199201 199202 199203 199204 199205 199206 199207 199208 199209 199210 199211 199212 199213 199214 199215 199216 199217 199218 199219 199220 199221 199222 199223 199224 199225 199226 199227 199228 199229 199230 199231 199232 199233 199234 199235 199236 199237 199238 199239 199240 199241 199242 199243 199244 199245 199246 199247 199248 199249 199250 199251 199252 199253 199254 199255 199256 199257 199258 199259 199260 199261 199262 199263 199264 199265 199266 199267 199268 199269 199270 199271 199272 199273 199274 199275 199276 199277 199278 199279 199280 199281 199282 199283 199284 199285 199286 199287 199288 199289 199290 199291 199292 199293 199294 199295 199296 199297 199298 199299 199300 199301 199302 199303 199304 199305 199306 199307 199308 199309 199310 199311 199312 199313 199314 199315 199316 199317 199318 199319 199320 199321 199322 199323 199324 199325 199326 199327 199328 199329 199330 199331 199332 199333 199334 199335 199336 199337 199338 199339 199340 199341 199342 199343 199344 199345 199346 199347 199348 199349 199350 199351 199352 199353 199354 199355 199356 199357 199358 199359 199360 199361 199362 199363 199364 199365 199366 199367 199368 199369 199370 199371 199372 199373 199374 199375 199376 199377 199378 199379 199380 199381 199382 199383 199384 199385 199386 199387 199388 199389 199390 199391 199392 199393 199394 199395 199396 199397 199398 199399 199400 199401 199402 199403 199404 199405 199406 199407 199408 199409 199410 199411 199412 199413 199414 199415 199416 199417 199418 199419 199420 199421 199422 199423 199424 199425 199426 199427 199428 199429 199430 199431 199432 199433 199434 199435 199436 199437 199438 199439 199440 199441 199442 199443 199444 199445 199446 199447 199448 199449 199450 199451 199452 199453 199454 199455 199456 199457 199458 199459 199460 199461 199462 199463 199464 199465 199466 199467 199468 199469 199470 199471 199472 199473 199474 199475 199476 199477 199478 199479 199480 199481 199482 199483 199484 199485 199486 199487 199488 199489 199490 199491 199492 199493 199494 199495 199496 199497 199498 199499 199500 199501 199502 199503 199504 199505 199506 199507 199508 199509 199510 199511 199512 199513 199514 199515 199516 199517 199518 199519 199520 199521 199522 199523 199524 199525 199526 199527 199528 199529 199530 199531 199532 199533 199534 199535 199536 199537 199538 199539 199540 199541 199542 199543 199544 199545 199546 199547 199548 199549 199550 199551 199552 199553 199554 199555 199556 199557 199558 199559 199560 199561 199562 199563 199564 199565 199566 199567 199568 199569 199570 199571 199572 199573 199574 199575 199576 199577 199578 199579 199580 199581 199582 199583 199584 199585 199586 199587 199588 199589 199590 199591 199592 199593 199594 199595 199596 199597 199598 199599 199600 199601 199602 199603 199604 199605 199606 199607 199608 199609 199610 199611 199612 199613 199614 199615 199616 199617 199618 199619 199620 199621 199622 199623 199624 199625 199626 199627 199628 199629 199630 199631 199632 199633 199634 199635 199636 199637 199638 199639 199640 199641 199642 199643 199644 199645 199646 199647 199648 199649 199650 199651 199652 199653 199654 199655 199656 199657 199658 199659 199660 199661 199662 199663 199664 199665 199666 199667 199668 199669 199670 199671 199672 199673 199674 199675 199676 199677 199678 199679 199680 199681 199682 199683 199684 199685 199686 199687 199688 199689 199690 199691 199692 199693 199694 199695 199696 199697 199698 199699 199700 199701 199702 199703 199704 199705 199706 199707 199708 199709 199710 199711 199712 199713 199714 199715 199716 199717 199718 199719 199720 199721 199722 199723 199724 199725 199726 199727 199728 199729 199730 199731 199732 199733 199734 199735 199736 199737 199738 199739 199740 199741 199742 199743 199744 199745 199746 199747 199748 199749 199750 199751 199752 199753 199754 199755 199756 199757 199758 199759 199760 199761 199762 199763 199764 199765 199766 199767 199768 199769 199770 199771 199772 199773 199774 199775 199776 199777 199778 199779 199780 199781 199782 199783 199784 199785 199786 199787 199788 199789 199790 199791 199792 199793 199794 199795 199796 199797 199798 199799 199800 199801 199802 199803 199804 199805 199806 199807 199808 199809 199810 199811 199812 199813 199814 199815 199816 199817 199818 199819 199820 199821 199822 199823 199824 199825 199826 199827 199828 199829 199830 199831 199832 199833 199834 199835 199836 199837 199838 199839 199840 199841 199842 199843 199844 199845 199846 199847 199848 199849 199850 199851 199852 199853 199854 199855 199856 199857 199858 199859 199860 199861 199862 199863 199864 199865 199866 199867 199868 199869 199870 199871 199872 199873 199874 199875 199876 199877 199878 199879 199880 199881 199882 199883 199884 199885 199886 199887 199888 199889 199890 199891 199892 199893 199894 199895 199896 199897 199898 199899 199900 199901 199902 199903 199904 199905 199906 199907 199908 199909 199910 199911 199912 199913 199914 199915 199916 199917 199918 199919 199920 199921 199922 199923 199924 199925 199926 199927 199928 199929 199930 199931 199932 199933 199934 199935 199936 199937 199938 199939 199940 199941 199942 199943 199944 199945 199946 199947 199948 199949 199950 199951 199952 199953 199954 199955 199956 199957 199958 199959 199960 199961 199962 199963 199964 199965 199966 199967 199968 199969 199970 199971 199972 199973 199974 199975 199976 199977 199978 199979 199980 199981 199982 199983 199984 199985 199986 199987 199988 199989 199990 199991 199992 199993 199994 199995 199996 199997 199998 199999 200000 200001 200002 200003 200004 200005 200006 200007 200008 200009 200010 200011 200012 200013 200014 200015 200016 200017 200018 200019 200020 200021 200022 200023 200024 200025 200026 200027 200028 200029 200030 200031 200032 200033 200034 200035 200036 200037 200038 200039 200040 200041 200042 200043 200044 200045 200046 200047 200048 200049 200050 200051 200052 200053 200054 200055 200056 200057 200058 200059 200060 200061 200062 200063 200064 200065 200066 200067 200068 200069 200070 200071 200072 200073 200074 200075 200076 200077 200078 200079 200080 200081 200082 200083 200084 200085 200086 200087 200088 200089 200090 200091 200092 200093 200094 200095 200096 200097 200098 200099 200100 200101 200102 200103 200104 200105 200106 200107 200108 200109 200110 200111 200112 200113 200114 200115 200116 200117 200118 200119 200120 200121 200122 200123 200124 200125 200126 200127 200128 200129 200130 200131 200132 200133 200134 200135 200136 200137 200138 200139 200140 200141 200142 200143 200144 200145 200146 200147 200148 200149 200150 200151 200152 200153 200154 200155 200156 200157 200158 200159 200160 200161 200162 200163 200164 200165 200166 200167 200168 200169 200170 200171 200172 200173 200174 200175 200176 200177 200178 200179 200180 200181 200182 200183 200184 200185 200186 200187 200188 200189 200190 200191 200192 200193 200194 200195 200196 200197 200198 200199 200200 200201 200202 200203 200204 200205 200206 200207 200208 200209 200210 200211 200212 200213 200214 200215 200216 200217 200218 200219 200220 200221 200222 200223 200224 200225 200226 200227 200228 200229 200230 200231 200232 200233 200234 200235 200236 200237 200238 200239 200240 200241 200242 200243 200244 200245 200246 200247 200248 200249 200250 200251 200252 200253 200254 200255 200256 200257 200258 200259 200260 200261 200262 200263 200264 200265 200266 200267 200268 200269 200270 200271 200272 200273 200274 200275 200276 200277 200278 200279 200280 200281 200282 200283 200284 200285 200286 200287 200288 200289 200290 200291 200292 200293 200294 200295 200296 200297 200298 200299 200300 200301 200302 200303 200304 200305 200306 200307 200308 200309 200310 200311 200312 200313 200314 200315 200316 200317 200318 200319 200320 200321 200322 200323 200324 200325 200326 200327 200328 200329 200330 200331 200332 200333 200334 200335 200336 200337 200338 200339 200340 200341 200342 200343 200344 200345 200346 200347 200348 200349 200350 200351 200352 200353 200354 200355 200356 200357 200358 200359 200360 200361 200362 200363 200364 200365 200366 200367 200368 200369 200370 200371 200372 200373 200374 200375 200376 200377 200378 200379 200380 200381 200382 200383 200384 200385 200386 200387 200388 200389 200390 200391 200392 200393 200394 200395 200396 200397 200398 200399 200400 200401 200402 200403 200404 200405 200406 200407 200408 200409 200410 200411 200412 200413 200414 200415 200416 200417 200418 200419 200420 200421 200422 200423 200424 200425 200426 200427 200428 200429 200430 200431 200432 200433 200434 200435 200436 200437 200438 200439 200440 200441 200442 200443 200444 200445 200446 200447 200448 200449 200450 200451 200452 200453 200454 200455 200456 200457 200458 200459 200460 200461 200462 200463 200464 200465 200466 200467 200468 200469 200470 200471 200472 200473 200474 200475 200476 200477 200478 200479 200480 200481 200482 200483 200484 200485 200486 200487 200488 200489 200490 200491 200492 200493 200494 200495 200496 200497 200498 200499 200500 200501 200502 200503 200504 200505 200506 200507 200508 200509 200510 200511 200512 200513 200514 200515 200516 200517 200518 200519 200520 200521 200522 200523 200524 200525 200526 200527 200528 200529 200530 200531 200532 200533 200534 200535 200536 200537 200538 200539 200540 200541 200542 200543 200544 200545 200546 200547 200548 200549 200550 200551 200552 200553 200554 200555 200556 200557 200558 200559 200560 200561 200562 200563 200564 200565 200566 200567 200568 200569 200570 200571 200572 200573 200574 200575 200576 200577 200578 200579 200580 200581 200582 200583 200584 200585 200586 200587 200588 200589 200590 200591 200592 200593 200594 200595 200596 200597 200598 200599 200600 200601 200602 200603 200604 200605 200606 200607 200608 200609 200610 200611 200612 200613 200614 200615 200616 200617 200618 200619 200620 200621 200622 200623 200624 200625 200626 200627 200628 200629 200630 200631 200632 200633 200634 200635 200636 200637 200638 200639 200640 200641 200642 200643 200644 200645 200646 200647 200648 200649 200650 200651 200652 200653 200654 200655 200656 200657 200658 200659 200660 200661 200662 200663 200664 200665 200666 200667 200668 200669 200670 200671 200672 200673 200674 200675 200676 200677 200678 200679 200680 200681 200682 200683 200684 200685 200686 200687 200688 200689 200690 200691 200692 200693 200694 200695 200696 200697 200698 200699 200700 200701 200702 200703 200704 200705 200706 200707 200708 200709 200710 200711 200712 200713 200714 200715 200716 200717 200718 200719 200720 200721 200722 200723 200724 200725 200726 200727 200728 200729 200730 200731 200732 200733 200734 200735 200736 200737 200738 200739 200740 200741 200742 200743 200744 200745 200746 200747 200748 200749 200750 200751 200752 200753 200754 200755 200756 200757 200758 200759 200760 200761 200762 200763 200764 200765 200766 200767 200768 200769 200770 200771 200772 200773 200774 200775 200776 200777 200778 200779 200780 200781 200782 200783 200784 200785 200786 200787 200788 200789 200790 200791 200792 200793 200794 200795 200796 200797 200798 200799 200800 200801 200802 200803 200804 200805 200806 200807 200808 200809 200810 200811 200812 200813 200814 200815 200816 200817 200818 200819 200820 200821 200822 200823 200824 200825 200826 200827 200828 200829 200830 200831 200832 200833 200834 200835 200836 200837 200838 200839 200840 200841 200842 200843 200844 200845 200846 200847 200848 200849 200850 200851 200852 200853 200854 200855 200856 200857 200858 200859 200860 200861 200862 200863 200864 200865 200866 200867 200868 200869 200870 200871 200872 200873 200874 200875 200876 200877 200878 200879 200880 200881 200882 200883 200884 200885 200886 200887 200888 200889 200890 200891 200892 200893 200894 200895 200896 200897 200898 200899 200900 200901 200902 200903 200904 200905 200906 200907 200908 200909 200910 200911 200912 200913 200914 200915 200916 200917 200918 200919 200920 200921 200922 200923 200924 200925 200926 200927 200928 200929 200930 200931 200932 200933 200934 200935 200936 200937 200938 200939 200940 200941 200942 200943 200944 200945 200946 200947 200948 200949 200950 200951 200952 200953 200954 200955 200956 200957 200958 200959 200960 200961 200962 200963 200964 200965 200966 200967 200968 200969 200970 200971 200972 200973 200974 200975 200976 200977 200978 200979 200980 200981 200982 200983 200984 200985 200986 200987 200988 200989 200990 200991 200992 200993 200994 200995 200996 200997 200998 200999 201000 201001 201002 201003 201004 201005 201006 201007 201008 201009 201010 201011 201012 201013 201014 201015 201016 201017 201018 201019 201020 201021 201022 201023 201024 201025 201026 201027 201028 201029 201030 201031 201032 201033 201034 201035 201036 201037 201038 201039 201040 201041 201042 201043 201044 201045 201046 201047 201048 201049 201050 201051 201052 201053 201054 201055 201056 201057 201058 201059 201060 201061 201062 201063 201064 201065 201066 201067 201068 201069 201070 201071 201072 201073 201074 201075 201076 201077 201078 201079 201080 201081 201082 201083 201084 201085 201086 201087 201088 201089 201090 201091 201092 201093 201094 201095 201096 201097 201098 201099 201100 201101 201102 201103 201104 201105 201106 201107 201108 201109 201110 201111 201112 201113 201114 201115 201116 201117 201118 201119 201120 201121 201122 201123 201124 201125 201126 201127 201128 201129 201130 201131 201132 201133 201134 201135 201136 201137 201138 201139 201140 201141 201142 201143 201144 201145 201146 201147 201148 201149 201150 201151 201152 201153 201154 201155 201156 201157 201158 201159 201160 201161 201162 201163 201164 201165 201166 201167 201168 201169 201170 201171 201172 201173 201174 201175 201176 201177 201178 201179 201180 201181 201182 201183 201184 201185 201186 201187 201188 201189 201190 201191 201192 201193 201194 201195 201196 201197 201198 201199 201200 201201 201202 201203 201204 201205 201206 201207 201208 201209 201210 201211 201212 201213 201214 201215 201216 201217 201218 201219 201220 201221 201222 201223 201224             6713× 5008×     1705×             1705×     1705×     1705×                 1510× 1510×                                 1510×                                             529551× 529549×                   113263× 113263× 46793×   113263× 113263× 174630× 80320×     94310× 94310×     113263× 46793× 2366×   44427× 31287×   13140× 13129×     113263×             46858×             1153× 106×   1047×             22570× 4360×     18210× 18210×                         118020× 118020× 118020× 9042×   118020×                                       2203× 2992×     2994× 2994× 2994×                     228× 137×           1098× 1098×         3185× 3185×                     2124×                 2124× 451×     1673×                 274× 18×   256×   252×   247× 13×   234×   233×           189120×             30103×             13561×             3752× 1077×   2675× 2663× 159×     2516×     2514×               2586×               464× 46×   418×                 68× 68× 68×   68×           218×                                                           115375×             1975× 1975×                   62186× 62186× 1048× 2097×       61138× 55357× 41650×     13707×                 30831×             38170×           38166× 10365×     27801×               2384×             181422× 181422× 165744×     15678×               181416×         333×           926×           1909×           1797× 1623×     174×     123442× 123442× 2606× 8946×       120836× 120836× 120836× 167×   120669× 120669× 5270×   120669×     120669× 4732×     115937×               1299× 1299×           1299× 1299× 262× 262×   1299×     325× 325× 12×       320× 320× 320×   314× 314× 314× 307×                         11525× 11525×   11517× 11514× 11514×                         10×                     29× 29× 32× 27×               13× 13× 13×   13×                                                             30× 24×                     85×                     1248× 1248×           772× 772×           772× 770× 770× 770×   772×     132681×         133980× 132617×   1363×   3004× 3004× 765×   3004× 3004× 5227× 2096×   5227×     5227× 2930×   2297× 2223×     3004× 2096×   908×                 29×   27×       29×                           29×     43×   43× 43×           568961× 568961× 711285×   568961× 41182×   527779× 414904×     112875×                   5620× 5675× 51742× 5996× 888876× 42174× 122× 433× 292772× 68× 491× 11800× 15856× 918× 120× 8317× 557× 105× 5497× 24× 22× 11234× 12× 1676× 4881× 630× 271× 2525× 8134× 373× 19× 879× 82596× 1731× 405374× 6776× 6559× 7426× 28× 4545× 34× 25432× 56× 128× 185096× 1333× 653× 86× 63× 457× 90× 78× 1529× 28834× 714× 2864× 243× 113× 310× 37× 58× 392× 218903× 166× 245×                                                     4116× 4116× 4116× 4116× 4116× 4116× 4116× 4116× 4116× 4116× 4116× 4116× 4116×   226× 226×   1887× 1887×   999× 999×   12× 12×       654× 654× 654× 654×     91× 91× 91×   14× 14×   4018× 4018× 28×   3990× 3929×   3990× 3990× 3990× 3990× 3990× 3990× 3990× 3990× 3990× 3990× 3990× 3990× 3990× 3990×     3990× 405×   3990× 620× 620×   3990× 3990×   12056× 56×   12000×                           2381× 2381× 2381× 374×   2381× 2381× 2381×   1821× 1675× 1675× 1675×   1821×     88413× 88413× 88413× 2084661×   88413×   4374× 4374×     4374×             4374×               4374× 4374× 4374× 4374× 4374× 4374× 4374× 4374×   41630× 41630× 41630× 41630×   24972× 24972× 24972× 24972× 24972× 24972× 55×   24972× 24972× 24972×   24972× 24972× 6011×   24972×   24972×       24972× 24972× 24972× 24972× 24972× 24972×   4126× 4126× 4126× 4126× 4126× 4126× 4126× 4126× 4126×   4209× 4209× 4209× 4209× 4209× 4209× 4209× 4209× 4209×         4209×   8247× 8247× 8247×   33×   33× 33× 33×   531× 531× 531×         60× 60× 60× 60×           15× 15× 15×                                   49× 49× 49× 49× 49×         43× 43× 43× 43× 43×         137× 137×                         800× 800×                   1359× 1359× 1359× 1359× 1359×                   459× 459× 459× 459× 459×                                         1654×             4025×               15030×           94184×     313× 313×                       23825×     163×           1636×                             5395× 41614× 41614×       5395×       5395×       5395×           1554×                                       7950× 1554×   7950×                                     7789× 3737×   230×                             3737×               3737× 3737×         7789×                         2183×         2183× 2183×   2183× 1806×   2183× 117×   2183×     2183×     2183×     2183× 2183×   2183×     2183× 2183×   2183× 2183×     2183×                   2183×       2183× 2183× 2183× 17×       2183× 2183× 2183× 2183×       1878×                           12×   12×                                                                                                 12487×           768× 768× 11584× 11584× 11584× 770×   10814×       768×       768×             768×   768× 5407× 5407× 1541× 1541× 1541× 3866× 3866×           768× 11563×           1531×     768×     12× 12×                                                   11× 11×     323×     323×                               60× 60× 32× 329×     60× 42×   60× 32× 323×     60×                 32×   28×     29×       29× 82× 50×   32×       29× 261×   261× 820×       261×         265×     261× 261×     261×     378×   136×     378× 378× 136×       136× 136×     378×                     143×     143× 143×                                                                                                                   16× 16×     480×         86×       86× 86× 86× 86× 86×         86×       16×                               73×     1146×   146×   1000×       470×     470× 450×     470×     1692×         1692×         2534×         44× 44×                         44×                                                                                                         72×     648×       1107× 459×     648×       459×                       459×       40×     40× 20×   40× 154×     40× 40× 70×                 648× 384×                         158×                                 158×     158× 158× 158×                 119×         39×                               115×                                             39×         39×                                                                                                                                                                                                                                             42×   42×         42×                       42× 42× 42×     756×         756×                                                                                                                                                                                                               115×                                                   117×   117×       115×     117×                                                                                                                                                                                                                                                                         13×                                                                                                                                 13×             13×                                                                                                                                                                                                                                                                                                                               14×     14× 14×       14×                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   1542×     1542×                       1542×           1536× 1536× 1536× 1535×       1536×   1536×                     1536×                                                                                             763× 763×       763×   756×                     763×                           763×       3496×   3496×       3496× 1961×     1535×   1535× 1535× 1535×                     2299×     2299× 117×                                       117×           117×     117×       117×     2299×                                                                                                           45×                     45× 45× 45× 90× 45× 45× 45×     45×       45× 15×               45×       45×               45× 45×                                                                                                                                                                                                               45× 45×         45× 45×     45×                                                                         117× 117×             117×             117×             117×       117×     117×         117×                                       117×       117× 813×         117×                   117×       117×           117×       117×         117×                                                                                                                                                     117×       117×       117× 117×     117×                     117×   117× 117× 1107× 1107×   1107× 612× 612× 41×   612×     612×     1107× 648× 384×   264×   648× 459×           117×   117×       117×               117× 117×   117×             117× 117×       117× 117×     117×   117×   117×                                                                                                                                                                                                 1869× 1869×           1869×     1869×     1869×   1869×     1867× 117×     1867× 313× 1554× 1023× 531×   531× 72×   459×     1554× 15×     1554×     459× 459× 377× 82×   82× 45× 37×         37×   37×   37×           1869×   1869×         1869×         1869×               1869× 1869× 1869× 1869× 1869× 1869×   1869×     1867×                                                                                                                 494×                           86×       86× 86×                     86× 774× 86×     86×           86×                 86×                     86×     86×             86×       86×   86×   86×   86×     258×     172×     172×                                                                                                                                     202× 202×                     202×           382×                                       397×   397×   395× 13×         13× 13×   13×     13× 13× 13×     13×                           13×   382×                                 15×     202×               202×                                                                                                                                     86×             86×           86× 86× 86× 86×                                                                                   86×   86×       86×       86×                                                                                     86×   86×                             86× 86× 86×       86×       86×         86×   86× 42×   86× 44×   86×     86× 86×                   11×                                                                                                                                                                       11× 11×                               11× 11×     11× 11× 11×               11×                 11×                                                                                                                                           195×   195×     191×   191×       191×   191×   191×                                       53× 53×   138× 138×         191×                                                                                                                                                                                 265×         265× 265×                                                                                                                     603×                       203×     201×                         98× 98× 98×       98×   98×                                                           98× 98×                                   98× 98× 98×     105× 105× 105×       105×   105×                                                                 105× 105×                                         105× 105× 105×     974×           567×                                                             6235×                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               382×                                                                                                                                                                                                                                                                                                                                                 86×     86×       86×                       86×                         86×   86× 86×   86× 86×   86× 86×   86×     86× 86× 86×     86× 86×   86× 86× 86×   86×         86×       86×                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       43471× 43471× 88289×   43471×                                     1195020×   980885×   1158589×   23802×     683×   9561×   388160×   1291×   5211×   4381×   14359×   10740×   122× 122×                                     27115× 88×       87×                 27027×     1493×     1493×   19× 12×           14×               1033× 1027×                             11225× 11225× 11186×     39× 39× 78×       614×   1541×   185× 185×     2237×   2237× 1300× 1300×   1300× 23599× 1300× 34×       2237×               10× 10×           1392×     1392× 1392× 733×   1392×       1392×       1392× 1392× 1392×           1392×   1392× 702×   1392×                                                             6105× 5935×   6105× 6105× 6105× 110× 110× 110× 112× 110×                   5995× 5995× 100×     5995× 18414× 17052×     1362× 1350×     12×         6105×                                                                                             90260×         15× 15×                                     25×                   110585× 110585× 2339×   110585×   16×         190×   20×     21× 10×                                                               6119× 6119×         17562×       17562×     665×       665×                 15956×                 664×                 1942×                 124×                   20×   77× 77× 75×       75×                 18304× 18304× 2957× 2957× 5832×   2957× 2944× 2844× 2638×     100×             2944×       18302× 7790×   10512×     10512×   100× 18×   82×   1962×   124×   2086× 2086× 912×     1174×   2086×                           6117× 6117× 6117× 6117× 6117× 6117× 6117× 6117× 6117× 6117× 6117× 6117× 6117× 6114×   6117× 6117×           840×                           1541×             113×   204×   189×   189×   189×   1541×     18×   18×     6117× 6117×                                 5155× 5155× 2197×   2958× 632× 632×         2326× 2326× 248×   2324×     694× 694× 694× 693×   1514× 1514× 1514× 1514× 1514× 1514× 13×       924× 924× 924× 823×   101× 101× 16×   85×   1901× 1901× 1901× 1901× 1901× 1901× 157×       1744× 1744×     1737× 1737× 1306×       1901× 1470×     431×     1068× 1068× 1068× 1070×     174× 174× 23× 23× 23×     151× 78×   73×                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       43× 111× 153× 43×     111× 43× 154× 154× 308× 308× 308× 308× 154× 111×       43×             154× 308× 43×                                 78× 78× 78×     74×   78×     76×                   88× 88× 88× 88× 88× 88×     88× 88×   88× 88× 1924× 1924×                             17×     17× 34× 31×         17× 17×                   149×                     31× 31× 31×                         2258×                             2000×                 38× 38× 38× 38×       37× 37×               37× 74×     74× 74×     68×     37× 37× 37× 37× 37× 148× 37×   37× 37× 37×   37× 37× 37× 37×   37× 37× 37× 21× 21×   21× 21×   21×         36×       37×       37×                   36× 36×                       33× 33× 33× 33× 33× 33×                                                                     1130× 1130× 1130× 1130×         1130×                   1196× 1196× 1196× 1196× 1196× 1196× 1196×   107901× 107901× 107901×     107901× 107901×     107901×     1196× 1196×                 1196×                   22× 22× 22× 22× 22×                                                                                         21×   2005× 2005×       2003×     2003×                 21× 21×         21×     20×       111× 111×     111×               37× 37×                                           35×     37× 36×     36× 14×   22× 20×                 1933×                                                                                     20×               107901× 107901× 2191×     1999× 1999× 1999× 1999× 1999× 1999× 1999×   1999× 1999×       107901×         1999× 1999× 1999× 1999× 1999× 1999× 1999× 1999× 21714×   1999× 1999×         1999×   1998×       1998×               1996×                         103×                             102×     102× 143×                                                       1214× 1214× 1214× 1214× 19647×   1214×                                       30×                                     20636× 20636×                                                                                   47× 47× 47× 212×   47× 47× 47× 47×   10× 10× 10× 10× 10× 10× 10× 10× 10×         10× 30× 20×     10× 30× 20×     10×   99× 99× 99× 99× 99× 899×   99×         12×           403× 403× 403× 324× 3999×     403×   26× 26× 26× 26× 26× 26×   26×   133× 399× 399× 399× 4395×     399× 399×     26×         1299× 1299×               25×               82× 82× 82× 82×     922×     922×       243× 243×           30× 30× 30× 30× 216×   30×   12× 12× 12× 12× 12× 12× 12× 12× 12× 12× 12× 12×   12×         12×                   12×   12×                                                                                                                                     48×                                                                             73×   1033749× 71×         3836×       3804×   672646×   158×   1327×   354× 354× 354×   336765×   53×   26×   803×       48×   73× 73× 73×   73× 70×           73× 73× 73×                                                                             163×                                       93×                           127×                                                                                                                                                                     14×                                                     36×                             37×                                                                               18×                                     22× 5488× 5488×     22×   237× 237×     246× 246× 246× 246× 1376× 1376× 1376×   246× 246× 246× 246× 1376× 1376× 1376× 496× 496×     246×                                     567× 567× 567× 567× 567×   75190×   75188× 75181×     75182×   2753×                       6712×   7131× 7131× 21×   7131× 74644× 74635× 74635×   7122× 7122×               73044×   11× 11× 11×                         4856× 4856× 4856×   238× 370×   238×               368× 368× 366×       4387× 4387× 4387× 37× 37× 37× 37×         35×   4350×   11610× 11610× 11606×         26939×   2471× 2471× 2471×     1439× 1439× 1432×           1228× 1228× 1228×   754× 754×   754× 754× 754×     754× 751× 751× 750×   751×   754×   753× 753×   752×   341× 341×   150× 150× 150×   367× 367×   365× 208×   157×   511× 511×   74050× 271× 271× 414× 414×     271×   73779× 510×     73269×                                                                                                                                                                                                                                                                                                       111×     11×                 11×     732×                         732× 19×   732× 41×   732×           732× 732×         732× 732× 732×   727×           727× 727× 727× 727× 26×             26× 26×     701×           701× 701×             701× 72× 72×   701×       693×           693× 693×     727× 727×   727×   727× 15×     712×   727×                   224× 224× 224× 224×   158× 158× 158× 158× 158× 158× 158× 158× 158× 63× 63× 63×               158×                             28×       28×                         28× 28×   19× 19× 19×     71×     78× 78×   232×     78×   22×     78× 78×   18× 18×   374×                                                                                                                                                                                                                                                   1336× 1336× 1336× 1336×   3727× 3727×   420×   376×             122×     653× 649×   653×                                                                                                                                                         172920×   4309× 4309× 10925×   4309×     2149× 2149× 2284×   2149×     1853× 1853× 2219×   1853×     397× 397× 517×   397×     206× 206× 336×   206×                                                                                   5620× 5620×   294× 294×   5620× 3339×     2281×   5620×   4808× 4808×   718× 718×   64× 64×   4441× 4441× 4441×   781× 781×   1119× 1119×             46× 46×   274× 274×   271× 271×   5620×     5620× 5620× 5620× 5620× 5620× 5620× 5620× 5620× 5620×   5620× 5620× 5620× 5620× 5620×     5620× 5193×     5620× 718×   4902× 32× 32×   4870× 63× 63×   4807×   5560×   5620× 5620× 5560× 5560× 5560×       5560×       5620× 5222×     5620× 54×   5620× 10×     5620× 10×   5620× 10×     5620× 10×   5620× 54×     5620× 5620× 274× 274× 274× 274×     23146× 1212×     21934×                     221× 2441× 221×                                                                                                                                         8230× 8230×   88× 88×   20× 20× 20×     767× 767× 767×     8318× 8318×                                             6087×             6087×             6087×               6087×                 6087×                             6087×           6087×           6087× 6087× 6087×       6087×               6087×                     6087× 6087×       6087×       6087×         6087×         6087×       6087×       6087× 6087×               5353×                                                                                               5353×                         159×                                 62× 62× 62× 62× 62× 62× 62× 62× 62× 62× 62× 62× 62× 62× 62×                                 5353× 19×     5334×                               13× 12×   13×             14× 14×     5353× 5268×   85×                 5353× 5317×   36×                                                       12×     18× 12× 24× 24× 24× 24× 12×                   12× 24×                                                                                                                 301× 301× 301× 301× 301× 301× 301× 301× 301× 301× 301× 301× 301× 301× 301× 301× 301× 301× 301×           301× 301× 301× 301× 301× 301× 301× 301× 301× 301×                               11×                 138×                           660×                                                                       1024× 79×   1024× 577×   1024×               301× 301× 301×       301× 301× 295× 295× 37×   295×       301× 290×     11×     301× 301× 301× 301× 301× 301× 301× 301× 301× 301× 301× 301×   301× 301× 300×     301×     301× 301× 301× 301× 301×   301× 301×     301× 301× 301× 301× 301× 301× 38×                           79× 79× 79× 79×   79× 41× 41×           79× 41× 41×         79× 41×   79× 41×       79× 33×     41× 41×                       41×   41× 41× 41× 41× 41×                                     41×       41×       41×   41× 41× 41×   41× 41× 41×                                           41×       41×       41×   41× 41× 41× 41×       41×                                       87×   87×   87×   87× 87×   87× 87×   87×   87×   87× 87×   87× 87× 87× 87× 87× 87×               53× 53× 53× 53× 53×       53×     53× 53× 53× 53× 53×     52× 52×           36× 36× 89× 89×         36×         36× 36× 36×                     36×         61× 61× 61× 61× 61× 61× 61× 61×   61×   61×     61×   61×           290×   11× 11×           11×     11× 11×                                                                                                                                                                                                                                                                                                                                                                                                                 271×                     291×                                                                                                                                                                                                                                                                                                             292×     24× 24× 24× 24× 24× 24× 24× 24×                   12×                       13× 13× 13× 13× 13× 13× 13×     13× 13×       18× 18×           18× 18×           18× 18×           18× 18×   18×           18× 18×                                                               1949× 1949× 1949× 1949× 1949× 1949×                       666× 666× 666×             353× 353× 353× 4745× 567× 108×     4178× 121×     353×                               1083× 1083× 1083× 1083× 5499× 5497×   5499× 5499× 5497× 10×     5489× 437× 437× 437× 437×       1083× 435× 435×                                                                 5735× 50×     5685×                                                       1122× 1122×                   7009×   435×   437×   1083×     435×   437×   435×   443×   5497×   5497× 5493× 725×   4768× 362×     4406×       725×   721×   362×       362×   4406× 4406× 4406× 4406×     4400×   5499× 725×   4774× 362× 360×         4412×   5489× 5489× 4492×   997× 956×   41× 37×                                                           27×                               1836× 1836× 1836× 1836×   1824×             1823× 1821×       479× 479× 479×   178× 178× 178× 17×         161×       161×   160×   159×   158×   157×   156×   155×   154× 154×   154× 32× 32×     122×       121×     119× 108× 108×           11× 11×           321× 186×     1061× 95749× 95749×   1061×   1011× 1011× 1011× 1011× 1007×   1003× 1003× 1003× 1003×                               1906× 1003×   1003× 1003× 1003× 1003× 83×   1003× 906×   1003× 1003×                   10× 20655× 1034× 1005207× 5968× 94112× 20× 13071× 1069163×                                                                                     463× 463×   861×   616× 614× 153×       1560× 463× 463× 463× 463×     1097×                                                                                                   376× 376× 376× 376× 376× 376× 376× 376× 376× 376× 376× 376× 376× 376× 376×   376×   376× 376× 376× 376× 376× 376× 376× 376× 376× 376× 376× 376× 376× 376× 376× 43×   376×   28× 21×     77× 37×   40×             145× 145× 145× 145×       145×                         24× 24× 24× 24×                 19× 19× 19× 19× 25×   19×                   22× 22× 22× 22×                                                     16×                                                                                   11×             41× 41× 41× 41×             136× 136×                         134× 134×         10× 10× 10× 10× 10×                                       16×                     14× 14× 14× 14×           14×     97×   73×         35× 35× 30× 30×           59× 59×                                         2394× 2394× 2394× 2394×       2394×                                                                           28× 14×     14×   28×   55× 55× 55× 55× 55×       55× 19×   55×   55×                                               316×   129× 129×   125× 125×   49× 49× 49× 49× 49×     338× 338× 338×   376× 376× 376× 376× 376× 376×   376× 376× 376× 376× 376× 376× 376× 376× 376× 376×   376× 376×   376× 376×     376× 376× 375×   375×     376× 376×                   55× 55× 36×   55× 55× 55× 55× 10×     54× 11×   55× 54× 54× 54×   55×   110× 110× 110× 110× 110× 110×   114× 114× 114× 111× 111× 111×           111× 111× 111× 73×   38× 38× 38× 38×       38×   38×     38×   38×   111× 111× 111×     110×   111× 10×     101×   111× 11×     100×                     376×       376×           376×   376× 25×     376× 376×     376×   14× 14× 11×                   145× 145× 145× 145× 145× 145× 145× 145× 142× 142× 142×   145× 142× 142× 142×       110× 110×   110× 110×   110×                                           14× 14× 14× 14× 28× 28×   28×   14× 14× 14× 14× 14× 14×                                                                             57× 57× 56×     57× 57× 57× 57× 13× 13× 13×     57× 57× 57× 57×       58× 58×     57×   58×   57× 57× 57×     57×                 57×             338×   145× 145× 145× 145× 141×   145× 142× 142×   145× 145× 145× 142× 142×     145× 145×   145×                       145× 145× 145× 145×                     54×       54×                                                                 145×   142× 142× 142× 142× 142×         142×   142× 142× 142× 142× 142×         142×                                                                         479× 10×   469×   464× 464×           469×     551×     551× 23× 23× 65× 25×     23×   551×                           259×   259×                                                                     353×                                                           376×     30× 30×   29×   346×                                                                                                                                                                               376×                                                                                                                                                                                                                                                                                 376×                                                   376×                                                                                                                                     376×                                                                 376× 376×   375×                     376×                                                                                                                                                                                                                                                                                                                                                                       134× 133× 133× 133×         76× 76×   55× 55× 55× 55× 20×               35×   19× 19× 19× 19× 19× 19×   101× 101× 99× 99× 99× 99× 99×     101×     682×   255× 255× 255× 134×   255×   99× 99× 99×       101×     85× 85×     85× 64× 64× 64× 18×   64×   64×     149× 149× 67× 67× 67×   82×                                                                                                                   11×   11×   11×     19845× 233× 233× 231×   233× 233× 233× 233×     233× 67×                                                                         22138× 22138× 22138× 22138× 22138× 22138×           22138×     22138×       62× 62×     22141× 22141× 22141× 177128× 177128× 11698×   177128×   22141× 22141×   22141×                           998×   997×   10×     33× 33× 33×         22×   41×   10×       10×   18×   10×   29× 29× 29× 29×     27× 27×   29×         238× 238× 238×         142× 142×   142× 142×   145× 145×   98× 98×   62× 62×   163× 163× 163× 163× 163× 163× 128×     84×     14× 14× 14× 14× 14× 14×     22×   14×   90× 90×     2087× 2087×   2087×       78182× 78182× 78182× 78182× 78182×                                                       12× 12× 12×                                                                                                                                                                                                                                               118× 118×                       16×     16× 16×                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     23× 21×                                               204×                                   156592× 47056×                                 159× 159×   158×   157×   156×   155×   154×   152×     152× 146×                 18× 18×   1612×     1612×     1765× 1765×                                           175× 175× 175× 175× 175× 175× 175× 175× 175× 175× 175×                   68×             113× 25×   88× 13×   75× 72× 72×     763× 763× 763×   763× 763× 763× 757×               18× 18× 18×                         394× 394× 394×                   44× 44× 44× 44×   20× 20× 20× 20× 20× 20× 20× 20× 20× 20× 20× 20×   100× 100× 100× 100× 100×                     92× 92×   91× 91× 91× 91×   89× 44× 11×     78× 78×           73×   68×   61×                                                       84× 84× 84×   81×   80× 18×   62× 62× 62× 62× 62× 62× 62×   61×   56×     56×   62×   56×                 25× 25× 25×             98× 98× 98×                                     8393×           10689×           2296×   2296× 18×   2278×   18×   2296×         763× 4578×   763×                                                         22×                                                                     50×                                                         15× 15× 932943×                                                                                                                                                                                                                                                       15×   23305× 23305×       12×                                                                         114× 40× 40× 57×       26053× 26053× 26053× 12×   26041×   26034× 12× 12×   26022× 2728×   26053×   26034× 26015×   19× 19×   13×   12×                     24× 28×     24× 28× 28× 56× 56× 56× 56× 28× 24×                   28× 56×         51× 51× 51×     51× 51×         28×                                                                                                         1008× 1008× 1008×   18× 18×   14× 14× 14× 14×   15× 15× 15×   15× 15×               7477× 7477× 590×     6887× 5069×     7477×   11× 11×           296× 126×   170× 170×       170×             241× 241× 241× 241× 241×   448× 448× 448× 448× 448× 448× 448× 448× 448×   233× 233× 233× 233× 233× 233×                               26×       26×       26×           26×       26×                   26×                           26× 26×           26×                   26×                             358988× 358988×                                         2260× 2260× 2260×           305× 304× 303×           305× 304× 303×   326×               636×   632×   623× 618×                 678×   675×   672× 59×   613×         18×           22× 22×                   10×                                                     301× 301× 301× 301×                                                                                         1470× 1470× 1470× 1470× 1470× 1470× 1470× 43× 43× 43× 31×   43×     41×   43×   1470× 1470× 1470× 1470× 1470× 1470×     1470× 1469×   1470× 1470× 1470×             1469×   1470× 1470× 1470×   1470× 1447× 1447× 1447× 1447× 1447×   1447× 1301×                                   13× 13× 13×   13×                                                       1470×         2894× 2866×         28× 28×         1447× 1447× 1447×     2951×         1470× 1470× 22×   22×       22×     1448×     1448× 1448×         1447×     98× 98× 96× 13×                 13×     96× 13×   96×           1447× 1349× 1349× 61×   1349×     98×     41×           1362× 1362× 1362×   1362× 51× 51×   1311×   1311×   1308×   1545×                 2916×   2918×                                                                                                                                                                                                                                                                                                                                                                                                                                                     21× 21×       21×                                           2536× 2536× 220309×     220309× 220143×   220309× 165× 219509× 635×                                           51494× 51494× 25747×         4862×                                                                         26× 26× 87× 26×   34× 28× 62× 34×     36× 34× 102× 66× 166× 166× 166× 166× 66× 34×       66× 34× 30× 26× 26× 26×   74× 166× 32×     225× 225× 225× 225×                                         225× 225× 225× 225×         225× 225× 225× 225× 225×   225×     225×     225× 225× 225×                                                                                                                                                                     403×                 24×                             24×                               11×                                                                     15× 558× 15×                                                                                                         10×                                           13×                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   264×   225×         86× 86×                   66× 66×       66×     19×       19× 19× 190×   19× 19×   19×     19×   18× 18×             28× 28× 28× 28× 62×   28×         28× 28×   28× 28×   26× 22×                                                                                                                                                                                                                                                                                                                                                                                               87×         67×               67×   255× 67×   255×   21× 21× 21× 62× 62× 98×   62× 62×   21×             11× 11× 33×   11× 11×       21× 21× 21× 29× 29× 86×   29× 29×   21×     20× 20× 20× 29× 29× 86×   29× 29×   20×     44× 44× 42×   44×   44× 44× 174×   44× 44× 44× 44×       15× 15× 45×   15× 15×   15× 15×       15× 15× 45×   15× 15×     15× 15×       15× 15× 45×   15× 15× 15× 15× 15× 15×                 70× 15×       15× 15× 45×   15× 15×       15× 15× 45×   15× 15× 15×                                     68× 68× 136× 68×     68× 68× 204× 136× 272× 272× 272× 272× 136× 68×       68×             136× 272× 68×                               68× 68× 68× 68× 136×   68× 68× 211× 16×         19×         195×     68× 68× 78× 78× 327× 311×   16× 16× 19×       78× 78×   68×   68×   68× 68× 68×         40×                       48× 47× 47×     49× 49× 47× 47×       49×   47× 47× 45× 45× 45×           44×     44×   45×         47×                                                                                                                                                                                                                                                                                                                                                                                 359458×                                                                                       89× 84× 173× 89×     89× 89× 267× 173× 364× 364× 364× 364× 173× 89×       102× 18× 18× 18× 18× 18×   173× 364× 84×                                                 132× 132× 132× 132× 132× 132× 132× 132×             132× 132× 132× 132× 132× 132× 132× 132× 132× 132× 132× 132× 132× 132×   132× 132× 132× 132×   130× 130×     130× 130×     130×   130× 130×     130×   132× 132× 132× 44×   132× 43×   132× 132× 132× 132× 10×     122×     10× 10× 18× 18×   10×       122× 122×                   132× 132× 132× 132×               132×       131× 120×                       73× 73× 73× 54×   73×   73×           78× 78×             95× 95×                     27× 27×   24×   23× 23×   23×     263×         263×                 10×                           90×   686×       686×   92×     92×   23× 23× 23× 41×   23× 23×   23× 23×   18× 18× 18× 18× 18× 18× 18×                   18× 18× 18× 36× 18×   18× 18× 18× 18× 18×         18× 18× 18× 18× 18× 18× 15×           44× 44× 44× 44×     43× 43× 43× 43× 43× 43× 43× 43× 43× 43× 43× 86× 43×   43× 43× 43×     43×   10× 10×   43×         43× 13×   30× 17×     17×   16×   44× 44×     10× 10×           14×         44×     44×             10×                   114×         30× 30× 30×         30×   27× 27× 27× 27× 27×     53×   44×           224× 224× 224× 224× 224× 10×   224× 10×   224× 10×   224× 10×       88×         44×           44×             23× 23×                   23×     18× 18× 18× 18×   132× 130× 130× 130×   132×   113×   132× 129×     132×       132× 132×   11× 11×           121× 121×     132×   132× 132× 132×                                                                                                 132×                                                                                             127×                     132×                                                                                                                                                       1087×                               3384×         3321× 369× 369×       53×   5688×                         14×                                         207×     207× 207×                   207× 41×   207×                       42× 11×                                 14× 14× 14×       14×                                                   14×                                           38× 38× 76× 38×     38× 38× 114× 76× 266× 266× 266× 266× 76× 38×   38×   114× 76× 38× 38×       152× 266× 38×                             160× 160× 160× 160× 160× 160× 160× 160× 160× 160× 160× 160× 160× 160× 160× 160× 160× 160×     160× 160× 160× 160× 160× 160× 160× 160× 160× 160× 160×       495×     109× 109× 109×           768×         56×     160×   151×       16×     263×   255×   252×           263× 263×           264×           56×         57×   49×   55×     55×   53× 53× 53× 53× 53×   52×   49× 49× 48× 48×       49× 49× 49× 49×   49× 30×             38×   38× 38× 152×   38× 38×   38× 38×   38× 38×   38× 38× 38×                         33×     30× 30×                                             17×     17× 170×                     16× 15× 15× 15× 15× 15×                             10×         50×                                                           2159× 2159× 2159×   38× 38× 30× 30×     38× 38× 30× 30×     35× 35×                             49× 49× 49× 49× 49× 49× 49× 49× 49×   49× 30×   49× 505×   505× 505× 458×   505× 50×   50×       49×     49× 49× 49×   49× 48×   49×   49×     107×   30× 30× 30×           30×   106×   160× 160× 160×   101×         160× 160× 160×   160× 160×     160×     55×   54× 54×   54×     49× 23× 23×   26× 26× 1650× 275×       275×   26× 26× 275× 275× 275×     26×   49× 42×   49× 45×     54× 54× 53×   54× 54×   45× 45× 45× 45× 45×         45×   42× 42× 42× 42× 42×         42×                                                                               113×                                                           160×                                                                                                                                                                                                                                                                                                                                                                               25× 25× 11× 11×   14× 14×   13×   32× 32× 23× 23×     34×   27×   36×                                                                                           41× 41×                                                                                             262× 13×                                                                                                                                                                                                                                                                                                                                                                                     9058× 9058× 9058× 9058× 1155×   7903× 6274× 6274× 6788×         39798×         1009× 1009× 1009×         18× 13×                           34× 34× 34×   34× 32×   34×         154× 27×   127× 113× 113×                   14× 14×     118× 104× 104× 142× 142× 142× 142×       104×   14×         2618× 524×   2094× 2094×   274×         43× 397× 43× 88×   43× 72× 43× 59×   72×                     33× 33× 33× 48×               49×   43× 43×     11×             49×   43× 43×               7740× 2258×   5482× 6040×   127×   1056× 1056× 1056× 1056×   1056× 1056× 231× 231×   825× 820× 767×         1056× 1056×         1059× 42× 42× 42× 37× 37× 37× 37×         1017× 246×   771× 771×     58× 22×   36× 43×       136× 50×   86× 98×     48× 20×   28×     18× 18× 18× 18× 18×                                     400×   50× 50× 50× 50× 50× 50×   350×   350× 347× 347×                 564× 564× 564× 564× 2815× 2815×             2815×   564×   2817× 2817×   388×                                 12× 21× 21× 21× 21×         21×     53× 53× 53× 53×                               347× 347× 347× 347× 347× 347× 347× 347× 347× 347× 347× 347×     636×                 49× 49×           92×       92×                                                             49× 49× 49× 49× 49× 49×     49× 49×   49× 49×           49× 49×   48×   48×     48× 48× 23×   48× 48× 48×   11× 11× 11×       11×     11× 11×       11× 11× 11× 11×           11× 11×             11×   11×           11× 11× 11×           11× 11× 11× 11×   11×                             48×           48× 48×                                                                                                                 57× 57× 57× 57×   57× 57×         57×         57× 57×         57× 57×       57× 57×     57×                         10×     10× 10×     348×   340×   347× 347×   338× 338×   49× 46×             10× 10×       57×   50×   47×   49× 46× 46×     16× 16× 16×     11×   10× 10×   10× 10× 10×   27×                           27× 27× 19×   27×   92×         92× 92×   49×   57×   57×   48×   11×       11×     11×                                                                               23×         23×   48× 48×   48× 47×       48× 47×       48×                                             17× 17× 17× 17× 17× 17×   17× 17×   17× 17×   17×     17× 12×               15× 15× 15×   15× 12×                     15×   15× 13×                               130×           807×                                                                                                                   490× 490× 490× 490× 490× 490× 490× 490×                 453×           58×           24× 24× 24× 22×   24×         10× 10× 10×   10×           41×           66×   490× 490× 490× 490× 490× 490× 490×   490× 203×   287× 287× 287× 287× 287×   490×   201× 201×       289× 289×     377× 177×   200× 200× 200×                         349× 349× 75×   274×                                                                                             20× 20×                                                                       54× 54×       54× 54× 54× 52×   54× 18× 18×               54× 53× 53× 53× 53×         53×   54× 54× 54×                     3804× 3804× 3804× 3804×   3803× 3803× 3803× 3803× 328× 328× 328× 328× 119× 119× 25× 25× 25× 25×   23×   16×   12×     12×     119×     321×   318× 318× 318× 99×   318× 99×   318× 318× 318× 318×   3803× 3767×   3803×   126× 126× 126× 126× 126× 126× 345× 340× 340× 340×   345× 345× 345× 345× 345×   126× 118× 118×   126×     803× 803× 803×                 27×                                                           459× 459× 459×   340× 340× 340×   799× 799×                   286× 286× 286×           180×     56×           18× 18× 18× 18×   13×           17×           17×         18× 18×   18× 18×   18× 18×                                                   34794× 34794×           816× 816×           248×                   163× 163× 163× 163× 163× 163×                 14× 14× 14× 14× 14×           322× 322× 322× 46×             33×             28639× 28639× 28129×   510× 462×   48× 48×                 10×             1359× 1359× 3366×   1359× 1359× 3366×   1359×             10× 10× 19×   19× 10× 10×   12×   10×                       187× 187×       187× 187×   115× 115× 115× 115× 115× 49×   115×   31× 31× 27× 27×   24×   18× 16×   27× 25×     31×   302×       302×     115× 115× 115× 115× 115× 115× 115× 115× 133× 133× 49× 49×     84× 84× 66× 66×       115×   49× 49× 49×   47×     43× 43×           49×   49×   47×   45×     41×     50×   48×   50×   48× 48× 48× 48×   47×   47×   47×   45×     47× 47× 47×   45× 45× 45×   25× 55×   25×                                                                                                                                                 343× 343×   343× 343× 343×       343× 342× 342× 342×       343× 339× 339× 338×   339×   343×   14× 14× 14×         14× 14×   13× 13×               340× 340×   335×                             12× 12× 12× 12× 12× 12×         12× 12× 21× 21× 21× 21×                       12×           37×                             164× 31×   133×   130×   130×       23× 23× 23× 23×   22×     21× 21× 21× 21×     23×         32× 32×       25×     25× 50× 19×     31×     25×         182× 167×   15×                                             150× 150× 150× 150× 150× 150× 150× 150× 150× 150×                   68×           163×           31×               159× 159×           11×           17× 17× 45× 16×       175× 175× 175× 20×     150× 150×     150× 131×   150× 150× 449×   150×   150× 150× 150× 449×   150×   449× 449× 449× 449× 449× 449×   150× 150×                         40×   30×   22×   16×       21×     32×                                         5968×                                 757×   20× 20× 20×         383× 383×     383× 383×           20× 20× 20× 20×                     423×       228× 228×           22× 22×       71× 71×                                                                                                             1453× 1453× 1453× 1453× 1453× 1453× 1453×         11× 11×           3987×           102×           29×         24× 24× 24× 17×             71× 71× 71× 71× 70× 70×             1985×             1453× 1453×     1453×             1453×             1453× 1453× 1453× 1453× 1453× 1453× 1453× 1453× 1453×   1453× 111× 111× 77×     34×     1453×   111×                           48× 48× 48× 48× 48× 48× 48× 48× 48× 48× 48×       11× 11×         11× 11× 11× 11× 11× 11×   11× 11× 11×   11×       25×         11×                         11×     14×         11× 11× 22×                                                                                                                                                       10× 10× 10× 10×           10×                                                                                                       174×     82×                     82×                                                                                     17× 17× 17×     82×                                                                   281×                                             47×   47× 47×     47× 47× 47× 47× 47×     47×         281×                   178544× 178544×                                                         639694× 639694× 639694× 513365× 379683×     126329× 126329× 190678×     639684×                                   57×   35× 35× 35×   35× 35× 35× 35×   35× 33× 33×     33×     35×   230× 230×   269× 269× 269×           269× 269× 269× 269× 269× 269×     269×   269× 269× 506× 478×   28×     269× 269× 269× 145× 166× 166× 166×   145×   269× 95× 95× 489× 489× 489× 489× 469× 217×     272×   95×   269×   499× 364×   135×   4411×   4343×   4292× 51×   4292×   4292× 119×   4292×   683×   166× 166×     166× 166× 166×   158×   157× 157× 157×   1073× 1073× 4292× 4292×   1073×   429× 429×   721× 497×   224×                                                                                                                                                                                             9069× 9069×         9069× 9069× 9069× 9069× 9069×                       90×             63×   29019× 29019× 29019× 29019× 29019× 29019×   521×   282121× 282121×   117× 117×   31519× 31519× 10286×   31519×   595×                     10× 10×                                                                                                   17×                                                         62× 62× 62× 62× 62× 62× 62× 62× 62×   17× 17×   17×   14× 14×     14×     51× 51× 51× 51× 51×   51× 51×     46×   51× 51×     51×                     51×     51×             51×   45× 45×             45× 12×   33× 10×     23×   45× 45× 45× 45× 45× 45× 45× 45× 45×   14×     51×         51×   15×                                                                                                                                                                                     27×                                                                                                                                                                                                                                   88× 88× 88× 88× 88×     88× 88× 88× 88×               88× 88× 88×   88× 88× 88×   88×     88×     88×   88×     88×               13× 13× 13× 13×             22× 22×                                                                                 37× 37× 37× 37× 37×   17× 17× 17× 10× 10×           77×                                                                                                                                                                                                                                                                                                                                     4655× 4655× 4655× 4655× 4655× 4655× 4655× 4655× 4655× 4655× 4655×     3805×           5598×           56×   53×   734× 734×                       2495×           1247× 1247×           26×           13×                                                                       1234× 1234×     1322× 88×   1234×                                                                                           239×   102× 102×                                                                                                 4431× 4431× 4431× 4431× 20457× 20457×             20457×   4431×   43× 43× 43× 43× 43× 43× 43×                   43×   176×   176× 173× 173×           175×                         1981× 1981× 1981× 1981× 6254×   1981×                             220255× 220255× 750× 219505×     220255× 220255× 220380× 220380×   219517× 175× 175×   219342× 219342×   863× 863×     220255×                           18147× 18147×     18147× 336738× 336738×   18147×                                               1003× 1003× 1003× 1003×                             301×                                             25× 25× 25× 23×   10×                                                                       17× 17× 34× 17×     17× 17× 51× 34× 102× 102× 102× 102× 34× 17×       51× 34× 17× 17× 17× 17×   51× 102× 17×                                     123× 123× 123× 123× 123×   90× 90× 90× 90× 89×   58×   50× 50× 50× 50× 10× 10×         40×     46×     46×           17× 17× 16× 16× 15×     17× 17× 17× 17× 17× 17× 17×   17× 17×   17× 17× 17× 51×   17× 17×   17× 17× 17× 17×                 17× 17×                                 136× 136×   136×   135× 31×     104×                           43×     43×     43×     43×   43× 43×     36×   43×   856× 182×   674× 53×         52×                                       231× 231× 231× 231× 231× 231× 231× 231×       13× 13× 13× 13× 11× 16× 16×         11×   78× 78×     234× 234× 234× 88×             88×   86× 86× 86× 63×     234× 15× 15× 15× 33× 33× 15×   33× 33× 15×   33× 18×     15× 15× 15× 14×     234×       99×     99×     99× 99× 99× 99× 99×       13× 13× 13×                                   61× 61× 61× 61× 61×                   53×           21×   15× 15×           21×   15×             19× 19× 19×             61× 61× 61× 61×     19× 19×                                                     17× 17×             37× 37× 37× 37×             143×           37× 37× 37×                                         162× 162× 162× 162× 162× 162× 162×                           44× 44× 44× 44× 42×                       150×             90×           203×           65×   162× 162× 162× 162× 162× 162×     162× 162× 162×                                           52× 52× 52× 52× 52× 52× 52× 52×                             46×                                 13×                 16×   16×   16× 16×             52× 52×         52× 52× 52× 52× 52× 52× 52× 52× 52× 52×   52× 52× 52×   52× 52×   52× 52×           58×                                   233× 233× 233× 233× 233× 233×         56×           195×                               11×         11×     11×           11×   25×     25× 25×   36× 36× 36×       11× 11×           36×   11×     11× 11×   36× 36× 11×   36× 36×     70×         36× 36× 36× 36× 36×   36× 36×   11× 11× 11×                         26×                               30×   754×                             192× 192× 192× 192× 192× 192× 192× 192×                 192× 3028×   192× 3028× 192×     201×           201×                 201×         19×             42× 42× 42× 42× 42× 42× 42× 42× 42× 42×           31× 31× 31× 31× 31× 31× 26×   19×         19× 19× 19× 19×                       12×     190×                       315×         26×   37×                                                     12× 12× 12× 12× 11×     18×   30×   20×     103×           51×             201× 201× 201× 201×         3028× 34×                       85× 12× 12×   85×       85×   10×   19× 19× 19× 17× 17× 17× 17× 17×   17× 17× 17×                 17× 17× 17× 17×   17× 17×     17× 170×   17× 170×   17×       17×   17× 170× 170× 170× 170×                                     12× 12× 12× 12×   19×   18× 18× 18×   17×   17× 17×                                                                                                                                                             12× 12×                                                                                                                                         220× 220× 220× 220×   220× 220× 836×     836×     836×   3474×   361×   844× 844×     844× 345×   499× 364×   433× 426×         345× 345× 911×   737× 737× 737×       174×     345×     339×     345× 345× 345× 345× 911× 911×   345×                     1105×   274× 274× 274× 274× 274× 274× 274×   274× 274×           274×   265× 265×   265× 265× 265× 265×   520×   274×           274× 274× 274× 274×   432×   29× 29× 29×   165× 165×                                                                                               112×     110× 110×   110×         44× 44× 44× 44× 44× 2625×           44×   88× 11×                     53× 53× 120× 120× 102×   120×     111× 208× 84× 84×   208× 208×     208× 208× 208×     208×   111× 104×     104×       111× 111× 111×     111× 104×                         10822×                                           15331× 13071× 101434×   13071× 13071×                           10324×                       1005348×                                                       227290× 227290× 227290× 128607×   227290×                           199934× 199934× 199934×                                                         380× 380×             380× 380×   48× 48×   202× 199× 199×           37×                     53×               53× 53×   53× 53×   53× 53× 53× 53× 53× 53× 53×                                         53× 53× 53× 53×       53× 53× 126× 53× 53× 53× 79×   53× 11×   42× 11×     31×                       73× 35× 35× 30×         38× 35× 35× 35×                       24× 24×     35×   35× 30×           53× 53× 11×   53×                                                                                                                                           53× 53× 53×   106× 106×   30×     29×     29×       29× 29×           53×             53×   71×   28× 23× 15× 15×                       30×     29×     53× 53× 34×   19×   53× 10×   43× 11×     32×   43×                     45× 45× 41×         61×   24×   16×                       37× 37× 37×                     16× 19× 16×     16× 16× 48× 19× 67× 67× 67× 67× 19×       45× 29× 29× 16× 16× 16×   32× 67× 16×       248× 248× 248× 248× 248× 248× 248×     14× 14×   16× 16× 16× 32×   16× 16× 16×   16× 16×     13× 13×       13× 13×   13×           308×   16×   14×     17× 17×                         42× 42×   42×                                                 42× 42× 42×   37×   16× 16× 12×   16×       37×                                       12× 24× 24× 24× 24×       11×   13× 24×     92× 92× 92×     92× 92×   85× 12×   73× 73×                                                     13×                                                                                                                                                                                     64×                   64× 61× 61× 61×     125×   64× 61×   61×   61×   61× 27× 27× 27×                               10×                                                 146×   146× 146×   801× 801× 801× 801× 801×     801×   801×     796×       798×         798× 798× 798×     798× 798× 798× 798×                                                                                                                                 53× 53× 53× 53× 51× 51×   53×                                               53×                   53×                                                                 11×   11×       11×                                                                     79× 79× 79× 79× 79× 79× 79× 79×           79× 79×     79× 79× 79× 79× 79× 79×       79×           79× 79× 79× 79×   79× 79×                                                                                                                                                                                                                                                                                                                                                       80×           79× 79×     80× 80× 80× 80× 80× 77×         80× 80×           80×       80×     79× 79× 78×     79×     78× 78× 78×   78× 77×       388×                                                                                                                                                           79× 76×                                                                                                                                                                                                                                                                                     36× 36× 36× 36× 36× 36× 36× 36× 36× 36× 13×   36× 36× 36× 36× 36× 36× 36× 36×     44× 20×   24×         16× 16×   39× 39×     18× 18× 18× 18×   18× 18× 18×   26× 26× 28×   26× 26× 26× 26× 26×   14×   15×   36× 36×           36×       36× 36×       18× 10× 10× 10× 10×     18×   26×   26×   12× 12× 12×     36× 36× 36×         36× 36×   36× 36× 36× 36×                                                                                       194× 194× 520×     520× 520× 520× 520×                                                                     6345× 6345×                   7576×       7576× 7576×                   2985×     2985×                     4780× 1306×     3474×     810×             2664×         2664×       2664×                     17560×     17560× 17477×   83×                   1861×       1861×     1861×   1861× 1138×     1861×   1861× 1861×                       675×   675×     675×                   2799× 861×     1938×                       2613× 969×       1644× 1644× 1644×     1644× 1644× 1644× 1644×       1644× 675×       675×       969× 969×     969×                       974×   974× 974×   974× 974× 974× 974×                                                                         5974× 5974×   5974×     6616×     3308× 3308× 3308×   3308×           194×                             2386×               2386×     2386×                                             15516×                         3965×         3965× 3965×                 3965×       3965×               3965× 3965× 3965×   3965× 3965×       3965× 2987× 2987× 2987×   2987× 2987×     3965×     1727×   1727× 1727× 1727× 1727× 1727×   1727× 1727× 1727×     1727×       1727×           1727× 1727×           1727× 1668× 1668×   1668× 1668× 1668× 1668×     1668× 1668×     1727×       1727×     511×   511× 511× 511× 511×   511× 511×   511×             511×                     321× 321× 321×                                 83×     83× 83×     83×                           1022×       1022× 1022×     1022× 511×     511× 511× 321× 321× 321×   190×     190×     511×     511× 321×       321× 321× 321× 321×     190×         1022× 1022× 1022× 1022×   1022×                                   705×   705× 705×                                                                                                                 705×   705× 705×                   626× 626× 626× 626×       626×                   1531× 1531× 1531×                           511×     511×     511×           511× 511× 511× 511× 511×   511× 511×   509×     511×                         2189× 2189×                                                                               511×   511× 5110×       5110× 5110×       4599× 4599×   4599×       511×                     520×     511×                   511×         511×     511×   511×     511×   511×     511×       511× 191× 191×   320×                   514× 5140×   5140×                     1025× 1025×   1025× 1025× 1025× 1025× 1025×                                                     68× 68×     68× 68× 68×   68×     68×                   68× 68×     68× 68× 68× 68×   68×                 68× 68×                                                                                         2053×                     820× 2955×   2955× 974×   2955×                       511× 1022× 1022× 883×   139×                                   511×       511×     511× 115×     511×                           194×         194×   194×       194×   194×                   511×   511×       511× 5110×   511×     511×   511× 511×     511×             511×             511× 511×         511×                     511×   511×     511×   511×     511×   511× 487× 487× 487× 487×     24× 24× 24× 24× 24×       511×         511× 511× 511×   511×                         1022× 6643× 6643×     1022× 3577×     1022×         1022×                   511×     511×       511×     511× 396×     396× 396×         115×           115× 115×       115×   115× 115× 115× 115× 115× 115×               115×       115×     115×     115×       115× 115× 115× 115×     115×   115× 115×   115×                                                                                                                                                                   511×       511×         511×   511× 511× 511×   511×   511×   511× 511×                     511× 1022× 511×     511× 511×   511× 511×     511× 511×   511× 511× 511× 511×   511×     511× 511×   511×                                         511×                   511×       511× 511× 511× 511× 511× 511×   511×     511×       511×                               290× 290× 290×     290× 145×     145×                           145×                       145×                             145×         145×       145× 145×         145× 145×     145×           145× 145×     145×   290× 290× 290×       290×       290×         290×         290×         145× 290× 290× 290×       145×                       511× 511×         511×   511× 511× 366×   145×     511× 510× 509× 508× 508× 508×     511× 511×                   511×         511×             511× 511× 511×       511× 511× 511×   511×       511× 511× 511×   511×   511× 511×   511×   1022× 1022× 342×   1022×     1022× 1022× 1022×     1022×       511× 2044× 2044×     511×   511×                   511× 511× 511×     511× 56×       56× 56× 56×   56×         56×     511×                   511×       511× 511× 1533×     511×   372×       372× 372×     139×       139× 139×     511×                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 194×   194× 194×   194× 304×       194×     194×     194×             194× 194×     194× 194× 1940×       194× 1940×           1746×             194× 1940× 194×         194×   194× 194×   68×     194×                 520×                 68×                                                                                                                                   80× 80×       80× 80×                                                   26× 14×   26× 26×                                     124× 124× 124× 124× 124× 124× 124× 28×   124× 124× 124× 88×   36× 36×   124×   88× 88× 88×   82× 12×         78× 78×   88×   88× 88×               210× 210×     210×             106× 106× 106×   11× 11× 10×       11× 11×   11×     106×     101×   106× 106×   93×   28× 28× 28× 28× 728× 728× 728× 728×       28× 360×     10× 10×     10×   11×           11×   10×     88× 88× 98× 98× 98× 10×               106×   106×     100×   222× 222×   25× 222× 222×     222×     10×             106× 106× 106× 97×                                                                                     124×                                                                                                                                                                                                                                             414×         58× 58× 58×           57× 57× 57× 57× 46×       89×     57× 57× 18×   57× 20×   57×           84× 84× 84× 84× 84× 35× 35× 35× 35× 35× 35× 35×     49× 49× 49× 49× 49×   84× 84× 84×               16× 16×   16× 16× 16×               16× 16× 16×         36× 36× 36×                                                           81×   79×         74×     85× 85× 85×     85×             85×   85× 82×   85×             85×   51× 51× 50× 50× 28×   22×       23×     98×               10× 56×   10×   12×     10×     10×   84× 84× 30×     54×   84× 14×   84× 84× 49×   35×   84×   80× 30×   50×   84×   30× 30× 30× 30× 22×     30×   14× 11×   14× 12×     12×       14× 10×   14×   10× 10× 10× 10× 10× 10×   84×     336× 289×       84×     84×   36× 36× 36×     20×   56× 56× 90× 90× 90×         90×           90×                     1246× 1246× 1246× 1246× 67×     67× 67× 67× 67× 67×     19× 19×     2097× 2097×   3290× 3290×   57× 57× 57×   51×   51× 51×   30× 30×   53× 53×     485×         148× 439× 148×       148×     337× 1605×         330× 330× 38× 38× 17× 17×   21× 21×                                                     692× 692× 692× 692× 692×   692×                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 364× 364× 364× 364× 339×   360× 327×     33×     327×         339×         422×   360×     355× 355× 355× 355× 365× 365×       709×           216×                 49×           18× 16×             368×   376×               69×                                                                                                 124× 124× 124× 124× 124× 124× 124× 124× 124× 124× 124× 124× 124× 124× 124× 124× 124× 124× 124×   124×   124×                 124× 124×               12× 12× 12× 12×   12×           87×           37× 37×                             24×     124× 124×               118×   124×     124×           124× 124×           124× 124× 124×   124×   124× 124×         124×               124×     22× 16×   22× 22× 22×     124×   124×                   124×   124× 124×                                 124×         124×       124×     124×                                                                                                                                                   14× 14× 13×       13× 13× 11×   13×         13× 13×         16× 16× 16× 16× 16× 16×     16×     16×                   16× 16× 16×   16× 16×     23× 23×                                                                           18× 18× 18× 18× 18×             68×   59× 38×   21× 21×     21× 21× 16×       21×     21×   16× 16×     16×   68×       13× 13×                                                   172×   31× 31×     31×                 12× 12×                                                                                                                                   139×   139×                                                                     139×   139×                                                                                                                                                                         79× 79× 79× 14×   79× 79×     79×                                                                                                                                             42× 42× 42× 42× 42× 42× 42× 42× 42× 35×     42× 42× 38×   42× 11×   42× 42× 42× 42×     42× 42×                   12×   11×                         38× 38×   38×         38× 38× 38× 38× 38× 38×       38× 38×                 38×   38×         38× 38×   11×     10×                               42× 42× 42× 42× 42× 42× 42× 42× 42× 42×   420× 4578×   420× 4578×     42× 42× 42× 42× 210× 210× 210× 2520× 2520×     42×   35× 35× 34× 34×   35× 35×                                                                                                                                                 42× 38×                                                                                     35×                                                                     56× 56× 56× 56× 56× 56× 56× 56× 56× 56× 56× 56× 56× 56×                                                                           13× 11× 10× 10× 10× 10×           10×     10×                                   20× 20×   20× 20× 20× 20×                   10× 14× 10×                   32× 32× 32× 68× 66× 31× 65× 31×       65× 65×     65× 65× 65× 65× 65× 65× 65×           65× 65× 65× 65× 65×                   11×   10×   43× 86×     27×                                                                                                                                                                                                     47× 47× 47× 47× 47× 47× 47× 33×   47×           47× 47× 47×               22× 22×       22×   22× 22×     22×                 66× 66× 66× 66× 66×       47× 47×   47× 47× 46× 46× 46×     36× 36× 24× 24×         24×   24×   24×       33× 33× 26× 26× 26×             73× 73×   26× 26× 26× 26× 66× 31× 31×     35× 35×     26× 31× 35×     132× 72×     66×     66× 66× 72× 72× 36× 16×     20×       66× 66×                                                                                                                                                                                                                                                                                                                       558× 558×         558× 558×   373× 2017×     561×     275×           29×           1182× 80× 80×             119× 31× 31×             671×           4925×           1232×           25×                   33×               433×                 186× 728× 186× 142×   44× 44×   40× 40×                             82× 82×             82×     339× 339×         369× 30×   339×   339× 82×     369× 351×   18× 18×         369× 369× 369× 1321×   369× 369× 369× 369×                                   706×   276×     294× 294×                                 12× 12× 24× 12×     12× 12× 36× 24× 48× 48× 48× 48× 24× 12×       12×             24× 48× 12×     271× 271×       271× 271× 271×       271× 271× 271×   271× 271× 271× 271×   271× 271×   271× 271× 271× 271×   298×   271× 271×                         107×   62× 60× 60×         12× 12× 12× 24×   12× 12× 12×   12× 12× 12× 12× 12×   12×                                                       110×                   129× 138×         138× 540× 540×                             25×                                                                       1923× 1923× 9954×                                   8764× 8764× 8764× 9394×   8764× 8764×                             149× 149× 149× 734× 734×   149×                       265973× 453×   265520×   17× 17× 17×                               23× 23× 23× 23× 23× 23× 23×                           12×                                                                           280×                                                             27× 27× 27× 27× 27× 27× 27× 27× 14× 14× 14×   27× 20× 20×   27× 295× 295×   27× 27× 27×     90×           8508×     15×                           19× 19× 19× 19× 19× 19× 19× 19×               19×             298× 298× 298×           20× 20× 20× 15× 15× 15× 15× 15×   15×     312× 312× 312× 312× 312× 4238× 4238× 4238× 12×     312× 312×   4238× 4238× 4238× 4238× 4238×       4238× 3941×   4238×                                                                                                                   65× 33× 33× 33×             18× 18×                                   256× 256× 231× 25× 25× 25×     22× 23× 22× 22× 22×       25×   25×   22×   22×                                           318× 318× 318× 318× 318× 318× 318× 318×         318× 318×   318× 318× 318× 318× 318× 318×                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       66× 66×                                                                                 19× 152×                 152× 19× 19× 152× 152×   19× 19× 19×   46× 46× 46× 46× 45× 45× 45× 45× 45× 45× 45× 45×               81× 81× 81× 81× 81× 81× 693× 693× 693× 693× 693×               45× 45× 45× 36× 36× 36× 36×               36× 36×                   45× 45× 45× 45× 14×       14×   45×                     23× 23× 23× 23× 23× 23× 23×   22× 22×                             23×   23× 23× 23× 23× 23× 23× 21×                   23×                                                                                                                                   12× 12× 12×           12×                                                                 12× 20×     12× 24× 20× 46× 46× 46× 46× 20× 12×       14×           26× 46×       16×                                                                                                                                                                                                             13× 13× 13× 456× 456× 516× 516×               456× 456×     17× 17× 17×   17×     50×     50×     50×     50×     50×       17×   17× 49× 49× 49× 49×     49×     49×     49×       49×       16×                     118× 118× 118× 118× 118× 118× 118× 118× 118× 118× 118× 118× 118× 118× 118× 118× 118× 118× 118× 118× 118×                                               15× 15×             18×                                                           14× 14× 14×       14× 14× 14× 14× 14× 14×       14× 14×       31× 18×     13×                   35×                                       18×                                                                               48×           37× 37× 37× 37× 12× 12× 12×   37×   17×     48× 48× 48×   48×   31×           35× 35× 35×             35×         35× 35× 35× 35× 35× 35×         35× 35×       35× 35× 35×       35×   35×                                   25× 24× 50× 25×     26× 25× 75× 50× 151× 151× 151× 151× 50× 25×       76× 51× 26× 25× 25× 25×   76× 151× 25×     21× 21× 21× 21× 21× 21× 21× 21× 21× 21× 21× 21× 21× 21× 27×   21×                     31× 18× 18× 18×     25× 25×         25× 25× 25× 25×     25× 24×   25× 25× 25×   25× 25× 25× 76×   25× 25×   25× 24× 24× 24× 24× 24× 24× 24× 24×   24×     25× 25× 25× 14×   25×         14× 14× 14× 14× 14× 14× 14× 14×   14× 24×   14×     14× 14× 24×                 24× 24× 24× 24× 24× 24× 24× 24×   24× 24× 24× 24× 24× 24× 24× 24× 24× 24× 24×       24×   24×                         70× 70× 70× 70× 70×   10×   15×                           105× 105×   105× 105× 105× 105× 105× 105×           22× 22×                                                                                   49× 49× 49× 49× 49× 49× 49× 49× 49× 49× 49× 49×   1270× 1270× 1242×   28× 28×   1270× 1270× 1242×   1270×     258×           209× 209× 136× 136×           73×         25× 25× 25×     23× 17×     23×     15×       37× 17×     20×       18×           17× 17× 17× 17×     49× 49× 49× 49× 13×   49× 13×   49×   49× 49× 49× 49× 49× 49× 49× 49× 13×   36×   49× 49× 49× 49× 49× 49×   49× 49×   49×   49× 49× 49× 49×   49× 49×             49× 49× 15× 15×           17×         49× 49×           49× 49×   49×                                 176× 176× 176×   177×     177×   177× 177× 177× 177× 177×     177× 177× 177× 151× 151× 151×   177× 143× 143×   34×   177× 177×                           120×       10× 10× 10×   10×             177× 177× 177× 177×   161× 161× 161× 161× 161×       161× 161×       161×                             177× 177× 177× 177× 177× 177×   177× 177× 177× 177×       177×                               757× 757×   39× 38× 76× 38×             39×   767× 767× 767× 767× 767× 767×   881× 881×     864×         767× 767×             767× 767× 767× 767× 767×                 767×         767× 767× 767× 767×   767×       767× 767× 767× 767×                                               767×         767× 767×   767× 565×     565× 565×     202×       4602×           7468×         1534× 1534× 1534×   767× 767× 767×   767×   767× 767× 767× 767×   767× 767× 767×   767× 767×     767×       767× 765×         767× 767× 767× 767× 767× 767×   767× 767×   767× 767×   767× 767× 202×   565×   767× 767×   767× 767× 767× 767×     2301× 2301×           767× 32×   735×                           107× 107×   48× 29× 25×       19×   60×   59×     89×           63×         171× 31×     90× 348×     90× 69×   90×   31× 31× 31×   13×                                               15× 14× 14× 14× 14×                   14×     170×   60× 60× 60× 60×                     20×   16×                       60×   60× 37×         60×             60×                                 10× 10× 10×       10×                                             17× 17×   17× 17× 170×       17× 170× 170× 170× 170×                                     199× 199× 199× 199× 3380× 199× 199× 199×     3401×     309×           55×                 201× 201× 201× 201× 190× 190× 185×     201× 44× 44×   201× 199× 199×   201× 201× 201× 201× 201×   201× 201× 201× 190× 190× 370×   190×     11×   201×                                                         3401× 3348×   53× 53×         55× 55× 55× 55× 55× 53× 53×   55× 34×   55× 165× 48×     117×     55× 55× 53×     167× 344×               201× 201× 201× 201× 201× 201× 201×         402× 402× 402× 402× 402× 402×     201× 201× 201× 201×         190× 190× 190× 190× 190× 190× 190× 190× 190× 544×   190× 190× 190×   190× 190× 729× 185×     544× 544× 544×   11×     544×     190× 190×   12× 12× 12×                   190× 190× 729×   190× 376×   190×   185× 185× 185× 185× 185× 185× 185× 185× 185× 185×         185× 185× 185× 185× 185× 185× 185× 185×       185× 185× 171× 171×     14×   185×   44× 44× 44× 44× 44× 44× 44× 44× 44× 44× 44× 44× 44× 44× 44× 44×         44×   44× 44× 44× 44× 44× 44× 44× 44× 44×         44×   199× 199× 199× 199× 199× 199× 199× 199× 199×           199×   199× 199× 199× 199× 199× 199× 199× 199× 199×               199×   1046× 1046× 1046× 1046×           370× 370× 370× 370×   370×   1356× 1356×         1046× 1046× 1046×   1046× 1046× 1046×     11× 11× 11×       11× 11× 11×                                               201× 201×   201× 3380×   16×             16× 16× 16×         427×   405× 425×   82× 82× 82×     542× 496× 496×     199× 199× 721× 372× 197× 183× 183×           1174× 856×                                                                                                                 42× 42× 42× 42× 42× 42× 42× 42× 42×   38×   35×   36×   42×                       35× 35× 18×   17×   45× 45× 26×   19×         34× 34×   32× 32×               32×                                                                                                                                                                           54× 54× 54× 54× 54× 54× 54× 54× 54× 54× 54×     54× 54× 54× 54× 54× 54× 54×     54×         22×               22×                                                                                 221×           45× 45× 28×   17×   45× 32×     13×             78×   54×       54× 47×         54× 54× 54× 54× 54× 54×   54× 54×               54× 54×   54× 54×   54× 54× 54×       21×                                                                                     18× 18× 18×   54× 54× 54× 54× 54×           18× 18×     18×     18× 18×     18×     18×     18×         18× 18× 18×   21× 21× 21× 21× 16× 16× 16×       21× 21×   21× 21× 21× 21× 21× 21×                                                                             18× 18× 18× 18× 18× 18× 18×   17×       18× 18× 18× 18×                                                 32×   28×                         28× 28× 28× 28×   28× 28× 28×   28×       26×     25× 25× 18× 18×   18× 14×   18× 18× 18× 18×       18× 18×       18× 18× 18× 18× 18× 18×   18×       18× 18× 18× 18× 18× 18× 18×     36×   18× 14×   18× 14×     18× 18×   17× 17× 17× 17×   14× 14× 10×               22× 22×   21× 21× 21×     21×         35× 18× 18×         35× 18× 18×             40×   64× 64×         64× 64× 26×     38× 38×   64× 44×     20×   64× 20×           21× 16×                         46×                                                           54×                                                                                                                                                                                                                                                                                                                                                                                                                                                       12× 48×   48×                 19× 19×                                                           82×                                                                                             25× 25× 25×                                           25×   25×   25×                   25×     20×   20×         20×                     12×                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     114× 114× 114× 114× 114× 114× 114× 114× 112×     114×   112× 112×             112×   119× 119× 119× 119×     119× 119× 119×                   119× 119× 119× 116×     116× 116×   119×             119×   119×   119×   119×     119×     119×                                                                                                                                                 174× 174×     858× 858×     858×   857×                         36× 21× 36×     36× 36× 108× 37× 74× 74× 74× 74× 37×       36×             37× 74× 36×     216× 216× 216× 216× 216× 216× 216×   216× 216× 89×   216× 216× 216× 216× 209× 209× 209×   216×                     216×   216× 216×     216× 216× 216× 216× 216×         216× 216×                         32×   73× 73× 73× 73× 73×       38×   12×   216× 216×     216×   216×                                       216×     216×                                                                                             12×   35× 35× 35× 35× 35× 19×                     452×   46×           212×                             336× 257× 593× 336×     336× 336× 1008× 593× 1270× 1270× 1270× 1270× 593× 324×       353× 84×           677× 1270× 269×       276× 276× 276× 276× 276× 276× 276× 276×         276× 114×   276×   276×     276× 276×       276× 276× 276× 276×     293×                                   56× 56× 69×           13× 13× 13× 12×                         29× 29× 51× 29×   22× 22×         16×           12×           10× 10× 20× 10×   10× 10×         18× 18× 11×     11× 11×   18×     35× 35× 35× 70× 35×   35× 35×     35× 35×         35×   97× 97× 97× 97× 97× 97× 97× 97× 37× 37× 37×   60× 34×   94× 94× 94× 94× 94× 94× 94×   60× 60×     15× 13×           43× 43× 75×   43× 43× 43×   32× 32×         12× 12×   13× 13× 13×   276×             67× 67×     67× 67×     67×     67×       67× 64× 64×                             313×     27× 27× 27× 27×   55× 55× 55× 139×   55×     46×     40×   31× 31×         40× 40× 40× 71×   40× 40× 40× 40× 40× 40×   31× 31×         43× 43× 107×   43× 43×   32× 32×         32×         16×               13× 13×     13×     13× 13×             68× 68× 31× 31×   68× 68×   56× 56× 100×   56×     56×   44× 44×         91× 91×   159× 158× 158×     276× 276×   276× 276× 276×   276× 276× 276× 276× 276×   15× 15×                                                             17× 17× 17× 17× 17× 17× 17× 17×                   17×     17×     17×                                                                                                                                                                             18×     20× 22× 22× 56× 56× 56× 56× 22× 16×       18× 12× 10×   28× 56×                                               28×                                           12×                                                                             37× 37× 37× 24× 24× 24×     35×   22× 22× 22×   22× 22×                                     27× 27× 27× 27× 27× 19×                   26×                                                     200× 200× 200× 200× 192× 192× 192× 192× 192× 192× 192×   193× 193× 193× 193× 193× 193× 193× 193× 77×   193×                 31×     27×     20×               17× 17× 17× 16×                               193× 193× 191× 191×     193× 193× 193× 193×   24×       193×   77× 77× 77×     15× 15×           77×   24× 24×   77× 77× 77× 77× 77×   576× 576× 191×   385×   383×   24× 24× 43× 24× 24× 24× 10×     14×         24× 24× 24×   31× 31×       20× 20×   22× 22× 22×   15× 15× 15× 15×     41×     237× 237× 44× 62×     193×   237× 237×     270×           274×           584×           270×         14× 14× 14× 14× 12×                 860×   712×   237× 237× 113× 113× 113× 37×       237× 237× 237× 237× 113× 113×       350× 350×         154× 154×       116× 116×   46×                                                                         200×   276× 276×                                                                   10× 11× 10×     10× 10× 30× 11× 25× 25× 25× 25× 11× 10×         13× 25×                                                   462× 462× 462× 462× 462× 462× 462× 462× 462× 13× 17× 13× 13× 13×   13×     462× 462× 462× 462× 462× 462× 462× 462× 462× 462× 462× 462×     870×           411×                         17× 17×                   27× 27× 27× 27× 27× 45×   27×                                                 15×                                                                                                       48×   47× 42×           80×   79× 17×   62× 62× 62× 62×                                                                               22×                   166× 166×   166× 166×   121×     15×         462× 462× 462× 462× 462×   462× 462× 462×   462× 462× 461×   461×     352×   462× 462×   352×     157× 146×   11× 11× 11× 11×     156× 145×   11×     155× 155× 154× 154× 154× 154× 154× 154× 154× 154×           149× 149× 149×         47× 34×   13× 13×     13×         462× 462×     462×   194× 194×   194× 194× 194×   194× 194×                 194×   194× 21×   173× 173×   194×   199× 199× 199×   430× 430× 430× 430× 430× 430×   430× 35×   395× 87×   308×     10× 10× 10× 13×   10× 10× 10×   10× 10×               14×     462×                                                           462× 462× 462× 462× 13×   449×                       438×                                                                         462× 460×                                                                                                                                                               438×                                                                                                                                                           450×   1959×   449×   1932×               27× 27× 27× 27×                     4661× 4661×   1244×         1244× 1244× 1244× 1244×   1248×   1244× 1244×   1244× 1244× 1244× 1244×                                         16×                                                       34× 34× 34× 34× 34× 34× 34× 34×     305×           119×         52× 52×   52×   34× 34× 34× 34×   130×     26× 26×         26× 26× 26× 129× 129×   26×   26×     27× 27× 27× 157× 157×     23×   22× 143×   22× 22×   19× 18× 18×   19× 19×   22× 22× 20×     17× 17× 123× 123×   17× 17×     18× 18× 126× 18× 18×   19×   116× 18× 18× 115× 71×   44×   43× 43×     616×                                                                                                                               5622× 5677× 51744× 5998× 888878× 42176× 124× 435× 292774× 70× 493× 11802× 15858× 920× 122× 8319× 559× 107× 5499× 26× 24× 11236× 14× 1678× 4883× 632× 273× 2527× 8136× 375× 21× 881× 82598× 1733× 405376× 6778× 6561× 7428× 30× 4547× 11× 36× 25434× 58× 130× 185098× 1335× 655× 88× 65× 459× 92× 80× 1531× 28836× 716× 2866× 245× 115× 312× 39× 60× 394× 218905× 168× 247×                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           10914× 10914× 10914× 10914× 17172×     17172× 101798× 101798×     10914×                                               7861× 7861× 7861× 7861×   7861×                   415×                           4827× 4827× 7861×                                         52× 979×                                               4121×                                           459×     459× 459×                                     24×                   1712×   1712×                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         43492× 43492× 44850×   43492×       43492× 12711× 12711× 12711× 12711×     12711×     12711× 112×     43492× 24731×   24731× 15376× 15376×   29474×       18761×   43492×     15376× 15376× 13898×     1478×   15376×                                                                                                                                                                                     10× 10× 10× 10× 10× 10×       10× 10× 10× 10× 10×   10×                       26× 26× 26× 26×                                                                 52× 52× 52×   15× 15× 15×   33× 33×   67×   62×   67× 67× 67× 12× 12×     62× 62×       62×           67× 67× 67×   65×   15× 15×             60×   67× 67× 67× 67× 67× 67× 67×   134×                       146× 146× 146× 146× 146× 146× 146× 146× 146× 146×   10× 10× 10× 10×         10×     10×                                 58× 58× 58× 58×       52× 52×     58× 58× 58× 58× 58× 58× 58×   58×     58×       58×       58×   26×       58×         52× 52×   28× 28× 12×             21×           174×   58× 58×   17× 17× 17× 17×   17×     16×   17×   17×   17×   17×           17×     17×                     332× 332× 332× 332× 332× 332×   17× 17×   308× 308× 308× 308× 44× 44×   308×   13× 13×   14× 14×   10× 10× 10×   10×   290× 290× 290× 290×       315× 315× 315× 13× 16× 13× 15× 15× 15× 15×   13×         315×       292× 292× 12× 12×   12× 11×     292×       315× 315× 10×     90×       315×                                                                                       18×                     309× 309× 309× 88×   309×   309×   309×   88× 88×       24×                                                                                                                               66×                                                                                                                   11× 16× 11×     11× 11× 33× 20× 40× 40× 40× 40× 20×       11×             20× 40× 11×     19× 19× 19× 19× 19× 19× 19× 19× 19× 19×   19×     12×     19×         21×     11×                                                                                                                                     14× 14× 14×       15×   14× 14× 14× 14× 14× 14×   14× 14× 14×                                                                                               22× 24× 46× 22×     24× 22× 66× 46× 92× 92× 92× 92× 46× 24×       22×             46× 92× 22×                   20× 20× 20× 40×   20× 20× 20×     20× 20× 20× 20×                                         20×         20×                                                         10× 10× 10× 100×     100× 36×   64× 64×     64× 64×     64×   64× 64× 64×   10×   100× 40× 40×           40× 36×     64×   64× 64× 64× 64×   64×     64×   10× 10× 10× 10×                                                     20× 20× 40× 20×     20× 20× 60× 40× 100× 100× 100× 100× 40× 20×       40× 20×           60× 100× 20×     20× 20× 20×   20× 20× 20× 20× 60×   20× 20×   20×       18×               18× 18× 18× 20×                                                                                                   626× 3130× 626×   3130×                                       64× 64× 64×       64×     11×             50×             64× 64×       64× 64× 64× 64×                       18× 18×                                                             20× 20× 20× 20× 20× 20× 20× 20× 20×     20× 16×   20×     20× 20×           20× 20× 20× 20× 20×     20× 20×   20× 20×     20× 20× 20×   20×     20×                                                                                                                             68×     68× 68× 68× 68×     74× 86× 86×           37× 37× 37× 37×   68× 69× 68× 68× 68×   37× 925×     954× 12×   942× 942×   100× 100× 100× 44× 954×       100× 100× 100× 32×               70× 70× 70×           74× 74× 74×     74× 74×     70×   74×     120×   201×   91×   83× 83× 83× 39×   44× 44×     44× 37×     81×   74× 74× 35×   39× 37×                       22× 22× 22× 22× 22×     46×         22× 22× 22× 22× 22× 22×   22× 22× 22× 22× 22× 22×     22× 22× 21×         21× 21×       21× 21× 21× 21×         22× 21×     22× 13× 13×     22× 13× 13×                         39× 39×   32× 32× 32× 32× 32× 32×             32×             32× 32×     32× 32× 32× 32× 32×         32×   32×       32×     32×   32×     32× 32×                                                             15× 15× 15× 15× 15× 15×     15× 15× 15× 15× 15×     15×   15× 15×   15×                   15× 15× 30× 30×                               15×     10× 10×                       713× 713× 713× 713×   692× 692× 692×   708×       708×   708× 708× 34×     674×     57× 57× 57×   30× 30× 30×   32× 32× 32×                                                   34× 34×         34×   34×   708× 708×       708× 708×   674× 674×     674× 674×   34× 34×   674× 674×   708× 708×                                                 385× 385× 385× 385× 385× 385× 385×   295× 295× 295× 295× 295× 295× 295× 295× 295× 295× 295× 295× 295× 295× 295× 295× 295× 295×   295×     295×     295× 295× 295× 295×   385× 385× 385× 385×     385× 385×                                 295× 295×       295×   295×           53× 53×   30×   422× 422×   295× 295×         295×           39× 39× 39× 39× 39×     39× 39×                 39×   37×                 38× 38× 580×     370× 370×     39×     39× 18×   39×   16× 16×   16× 14× 14×     370× 370×       370× 370× 370× 370× 370× 370×                   98× 98× 98×   54×     295× 295× 295× 295× 295× 295×   295× 295× 295× 295× 295×   295×                                 53×     53× 53× 53× 53× 53×   98× 49×   49× 49× 49× 49× 49× 49×                                                       140× 140×   77× 77× 77× 77× 77× 77× 75×   77× 680× 680×   77× 74×   77×     73×   71×                     203× 203× 203× 203× 203× 755× 755× 737×     203× 203× 192× 192× 222×     192× 19×       203×                                                                                                                                                   460× 448×     416×     87× 87× 87×               338×           15440×   424×   408×   6037×   3617×   914×               18×   58× 58× 58× 36× 36× 24×     12×     58×                 30× 30× 14× 14×   16×   15×     11× 11× 11× 81× 81× 81×                               81× 56×         56×                                                                                   60× 60× 60× 60×   65× 409× 28×   381×     377×     65×   65×   65×                                                                                 99× 99× 99×                 48×                                                                                                         123×                     15× 15× 15× 15×                                     15× 15× 123× 123× 123×             123× 123× 123× 82×       15×   15×                       15× 15× 15× 15×                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         261× 261× 261×                               261×             261× 261× 261× 261×     262×     523× 523× 523× 523×                       261×                                                                                                                                                                                                                                               22×                               81× 81×                                                                                                                                                                                                                                                                                                                   41×     41×     41× 41×                                                                           12×     12×     12×                   12×   12×                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             47× 47× 47× 47× 47× 47× 47× 18×   47× 29×   47× 43× 43× 43× 43× 43× 43×   47×     55×     99× 99×                               13× 13× 12× 12× 12× 12× 12×             46× 46× 44× 44× 44× 44× 44×             42× 42×   106× 99×     43× 43×     43×       43× 43× 43× 43× 43× 43× 43× 43×   42×     41×   43× 43× 43×           43×   56× 56× 56× 56×   56× 12× 12×     44×   56× 56× 56×       12×   12×         51×                                                       46×                   46×                       18× 18× 18× 18× 18× 18× 18× 18× 18×   36× 18× 18×   36×     18×                                                                               61× 61× 61× 61× 61× 61× 61× 61× 61× 61×       131×             131× 304×   304×   288× 284×         284× 284×         16×       12×           16×   16×             16× 16× 16× 16×       131×   287× 131×       131×   131×   131×   131×   131×   131× 131×           431× 431× 431× 431×   874× 574× 20×   554× 554×     847×       61×   61×     35× 35× 35× 35× 35× 35× 35× 35× 35×   35× 35×       38× 38× 38× 38× 38× 38× 38× 38× 150× 30× 10×       38×   30× 30× 10×   20× 60×   20× 10×   10×   38× 38× 128× 26× 16×     128×     16× 16× 16× 16× 16× 16× 16× 16× 16× 16× 16×   16×       14×       14× 14×     16×   16× 16×   16× 16×   16× 16× 16× 16×           16× 16×   16×                                                                                                                                                                                                                                                                                                                                                                                           1321× 1321× 1321× 1321×   3474× 3474×     3474× 3276×     198×     3276× 3276× 3276× 289×   119× 116×             170×   2987×   198× 198× 198× 198×   198× 251× 251× 251× 53× 53×       198×   198×   196×                       197×                                               66× 66×   467× 467× 1398× 1398× 300×   1098×   167×                         426× 426×   1385×   1385× 80×   1385×     1385× 17×   1368×                         339× 339× 339×       1589× 1589× 1589× 1589× 2563× 2563× 2563×   2563× 1232×     1331×     1589×                                                                                     238× 238× 238× 238× 238× 238× 238× 238× 238× 238× 238× 238× 238× 238× 231× 231× 231×       238× 238×     301×           368× 67×     301×                 289× 67× 67×               289× 289×         325× 325× 325×           289× 289× 289×   289×       289×   289×         325×     325× 325× 325×                     38×   1203× 1203× 1203×   803×           803×   803× 588×       1203×     1203× 804×     238× 238×                 238×     238×   238×   238×         238×           238× 238× 238× 238× 238× 238×         17×                                                                                       675×   46×                             10×   10×                                   279× 78× 357× 279×     279× 279× 837× 357× 714× 714× 714× 714× 357× 92×       265×             357× 714× 265×               276×   571× 571×         92× 92× 92× 92× 92× 92× 101× 92× 78× 10× 66×         95× 95× 95× 10×   95×         144×         154×         92× 92× 92× 170×   92× 101×   78× 78×         92× 92× 92× 10× 10×       92× 92×                     33× 19× 52× 33×     33× 33× 99× 52× 142× 142× 142× 142× 52× 33×       57× 38× 19× 19× 19× 19×   71× 142× 19×     143× 143× 143× 14×     19×                                           19× 19×   19× 19×         34× 34× 33×     33× 33× 33× 71×   33×                             33×     33×   33× 33×   19× 19×         19× 19×     19× 19×                         33× 33×   32×           33×           33×           33×           33×           33×           33×           33× 33× 33× 32×             33×           33×           33×                                                                           42× 42× 42× 42× 42×           42× 42× 42× 42× 42× 42× 42× 42× 42×   42×   42× 42× 42×     42× 42×           366×     139× 139×   139× 139× 139×                         29× 29× 29× 29× 29× 29×                                   42× 42×   42× 42×     42× 42×       175×   37× 37× 31× 31×   37×   62× 62× 62×       31× 31× 31×       31× 31× 31× 31× 31× 31× 28× 144× 144× 144×         144×     144× 28× 28×   144×       144×           144× 144× 144×   28× 28× 144×   28× 27×                                 31×   33× 33× 33×         33×     33× 33× 33×   32× 32× 32× 32× 32× 32× 32×             27× 20× 20×   27× 22× 22×     20× 20×     20×       20×     20× 20× 20× 20×         20×   22× 22×     22×       22×     22× 22× 22× 22×         22×                           95× 95×   33×                                     41×       41×                                                                                                             19× 19× 19× 19× 19× 19× 19×     19× 19×                 26× 19× 19×                                         10×                     18× 18× 18× 12×     14× 14×           19×   13×   13×                                 26×                                           14× 24× 38× 14×     24× 14× 42× 38× 101× 101× 101× 101× 38× 24×     32× 18×       56× 101× 14×                                                                                                                         116× 116× 116× 116× 116× 116× 116× 116× 95×       116× 116×   116× 116× 110×     116× 116×   116× 116× 116× 116× 116× 116× 116×   116× 116× 116×   116×   116×   115× 115× 115×     116×         115×                                 115×                                               116× 116× 116× 116×                                                                           21×                                     35×                                                                                                                                                                                                                   116× 116×             116× 116×               116×                                                                                                 29× 29× 29× 29× 29× 29× 29× 28×   29×   35× 175×     175× 175× 175× 175× 140× 140× 140× 140× 20×               20×   20×     140×     35×   175×                                                                                               18× 18× 18× 18× 18×                 12×                     13×   33×                           21×   21× 12×                   18× 18×         18×       18× 21×   21× 18× 18×                                                                                   15× 15× 15× 15× 15× 15×     15× 15× 15× 15× 15×   15× 15× 15× 13×         15× 11×     15× 15× 15×   15× 13×                                                                                                                                 24× 11×                                                       11× 11× 11× 11×             11× 11× 11× 11× 11× 11× 11×   11×                                                                                       33× 33× 33× 33× 33× 33× 33×                                                         18×                                                                                                                                                                                 21× 21× 21× 21× 21× 21× 21× 21× 21× 21× 21× 21× 21×   47× 47× 47× 47×       19× 14×     19× 14×     19×         24× 18×                 18×     18× 16×             14×     19×     14× 14× 14× 14×       14×     14× 14× 14×   14× 14× 14×                                                         51×   21× 21× 21× 21× 21× 21× 21× 21×   21× 21×           21×           21×     21× 21× 21×   21× 21×     21× 11×   11×   21× 21×   34×       14×     14× 14× 14× 14×         14×       15× 15× 15×       21× 21× 105× 105×                                         105×                 105× 105× 105×             21× 21×                                   42× 42× 210× 210×       42× 42×   42×   14×   137×     24× 24× 24× 120× 120× 120× 120× 117×       24×                                                     566× 566×   566× 566×       566× 566× 272× 272× 272×   566× 274×   566× 545×   566×   979×                     94×         94× 94×                                   508× 508× 508× 508× 508×               508× 508×   508× 508× 154× 154× 154×     10×   512×                                 168× 168× 168×     193×   13×     13× 13× 13×   11×     10×   13×     200× 442× 442×                   193×   188×                           1246× 1246× 1246× 1246× 1246× 1246× 1246× 1246× 1246×   1246× 1246×                     123× 123×   117× 117× 2553×   2572× 2572×       2572× 2572×                     92×   92× 92×                     25× 25×   19×                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       10356×                                                                                                                                                                                                                                                                                                                                                                                                                                         10× 11× 10×     10× 10× 30× 11× 25× 25× 25× 25× 11× 10×         13× 25×                         176× 176× 176× 176× 176× 176× 176× 176× 176× 176× 176× 176× 176× 176× 176× 176× 176× 176×     381×           200×                                           176× 176× 176× 176× 176×   176× 176× 175×   175×       228×           10×     176×     10× 10×   10× 10×       89× 89× 89× 89×   89× 83×             10×                 44× 44× 44×   14×     10× 10× 10× 13×   10× 10× 10×   10× 10×                                                                 26× 26× 26× 26× 26× 26×                                                                                 64× 64×             18× 18× 18×       16×                                               14×                   64× 64× 64×   64× 64×                 64×   64× 61×     64×     37× 29×           176× 176× 176×   176× 176×     176×                                                   176×                                           176×                                                                                                                                                                                                                           176× 174×                                                                                           176×                     122×                                                                   273× 273× 273× 273×           81× 81×   175× 175× 810×   14×         21342× 21342× 21342× 21342× 21342× 20532×   21342×   21342×                       233×           9689×           9645×           189×   110× 110× 110× 110× 137× 137× 137× 81×   56×   110× 137× 137× 81×   29×   81× 81× 81×                     109× 109× 28×   81× 81× 81× 81×   108× 108× 108× 413× 413×   108× 43× 43×   108×   65×   65× 65× 65×   11× 11×         11× 11× 11× 11× 11× 11×                                 94×           94×         96×   94×   94×     96× 96× 96× 430×   96× 96× 96× 96× 96×                     21530× 21530× 21530× 21530× 21530×     9672×           19706×           48018×     117×           9506×           28726×           28726×           38101×     48×           9572×                     47988×         74×     9573× 9573×           19147×                                       9504×           9504×         9524× 20×   9504×   9504×     9524× 9524× 9524× 9524× 9524×                                                               20× 20× 20× 20× 20× 20×                     20× 20×                                                                                                                                                                       66× 66× 66× 66×   66×         32× 32× 32× 32× 32× 32× 32×   66×         66×   66× 66× 66× 66× 66×       66× 66×   66× 66× 66×     22×                   66× 66× 66×     28×                   66× 66×   198× 198× 132× 132× 132× 132×     66×   198× 198×   50×   42× 42× 42× 42× 42× 42× 42× 42×                                     60× 60× 60× 60× 60× 60× 60×     64×           116×           111×         40×   60× 60× 60× 60× 60×   100× 100× 100× 100× 50×     50× 50× 50×     176× 176× 176×   116× 116× 116×   16× 16× 16× 16×                                               59× 59× 59× 59×                   28× 28×         11×   11×     28×   28×       28× 28×       28×       28× 28× 85× 28× 85× 28×   28×   28×     28× 28× 28×   28×   28× 28× 28× 28×   85× 85× 36×     36× 36× 36×                       140× 122× 262× 140×     140× 140× 420× 262× 662× 662× 662× 662× 262× 124×       276× 138×           400× 662× 138×     140× 140× 140× 400×   140× 140× 124× 124× 124× 124×   122× 122× 122×   16× 16× 16× 16×   138× 138× 138× 138× 138× 138×   138×         138× 138× 138× 140×   138× 138× 138× 138× 138× 32×     138×                                           13× 12× 25× 13×     13× 13× 39× 25× 50× 50× 50× 50× 25× 12×       13×             25× 50× 13×     95× 95×   12× 12×           12×             20×   21× 21× 21×                                                                                                                                                                                                                                                                                                                                                                                                                                                               5675×                       52487×                                                                                                                 10×                                                   1196079× 1196079×                     1703631×                                                                                                                   9954× 9954× 9954× 9954× 9954× 9954×   687×                                               146×                                                                                                                       106× 106×                                                               10324×                                       358988× 358988× 895× 706×                                                                 11×       11×                         201×     11238× 11238×                                                                                           8764×                                                                       635× 630×                       8134× 8134× 1487× 706×   1487× 1487×                           57× 57× 57× 163× 163×                           84677× 84677× 84677× 84677× 301957×   31751×                                                                                                                         200813× 200813× 199934× 199934×       879×       200813×       200813× 372652×   188887×                             84344× 84344× 84335×                               7457×     7457×       7457× 9263× 9263×   7457×     7457× 7457×                                                                                                                   11× 11× 11× 11×                                   174× 174× 172× 82× 82×   90× 90× 90×   172× 1979× 1979× 1979×   172×                           196×                           838×                               219120× 219120× 11545×                                       745× 745× 745× 745×   745× 745× 745× 745× 1464×   1464×     1464× 123× 122× 122×   1341× 1106×     745×                                                                 20866×                                                                                                                                                                                                                           799× 799×         124× 124× 124× 124× 47× 47×       77×     67× 67×   238× 238×           126× 126×       398× 398×       47× 47× 47×                       47×       124×       47× 47×     47×   67× 32× 57×     67×                       459× 459×                                                                   12× 23× 23× 23× 23×       11×           15× 23×                     15×                                                                                                                                                                                       100× 100× 100×   12×                                     12×                                     221× 221× 221× 221×   163×       163×   54× 54× 54× 54×     88×                     182×     11×           181×     32×           185×     14×           648× 2592× 452×     648× 648× 648× 648× 648× 648× 648× 648× 648× 648× 648×                                                         22×                       311× 311× 311× 311×   158× 158×   311×   311×         311× 311× 311× 311× 311× 311×       88× 88×   56× 56×       56× 56× 48×                                         74651× 74651× 74651× 74651× 74651×   74651×   74651×   73983×   66630× 3880×   62750× 28111×   34639×   724×     33913×     3880×   3879× 3879×   29989×     74651× 74651× 298604×   74651× 74651× 245253× 245244×   74642×                                   74645× 74645× 74645×   74645× 74645× 27109×   47536×   143× 143× 143×   2509× 2509×   44884×   47536×                     7124× 7124× 7124× 7124×   7124× 7124× 74637× 36×   74637× 3855×                         74638× 74638× 74638× 74638×   74638× 74638× 74638× 74634×                         18× 18× 18× 18× 18× 18× 18× 18× 18× 18× 18× 18× 18× 18× 18× 18× 18× 18×   90× 18×                         36×                                 18× 18×   18× 18×   18× 18×   18×     18×   18× 18×       18×     18×   18× 18×   18×     18×   18× 18×   18×     18×                       12× 12×                             27× 27×     21× 21×     21× 19×                                                                                                                                                                                                                                                                                                                                                                                                                                     307× 307× 307×               16× 16× 16×     144×   16× 16× 16×     16×   12×   16× 148×     144×   16× 16× 144× 144× 138×   144×   16×                       91×   18× 18× 14×   18× 18×   14× 14× 14× 12× 12×           14× 14×       18×                 12× 13×   12× 12×       12×                     305×   37× 37× 37× 37× 37× 37× 37×     37× 37× 37×   36× 18×           37× 37×   37× 37× 37×                         14× 14×     14× 14×   13× 13×                   16×     16× 16×       13×     13× 13× 13×                                         29×                         72× 72× 72× 67×                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     14× 14× 21× 11×     14×                   10× 10× 10× 10×                                                                         2009× 2009× 2009× 2009×   2009×                                       10× 10×       10× 10× 10× 10×   10×       10× 10× 10× 10×         12×     12×                                         15× 18× 18× 18× 18×                 10× 18×       10×                                                                                                     27×                                                 12× 14× 14× 14× 14×                 14×                                                           12× 14× 14× 14× 14×                 14×                                             15× 10× 10× 10× 10×                     10×           15× 15× 15× 15×                                                                 12× 15× 27× 12×     15× 12× 36× 27× 56× 56× 56× 56× 27× 15×       14×           29× 56× 12×       18×                                           11×                                             11× 17× 11×     11× 11× 33× 17× 34× 34× 34× 34× 17×       11×             17× 34× 11×       11× 11× 11× 17×   11× 11×   13×                           10× 10×   10×                                                                       11× 11×   11×     11× 99× 99×   11× 11× 11×   11×   11×                                                                                     10×                                     24×                                       24×                                                                                                                                                                                                                                                                                                                         34×                                                                                                                                                                             10×     39×                                                                                                                                                                                               14× 14× 14× 14×   14× 12× 12× 12×     14×                                                                           20× 20× 20× 20× 20× 20× 20× 20× 20×         20× 20× 20× 20× 20×                                                                                                                                             20× 17×       20× 20× 20× 20× 19×   20× 19×   20× 19×   20× 20×             20×   20× 57×   20×   19× 19× 19× 19× 19× 19× 19×   19× 19× 19× 19× 19× 19×   19× 19× 19× 19× 19× 19× 19× 19×     57× 57× 57× 57× 228×   57× 57× 228× 228× 228× 190×   228×   57×   58× 58× 58× 58× 58× 58× 58×         228×       228×     228×   20× 20×   20× 20× 20× 20× 20×                                                                                         20× 20× 20×                                 20× 20× 20×                                       20× 20× 20×                                       20× 20× 20×         20× 20× 20× 20× 20× 20× 20× 20× 20× 20× 20×                                     25× 25× 25× 25× 25×     25× 25× 25× 25× 25× 25× 25× 25×               25× 25× 25×                             39× 39× 39× 39× 39× 39×       39× 39× 39×   39× 39×           39× 39×                                             41× 41× 41× 41× 41×         41× 41× 41× 41× 41× 41× 41×                                         24× 24× 24×         24× 24× 24× 24× 24× 24× 24× 24× 24× 24× 24× 24× 24×             11× 11×                                                                                                                                                                                                                                                                                               11× 11× 11× 11× 11× 11×     11× 11× 33×     33×       33× 33×   33×   11× 11×     11×       13× 11× 11×                           13× 13× 13× 13×       13× 11× 33×       11× 11× 11×   11× 11× 11× 11× 33×           11×         13×           13×                                   12×   12× 28×       12× 26×     12× 12× 26× 26× 25×   26×   12× 12×     12×     12×                                             11×                                   29× 29× 29×   15× 15× 15× 15×   15× 15× 45×     15×         15× 15× 15× 45×       45×   45×     45×     45×   15×                                                               64× 64× 64× 64× 64× 64× 64× 64× 64× 64× 64× 64× 64× 64× 64× 24×   64×               64×   37× 37× 37×   52× 52×     67× 67×         24× 24×   22× 22×   20×   17× 17× 15× 15× 15× 17× 17×     20× 20× 20× 20×         17× 17× 17×   15×     67× 67×         478× 477×         17×   17×   15× 15× 15× 15× 15× 21× 15× 15×   18× 18×   48×     13× 13× 13×                 13× 13× 13×                                                                                                   64×                                                                                                                             18× 18× 18× 18× 18× 18× 18× 18× 18× 18× 18×         18× 18× 18× 18× 18× 18× 18×     18×                                                                                                                                                                                                                                                                                                                                                                                                                     15× 15× 15× 15× 15× 15× 15× 15× 15× 15×                                                                                                     15× 14×   15× 14×                                                                                               20× 20× 20× 20× 20× 20× 20× 20× 20× 18× 18× 18× 18×                 20×                           18× 18× 18× 18× 18× 18× 17×     18× 18× 18× 18× 18× 18× 18×                                                                                                               11× 11× 11× 11× 11× 11× 11× 11× 11× 11× 11×                                                     12× 12× 12× 12×   11× 11×   11× 11× 11×   11×   11×   11×   11× 11× 11× 11× 11× 11× 11×   22× 22×   22× 22× 22× 22×                             10×                                                                                                                                                                                                                                                                                                                                         27× 27× 27× 27× 27× 27× 27× 27× 27× 27× 27× 27× 27× 27× 27× 27×                 20× 18× 18× 18×         20× 20×   11×     10×     14× 14× 14× 14× 14× 14× 14× 11× 11× 11× 11× 11× 11× 11× 11×     17× 17× 17× 17× 17× 15× 15× 15× 15× 15× 15×   17× 17×                                                           17× 13× 32× 17×     17× 17× 51× 32× 90× 90× 90× 90× 32× 15×       43× 26× 12× 10× 10× 10×   48× 90× 17×                                       17× 17× 17× 17× 17× 17× 17× 17×   17×                     10× 10× 10× 10×           10× 10× 10× 10×               10×                               10×           18×                                           20×                       17× 17×                                                                                                                                                   17×                                                                                                                                                                                           13× 13× 13× 13× 13× 13× 13× 12×     12×   13×     13× 13× 13× 13×                                       24× 24× 24× 13×     11× 11×   24× 24× 23× 23×   24× 24× 23× 23×   24×           12×       12× 12× 12× 12×                                               12× 12× 12× 12× 12×       12× 12× 12× 12× 12×             12×     12×             12×             12×                                                                                                                       789× 789× 789× 789× 789× 789× 789× 789× 789× 789×                                                 19×                               16× 16× 16× 16× 16× 16× 16× 16×                   16×             13× 13× 13× 13× 13× 13×   13× 13× 13×   13×   13× 13× 13×   10× 10× 10× 10× 10× 10×   13× 13× 13× 13× 13× 13× 13× 13×                                                                                                                         295×   43× 43× 43× 43×                     51×         43× 43× 43× 43×                     175× 175× 175×   160×   1058× 1058×   30× 30× 30×     1088×   1058×   1058×                     1218× 1218× 1218× 1218× 1218×   151× 151× 97×   151×   49× 49× 538×     505× 505×   1043× 1043×         1043× 1043× 1043× 1043×                     1058× 1058× 1058× 1058× 1058× 1058×       1058× 1058× 1058×   1043×     1043× 538×     505×   1043×   33×           97× 97×   47× 47× 47×   458×     83×         1007× 1007× 1007× 1007× 1007× 1007× 1007×       1007×   458× 458× 458×   458×     2065× 2065×             1048×                     22× 22× 44× 22×     22× 22× 66× 44× 88× 88× 88× 88× 44× 22×       22×             44× 88× 22×     185× 185× 185× 185× 185× 185× 185× 185× 185×     86×           169×         22×     86×       86× 86× 86× 86× 86×   83× 83×           83×     53× 53×   56× 56× 56× 56× 56× 56× 56× 56×             20× 20×       20×   19×           83× 83× 83× 83× 83× 83× 83×   185× 185× 22× 22× 44×   22× 22× 22×   22× 22× 22× 22×   22×   20× 20× 20× 20×   20× 20×         20× 20× 20× 200× 200× 20×   200×   20× 20×   400×   200× 200× 200× 200× 200× 200× 200× 200× 200× 200×             200× 200× 200× 200×           200×     76× 76×   20× 20×   22×             20× 20×                           14× 14× 14× 14×   14× 14×     14× 94× 14× 14× 14×         14× 14×                                                                                           21× 21×     15× 15× 15× 15× 26× 26× 26×     15× 12×           21× 21×       12×                       166× 166× 166×   166× 166×           166× 166× 166× 166× 166×   166× 166× 166× 166×   166× 166×   166× 166×   166×           166×                                 12× 12× 12× 12×                   12×                                                     987× 1786× 2773× 987×     1786× 987× 2961× 2773× 5546× 5546× 5546× 5546× 2773× 1786×       987×             2773× 5546× 987×     279×   94× 94× 94× 94× 94× 94× 798× 798× 798×   798× 798×         94× 94×         893× 893× 893× 2679×   893× 893× 893× 893× 893×   893× 893× 893×   893× 893×   893× 893× 893×         983× 983×   893×             893× 893× 824×   69× 69×                     170×   12× 12× 12× 89× 89× 89× 89×   86×     59× 59× 59× 601× 601× 601× 544× 544×   601×   59× 590× 532×   1881×                       145× 145×   145× 145×   145× 145× 145×   41×               1562× 1562× 879×     683× 683×   1562× 1562×   49× 49× 49×   28× 28× 28×   19× 19× 19×                     114× 114× 114× 114× 114× 114× 114× 475×       475× 455× 455× 455× 455× 455×     114× 114×   85×   475×           1562× 1562× 879× 879×       683× 683× 66× 66×     1562× 1562× 1562× 67× 67×     1495×                                                                                                                                                                                                                             78× 78× 78×   16×   39×   39×   48×         48×   70× 70× 70× 37×     33×     70×   21× 21×   20×             21× 13× 13×     20×   34× 31×   31×                             39× 39× 39×   48× 48× 26×     22×   48× 48× 48× 48× 48×                                                     42× 42× 42× 20× 20×   42×               27× 27× 27×   27×         84× 84× 84×   84× 84×               84×           35× 34×                   39× 39×   39×   39×   39×   39×       39×     28×   39×   39× 39×   39× 39× 21×           39× 39× 39× 39× 39× 39× 39× 39× 39× 39×   87×                         13× 13×     13×           192× 139×   53× 53×                             40× 40× 40× 40× 40× 40×   40× 40×   40×   40×   40× 40× 80×   40× 12×       34× 34× 34× 34× 34×   40× 40×   22×     21× 21×   22×   22×   24× 24× 24×     22×       22×   22× 22×   24×                       82× 75×                                 43× 43×   54×   53×     53×           53×           130× 130× 130×                   40×   40×     40×     40×   88×     84× 84×             46× 46× 46× 46× 46×   46×     46× 46× 46×       35× 35×   122× 122× 73×     49×     112× 112× 112×       35×       46× 46×   46× 46×     46×                                                                                                             40× 40× 40× 40×       40× 19×   19×       40×     40×           53×                       54× 54× 54× 54×     47× 47×   54×                                                       37×   37×       41×       41×                                                                 41×     41×   36×       36×                                                 10× 41×   10× 41×   10× 41×   10× 41×                                                                                                                                                                                                                                                                                                                                                                           22×   22×       22× 41×     22×                                                                                                                                                                                                                                                                                                                                                       41× 41× 41× 41× 41×       41×                                                                                                                                                                                                                                     27×                                             27×         27× 261× 261× 261× 261×   27× 27× 27× 27× 27×                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               41× 41×       41×     27× 41×     22×                                 10×                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         40×         40×                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             19× 19× 19×     19× 19× 18× 18× 12×     12× 12×   12×   18× 18× 17×                                 18×       18× 18×                                           12×                                                                                                                                                                                                                                                                                                                                             102× 96× 198× 102×     102× 102× 306× 198× 424× 424× 424× 424× 198× 96×       130× 28× 23× 23× 23× 23×   203× 424× 102×                                   27× 27× 27× 27×       27× 27× 27×   27× 27×   27×   30× 30× 30×     30×           27× 27× 27× 53×   27×   26× 26×   26× 26×         26× 26× 26× 52×   26× 21×   21× 21× 21× 21×           26× 26× 26× 52×   26× 26×   26× 27× 26×   23×         23× 23× 23× 23× 46×   23× 23×   23× 23× 23× 23× 35×   31×                   35×   23× 23× 23× 23× 23× 22× 22×     31× 31×       31×     43× 31× 31×   31× 31×                                                                           27×                                                                                                                                     16×     24× 16× 32× 32× 32× 32× 16×                   16× 32×     32× 32×             11×                                                     11× 11× 11×                                                                                                               22× 22× 22× 22× 22× 22× 22× 22× 22× 22× 22× 22× 22× 22× 22× 22× 22× 22× 22× 22× 22× 22×     18× 18× 18× 18×                                                                         22× 22×       22× 21×   21×     17×                   22× 22× 22×   22× 22× 22×                 24×   18×       18×     18×     18×                                                                                                                                                                                                                                                                                                                                                                             18× 18× 18× 18× 18× 18× 18× 18× 18× 18× 18× 18× 18×               11× 11× 11× 11× 11× 11×   11× 11×               11× 11× 11× 11× 11×       11×             20× 20× 20× 20× 20× 20×         20× 20× 20×                                                                                                                                                             2194× 2194× 2194×               2194×                                                                                       34× 34× 34×   33×       33×   34× 34× 34× 34× 21×   34×           12× 12×       12×                 29×     29×   49× 49× 49× 49×     18×   16× 16×   28× 28×                                                 29× 29× 29× 29× 29× 29× 29× 29× 29× 29×   16× 16×   29× 29× 29×                     75×   49× 49× 11× 11×     49× 49× 39×     49×     29×   29× 85×     29× 29×   29× 78×     481× 481× 481× 481× 481× 483× 483× 483× 483× 483× 237×         481×     480×     244× 244× 244× 13×   244× 244× 244× 244× 244×     244×             244×   29× 29× 29× 29× 333×   29× 333× 333× 244× 244×     89×   333×   29×   29× 29× 333×       333×     32× 32× 342× 342× 342×             32× 32× 372× 18×     32×   32× 32× 32× 192× 12×     32×   32× 32× 342× 342× 342×   32× 336× 3928×   246×               336×   1302×     336× 336×   336× 336× 246×   336×                                           32×   375× 375× 369×           94×       2786× 2786× 2037×   749×   2194× 2194× 662×     1532× 1532×     84×   509×   516× 516× 505×         11× 11× 11×                         20× 13×     45× 45× 45× 70× 70× 70× 71×   70× 70× 48×     70× 70×     23× 23× 23× 28× 28× 34× 34× 34×       28× 21×   28× 28×     3976× 3976×     8561×   1448× 1448× 1448×           1448× 1448× 1448×           675×   68× 16×   68×   12× 12×     5114×     5114×   336×     336×   29× 29× 333× 248×         29×   29× 333× 10×   10×                                                                                                                                                                           10× 10× 10× 10× 10× 10× 10× 10×   10×         10× 10× 10×                                                                                                         24× 24× 24× 24× 24× 24×       24×       24× 24× 24× 24× 24× 24×   24× 24×   24× 16×   24× 24×     24×     24×       24× 24×   24×                                                                   1930×               935× 935×   14× 14×     14× 14× 14× 30×     30×   14× 13×     13×   14×             24× 24× 24× 24×   24× 24× 24× 24×   38× 38× 38× 38×   38× 38×     38×   38×     38×   14× 14×   14×       14× 14× 14×   14× 14× 14× 14× 14× 14× 14×   14×           14× 14×   14× 48×             48× 48×     48× 48× 48× 48× 48×     48×   48×     48×   62×           62×   270× 270× 270× 270× 1485× 270× 270×     270×     270×   14× 14×   14× 13×     14× 14× 14× 14× 30× 30×     14× 14× 90×     14×           13× 13× 13× 61× 61×     30× 30× 270×   30×   61× 61× 300×   61×   14× 43× 361× 361× 361×       38× 38× 38× 38× 177× 177×     81× 81× 374×   81×   229× 259×   229×   633×     633× 81×   633×   994× 994× 958×   994×     994× 29× 18×     994×         1265×   1297×   3252× 3252×   32× 27× 27×           32×   64× 64×   32× 20× 20×           32×   994× 32×   962×     962×   14×   16× 16×     14× 14× 14× 14× 14×   14× 14× 14× 30× 30× 30×     14× 30× 270× 270× 270×         57× 57× 57× 480× 480×           480× 480× 480× 480×     480×   57× 57× 480×   57×                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       3471× 3471× 3471× 3471× 1604× 1604× 311×     3471×         1195×   1195× 32×   1163×           638×           637×                             467× 467× 467× 467× 467× 467× 1098×   467×         192× 192× 192× 60×   581× 569× 57×   135×         53×   22×   22× 22×   20×     31×                       79×                                                                                                                                                                                         49×         49× 56× 56×     49× 301× 294×     49×                                           49× 49× 70× 42×                                                                                     158× 186× 344× 158×     186× 158× 474× 344× 688× 688× 688× 688× 344× 198×       146×             344× 688× 146×     281× 281× 281×           281× 281×               312×           64× 38×   26× 26×   18×           17×   15×           26×                                   26×         158× 158× 158× 344×   158× 158× 158×   149× 149× 69×   80× 80×     80× 80×         80× 80× 40× 40×   40×   37× 37×     37× 37× 37×                                 77× 64×   13× 13×           13×     13× 13×           13×                 132× 132× 132×   40×       40× 40×   37× 37× 37× 37× 37× 37× 37×   15× 15× 37×   77× 77× 77× 77× 62×   15×                     220×     220×     220× 220× 220×       220×   293× 293× 293×                                   212×     505×     212×         212× 212× 212×   212×     212×                                                                                       17× 17× 17× 17× 17× 17× 17× 17× 17×     17×           90× 90× 90× 90× 90× 90× 90×                                                           10× 10×                   17× 17× 17×                             50× 20×   30× 30×           50× 50× 50× 40× 250× 40× 20×   20×   50×                                                                     17×   17×                                                                                                                                                                                               69× 69× 69× 69× 69× 69× 69× 69× 69× 69× 69×                                               69× 69× 15×           54×     48×     95× 95×   92× 92×         92× 92× 92×   15× 15× 15× 124×   15×   23× 23× 23× 23× 23× 23× 23× 23× 23× 16×   23×   23×     23× 69× 48×   69×     16× 16×   23× 23×   95×   24× 24×     92×   48× 48× 48×         48× 48×       48× 48× 48×   146×         24× 24×       24× 24×   146×         140×   69×                                                                                       24×       24× 24× 24×                                                                           54× 54× 54× 54× 54× 54× 54× 54× 54× 54×   54×   40×   40× 40× 40× 40× 40× 39×   40× 40×       40× 28× 28×     12×     40× 40×   39× 28×   11× 11×   40× 40×     28× 28×     24× 24×     51×         28× 28× 27× 27×   28× 27× 27×   28× 27× 27× 27× 27×     40× 40× 10×     28× 28×     68×   68×     27× 12×   15×         27×     27×   27× 27×     27×                                 27×   27×     27× 27×   27× 27× 27× 27× 27× 27× 27× 27×         27×                                                                                     46×     54×                                                     20×               46×                                 14× 14×                         22×   20×       20× 20×     20× 20×   12× 12× 12× 12×         12×                                                                                                               19× 19× 19× 19× 19×   25× 25×               21× 21× 21× 21× 21× 21× 21× 21×     21×         21× 21×   21× 21×   20×         20×   21× 20×         21× 21×     21×                                                               10× 10×     10×     10× 10× 10×                     10× 10× 10× 10× 10×                     11× 11× 11× 11× 11× 11× 11×   10× 10× 10× 10× 10× 10× 10× 10× 10× 16× 16×             16×       16× 16× 16× 16× 16× 16× 16× 16× 16×   16× 16×   16×     16×     16×                       16× 16× 16× 16× 16× 16× 16× 16× 16× 16× 16×   42× 42× 42× 42× 42×               42× 42×     42×   22× 15×     22×       33× 33× 27×                 15× 15× 15× 15×           15× 15× 15× 15×       16× 16× 16× 16× 16×   16× 16× 16× 16× 16× 16×   16× 16× 16×       16×   16× 16×   16× 16× 16×         16×                 19× 19×       19×     15×       16×   16×   16× 16× 16× 16× 16×   16×                                 24× 24× 24× 24× 24×                                                                                                                         11× 11× 11× 11× 11× 11× 11× 11× 11×   11×   10× 10× 10×     10× 10× 10× 10× 10×         10×               10× 10× 10×         10×                                                                                                                           11×                                                                                                                                                                                       178× 273× 448× 178×     278× 178× 534× 453× 931× 931× 931× 931× 453× 275×       203× 25× 14× 11× 11× 11×   467× 931× 178×                                     29× 29× 29× 29× 29× 29× 29× 29× 29× 29×             11× 11× 11× 47×   11× 11× 11× 11× 11× 11× 11×   11× 11× 11× 11× 11×   11× 11×   11× 10×     11× 11× 11× 11×                           29× 29× 29×   29× 29× 58× 29×   29× 29× 29×   29×   29×         29× 29× 29×   29× 29×   29× 29×   29× 29× 29× 29× 13× 13× 13× 13× 13× 13× 13× 13× 13× 13× 13×       13×       13× 13× 13× 13×     50×   50×   50× 50× 29× 29×   50× 50×   50× 50×       42× 42× 42× 42× 84×   42× 94×   42×   42× 41× 41× 90×   41×         94× 94× 94× 274×   94× 94× 94×           90× 90× 90× 90× 90×   90× 90×         13×     13× 13×         13×                                                                       23×                                   29×           29×             29×                                                                     20× 20× 20× 20× 20× 20× 20× 20×       20× 20× 20× 20× 20×     20× 20× 20×   11× 11× 11× 11× 11×     16× 16× 16× 16×         20× 20× 20×   20× 20× 20×   20×     20× 20×                   11× 11× 11×         11× 11× 11× 11× 11×       11× 11× 11× 11×   11× 11× 11× 11× 11×   11× 11× 11×     11×     11× 11×         11×     11× 11×         11×     11× 11× 11× 11× 11× 11× 11× 11× 11× 55×   11×   11× 11× 11× 11×                 12× 13×             12× 12×   12× 12× 10×     10× 13× 14× 14× 14×         13× 13× 13×   10× 13×   10× 10× 10× 10×     10× 10× 13×                   10× 10× 13×                                                                                                                       11× 11×   11×   11×       16× 23× 16× 23× 14×             11× 11× 11× 15×     15× 15× 15× 20×     11× 11× 11× 15×     38×   26× 26×     20× 20×               20×   20× 20× 20× 18× 18×   18×   20× 20× 11×               20×   10×                                                                                                                                                                                                                                                   37× 37× 37× 37× 37× 37× 37× 37× 37× 10×   37× 37× 37×                             11×         28× 28× 28×   18×               10× 10×         37× 37×       13× 13×   14× 14× 14× 14× 14×     14× 11× 10×       36×     37×       37× 37×       37×   12× 12× 12× 12× 47×     47× 47× 47×   47×       47×         47× 47× 47×           47×   12× 12× 47×         14×   13× 12× 12×           15× 15×                                 37×     37×     24×       24×                                                                               13× 13× 13× 13× 13× 13× 13× 13× 13× 13× 13× 13× 13× 13× 13× 13× 13× 13× 13× 13×         16× 16× 16× 16×       29× 29× 29× 29×   13× 13×                     13× 13× 12×       12× 12×   13× 13×   13× 11×   13× 13×   16× 16×         16× 15×           15× 14×     14×         16×               13×     13×                             13×         13× 13×   13× 12× 12×   13× 12× 12×   13× 13× 13×       24×                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       13× 12× 26× 13×     14× 13× 39× 26× 79× 79× 79× 79× 26× 13×       40× 27× 14× 13× 13× 13×   40× 79× 13×                                       30× 30× 30× 30× 30× 30× 30× 29×   30× 29×                         30× 30×                                             30×                                                     13× 13× 13× 13× 40×   13× 13×     13× 13× 13×       13× 13× 13× 13× 13× 13×     13× 13× 13×     13× 13× 13× 13× 13×         13× 13×             13× 13× 13×   13× 13×   13× 12× 12×     13×           13×                               11× 11×                     11× 11×                 11×     11× 99× 11× 11×           11×     11×       11× 11×     11×             11× 11× 11× 11× 11× 11× 11× 11× 11×                         11×                                                                                                                                                                                                                                                         33× 33× 33× 33× 33× 33× 33× 33× 33×                                                                                                               11×                                                                                                                                                                           12×                                                                                               35× 35× 35× 35× 35× 35× 35×       35× 35×     35× 35× 35× 10×   35× 35× 35×   32× 32×         35× 32× 32× 160×   32× 10×       32× 32×   32× 32×     32× 32× 32×   25× 25×   22×   160× 160× 160×   10× 10× 10×                                                                                                                                                                                                                                                                                                                                                                     20× 20× 20× 20× 20× 20× 20×     17×   20×                 20× 20× 19×       20×   19× 19×             16×   19×         16× 16×             19×                                                                                 18×                                           14× 14× 14× 14× 14× 14× 14× 14× 14× 14× 14× 14×   16× 16× 16× 16× 16×   15× 15× 15× 15× 15× 18×           15×   15× 15× 15×                                                                                                               44× 44× 44× 44× 44× 44× 44× 44× 44× 44× 44× 44×             44×   44× 44× 44× 44× 44×   44×                       249× 249× 94× 94×     155×                     40×             21× 21× 21× 44× 44× 21×               12× 12× 24× 24× 12×                           14× 10×             42× 42× 42× 42× 42× 40×                 49×                                           36× 36× 36× 36× 36× 21× 21×     15× 15× 15×     36×   36×     36× 26×         26×     86× 86× 36×   86× 86×   42× 42×       41× 80×     42×             42× 86×   42× 42×         44×   44× 44× 44× 44× 44×   44× 44× 44× 44× 44× 44× 44×   44× 44× 44×   44× 44×                 44× 44× 44× 40× 40×       44×                                                         214×   36×   40×     49× 40× 40× 40×         46× 42× 42×   46×       46×   46×                                                                                                                                                                                               44× 44× 44×                                                                                                           21× 21× 21× 21× 21× 21×                                                               21× 21× 21×                                                   22× 22× 22× 22×               22×   22×   22×                                                             21×                           25× 25× 25×   25× 25× 25× 25× 25× 25× 25×     25× 25×   27× 101×   101× 101× 101×         101× 101× 101× 101× 101×       17× 17×                                             269× 269×   269× 269× 269×             269× 269×   514× 514× 514× 514× 514× 514× 514× 514× 514× 514×                     286× 286×             286× 286× 286× 286× 286×             286× 286×   286× 286× 109×   286× 286× 286×   286× 286× 286× 286× 286× 286× 286× 286×         394× 394×                                                             330× 330× 330× 330× 330× 330×           330× 330× 330×   63× 63× 63× 63× 63× 63×   63× 63× 16×   47× 47× 47×   47× 47× 47× 116× 116× 116× 116×   47×   116× 116× 116×     116× 116× 116× 116× 788×       317×     350×         16×       16×   47× 47× 116× 116× 116× 116×             148× 148×         56× 56× 56× 56× 56× 56×   45× 45× 45× 45×   101× 82×   19× 19×   45× 45× 45×   19× 19× 19×                             20×     20× 20×   13×     13× 13×     20× 12×             17×           13×             13× 13×                                                 11× 11× 11× 11×     11× 11× 33× 22× 44× 44× 44× 44× 22× 11×       11×             22× 44× 11×     185× 185× 185× 185× 185×   12× 12×     11× 11× 11× 11× 11×         11×           11×           11× 11×                         11× 11× 11× 22× 11×   11× 11×                                                                                                                                                               110× 110× 110× 110× 110× 110×   110×   110×   110× 110× 110× 110× 110× 110×     129× 12×   117×                                           83×                                 110× 29×   81×   80×                                                     110×                     110× 97×   13× 13×                                               150×     10368×           2583×         14× 14×   12×   5166×   5154×     5154×                                 2583× 2583× 2583×   5202×     5194×           5194× 5194×     2576× 2576× 2576×   2574×     2666× 2666×   31× 31× 31×   25× 25× 25×   21×                               5158× 5158×                                           125×   31×     31×           93×           31× 13×   18× 1146× 1146×                                                               14× 14× 14× 14× 14× 14× 14× 14× 10×     14×   14×   10×     10× 10× 10×   10×                       10×   10×     10×   10×     43×   27×   14×   10×   10×   14×   13×                                                   13×                     13×                                                                                           196× 196× 196× 196×                       196× 196×   196× 196×     10×   200×     10×   13× 13× 13×     50×   13×     13× 13× 13×   11×     10×   13×     50× 50×                                                 17×                                   21566× 21566×   9571× 9571×         9571× 9571× 9571× 9571× 9571×   9571× 9571× 9571×   9571× 9571×   9571× 9571× 9571× 9571× 9571× 9571×   28× 28×   7678× 7678×     9571×           9571×           9571×           9571× 9571×                                 21× 14× 28× 28× 28× 28× 14×                   14× 28×                                                           14×                                                                                                                                                                                     18× 18×     26× 26× 12×   14×   10×           13× 13× 13×         13× 13×     13×   13×   13× 13× 13×   13× 13×       13× 13× 19×   19×   13×     13×   13× 13× 13×     23× 23× 23×   12×                                                       66× 66× 66× 66× 66× 66× 66×     380× 380× 12×   380× 380×   380×         392×           127×           190× 190× 210× 190× 192× 192× 192×   190×           190× 190× 210× 190× 18× 18× 18× 18×   190×         420×   210× 210× 210×   210× 210× 210× 209× 209×             10×     33×   66× 66×   63× 63× 23× 23× 54×       63× 63× 63× 29× 29×     63×   63×   63× 66× 63× 63× 29×       29× 29× 28× 28×   28×         213×   24× 24×   23× 23× 52×   23× 21×             66×         84×           66× 66× 66× 66× 66× 43×                                         65×                                                                       32× 32× 64× 32×     32× 32× 96× 64× 128× 128× 128× 128× 64× 32×       32×             64× 128× 32×                                           15× 15× 15× 15× 15× 15×   15×     15× 16×   15× 15×       16×         16×         16×   16× 16× 16× 32×   16× 16× 16×   16× 16×     16×         16× 16× 16×   16× 16×               16× 16× 16× 16× 32× 16×   16× 16×     65×         65× 65× 65× 65× 16× 16× 16×   65×                 16×                                                                                                                                                                                                                                                                 18× 18× 18× 18× 18× 18× 18× 18×   18× 18× 18×   17×   23× 23×   23× 23× 23× 23×   40× 21× 21×   23× 23×     47× 47× 46×         47× 23×   40×     25×     25× 25×             27× 27× 27× 27×             40× 40×   112×                                                     67× 31× 97× 67×     67× 67× 201× 99× 198× 198× 198× 198× 99× 32×       67×             99× 198× 67×                                                                     37× 37× 37× 37× 37× 37× 37× 37× 37×     35×           32×   68× 32×           35×         32× 32× 32× 32× 32×   128×                     32×       32×   32× 32× 32× 32×     30×     30× 30× 30× 30×   32×   32× 32×   32×   30× 30× 30× 30×   30×         32× 32× 32× 32×   35× 35× 35× 67×   35× 35×   32× 32× 32×   32× 31×         35×   32× 32× 32× 32× 32× 32× 32× 31× 17×     14×   31×       32× 32× 32×   17× 17× 17× 17×   17× 17× 17×   17× 17× 17×   34× 34× 34× 34×         34×                                                                                                                                                                                                                                       39× 39× 39× 39× 39× 39× 39×     37×               181×   37× 37× 37× 37× 36× 36×     36× 36× 36×       37×   37× 37× 37×   36×   36× 36× 36× 106×                           36× 106× 106× 36×   36×   39× 36×                                                                                                                                                                                   106× 106× 106× 106× 106×     106×                             106× 106× 106× 106×         106× 106× 106×   106× 106× 106× 106× 106× 106× 106×   106× 106×             106×         106×   106× 106× 106× 106× 106×         106×   106× 91× 91×   106×   106× 106× 106× 106× 106× 106×   91× 91× 91×   91× 91× 91×   182× 182× 182×         182×           113× 113× 10×   103×   113× 113× 113× 113× 113× 113×                                                 15× 16× 31× 15×     16× 15× 45× 31× 62× 62× 62× 62× 31× 16×       15×             31× 62× 15×     100× 100× 100× 100× 100× 21×   100×               22×             15× 15× 15× 11×   15× 15× 15×   15×   16× 16× 16× 16× 16×   16× 16× 16× 16×         16× 16× 16× 16×   16×                                                                                                                                                                                                                                                       78× 78× 78× 78× 78× 78× 78×         78×   64× 64× 64×   67× 67× 67×   14×     11×       10×                                                                                                                                 20× 20× 20× 20× 20×     20× 20× 20× 20× 20×     22×   13× 76×                             10×     10×                     19×           10×                                                                                                   104×                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           5996×                                                                                                                                                           491×     487× 487×   471× 16×                                                 12220×   11131×   11130×   11130× 11130× 10821×         10821× 10821×   10821× 10821×   10821×       10821×                                                       10821× 10821×           10821× 10×       10× 10×                     10821× 10821× 10821× 10821×             10821× 10821×     10821×   10811× 10811×   708× 418×       10× 10×   10×         400× 400× 400×       11800×                                                                                                                                               126× 126× 126× 126× 512×   126×                                                                                         5497× 5497× 5497× 5497× 5497× 5497×   5497×                           24× 24×     24× 81× 81×   24×                                                       22× 22× 148× 22×                                                                                                                                                   12× 12×     12×             12× 12× 12× 16× 16×   16×   16× 12×         16×   12×   12× 12×             12× 12×     12×       12× 12× 12×           12× 21×       12×   12×                                                                             1676× 1676×                       15314× 15314× 15314×                                                                                                                                             271× 271× 271×   271×     271× 12× 12× 12× 12× 12× 12×         12×     271×     271×                               2525×   2525× 98× 98×     98× 98×   98×       2525× 107× 107× 107× 107× 98× 98×   107×     2525×         2525×                                                                                                                                                                       1733×                                                                                               25466× 25466×   25466× 29113× 29113×   19788×                           184× 184×   184× 162× 162×   143×                                                                                                                                                                                                                     2725× 2725× 2725× 2174×           1676× 1676× 1676× 1172× 96×   504×                             469×                                                                                 265×                                   471× 471× 471×       471×                                               420×                                   84× 84× 43× 43×   41× 41× 641×     84×                         1641× 1614× 195×                         28877× 28408× 124×                       3457×                         771×                         129×                             58×                           392× 392× 392× 462× 462× 462× 462× 60×   462×   392×                                                   166× 166× 805×   798×     166×                       245× 29× 29×   245× 231×     245× 245×   245× 5147×     245×                                                                     144× 144× 20655× 20655× 20655×                                 11× 11× 11× 11×       11×         200× 200× 200×                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         42×               171107×                     86316×                               92× 92× 92×                               49×                                                                                             53×                                                                                                                                                                                                                       291× 291×       291×   291×       291×   291× 291×                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               291×   291×               291×   291×                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 101× 101× 21×                                                                                                                                                                                                                                                               324×       324× 22×       302× 302×                   302×   302× 302×                     81×                                           22×       22× 22× 22× 22× 22× 22× 22×   22×       22×       22×       22× 22×     22× 22×     22× 22×     22×                                   22× 22×                                                                                                         22×                           22×                                                                                                                                         59×         59×                   59× 59× 59×   59× 59× 112×   112×               59× 59×       59×           59×                                                                                                     2752× 2752× 2752× 2752× 2752×   2752× 24487×   24487× 23315×     1172×   1172× 604×           604×       2752×                                                                                                                                                                 302×                 302× 302×   302×         302× 58×     302× 59×       59× 59× 59× 59×   59× 59× 59×     59× 2752×   2752×     2752×         2752× 604× 604×     2148×       2148× 2148×   2148× 230× 1918× 230×         59×                       302× 302×                                                                                                                                           11× 11×     11×     11×                                 11×                           11×                                                   15×   15×                                                                                                         3320× 3320× 3320× 3320× 3320×   3320× 3320×                     3320×   3320×             3320× 3320×   3320×     3320×       3320× 1172×     3320×                                                                                                                                                                                                                   3054×                                   326×                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         20×   20×         16×         20×                                                                               3320× 3320×   3320×       2752×                                     2752×   2752×           2752×                       2752×         3320×         3320×                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     386×       386× 386×                                                                                                                                                                                                                                                                                                                                                                                     2148×                 2148×                                                                                                                                                             31× 31× 31× 31× 31×                                                                                                                                                                                                                                                                               66× 66× 66×               66×                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               742×                                                                                                                                                   218× 218× 218× 218× 218×   218×   218×   218×   218×   218×       218×         218×                     218×       218×               218×                                                                       486×   486×       486×       486×   486× 38×                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 10× 10× 10× 10× 90× 60×         10× 10× 10× 10× 10× 10×     80× 10×         10×   10× 10× 10×           10× 10×         10×                       10× 10× 90× 60×   10×                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 1196× 1196× 1196× 46× 46× 46×     1196×   1196× 1196× 1196× 107901× 107901× 107901× 107901× 2388×   107901×   63×   107901×         1196×   110335× 110335×                                                                                               488× 488×               61× 61×                         61×         61× 61×                     122×         483×                                           19×                     206× 206× 2890× 2890× 61×         61×         61×   2829× 2829×     206×         23×   23× 23× 23× 23× 23×                 80×       80×       80×                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         61×     61×                                                                                     61×                             61×                                                           61×   23×   23× 23×                                     61×         61×         61×                                     61×                                                 61× 61×   61× 61× 61×   61× 61×     61× 61×   61× 61×       61×   61× 61×     61×   61×       61×   61×             61×     61× 61× 61× 61× 61× 61×                                 61× 61×     61×   61×   61×   61×   61×   61×   61×   61×   61× 61×   61× 61×   61× 61×   61×     61×     61×       61×         61× 61×         61×               19× 19×     19×     19× 19×                                                       64×               23×         19×     19×       19×     19×   19×       19× 19× 19×   19× 19× 19×   19× 19×                 80×   80×       80× 19×       19× 19× 19×     80× 73×       73×         80×                                       80× 80×           80×                                                                                                                                                                                                 84× 84×                                                                                                                                                                                                                                                                                                                                                                                                                                                   61× 61× 61× 61×   61× 61× 61× 61× 61× 61×                                                                                                       20× 20×                                                     19×   19×   19×   19×   19×   19×   19×   38×   38×   19×                             19× 19× 19×                                   19× 19× 19×     19× 19× 19× 19× 19×               19×                                                                     25×                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             385×   16×                                                                             295×   201×     94×                     201× 201×   17×     54×                               12×           18×                                       160× 160× 160× 160× 160×     47× 47×     66×         54× 54× 54×   209×                                                                                           120× 27× 27× 27×   93×                                                                                           132× 132×   57× 57×   132×           129×                                   11×                                                             42× 42× 42×                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     36×                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               12×                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 19×   19× 19× 55× 55× 55×         19×                                                                                                                     41×       41×                                                                                                                                                     41× 41× 41× 41×                                                                                                                                                                                                                                                                                                                                                                     95× 95× 743×       95×                                         10× 46×                 20× 164× 164× 164×                     30×   30×             30×                                                                                                                                                                                                                                                                                                                                                                                                         19× 19× 55×                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               13×     13× 13× 13× 13×                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             41×                                                                                                 20×     20×                                                 25× 25×                                                                 25×         25× 25×     25× 25× 25× 25× 25× 25×                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 41×                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 22×       22× 22× 22× 22× 22× 41× 22×                   10×                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             54×                                                                                                                                                                                                       16× 16× 16× 16×   539× 539× 539× 539× 1149×             539×                                           539× 610× 599× 599× 599× 582×     17×       11×     539×       29×       29×                                   18× 18× 18×                                         28×                                                                                                                     16× 16× 16× 16×                                                                                                                                                                                                                                                                                                                 333× 333× 333× 333× 333×                                                                     633× 633× 633× 633×           1455×           2410×           994×                                                                                                                       24× 24× 24× 24×                                                                                                                                                                                                                                                                                                                                                                                               124× 124× 124× 14×         14× 14×   12× 12× 12×   12× 12× 12× 12× 12× 12×     12× 64×   12×     12×   40× 12×   40×   12× 12× 12× 12× 16×         12×                       12× 12× 12×                                                             12×   12×                                                                                                                                                                                                                                                                                                                                                                                   98×                                                                                                                                           23×   78×                                                                 56×   55×                                                                                                                                                                                                                                         10×     14×                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         462×                                             173× 173× 173× 173×                               173×                                                                                                                                                                                                                                                                                                                         197×                                                                                                         4403×                                                                                   147×     147×                           147×   701×   147×                                                                       13× 57896× 11383×     57896×                       565×   565×       565×     565×   565× 32220×   32220× 32220×   32220×   48× 24×     48×       32220×     565×       139× 139×   139× 397× 139×       139×                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               138×           138×           138× 138×     138×         138× 138× 138×         138×         138× 138× 138× 138× 138×   138×   138×   138×   138×   138×   138×   138×   138×   138×   138×   138×   138×   138× 138×   138×       138×       138×       138×       138×           138× 138× 138×   138× 138× 138×     138×           138×           138×                 138×               138×               138×       138×                   138× 138×         138×           138× 138× 138×         138× 138×     138×                                       2134×     2134×             2134× 2134×   2134×                                       2134×                                     2134×       2134×       2134×           2134×                                                                           544× 544×                     544×   544×                                         137× 137×   137×       137× 137×     137×         137×           137× 137× 137×           137×                 137×   137× 135×         137× 137×                         137×                     6259×                   3317×                       27714× 27714×                                     6259×     6259×       6259×               6259×               6259×     6259×             6259×               6259×               6259×                                                         6259×           6259×               6259×                               6259×   6259×                           544×                 544×                 542×       542×                                             6259× 6259× 6259× 6259×     6259×   6259×     6259× 4125×     2134×           2134×     2134× 544× 544×     544× 544×     544× 544× 544× 544×   544×   544×     544×           544×       544×           544×               544×             544×   544×             542×                   542×                               542× 542×       542×     542×           2134×                                                                                                       138× 138× 138× 138× 138× 138×         138×   138×           138×                             138×                               138× 138×         138×     138× 138×     138×                 138×                                 138×           137×     137×             137×           137×       137×   6259×           6259×           6259×           6259×   6259×     137×     137×           137×                                                   137×     137×           137×         137×                                                                                                                                                                                                                                                                               208×                                                 208× 208× 208×                               207×                                         204×                                                                   209×                   209×             209× 41× 520×           209×                                                       257×           258×     11×                                                                                                               228×       228×       228× 267× 40× 228×                                                                                                                                                                   17×                                                   231×   231×                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     236× 236×             236× 228×                                                           14×           222×         256× 256× 256×         14×         14×     13×   13×                                                                       10× 10×                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   74×       168×                       168× 168×         24×         168× 168×                                                     168×                                                       16×                   16×                                 16× 16× 16×   16× 16× 17×         16×                             16×       20× 20×                 20× 20× 20× 20× 20× 21×           20×       20×             20×                   20×     20× 11×           11×       203× 11×                                                                                                                                                         27×                                                                                                                                                                                                                                   168× 168×         168×             168× 168×               168×                                                                     16× 16×                                                                                                                                                                                                                     11×                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             12×                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 25×                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 48× 48× 133× 133×   48×         48×                   27×       181× 48× 133× 48×       48×                                           47× 47× 47× 47×   47× 47×   47× 47×                       47× 47×   47×                                                                                       37×                 37×                                                         24×   24× 24×                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       76× 76×   76×     60×   60×                                                                                                                                                                                         16×   16×                                                                                                                                                                                                                                                                                                                                                                                                                                                               10× 10× 10×   10× 10×   10×     10×                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             38× 38× 38× 38× 38× 38× 38×   38× 38×     19× 19×                                                                                 10× 10× 10× 10× 10× 10× 10× 10×   10× 10×                                           13× 45×   13×                                                                             17× 17× 17×   17× 17×                                       4212×   10× 4053× 297×   3756×                                                                                                                                         18×     27× 18× 36× 36× 36× 36× 18×                   18× 36×     46× 46× 46× 46× 46×   38× 38× 38× 38×   38×                                                                                                                                               10×           10×                                                                                                                                                                                 16×   16×                                                                               12×                         28× 28×   28× 28×   40×   26×   19×                                                                                                                                                                             10× 10×   10×                                                   10× 10×   10× 10×                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   21×   37× 37×           37× 37×                     35×           35×   35×                                                                                                                                                                                     10× 10× 20× 10×     10× 10× 30× 20× 40× 40× 40× 40× 20× 10×       10×             20× 40× 10×     64×     24×   29×       119×   36× 36× 36×     36×         36× 36× 36×   36×       18× 18× 18× 18× 18× 18×                                                                                                                                                                                                                                                                                                                                                                                                                   15× 15×     15×       13×   13×                                                                                                                                                                                       12× 12× 12×   12× 12×                                                                                                                             65× 65× 65×                                     65× 65×         65× 65×         65× 65× 65× 65× 65× 65× 65× 65× 65× 65×   65× 65× 65× 65× 65× 65× 65×                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     24× 24× 24× 24×   24× 24×                                                                                           20× 20×                     20×                                                                                                                                                                                                                               13×         13×     13×                         13×   13×                                                                                                     11×   11×                                                                                                                                                                                                                                                                                                   14×     21× 14× 28× 28× 28× 28× 14×                   14× 28×     16× 16×   10× 10× 10×   13× 13× 13×                                                                                                                                                                                                                     12× 12× 12× 12× 12×   12×             10×       10× 10× 10× 10× 10× 10× 10× 10× 10× 10× 10×   10×                                                   18× 18× 36× 18×     18× 18× 54× 36× 72× 72× 72× 72× 36× 18×       18×             36× 72× 18×     24×   11× 11×   10× 10× 10×     26×     26× 26× 26×   26× 26×     25× 25×   25× 25×                     14×                                                               18×                                                                                       56× 56×     54× 54× 54× 54×   54×     54× 54× 54× 54× 54× 54× 54×   54× 54×                 22×                                                                                             53×   35×   33× 33× 33× 33× 33× 33× 33×   33×                                                                                                             35× 35× 35× 35× 35×   35×                                                                                                                                                                                                                                                                                                                                                 86× 86× 86×   86×                           86×                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             12× 12× 12× 67× 12× 36× 36× 36×                                                             13×     13×       13× 13×                                                                                                                             18× 18×       10×   21×       21× 21×                     16× 16×                                                                                                             36×   78× 78× 78× 11×   78× 78×       78× 11× 11× 11×   78×       14× 14× 14× 14× 14× 14× 14×                                                                                                                                                                                                                                                                                               32×               32× 32× 32× 32×   32× 32×                                                                                   30× 30× 150× 150×                                         14×       14×   14× 14×                                                                                                                                                                                                                                                                                                                                                                   12× 12× 12× 12× 12×     12× 12× 12×                                                                                                                                                                                                                                 16×     16×   16× 16×   18×   18×   219×           25×                                                                                                                                                                               14× 14× 14×   14× 14×                                                                                                           14×     21× 14× 28× 28× 28× 28× 14×                   14× 28×     45× 45× 45× 45× 45× 45× 45× 45× 45×   45× 45× 45× 45×                                                                                                                                                                                                                                                                                                                                                                                                                         29×     29× 29× 29× 29× 29×     29× 29× 29× 29× 29×                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       13×         117×         13×   30×                                                                                                                                                                                                                                                               16×     21× 16× 32× 32× 32× 32× 16×                   16× 32×       54×     54× 54× 54×   54× 54×   84× 84× 84×   30× 30× 30×                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     10× 11× 21× 10×     11× 10× 30× 21× 42× 42× 42× 42× 21× 11×       10×             21× 42× 10×     14× 14×               10×           10×                         10×           10×         30× 30×       10× 10× 10×             10× 10× 10×             10× 10×                                                                   13× 13× 13× 13×         12×   51×   34× 34×   34×                                                                                                                                                                                                                                                                                                                                                                                                                 31× 31× 31×   31×                                                                                                                                                                                                           17×   17×                                                                                                                                                                                         36×                                                                                                                                                                                                                                                                                                           13×   25× 25×           25×   25× 25× 25× 25×                                                                                                                                                                       26×                                                                                                         10× 10×                                                                                                                       54× 54× 54× 54× 54×   57×           53× 53× 53× 53×   53× 53×                                                                                                                                         26×   16×                                                                           15×               11× 13×   21× 14× 36× 36× 36× 36×   36× 36×                                                                                                                               36× 36×                                                             57× 57×   57×                                                                                                                                                                                                             16×                                                                                                                                                                                                                                                                                                                                                                                                                         15× 15× 15× 15× 15× 15×   11× 11× 11× 30× 20×     10×     11×                                                                     13× 13×   13× 13×                                                                                                                                     12×   26× 26× 26× 26× 26× 26× 26× 26× 26× 26×       26× 26× 26× 26× 26×   26× 26× 26× 26× 26× 26×                                                                                                                                                                                                                                                                                                                                                                                       11×     12× 11× 22× 22× 22× 22× 11×                   11× 22×     64×   64×                                               50× 50×             50× 50× 50×   43× 43× 43× 43× 43×   50× 50× 50×                                                                                                                                                                                                                                                                                                                                                                                                                               60×             19× 19× 19×   19× 19× 19×                                                                                                                                                                                                                                                                                                                               122× 122× 122×     122×       122×   122×       65×   65×                                               38×           40× 40× 40× 40×     14× 14×     14×     14×   34×             19× 38×   30×   29×                                                                                                                                                                                                 21×         21×                                                                                                                                                                                                                                                                                                                         11×   15×   15×             10× 10× 10× 13× 10×                                                                                 14× 14× 14×                                                                                                             27×       27× 27×                                                                                                                                     22× 22× 22× 22×   22× 22×                                                                                                                                                                           24×   24×                 15×   15× 15× 15×   15×     15×                                                                                                                                                                                                                     29× 29×     29× 29×   29× 29×                                                                                                                                                   11× 11×         11× 11×     11× 11×                                                                           11× 28×                 12×             12×                                                                                                                         54× 54×   15× 15×                                                                                                                                                                                                                                                             11×   11× 11×       11×                                                                                                                   13×   13× 13× 13×   21× 21× 21× 21× 21× 21× 21× 21× 21×   18× 18×                                                                                                                                                                                   13× 13× 13× 13× 13× 13× 13×                                                         12× 16× 16× 16× 16×                   16×     20× 20×     20×   22×                                                                                                                                                                             25× 25× 25× 25× 25× 25× 25× 25× 25×       24× 24× 24× 24×                 24×           24× 24× 24× 24× 24× 24× 24×                                                                                                     14× 14× 14× 14× 14× 14× 14×               14×           14× 14× 14× 14× 14× 14× 14× 14×                                                           16× 16× 16× 16× 16× 16× 16× 80×         80×   80× 16×                       12× 12×               15×                                                                                             12× 12× 12× 12× 12×                                                                                                                                                                                                                                                                                                                                                                                                                           12×       12×                                                                                                                                                                                                                                                                                     14×   13×   13×           11× 11×                                                                                                         20× 20× 40× 20×     20× 20× 60× 40× 80× 80× 80× 80× 40× 20×       20×             40× 80× 20×     20×   20×   20×   17×   14× 14×                                                                                                                                                                                                                                             13× 13×   13× 13×                                                                                                                                                                               30× 30×   30× 30×                                             12×   12×                                                                                                                                                             13×   13×                                                                                                                                                                                                                                                                                   31× 31×   31× 31×                                                                                                                                                                                       10× 10× 10×   10× 10×                                                                                         11× 11× 11×     11×                                                       11×   11×                                                                                                                                                                                               20×   20×                                                                                     11×   21× 21× 21× 21× 21× 21×   16×   21× 21×     21× 21× 21× 21× 21× 21× 21×                                                                                       84× 84× 84× 84× 84× 80×   84× 84×   80× 80×   11× 11× 11× 11× 11×       84×                                                                                 12× 12× 12× 12×                   12×     22× 22×                                                                     32×                                                                                                                           19× 19× 19×   19× 19×                                                                                                                                       24× 24× 24× 24× 24× 24× 24× 24×   24× 24×               12× 12×                                                                                                                                                                               11×   39×       39× 39×                                                                                                                                                                                                                                                                                         12× 12× 12× 12× 12×                                                                                           10×                                                   33×                             33×   33×                                                                                                                                                                                                                         14×                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 16× 22× 16×     16× 16× 48× 22× 44× 44× 44× 44× 22×       16×             22× 44× 16×                                                         10× 10× 10×                                                       10×                                                 71× 71×   85× 85× 85×     85× 85× 85× 85× 85× 85× 85× 85× 85× 85× 85× 85× 85× 85× 85× 85× 85× 85×                                                                                                                                                                                                                                                                                           17× 17× 17×                   35×                                                           26× 26×   36× 36× 36×       45×     14×                                                                                                   54× 54×                                                             10×     10×                                                             17×     17× 17× 17× 17× 17× 17×                                                                                                                                       54× 74× 128× 54×     74× 54× 162× 128× 256× 256× 256× 256× 128× 74×       54×             128× 256× 54×                 34×                   34×   27× 27× 27× 54×   27×       27× 27×   27× 27×       45×   34×   20×   36×   27×     27× 27× 27× 27× 27×     27× 27× 27×     27×   27×                                                                                                                       10×                                                                                                                                                                                                                                                                                 12× 16× 16× 16× 16×                   16×                     16×                                                                             10×                                                               18× 18×     18×                 12×   11× 11× 11× 11× 11×                                                                                                                                                                                                                                                                                                   12× 16× 16× 16× 16×                   16×                                                                                                                                                                                                                                                                                             12× 12× 12× 12×                   12×                                                                                                                                                                                           450×                                                                                           12× 12× 12× 12×                   12×                                                                                           12× 12× 12× 12×                   12×                                                                                                                                                                                       12× 16× 16× 16× 16×                   16×                                                                                                                                                                                     12× 12× 12× 12×                   12×                                                                                                               18×     27× 18× 36× 36× 36× 36× 18×                   18× 36×                                                   10×                                                                                                                                       12× 12× 12× 12×                   12×                                                                 12× 12× 12× 12×                   12×     13× 13× 13× 13× 13× 13× 13× 13×                                         40×                                                                                                                                                                                                                   13×                         10× 10× 10×                                         12× 12×                                                                                   10× 20× 10×     12× 10× 30× 20× 46× 46× 46× 46× 20× 10×       16×   24× 46× 10×     14×       12× 12×   12×                                                                                                                                                                                                                                                                                                                                                                                                                                               21×                                                                                   11×               31×         31× 31× 31× 31× 31×                     10× 10× 10× 10×                                   10× 10× 10× 10×                                                                                                                                     14×           14×         20×   15×     14× 14× 14×                                                                                                                                                                                                                                                                                                                                                                                                                                             131× 147× 278× 131×     147× 131× 393× 278× 562× 562× 562× 562× 278× 147×       137×           284× 562× 131×       12×                 22× 22× 22×       22×                                                                                                               22× 22× 22×   22× 22×       22×     38×   38×   38×             38×                       32× 64×     64×   34× 34× 68× 34×   34× 34×         34× 36×       34× 34× 68×   34× 34×   34× 34× 34×         32× 32× 64×   32× 32×   32× 32× 32×                                                           81×             17×       17× 17× 17× 17× 14× 14× 14× 12× 12×         17× 12× 12× 12× 12×             17× 17× 17× 26× 26× 26×   17×   17× 17× 17×   17×                             32×   13×   16× 16×                               15×     15× 15×     27×               13×                                                                                                                                                               28× 30× 58× 28×     30× 28× 84× 58× 116× 116× 116× 116× 58× 30×       28×             58× 116× 28×     40×   15× 15× 15× 15× 30×   15× 15× 15× 15×   15× 15×     15×           13×   13×                                     10×                                                                                                                                                                                                                                                     37× 37×                     28×                                                                                                                                       10× 10×   10×                                                                                                                                                                                   10×       10×                                                                                                                   20× 20×   20× 20× 20× 20×     22×                                                                                                   14×                                           14× 14×   14×   14×                                                                                                                                                                                       12× 12× 12× 12× 12×   12×     12×                                                                                             12× 12×                                             87× 87× 87×   114× 114× 114× 114× 114× 114× 114× 114× 114× 114× 114× 114× 114× 114× 114× 114× 114× 114× 114× 114× 114× 114×   12× 12×         11×                                                                                                                                                                                                                                                                                                 22× 22×   32× 32× 32×                                                                         11×                   11×   16×                                                               13×     13×   22× 22×                                                                                                                   34× 34× 34× 34× 34×   44× 44×   51×                                                                                                                                                                   20× 20×   20× 20× 20× 20×                                                                                                                                                                                     14× 14× 14×   23× 23× 23× 23×     10×                                                                                                       24× 24×   31× 31× 31× 31×     24×                                                                                                                       12× 12×   15× 15×   17×                                                                                       25× 25× 25×     25×                   34×     157× 34×     34× 34× 34× 148×   26× 133×   26×   22× 22× 22× 22× 22× 22× 145×         22×         18×   11×                                       11×                               80×     112×     110×   42×                                                                                                 11×   11× 11×                                                                             27×   12× 12× 12×                                                                                                                                                                                       12× 12× 12× 12×                                                                                                       66× 66× 66× 66×   66×     66× 66×       13×   12×   30×                                         19× 19× 19× 19× 19× 19×                                           19× 19× 19× 19× 19× 19×                                                           10× 10× 10×                                                                                                                                                                                       72× 72× 72× 72×       72×       72× 72× 72×         23×           30× 30× 30× 30× 30× 30×                                                                                                             15×   15× 15× 15× 15×   16×                                                                           50× 115×           54×   51× 116×     51× 51× 51×   59× 59× 59×   47×   17×   16×           13× 13×                                                                                                                                                                                                                                                                                                             48×                                                                                 19×         35× 35× 35× 35× 35×       35×                                 10×                               11× 11× 11× 11×                                 10× 15× 10×     10× 10× 30× 15× 30× 30× 30× 30× 15×       10×             15× 30× 10×             15×                         10×                                                                                                                                 10× 19×     10× 27× 19× 38× 38× 38× 38× 19× 10×                   19× 38×     22×           13×           55× 22× 22× 13×   22×     33× 33× 33× 33×   22× 22× 22×   11×     10× 10× 10× 10× 10× 10×       11× 11× 11× 11×   11× 11×                                                                                                                                     21×   21× 21×   21×   21×   21× 21×   20× 20× 20× 20×   20× 20×           20× 20× 20× 20×   20×                                                                                 33×       33×       16×   17×     35× 17×       17× 35×   17×               16× 16× 16×   16× 16×                                                                   14×                                                 54× 18×   18× 18×       18×   18× 18×           18× 18×     11×                                                                                                                               19× 19× 19×   19×   19×   20×   19× 19× 19× 19× 19× 19×   19× 19×   15× 15×   15× 15× 15×                                                                                                                                                                                                                               100× 103× 203× 100×     103× 100× 300× 203× 406× 406× 406× 406× 203× 103×       100×             203× 406× 100×           21×                       35×     34×           37× 37×   35× 35× 70×   35× 35× 35×   35× 35×         30× 30× 30× 60× 30×             30× 30×         40×                                                                                                                                                                                                               18× 18×   18×                                                                       10× 10× 20× 10×   10× 10× 10×                                                                                                   28×   28× 28× 49× 28×   28×   10× 10×                                           19×                       11×                                                     55×   34×                                   13× 13×                                       14× 14×                                                             27×                                       27× 27×           27× 27×   39×   27× 27×   25×           25× 25×                                                                                                                                           140× 176× 316× 140×     176× 140× 420× 316× 632× 632× 632× 632× 316× 176×       140×             316× 632× 140×                                                             31× 93×                         119×     37× 111×               34×       39× 39×   33× 33× 66× 33×   33× 33×         37× 37× 74×   37× 37× 37×   37× 37×         33× 33× 33× 99×   33× 33×               33× 33×   33× 33×         40×   15×                         24× 24×   24×                                               19× 19× 38× 19×   19× 19× 19×                                                                                                                                                                                                                                                                   12×                     12×                                                                                                           10× 10× 10× 10×                                                                       14× 14× 14× 14×                   14×                                                      
var coveotest =
/******/ (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;
/******/
/******/ 	// define getter function for harmony exports
/******/ 	__webpack_require__.d = function(exports, name, getter) {
/******/ 		Eif(!__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 = 868);
/******/ })
/************************************************************************/
/******/ ([
/* 0 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var underscore_1 = __webpack_require__(1);
var Assert_1 = __webpack_require__(12);
var Logger_1 = __webpack_require__(18);
var JQueryutils_1 = __webpack_require__(212);
var Utils_1 = __webpack_require__(5);
var DeviceUtils_1 = __webpack_require__(42);
/**
 * This is essentially an helper class for dom manipulation.<br/>
 * This is intended to provide some basic functionality normally offered by jQuery.<br/>
 * To minimize the multiple jQuery conflict we have while integrating in various system, we implemented the very small subset that the framework needs.<br/>
 * See {@link $$}, which is a function that wraps this class constructor, for less verbose code.
 */
var Dom = /** @class */ (function () {
    /**
     * Create a new Dom object with the given HTMLElement
     * @param el The HTMLElement to wrap in a Dom object
     */
    function Dom(el) {
        Assert_1.Assert.exists(el);
        this.el = el;
    }
    /**
     * Helper function to quickly create an HTMLElement
     * @param type The type of the element (e.g. div, span)
     * @param props The props (id, className, attributes) of the element<br/>
     * Can be either specified in dashed-case strings ('my-attribute') or camelCased keys (myAttribute),
     * the latter of which will automatically get replaced to dash-case.
     * @param innerHTML The contents of the new HTMLElement, either in string form or as another HTMLElement
     */
    Dom.createElement = function (type, props) {
        var children = [];
        for (var _i = 2; _i < arguments.length; _i++) {
            children[_i - 2] = arguments[_i];
        }
        var elem = document.createElement(type);
        for (var key in props) {
            if (key === 'className') {
                elem.className = props['className'];
            }
            else {
                var attr = key.indexOf('-') !== -1 ? key : Utils_1.Utils.toDashCase(key);
                elem.setAttribute(attr, props[key]);
            }
        }
        underscore_1.each(children, function (child) {
            if (child instanceof HTMLElement) {
                elem.appendChild(child);
            }
            else if (underscore_1.isString(child)) {
                elem.innerHTML += child;
            }
            else if (child instanceof Dom) {
                elem.appendChild(child.el);
            }
        });
        return elem;
    };
    /**
     * Adds the element to the children of the current element
     * @param element The element to append
     * @returns {string}
     */
    Dom.prototype.append = function (element) {
        this.el.appendChild(element);
    };
    /**
     * Get the css value of the specified property.<br/>
     * @param property The property
     * @returns {string}
     */
    Dom.prototype.css = function (property) {
        if (this.el.style[property]) {
            return this.el.style[property];
        }
        return window.getComputedStyle(this.el).getPropertyValue(property);
    };
    /**
     * Get or set the text content of the HTMLElement.<br/>
     * @param txt Optional. If given, this will set the text content of the element. If not, will return the text content.
     * @returns {string}
     */
    Dom.prototype.text = function (txt) {
        if (Utils_1.Utils.isUndefined(txt)) {
            return this.el.innerText || this.el.textContent;
        }
        else {
            Eif (this.el.innerText != undefined) {
                this.el.innerText = txt;
            }
            else if (this.el.textContent != undefined) {
                this.el.textContent = txt;
            }
        }
    };
    /**
     * Performant way to transform a NodeList to an array of HTMLElement, for manipulation<br/>
     * http://jsperf.com/nodelist-to-array/72
     * @param nodeList a {NodeList} to convert to an array
     * @returns {HTMLElement[]}
     */
    Dom.nodeListToArray = function (nodeList) {
        var i = nodeList.length;
        var arr = new Array(i);
        while (i--) {
            arr[i] = nodeList.item(i);
        }
        return arr;
    };
    /**
     * Focuses on an element.
     * @param preserveScroll Whether or not to scroll the page to the focused element.
     */
    Dom.prototype.focus = function (preserveScroll) {
        if (DeviceUtils_1.DeviceUtils.getDeviceName() === 'IE') {
            var pageXOffset_1 = window.pageXOffset, pageYOffset_1 = window.pageYOffset;
            this.el.focus();
            if (preserveScroll) {
                window.scrollTo(pageXOffset_1, pageYOffset_1);
            }
        }
        else {
            this.el.focus({ preventScroll: preserveScroll });
        }
    };
    /**
     * Empty (remove all child) from the element;
     */
    Dom.prototype.empty = function () {
        while (this.el.firstChild) {
            this.removeChild(this.el.firstChild);
        }
    };
    Dom.prototype.removeChild = function (child) {
        var oldParent = child.parentNode;
        try {
            this.el.removeChild(child);
        }
        catch (e) {
            Iif (e.name !== 'NotFoundError') {
                throw e;
            }
            Eif (oldParent === child.parentNode) {
                throw e;
            }
        }
    };
    /**
     * Empty the element and all childs from the dom;
     */
    Dom.prototype.remove = function () {
        if (this.el.parentNode) {
            this.el.parentNode.removeChild(this.el);
        }
    };
    /**
     * Show the element by setting display to block;
     */
    Dom.prototype.show = function () {
        this.el.style.display = 'block';
        $$(this.el).setAttribute('aria-hidden', 'false');
    };
    /**
     * Hide the element;
     */
    Dom.prototype.hide = function () {
        this.el.style.display = 'none';
        $$(this.el).setAttribute('aria-hidden', 'true');
    };
    /**
     * Show the element by setting display to an empty string.
     */
    Dom.prototype.unhide = function () {
        this.el.style.display = '';
        $$(this.el).setAttribute('aria-hidden', 'false');
    };
    /**
     * Toggle the element visibility.<br/>
     * Optional visible parameter, if specified will set the element visibility
     * @param visible Optional parameter to display or hide the element
     */
    Dom.prototype.toggle = function (visible) {
        Iif (visible === undefined) {
            if (this.el.style.display == 'block') {
                this.hide();
            }
            else {
                this.show();
            }
        }
        else {
            if (visible) {
                this.show();
            }
            else {
                this.hide();
            }
        }
    };
    /**
     * Tries to determine if an element is "visible", in a generic manner.
     *
     * This is not meant to be a "foolproof" method, but only a superficial "best effort" detection is performed.
     */
    Dom.prototype.isVisible = function () {
        if (this.css('display') === 'none') {
            return false;
        }
        if (this.css('visibility') === 'hidden') {
            return false;
        }
        if (this.hasClass('coveo-tab-disabled')) {
            return false;
        }
        if (this.hasClass('coveo-hidden')) {
            return false;
        }
        if (this.hasClass('coveo-hidden-dependant-facet')) {
            return false;
        }
        return true;
    };
    /**
     * Returns the value of the specified attribute.
     * @param name The name of the attribute
     */
    Dom.prototype.getAttribute = function (name) {
        return this.el.getAttribute(name);
    };
    /**
     * Sets the value of the specified attribute.
     * @param name The name of the attribute
     * @param value The value to set
     */
    Dom.prototype.setAttribute = function (name, value) {
        this.el.setAttribute(name, value);
    };
    /**
     * Find a child element, given a CSS selector
     * @param selector A CSS selector, can be a .className or #id
     * @returns {HTMLElement}
     */
    Dom.prototype.find = function (selector) {
        return this.el.querySelector(selector);
    };
    /**
     * Check if the element match the selector.<br/>
     * The selector can be a class, an id or a tag.<br/>
     * Eg : .is('.foo') or .is('#foo') or .is('div').
     */
    Dom.prototype.is = function (selector) {
        if (this.el.tagName.toLowerCase() == selector.toLowerCase()) {
            return true;
        }
        if (selector[0] == '.') {
            if (this.hasClass(selector.substr(1))) {
                return true;
            }
        }
        if (selector[0] == '#') {
            if (this.el.getAttribute('id') == selector.substr(1)) {
                return true;
            }
        }
        return false;
    };
    /**
     * Get the first element that matches the classname by testing the element itself and traversing up through its ancestors in the DOM tree.
     *
     * Stops at the body of the document
     * @param className A CSS classname
     */
    Dom.prototype.closest = function (className) {
        return this.traverseAncestorForClass(this.el, className);
    };
    /**
     * Get the first element that matches the classname by testing the element itself and traversing up through its ancestors in the DOM tree.
     *
     * Stops at the body of the document
     * @returns {any}
     */
    Dom.prototype.parent = function (className) {
        if (this.el.parentElement == undefined) {
            return undefined;
        }
        return this.traverseAncestorForClass(this.el.parentElement, className);
    };
    /**
     *  Get all the ancestors of the current element that match the given className
     *
     *  Return an empty array if none found.
     * @param className
     * @returns {HTMLElement[]}
     */
    Dom.prototype.parents = function (className) {
        var parentsFound = [];
        var parentFound = this.parent(className);
        while (parentFound) {
            parentsFound.push(parentFound);
            parentFound = new Dom(parentFound).parent(className);
        }
        return parentsFound;
    };
    /**
     * Return all children
     * @returns {HTMLElement[]}
     */
    Dom.prototype.children = function () {
        return Dom.nodeListToArray(this.el.children);
    };
    /**
     * Return all siblings
     * @returns {HTMLElement[]}
     */
    Dom.prototype.siblings = function (selector) {
        var sibs = [];
        var currentElement = this.el.parentNode.firstChild;
        for (; currentElement; currentElement = currentElement.nextSibling) {
            if (currentElement != this.el) {
                if (this.matches(currentElement, selector) || !selector) {
                    sibs.push(currentElement);
                }
            }
        }
        return sibs;
    };
    Dom.prototype.matches = function (element, selector) {
        var all = document.querySelectorAll(selector);
        for (var i = 0; i < all.length; i++) {
            if (all[i] === element) {
                return true;
            }
        }
        return false;
    };
    /**
     * Find all children that match the given CSS selector
     * @param selector A CSS selector, can be a .className
     * @returns {HTMLElement[]}
     */
    Dom.prototype.findAll = function (selector) {
        return Dom.nodeListToArray(this.el.querySelectorAll(selector));
    };
    /**
     * Find the child elements using a className
     * @param className Class of the childs elements to find
     * @returns {HTMLElement[]}
     */
    Dom.prototype.findClass = function (className) {
        Eif ('getElementsByClassName' in this.el) {
            return Dom.nodeListToArray(this.el.getElementsByClassName(className));
        }
    };
    /**
     * Find an element using an ID
     * @param id ID of the element to find
     * @returns {HTMLElement}
     */
    Dom.prototype.findId = function (id) {
        return document.getElementById(id);
    };
    Dom.prototype.addClass = function (className) {
        var _this = this;
        if (underscore_1.isArray(className)) {
            underscore_1.each(className, function (name) {
                _this.addClass(name);
            });
        }
        else {
            if (!this.hasClass(className)) {
                if (this.el.className) {
                    this.el.className += ' ' + className;
                }
                else {
                    this.el.className = className;
                }
            }
        }
    };
    /**
     * Remove the class on the element. Works even if the element does not possess the class.
     * @param className Classname to remove on the the element
     */
    Dom.prototype.removeClass = function (className) {
        this.el.className = this.el.className.replace(new RegExp("(^|\\s)" + className + "(\\s|$)", 'g'), '$1').trim();
    };
    /**
     * Toggle the class on the element.
     * @param className Classname to toggle
     * @param swtch If true, add the class regardless and if false, remove the class
     */
    Dom.prototype.toggleClass = function (className, swtch) {
        if (Utils_1.Utils.isNullOrUndefined(swtch)) {
            if (this.hasClass(className)) {
                this.removeClass(className);
            }
            else {
                this.addClass(className);
            }
        }
        else {
            if (swtch) {
                this.addClass(className);
            }
            else {
                this.removeClass(className);
            }
        }
    };
    /**
     * Sets the inner html of the element
     * @param html The html to set
     */
    Dom.prototype.setHtml = function (html) {
        this.el.innerHTML = html;
    };
    /**
     * Return an array with all the classname on the element. Empty array if the element has not classname
     * @returns {any|Array}
     */
    Dom.prototype.getClass = function () {
        // SVG elements got a className property, but it's not a string, it's an object
        var className = this.getAttribute('class');
        if (className && className.match) {
            return className.match(Dom.CLASS_NAME_REGEX) || [];
        }
        else {
            return [];
        }
    };
    /**
     * Check if the element has the given class name
     * @param className Classname to verify
     * @returns {boolean}
     */
    Dom.prototype.hasClass = function (className) {
        return underscore_1.contains(this.getClass(), className);
    };
    /**
     * Detach the element from the DOM.
     */
    Dom.prototype.detach = function () {
        this.el.parentElement && this.el.parentElement.removeChild(this.el);
    };
    /**
     * Insert the current node after the given reference node
     * @param refNode
     */
    Dom.prototype.insertAfter = function (refNode) {
        refNode.parentNode && refNode.parentNode.insertBefore(this.el, refNode.nextSibling);
    };
    /**
     * Insert the current node before the given reference node
     * @param refNode
     */
    Dom.prototype.insertBefore = function (refNode) {
        refNode.parentNode && refNode.parentNode.insertBefore(this.el, refNode);
    };
    /**
     * Insert the given node as the first child of the current node
     * @param toPrepend
     */
    Dom.prototype.prepend = function (toPrepend) {
        if (this.el.firstChild) {
            new Dom(toPrepend).insertBefore(this.el.firstChild);
        }
        else {
            this.el.appendChild(toPrepend);
        }
    };
    Dom.prototype.on = function (type, eventHandle) {
        var _this = this;
        if (underscore_1.isArray(type)) {
            underscore_1.each(type, function (t) {
                _this.on(t, eventHandle);
            });
        }
        else {
            var modifiedType = this.processEventTypeToBeJQueryCompatible(type);
            var jq = JQueryutils_1.JQueryUtils.getJQuery();
            if (this.shouldUseJQueryEvent()) {
                jq(this.el).on(modifiedType, eventHandle);
            }
            else Eif (this.el.addEventListener) {
                var fn = function (e) {
                    eventHandle(e, e.detail);
                };
                Dom.handlers.set(eventHandle, fn);
                // Mark touch events as passive for performance reasons:
                // https://github.com/WICG/EventListenerOptions/blob/gh-pages/explainer.md
                if (modifiedType && modifiedType.indexOf('touch') != -1) {
                    this.el.addEventListener(modifiedType, fn, { passive: true });
                }
                else {
                    this.el.addEventListener(modifiedType, fn, false);
                }
            }
            else if (this.el['on']) {
                this.el['on']('on' + modifiedType, eventHandle);
            }
        }
    };
    Dom.prototype.one = function (type, eventHandle) {
        var _this = this;
        Iif (underscore_1.isArray(type)) {
            underscore_1.each(type, function (t) {
                _this.one(t, eventHandle);
            });
        }
        else {
            var modifiedType_1 = this.processEventTypeToBeJQueryCompatible(type);
            var once_1 = function (e, args) {
                _this.off(modifiedType_1, once_1);
                return eventHandle(e, args);
            };
            this.on(modifiedType_1, once_1);
        }
    };
    Dom.prototype.off = function (type, eventHandle) {
        var _this = this;
        if (underscore_1.isArray(type)) {
            underscore_1.each(type, function (t) {
                _this.off(t, eventHandle);
            });
        }
        else {
            var modifiedType = this.processEventTypeToBeJQueryCompatible(type);
            var jq = JQueryutils_1.JQueryUtils.getJQuery();
            if (this.shouldUseJQueryEvent()) {
                jq(this.el).off(modifiedType, eventHandle);
            }
            else Eif (this.el.removeEventListener) {
                var handler = Dom.handlers.get(eventHandle);
                if (handler) {
                    this.el.removeEventListener(modifiedType, handler, false);
                }
            }
            else if (this.el['off']) {
                this.el['off']('on' + modifiedType, eventHandle);
            }
        }
    };
    /**
     * Trigger an event on the element.
     * @param type The event type to trigger
     * @param data
     */
    Dom.prototype.trigger = function (type, data) {
        var modifiedType = this.processEventTypeToBeJQueryCompatible(type);
        if (this.shouldUseJQueryEvent()) {
            JQueryutils_1.JQueryUtils.getJQuery()(this.el).trigger(modifiedType, data);
        }
        else if (window['CustomEvent'] !== undefined) {
            var event_1 = new CustomEvent(modifiedType, { detail: data, bubbles: true });
            this.el.dispatchEvent(event_1);
        }
        else {
            try {
                this.el.dispatchEvent(this.buildIE11CustomEvent(modifiedType, data));
            }
            catch (_a) {
                this.oldBrowserError();
            }
        }
    };
    /**
     * Check if the element is "empty" (has no innerHTML content). Whitespace is considered empty</br>
     * @returns {boolean}
     */
    Dom.prototype.isEmpty = function () {
        return Dom.ONLY_WHITE_SPACE_REGEX.test(this.el.innerHTML);
    };
    /**
     * Check if the element is not a locked node (`{ toString(): string }`) and thus have base element properties.
     * @returns {boolean}
     */
    Dom.prototype.isValid = function () {
        return this.el != null && this.el.getAttribute != undefined;
    };
    /**
     * Check if the element is a descendant of parent
     * @param other
     */
    Dom.prototype.isDescendant = function (parent) {
        var node = this.el.parentNode;
        while (node != null) {
            if (node == parent) {
                return true;
            }
            node = node.parentNode;
        }
        return false;
    };
    /**
     * Replace the current element with the other element, then detach the current element
     * @param otherElem
     */
    Dom.prototype.replaceWith = function (otherElem) {
        var parent = this.el.parentNode;
        Eif (parent) {
            new Dom(otherElem).insertAfter(this.el);
        }
        this.detach();
    };
    // based on http://api.jquery.com/position/
    /**
     * Return the position relative to the offset parent.
     */
    Dom.prototype.position = function () {
        var offsetParent = this.offsetParent();
        var offset = this.offset();
        var parentOffset = { top: 0, left: 0 };
        Iif (!$$(offsetParent).is('html')) {
            parentOffset = $$(offsetParent).offset();
        }
        var borderTopWidth = parseInt($$(offsetParent).css('borderTopWidth'));
        var borderLeftWidth = parseInt($$(offsetParent).css('borderLeftWidth'));
        borderTopWidth = isNaN(borderTopWidth) ? 0 : borderTopWidth;
        borderLeftWidth = isNaN(borderLeftWidth) ? 0 : borderLeftWidth;
        parentOffset = {
            top: parentOffset.top + borderTopWidth,
            left: parentOffset.left + borderLeftWidth
        };
        var marginTop = parseInt(this.css('marginTop'));
        var marginLeft = parseInt(this.css('marginLeft'));
        marginTop = isNaN(marginTop) ? 0 : marginTop;
        marginLeft = isNaN(marginLeft) ? 0 : marginLeft;
        return {
            top: offset.top - parentOffset.top - marginTop,
            left: offset.left - parentOffset.left - marginLeft
        };
    };
    // based on https://api.jquery.com/offsetParent/
    /**
     * Returns the offset parent. The offset parent is the closest parent that is positioned.
     * An element is positioned when its position property is not 'static', which is the default.
     */
    Dom.prototype.offsetParent = function () {
        var offsetParent = this.el.offsetParent;
        while (offsetParent instanceof HTMLElement && $$(offsetParent).css('position') === 'static') {
            // Will break out if it stumbles upon an non-HTMLElement and return documentElement
            offsetParent = offsetParent.offsetParent;
        }
        Eif (!(offsetParent instanceof HTMLElement)) {
            return document.documentElement;
        }
        return offsetParent;
    };
    // based on http://api.jquery.com/offset/
    /**
     * Return the position relative to the document.
     */
    Dom.prototype.offset = function () {
        // In <=IE11, calling getBoundingClientRect on a disconnected node throws an error
        if (!this.el.getClientRects().length) {
            return { top: 0, left: 0 };
        }
        var rect = this.el.getBoundingClientRect();
        Eif (rect.width || rect.height) {
            var doc = this.el.ownerDocument;
            var docElem = doc.documentElement;
            return {
                top: rect.top + window.pageYOffset - docElem.clientTop,
                left: rect.left + window.pageXOffset - docElem.clientLeft
            };
        }
        return rect;
    };
    /**
     * Returns the offset width of the element
     */
    Dom.prototype.width = function () {
        return this.el.offsetWidth;
    };
    /**
     * Returns the offset height of the element
     */
    Dom.prototype.height = function () {
        return this.el.offsetHeight;
    };
    /**
     * Clone the node
     * @param deep true if the children of the node should also be cloned, or false to clone only the specified node.
     * @returns {Dom}
     */
    Dom.prototype.clone = function (deep) {
        Iif (deep === void 0) { deep = false; }
        return $$(this.el.cloneNode(deep));
    };
    /**
     * Determine if an element support a particular native DOM event.
     * @param eventName The event to evaluate. Eg: touchstart, touchend, click, scroll.
     */
    Dom.prototype.canHandleEvent = function (eventName) {
        var eventToEvaluate = "on" + eventName;
        var isSupported = eventToEvaluate in this.el;
        // This is a protection against false negative.
        // Some browser will incorrectly report that the event is not supported at this point
        // To make sure, we need to try and set a fake function as a property on the element,
        // and then check if it got hooked properly as a 'function' or as something else, meaning
        // the property is really not defined on the element.
        if (!isSupported && this.el.setAttribute) {
            this.el.setAttribute(eventToEvaluate, 'return;');
            isSupported = typeof this.el[eventToEvaluate] == 'function';
            this.el.removeAttribute(eventToEvaluate);
        }
        return isSupported;
    };
    Dom.prototype.buildIE11CustomEvent = function (type, data) {
        var event = document.createEvent('CustomEvent');
        event.initCustomEvent(type, true, true, data);
        return event;
    };
    Dom.prototype.shouldUseJQueryEvent = function () {
        return JQueryutils_1.JQueryUtils.getJQuery() && !Dom.useNativeJavaScriptEvents;
    };
    Dom.prototype.processEventTypeToBeJQueryCompatible = function (event) {
        // From https://api.jquery.com/on/
        // [...]
        // > In addition, the .trigger() method can trigger both standard browser event names and custom event names to call attached handlers. Event names should only contain alphanumerics, underscore, and colon characters.
        if (event) {
            return event.replace(/[^a-zA-Z0-9\:\_]/g, '');
        }
        return event;
    };
    Dom.prototype.traverseAncestorForClass = function (current, className) {
        Iif (current === void 0) { current = this.el; }
        if (className.indexOf('.') == 0) {
            className = className.substr(1);
        }
        var found = false;
        while (!found) {
            if ($$(current).hasClass(className)) {
                found = true;
            }
            Iif (current.tagName.toLowerCase() == 'body') {
                break;
            }
            if (current.parentElement == null) {
                break;
            }
            if (!found) {
                current = current.parentElement;
            }
        }
        if (found) {
            return current;
        }
        return undefined;
    };
    Dom.prototype.oldBrowserError = function () {
        new Logger_1.Logger(this).error('CANNOT TRIGGER EVENT FOR OLDER BROWSER');
    };
    Dom.CLASS_NAME_REGEX = /-?[_a-zA-Z]+[_a-zA-Z0-9-]*/g;
    Dom.ONLY_WHITE_SPACE_REGEX = /^\s*$/;
    /**
     * Whether to always register, remove, and trigger events using standard JavaScript rather than attempting to use jQuery first.
     * @type boolean
     */
    Dom.useNativeJavaScriptEvents = false;
    Dom.handlers = new WeakMap();
    return Dom;
}());
exports.Dom = Dom;
var Win = /** @class */ (function () {
    function Win(win) {
        this.win = win;
    }
    Win.prototype.height = function () {
        return this.win.innerHeight;
    };
    Win.prototype.width = function () {
        return this.win.innerWidth;
    };
    Win.prototype.scrollY = function () {
        return this.supportPageOffset()
            ? this.win.pageYOffset
            : this.isCSS1Compat()
                ? this.win.document.documentElement.scrollTop
                : this.win.document.body.scrollTop;
    };
    Win.prototype.scrollX = function () {
        return this.supportPageOffset()
            ? window.pageXOffset
            : this.isCSS1Compat()
                ? document.documentElement.scrollLeft
                : document.body.scrollLeft;
    };
    Win.prototype.isCSS1Compat = function () {
        return (this.win.document.compatMode || '') === 'CSS1Compat';
    };
    Win.prototype.supportPageOffset = function () {
        return this.win.pageXOffset !== undefined;
    };
    return Win;
}());
exports.Win = Win;
var Doc = /** @class */ (function () {
    function Doc(doc) {
        this.doc = doc;
    }
    Doc.prototype.height = function () {
        var body = this.doc.body;
        return Math.max(body.scrollHeight, body.offsetHeight);
    };
    Doc.prototype.width = function () {
        var body = this.doc.body;
        return Math.max(body.scrollWidth, body.offsetWidth);
    };
    return Doc;
}());
exports.Doc = Doc;
function $$() {
    var args = [];
    for (var _i = 0; _i < arguments.length; _i++) {
        args[_i] = arguments[_i];
    }
    if (args.length === 1 && args[0] instanceof Dom) {
        return args[0];
    }
    else if (args.length === 1 && !underscore_1.isString(args[0])) {
        return new Dom(args[0]);
    }
    else {
        return new Dom(Dom.createElement.apply(Dom, args));
    }
}
exports.$$ = $$;
 
 
/***/ }),
/* 1 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__index_default_js__ = __webpack_require__(872);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return __WEBPACK_IMPORTED_MODULE_0__index_default_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__index_js__ = __webpack_require__(277);
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "VERSION", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["VERSION"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "restArguments", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["restArguments"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "isObject", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["isObject"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "isNull", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["isNull"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "isUndefined", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["isUndefined"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "isBoolean", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["isBoolean"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "isElement", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["isElement"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "isString", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["isString"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "isNumber", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["isNumber"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "isDate", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["isDate"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "isRegExp", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["isRegExp"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "isError", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["isError"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "isSymbol", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["isSymbol"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "isArrayBuffer", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["isArrayBuffer"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "isDataView", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["isDataView"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "isArray", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["isArray"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "isFunction", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["isFunction"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "isArguments", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["isArguments"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "isFinite", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["isFinite"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "isNaN", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["isNaN"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "isTypedArray", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["isTypedArray"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "isEmpty", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["isEmpty"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "isMatch", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["isMatch"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "isEqual", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["isEqual"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "isMap", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["isMap"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "isWeakMap", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["isWeakMap"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "isSet", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["isSet"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "isWeakSet", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["isWeakSet"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "keys", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["keys"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "allKeys", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["allKeys"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "values", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["values"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "pairs", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["pairs"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "invert", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["invert"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "functions", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["functions"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "methods", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["methods"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "extend", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["extend"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "extendOwn", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["extendOwn"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "assign", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["assign"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "defaults", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["defaults"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "create", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["create"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "clone", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["clone"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "tap", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["tap"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "get", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["get"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "has", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["has"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "mapObject", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["mapObject"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "identity", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["identity"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "constant", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["constant"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "noop", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["noop"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "toPath", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["toPath"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "property", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["property"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "propertyOf", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["propertyOf"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "matcher", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["matcher"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "matches", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["matches"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "times", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["times"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "random", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["random"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "now", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["now"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "escape", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["escape"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "unescape", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["unescape"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "templateSettings", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["templateSettings"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "template", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["template"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "result", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["result"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "uniqueId", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["uniqueId"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "chain", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["chain"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "iteratee", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["iteratee"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "partial", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["partial"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "bind", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["bind"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "bindAll", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["bindAll"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "memoize", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["memoize"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "delay", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["delay"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "defer", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["defer"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "throttle", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["throttle"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "debounce", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["debounce"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "wrap", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["wrap"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "negate", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["negate"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "compose", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["compose"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "after", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["after"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "before", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["before"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "once", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["once"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "findKey", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["findKey"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "findIndex", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["findIndex"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "findLastIndex", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["findLastIndex"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "sortedIndex", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["sortedIndex"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "indexOf", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["indexOf"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "lastIndexOf", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["lastIndexOf"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "find", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["find"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "detect", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["detect"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "findWhere", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["findWhere"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "each", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["each"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "forEach", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["forEach"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "map", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["map"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "collect", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["collect"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "reduce", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["reduce"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "foldl", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["foldl"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "inject", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["inject"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "reduceRight", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["reduceRight"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "foldr", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["foldr"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "filter", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["filter"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "select", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["select"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "reject", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["reject"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "every", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["every"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "all", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["all"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "some", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["some"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "any", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["any"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "contains", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["contains"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "includes", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["includes"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "include", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["include"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "invoke", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["invoke"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "pluck", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["pluck"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "where", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["where"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "max", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["max"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "min", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["min"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "shuffle", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["shuffle"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "sample", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["sample"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "sortBy", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["sortBy"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "groupBy", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["groupBy"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "indexBy", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["indexBy"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "countBy", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["countBy"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "partition", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["partition"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "toArray", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["toArray"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "size", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["size"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "pick", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["pick"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "omit", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["omit"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "first", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["first"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "head", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["head"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "take", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["take"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "initial", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["initial"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "last", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["last"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "rest", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["rest"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "tail", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["tail"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "drop", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["drop"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "compact", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["compact"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "flatten", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["flatten"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "without", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["without"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "uniq", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["uniq"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "unique", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["unique"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "union", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["union"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "intersection", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["intersection"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "difference", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["difference"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "unzip", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["unzip"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "transpose", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["transpose"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "zip", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["zip"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "object", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["object"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "range", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["range"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "chunk", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["chunk"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "mixin", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["mixin"]; });
// ESM Exports
// ===========
// This module is the package entry point for ES module users. In other words,
// it is the module they are interfacing with when they import from the whole
// package instead of from a submodule, like this:
//
// ```js
// import { map } from 'underscore';
// ```
//
// The difference with `./index-default`, which is the package entry point for
// CommonJS, AMD and UMD users, is purely technical. In ES modules, named and
// default exports are considered to be siblings, so when you have a default
// export, its properties are not automatically available as named exports. For
// this reason, we re-export the named exports in addition to providing the same
// default export as in `./index-default`.
 
 
 
 
/***/ }),
/* 2 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var NoopHistoryController_1 = __webpack_require__(301);
var QueryController_1 = __webpack_require__(78);
var ComponentOptionsModel_1 = __webpack_require__(55);
var ComponentStateModel_1 = __webpack_require__(134);
var QueryStateModel_1 = __webpack_require__(17);
var AnalyticsEndpoint_1 = __webpack_require__(169);
var SearchEndpoint_1 = __webpack_require__(61);
var NoopAnalyticsClient_1 = __webpack_require__(114);
var Component_1 = __webpack_require__(6);
var QueryBuilder_1 = __webpack_require__(24);
var ResponsiveComponents_1 = __webpack_require__(54);
var SearchInterface_1 = __webpack_require__(25);
var Dom_1 = __webpack_require__(0);
var Fake_1 = __webpack_require__(11);
var Simulate_1 = __webpack_require__(15);
var MockEnvironmentBuilder = /** @class */ (function () {
    function MockEnvironmentBuilder() {
        this.root = Dom_1.$$('div').el;
        this.element = Dom_1.$$('div').el;
        this.result = undefined;
        this.isFoldedResult = false;
        this.searchEndpoint = mockSearchEndpoint();
        this.searchInterface = mockSearchInterface();
        this.queryController = mockQueryController();
        this.queryStateModel = mockComponent(QueryStateModel_1.QueryStateModel, QueryStateModel_1.QueryStateModel.ID);
        this.componentStateModel = mockComponent(ComponentStateModel_1.ComponentStateModel, ComponentStateModel_1.ComponentStateModel.ID);
        this.usageAnalytics = mockUsageAnalytics();
        this.componentOptionsModel = mockComponent(ComponentOptionsModel_1.ComponentOptionsModel, ComponentOptionsModel_1.ComponentOptionsModel.ID);
        this.historyManager = new NoopHistoryController_1.NoopHistoryController();
        this.built = false;
    }
    MockEnvironmentBuilder.prototype.withRoot = function (root) {
        this.root = root ? root : this.root;
        return this;
    };
    MockEnvironmentBuilder.prototype.withElement = function (element) {
        this.element = element ? element : this.element;
        return this;
    };
    MockEnvironmentBuilder.prototype.withLiveQueryStateModel = function () {
        this.queryStateModel = new QueryStateModel_1.QueryStateModel(this.root);
        return this;
    };
    MockEnvironmentBuilder.prototype.withQueryStateModel = function (model) {
        this.queryStateModel = model;
        return this;
    };
    MockEnvironmentBuilder.prototype.withCollaborativeRating = function () {
        this.searchInterface.options.enableCollaborativeRating = true;
        return this;
    };
    MockEnvironmentBuilder.prototype.withOs = function (os) {
        this.os = os;
        return this;
    };
    MockEnvironmentBuilder.prototype.withResult = function (result) {
        if (result === void 0) { result = Fake_1.FakeResults.createFakeResult(); }
        this.result = result;
        this.isFoldedResult = false;
        return this;
    };
    MockEnvironmentBuilder.prototype.withFoldedResult = function (result) {
        Eif (result === void 0) { result = Fake_1.FakeResults.createFakeResult(); }
        this.result = result;
        this.isFoldedResult = true;
        return this;
    };
    MockEnvironmentBuilder.prototype.withEndpoint = function (endpoint) {
        Iif (endpoint === void 0) { endpoint = mockSearchEndpoint(); }
        this.searchEndpoint = endpoint;
        return this;
    };
    MockEnvironmentBuilder.prototype.withSearchInterface = function (searchInterface) {
        this.searchInterface = searchInterface ? searchInterface : this.searchInterface;
        return this;
    };
    MockEnvironmentBuilder.prototype.build = function () {
        var _this = this;
        if (this.built) {
            return this.getBindings();
        }
        if (this.element.parentNode == undefined) {
            this.root.appendChild(this.element);
        }
        Component_1.Component.bindComponentToElement(this.root, this.searchInterface);
        Component_1.Component.bindComponentToElement(this.root, this.queryController);
        Component_1.Component.bindComponentToElement(this.root, this.queryStateModel);
        Component_1.Component.bindComponentToElement(this.root, this.componentStateModel);
        Component_1.Component.bindComponentToElement(this.root, this.componentOptionsModel);
        this.searchInterface.queryController = this.queryController;
        this.searchInterface.queryStateModel = this.queryStateModel;
        this.searchInterface.componentStateModel = this.componentStateModel;
        this.searchInterface.componentOptionsModel = this.componentOptionsModel;
        this.searchInterface.element = this.root;
        this.searchInterface.getBindings = function () { return _this.getBindings(); };
        this.searchInterface.historyManager = this.historyManager;
        this.searchInterface.usageAnalytics = this.usageAnalytics;
        Iif (!this.searchEndpoint) {
            this.searchEndpoint = mockSearchEndpoint();
        }
        this.queryController.getEndpoint = function () {
            return _this.searchEndpoint;
        };
        if (this.result) {
            var bind = this.isFoldedResult ? Component_1.Component.bindFoldedResultToElement : Component_1.Component.bindResultToElement;
            bind(this.element, this.result);
        }
        this.built = true;
        return this.getBindings();
    };
    MockEnvironmentBuilder.prototype.getBindings = function () {
        if (!this.built) {
            return this.build();
        }
        return {
            root: this.root,
            element: this.element,
            result: this.result,
            searchEndpoint: this.searchEndpoint,
            searchInterface: this.searchInterface,
            queryController: this.queryController,
            queryStateModel: this.queryStateModel,
            usageAnalytics: this.usageAnalytics,
            componentStateModel: this.componentStateModel,
            componentOptionsModel: this.componentOptionsModel
        };
    };
    return MockEnvironmentBuilder;
}());
exports.MockEnvironmentBuilder = MockEnvironmentBuilder;
var AdvancedComponentSetupOptions = /** @class */ (function () {
    function AdvancedComponentSetupOptions(element, cmpOptions, modifyBuilder) {
        if (element === void 0) { element = Dom_1.$$('div').el; }
        if (cmpOptions === void 0) { cmpOptions = {}; }
        if (modifyBuilder === void 0) { modifyBuilder = function (env) {
            return env;
        }; }
        this.element = element;
        this.cmpOptions = cmpOptions;
        this.modifyBuilder = modifyBuilder;
    }
    AdvancedComponentSetupOptions.prototype.merge = function (toMerge) {
        if (toMerge) {
            this.element = toMerge.element ? toMerge.element : this.element;
            this.cmpOptions = toMerge.cmpOptions ? toMerge.cmpOptions : this.cmpOptions;
            this.modifyBuilder = toMerge.modifyBuilder ? toMerge.modifyBuilder : this.modifyBuilder;
        }
        return this;
    };
    return AdvancedComponentSetupOptions;
}());
exports.AdvancedComponentSetupOptions = AdvancedComponentSetupOptions;
function mock(contructorFunc, name) {
    if (name === void 0) { name = 'mock'; }
    var keys = [];
    for (var key in contructorFunc.prototype) {
        keys.push(key);
    }
    return keys.length > 0 ? jasmine.createSpyObj(name, keys) : {};
}
exports.mock = mock;
function mockWindow() {
    var mockWindow = mock(window);
    mockWindow.history = {
        pushState: jasmine.createSpy('pushState')
    };
    mockWindow.location = {
        href: '',
        hash: '',
        pathname: '',
        search: '',
        reload: function () { }
    };
    mockWindow.location.assign = mockWindow.location.replace = function (newHref) {
        newHref = newHref || '';
        mockWindow.location.href = newHref;
        // 'http://www.coveo.com/#foo' => 'foo'
        // 'http://www.coveo.com/#' => ''
        // 'http://www.coveo.com/' => ''
        mockWindow.location.hash = newHref.substring(newHref.indexOf('#') + 1);
        // 'foo' => '#foo'
        // '' => ''
        Eif (mockWindow.location.hash != '') {
            mockWindow.location.hash = '#' + mockWindow.location.hash;
        }
    };
    spyOn(mockWindow.location, 'replace').and.callThrough();
    spyOn(mockWindow.location, 'assign').and.callThrough();
    spyOn(mockWindow.location, 'reload').and.callThrough();
    mockWindow.addEventListener = jasmine.createSpy('addEventListener');
    mockWindow.removeEventListener = jasmine.createSpy('removeEventListener');
    mockWindow.dispatchEvent = jasmine.createSpy('dispatchEvent');
    mockWindow.localStorage = mock(localStorage);
    return mockWindow;
}
exports.mockWindow = mockWindow;
function mockComponent(constructorFunc, name) {
    if (name === void 0) { name = 'mock'; }
    var m = mock(constructorFunc, name);
    m.type = name;
    return m;
}
exports.mockComponent = mockComponent;
function mockSearchInterface() {
    var m = mockComponent(SearchInterface_1.SearchInterface, SearchInterface_1.SearchInterface.ID);
    m.options = {};
    m.options.originalOptionsObject = {};
    m.responsiveComponents = mockResponsiveComponents();
    m.resultsPerPage = 10;
    m.getBindings = function () {
        return new MockEnvironmentBuilder().build();
    };
    mockComponentRegistration(m);
    m.ariaLive = mockAriaLive();
    return m;
}
exports.mockSearchInterface = mockSearchInterface;
function mockComponentRegistration(searchInterface) {
    var attachedComponents = {};
    searchInterface.attachComponent.and.callFake(function (type, component) {
        attachedComponents[type] = attachedComponents[type] ? attachedComponents[type].concat([component]) : [component];
    });
    searchInterface.getComponents.and.callFake(function (type) { return attachedComponents[type] || []; });
}
function mockAriaLive() {
    return {
        updateText: function () { }
    };
}
function mockResponsiveComponents() {
    var m = mock(ResponsiveComponents_1.ResponsiveComponents);
    m.isSmallScreenWidth = function () { return false; };
    m.isMediumScreenWidth = function () { return false; };
    m.isLargeScreenWidth = function () { return true; };
    m.getResponsiveMode = function () { return 'auto'; };
    return m;
}
exports.mockResponsiveComponents = mockResponsiveComponents;
function mockQueryController() {
    var m = mockComponent(QueryController_1.QueryController, QueryController_1.QueryController.ID);
    var spy = m;
    spy.options = {};
    spy.options.resultsPerPage = 10;
    spy.usageAnalytics = mockUsageAnalytics();
    spy.fetchMore.and.returnValue(new Promise(function (resolve, reject) { }));
    spy.getLastQuery.and.returnValue(new QueryBuilder_1.QueryBuilder().build());
    spy.executeQuery.and.returnValue(Promise.resolve());
    return m;
}
exports.mockQueryController = mockQueryController;
function mockSearchEndpoint() {
    var m = mock(SearchEndpoint_1.SearchEndpoint, 'SearchEndpoint');
    m.listFields.and.returnValue(new Promise(function (resolve, reject) { }));
    m.listFieldValues.and.returnValue(new Promise(function (resolve, reject) { }));
    m.search.and.returnValue(new Promise(function (resolve, reject) { }));
    m.getQuerySuggest.and.returnValue(new Promise(function (resolve, reject) { }));
    m.extensions.and.returnValue(new Promise(function (resolve, reject) { }));
    m.getViewAsDatastreamUri.and.returnValue('http://datastream.uri');
    m.fetchBinary.and.returnValue(Promise.resolve({}));
    m.options = {
        queryStringArguments: {
            organizationId: 'foobar'
        }
    };
    return m;
}
exports.mockSearchEndpoint = mockSearchEndpoint;
function mockUsageAnalytics() {
    var m = mock(NoopAnalyticsClient_1.NoopAnalyticsClient, 'AnalyticsClient');
    m.getTopQueries.and.returnValue(new Promise(function (resolve, reject) { }));
    return m;
}
exports.mockUsageAnalytics = mockUsageAnalytics;
function mockAnalyticsEndpoint() {
    var m = mock(AnalyticsEndpoint_1.AnalyticsEndpoint, 'AnalyticsEndpoint');
    // Spy return Promise instead of void in order to chain Promises
    m.sendCustomEvent.and.returnValue(Promise.resolve(null));
    m.sendDocumentViewEvent.and.returnValue(Promise.resolve(null));
    return m;
}
exports.mockAnalyticsEndpoint = mockAnalyticsEndpoint;
function basicComponentSetup(klass, options) {
    if (options === void 0) { options = {}; }
    var envBuilder = new MockEnvironmentBuilder();
    return {
        env: envBuilder.build(),
        cmp: new klass(envBuilder.getBindings().element, options, envBuilder.getBindings())
    };
}
exports.basicComponentSetup = basicComponentSetup;
function basicComponentSetupWithModalBox(klass, options) {
    Eif (options === void 0) { options = {}; }
    var envBuilder = new MockEnvironmentBuilder();
    var modalBox = Simulate_1.Simulate.modalBoxModule();
    return {
        env: envBuilder.build(),
        modalBox: modalBox,
        cmp: new klass(envBuilder.getBindings().element, options, envBuilder.getBindings(), modalBox)
    };
}
exports.basicComponentSetupWithModalBox = basicComponentSetupWithModalBox;
function basicResultComponentSetup(klass, options) {
    if (options === void 0) { options = {}; }
    var envBuilder = new MockEnvironmentBuilder().withResult();
    return {
        env: envBuilder.build(),
        cmp: new klass(envBuilder.getBindings().element, options, envBuilder.getBindings(), envBuilder.result)
    };
}
exports.basicResultComponentSetup = basicResultComponentSetup;
function basicFoldedResultComponentSetup(klass, options) {
    Eif (options === void 0) { options = {}; }
    var envBuilder = new MockEnvironmentBuilder().withFoldedResult();
    return {
        env: envBuilder.build(),
        cmp: new klass(envBuilder.getBindings().element, options, envBuilder.getBindings(), envBuilder.result)
    };
}
exports.basicFoldedResultComponentSetup = basicFoldedResultComponentSetup;
function basicResultComponentSetupWithModalBox(klass, options) {
    if (options === void 0) { options = {}; }
    var envBuilder = new MockEnvironmentBuilder();
    var modalBox = Simulate_1.Simulate.modalBoxModule();
    return {
        env: envBuilder.build(),
        modalBox: modalBox,
        cmp: new klass(envBuilder.getBindings().element, options, envBuilder.getBindings(), envBuilder.result, modalBox)
    };
}
exports.basicResultComponentSetupWithModalBox = basicResultComponentSetupWithModalBox;
function basicSearchInterfaceSetup(klass) {
    var div = Dom_1.$$('div').el;
    var envBuilder = new MockEnvironmentBuilder().withRoot(div);
    var component = new klass(div);
    envBuilder.searchInterface = component;
    return {
        env: envBuilder.build(),
        cmp: component
    };
}
exports.basicSearchInterfaceSetup = basicSearchInterfaceSetup;
function optionsSearchInterfaceSetup(klass, options) {
    var div = Dom_1.$$('div').el;
    var envBuilder = new MockEnvironmentBuilder().withRoot(div);
    var component = new klass(div, options);
    envBuilder.searchInterface = component;
    return {
        env: envBuilder.build(),
        cmp: component
    };
}
exports.optionsSearchInterfaceSetup = optionsSearchInterfaceSetup;
function optionsResultComponentSetup(klass, options, result) {
    var envBuilder = new MockEnvironmentBuilder().withResult(result);
    return {
        env: envBuilder.build(),
        cmp: new klass(envBuilder.getBindings().element, options, envBuilder.getBindings(), envBuilder.result)
    };
}
exports.optionsResultComponentSetup = optionsResultComponentSetup;
function optionsResultComponentSetupWithModalBox(klass, options, result) {
    var envBuilder = new MockEnvironmentBuilder().withResult(result);
    var modalBox = Simulate_1.Simulate.modalBoxModule();
    return {
        env: envBuilder.build(),
        modalBox: modalBox,
        cmp: new klass(envBuilder.getBindings().element, options, envBuilder.getBindings(), envBuilder.result, modalBox)
    };
}
exports.optionsResultComponentSetupWithModalBox = optionsResultComponentSetupWithModalBox;
function optionsComponentSetup(klass, options) {
    var envBuilder = new MockEnvironmentBuilder();
    return {
        env: envBuilder.build(),
        cmp: new klass(envBuilder.getBindings().element, options, envBuilder.getBindings())
    };
}
exports.optionsComponentSetup = optionsComponentSetup;
function optionsComponentSetupWithModalBox(klass, options) {
    var envBuilder = new MockEnvironmentBuilder();
    var modalBox = Simulate_1.Simulate.modalBoxModule();
    return {
        env: envBuilder.build(),
        modalBox: modalBox,
        cmp: new klass(envBuilder.getBindings().element, options, envBuilder.getBindings(), modalBox)
    };
}
exports.optionsComponentSetupWithModalBox = optionsComponentSetupWithModalBox;
function advancedComponentSetup(klass, options) {
    var baseOptions = new AdvancedComponentSetupOptions();
    var optsMerged = baseOptions.merge(options);
    var envBuilder = new MockEnvironmentBuilder().withElement(optsMerged.element);
    envBuilder = optsMerged.modifyBuilder(envBuilder);
    return {
        env: envBuilder.build(),
        cmp: new klass(envBuilder.getBindings().element, optsMerged.cmpOptions, envBuilder.getBindings())
    };
}
exports.advancedComponentSetup = advancedComponentSetup;
function advancedComponentSetupWithModalBox(klass, options) {
    var baseOptions = new AdvancedComponentSetupOptions();
    var optsMerged = baseOptions.merge(options);
    var modalBox = Simulate_1.Simulate.modalBoxModule();
    var envBuilder = new MockEnvironmentBuilder().withElement(optsMerged.element);
    envBuilder = optsMerged.modifyBuilder(envBuilder);
    return {
        env: envBuilder.build(),
        modalBox: modalBox,
        cmp: new klass(envBuilder.getBindings().element, optsMerged.cmpOptions, envBuilder.getBindings(), modalBox)
    };
}
exports.advancedComponentSetupWithModalBox = advancedComponentSetupWithModalBox;
function advancedResultComponentSetup(klass, result, options) {
    var baseOptions = new AdvancedComponentSetupOptions();
    var optsMerged = baseOptions.merge(options);
    var envBuilder = new MockEnvironmentBuilder().withElement(optsMerged.element).withResult(result);
    envBuilder = optsMerged.modifyBuilder(envBuilder);
    return {
        env: envBuilder.build(),
        cmp: new klass(envBuilder.getBindings().element, optsMerged.cmpOptions, envBuilder.getBindings(), envBuilder.result, envBuilder.os)
    };
}
exports.advancedResultComponentSetup = advancedResultComponentSetup;
 
 
/***/ }),
/* 3 */
/***/ (function(module, exports, __webpack_require__) {
 
/* WEBPACK VAR INJECTION */(function(module) {var require;//! moment.js
//! version : 2.29.4
//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
//! license : MIT
//! momentjs.com
 
;(function (global, factory) {
     true ? module.exports = factory() :
    typeof define === 'function' && define.amd ? define(factory) :
    global.moment = factory()
}(this, (function () { 'use strict';
 
    var hookCallback;
 
    function hooks() {
        return hookCallback.apply(null, arguments);
    }
 
    // This is done to register the method called with moment()
    // without creating circular dependencies.
    function setHookCallback(callback) {
        hookCallback = callback;
    }
 
    function isArray(input) {
        return (
            input instanceof Array ||
            Object.prototype.toString.call(input) === '[object Array]'
        );
    }
 
    function isObject(input) {
        // IE8 will treat undefined and null as object if it wasn't for
        // input != null
        return (
            input != null &&
            Object.prototype.toString.call(input) === '[object Object]'
        );
    }
 
    function hasOwnProp(a, b) {
        return Object.prototype.hasOwnProperty.call(a, b);
    }
 
    function isObjectEmpty(obj) {
        Eif (Object.getOwnPropertyNames) {
            return Object.getOwnPropertyNames(obj).length === 0;
        } else {
            var k;
            for (k in obj) {
                if (hasOwnProp(obj, k)) {
                    return false;
                }
            }
            return true;
        }
    }
 
    function isUndefined(input) {
        return input === void 0;
    }
 
    function isNumber(input) {
        return (
            typeof input === 'number' ||
            Object.prototype.toString.call(input) === '[object Number]'
        );
    }
 
    function isDate(input) {
        return (
            input instanceof Date ||
            Object.prototype.toString.call(input) === '[object Date]'
        );
    }
 
    function map(arr, fn) {
        var res = [],
            i,
            arrLen = arr.length;
        for (i = 0; i < arrLen; ++i) {
            res.push(fn(arr[i], i));
        }
        return res;
    }
 
    function extend(a, b) {
        for (var i in b) {
            Eif (hasOwnProp(b, i)) {
                a[i] = b[i];
            }
        }
 
        Iif (hasOwnProp(b, 'toString')) {
            a.toString = b.toString;
        }
 
        Iif (hasOwnProp(b, 'valueOf')) {
            a.valueOf = b.valueOf;
        }
 
        return a;
    }
 
    function createUTC(input, format, locale, strict) {
        return createLocalOrUTC(input, format, locale, strict, true).utc();
    }
 
    function defaultParsingFlags() {
        // We need to deep clone this object.
        return {
            empty: false,
            unusedTokens: [],
            unusedInput: [],
            overflow: -2,
            charsLeftOver: 0,
            nullInput: false,
            invalidEra: null,
            invalidMonth: null,
            invalidFormat: false,
            userInvalidated: false,
            iso: false,
            parsedDateParts: [],
            era: null,
            meridiem: null,
            rfc2822: false,
            weekdayMismatch: false,
        };
    }
 
    function getParsingFlags(m) {
        if (m._pf == null) {
            m._pf = defaultParsingFlags();
        }
        return m._pf;
    }
 
    var some;
    Eif (Array.prototype.some) {
        some = Array.prototype.some;
    } else {
        some = function (fun) {
            var t = Object(this),
                len = t.length >>> 0,
                i;
 
            for (i = 0; i < len; i++) {
                if (i in t && fun.call(this, t[i], i, t)) {
                    return true;
                }
            }
 
            return false;
        };
    }
 
    function isValid(m) {
        if (m._isValid == null) {
            var flags = getParsingFlags(m),
                parsedParts = some.call(flags.parsedDateParts, function (i) {
                    return i != null;
                }),
                isNowValid =
                    !isNaN(m._d.getTime()) &&
                    flags.overflow < 0 &&
                    !flags.empty &&
                    !flags.invalidEra &&
                    !flags.invalidMonth &&
                    !flags.invalidWeekday &&
                    !flags.weekdayMismatch &&
                    !flags.nullInput &&
                    !flags.invalidFormat &&
                    !flags.userInvalidated &&
                    (!flags.meridiem || (flags.meridiem && parsedParts));
 
            Iif (m._strict) {
                isNowValid =
                    isNowValid &&
                    flags.charsLeftOver === 0 &&
                    flags.unusedTokens.length === 0 &&
                    flags.bigHour === undefined;
            }
 
            Eif (Object.isFrozen == null || !Object.isFrozen(m)) {
                m._isValid = isNowValid;
            } else {
                return isNowValid;
            }
        }
        return m._isValid;
    }
 
    function createInvalid(flags) {
        var m = createUTC(NaN);
        Eif (flags != null) {
            extend(getParsingFlags(m), flags);
        } else {
            getParsingFlags(m).userInvalidated = true;
        }
 
        return m;
    }
 
    // Plugins that add properties should also add the key here (null value),
    // so we can properly clone ourselves.
    var momentProperties = (hooks.momentProperties = []),
        updateInProgress = false;
 
    function copyConfig(to, from) {
        var i,
            prop,
            val,
            momentPropertiesLen = momentProperties.length;
 
        Eif (!isUndefined(from._isAMomentObject)) {
            to._isAMomentObject = from._isAMomentObject;
        }
        if (!isUndefined(from._i)) {
            to._i = from._i;
        }
        if (!isUndefined(from._f)) {
            to._f = from._f;
        }
        Iif (!isUndefined(from._l)) {
            to._l = from._l;
        }
        Iif (!isUndefined(from._strict)) {
            to._strict = from._strict;
        }
        Iif (!isUndefined(from._tzm)) {
            to._tzm = from._tzm;
        }
        Eif (!isUndefined(from._isUTC)) {
            to._isUTC = from._isUTC;
        }
        Iif (!isUndefined(from._offset)) {
            to._offset = from._offset;
        }
        Eif (!isUndefined(from._pf)) {
            to._pf = getParsingFlags(from);
        }
        Eif (!isUndefined(from._locale)) {
            to._locale = from._locale;
        }
 
        Iif (momentPropertiesLen > 0) {
            for (i = 0; i < momentPropertiesLen; i++) {
                prop = momentProperties[i];
                val = from[prop];
                if (!isUndefined(val)) {
                    to[prop] = val;
                }
            }
        }
 
        return to;
    }
 
    // Moment prototype object
    function Moment(config) {
        copyConfig(this, config);
        this._d = new Date(config._d != null ? config._d.getTime() : NaN);
        if (!this.isValid()) {
            this._d = new Date(NaN);
        }
        // Prevent infinite loop in case updateOffset creates new moment
        // objects.
        Eif (updateInProgress === false) {
            updateInProgress = true;
            hooks.updateOffset(this);
            updateInProgress = false;
        }
    }
 
    function isMoment(obj) {
        return (
            obj instanceof Moment || (obj != null && obj._isAMomentObject != null)
        );
    }
 
    function warn(msg) {
        if (
            hooks.suppressDeprecationWarnings === false &&
            typeof console !== 'undefined' &&
            console.warn
        ) {
            console.warn('Deprecation warning: ' + msg);
        }
    }
 
    function deprecate(msg, fn) {
        var firstTime = true;
 
        return extend(function () {
            if (hooks.deprecationHandler != null) {
                hooks.deprecationHandler(null, msg);
            }
            if (firstTime) {
                var args = [],
                    arg,
                    i,
                    key,
                    argLen = arguments.length;
                for (i = 0; i < argLen; i++) {
                    arg = '';
                    if (typeof arguments[i] === 'object') {
                        arg += '\n[' + i + '] ';
                        for (key in arguments[0]) {
                            if (hasOwnProp(arguments[0], key)) {
                                arg += key + ': ' + arguments[0][key] + ', ';
                            }
                        }
                        arg = arg.slice(0, -2); // Remove trailing comma and space
                    } else {
                        arg = arguments[i];
                    }
                    args.push(arg);
                }
                warn(
                    msg +
                        '\nArguments: ' +
                        Array.prototype.slice.call(args).join('') +
                        '\n' +
                        new Error().stack
                );
                firstTime = false;
            }
            return fn.apply(this, arguments);
        }, fn);
    }
 
    var deprecations = {};
 
    function deprecateSimple(name, msg) {
        if (hooks.deprecationHandler != null) {
            hooks.deprecationHandler(name, msg);
        }
        if (!deprecations[name]) {
            warn(msg);
            deprecations[name] = true;
        }
    }
 
    hooks.suppressDeprecationWarnings = false;
    hooks.deprecationHandler = null;
 
    function isFunction(input) {
        return (
            (typeof Function !== 'undefined' && input instanceof Function) ||
            Object.prototype.toString.call(input) === '[object Function]'
        );
    }
 
    function set(config) {
        var prop, i;
        for (i in config) {
            Eif (hasOwnProp(config, i)) {
                prop = config[i];
                if (isFunction(prop)) {
                    this[i] = prop;
                } else {
                    this['_' + i] = prop;
                }
            }
        }
        this._config = config;
        // Lenient ordinal parsing accepts just a number in addition to
        // number + (possibly) stuff coming from _dayOfMonthOrdinalParse.
        // TODO: Remove "ordinalParse" fallback in next major release.
        this._dayOfMonthOrdinalParseLenient = new RegExp(
            (this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) +
                '|' +
                /\d{1,2}/.source
        );
    }
 
    function mergeConfigs(parentConfig, childConfig) {
        var res = extend({}, parentConfig),
            prop;
        for (prop in childConfig) {
            Eif (hasOwnProp(childConfig, prop)) {
                if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) {
                    res[prop] = {};
                    extend(res[prop], parentConfig[prop]);
                    extend(res[prop], childConfig[prop]);
                } else Eif (childConfig[prop] != null) {
                    res[prop] = childConfig[prop];
                } else {
                    delete res[prop];
                }
            }
        }
        for (prop in parentConfig) {
            if (
                hasOwnProp(parentConfig, prop) &&
                !hasOwnProp(childConfig, prop) &&
                isObject(parentConfig[prop])
            ) {
                // make sure changes to properties don't modify parent config
                res[prop] = extend({}, res[prop]);
            }
        }
        return res;
    }
 
    function Locale(config) {
        Eif (config != null) {
            this.set(config);
        }
    }
 
    var keys;
 
    Eif (Object.keys) {
        keys = Object.keys;
    } else {
        keys = function (obj) {
            var i,
                res = [];
            for (i in obj) {
                if (hasOwnProp(obj, i)) {
                    res.push(i);
                }
            }
            return res;
        };
    }
 
    var defaultCalendar = {
        sameDay: '[Today at] LT',
        nextDay: '[Tomorrow at] LT',
        nextWeek: 'dddd [at] LT',
        lastDay: '[Yesterday at] LT',
        lastWeek: '[Last] dddd [at] LT',
        sameElse: 'L',
    };
 
    function calendar(key, mom, now) {
        var output = this._calendar[key] || this._calendar['sameElse'];
        return isFunction(output) ? output.call(mom, now) : output;
    }
 
    function zeroFill(number, targetLength, forceSign) {
        var absNumber = '' + Math.abs(number),
            zerosToFill = targetLength - absNumber.length,
            sign = number >= 0;
        return (
            (sign ? (forceSign ? '+' : '') : '-') +
            Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) +
            absNumber
        );
    }
 
    var formattingTokens =
            /(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,
        localFormattingTokens = /(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,
        formatFunctions = {},
        formatTokenFunctions = {};
 
    // token:    'M'
    // padded:   ['MM', 2]
    // ordinal:  'Mo'
    // callback: function () { this.month() + 1 }
    function addFormatToken(token, padded, ordinal, callback) {
        var func = callback;
        if (typeof callback === 'string') {
            func = function () {
                return this[callback]();
            };
        }
        if (token) {
            formatTokenFunctions[token] = func;
        }
        if (padded) {
            formatTokenFunctions[padded[0]] = function () {
                return zeroFill(func.apply(this, arguments), padded[1], padded[2]);
            };
        }
        if (ordinal) {
            formatTokenFunctions[ordinal] = function () {
                return this.localeData().ordinal(
                    func.apply(this, arguments),
                    token
                );
            };
        }
    }
 
    function removeFormattingTokens(input) {
        if (input.match(/\[[\s\S]/)) {
            return input.replace(/^\[|\]$/g, '');
        }
        return input.replace(/\\/g, '');
    }
 
    function makeFormatFunction(format) {
        var array = format.match(formattingTokens),
            i,
            length;
 
        for (i = 0, length = array.length; i < length; i++) {
            if (formatTokenFunctions[array[i]]) {
                array[i] = formatTokenFunctions[array[i]];
            } else {
                array[i] = removeFormattingTokens(array[i]);
            }
        }
 
        return function (mom) {
            var output = '',
                i;
            for (i = 0; i < length; i++) {
                output += isFunction(array[i])
                    ? array[i].call(mom, format)
                    : array[i];
            }
            return output;
        };
    }
 
    // format date using native date object
    function formatMoment(m, format) {
        if (!m.isValid()) {
            return m.localeData().invalidDate();
        }
 
        format = expandFormat(format, m.localeData());
        formatFunctions[format] =
            formatFunctions[format] || makeFormatFunction(format);
 
        return formatFunctions[format](m);
    }
 
    function expandFormat(format, locale) {
        var i = 5;
 
        function replaceLongDateFormatTokens(input) {
            return locale.longDateFormat(input) || input;
        }
 
        localFormattingTokens.lastIndex = 0;
        while (i >= 0 && localFormattingTokens.test(format)) {
            format = format.replace(
                localFormattingTokens,
                replaceLongDateFormatTokens
            );
            localFormattingTokens.lastIndex = 0;
            i -= 1;
        }
 
        return format;
    }
 
    var defaultLongDateFormat = {
        LTS: 'h:mm:ss A',
        LT: 'h:mm A',
        L: 'MM/DD/YYYY',
        LL: 'MMMM D, YYYY',
        LLL: 'MMMM D, YYYY h:mm A',
        LLLL: 'dddd, MMMM D, YYYY h:mm A',
    };
 
    function longDateFormat(key) {
        var format = this._longDateFormat[key],
            formatUpper = this._longDateFormat[key.toUpperCase()];
 
        Eif (format || !formatUpper) {
            return format;
        }
 
        this._longDateFormat[key] = formatUpper
            .match(formattingTokens)
            .map(function (tok) {
                if (
                    tok === 'MMMM' ||
                    tok === 'MM' ||
                    tok === 'DD' ||
                    tok === 'dddd'
                ) {
                    return tok.slice(1);
                }
                return tok;
            })
            .join('');
 
        return this._longDateFormat[key];
    }
 
    var defaultInvalidDate = 'Invalid date';
 
    function invalidDate() {
        return this._invalidDate;
    }
 
    var defaultOrdinal = '%d',
        defaultDayOfMonthOrdinalParse = /\d{1,2}/;
 
    function ordinal(number) {
        return this._ordinal.replace('%d', number);
    }
 
    var defaultRelativeTime = {
        future: 'in %s',
        past: '%s ago',
        s: 'a few seconds',
        ss: '%d seconds',
        m: 'a minute',
        mm: '%d minutes',
        h: 'an hour',
        hh: '%d hours',
        d: 'a day',
        dd: '%d days',
        w: 'a week',
        ww: '%d weeks',
        M: 'a month',
        MM: '%d months',
        y: 'a year',
        yy: '%d years',
    };
 
    function relativeTime(number, withoutSuffix, string, isFuture) {
        var output = this._relativeTime[string];
        return isFunction(output)
            ? output(number, withoutSuffix, string, isFuture)
            : output.replace(/%d/i, number);
    }
 
    function pastFuture(diff, output) {
        var format = this._relativeTime[diff > 0 ? 'future' : 'past'];
        return isFunction(format) ? format(output) : format.replace(/%s/i, output);
    }
 
    var aliases = {};
 
    function addUnitAlias(unit, shorthand) {
        var lowerCase = unit.toLowerCase();
        aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit;
    }
 
    function normalizeUnits(units) {
        return typeof units === 'string'
            ? aliases[units] || aliases[units.toLowerCase()]
            : undefined;
    }
 
    function normalizeObjectUnits(inputObject) {
        var normalizedInput = {},
            normalizedProp,
            prop;
 
        for (prop in inputObject) {
            Eif (hasOwnProp(inputObject, prop)) {
                normalizedProp = normalizeUnits(prop);
                Eif (normalizedProp) {
                    normalizedInput[normalizedProp] = inputObject[prop];
                }
            }
        }
 
        return normalizedInput;
    }
 
    var priorities = {};
 
    function addUnitPriority(unit, priority) {
        priorities[unit] = priority;
    }
 
    function getPrioritizedUnits(unitsObj) {
        var units = [],
            u;
        for (u in unitsObj) {
            if (hasOwnProp(unitsObj, u)) {
                units.push({ unit: u, priority: priorities[u] });
            }
        }
        units.sort(function (a, b) {
            return a.priority - b.priority;
        });
        return units;
    }
 
    function isLeapYear(year) {
        return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;
    }
 
    function absFloor(number) {
        if (number < 0) {
            // -0 -> 0
            return Math.ceil(number) || 0;
        } else {
            return Math.floor(number);
        }
    }
 
    function toInt(argumentForCoercion) {
        var coercedNumber = +argumentForCoercion,
            value = 0;
 
        if (coercedNumber !== 0 && isFinite(coercedNumber)) {
            value = absFloor(coercedNumber);
        }
 
        return value;
    }
 
    function makeGetSet(unit, keepTime) {
        return function (value) {
            Iif (value != null) {
                set$1(this, unit, value);
                hooks.updateOffset(this, keepTime);
                return this;
            } else {
                return get(this, unit);
            }
        };
    }
 
    function get(mom, unit) {
        return mom.isValid()
            ? mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]()
            : NaN;
    }
 
    function set$1(mom, unit, value) {
        Eif (mom.isValid() && !isNaN(value)) {
            Iif (
                unit === 'FullYear' &&
                isLeapYear(mom.year()) &&
                mom.month() === 1 &&
                mom.date() === 29
            ) {
                value = toInt(value);
                mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](
                    value,
                    mom.month(),
                    daysInMonth(value, mom.month())
                );
            } else {
                mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value);
            }
        }
    }
 
    // MOMENTS
 
    function stringGet(units) {
        units = normalizeUnits(units);
        if (isFunction(this[units])) {
            return this[units]();
        }
        return this;
    }
 
    function stringSet(units, value) {
        if (typeof units === 'object') {
            units = normalizeObjectUnits(units);
            var prioritized = getPrioritizedUnits(units),
                i,
                prioritizedLen = prioritized.length;
            for (i = 0; i < prioritizedLen; i++) {
                this[prioritized[i].unit](units[prioritized[i].unit]);
            }
        } else {
            units = normalizeUnits(units);
            if (isFunction(this[units])) {
                return this[units](value);
            }
        }
        return this;
    }
 
    var match1 = /\d/, //       0 - 9
        match2 = /\d\d/, //      00 - 99
        match3 = /\d{3}/, //     000 - 999
        match4 = /\d{4}/, //    0000 - 9999
        match6 = /[+-]?\d{6}/, // -999999 - 999999
        match1to2 = /\d\d?/, //       0 - 99
        match3to4 = /\d\d\d\d?/, //     999 - 9999
        match5to6 = /\d\d\d\d\d\d?/, //   99999 - 999999
        match1to3 = /\d{1,3}/, //       0 - 999
        match1to4 = /\d{1,4}/, //       0 - 9999
        match1to6 = /[+-]?\d{1,6}/, // -999999 - 999999
        matchUnsigned = /\d+/, //       0 - inf
        matchSigned = /[+-]?\d+/, //    -inf - inf
        matchOffset = /Z|[+-]\d\d:?\d\d/gi, // +00:00 -00:00 +0000 -0000 or Z
        matchShortOffset = /Z|[+-]\d\d(?::?\d\d)?/gi, // +00 -00 +00:00 -00:00 +0000 -0000 or Z
        matchTimestamp = /[+-]?\d+(\.\d{1,3})?/, // 123456789 123456789.123
        // any word (or two) characters or numbers including two/three word month in arabic.
        // includes scottish gaelic two word and hyphenated months
        matchWord =
            /[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,
        regexes;
 
    regexes = {};
 
    function addRegexToken(token, regex, strictRegex) {
        regexes[token] = isFunction(regex)
            ? regex
            : function (isStrict, localeData) {
                  return isStrict && strictRegex ? strictRegex : regex;
              };
    }
 
    function getParseRegexForToken(token, config) {
        if (!hasOwnProp(regexes, token)) {
            return new RegExp(unescapeFormat(token));
        }
 
        return regexes[token](config._strict, config._locale);
    }
 
    // Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript
    function unescapeFormat(s) {
        return regexEscape(
            s
                .replace('\\', '')
                .replace(
                    /\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,
                    function (matched, p1, p2, p3, p4) {
                        return p1 || p2 || p3 || p4;
                    }
                )
        );
    }
 
    function regexEscape(s) {
        return s.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&');
    }
 
    var tokens = {};
 
    function addParseToken(token, callback) {
        var i,
            func = callback,
            tokenLen;
        if (typeof token === 'string') {
            token = [token];
        }
        if (isNumber(callback)) {
            func = function (input, array) {
                array[callback] = toInt(input);
            };
        }
        tokenLen = token.length;
        for (i = 0; i < tokenLen; i++) {
            tokens[token[i]] = func;
        }
    }
 
    function addWeekParseToken(token, callback) {
        addParseToken(token, function (input, array, config, token) {
            config._w = config._w || {};
            callback(input, config._w, config, token);
        });
    }
 
    function addTimeToArrayFromToken(token, input, config) {
        if (input != null && hasOwnProp(tokens, token)) {
            tokens[token](input, config._a, config, token);
        }
    }
 
    var YEAR = 0,
        MONTH = 1,
        DATE = 2,
        HOUR = 3,
        MINUTE = 4,
        SECOND = 5,
        MILLISECOND = 6,
        WEEK = 7,
        WEEKDAY = 8;
 
    function mod(n, x) {
        return ((n % x) + x) % x;
    }
 
    var indexOf;
 
    Eif (Array.prototype.indexOf) {
        indexOf = Array.prototype.indexOf;
    } else {
        indexOf = function (o) {
            // I know
            var i;
            for (i = 0; i < this.length; ++i) {
                if (this[i] === o) {
                    return i;
                }
            }
            return -1;
        };
    }
 
    function daysInMonth(year, month) {
        Iif (isNaN(year) || isNaN(month)) {
            return NaN;
        }
        var modMonth = mod(month, 12);
        year += (month - modMonth) / 12;
        return modMonth === 1
            ? isLeapYear(year)
                ? 29
                : 28
            : 31 - ((modMonth % 7) % 2);
    }
 
    // FORMATTING
 
    addFormatToken('M', ['MM', 2], 'Mo', function () {
        return this.month() + 1;
    });
 
    addFormatToken('MMM', 0, 0, function (format) {
        return this.localeData().monthsShort(this, format);
    });
 
    addFormatToken('MMMM', 0, 0, function (format) {
        return this.localeData().months(this, format);
    });
 
    // ALIASES
 
    addUnitAlias('month', 'M');
 
    // PRIORITY
 
    addUnitPriority('month', 8);
 
    // PARSING
 
    addRegexToken('M', match1to2);
    addRegexToken('MM', match1to2, match2);
    addRegexToken('MMM', function (isStrict, locale) {
        return locale.monthsShortRegex(isStrict);
    });
    addRegexToken('MMMM', function (isStrict, locale) {
        return locale.monthsRegex(isStrict);
    });
 
    addParseToken(['M', 'MM'], function (input, array) {
        array[MONTH] = toInt(input) - 1;
    });
 
    addParseToken(['MMM', 'MMMM'], function (input, array, config, token) {
        var month = config._locale.monthsParse(input, token, config._strict);
        // if we didn't find a month name, mark the date as invalid.
        if (month != null) {
            array[MONTH] = month;
        } else {
            getParsingFlags(config).invalidMonth = input;
        }
    });
 
    // LOCALES
 
    var defaultLocaleMonths =
            'January_February_March_April_May_June_July_August_September_October_November_December'.split(
                '_'
            ),
        defaultLocaleMonthsShort =
            'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
        MONTHS_IN_FORMAT = /D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,
        defaultMonthsShortRegex = matchWord,
        defaultMonthsRegex = matchWord;
 
    function localeMonths(m, format) {
        Iif (!m) {
            return isArray(this._months)
                ? this._months
                : this._months['standalone'];
        }
        return isArray(this._months)
            ? this._months[m.month()]
            : this._months[
                  (this._months.isFormat || MONTHS_IN_FORMAT).test(format)
                      ? 'format'
                      : 'standalone'
              ][m.month()];
    }
 
    function localeMonthsShort(m, format) {
        Iif (!m) {
            return isArray(this._monthsShort)
                ? this._monthsShort
                : this._monthsShort['standalone'];
        }
        return isArray(this._monthsShort)
            ? this._monthsShort[m.month()]
            : this._monthsShort[
                  MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'
              ][m.month()];
    }
 
    function handleStrictParse(monthName, format, strict) {
        var i,
            ii,
            mom,
            llc = monthName.toLocaleLowerCase();
        if (!this._monthsParse) {
            // this is not used
            this._monthsParse = [];
            this._longMonthsParse = [];
            this._shortMonthsParse = [];
            for (i = 0; i < 12; ++i) {
                mom = createUTC([2000, i]);
                this._shortMonthsParse[i] = this.monthsShort(
                    mom,
                    ''
                ).toLocaleLowerCase();
                this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase();
            }
        }
 
        if (strict) {
            if (format === 'MMM') {
                ii = indexOf.call(this._shortMonthsParse, llc);
                return ii !== -1 ? ii : null;
            } else {
                ii = indexOf.call(this._longMonthsParse, llc);
                return ii !== -1 ? ii : null;
            }
        } else {
            if (format === 'MMM') {
                ii = indexOf.call(this._shortMonthsParse, llc);
                if (ii !== -1) {
                    return ii;
                }
                ii = indexOf.call(this._longMonthsParse, llc);
                return ii !== -1 ? ii : null;
            } else {
                ii = indexOf.call(this._longMonthsParse, llc);
                if (ii !== -1) {
                    return ii;
                }
                ii = indexOf.call(this._shortMonthsParse, llc);
                return ii !== -1 ? ii : null;
            }
        }
    }
 
    function localeMonthsParse(monthName, format, strict) {
        var i, mom, regex;
 
        if (this._monthsParseExact) {
            return handleStrictParse.call(this, monthName, format, strict);
        }
 
        if (!this._monthsParse) {
            this._monthsParse = [];
            this._longMonthsParse = [];
            this._shortMonthsParse = [];
        }
 
        // TODO: add sorting
        // Sorting makes sure if one month (or abbr) is a prefix of another
        // see sorting in computeMonthsParse
        for (i = 0; i < 12; i++) {
            // make the regex if we don't have it already
            mom = createUTC([2000, i]);
            if (strict && !this._longMonthsParse[i]) {
                this._longMonthsParse[i] = new RegExp(
                    '^' + this.months(mom, '').replace('.', '') + '$',
                    'i'
                );
                this._shortMonthsParse[i] = new RegExp(
                    '^' + this.monthsShort(mom, '').replace('.', '') + '$',
                    'i'
                );
            }
            if (!strict && !this._monthsParse[i]) {
                regex =
                    '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, '');
                this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i');
            }
            // test the regex
            if (
                strict &&
                format === 'MMMM' &&
                this._longMonthsParse[i].test(monthName)
            ) {
                return i;
            } else if (
                strict &&
                format === 'MMM' &&
                this._shortMonthsParse[i].test(monthName)
            ) {
                return i;
            } else if (!strict && this._monthsParse[i].test(monthName)) {
                return i;
            }
        }
    }
 
    // MOMENTS
 
    function setMonth(mom, value) {
        var dayOfMonth;
 
        Iif (!mom.isValid()) {
            // No op
            return mom;
        }
 
        Iif (typeof value === 'string') {
            if (/^\d+$/.test(value)) {
                value = toInt(value);
            } else {
                value = mom.localeData().monthsParse(value);
                // TODO: Another silent failure?
                if (!isNumber(value)) {
                    return mom;
                }
            }
        }
 
        dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value));
        mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth);
        return mom;
    }
 
    function getSetMonth(value) {
        Iif (value != null) {
            setMonth(this, value);
            hooks.updateOffset(this, true);
            return this;
        } else {
            return get(this, 'Month');
        }
    }
 
    function getDaysInMonth() {
        return daysInMonth(this.year(), this.month());
    }
 
    function monthsShortRegex(isStrict) {
        if (this._monthsParseExact) {
            if (!hasOwnProp(this, '_monthsRegex')) {
                computeMonthsParse.call(this);
            }
            if (isStrict) {
                return this._monthsShortStrictRegex;
            } else {
                return this._monthsShortRegex;
            }
        } else {
            if (!hasOwnProp(this, '_monthsShortRegex')) {
                this._monthsShortRegex = defaultMonthsShortRegex;
            }
            return this._monthsShortStrictRegex && isStrict
                ? this._monthsShortStrictRegex
                : this._monthsShortRegex;
        }
    }
 
    function monthsRegex(isStrict) {
        if (this._monthsParseExact) {
            if (!hasOwnProp(this, '_monthsRegex')) {
                computeMonthsParse.call(this);
            }
            if (isStrict) {
                return this._monthsStrictRegex;
            } else {
                return this._monthsRegex;
            }
        } else {
            if (!hasOwnProp(this, '_monthsRegex')) {
                this._monthsRegex = defaultMonthsRegex;
            }
            return this._monthsStrictRegex && isStrict
                ? this._monthsStrictRegex
                : this._monthsRegex;
        }
    }
 
    function computeMonthsParse() {
        function cmpLenRev(a, b) {
            return b.length - a.length;
        }
 
        var shortPieces = [],
            longPieces = [],
            mixedPieces = [],
            i,
            mom;
        for (i = 0; i < 12; i++) {
            // make the regex if we don't have it already
            mom = createUTC([2000, i]);
            shortPieces.push(this.monthsShort(mom, ''));
            longPieces.push(this.months(mom, ''));
            mixedPieces.push(this.months(mom, ''));
            mixedPieces.push(this.monthsShort(mom, ''));
        }
        // Sorting makes sure if one month (or abbr) is a prefix of another it
        // will match the longer piece.
        shortPieces.sort(cmpLenRev);
        longPieces.sort(cmpLenRev);
        mixedPieces.sort(cmpLenRev);
        for (i = 0; i < 12; i++) {
            shortPieces[i] = regexEscape(shortPieces[i]);
            longPieces[i] = regexEscape(longPieces[i]);
        }
        for (i = 0; i < 24; i++) {
            mixedPieces[i] = regexEscape(mixedPieces[i]);
        }
 
        this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');
        this._monthsShortRegex = this._monthsRegex;
        this._monthsStrictRegex = new RegExp(
            '^(' + longPieces.join('|') + ')',
            'i'
        );
        this._monthsShortStrictRegex = new RegExp(
            '^(' + shortPieces.join('|') + ')',
            'i'
        );
    }
 
    // FORMATTING
 
    addFormatToken('Y', 0, 0, function () {
        var y = this.year();
        return y <= 9999 ? zeroFill(y, 4) : '+' + y;
    });
 
    addFormatToken(0, ['YY', 2], 0, function () {
        return this.year() % 100;
    });
 
    addFormatToken(0, ['YYYY', 4], 0, 'year');
    addFormatToken(0, ['YYYYY', 5], 0, 'year');
    addFormatToken(0, ['YYYYYY', 6, true], 0, 'year');
 
    // ALIASES
 
    addUnitAlias('year', 'y');
 
    // PRIORITIES
 
    addUnitPriority('year', 1);
 
    // PARSING
 
    addRegexToken('Y', matchSigned);
    addRegexToken('YY', match1to2, match2);
    addRegexToken('YYYY', match1to4, match4);
    addRegexToken('YYYYY', match1to6, match6);
    addRegexToken('YYYYYY', match1to6, match6);
 
    addParseToken(['YYYYY', 'YYYYYY'], YEAR);
    addParseToken('YYYY', function (input, array) {
        array[YEAR] =
            input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input);
    });
    addParseToken('YY', function (input, array) {
        array[YEAR] = hooks.parseTwoDigitYear(input);
    });
    addParseToken('Y', function (input, array) {
        array[YEAR] = parseInt(input, 10);
    });
 
    // HELPERS
 
    function daysInYear(year) {
        return isLeapYear(year) ? 366 : 365;
    }
 
    // HOOKS
 
    hooks.parseTwoDigitYear = function (input) {
        return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);
    };
 
    // MOMENTS
 
    var getSetYear = makeGetSet('FullYear', true);
 
    function getIsLeapYear() {
        return isLeapYear(this.year());
    }
 
    function createDate(y, m, d, h, M, s, ms) {
        // can't just apply() to create a date:
        // https://stackoverflow.com/q/181348
        var date;
        // the date constructor remaps years 0-99 to 1900-1999
        if (y < 100 && y >= 0) {
            // preserve leap years using a full 400 year cycle, then reset
            date = new Date(y + 400, m, d, h, M, s, ms);
            Eif (isFinite(date.getFullYear())) {
                date.setFullYear(y);
            }
        } else {
            date = new Date(y, m, d, h, M, s, ms);
        }
 
        return date;
    }
 
    function createUTCDate(y) {
        var date, args;
        // the Date.UTC function remaps years 0-99 to 1900-1999
        if (y < 100 && y >= 0) {
            args = Array.prototype.slice.call(arguments);
            // preserve leap years using a full 400 year cycle, then reset
            args[0] = y + 400;
            date = new Date(Date.UTC.apply(null, args));
            if (isFinite(date.getUTCFullYear())) {
                date.setUTCFullYear(y);
            }
        } else {
            date = new Date(Date.UTC.apply(null, arguments));
        }
 
        return date;
    }
 
    // start-of-first-week - start-of-year
    function firstWeekOffset(year, dow, doy) {
        var // first-week day -- which january is always in the first week (4 for iso, 1 for other)
            fwd = 7 + dow - doy,
            // first-week day local weekday -- which local weekday is fwd
            fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7;
 
        return -fwdlw + fwd - 1;
    }
 
    // https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday
    function dayOfYearFromWeeks(year, week, weekday, dow, doy) {
        var localWeekday = (7 + weekday - dow) % 7,
            weekOffset = firstWeekOffset(year, dow, doy),
            dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset,
            resYear,
            resDayOfYear;
 
        if (dayOfYear <= 0) {
            resYear = year - 1;
            resDayOfYear = daysInYear(resYear) + dayOfYear;
        } else if (dayOfYear > daysInYear(year)) {
            resYear = year + 1;
            resDayOfYear = dayOfYear - daysInYear(year);
        } else {
            resYear = year;
            resDayOfYear = dayOfYear;
        }
 
        return {
            year: resYear,
            dayOfYear: resDayOfYear,
        };
    }
 
    function weekOfYear(mom, dow, doy) {
        var weekOffset = firstWeekOffset(mom.year(), dow, doy),
            week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1,
            resWeek,
            resYear;
 
        if (week < 1) {
            resYear = mom.year() - 1;
            resWeek = week + weeksInYear(resYear, dow, doy);
        } else if (week > weeksInYear(mom.year(), dow, doy)) {
            resWeek = week - weeksInYear(mom.year(), dow, doy);
            resYear = mom.year() + 1;
        } else {
            resYear = mom.year();
            resWeek = week;
        }
 
        return {
            week: resWeek,
            year: resYear,
        };
    }
 
    function weeksInYear(year, dow, doy) {
        var weekOffset = firstWeekOffset(year, dow, doy),
            weekOffsetNext = firstWeekOffset(year + 1, dow, doy);
        return (daysInYear(year) - weekOffset + weekOffsetNext) / 7;
    }
 
    // FORMATTING
 
    addFormatToken('w', ['ww', 2], 'wo', 'week');
    addFormatToken('W', ['WW', 2], 'Wo', 'isoWeek');
 
    // ALIASES
 
    addUnitAlias('week', 'w');
    addUnitAlias('isoWeek', 'W');
 
    // PRIORITIES
 
    addUnitPriority('week', 5);
    addUnitPriority('isoWeek', 5);
 
    // PARSING
 
    addRegexToken('w', match1to2);
    addRegexToken('ww', match1to2, match2);
    addRegexToken('W', match1to2);
    addRegexToken('WW', match1to2, match2);
 
    addWeekParseToken(
        ['w', 'ww', 'W', 'WW'],
        function (input, week, config, token) {
            week[token.substr(0, 1)] = toInt(input);
        }
    );
 
    // HELPERS
 
    // LOCALES
 
    function localeWeek(mom) {
        return weekOfYear(mom, this._week.dow, this._week.doy).week;
    }
 
    var defaultLocaleWeek = {
        dow: 0, // Sunday is the first day of the week.
        doy: 6, // The week that contains Jan 6th is the first week of the year.
    };
 
    function localeFirstDayOfWeek() {
        return this._week.dow;
    }
 
    function localeFirstDayOfYear() {
        return this._week.doy;
    }
 
    // MOMENTS
 
    function getSetWeek(input) {
        var week = this.localeData().week(this);
        return input == null ? week : this.add((input - week) * 7, 'd');
    }
 
    function getSetISOWeek(input) {
        var week = weekOfYear(this, 1, 4).week;
        return input == null ? week : this.add((input - week) * 7, 'd');
    }
 
    // FORMATTING
 
    addFormatToken('d', 0, 'do', 'day');
 
    addFormatToken('dd', 0, 0, function (format) {
        return this.localeData().weekdaysMin(this, format);
    });
 
    addFormatToken('ddd', 0, 0, function (format) {
        return this.localeData().weekdaysShort(this, format);
    });
 
    addFormatToken('dddd', 0, 0, function (format) {
        return this.localeData().weekdays(this, format);
    });
 
    addFormatToken('e', 0, 0, 'weekday');
    addFormatToken('E', 0, 0, 'isoWeekday');
 
    // ALIASES
 
    addUnitAlias('day', 'd');
    addUnitAlias('weekday', 'e');
    addUnitAlias('isoWeekday', 'E');
 
    // PRIORITY
    addUnitPriority('day', 11);
    addUnitPriority('weekday', 11);
    addUnitPriority('isoWeekday', 11);
 
    // PARSING
 
    addRegexToken('d', match1to2);
    addRegexToken('e', match1to2);
    addRegexToken('E', match1to2);
    addRegexToken('dd', function (isStrict, locale) {
        return locale.weekdaysMinRegex(isStrict);
    });
    addRegexToken('ddd', function (isStrict, locale) {
        return locale.weekdaysShortRegex(isStrict);
    });
    addRegexToken('dddd', function (isStrict, locale) {
        return locale.weekdaysRegex(isStrict);
    });
 
    addWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) {
        var weekday = config._locale.weekdaysParse(input, token, config._strict);
        // if we didn't get a weekday name, mark the date as invalid
        if (weekday != null) {
            week.d = weekday;
        } else {
            getParsingFlags(config).invalidWeekday = input;
        }
    });
 
    addWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) {
        week[token] = toInt(input);
    });
 
    // HELPERS
 
    function parseWeekday(input, locale) {
        if (typeof input !== 'string') {
            return input;
        }
 
        if (!isNaN(input)) {
            return parseInt(input, 10);
        }
 
        input = locale.weekdaysParse(input);
        if (typeof input === 'number') {
            return input;
        }
 
        return null;
    }
 
    function parseIsoWeekday(input, locale) {
        if (typeof input === 'string') {
            return locale.weekdaysParse(input) % 7 || 7;
        }
        return isNaN(input) ? null : input;
    }
 
    // LOCALES
    function shiftWeekdays(ws, n) {
        return ws.slice(n, 7).concat(ws.slice(0, n));
    }
 
    var defaultLocaleWeekdays =
            'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),
        defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
        defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
        defaultWeekdaysRegex = matchWord,
        defaultWeekdaysShortRegex = matchWord,
        defaultWeekdaysMinRegex = matchWord;
 
    function localeWeekdays(m, format) {
        var weekdays = isArray(this._weekdays)
            ? this._weekdays
            : this._weekdays[
                  m && m !== true && this._weekdays.isFormat.test(format)
                      ? 'format'
                      : 'standalone'
              ];
        return m === true
            ? shiftWeekdays(weekdays, this._week.dow)
            : m
            ? weekdays[m.day()]
            : weekdays;
    }
 
    function localeWeekdaysShort(m) {
        return m === true
            ? shiftWeekdays(this._weekdaysShort, this._week.dow)
            : m
            ? this._weekdaysShort[m.day()]
            : this._weekdaysShort;
    }
 
    function localeWeekdaysMin(m) {
        return m === true
            ? shiftWeekdays(this._weekdaysMin, this._week.dow)
            : m
            ? this._weekdaysMin[m.day()]
            : this._weekdaysMin;
    }
 
    function handleStrictParse$1(weekdayName, format, strict) {
        var i,
            ii,
            mom,
            llc = weekdayName.toLocaleLowerCase();
        if (!this._weekdaysParse) {
            this._weekdaysParse = [];
            this._shortWeekdaysParse = [];
            this._minWeekdaysParse = [];
 
            for (i = 0; i < 7; ++i) {
                mom = createUTC([2000, 1]).day(i);
                this._minWeekdaysParse[i] = this.weekdaysMin(
                    mom,
                    ''
                ).toLocaleLowerCase();
                this._shortWeekdaysParse[i] = this.weekdaysShort(
                    mom,
                    ''
                ).toLocaleLowerCase();
                this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase();
            }
        }
 
        if (strict) {
            if (format === 'dddd') {
                ii = indexOf.call(this._weekdaysParse, llc);
                return ii !== -1 ? ii : null;
            } else if (format === 'ddd') {
                ii = indexOf.call(this._shortWeekdaysParse, llc);
                return ii !== -1 ? ii : null;
            } else {
                ii = indexOf.call(this._minWeekdaysParse, llc);
                return ii !== -1 ? ii : null;
            }
        } else {
            if (format === 'dddd') {
                ii = indexOf.call(this._weekdaysParse, llc);
                if (ii !== -1) {
                    return ii;
                }
                ii = indexOf.call(this._shortWeekdaysParse, llc);
                if (ii !== -1) {
                    return ii;
                }
                ii = indexOf.call(this._minWeekdaysParse, llc);
                return ii !== -1 ? ii : null;
            } else if (format === 'ddd') {
                ii = indexOf.call(this._shortWeekdaysParse, llc);
                if (ii !== -1) {
                    return ii;
                }
                ii = indexOf.call(this._weekdaysParse, llc);
                if (ii !== -1) {
                    return ii;
                }
                ii = indexOf.call(this._minWeekdaysParse, llc);
                return ii !== -1 ? ii : null;
            } else {
                ii = indexOf.call(this._minWeekdaysParse, llc);
                if (ii !== -1) {
                    return ii;
                }
                ii = indexOf.call(this._weekdaysParse, llc);
                if (ii !== -1) {
                    return ii;
                }
                ii = indexOf.call(this._shortWeekdaysParse, llc);
                return ii !== -1 ? ii : null;
            }
        }
    }
 
    function localeWeekdaysParse(weekdayName, format, strict) {
        var i, mom, regex;
 
        if (this._weekdaysParseExact) {
            return handleStrictParse$1.call(this, weekdayName, format, strict);
        }
 
        if (!this._weekdaysParse) {
            this._weekdaysParse = [];
            this._minWeekdaysParse = [];
            this._shortWeekdaysParse = [];
            this._fullWeekdaysParse = [];
        }
 
        for (i = 0; i < 7; i++) {
            // make the regex if we don't have it already
 
            mom = createUTC([2000, 1]).day(i);
            if (strict && !this._fullWeekdaysParse[i]) {
                this._fullWeekdaysParse[i] = new RegExp(
                    '^' + this.weekdays(mom, '').replace('.', '\\.?') + '$',
                    'i'
                );
                this._shortWeekdaysParse[i] = new RegExp(
                    '^' + this.weekdaysShort(mom, '').replace('.', '\\.?') + '$',
                    'i'
                );
                this._minWeekdaysParse[i] = new RegExp(
                    '^' + this.weekdaysMin(mom, '').replace('.', '\\.?') + '$',
                    'i'
                );
            }
            if (!this._weekdaysParse[i]) {
                regex =
                    '^' +
                    this.weekdays(mom, '') +
                    '|^' +
                    this.weekdaysShort(mom, '') +
                    '|^' +
                    this.weekdaysMin(mom, '');
                this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i');
            }
            // test the regex
            if (
                strict &&
                format === 'dddd' &&
                this._fullWeekdaysParse[i].test(weekdayName)
            ) {
                return i;
            } else if (
                strict &&
                format === 'ddd' &&
                this._shortWeekdaysParse[i].test(weekdayName)
            ) {
                return i;
            } else if (
                strict &&
                format === 'dd' &&
                this._minWeekdaysParse[i].test(weekdayName)
            ) {
                return i;
            } else if (!strict && this._weekdaysParse[i].test(weekdayName)) {
                return i;
            }
        }
    }
 
    // MOMENTS
 
    function getSetDayOfWeek(input) {
        Iif (!this.isValid()) {
            return input != null ? this : NaN;
        }
        var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay();
        Iif (input != null) {
            input = parseWeekday(input, this.localeData());
            return this.add(input - day, 'd');
        } else {
            return day;
        }
    }
 
    function getSetLocaleDayOfWeek(input) {
        if (!this.isValid()) {
            return input != null ? this : NaN;
        }
        var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7;
        return input == null ? weekday : this.add(input - weekday, 'd');
    }
 
    function getSetISODayOfWeek(input) {
        if (!this.isValid()) {
            return input != null ? this : NaN;
        }
 
        // behaves the same as moment#day except
        // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)
        // as a setter, sunday should belong to the previous week.
 
        if (input != null) {
            var weekday = parseIsoWeekday(input, this.localeData());
            return this.day(this.day() % 7 ? weekday : weekday - 7);
        } else {
            return this.day() || 7;
        }
    }
 
    function weekdaysRegex(isStrict) {
        if (this._weekdaysParseExact) {
            if (!hasOwnProp(this, '_weekdaysRegex')) {
                computeWeekdaysParse.call(this);
            }
            if (isStrict) {
                return this._weekdaysStrictRegex;
            } else {
                return this._weekdaysRegex;
            }
        } else {
            if (!hasOwnProp(this, '_weekdaysRegex')) {
                this._weekdaysRegex = defaultWeekdaysRegex;
            }
            return this._weekdaysStrictRegex && isStrict
                ? this._weekdaysStrictRegex
                : this._weekdaysRegex;
        }
    }
 
    function weekdaysShortRegex(isStrict) {
        if (this._weekdaysParseExact) {
            if (!hasOwnProp(this, '_weekdaysRegex')) {
                computeWeekdaysParse.call(this);
            }
            if (isStrict) {
                return this._weekdaysShortStrictRegex;
            } else {
                return this._weekdaysShortRegex;
            }
        } else {
            if (!hasOwnProp(this, '_weekdaysShortRegex')) {
                this._weekdaysShortRegex = defaultWeekdaysShortRegex;
            }
            return this._weekdaysShortStrictRegex && isStrict
                ? this._weekdaysShortStrictRegex
                : this._weekdaysShortRegex;
        }
    }
 
    function weekdaysMinRegex(isStrict) {
        if (this._weekdaysParseExact) {
            if (!hasOwnProp(this, '_weekdaysRegex')) {
                computeWeekdaysParse.call(this);
            }
            if (isStrict) {
                return this._weekdaysMinStrictRegex;
            } else {
                return this._weekdaysMinRegex;
            }
        } else {
            if (!hasOwnProp(this, '_weekdaysMinRegex')) {
                this._weekdaysMinRegex = defaultWeekdaysMinRegex;
            }
            return this._weekdaysMinStrictRegex && isStrict
                ? this._weekdaysMinStrictRegex
                : this._weekdaysMinRegex;
        }
    }
 
    function computeWeekdaysParse() {
        function cmpLenRev(a, b) {
            return b.length - a.length;
        }
 
        var minPieces = [],
            shortPieces = [],
            longPieces = [],
            mixedPieces = [],
            i,
            mom,
            minp,
            shortp,
            longp;
        for (i = 0; i < 7; i++) {
            // make the regex if we don't have it already
            mom = createUTC([2000, 1]).day(i);
            minp = regexEscape(this.weekdaysMin(mom, ''));
            shortp = regexEscape(this.weekdaysShort(mom, ''));
            longp = regexEscape(this.weekdays(mom, ''));
            minPieces.push(minp);
            shortPieces.push(shortp);
            longPieces.push(longp);
            mixedPieces.push(minp);
            mixedPieces.push(shortp);
            mixedPieces.push(longp);
        }
        // Sorting makes sure if one weekday (or abbr) is a prefix of another it
        // will match the longer piece.
        minPieces.sort(cmpLenRev);
        shortPieces.sort(cmpLenRev);
        longPieces.sort(cmpLenRev);
        mixedPieces.sort(cmpLenRev);
 
        this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');
        this._weekdaysShortRegex = this._weekdaysRegex;
        this._weekdaysMinRegex = this._weekdaysRegex;
 
        this._weekdaysStrictRegex = new RegExp(
            '^(' + longPieces.join('|') + ')',
            'i'
        );
        this._weekdaysShortStrictRegex = new RegExp(
            '^(' + shortPieces.join('|') + ')',
            'i'
        );
        this._weekdaysMinStrictRegex = new RegExp(
            '^(' + minPieces.join('|') + ')',
            'i'
        );
    }
 
    // FORMATTING
 
    function hFormat() {
        return this.hours() % 12 || 12;
    }
 
    function kFormat() {
        return this.hours() || 24;
    }
 
    addFormatToken('H', ['HH', 2], 0, 'hour');
    addFormatToken('h', ['hh', 2], 0, hFormat);
    addFormatToken('k', ['kk', 2], 0, kFormat);
 
    addFormatToken('hmm', 0, 0, function () {
        return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2);
    });
 
    addFormatToken('hmmss', 0, 0, function () {
        return (
            '' +
            hFormat.apply(this) +
            zeroFill(this.minutes(), 2) +
            zeroFill(this.seconds(), 2)
        );
    });
 
    addFormatToken('Hmm', 0, 0, function () {
        return '' + this.hours() + zeroFill(this.minutes(), 2);
    });
 
    addFormatToken('Hmmss', 0, 0, function () {
        return (
            '' +
            this.hours() +
            zeroFill(this.minutes(), 2) +
            zeroFill(this.seconds(), 2)
        );
    });
 
    function meridiem(token, lowercase) {
        addFormatToken(token, 0, 0, function () {
            return this.localeData().meridiem(
                this.hours(),
                this.minutes(),
                lowercase
            );
        });
    }
 
    meridiem('a', true);
    meridiem('A', false);
 
    // ALIASES
 
    addUnitAlias('hour', 'h');
 
    // PRIORITY
    addUnitPriority('hour', 13);
 
    // PARSING
 
    function matchMeridiem(isStrict, locale) {
        return locale._meridiemParse;
    }
 
    addRegexToken('a', matchMeridiem);
    addRegexToken('A', matchMeridiem);
    addRegexToken('H', match1to2);
    addRegexToken('h', match1to2);
    addRegexToken('k', match1to2);
    addRegexToken('HH', match1to2, match2);
    addRegexToken('hh', match1to2, match2);
    addRegexToken('kk', match1to2, match2);
 
    addRegexToken('hmm', match3to4);
    addRegexToken('hmmss', match5to6);
    addRegexToken('Hmm', match3to4);
    addRegexToken('Hmmss', match5to6);
 
    addParseToken(['H', 'HH'], HOUR);
    addParseToken(['k', 'kk'], function (input, array, config) {
        var kInput = toInt(input);
        array[HOUR] = kInput === 24 ? 0 : kInput;
    });
    addParseToken(['a', 'A'], function (input, array, config) {
        config._isPm = config._locale.isPM(input);
        config._meridiem = input;
    });
    addParseToken(['h', 'hh'], function (input, array, config) {
        array[HOUR] = toInt(input);
        getParsingFlags(config).bigHour = true;
    });
    addParseToken('hmm', function (input, array, config) {
        var pos = input.length - 2;
        array[HOUR] = toInt(input.substr(0, pos));
        array[MINUTE] = toInt(input.substr(pos));
        getParsingFlags(config).bigHour = true;
    });
    addParseToken('hmmss', function (input, array, config) {
        var pos1 = input.length - 4,
            pos2 = input.length - 2;
        array[HOUR] = toInt(input.substr(0, pos1));
        array[MINUTE] = toInt(input.substr(pos1, 2));
        array[SECOND] = toInt(input.substr(pos2));
        getParsingFlags(config).bigHour = true;
    });
    addParseToken('Hmm', function (input, array, config) {
        var pos = input.length - 2;
        array[HOUR] = toInt(input.substr(0, pos));
        array[MINUTE] = toInt(input.substr(pos));
    });
    addParseToken('Hmmss', function (input, array, config) {
        var pos1 = input.length - 4,
            pos2 = input.length - 2;
        array[HOUR] = toInt(input.substr(0, pos1));
        array[MINUTE] = toInt(input.substr(pos1, 2));
        array[SECOND] = toInt(input.substr(pos2));
    });
 
    // LOCALES
 
    function localeIsPM(input) {
        // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays
        // Using charAt should be more compatible.
        return (input + '').toLowerCase().charAt(0) === 'p';
    }
 
    var defaultLocaleMeridiemParse = /[ap]\.?m?\.?/i,
        // Setting the hour should keep the time, because the user explicitly
        // specified which hour they want. So trying to maintain the same hour (in
        // a new timezone) makes sense. Adding/subtracting hours does not follow
        // this rule.
        getSetHour = makeGetSet('Hours', true);
 
    function localeMeridiem(hours, minutes, isLower) {
        if (hours > 11) {
            return isLower ? 'pm' : 'PM';
        } else {
            return isLower ? 'am' : 'AM';
        }
    }
 
    var baseConfig = {
        calendar: defaultCalendar,
        longDateFormat: defaultLongDateFormat,
        invalidDate: defaultInvalidDate,
        ordinal: defaultOrdinal,
        dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse,
        relativeTime: defaultRelativeTime,
 
        months: defaultLocaleMonths,
        monthsShort: defaultLocaleMonthsShort,
 
        week: defaultLocaleWeek,
 
        weekdays: defaultLocaleWeekdays,
        weekdaysMin: defaultLocaleWeekdaysMin,
        weekdaysShort: defaultLocaleWeekdaysShort,
 
        meridiemParse: defaultLocaleMeridiemParse,
    };
 
    // internal storage for locale config files
    var locales = {},
        localeFamilies = {},
        globalLocale;
 
    function commonPrefix(arr1, arr2) {
        var i,
            minl = Math.min(arr1.length, arr2.length);
        for (i = 0; i < minl; i += 1) {
            if (arr1[i] !== arr2[i]) {
                return i;
            }
        }
        return minl;
    }
 
    function normalizeLocale(key) {
        return key ? key.toLowerCase().replace('_', '-') : key;
    }
 
    // pick the locale from the array
    // try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each
    // substring from most specific to least, but move to the next array item if it's a more specific variant than the current root
    function chooseLocale(names) {
        var i = 0,
            j,
            next,
            locale,
            split;
 
        while (i < names.length) {
            split = normalizeLocale(names[i]).split('-');
            j = split.length;
            next = normalizeLocale(names[i + 1]);
            next = next ? next.split('-') : null;
            while (j > 0) {
                locale = loadLocale(split.slice(0, j).join('-'));
                if (locale) {
                    return locale;
                }
                if (
                    next &&
                    next.length >= j &&
                    commonPrefix(split, next) >= j - 1
                ) {
                    //the next array item is better than a shallower substring of this one
                    break;
                }
                j--;
            }
            i++;
        }
        return globalLocale;
    }
 
    function isLocaleNameSane(name) {
        // Prevent names that look like filesystem paths, i.e contain '/' or '\'
        return name.match('^[^/\\\\]*$') != null;
    }
 
    function loadLocale(name) {
        var oldLocale = null,
            aliasedRequire;
        // TODO: Find a better way to register and load all the locales in Node
        if (
            locales[name] === undefined &&
            typeof module !== 'undefined' &&
            module &&
            module.exports &&
            isLocaleNameSane(name)
        ) {
            try {
                oldLocale = globalLocale._abbr;
                aliasedRequire = require;
                __webpack_require__(1075)("./" + name);
                getSetGlobalLocale(oldLocale);
            } catch (e) {
                // mark as not found to avoid repeating expensive file require call causing high CPU
                // when trying to find en-US, en_US, en-us for every format call
                locales[name] = null; // null means not found
            }
        }
        return locales[name];
    }
 
    // This function will load locale and then set the global locale.  If
    // no arguments are passed in, it will simply return the current global
    // locale key.
    function getSetGlobalLocale(key, values) {
        var data;
        Eif (key) {
            if (isUndefined(values)) {
                data = getLocale(key);
            } else {
                data = defineLocale(key, values);
            }
 
            Eif (data) {
                // moment.duration._locale = moment._locale = data;
                globalLocale = data;
            } else {
                if (typeof console !== 'undefined' && console.warn) {
                    //warn user if arguments are passed but the locale could not be set
                    console.warn(
                        'Locale ' + key + ' not found. Did you forget to load it?'
                    );
                }
            }
        }
 
        return globalLocale._abbr;
    }
 
    function defineLocale(name, config) {
        Eif (config !== null) {
            var locale,
                parentConfig = baseConfig;
            config.abbr = name;
            Iif (locales[name] != null) {
                deprecateSimple(
                    'defineLocaleOverride',
                    'use moment.updateLocale(localeName, config) to change ' +
                        'an existing locale. moment.defineLocale(localeName, ' +
                        'config) should only be used for creating a new locale ' +
                        'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.'
                );
                parentConfig = locales[name]._config;
            } else Iif (config.parentLocale != null) {
                if (locales[config.parentLocale] != null) {
                    parentConfig = locales[config.parentLocale]._config;
                } else {
                    locale = loadLocale(config.parentLocale);
                    if (locale != null) {
                        parentConfig = locale._config;
                    } else {
                        if (!localeFamilies[config.parentLocale]) {
                            localeFamilies[config.parentLocale] = [];
                        }
                        localeFamilies[config.parentLocale].push({
                            name: name,
                            config: config,
                        });
                        return null;
                    }
                }
            }
            locales[name] = new Locale(mergeConfigs(parentConfig, config));
 
            Iif (localeFamilies[name]) {
                localeFamilies[name].forEach(function (x) {
                    defineLocale(x.name, x.config);
                });
            }
 
            // backwards compat for now: also set the locale
            // make sure we set the locale AFTER all child locales have been
            // created, so we won't end up with the child locale set.
            getSetGlobalLocale(name);
 
            return locales[name];
        } else {
            // useful for testing
            delete locales[name];
            return null;
        }
    }
 
    function updateLocale(name, config) {
        Eif (config != null) {
            var locale,
                tmpLocale,
                parentConfig = baseConfig;
 
            if (locales[name] != null && locales[name].parentLocale != null) {
                // Update existing child locale in-place to avoid memory-leaks
                locales[name].set(mergeConfigs(locales[name]._config, config));
            } else {
                // MERGE
                tmpLocale = loadLocale(name);
                if (tmpLocale != null) {
                    parentConfig = tmpLocale._config;
                }
                config = mergeConfigs(parentConfig, config);
                if (tmpLocale == null) {
                    // updateLocale is called for creating a new locale
                    // Set abbr so it will have a name (getters return
                    // undefined otherwise).
                    config.abbr = name;
                }
                locale = new Locale(config);
                locale.parentLocale = locales[name];
                locales[name] = locale;
            }
 
            // backwards compat for now: also set the locale
            getSetGlobalLocale(name);
        } else {
            // pass null for config to unupdate, useful for tests
            if (locales[name] != null) {
                if (locales[name].parentLocale != null) {
                    locales[name] = locales[name].parentLocale;
                    if (name === getSetGlobalLocale()) {
                        getSetGlobalLocale(name);
                    }
                } else if (locales[name] != null) {
                    delete locales[name];
                }
            }
        }
        return locales[name];
    }
 
    // returns locale data
    function getLocale(key) {
        var locale;
 
        Iif (key && key._locale && key._locale._abbr) {
            key = key._locale._abbr;
        }
 
        if (!key) {
            return globalLocale;
        }
 
        Eif (!isArray(key)) {
            //short-circuit everything else
            locale = loadLocale(key);
            Eif (locale) {
                return locale;
            }
            key = [key];
        }
 
        return chooseLocale(key);
    }
 
    function listLocales() {
        return keys(locales);
    }
 
    function checkOverflow(m) {
        var overflow,
            a = m._a;
 
        if (a && getParsingFlags(m).overflow === -2) {
            overflow =
                a[MONTH] < 0 || a[MONTH] > 11
                    ? MONTH
                    : a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH])
                    ? DATE
                    : a[HOUR] < 0 ||
                      a[HOUR] > 24 ||
                      (a[HOUR] === 24 &&
                          (a[MINUTE] !== 0 ||
                              a[SECOND] !== 0 ||
                              a[MILLISECOND] !== 0))
                    ? HOUR
                    : a[MINUTE] < 0 || a[MINUTE] > 59
                    ? MINUTE
                    : a[SECOND] < 0 || a[SECOND] > 59
                    ? SECOND
                    : a[MILLISECOND] < 0 || a[MILLISECOND] > 999
                    ? MILLISECOND
                    : -1;
 
            Iif (
                getParsingFlags(m)._overflowDayOfYear &&
                (overflow < YEAR || overflow > DATE)
            ) {
                overflow = DATE;
            }
            Iif (getParsingFlags(m)._overflowWeeks && overflow === -1) {
                overflow = WEEK;
            }
            Iif (getParsingFlags(m)._overflowWeekday && overflow === -1) {
                overflow = WEEKDAY;
            }
 
            getParsingFlags(m).overflow = overflow;
        }
 
        return m;
    }
 
    // iso 8601 regex
    // 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00)
    var extendedIsoRegex =
            /^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,
        basicIsoRegex =
            /^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,
        tzRegex = /Z|[+-]\d\d(?::?\d\d)?/,
        isoDates = [
            ['YYYYYY-MM-DD', /[+-]\d{6}-\d\d-\d\d/],
            ['YYYY-MM-DD', /\d{4}-\d\d-\d\d/],
            ['GGGG-[W]WW-E', /\d{4}-W\d\d-\d/],
            ['GGGG-[W]WW', /\d{4}-W\d\d/, false],
            ['YYYY-DDD', /\d{4}-\d{3}/],
            ['YYYY-MM', /\d{4}-\d\d/, false],
            ['YYYYYYMMDD', /[+-]\d{10}/],
            ['YYYYMMDD', /\d{8}/],
            ['GGGG[W]WWE', /\d{4}W\d{3}/],
            ['GGGG[W]WW', /\d{4}W\d{2}/, false],
            ['YYYYDDD', /\d{7}/],
            ['YYYYMM', /\d{6}/, false],
            ['YYYY', /\d{4}/, false],
        ],
        // iso time formats and regexes
        isoTimes = [
            ['HH:mm:ss.SSSS', /\d\d:\d\d:\d\d\.\d+/],
            ['HH:mm:ss,SSSS', /\d\d:\d\d:\d\d,\d+/],
            ['HH:mm:ss', /\d\d:\d\d:\d\d/],
            ['HH:mm', /\d\d:\d\d/],
            ['HHmmss.SSSS', /\d\d\d\d\d\d\.\d+/],
            ['HHmmss,SSSS', /\d\d\d\d\d\d,\d+/],
            ['HHmmss', /\d\d\d\d\d\d/],
            ['HHmm', /\d\d\d\d/],
            ['HH', /\d\d/],
        ],
        aspNetJsonRegex = /^\/?Date\((-?\d+)/i,
        // RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3
        rfc2822 =
            /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,
        obsOffsets = {
            UT: 0,
            GMT: 0,
            EDT: -4 * 60,
            EST: -5 * 60,
            CDT: -5 * 60,
            CST: -6 * 60,
            MDT: -6 * 60,
            MST: -7 * 60,
            PDT: -7 * 60,
            PST: -8 * 60,
        };
 
    // date from iso format
    function configFromISO(config) {
        var i,
            l,
            string = config._i,
            match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string),
            allowTime,
            dateFormat,
            timeFormat,
            tzFormat,
            isoDatesLen = isoDates.length,
            isoTimesLen = isoTimes.length;
 
        Eif (match) {
            getParsingFlags(config).iso = true;
            for (i = 0, l = isoDatesLen; i < l; i++) {
                if (isoDates[i][1].exec(match[1])) {
                    dateFormat = isoDates[i][0];
                    allowTime = isoDates[i][2] !== false;
                    break;
                }
            }
            Iif (dateFormat == null) {
                config._isValid = false;
                return;
            }
            if (match[3]) {
                for (i = 0, l = isoTimesLen; i < l; i++) {
                    if (isoTimes[i][1].exec(match[3])) {
                        // match[2] should be 'T' or space
                        timeFormat = (match[2] || ' ') + isoTimes[i][0];
                        break;
                    }
                }
                Iif (timeFormat == null) {
                    config._isValid = false;
                    return;
                }
            }
            Iif (!allowTime && timeFormat != null) {
                config._isValid = false;
                return;
            }
            Iif (match[4]) {
                if (tzRegex.exec(match[4])) {
                    tzFormat = 'Z';
                } else {
                    config._isValid = false;
                    return;
                }
            }
            config._f = dateFormat + (timeFormat || '') + (tzFormat || '');
            configFromStringAndFormat(config);
        } else {
            config._isValid = false;
        }
    }
 
    function extractFromRFC2822Strings(
        yearStr,
        monthStr,
        dayStr,
        hourStr,
        minuteStr,
        secondStr
    ) {
        var result = [
            untruncateYear(yearStr),
            defaultLocaleMonthsShort.indexOf(monthStr),
            parseInt(dayStr, 10),
            parseInt(hourStr, 10),
            parseInt(minuteStr, 10),
        ];
 
        if (secondStr) {
            result.push(parseInt(secondStr, 10));
        }
 
        return result;
    }
 
    function untruncateYear(yearStr) {
        var year = parseInt(yearStr, 10);
        if (year <= 49) {
            return 2000 + year;
        } else if (year <= 999) {
            return 1900 + year;
        }
        return year;
    }
 
    function preprocessRFC2822(s) {
        // Remove comments and folding whitespace and replace multiple-spaces with a single space
        return s
            .replace(/\([^()]*\)|[\n\t]/g, ' ')
            .replace(/(\s\s+)/g, ' ')
            .replace(/^\s\s*/, '')
            .replace(/\s\s*$/, '');
    }
 
    function checkWeekday(weekdayStr, parsedInput, config) {
        if (weekdayStr) {
            // TODO: Replace the vanilla JS Date object with an independent day-of-week check.
            var weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr),
                weekdayActual = new Date(
                    parsedInput[0],
                    parsedInput[1],
                    parsedInput[2]
                ).getDay();
            if (weekdayProvided !== weekdayActual) {
                getParsingFlags(config).weekdayMismatch = true;
                config._isValid = false;
                return false;
            }
        }
        return true;
    }
 
    function calculateOffset(obsOffset, militaryOffset, numOffset) {
        if (obsOffset) {
            return obsOffsets[obsOffset];
        } else if (militaryOffset) {
            // the only allowed military tz is Z
            return 0;
        } else {
            var hm = parseInt(numOffset, 10),
                m = hm % 100,
                h = (hm - m) / 100;
            return h * 60 + m;
        }
    }
 
    // date and time from ref 2822 format
    function configFromRFC2822(config) {
        var match = rfc2822.exec(preprocessRFC2822(config._i)),
            parsedArray;
        if (match) {
            parsedArray = extractFromRFC2822Strings(
                match[4],
                match[3],
                match[2],
                match[5],
                match[6],
                match[7]
            );
            if (!checkWeekday(match[1], parsedArray, config)) {
                return;
            }
 
            config._a = parsedArray;
            config._tzm = calculateOffset(match[8], match[9], match[10]);
 
            config._d = createUTCDate.apply(null, config._a);
            config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);
 
            getParsingFlags(config).rfc2822 = true;
        } else {
            config._isValid = false;
        }
    }
 
    // date from 1) ASP.NET, 2) ISO, 3) RFC 2822 formats, or 4) optional fallback if parsing isn't strict
    function configFromString(config) {
        var matched = aspNetJsonRegex.exec(config._i);
        Iif (matched !== null) {
            config._d = new Date(+matched[1]);
            return;
        }
 
        configFromISO(config);
        Iif (config._isValid === false) {
            delete config._isValid;
        } else {
            return;
        }
 
        configFromRFC2822(config);
        if (config._isValid === false) {
            delete config._isValid;
        } else {
            return;
        }
 
        if (config._strict) {
            config._isValid = false;
        } else {
            // Final attempt, use Input Fallback
            hooks.createFromInputFallback(config);
        }
    }
 
    hooks.createFromInputFallback = deprecate(
        'value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' +
            'which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are ' +
            'discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.',
        function (config) {
            config._d = new Date(config._i + (config._useUTC ? ' UTC' : ''));
        }
    );
 
    // Pick the first defined of two or three arguments.
    function defaults(a, b, c) {
        if (a != null) {
            return a;
        }
        if (b != null) {
            return b;
        }
        return c;
    }
 
    function currentDateArray(config) {
        // hooks is actually the exported moment object
        var nowValue = new Date(hooks.now());
        Iif (config._useUTC) {
            return [
                nowValue.getUTCFullYear(),
                nowValue.getUTCMonth(),
                nowValue.getUTCDate(),
            ];
        }
        return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()];
    }
 
    // convert an array to a date.
    // the array should mirror the parameters below
    // note: all values past the year are optional and will default to the lowest possible value.
    // [year, month, day , hour, minute, second, millisecond]
    function configFromArray(config) {
        var i,
            date,
            input = [],
            currentDate,
            expectedWeekday,
            yearToUse;
 
        Iif (config._d) {
            return;
        }
 
        currentDate = currentDateArray(config);
 
        //compute day of the year from weeks and weekdays
        Iif (config._w && config._a[DATE] == null && config._a[MONTH] == null) {
            dayOfYearFromWeekInfo(config);
        }
 
        //if the day of the year is set, figure out what it is
        Iif (config._dayOfYear != null) {
            yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);
 
            if (
                config._dayOfYear > daysInYear(yearToUse) ||
                config._dayOfYear === 0
            ) {
                getParsingFlags(config)._overflowDayOfYear = true;
            }
 
            date = createUTCDate(yearToUse, 0, config._dayOfYear);
            config._a[MONTH] = date.getUTCMonth();
            config._a[DATE] = date.getUTCDate();
        }
 
        // Default to current date.
        // * if no year, month, day of month are given, default to today
        // * if day of month is given, default month and year
        // * if month is given, default only year
        // * if year is given, don't default anything
        for (i = 0; i < 3 && config._a[i] == null; ++i) {
            config._a[i] = input[i] = currentDate[i];
        }
 
        // Zero out whatever was not defaulted, including time
        for (; i < 7; i++) {
            config._a[i] = input[i] =
                config._a[i] == null ? (i === 2 ? 1 : 0) : config._a[i];
        }
 
        // Check for 24:00:00.000
        Iif (
            config._a[HOUR] === 24 &&
            config._a[MINUTE] === 0 &&
            config._a[SECOND] === 0 &&
            config._a[MILLISECOND] === 0
        ) {
            config._nextDay = true;
            config._a[HOUR] = 0;
        }
 
        config._d = (config._useUTC ? createUTCDate : createDate).apply(
            null,
            input
        );
        expectedWeekday = config._useUTC
            ? config._d.getUTCDay()
            : config._d.getDay();
 
        // Apply timezone offset from input. The actual utcOffset can be changed
        // with parseZone.
        Iif (config._tzm != null) {
            config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);
        }
 
        Iif (config._nextDay) {
            config._a[HOUR] = 24;
        }
 
        // check for mismatching day of week
        Iif (
            config._w &&
            typeof config._w.d !== 'undefined' &&
            config._w.d !== expectedWeekday
        ) {
            getParsingFlags(config).weekdayMismatch = true;
        }
    }
 
    function dayOfYearFromWeekInfo(config) {
        var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow, curWeek;
 
        w = config._w;
        if (w.GG != null || w.W != null || w.E != null) {
            dow = 1;
            doy = 4;
 
            // TODO: We need to take the current isoWeekYear, but that depends on
            // how we interpret now (local, utc, fixed offset). So create
            // a now version of current config (take local/utc/offset flags, and
            // create now).
            weekYear = defaults(
                w.GG,
                config._a[YEAR],
                weekOfYear(createLocal(), 1, 4).year
            );
            week = defaults(w.W, 1);
            weekday = defaults(w.E, 1);
            if (weekday < 1 || weekday > 7) {
                weekdayOverflow = true;
            }
        } else {
            dow = config._locale._week.dow;
            doy = config._locale._week.doy;
 
            curWeek = weekOfYear(createLocal(), dow, doy);
 
            weekYear = defaults(w.gg, config._a[YEAR], curWeek.year);
 
            // Default to current week.
            week = defaults(w.w, curWeek.week);
 
            if (w.d != null) {
                // weekday -- low day numbers are considered next week
                weekday = w.d;
                if (weekday < 0 || weekday > 6) {
                    weekdayOverflow = true;
                }
            } else if (w.e != null) {
                // local weekday -- counting starts from beginning of week
                weekday = w.e + dow;
                if (w.e < 0 || w.e > 6) {
                    weekdayOverflow = true;
                }
            } else {
                // default to beginning of week
                weekday = dow;
            }
        }
        if (week < 1 || week > weeksInYear(weekYear, dow, doy)) {
            getParsingFlags(config)._overflowWeeks = true;
        } else if (weekdayOverflow != null) {
            getParsingFlags(config)._overflowWeekday = true;
        } else {
            temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy);
            config._a[YEAR] = temp.year;
            config._dayOfYear = temp.dayOfYear;
        }
    }
 
    // constant that refers to the ISO standard
    hooks.ISO_8601 = function () {};
 
    // constant that refers to the RFC 2822 form
    hooks.RFC_2822 = function () {};
 
    // date from string and format string
    function configFromStringAndFormat(config) {
        // TODO: Move this to another part of the creation flow to prevent circular deps
        Iif (config._f === hooks.ISO_8601) {
            configFromISO(config);
            return;
        }
        Iif (config._f === hooks.RFC_2822) {
            configFromRFC2822(config);
            return;
        }
        config._a = [];
        getParsingFlags(config).empty = true;
 
        // This array is used to make a Date, either with `new Date` or `Date.UTC`
        var string = '' + config._i,
            i,
            parsedInput,
            tokens,
            token,
            skipped,
            stringLength = string.length,
            totalParsedInputLength = 0,
            era,
            tokenLen;
 
        tokens =
            expandFormat(config._f, config._locale).match(formattingTokens) || [];
        tokenLen = tokens.length;
        for (i = 0; i < tokenLen; i++) {
            token = tokens[i];
            parsedInput = (string.match(getParseRegexForToken(token, config)) ||
                [])[0];
            if (parsedInput) {
                skipped = string.substr(0, string.indexOf(parsedInput));
                if (skipped.length > 0) {
                    getParsingFlags(config).unusedInput.push(skipped);
                }
                string = string.slice(
                    string.indexOf(parsedInput) + parsedInput.length
                );
                totalParsedInputLength += parsedInput.length;
            }
            // don't parse if it's not a known token
            if (formatTokenFunctions[token]) {
                if (parsedInput) {
                    getParsingFlags(config).empty = false;
                } else {
                    getParsingFlags(config).unusedTokens.push(token);
                }
                addTimeToArrayFromToken(token, parsedInput, config);
            } else Iif (config._strict && !parsedInput) {
                getParsingFlags(config).unusedTokens.push(token);
            }
        }
 
        // add remaining unparsed input length to the string
        getParsingFlags(config).charsLeftOver =
            stringLength - totalParsedInputLength;
        if (string.length > 0) {
            getParsingFlags(config).unusedInput.push(string);
        }
 
        // clear _12h flag if hour is <= 12
        Iif (
            config._a[HOUR] <= 12 &&
            getParsingFlags(config).bigHour === true &&
            config._a[HOUR] > 0
        ) {
            getParsingFlags(config).bigHour = undefined;
        }
 
        getParsingFlags(config).parsedDateParts = config._a.slice(0);
        getParsingFlags(config).meridiem = config._meridiem;
        // handle meridiem
        config._a[HOUR] = meridiemFixWrap(
            config._locale,
            config._a[HOUR],
            config._meridiem
        );
 
        // handle era
        era = getParsingFlags(config).era;
        Iif (era !== null) {
            config._a[YEAR] = config._locale.erasConvertYear(era, config._a[YEAR]);
        }
 
        configFromArray(config);
        checkOverflow(config);
    }
 
    function meridiemFixWrap(locale, hour, meridiem) {
        var isPm;
 
        Eif (meridiem == null) {
            // nothing to do
            return hour;
        }
        if (locale.meridiemHour != null) {
            return locale.meridiemHour(hour, meridiem);
        } else if (locale.isPM != null) {
            // Fallback
            isPm = locale.isPM(meridiem);
            if (isPm && hour < 12) {
                hour += 12;
            }
            if (!isPm && hour === 12) {
                hour = 0;
            }
            return hour;
        } else {
            // this is not supposed to happen
            return hour;
        }
    }
 
    // date from string and array of format strings
    function configFromStringAndArray(config) {
        var tempConfig,
            bestMoment,
            scoreToBeat,
            i,
            currentScore,
            validFormatFound,
            bestFormatIsValid = false,
            configfLen = config._f.length;
 
        if (configfLen === 0) {
            getParsingFlags(config).invalidFormat = true;
            config._d = new Date(NaN);
            return;
        }
 
        for (i = 0; i < configfLen; i++) {
            currentScore = 0;
            validFormatFound = false;
            tempConfig = copyConfig({}, config);
            if (config._useUTC != null) {
                tempConfig._useUTC = config._useUTC;
            }
            tempConfig._f = config._f[i];
            configFromStringAndFormat(tempConfig);
 
            if (isValid(tempConfig)) {
                validFormatFound = true;
            }
 
            // if there is any input that was not parsed add a penalty for that format
            currentScore += getParsingFlags(tempConfig).charsLeftOver;
 
            //or tokens
            currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10;
 
            getParsingFlags(tempConfig).score = currentScore;
 
            if (!bestFormatIsValid) {
                if (
                    scoreToBeat == null ||
                    currentScore < scoreToBeat ||
                    validFormatFound
                ) {
                    scoreToBeat = currentScore;
                    bestMoment = tempConfig;
                    if (validFormatFound) {
                        bestFormatIsValid = true;
                    }
                }
            } else {
                if (currentScore < scoreToBeat) {
                    scoreToBeat = currentScore;
                    bestMoment = tempConfig;
                }
            }
        }
 
        extend(config, bestMoment || tempConfig);
    }
 
    function configFromObject(config) {
        if (config._d) {
            return;
        }
 
        var i = normalizeObjectUnits(config._i),
            dayOrDate = i.day === undefined ? i.date : i.day;
        config._a = map(
            [i.year, i.month, dayOrDate, i.hour, i.minute, i.second, i.millisecond],
            function (obj) {
                return obj && parseInt(obj, 10);
            }
        );
 
        configFromArray(config);
    }
 
    function createFromConfig(config) {
        var res = new Moment(checkOverflow(prepareConfig(config)));
        Iif (res._nextDay) {
            // Adding is smart enough around DST
            res.add(1, 'd');
            res._nextDay = undefined;
        }
 
        return res;
    }
 
    function prepareConfig(config) {
        var input = config._i,
            format = config._f;
 
        config._locale = config._locale || getLocale(config._l);
 
        if (input === null || (format === undefined && input === '')) {
            return createInvalid({ nullInput: true });
        }
 
        if (typeof input === 'string') {
            config._i = input = config._locale.preparse(input);
        }
 
        if (isMoment(input)) {
            return new Moment(checkOverflow(input));
        } else if (isDate(input)) {
            config._d = input;
        } else Iif (isArray(format)) {
            configFromStringAndArray(config);
        } else if (format) {
            configFromStringAndFormat(config);
        } else {
            configFromInput(config);
        }
 
        if (!isValid(config)) {
            config._d = null;
        }
 
        return config;
    }
 
    function configFromInput(config) {
        var input = config._i;
        if (isUndefined(input)) {
            config._d = new Date(hooks.now());
        } else Iif (isDate(input)) {
            config._d = new Date(input.valueOf());
        } else if (typeof input === 'string') {
            configFromString(config);
        } else Iif (isArray(input)) {
            config._a = map(input.slice(0), function (obj) {
                return parseInt(obj, 10);
            });
            configFromArray(config);
        } else Iif (isObject(input)) {
            configFromObject(config);
        } else Eif (isNumber(input)) {
            // from milliseconds
            config._d = new Date(input);
        } else {
            hooks.createFromInputFallback(config);
        }
    }
 
    function createLocalOrUTC(input, format, locale, strict, isUTC) {
        var c = {};
 
        Iif (format === true || format === false) {
            strict = format;
            format = undefined;
        }
 
        Iif (locale === true || locale === false) {
            strict = locale;
            locale = undefined;
        }
 
        Iif (
            (isObject(input) && isObjectEmpty(input)) ||
            (isArray(input) && input.length === 0)
        ) {
            input = undefined;
        }
        // object construction must be done this way.
        // https://github.com/moment/moment/issues/1423
        c._isAMomentObject = true;
        c._useUTC = c._isUTC = isUTC;
        c._l = locale;
        c._i = input;
        c._f = format;
        c._strict = strict;
 
        return createFromConfig(c);
    }
 
    function createLocal(input, format, locale, strict) {
        return createLocalOrUTC(input, format, locale, strict, false);
    }
 
    var prototypeMin = deprecate(
            'moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/',
            function () {
                var other = createLocal.apply(null, arguments);
                if (this.isValid() && other.isValid()) {
                    return other < this ? this : other;
                } else {
                    return createInvalid();
                }
            }
        ),
        prototypeMax = deprecate(
            'moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/',
            function () {
                var other = createLocal.apply(null, arguments);
                if (this.isValid() && other.isValid()) {
                    return other > this ? this : other;
                } else {
                    return createInvalid();
                }
            }
        );
 
    // Pick a moment m from moments so that m[fn](other) is true for all
    // other. This relies on the function fn to be transitive.
    //
    // moments should either be an array of moment objects or an array, whose
    // first element is an array of moment objects.
    function pickBy(fn, moments) {
        var res, i;
        if (moments.length === 1 && isArray(moments[0])) {
            moments = moments[0];
        }
        if (!moments.length) {
            return createLocal();
        }
        res = moments[0];
        for (i = 1; i < moments.length; ++i) {
            if (!moments[i].isValid() || moments[i][fn](res)) {
                res = moments[i];
            }
        }
        return res;
    }
 
    // TODO: Use [].sort instead?
    function min() {
        var args = [].slice.call(arguments, 0);
 
        return pickBy('isBefore', args);
    }
 
    function max() {
        var args = [].slice.call(arguments, 0);
 
        return pickBy('isAfter', args);
    }
 
    var now = function () {
        return Date.now ? Date.now() : +new Date();
    };
 
    var ordering = [
        'year',
        'quarter',
        'month',
        'week',
        'day',
        'hour',
        'minute',
        'second',
        'millisecond',
    ];
 
    function isDurationValid(m) {
        var key,
            unitHasDecimal = false,
            i,
            orderLen = ordering.length;
        for (key in m) {
            Iif (
                hasOwnProp(m, key) &&
                !(
                    indexOf.call(ordering, key) !== -1 &&
                    (m[key] == null || !isNaN(m[key]))
                )
            ) {
                return false;
            }
        }
 
        for (i = 0; i < orderLen; ++i) {
            if (m[ordering[i]]) {
                Iif (unitHasDecimal) {
                    return false; // only allow non-integers for smallest unit
                }
                Iif (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) {
                    unitHasDecimal = true;
                }
            }
        }
 
        return true;
    }
 
    function isValid$1() {
        return this._isValid;
    }
 
    function createInvalid$1() {
        return createDuration(NaN);
    }
 
    function Duration(duration) {
        var normalizedInput = normalizeObjectUnits(duration),
            years = normalizedInput.year || 0,
            quarters = normalizedInput.quarter || 0,
            months = normalizedInput.month || 0,
            weeks = normalizedInput.week || normalizedInput.isoWeek || 0,
            days = normalizedInput.day || 0,
            hours = normalizedInput.hour || 0,
            minutes = normalizedInput.minute || 0,
            seconds = normalizedInput.second || 0,
            milliseconds = normalizedInput.millisecond || 0;
 
        this._isValid = isDurationValid(normalizedInput);
 
        // representation for dateAddRemove
        this._milliseconds =
            +milliseconds +
            seconds * 1e3 + // 1000
            minutes * 6e4 + // 1000 * 60
            hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978
        // Because of dateAddRemove treats 24 hours as different from a
        // day when working around DST, we need to store them separately
        this._days = +days + weeks * 7;
        // It is impossible to translate months into days without knowing
        // which months you are are talking about, so we have to store
        // it separately.
        this._months = +months + quarters * 3 + years * 12;
 
        this._data = {};
 
        this._locale = getLocale();
 
        this._bubble();
    }
 
    function isDuration(obj) {
        return obj instanceof Duration;
    }
 
    function absRound(number) {
        Iif (number < 0) {
            return Math.round(-1 * number) * -1;
        } else {
            return Math.round(number);
        }
    }
 
    // compare two arrays, return the number of differences
    function compareArrays(array1, array2, dontConvert) {
        var len = Math.min(array1.length, array2.length),
            lengthDiff = Math.abs(array1.length - array2.length),
            diffs = 0,
            i;
        for (i = 0; i < len; i++) {
            if (
                (dontConvert && array1[i] !== array2[i]) ||
                (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))
            ) {
                diffs++;
            }
        }
        return diffs + lengthDiff;
    }
 
    // FORMATTING
 
    function offset(token, separator) {
        addFormatToken(token, 0, 0, function () {
            var offset = this.utcOffset(),
                sign = '+';
            if (offset < 0) {
                offset = -offset;
                sign = '-';
            }
            return (
                sign +
                zeroFill(~~(offset / 60), 2) +
                separator +
                zeroFill(~~offset % 60, 2)
            );
        });
    }
 
    offset('Z', ':');
    offset('ZZ', '');
 
    // PARSING
 
    addRegexToken('Z', matchShortOffset);
    addRegexToken('ZZ', matchShortOffset);
    addParseToken(['Z', 'ZZ'], function (input, array, config) {
        config._useUTC = true;
        config._tzm = offsetFromString(matchShortOffset, input);
    });
 
    // HELPERS
 
    // timezone chunker
    // '+10:00' > ['10',  '00']
    // '-1530'  > ['-15', '30']
    var chunkOffset = /([\+\-]|\d\d)/gi;
 
    function offsetFromString(matcher, string) {
        var matches = (string || '').match(matcher),
            chunk,
            parts,
            minutes;
 
        if (matches === null) {
            return null;
        }
 
        chunk = matches[matches.length - 1] || [];
        parts = (chunk + '').match(chunkOffset) || ['-', 0, 0];
        minutes = +(parts[1] * 60) + toInt(parts[2]);
 
        return minutes === 0 ? 0 : parts[0] === '+' ? minutes : -minutes;
    }
 
    // Return a moment from input, that is local/utc/zone equivalent to model.
    function cloneWithOffset(input, model) {
        var res, diff;
        Iif (model._isUTC) {
            res = model.clone();
            diff =
                (isMoment(input) || isDate(input)
                    ? input.valueOf()
                    : createLocal(input).valueOf()) - res.valueOf();
            // Use low-level api, because this fn is low-level api.
            res._d.setTime(res._d.valueOf() + diff);
            hooks.updateOffset(res, false);
            return res;
        } else {
            return createLocal(input).local();
        }
    }
 
    function getDateOffset(m) {
        // On Firefox.24 Date#getTimezoneOffset returns a floating point.
        // https://github.com/moment/moment/pull/1871
        return -Math.round(m._d.getTimezoneOffset());
    }
 
    // HOOKS
 
    // This function will be called whenever a moment is mutated.
    // It is intended to keep the offset in sync with the timezone.
    hooks.updateOffset = function () {};
 
    // MOMENTS
 
    // keepLocalTime = true means only change the timezone, without
    // affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]-->
    // 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset
    // +0200, so we adjust the time as needed, to be valid.
    //
    // Keeping the time actually adds/subtracts (one hour)
    // from the actual represented time. That is why we call updateOffset
    // a second time. In case it wants us to change the offset again
    // _changeInProgress == true case, then we have to adjust, because
    // there is no such time in the given timezone.
    function getSetOffset(input, keepLocalTime, keepMinutes) {
        var offset = this._offset || 0,
            localAdjust;
        if (!this.isValid()) {
            return input != null ? this : NaN;
        }
        if (input != null) {
            Iif (typeof input === 'string') {
                input = offsetFromString(matchShortOffset, input);
                if (input === null) {
                    return this;
                }
            } else Eif (Math.abs(input) < 16 && !keepMinutes) {
                input = input * 60;
            }
            Iif (!this._isUTC && keepLocalTime) {
                localAdjust = getDateOffset(this);
            }
            this._offset = input;
            this._isUTC = true;
            Iif (localAdjust != null) {
                this.add(localAdjust, 'm');
            }
            Iif (offset !== input) {
                if (!keepLocalTime || this._changeInProgress) {
                    addSubtract(
                        this,
                        createDuration(input - offset, 'm'),
                        1,
                        false
                    );
                } else if (!this._changeInProgress) {
                    this._changeInProgress = true;
                    hooks.updateOffset(this, true);
                    this._changeInProgress = null;
                }
            }
            return this;
        } else {
            return this._isUTC ? offset : getDateOffset(this);
        }
    }
 
    function getSetZone(input, keepLocalTime) {
        if (input != null) {
            if (typeof input !== 'string') {
                input = -input;
            }
 
            this.utcOffset(input, keepLocalTime);
 
            return this;
        } else {
            return -this.utcOffset();
        }
    }
 
    function setOffsetToUTC(keepLocalTime) {
        return this.utcOffset(0, keepLocalTime);
    }
 
    function setOffsetToLocal(keepLocalTime) {
        Iif (this._isUTC) {
            this.utcOffset(0, keepLocalTime);
            this._isUTC = false;
 
            if (keepLocalTime) {
                this.subtract(getDateOffset(this), 'm');
            }
        }
        return this;
    }
 
    function setOffsetToParsedOffset() {
        if (this._tzm != null) {
            this.utcOffset(this._tzm, false, true);
        } else if (typeof this._i === 'string') {
            var tZone = offsetFromString(matchOffset, this._i);
            if (tZone != null) {
                this.utcOffset(tZone);
            } else {
                this.utcOffset(0, true);
            }
        }
        return this;
    }
 
    function hasAlignedHourOffset(input) {
        if (!this.isValid()) {
            return false;
        }
        input = input ? createLocal(input).utcOffset() : 0;
 
        return (this.utcOffset() - input) % 60 === 0;
    }
 
    function isDaylightSavingTime() {
        return (
            this.utcOffset() > this.clone().month(0).utcOffset() ||
            this.utcOffset() > this.clone().month(5).utcOffset()
        );
    }
 
    function isDaylightSavingTimeShifted() {
        if (!isUndefined(this._isDSTShifted)) {
            return this._isDSTShifted;
        }
 
        var c = {},
            other;
 
        copyConfig(c, this);
        c = prepareConfig(c);
 
        if (c._a) {
            other = c._isUTC ? createUTC(c._a) : createLocal(c._a);
            this._isDSTShifted =
                this.isValid() && compareArrays(c._a, other.toArray()) > 0;
        } else {
            this._isDSTShifted = false;
        }
 
        return this._isDSTShifted;
    }
 
    function isLocal() {
        return this.isValid() ? !this._isUTC : false;
    }
 
    function isUtcOffset() {
        return this.isValid() ? this._isUTC : false;
    }
 
    function isUtc() {
        return this.isValid() ? this._isUTC && this._offset === 0 : false;
    }
 
    // ASP.NET json date format regex
    var aspNetRegex = /^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,
        // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html
        // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere
        // and further modified to allow for strings containing both week and day
        isoRegex =
            /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;
 
    function createDuration(input, key) {
        var duration = input,
            // matching against regexp is expensive, do it on demand
            match = null,
            sign,
            ret,
            diffRes;
 
        Iif (isDuration(input)) {
            duration = {
                ms: input._milliseconds,
                d: input._days,
                M: input._months,
            };
        } else Eif (isNumber(input) || !isNaN(+input)) {
            duration = {};
            Eif (key) {
                duration[key] = +input;
            } else {
                duration.milliseconds = +input;
            }
        } else if ((match = aspNetRegex.exec(input))) {
            sign = match[1] === '-' ? -1 : 1;
            duration = {
                y: 0,
                d: toInt(match[DATE]) * sign,
                h: toInt(match[HOUR]) * sign,
                m: toInt(match[MINUTE]) * sign,
                s: toInt(match[SECOND]) * sign,
                ms: toInt(absRound(match[MILLISECOND] * 1000)) * sign, // the millisecond decimal point is included in the match
            };
        } else if ((match = isoRegex.exec(input))) {
            sign = match[1] === '-' ? -1 : 1;
            duration = {
                y: parseIso(match[2], sign),
                M: parseIso(match[3], sign),
                w: parseIso(match[4], sign),
                d: parseIso(match[5], sign),
                h: parseIso(match[6], sign),
                m: parseIso(match[7], sign),
                s: parseIso(match[8], sign),
            };
        } else if (duration == null) {
            // checks for null or undefined
            duration = {};
        } else if (
            typeof duration === 'object' &&
            ('from' in duration || 'to' in duration)
        ) {
            diffRes = momentsDifference(
                createLocal(duration.from),
                createLocal(duration.to)
            );
 
            duration = {};
            duration.ms = diffRes.milliseconds;
            duration.M = diffRes.months;
        }
 
        ret = new Duration(duration);
 
        Iif (isDuration(input) && hasOwnProp(input, '_locale')) {
            ret._locale = input._locale;
        }
 
        Iif (isDuration(input) && hasOwnProp(input, '_isValid')) {
            ret._isValid = input._isValid;
        }
 
        return ret;
    }
 
    createDuration.fn = Duration.prototype;
    createDuration.invalid = createInvalid$1;
 
    function parseIso(inp, sign) {
        // We'd normally use ~~inp for this, but unfortunately it also
        // converts floats to ints.
        // inp may be undefined, so careful calling replace on it.
        var res = inp && parseFloat(inp.replace(',', '.'));
        // apply sign while we're at it
        return (isNaN(res) ? 0 : res) * sign;
    }
 
    function positiveMomentsDifference(base, other) {
        var res = {};
 
        res.months =
            other.month() - base.month() + (other.year() - base.year()) * 12;
        if (base.clone().add(res.months, 'M').isAfter(other)) {
            --res.months;
        }
 
        res.milliseconds = +other - +base.clone().add(res.months, 'M');
 
        return res;
    }
 
    function momentsDifference(base, other) {
        var res;
        if (!(base.isValid() && other.isValid())) {
            return { milliseconds: 0, months: 0 };
        }
 
        other = cloneWithOffset(other, base);
        if (base.isBefore(other)) {
            res = positiveMomentsDifference(base, other);
        } else {
            res = positiveMomentsDifference(other, base);
            res.milliseconds = -res.milliseconds;
            res.months = -res.months;
        }
 
        return res;
    }
 
    // TODO: remove 'name' arg after deprecation is removed
    function createAdder(direction, name) {
        return function (val, period) {
            var dur, tmp;
            //invert the arguments, but complain about it
            Iif (period !== null && !isNaN(+period)) {
                deprecateSimple(
                    name,
                    'moment().' +
                        name +
                        '(period, number) is deprecated. Please use moment().' +
                        name +
                        '(number, period). ' +
                        'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'
                );
                tmp = val;
                val = period;
                period = tmp;
            }
 
            dur = createDuration(val, period);
            addSubtract(this, dur, direction);
            return this;
        };
    }
 
    function addSubtract(mom, duration, isAdding, updateOffset) {
        var milliseconds = duration._milliseconds,
            days = absRound(duration._days),
            months = absRound(duration._months);
 
        Iif (!mom.isValid()) {
            // No op
            return;
        }
 
        updateOffset = updateOffset == null ? true : updateOffset;
 
        if (months) {
            setMonth(mom, get(mom, 'Month') + months * isAdding);
        }
        if (days) {
            set$1(mom, 'Date', get(mom, 'Date') + days * isAdding);
        }
        Iif (milliseconds) {
            mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding);
        }
        Eif (updateOffset) {
            hooks.updateOffset(mom, days || months);
        }
    }
 
    var add = createAdder(1, 'add'),
        subtract = createAdder(-1, 'subtract');
 
    function isString(input) {
        return typeof input === 'string' || input instanceof String;
    }
 
    // type MomentInput = Moment | Date | string | number | (number | string)[] | MomentInputObject | void; // null | undefined
    function isMomentInput(input) {
        return (
            isMoment(input) ||
            isDate(input) ||
            isString(input) ||
            isNumber(input) ||
            isNumberOrStringArray(input) ||
            isMomentInputObject(input) ||
            input === null ||
            input === undefined
        );
    }
 
    function isMomentInputObject(input) {
        var objectTest = isObject(input) && !isObjectEmpty(input),
            propertyTest = false,
            properties = [
                'years',
                'year',
                'y',
                'months',
                'month',
                'M',
                'days',
                'day',
                'd',
                'dates',
                'date',
                'D',
                'hours',
                'hour',
                'h',
                'minutes',
                'minute',
                'm',
                'seconds',
                'second',
                's',
                'milliseconds',
                'millisecond',
                'ms',
            ],
            i,
            property,
            propertyLen = properties.length;
 
        for (i = 0; i < propertyLen; i += 1) {
            property = properties[i];
            propertyTest = propertyTest || hasOwnProp(input, property);
        }
 
        return objectTest && propertyTest;
    }
 
    function isNumberOrStringArray(input) {
        var arrayTest = isArray(input),
            dataTypeTest = false;
        if (arrayTest) {
            dataTypeTest =
                input.filter(function (item) {
                    return !isNumber(item) && isString(input);
                }).length === 0;
        }
        return arrayTest && dataTypeTest;
    }
 
    function isCalendarSpec(input) {
        var objectTest = isObject(input) && !isObjectEmpty(input),
            propertyTest = false,
            properties = [
                'sameDay',
                'nextDay',
                'lastDay',
                'nextWeek',
                'lastWeek',
                'sameElse',
            ],
            i,
            property;
 
        for (i = 0; i < properties.length; i += 1) {
            property = properties[i];
            propertyTest = propertyTest || hasOwnProp(input, property);
        }
 
        return objectTest && propertyTest;
    }
 
    function getCalendarFormat(myMoment, now) {
        var diff = myMoment.diff(now, 'days', true);
        return diff < -6
            ? 'sameElse'
            : diff < -1
            ? 'lastWeek'
            : diff < 0
            ? 'lastDay'
            : diff < 1
            ? 'sameDay'
            : diff < 2
            ? 'nextDay'
            : diff < 7
            ? 'nextWeek'
            : 'sameElse';
    }
 
    function calendar$1(time, formats) {
        // Support for single parameter, formats only overload to the calendar function
        Eif (arguments.length === 1) {
            Iif (!arguments[0]) {
                time = undefined;
                formats = undefined;
            } else Eif (isMomentInput(arguments[0])) {
                time = arguments[0];
                formats = undefined;
            } else if (isCalendarSpec(arguments[0])) {
                formats = arguments[0];
                time = undefined;
            }
        }
        // We want to compare the start of today, vs this.
        // Getting start-of-today depends on whether we're local/utc/offset or not.
        var now = time || createLocal(),
            sod = cloneWithOffset(now, this).startOf('day'),
            format = hooks.calendarFormat(this, sod) || 'sameElse',
            output =
                formats &&
                (isFunction(formats[format])
                    ? formats[format].call(this, now)
                    : formats[format]);
 
        return this.format(
            output || this.localeData().calendar(format, this, createLocal(now))
        );
    }
 
    function clone() {
        return new Moment(this);
    }
 
    function isAfter(input, units) {
        var localInput = isMoment(input) ? input : createLocal(input);
        if (!(this.isValid() && localInput.isValid())) {
            return false;
        }
        units = normalizeUnits(units) || 'millisecond';
        if (units === 'millisecond') {
            return this.valueOf() > localInput.valueOf();
        } else {
            return localInput.valueOf() < this.clone().startOf(units).valueOf();
        }
    }
 
    function isBefore(input, units) {
        var localInput = isMoment(input) ? input : createLocal(input);
        if (!(this.isValid() && localInput.isValid())) {
            return false;
        }
        units = normalizeUnits(units) || 'millisecond';
        if (units === 'millisecond') {
            return this.valueOf() < localInput.valueOf();
        } else {
            return this.clone().endOf(units).valueOf() < localInput.valueOf();
        }
    }
 
    function isBetween(from, to, units, inclusivity) {
        var localFrom = isMoment(from) ? from : createLocal(from),
            localTo = isMoment(to) ? to : createLocal(to);
        if (!(this.isValid() && localFrom.isValid() && localTo.isValid())) {
            return false;
        }
        inclusivity = inclusivity || '()';
        return (
            (inclusivity[0] === '('
                ? this.isAfter(localFrom, units)
                : !this.isBefore(localFrom, units)) &&
            (inclusivity[1] === ')'
                ? this.isBefore(localTo, units)
                : !this.isAfter(localTo, units))
        );
    }
 
    function isSame(input, units) {
        var localInput = isMoment(input) ? input : createLocal(input),
            inputMs;
        if (!(this.isValid() && localInput.isValid())) {
            return false;
        }
        units = normalizeUnits(units) || 'millisecond';
        if (units === 'millisecond') {
            return this.valueOf() === localInput.valueOf();
        } else {
            inputMs = localInput.valueOf();
            return (
                this.clone().startOf(units).valueOf() <= inputMs &&
                inputMs <= this.clone().endOf(units).valueOf()
            );
        }
    }
 
    function isSameOrAfter(input, units) {
        return this.isSame(input, units) || this.isAfter(input, units);
    }
 
    function isSameOrBefore(input, units) {
        return this.isSame(input, units) || this.isBefore(input, units);
    }
 
    function diff(input, units, asFloat) {
        var that, zoneDelta, output;
 
        if (!this.isValid()) {
            return NaN;
        }
 
        that = cloneWithOffset(input, this);
 
        Iif (!that.isValid()) {
            return NaN;
        }
 
        zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4;
 
        units = normalizeUnits(units);
 
        switch (units) {
            case 'year':
                output = monthDiff(this, that) / 12;
                break;
            case 'month':
                output = monthDiff(this, that);
                break;
            case 'quarter':
                output = monthDiff(this, that) / 3;
                break;
            case 'second':
                output = (this - that) / 1e3;
                break; // 1000
            case 'minute':
                output = (this - that) / 6e4;
                break; // 1000 * 60
            case 'hour':
                output = (this - that) / 36e5;
                break; // 1000 * 60 * 60
            case 'day':
                output = (this - that - zoneDelta) / 864e5;
                break; // 1000 * 60 * 60 * 24, negate dst
            case 'week':
                output = (this - that - zoneDelta) / 6048e5;
                break; // 1000 * 60 * 60 * 24 * 7, negate dst
            default:
                output = this - that;
        }
 
        return asFloat ? output : absFloor(output);
    }
 
    function monthDiff(a, b) {
        if (a.date() < b.date()) {
            // end-of-month calculations work correct when the start month has more
            // days than the end month.
            return -monthDiff(b, a);
        }
        // difference in months
        var wholeMonthDiff = (b.year() - a.year()) * 12 + (b.month() - a.month()),
            // b is in (anchor - 1 month, anchor + 1 month)
            anchor = a.clone().add(wholeMonthDiff, 'months'),
            anchor2,
            adjust;
 
        if (b - anchor < 0) {
            anchor2 = a.clone().add(wholeMonthDiff - 1, 'months');
            // linear across the month
            adjust = (b - anchor) / (anchor - anchor2);
        } else {
            anchor2 = a.clone().add(wholeMonthDiff + 1, 'months');
            // linear across the month
            adjust = (b - anchor) / (anchor2 - anchor);
        }
 
        //check for negative zero, return zero if negative zero
        return -(wholeMonthDiff + adjust) || 0;
    }
 
    hooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ';
    hooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]';
 
    function toString() {
        return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ');
    }
 
    function toISOString(keepOffset) {
        if (!this.isValid()) {
            return null;
        }
        var utc = keepOffset !== true,
            m = utc ? this.clone().utc() : this;
        if (m.year() < 0 || m.year() > 9999) {
            return formatMoment(
                m,
                utc
                    ? 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]'
                    : 'YYYYYY-MM-DD[T]HH:mm:ss.SSSZ'
            );
        }
        if (isFunction(Date.prototype.toISOString)) {
            // native implementation is ~50x faster, use it when we can
            if (utc) {
                return this.toDate().toISOString();
            } else {
                return new Date(this.valueOf() + this.utcOffset() * 60 * 1000)
                    .toISOString()
                    .replace('Z', formatMoment(m, 'Z'));
            }
        }
        return formatMoment(
            m,
            utc ? 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYY-MM-DD[T]HH:mm:ss.SSSZ'
        );
    }
 
    /**
     * Return a human readable representation of a moment that can
     * also be evaluated to get a new moment which is the same
     *
     * @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects
     */
    function inspect() {
        if (!this.isValid()) {
            return 'moment.invalid(/* ' + this._i + ' */)';
        }
        var func = 'moment',
            zone = '',
            prefix,
            year,
            datetime,
            suffix;
        if (!this.isLocal()) {
            func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';
            zone = 'Z';
        }
        prefix = '[' + func + '("]';
        year = 0 <= this.year() && this.year() <= 9999 ? 'YYYY' : 'YYYYYY';
        datetime = '-MM-DD[T]HH:mm:ss.SSS';
        suffix = zone + '[")]';
 
        return this.format(prefix + year + datetime + suffix);
    }
 
    function format(inputString) {
        Iif (!inputString) {
            inputString = this.isUtc()
                ? hooks.defaultFormatUtc
                : hooks.defaultFormat;
        }
        var output = formatMoment(this, inputString);
        return this.localeData().postformat(output);
    }
 
    function from(time, withoutSuffix) {
        if (
            this.isValid() &&
            ((isMoment(time) && time.isValid()) || createLocal(time).isValid())
        ) {
            return createDuration({ to: this, from: time })
                .locale(this.locale())
                .humanize(!withoutSuffix);
        } else {
            return this.localeData().invalidDate();
        }
    }
 
    function fromNow(withoutSuffix) {
        return this.from(createLocal(), withoutSuffix);
    }
 
    function to(time, withoutSuffix) {
        if (
            this.isValid() &&
            ((isMoment(time) && time.isValid()) || createLocal(time).isValid())
        ) {
            return createDuration({ from: this, to: time })
                .locale(this.locale())
                .humanize(!withoutSuffix);
        } else {
            return this.localeData().invalidDate();
        }
    }
 
    function toNow(withoutSuffix) {
        return this.to(createLocal(), withoutSuffix);
    }
 
    // If passed a locale key, it will set the locale for this
    // instance.  Otherwise, it will return the locale configuration
    // variables for this instance.
    function locale(key) {
        var newLocaleData;
 
        if (key === undefined) {
            return this._locale._abbr;
        } else {
            newLocaleData = getLocale(key);
            if (newLocaleData != null) {
                this._locale = newLocaleData;
            }
            return this;
        }
    }
 
    var lang = deprecate(
        'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.',
        function (key) {
            if (key === undefined) {
                return this.localeData();
            } else {
                return this.locale(key);
            }
        }
    );
 
    function localeData() {
        return this._locale;
    }
 
    var MS_PER_SECOND = 1000,
        MS_PER_MINUTE = 60 * MS_PER_SECOND,
        MS_PER_HOUR = 60 * MS_PER_MINUTE,
        MS_PER_400_YEARS = (365 * 400 + 97) * 24 * MS_PER_HOUR;
 
    // actual modulo - handles negative numbers (for dates before 1970):
    function mod$1(dividend, divisor) {
        return ((dividend % divisor) + divisor) % divisor;
    }
 
    function localStartOfDate(y, m, d) {
        // the date constructor remaps years 0-99 to 1900-1999
        if (y < 100 && y >= 0) {
            // preserve leap years using a full 400 year cycle, then reset
            return new Date(y + 400, m, d) - MS_PER_400_YEARS;
        } else {
            return new Date(y, m, d).valueOf();
        }
    }
 
    function utcStartOfDate(y, m, d) {
        // Date.UTC remaps years 0-99 to 1900-1999
        if (y < 100 && y >= 0) {
            // preserve leap years using a full 400 year cycle, then reset
            return Date.UTC(y + 400, m, d) - MS_PER_400_YEARS;
        } else {
            return Date.UTC(y, m, d);
        }
    }
 
    function startOf(units) {
        var time, startOfDate;
        units = normalizeUnits(units);
        Iif (units === undefined || units === 'millisecond' || !this.isValid()) {
            return this;
        }
 
        startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;
 
        switch (units) {
            case 'year':
                time = startOfDate(this.year(), 0, 1);
                break;
            case 'quarter':
                time = startOfDate(
                    this.year(),
                    this.month() - (this.month() % 3),
                    1
                );
                break;
            case 'month':
                time = startOfDate(this.year(), this.month(), 1);
                break;
            case 'week':
                time = startOfDate(
                    this.year(),
                    this.month(),
                    this.date() - this.weekday()
                );
                break;
            case 'isoWeek':
                time = startOfDate(
                    this.year(),
                    this.month(),
                    this.date() - (this.isoWeekday() - 1)
                );
                break;
            case 'day':
            case 'date':
                time = startOfDate(this.year(), this.month(), this.date());
                break;
            case 'hour':
                time = this._d.valueOf();
                time -= mod$1(
                    time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),
                    MS_PER_HOUR
                );
                break;
            case 'minute':
                time = this._d.valueOf();
                time -= mod$1(time, MS_PER_MINUTE);
                break;
            case 'second':
                time = this._d.valueOf();
                time -= mod$1(time, MS_PER_SECOND);
                break;
        }
 
        this._d.setTime(time);
        hooks.updateOffset(this, true);
        return this;
    }
 
    function endOf(units) {
        var time, startOfDate;
        units = normalizeUnits(units);
        Iif (units === undefined || units === 'millisecond' || !this.isValid()) {
            return this;
        }
 
        startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;
 
        switch (units) {
            case 'year':
                time = startOfDate(this.year() + 1, 0, 1) - 1;
                break;
            case 'quarter':
                time =
                    startOfDate(
                        this.year(),
                        this.month() - (this.month() % 3) + 3,
                        1
                    ) - 1;
                break;
            case 'month':
                time = startOfDate(this.year(), this.month() + 1, 1) - 1;
                break;
            case 'week':
                time =
                    startOfDate(
                        this.year(),
                        this.month(),
                        this.date() - this.weekday() + 7
                    ) - 1;
                break;
            case 'isoWeek':
                time =
                    startOfDate(
                        this.year(),
                        this.month(),
                        this.date() - (this.isoWeekday() - 1) + 7
                    ) - 1;
                break;
            case 'day':
            case 'date':
                time = startOfDate(this.year(), this.month(), this.date() + 1) - 1;
                break;
            case 'hour':
                time = this._d.valueOf();
                time +=
                    MS_PER_HOUR -
                    mod$1(
                        time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),
                        MS_PER_HOUR
                    ) -
                    1;
                break;
            case 'minute':
                time = this._d.valueOf();
                time += MS_PER_MINUTE - mod$1(time, MS_PER_MINUTE) - 1;
                break;
            case 'second':
                time = this._d.valueOf();
                time += MS_PER_SECOND - mod$1(time, MS_PER_SECOND) - 1;
                break;
        }
 
        this._d.setTime(time);
        hooks.updateOffset(this, true);
        return this;
    }
 
    function valueOf() {
        return this._d.valueOf() - (this._offset || 0) * 60000;
    }
 
    function unix() {
        return Math.floor(this.valueOf() / 1000);
    }
 
    function toDate() {
        return new Date(this.valueOf());
    }
 
    function toArray() {
        var m = this;
        return [
            m.year(),
            m.month(),
            m.date(),
            m.hour(),
            m.minute(),
            m.second(),
            m.millisecond(),
        ];
    }
 
    function toObject() {
        var m = this;
        return {
            years: m.year(),
            months: m.month(),
            date: m.date(),
            hours: m.hours(),
            minutes: m.minutes(),
            seconds: m.seconds(),
            milliseconds: m.milliseconds(),
        };
    }
 
    function toJSON() {
        // new Date(NaN).toJSON() === null
        return this.isValid() ? this.toISOString() : null;
    }
 
    function isValid$2() {
        return isValid(this);
    }
 
    function parsingFlags() {
        return extend({}, getParsingFlags(this));
    }
 
    function invalidAt() {
        return getParsingFlags(this).overflow;
    }
 
    function creationData() {
        return {
            input: this._i,
            format: this._f,
            locale: this._locale,
            isUTC: this._isUTC,
            strict: this._strict,
        };
    }
 
    addFormatToken('N', 0, 0, 'eraAbbr');
    addFormatToken('NN', 0, 0, 'eraAbbr');
    addFormatToken('NNN', 0, 0, 'eraAbbr');
    addFormatToken('NNNN', 0, 0, 'eraName');
    addFormatToken('NNNNN', 0, 0, 'eraNarrow');
 
    addFormatToken('y', ['y', 1], 'yo', 'eraYear');
    addFormatToken('y', ['yy', 2], 0, 'eraYear');
    addFormatToken('y', ['yyy', 3], 0, 'eraYear');
    addFormatToken('y', ['yyyy', 4], 0, 'eraYear');
 
    addRegexToken('N', matchEraAbbr);
    addRegexToken('NN', matchEraAbbr);
    addRegexToken('NNN', matchEraAbbr);
    addRegexToken('NNNN', matchEraName);
    addRegexToken('NNNNN', matchEraNarrow);
 
    addParseToken(
        ['N', 'NN', 'NNN', 'NNNN', 'NNNNN'],
        function (input, array, config, token) {
            var era = config._locale.erasParse(input, token, config._strict);
            if (era) {
                getParsingFlags(config).era = era;
            } else {
                getParsingFlags(config).invalidEra = input;
            }
        }
    );
 
    addRegexToken('y', matchUnsigned);
    addRegexToken('yy', matchUnsigned);
    addRegexToken('yyy', matchUnsigned);
    addRegexToken('yyyy', matchUnsigned);
    addRegexToken('yo', matchEraYearOrdinal);
 
    addParseToken(['y', 'yy', 'yyy', 'yyyy'], YEAR);
    addParseToken(['yo'], function (input, array, config, token) {
        var match;
        if (config._locale._eraYearOrdinalRegex) {
            match = input.match(config._locale._eraYearOrdinalRegex);
        }
 
        if (config._locale.eraYearOrdinalParse) {
            array[YEAR] = config._locale.eraYearOrdinalParse(input, match);
        } else {
            array[YEAR] = parseInt(input, 10);
        }
    });
 
    function localeEras(m, format) {
        var i,
            l,
            date,
            eras = this._eras || getLocale('en')._eras;
        for (i = 0, l = eras.length; i < l; ++i) {
            switch (typeof eras[i].since) {
                case 'string':
                    // truncate time
                    date = hooks(eras[i].since).startOf('day');
                    eras[i].since = date.valueOf();
                    break;
            }
 
            switch (typeof eras[i].until) {
                case 'undefined':
                    eras[i].until = +Infinity;
                    break;
                case 'string':
                    // truncate time
                    date = hooks(eras[i].until).startOf('day').valueOf();
                    eras[i].until = date.valueOf();
                    break;
            }
        }
        return eras;
    }
 
    function localeErasParse(eraName, format, strict) {
        var i,
            l,
            eras = this.eras(),
            name,
            abbr,
            narrow;
        eraName = eraName.toUpperCase();
 
        for (i = 0, l = eras.length; i < l; ++i) {
            name = eras[i].name.toUpperCase();
            abbr = eras[i].abbr.toUpperCase();
            narrow = eras[i].narrow.toUpperCase();
 
            if (strict) {
                switch (format) {
                    case 'N':
                    case 'NN':
                    case 'NNN':
                        if (abbr === eraName) {
                            return eras[i];
                        }
                        break;
 
                    case 'NNNN':
                        if (name === eraName) {
                            return eras[i];
                        }
                        break;
 
                    case 'NNNNN':
                        if (narrow === eraName) {
                            return eras[i];
                        }
                        break;
                }
            } else if ([name, abbr, narrow].indexOf(eraName) >= 0) {
                return eras[i];
            }
        }
    }
 
    function localeErasConvertYear(era, year) {
        var dir = era.since <= era.until ? +1 : -1;
        if (year === undefined) {
            return hooks(era.since).year();
        } else {
            return hooks(era.since).year() + (year - era.offset) * dir;
        }
    }
 
    function getEraName() {
        var i,
            l,
            val,
            eras = this.localeData().eras();
        for (i = 0, l = eras.length; i < l; ++i) {
            // truncate time
            val = this.clone().startOf('day').valueOf();
 
            if (eras[i].since <= val && val <= eras[i].until) {
                return eras[i].name;
            }
            if (eras[i].until <= val && val <= eras[i].since) {
                return eras[i].name;
            }
        }
 
        return '';
    }
 
    function getEraNarrow() {
        var i,
            l,
            val,
            eras = this.localeData().eras();
        for (i = 0, l = eras.length; i < l; ++i) {
            // truncate time
            val = this.clone().startOf('day').valueOf();
 
            if (eras[i].since <= val && val <= eras[i].until) {
                return eras[i].narrow;
            }
            if (eras[i].until <= val && val <= eras[i].since) {
                return eras[i].narrow;
            }
        }
 
        return '';
    }
 
    function getEraAbbr() {
        var i,
            l,
            val,
            eras = this.localeData().eras();
        for (i = 0, l = eras.length; i < l; ++i) {
            // truncate time
            val = this.clone().startOf('day').valueOf();
 
            if (eras[i].since <= val && val <= eras[i].until) {
                return eras[i].abbr;
            }
            if (eras[i].until <= val && val <= eras[i].since) {
                return eras[i].abbr;
            }
        }
 
        return '';
    }
 
    function getEraYear() {
        var i,
            l,
            dir,
            val,
            eras = this.localeData().eras();
        for (i = 0, l = eras.length; i < l; ++i) {
            dir = eras[i].since <= eras[i].until ? +1 : -1;
 
            // truncate time
            val = this.clone().startOf('day').valueOf();
 
            Eif (
                (eras[i].since <= val && val <= eras[i].until) ||
                (eras[i].until <= val && val <= eras[i].since)
            ) {
                return (
                    (this.year() - hooks(eras[i].since).year()) * dir +
                    eras[i].offset
                );
            }
        }
 
        return this.year();
    }
 
    function erasNameRegex(isStrict) {
        if (!hasOwnProp(this, '_erasNameRegex')) {
            computeErasParse.call(this);
        }
        return isStrict ? this._erasNameRegex : this._erasRegex;
    }
 
    function erasAbbrRegex(isStrict) {
        if (!hasOwnProp(this, '_erasAbbrRegex')) {
            computeErasParse.call(this);
        }
        return isStrict ? this._erasAbbrRegex : this._erasRegex;
    }
 
    function erasNarrowRegex(isStrict) {
        if (!hasOwnProp(this, '_erasNarrowRegex')) {
            computeErasParse.call(this);
        }
        return isStrict ? this._erasNarrowRegex : this._erasRegex;
    }
 
    function matchEraAbbr(isStrict, locale) {
        return locale.erasAbbrRegex(isStrict);
    }
 
    function matchEraName(isStrict, locale) {
        return locale.erasNameRegex(isStrict);
    }
 
    function matchEraNarrow(isStrict, locale) {
        return locale.erasNarrowRegex(isStrict);
    }
 
    function matchEraYearOrdinal(isStrict, locale) {
        return locale._eraYearOrdinalRegex || matchUnsigned;
    }
 
    function computeErasParse() {
        var abbrPieces = [],
            namePieces = [],
            narrowPieces = [],
            mixedPieces = [],
            i,
            l,
            eras = this.eras();
 
        for (i = 0, l = eras.length; i < l; ++i) {
            namePieces.push(regexEscape(eras[i].name));
            abbrPieces.push(regexEscape(eras[i].abbr));
            narrowPieces.push(regexEscape(eras[i].narrow));
 
            mixedPieces.push(regexEscape(eras[i].name));
            mixedPieces.push(regexEscape(eras[i].abbr));
            mixedPieces.push(regexEscape(eras[i].narrow));
        }
 
        this._erasRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');
        this._erasNameRegex = new RegExp('^(' + namePieces.join('|') + ')', 'i');
        this._erasAbbrRegex = new RegExp('^(' + abbrPieces.join('|') + ')', 'i');
        this._erasNarrowRegex = new RegExp(
            '^(' + narrowPieces.join('|') + ')',
            'i'
        );
    }
 
    // FORMATTING
 
    addFormatToken(0, ['gg', 2], 0, function () {
        return this.weekYear() % 100;
    });
 
    addFormatToken(0, ['GG', 2], 0, function () {
        return this.isoWeekYear() % 100;
    });
 
    function addWeekYearFormatToken(token, getter) {
        addFormatToken(0, [token, token.length], 0, getter);
    }
 
    addWeekYearFormatToken('gggg', 'weekYear');
    addWeekYearFormatToken('ggggg', 'weekYear');
    addWeekYearFormatToken('GGGG', 'isoWeekYear');
    addWeekYearFormatToken('GGGGG', 'isoWeekYear');
 
    // ALIASES
 
    addUnitAlias('weekYear', 'gg');
    addUnitAlias('isoWeekYear', 'GG');
 
    // PRIORITY
 
    addUnitPriority('weekYear', 1);
    addUnitPriority('isoWeekYear', 1);
 
    // PARSING
 
    addRegexToken('G', matchSigned);
    addRegexToken('g', matchSigned);
    addRegexToken('GG', match1to2, match2);
    addRegexToken('gg', match1to2, match2);
    addRegexToken('GGGG', match1to4, match4);
    addRegexToken('gggg', match1to4, match4);
    addRegexToken('GGGGG', match1to6, match6);
    addRegexToken('ggggg', match1to6, match6);
 
    addWeekParseToken(
        ['gggg', 'ggggg', 'GGGG', 'GGGGG'],
        function (input, week, config, token) {
            week[token.substr(0, 2)] = toInt(input);
        }
    );
 
    addWeekParseToken(['gg', 'GG'], function (input, week, config, token) {
        week[token] = hooks.parseTwoDigitYear(input);
    });
 
    // MOMENTS
 
    function getSetWeekYear(input) {
        return getSetWeekYearHelper.call(
            this,
            input,
            this.week(),
            this.weekday(),
            this.localeData()._week.dow,
            this.localeData()._week.doy
        );
    }
 
    function getSetISOWeekYear(input) {
        return getSetWeekYearHelper.call(
            this,
            input,
            this.isoWeek(),
            this.isoWeekday(),
            1,
            4
        );
    }
 
    function getISOWeeksInYear() {
        return weeksInYear(this.year(), 1, 4);
    }
 
    function getISOWeeksInISOWeekYear() {
        return weeksInYear(this.isoWeekYear(), 1, 4);
    }
 
    function getWeeksInYear() {
        var weekInfo = this.localeData()._week;
        return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy);
    }
 
    function getWeeksInWeekYear() {
        var weekInfo = this.localeData()._week;
        return weeksInYear(this.weekYear(), weekInfo.dow, weekInfo.doy);
    }
 
    function getSetWeekYearHelper(input, week, weekday, dow, doy) {
        var weeksTarget;
        if (input == null) {
            return weekOfYear(this, dow, doy).year;
        } else {
            weeksTarget = weeksInYear(input, dow, doy);
            if (week > weeksTarget) {
                week = weeksTarget;
            }
            return setWeekAll.call(this, input, week, weekday, dow, doy);
        }
    }
 
    function setWeekAll(weekYear, week, weekday, dow, doy) {
        var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy),
            date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear);
 
        this.year(date.getUTCFullYear());
        this.month(date.getUTCMonth());
        this.date(date.getUTCDate());
        return this;
    }
 
    // FORMATTING
 
    addFormatToken('Q', 0, 'Qo', 'quarter');
 
    // ALIASES
 
    addUnitAlias('quarter', 'Q');
 
    // PRIORITY
 
    addUnitPriority('quarter', 7);
 
    // PARSING
 
    addRegexToken('Q', match1);
    addParseToken('Q', function (input, array) {
        array[MONTH] = (toInt(input) - 1) * 3;
    });
 
    // MOMENTS
 
    function getSetQuarter(input) {
        return input == null
            ? Math.ceil((this.month() + 1) / 3)
            : this.month((input - 1) * 3 + (this.month() % 3));
    }
 
    // FORMATTING
 
    addFormatToken('D', ['DD', 2], 'Do', 'date');
 
    // ALIASES
 
    addUnitAlias('date', 'D');
 
    // PRIORITY
    addUnitPriority('date', 9);
 
    // PARSING
 
    addRegexToken('D', match1to2);
    addRegexToken('DD', match1to2, match2);
    addRegexToken('Do', function (isStrict, locale) {
        // TODO: Remove "ordinalParse" fallback in next major release.
        return isStrict
            ? locale._dayOfMonthOrdinalParse || locale._ordinalParse
            : locale._dayOfMonthOrdinalParseLenient;
    });
 
    addParseToken(['D', 'DD'], DATE);
    addParseToken('Do', function (input, array) {
        array[DATE] = toInt(input.match(match1to2)[0]);
    });
 
    // MOMENTS
 
    var getSetDayOfMonth = makeGetSet('Date', true);
 
    // FORMATTING
 
    addFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear');
 
    // ALIASES
 
    addUnitAlias('dayOfYear', 'DDD');
 
    // PRIORITY
    addUnitPriority('dayOfYear', 4);
 
    // PARSING
 
    addRegexToken('DDD', match1to3);
    addRegexToken('DDDD', match3);
    addParseToken(['DDD', 'DDDD'], function (input, array, config) {
        config._dayOfYear = toInt(input);
    });
 
    // HELPERS
 
    // MOMENTS
 
    function getSetDayOfYear(input) {
        var dayOfYear =
            Math.round(
                (this.clone().startOf('day') - this.clone().startOf('year')) / 864e5
            ) + 1;
        return input == null ? dayOfYear : this.add(input - dayOfYear, 'd');
    }
 
    // FORMATTING
 
    addFormatToken('m', ['mm', 2], 0, 'minute');
 
    // ALIASES
 
    addUnitAlias('minute', 'm');
 
    // PRIORITY
 
    addUnitPriority('minute', 14);
 
    // PARSING
 
    addRegexToken('m', match1to2);
    addRegexToken('mm', match1to2, match2);
    addParseToken(['m', 'mm'], MINUTE);
 
    // MOMENTS
 
    var getSetMinute = makeGetSet('Minutes', false);
 
    // FORMATTING
 
    addFormatToken('s', ['ss', 2], 0, 'second');
 
    // ALIASES
 
    addUnitAlias('second', 's');
 
    // PRIORITY
 
    addUnitPriority('second', 15);
 
    // PARSING
 
    addRegexToken('s', match1to2);
    addRegexToken('ss', match1to2, match2);
    addParseToken(['s', 'ss'], SECOND);
 
    // MOMENTS
 
    var getSetSecond = makeGetSet('Seconds', false);
 
    // FORMATTING
 
    addFormatToken('S', 0, 0, function () {
        return ~~(this.millisecond() / 100);
    });
 
    addFormatToken(0, ['SS', 2], 0, function () {
        return ~~(this.millisecond() / 10);
    });
 
    addFormatToken(0, ['SSS', 3], 0, 'millisecond');
    addFormatToken(0, ['SSSS', 4], 0, function () {
        return this.millisecond() * 10;
    });
    addFormatToken(0, ['SSSSS', 5], 0, function () {
        return this.millisecond() * 100;
    });
    addFormatToken(0, ['SSSSSS', 6], 0, function () {
        return this.millisecond() * 1000;
    });
    addFormatToken(0, ['SSSSSSS', 7], 0, function () {
        return this.millisecond() * 10000;
    });
    addFormatToken(0, ['SSSSSSSS', 8], 0, function () {
        return this.millisecond() * 100000;
    });
    addFormatToken(0, ['SSSSSSSSS', 9], 0, function () {
        return this.millisecond() * 1000000;
    });
 
    // ALIASES
 
    addUnitAlias('millisecond', 'ms');
 
    // PRIORITY
 
    addUnitPriority('millisecond', 16);
 
    // PARSING
 
    addRegexToken('S', match1to3, match1);
    addRegexToken('SS', match1to3, match2);
    addRegexToken('SSS', match1to3, match3);
 
    var token, getSetMillisecond;
    for (token = 'SSSS'; token.length <= 9; token += 'S') {
        addRegexToken(token, matchUnsigned);
    }
 
    function parseMs(input, array) {
        array[MILLISECOND] = toInt(('0.' + input) * 1000);
    }
 
    for (token = 'S'; token.length <= 9; token += 'S') {
        addParseToken(token, parseMs);
    }
 
    getSetMillisecond = makeGetSet('Milliseconds', false);
 
    // FORMATTING
 
    addFormatToken('z', 0, 0, 'zoneAbbr');
    addFormatToken('zz', 0, 0, 'zoneName');
 
    // MOMENTS
 
    function getZoneAbbr() {
        return this._isUTC ? 'UTC' : '';
    }
 
    function getZoneName() {
        return this._isUTC ? 'Coordinated Universal Time' : '';
    }
 
    var proto = Moment.prototype;
 
    proto.add = add;
    proto.calendar = calendar$1;
    proto.clone = clone;
    proto.diff = diff;
    proto.endOf = endOf;
    proto.format = format;
    proto.from = from;
    proto.fromNow = fromNow;
    proto.to = to;
    proto.toNow = toNow;
    proto.get = stringGet;
    proto.invalidAt = invalidAt;
    proto.isAfter = isAfter;
    proto.isBefore = isBefore;
    proto.isBetween = isBetween;
    proto.isSame = isSame;
    proto.isSameOrAfter = isSameOrAfter;
    proto.isSameOrBefore = isSameOrBefore;
    proto.isValid = isValid$2;
    proto.lang = lang;
    proto.locale = locale;
    proto.localeData = localeData;
    proto.max = prototypeMax;
    proto.min = prototypeMin;
    proto.parsingFlags = parsingFlags;
    proto.set = stringSet;
    proto.startOf = startOf;
    proto.subtract = subtract;
    proto.toArray = toArray;
    proto.toObject = toObject;
    proto.toDate = toDate;
    proto.toISOString = toISOString;
    proto.inspect = inspect;
    Eif (typeof Symbol !== 'undefined' && Symbol.for != null) {
        proto[Symbol.for('nodejs.util.inspect.custom')] = function () {
            return 'Moment<' + this.format() + '>';
        };
    }
    proto.toJSON = toJSON;
    proto.toString = toString;
    proto.unix = unix;
    proto.valueOf = valueOf;
    proto.creationData = creationData;
    proto.eraName = getEraName;
    proto.eraNarrow = getEraNarrow;
    proto.eraAbbr = getEraAbbr;
    proto.eraYear = getEraYear;
    proto.year = getSetYear;
    proto.isLeapYear = getIsLeapYear;
    proto.weekYear = getSetWeekYear;
    proto.isoWeekYear = getSetISOWeekYear;
    proto.quarter = proto.quarters = getSetQuarter;
    proto.month = getSetMonth;
    proto.daysInMonth = getDaysInMonth;
    proto.week = proto.weeks = getSetWeek;
    proto.isoWeek = proto.isoWeeks = getSetISOWeek;
    proto.weeksInYear = getWeeksInYear;
    proto.weeksInWeekYear = getWeeksInWeekYear;
    proto.isoWeeksInYear = getISOWeeksInYear;
    proto.isoWeeksInISOWeekYear = getISOWeeksInISOWeekYear;
    proto.date = getSetDayOfMonth;
    proto.day = proto.days = getSetDayOfWeek;
    proto.weekday = getSetLocaleDayOfWeek;
    proto.isoWeekday = getSetISODayOfWeek;
    proto.dayOfYear = getSetDayOfYear;
    proto.hour = proto.hours = getSetHour;
    proto.minute = proto.minutes = getSetMinute;
    proto.second = proto.seconds = getSetSecond;
    proto.millisecond = proto.milliseconds = getSetMillisecond;
    proto.utcOffset = getSetOffset;
    proto.utc = setOffsetToUTC;
    proto.local = setOffsetToLocal;
    proto.parseZone = setOffsetToParsedOffset;
    proto.hasAlignedHourOffset = hasAlignedHourOffset;
    proto.isDST = isDaylightSavingTime;
    proto.isLocal = isLocal;
    proto.isUtcOffset = isUtcOffset;
    proto.isUtc = isUtc;
    proto.isUTC = isUtc;
    proto.zoneAbbr = getZoneAbbr;
    proto.zoneName = getZoneName;
    proto.dates = deprecate(
        'dates accessor is deprecated. Use date instead.',
        getSetDayOfMonth
    );
    proto.months = deprecate(
        'months accessor is deprecated. Use month instead',
        getSetMonth
    );
    proto.years = deprecate(
        'years accessor is deprecated. Use year instead',
        getSetYear
    );
    proto.zone = deprecate(
        'moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/',
        getSetZone
    );
    proto.isDSTShifted = deprecate(
        'isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information',
        isDaylightSavingTimeShifted
    );
 
    function createUnix(input) {
        return createLocal(input * 1000);
    }
 
    function createInZone() {
        return createLocal.apply(null, arguments).parseZone();
    }
 
    function preParsePostFormat(string) {
        return string;
    }
 
    var proto$1 = Locale.prototype;
 
    proto$1.calendar = calendar;
    proto$1.longDateFormat = longDateFormat;
    proto$1.invalidDate = invalidDate;
    proto$1.ordinal = ordinal;
    proto$1.preparse = preParsePostFormat;
    proto$1.postformat = preParsePostFormat;
    proto$1.relativeTime = relativeTime;
    proto$1.pastFuture = pastFuture;
    proto$1.set = set;
    proto$1.eras = localeEras;
    proto$1.erasParse = localeErasParse;
    proto$1.erasConvertYear = localeErasConvertYear;
    proto$1.erasAbbrRegex = erasAbbrRegex;
    proto$1.erasNameRegex = erasNameRegex;
    proto$1.erasNarrowRegex = erasNarrowRegex;
 
    proto$1.months = localeMonths;
    proto$1.monthsShort = localeMonthsShort;
    proto$1.monthsParse = localeMonthsParse;
    proto$1.monthsRegex = monthsRegex;
    proto$1.monthsShortRegex = monthsShortRegex;
    proto$1.week = localeWeek;
    proto$1.firstDayOfYear = localeFirstDayOfYear;
    proto$1.firstDayOfWeek = localeFirstDayOfWeek;
 
    proto$1.weekdays = localeWeekdays;
    proto$1.weekdaysMin = localeWeekdaysMin;
    proto$1.weekdaysShort = localeWeekdaysShort;
    proto$1.weekdaysParse = localeWeekdaysParse;
 
    proto$1.weekdaysRegex = weekdaysRegex;
    proto$1.weekdaysShortRegex = weekdaysShortRegex;
    proto$1.weekdaysMinRegex = weekdaysMinRegex;
 
    proto$1.isPM = localeIsPM;
    proto$1.meridiem = localeMeridiem;
 
    function get$1(format, index, field, setter) {
        var locale = getLocale(),
            utc = createUTC().set(setter, index);
        return locale[field](utc, format);
    }
 
    function listMonthsImpl(format, index, field) {
        if (isNumber(format)) {
            index = format;
            format = undefined;
        }
 
        format = format || '';
 
        if (index != null) {
            return get$1(format, index, field, 'month');
        }
 
        var i,
            out = [];
        for (i = 0; i < 12; i++) {
            out[i] = get$1(format, i, field, 'month');
        }
        return out;
    }
 
    // ()
    // (5)
    // (fmt, 5)
    // (fmt)
    // (true)
    // (true, 5)
    // (true, fmt, 5)
    // (true, fmt)
    function listWeekdaysImpl(localeSorted, format, index, field) {
        if (typeof localeSorted === 'boolean') {
            if (isNumber(format)) {
                index = format;
                format = undefined;
            }
 
            format = format || '';
        } else {
            format = localeSorted;
            index = format;
            localeSorted = false;
 
            if (isNumber(format)) {
                index = format;
                format = undefined;
            }
 
            format = format || '';
        }
 
        var locale = getLocale(),
            shift = localeSorted ? locale._week.dow : 0,
            i,
            out = [];
 
        if (index != null) {
            return get$1(format, (index + shift) % 7, field, 'day');
        }
 
        for (i = 0; i < 7; i++) {
            out[i] = get$1(format, (i + shift) % 7, field, 'day');
        }
        return out;
    }
 
    function listMonths(format, index) {
        return listMonthsImpl(format, index, 'months');
    }
 
    function listMonthsShort(format, index) {
        return listMonthsImpl(format, index, 'monthsShort');
    }
 
    function listWeekdays(localeSorted, format, index) {
        return listWeekdaysImpl(localeSorted, format, index, 'weekdays');
    }
 
    function listWeekdaysShort(localeSorted, format, index) {
        return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort');
    }
 
    function listWeekdaysMin(localeSorted, format, index) {
        return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin');
    }
 
    getSetGlobalLocale('en', {
        eras: [
            {
                since: '0001-01-01',
                until: +Infinity,
                offset: 1,
                name: 'Anno Domini',
                narrow: 'AD',
                abbr: 'AD',
            },
            {
                since: '0000-12-31',
                until: -Infinity,
                offset: 1,
                name: 'Before Christ',
                narrow: 'BC',
                abbr: 'BC',
            },
        ],
        dayOfMonthOrdinalParse: /\d{1,2}(th|st|nd|rd)/,
        ordinal: function (number) {
            var b = number % 10,
                output =
                    toInt((number % 100) / 10) === 1
                        ? 'th'
                        : b === 1
                        ? 'st'
                        : b === 2
                        ? 'nd'
                        : b === 3
                        ? 'rd'
                        : 'th';
            return number + output;
        },
    });
 
    // Side effect imports
 
    hooks.lang = deprecate(
        'moment.lang is deprecated. Use moment.locale instead.',
        getSetGlobalLocale
    );
    hooks.langData = deprecate(
        'moment.langData is deprecated. Use moment.localeData instead.',
        getLocale
    );
 
    var mathAbs = Math.abs;
 
    function abs() {
        var data = this._data;
 
        this._milliseconds = mathAbs(this._milliseconds);
        this._days = mathAbs(this._days);
        this._months = mathAbs(this._months);
 
        data.milliseconds = mathAbs(data.milliseconds);
        data.seconds = mathAbs(data.seconds);
        data.minutes = mathAbs(data.minutes);
        data.hours = mathAbs(data.hours);
        data.months = mathAbs(data.months);
        data.years = mathAbs(data.years);
 
        return this;
    }
 
    function addSubtract$1(duration, input, value, direction) {
        var other = createDuration(input, value);
 
        duration._milliseconds += direction * other._milliseconds;
        duration._days += direction * other._days;
        duration._months += direction * other._months;
 
        return duration._bubble();
    }
 
    // supports only 2.0-style add(1, 's') or add(duration)
    function add$1(input, value) {
        return addSubtract$1(this, input, value, 1);
    }
 
    // supports only 2.0-style subtract(1, 's') or subtract(duration)
    function subtract$1(input, value) {
        return addSubtract$1(this, input, value, -1);
    }
 
    function absCeil(number) {
        Iif (number < 0) {
            return Math.floor(number);
        } else {
            return Math.ceil(number);
        }
    }
 
    function bubble() {
        var milliseconds = this._milliseconds,
            days = this._days,
            months = this._months,
            data = this._data,
            seconds,
            minutes,
            hours,
            years,
            monthsFromDays;
 
        // if we have a mix of positive and negative values, bubble down first
        // check: https://github.com/moment/moment/issues/2166
        Iif (
            !(
                (milliseconds >= 0 && days >= 0 && months >= 0) ||
                (milliseconds <= 0 && days <= 0 && months <= 0)
            )
        ) {
            milliseconds += absCeil(monthsToDays(months) + days) * 864e5;
            days = 0;
            months = 0;
        }
 
        // The following code bubbles up values, see the tests for
        // examples of what that means.
        data.milliseconds = milliseconds % 1000;
 
        seconds = absFloor(milliseconds / 1000);
        data.seconds = seconds % 60;
 
        minutes = absFloor(seconds / 60);
        data.minutes = minutes % 60;
 
        hours = absFloor(minutes / 60);
        data.hours = hours % 24;
 
        days += absFloor(hours / 24);
 
        // convert days to months
        monthsFromDays = absFloor(daysToMonths(days));
        months += monthsFromDays;
        days -= absCeil(monthsToDays(monthsFromDays));
 
        // 12 months -> 1 year
        years = absFloor(months / 12);
        months %= 12;
 
        data.days = days;
        data.months = months;
        data.years = years;
 
        return this;
    }
 
    function daysToMonths(days) {
        // 400 years have 146097 days (taking into account leap year rules)
        // 400 years have 12 months === 4800
        return (days * 4800) / 146097;
    }
 
    function monthsToDays(months) {
        // the reverse of daysToMonths
        return (months * 146097) / 4800;
    }
 
    function as(units) {
        if (!this.isValid()) {
            return NaN;
        }
        var days,
            months,
            milliseconds = this._milliseconds;
 
        units = normalizeUnits(units);
 
        if (units === 'month' || units === 'quarter' || units === 'year') {
            days = this._days + milliseconds / 864e5;
            months = this._months + daysToMonths(days);
            switch (units) {
                case 'month':
                    return months;
                case 'quarter':
                    return months / 3;
                case 'year':
                    return months / 12;
            }
        } else {
            // handle milliseconds separately because of floating point math errors (issue #1867)
            days = this._days + Math.round(monthsToDays(this._months));
            switch (units) {
                case 'week':
                    return days / 7 + milliseconds / 6048e5;
                case 'day':
                    return days + milliseconds / 864e5;
                case 'hour':
                    return days * 24 + milliseconds / 36e5;
                case 'minute':
                    return days * 1440 + milliseconds / 6e4;
                case 'second':
                    return days * 86400 + milliseconds / 1000;
                // Math.floor prevents floating point math errors here
                case 'millisecond':
                    return Math.floor(days * 864e5) + milliseconds;
                default:
                    throw new Error('Unknown unit ' + units);
            }
        }
    }
 
    // TODO: Use this.as('ms')?
    function valueOf$1() {
        if (!this.isValid()) {
            return NaN;
        }
        return (
            this._milliseconds +
            this._days * 864e5 +
            (this._months % 12) * 2592e6 +
            toInt(this._months / 12) * 31536e6
        );
    }
 
    function makeAs(alias) {
        return function () {
            return this.as(alias);
        };
    }
 
    var asMilliseconds = makeAs('ms'),
        asSeconds = makeAs('s'),
        asMinutes = makeAs('m'),
        asHours = makeAs('h'),
        asDays = makeAs('d'),
        asWeeks = makeAs('w'),
        asMonths = makeAs('M'),
        asQuarters = makeAs('Q'),
        asYears = makeAs('y');
 
    function clone$1() {
        return createDuration(this);
    }
 
    function get$2(units) {
        units = normalizeUnits(units);
        return this.isValid() ? this[units + 's']() : NaN;
    }
 
    function makeGetter(name) {
        return function () {
            return this.isValid() ? this._data[name] : NaN;
        };
    }
 
    var milliseconds = makeGetter('milliseconds'),
        seconds = makeGetter('seconds'),
        minutes = makeGetter('minutes'),
        hours = makeGetter('hours'),
        days = makeGetter('days'),
        months = makeGetter('months'),
        years = makeGetter('years');
 
    function weeks() {
        return absFloor(this.days() / 7);
    }
 
    var round = Math.round,
        thresholds = {
            ss: 44, // a few seconds to seconds
            s: 45, // seconds to minute
            m: 45, // minutes to hour
            h: 22, // hours to day
            d: 26, // days to month/week
            w: null, // weeks to month
            M: 11, // months to year
        };
 
    // helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize
    function substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) {
        return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture);
    }
 
    function relativeTime$1(posNegDuration, withoutSuffix, thresholds, locale) {
        var duration = createDuration(posNegDuration).abs(),
            seconds = round(duration.as('s')),
            minutes = round(duration.as('m')),
            hours = round(duration.as('h')),
            days = round(duration.as('d')),
            months = round(duration.as('M')),
            weeks = round(duration.as('w')),
            years = round(duration.as('y')),
            a =
                (seconds <= thresholds.ss && ['s', seconds]) ||
                (seconds < thresholds.s && ['ss', seconds]) ||
                (minutes <= 1 && ['m']) ||
                (minutes < thresholds.m && ['mm', minutes]) ||
                (hours <= 1 && ['h']) ||
                (hours < thresholds.h && ['hh', hours]) ||
                (days <= 1 && ['d']) ||
                (days < thresholds.d && ['dd', days]);
 
        if (thresholds.w != null) {
            a =
                a ||
                (weeks <= 1 && ['w']) ||
                (weeks < thresholds.w && ['ww', weeks]);
        }
        a = a ||
            (months <= 1 && ['M']) ||
            (months < thresholds.M && ['MM', months]) ||
            (years <= 1 && ['y']) || ['yy', years];
 
        a[2] = withoutSuffix;
        a[3] = +posNegDuration > 0;
        a[4] = locale;
        return substituteTimeAgo.apply(null, a);
    }
 
    // This function allows you to set the rounding function for relative time strings
    function getSetRelativeTimeRounding(roundingFunction) {
        if (roundingFunction === undefined) {
            return round;
        }
        if (typeof roundingFunction === 'function') {
            round = roundingFunction;
            return true;
        }
        return false;
    }
 
    // This function allows you to set a threshold for relative time strings
    function getSetRelativeTimeThreshold(threshold, limit) {
        if (thresholds[threshold] === undefined) {
            return false;
        }
        if (limit === undefined) {
            return thresholds[threshold];
        }
        thresholds[threshold] = limit;
        if (threshold === 's') {
            thresholds.ss = limit - 1;
        }
        return true;
    }
 
    function humanize(argWithSuffix, argThresholds) {
        if (!this.isValid()) {
            return this.localeData().invalidDate();
        }
 
        var withSuffix = false,
            th = thresholds,
            locale,
            output;
 
        if (typeof argWithSuffix === 'object') {
            argThresholds = argWithSuffix;
            argWithSuffix = false;
        }
        if (typeof argWithSuffix === 'boolean') {
            withSuffix = argWithSuffix;
        }
        if (typeof argThresholds === 'object') {
            th = Object.assign({}, thresholds, argThresholds);
            if (argThresholds.s != null && argThresholds.ss == null) {
                th.ss = argThresholds.s - 1;
            }
        }
 
        locale = this.localeData();
        output = relativeTime$1(this, !withSuffix, th, locale);
 
        if (withSuffix) {
            output = locale.pastFuture(+this, output);
        }
 
        return locale.postformat(output);
    }
 
    var abs$1 = Math.abs;
 
    function sign(x) {
        return (x > 0) - (x < 0) || +x;
    }
 
    function toISOString$1() {
        // for ISO strings we do not use the normal bubbling rules:
        //  * milliseconds bubble up until they become hours
        //  * days do not bubble at all
        //  * months bubble up until they become years
        // This is because there is no context-free conversion between hours and days
        // (think of clock changes)
        // and also not between days and months (28-31 days per month)
        if (!this.isValid()) {
            return this.localeData().invalidDate();
        }
 
        var seconds = abs$1(this._milliseconds) / 1000,
            days = abs$1(this._days),
            months = abs$1(this._months),
            minutes,
            hours,
            years,
            s,
            total = this.asSeconds(),
            totalSign,
            ymSign,
            daysSign,
            hmsSign;
 
        if (!total) {
            // this is the same as C#'s (Noda) and python (isodate)...
            // but not other JS (goog.date)
            return 'P0D';
        }
 
        // 3600 seconds -> 60 minutes -> 1 hour
        minutes = absFloor(seconds / 60);
        hours = absFloor(minutes / 60);
        seconds %= 60;
        minutes %= 60;
 
        // 12 months -> 1 year
        years = absFloor(months / 12);
        months %= 12;
 
        // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js
        s = seconds ? seconds.toFixed(3).replace(/\.?0+$/, '') : '';
 
        totalSign = total < 0 ? '-' : '';
        ymSign = sign(this._months) !== sign(total) ? '-' : '';
        daysSign = sign(this._days) !== sign(total) ? '-' : '';
        hmsSign = sign(this._milliseconds) !== sign(total) ? '-' : '';
 
        return (
            totalSign +
            'P' +
            (years ? ymSign + years + 'Y' : '') +
            (months ? ymSign + months + 'M' : '') +
            (days ? daysSign + days + 'D' : '') +
            (hours || minutes || seconds ? 'T' : '') +
            (hours ? hmsSign + hours + 'H' : '') +
            (minutes ? hmsSign + minutes + 'M' : '') +
            (seconds ? hmsSign + s + 'S' : '')
        );
    }
 
    var proto$2 = Duration.prototype;
 
    proto$2.isValid = isValid$1;
    proto$2.abs = abs;
    proto$2.add = add$1;
    proto$2.subtract = subtract$1;
    proto$2.as = as;
    proto$2.asMilliseconds = asMilliseconds;
    proto$2.asSeconds = asSeconds;
    proto$2.asMinutes = asMinutes;
    proto$2.asHours = asHours;
    proto$2.asDays = asDays;
    proto$2.asWeeks = asWeeks;
    proto$2.asMonths = asMonths;
    proto$2.asQuarters = asQuarters;
    proto$2.asYears = asYears;
    proto$2.valueOf = valueOf$1;
    proto$2._bubble = bubble;
    proto$2.clone = clone$1;
    proto$2.get = get$2;
    proto$2.milliseconds = milliseconds;
    proto$2.seconds = seconds;
    proto$2.minutes = minutes;
    proto$2.hours = hours;
    proto$2.days = days;
    proto$2.weeks = weeks;
    proto$2.months = months;
    proto$2.years = years;
    proto$2.humanize = humanize;
    proto$2.toISOString = toISOString$1;
    proto$2.toString = toISOString$1;
    proto$2.toJSON = toISOString$1;
    proto$2.locale = locale;
    proto$2.localeData = localeData;
 
    proto$2.toIsoString = deprecate(
        'toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)',
        toISOString$1
    );
    proto$2.lang = lang;
 
    // FORMATTING
 
    addFormatToken('X', 0, 0, 'unix');
    addFormatToken('x', 0, 0, 'valueOf');
 
    // PARSING
 
    addRegexToken('x', matchSigned);
    addRegexToken('X', matchTimestamp);
    addParseToken('X', function (input, array, config) {
        config._d = new Date(parseFloat(input) * 1000);
    });
    addParseToken('x', function (input, array, config) {
        config._d = new Date(toInt(input));
    });
 
    //! moment.js
 
    hooks.version = '2.29.4';
 
    setHookCallback(createLocal);
 
    hooks.fn = proto;
    hooks.min = min;
    hooks.max = max;
    hooks.now = now;
    hooks.utc = createUTC;
    hooks.unix = createUnix;
    hooks.months = listMonths;
    hooks.isDate = isDate;
    hooks.locale = getSetGlobalLocale;
    hooks.invalid = createInvalid;
    hooks.duration = createDuration;
    hooks.isMoment = isMoment;
    hooks.weekdays = listWeekdays;
    hooks.parseZone = createInZone;
    hooks.localeData = getLocale;
    hooks.isDuration = isDuration;
    hooks.monthsShort = listMonthsShort;
    hooks.weekdaysMin = listWeekdaysMin;
    hooks.defineLocale = defineLocale;
    hooks.updateLocale = updateLocale;
    hooks.locales = listLocales;
    hooks.weekdaysShort = listWeekdaysShort;
    hooks.normalizeUnits = normalizeUnits;
    hooks.relativeTimeRounding = getSetRelativeTimeRounding;
    hooks.relativeTimeThreshold = getSetRelativeTimeThreshold;
    hooks.calendarFormat = getCalendarFormat;
    hooks.prototype = proto;
 
    // currently HTML5 input type only supports 24-hour formats
    hooks.HTML5_FMT = {
        DATETIME_LOCAL: 'YYYY-MM-DDTHH:mm', // <input type="datetime-local" />
        DATETIME_LOCAL_SECONDS: 'YYYY-MM-DDTHH:mm:ss', // <input type="datetime-local" step="1" />
        DATETIME_LOCAL_MS: 'YYYY-MM-DDTHH:mm:ss.SSS', // <input type="datetime-local" step="0.001" />
        DATE: 'YYYY-MM-DD', // <input type="date" />
        TIME: 'HH:mm', // <input type="time" />
        TIME_SECONDS: 'HH:mm:ss', // <input type="time" step="1" />
        TIME_MS: 'HH:mm:ss.SSS', // <input type="time" step="0.001" />
        WEEK: 'GGGG-[W]WW', // <input type="week" />
        MONTH: 'YYYY-MM', // <input type="month" />
    };
 
    return hooks;
 
})));
 
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1074)(module)))
 
/***/ }),
/* 4 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var L10N_1 = __webpack_require__(295);
function l() {
    var params = [];
    for (var _i = 0; _i < arguments.length; _i++) {
        params[_i] = arguments[_i];
    }
    return L10N_1.L10N.format.apply(this, arguments);
}
exports.l = l;
;
 
 
/***/ }),
/* 5 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __assign = (this && this.__assign) || Object.assign || function(t) {
    for (var s, i = 1, n = arguments.length; i < n; i++) {
        s = arguments[i];
        for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
            t[p] = s[p];
    }
    return t;
};
Object.defineProperty(exports, "__esModule", { value: true });
var _ = __webpack_require__(1);
var isCoveoFieldRegex = /^@[a-zA-Z0-9_\.]+$/;
var Utils = /** @class */ (function () {
    function Utils() {
    }
    Utils.isUndefined = function (obj) {
        return typeof obj == 'undefined';
    };
    Utils.isNull = function (obj) {
        return obj === null;
    };
    Utils.isNullOrUndefined = function (obj) {
        return Utils.isUndefined(obj) || Utils.isNull(obj);
    };
    Utils.exists = function (obj) {
        return !Utils.isNullOrUndefined(obj);
    };
    Utils.toNotNullString = function (str) {
        return _.isString(str) ? str : '';
    };
    Utils.anyTypeToString = function (value) {
        return value ? value.toString() : '';
    };
    Utils.isNullOrEmptyString = function (str) {
        return Utils.isNullOrUndefined(str) || !Utils.isNonEmptyString(str);
    };
    Utils.isNonEmptyString = function (str) {
        return _.isString(str) && str !== '';
    };
    Utils.isEmptyString = function (str) {
        return !Utils.isNonEmptyString(str);
    };
    Utils.stringStartsWith = function (str, startWith) {
        return str.slice(0, startWith.length) == startWith;
    };
    Utils.stringEndsWith = function (str, endsWith) {
        return str.substring(str.length - endsWith.length, str.length) === endsWith;
    };
    Utils.isNonEmptyArray = function (obj) {
        return _.isArray(obj) && obj.length > 0;
    };
    Utils.isEmptyArray = function (obj) {
        return !Utils.isNonEmptyArray(obj);
    };
    Utils.isHtmlElement = function (obj) {
        Eif (window['HTMLElement'] != undefined) {
            return obj instanceof HTMLElement;
        }
        else {
            // IE 8 FIX
            return obj && obj.nodeType && obj.nodeType == 1;
        }
    };
    Utils.parseIntIfNotUndefined = function (str) {
        Eif (Utils.isNonEmptyString(str)) {
            return parseInt(str, 10);
        }
        else {
            return undefined;
        }
    };
    Utils.parseFloatIfNotUndefined = function (str) {
        var a = 't';
        a instanceof HTMLDocument;
        Eif (Utils.isNonEmptyString(str)) {
            return parseFloat(str);
        }
        else {
            return undefined;
        }
    };
    Utils.round = function (num, decimals) {
        return Math.round(num * Math.pow(10, decimals)) / Math.pow(10, decimals);
    };
    Utils.parseBooleanIfNotUndefined = function (str) {
        if (Utils.isNonEmptyString(str)) {
            switch (str.toLowerCase()) {
                case 'true':
                case '1':
                case 'yes':
                    return true;
                case 'false':
                case '0':
                case 'no':
                    return false;
                default:
                    return undefined;
            }
        }
        else {
            return undefined;
        }
    };
    Utils.trim = function (value) {
        Iif (value == null) {
            return null;
        }
        return value.replace(/^\s+|\s+$/g, '');
    };
    Utils.encodeHTMLEntities = function (rawStr) {
        var ret = [];
        for (var i = rawStr.length - 1; i >= 0; i--) {
            if (/^[a-z0-9]/i.test(rawStr[i])) {
                ret.unshift(rawStr[i]);
            }
            else {
                ret.unshift(['&#', rawStr.charCodeAt(i), ';'].join(''));
            }
        }
        return ret.join('');
    };
    Utils.decodeHTMLEntities = function (rawString) {
        return rawString.replace(/&#(\d+);/g, function (match, dec) {
            return String.fromCharCode(dec);
        });
    };
    Utils.safeEncodeURIComponent = function (rawString) {
        // yiiip...
        // Explanation : https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/encodeURIComponent
        // Solution : https://stackoverflow.com/a/17109094
        // Basically some unicode character (low-high surrogate) will throw an "invalid malformed URI" error when being encoded as an URI component, and the pair of character is incomplete.
        // This simply removes those pesky characters
        if (_.isString(rawString)) {
            return encodeURIComponent(rawString
                .replace(/[\uD800-\uDBFF](?![\uDC00-\uDFFF])/g, '')
                .split('')
                .reverse()
                .join('')
                .replace(/[\uDC00-\uDFFF](?![\uD800-\uDBFF])/g, '')
                .split('')
                .reverse()
                .join(''));
        }
        else {
            // If the passed value is not a string, we probably don't want to do anything here...
            // The base browser function should be resilient enough
            return encodeURIComponent(rawString);
        }
    };
    Utils.arrayEqual = function (array1, array2, sameOrder) {
        if (sameOrder === void 0) { sameOrder = true; }
        if (sameOrder) {
            return _.isEqual(array1, array2);
        }
        else {
            var arrays_1 = [array1, array2];
            return _.all(arrays_1, function (array) {
                return array.length == arrays_1[0].length && _.difference(array, arrays_1[0]).length == 0;
            });
        }
    };
    Utils.objectEqual = function (obj1, obj2) {
        return _.isEqual(obj1, obj2);
    };
    Utils.isCoveoField = function (field) {
        return isCoveoFieldRegex.test(field);
    };
    Utils.escapeRegexCharacter = function (str) {
        var ret = str.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&');
        return ret;
    };
    Utils.getCaseInsensitiveProperty = function (object, name) {
        // First try using a fast case-sensitive lookup
        var value = object[name];
        // Then try a fast case-sensitive lookup with lowercase name
        if (value == null) {
            var lowerCaseName_1 = name.toLowerCase();
            value = object[lowerCaseName_1];
            // Then try a slow scanning of all the properties
            Eif (value == null) {
                var matchingKey = _.find(_.keys(object), function (key) { return key.toLowerCase() == lowerCaseName_1; });
                if (matchingKey != null) {
                    value = object[matchingKey];
                }
            }
        }
        return value;
    };
    /**
     * Get the value of the first field from the array and defined in the result.
     *
     * @param result a QueryResult in which to ge the fieldvalue.
     * @param name One or multiple fieldNames to get the value.
     */
    Utils.getFirstAvailableFieldValue = function (result, fieldNames) {
        for (var i = 0; i < fieldNames.length; i++) {
            var value = Utils.getFieldValue(result, fieldNames[i]);
            if (value !== undefined) {
                return value;
            }
        }
        return undefined;
    };
    Utils.getFieldValue = function (result, name) {
        // Be as forgiving as possible about the field name, since we expect
        // user provided values.
        Iif (name == null) {
            return undefined;
        }
        name = Utils.trim(name);
        if (name[0] == '@') {
            name = name.substr(1);
        }
        Iif (name == '') {
            return undefined;
        }
        // At this point the name should be well formed
        Iif (!Utils.isCoveoField('@' + name)) {
            throw "Not a valid field : " + name;
        }
        // Handle namespace field values of the form sf.Foo.Bar
        var parts = name.split('.').reverse();
        var obj = result.raw;
        while (parts.length > 1) {
            obj = Utils.getCaseInsensitiveProperty(obj, parts.pop());
            if (Utils.isUndefined(obj)) {
                return undefined;
            }
        }
        var value = Utils.getCaseInsensitiveProperty(obj, parts[0]);
        // If still nothing, look at the root of the result
        if (value == null) {
            value = Utils.getCaseInsensitiveProperty(result, name);
        }
        return value;
    };
    Utils.throttle = function (func, wait, options, context, args) {
        if (options === void 0) { options = {}; }
        var result;
        var timeout = null;
        var previous = 0;
        var later = function () {
            previous = options.leading === false ? 0 : new Date().getTime();
            timeout = null;
            result = func.apply(context, args);
        };
        return function () {
            var now = new Date().getTime();
            if (!previous && options.leading === false) {
                previous = now;
            }
            var remaining = wait - (now - previous);
            context = this;
            args = arguments;
            if (remaining <= 0) {
                clearTimeout(timeout);
                timeout = null;
                previous = now;
                result = func.apply(context, args);
            }
            else if (!timeout && options.trailing !== false) {
                timeout = window.setTimeout(later, remaining);
            }
            return result;
        };
    };
    Utils.extendDeep = function (target, src) {
        if (!target) {
            target = {};
        }
        var isArray = _.isArray(src);
        var toReturn = (isArray && []) || {};
        if (isArray) {
            target = target || [];
            toReturn = toReturn['concat'](target);
            _.each(src, function (e, i, obj) {
                if (typeof target[i] === 'undefined') {
                    toReturn[i] = e;
                }
                else Iif (typeof e === 'object' && !_.isElement(e)) {
                    toReturn[i] = Utils.extendDeep(target[i], e);
                }
                else {
                    Eif (target.indexOf(e) === -1) {
                        toReturn['push'](e);
                    }
                }
            });
        }
        else {
            Eif (target && typeof target === 'object' && !_.isElement(target)) {
                _.each(_.keys(target), function (key) {
                    toReturn[key] = target[key];
                });
            }
            _.each(_.keys(src), function (key) {
                if (typeof src[key] !== 'object' || !src[key]) {
                    toReturn[key] = src[key];
                }
                else {
                    if (!target[key]) {
                        toReturn[key] = src[key];
                    }
                    else {
                        toReturn[key] = Utils.extendDeep(target[key], src[key]);
                    }
                }
            });
        }
        return toReturn;
    };
    Utils.getQueryStringValue = function (key, queryString) {
        if (queryString === void 0) { queryString = window.location.search; }
        return queryString.replace(new RegExp('^(?:.*[&\\?]' + key.replace(/[\.\+\*]/g, '\\$&') + '(?:\\=([^&]*))?)?.*$', 'i'), '$1');
    };
    Utils.isValidUrl = function (str) {
        var regexp = /(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;
        return regexp.test(str);
    };
    Utils.debounce = function (func, wait) {
        var timeout;
        var stackTraceTimeout;
        return function () {
            var _this = this;
            var args = [];
            for (var _i = 0; _i < arguments.length; _i++) {
                args[_i] = arguments[_i];
            }
            if (timeout == null) {
                timeout = window.setTimeout(function () {
                    timeout = null;
                }, wait);
                stackTraceTimeout = setTimeout(function () {
                    func.apply(_this, args);
                    stackTraceTimeout = null;
                });
            }
            else if (stackTraceTimeout == null) {
                clearTimeout(timeout);
                timeout = window.setTimeout(function () {
                    func.apply(_this, args);
                    timeout = null;
                }, wait);
            }
        };
    };
    Utils.readCookie = function (name) {
        var nameEQ = name + '=';
        var ca = document.cookie.split(';');
        for (var i = 0; i < ca.length; i++) {
            var c = ca[i];
            while (c.charAt(0) == ' ') {
                c = c.substring(1, c.length);
            }
            if (c.indexOf(nameEQ) == 0) {
                return c.substring(nameEQ.length, c.length);
            }
        }
        return null;
    };
    Utils.toDashCase = function (camelCased) {
        return camelCased.replace(/([a-z][A-Z])/g, function (g) { return g[0] + '-' + g[1].toLowerCase(); });
    };
    Utils.toCamelCase = function (dashCased) {
        return dashCased.replace(/-([a-z])/g, function (g) { return g[1].toUpperCase(); });
    };
    // Based on http://stackoverflow.com/a/8412989
    Utils.parseXml = function (xml) {
        Eif (typeof DOMParser != 'undefined') {
            return new DOMParser().parseFromString(xml, 'text/xml');
        }
        else if (typeof ActiveXObject != 'undefined' && new ActiveXObject('Microsoft.XMLDOM')) {
            var xmlDoc = new ActiveXObject('Microsoft.XMLDOM');
            xmlDoc.async = 'false';
            xmlDoc.loadXML(xml);
            return xmlDoc;
        }
        else {
            throw new Error('No XML parser found');
        }
    };
    Utils.copyObject = function (target, src) {
        var _this = this;
        _.each(_.keys(src), function (key) {
            if (typeof src[key] !== 'object' || !src[key]) {
                target[key] = src[key];
            }
            else Iif (!target[key]) {
                target[key] = src[key];
            }
            else {
                _this.copyObject(target[key], src[key]);
            }
        });
    };
    Utils.copyObjectAttributes = function (target, src, attributes) {
        var _this = this;
        _.each(_.keys(src), function (key) {
            if (_.contains(attributes, key)) {
                Iif (typeof src[key] !== 'object' || !src[key]) {
                    target[key] = src[key];
                }
                else Iif (!target[key]) {
                    target[key] = src[key];
                }
                else {
                    _this.copyObject(target[key], src[key]);
                }
            }
        });
    };
    Utils.concatWithoutDuplicate = function (firstArray, secondArray) {
        var diff = _.difference(secondArray, firstArray);
        if (diff && diff.length > 0) {
            firstArray = firstArray.concat(diff);
        }
        return firstArray;
    };
    Utils.differenceBetweenObjects = function (firstObject, secondObject) {
        var difference = {};
        var addDiff = function (first, second) {
            for (var key in first) {
                Eif (first[key] !== second[key] && difference[key] == null) {
                    difference[key] = first[key];
                }
            }
        };
        addDiff(firstObject, secondObject);
        addDiff(secondObject, firstObject);
        return difference;
    };
    Utils.resolveAfter = function (ms, returns) {
        return new Promise(function (resolve) { return setTimeout(function () { return (returns !== undefined ? resolve(returns) : resolve()); }, ms); });
    };
    Utils.reorderValuesByKeys = function (values, order, getKey) {
        var valuesMap = values.reduce(function (map, value) {
            return (__assign({}, map, (_a = {}, _a[getKey(value)] = value, _a)));
            var _a;
        }, {});
        var orderedValues = [];
        order.forEach(function (keyToAppend) {
            if (valuesMap[keyToAppend]) {
                orderedValues.push(valuesMap[keyToAppend]);
            }
        });
        return orderedValues.concat(_.without.apply(_, [values].concat(orderedValues)));
    };
    return Utils;
}());
exports.Utils = Utils;
 
 
/***/ }),
/* 6 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
var Assert_1 = __webpack_require__(12);
var Utils_1 = __webpack_require__(5);
var JQueryutils_1 = __webpack_require__(212);
var Dom_1 = __webpack_require__(0);
var QueryStateModel_1 = __webpack_require__(17);
var ComponentStateModel_1 = __webpack_require__(134);
var ComponentOptionsModel_1 = __webpack_require__(55);
var QueryController_1 = __webpack_require__(78);
var SearchInterface_1 = __webpack_require__(25);
var NoopAnalyticsClient_1 = __webpack_require__(114);
var BaseComponent_1 = __webpack_require__(113);
var DebugEvents_1 = __webpack_require__(296);
var _ = __webpack_require__(1);
var GlobalExports_1 = __webpack_require__(10);
/**
 * The `ComponentEvents` class is used by the various Coveo Component to trigger events and bind event handlers. It adds
 * logic to execute handlers or triggers only when a component is "enabled", which serves as a way to avoid executing
 * handlers on components that are invisible and inactive in the query.
 *
 * Typically, a component is disabled when it is not active in the current [`Tab`]{@link Tab}. It can also be disabled
 * by external code, however.
 *
 * To manually enable or disable a component, simply use its [`enable`]{@link Component.enable} or
 * [`disable`]{@link Component.disable} method.
 */
var ComponentEvents = /** @class */ (function () {
    /**
     * Creates a new `ComponentEvents` instance for a [`Component`]{@link Component}.
     * @param owner The [`Component`]{@link Component} that owns the event handlers and triggers.
     */
    function ComponentEvents(owner) {
        this.owner = owner;
        Assert_1.Assert.exists(owner);
    }
    ComponentEvents.doExport = function () {
        GlobalExports_1.exportGlobally({
            ComponentEvents: ComponentEvents
        });
    };
    ComponentEvents.prototype.on = function (arg, event, handler) {
        Iif (this.shouldTreatElementAsJQuery(arg)) {
            arg.on(event, this.wrapToCallIfEnabled(handler));
        }
        else {
            Dom_1.$$(arg).on(event, this.wrapToCallIfEnabled(handler));
        }
    };
    ComponentEvents.prototype.one = function (arg, event, handler) {
        Iif (this.shouldTreatElementAsJQuery(arg)) {
            arg.one(event, this.wrapToCallIfEnabled(handler));
        }
        else {
            Dom_1.$$(arg).one(event, this.wrapToCallIfEnabled(handler));
        }
    };
    /**
     * Bind on the "root" of the Component. The root is typically the {@link SearchInterface}.<br/>
     * Bind an event using native javascript code.
     * @param event The event for which to register an handler.
     * @param handler The function to execute when the event is triggered.
     */
    ComponentEvents.prototype.onRootElement = function (event, handler) {
        this.on(this.owner.root, event, handler);
    };
    /**
     * Bind on the "root" of the Component. The root is typically the {@link SearchInterface}.<br/>
     * Bind an event using native javascript code.
     * The handler will execute only ONE time.
     * @param event The event for which to register an handler.
     * @param handler The function to execute when the event is triggered.
     */
    ComponentEvents.prototype.oneRootElement = function (event, handler) {
        this.one(this.owner.root, event, handler);
    };
    /**
     * Bind an event related specially to the query state model.<br/>
     * This will build the correct string event and execute the handler only if the component is activated.
     * @param eventType The event type for which to register an event.
     * @param attribute The attribute for which to register an event.
     * @param handler The handler to execute when the query state event is triggered.
     */
    ComponentEvents.prototype.onQueryState = function (eventType, attribute, handler) {
        this.onRootElement(this.getQueryStateEventName(eventType, attribute), handler);
    };
    /**
     * Bind an event related specially to the component option model.
     * This will build the correct string event and execute the handler only if the component is activated.
     * @param eventType The event type for which to register an event.
     * @param attribute The attribute for which to register an event.
     * @param handler The handler to execute when the query state event is triggered.
     */
    ComponentEvents.prototype.onComponentOptions = function (eventType, attribute, handler) {
        this.onRootElement(this.getComponentOptionEventName(eventType, attribute), handler);
    };
    /**
     * Bind an event related specially to the query state model.<br/>
     * This will build the correct string event and execute the handler only if the component is activated.<br/>
     * Will execute only once.
     * @param eventType The event type for which to register an event.
     * @param attribute The attribute for which to register an event.
     * @param handler The handler to execute when the query state event is triggered.
     */
    ComponentEvents.prototype.oneQueryState = function (eventType, attribute, handler) {
        this.oneRootElement(this.getQueryStateEventName(eventType, attribute), handler);
    };
    ComponentEvents.prototype.trigger = function (arg, event, args) {
        var _this = this;
        this.wrapToCallIfEnabled(function () {
            Iif (_this.shouldTreatElementAsJQuery(arg)) {
                arg.trigger(event, args);
            }
            else {
                Dom_1.$$(arg).trigger(event, args);
            }
        })(args);
    };
    /**
     * Execute the function only if the component is enabled.
     * @param func The function to execute if the component is enabled.
     * @returns {function(...[any]): *}
     */
    ComponentEvents.prototype.wrapToCallIfEnabled = function (func) {
        var _this = this;
        return function () {
            var args = [];
            for (var _i = 0; _i < arguments.length; _i++) {
                args[_i] = arguments[_i];
            }
            if (!_this.owner.disabled) {
                if (args && args[0] instanceof CustomEvent) {
                    if (args[0].detail) {
                        args = [args[0].detail];
                    }
                }
                else if (args && _this.shouldTreatEventAsJQuery(args[0])) {
                    if (args[1] != undefined) {
                        args = [args[1]];
                    }
                    else if (args[0].hasOwnProperty('originalEvent')) {
                        // If the event is a jQuery Event but no args are found, let's use the ones of the originalEvent, if any.
                        args = [args[0].originalEvent];
                    }
                    else {
                        args = [];
                    }
                }
                return func.apply(_this.owner, args);
            }
        };
    };
    ComponentEvents.prototype.shouldTreatElementAsJQuery = function (arg) {
        if (Dom_1.Dom.useNativeJavaScriptEvents === true) {
            return false;
        }
        Iif (JQueryutils_1.JQueryUtils.getJQuery() && JQueryutils_1.JQueryUtils.isInstanceOfJQuery(arg)) {
            return true;
        }
        return false;
    };
    ComponentEvents.prototype.shouldTreatEventAsJQuery = function (arg) {
        if (Dom_1.Dom.useNativeJavaScriptEvents === true) {
            return false;
        }
        return JQueryutils_1.JQueryUtils.getJQuery() && JQueryutils_1.JQueryUtils.isInstanceOfJqueryEvent(arg);
    };
    ComponentEvents.prototype.getQueryStateEventName = function (eventType, attribute) {
        return this.getModelEvent(this.owner.queryStateModel, eventType, attribute);
    };
    ComponentEvents.prototype.getComponentOptionEventName = function (eventType, attribute) {
        return this.getModelEvent(this.owner.componentOptionsModel, eventType, attribute);
    };
    ComponentEvents.prototype.getModelEvent = function (model, eventType, attribute) {
        var evtName;
        if (eventType && attribute) {
            evtName = model.getEventName(eventType + attribute);
        }
        else {
            evtName = model.getEventName(eventType);
        }
        return evtName;
    };
    return ComponentEvents;
}());
exports.ComponentEvents = ComponentEvents;
/**
 * The base class for every component in the framework.
 */
var Component = /** @class */ (function (_super) {
    __extends(Component, _super);
    /**
     * Create a new Component. Resolve all {@link IComponentBindings} if not provided.<br/>
     * Create a new Logger for this component.
     * Attach the component to the {@link SearchInterface}.<br/>
     * @param element The HTMLElement on which to create the component. Used to bind data on the element.
     * @param type The unique identifier for this component. See: {@link IComponentDefinition.ID}. Used to generate the unique Coveo CSS class associated with every component.
     * @param bindings The environment for every component. Optional, but omitting to provide one will impact performance.
     */
    function Component(element, type, bindings) {
        if (bindings === void 0) { bindings = {}; }
        var _this = _super.call(this, element, type) || this;
        _this.element = element;
        _this.type = type;
        _this.bind = new Component.ComponentEventClass(_this);
        _this.root = bindings.root || Component.resolveRoot(element);
        _this.queryStateModel = bindings.queryStateModel || _this.resolveQueryStateModel();
        _this.componentStateModel = bindings.componentStateModel || _this.resolveComponentStateModel();
        _this.queryController = bindings.queryController || _this.resolveQueryController();
        _this.searchInterface = bindings.searchInterface || _this.resolveSearchInterface();
        _this.componentOptionsModel = bindings.componentOptionsModel || _this.resolveComponentOptionsModel();
        _this.ensureDom = _.once(function () { return _this.createDom(); });
        if (_this.searchInterface != null) {
            _this.searchInterface.attachComponent(type, _this);
        }
        _this.initDebugInfo();
        return _this;
    }
    /**
     * Return the bindings, or environment, for the current component.
     * @returns {IComponentBindings}
     */
    Component.prototype.getBindings = function () {
        return {
            root: this.root,
            queryStateModel: this.queryStateModel,
            queryController: this.queryController,
            searchInterface: this.searchInterface,
            componentStateModel: this.componentStateModel,
            componentOptionsModel: this.componentOptionsModel,
            usageAnalytics: this.usageAnalytics
        };
    };
    Object.defineProperty(Component.prototype, "usageAnalytics", {
        /**
         * A reference to the {@link Analytics.client}.
         */
        get: function () {
            return this.resolveUA();
        },
        enumerable: true,
        configurable: true
    });
    Component.prototype.createDom = function () {
        // By default we do nothing
    };
    Component.prototype.resolveSearchInterface = function () {
        return Component.resolveBinding(this.element, SearchInterface_1.SearchInterface);
    };
    Component.prototype.resolveQueryController = function () {
        return Component.resolveBinding(this.element, QueryController_1.QueryController);
    };
    Component.prototype.resolveComponentStateModel = function () {
        return Component.resolveBinding(this.element, ComponentStateModel_1.ComponentStateModel);
    };
    Component.prototype.resolveQueryStateModel = function () {
        return Component.resolveBinding(this.element, QueryStateModel_1.QueryStateModel);
    };
    Component.prototype.resolveComponentOptionsModel = function () {
        return Component.resolveBinding(this.element, ComponentOptionsModel_1.ComponentOptionsModel);
    };
    Component.prototype.resolveUA = function () {
        return this.searchInterface && this.searchInterface.usageAnalytics ? this.searchInterface.usageAnalytics : new NoopAnalyticsClient_1.NoopAnalyticsClient();
    };
    Component.prototype.resolveResult = function () {
        return Component.getResult(this.element);
    };
    Component.prototype.removeTabSupport = function () {
        if (this.element.hasAttribute('data-tab')) {
            this.logger.warn('The "data-tab" attribute is not supported for this component and was removed.');
            this.element.removeAttribute('data-tab');
        }
        if (this.element.hasAttribute('data-tab-not')) {
            this.logger.warn('The "data-tab-not" attribute is not supported for this component and was removed.');
            this.element.removeAttribute('data-tab-not');
        }
    };
    Component.prototype.initDebugInfo = function () {
        var _this = this;
        Dom_1.$$(this.element).on('dblclick', function (e) {
            if (e.altKey) {
                var debugInfo = _this.debugInfo();
                if (debugInfo != null) {
                    Dom_1.$$(_this.root).trigger(DebugEvents_1.DebugEvents.showDebugPanel, _this.debugInfo());
                }
            }
        });
    };
    /**
     * Get the bound component to the given HTMLElement. Throws an assert if the HTMLElement has no component bound, unless using the noThrow argument.<br/>
     * If there is multiple component bound to the current HTMLElement, you must specify the component class.
     * @param element HTMLElement for which to get the bound component.
     * @param componentClass Optional component class. If the HTMLElement has multiple components bound, you must specify which one you are targeting.
     * @param noThrow Boolean option to tell the method to not throw on error.
     * @returns {Component}
     */
    Component.get = function (element, componentClass, noThrow) {
        Assert_1.Assert.exists(element);
        if (_.isString(componentClass)) {
            return element[Component.computeCssClassNameForType(componentClass)];
        }
        else if (Utils_1.Utils.exists(componentClass)) {
            Assert_1.Assert.exists(componentClass.ID);
            return element[Component.computeCssClassNameForType(componentClass.ID)];
        }
        else {
            // No class specified, but we support returning the bound component
            // if there is exactly one.
            var boundComponents = BaseComponent_1.BaseComponent.getBoundComponentsForElement(element);
            if (!noThrow) {
                Assert_1.Assert.check(boundComponents.length <= 1, 'More than one component is bound to this element. You need to specify the component type.');
            }
            return boundComponents[0];
        }
    };
    Component.getResult = function (element, noThrow) {
        Eif (noThrow === void 0) { noThrow = false; }
        var resultElement = Dom_1.$$(element).closest('.CoveoResult');
        Assert_1.Assert.check(noThrow || resultElement != undefined);
        return resultElement['CoveoResult'];
    };
    Component.bindResultToElement = function (element, result) {
        Assert_1.Assert.exists(element);
        Assert_1.Assert.exists(result);
        Dom_1.$$(element).addClass('CoveoResult');
        element['CoveoResult'] = result;
        var jQuery = JQueryutils_1.JQueryUtils.getJQuery();
        if (jQuery) {
            jQuery(element).data(result);
        }
    };
    Component.bindFoldedResultToElement = function (element) {
        Assert_1.Assert.exists(element);
        Dom_1.$$(element).addClass('coveo-result-folding-child-result');
    };
    Component.resolveRoot = function (element) {
        Assert_1.Assert.exists(element);
        var resolvedSearchInterface = Component.resolveBinding(element, SearchInterface_1.SearchInterface);
        if (resolvedSearchInterface) {
            return resolvedSearchInterface.element;
        }
        var resolvedRootFromParent = Component.findRootInParents(element);
        if (resolvedRootFromParent) {
            return resolvedRootFromParent;
        }
        return document.body;
    };
    Component.resolveBinding = function (element, componentClass) {
        Assert_1.Assert.exists(element);
        Assert_1.Assert.exists(componentClass);
        Assert_1.Assert.exists(componentClass.ID);
        var targetClassName = Component.computeCssClassNameForType(componentClass.ID);
        var found;
        if (Dom_1.$$(element).is('.' + targetClassName)) {
            found = element;
        }
        else {
            // first, look down
            var findDown = Dom_1.$$(element).findClass(targetClassName);
            if (findDown && findDown.length !== 0) {
                found = findDown[0];
            }
            else {
                var findUp = Dom_1.$$(element).closest(targetClassName);
                if (findUp) {
                    found = findUp;
                }
            }
        }
        if (found) {
            return found[targetClassName];
        }
        else {
            return undefined;
        }
    };
    Component.pointElementsToDummyForm = function (element) {
        var inputs = Dom_1.$$(element).is('input') ? [element] : [];
        inputs = inputs.concat(Dom_1.$$(element).findAll('input'));
        _.each(_.compact(inputs), function (input) {
            input.setAttribute('form', 'coveo-dummy-form');
        });
    };
    Component.findRootInParents = function (element) {
        var boundComponents = Component.getBoundComponentsForElement(element);
        for (var i = 0; i < boundComponents.length; i++) {
            var component = boundComponents[i];
            Eif (component instanceof Component) {
                return component.root;
            }
        }
        if (!element.parentElement) {
            return null;
        }
        return Component.findRootInParents(element.parentElement);
    };
    Component.ComponentEventClass = ComponentEvents;
    return Component;
}(BaseComponent_1.BaseComponent));
exports.Component = Component;
 
 
/***/ }),
/* 7 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var AnalyticsSmartSnippetFeedbackReason;
(function (AnalyticsSmartSnippetFeedbackReason) {
    AnalyticsSmartSnippetFeedbackReason["DoesNotAnswer"] = "does_not_answer";
    AnalyticsSmartSnippetFeedbackReason["PartiallyAnswers"] = "partially_answers";
    AnalyticsSmartSnippetFeedbackReason["WasNotAQuestion"] = "was_not_a_question";
    AnalyticsSmartSnippetFeedbackReason["Other"] = "other";
})(AnalyticsSmartSnippetFeedbackReason = exports.AnalyticsSmartSnippetFeedbackReason || (exports.AnalyticsSmartSnippetFeedbackReason = {}));
exports.analyticsActionCauseList = {
    /**
     * Identifies the search event that gets logged when the initial query is performed as a result of loading a search interface.
     *
     * `actionCause`: `'interfaceLoad'`
     * `actionType`: `'interface'`
     */
    interfaceLoad: {
        name: 'interfaceLoad',
        type: 'interface'
    },
    /**
     * Identifies the search event that gets logged when a new tab is selected in the search interface.
     *
     * `actionCause`: `'interfaceChange'`
     * `actionType`: `'interface'`
     *
     * Logging an event with this actionType also adds the following key-value pairs in the custom data property of the Usage Analytics HTTP service request.
     * `"interfaceChangeTo"`: <newTabId>
     */
    interfaceChange: {
        name: 'interfaceChange',
        type: 'interface'
    },
    /**
     * Identifies the search event that gets logged when any `hd` or `hq` gets cleared from {@link QueryStateModel}, and then triggers a new query.
     *
     * `actionCause`: `'contextRemove'`
     * `actionType`: `'misc'`
     *
     * Logging an event with this actionType also adds the following key-value pairs in the custom data property of the Usage Analytics HTTP service request.
     * `"contextName"`: <contextName>
     */
    contextRemove: {
        name: 'contextRemove',
        type: 'misc'
    },
    /**
     * Identifies the search event that gets logged when `enableAutoCorrection: true` and the query is automatically corrected.
     *
     * `actionCause`: `'didyoumeanAutomatic'`
     * `actionType`: `'misc'`
     */
    didyoumeanAutomatic: {
        name: 'didyoumeanAutomatic',
        type: 'misc'
    },
    /**
     * Identifies the search event that gets logged when the query suggestion with the corrected term is selected and successfully updates the query.
     *
     * `actionCause`: `'didyoumeanClick'`
     * `actionType`: `'misc'`
     */
    didyoumeanClick: {
        name: 'didyoumeanClick',
        type: 'misc'
    },
    /**
     * Identifies the search event that gets logged when a sorting method is selected.
     *
     * `actionCause`: `'resultsSort'`
     * `actionType`: `'misc'`
     *
     * Logging an event with this actionType also adds the following key-value pairs in the custom data property of the Usage Analytics HTTP service request.
     * `"resultsSortBy"`: <sortingCategory>
     */
    resultsSort: {
        name: 'resultsSort',
        type: 'misc'
    },
    /**
     * Identifies the search event that gets logged when a submit button is selected on a search box.
     *
     * `actionCause`: `'searchboxSubmit'`
     * `actionType`: `'search box'`
     */
    searchboxSubmit: {
        name: 'searchboxSubmit',
        type: 'search box'
    },
    /**
     * Identifies the search event that gets logged when a clear button is selected on a search box.
     *
     * `actionCause`: `'searchboxClear'`
     * `actionType`: `'search box'`
     */
    searchboxClear: {
        name: 'searchboxClear',
        type: 'search box'
    },
    /**
     * The search-as-you-type event that gets logged when a query is automatically generated, and results are displayed while a user is entering text in the search box before they voluntarily submit the query.
     *
     * `actionCause`: `'searchboxAsYouType'`
     * `actionType`: `'search box'`
     */
    searchboxAsYouType: {
        name: 'searchboxAsYouType',
        type: 'search box'
    },
    /**
     * The search-as-you-type event that gets logged when a breadcrumb facet is selected and the query is updated.
     *
     * `actionCause`: `'breadcrumbFacet'`
     * `actionType`: `'breadcrumb'`
     *
     * Logging an event with this actionType also adds the following key-value pairs in the custom data property of the Usage Analytics HTTP service request.
     * `"facetId":`: <correspondingFacetId>
     */
    breadcrumbFacet: {
        name: 'breadcrumbFacet',
        type: 'breadcrumb'
    },
    /**
     * Identifies the search event that gets logged when a user clears all values from the advanced search filter summary.
     *
     * `actionCause`: `'breadcrumbAdvancedSearch'`
     * `actionType`: `'breadcrumb'`
     */
    breadcrumbAdvancedSearch: {
        name: 'breadcrumbAdvancedSearch',
        type: 'breadcrumb'
    },
    /**
     * Identifies the search event that gets logged when the event to clear the current breadcrumbs is triggered.
     *
     * `actionCause`: `'breadcrumbResetAll'`
     * `actionType`: `'breadcrumb'`
     */
    breadcrumbResetAll: {
        name: 'breadcrumbResetAll',
        type: 'breadcrumb'
    },
    /**
     * Identifies the search event that gets logged when a user clicks a tag value from an item tag field to add a filter.
     *
     * `actionCause`: `'documentTag'`
     * `actionType`: `'document'`
     *
     * The required properties of an [`IAnalyticsFacetMeta`](@link IAnalyticsFacetMeta) object are added as custom data
     * when logging a usage analytics event matching this `actionCause`/`actionType`.
     */
    documentTag: {
        name: 'documentTag',
        type: 'document'
    },
    /**
     * Identifies the search event that gets logged when a user clicks a field value from an item field to add a filter.
     *
     * `actionCause`: `'documentField'`
     * `actionType`: `'document'`
     *
     * The required properties of an [`IAnalyticsFacetMeta`](@link IAnalyticsFacetMeta) object are added as custom data
     * when logging a usage analytics event matching this `actionCause`/`actionType`.
     */
    documentField: {
        name: 'documentField',
        type: 'document'
    },
    /**
     * Identifies the click event that gets logged when the Quick View element is selected and a Quick View modal of the document is displayed.
     *
     * `actionCause`: `'documentQuickview'`
     * `actionType`: `'document'`
     *
     * Logging an event with this actionType also adds the following key-value pairs in the custom data property of the Usage Analytics HTTP service request.
     * `"documentTitle":`: <correspondingDocumentTitle>
     * `"documentURL":`: <correspondingDocumentURL>
     */
    documentQuickview: {
        name: 'documentQuickview',
        type: 'document'
    },
    /**
     * Identifies the click event that gets logged when a user clicks on a search result to open an item.
     *
     * `actionCause`: `'documentOpen'`
     * `actionType`: `'document'`
     *
     * Logging an event with this actionType also adds the following key-value pairs in the custom data property of the Usage Analytics HTTP service request.
     * `"documentTitle":`: <correspondingDocumentTitle>
     * `"documentURL":`: <correspondingDocumentURL>
     */
    documentOpen: {
        name: 'documentOpen',
        type: 'document'
    },
    /**
     * Identifies the search event that gets logged when a user selects or deselects a facet filter from the Omnibox.
     *
     * `actionCause`: `'omniboxFacetSelect'`
     * `actionType`: `'omnibox'`
     *
     * The required properties of an [`IAnalyticsOmniboxFacetMeta`](@link IAnalyticsOmniboxFacetMeta) object are added as custom data
     * when logging a usage analytics event matching this `actionCause`/`actionType`.
     */
    omniboxFacetSelect: {
        name: 'omniboxFacetSelect',
        type: 'omnibox'
    },
    /**
     * Identifies the search event that gets logged when a user clicks a facet value to filter out results containing this value from the Omnibox.
     *
     * `actionCause`: `'omniboxFacetExclude'`
     * `actionType`: `'omnibox'`
     *
     * The required properties of an [`IAnalyticsOmniboxFacetMeta`](@link IAnalyticsOmniboxFacetMeta) object are added as custom data
     * when logging a usage analytics event matching this `actionCause`/`actionType`.
     */
    omniboxFacetExclude: {
        name: 'omniboxFacetExclude',
        type: 'omnibox'
    },
    /**
     * Identifies the search event that gets logged when a user selects or deselects a facet filter from the Omnibox.
     *
     * `actionCause`: `'omniboxFacetDeselect'`
     * `actionType`: `'omnibox'`
     *
     * The required properties of an [`IAnalyticsOmniboxFacetMeta`](@link IAnalyticsOmniboxFacetMeta) object are added as custom data
     * when logging a usage analytics event matching this `actionCause`/`actionType`.
     */
    omniboxFacetDeselect: {
        name: 'omniboxFacetDeselect',
        type: 'omnibox'
    },
    /**
     * Identifies the search event that gets logged when a user clicks a facet value to not filter out results containing this value from the Omnibox.
     *
     * `actionCause`: `'omniboxFacetUnexclude'`
     * `actionType`: `'omnibox'`
     *
     * The required properties of an [`IAnalyticsOmniboxFacetMeta`](@link IAnalyticsOmniboxFacetMeta) object are added as custom data
     * when logging a usage analytics event matching this `actionCause`/`actionType`.
     */
    omniboxFacetUnexclude: {
        name: 'omniboxFacetUnexclude',
        type: 'omnibox'
    },
    /**
     * Identifies the search event that gets logged when a user clicks a query suggestion based on the usage analytics recorded queries.
     *
     * `actionCause`: `'omniboxAnalytics'`
     * `actionType`: `'omnibox'`
     *
     * The required properties of an [`IAnalyticsOmniboxSuggestionMeta`](@link IAnalyticsOmniboxSuggestionMeta) object are added as custom data
     * when logging a usage analytics event matching this `actionCause`/`actionType`.
     */
    omniboxAnalytics: {
        name: 'omniboxAnalytics',
        type: 'omnibox'
    },
    /**
     * Identifies the search event that gets logged when a suggested search query is selected from a standalone searchbox.
     *
     * `actionCause`: `'omniboxFromLink'`
     * `actionType`: `'omnibox'`
     *
     * The required properties of an [`IAnalyticsOmniboxSuggestionMeta`](@link IAnalyticsOmniboxSuggestionMeta) object are added as custom data
     * when logging a usage analytics event matching this `actionCause`/`actionType`.
     */
    omniboxFromLink: {
        name: 'omniboxFromLink',
        type: 'omnibox'
    },
    /**
     * Identifies the search event that gets logged when a user selects a query suggestion from a list built from values of a field.
     *
     * `actionCause`: `'omniboxField'`
     * `actionType`: `'omnibox'`
     */
    omniboxField: {
        name: 'omniboxField',
        type: 'omnibox'
    },
    /**
     * Identifies the search event that gets logged when the Clear Facet **X** button is selected.
     *
     * `actionCause`: `'facetClearAll'`
     * `actionType`: `'facet'`
     *
     * The required properties of an [`IAnalyticsFacetMeta`](@link IAnalyticsFacetMeta) object are added as custom data
     * when logging a usage analytics event matching this `actionCause`/`actionType`.
     */
    facetClearAll: {
        name: 'facetClearAll',
        type: 'facet'
    },
    /**
     * Identifies the custom event that gets logged when a query is being typed into the facet search box.
     *
     * `actionCause`: `'facetSearch'`
     * `actionType`: `'facet'`
     *
     * The required properties of an [`IAnalyticsFacetMeta`](@link IAnalyticsFacetMeta) object are added as custom data
     * when logging a usage analytics event matching this `actionCause`/`actionType`.
     */
    facetSearch: {
        name: 'facetSearch',
        type: 'facet'
    },
    /**
     * Identifies the search event that gets logged when the user toggles the facet operator.
     *
     * `actionCause`: `'facetToggle'`
     * `actionType`: `'facet'`
     *
     * The required properties of an [`IAnalyticsFacetOperatorMeta`](@link IAnalyticsFacetOperatorMeta) object are added as custom data
     * when logging a usage analytics event matching this `actionCause`/`actionType`.
     */
    facetToggle: {
        name: 'facetToggle',
        type: 'facet'
    },
    /**
     * Identifies the search event that gets logged when a facet slider changes range values.
     *
     * `actionCause`: `'facetRangeSlider'`
     * `actionType`: `'facet'`
     *
     * The required properties of an [`IAnalyticsFacetSliderChangeMeta`](@link IAnalyticsFacetSliderChangeMeta) object are added as custom data
     * when logging a usage analytics event matching this `actionCause`/`actionType`.
     */
    facetRangeSlider: {
        name: 'facetRangeSlider',
        type: 'facet'
    },
    /**
     * Identifies the search event that gets logged when a facet graph changes range values.
     *
     * `actionCause`: `'facetRangeGraph'`
     * `actionType`: `'facet'`
     *
     * The required properties of an [`IAnalyticsFacetSliderChangeMeta`](@link IAnalyticsFacetSliderChangeMeta) object are added as custom data
     * when logging a usage analytics event matching this `actionCause`/`actionType`.
     */
    facetRangeGraph: {
        name: 'facetRangeGraph',
        type: 'facet'
    },
    /**
     * Identifies the search event that gets logged when a facet check box is selected and the query is updated.
     *
     * `actionCause`: `'facetSelect'`
     * `actionType`: `'facet'`
     *
     * The required properties of an [`IAnalyticsFacetMeta`](@link IAnalyticsFacetMeta) object are added as custom data
     * when logging a usage analytics event matching this `actionCause`/`actionType`.
     */
    facetSelect: {
        name: 'facetSelect',
        type: 'facet'
    },
    /**
     * Identifies the search event that gets logged when all filters on a facet are selected.
     *
     * `actionCause`: `'facetSelectAll'`
     * `actionType`: `'facet'`
     *
     * The required properties of an [`IAnalyticsFacetMeta`](@link IAnalyticsFacetMeta) object are added as custom data
     * when logging a usage analytics event matching this `actionCause`/`actionType`.
     */
    facetSelectAll: {
        name: 'facetSelectAll',
        type: 'facet'
    },
    /**
     * Identifies the search event that gets logged when a facet check box is deselected and the query is updated.
     *
     * `actionCause`: `'facetDeselect'`
     * `actionType`: `'facet'`
     *
     * The required properties of an [`IAnalyticsFacetMeta`](@link IAnalyticsFacetMeta) object are added as custom data
     * when logging a usage analytics event matching this `actionCause`/`actionType`.
     */
    facetDeselect: {
        name: 'facetDeselect',
        type: 'facet'
    },
    /**
     * Identifies the search event that gets logged when a user clicks a facet value to filter out results containing the facet value.
     *
     * `actionCause`: `'facetExclude'`
     * `actionType`: `'facet'`
     *
     * The required properties of an [`IAnalyticsFacetMeta`](@link IAnalyticsFacetMeta) object are added as custom data
     * when logging a usage analytics event matching this `actionCause`/`actionType`.
     */
    facetExclude: {
        name: 'facetExclude',
        type: 'facet'
    },
    /**
     * Identifies the search event that gets logged when a user clicks a facet value to not filter out results containing the facet value.
     *
     * `actionCause`: `'facetUnexclude'`
     * `actionType`: `'facet'`
     *
     * The required properties of an [`IAnalyticsFacetMeta`](@link IAnalyticsFacetMeta) object are added as custom data
     * when logging a usage analytics event matching this `actionCause`/`actionType`.
     */
    facetUnexclude: {
        name: 'facetUnexclude',
        type: 'facet'
    },
    facetUpdateSort: {
        name: 'facetUpdateSort',
        type: 'facet'
    },
    /**
     * The custom event that gets logged when an end-user expands a facet to see additional values.
     *
     * `actionCause`: `'showMoreFacetResults'`
     * `actionType`: `'facet'`
     */
    facetShowMore: {
        name: 'showMoreFacetResults',
        type: 'facet'
    },
    /**
     * The custom event that gets logged when an end-user collapses a facet to see less values.
     *
     * `actionCause`: `'showLessFacetResults'`
     * `actionType`: `'facet'`
     */
    facetShowLess: {
        name: 'showLessFacetResults',
        type: 'facet'
    },
    categoryFacetSelect: {
        name: 'categoryFacetSelect',
        type: 'categoryFacet'
    },
    categoryFacetReload: {
        name: 'categoryFacetReload',
        type: 'categoryFacet'
    },
    categoryFacetClear: {
        name: 'categoryFacetClear',
        type: 'categoryFacet'
    },
    categoryFacetBreadcrumb: {
        name: 'categoryFacetBreadcrumb',
        type: 'categoryFacet'
    },
    categoryFacetSearch: {
        name: 'categoryFacetSearch',
        type: 'categoryFacet'
    },
    /**
     * Identifies the search event that gets logged when a DynamicFacet check box is selected and the query is updated.
     *
     * `actionCause`: `'facetSelect'`
     * `actionType`: `'dynamicFacet'`
     *
     * The required and optional properties of an [`IAnalyticsFacetMeta`](@link IAnalyticsFacetMeta)
     * object are added as custom data when logging a usage analytics event matching this `actionCause`/`actionType`.
     */
    dynamicFacetSelect: {
        name: 'facetSelect',
        type: 'dynamicFacet'
    },
    /**
     * Identifies the search event that gets logged when a DynamicFacet check box is deselected and the query is updated.
     *
     * `actionCause`: `'facetDeselect'`
     * `actionType`: `'dynamicFacet'`
     *
     * The required and optional properties of an [`IAnalyticsFacetMeta`](@link IAnalyticsFacetMeta)
     * object are added as custom data when logging a usage analytics event matching this `actionCause`/`actionType`.
     */
    dynamicFacetDeselect: {
        name: 'facetDeselect',
        type: 'dynamicFacet'
    },
    /**
     * Identifies the search event that gets logged when the **Clear** button of the DynamicFacet is clicked.
     *
     * `actionCause`: `'facetClearAll'`
     * `actionType`: `'dynamicFacet'`
     *
     * The required and optional properties of an [`IAnalyticsFacetMeta`](@link IAnalyticsFacetMeta)
     * object are added as custom data when logging a usage analytics event matching this `actionCause`/`actionType`.
     */
    dynamicFacetClearAll: {
        name: 'facetClearAll',
        type: 'dynamicFacet'
    },
    /**
     * Identifies the search event that gets logged when the **Show more** button of the DynamicFacet is clicked.
     *
     * `actionCause`: `'showMoreFacetResults'`
     * `actionType`: `'dynamicFacet'`
     *
     * The required properties of an [`IAnalyticsDynamicFacetMeta`](@link IAnalyticsDynamicFacetMeta) object are added as custom data
     * when logging a usage analytics event matching this `actionCause`/`actionType`.
     */
    dynamicFacetShowMore: {
        name: 'showMoreFacetResults',
        type: 'dynamicFacet'
    },
    /**
     * Identifies the search event that gets logged when the **Show less** button of the DynamicFacet is clicked.
     *
     * `actionCause`: `'showLessFacetResults'`
     * `actionType`: `'dynamicFacet'`
     *
     * The required properties of an [`IAnalyticsDynamicFacetMeta`](@link IAnalyticsDynamicFacetMeta) object are added as custom data
     * when logging a usage analytics event matching this `actionCause`/`actionType`.
     */
    dynamicFacetShowLess: {
        name: 'showLessFacetResults',
        type: 'dynamicFacet'
    },
    /**
     * Identifies the search and custom event that gets logged when a user clicks the Go Back link after an error page.
     *
     * `actionCause`: `'errorBack'`
     * `actionType`: `'errors'`
     */
    errorBack: {
        name: 'errorBack',
        type: 'errors'
    },
    /**
     * Identifies the search and custom event that gets logged when a user clears the query box after an error page.
     *
     * `actionCause`: `'errorClearQuery'`
     * `actionType`: `'errors'`
     */
    errorClearQuery: {
        name: 'errorClearQuery',
        type: 'errors'
    },
    /**
     * Identifies the search and custom event that gets logged when a user clicks the Retry link after an error page.
     *
     * `actionCause`: `'errorRetry'`
     * `actionType`: `'errors'`
     */
    errorRetry: {
        name: 'errorRetry',
        type: 'errors'
    },
    /**
     * Identifies the search and custom event that gets logged when a user clicks the Cancel last action link when no results are returned following their last action.
     *
     * `actionCause`: `'noResultsBack'`
     * `actionType`: `'noResults'`
     */
    noResultsBack: {
        name: 'noResultsBack',
        type: 'noResults'
    },
    /**
     * In the context of Coveo for Salesforce, this search event is logged when a user switches from a search results list in the Insight Panel to the Expanded Search using the Expanded Search icon.
     *
     * `actionCause`: `'expandToFullUI'`
     * `actionType`: `'interface'`
     */
    expandToFullUI: {
        name: 'expandToFullUI',
        type: 'interface'
    },
    /**
     * In the context of some Coveo for Salesforce user interfaces, this search event is logged when a user fills a form input in the case creation page.
     *
     * `actionCause`: `'inputChange'`
     * `actionType`: `'caseCreation'`
     */
    caseCreationInputChange: {
        name: 'inputChange',
        type: 'caseCreation'
    },
    /**
     * In the context of some Coveo for Salesforce user interfaces, this custom event is logged when a user creates a case by clicking the submit button.
     *
     * `actionCause`: `'submitButton'`
     * `actionType`: `'caseCreation'`
     */
    caseCreationSubmitButton: {
        name: 'submitButton',
        type: 'caseCreation'
    },
    /**
     * In the context of some Coveo for Salesforce user interfaces, this custom event is logged when a user cancels the creation of their case by clicking the cancel button.
     *
     * `actionCause`: `'cancelButton'`
     * `actionType`: `'caseCreation'`
     */
    caseCreationCancelButton: {
        name: 'cancelButton',
        type: 'caseCreation'
    },
    /**
     * In the context of some Coveo for Salesforce user interfaces, this custom event is logged when a user leaves the case creation page.
     *
     * `actionCause`: `'unloadPage'`
     * `actionType`: `'caseCreation'`
     */
    caseCreationUnloadPage: {
        name: 'unloadPage',
        type: 'caseCreation'
    },
    /**
     * In the context of Coveo for Salesforce, this search event is logged when a user checks the Show only contextual result checkbox from the Insight Panel.
     *
     * `actionCause`: `'casecontextAdd'`
     * `actionType`: `'casecontext'`
     *
     * Logging an event with this actionType also adds the following key-value pairs in the custom data property of the Usage Analytics HTTP service request.
     * `"caseID":`: <correspondingCaseId>
     */
    casecontextAdd: {
        name: 'casecontextAdd',
        type: 'casecontext'
    },
    /**
     * In the context of Coveo for Salesforce, this search event is logged when a user clears the Show only contextual result checkbox from the Insight Panel.
     *
     * `actionCause`: `'casecontextRemove'`
     * `actionType`: `'casecontext'`
     *
     * Logging an event with this actionType also adds the following key-value pairs in the custom data property of the Usage Analytics HTTP service request.
     * `"caseID":`: <correspondingCaseId>
     */
    casecontextRemove: {
        name: 'casecontextRemove',
        type: 'casecontext'
    },
    /**
     * Identifies the search and custom event that gets logged when a checkbox in the search preferences is toggled.
     *
     * `actionCause`: `'preferencesChange'`
     * `actionType`: `'preferences'`
     *
     * Logging an event with this actionType also adds the following key-value pairs in the custom data property of the Usage Analytics HTTP service request.
     * `"preferenceName":`: <correspondingPreferenceName>
     * `"preferenceType":`: <correspondingPreferenceType>
     */
    preferencesChange: {
        name: 'preferencesChange',
        type: 'preferences'
    },
    /**
     * In the context of Coveo for Salesforce, this is custom event logged when an agent opens the User Actions panel.
     *
     * `actionCause`: `'getUserHistory'`
     * `actionType`: `'userHistory'`
     */
    getUserHistory: {
        name: 'getUserHistory',
        type: 'userHistory'
    },
    /**
     * In the context of some Coveo for Salesforce user interfaces, this  custom event is logged when an agent clicks a link in the User Actions panel.
     *
     * `actionCause`: `'userActionDocumentClick'`
     * `actionType`: `'userHistory'`
     */
    userActionDocumentClick: {
        name: 'userActionDocumentClick',
        type: 'userHistory'
    },
    /**
     * In the context of Coveo for Salesforce, this custom event is logged when a user attaches a knowledge base article to a case.
     *
     * `actionCause`: `'caseAttach'`
     * `actionType`: `'case'`
     *
     * Logging an event with this actionType also adds the following key-value pairs in the custom data property of the Usage Analytics HTTP service request.
     * `"documentTitle":`: <correspondingDocumentTitle>
     * `"resultUriHash":`: <correspondingResultUriHash>
     * `"articleID":`: <correspondingArticleId>
     * `"caseID":`: <correspondingCaseID>
     */
    caseAttach: {
        name: 'caseAttach',
        type: 'case'
    },
    /**
     * In the context of Coveo for Salesforce, this custom event is logged when a user detaches a knowledge base article to a case.
     *
     * `actionCause`: `'caseDetach'`
     * `actionType`: `'case'`
     *
     * Logging an event with this actionType also adds the following key-value pairs in the custom data property of the Usage Analytics HTTP service request.
     * `"documentTitle":`: <correspondingDocumentTitle>
     * `"resultUriHash":`: <correspondingResultUriHash>
     * `"articleID":`: <correspondingArticleId>
     * `"caseID":`: <correspondingCaseID>
     */
    caseDetach: {
        name: 'caseDetach',
        type: 'case'
    },
    /**
     * Identifies the search event that gets logged when a user modifies a custom search filter or removes one from the breadcrumbs.
     *
     * `actionCause`: `'customfiltersChange'`
     * `actionType`: `'customfilters'`
     *
     * Logging an event with this actionType also adds the following key-value pairs in the custom data property of the Usage Analytics HTTP service request.
     * `"customFilterName":`: <correspondingCustomFilterName>
     * `"customFilterType":`: <correspondingCustomFilterType>
     * `"customFilterExpression":`: <correspondingCustomFilterExpression>
     */
    customfiltersChange: {
        name: 'customfiltersChange',
        type: 'customfilters'
    },
    /**
     * Identifies the custom event that gets logged when a page number is selected and more items are loaded.
     *
     * `actionCause`: `'pagerNumber'`
     * `actionType`: `'getMoreResults'`
     *
     * Logging an event with this actionType also adds the following key-value pairs in the custom data property of the Usage Analytics HTTP service request.
     * `"pagerNumber":`: <correspondingPageNumber>
     */
    pagerNumber: {
        name: 'pagerNumber',
        type: 'getMoreResults'
    },
    /**
     * Identifies the custom event that gets logged when the Next Page link is selected and more items are loaded.
     *
     * `actionCause`: `'pagerNext'`
     * `actionType`: `'getMoreResults'`
     *
     * Logging an event with this actionType also adds the following key-value pairs in the custom data property of the Usage Analytics HTTP service request.
     * `"pagerNumber":`: <correspondingPageNumber>
     */
    pagerNext: {
        name: 'pagerNext',
        type: 'getMoreResults'
    },
    /**
     * Identifies the custom event that gets logged when the Previous Page link is selected and more items are loaded.
     *
     * `actionCause`: `'pagerPrevious'`
     * `actionType`: `'getMoreResults'`
     *
     * Logging an event with this actionType also adds the following key-value pairs in the custom data property of the Usage Analytics HTTP service request.
     * `"pagerNumber":`: <correspondingPageNumber>
     */
    pagerPrevious: {
        name: 'pagerPrevious',
        type: 'getMoreResults'
    },
    /**
     * Identifies the custom event that gets logged when the user scrolls to the bottom of the item page and more results are loaded.
     *
     * `actionCause`: `'pagerScrolling'`
     * `actionType`: `'getMoreResults'`
     */
    pagerScrolling: {
        name: 'pagerScrolling',
        type: 'getMoreResults'
    },
    /**
     * Identifies the custom event that gets logged when the Results per page component is selected.
     *
     * `actionCause`: `'pagerResize'`
     * `actionType`: `'getMoreResults'`
     */
    pagerResize: {
        name: 'pagerResize',
        type: 'getMoreResults'
    },
    /**
     * Identifies the search event that gets logged when the user accepts to share their location (latitude and longitude) with the search page.
     *
     * `actionCause`: `'positionSet'`
     * `actionType`: `'distance'`
     */
    positionSet: {
        name: 'positionSet',
        type: 'distance'
    },
    /**
     * Identifies the search event that gets logged when the search page loads with a query, such as when a user clicks a link pointing to a search results page with a query or enters a query in a standalone search box that points to a search page.
     *
     * `actionCause`: `'searchFromLink'`
     * `actionType`: `'interface'`
     */
    searchFromLink: {
        name: 'searchFromLink',
        type: 'interface'
    },
    /**
     * Identifies the custom event that gets logged when a user action triggers a notification set in the effective query pipeline on the search page.
     *
     * `actionCause`: `'notify'`
     * `actionType`: `'queryPipelineTriggers'`
     */
    triggerNotify: {
        name: 'notify',
        type: 'queryPipelineTriggers'
    },
    /**
     * Identifies the custom event that gets logged when a user action executes a JavaScript function set in the effective query pipeline on the search page.
     *
     * `actionCause`: `'execute'`
     * `actionType`: `'queryPipelineTriggers'`
     */
    triggerExecute: {
        name: 'execute',
        type: 'queryPipelineTriggers'
    },
    /**
     * Identifies the custom event that gets logged when a user action triggers a new query set in the effective query pipeline on the search page.
     *
     * `actionCause`: `'query'`
     * `actionType`: `'queryPipelineTriggers'`
     */
    triggerQuery: {
        name: 'query',
        type: 'queryPipelineTriggers'
    },
    /**
     * Identifies the custom event that gets logged when a user action redirects them to a URL set in the effective query pipeline on the search page.
     *
     * `actionCause`: `'redirect'`
     * `actionType`: `'queryPipelineTriggers'`
     */
    triggerRedirect: {
        name: 'redirect',
        type: 'queryPipelineTriggers'
    },
    /**
     * Identifies the custom event that gets logged when a user query encounters an error during execution.
     *
     * `actionCause`: `'query'`
     * `actionType`: `'errors'`
     *
     * Logging an event with this actionType also adds the following key-value pairs in the custom data property of the Usage Analytics HTTP service request.
     * `"query":`: <correspondingQuery>
     * `"aq":`: <correspondingAdvancedQuery>
     * `"cq":`: <correspondingConstantQuery>
     * `"dq":`: <correspondingDisjunctiveQuery>
     * `"errorType":`: <errorType>
     * `"errorMessage":`: <errorMessage>
     */
    queryError: {
        name: 'query',
        type: 'errors'
    },
    /**
     * Identifies the custom event that gets logged when a user exports search results in an XLS file by clicking the Export to Excel option.
     *
     * `actionCause`: `'exportToExcel'`
     * `actionType`: `'misc'`
     */
    exportToExcel: {
        name: 'exportToExcel',
        type: 'misc'
    },
    /**
     * Identifies the custom event that gets logged when a user performs a query that returns recommendations in the Recommendations panel.
     *
     * `actionCause`: `'recommendation'`
     * `actionType`: `'recommendation'`
     */
    recommendation: {
        name: 'recommendation',
        type: 'recommendation'
    },
    /**
     * Identifies the search event that gets logged when a user action (that is not a query) reloads the Recommendations panel with new recommendations.
     *
     * `actionCause`: `'recommendationInterfaceLoad'`
     * `actionType`: `'recommendation'`
     */
    recommendationInterfaceLoad: {
        name: 'recommendationInterfaceLoad',
        type: 'recommendation'
    },
    /**
     * Identifies the click event that gets logged when a user clicks a recommendation in the Recommendations panel.
     *
     * `actionCause`: `'recommendationOpen'`
     * `actionType`: `'recommendation'`
     */
    recommendationOpen: {
        name: 'recommendationOpen',
        type: 'recommendation'
    },
    /**
     * Identifies the search event that gets logged when a user creates an advanced query from the {@link AdvancedSearch} component.
     *
     * `actionCause`: `'advancedSearch'`
     * `actionType`: `'advancedSearch'`
     */
    advancedSearch: {
        name: 'advancedSearch',
        type: 'advancedSearch'
    },
    /**
     * Identifies the custom event that gets logged when a user follows a document.
     *
     * `actionCause`: `'followDocument'`
     * `actionType`: `'searchAlerts'`
     */
    searchAlertsFollowDocument: {
        name: 'followDocument',
        type: 'searchAlerts'
    },
    /**
     * Identifies the custom event that gets logged when a user follows a query.
     *
     * `actionCause`: `'followQuery'`
     * `actionType`: `'searchAlerts'`
     */
    searchAlertsFollowQuery: {
        name: 'followQuery',
        type: 'searchAlerts'
    },
    /**
     * Identifies the custom event that gets logged when the dropdown value for frequency is changed.
     *
     * `actionCause`: `'updateSubscription'`
     * `actionType`: `'searchAlerts'`
     */
    searchAlertsUpdateSubscription: {
        name: 'updateSubscription',
        type: 'searchAlerts'
    },
    /**
     * Identifies the custom event that gets logged when a subscription is successfully deleted.
     *
     * `actionCause`: `'deleteSubscription'`
     * `actionType`: `'searchAlerts'`
     */
    searchAlertsDeleteSubscription: {
        name: 'deleteSubscription',
        type: 'searchAlerts'
    },
    /**
     * Identifies the custom event that gets logged when a user unfollows a document.
     *
     * `actionCause`: `'unfollowDocument'`
     * `actionType`: `'searchAlerts'`
     */
    searchAlertsUnfollowDocument: {
        name: 'unfollowDocument',
        type: 'searchAlerts'
    },
    /**
     * Identifies the custom event that gets logged when a user unfollows a query.
     *
     * `actionCause`: `'unfollowQuery'`
     * `actionType`: `'searchAlerts'`
     */
    searchAlertsUnfollowQuery: {
        name: 'unfollowQuery',
        type: 'searchAlerts'
    },
    /**
     * Identifies the search event that gets logged when a user selects a simple filter value under the search box.
     *
     * `actionCause`: `'selectValue'`
     * `actionType`: `'simpleFilter'`
     *
     * Logging an event with this actionType also adds the following key-value pairs in the custom data property of the Usage Analytics HTTP service request.
     * `"simpleFilterTitle":`: <correspondingSimpleFilterTitle>
     * `"simpleFilterValue":`: <correspondingSimpleFilterValue>
     * `"simpleFilterField":`: <correspondingSimpleFilterField>
     */
    simpleFilterSelectValue: {
        name: 'selectValue',
        type: 'simpleFilter'
    },
    /**
     * Identifies the search event that gets logged when a user deselects a simple filter value under the search box.
     *
     * `actionCause`: `'deselectValue'`
     * `actionType`: `'simpleFilter'`
     *
     * Logging an event with this actionType also adds the following key-value pairs in the custom data property of the Usage Analytics HTTP service request.
     * `"simpleFilterTitle":`: <correspondingSimpleFilterTitle>
     * `"simpleFilterValue":`: <correspondingSimpleFilterValue>
     * `"simpleFilterField":`: <correspondingSimpleFilterField>
     */
    simpleFilterDeselectValue: {
        name: 'deselectValue',
        type: 'simpleFilter'
    },
    /**
     * Identifies the search event that gets logged when a user clicks the Clear all button to remove all simple filters under the search box.
     *
     * `actionCause`: `'clearAll'`
     * `actionType`: `'simpleFilter'`
     *
     * Logging an event with this actionType also adds the following key-value pairs in the custom data property of the Usage Analytics HTTP service request.
     * `"simpleFilterTitle":`: <correspondingSimpleFilterTitle>
     * `"simpleFilterValue":`: <correspondingSimpleFilterValue>
     * `"simpleFilterField":`: <correspondingSimpleFilterField>
     */
    simpleFilterClearAll: {
        name: 'clearAll',
        type: 'simpleFilter'
    },
    /**
     * Identifies the search event that gets logged when a user changes the search results layout (list, card, or table).
     *
     * `actionCause`: `'changeResultsLayout'`
     * `actionType`: `'resultsLayout'`
     */
    resultsLayoutChange: {
        name: 'changeResultsLayout',
        type: 'resultsLayout'
    },
    /**
     * Identifies the click event that gets logged when a user clicks the Show More link under a search result that support the folding component
     *
     * `actionCause`: `'showMoreFoldedResults'`
     * `actionType`: `'folding'`
     */
    foldingShowMore: {
        name: 'showMoreFoldedResults',
        type: 'folding'
    },
    /**
     * Identifies the click event that gets logged when a user clicks the Show Less link under a search result that support the folding component
     *
     * `actionCause`: `'showMoreFoldedResults'`
     * `actionType`: `'folding'`
     */
    foldingShowLess: {
        name: 'showLessFoldedResults',
        type: 'folding'
    },
    /**
     * The search event that gets logged when an end-user triggers a new query by clicking a missing term in a result item.
     *
     * `actionCause`: `'addMissingTerm'`
     * `actionType`: `'missingTerm'`
     */
    addMissingTerm: {
        name: 'addMissingTerm',
        type: 'missingTerm'
    },
    /**
     * The search event that gets logged when an end-user triggers a new query by removing a missing term from the breadcrumb.
     *
     * `actionCause`: `'removeMissingTerm'`
     * `actionType`: `'missingTerm'`
     */
    removeMissingTerm: {
        name: 'removeMissingTerm',
        type: 'missingTerm'
    },
    /**
     * The search event logged when a preview is requested for a query suggestion (see the [QuerySuggestPreview]{@link QuerySuggestPreview} component).
     *
     * Implements the [IAnalyticsActionCause]{@link IAnalyticsActionCause} interface as such:
     *
     * ```javascript
     * {
     *  actionCause: "showQuerySuggestPreview",
     *  actionType: "querySuggestPreview"
     * }
     * ```
     *
     * The framework sends an [`IAnalyticsTopSuggestionMeta`]{@link IAnalyticsTopSuggestionMeta} object as metadata when logging this event.
     */
    showQuerySuggestPreview: {
        name: 'showQuerySuggestPreview',
        type: 'querySuggestPreview'
    },
    /**
     * The custom event logged when an item is opened in a query suggestion preview (see the [QuerySuggestPreview]{@link QuerySuggestPreview} component).
     *
     * Implements the [IAnalyticsActionCause]{@link IAnalyticsActionCause} interface as such:
     *
     * ```javascript
     * {
     *  actionCause: "clickQuerySuggestPreview",
     *  actionType: "querySuggestPreview"
     * }
     * ```
     *
     * The framework sends an [`IAnalyticsClickQuerySuggestPreviewMeta`]{@link IAnalyticsClickQuerySuggestPreviewMeta} object as metadata when logging this event.
     */
    clickQuerySuggestPreview: {
        name: 'clickQuerySuggestPreview',
        type: 'querySuggestPreview'
    },
    /**
     * The custom event logged when the "Yes" button is pressed in a [SmartSnippet]{@link SmartSnippet}'s feedback banner.
     *
     * Implements the [IAnalyticsActionCause]{@link IAnalyticsActionCause} interface as such:
     *
     * ```javascript
     * {
     *  actionCause: "likeSmartSnippet",
     *  actionType: "smartSnippet"
     * }
     * ```
     */
    likeSmartSnippet: {
        name: 'likeSmartSnippet',
        type: 'smartSnippet'
    },
    /**
     * The custom event logged when the "No" button is pressed in a [SmartSnippet]{@link SmartSnippet}'s feedback banner.
     *
     * Implements the [IAnalyticsActionCause]{@link IAnalyticsActionCause} interface as such:
     *
     * ```javascript
     * {
     *  actionCause: "dislikeSmartSnippet",
     *  actionType: "smartSnippet"
     * }
     * ```
     */
    dislikeSmartSnippet: {
        name: 'dislikeSmartSnippet',
        type: 'smartSnippet'
    },
    /**
     * The custom event logged when the "Show more" button is pressed in a [SmartSnippet]{@link SmartSnippet}.
     *
     * Implements the [IAnalyticsActionCause]{@link IAnalyticsActionCause} interface as such:
     *
     * ```javascript
     * {
     *  actionCause: "expandSmartSnippet",
     *  actionType: "smartSnippet"
     * }
     * ```
     */
    expandSmartSnippet: {
        name: 'expandSmartSnippet',
        type: 'smartSnippet'
    },
    /**
     * The custom event logged when the "Show less" button is pressed in a [SmartSnippet]{@link SmartSnippet}.
     *
     * Implements the [IAnalyticsActionCause]{@link IAnalyticsActionCause} interface as such:
     *
     * ```javascript
     * {
     *  actionCause: "collapseSmartSnippet",
     *  actionType: "smartSnippet"
     * }
     * ```
     */
    collapseSmartSnippet: {
        name: 'collapseSmartSnippet',
        type: 'smartSnippet'
    },
    /**
     * The custom event logged when the "Explain why" button in a [SmartSnippet]{@link SmartSnippet} is pressed.
     *
     * Implements the [IAnalyticsActionCause]{@link IAnalyticsActionCause} interface as such:
     *
     * ```javascript
     * {
     *  actionCause: "openSmartSnippetFeedbackModal",
     *  actionType: "smartSnippet"
     * }
     * ```
     */
    openSmartSnippetFeedbackModal: {
        name: 'openSmartSnippetFeedbackModal',
        type: 'smartSnippet'
    },
    /**
     * The custom event logged when the modal opened by clicking the "Explain why" button in a [SmartSnippet]{@link SmartSnippet} is closed.
     *
     * Implements the [IAnalyticsActionCause]{@link IAnalyticsActionCause} interface as such:
     *
     * ```javascript
     * {
     *  actionCause: "closeSmartSnippetFeedbackModal",
     *  actionType: "smartSnippet"
     * }
     * ```
     */
    closeSmartSnippetFeedbackModal: {
        name: 'closeSmartSnippetFeedbackModal',
        type: 'smartSnippet'
    },
    /**
     * The custom event logged when a generic reason was sent from the modal opened when clicking the "Explain why" button in a [SmartSnippet]{@link SmartSnippet}.
     *
     * Implements the [IAnalyticsActionCause]{@link IAnalyticsActionCause} interface as such:
     *
     * ```javascript
     * {
     *  actionCause: "sendSmartSnippetReason",
     *  actionType: "smartSnippet"
     * }
     * ```
     */
    sendSmartSnippetReason: {
        name: 'sendSmartSnippetReason',
        type: 'smartSnippet'
    },
    /**
     * The custom event logged when a user clicks on the source of an answer in a [SmartSnippet]{@link SmartSnippet}..
     *
     * ```javascript
     * {
     *  actionCause: "openSmartSnippetSource",
     *  actionType: "smartSnippet"
     * }
     * ```
     */
    openSmartSnippetSource: {
        name: 'openSmartSnippetSource',
        type: 'smartSnippet'
    },
    /**
     * The custom event logged when a user clicks on an inline link inside of an answer in a [SmartSnippet]{@link SmartSnippet}.
     *
     * ```javascript
     * {
     *  actionCause: "openSmartSnippetInlineLink",
     *  actionType: "smartSnippet"
     * }
     * ```
     */
    openSmartSnippetInlineLink: {
        name: 'openSmartSnippetInlineLink',
        type: 'smartSnippet'
    },
    /**
     * The custom event logged when a suggestion from [SmartSnippetSuggestions]{@link SmartSnippetSuggestions} is expanded.
     *
     * Implements the [IAnalyticsActionCause]{@link IAnalyticsActionCause} interface as such:
     *
     * ```javascript
     * {
     *  actionCause: "expandSmartSnippetSuggestion",
     *  actionType: "smartSnippetSuggestions"
     * }
     * ```
     */
    expandSmartSnippetSuggestion: {
        name: 'expandSmartSnippetSuggestion',
        type: 'smartSnippetSuggestions'
    },
    /**
     * The custom event logged when a suggestion from [SmartSnippetSuggestions]{@link SmartSnippetSuggestions} is collapsed.
     *
     * Implements the [IAnalyticsActionCause]{@link IAnalyticsActionCause} interface as such:
     *
     * ```javascript
     * {
     *  actionCause: "collapseSmartSnippetSuggestion",
     *  actionType: "smartSnippetSuggestions"
     * }
     * ```
     */
    collapseSmartSnippetSuggestion: {
        name: 'collapseSmartSnippetSuggestion',
        type: 'smartSnippetSuggestions'
    },
    /**
     * The custom event logged when a user clicks on the source of an answer in a [SmartSnippetSuggestion]{@link SmartSnippetSuggestions}.
     *
     * ```javascript
     * {
     *  actionCause: "openSmartSnippetSuggestionSource",
     *  actionType: "smartSnippet"
     * }
     * ```
     */
    openSmartSnippetSuggestionSource: {
        name: 'openSmartSnippetSuggestionSource',
        type: 'smartSnippet'
    },
    /**
     * The custom event logged when a user clicks on an inline link inside of an answer in an expanded [SmartSnippetSuggestion]{@link SmartSnippetSuggestions}.
     *
     * ```javascript
     * {
     *  actionCause: "openSmartSnippetSuggestionInlineLink",
     *  actionType: "smartSnippet"
     * }
     * ```
     */
    openSmartSnippetSuggestionInlineLink: {
        name: 'openSmartSnippetSuggestionInlineLink',
        type: 'smartSnippet'
    }
};
 
 
/***/ }),
/* 8 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __assign = (this && this.__assign) || Object.assign || function(t) {
    for (var s, i = 1, n = arguments.length; i < n; i++) {
        s = arguments[i];
        for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
            t[p] = s[p];
    }
    return t;
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { Iif (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        Iif (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            Iif (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
            Iif (y = 0, t) op = [0, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    Eif (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
Object.defineProperty(exports, "__esModule", { value: true });
var _ = __webpack_require__(1);
var QueryController_1 = __webpack_require__(78);
var InitializationEvents_1 = __webpack_require__(22);
var Assert_1 = __webpack_require__(12);
var Logger_1 = __webpack_require__(18);
var ComponentOptionsModel_1 = __webpack_require__(55);
var ComponentStateModel_1 = __webpack_require__(134);
var QueryStateModel_1 = __webpack_require__(17);
var Dom_1 = __webpack_require__(0);
var HashUtils_1 = __webpack_require__(88);
var JQueryutils_1 = __webpack_require__(212);
var Utils_1 = __webpack_require__(5);
var AnalyticsActionListMeta_1 = __webpack_require__(7);
var Component_1 = __webpack_require__(6);
var SearchInterface_1 = __webpack_require__(25);
var InitializationHelper_1 = __webpack_require__(1079);
var RegisteredNamedMethods_1 = __webpack_require__(38);
/**
 * The main purpose of this class is to initialize the framework (a.k.a the code executed when calling `Coveo.init`).<br/>
 * It's also in charge or registering the available components, as well as the method that we expost to the global Coveo scope.<br/>
 * For example, the `Coveo.executeQuery` function will be registed in this class by the {@link QueryController}.
 */
var Initialization = /** @class */ (function () {
    function Initialization() {
    }
    /**
     * Register a new set of options for a given element.<br/>
     * When the element is eventually initialized as a component, those options will be used / merged to create the final option set to use for this component.<br/>
     * Note that this function should not normally be called directly, but instead using the global `Coveo.options` function
     * @param element
     * @param options
     */
    Initialization.registerDefaultOptions = function (element, options) {
        var existing = element['CoveoDefaultOptions'] || {};
        var updated = Utils_1.Utils.extendDeep(existing, options);
        element['CoveoDefaultOptions'] = updated;
    };
    Initialization.resolveDefaultOptions = function (element, options) {
        var optionsForThisElement = element['CoveoDefaultOptions'];
        var optionsSoFar;
        if (Utils_1.Utils.exists(optionsForThisElement)) {
            optionsSoFar = Utils_1.Utils.extendDeep(optionsForThisElement, options);
        }
        else {
            optionsSoFar = options;
        }
        if (element.parentElement) {
            return Initialization.resolveDefaultOptions(element.parentElement, optionsSoFar);
        }
        else {
            return optionsSoFar;
        }
    };
    /**
     * Register a new Component to be recognized by the framework.
     * This essentially mean that when we call `Coveo.init`, the Initialization class will scan the DOM for known component (which have registed themselves with this call) and create a new component on each element.
     *
     * This is meant to register the component to be loaded "eagerly" (Immediately available when the UI scripts are included)
     * @param componentClass
     */
    Initialization.registerAutoCreateComponent = function (componentClass) {
        Assert_1.Assert.exists(componentClass);
        Assert_1.Assert.exists(componentClass.ID);
        Assert_1.Assert.doesNotExists(Initialization.namedMethods[componentClass.ID]);
        Eif (!_.contains(Initialization.registeredComponents, componentClass.ID)) {
            Initialization.registeredComponents.push(componentClass.ID);
            if (componentClass.aliases) {
                Initialization.componentAliases[componentClass.ID] = componentClass.aliases;
            }
        }
        Eif (EagerInitialization.eagerlyLoadedComponents[componentClass.ID] == null) {
            EagerInitialization.eagerlyLoadedComponents[componentClass.ID] = componentClass;
        }
        Eif (LazyInitialization.lazyLoadedComponents[componentClass.ID] == null) {
            LazyInitialization.lazyLoadedComponents[componentClass.ID] = function () {
                return new Promise(function (resolve, reject) {
                    resolve(componentClass);
                });
            };
        }
    };
    /**
     * Set the fields that the component needs to add to the query.
     *
     * This is used when the {@link ResultList.options.autoSelectFieldsToInclude } is set to `true` (which is `true` by default).
     *
     * The framework tries to only include the needed fields from the index, for performance reasons.
     *
     * @param componentId The id for the result template component (see [Result Templates](https://docs.coveo.com/en/413/)).
     * @param fields
     */
    Initialization.registerComponentFields = function (componentId, fields) {
        Initialization.fieldsNeededForQuery = Utils_1.Utils.concatWithoutDuplicate(Initialization.fieldsNeededForQuery, fields);
        // Register with both name (eg : Facet and CoveoFacet) to reduce possible confusion.
        // The id concept for component is fuzzy for a lot of people (include the Coveo prefix or not)
        var registerById = function (id) {
            if (Initialization.fieldsNeededForQueryByComponent[id] == null) {
                Initialization.fieldsNeededForQueryByComponent[id] = fields;
            }
            else {
                Initialization.fieldsNeededForQueryByComponent[id] = Utils_1.Utils.concatWithoutDuplicate(Initialization.fieldsNeededForQueryByComponent[id], fields);
            }
        };
        registerById(componentId);
        registerById(Component_1.Component.computeCssClassNameForType(componentId));
    };
    /**
     * Returns all the fields that the framework currently knows should be added to the query.
     *
     * This is used when the {@link ResultList.options.autoSelectFieldsToInclude } is set to `true` (which is `true` by default).
     *
     * The framework tries to only include the needed fields from the index, for performance reasons.
     * @returns {string[]}
     */
    Initialization.getRegisteredFieldsForQuery = function () {
        return Initialization.fieldsNeededForQuery;
    };
    /**
     * Returns all the fields that the framework currently knows should be added to the query, for a given component.
     *
     * This is used when the {@link ResultList.options.autoSelectFieldsToInclude } is set to `true` (which is `true` by default).
     *
     * The framework tries to only include the needed fields from the index, for performance reasons.
     * @param componentId
     * @returns {string[]|Array}
     */
    Initialization.getRegisteredFieldsComponentForQuery = function (componentId) {
        var basicId = Initialization.fieldsNeededForQueryByComponent[componentId] || [];
        var coveoId = Initialization.fieldsNeededForQueryByComponent[Component_1.Component.computeCssClassNameForType(componentId)] || [];
        return Utils_1.Utils.concatWithoutDuplicate(basicId, coveoId);
    };
    /**
     * Check if a component is already registered, using it's ID (e.g. : 'Facet').
     * @param componentClassId
     * @returns {boolean}
     */
    Initialization.isComponentClassIdRegistered = function (componentClassId) {
        return (_.contains(Initialization.registeredComponents, componentClassId) ||
            _.contains(Initialization.registeredComponents, Component_1.Component.computeCssClassNameForType(componentClassId)));
    };
    /**
     * Return the list of all known components (the list of ID for each component), whether they are actually loaded or not.
     * @returns {string[]}
     */
    Initialization.getListOfRegisteredComponents = function () {
        return Initialization.registeredComponents;
    };
    /**
     * Return the list of all components that are currently eagerly loaded.
     * @returns {string[]}
     */
    Initialization.getListOfLoadedComponents = function () {
        return _.keys(EagerInitialization.eagerlyLoadedComponents);
    };
    /**
     * Return the component class definition, using it's ID (e.g. : 'CoveoFacet').
     *
     * This means the component needs to be eagerly loaded.
     *
     * @param name
     * @returns {IComponentDefinition}
     */
    Initialization.getRegisteredComponent = function (name) {
        return EagerInitialization.eagerlyLoadedComponents[name];
    };
    /**
     * Initialize the framework. Note that this function should not normally be called directly, but instead using a globally registered function (e.g.: Coveo.init), or {@link Initialization.initSearchInterface} or {@link Initialization.initStandaloneSearchInterface} <br/>
     * (e.g. : `Coveo.init` or `Coveo.initSearchbox`).
     * @param element The element on which to initialize the interface.
     * @param options The options for all components (eg: {Searchbox : {enableSearchAsYouType : true}}).
     * @param initSearchInterfaceFunction The function to execute to create the {@link SearchInterface} component. Different init call will create different {@link SearchInterface}.
     */
    Initialization.initializeFramework = function (element, options, initSearchInterfaceFunction) {
        var _this = this;
        Assert_1.Assert.exists(element);
        var alreadyInitialized = Component_1.Component.get(element, QueryController_1.QueryController, true);
        if (alreadyInitialized) {
            this.logger.error('This DOM element has already been initialized as a search interface, skipping initialization', element);
            return Promise.resolve({
                elem: element
            });
        }
        options = Initialization.resolveDefaultOptions(element, options);
        var waitForAllPromisesToFinish = function (eventType, promises) { return __awaiter(_this, void 0, void 0, function () {
            var _this = this;
            var promisesWithErrorsHandledIndividually;
            return __generator(this, function (_a) {
                try {
                    promisesWithErrorsHandledIndividually = promises.map(function (p) {
                        return p.catch(function (error) {
                            return _this.logger.warn("An error occurred when trying to defer the \"" + eventType + "\" event. The defer will be ignored.", "Error: " + error);
                        });
                    });
                    return [2 /*return*/, Promise.all(promisesWithErrorsHandledIndividually)];
                }
                catch (error) {
                    this.logger.error("An unexpected error occurred when trying to defer the \"" + event + "\" event. All defers will be ignored.", "Error: " + error);
                }
                return [2 /*return*/];
            });
        }); };
        var triggerInitializationEventWithArguments = function (eventType) {
            var initializationEventArgs = {
                defer: []
            };
            Dom_1.$$(element).trigger(eventType, initializationEventArgs);
            if (initializationEventArgs.defer.length > 0) {
                return waitForAllPromisesToFinish(eventType, initializationEventArgs.defer);
            }
            else {
                return Promise.resolve();
            }
        };
        Initialization.performInitFunctionsOption(options, InitializationEvents_1.InitializationEvents.beforeInitialization);
        Dom_1.$$(element).trigger(InitializationEvents_1.InitializationEvents.beforeInitialization);
        var toExecuteOnceSearchInterfaceIsInitialized = function () { return __awaiter(_this, void 0, void 0, function () {
            var result, searchInterface, shouldLogInActionHistory;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0: return [4 /*yield*/, Initialization.initExternalComponents(element, options)];
                    case 1:
                        result = _a.sent();
                        Initialization.performInitFunctionsOption(options, InitializationEvents_1.InitializationEvents.afterComponentsInitialization);
                        return [4 /*yield*/, triggerInitializationEventWithArguments(InitializationEvents_1.InitializationEvents.afterComponentsInitialization)];
                    case 2:
                        _a.sent();
                        Dom_1.$$(element).trigger(InitializationEvents_1.InitializationEvents.restoreHistoryState);
                        Initialization.performInitFunctionsOption(options, InitializationEvents_1.InitializationEvents.afterInitialization);
                        return [4 /*yield*/, triggerInitializationEventWithArguments(InitializationEvents_1.InitializationEvents.afterInitialization)];
                    case 3:
                        _a.sent();
                        searchInterface = Component_1.Component.get(element, SearchInterface_1.SearchInterface);
                        if (Initialization.shouldExecuteFirstQueryAutomatically(searchInterface)) {
                            Initialization.logFirstQueryCause(searchInterface);
                            shouldLogInActionHistory = true;
                            // We should not log an action history if the interface is a standalone recommendation component.
                            Eif (Coveo['Recommendation']) {
                                shouldLogInActionHistory = !(searchInterface instanceof Coveo['Recommendation']);
                            }
                            Component_1.Component.get(element, QueryController_1.QueryController).executeQuery({
                                logInActionsHistory: shouldLogInActionHistory,
                                isFirstQuery: true
                            });
                        }
                        return [2 /*return*/, result];
                }
            });
        }); };
        var resultOfSearchInterfaceInitialization = initSearchInterfaceFunction(element, options);
        // We are executing a "lazy" initialization, which returns a Promise
        // eg : CoveoJsSearch.Lazy.js was included in the page
        // this means that we can only execute the function after the promise has resolved
        if (resultOfSearchInterfaceInitialization.isLazyInit) {
            return resultOfSearchInterfaceInitialization.initResult.then(toExecuteOnceSearchInterfaceIsInitialized).then(function () {
                return {
                    elem: element
                };
            });
        }
        else {
            // Else, we are executing an "eager" initialization, which returns void;
            // eg : CoveoJsSearch.js was included in the page
            // this mean that this function gets executed immediately
            return toExecuteOnceSearchInterfaceIsInitialized().then(function () {
                return {
                    elem: element
                };
            });
        }
    };
    /**
     * Create a new standard search interface. This is the function executed when calling `Coveo.init`.
     * @param element
     * @param options
     * @returns {IInitResult}
     */
    Initialization.initSearchInterface = function (element, options) {
        Iif (options === void 0) { options = {}; }
        options = Initialization.resolveDefaultOptions(element, options);
        var searchInterface = new SearchInterface_1.SearchInterface(element, options.SearchInterface, options.Analytics);
        searchInterface.options.originalOptionsObject = options;
        var initParameters = { options: options, bindings: searchInterface.getBindings() };
        return Initialization.automaticallyCreateComponentsInside(element, initParameters, ['Recommendation']);
    };
    /**
     * Create a new standalone search interface (standalone search box). This is the function executed when calling `Coveo.initSearchbox`.
     * @param element
     * @param options
     * @returns {IInitResult}
     */
    Initialization.initStandaloneSearchInterface = function (element, options) {
        Iif (options === void 0) { options = {}; }
        options = Initialization.resolveDefaultOptions(element, options);
        // Set trigger query on clear to false for standalone search interface automatically
        // Take care of not overriding any options that could have been set by external code.
        Eif (!options.Querybox) {
            options.Querybox = {};
        }
        Eif (!options.Omnibox) {
            options.Omnibox = {};
        }
        Iif (!options.Searchbox) {
            options.Searchbox = {};
        }
        Eif (!options.Querybox.triggerQueryOnClear || !options.Omnibox.triggerQueryOnClear || !options.Searchbox.triggerOnQueryClear) {
            options.Querybox.triggerQueryOnClear = false;
            options.Omnibox.triggerQueryOnClear = false;
            options.Searchbox.triggerQueryOnClear = false;
        }
        var searchInterface = new SearchInterface_1.StandaloneSearchInterface(element, options.StandaloneSearchInterface, options.Analytics);
        searchInterface.options.originalOptionsObject = options;
        var initParameters = { options: options, bindings: searchInterface.getBindings() };
        return Initialization.automaticallyCreateComponentsInside(element, initParameters);
    };
    /**
     * Create a new recommendation search interface. This is the function executed when calling `Coveo.initRecommendation`.
     * @param element
     * @param options
     * @returns {IInitResult}
     */
    Initialization.initRecommendationInterface = function (element, options) {
        Iif (options === void 0) { options = {}; }
        options = Initialization.resolveDefaultOptions(element, options);
        // Since a recommendation interface inherits from a search interface, we need to merge those if passed on init
        var optionsForRecommendation = _.extend({}, options.SearchInterface, options.Recommendation);
        // If there is a main search interface, modify the loading animation for the recommendation interface to a "noop" element
        // We don't want 2 animation overlapping
        if (optionsForRecommendation.mainSearchInterface) {
            optionsForRecommendation.firstLoadingAnimation = Dom_1.$$('span').el;
        }
        var recommendation = new window['Coveo']['Recommendation'](element, optionsForRecommendation, options.Analytics);
        recommendation.options.originalOptionsObject = options;
        var initParameters = { options: options, bindings: recommendation.getBindings() };
        return Initialization.automaticallyCreateComponentsInside(element, initParameters);
    };
    /**
     * Scan the result element and all its children for known components. Initialize every known result component found.
     *
     * See also : {@link Initialization.automaticallyCreateComponentsInside}.
     * @param resultElement The root element to scan for known components
     * @param result The result which needs to be passed to each result component constructor.
     * @param optionsToInject A set of options to inject for the components found inside the resultElement. These options will be merged with any options passed during the "init" call of the search interface.
     */
    Initialization.automaticallyCreateComponentsInsideResult = function (resultElement, result, optionsToInject) {
        if (optionsToInject === void 0) { optionsToInject = {}; }
        var options = __assign({ initOptions: optionsToInject }, result.searchInterface.options.originalOptionsObject);
        var bindings = __assign({}, result.searchInterface.getBindings(), { resultElement: resultElement });
        var initParameters = {
            options: options,
            bindings: bindings,
            result: result
        };
        return Initialization.automaticallyCreateComponentsInside(resultElement, initParameters);
    };
    /**
     * Scan the element and all its children for known components. Initialize every known component found.
     *
     * @param element
     * @param initParameters
     * @param ignore
     * @returns {IInitResult}
     */
    Initialization.automaticallyCreateComponentsInside = function (element, initParameters, ignore) {
        var _this = this;
        if (ignore === void 0) { ignore = []; }
        Assert_1.Assert.exists(element);
        var htmlElementsToIgnore = InitializationHelper_1.InitializationHelper.findDOMElementsToIgnore(element, ignore);
        var htmlElementsToInitialize = InitializationHelper_1.InitializationHelper.findDOMElementsToInitialize(element, htmlElementsToIgnore);
        var isLazyInit;
        var constructorForEachComponentsInstance = _.chain(htmlElementsToInitialize)
            .map(function (htmlElementToInitialize) {
            var resultsOfFactory = _this.componentsFactory(htmlElementToInitialize.htmlElements, htmlElementToInitialize.componentClassId, initParameters);
            isLazyInit = resultsOfFactory.isLazyInit;
            return resultsOfFactory.factory;
        })
            .map(function (codeToExecute) {
            var codeResult = codeToExecute();
            Iif (codeResult) {
                return Promise.all(codeResult).then(function () { return true; });
            }
            return Promise.resolve(true);
        })
            .value();
        var initResult = Promise.all(constructorForEachComponentsInstance)
            .then(function () { return true; })
            .catch(function (e) {
            // We log the fatal error on init, but then we try to continue the initialization for the rest of the components.
            // In most case, this would be caused by a fatal error in a component constructor.
            // In some cases, it might be for a minor component not essential to basic function of the interface, meaning we could still salvage things here.
            _this.logger.error(e);
            _this.logger.warn("Skipping initialization of previous component in error ... ");
            return true;
        });
        return {
            initResult: initResult,
            isLazyInit: isLazyInit
        };
    };
    /**
     * Register a new globally available method in the Coveo namespace (e.g.: `Coveo.init`).
     * @param methodName The method name to register.
     * @param handler The function to execute when the method is called.
     */
    Initialization.registerNamedMethod = function (methodName, handler) {
        Assert_1.Assert.isNonEmptyString(methodName);
        Assert_1.Assert.doesNotExists(EagerInitialization.eagerlyLoadedComponents[methodName]);
        Assert_1.Assert.doesNotExists(Initialization.namedMethods[methodName]);
        Assert_1.Assert.exists(handler);
        Initialization.namedMethods[methodName] = handler;
    };
    /**
     * Check if the method is already registed.
     * @param methodName
     * @returns {boolean}
     */
    Initialization.isNamedMethodRegistered = function (methodName) {
        return Utils_1.Utils.exists(Initialization.namedMethods[methodName]);
    };
    /**
     * 'Monkey patch' (replace the function with a new one) a given method on a component instance.
     * @param methodName
     * @param element
     * @param handler
     */
    Initialization.monkeyPatchComponentMethod = function (methodName, element, handler) {
        Assert_1.Assert.isNonEmptyString(methodName);
        Assert_1.Assert.exists(handler);
        var componentClass;
        if (methodName.indexOf('.') > 0) {
            var splitArg = methodName.split('.');
            Assert_1.Assert.check(splitArg.length == 2, 'Invalid method name, correct syntax is CoveoComponent.methodName.');
            componentClass = splitArg[0];
            methodName = splitArg[1];
        }
        var boundComponent = Component_1.Component.get(element, componentClass);
        Assert_1.Assert.exists(boundComponent);
        Assert_1.Assert.exists(boundComponent[methodName]);
        var originalMethodName = '__' + methodName;
        Eif (!Utils_1.Utils.exists(boundComponent[originalMethodName])) {
            boundComponent[originalMethodName] = boundComponent[methodName];
        }
        boundComponent[methodName] = handler;
    };
    Initialization.initBoxInterface = function (element, options, type, injectMarkup) {
        Iif (options === void 0) { options = {}; }
        Eif (type === void 0) { type = 'Standard'; }
        Eif (injectMarkup === void 0) { injectMarkup = true; }
        options = Initialization.resolveDefaultOptions(element, options);
        var fromInitTypeToBoxReference = 'Box';
        Iif (type != 'Standard') {
            fromInitTypeToBoxReference += 'For' + type;
        }
        var boxRef = Component_1.Component.getComponentRef(fromInitTypeToBoxReference);
        Iif (boxRef) {
            new Logger_1.Logger(element).info('Initializing box of type ' + fromInitTypeToBoxReference);
            var injectFunction = injectMarkup ? boxRef.getInjection : function () { };
            var box = new boxRef(element, options[fromInitTypeToBoxReference], options.Analytics, injectFunction, options);
            box.options.originalOptionsObject = options;
            var initParameters = { options: options, bindings: box.getBindings() };
            return Initialization.automaticallyCreateComponentsInside(element, initParameters);
        }
        else {
            return {
                initResult: new Promise(function (resolve, reject) {
                    new Logger_1.Logger(element).error('Trying to initialize box of type : ' + fromInitTypeToBoxReference + ' but not found in code (not compiled)!');
                    Assert_1.Assert.fail('Cannot initialize unknown type of box');
                    reject(false);
                }),
                isLazyInit: false
            };
        }
    };
    Initialization.dispatchNamedMethodCall = function (methodName, element, args) {
        Assert_1.Assert.isNonEmptyString(methodName);
        Assert_1.Assert.exists(element);
        var namedMethodHandler = Initialization.namedMethods[methodName];
        Assert_1.Assert.exists(namedMethodHandler);
        Initialization.logger.trace('Dispatching named method call of ' + methodName, element, args);
        Iif (args.length != 0) {
            return namedMethodHandler.apply(null, [element].concat(args));
        }
        else {
            return namedMethodHandler.apply(null, [element]);
        }
    };
    Initialization.dispatchNamedMethodCallOrComponentCreation = function (token, element, args) {
        Assert_1.Assert.isNonEmptyString(token);
        Assert_1.Assert.exists(element);
        if (Initialization.isNamedMethodRegistered(token)) {
            return Initialization.dispatchNamedMethodCall(token, element, args);
        }
        else Eif (Initialization.isThereASingleComponentBoundToThisElement(element)) {
            return Initialization.dispatchMethodCallOnBoundComponent(token, element, args);
        }
        else {
            Assert_1.Assert.fail('No method or component named ' + token + ' are registered.');
        }
    };
    Initialization.isSearchFromLink = function (searchInterface) {
        return Utils_1.Utils.isNonEmptyString(searchInterface.getBindings().queryStateModel.get('q'));
    };
    Initialization.isThereASingleComponentBoundToThisElement = function (element) {
        Assert_1.Assert.exists(element);
        return Utils_1.Utils.exists(Component_1.Component.get(element, null, true));
    };
    Initialization.isThereANonSearchInterfaceComponentBoundToThisElement = function (element) {
        // We automatically consider "Recommendation" component to be a special case of search interface
        // and thus do not check those.
        Iif (Dom_1.$$(element).hasClass('CoveoRecommendation')) {
            return true;
        }
        return (Initialization.isThereASingleComponentBoundToThisElement(element) &&
            !RegisteredNamedMethods_1.get(element, SearchInterface_1.SearchInterface, true) &&
            !Dom_1.$$(element).hasClass('CoveoRecommendation'));
    };
    Initialization.dispatchMethodCallOnBoundComponent = function (methodName, element, args) {
        Assert_1.Assert.isNonEmptyString(methodName);
        Assert_1.Assert.exists(element);
        var boundComponent = Component_1.Component.get(element);
        Assert_1.Assert.exists(boundComponent);
        var method = boundComponent[methodName];
        Eif (Utils_1.Utils.exists(method)) {
            return method.apply(boundComponent, args);
        }
        else {
            Assert_1.Assert.fail('No method named ' + methodName + ' exist on component ' + boundComponent.type);
        }
    };
    Initialization.logFirstQueryCause = function (searchInterface) {
        var firstQueryCause = HashUtils_1.HashUtils.getValue('firstQueryCause', HashUtils_1.HashUtils.getHash());
        Iif (firstQueryCause != null) {
            var meta = HashUtils_1.HashUtils.getValue('firstQueryMeta', HashUtils_1.HashUtils.getHash()) || {};
            searchInterface.usageAnalytics.logSearchEvent(AnalyticsActionListMeta_1.analyticsActionCauseList[firstQueryCause], meta);
        }
        else {
            if (Initialization.isSearchFromLink(searchInterface)) {
                searchInterface.usageAnalytics.logSearchEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.searchFromLink, {});
            }
            else {
                searchInterface.usageAnalytics.logSearchEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.interfaceLoad, {});
            }
        }
    };
    Initialization.performInitFunctionsOption = function (options, event) {
        Eif (Utils_1.Utils.exists(options)) {
            Initialization.performFunctions(options[event]);
        }
    };
    Initialization.performFunctions = function (option) {
        Iif (Utils_1.Utils.exists(option)) {
            _.each(option, function (func) {
                if (typeof func == 'function') {
                    func();
                }
            });
        }
    };
    Initialization.initExternalComponents = function (element, options) {
        var _this = this;
        if (options && options['externalComponents']) {
            var searchInterface = Component_1.Component.get(element, SearchInterface_1.SearchInterface);
            var queryStateModel = Component_1.Component.get(element, QueryStateModel_1.QueryStateModel);
            var componentStateModel = Component_1.Component.get(element, ComponentStateModel_1.ComponentStateModel);
            var queryController = Component_1.Component.get(element, QueryController_1.QueryController);
            var componentOptionsModel = Component_1.Component.get(element, ComponentOptionsModel_1.ComponentOptionsModel);
            var usageAnalytics = searchInterface.usageAnalytics;
            Assert_1.Assert.exists(searchInterface);
            Assert_1.Assert.exists(queryStateModel);
            Assert_1.Assert.exists(queryController);
            Assert_1.Assert.exists(componentStateModel);
            Assert_1.Assert.exists(usageAnalytics);
            var initParameters_1 = {
                options: options,
                bindings: {
                    searchInterface: searchInterface,
                    queryStateModel: queryStateModel,
                    queryController: queryController,
                    usageAnalytics: usageAnalytics,
                    componentStateModel: componentStateModel,
                    componentOptionsModel: componentOptionsModel,
                    root: element
                }
            };
            var initializationOfExternalComponents = _.map(options['externalComponents'], function (externalComponent) {
                var elementToInstantiate = externalComponent;
                if (Utils_1.Utils.isHtmlElement(elementToInstantiate)) {
                    return Initialization.automaticallyCreateComponentsInside(elementToInstantiate, initParameters_1).initResult;
                }
                else Eif (JQueryutils_1.JQueryUtils.isInstanceOfJQuery(elementToInstantiate)) {
                    return Initialization.automaticallyCreateComponentsInside(elementToInstantiate.get(0), initParameters_1)
                        .initResult;
                }
            });
            return Promise.all(initializationOfExternalComponents)
                .then(function (results) { return _.first(results); })
                .catch(function (err) {
                _this.logger.error(err);
                return false;
            });
        }
        else {
            return Promise.resolve(false);
        }
    };
    Initialization.shouldExecuteFirstQueryAutomatically = function (searchInterface) {
        var options = searchInterface.options;
        Iif (!options) {
            return true;
        }
        if (options.autoTriggerQuery === false) {
            return false;
        }
        if (options.allowQueriesWithoutKeywords === true) {
            return true;
        }
        var currentStateOfQuery = RegisteredNamedMethods_1.state(searchInterface.element).get('q');
        return currentStateOfQuery != '';
    };
    Initialization.logger = new Logger_1.Logger('Initialization');
    Initialization.registeredComponents = [];
    Initialization.componentAliases = {};
    Initialization.namedMethods = {};
    // List of every fields that are needed by components when doing a query (the fieldsToInclude property in the query)
    // Since results components are lazy loaded after the first query (when doing the rendering) we need to register the needed fields before their implementation are loaded in the page.
    Initialization.fieldsNeededForQuery = [];
    // List of every fields that are needed by components when doing a query (the fieldsToInclude property in the query), linked to the component that needs them
    // It is a bit different from `fieldsNeededForQuery` because we can, in some scenarios, optimize to only get fields for components that are actually in the page
    Initialization.fieldsNeededForQueryByComponent = {};
    return Initialization;
}());
exports.Initialization = Initialization;
var LazyInitialization = /** @class */ (function () {
    function LazyInitialization() {
    }
    LazyInitialization.getLazyRegisteredComponent = function (name) {
        return LazyInitialization.lazyLoadedComponents[name]();
    };
    LazyInitialization.getLazyRegisteredModule = function (name) {
        return LazyInitialization.lazyLoadedModule[name]();
    };
    LazyInitialization.registerLazyComponent = function (id, load, aliases) {
        if (LazyInitialization.lazyLoadedComponents[id] == null) {
            Assert_1.Assert.exists(load);
            Eif (!_.contains(Initialization.registeredComponents, id)) {
                Initialization.registeredComponents.push(id);
            }
            LazyInitialization.lazyLoadedComponents[id] = load;
            Iif (aliases) {
                Initialization.componentAliases[id] = aliases;
            }
        }
        else {
            this.logger.warn('Component being registered twice', id);
        }
    };
    LazyInitialization.buildErrorCallback = function (chunkName, resolve) {
        return function (error) {
            LazyInitialization.logger
                .warn("Cannot load chunk for " + chunkName + ". You may need to add the coveo-script class on the script tag that includes the Coveo framework. More details [here](https://docs.coveo.com/en/295/javascript-search-framework/lazy-versus-eager-component-loading#fixing-code-chunks-loading-path-issues).\n        " + error);
            resolve(function () { });
        };
    };
    LazyInitialization.registerLazyModule = function (id, load) {
        Eif (LazyInitialization.lazyLoadedModule[id] == null) {
            Assert_1.Assert.exists(load);
            LazyInitialization.lazyLoadedModule[id] = load;
        }
        else {
            this.logger.warn('Module being registered twice', id);
        }
    };
    LazyInitialization.componentsFactory = function (elements, componentClassId, initParameters) {
        var factory = function () {
            var promises = [];
            _.each(elements, function (matchingElement) {
                Eif (Component_1.Component.get(matchingElement, componentClassId) == null) {
                    // If options were provided, lookup options for this component class and
                    // also for the element id. Merge them and pass those to the factory method.
                    var optionsToUse = void 0;
                    Iif (Utils_1.Utils.exists(initParameters.options)) {
                        var optionsForComponentClass = initParameters.options[componentClassId];
                        var optionsForElementId = initParameters.options[matchingElement.id];
                        var initOptions = initParameters.options['initOptions'] ? initParameters.options['initOptions'][componentClassId] : {};
                        optionsToUse = Utils_1.Utils.extendDeep(optionsForElementId, initOptions);
                        optionsToUse = Utils_1.Utils.extendDeep(optionsForComponentClass, optionsToUse);
                    }
                    var initParamToUse = _.extend({}, initParameters, { options: optionsToUse });
                    promises.push(LazyInitialization.createComponentOfThisClassOnElement(componentClassId, matchingElement, initParamToUse));
                }
            });
            return promises;
        };
        return {
            factory: factory,
            isLazyInit: true
        };
    };
    LazyInitialization.createComponentOfThisClassOnElement = function (componentClassId, element, initParameters) {
        Assert_1.Assert.isNonEmptyString(componentClassId);
        Assert_1.Assert.exists(element);
        // If another component exist on that element, we do not want to re-initialize again.
        // The exception being the "SearchInterface", since in some case we want end user to initialize directly on the root of the interface
        // For example, when we are initializing a standalone search box, we might want to target the div for the search box directly.
        Iif (Initialization.isThereANonSearchInterfaceComponentBoundToThisElement(element)) {
            return null;
        }
        return LazyInitialization.getLazyRegisteredComponent(componentClassId).then(function (lazyLoadedComponent) {
            Assert_1.Assert.exists(lazyLoadedComponent);
            Iif (Initialization.isThereANonSearchInterfaceComponentBoundToThisElement(element)) {
                return null;
            }
            var bindings = {};
            var options = {};
            var result;
            Eif (initParameters != undefined) {
                _.each(initParameters.bindings, function (value, key) {
                    bindings[key] = value;
                });
                options = initParameters.options;
                result = initParameters.result;
            }
            LazyInitialization.logger.trace('Creating component of class ' + componentClassId, element, options);
            return new lazyLoadedComponent(element, options, bindings, result);
        });
    };
    LazyInitialization.logger = new Logger_1.Logger('LazyInitialization');
    // Map of every component to a promise that resolve with their implementation (lazily loaded)
    LazyInitialization.lazyLoadedComponents = {};
    LazyInitialization.lazyLoadedModule = {};
    return LazyInitialization;
}());
exports.LazyInitialization = LazyInitialization;
var EagerInitialization = /** @class */ (function () {
    function EagerInitialization() {
    }
    EagerInitialization.componentsFactory = function (elements, componentClassId, initParameters) {
        var factory = function () {
            _.each(elements, function (matchingElement) {
                if (Component_1.Component.get(matchingElement, componentClassId) == null) {
                    // If options were provided, lookup options for this component class and
                    // also for the element id. Merge them and pass those to the factory method.
                    var optionsToUse = void 0;
                    Eif (Utils_1.Utils.exists(initParameters.options)) {
                        var optionsForComponentClass = initParameters.options[componentClassId];
                        var optionsForElementId = initParameters.options[matchingElement.id];
                        var initOptions = initParameters.options['initOptions'] ? initParameters.options['initOptions'][componentClassId] : {};
                        optionsToUse = Utils_1.Utils.extendDeep(optionsForElementId, initOptions);
                        optionsToUse = Utils_1.Utils.extendDeep(optionsForComponentClass, optionsToUse);
                    }
                    var initParamToUse = _.extend({}, initParameters, { options: optionsToUse });
                    EagerInitialization.createComponentOfThisClassOnElement(componentClassId, matchingElement, initParamToUse);
                }
            });
        };
        return {
            factory: factory,
            isLazyInit: false
        };
    };
    EagerInitialization.createComponentOfThisClassOnElement = function (componentClassId, element, initParameters) {
        Assert_1.Assert.isNonEmptyString(componentClassId);
        Assert_1.Assert.exists(element);
        var eagerlyLoadedComponent = Initialization.getRegisteredComponent(componentClassId);
        var bindings = {};
        var options = {};
        var result;
        Eif (initParameters != undefined) {
            _.each(initParameters.bindings, function (value, key) {
                bindings[key] = value;
            });
            options = initParameters.options;
            result = initParameters.result;
        }
        // If another component exist on that element, we do not want to re-initialize again.
        // The exception being the "SearchInterface", since in some case we want end user to initialize directly on the root of the interface
        // For example, when we are initializing a standalone search box, we might want to target the div for the search box directly.
        if (Initialization.isThereANonSearchInterfaceComponentBoundToThisElement(element)) {
            return null;
        }
        EagerInitialization.logger.trace("Creating component of class " + componentClassId, element, options);
        // This is done so that external code that extends a base component does not have to have two code path for lazy vs eager;
        // If we do not find the eager component registered, we can instead try to load the one found in lazy mode.
        // If it still fails there... tough luck. The component simply won't work.
        if (eagerlyLoadedComponent == null) {
            LazyInitialization.getLazyRegisteredComponent(componentClassId)
                .then(function (lazyLoadedComponent) {
                EagerInitialization.logger.warn("Component of class " + componentClassId + " was not found in \"Eager\" mode. Using lazy mode as a fallback.");
                new lazyLoadedComponent(element, options, bindings, result);
            })
                .catch(function () {
                EagerInitialization.logger.error("Component of class " + componentClassId + " was not found in \"Eager\" mode nor \"Lazy\" mode. It will not be initialized properly...");
            });
            return null;
        }
        else {
            return new eagerlyLoadedComponent(element, options, bindings, result);
        }
    };
    EagerInitialization.logger = new Logger_1.Logger('EagerInitialization');
    // Map of every component with their implementation (eagerly loaded)
    EagerInitialization.eagerlyLoadedComponents = {};
    return EagerInitialization;
}());
exports.EagerInitialization = EagerInitialization;
 
 
/***/ }),
/* 9 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
function __export(m) {
    for (var p in m) Eif (!exports.hasOwnProperty(p)) exports[p] = m[p];
}
Object.defineProperty(exports, "__esModule", { value: true });
// We need a custom trigger function for our Promise polyfill
// because the default one can cause issues in other frameworks that relies on
// their own Promise polyfill like the Salesforce Aura framework.
var promise = window['Promise'];
Iif (!(promise instanceof Function)) {
    __webpack_require__(870);
}
var CoveoUnderscore_1 = __webpack_require__(415);
exports._ = CoveoUnderscore_1.underscoreInstance;
__export(__webpack_require__(464));
__export(__webpack_require__(97));
__export(__webpack_require__(964));
__export(__webpack_require__(109));
__export(__webpack_require__(474));
__export(__webpack_require__(476));
__export(__webpack_require__(477));
__export(__webpack_require__(1081));
__export(__webpack_require__(67));
 
 
/***/ }),
/* 10 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var _ = __webpack_require__(1);
var Logger_1 = __webpack_require__(18);
var Initialization_1 = __webpack_require__(8);
function exportGlobally(toExportGlobally) {
    Iif (window['Coveo'] == undefined) {
        window['Coveo'] = {};
    }
    _.each(_.keys(toExportGlobally), function (key) {
        Iif (window['Coveo'][key] == null) {
            window['Coveo'][key] = toExportGlobally[key];
        }
    });
}
exports.exportGlobally = exportGlobally;
function lazyExport(component, promiseResolve) {
    if (component.doExport) {
        component.doExport();
    }
    else {
        new Logger_1.Logger(this).error("Component " + component + " has no export function !");
    }
    Initialization_1.Initialization.registerAutoCreateComponent(component);
    promiseResolve(component);
}
exports.lazyExport = lazyExport;
function lazyExportModule(mod, promiseResolve) {
    if (mod.doExport) {
        mod.doExport();
    }
    promiseResolve(mod);
}
exports.lazyExportModule = lazyExportModule;
 
 
/***/ }),
/* 11 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var QueryUtils_1 = __webpack_require__(37);
var Assert_1 = __webpack_require__(12);
var MockEnvironment_1 = __webpack_require__(2);
var _ = __webpack_require__(1);
var underscore_1 = __webpack_require__(1);
var FakeResults = /** @class */ (function () {
    function FakeResults() {
    }
    FakeResults.createFakeResults = function (count, token) {
        if (count === void 0) { count = 10; }
        Eif (token === void 0) { token = ''; }
        var results = [];
        for (var i = 0; i < count; ++i) {
            results.push(FakeResults.createFakeResult(token + i.toString()));
        }
        return {
            searchUid: QueryUtils_1.QueryUtils.createGuid(),
            pipeline: 'pipeline',
            splitTestRun: 'splitTestRunName',
            totalCount: count != 0 ? count + 1 : 0,
            totalCountFiltered: count,
            duration: 321,
            indexDuration: 123,
            clientDuration: 456,
            searchAPIDuration: 789,
            results: results,
            groupByResults: [],
            categoryFacets: [],
            queryCorrections: [],
            _folded: undefined,
            termsToHighlight: undefined,
            phrasesToHighlight: undefined,
            triggers: []
        };
    };
    FakeResults.createFakeResultsWithChildResults = function (count, numberOfChildResults, totalNumberOfChildResult) {
        Iif (count === void 0) { count = 10; }
        Iif (numberOfChildResults === void 0) { numberOfChildResults = 5; }
        Iif (totalNumberOfChildResult === void 0) { totalNumberOfChildResult = 5; }
        var results = [];
        for (var i = 0; i < count; ++i) {
            results.push(FakeResults.createFakeResultWithChildResult(i.toString(), numberOfChildResults, totalNumberOfChildResult));
        }
        return {
            searchUid: QueryUtils_1.QueryUtils.createGuid(),
            totalCount: count != 0 ? count + 1 : 0,
            totalCountFiltered: count != 0 ? count + 1 : 0,
            duration: 321,
            indexDuration: 123,
            clientDuration: 456,
            searchAPIDuration: 789,
            results: results,
            groupByResults: [],
            categoryFacets: [],
            queryCorrections: [],
            _folded: undefined,
            termsToHighlight: undefined,
            phrasesToHighlight: undefined,
            triggers: []
        };
    };
    FakeResults.createFakeResult = function (token) {
        if (token === void 0) { token = 'foo'; }
        return {
            title: 'Title' + token,
            titleHighlights: [],
            uri: 'http://uri.' + token + '.com',
            printableUri: 'http://printable.uri.' + token + '.com',
            printableUriHighlights: [],
            clickUri: 'http://click.uri.' + token + '.com',
            uniqueId: 'uniqueId' + token,
            excerpt: 'excerpt' + token,
            excerptHighlights: [],
            firstSentences: 'firstSentences' + token,
            firstSentencesHighlights: [],
            hasHtmlVersion: true,
            hasMobileHtmlVersion: true,
            flags: 'HasThumbnail',
            summary: 'summary' + token,
            summaryHighlights: [],
            rankingInfo: '',
            raw: {
                string: 'string value',
                date: new Date(1980, 2, 11, 8, 30).valueOf(),
                number: 123,
                emails: 'mlaporte@coveo.com;dlavoie@coveo.com',
                empty: '',
                randomNumber: Math.random(),
                urihash: QueryUtils_1.QueryUtils.createGuid(),
                source: 'the source',
                collection: 'the collection',
                author: 'o.o'
            },
            childResults: [],
            termsToHighlight: {},
            phrasesToHighlight: {},
            index: 0,
            queryUid: 'the uid',
            rating: 3,
            state: {},
            isRecommendation: false,
            searchInterface: MockEnvironment_1.mockSearchInterface(),
            absentTerms: []
        };
    };
    FakeResults.createFakeResultWithChildResult = function (token, numberOfChildResult, totalNumberOfChildResult) {
        if (totalNumberOfChildResult === void 0) { totalNumberOfChildResult = 5; }
        var childResults = [];
        for (var i = 0; i < numberOfChildResult; i++) {
            childResults.push(FakeResults.createFakeResult(token + '-child' + i));
        }
        var ret = FakeResults.createFakeResult(token);
        ret.totalNumberOfChildResults = totalNumberOfChildResult;
        ret = _.extend(ret, { childResults: childResults });
        return ret;
    };
    FakeResults.createFakeResultWithAttachments = function (token, numberOfAttachments, attachmentType, flags, attachmentsFlags, withSubAttachments) {
        Iif (token === void 0) { token = 'test'; }
        Iif (numberOfAttachments === void 0) { numberOfAttachments = 3; }
        Eif (attachmentType === void 0) { attachmentType = ['xml', 'pdf', 'txt']; }
        Eif (flags === void 0) { flags = 'HasThumbnail'; }
        Eif (attachmentsFlags === void 0) { attachmentsFlags = ['IsAttachment', 'IsAttachment', 'IsAttachment']; }
        if (withSubAttachments === void 0) { withSubAttachments = false; }
        var fake = FakeResults.createFakeResult(token);
        fake.flags = flags;
        if (withSubAttachments) {
            var subAttachments = [];
            for (var i = 0; i < numberOfAttachments; i++) {
                subAttachments.push(FakeResults.createFakeResultWithAttachments('test1', 3, undefined, undefined, undefined, false));
            }
            fake.attachments = subAttachments;
        }
        else {
            fake.attachments = FakeResults.createFakeResults(numberOfAttachments).results;
        }
        _.each(attachmentType, function (type, index, list) {
            if (fake.attachments[index] != undefined) {
                fake.attachments[index].raw['filetype'] = type;
            }
        });
        _.each(attachmentsFlags, function (flag, index, list) {
            if (fake.attachments[index] != undefined) {
                fake.attachments[index].flags = flag;
            }
        });
        return fake;
    };
    FakeResults.createFakeGroupByResult = function (field, token, count, includeComputedValues) {
        Assert_1.Assert.isNonEmptyString(field);
        Assert_1.Assert.isNonEmptyString(token);
        Assert_1.Assert.isLargerOrEqualsThan(0, count);
        var groupByValues = [];
        for (var i = 0; i < count; ++i) {
            groupByValues.push(FakeResults.createFakeGroupByValue(token + i.toString(), i + 1, 100 + i, includeComputedValues ? 1000 + i : undefined));
        }
        return {
            field: field,
            values: groupByValues
        };
    };
    FakeResults.createFakeRangeGroupByResult = function (field, start, end, steps) {
        Iif (start === void 0) { start = 1; }
        Iif (end === void 0) { end = 100; }
        Iif (steps === void 0) { steps = 25; }
        var groupByValues = [];
        for (var i = start; i <= end; i += steps) {
            groupByValues.push(FakeResults.createFakeGroupByRangeValue(i, i + (steps - 1), 'foobar' + i.toString(), i));
        }
        return {
            field: field,
            values: groupByValues
        };
    };
    FakeResults.createFakeHierarchicalValue = function (token, currentLevel, delimitingCharacter) {
        Eif (delimitingCharacter === void 0) { delimitingCharacter = '|'; }
        var value = "level:" + currentLevel.toString() + "--value:" + token;
        if (currentLevel != 0) {
            for (var i = currentLevel - 1; i >= 0; i--) {
                value = "level:" + i.toString() + "--value:" + token + delimitingCharacter + value;
            }
        }
        return value;
    };
    FakeResults.createFakeHierarchicalGroupByResult = function (field, token, numberOfLevel, countByLevel, delimitingCharacter, includeComputedValues, weirdCasing) {
        if (numberOfLevel === void 0) { numberOfLevel = 2; }
        if (countByLevel === void 0) { countByLevel = 3; }
        if (delimitingCharacter === void 0) { delimitingCharacter = '|'; }
        if (includeComputedValues === void 0) { includeComputedValues = false; }
        if (weirdCasing === void 0) { weirdCasing = true; }
        var groupByValues = [];
        // i == level
        for (var i = 0; i < numberOfLevel; ++i) {
            // j == values on current level
            for (var j = 0; j < countByLevel; j++) {
                var currentValue = FakeResults.createFakeHierarchicalValue("" + token + j.toString(), i);
                Eif (weirdCasing) {
                    currentValue = _.map(currentValue.split(delimitingCharacter), function (value, k) {
                        return (i + j + k) % 2 == 0 ? value.toLowerCase() : value.toUpperCase();
                    }).join(delimitingCharacter);
                }
                var currentGroupByValue = FakeResults.createFakeGroupByValue(currentValue, j + 1, 100, includeComputedValues ? 1000 : undefined);
                groupByValues.push(currentGroupByValue);
            }
        }
        return {
            field: field,
            values: groupByValues
        };
    };
    FakeResults.createFakeGroupByValue = function (token, count, score, computedValue) {
        Assert_1.Assert.isNonEmptyString(token);
        return {
            value: token,
            lookupValue: token,
            numberOfResults: count,
            score: score || count * 2,
            computedFieldResults: computedValue ? [computedValue] : undefined
        };
    };
    FakeResults.createFakeGroupByRangeValue = function (from, to, token, count, score, computedValue) {
        return {
            value: from + '..' + to,
            lookupValue: token,
            numberOfResults: count,
            score: score || count * 2,
            computedFieldResults: computedValue ? [computedValue] : undefined
        };
    };
    FakeResults.createFakeCategoryFacetResult = function (field, path, token, numberOfValues) {
        if (token === void 0) { token = 'value'; }
        if (numberOfValues === void 0) { numberOfValues = 10; }
        Assert_1.Assert.isNonEmptyString(field);
        return {
            field: field,
            values: underscore_1.range(0, numberOfValues).map(function (number) {
                return { value: token + number, numberOfResults: 5 };
            }),
            parentValues: underscore_1.range(0, numberOfValues).map(function (number) {
                return { value: 'parent' + number, numberOfResults: number + 250 * number };
            })
        };
    };
    FakeResults.createFakeFieldValue = function (token, count) {
        Assert_1.Assert.isNonEmptyString(token);
        return {
            value: token,
            lookupValue: token,
            numberOfResults: count
        };
    };
    FakeResults.createFakeFieldValues = function (token, count) {
        Assert_1.Assert.isNonEmptyString(token);
        Assert_1.Assert.isLargerOrEqualsThan(0, count);
        var fieldValues = [];
        for (var i = 0; i < count; ++i) {
            fieldValues.push(FakeResults.createFakeFieldValue(token + i.toString(), i + 1));
        }
        return fieldValues;
    };
    FakeResults.createFakeFeedItemResult = function (token, nbLikes, nbTopics, hasAttachment) {
        if (nbLikes === void 0) { nbLikes = 0; }
        if (nbTopics === void 0) { nbTopics = 0; }
        if (hasAttachment === void 0) { hasAttachment = false; }
        var result = this.createFakeResult(token);
        result.raw.sfparentid = 'parentid';
        result.raw.sfparentname = 'parentname';
        result.raw.sffeeditemid = token + 'id';
        result.clickUri = 'myURI/' + result.raw.sffeeditemid;
        result.raw.sfcreatedby = 'createdby';
        result.raw.sfcreatedbyname = 'createdby';
        result.raw.sfcreatedbyid = 'createdbyid';
        result.raw.sfinsertedbyid = 'createdbyid';
        // Generate likes
        if (nbLikes > 0) {
            result.raw.sflikecount = nbLikes;
            result.raw.sflikedby = '';
            result.raw.sflikedbyid = '';
            for (var i = 1; i <= nbLikes; i++) {
                result.raw.sflikedby += 'LikeName' + i;
                result.raw.sflikedbyid += 'LikeId' + i;
                if (i != nbLikes) {
                    result.raw.sflikedby += ';';
                    result.raw.sflikedbyid += ';';
                }
            }
        }
        // Generate topics
        Iif (nbTopics > 0) {
            result.raw.coveochatterfeedtopics = '';
            for (var i = 1; i <= nbTopics; i++) {
                result.raw.coveochatterfeedtopics += 'topic' + i;
                if (i != nbTopics) {
                    result.raw.coveochatterfeedtopics += ';';
                }
            }
        }
        // Generate post attachment
        if (hasAttachment) {
            result.raw.coveochatterfeedtopics = 'PostAttachment';
            result.raw.sfcontentfilename = 'fileName';
            result.raw.sftitle = 'fileName';
            result.raw.sf_title = 'fileName';
            result.raw.sfcontentversionid = token;
        }
        return result;
    };
    FakeResults.createFakeSearchEvent = function (token) {
        Eif (token === void 0) { token = 'foo'; }
        return {
            actionCause: token + 'actionCause',
            actionType: token + 'actionType',
            device: token + 'device',
            mobile: false,
            originLevel1: token + 'originLevel1',
            originLevel2: token + 'originLevel2',
            originContext: 'context',
            language: token + 'language',
            responseTime: 0,
            searchQueryUid: token + 'searchQueryUid',
            queryPipeline: token + 'queryPipeline',
            splitTestRunName: token + 'splitTestRunName',
            splitTestRunVersion: token + 'splitTestRunVersion',
            queryText: token + 'queryText',
            numberOfResults: 0,
            resultsPerPage: 0,
            pageNumber: 0,
            advancedQuery: token + 'advancedQuery',
            didYouMean: false,
            contextual: false,
            clientId: token + 'clientId'
        };
    };
    FakeResults.createFakeClickEvent = function (token) {
        if (token === void 0) { token = 'foo'; }
        return {
            actionCause: token + 'actionCause',
            actionType: token + 'actionType',
            device: token + 'device',
            mobile: false,
            originLevel1: token + 'originLevel1',
            originLevel2: token + 'originLevel2',
            originContext: 'context',
            language: token + 'language',
            responseTime: 0,
            searchQueryUid: token + 'searchQueryUid',
            queryPipeline: token + 'queryPipeline',
            splitTestRunName: token + 'splitTestRunName',
            splitTestRunVersion: token + 'splitTestRunVersion',
            documentUri: token + 'documentUri',
            documentUriHash: token + 'documentUriHash',
            documentUrl: token + 'documentUrl',
            documentTitle: token + 'documentTitle',
            documentCategory: token + 'documentCategory',
            collectionName: token + 'collectionName',
            sourceName: token + 'sourceName',
            documentPosition: 0,
            viewMethod: token + 'viewMethod',
            rankingModifier: token + 'rankingModifier',
            clientId: token + 'clientId'
        };
    };
    FakeResults.createPopulateOmniboxEventArgs = function (queryboxContent, cursorPosition, rows) {
        Eif (rows === void 0) { rows = []; }
        return {
            completeQueryExpression: { word: queryboxContent, regex: new RegExp(queryboxContent, 'gi') },
            allQueryExpressions: undefined,
            currentQueryExpression: { word: queryboxContent, regex: new RegExp(queryboxContent, 'gi') },
            cursorPosition: cursorPosition,
            rows: [],
            clear: function () { },
            clearCurrentExpression: function () { },
            closeOmnibox: function () { },
            insertAt: function () { },
            replace: function () { },
            replaceCurrentExpression: function () { }
        };
    };
    FakeResults.createRankingInfoNoKeywords = function () {
        return "Document weights:\n    Title: 0; Quality: 180; Date: 405; Adjacency: 0; Source: 500; Custom: 400; Collaborative rating: 0; QRE: 890; Ranking functions: 0;\n\n    Total weight: 2375";
    };
    FakeResults.createRankingInfoWithKeywords = function () {
        return "Document weights:\nTitle: 800; Quality: 180; Date: 101; Adjacency: 0; Source: 500; Custom: 350; Collaborative rating: 0; QRE: 2500; Ranking functions: 0; \n\nTerms weights:\ntest: 100, 26; \nTitle: 800; Concept: 0; Summary: 300; URI: 500; Formatted: 0; Casing: 0; Relation: 200; Frequency: 1744; \n\nTotal weight: 7975";
    };
    FakeResults.createRankingInforWithQRE = function () {
        return "Document weights:\nTitle: 0; Quality: 180; Date: 0; Adjacency: 0; Source: 500; Custom: 350; Collaborative rating: 0; QRE: 2500; Ranking functions: 0; \nQRE:\nExpression: \"@permanentid=95ad18de4cb8e17023f0224e9d44dd2f7177c6dceac6cb81b16f3659a3c3\" Score: 2500\nExpression: \"@permanentid=4119a14f02a63d0c2d92b51d4501dd83580831caea327179934dd1bc6645\" Score: -1000\nExpression: \"@permanentid=39ce64557bee624c368c6cfe736787f1dd22667f43a9f3e46fafa67158d6\" Score: 0\nExpression: \"@permanentid=0d4e5fe9dca91c13d9de061c0c00d1a2733e0a1c0e198c588c2b93cfcd25\" Score: 0\nExpression: \"@permanentid=c612db560ef1f77316b6c11fbedfa3e9b728e09859a188639911aef9e6ea\" Score: 0\nRanking Functions:\n\nTotal weight: 3530";
    };
    FakeResults.createFieldDescription = function () {
        return {
            name: 'foo',
            type: 'String',
            splitGroupByField: false,
            groupByField: true,
            sortByField: true,
            includeInResults: true,
            includeInQuery: true,
            fieldType: 'String',
            fieldSourceType: null,
            defaultValue: null,
            description: 'a description'
        };
    };
    FakeResults.createFakePlanResponse = function () {
        return {
            preprocessingOutput: {
                triggers: [{ type: 'redirect', content: 'https://www.coveo.com/fr/solutions/commerce' }]
            },
            parsedInput: {
                basicExpression: 'commerce',
                largeExpression: 'coveo commerce solutions'
            }
        };
    };
    return FakeResults;
}());
exports.FakeResults = FakeResults;
 
 
/***/ }),
/* 12 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
var Logger_1 = __webpack_require__(18);
var Utils_1 = __webpack_require__(5);
var _ = __webpack_require__(1);
var Assert = /** @class */ (function () {
    function Assert() {
    }
    Assert.fail = function (message) {
        Assert.failureHandler(message);
    };
    Assert.check = function (condition, message) {
        if (!condition) {
            Assert.fail(message);
        }
    };
    Assert.isUndefined = function (obj) {
        Assert.check(Utils_1.Utils.isUndefined(obj), 'Value should be undefined.');
    };
    Assert.isNotUndefined = function (obj) {
        Assert.check(!Utils_1.Utils.isUndefined(obj), 'Value should not be undefined.');
    };
    Assert.isNull = function (obj) {
        Assert.check(Utils_1.Utils.isNull(obj), 'Value should be null.');
    };
    Assert.isNotNull = function (obj) {
        Assert.check(!Utils_1.Utils.isNull(obj), 'Value should not be null.');
    };
    Assert.exists = function (obj) {
        Assert.check(!Utils_1.Utils.isNullOrUndefined(obj), 'Value should not be null or undefined');
    };
    Assert.doesNotExists = function (obj) {
        Assert.check(Utils_1.Utils.isNullOrUndefined(obj), 'Value should be null or undefined');
    };
    Assert.isString = function (obj) {
        Assert.check(_.isString(obj), 'Value should be a string.');
    };
    Assert.stringStartsWith = function (str, start) {
        Assert.isNonEmptyString(str);
        Assert.isNonEmptyString(start);
        Assert.check(str.indexOf(start) == 0, 'Value should start with ' + start);
    };
    Assert.isNonEmptyString = function (str) {
        Assert.check(Utils_1.Utils.isNonEmptyString(str), 'Value should be a non-empty string.');
    };
    Assert.isNumber = function (obj) {
        Assert.check(_.isNumber(obj), 'Value should be a number.');
    };
    Assert.isLargerThan = function (expected, actual) {
        Assert.check(actual > expected, 'Value ' + actual + ' should be larger than ' + expected);
    };
    Assert.isLargerOrEqualsThan = function (expected, actual) {
        Assert.check(actual >= expected, 'Value ' + actual + ' should be larger or equal than ' + expected);
    };
    Assert.isSmallerThan = function (expected, actual) {
        Assert.check(actual < expected, 'Value ' + actual + ' should be smaller than ' + expected);
    };
    Assert.isSmallerOrEqualsThan = function (expected, actual) {
        Assert.check(actual <= expected, 'Value ' + actual + ' should be smaller or equal than ' + expected);
    };
    Assert.logger = new Logger_1.Logger('Assert');
    Assert.failureHandler = function (message) {
        Assert.logger.error('Assertion Failed!', message);
        Eif (window['console'] && console.trace) {
            console.trace();
        }
        if (Utils_1.Utils.isNonEmptyString(message)) {
            throw new PreconditionFailedException(message);
        }
        else {
            throw new PreconditionFailedException('Assertion Failed!');
        }
    };
    return Assert;
}());
exports.Assert = Assert;
var PreconditionFailedException = /** @class */ (function (_super) {
    __extends(PreconditionFailedException, _super);
    function PreconditionFailedException(message) {
        var _this = _super.call(this, message) || this;
        _this.message = message;
        return _this;
    }
    PreconditionFailedException.prototype.toString = function () {
        return this.message;
    };
    return PreconditionFailedException;
}(Error));
exports.PreconditionFailedException = PreconditionFailedException;
 
 
/***/ }),
/* 13 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var underscore_1 = __webpack_require__(1);
var Assert_1 = __webpack_require__(12);
var Logger_1 = __webpack_require__(18);
var Dom_1 = __webpack_require__(0);
var SVGIcons_1 = __webpack_require__(16);
var Utils_1 = __webpack_require__(5);
var ComponentOptionsLoader_1 = __webpack_require__(479);
var ComponentOptionsMerger_1 = __webpack_require__(480);
var ComponentOptionsPostProcessor_1 = __webpack_require__(481);
var ComponentOptionsValidator_1 = __webpack_require__(482);
var IComponentOptions_1 = __webpack_require__(115);
var TemplateComponentOptions_1 = __webpack_require__(89);
var camelCaseToHyphenRegex = /([A-Z])|\W+(\w)/g;
var fieldsSeperator = /\s*,\s*/;
var localizer = /([a-zA-Z\-]+)\s*:\s*(([^,]|,\s*(?!([a-zA-Z\-]+)\s*:))+)/g;
/**
 * The `ComponentOptions` static class contains methods allowing the Coveo JavaScript Search Framework to initialize
 * component options.
 *
 * Typically, each [`Component`]{@link Component} that exposes a set of options contains a static `options` property.
 *
 * This property "builds" each option using the `ComponentOptions` method corresponding to its type (e.g.,
 * [`buildBooleanOption`]{@link ComponentOptions.buildBooleanOption},
 * [`buildFieldOption`]{@link ComponentOptions.buildFieldOption},
 * [`buildStringOption`]{@link ComponentOptions.buildStringOption}, etc.)
 */
var ComponentOptions = /** @class */ (function () {
    function ComponentOptions() {
    }
    ComponentOptions.buildTemplateOption = function (optionArgs) {
        return TemplateComponentOptions_1.TemplateComponentOptions.buildTemplateOption(optionArgs);
    };
    /**
     * Builds a boolean option.
     *
     * **Markup Examples:**
     *
     * > `data-foo="true"`
     *
     * > `data-foo="false"`
     *
     * @param optionArgs The arguments to apply when building the option.
     * @returns {boolean} The resulting option value.
     */
    ComponentOptions.buildBooleanOption = function (optionArgs) {
        return ComponentOptions.buildOption(IComponentOptions_1.ComponentOptionsType.BOOLEAN, ComponentOptions.loadBooleanOption, optionArgs);
    };
    /**
     * Builds a number option.
     *
     * A number option can be an integer or a float in the markup.
     *
     * **Note:**
     *
     * > To build a float option, you need to set the `float` property in the [`IComponentOptionsNumberOptionArgs`]{@link IComponentOptionsNumberOptionArgs} to `true`.
     *
     * **Markup Examples:**
     *
     * > `data-foo="3"`
     *
     * > `data-foo="1.5"`
     *
     * @param optionArgs The arguments to apply when building the option.
     * @returns {number} The resulting option value.
     */
    ComponentOptions.buildNumberOption = function (optionArgs) {
        return ComponentOptions.buildOption(IComponentOptions_1.ComponentOptionsType.NUMBER, ComponentOptions.loadNumberOption, optionArgs);
    };
    /**
     * Builds a string option.
     *
     * A string option can be any arbitrary string in the markup.
     *
     * **Markup Example:**
     *
     * > `data-foo="bar"`
     *
     * @param optionArgs The arguments to apply when building the option.
     * @returns {string} The resulting option value.
     */
    ComponentOptions.buildStringOption = function (optionArgs) {
        return ComponentOptions.buildOption(IComponentOptions_1.ComponentOptionsType.STRING, ComponentOptions.loadStringOption, optionArgs);
    };
    /**
     * Builds an icon option.
     *
     * This takes an SVG icon name, validates it and returns the name of the icon.
     * **Markup Examples:**
     *
     * > `data-foo="search"`
     *
     * > `data-foo="facet-expand"`
     *
     * @param optionArgs The arguments to apply when building the option.
     * @returns {string} The resulting option value.
     */
    ComponentOptions.buildIconOption = function (optionArgs) {
        return ComponentOptions.buildOption(IComponentOptions_1.ComponentOptionsType.ICON, ComponentOptions.loadIconOption, optionArgs);
    };
    /**
     * Builds a color option.
     *
     * Normally, this simply builds a string that matches a CSS color.
     *
     * **Note:**
     *
     * > In the markup, this offers no advantage over using a plain string. This is mostly useful for the Coveo JavaScript
     * > Interface Editor.
     *
     * **Markup Examples:**
     *
     * > `data-foo="coveo-sprites-user"`
     *
     * > `data-foo="coveo-sprites-database"`
     *
     * @param optionArgs The arguments to apply when building the option.
     * @returns {string} The resulting option value.
     */
    ComponentOptions.buildColorOption = function (optionArgs) {
        return ComponentOptions.buildOption(IComponentOptions_1.ComponentOptionsType.COLOR, ComponentOptions.loadStringOption, optionArgs);
    };
    /**
     * Builds a helper option.
     *
     * Normally, this simply builds a string that matches the name of a template helper.
     *
     * **Note:**
     *
     * > In the markup, this offers no advantage over using a plain string. This is mostly useful for the Coveo JavaScript
     * > Interface Editor.
     *
     * **Markup Examples:**
     *
     * > `data-foo="date"`
     *
     * > `data-foo="dateTime"`
     *
     * @param optionArgs The arguments to apply when building the option.
     * @returns {string} The resulting option value.
     */
    ComponentOptions.buildHelperOption = function (optionArgs) {
        return ComponentOptions.buildOption(IComponentOptions_1.ComponentOptionsType.HELPER, ComponentOptions.loadStringOption, optionArgs);
    };
    /**
     * Tries to parse a stringified JSON option.
     *
     * If unsuccessful (because of invalid syntax), the JSON option is ignored altogether, and the console displays a warning message.
     *
     * **Markup Example:**
     *
     * > `data-foo='{"bar" : "baz"}'`
     *
     * **Note:**
     *
     * A JSON option can always be set as a property in the `init` call of the framework rather than as a `data-` property in the corresponding HTMLElement markup.
     *
     * **Initialization Example:**
     *
     * ```
     * Coveo.init(root, {
     *   Facet : {
     *     foo : {
     *       "bar" : "baz"
     *     }
     *   }
     * })
     * ```
     * @param optionArgs The arguments to apply when building the option.
     * @returns {T} The resulting option value.
     */
    ComponentOptions.buildJsonOption = function (optionArgs) {
        return ComponentOptions.buildOption(IComponentOptions_1.ComponentOptionsType.JSON, ComponentOptions.loadJsonObjectOption, optionArgs);
    };
    /**
     * @deprecated Use buildJsonOption instead
     *
     * @deprecatedsince [2017 Javascript Search Framework Releases](https://docs.coveo.com/en/373/#december-2017-release-v236794)
     */
    ComponentOptions.buildJsonObjectOption = function (optionArgs) {
        return ComponentOptions.buildJsonOption(optionArgs);
    };
    /**
     * Builds a localized string option.
     *
     * A localized string option can be any arbitrary string.
     *
     * When parsing the value, the Coveo JavaScript Search Framework tries to load the localization for that string, if it
     * is available.
     *
     * If it is not available, it returns the non-localized value.
     *
     * This should be used for options that will be rendered directly to the end users.
     *
     * **Markup Example:**
     *
     * > `data-foo="bar"`
     *
     * @param optionArgs The arguments to apply when building the option.
     * @returns {string} The resulting option value.
     */
    ComponentOptions.buildLocalizedStringOption = function (optionArgs) {
        return ComponentOptions.buildOption(IComponentOptions_1.ComponentOptionsType.LOCALIZED_STRING, ComponentOptions.loadLocalizedStringOption, optionArgs);
    };
    /**
     * Builds a field option.
     *
     * A field option validates whether the field has a valid name. This means that the string must start with the `@`
     * character.
     *
     * **Markup Example:**
     *
     * > `data-foo="@bar"`
     *
     * @param optionArgs The arguments to apply when building the option.
     * @returns {string} The resulting option value.
     */
    ComponentOptions.buildFieldOption = function (optionArgs) {
        return ComponentOptions.buildOption(IComponentOptions_1.ComponentOptionsType.FIELD, ComponentOptions.loadFieldOption, optionArgs);
    };
    /**
     * Builds an array of fields option.
     *
     * As with all options that expect an array, you should use commas to delimit the different values.
     *
     * **Markup Example:**
     *
     * > `data-foo="@bar,@baz"`
     *
     * @param optionArgs The arguments to apply when building the option.
     * @returns {string[]} The resulting option value.
     */
    ComponentOptions.buildFieldsOption = function (optionArgs) {
        return ComponentOptions.buildOption(IComponentOptions_1.ComponentOptionsType.FIELDS, ComponentOptions.loadFieldsOption, optionArgs);
    };
    /**
     * Builds a query expression option.
     *
     * The query expression option should follow the [Coveo Cloud Query Syntax Reference](https://docs.coveo.com/en/1552/).
     *
     * **Markup Example:**
     *
     * > `data-foo="@bar==baz"`
     *
     * @param optionArgs The arguments to apply when building the option.
     * @returns {IQueryExpression} The resulting option value.
     */
    ComponentOptions.buildQueryExpressionOption = function (optionArgs) {
        return ComponentOptions.buildOption(IComponentOptions_1.ComponentOptionsType.QUERY_EXPRESSION, ComponentOptions.loadStringOption, optionArgs);
    };
    /**
     * Builds an array of strings option.
     *
     * As with all options that expect an array, you should use commas to delimit the different values.
     *
     * **Markup Example:**
     *
     * > `data-foo="bar,baz"`
     *
     * @param optionArgs The arguments to apply when building the option.
     * @returns {string[]} The resulting option value.
     */
    ComponentOptions.buildListOption = function (optionArgs) {
        return ComponentOptions.buildOption(IComponentOptions_1.ComponentOptionsType.LIST, ComponentOptions.loadListOption, optionArgs);
    };
    /**
     * Builds an option that allow to select an HTMLElement.
     *
     * The option accepts a CSS selector matching the required HTMLElement. This selector can either be a class, or an ID
     * selector.
     *
     * **Markup Examples:**
     *
     * > `data-foo-selector=".bar"`
     *
     * > `data-foo-selector="#bar"`
     *
     * @param optionArgs The arguments to apply when building the option.
     * @returns {HTMLElement} The resulting option value.
     */
    ComponentOptions.buildSelectorOption = function (optionArgs) {
        return ComponentOptions.buildOption(IComponentOptions_1.ComponentOptionsType.SELECTOR, ComponentOptions.loadSelectorOption, optionArgs);
    };
    ComponentOptions.buildChildHtmlElementOption = function (optionArgs) {
        return ComponentOptions.buildOption(IComponentOptions_1.ComponentOptionsType.CHILD_HTML_ELEMENT, ComponentOptions.loadChildHtmlElementOption, optionArgs);
    };
    ComponentOptions.buildCustomOption = function (converter, optionArgs) {
        var loadOption = function (element, name, option) {
            var stringvalue = ComponentOptions.loadStringOption(element, name, option);
            if (!Utils_1.Utils.isNullOrEmptyString(stringvalue)) {
                return converter(stringvalue);
            }
        };
        return ComponentOptions.buildOption(IComponentOptions_1.ComponentOptionsType.STRING, loadOption, optionArgs);
    };
    ComponentOptions.buildCustomListOption = function (converter, optionArgs) {
        var loadOption = function (element, name, option) {
            var stringvalue = ComponentOptions.loadListOption(element, name, option);
            return converter(stringvalue);
        };
        return ComponentOptions.buildOption(IComponentOptions_1.ComponentOptionsType.LIST, loadOption, optionArgs);
    };
    ComponentOptions.buildObjectOption = function (optionArgs) {
        var loadOption = function (element, name, option) {
            var extractedKeys = underscore_1.keys(optionArgs.subOptions);
            var scopedOptions = {};
            var scopedValues = {};
            for (var i = 0; i < extractedKeys.length; i++) {
                var key = extractedKeys[i];
                var scopedkey = ComponentOptions.mergeCamelCase(name, key);
                scopedOptions[scopedkey] = optionArgs.subOptions[key];
            }
            ComponentOptions.initOptions(element, scopedOptions, scopedValues, '');
            var resultValues = {};
            var resultFound = false;
            for (var i = 0; i < extractedKeys.length; i++) {
                var key = extractedKeys[i];
                var scopedkey = ComponentOptions.mergeCamelCase(name, key);
                if (scopedValues[scopedkey] != null) {
                    resultValues[key] = scopedValues[scopedkey];
                    resultFound = true;
                }
            }
            return resultFound ? resultValues : null;
        };
        return ComponentOptions.buildOption(IComponentOptions_1.ComponentOptionsType.OBJECT, loadOption, optionArgs);
    };
    /**
     * Builds a field condition option.
     *
     * A field condition option defines a field-based condition that must be dynamically evaluated against,
     * and satisfied by a query result item in order to initialize a result template component.
     *
     * **Markup Example:**
     *
     * ```html
     * data-condition-field-author="Alice Smith, Bob Jones"
     * data-condition-field-not-filetype="pdf"`
     * ```
     *
     * @returns {string} The resulting option value.
     */
    ComponentOptions.buildFieldConditionOption = function () {
        return ComponentOptions.buildOption(IComponentOptions_1.ComponentOptionsType.FIELD, ComponentOptions.loadFieldConditionOption);
    };
    ComponentOptions.buildOption = function (type, load, optionArg) {
        if (optionArg === void 0) { optionArg = {}; }
        var option = optionArg;
        option.type = type;
        option.load = load;
        return option;
    };
    ComponentOptions.attrNameFromName = function (name, optionArgs) {
        if (optionArgs && optionArgs.attrName) {
            return optionArgs.attrName;
        }
        if (name) {
            return 'data-' + ComponentOptions.camelCaseToHyphen(name);
        }
        return name;
    };
    ComponentOptions.camelCaseToHyphen = function (name) {
        return name.replace(camelCaseToHyphenRegex, '-$1$2').toLowerCase();
    };
    ComponentOptions.mergeCamelCase = function (parent, name) {
        return parent + name.substr(0, 1).toUpperCase() + name.substr(1);
    };
    /**
     * Loads and parses the options of the current element.
     *
     * Each component calls this method in its constructor.
     *
     * @param element The element whose markup options the method should load and parse.
     * @param component The class of the component whose options the method should load and parse (e.g., `Searchbox`,
     * `Facet`, etc.)
     * @param values The additional options which the method should merge with the specified markup option values.
     */
    ComponentOptions.initComponentOptions = function (element, component, values) {
        return ComponentOptions.initOptions(element, component.options, values, component.ID);
    };
    ComponentOptions.initOptions = function (element, options, values, componentID) {
        if (values === void 0) { values = {}; }
        if (Utils_1.Utils.isNullOrUndefined(values)) {
            values = {};
        }
        underscore_1.each(options, function (optionDefinition, name) {
            var value = new ComponentOptionsLoader_1.ComponentOptionLoader(element, values, name, optionDefinition).load();
            new ComponentOptionsMerger_1.ComponentOptionsMerger(optionDefinition, { value: value, name: name }, values).merge();
            new ComponentOptionsValidator_1.ComponentOptionsValidator(optionDefinition, { componentID: componentID, name: name, value: value }, values).validate();
        });
        new ComponentOptionsPostProcessor_1.ComponentOptionsPostProcessor(options, values, componentID).postProcess();
        return values;
    };
    ComponentOptions.tryLoadFromAttribute = function (element, name, optionDefinition) {
        var loadFromAttribute = optionDefinition.load;
        if (!loadFromAttribute) {
            return null;
        }
        return loadFromAttribute(element, name, optionDefinition);
    };
    ComponentOptions.loadStringOption = function (element, name, option) {
        return element.getAttribute(ComponentOptions.attrNameFromName(name, option)) || ComponentOptions.getAttributeFromAlias(element, option);
    };
    ComponentOptions.loadIconOption = function (element, name, option) {
        var svgIconName = ComponentOptions.loadStringOption(element, name, option);
        Eif (svgIconName == null) {
            return null;
        }
        // Old card templates icons used these values as the icon option. These names have changed since we moved to SVG.
        // This avoids breaking old default templates that people may still have after moving to 2.0.
        svgIconName = svgIconName.replace('coveo-sprites-replies', 'replies');
        svgIconName = svgIconName.replace('coveo-sprites-main-search-active', 'search');
        if (Utils_1.Utils.isNullOrUndefined(SVGIcons_1.SVGIcons.icons[svgIconName])) {
            new Logger_1.Logger(element).warn("Icon with name " + svgIconName + " not found.");
            return null;
        }
        svgIconName = Utils_1.Utils.toCamelCase(svgIconName);
        return svgIconName;
    };
    ComponentOptions.loadFieldOption = function (element, name, option) {
        var field = ComponentOptions.loadStringOption(element, name, option);
        Assert_1.Assert.check(!Utils_1.Utils.isNonEmptyString(field) || Utils_1.Utils.isCoveoField(field), field + ' is not a valid field');
        return field;
    };
    ComponentOptions.loadFieldConditionOption = function (element, name, option) {
        var attrs = Dom_1.Dom.nodeListToArray(element.attributes).filter(function (attribute) {
            return Utils_1.Utils.stringStartsWith(attribute.nodeName, 'data-condition-field-');
        });
        return attrs.length != 0
            ? attrs.map(function (attribute) { return ({
                field: attribute.nodeName.replace('data-condition-field-not-', '').replace('data-condition-field-', ''),
                values: Utils_1.Utils.isNonEmptyString(attribute.nodeValue) ? attribute.nodeValue.split(/\s*,\s*/) : null,
                reverseCondition: attribute.nodeName.indexOf('data-condition-field-not-') == 0
            }); })
            : undefined;
    };
    ComponentOptions.loadFieldsOption = function (element, name, option) {
        var fieldsAttr = ComponentOptions.loadStringOption(element, name, option);
        if (fieldsAttr == null) {
            return null;
        }
        var fields = fieldsAttr.split(fieldsSeperator);
        underscore_1.each(fields, function (field) {
            Assert_1.Assert.check(Utils_1.Utils.isCoveoField(field), field + ' is not a valid field');
        });
        return fields;
    };
    ComponentOptions.loadLocalizedStringOption = function (element, name, option) {
        var attributeValue = ComponentOptions.loadStringOption(element, name, option);
        var locale = String['locale'] || String['defaultLocale'];
        if (locale != null && attributeValue != null) {
            var localeParts_1 = locale.toLowerCase().split('-');
            var locales = underscore_1.map(localeParts_1, function (part, i) { return localeParts_1.slice(0, i + 1).join('-'); });
            var localizers = attributeValue.match(localizer);
            if (localizers != null) {
                for (var i = 0; i < localizers.length; i++) {
                    var groups = localizer.exec(localizers[i]);
                    Eif (groups != null) {
                        var lang = groups[1].toLowerCase();
                        Eif (underscore_1.contains(locales, lang)) {
                            return groups[2].replace(/^\s+|\s+$/g, '');
                        }
                    }
                }
            }
            return attributeValue != null ? attributeValue.toLocaleString() : null;
        }
        return attributeValue;
    };
    ComponentOptions.loadNumberOption = function (element, name, option) {
        var attributeValue = ComponentOptions.loadStringOption(element, name, option);
        if (attributeValue == null) {
            return null;
        }
        var numberValue = option.float === true ? Utils_1.Utils.parseFloatIfNotUndefined(attributeValue) : Utils_1.Utils.parseIntIfNotUndefined(attributeValue);
        if (option.min != null && option.min > numberValue) {
            new Logger_1.Logger(element).info("Value for option " + name + " is less than the possible minimum (Value is " + numberValue + ", minimum is " + option.min + "). It has been forced to its minimum value.", option);
            numberValue = option.min;
        }
        if (option.max != null && option.max < numberValue) {
            new Logger_1.Logger(element).info("Value for option " + name + " is higher than the possible maximum (Value is " + numberValue + ", maximum is " + option.max + "). It has been forced to its maximum value.", option);
            numberValue = option.max;
        }
        return numberValue;
    };
    ComponentOptions.loadBooleanOption = function (element, name, option) {
        return Utils_1.Utils.parseBooleanIfNotUndefined(ComponentOptions.loadStringOption(element, name, option));
    };
    ComponentOptions.loadListOption = function (element, name, option) {
        var separator = option.separator || /\s*,\s*/;
        var attributeValue = ComponentOptions.loadStringOption(element, name, option);
        return Utils_1.Utils.isNonEmptyString(attributeValue) ? attributeValue.split(separator) : null;
    };
    ComponentOptions.loadEnumOption = function (element, name, option, _enum) {
        var enumAsString = ComponentOptions.loadStringOption(element, name, option);
        return enumAsString != null ? _enum[enumAsString] : null;
    };
    ComponentOptions.loadJsonObjectOption = function (element, name, option) {
        var jsonAsString = ComponentOptions.loadStringOption(element, name, option);
        if (jsonAsString == null) {
            return null;
        }
        try {
            return JSON.parse(jsonAsString);
        }
        catch (exception) {
            new Logger_1.Logger(element).info("Value for option " + name + " is not a valid JSON string (Value is " + jsonAsString + "). It has been disabled.", exception);
            return null;
        }
    };
    ComponentOptions.loadSelectorOption = function (element, name, option, doc) {
        if (doc === void 0) { doc = document; }
        var attributeValue = ComponentOptions.loadStringOption(element, name, option);
        return Utils_1.Utils.isNonEmptyString(attributeValue) ? doc.querySelector(attributeValue) : null;
    };
    ComponentOptions.loadChildHtmlElementOption = function (element, name, option, doc) {
        if (doc === void 0) { doc = document; }
        var htmlElement;
        // Attribute: selector
        var selectorAttr = option.selectorAttr || ComponentOptions.attrNameFromName(name, option) + '-selector';
        var selector = element.getAttribute(selectorAttr) || ComponentOptions.getAttributeFromAlias(element, option);
        if (selector != null) {
            htmlElement = doc.body.querySelector(selector);
        }
        // Child
        if (htmlElement == null) {
            var childSelector = option.childSelector;
            if (childSelector == null) {
                childSelector = '.' + name;
            }
            htmlElement = ComponentOptions.loadChildHtmlElementFromSelector(element, childSelector);
        }
        return htmlElement;
    };
    ComponentOptions.loadChildHtmlElementFromSelector = function (element, selector) {
        Assert_1.Assert.isNonEmptyString(selector);
        if (Dom_1.$$(element).is(selector)) {
            return element;
        }
        return Dom_1.$$(element).find(selector);
    };
    ComponentOptions.loadChildrenHtmlElementFromSelector = function (element, selector) {
        Assert_1.Assert.isNonEmptyString(selector);
        return Dom_1.$$(element).findAll(selector);
    };
    ComponentOptions.findParentScrolling = function (element, doc) {
        if (doc === void 0) { doc = document; }
        element = this.findParentScrollLockable(element, doc);
        return element instanceof HTMLBodyElement || !ComponentOptions.isElementScrollable(element) ? window : element;
    };
    ComponentOptions.findParentScrollLockable = function (element, doc) {
        if (doc === void 0) { doc = document; }
        if (!element) {
            return doc.body;
        }
        if (ComponentOptions.isElementScrollable(element) || element instanceof HTMLBodyElement || !element.parentElement) {
            return element;
        }
        return ComponentOptions.findParentScrollLockable(element.parentElement, doc);
    };
    ComponentOptions.isElementScrollable = function (element) {
        var overflowProperty = Dom_1.$$(element).css('overflow-y');
        return overflowProperty == 'scroll' || overflowProperty == 'auto';
    };
    ComponentOptions.getAttributeFromAlias = function (element, option) {
        if (underscore_1.isArray(option.alias)) {
            var attributeFound_1;
            underscore_1.each(option.alias, function (alias) {
                var attributeFoundWithThisAlias = element.getAttribute(ComponentOptions.attrNameFromName(alias));
                if (attributeFoundWithThisAlias) {
                    attributeFound_1 = attributeFoundWithThisAlias;
                }
            });
            return attributeFound_1;
        }
        if (option.alias) {
            return element.getAttribute(ComponentOptions.attrNameFromName(option.alias));
        }
        else {
            return undefined;
        }
    };
    return ComponentOptions;
}());
exports.ComponentOptions = ComponentOptions;
 
 
/***/ }),
/* 14 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
/**
 * This static class is there to contains the different string definition for all the events related to query.
 *
 * Note that these events will only be triggered when the {@link QueryController.executeQuery} method is used, either directly or by using {@link executeQuery}
 */
var QueryEvents = /** @class */ (function () {
    function QueryEvents() {
    }
    /**
     * Triggered when a new query is launched.
     *
     * All bound handlers will receive {@link INewQueryEventArgs} as an argument.
     *
     * The string value is `newQuery`.
     * @type {string}
     */
    QueryEvents.newQuery = 'newQuery';
    /**
     * Triggered when the query is being built.
     *
     * This is typically where all components will contribute their part to the {@link IQuery} using the {@link QueryBuilder}.
     *
     * All bound handlers will receive {@link IBuildingQueryEventArgs} as an argument.
     *
     * The string value is `buildingQuery`.
     * @type {string}
     */
    QueryEvents.buildingQuery = 'buildingQuery';
    /**
     * Triggered when the query is done being built.
     *
     * This is typically where the facet will add it's {@link IGroupByRequest} to the {@link IQuery}.
     *
     * All bound handlers will receive {@link IDoneBuildingQueryEventArgs} as an argument.
     *
     * The string value is `doneBuildingQuery`.
     * @type {string}
     */
    QueryEvents.doneBuildingQuery = 'doneBuildingQuery';
    /**
     * Triggered when the query is being executed on the Search API.
     *
     * All bound handlers will receive {@link IDuringQueryEventArgs} as an argument.
     *
     * The string value is `duringQuery`.
     * @type {string}
     */
    QueryEvents.duringQuery = 'duringQuery';
    /**
     * Triggered when more results are being fetched on the Search API (think : infinite scrolling, or pager).
     *
     * All bound handlers will receive {@link IDuringQueryEventArgs} as an argument.
     *
     * The string value is `duringFetchMoreQuery`.
     * @type {string}
     */
    QueryEvents.duringFetchMoreQuery = 'duringFetchMoreQuery';
    /**
     * Triggered when a query successfully returns from the Search API.
     *
     * All bound handlers will receive {@link IQuerySuccessEventArgs} as an argument.
     *
     * The string value is `querySuccess`.
     * @type {string}
     */
    QueryEvents.querySuccess = 'querySuccess';
    /**
     * Triggered when a more results were successfully returned from the Search API. (think : infinite scrolling, or pager).
     *
     * All bound handlers will receive {@link IFetchMoreSuccessEventArgs} as an argument.
     *
     * The string value is `fetchMoreSuccess`.
     * @type {string}
     */
    QueryEvents.fetchMoreSuccess = 'fetchMoreSuccess';
    /**
     * Triggered after the main query success event has finished executing.
     *
     * This is typically where facets will process the {@link IGroupByResult} and render themselves.
     *
     * All bound handlers will receive {@link IQuerySuccessEventArgs} as an argument.
     *
     * The string value is `deferredQuerySuccess`.
     * @type {string}
     */
    QueryEvents.deferredQuerySuccess = 'deferredQuerySuccess';
    /**
     * Triggered when there was an error executing a query on the Search API.
     *
     * All bound handlers will receive {@link IQueryErrorEventArgs} as an argument.
     *
     * The string value is `queryError`.
     * @type {string}
     */
    QueryEvents.queryError = 'queryError';
    /**
     * Triggered before the {@link QueryEvents.querySuccess} event.
     *
     * This allows external code to modify the results before rendering them.
     *
     * For example, the {@link Folding} component might use this event to construct a coherent parent child relationship between query results.
     *
     * All bound handlers will receive {@link IPreprocessResultsEventArgs} as an argument.
     *
     * The string value is `preprocessResults`.
     * @type {string}
     */
    QueryEvents.preprocessResults = 'preprocessResults';
    /**
     * Triggered before the {@link QueryEvents.fetchMoreSuccess} event.
     *
     * This allows external code to modify the results before rendering them.
     *
     * For example, the {@link Folding} component might use this event to construct a coherent parent child relationship between query results.
     *
     * All bound handlers will receive {@link IPreprocessResultsEventArgs} as an argument.
     *
     * The string value is `preprocessMoreResults`.
     * @type {string}
     */
    QueryEvents.preprocessMoreResults = 'preprocessMoreResults';
    /**
     * Triggered when there is no result for a particular query.
     *
     * All bound handlers will receive {@link INoResultsEventArgs} as an argument.
     *
     * The string value is `noResults`.
     * @type {string}
     */
    QueryEvents.noResults = 'noResults';
    QueryEvents.buildingCallOptions = 'buildingCallOptions';
    return QueryEvents;
}());
exports.QueryEvents = QueryEvents;
 
 
/***/ }),
/* 15 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __assign = (this && this.__assign) || Object.assign || function(t) {
    for (var s, i = 1, n = arguments.length; i < n; i++) {
        s = arguments[i];
        for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
            t[p] = s[p];
    }
    return t;
};
Object.defineProperty(exports, "__esModule", { value: true });
var QueryBuilder_1 = __webpack_require__(24);
var Fake_1 = __webpack_require__(11);
var Dom_1 = __webpack_require__(0);
var QueryEvents_1 = __webpack_require__(14);
var Utils_1 = __webpack_require__(5);
var Defer_1 = __webpack_require__(31);
var OmniboxEvents_1 = __webpack_require__(47);
var BreadcrumbEvents_1 = __webpack_require__(33);
var JQueryModule_1 = __webpack_require__(865);
var _ = __webpack_require__(1);
var NoopComponent_1 = __webpack_require__(207);
var QueryError_1 = __webpack_require__(213);
var Core_1 = __webpack_require__(9);
Object.defineProperty(navigator, 'doNotTrack', {
    get: function () {
        return Simulate.doNoTrack;
    }
});
var Simulate = /** @class */ (function () {
    function Simulate() {
    }
    Simulate.isPhantomJs = function () {
        return navigator.userAgent.indexOf('PhantomJS') != -1;
    };
    Simulate.isChromeHeadless = function () {
        return navigator.userAgent.indexOf('HeadlessChrome') != -1;
    };
    Simulate.queryError = function (env, options) {
        var opt = __assign({}, options, {
            error: new QueryError_1.QueryError({
                statusCode: 500,
                data: {
                    message: 'oh',
                    type: 'no!'
                }
            })
        });
        return Simulate.query(env, opt);
    };
    Simulate.noResults = function (env, options) {
        var opt = __assign({}, options, { results: Fake_1.FakeResults.createFakeResults(0) });
        return Simulate.query(env, opt);
    };
    Simulate.query = function (env, options) {
        options = _.extend({}, {
            query: new QueryBuilder_1.QueryBuilder().build(),
            queryBuilder: new QueryBuilder_1.QueryBuilder(),
            searchAsYouType: false,
            promise: new Promise(function () { }),
            results: Fake_1.FakeResults.createFakeResults(),
            callbackDuringQuery: function () { },
            callbackAfterNoResults: function () { },
            callbackAfterQuery: function () { },
            deferSuccess: false,
            cancel: false,
            origin: NoopComponent_1.NoopComponent
        }, options);
        if (options.queryCorrections) {
            options.results.queryCorrections = options.queryCorrections;
        }
        if (options.groupByResults) {
            options.results.groupByResults = options.groupByResults;
        }
        var newQueryEventArgs = {
            searchAsYouType: options.searchAsYouType,
            cancel: options.cancel,
            origin: options.origin,
            shouldRedirectStandaloneSearchbox: true
        };
        Dom_1.$$(env.root).trigger(QueryEvents_1.QueryEvents.newQuery, newQueryEventArgs);
        var buildingQueryEventArgs = {
            queryBuilder: options.queryBuilder,
            searchAsYouType: false,
            cancel: false
        };
        Dom_1.$$(env.root).trigger(QueryEvents_1.QueryEvents.buildingQuery, buildingQueryEventArgs);
        Dom_1.$$(env.root).trigger(QueryEvents_1.QueryEvents.doneBuildingQuery, buildingQueryEventArgs);
        if (newQueryEventArgs.cancel || buildingQueryEventArgs.cancel) {
            return options;
        }
        var duringQueryEventArgs = {
            query: options.query,
            queryBuilder: options.queryBuilder,
            promise: options.promise,
            searchAsYouType: options.searchAsYouType
        };
        Dom_1.$$(env.root).trigger(QueryEvents_1.QueryEvents.duringQuery, duringQueryEventArgs);
        options.callbackDuringQuery();
        var success = function () {
            if (Utils_1.Utils.exists(options.error)) {
                var queryErrorEventArgs = {
                    queryBuilder: options.queryBuilder,
                    query: options.query,
                    endpoint: env.searchEndpoint,
                    error: options.error,
                    searchAsYouType: options.searchAsYouType
                };
                Promise.reject(options.promise).catch(function (e) { });
                Dom_1.$$(env.root).trigger(QueryEvents_1.QueryEvents.queryError, queryErrorEventArgs);
            }
            else {
                var preprocessResultsEventArgs = {
                    queryBuilder: options.queryBuilder,
                    query: options.query,
                    results: options.results,
                    searchAsYouType: options.searchAsYouType
                };
                Dom_1.$$(env.root).trigger(QueryEvents_1.QueryEvents.preprocessResults, preprocessResultsEventArgs);
                var noResultsEventArgs = {
                    query: options.query,
                    queryBuilder: options.queryBuilder,
                    results: options.results,
                    searchAsYouType: options.searchAsYouType,
                    retryTheQuery: false
                };
                if (options.results.totalCount == 0 || options.results.results.length == 0) {
                    Dom_1.$$(env.root).trigger(QueryEvents_1.QueryEvents.noResults, noResultsEventArgs);
                    options.callbackAfterNoResults();
                }
                if (noResultsEventArgs.retryTheQuery) {
                    // do nothing, as this could cause test to loop endlessly if they do not handle the query being retried.
                }
                else {
                    var querySuccessEventArgs = {
                        query: options.query,
                        queryBuilder: options.queryBuilder,
                        results: options.results,
                        searchAsYouType: options.searchAsYouType
                    };
                    Dom_1.$$(env.root).trigger(QueryEvents_1.QueryEvents.querySuccess, querySuccessEventArgs);
                    Dom_1.$$(env.root).trigger(QueryEvents_1.QueryEvents.deferredQuerySuccess, querySuccessEventArgs);
                }
            }
            Eif (!options.doNotFlushDefer) {
                Defer_1.Defer.flush();
            }
            options.callbackAfterQuery();
        };
        if (options.deferSuccess) {
            Defer_1.Defer.defer(success);
        }
        else {
            success();
        }
        return options;
    };
    Simulate.querySuggest = function (env, query, completions) {
        Eif (completions === void 0) { completions = []; }
        var buildingQuerySuggestArgs = { payload: { q: query } };
        Dom_1.$$(env.root).trigger(OmniboxEvents_1.OmniboxEvents.buildingQuerySuggest, buildingQuerySuggestArgs);
        var querySuggestSuccessArgs = {
            completions: completions.map(function (completion) { return ({
                expression: completion,
                highlighted: query,
                executableConfidence: 1,
                score: 1
            }); })
        };
        Dom_1.$$(env.root).trigger(OmniboxEvents_1.OmniboxEvents.querySuggestSuccess, querySuggestSuccessArgs);
        return { buildingQuerySuggestArgs: buildingQuerySuggestArgs, querySuggestSuccessArgs: querySuggestSuccessArgs };
    };
    Simulate.initialization = function (env) {
        Dom_1.$$(env.root).trigger(Core_1.InitializationEvents.beforeInitialization);
        Dom_1.$$(env.root).trigger(Core_1.InitializationEvents.afterComponentsInitialization);
        Dom_1.$$(env.root).trigger(Core_1.InitializationEvents.restoreHistoryState);
        Dom_1.$$(env.root).trigger(Core_1.InitializationEvents.afterInitialization);
    };
    Simulate.modalBoxModule = function () {
        var content;
        var closeButton;
        var container = Dom_1.$$('div', { className: 'coveo-wrapper coveo-modal-container' }, (content = Dom_1.$$('div', { className: 'coveo-modal-content' }, Dom_1.$$('header', { className: 'coveo-modal-header' }, (closeButton = Dom_1.$$('div', { className: 'coveo-quickview-close-button coveo-small-close' })), Dom_1.$$('h1')).el).el)).el;
        spyOn(closeButton.el, 'focus');
        var backdrop = Dom_1.$$('div', { className: 'coveo-modal-backdrop' }).el;
        var modalBox = {};
        var currentValidation = null;
        modalBox.close = jasmine.createSpy('close').and.callFake(function () { return currentValidation && currentValidation(); });
        modalBox.open = jasmine.createSpy('open').and.callFake(function (_, _a) {
            var validation = _a.validation;
            currentValidation = validation;
            return {
                modalBox: container,
                wrapper: content,
                overlay: backdrop,
                content: content,
                close: modalBox.close
            };
        });
        return modalBox;
    };
    Simulate.analyticsStoreModule = function (actionsHistory) {
        if (actionsHistory === void 0) { actionsHistory = []; }
        return {
            addElement: function (query) { },
            getHistory: function () {
                return actionsHistory;
            },
            setHistory: function (history) { },
            clear: function () { },
            getMostRecentElement: function () {
                return null;
            }
        };
    };
    Simulate.populateOmnibox = function (env, options) {
        var expression = {
            word: 'foo',
            regex: /foo/
        };
        var fakeOmniboxArgs = _.extend({}, {
            rows: [],
            completeQueryExpression: expression,
            allQueryExpression: expression,
            currentQueryExpression: expression,
            cursorPosition: 3,
            clear: jasmine.createSpy('clear'),
            clearCurrentExpression: jasmine.createSpy('clearCurrent'),
            replace: jasmine.createSpy('replace'),
            replaceCurrentExpression: jasmine.createSpy('replaceCurrentExpression'),
            insertAt: jasmine.createSpy('insertAt'),
            closeOmnibox: jasmine.createSpy('closeOmnibox')
        }, options);
        Dom_1.$$(env.root).trigger(OmniboxEvents_1.OmniboxEvents.populateOmnibox, fakeOmniboxArgs);
        return fakeOmniboxArgs;
    };
    Simulate.breadcrumb = function (env, options) {
        var args = { breadcrumbs: [] };
        Dom_1.$$(env.root).trigger(BreadcrumbEvents_1.BreadcrumbEvents.populateBreadcrumb, args);
        return args.breadcrumbs;
    };
    Simulate.clearBreadcrumb = function (env) {
        Dom_1.$$(env.root).trigger(BreadcrumbEvents_1.BreadcrumbEvents.clearBreadcrumb);
    };
    Simulate.keyUp = function (element, key, shiftKey) {
        return Simulate.keyEvent(element, key, 'keyup', shiftKey);
    };
    Simulate.keyDown = function (element, key, shiftKey) {
        return Simulate.keyEvent(element, key, 'keydown', shiftKey);
    };
    Simulate.keyEvent = function (element, key, eventName, shiftKey) {
        var event = new KeyboardEvent(eventName, { shiftKey: shiftKey });
        Object.defineProperty(event, 'keyCode', {
            get: function () {
                return key;
            }
        });
        Object.defineProperty(event, 'which', {
            get: function () {
                return key;
            }
        });
        element.dispatchEvent(event);
        Defer_1.Defer.flush();
    };
    Simulate.addJQuery = function () {
        window['Coveo']['$'] = JQueryModule_1.JQuery;
        return JQueryModule_1.JQuery;
    };
    Simulate.removeJQuery = function () {
        window['Coveo']['$'] = null;
    };
    Simulate.doNoTrack = undefined;
    return Simulate;
}());
exports.Simulate = Simulate;
 
 
/***/ }),
/* 16 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var SVGIcons = /** @class */ (function () {
    function SVGIcons() {
    }
    SVGIcons.icons = {
        search: __webpack_require__(973),
        more: __webpack_require__(974),
        loading: __webpack_require__(975),
        checkboxHookExclusionMore: __webpack_require__(976),
        arrowUp: __webpack_require__(977),
        arrowDown: __webpack_require__(978),
        mainClear: __webpack_require__(979),
        clearSmall: __webpack_require__(980),
        clear: __webpack_require__(981),
        close: __webpack_require__(982),
        delete: __webpack_require__(983),
        save: __webpack_require__(984),
        checkYes: __webpack_require__(985),
        orAnd: __webpack_require__(986),
        sort: __webpack_require__(987),
        ascending: __webpack_require__(988),
        descending: __webpack_require__(989),
        dropdownMore: __webpack_require__(990),
        dropdownLess: __webpack_require__(991),
        facetCollapse: __webpack_require__(992),
        facetExpand: __webpack_require__(993),
        dropdownShareQuery: __webpack_require__(994),
        dropdownPreferences: __webpack_require__(995),
        dropdownAuthenticate: __webpack_require__(996),
        dropdownExport: __webpack_require__(997),
        dropdownFollowQuery: __webpack_require__(998),
        quickview: __webpack_require__(999),
        pagerRightArrow: __webpack_require__(1000),
        pagerLeftArrow: __webpack_require__(1001),
        replies: __webpack_require__(1002),
        video: __webpack_require__(1003),
        coveoLogo: __webpack_require__(1004),
        coveoPoweredBy: __webpack_require__(1005),
        taggingOk: __webpack_require__(1006),
        edit: __webpack_require__(1007),
        star: __webpack_require__(1008),
        listLayout: __webpack_require__(1009),
        cardLayout: __webpack_require__(1010),
        tableLayout: __webpack_require__(1011),
        plus: __webpack_require__(1012)
    };
    return SVGIcons;
}());
exports.SVGIcons = SVGIcons;
 
 
/***/ }),
/* 17 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __assign = (this && this.__assign) || Object.assign || function(t) {
    for (var s, i = 1, n = arguments.length; i < n; i++) {
        s = arguments[i];
        for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
            t[p] = s[p];
    }
    return t;
};
Object.defineProperty(exports, "__esModule", { value: true });
var Model_1 = __webpack_require__(26);
var Assert_1 = __webpack_require__(12);
var _ = __webpack_require__(1);
var Utils_1 = __webpack_require__(5);
exports.QUERY_STATE_ATTRIBUTES = {
    Q: 'q',
    FIRST: 'first',
    T: 't',
    TG: 'tg',
    SORT: 'sort',
    LAYOUT: 'layout',
    HD: 'hd',
    HQ: 'hq',
    QUICKVIEW: 'quickview',
    DEBUG: 'debug',
    NUMBER_OF_RESULTS: 'numberOfResults',
    MISSING_TERMS: 'missingTerms'
};
/**
 * The `QueryStateModel` class is a key-value store which contains the current state of the components that can affect
 * the query (see [State](https://docs.coveo.com/en/344/)). This class inherits from the [`Model`](https://coveo.github.io/search-ui/classes/model.html)
 * class. Optionally, it is possible to persist the state in the query string in order to enable browser history
 * management (see the [`HistoryController`]{@link HistoryController} class).
 *
 * Components set values in the `QueryStateModel` instance to reflect their current state. The `QueryStateModel`
 * triggers state events (see [`eventTypes`]{@link Model.eventTypes}) whenever one of its values is modified. Components
 * listen to triggered state events to update themselves when appropriate.
 *
 * For instance, when a query is triggered, the [`Searchbox`]{@link Searchbox} component sets the `q` attribute (the
 * basic query expression), while the [`Pager`]{@link Pager} component sets the `first` attribute (the index of the
 * first result to display in the result list), and so on.
 *
 * **Example:**
 *
 * > The user modifies the content of the `Searchbox` and submits a query. This triggers the following state events:
 * > - `state:change:q` (because the value of `q` has changed).
 * > - `state:change` (because at least one value has changed in the `QueryStateModel`).
 * >
 * > Components or external code can attach handlers to those events:
 * > ```javascript
 * > Coveo.$$(document).on('state:change:q', function() {
 * >   [ ... ]
 * > });
 * > ```
 *
 * **Note:**
 * > Normally, you should interact with the `QueryStateModel` instance using the [`Coveo.state`]{@link state} top-level
 * > function.
 */
var QueryStateModel = /** @class */ (function (_super) {
    __extends(QueryStateModel, _super);
    /**
     * Creates a new `QueryStateModel` instance.
     * @param element The HTMLElement on which to instantiate the `QueryStateModel`.
     * @param attributes The state key-value store to instantiate the `QueryStateModel` with.
     */
    function QueryStateModel(element, attributes) {
        var _this = this;
        var merged = __assign({}, QueryStateModel.defaultAttributes, attributes);
        _this = _super.call(this, element, QueryStateModel.ID, merged) || this;
        return _this;
    }
    QueryStateModel.getFacetId = function (id, include) {
        if (include === void 0) { include = true; }
        return 'f:' + id + (include ? '' : ':not');
    };
    QueryStateModel.getFacetOperator = function (id) {
        return 'f:' + id + ':operator';
    };
    QueryStateModel.getFacetLookupValue = function (id) {
        return QueryStateModel.getFacetId(id) + ':lookupvalues';
    };
    /**
     * Validates whether at least one facet is currently active (has selected or excluded values) in the interface.
     *
     * @returns {boolean} `true` if at least one facet is active; `false` otherwise.
     */
    QueryStateModel.prototype.atLeastOneFacetIsActive = function () {
        var _this = this;
        return !_.isUndefined(_.find(this.attributes, function (value, key) {
            return key.match(/^f:/) && !Utils_1.Utils.arrayEqual(_this.getDefault(key), value);
        }));
    };
    QueryStateModel.prototype.set = function (attribute, value, options) {
        this.validate(attribute, value);
        _super.prototype.set.call(this, attribute, value, options);
    };
    QueryStateModel.prototype.validate = function (attribute, value) {
        if (attribute == QueryStateModel.attributesEnum.first) {
            Assert_1.Assert.isNumber(value);
            Assert_1.Assert.isLargerOrEqualsThan(0, value);
        }
    };
    QueryStateModel.ID = 'state';
    QueryStateModel.defaultAttributes = {
        q: '',
        first: 0,
        fv: '',
        t: '',
        hd: '',
        hq: '',
        sort: '',
        layout: 'list',
        tg: '',
        quickview: '',
        debug: false,
        numberOfResults: 10,
        missingTerms: []
    };
    QueryStateModel.attributesEnum = {
        q: 'q',
        first: 'first',
        fv: 'fv',
        t: 't',
        sort: 'sort',
        layout: 'layout',
        hd: 'hd',
        hq: 'hq',
        tg: 'tg',
        quickview: 'quickview',
        debug: 'debug',
        numberOfResults: 'numberOfResults',
        missingTerms: 'missingTerms'
    };
    return QueryStateModel;
}(Model_1.Model));
exports.QueryStateModel = QueryStateModel;
function setState(model, args) {
    Assert_1.Assert.exists(model);
    if (args.length == 0 || args[0] == undefined) {
        // No args means return the model
        return model;
    }
    else if (args.length == 1 && Utils_1.Utils.isNonEmptyString(args[0])) {
        // One string arg means retrieve value from model
        return model.get(args[0]);
    }
    else Iif (_.isObject(args[0])) {
        // One dictionary means set multiple values
        var toSet = args[0];
        var options = _.extend({ customAttribute: true }, args[1]);
        return model.setMultiple(toSet, options);
    }
    else Eif (args.length > 1) {
        // Otherwise we're setting a value
        var name_1 = args[0];
        var value = args[1];
        var options = _.extend({ customAttribute: true }, args[2]);
        Assert_1.Assert.isNonEmptyString(name_1);
        return model.set(name_1, value, options);
    }
}
exports.setState = setState;
 
 
/***/ }),
/* 18 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
// Ensure that we're not going to get console is undefined error in IE8-9
Object.defineProperty(exports, "__esModule", { value: true });
/* istanbul ignore next */
Iif (!window['console']) {
    console = {
        log: function () { },
        debug: function () { },
        info: function () { },
        warn: function () { },
        error: function () { },
        assert: function () { },
        clear: function () { },
        count: function () { },
        dir: function () { },
        dirxml: function () { },
        group: function () { },
        groupCollapsed: function () { },
        groupEnd: function () { },
        msIsIndependentlyComposed: function (element) { },
        profile: function () { },
        profileEnd: function () { },
        select: function () { },
        time: function () { },
        timeEnd: function () { },
        trace: function () { }
    };
}
/* istanbul ignore next */
var Logger = /** @class */ (function () {
    function Logger(owner) {
        this.owner = owner;
    }
    Logger.prototype.trace = function () {
        var stuff = [];
        for (var _i = 0; _i < arguments.length; _i++) {
            stuff[_i] = arguments[_i];
        }
        Iif (Logger.level <= Logger.TRACE) {
            this.log('TRACE', stuff);
        }
    };
    Logger.prototype.debug = function () {
        var stuff = [];
        for (var _i = 0; _i < arguments.length; _i++) {
            stuff[_i] = arguments[_i];
        }
        Iif (Logger.level <= Logger.DEBUG) {
            this.log('DEBUG', stuff);
        }
    };
    Logger.prototype.info = function () {
        var stuff = [];
        for (var _i = 0; _i < arguments.length; _i++) {
            stuff[_i] = arguments[_i];
        }
        Iif (Logger.level <= Logger.INFO) {
            this.log('INFO', stuff);
        }
    };
    Logger.prototype.warn = function () {
        var stuff = [];
        for (var _i = 0; _i < arguments.length; _i++) {
            stuff[_i] = arguments[_i];
        }
        Iif (Logger.level <= Logger.WARN) {
            this.log('WARN', stuff);
        }
    };
    Logger.prototype.error = function () {
        var stuff = [];
        for (var _i = 0; _i < arguments.length; _i++) {
            stuff[_i] = arguments[_i];
        }
        Iif (Logger.level <= Logger.ERROR) {
            this.log('ERROR', stuff);
        }
    };
    Logger.prototype.log = function (level, stuff) {
        if (window['console'] && console.log) {
            if (console.error && level == 'ERROR') {
                console.error([level, this.owner].concat(stuff));
            }
            else if (console.info && level == 'INFO') {
                console.info([level, this.owner].concat(stuff));
            }
            else if (console.warn && level == 'WARN') {
                console.warn([level, this.owner].concat(stuff));
            }
            else {
                console.log([level, this.owner].concat(stuff));
            }
            if (Logger.executionTime) {
                console.timeEnd('Execution time');
                console.time('Execution time');
            }
        }
    };
    Logger.enable = function () {
        Logger.level = Logger.TRACE;
    };
    Logger.disable = function () {
        Logger.level = Logger.NOTHING;
    };
    Logger.TRACE = 1;
    Logger.DEBUG = 2;
    Logger.INFO = 3;
    Logger.WARN = 4;
    Logger.ERROR = 5;
    Logger.NOTHING = 6;
    Logger.level = Logger.INFO;
    Logger.executionTime = false;
    return Logger;
}());
exports.Logger = Logger;
 
 
/***/ }),
/* 19 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return epsilon; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return epsilon2; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "o", function() { return pi; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "l", function() { return halfPi; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "q", function() { return quarterPi; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "w", function() { return tau; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return degrees; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "r", function() { return radians; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return abs; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return atan; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return atan2; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return cos; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return ceil; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "k", function() { return exp; });
/* unused harmony export floor */
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "n", function() { return log; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "p", function() { return pow; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "t", function() { return sin; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "s", function() { return sign; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "u", function() { return sqrt; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "v", function() { return tan; });
/* harmony export (immutable) */ __webpack_exports__["b"] = acos;
/* harmony export (immutable) */ __webpack_exports__["c"] = asin;
/* harmony export (immutable) */ __webpack_exports__["m"] = haversin;
var epsilon = 1e-6;
var epsilon2 = 1e-12;
var pi = Math.PI;
var halfPi = pi / 2;
var quarterPi = pi / 4;
var tau = pi * 2;
 
var degrees = 180 / pi;
var radians = pi / 180;
 
var abs = Math.abs;
var atan = Math.atan;
var atan2 = Math.atan2;
var cos = Math.cos;
var ceil = Math.ceil;
var exp = Math.exp;
var floor = Math.floor;
var log = Math.log;
var pow = Math.pow;
var sin = Math.sin;
var sign = Math.sign || function(x) { return x > 0 ? 1 : x < 0 ? -1 : 0; };
var sqrt = Math.sqrt;
var tan = Math.tan;
 
function acos(x) {
  return x > 1 ? 0 : x < -1 ? pi : Math.acos(x);
}
 
function asin(x) {
  return x > 1 ? halfPi : x < -1 ? -halfPi : Math.asin(x);
}
 
function haversin(x) {
  return (x = sin(x / 2)) * x;
}
 
 
/***/ }),
/* 20 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Logger_1 = __webpack_require__(18);
var KeyboardUtils_1 = __webpack_require__(35);
var Dom_1 = __webpack_require__(0);
__webpack_require__(1077);
var ArrowDirection;
(function (ArrowDirection) {
    ArrowDirection[ArrowDirection["UP"] = 0] = "UP";
    ArrowDirection[ArrowDirection["RIGHT"] = 1] = "RIGHT";
    ArrowDirection[ArrowDirection["DOWN"] = 2] = "DOWN";
    ArrowDirection[ArrowDirection["LEFT"] = 3] = "LEFT";
})(ArrowDirection = exports.ArrowDirection || (exports.ArrowDirection = {}));
var AccessibleButton = /** @class */ (function () {
    function AccessibleButton() {
        this.labelOrTitleRequired = true;
        this.logger = new Logger_1.Logger(this);
    }
    AccessibleButton.prototype.withOwner = function (owner) {
        this.eventOwner = owner;
        return this;
    };
    AccessibleButton.prototype.withElement = function (element) {
        if (element instanceof HTMLElement) {
            this.element = Dom_1.$$(element);
        }
        else {
            this.element = element;
        }
        return this;
    };
    AccessibleButton.prototype.withLabel = function (label) {
        this.label = label;
        return this;
    };
    AccessibleButton.prototype.withoutLabelOrTitle = function () {
        this.labelOrTitleRequired = false;
        return this;
    };
    AccessibleButton.prototype.withTitle = function (title) {
        this.title = title;
        return this;
    };
    AccessibleButton.prototype.withSelectAction = function (action) {
        this.clickAction = action;
        this.enterKeyboardAction = action;
        return this;
    };
    AccessibleButton.prototype.withClickAction = function (clickAction) {
        this.clickAction = clickAction;
        return this;
    };
    AccessibleButton.prototype.withEnterKeyboardAction = function (enterAction) {
        this.enterKeyboardAction = enterAction;
        return this;
    };
    AccessibleButton.prototype.withFocusAndMouseEnterAction = function (action) {
        this.focusAction = action;
        this.mouseenterAction = action;
        return this;
    };
    AccessibleButton.prototype.withFocusAction = function (action) {
        this.focusAction = action;
        return this;
    };
    AccessibleButton.prototype.withMouseEnterAction = function (action) {
        this.mouseenterAction = action;
        return this;
    };
    AccessibleButton.prototype.withBlurAndMouseLeaveAction = function (action) {
        this.mouseleaveAction = action;
        this.blurAction = action;
        return this;
    };
    AccessibleButton.prototype.withMouseLeaveAction = function (action) {
        this.mouseleaveAction = action;
        return this;
    };
    AccessibleButton.prototype.withBlurAction = function (action) {
        this.blurAction = action;
        return this;
    };
    AccessibleButton.prototype.withArrowsAction = function (action) {
        this.arrowsAction = action;
        return this;
    };
    AccessibleButton.prototype.withRole = function (role) {
        this.role = role;
        return this;
    };
    AccessibleButton.prototype.build = function () {
        Iif (!this.element) {
            this.element = Dom_1.$$('div');
        }
        this.ensureCorrectRole();
        this.ensureCorrectLabelOrTitle();
        this.ensureSelectAction();
        this.ensureUnselectAction();
        this.ensureMouseenterAndFocusAction();
        this.ensureMouseleaveAndBlurAction();
        this.ensureArrowsAction();
        this.ensureDifferentiationBetweenKeyboardAndMouseFocus();
        return this;
    };
    AccessibleButton.prototype.ensureDifferentiationBetweenKeyboardAndMouseFocus = function () {
        var _this = this;
        var classWhenPressed = 'coveo-accessible-button-pressed';
        Dom_1.$$(this.element).addClass('coveo-accessible-button');
        Dom_1.$$(this.element).on('mouseup', function () { return Dom_1.$$(_this.element).addClass(classWhenPressed); });
        Dom_1.$$(this.element).on('focus', function () {
            Dom_1.$$(_this.element).removeClass(classWhenPressed);
        });
    };
    AccessibleButton.prototype.ensureCorrectRole = function () {
        if (!this.element.getAttribute('role')) {
            this.element.setAttribute('role', this.role || 'button');
        }
    };
    AccessibleButton.prototype.ensureCorrectLabelOrTitle = function () {
        if (!this.labelOrTitleRequired) {
            return;
        }
        if (!this.label && !this.title) {
            this.logger.error("Missing a label or title to create an accessible button!");
            return;
        }
        if (this.title) {
            this.element.setAttribute('title', this.title);
            return;
        }
        this.element.setAttribute('aria-label', this.label);
    };
    AccessibleButton.prototype.ensureTabIndex = function () {
        this.element.setAttribute('tabindex', '0');
    };
    AccessibleButton.prototype.ensureSelectAction = function () {
        var _this = this;
        if (this.enterKeyboardAction) {
            this.ensureTabIndex();
            this.bindEvent('keyup', KeyboardUtils_1.KeyboardUtils.keypressAction(KeyboardUtils_1.KEYBOARD.ENTER, function (e) { return _this.enterKeyboardAction(e); }));
            this.bindEvent('keydown', KeyboardUtils_1.KeyboardUtils.keypressAction(KeyboardUtils_1.KEYBOARD.SPACEBAR, function (e) {
                Eif (e.target instanceof HTMLInputElement) {
                    return;
                }
                e.preventDefault();
            }));
            this.bindEvent('keyup', KeyboardUtils_1.KeyboardUtils.keypressAction(KeyboardUtils_1.KEYBOARD.SPACEBAR, function (e) {
                if (e.target instanceof HTMLInputElement) {
                    return;
                }
                _this.enterKeyboardAction(e);
            }));
        }
        if (this.clickAction) {
            this.bindEvent('click', this.clickAction);
        }
    };
    AccessibleButton.prototype.ensureUnselectAction = function () {
        if (this.blurAction) {
            this.bindEvent('blur', this.blurAction);
        }
        if (this.mouseleaveAction) {
            this.bindEvent('mouseleave', this.mouseleaveAction);
        }
    };
    AccessibleButton.prototype.ensureMouseenterAndFocusAction = function () {
        if (this.mouseenterAction) {
            this.bindEvent('mouseenter', this.mouseenterAction);
        }
        if (this.focusAction) {
            this.bindEvent('focus', this.focusAction);
        }
    };
    AccessibleButton.prototype.ensureMouseleaveAndBlurAction = function () {
        if (this.mouseleaveAction) {
            this.bindEvent('mouseleave', this.mouseleaveAction);
        }
        if (this.blurAction) {
            this.bindEvent('blur', this.blurAction);
        }
    };
    AccessibleButton.prototype.ensureArrowsAction = function () {
        var _this = this;
        if (this.arrowsAction) {
            this.bindEvent('keyup', KeyboardUtils_1.KeyboardUtils.keypressAction(KeyboardUtils_1.KEYBOARD.UP_ARROW, function (e) { return _this.arrowsAction(ArrowDirection.UP, e); }));
            this.bindEvent('keyup', KeyboardUtils_1.KeyboardUtils.keypressAction(KeyboardUtils_1.KEYBOARD.RIGHT_ARROW, function (e) { return _this.arrowsAction(ArrowDirection.RIGHT, e); }));
            this.bindEvent('keyup', KeyboardUtils_1.KeyboardUtils.keypressAction(KeyboardUtils_1.KEYBOARD.DOWN_ARROW, function (e) { return _this.arrowsAction(ArrowDirection.DOWN, e); }));
            this.bindEvent('keyup', KeyboardUtils_1.KeyboardUtils.keypressAction(KeyboardUtils_1.KEYBOARD.LEFT_ARROW, function (e) { return _this.arrowsAction(ArrowDirection.LEFT, e); }));
        }
    };
    AccessibleButton.prototype.bindEvent = function (event, action) {
        if (this.eventOwner) {
            this.eventOwner.on(this.element, event, action);
        }
        else {
            Dom_1.$$(this.element).on(event, action);
        }
    };
    return AccessibleButton;
}());
exports.AccessibleButton = AccessibleButton;
 
 
/***/ }),
/* 21 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony default export */ __webpack_exports__["a"] = (function(specifier) {
  var n = specifier.length / 6 | 0, colors = new Array(n), i = 0;
  while (i < n) colors[i] = "#" + specifier.slice(i * 6, ++i * 6);
  return colors;
});
 
 
/***/ }),
/* 22 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
/**
 * This static class is there to contain the different string definitions for all the events related to initialization.
 *
 * Note that these events will only be triggered when the {@link init} function is called.
 *
 * This means these events are normally called only once when the search interface is initialized.
 */
var InitializationEvents = /** @class */ (function () {
    function InitializationEvents() {
    }
    /**
     * This event is triggered right before each components inside the search interface get initialized (eg: Before the constructor of each component is executed).
     *
     * The string value is `beforeInitialization`.
     * @type {string}
     */
    InitializationEvents.beforeInitialization = 'beforeInitialization';
    /**
     * Triggered after the components are initialized (eg: After the constructor of each component is executed)
     * but before their state is set from the hash portion of the URL (e.g., `http://mysearchinterface#q=myQuery`).
     *
     * This is also before the first query is launched (if the {@link SearchInterface.options.autoTriggerQuery} is `true`).
     *
     * The string value is `afterComponentsInitialization`.
     * @type {string}
     */
    InitializationEvents.afterComponentsInitialization = 'afterComponentsInitialization';
    /**
     * Triggered right before the state from the URL (e.g., `http://mysearchinterface#q=myQuery`) gets applied in the interface.
     *
     * This will typically only be useful if the {@link SearchInterface.options.enableHistory} is set to `true`.
     *
     * The string value is `restoreHistoryState`.
     * @type {string}
     */
    InitializationEvents.restoreHistoryState = 'restoreHistoryState';
    /**
     * Triggered right after the UI is fully initialized.
     *
     * Concretely this means that the constructor of each component has been executed, and that the state coming for the URL (e.g., `http://mysearchinterface#q=myquery`) has been applied.
     *
     * It is triggered *before* the first query is launched, and if the {@link SearchInterface.options.autoTriggerQuery} is `true`.
     *
     * The string value is `afterInitialization`.
     * @type {string}
     */
    InitializationEvents.afterInitialization = 'afterInitialization';
    /**
     * This is triggered when the UI needs to be dynamically removed so that components can unbind any internal handlers they might have set globally on the window or the document.
     *
     * After this event has been executed, the search interface can be dynamically removed and all handlers can be considered cleanly removed.
     *
     * The string value is `nuke`.
     * @type {string}
     */
    InitializationEvents.nuke = 'nuke';
    return InitializationEvents;
}());
exports.InitializationEvents = InitializationEvents;
 
 
/***/ }),
/* 23 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var underscore_1 = __webpack_require__(1);
var SVGDom = /** @class */ (function () {
    function SVGDom() {
    }
    SVGDom.addClassToSVGInContainer = function (svgContainer, classToAdd) {
        var svgElement = svgContainer.querySelector('svg');
        svgElement.setAttribute('class', "" + SVGDom.getClass(svgElement) + classToAdd);
    };
    SVGDom.removeClassFromSVGInContainer = function (svgContainer, classToRemove) {
        var svgElement = svgContainer.querySelector('svg');
        svgElement.setAttribute('class', SVGDom.getClass(svgElement).replace(classToRemove, ''));
    };
    SVGDom.addStyleToSVGInContainer = function (svgContainer, styleToAdd) {
        var svgElement = svgContainer.querySelector('svg');
        underscore_1.each(styleToAdd, function (styleValue, styleKey) {
            svgElement.style[styleKey] = styleValue;
        });
    };
    SVGDom.addAttributesToSVGInContainer = function (svgContainer, attributesToAdd) {
        var svgElement = svgContainer.querySelector('svg');
        underscore_1.each(attributesToAdd, function (attributeValue, attributeKey) {
            svgElement.setAttribute(attributeKey, attributeValue);
        });
    };
    SVGDom.getClass = function (svgElement) {
        var className = svgElement.getAttribute('class');
        return className ? className + ' ' : '';
    };
    return SVGDom;
}());
exports.SVGDom = SVGDom;
 
 
/***/ }),
/* 24 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var _ = __webpack_require__(1);
var Utils_1 = __webpack_require__(5);
var ExpressionBuilder_1 = __webpack_require__(87);
var QueryBuilderExpression_1 = __webpack_require__(475);
/**
 * The QueryBuilder is used to build a {@link IQuery} that will be able to be executed using the Search API.
 *
 * The class exposes several members and methods that help components and external code to build up the final query that is sent to the Search API.
 *
 */
var QueryBuilder = /** @class */ (function () {
    function QueryBuilder() {
        /**
         * Used to build the basic part of the query expression.
         *
         * This part typically consists of user-entered content such as query keywords, etc.
         * @type {Coveo.ExpressionBuilder}
         */
        this.expression = new ExpressionBuilder_1.ExpressionBuilder();
        /**
         * Used to build the advanced part of the query expression.
         *
         * This part is typically formed of filter expressions generated by components such as facets, external code, etc.
         * @type {Coveo.ExpressionBuilder}
         */
        this.advancedExpression = new ExpressionBuilder_1.ExpressionBuilder();
        /**
         * Used to build the advanced part of the query expression.
         *
         * This part is similar to `advancedExpression`, but its content is interpreted as a constant expression by the index and it takes advantage of special caching features.
         * @type {Coveo.ExpressionBuilder}
         */
        this.constantExpression = new ExpressionBuilder_1.ExpressionBuilder();
        /**
         * The contextual text.
         *
         * This is the contextual text part of the query. It uses the Coveo Machine Learning service to pick key keywords from the text and add them to the basic expression.
         * This field is mainly used to pass context such a case description, long textual query or any other form of text that might help in
         * refining the query.
         */
        this.longQueryExpression = new ExpressionBuilder_1.ExpressionBuilder();
        /**
         * Used to build the disjunctive part of the query expression.
         *
         * When present, this part is evaluated separately from the other expressions and the matching results are merged to those matching expressions, `advancedExpression` and `constantExpression`.
         *
         * The final boolean expression for the query is thus (basic advanced constant) OR (disjunction).
         * @type {Coveo.ExpressionBuilder}
         */
        this.disjunctionExpression = new ExpressionBuilder_1.ExpressionBuilder();
        /**
         * Whether to interpret special query syntax (e.g., `@objecttype=message`) in the basic
         * [`expression`]{@link QueryBuilder.expression} (see
         * [Coveo Query Syntax Reference](https://docs.coveo.com/en/1552/searching-with-coveo/coveo-cloud-query-syntax)).
         *
         * See also [`enableLowercaseOperators`]{@link QueryBuilder.enableLowercaseOperators}.
         *
         * **Note:**
         * > Normally, the [`enableQuerySyntax`]{@link Querybox.options.enableQuerySyntax} option of the
         * > [`Querybox`]{@link Querybox} component determines the value of this attribute during the initialization of the
         * search page. End user preferences can also modify the value of this attribute.
         *
         * Default value is `false`
         */
        this.enableQuerySyntax = false;
        /**
         * This is the 0-based index of the first result to return.
         *
         * If not specified, this parameter defaults to 0.
         */
        this.firstResult = 0;
        /**
         * This is the number of results to return, starting from {@link IQuery.firstResult}.
         *
         * If not specified, this parameter defaults to 10.
         */
        this.numberOfResults = 10;
        this.requiredFields = [];
        this.includeRequiredFields = false;
        /**
         * Whether to enable query corrections on this query (see {@link DidYouMean}).
         */
        this.enableDidYouMean = false;
        /**
         * Whether to enable debug info on the query.
         *
         * This will return additional information on the resulting JSON response from the Search API.
         *
         * Mostly: execution report (a detailed breakdown of the parsed and executed query).
         */
        this.enableDebug = false;
        /**
         * Specifies the sort criterion(s) to use to sort results. If not specified, this parameter defaults to relevancy.
         *
         * Possible values are : <br/>
         * -- relevancy :  This uses all the configured ranking weights as well as any specified ranking expressions to rank results.<br/>
         * -- dateascending / datedescending Sort using the value of the `@date` field, which is typically the last modification date of an item in the index.<br/>
         * -- qre : Sort using only the weights applied through ranking expressions. This is much like using `relevancy` except that automatic weights based on keyword proximity etc, are not computed.<br/>
         * -- nosort : Do not sort the results. The order in which items are returned is essentially random.<br/>
         * -- @field ascending / @field descending Sort using the value of a custom field.
         */
        this.sortCriteria = 'relevancy';
        this.retrieveFirstSentences = true;
        /**
         * Specifies an array of Query Function operation that will be executed on the results.
         */
        this.queryFunctions = [];
        /**
         * Specifies an array of Ranking Function operations that will be executed on the results.
         */
        this.rankingFunctions = [];
        /**
         * Specifies an array of Group By operations that can be performed on the query results to extract facets.
         * Cannot be used alongside [`facetRequests`]{@link QueryBuilder.facetRequests}
         */
        this.groupByRequests = [];
        /**
         * Specifies an array of request for the DynamicFacet component.
         * Cannot be used alongside [`groupByRequests`]{@link QueryBuilder.groupByRequests}
         */
        this.facetRequests = [];
        /**
         * The global configuration options to apply to the requests in the [facets]{@link QueryBuilder.facets} array.
         */
        this.facetOptions = {};
        /**
         * Specifies an array of request for the CategoryFacet component.
         */
        this.categoryFacets = [];
        this.enableDuplicateFiltering = false;
    }
    /**
     * Build the current content or state of the query builder and return a {@link IQuery}.
     *
     * build can be called multiple times on the same QueryBuilder.
     * @returns {IQuery}
     */
    QueryBuilder.prototype.build = function () {
        var query = {
            q: this.expression.build(),
            aq: this.advancedExpression.build(),
            cq: this.constantExpression.build(),
            lq: this.longQueryExpression.build(),
            dq: this.disjunctionExpression.build(),
            searchHub: this.searchHub,
            tab: this.tab,
            locale: this.locale,
            pipeline: this.pipeline,
            maximumAge: this.maximumAge,
            wildcards: this.enableWildcards,
            questionMark: this.enableQuestionMarks,
            lowercaseOperators: this.enableLowercaseOperators,
            partialMatch: this.enablePartialMatch,
            partialMatchKeywords: this.partialMatchKeywords,
            partialMatchThreshold: this.partialMatchThreshold,
            firstResult: this.firstResult,
            numberOfResults: this.numberOfResults,
            excerptLength: this.excerptLength,
            filterField: this.filterField,
            filterFieldRange: this.filterFieldRange,
            parentField: this.parentField,
            childField: this.childField,
            fieldsToInclude: this.computeFieldsToInclude(),
            fieldsToExclude: this.fieldsToExclude,
            enableDidYouMean: this.enableDidYouMean,
            sortCriteria: this.sortCriteria,
            sortField: this.sortField,
            queryFunctions: this.queryFunctions,
            rankingFunctions: this.rankingFunctions,
            groupBy: this.groupBy,
            facets: this.facets,
            facetOptions: this.facetOptions,
            categoryFacets: this.categoryFacets,
            retrieveFirstSentences: this.retrieveFirstSentences,
            timezone: this.timezone,
            enableQuerySyntax: this.enableQuerySyntax,
            enableDuplicateFiltering: this.enableDuplicateFiltering,
            enableCollaborativeRating: this.enableCollaborativeRating,
            debug: this.enableDebug,
            context: this.context,
            actionsHistory: this.actionsHistory,
            recommendation: this.recommendation,
            allowQueriesWithoutKeywords: this.allowQueriesWithoutKeywords,
            userActions: this.userActions,
            commerce: this.commerce
        };
        return query;
    };
    /**
     * Return only the expression(s) part(s) of the query, as a string.
     *
     * This means the basic, advanced and constant part in a complete expression {@link IQuery.q}, {@link IQuery.aq}, {@link IQuery.cq}.
     * @returns {string}
     */
    QueryBuilder.prototype.computeCompleteExpression = function () {
        return this.computeCompleteExpressionParts().full;
    };
    /**
     * Return only the expression(s) part(s) of the query, as an object.
     * @returns {{full: string, withoutConstant: string, constant: string}}
     */
    QueryBuilder.prototype.computeCompleteExpressionParts = function () {
        return new QueryBuilderExpression_1.QueryBuilderExpression(this.expression.build(), this.advancedExpression.build(), this.constantExpression.build(), this.disjunctionExpression.build());
    };
    /**
     * Return only the expression(s) part(s) of the query, as a string, except the given expression.
     *
     * This is used by {@link Facet}, to build their group by request with query override.
     * @param except
     * @returns {string}
     */
    QueryBuilder.prototype.computeCompleteExpressionExcept = function (except) {
        return this.computeCompleteExpressionPartsExcept(except).full;
    };
    /**
     * Return only the expression(s) part(s) of the query, as an object, except the given expression.
     *
     * This is used by {@link Facet}, to build their group by request with query override.
     * @param except
     * @returns {{full: string, withoutConstant: string, constant: string}}
     */
    QueryBuilder.prototype.computeCompleteExpressionPartsExcept = function (except) {
        var withoutConstantAndExcept = ExpressionBuilder_1.ExpressionBuilder.merge(this.expression, this.advancedExpression);
        withoutConstantAndExcept.remove(except);
        var basicWithoutException = new ExpressionBuilder_1.ExpressionBuilder();
        basicWithoutException.fromExpressionBuilder(this.expression);
        basicWithoutException.remove(except);
        var advancedWithoutException = new ExpressionBuilder_1.ExpressionBuilder();
        advancedWithoutException.fromExpressionBuilder(this.advancedExpression);
        advancedWithoutException.remove(except);
        var constantWithoutException = new ExpressionBuilder_1.ExpressionBuilder();
        constantWithoutException.fromExpressionBuilder(this.constantExpression);
        constantWithoutException.remove(except);
        var disjunctionWithoutException = new ExpressionBuilder_1.ExpressionBuilder();
        disjunctionWithoutException.fromExpressionBuilder(this.disjunctionExpression);
        disjunctionWithoutException.remove(except);
        return new QueryBuilderExpression_1.QueryBuilderExpression(basicWithoutException.build(), advancedWithoutException.build(), constantWithoutException.build(), disjunctionWithoutException.build());
    };
    /**
     * Add fields to specifically include when the results return.
     *
     * This can be used to accelerate the execution time of every query, as there is much less data to process if you whitelist specific fields.
     * @param fields
     */
    QueryBuilder.prototype.addFieldsToInclude = function (fields) {
        this.fieldsToInclude = _.uniq((this.fieldsToInclude || []).concat(fields));
    };
    QueryBuilder.prototype.addRequiredFields = function (fields) {
        this.requiredFields = _.uniq(this.requiredFields.concat(fields));
    };
    /**
     * Add fields to specifically exclude when the results return.
     *
     * This can be used to accelerate the execution time of every query, as there is much less data to process if you blacklist specific fields.
     * @param fields
     */
    QueryBuilder.prototype.addFieldsToExclude = function (fields) {
        this.fieldsToExclude = _.uniq((this.fieldsToInclude || []).concat(fields));
    };
    QueryBuilder.prototype.computeFieldsToInclude = function () {
        if (this.includeRequiredFields || this.fieldsToInclude != null) {
            return this.requiredFields.concat(this.fieldsToInclude || []);
        }
        else {
            return null;
        }
    };
    /**
     * Adds or updates a single context key-value pair in the `context` object.
     *
     * @param key The context key. If this key is already present in the `context` object, its value is updated.
     * @param value The context value. This should be a string or an array of strings.
     */
    QueryBuilder.prototype.addContextValue = function (key, value) {
        if (this.context == null) {
            this.context = {};
        }
        this.context[key] = value;
    };
    /**
     * Merges the specified `values` into the `context` object.
     *
     * @param values The object to merge into the `context` object. Can contain multiple key-value pairs, where each value should be a string or an array of strings. If some keys are already present in the `context` object, their values are updated.
     */
    QueryBuilder.prototype.addContext = function (values) {
        if (this.context == null) {
            this.context = {};
        }
        _.extend(this.context, values);
    };
    /**
     * Returns true if the current query contains any expression that are considered "end user input".
     *
     * This usually means anything entered in the basic (see [q]{@link IQuery.options.q}) or long (see [lq]{@link IQuery.options.lq}) part of the query.
     */
    QueryBuilder.prototype.containsEndUserKeywords = function () {
        var query = this.build();
        return Utils_1.Utils.isNonEmptyString(query.q) || Utils_1.Utils.isNonEmptyString(query.lq);
    };
    Object.defineProperty(QueryBuilder.prototype, "groupBy", {
        get: function () {
            if (Utils_1.Utils.isEmptyArray(this.groupByRequests)) {
                return undefined;
            }
            return this.groupByRequests;
        },
        set: function (groupBy) {
            this.groupByRequests = groupBy;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(QueryBuilder.prototype, "facets", {
        get: function () {
            if (Utils_1.Utils.isEmptyArray(this.facetRequests)) {
                return undefined;
            }
            return this.facetRequests;
        },
        set: function (facets) {
            this.facetRequests = facets;
        },
        enumerable: true,
        configurable: true
    });
    return QueryBuilder;
}());
exports.QueryBuilder = QueryBuilder;
 
 
/***/ }),
/* 25 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __assign = (this && this.__assign) || Object.assign || function(t) {
    for (var s, i = 1, n = arguments.length; i < n; i++) {
        s = arguments[i];
        for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
            t[p] = s[p];
    }
    return t;
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { Iif (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        Iif (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            Iif (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
            Iif (y = 0, t) op = [0, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    Eif (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        Iif (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
Object.defineProperty(exports, "__esModule", { value: true });
var jstz = __webpack_require__(966);
__webpack_require__(968);
__webpack_require__(969);
__webpack_require__(970);
__webpack_require__(971);
var underscore_1 = __webpack_require__(1);
var HistoryController_1 = __webpack_require__(216);
var LocalStorageHistoryController_1 = __webpack_require__(299);
var NoopHistoryController_1 = __webpack_require__(301);
var QueryController_1 = __webpack_require__(78);
var InitializationEvents_1 = __webpack_require__(22);
var QueryEvents_1 = __webpack_require__(14);
var StandaloneSearchInterfaceEvents_1 = __webpack_require__(170);
var Assert_1 = __webpack_require__(12);
var ComponentOptionsModel_1 = __webpack_require__(55);
var ComponentStateModel_1 = __webpack_require__(134);
var Model_1 = __webpack_require__(26);
var QueryStateModel_1 = __webpack_require__(17);
var SearchEndpoint_1 = __webpack_require__(61);
var Dom_1 = __webpack_require__(0);
var HashUtils_1 = __webpack_require__(88);
var Utils_1 = __webpack_require__(5);
var AnalyticsActionListMeta_1 = __webpack_require__(7);
var NoopAnalyticsClient_1 = __webpack_require__(114);
var AriaLive_1 = __webpack_require__(478);
var BaseComponent_1 = __webpack_require__(113);
var ComponentOptions_1 = __webpack_require__(13);
var InitializationPlaceholder_1 = __webpack_require__(305);
var RootComponent_1 = __webpack_require__(133);
var Debug_1 = __webpack_require__(219);
var MissingTermManager_1 = __webpack_require__(306);
var OmniboxAnalytics_1 = __webpack_require__(496);
var ResponsiveComponents_1 = __webpack_require__(54);
var FacetColumnAutoLayoutAdjustment_1 = __webpack_require__(497);
var FacetValueStateHandler_1 = __webpack_require__(498);
var ComponentsTypes_1 = __webpack_require__(69);
var ScrollRestorer_1 = __webpack_require__(1072);
/**
 * The SearchInterface component is the root and main component of your Coveo search interface. You should place all
 * other Coveo components inside the SearchInterface component.
 *
 * It is also on the HTMLElement of the SearchInterface component that you call the {@link init} function.
 *
 * It is advisable to specify a unique HTML `id` attribute for the SearchInterface component in order to be able to
 * reference it easily.
 *
 * **Example:**
 *
 * ```html
 * <head>
 *
 * [ ... ]
 *
 * <script>
 *   document.addEventListener('DOMContentLoaded', function() {
 *
 *     [ ... ]
 *     // The init function is called on the SearchInterface element, in this case, the body of the page.
 *     Coveo.init(document.body);
 *
 *     [ ... ]
 *
 *     });
 * </script>
 *
 * [ ... ]
 * </head>
 *
 * <!-- Specifying a unique HTML id attribute for the SearchInterface component is good practice. -->
 * <body id='search' class='CoveoSearchInterface' [ ... other options ... ]>
 *
 *   [ ... ]
 *
 *   <!-- You should place all other Coveo components here, inside the SearchInterface component. -->
 *
 *   [ ... ]
 *
 * </body>
 * ```
 */
var SearchInterface = /** @class */ (function (_super) {
    __extends(SearchInterface, _super);
    /**
     * Creates a new SearchInterface. Initialize various singletons for the interface (e.g., usage analytics, query
     * controller, state model, etc.). Binds events related to the query.
     * @param element The HTMLElement on which to instantiate the component. This cannot be an `HTMLInputElement` for
     * technical reasons.
     * @param options The options for the SearchInterface.
     * @param analyticsOptions The options for the {@link Analytics} component. Since the Analytics component is normally
     * global, it needs to be passed at initialization of the whole interface.
     * @param _window The window object for the search interface. Used for unit tests, which can pass a mock. Default is
     * the global window object.
     */
    function SearchInterface(element, options, analyticsOptions, _window) {
        if (_window === void 0) { _window = window; }
        var _this = _super.call(this, element, SearchInterface.ID) || this;
        _this.element = element;
        _this.options = options;
        _this.analyticsOptions = analyticsOptions;
        _this._window = _window;
        _this.isResultsPerPageModifiedByPipeline = false;
        _this.options = ComponentOptions_1.ComponentOptions.initComponentOptions(element, SearchInterface, options);
        Assert_1.Assert.exists(element);
        Assert_1.Assert.exists(_this.options);
        _this.root = element;
        _this.setupQueryMode();
        _this.queryStateModel = new QueryStateModel_1.QueryStateModel(element);
        _this.componentStateModel = new ComponentStateModel_1.ComponentStateModel(element);
        _this.componentOptionsModel = new ComponentOptionsModel_1.ComponentOptionsModel(element);
        _this.usageAnalytics = _this.initializeAnalytics();
        _this.queryController = new QueryController_1.QueryController(element, _this.options, _this.usageAnalytics, _this);
        _this.facetValueStateHandler = new FacetValueStateHandler_1.FacetValueStateHandler(_this);
        var missingTermManagerArgs = {
            element: _this.element,
            queryStateModel: _this.queryStateModel,
            queryController: _this.queryController,
            usageAnalytics: _this.usageAnalytics
        };
        new MissingTermManager_1.MissingTermManager(missingTermManagerArgs);
        _this.omniboxAnalytics = new OmniboxAnalytics_1.OmniboxAnalytics();
        _this.setupEventsHandlers();
        _this.setupHistoryManager(element, _window);
        _this.setupScrollRestorer(element, _window, _this.queryStateModel);
        _this.element.style.display = element.style.display || 'block';
        _this.setupDebugInfo();
        _this.setupResponsiveComponents();
        _this.ariaLive = new AriaLive_1.AriaLive(element);
        return _this;
    }
    Object.defineProperty(SearchInterface.prototype, "resultsPerPage", {
        get: function () {
            Iif (this.queryPipelineConfigurationForResultsPerPage != null && this.queryPipelineConfigurationForResultsPerPage != 0) {
                return this.queryPipelineConfigurationForResultsPerPage;
            }
            Eif (this.queryController.options.resultsPerPage != null && this.queryController.options.resultsPerPage != 0) {
                return this.queryController.options.resultsPerPage;
            }
            // Things would get weird if somehow the number of results per page was set to 0 or not available.
            // Specially for the pager component. As such, we try to cover that corner case.
            this.logger.warn('Results per page is incoherent in the search interface.', this);
            return 10;
        },
        set: function (resultsPerPage) {
            this.options.resultsPerPage = this.queryController.options.resultsPerPage = resultsPerPage;
        },
        enumerable: true,
        configurable: true
    });
    SearchInterface.prototype.getOmniboxAnalytics = function () {
        return this.omniboxAnalytics;
    };
    /**
     * Attaches a component to the search interface. This allows the search interface to easily list and iterate over its
     * components.
     * @param type Normally, the component type is a unique identifier without the `Coveo` prefix (e.g., `CoveoFacet` ->
     * `Facet`, `CoveoPager` -> `Pager`, `CoveoQuerybox` -> `Querybox`, etc.).
     * @param component The component instance to attach.
     */
    SearchInterface.prototype.attachComponent = function (type, component) {
        this.getComponents(type).push(component);
    };
    /**
     * Detaches a component from the search interface.
     * @param type Normally, the component type is a unique identifier without the `Coveo` prefix (e.g., `CoveoFacet` ->
     * `Facet`, `CoveoPager` -> `Pager`, `CoveoQuerybox` -> `Querybox`, etc.).
     * @param component The component instance to detach.
     */
    SearchInterface.prototype.detachComponent = function (type, component) {
        var components = this.getComponents(type);
        var index = underscore_1.indexOf(components, component);
        Eif (index > -1) {
            components.splice(index, 1);
        }
    };
    /**
     * Returns the bindings, or environment, for the current component.
     * @returns {IComponentBindings}
     */
    SearchInterface.prototype.getBindings = function () {
        return {
            root: this.root,
            queryStateModel: this.queryStateModel,
            queryController: this.queryController,
            searchInterface: this,
            componentStateModel: this.componentStateModel,
            componentOptionsModel: this.componentOptionsModel,
            usageAnalytics: this.usageAnalytics
        };
    };
    /**
     * Gets the query context for the current search interface.
     *
     * If the search interface has performed at least one query, it will try to resolve the context from the last query sent to the Coveo Search API.
     *
     * If the search interface has not performed a query yet, it will try to resolve the context from any avaiable {@link PipelineContext} component.
     *
     * If multiple {@link PipelineContext} components are available, it will merge all context values together.
     *
     * **Note:**
     * Having multiple PipelineContext components in the same search interface is not recommended, especially if some context keys are repeated across those components.
     *
     * If no context is found, returns `undefined`
     */
    SearchInterface.prototype.getQueryContext = function () {
        var ret;
        var lastQuery = this.queryController.getLastQuery();
        if (lastQuery.context) {
            ret = lastQuery.context;
        }
        else {
            var pipelines = this.getComponents('PipelineContext');
            if (pipelines && !underscore_1.isEmpty(pipelines)) {
                var contextMerged = underscore_1.chain(pipelines)
                    .map(function (pipeline) { return pipeline.getContext(); })
                    .reduce(function (memo, context) { return (__assign({}, memo, context)); }, {})
                    .value();
                Eif (!underscore_1.isEmpty(contextMerged)) {
                    ret = contextMerged;
                }
            }
        }
        return ret;
    };
    /**
     * Gets all the components of a given type.
     * @param type Normally, the component type is a unique identifier without the `Coveo` prefix (e.g., `CoveoFacet` ->
     * `Facet`, `CoveoPager` -> `Pager`, `CoveoQuerybox` -> `Querybox`, etc.).
     */
    SearchInterface.prototype.getComponents = function (type) {
        if (this.attachedComponents == null) {
            this.attachedComponents = {};
        }
        if (!(type in this.attachedComponents)) {
            this.attachedComponents[type] = [];
        }
        return this.attachedComponents[type];
    };
    /**
     * Detaches from the SearchInterface every component that is inside the given element.
     * @param element
     */
    SearchInterface.prototype.detachComponentsInside = function (element) {
        var _this = this;
        underscore_1.each(this.attachedComponents, function (components, type) {
            components
                .filter(function (component) { return element != component.element && element.contains(component.element); })
                .forEach(function (component) { return _this.detachComponent(type, component); });
        });
    };
    SearchInterface.prototype.initializeAnalytics = function () {
        var analyticsRef = BaseComponent_1.BaseComponent.getComponentRef('Analytics');
        Eif (analyticsRef) {
            return analyticsRef.create(this.element, this.analyticsOptions, this.getBindings());
        }
        return new NoopAnalyticsClient_1.NoopAnalyticsClient();
    };
    SearchInterface.prototype.setupHistoryManager = function (element, _window) {
        var _this = this;
        if (!this.options.enableHistory) {
            this.historyManager = new NoopHistoryController_1.NoopHistoryController();
            Dom_1.$$(this.element).on(InitializationEvents_1.InitializationEvents.restoreHistoryState, function () {
                return _this.queryStateModel.setMultiple(__assign({}, _this.queryStateModel.defaultAttributes));
            });
            return;
        }
        if (this.options.useLocalStorageForHistory) {
            this.historyManager = new LocalStorageHistoryController_1.LocalStorageHistoryController(element, _window, this.queryStateModel, this.queryController);
            return;
        }
        this.historyManager = new HistoryController_1.HistoryController(element, _window, this.queryStateModel, this.queryController);
    };
    SearchInterface.prototype.setupQueryMode = function () {
        if (this.options.allowQueriesWithoutKeywords) {
            this.initializeEmptyQueryAllowed();
        }
        else {
            this.initializeEmptyQueryNotAllowed();
        }
    };
    SearchInterface.prototype.setupEventsHandlers = function () {
        var _this = this;
        var eventName = this.queryStateModel.getEventName(Model_1.Model.eventTypes.preprocess);
        Dom_1.$$(this.element).on(eventName, function (e, args) { return _this.handlePreprocessQueryStateModel(args); });
        Dom_1.$$(this.element).on(QueryEvents_1.QueryEvents.buildingQuery, function (e, args) { return _this.handleBuildingQuery(args); });
        Dom_1.$$(this.element).on(QueryEvents_1.QueryEvents.querySuccess, function (e, args) { return _this.handleQuerySuccess(args); });
        Dom_1.$$(this.element).on(QueryEvents_1.QueryEvents.queryError, function (e, args) { return _this.handleQueryError(args); });
        Dom_1.$$(this.element).on(InitializationEvents_1.InitializationEvents.afterComponentsInitialization, function () { return _this.handleAfterComponentsInitialization(); });
        var debugChanged = this.queryStateModel.getEventName(Model_1.Model.eventTypes.changeOne + QueryStateModel_1.QueryStateModel.attributesEnum.debug);
        Dom_1.$$(this.element).on(debugChanged, function (e, args) { return _this.handleDebugModeChange(args); });
        this.queryStateModel.registerNewAttribute(QueryStateModel_1.QueryStateModel.attributesEnum.fv, {});
        var eventNameQuickview = this.queryStateModel.getEventName(Model_1.Model.eventTypes.changeOne + QueryStateModel_1.QueryStateModel.attributesEnum.quickview);
        Dom_1.$$(this.element).on(eventNameQuickview, function (e, args) { return _this.handleQuickviewChanged(args); });
    };
    SearchInterface.prototype.setupDebugInfo = function () {
        var _this = this;
        if (this.options.enableDebugInfo) {
            setTimeout(function () { return new Debug_1.Debug(_this.element, _this.getBindings()); });
        }
    };
    SearchInterface.prototype.setupScrollRestorer = function (element, _window, queryStateModel) {
        if (this.options.enableScrollRestoration) {
            this.scrollRestorer = new ScrollRestorer_1.ScrollRestorer(element, queryStateModel);
        }
    };
    SearchInterface.prototype.setupResponsiveComponents = function () {
        this.responsiveComponents = new ResponsiveComponents_1.ResponsiveComponents();
        this.responsiveComponents.setMediumScreenWidth(this.options.responsiveMediumBreakpoint);
        this.responsiveComponents.setSmallScreenWidth(this.options.responsiveSmallBreakpoint);
        this.responsiveComponents.setResponsiveMode(this.options.responsiveMode);
        this.ensureFacetsMobileMode();
    };
    SearchInterface.prototype.ensureFacetsMobileMode = function () {
        var _this = this;
        Iif (this.root.querySelector('.CoveoFacetsMobileMode')) {
            return;
        }
        new Promise(function(resolve) { resolve(); }).then((function () {
            var loadedModule = __webpack_require__(176);
            var facetsMobileModeCtor = loadedModule.FacetsMobileMode;
            var facetsMobileModeEl = Dom_1.$$('div');
            Dom_1.$$(_this.element).prepend(facetsMobileModeEl.el);
            var options = _this.options.originalOptionsObject['FacetsMobileMode'] || {};
            new facetsMobileModeCtor(facetsMobileModeEl.el, options, _this.getBindings());
        }).bind(null, __webpack_require__)).catch(null);
    };
    SearchInterface.prototype.handleDebugModeChange = function (args) {
        var _this = this;
        if (args.value && !this.relevanceInspector && this.options.enableDebugInfo) {
            new Promise(function(resolve) { resolve(); }).then((function () {
                var loadedModule = __webpack_require__(315);
                var relevanceInspectorCtor = loadedModule.RelevanceInspector;
                var relevanceInspectorElement = Dom_1.$$('btn');
                Dom_1.$$(_this.element).prepend(relevanceInspectorElement.el);
                _this.relevanceInspector = new relevanceInspectorCtor(relevanceInspectorElement.el, _this.getBindings());
            }).bind(null, __webpack_require__)).catch(null);
        }
    };
    SearchInterface.prototype.handlePreprocessQueryStateModel = function (args) {
        var tgFromModel = this.queryStateModel.get(QueryStateModel_1.QueryStateModel.attributesEnum.tg);
        var tFromModel = this.queryStateModel.get(QueryStateModel_1.QueryStateModel.attributesEnum.t);
        var tg = tgFromModel;
        var t = tFromModel;
        // if you want to set the tab group
        if (args && args.tg !== undefined) {
            args.tg = this.getTabGroupId(args.tg);
            Iif (tg != args.tg) {
                args.t = args.t || QueryStateModel_1.QueryStateModel.defaultAttributes.t;
                args.sort = args.sort || QueryStateModel_1.QueryStateModel.defaultAttributes.sort;
                tg = args.tg;
            }
        }
        if (args && args.t !== undefined) {
            args.t = this.getTabId(tg, args.t);
            Iif (t != args.t) {
                args.sort = args.sort || QueryStateModel_1.QueryStateModel.defaultAttributes.sort;
                t = args.t;
            }
        }
        if (args && args.sort !== undefined) {
            args.sort = this.getSort(t, args.sort);
        }
        if (args && args.quickview !== undefined) {
            args.quickview = this.getQuickview(args.quickview);
        }
        // `fv:` states are intended to be redirected and used on a standard Search Interface,
        // else the state gets transformed to `hd` before the redirection.
        if (args && args.fv && !(this instanceof StandaloneSearchInterface)) {
            this.facetValueStateHandler.handleFacetValueState(args);
        }
    };
    SearchInterface.prototype.getTabGroupId = function (tabGroupId) {
        var tabGroupRef = BaseComponent_1.BaseComponent.getComponentRef('TabGroup');
        Iif (tabGroupRef) {
            var tabGroups = this.getComponents(tabGroupRef.ID);
            // check if the tabgroup is correct
            if (tabGroupId != QueryStateModel_1.QueryStateModel.defaultAttributes.tg &&
                underscore_1.any(tabGroups, function (tabGroup) { return !tabGroup.disabled && tabGroupId == tabGroup.options.id; })) {
                return tabGroupId;
            }
            // select the first tabGroup
            if (tabGroups.length > 0) {
                return tabGroups[0].options.id;
            }
        }
        return QueryStateModel_1.QueryStateModel.defaultAttributes.tg;
    };
    SearchInterface.prototype.getTabId = function (tabGroupId, tabId) {
        var tabRef = BaseComponent_1.BaseComponent.getComponentRef('Tab');
        var tabGroupRef = BaseComponent_1.BaseComponent.getComponentRef('TabGroup');
        Eif (tabRef) {
            var tabs = this.getComponents(tabRef.ID);
            Iif (tabGroupRef) {
                // if has a tabGroup
                if (tabGroupId != QueryStateModel_1.QueryStateModel.defaultAttributes.tg) {
                    var tabGroups = this.getComponents(tabGroupRef.ID);
                    var tabGroup_1 = underscore_1.find(tabGroups, function (tabGroup) { return tabGroupId == tabGroup.options.id; });
                    // check if the tabgroup contain this tab
                    if (tabId != QueryStateModel_1.QueryStateModel.defaultAttributes.t &&
                        underscore_1.any(tabs, function (tab) { return tabId == tab.options.id && tabGroup_1.isElementIncludedInTabGroup(tab.element); })) {
                        return tabId;
                    }
                    // select the first tab in the tabGroup
                    var tab = underscore_1.find(tabs, function (tab) { return tabGroup_1.isElementIncludedInTabGroup(tab.element); });
                    if (tab != null) {
                        return tab.options.id;
                    }
                    return QueryStateModel_1.QueryStateModel.defaultAttributes.t;
                }
            }
            // check if the tab is correct
            Iif (tabId != QueryStateModel_1.QueryStateModel.defaultAttributes.t && underscore_1.any(tabs, function (tab) { return tabId == tab.options.id; })) {
                return tabId;
            }
            // select the first tab
            Iif (tabs.length > 0) {
                return tabs[0].options.id;
            }
        }
        return QueryStateModel_1.QueryStateModel.defaultAttributes.t;
    };
    SearchInterface.prototype.getSort = function (tabId, sortId) {
        var sortRef = BaseComponent_1.BaseComponent.getComponentRef('Sort');
        Eif (sortRef) {
            var sorts = this.getComponents(sortRef.ID);
            // if has a selected tab
            var tabRef = BaseComponent_1.BaseComponent.getComponentRef('Tab');
            Eif (tabRef) {
                Iif (tabId != QueryStateModel_1.QueryStateModel.defaultAttributes.t) {
                    var tabs = this.getComponents(tabRef.ID);
                    var tab_1 = underscore_1.find(tabs, function (tab) { return tabId == tab.options.id; });
                    var sortCriteria = tab_1.options.sort;
                    // check if the tab contain this sort
                    if (sortId != QueryStateModel_1.QueryStateModel.defaultAttributes.sort &&
                        underscore_1.any(sorts, function (sort) { return tab_1.isElementIncludedInTab(sort.element) && sort.match(sortId); })) {
                        return sortId;
                    }
                    else if (sortCriteria != null) {
                        // if not and tab.options.sort is set apply it
                        return sortCriteria.toString();
                    }
                    // select the first sort in the tab
                    var sort = underscore_1.find(sorts, function (sort) { return tab_1.isElementIncludedInTab(sort.element); });
                    if (sort != null) {
                        return sort.options.sortCriteria[0].toString();
                    }
                    return QueryStateModel_1.QueryStateModel.defaultAttributes.sort;
                }
            }
            // check if the sort is correct
            Iif (sortId != QueryStateModel_1.QueryStateModel.defaultAttributes.sort && underscore_1.any(sorts, function (sort) { return sort.match(sortId); })) {
                return sortId;
            }
            // select the first sort
            Iif (sorts.length > 0) {
                return sorts[0].options.sortCriteria[0].toString();
            }
        }
        return QueryStateModel_1.QueryStateModel.defaultAttributes.sort;
    };
    SearchInterface.prototype.getQuickview = function (quickviewId) {
        var quickviewRef = BaseComponent_1.BaseComponent.getComponentRef('Quickview');
        Eif (quickviewRef) {
            var quickviews = this.getComponents(quickviewRef.ID);
            Iif (underscore_1.any(quickviews, function (quickview) { return quickview.getHashId() == quickviewId; })) {
                return quickviewId;
            }
        }
        return QueryStateModel_1.QueryStateModel.defaultAttributes.quickview;
    };
    SearchInterface.prototype.handleQuickviewChanged = function (args) {
        var quickviewRef = BaseComponent_1.BaseComponent.getComponentRef('Quickview');
        if (quickviewRef) {
            var quickviews = this.getComponents(quickviewRef.ID);
            if (args.value != '') {
                var quickviewsPartition = underscore_1.partition(quickviews, function (quickview) { return quickview.getHashId() == args.value; });
                if (quickviewsPartition[0].length != 0) {
                    underscore_1.first(quickviewsPartition[0]).open();
                    underscore_1.each(underscore_1.tail(quickviewsPartition[0]), function (quickview) { return quickview.close(); });
                }
                underscore_1.each(quickviewsPartition[1], function (quickview) { return quickview.close(); });
            }
            else {
                underscore_1.each(quickviews, function (quickview) {
                    quickview.close();
                });
            }
        }
    };
    SearchInterface.prototype.handleBuildingQuery = function (data) {
        if (this.options.enableDuplicateFiltering) {
            data.queryBuilder.enableDuplicateFiltering = true;
        }
        if (!Utils_1.Utils.isNullOrUndefined(this.options.pipeline)) {
            data.queryBuilder.pipeline = this.options.pipeline;
        }
        if (!Utils_1.Utils.isNullOrUndefined(this.options.maximumAge)) {
            data.queryBuilder.maximumAge = this.options.maximumAge;
        }
        Eif (!Utils_1.Utils.isNullOrUndefined(this.options.resultsPerPage)) {
            data.queryBuilder.numberOfResults = this.options.resultsPerPage;
        }
        Eif (!Utils_1.Utils.isNullOrUndefined(this.options.excerptLength)) {
            data.queryBuilder.excerptLength = this.options.excerptLength;
        }
        if (Utils_1.Utils.isNonEmptyString(this.options.expression)) {
            data.queryBuilder.constantExpression.add(this.options.expression);
        }
        if (Utils_1.Utils.isNonEmptyString(this.options.filterField)) {
            data.queryBuilder.filterField = this.options.filterField;
        }
        Eif (Utils_1.Utils.isNonEmptyString(this.options.timezone)) {
            data.queryBuilder.timezone = this.options.timezone;
        }
        data.queryBuilder.enableCollaborativeRating = this.options.enableCollaborativeRating;
        data.queryBuilder.enableDuplicateFiltering = this.options.enableDuplicateFiltering;
        data.queryBuilder.allowQueriesWithoutKeywords = this.options.allowQueriesWithoutKeywords;
        var endpoint = this.queryController.getEndpoint();
        Eif (endpoint != null && endpoint.options) {
            Iif (this.queryStateModel.get(QueryStateModel_1.QueryStateModel.attributesEnum.debug)) {
                data.queryBuilder.maximumAge = 0;
                data.queryBuilder.enableDebug = true;
                data.queryBuilder.fieldsToExclude = ['allmetadatavalues'];
                data.queryBuilder.fieldsToInclude = null;
            }
        }
    };
    SearchInterface.prototype.handleQuerySuccess = function (data) {
        var noResults = data.results.results.length == 0;
        this.toggleSectionState('coveo-no-results', noResults);
        this.handlePossiblyModifiedNumberOfResultsInQueryPipeline(data);
        var resultsHeader = Dom_1.$$(this.element).find('.coveo-results-header');
        Iif (resultsHeader) {
            Dom_1.$$(resultsHeader).removeClass('coveo-query-error');
        }
    };
    SearchInterface.prototype.handlePossiblyModifiedNumberOfResultsInQueryPipeline = function (data) {
        Iif (!data || !data.query || !data.results) {
            return;
        }
        var numberOfRequestedResults = data.query.numberOfResults;
        var numberOfResultsActuallyReturned = data.results.results.length;
        var areLastPageResults = data.results.totalCountFiltered - data.query.firstResult === numberOfResultsActuallyReturned;
        var moreResultsAvailable = !areLastPageResults && data.results.totalCountFiltered > numberOfResultsActuallyReturned;
        if (numberOfRequestedResults != numberOfResultsActuallyReturned && moreResultsAvailable) {
            this.isResultsPerPageModifiedByPipeline = true;
            this.queryPipelineConfigurationForResultsPerPage = numberOfResultsActuallyReturned;
        }
        else {
            this.isResultsPerPageModifiedByPipeline = false;
            this.queryPipelineConfigurationForResultsPerPage = null;
        }
    };
    SearchInterface.prototype.handleQueryError = function (data) {
        this.toggleSectionState('coveo-no-results');
        var resultsHeader = Dom_1.$$(this.element).find('.coveo-results-header');
        Iif (resultsHeader) {
            Dom_1.$$(resultsHeader).addClass('coveo-query-error');
        }
    };
    SearchInterface.prototype.handleAfterComponentsInitialization = function () {
        var _this = this;
        underscore_1.each(this.attachedComponents, function (components) {
            components.forEach(function (component) {
                Iif (FacetColumnAutoLayoutAdjustment_1.FacetColumnAutoLayoutAdjustment.isAutoLayoutAdjustable(component)) {
                    FacetColumnAutoLayoutAdjustment_1.FacetColumnAutoLayoutAdjustment.initializeAutoLayoutAdjustment(_this.element, component);
                }
            });
        });
        Iif (this.duplicatesFacets.length) {
            this.logger.warn("The following facets have duplicate id/field:", this.duplicatesFacets, "Ensure that each facet in your search interface has a unique id.");
        }
    };
    Object.defineProperty(SearchInterface.prototype, "duplicatesFacets", {
        get: function () {
            var duplicate = [];
            var facets = ComponentsTypes_1.ComponentsTypes.getAllFacetsFromSearchInterface(this);
            facets.forEach(function (facet) {
                facets.forEach(function (cmp) {
                    if (facet == cmp) {
                        return;
                    }
                    if (facet.options.id === cmp.options.id) {
                        duplicate.push(facet);
                        return;
                    }
                });
            });
            return duplicate;
        },
        enumerable: true,
        configurable: true
    });
    SearchInterface.prototype.toggleSectionState = function (cssClass, toggle) {
        var _this = this;
        if (toggle === void 0) { toggle = true; }
        var facetSection = Dom_1.$$(this.element).find('.coveo-facet-column');
        var resultsSection = Dom_1.$$(this.element).find('.coveo-results-column');
        var resultsHeader = Dom_1.$$(this.element).find('.coveo-results-header');
        var facetSearchs = Dom_1.$$(this.element).findAll('.coveo-facet-search-results');
        var recommendationSection = Dom_1.$$(this.element).find('.coveo-recommendation-main-section');
        if (facetSection) {
            Dom_1.$$(facetSection).toggleClass(cssClass, toggle && !this.queryStateModel.atLeastOneFacetIsActive());
        }
        if (resultsSection) {
            Dom_1.$$(resultsSection).toggleClass(cssClass, toggle && !this.queryStateModel.atLeastOneFacetIsActive());
        }
        Iif (resultsHeader) {
            Dom_1.$$(resultsHeader).toggleClass(cssClass, toggle && !this.queryStateModel.atLeastOneFacetIsActive());
        }
        if (recommendationSection) {
            Dom_1.$$(recommendationSection).toggleClass(cssClass, toggle);
        }
        Iif (facetSearchs && facetSearchs.length > 0) {
            underscore_1.each(facetSearchs, function (facetSearch) {
                Dom_1.$$(facetSearch).toggleClass(cssClass, toggle && !_this.queryStateModel.atLeastOneFacetIsActive());
            });
        }
    };
    SearchInterface.prototype.initializeEmptyQueryAllowed = function () {
        new InitializationPlaceholder_1.InitializationPlaceholder(this.element).withFullInitializationStyling().withAllPlaceholders();
    };
    SearchInterface.prototype.initializeEmptyQueryNotAllowed = function () {
        var _this = this;
        var placeholder = new InitializationPlaceholder_1.InitializationPlaceholder(this.element)
            .withEventToRemovePlaceholder(QueryEvents_1.QueryEvents.newQuery)
            .withFullInitializationStyling()
            .withHiddenRootElement()
            .withPlaceholderForFacets()
            .withPlaceholderForResultList();
        Dom_1.$$(this.root).on(InitializationEvents_1.InitializationEvents.restoreHistoryState, function () {
            placeholder.withVisibleRootElement();
            Eif (_this.queryStateModel.get('q') == '') {
                placeholder.withWaitingForFirstQueryMode();
            }
        });
        Dom_1.$$(this.element).on(QueryEvents_1.QueryEvents.doneBuildingQuery, function (e, args) {
            if (!args.queryBuilder.containsEndUserKeywords()) {
                var lastQuery = _this.queryController.getLastQuery().q;
                if (Utils_1.Utils.isNonEmptyString(lastQuery)) {
                    _this.queryStateModel.set(QueryStateModel_1.QUERY_STATE_ATTRIBUTES.Q, lastQuery);
                    args.queryBuilder.expression.add(lastQuery);
                }
                else {
                    _this.logger.info('Query cancelled by the Search Interface', 'Configuration does not allow empty query', _this, _this.options);
                    args.cancel = true;
                    _this.queryStateModel.reset();
                    new InitializationPlaceholder_1.InitializationPlaceholder(_this.element)
                        .withEventToRemovePlaceholder(QueryEvents_1.QueryEvents.newQuery)
                        .withFullInitializationStyling()
                        .withVisibleRootElement()
                        .withPlaceholderForFacets()
                        .withPlaceholderForResultList()
                        .withWaitingForFirstQueryMode();
                }
            }
        });
    };
    SearchInterface.ID = 'SearchInterface';
    /**
     * The options for the search interface
     * @componentOptions
     */
    SearchInterface.options = {
        /**
         * Whether to allow the end user to navigate search history using the **Back** and **Forward** buttons
         * of the browser.
         *
         * If this option is set to `true`, the state of the current query will be saved in the hash portion
         * of the URL when the user submits the query.
         *
         * **Example:**
         * > If the `enableHistory` option is `true` and the current query is `foobar`, the SearchInterface component
         * > saves `q=foobar` in the URL hash when the user submits the query.
         *
         * **Note:** Avoid setting this option to `true` on a search interface that relates to a Coveo for Salesforce Full Search or Insight Panel component, otherwise the component won't initialize correctly.
         */
        enableHistory: ComponentOptions_1.ComponentOptions.buildBooleanOption({ defaultValue: false }),
        /**
         * Specifies whether to enable automatic responsive mode (i.e., automatically placing {@link Facet} and {@link Tab}
         * components in dropdown menus under the search box when the width of the SearchInterface HTML element reaches or
         * falls behind a certain pixel threshold).
         *
         * You might want to set this option to `false` if automatic responsive mode does not suit the specific design needs
         * of your implementation.
         *
         * **Note:**
         *
         * > If this option is `true`, you can also specify whether to enable responsive mode for Facet components (see
         * > {@link Facet.options.enableResponsiveMode}) and for Tab components (see
         * > {@link Tab.options.enableResponsiveMode}).
         * >
         * > In addition, you can specify the label you wish to display on the dropdown buttons (see
         * > {@link Facet.options.dropdownHeaderLabel} and {@link Tab.options.dropdownHeaderLabel}).
         *
         * Default value is `true`.
         */
        enableAutomaticResponsiveMode: ComponentOptions_1.ComponentOptions.buildBooleanOption({ defaultValue: true }),
        /**
         * Specifies whether to save the interface state in the local storage of the browser.
         *
         * You might want to set this option to `true` for reasons specifically important for your implementation.
         *
         * Default value is `false`.
         */
        useLocalStorageForHistory: ComponentOptions_1.ComponentOptions.buildBooleanOption({ defaultValue: false }),
        /**
         * Specifies the number of results to display on each page.
         *
         * For more advanced features, see the {@link ResultsPerPage} component.
         *
         * **Note:**
         *
         * > When the {@link ResultsPerPage} component is present in the page, this option gets overridden and is useless.
         *
         * Default value is `10`. Minimum value is `0`.
         */
        resultsPerPage: ComponentOptions_1.ComponentOptions.buildNumberOption({ defaultValue: 10, min: 0 }),
        /**
         * Specifies the number of characters to get at query time to create an excerpt of the result.
         *
         * This setting is global and cannot be modified on a per-result basis.
         *
         * See also the {@link Excerpt} component.
         *
         * Default value is `200`. Minimum value is `0`.
         */
        excerptLength: ComponentOptions_1.ComponentOptions.buildNumberOption({ defaultValue: 200, min: 0 }),
        /**
         * Specifies an expression to add to each query.
         *
         * You might want to use this options to add a global filter to your entire search interface that applies for all
         * tabs.
         *
         * You should not use this option to address security concerns (it is JavaScript, after all).
         *
         * **Note:**
         *
         * > It also is possible to set this option separately for each {@link Tab} component
         * > (see {@link Tab.options.expression}).
         *
         * Default value is `''`.
         */
        expression: ComponentOptions_1.ComponentOptions.buildQueryExpressionOption({ defaultValue: '' }),
        /**
         * Specifies the name of a field to use as a custom filter when executing the query (also referred to as
         * "folding").
         *
         * Setting a value for this option causes the index to return only one result having any particular value inside the
         * filter field. Any other matching result is "folded" inside the childResults member of each JSON query result.
         *
         * This feature is typically useful with threaded conversations to include only one top-level result per
         * conversation. Thus, the field you specify for this option will typically be value unique to each thread that is
         * shared by all items (e.g., posts, emails, etc) in the thread.
         *
         * For more advanced features, see the {@link Folding} component.
         *
         * Default value is the empty string (`''`).
         */
        filterField: ComponentOptions_1.ComponentOptions.buildFieldOption({ defaultValue: '' }),
        /**
         * Specifies whether to display a loading animation before the first query successfully returns.
         *
         * **Note:**
         *
         * > If you do not set this options to `false`, the loading animation will still run until the first query
         * > successfully returns even if the [autoTriggerQuery]{@link SearchInterface.options.autoTriggerQuery} option is
         * `false`.
         *
         * See also the [firstLoadingAnimation]{@link SearchInterface.options.firstLoadingAnimation} option.
         *
         * Default value is `true`.
         *
         * @deprecated This option is exposed for legacy reasons. Since the
         * [July 2017 Release (v2.2900.23)](https://docs.coveo.com/en/432/), the loading animation is composed of
         * placeholders, making this option is obsolete.
         */
        hideUntilFirstQuery: ComponentOptions_1.ComponentOptions.buildBooleanOption({
            deprecated: 'Exposed for legacy reasons. The loading animation is now composed of placeholders, and this option is obsolete.'
        }),
        /**
         * Specifies the animation that you wish to display while your interface is loading.
         *
         * You can either specify the CSS selector of an HTML element that matches the default CSS class
         * (`coveo-first-loading-animation`), or add `-selector` to the markup attribute of this option to specify the CSS
         * selector of an HTML element that matches any CSS class.
         *
         * See also the [hideUntilFirstQuery]{@link SearchInterface.options.hideUntilFirstQuery} option.
         *
         * **Examples:**
         *
         * In this first case, the SearchInterface uses the HTML element whose `id` attribute is `MyAnimation` as the
         * loading animation only if the `class` attribute of this element also matches `coveo-first-loading-animation`.
         * Default loading animation CSS, which you can customize as you see fit, applies to this HTML element.
         * ```html
         * <div class='CoveoSearchInterface' data-first-loading-animation='#MyAnimation'>
         *   <div id='MyAnimation' class='coveo-first-loading-animation'>
         *     <!-- ... -->
         *   </div>
         *   <!-- ... -->
         * </div>
         * ```
         *
         * In this second case, the SearchInterface uses the HTML element whose `id` attribute is `MyAnimation` as the
         * loading animation no matter what CSS class it matches. However, if the `class` attribute of the HTML element does
         * not match `coveo-first-loading-animation`, no default loading animation CSS applies to this HTML element.
         * Normally, you should only use `data-first-loading-animation-selector` if you want to completely override the
         * default loading animation CSS.
         * ```html
         * <div class='CoveoSearchInterface' data-first-loading-animation-selector='#MyAnimation'>
         *   <div id='MyAnimation' class='my-custom-loading-animation-class'>
         *     <!-- ... -->
         *   </div>
         *   <!-- ... -->
         * </div>
         * ```
         *
         * By default, the loading animation is a Coveo CSS animation (which you can customize with CSS).
         *
         * @deprecated This option is exposed for legacy reasons. Since the
         * [July 2017 Release (v2.2900.23)](https://docs.coveo.com/en/432/), the loading animation is composed of
         * placeholders, making this option is obsolete.
         */
        firstLoadingAnimation: ComponentOptions_1.ComponentOptions.buildChildHtmlElementOption({
            deprecated: 'Exposed for legacy reasons. The loading animation is now composed of placeholder, and this options is obsolete.'
        }),
        /**
         * Specifies whether to trigger the first query automatically when the page finishes loading.
         *
         * Default value is `true`.
         */
        autoTriggerQuery: ComponentOptions_1.ComponentOptions.buildBooleanOption({ defaultValue: true }),
        /**
         * Specifies if the search interface should perform queries when no keywords are entered by the end user.
         *
         * When this option is set to true, the interface will initially only load with the search box, as long as you have a search box component in your interface.
         *
         * Once the user submits a query, the full search interface loads to display the results.
         *
         * When using the Coveo for Salesforce Free edition, this option is automatically set to false, and should not be changed.
         *
         * This option interacts closely with the {@link SearchInterface.options.autoTriggerQuery} option, as the automatic query is not triggered when there are no keywords.
         *
         * It also modifies the {@link IQuery.allowQueriesWithoutKeywords} query parameter.
         *
         * Default value is `true`, except in Coveo for Salesforce Free edition in which it is `false`.
         */
        allowQueriesWithoutKeywords: ComponentOptions_1.ComponentOptions.buildBooleanOption({ defaultValue: true }),
        endpoint: ComponentOptions_1.ComponentOptions.buildCustomOption(function (endpoint) { return (endpoint != null && endpoint in SearchEndpoint_1.SearchEndpoint.endpoints ? SearchEndpoint_1.SearchEndpoint.endpoints[endpoint] : null); }, { defaultFunction: function () { return SearchEndpoint_1.SearchEndpoint.endpoints['default']; } }),
        /**
         * Specifies the timezone in which the search interface is loaded. This allows the index to recognize some special
         * query syntax.
         *
         * This option must have a valid IANA zone info key (AKA the Olson time zone database) as its value.
         *
         * **Example:** `America/New_York`.
         *
         * By default, the search interface allows a library to try to detect the timezone automatically.
         */
        timezone: ComponentOptions_1.ComponentOptions.buildStringOption({ defaultFunction: function () { return jstz.determine().name(); } }),
        /**
         * Specifies whether to enable the feature that allows the end user to ALT + double click any result to open a debug
         * page with detailed information about all properties and fields for that result.
         *
         * Enabling this feature causes no security concern; the entire debug information is always visible to the end user
         * through the browser developer console or by calling the Coveo API directly.
         *
         * Default value is `true`.
         */
        enableDebugInfo: ComponentOptions_1.ComponentOptions.buildBooleanOption({ defaultValue: true }),
        /**
         * **Note:**
         *
         * > The Coveo Cloud V2 platform does not support collaborative rating. Therefore, this option is obsolete in Coveo Cloud V2.
         *
         * Specifies whether to enable collaborative rating, which you can leverage using the
         * [`ResultRating`]{@link ResultRating} component.
         *
         * Setting this option to `true` has no effect unless collaborative rating is also enabled on your Coveo index.
         *
         * Default value is `false`.
         */
        enableCollaborativeRating: ComponentOptions_1.ComponentOptions.buildBooleanOption({ defaultValue: false }),
        /**
         * Whether to filter out duplicates, so that items resembling one another only appear once in the query results.
         *
         * **Notes:**
         * - Two items must be at least 85% similar to one another to be considered duplicates.
         * - When a pair of duplicates is found, only the higher-ranked item of the two is kept in the result set.
         * - Enabling this feature can make the total result count less precise, as only the requested page of query results is submitted to duplicate filtering.
         * - This option can also be explicitly set on the [`Tab`]{@link Tab} component. When this is the case, the `Tab` configuration prevails.
         */
        enableDuplicateFiltering: ComponentOptions_1.ComponentOptions.buildBooleanOption({ defaultValue: false }),
        /**
         * Specifies the name of the query pipeline to use for the queries.
         *
         * You can specify a value for this option if your index is in a Coveo Cloud organization in which pipelines have
         * been created (see [Adding and Managing Query Pipelines](https://docs.coveo.com/en/1791/)).
         *
         * **Note:**
         *
         * > It also is possible to set this option separately for each {@link Tab} component
         * > (see {@link Tab.options.pipeline}).
         *
         * Default value is `undefined`, which means that the search interface uses the default pipeline.
         */
        pipeline: ComponentOptions_1.ComponentOptions.buildStringOption(),
        /**
         * Specifies the maximum age (in milliseconds) that cached query results can have to still be usable as results
         * instead of performing a new query on the index. The cache is located in the Coveo Search API (which resides
         * between the index and the search interface).
         *
         * If cached results that are older than the age you specify in this option are available, the framework will not
         * use these results; it will rather perform a new query on the index.
         *
         * On high-volume public web sites, specifying a higher value for this option can greatly improve query response
         * time at the cost of result freshness.
         *
         * **Note:**
         *
         * > It also is possible to set this option separately for each {@link Tab} component
         * > (see {@link Tab.options.maximumAge}).
         *
         * Default value is `undefined`, which means that the search interface lets the Coveo Search API determine the
         * maximum cache age. This is typically equivalent to 30 minutes (see
         * [maximumAge](https://docs.coveo.com/en/1461/#RestQueryParameters-maximumAge)).
         */
        maximumAge: ComponentOptions_1.ComponentOptions.buildNumberOption(),
        /**
         * Specifies the search page you wish to navigate to when instantiating a standalone search box interface.
         *
         * Default value is `undefined`, which means that the search interface does not redirect.
         */
        searchPageUri: ComponentOptions_1.ComponentOptions.buildStringOption(),
        /**
         * Specifies the search interface width that should be considered "medium" size, in pixels.
         *
         * When the width of the window/device that displays the search page reaches or falls short of this threshold (but still exceeds the [responsiveSmallBreakpoint]{@link SearchInterface.options.responsiveSmallBreakpoint} value), the search page layout will change so that, for instance, facets within the element that has the coveo-facet-column class will be accessible from a dropdown menu on top of the result list rather than being fully rendered next to the result list.
         *
         * This option is only taken into account when [enableAutomaticResponsiveMode]{@link SearchInterface.options.enableAutomaticResponsiveMode} is set to true.
         *
         * Default value is `800`.
         */
        responsiveMediumBreakpoint: ComponentOptions_1.ComponentOptions.buildNumberOption({
            defaultValue: ResponsiveComponents_1.MEDIUM_SCREEN_WIDTH,
            depend: 'enableAutomaticResponsiveMode'
        }),
        /**
         * Specifies the search interface width that should be considered "small" size, in pixels.
         *
         * When the width of the window/device that displays the search page reaches or falls short of this threshold, the search page layout will change so that, for instance, some result list layouts which are not suited for being rendered on a small screen/area will be disabled.
         *
         * This option is only taken into account when [enableAutomaticResponsiveMode]{@link SearchInterface.options.enableAutomaticResponsiveMode} is set to true.
         *
         * Default value is `480`.
         */
        responsiveSmallBreakpoint: ComponentOptions_1.ComponentOptions.buildNumberOption({
            defaultValue: ResponsiveComponents_1.SMALL_SCREEN_WIDTH,
            depend: 'enableAutomaticResponsiveMode'
        }),
        /**
         * Specifies the search interface responsive mode that should be used.
         *
         * When the mode is auto, the width of the window/device that displays the search page is used to determine which layout the search page should use
         * (see [enableAutomaticResponsiveMode]{@link SearchInterface.options.enableAutomaticResponsiveMode}, [responsiveMediumBreakpoint]{@link SearchInterface.options.responsiveMediumBreakpoint}
         * and [responsiveSmallBreakpoint{@link SearchInterface.options.responsiveSmallBreakpoint}])
         *
         * When it's not on auto, the width is ignored and the the layout used depends on this option
         * (e.g. If set to "small", then the search interface layout will be the same as if it was on a narrow window/device)
         */
        responsiveMode: ComponentOptions_1.ComponentOptions.buildCustomOption(function (value) {
            // Validator function for the string passed, verify it's one of the accepted values.
            if (value === 'auto' || value === 'small' || value === 'medium' || value === 'large') {
                return value;
            }
            else {
                console.warn(value + " is not a proper value for responsiveMode, auto has been used instead.");
                return 'auto';
            }
        }, {
            defaultValue: 'auto'
        }),
        /**
         * Specifies whether to restore the last scroll position when navigating back
         * to the search interface.
         *
         * @availablesince [March 2020 Release (v2.8521)](https://docs.coveo.com/en/3203/)
         */
        enableScrollRestoration: ComponentOptions_1.ComponentOptions.buildBooleanOption({ defaultValue: false }),
        /**
         * Specifies the HTMLElement to which Modals components of the search interface will be attached to. You can
         * either specify a CSS selector or pass an HTMLElement in the options when calling Coveo.init.
         *
         * Default value is `element.ownerDocument.body`.
         *
         * **Example in attribute:**
         * ```html
         * <div class="CoveoSearchInterface" data-modal-container="#my-modal-container"></div>
         * ```
         *
         * **Example in init options:**
         * ```javascript
         * var myContainer = document.getElementById('my-modal-container');
         * Coveo.init(root, {
         *   SearchInterface: {
         *     modalContainer: myContainer
         *   }
         * });
         * ```
         */
        modalContainer: ComponentOptions_1.ComponentOptions.buildSelectorOption({ defaultFunction: function (element) { return element.ownerDocument.body; } })
    };
    SearchInterface.SMALL_INTERFACE_CLASS_NAME = 'coveo-small-search-interface';
    return SearchInterface;
}(RootComponent_1.RootComponent));
exports.SearchInterface = SearchInterface;
var StandaloneSearchInterface = /** @class */ (function (_super) {
    __extends(StandaloneSearchInterface, _super);
    function StandaloneSearchInterface(element, options, analyticsOptions, _window) {
        if (_window === void 0) { _window = window; }
        var _this = _super.call(this, element, ComponentOptions_1.ComponentOptions.initComponentOptions(element, StandaloneSearchInterface, options), analyticsOptions, _window) || this;
        _this.element = element;
        _this.options = options;
        _this.analyticsOptions = analyticsOptions;
        _this._window = _window;
        Dom_1.$$(_this.root).on(QueryEvents_1.QueryEvents.newQuery, function (e, args) { return _this.handleRedirect(e, args); });
        return _this;
    }
    StandaloneSearchInterface.prototype.handleRedirect = function (e, data) {
        if (data.shouldRedirectStandaloneSearchbox === false) {
            return;
        }
        var dataToSendOnBeforeRedirect = {
            searchPageUri: this.options.searchPageUri,
            cancel: false
        };
        Dom_1.$$(this.root).trigger(StandaloneSearchInterfaceEvents_1.StandaloneSearchInterfaceEvents.beforeRedirect, dataToSendOnBeforeRedirect);
        Iif (dataToSendOnBeforeRedirect.cancel) {
            return;
        }
        data.cancel = true;
        Eif (!this.searchboxIsEmpty() || this.options.redirectIfEmpty) {
            this.doRedirect(dataToSendOnBeforeRedirect.searchPageUri);
        }
    };
    StandaloneSearchInterface.prototype.doRedirect = function (searchPage) {
        return __awaiter(this, void 0, void 0, function () {
            var cachedHashValue, executionPlan, redirectionURL;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        cachedHashValue = this.encodedHashValues;
                        return [4 /*yield*/, this.queryController.fetchQueryExecutionPlan()];
                    case 1:
                        executionPlan = _a.sent();
                        redirectionURL = executionPlan && executionPlan.redirectionURL;
                        if (!redirectionURL) {
                            return [2 /*return*/, this.redirectToSearchPage(searchPage, cachedHashValue)];
                        }
                        this.redirectToURL(redirectionURL);
                        return [2 /*return*/];
                }
            });
        });
    };
    StandaloneSearchInterface.prototype.redirectToURL = function (url) {
        this.usageAnalytics.logCustomEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.triggerRedirect, {
            redirectedTo: url,
            query: this.queryStateModel.get(QueryStateModel_1.QueryStateModel.attributesEnum.q)
        }, this.element);
        this._window.location.assign(url);
    };
    StandaloneSearchInterface.prototype.redirectToSearchPage = function (searchPage, hashValueToUse) {
        var _this = this;
        var link = document.createElement('a');
        link.href = searchPage;
        link.href = link.href; // IE11 needs this to correctly fill the properties that are used below.
        var pathname = link.pathname.indexOf('/') == 0 ? link.pathname : '/' + link.pathname; // IE11 does not add a leading slash to this property.
        var hash = link.hash ? link.hash + '&' : '#';
        var hashValue = hashValueToUse || this.encodedHashValues;
        // By using a setTimeout, we allow other possible code related to the search box / magic box time to complete.
        // eg: onblur of the magic box.
        setTimeout(function () {
            _this._window.location.href = link.protocol + "//" + link.host + pathname + link.search + hash + hashValue;
        }, 0);
    };
    Object.defineProperty(StandaloneSearchInterface.prototype, "encodedHashValues", {
        get: function () {
            var values = __assign({}, this.modelAttributesToIncludeInUrl, this.uaCausedByAttribute, this.uaMetadataAttribute);
            return HashUtils_1.HashUtils.encodeValues(values);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(StandaloneSearchInterface.prototype, "modelAttributesToIncludeInUrl", {
        get: function () {
            var usingLocalStorageHistory = this.historyManager instanceof LocalStorageHistoryController_1.LocalStorageHistoryController;
            return usingLocalStorageHistory ? {} : this.queryStateModel.getAttributes();
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(StandaloneSearchInterface.prototype, "uaCausedByAttribute", {
        get: function () {
            var uaCausedBy = this.uaCausedBy;
            return uaCausedBy ? { firstQueryCause: uaCausedBy } : {};
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(StandaloneSearchInterface.prototype, "uaCausedBy", {
        get: function () {
            var uaCausedBy = this.usageAnalytics.getCurrentEventCause();
            var isSearchboxSubmit = uaCausedBy === AnalyticsActionListMeta_1.analyticsActionCauseList.searchboxSubmit.name;
            // For legacy reasons, searchbox submit were always logged as a search from link in an external search box.
            return isSearchboxSubmit ? AnalyticsActionListMeta_1.analyticsActionCauseList.searchFromLink.name : uaCausedBy;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(StandaloneSearchInterface.prototype, "uaMetadataAttribute", {
        get: function () {
            var uaMeta = this.usageAnalytics.getCurrentEventMeta();
            return uaMeta && !underscore_1.isEmpty(uaMeta) ? { firstQueryMeta: uaMeta } : {};
        },
        enumerable: true,
        configurable: true
    });
    StandaloneSearchInterface.prototype.searchboxIsEmpty = function () {
        return Utils_1.Utils.isEmptyString(this.queryStateModel.get(QueryStateModel_1.QueryStateModel.attributesEnum.q));
    };
    StandaloneSearchInterface.ID = 'StandaloneSearchInterface';
    StandaloneSearchInterface.options = {
        redirectIfEmpty: ComponentOptions_1.ComponentOptions.buildBooleanOption({ defaultValue: true })
    };
    return StandaloneSearchInterface;
}(SearchInterface));
exports.StandaloneSearchInterface = StandaloneSearchInterface;
 
 
/***/ }),
/* 26 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
var Dom_1 = __webpack_require__(0);
var Assert_1 = __webpack_require__(12);
var Utils_1 = __webpack_require__(5);
var BaseComponent_1 = __webpack_require__(113);
var _ = __webpack_require__(1);
exports.MODEL_EVENTS = {
    PREPROCESS: 'preprocess',
    CHANGE_ONE: 'change:',
    CHANGE: 'change',
    RESET: 'reset',
    ALL: 'all'
};
/**
 * A *model* is a key-value store that triggers various JavaScript events when any value associated to one of its key changes.<br/>
 * This class is meant to be extended, one of the most important extension being the {@link QueryStateModel} class.<br/>
 * Components set values in this key-value store and listen to triggered events in order to update themselves accordingly.<br/>
 */
var Model = /** @class */ (function (_super) {
    __extends(Model, _super);
    function Model(element, id, attributes) {
        var _this = _super.call(this, element, id) || this;
        _this.eventNameSpace = id;
        _this.defaultAttributes = Utils_1.Utils.extendDeep(_this.defaultAttributes, attributes);
        _this.attributes = attributes;
        _this.logger.debug('Creating model');
        return _this;
    }
    /**
     * Sets the value of a single specific attribute.</br>
     * Note: this method calls the `setMultiple` method.
     * @param attribute
     * the specific attribute whose value is to be set.
     * @param value
     * the value to set the attribute to.
     * @param options
     * the options (see {@link setMultiple}).
     */
    Model.prototype.set = function (attribute, value, options) {
        var toSet = {};
        toSet[attribute] = value;
        this.setMultiple(toSet, options);
    };
    /**
     * Gets an object containing all *active* registered attribute key-values.</br>
     * An attribute is considered active when its value is not in its default state.
     * @returns {{object}}
     */
    Model.prototype.getAttributes = function () {
        var _this = this;
        var attributes = {};
        _.each(this.attributes, function (attribute, key) {
            if (_.isObject(attribute)) {
                if (!Utils_1.Utils.objectEqual(attribute, _this.defaultAttributes[key])) {
                    attributes[key] = Utils_1.Utils.extendDeep({}, attribute);
                }
            }
            else if (attribute != _this.defaultAttributes[key]) {
                attributes[key] = attribute;
            }
        });
        return attributes;
    };
    /**
     * Sets the values of one or many attributes.</br>
     * This method may trigger the following events (in order):</br>
     * • `preprocess`</br>
     * • `changeOne`</br>
     * • `change`</br>
     * • `all`
     * @param toSet
     * the key-value list of attributes with their new intended values.
     * @param options
     * if the `customAttribute` option is set to `true`, the method will not validate whether an attribute is registered or not.</br>
     * If the `validateType` option is set to `true`, the method will ensure that each value type is correct.</br>
     * If the `silent` option is set to `true`, then the `changeOne`, `change` and `all` events will not be triggered.
     */
    Model.prototype.setMultiple = function (toSet, options) {
        var _this = this;
        var anythingChanged = false;
        this.preprocessEvent(toSet);
        _.each(toSet, function (value, attribute) {
            if (!options || !options.customAttribute) {
                _this.checkIfAttributeExists(attribute);
            }
            value = _this.parseToCorrectType(attribute, value);
            if (!options || options.validateType) {
                if (!_this.typeIsValid(attribute, value)) {
                    return;
                }
            }
            if (_this.checkIfAttributeChanged(attribute, value)) {
                _this.attributes[attribute] = value;
                anythingChanged = true;
                Eif (options == null || !options.silent) {
                    _this.attributeHasChangedEvent(attribute);
                }
            }
        });
        if (anythingChanged && (options == null || !options.silent)) {
            this.attributesHasChangedEvent();
            this.anyEvent();
        }
    };
    /**
     * Sets a new default value to a single specific attribute.</br>
     * Note: specifying a new attribute default value does not set the attribute to that value. This can be done using the {@link setDefault} method.
     * @param attribute
     * the specific attribute whose default value is to be changed.
     * @param value
     * the new intended default value.
     * @param options
     * if the `customAttribute` option is set to `true`, the method will not validate whether the attribute is registered or not.
     */
    Model.prototype.setNewDefault = function (attribute, value, options) {
        if (!options || !options.customAttribute) {
            this.checkIfAttributeExists(attribute);
        }
        this.defaultAttributes[attribute] = value;
    };
    /**
     * Sets a single specific attribute to its default value.</br>
     * Note: this method calls the {@link setMultiple} method without specifying any option.
     * @param attribute
     * the specific attribute whose value is to be set to its default value.
     */
    Model.prototype.setDefault = function (attribute) {
        this.set(attribute, this.defaultAttributes[attribute]);
    };
    /**
     * Gets the value of a single specific attribute.</br>
     * If no attribute is specified, the method instead returns an object containing all registered attribute key-values.
     * @param attribute
     * the specific attribute whose value should be returned.
     * @returns {any}
     */
    Model.prototype.get = function (attribute) {
        if (attribute == undefined) {
            return this.attributes;
        }
        else {
            return this.attributes[attribute];
        }
    };
    /**
     * Gets the default value of a single specific attribute.</br>
     * If no attribute is specified, the method instead returns an object containing all registered attribute key-default values.
     * @param attribute
     * the specific attribute whose default value should be returned.
     * @returns {any}
     */
    Model.prototype.getDefault = function (attribute) {
        Iif (attribute == undefined) {
            return this.defaultAttributes;
        }
        else {
            return this.defaultAttributes[attribute];
        }
    };
    /**
     * Resets each registered attribute to its default value.</br>
     * Note: this method calls the {@link setMultiple} method without specifying any options.</br>
     * After the `setMultiple` call has returned, this method triggers the `reset` event.
     */
    Model.prototype.reset = function () {
        this.setMultiple(this.defaultAttributes);
        this.modelWasResetEvent();
    };
    /**
     * Registers a new attribute key-value.
     * @param attribute
     * the name of the new attribute to register.
     * @param defaultValue
     * the newly registered attribute default value.
     */
    Model.prototype.registerNewAttribute = function (attribute, defaultValue) {
        this.defaultAttributes[attribute] = defaultValue;
        this.attributes[attribute] = defaultValue;
    };
    /**
     * Gets a string displaying the event namespace followed by the specific event name. The returned string is formatted thus:</br>
     * `[eventNameSpace]:[eventName]`
     * @example `getEventName("reset");` could return `"state:reset"`.
     * @param event
     * the event name.
     * @returns {string}
     */
    Model.prototype.getEventName = function (event) {
        return this.eventNameSpace + ':' + event;
    };
    Model.prototype.attributesHasChangedEvent = function () {
        Dom_1.$$(this.element).trigger(this.getEventName(Model.eventTypes.change), this.createAttributesChangedArgument());
    };
    Model.prototype.attributeHasChangedEvent = function (attr) {
        Dom_1.$$(this.element).trigger(this.getEventName(Model.eventTypes.changeOne) + attr, this.createAttributeChangedArgument(attr));
    };
    Model.prototype.preprocessEvent = function (attributes) {
        Dom_1.$$(this.element).trigger(this.getEventName(Model.eventTypes.preprocess), attributes);
    };
    Model.prototype.modelWasResetEvent = function () {
        Dom_1.$$(this.element).trigger(this.getEventName(Model.eventTypes.reset), this.createModelChangedArgument());
    };
    Model.prototype.anyEvent = function () {
        Dom_1.$$(this.element).trigger(this.getEventName(Model.eventTypes.all), this.createModelChangedArgument());
    };
    Model.prototype.createAttributeChangedArgument = function (attribute) {
        return { attribute: attribute, value: this.attributes[attribute] };
    };
    Model.prototype.createAttributesChangedArgument = function () {
        return { attributes: this.attributes };
    };
    Model.prototype.createModelChangedArgument = function () {
        return { model: this };
    };
    Model.prototype.checkIfAttributeExists = function (attribute) {
        Assert_1.Assert.check(_.has(this.attributes, attribute), "The attribute " + attribute + " is not registered.");
    };
    Model.prototype.typeIsValid = function (attribute, value) {
        if (!Utils_1.Utils.isNullOrUndefined(this.attributes[attribute]) && !Utils_1.Utils.isUndefined(value)) {
            if (_.isNumber(this.attributes[attribute])) {
                return this.validateNumber(attribute, value);
            }
            else if (_.isBoolean(this.attributes[attribute])) {
                return this.validateBoolean(attribute, value);
            }
            else {
                return this.validateOther(attribute, value);
            }
        }
        return true;
    };
    Model.prototype.validateNumber = function (attribute, value) {
        if (!_.isNumber(value) || isNaN(value)) {
            this.logger.error("Non-matching type for " + attribute + ". Expected number and got " + value);
            return false;
        }
        return true;
    };
    Model.prototype.validateBoolean = function (attribute, value) {
        Iif (!_.isBoolean(value) && !Utils_1.Utils.parseBooleanIfNotUndefined(value) !== undefined) {
            this.logger.error("Non matching type for " + attribute + ". Expected boolean and got " + value);
            return false;
        }
        return true;
    };
    Model.prototype.validateOther = function (attribute, value) {
        Eif (!Utils_1.Utils.isNullOrUndefined(this.defaultAttributes[attribute])) {
            var valueType = typeof value;
            var attributeType = typeof this.defaultAttributes[attribute];
            if (valueType !== attributeType) {
                this.logger.error("Non-matching type for " + attribute + ". Expected " + attributeType + " and got " + valueType);
                return false;
            }
        }
        return true;
    };
    Model.prototype.parseToCorrectType = function (attribute, value) {
        if (_.isNumber(this.attributes[attribute])) {
            return parseInt(value, 10);
        }
        else if (_.isBoolean(this.attributes[attribute])) {
            if (_.isBoolean(value)) {
                return value;
            }
            else {
                return Utils_1.Utils.parseBooleanIfNotUndefined(value);
            }
        }
        return value;
    };
    Model.prototype.checkIfAttributeChanged = function (attribute, newValue) {
        var oldValue = this.attributes[attribute];
        if (_.isNumber(oldValue) || _.isString(oldValue) || _.isBoolean(oldValue)) {
            return oldValue !== newValue;
        }
        if (_.isArray(oldValue)) {
            return !Utils_1.Utils.arrayEqual(oldValue, newValue);
        }
        if (_.isObject(oldValue)) {
            return !Utils_1.Utils.objectEqual(oldValue, newValue);
        }
        return true;
    };
    Model.prototype.debugInfo = function () {
        return null;
    };
    /**
     * The event types that can be triggered:<br/>
     * • `preprocess`: triggered before a value is set on an attribute. This allows the value to be modified before it is set.<br/>
     * • `changeOne`: triggered when a single value changes.</br>
     * • `change`: triggered when one or many values change.</br>
     * • `reset`: triggered when all attributes are reset to their default values. </br>
     * • `all`: triggered after the `change` event.</br>
     * @type {{preprocess: string, changeOne: string, change: string, reset: string, all: string}}
     */
    Model.eventTypes = {
        preprocess: 'preprocess',
        changeOne: 'change:',
        change: 'change',
        reset: 'reset',
        all: 'all'
    };
    return Model;
}(BaseComponent_1.BaseComponent));
exports.Model = Model;
 
 
/***/ }),
/* 27 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_d3_interpolate__ = __webpack_require__(83);
 
 
/* harmony default export */ __webpack_exports__["a"] = (function(scheme) {
  return Object(__WEBPACK_IMPORTED_MODULE_0_d3_interpolate__["s" /* interpolateRgbBasis */])(scheme[scheme.length - 1]);
});
 
 
/***/ }),
/* 28 */
/***/ (function(module, exports, __webpack_require__) {
 
/* WEBPACK VAR INJECTION */(function(global) {module.exports = global["Globalize"] = __webpack_require__(963);
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(208)))
 
/***/ }),
/* 29 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Logger_1 = __webpack_require__(18);
var Dom_1 = __webpack_require__(0);
var TemplateConditionEvaluator_1 = __webpack_require__(303);
var TemplateFieldsEvaluator_1 = __webpack_require__(218);
var ResponsiveComponents_1 = __webpack_require__(54);
var _ = __webpack_require__(1);
var Initialization_1 = __webpack_require__(8);
var Utils_1 = __webpack_require__(5);
var DefaultInstantiateTemplateOptions = /** @class */ (function () {
    function DefaultInstantiateTemplateOptions() {
        this.currentLayout = null;
        this.checkCondition = true;
        this.wrapInDiv = true;
        this.responsiveComponents = new ResponsiveComponents_1.ResponsiveComponents();
    }
    DefaultInstantiateTemplateOptions.prototype.get = function () {
        return {
            currentLayout: this.currentLayout,
            checkCondition: this.checkCondition,
            wrapInDiv: this.wrapInDiv,
            responsiveComponents: this.responsiveComponents
        };
    };
    DefaultInstantiateTemplateOptions.prototype.merge = function (other) {
        if (other) {
            return _.extend(this.get(), other);
        }
        return this.get();
    };
    return DefaultInstantiateTemplateOptions;
}());
exports.DefaultInstantiateTemplateOptions = DefaultInstantiateTemplateOptions;
var Template = /** @class */ (function () {
    function Template(dataToString) {
        this.dataToString = dataToString;
        this.logger = new Logger_1.Logger(this);
        this.fields = [];
    }
    Template.prototype.instantiateToString = function (object, instantiateOptions) {
        if (instantiateOptions === void 0) { instantiateOptions = new DefaultInstantiateTemplateOptions(); }
        Eif (this.dataToString) {
            if (instantiateOptions.checkCondition === false) {
                return this.dataToString(object);
            }
            // Should not happen but...
            // Normally, top level call from sub-class will have already created a
            // DefaultInstantiateTemplateOptions and merged down
            if (instantiateOptions.responsiveComponents == null) {
                instantiateOptions.responsiveComponents = new ResponsiveComponents_1.ResponsiveComponents();
            }
            // Mobile/tablet/desktop checks are only for "hard" set value (triple equal)
            // If it's undefined, we skip those checks, and we assume the template works correctly for any given screen size
            if (this.mobile === true && !instantiateOptions.responsiveComponents.isSmallScreenWidth()) {
                this.logger.trace('Template was skipped because it is optimized for small screen width', this);
                return null;
            }
            else if (this.mobile === false && instantiateOptions.responsiveComponents.isSmallScreenWidth()) {
                this.logger.trace('Template was skipped because it is not optimized for small screen width', this);
                return null;
            }
            if (this.tablet === true && !instantiateOptions.responsiveComponents.isMediumScreenWidth()) {
                this.logger.trace('Template was skipped because it is optimized for medium screen width', this);
                return null;
            }
            else if (this.tablet === false && instantiateOptions.responsiveComponents.isMediumScreenWidth()) {
                this.logger.trace('Template was skipped because it is not optimized for medium screen width', this);
                return null;
            }
            if (this.desktop === true && !instantiateOptions.responsiveComponents.isLargeScreenWidth()) {
                this.logger.trace('Template was skipped because it is optimized for large screen width', this);
                return null;
            }
            else if (this.desktop === false && instantiateOptions.responsiveComponents.isLargeScreenWidth()) {
                this.logger.trace('Template was skipped because it is not optimized for large screen width', this);
                return null;
            }
            if (this.layout != null && instantiateOptions.currentLayout != null && instantiateOptions.currentLayout !== this.layout) {
                this.logger.trace('Template was skipped because layout does not match', this, this.layout);
                return null;
            }
            try {
                this.logger.trace('Evaluating template ...');
                // Condition (as a function) is eval'ed, first
                if (this.condition != null && this.condition(object)) {
                    this.logger.trace('Template was loaded because condition was :', this.condition, object);
                    return this.dataToString(object);
                }
                // Condition (as a string) is parsed, if available.
                if (this.conditionToParse != null &&
                    TemplateConditionEvaluator_1.TemplateConditionEvaluator.evaluateCondition(this.conditionToParse, object, instantiateOptions.responsiveComponents)) {
                    this.logger.trace('Template was loaded because condition was :', this.conditionToParse, object);
                    return this.dataToString(object);
                }
                // fieldsToMatch is yet another fallback that allows to specify if a template should be loaded.
                if (this.fieldsToMatch != null && TemplateFieldsEvaluator_1.TemplateFieldsEvaluator.evaluateFieldsToMatch(this.fieldsToMatch, object)) {
                    this.logger.trace('Template was loaded because condition was :', this.fieldsToMatch, object);
                    return this.dataToString(object);
                }
                // If there is no condition at all, this means "true"
                if (this.condition == null && this.conditionToParse == null && this.fieldsToMatch == null) {
                    this.logger.trace('Template was loaded because there was *NO* condition', this.condition, object);
                    return this.dataToString(object);
                }
            }
            catch (e) {
                new Logger_1.Logger(this).error('Cannot instantiate template', e.message, this.getTemplateInfo());
                new Logger_1.Logger(this).warn('A default template was used');
                return null;
            }
        }
        this.logger.trace('Template was skipped because it did not match any condition', this);
        return null;
    };
    Template.prototype.addField = function (field) {
        if (!_.contains(this.fields, field)) {
            this.fields.push(field);
        }
    };
    Template.prototype.addFields = function (fields) {
        if (Utils_1.Utils.isNonEmptyArray(fields)) {
            this.fields = Utils_1.Utils.concatWithoutDuplicate(this.fields, fields);
        }
    };
    Template.prototype.getComponentsInside = function (tmplString) {
        var allComponentsInsideCurrentTemplate = _.map(Initialization_1.Initialization.getListOfRegisteredComponents(), function (componentId) {
            var regex = new RegExp("Coveo" + componentId, 'g');
            return regex.exec(tmplString) ? componentId : null;
        });
        return _.compact(allComponentsInsideCurrentTemplate);
    };
    Template.prototype.instantiateToElement = function (result, templateOptions) {
        var _this = this;
        if (templateOptions === void 0) { templateOptions = {}; }
        var mergedOptions = new DefaultInstantiateTemplateOptions().merge(templateOptions);
        var html = this.instantiateToString(result, mergedOptions);
        if (html == null) {
            return null;
        }
        return this.ensureComponentsInHtmlStringHaveLoaded(html).then(function () {
            var template = _this.buildTemplate(html, mergedOptions);
            _this.logger.trace('Instantiated result template', result, template);
            return template;
        });
    };
    Template.prototype.toHtmlElement = function () {
        return null;
    };
    Template.prototype.getFields = function () {
        return this.fields;
    };
    Template.prototype.getType = function () {
        return 'Template';
    };
    Template.prototype.setConditionWithFallback = function (condition) {
        // In some circumstances (eg: locker service in SF), with strict Content-Security-Policy, eval / new Function are not allowed by the browser.
        // Try to use the eval method, if possible. Otherwise fallback to a mechanism where we will try to parse/evaluate the condition as a simple string.
        try {
            this.condition = new Function('obj', 'with(obj||{}){return ' + condition + '}');
        }
        catch (e) {
            this.conditionToParse = condition;
        }
    };
    Template.prototype.getTemplateInfo = function () {
        // Try to get info on the template by returning the first parameter found that is not undefined.
        return this.conditionToParse != undefined ? this.conditionToParse : this.condition != undefined ? this.condition : this.fieldsToMatch;
    };
    Template.prototype.ensureComponentsInHtmlStringHaveLoaded = function (html) {
        var components = this.getComponentsInside(html).map(function (component) { return Initialization_1.LazyInitialization.getLazyRegisteredComponent(component); });
        return Promise.all(components);
    };
    Template.prototype.buildTemplate = function (html, templateOptions) {
        var layout = this.layout || templateOptions.currentLayout;
        var elemType = layout === 'table' ? 'tr' : 'div';
        var element = Dom_1.$$(elemType, {}, html).el;
        if (!templateOptions.wrapInDiv && element.children.length === 1) {
            element = element.children.item(0);
        }
        if (layout) {
            Dom_1.$$(element).addClass("coveo-" + layout + "-layout");
        }
        element['template'] = this;
        return element;
    };
    return Template;
}());
exports.Template = Template;
 
 
/***/ }),
/* 30 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* WEBPACK VAR INJECTION */(function(global) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return VERSION; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "p", function() { return root; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ArrayProto; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return ObjProto; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return SymbolProto; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "o", function() { return push; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "q", function() { return slice; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "t", function() { return toString; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return hasOwnProperty; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "r", function() { return supportsArrayBuffer; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "s", function() { return supportsDataView; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "k", function() { return nativeIsArray; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "m", function() { return nativeKeys; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return nativeCreate; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "l", function() { return nativeIsView; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return _isNaN; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return _isFinite; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return hasEnumBug; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "n", function() { return nonEnumerableProps; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return MAX_ARRAY_INDEX; });
// Current version.
var VERSION = '1.13.1';
 
// Establish the root object, `window` (`self`) in the browser, `global`
// on the server, or `this` in some virtual machines. We use `self`
// instead of `window` for `WebWorker` support.
var root = typeof self == 'object' && self.self === self && self ||
          typeof global == 'object' && global.global === global && global ||
          Function('return this')() ||
          {};
 
// Save bytes in the minified (but not gzipped) version:
var ArrayProto = Array.prototype, ObjProto = Object.prototype;
var SymbolProto = typeof Symbol !== 'undefined' ? Symbol.prototype : null;
 
// Create quick reference variables for speed access to core prototypes.
var push = ArrayProto.push,
    slice = ArrayProto.slice,
    toString = ObjProto.toString,
    hasOwnProperty = ObjProto.hasOwnProperty;
 
// Modern feature detection.
var supportsArrayBuffer = typeof ArrayBuffer !== 'undefined',
    supportsDataView = typeof DataView !== 'undefined';
 
// All **ECMAScript 5+** native function implementations that we hope to use
// are declared here.
var nativeIsArray = Array.isArray,
    nativeKeys = Object.keys,
    nativeCreate = Object.create,
    nativeIsView = supportsArrayBuffer && ArrayBuffer.isView;
 
// Create references to these builtin functions because we override them.
var _isNaN = isNaN,
    _isFinite = isFinite;
 
// Keys in IE < 9 that won't be iterated by `for key in ...` and thus missed.
var hasEnumBug = !{toString: null}.propertyIsEnumerable('toString');
var nonEnumerableProps = ['valueOf', 'isPrototypeOf', 'toString',
  'propertyIsEnumerable', 'hasOwnProperty', 'toLocaleString'];
 
// The largest integer that can be represented exactly.
var MAX_ARRAY_INDEX = Math.pow(2, 53) - 1;
 
/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(208)))
 
/***/ }),
/* 31 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var _ = __webpack_require__(1);
var Defer = /** @class */ (function () {
    function Defer() {
    }
    Defer.defer = function (code) {
        Defer.functions.push(code);
        Defer.arm();
    };
    Defer.flush = function () {
        while (Defer.popOne()) { }
    };
    Defer.arm = function () {
        _.defer(function () {
            if (Defer.popOne()) {
                Defer.arm();
            }
        });
    };
    Defer.popOne = function () {
        if (Defer.functions.length > 0) {
            var fun = Defer.functions[0];
            Defer.functions = _.rest(Defer.functions);
            fun();
            return Defer.functions.length > 0;
        }
        else {
            return false;
        }
    };
    Defer.functions = [];
    return Defer;
}());
exports.Defer = Defer;
 
 
/***/ }),
/* 32 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __assign = (this && this.__assign) || Object.assign || function(t) {
    for (var s, i = 1, n = arguments.length; i < n; i++) {
        s = arguments[i];
        for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
            t[p] = s[p];
    }
    return t;
};
Object.defineProperty(exports, "__esModule", { value: true });
__webpack_require__(1105);
__webpack_require__(1106);
var _ = __webpack_require__(1);
var FacetQueryController_1 = __webpack_require__(184);
var BreadcrumbEvents_1 = __webpack_require__(33);
var OmniboxEvents_1 = __webpack_require__(47);
var QueryEvents_1 = __webpack_require__(14);
var SearchAlertEvents_1 = __webpack_require__(86);
var GlobalExports_1 = __webpack_require__(10);
var Assert_1 = __webpack_require__(12);
var Defer_1 = __webpack_require__(31);
var Model_1 = __webpack_require__(26);
var QueryStateModel_1 = __webpack_require__(17);
var Strings_1 = __webpack_require__(4);
var AccessibleButton_1 = __webpack_require__(20);
var ComponentsTypes_1 = __webpack_require__(69);
var DependsOnManager_1 = __webpack_require__(185);
var DeviceUtils_1 = __webpack_require__(42);
var Dom_1 = __webpack_require__(0);
var SVGDom_1 = __webpack_require__(23);
var SVGIcons_1 = __webpack_require__(16);
var Utils_1 = __webpack_require__(5);
var AnalyticsActionListMeta_1 = __webpack_require__(7);
var Component_1 = __webpack_require__(6);
var ComponentOptions_1 = __webpack_require__(13);
var Initialization_1 = __webpack_require__(8);
var ResponsiveFacetOptions_1 = __webpack_require__(100);
var ResponsiveFacets_1 = __webpack_require__(146);
var BreadcrumbValueElement_1 = __webpack_require__(327);
var BreadcrumbValuesList_1 = __webpack_require__(328);
var FacetHeader_1 = __webpack_require__(235);
var FacetSearch_1 = __webpack_require__(147);
var FacetSearchParameters_1 = __webpack_require__(119);
var FacetSearchValuesList_1 = __webpack_require__(240);
var FacetSettings_1 = __webpack_require__(241);
var FacetSort_1 = __webpack_require__(333);
var FacetUtils_1 = __webpack_require__(49);
var FacetValueElement_1 = __webpack_require__(186);
var FacetValue_1 = __webpack_require__(51);
var FacetValues_1 = __webpack_require__(334);
var FacetValuesList_1 = __webpack_require__(692);
var FacetValuesOrder_1 = __webpack_require__(237);
var OmniboxValueElement_1 = __webpack_require__(693);
var OmniboxValuesList_1 = __webpack_require__(694);
var ValueElementRenderer_1 = __webpack_require__(236);
/**
 * The `Facet` component displays a *facet* of the results for the current query. A facet is a list of values for a
 * certain field occurring in the results, ordered using a configurable criteria (e.g., number of occurrences).
 *
 * The list of values is obtained using a [`GroupByRequest`]{@link IGroupByRequest} operation performed at the same time
 * as the main query.
 *
 * The `Facet` component allows the end user to drill down inside a result set by restricting the result to certain
 * field values. It also allows filtering out values from the facet itself, and can provide a search box to look for
 * specific values inside larger sets.
 *
 * This is probably the most complex component in the Coveo JavaScript Search Framework and as such, it allows for many
 * configuration options.
 *
 * See also the [`FacetRange`]{@link FacetRange} and [`TimespanFacet`]{@link TimespanFacet} components (which
 * extend this component), and the [`FacetSlider`]{@link FacetSlider} and [`CategoryFacet`]{@link CategoryFacet} components (which do not extend this
 * component, but are very similar).
 */
var Facet = /** @class */ (function (_super) {
    __extends(Facet, _super);
    /**
     * Creates a new `Facet` component. Binds multiple query events as well.
     * @param element The HTMLElement on which to instantiate the component.
     * @param options The options for the `Facet` component.
     * @param bindings The bindings that the component requires to function normally. If not set, these will be
     * automatically resolved (with a slower execution time).
     * @param facetClassId The ID to use for this facet (as `Facet` inherited from by other component
     * (e.g., [`FacetRange`]{@link FacetRange}). Default value is `Facet`.
     */
    function Facet(element, options, bindings, facetClassId) {
        if (facetClassId === void 0) { facetClassId = Facet.ID; }
        var _this = _super.call(this, element, facetClassId, bindings) || this;
        _this.element = element;
        _this.options = options;
        _this.keepDisplayedValuesNextTime = false;
        _this.values = new FacetValues_1.FacetValues();
        _this.currentPage = 0;
        _this.firstQuery = true;
        _this.isFieldValueCompatible = true;
        _this.isFieldValueHierarchical = false;
        _this.canFetchMore = true;
        _this.showingWaitAnimation = false;
        _this.listenToQueryStateChange = true;
        _this.options = ComponentOptions_1.ComponentOptions.initComponentOptions(element, Facet, options);
        if (_this.options.valueCaption != null) {
            _this.options.availableSorts = _.filter(_this.options.availableSorts, function (sort) { return !/^alpha.*$/.test(sort); });
            _this.logger.warn("Because the " + _this.options.field + " facet is using value captions, alphabetical sorts are disabled.");
        }
        ResponsiveFacets_1.ResponsiveFacets.init(_this.root, _this, _this.options);
        // Serves as a way to render facet in the omnibox in the order in which they are instantiated
        _this.omniboxZIndex = Facet.omniboxIndex;
        Facet.omniboxIndex--;
        _this.checkForComputedFieldAndSort();
        _this.checkForValueCaptionType();
        _this.checkForCustomSort();
        _this.initDependsOnManager();
        _this.initFacetQueryController();
        _this.initQueryEvents();
        _this.initQueryStateEvents();
        _this.initComponentStateEvents();
        _this.initOmniboxEvents();
        _this.initBreadCrumbEvents();
        _this.initSearchAlertEvents();
        _this.updateNumberOfValues();
        _this.bind.oneRootElement(QueryEvents_1.QueryEvents.querySuccess, function () {
            _this.firstQuery = false;
        });
        return _this;
    }
    Facet.prototype.setExpandedFacetSearchAccessibilityAttributes = function (searchResultsElement) {
        if (!this.searchContainer) {
            return;
        }
        Assert_1.Assert.exists(searchResultsElement);
        var accessibleElement = this.searchContainer.accessibleElement;
        accessibleElement.setAttribute('aria-expanded', true.toString());
    };
    Facet.prototype.setCollapsedFacetSearchAccessibilityAttributes = function () {
        if (!this.searchContainer) {
            return;
        }
        this.searchContainer.accessibleElement.setAttribute('aria-expanded', false.toString());
    };
    Facet.prototype.isCurrentlyDisplayed = function () {
        if (!Dom_1.$$(this.element).isVisible()) {
            return false;
        }
        Iif (Dom_1.$$(this.element).hasClass('coveo-active')) {
            return true;
        }
        if (Dom_1.$$(this.element).hasClass('coveo-facet-empty')) {
            return false;
        }
        return true;
    };
    Facet.prototype.createDom = function () {
        var _this = this;
        this.initBottomAndTopSpacer();
        this.buildFacetContent();
        this.updateAppearanceDependingOnState();
        // After the facet has been created (and before the first query is applied)
        // Try to load a state from the setting, if it's available
        // Execute only _.once (only the first query, or the first time the user switch to a tab that contains a newly set of active facet)
        if (this.facetSettings && this.options.enableSettingsFacetState) {
            var loadOnce = _.once(function () {
                _this.facetSettings.loadSavedState.apply(_this.facetSettings);
            });
            this.bind.onRootElement(QueryEvents_1.QueryEvents.newQuery, loadOnce);
        }
    };
    /**
     * Selects a single value.
     *
     * Does not trigger a query automatically.
     *
     * @param value Can be a [`FacetValue`]{@link FacetValue} or a string (e.g., `selectValue('foobar')` or
     * `selectValue(new FacetValue('foobar'))`).
     */
    Facet.prototype.selectValue = function (value) {
        Assert_1.Assert.exists(value);
        this.ensureDom();
        this.logger.info('Selecting facet value', this.facetValuesList.select(value));
        this.facetValueHasChanged();
    };
    /**
     * Selects multiple values.
     *
     * Does not trigger a query automatically.
     *
     * @param values Can be an array of [`FacetValue`]{@link FacetValue} or an array of strings.
     */
    Facet.prototype.selectMultipleValues = function (values) {
        var _this = this;
        Assert_1.Assert.exists(values);
        this.ensureDom();
        _.each(values, function (value) {
            _this.logger.info('Selecting facet value', _this.facetValuesList.select(value));
        });
        this.facetValueHasChanged();
    };
    /**
     * Deselects a single value.
     *
     * Does not trigger a query automatically.
     *
     * @param value Can be a [`FacetValue`]{@link FacetValue} or a string (e.g., `deselectValue('foobar')` or
     * `deselectValue(new FacetValue('foobar'))`).
     */
    Facet.prototype.deselectValue = function (value) {
        Assert_1.Assert.exists(value);
        this.ensureDom();
        this.logger.info('Deselecting facet value', this.facetValuesList.unselect(value));
        this.facetValueHasChanged();
    };
    /**
     * Deselects multiple values.
     *
     * Does not trigger a query automatically.
     *
     * @param values Can be an array of [`FacetValue`]{@link FacetValue} or an array of strings.
     */
    Facet.prototype.deselectMultipleValues = function (values) {
        var _this = this;
        Assert_1.Assert.exists(values);
        this.ensureDom();
        _.each(values, function (value) {
            _this.logger.info('Deselecting facet value', _this.facetValuesList.unselect(value));
        });
        this.facetValueHasChanged();
    };
    /**
     * Excludes a single value.
     *
     * Does not trigger a query automatically.
     *
     * @param value Can be a [`FacetValue`]{@link FacetValue} or a string (e.g., `excludeValue('foobar')` or
     * `excludeValue(new FacetValue('foobar'))`).
     */
    Facet.prototype.excludeValue = function (value) {
        Assert_1.Assert.exists(value);
        this.ensureDom();
        this.logger.info('Excluding facet value', this.facetValuesList.exclude(value));
        this.facetValueHasChanged();
    };
    /**
     * Excludes multiple values.
     *
     * Does not trigger a query automatically.
     *
     * @param values Can be an array of [`FacetValue`]{@link FacetValue} or an array of strings.
     */
    Facet.prototype.excludeMultipleValues = function (values) {
        var _this = this;
        Assert_1.Assert.exists(values);
        this.ensureDom();
        _.each(values, function (value) {
            _this.logger.info('Excluding facet value', _this.facetValuesList.exclude(value));
        });
        this.facetValueHasChanged();
    };
    /**
     * Unexcludes a single value.
     *
     * Does not trigger a query automatically.
     *
     * @param value Can be a [`FacetValue`]{@link FacetValue} or a string.
     */
    Facet.prototype.unexcludeValue = function (value) {
        Assert_1.Assert.exists(value);
        this.ensureDom();
        this.logger.info('Unexcluding facet value', this.facetValuesList.unExclude(value));
        this.facetValueHasChanged();
    };
    /**
     * Unexcludes multiple values.
     *
     * Does not trigger a query automatically.
     *
     * @param values Can be an array of [`FacetValue`]{@link FacetValue} or an array of strings.
     */
    Facet.prototype.unexcludeMultipleValues = function (values) {
        var _this = this;
        Assert_1.Assert.exists(values);
        this.ensureDom();
        _.each(values, function (value) {
            _this.logger.info('Unexcluding facet value', _this.facetValuesList.unExclude(value));
        });
        this.facetValueHasChanged();
    };
    /**
     * Toggles the selection state of a single value (selects the value if it is not already selected; un-selects the
     * value if it is already selected).
     *
     * Does not trigger a query automatically.
     * @param value Can be a [`FacetValue`]{@link FacetValue} or a string.
     */
    Facet.prototype.toggleSelectValue = function (value) {
        Assert_1.Assert.exists(value);
        this.ensureDom();
        this.logger.info('Toggle select facet value', this.facetValuesList.toggleSelect(value));
        this.facetValueHasChanged();
    };
    /**
     * Toggles the exclusion state of a single value (excludes the value if it is not already excluded; un-excludes the
     * value if it is already excluded).
     *
     * Does not trigger a query automatically.
     *
     * @param value Can be a [`FacetValue`]{@link FacetValue} or a string.
     */
    Facet.prototype.toggleExcludeValue = function (value) {
        Assert_1.Assert.exists(value);
        this.ensureDom();
        this.logger.info('Toggle exclude facet value', this.facetValuesList.toggleExclude(value));
        this.facetValueHasChanged();
    };
    /**
     * Returns the currently displayed values as an array of strings.
     *
     * @returns {any[]} The currently displayed values.
     */
    Facet.prototype.getDisplayedValues = function () {
        return _.pluck(this.getDisplayedFacetValues(), 'value');
    };
    /**
     * Returns the currently displayed values as an array of [`FacetValue`]{@link FacetValue}.
     *
     * @returns {T[]} The currently displayed values.
     */
    Facet.prototype.getDisplayedFacetValues = function () {
        this.ensureDom();
        var displayed = this.facetValuesList.getAllCurrentlyDisplayed();
        return _.map(displayed, function (value) {
            return value.facetValue;
        });
    };
    /**
     * Returns the currently selected values as an array of strings.
     * @returns {string[]} The currently selected values.
     */
    Facet.prototype.getSelectedValues = function () {
        this.ensureDom();
        return _.map(this.values.getSelected(), function (value) { return value.value; });
    };
    /**
     * Determines whether the specified value is selected in the facet.
     * @param value The name of the facet value to verify.
     */
    Facet.prototype.hasSelectedValue = function (value) {
        var facetValue = this.values.get(value);
        return facetValue && facetValue.selected;
    };
    /**
     * Returns the currently excluded values as an array of strings.
     * @returns {string[]} The currently excluded values.
     */
    Facet.prototype.getExcludedValues = function () {
        this.ensureDom();
        return _.map(this.values.getExcluded(), function (value) { return value.value; });
    };
    /**
     * Resets the facet by un-selecting all values, un-excluding all values, and redrawing the facet.
     */
    Facet.prototype.reset = function () {
        this.ensureDom();
        this.values.reset();
        this.rebuildValueElements();
        this.updateAppearanceDependingOnState();
        this.updateQueryStateModel();
    };
    /**
     * Switches the facet to `AND` mode.
     *
     * See the [`useAnd`]{@link Facet.options.useAnd}, and
     * [`enableTogglingOperator`]{@link Facet.options.enableTogglingOperator} options.
     */
    Facet.prototype.switchToAnd = function () {
        this.ensureDom();
        this.logger.info('Switching to AND');
        this.facetHeader.switchToAnd();
    };
    /**
     * Switches the facet to `OR` mode.
     *
     * See the [`useAnd`]{@link Facet.options.useAnd}, and
     * [`enableTogglingOperator`]{@link Facet.options.enableTogglingOperator} options.
     */
    Facet.prototype.switchToOr = function () {
        this.ensureDom();
        this.logger.info('Switching to OR');
        this.facetHeader.switchToOr();
    };
    /**
     * Returns the endpoint for the facet.
     * @returns {ISearchEndpoint} The endpoint for the facet.
     */
    Facet.prototype.getEndpoint = function () {
        return this.queryController.getEndpoint();
    };
    /**
     * Changes the sort parameter for the facet.
     *
     * See {@link Facet.options.availableSorts} for the list of possible values.
     *
     * Also triggers a new query.
     *
     * @param criteria The new sort parameter for the facet.
     */
    Facet.prototype.updateSort = function (criteria) {
        this.ensureDom();
        Eif (this.options.sortCriteria != criteria) {
            this.options.sortCriteria = criteria;
            this.usageAnalytics.logCustomEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.facetUpdateSort, {
                criteria: criteria,
                facetId: this.options.id,
                facetField: this.options.field.toString(),
                facetTitle: this.options.title
            }, this.element);
            this.triggerNewQuery();
        }
    };
    Facet.prototype.unfadeInactiveValuesInMainList = function () {
        Dom_1.$$(this.element).removeClass('coveo-facet-fade');
    };
    Facet.prototype.fadeInactiveValuesInMainList = function (delay) {
        Dom_1.$$(this.element).addClass('coveo-facet-fade');
    };
    /**
     * Shows a waiting animation in the facet header (a spinner).
     */
    Facet.prototype.showWaitingAnimation = function () {
        this.ensureDom();
        if (!this.showingWaitAnimation) {
            Dom_1.$$(this.headerElement).find('.coveo-facet-header-wait-animation').style.visibility = 'visible';
            this.showingWaitAnimation = true;
        }
    };
    /**
     * Hides the waiting animation in the facet header.
     */
    Facet.prototype.hideWaitingAnimation = function () {
        this.ensureDom();
        if (this.showingWaitAnimation) {
            Dom_1.$$(this.headerElement).find('.coveo-facet-header-wait-animation').style.visibility = 'hidden';
            this.showingWaitAnimation = false;
        }
    };
    Facet.prototype.processFacetSearchAllResultsSelected = function (facetValues) {
        var _this = this;
        var valuesForAnalytics = [];
        _.each(facetValues, function (facetValue) {
            _this.ensureFacetValueIsInList(facetValue);
            valuesForAnalytics.push(facetValue.value);
        });
        // Calculate the correct number of values from the current selected/excluded values (those will stay no matter what next rendering)
        // add the new one that will be selected (and are not already selected in the facet)
        // The minimum number of values is the number of values set in the option
        var valuesThatStays = this.values.getSelected().concat(this.values.getExcluded());
        this.numberOfValues = valuesThatStays.length + _.difference(valuesThatStays, facetValues).length;
        this.numberOfValues = Math.max(this.numberOfValues, this.options.numberOfValues);
        this.updateQueryStateModel();
        this.triggerNewQuery(function () {
            return _this.usageAnalytics.logSearchEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.facetSelectAll, {
                facetId: _this.options.id,
                facetField: _this.options.field.toString(),
                facetTitle: _this.options.title
            });
        });
    };
    Facet.prototype.pinFacetPosition = function () {
        Eif (this.options.preservePosition) {
            this.pinnedViewportPosition = this.element.getBoundingClientRect().top;
        }
    };
    /**
     * Returns the configured caption for the given [`FacetValue`]{@link FacetValue}.
     *
     * @param facetValue The `FacetValue` whose caption the method should return.
     */
    Facet.prototype.getValueCaption = function (facetValue) {
        Assert_1.Assert.exists(facetValue);
        var lookupValue = typeof facetValue === 'string' ? facetValue : facetValue.lookupValue || facetValue.value;
        var ret = FacetUtils_1.FacetUtils.tryToGetTranslatedCaption(this.options.field, lookupValue);
        if (Utils_1.Utils.exists(this.options.valueCaption)) {
            if (typeof this.options.valueCaption == 'object') {
                ret = this.options.valueCaption[lookupValue] || ret;
            }
            if (typeof this.options.valueCaption == 'function') {
                var fv = facetValue instanceof FacetValue_1.FacetValue ? facetValue : FacetValue_1.FacetValue.create(facetValue);
                var valueFromList = this.facetValuesList.get(fv).facetValue;
                ret = this.options.valueCaption.call(this, valueFromList);
            }
        }
        return ret;
    };
    /**
     * Returns the configured caption for a desired facet value.
     *
     * @param value The string facet value whose caption the method should return.
     */
    Facet.prototype.getCaptionForStringValue = function (value) {
        Assert_1.Assert.exists(value);
        return this.getValueCaption(value);
    };
    /**
     * Shows the next page of results in the facet.
     *
     * See the [`enableMoreLess`]{@link Facet.options.enableMoreLess}, and [`pageSize`]{@link Facet.options.pageSize}
     * options.
     *
     * Triggers a query if needed, or displays the already available values.
     */
    Facet.prototype.showMore = function () {
        this.currentPage = Math.floor((this.numberOfValues - this.options.numberOfValues) / this.options.pageSize) + 1;
        this.updateNumberOfValues();
        Iif (this.nbAvailableValues >= this.numberOfValues || !this.canFetchMore) {
            this.rebuildValueElements();
        }
        else {
            this.triggerMoreQuery();
        }
    };
    /**
     * Shows less elements in the Facet (up to the original number of values).
     *
     * See the [`enableMoreLess`]{@link Facet.options.enableMoreLess}, and
     * [`numberOfValues`]{@link Facet.options.numberOfValues} options.
     */
    Facet.prototype.showLess = function () {
        Dom_1.$$(this.lessElement).removeClass('coveo-active');
        this.currentPage = 0;
        this.updateNumberOfValues();
        Dom_1.$$(this.moreElement).addClass('coveo-active');
        this.values.sortValuesDependingOnStatus(this.numberOfValues);
        this.rebuildValueElements();
        this.logAnalyticsFacetShowMoreLess(AnalyticsActionListMeta_1.analyticsActionCauseList.facetShowLess);
    };
    /**
     * Collapses the facet.
     */
    Facet.prototype.collapse = function () {
        this.ensureDom();
        Eif (this.facetHeader) {
            this.facetHeader.collapseFacet();
        }
    };
    /**
     * Expands the facet.
     */
    Facet.prototype.expand = function () {
        this.ensureDom();
        Eif (this.facetHeader) {
            this.facetHeader.expandFacet();
        }
    };
    Facet.prototype.triggerNewQuery = function (beforeExecuteQuery) {
        if (!beforeExecuteQuery) {
            this.queryController.executeQuery({ ignoreWarningSearchEvent: true });
        }
        else {
            this.queryController.executeQuery({ beforeExecuteQuery: beforeExecuteQuery });
        }
        this.showWaitingAnimation();
    };
    Facet.prototype.handleDeferredQuerySuccess = function (data) {
        Assert_1.Assert.exists(data);
        this.unfadeInactiveValuesInMainList();
        this.hideWaitingAnimation();
        var groupByResult = data.results.groupByResults[this.facetQueryController.lastGroupByRequestIndex];
        this.facetQueryController.lastGroupByResult = groupByResult;
        // Two corner case to handle regarding the "sticky" aspect of facets :
        // 1) The group by is empty (so there is nothing to "sticky")
        // 2) There is only one value displayed currently, so there is nothing to "sticky" either
        if (!groupByResult) {
            this.keepDisplayedValuesNextTime = false;
        }
        if (this.values.getAll().length == 1) {
            this.keepDisplayedValuesNextTime = false;
        }
        this.processNewGroupByResults(groupByResult);
    };
    Facet.prototype.handleQueryError = function () {
        this.updateValues(new FacetValues_1.FacetValues());
        this.updateAppearanceDependingOnState();
        this.hideWaitingAnimation();
    };
    Facet.prototype.handlePopulateBreadcrumb = function (args) {
        Assert_1.Assert.exists(args);
        Eif (this.values.hasSelectedOrExcludedValues()) {
            var element = new BreadcrumbValuesList_1.BreadcrumbValueList(this, this.values.getSelected().concat(this.values.getExcluded()), BreadcrumbValueElement_1.BreadcrumbValueElement, {
                headingLevel: args.headingLevel
            }).build();
            args.breadcrumbs.push({ element: element });
        }
    };
    Facet.prototype.handlePopulateSearchAlerts = function (args) {
        if (this.values.hasSelectedOrExcludedValues()) {
            var excludedValues = this.values.getExcluded();
            var selectedValues = this.values.getSelected();
            if (!_.isEmpty(excludedValues)) {
                args.text.push({
                    value: new BreadcrumbValuesList_1.BreadcrumbValueList(this, excludedValues, BreadcrumbValueElement_1.BreadcrumbValueElement).buildAsString(),
                    lineThrough: true
                });
            }
            if (!_.isEmpty(selectedValues)) {
                args.text.push({
                    value: new BreadcrumbValuesList_1.BreadcrumbValueList(this, selectedValues, BreadcrumbValueElement_1.BreadcrumbValueElement).buildAsString(),
                    lineThrough: false
                });
            }
        }
    };
    Facet.prototype.initFacetQueryController = function () {
        this.facetQueryController = new FacetQueryController_1.FacetQueryController(this);
    };
    Facet.prototype.initFacetValuesList = function () {
        this.facetValuesList = new FacetValuesList_1.FacetValuesList(this, FacetValueElement_1.FacetValueElement);
        this.element.appendChild(this.facetValuesList.build());
    };
    Facet.prototype.initFacetSearch = function () {
        this.facetSearch = new FacetSearch_1.FacetSearch(this, FacetSearchValuesList_1.FacetSearchValuesList, this.root);
        this.element.appendChild(this.facetSearch.build());
    };
    Facet.prototype.facetValueHasChanged = function () {
        var _this = this;
        this.updateQueryStateModel();
        this.rebuildValueElements();
        Defer_1.Defer.defer(function () {
            _this.updateAppearanceDependingOnState();
        });
    };
    Facet.prototype.updateAppearanceDependingOnState = function () {
        Dom_1.$$(this.element).toggleClass('coveo-active', this.values.hasSelectedOrExcludedValues());
        Dom_1.$$(this.element).toggleClass('coveo-facet-empty', !this.isAnyValueCurrentlyDisplayed());
        Dom_1.$$(this.facetHeader.eraserElement).toggleClass('coveo-facet-header-eraser-visible', this.values.hasSelectedOrExcludedValues());
    };
    Facet.prototype.initQueryEvents = function () {
        var _this = this;
        this.bind.onRootElement(QueryEvents_1.QueryEvents.duringQuery, function () { return _this.handleDuringQuery(); });
        this.bind.onRootElement(QueryEvents_1.QueryEvents.buildingQuery, function (args) { return _this.handleBuildingQuery(args); });
        this.bind.onRootElement(QueryEvents_1.QueryEvents.doneBuildingQuery, function (args) { return _this.handleDoneBuildingQuery(args); });
        this.bind.onRootElement(QueryEvents_1.QueryEvents.deferredQuerySuccess, function (args) { return _this.handleDeferredQuerySuccess(args); });
        this.bind.onRootElement(QueryEvents_1.QueryEvents.queryError, function () { return _this.handleQueryError(); });
    };
    Facet.prototype.initQueryStateEvents = function () {
        var _this = this;
        this.includedAttributeId = QueryStateModel_1.QueryStateModel.getFacetId(this.options.id);
        this.excludedAttributeId = QueryStateModel_1.QueryStateModel.getFacetId(this.options.id, false);
        this.operatorAttributeId = QueryStateModel_1.QueryStateModel.getFacetOperator(this.options.id);
        this.lookupValueAttributeId = QueryStateModel_1.QueryStateModel.getFacetLookupValue(this.options.id);
        this.queryStateModel.registerNewAttribute(this.includedAttributeId, []);
        this.queryStateModel.registerNewAttribute(this.excludedAttributeId, []);
        this.queryStateModel.registerNewAttribute(this.operatorAttributeId, '');
        this.queryStateModel.registerNewAttribute(this.lookupValueAttributeId, {});
        this.bind.onQueryState(Model_1.MODEL_EVENTS.CHANGE, undefined, function (args) { return _this.handleQueryStateChanged(args); });
    };
    Facet.prototype.initComponentStateEvents = function () {
        this.componentStateId = QueryStateModel_1.QueryStateModel.getFacetId(this.options.id);
        this.componentStateModel.registerComponent(this.componentStateId, this);
    };
    Facet.prototype.initOmniboxEvents = function () {
        var _this = this;
        if (this.options.includeInOmnibox) {
            this.bind.onRootElement(OmniboxEvents_1.OmniboxEvents.populateOmnibox, function (args) { return _this.handlePopulateOmnibox(args); });
        }
    };
    Facet.prototype.initBreadCrumbEvents = function () {
        var _this = this;
        if (this.options.includeInBreadcrumb) {
            this.bind.onRootElement(BreadcrumbEvents_1.BreadcrumbEvents.populateBreadcrumb, function (args) {
                return _this.handlePopulateBreadcrumb(args);
            });
            this.bind.onRootElement(BreadcrumbEvents_1.BreadcrumbEvents.clearBreadcrumb, function (args) { return _this.handleClearBreadcrumb(); });
        }
    };
    Facet.prototype.initSearchAlertEvents = function () {
        var _this = this;
        this.bind.onRootElement(SearchAlertEvents_1.SearchAlertsEvents.searchAlertsPopulateMessage, function (args) {
            return _this.handlePopulateSearchAlerts(args);
        });
    };
    Facet.prototype.handleOmniboxWithStaticValue = function (eventArg) {
        var _this = this;
        var regex = new RegExp('^' + eventArg.completeQueryExpression.regex.source, 'i');
        var match = _.first(_.filter(this.getDisplayedValues(), function (displayedValue) {
            var value = _this.getValueCaption(_this.facetValuesList.get(displayedValue).facetValue);
            return regex.test(value);
        }), this.options.numberOfValuesInOmnibox);
        var facetValues = _.map(match, function (gotAMatch) {
            return _this.facetValuesList.get(gotAMatch).facetValue;
        });
        var element = new OmniboxValuesList_1.OmniboxValuesList(this, facetValues, eventArg, OmniboxValueElement_1.OmniboxValueElement).build();
        eventArg.rows.push({ element: element, zIndex: this.omniboxZIndex });
    };
    Facet.prototype.processNewGroupByResults = function (groupByResult) {
        this.logger.trace('Displaying group by results', groupByResult);
        if (groupByResult != undefined && groupByResult.values != undefined) {
            this.nbAvailableValues = groupByResult.values.length;
        }
        var newFacetValues = new FacetValues_1.FacetValues(groupByResult);
        this.updateValues(newFacetValues);
        this.canFetchMore = this.numberOfValues < this.nbAvailableValues;
        if (this.values.hasSelectedOrExcludedValues() && !this.options.useAnd && this.options.isMultiValueField) {
            this.triggerUpdateDeltaQuery(_.filter(this.values.getAll(), function (facetValue) {
                return !facetValue.selected && !facetValue.excluded;
            }));
        }
        else if (this.values.getSelected().length > 0 && !this.options.useAnd) {
            this.values.updateDeltaWithFilteredFacetValues(new FacetValues_1.FacetValues(), this.options.isMultiValueField);
        }
        if (!this.values.hasSelectedOrExcludedValues() || this.options.useAnd || !this.options.isMultiValueField) {
            this.rebuildValueElements();
            this.updateAppearanceDependingOnState();
            this.ensurePinnedFacetHasntMoved();
        }
        this.keepDisplayedValuesNextTime = false;
    };
    Facet.prototype.updateQueryStateModel = function () {
        this.listenToQueryStateChange = false;
        this.updateExcludedQueryStateModel();
        this.updateIncludedQueryStateModel();
        this.facetHeader.updateOperatorQueryStateModel();
        this.updateLookupValueQueryStateModel();
        this.listenToQueryStateChange = true;
    };
    Facet.prototype.rebuildValueElements = function () {
        this.updateNumberOfValues();
        this.facetValuesList.rebuild(this.numberOfValues);
        if (this.shouldRenderMoreLess()) {
            this.updateMoreLess();
            Eif (this.shouldRenderFacetSearch()) {
                this.updateSearchElement(this.nbAvailableValues > this.numberOfValues);
            }
        }
        else Iif (this.shouldRenderFacetSearch()) {
            this.updateSearchElement();
        }
    };
    Facet.prototype.updateSearchElement = function (moreValuesAvailable) {
        var _this = this;
        Iif (moreValuesAvailable === void 0) { moreValuesAvailable = true; }
        if (!moreValuesAvailable) {
            return;
        }
        var renderer = new ValueElementRenderer_1.ValueElementRenderer(this, FacetValue_1.FacetValue.create(Strings_1.l('Search')));
        this.searchContainer = renderer.build().withNo([renderer.excludeIcon, renderer.icon]);
        Dom_1.$$(this.searchContainer.listItem).addClass('coveo-facet-search-button');
        new AccessibleButton_1.AccessibleButton()
            .withElement(this.searchContainer.accessibleElement)
            .withLabel(Strings_1.l('SearchFacetResults', this.options.title))
            .withEnterKeyboardAction(function (e) { return _this.toggleSearchMenu(e); })
            .build();
        this.setCollapsedFacetSearchAccessibilityAttributes();
        // Mobile do not like label. Use click event
        Iif (DeviceUtils_1.DeviceUtils.isMobileDevice()) {
            Dom_1.$$(this.searchContainer.label).on('click', function (e) { return _this.toggleSearchMenu(e); });
        }
        Dom_1.$$(this.searchContainer.checkbox).on('change', function () {
            Dom_1.$$(_this.element).addClass('coveo-facet-searching');
            _this.facetSearch.focus();
        });
        this.facetValuesList.valueContainer.appendChild(this.searchContainer.listItem);
    };
    Facet.prototype.updateMoreLess = function (lessElementIsShown, moreValuesAvailable) {
        if (lessElementIsShown === void 0) { lessElementIsShown = this.getMinimumNumberOfValuesToDisplay() < this.numberOfValues; }
        if (moreValuesAvailable === void 0) { moreValuesAvailable = this.nbAvailableValues > this.numberOfValues; }
        if (lessElementIsShown) {
            Dom_1.$$(this.lessElement).addClass('coveo-active');
        }
        else {
            Dom_1.$$(this.lessElement).removeClass('coveo-active');
        }
        if (moreValuesAvailable) {
            Dom_1.$$(this.moreElement).addClass('coveo-active');
        }
        else {
            Dom_1.$$(this.moreElement).removeClass('coveo-active');
        }
        if (lessElementIsShown || moreValuesAvailable) {
            Dom_1.$$(this.footerElement).removeClass('coveo-facet-empty');
        }
        else {
            Dom_1.$$(this.footerElement).addClass('coveo-facet-empty');
        }
    };
    Facet.prototype.handleClickMore = function () {
        this.showMore();
    };
    Facet.prototype.handleClickLess = function () {
        this.showLess();
    };
    Facet.prototype.toggleSearchMenu = function (e) {
        var searchButton = this.searchContainer;
        if (searchButton.checkbox.getAttribute('checked')) {
            searchButton.checkbox.removeAttribute('checked');
        }
        else {
            searchButton.checkbox.setAttribute('checked', 'checked');
        }
        Dom_1.$$(searchButton.checkbox).trigger('change');
        e.stopPropagation();
        e.preventDefault();
    };
    Facet.prototype.checkForComputedFieldAndSort = function () {
        Iif (this.options.sortCriteria.toLowerCase().indexOf('computedfield') != -1 && Utils_1.Utils.isNullOrUndefined(this.options.computedField)) {
            this.logger.warn('Sort criteria is specified as ComputedField, but the facet uses no computed field. Facet will always be empty !', this);
        }
    };
    Facet.prototype.checkForValueCaptionType = function () {
        Iif (this.options.valueCaption && typeof this.options.valueCaption == 'function') {
            this.options.enableFacetSearch = false;
            this.options.includeInOmnibox = false;
            this.logger.warn('Using a function as valueCaption is now deprecated. Use a json key value pair instead. Facet search and omnibox has been disabled for this facet', this);
        }
    };
    Facet.prototype.checkForCustomSort = function () {
        if (this.options.customSort != undefined && !_.contains(this.options.availableSorts, 'custom')) {
            this.options.availableSorts.unshift('custom');
        }
        if (this.options.availableSorts[0] == 'custom') {
            this.options.sortCriteria = 'nosort';
        }
    };
    Facet.prototype.initDependsOnManager = function () {
        var _this = this;
        var facetInfo = {
            reset: function () { return _this.reset(); },
            ref: this
        };
        this.dependsOnManager = new DependsOnManager_1.DependsOnManager(facetInfo);
    };
    Facet.prototype.dependsOnUpdateParentDisplayValue = function () {
        var _this = this;
        if (!this.options.dependsOn) {
            return;
        }
        var masterFacetComponent = ComponentsTypes_1.ComponentsTypes.getAllFacetInstancesFromElement(this.root).filter(function (cmp) {
            var idFacet = cmp instanceof Facet;
            return idFacet && cmp.options.id === _this.options.dependsOn;
        });
        Iif (!masterFacetComponent.length) {
            this.logger.warn("Unable to find a Facet with the id or field \"" + this.options.dependsOn + "\".", "The master facet values can't be updated.");
            return;
        }
        Iif (masterFacetComponent.length > 1) {
            this.logger.warn("Multiple facets with id \"" + this.options.dependsOn + "\" found.", "A given facet may only depend on a single other facet.", "Ensure that each facet in your search interface has a unique id.", "The master facet cannot be updated.", masterFacetComponent);
            return;
        }
        var masterFacet = masterFacetComponent[0];
        masterFacet.keepDisplayedValuesNextTime = false;
    };
    Facet.prototype.initBottomAndTopSpacer = function () {
        var _this = this;
        var bottomSpace = Dom_1.$$(this.options.paddingContainer).find('.coveo-bottomSpace');
        var topSpace = Dom_1.$$(this.options.paddingContainer).find('.coveo-topSpace');
        Eif (this.options.preservePosition) {
            Dom_1.$$(this.options.paddingContainer).on('mouseleave', function () { return _this.unpinFacetPosition(); });
            this.pinnedTopSpace = topSpace;
            this.pinnedBottomSpace = bottomSpace;
            if (!this.pinnedTopSpace) {
                this.pinnedTopSpace = document.createElement('div');
                Dom_1.$$(this.pinnedTopSpace).addClass('coveo-topSpace');
                Dom_1.$$(this.pinnedTopSpace).insertBefore(this.options.paddingContainer.firstChild);
            }
            if (!this.pinnedBottomSpace) {
                this.pinnedBottomSpace = document.createElement('div');
                Dom_1.$$(this.pinnedBottomSpace).addClass('coveo-bottomSpace');
                this.options.paddingContainer.appendChild(this.pinnedBottomSpace);
            }
        }
    };
    Facet.prototype.updateIncludedQueryStateModel = function () {
        var selectedValues = { included: this.getSelectedValues(), title: this.includedAttributeId };
        this.queryStateModel.set(this.includedAttributeId, selectedValues.included);
    };
    Facet.prototype.updateExcludedQueryStateModel = function () {
        var excludedValues = { title: this.excludedAttributeId, excluded: this.getExcludedValues() };
        this.queryStateModel.set(this.excludedAttributeId, excludedValues.excluded);
    };
    Facet.prototype.updateLookupValueQueryStateModel = function () {
        Iif (this.options.lookupField) {
            var valueToSet_1 = {};
            _.each(this.values.getSelected().concat(this.values.getExcluded()), function (value) {
                valueToSet_1[value.value] = value.lookupValue;
            });
            this.queryStateModel.set(this.lookupValueAttributeId, valueToSet_1);
        }
    };
    Facet.prototype.handleQueryStateChangedOperator = function (operator) {
        if (operator == 'and') {
            this.switchToAnd();
        }
        else Eif (operator == 'or') {
            this.switchToOr();
        }
    };
    Facet.prototype.handleQueryStateChangedIncluded = function (includedChanged) {
        var toUnSelect = _.difference(this.getSelectedValues(), includedChanged);
        Iif (Utils_1.Utils.isNonEmptyArray(toUnSelect)) {
            this.deselectMultipleValues(toUnSelect);
        }
        if (!Utils_1.Utils.arrayEqual(this.getSelectedValues(), includedChanged, false)) {
            this.selectMultipleValues(includedChanged);
        }
    };
    Facet.prototype.handleQueryStateChangedExcluded = function (excludedChanged) {
        var toUnExclude = _.difference(this.getExcludedValues(), excludedChanged);
        Iif (Utils_1.Utils.isNonEmptyArray(toUnExclude)) {
            this.unexcludeMultipleValues(toUnExclude);
        }
        if (!Utils_1.Utils.arrayEqual(this.getExcludedValues(), excludedChanged, false)) {
            this.excludeMultipleValues(excludedChanged);
        }
    };
    Facet.prototype.handleLookupvalueChanged = function (lookupFieldChanged) {
        var _this = this;
        _.each(lookupFieldChanged, function (lookupvalue, value) {
            _this.facetValuesList.get(decodeURIComponent(value)).facetValue.lookupValue = decodeURIComponent(lookupvalue);
        });
    };
    Facet.prototype.handleQueryStateChanged = function (data) {
        Assert_1.Assert.exists(data);
        this.ensureDom();
        this.dependsOnUpdateParentDisplayValue();
        var trimValuesFromModel = function (values) {
            Eif (values) {
                values = _.map(values, function (value) { return value.trim(); });
            }
            return values;
        };
        var queryStateAttributes = data.attributes;
        var includedChanged = trimValuesFromModel(queryStateAttributes[this.includedAttributeId]);
        var excludedChanged = trimValuesFromModel(queryStateAttributes[this.excludedAttributeId]);
        var operator = queryStateAttributes[this.operatorAttributeId];
        var lookupValueChanged = queryStateAttributes[this.lookupValueAttributeId];
        if (this.listenToQueryStateChange) {
            if (!Utils_1.Utils.isNullOrEmptyString(operator)) {
                this.handleQueryStateChangedOperator(operator);
            }
            Eif (!Utils_1.Utils.isNullOrUndefined(includedChanged)) {
                this.handleQueryStateChangedIncluded(includedChanged);
            }
            Eif (!Utils_1.Utils.isNullOrUndefined(excludedChanged)) {
                this.handleQueryStateChangedExcluded(excludedChanged);
            }
            Eif (!Utils_1.Utils.isNullOrUndefined(lookupValueChanged)) {
                this.handleLookupvalueChanged(lookupValueChanged);
            }
        }
    };
    Facet.prototype.handlePopulateOmnibox = function (data) {
        Assert_1.Assert.exists(data);
        Assert_1.Assert.exists(data.completeQueryExpression);
        // The omnibox calls can come in before a first query was executed (atypical, but
        // if no query is auto-triggered on initialization). To ensure that we've got the
        // proper filters, we ensure that at least a dumbshow query builder run occured
        // before proceeding.
        this.queryController.ensureCreatedQueryBuilder();
        Iif (this.canFetchMore) {
            this.handleOmniboxWithSearchInFacet(data);
        }
        else {
            this.handleOmniboxWithStaticValue(data);
        }
    };
    Facet.prototype.handleOmniboxWithSearchInFacet = function (eventArg) {
        var _this = this;
        var regex = new RegExp('^' + eventArg.completeQueryExpression.regex.source, 'i');
        var promise = new Promise(function (resolve, reject) {
            var searchParameters = new FacetSearchParameters_1.FacetSearchParameters(_this);
            searchParameters.setValueToSearch(eventArg.completeQueryExpression.word);
            searchParameters.nbResults = _this.options.numberOfValuesInOmnibox;
            _this.facetQueryController
                .search(searchParameters)
                .then(function (fieldValues) {
                var facetValues = _.map(_.filter(fieldValues, function (fieldValue) {
                    return regex.test(fieldValue.lookupValue);
                }), function (fieldValue) {
                    return _this.values.get(fieldValue.lookupValue) || FacetValue_1.FacetValue.create(fieldValue);
                });
                var element = new OmniboxValuesList_1.OmniboxValuesList(_this, facetValues, eventArg, OmniboxValueElement_1.OmniboxValueElement).build();
                resolve({ element: element, zIndex: _this.omniboxZIndex });
            })
                .catch(function () {
                resolve({ element: undefined });
            });
        });
        eventArg.rows.push({ deferred: promise });
    };
    Facet.prototype.handleDuringQuery = function () {
        this.ensureDom();
        if (!this.keepDisplayedValuesNextTime) {
            this.fadeInactiveValuesInMainList(this.options.facetSearchDelay);
        }
    };
    Facet.prototype.handleBuildingQuery = function (data) {
        Assert_1.Assert.exists(data);
        Assert_1.Assert.exists(data.queryBuilder);
        this.facetQueryController.prepareForNewQuery();
        if (this.values.hasSelectedOrExcludedValues()) {
            var expression = this.facetQueryController.computeOurFilterExpression();
            this.logger.trace('Putting filter in query', expression);
            data.queryBuilder.advancedExpression.add(expression);
        }
    };
    Facet.prototype.handleDoneBuildingQuery = function (data) {
        Assert_1.Assert.exists(data);
        Assert_1.Assert.exists(data.queryBuilder);
        var queryBuilder = data.queryBuilder;
        this.facetQueryController.putGroupByIntoQueryBuilder(queryBuilder);
    };
    Facet.prototype.handleClearBreadcrumb = function () {
        this.reset();
    };
    Facet.prototype.updateValues = function (facetValues) {
        Assert_1.Assert.exists(facetValues);
        if (this.keepDisplayedValuesNextTime) {
            this.values.updateCountsFromNewValues(facetValues);
        }
        else {
            this.values = this.consolidateAndSortNewFacetValues(facetValues);
        }
        this.updateNumberOfValues();
    };
    Facet.prototype.consolidateAndSortNewFacetValues = function (newValues) {
        newValues.importActiveValuesFromOtherList(this.values);
        newValues.sort(this.optionsToSortFacetValues);
        return newValues;
    };
    Object.defineProperty(Facet.prototype, "optionsToSortFacetValues", {
        get: function () {
            return {
                facetValuesOrder: this.facetValuesOrder,
                numberOfValues: this.numberOfValues
            };
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(Facet.prototype, "facetValuesOrder", {
        get: function () {
            return new FacetValuesOrder_1.FacetValuesOrder(this, this.facetSort);
        },
        enumerable: true,
        configurable: true
    });
    Facet.prototype.ensureFacetValueIsInList = function (facetValue) {
        Assert_1.Assert.exists(facetValue);
        Eif (!this.values.contains(facetValue.value)) {
            this.values.add(facetValue);
        }
    };
    Facet.prototype.isAnyValueCurrentlyDisplayed = function () {
        return !this.values.isEmpty();
    };
    Facet.prototype.buildFacetContent = function () {
        this.headerElement = this.buildHeader();
        this.element.appendChild(this.headerElement);
        this.initFacetValuesList();
        if (this.shouldRenderFacetSearch()) {
            this.initFacetSearch();
        }
        if (this.shouldRenderMoreLess()) {
            this.moreElement = this.buildMore();
            this.lessElement = this.buildLess();
        }
        this.footerElement = this.buildFooter();
        this.element.appendChild(this.footerElement);
        if (this.lessElement && this.moreElement) {
            this.footerElement.appendChild(this.lessElement);
            this.footerElement.appendChild(this.moreElement);
        }
    };
    Facet.prototype.buildHeader = function () {
        var icon = this.options.headerIcon;
        if (this.options.headerIcon == this.options.field) {
            icon = undefined;
        }
        this.facetHeader = new FacetHeader_1.FacetHeader({
            facetElement: this.element,
            title: this.options.title,
            icon: icon,
            field: this.options.field,
            enableClearElement: true,
            enableCollapseElement: this.options.enableCollapse,
            facet: this,
            settingsKlass: this.options.enableSettings ? FacetSettings_1.FacetSettings : undefined,
            sortKlass: FacetSort_1.FacetSort,
            availableSorts: this.options.availableSorts
        });
        var built = this.facetHeader.build();
        this.facetSettings = this.facetHeader.settings;
        this.facetSort = this.facetHeader.sort;
        return built;
    };
    Facet.prototype.unpinFacetPosition = function () {
        if (this.shouldFacetUnpin() && this.options.preservePosition) {
            Dom_1.$$(this.pinnedTopSpace).addClass('coveo-with-animation');
            Dom_1.$$(this.pinnedBottomSpace).addClass('coveo-with-animation');
            this.pinnedTopSpace.style.height = '0px';
            this.pinnedBottomSpace.style.height = '0px';
        }
        this.unpinnedViewportPosition = undefined;
        this.pinnedViewportPosition = undefined;
    };
    Facet.prototype.isFacetPinned = function () {
        return Utils_1.Utils.exists(this.pinnedViewportPosition);
    };
    Facet.prototype.shouldFacetUnpin = function () {
        return Utils_1.Utils.exists(this.unpinnedViewportPosition);
    };
    Facet.prototype.ensurePinnedFacetHasntMoved = function () {
        Iif (this.isFacetPinned()) {
            Assert_1.Assert.exists(this.pinnedViewportPosition);
            Dom_1.$$(this.pinnedTopSpace).removeClass('coveo-with-animation');
            Dom_1.$$(this.pinnedBottomSpace).removeClass('coveo-with-animation');
            this.pinnedTopSpace.style.height = '0px';
            this.pinnedBottomSpace.style.height = '0px';
            // Under firefox scrolling the body doesn't work, but window does
            // on all browser, so we substitute those here when needed.
            var elementToScroll_1 = this.options.scrollContainer == document.body ? window : this.options.scrollContainer;
            var currentViewportPosition = this.element.getBoundingClientRect().top;
            var offset_1 = currentViewportPosition - this.pinnedViewportPosition;
            var scrollToOffset = function () {
                if (elementToScroll_1 instanceof Window) {
                    window.scrollTo(0, new Dom_1.Win(elementToScroll_1).scrollY() + offset_1);
                }
                else {
                    elementToScroll_1.scrollTop = elementToScroll_1.scrollTop + offset_1;
                }
            };
            // First try to adjust position by scrolling the page
            scrollToOffset();
            currentViewportPosition = this.element.getBoundingClientRect().top;
            offset_1 = currentViewportPosition - this.pinnedViewportPosition;
            // If scrolling has worked (offset == 0), we're good to go, nothing to do anymore.
            if (offset_1 < 0) {
                // This means the facet element is scrolled up in the viewport,
                // scroll it down by adding space in the top container
                this.pinnedTopSpace.style.height = offset_1 * -1 + 'px';
            }
            this.unpinnedViewportPosition = this.pinnedViewportPosition;
            this.pinnedViewportPosition = null;
        }
    };
    Facet.prototype.buildFooter = function () {
        return Dom_1.$$('div', { className: 'coveo-facet-footer' }).el;
    };
    Facet.prototype.buildMore = function () {
        var _this = this;
        var svgContainer = Dom_1.$$('span', { className: 'coveo-facet-more-icon' }, SVGIcons_1.SVGIcons.icons.arrowDown).el;
        SVGDom_1.SVGDom.addClassToSVGInContainer(svgContainer, 'coveo-facet-more-icon-svg');
        var more = Dom_1.$$('div', { className: 'coveo-facet-more', tabindex: 0 }, svgContainer).el;
        new AccessibleButton_1.AccessibleButton()
            .withElement(more)
            .withLabel(Strings_1.l('ShowMoreFacetResults', this.options.title))
            .withSelectAction(function () { return _this.handleClickMore(); })
            .build();
        return more;
    };
    Facet.prototype.buildLess = function () {
        var _this = this;
        var svgContainer = Dom_1.$$('span', { className: 'coveo-facet-less-icon' }, SVGIcons_1.SVGIcons.icons.arrowUp).el;
        SVGDom_1.SVGDom.addClassToSVGInContainer(svgContainer, 'coveo-facet-less-icon-svg');
        var less = Dom_1.$$('div', { className: 'coveo-facet-less', tabindex: 0 }, svgContainer).el;
        new AccessibleButton_1.AccessibleButton()
            .withElement(less)
            .withLabel(Strings_1.l('ShowLessFacetResults', this.options.title))
            .withSelectAction(function () { return _this.handleClickLess(); })
            .build();
        return less;
    };
    Facet.prototype.triggerMoreQuery = function () {
        var _this = this;
        this.logger.info('Triggering new facet more query');
        this.showWaitingAnimation();
        // fetch 1 more value than we need, so we can see if there is more value to fetch still or if we have reached
        // the end of the availables values
        this.facetQueryController
            .fetchMore(this.numberOfValues + 1)
            .then(function (queryResults) {
            _this.logAnalyticsFacetShowMoreLess(AnalyticsActionListMeta_1.analyticsActionCauseList.facetShowMore);
            var facetValues = new FacetValues_1.FacetValues(queryResults.groupByResults[0]);
            _this.values = _this.consolidateAndSortNewFacetValues(facetValues);
            _this.nbAvailableValues = _this.values.size();
            _this.updateNumberOfValues();
            _this.canFetchMore = _this.numberOfValues < _this.nbAvailableValues;
            if (_this.values.hasSelectedOrExcludedValues() && !_this.options.useAnd && _this.options.isMultiValueField) {
                _this.triggerUpdateDeltaQuery(_.filter(_this.values.getAll(), function (facetValue) { return !facetValue.selected && !facetValue.excluded; }));
            }
            else if (_this.values.hasSelectedOrExcludedValues() && !_this.options.useAnd) {
                _this.values.updateDeltaWithFilteredFacetValues(new FacetValues_1.FacetValues(), _this.options.isMultiValueField);
                _this.hideWaitingAnimation();
            }
            else {
                _this.hideWaitingAnimation();
            }
            _this.rebuildValueElements();
        })
            .catch(function () { return _this.hideWaitingAnimation(); });
    };
    Facet.prototype.triggerUpdateDeltaQuery = function (facetValues) {
        var _this = this;
        this.showWaitingAnimation();
        this.facetQueryController.searchInFacetToUpdateDelta(facetValues).then(function (queryResults) {
            var values = new FacetValues_1.FacetValues();
            _.each(queryResults.groupByResults, function (groupByResult) {
                _.each(groupByResult.values, function (groupByValue) {
                    if (!values.contains(groupByValue.value)) {
                        values.add(FacetValue_1.FacetValue.createFromGroupByValue(groupByValue));
                    }
                });
            });
            _this.values.updateDeltaWithFilteredFacetValues(values, _this.options.isMultiValueField);
            _this.cleanupDeltaValuesForMultiValueField();
            _this.rebuildValueElements();
            _this.hideWaitingAnimation();
        });
    };
    Facet.prototype.updateNumberOfValues = function () {
        if (this.keepDisplayedValuesNextTime) {
            return;
        }
        if (this.currentPage <= 0) {
            // We're on the first page, let's reset the number of values to a minimum.
            this.currentPage = 0;
            this.numberOfValues = 0;
        }
        else {
            // Calculate the number of value with the current page.
            this.numberOfValues = this.options.numberOfValues + this.currentPage * this.options.pageSize;
        }
        // Make sure we have at least the absolute minimum of value to display.
        this.numberOfValues = Math.max(this.numberOfValues, this.getMinimumNumberOfValuesToDisplay());
    };
    Facet.prototype.getMinimumNumberOfValuesToDisplay = function () {
        // The min value is the number of used values.
        var minValue = this.values.getExcluded().length + this.values.getSelected().length;
        // When using a custom sort, we have to show all values between the selected ones.
        // Thus, we must find the last selected value after a reorder and use that value as the number of value.
        if (this.options.customSort != null && this.facetSort != null && this.options.customSort.length > 0) {
            var lastSelectedValueIndex_1 = -1;
            new FacetValuesOrder_1.FacetValuesOrder(this, this.facetSort).reorderValues(this.values.getAll()).forEach(function (facetValue, index) {
                if (facetValue.selected) {
                    lastSelectedValueIndex_1 = index;
                }
            });
            minValue = lastSelectedValueIndex_1 + 1;
        }
        return Math.max(minValue, this.options.numberOfValues);
    };
    Facet.prototype.cleanupDeltaValuesForMultiValueField = function () {
        var _this = this;
        // On a multi value field, it's possible to end up in a scenario where many of the current values are empty
        // Crop those out, and adjust the nbAvailable values for the "search" and "show more";
        if (this.options.isMultiValueField) {
            _.each(this.values.getAll(), function (v) {
                if (v.occurrences == 0 && !v.selected && !v.excluded) {
                    _this.values.remove(v.value);
                }
            });
            this.nbAvailableValues = this.values.getAll().length;
        }
    };
    Facet.prototype.shouldRenderFacetSearch = function () {
        return this.options.enableFacetSearch;
    };
    Facet.prototype.shouldRenderMoreLess = function () {
        return this.options.enableMoreLess;
    };
    Facet.prototype.debugInfo = function () {
        var info = {};
        info[this['constructor']['ID']] = {
            component: this,
            groupByRequest: this.facetQueryController.lastGroupByRequest,
            groupByResult: this.facetQueryController.lastGroupByResult
        };
        return info;
    };
    Facet.prototype.logAnalyticsFacetShowMoreLess = function (cause) {
        this.usageAnalytics.logCustomEvent(cause, {
            facetId: this.options.id,
            facetField: this.options.field.toString(),
            facetTitle: this.options.title
        }, this.element);
    };
    Facet.ID = 'Facet';
    Facet.omniboxIndex = 50;
    Facet.doExport = function () {
        GlobalExports_1.exportGlobally({
            Facet: Facet,
            FacetHeader: FacetHeader_1.FacetHeader,
            FacetSearchValuesList: FacetSearchValuesList_1.FacetSearchValuesList,
            FacetSettings: FacetSettings_1.FacetSettings,
            FacetSort: FacetSort_1.FacetSort,
            FacetUtils: FacetUtils_1.FacetUtils,
            FacetValueElement: FacetValueElement_1.FacetValueElement,
            FacetValue: FacetValue_1.FacetValue
        });
    };
    /**
     * The possible options for a facet
     * @componentOptions
     */
    Facet.options = __assign({ 
        /**
         * Specifies the title to display at the top of the facet.
         *
         * Default value is the localized string for `NoTitle`.
         */
        title: ComponentOptions_1.ComponentOptions.buildLocalizedStringOption({
            localizedString: function () { return Strings_1.l('NoTitle'); },
            section: 'CommonOptions',
            priority: 10
        }), 
        /**
         * Specifies the index field whose values the facet should use.
         *
         * The field must of the `string` type.
         *
         * This requires the given field to be configured correctly in the index as a *Facet field* (see
         * [Add or Edit Fields](https://docs.coveo.com/en/1982/)).
         *
         * Specifying a value for this option is required for the `Facet` component to work.
         */
        field: ComponentOptions_1.ComponentOptions.buildFieldOption({ required: true, groupByField: true, section: 'CommonOptions' }), headerIcon: ComponentOptions_1.ComponentOptions.buildStringOption({
            deprecated: 'This option is exposed for legacy reasons, and the recommendation is to not use this option.'
        }), 
        /**
         * Specifies a unique identifier for the facet. Among other things, this identifier serves the purpose of saving
         * the facet state in the URL hash.
         *
         * If you have two facets with the same field on the same page, you should specify an `id` value for at least one of
         * those two facets. This `id` must be unique among the facets.
         *
         * Non-word characters except - @ $ _ . + ! * ' ( ) , , ( `^a-zA-Z0-9-@$_.+!*'(),,]+` ) are automatically removed from the `id` value.
         *
         * Default value is the [`field`]{@link Facet.options.field} option value.
         */
        id: ComponentOptions_1.ComponentOptions.buildStringOption({
            postProcessing: function (value, options) {
                if (value) {
                    // All non-word characters, except @ (the default character that specifies a field in the index)
                    // and characters that do no need to be encoded in the URL : - @ $ _ . + ! * ' ( ) , ,
                    var modified = value.replace(/[^a-zA-Z0-9-@$_.+!*'(),,]+/g, '');
                    if (Utils_1.Utils.isNullOrEmptyString(modified)) {
                        return options.field;
                    }
                    return modified;
                }
                return options.field;
            }
        }), 
        /**
         * Specifies whether the facet [`field`]{@link Facet.options.field} is configured in the index as a multi-value
         * field (semicolon separated values such as `abc;def;ghi`).
         *
         * Default value is `false`.
         */
        isMultiValueField: ComponentOptions_1.ComponentOptions.buildBooleanOption({ defaultValue: false, section: 'CommonOptions' }), 
        /**
         * Specifies the field whose values the Facet should display.
         *
         * @deprecated This option is exposed for legacy reasons. It is not recommended to use this option.
         */
        lookupField: ComponentOptions_1.ComponentOptions.buildFieldOption({
            deprecated: 'This option is exposed for legacy reasons. It is not recommended to use this option.'
        }), 
        /**
         * Specifies whether to display the facet **Settings** menu.
         *
         * See also the [`enableSettingsFacetState`]{@link Facet.options.enableSettingsFacetState},
         * [`availableSorts`]{@link Facet.options.availableSorts}, and
         * [`enableCollapse`]{@link Facet.options.enableCollapse} options.
         *
         * **Note:**
         * > The [`FacetRange`]{@link FacetRange} component does not support this option.
         *
         * Default value is `true`.
         */
        enableSettings: ComponentOptions_1.ComponentOptions.buildBooleanOption({ defaultValue: true, section: 'Sorting', priority: 9 }), 
        /**
         * If the [`enableSettings`]{@link Facet.options.enableSettings} option is `true`, specifies whether the
         * **Save state** menu option is available in the facet **Settings** menu.
         *
         * **Note:**
         * > The [`FacetRange`]{@link FacetRange} component does not support this option.
         *
         * Default value is `false`.
         */
        enableSettingsFacetState: ComponentOptions_1.ComponentOptions.buildBooleanOption({ defaultValue: false, depend: 'enableSettings' }), 
        /**
         * If the [`enableSettings`]{@link Facet.options.enableSettings} option is `true`, specifies the sort criteria
         * options to display in the facet **Settings** menu.
         *
         * Possible values are:
         * - `"occurrences"`
         * - `"score"`
         * - `"alphaascending"`
         * - `"alphadescending"`
         * - `"computedfieldascending"`
         * - `"computedfielddescending"`
         * - `"custom"`
         *
         * See {@link IGroupByRequest.sortCriteria} for a description of each possible value.
         *
         * **Notes:**
         * > * The [`FacetRange`]{@link FacetRange} component does not support this option.
         *
         * > * Using value captions will disable alphabetical sorts (see the [valueCaption]{@link Facet.options.valueCaption} option).
         *
         * Default value is `occurrences,score,alphaascending,alphadescending`.
         */
        availableSorts: ComponentOptions_1.ComponentOptions.buildListOption({
            defaultValue: ['occurrences', 'score', 'alphaascending', 'alphadescending'],
            section: 'Sorting',
            depend: 'enableSettings',
            values: [
                'occurrences',
                'score',
                'alphaascending',
                'alphadescending',
                'computedfieldascending',
                'computedfielddescending',
                'chisquare',
                'nosort'
            ]
        }), 
        /**
         * Specifies the criteria to use to sort the facet values.
         *
         * See {@link IGroupByRequest.sortCriteria} for the list and description of possible values.
         *
         * Default value is the first sort criteria specified in the [`availableSorts`]{@link Facet.options.availableSorts}
         * option, or `occurrences` if no sort criteria is specified.
         */
        sortCriteria: ComponentOptions_1.ComponentOptions.buildStringOption({
            postProcessing: function (value, options) {
                return value || (options.availableSorts.length > 0 ? options.availableSorts[0] : 'occurrences');
            },
            section: 'Sorting'
        }), 
        /**
         * Specifies a custom order by which to sort the facet values.
         *
         * **Example:**
         *
         * You could use this option to specify a logical order for support tickets, such as:
         * ```html
         * <div class="CoveoFacet" data-field="@ticketstatus" data-title="Ticket Status" data-tab="All" data-custom-sort="New,Opened,Feedback,Resolved"></div>
         * ```
         *
         * **Note:**
         * > The [`FacetRange`]{@link FacetRange} component does not support this option.
         */
        customSort: ComponentOptions_1.ComponentOptions.buildListOption({ section: 'Sorting' }), 
        /**
         * Specifies the maximum number of field values to display by default in the facet before the user
         * clicks the arrow to show more.
         *
         * See also the [`enableMoreLess`]{@link Facet.options.enableMoreLess} option.
         */
        numberOfValues: ComponentOptions_1.ComponentOptions.buildNumberOption({ defaultValue: 5, min: 0, section: 'CommonOptions' }), 
        /**
         * Specifies the *injection depth* to use for the [`GroupByRequest`]{@link IGroupByRequest} operation.
         *
         * The injection depth determines how many results to scan in the index to ensure that the facet lists all potential
         * facet values. Increasing this value enhances the accuracy of the listed values at the cost of performance.
         *
         * Default value is `1000`. Minimum value is `1000`.
         * @notSupportedIn salesforcefree
         *
         * @examples 1500
         */
        injectionDepth: ComponentOptions_1.ComponentOptions.buildNumberOption({ defaultValue: 1000, min: 1000 }), showIcon: ComponentOptions_1.ComponentOptions.buildBooleanOption({
            defaultValue: false,
            deprecated: 'This option is exposed for legacy reasons. It is not recommended to use this option.'
        }), 
        /**
         * Specifies whether to use the `AND` operator in the resulting filter when multiple values are selected in the
         * facet.
         *
         * Setting this option to `true` means that items must have all of the selected values to match the resulting
         * query.
         *
         * Default value is `false`, which means that the filter uses the `OR` operator. Thus, by default, items must
         * have at least one of the selected values to match the query.
         */
        useAnd: ComponentOptions_1.ComponentOptions.buildBooleanOption({ defaultValue: false, section: 'Filtering' }), 
        /**
         * Specifies whether to allow the user to toggle between the `OR` and `AND` modes in the facet.
         *
         * Setting this option to `true` displays an icon in the top right corner of the facet. The user can click this icon
         * to toggle between between the two modes.
         *
         * Default value is `false`.
         */
        enableTogglingOperator: ComponentOptions_1.ComponentOptions.buildBooleanOption({
            defaultValue: false,
            alias: 'allowTogglingOperator'
        }), 
        /**
         * Specifies whether to display a search box at the bottom of the facet for searching among the available facet
         * [`field`]{@link Facet.options.field} values.
         *
         * See also the [`facetSearchDelay`]{@link Facet.options.facetSearchDelay},
         * [`facetSearchIgnoreAccents`]{@link Facet.options.facetSearchIgnoreAccents}, and
         * [`numberOfValuesInFacetSearch`]{@link Facet.options.numberOfValuesInFacetSearch} options.
         *
         * **Note:**
         * > The [`FacetRange`]{@link FacetRange} component does not support this option.
         *
         * Default value is `true`.
         */
        enableFacetSearch: ComponentOptions_1.ComponentOptions.buildBooleanOption({ defaultValue: true, section: 'FacetSearch', priority: 8 }), 
        /**
         * If the [`enableFacetSearch`]{@link Facet.options.enableFacetSearch} option is `true`, specifies the delay (in
         * milliseconds) before sending a search request to the server when the user starts typing in the facet search box.
         *
         * Specifying a smaller value makes results appear faster. However, chances of having to cancel many requests
         * sent to the server increase as the user keeps on typing new characters.
         *
         * **Note:**
         * > The [`FacetRange`]{@link FacetRange} component does not support this option.
         *
         * Default value is `100`. Minimum value is `0`.
         */
        facetSearchDelay: ComponentOptions_1.ComponentOptions.buildNumberOption({ defaultValue: 100, min: 0, depend: 'enableFacetSearch' }), 
        /**
         * If the [`enableFacetSearch`]{@link Facet.options.enableFacetSearch} option is `true`, specifies whether to ignore
         * accents in the facet search box.
         *
         * **Note:**
         * > The [`FacetRange`]{@link FacetRange} component does not support this option.
         *
         * Default value is `false`.
         */
        facetSearchIgnoreAccents: ComponentOptions_1.ComponentOptions.buildBooleanOption({ defaultValue: false, depend: 'enableFacetSearch' }), 
        /**
         * If the [`enableFacetSearch`]{@link Facet.options.enableFacetSearch} option is `true`, specifies the number of v
         * alues to display in the facet search results popup.
         *
         * **Note:**
         * > The [`FacetRange`]{@link FacetRange} component does not support this option.
         *
         * Default value is `15`. Minimum value is `1`.
         */
        numberOfValuesInFacetSearch: ComponentOptions_1.ComponentOptions.buildNumberOption({ defaultValue: 15, min: 1, section: 'FacetSearch' }), 
        /**
         * Specifies whether [wildcards]{@link AllowedValuesPatternType.wildcards} are used as the [allowedValuesPatternType]{@link IGroupByRequest.allowedValuesPatternType}
         * in the [groupBy]{@link IGroupByRequest} for the facet search.
         *
         * Enabling this option returns results that end with the entered value. For example, searching for `veo` would match with `Coveo`.
         *
         * **Note:**
         * > If you are experiencing slow facet search and/or timeouts when this option is set to `true`, consider enabling the **Use cache for nested queries**
         * > option on your facet [field]{@link Facet.options.field} in the Coveo Cloud Admninistration Console (see [Add or Edit Fields]{@link https://docs.coveo.com/en/1982/}).
         */
        useWildcardsInFacetSearch: ComponentOptions_1.ComponentOptions.buildBooleanOption({ defaultValue: false, section: 'FacetSearch' }), 
        /**
         * Specifies whether the facet should push data to the [`Breadcrumb`]{@link Breadcrumb} component.
         *
         * See also the [`numberOfValuesInBreadcrumb`]{@link Facet.options.numberOfValuesInBreadcrumb} option.
         *
         * Default value is `true`.
         */
        includeInBreadcrumb: ComponentOptions_1.ComponentOptions.buildBooleanOption({ defaultValue: true }), 
        /**
         * If the [`includeInBreadcrumb`]{@link Facet.options.includeInBreadcrumb} option is `true`, specifies the maximum
         * number of values that the facet should display in the [`Breadcrumb`]{@link Breadcrumb} before outputting a
         * **more...** button.
         *
         * Default value is `5` on a desktop computer and `3` on a mobile device. Minimum value is `0`.
         */
        numberOfValuesInBreadcrumb: ComponentOptions_1.ComponentOptions.buildNumberOption({
            defaultFunction: function () { return (DeviceUtils_1.DeviceUtils.isMobileDevice() ? 3 : 5); },
            min: 0,
            depend: 'includeInBreadcrumb'
        }), 
        /**
         * Specifies whether the Facet should push data to the {@link Omnibox} component.
         *
         * See also {@link Facet.options.numberOfValuesInOmnibox}.
         *
         * Default value is `false`.
         *
         * @deprecated This option is exposed for legacy reasons. It is not recommended to use this option.
         */
        includeInOmnibox: ComponentOptions_1.ComponentOptions.buildBooleanOption({
            defaultValue: false,
            deprecated: 'This option is exposed for legacy reasons. It is not recommended to use this option.'
        }), 
        /**
         * When {@link Facet.options.includeInOmnibox} is `true`, specifies the number of values to populate the
         * {@link Breadcrumb} with.
         *
         * Default value is `5` on desktop computer and `3` on a mobile device. Minimum value is `0`.
         *
         * @deprecated This option is exposed for legacy reasons. It is not recommended to use this option.
         */
        numberOfValuesInOmnibox: ComponentOptions_1.ComponentOptions.buildNumberOption({
            defaultFunction: function () { return (DeviceUtils_1.DeviceUtils.isMobileDevice() ? 3 : 5); },
            min: 0,
            depend: 'includeInOmnibox',
            deprecated: 'This option is exposed for legacy reasons. It is not recommended to use this option.'
        }), 
        /**
         * Specifies the name of a field on which to execute an aggregate operation for all distinct values of the facet
         * [`field`]{@link Facet.options.field}.
         *
         * The facet displays the result of the operation along with the number of occurrences for each value.
         *
         * You can use this option to compute the sum of a field (like a money amount) for each listed facet value.
         *
         * Works in conjunction with the [`computedFieldOperation`]{@link Facet.options.computedFieldOperation},
         * [`computedFieldFormat`]{@link Facet.options.computedFieldFormat}, and
         * [`computedFieldCaption`]{@link Facet.options.computedFieldCaption} options.
         * @notSupportedIn salesforcefree
         */
        computedField: ComponentOptions_1.ComponentOptions.buildFieldOption({ priority: 7 }), 
        /**
         * Specifies the type of aggregate operation to perform on the [`computedField`]{@link Facet.options.computedField}.
         *
         * The possible values are:
         * - `sum` - Computes the sum of the computed field values.
         * - `average` - Computes the average of the computed field values.
         * - `minimum` - Finds the minimum value of the computed field values.
         * - `maximum` - Finds the maximum value of the computed field values.
         *
         * Default value is `sum`.
         * @notSupportedIn salesforcefree
         */
        computedFieldOperation: ComponentOptions_1.ComponentOptions.buildStringOption({
            defaultValue: 'sum',
            section: 'ComputedField'
        }), 
        /**
         * Specifies how to format the values resulting from a
         * [`computedFieldOperation`]{@link Facet.options.computedFieldOperation}.
         *
         * The Globalize library defines all available formats (see
         * [Globalize](https://github.com/klaaspieter/jquery-global#globalizeformat-value-format-culture-)).
         *
         * The most commonly used formats are:
         * - `c0` - Formats the value as a currency.
         * - `n0` - Formats the value as an integer.
         * - `n2` - Formats the value as a floating point with 2 decimal digits.
         *
         * Default value is `"c0"`.
         * @notSupportedIn salesforcefree
         */
        computedFieldFormat: ComponentOptions_1.ComponentOptions.buildStringOption({
            defaultValue: 'c0',
            section: 'ComputedField'
        }), 
        /**
         * Specifies what the caption of the [`computedField`]{@link Facet.options.computedField} should be in the facet
         * **Settings** menu for sorting.
         *
         * For example, setting this option to `"Money"` will display `"Money Ascending"` for computed field ascending.
         *
         * **Note:**
         * > The [`FacetRange`]{@link FacetRange} component does not support this option.
         *
         * Default value is the localized string for `ComputedField`.
         * @notSupportedIn salesforcefree
         */
        computedFieldCaption: ComponentOptions_1.ComponentOptions.buildLocalizedStringOption({
            localizedString: function () { return Strings_1.l('ComputedField'); },
            section: 'ComputedField'
        }), 
        /**
         * Specifies whether the facet should remain stable in its current position in the viewport while the mouse cursor
         * is over it.
         *
         * Whenever the value selection changes in a facet, the search interface automatically performs a query. This new
         * query might cause other elements in the page to resize themselves (typically, other facets above or below the
         * one the user is interacting with).
         *
         * This option is responsible for adding the `<div class='coveo-topSpace'>` and
         * `<div class='coveo-bottomSpace'>` around the Facet container. The Facet adjusts the scroll amount of the page to
         * ensure that it does not move relatively to the mouse when the results are updated.
         *
         * In some cases, the facet also adds margins to the `scrollContainer`, if scrolling alone is not enough to
         * preserve position.
         *
         * See also the [`paddingContainer`]{@link Facet.options.paddingContainer}, and
         * [`scrollContainer`]{@link Facet.options.scrollContainer} options.
         *
         * Default value is `true`.
         */
        preservePosition: ComponentOptions_1.ComponentOptions.buildBooleanOption({ defaultValue: true }), 
        /**
         * Specifies the parent container of the facets.
         *
         * Used by the [`preservePosition`]{@link Facet.options.preservePosition} option.
         *
         * Default value is `element.parentElement`.
         */
        paddingContainer: ComponentOptions_1.ComponentOptions.buildSelectorOption({
            defaultFunction: function (element) {
                var standardColumn = Dom_1.$$(element).parent('coveo-facet-column');
                if (standardColumn != null) {
                    return standardColumn;
                }
                return element.parentElement;
            }
        }), 
        /**
         * Specifies the HTML element (through a CSS selector) whose scroll amount the facet should adjust to preserve its
         * position when results are updated.
         *
         * Used by the [`preservePosition`]{@link Facet.options.preservePosition} option.
         *
         * Default value is `document.body`.
         */
        scrollContainer: ComponentOptions_1.ComponentOptions.buildSelectorOption({ defaultFunction: function (element) { return document.body; } }), 
        /**
         * Specifies whether to enable the **More** and **Less** buttons in the Facet.
         *
         * See also the [`pageSize`]{@link Facet.options.pageSize} option.
         *
         * **Note:**
         * > The [`FacetRange`]{@link FacetRange} component does not support this option.
         *
         * Default value is `true`.
         */
        enableMoreLess: ComponentOptions_1.ComponentOptions.buildBooleanOption({ defaultValue: true }), 
        /**
         * If the [`enableMoreLess`]{@link Facet.options.enableMoreLess} option is `true`, specifies the number of
         * additional results to fetch when clicking the **More** button.
         *
         * **Note:**
         * > The [`FacetRange`]{@link FacetRange} component does not support this option.
         *
         * Default value is `10`. Minimum value is `1`.
         */
        pageSize: ComponentOptions_1.ComponentOptions.buildNumberOption({ defaultValue: 10, min: 1, depend: 'enableMoreLess' }), 
        /**
         * If the [`enableSettings`]{@link Facet.options.enableSettings} option is `true`, specifies whether the
         * **Collapse \ Expand** menu option is available in the facet **Settings** menu.
         *
         * **Note:**
         * > The [`FacetRange`]{@link FacetRange} component does not support this option.
         *
         * Default value is `true`.
         */
        enableCollapse: ComponentOptions_1.ComponentOptions.buildBooleanOption({ defaultValue: true, depend: 'enableSettings' }), 
        /**
         * Specifies an explicit list of [`allowedValues`]{@link IGroupByRequest.allowedValues} in the
         * [`GroupByRequest`]{@link IGroupByRequest}.
         *
         * If you specify a list of values for this option, the facet uses only these values (if they are available in
         * the current result set).
         *
         * **Example:**
         *
         * The following facet only uses the `Contact`, `Account`, and `File` values of the `@objecttype` field. Even if the
         * current result set contains other `@objecttype` values, such as `Message`, or `Product`, the facet does not use
         * those other values.
         *
         * ```html
         *
         * <div class="CoveoFacet" data-field="@objecttype" data-title="Object Type" data-tab="All" data-allowed-values="Contact,Account,File"></div>
         * ```
         *
         * Default value is `undefined`, and the facet uses all available values for its
         * [`field`]{@link Facet.options.field} in the current result set.
         */
        allowedValues: ComponentOptions_1.ComponentOptions.buildListOption(), 
        /**
         * Specifies an additional query expression (query override) to add to each
         * [`GroupByRequest`]{@link IGroupByRequest} that this facet performs.
         *
         * Example: `@date>=2014/01/01`
         * @notSupportedIn salesforcefree
         */
        additionalFilter: ComponentOptions_1.ComponentOptions.buildQueryExpressionOption(), 
        /**
         * Specifies whether this facet only appears when a value is selected in its "parent" facet.
         *
         * To specify the parent facet, use its [`id`]{@link Facet.options.id}.
         *
         * Remember that by default, a facet `id` value is the same as its [`field`]{@link Facet.options.field} option
         * value.
         *
         * **Examples:**
         *
         * First case: the "parent" facet has no custom `id`:
         * ```html
         * <!-- "Parent" Facet: -->
         * <div class='CoveoFacet' data-field='@myfield' data-title='My Parent Facet'></div>
         *
         * <!-- The "dependent" Facet must refer to the default `id` of its "parent" Facet, which is the name of its field. -->
         * <div class='CoveoFacet' data-field='@myotherfield' data-title='My Dependent Facet' data-depends-on='@myfield'></div>
         * ```
         *
         * Second case: the "parent" facet has a custom `id`:
         * ```html
         * <!-- "Parent" Facet: -->
         * <div class='CoveoFacet' data-field='@myfield' data-title='My Parent Facet' data-id='myParentCustomId'></div>
         *
         * <!-- The "dependent" Facet must refer to the custom `id` of its "parent" Facet, which is 'myParentCustomId'. -->
         * <div class='CoveoFacet' data-field='@myotherfield' data-title='My Dependent Facet' data-depends-on='myParentCustomId'></div>
         * ```
         *
         * Default value is `undefined`
         */
        dependsOn: ComponentOptions_1.ComponentOptions.buildStringOption(), 
        /**
         * A function that verifies whether the current state of the `dependsOn` facet allows the dependent facet to be displayed.
         *
         * If specified, the function receives a reference to the resolved `dependsOn` facet component instance as an argument, and must return a boolean.
         * The function's argument should typically be treated as read-only.
         *
         * By default, the dependent facet is displayed whenever one or more values are selected in its `dependsOn` facet.
         *
         * @externaldocs [Defining Dependent Facets](https://docs.coveo.com/3210/)
         */
        dependsOnCondition: ComponentOptions_1.ComponentOptions.buildCustomOption(function () {
            return null;
        }, { depend: 'dependsOn', section: 'CommonOptions' }), 
        /**
         * Specifies a JSON object describing a mapping of facet values to their desired captions. See
         * [Normalizing Facet Value Captions](https://docs.coveo.com/en/368/).
         *
         * **Examples:**
         *
         * You can set the option in the ['init']{@link init} call:
         * ```javascript
         * var myValueCaptions = {
         *   "txt" : "Text files",
         *   "html" : "Web page",
         *   [ ... ]
         * };
         *
         * Coveo.init(document.querySelector("#search"), {
         *   Facet : {
         *     valueCaption : myValueCaptions
         *   }
         * });
         * ```
         *
         * Or before the `init` call, using the ['options']{@link options} top-level function:
         * ```javascript
         * Coveo.options(document.querySelector("#search"), {
         *   Facet : {
         *     valueCaption : myValueCaptions
         *   }
         * });
         * ```
         *
         * Or directly in the markup:
         * ```html
         * <!-- Ensure that the double quotes are properly handled in data-value-caption. -->
         * <div class='CoveoFacet' data-field='@myotherfield' data-value-caption='{"txt":"Text files","html":"Web page"}'></div>
         * ```
         *
         * **Note:**
         * > Using value captions will disable alphabetical sorts (see the [availableSorts]{@link Facet.options.availableSorts} option).
         */
        valueCaption: ComponentOptions_1.ComponentOptions.buildJsonOption() }, ResponsiveFacetOptions_1.ResponsiveFacetOptions);
    return Facet;
}(Component_1.Component));
exports.Facet = Facet;
Initialization_1.Initialization.registerAutoCreateComponent(Facet);
Facet.doExport();
 
 
/***/ }),
/* 33 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
/**
 * This static class is there to contains the different string definition for all the events related to {@link Breadcrumb}.
 */
var BreadcrumbEvents = /** @class */ (function () {
    function BreadcrumbEvents() {
    }
    /**
     * Triggered when the breadcrumb needs to update its content. External code can use this event to provide bits of HTML that should be included in the breadcrumb.
     *
     * All handlers bound to this event will receive a {@link IPopulateBreadcrumbEventArgs} as an argument.
     */
    BreadcrumbEvents.populateBreadcrumb = 'populateBreadcrumb';
    /**
     * Triggered when the user clicks the Clear All button in the breadcrumb. When this event is raised, every filter that is included in the breadcrumb should be removed.
     *
     * This event does not provide custom event data.
     */
    BreadcrumbEvents.clearBreadcrumb = 'clearBreadcrumb';
    BreadcrumbEvents.redrawBreadcrumb = 'redrawBreadcrumb';
    return BreadcrumbEvents;
}());
exports.BreadcrumbEvents = BreadcrumbEvents;
 
 
/***/ }),
/* 34 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Assert_1 = __webpack_require__(12);
var Dom_1 = __webpack_require__(0);
var Logger_1 = __webpack_require__(18);
var Latinize_1 = __webpack_require__(1013);
var _ = __webpack_require__(1);
var StringUtils = /** @class */ (function () {
    function StringUtils() {
    }
    StringUtils.javascriptEncode = function (value) {
        Assert_1.Assert.isString(value);
        value = value.replace(/\\/g, '\\\\');
        value = value.replace(/'/g, "\\'");
        value = value.replace(/"/g, '\\"');
        return value;
    };
    StringUtils.htmlEncode = function (value) {
        Assert_1.Assert.isString(value);
        var div = Dom_1.$$('div');
        div.text(value);
        return div.el.innerHTML;
    };
    StringUtils.splice = function (value, index, remove, toAdd) {
        return value.slice(0, index) + toAdd + value.slice(index + Math.abs(remove));
    };
    StringUtils.removeMiddle = function (value, length, toAdd) {
        if (value.length < length) {
            return value;
        }
        var toRemove = value.length - length;
        var index = Math.floor(length / 2);
        return StringUtils.splice(value, index, toRemove, toAdd);
    };
    StringUtils.regexEncode = function (value) {
        Assert_1.Assert.isString(value);
        return value.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, '\\$&');
    };
    StringUtils.stringToRegex = function (value, ignoreAccent) {
        if (ignoreAccent === void 0) { ignoreAccent = false; }
        Assert_1.Assert.isString(value);
        var encoded = StringUtils.regexEncode(value);
        if (ignoreAccent) {
            return _.map(encoded, function (char) {
                var regexp = _.find(StringUtils.accented, function (regexp) { return char.match(regexp) != null; });
                if (regexp) {
                    return regexp.source;
                }
                return char;
            }).join('');
        }
        return encoded;
    };
    StringUtils.wildcardsToRegex = function (value, ignoreAccent) {
        if (ignoreAccent === void 0) { ignoreAccent = false; }
        Assert_1.Assert.isString(value);
        var encoded = StringUtils.stringToRegex(value, ignoreAccent);
        encoded = encoded.replace(/\\\*/, '.*');
        encoded = encoded.replace(/\\\?/, '.');
        return encoded;
    };
    StringUtils.getHighlights = function (strToSearch, regexToFind, dataHighlightGroupTerm) {
        var match, indexes = [];
        while ((match = regexToFind.exec(strToSearch))) {
            var desiredMatch = match[2];
            var undesiredMatch = match[1];
            var offset = match.index + undesiredMatch.length;
            indexes.push({ offset: offset, length: desiredMatch.length, dataHighlightGroupTerm: dataHighlightGroupTerm });
            if (!regexToFind.global) {
                break;
            }
        }
        return _.isEmpty(indexes) ? undefined : indexes;
    };
    StringUtils.encodeCarriageReturn = function (strToEncode) {
        Assert_1.Assert.isString(strToEncode);
        return strToEncode.replace(/\n/g, '<br/>');
    };
    StringUtils.equalsCaseInsensitive = function (str1, str2) {
        return str1.toLowerCase() == str2.toLowerCase();
    };
    StringUtils.match = function (value, regex) {
        var results = [];
        var arr;
        while ((arr = regex.exec(value)) !== null) {
            results.push(arr);
        }
        return results;
    };
    StringUtils.hashCode = function (str) {
        var hash = 0;
        var len = str.length;
        for (var i = 0; i < len; i++) {
            var char = str.charCodeAt(i);
            hash = (hash << 5) - hash + char;
            hash = hash & hash; // Convert to 32bit integer
        }
        return hash.toString(16);
    };
    // http://stackoverflow.com/a/25575009
    StringUtils.latinize = function (str) {
        return Latinize_1.latinize(str);
    };
    StringUtils.capitalizeFirstLetter = function (str) {
        return str.charAt(0).toUpperCase() + str.slice(1);
    };
    StringUtils.buildStringTemplateFromResult = function (template, result) {
        var _this = this;
        Iif (!template) {
            return '';
        }
        return template.replace(/\$\{(.*?)\}/g, function (value) {
            var key = value.substring(2, value.length - 1);
            var newValue = StringUtils.readFromObject(result, key);
            if (!newValue) {
                newValue = StringUtils.readFromObject(window, key);
            }
            if (!newValue) {
                new Logger_1.Logger(_this).warn(key + " used in the ResultLink template is undefined for this result: " + result.title);
            }
            return newValue || value;
        });
    };
    StringUtils.readFromObject = function (object, key) {
        var firstPeriodIndex = key.indexOf('.');
        if (object && firstPeriodIndex !== -1) {
            var newKey = key.substring(firstPeriodIndex + 1);
            key = key.substring(0, firstPeriodIndex);
            return this.readFromObject(object[key], newKey);
        }
        return object ? object[key] : undefined;
    };
    StringUtils.accented = {
        A: /[Aa\xaa\xc0-\xc5\xe0-\xe5\u0100-\u0105\u01cd\u01ce\u0200-\u0203\u0226\u0227\u1d2c\u1d43\u1e00\u1e01\u1e9a\u1ea0-\u1ea3\u2090\u2100\u2101\u213b\u249c\u24b6\u24d0\u3371-\u3374\u3380-\u3384\u3388\u3389\u33a9-\u33af\u33c2\u33ca\u33df\u33ff\uff21\uff41]/g,
        B: /[Bb\u1d2e\u1d47\u1e02-\u1e07\u212c\u249d\u24b7\u24d1\u3374\u3385-\u3387\u33c3\u33c8\u33d4\u33dd\uff22\uff42]/g,
        C: /[Cc\xc7\xe7\u0106-\u010d\u1d9c\u2100\u2102\u2103\u2105\u2106\u212d\u216d\u217d\u249e\u24b8\u24d2\u3376\u3388\u3389\u339d\u33a0\u33a4\u33c4-\u33c7\uff23\uff43]/g,
        D: /[Dd\u010e\u010f\u01c4-\u01c6\u01f1-\u01f3\u1d30\u1d48\u1e0a-\u1e13\u2145\u2146\u216e\u217e\u249f\u24b9\u24d3\u32cf\u3372\u3377-\u3379\u3397\u33ad-\u33af\u33c5\u33c8\uff24\uff44]/g,
        E: /[Ee\xc8-\xcb\xe8-\xeb\u0112-\u011b\u0204-\u0207\u0228\u0229\u1d31\u1d49\u1e18-\u1e1b\u1eb8-\u1ebd\u2091\u2121\u212f\u2130\u2147\u24a0\u24ba\u24d4\u3250\u32cd\u32ce\uff25\uff45]/g,
        F: /[Ff\u1da0\u1e1e\u1e1f\u2109\u2131\u213b\u24a1\u24bb\u24d5\u338a-\u338c\u3399\ufb00-\ufb04\uff26\uff46]/g,
        G: /[Gg\u011c-\u0123\u01e6\u01e7\u01f4\u01f5\u1d33\u1d4d\u1e20\u1e21\u210a\u24a2\u24bc\u24d6\u32cc\u32cd\u3387\u338d-\u338f\u3393\u33ac\u33c6\u33c9\u33d2\u33ff\uff27\uff47]/g,
        H: /[Hh\u0124\u0125\u021e\u021f\u02b0\u1d34\u1e22-\u1e2b\u1e96\u210b-\u210e\u24a3\u24bd\u24d7\u32cc\u3371\u3390-\u3394\u33ca\u33cb\u33d7\uff28\uff48]/g,
        I: /[Ii\xcc-\xcf\xec-\xef\u0128-\u0130\u0132\u0133\u01cf\u01d0\u0208-\u020b\u1d35\u1d62\u1e2c\u1e2d\u1ec8-\u1ecb\u2071\u2110\u2111\u2139\u2148\u2160-\u2163\u2165-\u2168\u216a\u216b\u2170-\u2173\u2175-\u2178\u217a\u217b\u24a4\u24be\u24d8\u337a\u33cc\u33d5\ufb01\ufb03\uff29\uff49]/g,
        J: /[Jj\u0132-\u0135\u01c7-\u01cc\u01f0\u02b2\u1d36\u2149\u24a5\u24bf\u24d9\u2c7c\uff2a\uff4a]/g,
        K: /[Kk\u0136\u0137\u01e8\u01e9\u1d37\u1d4f\u1e30-\u1e35\u212a\u24a6\u24c0\u24da\u3384\u3385\u3389\u338f\u3391\u3398\u339e\u33a2\u33a6\u33aa\u33b8\u33be\u33c0\u33c6\u33cd-\u33cf\uff2b\uff4b]/g,
        L: /[Ll\u0139-\u0140\u01c7-\u01c9\u02e1\u1d38\u1e36\u1e37\u1e3a-\u1e3d\u2112\u2113\u2121\u216c\u217c\u24a7\u24c1\u24db\u32cf\u3388\u3389\u33d0-\u33d3\u33d5\u33d6\u33ff\ufb02\ufb04\uff2c\uff4c]/g,
        M: /[Mm\u1d39\u1d50\u1e3e-\u1e43\u2120\u2122\u2133\u216f\u217f\u24a8\u24c2\u24dc\u3377-\u3379\u3383\u3386\u338e\u3392\u3396\u3399-\u33a8\u33ab\u33b3\u33b7\u33b9\u33bd\u33bf\u33c1\u33c2\u33ce\u33d0\u33d4-\u33d6\u33d8\u33d9\u33de\u33df\uff2d\uff4d]/g,
        N: /[Nn\xd1\xf1\u0143-\u0149\u01ca-\u01cc\u01f8\u01f9\u1d3a\u1e44-\u1e4b\u207f\u2115\u2116\u24a9\u24c3\u24dd\u3381\u338b\u339a\u33b1\u33b5\u33bb\u33cc\u33d1\uff2e\uff4e]/g,
        O: /[Oo\xba\xd2-\xd6\xf2-\xf6\u014c-\u0151\u01a0\u01a1\u01d1\u01d2\u01ea\u01eb\u020c-\u020f\u022e\u022f\u1d3c\u1d52\u1ecc-\u1ecf\u2092\u2105\u2116\u2134\u24aa\u24c4\u24de\u3375\u33c7\u33d2\u33d6\uff2f\uff4f]/g,
        P: /[Pp\u1d3e\u1d56\u1e54-\u1e57\u2119\u24ab\u24c5\u24df\u3250\u3371\u3376\u3380\u338a\u33a9-\u33ac\u33b0\u33b4\u33ba\u33cb\u33d7-\u33da\uff30\uff50]/g,
        Q: /[Qq\u211a\u24ac\u24c6\u24e0\u33c3\uff31\uff51]/g,
        R: /[Rr\u0154-\u0159\u0210-\u0213\u02b3\u1d3f\u1d63\u1e58-\u1e5b\u1e5e\u1e5f\u20a8\u211b-\u211d\u24ad\u24c7\u24e1\u32cd\u3374\u33ad-\u33af\u33da\u33db\uff32\uff52]/g,
        S: /[Ss\u015a-\u0161\u017f\u0218\u0219\u02e2\u1e60-\u1e63\u20a8\u2101\u2120\u24ae\u24c8\u24e2\u33a7\u33a8\u33ae-\u33b3\u33db\u33dc\ufb06\uff33\uff53]/g,
        T: /[Tt\u0162-\u0165\u021a\u021b\u1d40\u1d57\u1e6a-\u1e71\u1e97\u2121\u2122\u24af\u24c9\u24e3\u3250\u32cf\u3394\u33cf\ufb05\ufb06\uff34\uff54]/g,
        U: /[Uu\xd9-\xdc\xf9-\xfc\u0168-\u0173\u01af\u01b0\u01d3\u01d4\u0214-\u0217\u1d41\u1d58\u1d64\u1e72-\u1e77\u1ee4-\u1ee7\u2106\u24b0\u24ca\u24e4\u3373\u337a\uff35\uff55]/g,
        V: /[Vv\u1d5b\u1d65\u1e7c-\u1e7f\u2163-\u2167\u2173-\u2177\u24b1\u24cb\u24e5\u2c7d\u32ce\u3375\u33b4-\u33b9\u33dc\u33de\uff36\uff56]/g,
        W: /[Ww\u0174\u0175\u02b7\u1d42\u1e80-\u1e89\u1e98\u24b2\u24cc\u24e6\u33ba-\u33bf\u33dd\uff37\uff57]/g,
        X: /[Xx\u02e3\u1e8a-\u1e8d\u2093\u213b\u2168-\u216b\u2178-\u217b\u24b3\u24cd\u24e7\u33d3\uff38\uff58]/g,
        Y: /[Yy\xdd\xfd\xff\u0176-\u0178\u0232\u0233\u02b8\u1e8e\u1e8f\u1e99\u1ef2-\u1ef9\u24b4\u24ce\u24e8\u33c9\uff39\uff59]/g,
        Z: /[Zz\u0179-\u017e\u01f1-\u01f3\u1dbb\u1e90-\u1e95\u2124\u2128\u24b5\u24cf\u24e9\u3390-\u3394\uff3a\uff5a]/g
    };
    return StringUtils;
}());
exports.StringUtils = StringUtils;
 
 
/***/ }),
/* 35 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Utils_1 = __webpack_require__(5);
var _ = __webpack_require__(1);
var KEYBOARD;
(function (KEYBOARD) {
    KEYBOARD[KEYBOARD["BACKSPACE"] = 8] = "BACKSPACE";
    KEYBOARD[KEYBOARD["TAB"] = 9] = "TAB";
    KEYBOARD[KEYBOARD["ENTER"] = 13] = "ENTER";
    KEYBOARD[KEYBOARD["SHIFT"] = 16] = "SHIFT";
    KEYBOARD[KEYBOARD["CTRL"] = 17] = "CTRL";
    KEYBOARD[KEYBOARD["ALT"] = 18] = "ALT";
    KEYBOARD[KEYBOARD["ESCAPE"] = 27] = "ESCAPE";
    KEYBOARD[KEYBOARD["SPACEBAR"] = 32] = "SPACEBAR";
    KEYBOARD[KEYBOARD["PAGE_UP"] = 33] = "PAGE_UP";
    KEYBOARD[KEYBOARD["PAGE_DOWN"] = 34] = "PAGE_DOWN";
    KEYBOARD[KEYBOARD["END"] = 35] = "END";
    KEYBOARD[KEYBOARD["HOME"] = 36] = "HOME";
    KEYBOARD[KEYBOARD["LEFT_ARROW"] = 37] = "LEFT_ARROW";
    KEYBOARD[KEYBOARD["UP_ARROW"] = 38] = "UP_ARROW";
    KEYBOARD[KEYBOARD["RIGHT_ARROW"] = 39] = "RIGHT_ARROW";
    KEYBOARD[KEYBOARD["DOWN_ARROW"] = 40] = "DOWN_ARROW";
    KEYBOARD[KEYBOARD["INSERT"] = 45] = "INSERT";
    KEYBOARD[KEYBOARD["DELETE"] = 46] = "DELETE";
})(KEYBOARD = exports.KEYBOARD || (exports.KEYBOARD = {}));
var KeyboardUtils = /** @class */ (function () {
    function KeyboardUtils() {
    }
    KeyboardUtils.keysEqual = function (key, code) {
        Eif (!Utils_1.Utils.isNullOrUndefined(key.keyCode)) {
            return key.keyCode == code;
        }
        else if (!Utils_1.Utils.isNullOrUndefined(key.which)) {
            return key.which == code;
        }
        return false;
    };
    KeyboardUtils.isAllowedKeyForOmnibox = function (e) {
        var keycode = e.keyCode;
        var valid = KeyboardUtils.isNumberKeyPushed(keycode) ||
            keycode == 32 ||
            keycode == 13 || // spacebar & return key(s)
            KeyboardUtils.isLetterKeyPushed(keycode) ||
            (keycode > 95 && keycode < 112) || // numpad keys
            (keycode > 185 && keycode < 193) || // ;=,-./` (in order)
            (keycode > 218 && keycode < 223) || // [\]' (in order)
            keycode == KEYBOARD.BACKSPACE ||
            keycode == KEYBOARD.DELETE ||
            KeyboardUtils.isArrowKeyPushed(keycode);
        return valid;
    };
    KeyboardUtils.isAllowedKeyForSearchAsYouType = function (e) {
        return KeyboardUtils.isAllowedKeyForOmnibox(e) && !KeyboardUtils.isArrowKeyPushed(e.keyCode);
    };
    KeyboardUtils.isDeleteOrBackspace = function (e) {
        return KeyboardUtils.keysEqual(e, KEYBOARD.BACKSPACE) || KeyboardUtils.keysEqual(e, KEYBOARD.DELETE);
    };
    KeyboardUtils.isArrowKeyPushed = function (keycode) {
        return (keycode == KEYBOARD.LEFT_ARROW || keycode == KEYBOARD.UP_ARROW || keycode == KEYBOARD.RIGHT_ARROW || keycode == KEYBOARD.DOWN_ARROW);
    };
    KeyboardUtils.isNumberKeyPushed = function (keycode) {
        return keycode > 47 && keycode < 58;
    };
    KeyboardUtils.isLetterKeyPushed = function (keycode) {
        return keycode > 64 && keycode < 91;
    };
    // Return a keyboard event listener that only executes the function if certain keys are pressed.
    KeyboardUtils.keypressAction = function (keyCode, action) {
        return function (e) {
            var data = [];
            for (var _i = 1; _i < arguments.length; _i++) {
                data[_i - 1] = arguments[_i];
            }
            Eif (e) {
                var eventCode = e.charCode || e.keyCode;
                Eif (eventCode) {
                    Iif (_.isArray(keyCode) && _.contains(keyCode, eventCode)) {
                        action(e);
                    }
                    else if (eventCode === keyCode) {
                        action(e);
                    }
                }
            }
        };
    };
    return KeyboardUtils;
}());
exports.KeyboardUtils = KeyboardUtils;
 
 
/***/ }),
/* 36 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
/**
 * The allowed states of a facet value in a Search API facet
 * [request]{@link IFacetRequestValue.state} or
 * [response]{@link IFacetResponseValue.state}.
 */
var FacetValueState;
(function (FacetValueState) {
    /**
     * The facet value is not currently selected or excluded in the search
     * interface.
     */
    FacetValueState["idle"] = "idle";
    /**
     * The facet value is currently selected in the search interface.
     */
    FacetValueState["selected"] = "selected";
})(FacetValueState = exports.FacetValueState || (exports.FacetValueState = {}));
 
 
/***/ }),
/* 37 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Assert_1 = __webpack_require__(12);
var Utils_1 = __webpack_require__(5);
var _ = __webpack_require__(1);
var QueryUtils = /** @class */ (function () {
    function QueryUtils() {
    }
    QueryUtils.createGuid = function () {
        var guid;
        var success = false;
        Eif (typeof crypto != 'undefined' && typeof crypto.getRandomValues != 'undefined') {
            try {
                guid = QueryUtils.generateWithCrypto();
                success = true;
            }
            catch (e) {
                success = false;
            }
        }
        Iif (!success) {
            guid = QueryUtils.generateWithRandom();
        }
        return guid;
    };
    // This method is a fallback as it's generate a lot of collisions in Chrome.
    QueryUtils.generateWithRandom = function () {
        // http://stackoverflow.com/a/2117523
        return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
            var r = (Math.random() * 16) | 0, v = c == 'x' ? r : (r & 0x3) | 0x8;
            return v.toString(16);
        });
    };
    QueryUtils.generateWithCrypto = function () {
        var buf = new Uint16Array(8);
        crypto.getRandomValues(buf);
        var S4 = function (num) {
            var ret = num.toString(16);
            while (ret.length < 4) {
                ret = '0' + ret;
            }
            return ret;
        };
        var prefix = function (str, version) {
            return version + str.slice(1);
        };
        return (S4(buf[0]) +
            S4(buf[1]) +
            '-' +
            S4(buf[2]) +
            '-' +
            prefix(S4(buf[3]), 4) +
            '-' +
            S4(buf[4]) +
            '-' +
            S4(buf[5]) +
            S4(buf[6]) +
            S4(buf[7]));
    };
    QueryUtils.setStateObjectOnQueryResults = function (state, results) {
        QueryUtils.setPropertyOnResults(results, 'state', state);
    };
    QueryUtils.setStateObjectOnQueryResult = function (state, result) {
        QueryUtils.setPropertyOnResult(result, 'state', state);
    };
    QueryUtils.setSearchInterfaceObjectOnQueryResult = function (searchInterface, result) {
        QueryUtils.setPropertyOnResult(result, 'searchInterface', searchInterface);
    };
    QueryUtils.setIndexAndUidOnQueryResults = function (query, results, queryUid, pipeline, splitTestRun) {
        Assert_1.Assert.exists(query);
        Assert_1.Assert.exists(results);
        var index = query.firstResult;
        QueryUtils.setPropertyOnResults(results, 'queryUid', queryUid);
        QueryUtils.setPropertyOnResults(results, 'pipeline', pipeline);
        QueryUtils.setPropertyOnResults(results, 'splitTestRun', splitTestRun);
        QueryUtils.setPropertyOnResults(results, 'index', index, function () { return ++index; });
    };
    QueryUtils.setTermsToHighlightOnQueryResults = function (query, results) {
        QueryUtils.setPropertyOnResults(results, 'termsToHighlight', results.termsToHighlight);
        QueryUtils.setPropertyOnResults(results, 'phrasesToHighlight', results.phrasesToHighlight);
    };
    QueryUtils.splitFlags = function (flags, delimiter) {
        Eif (delimiter === void 0) { delimiter = ';'; }
        Assert_1.Assert.exists(flags);
        return flags.split(delimiter);
    };
    QueryUtils.isAttachment = function (result) {
        return _.contains(QueryUtils.splitFlags(result.flags), 'IsAttachment');
    };
    QueryUtils.containsAttachment = function (result) {
        return _.contains(QueryUtils.splitFlags(result.flags), 'ContainsAttachment');
    };
    QueryUtils.hasHTMLVersion = function (result) {
        return _.contains(QueryUtils.splitFlags(result.flags), 'HasHtmlVersion');
    };
    QueryUtils.hasThumbnail = function (result) {
        return _.contains(QueryUtils.splitFlags(result.flags), 'HasThumbnail');
    };
    QueryUtils.hasExcerpt = function (result) {
        return result.excerpt != undefined && result.excerpt != '';
    };
    QueryUtils.getAuthor = function (result) {
        return result.raw['author'];
    };
    QueryUtils.getUriHash = function (result) {
        return result.raw['urihash'];
    };
    QueryUtils.getObjectType = function (result) {
        return result.raw['objecttype'];
    };
    QueryUtils.getCollection = function (result) {
        return result.raw['collection'] || 'default';
    };
    QueryUtils.getSource = function (result) {
        return result.raw['source'];
    };
    QueryUtils.getLanguage = function (result) {
        return result.raw['language'];
    };
    QueryUtils.getPermanentId = function (result) {
        var fieldValue;
        var fieldUsed;
        var permanentId = Utils_1.Utils.getFieldValue(result, 'permanentid');
        if (permanentId) {
            fieldUsed = 'permanentid';
            fieldValue = permanentId;
        }
        else {
            fieldUsed = 'urihash';
            fieldValue = Utils_1.Utils.getFieldValue(result, 'urihash');
        }
        return {
            fieldValue: fieldValue,
            fieldUsed: fieldUsed
        };
    };
    QueryUtils.quoteAndEscapeIfNeeded = function (str, forceEscape) {
        Iif (forceEscape === void 0) { forceEscape = false; }
        Assert_1.Assert.isString(str);
        return !forceEscape &&
            (QueryUtils.isAtomicString(str) || QueryUtils.isRangeString(str) || QueryUtils.isRangeWithoutOuterBoundsString(str))
            ? str
            : QueryUtils.quoteAndEscape(str);
    };
    QueryUtils.quoteAndEscape = function (str) {
        Assert_1.Assert.isString(str);
        return "\"" + QueryUtils.escapeString(str) + "\"";
    };
    QueryUtils.escapeString = function (str) {
        Assert_1.Assert.isString(str);
        return str.replace(/"/g, ' ');
    };
    QueryUtils.isAtomicString = function (str) {
        Assert_1.Assert.isString(str);
        return /^\d+(\.\d+)?$|^[\d\w]+$/.test(str);
    };
    QueryUtils.isRangeString = function (str) {
        Assert_1.Assert.isString(str);
        return /^\d+(\.\d+)?\.\.\d+(\.\d+)?$|^\d{4}\/\d{2}\/\d{2}@\d{2}:\d{2}:\d{2}\.\.\d{4}\/\d{2}\/\d{2}@\d{2}:\d{2}:\d{2}$/.test(str);
    };
    QueryUtils.isRangeWithoutOuterBoundsString = function (str) {
        Assert_1.Assert.isString(str);
        return /^\d+(\.\d+)?$|^\d{4}\/\d{2}\/\d{2}@\d{2}:\d{2}:\d{2}$/.test(str);
    };
    QueryUtils.buildFieldExpression = function (field, operator, values, forceEscape) {
        Iif (forceEscape === void 0) { forceEscape = false; }
        Assert_1.Assert.isNonEmptyString(field);
        Assert_1.Assert.stringStartsWith(field, '@');
        Assert_1.Assert.isNonEmptyString(operator);
        Assert_1.Assert.isLargerOrEqualsThan(1, values.length);
        if (values.length == 1) {
            return field + operator + QueryUtils.quoteAndEscapeIfNeeded(values[0], forceEscape);
        }
        else {
            return field + operator + '(' + _.map(values, function (str) { return QueryUtils.quoteAndEscapeIfNeeded(str, forceEscape); }).join(',') + ')';
        }
    };
    QueryUtils.buildFieldNotEqualExpression = function (field, values, forceEscape) {
        Iif (forceEscape === void 0) { forceEscape = false; }
        Assert_1.Assert.isNonEmptyString(field);
        Assert_1.Assert.stringStartsWith(field, '@');
        Assert_1.Assert.isLargerOrEqualsThan(1, values.length);
        var filter;
        if (values.length == 1) {
            filter = field + '==' + QueryUtils.quoteAndEscapeIfNeeded(values[0], forceEscape);
        }
        else {
            filter = field + '==' + '(' + _.map(values, function (str) { return QueryUtils.quoteAndEscapeIfNeeded(str, forceEscape); }).join(',') + ')';
        }
        return '(NOT ' + filter + ')';
    };
    QueryUtils.setPropertyOnResults = function (results, property, value, afterOneLoop) {
        _.each(results.results, function (result) {
            QueryUtils.setPropertyOnResult(result, property, value);
            value = afterOneLoop ? afterOneLoop() : value;
        });
    };
    QueryUtils.setPropertyOnResult = function (result, property, value) {
        result[property] = value;
        _.each(result.childResults, function (child) {
            child[property] = value;
        });
        Iif (!Utils_1.Utils.isNullOrUndefined(result.parentResult)) {
            result.parentResult[property] = value;
        }
    };
    QueryUtils.isStratusAgnosticField = function (fieldToVerify, fieldToMatch) {
        var checkForSystem = /^(@?)(sys)?(.*)/i;
        var matchFieldToVerify = checkForSystem.exec(fieldToVerify);
        var matchFieldToMatch = checkForSystem.exec(fieldToMatch);
        Eif (matchFieldToVerify && matchFieldToMatch) {
            return (matchFieldToVerify[1] + matchFieldToVerify[3]).toLowerCase() == (matchFieldToMatch[1] + matchFieldToMatch[3]).toLowerCase();
        }
        return false;
    };
    return QueryUtils;
}());
exports.QueryUtils = QueryUtils;
 
 
/***/ }),
/* 38 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __assign = (this && this.__assign) || Object.assign || function(t) {
    for (var s, i = 1, n = arguments.length; i < n; i++) {
        s = arguments[i];
        for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
            t[p] = s[p];
    }
    return t;
};
Object.defineProperty(exports, "__esModule", { value: true });
var Initialization_1 = __webpack_require__(8);
var Assert_1 = __webpack_require__(12);
var QueryController_1 = __webpack_require__(78);
var QueryStateModel_1 = __webpack_require__(17);
var InitializationEvents_1 = __webpack_require__(22);
var Dom_1 = __webpack_require__(0);
var Component_1 = __webpack_require__(6);
var SearchInterface_1 = __webpack_require__(25);
var _ = __webpack_require__(1);
var PublicPathUtils_1 = __webpack_require__(647);
var Logger_1 = __webpack_require__(18);
var Analytics_1 = __webpack_require__(178);
var AnalyticsUtils_1 = __webpack_require__(321);
var registeredNamedMethodsLogger = new Logger_1.Logger('RegisteredNamedMethods');
/**
 * Initialize the framework with a basic search interface. Calls {@link Initialization.initSearchInterface}.
 *
 * If using the jQuery extension, this is called using <code>$('#root').coveo('init');</code>.
 * @param element The root of the interface to initialize.
 * @param options JSON options for the framework (e.g.: <code>{Searchbox : {enableSearchAsYouType : true}}</code>).
 * @returns {Promise<{elem: HTMLElement}>}
 */
function init(element, options) {
    Iif (options === void 0) { options = {}; }
    return Initialization_1.Initialization.initializeFramework(element, options, function () {
        return Initialization_1.Initialization.initSearchInterface(element, options);
    });
}
exports.init = init;
Initialization_1.Initialization.registerNamedMethod('init', function (element, options) {
    if (options === void 0) { options = {}; }
    return init(element, options);
});
/**
 * Initialize the framework with a standalone search box. Calls {@link Initialize.initStandaloneSearchInterface}.
 *
 * If using the jQuery extension, this is called using <code>$('#root').coveo('initSearchbox');</code>.
 * @param element The root of the interface to initialize.
 * @param searchPageUri The search page on which to redirect when there is a query.
 * @param options JSON options for the framework (e.g.: <code>{Searchbox : {enableSearchAsYouType : true}}</code>).
 * @returns {Promise<{elem: HTMLElement}>}
 */
function initSearchbox(element, searchPageUri, options) {
    Iif (options === void 0) { options = {}; }
    Assert_1.Assert.isNonEmptyString(searchPageUri);
    var searchInterfaceOptions = {};
    searchInterfaceOptions.searchPageUri = searchPageUri;
    searchInterfaceOptions.autoTriggerQuery = false;
    searchInterfaceOptions.enableHistory = false;
    searchInterfaceOptions = __assign({}, searchInterfaceOptions, options.StandaloneSearchInterface);
    options = _.extend({}, options, { StandaloneSearchInterface: searchInterfaceOptions });
    return Initialization_1.Initialization.initializeFramework(element, options, function () {
        return Initialization_1.Initialization.initStandaloneSearchInterface(element, options);
    });
}
exports.initSearchbox = initSearchbox;
Initialization_1.Initialization.registerNamedMethod('initSearchbox', function (element, searchPageUri, options) {
    if (options === void 0) { options = {}; }
    initSearchbox(element, searchPageUri, options);
});
/**
 * Initialize the framework with a recommendation interface. Calls {@link Initialization.initRecommendationInterface}.
 *
 * If using the jQuery extension, this is called using <code>$('#root').coveo('initRecommendation');</code>.
 * @param element The root of the interface to initialize.
 * @param mainSearchInterface The search interface to link with the recommendation interface (see {@link Recommendation}).
 * @param userContext The user context to pass with the query generated in the recommendation interface (see {@link Recommendation}).
 * @param options JSON options for the framework (e.g.: <code>{Searchbox : {enableSearchAsYouType: true}}</code>).
 * @returns {Promise<{elem: HTMLElement}>}
 */
function initRecommendation(element, mainSearchInterface, userContext, options) {
    Iif (options === void 0) { options = {}; }
    var recommendationOptions = {};
    recommendationOptions.mainSearchInterface = mainSearchInterface;
    recommendationOptions.userContext = userContext;
    recommendationOptions.enableHistory = false;
    options = _.extend({}, options, { Recommendation: recommendationOptions });
    // Recommendation component is special : It is not explicitely registered like other "basic" components since it's a full search interface.
    // Since it's not done using the "standard" path, we need to register this manually here
    // This ensure that we can always call `getLazyRegisteredComponent`, no matter if it was loaded from eager or lazy mode.
    Eif (window['Coveo']['Recommendation'] != null) {
        Initialization_1.LazyInitialization.registerLazyComponent('Recommendation', function () { return Promise.resolve(window['Coveo']['Recommendation']); });
        Initialization_1.EagerInitialization.eagerlyLoadedComponents['Recommendation'] = window['Coveo']['Recommendation'];
    }
    return Initialization_1.LazyInitialization.getLazyRegisteredComponent('Recommendation').then(function () {
        return Initialization_1.Initialization.initializeFramework(element, options, function () {
            return Initialization_1.Initialization.initRecommendationInterface(element, options);
        });
    });
}
exports.initRecommendation = initRecommendation;
Initialization_1.Initialization.registerNamedMethod('initRecommendation', function (element, mainSearchInterface, userContext, options) {
    if (userContext === void 0) { userContext = {}; }
    if (options === void 0) { options = {}; }
    initRecommendation(element, mainSearchInterface, userContext, options);
});
/**
 * Execute a standard query. Active component in the interface will react to events/ push data in the query / handle the query success or failure as needed.
 *
 * It triggers a standard query flow for which the standard component will perform their expected behavior.
 *
 * If you wish to only perform a query on the index to retrieve results (without the component reacting), look into {@link SearchInterface} instead.
 *
 * Calling this method is the same as calling {@link QueryController.executeQuery}.
 *
 * @param element The root of the interface to initialize.
 * @returns {Promise<IQueryResults>}
 */
function executeQuery(element) {
    Assert_1.Assert.exists(element);
    var queryController = Component_1.Component.resolveBinding(element, QueryController_1.QueryController);
    Assert_1.Assert.exists(queryController);
    return queryController.executeQuery();
}
exports.executeQuery = executeQuery;
Initialization_1.Initialization.registerNamedMethod('executeQuery', function (element) {
    return executeQuery(element);
});
/**
 * Performs read and write operations on the [`QueryStateModel`]{@link QueryStateModel} instance of the search
 * interface. See [State](https://docs.coveo.com/en/344/).
 *
 * Can perform the following actions:
 *
 * - Get the `QueryStateModel` instance:
 * ```javascript
 * Coveo.state(element);
 * ```
 *
 * - Get the value of a single state attribute from the `QueryStateModel` instance:
 * ```javascript
 * // You can replace `q` with any registered state attribute.
 * Coveo.state(element, "q");
 * ```
 *
 * - Set the value of a single state attribute in the `QueryStateModel` instance:
 * ```javascript
 * // You can replace `q` with any registered state attribute.
 * Coveo.state(element, "q", "my new value");
 * ```
 *
 * - Set multiple state attribute values in the `QueryStateModel` instance:
 * ```javascript
 * // You can replace `q` and `sort` with any registered state attributes.
 * Coveo.state(element, {
 *     "q" : "my new value",
 *     "sort" : "relevancy"
 * });
 * ```
 *
 * **Note:**
 * > When setting one or several state attribute values with this function, you can pass an additional argument to set
 * > the `silent` attribute to `true` in order to prevent the state change from triggering state change events.
 * >
 * > **Example:**
 * > ```javascript
 * > Coveo.state(element, "q", "my new value", { "silent" : true });
 * > ```
 *
 * @param element The root of the interface whose `QueryStateModel` instance the function should interact with.
 * @param args The arguments that determine the action to perform on the `QueryStateModel` instance.
 * @returns {any} Depends on the action performed.
 */
function state(element) {
    var args = [];
    for (var _i = 1; _i < arguments.length; _i++) {
        args[_i - 1] = arguments[_i];
    }
    Assert_1.Assert.exists(element);
    var model = Component_1.Component.resolveBinding(element, QueryStateModel_1.QueryStateModel);
    return QueryStateModel_1.setState(model, args);
}
exports.state = state;
Initialization_1.Initialization.registerNamedMethod('state', function (element) {
    var args = [];
    for (var _i = 1; _i < arguments.length; _i++) {
        args[_i - 1] = arguments[_i];
    }
    if (args.length != 0) {
        return state.apply(undefined, [element].concat(args));
    }
    else {
        return state.apply(undefined, [element]);
    }
});
/**
 * Get the component bound on the given `HTMLElement`.
 * @param element The `HTMLElement` for which to get the component instance.
 * @param componentClass If multiple components are bound to a single `HTMLElement`, you need to specify which components you wish to get.
 * @param noThrow By default, the GET method will throw if there is no component bound, or if there are multiple component and no `componentClass` is specified. This deletes the error if set to true.
 * @returns {Component}
 */
function get(element, componentClass, noThrow) {
    Assert_1.Assert.exists(element);
    return Component_1.Component.get(element, componentClass, noThrow);
}
exports.get = get;
Initialization_1.Initialization.registerNamedMethod('get', function (element, componentClass, noThrow) {
    return get(element, componentClass, noThrow);
});
function result(element, noThrow) {
    Assert_1.Assert.exists(element);
    return Component_1.Component.getResult(element, noThrow);
}
exports.result = result;
Initialization_1.Initialization.registerNamedMethod('result', function (element, noThrow) {
    return result(element, noThrow);
});
function getCoveoAnalyticsClient(element) {
    var analytics = getCoveoAnalytics(element);
    Eif (analytics) {
        return analytics.client;
    }
    else {
        return undefined;
    }
}
function getCoveoAnalytics(element) {
    var analyticsElement = element.classList.contains(Component_1.Component.computeCssClassNameForType('Analytics'))
        ? element
        : Dom_1.$$(element).find(Component_1.Component.computeSelectorForType("Analytics"));
    Eif (analyticsElement) {
        return Component_1.Component.resolveBinding(analyticsElement, Analytics_1.Analytics);
    }
    else {
        return undefined;
    }
}
/**
 * Finds the [`Analytics`]{@link Analytics} component instance, and uses it to log a `Custom` usage analytics event.
 *
 * You can use `Custom` events to create custom reports, or to track events which are neither queries nor item
 * views.
 *
 * @param element The root of the search interface which contains the [`Analytics`]{@link Analytics} component.
 * @param customEventCause The cause of the event.
 * @param metadata The metadata you want to use to create custom dimensions. Metadata can contain as many key-value
 * pairs as you need. Each key must contain only alphanumeric characters and underscores. The Coveo Usage Analytics
 * service automatically converts white spaces to underscores, and uppercase characters to lowercase characters in key
 * names. Each value must be a simple string. If you do not need to log metadata, you can simply pass an empty JSON
 * ( `{}` ).
 * @param result The query result that relates to the custom event, if applicable.
 */
function logCustomEvent(element, customEventCause, metadata, result) {
    var client = getCoveoAnalyticsClient(element);
    Eif (client) {
        client.logCustomEvent(customEventCause, metadata, element, result);
    }
}
exports.logCustomEvent = logCustomEvent;
Initialization_1.Initialization.registerNamedMethod('logCustomEvent', function (element, customEventCause, metadata, result) {
    logCustomEvent(element, customEventCause, metadata, result);
});
/**
 * Finds the [`Analytics`]{@link Analytics} component instance, and uses it to log a `Search` usage analytics event.
 *
 * A `Search` event is actually sent to the Coveo Usage Analytics service only after the query successfully returns (not
 * immediately after calling this method). Therefore, it is important to call this method **before** executing the
 * query. Otherwise, the `Search` event will not be logged, and you will get a warning message in the console. See
 * [Logging Your Own Search Events](https://docs.coveo.com/en/2726/#logging-your-own-search-events).
 *
 * @param element The root of the search interface which contains the [`Analytics`]{@link Analytics} component.
 * @param searchEventCause The cause of the event.
 * @param metadata The metadata you want to use to create custom dimensions. Metadata can contain as many key-value
 * pairs as you need. Each key must contain only alphanumeric characters and underscores. The Coveo Usage Analytics
 * service automatically converts white spaces to underscores, and uppercase characters to lowercase characters in key
 * names. Each value must be a simple string. If you do not need to log metadata, you can simply pass an empty JSON
 * ( `{}` ).
 */
function logSearchEvent(element, searchEventCause, metadata) {
    var client = getCoveoAnalyticsClient(element);
    Eif (client) {
        client.logSearchEvent(searchEventCause, metadata);
    }
}
exports.logSearchEvent = logSearchEvent;
Initialization_1.Initialization.registerNamedMethod('logSearchEvent', function (element, searchEventCause, metadata) {
    logSearchEvent(element, searchEventCause, metadata);
});
/**
 * Finds the [`Analytics`]{@link Analytics} component instance, and uses it to log a `SearchAsYouType` usage analytics
 * event.
 *
 * This function is very similar to the `logSearchEvent` function, except that `logSearchAsYouTypeEvent` should, by
 * definition, be called more frequently. Consequently, in order to avoid logging every single partial query, the
 * `PendingSearchAsYouTypeEvent` takes care of logging only the "relevant" last event: an event that occurs after 5
 * seconds have elapsed without any event being logged, or an event that occurs after another part of the interface
 * triggers a search event.
 *
 * It is important to call this method **before** executing the query. Otherwise, no `SearchAsYouType` event will be
 * logged, and you will get a warning message in the console. See
 * [Logging Your Own Search Events](https://docs.coveo.com/en/2726/#logging-your-own-search-events).
 *
 * @param element The root of the search interface which contains the [`Analytics`]{@link Analytics} component.
 * @param searchAsYouTypeEventCause The cause of the event.
 * @param metadata The metadata you want to use to create custom dimensions. Metadata can contain as many key-value
 * pairs as you need. Each key must contain only alphanumeric characters and underscores. The Coveo Usage Analytics
 * service automatically converts white spaces to underscores, and uppercase characters to lowercase characters in key
 * names. Each value must be a simple string. If you do not need to log metadata, you can simply pass an empty JSON
 * ( `{}` ).
 */
function logSearchAsYouTypeEvent(element, searchAsYouTypeEventCause, metadata) {
    var client = getCoveoAnalyticsClient(element);
    Eif (client) {
        client.logSearchAsYouType(searchAsYouTypeEventCause, metadata);
    }
}
exports.logSearchAsYouTypeEvent = logSearchAsYouTypeEvent;
Initialization_1.Initialization.registerNamedMethod('logSearchAsYouTypeEvent', function (element, searchAsYouTypeEventCause, metadata) {
    logSearchAsYouTypeEvent(element, searchAsYouTypeEventCause, metadata);
});
/**
 * Finds the [`Analytics`]{@link Analytics} component instance, and uses it to log a `Click` usage analytics event.
 *
 * A `Click` event corresponds to an item view (e.g., clicking on a {@link ResultLink} or opening a {@link Quickview}).
 *
 * `Click` events are immediately sent to the Coveo Usage Analytics service.
 *
 * @param element The root of the search interface which contains the [`Analytics`]{@link Analytics} component.
 * @param clickEventCause The cause of the event.
 * @param metadata The metadata you want to use to create custom dimensions. Metadata can contain as many key-value
 * pairs as you need. Each key must contain only alphanumeric characters and underscores. The Coveo Usage Analytics
 * service automatically converts white spaces to underscores, and uppercase characters to lowercase characters in key
 * names. Each value must be a simple string. If you do not need to log metadata, you can simply pass an empty JSON
 * ( `{}` ).
 * @param result The result that was clicked.
 */
function logClickEvent(element, clickEventCause, metadata, result) {
    var client = getCoveoAnalyticsClient(element);
    Eif (client) {
        client.logClickEvent(clickEventCause, metadata, result, element);
    }
}
exports.logClickEvent = logClickEvent;
Initialization_1.Initialization.registerNamedMethod('logClickEvent', function (element, clickEventCause, metadata, result) {
    logClickEvent(element, clickEventCause, metadata, result);
});
/**
 * Pass options to the framework, before it is initialized ({@link init}).<br/>
 * All the options passed with this calls will be merged together on initialization.
 * @param element The root of the interface for which you wish to set options.
 * @param optionsToSet JSON options for the framework (e.g.: <code>{Searchbox : {enableSearchAsYouType: true}}</code>).
 */
function options(element, optionsToSet) {
    Iif (optionsToSet === void 0) { optionsToSet = {}; }
    Initialization_1.Initialization.registerDefaultOptions(element, optionsToSet);
}
exports.options = options;
Initialization_1.Initialization.registerNamedMethod('options', function (element, optionsToSet) {
    if (optionsToSet === void 0) { optionsToSet = {}; }
    options(element, optionsToSet);
});
/**
 * Patch the given `methodName` on an instance of a component bound to an `HTMLElement` with a new handler.
 * @param element
 * @param methodName
 * @param handler
 */
function patch(element, methodName, handler) {
    Initialization_1.Initialization.monkeyPatchComponentMethod(methodName, element, handler);
}
exports.patch = patch;
Initialization_1.Initialization.registerNamedMethod('patch', function (element, methodName, handler) {
    patch(element, methodName, handler);
});
function initBox(element) {
    var args = [];
    for (var _i = 1; _i < arguments.length; _i++) {
        args[_i - 1] = arguments[_i];
    }
    var type, options = {}, injectMarkup;
    // This means : initBox, no type (no injection) and no options
    if (args.length == 0) {
        type = 'Standard';
        injectMarkup = false;
    }
    else if (args.length == 1) {
        // 1 arg, might be options or type
        // This mean a type (with injection) and no options
        if (typeof args[0] == 'string') {
            type = args[0];
            injectMarkup = true;
        }
        else if (typeof args[0] == 'object') {
            // This means no type(no injection) and with options
            type = 'Standard';
            injectMarkup = false;
            options = args[0];
        }
        else {
            Assert_1.Assert.fail('Invalid parameters to init a box');
        }
    }
    else if (args.length == 2) {
        // 2 args means both options and type (with injection);
        type = args[0];
        options = args[1];
        injectMarkup = true;
    }
    var merged = {};
    merged[type || 'Container'] = _.extend({}, options.SearchInterface, options[type]);
    options = _.extend({}, options, merged);
    Initialization_1.Initialization.initializeFramework(element, options, function () {
        return Initialization_1.Initialization.initBoxInterface(element, options, type, injectMarkup);
    });
}
exports.initBox = initBox;
Initialization_1.Initialization.registerNamedMethod('initBox', function (element) {
    var args = [];
    for (var _i = 1; _i < arguments.length; _i++) {
        args[_i - 1] = arguments[_i];
    }
    initBox(element, args);
});
function nuke(element) {
    Dom_1.$$(element).trigger(InitializationEvents_1.InitializationEvents.nuke);
}
exports.nuke = nuke;
Initialization_1.Initialization.registerNamedMethod('nuke', function (element) {
    nuke(element);
});
/**
 * Sets the path from where the chunks used for lazy loading will be loaded. In some cases, in IE11, we cannot automatically detect it, use this instead.
 * @param path This should be the path of the Coveo script. It should also have a trailing slash.
 */
function configureResourceRoot(path) {
    PublicPathUtils_1.PublicPathUtils.configureResourceRoot(path);
}
exports.configureResourceRoot = configureResourceRoot;
Initialization_1.Initialization.registerNamedMethod('configureResourceRoot', function (path) {
    configureResourceRoot(path);
});
/**
 * Re-enables an [`Analytics`]{@link Analytics} component if it was previously disabled.
 * @param searchRoot
 * The element to scan for an Analytics component.
 * This can be an element onto which a component instance is bound
 * (e.g., document.querySelector(".CoveoAnalytics"),
 * or an ancestor of such an element (e.g., document.getElementById("search").
 *
 * @availablesince [October 2019 Release (v2.7219)](https://docs.coveo.com/en/3084/)
 */
function enableAnalytics(searchRoot) {
    Iif (searchRoot === void 0) { searchRoot = document.querySelector(Component_1.Component.computeSelectorForType(SearchInterface_1.SearchInterface.ID)); }
    var analytics = getCoveoAnalytics(searchRoot);
    Iif (!analytics) {
        return registeredNamedMethodsLogger.warn('Could not enable analytics because no Analytics component could be found in the specified searchRoot.');
    }
    analytics.enable();
}
exports.enableAnalytics = enableAnalytics;
Initialization_1.Initialization.registerNamedMethod('enableAnalytics', function () {
    enableAnalytics();
});
/**
 * Removes all session information stored in the browser (e.g., analytics visitor cookies, action history, etc.)
 * @param searchRoot
 * The element to scan for an Analytics component.
 * This can be an element onto which a component instance is bound
 * (e.g., document.querySelector(".CoveoAnalytics"),
 * or an ancestor of such an element (e.g., document.getElementById("search").
 */
function clearLocalData(searchRoot) {
    Iif (searchRoot === void 0) { searchRoot = document.querySelector(Component_1.Component.computeSelectorForType(SearchInterface_1.SearchInterface.ID)); }
    var analytics = getCoveoAnalytics(searchRoot);
    Iif (!analytics) {
        return registeredNamedMethodsLogger.warn('Could not clear local data because no Analytics component could be found in the specified searchRoot.');
    }
    analytics.clearLocalData();
}
exports.clearLocalData = clearLocalData;
Initialization_1.Initialization.registerNamedMethod('clearLocalData', function () {
    clearLocalData();
});
/**
 * Disables an [`Analytics`]{@link Analytics} component and clears local data.
 * @param searchRoot
 * The element to scan for an Analytics component.
 * This can be an element onto which a component instance is bound
 * (e.g., document.querySelector(".CoveoAnalytics"),
 * or an ancestor of such an element (e.g., document.getElementById("search").
 *
 * @availablesince [October 2019 Release (v2.7219)](https://docs.coveo.com/en/3084/)
 */
function disableAnalytics(searchRoot) {
    Iif (searchRoot === void 0) { searchRoot = document.querySelector(Component_1.Component.computeSelectorForType(SearchInterface_1.SearchInterface.ID)); }
    var analytics = getCoveoAnalytics(searchRoot);
    Iif (!analytics) {
        return registeredNamedMethodsLogger.warn('Could not disable analytics because no Analytics component could be found in the specified searchRoot.');
    }
    analytics.disable();
}
exports.disableAnalytics = disableAnalytics;
Initialization_1.Initialization.registerNamedMethod('disableAnalytics', function () {
    disableAnalytics();
});
/**
 * Adds a new analytics action cause to the ActionCauseList.
 * Adding a new actionCause allows to specify a custom user-action when triggering a search event.
 * @param newActionCause
 * (e.g.,
 * {
 *  Name: "newActionCause",
 *  Type: "exampleType"
 * },
 */
function addActionCauseToList(newActionCause) {
    AnalyticsUtils_1.AnalyticsUtils.addActionCauseToList(newActionCause);
}
exports.addActionCauseToList = addActionCauseToList;
Initialization_1.Initialization.registerNamedMethod('addActionCauseToList', function (newActionCause) {
    addActionCauseToList(newActionCause);
});
/**
 * Removes an actionCause from the ActionCauseList.
 * @param actionCauseToRemoveName
 */
function removeActionCauseFromList(actionCauseToRemoveName) {
    AnalyticsUtils_1.AnalyticsUtils.removeActionCauseFromList(actionCauseToRemoveName);
}
exports.removeActionCauseFromList = removeActionCauseFromList;
Initialization_1.Initialization.registerNamedMethod('removeActionCauseFromList', function (actionCauseToRemoveName) {
    removeActionCauseFromList(actionCauseToRemoveName);
});
/**
 * Asynchronously loads a module, or chunk.
 *
 * This is especially useful when you want to extend a base component, and make sure the lazy component loading process
 * recognizes it (see [Lazy Versus Eager Component Loading](https://docs.coveo.com/en/295/)).
 *
 * **Example:**
 *
 * ```typescript
 * export function lazyCustomFacet() {
 *   return Coveo.load<Facet>('Facet').then((Facet) => {
 *     class CustomFacet extends Facet {
 *       [ ... ]
 *     };
 *     Coveo.Initialization.registerAutoCreateComponent(CustomFacet);
 *     return CustomFacet;
 *   });
 * };
 *
 * Coveo.LazyInitialization.registerLazyComponent('CustomFacet', lazyCustomFacet);
 * ```
 *
 * You can also use this function to assert a component is fully loaded in your page before executing any code relating
 * to it.
 *
 * **Example:**
 *
 * > You could do `Coveo.load('Searchbox').then((Searchbox) => {})` to load the [`Searchbox`]{@link Searchbox}
 * > component, if it is not already loaded in your search page.
 *
 * @param id The identifier of the module you wish to load. In the case of components, this identifier is the component
 * name (e.g., `Facet`, `Searchbox`).
 * @returns {Promise} A Promise of the module, or chunk.
 */
function load(id) {
    if (Initialization_1.LazyInitialization.lazyLoadedComponents[id] != null) {
        return Initialization_1.LazyInitialization.getLazyRegisteredComponent(id);
    }
    else if (Initialization_1.LazyInitialization.lazyLoadedModule[id] != null) {
        return Initialization_1.LazyInitialization.getLazyRegisteredModule(id);
    }
    else {
        return Promise.reject("Module " + id + " is not available");
    }
}
exports.load = load;
Initialization_1.Initialization.registerNamedMethod('require', function (modules) {
    return load(modules);
});
 
 
/***/ }),
/* 39 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
exports.ModalBox = __webpack_require__(961);
exports.LocaleString = __webpack_require__(962);
 
 
/***/ }),
/* 40 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
function __export(m) {
    for (var p in m) Eif (!exports.hasOwnProperty(p)) exports[p] = m[p];
}
Object.defineProperty(exports, "__esModule", { value: true });
__export(__webpack_require__(869));
// Get a cleaner output in phantom js for CI builds
var Logger_1 = __webpack_require__(18);
var Simulate_1 = __webpack_require__(15);
Eif (Simulate_1.Simulate.isChromeHeadless()) {
    Logger_1.Logger.disable();
}
var MockCookie_1 = __webpack_require__(1554);
MockCookie_1.MockCookie.mockBrowserCookies();
var DefaultLanguage_1 = __webpack_require__(294);
DefaultLanguage_1.defaultLanguage();
var SearchEndpointTest_1 = __webpack_require__(1555);
SearchEndpointTest_1.SearchEndpointTest();
var BackOffRequestTest_1 = __webpack_require__(1556);
BackOffRequestTest_1.BackOffRequestTest();
var FacetSortCriteriaTest_1 = __webpack_require__(1557);
FacetSortCriteriaTest_1.FacetSortCriteriaTest();
var FacetRangeSortOrderTest_1 = __webpack_require__(1558);
FacetRangeSortOrderTest_1.FacetRangeSortOrderTest();
var PlanTest_1 = __webpack_require__(1559);
PlanTest_1.PlanTest();
var CookieUtilsTest_1 = __webpack_require__(1560);
CookieUtilsTest_1.CookieUtilsTest();
var ColorUtilsTest_1 = __webpack_require__(1561);
ColorUtilsTest_1.ColorUtilsTest();
var AnalyticsUtilsTest_1 = __webpack_require__(1562);
AnalyticsUtilsTest_1.AnalyticsUtilsTest();
var DomTest_1 = __webpack_require__(1563);
DomTest_1.DomTests();
var HighlightUtilsTest_1 = __webpack_require__(1564);
HighlightUtilsTest_1.HighlightUtilsTest();
var L10NTest_1 = __webpack_require__(1565);
L10NTest_1.L10NTest();
var PromisesShimTest_1 = __webpack_require__(1566);
PromisesShimTest_1.PromisesShimTest();
var EnvironmentTest_1 = __webpack_require__(1567);
EnvironmentTest_1.EnvironmentTest();
var ModelTest_1 = __webpack_require__(1568);
ModelTest_1.ModelTest();
var QueryStateModelTest_1 = __webpack_require__(1569);
QueryStateModelTest_1.QueryStateModelTest();
var EndpointCallerTest_1 = __webpack_require__(1570);
EndpointCallerTest_1.EndpointCallerTest();
var AnalyticsEndpointCallerTest_1 = __webpack_require__(1571);
AnalyticsEndpointCallerTest_1.AnalyticsEndpointCallerTest();
var FacetQueryControllerTest_1 = __webpack_require__(1572);
FacetQueryControllerTest_1.FacetQueryControllerTest();
var HistoryControllerTest_1 = __webpack_require__(1573);
HistoryControllerTest_1.HistoryControllerTest();
var LocalStorageHistoryControllerTest_1 = __webpack_require__(1574);
+LocalStorageHistoryControllerTest_1.LocalStorageHistoryControllerTest();
var QueryControllerTest_1 = __webpack_require__(1575);
QueryControllerTest_1.QueryControllerTest();
var AdvancedSearchTest_1 = __webpack_require__(1576);
AdvancedSearchTest_1.AdvancedSearchTest();
var TextInputTest_1 = __webpack_require__(1577);
TextInputTest_1.TextInputTest();
var NumericSpinnerTest_1 = __webpack_require__(1578);
NumericSpinnerTest_1.NumericSpinnerTest();
var DropdownTest_1 = __webpack_require__(1579);
DropdownTest_1.DropdownTest();
var DatePickerTest_1 = __webpack_require__(1580);
DatePickerTest_1.DatePickerTest();
var RadioButtonTest_1 = __webpack_require__(1581);
RadioButtonTest_1.RadioButtonTest();
var KeywordsInputTest_1 = __webpack_require__(1582);
KeywordsInputTest_1.KeywordsInputTest();
var AnyKeywordsInputTest_1 = __webpack_require__(1583);
AnyKeywordsInputTest_1.AnyKeywordsInputTest();
var ExactKeywordsInputTest_1 = __webpack_require__(1584);
ExactKeywordsInputTest_1.ExactKeywordsInputTest();
var NoneKeywordsInputTest_1 = __webpack_require__(1585);
NoneKeywordsInputTest_1.NoneKeywordsInputTest();
var BetweenDateInputTest_1 = __webpack_require__(1586);
BetweenDateInputTest_1.BetweenDateInputTest();
var InTheLastDateInputTest_1 = __webpack_require__(1587);
InTheLastDateInputTest_1.InTheLastDateInputTest();
var DocumentInputTest_1 = __webpack_require__(1588);
DocumentInputTest_1.DocumentInputTest();
var SimpleFieldInputTest_1 = __webpack_require__(1589);
SimpleFieldInputTest_1.SimpleFieldInputTest();
var AdvancedFieldInputTest_1 = __webpack_require__(1590);
AdvancedFieldInputTest_1.AdvancedFieldInputTest();
var SizeInputTest_1 = __webpack_require__(1591);
SizeInputTest_1.SizeInputTest();
var AggregateTest_1 = __webpack_require__(1592);
AggregateTest_1.AggregateTest();
var AnalyticsEndpointTest_1 = __webpack_require__(1593);
AnalyticsEndpointTest_1.AnalyticsEndpointTest();
var AnalyticsSuggestionsTest_1 = __webpack_require__(1594);
AnalyticsSuggestionsTest_1.AnalyticsSuggestionsTest();
var AnalyticsTest_1 = __webpack_require__(1595);
AnalyticsTest_1.AnalyticsTest();
var AuthenticationProviderTest_1 = __webpack_require__(1596);
AuthenticationProviderTest_1.AuthenticationProviderTest();
var BadgeTest_1 = __webpack_require__(1597);
BadgeTest_1.BadgeTest();
var BreadcrumbTest_1 = __webpack_require__(1598);
BreadcrumbTest_1.BreadcrumbTest();
var ChatterLikedByTest_1 = __webpack_require__(1599);
ChatterLikedByTest_1.ChatterLikedByTest();
var ChatterPostAttachmentTest_1 = __webpack_require__(1600);
ChatterPostAttachmentTest_1.ChatterPostAttachmentTest();
var ChatterPostedByTest_1 = __webpack_require__(1601);
ChatterPostedByTest_1.ChatterPostedByTest();
var ComponentEventsTest_1 = __webpack_require__(1602);
ComponentEventsTest_1.ComponentEventsTest();
var ComponentOptionsTest_1 = __webpack_require__(1603);
ComponentOptionsTest_1.ComponentOptionsTest();
var ComponentOptionsLoaderTest_1 = __webpack_require__(1604);
ComponentOptionsLoaderTest_1.ComponentOptionLoaderTest();
var ComponentOptionsMergerTest_1 = __webpack_require__(1605);
ComponentOptionsMergerTest_1.ComponentOptionsMergerTest();
var ComponentOptionsValidatorTest_1 = __webpack_require__(1606);
ComponentOptionsValidatorTest_1.ComponentOptionsValidatorTest();
var ComponentOptionsPostProcessorTest_1 = __webpack_require__(1607);
ComponentOptionsPostProcessorTest_1.ComponentOptionsPostProcessorTest();
var ComponentTest_1 = __webpack_require__(1608);
ComponentTest_1.ComponentTest();
var DidYouMeanTest_1 = __webpack_require__(1609);
DidYouMeanTest_1.DidYouMeanTest();
var DistanceResourcesTest_1 = __webpack_require__(1610);
DistanceResourcesTest_1.DistanceResourcesTest();
var ErrorReportTest_1 = __webpack_require__(1611);
ErrorReportTest_1.ErrorReportTest();
var ExcerptTest_1 = __webpack_require__(1612);
ExcerptTest_1.ExcerptTest();
var ExportToExcelTest_1 = __webpack_require__(1613);
ExportToExcelTest_1.ExportToExcelTest();
var ExpressionBuilderTest_1 = __webpack_require__(1614);
ExpressionBuilderTest_1.ExpressionBuilderTest();
var FacetHeaderTest_1 = __webpack_require__(1615);
FacetHeaderTest_1.FacetHeaderTest();
var FacetSearchParametersTest_1 = __webpack_require__(1616);
FacetSearchParametersTest_1.FacetSearchParametersTest();
var FacetSearchTest_1 = __webpack_require__(1617);
FacetSearchTest_1.FacetSearchTest();
var FacetSettingsTest_1 = __webpack_require__(1618);
FacetSettingsTest_1.FacetSettingsTest();
var FacetSliderTest_1 = __webpack_require__(1619);
FacetSliderTest_1.FacetSliderTest();
var FacetTest_1 = __webpack_require__(1620);
FacetTest_1.FacetTest();
var BreadcrumbValuesListTest_1 = __webpack_require__(1621);
BreadcrumbValuesListTest_1.BreadcrumbValueListTest();
var FieldSuggestionsTest_1 = __webpack_require__(1622);
FieldSuggestionsTest_1.FieldSuggestionsTest();
var FieldTableTest_1 = __webpack_require__(1623);
FieldTableTest_1.FieldTableTest();
var FieldValueTest_1 = __webpack_require__(1624);
FieldValueTest_1.FieldValueTest();
var FoldingTest_1 = __webpack_require__(1625);
FoldingTest_1.FoldingTest();
var FollowItemTest_1 = __webpack_require__(1626);
FollowItemTest_1.FollowItemTest();
var HiddenQueryTest_1 = __webpack_require__(1627);
HiddenQueryTest_1.HiddenQueryTest();
var HierarchicalFacetTest_1 = __webpack_require__(1628);
HierarchicalFacetTest_1.HierarchicalFacetTest();
var HierarchicalFacetSearchControllerTest_1 = __webpack_require__(1629);
HierarchicalFacetSearchControllerTest_1.HierarchicalFacetSearchControllerTest();
var IconTest_1 = __webpack_require__(1630);
IconTest_1.IconTest();
var InitializationTest_1 = __webpack_require__(1631);
InitializationTest_1.InitializationTest();
var LazyInitializationTest_1 = __webpack_require__(1632);
LazyInitializationTest_1.LazyInitializationTest();
var LiveAnalyticsClientTest_1 = __webpack_require__(1633);
LiveAnalyticsClientTest_1.LiveAnalyticsClientTest();
var MatrixTest_1 = __webpack_require__(1634);
MatrixTest_1.MatrixTest();
var OmniboxTest_1 = __webpack_require__(1635);
OmniboxTest_1.OmniboxTest();
var OmniboxResultListTest_1 = __webpack_require__(1636);
OmniboxResultListTest_1.OmniboxResultListTest();
var PagerTest_1 = __webpack_require__(1637);
PagerTest_1.PagerTest();
var PendingSearchAsYouTypeSearchEventTest_1 = __webpack_require__(1638);
PendingSearchAsYouTypeSearchEventTest_1.PendingSearchAsYouTypeSearchEventTest();
var PreferencesPanelTest_1 = __webpack_require__(1639);
PreferencesPanelTest_1.PreferencesPanelTest();
var QueryboxQueryParametersTest_1 = __webpack_require__(1640);
QueryboxQueryParametersTest_1.QueryboxQueryParametersTest();
var QueryboxTest_1 = __webpack_require__(1641);
QueryboxTest_1.QueryboxTest();
var QueryBuilderTest_1 = __webpack_require__(1642);
QueryBuilderTest_1.QueryBuilderTest();
var QueryDurationTest_1 = __webpack_require__(1643);
QueryDurationTest_1.QueryDurationTest();
var QuerySummaryTest_1 = __webpack_require__(1644);
QuerySummaryTest_1.QuerySummaryTest();
var RecommendationAnalyticsClientTest_1 = __webpack_require__(1645);
RecommendationAnalyticsClientTest_1.RecommendationAnalyticsClientTest();
var RecommendationQueryTest_1 = __webpack_require__(1646);
RecommendationQueryTest_1.RecommendationQueryTest();
var RecommendationTest_1 = __webpack_require__(1647);
RecommendationTest_1.RecommendationTest();
var ResultAttachmentsTest_1 = __webpack_require__(1648);
ResultAttachmentsTest_1.ResultAttachmentsTest();
var ResultFoldingTest_1 = __webpack_require__(1649);
ResultFoldingTest_1.ResultFoldingTest();
var ResultLinkTest_1 = __webpack_require__(1650);
ResultLinkTest_1.ResultLinkTest();
var PrintableUriTest_1 = __webpack_require__(1651);
PrintableUriTest_1.PrintableUriTest();
var ResultListTest_1 = __webpack_require__(1652);
ResultListTest_1.ResultListTest();
var ResultListTableRendererTest_1 = __webpack_require__(1653);
ResultListTableRendererTest_1.ResultListTableRendererTest();
var ResultRatingTest_1 = __webpack_require__(1654);
ResultRatingTest_1.ResultRatingTest();
var ResultsPreferencesTest_1 = __webpack_require__(1655);
ResultsPreferencesTest_1.ResultsPreferencesTest();
var SearchAlertsMessageTest_1 = __webpack_require__(1656);
SearchAlertsMessageTest_1.SearchAlertsMessageTest();
var SearchAlertsTest_1 = __webpack_require__(1657);
SearchAlertsTest_1.SearchAlertsTest();
var SearchButtonTest_1 = __webpack_require__(1658);
SearchButtonTest_1.SearchButtonTest();
var FacetValueStateHandlerTest_1 = __webpack_require__(1659);
FacetValueStateHandlerTest_1.FacetValueStateHandlerTest();
var SearchInterfaceTest_1 = __webpack_require__(1660);
SearchInterfaceTest_1.SearchInterfaceTest();
var SettingsTest_1 = __webpack_require__(1661);
SettingsTest_1.SettingsTest();
var ShareQueryTest_1 = __webpack_require__(1662);
ShareQueryTest_1.ShareQueryTest();
var SliderTest_1 = __webpack_require__(1663);
SliderTest_1.SliderTest();
var SortCriteriaTest_1 = __webpack_require__(1664);
SortCriteriaTest_1.SortCriteriaTest();
var SortTest_1 = __webpack_require__(1665);
SortTest_1.SortTest();
var TabTest_1 = __webpack_require__(1666);
TabTest_1.TabTest();
var TableTemplateTest_1 = __webpack_require__(1667);
TableTemplateTest_1.TableTemplateTest();
var TemplateLoaderTest_1 = __webpack_require__(1668);
TemplateLoaderTest_1.TemplateLoaderTest();
var ThumbnailTest_1 = __webpack_require__(1669);
ThumbnailTest_1.ThumbnailTest();
var TriggersTest_1 = __webpack_require__(1670);
TriggersTest_1.TriggersTest();
var ValueElementRendererTest_1 = __webpack_require__(1671);
ValueElementRendererTest_1.ValueElementRendererTest();
var ResultActionsMenuTest_1 = __webpack_require__(1672);
ResultActionsMenuTest_1.ResultActionsMenuTest();
var ResultsPerPageTest_1 = __webpack_require__(1673);
ResultsPerPageTest_1.ResultsPerPageTest();
var ResultLayoutTest_1 = __webpack_require__(1674);
ResultLayoutTest_1.ResultLayoutTest();
var LogoTest_1 = __webpack_require__(1675);
LogoTest_1.LogoTest();
var RegisteredNamedMethodsTest_1 = __webpack_require__(1676);
RegisteredNamedMethodsTest_1.RegisteredNamedMethodsTest();
var FacetValuesOrderTest_1 = __webpack_require__(1677);
FacetValuesOrderTest_1.FacetValuesOrderTest();
var DebugTest_1 = __webpack_require__(1678);
DebugTest_1.DebugTest();
var StreamHighlightUtilsTest_1 = __webpack_require__(1679);
StreamHighlightUtilsTest_1.StreamHighlightUtilsTest();
var BackdropTest_1 = __webpack_require__(1680);
BackdropTest_1.BackdropTest();
var CardActionBarTest_1 = __webpack_require__(1681);
CardActionBarTest_1.CardActionBarTest();
var QuickviewTest_1 = __webpack_require__(1682);
QuickviewTest_1.QuickviewTest();
var CardOverlayTest_1 = __webpack_require__(1683);
CardOverlayTest_1.CardOverlayTest();
var ResponsiveDropdownTest_1 = __webpack_require__(1684);
ResponsiveDropdownTest_1.ResponsiveDropdownTest();
var StandaloneSearchInterfaceTest_1 = __webpack_require__(1685);
StandaloneSearchInterfaceTest_1.StandaloneSearchInterfaceTest();
var ResponsiveFacetsTest_1 = __webpack_require__(1686);
ResponsiveFacetsTest_1.ResponsiveFacetsTest();
var ResponsiveRecommendationTest_1 = __webpack_require__(1687);
ResponsiveRecommendationTest_1.ResponsiveRecommendationTest();
var ResponsiveTabsTest_1 = __webpack_require__(1688);
ResponsiveTabsTest_1.ResponsiveTabsTest();
var ResponsiveDropdownContentTest_1 = __webpack_require__(1689);
ResponsiveDropdownContentTest_1.ResponsiveDropdownContentTest();
var RecommendationDropdownContentTest_1 = __webpack_require__(1690);
RecommendationDropdownContentTest_1.RecommendationDropdownContentTest();
var ResponsiveDropdownHeaderTest_1 = __webpack_require__(1691);
ResponsiveDropdownHeaderTest_1.ResponsiveDropdownHeaderTest();
var KeyboardUtilsTest_1 = __webpack_require__(1692);
KeyboardUtilsTest_1.KeyboardUtilsTests();
var HashUtilsTest_1 = __webpack_require__(1693);
HashUtilsTest_1.HashUtilsTest();
var StringUtilsTest_1 = __webpack_require__(1694);
StringUtilsTest_1.StringUtilsTests();
var CoreHelpersTest_1 = __webpack_require__(1695);
CoreHelpersTest_1.CoreHelperTest();
var TemplateConditionEvaluatorTest_1 = __webpack_require__(1696);
TemplateConditionEvaluatorTest_1.TemplateConditionEvaluatorTest();
var PipelineContextTest_1 = __webpack_require__(1697);
PipelineContextTest_1.PipelineContextText();
var QuerySuggestAddonTest_1 = __webpack_require__(1698);
QuerySuggestAddonTest_1.QuerySuggestAddonTest();
var TemplateFieldsEvaluatorTest_1 = __webpack_require__(1699);
TemplateFieldsEvaluatorTest_1.TemplateFieldsEvaluatorTest();
var DefaultRecommendationTemplateTest_1 = __webpack_require__(1700);
DefaultRecommendationTemplateTest_1.DefaultRecommendationTemplateTest();
var DefaultResultTemplateTest_1 = __webpack_require__(1701);
DefaultResultTemplateTest_1.DefaultResultTemplateTest();
var TemplateCacheTest_1 = __webpack_require__(1702);
TemplateCacheTest_1.TemplateCacheTest();
var TemplateTest_1 = __webpack_require__(1703);
TemplateTest_1.TemplateTest();
var DefaultInstantiateTemplateOptionsTest_1 = __webpack_require__(1704);
DefaultInstantiateTemplateOptionsTest_1.DefaultInstantiateTemplateOptionsTest();
var HtmlTemplateTest_1 = __webpack_require__(1705);
HtmlTemplateTest_1.HtmlTemplateTest();
var TemplateFromAScriptTagTest_1 = __webpack_require__(1706);
TemplateFromAScriptTagTest_1.TemplateFromAScriptTagTest();
var TemplateListTest_1 = __webpack_require__(1707);
TemplateListTest_1.TemplateListTest();
var UnderscoreTemplateTest_1 = __webpack_require__(1708);
UnderscoreTemplateTest_1.UnderscoreTemplateTest();
var ResponsiveComponentsTest_1 = __webpack_require__(1709);
ResponsiveComponentsTest_1.ResponsiveComponentsTest();
var ResponsiveComponentsManagerTest_1 = __webpack_require__(1710);
ResponsiveComponentsManagerTest_1.ResponsiveComponentsManagerTest();
var YouTubeThumbnailTest_1 = __webpack_require__(1711);
YouTubeThumbnailTest_1.YouTubeThumbnailTest();
var ResultTaggingTest_1 = __webpack_require__(1712);
ResultTaggingTest_1.ResultTaggingTest();
var ResultsFiltersPreferencesTest_1 = __webpack_require__(1713);
ResultsFiltersPreferencesTest_1.ResultsFiltersPreferencesTest();
var FacetRangeTest_1 = __webpack_require__(1714);
FacetRangeTest_1.FacetRangeTest();
var InitializationPlaceholderTest_1 = __webpack_require__(1715);
InitializationPlaceholderTest_1.InitializationPlaceholderTest();
var ValueElementTest_1 = __webpack_require__(1716);
ValueElementTest_1.ValueElementTest();
var PublicPathUtilsTest_1 = __webpack_require__(1718);
PublicPathUtilsTest_1.PublicPathUtilsTest();
var DomUtilsTest_1 = __webpack_require__(1719);
DomUtilsTest_1.DomUtilsTest();
var UtilsTest_1 = __webpack_require__(1720);
UtilsTest_1.UtilsTest();
var CheckboxTest_1 = __webpack_require__(1721);
CheckboxTest_1.CheckboxTest();
var FormGroupTest_1 = __webpack_require__(1722);
FormGroupTest_1.FormGroupTest();
var MultiSelectTest_1 = __webpack_require__(1723);
MultiSelectTest_1.MultiSelectTest();
var FacetSliderQueryControllerTest_1 = __webpack_require__(1724);
FacetSliderQueryControllerTest_1.FacetSliderQueryControllerTest();
var DateUtilsTest_1 = __webpack_require__(1725);
DateUtilsTest_1.DateUtilsTest();
var NumberUtilsTest_1 = __webpack_require__(1726);
NumberUtilsTest_1.NumberUtilsTest();
var DebugForResultTest_1 = __webpack_require__(1727);
DebugForResultTest_1.DebugForResultTest();
var DebugHeaderTest_1 = __webpack_require__(1728);
DebugHeaderTest_1.DebugHeaderTest();
var FacetValuesTest_1 = __webpack_require__(1729);
FacetValuesTest_1.FacetValuesTest();
var SimpleFilterTest_1 = __webpack_require__(1730);
SimpleFilterTest_1.SimpleFilterTest();
var DeviceUtilsTest_1 = __webpack_require__(1731);
DeviceUtilsTest_1.DeviceUtilsTest();
var TimespanFacetTest_1 = __webpack_require__(1732);
TimespanFacetTest_1.TimespanFacetTest();
var UrlUtilsTest_1 = __webpack_require__(1733);
UrlUtilsTest_1.UrlUtilsTest();
var AccessTokenTest_1 = __webpack_require__(1734);
AccessTokenTest_1.AccessTokenTest();
var CategoryFacetTest_1 = __webpack_require__(867);
CategoryFacetTest_1.CategoryFacetTest();
var CategoryFacetValuesTreeTest_1 = __webpack_require__(1735);
CategoryFacetValuesTreeTest_1.CategoryFacetValuesTreeTest();
var DynamicHierarchicalFacetTest_1 = __webpack_require__(1736);
DynamicHierarchicalFacetTest_1.DynamicHierarchicalFacetTest();
var DynamicHierarchicalFacetValueTest_1 = __webpack_require__(1737);
DynamicHierarchicalFacetValueTest_1.DynamicHierarchicalFacetValueTest();
var DynamicHierarchicalFacetValueRendererTest_1 = __webpack_require__(1738);
DynamicHierarchicalFacetValueRendererTest_1.DynamicHierarchicalFacetValueRendererTest();
var DynamicHierarchicalFacetValuesTest_1 = __webpack_require__(1739);
DynamicHierarchicalFacetValuesTest_1.DynamicHierarchicalFacetValuesTest();
var FacetValueSuggestionsTest_1 = __webpack_require__(1740);
FacetValueSuggestionsTest_1.FacetValueSuggestionsTest();
var FacetValueSuggestionsProviderTest_1 = __webpack_require__(1741);
FacetValueSuggestionsProviderTest_1.FacetValueSuggestionsProviderTest();
var FacetColumnAutoLayoutAdjustmentTest_1 = __webpack_require__(1742);
FacetColumnAutoLayoutAdjustmentTest_1.FacetColumnAutoLayoutAdjustmentTest();
var AgGridTest_1 = __webpack_require__(1743);
AgGridTest_1.AgGridTest();
var GenericValueOutputTest_1 = __webpack_require__(1744);
GenericValueOutputTest_1.GenericValueOutputTest();
var RankingInfoParserTest_1 = __webpack_require__(1745);
RankingInfoParserTest_1.RankingInfoParserTest();
var InlineRankingInfoTest_1 = __webpack_require__(1746);
InlineRankingInfoTest_1.InlineRankingInfoTest();
var RelevanceInspectorTabsTest_1 = __webpack_require__(1747);
RelevanceInspectorTabsTest_1.RelevanceInspectorTabsTest();
var TableBuilderTest_1 = __webpack_require__(1748);
TableBuilderTest_1.TableBuilderTest();
var ThumbnailHtmlRendererTest_1 = __webpack_require__(1749);
ThumbnailHtmlRendererTest_1.ThumbnailHtmlRendererTest();
var GenericHtmlRendererTest_1 = __webpack_require__(1750);
GenericHtmlRendererTest_1.GenericHtmlRendererTest();
var AvailableFieldsTableTest_1 = __webpack_require__(1751);
AvailableFieldsTableTest_1.AvailableFieldsTableTest();
var AvailableFieldsSampleValueTest_1 = __webpack_require__(1752);
AvailableFieldsSampleValueTest_1.AvailableFieldsSampleValueTest();
var AvailableFieldsDatasourceTest_1 = __webpack_require__(1753);
AvailableFieldsDatasourceTest_1.AvailableFieldsDatasourceTest();
var ExecutionReportGenericSectionTest_1 = __webpack_require__(1754);
ExecutionReportGenericSectionTest_1.ExecutionReportGenericSectionTest();
var ExecutionReportEffectiveIndexQuerySectionTest_1 = __webpack_require__(1755);
ExecutionReportEffectiveIndexQuerySectionTest_1.ExecutionReportEffectiveIndexQueryTest();
var ExecutionReportSimpleSectionTest_1 = __webpack_require__(1756);
ExecutionReportSimpleSectionTest_1.ExecutionReportSimpleSectionTest();
var ExecutionReportResolvedPipelineSectionTest_1 = __webpack_require__(1757);
ExecutionReportResolvedPipelineSectionTest_1.ExecutionReportResolvedPipelineSectionTest();
var ExecutionReportRankingModifiersTest_1 = __webpack_require__(1758);
ExecutionReportRankingModifiersTest_1.ExecutionReportRankingModifiersTest();
var ExecutionReportQueryOverrideSectionTest_1 = __webpack_require__(1759);
ExecutionReportQueryOverrideSectionTest_1.ExecutionReportQueryOverrideSectionTest();
var ExecutionReportAuthenticationSectionTest_1 = __webpack_require__(1760);
ExecutionReportAuthenticationSectionTest_1.ExecutionReportAuthenticationSectionTest();
var ExecutionReportITDSectionTest_1 = __webpack_require__(1761);
ExecutionReportITDSectionTest_1.ExecutionReportITDSectionTest();
var ExecutionReportTest_1 = __webpack_require__(1762);
ExecutionReportTest_1.ExecutionReportTest();
var RelevanceInspectorTest_1 = __webpack_require__(1763);
RelevanceInspectorTest_1.RelevanceInspectorTest();
var FieldValuesRendererTest_1 = __webpack_require__(1764);
FieldValuesRendererTest_1.FieldValuesRendererTest();
var MetaDataTableTest_1 = __webpack_require__(1765);
MetaDataTableTest_1.MetaDataTableTest();
var QueryUtilsTest_1 = __webpack_require__(1766);
QueryUtilsTest_1.QueryUtilsTest();
var QuickviewDocumentWordTest_1 = __webpack_require__(1767);
QuickviewDocumentWordTest_1.QuickviewDocumentWordTest();
var QuickviewDocumentIframeTest_1 = __webpack_require__(1768);
QuickviewDocumentIframeTest_1.QuickviewDocumentIframeTest();
var QuickviewDocumentWordsTest_1 = __webpack_require__(1769);
QuickviewDocumentWordsTest_1.QuickviewDocumentWordsTest();
var QuickviewDocumentWordColorTest_1 = __webpack_require__(1770);
QuickviewDocumentWordColorTest_1.QuickviewDocumentWordColorTest();
var QuickviewDocumentPreviewBarTest_1 = __webpack_require__(1771);
QuickviewDocumentPreviewBarTest_1.QuickviewDocumentPreviewBarTest();
var QuickviewDocumentHeaderTest_1 = __webpack_require__(1772);
QuickviewDocumentHeaderTest_1.QuickviewDocumentHeaderTest();
var QuickviewDocumentWordButtonTest_1 = __webpack_require__(1773);
QuickviewDocumentWordButtonTest_1.QuickviewDocumentWordButtonTest();
var QuickviewDocumentTest_1 = __webpack_require__(1774);
QuickviewDocumentTest_1.QuickviewDocumentTest();
var CategoryFacetDebugTest_1 = __webpack_require__(1775);
CategoryFacetDebugTest_1.CategoryFacetDebugTest();
var CategoryFacetSearchTest_1 = __webpack_require__(1776);
CategoryFacetSearchTest_1.CategoryFacetSearchTest();
var CategoryFacetBreadcrumbTest_1 = __webpack_require__(1777);
CategoryFacetBreadcrumbTest_1.CategoryFacetBreadcrumbTest();
var CategoryValueTest_1 = __webpack_require__(1778);
CategoryValueTest_1.CategoryValueTest();
var CategoryFacetHeaderTest_1 = __webpack_require__(1779);
CategoryFacetHeaderTest_1.CategoryFacetHeaderTest();
var DynamicHierarchicalFacetBreadcrumbTest_1 = __webpack_require__(1780);
DynamicHierarchicalFacetBreadcrumbTest_1.DynamicHierarchicalFacetBreadcrumbTest();
var GrammarTest_1 = __webpack_require__(1781);
GrammarTest_1.GrammarTest();
var SuggestionsManagerTest_1 = __webpack_require__(1782);
SuggestionsManagerTest_1.SuggestionsManagerTest();
var QueryProcessorTest_1 = __webpack_require__(1783);
QueryProcessorTest_1.QueryProcessorTest();
var MagicBoxClearTest_1 = __webpack_require__(1784);
MagicBoxClearTest_1.MagicBoxClearTest();
var AccessibleButtonTest_1 = __webpack_require__(1785);
AccessibleButtonTest_1.AccessibleButtonTest();
var AriaLiveTest_1 = __webpack_require__(1786);
AriaLiveTest_1.AriaLiveTest();
var QuerySummaryUtilsTest_1 = __webpack_require__(1787);
QuerySummaryUtilsTest_1.QuerySummaryUtilsTest();
var CategoryFacetQueryControllerTest_1 = __webpack_require__(1788);
CategoryFacetQueryControllerTest_1.CategoryFacetQueryControllerTest();
var DynamicHierarchicalFacetQueryControllerTest_1 = __webpack_require__(1789);
DynamicHierarchicalFacetQueryControllerTest_1.DynamicHierarchicalFacetQueryControllerTest();
var ComponentsTypesTest_1 = __webpack_require__(1790);
ComponentsTypesTest_1.ComponentsTypesTest();
var PromotedResultsBadgeTest_1 = __webpack_require__(1791);
PromotedResultsBadgeTest_1.PromotedResultsBadgeTest();
var ResultListUtilsTest_1 = __webpack_require__(1792);
ResultListUtilsTest_1.ResultListUtilsTest();
var FacetUtilsTest_1 = __webpack_require__(1793);
FacetUtilsTest_1.FacetUtilsTest();
var DynamicFacetTest_1 = __webpack_require__(1794);
DynamicFacetTest_1.DynamicFacetTest();
var DynamicFacetRangeTest_1 = __webpack_require__(1795);
DynamicFacetRangeTest_1.DynamicFacetRangeTest();
var DynamicFacetHeaderTest_1 = __webpack_require__(1796);
DynamicFacetHeaderTest_1.DynamicFacetHeaderTest();
var DynamicFacetHeaderButtonTest_1 = __webpack_require__(1797);
DynamicFacetHeaderButtonTest_1.DynamicFacetHeaderButtonTest();
var DynamicFacetHeaderCollapseToggleTest_1 = __webpack_require__(1798);
DynamicFacetHeaderCollapseToggleTest_1.DynamicFacetHeaderCollapseToggleTest();
var DynamicFacetValuesTest_1 = __webpack_require__(1799);
DynamicFacetValuesTest_1.DynamicFacetValuesTest();
var DynamicFacetValueTest_1 = __webpack_require__(1800);
DynamicFacetValueTest_1.DynamicFacetValueTest();
var DynamicFacetValueCheckboxTest_1 = __webpack_require__(1801);
DynamicFacetValueCheckboxTest_1.DynamicFacetValueCheckboxTest();
var DynamicFacetValueRendererTest_1 = __webpack_require__(1802);
DynamicFacetValueRendererTest_1.DynamicFacetValueRendererTest();
var DynamicFacetSearchValueRendererTest_1 = __webpack_require__(1803);
DynamicFacetSearchValueRendererTest_1.DynamicFacetSearchValueRendererTest();
var DynamicFacetBreadcrumbsTest_1 = __webpack_require__(1804);
DynamicFacetBreadcrumbsTest_1.DynamicFacetBreadcrumbsTest();
var DynamicFacetRequestBuilderTest_1 = __webpack_require__(1805);
DynamicFacetRequestBuilderTest_1.DynamicFacetRequestBuilderTest();
var DynamicFacetQueryControllerTest_1 = __webpack_require__(1806);
DynamicFacetQueryControllerTest_1.DynamicFacetQueryControllerTest();
var DynamicFacetRangeQueryControllerTest_1 = __webpack_require__(1807);
DynamicFacetRangeQueryControllerTest_1.DynamicFacetRangeQueryControllerTest();
var DynamicFacetManagerTest_1 = __webpack_require__(1808);
DynamicFacetManagerTest_1.DynamicFacetManagerTest();
var DynamicFacetValueCreatorTest_1 = __webpack_require__(1809);
DynamicFacetValueCreatorTest_1.DynamicFacetValueCreatorTest();
var DynamicFacetRangeValueCreatorTest_1 = __webpack_require__(1810);
DynamicFacetRangeValueCreatorTest_1.DynamicFacetRangeValueCreatorTest();
var DynamicFacetRangeValueParserTest_1 = __webpack_require__(1811);
DynamicFacetRangeValueParserTest_1.DynamicFacetRangeValueParserTest();
var FacetSearchControllerTest_1 = __webpack_require__(1812);
FacetSearchControllerTest_1.FacetSearchControllerTest();
var MissingTermsTest_1 = __webpack_require__(1813);
MissingTermsTest_1.MissingTermsTest();
var MissingTermManagerTest_1 = __webpack_require__(1814);
MissingTermManagerTest_1.MissingTermsManagerTest();
var SearchboxResizeTest_1 = __webpack_require__(1815);
SearchboxResizeTest_1.SearchboxResizeTest();
var DependsOnManagerTest_1 = __webpack_require__(1816);
DependsOnManagerTest_1.DependsOnManagerTest();
var ComboboxTest_1 = __webpack_require__(413);
ComboboxTest_1.ComboboxTest();
var ComboboxInputTest_1 = __webpack_require__(1817);
ComboboxInputTest_1.ComboboxInputTest();
var ComboboxValuesTest_1 = __webpack_require__(1818);
ComboboxValuesTest_1.ComboboxValuesTest();
var QuerySuggestPreviewTest_1 = __webpack_require__(866);
QuerySuggestPreviewTest_1.QuerySuggestPreviewTest();
var ImageFieldValueTest_1 = __webpack_require__(1819);
ImageFieldValueTest_1.FieldImageTest();
var OmniboxAnalyticsTest_1 = __webpack_require__(1820);
OmniboxAnalyticsTest_1.OmniboxAnalyticsTest();
var StarRatingTest_1 = __webpack_require__(1821);
StarRatingTest_1.StarRatingTest();
var ResultPreviewsManagerTest_1 = __webpack_require__(1822);
ResultPreviewsManagerTest_1.ResultPreviewsManagerTest();
var CommerceQueryTest_1 = __webpack_require__(1823);
CommerceQueryTest_1.CommerceQueryTest();
var FocusTrapTest_1 = __webpack_require__(1824);
FocusTrapTest_1.FocusTrapTest();
var AccessibleModalTest_1 = __webpack_require__(1825);
AccessibleModalTest_1.AccessibleModalTest();
var SortDropdownTest_1 = __webpack_require__(1826);
SortDropdownTest_1.SortDropdownTest();
var ResultLayoutSelectorTest_1 = __webpack_require__(1827);
ResultLayoutSelectorTest_1.ResultLayoutSelectorTest();
var DynamicHierarchicalFacetSearchValueRendererTest_1 = __webpack_require__(1828);
DynamicHierarchicalFacetSearchValueRendererTest_1.DynamicHierarchicalFacetSearchValueRendererTest();
var ResponsiveFacetColumnTest_1 = __webpack_require__(1829);
ResponsiveFacetColumnTest_1.ResponsiveFacetColumnTest();
var ResponsiveDropdownModalContentTest_1 = __webpack_require__(1830);
ResponsiveDropdownModalContentTest_1.ResponsiveDropdownModalContentTest();
var FileTypesTest_1 = __webpack_require__(1831);
FileTypesTest_1.FileTypesTest();
var SmartSnippetTest_1 = __webpack_require__(1832);
SmartSnippetTest_1.SmartSnippetTest();
var HeightLimiterTest_1 = __webpack_require__(1833);
HeightLimiterTest_1.HeightLimiterTest();
var UserFeedbackBannerTest_1 = __webpack_require__(1834);
UserFeedbackBannerTest_1.UserFeedbackBannerTest();
var ExplanationModalTest_1 = __webpack_require__(1835);
ExplanationModalTest_1.ExplanationModalTest();
var SmartSnippetSuggestionsTest_1 = __webpack_require__(1836);
SmartSnippetSuggestionsTest_1.SmartSnippetSuggestionsTest();
var FacetSearchElementTest_1 = __webpack_require__(1837);
FacetSearchElementTest_1.FacetSearchElementTest();
var HistoryStoreTest_1 = __webpack_require__(1838);
HistoryStoreTest_1.HistoryStoreTest();
var AnalyticsInformationTest_1 = __webpack_require__(1839);
AnalyticsInformationTest_1.AnalyticsInformationTest();
var AttachShadowPolyfillTest_1 = __webpack_require__(1840);
AttachShadowPolyfillTest_1.AttachShadowPolyfillTest();
 
 
/***/ }),
/* 41 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = keys;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isObject_js__ = __webpack_require__(105);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__setup_js__ = __webpack_require__(30);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__has_js__ = __webpack_require__(95);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__collectNonEnumProps_js__ = __webpack_require__(426);
 
 
 
 
 
// Retrieve the names of an object's own properties.
// Delegates to **ECMAScript 5**'s native `Object.keys`.
function keys(obj) {
  if (!Object(__WEBPACK_IMPORTED_MODULE_0__isObject_js__["a" /* default */])(obj)) return [];
  Eif (__WEBPACK_IMPORTED_MODULE_1__setup_js__["m" /* nativeKeys */]) return Object(__WEBPACK_IMPORTED_MODULE_1__setup_js__["m" /* nativeKeys */])(obj);
  var keys = [];
  for (var key in obj) if (Object(__WEBPACK_IMPORTED_MODULE_2__has_js__["a" /* default */])(obj, key)) keys.push(key);
  // Ahem, IE < 9.
  if (__WEBPACK_IMPORTED_MODULE_1__setup_js__["h" /* hasEnumBug */]) Object(__WEBPACK_IMPORTED_MODULE_3__collectNonEnumProps_js__["a" /* default */])(obj, keys);
  return keys;
}
 
 
/***/ }),
/* 42 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
// Not sure about this : In year 2033 who's to say that this list won't be 50 pages long !
var ResponsiveComponents_1 = __webpack_require__(54);
var mobile = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
var DeviceUtils = /** @class */ (function () {
    function DeviceUtils() {
    }
    DeviceUtils.getDeviceName = function (userAgent) {
        if (userAgent === void 0) { userAgent = navigator.userAgent; }
        if (userAgent.match(/Edge/i)) {
            return 'Edge';
        }
        if (userAgent.match(/Opera Mini/i)) {
            return 'Opera Mini';
        }
        if (userAgent.match(/Android/i)) {
            return 'Android';
        }
        if (userAgent.match(/BlackBerry/i)) {
            return 'BlackBerry';
        }
        if (userAgent.match(/iPhone/i)) {
            return 'iPhone';
        }
        if (userAgent.match(/iPad/i) || this.isSafariIPadOS(userAgent)) {
            return 'iPad';
        }
        Iif (userAgent.match(/iPod/i)) {
            return 'iPod';
        }
        if (userAgent.match(/Chrome/i)) {
            return 'Chrome';
        }
        if (userAgent.match(/MSIE/i) || userAgent.match(/Trident/i)) {
            return 'IE';
        }
        if (userAgent.match(/Opera/i)) {
            return 'Opera';
        }
        if (userAgent.match(/Firefox/i)) {
            return 'Firefox';
        }
        if (userAgent.match(/Safari/i)) {
            return 'Safari';
        }
        return 'Others';
    };
    DeviceUtils.isAndroid = function () {
        return DeviceUtils.getDeviceName() == 'Android';
    };
    DeviceUtils.isIos = function () {
        var deviceName = DeviceUtils.getDeviceName();
        return deviceName == 'iPhone' || deviceName == 'iPad' || deviceName == 'iPod';
    };
    DeviceUtils.isMobileDevice = function () {
        Iif (this.isSafariIPadOS()) {
            return true;
        }
        return mobile;
    };
    // Workaround for Safari on iPadOS https://developer.apple.com/forums/thread/119186
    DeviceUtils.isSafariIPadOS = function (userAgent) {
        if (userAgent === void 0) { userAgent = navigator.userAgent; }
        return userAgent.match(/Macintosh/i) && navigator.maxTouchPoints && navigator.maxTouchPoints > 2;
    };
    /**
     * @deprecated
     *
     * Use ResponsiveComponents.isSmallScreenWidth() instead
     */
    DeviceUtils.isSmallScreenWidth = function () {
        return new ResponsiveComponents_1.ResponsiveComponents().isSmallScreenWidth();
    };
    return DeviceUtils;
}());
exports.DeviceUtils = DeviceUtils;
 
 
/***/ }),
/* 43 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
var Options_1 = __webpack_require__(215);
var Utils_1 = __webpack_require__(5);
var Strings_1 = __webpack_require__(4);
var _ = __webpack_require__(1);
var moment = __webpack_require__(3);
var Logger_1 = __webpack_require__(18);
var DefaultDateToStringOptions = /** @class */ (function (_super) {
    __extends(DefaultDateToStringOptions, _super);
    function DefaultDateToStringOptions() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        _this.now = moment().toDate();
        _this.useTodayYesterdayAndTomorrow = true;
        _this.useWeekdayIfThisWeek = true;
        _this.omitYearIfCurrentOne = true;
        _this.useLongDateFormat = false;
        _this.includeTimeIfToday = true;
        _this.includeTimeIfThisWeek = true;
        _this.alwaysIncludeTime = false;
        _this.predefinedFormat = undefined;
        return _this;
    }
    return DefaultDateToStringOptions;
}(Options_1.Options));
/**
 * The `DateUtils` class exposes methods to convert strings, numbers and date objects to standard ISO 8601 Date objects,
 * using the correct culture, language and format. It also offers methods to convert date objects to strings.
 */
var DateUtils = /** @class */ (function () {
    function DateUtils() {
    }
    // This function is used to call convertToStandardDate for legacy reasons. convertFromJsonDateIfNeeded was refactored to
    // convertToStandardDate, which would be a breaking change otherwise.
    DateUtils.convertFromJsonDateIfNeeded = function (date) {
        return DateUtils.convertToStandardDate(date);
    };
    /**
     * Tries to parse an argument of any type to a standard Date object.
     * @param date The value to parse. Can be of any type (string, number, Date, etc.).
     * @returns {any} The parsed Date object, or `Invalid Date` if the `date` argument was not recognized as a valid date.
     */
    DateUtils.convertToStandardDate = function (date) {
        if (_.isDate(date)) {
            return moment(date).toDate();
        }
        else if (date !== null && !isNaN(Number(date))) {
            return moment(Number(date)).toDate();
        }
        else if (_.isString(date)) {
            var dateMoment = moment(date, 'YYYY/MM/DD@HH:mm:ssZ');
            return dateMoment.toDate();
        }
    };
    DateUtils.setLocale = function () {
        DateUtils.saveOriginalMomentLocaleData();
        moment.updateLocale(DateUtils.momentjsCompatibleLocale, DateUtils.transformGlobalizeCalendarToMomentCalendar());
        moment.locale(DateUtils.momentjsCompatibleLocale);
    };
    DateUtils.saveOriginalMomentLocaleData = function () {
        var locale = DateUtils.momentjsCompatibleLocale;
        var alreadySaved = DateUtils.momentjsLocaleDataMap[locale] != null;
        if (alreadySaved) {
            return;
        }
        DateUtils.momentjsLocaleDataMap[locale] = moment.localeData();
    };
    /**
     * Creates a string from a Date object. The resulting string is in the date format required for queries.
     * @param date The Date object to create a string from.
     * @returns {string} A string corresponding to the `date` argument value, in the `YYYY/MM/DD` format.
     */
    DateUtils.dateForQuery = function (date) {
        DateUtils.setLocale();
        var dateMoment = moment(date).format('YYYY/MM/DD');
        return dateMoment;
    };
    /**
     * Creates a string from a Date object. The resulting string is in the datetime format required for queries.
     * @param date The Date object to create a string from.
     * @returns {string} A string corresponding to the `date` argument value, in the `YYYY/MM/DD@HH:mm:ss` format.
     */
    DateUtils.dateTimeForQuery = function (date) {
        DateUtils.setLocale();
        var dateMoment = moment(date).format('YYYY/MM/DD@HH:mm:ss');
        return dateMoment;
    };
    /**
     * Creates a cropped version of a Date object. The resulting object contains no time information.
     * @param date The original Date object to create a cropped Date object from.
     * @returns {Date} A cropped Date object corresponding to the `date` argument value, excluding its time information.
     */
    DateUtils.keepOnlyDatePart = function (date) {
        DateUtils.setLocale();
        var dateMoment = moment(date);
        return new Date(dateMoment.year(), dateMoment.month(), dateMoment.date());
    };
    /**
     * Creates an offset version of a Date object. The offset is counted in days.
     * @param date The original Date object to create an offset Date object from.
     * @param offset The number of days to add to (or subtract from) the `date` argument.
     * @returns {Date} An offset Date object corresponding to the `date` argument value plus the `offset` value.
     */
    DateUtils.offsetDateByDays = function (date, offset) {
        return moment(date).add(offset, 'days').toDate();
    };
    DateUtils.isTodayYesterdayOrTomorrow = function (d, options) {
        var dateOnly = moment(DateUtils.keepOnlyDatePart(d));
        var today = moment(DateUtils.keepOnlyDatePart(options.now));
        var daysDifference = dateOnly.diff(today, 'days');
        return daysDifference == 0 || daysDifference == 1 || daysDifference == -1;
    };
    DateUtils.getMomentJsFormat = function (format) {
        var correctedFormat = format;
        var fourLowercaseY = DateUtils.buildRegexMatchingExactCharSequence('y', 4);
        correctedFormat = correctedFormat.replace(fourLowercaseY, '$1YYYY');
        var twoLowercaseY = DateUtils.buildRegexMatchingExactCharSequence('y', 2);
        correctedFormat = correctedFormat.replace(twoLowercaseY, '$1YY');
        var twoLowercaseD = DateUtils.buildRegexMatchingExactCharSequence('d', 2);
        correctedFormat = correctedFormat.replace(twoLowercaseD, '$1DD');
        var oneLowercaseD = DateUtils.buildRegexMatchingExactCharSequence('d', 1);
        correctedFormat = correctedFormat.replace(oneLowercaseD, '$1D');
        var twoLowercaseH = DateUtils.buildRegexMatchingExactCharSequence('h', 2);
        correctedFormat = correctedFormat.replace(twoLowercaseH, '$1H');
        return correctedFormat;
    };
    DateUtils.buildRegexMatchingExactCharSequence = function (char, sequenceLength) {
        var negativeNonCapturingGroup = "(?:([^" + char + "]|^))"; // look-behind is not supported in Firefox
        var charSequence = char + "{" + sequenceLength + "}";
        var negativeLookAhead = "(?!" + char + ")";
        var exactSequence = "" + negativeNonCapturingGroup + charSequence + negativeLookAhead;
        return new RegExp(exactSequence, 'g');
    };
    /**
     * Creates a string from a Date object. The resulting string is formatted according to a set of options.
     * This method calls [ `keepOnlyDatePart` ]{@link DateUtils.keepOnlyDatePart} to remove time information from the date.
     * If you need to create a timestamp, use the [ `dateTimeToString` ]{@link DateUtils.dateTimeToString} method instead.
     * @param date The Date object to create a string from.
     * @param options The set of options to apply when formatting the resulting string. If you do not specify a value for
     * this parameter, the method uses a default set of options.
     * @returns {string} A date string corresponding to the `date` argument value, formatted according to the specified `options`.
     */
    DateUtils.dateToString = function (date, options) {
        DateUtils.setLocale();
        if (Utils_1.Utils.isNullOrUndefined(date)) {
            new Logger_1.Logger(this).warn("Impossible to format an undefined or null date.");
            return '';
        }
        options = new DefaultDateToStringOptions().merge(options);
        var dateOnly = moment(DateUtils.keepOnlyDatePart(date));
        var today = moment(DateUtils.keepOnlyDatePart(options.now));
        if (options.predefinedFormat) {
            return dateOnly.format(this.getMomentJsFormat(options.predefinedFormat));
        }
        if (options.useTodayYesterdayAndTomorrow) {
            if (DateUtils.isTodayYesterdayOrTomorrow(date, options)) {
                return moment(dateOnly).calendar(moment(today));
            }
        }
        var isThisWeek = dateOnly.diff(moment(today), 'weeks') == 0;
        if (options.useWeekdayIfThisWeek && isThisWeek) {
            if (dateOnly.valueOf() > today.valueOf()) {
                return Strings_1.l('NextDay', Strings_1.l(dateOnly.format('dddd')));
            }
            else if (dateOnly.valueOf() < today.valueOf()) {
                return Strings_1.l('LastDay', Strings_1.l(dateOnly.format('dddd')));
            }
            else {
                return dateOnly.format('dddd');
            }
        }
        if (options.omitYearIfCurrentOne && dateOnly.year() === today.year()) {
            return dateOnly.format('LL');
        }
        if (options.useLongDateFormat) {
            return dateOnly.format(this.longDateFormat);
        }
        return dateOnly.format('L');
    };
    Object.defineProperty(DateUtils, "longDateFormat", {
        get: function () {
            var momentLocaleData = DateUtils.momentjsLocaleDataMap[DateUtils.momentjsCompatibleLocale];
            return momentLocaleData
                .longDateFormat('LLLL')
                .replace(/[h:mA]/g, '')
                .trim();
        },
        enumerable: true,
        configurable: true
    });
    /**
     * Creates a string from a Date object. The string corresponds to the time information of the Date object.
     * @param date The Date object to create a string from.
     * @param options The set of options to apply when formatting the resulting string. If you do not specify a
     * value for this parameter, the method uses a default set of options.
     * @returns {string} A string containing the time information of the `date` argument, and formatted according to the specified `options`.
     */
    DateUtils.timeToString = function (date, options) {
        if (Utils_1.Utils.isNullOrUndefined(date)) {
            return '';
        }
        return moment(date).format('h:mm A');
    };
    /**
     * Creates a string from a Date object. The resulting string is formatted according to a set of options.
     * This method calls [ `timeToString` ]{@link DateUtils.timeToString} to add time information to the date.
     * If you need to create a date string without a timestamp, use the [ `dateToString` ]{@link DateUtils.dateToString} method instead.
     * @param date The date object to create a string from.
     * @param options The set of options to apply when formatting the resulting string. If you do not specify a value for
     * this parameter, the method uses a default set of options.
     * @returns {string} A date string corresponding to the `date` argument value, formatted according to the specified `options`.
     */
    DateUtils.dateTimeToString = function (date, options) {
        DateUtils.setLocale();
        options = new DefaultDateToStringOptions().merge(options);
        if (Utils_1.Utils.isNullOrUndefined(date)) {
            new Logger_1.Logger(this).warn("Impossible to format an undefined or null date.");
            return '';
        }
        if (!moment(date).isValid()) {
            new Logger_1.Logger(this).warn("Impossible to format an invalid date: " + date);
            return '';
        }
        if (options.predefinedFormat) {
            return moment(date).format(this.getMomentJsFormat(options.predefinedFormat));
        }
        var today = DateUtils.keepOnlyDatePart(options.now);
        var datePart = DateUtils.dateToString(date, options);
        var dateWithoutTime = DateUtils.keepOnlyDatePart(date);
        var isThisWeek = moment(date).diff(moment(today), 'weeks') == 0;
        var isToday = dateWithoutTime.valueOf() == today.valueOf();
        var shouldIncludeTime = function () {
            if (options.alwaysIncludeTime) {
                return true;
            }
            if (options.includeTimeIfThisWeek && isThisWeek) {
                return true;
            }
            Iif (options.includeTimeIfToday && isToday) {
                return true;
            }
            return false;
        };
        if (shouldIncludeTime()) {
            return datePart + ", " + DateUtils.timeToString(date);
        }
        return datePart;
    };
    /**
     * Creates a string from a number. The resulting string is the localized name of the month that corresponds
     * to this number (e.g., `0` results in the localized version of `January`).
     * @param month The number to create a string from. Minimum value is `0` (which corresponds to `January`). Maximum
     * value is `11` (which corresponds to `December`).
     * @returns {string} A string whose value is the localized name of the corresponding `month`.
     */
    DateUtils.monthToString = function (month) {
        DateUtils.setLocale();
        var date = moment(new Date(1980, month)).toDate();
        return moment(date).format('MMMM');
    };
    /**
     * Validates whether a value is an instance of Date.
     * @param date The value to verify.
     * @returns {boolean} `true` if the `date` argument is an instance of Date; `false` otherwise.
     */
    DateUtils.isValid = function (date) {
        DateUtils.setLocale();
        Eif (date instanceof Date) {
            return !isNaN(date.getTime());
        }
        return false;
    };
    /**
     * Creates a string from two Date objects. The resulting string corresponds to the amount of time between those two dates.
     * @param from The Date object which contains the "oldest" value.
     * @param to The Date object which contains the "newest" value.
     * @returns {any} A string whose value corresponds to the amount of time between `from` and `to`,
     * or an empty string if either argument was undefined.
     */
    DateUtils.timeBetween = function (from, to) {
        Iif (Utils_1.Utils.isNullOrUndefined(from) || Utils_1.Utils.isNullOrUndefined(to)) {
            return '';
        }
        return (('0' + ((moment(to).valueOf() - moment(from).valueOf()) / (1000 * 60 * 60)).toFixed()).slice(-2) +
            ':' +
            ('0' + (((moment(to).valueOf() - moment(from).valueOf()) % (1000 * 60 * 60)) / (1000 * 60)).toFixed()).slice(-2) +
            ':' +
            ('0' + (((moment(to).valueOf() - moment(from).valueOf()) % (1000 * 60)) / 1000).toFixed()).slice(-2));
    };
    Object.defineProperty(DateUtils, "currentGlobalizeCalendar", {
        get: function () {
            return Globalize.culture(DateUtils.currentLocale).calendar;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(DateUtils, "currentLocale", {
        get: function () {
            return String['locale'];
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(DateUtils, "momentjsCompatibleLocale", {
        get: function () {
            var currentLocale = DateUtils.currentLocale;
            // Our cultures.js directory contains 'no' which is the equivalent to 'nn' for momentJS
            if (currentLocale.toLowerCase() == 'no') {
                currentLocale = 'nn';
            }
            else if (currentLocale.toLowerCase() == 'es-es') {
                // Our cultures.js directory contains 'es-es' which is the equivalent to 'es' for momentJS
                currentLocale = 'es';
            }
            return currentLocale;
        },
        enumerable: true,
        configurable: true
    });
    DateUtils.transformGlobalizeCalendarToMomentCalendar = function () {
        var cldrToMomentFormat = function (cldrFormat) {
            return cldrFormat.replace(/y/g, 'Y').replace(/d/g, 'D');
        };
        return {
            months: DateUtils.currentGlobalizeCalendar.months.names,
            monthsShort: DateUtils.currentGlobalizeCalendar.months.namesAbbr,
            weekdays: DateUtils.currentGlobalizeCalendar.days.names,
            weekdaysShort: DateUtils.currentGlobalizeCalendar.days.namesAbbr,
            weekdaysMin: DateUtils.currentGlobalizeCalendar.days.namesShort,
            longDateFormat: {
                LT: cldrToMomentFormat(DateUtils.currentGlobalizeCalendar.patterns.t),
                LTS: cldrToMomentFormat(DateUtils.currentGlobalizeCalendar.patterns.T),
                L: cldrToMomentFormat(DateUtils.currentGlobalizeCalendar.patterns.d),
                LL: cldrToMomentFormat(DateUtils.currentGlobalizeCalendar.patterns.M),
                LLL: cldrToMomentFormat(DateUtils.currentGlobalizeCalendar.patterns.f),
                LLLL: cldrToMomentFormat(DateUtils.currentGlobalizeCalendar.patterns.F)
            },
            calendar: {
                lastDay: "[" + Strings_1.l('Yesterday') + "]",
                sameDay: "[" + Strings_1.l('Today') + "]",
                nextDay: "[" + Strings_1.l('Tomorrow') + "]"
            }
        };
    };
    DateUtils.momentjsLocaleDataMap = {};
    return DateUtils;
}());
exports.DateUtils = DateUtils;
 
 
/***/ }),
/* 44 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__bisect__ = __webpack_require__(697);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return __WEBPACK_IMPORTED_MODULE_0__bisect__["c"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return __WEBPACK_IMPORTED_MODULE_0__bisect__["b"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return __WEBPACK_IMPORTED_MODULE_0__bisect__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__ascending__ = __webpack_require__(148);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_1__ascending__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__bisector__ = __webpack_require__(698);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return __WEBPACK_IMPORTED_MODULE_2__bisector__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__cross__ = __webpack_require__(1128);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return __WEBPACK_IMPORTED_MODULE_3__cross__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__descending__ = __webpack_require__(1129);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return __WEBPACK_IMPORTED_MODULE_4__descending__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__deviation__ = __webpack_require__(700);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return __WEBPACK_IMPORTED_MODULE_5__deviation__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__extent__ = __webpack_require__(702);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return __WEBPACK_IMPORTED_MODULE_6__extent__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__histogram__ = __webpack_require__(1130);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return __WEBPACK_IMPORTED_MODULE_7__histogram__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__threshold_freedmanDiaconis__ = __webpack_require__(1133);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "w", function() { return __WEBPACK_IMPORTED_MODULE_8__threshold_freedmanDiaconis__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__threshold_scott__ = __webpack_require__(1134);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "x", function() { return __WEBPACK_IMPORTED_MODULE_9__threshold_scott__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__threshold_sturges__ = __webpack_require__(706);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "y", function() { return __WEBPACK_IMPORTED_MODULE_10__threshold_sturges__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__max__ = __webpack_require__(1135);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "k", function() { return __WEBPACK_IMPORTED_MODULE_11__max__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__mean__ = __webpack_require__(1136);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "l", function() { return __WEBPACK_IMPORTED_MODULE_12__mean__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__median__ = __webpack_require__(1137);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "m", function() { return __WEBPACK_IMPORTED_MODULE_13__median__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__merge__ = __webpack_require__(1138);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "n", function() { return __WEBPACK_IMPORTED_MODULE_14__merge__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__min__ = __webpack_require__(707);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "o", function() { return __WEBPACK_IMPORTED_MODULE_15__min__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__pairs__ = __webpack_require__(699);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "p", function() { return __WEBPACK_IMPORTED_MODULE_16__pairs__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_17__permute__ = __webpack_require__(1139);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "q", function() { return __WEBPACK_IMPORTED_MODULE_17__permute__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_18__quantile__ = __webpack_require__(335);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "r", function() { return __WEBPACK_IMPORTED_MODULE_18__quantile__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_19__range__ = __webpack_require__(704);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "s", function() { return __WEBPACK_IMPORTED_MODULE_19__range__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_20__scan__ = __webpack_require__(1140);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "t", function() { return __WEBPACK_IMPORTED_MODULE_20__scan__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_21__shuffle__ = __webpack_require__(1141);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "u", function() { return __WEBPACK_IMPORTED_MODULE_21__shuffle__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_22__sum__ = __webpack_require__(1142);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "v", function() { return __WEBPACK_IMPORTED_MODULE_22__sum__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_23__ticks__ = __webpack_require__(705);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "B", function() { return __WEBPACK_IMPORTED_MODULE_23__ticks__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "z", function() { return __WEBPACK_IMPORTED_MODULE_23__ticks__["b"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "A", function() { return __WEBPACK_IMPORTED_MODULE_23__ticks__["c"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_24__transpose__ = __webpack_require__(708);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "C", function() { return __WEBPACK_IMPORTED_MODULE_24__transpose__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_25__variance__ = __webpack_require__(701);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "D", function() { return __WEBPACK_IMPORTED_MODULE_25__variance__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_26__zip__ = __webpack_require__(1143);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "E", function() { return __WEBPACK_IMPORTED_MODULE_26__zip__["a"]; });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
/***/ }),
/* 45 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__create__ = __webpack_require__(1152);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return __WEBPACK_IMPORTED_MODULE_0__create__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__creator__ = __webpack_require__(244);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return __WEBPACK_IMPORTED_MODULE_1__creator__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__local__ = __webpack_require__(1182);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return __WEBPACK_IMPORTED_MODULE_2__local__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__matcher__ = __webpack_require__(711);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return __WEBPACK_IMPORTED_MODULE_3__matcher__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__mouse__ = __webpack_require__(1183);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return __WEBPACK_IMPORTED_MODULE_4__mouse__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__namespace__ = __webpack_require__(337);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return __WEBPACK_IMPORTED_MODULE_5__namespace__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__namespaces__ = __webpack_require__(338);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return __WEBPACK_IMPORTED_MODULE_6__namespaces__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__point__ = __webpack_require__(245);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_7__point__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__select__ = __webpack_require__(709);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "k", function() { return __WEBPACK_IMPORTED_MODULE_8__select__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__selectAll__ = __webpack_require__(1184);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "l", function() { return __WEBPACK_IMPORTED_MODULE_9__selectAll__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__selection_index__ = __webpack_require__(73);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "m", function() { return __WEBPACK_IMPORTED_MODULE_10__selection_index__["b"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__selector__ = __webpack_require__(339);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "n", function() { return __WEBPACK_IMPORTED_MODULE_11__selector__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__selectorAll__ = __webpack_require__(710);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "o", function() { return __WEBPACK_IMPORTED_MODULE_12__selectorAll__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__selection_style__ = __webpack_require__(714);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "p", function() { return __WEBPACK_IMPORTED_MODULE_13__selection_style__["b"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__touch__ = __webpack_require__(1185);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "q", function() { return __WEBPACK_IMPORTED_MODULE_14__touch__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__touches__ = __webpack_require__(1186);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "r", function() { return __WEBPACK_IMPORTED_MODULE_15__touches__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__window__ = __webpack_require__(340);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "s", function() { return __WEBPACK_IMPORTED_MODULE_16__window__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_17__selection_on__ = __webpack_require__(341);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return __WEBPACK_IMPORTED_MODULE_17__selection_on__["c"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return __WEBPACK_IMPORTED_MODULE_17__selection_on__["a"]; });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
/***/ }),
/* 46 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = tagTester;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__setup_js__ = __webpack_require__(30);
 
 
// Internal function for creating a `toString`-based type tester.
function tagTester(name) {
  var tag = '[object ' + name + ']';
  return function(obj) {
    return __WEBPACK_IMPORTED_MODULE_0__setup_js__["t" /* toString */].call(obj) === tag;
  };
}
 
 
/***/ }),
/* 47 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
// The reference to magic-box with the triple slash is needed for dts-generator
Object.defineProperty(exports, "__esModule", { value: true });
/**
 * The `OmniboxEvents` static class contains the string definitions of all events that strongly relate to the
 * [`Omnibox`]{@link Omnibox} component.
 */
var OmniboxEvents = /** @class */ (function () {
    function OmniboxEvents() {
    }
    OmniboxEvents.populateOmnibox = 'populateOmnibox';
    /**
     * Triggered by the [`Omnibox`]{@link Omnibox} component before query completion suggestions are rendered.
     *
     * The out-of-the-box Coveo JavaScript Search Framework query completion suggestion addons (see the
     * [`enableFieldAddon`]{@link Omnibox.options.enableFieldAddon},
     * [`enableQueryExtensionAddon`]{@link Omnibox.options.enableQueryExtensionAddon}, and
     * [`enableQuerySuggestAddon`]{@link Omnibox.options.enableQuerySuggestAddon} options of the `Omnibox`) push their
     * respective suggestions in the argument object which is passed along with this event.
     *
     * All `populateOmniboxSuggestions` event handlers receive a
     * [`PopulateOmniboxSuggestionsEventArgs`]{@link IPopulateOmniboxSuggestionsEventArgs} object as an argument.
     *
     * @type {string} The string value is `populateOmniboxSuggestions`.
     */
    OmniboxEvents.populateOmniboxSuggestions = 'populateOmniboxSuggestions';
    OmniboxEvents.omniboxPreprocessResultForQuery = 'omniboxPreprocessResultForQuery';
    /**
     * Triggered by the [`Omnibox`]{@link Omnibox} component before sending a query suggestion request to the Search API.
     *
     * Allows external functions to refine the payload b3efore sending the request.
     *
     * This event is only triggered by standard ML-powered query suggestions, and not {@link AnalyticsSuggestions} or {@link FieldSuggestions}.
     */
    OmniboxEvents.buildingQuerySuggest = 'buildingQuerySuggest';
    /**
     * Triggered by the [`Omnibox`]{@link Omnibox} component when query suggestions are received from the Search API.
     *
     * Allows external functions to look into the received query suggestions, and modify them if needed.
     *
     * This event is only triggered by standard ML-powered query suggestions, and not {@link AnalyticsSuggestions} or {@link FieldSuggestions}.
     */
    OmniboxEvents.querySuggestSuccess = 'querySuggestSuccess';
    /**
     * Triggered by the [`Omnibox`]{@link Omnibox} component when a query suggestion has finished rendering.
     */
    OmniboxEvents.querySuggestRendered = 'querySuggestRendered';
    /**
     * Triggered by the [`Omnibox`]{@link Omnibox} component when a query suggestion gets focus following a mouse hovering or keyboard navigation event.
     *
     * All `querySuggestGetFocus` event handlers receive an object implementing the [`IQuerySuggestSelection`]{@link IQuerySuggestSelection} interface as an argument.
     */
    OmniboxEvents.querySuggestGetFocus = 'querySuggestGetFocus';
    /**
     * Triggered by the [`Omnibox`]{@link Omnibox} component when a query suggestion loses focus following a mouse hovering or keyboard navigation event.
     */
    OmniboxEvents.querySuggestLoseFocus = 'querySuggestLooseFocus';
    /**
     * Triggered by the [`Omnibox`]{@link Omnibox} component when a query suggestion is selected by a mouse click or pressing the enter key.
     *
     * All `querySuggestSelection` event handlers receive an object implementing the [`IQuerySuggestSelection`]{@link IQuerySuggestSelection} interface as an argument.
     */
    OmniboxEvents.querySuggestSelection = 'querySuggestSelection';
    return OmniboxEvents;
}());
exports.OmniboxEvents = OmniboxEvents;
 
 
/***/ }),
/* 48 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
/**
 * The `ResultListEvents` static class contains the string definitions of all events that strongly relate to the result
 * list.
 *
 * See [Events](https://docs.coveo.com/en/417/).
 */
var ResultListEvents = /** @class */ (function () {
    function ResultListEvents() {
    }
    /**
     * Triggered when the result list has just finished rendering the current page of results.
     *
     * @type {string} The string value is `newResultsDisplayed`.
     */
    ResultListEvents.newResultsDisplayed = 'newResultsDisplayed';
    /**
     * Triggered each time the result list has just finished rendering a single result.
     *
     * All `newResultDisplayed` event handlers receive a
     * [`DisplayedNewResultEventArgs`]{@link IDisplayedNewResultEventArgs} object as an argument.
     *
     * @type {string} The string value is `newResultDisplayed`.
     */
    ResultListEvents.newResultDisplayed = 'newResultDisplayed';
    /**
     * Triggered by the [`ResultLink`]{@link ResultLink} result template component when its
     * [`openQuickview`]{@link ResultLink.options.openQuickview} option is set to `true` and the end user clicks the
     * result link. The [`Quickview`]{@link Quickview} component listens to this event to be able to open the quickview
     * modal window in reaction.
     *
     * See also the [`openQuickview`]{@link QuickviewEvents.openQuickview} event (which is identical to this one, except
     * that it is triggered by the [`QuickviewDocument`] result template component instead).
     *
     * All `openQuickview` event handlers receive an [`OpenQuickviewEventArgs`]{@link IOpenQuickviewEventArgs} object as
     * an argument
     *
     * @type {string} The string value is `openQuickview`.
     */
    ResultListEvents.openQuickview = 'openQuickview';
    /**
     * Triggered by the [`ResultLayout`]{@link ResultLayout} component whenever the current result layout changes (see
     * [Result Layouts](https://docs.coveo.com/en/360/)).
     *
     * All `changeLayout` event handlers receive a [`ChangeLayoutEventArgs`]{@link IChangeLayoutEventArgs} object as an
     * argument.
     *
     * @type {string} The string value is `changeLayout`.
     */
    ResultListEvents.changeLayout = 'changeLayout';
    return ResultListEvents;
}());
exports.ResultListEvents = ResultListEvents;
 
 
/***/ }),
/* 49 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
/// <reference path='Facet.ts' />
var StringUtils_1 = __webpack_require__(34);
var QueryUtils_1 = __webpack_require__(37);
var FileTypes_1 = __webpack_require__(138);
var DateUtils_1 = __webpack_require__(43);
var Utils_1 = __webpack_require__(5);
var Dom_1 = __webpack_require__(0);
var _ = __webpack_require__(1);
var Strings_1 = __webpack_require__(4);
var FacetUtils = /** @class */ (function () {
    function FacetUtils() {
    }
    FacetUtils.getRegexToUseForFacetSearch = function (value, ignoreAccent) {
        return new RegExp(StringUtils_1.StringUtils.stringToRegex(value, ignoreAccent), 'i');
    };
    FacetUtils.getDisplayValueFromValueCaption = function (value, field, valueCaption) {
        var returnValue = this.tryToGetTranslatedCaption(field, value, false);
        return valueCaption[value] || returnValue;
    };
    FacetUtils.getValuesToUseForSearchInFacet = function (original, facet) {
        var ret = [original];
        var regex = this.getRegexToUseForFacetSearch(original, facet.options.facetSearchIgnoreAccents);
        if (facet.options.valueCaption) {
            _.chain(facet.options.valueCaption)
                .pairs()
                .filter(function (pair) {
                return regex.test(pair[1]);
            })
                .each(function (match) {
                ret.push(match[0]);
            });
            Iif (QueryUtils_1.QueryUtils.isStratusAgnosticField(facet.options.field, '@objecttype') ||
                QueryUtils_1.QueryUtils.isStratusAgnosticField(facet.options.field, '@filetype')) {
                _.each(FileTypes_1.FileTypes.getFileTypeCaptions(), function (value, key) {
                    if (!(key in facet.options.valueCaption) && regex.test(value)) {
                        ret.push(key);
                    }
                });
            }
        }
        else Iif (QueryUtils_1.QueryUtils.isStratusAgnosticField(facet.options.field, '@objecttype') ||
            QueryUtils_1.QueryUtils.isStratusAgnosticField(facet.options.field, '@filetype')) {
            _.each(_.filter(_.pairs(FileTypes_1.FileTypes.getFileTypeCaptions()), function (pair) {
                return regex.test(pair[1]);
            }), function (match) {
                ret.push(match[0]);
            });
        }
        else Iif (QueryUtils_1.QueryUtils.isStratusAgnosticField(facet.options.field, '@month')) {
            _.each(_.range(1, 13), function (month) {
                if (regex.test(DateUtils_1.DateUtils.monthToString(month - 1))) {
                    ret.push(('0' + month.toString()).substr(-2));
                }
            });
        }
        return ret;
    };
    FacetUtils.buildFacetSearchPattern = function (values) {
        values = _.map(values, function (value) {
            return Utils_1.Utils.escapeRegexCharacter(value);
        });
        values[0] = '.*' + values[0] + '.*';
        return values.join('|');
    };
    FacetUtils.needAnotherFacetSearch = function (currentSearchLength, newSearchLength, oldSearchLength, desiredSearchLength) {
        // Something was removed (currentSearch < newSearch)
        // && we might want to display more facet search result(currentSearch < desiredSearch)
        // && the new query returned more stuff than the old one so there's still more results(currentSearchLength > oldLength)
        return currentSearchLength < newSearchLength && currentSearchLength < desiredSearchLength && currentSearchLength > oldSearchLength;
    };
    FacetUtils.addNoStateCssClassToFacetValues = function (facet, container) {
        // This takes care of adding the correct css class on each facet value checkbox (empty white box) if at least one value is selected in that facet
        if (facet.values.getSelected().length != 0) {
            var noStates = Dom_1.$$(container).findAll('li:not(.coveo-selected)');
            _.each(noStates, function (noState) {
                Dom_1.$$(noState).addClass('coveo-no-state');
            });
        }
    };
    FacetUtils.tryToGetTranslatedCaption = function (field, value, fallbackOnLocalization) {
        if (fallbackOnLocalization === void 0) { fallbackOnLocalization = true; }
        var found;
        if (QueryUtils_1.QueryUtils.isStratusAgnosticField(field.toLowerCase(), '@filetype')) {
            found = FileTypes_1.FileTypes.getFileType(value, fallbackOnLocalization).caption;
        }
        else if (QueryUtils_1.QueryUtils.isStratusAgnosticField(field.toLowerCase(), '@objecttype')) {
            found = FileTypes_1.FileTypes.getObjectType(value, fallbackOnLocalization).caption;
        }
        else if (FacetUtils.isMonthFieldValue(field, value)) {
            var month = parseInt(value, 10);
            found = DateUtils_1.DateUtils.monthToString(month - 1);
        }
        else if (fallbackOnLocalization) {
            found = Strings_1.l(value);
        }
        return found != undefined && Utils_1.Utils.isNonEmptyString(found) ? found : value;
    };
    FacetUtils.isMonthFieldValue = function (field, value) {
        if (!QueryUtils_1.QueryUtils.isStratusAgnosticField(field.toLowerCase(), '@month')) {
            return false;
        }
        var asInt = parseInt(value, 10);
        if (isNaN(asInt)) {
            return false;
        }
        if (asInt < 1 || asInt > 12) {
            return false;
        }
        return true;
    };
    return FacetUtils;
}());
exports.FacetUtils = FacetUtils;
 
 
/***/ }),
/* 50 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { Iif (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        Iif (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            Iif (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
            Iif (y = 0, t) op = [0, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    Eif (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        Iif (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
Object.defineProperty(exports, "__esModule", { value: true });
var ExecutionReportAuthenticationSection_1 = __webpack_require__(640);
var ExecutionReportResolvedPipelineSection_1 = __webpack_require__(641);
var ExecutionReportQueryOverrideSection_1 = __webpack_require__(642);
var ExecutionReportSimpleSection_1 = __webpack_require__(319);
var ExecutionReportEffectiveIndexQuerySection_1 = __webpack_require__(643);
var UtilsModules_1 = __webpack_require__(67);
var ExecutionReportRankingModifiers_1 = __webpack_require__(644);
var Core_1 = __webpack_require__(9);
var ExecutionReportITDSection_1 = __webpack_require__(645);
var EXECUTION_REPORT_SECTION;
(function (EXECUTION_REPORT_SECTION) {
    EXECUTION_REPORT_SECTION["PERFORM_AUTHENTICATION"] = "PerformAuthentication";
    EXECUTION_REPORT_SECTION["RESOLVE_PIPELINE"] = "ResolvePipeline";
    EXECUTION_REPORT_SECTION["QUERY_PARAM_OVERRIDE"] = "ApplyQueryParamOverrideFeature";
    EXECUTION_REPORT_SECTION["THESAURUS"] = "ApplyThesaurusFeature";
    EXECUTION_REPORT_SECTION["PREPROCESS_QUERY_EXPRESSION"] = "PreprocessQueryExpression";
    EXECUTION_REPORT_SECTION["PREPROCESS_QUERY"] = "PreprocessQuery";
    EXECUTION_REPORT_SECTION["STOP_WORDS"] = "ApplyStopWordFeature";
    EXECUTION_REPORT_SECTION["FILTERS"] = "ApplyFilterFeature";
    EXECUTION_REPORT_SECTION["RANKING"] = "ApplyRankingFeature";
    EXECUTION_REPORT_SECTION["TOP_RESULT"] = "ApplyTopResultFeature";
    EXECUTION_REPORT_SECTION["RANKING_WEIGHT"] = "ApplyRankingWeightFeature";
    EXECUTION_REPORT_SECTION["INDEX_QUERY"] = "Send query to index";
    EXECUTION_REPORT_SECTION["TOP_CLICKS"] = "EvaluatingTopClicks";
    EXECUTION_REPORT_SECTION["PARTIAL_MATCH"] = "PartialMatch";
    EXECUTION_REPORT_SECTION["NONE"] = "NONE";
})(EXECUTION_REPORT_SECTION = exports.EXECUTION_REPORT_SECTION || (exports.EXECUTION_REPORT_SECTION = {}));
var ExecutionReport = /** @class */ (function () {
    function ExecutionReport(results, bindings) {
        this.results = results;
        this.bindings = bindings;
    }
    ExecutionReport.standardSectionHeader = function (title) {
        var container = UtilsModules_1.$$('div');
        container.append(UtilsModules_1.$$('h4', undefined, title).el);
        var agGridElement = UtilsModules_1.$$('div', {
            className: 'ag-theme-fresh'
        });
        container.append(agGridElement.el);
        return {
            container: container,
            agGridElement: agGridElement
        };
    };
    ExecutionReport.prototype.build = function () {
        return __awaiter(this, void 0, void 0, function () {
            var container, gridOptions, authenticationSection, resolvedPipelineSection, resolvedRankingModifiers, queryParamOverrideSection, thesaurusSection, stopWordsSection, filtersSection, rankingSection, topResultsSection, itdSection, rankingWeightsSection, indexQuerySection;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        if (!this.results.executionReport) {
                            new Core_1.Logger(this).error('Could not open execution report : Missing execution report on results. Try executing the query in debug mode.');
                            return [2 /*return*/, UtilsModules_1.$$('div')];
                        }
                        container = UtilsModules_1.$$('div', {
                            className: 'execution-report-debug'
                        });
                        gridOptions = [];
                        return [4 /*yield*/, new ExecutionReportAuthenticationSection_1.ExecutionReportAuthenticationSection().build(this.results.executionReport)];
                    case 1:
                        authenticationSection = _a.sent();
                        container.append(authenticationSection.container.el);
                        Iif (authenticationSection.gridOptions) {
                            gridOptions.push(authenticationSection.gridOptions);
                        }
                        return [4 /*yield*/, new ExecutionReportResolvedPipelineSection_1.ExecutionReportResolvedPipelineSection().build(this.results.executionReport)];
                    case 2:
                        resolvedPipelineSection = _a.sent();
                        container.append(resolvedPipelineSection.container.el);
                        Iif (resolvedPipelineSection.gridOptions) {
                            gridOptions.push(resolvedPipelineSection.gridOptions);
                        }
                        return [4 /*yield*/, new ExecutionReportRankingModifiers_1.ExecutionReportRankingModifiers().build(this.results.results, this.results.rankingExpressions, this.bindings)];
                    case 3:
                        resolvedRankingModifiers = _a.sent();
                        container.append(resolvedRankingModifiers.container.el);
                        Eif (resolvedRankingModifiers.gridOptions) {
                            gridOptions.push(resolvedRankingModifiers.gridOptions);
                        }
                        return [4 /*yield*/, new ExecutionReportQueryOverrideSection_1.ExecutionReportQueryOverrideSection().build(this.results.executionReport)];
                    case 4:
                        queryParamOverrideSection = _a.sent();
                        container.append(queryParamOverrideSection.container.el);
                        Iif (queryParamOverrideSection.gridOptions) {
                            gridOptions.push(queryParamOverrideSection.gridOptions);
                        }
                        return [4 /*yield*/, new ExecutionReportSimpleSection_1.ExecutionReportSimpleSection(EXECUTION_REPORT_SECTION.PREPROCESS_QUERY_EXPRESSION, EXECUTION_REPORT_SECTION.THESAURUS, 'Thesaurus').build(this.results.executionReport)];
                    case 5:
                        thesaurusSection = _a.sent();
                        container.append(thesaurusSection.container.el);
                        Eif (thesaurusSection.gridOptions) {
                            gridOptions.push(thesaurusSection.gridOptions);
                        }
                        return [4 /*yield*/, new ExecutionReportSimpleSection_1.ExecutionReportSimpleSection(EXECUTION_REPORT_SECTION.PREPROCESS_QUERY_EXPRESSION, EXECUTION_REPORT_SECTION.STOP_WORDS, 'Stop words').build(this.results.executionReport)];
                    case 6:
                        stopWordsSection = _a.sent();
                        container.append(stopWordsSection.container.el);
                        Eif (stopWordsSection.gridOptions) {
                            gridOptions.push(stopWordsSection.gridOptions);
                        }
                        return [4 /*yield*/, new ExecutionReportSimpleSection_1.ExecutionReportSimpleSection(EXECUTION_REPORT_SECTION.PREPROCESS_QUERY, EXECUTION_REPORT_SECTION.FILTERS, 'Filters').build(this.results.executionReport)];
                    case 7:
                        filtersSection = _a.sent();
                        container.append(filtersSection.container.el);
                        Eif (filtersSection.gridOptions) {
                            gridOptions.push(filtersSection.gridOptions);
                        }
                        return [4 /*yield*/, new ExecutionReportSimpleSection_1.ExecutionReportSimpleSection(EXECUTION_REPORT_SECTION.PREPROCESS_QUERY, EXECUTION_REPORT_SECTION.RANKING, 'Ranking').build(this.results.executionReport)];
                    case 8:
                        rankingSection = _a.sent();
                        container.append(rankingSection.container.el);
                        Eif (rankingSection.gridOptions) {
                            gridOptions.push(rankingSection.gridOptions);
                        }
                        return [4 /*yield*/, new ExecutionReportSimpleSection_1.ExecutionReportSimpleSection(EXECUTION_REPORT_SECTION.PREPROCESS_QUERY, EXECUTION_REPORT_SECTION.TOP_RESULT, 'Featured Results').build(this.results.executionReport)];
                    case 9:
                        topResultsSection = _a.sent();
                        container.append(topResultsSection.container.el);
                        Eif (topResultsSection.gridOptions) {
                            gridOptions.push(topResultsSection.gridOptions);
                        }
                        return [4 /*yield*/, new ExecutionReportITDSection_1.ExecutionReportITDSection().build(this.results.executionReport)];
                    case 10:
                        itdSection = _a.sent();
                        container.append(itdSection.container.el);
                        Eif (itdSection.gridOptions) {
                            gridOptions.push(itdSection.gridOptions);
                        }
                        return [4 /*yield*/, new ExecutionReportSimpleSection_1.ExecutionReportSimpleSection(EXECUTION_REPORT_SECTION.PREPROCESS_QUERY, EXECUTION_REPORT_SECTION.RANKING_WEIGHT, 'Ranking weights').build(this.results.executionReport)];
                    case 11:
                        rankingWeightsSection = _a.sent();
                        container.append(rankingWeightsSection.container.el);
                        Eif (rankingWeightsSection.gridOptions) {
                            gridOptions.push(rankingWeightsSection.gridOptions);
                        }
                        return [4 /*yield*/, new ExecutionReportEffectiveIndexQuerySection_1.ExecutionReportEffectiveIndexQuerySection().build(this.results.executionReport)];
                    case 12:
                        indexQuerySection = _a.sent();
                        container.append(indexQuerySection.container.el);
                        this.gridOptions = {
                            api: {
                                sizeColumnsToFit: function () {
                                    gridOptions.forEach(function (option) { return (option.api ? option.api.sizeColumnsToFit() : null); });
                                }
                            }
                        };
                        return [2 /*return*/, container];
                }
            });
        });
    };
    return ExecutionReport;
}());
exports.ExecutionReport = ExecutionReport;
 
 
/***/ }),
/* 51 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Assert_1 = __webpack_require__(12);
var Utils_1 = __webpack_require__(5);
var Globalize = __webpack_require__(28);
var underscore_1 = __webpack_require__(1);
/**
 * A class which holds information and operation available on a single facet value returned by a {@link IGroupByRequest}.<br/>
 * This class is used extensively in the {@link Facet} component.
 */
var FacetValue = /** @class */ (function () {
    function FacetValue() {
        this.selected = false;
        this.excluded = false;
        this.waitingForDelta = false;
    }
    FacetValue.prototype.reset = function () {
        this.selected = false;
        this.excluded = false;
    };
    FacetValue.prototype.updateCountsFromNewValue = function (newValue) {
        Assert_1.Assert.exists(newValue);
        this.occurrences = newValue.occurrences;
        this.delta = newValue.delta;
        this.computedField = newValue.computedField;
    };
    FacetValue.prototype.clone = function () {
        this.computedField = undefined;
        this.delta = undefined;
        return this;
    };
    FacetValue.prototype.cloneWithZeroOccurrences = function () {
        this.occurrences = 0;
        return this.clone();
    };
    FacetValue.prototype.cloneWithDelta = function (count, delta) {
        Assert_1.Assert.isLargerOrEqualsThan(0, count);
        var clone = this.cloneWithZeroOccurrences();
        clone.delta = delta;
        clone.occurrences = count;
        return clone;
    };
    FacetValue.prototype.getFormattedCount = function () {
        var count = undefined;
        if (Utils_1.Utils.exists(this.delta) && this.delta > 0) {
            count = '+' + Globalize.format(this.delta, 'n0');
        }
        else {
            if (this.occurrences > 0) {
                count = Globalize.format(this.occurrences, 'n0');
            }
        }
        return count;
    };
    FacetValue.prototype.getFormattedComputedField = function (format) {
        Eif (this.computedField != 0) {
            return Globalize.format(this.computedField, format);
        }
        else {
            return undefined;
        }
    };
    FacetValue.create = function (value) {
        if (underscore_1.isString(value)) {
            return FacetValue.createFromValue(value);
        }
        else Eif (underscore_1.isObject(value)) {
            Iif ('computedFieldResults' in value) {
                return FacetValue.createFromGroupByValue(value);
            }
            else {
                return FacetValue.createFromFieldValue(value);
            }
        }
        else {
            throw new Error("Can't create value from " + value);
        }
    };
    FacetValue.createFromValue = function (value) {
        Assert_1.Assert.isNonEmptyString(value);
        var facetValue = new FacetValue();
        facetValue.value = value;
        facetValue.lookupValue = value;
        return facetValue;
    };
    FacetValue.createFromGroupByValue = function (groupByValue) {
        Assert_1.Assert.exists(groupByValue);
        Assert_1.Assert.exists(groupByValue);
        var facetValue = new FacetValue();
        facetValue.value = groupByValue.value;
        facetValue.lookupValue = Utils_1.Utils.exists(groupByValue.lookupValue) ? groupByValue.lookupValue : groupByValue.value;
        facetValue.occurrences = groupByValue.numberOfResults;
        facetValue.computedField = Utils_1.Utils.isNonEmptyArray(groupByValue.computedFieldResults) ? groupByValue.computedFieldResults[0] : undefined;
        facetValue.score = groupByValue.score;
        return facetValue;
    };
    FacetValue.createFromFieldValue = function (fieldValue) {
        Assert_1.Assert.exists(fieldValue);
        var facetValue = new FacetValue();
        facetValue.value = fieldValue.value;
        facetValue.lookupValue = fieldValue.lookupValue;
        facetValue.occurrences = fieldValue.numberOfResults;
        return facetValue;
    };
    return FacetValue;
}());
exports.FacetValue = FacetValue;
 
 
/***/ }),
/* 52 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = newInterval;
var t0 = new Date,
    t1 = new Date;
 
function newInterval(floori, offseti, count, field) {
 
  function interval(date) {
    return floori(date = arguments.length === 0 ? new Date : new Date(+date)), date;
  }
 
  interval.floor = function(date) {
    return floori(date = new Date(+date)), date;
  };
 
  interval.ceil = function(date) {
    return floori(date = new Date(date - 1)), offseti(date, 1), floori(date), date;
  };
 
  interval.round = function(date) {
    var d0 = interval(date),
        d1 = interval.ceil(date);
    return date - d0 < d1 - date ? d0 : d1;
  };
 
  interval.offset = function(date, step) {
    return offseti(date = new Date(+date), step == null ? 1 : Math.floor(step)), date;
  };
 
  interval.range = function(start, stop, step) {
    var range = [], previous;
    start = interval.ceil(start);
    step = step == null ? 1 : Math.floor(step);
    if (!(start < stop) || !(step > 0)) return range; // also handles Invalid Date
    do range.push(previous = new Date(+start)), offseti(start, step), floori(start);
    while (previous < start && start < stop);
    return range;
  };
 
  interval.filter = function(test) {
    return newInterval(function(date) {
      if (date >= date) while (floori(date), !test(date)) date.setTime(date - 1);
    }, function(date, step) {
      if (date >= date) {
        if (step < 0) while (++step <= 0) {
          while (offseti(date, -1), !test(date)) {} // eslint-disable-line no-empty
        } else while (--step >= 0) {
          while (offseti(date, +1), !test(date)) {} // eslint-disable-line no-empty
        }
      }
    });
  };
 
  Eif (count) {
    interval.count = function(start, end) {
      t0.setTime(+start), t1.setTime(+end);
      floori(t0), floori(t1);
      return Math.floor(count(t0, t1));
    };
 
    interval.every = function(step) {
      step = Math.floor(step);
      return !isFinite(step) || !(step > 0) ? null
          : !(step > 1) ? interval
          : interval.filter(field
              ? function(d) { return field(d) % step === 0; }
              : function(d) { return interval.count(0, d) % step === 0; });
    };
  }
 
  return interval;
}
 
 
/***/ }),
/* 53 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = cb;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__underscore_js__ = __webpack_require__(59);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseIteratee_js__ = __webpack_require__(436);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__iteratee_js__ = __webpack_require__(437);
 
 
 
 
// The function we call internally to generate a callback. It invokes
// `_.iteratee` if overridden, otherwise `baseIteratee`.
function cb(value, context, argCount) {
  Iif (__WEBPACK_IMPORTED_MODULE_0__underscore_js__["a" /* default */].iteratee !== __WEBPACK_IMPORTED_MODULE_2__iteratee_js__["a" /* default */]) return __WEBPACK_IMPORTED_MODULE_0__underscore_js__["a" /* default */].iteratee(value, context);
  return Object(__WEBPACK_IMPORTED_MODULE_1__baseIteratee_js__["a" /* default */])(value, context, argCount);
}
 
 
/***/ }),
/* 54 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Assert_1 = __webpack_require__(12);
__webpack_require__(946);
exports.MEDIUM_SCREEN_WIDTH = 800;
exports.SMALL_SCREEN_WIDTH = 480;
/**
 * This class serves as a way to get and set the different screen size breakpoints for the interface.
 *
 * By setting those, you can impact, amongst others, the {@link Facet}'s, {@link Tab}'s or the {@link ResultList}'s behaviour.
 *
 * For example, the {@link Facet} components of your interface will switch to a dropdown menu when the screen size reaches 800px or less.
 *
 * You could modify this value using `this` calls
 *
 * Normally, you would interact with this class using the instance bound to {@link SearchInterface.responsiveComponents}
 */
var ResponsiveComponents = /** @class */ (function () {
    function ResponsiveComponents(windoh) {
        if (windoh === void 0) { windoh = window; }
        this.windoh = windoh;
        this.responsiveMode = 'auto';
    }
    /**
     * Set the breakpoint for small screen size.
     * @param width
     */
    ResponsiveComponents.prototype.setSmallScreenWidth = function (width) {
        Assert_1.Assert.check(this.responsiveMode === 'auto', "Cannot modify medium screen width if responsiveMode is locked on " + this.responsiveMode + ".");
        Assert_1.Assert.check(width < this.getMediumScreenWidth(), "Cannot set small screen width (" + width + ") larger or equal to the current medium screen width (" + this.getMediumScreenWidth() + ")");
        this.smallScreenWidth = width;
    };
    /**
     * Set the breakpoint for medium screen size
     * @param width
     */
    ResponsiveComponents.prototype.setMediumScreenWidth = function (width) {
        Assert_1.Assert.check(this.responsiveMode === 'auto', "Cannot modify medium screen width if responsiveMode is locked on " + this.responsiveMode + ".");
        Assert_1.Assert.check(width > this.getSmallScreenWidth(), "Cannot set medium screen width (" + width + ") smaller or equal to the current small screen width (" + this.getSmallScreenWidth() + ")");
        this.mediumScreenWidth = width;
    };
    ResponsiveComponents.prototype.setResponsiveMode = function (responsiveMode) {
        this.responsiveMode = responsiveMode;
    };
    /**
     * Get the current breakpoint for small screen size.
     *
     * If it was not explicitly set by {@link ResponsiveComponents.setSmallScreenWidth}, the default value is `480`.
     * @returns {number}
     */
    ResponsiveComponents.prototype.getSmallScreenWidth = function () {
        if (this.responsiveMode === 'small') {
            return Number.POSITIVE_INFINITY;
        }
        if (this.responsiveMode !== 'auto') {
            return 0;
        }
        if (this.smallScreenWidth == null) {
            return exports.SMALL_SCREEN_WIDTH;
        }
        return this.smallScreenWidth;
    };
    /**
     * Get the current breakpoint for medium screen size.
     *
     * If it was not explicitly set by {@link ResponsiveComponents.setMediumScreenWidth}, the default value is `800`.
     * @returns {number}
     */
    ResponsiveComponents.prototype.getMediumScreenWidth = function () {
        if (this.responsiveMode === 'medium') {
            return Number.POSITIVE_INFINITY;
        }
        if (this.responsiveMode !== 'auto') {
            return 0;
        }
        if (this.mediumScreenWidth == null) {
            return exports.MEDIUM_SCREEN_WIDTH;
        }
        return this.mediumScreenWidth;
    };
    /** Return the current responsive mode.
     * @returns {ValidResponsiveMode}
     */
    ResponsiveComponents.prototype.getResponsiveMode = function () {
        return this.responsiveMode;
    };
    /**
     * Return true if the current screen size is smaller than the current breakpoint set for small screen width.
     * @returns {boolean}
     */
    ResponsiveComponents.prototype.isSmallScreenWidth = function () {
        Eif (this.windoh['clientWidth'] != null) {
            return this.windoh['clientWidth'] <= this.getSmallScreenWidth();
        }
        else {
            return document.body.clientWidth <= this.getSmallScreenWidth();
        }
    };
    /**
     * Return true if the current screen size is smaller than the current breakpoint set for medium screen width.
     * @returns {boolean}
     */
    ResponsiveComponents.prototype.isMediumScreenWidth = function () {
        if (this.isSmallScreenWidth()) {
            return false;
        }
        Eif (this.windoh['clientWidth'] != null) {
            return this.windoh['clientWidth'] <= this.getMediumScreenWidth();
        }
        return document.body.clientWidth <= this.getMediumScreenWidth();
    };
    /**
     * Return true if the current screen size is larger than the current breakpoint set for medium and small.
     * @returns {boolean}
     */
    ResponsiveComponents.prototype.isLargeScreenWidth = function () {
        return !this.isSmallScreenWidth() && !this.isMediumScreenWidth();
    };
    return ResponsiveComponents;
}());
exports.ResponsiveComponents = ResponsiveComponents;
 
 
/***/ }),
/* 55 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
var Model_1 = __webpack_require__(26);
var _ = __webpack_require__(1);
exports.COMPONENT_OPTIONS_ATTRIBUTES = {
    RESULT_LINK: 'resultLink',
    SEARCH_HUB: 'searchHub',
    SEARCH_BOX: 'searchBox'
};
var ComponentOptionsModel = /** @class */ (function (_super) {
    __extends(ComponentOptionsModel, _super);
    function ComponentOptionsModel(element, attributes) {
        var _this = this;
        var merged = _.extend({}, ComponentOptionsModel.defaultAttributes, attributes);
        _this = _super.call(this, element, ComponentOptionsModel.ID, merged) || this;
        return _this;
    }
    ComponentOptionsModel.ID = 'ComponentOptions';
    ComponentOptionsModel.defaultAttributes = {
        resultLink: undefined,
        searchHub: undefined,
        searchBox: undefined
    };
    ComponentOptionsModel.attributesEnum = {
        resultLink: 'resultLink',
        searchHub: 'searchHub',
        searchBox: 'searchBox'
    };
    return ComponentOptionsModel;
}(Model_1.Model));
exports.ComponentOptionsModel = ComponentOptionsModel;
 
 
/***/ }),
/* 56 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __assign = (this && this.__assign) || Object.assign || function(t) {
    for (var s, i = 1, n = arguments.length; i < n; i++) {
        s = arguments[i];
        for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
            t[p] = s[p];
    }
    return t;
};
Object.defineProperty(exports, "__esModule", { value: true });
var Component_1 = __webpack_require__(6);
var ComponentOptions_1 = __webpack_require__(13);
var ComponentOptionsModel_1 = __webpack_require__(55);
var AnalyticsActionListMeta_1 = __webpack_require__(7);
var ResultListEvents_1 = __webpack_require__(48);
var HighlightUtils_1 = __webpack_require__(82);
var DeviceUtils_1 = __webpack_require__(42);
var OSUtils_1 = __webpack_require__(317);
var Initialization_1 = __webpack_require__(8);
var QueryUtils_1 = __webpack_require__(37);
var Assert_1 = __webpack_require__(12);
var Utils_1 = __webpack_require__(5);
var Defer_1 = __webpack_require__(31);
var Dom_1 = __webpack_require__(0);
var StreamHighlightUtils_1 = __webpack_require__(139);
var StringUtils_1 = __webpack_require__(34);
var underscore_1 = __webpack_require__(1);
var GlobalExports_1 = __webpack_require__(10);
__webpack_require__(1076);
var AccessibleButton_1 = __webpack_require__(20);
var ResultLinkCommon_1 = __webpack_require__(638);
/**
 * The `ResultLink` component automatically transform a search result title into a clickable link pointing to the
 * original item.
 *
 * This component is a result template component (see [Result Templates](https://docs.coveo.com/en/413/)).
 */
var ResultLink = /** @class */ (function (_super) {
    __extends(ResultLink, _super);
    /**
     * Creates a new `ResultLink` component.
     * @param element The HTMLElement on which to instantiate the component.
     * @param options The options for the `ResultLink` component.
     * @param bindings The bindings that the component requires to function normally. If not set, these will be
     * automatically resolved (with a slower execution time).
     * @param result The result to associate the component with.
     * @param os
     */
    function ResultLink(element, options, bindings, result, os) {
        var _this = _super.call(this, element, ResultLink.ID, bindings) || this;
        _this.element = element;
        _this.options = options;
        _this.bindings = bindings;
        _this.result = result;
        _this.os = os;
        _this.logAnalytics = underscore_1.debounce(function () {
            _this.queryController.saveLastQuery();
            var documentURL = Dom_1.$$(_this.element).getAttribute('href');
            if (documentURL == undefined || documentURL == '') {
                documentURL = _this.escapedClickUri;
            }
            if (_this.options.logAnalytics) {
                _this.options.logAnalytics(documentURL);
            }
            else {
                _this.logDocumentOpen(documentURL);
            }
            Defer_1.Defer.flush();
        }, 1500, true);
        var globalOptions = _this.searchInterface.options.originalOptionsObject[ResultLink.ID] || {};
        var initialOptions = ComponentOptions_1.ComponentOptions.initComponentOptions(element, ResultLink, __assign({}, globalOptions, options));
        var resultLinkOptions = _this.componentOptionsModel.get(ComponentOptionsModel_1.ComponentOptionsModel.attributesEnum.resultLink);
        _this.options = underscore_1.extend({}, initialOptions, resultLinkOptions);
        _this.result = result || _this.resolveResult();
        Iif (_this.options.openQuickview == null) {
            _this.options.openQuickview = result.raw['connectortype'] == 'ExchangeCrawler' && DeviceUtils_1.DeviceUtils.isMobileDevice();
        }
        if (!_this.element.hasAttribute('tabindex')) {
            _this.element.setAttribute('tabindex', '0');
        }
        Assert_1.Assert.exists(_this.componentOptionsModel);
        Assert_1.Assert.exists(_this.result);
        if (!_this.quickviewShouldBeOpened()) {
            // Bind on multiple "click" or "mouse" events.
            // Create a function that will be executed only once, so as not to log multiple events
            // Once a result link has been opened, and that we log at least one analytics event,
            // it should not matter if the end user open the same link multiple times with different methods.
            // It's still only one "click" event as far as UA is concerned.
            // Also need to handle "longpress" on mobile (the contextual menu), which we assume to be 1 s long.
            ResultLinkCommon_1.bindAnalyticsToLink(element, function () { return _this.logAnalytics(); });
        }
        _this.renderUri(element, result);
        _this.bindEventToOpen();
        return _this;
    }
    ResultLink.prototype.renderUri = function (element, result) {
        if (/^\s*$/.test(this.element.innerHTML)) {
            var title = this.getDisplayedTitle();
            this.element.innerHTML = title;
            var titleAsText = this.getDisplayedTitleAsText();
            Eif (!this.element.hasAttribute('aria-label')) {
                this.element.setAttribute('aria-label', titleAsText);
            }
            if (!this.element.title) {
                this.element.title = titleAsText;
            }
        }
    };
    /**
     * Opens the result in the same window, no matter how the actual component is configured for the end user.
     * @param logAnalytics Specifies whether the method should log an analytics event.
     */
    ResultLink.prototype.openLink = function (logAnalytics) {
        if (logAnalytics === void 0) { logAnalytics = true; }
        if (logAnalytics) {
            this.logAnalytics();
        }
        window.location.href = this.getResultUri();
    };
    /**
     * Opens the result in a new window, no matter how the actual component is configured for the end user.
     * @param logAnalytics Specifies whether the method should log an analytics event.
     */
    ResultLink.prototype.openLinkInNewWindow = function (logAnalytics) {
        if (logAnalytics === void 0) { logAnalytics = true; }
        Eif (logAnalytics) {
            this.logAnalytics();
        }
        window.open(this.getResultUri(), '_blank');
    };
    /**
     * Tries to open the result in Microsoft Outlook if the result has an `outlookformacuri` or `outlookuri` field.
     *
     * Normally, this implies the result should be a link to an email.
     *
     * If the needed fields are not present, this method does nothing.
     * @param logAnalytics Specifies whether the method should log an analytics event.
     */
    ResultLink.prototype.openLinkInOutlook = function (logAnalytics) {
        if (logAnalytics === void 0) { logAnalytics = true; }
        if (this.hasOutlookField()) {
            if (logAnalytics) {
                this.logAnalytics();
            }
            this.openLink();
        }
    };
    /**
     * Opens the link in the same manner the end user would.
     *
     * This essentially simulates a click on the result link.
     *
     * @param logAnalytics Specifies whether the method should log an analytics event.
     */
    ResultLink.prototype.openLinkAsConfigured = function (logAnalytics) {
        Eif (logAnalytics === void 0) { logAnalytics = true; }
        if (this.toExecuteOnOpen) {
            Eif (logAnalytics) {
                this.logAnalytics();
            }
            this.toExecuteOnOpen();
        }
    };
    ResultLink.prototype.bindEventToOpen = function () {
        return (this.bindOnClickIfNotUndefined() ||
            this.bindOpenQuickviewIfNotUndefined() ||
            this.setHrefIfNotAlready() ||
            this.openLinkThatIsNotAnAnchor());
    };
    ResultLink.prototype.getDisplayedTitle = function () {
        if (!this.options.titleTemplate) {
            return this.result.title
                ? HighlightUtils_1.HighlightUtils.highlightString(this.result.title, this.result.titleHighlights, null, 'coveo-highlight')
                : this.escapedClickUri;
        }
        else {
            var newTitle = StringUtils_1.StringUtils.buildStringTemplateFromResult(this.options.titleTemplate, this.result);
            return newTitle
                ? StreamHighlightUtils_1.StreamHighlightUtils.highlightStreamText(newTitle, this.result.termsToHighlight, this.result.phrasesToHighlight)
                : this.escapedClickUri;
        }
    };
    ResultLink.prototype.getDisplayedTitleAsText = function () {
        var container = Dom_1.$$('div');
        container.setHtml(this.getDisplayedTitle());
        return container.text();
    };
    Object.defineProperty(ResultLink.prototype, "escapedClickUri", {
        get: function () {
            return underscore_1.escape(this.result.clickUri);
        },
        enumerable: true,
        configurable: true
    });
    ResultLink.prototype.bindOnClickIfNotUndefined = function () {
        var _this = this;
        if (this.options.onClick != undefined) {
            this.toExecuteOnOpen = function (e) {
                _this.options.onClick.call(_this, e, _this.result);
            };
            new AccessibleButton_1.AccessibleButton()
                .withElement(this.element)
                .withLabel(this.result.title)
                .withSelectAction(function (e) { return _this.toExecuteOnOpen(e); })
                .build();
            return true;
        }
        else {
            return false;
        }
    };
    ResultLink.prototype.bindOpenQuickviewIfNotUndefined = function () {
        var _this = this;
        if (this.quickviewShouldBeOpened()) {
            this.toExecuteOnOpen = function () {
                Dom_1.$$(_this.bindings.resultElement).trigger(ResultListEvents_1.ResultListEvents.openQuickview);
            };
            Dom_1.$$(this.element).on('click', function (e) {
                e.preventDefault();
                _this.toExecuteOnOpen();
            });
            return true;
        }
        else {
            return false;
        }
    };
    ResultLink.prototype.openLinkThatIsNotAnAnchor = function () {
        var _this = this;
        if (!this.elementIsAnAnchor()) {
            this.toExecuteOnOpen = function () {
                Iif (_this.options.alwaysOpenInNewWindow) {
                    if (_this.options.openInOutlook) {
                        _this.openLinkInOutlook();
                    }
                    else {
                        _this.openLinkInNewWindow();
                    }
                }
                else {
                    _this.openLink();
                }
            };
            Dom_1.$$(this.element).on('click', function () {
                _this.toExecuteOnOpen();
            });
            return true;
        }
        return false;
    };
    ResultLink.prototype.setHrefIfNotAlready = function () {
        // Do not erase any value put in href by the template, etc. Allows
        // using custom click urls while still keeping analytics recording
        // and other behavior brought by the component.
        if (this.elementIsAnAnchor() && !Utils_1.Utils.isNonEmptyString(Dom_1.$$(this.element).getAttribute('href'))) {
            Dom_1.$$(this.element).setAttribute('href', this.getResultUri());
            if (this.options.alwaysOpenInNewWindow && !(this.options.openInOutlook && this.hasOutlookField())) {
                Dom_1.$$(this.element).setAttribute('target', '_blank');
            }
            return true;
        }
        else {
            return false;
        }
    };
    ResultLink.prototype.logDocumentOpen = function (href) {
        this.usageAnalytics.logClickEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.documentOpen, {
            documentURL: href,
            documentTitle: this.result.title,
            author: Utils_1.Utils.getFieldValue(this.result, 'author')
        }, this.result, this.root);
    };
    ResultLink.prototype.filterProtocol = function (uri) {
        var isAbsolute = /^(https?|ftp|file|mailto|tel|sip):/i.test(uri);
        var isRelative = /^(\/|\.\/|\.\.\/)/.test(uri);
        return isAbsolute || isRelative ? uri : '';
    };
    ResultLink.prototype.getResultUri = function () {
        if (this.options.hrefTemplate) {
            var uri = StringUtils_1.StringUtils.buildStringTemplateFromResult(this.options.hrefTemplate, this.result);
            return this.filterProtocol(uri);
        }
        if (this.options.field == undefined && this.options.openInOutlook) {
            this.setField();
        }
        if (this.options.field != undefined) {
            return this.filterProtocol(Utils_1.Utils.getFieldValue(this.result, this.options.field));
        }
        return this.filterProtocol(this.result.clickUri);
    };
    ResultLink.prototype.elementIsAnAnchor = function () {
        return this.element.tagName == 'A';
    };
    ResultLink.prototype.setField = function () {
        var os = Utils_1.Utils.exists(this.os) ? this.os : OSUtils_1.OSUtils.get();
        if (os == OSUtils_1.OS_NAME.MACOSX && this.hasOutlookField()) {
            this.options.field = '@outlookformacuri';
        }
        else Eif (os == OSUtils_1.OS_NAME.WINDOWS && this.hasOutlookField()) {
            this.options.field = '@outlookuri';
        }
    };
    ResultLink.prototype.hasOutlookField = function () {
        var os = Utils_1.Utils.exists(this.os) ? this.os : OSUtils_1.OSUtils.get();
        if (os == OSUtils_1.OS_NAME.MACOSX && this.result.raw['outlookformacuri'] != undefined) {
            return true;
        }
        else Eif (os == OSUtils_1.OS_NAME.WINDOWS && this.result.raw['outlookuri'] != undefined) {
            return true;
        }
        return false;
    };
    ResultLink.prototype.isUriThatMustBeOpenedInQuickview = function () {
        return this.escapedClickUri.toLowerCase().indexOf('ldap://') == 0;
    };
    ResultLink.prototype.quickviewShouldBeOpened = function () {
        return (this.options.openQuickview || this.isUriThatMustBeOpenedInQuickview()) && QueryUtils_1.QueryUtils.hasHTMLVersion(this.result);
    };
    ResultLink.ID = 'ResultLink';
    ResultLink.doExport = function () {
        GlobalExports_1.exportGlobally({
            ResultLink: ResultLink
        });
    };
    /**
     * The options for the ResultLink
     * @componentOptions
     */
    ResultLink.options = {
        /**
         * Specifies the field to use to output the component `href` attribute value.
         *
         * **Tip:**
         * > Instead of specifying a value for the `field` option, you can directly add an `href` attribute to the
         * > `ResultLink` HTML element. Then, you can use a custom script to generate the `href` value.
         *
         * **Examples:**
         * - With the following markup, the `ResultLink` outputs its `href` value using the `@uri` field (rather than the
         * default field):
         *
         * ```html
         * <a class="CoveoResultLink" data-field="@uri"></a>
         * ```
         *
         * - In the following result template, the custom `getMyKBUri()` function provides the `href` value:
         *
         * ```html
         * <script id="KnowledgeArticle" type="text/underscore" class="result-template">
         *   <div class='CoveoIcon>'></div>
         *   <a class="CoveoResultLink" href="<%= getMyKBUri(raw) %>"></a>
         *   <div class="CoveoExcerpt"></div>
         * </script>
         * ```
         *
         * See also [`hrefTemplate`]{@link ResultLink.options.hrefTemplate}, which can override this option.
         *
         * By default, the component uses the `@clickUri` field of the item to output the value of its `href` attribute.
         */
        field: ComponentOptions_1.ComponentOptions.buildFieldOption(),
        /**
         * Specifies whether the component should try to open its link in Microsoft Outlook.
         *
         * Setting this option to `true` is normally useful for `ResultLink` instances related to Microsoft Exchange emails.
         *
         * If this option is `true`, clicking the `ResultLink` calls the
         * [`openLinkInOutlook`]{@link ResultLink.openLinkInOutlook} method instead of the
         * [`openLink`]{@link ResultLink.openLink} method.
         *
         * Default value is `false`.
         */
        openInOutlook: ComponentOptions_1.ComponentOptions.buildBooleanOption({ defaultValue: false }),
        /**
         * Specifies whether the component should open its link in the [`Quickview`]{@link Quickview} component rather than
         * loading through the original URL.
         *
         * Default value is `false`.
         */
        openQuickview: ComponentOptions_1.ComponentOptions.buildBooleanOption({ defaultValue: false }),
        /**
         * Specifies whether the component should open its link in a new window instead of opening it in the current
         * context.
         *
         * If this option is `true`, clicking the `ResultLink` calls the
         * [`openLinkInNewWindow`]{@link ResultLink.openLinkInNewWindow} method instead of the
         * [`openLink`]{@link ResultLink.openLink} method.
         *
         * **Note:**
         * > If a search page contains a [`ResultPreferences`]{@link ResultsPreferences} component whose
         * > [`enableOpenInNewWindow`]{@link ResultsPreferences.options.enableOpenInNewWindow} option is `true`, and the end
         * > user checks the <b>Always open results in new window</b> box, `ResultLink` components in this page will always
         * > open their links in a new window when the end user clicks them, no matter what the value of their
         * > `alwaysOpenInNewWindow` option is.
         *
         * Default value is `false`.
         */
        alwaysOpenInNewWindow: ComponentOptions_1.ComponentOptions.buildBooleanOption({ defaultValue: false }),
        /**
         * Specifies a template literal from which to generate the `ResultLink` `href` attribute value (see
         * [Template literals](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Template_literals)).
         *
         * This option overrides the [`field`]{@link ResultLink.options.field} option value.
         *
         * The template literal can reference any number of fields from the parent result. It can also reference global
         * scope properties.
         *
         * **Examples:**
         *
         * - The following markup generates an `href` value such as `http://uri.com?id=itemTitle`:
         *
         * ```html
         * <a class='CoveoResultLink' data-href-template='${clickUri}?id=${raw.title}'></a>
         * ```
         *
         * - The following markup generates an `href` value such as `localhost/fooBar`:
         *
         * ```html
         * <a class='CoveoResultLink' data-href-template='${window.location.hostname}/{Foo.Bar}'></a>
         * ```
         *
         * Default value is `undefined`.
         */
        hrefTemplate: ComponentOptions_1.ComponentOptions.buildStringOption(),
        /**
         * Specifies a template literal from which to generate the `ResultLink` display title (see
         * [Template literals](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Template_literals)).
         *
         * This option overrides the default `ResultLink` display title behavior.
         *
         * The template literal can reference any number of fields from the parent result. However, if the template literal
         * references a key whose value is undefined in the parent result fields, the `ResultLink` title displays the
         * name of this key instead.
         *
         * This option is ignored if the `ResultLink` innerHTML contains any value.
         *
         * **Examples:**
         *
         * - The following markup generates a `ResultLink` display title such as `Case number: 123456` if both the
         * `raw.objecttype` and `raw.objectnumber` keys are defined in the parent result fields:
         *
         * ```html
         * <a class="CoveoResultLink" data-title-template="${raw.objecttype} number: ${raw.objectnumber}"></a>
         * ```
         *
         * - The following markup generates `${myField}` as a `ResultLink` display title if the `myField` key is undefined
         * in the parent result fields:
         *
         * ```html
         * <a class="CoveoResultLink" data-title-template="${myField}"></a>
         * ```
         *
         * - The following markup generates `Foobar` as a `ResultLink` display title, because the `ResultLink` innterHTML is
         * not empty:
         *
         * ```html
         * <a class="CoveoResultLink" data-title-template="${will} ${be} ${ignored}">Foobar</a>
         * ```
         *
         * Default value is `undefined`.
         *
         * @availablesince [January 2017 Release (v1.1865.9)](https://docs.coveo.com/en/396/#january-2017-release-v118659)
         */
        titleTemplate: ComponentOptions_1.ComponentOptions.buildStringOption(),
        /**
         * Specifies an event handler function to execute when the user clicks the `ResultLink` component.
         *
         * The handler function takes a JavaScript [`Event`](https://developer.mozilla.org/en/docs/Web/API/Event) object and
         * an [`IQueryResult`]{@link IQueryResult} as its parameters.
         *
         * Overriding the default behavior of the `onClick` event can allow you to execute specific code instead.
         *
         * **Note:**
         * > You cannot set this option directly in the component markup as an HTML attribute. You must either set it in the
         * > [`init`]{@link init} call of your search interface (see
         * > [Passing Component Options in the init Call](https://docs.coveo.com/en/346/#passing-component-options-in-the-init-call)),
         * > or before the `init` call, using the `options` top-level function (see
         * > [Passing Component Options Before the init Call](https://docs.coveo.com/en/346/#passing-component-options-before-the-init-call)).
         *
         * **Example:**
         * ```javascript
         * // You can set the option in the 'init' call:
         * Coveo.init(document.querySelector("#search"), {
         *   ResultLink : {
         *     onClick : function(e, result) {
         *       e.preventDefault();
         *       // Custom code to execute with the item URI and title.
         *       openUriInASpecialTab(result.clickUri, result.title);
         *     }
         *   }
         * });
         *
         * // Or before the 'init' call, using the 'options' top-level function:
         * // Coveo.options(document.querySelector('#search'), {
         * //   ResultLink : {
         * //     onClick : function(e, result) {
         * //       e.preventDefault();
         * //       // Custom code to execute with the item URI and title.
         * //       openUriInASpecialTab(result.clickUri, result.title);
         * //     }
         * //   }
         * // });
         * ```
         */
        onClick: ComponentOptions_1.ComponentOptions.buildCustomOption(function () {
            return null;
        }),
        /**
         * Specify this option to log additional analytics when this result link is pressed.
         *
         * **Example:**
         * ```javascript
         * const resultLink = new Coveo.ResultLink(
         *   linkElement,
         *   {
         *     logAnalytics: (href) => Coveo.logCustomEvent(
         *         Coveo.analyticsActionCauseList.openSmartSnippetSource,
         *         {
         *           searchQueryUid: searchInterface.queryController.lastSearchUid,
         *           documentTitle: result.title,
         *           author: Utils.getFieldValue(result, 'author'),
         *           documentURL: href
         *         },
         *         element
         *       )
         *   },
         *   searchInterface.getBindings(),
         *   result
         * )
         * ```
         */
        logAnalytics: ComponentOptions_1.ComponentOptions.buildCustomOption(function () { return null; })
    };
    return ResultLink;
}(Component_1.Component));
exports.ResultLink = ResultLink;
Initialization_1.Initialization.registerAutoCreateComponent(ResultLink);
 
 
/***/ }),
/* 57 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["b"] = initRange;
/* harmony export (immutable) */ __webpack_exports__["a"] = initInterpolator;
function initRange(domain, range) {
  switch (arguments.length) {
    case 0: break;
    case 1: this.range(domain); break;
    default: this.range(range).domain(domain); break;
  }
  return this;
}
 
function initInterpolator(domain, interpolator) {
  switch (arguments.length) {
    case 0: break;
    case 1: this.interpolator(domain); break;
    default: this.interpolator(interpolator).domain(domain); break;
  }
  return this;
}
 
 
/***/ }),
/* 58 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = restArguments;
// Some functions take a variable number of arguments, or a few expected
// arguments at the beginning and then a variable number of values to operate
// on. This helper accumulates all remaining arguments past the function’s
// argument length (or an explicit `startIndex`), into an array that becomes
// the last argument. Similar to ES6’s "rest parameter".
function restArguments(func, startIndex) {
  startIndex = startIndex == null ? func.length - 1 : +startIndex;
  return function() {
    var length = Math.max(arguments.length - startIndex, 0),
        rest = Array(length),
        index = 0;
    for (; index < length; index++) {
      rest[index] = arguments[index + startIndex];
    }
    switch (startIndex) {
      case 0: return func.call(this, rest);
      case 1: return func.call(this, arguments[0], rest);
      case 2: return func.call(this, arguments[0], arguments[1], rest);
    }
    var args = Array(startIndex + 1);
    for (index = 0; index < startIndex; index++) {
      args[index] = arguments[index];
    }
    args[startIndex] = rest;
    return func.apply(this, args);
  };
}
 
 
/***/ }),
/* 59 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = _;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__setup_js__ = __webpack_require__(30);
 
 
// If Underscore is called as a function, it returns a wrapped object that can
// be used OO-style. This wrapper holds altered versions of all functions added
// through `_.mixin`. Wrapped objects may be chained.
function _(obj) {
  Iif (obj instanceof _) return obj;
  if (!(this instanceof _)) return new _(obj);
  this._wrapped = obj;
}
 
_.VERSION = __WEBPACK_IMPORTED_MODULE_0__setup_js__["e" /* VERSION */];
 
// Extracts the result from a wrapped and chained object.
_.prototype.value = function() {
  return this._wrapped;
};
 
// Provide unwrapping proxies for some methods used in engine operations
// such as arithmetic and JSON stringification.
_.prototype.valueOf = _.prototype.toJSON = _.prototype.value;
 
_.prototype.toString = function() {
  return String(this._wrapped);
};
 
 
/***/ }),
/* 60 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createSizePropertyCheck_js__ = __webpack_require__(424);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__getLength_js__ = __webpack_require__(65);
 
 
 
// Internal helper for collection methods to determine whether a collection
// should be iterated as an array or as an object.
// Related: https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength
// Avoids a very nasty iOS 8 JIT bug on ARM-64. #2094
/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__createSizePropertyCheck_js__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__getLength_js__["a" /* default */]));
 
 
/***/ }),
/* 61 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __assign = (this && this.__assign) || Object.assign || function(t) {
    for (var s, i = 1, n = arguments.length; i < n; i++) {
        s = arguments[i];
        for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
            t[p] = s[p];
    }
    return t;
};
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    Iif (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) Eif (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        Iif (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            Iif (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
            Iif (y = 0, t) op = [0, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    Iif (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    Iif (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
Object.defineProperty(exports, "__esModule", { value: true });
var EndpointCaller_1 = __webpack_require__(165);
var Logger_1 = __webpack_require__(18);
var Assert_1 = __webpack_require__(12);
var Version_1 = __webpack_require__(292);
var AjaxError_1 = __webpack_require__(465);
var MissingAuthenticationError_1 = __webpack_require__(466);
var QueryUtils_1 = __webpack_require__(37);
var QueryError_1 = __webpack_require__(213);
var Utils_1 = __webpack_require__(5);
var _ = __webpack_require__(1);
var HistoryStore_1 = __webpack_require__(84);
var TimeSpanUtils_1 = __webpack_require__(166);
var UrlUtils_1 = __webpack_require__(108);
var AccessToken_1 = __webpack_require__(167);
var BackOffRequest_1 = __webpack_require__(470);
var Plan_1 = __webpack_require__(214);
var underscore_1 = __webpack_require__(1);
var AnalyticsInformation_1 = __webpack_require__(85);
var DefaultSearchEndpointOptions = /** @class */ (function () {
    function DefaultSearchEndpointOptions() {
        this.version = 'v2';
        this.queryStringArguments = {};
        this.anonymous = false;
        this.isGuestUser = false;
    }
    return DefaultSearchEndpointOptions;
}());
exports.DefaultSearchEndpointOptions = DefaultSearchEndpointOptions;
/**
 * The `SearchEndpoint` class allows the framework to perform HTTP requests against the Search API (e.g., searching, getting query suggestions, getting the HTML preview of an item, etc.).
 *
 * **Note:**
 *
 * When writing custom code that interacts with the Search API, be aware that executing queries directly through an instance of this class will *not* trigger any [query events](https://docs.coveo.com/en/417/#query-events).
 *
 * In some cases, this may be what you want. However, if you *do* want query events to be triggered (e.g., to ensure that standard components update themselves as expected), use the [`queryController`]{@link QueryController} instance instead.
 *
 * @externaldocs [JavaScript Search Framework Endpoint](https://docs.coveo.com/en/331/)
 */
var SearchEndpoint = /** @class */ (function () {
    /**
     * Creates a new `SearchEndpoint` instance.
     * Uses a set of adequate default options, and merges these with the `options` parameter.
     * Also creates an [`EndpointCaller`]{@link EndpointCaller} instance and uses it to communicate with the endpoint
     * internally.
     * @param options The custom options to apply to the new `SearchEndpoint`.
     */
    function SearchEndpoint(options) {
        var _this = this;
        this.options = options;
        Assert_1.Assert.exists(options);
        Assert_1.Assert.exists(options.restUri);
        // For backward compatibility, we set anonymous to true when an access token
        // is specified on a page loaded through the filesystem. This causes withCredentials
        // to NOT be set, allowing those pages to work with non Windows/Basic/Cookie
        // authentication. If anonymous is explicitly set to false, we'll use withCredentials.
        var defaultOptions = new DefaultSearchEndpointOptions();
        defaultOptions.anonymous = window.location.href.indexOf('file://') == 0 && Utils_1.Utils.isNonEmptyString(options.accessToken);
        this.options = _.extend({}, defaultOptions, options);
        this.accessToken = new AccessToken_1.AccessToken(this.options.accessToken, this.options.renewAccessToken);
        this.accessToken.subscribeToRenewal(function () { return _this.createEndpointCaller(); });
        // Forward any debug=1 query argument to the REST API to ease debugging
        Iif (SearchEndpoint.isDebugArgumentPresent()) {
            this.options.queryStringArguments['debug'] = 1;
        }
        this.onUnload = function () {
            _this.handleUnload();
        };
        window.addEventListener('beforeunload', this.onUnload);
        this.logger = new Logger_1.Logger(this);
        this.createEndpointCaller();
    }
    /**
     * Configures a demo search endpoint on a Coveo Cloud V1 organization whose index contains various types of non-secured items.
     *
     * **Note:** This method mainly exists for demo and testing purposes.
     *
     * @param otherOptions Additional options to apply for this endpoint.
     */
    SearchEndpoint.configureSampleEndpoint = function (otherOptions) {
        Iif (SearchEndpoint.isUseLocalArgumentPresent()) {
            // This is a handy flag to quickly test a local search API and alerts
            SearchEndpoint.endpoints['default'] = new SearchEndpoint(_.extend({
                restUri: 'http://localhost:8100/rest/search',
                searchAlertsUri: 'http://localhost:8088/rest/search/alerts/'
            }, otherOptions));
        }
        else {
            // This OAuth token points to the organization used for samples.
            // It contains a set of harmless content sources.
            SearchEndpoint.endpoints['default'] = new SearchEndpoint(_.extend({
                restUri: 'https://cloudplatform.coveo.com/rest/search',
                accessToken: '52d806a2-0f64-4390-a3f2-e0f41a4a73ec'
            }, otherOptions));
        }
    };
    /**
     * Configures a demo search endpoint on a Coveo Cloud V2 organization whose index contains various types of non-secured items.
     *
     * **Note:** This method mainly exists for demo and testing purposes.
     *
     * @param otherOptions Additional options to apply for this endpoint.
     */
    SearchEndpoint.configureSampleEndpointV2 = function (otherOptions) {
        SearchEndpoint.endpoints['default'] = new SearchEndpoint(_.extend({
            restUri: 'https://platform.cloud.coveo.com/rest/search',
            accessToken: 'xx564559b1-0045-48e1-953c-3addd1ee4457',
            queryStringArguments: {
                organizationId: 'searchuisamples',
                viewAllContent: 1
            }
        }, otherOptions));
    };
    /**
     * Configures a search endpoint on a Coveo Cloud V1 index.
     * @param organization The organization ID of your Coveo Cloud index.
     * @param token The token to use to execute query. If not specified, you will likely need to login when querying.
     * @param uri The URI of the Coveo Cloud REST Search API. By default, this points to the production environment.
     * @param otherOptions A set of additional options to use when configuring this endpoint.
     */
    SearchEndpoint.configureCloudEndpoint = function (organization, token, uri, otherOptions) {
        Eif (uri === void 0) { uri = 'https://cloudplatform.coveo.com/rest/search'; }
        var options = {
            restUri: uri,
            accessToken: token,
            queryStringArguments: { organizationId: organization }
        };
        var merged = SearchEndpoint.mergeConfigOptions(options, otherOptions);
        SearchEndpoint.endpoints['default'] = new SearchEndpoint(SearchEndpoint.removeUndefinedConfigOption(merged));
    };
    /**
     * [Configures a new search endpoint](https://docs.coveo.com/331/#configuring-a-new-search-endpoint) on a Coveo Cloud V2 organization.
     * @param organization The unique identifier of the target Coveo Cloud V2 organization (e.g., `mycoveocloudv2organizationg8tp8wu3`).
     * @param token The access token to authenticate Search API requests with (i.e., an [API key](https://docs.coveo.com/105/) or a [search token](https://docs.coveo.com/56/)).
     *
     * **Note:** This token will also authenticate Usage Analytics Write API requests if the search interface initializes an [`Analytics`]{@link Analytics} component whose [`token`]{@link Analytics.options.token} option is unspecified.
     * @param uri The base URI of the Search API.
     *
     * **Allowed values:**
     *
     * - `https://platform.cloud.coveo.com/rest/search` (for organizations in the standard Coveo Cloud V2 environment)
     * - `https://platform-eu.cloud.coveo.com/rest/search` (for organizations with European [data residency](https://docs.coveo.com/en/2976/#data-residency-configuration))
     * - `https://platform-au.cloud.coveo.com/rest/search` (for organizations with Australian data residency)
     * - `https://platformhipaa.cloud.coveo.com/rest/search` (for [HIPAA](https://docs.coveo.com/1853/) organizations)
     *
     * **Default:** `https://platform.cloud.coveo.com/rest/search`
     * @param otherOptions Additional options to apply for this endpoint (e.g., a [`renewAccessToken`]{@link ISearchEndpointOptions.renewAccessToken} function).
     */
    SearchEndpoint.configureCloudV2Endpoint = function (organization, token, uri, otherOptions) {
        if (uri === void 0) { uri = 'https://platform.cloud.coveo.com/rest/search'; }
        return SearchEndpoint.configureCloudEndpoint(organization, token, uri, otherOptions);
    };
    /**
     * Configures a search endpoint on a Coveo on-premise index.
     * @param uri The URI of your Coveo Search API endpoint (e.g., `http://myserver:8080/rest/search`)
     * @param token The token to use to execute query. If not specified, you will likely need to login when querying
     * (unless your Coveo Search API endpoint is configured using advanced auth options, such as Windows auth or claims).
     * @param otherOptions A set of additional options to use when configuring this endpoint.
     */
    SearchEndpoint.configureOnPremiseEndpoint = function (uri, token, otherOptions) {
        var merged = SearchEndpoint.mergeConfigOptions({
            restUri: uri,
            accessToken: token
        }, otherOptions);
        SearchEndpoint.endpoints['default'] = new SearchEndpoint(SearchEndpoint.removeUndefinedConfigOption(merged));
    };
    Object.defineProperty(SearchEndpoint, "defaultEndpoint", {
        get: function () {
            return this.endpoints['default'] || _.find(SearchEndpoint.endpoints, function (endpoint) { return endpoint != null; });
        },
        enumerable: true,
        configurable: true
    });
    SearchEndpoint.removeUndefinedConfigOption = function (config) {
        _.each(_.keys(config), function (key) {
            if (config[key] == undefined) {
                delete config[key];
            }
        });
        return config;
    };
    SearchEndpoint.mergeConfigOptions = function (first, second) {
        first = SearchEndpoint.removeUndefinedConfigOption(first);
        second = SearchEndpoint.removeUndefinedConfigOption(second);
        return _.extend({}, first, second);
    };
    SearchEndpoint.prototype.reset = function () {
        this.createEndpointCaller();
    };
    /**
     * Sets a function which allows external code to modify all endpoint call parameters before the browser sends them.
     *
     * **Note:**
     * > This is useful in very specific scenarios where the network infrastructure requires special request headers to be
     * > added or removed, for example.
     * @param requestModifier The function.
     */
    SearchEndpoint.prototype.setRequestModifier = function (requestModifier) {
        this.caller.options.requestModifier = requestModifier;
    };
    /**
     * Gets the base URI of the Search API endpoint.
     * @returns {string} The base URI of the Search API endpoint.
     */
    SearchEndpoint.prototype.getBaseUri = function () {
        return this.buildBaseUri('');
    };
    /**
     * Gets the base URI of the search alerts endpoint.
     * @returns {string} The base URI of the search alerts endpoint.
     */
    SearchEndpoint.prototype.getBaseAlertsUri = function () {
        return this.buildSearchAlertsUri('');
    };
    /**
     * Gets the URI that can be used to authenticate against the given provider.
     * @param provider The provider name.
     * @param returnUri The URI to return to after the authentication is completed.
     * @param message The authentication message.
     * @param callOptions Additional set of options to use for this call.
     * @param callParams Options injected by the applied decorators.
     * @returns {string} The authentication provider URI.
     */
    SearchEndpoint.prototype.getAuthenticationProviderUri = function (provider, returnUri, message, callOptions, callParams) {
        return UrlUtils_1.UrlUtils.normalizeAsString({
            paths: [callParams.url, provider],
            queryAsString: callParams.queryString,
            query: __assign({ redirectUri: returnUri, message: message }, this.buildBaseQueryString(callOptions))
        });
    };
    /**
     * Exchanges a temporary handshake token to either get an initial access token
     * or extend the privileges of an existing access token.
     *
     * @param token - the temporary token.
     * @returns {string} The access token.
     */
    SearchEndpoint.prototype.exchangeHandshakeToken = function (options, callOptions, callParams) {
        return __awaiter(this, void 0, void 0, function () {
            var call, data;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        call = this.buildCompleteCall(options, callOptions, callParams);
                        return [4 /*yield*/, this.performOneCall(call.params, call.options)];
                    case 1:
                        data = _a.sent();
                        if (!data.token) {
                            throw new Error('Failed to exchange handshake token.');
                        }
                        return [2 /*return*/, data.token];
                }
            });
        });
    };
    /**
     * Indicates whether the search endpoint is using JSONP internally to communicate with the Search API.
     * @returns {boolean} `true` in the search enpoint is using JSONP; `false` otherwise.
     */
    SearchEndpoint.prototype.isJsonp = function () {
        return this.caller.useJsonp;
    };
    SearchEndpoint.prototype.buildCompleteCall = function (request, callOptions, callParams) {
        Assert_1.Assert.exists(request);
        callParams = __assign({}, callParams, { requestData: __assign({}, callParams.requestData, _.omit(request, function (queryParam) { return Utils_1.Utils.isNullOrUndefined(queryParam); })) });
        return { options: callOptions, params: callParams };
    };
    /**
     * Performs a search on the index and returns a Promise of [`IQueryResults`]{@link IQueryResults}.
     *
     * This method slightly modifies the query results by adding additional information to each result (id, state object,
     * etc.).
     * @param query The query to execute. Typically, the query object is built using a
     * [`QueryBuilder`]{@link QueryBuilder}.
     * @param callOptions An additional set of options to use for this call.
     * @param callParams The options injected by the applied decorators.
     * @returns {Promise<IQueryResults>} A Promise of query results.
     */
    SearchEndpoint.prototype.search = function (query, callOptions, callParams) {
        var _this = this;
        var call = this.buildCompleteCall(query, callOptions, callParams);
        this.logger.info('Performing REST query', query);
        var start = new Date();
        return this.performOneCall(call.params, call.options).then(function (results) {
            _this.logger.info('REST query successful', results, query);
            // Version check
            // If the SearchAPI doesn't give us any apiVersion info, we assume version 1 (before apiVersion was implemented)
            Eif (results.apiVersion == null) {
                results.apiVersion = 1;
            }
            Eif (results.apiVersion < Version_1.version.supportedApiVersion) {
                _this.logger.error('Please update your REST Search API');
            }
            // Transform the duration compared to what the search API returns
            // We want to have the "duration" to be the time as seen by the browser
            results.searchAPIDuration = results.duration;
            results.duration = TimeSpanUtils_1.TimeSpan.fromDates(start, new Date()).getMilliseconds();
            // If the server specified no search ID generated one using the client-side
            // GUID generator. We prefer server generated guids to allow tracking a query
            // all the way from the analytics to the logs.
            Iif (Utils_1.Utils.isNullOrEmptyString(results.searchUid)) {
                results.searchUid = QueryUtils_1.QueryUtils.createGuid();
            }
            QueryUtils_1.QueryUtils.setIndexAndUidOnQueryResults(query, results, results.searchUid, results.pipeline, results.splitTestRun);
            QueryUtils_1.QueryUtils.setTermsToHighlightOnQueryResults(query, results);
            return results;
        });
    };
    /**
     * Performs a search on the index and returns a Promise of `ArrayBuffer`.
     *
     * @param query The query to execute. Typically, the query object is built using a
     * [`QueryBuilder`]{@link QueryBuilder}.
     * @param callOptions An additional set of options to use for this call.
     * @param callParams The options injected by the applied decorators.
     * @returns {Promise<ArrayBuffer>} A Promise of query results.
     */
    SearchEndpoint.prototype.fetchBinary = function (query, callOptions, callParams) {
        return __awaiter(this, void 0, void 0, function () {
            var call;
            return __generator(this, function (_a) {
                call = this.buildCompleteCall(query, callOptions, callParams);
                this.logger.info('Performing REST query', query);
                return [2 /*return*/, this.performOneCall(call.params, call.options)];
            });
        });
    };
    /**
     * Gets the plan of execution of a search request, without performing it.
     *
     * @param query The query to execute. Typically, the query object is built using a
     * [`QueryBuilder`]{@link QueryBuilder}.
     * @param callOptions An additional set of options to use for this call.
     * @param callParams The options injected by the applied decorators.
     * @returns {Promise<ExecutionPlan>} A Promise of plan results.
     */
    SearchEndpoint.prototype.plan = function (query, callOptions, callParams) {
        return __awaiter(this, void 0, void 0, function () {
            var call, planResponse;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        call = this.buildCompleteCall(query, callOptions, callParams);
                        this.logger.info('Performing REST query PLAN', query);
                        return [4 /*yield*/, this.performOneCall(call.params, call.options)];
                    case 1:
                        planResponse = _a.sent();
                        this.logger.info('REST query successful', planResponse, query);
                        return [2 /*return*/, new Plan_1.ExecutionPlan(planResponse)];
                }
            });
        });
    };
    /**
     * @deprecated getExportToExcelLink does not factor in all query parameters (e.g. dynamic facets) due to GET request url length limitations.
     * Please use `fetchBinary` instead to ensure all query parameters are used.
     *
     * Gets a link / URI to download a query result set to the XLSX format.
     *
     * **Note:**
     * > This method does not automatically download the query result set, but rather provides an URI from which to
     * > download it.
     * @param query The query for which to get the XLSX result set.
     * @param numberOfResults The number of results to download.
     * @param callOptions An additional set of options to use for this call.
     * @param callParams The options injected by the applied decorators.
     * @returns {string} The download URI.
     */
    SearchEndpoint.prototype.getExportToExcelLink = function (query, numberOfResults, callOptions, callParams) {
        return UrlUtils_1.UrlUtils.normalizeAsString({
            paths: callParams.url,
            queryAsString: callParams.queryString,
            query: __assign({ numberOfResults: numberOfResults ? numberOfResults.toString() : null, format: 'xlsx' }, this.buildQueryAsQueryString(null, query), this.buildBaseQueryString(callOptions))
        });
    };
    /**
     * Gets the raw datastream for an item. This is typically used to get a thumbnail for an item.
     *
     * Returns an array buffer.
     *
     * **Example:**
     * ```
     * let rawBinary = String.fromCharCode.apply(null, new Uint8Array(response));
     * img.setAttribute('src', 'data:image/png;base64,' + btoa(rawBinary));
     * ```
     * @param documentUniqueId Typically, the {@link IQueryResult.uniqueId} on each result.
     * @param dataStreamType Normally, `$Thumbnail`.
     * @param callOptions An additional set of options to use for this call.
     * @param callParams The options injected by the applied decorators.
     * @returns {Promise<TResult>|Promise<U>}
     */
    SearchEndpoint.prototype.getRawDataStream = function (documentUniqueId, dataStreamType, callOptions, callParams) {
        var _this = this;
        Assert_1.Assert.exists(documentUniqueId);
        callParams = UrlUtils_1.UrlUtils.merge(callParams, {
            paths: callParams.url,
            query: __assign({ dataStream: dataStreamType }, this.buildViewAsHtmlQueryString(documentUniqueId, callOptions))
        });
        this.logger.info('Performing REST query for datastream ' + dataStreamType + ' on item uniqueID ' + documentUniqueId);
        return this.performOneCall(callParams, callOptions).then(function (results) {
            _this.logger.info('REST query successful', results, documentUniqueId);
            return results;
        });
    };
    /**
     * Gets an URL from which it is possible to see the datastream for an item. This is typically used to get a
     * thumbnail for an item.
     * @param documentUniqueID Typically, the {@link IQueryResult.uniqueId} on each result.
     * @param dataStreamType Normally, `$Thumbnail`.
     * @param callOptions An additional set of options to use for this call.
     * @param callParams The options injected by the applied decorators.
     * @returns {string} The datastream URL.
     */
    SearchEndpoint.prototype.getViewAsDatastreamUri = function (documentUniqueID, dataStreamType, callOptions, callParams) {
        Eif (callOptions === void 0) { callOptions = {}; }
        return UrlUtils_1.UrlUtils.normalizeAsString({
            paths: callParams.url,
            queryAsString: callParams.queryString,
            query: __assign({ dataStream: dataStreamType }, this.buildViewAsHtmlQueryString(documentUniqueID, callOptions), this.buildQueryAsQueryString(callOptions.query, callOptions.queryObject), this.buildBaseQueryString(callOptions))
        });
    };
    /**
     * Gets a single item, using its `uniqueId`.
     * @param documentUniqueID Typically, the {@link IQueryResult.uniqueId} on each result.
     * @param callOptions An additional set of options to use for this call.
     * @param callParams The options injected by the applied decorators.
     * @returns {Promise<IQueryResult>} A Promise of the item.
     */
    SearchEndpoint.prototype.getDocument = function (documentUniqueID, callOptions, callParams) {
        var _this = this;
        callParams = UrlUtils_1.UrlUtils.merge(callParams, {
            paths: callParams.url,
            queryAsString: callParams.queryString,
            query: __assign({}, this.buildViewAsHtmlQueryString(documentUniqueID, callOptions))
        });
        this.logger.info('Performing REST query to retrieve document', documentUniqueID);
        return this.performOneCall(callParams, callOptions).then(function (result) {
            _this.logger.info('REST query successful', result, documentUniqueID);
            return result;
        });
    };
    /**
     * Gets the content of a single item, as text (think: quickview).
     * @param documentUniqueID Typically, the {@link IQueryResult.uniqueId} on each result.
     * @param callOptions An additional set of options to use for this call.
     * @param callParams The options injected by the applied decorators.
     * @returns {Promise<string>} A Promise of the item content.
     */
    SearchEndpoint.prototype.getDocumentText = function (documentUniqueID, callOptions, callParams) {
        var _this = this;
        callParams = UrlUtils_1.UrlUtils.merge(callParams, {
            paths: callParams.url,
            queryAsString: callParams.queryString,
            query: __assign({}, this.buildViewAsHtmlQueryString(documentUniqueID, callOptions))
        });
        this.logger.info('Performing REST query to retrieve "TEXT" version of document', documentUniqueID);
        return this.performOneCall(callParams, callOptions).then(function (data) {
            _this.logger.info('REST query successful', data, documentUniqueID);
            return data.content;
        });
    };
    /**
     * Gets the content for a single item, as an HTMLDocument (think: quickview).
     * @param documentUniqueID Typically, the {@link IQueryResult.uniqueId} on each result.
     * @param callOptions An additional set of options to use for this call.
     * @param callParams The options injected by the applied decorators.
     * @returns {Promise<HTMLDocument>} A Promise of the item content.
     */
    SearchEndpoint.prototype.getDocumentHtml = function (documentUniqueID, callOptions, callParams) {
        var _this = this;
        callOptions = __assign({}, callOptions);
        callParams = UrlUtils_1.UrlUtils.merge(__assign({}, callParams, { requestData: callOptions.queryObject || { q: callOptions.query } }), {
            paths: callParams.url,
            queryAsString: callParams.queryString,
            query: __assign({}, this.buildViewAsHtmlQueryString(documentUniqueID, callOptions))
        });
        this.logger.info('Performing REST query to retrieve "HTML" version of document', documentUniqueID);
        return this.performOneCall(callParams, callOptions).then(function (result) {
            _this.logger.info('REST query successful', result, documentUniqueID);
            return result;
        });
    };
    /**
     * Gets an URL from which it is possible to see a single item content, as HTML (think: quickview).
     * @param documentUniqueID Typically, the {@link IQueryResult.uniqueId} on each result.
     * @param callOptions An additional set of options to use for this call.
     * @param callParams The options injected by the applied decorators.
     * @returns {string} The URL.
     */
    SearchEndpoint.prototype.getViewAsHtmlUri = function (documentUniqueID, callOptions, callParams) {
        return UrlUtils_1.UrlUtils.normalizeAsString({
            paths: callParams.url,
            queryAsString: callParams.queryString,
            query: __assign({}, this.buildViewAsHtmlQueryString(documentUniqueID, callOptions), this.buildBaseQueryString(callOptions))
        });
    };
    /**
     * Lists the possible field values for a request.
     * @param request The request for which to list the possible field values.
     * @param callOptions An additional set of options to use for this call.
     * @param callParams The options injected by the applied decorators.
     * @returns {Promise<TResult>|Promise<U>} A Promise of the field values.
     */
    SearchEndpoint.prototype.listFieldValues = function (request, callOptions, callParams) {
        var _this = this;
        Assert_1.Assert.exists(request);
        callParams = __assign({}, callParams, { requestData: __assign({}, callParams.requestData, request) });
        this.logger.info('Listing field values', request);
        return this.performOneCall(callParams, callOptions).then(function (data) {
            _this.logger.info('REST list field values successful', data.values, request);
            return data.values;
        });
    };
    /**
     * Lists the possible field values for a request.
     * @param request The request for which to list the possible field values.
     * @param callOptions An additional set of options to use for this call.
     * @param callParams The options injected by the applied decorators.
     * @returns {Promise<TResult>|Promise<U>} A Promise of the field values.
     */
    SearchEndpoint.prototype.listFieldValuesBatch = function (request, callOptions, callParams) {
        var _this = this;
        Assert_1.Assert.exists(request);
        callParams = __assign({}, callParams, { requestData: __assign({}, callParams.requestData, request) });
        this.logger.info('Listing field batch values', request);
        return this.performOneCall(callParams, callOptions).then(function (data) {
            _this.logger.info('REST list field batch values successful', data.batch, request);
            return data.batch;
        });
    };
    /**
     * Lists all fields for the index, and returns an array of their descriptions.
     * @param callOptions An additional set of options to use for this call.
     * @param callParams The options injected by the applied decorators.
     * @returns {Promise<TResult>|Promise<U>} A Promise of the index fields and descriptions.
     */
    SearchEndpoint.prototype.listFields = function (callOptions, callParams) {
        var _this = this;
        this.logger.info('Listing fields');
        return this.performOneCall(callParams, callOptions).then(function (data) {
            _this.logger.info('REST list fields successful', data.fields);
            return data.fields;
        });
    };
    /**
     * Lists all available query extensions for the search endpoint.
     * @param callOptions An additional set of options to use for this call.
     * @param callParams The options injected by the applied decorators.
     * @returns {Promise<IExtension[]>} A Promise of the extensions.
     */
    SearchEndpoint.prototype.extensions = function (callOptions, callParams) {
        var _this = this;
        this.logger.info('Performing REST query to list extensions');
        return this.performOneCall(callParams, callOptions).then(function (extensions) {
            _this.logger.info('REST query successful', extensions);
            return extensions;
        });
    };
    /**
     * **Note:**
     *
     * > The Coveo Cloud V2 platform does not support collaborative rating. Therefore, this method is obsolete in Coveo Cloud V2.
     *
     * Rates a single item in the index (granted that collaborative rating is enabled on your index)
     * @param ratingRequest The item id, and the rating to add.
     * @param callOptions An additional set of options to use for this call.
     * @param callParams The options injected by the applied decorators.
     * @returns {Promise<boolean>|Promise<T>}
     */
    SearchEndpoint.prototype.rateDocument = function (ratingRequest, callOptions, callParams) {
        var _this = this;
        this.logger.info('Performing REST query to rate a document', ratingRequest);
        callParams = __assign({}, callParams, { requestData: __assign({}, callParams.requestData, ratingRequest) });
        return this.performOneCall(callParams, callOptions).then(function () {
            _this.logger.info('REST query successful', ratingRequest);
            return true;
        });
    };
    /**
     * Tags a single item.
     * @param taggingRequest The item id, and the tag action to perform.
     * @param callOptions An additional set of options to use for this call.
     * @param callParams The options injected by the applied decorators.
     * @returns {Promise<boolean>|Promise<T>}
     */
    SearchEndpoint.prototype.tagDocument = function (taggingRequest, callOptions, callParams) {
        var _this = this;
        this.logger.info('Performing REST query to tag an item', taggingRequest);
        callParams = __assign({}, callParams, { requestData: __assign({}, callParams.requestData, taggingRequest) });
        return this.performOneCall(callParams, callOptions).then(function () {
            _this.logger.info('REST query successful', taggingRequest);
            return true;
        });
    };
    /**
     * Gets a list of query suggestions for a request.
     * @param request The query, and the number of suggestions to return.
     * @param callOptions An additional set of options to use for this call.
     * @param callParams The options injected by the applied decorators.
     * @returns {Promise<IQuerySuggestResponse>} A Promise of query suggestions.
     */
    SearchEndpoint.prototype.getQuerySuggest = function (request, callOptions, callParams) {
        var _this = this;
        var call = this.buildCompleteCall(request, callOptions, callParams);
        this.logger.info('Performing REST query to get query suggest', request);
        return this.performOneCall(call.params, call.options).then(function (response) {
            _this.logger.info('REST query successful', response);
            return response;
        });
    };
    // This is a non documented method to ensure backward compatibility for the old query suggest call.
    // It simply calls the "real" official and documented method.
    SearchEndpoint.prototype.getRevealQuerySuggest = function (request, callOptions, callParams) {
        return this.getQuerySuggest(request, callOptions, callParams);
    };
    /**
     * Searches through the values of a facet.
     * @param request The request for which to search through the values of a facet.
     * @param callOptions An additional set of options to use for this call.
     * @param callParams The options injected by the applied decorators.
     * @returns {Promise<IFacetSearchResponse>} A Promise of facet search results.
     */
    SearchEndpoint.prototype.facetSearch = function (request, callOptions, callParams) {
        return __awaiter(this, void 0, void 0, function () {
            var call, response;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        call = this.buildCompleteCall(request, callOptions, callParams);
                        this.logger.info('Performing REST query to get facet search results', request);
                        return [4 /*yield*/, this.performOneCall(call.params, call.options)];
                    case 1:
                        response = _a.sent();
                        this.logger.info('REST query successful', response);
                        return [2 /*return*/, response];
                }
            });
        });
    };
    /**
     * Follows an item, or a query result, using the search alerts service.
     * @param request The subscription details.
     * @param callOptions An additional set of options to use for this call.
     * @param callParams The options injected by the applied decorators.
     * @returns {Promise<ISubscription>}
     */
    SearchEndpoint.prototype.follow = function (request, callOptions, callParams) {
        var _this = this;
        callParams.requestData = request;
        this.logger.info('Performing REST query to follow an item or a query', request);
        return this.performOneCall(callParams, callOptions).then(function (subscription) {
            _this.logger.info('REST query successful', subscription);
            return subscription;
        });
    };
    /**
     * Gets a Promise of an array of the current subscriptions.
     * @param page The page of the subscriptions.
     * @param callOptions An additional set of options to use for this call.
     * @param callParams The options injected by the applied decorators.
     * @returns {any}
     */
    SearchEndpoint.prototype.listSubscriptions = function (page, callOptions, callParams) {
        var _this = this;
        Iif (this.options.isGuestUser) {
            return new Promise(function (resolve, reject) {
                reject();
            });
        }
        if (this.currentListSubscriptions == null) {
            callParams = UrlUtils_1.UrlUtils.merge(callParams, {
                paths: callParams.url,
                query: {
                    page: page || 0
                }
            });
            this.logger.info('Performing REST query to list subscriptions');
            this.currentListSubscriptions = this.performOneCall(callParams, callOptions);
            this.currentListSubscriptions
                .then(function (data) {
                _this.currentListSubscriptions = null;
                _this.logger.info('REST query successful', data);
                return data;
            })
                .catch(function (e) {
                // Trap 403 error, as the listSubscription call is called on every page initialization
                // to check for current subscriptions. By default, the search alert service is not enabled for most organization
                // Don't want to pollute the console with un-needed noise and confusion
                if (e.status != 403) {
                    throw e;
                }
            });
        }
        return this.currentListSubscriptions;
    };
    /**
     * Updates a subscription with new parameters.
     * @param subscription The subscription to update with new parameters.
     * @param callOptions An additional set of options to use for this call.
     * @param callParams The options injected by the applied decorators.
     * @returns {Promise<ISubscription>}
     */
    SearchEndpoint.prototype.updateSubscription = function (subscription, callOptions, callParams) {
        var _this = this;
        callParams = UrlUtils_1.UrlUtils.merge(__assign({}, callParams, { requestData: __assign({}, callParams.requestData, subscription) }), {
            paths: [callParams.url, subscription.id]
        });
        this.logger.info('Performing REST query to update a subscription', subscription);
        return this.performOneCall(callParams, callOptions).then(function (subscription) {
            _this.logger.info('REST query successful', subscription);
            return subscription;
        });
    };
    /**
     * Deletes a subscription.
     * @param subscription The subscription to delete.
     * @param callOptions An additional set of options to use for this call.
     * @param callParams The options injected by the applied decorators.
     * @returns {Promise<ISubscription>}
     */
    SearchEndpoint.prototype.deleteSubscription = function (subscription, callOptions, callParams) {
        var _this = this;
        callParams = UrlUtils_1.UrlUtils.merge(callParams, {
            paths: [callParams.url, subscription.id]
        });
        this.logger.info('Performing REST query to delete a subscription', subscription);
        return this.performOneCall(callParams, callOptions).then(function (subscription) {
            _this.logger.info('REST query successful', subscription);
            return subscription;
        });
    };
    SearchEndpoint.prototype.logError = function (sentryLog, callOptions, callParams) {
        callParams = __assign({}, callParams, { requestData: __assign({}, callParams.requestData, sentryLog) });
        return this.performOneCall(callParams, callOptions)
            .then(function () {
            return true;
        })
            .catch(function () {
            return false;
        });
    };
    SearchEndpoint.prototype.nuke = function () {
        window.removeEventListener('beforeunload', this.onUnload);
    };
    SearchEndpoint.prototype.createEndpointCaller = function () {
        this.caller = new EndpointCaller_1.EndpointCaller(__assign({}, this.options, { accessToken: this.accessToken.token }));
    };
    SearchEndpoint.isDebugArgumentPresent = function () {
        return /[?&]debug=1([&]|$)/.test(window.location.search);
    };
    SearchEndpoint.isUseLocalArgumentPresent = function () {
        return /[?&]useLocal=1([&]|$)/.test(window.location.search);
    };
    SearchEndpoint.prototype.handleUnload = function () {
        this.isRedirecting = true;
    };
    SearchEndpoint.prototype.buildBaseUri = function (path) {
        Assert_1.Assert.isString(path);
        return UrlUtils_1.UrlUtils.normalizeAsString({
            paths: [this.options.restUri, this.options.version, path]
        });
    };
    SearchEndpoint.prototype.buildSearchAlertsUri = function (path) {
        Assert_1.Assert.isString(path);
        var baseUrl = this.options.searchAlertsUri ||
            UrlUtils_1.UrlUtils.normalizeAsString({
                paths: [this.options.restUri, '/alerts']
            });
        var url = UrlUtils_1.UrlUtils.normalizeAsString({
            paths: [baseUrl, path]
        });
        return url;
    };
    SearchEndpoint.prototype.buildBaseQueryString = function (callOptions) {
        callOptions = __assign({}, callOptions);
        Iif (_.isArray(callOptions.authentication) && Utils_1.Utils.isNonEmptyArray(callOptions.authentication)) {
            return __assign({}, this.options.queryStringArguments, { authentication: callOptions.authentication.join(',') });
        }
        else {
            return __assign({}, this.options.queryStringArguments);
        }
    };
    SearchEndpoint.prototype.buildQueryAsQueryString = function (query, queryObject) {
        queryObject = __assign({}, queryObject);
        // In an ideal parallel reality, the entire query used in the 'search' call is used here.
        // In this reality however, we must support GET calls (ex: GET /html) for CORS/JSONP/IE reasons.
        // Therefore, we cherry-pick parts of the query to include in a 'query string' instead of a body payload.
        var queryParameters = {};
        ['q', 'aq', 'cq', 'dq', 'searchHub', 'tab', 'locale', 'pipeline', 'lowercaseOperators', 'timezone'].forEach(function (key) {
            queryParameters[key] = queryObject[key];
        });
        var context = {};
        _.pairs(queryObject.context).forEach(function (pair) {
            var key = pair[0], value = pair[1];
            context["context[" + Utils_1.Utils.safeEncodeURIComponent(key) + "]"] = value;
        });
        if (queryObject.fieldsToInclude) {
            var fieldsToInclude = queryObject.fieldsToInclude.map(function (field) {
                var uri = Utils_1.Utils.safeEncodeURIComponent(field.replace('@', ''));
                return "\"" + uri + "\"";
            });
            queryParameters.fieldsToInclude = "[" + fieldsToInclude.join(',') + "]";
        }
        return __assign({ q: query }, context, queryParameters);
    };
    SearchEndpoint.prototype.buildViewAsHtmlQueryString = function (uniqueId, callOptions) {
        callOptions = _.extend({}, callOptions);
        return {
            uniqueId: Utils_1.Utils.safeEncodeURIComponent(uniqueId),
            enableNavigation: 'true',
            requestedOutputSize: callOptions.requestedOutputSize ? callOptions.requestedOutputSize.toString() : null,
            contentType: callOptions.contentType
        };
    };
    SearchEndpoint.prototype.performOneCall = function (params, callOptions) {
        return __awaiter(this, void 0, void 0, function () {
            var _this = this;
            var request, response, error_1, errorCode, _a, tokenWasRenewed, response;
            return __generator(this, function (_b) {
                switch (_b.label) {
                    case 0:
                        params = UrlUtils_1.UrlUtils.merge(params, {
                            paths: params.url,
                            queryAsString: params.queryString,
                            query: __assign({}, this.buildBaseQueryString(callOptions))
                        });
                        request = function () { return _this.caller.call(params); };
                        _b.label = 1;
                    case 1:
                        _b.trys.push([1, 3, , 10]);
                        return [4 /*yield*/, request()];
                    case 2:
                        response = _b.sent();
                        return [2 /*return*/, response.data];
                    case 3:
                        error_1 = _b.sent();
                        Iif (!error_1) {
                            throw new Error('Request failed but it did not return an error.');
                        }
                        errorCode = error_1.statusCode;
                        _a = errorCode;
                        switch (_a) {
                            case 419: return [3 /*break*/, 4];
                            case 429: return [3 /*break*/, 6];
                        }
                        return [3 /*break*/, 8];
                    case 4: return [4 /*yield*/, this.accessToken.doRenew()];
                    case 5:
                        tokenWasRenewed = _b.sent();
                        if (!tokenWasRenewed) {
                            throw this.handleErrorResponse(error_1);
                        }
                        return [2 /*return*/, this.performOneCall(params, callOptions)];
                    case 6: return [4 /*yield*/, this.backOffThrottledRequest(request)];
                    case 7:
                        response = _b.sent();
                        return [2 /*return*/, response.data];
                    case 8: throw this.handleErrorResponse(error_1);
                    case 9: return [3 /*break*/, 10];
                    case 10: return [2 /*return*/];
                }
            });
        });
    };
    SearchEndpoint.prototype.backOffThrottledRequest = function (request) {
        return __awaiter(this, void 0, void 0, function () {
            var _this = this;
            var options, backoffRequest, e_1;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        _a.trys.push([0, 2, , 3]);
                        options = { retry: function (e, attempt) { return _this.retryIf429Error(e, attempt); } };
                        backoffRequest = { fn: request, options: options };
                        return [4 /*yield*/, BackOffRequest_1.BackOffRequest.enqueue(backoffRequest)];
                    case 1: return [2 /*return*/, _a.sent()];
                    case 2:
                        e_1 = _a.sent();
                        throw this.handleErrorResponse(e_1);
                    case 3: return [2 /*return*/];
                }
            });
        });
    };
    SearchEndpoint.prototype.retryIf429Error = function (e, attempt) {
        if (this.isThrottled(e)) {
            this.logger.info("Resending the request because it was throttled. Retry attempt " + attempt);
            return true;
        }
        return false;
    };
    SearchEndpoint.prototype.isThrottled = function (error) {
        return error && error.statusCode === 429;
    };
    SearchEndpoint.prototype.handleErrorResponse = function (errorResponse) {
        Iif (this.isMissingAuthenticationProviderStatus(errorResponse.statusCode)) {
            return new MissingAuthenticationError_1.MissingAuthenticationError(errorResponse.data['provider']);
        }
        else Iif (errorResponse.data && errorResponse.data.message && errorResponse.data.type) {
            return new QueryError_1.QueryError(errorResponse);
        }
        else Iif (errorResponse.data && errorResponse.data.message) {
            return new AjaxError_1.AjaxError("Request Error : " + errorResponse.data.message, errorResponse.statusCode);
        }
        else {
            return new AjaxError_1.AjaxError('Request Error', errorResponse.statusCode);
        }
    };
    SearchEndpoint.prototype.isMissingAuthenticationProviderStatus = function (status) {
        return status == 402;
    };
    /**
     * A map of all initialized `SearchEndpoint` instances.
     *
     * **Example:** `Coveo.SearchEndpoint.endpoints["default"]` returns the default endpoint that was created at initialization.
     * @type {{}}
     */
    SearchEndpoint.endpoints = {};
    __decorate([
        path('/login/'),
        accessTokenInUrl()
    ], SearchEndpoint.prototype, "getAuthenticationProviderUri", null);
    __decorate([
        path('/login/handshake/token'),
        method('POST'),
        requestDataType('application/json'),
        responseType('json')
    ], SearchEndpoint.prototype, "exchangeHandshakeToken", null);
    __decorate([
        includeActionsHistory(),
        includeReferrer(),
        includeAnalytics(),
        includeVisitorId(),
        includeIsGuestUser()
    ], SearchEndpoint.prototype, "buildCompleteCall", null);
    __decorate([
        path('/'),
        method('POST'),
        responseType('text')
    ], SearchEndpoint.prototype, "search", null);
    __decorate([
        path('/'),
        method('POST'),
        responseType('arraybuffer')
    ], SearchEndpoint.prototype, "fetchBinary", null);
    __decorate([
        path('/plan'),
        method('POST'),
        requestDataType('application/json'),
        responseType('json')
    ], SearchEndpoint.prototype, "plan", null);
    __decorate([
        path('/'),
        accessTokenInUrl()
    ], SearchEndpoint.prototype, "getExportToExcelLink", null);
    __decorate([
        path('/datastream'),
        accessTokenInUrl(),
        method('GET'),
        responseType('arraybuffer')
    ], SearchEndpoint.prototype, "getRawDataStream", null);
    __decorate([
        path('/datastream'),
        accessTokenInUrl()
    ], SearchEndpoint.prototype, "getViewAsDatastreamUri", null);
    __decorate([
        path('/document'),
        method('GET'),
        responseType('text')
    ], SearchEndpoint.prototype, "getDocument", null);
    __decorate([
        path('/text'),
        method('GET'),
        responseType('text')
    ], SearchEndpoint.prototype, "getDocumentText", null);
    __decorate([
        path('/html'),
        method('POST'),
        responseType('document')
    ], SearchEndpoint.prototype, "getDocumentHtml", null);
    __decorate([
        path('/html'),
        accessTokenInUrl()
    ], SearchEndpoint.prototype, "getViewAsHtmlUri", null);
    __decorate([
        path('/values'),
        method('POST'),
        responseType('text')
    ], SearchEndpoint.prototype, "listFieldValues", null);
    __decorate([
        path('/values/batch'),
        method('POST'),
        responseType('text')
    ], SearchEndpoint.prototype, "listFieldValuesBatch", null);
    __decorate([
        path('/fields'),
        method('GET'),
        responseType('text')
    ], SearchEndpoint.prototype, "listFields", null);
    __decorate([
        path('/extensions'),
        method('GET'),
        responseType('text')
    ], SearchEndpoint.prototype, "extensions", null);
    __decorate([
        path('/rating'),
        method('POST'),
        responseType('text')
    ], SearchEndpoint.prototype, "rateDocument", null);
    __decorate([
        path('/tag'),
        method('POST'),
        responseType('text')
    ], SearchEndpoint.prototype, "tagDocument", null);
    __decorate([
        path('/querySuggest'),
        method('POST'),
        responseType('text')
    ], SearchEndpoint.prototype, "getQuerySuggest", null);
    __decorate([
        path('/facet'),
        method('POST'),
        requestDataType('application/json'),
        responseType('text')
    ], SearchEndpoint.prototype, "facetSearch", null);
    __decorate([
        alertsPath('/subscriptions'),
        accessTokenInUrl('accessToken'),
        method('POST'),
        requestDataType('application/json'),
        responseType('text')
    ], SearchEndpoint.prototype, "follow", null);
    __decorate([
        alertsPath('/subscriptions'),
        accessTokenInUrl('accessToken'),
        method('GET'),
        requestDataType('application/json'),
        responseType('text')
    ], SearchEndpoint.prototype, "listSubscriptions", null);
    __decorate([
        alertsPath('/subscriptions/'),
        accessTokenInUrl('accessToken'),
        method('PUT'),
        requestDataType('application/json'),
        responseType('text')
    ], SearchEndpoint.prototype, "updateSubscription", null);
    __decorate([
        alertsPath('/subscriptions/'),
        accessTokenInUrl('accessToken'),
        method('DELETE'),
        requestDataType('application/json'),
        responseType('text')
    ], SearchEndpoint.prototype, "deleteSubscription", null);
    __decorate([
        path('/log'),
        method('POST')
    ], SearchEndpoint.prototype, "logError", null);
    return SearchEndpoint;
}());
exports.SearchEndpoint = SearchEndpoint;
// It's taken for granted that methods using decorators have :
// IEndpointCallOptions as their second to last parameter
// IEndpointCallParameters as their last parameter
// The default parameters for each member of the injected {@link IEndpointCallParameters} are the following:
// url: '',
// queryString: [],
// requestData: {},
// requestDataType: undefined,
// method: '',
// responseType: '',
// errorsAsSuccess: false
function decoratorSetup(target, key, descriptor) {
    return {
        originalMethod: descriptor.value,
        nbParams: target[key].prototype.constructor.length
    };
}
function defaultDecoratorEndpointCallParameters() {
    var params = {
        url: '',
        queryString: [],
        requestData: {},
        method: '',
        responseType: '',
        errorsAsSuccess: false
    };
    return params;
}
function getEndpointCallParameters(nbParams, args) {
    if (!args[nbParams - 1]) {
        args[nbParams - 1] = defaultDecoratorEndpointCallParameters();
    }
    return args[nbParams - 1];
}
function path(path) {
    return function (target, key, descriptor) {
        var _a = decoratorSetup(target, key, descriptor), originalMethod = _a.originalMethod, nbParams = _a.nbParams;
        descriptor.value = function () {
            var args = [];
            for (var _i = 0; _i < arguments.length; _i++) {
                args[_i] = arguments[_i];
            }
            getEndpointCallParameters(nbParams, args).url = this.buildBaseUri(path);
            return originalMethod.apply(this, args);
        };
        return descriptor;
    };
}
function alertsPath(path) {
    return function (target, key, descriptor) {
        var _a = decoratorSetup(target, key, descriptor), originalMethod = _a.originalMethod, nbParams = _a.nbParams;
        descriptor.value = function () {
            var args = [];
            for (var _i = 0; _i < arguments.length; _i++) {
                args[_i] = arguments[_i];
            }
            getEndpointCallParameters(nbParams, args).url = this.buildSearchAlertsUri(path);
            return originalMethod.apply(this, args);
        };
        return descriptor;
    };
}
function requestDataType(type) {
    return function (target, key, descriptor) {
        var _a = decoratorSetup(target, key, descriptor), originalMethod = _a.originalMethod, nbParams = _a.nbParams;
        descriptor.value = function () {
            var args = [];
            for (var _i = 0; _i < arguments.length; _i++) {
                args[_i] = arguments[_i];
            }
            getEndpointCallParameters(nbParams, args).requestDataType = type;
            return originalMethod.apply(this, args);
        };
        return descriptor;
    };
}
function method(met) {
    return function (target, key, descriptor) {
        var _a = decoratorSetup(target, key, descriptor), originalMethod = _a.originalMethod, nbParams = _a.nbParams;
        descriptor.value = function () {
            var args = [];
            for (var _i = 0; _i < arguments.length; _i++) {
                args[_i] = arguments[_i];
            }
            getEndpointCallParameters(nbParams, args).method = met;
            return originalMethod.apply(this, args);
        };
        return descriptor;
    };
}
function responseType(resp) {
    return function (target, key, descriptor) {
        var _a = decoratorSetup(target, key, descriptor), originalMethod = _a.originalMethod, nbParams = _a.nbParams;
        descriptor.value = function () {
            var args = [];
            for (var _i = 0; _i < arguments.length; _i++) {
                args[_i] = arguments[_i];
            }
            getEndpointCallParameters(nbParams, args).responseType = resp;
            return originalMethod.apply(this, args);
        };
        return descriptor;
    };
}
function accessTokenInUrl(tokenKey) {
    if (tokenKey === void 0) { tokenKey = 'access_token'; }
    return function (target, key, descriptor) {
        var _a = decoratorSetup(target, key, descriptor), originalMethod = _a.originalMethod, nbParams = _a.nbParams;
        var buildAccessToken = function (tokenKey, endpointInstance) {
            var queryString = [];
            if (Utils_1.Utils.isNonEmptyString(endpointInstance.accessToken.token)) {
                queryString.push(tokenKey + '=' + Utils_1.Utils.safeEncodeURIComponent(endpointInstance.accessToken.token));
            }
            return queryString;
        };
        descriptor.value = function () {
            var args = [];
            for (var _i = 0; _i < arguments.length; _i++) {
                args[_i] = arguments[_i];
            }
            var queryString = buildAccessToken(tokenKey, this);
            var params = getEndpointCallParameters(nbParams, args);
            params.queryString = (params.queryString || []).concat(queryString);
            return originalMethod.apply(this, args);
        };
        return descriptor;
    };
}
function includeActionsHistory(historyStore) {
    Eif (historyStore === void 0) { historyStore = HistoryStore_1.buildHistoryStore(); }
    return function (target, key, descriptor) {
        var _a = decoratorSetup(target, key, descriptor), originalMethod = _a.originalMethod, nbParams = _a.nbParams;
        descriptor.value = function () {
            var args = [];
            for (var _i = 0; _i < arguments.length; _i++) {
                args[_i] = arguments[_i];
            }
            var historyFromStore = historyStore.getHistory();
            if (historyFromStore == null) {
                historyFromStore = [];
            }
            getEndpointCallParameters(nbParams, args).requestData.actionsHistory = historyFromStore;
            return originalMethod.apply(this, args);
        };
        return descriptor;
    };
}
function includeReferrer() {
    return function (target, key, descriptor) {
        var _a = decoratorSetup(target, key, descriptor), originalMethod = _a.originalMethod, nbParams = _a.nbParams;
        descriptor.value = function () {
            var args = [];
            for (var _i = 0; _i < arguments.length; _i++) {
                args[_i] = arguments[_i];
            }
            var referrer = document.referrer;
            Iif (referrer == null) {
                referrer = '';
            }
            getEndpointCallParameters(nbParams, args).requestData.referrer = referrer;
            return originalMethod.apply(this, args);
        };
        return descriptor;
    };
}
function includeAnalytics() {
    return function (target, key, descriptor) {
        var _a = decoratorSetup(target, key, descriptor), originalMethod = _a.originalMethod, nbParams = _a.nbParams;
        descriptor.value = function () {
            var args = [];
            for (var _i = 0; _i < arguments.length; _i++) {
                args[_i] = arguments[_i];
            }
            var analyticsInstance = (args && args[1] && args[1].analyticsInformation) || new AnalyticsInformation_1.AnalyticsInformation();
            var actionCause = analyticsInstance.pendingSearchEvent ? analyticsInstance.pendingSearchEvent.getEventCause() : null;
            var customData = analyticsInstance.pendingSearchEvent ? analyticsInstance.pendingSearchEvent.getEventMeta() : null;
            var userDisplayName = analyticsInstance.userDisplayName;
            var originContext = analyticsInstance.originContext;
            var analytics = __assign({ clientId: analyticsInstance.clientId, documentLocation: analyticsInstance.location, documentReferrer: analyticsInstance.referrer, pageId: analyticsInstance.lastPageId }, (actionCause && {
                actionCause: actionCause
            }), (customData && {
                customData: customData
            }), (userDisplayName && {
                userDisplayName: userDisplayName
            }), (originContext && {
                originContext: originContext
            }));
            getEndpointCallParameters(nbParams, args).requestData.analytics = underscore_1.mapObject(analytics, function (value) { return value || ''; });
            return originalMethod.apply(this, args);
        };
        return descriptor;
    };
}
function includeVisitorId() {
    return function (target, key, descriptor) {
        var _a = decoratorSetup(target, key, descriptor), originalMethod = _a.originalMethod, nbParams = _a.nbParams;
        descriptor.value = function () {
            var args = [];
            for (var _i = 0; _i < arguments.length; _i++) {
                args[_i] = arguments[_i];
            }
            getEndpointCallParameters(nbParams, args).requestData.visitorId = new AnalyticsInformation_1.AnalyticsInformation().clientId;
            return originalMethod.apply(this, args);
        };
        return descriptor;
    };
}
function includeIsGuestUser() {
    return function (target, key, descriptor) {
        var _a = decoratorSetup(target, key, descriptor), originalMethod = _a.originalMethod, nbParams = _a.nbParams;
        descriptor.value = function () {
            var args = [];
            for (var _i = 0; _i < arguments.length; _i++) {
                args[_i] = arguments[_i];
            }
            var isGuestUser = this.options.isGuestUser;
            getEndpointCallParameters(nbParams, args).requestData.isGuestUser = isGuestUser;
            return originalMethod.apply(this, args);
        };
        return descriptor;
    };
}
 
 
/***/ }),
/* 62 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __assign = (this && this.__assign) || Object.assign || function(t) {
    for (var s, i = 1, n = arguments.length; i < n; i++) {
        s = arguments[i];
        for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
            t[p] = s[p];
    }
    return t;
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { Iif (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        Iif (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            Iif (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
            Iif (y = 0, t) op = [0, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    Eif (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        Iif (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
Object.defineProperty(exports, "__esModule", { value: true });
var AgGrid_1 = __webpack_require__(500);
var underscore_1 = __webpack_require__(1);
var UtilsModules_1 = __webpack_require__(67);
var ResultLink_1 = __webpack_require__(56);
exports.defaultGridOptions = {
    domLayout: 'autoHeight',
    enableColResize: true,
    rowHeight: 100,
    enableRangeSelection: true,
    suppressRowClickSelection: true,
    suppressCellSelection: true,
    defaultColDef: {
        width: 100
    },
    enableSorting: true,
    autoSizePadding: 10
};
var TableBuilder = /** @class */ (function () {
    function TableBuilder() {
    }
    TableBuilder.prototype.build = function (sources, table, gridOptions) {
        if (gridOptions === void 0) { gridOptions = exports.defaultGridOptions; }
        return __awaiter(this, void 0, void 0, function () {
            var firstData, mapToAgGridFormat, columnDefs, rowData, grid;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        firstData = underscore_1.first(sources) || {};
                        mapToAgGridFormat = function (value, key) {
                            if (value.children) {
                                return {
                                    field: key,
                                    headerName: key,
                                    marryChildren: true,
                                    children: underscore_1.flatten(value.children.map(function (child) {
                                        return underscore_1.map(child, mapToAgGridFormat);
                                    }))
                                };
                            }
                            else {
                                return __assign({ field: key, headerName: key }, value);
                            }
                        };
                        columnDefs = underscore_1.map(firstData, mapToAgGridFormat);
                        rowData = underscore_1.map(sources, function (source) {
                            var merged = {};
                            var extractContent = function (value, key) {
                                if (value.content) {
                                    merged[key] = value.content;
                                }
                                else Eif (value.children) {
                                    underscore_1.each(value.children, function (child) {
                                        underscore_1.each(child, extractContent);
                                    });
                                }
                            };
                            underscore_1.each(source, extractContent);
                            return merged;
                        });
                        this.gridOptions = __assign({}, exports.defaultGridOptions, { columnDefs: columnDefs,
                            rowData: rowData }, gridOptions);
                        return [4 /*yield*/, AgGrid_1.loadAgGridLibrary()];
                    case 1:
                        _a.sent();
                        grid = new agGrid.Grid(table.el, this.gridOptions);
                        return [2 /*return*/, { grid: grid, gridOptions: this.gridOptions }];
                }
            });
        });
    };
    TableBuilder.thumbnailCell = function (result, bindings) {
        return {
            Document: {
                content: { result: result, bindings: bindings },
                cellRenderer: ThumbnailHtmlRenderer,
                width: 550,
                getQuickFilterText: function (params) {
                    return '';
                }
            }
        };
    };
    return TableBuilder;
}());
exports.TableBuilder = TableBuilder;
var ThumbnailHtmlRenderer = /** @class */ (function () {
    function ThumbnailHtmlRenderer() {
    }
    ThumbnailHtmlRenderer.prototype.init = function (params) {
        if (params) {
            this.element = params.value;
            this.currentFilter = params.api.filterManager.quickFilter;
        }
    };
    ThumbnailHtmlRenderer.prototype.getGui = function () {
        var cell = UtilsModules_1.$$('div', { className: 'coveo-relevance-inspector-thumbnail-cell' });
        if (this.element) {
            var thumbnail = this.thumbnail(this.element.result, this.element.bindings);
            cell.append(thumbnail.el);
        }
        else {
            cell.append(UtilsModules_1.$$('p', undefined, '-- NULL --').el);
        }
        return cell.el;
    };
    ThumbnailHtmlRenderer.prototype.thumbnail = function (result, bindings) {
        var dom;
        if (bindings && result) {
            var resultLists = bindings.searchInterface.getComponents('ResultList');
            var firstActiveResultList = underscore_1.find(resultLists, function (resultList) { return !resultList.disabled; });
            if (firstActiveResultList) {
                dom = UtilsModules_1.$$('div', {
                    className: 'coveo-relevance-inspector-result-thumbnail'
                });
                firstActiveResultList.buildResult(result).then(function (builtResult) {
                    dom.append(builtResult);
                });
            }
            else {
                dom = UtilsModules_1.$$('a', {
                    className: 'CoveoResultLink'
                });
                new ResultLink_1.ResultLink(dom.el, { alwaysOpenInNewWindow: true }, bindings, result);
            }
            if (this.currentFilter) {
                this.highlightSearch(dom.el, this.currentFilter);
            }
        }
        else {
            dom = UtilsModules_1.$$('div', undefined, '-- NULL --');
        }
        return dom;
    };
    ThumbnailHtmlRenderer.prototype.refresh = function (params) {
        return true;
    };
    ThumbnailHtmlRenderer.prototype.highlightSearch = function (elementToSearch, search) {
        var asHTMLElement = elementToSearch;
        Eif (asHTMLElement != null && asHTMLElement.innerText != null) {
            var match = asHTMLElement.innerText.split(new RegExp('(?=' + UtilsModules_1.StringUtils.regexEncode(search) + ')', 'gi'));
            asHTMLElement.innerHTML = '';
            match.forEach(function (value) {
                var regex = new RegExp('(' + UtilsModules_1.StringUtils.regexEncode(search) + ')', 'i');
                var group = value.match(regex);
                var span;
                Eif (group != null) {
                    span = UtilsModules_1.$$('span', {
                        className: 'coveo-relevance-inspector-highlight'
                    });
                    span.text(group[1]);
                    asHTMLElement.appendChild(span.el);
                    span = UtilsModules_1.$$('span');
                    span.text(value.substr(group[1].length));
                    asHTMLElement.appendChild(span.el);
                }
                else {
                    span = UtilsModules_1.$$('span');
                    span.text(value);
                    asHTMLElement.appendChild(span.el);
                }
            });
        }
    };
    return ThumbnailHtmlRenderer;
}());
exports.ThumbnailHtmlRenderer = ThumbnailHtmlRenderer;
var GenericHtmlRenderer = /** @class */ (function () {
    function GenericHtmlRenderer() {
    }
    GenericHtmlRenderer.prototype.init = function (params) {
        if (params && params.api) {
            this.element = params.value;
            this.currentFilter = params.api.filterManager.quickFilter;
        }
    };
    GenericHtmlRenderer.prototype.getGui = function () {
        if (this.element && this.currentFilter) {
            return UtilsModules_1.$$('div', undefined, UtilsModules_1.StreamHighlightUtils.highlightStreamHTML(this.element, { Precision: ['precision'] }, {})).el;
        }
        else if (this.element) {
            return UtilsModules_1.$$('div', undefined, this.element).el;
        }
        else {
            return UtilsModules_1.$$('div', undefined, '-- NULL --').el;
        }
    };
    GenericHtmlRenderer.prototype.refresh = function (params) {
        return true;
    };
    return GenericHtmlRenderer;
}());
exports.GenericHtmlRenderer = GenericHtmlRenderer;
 
 
/***/ }),
/* 63 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* unused harmony export CREATED */
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return SCHEDULED; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return STARTING; });
/* unused harmony export STARTED */
/* unused harmony export RUNNING */
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return ENDING; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ENDED; });
/* harmony export (immutable) */ __webpack_exports__["g"] = init;
/* harmony export (immutable) */ __webpack_exports__["h"] = set;
/* harmony export (immutable) */ __webpack_exports__["f"] = get;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_d3_dispatch__ = __webpack_require__(149);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_d3_timer__ = __webpack_require__(247);
 
 
 
var emptyOn = Object(__WEBPACK_IMPORTED_MODULE_0_d3_dispatch__["a" /* dispatch */])("start", "end", "cancel", "interrupt");
var emptyTween = [];
 
var CREATED = 0;
var SCHEDULED = 1;
var STARTING = 2;
var STARTED = 3;
var RUNNING = 4;
var ENDING = 5;
var ENDED = 6;
 
/* harmony default export */ __webpack_exports__["e"] = (function(node, name, id, index, group, timing) {
  var schedules = node.__transition;
  if (!schedules) node.__transition = {};
  else if (id in schedules) return;
  create(node, id, {
    name: name,
    index: index, // For context during callback.
    group: group, // For context during callback.
    on: emptyOn,
    tween: emptyTween,
    time: timing.time,
    delay: timing.delay,
    duration: timing.duration,
    ease: timing.ease,
    timer: null,
    state: CREATED
  });
});
 
function init(node, id) {
  var schedule = get(node, id);
  if (schedule.state > CREATED) throw new Error("too late; already scheduled");
  return schedule;
}
 
function set(node, id) {
  var schedule = get(node, id);
  if (schedule.state > STARTED) throw new Error("too late; already running");
  return schedule;
}
 
function get(node, id) {
  var schedule = node.__transition;
  if (!schedule || !(schedule = schedule[id])) throw new Error("transition not found");
  return schedule;
}
 
function create(node, id, self) {
  var schedules = node.__transition,
      tween;
 
  // Initialize the self timer when the transition is created.
  // Note the actual delay is not known until the first callback!
  schedules[id] = self;
  self.timer = Object(__WEBPACK_IMPORTED_MODULE_1_d3_timer__["d" /* timer */])(schedule, 0, self.time);
 
  function schedule(elapsed) {
    self.state = SCHEDULED;
    self.timer.restart(start, self.delay, self.time);
 
    // If the elapsed delay is less than our first sleep, start immediately.
    if (self.delay <= elapsed) start(elapsed - self.delay);
  }
 
  function start(elapsed) {
    var i, j, n, o;
 
    // If the state is not SCHEDULED, then we previously errored on start.
    if (self.state !== SCHEDULED) return stop();
 
    for (i in schedules) {
      o = schedules[i];
      if (o.name !== self.name) continue;
 
      // While this element already has a starting transition during this frame,
      // defer starting an interrupting transition until that transition has a
      // chance to tick (and possibly end); see d3/d3-transition#54!
      if (o.state === STARTED) return Object(__WEBPACK_IMPORTED_MODULE_1_d3_timer__["c" /* timeout */])(start);
 
      // Interrupt the active transition, if any.
      if (o.state === RUNNING) {
        o.state = ENDED;
        o.timer.stop();
        o.on.call("interrupt", node, node.__data__, o.index, o.group);
        delete schedules[i];
      }
 
      // Cancel any pre-empted transitions.
      else if (+i < id) {
        o.state = ENDED;
        o.timer.stop();
        o.on.call("cancel", node, node.__data__, o.index, o.group);
        delete schedules[i];
      }
    }
 
    // Defer the first tick to end of the current frame; see d3/d3#1576.
    // Note the transition may be canceled after start and before the first tick!
    // Note this must be scheduled before the start event; see d3/d3-transition#16!
    // Assuming this is successful, subsequent callbacks go straight to tick.
    Object(__WEBPACK_IMPORTED_MODULE_1_d3_timer__["c" /* timeout */])(function() {
      if (self.state === STARTED) {
        self.state = RUNNING;
        self.timer.restart(tick, self.delay, self.time);
        tick(elapsed);
      }
    });
 
    // Dispatch the start event.
    // Note this must be done before the tween are initialized.
    self.state = STARTING;
    self.on.call("start", node, node.__data__, self.index, self.group);
    if (self.state !== STARTING) return; // interrupted
    self.state = STARTED;
 
    // Initialize the tween, deleting null tween.
    tween = new Array(n = self.tween.length);
    for (i = 0, j = -1; i < n; ++i) {
      if (o = self.tween[i].value.call(node, node.__data__, self.index, self.group)) {
        tween[++j] = o;
      }
    }
    tween.length = j + 1;
  }
 
  function tick(elapsed) {
    var t = elapsed < self.duration ? self.ease.call(null, elapsed / self.duration) : (self.timer.restart(stop), self.state = ENDING, 1),
        i = -1,
        n = tween.length;
 
    while (++i < n) {
      tween[i].call(node, t);
    }
 
    // Dispatch the end event.
    if (self.state === ENDING) {
      self.on.call("end", node, node.__data__, self.index, self.group);
      stop();
    }
  }
 
  function stop() {
    self.state = ENDED;
    self.timer.stop();
    delete schedules[id];
    for (var i in schedules) return; // eslint-disable-line no-unused-vars
    delete node.__transition;
  }
}
 
 
/***/ }),
/* 64 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__tagTester_js__ = __webpack_require__(46);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__setup_js__ = __webpack_require__(30);
 
 
 
var isFunction = Object(__WEBPACK_IMPORTED_MODULE_0__tagTester_js__["a" /* default */])('Function');
 
// Optimize `isFunction` if appropriate. Work around some `typeof` bugs in old
// v8, IE 11 (#1621), Safari 8 (#1929), and PhantomJS (#2236).
var nodelist = __WEBPACK_IMPORTED_MODULE_1__setup_js__["p" /* root */].document && __WEBPACK_IMPORTED_MODULE_1__setup_js__["p" /* root */].document.childNodes;
Eif (typeof /./ != 'function' && typeof Int8Array != 'object' && typeof nodelist != 'function') {
  isFunction = function(obj) {
    return typeof obj == 'function' || false;
  };
}
 
/* harmony default export */ __webpack_exports__["a"] = (isFunction);
 
 
/***/ }),
/* 65 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__shallowProperty_js__ = __webpack_require__(425);
 
 
// Internal helper to obtain the `length` property of an object.
/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__shallowProperty_js__["a" /* default */])('length'));
 
 
/***/ }),
/* 66 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var SettingsEvents = /** @class */ (function () {
    function SettingsEvents() {
    }
    SettingsEvents.settingsPopulateMenu = 'settingsPopulateMenu';
    return SettingsEvents;
}());
exports.SettingsEvents = SettingsEvents;
 
 
/***/ }),
/* 67 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var ColorUtils_1 = __webpack_require__(226);
exports.ColorUtils = ColorUtils_1.ColorUtils;
var CookieUtils_1 = __webpack_require__(168);
exports.Cookie = CookieUtils_1.Cookie;
var CurrencyUtils_1 = __webpack_require__(316);
exports.CurrencyUtils = CurrencyUtils_1.CurrencyUtils;
var DateUtils_1 = __webpack_require__(43);
exports.DateUtils = DateUtils_1.DateUtils;
var DeviceUtils_1 = __webpack_require__(42);
exports.DeviceUtils = DeviceUtils_1.DeviceUtils;
var Dom_1 = __webpack_require__(0);
exports.Dom = Dom_1.Dom;
exports.$$ = Dom_1.$$;
var DomUtils_1 = __webpack_require__(137);
exports.DomUtils = DomUtils_1.DomUtils;
var EmailUtils_1 = __webpack_require__(636);
exports.EmailUtils = EmailUtils_1.EmailUtils;
var HashUtils_1 = __webpack_require__(88);
exports.HashUtils = HashUtils_1.HashUtils;
var HighlightUtils_1 = __webpack_require__(82);
exports.HighlightUtils = HighlightUtils_1.HighlightUtils;
exports.StringAndHoles = HighlightUtils_1.StringAndHoles;
var HtmlUtils_1 = __webpack_require__(637);
exports.HTMLUtils = HtmlUtils_1.HTMLUtils;
var KeyboardUtils_1 = __webpack_require__(35);
exports.KEYBOARD = KeyboardUtils_1.KEYBOARD;
exports.KeyboardUtils = KeyboardUtils_1.KeyboardUtils;
var LocalStorageUtils_1 = __webpack_require__(96);
exports.LocalStorageUtils = LocalStorageUtils_1.LocalStorageUtils;
var OSUtils_1 = __webpack_require__(317);
exports.OSUtils = OSUtils_1.OSUtils;
exports.OS_NAME = OSUtils_1.OS_NAME;
var PopupUtils_1 = __webpack_require__(227);
exports.PopupUtils = PopupUtils_1.PopupUtils;
var QueryUtils_1 = __webpack_require__(37);
exports.QueryUtils = QueryUtils_1.QueryUtils;
var StreamHighlightUtils_1 = __webpack_require__(139);
exports.StreamHighlightUtils = StreamHighlightUtils_1.StreamHighlightUtils;
var StringUtils_1 = __webpack_require__(34);
exports.StringUtils = StringUtils_1.StringUtils;
var TimeSpanUtils_1 = __webpack_require__(166);
exports.TimeSpan = TimeSpanUtils_1.TimeSpan;
var Utils_1 = __webpack_require__(5);
exports.Utils = Utils_1.Utils;
var UrlUtils_1 = __webpack_require__(108);
exports.UrlUtils = UrlUtils_1.UrlUtils;
 
 
/***/ }),
/* 68 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { Iif (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        Iif (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            Iif (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
            Iif (y = 0, t) op = [0, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    Iif (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    Iif (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    Iif (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    Iif (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        Iif (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
Object.defineProperty(exports, "__esModule", { value: true });
__webpack_require__(1117);
__webpack_require__(1118);
__webpack_require__(1119);
var underscore_1 = __webpack_require__(1);
var QueryEvents_1 = __webpack_require__(14);
var ResultLayoutEvents_1 = __webpack_require__(132);
var ResultListEvents_1 = __webpack_require__(48);
var GlobalExports_1 = __webpack_require__(10);
var Assert_1 = __webpack_require__(12);
var Defer_1 = __webpack_require__(31);
var Model_1 = __webpack_require__(26);
var QueryStateModel_1 = __webpack_require__(17);
var DeviceUtils_1 = __webpack_require__(42);
var Dom_1 = __webpack_require__(0);
var DomUtils_1 = __webpack_require__(137);
var Utils_1 = __webpack_require__(5);
var AnalyticsActionListMeta_1 = __webpack_require__(7);
var Component_1 = __webpack_require__(6);
var ComponentOptions_1 = __webpack_require__(13);
var Initialization_1 = __webpack_require__(8);
var InitializationPlaceholder_1 = __webpack_require__(305);
var TemplateComponentOptions_1 = __webpack_require__(89);
var ResponsiveDefaultResultTemplate_1 = __webpack_require__(1120);
var CoreHelpers_1 = __webpack_require__(651);
var DefaultRecommendationTemplate_1 = __webpack_require__(331);
var DefaultResultTemplate_1 = __webpack_require__(173);
var TableTemplate_1 = __webpack_require__(239);
var TemplateCache_1 = __webpack_require__(79);
var TemplateList_1 = __webpack_require__(135);
var ResultContainer_1 = __webpack_require__(1121);
var ResultListCardRenderer_1 = __webpack_require__(1122);
var ResultListRenderer_1 = __webpack_require__(332);
var ResultListTableRenderer_1 = __webpack_require__(689);
var ResultListUtils_1 = __webpack_require__(72);
var TemplateToHtml_1 = __webpack_require__(690);
CoreHelpers_1.CoreHelpers.exportAllHelpersGlobally(window['Coveo']);
/**
 * The `ResultList` component is responsible for displaying query results by applying one or several result templates
 * (see [Result Templates](https://docs.coveo.com/en/413/)).
 *
 * It is possible to include multiple `ResultList` components along with a single `ResultLayout`
 * component in a search page to provide different result layouts (see
 * [Result Layouts](https://docs.coveo.com/en/360/)).
 *
 * This component supports infinite scrolling (see the
 * [`enableInfiniteScroll`]{@link ResultList.options.enableInfiniteScroll} option).
 */
var ResultList = /** @class */ (function (_super) {
    __extends(ResultList, _super);
    /**
     * Creates a new `ResultList` component. Binds various event related to queries (e.g., on querySuccess ->
     * renderResults). Binds scroll event if the [`enableInfiniteScroll`]{@link ResultList.options.enableInfiniteScroll}
     * option is `true`.
     * @param element The HTMLElement on which to instantiate the component.
     * @param options The options for the `ResultList` component.
     * @param bindings The bindings that the component requires to function normally. If not set, these will be
     * automatically resolved (with a slower execution time).
     * @param elementClassId The class that this component should instantiate. Components that extend the base ResultList
     * use this. Default value is `CoveoResultList`.
     */
    function ResultList(element, options, bindings, elementClassId) {
        if (elementClassId === void 0) { elementClassId = ResultList.ID; }
        var _this = _super.call(this, element, elementClassId, bindings) || this;
        _this.element = element;
        _this.options = options;
        _this.bindings = bindings;
        _this.currentlyDisplayedResults = [];
        _this.reachedTheEndOfResults = false;
        _this.disableLayoutChange = false;
        // This variable serves to block some setup where the framework fails to correctly identify the "real" scrolling container.
        // Since it's not technically feasible to correctly identify the scrolling container in every possible scenario without some very complex logic, we instead try to add some kind of mechanism to
        // block runaway requests where UI will keep asking more results in the index, eventually bringing the browser to it's knee.
        // Those successive request are needed in "displayMoreResults" to ensure we fill the scrolling container correctly.
        // Since the container is not identified correctly, it is never "full", so we keep asking for more.
        // It is reset every time the user actually scroll the container manually.
        _this.successiveScrollCount = 0;
        _this.options = ComponentOptions_1.ComponentOptions.initComponentOptions(element, ResultList, options);
        Assert_1.Assert.exists(element);
        Assert_1.Assert.exists(_this.options);
        Assert_1.Assert.exists(_this.options.resultTemplate);
        Assert_1.Assert.exists(_this.options.infiniteScrollContainer);
        _this.showOrHideElementsDependingOnState(false, false);
        _this.addListeners();
        _this.resultContainer = _this.initResultContainer();
        Assert_1.Assert.exists(_this.options.resultsContainer);
        _this.initWaitAnimationContainer();
        Assert_1.Assert.exists(_this.options.waitAnimationContainer);
        _this.setupTemplatesVersusLayouts();
        Dom_1.$$(_this.root).on(ResultLayoutEvents_1.ResultLayoutEvents.populateResultLayout, function (e, args) {
            return args.layouts.push(_this.options.layout);
        });
        _this.setupRenderer();
        _this.makeElementFocusable();
        _this.ensureHasId();
        return _this;
    }
    ResultList.getDefaultTemplate = function (e) {
        var template = ResultList.loadTemplatesFromCache();
        Iif (template != null) {
            return template;
        }
        var component = Component_1.Component.get(e);
        Iif (Coveo['Recommendation'] && component.searchInterface instanceof Coveo['Recommendation']) {
            return new DefaultRecommendationTemplate_1.DefaultRecommendationTemplate();
        }
        return new DefaultResultTemplate_1.DefaultResultTemplate();
    };
    ResultList.loadTemplatesFromCache = function () {
        var pageTemplateNames = TemplateCache_1.TemplateCache.getResultListTemplateNames();
        Iif (pageTemplateNames.length > 0) {
            return new TemplateList_1.TemplateList(underscore_1.compact(underscore_1.map(pageTemplateNames, function (templateName) { return TemplateCache_1.TemplateCache.getTemplate(templateName); })));
        }
        return null;
    };
    ResultList.prototype.addListeners = function () {
        var _this = this;
        this.bind.onRootElement(QueryEvents_1.QueryEvents.newQuery, function (args) { return _this.handleNewQuery(); });
        this.bind.onRootElement(QueryEvents_1.QueryEvents.buildingQuery, function (args) {
            return _this.handleBuildingQuery(args);
        });
        this.bind.onRootElement(QueryEvents_1.QueryEvents.querySuccess, function (args) {
            return _this.handleQuerySuccess(args);
        });
        this.bind.onRootElement(QueryEvents_1.QueryEvents.duringQuery, function (args) { return _this.handleDuringQuery(); });
        this.bind.onRootElement(QueryEvents_1.QueryEvents.queryError, function (args) { return _this.handleQueryError(); });
        Dom_1.$$(this.root).on(ResultListEvents_1.ResultListEvents.changeLayout, function (e, args) { return _this.handleChangeLayout(args); });
        if (this.options.enableInfiniteScroll) {
            this.addInfiniteScrollListeners();
        }
        else {
            this.addPagerListeners();
        }
    };
    ResultList.prototype.addInfiniteScrollListeners = function () {
        var _this = this;
        this.bind.on(this.options.infiniteScrollContainer, 'scroll', function () {
            _this.successiveScrollCount = 0;
            _this.handleScrollOfResultList();
        });
        this.bind.onRootElement(QueryEvents_1.QueryEvents.deferredQuerySuccess, function () {
            setTimeout(function () {
                _this.scrollToTopIfEnabled();
            }, 0);
        });
    };
    ResultList.prototype.addPagerListeners = function () {
        var _this = this;
        this.bind.onQueryState(Model_1.MODEL_EVENTS.CHANGE_ONE, QueryStateModel_1.QUERY_STATE_ATTRIBUTES.FIRST, function () {
            _this.bind.oneRootElement(QueryEvents_1.QueryEvents.deferredQuerySuccess, function () {
                setTimeout(function () {
                    _this.scrollToTopIfEnabled();
                }, 0);
            });
        });
    };
    /**
     * Get the fields needed to be automatically included in the query for this result list.
     * @returns {string[]}
     */
    ResultList.prototype.getAutoSelectedFieldsToInclude = function () {
        return underscore_1.chain(this.options.resultTemplate.getFields()).concat(this.getMinimalFieldsToInclude()).compact().unique().value();
    };
    ResultList.prototype.setupTemplatesVersusLayouts = function () {
        var _this = this;
        var layoutClassToAdd = "coveo-" + this.options.layout + "-layout-container";
        this.resultContainer.addClass(layoutClassToAdd);
        Iif (this.options.layout === 'table') {
            this.options.resultTemplate = new TableTemplate_1.TableTemplate(this.options.resultTemplate.templates || []);
        }
        // A TemplateList is the scenario where the result template are directly embedded inside the ResultList
        // This is the typical scenario when a page gets created by the interface editor, for example.
        // In that case, we try to stick closely that what is actually configured inside the page, and do no "special magic".
        // Stick to the "hardcoded" configuration present in the page.
        // We only add the correct layout options if it has not been set manually.
        if (this.options.resultTemplate instanceof TemplateList_1.TemplateList) {
            underscore_1.each(this.options.resultTemplate.templates, function (tmpl) {
                Eif (!tmpl.layout) {
                    tmpl.layout = _this.options.layout;
                }
            });
        }
        else if (this.options.resultTemplate instanceof DefaultResultTemplate_1.DefaultResultTemplate && this.options.layout == 'list') {
            ResponsiveDefaultResultTemplate_1.ResponsiveDefaultResultTemplate.init(this.root, this, {});
        }
    };
    /**
     * Empties the current result list content and appends the given array of HTMLElement.
     *
     * Can append to existing elements in the result list, or replace them.
     *
     * Triggers the `newResultsDisplayed` and `newResultDisplayed` events.
     * @param resultsElement
     * @param append
     */
    ResultList.prototype.renderResults = function (resultElements, append) {
        var _this = this;
        if (append === void 0) { append = false; }
        if (!append) {
            this.resultContainer.empty();
        }
        return this.renderer
            .renderResults(resultElements, append, this.triggerNewResultDisplayed.bind(this))
            .then(function () { return _this.triggerNewResultsDisplayed(); });
    };
    /**
     * Builds and returns an array of HTMLElement with the given result set.
     * @param results the result set to build an array of HTMLElement from.
     */
    ResultList.prototype.buildResults = function (results) {
        var layout = this.options.layout;
        return this.templateToHtml.buildResults(results, layout, this.currentlyDisplayedResults);
    };
    /**
     * Builds and returns an HTMLElement for the given result.
     * @param result the result to build an HTMLElement from.
     * @returns {HTMLElement}
     */
    ResultList.prototype.buildResult = function (result) {
        var layout = this.options.layout;
        return this.templateToHtml.buildResult(result, layout, this.currentlyDisplayedResults);
    };
    /**
     * Executes a query to fetch new results. After the query returns, renders the new results.
     *
     * Asserts that there are more results to display by verifying whether the last query has returned as many results as
     * requested.
     *
     * Asserts that the `ResultList` is not currently fetching results.
     * @param count The number of results to fetch and display.
     */
    ResultList.prototype.displayMoreResults = function (count) {
        Assert_1.Assert.isLargerOrEqualsThan(1, count);
        if (this.isCurrentlyFetchingMoreResults()) {
            this.logger.warn("Ignoring request to display more results since we're already doing so");
            return;
        }
        if (!this.hasPotentiallyMoreResultsToDisplay()) {
            this.logger.warn("Ignoring request to display more results since we know there aren't more to display");
            return;
        }
        Eif (this.options.enableInfiniteScrollWaitingAnimation) {
            this.showWaitingAnimationForInfiniteScrolling();
        }
        return this.fetchAndRenderMoreResults(count);
    };
    Object.defineProperty(ResultList.prototype, "templateToHtml", {
        get: function () {
            var templateToHtmlArgs = {
                resultTemplate: this.options.resultTemplate,
                searchInterface: this.searchInterface,
                queryStateModel: this.queryStateModel
            };
            return new TemplateToHtml_1.TemplateToHtml(templateToHtmlArgs);
        },
        enumerable: true,
        configurable: true
    });
    /**
     * Gets the list of currently displayed result.
     * @returns {IQueryResult[]}
     */
    ResultList.prototype.getDisplayedResults = function () {
        return this.currentlyDisplayedResults;
    };
    /**
     * Gets the list of currently displayed result HTMLElement.
     * @returns {HTMLElement[]}
     */
    ResultList.prototype.getDisplayedResultsElements = function () {
        return this.resultContainer.getResultElements();
    };
    ResultList.prototype.enable = function () {
        this.disableLayoutChange = false;
        if (this.resultLayoutSelectors.length > 0) {
            this.enableBasedOnActiveLayouts();
        }
        else {
            _super.prototype.enable.call(this);
            Dom_1.$$(this.element).removeClass('coveo-hidden');
        }
    };
    ResultList.prototype.disable = function () {
        var _this = this;
        _super.prototype.disable.call(this);
        var otherLayoutsStillActive = underscore_1.map(this.otherResultLists, function (otherResultList) { return otherResultList.options.layout; });
        if (!underscore_1.contains(otherLayoutsStillActive, this.options.layout) && !this.disableLayoutChange) {
            underscore_1.each(this.resultLayoutSelectors, function (resultLayoutSelector) {
                resultLayoutSelector.disableLayouts([_this.options.layout]);
            });
        }
        this.disableLayoutChange = false;
        Dom_1.$$(this.element).addClass('coveo-hidden');
    };
    ResultList.prototype.autoCreateComponentsInsideResult = function (element, result) {
        return this.templateToHtml.autoCreateComponentsInsideResult(element, result);
    };
    ResultList.prototype.triggerNewResultDisplayed = function (result, resultElement) {
        var args = {
            result: result,
            item: resultElement
        };
        Dom_1.$$(this.element).trigger(ResultListEvents_1.ResultListEvents.newResultDisplayed, args);
    };
    ResultList.prototype.triggerNewResultsDisplayed = function () {
        var args = {
            isInfiniteScrollEnabled: this.options.enableInfiniteScroll
        };
        Dom_1.$$(this.element).trigger(ResultListEvents_1.ResultListEvents.newResultsDisplayed, args);
    };
    ResultList.prototype.fetchAndRenderMoreResults = function (count) {
        return __awaiter(this, void 0, void 0, function () {
            var data, e_1;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        this.fetchingMoreResults = this.queryController.fetchMore(count);
                        _a.label = 1;
                    case 1:
                        _a.trys.push([1, 3, , 4]);
                        return [4 /*yield*/, this.fetchingMoreResults];
                    case 2:
                        data = _a.sent();
                        Assert_1.Assert.exists(data);
                        this.usageAnalytics.logCustomEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.pagerScrolling, {}, this.element);
                        this.reachedTheEndOfResults = count > data.results.length;
                        this.renderNewResults(data);
                        this.resetStateAfterFetchingMoreResults();
                        return [2 /*return*/, data];
                    case 3:
                        e_1 = _a.sent();
                        this.resetStateAfterFetchingMoreResults();
                        return [2 /*return*/, Promise.reject(e_1)];
                    case 4: return [2 /*return*/];
                }
            });
        });
    };
    ResultList.prototype.renderNewResults = function (data) {
        return __awaiter(this, void 0, void 0, function () {
            var elements, _a;
            return __generator(this, function (_b) {
                switch (_b.label) {
                    case 0: return [4 /*yield*/, this.buildResults(data)];
                    case 1:
                        elements = _b.sent();
                        this.renderResults(elements, true);
                        (_a = this.currentlyDisplayedResults).push.apply(_a, data.results);
                        this.triggerNewResultsDisplayed();
                        return [2 /*return*/];
                }
            });
        });
    };
    ResultList.prototype.resetStateAfterFetchingMoreResults = function () {
        var _this = this;
        this.hideWaitingAnimationForInfiniteScrolling();
        this.fetchingMoreResults = undefined;
        Defer_1.Defer.defer(function () {
            _this.successiveScrollCount++;
            if (_this.successiveScrollCount <= ResultList.MAX_AMOUNT_OF_SUCESSIVE_REQUESTS) {
                _this.handleScrollOfResultList();
            }
            else {
                _this.logger.info("Result list has triggered 5 consecutive queries to try and fill up the scrolling container, but it is still unable to do so.\n          Try explicitly setting the 'data-infinite-scroll-container-selector' option on the result list. See: https://coveo.github.io/search-ui/components/resultlist.html#options.infinitescrollcontainer");
            }
        });
    };
    ResultList.prototype.handleDuringQuery = function () {
        this.logger.trace('Emptying the result container');
        this.cancelFetchingMoreResultsIfNeeded();
        this.showWaitingAnimation();
        this.showOrHideElementsDependingOnState(false, false);
    };
    ResultList.prototype.handleQueryError = function () {
        this.hideWaitingAnimation();
        this.resultContainer.empty();
        this.currentlyDisplayedResults = [];
        this.reachedTheEndOfResults = true;
    };
    ResultList.prototype.handleQuerySuccess = function (data) {
        var _this = this;
        Assert_1.Assert.exists(data);
        Assert_1.Assert.exists(data.results);
        var results = data.results;
        this.logger.trace('Received query results from new query', results);
        this.hideWaitingAnimation();
        ResultList.resultCurrentlyBeingRendered = undefined;
        this.reachedTheEndOfResults = data.query.numberOfResults > data.results.results.length;
        this.currentlyDisplayedResults = [];
        this.buildResults(data.results).then(function (elements) { return __awaiter(_this, void 0, void 0, function () {
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0: return [4 /*yield*/, this.renderResults(elements)];
                    case 1:
                        _a.sent();
                        this.showOrHideElementsDependingOnState(true, this.currentlyDisplayedResults.length != 0);
                        Iif (DeviceUtils_1.DeviceUtils.isMobileDevice() && this.options.mobileScrollContainer != undefined) {
                            this.options.mobileScrollContainer.scrollTop = 0;
                        }
                        if (this.options.enableInfiniteScroll && results.results.length == data.queryBuilder.numberOfResults) {
                            // This will check right away if we need to add more results to make the scroll container full & scrolling.
                            this.scrollToTopIfEnabled();
                            this.handleScrollOfResultList();
                        }
                        return [2 /*return*/];
                }
            });
        }); });
    };
    ResultList.prototype.handleScrollOfResultList = function () {
        if (this.isCurrentlyFetchingMoreResults() || !this.options.enableInfiniteScroll) {
            return;
        }
        if (this.isScrollingOfResultListAlmostAtTheBottom() && this.hasPotentiallyMoreResultsToDisplay()) {
            this.displayMoreResults(this.options.infiniteScrollPageSize);
        }
    };
    ResultList.prototype.scrollToTopIfEnabled = function () {
        if (!this.options.enableScrollToTop) {
            return;
        }
        ResultListUtils_1.ResultListUtils.scrollToTop(this.root);
    };
    ResultList.prototype.handleNewQuery = function () {
        Dom_1.$$(this.element).removeClass('coveo-hidden');
        ResultList.resultCurrentlyBeingRendered = undefined;
    };
    Object.defineProperty(ResultList.prototype, "otherResultLists", {
        get: function () {
            var allResultLists = this.searchInterface.getComponents(ResultList.ID);
            return underscore_1.without(allResultLists, this);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ResultList.prototype, "resultLayoutSelectors", {
        get: function () {
            return this.searchInterface.getComponents('ResultLayoutSelector');
        },
        enumerable: true,
        configurable: true
    });
    ResultList.prototype.handleBuildingQuery = function (args) {
        if (this.options.fieldsToInclude != null) {
            // remove the @
            args.queryBuilder.addFieldsToInclude(underscore_1.map(this.options.fieldsToInclude, function (field) { return field.substr(1); }));
        }
        if (this.options.autoSelectFieldsToInclude) {
            var otherFields = underscore_1.flatten(underscore_1.map(this.otherResultLists, function (otherResultList) {
                return otherResultList.getAutoSelectedFieldsToInclude();
            }));
            args.queryBuilder.addRequiredFields(underscore_1.unique(otherFields.concat(this.getAutoSelectedFieldsToInclude())));
            args.queryBuilder.includeRequiredFields = true;
        }
    };
    ResultList.prototype.handleChangeLayout = function (args) {
        var _this = this;
        if (args.layout === this.options.layout) {
            this.disableLayoutChange = false;
            this.enable();
            this.options.resultTemplate.layout = this.options.layout;
            Eif (args.results) {
                // Prevent flickering when switching to a new layout that is empty
                // add a temporary placeholder, the same that is used on initialization
                Eif (this.resultContainer.isEmpty()) {
                    new InitializationPlaceholder_1.InitializationPlaceholder(this.root).withVisibleRootElement().withPlaceholderForResultList();
                }
                Defer_1.Defer.defer(function () { return __awaiter(_this, void 0, void 0, function () {
                    var elements;
                    return __generator(this, function (_a) {
                        switch (_a.label) {
                            case 0: return [4 /*yield*/, this.buildResults(args.results)];
                            case 1:
                                elements = _a.sent();
                                this.renderResults(elements);
                                this.showOrHideElementsDependingOnState(true, this.currentlyDisplayedResults.length !== 0);
                                return [2 /*return*/];
                        }
                    });
                }); });
            }
        }
        else {
            this.disableLayoutChange = true;
            this.disable();
            this.resultContainer.empty();
        }
    };
    ResultList.prototype.isCurrentlyFetchingMoreResults = function () {
        return Utils_1.Utils.exists(this.fetchingMoreResults);
    };
    ResultList.prototype.getMinimalFieldsToInclude = function () {
        // these fields are needed for analytics click event
        return ['author', 'language', 'urihash', 'objecttype', 'collection', 'source', 'language', 'permanentid'];
    };
    ResultList.prototype.isScrollingOfResultListAlmostAtTheBottom = function () {
        // this is in a try catch because the unit test fail otherwise (Window does not exist for phantom js in the console)
        var isWindow;
        try {
            isWindow = this.options.infiniteScrollContainer instanceof Window;
        }
        catch (e) {
            isWindow = false;
        }
        return isWindow ? this.isScrollAtBottomForWindowElement() : this.isScrollAtBottomForHtmlElement();
    };
    ResultList.prototype.isScrollAtBottomForWindowElement = function () {
        var win = new Dom_1.Win(window);
        var windowHeight = win.height();
        var scrollTop = win.scrollY();
        var bodyHeight = new Dom_1.Doc(document).height();
        return bodyHeight - (windowHeight + scrollTop) < windowHeight / 2;
    };
    ResultList.prototype.isScrollAtBottomForHtmlElement = function () {
        var el = this.options.infiniteScrollContainer;
        var elementHeight = el.clientHeight;
        var scrollHeight = el.scrollHeight;
        var bottomPosition = el.scrollTop + elementHeight;
        return scrollHeight - bottomPosition < elementHeight / 2;
    };
    ResultList.prototype.hasPotentiallyMoreResultsToDisplay = function () {
        return this.currentlyDisplayedResults.length > 0 && !this.reachedTheEndOfResults;
    };
    ResultList.prototype.cancelFetchingMoreResultsIfNeeded = function () {
        Iif (this.isCurrentlyFetchingMoreResults()) {
            this.logger.trace('Cancelling fetching more results');
            Promise.reject(this.fetchingMoreResults);
            this.fetchingMoreResults = undefined;
        }
    };
    ResultList.prototype.showOrHideElementsDependingOnState = function (hasQuery, hasResults) {
        var showIfQuery = Dom_1.$$(this.element).findAll('.coveo-show-if-query');
        var showIfNoQuery = Dom_1.$$(this.element).findAll('.coveo-show-if-no-query');
        var showIfResults = Dom_1.$$(this.element).findAll('.coveo-show-if-results');
        var showIfNoResults = Dom_1.$$(this.element).findAll('.coveo-show-if-no-results');
        underscore_1.each(showIfQuery, function (s) {
            Dom_1.$$(s).toggle(hasQuery);
        });
        underscore_1.each(showIfNoQuery, function (s) {
            Dom_1.$$(s).toggle(!hasQuery);
        });
        underscore_1.each(showIfResults, function (s) {
            Dom_1.$$(s).toggle(hasQuery && hasResults);
        });
        underscore_1.each(showIfNoResults, function (s) {
            Dom_1.$$(s).toggle(hasQuery && !hasResults);
        });
    };
    Object.defineProperty(ResultList.prototype, "waitAnimation", {
        get: function () {
            return this.options.waitAnimation.toLowerCase();
        },
        enumerable: true,
        configurable: true
    });
    ResultList.prototype.showWaitingAnimation = function () {
        switch (this.waitAnimation) {
            case 'fade':
                Dom_1.$$(this.options.waitAnimationContainer).addClass('coveo-fade-out');
                break;
            case 'spinner':
                this.resultContainer.hideChildren();
                Eif (Dom_1.$$(this.options.waitAnimationContainer).find('.coveo-wait-animation') == undefined) {
                    this.options.waitAnimationContainer.appendChild(DomUtils_1.DomUtils.getBasicLoadingAnimation());
                }
                break;
        }
    };
    ResultList.prototype.hideWaitingAnimation = function () {
        switch (this.waitAnimation) {
            case 'fade':
                Dom_1.$$(this.options.waitAnimationContainer).removeClass('coveo-fade-out');
                break;
            case 'spinner':
                var spinner = Dom_1.$$(this.options.waitAnimationContainer).find('.coveo-loading-spinner');
                Iif (spinner) {
                    Dom_1.$$(spinner).detach();
                }
                break;
        }
    };
    ResultList.prototype.showWaitingAnimationForInfiniteScrolling = function () {
        var spinner = DomUtils_1.DomUtils.getLoadingSpinner();
        Iif (this.options.layout == 'card' && this.options.enableInfiniteScroll) {
            var previousSpinnerContainer = Dom_1.$$(this.options.waitAnimationContainer).findAll('.coveo-loading-spinner-container');
            underscore_1.each(previousSpinnerContainer, function (previousSpinner) { return Dom_1.$$(previousSpinner).remove(); });
            var spinnerContainer = Dom_1.$$('div', {
                className: 'coveo-loading-spinner-container'
            });
            spinnerContainer.append(spinner);
            this.options.waitAnimationContainer.appendChild(spinnerContainer.el);
        }
        else {
            this.options.waitAnimationContainer.appendChild(DomUtils_1.DomUtils.getLoadingSpinner());
        }
    };
    ResultList.prototype.hideWaitingAnimationForInfiniteScrolling = function () {
        var spinners = Dom_1.$$(this.options.waitAnimationContainer).findAll('.coveo-loading-spinner');
        var containers = Dom_1.$$(this.options.waitAnimationContainer).findAll('.coveo-loading-spinner-container');
        underscore_1.each(spinners, function (spinner) { return Dom_1.$$(spinner).remove(); });
        underscore_1.each(containers, function (container) { return Dom_1.$$(container).remove(); });
    };
    ResultList.prototype.initResultContainer = function () {
        if (!this.options.resultsContainer) {
            var elemType = this.options.layout === 'table' ? 'table' : 'div';
            this.options.resultsContainer = Dom_1.$$(elemType, { className: 'coveo-result-list-container' }).el;
            this.initResultContainerAddToDom();
        }
        return new ResultContainer_1.ResultContainer(this.options.resultsContainer, this.searchInterface);
    };
    ResultList.prototype.initResultContainerAddToDom = function () {
        this.element.appendChild(this.options.resultsContainer);
    };
    ResultList.prototype.initWaitAnimationContainer = function () {
        if (!this.options.waitAnimationContainer) {
            this.options.waitAnimationContainer = this.resultContainer.el;
        }
    };
    ResultList.prototype.setupRenderer = function () {
        var initParameters = {
            options: this.searchInterface.options.originalOptionsObject,
            bindings: this.bindings
        };
        var autoCreateComponentsFn = function (elem) { return Initialization_1.Initialization.automaticallyCreateComponentsInside(elem, initParameters); };
        switch (this.options.layout) {
            case 'card':
                this.renderer = new ResultListCardRenderer_1.ResultListCardRenderer(this.options, autoCreateComponentsFn);
                break;
            case 'table':
                this.renderer = new ResultListTableRenderer_1.ResultListTableRenderer(this.options, autoCreateComponentsFn);
                break;
            case 'list':
            default:
                this.renderer = new ResultListRenderer_1.ResultListRenderer(this.options, autoCreateComponentsFn);
                break;
        }
    };
    ResultList.prototype.makeElementFocusable = function () {
        Dom_1.$$(this.element).setAttribute('tabindex', '-1');
    };
    ResultList.prototype.ensureHasId = function () {
        var currentId = this.element.id;
        Eif (currentId === '') {
            this.element.id = underscore_1.uniqueId('coveo-result-list');
        }
    };
    ResultList.prototype.enableBasedOnActiveLayouts = function () {
        var _this = this;
        // We should try to enable a result list only when the result layout selector currently allow that result list layout to be displayed.
        underscore_1.each(this.resultLayoutSelectors, function (resultLayoutSelector) {
            var found = underscore_1.find(resultLayoutSelector.activeLayouts, function (activeLayout, activeLayoutKey) { return activeLayoutKey == _this.options.layout; });
            if (found) {
                _super.prototype.enable.call(_this);
                resultLayoutSelector.enableLayouts([_this.options.layout]);
                Dom_1.$$(_this.element).removeClass('coveo-hidden');
            }
        });
    };
    ResultList.ID = 'ResultList';
    ResultList.doExport = function () {
        GlobalExports_1.exportGlobally({
            ResultList: ResultList
        });
    };
    /**
     * The options for the ResultList
     * @componentOptions
     */
    ResultList.options = {
        /**
         * The element inside which to insert the rendered result templates.
         *
         * Performing a new query clears the content of this element.
         *
         * You can change the container by specifying its selector (e.g.,
         * `data-result-container-selector='#someCssSelector'`).
         *
         * If you specify no value for this option, a `div` element will be dynamically created and appended to the result
         * list. This element will then be used as a result container.
         */
        resultsContainer: ComponentOptions_1.ComponentOptions.buildChildHtmlElementOption({ alias: 'resultContainerSelector' }),
        resultTemplate: TemplateComponentOptions_1.TemplateComponentOptions.buildTemplateOption({ defaultFunction: ResultList.getDefaultTemplate }),
        /**
         * The type of animation to display while waiting for a query to return.
         *
         * The possible values are:
         * - `fade`: Fades out the current list of results while the query is executing.
         * - `spinner`: Shows a spinning animation while the query is executing.
         * - `none`: Use no animation during queries.
         *
         * See also the [`waitAnimationContainer`]{@link ResultList.options.waitAnimationContainer} option.
         *
         * @examples spinner
         */
        waitAnimation: ComponentOptions_1.ComponentOptions.buildStringOption({ defaultValue: 'none' }),
        /**
         * The element inside which to display the [`waitAnimation`]{@link ResultList.options.waitAnimation}.
         *
         * You can change this by specifying a CSS selector (e.g.,
         * `data-wait-animation-container-selector='#someCssSelector'`).
         *
         * Defaults to the value of the [`resultsContainer`]{@link ResultList.options.resultsContainer} option.
         */
        waitAnimationContainer: ComponentOptions_1.ComponentOptions.buildChildHtmlElementOption({
            postProcessing: function (value, options) { return value || options.resultsContainer; }
        }),
        /**
         * Whether to automatically retrieve an additional page of results and append it to the
         * results that the `ResultList` is currently displaying when the user scrolls down to the bottom of the
         * [`infiniteScrollContainer`]{@link ResultList.options.infiniteScrollContainer}.
         *
         * See also the [`infiniteScrollPageSize`]{@link ResultList.options.infiniteScrollPageSize} and
         * [`enableInfiniteScrollWaitingAnimation`]{@link ResultList.options.enableInfiniteScrollWaitingAnimation} options.
         *
         * It is important to specify the `infiniteScrollContainer` option manually if you want the scrolling element to be
         * something else than the default `window` element. Otherwise, you might find yourself in a strange state where the
         * framework rapidly triggers multiple successive query.
         */
        enableInfiniteScroll: ComponentOptions_1.ComponentOptions.buildBooleanOption({ defaultValue: false }),
        /**
         * The number of additional results to fetch when the user scrolls down to the bottom of the
         * [`infiniteScrollContainer`]{@link ResultList.options.infiniteScrollContainer}.
         *
         * @examples 5
         */
        infiniteScrollPageSize: ComponentOptions_1.ComponentOptions.buildNumberOption({
            defaultValue: 10,
            min: 1,
            depend: 'enableInfiniteScroll'
        }),
        /**
         * The element that triggers fetching additional results when the end user scrolls down to its bottom.
         *
         * You can change the container by specifying its selector (e.g.,
         * `data-infinite-scroll-container-selector='#someCssSelector'`).
         *
         * By default, the framework uses the first vertically scrollable parent element it finds, starting from the
         * `ResultList` element itself. A vertically scrollable element is an element whose CSS `overflow-y` attribute is
         * `scroll`.
         *
         * This implies that if the framework can find no scrollable parent, it uses the `window` itself as a scrollable
         * container.
         *
         * This heuristic is not perfect, for technical reasons. There are always some corner case CSS combination which the
         * framework will not be able to correctly detect as 'scrollable'.
         *
         * It is highly recommended that you manually set this option if you wish something else than the `window` to be the
         * scrollable element.
         */
        infiniteScrollContainer: ComponentOptions_1.ComponentOptions.buildChildHtmlElementOption({
            depend: 'enableInfiniteScroll',
            defaultFunction: function (element) { return ComponentOptions_1.ComponentOptions.findParentScrolling(element); }
        }),
        /**
         * Whether to display the [`waitingAnimation`]{@link ResultList.options.waitAnimation} while fetching additional
         * results.
         */
        enableInfiniteScrollWaitingAnimation: ComponentOptions_1.ComponentOptions.buildBooleanOption({
            depend: 'enableInfiniteScroll',
            defaultValue: true
        }),
        mobileScrollContainer: ComponentOptions_1.ComponentOptions.buildSelectorOption({
            defaultFunction: function () { return document.querySelector('.coveo-results-column'); }
        }),
        /**
         * Whether the `ResultList` should scan its result templates to discover which fields it must request to
         * be able to render all results.
         *
         * Setting this option to `true` ensures that the Coveo Search API does not return fields that are unnecessary for
         * the UI to function.
         *
         * If you set this option to `true`, the fields referenced in your result folding templates won't be automatically resolved.
         * In such a case, you must manually specify those fields using the [`fieldsToInclude`]{@link ResultList.options.fieldsToInclude} option.
         *
         * **Notes:**
         *
         * - Many interfaces created with the JavaScript Search Interface Editor explicitly set this option to `true`.
         * - You cannot set this option to `true` in the Coveo for Sitecore integration.
         */
        autoSelectFieldsToInclude: ComponentOptions_1.ComponentOptions.buildBooleanOption({ defaultValue: false }),
        /**
         * A list of fields to include in the query results.
         *
         * If you set the [`autoSelectFieldsToInclude`]{@link ResultList.options.autoSelectFieldsToInclude} option to
         * `true`, the Coveo Search API returns the fields you specify for this option (if those fields are available) in
         * addition to the fields which the `ResultList` automatically requests. Note that the `autoSelectFieldsToInclude`
         * option doesn't automatically request fields for folding templates; in such a case, you must manually specify
         * fields using this option to avoid empty results.
         *
         * If you set the [`autoSelectFieldsToInclude`]{@link ResultList.options.autoSelectFieldsToInclude} option to
         * `false`, the Coveo Search API only returns the fields you specify for this option (if those fields are
         * available).
         *
         * If you set the [`autoSelectFieldsToInclude`]{@link ResultList.options.autoSelectFieldsToInclude} option to
         * `false` and leave this option undefined, the Coveo Search API returns all available fields.
         */
        fieldsToInclude: ComponentOptions_1.ComponentOptions.buildFieldsOption({ includeInResults: true }),
        /**
         * Specifies the layout to use when displaying results in this `ResultList` (see
         * [Result Layouts](https://docs.coveo.com/en/360/)). Specifying a value for this option automatically
         * populates a [`ResultLayout`]{@link ResultLayout} component with a switcher for the layout.
         *
         * For example, if there are two `ResultList` components in the page, one with its `layout` set to `list` and the
         * other with the same option set to `card`, then the `ResultLayout` component will render two buttons respectively
         * entitled **List** and **Card**.
         *
         * See the [`ValidLayout`]{@link ValidLayout} type for the list of possible values.
         *
         * @examples card
         */
        layout: ComponentOptions_1.ComponentOptions.buildStringOption({
            defaultValue: 'list',
            required: true
        }),
        /**
         * Whether to scroll back to the top of the page when the end-user:
         *  - interacts with a facet when [`infiniteScrollContainer`]{@link ResultList.options.infiniteScrollContainer} is set to `true`
         *  - interacts with the [`Pager`]{@link Pager} component when [`infiniteScrollContainer`]{@link ResultList.options.infiniteScrollContainer} is set to `false`
         *
         * **Note:** Setting this option to `false` has no effect on dynamic facets. To disable this behavior on a `DynamicFacet` component, you must set its own [`enableScrollToTop`]{@link DynamicFacet.options.enableScrollToTop} option to `false`.
         *
         * @availablesince [July 2019 Release (v2.6459)](https://docs.coveo.com/en/2938/)
         */
        enableScrollToTop: ComponentOptions_1.ComponentOptions.buildBooleanOption({
            defaultValue: true
        })
    };
    ResultList.resultCurrentlyBeingRendered = null;
    ResultList.MAX_AMOUNT_OF_SUCESSIVE_REQUESTS = 5;
    return ResultList;
}(Component_1.Component));
exports.ResultList = ResultList;
Initialization_1.Initialization.registerAutoCreateComponent(ResultList);
 
 
/***/ }),
/* 69 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Component_1 = __webpack_require__(6);
var Dom_1 = __webpack_require__(0);
var ComponentsTypes = /** @class */ (function () {
    function ComponentsTypes() {
    }
    Object.defineProperty(ComponentsTypes, "allFacetsType", {
        get: function () {
            return [
                'Facet',
                'FacetSlider',
                'FacetRange',
                'TimespanFacet',
                'HierarchicalFacet',
                'CategoryFacet',
                'DynamicFacet',
                'DynamicFacetRange',
                'DynamicHierarchicalFacet'
            ];
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ComponentsTypes, "allFacetsClassname", {
        get: function () {
            return ComponentsTypes.allFacetsType.map(function (type) { return "Coveo" + type; });
        },
        enumerable: true,
        configurable: true
    });
    ComponentsTypes.getAllFacetElementsFromElement = function (root) {
        var selectors = ComponentsTypes.allFacetsClassname.map(function (className) { return "." + className; }).join(', ');
        var hasNoFacetChild = function (element) { return !Dom_1.$$(element).findAll(selectors).length; };
        return Dom_1.$$(root)
            .findAll(selectors)
            .filter(hasNoFacetChild);
    };
    ComponentsTypes.getAllFacetInstancesFromElement = function (root) {
        return ComponentsTypes.getAllFacetElementsFromElement(root).map(function (element) { return Component_1.Component.get(element); });
    };
    ComponentsTypes.getAllFacetsFromSearchInterface = function (searchInterface) {
        return ComponentsTypes.allFacetsType.reduce(function (facets, facetType) { return facets.concat(searchInterface.getComponents(facetType)); }, []);
    };
    return ComponentsTypes;
}());
exports.ComponentsTypes = ComponentsTypes;
 
 
/***/ }),
/* 70 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Dom_1 = __webpack_require__(0);
var InitializationEvents_1 = __webpack_require__(22);
var Component_1 = __webpack_require__(6);
var SearchInterface_1 = __webpack_require__(25);
var Utils_1 = __webpack_require__(5);
var _ = __webpack_require__(1);
var QueryEvents_1 = __webpack_require__(14);
var Logger_1 = __webpack_require__(18);
var DeviceUtils_1 = __webpack_require__(42);
var underscore_1 = __webpack_require__(1);
var ResponsiveComponentsManager = /** @class */ (function () {
    function ResponsiveComponentsManager(root) {
        var _this = this;
        this.disabledComponents = [];
        this.responsiveComponents = [];
        this.coveoRoot = root;
        this.searchInterface = Component_1.Component.get(this.coveoRoot.el, SearchInterface_1.SearchInterface, false);
        this.dropdownHeadersWrapper = Dom_1.$$('div', {
            className: ResponsiveComponentsManager.DROPDOWN_HEADER_WRAPPER_CSS_CLASS
        });
        this.searchBoxElement = this.getSearchBoxElement();
        this.logger = new Logger_1.Logger(this);
        this.resizeListener = underscore_1.debounce(function () {
            if (_this.isAbleToDetermineMode()) {
                _this.addDropdownHeaderWrapperIfNeeded();
                Eif (_this.shouldSwitchToSmallMode()) {
                    _this.coveoRoot.addClass('coveo-small-interface');
                }
                else if (!_this.shouldSwitchToSmallMode()) {
                    _this.coveoRoot.removeClass('coveo-small-interface');
                }
                _.each(_this.responsiveComponents, function (responsiveComponent) {
                    responsiveComponent.handleResizeEvent();
                });
            }
            else {
                _this.logger
                    .warn("The width of the search interface is 0, cannot dispatch resize events to responsive components. This means that the tabs will not\n        automatically fit in the tab section. Also, the facet and recommendation component will not hide in a menu. Could the search\n        interface display property be none? Could its visibility property be set to hidden? Also, if either of these scenarios happen during\n        loading, it could be the cause of this issue.");
            }
        }, 250);
        // On many android devices, focusing on an input (eg: facet search input) causes the device to "zoom in"
        // and this triggers the window resize event. Since this class modify HTML nodes, Android has the quirks of removing the focus on the input.
        // As a net result, users focus on the text input, the keyboard appears for a few milliseconds, then dissapears instantly when the DOM is modified.
        // Since on a mobile device resizing the page is not something that should really happen, we disable it here.
        Eif (!DeviceUtils_1.DeviceUtils.isMobileDevice()) {
            window.addEventListener('resize', this.resizeListener);
        }
        else {
            window.addEventListener('orientationchange', this.resizeListener);
        }
        this.bindNukeEvents();
        ResponsiveComponentsManager.componentManagers.push(this);
    }
    // Register takes a class and will instantiate it after framework initialization has completed.
    ResponsiveComponentsManager.register = function (responsiveComponentConstructor, root, ID, component, options) {
        var _this = this;
        // options.initializationEventRoot can be set in some instance (like recommendation) where the root of the interface triggering the init event
        // is different from the one that will be used for calculation size.
        var initEventRoot = options.initializationEventRoot || root;
        initEventRoot.on(InitializationEvents_1.InitializationEvents.afterInitialization, function () {
            if (_this.shouldEnableResponsiveMode(root)) {
                _this.registerComponentIfResponsiveModeEnabled(responsiveComponentConstructor, root, ID, component, options);
            }
            _this.remainingComponentInitializations--;
            if (_this.remainingComponentInitializations == 0) {
                _this.instantiateResponsiveComponents(); // necessary to verify if all components are disabled before they are initialized.
                Eif (root.width() == 0) {
                    var logger = new Logger_1.Logger('ResponsiveComponentsManager');
                    logger.info("Search interface width is 0, cannot dispatch resize events to responsive components. Will try again after first\n          query success.");
                    root.one(QueryEvents_1.QueryEvents.querySuccess, function () {
                        _this.resizeAllComponentsManager();
                    });
                }
                else {
                    _this.resizeAllComponentsManager();
                }
            }
        });
        initEventRoot.one(QueryEvents_1.QueryEvents.querySuccess, function () {
            _this.resizeAllComponentsManager();
        });
        this.remainingComponentInitializations++;
    };
    ResponsiveComponentsManager.registerComponentIfResponsiveModeEnabled = function (responsiveComponentConstructor, root, ID, component, options) {
        var responsiveComponentsManager = _.find(this.componentManagers, function (componentManager) { return root.el == componentManager.coveoRoot.el; });
        Iif (!responsiveComponentsManager) {
            responsiveComponentsManager = new ResponsiveComponentsManager(root);
        }
        if (!Utils_1.Utils.isNullOrUndefined(options.enableResponsiveMode) && !options.enableResponsiveMode) {
            responsiveComponentsManager.disableComponent(ID);
            return;
        }
        this.componentInitializations.push({
            responsiveComponentsManager: responsiveComponentsManager,
            arguments: [responsiveComponentConstructor, root, ID, component, options]
        });
    };
    ResponsiveComponentsManager.shouldEnableResponsiveMode = function (root) {
        var searchInterface = Component_1.Component.get(root.el, SearchInterface_1.SearchInterface, true);
        return searchInterface instanceof SearchInterface_1.SearchInterface && searchInterface.options.enableAutomaticResponsiveMode;
    };
    ResponsiveComponentsManager.instantiateResponsiveComponents = function () {
        _.each(this.componentInitializations, function (componentInitialization) {
            var responsiveComponentsManager = componentInitialization.responsiveComponentsManager;
            responsiveComponentsManager.register.apply(responsiveComponentsManager, componentInitialization.arguments);
        });
    };
    ResponsiveComponentsManager.resizeAllComponentsManager = function () {
        _.each(this.componentManagers, function (componentManager) {
            componentManager.resizeListener();
        });
    };
    ResponsiveComponentsManager.prototype.register = function (responsiveComponentConstructor, root, ID, component, options) {
        Iif (this.isDisabled(ID)) {
            return;
        }
        if (!this.isActivated(ID)) {
            var responsiveComponent = new responsiveComponentConstructor(root, ID, options);
            Iif (this.isTabs(ID)) {
                this.responsiveComponents.push(responsiveComponent);
            }
            else {
                // Tabs need to be rendered last, so any dropdown header(eg: facet) is already there when the responsive tabs check for overflow.
                this.responsiveComponents.unshift(responsiveComponent);
            }
        }
        _.each(this.responsiveComponents, function (responsiveComponent) {
            Eif (responsiveComponent.registerComponent != null) {
                responsiveComponent.registerComponent(component);
            }
        });
    };
    ResponsiveComponentsManager.prototype.disableComponent = function (ID) {
        this.disabledComponents.push(ID);
    };
    ResponsiveComponentsManager.prototype.isDisabled = function (ID) {
        return _.indexOf(this.disabledComponents, ID) != -1;
    };
    ResponsiveComponentsManager.prototype.shouldSwitchToSmallMode = function () {
        var aComponentNeedsTabSection = this.needDropdownWrapper();
        var reachedBreakpoint = this.coveoRoot.width() <= this.searchInterface.responsiveComponents.getMediumScreenWidth();
        return aComponentNeedsTabSection || reachedBreakpoint;
    };
    ResponsiveComponentsManager.prototype.needDropdownWrapper = function () {
        for (var i = 0; i < this.responsiveComponents.length; i++) {
            var responsiveComponent = this.responsiveComponents[i];
            Iif (responsiveComponent.needDropdownWrapper && responsiveComponent.needDropdownWrapper()) {
                return true;
            }
        }
        return false;
    };
    ResponsiveComponentsManager.prototype.addDropdownHeaderWrapperIfNeeded = function () {
        Iif (this.needDropdownWrapper()) {
            var tabSection = Dom_1.$$(this.coveoRoot).find('.coveo-tab-section');
            if (this.searchBoxElement) {
                this.dropdownHeadersWrapper.insertAfter(this.searchBoxElement);
            }
            else if (tabSection) {
                this.dropdownHeadersWrapper.insertAfter(tabSection);
            }
            else {
                this.coveoRoot.prepend(this.dropdownHeadersWrapper.el);
            }
        }
    };
    ResponsiveComponentsManager.prototype.isTabs = function (ID) {
        return ID == 'Tab';
    };
    ResponsiveComponentsManager.prototype.isActivated = function (ID) {
        return _.find(this.responsiveComponents, function (current) { return current.ID == ID; }) != undefined;
    };
    ResponsiveComponentsManager.prototype.getSearchBoxElement = function () {
        var searchBoxElement = this.coveoRoot.find('.coveo-search-section');
        Iif (searchBoxElement) {
            return searchBoxElement;
        }
        else {
            return this.coveoRoot.find('.CoveoSearchbox');
        }
    };
    ResponsiveComponentsManager.prototype.bindNukeEvents = function () {
        var _this = this;
        Dom_1.$$(this.coveoRoot).on(InitializationEvents_1.InitializationEvents.nuke, function () {
            window.removeEventListener('resize', _this.resizeListener);
            // If the interface gets nuked, we need to remove all reference to componentManagers stored which match the current search interface
            ResponsiveComponentsManager.componentManagers = _.filter(ResponsiveComponentsManager.componentManagers, function (manager) { return manager.coveoRoot.el != _this.coveoRoot.el; });
        });
    };
    ResponsiveComponentsManager.prototype.isAbleToDetermineMode = function () {
        return this.coveoRoot.width() != 0 || this.searchInterface.options.responsiveMode !== 'auto';
    };
    ResponsiveComponentsManager.DROPDOWN_HEADER_WRAPPER_CSS_CLASS = 'coveo-dropdown-header-wrapper';
    ResponsiveComponentsManager.componentManagers = [];
    ResponsiveComponentsManager.remainingComponentInitializations = 0;
    ResponsiveComponentsManager.componentInitializations = [];
    return ResponsiveComponentsManager;
}());
exports.ResponsiveComponentsManager = ResponsiveComponentsManager;
 
 
/***/ }),
/* 71 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __assign = (this && this.__assign) || Object.assign || function(t) {
    for (var s, i = 1, n = arguments.length; i < n; i++) {
        s = arguments[i];
        for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
            t[p] = s[p];
    }
    return t;
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { Iif (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        Iif (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            Iif (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
            Iif (y = 0, t) op = [0, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    Iif (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    Eif (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        Iif (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
Object.defineProperty(exports, "__esModule", { value: true });
var Component_1 = __webpack_require__(6);
var Strings_1 = __webpack_require__(4);
var ComponentOptions_1 = __webpack_require__(13);
var Dom_1 = __webpack_require__(0);
var Initialization_1 = __webpack_require__(8);
var GlobalExports_1 = __webpack_require__(10);
var CategoryFacetTemplates_1 = __webpack_require__(682);
var CategoryValueRoot_1 = __webpack_require__(1114);
var CategoryFacetQueryController_1 = __webpack_require__(238);
var SVGDom_1 = __webpack_require__(23);
var SVGIcons_1 = __webpack_require__(16);
var QueryStateModel_1 = __webpack_require__(17);
__webpack_require__(1115);
var Model_1 = __webpack_require__(26);
var Utils_1 = __webpack_require__(5);
var underscore_1 = __webpack_require__(1);
var Assert_1 = __webpack_require__(12);
var QueryEvents_1 = __webpack_require__(14);
var CategoryFacetSearch_1 = __webpack_require__(685);
var BreadcrumbEvents_1 = __webpack_require__(33);
var CategoryFacetBreadcrumb_1 = __webpack_require__(686);
var AnalyticsActionListMeta_1 = __webpack_require__(7);
var CategoryFacetDebug_1 = __webpack_require__(687);
var QueryBuilder_1 = __webpack_require__(24);
var ResponsiveFacets_1 = __webpack_require__(146);
var ResponsiveFacetOptions_1 = __webpack_require__(100);
var CategoryFacetHeader_1 = __webpack_require__(688);
var AccessibleButton_1 = __webpack_require__(20);
var DependsOnManager_1 = __webpack_require__(185);
var ResultListUtils_1 = __webpack_require__(72);
var CategoryFacetValuesTree_1 = __webpack_require__(691);
/**
 * The `CategoryFacet` component is a facet that renders values in a hierarchical fashion. It determines the filter to apply depending on the
 * current selected path of values.
 *
 * The path is a sequence of values that leads to a specific value in the hierarchy.
 * It is an array listing all the parents of a file (e.g., `['c', 'folder1']` for the `c:\folder1\text1.txt` file).
 *
 * This facet requires a [`field`]{@link CategoryFacet.options.field} with a special format to work correctly (see [Using the Category Facet Component](https://docs.coveo.com/en/2667)).
 *
 * @notSupportedIn salesforcefree
 * @availablesince [January 2019 Release (v2.5395.12)](https://docs.coveo.com/en/3277/#january-2019-release-v2539512)
 */
var CategoryFacet = /** @class */ (function (_super) {
    __extends(CategoryFacet, _super);
    function CategoryFacet(element, options, bindings) {
        var _this = _super.call(this, element, 'CategoryFacet', bindings) || this;
        _this.element = element;
        _this.options = options;
        _this.listenToQueryStateChange = true;
        _this.isFieldValueCompatible = false;
        _this.moreValuesToFetch = true;
        _this.showingWaitAnimation = false;
        _this.numberOfChildValuesCurrentlyDisplayed = 0;
        _this.options = ComponentOptions_1.ComponentOptions.initComponentOptions(element, CategoryFacet, options);
        _this.categoryFacetQueryController = new CategoryFacetQueryController_1.CategoryFacetQueryController(_this);
        _this.categoryFacetTemplates = new CategoryFacetTemplates_1.CategoryFacetTemplates();
        _this.categoryValueRoot = new CategoryValueRoot_1.CategoryValueRoot(Dom_1.$$(_this.element), _this.categoryFacetTemplates, _this);
        _this.categoryValueRoot.path = _this.activePath;
        _this.currentPage = 0;
        _this.numberOfValues = _this.options.numberOfValues;
        _this.categoryFacetValuesTree = new CategoryFacetValuesTree_1.CategoryFacetValuesTree();
        _this.tryToInitFacetSearch();
        Iif (_this.options.debug) {
            new CategoryFacetDebug_1.CategoryFacetDebug(_this);
        }
        ResponsiveFacets_1.ResponsiveFacets.init(_this.root, _this, _this.options);
        _this.initDependsOnManager();
        _this.bind.onRootElement(QueryEvents_1.QueryEvents.buildingQuery, function (args) { return _this.handleBuildingQuery(args); });
        _this.bind.onRootElement(QueryEvents_1.QueryEvents.querySuccess, function (args) { return _this.handleQuerySuccess(args); });
        _this.bind.onRootElement(QueryEvents_1.QueryEvents.duringQuery, function () { return _this.addFading(); });
        _this.bind.onRootElement(QueryEvents_1.QueryEvents.deferredQuerySuccess, function () { return _this.handleDeferredQuerySuccess(); });
        _this.bind.onRootElement(BreadcrumbEvents_1.BreadcrumbEvents.populateBreadcrumb, function (args) { return _this.handlePopulateBreadCrumb(args); });
        _this.bind.onRootElement(BreadcrumbEvents_1.BreadcrumbEvents.clearBreadcrumb, function () { return _this.handleClearBreadcrumb(); });
        _this.buildFacetHeader();
        _this.initQueryStateEvents();
        return _this;
    }
    CategoryFacet.prototype.isCurrentlyDisplayed = function () {
        return Dom_1.$$(this.element).isVisible();
    };
    Object.defineProperty(CategoryFacet.prototype, "activePath", {
        get: function () {
            return this.queryStateModel.get(this.queryStateAttribute) || this.options.basePath;
        },
        set: function (newPath) {
            this.listenToQueryStateChange = false;
            this.queryStateModel.set(this.queryStateAttribute, newPath);
            this.listenToQueryStateChange = true;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(CategoryFacet.prototype, "queryStateAttribute", {
        get: function () {
            return QueryStateModel_1.QueryStateModel.getFacetId(this.options.id);
        },
        enumerable: true,
        configurable: true
    });
    CategoryFacet.prototype.handleBuildingQuery = function (args) {
        this.positionInQuery = this.categoryFacetQueryController.putCategoryFacetInQueryBuilder(args.queryBuilder, this.activePath, this.numberOfValues + 1);
    };
    CategoryFacet.prototype.scrollToTop = function () {
        ResultListUtils_1.ResultListUtils.scrollToTop(this.root);
    };
    CategoryFacet.prototype.tryToInitFacetSearch = function () {
        if (!this.isFacetSearchAvailable) {
            return this.logDisabledFacetSearchWarning();
        }
        this.categoryFacetSearch = new CategoryFacetSearch_1.CategoryFacetSearch(this, this.options.displaySearchButton);
    };
    CategoryFacet.prototype.logDisabledFacetSearchWarning = function () {
        if (this.isEnableFacetSearchFalsy) {
            return;
        }
        var valueCaptionAttributeName = this.getOptionAttributeName('valueCaption');
        var enableFacetSearchAttributeName = this.getOptionAttributeName('enableFacetSearch');
        var field = this.options.field;
        this.logger.warn("The search box is disabled on the " + field + " CategoryFacet. To hide this warning,\n    either remove the " + valueCaptionAttributeName + " option or set the " + enableFacetSearchAttributeName + " option to \"false\".");
    };
    CategoryFacet.prototype.getOptionAttributeName = function (optionName) {
        return ComponentOptions_1.ComponentOptions.attrNameFromName(optionName);
    };
    Object.defineProperty(CategoryFacet.prototype, "isFacetSearchAvailable", {
        get: function () {
            if (this.areValueCaptionsSpecified) {
                return false;
            }
            if (this.isEnableFacetSearchFalsy) {
                return false;
            }
            return true;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(CategoryFacet.prototype, "areValueCaptionsSpecified", {
        get: function () {
            var valueCaptions = this.options.valueCaption;
            return underscore_1.keys(valueCaptions).length !== 0;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(CategoryFacet.prototype, "isEnableFacetSearchFalsy", {
        get: function () {
            return !this.options.enableFacetSearch;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(CategoryFacet.prototype, "isCategoryEmpty", {
        get: function () {
            return !this.categoryValueRoot.children.length;
        },
        enumerable: true,
        configurable: true
    });
    CategoryFacet.prototype.updateAppearance = function () {
        if (this.disabled || this.isCategoryEmpty) {
            return this.hide();
        }
        this.show();
    };
    CategoryFacet.prototype.handleQuerySuccess = function (args) {
        Iif (Utils_1.Utils.isNullOrUndefined(args.results.categoryFacets)) {
            return this.notImplementedError();
        }
        if (Utils_1.Utils.isNullOrUndefined(args.results.categoryFacets[this.positionInQuery])) {
            return;
        }
        var numberOfRequestedValues = args.query.categoryFacets[this.positionInQuery].maximumNumberOfValues;
        var categoryFacetResult = args.results.categoryFacets[this.positionInQuery];
        this.moreValuesToFetch = numberOfRequestedValues == categoryFacetResult.values.length;
        this.clear();
        if (categoryFacetResult.notImplemented) {
            return this.notImplementedError();
        }
        if (!categoryFacetResult.values.length && !categoryFacetResult.parentValues.length) {
            return;
        }
        this.renderValues(categoryFacetResult, numberOfRequestedValues);
        if (this.isFacetSearchAvailable) {
            var facetSearch = this.categoryFacetSearch.build();
            this.options.displaySearchOnTop
                ? Dom_1.$$(facetSearch).insertBefore(this.categoryValueRoot.listRoot.el)
                : Dom_1.$$(facetSearch).insertAfter(this.categoryValueRoot.listRoot.el);
        }
        this.moreLessContainer = Dom_1.$$('div', { className: 'coveo-category-facet-more-less-container' });
        Dom_1.$$(this.element).append(this.moreLessContainer.el);
        Eif (this.options.enableMoreLess) {
            this.renderMoreLess();
        }
        if (!this.isPristine()) {
            Dom_1.$$(this.element).addClass('coveo-category-facet-non-empty-path');
        }
    };
    /**
     * Changes the active path.
     *
     */
    CategoryFacet.prototype.changeActivePath = function (path) {
        this.activePath = path;
    };
    CategoryFacet.prototype.executeQuery = function () {
        return __awaiter(this, void 0, void 0, function () {
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        this.showWaitingAnimation();
                        _a.label = 1;
                    case 1:
                        _a.trys.push([1, , 3, 4]);
                        return [4 /*yield*/, this.queryController.executeQuery()];
                    case 2:
                        _a.sent();
                        return [3 /*break*/, 4];
                    case 3:
                        this.hideWaitingAnimation();
                        return [7 /*endfinally*/];
                    case 4: return [2 /*return*/];
                }
            });
        });
    };
    /**
     * Reloads the facet with the same path.
     */
    CategoryFacet.prototype.reload = function () {
        this.changeActivePath(this.activePath);
        this.logAnalyticsEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.categoryFacetReload);
        this.executeQuery();
    };
    /**
     * Returns all the visible parent values.
     * @returns simple object with three fields: `value`, `count` and `path`.
     */
    CategoryFacet.prototype.getVisibleParentValues = function () {
        return this.getVisibleParentCategoryValues().map(function (categoryValue) { return categoryValue.getDescriptor(); });
    };
    CategoryFacet.prototype.getVisibleParentCategoryValues = function () {
        if (this.categoryValueRoot.children.length == 0 || this.categoryValueRoot.children[0].children.length == 0) {
            return [];
        }
        var currentParentvalue = this.categoryValueRoot.children[0];
        var parentValues = [currentParentvalue];
        while (currentParentvalue.children.length != 0 && !Utils_1.Utils.arrayEqual(currentParentvalue.path, this.activePath)) {
            currentParentvalue = currentParentvalue.children[0];
            parentValues.push(currentParentvalue);
        }
        return parentValues;
    };
    /**
     * Shows more values according to {@link CategoryFacet.options.pageSize}.
     *
     * See the [`enableMoreLess`]{@link CategoryFacet.options.enableMoreLess}, and
     * [`numberOfValues`]{@link CategoryFacet.options.numberOfValues} options.
     */
    CategoryFacet.prototype.showMore = function () {
        Eif (this.moreValuesToFetch) {
            this.currentPage++;
            this.numberOfValues = this.options.numberOfValues + this.currentPage * this.options.pageSize;
            this.reload();
            this.logAnalyticsFacetShowMoreLess(AnalyticsActionListMeta_1.analyticsActionCauseList.facetShowMore);
        }
    };
    /**
     * Shows less values, up to the original number of values.
     *
     * See the [`enableMoreLess`]{@link CategoryFacet.options.enableMoreLess}, and
     * [`numberOfValues`]{@link CategoryFacet.options.numberOfValues} options.
     */
    CategoryFacet.prototype.showLess = function () {
        if (this.currentPage > 0) {
            this.currentPage--;
            this.numberOfValues = this.options.numberOfValues + this.currentPage * this.options.pageSize;
            this.reload();
            this.logAnalyticsFacetShowMoreLess(AnalyticsActionListMeta_1.analyticsActionCauseList.facetShowLess);
        }
    };
    /**
     * Returns the values at the bottom of the hierarchy. These are the values that are not yet applied to the query.
     * @returns simple object with three fields: `value`, `count` and `path`.
     */
    CategoryFacet.prototype.getAvailableValues = function () {
        Iif (!this.activeCategoryValue) {
            return [];
        }
        return this.activeCategoryValue.children.map(function (categoryValue) {
            return {
                value: categoryValue.categoryValueDescriptor.value,
                count: categoryValue.categoryValueDescriptor.count,
                path: categoryValue.path
            };
        });
    };
    /**
     * Selects a value from the currently available values.
     * If the given value to select is not in the available values, it will throw an error.
     */
    CategoryFacet.prototype.selectValue = function (value) {
        Assert_1.Assert.check(underscore_1.contains(underscore_1.pluck(this.getAvailableValues(), 'value'), value), 'Failed while trying to select a value that is not available.');
        var newPath = this.activePath.slice(0);
        newPath.push(value);
        this.changeActivePath(newPath);
        this.logAnalyticsEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.categoryFacetSelect);
        this.executeQuery();
    };
    /**
     * Deselects the last value in the hierarchy that is applied to the query. When at the top of the hierarchy, this method does nothing.
     */
    CategoryFacet.prototype.deselectCurrentValue = function () {
        if (this.activePath.length == 0) {
            return;
        }
        var newPath = this.activePath.slice(0);
        newPath.pop();
        this.changeActivePath(newPath);
        this.logAnalyticsEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.categoryFacetSelect);
        this.executeQuery();
    };
    CategoryFacet.prototype.resetPath = function () {
        this.changeActivePath(this.options.basePath);
    };
    /**
     * Resets the facet to its initial state.
     */
    CategoryFacet.prototype.reset = function () {
        this.resetPath();
        this.logAnalyticsEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.categoryFacetClear);
        this.executeQuery();
    };
    /**
     * Hides the component.
     */
    CategoryFacet.prototype.hide = function () {
        Dom_1.$$(this.element).addClass('coveo-hidden');
    };
    /**
     * Shows the component.
     */
    CategoryFacet.prototype.show = function () {
        Dom_1.$$(this.element).removeClass('coveo-hidden');
    };
    CategoryFacet.prototype.enable = function () {
        _super.prototype.enable.call(this);
        this.updateAppearance();
    };
    CategoryFacet.prototype.disable = function () {
        _super.prototype.disable.call(this);
        this.updateAppearance();
    };
    /**
     * Goes through any value that contains the value parameter, and verifies whether there are missing parents.
     * Issues are then logged in the console.
     * If you do not want to specify a value, you can simply enable {@link CategoryFacet.options.debug} and do an empty query.
     */
    CategoryFacet.prototype.debugValue = function (value) {
        return __awaiter(this, void 0, void 0, function () {
            var queryBuilder, queryResults;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        queryBuilder = new QueryBuilder_1.QueryBuilder();
                        this.categoryFacetQueryController.addDebugGroupBy(queryBuilder, value);
                        return [4 /*yield*/, this.queryController.getEndpoint().search(queryBuilder.build())];
                    case 1:
                        queryResults = _a.sent();
                        CategoryFacetDebug_1.CategoryFacetDebug.analyzeResults(queryResults.groupByResults[0], this.options.delimitingCharacter);
                        return [2 /*return*/];
                }
            });
        });
    };
    /**
     *
     * @param value The string to find a caption for.
     * Returns the caption for a value or the value itself if no caption is available.
     */
    CategoryFacet.prototype.getCaption = function (value) {
        var valueCaptions = this.options.valueCaption;
        var caption = valueCaptions[value];
        return caption ? caption : value;
    };
    CategoryFacet.prototype.showWaitingAnimation = function () {
        this.ensureDom();
        if (!this.showingWaitAnimation) {
            Dom_1.$$(this.headerElement).find('.coveo-category-facet-header-wait-animation').style.visibility = 'visible';
            this.showingWaitAnimation = true;
        }
    };
    CategoryFacet.prototype.hideWaitingAnimation = function () {
        this.ensureDom();
        if (this.showingWaitAnimation) {
            Dom_1.$$(this.headerElement).find('.coveo-category-facet-header-wait-animation').style.visibility = 'hidden';
            this.showingWaitAnimation = false;
        }
    };
    CategoryFacet.prototype.logAnalyticsEvent = function (eventName, path) {
        if (path === void 0) { path = this.activePath; }
        this.usageAnalytics.logSearchEvent(eventName, {
            categoryFacetId: this.options.id,
            categoryFacetField: this.options.field.toString(),
            categoryFacetPath: path,
            categoryFacetTitle: this.options.title
        });
    };
    CategoryFacet.prototype.getEndpoint = function () {
        return this.queryController.getEndpoint();
    };
    Object.defineProperty(CategoryFacet.prototype, "children", {
        get: function () {
            return this.categoryValueRoot.children;
        },
        enumerable: true,
        configurable: true
    });
    CategoryFacet.prototype.renderValues = function (categoryFacetResult, numberOfRequestedValues) {
        this.categoryFacetValuesTree.storeNewValues(categoryFacetResult);
        var sortedParentValues = this.sortParentValues(categoryFacetResult.parentValues);
        var currentParentValue = this.categoryValueRoot;
        var needToTruncate = false;
        var pathOfLastTruncatedParentValue;
        var numberOfItemsInFirstSlice = Math.floor(CategoryFacet.NUMBER_OF_VALUES_TO_KEEP_AFTER_TRUNCATING / 2);
        var numberOfItemsInSecondSlice = Math.ceil(CategoryFacet.NUMBER_OF_VALUES_TO_KEEP_AFTER_TRUNCATING / 2);
        sortedParentValues = this.hideBasePathInParentValues(sortedParentValues);
        if (this.shouldTruncate(sortedParentValues)) {
            pathOfLastTruncatedParentValue = this.findPathOfLastTruncatedParentValue(sortedParentValues, numberOfItemsInSecondSlice);
            needToTruncate = true;
            sortedParentValues = underscore_1.first(sortedParentValues, numberOfItemsInFirstSlice).concat(underscore_1.last(sortedParentValues, numberOfItemsInSecondSlice));
        }
        if (!this.isPristine()) {
            this.addAllCategoriesButton();
        }
        for (var i = 0; i < sortedParentValues.length; i++) {
            currentParentValue = currentParentValue.renderAsParent(sortedParentValues[i]);
            // We do not want to make the "last" parent selectable, as clicking it would be a noop (re-selecting the same filter)
            var isLastParent = i == sortedParentValues.length - 1;
            if (!isLastParent) {
                currentParentValue.makeSelectable().showCollapseArrow();
            }
            if (needToTruncate) {
                if (i == numberOfItemsInFirstSlice - 1) {
                    this.addEllipsis();
                }
                if (i == numberOfItemsInFirstSlice) {
                    currentParentValue.path = pathOfLastTruncatedParentValue.concat([sortedParentValues[i].value]);
                }
            }
        }
        var childrenValuesToRender = this.moreValuesToFetch
            ? categoryFacetResult.values.slice(0, numberOfRequestedValues - 1)
            : categoryFacetResult.values.slice(0, numberOfRequestedValues);
        this.numberOfChildValuesCurrentlyDisplayed = childrenValuesToRender.length;
        currentParentValue.renderChildren(childrenValuesToRender);
        this.activeCategoryValue = currentParentValue;
    };
    CategoryFacet.prototype.hideBasePathInParentValues = function (parentValues) {
        if (Utils_1.Utils.arrayEqual(underscore_1.first(this.activePath, this.options.basePath.length), this.options.basePath)) {
            parentValues = underscore_1.last(parentValues, parentValues.length - this.options.basePath.length);
        }
        return parentValues;
    };
    CategoryFacet.prototype.shouldTruncate = function (parentValues) {
        return parentValues.length > CategoryFacet.MAXIMUM_NUMBER_OF_VALUES_BEFORE_TRUNCATING;
    };
    CategoryFacet.prototype.addEllipsis = function () {
        this.categoryValueRoot.listRoot.append(this.categoryFacetTemplates.buildEllipsis().el);
    };
    CategoryFacet.prototype.findPathOfLastTruncatedParentValue = function (sortedParentValues, numberOfItemsInSecondSlice) {
        var indexOfLastTruncatedParentValue = sortedParentValues.length - numberOfItemsInSecondSlice - 1;
        return underscore_1.reduce(underscore_1.first(sortedParentValues, indexOfLastTruncatedParentValue + 1), function (path, parentValue) { return path.concat([parentValue.value]); }, []);
    };
    CategoryFacet.prototype.addAllCategoriesButton = function () {
        var _this = this;
        var allCategories = this.categoryFacetTemplates.buildAllCategoriesButton();
        new AccessibleButton_1.AccessibleButton()
            .withLabel(Strings_1.l('AllCategories'))
            .withElement(allCategories)
            .withSelectAction(function () {
            _this.reset();
            _this.scrollToTop();
        })
            .build();
        this.categoryValueRoot.listRoot.append(allCategories.el);
    };
    CategoryFacet.prototype.isPristine = function () {
        return Utils_1.Utils.arrayEqual(this.activePath, this.options.basePath);
    };
    CategoryFacet.prototype.buildFacetHeader = function () {
        var facetHeader = new CategoryFacetHeader_1.CategoryFacetHeader({ categoryFacet: this, title: this.options.title });
        this.headerElement = facetHeader.build();
        Dom_1.$$(this.element).prepend(this.headerElement);
    };
    CategoryFacet.prototype.handleQueryStateChanged = function (data) {
        if (this.listenToQueryStateChange) {
            var path = data.attributes[this.queryStateAttribute];
            Iif (!Utils_1.Utils.isNullOrUndefined(path) && underscore_1.isArray(path) && path.length != 0) {
                this.activePath = path;
            }
        }
    };
    CategoryFacet.prototype.initQueryStateEvents = function () {
        var _this = this;
        this.queryStateModel.registerNewAttribute(this.queryStateAttribute, this.options.basePath);
        this.bind.onQueryState(Model_1.MODEL_EVENTS.CHANGE, undefined, function (data) { return _this.handleQueryStateChanged(data); });
    };
    CategoryFacet.prototype.initDependsOnManager = function () {
        var _this = this;
        var facetInfo = {
            reset: function () { return _this.dependsOnReset(); },
            ref: this
        };
        this.dependsOnManager = new DependsOnManager_1.DependsOnManager(facetInfo);
    };
    CategoryFacet.prototype.dependsOnReset = function () {
        this.changeActivePath(this.options.basePath);
        this.clear();
    };
    CategoryFacet.prototype.addFading = function () {
        Dom_1.$$(this.element).addClass('coveo-category-facet-values-fade');
    };
    CategoryFacet.prototype.handleDeferredQuerySuccess = function () {
        this.updateAppearance();
        this.removeFading();
    };
    CategoryFacet.prototype.removeFading = function () {
        Dom_1.$$(this.element).removeClass('coveo-category-facet-values-fade');
    };
    CategoryFacet.prototype.notImplementedError = function () {
        var errorMessage = 'Category Facets are not supported by your current search endpoint. Disabling this component.';
        this.logger.error(errorMessage);
        this.disable();
    };
    CategoryFacet.prototype.sortParentValues = function (parentValues) {
        if (this.activePath.length != parentValues.length) {
            this.logger.warn('Inconsistent CategoryFacet results: Number of parent values results does not equal length of active path');
            return parentValues;
        }
        var sortedParentvalues = [];
        var _loop_1 = function (pathElement) {
            var currentParentValue = underscore_1.find(parentValues, function (parentValue) { return parentValue.value.toLowerCase() == pathElement.toLowerCase(); });
            Iif (!currentParentValue) {
                this_1.logger.warn('Inconsistent CategoryFacet results: path not consistent with parent values results');
                return { value: parentValues };
            }
            sortedParentvalues.push(currentParentValue);
        };
        var this_1 = this;
        for (var _i = 0, _a = this.activePath; _i < _a.length; _i++) {
            var pathElement = _a[_i];
            var state_1 = _loop_1(pathElement);
            Iif (typeof state_1 === "object")
                return state_1.value;
        }
        return sortedParentvalues;
    };
    CategoryFacet.prototype.renderMoreLess = function () {
        if (this.numberOfChildValuesCurrentlyDisplayed > this.options.numberOfValues) {
            this.moreLessContainer.append(this.buildLessButton());
        }
        if (this.moreValuesToFetch) {
            this.moreLessContainer.append(this.buildMoreButton());
        }
    };
    CategoryFacet.prototype.clear = function () {
        this.categoryValueRoot.clear();
        if (this.isFacetSearchAvailable) {
            this.categoryFacetSearch.clear();
        }
        this.moreLessContainer && this.moreLessContainer.detach();
        Dom_1.$$(this.element).removeClass('coveo-category-facet-non-empty-path');
    };
    CategoryFacet.prototype.buildMoreButton = function () {
        var _this = this;
        var svgContainer = Dom_1.$$('span', { className: 'coveo-facet-more-icon' }, SVGIcons_1.SVGIcons.icons.arrowDown).el;
        SVGDom_1.SVGDom.addClassToSVGInContainer(svgContainer, 'coveo-facet-more-icon-svg');
        var more = Dom_1.$$('div', { className: 'coveo-category-facet-more' }, svgContainer);
        new AccessibleButton_1.AccessibleButton()
            .withElement(more)
            .withSelectAction(function () { return _this.showMore(); })
            .withLabel(Strings_1.l('ShowMoreFacetResults', this.options.title))
            .build();
        return more.el;
    };
    CategoryFacet.prototype.buildLessButton = function () {
        var _this = this;
        var svgContainer = Dom_1.$$('span', { className: 'coveo-facet-less-icon' }, SVGIcons_1.SVGIcons.icons.arrowUp).el;
        SVGDom_1.SVGDom.addClassToSVGInContainer(svgContainer, 'coveo-facet-less-icon-svg');
        var less = Dom_1.$$('div', { className: 'coveo-category-facet-less' }, svgContainer);
        new AccessibleButton_1.AccessibleButton()
            .withElement(less)
            .withSelectAction(function () { return _this.showLess(); })
            .withLabel(Strings_1.l('ShowLessFacetResults', this.options.title))
            .build();
        return less.el;
    };
    CategoryFacet.prototype.handlePopulateBreadCrumb = function (args) {
        var _this = this;
        Iif (this.isPristine()) {
            return;
        }
        var lastParentValue = this.categoryFacetValuesTree.getValueForLastPartInPath(this.activePath);
        var descriptor = {
            path: this.activePath,
            count: lastParentValue.numberOfResults,
            value: lastParentValue.value
        };
        var resetFacet = function () {
            _this.logAnalyticsEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.breadcrumbFacet);
            _this.reset();
        };
        var categoryFacetBreadcrumbBuilder = new CategoryFacetBreadcrumb_1.CategoryFacetBreadcrumb(this, resetFacet, descriptor, { headingLevel: args.headingLevel });
        args.breadcrumbs.push({ element: categoryFacetBreadcrumbBuilder.build() });
    };
    CategoryFacet.prototype.handleClearBreadcrumb = function () {
        this.changeActivePath(this.options.basePath);
    };
    CategoryFacet.prototype.logAnalyticsFacetShowMoreLess = function (cause) {
        this.usageAnalytics.logCustomEvent(cause, {
            facetId: this.options.id,
            facetField: this.options.field.toString(),
            facetTitle: this.options.title
        }, this.element);
    };
    CategoryFacet.doExport = function () {
        GlobalExports_1.exportGlobally({
            CategoryFacet: CategoryFacet
        });
    };
    CategoryFacet.ID = 'CategoryFacet';
    /**
     * The options for the component
     * @componentOptions
     */
    CategoryFacet.options = __assign({ 
        /**
         * The index field whose values the facet should use. The field values should have the form:
         * `the; the|path; the|path|to; the|path|to|given; the|path|to|given|item;`
         * where the delimiting character is `|`. This default delimiting character can be changed using the [delimitingCharacter]{@link CategoryFacet.options.delimitingCharacter} option.
         *
         * To help you verify whether your fields are setup correctly, see the {@link CategoryFacet.options.debug} option
         * and the {@link CategoryFacet.debugValue} method.
         *
         * See [Using the Category Facet Component](https://docs.coveo.com/en/2667).
         */
        field: ComponentOptions_1.ComponentOptions.buildFieldOption({ required: true }), 
        /**
         * The title to display at the top of the facet.
         *
         * Default value is the localized string for `NoTitle`.
         */
        title: ComponentOptions_1.ComponentOptions.buildLocalizedStringOption({
            localizedString: function () { return Strings_1.l('NoTitle'); }
        }), 
        /**
         * The maximum number of field values to display by default in the facet before the user
         * clicks the arrow to show more.
         *
         * See also the [`enableMoreLess`]{@link CategoryFacet.options.enableMoreLess} option.
         */
        numberOfValues: ComponentOptions_1.ComponentOptions.buildNumberOption({ defaultValue: 5, min: 0, section: 'CommonOptions' }), 
        /**
         * Whether to display a search box at the bottom of the facet for searching among the available facet
         * [`field`]{@link CategoryFacet.options.field} values.
         *
         * See also the [`facetSearchDelay`]{@link CategoryFacet.options.facetSearchDelay}, and
         * [`numberOfResultsInFacetSearch`]{@link CategoryFacet.options.numberOfResultsInFacetSearch} options.
         *
         *
         * Default value is `true`.
         */
        enableFacetSearch: ComponentOptions_1.ComponentOptions.buildBooleanOption({ defaultValue: true }), 
        /**
         * A unique identifier for the facet. Among other things, this identifier serves the purpose of saving
         * the facet state in the URL hash.
         *
         * If you have two facets with the same field on the same page, you should specify an `id` value for at least one of
         * those two facets. This `id` must be unique among the facets.
         *
         * Default value is the [`field`]{@link CategoryFacet.options.field} option value.
         */
        id: ComponentOptions_1.ComponentOptions.buildStringOption({
            postProcessing: function (value, options) { return value || options.field; }
        }), 
        /**
         * The *injection depth* to use.
         *
         * The injection depth determines how many results to scan in the index to ensure that the category facet lists all potential
         * facet values. Increasing this value enhances the accuracy of the listed values at the cost of performance.
         *
         * Default value is `1000`. Minimum value is `1000`.
         * @notSupportedIn salesforcefree
         *
         * @examples 1500
         */
        injectionDepth: ComponentOptions_1.ComponentOptions.buildNumberOption({ defaultValue: 1000, min: 1000 }), 
        /**
         * If the [`enableFacetSearch`]{@link CategoryFacet.options.enableFacetSearch} option is `true`, specifies the number of
         * values to display in the facet search results popup.
         *
         * Default value is `15`. Minimum value is `1`.
         */
        numberOfResultsInFacetSearch: ComponentOptions_1.ComponentOptions.buildNumberOption({ defaultValue: 15, min: 1 }), 
        /**
         * If the [`enableFacetSearch`]{@link CategoryFacet.options.enableFacetSearch} option is `true`, specifies the delay (in
         * milliseconds) before sending a search request to the server when the user starts typing in the category facet search box.
         *
         * Specifying a smaller value makes results appear faster. However, chances of having to cancel many requests
         * sent to the server increase as the user keeps on typing new characters.
         *
         * Default value is `100`. Minimum value is `0`.
         */
        facetSearchDelay: ComponentOptions_1.ComponentOptions.buildNumberOption({ defaultValue: 100, min: 0 }), 
        /**
         * Whether to enable the **More** and **Less** buttons in the Facet.
         *
         * See also the [`pageSize`]{@link CategoryFacet.options.pageSize} option.
         *
         * Default value is `true`.
         */
        enableMoreLess: ComponentOptions_1.ComponentOptions.buildBooleanOption({ defaultValue: true }), 
        /**
         * If the [`enableMoreLess`]{@link CategoryFacet.options.enableMoreLess} option is `true`, specifies the number of
         * additional results to fetch when clicking the **More** button.
         *
         * Default value is `10`. Minimum value is `1`.
         */
        pageSize: ComponentOptions_1.ComponentOptions.buildNumberOption({ defaultValue: 10, min: 1, depend: 'enableMoreLess' }), 
        /**
         * The character that specifies the hierarchical dependency.
         *
         * **Example:**
         *
         * If your field has the following values:
         *
         * `@field: c; c>folder2; c>folder2>folder3;`
         *
         * The delimiting character is `>`.
         *
         * Default value is `|`.
         */
        delimitingCharacter: ComponentOptions_1.ComponentOptions.buildStringOption({ defaultValue: '|' }), 
        /**
         * The path to use as the path prefix for every query.
         *
         * **Example:**
         *
         * You have the following files indexed on a file system:
         * ```
         * c:\
         *    folder1\
         *      text1.txt
         *    folder2\
         *      folder3\
         *        text2.txt
         * ```
         * Setting the `basePath` to `c` would display `folder1` and `folder2` in the `CategoryFacet`, but omit `c`.
         *
         * This options accepts an array of values. To specify a "deeper" starting path in your tree, you need to use comma-separated values.
         *
         * For example, setting `data-base-path="c,folder1"` on the component markup would display `folder3` in the `CategoryFacet`, but omit `c` and `folder1`.
         *
         */
        basePath: ComponentOptions_1.ComponentOptions.buildListOption({ defaultValue: [] }), 
        /**
         * The maximum number of levels to traverse in the hierarchy.
         * This option does not count the length of the base path. The depth depends on what is shown in the interface.
         *
         * Default value is `Number.MAX_VALUE`.
         */
        maximumDepth: ComponentOptions_1.ComponentOptions.buildNumberOption({ min: 1, defaultValue: Number.MAX_VALUE }), 
        /**
         * Whether to activate field format debugging.
         * This options logs messages in the console for any potential encountered issues.
         * This option can have negative effects on performance, and should only be activated when debugging.
         */
        debug: ComponentOptions_1.ComponentOptions.buildBooleanOption({ defaultValue: false }), 
        /**
         * Specifies a JSON object describing a mapping of facet values to their desired captions. See
         * [Normalizing Facet Value Captions](https://developers.coveo.com/x/jBsvAg).
         *
         * **Note:**
         * If this option is specified, the facet search box will be unavailable.
         *
         * **Examples:**
         *
         * You can set the option in the ['init']{@link init} call:
         * ```javascript
         * var myValueCaptions = {
         *   "txt" : "Text files",
         *   "html" : "Web page",
         *   [ ... ]
         * };
         *
         * Coveo.init(document.querySelector("#search"), {
         *   Facet : {
         *     valueCaption : myValueCaptions
         *   }
         * });
         * ```
         *
         * Or before the `init` call, using the ['options']{@link options} top-level function:
         * ```javascript
         * Coveo.options(document.querySelector("#search"), {
         *   Facet : {
         *     valueCaption : myValueCaptions
         *   }
         * });
         * ```
         *
         * Or directly in the markup:
         * ```html
         * <!-- Ensure that the double quotes are properly handled in data-value-caption. -->
         * <div class='CoveoCategoryFacet' data-field='@myotherfield' data-value-caption='{"txt":"Text files","html":"Web page"}'></div>
         * ```
         */
        valueCaption: ComponentOptions_1.ComponentOptions.buildJsonOption({ defaultValue: {} }), 
        /**
         * The [id](@link Facet.options.id) of another facet in which at least one value must be selected in order
         * for the dependent category facet to be visible.
         *
         * **Default:** `undefined` and the category facet does not depend on any other facet to be displayed.
         *
         * @availablesince [September 2019 Release (v2.7023)](https://docs.coveo.com/en/2990/)
         */
        dependsOn: ComponentOptions_1.ComponentOptions.buildStringOption(), 
        /**
         * A function that verifies whether the current state of the `dependsOn` facet allows the dependent facet to be displayed.
         *
         * If specified, the function receives a reference to the resolved `dependsOn` facet component instance as an argument, and must return a boolean.
         * The function's argument should typically be treated as read-only.
         *
         * By default, the dependent facet is displayed whenever one or more values are selected in its `dependsOn` facet.
         *
         * @externaldocs [Defining Dependent Facets](https://docs.coveo.com/3210/)
         */
        dependsOnCondition: ComponentOptions_1.ComponentOptions.buildCustomOption(function () {
            return null;
        }, { depend: 'dependsOn', section: 'CommonOptions' }), 
        /**
         * Whether to display the facet search widget above the facet values instead of below them.
         *
         * @availablesince [July 2020 Release (v2.9373)](https://docs.coveo.com/3293/)
         */
        displaySearchOnTop: ComponentOptions_1.ComponentOptions.buildBooleanOption({ defaultValue: false }), 
        /**
         * Whether to display the facet search widget as a button instead of a search bar.
         *
         * @availablesince [July 2020 Release (v2.9373)](https://docs.coveo.com/3293/)
         */
        displaySearchButton: ComponentOptions_1.ComponentOptions.buildBooleanOption({ defaultValue: true }) }, ResponsiveFacetOptions_1.ResponsiveFacetOptions);
    CategoryFacet.MAXIMUM_NUMBER_OF_VALUES_BEFORE_TRUNCATING = 15;
    CategoryFacet.NUMBER_OF_VALUES_TO_KEEP_AFTER_TRUNCATING = 10;
    CategoryFacet.WAIT_ELEMENT_CLASS = 'coveo-category-facet-header-wait-animation';
    return CategoryFacet;
}(Component_1.Component));
exports.CategoryFacet = CategoryFacet;
Initialization_1.Initialization.registerAutoCreateComponent(CategoryFacet);
CategoryFacet.doExport();
 
 
/***/ }),
/* 72 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Component_1 = __webpack_require__(6);
var ResultList_1 = __webpack_require__(68);
var Dom_1 = __webpack_require__(0);
var underscore_1 = __webpack_require__(1);
var Logger_1 = __webpack_require__(18);
var ResultListUtils = /** @class */ (function () {
    function ResultListUtils() {
    }
    ResultListUtils.hideIfInfiniteScrollEnabled = function (cmp) {
        var infiniteScrollEnabled = ResultListUtils.isInfiniteScrollEnabled(cmp.searchInterface.element);
        if (infiniteScrollEnabled) {
            cmp.disable();
            Dom_1.$$(cmp.element).hide();
            ResultListUtils.warnIfComponentNotNeeded(cmp);
        }
        else {
            cmp.enable();
            Dom_1.$$(cmp.element).unhide();
        }
    };
    ResultListUtils.isInfiniteScrollEnabled = function (root) {
        var resultList = ResultListUtils.getMainResultList(root);
        return resultList ? !!resultList.options.enableInfiniteScroll : false;
    };
    ResultListUtils.scrollToTop = function (root) {
        var resultList = ResultListUtils.getMainResultList(root);
        if (!resultList) {
            new Logger_1.Logger(this).warn('No active ResultList, scrolling to the top of the Window');
            return window.scrollTo(0, 0);
        }
        var searchInterfacePosition = resultList.searchInterface.element.getBoundingClientRect().top;
        if (searchInterfacePosition > 0) {
            return;
        }
        window.scrollTo(0, window.pageYOffset + searchInterfacePosition);
    };
    ResultListUtils.getMainResultList = function (root) {
        var resultLists = ResultListUtils.getResultLists(root);
        return underscore_1.find(resultLists, function (resultList) {
            var isRecInterface = resultList.searchInterface.element.classList.contains('CoveoRecommendation');
            return !resultList.disabled && !isRecInterface;
        });
    };
    ResultListUtils.getResultLists = function (root) {
        return Dom_1.$$(root)
            .findAll("." + ResultListUtils.cssClass())
            .map(function (el) { return Component_1.Component.get(el, ResultList_1.ResultList); });
    };
    ResultListUtils.cssClass = function () {
        return Component_1.Component.computeCssClassName(ResultList_1.ResultList);
    };
    ResultListUtils.warnIfComponentNotNeeded = function (cmp) {
        var root = cmp.searchInterface.root;
        var allListsUseInfiniteScroll = ResultListUtils.allResultListsUseInfiniteScroll(root);
        allListsUseInfiniteScroll && ResultListUtils.notNeededComponentWarning(cmp);
    };
    ResultListUtils.allResultListsUseInfiniteScroll = function (root) {
        var listsWithInfiniteScrollDisabled = ResultListUtils.getResultLists(root).filter(function (resultList) { return !resultList.options.enableInfiniteScroll; });
        return listsWithInfiniteScrollDisabled.length === 0;
    };
    ResultListUtils.notNeededComponentWarning = function (cmp) {
        var cmpCssClass = Component_1.Component.computeCssClassNameForType(cmp.type);
        var message = "The " + cmpCssClass + " component is not needed because all " + ResultListUtils.cssClass() + " components have enableInfiniteScroll set to 'true'.\n    For the best performance, remove the " + cmpCssClass + " component from your search page.";
        new Logger_1.Logger(cmp).warn(message);
    };
    return ResultListUtils;
}());
exports.ResultListUtils = ResultListUtils;
 
 
/***/ }),
/* 73 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return root; });
/* harmony export (immutable) */ __webpack_exports__["a"] = Selection;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__select__ = __webpack_require__(1153);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__selectAll__ = __webpack_require__(1154);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__filter__ = __webpack_require__(1155);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__data__ = __webpack_require__(1156);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__enter__ = __webpack_require__(712);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__exit__ = __webpack_require__(1158);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__join__ = __webpack_require__(1159);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__merge__ = __webpack_require__(1160);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__order__ = __webpack_require__(1161);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__sort__ = __webpack_require__(1162);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__call__ = __webpack_require__(1163);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__nodes__ = __webpack_require__(1164);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__node__ = __webpack_require__(1165);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__size__ = __webpack_require__(1166);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__empty__ = __webpack_require__(1167);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__each__ = __webpack_require__(1168);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__attr__ = __webpack_require__(1169);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_17__style__ = __webpack_require__(714);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_18__property__ = __webpack_require__(1170);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_19__classed__ = __webpack_require__(1171);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_20__text__ = __webpack_require__(1172);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_21__html__ = __webpack_require__(1173);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_22__raise__ = __webpack_require__(1174);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_23__lower__ = __webpack_require__(1175);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_24__append__ = __webpack_require__(1176);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_25__insert__ = __webpack_require__(1177);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_26__remove__ = __webpack_require__(1178);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_27__clone__ = __webpack_require__(1179);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_28__datum__ = __webpack_require__(1180);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_29__on__ = __webpack_require__(341);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_30__dispatch__ = __webpack_require__(1181);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
var root = [null];
 
function Selection(groups, parents) {
  this._groups = groups;
  this._parents = parents;
}
 
function selection() {
  return new Selection([[document.documentElement]], root);
}
 
Selection.prototype = selection.prototype = {
  constructor: Selection,
  select: __WEBPACK_IMPORTED_MODULE_0__select__["a" /* default */],
  selectAll: __WEBPACK_IMPORTED_MODULE_1__selectAll__["a" /* default */],
  filter: __WEBPACK_IMPORTED_MODULE_2__filter__["a" /* default */],
  data: __WEBPACK_IMPORTED_MODULE_3__data__["a" /* default */],
  enter: __WEBPACK_IMPORTED_MODULE_4__enter__["b" /* default */],
  exit: __WEBPACK_IMPORTED_MODULE_5__exit__["a" /* default */],
  join: __WEBPACK_IMPORTED_MODULE_6__join__["a" /* default */],
  merge: __WEBPACK_IMPORTED_MODULE_7__merge__["a" /* default */],
  order: __WEBPACK_IMPORTED_MODULE_8__order__["a" /* default */],
  sort: __WEBPACK_IMPORTED_MODULE_9__sort__["a" /* default */],
  call: __WEBPACK_IMPORTED_MODULE_10__call__["a" /* default */],
  nodes: __WEBPACK_IMPORTED_MODULE_11__nodes__["a" /* default */],
  node: __WEBPACK_IMPORTED_MODULE_12__node__["a" /* default */],
  size: __WEBPACK_IMPORTED_MODULE_13__size__["a" /* default */],
  empty: __WEBPACK_IMPORTED_MODULE_14__empty__["a" /* default */],
  each: __WEBPACK_IMPORTED_MODULE_15__each__["a" /* default */],
  attr: __WEBPACK_IMPORTED_MODULE_16__attr__["a" /* default */],
  style: __WEBPACK_IMPORTED_MODULE_17__style__["a" /* default */],
  property: __WEBPACK_IMPORTED_MODULE_18__property__["a" /* default */],
  classed: __WEBPACK_IMPORTED_MODULE_19__classed__["a" /* default */],
  text: __WEBPACK_IMPORTED_MODULE_20__text__["a" /* default */],
  html: __WEBPACK_IMPORTED_MODULE_21__html__["a" /* default */],
  raise: __WEBPACK_IMPORTED_MODULE_22__raise__["a" /* default */],
  lower: __WEBPACK_IMPORTED_MODULE_23__lower__["a" /* default */],
  append: __WEBPACK_IMPORTED_MODULE_24__append__["a" /* default */],
  insert: __WEBPACK_IMPORTED_MODULE_25__insert__["a" /* default */],
  remove: __WEBPACK_IMPORTED_MODULE_26__remove__["a" /* default */],
  clone: __WEBPACK_IMPORTED_MODULE_27__clone__["a" /* default */],
  datum: __WEBPACK_IMPORTED_MODULE_28__datum__["a" /* default */],
  on: __WEBPACK_IMPORTED_MODULE_29__on__["b" /* default */],
  dispatch: __WEBPACK_IMPORTED_MODULE_30__dispatch__["a" /* default */]
};
 
/* harmony default export */ __webpack_exports__["b"] = (selection);
 
 
/***/ }),
/* 74 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__color_js__ = __webpack_require__(344);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_0__color_js__["e"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return __WEBPACK_IMPORTED_MODULE_0__color_js__["g"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return __WEBPACK_IMPORTED_MODULE_0__color_js__["f"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__lab_js__ = __webpack_require__(1189);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return __WEBPACK_IMPORTED_MODULE_1__lab_js__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return __WEBPACK_IMPORTED_MODULE_1__lab_js__["c"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return __WEBPACK_IMPORTED_MODULE_1__lab_js__["d"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return __WEBPACK_IMPORTED_MODULE_1__lab_js__["b"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__cubehelix_js__ = __webpack_require__(1190);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return __WEBPACK_IMPORTED_MODULE_2__cubehelix_js__["a"]; });
 
 
 
 
 
/***/ }),
/* 75 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = projection;
/* harmony export (immutable) */ __webpack_exports__["b"] = projectionMutator;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__clip_antimeridian_js__ = __webpack_require__(741);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__clip_circle_js__ = __webpack_require__(747);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__clip_rectangle_js__ = __webpack_require__(253);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__compose_js__ = __webpack_require__(740);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__identity_js__ = __webpack_require__(357);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__math_js__ = __webpack_require__(19);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__rotation_js__ = __webpack_require__(252);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__transform_js__ = __webpack_require__(254);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__fit_js__ = __webpack_require__(360);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__resample_js__ = __webpack_require__(1315);
 
 
 
 
 
 
 
 
 
 
 
var transformRadians = Object(__WEBPACK_IMPORTED_MODULE_7__transform_js__["b" /* transformer */])({
  point: function(x, y) {
    this.stream.point(x * __WEBPACK_IMPORTED_MODULE_5__math_js__["r" /* radians */], y * __WEBPACK_IMPORTED_MODULE_5__math_js__["r" /* radians */]);
  }
});
 
function transformRotate(rotate) {
  return Object(__WEBPACK_IMPORTED_MODULE_7__transform_js__["b" /* transformer */])({
    point: function(x, y) {
      var r = rotate(x, y);
      return this.stream.point(r[0], r[1]);
    }
  });
}
 
function scaleTranslate(k, dx, dy, sx, sy) {
  function transform(x, y) {
    x *= sx; y *= sy;
    return [dx + k * x, dy - k * y];
  }
  transform.invert = function(x, y) {
    return [(x - dx) / k * sx, (dy - y) / k * sy];
  };
  return transform;
}
 
function scaleTranslateRotate(k, dx, dy, sx, sy, alpha) {
  var cosAlpha = Object(__WEBPACK_IMPORTED_MODULE_5__math_js__["g" /* cos */])(alpha),
      sinAlpha = Object(__WEBPACK_IMPORTED_MODULE_5__math_js__["t" /* sin */])(alpha),
      a = cosAlpha * k,
      b = sinAlpha * k,
      ai = cosAlpha / k,
      bi = sinAlpha / k,
      ci = (sinAlpha * dy - cosAlpha * dx) / k,
      fi = (sinAlpha * dx + cosAlpha * dy) / k;
  function transform(x, y) {
    x *= sx; y *= sy;
    return [a * x - b * y + dx, dy - b * x - a * y];
  }
  transform.invert = function(x, y) {
    return [sx * (ai * x - bi * y + ci), sy * (fi - bi * x - ai * y)];
  };
  return transform;
}
 
function projection(project) {
  return projectionMutator(function() { return project; })();
}
 
function projectionMutator(projectAt) {
  var project,
      k = 150, // scale
      x = 480, y = 250, // translate
      lambda = 0, phi = 0, // center
      deltaLambda = 0, deltaPhi = 0, deltaGamma = 0, rotate, // pre-rotate
      alpha = 0, // post-rotate angle
      sx = 1, // reflectX
      sy = 1, // reflectX
      theta = null, preclip = __WEBPACK_IMPORTED_MODULE_0__clip_antimeridian_js__["a" /* default */], // pre-clip angle
      x0 = null, y0, x1, y1, postclip = __WEBPACK_IMPORTED_MODULE_4__identity_js__["a" /* default */], // post-clip extent
      delta2 = 0.5, // precision
      projectResample,
      projectTransform,
      projectRotateTransform,
      cache,
      cacheStream;
 
  function projection(point) {
    return projectRotateTransform(point[0] * __WEBPACK_IMPORTED_MODULE_5__math_js__["r" /* radians */], point[1] * __WEBPACK_IMPORTED_MODULE_5__math_js__["r" /* radians */]);
  }
 
  function invert(point) {
    point = projectRotateTransform.invert(point[0], point[1]);
    return point && [point[0] * __WEBPACK_IMPORTED_MODULE_5__math_js__["h" /* degrees */], point[1] * __WEBPACK_IMPORTED_MODULE_5__math_js__["h" /* degrees */]];
  }
 
  projection.stream = function(stream) {
    return cache && cacheStream === stream ? cache : cache = transformRadians(transformRotate(rotate)(preclip(projectResample(postclip(cacheStream = stream)))));
  };
 
  projection.preclip = function(_) {
    return arguments.length ? (preclip = _, theta = undefined, reset()) : preclip;
  };
 
  projection.postclip = function(_) {
    return arguments.length ? (postclip = _, x0 = y0 = x1 = y1 = null, reset()) : postclip;
  };
 
  projection.clipAngle = function(_) {
    return arguments.length ? (preclip = +_ ? Object(__WEBPACK_IMPORTED_MODULE_1__clip_circle_js__["a" /* default */])(theta = _ * __WEBPACK_IMPORTED_MODULE_5__math_js__["r" /* radians */]) : (theta = null, __WEBPACK_IMPORTED_MODULE_0__clip_antimeridian_js__["a" /* default */]), reset()) : theta * __WEBPACK_IMPORTED_MODULE_5__math_js__["h" /* degrees */];
  };
 
  projection.clipExtent = function(_) {
    return arguments.length ? (postclip = _ == null ? (x0 = y0 = x1 = y1 = null, __WEBPACK_IMPORTED_MODULE_4__identity_js__["a" /* default */]) : Object(__WEBPACK_IMPORTED_MODULE_2__clip_rectangle_js__["a" /* default */])(x0 = +_[0][0], y0 = +_[0][1], x1 = +_[1][0], y1 = +_[1][1]), reset()) : x0 == null ? null : [[x0, y0], [x1, y1]];
  };
 
  projection.scale = function(_) {
    return arguments.length ? (k = +_, recenter()) : k;
  };
 
  projection.translate = function(_) {
    return arguments.length ? (x = +_[0], y = +_[1], recenter()) : [x, y];
  };
 
  projection.center = function(_) {
    return arguments.length ? (lambda = _[0] % 360 * __WEBPACK_IMPORTED_MODULE_5__math_js__["r" /* radians */], phi = _[1] % 360 * __WEBPACK_IMPORTED_MODULE_5__math_js__["r" /* radians */], recenter()) : [lambda * __WEBPACK_IMPORTED_MODULE_5__math_js__["h" /* degrees */], phi * __WEBPACK_IMPORTED_MODULE_5__math_js__["h" /* degrees */]];
  };
 
  projection.rotate = function(_) {
    return arguments.length ? (deltaLambda = _[0] % 360 * __WEBPACK_IMPORTED_MODULE_5__math_js__["r" /* radians */], deltaPhi = _[1] % 360 * __WEBPACK_IMPORTED_MODULE_5__math_js__["r" /* radians */], deltaGamma = _.length > 2 ? _[2] % 360 * __WEBPACK_IMPORTED_MODULE_5__math_js__["r" /* radians */] : 0, recenter()) : [deltaLambda * __WEBPACK_IMPORTED_MODULE_5__math_js__["h" /* degrees */], deltaPhi * __WEBPACK_IMPORTED_MODULE_5__math_js__["h" /* degrees */], deltaGamma * __WEBPACK_IMPORTED_MODULE_5__math_js__["h" /* degrees */]];
  };
 
  projection.angle = function(_) {
    return arguments.length ? (alpha = _ % 360 * __WEBPACK_IMPORTED_MODULE_5__math_js__["r" /* radians */], recenter()) : alpha * __WEBPACK_IMPORTED_MODULE_5__math_js__["h" /* degrees */];
  };
 
  projection.reflectX = function(_) {
    return arguments.length ? (sx = _ ? -1 : 1, recenter()) : sx < 0;
  };
 
  projection.reflectY = function(_) {
    return arguments.length ? (sy = _ ? -1 : 1, recenter()) : sy < 0;
  };
 
  projection.precision = function(_) {
    return arguments.length ? (projectResample = Object(__WEBPACK_IMPORTED_MODULE_9__resample_js__["a" /* default */])(projectTransform, delta2 = _ * _), reset()) : Object(__WEBPACK_IMPORTED_MODULE_5__math_js__["u" /* sqrt */])(delta2);
  };
 
  projection.fitExtent = function(extent, object) {
    return Object(__WEBPACK_IMPORTED_MODULE_8__fit_js__["a" /* fitExtent */])(projection, extent, object);
  };
 
  projection.fitSize = function(size, object) {
    return Object(__WEBPACK_IMPORTED_MODULE_8__fit_js__["c" /* fitSize */])(projection, size, object);
  };
 
  projection.fitWidth = function(width, object) {
    return Object(__WEBPACK_IMPORTED_MODULE_8__fit_js__["d" /* fitWidth */])(projection, width, object);
  };
 
  projection.fitHeight = function(height, object) {
    return Object(__WEBPACK_IMPORTED_MODULE_8__fit_js__["b" /* fitHeight */])(projection, height, object);
  };
 
  function recenter() {
    var center = scaleTranslateRotate(k, 0, 0, sx, sy, alpha).apply(null, project(lambda, phi)),
        transform = (alpha ? scaleTranslateRotate : scaleTranslate)(k, x - center[0], y - center[1], sx, sy, alpha);
    rotate = Object(__WEBPACK_IMPORTED_MODULE_6__rotation_js__["b" /* rotateRadians */])(deltaLambda, deltaPhi, deltaGamma);
    projectTransform = Object(__WEBPACK_IMPORTED_MODULE_3__compose_js__["a" /* default */])(project, transform);
    projectRotateTransform = Object(__WEBPACK_IMPORTED_MODULE_3__compose_js__["a" /* default */])(rotate, projectTransform);
    projectResample = Object(__WEBPACK_IMPORTED_MODULE_9__resample_js__["a" /* default */])(projectTransform, delta2);
    return reset();
  }
 
  function reset() {
    cache = cacheStream = null;
    return projection;
  }
 
  return function() {
    project = projectAt.apply(this, arguments);
    projection.invert = project.invert && invert;
    return recenter();
  };
}
 
 
/***/ }),
/* 76 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
var ExpressionEndOfInput_1 = __webpack_require__(379);
var ExpressionConstant_1 = __webpack_require__(263);
var _ = __webpack_require__(1);
var Result = /** @class */ (function () {
    function Result(value, expression, input) {
        var _this = this;
        this.expression = expression;
        this.input = input;
        if (_.isString(value)) {
            this.value = value;
        }
        else if (_.isArray(value)) {
            this.subResults = value;
            _.forEach(this.subResults, function (subResult) {
                subResult.parent = _this;
            });
        }
    }
    Result.prototype.isSuccess = function () {
        // if null is the value, this mean the expression could not parse this input
        return this.value != null || (this.subResults != null && _.all(this.subResults, function (subResult) { return subResult.isSuccess(); }));
    };
    /**
     * Return path to this result ([parent.parent, parent, this])
     */
    Result.prototype.path = function (until) {
        var path = this.parent != null && this.parent != until ? this.parent.path(until) : [];
        path.push(this);
        return path;
    };
    /**
     * Return the closest parent that match the condition (can be it-self). If match is a string, it will search for the result expresion id
     */
    Result.prototype.findParent = function (match) {
        var parent = this;
        var iterator = _.isString(match) ? function (result) { return match == result.expression.id; } : match;
        while (parent != null && !iterator(parent)) {
            parent = parent.parent;
        }
        return parent;
    };
    /**
     * Return the first child that match the condition (can be it-self). If match is a string, it will search for the result expresion id
     */
    Result.prototype.find = function (match) {
        var iterator = _.isString(match) ? function (result) { return match == result.expression.id; } : match;
        if (iterator(this)) {
            return this;
        }
        if (this.subResults) {
            for (var i = 0; i < this.subResults.length; i++) {
                var subResultFind = this.subResults[i].find(iterator);
                if (subResultFind) {
                    return subResultFind;
                }
            }
        }
        return null;
    };
    /**
     * Return all children that match the condition (can be it-self). If match is a string, it will search for the result expresion id
     */
    Result.prototype.findAll = function (match) {
        var results = [];
        var iterator = _.isString(match) ? function (result) { return match == result.expression.id; } : match;
        if (iterator(this)) {
            results.push(this);
        }
        if (this.subResults) {
            results = _.reduce(this.subResults, function (results, subResult) { return results.concat(subResult.findAll(iterator)); }, results);
        }
        return results;
    };
    /**
     * Return the first child that match the condition (can be it-self). If match is a string, it will search for the result expresion id
     */
    Result.prototype.resultAt = function (index, match) {
        if (index < 0 || index > this.getLength()) {
            return [];
        }
        if (match != null) {
            Eif (_.isString(match)) {
                if (match == this.expression.id) {
                    return [this];
                }
            }
            else {
                if (match(this)) {
                    return [this];
                }
            }
        }
        else {
            var value = this.value == null && this.subResults == null ? this.input : this.value;
            if (value != null) {
                return [this];
            }
        }
        if (this.subResults != null) {
            var results = [];
            for (var i = 0; i < this.subResults.length; i++) {
                var subResult = this.subResults[i];
                results = results.concat(subResult.resultAt(index, match));
                index -= subResult.getLength();
                Iif (index < 0) {
                    break;
                }
            }
            return results;
        }
        return [];
    };
    /**
     * Return all fail result.
     */
    Result.prototype.getExpect = function () {
        if (this.value == null && this.subResults == null) {
            return [this];
        }
        if (this.subResults != null) {
            return _.reduce(this.subResults, function (expect, result) { return expect.concat(result.getExpect()); }, []);
        }
        return [];
    };
    /**
     * Return the best fail result (The farthest result who got parsed). We also remove duplicate and always return the simplest result of a kind
     */
    Result.prototype.getBestExpect = function () {
        var expects = this.getExpect();
        var groups = _.groupBy(expects, function (expect) { return expect.input; });
        var key = _.last(_.keys(groups).sort(function (a, b) {
            return b.length - a.length;
        }));
        var bestResults = groups[key];
        var groups = _.groupBy(bestResults, function (expect) { return expect.expression.id; });
        return _.map(groups, function (bestResults) {
            return _.chain(bestResults)
                .map(function (result) {
                return {
                    path: result.path().length,
                    result: result
                };
            })
                .sortBy('path')
                .pluck('result')
                .first()
                .value();
        });
    };
    Result.prototype.getHumanReadableExpect = function () {
        var expect = this.getBestExpect();
        var input = expect.length > 0 ? _.last(expect).input : '';
        return ('Expected ' +
            _.map(expect, function (result) { return result.getHumanReadable(); }).join(' or ') +
            ' but ' +
            (input.length > 0 ? JSON.stringify(input[0]) : 'end of input') +
            ' found.');
    };
    /**
     * Return a string that represent what is before this result
     */
    Result.prototype.before = function () {
        if (this.parent == null) {
            return '';
        }
        var index = _.indexOf(this.parent.subResults, this);
        return (this.parent.before() +
            _.chain(this.parent.subResults)
                .first(index)
                .map(function (subResult) { return subResult.toString(); })
                .join('')
                .value());
    };
    /**
     * Return a string that represent what is after this result
     */
    Result.prototype.after = function () {
        if (this.parent == null) {
            return '';
        }
        var index = _.indexOf(this.parent.subResults, this);
        return (_.chain(this.parent.subResults)
            .last(this.parent.subResults.length - index - 1)
            .map(function (subResult) { return subResult.toString(); })
            .join('')
            .value() + this.parent.after());
    };
    /**
     * Return the length of the result
     */
    Result.prototype.getLength = function () {
        if (this.value != null) {
            return this.value.length;
        }
        if (this.subResults != null) {
            return _.reduce(this.subResults, function (length, subResult) { return length + subResult.getLength(); }, 0);
        }
        return this.input.length;
    };
    Result.prototype.toHtmlElement = function () {
        var element = document.createElement('span');
        var id = this.expression != null ? this.expression.id : null;
        Eif (id != null) {
            element.setAttribute('data-id', id);
        }
        element.setAttribute('data-success', this.isSuccess().toString());
        if (this.value != null) {
            element.appendChild(document.createTextNode(this.value));
            element.setAttribute('data-value', this.value);
        }
        else if (this.subResults != null) {
            _.each(this.subResults, function (subResult) {
                element.appendChild(subResult.toHtmlElement());
            });
        }
        else {
            element.appendChild(document.createTextNode(this.input));
            element.setAttribute('data-input', this.input);
            element.className = 'magic-box-error' + (this.input.length > 0 ? '' : ' magic-box-error-empty');
        }
        element['result'] = this;
        return element;
    };
    /**
     * Clean the result to have the most relevant result. If the result is successful just return a clone of it.
     */
    Result.prototype.clean = function (path) {
        if (path != null || !this.isSuccess()) {
            path = path || _.last(this.getBestExpect()).path(this);
            var next = _.first(path);
            if (next != null) {
                var nextIndex = _.indexOf(this.subResults, next);
                var subResults = nextIndex == -1 ? [] : _.map(_.first(this.subResults, nextIndex), function (subResult) { return subResult.clean(); });
                subResults.push(next.clean(_.rest(path)));
                return new Result(subResults, this.expression, this.input);
            }
            else {
                return new Result(null, this.expression, this.input);
            }
        }
        if (this.value != null) {
            return new Result(this.value, this.expression, this.input);
        }
        Eif (this.subResults != null) {
            return new Result(_.map(this.subResults, function (subResult) { return subResult.clean(); }), this.expression, this.input);
        }
    };
    Result.prototype.clone = function () {
        if (this.value != null) {
            return new Result(this.value, this.expression, this.input);
        }
        Eif (this.subResults != null) {
            return new Result(_.map(this.subResults, function (subResult) { return subResult.clone(); }), this.expression, this.input);
        }
        return new Result(null, this.expression, this.input);
    };
    Result.prototype.toString = function () {
        if (this.value != null) {
            return this.value;
        }
        if (this.subResults != null) {
            return _.map(this.subResults, function (subresult) { return subresult.toString(); }).join('');
        }
        return this.input;
    };
    Result.prototype.getHumanReadable = function () {
        if (this.expression instanceof ExpressionConstant_1.ExpressionConstant) {
            return JSON.stringify(this.expression.value);
        }
        return this.expression.id;
    };
    return Result;
}());
exports.Result = Result;
var EndOfInputResult = /** @class */ (function (_super) {
    __extends(EndOfInputResult, _super);
    function EndOfInputResult(result) {
        var _this = _super.call(this, [result], ExpressionEndOfInput_1.ExpressionEndOfInput, result.input) || this;
        var endOfInput = new Result(null, ExpressionEndOfInput_1.ExpressionEndOfInput, result.input.substr(result.getLength()));
        endOfInput.parent = _this;
        _this.subResults.push(endOfInput);
        return _this;
    }
    return EndOfInputResult;
}(Result));
exports.EndOfInputResult = EndOfInputResult;
 
 
/***/ }),
/* 77 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __assign = (this && this.__assign) || Object.assign || function(t) {
    for (var s, i = 1, n = arguments.length; i < n; i++) {
        s = arguments[i];
        for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
            t[p] = s[p];
    }
    return t;
};
Object.defineProperty(exports, "__esModule", { value: true });
var Dom_1 = __webpack_require__(0);
var DynamicFacet_1 = __webpack_require__(272);
var DynamicFacetValueCreator_1 = __webpack_require__(273);
var FacetValueState_1 = __webpack_require__(36);
var Mock = __webpack_require__(2);
var DynamicFacetValues_1 = __webpack_require__(202);
var DynamicFacetTestUtils = /** @class */ (function () {
    function DynamicFacetTestUtils() {
    }
    DynamicFacetTestUtils.allOptions = function (options) {
        return __assign({ field: '@dummy', valueCaption: {} }, options);
    };
    DynamicFacetTestUtils.createFakeFacet = function (options) {
        var facet = Mock.mockComponent(DynamicFacet_1.DynamicFacet);
        facet.options = this.allOptions(options);
        facet.values = new DynamicFacetValues_1.DynamicFacetValues(facet, DynamicFacetValueCreator_1.DynamicFacetValueCreator);
        facet.element = Dom_1.$$('div').el;
        facet.searchInterface = Mock.mockSearchInterface();
        return facet;
    };
    DynamicFacetTestUtils.createAdvancedFakeFacet = function (options, env) {
        return Mock.advancedComponentSetup(DynamicFacet_1.DynamicFacet, {
            modifyBuilder: function (builder) {
                if (!env) {
                    builder.withLiveQueryStateModel();
                    return builder;
                }
                builder
                    .withRoot(env.root)
                    .withQueryStateModel(env.queryStateModel)
                    .withSearchInterface(env.searchInterface);
                return builder;
            },
            cmpOptions: this.allOptions(options)
        });
    };
    DynamicFacetTestUtils.createFakeFacetValues = function (count, state) {
        if (count === void 0) { count = 5; }
        if (state === void 0) { state = FacetValueState_1.FacetValueState.idle; }
        var fakeValues = [];
        for (var index = 0; index < count; index++) {
            var value = "fake value " + index;
            var fakeValue = this.createFakeFacetValue({
                displayValue: value,
                numberOfResults: Math.ceil(Math.random() * 100000),
                value: value,
                state: state,
                position: index + 1
            });
            fakeValues.push(fakeValue);
        }
        return fakeValues;
    };
    DynamicFacetTestUtils.createFakeFacetValue = function (config) {
        Iif (config === void 0) { config = {}; }
        return __assign({ displayValue: '', numberOfResults: 0, value: '', state: FacetValueState_1.FacetValueState.idle, position: 0 }, config);
    };
    DynamicFacetTestUtils.getCompleteFacetResponse = function (facet, partialResponse) {
        return __assign({ facetId: facet.options.id, field: facet.fieldName, values: DynamicFacetTestUtils.createFakeFacetValues(), moreValuesAvailable: false }, partialResponse);
    };
    return DynamicFacetTestUtils;
}());
exports.DynamicFacetTestUtils = DynamicFacetTestUtils;
 
 
/***/ }),
/* 78 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        Iif (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            Iif (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
            Iif (y = 0, t) op = [0, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    Iif (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    Iif (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    Iif (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        Iif (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
Object.defineProperty(exports, "__esModule", { value: true });
var HistoryStore_1 = __webpack_require__(84);
var underscore_1 = __webpack_require__(1);
var QueryEvents_1 = __webpack_require__(14);
var ExternalModulesShim_1 = __webpack_require__(39);
var Assert_1 = __webpack_require__(12);
var Defer_1 = __webpack_require__(31);
var SearchEndpointWithDefaultCallOptions_1 = __webpack_require__(965);
var BaseComponent_1 = __webpack_require__(113);
var QueryBuilder_1 = __webpack_require__(24);
var RootComponent_1 = __webpack_require__(133);
var Dom_1 = __webpack_require__(0);
var LocalStorageUtils_1 = __webpack_require__(96);
var QueryUtils_1 = __webpack_require__(37);
var UrlUtils_1 = __webpack_require__(108);
var Utils_1 = __webpack_require__(5);
var AnalyticsInformation_1 = __webpack_require__(85);
var QueryboxQueryParameters_1 = __webpack_require__(171);
var DefaultQueryOptions = /** @class */ (function () {
    function DefaultQueryOptions() {
        this.searchAsYouType = false;
        this.cancel = false;
        this.logInActionsHistory = false;
        this.shouldRedirectStandaloneSearchbox = true;
    }
    return DefaultQueryOptions;
}());
/**
 * This class is automatically instantiated and bound to the root of your search interface when you initialize the framework.<br/>
 * It is essentially a singleton that wraps the access to the {@link SearchEndpoint} endpoint to execute query, and is in charge of triggering the different query events.<br/>
 * This is what every component of the framework uses internally to execute query or access the endpoint.<br/>
 * When calling <code>Coveo.executeQuery</code> this class is used.
 */
var QueryController = /** @class */ (function (_super) {
    __extends(QueryController, _super);
    /**
     * Create a new query controller
     * @param element
     * @param options
     * @param usageAnalytics **Deprecated.** Since the [October 2019 Release (v2.7219)](https://docs.coveo.com/en/3084/), the class retrieves and uses the {@link AnalyticsClient} from its `searchInterface` constructor parameter.
     * @param searchInterface
     */
    function QueryController(element, options, usageAnalytics, searchInterface) {
        var _this = _super.call(this, element, QueryController.ID) || this;
        _this.options = options;
        _this.searchInterface = searchInterface;
        _this.modalBox = ExternalModulesShim_1.ModalBox;
        _this.closeModalBox = true;
        _this.showingExecutingQueryAnimation = false;
        _this.localStorage = new LocalStorageUtils_1.LocalStorageUtils('lastQueryHash');
        Assert_1.Assert.exists(element);
        Assert_1.Assert.exists(options);
        _this.firstQuery = true;
        _this.initializeActionsHistory();
        return _this;
    }
    Object.defineProperty(QueryController.prototype, "usageAnalytics", {
        get: function () {
            return this.searchInterface.usageAnalytics;
        },
        enumerable: true,
        configurable: true
    });
    /**
     * Set the {@link SearchEndpoint} that the query controller should use to execute query
     * @param endpoint
     */
    QueryController.prototype.setEndpoint = function (endpoint) {
        this.overrideEndpoint = endpoint;
        this.logger.debug('Endpoint set', endpoint);
    };
    /**
     * Get the {@link SearchEndpoint} that is currently used by the query controller to execute query
     * @returns {SearchEndpoint}
     */
    QueryController.prototype.getEndpoint = function () {
        var endpoint = this.overrideEndpoint || this.options.endpoint;
        // We must wrap the endpoint in a decorator that'll add the call options
        // we obtain by firing the proper event. Those are used for authentication
        // providers, and I guess other stuff later on.
        return new SearchEndpointWithDefaultCallOptions_1.SearchEndpointWithDefaultCallOptions(endpoint, this.getCallOptions());
    };
    /**
     * Return the last query that was performed by the query controller
     * @returns {IQuery|Query}
     */
    QueryController.prototype.getLastQuery = function () {
        return this.lastQuery || new QueryBuilder_1.QueryBuilder().build();
    };
    /**
     * Return the last query results set.
     * @returns {IQueryResults}
     */
    QueryController.prototype.getLastResults = function () {
        return this.lastQueryResults;
    };
    /**
     * Returns the plan of execution of a search request, without executing it.
     * @returns {ExecutionPlan}
     */
    QueryController.prototype.fetchQueryExecutionPlan = function () {
        return __awaiter(this, void 0, void 0, function () {
            var query, error_1;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        query = this.createQueryBuilder(new DefaultQueryOptions()).build();
                        this.logger.debug('Fetching query execution plan');
                        _a.label = 1;
                    case 1:
                        _a.trys.push([1, 3, , 4]);
                        return [4 /*yield*/, this.getEndpoint().plan(query)];
                    case 2: return [2 /*return*/, _a.sent()];
                    case 3:
                        error_1 = _a.sent();
                        return [2 /*return*/, null];
                    case 4: return [2 /*return*/];
                }
            });
        });
    };
    /**
     * Execute a query and return a Promise of IQueryResults.<br/>
     * This will execute the normal query flow, triggering all the necessary query events (newQuery <br/>
     * All components present in the interface will act accordingly (modify the query and render results if needed).
     * @param options
     * @returns {Promise<IQueryResults>}
     */
    QueryController.prototype.executeQuery = function (options) {
        var _this = this;
        options = underscore_1.extend(new DefaultQueryOptions(), options);
        this.closeModalBoxIfNeeded(options ? options.closeModalBox : undefined);
        this.logger.debug('Executing new query');
        this.cancelAnyCurrentPendingQuery();
        Iif (options.beforeExecuteQuery != null) {
            options.beforeExecuteQuery();
        }
        Eif (!options.ignoreWarningSearchEvent) {
            this.usageAnalytics.warnAboutSearchEvent();
        }
        this.showExecutingQueryAnimation();
        var dataToSendOnNewQuery = {
            searchAsYouType: options.searchAsYouType,
            cancel: options.cancel,
            origin: options.origin,
            shouldRedirectStandaloneSearchbox: options.shouldRedirectStandaloneSearchbox
        };
        this.newQueryEvent(dataToSendOnNewQuery);
        if (dataToSendOnNewQuery.cancel) {
            this.cancelQuery();
            return;
        }
        var queryBuilder = this.createQueryBuilder(options);
        // The query was canceled
        Iif (!queryBuilder) {
            return;
        }
        var query = queryBuilder.build();
        if (options.logInActionsHistory) {
            this.logQueryInActionsHistory(query);
        }
        var endpointToUse = this.getEndpoint();
        var promise = (this.currentPendingQuery = endpointToUse.search(query, { analyticsInformation: this.getAnalyticsInformation() }));
        promise
            .then(function (queryResults) {
            Assert_1.Assert.exists(queryResults);
            Eif (_this.firstQuery) {
                _this.firstQuery = false;
            }
            // If our promise is no longer the current one, then the query
            // has been cancel. We should do nothing here.
            Iif (promise !== _this.currentPendingQuery) {
                return;
            }
            _this.logger.debug('Query results received', query, queryResults);
            if (_this.keepLastSearchUid(query, queryResults, options)) {
                queryResults.searchUid = _this.getLastSearchUid();
                queryResults._reusedSearchUid = true;
                QueryUtils_1.QueryUtils.setPropertyOnResults(queryResults, 'queryUid', _this.getLastSearchUid());
            }
            else {
                _this.lastQueryHash = _this.queryHash(query, queryResults);
                _this.lastSearchUid = queryResults.searchUid;
            }
            _this.lastQuery = query;
            _this.lastQueryResults = queryResults;
            _this.currentError = null;
            var dataToSendOnPreprocessResult = {
                queryBuilder: queryBuilder,
                query: query,
                results: queryResults,
                searchAsYouType: options.searchAsYouType
            };
            _this.preprocessResultsEvent(dataToSendOnPreprocessResult);
            var dataToSendOnNoResult = {
                queryBuilder: queryBuilder,
                query: query,
                results: queryResults,
                searchAsYouType: options.searchAsYouType,
                retryTheQuery: false
            };
            if (queryResults.results.length == 0) {
                _this.noResultEvent(dataToSendOnNoResult);
            }
            Iif (dataToSendOnNoResult.retryTheQuery) {
                // When retrying the query, we must forward the results to the deferred we
                // initially returned, in case someone is listening on it.
                return _this.executeQuery();
            }
            else {
                _this.lastQueryBuilder = queryBuilder;
                _this.currentPendingQuery = undefined;
                var dataToSendOnSuccess_1 = {
                    queryBuilder: queryBuilder,
                    query: query,
                    results: queryResults,
                    searchAsYouType: options.searchAsYouType
                };
                _this.querySuccessEvent(dataToSendOnSuccess_1);
                Defer_1.Defer.defer(function () {
                    _this.deferredQuerySuccessEvent(dataToSendOnSuccess_1);
                    _this.hideExecutingQueryAnimation();
                });
                return queryResults;
            }
        })
            .catch(function (error) {
            // If our deferred is no longer the current one, then the query
            // has been cancel. We should do nothing here.
            Iif (promise !== _this.currentPendingQuery) {
                return;
            }
            _this.logger.error('Query triggered an error', query, error);
            _this.currentPendingQuery = undefined;
            var dataToSendOnError = {
                queryBuilder: queryBuilder,
                endpoint: endpointToUse,
                query: query,
                error: error,
                searchAsYouType: options.searchAsYouType
            };
            _this.lastQuery = query;
            _this.lastQueryResults = null;
            _this.currentError = error;
            _this.queryError(dataToSendOnError);
            _this.hideExecutingQueryAnimation();
        });
        var dataToSendDuringQuery = {
            queryBuilder: queryBuilder,
            query: query,
            searchAsYouType: options.searchAsYouType,
            promise: promise
        };
        this.duringQueryEvent(dataToSendDuringQuery);
        return this.currentPendingQuery;
    };
    /**
     * Using the same parameters as the last successful query, fetch another batch of results. Particularly useful for infinite scrolling, for example.
     * @param count
     * @returns {any}
     */
    QueryController.prototype.fetchMore = function (count) {
        var _this = this;
        Iif (this.currentPendingQuery != undefined) {
            return undefined;
        }
        // Send all pending events (think : search as you type)
        // This allows us to get the real search id for the results when the query returns
        this.usageAnalytics.sendAllPendingEvents();
        var queryBuilder = new QueryBuilder_1.QueryBuilder();
        this.continueLastQueryBuilder(queryBuilder, count);
        var query = queryBuilder.build();
        var endpointToUse = this.getEndpoint();
        var promise = (this.currentPendingQuery = endpointToUse.search(query));
        var dataToSendDuringQuery = {
            queryBuilder: queryBuilder,
            query: query,
            searchAsYouType: false,
            promise: promise
        };
        Dom_1.$$(this.element).trigger(QueryEvents_1.QueryEvents.duringFetchMoreQuery, dataToSendDuringQuery);
        this.lastQueryBuilder = queryBuilder;
        this.lastQuery = query;
        promise.then(function (results) {
            // We re-use the search id from the initial search here, even though the
            // server provided us with a new one. 'Fetch mores' are considered to be
            // the same query from an analytics point of view.
            _this.currentPendingQuery = undefined;
            if (_this.lastQueryResults == null) {
                _this.lastQueryResults = results;
            }
            else {
                underscore_1.forEach(results.results, function (result) {
                    _this.lastQueryResults.results.push(result);
                });
            }
            var dataToSendOnPreprocessResult = {
                queryBuilder: queryBuilder,
                query: query,
                results: results,
                searchAsYouType: false
            };
            _this.preprocessResultsEvent(dataToSendOnPreprocessResult);
            QueryUtils_1.QueryUtils.setIndexAndUidOnQueryResults(query, results, _this.getLastSearchUid(), results.pipeline, results.splitTestRun);
            var dataToSendOnFetchMoreSuccess = {
                query: query,
                results: results,
                queryBuilder: queryBuilder,
                searchAsYouType: false
            };
            _this.fetchMoreSuccessEvent(dataToSendOnFetchMoreSuccess);
        });
        return this.currentPendingQuery;
    };
    /**
     * Cancel any pending query
     */
    QueryController.prototype.cancelQuery = function () {
        this.cancelAnyCurrentPendingQuery();
        this.hideExecutingQueryAnimation();
    };
    QueryController.prototype.deferExecuteQuery = function (options) {
        var _this = this;
        this.showExecutingQueryAnimation();
        Defer_1.Defer.defer(function () { return _this.executeQuery(options); });
    };
    QueryController.prototype.ensureCreatedQueryBuilder = function () {
        if (!this.createdOneQueryBuilder) {
            this.createQueryBuilder(new DefaultQueryOptions());
        }
    };
    QueryController.prototype.createQueryBuilder = function (options) {
        Assert_1.Assert.exists(options);
        QueryboxQueryParameters_1.QueryboxQueryParameters.allowDuplicateQuery();
        this.createdOneQueryBuilder = true;
        var queryBuilder = new QueryBuilder_1.QueryBuilder();
        // Default values, components will probably override them if they exists
        queryBuilder.locale = String['locale'];
        queryBuilder.firstResult = queryBuilder.firstResult || 0;
        // Allow outside code to customize the query builder. We provide two events,
        // to allow someone to have a peep at the query builder after the first phase
        // and add some stuff depending on what was put in there. The facets are using
        // this mechanism to generate query overrides.
        var dataToSendDuringBuildingQuery = {
            queryBuilder: queryBuilder,
            searchAsYouType: options.searchAsYouType,
            cancel: options.cancel
        };
        this.buildingQueryEvent(dataToSendDuringBuildingQuery);
        var dataToSendDuringDoneBuildingQuery = {
            queryBuilder: queryBuilder,
            searchAsYouType: options.searchAsYouType,
            cancel: options.cancel
        };
        this.doneBuildingQueryEvent(dataToSendDuringDoneBuildingQuery);
        Iif (dataToSendDuringBuildingQuery.cancel || dataToSendDuringDoneBuildingQuery.cancel) {
            this.cancelQuery();
            return;
        }
        var pipeline = this.getPipelineInUrl();
        Iif (pipeline) {
            queryBuilder.pipeline = pipeline;
        }
        return queryBuilder;
    };
    QueryController.prototype.isStandaloneSearchbox = function () {
        return Utils_1.Utils.isNonEmptyString(this.options.searchPageUri);
    };
    QueryController.prototype.saveLastQuery = function () {
        this.localStorage.save({
            expire: new Date().getTime() + 1000 * 60 * 30,
            hash: this.lastQueryHash,
            uid: this.lastSearchUid
        });
    };
    // This field is exposed for components rendered in the results or on-demand which
    // need access to the entire query. For example, the QuickviewDocument need to pass
    // the entire query to the Search API. For other components, QueryStateModel or
    // listening to events like 'doneBuildingQuery' is the way to go.
    QueryController.prototype.getLastQueryHash = function () {
        Iif (this.lastQueryHash) {
            return this.lastQueryHash;
        }
        this.loadLastQueryHash();
        return this.lastQueryHash || this.queryHash(new QueryBuilder_1.QueryBuilder().build());
    };
    QueryController.prototype.resetHistory = function () {
        this.historyStore.clear();
    };
    QueryController.prototype.enableHistory = function () {
        this.historyStore = HistoryStore_1.buildHistoryStore();
    };
    QueryController.prototype.disableHistory = function () {
        this.historyStore = HistoryStore_1.buildNullHistoryStore();
    };
    QueryController.prototype.initializeActionsHistory = function () {
        this.enableHistory();
        if (this.usageAnalytics.isActivated()) {
            return;
        }
        this.historyStore.clear();
        this.disableHistory();
    };
    QueryController.prototype.closeModalBoxIfNeeded = function (needed) {
        if (needed != undefined ? needed : this.closeModalBox) {
            this.modalBox.close(true);
        }
    };
    QueryController.prototype.getLastSearchUid = function () {
        Eif (this.lastSearchUid != null) {
            return this.lastSearchUid;
        }
        this.loadLastQueryHash();
        return this.lastSearchUid;
    };
    QueryController.prototype.loadLastQueryHash = function () {
        var lastQuery = this.localStorage.load();
        if (lastQuery != null && new Date().getTime() <= lastQuery.expire) {
            this.lastQueryHash = lastQuery.hash;
            this.lastSearchUid = lastQuery.uid;
            this.localStorage.remove();
        }
    };
    QueryController.prototype.continueLastQueryBuilder = function (queryBuilder, count) {
        underscore_1.extend(queryBuilder, this.lastQueryBuilder);
        queryBuilder.firstResult = queryBuilder.firstResult + queryBuilder.numberOfResults;
        queryBuilder.numberOfResults = count;
    };
    QueryController.prototype.getPipelineInUrl = function () {
        return UrlUtils_1.UrlUtils.getUrlParameter('pipeline');
    };
    QueryController.prototype.cancelAnyCurrentPendingQuery = function () {
        if (Utils_1.Utils.exists(this.currentPendingQuery)) {
            this.logger.debug('Cancelling current pending query');
            Promise.reject('Cancelling current pending query');
            this.currentPendingQuery = undefined;
            return true;
        }
        return false;
    };
    QueryController.prototype.showExecutingQueryAnimation = function () {
        if (!this.showingExecutingQueryAnimation) {
            Dom_1.$$(this.element).addClass('coveo-executing-query');
            this.showingExecutingQueryAnimation = true;
        }
    };
    QueryController.prototype.hideExecutingQueryAnimation = function () {
        Eif (this.showingExecutingQueryAnimation) {
            Dom_1.$$(this.element).removeClass('coveo-executing-query');
            this.showingExecutingQueryAnimation = false;
        }
    };
    QueryController.prototype.keepLastSearchUid = function (query, queryResults, options) {
        if (options.keepLastSearchUid === true) {
            return true;
        }
        var enableHistory = !!(this.searchInterface && this.searchInterface.options && this.searchInterface.options.enableHistory);
        return enableHistory && this.compareWithLastQueryHash(this.queryHash(query, queryResults));
    };
    QueryController.prototype.compareWithLastQueryHash = function (queryHash) {
        var lastParams = JSON.parse(this.getLastQueryHash());
        var newParams = JSON.parse(queryHash);
        return Utils_1.Utils.objectEqual(lastParams, newParams);
    };
    QueryController.prototype.queryHash = function (query, queryResults) {
        var queryKeys = [
            'q',
            'aq',
            'cq',
            'dq',
            'lq',
            'searchHub',
            'tab',
            'pipeline',
            'sortCriteria',
            'recommendation',
            'commerce',
            'facets'
        ];
        var queryParams = underscore_1.pick.apply(void 0, [query].concat(queryKeys));
        if (queryResults) {
            queryParams.pipeline = queryResults.pipeline;
        }
        return JSON.stringify(queryParams);
    };
    QueryController.prototype.getCallOptions = function () {
        var args = {
            options: {
                authentication: []
            }
        };
        Dom_1.$$(this.element).trigger(QueryEvents_1.QueryEvents.buildingCallOptions, args);
        return args.options;
    };
    QueryController.prototype.newQueryEvent = function (args) {
        Dom_1.$$(this.element).trigger(QueryEvents_1.QueryEvents.newQuery, args);
    };
    QueryController.prototype.buildingQueryEvent = function (args) {
        Dom_1.$$(this.element).trigger(QueryEvents_1.QueryEvents.buildingQuery, args);
    };
    QueryController.prototype.doneBuildingQueryEvent = function (args) {
        Dom_1.$$(this.element).trigger(QueryEvents_1.QueryEvents.doneBuildingQuery, args);
    };
    QueryController.prototype.duringQueryEvent = function (args) {
        Dom_1.$$(this.element).trigger(QueryEvents_1.QueryEvents.duringQuery, args);
    };
    QueryController.prototype.querySuccessEvent = function (args) {
        Dom_1.$$(this.element).trigger(QueryEvents_1.QueryEvents.querySuccess, args);
    };
    QueryController.prototype.fetchMoreSuccessEvent = function (args) {
        Dom_1.$$(this.element).trigger(QueryEvents_1.QueryEvents.fetchMoreSuccess, args);
    };
    QueryController.prototype.deferredQuerySuccessEvent = function (args) {
        Dom_1.$$(this.element).trigger(QueryEvents_1.QueryEvents.deferredQuerySuccess, args);
    };
    QueryController.prototype.queryError = function (args) {
        Dom_1.$$(this.element).trigger(QueryEvents_1.QueryEvents.queryError, args);
    };
    QueryController.prototype.preprocessResultsEvent = function (args) {
        Dom_1.$$(this.element).trigger(QueryEvents_1.QueryEvents.preprocessResults, args);
    };
    QueryController.prototype.noResultEvent = function (args) {
        Dom_1.$$(this.element).trigger(QueryEvents_1.QueryEvents.noResults, args);
    };
    QueryController.prototype.debugInfo = function () {
        var _this = this;
        var info = {
            query: this.lastQuery
        };
        if (this.lastQueryResults != null) {
            info.queryDuration = function () { return _this.buildQueryDurationSection(_this.lastQueryResults); };
            info.results = function () { return underscore_1.omit(_this.lastQueryResults, 'results'); };
        }
        if (this.currentError != null) {
            info.error = function () { return _this.currentError; };
        }
        return info;
    };
    QueryController.prototype.buildQueryDurationSection = function (queryResults) {
        var dom = Dom_1.Dom.createElement('div', { className: 'coveo-debug-queryDuration' });
        var graph = Dom_1.Dom.createElement('div', { className: 'coveo-debug-durations' });
        var debugRef = BaseComponent_1.BaseComponent.getComponentRef('Debug');
        dom.appendChild(graph);
        underscore_1.forEach(debugRef.durationKeys, function (key) {
            var duration = queryResults[key];
            if (duration != null) {
                graph.appendChild(Dom_1.Dom.createElement('div', {
                    className: 'coveo-debug-duration',
                    style: "width:" + duration + "px",
                    'data-id': key
                }));
                var legend = Dom_1.Dom.createElement('div', { className: 'coveo-debug-duration-legend', 'data-id': key });
                dom.appendChild(legend);
                var keyDom = Dom_1.Dom.createElement('span', { className: 'coveo-debug-duration-label' });
                keyDom.appendChild(document.createTextNode(key));
                legend.appendChild(keyDom);
                var durationDom = Dom_1.Dom.createElement('span', { className: 'coveo-debug-duration-value' });
                durationDom.appendChild(document.createTextNode(duration));
                legend.appendChild(durationDom);
            }
        });
        return dom;
    };
    QueryController.prototype.logQueryInActionsHistory = function (query) {
        var queryElement = {
            name: 'Query',
            value: query.q,
            time: JSON.stringify(new Date())
        };
        this.historyStore.addElement(queryElement);
    };
    QueryController.prototype.getAnalyticsInformation = function () {
        var analyticsInfo = new AnalyticsInformation_1.AnalyticsInformation();
        analyticsInfo.pendingSearchEvent = this.usageAnalytics.getPendingSearchEvent();
        // add fallback for custom code that incorrectly implement the interface.
        if (this.usageAnalytics.getOriginContext) {
            analyticsInfo.originContext = this.usageAnalytics.getOriginContext();
        }
        else {
            analyticsInfo.originContext = 'Search';
        }
        if (this.usageAnalytics.getUserDisplayName) {
            analyticsInfo.userDisplayName = this.usageAnalytics.getUserDisplayName();
        }
        else {
            analyticsInfo.userDisplayName = undefined;
        }
        return analyticsInfo;
    };
    QueryController.ID = 'QueryController';
    return QueryController;
}(RootComponent_1.RootComponent));
exports.QueryController = QueryController;
 
 
/***/ }),
/* 79 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Template_1 = __webpack_require__(29);
var Assert_1 = __webpack_require__(12);
var UnderscoreTemplate_1 = __webpack_require__(90);
var HtmlTemplate_1 = __webpack_require__(217);
var _ = __webpack_require__(1);
/**
 * Holds a reference to all template available in the framework
 */
var TemplateCache = /** @class */ (function () {
    function TemplateCache() {
    }
    /**
     * Register a new template in the framework, which will be available to render any results.
     * @param name
     * @param template
     * @param publicTemplate
     * @param defaultTemplate
     * @param pageTemplate
     */
    TemplateCache.registerTemplate = function (name, template, publicTemplate, defaultTemplate, resultListTemplate) {
        if (publicTemplate === void 0) { publicTemplate = true; }
        if (defaultTemplate === void 0) { defaultTemplate = false; }
        Eif (resultListTemplate === void 0) { resultListTemplate = false; }
        Assert_1.Assert.isNonEmptyString(name);
        Assert_1.Assert.exists(template);
        if (!(template instanceof Template_1.Template)) {
            template = new Template_1.Template(template);
        }
        Eif (template.name == null) {
            template.name = name;
        }
        TemplateCache.templates[name] = template;
        if (publicTemplate && !_.contains(TemplateCache.templateNames, name)) {
            TemplateCache.templateNames.push(name);
        }
        Iif (resultListTemplate && !_.contains(TemplateCache.resultListTemplateNames, name)) {
            TemplateCache.resultListTemplateNames.push(name);
        }
        if (defaultTemplate) {
            TemplateCache.defaultTemplates[name] = template;
        }
    };
    /**
     * Remove the given template from the cache.
     * @param name
     * @param string
     */
    TemplateCache.unregisterTemplate = function (name) {
        Assert_1.Assert.isNonEmptyString(name);
        Eif (TemplateCache.templates[name] != undefined) {
            delete TemplateCache.templates[name];
        }
        if (TemplateCache.defaultTemplates[name] != undefined) {
            delete TemplateCache.defaultTemplates[name];
        }
    };
    /**
     * Return a template by its name/FacID.
     * @param name
     * @returns {Template}
     */
    TemplateCache.getTemplate = function (name) {
        // In some scenarios, the template we're trying to load might be somewhere in the page
        // but we could not load it "normally" on page load (eg : UI was loaded with require js)
        // Try a last ditch effort to scan the needed templates.
        if (!TemplateCache.templates[name]) {
            TemplateCache.scanAndRegisterTemplates();
        }
        Assert_1.Assert.exists(TemplateCache.templates[name]);
        return TemplateCache.templates[name];
    };
    /**
     * Get all templates currently registered in the framework.
     * @returns {{}}
     */
    TemplateCache.getTemplates = function () {
        return TemplateCache.templates;
    };
    /**
     * Get all templates name currently registered in the framework.
     * @returns {string[]}
     */
    TemplateCache.getTemplateNames = function () {
        return TemplateCache.templateNames;
    };
    /**
     * Get all page templates name currently registered in the framework.
     * @returns {string[]}
     */
    TemplateCache.getResultListTemplateNames = function () {
        return TemplateCache.resultListTemplateNames;
    };
    /**
     * Get all the "default" templates in the framework.
     * @returns {string[]}
     */
    TemplateCache.getDefaultTemplates = function () {
        return _.keys(TemplateCache.defaultTemplates);
    };
    /**
     * Get a default template by name.
     * @param name The name of the queried template
     */
    TemplateCache.getDefaultTemplate = function (name) {
        Assert_1.Assert.exists(TemplateCache.defaultTemplates[name]);
        return TemplateCache.defaultTemplates[name];
    };
    TemplateCache.scanAndRegisterTemplates = function () {
        // Here we take care not to scan for templates for which the base library
        // is not available. Case in point: someone was using the JS UI on a page
        // that was also using Handlebars, but our code was initialized before
        // the Handlebars library (loaded through AMD).
        Eif (UnderscoreTemplate_1.UnderscoreTemplate.isLibraryAvailable()) {
            TemplateCache.scanAndRegisterUnderscoreTemplates();
        }
        TemplateCache.scanAndRegisterHtmlTemplates();
    };
    TemplateCache.scanAndRegisterUnderscoreTemplates = function () {
        _.each(UnderscoreTemplate_1.UnderscoreTemplate.mimeTypes, function (type) {
            var scriptList = document.querySelectorAll("script[id][type='" + type + "']");
            var i = scriptList.length;
            var arr = new Array(i);
            while (i--) {
                arr[i] = scriptList.item(i);
            }
            _.each(arr, function (elem) {
                var template = new UnderscoreTemplate_1.UnderscoreTemplate(elem);
                TemplateCache.registerTemplate(elem.getAttribute('id'), template);
            });
        });
    };
    TemplateCache.scanAndRegisterHtmlTemplates = function () {
        _.each(HtmlTemplate_1.HtmlTemplate.mimeTypes, function (type) {
            var scriptList = document.querySelectorAll("script[id][type='" + type + "']");
            var i = scriptList.length;
            var arr = new Array(i);
            while (i--) {
                arr[i] = scriptList.item(i);
            }
            _.each(arr, function (elem) {
                var template = new HtmlTemplate_1.HtmlTemplate(elem);
                TemplateCache.registerTemplate(elem.getAttribute('id'), template);
            });
        });
    };
    TemplateCache.templates = {};
    TemplateCache.templateNames = [];
    TemplateCache.resultListTemplateNames = [];
    TemplateCache.defaultTemplates = {};
    return TemplateCache;
}());
exports.TemplateCache = TemplateCache;
document.addEventListener('DOMContentLoaded', function () {
    TemplateCache.scanAndRegisterTemplates();
});
 
 
/***/ }),
/* 80 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __assign = (this && this.__assign) || Object.assign || function(t) {
    for (var s, i = 1, n = arguments.length; i < n; i++) {
        s = arguments[i];
        for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
            t[p] = s[p];
    }
    return t;
};
Object.defineProperty(exports, "__esModule", { value: true });
var GlobalExports_1 = __webpack_require__(10);
var SVGIcons_1 = __webpack_require__(16);
var Dom_1 = __webpack_require__(0);
var KeyboardUtils_1 = __webpack_require__(35);
var SVGDom_1 = __webpack_require__(23);
var defaultOptions = {
    usePlaceholder: false,
    className: 'coveo-input',
    triggerOnChangeAsYouType: false,
    isRequired: true
};
/**
 * A text input widget with standard styling.
 */
var TextInput = /** @class */ (function () {
    /**
     * Creates a new `TextInput`.
     * @param onChange The function to call when the value entered in the text input changes. This function takes the
     * current `TextInput` instance as an argument.
     * @param name The text to display in the text input label or placeholder.
     */
    function TextInput(onChange, name, options) {
        Iif (onChange === void 0) { onChange = function (textInput) { }; }
        this.onChange = onChange;
        this.name = name;
        this.options = options;
        this.lastQueryText = '';
        this.options = __assign({}, defaultOptions, this.options);
        this.buildContent();
        this.buildIcon();
    }
    TextInput.doExport = function () {
        GlobalExports_1.exportGlobally({
            TextInput: TextInput
        });
    };
    /**
     * Gets the element on which the text input is bound.
     * @returns {HTMLElement} The text input element.
     */
    TextInput.prototype.getElement = function () {
        return this.element;
    };
    /**
     * Gets the value currently entered in the text input.
     * @returns {string} The text input current value.
     */
    TextInput.prototype.getValue = function () {
        return Dom_1.$$(this.element).find('input').value;
    };
    /**
     * Sets the value in the text input.
     * @param value The value to set the text input to.
     */
    TextInput.prototype.setValue = function (value) {
        var currentValue = this.getValue();
        Dom_1.$$(this.element).find('input').value = value;
        if (currentValue != value) {
            this.onChange(this);
        }
        this.lastQueryText = this.getInput().value;
    };
    /**
     * Resets the text input.
     */
    TextInput.prototype.reset = function () {
        var currentValue = this.getValue();
        Dom_1.$$(this.element).find('input').value = '';
        if (currentValue != '') {
            this.onChange(this);
        }
        this.lastQueryText = this.getInput().value;
    };
    /**
     * Gets the element on which the text input is bound.
     * @returns {HTMLElement} The text input element.
     */
    TextInput.prototype.build = function () {
        return this.element;
    };
    /**
     * Gets the `input` element (the text input itself).
     * @returns {HTMLElement} The `input` element.
     */
    TextInput.prototype.getInput = function () {
        return Dom_1.$$(this.element).find('input');
    };
    TextInput.prototype.buildContent = function () {
        this.element = Dom_1.$$('div', { className: this.options.className }).el;
        this.input = Dom_1.$$('input', { type: 'text', autocomplete: 'off' });
        this.options.isRequired && this.input.setAttribute('required', 'true');
        this.options.ariaLabel && this.input.setAttribute('aria-label', this.options.ariaLabel);
        this.addEventListeners();
        this.element.appendChild(this.input.el);
        this.name && this.createLabelOrPlaceholder();
    };
    TextInput.prototype.buildIcon = function () {
        if (!this.options.icon) {
            return;
        }
        var iconClassName = this.options.className + "-icon";
        this.icon = Dom_1.$$('span', { className: iconClassName });
        this.icon.setHtml(SVGIcons_1.SVGIcons.icons[this.options.icon]);
        SVGDom_1.SVGDom.addClassToSVGInContainer(this.icon.el, iconClassName + "-svg");
        Dom_1.$$(this.element).prepend(this.icon.el);
    };
    TextInput.prototype.addEventListeners = function () {
        this.options.triggerOnChangeAsYouType ? this.addOnTypeEventListener() : this.addOnChangeEventListener();
    };
    TextInput.prototype.addOnChangeEventListener = function () {
        var _this = this;
        this.input.on(['keydown', 'blur'], function (e) {
            Eif (e.type == 'blur' || e.keyCode == KeyboardUtils_1.KEYBOARD.ENTER) {
                _this.triggerChange();
            }
        });
    };
    TextInput.prototype.addOnTypeEventListener = function () {
        var _this = this;
        this.input.on(['keyup'], function () {
            _this.triggerChange();
        });
    };
    TextInput.prototype.createLabelOrPlaceholder = function () {
        if (this.options.usePlaceholder) {
            return this.input.setAttribute('placeholder', this.name);
        }
        var label = Dom_1.$$('label');
        label.text(this.name);
        this.element.appendChild(label.el);
    };
    TextInput.prototype.triggerChange = function () {
        Eif (this.lastQueryText != this.getInput().value) {
            this.onChange(this);
            this.lastQueryText = this.getInput().value;
        }
    };
    return TextInput;
}());
exports.TextInput = TextInput;
 
 
/***/ }),
/* 81 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
function getHeadingTag(level, fallbackTag) {
    if (fallbackTag === void 0) { fallbackTag = 'div'; }
    if (level === undefined || level < 1 || level > 6) {
        return fallbackTag;
    }
    return "h" + level;
}
exports.getHeadingTag = getHeadingTag;
 
 
/***/ }),
/* 82 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Utils_1 = __webpack_require__(5);
var Assert_1 = __webpack_require__(12);
var _ = __webpack_require__(1);
var Dom_1 = __webpack_require__(0);
var StringAndHoles = /** @class */ (function () {
    function StringAndHoles() {
    }
    StringAndHoles.replace = function (str, find, replace) {
        var strAndHoles = new StringAndHoles();
        if (Utils_1.Utils.isNullOrEmptyString(str)) {
            return strAndHoles;
        }
        var index = str.lastIndexOf(find);
        if (index == -1) {
            strAndHoles.value = str;
            return strAndHoles;
        }
        var holes = [];
        while (index >= 0) {
            var hole = {
                begin: index,
                size: find.length,
                replacementSize: replace.length
            };
            holes.push(hole);
            str = str.slice(0, index) + replace + str.slice(index + find.length);
            index = str.lastIndexOf(find);
        }
        strAndHoles.holes = holes;
        strAndHoles.value = str;
        return strAndHoles;
    };
    /**
     * Shorten the passed path intelligently (path-aware).
     * Works with *local paths* and *network paths*
     * @param uriOrig The path to shorten
     * @param length The length to which the path will be shortened.
     */
    StringAndHoles.shortenPath = function (uriOrig, length) {
        var strAndHoles = new StringAndHoles();
        var uri = uriOrig;
        Iif (Utils_1.Utils.isNullOrEmptyString(uri) || uri.length <= length) {
            strAndHoles.value = uri;
            return strAndHoles;
        }
        var holes = [];
        var first = -1;
        if (Utils_1.Utils.stringStartsWith(uri, '\\\\')) {
            first = uri.indexOf('\\', first + 2);
        }
        else {
            first = uri.indexOf('\\');
        }
        if (first !== -1) {
            var removed = 0;
            var next = uri.indexOf('\\', first + 1);
            while (next !== -1 && uri.length - removed + StringAndHoles.SHORTEN_END.length > length) {
                removed = next - first - 1;
                next = uri.indexOf('\\', next + 1);
            }
            Eif (removed > 0) {
                uri = uri.slice(0, first + 1) + StringAndHoles.SHORTEN_END + uri.slice(removed);
                var hole = {
                    begin: first + 1,
                    size: removed - StringAndHoles.SHORTEN_END.length,
                    replacementSize: StringAndHoles.SHORTEN_END.length
                };
                holes.push(hole);
            }
        }
        if (uri.length > length) {
            var over = uri.length - length + StringAndHoles.SHORTEN_END.length;
            var start = uri.length - over;
            uri = uri.slice(0, start) + StringAndHoles.SHORTEN_END;
            var hole = {
                begin: start,
                size: over,
                replacementSize: StringAndHoles.SHORTEN_END.length
            };
            holes.push(hole);
        }
        strAndHoles.holes = holes;
        strAndHoles.value = uri;
        return strAndHoles;
    };
    /**
     * Shorten the passed string.
     * @param toShortenOrig The string to shorten
     * @param length The length to which the string will be shortened.
     * @param toAppend The string to append at the end (usually, it is set to '...')
     */
    StringAndHoles.shortenString = function (toShortenOrig, length, toAppend) {
        Iif (length === void 0) { length = 200; }
        var toShorten = toShortenOrig;
        toAppend = Utils_1.Utils.toNotNullString(toAppend);
        var strAndHoles = new StringAndHoles();
        Iif (Utils_1.Utils.isNullOrEmptyString(toShorten) || length <= toAppend.length) {
            strAndHoles.value = toShorten;
            return strAndHoles;
        }
        if (toShorten.length <= length) {
            strAndHoles.value = toShorten;
            return strAndHoles;
        }
        var str = toShorten;
        length = length - toAppend.length;
        str = str.slice(0, length);
        if (toShorten.charAt(str.length) !== ' ') {
            var pos = str.lastIndexOf(' ');
            if (pos !== -1 && str.length - pos < StringAndHoles.WORD_SHORTER) {
                str = str.slice(0, pos);
            }
        }
        var holes = [];
        holes[0] = {
            begin: str.length,
            size: toShorten.length - str.length,
            replacementSize: toAppend.length
        };
        str += toAppend;
        strAndHoles.value = str;
        strAndHoles.holes = holes;
        return strAndHoles;
    };
    /**
     * Shorten the passed URI intelligently (path-aware).
     * @param toShortenOrig The URI to shorten
     * @param length The length to which the URI will be shortened.
     */
    StringAndHoles.shortenUri = function (uri, length) {
        var strAndHoles = new StringAndHoles();
        Iif (Utils_1.Utils.isNullOrEmptyString(uri) || uri.length <= length) {
            strAndHoles.value = uri;
            return strAndHoles;
        }
        var holes = [];
        var first = uri.indexOf('//');
        if (first !== -1) {
            first = uri.indexOf('/', first + 2);
        }
        if (first !== -1) {
            var removed = 0;
            var next = uri.indexOf('/', first + 1);
            while (next !== -1 && uri.length - removed + StringAndHoles.SHORTEN_END.length > length) {
                removed = next - first - 1;
                next = uri.indexOf('/', next + 1);
            }
            Eif (removed > 0) {
                uri = uri.slice(0, first + 1) + StringAndHoles.SHORTEN_END + uri.slice(first + 1 + removed);
                var hole = {
                    begin: first + 1,
                    size: removed,
                    replacementSize: StringAndHoles.SHORTEN_END.length
                };
                holes.push(hole);
            }
        }
        if (uri.length > length) {
            var over = uri.length - length + StringAndHoles.SHORTEN_END.length;
            var start = uri.length - over;
            uri = uri.slice(0, start) + StringAndHoles.SHORTEN_END;
            var hole = {
                begin: start,
                size: over,
                replacementSize: StringAndHoles.SHORTEN_END.length
            };
            holes.push(hole);
        }
        strAndHoles.holes = holes;
        strAndHoles.value = uri;
        return strAndHoles;
    };
    StringAndHoles.SHORTEN_END = '...';
    StringAndHoles.WORD_SHORTER = 10;
    return StringAndHoles;
}());
exports.StringAndHoles = StringAndHoles;
var HighlightUtils = /** @class */ (function () {
    function HighlightUtils() {
    }
    /**
     * Highlight the passed string using specified highlights and holes.
     * @param content The string to highlight items in.
     * @param highlights The highlighted positions to highlight in the string.
     * @param holes Possible holes which are used to skip highlighting.
     * @param cssClass The css class to use on the highlighting `span`.
     */
    HighlightUtils.highlightString = function (content, highlights, holes, cssClass) {
        Assert_1.Assert.isNotUndefined(highlights);
        Assert_1.Assert.isNotNull(highlights);
        Assert_1.Assert.isNonEmptyString(cssClass);
        if (Utils_1.Utils.isNullOrEmptyString(content)) {
            return content;
        }
        var maxIndex = content.length;
        var highlighted = '';
        var last = 0;
        for (var i = 0; i < highlights.length; i++) {
            var highlight = highlights[i];
            var start = highlight.offset;
            var end = start + highlight.length;
            if (holes !== null) {
                var skip = false;
                for (var j = 0; j < holes.length; j++) {
                    var hole = holes[j];
                    var holeBegin = hole.begin;
                    var holeEnd = holeBegin + hole.size;
                    if (start < holeBegin && end >= holeBegin && end < holeEnd) {
                        end = holeBegin;
                    }
                    else if (start >= holeBegin && end < holeEnd) {
                        skip = true;
                        break;
                    }
                    else if (start >= holeBegin && start < holeEnd && end >= holeEnd) {
                        start = holeBegin + hole.replacementSize;
                        end -= hole.size - hole.replacementSize;
                    }
                    else Iif (start < holeBegin && end >= holeEnd) {
                        end -= hole.size - hole.replacementSize;
                    }
                    else if (start >= holeEnd) {
                        var offset = hole.size - hole.replacementSize;
                        start -= offset;
                        end -= offset;
                    }
                }
                if (skip || start === end) {
                    continue;
                }
            }
            if (end > maxIndex) {
                break;
            }
            highlighted += _.escape(content.slice(last, start));
            highlighted += "<span class=\"" + cssClass + "\"";
            if (highlight.dataHighlightGroup) {
                highlighted += " data-highlight-group=\"" + highlight.dataHighlightGroup.toString() + "\"";
            }
            if (highlight.dataHighlightGroupTerm) {
                highlighted += " data-highlight-group-term=\"" + highlight.dataHighlightGroupTerm + "\"";
            }
            highlighted += '>';
            highlighted += _.escape(content.slice(start, end));
            highlighted += '</span>';
            last = end;
        }
        if (last != maxIndex) {
            highlighted += _.escape(content.slice(last));
        }
        return highlighted;
    };
    HighlightUtils.highlight = function (text, match, className) {
        var elements = [];
        var regex = RegExp(match, 'i');
        var parts = text.split(regex);
        var lastPart = parts.pop();
        var index = 0;
        parts.forEach(function (part) {
            if (part) {
                var unhighlighted = createSpanWithText(part);
                elements.push(unhighlighted.el);
                index += part.length;
            }
            var matchedSubstring = text.substring(index, index + match.length);
            var highlighted = createSpanWithText(matchedSubstring);
            highlighted.addClass(className);
            elements.push(highlighted.el);
            index += match.length;
        });
        if (lastPart) {
            var last = createSpanWithText(lastPart);
            elements.push(last.el);
        }
        return elements;
    };
    return HighlightUtils;
}());
exports.HighlightUtils = HighlightUtils;
function createSpanWithText(text) {
    var span = Dom_1.$$('span');
    span.text(text);
    return span;
}
 
 
/***/ }),
/* 83 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__value_js__ = __webpack_require__(343);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_0__value_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__array_js__ = __webpack_require__(721);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return __WEBPACK_IMPORTED_MODULE_1__array_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__basis_js__ = __webpack_require__(346);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return __WEBPACK_IMPORTED_MODULE_2__basis_js__["b"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__basisClosed_js__ = __webpack_require__(719);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return __WEBPACK_IMPORTED_MODULE_3__basisClosed_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__date_js__ = __webpack_require__(722);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return __WEBPACK_IMPORTED_MODULE_4__date_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__discrete_js__ = __webpack_require__(1191);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return __WEBPACK_IMPORTED_MODULE_5__discrete_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__hue_js__ = __webpack_require__(1192);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "m", function() { return __WEBPACK_IMPORTED_MODULE_6__hue_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__number_js__ = __webpack_require__(246);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "o", function() { return __WEBPACK_IMPORTED_MODULE_7__number_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__numberArray_js__ = __webpack_require__(347);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "p", function() { return __WEBPACK_IMPORTED_MODULE_8__numberArray_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__object_js__ = __webpack_require__(723);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "q", function() { return __WEBPACK_IMPORTED_MODULE_9__object_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__round_js__ = __webpack_require__(1193);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "u", function() { return __WEBPACK_IMPORTED_MODULE_10__round_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__string_js__ = __webpack_require__(724);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "v", function() { return __WEBPACK_IMPORTED_MODULE_11__string_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__transform_index_js__ = __webpack_require__(1194);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "w", function() { return __WEBPACK_IMPORTED_MODULE_12__transform_index_js__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "x", function() { return __WEBPACK_IMPORTED_MODULE_12__transform_index_js__["b"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__zoom_js__ = __webpack_require__(1197);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "y", function() { return __WEBPACK_IMPORTED_MODULE_13__zoom_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__rgb_js__ = __webpack_require__(718);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "r", function() { return __WEBPACK_IMPORTED_MODULE_14__rgb_js__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "s", function() { return __WEBPACK_IMPORTED_MODULE_14__rgb_js__["b"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "t", function() { return __WEBPACK_IMPORTED_MODULE_14__rgb_js__["c"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__hsl_js__ = __webpack_require__(1198);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "k", function() { return __WEBPACK_IMPORTED_MODULE_15__hsl_js__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "l", function() { return __WEBPACK_IMPORTED_MODULE_15__hsl_js__["b"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__lab_js__ = __webpack_require__(1199);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "n", function() { return __WEBPACK_IMPORTED_MODULE_16__lab_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_17__hcl_js__ = __webpack_require__(1200);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return __WEBPACK_IMPORTED_MODULE_17__hcl_js__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return __WEBPACK_IMPORTED_MODULE_17__hcl_js__["b"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_18__cubehelix_js__ = __webpack_require__(1201);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return __WEBPACK_IMPORTED_MODULE_18__cubehelix_js__["b"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return __WEBPACK_IMPORTED_MODULE_18__cubehelix_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_19__piecewise_js__ = __webpack_require__(1202);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "z", function() { return __WEBPACK_IMPORTED_MODULE_19__piecewise_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_20__quantize_js__ = __webpack_require__(1203);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "A", function() { return __WEBPACK_IMPORTED_MODULE_20__quantize_js__["a"]; });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
/***/ }),
/* 84 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var coveo_analytics_1 = __webpack_require__(947);
var storage_1 = __webpack_require__(293);
function buildHistoryStore() {
    var historyStore = buildCookieHistoryStore();
    historyStore.store = storage_1.getAvailableStorage();
    return historyStore;
}
exports.buildHistoryStore = buildHistoryStore;
function buildNullHistoryStore() {
    var historyStore = buildCookieHistoryStore();
    historyStore.store = new storage_1.NullStorage();
    return historyStore;
}
exports.buildNullHistoryStore = buildNullHistoryStore;
function buildCookieHistoryStore() {
    var cookieStorage = new storage_1.CookieStorage();
    return new coveo_analytics_1.history.HistoryStore(cookieStorage);
}
 
 
/***/ }),
/* 85 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var underscore_1 = __webpack_require__(1);
var Core_1 = __webpack_require__(9);
var CookieUtils_1 = __webpack_require__(168);
var HistoryStore_1 = __webpack_require__(84);
var LocalStorageUtils_1 = __webpack_require__(96);
var AnalyticsInformation = /** @class */ (function () {
    function AnalyticsInformation() {
        this.visitorIdKey = 'visitorId';
        this.clientIdKey = 'clientId';
        this.storage = new LocalStorageUtils_1.SafeLocalStorage();
    }
    Object.defineProperty(AnalyticsInformation.prototype, "clientId", {
        get: function () {
            // Yes, its backwards: We are using a key named "visitorId" to fetched something for "clientId"
            // This is done to synchronize with https://github.com/coveo/coveo.analytics.js
            // This is intentional.
            return this.storage.getItem(this.visitorIdKey) || null;
        },
        set: function (id) {
            this.storage.setItem(this.visitorIdKey, id);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(AnalyticsInformation.prototype, "lastPageId", {
        get: function () {
            var store = HistoryStore_1.buildHistoryStore();
            var actions = store.getHistory();
            var pageViewActionId = underscore_1.findLastIndex(actions, function (action) { return action.name === 'PageView'; });
            if (pageViewActionId === -1) {
                return null;
            }
            return actions[pageViewActionId].value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(AnalyticsInformation.prototype, "location", {
        get: function () {
            return document.location.href;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(AnalyticsInformation.prototype, "referrer", {
        get: function () {
            return document.referrer;
        },
        enumerable: true,
        configurable: true
    });
    AnalyticsInformation.prototype.clear = function () {
        this.clearLocalStorage();
        this.clearCookies();
    };
    AnalyticsInformation.prototype.clearLocalStorage = function () {
        this.storage.removeItem(this.visitorIdKey);
        new Core_1.LocalStorageUtils(this.clientIdKey).remove();
    };
    AnalyticsInformation.prototype.clearCookies = function () {
        CookieUtils_1.Cookie.erase(this.visitorIdKey);
        CookieUtils_1.Cookie.erase(this.clientIdKey);
    };
    return AnalyticsInformation;
}());
exports.AnalyticsInformation = AnalyticsInformation;
 
 
/***/ }),
/* 86 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var SearchAlertsEvents = /** @class */ (function () {
    function SearchAlertsEvents() {
    }
    SearchAlertsEvents.searchAlertsCreated = 'searchAlertsCreated';
    SearchAlertsEvents.searchAlertsDeleted = 'searchAlertsDeleted';
    SearchAlertsEvents.searchAlertsFail = 'searchAlertsFail';
    SearchAlertsEvents.searchAlertsPopulateMessage = 'searchAlertsPopulateMessage';
    return SearchAlertsEvents;
}());
exports.SearchAlertsEvents = SearchAlertsEvents;
 
 
/***/ }),
/* 87 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Assert_1 = __webpack_require__(12);
var QueryUtils_1 = __webpack_require__(37);
var _ = __webpack_require__(1);
/**
 * An `ExpressionBuilder` that is mostly used by the {@link QueryBuilder}.<br/>
 * It is used to build a single query expression.<br/>
 * It allows combining multiple expression parts into a single string and provides utilities to generate common expression parts.
 */
var ExpressionBuilder = /** @class */ (function () {
    function ExpressionBuilder() {
        this.parts = []; // he he he
        this.wrapParts = true;
    }
    /**
     * Add a new part to the expression.
     * @param expression
     */
    ExpressionBuilder.prototype.add = function (expression) {
        Assert_1.Assert.isNonEmptyString(expression);
        this.parts.push(expression);
    };
    /**
     * Take another `ExpressionBuilder`, and copy it.
     * @param expression
     */
    ExpressionBuilder.prototype.fromExpressionBuilder = function (expression) {
        this.parts = this.parts.concat(expression.parts);
    };
    /**
     * Add a new part to the expression, but specific for field values<br/>
     * eg @field=(value1,value2,value3).
     * @param field The field for which to create an expression (e.g.: @foo).
     * @param operator The operator to use e.g.: = (equal) == (strict equal) <> (not equal).
     * @param values The values to put in the expression.
     * @param forceValueEscape Force the escaping of the values
     */
    ExpressionBuilder.prototype.addFieldExpression = function (field, operator, values, forceEscape) {
        if (forceEscape === void 0) { forceEscape = false; }
        Assert_1.Assert.isNonEmptyString(field);
        Assert_1.Assert.stringStartsWith(field, '@');
        Assert_1.Assert.isNonEmptyString(operator);
        Assert_1.Assert.isLargerOrEqualsThan(1, values.length);
        this.add(QueryUtils_1.QueryUtils.buildFieldExpression(field, operator, values, forceEscape));
    };
    /**
     * Add a new part to the expression, but specific for field values<br/>
     * eg : NOT @field==(value1, value2, value3).
     * @param field The field for which to create an expression (e.g.: @foo)
     * @param values The values to put in the expression.
     * @param forceValueEscape Force the escaping of the values
     */
    ExpressionBuilder.prototype.addFieldNotEqualExpression = function (field, values, forceEscape) {
        if (forceEscape === void 0) { forceEscape = false; }
        Assert_1.Assert.isNonEmptyString(field);
        Assert_1.Assert.stringStartsWith(field, '@');
        Assert_1.Assert.isLargerOrEqualsThan(1, values.length);
        this.add(QueryUtils_1.QueryUtils.buildFieldNotEqualExpression(field, values, (forceEscape = false)));
    };
    /**
     * Removes an expression from the builder.
     * @param expression
     */
    ExpressionBuilder.prototype.remove = function (expression) {
        Assert_1.Assert.isNonEmptyString(expression);
        var index = _.indexOf(this.parts, expression);
        if (index != -1) {
            this.parts.splice(_.indexOf(this.parts, expression), 1);
        }
    };
    /**
     * Checks if the builder is currently empty.
     * @returns {boolean}
     */
    ExpressionBuilder.prototype.isEmpty = function () {
        return this.parts.length == 0;
    };
    /**
     * Builds the expression string by combining all the parts together.<br/>
     * @param exp expression to join the different parts, default to a space.
     * @returns {any}
     */
    ExpressionBuilder.prototype.build = function (exp) {
        Eif (exp === void 0) { exp = ' '; }
        if (this.parts.length == 0) {
            return undefined;
        }
        else if (this.parts.length == 1) {
            return this.parts[0];
        }
        else Eif (this.wrapParts) {
            return '(' + this.parts.join(')' + exp + '(') + ')';
        }
        else {
            return this.parts.join(exp);
        }
    };
    /**
     * @returns array containing the differents parts of the expression
     */
    ExpressionBuilder.prototype.getParts = function () {
        return this.parts;
    };
    /**
     * Merges several `ExpressionBuilder` together.
     * @param builders Builders that should be merged.
     * @returns {Coveo.ExpressionBuilder}
     */
    ExpressionBuilder.merge = function () {
        var builders = [];
        for (var _i = 0; _i < arguments.length; _i++) {
            builders[_i] = arguments[_i];
        }
        var merged = new ExpressionBuilder();
        _.each(builders, function (builder) {
            merged.parts = merged.parts.concat(builder.parts);
        });
        return merged;
    };
    /**
     * Merges several `ExpressionBuilder` together, using the OR operator.
     * @param builders Builders that should be merged.
     * @returns {Coveo.ExpressionBuilder}
     */
    ExpressionBuilder.mergeUsingOr = function () {
        var builders = [];
        for (var _i = 0; _i < arguments.length; _i++) {
            builders[_i] = arguments[_i];
        }
        var nonEmpty = _.filter(builders, function (b) { return !b.isEmpty(); });
        var merged = new ExpressionBuilder();
        if (nonEmpty.length == 1) {
            merged.parts = [].concat(nonEmpty[0].parts);
        }
        else if (nonEmpty.length > 1) {
            var parts = _.map(nonEmpty, function (b) { return b.build(); });
            merged.add('(' + parts.join(') OR (') + ')');
        }
        return merged;
    };
    return ExpressionBuilder;
}());
exports.ExpressionBuilder = ExpressionBuilder;
 
 
/***/ }),
/* 88 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Assert_1 = __webpack_require__(12);
var Utils_1 = __webpack_require__(5);
var _ = __webpack_require__(1);
var MiscModules_1 = __webpack_require__(97);
var HashUtils = /** @class */ (function () {
    function HashUtils() {
    }
    HashUtils.getHash = function (w) {
        if (w === void 0) { w = window; }
        Assert_1.Assert.exists(w);
        // window.location.hash returns the DECODED hash on Firefox (it's a well known bug),
        // so any & in values will be already unescaped. This breaks our value splitting.
        // The following trick works on all browsers.
        var ret = '#' + (w.location.href.split('#')[1] || '');
        return HashUtils.getAjaxcrawlableHash(ret);
    };
    HashUtils.getValue = function (key, toParse) {
        Assert_1.Assert.isNonEmptyString(key);
        Assert_1.Assert.exists(toParse);
        toParse = HashUtils.getAjaxcrawlableHash(toParse);
        var paramValue = HashUtils.getRawValue(key, toParse);
        if (paramValue != undefined) {
            paramValue = HashUtils.getValueDependingOnType(key, paramValue);
        }
        return paramValue;
    };
    HashUtils.encodeValues = function (values) {
        var hash = [];
        _.each(values, function (valueToEncode, key, obj) {
            var encodedValue = '';
            if (Utils_1.Utils.isNonEmptyArray(valueToEncode)) {
                encodedValue = HashUtils.encodeArray(valueToEncode);
            }
            else if (_.isObject(valueToEncode) && Utils_1.Utils.isNonEmptyArray(_.keys(valueToEncode))) {
                encodedValue = HashUtils.encodeObject(valueToEncode);
            }
            else if (!Utils_1.Utils.isNullOrUndefined(valueToEncode)) {
                encodedValue = Utils_1.Utils.safeEncodeURIComponent(valueToEncode.toString());
            }
            if (encodedValue != '') {
                hash.push(key + '=' + encodedValue);
            }
        });
        return hash.join('&');
    };
    HashUtils.getAjaxcrawlableHash = function (hash) {
        Iif (hash[1] != undefined && hash[1] == '!') {
            return hash.substring(0, 1) + hash.substring(2);
        }
        else {
            return hash;
        }
    };
    HashUtils.getRawValue = function (key, toParse) {
        Assert_1.Assert.exists(key);
        Assert_1.Assert.exists(toParse);
        Assert_1.Assert.check(toParse.indexOf('#') == 0 || toParse == '');
        var toParseArray = toParse.substr(1).split('&');
        var paramPos = 0;
        var loop = true;
        var paramValue = undefined;
        while (loop) {
            var paramValuePair = toParseArray[paramPos].split('=');
            if (paramValuePair[0] == key) {
                loop = false;
                paramValue = paramValuePair[1];
            }
            else {
                paramPos++;
                if (paramPos >= toParseArray.length) {
                    paramPos = undefined;
                    loop = false;
                }
            }
        }
        return paramValue;
    };
    HashUtils.getValueDependingOnType = function (key, paramValue) {
        var type = HashUtils.getValueType(key, paramValue);
        var returnValue;
        if (type == 'object') {
            returnValue = HashUtils.decodeObject(paramValue);
        }
        else if (type == 'array') {
            returnValue = HashUtils.decodeArray(paramValue);
        }
        else {
            try {
                returnValue = decodeURIComponent(paramValue);
            }
            catch (e) {
                new MiscModules_1.Logger(HashUtils).warn('Error while decoding a value from the URL as a standard value', e, key, paramValue);
            }
        }
        return returnValue;
    };
    HashUtils.getValueType = function (key, paramValue) {
        if (key == 'q') {
            return 'other';
        }
        else if (HashUtils.isObject(paramValue)) {
            return 'object';
        }
        else if (HashUtils.startsOrEndsWithSquareBracket(paramValue)) {
            return 'array';
        }
        else {
            return 'other';
        }
    };
    HashUtils.startsWithLeftSquareBracket = function (value) {
        return HashUtils.DELIMITER.arrayStartRegExp.test(value);
    };
    HashUtils.startsWithEncodedLeftSquareBracket = function (value) {
        return value.indexOf(Utils_1.Utils.safeEncodeURIComponent(HashUtils.DELIMITER.arrayStart)) == 0;
    };
    HashUtils.endsWithRightSquareBracket = function (value) {
        return HashUtils.DELIMITER.arrayEndRegExp.test(value);
    };
    HashUtils.endsWithEncodedRightSquareBracket = function (value) {
        var encodedBracket = Utils_1.Utils.safeEncodeURIComponent(HashUtils.DELIMITER.arrayEnd);
        var encodedBracketIndex = value.indexOf(encodedBracket);
        var hasEncodedBracket = encodedBracketIndex !== -1;
        return hasEncodedBracket && encodedBracketIndex == value.length - encodedBracket.length;
    };
    HashUtils.isObjectStartNotEncoded = function (value) {
        return value.substr(0, 1) == HashUtils.DELIMITER.objectStart;
    };
    HashUtils.isObjectStartEncoded = function (value) {
        return value.indexOf(Utils_1.Utils.safeEncodeURIComponent(HashUtils.DELIMITER.objectStart)) == 0;
    };
    HashUtils.isObjectEndNotEncoded = function (value) {
        return value.substr(value.length - 1) == HashUtils.DELIMITER.objectEnd;
    };
    HashUtils.isObjectEndEncoded = function (value) {
        return (value.indexOf(Utils_1.Utils.safeEncodeURIComponent(HashUtils.DELIMITER.objectEnd)) ==
            value.length - Utils_1.Utils.safeEncodeURIComponent(HashUtils.DELIMITER.objectEnd).length);
    };
    HashUtils.isObject = function (value) {
        var isObjectStart = HashUtils.isObjectStartNotEncoded(value) || HashUtils.isObjectStartEncoded(value);
        var isObjectEnd = HashUtils.isObjectEndNotEncoded(value) || HashUtils.isObjectEndEncoded(value);
        return isObjectStart && isObjectEnd;
    };
    HashUtils.startsOrEndsWithSquareBracket = function (value) {
        var isArrayStart = HashUtils.startsWithLeftSquareBracket(value) || HashUtils.startsWithEncodedLeftSquareBracket(value);
        var isArrayEnd = HashUtils.endsWithRightSquareBracket(value) || HashUtils.endsWithEncodedRightSquareBracket(value);
        return isArrayStart || isArrayEnd;
    };
    HashUtils.encodeArray = function (array) {
        var arrayReturn = _.map(array, function (value) {
            return Utils_1.Utils.safeEncodeURIComponent(value);
        });
        return HashUtils.DELIMITER.arrayStart + arrayReturn.join(',') + HashUtils.DELIMITER.arrayEnd;
    };
    HashUtils.encodeObject = function (obj) {
        var _this = this;
        var retArray = _.map(obj, function (val, key, obj) {
            return "\"" + Utils_1.Utils.safeEncodeURIComponent(key) + "\":" + _this.encodeValue(val);
        });
        return HashUtils.DELIMITER.objectStart + retArray.join(' , ') + HashUtils.DELIMITER.objectEnd;
    };
    HashUtils.encodeValue = function (val) {
        var encodedValue = '';
        Iif (_.isArray(val)) {
            encodedValue = HashUtils.encodeArray(val);
        }
        else if (_.isObject(val)) {
            encodedValue = JSON.stringify(val);
        }
        else if (_.isNumber(val) || _.isBoolean(val)) {
            encodedValue = Utils_1.Utils.safeEncodeURIComponent(val.toString());
        }
        else {
            encodedValue = '"' + Utils_1.Utils.safeEncodeURIComponent(val) + '"';
        }
        return encodedValue;
    };
    HashUtils.decodeObject = function (obj) {
        Iif (HashUtils.isObjectStartEncoded(obj) && HashUtils.isObjectEndEncoded(obj)) {
            obj = obj.replace(/encodeURIComponent(HashUtils.Delimiter.objectStart)/, HashUtils.DELIMITER.objectStart);
            obj = obj.replace(Utils_1.Utils.safeEncodeURIComponent(HashUtils.DELIMITER.objectEnd), HashUtils.DELIMITER.objectEnd);
        }
        try {
            var containsArray = /(\[.*\])/.exec(obj);
            if (containsArray) {
                obj = obj.replace(/(\[.*\])/, "[" + this.decodeArray(containsArray[1])
                    .map(function (val) { return "\"" + val + "\""; })
                    .join(',') + "]");
            }
            var decoded = decodeURIComponent(obj);
            return JSON.parse(decoded);
        }
        catch (e) {
            new MiscModules_1.Logger(HashUtils).warn('Error while decoding a value from the URL as an object', e, obj);
            return {};
        }
    };
    HashUtils.decodeArray = function (value) {
        var valueWithoutSquareBrackets = HashUtils.removeSquareBrackets(value);
        var array = valueWithoutSquareBrackets.split(',');
        return _.chain(array)
            .map(function (val) {
            try {
                return decodeURIComponent(val);
            }
            catch (e) {
                new MiscModules_1.Logger(HashUtils).warn('Error while decoding a value from the URL as an array', e, val, value);
                return null;
            }
        })
            .compact()
            .value();
    };
    HashUtils.removeSquareBrackets = function (value) {
        if (HashUtils.startsWithEncodedLeftSquareBracket(value)) {
            value = value.replace(Utils_1.Utils.safeEncodeURIComponent(HashUtils.DELIMITER.arrayStart), '');
        }
        if (HashUtils.endsWithEncodedRightSquareBracket(value)) {
            value = value.replace(Utils_1.Utils.safeEncodeURIComponent(HashUtils.DELIMITER.arrayEnd), '');
        }
        if (HashUtils.startsWithLeftSquareBracket(value)) {
            value = value.replace(HashUtils.DELIMITER.arrayStart, '');
        }
        if (HashUtils.endsWithRightSquareBracket(value)) {
            value = value.replace(HashUtils.DELIMITER.arrayEnd, '');
        }
        return value;
    };
    HashUtils.DELIMITER = {
        objectStart: '{',
        objectEnd: '}',
        arrayStart: '[',
        arrayEnd: ']',
        arrayStartRegExp: /^\[/,
        arrayEndRegExp: /\]$/
    };
    return HashUtils;
}());
exports.HashUtils = HashUtils;
 
 
/***/ }),
/* 89 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var underscore_1 = __webpack_require__(1);
var Assert_1 = __webpack_require__(12);
var Utils_1 = __webpack_require__(5);
var HtmlTemplate_1 = __webpack_require__(217);
var TemplateCache_1 = __webpack_require__(79);
var TemplateList_1 = __webpack_require__(135);
var UnderscoreTemplate_1 = __webpack_require__(90);
var ComponentOptions_1 = __webpack_require__(13);
var IComponentOptions_1 = __webpack_require__(115);
var TemplateComponentOptions = /** @class */ (function () {
    function TemplateComponentOptions() {
    }
    /**
     * Builds a template option.
     *
     * The option accepts a CSS selector matching a valid template. This selector can either be a class, or an ID
     * selector.
     *
     * When building a template option using an ID selector, the matching template must be registered in the
     * [`TemplateCache`]{@link TemplateCache}, however.
     *
     * **Markup Examples:**
     *
     * > `data-foo-id="#bar"`
     *
     * > `data-foo-selector=".bar"`
     *
     * @param optionArgs The arguments to apply when building the option.
     * @returns {Template} The resulting option value.
     */
    TemplateComponentOptions.buildTemplateOption = function (optionArgs) {
        return ComponentOptions_1.ComponentOptions.buildOption(IComponentOptions_1.ComponentOptionsType.TEMPLATE, TemplateComponentOptions.loadTemplateOption, optionArgs);
    };
    TemplateComponentOptions.loadTemplateOption = function (element, name, option, doc) {
        if (doc === void 0) { doc = document; }
        var template;
        // Attribute: template selector
        var selectorAttr = option.selectorAttr || ComponentOptions_1.ComponentOptions.attrNameFromName(name, option) + '-selector';
        var selector = element.getAttribute(selectorAttr) || ComponentOptions_1.ComponentOptions.getAttributeFromAlias(element, option);
        if (selector != null) {
            var templateElement = doc.querySelector(selector);
            Eif (templateElement != null) {
                template = TemplateComponentOptions.createResultTemplateFromElement(templateElement);
            }
        }
        // Attribute: template id
        if (template == null) {
            var idAttr = option.idAttr || ComponentOptions_1.ComponentOptions.attrNameFromName(name, option) + '-id';
            var id = element.getAttribute(idAttr) || ComponentOptions_1.ComponentOptions.getAttributeFromAlias(element, option);
            if (id != null) {
                template = TemplateComponentOptions.loadResultTemplateFromId(id);
            }
        }
        // Child
        if (template == null) {
            var childSelector = option.childSelector;
            if (childSelector == null) {
                childSelector = '.' + name.replace(/([A-Z])/g, '-$1').toLowerCase();
            }
            template = TemplateComponentOptions.loadChildrenResultTemplateFromSelector(element, childSelector);
        }
        return template;
    };
    TemplateComponentOptions.createResultTemplateFromElement = function (element) {
        Assert_1.Assert.exists(element);
        var type = element.getAttribute('type');
        var mimeTypes = 'You must specify the type of template. Valid values are:' +
            ' ' +
            UnderscoreTemplate_1.UnderscoreTemplate.mimeTypes.toString() +
            ' ' +
            HtmlTemplate_1.HtmlTemplate.mimeTypes.toString();
        Assert_1.Assert.check(Utils_1.Utils.isNonEmptyString(type), mimeTypes);
        if (underscore_1.indexOf(UnderscoreTemplate_1.UnderscoreTemplate.mimeTypes, type.toLowerCase()) != -1) {
            return UnderscoreTemplate_1.UnderscoreTemplate.create(element);
        }
        else Eif (underscore_1.indexOf(HtmlTemplate_1.HtmlTemplate.mimeTypes, type.toLowerCase()) != -1) {
            return new HtmlTemplate_1.HtmlTemplate(element);
        }
        else {
            Assert_1.Assert.fail('Cannot guess template type from attribute: ' + type + '. Valid values are ' + mimeTypes);
            return undefined;
        }
    };
    TemplateComponentOptions.loadResultTemplateFromId = function (templateId) {
        return Utils_1.Utils.isNonEmptyString(templateId) ? TemplateCache_1.TemplateCache.getTemplate(templateId) : null;
    };
    TemplateComponentOptions.loadChildrenResultTemplateFromSelector = function (element, selector) {
        var foundElements = ComponentOptions_1.ComponentOptions.loadChildrenHtmlElementFromSelector(element, selector);
        if (foundElements.length > 0) {
            return new TemplateList_1.TemplateList(underscore_1.compact(foundElements.map(function (element) { return TemplateComponentOptions.createResultTemplateFromElement(element); })));
        }
        return null;
    };
    return TemplateComponentOptions;
}());
exports.TemplateComponentOptions = TemplateComponentOptions;
 
 
/***/ }),
/* 90 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
var Template_1 = __webpack_require__(29);
var Assert_1 = __webpack_require__(12);
var Utils_1 = __webpack_require__(5);
var Logger_1 = __webpack_require__(18);
var TemplateFromAScriptTag_1 = __webpack_require__(304);
var DefaultResultTemplate_1 = __webpack_require__(173);
var _ = __webpack_require__(1);
var Dom_1 = __webpack_require__(0);
var UnderscoreTemplate = /** @class */ (function (_super) {
    __extends(UnderscoreTemplate, _super);
    function UnderscoreTemplate(element) {
        var _this = _super.call(this) || this;
        _this.element = element;
        Assert_1.Assert.exists(element);
        var templateString = element.innerHTML;
        try {
            _this.template = _.template(templateString);
        }
        catch (e) {
            new Logger_1.Logger(_this).error('Cannot instantiate underscore template. Might be caused by strict Content-Security-Policy. Will fallback on a default template...', e);
        }
        _this.templateFromAScriptTag = new TemplateFromAScriptTag_1.TemplateFromAScriptTag(_this, _this.element);
        _this.dataToString = function (object) {
            var extended = _.extend({}, object, UnderscoreTemplate.templateHelpers);
            Eif (_this.template) {
                try {
                    return _this.template(extended);
                }
                catch (e) {
                    new Logger_1.Logger(_this).error('Cannot instantiate template', e.message, _this.getTemplateInfo());
                    new Logger_1.Logger(_this).warn('A default template was used');
                    return new DefaultResultTemplate_1.DefaultResultTemplate().getFallbackTemplate();
                }
            }
            else {
                return new DefaultResultTemplate_1.DefaultResultTemplate().getFallbackTemplate();
            }
        };
        return _this;
    }
    UnderscoreTemplate.prototype.toHtmlElement = function () {
        var script = this.templateFromAScriptTag.toHtmlElement(Dom_1.$$('script'));
        script.setAttribute('type', _.first(UnderscoreTemplate.mimeTypes));
        return script;
    };
    UnderscoreTemplate.prototype.getType = function () {
        return 'UnderscoreTemplate';
    };
    UnderscoreTemplate.prototype.getTemplateInfo = function () {
        return this.element;
    };
    UnderscoreTemplate.registerTemplateHelper = function (helperName, helper) {
        UnderscoreTemplate.templateHelpers[helperName] = helper;
    };
    UnderscoreTemplate.isLibraryAvailable = function () {
        return Utils_1.Utils.exists(window['_']);
    };
    UnderscoreTemplate.fromString = function (template, properties) {
        var script = TemplateFromAScriptTag_1.TemplateFromAScriptTag.fromString(template, properties, document.createElement('script'));
        script.setAttribute('type', UnderscoreTemplate.mimeTypes[0]);
        return new UnderscoreTemplate(script);
    };
    UnderscoreTemplate.create = function (element) {
        Assert_1.Assert.exists(element);
        return new UnderscoreTemplate(element);
    };
    UnderscoreTemplate.templateHelpers = {};
    UnderscoreTemplate.mimeTypes = ['text/underscore', 'text/underscore-template', 'text/x-underscore', 'text/x-underscore-template'];
    return UnderscoreTemplate;
}(Template_1.Template));
exports.UnderscoreTemplate = UnderscoreTemplate;
 
 
/***/ }),
/* 91 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var TableBuilder_1 = __webpack_require__(62);
var underscore_1 = __webpack_require__(1);
var Dom_1 = __webpack_require__(0);
var defaultNullOutput = '-- NULL --';
var GenericValueOutput = /** @class */ (function () {
    function GenericValueOutput() {
    }
    GenericValueOutput.prototype.output = function (section) {
        if (underscore_1.isArray(section)) {
            return this.arrayJoined(section);
        }
        if (underscore_1.isObject(section)) {
            return this.objectJoined(section);
        }
        return this.simpleValue(section);
    };
    GenericValueOutput.prototype.simpleValue = function (section) {
        return {
            content: this.valueOrNullOutput(section)
        };
    };
    GenericValueOutput.prototype.objectJoined = function (section) {
        var _this = this;
        var content = '';
        underscore_1.each(section, function (value, key) {
            if (underscore_1.isArray(value)) {
                var list = Dom_1.$$('dl');
                list.append(Dom_1.$$('dt', undefined, key).el);
                var innerList = Dom_1.$$('dd', undefined, _this.arrayJoined(value).content);
                list.append(innerList.el);
                content += list.el.outerHTML;
            }
            else if (underscore_1.isObject(value)) {
                content += _this.objectJoined(value).content;
            }
            else {
                var list = Dom_1.$$('dl');
                list.append(Dom_1.$$('dt', undefined, key).el);
                list.append(Dom_1.$$('dd', undefined, _this.valueOrNullOutput(value)).el);
                content += list.el.outerHTML;
            }
        });
        return {
            content: content,
            cellRenderer: TableBuilder_1.GenericHtmlRenderer
        };
    };
    GenericValueOutput.prototype.arrayJoined = function (section) {
        var _this = this;
        if (!section || section.length == 0) {
            return {
                content: defaultNullOutput
            };
        }
        var list = Dom_1.$$('ul', {
            className: 'relevance-inspector-list-output'
        });
        section.forEach(function (sectionValue) {
            if (underscore_1.isObject(sectionValue)) {
                list.append(Dom_1.$$('li', undefined, _this.objectJoined(sectionValue).content).el);
            }
            else {
                list.append(Dom_1.$$('li', undefined, _this.valueOrNullOutput(sectionValue)).el);
            }
        });
        return {
            content: list.el.outerHTML,
            cellRenderer: TableBuilder_1.GenericHtmlRenderer
        };
    };
    GenericValueOutput.prototype.valueOrNullOutput = function (value) {
        if (value != null && value !== '') {
            return value.toString();
        }
        return defaultNullOutput;
    };
    return GenericValueOutput;
}());
exports.GenericValueOutput = GenericValueOutput;
 
 
/***/ }),
/* 92 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Dom_1 = __webpack_require__(0);
var Strings_1 = __webpack_require__(4);
var _ = __webpack_require__(1);
var GlobalExports_1 = __webpack_require__(10);
/**
 * A dropdown widget with standard styling.
 */
var Dropdown = /** @class */ (function () {
    /**
     * Creates a new `Dropdown`.
     * @param onChange The function to call when the dropdown selected value changes. This function takes the current
     * `Dropdown` instance as an argument.
     * @param listOfValues The selectable values to display in the dropdown.
     * @param getDisplayValue An optional function to modify the display values, rather than using the values as they
     * appear in the `listOfValues`.
     * @param label The label to use for the input for accessibility purposes.
     */
    function Dropdown(onChange, listOfValues, getDisplayValue, label) {
        Iif (onChange === void 0) { onChange = function (dropdown) { }; }
        if (getDisplayValue === void 0) { getDisplayValue = Strings_1.l; }
        this.onChange = onChange;
        this.listOfValues = listOfValues;
        this.getDisplayValue = getDisplayValue;
        this.label = label;
        this.optionsElement = [];
        this.buildContent();
        this.select(0, false);
        this.bindEvents();
    }
    Dropdown.doExport = function () {
        GlobalExports_1.exportGlobally({
            Dropdown: Dropdown
        });
    };
    /**
     * Resets the dropdown.
     */
    Dropdown.prototype.reset = function () {
        this.select(0, false);
    };
    Dropdown.prototype.setId = function (id) {
        Dom_1.$$(this.element).setAttribute('id', id);
    };
    /**
     * Gets the element on which the dropdown is bound.
     * @returns {HTMLElement} The dropdown element.
     */
    Dropdown.prototype.getElement = function () {
        return this.element;
    };
    /**
     * Gets the currently selected dropdown value.
     * @returns {string} The currently selected dropdown value.
     */
    Dropdown.prototype.getValue = function () {
        return this.selectElement.value;
    };
    /**
     * Selects a value from the dropdown [`listofValues`]{@link Dropdown.listOfValues}.
     * @param index The 0-based index position of the value to select in the `listOfValues`.
     * @param executeOnChange Indicates whether to execute the [`onChange`]{@link Dropdown.onChange} function when this
     * method changes the dropdown selection.
     */
    Dropdown.prototype.select = function (index, executeOnChange) {
        if (executeOnChange === void 0) { executeOnChange = true; }
        this.selectOption(this.optionsElement[index], executeOnChange);
    };
    /**
     * Gets the element on which the dropdown is bound.
     * @returns {HTMLElement} The dropdown element.
     */
    Dropdown.prototype.build = function () {
        return this.element;
    };
    /**
     * Sets the dropdown value.
     * @param value The value to set the dropdown to.
     */
    Dropdown.prototype.setValue = function (value) {
        var _this = this;
        _.each(this.optionsElement, function (option) {
            if (Dom_1.$$(option).getAttribute('data-value') == value) {
                _this.selectOption(option);
            }
        });
    };
    Dropdown.prototype.selectOption = function (option, executeOnChange) {
        if (executeOnChange === void 0) { executeOnChange = true; }
        this.selectElement.value = option.value;
        if (executeOnChange) {
            this.onChange(this);
        }
    };
    Dropdown.prototype.buildContent = function () {
        var _this = this;
        this.selectElement = Dom_1.$$('select', {
            className: 'coveo-dropdown'
        }).el;
        if (this.label) {
            this.selectElement.setAttribute('aria-label', Strings_1.l(this.label));
        }
        var selectOptions = this.buildOptions();
        _.each(selectOptions, function (opt) {
            Dom_1.$$(_this.selectElement).append(opt);
        });
        this.element = this.selectElement;
    };
    Dropdown.prototype.buildOptions = function () {
        var _this = this;
        var ret = [];
        _.each(this.listOfValues, function (value) {
            ret.push(_this.buildOption(value));
        });
        return ret;
    };
    Dropdown.prototype.buildOption = function (value) {
        var option = Dom_1.$$('option');
        option.setAttribute('data-value', value);
        option.setAttribute('value', value);
        option.text(this.getDisplayValue(value));
        this.optionsElement.push(option.el);
        return option.el;
    };
    Dropdown.prototype.bindEvents = function () {
        var _this = this;
        Dom_1.$$(this.selectElement).on('change', function () { return _this.onChange(_this); });
    };
    return Dropdown;
}());
exports.Dropdown = Dropdown;
 
 
/***/ }),
/* 93 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var ResponsiveDropdownContent_1 = __webpack_require__(99);
var ResponsiveComponentsUtils = /** @class */ (function () {
    function ResponsiveComponentsUtils() {
    }
    ResponsiveComponentsUtils.shouldDrawFacetSlider = function (root, facetSliderElement) {
        return ResponsiveDropdownContent_1.ResponsiveDropdownContent.isTargetInsideOpenedDropdown(facetSliderElement) || !this.isSmallFacetActivated(root);
    };
    ResponsiveComponentsUtils.isSmallTabsActivated = function (root) {
        return root.hasClass(this.smallTabsClassName);
    };
    ResponsiveComponentsUtils.isSmallFacetActivated = function (root) {
        return root.hasClass(this.smallFacetClassName);
    };
    ResponsiveComponentsUtils.isSmallRecommendationActivated = function (root) {
        return root.hasClass(this.smallRecommendationClassName);
    };
    ResponsiveComponentsUtils.activateSmallTabs = function (root) {
        root.addClass(this.smallTabsClassName);
    };
    ResponsiveComponentsUtils.deactivateSmallTabs = function (root) {
        root.removeClass(this.smallTabsClassName);
    };
    ResponsiveComponentsUtils.activateSmallFacet = function (root) {
        root.addClass(this.smallFacetClassName);
    };
    ResponsiveComponentsUtils.deactivateSmallFacet = function (root) {
        root.removeClass(this.smallFacetClassName);
    };
    ResponsiveComponentsUtils.activateSmallRecommendation = function (root) {
        root.addClass(this.smallRecommendationClassName);
    };
    ResponsiveComponentsUtils.deactivateSmallRecommendation = function (root) {
        root.removeClass(this.smallRecommendationClassName);
    };
    ResponsiveComponentsUtils.smallTabsClassName = 'coveo-small-tabs';
    ResponsiveComponentsUtils.smallFacetClassName = 'coveo-small-facets';
    ResponsiveComponentsUtils.smallRecommendationClassName = 'coveo-small-recommendation';
    return ResponsiveComponentsUtils;
}());
exports.ResponsiveComponentsUtils = ResponsiveComponentsUtils;
 
 
/***/ }),
/* 94 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return durationSecond; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return durationMinute; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return durationHour; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return durationDay; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return durationWeek; });
var durationSecond = 1e3;
var durationMinute = 6e4;
var durationHour = 36e5;
var durationDay = 864e5;
var durationWeek = 6048e5;
 
 
/***/ }),
/* 95 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = has;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__setup_js__ = __webpack_require__(30);
 
 
// Internal function to check whether `key` is an own property name of `obj`.
function has(obj, key) {
  return obj != null && __WEBPACK_IMPORTED_MODULE_0__setup_js__["i" /* hasOwnProperty */].call(obj, key);
}
 
 
/***/ }),
/* 96 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var localStorage;
// This check must be made in a try/catch. If cookies are disabled for a
// browser then window.localStorage will throw an undefined exception.
try {
    localStorage = window.localStorage;
}
catch (error) {
    console.warn('Unable to access localStorage. Certain features like analytics will not work. If this is unintended, consider adjusting your browser settings to allow third-party cookies and data.\n\n', error);
    localStorage = null;
}
exports.localStorageExists = !!localStorage;
var LocalStorageUtils = /** @class */ (function () {
    function LocalStorageUtils(id) {
        this.id = id;
    }
    LocalStorageUtils.prototype.save = function (data) {
        try {
            Eif (localStorage != null) {
                localStorage.setItem(this.getLocalStorageKey(), JSON.stringify(data));
            }
        }
        catch (error) { }
    };
    LocalStorageUtils.prototype.load = function () {
        try {
            Iif (localStorage == null) {
                return null;
            }
            var value = localStorage.getItem(this.getLocalStorageKey());
            return value && JSON.parse(value);
        }
        catch (error) {
            return null;
        }
    };
    LocalStorageUtils.prototype.remove = function (key) {
        try {
            Eif (localStorage != null) {
                Eif (key == undefined) {
                    localStorage.removeItem(this.getLocalStorageKey());
                }
                else {
                    var oldObj = this.load();
                    delete oldObj[key];
                    this.save(oldObj);
                }
            }
        }
        catch (error) { }
    };
    LocalStorageUtils.prototype.getLocalStorageKey = function () {
        return 'coveo-' + this.id;
    };
    return LocalStorageUtils;
}());
exports.LocalStorageUtils = LocalStorageUtils;
var SafeLocalStorage = /** @class */ (function () {
    function SafeLocalStorage() {
    }
    SafeLocalStorage.prototype.getItem = function (key) {
        try {
            return localStorage.getItem(key);
        }
        catch (e) {
            return null;
        }
    };
    SafeLocalStorage.prototype.removeItem = function (key) {
        try {
            localStorage.removeItem(key);
        }
        catch (e) { }
    };
    SafeLocalStorage.prototype.setItem = function (key, value) {
        try {
            localStorage.setItem(key, value);
        }
        catch (e) { }
    };
    SafeLocalStorage.prototype.clear = function () {
        try {
            localStorage.clear();
        }
        catch (e) { }
    };
    SafeLocalStorage.prototype.key = function (index) {
        try {
            return localStorage.key(index);
        }
        catch (e) {
            return null;
        }
    };
    Object.defineProperty(SafeLocalStorage.prototype, "length", {
        get: function () {
            try {
                return localStorage.length;
            }
            catch (e) {
                return 0;
            }
        },
        enumerable: true,
        configurable: true
    });
    return SafeLocalStorage;
}());
exports.SafeLocalStorage = SafeLocalStorage;
 
 
/***/ }),
/* 97 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Assert_1 = __webpack_require__(12);
exports.Assert = Assert_1.Assert;
var Defer_1 = __webpack_require__(31);
exports.Defer = Defer_1.Defer;
var L10N_1 = __webpack_require__(295);
exports.L10N = L10N_1.L10N;
var Logger_1 = __webpack_require__(18);
exports.Logger = Logger_1.Logger;
var Options_1 = __webpack_require__(215);
exports.Options = Options_1.Options;
var Strings_1 = __webpack_require__(4);
exports.l = Strings_1.l;
var Logger_2 = __webpack_require__(18);
Iif (false) {
    Logger_2.Logger.disable();
}
 
 
/***/ }),
/* 98 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
__webpack_require__(1016);
var GlobalExports_1 = __webpack_require__(10);
var Dom_1 = __webpack_require__(0);
/**
 * A checkbox widget with standard styling.
 */
var Checkbox = /** @class */ (function () {
    /**
     * Creates a new `Checkbox`.
     * @param onChange The function to call when the checkbox state changes. This function takes the current `Checkbox`
     * instance as an argument.
     * @param label The label to display next to the checkbox.
     */
    function Checkbox(onChange, label, ariaLabel, labelSuffix) {
        Iif (onChange === void 0) { onChange = function (checkbox) { }; }
        this.onChange = onChange;
        this.label = label;
        this.ariaLabel = ariaLabel;
        this.labelSuffix = labelSuffix;
        this.ignoreNextChange = false;
        this.buildContent();
    }
    /**
     * Toggles the checkbox state.
     */
    Checkbox.prototype.toggle = function () {
        this.checkbox.checked = !this.isSelected();
        Dom_1.$$(this.checkbox).trigger('change');
    };
    /**
     * Gets the element on which the checkbox is bound.
     * @returns {HTMLElement} The checkbox element.
     */
    Checkbox.prototype.getElement = function () {
        return this.element;
    };
    /**
     * Gets the element on which the checkbox is bound.
     * @returns {HTMLElement} The checkbox element.
     */
    Checkbox.prototype.build = function () {
        return this.element;
    };
    /**
     * Gets the checkbox [`label`]{@link Checkbox.label} value.
     * @returns {string} The checkbox label value.
     */
    Checkbox.prototype.getValue = function () {
        return this.label;
    };
    /**
     * Resets the checkbox.
     */
    Checkbox.prototype.reset = function () {
        var currentlyChecked = this.isSelected();
        this.checkbox.checked = false;
        if (currentlyChecked) {
            Dom_1.$$(this.checkbox).trigger('change');
        }
    };
    /**
     * Select the checkbox
     * @param triggerChange will trigger change even if specified and not already selected
     */
    Checkbox.prototype.select = function (triggerChange) {
        if (triggerChange === void 0) { triggerChange = true; }
        var currentlyChecked = this.isSelected();
        this.checkbox.checked = true;
        if (!currentlyChecked) {
            this.ignoreNextChange = !triggerChange;
            Dom_1.$$(this.checkbox).trigger('change');
        }
    };
    /**
     * Indicates whether the checkbox is checked.
     * @returns {boolean} `true` if the checkbox is checked, `false` otherwise.
     */
    Checkbox.prototype.isSelected = function () {
        return this.checkbox.checked;
    };
    /**
     * Gets the element on which the checkbox [`label`]{@link Checkbox.label} is bound.
     * @returns {HTMLElement} The `label` element.
     */
    Checkbox.prototype.getLabel = function () {
        return this.element;
    };
    Checkbox.prototype.buildContent = function () {
        var _this = this;
        var label = Dom_1.$$('label', {
            className: 'coveo-checkbox-label'
        });
        this.checkbox = Dom_1.$$('input', {
            type: 'checkbox',
            className: 'coveo-checkbox',
            value: this.label,
            ariaLabel: this.ariaLabel || this.label,
            ariaHidden: true
        }).el;
        this.button = Dom_1.$$('button', {
            type: 'button',
            role: 'checkbox',
            className: 'coveo-checkbox-button',
            ariaLabel: this.ariaLabel || this.label,
            ariaChecked: this.isSelected().toString()
        }).el;
        var labelSpan = Dom_1.$$('span', { className: 'coveo-checkbox-span-label' });
        labelSpan.text(this.label);
        var labelSuffixSpan = Dom_1.$$('span', { className: 'coveo-checkbox-span-label-suffix' });
        labelSuffixSpan.text(this.labelSuffix);
        label.append(this.checkbox);
        label.append(this.button);
        label.append(labelSpan.el);
        this.labelSuffix && label.append(labelSuffixSpan.el);
        Dom_1.$$(this.button).on('click', function (e) {
            e.preventDefault();
            _this.toggle();
        });
        Dom_1.$$(this.checkbox).on('change', function () {
            _this.updateAccessibilityAttributes();
            if (!_this.ignoreNextChange) {
                _this.onChange(_this);
            }
            else {
                _this.ignoreNextChange = false;
            }
        });
        this.element = label.el;
    };
    Checkbox.prototype.updateAccessibilityAttributes = function () {
        this.button.setAttribute('aria-checked', this.isSelected().toString());
    };
    Checkbox.doExport = function () {
        GlobalExports_1.exportGlobally({
            Checkbox: Checkbox
        });
    };
    return Checkbox;
}());
exports.Checkbox = Checkbox;
 
 
/***/ }),
/* 99 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Dom_1 = __webpack_require__(0);
var popper_js_1 = __webpack_require__(181);
var ResponsiveComponentsManager_1 = __webpack_require__(70);
var Assert_1 = __webpack_require__(12);
var Strings_1 = __webpack_require__(4);
var ComponentOptions_1 = __webpack_require__(13);
var ResponsiveDropdownContent = /** @class */ (function () {
    function ResponsiveDropdownContent(componentName, element, coveoRoot, minWidth, widthRatio) {
        this.element = element;
        Assert_1.Assert.isString(componentName);
        Assert_1.Assert.exists(element);
        Assert_1.Assert.exists(coveoRoot);
        Assert_1.Assert.isLargerOrEqualsThan(0, minWidth);
        Assert_1.Assert.isLargerOrEqualsThan(0, widthRatio);
        Assert_1.Assert.isSmallerOrEqualsThan(1, widthRatio);
        this.cssClassName = "coveo-" + componentName + "-dropdown-content";
        this.coveoRoot = coveoRoot;
        this.widthRatio = widthRatio;
        this.minWidth = minWidth;
    }
    ResponsiveDropdownContent.isTargetInsideOpenedDropdown = function (target) {
        Assert_1.Assert.exists(target);
        var targetParentDropdown = target.parent(ResponsiveDropdownContent.DEFAULT_CSS_CLASS_NAME);
        if (targetParentDropdown) {
            return targetParentDropdown.style.display != 'none';
        }
        return false;
    };
    ResponsiveDropdownContent.prototype.positionDropdown = function () {
        this.setElementAttributes();
        this.createPopper();
    };
    ResponsiveDropdownContent.prototype.hideDropdown = function () {
        if (this.popperReference) {
            this.unbindPopperEvents();
            this.popperReference.destroy();
        }
        this.unsetElementAttributes();
    };
    ResponsiveDropdownContent.prototype.cleanUp = function () {
        this.element.el.removeAttribute('style');
    };
    ResponsiveDropdownContent.prototype.setElementAttributes = function () {
        this.element.show();
        this.element.addClass(this.cssClassName);
        this.element.addClass(ResponsiveDropdownContent.DEFAULT_CSS_CLASS_NAME);
        this.element.setAttribute('role', 'group');
        this.element.setAttribute('aria-label', Strings_1.l('FiltersDropdown'));
        this.setElementWidth();
    };
    ResponsiveDropdownContent.prototype.setElementWidth = function () {
        var width = this.widthRatio * this.coveoRoot.width();
        Eif (width <= this.minWidth) {
            width = this.minWidth;
        }
        this.element.el.style.width = width.toString() + 'px';
    };
    ResponsiveDropdownContent.prototype.unsetElementAttributes = function () {
        this.element.hide();
        this.element.removeClass(this.cssClassName);
        this.element.removeClass(ResponsiveDropdownContent.DEFAULT_CSS_CLASS_NAME);
        this.element.setAttribute('role', null);
        this.element.setAttribute('aria-label', null);
    };
    Object.defineProperty(ResponsiveDropdownContent.prototype, "popperReferenceElement", {
        get: function () {
            return this.coveoRoot.find("." + ResponsiveComponentsManager_1.ResponsiveComponentsManager.DROPDOWN_HEADER_WRAPPER_CSS_CLASS);
        },
        enumerable: true,
        configurable: true
    });
    ResponsiveDropdownContent.prototype.createPopper = function () {
        this.popperReference = new popper_js_1.default(this.popperReferenceElement, this.element.el, {
            placement: 'bottom-end',
            positionFixed: true,
            modifiers: {
                preventOverflow: {
                    boundariesElement: this.coveoRoot.el
                },
                computeStyle: {
                    gpuAcceleration: false
                }
            },
            eventsEnabled: false
        });
        this.bindPopperEvents();
    };
    Object.defineProperty(ResponsiveDropdownContent.prototype, "scrollableParent", {
        get: function () {
            return ComponentOptions_1.ComponentOptions.findParentScrolling(this.popperReferenceElement);
        },
        enumerable: true,
        configurable: true
    });
    ResponsiveDropdownContent.prototype.bindPopperEvents = function () {
        var _this = this;
        Dom_1.$$(this.scrollableParent).on(['scroll', 'resize'], function () {
            _this.popperReference.update();
        });
    };
    ResponsiveDropdownContent.prototype.unbindPopperEvents = function () {
        var _this = this;
        Dom_1.$$(this.scrollableParent).off(['scroll', 'resize'], function () {
            _this.popperReference.update();
        });
    };
    ResponsiveDropdownContent.DEFAULT_CSS_CLASS_NAME = 'coveo-dropdown-content';
    return ResponsiveDropdownContent;
}());
exports.ResponsiveDropdownContent = ResponsiveDropdownContent;
 
 
/***/ }),
/* 100 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var ComponentOptions_1 = __webpack_require__(13);
/**
 * ResponsiveFacets options
 */
exports.ResponsiveFacetOptions = {
    /**
     * Specifies whether to enable *responsive mode* for facets. Setting this options to `false` on any `Facet`, or
     * [`FacetSlider`]{@link FacetSlider} component in a search interface disables responsive mode for all other facets
     * in the search interface.
     *
     * Responsive mode displays all facets under a single dropdown button whenever the width of the HTML element which
     * the search interface is bound to reaches or falls behind a certain threshold (see
     * {@link SearchInterface.responsiveComponents}).
     *
     * See also the [`dropdownHeaderLabel`]{@link Facet.options.dropdownHeaderLabel} option.
     *
     * Default value is `true`.
     */
    enableResponsiveMode: ComponentOptions_1.ComponentOptions.buildBooleanOption({ defaultValue: true, section: 'ResponsiveOptions' }),
    responsiveBreakpoint: ComponentOptions_1.ComponentOptions.buildNumberOption({
        deprecated: 'This option is exposed for legacy reasons. It is not recommended to use this option. Instead, use `SearchInterface.options.responsiveMediumBreakpoint` options exposed on the `SearchInterface`.'
    }),
    /**
     * If the [`enableResponsiveMode`]{@link Facet.options.enableResponsiveMode} option is `true` for all facets and
     * {@link FacetSlider.options.enableResponsiveMode} is also `true` for all sliders, specifies the label of the
     * dropdown button that allows to display the facets when in responsive mode.
     *
     * If more than one `Facet` or {@link FacetSlider} component in the search interface specifies a value for this
     * option, the framework uses the first occurrence of the option.
     *
     * Default value is `Filters`.
     */
    dropdownHeaderLabel: ComponentOptions_1.ComponentOptions.buildLocalizedStringOption({ section: 'ResponsiveOptions' })
};
 
 
/***/ }),
/* 101 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = Transition;
/* harmony export (immutable) */ __webpack_exports__["b"] = transition;
/* harmony export (immutable) */ __webpack_exports__["c"] = newId;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_d3_selection__ = __webpack_require__(45);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__attr_js__ = __webpack_require__(1209);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__attrTween_js__ = __webpack_require__(1210);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__delay_js__ = __webpack_require__(1211);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__duration_js__ = __webpack_require__(1212);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__ease_js__ = __webpack_require__(1213);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__filter_js__ = __webpack_require__(1214);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__merge_js__ = __webpack_require__(1215);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__on_js__ = __webpack_require__(1216);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__remove_js__ = __webpack_require__(1217);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__select_js__ = __webpack_require__(1218);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__selectAll_js__ = __webpack_require__(1219);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__selection_js__ = __webpack_require__(1220);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__style_js__ = __webpack_require__(1221);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__styleTween_js__ = __webpack_require__(1222);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__text_js__ = __webpack_require__(1223);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__textTween_js__ = __webpack_require__(1224);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_17__transition_js__ = __webpack_require__(1225);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_18__tween_js__ = __webpack_require__(248);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_19__end_js__ = __webpack_require__(1226);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
var id = 0;
 
function Transition(groups, parents, name, id) {
  this._groups = groups;
  this._parents = parents;
  this._name = name;
  this._id = id;
}
 
function transition(name) {
  return Object(__WEBPACK_IMPORTED_MODULE_0_d3_selection__["m" /* selection */])().transition(name);
}
 
function newId() {
  return ++id;
}
 
var selection_prototype = __WEBPACK_IMPORTED_MODULE_0_d3_selection__["m" /* selection */].prototype;
 
Transition.prototype = transition.prototype = {
  constructor: Transition,
  select: __WEBPACK_IMPORTED_MODULE_10__select_js__["a" /* default */],
  selectAll: __WEBPACK_IMPORTED_MODULE_11__selectAll_js__["a" /* default */],
  filter: __WEBPACK_IMPORTED_MODULE_6__filter_js__["a" /* default */],
  merge: __WEBPACK_IMPORTED_MODULE_7__merge_js__["a" /* default */],
  selection: __WEBPACK_IMPORTED_MODULE_12__selection_js__["a" /* default */],
  transition: __WEBPACK_IMPORTED_MODULE_17__transition_js__["a" /* default */],
  call: selection_prototype.call,
  nodes: selection_prototype.nodes,
  node: selection_prototype.node,
  size: selection_prototype.size,
  empty: selection_prototype.empty,
  each: selection_prototype.each,
  on: __WEBPACK_IMPORTED_MODULE_8__on_js__["a" /* default */],
  attr: __WEBPACK_IMPORTED_MODULE_1__attr_js__["a" /* default */],
  attrTween: __WEBPACK_IMPORTED_MODULE_2__attrTween_js__["a" /* default */],
  style: __WEBPACK_IMPORTED_MODULE_13__style_js__["a" /* default */],
  styleTween: __WEBPACK_IMPORTED_MODULE_14__styleTween_js__["a" /* default */],
  text: __WEBPACK_IMPORTED_MODULE_15__text_js__["a" /* default */],
  textTween: __WEBPACK_IMPORTED_MODULE_16__textTween_js__["a" /* default */],
  remove: __WEBPACK_IMPORTED_MODULE_9__remove_js__["a" /* default */],
  tween: __WEBPACK_IMPORTED_MODULE_18__tween_js__["a" /* default */],
  delay: __WEBPACK_IMPORTED_MODULE_3__delay_js__["a" /* default */],
  duration: __WEBPACK_IMPORTED_MODULE_4__duration_js__["a" /* default */],
  ease: __WEBPACK_IMPORTED_MODULE_5__ease_js__["a" /* default */],
  end: __WEBPACK_IMPORTED_MODULE_19__end_js__["a" /* default */]
};
 
 
/***/ }),
/* 102 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = noop;
function noop() {}
 
 
/***/ }),
/* 103 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["c"] = identity;
/* harmony export (immutable) */ __webpack_exports__["a"] = copy;
/* harmony export (immutable) */ __webpack_exports__["d"] = transformer;
/* harmony export (immutable) */ __webpack_exports__["b"] = continuous;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_d3_array__ = __webpack_require__(44);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_d3_interpolate__ = __webpack_require__(83);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__array__ = __webpack_require__(122);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__constant__ = __webpack_require__(1365);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__number__ = __webpack_require__(761);
 
 
 
 
 
 
var unit = [0, 1];
 
function identity(x) {
  return x;
}
 
function normalize(a, b) {
  return (b -= (a = +a))
      ? function(x) { return (x - a) / b; }
      : Object(__WEBPACK_IMPORTED_MODULE_3__constant__["a" /* default */])(isNaN(b) ? NaN : 0.5);
}
 
function clamper(domain) {
  var a = domain[0], b = domain[domain.length - 1], t;
  if (a > b) t = a, a = b, b = t;
  return function(x) { return Math.max(a, Math.min(b, x)); };
}
 
// normalize(a, b)(x) takes a domain value x in [a,b] and returns the corresponding parameter t in [0,1].
// interpolate(a, b)(t) takes a parameter t in [0,1] and returns the corresponding range value x in [a,b].
function bimap(domain, range, interpolate) {
  var d0 = domain[0], d1 = domain[1], r0 = range[0], r1 = range[1];
  Iif (d1 < d0) d0 = normalize(d1, d0), r0 = interpolate(r1, r0);
  else d0 = normalize(d0, d1), r0 = interpolate(r0, r1);
  return function(x) { return r0(d0(x)); };
}
 
function polymap(domain, range, interpolate) {
  var j = Math.min(domain.length, range.length) - 1,
      d = new Array(j),
      r = new Array(j),
      i = -1;
 
  // Reverse descending domains.
  if (domain[j] < domain[0]) {
    domain = domain.slice().reverse();
    range = range.slice().reverse();
  }
 
  while (++i < j) {
    d[i] = normalize(domain[i], domain[i + 1]);
    r[i] = interpolate(range[i], range[i + 1]);
  }
 
  return function(x) {
    var i = Object(__WEBPACK_IMPORTED_MODULE_0_d3_array__["b" /* bisect */])(domain, x, 1, j) - 1;
    return r[i](d[i](x));
  };
}
 
function copy(source, target) {
  return target
      .domain(source.domain())
      .range(source.range())
      .interpolate(source.interpolate())
      .clamp(source.clamp())
      .unknown(source.unknown());
}
 
function transformer() {
  var domain = unit,
      range = unit,
      interpolate = __WEBPACK_IMPORTED_MODULE_1_d3_interpolate__["a" /* interpolate */],
      transform,
      untransform,
      unknown,
      clamp = identity,
      piecewise,
      output,
      input;
 
  function rescale() {
    piecewise = Math.min(domain.length, range.length) > 2 ? polymap : bimap;
    output = input = null;
    return scale;
  }
 
  function scale(x) {
    return isNaN(x = +x) ? unknown : (output || (output = piecewise(domain.map(transform), range, interpolate)))(transform(clamp(x)));
  }
 
  scale.invert = function(y) {
    return clamp(untransform((input || (input = piecewise(range, domain.map(transform), __WEBPACK_IMPORTED_MODULE_1_d3_interpolate__["o" /* interpolateNumber */])))(y)));
  };
 
  scale.domain = function(_) {
    return arguments.length ? (domain = __WEBPACK_IMPORTED_MODULE_2__array__["a" /* map */].call(_, __WEBPACK_IMPORTED_MODULE_4__number__["a" /* default */]), clamp === identity || (clamp = clamper(domain)), rescale()) : domain.slice();
  };
 
  scale.range = function(_) {
    return arguments.length ? (range = __WEBPACK_IMPORTED_MODULE_2__array__["b" /* slice */].call(_), rescale()) : range.slice();
  };
 
  scale.rangeRound = function(_) {
    return range = __WEBPACK_IMPORTED_MODULE_2__array__["b" /* slice */].call(_), interpolate = __WEBPACK_IMPORTED_MODULE_1_d3_interpolate__["u" /* interpolateRound */], rescale();
  };
 
  scale.clamp = function(_) {
    return arguments.length ? (clamp = _ ? clamper(domain) : identity, scale) : clamp !== identity;
  };
 
  scale.interpolate = function(_) {
    return arguments.length ? (interpolate = _, rescale()) : interpolate;
  };
 
  scale.unknown = function(_) {
    return arguments.length ? (unknown = _, scale) : unknown;
  };
 
  return function(t, u) {
    transform = t, untransform = u;
    return rescale();
  };
}
 
function continuous(transform, untransform) {
  return transformer()(transform, untransform);
}
 
 
/***/ }),
/* 104 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var _ = __webpack_require__(1);
function registerCustomMatcher() {
    var customMatcher = {
        eventHandlerToHaveBeenCalledWith: function (util, customEqualityTesters) {
            return {
                compare: function (actual, expected) {
                    var result = { pass: false, message: '' };
                    if (!actual.calls.any()) {
                        result.message = 'Expected spy ' + actual.and.identity() + ' to be called, but was never called';
                        return result;
                    }
                    var found = _.chain(actual.calls.allArgs())
                        .flatten()
                        .pluck('detail')
                        .findWhere(expected)
                        .value();
                    Eif (found) {
                        result.pass = true;
                        result.message =
                            'Expected spy ' + actual.and.identity() + ' to not have been called with ' + JSON.stringify(expected) + ' but it was';
                    }
                    else {
                        result.message =
                            'Expected spy ' +
                                actual.and.identity() +
                                ' to have been called with ' +
                                JSON.stringify(expected) +
                                ' but it was called with ' +
                                JSON.stringify(actual.calls.allArgs()[0][0].detail);
                    }
                    return result;
                }
            };
        },
        toHaveBeenCalledTimes: function (util, customEqualityTesters) {
            return {
                compare: function (actual, expected) {
                    var args = Array.prototype.slice.call(arguments, 0), result = { pass: false, message: undefined };
                    Iif (expected === null || expected === void 0) {
                        throw new Error('Expected times failed is required as an argument.');
                    }
                    actual = args[0];
                    var calls = actual.calls.count();
                    var timesMessage = expected === 1 ? 'once' : expected + ' times';
                    result.pass = calls === expected;
                    result.message = result.pass
                        ? 'Expected spy ' + actual.and.identity() + ' not to have been called ' + timesMessage + '. It was called ' + calls + ' times.'
                        : 'Expected spy ' + actual.and.identity() + ' to have been called ' + timesMessage + '. It was called ' + calls + ' times.';
                    return result;
                }
            };
        }
    };
    jasmine.addMatchers(customMatcher);
}
exports.registerCustomMatcher = registerCustomMatcher;
 
 
/***/ }),
/* 105 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = isObject;
// Is a given variable an object?
function isObject(obj) {
  var type = typeof obj;
  return type === 'function' || type === 'object' && !!obj;
}
 
 
/***/ }),
/* 106 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__setup_js__ = __webpack_require__(30);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__tagTester_js__ = __webpack_require__(46);
 
 
 
// Is a given value an array?
// Delegates to ECMA5's native `Array.isArray`.
/* harmony default export */ __webpack_exports__["a"] = (__WEBPACK_IMPORTED_MODULE_0__setup_js__["k" /* nativeIsArray */] || Object(__WEBPACK_IMPORTED_MODULE_1__tagTester_js__["a" /* default */])('Array'));
 
 
/***/ }),
/* 107 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = each;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__optimizeCb_js__ = __webpack_require__(162);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isArrayLike_js__ = __webpack_require__(60);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__keys_js__ = __webpack_require__(41);
 
 
 
 
// The cornerstone for collection functions, an `each`
// implementation, aka `forEach`.
// Handles raw objects in addition to array-likes. Treats all
// sparse array-likes as if they were dense.
function each(obj, iteratee, context) {
  iteratee = Object(__WEBPACK_IMPORTED_MODULE_0__optimizeCb_js__["a" /* default */])(iteratee, context);
  var i, length;
  if (Object(__WEBPACK_IMPORTED_MODULE_1__isArrayLike_js__["a" /* default */])(obj)) {
    for (i = 0, length = obj.length; i < length; i++) {
      iteratee(obj[i], i, obj);
    }
  } else {
    var _keys = Object(__WEBPACK_IMPORTED_MODULE_2__keys_js__["a" /* default */])(obj);
    for (i = 0, length = _keys.length; i < length; i++) {
      iteratee(obj[_keys[i]], _keys[i], obj);
    }
  }
  return obj;
}
 
 
/***/ }),
/* 108 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __assign = (this && this.__assign) || Object.assign || function(t) {
    for (var s, i = 1, n = arguments.length; i < n; i++) {
        s = arguments[i];
        for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
            t[p] = s[p];
    }
    return t;
};
Object.defineProperty(exports, "__esModule", { value: true });
var underscore_1 = __webpack_require__(1);
var Utils_1 = __webpack_require__(5);
var UrlUtils = /** @class */ (function () {
    function UrlUtils() {
    }
    UrlUtils.getUrlParameter = function (name) {
        return (decodeURIComponent((new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(location.search) || [, ''])[1].replace(/\+/g, '%20')) || null);
    };
    UrlUtils.merge = function (endpointParameters) {
        var parts = [];
        for (var _i = 1; _i < arguments.length; _i++) {
            parts[_i - 1] = arguments[_i];
        }
        parts.forEach(function (part) {
            var _a = UrlUtils.normalizeAsParts(part), path = _a.path, queryNormalized = _a.queryNormalized;
            Eif (Utils_1.Utils.isNonEmptyString(path)) {
                endpointParameters = __assign({}, endpointParameters, { url: path });
            }
            if (Utils_1.Utils.isNonEmptyArray(queryNormalized)) {
                var queryStringExists = Utils_1.Utils.isNonEmptyArray(endpointParameters.queryString);
                var queryString = queryStringExists
                    ? Utils_1.Utils.concatWithoutDuplicate(endpointParameters.queryString, queryNormalized)
                    : queryNormalized;
                endpointParameters = __assign({}, endpointParameters, { queryString: queryString });
            }
        });
        return endpointParameters;
    };
    UrlUtils.normalizeAsString = function (toNormalize) {
        var _a = this.normalizeAsParts(toNormalize), queryNormalized = _a.queryNormalized, path = _a.path;
        return "" + path + this.addToUrlIfNotEmpty(queryNormalized, '&', '?');
    };
    UrlUtils.normalizeAsParts = function (toNormalize) {
        var pathsNormalized = this.normalizePaths(toNormalize);
        var queryNormalized = this.normalizeQueryString(toNormalize);
        return {
            pathsNormalized: pathsNormalized,
            queryNormalized: queryNormalized,
            path: this.addToUrlIfNotEmpty(pathsNormalized, '/', UrlUtils.getRelativePathLeadingCharacters(toNormalize))
        };
    };
    UrlUtils.getRelativePathLeadingCharacters = function (toNormalize) {
        var leadingRelativeUrlCharacters = '';
        var relativeUrlLeadingCharactersRegex = /^(([\/])+)/;
        var firstPath = underscore_1.first(this.toArray(toNormalize.paths));
        Eif (firstPath) {
            var match = relativeUrlLeadingCharactersRegex.exec(firstPath);
            if (match) {
                leadingRelativeUrlCharacters = match[0];
            }
        }
        return leadingRelativeUrlCharacters;
    };
    UrlUtils.normalizePaths = function (toNormalize) {
        var _this = this;
        return this.toArray(toNormalize.paths).map(function (path) {
            if (Utils_1.Utils.isNonEmptyString(path)) {
                return _this.removeProblematicChars(path);
            }
            return '';
        });
    };
    UrlUtils.normalizeQueryString = function (toNormalize) {
        var _this = this;
        var queryNormalized = [];
        if (toNormalize.queryAsString) {
            var cleanedUp = this.toArray(toNormalize.queryAsString).map(function (query) {
                query = _this.removeProblematicChars(query);
                query = _this.encodeKeyValuePair(query);
                return query;
            });
            queryNormalized = queryNormalized.concat(cleanedUp);
        }
        if (toNormalize.query) {
            var paired = underscore_1.pairs(toNormalize.query);
            var mapped = paired.map(function (pair) {
                var key = pair[0], value = pair[1];
                var exceptions = ['pipeline'];
                var isAnException = underscore_1.isString(key) && underscore_1.contains(exceptions, key.toLowerCase());
                if (!isAnException) {
                    if (UrlUtils.isInvalidQueryStringValue(value) || UrlUtils.isInvalidQueryStringValue(key)) {
                        return '';
                    }
                }
                return [_this.removeProblematicChars(key), _this.decodeThenEncode(value)].join('=');
            });
            queryNormalized = queryNormalized.concat(mapped);
        }
        return underscore_1.uniq(queryNormalized);
    };
    UrlUtils.addToUrlIfNotEmpty = function (toAdd, joinWith, leadWith) {
        if (Utils_1.Utils.isNonEmptyArray(toAdd)) {
            return "" + leadWith + underscore_1.compact(toAdd).join(joinWith);
        }
        return '';
    };
    UrlUtils.startsWith = function (searchString, targetString) {
        return Utils_1.Utils.stringStartsWith(targetString, searchString);
    };
    UrlUtils.endsWith = function (searchString, targetString) {
        return Utils_1.Utils.stringEndsWith(targetString, searchString);
    };
    UrlUtils.removeAtEnd = function (searchString, targetString) {
        while (this.endsWith(searchString, targetString)) {
            targetString = targetString.slice(0, targetString.length - searchString.length);
        }
        return targetString;
    };
    UrlUtils.removeAtStart = function (searchString, targetString) {
        while (this.startsWith(searchString, targetString)) {
            targetString = targetString.slice(searchString.length);
        }
        return targetString;
    };
    UrlUtils.toArray = function (parameter) {
        return underscore_1.isArray(parameter) ? parameter : [parameter];
    };
    UrlUtils.encodeKeyValuePair = function (pair) {
        var split = pair.split('=');
        Iif (split.length == 0) {
            return pair;
        }
        var key = split[0];
        var value = underscore_1.rest(split, 1).join('');
        if (!key) {
            return pair;
        }
        if (!value) {
            return pair;
        }
        key = this.removeProblematicChars(key);
        value = this.decodeThenEncode(value);
        return key + "=" + value;
    };
    UrlUtils.removeProblematicChars = function (value) {
        var _this = this;
        ['?', '/', '#', '='].forEach(function (problematicChar) {
            value = _this.removeAtStart(problematicChar, value);
            value = _this.removeAtEnd(problematicChar, value);
        });
        return value;
    };
    UrlUtils.decodeThenEncode = function (value) {
        var decoded = decodeURIComponent(value);
        return Utils_1.Utils.safeEncodeURIComponent(decoded);
    };
    UrlUtils.isInvalidQueryStringValue = function (value) {
        if (underscore_1.isString(value)) {
            return Utils_1.Utils.isEmptyString(value);
        }
        return Utils_1.Utils.isNullOrUndefined(value);
    };
    return UrlUtils;
}());
exports.UrlUtils = UrlUtils;
 
 
/***/ }),
/* 109 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var AdvancedSearchEvents_1 = __webpack_require__(110);
exports.AdvancedSearchEvents = AdvancedSearchEvents_1.AdvancedSearchEvents;
var AnalyticsEvents_1 = __webpack_require__(111);
exports.AnalyticsEvents = AnalyticsEvents_1.AnalyticsEvents;
var BreadcrumbEvents_1 = __webpack_require__(33);
exports.BreadcrumbEvents = BreadcrumbEvents_1.BreadcrumbEvents;
var DebugEvents_1 = __webpack_require__(296);
exports.DebugEvents = DebugEvents_1.DebugEvents;
var DistanceEvents_1 = __webpack_require__(297);
exports.DistanceEvents = DistanceEvents_1.DistanceEvents;
var InitializationEvents_1 = __webpack_require__(22);
exports.InitializationEvents = InitializationEvents_1.InitializationEvents;
var OmniboxEvents_1 = __webpack_require__(47);
exports.OmniboxEvents = OmniboxEvents_1.OmniboxEvents;
var PreferencesPanelEvents_1 = __webpack_require__(112);
exports.PreferencesPanelEvents = PreferencesPanelEvents_1.PreferencesPanelEvents;
var QueryEvents_1 = __webpack_require__(14);
exports.QueryEvents = QueryEvents_1.QueryEvents;
var ResultListEvents_1 = __webpack_require__(48);
exports.ResultListEvents = ResultListEvents_1.ResultListEvents;
var ResultLayoutEvents_1 = __webpack_require__(132);
exports.ResultLayoutEvents = ResultLayoutEvents_1.ResultLayoutEvents;
var SearchAlertEvents_1 = __webpack_require__(86);
exports.SearchAlertsEvents = SearchAlertEvents_1.SearchAlertsEvents;
var SettingsEvents_1 = __webpack_require__(66);
exports.SettingsEvents = SettingsEvents_1.SettingsEvents;
var SliderEvents_1 = __webpack_require__(298);
exports.SliderEvents = SliderEvents_1.SliderEvents;
var StandaloneSearchInterfaceEvents_1 = __webpack_require__(170);
exports.StandaloneSearchInterfaceEvents = StandaloneSearchInterfaceEvents_1.StandaloneSearchInterfaceEvents;
 
 
/***/ }),
/* 110 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
/**
 * This static class is there to contains the different string definition for all the events related to the {@link AdvancedSearch} component.
 */
var AdvancedSearchEvents = /** @class */ (function () {
    function AdvancedSearchEvents() {
    }
    /**
     * Triggered when the {@link AdvancedSearch} component is being built.
     *
     * Allows external code to add new sections in the **Advanced Search** panel.
     *
     * All bound handlers receive {@link IBuildingAdvancedSearchEventArgs} as an argument
     *
     * @type {string}
     */
    AdvancedSearchEvents.buildingAdvancedSearch = 'buildingAdvancedSearch';
    AdvancedSearchEvents.executeAdvancedSearch = 'executeAdvancedSearch';
    return AdvancedSearchEvents;
}());
exports.AdvancedSearchEvents = AdvancedSearchEvents;
 
 
/***/ }),
/* 111 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
/**
 * The `AnalyticsEvents` static class contains the string definitions of all events that strongly relate to usage
 * analytics.
 *
 * See [Events](https://docs.coveo.com/en/417/).
 */
var AnalyticsEvents = /** @class */ (function () {
    function AnalyticsEvents() {
    }
    AnalyticsEvents.searchEvent = 'analyticsSearchEvent';
    /**
     * Triggered when a `click` analytics event is logged (e.g., when the end user clicks a
     * [`ResultLink`]{@link ResultLink} or [`Quickview`]{@link Quickview} to open a query result item).
     *
     * All `documentViewEvent` event handlers receive an
     * [`AnalyticsDocumentViewEventArgs`]{@link IAnalyticsDocumentViewEventArgs} object as an argument.
     *
     * @type {string} The string value is `documentViewEvent`.
     */
    AnalyticsEvents.documentViewEvent = 'analyticsDocumentViewEvent';
    AnalyticsEvents.customEvent = 'analyticsCustomEvent';
    /**
     * Triggered when any event (i.e., `search`, `click`, or `custom`) is about to be logged.
     *
     * All `analyticsEventReady` event handlers receive an [`AnalyticsEventArgs`]{@link IAnalyticsEventArgs} object as an argument.
     */
    AnalyticsEvents.analyticsEventReady = 'analyticsEventReady';
    /**
     * Triggered whenever an analytics event is about to be logged.
     *
     * This event allows external code to modify the analytics data before it is sent to the Coveo Usage Analytics REST
     * service.
     *
     * All `changeAnalyticsCustomData` event handlers receive a
     * [`ChangeAnalyticsCustomDataEventArgs`]{@link IChangeAnalyticsCustomDataEventArgs} object as an argument.
     *
     * @type {string} The string value is `changeAnalyticsCustomData`.
     */
    AnalyticsEvents.changeAnalyticsCustomData = 'changeAnalyticsCustomData';
    return AnalyticsEvents;
}());
exports.AnalyticsEvents = AnalyticsEvents;
 
 
/***/ }),
/* 112 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var PreferencesPanelEvents = /** @class */ (function () {
    function PreferencesPanelEvents() {
    }
    PreferencesPanelEvents.savePreferences = 'savePreferences';
    PreferencesPanelEvents.exitPreferencesWithoutSave = 'exitPreferencesWithoutSave';
    return PreferencesPanelEvents;
}());
exports.PreferencesPanelEvents = PreferencesPanelEvents;
 
 
/***/ }),
/* 113 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Assert_1 = __webpack_require__(12);
var Dom_1 = __webpack_require__(0);
var Logger_1 = __webpack_require__(18);
/**
 * Every component in the framework ultimately inherits from this base component class.
 */
var BaseComponent = /** @class */ (function () {
    function BaseComponent(element, type) {
        this.element = element;
        this.type = type;
        /**
         * A disabled component will not participate in the query, or listen to {@link ComponentEvents}.
         * @type {boolean}
         */
        this.disabled = false;
        Assert_1.Assert.exists(element);
        Assert_1.Assert.isNonEmptyString(type);
        this.logger = new Logger_1.Logger(this);
        BaseComponent.bindComponentToElement(element, this);
    }
    /**
     * Return the debug info about this component.
     * @returns {any}
     */
    BaseComponent.prototype.debugInfo = function () {
        var info = {};
        info[this['constructor']['ID']] = this;
        return info;
    };
    /**
     * Disable the component.
     * Normally this means that the component will not execute handlers for the framework events (query events, for example).
     * Components are enabled by default on creation.
     */
    BaseComponent.prototype.disable = function () {
        this.disabled = true;
    };
    /**
     * Enable the component.
     * Normally this means that the component will execute handlers for the framework events (query events, for example).
     * Components are enabled by default on creation.
     */
    BaseComponent.prototype.enable = function () {
        this.disabled = false;
    };
    BaseComponent.bindComponentToElement = function (element, component) {
        Assert_1.Assert.exists(element);
        Assert_1.Assert.exists(component);
        Assert_1.Assert.isNonEmptyString(component.type);
        element[BaseComponent.computeCssClassNameForType(component.type)] = component;
        Dom_1.$$(element).addClass(BaseComponent.computeCssClassNameForType(component.type));
        BaseComponent.getBoundComponentsForElement(element).push(component);
    };
    BaseComponent.computeCssClassName = function (componentClass) {
        return BaseComponent.computeCssClassNameForType(componentClass['ID']);
    };
    BaseComponent.computeCssClassNameForType = function (type) {
        Assert_1.Assert.isNonEmptyString(type);
        return 'Coveo' + type;
    };
    BaseComponent.computeSelectorForType = function (type) {
        Assert_1.Assert.isNonEmptyString(type);
        return '.' + BaseComponent.computeCssClassNameForType(type);
    };
    BaseComponent.getBoundComponentsForElement = function (element) {
        Assert_1.Assert.exists(element);
        if (element.CoveoBoundComponents == null) {
            element.CoveoBoundComponents = [];
        }
        return element.CoveoBoundComponents;
    };
    BaseComponent.getComponentRef = function (component) {
        return Coveo[component];
    };
    return BaseComponent;
}());
exports.BaseComponent = BaseComponent;
 
 
/***/ }),
/* 114 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var NoopAnalyticsClient = /** @class */ (function () {
    function NoopAnalyticsClient() {
        this.isContextual = false;
        this.endpoint = null;
    }
    NoopAnalyticsClient.prototype.isActivated = function () {
        return false;
    };
    NoopAnalyticsClient.prototype.getCurrentEventCause = function () {
        return this.currentEventCause;
    };
    NoopAnalyticsClient.prototype.getCurrentEventMeta = function () {
        return this.currentEventMeta;
    };
    NoopAnalyticsClient.prototype.logSearchEvent = function (actionCause, meta) {
        this.setNoopCauseAndMeta(actionCause.name, meta);
    };
    NoopAnalyticsClient.prototype.logSearchAsYouType = function (actionCause, meta) {
        this.setNoopCauseAndMeta(actionCause.name, meta);
    };
    NoopAnalyticsClient.prototype.logClickEvent = function (actionCause, meta, result, element) {
        this.setNoopCauseAndMeta(actionCause.name, meta);
        return Promise.resolve(null);
    };
    NoopAnalyticsClient.prototype.logCustomEvent = function (actionCause, meta, element) {
        this.setNoopCauseAndMeta(actionCause.name, meta);
        return Promise.resolve(null);
    };
    NoopAnalyticsClient.prototype.getTopQueries = function (params) {
        return new Promise(function (resolve, reject) {
            resolve([]);
        });
    };
    NoopAnalyticsClient.prototype.getCurrentVisitIdPromise = function () {
        return new Promise(function (resolve, reject) {
            resolve(null);
        });
    };
    NoopAnalyticsClient.prototype.getCurrentVisitId = function () {
        return null;
    };
    NoopAnalyticsClient.prototype.sendAllPendingEvents = function () { };
    NoopAnalyticsClient.prototype.cancelAllPendingEvents = function () { };
    NoopAnalyticsClient.prototype.warnAboutSearchEvent = function () { };
    NoopAnalyticsClient.prototype.getPendingSearchEvent = function () {
        return null;
    };
    NoopAnalyticsClient.prototype.setOriginContext = function (originContext) { };
    NoopAnalyticsClient.prototype.getOriginContext = function () {
        return '';
    };
    NoopAnalyticsClient.prototype.getUserDisplayName = function () {
        return '';
    };
    NoopAnalyticsClient.prototype.setNoopCauseAndMeta = function (cause, meta) {
        this.currentEventCause = cause;
        this.currentEventMeta = meta;
    };
    return NoopAnalyticsClient;
}());
exports.NoopAnalyticsClient = NoopAnalyticsClient;
 
 
/***/ }),
/* 115 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var ComponentOptionsType;
(function (ComponentOptionsType) {
    ComponentOptionsType[ComponentOptionsType["BOOLEAN"] = 0] = "BOOLEAN";
    ComponentOptionsType[ComponentOptionsType["NUMBER"] = 1] = "NUMBER";
    ComponentOptionsType[ComponentOptionsType["STRING"] = 2] = "STRING";
    ComponentOptionsType[ComponentOptionsType["LOCALIZED_STRING"] = 3] = "LOCALIZED_STRING";
    ComponentOptionsType[ComponentOptionsType["LIST"] = 4] = "LIST";
    ComponentOptionsType[ComponentOptionsType["SELECTOR"] = 5] = "SELECTOR";
    ComponentOptionsType[ComponentOptionsType["CHILD_HTML_ELEMENT"] = 6] = "CHILD_HTML_ELEMENT";
    ComponentOptionsType[ComponentOptionsType["TEMPLATE"] = 7] = "TEMPLATE";
    ComponentOptionsType[ComponentOptionsType["FIELD"] = 8] = "FIELD";
    ComponentOptionsType[ComponentOptionsType["FIELDS"] = 9] = "FIELDS";
    ComponentOptionsType[ComponentOptionsType["ICON"] = 10] = "ICON";
    ComponentOptionsType[ComponentOptionsType["COLOR"] = 11] = "COLOR";
    ComponentOptionsType[ComponentOptionsType["OBJECT"] = 12] = "OBJECT";
    ComponentOptionsType[ComponentOptionsType["QUERY"] = 13] = "QUERY";
    ComponentOptionsType[ComponentOptionsType["HELPER"] = 14] = "HELPER";
    ComponentOptionsType[ComponentOptionsType["LONG_STRING"] = 15] = "LONG_STRING";
    ComponentOptionsType[ComponentOptionsType["JSON"] = 16] = "JSON";
    ComponentOptionsType[ComponentOptionsType["JAVASCRIPT"] = 17] = "JAVASCRIPT";
    ComponentOptionsType[ComponentOptionsType["NONE"] = 18] = "NONE";
    ComponentOptionsType[ComponentOptionsType["QUERY_EXPRESSION"] = 19] = "QUERY_EXPRESSION";
})(ComponentOptionsType = exports.ComponentOptionsType || (exports.ComponentOptionsType = {}));
 
 
/***/ }),
/* 116 */
/***/ (function(module, exports) {
 
function _interopRequireDefault(obj) {
  return obj && obj.__esModule ? obj : {
    "default": obj
  };
}
 
module.exports = _interopRequireDefault;
 
/***/ }),
/* 117 */
/***/ (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')();
Iif (typeof __g == 'number') __g = global; // eslint-disable-line no-undef
 
 
/***/ }),
/* 118 */
/***/ (function(module, exports) {
 
var core = module.exports = { version: '2.6.9' };
Iif (typeof __e == 'number') __e = core; // eslint-disable-line no-undef
 
 
/***/ }),
/* 119 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
/// <reference path="Facet.ts" />
Object.defineProperty(exports, "__esModule", { value: true });
var Utils_1 = __webpack_require__(5);
var FacetUtils_1 = __webpack_require__(49);
var QueryBuilder_1 = __webpack_require__(24);
var Dom_1 = __webpack_require__(0);
var _ = __webpack_require__(1);
var AllowedValuesPatternType_1 = __webpack_require__(233);
var FacetSearchParameters = /** @class */ (function () {
    function FacetSearchParameters(facet) {
        this.facet = facet;
        this.valueToSearch = '';
        this.alwaysInclude = [];
        this.alwaysExclude = [];
        this.sortCriteria = 'occurrences';
        this.fetchMore = false;
        this.completeFacetWithStandardValues = true;
        this.nbResults = facet.options.numberOfValuesInFacetSearch;
        this.ignoreAccents = facet.options.facetSearchIgnoreAccents;
    }
    FacetSearchParameters.prototype.setValueToSearch = function (value) {
        this.valueToSearch = value;
        if (Utils_1.Utils.isNonEmptyString(value)) {
            this.valueToSearch = this.valueToSearch.trim();
            this.alwaysInclude = this.alwaysInclude.concat(FacetUtils_1.FacetUtils.getValuesToUseForSearchInFacet(this.valueToSearch, this.facet));
        }
        return this;
    };
    FacetSearchParameters.prototype.excludeCurrentlyDisplayedValuesInSearch = function (searchResults) {
        var _this = this;
        _.each(this.getCurrentlyShowedValueInSearch(searchResults), function (v) {
            var expandedValues = FacetUtils_1.FacetUtils.getValuesToUseForSearchInFacet(v, _this.facet);
            _.each(expandedValues, function (expanded) {
                _this.alwaysExclude.push(expanded);
            });
        });
        _.each(this.facet.getDisplayedFacetValues(), function (v) {
            _this.alwaysExclude.push(v.value);
        });
    };
    FacetSearchParameters.prototype.getGroupByRequest = function () {
        this.lowerCaseAll();
        var nbResults = this.nbResults;
        nbResults += this.alwaysExclude.length;
        var typedByUser = [];
        if (this.valueToSearch) {
            typedByUser = ['*' + this.valueToSearch + '*'];
        }
        var allowedValues;
        if (this.valueToSearch) {
            allowedValues = typedByUser.concat(this.alwaysInclude).concat(this.alwaysExclude);
        }
        else {
            allowedValues = _.compact(typedByUser.concat(this.alwaysInclude).concat(this.facet.options.allowedValues));
        }
        var completeFacetWithStandardValues = this.completeFacetWithStandardValues;
        Iif (this.facet.options.lookupField != null) {
            completeFacetWithStandardValues = false;
        }
        var request = {
            allowedValues: allowedValues,
            allowedValuesPatternType: this.facet.options.useWildcardsInFacetSearch
                ? AllowedValuesPatternType_1.AllowedValuesPatternType.Wildcards
                : AllowedValuesPatternType_1.AllowedValuesPatternType.Legacy,
            maximumNumberOfValues: nbResults,
            completeFacetWithStandardValues: completeFacetWithStandardValues,
            field: this.facet.options.field,
            sortCriteria: this.facet.options.sortCriteria || this.sortCriteria,
            injectionDepth: this.facet.options.injectionDepth
        };
        Iif (this.facet.options.lookupField) {
            request.lookupField = this.facet.options.lookupField;
        }
        if (this.facet.options.computedField) {
            request.computedFields = [
                {
                    field: this.facet.options.computedField,
                    operation: this.facet.options.computedFieldOperation
                }
            ];
        }
        return request;
    };
    FacetSearchParameters.prototype.getQuery = function () {
        var lastQuery = _.clone(this.facet.queryController.getLastQuery());
        Iif (!lastQuery) {
            // There should normally always be a last query available
            // If not, just create an empty one.
            lastQuery = new QueryBuilder_1.QueryBuilder().build();
        }
        // We want to always force query syntax to true for a facet search,
        // but arrange for the basic expression to adapt itself with no syntax block
        if (lastQuery.enableQuerySyntax) {
            lastQuery.q = this.facet.facetQueryController.basicExpressionToUseForFacetSearch;
        }
        else if (Utils_1.Utils.isNonEmptyString(this.facet.facetQueryController.basicExpressionToUseForFacetSearch)) {
            lastQuery.q = "<@- " + this.facet.facetQueryController.basicExpressionToUseForFacetSearch + " -@>";
        }
        else {
            lastQuery.q = '';
        }
        lastQuery.enableQuerySyntax = true;
        lastQuery.cq = this.facet.facetQueryController.constantExpressionToUseForFacetSearch;
        lastQuery.aq = this.facet.facetQueryController.advancedExpressionToUseForFacetSearch;
        lastQuery.enableDidYouMean = false;
        lastQuery.firstResult = 0;
        lastQuery.numberOfResults = 0;
        lastQuery.fieldsToInclude = [];
        lastQuery.groupBy = [this.getGroupByRequest()];
        return lastQuery;
    };
    FacetSearchParameters.prototype.getCurrentlyShowedValueInSearch = function (searchResults) {
        return _.map(Dom_1.$$(searchResults).findAll('.coveo-facet-value-caption'), function (val) {
            return Dom_1.$$(val).getAttribute('data-original-value') || Dom_1.$$(val).text();
        });
    };
    FacetSearchParameters.prototype.lowerCaseAll = function () {
        this.alwaysExclude = _.chain(this.alwaysExclude)
            .map(function (v) {
            return v.toLowerCase();
        })
            .uniq()
            .value();
        this.alwaysInclude = _.chain(this.alwaysInclude)
            .map(function (v) {
            return v.toLowerCase();
        })
            .uniq()
            .value();
    };
    return FacetSearchParameters;
}());
exports.FacetSearchParameters = FacetSearchParameters;
 
 
/***/ }),
/* 120 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__path_js__ = __webpack_require__(1246);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_0__path_js__["a"]; });
 
 
 
/***/ }),
/* 121 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
function streamGeometry(geometry, stream) {
  if (geometry && streamGeometryType.hasOwnProperty(geometry.type)) {
    streamGeometryType[geometry.type](geometry, stream);
  }
}
 
var streamObjectType = {
  Feature: function(object, stream) {
    streamGeometry(object.geometry, stream);
  },
  FeatureCollection: function(object, stream) {
    var features = object.features, i = -1, n = features.length;
    while (++i < n) streamGeometry(features[i].geometry, stream);
  }
};
 
var streamGeometryType = {
  Sphere: function(object, stream) {
    stream.sphere();
  },
  Point: function(object, stream) {
    object = object.coordinates;
    stream.point(object[0], object[1], object[2]);
  },
  MultiPoint: function(object, stream) {
    var coordinates = object.coordinates, i = -1, n = coordinates.length;
    while (++i < n) object = coordinates[i], stream.point(object[0], object[1], object[2]);
  },
  LineString: function(object, stream) {
    streamLine(object.coordinates, stream, 0);
  },
  MultiLineString: function(object, stream) {
    var coordinates = object.coordinates, i = -1, n = coordinates.length;
    while (++i < n) streamLine(coordinates[i], stream, 0);
  },
  Polygon: function(object, stream) {
    streamPolygon(object.coordinates, stream);
  },
  MultiPolygon: function(object, stream) {
    var coordinates = object.coordinates, i = -1, n = coordinates.length;
    while (++i < n) streamPolygon(coordinates[i], stream);
  },
  GeometryCollection: function(object, stream) {
    var geometries = object.geometries, i = -1, n = geometries.length;
    while (++i < n) streamGeometry(geometries[i], stream);
  }
};
 
function streamLine(coordinates, stream, closed) {
  var i = -1, n = coordinates.length - closed, coordinate;
  stream.lineStart();
  while (++i < n) coordinate = coordinates[i], stream.point(coordinate[0], coordinate[1], coordinate[2]);
  stream.lineEnd();
}
 
function streamPolygon(coordinates, stream) {
  var i = -1, n = coordinates.length;
  stream.polygonStart();
  while (++i < n) streamLine(coordinates[i], stream, 1);
  stream.polygonEnd();
}
 
/* harmony default export */ __webpack_exports__["a"] = (function(object, stream) {
  if (object && streamObjectType.hasOwnProperty(object.type)) {
    streamObjectType[object.type](object, stream);
  } else {
    streamGeometry(object, stream);
  }
});
 
 
/***/ }),
/* 122 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return map; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return slice; });
var array = Array.prototype;
 
var map = array.map;
var slice = array.slice;
 
 
/***/ }),
/* 123 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["b"] = linearish;
/* harmony export (immutable) */ __webpack_exports__["a"] = linear;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_d3_array__ = __webpack_require__(44);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__continuous__ = __webpack_require__(103);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__init__ = __webpack_require__(57);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__tickFormat__ = __webpack_require__(762);
 
 
 
 
 
function linearish(scale) {
  var domain = scale.domain;
 
  scale.ticks = function(count) {
    var d = domain();
    return Object(__WEBPACK_IMPORTED_MODULE_0_d3_array__["B" /* ticks */])(d[0], d[d.length - 1], count == null ? 10 : count);
  };
 
  scale.tickFormat = function(count, specifier) {
    var d = domain();
    return Object(__WEBPACK_IMPORTED_MODULE_3__tickFormat__["a" /* default */])(d[0], d[d.length - 1], count == null ? 10 : count, specifier);
  };
 
  scale.nice = function(count) {
    if (count == null) count = 10;
 
    var d = domain(),
        i0 = 0,
        i1 = d.length - 1,
        start = d[i0],
        stop = d[i1],
        step;
 
    if (stop < start) {
      step = start, start = stop, stop = step;
      step = i0, i0 = i1, i1 = step;
    }
 
    step = Object(__WEBPACK_IMPORTED_MODULE_0_d3_array__["z" /* tickIncrement */])(start, stop, count);
 
    if (step > 0) {
      start = Math.floor(start / step) * step;
      stop = Math.ceil(stop / step) * step;
      step = Object(__WEBPACK_IMPORTED_MODULE_0_d3_array__["z" /* tickIncrement */])(start, stop, count);
    } else if (step < 0) {
      start = Math.ceil(start * step) / step;
      stop = Math.floor(stop * step) / step;
      step = Object(__WEBPACK_IMPORTED_MODULE_0_d3_array__["z" /* tickIncrement */])(start, stop, count);
    }
 
    if (step > 0) {
      d[i0] = Math.floor(start / step) * step;
      d[i1] = Math.ceil(stop / step) * step;
      domain(d);
    } else if (step < 0) {
      d[i0] = Math.ceil(start * step) / step;
      d[i1] = Math.floor(stop * step) / step;
      domain(d);
    }
 
    return scale;
  };
 
  return scale;
}
 
function linear() {
  var scale = Object(__WEBPACK_IMPORTED_MODULE_1__continuous__["b" /* default */])(__WEBPACK_IMPORTED_MODULE_1__continuous__["c" /* identity */], __WEBPACK_IMPORTED_MODULE_1__continuous__["c" /* identity */]);
 
  scale.copy = function() {
    return Object(__WEBPACK_IMPORTED_MODULE_1__continuous__["a" /* copy */])(scale, linear());
  };
 
  __WEBPACK_IMPORTED_MODULE_2__init__["b" /* initRange */].apply(scale, arguments);
 
  return linearish(scale);
}
 
 
/***/ }),
/* 124 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony default export */ __webpack_exports__["a"] = (function(x) {
  return function constant() {
    return x;
  };
});
 
 
/***/ }),
/* 125 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
__webpack_require__(1488);
var QueryEvents_1 = __webpack_require__(14);
var StandaloneSearchInterfaceEvents_1 = __webpack_require__(170);
var GlobalExports_1 = __webpack_require__(10);
var Grammar_1 = __webpack_require__(154);
var MagicBox_1 = __webpack_require__(264);
var Assert_1 = __webpack_require__(12);
var Model_1 = __webpack_require__(26);
var QueryStateModel_1 = __webpack_require__(17);
var Strings_1 = __webpack_require__(4);
var Dom_1 = __webpack_require__(0);
var AnalyticsActionListMeta_1 = __webpack_require__(7);
var Component_1 = __webpack_require__(6);
var ComponentOptions_1 = __webpack_require__(13);
var Initialization_1 = __webpack_require__(8);
var QueryboxOptionsProcessing_1 = __webpack_require__(807);
var QueryboxQueryParameters_1 = __webpack_require__(171);
/**
 * The `Querybox` component renders an input which the end user can interact with to enter and submit queries.
 *
 * When the end user submits a search request, the `Querybox` component triggers a query and logs the corresponding
 * usage analytics data.
 *
 * For technical reasons, it is necessary to instantiate this component on a `div` element rather than on an `input`
 * element.
 *
 * See also the [`Searchbox`]{@link Searchbox} component, which can automatically instantiate a `Querybox` along with an
 * optional [`SearchButton`]{@link SearchButton} component.
 */
var Querybox = /** @class */ (function (_super) {
    __extends(Querybox, _super);
    /**
     * Creates a new `Querybox component`. Creates a new `Coveo.Magicbox` instance and wraps the Magicbox methods
     * (`onblur`, `onsubmit` etc.). Binds event on `buildingQuery` and before redirection (for standalone box).
     * @param element The HTMLElement on which to instantiate the component. This cannot be an HTMLInputElement for
     * technical reasons.
     * @param options The options for the `Querybox` component.
     * @param bindings The bindings that the component requires to function normally. If not set, these will be
     * automatically resolved (with a slower execution time).
     */
    function Querybox(element, options, bindings) {
        var _this = _super.call(this, element, Querybox.ID, bindings) || this;
        _this.element = element;
        _this.options = options;
        _this.bindings = bindings;
        Iif (element instanceof HTMLInputElement) {
            _this.logger.error('Querybox cannot be used on an HTMLInputElement');
        }
        _this.options = ComponentOptions_1.ComponentOptions.initComponentOptions(element, Querybox, options);
        new QueryboxOptionsProcessing_1.QueryboxOptionsProcessing(_this).postProcess();
        Dom_1.$$(_this.element).toggleClass('coveo-query-syntax-disabled', _this.options.enableQuerySyntax == false);
        _this.magicBox = MagicBox_1.createMagicBox(element, new Grammar_1.Grammar('Query', {
            Query: '[Term*][Spaces?]',
            Term: '[Spaces?][Word]',
            Spaces: / +/,
            Word: /[^ ]+/
        }), {
            inline: true
        });
        var input = Dom_1.$$(_this.magicBox.element).find('input');
        Eif (input) {
            Dom_1.$$(input).setAttribute('aria-label', _this.options.placeholder || Strings_1.l('Search'));
        }
        _this.bind.onRootElement(QueryEvents_1.QueryEvents.buildingQuery, function (args) { return _this.handleBuildingQuery(args); });
        _this.bind.onRootElement(StandaloneSearchInterfaceEvents_1.StandaloneSearchInterfaceEvents.beforeRedirect, function () { return _this.updateQueryState(); });
        _this.bind.onQueryState(Model_1.MODEL_EVENTS.CHANGE_ONE, QueryStateModel_1.QUERY_STATE_ATTRIBUTES.Q, function (args) {
            return _this.handleQueryStateChanged(args);
        });
        if (_this.options.enableSearchAsYouType) {
            Dom_1.$$(_this.element).addClass('coveo-search-as-you-type');
            _this.magicBox.onchange = function () {
                _this.searchAsYouType();
            };
        }
        _this.magicBox.onsubmit = function () {
            _this.submit();
        };
        _this.magicBox.onblur = function () {
            _this.updateQueryState();
        };
        _this.magicBox.onclear = function () {
            _this.updateQueryState();
            if (_this.options.triggerQueryOnClear) {
                _this.usageAnalytics.logSearchEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.searchboxClear, {});
                _this.triggerNewQuery(false);
            }
        };
        return _this;
    }
    /**
     * Adds the current content of the input to the query and triggers a query if the current content of the input has
     * changed since last submit.
     *
     * Also logs the `serachboxSubmit` event in the usage analytics.
     */
    Querybox.prototype.submit = function () {
        this.magicBox.clearSuggestion();
        this.updateQueryState();
        this.usageAnalytics.logSearchEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.searchboxSubmit, {});
        this.triggerNewQuery(false);
    };
    /**
     * Sets the content of the input.
     *
     * @param text The string to set in the input.
     */
    Querybox.prototype.setText = function (text) {
        this.magicBox.setText(text);
        this.updateQueryState();
    };
    /**
     * Clears the content of the input.
     *
     * See also the [`triggerQueryOnClear`]{@link Querybox.options.triggerQueryOnClear} option.
     */
    Querybox.prototype.clear = function () {
        this.magicBox.clear();
    };
    /**
     * Gets the content of the input.
     *
     * @returns {string} The content of the input.
     */
    Querybox.prototype.getText = function () {
        return this.magicBox.getText();
    };
    /**
     * Gets the result from the input.
     *
     * @returns {Result} The result.
     */
    Querybox.prototype.getResult = function () {
        return this.magicBox.getResult();
    };
    /**
     * Gets the displayed result from the input.
     *
     * @returns {Result} The displayed result.
     */
    Querybox.prototype.getDisplayedResult = function () {
        return this.magicBox.getDisplayedResult();
    };
    /**
     * Gets the current cursor position in the input.
     *
     * @returns {number} The cursor position (index starts at 0).
     */
    Querybox.prototype.getCursor = function () {
        return this.magicBox.getCursor();
    };
    /**
     * Gets the result at cursor position.
     *
     * @param match {string | { (result): boolean }} The match condition.
     *
     * @returns {Result[]} The result.
     */
    Querybox.prototype.resultAtCursor = function (match) {
        return this.magicBox.resultAtCursor(match);
    };
    Querybox.prototype.handleBuildingQuery = function (args) {
        Assert_1.Assert.exists(args);
        Assert_1.Assert.exists(args.queryBuilder);
        this.updateQueryState();
        this.lastQuery = this.magicBox.getText();
        new QueryboxQueryParameters_1.QueryboxQueryParameters(this.options).addParameters(args.queryBuilder, this.lastQuery);
    };
    Querybox.prototype.triggerNewQuery = function (searchAsYouType) {
        clearTimeout(this.searchAsYouTypeTimeout);
        var text = this.magicBox.getText();
        if (this.lastQuery != text && text != null) {
            this.lastQuery = text;
            this.queryController.executeQuery({
                searchAsYouType: searchAsYouType,
                logInActionsHistory: true
            });
        }
    };
    Querybox.prototype.updateQueryState = function () {
        this.queryStateModel.set(QueryStateModel_1.QueryStateModel.attributesEnum.q, this.magicBox.getText());
    };
    Querybox.prototype.handleQueryStateChanged = function (args) {
        Assert_1.Assert.exists(args);
        var q = args.value;
        Eif (q != this.magicBox.getText()) {
            this.magicBox.setText(q);
        }
    };
    Querybox.prototype.searchAsYouType = function () {
        var _this = this;
        clearTimeout(this.searchAsYouTypeTimeout);
        this.searchAsYouTypeTimeout = window.setTimeout(function () {
            _this.usageAnalytics.logSearchAsYouType(AnalyticsActionListMeta_1.analyticsActionCauseList.searchboxAsYouType, {});
            _this.triggerNewQuery(true);
        }, this.options.searchAsYouTypeDelay);
    };
    Querybox.ID = 'Querybox';
    Querybox.doExport = function () {
        GlobalExports_1.exportGlobally({
            Querybox: Querybox,
            QueryboxQueryParameters: QueryboxQueryParameters_1.QueryboxQueryParameters
        });
    };
    /**
     * The options for the Querybox.
     * @componentOptions
     */
    Querybox.options = {
        /**
         * Whether to enable the search-as-you-type feature.
         *
         * **Note:** Enabling this feature can consume lots of queries per month (QPM), especially if the [`searchAsYouTypeDelay`]{@link Querybox.options.searchAsYouTypeDelay} option is set to a low value.
         *
         * Default value is `false`.
         */
        enableSearchAsYouType: ComponentOptions_1.ComponentOptions.buildBooleanOption({ defaultValue: false, section: 'Advanced Options' }),
        /**
         * If the [`enableSearchAsYouType`]{@link Querybox.options.enableSearchAsYouType} option is `true`, specifies how
         * long to wait (in milliseconds) between each key press before triggering a new query.
         *
         * Default value is `50`. Minimum value is `0`
         */
        searchAsYouTypeDelay: ComponentOptions_1.ComponentOptions.buildNumberOption({ defaultValue: 50, min: 0, section: 'Advanced Options' }),
        /**
         * Specifies whether to interpret special query syntax (e.g., `@objecttype=message`) when the end user types
         * a query in the `Querybox` (see
         * [Coveo Query Syntax Reference](https://docs.coveo.com/en/1552/searching-with-coveo/coveo-cloud-query-syntax)). Setting this
         * option to `true` also causes the `Querybox` to highlight any query syntax.
         *
         * Regardless of the value of this option, the Coveo Cloud REST Search API always interprets expressions surrounded
         * by double quotes (`"`) as exact phrase match requests.
         *
         * See also [`enableLowercaseOperators`]{@link Querybox.options.enableLowercaseOperators}.
         *
         * **Notes:**
         * > * End user preferences can override the value you specify for this option.
         * >
         * > If the end user selects a value other than **Automatic** for the **Enable query syntax** setting (see
         * > the [`enableQuerySyntax`]{@link ResultsPreferences.options.enableQuerySyntax} option of the
         * > [`ResultsPreferences`]{@link ResultsPreferences} component), the end user preference takes precedence over this
         * > option.
         * >
         * > * On-premises versions of the Coveo Search API require this option to be set to `true` in order to interpret
         * > expressions surrounded by double quotes (`"`) as exact phrase match requests.
         *
         * Default value is `false`.
         */
        enableQuerySyntax: ComponentOptions_1.ComponentOptions.buildBooleanOption({ defaultValue: false, section: 'Advanced Options' }),
        /**
         * Specifies whether to expand basic expression keywords containing wildcards characters (`*`) to the possible
         * matching keywords in order to broaden the query (see
         * [Using Wildcards in Queries](https://docs.coveo.com/en/1580/)).
         *
         * See also [`enableQuestionMarks`]{@link Querybox.options.enableQuestionMarks}.
         *
         *  **Note:**
         * > If you are using an on-premises version of the Coveo Search API, you need to set the
         * > [`enableQuerySyntax`]{@link Querybox.options.enableQuerySyntax} option to `true` to be able to set
         * > `enableWildcards` to `true`.
         *
         * Default value is `false`.
         */
        enableWildcards: ComponentOptions_1.ComponentOptions.buildBooleanOption({ defaultValue: false, section: 'Advanced Options' }),
        /**
         * If [`enableWildcards`]{@link Querybox.options.enableWildcards} is `true`, specifies whether to expand basic
         * expression keywords containing question mark characters (`?`) to the possible matching keywords in order to
         * broaden the query (see
         * [Using Wildcards in Queries](https://docs.coveo.com/en/1580/)).
         *
         * **Note:**
         * > If you are using an on-premises version of the Coveo Search API, you also need to set the
         * > [`enableQuerySyntax`]{@link Querybox.options.enableQuerySyntax} option to `true` in order to be able to set
         * > `enableQuestionMarks` to `true`.
         *
         * Default value is `false`.
         */
        enableQuestionMarks: ComponentOptions_1.ComponentOptions.buildBooleanOption({ defaultValue: false, depend: 'enableWildcards' }),
        /**
         * If the [`enableQuerySyntax`]{@link Querybox.options.enableQuerySyntax} option is `true`, specifies whether to
         * interpret the `AND`, `NOT`, `OR`, and `NEAR` keywords in the `Querybox` as query operators in the query, even if
         * the end user types those keywords in lowercase.
         *
         * This option applies to all query operators (see
         * [Coveo Query Syntax Reference](https://docs.coveo.com/en/1552/searching-with-coveo/coveo-cloud-query-syntax)).
         *
         * **Example:**
         * > If this option and the `enableQuerySyntax` option are both `true`, the Coveo Platform interprets the `near`
         * > keyword in a query such as `service center near me` as the `NEAR` query operator (not as a query term).
         *
         * > Otherwise, if the `enableQuerySyntax` option is `true` and this option is `false`, the end user has to type the
         * > `NEAR` keyword in uppercase for the Coveo Platform to interpret it as a query operator.
         *
         * Default value is `false`.
         */
        enableLowercaseOperators: ComponentOptions_1.ComponentOptions.buildBooleanOption({ defaultValue: false, depend: 'enableQuerySyntax' }),
        /**
         * Whether to convert a basic expression containing at least a certain number of keywords (see the
         * [`partialMatchKeywords`]{@link Querybox.options.partialMatchKeywords} option) to *partial match expression*, so
         * that items containing at least a certain number of those keywords (see the
         * [`partialMatchThreshold`]{@link Querybox.options.partialMatchThreshold} option) will match the expression.
         *
         * **Notes:**
         * - Only the basic expression of the query (see [`q`]{@link q}) can be converted to a partial match expression.
         * - When the [`enableQuerySyntax`]{@link Querybox.options.enableQuerySyntax} option is set to `true`, this feature has no effect if the basic expression contains advanced query syntax (field expressions, operators, etc.).
         *
         * @notSupportedIn salesforcefree
         */
        enablePartialMatch: ComponentOptions_1.ComponentOptions.buildBooleanOption({ defaultValue: false }),
        /**
         * The minimum number of keywords that need to be present in the basic expression to convert it to a partial match expression.
         *
         * See also the [`partialMatchThreshold`]{@link Querybox.options.partialMatchThreshold} option.
         *
         * **Notes:**
         *
         * - Repeated keywords count as a single keyword.
         * - Thesaurus expansions count towards the `partialMatchKeywords` count.
         * - Stemming expansions **do not** count towards the `partialMatchKeywords` count.
         *
         * @notSupportedIn salesforcefree
         */
        partialMatchKeywords: ComponentOptions_1.ComponentOptions.buildNumberOption({ defaultValue: 5, min: 1, depend: 'enablePartialMatch' }),
        /**
         * An absolute or relative value indicating the minimum number of partial match expression keywords an item must contain to match the expression.
         *
         * See also the [`partialMatchKeywords`]{@link Querybox.options.partialMatchKeywords} option.
         *
         * **Notes:**
         * - A keyword and its stemming expansions count as a single keyword when evaluating whether an item meets the `partialMatchThreshold`.
         * - When a relative `partialMatchThreshold` does not yield a whole integer, the fractional part is truncated (e.g., `3.6` becomes `3`).
         *
         * @notSupportedIn salesforcefree
         */
        partialMatchThreshold: ComponentOptions_1.ComponentOptions.buildStringOption({ defaultValue: '50%', depend: 'enablePartialMatch' }),
        /**
         * Whether to trigger a query when clearing the `Querybox`.
         *
         * Default value is `false`.
         */
        triggerQueryOnClear: ComponentOptions_1.ComponentOptions.buildBooleanOption({ defaultValue: false })
    };
    return Querybox;
}(Component_1.Component));
exports.Querybox = Querybox;
Initialization_1.Initialization.registerAutoCreateComponent(Querybox);
 
 
/***/ }),
/* 126 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __assign = (this && this.__assign) || Object.assign || function(t) {
    for (var s, i = 1, n = arguments.length; i < n; i++) {
        s = arguments[i];
        for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
            t[p] = s[p];
    }
    return t;
};
Object.defineProperty(exports, "__esModule", { value: true });
var Globalize = __webpack_require__(28);
var FacetValueState_1 = __webpack_require__(36);
var AnalyticsActionListMeta_1 = __webpack_require__(7);
var Strings_1 = __webpack_require__(4);
var FacetRequest_1 = __webpack_require__(127);
var DynamicFacetValue = /** @class */ (function () {
    function DynamicFacetValue(facetValue, facet, rendererKlass) {
        this.facet = facet;
        this.element = null;
        this.value = facetValue.value;
        this.start = facetValue.start;
        this.end = facetValue.end;
        this.endInclusive = facetValue.endInclusive;
        this.state = facetValue.state;
        this.numberOfResults = facetValue.numberOfResults;
        this.position = facetValue.position;
        this.displayValue = facetValue.displayValue;
        this.renderer = new rendererKlass(this, facet);
    }
    Object.defineProperty(DynamicFacetValue.prototype, "isSelected", {
        get: function () {
            return this.state === FacetValueState_1.FacetValueState.selected;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(DynamicFacetValue.prototype, "isIdle", {
        get: function () {
            return this.state === FacetValueState_1.FacetValueState.idle;
        },
        enumerable: true,
        configurable: true
    });
    DynamicFacetValue.prototype.toggleSelect = function () {
        this.state === FacetValueState_1.FacetValueState.selected ? this.deselect() : this.select();
    };
    DynamicFacetValue.prototype.select = function () {
        this.state = FacetValueState_1.FacetValueState.selected;
    };
    DynamicFacetValue.prototype.deselect = function () {
        this.state = FacetValueState_1.FacetValueState.idle;
    };
    DynamicFacetValue.prototype.equals = function (arg) {
        var value = typeof arg === 'string' ? arg : arg.value;
        return value.toLowerCase() === this.value.toLowerCase();
    };
    DynamicFacetValue.prototype.focus = function () {
        if (!this.renderedElement) {
            return;
        }
        var checkbox = this.renderedElement.querySelector('.coveo-checkbox-button');
        if (!checkbox) {
            return;
        }
        checkbox.focus();
    };
    Object.defineProperty(DynamicFacetValue.prototype, "formattedCount", {
        get: function () {
            return Globalize.format(this.numberOfResults, 'n0');
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(DynamicFacetValue.prototype, "selectAriaLabel", {
        get: function () {
            var resultCount = Strings_1.l('ResultCount', this.formattedCount, this.numberOfResults);
            return this.displayValue + " " + resultCount;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(DynamicFacetValue.prototype, "isRange", {
        get: function () {
            return this.facet.facetType !== FacetRequest_1.FacetType.specific;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(DynamicFacetValue.prototype, "analyticsValue", {
        get: function () {
            return this.isRange ? this.start + ".." + this.end : this.value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(DynamicFacetValue.prototype, "rangeFacetState", {
        get: function () {
            if (!this.isRange) {
                return null;
            }
            return {
                start: "" + this.start,
                end: "" + this.end,
                endInclusive: this.endInclusive
            };
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(DynamicFacetValue.prototype, "analyticsFacetState", {
        get: function () {
            return __assign({}, this.facet.basicAnalyticsFacetState, this.rangeFacetState, { value: this.analyticsValue, valuePosition: this.position, displayValue: this.displayValue, state: this.state });
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(DynamicFacetValue.prototype, "rangeFacetMeta", {
        get: function () {
            if (!this.isRange) {
                return null;
            }
            return {
                facetRangeStart: "" + this.start,
                facetRangeEnd: "" + this.end,
                facetRangeEndInclusive: this.endInclusive
            };
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(DynamicFacetValue.prototype, "analyticsFacetMeta", {
        get: function () {
            return __assign({}, this.facet.basicAnalyticsFacetMeta, this.rangeFacetMeta, { facetValue: this.analyticsValue });
        },
        enumerable: true,
        configurable: true
    });
    DynamicFacetValue.prototype.logSelectActionToAnalytics = function () {
        var action = this.state === FacetValueState_1.FacetValueState.selected ? AnalyticsActionListMeta_1.analyticsActionCauseList.dynamicFacetSelect : AnalyticsActionListMeta_1.analyticsActionCauseList.dynamicFacetDeselect;
        this.facet.logAnalyticsEvent(action, this.analyticsFacetMeta);
    };
    DynamicFacetValue.prototype.render = function () {
        this.element = this.renderer.render();
        return this.element;
    };
    Object.defineProperty(DynamicFacetValue.prototype, "renderedElement", {
        get: function () {
            if (this.element) {
                return this.element;
            }
            return this.render();
        },
        enumerable: true,
        configurable: true
    });
    return DynamicFacetValue;
}());
exports.DynamicFacetValue = DynamicFacetValue;
 
 
/***/ }),
/* 127 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
/**
 * The allowed values for the [`facetType`]{@link IFacetRequest.facetType} property of a [facet request]{@link IFacetRequest}.
 */
var FacetType;
(function (FacetType) {
    /**
     * Request facet values representing specific values.
     */
    FacetType["specific"] = "specific";
    /**
     * Request facet values representing ranges of numbers.
     */
    FacetType["numericalRange"] = "numericalRange";
    /**
     * Request facet values representing ranges of dates.
     */
    FacetType["dateRange"] = "dateRange";
    /**
     * Request facet values representing a hierarchy.
     */
    FacetType["hierarchical"] = "hierarchical";
})(FacetType = exports.FacetType || (exports.FacetType = {}));
 
 
/***/ }),
/* 128 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __assign = (this && this.__assign) || Object.assign || function(t) {
    for (var s, i = 1, n = arguments.length; i < n; i++) {
        s = arguments[i];
        for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
            t[p] = s[p];
    }
    return t;
};
Object.defineProperty(exports, "__esModule", { value: true });
var FacetValueState_1 = __webpack_require__(36);
var Mock = __webpack_require__(2);
var Core_1 = __webpack_require__(9);
var DynamicHierarchicalFacetValues_1 = __webpack_require__(406);
var DynamicHierarchicalFacet_1 = __webpack_require__(405);
var DynamicFacetHeader_1 = __webpack_require__(155);
var DynamicHierarchicalFacetTestUtils = /** @class */ (function () {
    function DynamicHierarchicalFacetTestUtils() {
    }
    DynamicHierarchicalFacetTestUtils.allOptions = function (options) {
        return __assign({ field: '@dummy', valueCaption: {}, numberOfValues: 5, pageSize: 10, enableMoreLess: true, basePath: ['hello', 'world'] }, options);
    };
    DynamicHierarchicalFacetTestUtils.createFakeFacetValue = function () {
        var value = 'facet value';
        return {
            value: value,
            state: FacetValueState_1.FacetValueState.idle,
            children: [],
            displayValue: value,
            moreValuesAvailable: false,
            numberOfResults: Math.ceil(Math.random() * 100000),
            isLeafValue: false,
            path: [value]
        };
    };
    DynamicHierarchicalFacetTestUtils.createFakeSelectedFacetResponseValue = function () {
        return {
            value: 'v0',
            state: FacetValueState_1.FacetValueState.selected,
            numberOfResults: 19467,
            children: [
                {
                    value: 'v0',
                    state: FacetValueState_1.FacetValueState.idle,
                    numberOfResults: 981,
                    children: []
                },
                {
                    value: 'v1',
                    state: FacetValueState_1.FacetValueState.idle,
                    numberOfResults: 978,
                    children: []
                },
                {
                    value: 'v2',
                    state: FacetValueState_1.FacetValueState.idle,
                    numberOfResults: 975,
                    children: []
                },
                {
                    value: 'v19',
                    state: FacetValueState_1.FacetValueState.idle,
                    numberOfResults: 972,
                    children: []
                },
                {
                    value: 'v18',
                    state: FacetValueState_1.FacetValueState.idle,
                    numberOfResults: 972,
                    children: []
                }
            ],
            moreValuesAvailable: true
        };
    };
    DynamicHierarchicalFacetTestUtils.createFakeFacetResponseValues = function (depth, children) {
        if (depth === void 0) { depth = 1; }
        if (children === void 0) { children = 5; }
        var fakeValues = [];
        for (var index = 0; index < children; index++) {
            var value = "value " + depth + "-" + index;
            var fakeValue = {
                value: value,
                state: FacetValueState_1.FacetValueState.idle,
                children: depth > 1 ? this.createFakeFacetResponseValues(depth - 1, children) : [],
                moreValuesAvailable: false,
                numberOfResults: Math.ceil(Math.random() * 100000)
            };
            fakeValues.push(fakeValue);
        }
        return fakeValues;
    };
    DynamicHierarchicalFacetTestUtils.createFakeFacet = function (options) {
        var facet = Mock.mockComponent(DynamicHierarchicalFacet_1.DynamicHierarchicalFacet);
        facet.options = this.allOptions(options);
        facet.values = new DynamicHierarchicalFacetValues_1.DynamicHierarchicalFacetValues(facet);
        facet.element = Core_1.$$('div').el;
        facet.searchInterface = Mock.mockSearchInterface();
        facet.header = Mock.mock(DynamicFacetHeader_1.DynamicFacetHeader);
        facet.header.options = {
            id: facet.options.id,
            clear: function () { },
            collapse: function () { },
            expand: function () { },
            toggleCollapse: function () { },
            enableCollapse: facet.options.enableCollapse,
            title: facet.options.title,
            headingLevel: 2
        };
        return facet;
    };
    DynamicHierarchicalFacetTestUtils.createAdvancedFakeFacet = function (options, env) {
        return Mock.advancedComponentSetup(DynamicHierarchicalFacet_1.DynamicHierarchicalFacet, {
            modifyBuilder: function (builder) {
                if (!env) {
                    builder.withLiveQueryStateModel();
                    return builder;
                }
                builder.withRoot(env.root).withQueryStateModel(env.queryStateModel).withSearchInterface(env.searchInterface);
                return builder;
            },
            cmpOptions: this.allOptions(options)
        });
    };
    DynamicHierarchicalFacetTestUtils.getCompleteFacetResponse = function (facet, partialResponse) {
        return __assign({ facetId: facet.options.id, field: facet.fieldName, values: DynamicHierarchicalFacetTestUtils.createFakeFacetResponseValues(), moreValuesAvailable: false }, partialResponse);
    };
    return DynamicHierarchicalFacetTestUtils;
}());
exports.DynamicHierarchicalFacetTestUtils = DynamicHierarchicalFacetTestUtils;
 
 
/***/ }),
/* 129 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = values;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__keys_js__ = __webpack_require__(41);
 
 
// Retrieve the values of an object's properties.
function values(obj) {
  var _keys = Object(__WEBPACK_IMPORTED_MODULE_0__keys_js__["a" /* default */])(obj);
  var length = _keys.length;
  var values = Array(length);
  for (var i = 0; i < length; i++) {
    values[i] = obj[_keys[i]];
  }
  return values;
}
 
 
/***/ }),
/* 130 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = flatten;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__getLength_js__ = __webpack_require__(65);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isArrayLike_js__ = __webpack_require__(60);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isArray_js__ = __webpack_require__(106);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__isArguments_js__ = __webpack_require__(280);
 
 
 
 
 
// Internal implementation of a recursive `flatten` function.
function flatten(input, depth, strict, output) {
  output = output || [];
  if (!depth && depth !== 0) {
    depth = Infinity;
  } else Iif (depth <= 0) {
    return output.concat(input);
  }
  var idx = output.length;
  for (var i = 0, length = Object(__WEBPACK_IMPORTED_MODULE_0__getLength_js__["a" /* default */])(input); i < length; i++) {
    var value = input[i];
    if (Object(__WEBPACK_IMPORTED_MODULE_1__isArrayLike_js__["a" /* default */])(value) && (Object(__WEBPACK_IMPORTED_MODULE_2__isArray_js__["a" /* default */])(value) || Object(__WEBPACK_IMPORTED_MODULE_3__isArguments_js__["a" /* default */])(value))) {
      // Flatten current level of array or arguments object.
      if (depth > 1) {
        flatten(value, depth - 1, strict, output);
        idx = output.length;
      } else {
        var j = 0, len = value.length;
        while (j < len) output[idx++] = value[j++];
      }
    } else Eif (!strict) {
      output[idx++] = value;
    }
  }
  return output;
}
 
 
/***/ }),
/* 131 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = map;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__cb_js__ = __webpack_require__(53);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isArrayLike_js__ = __webpack_require__(60);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__keys_js__ = __webpack_require__(41);
 
 
 
 
// Return the results of applying the iteratee to each element.
function map(obj, iteratee, context) {
  iteratee = Object(__WEBPACK_IMPORTED_MODULE_0__cb_js__["a" /* default */])(iteratee, context);
  var _keys = !Object(__WEBPACK_IMPORTED_MODULE_1__isArrayLike_js__["a" /* default */])(obj) && Object(__WEBPACK_IMPORTED_MODULE_2__keys_js__["a" /* default */])(obj),
      length = (_keys || obj).length,
      results = Array(length);
  for (var index = 0; index < length; index++) {
    var currentKey = _keys ? _keys[index] : index;
    results[index] = iteratee(obj[currentKey], currentKey, obj);
  }
  return results;
}
 
 
/***/ }),
/* 132 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var ResultLayoutEvents = /** @class */ (function () {
    function ResultLayoutEvents() {
    }
    ResultLayoutEvents.populateResultLayout = 'populateResultLayout';
    return ResultLayoutEvents;
}());
exports.ResultLayoutEvents = ResultLayoutEvents;
 
 
/***/ }),
/* 133 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
var BaseComponent_1 = __webpack_require__(113);
var RootComponent = /** @class */ (function (_super) {
    __extends(RootComponent, _super);
    function RootComponent(element, type) {
        var _this = _super.call(this, element, type) || this;
        _this.element = element;
        _this.type = type;
        return _this;
    }
    return RootComponent;
}(BaseComponent_1.BaseComponent));
exports.RootComponent = RootComponent;
 
 
/***/ }),
/* 134 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
var Model_1 = __webpack_require__(26);
var ComponentStateModel = /** @class */ (function (_super) {
    __extends(ComponentStateModel, _super);
    function ComponentStateModel(element) {
        return _super.call(this, element, ComponentStateModel.ID, {}) || this;
    }
    ComponentStateModel.prototype.registerComponent = function (componentId, component) {
        var currentAttribute = this.attributes[componentId];
        if (currentAttribute == undefined) {
            this.attributes[componentId] = [component];
        }
        else {
            this.attributes[componentId].push(component);
        }
    };
    ComponentStateModel.ID = 'ComponentState';
    return ComponentStateModel;
}(Model_1.Model));
exports.ComponentStateModel = ComponentStateModel;
 
 
/***/ }),
/* 135 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
var Template_1 = __webpack_require__(29);
var DefaultResultTemplate_1 = __webpack_require__(173);
var Assert_1 = __webpack_require__(12);
var _ = __webpack_require__(1);
var TemplateList = /** @class */ (function (_super) {
    __extends(TemplateList, _super);
    function TemplateList(templates) {
        var _this = _super.call(this) || this;
        _this.templates = templates;
        Assert_1.Assert.exists(templates);
        return _this;
    }
    TemplateList.prototype.instantiateToString = function (object, instantiateOptions) {
        Eif (instantiateOptions === void 0) { instantiateOptions = {}; }
        var merged = new Template_1.DefaultInstantiateTemplateOptions().merge(instantiateOptions);
        var filteredTemplates = _.reject(this.templates, function (t) { return t.role != null; });
        for (var i = 0; i < filteredTemplates.length; i++) {
            var result = filteredTemplates[i].instantiateToString(object, merged);
            if (result != null) {
                return result;
            }
        }
        return this.getFallbackTemplate().instantiateToString(object, instantiateOptions);
    };
    TemplateList.prototype.instantiateToElement = function (object, instantiateOptions) {
        Eif (instantiateOptions === void 0) { instantiateOptions = {}; }
        var merged = new Template_1.DefaultInstantiateTemplateOptions().merge(instantiateOptions);
        var filteredTemplates = _.reject(this.templates, function (t) { return t.role != null; });
        for (var i = 0; i < filteredTemplates.length; i++) {
            var promiseOfHTMLElement = filteredTemplates[i].instantiateToElement(object, merged);
            Eif (promiseOfHTMLElement != null) {
                return promiseOfHTMLElement;
            }
        }
        return this.getFallbackTemplate().instantiateToElement(object, merged);
    };
    TemplateList.prototype.getFields = function () {
        return _.reduce(this.templates, function (fields, template) { return fields.concat(template.getFields()); }, []);
    };
    TemplateList.prototype.getType = function () {
        return 'TemplateList';
    };
    TemplateList.prototype.getFallbackTemplate = function () {
        return new DefaultResultTemplate_1.DefaultResultTemplate();
    };
    return TemplateList;
}(Template_1.Template));
exports.TemplateList = TemplateList;
 
 
/***/ }),
/* 136 */
/***/ (function(module, exports, __webpack_require__) {
 
var store = __webpack_require__(489)('wks');
var uid = __webpack_require__(491);
var Symbol = __webpack_require__(117).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;
 
 
/***/ }),
/* 137 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __assign = (this && this.__assign) || Object.assign || function(t) {
    for (var s, i = 1, n = arguments.length; i < n; i++) {
        s = arguments[i];
        for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
            t[p] = s[p];
    }
    return t;
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { Iif (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        Iif (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            Iif (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
            Iif (y = 0, t) op = [0, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    Iif (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    Iif (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    Iif (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        Iif (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
Object.defineProperty(exports, "__esModule", { value: true });
var Dom_1 = __webpack_require__(0);
var DateUtils_1 = __webpack_require__(43);
var FileTypes_1 = __webpack_require__(138);
var Utils_1 = __webpack_require__(5);
var StringUtils_1 = __webpack_require__(34);
var SVGIcons_1 = __webpack_require__(16);
var RegisteredNamedMethods_1 = __webpack_require__(38);
var Logger_1 = __webpack_require__(18);
var Core_1 = __webpack_require__(9);
var Assert_1 = __webpack_require__(12);
var DomUtils = /** @class */ (function () {
    function DomUtils() {
    }
    DomUtils.getPopUpCloseButton = function (captionForClose, captionForReminder) {
        var container = document.createElement('span');
        var closeButton = document.createElement('span');
        Dom_1.$$(closeButton).addClass('coveo-close-button');
        container.appendChild(closeButton);
        var iconClose = document.createElement('span');
        Dom_1.$$(iconClose).addClass('coveo-icon');
        Dom_1.$$(iconClose).addClass('coveo-sprites-quickview-close');
        closeButton.appendChild(iconClose);
        Dom_1.$$(closeButton).text(captionForClose);
        var closeReminder = document.createElement('span');
        Dom_1.$$(closeReminder).addClass('coveo-pop-up-reminder');
        Dom_1.$$(closeReminder).text(captionForReminder);
        container.appendChild(closeReminder);
        return container.outerHTML;
    };
    DomUtils.getBasicLoadingAnimation = function () {
        var loadDotClass = 'coveo-loading-dot';
        var dom = document.createElement('div');
        dom.className = 'coveo-first-loading-animation';
        dom.innerHTML = "<div class='coveo-logo'>" + SVGIcons_1.SVGIcons.icons.coveoLogo + "</div>\n    <div class='coveo-loading-container'>\n      <div class='" + loadDotClass + "'></div>\n      <div class='" + loadDotClass + "'></div>\n      <div class='" + loadDotClass + "'></div>\n      <div class='" + loadDotClass + "'></div>\n    </div>";
        return dom;
    };
    DomUtils.highlight = function (content, classToApply, htmlEncode) {
        if (classToApply === void 0) { classToApply = 'coveo-highlight'; }
        if (htmlEncode === void 0) { htmlEncode = true; }
        var trimmedClass = classToApply !== null ? classToApply.trim() : null;
        if (trimmedClass !== null) {
            Assert_1.Assert.check(/^([^\s\-][a-z\s\-]*[^\s\-])?$/i.test(trimmedClass), 'Invalid class');
        }
        return "<span" + (trimmedClass !== null && trimmedClass.length > 0 ? " class='" + trimmedClass + "'" : '') + ">" + (htmlEncode ? StringUtils_1.StringUtils.htmlEncode(content) : content) + "</span>";
    };
    DomUtils.highlightElement = function (initialString, valueToSearch, classToApply) {
        if (classToApply === void 0) { classToApply = 'coveo-highlight'; }
        var regex = new RegExp(Utils_1.Utils.escapeRegexCharacter(StringUtils_1.StringUtils.latinize(valueToSearch)), 'i');
        var firstChar = StringUtils_1.StringUtils.latinize(initialString).search(regex);
        if (firstChar >= 0) {
            var lastChar = firstChar + valueToSearch.length;
            return (StringUtils_1.StringUtils.htmlEncode(initialString.slice(0, firstChar)) +
                this.highlight(initialString.slice(firstChar, lastChar), classToApply, true) +
                StringUtils_1.StringUtils.htmlEncode(initialString.slice(lastChar)));
        }
        else {
            return initialString;
        }
    };
    DomUtils.getLoadingSpinner = function () {
        var loading = Dom_1.$$('div', {
            className: 'coveo-loading-spinner'
        });
        return loading.el;
    };
    DomUtils.getModalBoxHeader = function (title) {
        var header = Dom_1.$$('div');
        header.el.innerHTML = "<div class='coveo-modalbox-right-header'>\n        <span class='coveo-modalbox-close-button'>\n          <span class='coveo-icon coveo-sprites-common-clear'></span>\n        </span>\n      </div>\n      <div class='coveo-modalbox-left-header'>\n        <span class='coveo-modalbox-pop-up-reminder'> " + (title || '') + "</span>\n      </div>";
        return header;
    };
    DomUtils.getQuickviewHeader = function (result, options, bindings) {
        var date = '';
        if (options.showDate) {
            var dateValueFromResult = Utils_1.Utils.getFieldValue(result, 'date');
            if (dateValueFromResult) {
                date = DateUtils_1.DateUtils.dateTimeToString(new Date(dateValueFromResult));
            }
        }
        var fileType = FileTypes_1.FileTypes.get(result);
        var header = Dom_1.$$('div');
        header.el.innerHTML = "<div class='coveo-quickview-right-header'>\n        <span class='coveo-quickview-time'>" + date + "</span>\n        <span class='coveo-quickview-close-button'>\n          <span class='coveo-icon coveo-sprites-common-clear'></span>\n        </span>\n      </div>\n      <div class='coveo-quickview-left-header'>\n        <span class='coveo-quickview-icon coveo-small " + fileType.icon + "'></span>\n      </div>";
        var clickableLinkElement = Dom_1.$$('a', { className: 'coveo-quickview-pop-up-reminder' });
        var toLoad = Coveo['Salesforce'] ? 'SalesforceResultLink' : 'ResultLink';
        var resultForResultLink = __assign({}, result);
        if (options.title) {
            resultForResultLink.title = options.title;
        }
        DomUtils.loadResultLink(toLoad, clickableLinkElement, header, resultForResultLink, options);
        return header;
    };
    DomUtils.loadResultLink = function (toLoad, clickableLinkElement, header, resultForResultLink, options) {
        return __awaiter(this, void 0, void 0, function () {
            var err_1, logger;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        _a.trys.push([0, 2, , 3]);
                        return [4 /*yield*/, RegisteredNamedMethods_1.load(toLoad)];
                    case 1:
                        _a.sent();
                        clickableLinkElement.addClass("Coveo" + toLoad);
                        Core_1.Initialization.automaticallyCreateComponentsInsideResult(clickableLinkElement.el, resultForResultLink);
                        return [3 /*break*/, 3];
                    case 2:
                        err_1 = _a.sent();
                        logger = new Logger_1.Logger(this);
                        logger.error("Failed to load module " + toLoad + " : " + err_1);
                        logger.info("Fallback on displaying a non clickable header");
                        clickableLinkElement.text(options.title);
                        return [3 /*break*/, 3];
                    case 3:
                        Dom_1.$$(header.find('.coveo-quickview-left-header')).append(clickableLinkElement.el);
                        return [2 /*return*/];
                }
            });
        });
    };
    return DomUtils;
}());
exports.DomUtils = DomUtils;
 
 
/***/ }),
/* 138 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Utils_1 = __webpack_require__(5);
var Strings_1 = __webpack_require__(4);
var Assert_1 = __webpack_require__(12);
var underscore_1 = __webpack_require__(1);
// On-demand mapping of file types to captions. Used by facets, but I don't
// really like this. Maybe a dedicated filetype facet would be better? Hmm...
var fileTypeCaptions;
var FileTypes = /** @class */ (function () {
    function FileTypes() {
    }
    FileTypes.get = function (result) {
        var objecttype = Utils_1.Utils.getFieldValue(result, 'objecttype');
        var filetype = Utils_1.Utils.getFieldValue(result, 'filetype');
        // When @objecttype is File, Item, Document, or ContentVersion we fallback on @filetype for icons and such
        if (Utils_1.Utils.isNonEmptyString(objecttype) && !objecttype.match(/^(file|document|contentversion|item)$/i)) {
            return FileTypes.getObjectType(objecttype);
        }
        else if (Utils_1.Utils.isNonEmptyString(filetype)) {
            return FileTypes.getFileType(filetype);
        }
        else {
            return {
                // This will render a default icon. Really it should not happen.
                icon: 'coveo-icon filetype',
                caption: Strings_1.l('Unknown')
            };
        }
    };
    FileTypes.getObjectType = function (objecttype, fallbackOnLocalization) {
        if (fallbackOnLocalization === void 0) { fallbackOnLocalization = true; }
        // We must use lowercase filetypes because that's how the CSS classes
        // are generated (they are case sensitive, alas).
        var loweredCaseObjecttype = objecttype.toLowerCase();
        var variableValue = "objecttype_" + loweredCaseObjecttype;
        // Most object types have a set of localized strings in the main dictionary
        var localizedString = Strings_1.l(variableValue);
        // Some strings are sent as `objecttype_[...]` to specify a dictionary to use. If there's no match, try using
        // the main dictionary by using the original value.
        if (localizedString.toLowerCase() == variableValue.toLowerCase()) {
            localizedString = fallbackOnLocalization ? Strings_1.l(objecttype) : objecttype;
        }
        return this.safelyBuildFileTypeInfo('objecttype', loweredCaseObjecttype, localizedString);
    };
    FileTypes.getFileType = function (filetype, fallbackOnLocalization) {
        if (fallbackOnLocalization === void 0) { fallbackOnLocalization = true; }
        // We must use lowercase filetypes because that's how the CSS classes
        // are generated (they are case sensitive, alas).
        var loweredCaseFiletype = filetype.toLowerCase();
        // Sometimes, filetype begins with a period (typically means the index has
        // no idea and uses the file extension as a filetype).
        Iif (loweredCaseFiletype[0] == '.') {
            loweredCaseFiletype = loweredCaseFiletype.substring(1);
        }
        var variableValue = "filetype_" + loweredCaseFiletype;
        // Most filetypes have a set of localized strings in the main dictionary
        var localizedString = Strings_1.l(variableValue);
        if (localizedString.toLowerCase() == variableValue.toLowerCase()) {
            // Some strings are sent as `filetype_[...]` to specify a dictionary to use. If there's no match, try using
            // The main dictionary by using the original value.
            localizedString = fallbackOnLocalization ? Strings_1.l(filetype) : filetype;
        }
        return this.safelyBuildFileTypeInfo('filetype', loweredCaseFiletype, localizedString);
    };
    FileTypes.getFileTypeCaptions = function () {
        if (fileTypeCaptions == undefined) {
            fileTypeCaptions = {};
            var strings = String['locales'][String['locale'].toLowerCase()];
            Assert_1.Assert.isNotUndefined(strings);
            underscore_1.keys(strings).forEach(function (key) {
                if (key.indexOf('filetype_') == 0) {
                    fileTypeCaptions[key.substr('filetype_'.length)] = key.toLocaleString();
                }
                else if (key.indexOf('objecttype_') == 0) {
                    fileTypeCaptions[key.substr('objecttype_'.length)] = key.toLocaleString();
                }
            });
        }
        return fileTypeCaptions;
    };
    FileTypes.safelyBuildFileTypeInfo = function (fieldname, iconClass, caption) {
        return {
            icon: "coveo-icon " + fieldname + " " + underscore_1.escape(iconClass.replace(' ', '-')),
            caption: underscore_1.escape(caption)
        };
    };
    return FileTypes;
}());
exports.FileTypes = FileTypes;
 
 
/***/ }),
/* 139 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
var Options_1 = __webpack_require__(215);
var HighlightUtils_1 = __webpack_require__(82);
var StringUtils_1 = __webpack_require__(34);
var Utils_1 = __webpack_require__(5);
var Dom_1 = __webpack_require__(0);
var _ = __webpack_require__(1);
// \u2011: http://graphemica.com/%E2%80%91
// Used to split terms and phrases. Should match characters that can separate words.
var wordBoundary = "[\\.\\-\\u2011\\s~=,.\\|\\/:'`’;_()!?&+]";
var regexStart = '(' + wordBoundary + '|^)(';
var DefaultStreamHighlightOptions = /** @class */ (function (_super) {
    __extends(DefaultStreamHighlightOptions, _super);
    function DefaultStreamHighlightOptions(cssClass, shorten, regexFlags) {
        Eif (cssClass === void 0) { cssClass = 'coveo-highlight'; }
        Eif (shorten === void 0) { shorten = 0; }
        Eif (regexFlags === void 0) { regexFlags = 'gi'; }
        var _this = _super.call(this) || this;
        _this.cssClass = cssClass;
        _this.shorten = shorten;
        _this.regexFlags = regexFlags;
        return _this;
    }
    return DefaultStreamHighlightOptions;
}(Options_1.Options));
exports.DefaultStreamHighlightOptions = DefaultStreamHighlightOptions;
var StreamHighlightUtils = /** @class */ (function () {
    function StreamHighlightUtils() {
    }
    StreamHighlightUtils.highlightStreamHTML = function (stream, termsToHighlight, phrasesToHighlight, options) {
        var opts = new DefaultStreamHighlightOptions().merge(options);
        var container = createStreamHTMLContainer(stream);
        var allElements = Dom_1.$$(container).findAll('*');
        if (allElements.length > 0) {
            _.each(allElements, function (elem, i) {
                var text = Dom_1.$$(elem).text();
                elem.innerHTML = HighlightUtils_1.HighlightUtils.highlightString(text, getRestHighlightsForAllTerms(text, termsToHighlight, phrasesToHighlight, opts), [], opts.cssClass);
            });
        }
        else {
            return StreamHighlightUtils.highlightStreamText(stream, termsToHighlight, phrasesToHighlight, options);
        }
        return container.innerHTML;
    };
    StreamHighlightUtils.highlightStreamText = function (stream, termsToHighlight, phrasesToHighlight, options) {
        var opts = new DefaultStreamHighlightOptions().merge(options);
        return HighlightUtils_1.HighlightUtils.highlightString(stream, getRestHighlightsForAllTerms(stream, termsToHighlight, phrasesToHighlight, opts), [], opts.cssClass);
    };
    return StreamHighlightUtils;
}());
exports.StreamHighlightUtils = StreamHighlightUtils;
function getRestHighlightsForAllTerms(toHighlight, termsToHighlight, phrasesToHighlight, opts) {
    var indexes = [];
    var termsFromPhrases = _.chain(phrasesToHighlight).values().map(_.keys).flatten().value();
    _.each(termsToHighlight, function (terms, term) {
        var uniqueTermsToHighlight = _.chain([term])
            .concat(terms)
            .compact()
            .difference(termsFromPhrases)
            .map(Utils_1.Utils.escapeRegexCharacter)
            .sortBy('length')
            .value();
        if (uniqueTermsToHighlight.length === 0) {
            return;
        }
        var regex = "" + regexStart + uniqueTermsToHighlight.join('|') + ")(?=(?:" + wordBoundary + "|$)+)";
        var indexesFound = StringUtils_1.StringUtils.getHighlights(toHighlight, new RegExp(regex, opts.regexFlags), term);
        if (indexesFound != undefined && Utils_1.Utils.isNonEmptyArray(indexesFound)) {
            indexes.push(indexesFound);
        }
    });
    _.each(phrasesToHighlight, function (phrase, origPhrase) {
        var split = origPhrase.split(' ');
        var regex = regexStart;
        _.each(split, function (origWord, i) {
            regex += '(?:' + [origWord].concat(phrase[origWord]).join('|') + ')';
            if (i == split.length - 1) {
                regex += '(?=';
            }
            regex += wordBoundary;
            if (i == split.length - 1) {
                regex += '|$)';
            }
            if (i != split.length - 1) {
                regex += '+';
            }
        });
        regex += ')';
        var indexesFound = StringUtils_1.StringUtils.getHighlights(toHighlight, new RegExp(regex, opts.regexFlags), origPhrase);
        if (indexesFound != undefined && Utils_1.Utils.isNonEmptyArray(indexesFound)) {
            indexes.push(indexesFound);
        }
    });
    return _.chain(indexes)
        .flatten()
        .compact()
        .uniq(function (highlight) {
        return highlight.offset;
    })
        .sortBy(function (highlight) {
        return highlight.offset;
    })
        .map(function (highlight) {
        var keysFromTerms = _.keys(termsToHighlight);
        var keysFromPhrases = _.keys(phrasesToHighlight);
        var keys = keysFromTerms.concat(keysFromPhrases);
        var group = _.indexOf(keys, highlight.dataHighlightGroupTerm) + 1;
        return _.extend(highlight, { dataHighlightGroup: group });
    })
        .value();
}
exports.getRestHighlightsForAllTerms = getRestHighlightsForAllTerms;
function createStreamHTMLContainer(stream) {
    var container = Dom_1.$$('div').el;
    container.innerHTML = stream;
    return container;
}
 
 
/***/ }),
/* 140 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Dom_1 = __webpack_require__(0);
var DateUtils_1 = __webpack_require__(43);
var GlobalExports_1 = __webpack_require__(10);
var Strings_1 = __webpack_require__(4);
var Assert_1 = __webpack_require__(12);
var Globalize = __webpack_require__(28);
var Pikaday = __webpack_require__(1080);
/**
 * A date picker widget with standard styling.
 */
var DatePicker = /** @class */ (function () {
    /**
     * Creates a new `DatePicker`.
     * @param onChange The function to call when a new value is selected in the date picker. This function takes the
     * current `DatePicker` instance as an argument.
     */
    function DatePicker(onChange) {
        Iif (onChange === void 0) { onChange = function () { }; }
        this.onChange = onChange;
        this.wasReset = true;
        Assert_1.Assert.exists(onChange);
        this.buildContent();
    }
    /**
     * Resets the date picker.
     */
    DatePicker.prototype.reset = function () {
        this.picker.setDate(undefined);
        this.wasReset = true;
        this.onChange(this);
    };
    /**
     * Gets the element on which the date picker is bound.
     * @returns {HTMLInputElement} The date picker element.
     */
    DatePicker.prototype.getElement = function () {
        return this.element;
    };
    /**
     * Gets the currently selected value in the date picker.
     * @returns {string} A textual representation of the currently selected value (`YYYY-MM-DD` format).
     */
    DatePicker.prototype.getValue = function () {
        if (this.wasReset) {
            return '';
        }
        var date = this.picker.getDate();
        return date ? DateUtils_1.DateUtils.dateForQuery(this.picker.getDate()) : '';
    };
    /**
     * Get the currently selected value in the date picker, as a Date object
     * @returns {Date} A Date object for the current value, or null if the date picker was reset or a date has not been selected initially.
     */
    DatePicker.prototype.getDateValue = function () {
        if (this.wasReset) {
            return null;
        }
        return this.picker.getDate();
    };
    /**
     * Sets the date picker value.
     * @param date The value to set the date picker to. Must be a
     * [Date](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Date) object.
     */
    DatePicker.prototype.setValue = function (date) {
        Assert_1.Assert.exists(date);
        this.picker.setDate(date);
        this.wasReset = false;
    };
    /**
     * Gets the element on which the date picker is bound.
     * @returns {HTMLInputElement} The date picker element.
     */
    DatePicker.prototype.build = function () {
        return this.element;
    };
    DatePicker.prototype.buildContent = function () {
        var _this = this;
        this.element = Dom_1.$$('input', { className: 'coveo-button', 'aria-label': Strings_1.l('Date') }).el;
        this.element.readOnly = true;
        this.picker = new Pikaday({
            field: this.element,
            onSelect: function () {
                _this.wasReset = false;
                _this.onChange.call(_this, _this);
            },
            i18n: {
                previousMonth: Strings_1.l('PreviousMonth'),
                nextMonth: Strings_1.l('NextMonth'),
                months: Globalize.culture().calendar.months.names,
                weekdays: Globalize.culture().calendar.days.names,
                weekdaysShort: Globalize.culture().calendar.days.namesAbbr
            }
        });
    };
    DatePicker.doExport = function () {
        GlobalExports_1.exportGlobally({
            DatePicker: DatePicker
        });
    };
    return DatePicker;
}());
exports.DatePicker = DatePicker;
 
 
/***/ }),
/* 141 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Assert_1 = __webpack_require__(12);
var UnderscoreTemplate_1 = __webpack_require__(90);
var Utils_1 = __webpack_require__(5);
/**
 * Allow to register and return template helpers (essentially: Utility functions that can be executed in the context of a template to render complex elements).
 */
var TemplateHelpers = /** @class */ (function () {
    function TemplateHelpers() {
    }
    TemplateHelpers.registerFieldHelper = function (name, helper) {
        TemplateHelpers.fieldHelpers.push(name);
        TemplateHelpers.registerTemplateHelper(name, helper);
    };
    /**
     * Register a new helper in the framework, that will be available inside all templates execution context.
     * @param name
     * @param helper
     */
    TemplateHelpers.registerTemplateHelper = function (name, helper) {
        Assert_1.Assert.isNonEmptyString(name);
        Assert_1.Assert.exists(helper);
        TemplateHelpers.registerTemplateHelperInUnderscore(name, helper);
        TemplateHelpers.helpers[name] = helper;
    };
    /**
     * Return a template helper function
     * @param name
     * @returns {ITemplateHelperFunction}
     */
    TemplateHelpers.getHelper = function (name) {
        return Utils_1.Utils.getCaseInsensitiveProperty(TemplateHelpers.helpers, name);
    };
    /**
     * Get all available helpers
     */
    TemplateHelpers.getHelpers = function () {
        return TemplateHelpers.helpers;
    };
    TemplateHelpers.registerTemplateHelperInUnderscore = function (name, helper) {
        Assert_1.Assert.isNonEmptyString(name);
        Assert_1.Assert.exists(helper);
        UnderscoreTemplate_1.UnderscoreTemplate.registerTemplateHelper(name, helper);
    };
    TemplateHelpers.helpers = {};
    TemplateHelpers.fieldHelpers = [];
    return TemplateHelpers;
}());
exports.TemplateHelpers = TemplateHelpers;
 
 
/***/ }),
/* 142 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Dom_1 = __webpack_require__(0);
__webpack_require__(1085);
var GlobalExports_1 = __webpack_require__(10);
/**
 * A radio button widget with standard styling.
 */
var RadioButton = /** @class */ (function () {
    /**
     * Creates a new `RadioButton`.
     * @param onChange The function to call when the radio button value changes. This function takes the current
     * `RadioButton` instance as an argument.
     * @param label The label to display next to the radio button.
     * @param name The value to set the `input` HTMLElement `name` attribute to.
     */
    function RadioButton(onChange, label, name, id) {
        Iif (onChange === void 0) { onChange = function (radioButton) { }; }
        if (id === void 0) { id = label; }
        this.onChange = onChange;
        this.label = label;
        this.name = name;
        this.id = id;
        this.buildContent();
    }
    RadioButton.doExport = function () {
        GlobalExports_1.exportGlobally({
            RadioButton: RadioButton
        });
    };
    /**
     * Resets the radio button.
     */
    RadioButton.prototype.reset = function () {
        var currentlySelected = this.isSelected();
        this.getRadio().checked = false;
        if (currentlySelected) {
            this.onChange(this);
        }
    };
    /**
     * Select the radio button
     * @param triggerChange will trigger change event if specified and the radio button is not already selected
     */
    RadioButton.prototype.select = function (triggerChange) {
        if (triggerChange === void 0) { triggerChange = true; }
        var currentlySelected = this.isSelected();
        this.getRadio().checked = true;
        if (!currentlySelected && triggerChange) {
            this.onChange(this);
        }
    };
    /**
     * Gets the element on which the radio button is bound.
     * @returns {HTMLElement} The radio button element.
     */
    RadioButton.prototype.build = function () {
        return this.element;
    };
    /**
     * Gets the element on which the radio button is bound.
     * @returns {HTMLElement} The radio button element.
     */
    RadioButton.prototype.getElement = function () {
        return this.element;
    };
    RadioButton.prototype.getValue = function () {
        return this.label;
    };
    /**
     * Indicates whether the radio button is selected.
     * @returns {boolean} `true` if the radio button is selected, `false` otherwise.
     */
    RadioButton.prototype.isSelected = function () {
        return this.getRadio().checked;
    };
    /**
     * Gets the `input` element (the radio button itself).
     * @returns {HTMLInputElement} The `input` element.
     */
    RadioButton.prototype.getRadio = function () {
        return Dom_1.$$(this.element).find('input');
    };
    /**
     * Gets the radio button [`label`]{@link RadioButton.label} element.
     * @returns {HTMLLabelElement} The `label` element.
     */
    RadioButton.prototype.getLabel = function () {
        return Dom_1.$$(this.element).find('label');
    };
    RadioButton.prototype.buildContent = function () {
        var _this = this;
        var radioOption = Dom_1.$$('div', { className: 'coveo-radio' });
        var radioInput = Dom_1.$$('input', { type: 'radio', name: this.name, id: this.id });
        var labelInput = Dom_1.$$('label', { className: 'coveo-radio-input-label', for: this.id });
        labelInput.text(this.label);
        radioInput.on('change', function () {
            _this.onChange(_this);
        });
        radioOption.append(radioInput.el);
        radioOption.append(labelInput.el);
        this.element = radioOption.el;
    };
    return RadioButton;
}());
exports.RadioButton = RadioButton;
 
 
/***/ }),
/* 143 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var GlobalExports_1 = __webpack_require__(10);
var Strings_1 = __webpack_require__(4);
var Dom_1 = __webpack_require__(0);
var SVGDom_1 = __webpack_require__(23);
var SVGIcons_1 = __webpack_require__(16);
/**
 * A numeric spinner widget with standard styling.
 */
var NumericSpinner = /** @class */ (function () {
    /**
     * Creates a new `NumericSpinner`.
     * @param onChange The function to call when the numeric spinner value changes. This function takes the current
     * `NumericSpinner` instance as an argument.
     * @param min The minimum possible value of the numeric spinner.
     * @param max The maximum possible value of the numeric spinner.
     * @param label The label to use for the input for accessibility purposes.
     */
    function NumericSpinner(onChange, min, max, label) {
        if (onChange === void 0) { onChange = function (numericSpinner) { }; }
        if (min === void 0) { min = 0; }
        this.onChange = onChange;
        this.min = min;
        this.max = max;
        this.label = label;
        this.buildContent();
        this.bindEvents();
    }
    NumericSpinner.doExport = function () {
        GlobalExports_1.exportGlobally({
            NumericSpinner: NumericSpinner
        });
    };
    /**
     * Resets the numeric spinner.
     */
    NumericSpinner.prototype.reset = function () {
        this.getSpinnerInput().value = '';
        this.onChange(this);
    };
    /**
     * Gets the element on which the numeric spinner is bound.
     * @returns {HTMLInputElement} The numeric spinner element.
     */
    NumericSpinner.prototype.getElement = function () {
        return this.element;
    };
    /**
     * Gets the numeric spinner currently selected value (as a string).
     * @returns {string} The numeric spinner value.
     */
    NumericSpinner.prototype.getValue = function () {
        return this.getSpinnerInput().value;
    };
    /**
     * Gets the numeric spinner currently selected value (as an integer).
     * @returns {number} The numeric spinner value.
     */
    NumericSpinner.prototype.getIntValue = function () {
        return this.getSpinnerInput().value ? parseInt(this.getSpinnerInput().value, 10) : this.min;
    };
    /**
     * Gets the numeric spinner currently selected value (as a float).
     * @returns {number} The numeric spinner value.
     */
    NumericSpinner.prototype.getFloatValue = function () {
        return this.getSpinnerInput().value ? parseFloat(this.getSpinnerInput().value) : this.min;
    };
    /**
     * Sets the numeric spinner value.
     *
     * @param value The value to set the numeric spinner to. If `value` is greater than [`max`]{@link NumericSpinner.max},
     * this method sets the numeric spinner to its maximum value instead. Likewise, if value is lesser than
     * [`min`]{@link NumericSpinner.min}, the method sets the numeric spinner to its minimum value.
     */
    NumericSpinner.prototype.setValue = function (value) {
        if (this.max && value > this.max) {
            value = this.max;
        }
        if (value < this.min) {
            value = this.min;
        }
        this.getSpinnerInput().value = value.toString();
        this.onChange(this);
    };
    /**
     * Gets the element on which the numeric spinner is bound.
     * @returns {HTMLInputElement} The numeric spinner element.
     */
    NumericSpinner.prototype.build = function () {
        return this.element;
    };
    NumericSpinner.prototype.buildContent = function () {
        var numericSpinner = Dom_1.$$('div', { className: 'coveo-numeric-spinner' });
        var numberInput = Dom_1.$$('input', {
            className: 'coveo-number-input',
            type: 'text',
            'aria-label': this.label ? Strings_1.l(this.label) : ''
        });
        var addOn = Dom_1.$$('span', { className: 'coveo-add-on' });
        var arrowUp = Dom_1.$$('div', { className: 'coveo-spinner-up' }, SVGIcons_1.SVGIcons.icons.arrowUp);
        SVGDom_1.SVGDom.addClassToSVGInContainer(arrowUp.el, 'coveo-spinner-up-svg');
        var arrowDown = Dom_1.$$('div', { className: 'coveo-spinner-down' }, SVGIcons_1.SVGIcons.icons.arrowDown);
        SVGDom_1.SVGDom.addClassToSVGInContainer(arrowDown.el, 'coveo-spinner-down-svg');
        addOn.append(arrowUp.el);
        addOn.append(arrowDown.el);
        numericSpinner.append(numberInput.el);
        numericSpinner.append(addOn.el);
        this.element = numericSpinner.el;
    };
    NumericSpinner.prototype.bindEvents = function () {
        var _this = this;
        var up = Dom_1.$$(this.element).find('.coveo-spinner-up');
        Dom_1.$$(up).on('click', function () {
            _this.setValue(_this.getFloatValue() + 1);
        });
        var down = Dom_1.$$(this.element).find('.coveo-spinner-down');
        Dom_1.$$(down).on('click', function () {
            _this.setValue(_this.getFloatValue() - 1);
        });
        var numberInput = Dom_1.$$(this.element).find('input');
        Dom_1.$$(numberInput).on('input', function () {
            if (numberInput.value.match(/[0-9]*/)) {
                _this.onChange(_this);
            }
        });
    };
    NumericSpinner.prototype.getSpinnerInput = function () {
        return Dom_1.$$(this.element).find('.coveo-number-input');
    };
    return NumericSpinner;
}());
exports.NumericSpinner = NumericSpinner;
 
 
/***/ }),
/* 144 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __assign = (this && this.__assign) || Object.assign || function(t) {
    for (var s, i = 1, n = arguments.length; i < n; i++) {
        s = arguments[i];
        for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
            t[p] = s[p];
    }
    return t;
};
Object.defineProperty(exports, "__esModule", { value: true });
var ExternalModulesShim_1 = __webpack_require__(39);
var FocusTrap_1 = __webpack_require__(325);
var Strings_1 = __webpack_require__(4);
var Dom_1 = __webpack_require__(0);
var KeyboardUtils_1 = __webpack_require__(35);
var Core_1 = __webpack_require__(9);
var AccessibleModal = /** @class */ (function () {
    function AccessibleModal(className, ownerElement, modalboxModule, options) {
        Iif (modalboxModule === void 0) { modalboxModule = ExternalModulesShim_1.ModalBox; }
        if (options === void 0) { options = {}; }
        this.className = className;
        this.ownerElement = ownerElement;
        this.modalboxModule = modalboxModule;
        this.options = __assign({
            sizeMod: 'big'
        }, options);
    }
    Object.defineProperty(AccessibleModal.prototype, "isOpen", {
        get: function () {
            return !!this.focusTrap;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(AccessibleModal.prototype, "element", {
        get: function () {
            return this.activeModal && this.activeModal.modalBox;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(AccessibleModal.prototype, "content", {
        get: function () {
            return this.activeModal && this.activeModal.content;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(AccessibleModal.prototype, "wrapper", {
        get: function () {
            return this.activeModal && this.activeModal.wrapper;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(AccessibleModal.prototype, "headerElement", {
        get: function () {
            return this.element && this.element.querySelector('.coveo-modal-header h1');
        },
        enumerable: true,
        configurable: true
    });
    AccessibleModal.prototype.openResult = function (parameters) {
        Iif (this.isOpen) {
            return;
        }
        this.openModalAndTrap({
            content: parameters.content,
            validation: parameters.validation,
            origin: parameters.origin,
            title: Core_1.DomUtils.getQuickviewHeader(parameters.result, parameters.options, parameters.bindings).el
        });
        this.makeAccessible(parameters.options.title || parameters.result.title);
    };
    AccessibleModal.prototype.open = function (parameters) {
        Iif (this.isOpen) {
            return;
        }
        this.openModalAndTrap(parameters);
        this.makeAccessible();
    };
    AccessibleModal.prototype.openModalAndTrap = function (parameters) {
        var _this = this;
        this.initiallyFocusedElement = parameters.origin || document.activeElement;
        this.activeModal = this.modalboxModule.open(parameters.content, {
            title: parameters.title,
            className: this.className,
            validation: function () {
                _this.onModalClose();
                return parameters.validation();
            },
            body: this.ownerElement,
            sizeMod: this.options.sizeMod,
            overlayClose: this.options.overlayClose
        });
        this.focusTrap = new FocusTrap_1.FocusTrap(this.element);
    };
    AccessibleModal.prototype.close = function () {
        Iif (!this.isOpen) {
            return;
        }
        this.activeModal.close();
        this.activeModal = null;
    };
    AccessibleModal.prototype.makeAccessible = function (title) {
        this.element.setAttribute('aria-modal', 'true');
        if (title) {
            this.headerElement.setAttribute('aria-label', title);
        }
        this.makeCloseButtonAccessible();
        this.updateFocus();
    };
    Object.defineProperty(AccessibleModal.prototype, "closeButton", {
        get: function () {
            return this.element.querySelector('.coveo-small-close');
        },
        enumerable: true,
        configurable: true
    });
    AccessibleModal.prototype.makeCloseButtonAccessible = function () {
        var closeButton = this.closeButton;
        closeButton.setAttribute('aria-label', Strings_1.l('Close'));
        closeButton.setAttribute('role', 'button');
        closeButton.tabIndex = 0;
        Dom_1.$$(closeButton).on('keyup', KeyboardUtils_1.KeyboardUtils.keypressAction(KeyboardUtils_1.KEYBOARD.ENTER, function () { return closeButton.click(); }));
    };
    AccessibleModal.prototype.updateFocus = function () {
        var focusOnElement = (this.options.focusOnOpen && this.options.focusOnOpen()) || this.closeButton;
        focusOnElement.focus();
    };
    AccessibleModal.prototype.onModalClose = function () {
        this.focusTrap.disable();
        this.focusTrap = null;
        if (this.initiallyFocusedElement && document.body.contains(this.initiallyFocusedElement)) {
            this.initiallyFocusedElement.focus();
        }
    };
    return AccessibleModal;
}());
exports.AccessibleModal = AccessibleModal;
 
 
/***/ }),
/* 145 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var ChatterUtils = /** @class */ (function () {
    function ChatterUtils() {
    }
    ChatterUtils.buildURI = function (objectURI, objectId, newObjectId) {
        return objectURI.replace(objectId, newObjectId);
    };
    ChatterUtils.bindClickEventToElement = function (element, openInPrimaryTab, openInSubTab) {
        return element;
    };
    return ChatterUtils;
}());
exports.ChatterUtils = ChatterUtils;
 
 
/***/ }),
/* 146 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
var ResponsiveFacetColumn_1 = __webpack_require__(234);
var Facet_1 = __webpack_require__(32);
var ResponsiveFacets = /** @class */ (function (_super) {
    __extends(ResponsiveFacets, _super);
    function ResponsiveFacets() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    ResponsiveFacets.init = function (root, component, options) {
        ResponsiveFacetColumn_1.ResponsiveFacetColumn.init(ResponsiveFacets, root, component, options, Facet_1.Facet.ID);
    };
    return ResponsiveFacets;
}(ResponsiveFacetColumn_1.ResponsiveFacetColumn));
exports.ResponsiveFacets = ResponsiveFacets;
 
 
/***/ }),
/* 147 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
/// <reference path="Facet.ts" />
Object.defineProperty(exports, "__esModule", { value: true });
var Facet_1 = __webpack_require__(32);
var Dom_1 = __webpack_require__(0);
var Utils_1 = __webpack_require__(5);
var InitializationEvents_1 = __webpack_require__(22);
var FacetSearchParameters_1 = __webpack_require__(119);
var AnalyticsActionListMeta_1 = __webpack_require__(7);
var Strings_1 = __webpack_require__(4);
var Assert_1 = __webpack_require__(12);
var FacetValue_1 = __webpack_require__(51);
var StringUtils_1 = __webpack_require__(34);
var FacetValueElement_1 = __webpack_require__(186);
var ExternalModulesShim_1 = __webpack_require__(39);
var SearchInterface_1 = __webpack_require__(25);
var ResponsiveComponentsUtils_1 = __webpack_require__(93);
var FacetValuesOrder_1 = __webpack_require__(237);
__webpack_require__(1110);
var underscore_1 = __webpack_require__(1);
var FacetSearchElement_1 = __webpack_require__(330);
/**
 * Used by the {@link Facet} component to render and handle the facet search part of each facet.
 */
var FacetSearch = /** @class */ (function () {
    function FacetSearch(facet, facetSearchValuesListKlass, root) {
        var _this = this;
        this.facet = facet;
        this.facetSearchValuesListKlass = facetSearchValuesListKlass;
        this.root = root;
        this.moreValuesToFetch = true;
        this.lastSearchWasEmpty = true;
        this.facetSearchElement = new FacetSearchElement_1.FacetSearchElement(this);
        this.onResize = underscore_1.debounce(function () {
            // Mitigate issues in UT where the window in phantom js might get resized in the scope of another test.
            // These would point to random instance of a test karma object, and not a real search interface.
            if (_this.facet instanceof Facet_1.Facet && _this.facet.searchInterface instanceof SearchInterface_1.SearchInterface) {
                if (_this.shouldPositionSearchResults()) {
                    _this.positionSearchResults();
                }
            }
        }, 250);
        this.onDocumentClick = function (e) {
            _this.handleClickElsewhere(e);
        };
        window.addEventListener('resize', this.onResize);
        document.addEventListener('click', function (e) { return _this.onDocumentClick(e); });
        Dom_1.$$(facet.root).on(InitializationEvents_1.InitializationEvents.nuke, function () { return _this.handleNuke(); });
    }
    Object.defineProperty(FacetSearch.prototype, "facetType", {
        get: function () {
            return Facet_1.Facet.ID;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(FacetSearch.prototype, "facetTitle", {
        get: function () {
            return this.facet.options.title || this.facet.options.field.toString();
        },
        enumerable: true,
        configurable: true
    });
    /**
     * Build the search component and return an `HTMLElement` which can be appended to the {@link Facet}.
     * @returns {HTMLElement}
     */
    FacetSearch.prototype.build = function () {
        return this.buildBaseSearch();
    };
    /**
     * Position the search results at the footer of the facet.
     */
    FacetSearch.prototype.positionSearchResults = function () {
        this.facetSearchElement.positionSearchResults();
    };
    FacetSearch.prototype.fetchMoreValues = function () {
        this.triggerNewFacetSearch(this.buildParamsForFetchingMore());
    };
    /**
     * Dismiss the search results
     */
    FacetSearch.prototype.dismissSearchResults = function () {
        this.cancelAnyPendingSearchOperation();
        this.facet.unfadeInactiveValuesInMainList();
        Dom_1.$$(this.searchResults).empty();
        this.moreValuesToFetch = true;
        Dom_1.$$(this.search).removeClass('coveo-facet-search-no-results');
        Dom_1.$$(this.facet.element).removeClass('coveo-facet-searching');
        this.facetSearchElement.hideSearchResultsElement();
        this.input.value = '';
        Dom_1.$$(this.clear).hide();
        this.currentlyDisplayedResults = undefined;
    };
    /**
     * Trigger a new facet search, and display the results.
     * @param params
     */
    FacetSearch.prototype.triggerNewFacetSearch = function (params) {
        var _this = this;
        this.cancelAnyPendingSearchOperation();
        this.facetSearchElement.showFacetSearchWaitingAnimation();
        this.facet.logger.info('Triggering new facet search');
        this.facetSearchPromise = this.facet.facetQueryController.search(params);
        if (this.facetSearchPromise) {
            this.facetSearchPromise
                .then(function (fieldValues) {
                _this.facet.usageAnalytics.logCustomEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.facetSearch, {
                    facetId: _this.facet.options.id,
                    facetField: _this.facet.options.field.toString(),
                    facetTitle: _this.facet.options.title
                }, _this.facet.root);
                _this.facet.logger.debug('Received field values', fieldValues);
                _this.processNewFacetSearchResults(fieldValues, params);
                _this.facetSearchElement.hideFacetSearchWaitingAnimation();
                _this.facetSearchPromise = undefined;
            })
                .catch(function (error) {
                // The request might be normally cancelled if another search is triggered.
                // In this case we do not hide the animation to prevent flicking.
                Eif (Utils_1.Utils.exists(error)) {
                    _this.facet.logger.error('Error while retrieving facet values', error);
                    _this.facetSearchElement.hideFacetSearchWaitingAnimation();
                }
                _this.facetSearchPromise = undefined;
                return null;
            });
        }
    };
    /**
     * Trigger the event associated with the focus of the search input.
     */
    FacetSearch.prototype.focus = function () {
        this.facetSearchElement.focus();
    };
    Object.defineProperty(FacetSearch.prototype, "searchResults", {
        get: function () {
            return this.facetSearchElement.searchResults;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(FacetSearch.prototype, "searchBarIsAnimating", {
        get: function () {
            return this.facetSearchElement.searchBarIsAnimating;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(FacetSearch.prototype, "search", {
        get: function () {
            return this.facetSearchElement.search;
        },
        enumerable: true,
        configurable: true
    });
    FacetSearch.prototype.setExpandedFacetSearchAccessibilityAttributes = function (searchResultsElement) {
        this.facet.setExpandedFacetSearchAccessibilityAttributes(searchResultsElement);
    };
    FacetSearch.prototype.setCollapsedFacetSearchAccessibilityAttributes = function () {
        this.facet.setCollapsedFacetSearchAccessibilityAttributes();
    };
    FacetSearch.prototype.keyboardEventDefaultHandler = function () {
        this.moreValuesToFetch = true;
        this.highlightCurrentQueryWithinSearchResults();
        Iif (!this.inputIsEmpty()) {
            this.lastSearchWasEmpty = false;
            this.displayNewValues(this.buildParamsForNormalSearch());
        }
        else Iif (!this.lastSearchWasEmpty) {
            // This normally happen if a user delete the search box content to go back to "empty" state.
            this.currentlyDisplayedResults = undefined;
            Dom_1.$$(this.searchResults).empty();
            this.lastSearchWasEmpty = true;
            this.displayNewValues(this.buildParamsForFetchingMore());
        }
    };
    FacetSearch.prototype.keyboardNavigationEnterPressed = function (event) {
        Iif (event.shiftKey) {
            this.triggerNewFacetSearch(this.buildParamsForNormalSearch());
        }
        else {
            Eif (this.searchResults.style.display != 'none') {
                this.performActionOnCurrentSearchResult();
                this.dismissSearchResults();
            }
            else if (Dom_1.$$(this.search).is('.coveo-facet-search-no-results')) {
                this.selectAllValuesMatchingSearch();
            }
        }
    };
    FacetSearch.prototype.keyboardNavigationDeletePressed = function (event) {
        if (event.shiftKey) {
            this.performExcludeActionOnCurrentSearchResult();
            this.dismissSearchResults();
            this.input.value = '';
        }
    };
    FacetSearch.prototype.displayNewValues = function (params) {
        var _this = this;
        Eif (params === void 0) { params = this.buildParamsForExcludingCurrentlyDisplayedValues(); }
        this.cancelAnyPendingSearchOperation();
        this.facetSearchTimeout = window.setTimeout(function () {
            _this.triggerNewFacetSearch(params);
        }, this.facet.options.facetSearchDelay);
    };
    FacetSearch.prototype.getCaptions = function () {
        return Dom_1.$$(this.searchResults).findAll('.coveo-facet-value-caption');
    };
    FacetSearch.prototype.getValueInInputForFacetSearch = function () {
        return this.facetSearchElement.getValueInInputForFacetSearch();
    };
    FacetSearch.prototype.updateAriaLive = function (text) {
        this.facet.searchInterface.ariaLive.updateText(text);
    };
    Object.defineProperty(FacetSearch.prototype, "input", {
        get: function () {
            return this.facetSearchElement.input;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(FacetSearch.prototype, "clear", {
        get: function () {
            return this.facetSearchElement.clear;
        },
        enumerable: true,
        configurable: true
    });
    FacetSearch.prototype.shouldPositionSearchResults = function () {
        return !ResponsiveComponentsUtils_1.ResponsiveComponentsUtils.isSmallFacetActivated(Dom_1.$$(this.root)) && Dom_1.$$(this.facet.element).hasClass('coveo-facet-searching');
    };
    FacetSearch.prototype.buildBaseSearch = function () {
        var _this = this;
        this.facetSearchElement.build(function () { return _this.handleFacetSearchClear(); });
        Dom_1.$$(this.facetSearchElement.input).on('keyup', function () { return _this.showOrHideClearElement(); });
        return this.search;
    };
    FacetSearch.prototype.handleNuke = function () {
        window.removeEventListener('resize', this.onResize);
        document.removeEventListener('click', this.onDocumentClick);
    };
    FacetSearch.prototype.handleClickElsewhere = function (event) {
        if (this.currentlyDisplayedResults && this.search != event.target && this.searchResults != event.target && this.input != event.target) {
            this.dismissSearchResults();
        }
    };
    FacetSearch.prototype.handleFacetSearchClear = function () {
        this.input.value = '';
        Dom_1.$$(this.clear).hide();
        this.dismissSearchResults();
    };
    FacetSearch.prototype.showOrHideClearElement = function () {
        Iif (!this.inputIsEmpty()) {
            Dom_1.$$(this.clear).show();
        }
        else {
            Dom_1.$$(this.clear).hide();
            Dom_1.$$(this.search).removeClass('coveo-facet-search-no-results');
        }
    };
    FacetSearch.prototype.cancelAnyPendingSearchOperation = function () {
        if (Utils_1.Utils.exists(this.facetSearchTimeout)) {
            clearTimeout(this.facetSearchTimeout);
            this.facetSearchTimeout = undefined;
        }
        Iif (Utils_1.Utils.exists(this.facetSearchPromise)) {
            Promise.reject(this.facetSearchPromise).catch(function () { });
            this.facetSearchPromise = undefined;
        }
        this.facetSearchElement.hideFacetSearchWaitingAnimation();
    };
    FacetSearch.prototype.inputIsEmpty = function () {
        return this.input.value.trim() == '';
    };
    FacetSearch.prototype.processNewFacetSearchResults = function (fieldValues, facetSearchParameters) {
        Assert_1.Assert.exists(fieldValues);
        fieldValues = new FacetValuesOrder_1.FacetValuesOrder(this.facet, this.facet.facetSort).reorderValues(fieldValues);
        if (fieldValues.length > 0) {
            Dom_1.$$(this.search).removeClass('coveo-facet-search-no-results');
            this.facet.fadeInactiveValuesInMainList(this.facet.options.facetSearchDelay);
            this.rebuildSearchResults(fieldValues, facetSearchParameters);
            Eif (!facetSearchParameters.fetchMore) {
                this.showSearchResultsElement();
            }
            this.highlightCurrentQueryWithinSearchResults();
            this.makeFirstSearchResultTheCurrentOne();
            this.facetSearchElement.updateAriaLiveWithResults(this.input.value, this.currentlyDisplayedResults.length, this.moreValuesToFetch);
        }
        else {
            Iif (facetSearchParameters.fetchMore) {
                this.moreValuesToFetch = false;
            }
            else {
                Dom_1.$$(this.search).addClass('coveo-facet-search-no-results');
                this.showSearchResultsElement();
                this.facetSearchElement.emptyAndShowNoResults();
            }
        }
    };
    FacetSearch.prototype.rebuildSearchResults = function (fieldValues, facetSearchParameters) {
        var _this = this;
        Assert_1.Assert.exists(fieldValues);
        Eif (!facetSearchParameters.fetchMore) {
            Dom_1.$$(this.searchResults).empty();
        }
        var facetSearchHasQuery = Utils_1.Utils.isNonEmptyString(facetSearchParameters.valueToSearch);
        Iif (facetSearchHasQuery) {
            this.appendSelectAllResultsButton();
        }
        var facetValues = underscore_1.map(fieldValues, function (fieldValue) {
            return FacetValue_1.FacetValue.create(fieldValue);
        });
        underscore_1.each(new this.facetSearchValuesListKlass(this.facet, FacetValueElement_1.FacetValueElement).build(facetValues), function (listElement) {
            _this.facetSearchElement.appendToSearchResults(listElement);
        });
        Iif (this.currentlyDisplayedResults) {
            this.currentlyDisplayedResults = this.currentlyDisplayedResults.concat(underscore_1.pluck(facetValues, 'value'));
        }
        else {
            this.currentlyDisplayedResults = underscore_1.pluck(facetValues, 'value');
        }
        underscore_1.each(Dom_1.$$(this.searchResults).findAll('.coveo-facet-selectable'), function (elem, index) {
            Dom_1.$$(elem).setAttribute('id', "coveo-facet-search-" + _this.facet.options.id + "-suggestion-" + index);
            Dom_1.$$(elem).setAttribute('role', 'option');
            Dom_1.$$(elem).setAttribute('aria-selected', 'false');
            Dom_1.$$(elem).addClass('coveo-facet-search-selectable');
        });
    };
    FacetSearch.prototype.appendSelectAllResultsButton = function () {
        var _this = this;
        var selectAll = document.createElement('li');
        Dom_1.$$(selectAll).addClass(['coveo-facet-selectable', 'coveo-facet-search-selectable', 'coveo-facet-search-select-all']);
        Dom_1.$$(selectAll).text(Strings_1.l('SelectAll'));
        Dom_1.$$(selectAll).on('click', function () { return _this.selectAllValuesMatchingSearch(); });
        this.facetSearchElement.appendToSearchResults(selectAll);
    };
    FacetSearch.prototype.buildParamsForNormalSearch = function () {
        var params = new FacetSearchParameters_1.FacetSearchParameters(this.facet);
        params.setValueToSearch(this.getValueInInputForFacetSearch());
        params.fetchMore = false;
        return params;
    };
    FacetSearch.prototype.buildParamsForFetchingMore = function () {
        var params = this.buildParamsForExcludingCurrentlyDisplayedValues();
        params.fetchMore = true;
        return params;
    };
    FacetSearch.prototype.buildParamsForExcludingCurrentlyDisplayedValues = function () {
        var params = new FacetSearchParameters_1.FacetSearchParameters(this.facet);
        params.excludeCurrentlyDisplayedValuesInSearch(this.searchResults);
        params.setValueToSearch(this.getValueInInputForFacetSearch());
        return params;
    };
    FacetSearch.prototype.showSearchResultsElement = function () {
        this.positionSearchResults();
    };
    FacetSearch.prototype.highlightCurrentQueryWithinSearchResults = function () {
        var search = this.getValueInInputForFacetSearch();
        var regex = new RegExp('(' + StringUtils_1.StringUtils.wildcardsToRegex(search, this.facet.options.facetSearchIgnoreAccents) + ')', 'ig');
        this.facetSearchElement.highlightCurrentQueryInSearchResults(regex);
    };
    FacetSearch.prototype.makeFirstSearchResultTheCurrentOne = function () {
        this.facetSearchElement.setAsCurrentResult(Dom_1.$$(this.getSelectables()[0]));
    };
    FacetSearch.prototype.getSelectables = function (target) {
        Eif (target === void 0) { target = this.searchResults; }
        return Dom_1.$$(target).findAll('.coveo-facet-selectable');
    };
    FacetSearch.prototype.performActionOnCurrentSearchResult = function () {
        var current = Dom_1.$$(this.searchResults).find('.coveo-facet-search-current-result');
        Assert_1.Assert.check(current != undefined);
        var shouldExclude = Dom_1.$$(current).hasClass('coveo-facet-value-will-exclude');
        if (shouldExclude) {
            var excludeIcon = Dom_1.$$(current).find('.coveo-facet-value-exclude');
            excludeIcon.click();
            return;
        }
        var checkbox = Dom_1.$$(current).find('input[type="checkbox"]');
        Eif (checkbox) {
            checkbox.checked = true;
            Dom_1.$$(checkbox).trigger('change');
        }
        else {
            current.click();
        }
    };
    FacetSearch.prototype.performExcludeActionOnCurrentSearchResult = function () {
        var current = Dom_1.$$(this.searchResults).find('.coveo-facet-search-current-result');
        Assert_1.Assert.check(current != null);
        var valueCaption = Dom_1.$$(current).find('.coveo-facet-value-caption');
        var valueElement = this.facet.facetValuesList.get(Dom_1.$$(valueCaption).text());
        valueElement.toggleExcludeWithUA();
    };
    FacetSearch.prototype.selectAllValuesMatchingSearch = function () {
        var _this = this;
        this.facet.showWaitingAnimation();
        var searchParameters = new FacetSearchParameters_1.FacetSearchParameters(this.facet);
        searchParameters.nbResults = 1000;
        searchParameters.setValueToSearch(this.getValueInInputForFacetSearch());
        this.facet.facetQueryController.search(searchParameters).then(function (fieldValues) {
            _this.dismissSearchResults();
            ExternalModulesShim_1.ModalBox.close(true);
            var facetValues = underscore_1.map(fieldValues, function (fieldValue) {
                var facetValue = _this.facet.values.get(fieldValue.value);
                if (!Utils_1.Utils.exists(facetValue)) {
                    facetValue = FacetValue_1.FacetValue.create(fieldValue);
                }
                facetValue.selected = true;
                facetValue.excluded = false;
                return facetValue;
            });
            _this.facet.processFacetSearchAllResultsSelected(facetValues);
        });
        this.dismissSearchResults();
    };
    return FacetSearch;
}());
exports.FacetSearch = FacetSearch;
 
 
/***/ }),
/* 148 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony default export */ __webpack_exports__["a"] = (function(a, b) {
  return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN;
});
 
 
/***/ }),
/* 149 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__dispatch_js__ = __webpack_require__(1150);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_0__dispatch_js__["a"]; });
 
 
 
/***/ }),
/* 150 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["c"] = hue;
/* harmony export (immutable) */ __webpack_exports__["b"] = gamma;
/* harmony export (immutable) */ __webpack_exports__["a"] = nogamma;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__constant_js__ = __webpack_require__(720);
 
 
function linear(a, d) {
  return function(t) {
    return a + t * d;
  };
}
 
function exponential(a, b, y) {
  return a = Math.pow(a, y), b = Math.pow(b, y) - a, y = 1 / y, function(t) {
    return Math.pow(a + t * b, y);
  };
}
 
function hue(a, b) {
  var d = b - a;
  return d ? linear(a, d > 180 || d < -180 ? d - 360 * Math.round(d / 360) : d) : Object(__WEBPACK_IMPORTED_MODULE_0__constant_js__["a" /* default */])(isNaN(a) ? b : a);
}
 
function gamma(y) {
  return (y = +y) === 1 ? nogamma : function(a, b) {
    return b - a ? exponential(a, b, y) : Object(__WEBPACK_IMPORTED_MODULE_0__constant_js__["a" /* default */])(isNaN(a) ? b : a);
  };
}
 
function nogamma(a, b) {
  var d = b - a;
  return d ? linear(a, d) : Object(__WEBPACK_IMPORTED_MODULE_0__constant_js__["a" /* default */])(isNaN(a) ? b : a);
}
 
 
/***/ }),
/* 151 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony default export */ __webpack_exports__["a"] = (function(x) {
  return function() {
    return x;
  };
});
 
 
/***/ }),
/* 152 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
// Adds floating point numbers with twice the normal precision.
// Reference: J. R. Shewchuk, Adaptive Precision Floating-Point Arithmetic and
// Fast Robust Geometric Predicates, Discrete & Computational Geometry 18(3)
// 305–363 (1997).
// Code adapted from GeographicLib by Charles F. F. Karney,
// http://geographiclib.sourceforge.net/
 
/* harmony default export */ __webpack_exports__["a"] = (function() {
  return new Adder;
});
 
function Adder() {
  this.reset();
}
 
Adder.prototype = {
  constructor: Adder,
  reset: function() {
    this.s = // rounded value
    this.t = 0; // exact error
  },
  add: function(y) {
    add(temp, y, this.t);
    add(this, temp.s, this.s);
    if (this.s) this.t += temp.t;
    else this.s = temp.t;
  },
  valueOf: function() {
    return this.s;
  }
};
 
var temp = new Adder;
 
function add(adder, a, b) {
  var x = adder.s = a + b,
      bv = x - a,
      av = x - bv;
  adder.t = (a - av) + (b - bv);
}
 
 
/***/ }),
/* 153 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony default export */ __webpack_exports__["a"] = (function() {
  return Math.random();
});
 
 
/***/ }),
/* 154 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var ExpressionRef_1 = __webpack_require__(378);
var ExpressionOptions_1 = __webpack_require__(380);
var ExpressionRegExp_1 = __webpack_require__(381);
var _ = __webpack_require__(1);
var ExpressionFunction_1 = __webpack_require__(797);
var ExpressionConstant_1 = __webpack_require__(263);
var ExpressionList_1 = __webpack_require__(382);
var Grammar = /** @class */ (function () {
    function Grammar(start, expressions) {
        Iif (expressions === void 0) { expressions = {}; }
        this.expressions = {};
        this.start = new ExpressionRef_1.ExpressionRef(start, null, 'start', this);
        this.addExpressions(expressions);
    }
    Grammar.prototype.addExpressions = function (expressions) {
        var _this = this;
        _.each(expressions, function (basicExpression, id) {
            _this.addExpression(id, basicExpression);
        });
    };
    Grammar.prototype.addExpression = function (id, basicExpression) {
        Iif (id in this.expressions) {
            throw new Error('Grammar already contain the id:' + id);
        }
        this.expressions[id] = Grammar.buildExpression(basicExpression, id, this);
    };
    Grammar.prototype.getExpression = function (id) {
        return this.expressions[id];
    };
    Grammar.prototype.parse = function (value) {
        return this.start.parse(value, true);
    };
    Grammar.buildExpression = function (value, id, grammar) {
        var type = typeof value;
        Iif (type == 'undefined') {
            throw new Error('Invalid Expression: ' + value);
        }
        if (_.isString(value)) {
            return this.buildStringExpression(value, id, grammar);
        }
        if (_.isArray(value)) {
            return new ExpressionOptions_1.ExpressionOptions(_.map(value, function (v, i) { return new ExpressionRef_1.ExpressionRef(v, null, id + '_' + i, grammar); }), id);
        }
        if (_.isRegExp(value)) {
            return new ExpressionRegExp_1.ExpressionRegExp(value, id, grammar);
        }
        Eif (_.isFunction(value)) {
            return new ExpressionFunction_1.ExpressionFunction(value, id, grammar);
        }
        throw new Error('Invalid Expression: ' + value);
    };
    Grammar.buildStringExpression = function (value, id, grammar) {
        var matchs = Grammar.stringMatch(value, Grammar.spliter);
        var expressions = _.map(matchs, function (match, i) {
            if (match[1]) {
                // Ref
                var ref = match[1];
                var occurrence = match[3] ? Number(match[3]) : match[2] || null;
                return new ExpressionRef_1.ExpressionRef(ref, occurrence, id + '_' + i, grammar);
            }
            else {
                // Constant
                return new ExpressionConstant_1.ExpressionConstant(match[4], id + '_' + i);
            }
        });
        if (expressions.length == 1) {
            var expression = expressions[0];
            expression.id = id;
            return expression;
        }
        else {
            return new ExpressionList_1.ExpressionList(expressions, id);
        }
    };
    Grammar.stringMatch = function (str, re) {
        var groups = [];
        var cloneRegExp = new RegExp(re.source, 'g');
        var group = cloneRegExp.exec(str);
        while (group !== null) {
            groups.push(group);
            group = cloneRegExp.exec(str);
        }
        return groups;
    };
    Grammar.spliter = /\[(\w+)(\*|\+|\?|\{([1-9][0-9]*)\})?\]|(.[^\[]*)/;
    return Grammar;
}());
exports.Grammar = Grammar;
 
 
/***/ }),
/* 155 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
__webpack_require__(1534);
var Dom_1 = __webpack_require__(0);
var Strings_1 = __webpack_require__(4);
var SVGIcons_1 = __webpack_require__(16);
var SVGDom_1 = __webpack_require__(23);
var DynamicFacetHeaderButton_1 = __webpack_require__(398);
var DynamicFacetHeaderCollapseToggle_1 = __webpack_require__(840);
var AccessibilityUtils_1 = __webpack_require__(81);
function getDynamicFacetHeaderId(facetId) {
    return facetId + "-facet-heading";
}
exports.getDynamicFacetHeaderId = getDynamicFacetHeaderId;
var DynamicFacetHeader = /** @class */ (function () {
    function DynamicFacetHeader(options) {
        this.options = options;
        this.element = Dom_1.$$('div', { className: 'coveo-dynamic-facet-header' }).el;
        this.title = this.createTitle();
        Dom_1.$$(this.element).append(this.title.el);
        Dom_1.$$(this.element).append(this.createWaitAnimation());
        Dom_1.$$(this.element).append(this.createClearButton());
        this.options.enableCollapse && this.enableCollapse();
    }
    DynamicFacetHeader.prototype.createClearButton = function () {
        var _this = this;
        this.clearButton = new DynamicFacetHeaderButton_1.DynamicFacetHeaderButton({
            label: Strings_1.l('Clear'),
            ariaLabel: Strings_1.l('Clear', this.options.title),
            className: 'coveo-dynamic-facet-header-clear',
            shouldDisplay: false,
            action: function () { return _this.options.clear(); }
        });
        return this.clearButton.element;
    };
    DynamicFacetHeader.prototype.createCollapseToggle = function () {
        this.collapseToggle = new DynamicFacetHeaderCollapseToggle_1.DynamicFacetHeaderCollapseToggle(this.options);
        return this.collapseToggle.element;
    };
    DynamicFacetHeader.prototype.enableCollapse = function () {
        var _this = this;
        Dom_1.$$(this.element).append(this.createCollapseToggle());
        Dom_1.$$(this.title).addClass('coveo-clickable');
        Dom_1.$$(this.title).on('click', function () { return _this.options.toggleCollapse(); });
    };
    DynamicFacetHeader.prototype.toggleCollapse = function (isCollapsed) {
        this.options.enableCollapse && this.collapseToggle.toggleButton(isCollapsed);
    };
    DynamicFacetHeader.prototype.createTitle = function () {
        return Dom_1.$$(AccessibilityUtils_1.getHeadingTag(this.options.headingLevel), {
            className: 'coveo-dynamic-facet-header-title',
            ariaLabel: "" + Strings_1.l('FacetTitle', this.options.title),
            id: getDynamicFacetHeaderId(this.options.id)
        }, Dom_1.$$('span', { ariaHidden: true, title: this.options.title }, this.options.title));
    };
    DynamicFacetHeader.prototype.createWaitAnimation = function () {
        this.waitAnimation = Dom_1.$$('div', { className: 'coveo-dynamic-facet-header-wait-animation' }, SVGIcons_1.SVGIcons.icons.loading);
        SVGDom_1.SVGDom.addClassToSVGInContainer(this.waitAnimation.el, 'coveo-dynamic-facet-header-wait-animation-svg');
        this.waitAnimation.toggle(false);
        return this.waitAnimation.el;
    };
    DynamicFacetHeader.prototype.toggleClear = function (visible) {
        this.clearButton.toggle(visible);
    };
    DynamicFacetHeader.prototype.showLoading = function () {
        var _this = this;
        clearTimeout(this.showLoadingTimeout);
        this.showLoadingTimeout = window.setTimeout(function () { return _this.waitAnimation.toggle(true); }, DynamicFacetHeader.showLoadingDelay);
    };
    DynamicFacetHeader.prototype.hideLoading = function () {
        clearTimeout(this.showLoadingTimeout);
        this.waitAnimation.toggle(false);
    };
    DynamicFacetHeader.showLoadingDelay = 2000;
    return DynamicFacetHeader;
}());
exports.DynamicFacetHeader = DynamicFacetHeader;
 
 
/***/ }),
/* 156 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
/**
 * The allowed sort criteria for a Search API
 * [facet request]{@link IFacetRequest}.
 */
var FacetSortCriteria;
(function (FacetSortCriteria) {
    /**
     * Sort facet values in descending score order.
     *
     * Facet value scores are based on number of occurrences and position in the
     * ranked query result set.
     *
     * The Coveo Machine Learning dynamic navigation experience feature only
     * works with this sort criterion.
     */
    FacetSortCriteria["score"] = "score";
    /**
     * Sort facet values in ascending alphanumeric order.
     */
    FacetSortCriteria["alphanumeric"] = "alphanumeric";
    /**
     * Sort facet values in descending number of occurrences.
     */
    FacetSortCriteria["occurrences"] = "occurrences";
})(FacetSortCriteria = exports.FacetSortCriteria || (exports.FacetSortCriteria = {}));
function isFacetSortCriteria(sortCriteria) {
    return !!FacetSortCriteria[sortCriteria];
}
exports.isFacetSortCriteria = isFacetSortCriteria;
 
 
/***/ }),
/* 157 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __assign = (this && this.__assign) || Object.assign || function(t) {
    for (var s, i = 1, n = arguments.length; i < n; i++) {
        s = arguments[i];
        for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
            t[p] = s[p];
    }
    return t;
};
Object.defineProperty(exports, "__esModule", { value: true });
var Mock = __webpack_require__(2);
var DynamicFacetRange_1 = __webpack_require__(846);
var DynamicFacetValues_1 = __webpack_require__(202);
var DynamicFacetRangeValueCreator_1 = __webpack_require__(402);
var Core_1 = __webpack_require__(9);
var FacetValueState_1 = __webpack_require__(36);
var IDynamicFacetRange_1 = __webpack_require__(205);
var DynamicFacetRangeTestUtils = /** @class */ (function () {
    function DynamicFacetRangeTestUtils() {
    }
    DynamicFacetRangeTestUtils.allOptions = function (options) {
        return __assign({ field: '@dummy' }, options);
    };
    DynamicFacetRangeTestUtils.createFakeFacet = function (options) {
        var facet = Mock.mockComponent(DynamicFacetRange_1.DynamicFacetRange);
        facet.logger = Mock.mock(Core_1.Logger);
        facet.options = this.allOptions(__assign({ valueFormat: IDynamicFacetRange_1.DynamicFacetRangeValueFormat.number, valueSeparator: 'to' }, options));
        facet.values = new DynamicFacetValues_1.DynamicFacetValues(facet, DynamicFacetRangeValueCreator_1.DynamicFacetRangeValueCreator);
        facet.element = Core_1.$$('div').el;
        facet.searchInterface = Mock.mockSearchInterface();
        return facet;
    };
    DynamicFacetRangeTestUtils.createAdvancedFakeFacet = function (options, withQSM) {
        Eif (withQSM === void 0) { withQSM = true; }
        return Mock.advancedComponentSetup(DynamicFacetRange_1.DynamicFacetRange, {
            modifyBuilder: function (builder) {
                return withQSM ? builder.withLiveQueryStateModel() : builder;
            },
            cmpOptions: this.allOptions(options)
        });
    };
    DynamicFacetRangeTestUtils.createFakeRanges = function (count, step, endInclusive) {
        if (count === void 0) { count = 8; }
        Eif (step === void 0) { step = 100; }
        Eif (endInclusive === void 0) { endInclusive = false; }
        var ranges = [];
        for (var index = 0; index < count; index++) {
            ranges.push({
                start: step * index,
                end: step * (index + 1),
                endInclusive: endInclusive
            });
        }
        return ranges;
    };
    DynamicFacetRangeTestUtils.getCompleteFacetResponse = function (facet, partialResponse) {
        var facetValues = this.createFakeRanges().map(function (facetValue) { return (__assign({}, facetValue, { state: FacetValueState_1.FacetValueState.idle, numberOfResults: 10 })); });
        return __assign({ facetId: facet.options.id, field: facet.fieldName, values: facetValues, moreValuesAvailable: false }, partialResponse);
    };
    return DynamicFacetRangeTestUtils;
}());
exports.DynamicFacetRangeTestUtils = DynamicFacetRangeTestUtils;
 
 
/***/ }),
/* 158 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var underscore_1 = __webpack_require__(1);
function expectChildren(element, classNames) {
    expect(element.childNodes.length).toEqual(classNames.length, "Expected only " + classNames.length + " children.");
    return classNames.map(function (className, index) {
        var childAtIndex = element.childNodes.item(index);
        if (className) {
            expect(childAtIndex.classList).toContain(className, "Expected element at index " + index + " to contain class " + className + ".");
        }
        return childAtIndex;
    });
}
exports.expectChildren = expectChildren;
function expectEquivalentDOM(actual, expected, options) {
    var getAttributes = function (element) {
        var attributes = underscore_1.toArray(element.attributes).map(function (_a) {
            var name = _a.name, value = _a.value;
            return ({ name: name, value: value });
        });
        Eif (options) {
            Iif (options.ignoreAttributes === true) {
                attributes = [];
            }
            else Eif (Array.isArray(options.ignoreAttributes) && options.ignoreAttributes.length) {
                var attributesToIgnore_1 = options.ignoreAttributes;
                attributes = attributes.filter(function (attribute) { return attributesToIgnore_1.indexOf(attribute.name) === -1; });
            }
        }
        return attributes;
    };
    if (!options || !options.ignoreRoot) {
        Iif (expect(actual.tagName).toEqual(expected.tagName)) {
            return true;
        }
        Iif (expect(getAttributes(actual)).toEqual(getAttributes(expected))) {
            return true;
        }
    }
    var actualChildren = underscore_1.toArray(actual.children);
    var expectedChildren = underscore_1.toArray(expected.children);
    Iif (expect(actualChildren.length).toEqual(expectedChildren.length, actual.tagName + " is expected to have " + expectedChildren.length + " children but has " + actualChildren.length + ".")) {
        return true;
    }
    return actualChildren.some(function (actualChild, index) {
        return expectEquivalentDOM(actualChild, expectedChildren[index], {
            ignoreRoot: false,
            ignoreAttributes: options && options.ignoreAttributes
        });
    });
}
exports.expectEquivalentDOM = expectEquivalentDOM;
 
 
/***/ }),
/* 159 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return hasStringTagBug; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return isIE11; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__setup_js__ = __webpack_require__(30);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__hasObjectTag_js__ = __webpack_require__(878);
 
 
 
// In IE 10 - Edge 13, `DataView` has string tag `'[object Object]'`.
// In IE 11, the most common among them, this problem also applies to
// `Map`, `WeakMap` and `Set`.
var hasStringTagBug = (
      __WEBPACK_IMPORTED_MODULE_0__setup_js__["s" /* supportsDataView */] && Object(__WEBPACK_IMPORTED_MODULE_1__hasObjectTag_js__["a" /* default */])(new DataView(new ArrayBuffer(8)))
    ),
    isIE11 = (typeof Map !== 'undefined' && Object(__WEBPACK_IMPORTED_MODULE_1__hasObjectTag_js__["a" /* default */])(new Map));
 
 
/***/ }),
/* 160 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = allKeys;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isObject_js__ = __webpack_require__(105);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__setup_js__ = __webpack_require__(30);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__collectNonEnumProps_js__ = __webpack_require__(426);
 
 
 
 
// Retrieve all the enumerable property names of an object.
function allKeys(obj) {
  if (!Object(__WEBPACK_IMPORTED_MODULE_0__isObject_js__["a" /* default */])(obj)) return [];
  var keys = [];
  for (var key in obj) keys.push(key);
  // Ahem, IE < 9.
  Iif (__WEBPACK_IMPORTED_MODULE_1__setup_js__["h" /* hasEnumBug */]) Object(__WEBPACK_IMPORTED_MODULE_2__collectNonEnumProps_js__["a" /* default */])(obj, keys);
  return keys;
}
 
 
/***/ }),
/* 161 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = toPath;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__underscore_js__ = __webpack_require__(59);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__toPath_js__ = __webpack_require__(435);
 
 
 
// Internal wrapper for `_.toPath` to enable minification.
// Similar to `cb` for `_.iteratee`.
function toPath(path) {
  return __WEBPACK_IMPORTED_MODULE_0__underscore_js__["a" /* default */].toPath(path);
}
 
 
/***/ }),
/* 162 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = optimizeCb;
// Internal function that returns an efficient (for current engines) version
// of the passed-in callback, to be repeatedly applied in other Underscore
// functions.
function optimizeCb(func, context, argCount) {
  Eif (context === void 0) return func;
  switch (argCount == null ? 3 : argCount) {
    case 1: return function(value) {
      return func.call(context, value);
    };
    // The 2-argument case is omitted because we’re not using it.
    case 3: return function(value, index, collection) {
      return func.call(context, value, index, collection);
    };
    case 4: return function(accumulator, value, index, collection) {
      return func.call(context, accumulator, value, index, collection);
    };
  }
  return function() {
    return func.apply(context, arguments);
  };
}
 
 
/***/ }),
/* 163 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = filter;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__cb_js__ = __webpack_require__(53);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__each_js__ = __webpack_require__(107);
 
 
 
// Return all the elements that pass a truth test.
function filter(obj, predicate, context) {
  var results = [];
  predicate = Object(__WEBPACK_IMPORTED_MODULE_0__cb_js__["a" /* default */])(predicate, context);
  Object(__WEBPACK_IMPORTED_MODULE_1__each_js__["a" /* default */])(obj, function(value, index, list) {
    if (predicate(value, index, list)) results.push(value);
  });
  return results;
}
 
 
/***/ }),
/* 164 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = contains;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isArrayLike_js__ = __webpack_require__(60);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__values_js__ = __webpack_require__(129);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__indexOf_js__ = __webpack_require__(451);
 
 
 
 
// Determine if the array or object contains a given item (using `===`).
function contains(obj, item, fromIndex, guard) {
  Iif (!Object(__WEBPACK_IMPORTED_MODULE_0__isArrayLike_js__["a" /* default */])(obj)) obj = Object(__WEBPACK_IMPORTED_MODULE_1__values_js__["a" /* default */])(obj);
  Eif (typeof fromIndex != 'number' || guard) fromIndex = 0;
  return Object(__WEBPACK_IMPORTED_MODULE_2__indexOf_js__["a" /* default */])(obj, item, fromIndex) >= 0;
}
 
 
/***/ }),
/* 165 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Logger_1 = __webpack_require__(18);
var Assert_1 = __webpack_require__(12);
var TimeSpanUtils_1 = __webpack_require__(166);
var DeviceUtils_1 = __webpack_require__(42);
var Utils_1 = __webpack_require__(5);
var JQueryutils_1 = __webpack_require__(212);
var _ = __webpack_require__(1);
var UrlUtils_1 = __webpack_require__(108);
// In ie8, XMLHttpRequest has no status property, so let's use this enum instead
var XMLHttpRequestStatus;
(function (XMLHttpRequestStatus) {
    XMLHttpRequestStatus[XMLHttpRequestStatus["OPENED"] = XMLHttpRequest.OPENED || 1] = "OPENED";
    XMLHttpRequestStatus[XMLHttpRequestStatus["HEADERS_RECEIVED"] = XMLHttpRequest.HEADERS_RECEIVED || 2] = "HEADERS_RECEIVED";
    XMLHttpRequestStatus[XMLHttpRequestStatus["DONE"] = XMLHttpRequest.DONE || 4] = "DONE";
})(XMLHttpRequestStatus || (XMLHttpRequestStatus = {}));
/**
 * This class is in charge of calling an endpoint (eg: a {@link SearchEndpoint}).
 *
 * This means it's only uses to execute an XMLHttpRequest (for example), massage the response and check if there are errors.
 *
 * Will execute the call and return a Promise.
 *
 * Call using one of those options :
 *
 * * XMLHttpRequest for recent browser that support CORS, or if the endpoint is on the same origin.
 * * XDomainRequest for older IE browser that do not support CORS.
 * * Jsonp if all else fails, or is explicitly enabled.
 */
var EndpointCaller = /** @class */ (function () {
    /**
     * Create a new EndpointCaller.
     * @param options Specify the authentication that will be used for this endpoint. Not needed if the endpoint is public and has no authentication
     */
    function EndpointCaller(options) {
        if (options === void 0) { options = {}; }
        this.options = options;
        /**
         * Set this property to true to enable Jsonp call to the endpoint.<br/>
         * Be aware that jsonp is "easier" to setup endpoint wise, but has a lot of drawback and limitation for the client code.<br/>
         * Default to false.
         * @type {boolean}
         */
        this.useJsonp = false;
        this.logger = new Logger_1.Logger(this);
    }
    EndpointCaller.convertJsonToQueryString = function (json) {
        Assert_1.Assert.exists(json);
        return _.chain(json)
            .map(function (value, key) {
            if (value != null) {
                var stringValue = _.isObject(value) ? JSON.stringify(value) : value.toString();
                return key + "=" + Utils_1.Utils.safeEncodeURIComponent(stringValue);
            }
            return null;
        })
            .compact()
            .value();
    };
    EndpointCaller.convertJsonToFormBody = function (json) {
        return this.convertJsonToQueryString(json).join('&');
    };
    /**
     * Generic call to the endpoint using the provided {@link IEndpointCallParameters}.<br/>
     * Internally, will decide which method to use to call the endpoint :<br/>
     * -- XMLHttpRequest for recent browser that support CORS, or if the endpoint is on the same origin.<br/>
     * -- XDomainRequest for older IE browser that do not support CORS.<br/>
     * -- Jsonp if all else fails, or is explicitly enabled.
     * @param params The parameters to use for the call
     * @returns {any} A promise of the given type
     */
    EndpointCaller.prototype.call = function (params) {
        var requestInfo = {
            url: params.url,
            queryString: params.errorsAsSuccess ? params.queryString.concat(['errorsAsSuccess=1']) : params.queryString,
            requestData: params.requestData,
            requestDataType: params.requestDataType || 'application/x-www-form-urlencoded; charset=UTF-8',
            begun: new Date(),
            method: params.method
        };
        requestInfo.headers = this.buildRequestHeaders(requestInfo);
        if (_.isFunction(this.options.requestModifier)) {
            requestInfo = this.options.requestModifier(requestInfo);
        }
        this.logger.trace('Performing REST request', requestInfo);
        var urlObject = this.parseURL(requestInfo.url);
        // In IE8, hostname and port return "" when we are on the same domain.
        var isLocalHost = window.location.hostname === urlObject.hostname || urlObject.hostname === '';
        var currentPort = window.location.port != '' ? window.location.port : window.location.protocol == 'https:' ? '443' : '80';
        var isSamePort = currentPort == urlObject.port;
        var isCrossOrigin = !(isLocalHost && isSamePort);
        Eif (!this.useJsonp) {
            Eif (this.isCORSSupported() || !isCrossOrigin) {
                return this.callUsingXMLHttpRequest(requestInfo, params.responseType);
            }
            else if (this.isXDomainRequestSupported()) {
                return this.callUsingXDomainRequest(requestInfo);
            }
            else {
                return this.callUsingAjaxJsonP(requestInfo);
            }
        }
        else {
            return this.callUsingAjaxJsonP(requestInfo);
        }
    };
    /**
     * Call the endpoint using XMLHttpRequest. Used internally by {@link EndpointCaller.call}.<br/>
     * Will try internally to handle error if it can.<br/>
     * Promise will otherwise fail with the error type.
     * @param requestInfo The info about the request
     * @param responseType The responseType. Default to text. https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/responseType
     * @returns {Promise<T>|Promise}
     */
    EndpointCaller.prototype.callUsingXMLHttpRequest = function (requestInfo, responseType) {
        var _this = this;
        Iif (responseType === void 0) { responseType = 'text'; }
        return new Promise(function (resolve, reject) {
            var xmlHttpRequest = _this.getXmlHttpRequest();
            // Beware, most stuff must be set on the event that says the request is OPENED.
            // Otherwise it'll bork on some browsers. Gotta love standards.
            // This sent variable allowed to remove the second call of onreadystatechange with the state OPENED in IE11
            var sent = false;
            xmlHttpRequest.onreadystatechange = function (ev) {
                if (xmlHttpRequest.readyState == XMLHttpRequestStatus.OPENED && !sent) {
                    sent = true;
                    xmlHttpRequest.withCredentials = !_this.options.anonymous;
                    _.each(requestInfo.headers, function (headerValue, headerKey) {
                        xmlHttpRequest.setRequestHeader(headerKey, headerValue);
                    });
                    if (requestInfo.method == 'GET') {
                        xmlHttpRequest.send();
                    }
                    else if (requestInfo.requestDataType.indexOf('application/json') === 0) {
                        xmlHttpRequest.send(JSON.stringify(requestInfo.requestData));
                    }
                    else {
                        xmlHttpRequest.send(EndpointCaller.convertJsonToFormBody(requestInfo.requestData));
                    }
                    // The "responseType" varies if the request is a success or not.
                    // Therefore we postpone setting "responseType" until we know if the
                    // request is a success or not. Doing so, we avoid this potential
                    // error in Chrome:
                    //
                    //   Uncaught InvalidStateError: Failed to read the 'responseText'
                    //   property from 'XMLHttpRequest': The value is only accessible if
                    //   the object's 'responseType' is '' or 'text' (was 'document').
                    //
                }
                else if (xmlHttpRequest.readyState == XMLHttpRequestStatus.HEADERS_RECEIVED) {
                    var status_1 = xmlHttpRequest.status;
                    if (_this.isSuccessHttpStatus(status_1)) {
                        xmlHttpRequest.responseType = responseType;
                    }
                    else {
                        xmlHttpRequest.responseType = 'text';
                    }
                }
                else if (xmlHttpRequest.readyState == XMLHttpRequestStatus.DONE) {
                    var status_2 = xmlHttpRequest.status;
                    var data = void 0;
                    switch (responseType) {
                        case 'json':
                            data = xmlHttpRequest.response;
                            // Work around a bug in IE11 where responseType jsonis not supported : the response comes back as a plain string
                            // Force the json parse manually
                            Iif (responseType == 'json' && DeviceUtils_1.DeviceUtils.getDeviceName() == 'IE') {
                                try {
                                    data = JSON.parse(data);
                                }
                                catch (e) {
                                    // Do nothing, it probably means the data was JSON already
                                }
                            }
                            break;
                        case 'text':
                            data = _this.tryParseResponseText(xmlHttpRequest.responseText, xmlHttpRequest.getResponseHeader('Content-Type'));
                            break;
                        default:
                            data = xmlHttpRequest.response;
                            break;
                    }
                    if (data == undefined) {
                        data = _this.tryParseResponseText(xmlHttpRequest.responseText, xmlHttpRequest.getResponseHeader('Content-Type'));
                    }
                    if (_this.isSuccessHttpStatus(status_2)) {
                        _this.handleSuccessfulResponseThatMightBeAnError(requestInfo, data, resolve, reject);
                    }
                    else {
                        _this.handleError(requestInfo, xmlHttpRequest.status, data, reject);
                    }
                }
            };
            var queryString = requestInfo.queryString;
            if (requestInfo.method == 'GET') {
                queryString = queryString.concat(EndpointCaller.convertJsonToQueryString(requestInfo.requestData));
            }
            xmlHttpRequest.open(requestInfo.method, _this.combineUrlAndQueryString(requestInfo.url, queryString));
        });
    };
    /**
     * Call the endpoint using XDomainRequest https://msdn.microsoft.com/en-us/library/cc288060(v=vs.85).aspx<br/>
     * Used for IE8/9
     * @param requestInfo The info about the request
     * @returns {Promise<T>|Promise}
     */
    EndpointCaller.prototype.callUsingXDomainRequest = function (requestInfo) {
        var _this = this;
        return new Promise(function (resolve, reject) {
            var queryString = requestInfo.queryString.concat([]);
            // XDomainRequest don't support including stuff in the header, so we must
            // put the access token in the query string if we have one.
            if (_this.options.accessToken) {
                queryString.push('access_token=' + Utils_1.Utils.safeEncodeURIComponent(_this.options.accessToken));
            }
            var xDomainRequest = new XDomainRequest();
            if (requestInfo.method == 'GET') {
                queryString = queryString.concat(EndpointCaller.convertJsonToQueryString(requestInfo.requestData));
            }
            xDomainRequest.open(requestInfo.method, _this.combineUrlAndQueryString(requestInfo.url, queryString));
            xDomainRequest.onload = function () {
                var data = _this.tryParseResponseText(xDomainRequest.responseText, xDomainRequest.contentType);
                _this.handleSuccessfulResponseThatMightBeAnError(requestInfo, data, resolve, reject);
            };
            xDomainRequest.onerror = function () {
                var data = _this.tryParseResponseText(xDomainRequest.responseText, xDomainRequest.contentType);
                _this.handleError(requestInfo, 0, data, reject);
            };
            // We must set those functions otherwise it will sometime fail in IE
            xDomainRequest.ontimeout = function () { return _this.logger.error('Request timeout', xDomainRequest, requestInfo.requestData); };
            xDomainRequest.onprogress = function () { return _this.logger.trace('Request progress', xDomainRequest, requestInfo.requestData); };
            // We must open the request in a separate thread, for obscure reasons
            _.defer(function () {
                if (requestInfo.method == 'GET') {
                    xDomainRequest.send();
                }
                else {
                    xDomainRequest.send(EndpointCaller.convertJsonToFormBody(requestInfo.requestData));
                }
            });
        });
    };
    /**
     * Call the endpoint using Jsonp https://en.wikipedia.org/wiki/JSONP<br/>
     * Should be used for dev only, or for very special setup as using jsonp has a lot of drawbacks.
     * @param requestInfo The info about the request
     * @returns {Promise<T>|Promise}
     */
    EndpointCaller.prototype.callUsingAjaxJsonP = function (requestInfo) {
        var _this = this;
        var jQuery = JQueryutils_1.JQueryUtils.getJQuery();
        Assert_1.Assert.check(jQuery, 'Using jsonp without having included jQuery is not supported.');
        return new Promise(function (resolve, reject) {
            var queryString = requestInfo.queryString.concat(EndpointCaller.convertJsonToQueryString(requestInfo.requestData));
            // JSONP don't support including stuff in the header, so we must
            // put the access token in the query string if we have one.
            if (_this.options.accessToken) {
                queryString.push('access_token=' + Utils_1.Utils.safeEncodeURIComponent(_this.options.accessToken));
            }
            queryString.push('callback=?');
            jQuery.ajax({
                url: _this.combineUrlAndQueryString(requestInfo.url, queryString),
                dataType: 'jsonp',
                success: function (data) { return _this.handleSuccessfulResponseThatMightBeAnError(requestInfo, data, resolve, reject); },
                timeout: EndpointCaller.JSONP_ERROR_TIMEOUT,
                error: function () { return _this.handleError(requestInfo, 0, undefined, reject); }
            });
        });
    };
    EndpointCaller.prototype.parseURL = function (url) {
        var urlObject = document.createElement('a');
        urlObject.href = url;
        return urlObject;
    };
    EndpointCaller.prototype.getXmlHttpRequest = function () {
        var newXmlHttpRequest = this.options.xmlHttpRequest || XMLHttpRequest;
        return new newXmlHttpRequest();
    };
    EndpointCaller.prototype.handleSuccessfulResponseThatMightBeAnError = function (requestInfo, data, success, error) {
        if (this.isErrorResponseBody(data)) {
            this.handleError(requestInfo, data.statusCode, data, error);
        }
        else {
            this.handleSuccess(requestInfo, data, success);
        }
    };
    EndpointCaller.prototype.handleSuccess = function (requestInfo, data, success) {
        var querySuccess = {
            duration: TimeSpanUtils_1.TimeSpan.fromDates(requestInfo.begun, new Date()).getMilliseconds(),
            data: data
        };
        this.logger.trace('REST request successful', data, requestInfo);
        success(querySuccess);
    };
    EndpointCaller.prototype.handleError = function (requestInfo, status, data, error) {
        var queryError = {
            statusCode: status,
            data: data
        };
        this.logger.error('REST request failed', status, data, requestInfo);
        error(queryError);
    };
    EndpointCaller.prototype.combineUrlAndQueryString = function (url, queryString) {
        return UrlUtils_1.UrlUtils.normalizeAsString({
            paths: [url],
            queryAsString: queryString
        });
    };
    EndpointCaller.prototype.isXDomainRequestSupported = function () {
        return 'XDomainRequest' in window;
    };
    EndpointCaller.prototype.isCORSSupported = function () {
        return 'withCredentials' in this.getXmlHttpRequest();
    };
    EndpointCaller.prototype.isSuccessHttpStatus = function (status) {
        return (status >= 200 && status < 300) || status === 304;
    };
    EndpointCaller.prototype.tryParseResponseText = function (json, contentType) {
        if (contentType != null && contentType.indexOf('application/json') != -1) {
            if (Utils_1.Utils.isNonEmptyString(json)) {
                try {
                    return JSON.parse(json);
                }
                catch (ex) {
                    return undefined;
                }
            }
            else {
                return undefined;
            }
        }
        else {
            return json;
        }
    };
    EndpointCaller.prototype.isErrorResponseBody = function (data) {
        if (data && data.statusCode) {
            return !this.isSuccessHttpStatus(data.statusCode);
        }
        else {
            return false;
        }
    };
    EndpointCaller.prototype.buildRequestHeaders = function (requestInfo) {
        var headers = {};
        if (this.options.accessToken) {
            headers['Authorization'] = "Bearer " + this.options.accessToken;
        }
        else if (this.options.username && this.options.password) {
            headers['Authorization'] = "Basic " + btoa(this.options.username + ':' + this.options.password);
        }
        if (requestInfo.method == 'GET') {
            return headers;
        }
        if (requestInfo.requestDataType.indexOf('application/json') === 0) {
            headers['Content-Type'] = 'application/json; charset=UTF-8';
        }
        else {
            headers['Content-Type'] = 'application/x-www-form-urlencoded; charset=UTF-8';
        }
        return headers;
    };
    EndpointCaller.JSONP_ERROR_TIMEOUT = 10000;
    return EndpointCaller;
}());
exports.EndpointCaller = EndpointCaller;
 
 
/***/ }),
/* 166 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Assert_1 = __webpack_require__(12);
var TimeSpan = /** @class */ (function () {
    function TimeSpan(time, isMilliseconds) {
        if (isMilliseconds === void 0) { isMilliseconds = true; }
        if (isMilliseconds) {
            this.milliseconds = time;
        }
        else {
            this.milliseconds = time * 1000;
        }
    }
    TimeSpan.prototype.getMilliseconds = function () {
        return this.milliseconds;
    };
    TimeSpan.prototype.getSeconds = function () {
        return this.getMilliseconds() / 1000;
    };
    TimeSpan.prototype.getMinutes = function () {
        return this.getSeconds() / 60;
    };
    TimeSpan.prototype.getHours = function () {
        return this.getMinutes() / 60;
    };
    TimeSpan.prototype.getDays = function () {
        return this.getHours() / 24;
    };
    TimeSpan.prototype.getWeeks = function () {
        return this.getDays() / 7;
    };
    TimeSpan.prototype.getHHMMSS = function () {
        var hours = Math.floor(this.getHours());
        var minutes = Math.floor(this.getMinutes()) % 60;
        var seconds = Math.floor(this.getSeconds()) % 60;
        var hoursString, minutesString, secondsString;
        Eif (hours == 0) {
            hoursString = '';
        }
        else {
            hoursString = hours < 10 ? '0' + hours.toString() : hours.toString();
        }
        minutesString = minutes < 10 ? '0' + minutes.toString() : minutes.toString();
        secondsString = seconds < 10 ? '0' + seconds.toString() : seconds.toString();
        var hhmmss = (hoursString != '' ? hoursString + ':' : '') + minutesString + ':' + secondsString;
        return hhmmss;
    };
    TimeSpan.fromDates = function (from, to) {
        Assert_1.Assert.exists(from);
        Assert_1.Assert.exists(to);
        return new TimeSpan(to.valueOf() - from.valueOf());
    };
    return TimeSpan;
}());
exports.TimeSpan = TimeSpan;
 
 
/***/ }),
/* 167 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { Iif (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        Iif (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            Iif (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
            Iif (y = 0, t) op = [0, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    Iif (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    Iif (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    Iif (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        Iif (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
Object.defineProperty(exports, "__esModule", { value: true });
var Logger_1 = __webpack_require__(18);
var underscore_1 = __webpack_require__(1);
var ACCESS_TOKEN_ERRORS;
(function (ACCESS_TOKEN_ERRORS) {
    ACCESS_TOKEN_ERRORS["NO_RENEW_FUNCTION"] = "NO_RENEW_FUNCTION";
    ACCESS_TOKEN_ERRORS["REPEATED_FAILURES"] = "REPEATED_FAILURES";
})(ACCESS_TOKEN_ERRORS = exports.ACCESS_TOKEN_ERRORS || (exports.ACCESS_TOKEN_ERRORS = {}));
var AccessToken = /** @class */ (function () {
    function AccessToken(token, renew) {
        var _this = this;
        this.token = token;
        this.renew = renew;
        this.subscribers = [];
        this.logger = new Logger_1.Logger(this);
        this.triedRenewals = 0;
        this.resetRenewalTriesAfterDelay = underscore_1.debounce(function () {
            _this.triedRenewals = 0;
        }, 500, false);
    }
    AccessToken.prototype.updateToken = function (token) {
        this.token = token;
        this.notifySubscribers();
    };
    AccessToken.prototype.doRenew = function (onError) {
        return __awaiter(this, void 0, void 0, function () {
            var _a, err_1;
            return __generator(this, function (_b) {
                switch (_b.label) {
                    case 0:
                        this.triedRenewals++;
                        this.resetRenewalTriesAfterDelay();
                        _b.label = 1;
                    case 1:
                        _b.trys.push([1, 3, , 4]);
                        this.verifyRenewSetup();
                        this.logger.info('Renewing expired access token');
                        _a = this;
                        return [4 /*yield*/, this.renew()];
                    case 2:
                        _a.token = _b.sent();
                        this.logger.info('Access token renewed', this.token);
                        this.notifySubscribers();
                        return [2 /*return*/, true];
                    case 3:
                        err_1 = _b.sent();
                        switch (err_1.message) {
                            case ACCESS_TOKEN_ERRORS.REPEATED_FAILURES:
                                this.logger.error('AccessToken tried to renew itself extremely fast in a short period of time');
                                this.logger.error('There is most probably an authentication error, or a bad implementation of the custom renew function');
                                this.logger.error('Inspect the developer console of your browser to find out the root cause');
                                break;
                            case ACCESS_TOKEN_ERRORS.NO_RENEW_FUNCTION:
                                this.logger.error("AccessToken tried to renew, but no function is configured on initialization to provide acess token renewal");
                                this.logger.error('The option name is renewAccessToken on the SearchEndpoint class');
                                break;
                        }
                        this.logger.error('Failed to renew access token', err_1);
                        if (onError) {
                            onError(err_1);
                        }
                        return [2 /*return*/, false];
                    case 4: return [2 /*return*/];
                }
            });
        });
    };
    AccessToken.prototype.subscribeToRenewal = function (onTokenRefreshed) {
        this.subscribers.push(onTokenRefreshed);
    };
    AccessToken.prototype.verifyRenewSetup = function () {
        if (this.renew == null) {
            throw new Error(ACCESS_TOKEN_ERRORS.NO_RENEW_FUNCTION);
        }
        if (this.triedRenewals >= 5) {
            throw new Error(ACCESS_TOKEN_ERRORS.REPEATED_FAILURES);
        }
    };
    AccessToken.prototype.notifySubscribers = function () {
        var _this = this;
        this.subscribers.forEach(function (subscriber) { return subscriber(_this.token); });
    };
    return AccessToken;
}());
exports.AccessToken = AccessToken;
 
 
/***/ }),
/* 168 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
// Code originally taken from : https://developers.livechatinc.com/blog/setting-cookies-to-subdomains-in-javascript/
var Cookie = /** @class */ (function () {
    function Cookie() {
    }
    Cookie.set = function (name, value, expiration) {
        var host = location.hostname;
        Eif (host.split('.').length === 1) {
            // no '.' in a domain - it's localhost or something similar
            document.cookie = this.buildCookie(name, value, expiration);
        }
        else {
            // Remember the cookie on all subdomains.
            //
            // Start with trying to set cookie to the top domain.
            // (example: if user is on foo.com, try to set
            //  cookie to domain '.com')
            //
            // If the cookie will not be set, it means '.com'
            // is a top level domain and we need to
            // set the cookie to '.foo.com'
            var domainParts = host.split('.');
            domainParts.shift();
            var domain = '.' + domainParts.join('.');
            document.cookie = this.buildCookie(name, value, expiration, domain);
            // check if cookie was successfuly set to the given domain
            // (otherwise it was a Top-Level Domain)
            if (Cookie.get(name) == null || Cookie.get(name) != value) {
                // append '.' to current domain
                domain = '.' + host;
                document.cookie = this.buildCookie(name, value, expiration, domain);
            }
        }
    };
    Cookie.buildCookie = function (name, value, expiration, domain) {
        var expires = expiration ? this.buildExpiresValue(expiration) : '';
        var domainCookie = domain ? "; domain=" + domain : '';
        return "" + this.prefix + name + "=" + value + expires + domainCookie + "; SameSite=Lax; path=/";
    };
    Cookie.buildExpiresValue = function (expiration) {
        return "; expires=" + new Date(Date.now() + expiration).toUTCString();
    };
    Cookie.get = function (name) {
        var nameEQ = "" + this.prefix + name + "=";
        var ca = document.cookie.split(';');
        for (var i = 0; i < ca.length; i++) {
            var c = ca[i];
            while (c.charAt(0) === ' ') {
                c = c.substring(1, c.length);
            }
            if (c.indexOf(nameEQ) == 0) {
                return c.substring(nameEQ.length, c.length);
            }
        }
        return null;
    };
    Cookie.erase = function (name) {
        Cookie.set(name, '', -1);
    };
    Cookie.prefix = 'coveo_';
    return Cookie;
}());
exports.Cookie = Cookie;
 
 
/***/ }),
/* 169 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __assign = (this && this.__assign) || Object.assign || function(t) {
    for (var s, i = 1, n = arguments.length; i < n; i++) {
        s = arguments[i];
        for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
            t[p] = s[p];
    }
    return t;
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        Iif (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            Iif (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
            Iif (y = 0, t) op = [0, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    Iif (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    Iif (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        Iif (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
Object.defineProperty(exports, "__esModule", { value: true });
var underscore_1 = __webpack_require__(1);
var Assert_1 = __webpack_require__(12);
var Logger_1 = __webpack_require__(18);
var AnalyticsEndpointCaller_1 = __webpack_require__(473);
var UrlUtils_1 = __webpack_require__(108);
var Utils_1 = __webpack_require__(5);
var AnalyticsInformation_1 = __webpack_require__(85);
var AnalyticsEndpoint = /** @class */ (function () {
    function AnalyticsEndpoint(options) {
        this.options = options;
        this.logger = new Logger_1.Logger(this);
        var endpointCallerOptions = {
            accessToken: this.options.accessToken.token
        };
        this.endpointCaller = new AnalyticsEndpointCaller_1.AnalyticsEndpointCaller(endpointCallerOptions);
        this.organization = options.organization;
    }
    AnalyticsEndpoint.getURLFromSearchEndpoint = function (endpoint) {
        if (!endpoint || !endpoint.options || !endpoint.options.restUri) {
            return this.DEFAULT_ANALYTICS_URI;
        }
        var basePlatform = endpoint.options.restUri.replace(/^(https?:\/\/)platform/, '$1analytics').split('/rest')[0];
        return basePlatform + '/rest/ua';
    };
    AnalyticsEndpoint.prototype.getCurrentVisitId = function () {
        return this.visitId;
    };
    AnalyticsEndpoint.prototype.getCurrentVisitIdPromise = function () {
        var _this = this;
        return new Promise(function (resolve, reject) {
            Iif (_this.getCurrentVisitId()) {
                resolve(_this.getCurrentVisitId());
            }
            else {
                var url = _this.buildAnalyticsUrl('/analytics/visit');
                _this.getFromService(url, {})
                    .then(function (response) {
                    _this.visitId = response.id;
                    resolve(_this.visitId);
                })
                    .catch(function (response) {
                    reject(response);
                });
            }
        });
    };
    AnalyticsEndpoint.prototype.sendSearchEvents = function (searchEvents) {
        Eif (searchEvents.length > 0) {
            this.logger.info('Logging analytics search events', searchEvents);
            return this.sendToService(searchEvents, 'searches', 'searchEvents');
        }
    };
    AnalyticsEndpoint.prototype.sendDocumentViewEvent = function (documentViewEvent) {
        Assert_1.Assert.exists(documentViewEvent);
        this.logger.info('Logging analytics document view', documentViewEvent);
        return this.sendToService(documentViewEvent, 'click', 'clickEvent');
    };
    AnalyticsEndpoint.prototype.sendCustomEvent = function (customEvent) {
        Assert_1.Assert.exists(customEvent);
        this.logger.info('Logging analytics custom event', customEvent);
        return this.sendToService(customEvent, 'custom', 'customEvent');
    };
    AnalyticsEndpoint.prototype.getTopQueries = function (params) {
        var url = this.buildAnalyticsUrl('/stats/topQueries');
        return this.getFromService(url, params);
    };
    AnalyticsEndpoint.prototype.clearCookies = function () {
        new AnalyticsInformation_1.AnalyticsInformation().clear();
    };
    AnalyticsEndpoint.prototype.sendToService = function (data, path, paramName) {
        return __awaiter(this, void 0, void 0, function () {
            var url, request, results, error_1, successfullyRenewed;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        Eif (!(AnalyticsEndpoint.pendingRequest != null)) return [3 /*break*/, 2];
                        return [4 /*yield*/, AnalyticsEndpoint.pendingRequest];
                    case 1:
                        _a.sent();
                        _a.label = 2;
                    case 2:
                        url = this.getURL(path);
                        request = this.executeRequest(url, data);
                        _a.label = 3;
                    case 3:
                        _a.trys.push([3, 5, , 8]);
                        return [4 /*yield*/, request];
                    case 4:
                        results = _a.sent();
                        AnalyticsEndpoint.pendingRequest = null;
                        this.handleAnalyticsEventResponse(results.data);
                        return [2 /*return*/, results.data];
                    case 5:
                        error_1 = _a.sent();
                        AnalyticsEndpoint.pendingRequest = null;
                        Iif (!this.isAnalyticsTokenExpired(error_1)) return [3 /*break*/, 7];
                        return [4 /*yield*/, this.options.accessToken.doRenew()];
                    case 6:
                        successfullyRenewed = _a.sent();
                        Eif (successfullyRenewed) {
                            return [2 /*return*/, this.sendToService(data, path, paramName)];
                        }
                        _a.label = 7;
                    case 7: throw error_1;
                    case 8: return [2 /*return*/];
                }
            });
        });
    };
    AnalyticsEndpoint.prototype.isAnalyticsTokenExpired = function (error) {
        return error != null && error.statusCode === 400 && error.data && error.data.type === 'InvalidToken';
    };
    AnalyticsEndpoint.prototype.executeRequest = function (urlNormalized, data) {
        var request = this.endpointCaller.call({
            errorsAsSuccess: false,
            method: 'POST',
            queryString: urlNormalized.queryNormalized,
            requestData: data,
            url: urlNormalized.path,
            responseType: 'text',
            requestDataType: 'application/json'
        });
        Eif (request) {
            AnalyticsEndpoint.pendingRequest = request;
            return request;
        }
        // In some case, (eg: using navigator.sendBeacon), there won't be any response to read from the service
        // In those case, send back an empty object upstream.
        return Promise.resolve({
            data: {
                visitId: '',
                visitorId: ''
            },
            duration: 0
        });
    };
    AnalyticsEndpoint.prototype.getURL = function (path) {
        var versionToCall = AnalyticsEndpoint.CUSTOM_ANALYTICS_VERSION || AnalyticsEndpoint.DEFAULT_ANALYTICS_VERSION;
        var urlNormalized = UrlUtils_1.UrlUtils.normalizeAsParts({
            paths: [this.options.serviceUrl, versionToCall, '/analytics/', path],
            query: {
                org: this.organization
            }
        });
        return urlNormalized;
    };
    AnalyticsEndpoint.prototype.getFromService = function (url, params) {
        var paramsToSend = __assign({}, params, { access_token: this.options.accessToken.token });
        return this.endpointCaller
            .call({
            errorsAsSuccess: false,
            method: 'GET',
            queryString: this.options.organization ? ['org=' + Utils_1.Utils.safeEncodeURIComponent(this.options.organization)] : [],
            requestData: paramsToSend,
            responseType: 'json',
            url: url
        })
            .then(function (res) {
            return res.data;
        });
    };
    AnalyticsEndpoint.prototype.handleAnalyticsEventResponse = function (response) {
        var visitId;
        Iif (response['visitId']) {
            visitId = response['visitId'];
        }
        else Eif (response['searchEventResponses']) {
            visitId = underscore_1.first(response['searchEventResponses']).visitId;
        }
        Eif (visitId) {
            this.visitId = visitId;
        }
        return response;
    };
    AnalyticsEndpoint.prototype.buildAnalyticsUrl = function (path) {
        return UrlUtils_1.UrlUtils.normalizeAsString({
            paths: [this.options.serviceUrl, AnalyticsEndpoint.CUSTOM_ANALYTICS_VERSION || AnalyticsEndpoint.DEFAULT_ANALYTICS_VERSION, path]
        });
    };
    AnalyticsEndpoint.DEFAULT_ANALYTICS_URI = 'https://analytics.cloud.coveo.com/rest/ua';
    AnalyticsEndpoint.DEFAULT_ANALYTICS_VERSION = 'v15';
    AnalyticsEndpoint.CUSTOM_ANALYTICS_VERSION = undefined;
    return AnalyticsEndpoint;
}());
exports.AnalyticsEndpoint = AnalyticsEndpoint;
 
 
/***/ }),
/* 170 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
/**
 * The `StandaloneSearchInterfaceEvents` static class contains the string definitions of all events that strongly relate to the standalone search interface.
 */
var StandaloneSearchInterfaceEvents = /** @class */ (function () {
    function StandaloneSearchInterfaceEvents() {
    }
    /**
     * Triggered by the [`StandaloneSearchBox`]{@link StandaloneSearchBox} component during initialization, just before redirecting to the full search page.
     *
     * @type {string} The string value is `beforeRedirect`.
     */
    StandaloneSearchInterfaceEvents.beforeRedirect = 'beforeRedirect';
    return StandaloneSearchInterfaceEvents;
}());
exports.StandaloneSearchInterfaceEvents = StandaloneSearchInterfaceEvents;
 
 
/***/ }),
/* 171 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var _ = __webpack_require__(1);
var MiscModules_1 = __webpack_require__(97);
var QueryboxQueryParameters = /** @class */ (function () {
    function QueryboxQueryParameters(options) {
        this.options = options;
    }
    QueryboxQueryParameters.queryIsBlocked = function () {
        // This code runs on some assumption :
        // Since all "buildingQuery" events would have to be run in the same call stack
        // We can add a static flag to block 2 or more query box/omnibox from trying to modify the query inside the same event.
        // If 2 query box are activated, we get duplicate terms in the query, or duplicate term correction with did you mean.
        // This means that only one query box/searchbox would be able to modify the query in a single search page.
        // This also means that if there is 2 search box enabled, the first one in the markup in the page would be able to do the job correctly as far as the query is concerned.
        // The second one is inactive as far as the query is concerned.
        // The flag gets reset in "defer" (setTimeout 0) so that it gets reset correctly when the query event has finished executing
        if (!QueryboxQueryParameters.queryIsCurrentlyBlocked) {
            QueryboxQueryParameters.queryIsCurrentlyBlocked = true;
            MiscModules_1.Defer.defer(function () { return QueryboxQueryParameters.allowDuplicateQuery(); });
            return false;
        }
        return true;
    };
    QueryboxQueryParameters.allowDuplicateQuery = function () {
        QueryboxQueryParameters.queryIsCurrentlyBlocked = false;
    };
    QueryboxQueryParameters.prototype.addParameters = function (queryBuilder, lastQuery) {
        if (!QueryboxQueryParameters.queryIsBlocked()) {
            if (this.options.enableWildcards) {
                queryBuilder.enableWildcards = true;
            }
            if (this.options.enableQuestionMarks) {
                queryBuilder.enableQuestionMarks = true;
            }
            if (this.options.enableLowercaseOperators) {
                queryBuilder.enableLowercaseOperators = true;
            }
            if (!_.isEmpty(lastQuery)) {
                queryBuilder.enableQuerySyntax = this.options.enableQuerySyntax;
                queryBuilder.expression.add(lastQuery);
                if (this.options.enablePartialMatch) {
                    queryBuilder.enablePartialMatch = this.options.enablePartialMatch;
                    Eif (this.options.partialMatchKeywords) {
                        queryBuilder.partialMatchKeywords = this.options.partialMatchKeywords;
                    }
                    Eif (this.options.partialMatchThreshold) {
                        queryBuilder.partialMatchThreshold = this.options.partialMatchThreshold;
                    }
                }
            }
        }
    };
    QueryboxQueryParameters.queryIsCurrentlyBlocked = false;
    return QueryboxQueryParameters;
}());
exports.QueryboxQueryParameters = QueryboxQueryParameters;
 
 
/***/ }),
/* 172 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var AnalyticsActionListMeta_1 = __webpack_require__(7);
function logSearchBoxSubmitEvent(client) {
    client.logSearchEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.searchboxSubmit, {});
}
exports.logSearchBoxSubmitEvent = logSearchBoxSubmitEvent;
function logSortEvent(client, resultsSortBy) {
    client.logSearchEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.resultsSort, {
        resultsSortBy: resultsSortBy
    });
}
exports.logSortEvent = logSortEvent;
 
 
/***/ }),
/* 173 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
var Template_1 = __webpack_require__(29);
var UnderscoreTemplate_1 = __webpack_require__(90);
var TemplateCache_1 = __webpack_require__(79);
var Assert_1 = __webpack_require__(12);
var Dom_1 = __webpack_require__(0);
var _ = __webpack_require__(1);
var Initialization_1 = __webpack_require__(8);
/*
 * This renders the appropriate result template, found in TemplateCache,
 * according to its condition.
 *
 * For example, a result with a filetype of `YoutubeVideo` will get rendered
 * with the `YoutubeVideo` template, because the latter is registered with a
 * `condition` of `raw.filetype == 'YoutubeVideo'`.
 */
var DefaultResultTemplate = /** @class */ (function (_super) {
    __extends(DefaultResultTemplate, _super);
    function DefaultResultTemplate() {
        var _this = _super.call(this) || this;
        // For default result template, register everything since it's not possible to "scan" them before they are rendered.
        _this.addFields(Initialization_1.Initialization.getRegisteredFieldsForQuery());
        return _this;
    }
    DefaultResultTemplate.prototype.instantiateToString = function (object, instantiateOptions) {
        if (instantiateOptions === void 0) { instantiateOptions = {}; }
        Assert_1.Assert.exists(object);
        var mergedOptions = new Template_1.DefaultInstantiateTemplateOptions().merge(instantiateOptions);
        object = _.extend({}, object, UnderscoreTemplate_1.UnderscoreTemplate.templateHelpers);
        var templates = _.chain(TemplateCache_1.TemplateCache.getDefaultTemplates())
            .map(function (name) { return TemplateCache_1.TemplateCache.getTemplate(name); })
            .value();
        // Put templates with conditions first
        var sortedTemplates = _.chain(templates)
            .sortBy(function (template) { return template.condition == null; })
            .sortBy(function (template) { return template.fieldsToMatch == null; })
            .value();
        for (var i = 0; i < sortedTemplates.length; i++) {
            var result = sortedTemplates[i].instantiateToString(object, mergedOptions);
            if (result != null) {
                return result;
            }
        }
        return this.getFallbackTemplate();
    };
    DefaultResultTemplate.prototype.getFields = function () {
        var defaultTemplates = _.map(TemplateCache_1.TemplateCache.getDefaultTemplates(), function (name) { return TemplateCache_1.TemplateCache.getTemplate(name); });
        return _.flatten(_.map(defaultTemplates, function (template) { return template.getFields(); }));
    };
    DefaultResultTemplate.prototype.getType = function () {
        return 'DefaultResultTemplate';
    };
    DefaultResultTemplate.prototype.getFallbackTemplate = function () {
        var titleContainer = Dom_1.$$('div', {
            className: 'coveo-title',
            role: 'heading',
            ariaLevel: 2
        });
        var resultLink = Dom_1.$$('a', { className: 'CoveoResultLink' });
        titleContainer.append(resultLink.el);
        var excerpt = Dom_1.$$('div', {
            className: 'CoveoExcerpt'
        });
        var resultContainer = Dom_1.$$('div');
        resultContainer.append(titleContainer.el);
        resultContainer.append(excerpt.el);
        return resultContainer.el.outerHTML;
    };
    return DefaultResultTemplate;
}(Template_1.Template));
exports.DefaultResultTemplate = DefaultResultTemplate;
 
 
/***/ }),
/* 174 */
/***/ (function(module, exports, __webpack_require__) {
 
var global = __webpack_require__(117);
var core = __webpack_require__(118);
var ctx = __webpack_require__(1022);
var hide = __webpack_require__(175);
var has = __webpack_require__(222);
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 IS_WRAP = type & $export.W;
  var exports = IS_GLOBAL ? core : core[name] || (core[name] = {});
  var expProto = exports[PROTOTYPE];
  var target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE];
  var key, own, out;
  if (IS_GLOBAL) source = name;
  for (key in source) {
    // contains in native
    own = !IS_FORCED && target && target[key] !== undefined;
    Iif (own && has(exports, key)) continue;
    // export native or passed
    out = own ? target[key] : source[key];
    // prevent global pollution for namespaces
    exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key]
    // bind timers to global for call from export context
    : IS_BIND && own ? ctx(out, global)
    // wrap global constructors for prevent change them in library
    : IS_WRAP && target[key] == out ? (function (C) {
      var F = function (a, b, c) {
        if (this instanceof C) {
          switch (arguments.length) {
            case 0: return new C();
            case 1: return new C(a);
            case 2: return new C(a, b);
          } return new C(a, b, c);
        } return C.apply(this, arguments);
      };
      F[PROTOTYPE] = C[PROTOTYPE];
      return F;
    // make static versions for prototype methods
    })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;
    // export proto methods to core.%CONSTRUCTOR%.methods.%NAME%
    if (IS_PROTO) {
      (exports.virtual || (exports.virtual = {}))[key] = out;
      // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME%
      Iif (type & $export.R && expProto && !expProto[key]) hide(expProto, key, out);
    }
  }
};
// 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;
 
 
/***/ }),
/* 175 */
/***/ (function(module, exports, __webpack_require__) {
 
var dP = __webpack_require__(307);
var createDesc = __webpack_require__(487);
module.exports = __webpack_require__(221) ? function (object, key, value) {
  return dP.f(object, key, createDesc(1, value));
} : function (object, key, value) {
  object[key] = value;
  return object;
};
 
 
/***/ }),
/* 176 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
var Component_1 = __webpack_require__(6);
var ComponentOptions_1 = __webpack_require__(13);
var GlobalExports_1 = __webpack_require__(10);
var Core_1 = __webpack_require__(9);
var Initialization_1 = __webpack_require__(8);
/**
 * This component lets you customize the mobile responsive behavior of facets in your search interface.
 *
 * **Notes:**
 * - You can include this component anywhere under the root element of your search interface.
 * - You should only include this component once in your search interface.
 */
var FacetsMobileMode = /** @class */ (function (_super) {
    __extends(FacetsMobileMode, _super);
    function FacetsMobileMode(element, options, bindings) {
        var _this = _super.call(this, element, FacetsMobileMode.ID, bindings) || this;
        _this.element = element;
        _this.options = ComponentOptions_1.ComponentOptions.initComponentOptions(element, FacetsMobileMode, options);
        if (_this.options.preventScrolling) {
            var scrollContainer = _this.options.scrollContainer || _this.searchInterface.element;
            _this.options.scrollContainer = ComponentOptions_1.ComponentOptions.findParentScrollLockable(scrollContainer);
        }
        return _this;
    }
    FacetsMobileMode.ID = 'FacetsMobileMode';
    /**
     * @componentOptions
     */
    FacetsMobileMode.options = {
        /**
         * The screen width (in number of pixels) at which facets should enter mobile responsive mode and be collapsed under a single button.
         *
         * **Default:** `800`
         */
        breakpoint: ComponentOptions_1.ComponentOptions.buildNumberOption(),
        /**
         * Whether to display the facets in a modal instead of a pop-up when the end user expands them in mobile responsive mode.
         * Set this option to `false` in order to keep the old behaviour.
         */
        isModal: ComponentOptions_1.ComponentOptions.buildBooleanOption({ defaultValue: true }),
        /**
         * Whether to display an overlay behind the facets when the end user expands them in mobile responsive mode.
         *
         * By default, the following behavior applies:
         * - `true` when [isModal]{@link FacetsMobileMode.options.isModal} is `false`
         * - `false` when [isModal]{@link FacetsMobileMode.options.isModal} is `true`
         */
        displayOverlayWhileOpen: ComponentOptions_1.ComponentOptions.buildBooleanOption({
            postProcessing: function (value, options) { return (Core_1.Utils.isNullOrUndefined(value) ? !options.isModal : value); }
        }),
        /**
         * Whether to disable vertical scrolling on the specified or resolved [`scrollContainer`]{@link FacetsMobileMode.options.scrollContainer} while facets are expanded in mobile responsive mode.
         *
         * By default, the following behavior applies:
         * - `true` when [isModal]{@link FacetsMobileMode.options.isModal} is `true`
         * - `false` when [isModal]{@link FacetsMobileMode.options.isModal} is `false`
         */
        preventScrolling: ComponentOptions_1.ComponentOptions.buildBooleanOption({
            postProcessing: function (value, options) { return (Core_1.Utils.isNullOrUndefined(value) ? options.isModal : value); }
        }),
        /**
         * The HTML element whose vertical scrolling should be locked while facets are expanded in mobile responsive mode.
         *
         * By default, the component tries to detect and use the first ancestor element whose CSS `overflow-y` attribute is set to `scroll`, starting from the `FacetsMobileMode`'s element itself. If no such element is found, the `document.body` element is used.
         *
         * Since this heuristic is not perfect, we strongly recommend that you manually set this option by explicitly specifying the desired CSS selector.
         *
         * **Example:** `data-scroll-container-selector='#someCssSelector'`
         */
        scrollContainer: ComponentOptions_1.ComponentOptions.buildChildHtmlElementOption({ depend: 'preventScrolling' })
    };
    FacetsMobileMode.doExport = function () {
        GlobalExports_1.exportGlobally({
            FacetsMobileMode: FacetsMobileMode
        });
    };
    return FacetsMobileMode;
}(Component_1.Component));
exports.FacetsMobileMode = FacetsMobileMode;
Initialization_1.Initialization.registerAutoCreateComponent(FacetsMobileMode);
 
 
/***/ }),
/* 177 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __assign = (this && this.__assign) || Object.assign || function(t) {
    for (var s, i = 1, n = arguments.length; i < n; i++) {
        s = arguments[i];
        for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
            t[p] = s[p];
    }
    return t;
};
Object.defineProperty(exports, "__esModule", { value: true });
var GenericValueOutput_1 = __webpack_require__(91);
var ExecutionReportGenericSection = /** @class */ (function () {
    function ExecutionReportGenericSection() {
    }
    ExecutionReportGenericSection.prototype.build = function (executionReportSection) {
        return __assign({}, this.descriptionSection(executionReportSection), this.durationSection(executionReportSection));
    };
    ExecutionReportGenericSection.prototype.descriptionSection = function (executionReportSection) {
        return {
            Description: new GenericValueOutput_1.GenericValueOutput().output(executionReportSection.description)
        };
    };
    ExecutionReportGenericSection.prototype.durationSection = function (executionReportSection) {
        return {
            Duration: new GenericValueOutput_1.GenericValueOutput().output(executionReportSection.duration + " ms")
        };
    };
    return ExecutionReportGenericSection;
}());
exports.ExecutionReportGenericSection = ExecutionReportGenericSection;
 
 
/***/ }),
/* 178 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
var Component_1 = __webpack_require__(6);
var ComponentOptions_1 = __webpack_require__(13);
var AnalyticsEndpoint_1 = __webpack_require__(169);
var SearchEndpoint_1 = __webpack_require__(61);
var Assert_1 = __webpack_require__(12);
var QueryEvents_1 = __webpack_require__(14);
var ComponentOptionsModel_1 = __webpack_require__(55);
var Dom_1 = __webpack_require__(0);
var Model_1 = __webpack_require__(26);
var Utils_1 = __webpack_require__(5);
var NoopAnalyticsClient_1 = __webpack_require__(114);
var LiveAnalyticsClient_1 = __webpack_require__(229);
var MultiAnalyticsClient_1 = __webpack_require__(649);
var AnalyticsActionListMeta_1 = __webpack_require__(7);
var RecommendationAnalyticsClient_1 = __webpack_require__(320);
var _ = __webpack_require__(1);
var GlobalExports_1 = __webpack_require__(10);
var PendingSearchEvent_1 = __webpack_require__(230);
var PendingSearchAsYouTypeSearchEvent_1 = __webpack_require__(179);
var AccessToken_1 = __webpack_require__(167);
var AnalyticsEvents_1 = __webpack_require__(111);
var QueryUtils_1 = __webpack_require__(37);
var AnalyticsInformation_1 = __webpack_require__(85);
var InitializationEvents_1 = __webpack_require__(22);
/**
 * The `Analytics` component can log user actions performed in the search interface and send them to a REST web service
 * exposed through the Coveo Cloud Platform.
 *
 * You can use analytics data to evaluate how users are interacting with your search interface, improve relevance and
 * produce analytics dashboards within the Coveo Cloud Platform.
 *
 * See [JavaScript Search Framework Usage Analytics](https://docs.coveo.com/en/365) for an introduction.
 *
 * See also [Logging Your Own Search Events](https://docs.coveo.com/en/2726/#logging-your-own-search-events) for more advanced use cases.
 */
var Analytics = /** @class */ (function (_super) {
    __extends(Analytics, _super);
    /**
     * Creates a new `Analytics` component. Creates the [`AnalyticsClient`]{@link IAnalyticsClient}.
     * @param element The HTMLElement on which the component will be instantiated.
     * @param options The options for the `Analytics` component.
     * @param bindings The bindings that the component requires to function normally. If not set, these will be
     * automatically resolved (with a slower execution time).
     */
    function Analytics(element, options, bindings) {
        if (options === void 0) { options = {}; }
        var _this = _super.call(this, element, Analytics.ID, bindings) || this;
        _this.element = element;
        _this.options = options;
        _this.bindings = bindings;
        _this.options = ComponentOptions_1.ComponentOptions.initComponentOptions(element, Analytics, options);
        _this.setupAccessToken();
        Iif (_this.accessToken == null) {
            _this.logger.error("Analytics component could not resolve any access token");
            _this.logger.error("Either provide a analytics token : data-option-token=\"an-authentication-token\" on the Analytics element, or configure a default SearchEndpoint", _this.element);
            return _this;
        }
        else {
            _this.options.token = _this.accessToken.token;
            _this.accessToken.subscribeToRenewal(function (newToken) {
                _this.options.token = newToken;
                _this.client.endpoint.endpointCaller.options.accessToken = newToken;
            });
        }
        _this.initializeAnalyticsClient();
        Assert_1.Assert.exists(_this.client);
        Dom_1.$$(_this.root).on(QueryEvents_1.QueryEvents.buildingQuery, function (e, data) { return _this.handleBuildingQuery(data); });
        _this.bind.onRootElement(QueryEvents_1.QueryEvents.queryError, function (data) { return _this.handleQueryError(data); });
        _this.bind.onRootElement(InitializationEvents_1.InitializationEvents.afterComponentsInitialization, function () { return _this.handleDoNotTrack(); });
        if (_this.options.autoPushToGtmDataLayer && _this.isGtmDataLayerInitialized) {
            _this.bind.onRootElement(AnalyticsEvents_1.AnalyticsEvents.analyticsEventReady, function (data) { return _this.pushToGtmDataLayer(data); });
        }
        // Analytics component is a bit special: It can be higher in the dom tree than the search interface
        // Need to resolve down to find the componentOptionsModel if we need to.
        Iif (!_this.componentOptionsModel) {
            var cmpOptionElement = Dom_1.$$(element).find('.' + Component_1.Component.computeCssClassName(ComponentOptionsModel_1.ComponentOptionsModel));
            if (cmpOptionElement) {
                _this.componentOptionsModel = cmpOptionElement[Component_1.Component.computeCssClassName(ComponentOptionsModel_1.ComponentOptionsModel)];
            }
        }
        Eif (_this.componentOptionsModel) {
            _this.componentOptionsModel.set(ComponentOptionsModel_1.ComponentOptionsModel.attributesEnum.searchHub, _this.options.searchHub);
            var event_1 = _this.componentOptionsModel.getEventName(Model_1.Model.eventTypes.changeOne + ComponentOptionsModel_1.ComponentOptionsModel.attributesEnum.searchHub);
            Dom_1.$$(_this.root).on(event_1, function (e, args) { return _this.handleSearchHubChanged(args); });
        }
        _this.createClientId();
        return _this;
    }
    Analytics.doExport = function () {
        GlobalExports_1.exportGlobally({
            PendingSearchEvent: PendingSearchEvent_1.PendingSearchEvent,
            PendingSearchAsYouTypeSearchEvent: PendingSearchAsYouTypeSearchEvent_1.PendingSearchAsYouTypeSearchEvent,
            analyticsActionCauseList: AnalyticsActionListMeta_1.analyticsActionCauseList,
            NoopAnalyticsClient: NoopAnalyticsClient_1.NoopAnalyticsClient,
            LiveAnalyticsClient: LiveAnalyticsClient_1.LiveAnalyticsClient,
            MultiAnalyticsClient: MultiAnalyticsClient_1.MultiAnalyticsClient,
            Analytics: Analytics
        });
    };
    /**
     * Logs a `Search` usage analytics event.
     *
     * A `Search` event is actually sent to the Coveo Usage Analytics service only after the query successfully returns
     * (not immediately after calling this method). Therefore, it is important to call this method **before** executing
     * the query. Otherwise, the `Search` event will not be logged, and you will get a warning message in the console.
     *
     * **Note:**
     *
     * > When logging custom `Search` events, you should use the `Coveo.logSearchEvent` top-level function rather than
     * > calling this method directly from the `Analytics` component instance. See
     * > [Logging Your Own Search Events](https://docs.coveo.com/en/2726/#logging-your-own-search-events).
     *
     * @param actionCause The cause of the event.
     * @param meta The metadata you want to use to create custom dimensions. Metadata can contain as many key-value
     * pairs as you need. Each key must contain only alphanumeric characters and underscores. The Coveo Usage Analytics
     * service automatically converts white spaces to underscores, and uppercase characters to lowercase characters in key
     * names. Each value must be a simple string. If you do not need to log metadata, you can simply pass an empty JSON
     * ( `{}` ).
     */
    Analytics.prototype.logSearchEvent = function (actionCause, meta) {
        this.client.logSearchEvent(actionCause, meta);
    };
    /**
     * Logs a `SearchAsYouType` usage analytics event.
     *
     * This method is very similar to the [`logSearchEvent`]{@link Analytics.logSearchEvent} method, except that
     * `logSearchAsYouType` should, by definition, be called more frequently. Consequently, in order to avoid logging
     * every single partial query, the `PendingSearchAsYouTypeEvent` takes care of logging only the "relevant" last event:
     * an event that occurs after 5 seconds have elapsed without any event being logged, or an event that occurs after
     * another part of the interface triggers a search event.
     *
     * It is important to call this method **before** executing the query. Otherwise, no `SearchAsYouType` event will be
     * logged, and you will get a warning message in the console.
     *
     * **Note:**
     *
     * > When logging custom `SearchAsYouType` events, you should use the `Coveo.logSearchAsYouTypeEvent` top-level
     * > function rather than calling this method directly from the `Analytics` component instance. See
     * > [Logging Your Own Search Events](https://docs.coveo.com/en/2726/#logging-your-own-search-events).
     *
     * @param actionCause The cause of the event.
     * @param meta The metadata which you want to use to create custom dimensions. Metadata can contain as many key-value
     * pairs as you need. Each key must contain only alphanumeric characters and underscores. The Coveo Usage Analytics
     * service automatically converts white spaces to underscores and uppercase characters to lowercase characters in key
     * names. Each value must be a simple string. If you do not need to log metadata, you can simply pass an empty JSON
     * ( `{}` ).
     */
    Analytics.prototype.logSearchAsYouType = function (actionCause, meta) {
        this.client.logSearchAsYouType(actionCause, meta);
    };
    /**
     * Logs a `Custom` usage analytics event on the service.
     *
     * You can use `Custom` events to create custom reports, or to track events which are neither queries (see
     * [`logSearchEvent`]{@link Analytics.logSearchEvent} and
     * [`logSearchAsYouType`]{@link Analytics.logSearchAsYouType}), nor item views (see
     * [`logClickEvent`]{@link Analytics.logClickEvent}).
     *
     * **Note:**
     * > When logging `Custom` events, you should use the `Coveo.logClickEvent` top-level function rather than calling
     * > this method directly from the `Analytics` component instance. See
     * > [Logging Your Own Custom Events](https://docs.coveo.com/en/2726/#logging-your-own-custom-events).
     *
     * @param actionCause The cause of the event.
     * @param meta The metadata which you want to use to create custom dimensions. Metadata can contain as many key-value
     * pairs as you need. Each key must contain only alphanumeric characters and underscores. The Coveo Usage Analytics
     * service automatically converts white spaces to underscores and uppercase characters to lowercase characters in key
     * names. Each value must be a simple string. If you do not need to log metadata, you can simply pass an empty JSON
     * ( `{}` ).
     * @param element The HTMLElement that the user has interacted with for this custom event. Default value is the
     * element on which the `Analytics` component is bound.
     * @param result The IQueryResult that the custom event is linked to, if any.
     */
    Analytics.prototype.logCustomEvent = function (actionCause, meta, element, result) {
        if (element === void 0) { element = this.element; }
        this.client.logCustomEvent(actionCause, meta, element, result);
    };
    /**
     * Logs a `Click` usage analytics event.
     *
     * A `Click` event corresponds to an item view (e.g., clicking on a {@link ResultLink} or opening a
     * {@link Quickview}).
     *
     * `Click` events are immediately sent to the Coveo Usage Analytics service.
     *
     * **Note:**
     * > When logging custom `Click` events, you should use the `Coveo.logClickEvent` top-level function rather than
     * > calling this method directly from the `Analytics` component instance. See
     * > [Logging Your Own Click Events](https://docs.coveo.com/en/2726/#logging-your-own-click-events).
     *
     * @param actionCause The cause of the event.
     * @param meta The metadata which you want to use to create custom dimensions. Metadata can contain as many key-value
     * pairs as you need. Each key must contain only alphanumeric characters and underscores. The Coveo Usage Analytics
     * service automatically converts uppercase characters to lowercase characters in key names. Each value must be a
     * simple string. You do not have to pass an {@link IAnalyticsDocumentViewMeta} as meta when logging a `Click` event.
     * You can actually send any arbitrary meta. If you do not need to log metadata, you can simply pass an empty JSON
     * ( `{}` ).
     * @param result The result that was clicked.
     * @param element The HTMLElement that the user has clicked in the interface. Default value is the element on which
     * the `Analytics` component is bound.
     */
    Analytics.prototype.logClickEvent = function (actionCause, meta, result, element) {
        if (element === void 0) { element = this.element; }
        this.client.logClickEvent(actionCause, meta, result, element);
    };
    /**
     * Sets the Origin Context dimension on the analytic events.
     *
     * You can use this dimension to specify the context of your application.
     * Suggested values are "Search", "InternalSearch" and "CommunitySearch"
     *
     * Default value is `Search`.
     *
     * @param originContext The origin context value
     */
    Analytics.prototype.setOriginContext = function (originContext) {
        this.client.setOriginContext(originContext);
    };
    /**
     * Get the Origin Context dimension on the analytic events.
     *
     */
    Analytics.prototype.getOriginContext = function () {
        return this.client.getOriginContext();
    };
    /**
     * Get the Origin Context dimension on the analytic events.
     *
     */
    Analytics.prototype.getUserDisplayName = function () {
        return this.client.getUserDisplayName();
    };
    /**
     * Re-enables the component if it was previously disabled.
     */
    Analytics.prototype.enable = function () {
        Iif (!this.disabled) {
            return this.logger.warn('The Analytics component is already enabled.');
        }
        _super.prototype.enable.call(this);
        this.initializeAnalyticsClient();
        this.updateSearchInterfaceUAClient();
        this.resolveQueryController().enableHistory();
    };
    /**
     * Removes all session information stored in the browser (e.g., analytics visitor cookies, action history, etc.)
     *
     * @availablesince [October 2019 Release (v2.7219)](https://docs.coveo.com/en/3084/)
     */
    Analytics.prototype.clearLocalData = function () {
        Iif (this.disabled || this.client instanceof NoopAnalyticsClient_1.NoopAnalyticsClient) {
            return this.logger.warn('Could not clear local data while analytics are disabled.');
        }
        new AnalyticsInformation_1.AnalyticsInformation().clear();
        this.resolveQueryController().resetHistory();
    };
    /**
     * Disables the component and clears local data by running [`clearLocalData`]{@link Analytics.clearLocalData}.
     */
    Analytics.prototype.disable = function () {
        Iif (this.disabled) {
            return this.logger.warn('The Analytics component is already disabled.');
        }
        this.clearLocalData();
        this.client.cancelAllPendingEvents();
        this.client = new NoopAnalyticsClient_1.NoopAnalyticsClient();
        this.updateSearchInterfaceUAClient();
        this.resolveQueryController().disableHistory();
        _super.prototype.disable.call(this);
    };
    Analytics.prototype.updateSearchInterfaceUAClient = function () {
        this.searchInterface.usageAnalytics = this.client;
    };
    /**
     * Attempts to push data representing a single Coveo usage analytics event to the Google Tag Manager data layer.
     *
     * **Note:**
     * If the [`autoPushToGtmDataLayer`]{@link Analytics.options.autoPushToGtmDataLayer} option is set to `true` and the GTM data layer has been properly initialized in the page, this method is called automatically whenever an event is about to be logged to the Coveo Cloud usage analytics service.
     *
     * See also the [`gtmDataLayerName`]{@link Analytics.options.gtmDataLayerName} option.
     *
     * @param data The data to push.
     */
    Analytics.prototype.pushToGtmDataLayer = function (data) {
        var dataLayerName = this.options.gtmDataLayerName;
        try {
            window[dataLayerName].push(data);
        }
        catch (error) {
            this.logger.error("Unexpected error when pushing to Google Tag Manager data layer '" + dataLayerName + "': '" + error + "'.");
        }
    };
    Analytics.prototype.initializeAnalyticsEndpoint = function () {
        return new AnalyticsEndpoint_1.AnalyticsEndpoint({
            accessToken: this.accessToken,
            serviceUrl: this.options.endpoint,
            organization: this.options.organization
        });
    };
    Analytics.prototype.createClientId = function () {
        var info = new AnalyticsInformation_1.AnalyticsInformation();
        if (!info.clientId) {
            info.clientId = QueryUtils_1.QueryUtils.createGuid();
        }
    };
    Analytics.prototype.initializeAnalyticsClient = function () {
        Eif (Utils_1.Utils.isNonEmptyString(this.options.endpoint)) {
            var endpoint = this.initializeAnalyticsEndpoint();
            var elementToInitializeClient = void 0;
            Eif (this.root && this.element) {
                if (this.root.contains(this.element)) {
                    elementToInitializeClient = this.root;
                }
                else {
                    elementToInitializeClient = this.element;
                }
            }
            var isRecommendation = Dom_1.$$(this.root).hasClass(Component_1.Component.computeCssClassNameForType("Recommendation"));
            this.instantiateAnalyticsClient(endpoint, elementToInitializeClient, isRecommendation);
        }
        else {
            this.client = new NoopAnalyticsClient_1.NoopAnalyticsClient();
        }
    };
    Analytics.prototype.instantiateAnalyticsClient = function (endpoint, elementToInitializeClient, isRecommendation) {
        Iif (isRecommendation) {
            this.client = new RecommendationAnalyticsClient_1.RecommendationAnalyticsClient(endpoint, elementToInitializeClient, this.options.user, this.options.userDisplayName, this.options.anonymous, this.options.splitTestRunName, this.options.splitTestRunVersion, this.options.searchHub, this.options.sendToCloud, this.getBindings());
        }
        else {
            this.client = new LiveAnalyticsClient_1.LiveAnalyticsClient(endpoint, elementToInitializeClient, this.options.user, this.options.userDisplayName, this.options.anonymous, this.options.splitTestRunName, this.options.splitTestRunVersion, this.options.searchHub, this.options.sendToCloud, this.getBindings());
        }
    };
    Analytics.prototype.setupAccessToken = function () {
        this.trySetupAccessTokenFromOptions();
        if (this.accessToken == null) {
            this.trySetupAccessTokenFromDefaultSearchEndpoint();
        }
    };
    Analytics.prototype.trySetupAccessTokenFromOptions = function () {
        if (this.options.token != null) {
            this.accessToken = new AccessToken_1.AccessToken(this.options.token, this.options.renewAccessToken);
        }
    };
    Analytics.prototype.trySetupAccessTokenFromDefaultSearchEndpoint = function () {
        Eif (this.defaultEndpoint) {
            this.accessToken = this.defaultEndpoint.accessToken;
            this.options.token = this.defaultEndpoint.accessToken.token;
        }
        if (!this.options.organization && this.defaultEndpoint) {
            this.options.organization = this.defaultEndpoint.options.queryStringArguments['organizationId'];
        }
    };
    Object.defineProperty(Analytics.prototype, "defaultEndpoint", {
        get: function () {
            return this.searchInterface.options.endpoint || SearchEndpoint_1.SearchEndpoint.defaultEndpoint;
        },
        enumerable: true,
        configurable: true
    });
    Analytics.prototype.handleBuildingQuery = function (data) {
        Assert_1.Assert.exists(data);
        data.queryBuilder.searchHub = this.options.searchHub;
    };
    Analytics.prototype.handleSearchHubChanged = function (data) {
        this.options.searchHub = data.value;
    };
    Analytics.prototype.handleQueryError = function (data) {
        Assert_1.Assert.exists(data);
        this.client.logCustomEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.queryError, {
            query: data.query.q,
            aq: data.query.aq,
            cq: data.query.cq,
            dq: data.query.dq,
            errorType: data.error.type,
            errorMessage: data.error.message
        }, this.element);
    };
    Object.defineProperty(Analytics.prototype, "isGtmDataLayerInitialized", {
        get: function () {
            var dataLayerName = this.options.gtmDataLayerName;
            if (!dataLayerName) {
                return false;
            }
            if (!window[dataLayerName]) {
                this.logger.warn("Cannot automatically push to Google Tag Manager data layer: '" + dataLayerName + "' is undefined.");
                return false;
            }
            return true;
        },
        enumerable: true,
        configurable: true
    });
    Analytics.create = function (element, options, bindings) {
        var selector = Component_1.Component.computeSelectorForType(Analytics.ID);
        var found = [];
        found = found.concat(Dom_1.$$(element).findAll(selector));
        Eif (!Dom_1.$$(element).hasClass(Component_1.Component.computeCssClassNameForType('Recommendation'))) {
            found = this.ignoreElementsInsideRecommendationInterface(found);
        }
        found.push(Dom_1.$$(element).closest(Component_1.Component.computeCssClassName(Analytics)));
        Iif (Dom_1.$$(element).is(selector)) {
            found.push(element);
        }
        found = _.compact(found);
        if (found.length == 1) {
            return Analytics.getClient(found[0], options, bindings);
        }
        else if (found.length > 1) {
            return new MultiAnalyticsClient_1.MultiAnalyticsClient(_.map(found, function (el) { return Analytics.getClient(el, options, bindings); }));
        }
        else {
            return new NoopAnalyticsClient_1.NoopAnalyticsClient();
        }
    };
    Analytics.ignoreElementsInsideRecommendationInterface = function (found) {
        return _.filter(found, function (element) {
            return Dom_1.$$(element).closest(Component_1.Component.computeCssClassNameForType('Recommendation')) === undefined;
        });
    };
    Analytics.getClient = function (element, options, bindings) {
        // This check if an element is already initialized as an analytics component.
        // If that's the case, return the client on that element.
        // Otherwise, init and return.
        var foundOnElement = Component_1.Component.get(element, Analytics, true);
        if (foundOnElement instanceof Analytics) {
            return foundOnElement.client;
        }
        else {
            return new Analytics(element, options, bindings).client;
        }
    };
    Analytics.prototype.handleDoNotTrack = function () {
        Eif (this.doNotTrack()) {
            this.logger.warn('Coveo Analytics tracking disabled due to doNotTrack');
            this.disable();
        }
    };
    Analytics.prototype.doNotTrack = function () {
        var doNotTrack = [true, 'yes', '1', 1].indexOf(navigator.doNotTrack || window.doNotTrack || navigator.msDoNotTrack);
        var globalPrivacyControl = navigator.globalPrivacyControl;
        return doNotTrack !== -1 || globalPrivacyControl;
    };
    Analytics.ID = 'Analytics';
    // NOTE: The default values for some of those options (`organization`, `endpoint`, `searchHub`) can be
    // overridden by generated code when using hosted search pages.
    /**
     * Options for the component
     * @componentOptions
     */
    Analytics.options = {
        /**
         * Specifies the name of the user for the usage analytics logs.
         *
         * Default value is `undefined`
         */
        user: ComponentOptions_1.ComponentOptions.buildStringOption(),
        /**
         * Specifies the user display name for the usage analytics logs.
         *
         * Default value is `undefined`
         */
        userDisplayName: ComponentOptions_1.ComponentOptions.buildStringOption(),
        /**
         * Specifies the token to use to access the usage analytics endpoint.
         *
         * Default value is `undefined`, and the component uses the search token.
         */
        token: ComponentOptions_1.ComponentOptions.buildStringOption(),
        /**
         * Specifies the URL of the Usage Analytics service. You do not have to specify a value for this option, unless
         * the location of the service you use differs from the default Coveo Cloud Usage Analytics endpoint.
         *
         * By deault, the value is `https://platform.cloud.coveo.com/rest/ua`, or
         * `https://platform-<REGION_ABBREVIATION>.cloud.coveo.com/rest/ua` if you have
         * [configured your search endpoint]{@link SearchEndpoint.configureCloudV2Endpoint} to implement
         * data residency outside of the United States.
         */
        endpoint: ComponentOptions_1.ComponentOptions.buildStringOption({
            postProcessing: function (value) {
                if (!value) {
                    return AnalyticsEndpoint_1.AnalyticsEndpoint.getURLFromSearchEndpoint(SearchEndpoint_1.SearchEndpoint.defaultEndpoint);
                }
                var isLegacy = value.indexOf('usageanalytics') !== -1;
                if (isLegacy) {
                    var basePlatform = value.split('/rest')[0];
                    return basePlatform + '/rest';
                }
                return value;
            }
        }),
        /**
         * Specifies whether to convert search user identities to unique hash when logging analytics data, so that
         * analytics reviewers and managers will not be able to clearly identify which user is performing which query.
         *
         * When you set this option to `true`, the Coveo Usage Analytics service can still properly differentiate sessions
         * made by anonymous users from sessions made by users authenticated in some way on the site containing the search
         * page.
         *
         * Default value is `false`.
         */
        anonymous: ComponentOptions_1.ComponentOptions.buildBooleanOption({ defaultValue: false }),
        /**
         * Sets the Search Hub dimension on the search events.
         *
         * The Search Hub dimension is typically a name that refers to a specific search page. For example, you could use
         * the `CommunitySite` value to refer to a search page on a public community site.
         *
         * **Note:**
         * > If you wish to use the search hub dimension for security reasons (e.g., to provide different query suggestions
         * > for internal and external users), you should specify the search hub when generating the search token for the
         * > end user (in safe, server-side code), rather than setting it with this option (see
         * > [Search Token Authentication](https://docs.coveo.com/en/56/)).
         *
         * Default value is `default`.
         */
        searchHub: ComponentOptions_1.ComponentOptions.buildStringOption({ defaultValue: 'default' }),
        /**
         * Specifies the name of the split test run that the search page is part of.
         *
         * You can use this dimension to perform A/B testing using different search page layouts and features inside the
         * Coveo Query pipeline.
         *
         * Default value is `undefined` and no split test run name is reported to the Coveo Usage Analytics service.
         */
        splitTestRunName: ComponentOptions_1.ComponentOptions.buildStringOption(),
        /**
         * Specifies the version name for the page when a split test run is active.
         *
         * When reporting on A/B testing analytics data, this value specifies the test run version name that was
         * presented to the user.
         *
         * Default value is `undefined`
         */
        splitTestRunVersion: ComponentOptions_1.ComponentOptions.buildStringOption(),
        sendToCloud: ComponentOptions_1.ComponentOptions.buildBooleanOption({ defaultValue: true }),
        /**
         * Specifies the organization bound to the access token. This is necessary when using an access token, because a
         * single access token can be associated to more than one organization.
         *
         * Default value is `undefined`, and the value of this parameter will fallback to the organization used for the
         * search endpoint.
         */
        organization: ComponentOptions_1.ComponentOptions.buildStringOption(),
        /**
         * Whether to automatically attempt to push Coveo usage analytics events to the Google Tag Manager [data layer](https://developers.google.com/tag-manager/devguide#datalayer).
         *
         * See also [`gtmDataLayerName`]{@link Analytics.options.gtmDataLayerName}.
         *
         * @availablesince [July 2019 Release (v2.6459)](https://docs.coveo.com/en/2938/)
         */
        autoPushToGtmDataLayer: ComponentOptions_1.ComponentOptions.buildBooleanOption({ defaultValue: false }),
        /**
         * The name of the Google Tag Manager data layer initialized in the page.
         *
         * See also [`autoPushToGtmDataLayer`]{@link Analytics.options.autoPushToGtmDataLayer}.
         *
         * **Note:**
         * Setting this option is only useful if the [GTM data layer was renamed](https://developers.google.com/tag-manager/devguide#renaming) in the page.
         *
         * **Default:** `dataLayer`
         */
        gtmDataLayerName: ComponentOptions_1.ComponentOptions.buildStringOption({ defaultValue: 'dataLayer' })
    };
    return Analytics;
}(Component_1.Component));
exports.Analytics = Analytics;
 
 
/***/ }),
/* 179 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
var PendingSearchEvent_1 = __webpack_require__(230);
var Dom_1 = __webpack_require__(0);
var InitializationEvents_1 = __webpack_require__(22);
var SearchInterface_1 = __webpack_require__(25);
var Component_1 = __webpack_require__(6);
var QueryStateModel_1 = __webpack_require__(17);
var _ = __webpack_require__(1);
var PendingSearchAsYouTypeSearchEvent = /** @class */ (function (_super) {
    __extends(PendingSearchAsYouTypeSearchEvent, _super);
    function PendingSearchAsYouTypeSearchEvent(root, endpoint, templateSearchEvent, sendToCloud) {
        var _this = _super.call(this, root, endpoint, templateSearchEvent, sendToCloud) || this;
        _this.root = root;
        _this.endpoint = endpoint;
        _this.templateSearchEvent = templateSearchEvent;
        _this.sendToCloud = sendToCloud;
        _this.delayBeforeSending = 5000;
        _this.queryContent = '';
        _this.beforeUnloadHandler = function () {
            _this.onWindowUnload();
        };
        window.addEventListener('beforeunload', _this.beforeUnloadHandler);
        Dom_1.$$(root).on(InitializationEvents_1.InitializationEvents.nuke, function () { return _this.handleNuke(); });
        return _this;
    }
    PendingSearchAsYouTypeSearchEvent.prototype.handleDuringQuery = function (e, args) {
        var _this = this;
        var event = _.clone(e);
        // We need to "snapshot" the current query before the delay is applied
        // Otherwise, this means that after 5 second, the original query is possibly modified
        // For example, DidYouMean would be wrong in that case.
        var eventTarget = e.target;
        var searchInterface = Component_1.Component.get(eventTarget, SearchInterface_1.SearchInterface);
        this.modifyQueryContent(searchInterface.queryStateModel.get(QueryStateModel_1.QueryStateModel.attributesEnum.q));
        this.beforeResolve = new Promise(function (resolve) {
            _this.toSendRightNow = function () {
                if (!_this.isCancelledOrFinished()) {
                    resolve(_this);
                    _super.prototype.handleDuringQuery.call(_this, event, args, _this.queryContent);
                }
            };
            _.delay(function () {
                _this.toSendRightNow();
            }, _this.delayBeforeSending);
        });
    };
    PendingSearchAsYouTypeSearchEvent.prototype.sendRightNow = function () {
        Eif (this.toSendRightNow) {
            this.toSendRightNow();
        }
    };
    PendingSearchAsYouTypeSearchEvent.prototype.modifyCustomData = function (key, newData) {
        _.each(this.searchEvents, function (searchEvent) {
            searchEvent.customData[key] = newData;
        });
        Eif (!this.templateSearchEvent.customData) {
            this.templateSearchEvent.customData = {};
        }
        this.templateSearchEvent.customData[key] = newData;
    };
    PendingSearchAsYouTypeSearchEvent.prototype.modifyEventCause = function (newCause) {
        _.each(this.searchEvents, function (searchEvent) {
            searchEvent.actionCause = newCause.name;
            searchEvent.actionType = newCause.type;
        });
        this.templateSearchEvent.actionCause = newCause.name;
        this.templateSearchEvent.actionType = newCause.type;
    };
    PendingSearchAsYouTypeSearchEvent.prototype.modifyQueryContent = function (query) {
        this.queryContent = query;
    };
    PendingSearchAsYouTypeSearchEvent.prototype.stopRecording = function () {
        _super.prototype.stopRecording.call(this);
        if (this.beforeUnloadHandler) {
            window.removeEventListener('beforeunload', this.beforeUnloadHandler);
            this.beforeUnloadHandler = undefined;
        }
    };
    PendingSearchAsYouTypeSearchEvent.prototype.handleNuke = function () {
        window.removeEventListener('beforeunload', this.beforeUnloadHandler);
    };
    PendingSearchAsYouTypeSearchEvent.prototype.onWindowUnload = function () {
        if (!this.isCancelledOrFinished()) {
            this.sendRightNow();
        }
    };
    PendingSearchAsYouTypeSearchEvent.prototype.isCancelledOrFinished = function () {
        Eif (!this.cancelled) {
            if (this.finished) {
                this.cancel();
                return true;
            }
            else {
                return false;
            }
        }
        else {
            return true;
        }
    };
    return PendingSearchAsYouTypeSearchEvent;
}(PendingSearchEvent_1.PendingSearchEvent));
exports.PendingSearchAsYouTypeSearchEvent = PendingSearchAsYouTypeSearchEvent;
 
 
/***/ }),
/* 180 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Dom_1 = __webpack_require__(0);
var EventsUtils_1 = __webpack_require__(322);
var _ = __webpack_require__(1);
var AccessibleButton_1 = __webpack_require__(20);
var KeyboardUtils_1 = __webpack_require__(35);
var InitializationEvents_1 = __webpack_require__(22);
var Assert_1 = __webpack_require__(12);
var Strings_1 = __webpack_require__(4);
var ResponsiveDropdownEvent;
(function (ResponsiveDropdownEvent) {
    ResponsiveDropdownEvent["OPEN"] = "responsiveDropdownOpen";
    ResponsiveDropdownEvent["CLOSE"] = "responsiveDropdownClose";
})(ResponsiveDropdownEvent = exports.ResponsiveDropdownEvent || (exports.ResponsiveDropdownEvent = {}));
var ResponsiveDropdown = /** @class */ (function () {
    function ResponsiveDropdown(dropdownContent, dropdownHeader, coveoRoot) {
        var _this = this;
        this.dropdownContent = dropdownContent;
        this.dropdownHeader = dropdownHeader;
        this.coveoRoot = coveoRoot;
        this.isOpened = false;
        this.onOpenHandlers = [];
        this.onCloseHandlers = [];
        this.popupBackgroundIsEnabled = true;
        this.scrollableContainerToLock = null;
        this.closeIfOpened = function () {
            _this.isOpened && _this.close();
        };
        Assert_1.Assert.exists(dropdownContent);
        Assert_1.Assert.exists(dropdownHeader);
        Assert_1.Assert.exists(coveoRoot);
        this.popupBackground = this.buildPopupBackground();
        this.bindOnClickDropdownHeaderEvent();
        this.saveContentPosition();
        this.bindOnKeyboardEscapeEvent();
        this.bindNukeEvents();
    }
    Object.defineProperty(ResponsiveDropdown.prototype, "scrollLocked", {
        set: function (lock) {
            if (!this.scrollableContainerToLock) {
                return;
            }
            this.scrollableContainerToLock.style.overflow = lock ? 'hidden' : '';
        },
        enumerable: true,
        configurable: true
    });
    ResponsiveDropdown.prototype.registerOnOpenHandler = function (handler, context) {
        Assert_1.Assert.exists(handler);
        this.onOpenHandlers.push({ handler: handler, context: context });
    };
    ResponsiveDropdown.prototype.registerOnCloseHandler = function (handler, context) {
        Assert_1.Assert.exists(handler);
        this.onCloseHandlers.push({ handler: handler, context: context });
    };
    ResponsiveDropdown.prototype.cleanUp = function () {
        this.close();
        this.dropdownHeader.cleanUp();
        this.dropdownContent.cleanUp();
        this.restoreContentPosition();
    };
    ResponsiveDropdown.prototype.open = function () {
        this.isOpened = true;
        this.dropdownHeader.open();
        this.dropdownContent.positionDropdown();
        _.each(this.onOpenHandlers, function (handlerCall) {
            handlerCall.handler.apply(handlerCall.context);
        });
        this.showPopupBackground();
        this.lockScroll();
        Dom_1.$$(this.dropdownHeader.element).trigger(ResponsiveDropdownEvent.OPEN);
    };
    ResponsiveDropdown.prototype.close = function () {
        this.isOpened = false;
        _.each(this.onCloseHandlers, function (handlerCall) {
            handlerCall.handler.apply(handlerCall.context);
        });
        this.dropdownHeader.close();
        this.dropdownContent.hideDropdown();
        this.hidePopupBackground();
        this.unlockScroll();
        Dom_1.$$(this.dropdownHeader.element).trigger(ResponsiveDropdownEvent.CLOSE);
    };
    ResponsiveDropdown.prototype.disablePopupBackground = function () {
        this.popupBackgroundIsEnabled = false;
    };
    ResponsiveDropdown.prototype.enableScrollLocking = function (scrollableContainer) {
        this.scrollableContainerToLock = scrollableContainer;
    };
    ResponsiveDropdown.prototype.bindOnClickDropdownHeaderEvent = function () {
        var _this = this;
        new AccessibleButton_1.AccessibleButton()
            .withElement(this.dropdownHeader.element)
            .withSelectAction(function () { return (_this.isOpened ? _this.close() : _this.open()); })
            .withLabel(Strings_1.l(this.isOpened ? 'CloseFiltersDropdown' : 'OpenFiltersDropdown'))
            .build();
    };
    ResponsiveDropdown.prototype.bindOnKeyboardEscapeEvent = function () {
        Dom_1.$$(document.documentElement).on('keyup', KeyboardUtils_1.KeyboardUtils.keypressAction(KeyboardUtils_1.KEYBOARD.ESCAPE, this.closeIfOpened));
    };
    ResponsiveDropdown.prototype.unbindOnKeyboardEscapeEvent = function () {
        Dom_1.$$(document.documentElement).off('keyup', KeyboardUtils_1.KeyboardUtils.keypressAction(KeyboardUtils_1.KEYBOARD.ESCAPE, this.closeIfOpened));
    };
    ResponsiveDropdown.prototype.bindNukeEvents = function () {
        var _this = this;
        Dom_1.$$(this.coveoRoot).on(InitializationEvents_1.InitializationEvents.nuke, function () {
            _this.unbindOnKeyboardEscapeEvent();
        });
    };
    ResponsiveDropdown.prototype.showPopupBackground = function () {
        if (this.popupBackgroundIsEnabled) {
            this.coveoRoot.el.appendChild(this.popupBackground.el);
            window.getComputedStyle(this.popupBackground.el).opacity;
            this.popupBackground.el.style.opacity = ResponsiveDropdown.TRANSPARENT_BACKGROUND_OPACITY;
            this.popupBackground.addClass(ResponsiveDropdown.DROPDOWN_BACKGROUND_ACTIVE_CSS_CLASS_NAME);
        }
    };
    ResponsiveDropdown.prototype.lockScroll = function () {
        this.scrollLocked = true;
    };
    ResponsiveDropdown.prototype.unlockScroll = function () {
        this.scrollLocked = false;
    };
    ResponsiveDropdown.prototype.hidePopupBackground = function () {
        if (this.popupBackgroundIsEnabled) {
            // forces the browser to reflow the element, so that the transition is applied.
            window.getComputedStyle(this.popupBackground.el).opacity;
            this.popupBackground.el.style.opacity = '0';
            this.popupBackground.removeClass(ResponsiveDropdown.DROPDOWN_BACKGROUND_ACTIVE_CSS_CLASS_NAME);
        }
    };
    ResponsiveDropdown.prototype.buildPopupBackground = function () {
        var _this = this;
        var popupBackground = Dom_1.$$('div', { className: ResponsiveDropdown.DROPDOWN_BACKGROUND_CSS_CLASS_NAME });
        EventsUtils_1.EventsUtils.addPrefixedEvent(popupBackground.el, 'TransitionEnd', function () {
            if (popupBackground.el.style.opacity == '0') {
                popupBackground.detach();
            }
        });
        popupBackground.on('click', function () { return _this.close(); });
        return popupBackground;
    };
    ResponsiveDropdown.prototype.saveContentPosition = function () {
        var dropdownContentPreviousSibling = this.dropdownContent.element.el.previousSibling;
        var dropdownContentParent = this.dropdownContent.element.el.parentElement;
        this.previousSibling = dropdownContentPreviousSibling ? Dom_1.$$(dropdownContentPreviousSibling) : null;
        this.parent = Dom_1.$$(dropdownContentParent);
    };
    ResponsiveDropdown.prototype.restoreContentPosition = function () {
        Eif (this.previousSibling) {
            this.dropdownContent.element.insertAfter(this.previousSibling.el);
        }
        else {
            this.parent.prepend(this.dropdownContent.element.el);
        }
    };
    ResponsiveDropdown.TRANSPARENT_BACKGROUND_OPACITY = '0.9';
    ResponsiveDropdown.DROPDOWN_BACKGROUND_CSS_CLASS_NAME = 'coveo-dropdown-background';
    ResponsiveDropdown.DROPDOWN_BACKGROUND_ACTIVE_CSS_CLASS_NAME = 'coveo-dropdown-background-active';
    return ResponsiveDropdown;
}());
exports.ResponsiveDropdown = ResponsiveDropdown;
 
 
/***/ }),
/* 181 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* WEBPACK VAR INJECTION */(function(global) {/**!
 * @fileOverview Kickass library to create and place poppers near their reference elements.
 * @version 1.14.3
 * @license
 * Copyright (c) 2016 Federico Zivolo and 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 isBrowser = typeof window !== 'undefined' && typeof document !== 'undefined';
 
var longerTimeoutBrowsers = ['Edge', 'Trident', 'Firefox'];
var timeoutDuration = 0;
for (var i = 0; i < longerTimeoutBrowsers.length; i += 1) {
  Iif (isBrowser && navigator.userAgent.indexOf(longerTimeoutBrowsers[i]) >= 0) {
    timeoutDuration = 1;
    break;
  }
}
 
function microtaskDebounce(fn) {
  var called = false;
  return function () {
    Iif (called) {
      return;
    }
    called = true;
    window.Promise.resolve().then(function () {
      called = false;
      fn();
    });
  };
}
 
function taskDebounce(fn) {
  var scheduled = false;
  return function () {
    if (!scheduled) {
      scheduled = true;
      setTimeout(function () {
        scheduled = false;
        fn();
      }, timeoutDuration);
    }
  };
}
 
var supportsMicroTasks = isBrowser && window.Promise;
 
/**
* Create a debounced version of a method, that's asynchronously deferred
* but called in the minimum time possible.
*
* @method
* @memberof Popper.Utils
* @argument {Function} fn
* @returns {Function}
*/
var debounce = supportsMicroTasks ? microtaskDebounce : taskDebounce;
 
/**
 * Check if the given variable is a function
 * @method
 * @memberof Popper.Utils
 * @argument {Any} functionToCheck - variable to check
 * @returns {Boolean} answer to: is a function?
 */
function isFunction(functionToCheck) {
  var getType = {};
  return functionToCheck && getType.toString.call(functionToCheck) === '[object Function]';
}
 
/**
 * Get CSS computed property of the given element
 * @method
 * @memberof Popper.Utils
 * @argument {Eement} element
 * @argument {String} property
 */
function getStyleComputedProperty(element, property) {
  Iif (element.nodeType !== 1) {
    return [];
  }
  // NOTE: 1 DOM access here
  var css = getComputedStyle(element, null);
  return property ? css[property] : css;
}
 
/**
 * Returns the parentNode or the host of the element
 * @method
 * @memberof Popper.Utils
 * @argument {Element} element
 * @returns {Element} parent
 */
function getParentNode(element) {
  Iif (element.nodeName === 'HTML') {
    return element;
  }
  return element.parentNode || element.host;
}
 
/**
 * Returns the scrolling parent of the given element
 * @method
 * @memberof Popper.Utils
 * @argument {Element} element
 * @returns {Element} scroll parent
 */
function getScrollParent(element) {
  // Return body, `getScroll` will take care to get the correct `scrollTop` from it
  if (!element) {
    return document.body;
  }
 
  switch (element.nodeName) {
    case 'HTML':
    case 'BODY':
      return element.ownerDocument.body;
    case '#document':
      return element.body;
  }
 
  // Firefox want us to check `-x` and `-y` variations as well
 
  var _getStyleComputedProp = getStyleComputedProperty(element),
      overflow = _getStyleComputedProp.overflow,
      overflowX = _getStyleComputedProp.overflowX,
      overflowY = _getStyleComputedProp.overflowY;
 
  Iif (/(auto|scroll|overlay)/.test(overflow + overflowY + overflowX)) {
    return element;
  }
 
  return getScrollParent(getParentNode(element));
}
 
var isIE11 = isBrowser && !!(window.MSInputMethodContext && document.documentMode);
var isIE10 = isBrowser && /MSIE 10/.test(navigator.userAgent);
 
/**
 * Determines if the browser is Internet Explorer
 * @method
 * @memberof Popper.Utils
 * @param {Number} version to check
 * @returns {Boolean} isIE
 */
function isIE(version) {
  Iif (version === 11) {
    return isIE11;
  }
  if (version === 10) {
    return isIE10;
  }
  return isIE11 || isIE10;
}
 
/**
 * Returns the offset parent of the given element
 * @method
 * @memberof Popper.Utils
 * @argument {Element} element
 * @returns {Element} offset parent
 */
function getOffsetParent(element) {
  Iif (!element) {
    return document.documentElement;
  }
 
  var noOffsetParent = isIE(10) ? document.body : null;
 
  // NOTE: 1 DOM access here
  var offsetParent = element.offsetParent;
  // Skip hidden elements which don't have an offsetParent
  while (offsetParent === noOffsetParent && element.nextElementSibling) {
    offsetParent = (element = element.nextElementSibling).offsetParent;
  }
 
  var nodeName = offsetParent && offsetParent.nodeName;
 
  Eif (!nodeName || nodeName === 'BODY' || nodeName === 'HTML') {
    return element ? element.ownerDocument.documentElement : document.documentElement;
  }
 
  // .offsetParent will return the closest TD or TABLE in case
  // no offsetParent is present, I hate this job...
  if (['TD', 'TABLE'].indexOf(offsetParent.nodeName) !== -1 && getStyleComputedProperty(offsetParent, 'position') === 'static') {
    return getOffsetParent(offsetParent);
  }
 
  return offsetParent;
}
 
function isOffsetContainer(element) {
  var nodeName = element.nodeName;
 
  Iif (nodeName === 'BODY') {
    return false;
  }
  return nodeName === 'HTML' || getOffsetParent(element.firstElementChild) === element;
}
 
/**
 * Finds the root node (document, shadowDOM root) of the given element
 * @method
 * @memberof Popper.Utils
 * @argument {Element} node
 * @returns {Element} root node
 */
function getRoot(node) {
  if (node.parentNode !== null) {
    return getRoot(node.parentNode);
  }
 
  return node;
}
 
/**
 * Finds the offset parent common to the two provided nodes
 * @method
 * @memberof Popper.Utils
 * @argument {Element} element1
 * @argument {Element} element2
 * @returns {Element} common offset parent
 */
function findCommonOffsetParent(element1, element2) {
  // This check is needed to avoid errors in case one of the elements isn't defined for any reason
  if (!element1 || !element1.nodeType || !element2 || !element2.nodeType) {
    return document.documentElement;
  }
 
  // Here we make sure to give as "start" the element that comes first in the DOM
  var order = element1.compareDocumentPosition(element2) & Node.DOCUMENT_POSITION_FOLLOWING;
  var start = order ? element1 : element2;
  var end = order ? element2 : element1;
 
  // Get common ancestor container
  var range = document.createRange();
  range.setStart(start, 0);
  range.setEnd(end, 0);
  var commonAncestorContainer = range.commonAncestorContainer;
 
  // Both nodes are inside #document
 
  if (element1 !== commonAncestorContainer && element2 !== commonAncestorContainer || start.contains(end)) {
    Iif (isOffsetContainer(commonAncestorContainer)) {
      return commonAncestorContainer;
    }
 
    return getOffsetParent(commonAncestorContainer);
  }
 
  // one of the nodes is inside shadowDOM, find which one
  var element1root = getRoot(element1);
  Iif (element1root.host) {
    return findCommonOffsetParent(element1root.host, element2);
  } else {
    return findCommonOffsetParent(element1, getRoot(element2).host);
  }
}
 
/**
 * Gets the scroll value of the given element in the given side (top and left)
 * @method
 * @memberof Popper.Utils
 * @argument {Element} element
 * @argument {String} side `top` or `left`
 * @returns {number} amount of scrolled pixels
 */
function getScroll(element) {
  var side = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'top';
 
  var upperSide = side === 'top' ? 'scrollTop' : 'scrollLeft';
  var nodeName = element.nodeName;
 
  Eif (nodeName === 'BODY' || nodeName === 'HTML') {
    var html = element.ownerDocument.documentElement;
    var scrollingElement = element.ownerDocument.scrollingElement || html;
    return scrollingElement[upperSide];
  }
 
  return element[upperSide];
}
 
/*
 * Sum or subtract the element scroll values (left and top) from a given rect object
 * @method
 * @memberof Popper.Utils
 * @param {Object} rect - Rect object you want to change
 * @param {HTMLElement} element - The element from the function reads the scroll values
 * @param {Boolean} subtract - set to true if you want to subtract the scroll values
 * @return {Object} rect - The modifier rect object
 */
function includeScroll(rect, element) {
  var subtract = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
 
  var scrollTop = getScroll(element, 'top');
  var scrollLeft = getScroll(element, 'left');
  var modifier = subtract ? -1 : 1;
  rect.top += scrollTop * modifier;
  rect.bottom += scrollTop * modifier;
  rect.left += scrollLeft * modifier;
  rect.right += scrollLeft * modifier;
  return rect;
}
 
/*
 * Helper to detect borders of a given element
 * @method
 * @memberof Popper.Utils
 * @param {CSSStyleDeclaration} styles
 * Result of `getStyleComputedProperty` on the given element
 * @param {String} axis - `x` or `y`
 * @return {number} borders - The borders size of the given axis
 */
 
function getBordersSize(styles, axis) {
  var sideA = axis === 'x' ? 'Left' : 'Top';
  var sideB = sideA === 'Left' ? 'Right' : 'Bottom';
 
  return parseFloat(styles['border' + sideA + 'Width'], 10) + parseFloat(styles['border' + sideB + 'Width'], 10);
}
 
function getSize(axis, body, html, computedStyle) {
  return Math.max(body['offset' + axis], body['scroll' + axis], html['client' + axis], html['offset' + axis], html['scroll' + axis], isIE(10) ? html['offset' + axis] + computedStyle['margin' + (axis === 'Height' ? 'Top' : 'Left')] + computedStyle['margin' + (axis === 'Height' ? 'Bottom' : 'Right')] : 0);
}
 
function getWindowSizes() {
  var body = document.body;
  var html = document.documentElement;
  var computedStyle = isIE(10) && getComputedStyle(html);
 
  return {
    height: getSize('Height', body, html, computedStyle),
    width: getSize('Width', body, html, computedStyle)
  };
}
 
var classCallCheck = function (instance, Constructor) {
  Iif (!(instance instanceof Constructor)) {
    throw new TypeError("Cannot call a class as a function");
  }
};
 
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;
      Eif ("value" in descriptor) descriptor.writable = true;
      Object.defineProperty(target, descriptor.key, descriptor);
    }
  }
 
  return function (Constructor, protoProps, staticProps) {
    Eif (protoProps) defineProperties(Constructor.prototype, protoProps);
    Iif (staticProps) defineProperties(Constructor, staticProps);
    return Constructor;
  };
}();
 
 
 
 
 
var defineProperty = function (obj, key, value) {
  Iif (key in obj) {
    Object.defineProperty(obj, key, {
      value: value,
      enumerable: true,
      configurable: true,
      writable: true
    });
  } else {
    obj[key] = value;
  }
 
  return obj;
};
 
var _extends = Object.assign || function (target) {
  for (var i = 1; i < arguments.length; i++) {
    var source = arguments[i];
 
    for (var key in source) {
      if (Object.prototype.hasOwnProperty.call(source, key)) {
        target[key] = source[key];
      }
    }
  }
 
  return target;
};
 
/**
 * Given element offsets, generate an output similar to getBoundingClientRect
 * @method
 * @memberof Popper.Utils
 * @argument {Object} offsets
 * @returns {Object} ClientRect like output
 */
function getClientRect(offsets) {
  return _extends({}, offsets, {
    right: offsets.left + offsets.width,
    bottom: offsets.top + offsets.height
  });
}
 
/**
 * Get bounding client rect of given element
 * @method
 * @memberof Popper.Utils
 * @param {HTMLElement} element
 * @return {Object} client rect
 */
function getBoundingClientRect(element) {
  var rect = {};
 
  // IE10 10 FIX: Please, don't ask, the element isn't
  // considered in DOM in some circumstances...
  // This isn't reproducible in IE10 compatibility mode of IE11
  try {
    Iif (isIE(10)) {
      rect = element.getBoundingClientRect();
      var scrollTop = getScroll(element, 'top');
      var scrollLeft = getScroll(element, 'left');
      rect.top += scrollTop;
      rect.left += scrollLeft;
      rect.bottom += scrollTop;
      rect.right += scrollLeft;
    } else {
      rect = element.getBoundingClientRect();
    }
  } catch (e) {}
 
  var result = {
    left: rect.left,
    top: rect.top,
    width: rect.right - rect.left,
    height: rect.bottom - rect.top
  };
 
  // subtract scrollbar size from sizes
  var sizes = element.nodeName === 'HTML' ? getWindowSizes() : {};
  var width = sizes.width || element.clientWidth || result.right - result.left;
  var height = sizes.height || element.clientHeight || result.bottom - result.top;
 
  var horizScrollbar = element.offsetWidth - width;
  var vertScrollbar = element.offsetHeight - height;
 
  // if an hypothetical scrollbar is detected, we must be sure it's not a `border`
  // we make this check conditional for performance reasons
  if (horizScrollbar || vertScrollbar) {
    var styles = getStyleComputedProperty(element);
    horizScrollbar -= getBordersSize(styles, 'x');
    vertScrollbar -= getBordersSize(styles, 'y');
 
    result.width -= horizScrollbar;
    result.height -= vertScrollbar;
  }
 
  return getClientRect(result);
}
 
function getOffsetRectRelativeToArbitraryNode(children, parent) {
  var fixedPosition = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
 
  var isIE10 = isIE(10);
  var isHTML = parent.nodeName === 'HTML';
  var childrenRect = getBoundingClientRect(children);
  var parentRect = getBoundingClientRect(parent);
  var scrollParent = getScrollParent(children);
 
  var styles = getStyleComputedProperty(parent);
  var borderTopWidth = parseFloat(styles.borderTopWidth, 10);
  var borderLeftWidth = parseFloat(styles.borderLeftWidth, 10);
 
  // In cases where the parent is fixed, we must ignore negative scroll in offset calc
  Iif (fixedPosition && parent.nodeName === 'HTML') {
    parentRect.top = Math.max(parentRect.top, 0);
    parentRect.left = Math.max(parentRect.left, 0);
  }
  var offsets = getClientRect({
    top: childrenRect.top - parentRect.top - borderTopWidth,
    left: childrenRect.left - parentRect.left - borderLeftWidth,
    width: childrenRect.width,
    height: childrenRect.height
  });
  offsets.marginTop = 0;
  offsets.marginLeft = 0;
 
  // Subtract margins of documentElement in case it's being used as parent
  // we do this only on HTML because it's the only element that behaves
  // differently when margins are applied to it. The margins are included in
  // the box of the documentElement, in the other cases not.
  if (!isIE10 && isHTML) {
    var marginTop = parseFloat(styles.marginTop, 10);
    var marginLeft = parseFloat(styles.marginLeft, 10);
 
    offsets.top -= borderTopWidth - marginTop;
    offsets.bottom -= borderTopWidth - marginTop;
    offsets.left -= borderLeftWidth - marginLeft;
    offsets.right -= borderLeftWidth - marginLeft;
 
    // Attach marginTop and marginLeft because in some circumstances we may need them
    offsets.marginTop = marginTop;
    offsets.marginLeft = marginLeft;
  }
 
  Iif (isIE10 && !fixedPosition ? parent.contains(scrollParent) : parent === scrollParent && scrollParent.nodeName !== 'BODY') {
    offsets = includeScroll(offsets, parent);
  }
 
  return offsets;
}
 
function getViewportOffsetRectRelativeToArtbitraryNode(element) {
  var excludeScroll = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
 
  var html = element.ownerDocument.documentElement;
  var relativeOffset = getOffsetRectRelativeToArbitraryNode(element, html);
  var width = Math.max(html.clientWidth, window.innerWidth || 0);
  var height = Math.max(html.clientHeight, window.innerHeight || 0);
 
  var scrollTop = !excludeScroll ? getScroll(html) : 0;
  var scrollLeft = !excludeScroll ? getScroll(html, 'left') : 0;
 
  var offset = {
    top: scrollTop - relativeOffset.top + relativeOffset.marginTop,
    left: scrollLeft - relativeOffset.left + relativeOffset.marginLeft,
    width: width,
    height: height
  };
 
  return getClientRect(offset);
}
 
/**
 * Check if the given element is fixed or is inside a fixed parent
 * @method
 * @memberof Popper.Utils
 * @argument {Element} element
 * @argument {Element} customContainer
 * @returns {Boolean} answer to "isFixed?"
 */
function isFixed(element) {
  var nodeName = element.nodeName;
  Eif (nodeName === 'BODY' || nodeName === 'HTML') {
    return false;
  }
  if (getStyleComputedProperty(element, 'position') === 'fixed') {
    return true;
  }
  return isFixed(getParentNode(element));
}
 
/**
 * Finds the first parent of an element that has a transformed property defined
 * @method
 * @memberof Popper.Utils
 * @argument {Element} element
 * @returns {Element} first transformed parent or documentElement
 */
 
function getFixedPositionOffsetParent(element) {
  // This check is needed to avoid errors in case one of the elements isn't defined for any reason
  Iif (!element || !element.parentElement || isIE()) {
    return document.documentElement;
  }
  var el = element.parentElement;
  while (el && getStyleComputedProperty(el, 'transform') === 'none') {
    el = el.parentElement;
  }
  return el || document.documentElement;
}
 
/**
 * Computed the boundaries limits and return them
 * @method
 * @memberof Popper.Utils
 * @param {HTMLElement} popper
 * @param {HTMLElement} reference
 * @param {number} padding
 * @param {HTMLElement} boundariesElement - Element used to define the boundaries
 * @param {Boolean} fixedPosition - Is in fixed position mode
 * @returns {Object} Coordinates of the boundaries
 */
function getBoundaries(popper, reference, padding, boundariesElement) {
  var fixedPosition = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
 
  // NOTE: 1 DOM access here
 
  var boundaries = { top: 0, left: 0 };
  var offsetParent = fixedPosition ? getFixedPositionOffsetParent(popper) : findCommonOffsetParent(popper, reference);
 
  // Handle viewport case
  if (boundariesElement === 'viewport') {
    boundaries = getViewportOffsetRectRelativeToArtbitraryNode(offsetParent, fixedPosition);
  } else {
    // Handle other cases based on DOM element used as boundaries
    var boundariesNode = void 0;
    if (boundariesElement === 'scrollParent') {
      boundariesNode = getScrollParent(getParentNode(reference));
      Eif (boundariesNode.nodeName === 'BODY') {
        boundariesNode = popper.ownerDocument.documentElement;
      }
    } else Iif (boundariesElement === 'window') {
      boundariesNode = popper.ownerDocument.documentElement;
    } else {
      boundariesNode = boundariesElement;
    }
 
    var offsets = getOffsetRectRelativeToArbitraryNode(boundariesNode, offsetParent, fixedPosition);
 
    // In case of HTML, we need a different computation
    if (boundariesNode.nodeName === 'HTML' && !isFixed(offsetParent)) {
      var _getWindowSizes = getWindowSizes(),
          height = _getWindowSizes.height,
          width = _getWindowSizes.width;
 
      boundaries.top += offsets.top - offsets.marginTop;
      boundaries.bottom = height + offsets.top;
      boundaries.left += offsets.left - offsets.marginLeft;
      boundaries.right = width + offsets.left;
    } else {
      // for all the other DOM elements, this one is good
      boundaries = offsets;
    }
  }
 
  // Add paddings
  boundaries.left += padding;
  boundaries.top += padding;
  boundaries.right -= padding;
  boundaries.bottom -= padding;
 
  return boundaries;
}
 
function getArea(_ref) {
  var width = _ref.width,
      height = _ref.height;
 
  return width * height;
}
 
/**
 * Utility used to transform the `auto` placement to the placement with more
 * available space.
 * @method
 * @memberof Popper.Utils
 * @argument {Object} data - The data object generated by update method
 * @argument {Object} options - Modifiers configuration and options
 * @returns {Object} The data object, properly modified
 */
function computeAutoPlacement(placement, refRect, popper, reference, boundariesElement) {
  var padding = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 0;
 
  Eif (placement.indexOf('auto') === -1) {
    return placement;
  }
 
  var boundaries = getBoundaries(popper, reference, padding, boundariesElement);
 
  var rects = {
    top: {
      width: boundaries.width,
      height: refRect.top - boundaries.top
    },
    right: {
      width: boundaries.right - refRect.right,
      height: boundaries.height
    },
    bottom: {
      width: boundaries.width,
      height: boundaries.bottom - refRect.bottom
    },
    left: {
      width: refRect.left - boundaries.left,
      height: boundaries.height
    }
  };
 
  var sortedAreas = Object.keys(rects).map(function (key) {
    return _extends({
      key: key
    }, rects[key], {
      area: getArea(rects[key])
    });
  }).sort(function (a, b) {
    return b.area - a.area;
  });
 
  var filteredAreas = sortedAreas.filter(function (_ref2) {
    var width = _ref2.width,
        height = _ref2.height;
    return width >= popper.clientWidth && height >= popper.clientHeight;
  });
 
  var computedPlacement = filteredAreas.length > 0 ? filteredAreas[0].key : sortedAreas[0].key;
 
  var variation = placement.split('-')[1];
 
  return computedPlacement + (variation ? '-' + variation : '');
}
 
/**
 * Get offsets to the reference element
 * @method
 * @memberof Popper.Utils
 * @param {Object} state
 * @param {Element} popper - the popper element
 * @param {Element} reference - the reference element (the popper will be relative to this)
 * @param {Element} fixedPosition - is in fixed position mode
 * @returns {Object} An object containing the offsets which will be applied to the popper
 */
function getReferenceOffsets(state, popper, reference) {
  var fixedPosition = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
 
  var commonOffsetParent = fixedPosition ? getFixedPositionOffsetParent(popper) : findCommonOffsetParent(popper, reference);
  return getOffsetRectRelativeToArbitraryNode(reference, commonOffsetParent, fixedPosition);
}
 
/**
 * Get the outer sizes of the given element (offset size + margins)
 * @method
 * @memberof Popper.Utils
 * @argument {Element} element
 * @returns {Object} object containing width and height properties
 */
function getOuterSizes(element) {
  var styles = getComputedStyle(element);
  var x = parseFloat(styles.marginTop) + parseFloat(styles.marginBottom);
  var y = parseFloat(styles.marginLeft) + parseFloat(styles.marginRight);
  var result = {
    width: element.offsetWidth + y,
    height: element.offsetHeight + x
  };
  return result;
}
 
/**
 * Get the opposite placement of the given one
 * @method
 * @memberof Popper.Utils
 * @argument {String} placement
 * @returns {String} flipped placement
 */
function getOppositePlacement(placement) {
  var hash = { left: 'right', right: 'left', bottom: 'top', top: 'bottom' };
  return placement.replace(/left|right|bottom|top/g, function (matched) {
    return hash[matched];
  });
}
 
/**
 * Get offsets to the popper
 * @method
 * @memberof Popper.Utils
 * @param {Object} position - CSS position the Popper will get applied
 * @param {HTMLElement} popper - the popper element
 * @param {Object} referenceOffsets - the reference offsets (the popper will be relative to this)
 * @param {String} placement - one of the valid placement options
 * @returns {Object} popperOffsets - An object containing the offsets which will be applied to the popper
 */
function getPopperOffsets(popper, referenceOffsets, placement) {
  placement = placement.split('-')[0];
 
  // Get popper node sizes
  var popperRect = getOuterSizes(popper);
 
  // Add position, width and height to our offsets object
  var popperOffsets = {
    width: popperRect.width,
    height: popperRect.height
  };
 
  // depending by the popper placement we have to compute its offsets slightly differently
  var isHoriz = ['right', 'left'].indexOf(placement) !== -1;
  var mainSide = isHoriz ? 'top' : 'left';
  var secondarySide = isHoriz ? 'left' : 'top';
  var measurement = isHoriz ? 'height' : 'width';
  var secondaryMeasurement = !isHoriz ? 'height' : 'width';
 
  popperOffsets[mainSide] = referenceOffsets[mainSide] + referenceOffsets[measurement] / 2 - popperRect[measurement] / 2;
  if (placement === secondarySide) {
    popperOffsets[secondarySide] = referenceOffsets[secondarySide] - popperRect[secondaryMeasurement];
  } else {
    popperOffsets[secondarySide] = referenceOffsets[getOppositePlacement(secondarySide)];
  }
 
  return popperOffsets;
}
 
/**
 * Mimics the `find` method of Array
 * @method
 * @memberof Popper.Utils
 * @argument {Array} arr
 * @argument prop
 * @argument value
 * @returns index or -1
 */
function find(arr, check) {
  // use native find if supported
  Eif (Array.prototype.find) {
    return arr.find(check);
  }
 
  // use `filter` to obtain the same behavior of `find`
  return arr.filter(check)[0];
}
 
/**
 * Return the index of the matching object
 * @method
 * @memberof Popper.Utils
 * @argument {Array} arr
 * @argument prop
 * @argument value
 * @returns index or -1
 */
function findIndex(arr, prop, value) {
  // use native findIndex if supported
  if (Array.prototype.findIndex) {
    return arr.findIndex(function (cur) {
      return cur[prop] === value;
    });
  }
 
  // use `find` + `indexOf` if `findIndex` isn't supported
  var match = find(arr, function (obj) {
    return obj[prop] === value;
  });
  return arr.indexOf(match);
}
 
/**
 * Loop trough the list of modifiers and run them in order,
 * each of them will then edit the data object.
 * @method
 * @memberof Popper.Utils
 * @param {dataObject} data
 * @param {Array} modifiers
 * @param {String} ends - Optional modifier name used as stopper
 * @returns {dataObject}
 */
function runModifiers(modifiers, data, ends) {
  var modifiersToRun = ends === undefined ? modifiers : modifiers.slice(0, findIndex(modifiers, 'name', ends));
 
  modifiersToRun.forEach(function (modifier) {
    Iif (modifier['function']) {
      // eslint-disable-line dot-notation
      console.warn('`modifier.function` is deprecated, use `modifier.fn`!');
    }
    var fn = modifier['function'] || modifier.fn; // eslint-disable-line dot-notation
    if (modifier.enabled && isFunction(fn)) {
      // Add properties to offsets to make them a complete clientRect object
      // we do this before each modifier to make sure the previous one doesn't
      // mess with these values
      data.offsets.popper = getClientRect(data.offsets.popper);
      data.offsets.reference = getClientRect(data.offsets.reference);
 
      data = fn(data, modifier);
    }
  });
 
  return data;
}
 
/**
 * Updates the position of the popper, computing the new offsets and applying
 * the new style.<br />
 * Prefer `scheduleUpdate` over `update` because of performance reasons.
 * @method
 * @memberof Popper
 */
function update() {
  // if popper is destroyed, don't perform any further update
  if (this.state.isDestroyed) {
    return;
  }
 
  var data = {
    instance: this,
    styles: {},
    arrowStyles: {},
    attributes: {},
    flipped: false,
    offsets: {}
  };
 
  // compute reference element offsets
  data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);
 
  // compute auto placement, store placement inside the data object,
  // modifiers will be able to edit `placement` if needed
  // and refer to originalPlacement to know the original value
  data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);
 
  // store the computed placement inside `originalPlacement`
  data.originalPlacement = data.placement;
 
  data.positionFixed = this.options.positionFixed;
 
  // compute the popper offsets
  data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);
 
  data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';
 
  // run the modifiers
  data = runModifiers(this.modifiers, data);
 
  // the first `update` will call `onCreate` callback
  // the other ones will call `onUpdate` callback
  if (!this.state.isCreated) {
    this.state.isCreated = true;
    this.options.onCreate(data);
  } else {
    this.options.onUpdate(data);
  }
}
 
/**
 * Helper used to know if the given modifier is enabled.
 * @method
 * @memberof Popper.Utils
 * @returns {Boolean}
 */
function isModifierEnabled(modifiers, modifierName) {
  return modifiers.some(function (_ref) {
    var name = _ref.name,
        enabled = _ref.enabled;
    return enabled && name === modifierName;
  });
}
 
/**
 * Get the prefixed supported property name
 * @method
 * @memberof Popper.Utils
 * @argument {String} property (camelCase)
 * @returns {String} prefixed property (camelCase or PascalCase, depending on the vendor prefix)
 */
function getSupportedPropertyName(property) {
  var prefixes = [false, 'ms', 'Webkit', 'Moz', 'O'];
  var upperProp = property.charAt(0).toUpperCase() + property.slice(1);
 
  for (var i = 0; i < prefixes.length; i++) {
    var prefix = prefixes[i];
    var toCheck = prefix ? '' + prefix + upperProp : property;
    Eif (typeof document.body.style[toCheck] !== 'undefined') {
      return toCheck;
    }
  }
  return null;
}
 
/**
 * Destroy the popper
 * @method
 * @memberof Popper
 */
function destroy() {
  this.state.isDestroyed = true;
 
  // touch DOM only if `applyStyle` modifier is enabled
  Eif (isModifierEnabled(this.modifiers, 'applyStyle')) {
    this.popper.removeAttribute('x-placement');
    this.popper.style.position = '';
    this.popper.style.top = '';
    this.popper.style.left = '';
    this.popper.style.right = '';
    this.popper.style.bottom = '';
    this.popper.style.willChange = '';
    this.popper.style[getSupportedPropertyName('transform')] = '';
  }
 
  this.disableEventListeners();
 
  // remove the popper if user explicity asked for the deletion on destroy
  // do not use `remove` because IE11 doesn't support it
  Iif (this.options.removeOnDestroy) {
    this.popper.parentNode.removeChild(this.popper);
  }
  return this;
}
 
/**
 * Get the window associated with the element
 * @argument {Element} element
 * @returns {Window}
 */
function getWindow(element) {
  var ownerDocument = element.ownerDocument;
  return ownerDocument ? ownerDocument.defaultView : window;
}
 
function attachToScrollParents(scrollParent, event, callback, scrollParents) {
  var isBody = scrollParent.nodeName === 'BODY';
  var target = isBody ? scrollParent.ownerDocument.defaultView : scrollParent;
  target.addEventListener(event, callback, { passive: true });
 
  Iif (!isBody) {
    attachToScrollParents(getScrollParent(target.parentNode), event, callback, scrollParents);
  }
  scrollParents.push(target);
}
 
/**
 * Setup needed event listeners used to update the popper position
 * @method
 * @memberof Popper.Utils
 * @private
 */
function setupEventListeners(reference, options, state, updateBound) {
  // Resize event listener on window
  state.updateBound = updateBound;
  getWindow(reference).addEventListener('resize', state.updateBound, { passive: true });
 
  // Scroll event listener on scroll parents
  var scrollElement = getScrollParent(reference);
  attachToScrollParents(scrollElement, 'scroll', state.updateBound, state.scrollParents);
  state.scrollElement = scrollElement;
  state.eventsEnabled = true;
 
  return state;
}
 
/**
 * It will add resize/scroll events and start recalculating
 * position of the popper element when they are triggered.
 * @method
 * @memberof Popper
 */
function enableEventListeners() {
  Eif (!this.state.eventsEnabled) {
    this.state = setupEventListeners(this.reference, this.options, this.state, this.scheduleUpdate);
  }
}
 
/**
 * Remove event listeners used to update the popper position
 * @method
 * @memberof Popper.Utils
 * @private
 */
function removeEventListeners(reference, state) {
  // Remove resize event listener on window
  getWindow(reference).removeEventListener('resize', state.updateBound);
 
  // Remove scroll event listener on scroll parents
  state.scrollParents.forEach(function (target) {
    target.removeEventListener('scroll', state.updateBound);
  });
 
  // Reset state
  state.updateBound = null;
  state.scrollParents = [];
  state.scrollElement = null;
  state.eventsEnabled = false;
  return state;
}
 
/**
 * It will remove resize/scroll events and won't recalculate popper position
 * when they are triggered. It also won't trigger onUpdate callback anymore,
 * unless you call `update` method manually.
 * @method
 * @memberof Popper
 */
function disableEventListeners() {
  Iif (this.state.eventsEnabled) {
    cancelAnimationFrame(this.scheduleUpdate);
    this.state = removeEventListeners(this.reference, this.state);
  }
}
 
/**
 * Tells if a given input is a number
 * @method
 * @memberof Popper.Utils
 * @param {*} input to check
 * @return {Boolean}
 */
function isNumeric(n) {
  return n !== '' && !isNaN(parseFloat(n)) && isFinite(n);
}
 
/**
 * Set the style to the given popper
 * @method
 * @memberof Popper.Utils
 * @argument {Element} element - Element to apply the style to
 * @argument {Object} styles
 * Object with a list of properties and values which will be applied to the element
 */
function setStyles(element, styles) {
  Object.keys(styles).forEach(function (prop) {
    var unit = '';
    // add unit if the value is numeric and is one of the following
    if (['width', 'height', 'top', 'right', 'bottom', 'left'].indexOf(prop) !== -1 && isNumeric(styles[prop])) {
      unit = 'px';
    }
    element.style[prop] = styles[prop] + unit;
  });
}
 
/**
 * Set the attributes to the given popper
 * @method
 * @memberof Popper.Utils
 * @argument {Element} element - Element to apply the attributes to
 * @argument {Object} styles
 * Object with a list of properties and values which will be applied to the element
 */
function setAttributes(element, attributes) {
  Object.keys(attributes).forEach(function (prop) {
    var value = attributes[prop];
    if (value !== false) {
      element.setAttribute(prop, attributes[prop]);
    } else {
      element.removeAttribute(prop);
    }
  });
}
 
/**
 * @function
 * @memberof Modifiers
 * @argument {Object} data - The data object generated by `update` method
 * @argument {Object} data.styles - List of style properties - values to apply to popper element
 * @argument {Object} data.attributes - List of attribute properties - values to apply to popper element
 * @argument {Object} options - Modifiers configuration and options
 * @returns {Object} The same data object
 */
function applyStyle(data) {
  // any property present in `data.styles` will be applied to the popper,
  // in this way we can make the 3rd party modifiers add custom styles to it
  // Be aware, modifiers could override the properties defined in the previous
  // lines of this modifier!
  setStyles(data.instance.popper, data.styles);
 
  // any property present in `data.attributes` will be applied to the popper,
  // they will be set as HTML attributes of the element
  setAttributes(data.instance.popper, data.attributes);
 
  // if arrowElement is defined and arrowStyles has some properties
  if (data.arrowElement && Object.keys(data.arrowStyles).length) {
    setStyles(data.arrowElement, data.arrowStyles);
  }
 
  return data;
}
 
/**
 * Set the x-placement attribute before everything else because it could be used
 * to add margins to the popper margins needs to be calculated to get the
 * correct popper offsets.
 * @method
 * @memberof Popper.modifiers
 * @param {HTMLElement} reference - The reference element used to position the popper
 * @param {HTMLElement} popper - The HTML element used as popper
 * @param {Object} options - Popper.js options
 */
function applyStyleOnLoad(reference, popper, options, modifierOptions, state) {
  // compute reference element offsets
  var referenceOffsets = getReferenceOffsets(state, popper, reference, options.positionFixed);
 
  // compute auto placement, store placement inside the data object,
  // modifiers will be able to edit `placement` if needed
  // and refer to originalPlacement to know the original value
  var placement = computeAutoPlacement(options.placement, referenceOffsets, popper, reference, options.modifiers.flip.boundariesElement, options.modifiers.flip.padding);
 
  popper.setAttribute('x-placement', placement);
 
  // Apply `position` to popper before anything else because
  // without the position applied we can't guarantee correct computations
  setStyles(popper, { position: options.positionFixed ? 'fixed' : 'absolute' });
 
  return options;
}
 
/**
 * @function
 * @memberof Modifiers
 * @argument {Object} data - The data object generated by `update` method
 * @argument {Object} options - Modifiers configuration and options
 * @returns {Object} The data object, properly modified
 */
function computeStyle(data, options) {
  var x = options.x,
      y = options.y;
  var popper = data.offsets.popper;
 
  // Remove this legacy support in Popper.js v2
 
  var legacyGpuAccelerationOption = find(data.instance.modifiers, function (modifier) {
    return modifier.name === 'applyStyle';
  }).gpuAcceleration;
  Iif (legacyGpuAccelerationOption !== undefined) {
    console.warn('WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!');
  }
  var gpuAcceleration = legacyGpuAccelerationOption !== undefined ? legacyGpuAccelerationOption : options.gpuAcceleration;
 
  var offsetParent = getOffsetParent(data.instance.popper);
  var offsetParentRect = getBoundingClientRect(offsetParent);
 
  // Styles
  var styles = {
    position: popper.position
  };
 
  // Avoid blurry text by using full pixel integers.
  // For pixel-perfect positioning, top/bottom prefers rounded
  // values, while left/right prefers floored values.
  var offsets = {
    left: Math.floor(popper.left),
    top: Math.round(popper.top),
    bottom: Math.round(popper.bottom),
    right: Math.floor(popper.right)
  };
 
  var sideA = x === 'bottom' ? 'top' : 'bottom';
  var sideB = y === 'right' ? 'left' : 'right';
 
  // if gpuAcceleration is set to `true` and transform is supported,
  //  we use `translate3d` to apply the position to the popper we
  // automatically use the supported prefixed version if needed
  var prefixedProperty = getSupportedPropertyName('transform');
 
  // now, let's make a step back and look at this code closely (wtf?)
  // If the content of the popper grows once it's been positioned, it
  // may happen that the popper gets misplaced because of the new content
  // overflowing its reference element
  // To avoid this problem, we provide two options (x and y), which allow
  // the consumer to define the offset origin.
  // If we position a popper on top of a reference element, we can set
  // `x` to `top` to make the popper grow towards its top instead of
  // its bottom.
  var left = void 0,
      top = void 0;
  Iif (sideA === 'bottom') {
    top = -offsetParentRect.height + offsets.bottom;
  } else {
    top = offsets.top;
  }
  Iif (sideB === 'right') {
    left = -offsetParentRect.width + offsets.right;
  } else {
    left = offsets.left;
  }
  if (gpuAcceleration && prefixedProperty) {
    styles[prefixedProperty] = 'translate3d(' + left + 'px, ' + top + 'px, 0)';
    styles[sideA] = 0;
    styles[sideB] = 0;
    styles.willChange = 'transform';
  } else {
    // othwerise, we use the standard `top`, `left`, `bottom` and `right` properties
    var invertTop = sideA === 'bottom' ? -1 : 1;
    var invertLeft = sideB === 'right' ? -1 : 1;
    styles[sideA] = top * invertTop;
    styles[sideB] = left * invertLeft;
    styles.willChange = sideA + ', ' + sideB;
  }
 
  // Attributes
  var attributes = {
    'x-placement': data.placement
  };
 
  // Update `data` attributes, styles and arrowStyles
  data.attributes = _extends({}, attributes, data.attributes);
  data.styles = _extends({}, styles, data.styles);
  data.arrowStyles = _extends({}, data.offsets.arrow, data.arrowStyles);
 
  return data;
}
 
/**
 * Helper used to know if the given modifier depends from another one.<br />
 * It checks if the needed modifier is listed and enabled.
 * @method
 * @memberof Popper.Utils
 * @param {Array} modifiers - list of modifiers
 * @param {String} requestingName - name of requesting modifier
 * @param {String} requestedName - name of requested modifier
 * @returns {Boolean}
 */
function isModifierRequired(modifiers, requestingName, requestedName) {
  var requesting = find(modifiers, function (_ref) {
    var name = _ref.name;
    return name === requestingName;
  });
 
  var isRequired = !!requesting && modifiers.some(function (modifier) {
    return modifier.name === requestedName && modifier.enabled && modifier.order < requesting.order;
  });
 
  Iif (!isRequired) {
    var _requesting = '`' + requestingName + '`';
    var requested = '`' + requestedName + '`';
    console.warn(requested + ' modifier is required by ' + _requesting + ' modifier in order to work, be sure to include it before ' + _requesting + '!');
  }
  return isRequired;
}
 
/**
 * @function
 * @memberof Modifiers
 * @argument {Object} data - The data object generated by update method
 * @argument {Object} options - Modifiers configuration and options
 * @returns {Object} The data object, properly modified
 */
function arrow(data, options) {
  var _data$offsets$arrow;
 
  // arrow depends on keepTogether in order to work
  Iif (!isModifierRequired(data.instance.modifiers, 'arrow', 'keepTogether')) {
    return data;
  }
 
  var arrowElement = options.element;
 
  // if arrowElement is a string, suppose it's a CSS selector
  if (typeof arrowElement === 'string') {
    arrowElement = data.instance.popper.querySelector(arrowElement);
 
    // if arrowElement is not found, don't run the modifier
    Eif (!arrowElement) {
      return data;
    }
  } else {
    // if the arrowElement isn't a query selector we must check that the
    // provided DOM node is child of its popper node
    Iif (!data.instance.popper.contains(arrowElement)) {
      console.warn('WARNING: `arrow.element` must be child of its popper element!');
      return data;
    }
  }
 
  var placement = data.placement.split('-')[0];
  var _data$offsets = data.offsets,
      popper = _data$offsets.popper,
      reference = _data$offsets.reference;
 
  var isVertical = ['left', 'right'].indexOf(placement) !== -1;
 
  var len = isVertical ? 'height' : 'width';
  var sideCapitalized = isVertical ? 'Top' : 'Left';
  var side = sideCapitalized.toLowerCase();
  var altSide = isVertical ? 'left' : 'top';
  var opSide = isVertical ? 'bottom' : 'right';
  var arrowElementSize = getOuterSizes(arrowElement)[len];
 
  //
  // extends keepTogether behavior making sure the popper and its
  // reference have enough pixels in conjuction
  //
 
  // top/left side
  Iif (reference[opSide] - arrowElementSize < popper[side]) {
    data.offsets.popper[side] -= popper[side] - (reference[opSide] - arrowElementSize);
  }
  // bottom/right side
  Iif (reference[side] + arrowElementSize > popper[opSide]) {
    data.offsets.popper[side] += reference[side] + arrowElementSize - popper[opSide];
  }
  data.offsets.popper = getClientRect(data.offsets.popper);
 
  // compute center of the popper
  var center = reference[side] + reference[len] / 2 - arrowElementSize / 2;
 
  // Compute the sideValue using the updated popper offsets
  // take popper margin in account because we don't have this info available
  var css = getStyleComputedProperty(data.instance.popper);
  var popperMarginSide = parseFloat(css['margin' + sideCapitalized], 10);
  var popperBorderSide = parseFloat(css['border' + sideCapitalized + 'Width'], 10);
  var sideValue = center - data.offsets.popper[side] - popperMarginSide - popperBorderSide;
 
  // prevent arrowElement from being placed not contiguously to its popper
  sideValue = Math.max(Math.min(popper[len] - arrowElementSize, sideValue), 0);
 
  data.arrowElement = arrowElement;
  data.offsets.arrow = (_data$offsets$arrow = {}, defineProperty(_data$offsets$arrow, side, Math.round(sideValue)), defineProperty(_data$offsets$arrow, altSide, ''), _data$offsets$arrow);
 
  return data;
}
 
/**
 * Get the opposite placement variation of the given one
 * @method
 * @memberof Popper.Utils
 * @argument {String} placement variation
 * @returns {String} flipped placement variation
 */
function getOppositeVariation(variation) {
  if (variation === 'end') {
    return 'start';
  } else if (variation === 'start') {
    return 'end';
  }
  return variation;
}
 
/**
 * List of accepted placements to use as values of the `placement` option.<br />
 * Valid placements are:
 * - `auto`
 * - `top`
 * - `right`
 * - `bottom`
 * - `left`
 *
 * Each placement can have a variation from this list:
 * - `-start`
 * - `-end`
 *
 * Variations are interpreted easily if you think of them as the left to right
 * written languages. Horizontally (`top` and `bottom`), `start` is left and `end`
 * is right.<br />
 * Vertically (`left` and `right`), `start` is top and `end` is bottom.
 *
 * Some valid examples are:
 * - `top-end` (on top of reference, right aligned)
 * - `right-start` (on right of reference, top aligned)
 * - `bottom` (on bottom, centered)
 * - `auto-right` (on the side with more space available, alignment depends by placement)
 *
 * @static
 * @type {Array}
 * @enum {String}
 * @readonly
 * @method placements
 * @memberof Popper
 */
var placements = ['auto-start', 'auto', 'auto-end', 'top-start', 'top', 'top-end', 'right-start', 'right', 'right-end', 'bottom-end', 'bottom', 'bottom-start', 'left-end', 'left', 'left-start'];
 
// Get rid of `auto` `auto-start` and `auto-end`
var validPlacements = placements.slice(3);
 
/**
 * Given an initial placement, returns all the subsequent placements
 * clockwise (or counter-clockwise).
 *
 * @method
 * @memberof Popper.Utils
 * @argument {String} placement - A valid placement (it accepts variations)
 * @argument {Boolean} counter - Set to true to walk the placements counterclockwise
 * @returns {Array} placements including their variations
 */
function clockwise(placement) {
  var counter = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
 
  var index = validPlacements.indexOf(placement);
  var arr = validPlacements.slice(index + 1).concat(validPlacements.slice(0, index));
  return counter ? arr.reverse() : arr;
}
 
var BEHAVIORS = {
  FLIP: 'flip',
  CLOCKWISE: 'clockwise',
  COUNTERCLOCKWISE: 'counterclockwise'
};
 
/**
 * @function
 * @memberof Modifiers
 * @argument {Object} data - The data object generated by update method
 * @argument {Object} options - Modifiers configuration and options
 * @returns {Object} The data object, properly modified
 */
function flip(data, options) {
  // if `inner` modifier is enabled, we can't use the `flip` modifier
  Iif (isModifierEnabled(data.instance.modifiers, 'inner')) {
    return data;
  }
 
  Iif (data.flipped && data.placement === data.originalPlacement) {
    // seems like flip is trying to loop, probably there's not enough space on any of the flippable sides
    return data;
  }
 
  var boundaries = getBoundaries(data.instance.popper, data.instance.reference, options.padding, options.boundariesElement, data.positionFixed);
 
  var placement = data.placement.split('-')[0];
  var placementOpposite = getOppositePlacement(placement);
  var variation = data.placement.split('-')[1] || '';
 
  var flipOrder = [];
 
  switch (options.behavior) {
    case BEHAVIORS.FLIP:
      flipOrder = [placement, placementOpposite];
      break;
    case BEHAVIORS.CLOCKWISE:
      flipOrder = clockwise(placement);
      break;
    case BEHAVIORS.COUNTERCLOCKWISE:
      flipOrder = clockwise(placement, true);
      break;
    default:
      flipOrder = options.behavior;
  }
 
  flipOrder.forEach(function (step, index) {
    if (placement !== step || flipOrder.length === index + 1) {
      return data;
    }
 
    placement = data.placement.split('-')[0];
    placementOpposite = getOppositePlacement(placement);
 
    var popperOffsets = data.offsets.popper;
    var refOffsets = data.offsets.reference;
 
    // using floor because the reference offsets may contain decimals we are not going to consider here
    var floor = Math.floor;
    var overlapsRef = placement === 'left' && floor(popperOffsets.right) > floor(refOffsets.left) || placement === 'right' && floor(popperOffsets.left) < floor(refOffsets.right) || placement === 'top' && floor(popperOffsets.bottom) > floor(refOffsets.top) || placement === 'bottom' && floor(popperOffsets.top) < floor(refOffsets.bottom);
 
    var overflowsLeft = floor(popperOffsets.left) < floor(boundaries.left);
    var overflowsRight = floor(popperOffsets.right) > floor(boundaries.right);
    var overflowsTop = floor(popperOffsets.top) < floor(boundaries.top);
    var overflowsBottom = floor(popperOffsets.bottom) > floor(boundaries.bottom);
 
    var overflowsBoundaries = placement === 'left' && overflowsLeft || placement === 'right' && overflowsRight || placement === 'top' && overflowsTop || placement === 'bottom' && overflowsBottom;
 
    // flip the variation if required
    var isVertical = ['top', 'bottom'].indexOf(placement) !== -1;
    var flippedVariation = !!options.flipVariations && (isVertical && variation === 'start' && overflowsLeft || isVertical && variation === 'end' && overflowsRight || !isVertical && variation === 'start' && overflowsTop || !isVertical && variation === 'end' && overflowsBottom);
 
    Iif (overlapsRef || overflowsBoundaries || flippedVariation) {
      // this boolean to detect any flip loop
      data.flipped = true;
 
      if (overlapsRef || overflowsBoundaries) {
        placement = flipOrder[index + 1];
      }
 
      if (flippedVariation) {
        variation = getOppositeVariation(variation);
      }
 
      data.placement = placement + (variation ? '-' + variation : '');
 
      // this object contains `position`, we want to preserve it along with
      // any additional property we may add in the future
      data.offsets.popper = _extends({}, data.offsets.popper, getPopperOffsets(data.instance.popper, data.offsets.reference, data.placement));
 
      data = runModifiers(data.instance.modifiers, data, 'flip');
    }
  });
  return data;
}
 
/**
 * @function
 * @memberof Modifiers
 * @argument {Object} data - The data object generated by update method
 * @argument {Object} options - Modifiers configuration and options
 * @returns {Object} The data object, properly modified
 */
function keepTogether(data) {
  var _data$offsets = data.offsets,
      popper = _data$offsets.popper,
      reference = _data$offsets.reference;
 
  var placement = data.placement.split('-')[0];
  var floor = Math.floor;
  var isVertical = ['top', 'bottom'].indexOf(placement) !== -1;
  var side = isVertical ? 'right' : 'bottom';
  var opSide = isVertical ? 'left' : 'top';
  var measurement = isVertical ? 'width' : 'height';
 
  Iif (popper[side] < floor(reference[opSide])) {
    data.offsets.popper[opSide] = floor(reference[opSide]) - popper[measurement];
  }
  Iif (popper[opSide] > floor(reference[side])) {
    data.offsets.popper[opSide] = floor(reference[side]);
  }
 
  return data;
}
 
/**
 * Converts a string containing value + unit into a px value number
 * @function
 * @memberof {modifiers~offset}
 * @private
 * @argument {String} str - Value + unit string
 * @argument {String} measurement - `height` or `width`
 * @argument {Object} popperOffsets
 * @argument {Object} referenceOffsets
 * @returns {Number|String}
 * Value in pixels, or original string if no values were extracted
 */
function toValue(str, measurement, popperOffsets, referenceOffsets) {
  // separate value from unit
  var split = str.match(/((?:\-|\+)?\d*\.?\d*)(.*)/);
  var value = +split[1];
  var unit = split[2];
 
  // If it's not a number it's an operator, I guess
  if (!value) {
    return str;
  }
 
  Iif (unit.indexOf('%') === 0) {
    var element = void 0;
    switch (unit) {
      case '%p':
        element = popperOffsets;
        break;
      case '%':
      case '%r':
      default:
        element = referenceOffsets;
    }
 
    var rect = getClientRect(element);
    return rect[measurement] / 100 * value;
  } else Iif (unit === 'vh' || unit === 'vw') {
    // if is a vh or vw, we calculate the size based on the viewport
    var size = void 0;
    if (unit === 'vh') {
      size = Math.max(document.documentElement.clientHeight, window.innerHeight || 0);
    } else {
      size = Math.max(document.documentElement.clientWidth, window.innerWidth || 0);
    }
    return size / 100 * value;
  } else {
    // if is an explicit pixel unit, we get rid of the unit and keep the value
    // if is an implicit unit, it's px, and we return just the value
    return value;
  }
}
 
/**
 * Parse an `offset` string to extrapolate `x` and `y` numeric offsets.
 * @function
 * @memberof {modifiers~offset}
 * @private
 * @argument {String} offset
 * @argument {Object} popperOffsets
 * @argument {Object} referenceOffsets
 * @argument {String} basePlacement
 * @returns {Array} a two cells array with x and y offsets in numbers
 */
function parseOffset(offset, popperOffsets, referenceOffsets, basePlacement) {
  var offsets = [0, 0];
 
  // Use height if placement is left or right and index is 0 otherwise use width
  // in this way the first offset will use an axis and the second one
  // will use the other one
  var useHeight = ['right', 'left'].indexOf(basePlacement) !== -1;
 
  // Split the offset string to obtain a list of values and operands
  // The regex addresses values with the plus or minus sign in front (+10, -20, etc)
  var fragments = offset.split(/(\+|\-)/).map(function (frag) {
    return frag.trim();
  });
 
  // Detect if the offset string contains a pair of values or a single one
  // they could be separated by comma or space
  var divider = fragments.indexOf(find(fragments, function (frag) {
    return frag.search(/,|\s/) !== -1;
  }));
 
  Iif (fragments[divider] && fragments[divider].indexOf(',') === -1) {
    console.warn('Offsets separated by white space(s) are deprecated, use a comma (,) instead.');
  }
 
  // If divider is found, we divide the list of values and operands to divide
  // them by ofset X and Y.
  var splitRegex = /\s*,\s*|\s+/;
  var ops = divider !== -1 ? [fragments.slice(0, divider).concat([fragments[divider].split(splitRegex)[0]]), [fragments[divider].split(splitRegex)[1]].concat(fragments.slice(divider + 1))] : [fragments];
 
  // Convert the values with units to absolute pixels to allow our computations
  ops = ops.map(function (op, index) {
    // Most of the units rely on the orientation of the popper
    var measurement = (index === 1 ? !useHeight : useHeight) ? 'height' : 'width';
    var mergeWithPrevious = false;
    return op
    // This aggregates any `+` or `-` sign that aren't considered operators
    // e.g.: 10 + +5 => [10, +, +5]
    .reduce(function (a, b) {
      Iif (a[a.length - 1] === '' && ['+', '-'].indexOf(b) !== -1) {
        a[a.length - 1] = b;
        mergeWithPrevious = true;
        return a;
      } else Iif (mergeWithPrevious) {
        a[a.length - 1] += b;
        mergeWithPrevious = false;
        return a;
      } else {
        return a.concat(b);
      }
    }, [])
    // Here we convert the string values into number values (in px)
    .map(function (str) {
      return toValue(str, measurement, popperOffsets, referenceOffsets);
    });
  });
 
  // Loop trough the offsets arrays and execute the operations
  ops.forEach(function (op, index) {
    op.forEach(function (frag, index2) {
      Eif (isNumeric(frag)) {
        offsets[index] += frag * (op[index2 - 1] === '-' ? -1 : 1);
      }
    });
  });
  return offsets;
}
 
/**
 * @function
 * @memberof Modifiers
 * @argument {Object} data - The data object generated by update method
 * @argument {Object} options - Modifiers configuration and options
 * @argument {Number|String} options.offset=0
 * The offset value as described in the modifier description
 * @returns {Object} The data object, properly modified
 */
function offset(data, _ref) {
  var offset = _ref.offset;
  var placement = data.placement,
      _data$offsets = data.offsets,
      popper = _data$offsets.popper,
      reference = _data$offsets.reference;
 
  var basePlacement = placement.split('-')[0];
 
  var offsets = void 0;
  if (isNumeric(+offset)) {
    offsets = [+offset, 0];
  } else {
    offsets = parseOffset(offset, popper, reference, basePlacement);
  }
 
  if (basePlacement === 'left') {
    popper.top += offsets[0];
    popper.left -= offsets[1];
  } else if (basePlacement === 'right') {
    popper.top += offsets[0];
    popper.left += offsets[1];
  } else if (basePlacement === 'top') {
    popper.left += offsets[0];
    popper.top -= offsets[1];
  } else Eif (basePlacement === 'bottom') {
    popper.left += offsets[0];
    popper.top += offsets[1];
  }
 
  data.popper = popper;
  return data;
}
 
/**
 * @function
 * @memberof Modifiers
 * @argument {Object} data - The data object generated by `update` method
 * @argument {Object} options - Modifiers configuration and options
 * @returns {Object} The data object, properly modified
 */
function preventOverflow(data, options) {
  var boundariesElement = options.boundariesElement || getOffsetParent(data.instance.popper);
 
  // If offsetParent is the reference element, we really want to
  // go one step up and use the next offsetParent as reference to
  // avoid to make this modifier completely useless and look like broken
  Iif (data.instance.reference === boundariesElement) {
    boundariesElement = getOffsetParent(boundariesElement);
  }
 
  // NOTE: DOM access here
  // resets the popper's position so that the document size can be calculated excluding
  // the size of the popper element itself
  var transformProp = getSupportedPropertyName('transform');
  var popperStyles = data.instance.popper.style; // assignment to help minification
  var top = popperStyles.top,
      left = popperStyles.left,
      transform = popperStyles[transformProp];
 
  popperStyles.top = '';
  popperStyles.left = '';
  popperStyles[transformProp] = '';
 
  var boundaries = getBoundaries(data.instance.popper, data.instance.reference, options.padding, boundariesElement, data.positionFixed);
 
  // NOTE: DOM access here
  // restores the original style properties after the offsets have been computed
  popperStyles.top = top;
  popperStyles.left = left;
  popperStyles[transformProp] = transform;
 
  options.boundaries = boundaries;
 
  var order = options.priority;
  var popper = data.offsets.popper;
 
  var check = {
    primary: function primary(placement) {
      var value = popper[placement];
      if (popper[placement] < boundaries[placement] && !options.escapeWithReference) {
        value = Math.max(popper[placement], boundaries[placement]);
      }
      return defineProperty({}, placement, value);
    },
    secondary: function secondary(placement) {
      var mainSide = placement === 'right' ? 'left' : 'top';
      var value = popper[mainSide];
      Iif (popper[placement] > boundaries[placement] && !options.escapeWithReference) {
        value = Math.min(popper[mainSide], boundaries[placement] - (placement === 'right' ? popper.width : popper.height));
      }
      return defineProperty({}, mainSide, value);
    }
  };
 
  order.forEach(function (placement) {
    var side = ['left', 'top'].indexOf(placement) !== -1 ? 'primary' : 'secondary';
    popper = _extends({}, popper, check[side](placement));
  });
 
  data.offsets.popper = popper;
 
  return data;
}
 
/**
 * @function
 * @memberof Modifiers
 * @argument {Object} data - The data object generated by `update` method
 * @argument {Object} options - Modifiers configuration and options
 * @returns {Object} The data object, properly modified
 */
function shift(data) {
  var placement = data.placement;
  var basePlacement = placement.split('-')[0];
  var shiftvariation = placement.split('-')[1];
 
  // if shift shiftvariation is specified, run the modifier
  if (shiftvariation) {
    var _data$offsets = data.offsets,
        reference = _data$offsets.reference,
        popper = _data$offsets.popper;
 
    var isVertical = ['bottom', 'top'].indexOf(basePlacement) !== -1;
    var side = isVertical ? 'left' : 'top';
    var measurement = isVertical ? 'width' : 'height';
 
    var shiftOffsets = {
      start: defineProperty({}, side, reference[side]),
      end: defineProperty({}, side, reference[side] + reference[measurement] - popper[measurement])
    };
 
    data.offsets.popper = _extends({}, popper, shiftOffsets[shiftvariation]);
  }
 
  return data;
}
 
/**
 * @function
 * @memberof Modifiers
 * @argument {Object} data - The data object generated by update method
 * @argument {Object} options - Modifiers configuration and options
 * @returns {Object} The data object, properly modified
 */
function hide(data) {
  Iif (!isModifierRequired(data.instance.modifiers, 'hide', 'preventOverflow')) {
    return data;
  }
 
  var refRect = data.offsets.reference;
  var bound = find(data.instance.modifiers, function (modifier) {
    return modifier.name === 'preventOverflow';
  }).boundaries;
 
  if (refRect.bottom < bound.top || refRect.left > bound.right || refRect.top > bound.bottom || refRect.right < bound.left) {
    // Avoid unnecessary DOM access if visibility hasn't changed
    Iif (data.hide === true) {
      return data;
    }
 
    data.hide = true;
    data.attributes['x-out-of-boundaries'] = '';
  } else {
    // Avoid unnecessary DOM access if visibility hasn't changed
    Iif (data.hide === false) {
      return data;
    }
 
    data.hide = false;
    data.attributes['x-out-of-boundaries'] = false;
  }
 
  return data;
}
 
/**
 * @function
 * @memberof Modifiers
 * @argument {Object} data - The data object generated by `update` method
 * @argument {Object} options - Modifiers configuration and options
 * @returns {Object} The data object, properly modified
 */
function inner(data) {
  var placement = data.placement;
  var basePlacement = placement.split('-')[0];
  var _data$offsets = data.offsets,
      popper = _data$offsets.popper,
      reference = _data$offsets.reference;
 
  var isHoriz = ['left', 'right'].indexOf(basePlacement) !== -1;
 
  var subtractLength = ['top', 'left'].indexOf(basePlacement) === -1;
 
  popper[isHoriz ? 'left' : 'top'] = reference[basePlacement] - (subtractLength ? popper[isHoriz ? 'width' : 'height'] : 0);
 
  data.placement = getOppositePlacement(placement);
  data.offsets.popper = getClientRect(popper);
 
  return data;
}
 
/**
 * Modifier function, each modifier can have a function of this type assigned
 * to its `fn` property.<br />
 * These functions will be called on each update, this means that you must
 * make sure they are performant enough to avoid performance bottlenecks.
 *
 * @function ModifierFn
 * @argument {dataObject} data - The data object generated by `update` method
 * @argument {Object} options - Modifiers configuration and options
 * @returns {dataObject} The data object, properly modified
 */
 
/**
 * Modifiers are plugins used to alter the behavior of your poppers.<br />
 * Popper.js uses a set of 9 modifiers to provide all the basic functionalities
 * needed by the library.
 *
 * Usually you don't want to override the `order`, `fn` and `onLoad` props.
 * All the other properties are configurations that could be tweaked.
 * @namespace modifiers
 */
var modifiers = {
  /**
   * Modifier used to shift the popper on the start or end of its reference
   * element.<br />
   * It will read the variation of the `placement` property.<br />
   * It can be one either `-end` or `-start`.
   * @memberof modifiers
   * @inner
   */
  shift: {
    /** @prop {number} order=100 - Index used to define the order of execution */
    order: 100,
    /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */
    enabled: true,
    /** @prop {ModifierFn} */
    fn: shift
  },
 
  /**
   * The `offset` modifier can shift your popper on both its axis.
   *
   * It accepts the following units:
   * - `px` or unitless, interpreted as pixels
   * - `%` or `%r`, percentage relative to the length of the reference element
   * - `%p`, percentage relative to the length of the popper element
   * - `vw`, CSS viewport width unit
   * - `vh`, CSS viewport height unit
   *
   * For length is intended the main axis relative to the placement of the popper.<br />
   * This means that if the placement is `top` or `bottom`, the length will be the
   * `width`. In case of `left` or `right`, it will be the height.
   *
   * You can provide a single value (as `Number` or `String`), or a pair of values
   * as `String` divided by a comma or one (or more) white spaces.<br />
   * The latter is a deprecated method because it leads to confusion and will be
   * removed in v2.<br />
   * Additionally, it accepts additions and subtractions between different units.
   * Note that multiplications and divisions aren't supported.
   *
   * Valid examples are:
   * ```
   * 10
   * '10%'
   * '10, 10'
   * '10%, 10'
   * '10 + 10%'
   * '10 - 5vh + 3%'
   * '-10px + 5vh, 5px - 6%'
   * ```
   * > **NB**: If you desire to apply offsets to your poppers in a way that may make them overlap
   * > with their reference element, unfortunately, you will have to disable the `flip` modifier.
   * > More on this [reading this issue](https://github.com/FezVrasta/popper.js/issues/373)
   *
   * @memberof modifiers
   * @inner
   */
  offset: {
    /** @prop {number} order=200 - Index used to define the order of execution */
    order: 200,
    /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */
    enabled: true,
    /** @prop {ModifierFn} */
    fn: offset,
    /** @prop {Number|String} offset=0
     * The offset value as described in the modifier description
     */
    offset: 0
  },
 
  /**
   * Modifier used to prevent the popper from being positioned outside the boundary.
   *
   * An scenario exists where the reference itself is not within the boundaries.<br />
   * We can say it has "escaped the boundaries" — or just "escaped".<br />
   * In this case we need to decide whether the popper should either:
   *
   * - detach from the reference and remain "trapped" in the boundaries, or
   * - if it should ignore the boundary and "escape with its reference"
   *
   * When `escapeWithReference` is set to`true` and reference is completely
   * outside its boundaries, the popper will overflow (or completely leave)
   * the boundaries in order to remain attached to the edge of the reference.
   *
   * @memberof modifiers
   * @inner
   */
  preventOverflow: {
    /** @prop {number} order=300 - Index used to define the order of execution */
    order: 300,
    /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */
    enabled: true,
    /** @prop {ModifierFn} */
    fn: preventOverflow,
    /**
     * @prop {Array} [priority=['left','right','top','bottom']]
     * Popper will try to prevent overflow following these priorities by default,
     * then, it could overflow on the left and on top of the `boundariesElement`
     */
    priority: ['left', 'right', 'top', 'bottom'],
    /**
     * @prop {number} padding=5
     * Amount of pixel used to define a minimum distance between the boundaries
     * and the popper this makes sure the popper has always a little padding
     * between the edges of its container
     */
    padding: 5,
    /**
     * @prop {String|HTMLElement} boundariesElement='scrollParent'
     * Boundaries used by the modifier, can be `scrollParent`, `window`,
     * `viewport` or any DOM element.
     */
    boundariesElement: 'scrollParent'
  },
 
  /**
   * Modifier used to make sure the reference and its popper stay near eachothers
   * without leaving any gap between the two. Expecially useful when the arrow is
   * enabled and you want to assure it to point to its reference element.
   * It cares only about the first axis, you can still have poppers with margin
   * between the popper and its reference element.
   * @memberof modifiers
   * @inner
   */
  keepTogether: {
    /** @prop {number} order=400 - Index used to define the order of execution */
    order: 400,
    /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */
    enabled: true,
    /** @prop {ModifierFn} */
    fn: keepTogether
  },
 
  /**
   * This modifier is used to move the `arrowElement` of the popper to make
   * sure it is positioned between the reference element and its popper element.
   * It will read the outer size of the `arrowElement` node to detect how many
   * pixels of conjuction are needed.
   *
   * It has no effect if no `arrowElement` is provided.
   * @memberof modifiers
   * @inner
   */
  arrow: {
    /** @prop {number} order=500 - Index used to define the order of execution */
    order: 500,
    /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */
    enabled: true,
    /** @prop {ModifierFn} */
    fn: arrow,
    /** @prop {String|HTMLElement} element='[x-arrow]' - Selector or node used as arrow */
    element: '[x-arrow]'
  },
 
  /**
   * Modifier used to flip the popper's placement when it starts to overlap its
   * reference element.
   *
   * Requires the `preventOverflow` modifier before it in order to work.
   *
   * **NOTE:** this modifier will interrupt the current update cycle and will
   * restart it if it detects the need to flip the placement.
   * @memberof modifiers
   * @inner
   */
  flip: {
    /** @prop {number} order=600 - Index used to define the order of execution */
    order: 600,
    /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */
    enabled: true,
    /** @prop {ModifierFn} */
    fn: flip,
    /**
     * @prop {String|Array} behavior='flip'
     * The behavior used to change the popper's placement. It can be one of
     * `flip`, `clockwise`, `counterclockwise` or an array with a list of valid
     * placements (with optional variations).
     */
    behavior: 'flip',
    /**
     * @prop {number} padding=5
     * The popper will flip if it hits the edges of the `boundariesElement`
     */
    padding: 5,
    /**
     * @prop {String|HTMLElement} boundariesElement='viewport'
     * The element which will define the boundaries of the popper position,
     * the popper will never be placed outside of the defined boundaries
     * (except if keepTogether is enabled)
     */
    boundariesElement: 'viewport'
  },
 
  /**
   * Modifier used to make the popper flow toward the inner of the reference element.
   * By default, when this modifier is disabled, the popper will be placed outside
   * the reference element.
   * @memberof modifiers
   * @inner
   */
  inner: {
    /** @prop {number} order=700 - Index used to define the order of execution */
    order: 700,
    /** @prop {Boolean} enabled=false - Whether the modifier is enabled or not */
    enabled: false,
    /** @prop {ModifierFn} */
    fn: inner
  },
 
  /**
   * Modifier used to hide the popper when its reference element is outside of the
   * popper boundaries. It will set a `x-out-of-boundaries` attribute which can
   * be used to hide with a CSS selector the popper when its reference is
   * out of boundaries.
   *
   * Requires the `preventOverflow` modifier before it in order to work.
   * @memberof modifiers
   * @inner
   */
  hide: {
    /** @prop {number} order=800 - Index used to define the order of execution */
    order: 800,
    /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */
    enabled: true,
    /** @prop {ModifierFn} */
    fn: hide
  },
 
  /**
   * Computes the style that will be applied to the popper element to gets
   * properly positioned.
   *
   * Note that this modifier will not touch the DOM, it just prepares the styles
   * so that `applyStyle` modifier can apply it. This separation is useful
   * in case you need to replace `applyStyle` with a custom implementation.
   *
   * This modifier has `850` as `order` value to maintain backward compatibility
   * with previous versions of Popper.js. Expect the modifiers ordering method
   * to change in future major versions of the library.
   *
   * @memberof modifiers
   * @inner
   */
  computeStyle: {
    /** @prop {number} order=850 - Index used to define the order of execution */
    order: 850,
    /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */
    enabled: true,
    /** @prop {ModifierFn} */
    fn: computeStyle,
    /**
     * @prop {Boolean} gpuAcceleration=true
     * If true, it uses the CSS 3d transformation to position the popper.
     * Otherwise, it will use the `top` and `left` properties.
     */
    gpuAcceleration: true,
    /**
     * @prop {string} [x='bottom']
     * Where to anchor the X axis (`bottom` or `top`). AKA X offset origin.
     * Change this if your popper should grow in a direction different from `bottom`
     */
    x: 'bottom',
    /**
     * @prop {string} [x='left']
     * Where to anchor the Y axis (`left` or `right`). AKA Y offset origin.
     * Change this if your popper should grow in a direction different from `right`
     */
    y: 'right'
  },
 
  /**
   * Applies the computed styles to the popper element.
   *
   * All the DOM manipulations are limited to this modifier. This is useful in case
   * you want to integrate Popper.js inside a framework or view library and you
   * want to delegate all the DOM manipulations to it.
   *
   * Note that if you disable this modifier, you must make sure the popper element
   * has its position set to `absolute` before Popper.js can do its work!
   *
   * Just disable this modifier and define you own to achieve the desired effect.
   *
   * @memberof modifiers
   * @inner
   */
  applyStyle: {
    /** @prop {number} order=900 - Index used to define the order of execution */
    order: 900,
    /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */
    enabled: true,
    /** @prop {ModifierFn} */
    fn: applyStyle,
    /** @prop {Function} */
    onLoad: applyStyleOnLoad,
    /**
     * @deprecated since version 1.10.0, the property moved to `computeStyle` modifier
     * @prop {Boolean} gpuAcceleration=true
     * If true, it uses the CSS 3d transformation to position the popper.
     * Otherwise, it will use the `top` and `left` properties.
     */
    gpuAcceleration: undefined
  }
};
 
/**
 * The `dataObject` is an object containing all the informations used by Popper.js
 * this object get passed to modifiers and to the `onCreate` and `onUpdate` callbacks.
 * @name dataObject
 * @property {Object} data.instance The Popper.js instance
 * @property {String} data.placement Placement applied to popper
 * @property {String} data.originalPlacement Placement originally defined on init
 * @property {Boolean} data.flipped True if popper has been flipped by flip modifier
 * @property {Boolean} data.hide True if the reference element is out of boundaries, useful to know when to hide the popper.
 * @property {HTMLElement} data.arrowElement Node used as arrow by arrow modifier
 * @property {Object} data.styles Any CSS property defined here will be applied to the popper, it expects the JavaScript nomenclature (eg. `marginBottom`)
 * @property {Object} data.arrowStyles Any CSS property defined here will be applied to the popper arrow, it expects the JavaScript nomenclature (eg. `marginBottom`)
 * @property {Object} data.boundaries Offsets of the popper boundaries
 * @property {Object} data.offsets The measurements of popper, reference and arrow elements.
 * @property {Object} data.offsets.popper `top`, `left`, `width`, `height` values
 * @property {Object} data.offsets.reference `top`, `left`, `width`, `height` values
 * @property {Object} data.offsets.arrow] `top` and `left` offsets, only one of them will be different from 0
 */
 
/**
 * Default options provided to Popper.js constructor.<br />
 * These can be overriden using the `options` argument of Popper.js.<br />
 * To override an option, simply pass as 3rd argument an object with the same
 * structure of this object, example:
 * ```
 * new Popper(ref, pop, {
 *   modifiers: {
 *     preventOverflow: { enabled: false }
 *   }
 * })
 * ```
 * @type {Object}
 * @static
 * @memberof Popper
 */
var Defaults = {
  /**
   * Popper's placement
   * @prop {Popper.placements} placement='bottom'
   */
  placement: 'bottom',
 
  /**
   * Set this to true if you want popper to position it self in 'fixed' mode
   * @prop {Boolean} positionFixed=false
   */
  positionFixed: false,
 
  /**
   * Whether events (resize, scroll) are initially enabled
   * @prop {Boolean} eventsEnabled=true
   */
  eventsEnabled: true,
 
  /**
   * Set to true if you want to automatically remove the popper when
   * you call the `destroy` method.
   * @prop {Boolean} removeOnDestroy=false
   */
  removeOnDestroy: false,
 
  /**
   * Callback called when the popper is created.<br />
   * By default, is set to no-op.<br />
   * Access Popper.js instance with `data.instance`.
   * @prop {onCreate}
   */
  onCreate: function onCreate() {},
 
  /**
   * Callback called when the popper is updated, this callback is not called
   * on the initialization/creation of the popper, but only on subsequent
   * updates.<br />
   * By default, is set to no-op.<br />
   * Access Popper.js instance with `data.instance`.
   * @prop {onUpdate}
   */
  onUpdate: function onUpdate() {},
 
  /**
   * List of modifiers used to modify the offsets before they are applied to the popper.
   * They provide most of the functionalities of Popper.js
   * @prop {modifiers}
   */
  modifiers: modifiers
};
 
/**
 * @callback onCreate
 * @param {dataObject} data
 */
 
/**
 * @callback onUpdate
 * @param {dataObject} data
 */
 
// Utils
// Methods
var Popper = function () {
  /**
   * Create a new Popper.js instance
   * @class Popper
   * @param {HTMLElement|referenceObject} reference - The reference element used to position the popper
   * @param {HTMLElement} popper - The HTML element used as popper.
   * @param {Object} options - Your custom options to override the ones defined in [Defaults](#defaults)
   * @return {Object} instance - The generated Popper.js instance
   */
  function Popper(reference, popper) {
    var _this = this;
 
    var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
    classCallCheck(this, Popper);
 
    this.scheduleUpdate = function () {
      return requestAnimationFrame(_this.update);
    };
 
    // make update() debounced, so that it only runs at most once-per-tick
    this.update = debounce(this.update.bind(this));
 
    // with {} we create a new object with the options inside it
    this.options = _extends({}, Popper.Defaults, options);
 
    // init state
    this.state = {
      isDestroyed: false,
      isCreated: false,
      scrollParents: []
    };
 
    // get reference and popper elements (allow jQuery wrappers)
    this.reference = reference && reference.jquery ? reference[0] : reference;
    this.popper = popper && popper.jquery ? popper[0] : popper;
 
    // Deep merge modifiers options
    this.options.modifiers = {};
    Object.keys(_extends({}, Popper.Defaults.modifiers, options.modifiers)).forEach(function (name) {
      _this.options.modifiers[name] = _extends({}, Popper.Defaults.modifiers[name] || {}, options.modifiers ? options.modifiers[name] : {});
    });
 
    // Refactoring modifiers' list (Object => Array)
    this.modifiers = Object.keys(this.options.modifiers).map(function (name) {
      return _extends({
        name: name
      }, _this.options.modifiers[name]);
    })
    // sort the modifiers by order
    .sort(function (a, b) {
      return a.order - b.order;
    });
 
    // modifiers have the ability to execute arbitrary code when Popper.js get inited
    // such code is executed in the same order of its modifier
    // they could add new properties to their options configuration
    // BE AWARE: don't add options to `options.modifiers.name` but to `modifierOptions`!
    this.modifiers.forEach(function (modifierOptions) {
      if (modifierOptions.enabled && isFunction(modifierOptions.onLoad)) {
        modifierOptions.onLoad(_this.reference, _this.popper, _this.options, modifierOptions, _this.state);
      }
    });
 
    // fire the first update to position the popper in the right place
    this.update();
 
    var eventsEnabled = this.options.eventsEnabled;
    if (eventsEnabled) {
      // setup event listeners, they will take care of update the position in specific situations
      this.enableEventListeners();
    }
 
    this.state.eventsEnabled = eventsEnabled;
  }
 
  // We can't use class properties because they don't get listed in the
  // class prototype and break stuff like Sinon stubs
 
 
  createClass(Popper, [{
    key: 'update',
    value: function update$$1() {
      return update.call(this);
    }
  }, {
    key: 'destroy',
    value: function destroy$$1() {
      return destroy.call(this);
    }
  }, {
    key: 'enableEventListeners',
    value: function enableEventListeners$$1() {
      return enableEventListeners.call(this);
    }
  }, {
    key: 'disableEventListeners',
    value: function disableEventListeners$$1() {
      return disableEventListeners.call(this);
    }
 
    /**
     * Schedule an update, it will run on the next UI update available
     * @method scheduleUpdate
     * @memberof Popper
     */
 
 
    /**
     * Collection of utilities useful when writing custom modifiers.
     * Starting from version 1.7, this method is available only if you
     * include `popper-utils.js` before `popper.js`.
     *
     * **DEPRECATION**: This way to access PopperUtils is deprecated
     * and will be removed in v2! Use the PopperUtils module directly instead.
     * Due to the high instability of the methods contained in Utils, we can't
     * guarantee them to follow semver. Use them at your own risk!
     * @static
     * @private
     * @type {Object}
     * @deprecated since version 1.8
     * @member Utils
     * @memberof Popper
     */
 
  }]);
  return Popper;
}();
 
/**
 * The `referenceObject` is an object that provides an interface compatible with Popper.js
 * and lets you use it as replacement of a real DOM node.<br />
 * You can use this method to position a popper relatively to a set of coordinates
 * in case you don't have a DOM node to use as reference.
 *
 * ```
 * new Popper(referenceObject, popperNode);
 * ```
 *
 * NB: This feature isn't supported in Internet Explorer 10
 * @name referenceObject
 * @property {Function} data.getBoundingClientRect
 * A function that returns a set of coordinates compatible with the native `getBoundingClientRect` method.
 * @property {number} data.clientWidth
 * An ES6 getter that will return the width of the virtual reference element.
 * @property {number} data.clientHeight
 * An ES6 getter that will return the height of the virtual reference element.
 */
 
 
Popper.Utils = (typeof window !== 'undefined' ? window : global).PopperUtils;
Popper.placements = placements;
Popper.Defaults = Defaults;
 
/* harmony default export */ __webpack_exports__["default"] = (Popper);
//# sourceMappingURL=popper.js.map
 
/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(208)))
 
/***/ }),
/* 182 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var TextInput_1 = __webpack_require__(80);
var AdvancedSearchEvents_1 = __webpack_require__(110);
var Dom_1 = __webpack_require__(0);
var KeywordsInput = /** @class */ (function () {
    function KeywordsInput(inputName, root) {
        this.inputName = inputName;
        this.root = root;
    }
    KeywordsInput.prototype.reset = function () {
        this.clear();
    };
    KeywordsInput.prototype.build = function () {
        this.input = new TextInput_1.TextInput(this.onChange.bind(this), this.inputName);
        return this.input.getElement();
    };
    KeywordsInput.prototype.setValue = function (value) {
        this.input.setValue(value);
    };
    KeywordsInput.prototype.getValue = function () {
        return this.input.getValue();
    };
    KeywordsInput.prototype.clear = function () {
        this.input.setValue('');
    };
    KeywordsInput.prototype.updateQuery = function (queryBuilder) {
        var value = this.getValue();
        if (value) {
            queryBuilder.advancedExpression.add(value);
        }
    };
    KeywordsInput.prototype.onChange = function () {
        Eif (this.root) {
            Dom_1.$$(this.root).trigger(AdvancedSearchEvents_1.AdvancedSearchEvents.executeAdvancedSearch);
        }
        else if (this.input) {
            Dom_1.$$(this.input.getElement()).trigger(AdvancedSearchEvents_1.AdvancedSearchEvents.executeAdvancedSearch);
        }
    };
    return KeywordsInput;
}());
exports.KeywordsInput = KeywordsInput;
 
 
/***/ }),
/* 183 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
var underscore_1 = __webpack_require__(1);
var GlobalExports_1 = __webpack_require__(10);
var Assert_1 = __webpack_require__(12);
var Strings_1 = __webpack_require__(4);
var AccessibleButton_1 = __webpack_require__(20);
var DateUtils_1 = __webpack_require__(43);
var Dom_1 = __webpack_require__(0);
var StringUtils_1 = __webpack_require__(34);
var Utils_1 = __webpack_require__(5);
var AnalyticsActionListMeta_1 = __webpack_require__(7);
var Component_1 = __webpack_require__(6);
var ComponentOptions_1 = __webpack_require__(13);
var Initialization_1 = __webpack_require__(8);
var FacetUtils_1 = __webpack_require__(49);
var TemplateFieldsEvaluator_1 = __webpack_require__(218);
var TemplateHelpers_1 = __webpack_require__(141);
var IFieldValueCompatibleFacet_1 = __webpack_require__(1089);
var ComponentsTypes_1 = __webpack_require__(69);
function showOnlyWithHelper(helpers, options) {
    if (options == null) {
        options = {};
    }
    options.helpers = helpers;
    return options;
}
/**
 * The FieldValue component displays the value of a field associated to its parent search result. It is normally usable
 * within a {@link FieldTable}.
 *
 * This component is a result template component (see [Result Templates](https://docs.coveo.com/en/413/)).
 *
 * A common use of this component is to display a specific field value which also happens to be an existing
 * {@link Facet.options.field}. When the user clicks on the FieldValue component, it activates the corresponding Facet.
 */
var FieldValue = /** @class */ (function (_super) {
    __extends(FieldValue, _super);
    /**
     * Creates a new FieldValue.
     * @param element The HTMLElement on which to instantiate the component.
     * @param options The options for the FieldValue component.
     * @param bindings The bindings that the component requires to function normally. If not set, these will be
     * automatically resolved (with a slower execution time).
     * @param result The result to associate the component with.
     */
    function FieldValue(element, options, bindings, result, fieldValueClassId) {
        if (fieldValueClassId === void 0) { fieldValueClassId = FieldValue.ID; }
        var _this = _super.call(this, element, fieldValueClassId, bindings) || this;
        _this.element = element;
        _this.options = options;
        _this.result = result;
        _this.options = ComponentOptions_1.ComponentOptions.initOptions(element, FieldValue.simpleOptions, options, FieldValue.ID);
        if (_this.options.helper != null) {
            _this.normalizeHelperAndOptions();
        }
        _this.result = _this.result || _this.resolveResult();
        Assert_1.Assert.exists(_this.result);
        if (TemplateFieldsEvaluator_1.TemplateFieldsEvaluator.evaluateFieldsToMatch(_this.options.conditions, _this.result) && !Utils_1.Utils.isNullOrUndefined(_this.getValue())) {
            _this.initialize();
        }
        else Eif (_this.element.parentElement != null) {
            _this.element.parentElement.removeChild(_this.element);
        }
        return _this;
    }
    FieldValue.prototype.initialize = function () {
        var loadedValueFromComponent = this.getValue();
        var values;
        if (underscore_1.isArray(loadedValueFromComponent)) {
            values = loadedValueFromComponent;
        }
        else if (this.options.splitValues) {
            Eif (underscore_1.isString(loadedValueFromComponent)) {
                values = underscore_1.map(loadedValueFromComponent.split(this.options.separator), function (v) {
                    return v.trim();
                });
            }
        }
        else {
            loadedValueFromComponent = loadedValueFromComponent.toString();
            values = [loadedValueFromComponent];
        }
        if (values.length > 1 && this.isValueHierarchical) {
            values = values.slice(-1);
        }
        this.appendValuesToDom(values);
        if (this.options.textCaption != null) {
            this.prependTextCaptionToDom();
        }
    };
    /**
     * Gets the current FieldValue from the current {@link IQueryResult}.
     *
     * @returns {any} The current FieldValue or `null` if value is and `Object`.
     */
    FieldValue.prototype.getValue = function () {
        var value = Utils_1.Utils.getFieldValue(this.result, this.options.field);
        Iif (!underscore_1.isArray(value) && underscore_1.isObject(value)) {
            value = null;
        }
        return value;
    };
    /**
     * Renders a value to HTML using all of the current FieldValue component options.
     * @param value The value to render.
     * @returns {HTMLElement} The element containing the rendered value.
     */
    FieldValue.prototype.renderOneValue = function (value) {
        var element = Dom_1.$$('span').el;
        var toRender = this.getCaption(value);
        if (this.options.helper) {
            // Try to resolve and execute version 2 of each helper function if available
            var helper = TemplateHelpers_1.TemplateHelpers.getHelper(this.options.helper + "v2") || TemplateHelpers_1.TemplateHelpers.getHelper("" + this.options.helper);
            if (Utils_1.Utils.exists(helper)) {
                toRender = helper.call(this, value, this.getHelperOptions(), this.result);
            }
            else {
                this.logger.warn("Helper " + this.options.helper + " is not found in available helpers. The list of supported helpers is :", underscore_1.keys(TemplateHelpers_1.TemplateHelpers.getHelpers()));
            }
            var fullDateStr = this.getFullDate(value, this.options.helper);
            if (fullDateStr) {
                element.setAttribute('title', fullDateStr);
            }
            if (this.options.helper == 'date' || this.options.helper == 'dateTime' || this.options.helper == 'emailDateTime') {
                toRender = StringUtils_1.StringUtils.capitalizeFirstLetter(toRender);
            }
        }
        if (this.options.htmlValue) {
            element.innerHTML = toRender;
        }
        else {
            element.appendChild(document.createTextNode(toRender));
        }
        this.bindEventOnValue(element, value, toRender);
        return element;
    };
    FieldValue.prototype.getValueContainer = function () {
        return this.element;
    };
    FieldValue.prototype.normalizeHelperAndOptions = function () {
        var _this = this;
        this.options = ComponentOptions_1.ComponentOptions.initOptions(this.element, FieldValue.helperOptions, this.options, FieldValue.ID);
        var toFilter = underscore_1.keys(FieldValue.options.helperOptions['subOptions']);
        var toKeep = underscore_1.filter(toFilter, function (optionKey) {
            var optionDefinition = FieldValue.options.helperOptions['subOptions'][optionKey];
            Eif (optionDefinition) {
                var helpers = optionDefinition.helpers;
                return helpers != null && underscore_1.contains(helpers, _this.options.helper);
            }
            return false;
        });
        this.options.helperOptions = underscore_1.omit(this.options.helperOptions, function (value, key) {
            return !underscore_1.contains(toKeep, key);
        });
    };
    FieldValue.prototype.getHelperOptions = function () {
        var inlineOptions = ComponentOptions_1.ComponentOptions.loadStringOption(this.element, 'helperOptions', {});
        Iif (Utils_1.Utils.isNonEmptyString(inlineOptions)) {
            return underscore_1.extend({}, this.options.helperOptions, eval('(' + inlineOptions + ')'));
        }
        return this.options.helperOptions;
    };
    FieldValue.prototype.getFullDate = function (date, helper) {
        var fullDateOptions = {
            useLongDateFormat: true,
            useTodayYesterdayAndTomorrow: false,
            useWeekdayIfThisWeek: false,
            omitYearIfCurrentOne: false
        };
        if (helper == 'date') {
            return DateUtils_1.DateUtils.dateToString(new Date(parseInt(date)), fullDateOptions);
        }
        else if (helper == 'dateTime' || helper == 'emailDateTime') {
            return DateUtils_1.DateUtils.dateTimeToString(new Date(parseInt(date)), fullDateOptions);
        }
        return '';
    };
    FieldValue.prototype.appendValuesToDom = function (values) {
        var _this = this;
        underscore_1.each(values, function (value, index) {
            Eif (value != undefined) {
                _this.getValueContainer().appendChild(_this.renderOneValue(value));
                if (index !== values.length - 1) {
                    _this.getValueContainer().appendChild(document.createTextNode(_this.options.displaySeparator));
                }
            }
        });
    };
    FieldValue.prototype.renderTextCaption = function () {
        var element = Dom_1.$$('span', { className: 'coveo-field-caption' }, underscore_1.escape(this.options.textCaption));
        return element.el;
    };
    FieldValue.prototype.prependTextCaptionToDom = function () {
        var elem = this.getValueContainer();
        Dom_1.$$(elem).prepend(this.renderTextCaption());
        // Add a class to the container so the value and the caption wrap together.
        Dom_1.$$(elem).addClass('coveo-with-label');
    };
    FieldValue.prototype.bindEventOnValue = function (element, originalFacetValue, renderedFacetValue) {
        this.bindFacets(element, originalFacetValue, renderedFacetValue);
    };
    FieldValue.prototype.getCaption = function (value) {
        for (var _i = 0, _a = this.getFacets(); _i < _a.length; _i++) {
            var facet = _a[_i];
            var caption = facet.getCaptionForStringValue(value);
            if (caption) {
                return caption;
            }
        }
        return FacetUtils_1.FacetUtils.tryToGetTranslatedCaption(this.options.field, value);
    };
    FieldValue.prototype.getFacets = function () {
        var _this = this;
        var facets = ComponentsTypes_1.ComponentsTypes.getAllFacetsFromSearchInterface(this.searchInterface)
            .filter(IFieldValueCompatibleFacet_1.isFacetFieldValueCompatible)
            .filter(function (facet) { return !facet.disabled; });
        var facetsWithMatchingId = facets.filter(function (facet) { return facet.options.id === _this.options.facet; });
        Iif (facetsWithMatchingId.length) {
            return facetsWithMatchingId;
        }
        return facets.filter(function (facet) { return facet.options.field === _this.options.field; });
    };
    Object.defineProperty(FieldValue.prototype, "isValueHierarchical", {
        get: function () {
            for (var _i = 0, _a = this.getFacets(); _i < _a.length; _i++) {
                var facet = _a[_i];
                Eif (facet.isFieldValueHierarchical) {
                    return true;
                }
            }
            return false;
        },
        enumerable: true,
        configurable: true
    });
    FieldValue.prototype.bindFacets = function (element, originalFacetValue, renderedFacetValue) {
        var _this = this;
        var facets = this.getFacets();
        if (!facets.length) {
            return;
        }
        var isValueSelected = !!underscore_1.find(facets, function (facet) { return facet.hasSelectedValue(originalFacetValue); });
        var selectAction = function () { return _this.handleFacetSelection(isValueSelected, facets, originalFacetValue); };
        this.buildClickableElement(element, isValueSelected, renderedFacetValue, selectAction);
    };
    FieldValue.prototype.buildClickableElement = function (element, isSelected, value, selectAction) {
        var label = isSelected ? Strings_1.l('RemoveFilterOn', value) : Strings_1.l('FilterOn', value);
        new AccessibleButton_1.AccessibleButton().withTitle(label).withElement(element).withSelectAction(selectAction).build();
        if (isSelected) {
            Dom_1.$$(element).addClass('coveo-selected');
        }
        Dom_1.$$(element).addClass('coveo-clickable');
    };
    FieldValue.prototype.handleFacetSelection = function (isValueSelected, facets, value) {
        facets.forEach(function (facet) {
            isValueSelected ? facet.deselectValue(value) : facet.selectValue(value);
        });
        this.executeQuery(value);
    };
    FieldValue.prototype.executeQuery = function (value) {
        var _this = this;
        this.queryController.deferExecuteQuery({
            beforeExecuteQuery: function () {
                return _this.usageAnalytics.logSearchEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.documentField, {
                    facetId: _this.options.facet,
                    facetField: _this.options.field.toString(),
                    facetValue: value.toLowerCase()
                });
            }
        });
    };
    FieldValue.ID = 'FieldValue';
    FieldValue.doExport = function () {
        GlobalExports_1.exportGlobally({
            FieldValue: FieldValue
        });
    };
    /**
     * The options for the component
     * @componentOptions
     */
    FieldValue.options = {
        /**
         * Specifies the field that the FieldValue should display.
         *
         * Specifying a value for this parameter is required in order for the FieldValue component to work.
         */
        field: ComponentOptions_1.ComponentOptions.buildFieldOption({ defaultValue: '@field', required: true }),
        /**
         * Specifies the {@link Facet} component to toggle when the end user clicks the FieldValue.
         *
         * Default value is the value of {@link FieldValue.options.field}.
         *
         * **Note:**
         * > If the target {@link Facet.options.id} is is not the same as its {@link Facet.options.field}), you must specify
         * > this option manually in order to link to the correct Facet.
         */
        facet: ComponentOptions_1.ComponentOptions.buildStringOption({ postProcessing: function (value, options) { return value || options.field; } }),
        /**
         * Specifies whether the content to display is an HTML element.
         *
         * Default value is `false`.
         */
        htmlValue: ComponentOptions_1.ComponentOptions.buildBooleanOption({ defaultValue: false }),
        /**
         * Specifies whether to split the FieldValue at each {@link FieldValue.options.separator}.
         *
         * This is useful for splitting groups using a {@link Facet.options.field}.
         *
         * When this option is `true`, the displayed values are split by the {@link FieldValue.options.displaySeparator}.
         *
         * Default value is `false`.
         */
        splitValues: ComponentOptions_1.ComponentOptions.buildBooleanOption({ defaultValue: false }),
        /**
         * If {@link FieldValue.options.splitValues} is `true`, specifies the separator string which separates multi-value
         * fields in the index.
         *
         * See {@link FieldValue.options.displaySeparator}.
         *
         * Default value is `";"`.
         */
        separator: ComponentOptions_1.ComponentOptions.buildStringOption({ depend: 'splitValues', defaultValue: ';' }),
        /**
         * If {@link FieldValue.options.splitValues} is `true`, specifies the string to use when displaying multi-value
         * fields in the UI.
         *
         * The component will insert this string between each value it displays from a multi-value field.
         *
         * See also {@link FieldValue.options.separator}.
         *
         * Default value is `", "`.
         */
        displaySeparator: ComponentOptions_1.ComponentOptions.buildStringOption({ depend: 'splitValues', defaultValue: ', ' }),
        /**
         * Specifies the helper that the FieldValue should use to display its content.
         *
         * While several helpers exist by default (see {@link ICoreHelpers}), it is also possible for you to create your own
         * custom helpers (see {@link TemplateHelpers}).
         */
        helper: ComponentOptions_1.ComponentOptions.buildHelperOption(),
        /**
         * Specifies the options to call on the specified helper.
         */
        helperOptions: ComponentOptions_1.ComponentOptions.buildObjectOption({
            subOptions: {
                text: ComponentOptions_1.ComponentOptions.buildStringOption(showOnlyWithHelper(['anchor'])),
                target: ComponentOptions_1.ComponentOptions.buildStringOption(showOnlyWithHelper(['anchor'])),
                class: ComponentOptions_1.ComponentOptions.buildStringOption(showOnlyWithHelper(['anchor'])),
                format: ComponentOptions_1.ComponentOptions.buildStringOption(showOnlyWithHelper(['number'])),
                decimals: ComponentOptions_1.ComponentOptions.buildNumberOption(showOnlyWithHelper(['currency'], { min: 0 })),
                symbol: ComponentOptions_1.ComponentOptions.buildStringOption(showOnlyWithHelper(['currency'])),
                useTodayYesterdayAndTomorrow: ComponentOptions_1.ComponentOptions.buildBooleanOption(showOnlyWithHelper(['date', 'dateTime', 'emailDateTime', 'time'], { defaultValue: true })),
                useWeekdayIfThisWeek: ComponentOptions_1.ComponentOptions.buildBooleanOption(showOnlyWithHelper(['date', 'dateTime', 'emailDateTime', 'time'], { defaultValue: true })),
                omitYearIfCurrentOne: ComponentOptions_1.ComponentOptions.buildBooleanOption(showOnlyWithHelper(['date', 'dateTime', 'emailDateTime', 'time'], { defaultValue: true })),
                useLongDateFormat: ComponentOptions_1.ComponentOptions.buildBooleanOption(showOnlyWithHelper(['date', 'dateTime', 'emailDateTime', 'time'], { defaultValue: false })),
                includeTimeIfToday: ComponentOptions_1.ComponentOptions.buildBooleanOption(showOnlyWithHelper(['date', 'dateTime', 'emailDateTime', 'time'], { defaultValue: true })),
                includeTimeIfThisWeek: ComponentOptions_1.ComponentOptions.buildBooleanOption(showOnlyWithHelper(['date', 'dateTime', 'emailDateTime', 'time'], { defaultValue: true })),
                alwaysIncludeTime: ComponentOptions_1.ComponentOptions.buildBooleanOption(showOnlyWithHelper(['date', 'dateTime', 'emailDateTime', 'time'], { defaultValue: false })),
                predefinedFormat: ComponentOptions_1.ComponentOptions.buildStringOption(showOnlyWithHelper(['date', 'dateTime', 'emailDateTime', 'time'])),
                companyDomain: ComponentOptions_1.ComponentOptions.buildStringOption(showOnlyWithHelper(['email'])),
                me: ComponentOptions_1.ComponentOptions.buildStringOption(showOnlyWithHelper(['email'])),
                lengthLimit: ComponentOptions_1.ComponentOptions.buildNumberOption(showOnlyWithHelper(['email'], { min: 1 })),
                truncateName: ComponentOptions_1.ComponentOptions.buildBooleanOption(showOnlyWithHelper(['email'])),
                alt: ComponentOptions_1.ComponentOptions.buildStringOption(showOnlyWithHelper(['image'])),
                height: ComponentOptions_1.ComponentOptions.buildStringOption(showOnlyWithHelper(['image'])),
                width: ComponentOptions_1.ComponentOptions.buildStringOption(showOnlyWithHelper(['image'])),
                srcTemplate: ComponentOptions_1.ComponentOptions.buildStringOption(showOnlyWithHelper(['image'])),
                precision: ComponentOptions_1.ComponentOptions.buildNumberOption(showOnlyWithHelper(['size'], { min: 0, defaultValue: 2 })),
                base: ComponentOptions_1.ComponentOptions.buildNumberOption(showOnlyWithHelper(['size'], { min: 0, defaultValue: 0 })),
                isMilliseconds: ComponentOptions_1.ComponentOptions.buildBooleanOption(showOnlyWithHelper(['timeSpan'])),
                length: ComponentOptions_1.ComponentOptions.buildNumberOption(showOnlyWithHelper(['shorten', 'shortenPath', 'shortenUri'], { defaultValue: 200 }))
            }
        }),
        /**
         * Specifies a caption to display before the value.
         *
         * Default value is `undefined`.
         *
         * @availablesince [January 2017 Release (v1.1865.9)](https://docs.coveo.com/en/396/#january-2017-release-v118659)
         */
        textCaption: ComponentOptions_1.ComponentOptions.buildLocalizedStringOption(),
        /**
         * A field-based condition that must be satisfied by the query result item for the component to be rendered.
         *
         * Note: This option uses a distinctive markup configuration syntax allowing multiple conditions to be expressed. Its underlying logic is the same as that of the field value conditions mechanism used by result templates.
         *
         * **Examples:**
         * Render the component if the query result item's @documenttype field value is Article or Documentation.
         * ```html
         * <div class="CoveoFieldValue" data-field="@author" data-condition-field-documenttype="Article, Documentation"></div>
         * ```
         * Render the component if the query result item's @documenttype field value is anything but Case.
         * ```html
         * <div class="CoveoFieldValue" data-field="@author" data-condition-field-not-documenttype="Case"></div>
         * ```
         * Render the component if the query result item's @documenttype field value is Article, and if its @author field value is anything but Anonymous.
         * ```html
         * <div class="CoveoFieldValue" data-field="@author" data-condition-field-documenttype="Article" data-condition-field-not-author="Anonymous"></div>
         * ```
         * Default value is `undefined`.
         */
        conditions: ComponentOptions_1.ComponentOptions.buildFieldConditionOption()
    };
    FieldValue.simpleOptions = underscore_1.omit(FieldValue.options, 'helperOptions');
    FieldValue.helperOptions = {
        helperOptions: FieldValue.options.helperOptions
    };
    return FieldValue;
}(Component_1.Component));
exports.FieldValue = FieldValue;
Initialization_1.Initialization.registerAutoCreateComponent(FieldValue);
 
 
/***/ }),
/* 184 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
/// <reference path='../ui/Facet/Facet.ts' />
Object.defineProperty(exports, "__esModule", { value: true });
var ExpressionBuilder_1 = __webpack_require__(87);
var Utils_1 = __webpack_require__(5);
var FacetSearchParameters_1 = __webpack_require__(119);
var Assert_1 = __webpack_require__(12);
var FacetUtils_1 = __webpack_require__(49);
var _ = __webpack_require__(1);
var QueryBuilderExpression_1 = __webpack_require__(475);
var FacetQueryController = /** @class */ (function () {
    function FacetQueryController(facet) {
        this.facet = facet;
    }
    /**
     * Reset the expression for the facet search, used when a new query is triggered
     */
    FacetQueryController.prototype.prepareForNewQuery = function () {
        this.lastGroupByRequestIndex = undefined;
        this.expressionToUseForFacetSearch = undefined;
        this.constantExpressionToUseForFacetSearch = undefined;
    };
    /**
     * Compute the filter expression that the facet needs to output for the query
     * @returns {string}
     */
    FacetQueryController.prototype.computeOurFilterExpression = function () {
        var _this = this;
        var builder = new ExpressionBuilder_1.ExpressionBuilder();
        var selected = this.facet.values.getSelected();
        if (selected.length > 0) {
            if (this.facet.options.useAnd) {
                _.each(selected, function (value) {
                    builder.addFieldExpression(_this.facet.options.field, '==', [value.value], true);
                });
            }
            else {
                builder.addFieldExpression(this.facet.options.field, '==', _.map(selected, function (value) { return value.value; }), true);
            }
        }
        var excluded = this.facet.values.getExcluded();
        if (excluded.length > 0) {
            builder.addFieldNotEqualExpression(this.facet.options.field, _.map(excluded, function (value) { return value.value; }), true);
        }
        if (Utils_1.Utils.isNonEmptyString(this.facet.options.additionalFilter)) {
            builder.add(this.facet.options.additionalFilter);
        }
        return builder.build();
    };
    /**
     * Build the group by request for the facet, and insert it in the query builder
     * @param queryBuilder
     */
    FacetQueryController.prototype.putGroupByIntoQueryBuilder = function (queryBuilder) {
        Assert_1.Assert.exists(queryBuilder);
        var allowedValues = this.createGroupByAllowedValues();
        var groupByRequest = this.createBasicGroupByRequest(allowedValues);
        var queryOverrideObject = this.createGroupByQueryOverride(queryBuilder);
        if (!Utils_1.Utils.isNullOrUndefined(queryOverrideObject) || !QueryBuilderExpression_1.QueryBuilderExpression.isEmpty(queryOverrideObject)) {
            groupByRequest.queryOverride = queryOverrideObject.basic;
            groupByRequest.advancedQueryOverride = queryOverrideObject.advanced;
            groupByRequest.constantQueryOverride = queryOverrideObject.constant;
            this.expressionToUseForFacetSearch = queryOverrideObject.withoutConstant;
            this.basicExpressionToUseForFacetSearch = queryOverrideObject.basic;
            this.advancedExpressionToUseForFacetSearch = queryOverrideObject.advanced;
            this.constantExpressionToUseForFacetSearch = queryOverrideObject.constant;
        }
        else {
            var parts = queryBuilder.computeCompleteExpressionParts();
            this.expressionToUseForFacetSearch = parts.withoutConstant == null ? '' : parts.withoutConstant;
            this.basicExpressionToUseForFacetSearch = parts.basic == null ? '' : parts.basic;
            this.advancedExpressionToUseForFacetSearch = parts.advanced;
            this.constantExpressionToUseForFacetSearch = parts.constant;
        }
        this.lastGroupByRequestIndex = queryBuilder.groupByRequests.length;
        this.lastGroupByRequest = groupByRequest;
        queryBuilder.groupByRequests.push(groupByRequest);
    };
    /**
     * Search inside the facet, using a group by request
     * @param params
     * @param oldLength Optional params, used by the search method to call itself recursively to fetch all required values
     * @returns {Promise|Promise<T>}
     */
    FacetQueryController.prototype.search = function (params, oldLength) {
        var _this = this;
        Eif (oldLength === void 0) { oldLength = params.nbResults; }
        // For search, we want to retrieve the exact values we requested, and not additional ones
        params.completeFacetWithStandardValues = false;
        return new Promise(function (resolve, reject) {
            var onResult = function (fieldValues) {
                var newLength = fieldValues.length;
                fieldValues = _this.checkForFacetSearchValuesToRemove(fieldValues, params.valueToSearch);
                Iif (FacetUtils_1.FacetUtils.needAnotherFacetSearch(fieldValues.length, newLength, oldLength, 5)) {
                    // This means that we removed enough values from the returned one that we need to perform a new search with more values requested.
                    params.nbResults += 5;
                    return _this.search(params, fieldValues.length);
                }
                else {
                    resolve(fieldValues);
                }
            };
            var searchPromise = _this.facet.getEndpoint().search(params.getQuery());
            _this.currentSearchPromise = searchPromise;
            searchPromise
                .then(function (queryResults) {
                Eif (_this.currentSearchPromise == searchPromise) {
                    // params.getQuery() will generate a query for all excluded values + some new values
                    // there is no clean way to do a group by and remove some values
                    // so instead we request more values than we need, and crop all the one we don't want
                    var valuesCropped_1 = [];
                    Eif (queryResults.groupByResults && queryResults.groupByResults[0]) {
                        _.each(queryResults.groupByResults[0].values, function (v) {
                            Eif (v.lookupValue) {
                                Eif (!_.contains(params.alwaysExclude, v.lookupValue.toLowerCase())) {
                                    valuesCropped_1.push(v);
                                }
                            }
                            else {
                                if (!_.contains(params.alwaysExclude, v.value.toLowerCase())) {
                                    valuesCropped_1.push(v);
                                }
                            }
                        });
                    }
                    onResult(_.first(valuesCropped_1, params.nbResults));
                }
                else {
                    reject();
                }
            })
                .catch(function (error) {
                reject(error);
            });
        });
    };
    FacetQueryController.prototype.fetchMore = function (numberOfValuesToFetch) {
        var _this = this;
        var params = new FacetSearchParameters_1.FacetSearchParameters(this.facet);
        params.alwaysInclude = this.facet.options.allowedValues || _.pluck(this.facet.values.getAll(), 'value');
        params.nbResults = numberOfValuesToFetch;
        return this.facet
            .getEndpoint()
            .search(params.getQuery())
            .then(function (results) {
            Eif (_this.facet.options.allowedValues && results && results.groupByResults && results.groupByResults[0]) {
                results.groupByResults[0].values = _this.filterByAllowedValueOption(results.groupByResults[0].values);
            }
            return results;
        });
    };
    FacetQueryController.prototype.searchInFacetToUpdateDelta = function (facetValues) {
        var params = new FacetSearchParameters_1.FacetSearchParameters(this.facet);
        var query = params.getQuery();
        query.aq = (query.aq ? query.aq : '') + " " + this.computeOurFilterExpression();
        _.each(facetValues, function (facetValue) {
            facetValue.waitingForDelta = true;
        });
        query.groupBy = [this.createBasicGroupByRequest(_.map(facetValues, function (facetValue) { return facetValue.value; }))];
        query.groupBy[0].completeFacetWithStandardValues = false;
        return this.facet.getEndpoint().search(query);
    };
    FacetQueryController.prototype.createGroupByAllowedValues = function () {
        // if you want to keep displayed values next time, take all current values as allowed values
        // otherwise take only the selected value
        if (this.facet.options.allowedValues != undefined) {
            return this.facet.options.allowedValues;
        }
        else if (this.facet.options.customSort != undefined) {
            // If there is a custom sort, we still need to add selectedValues to the group by
            // Filter out duplicates with a lower case comparison on the value
            return this.getUnionWithCustomSortLowercase(this.facet.options.customSort, this.getAllowedValuesFromSelected());
        }
        else {
            return _.map(this.getAllowedValuesFromSelected(), function (facetValue) { return facetValue.value; });
        }
    };
    FacetQueryController.prototype.createBasicGroupByRequest = function (allowedValues, addComputedField) {
        if (addComputedField === void 0) { addComputedField = true; }
        var nbOfRequestedValues = this.facet.numberOfValues;
        if (this.facet.options.customSort != null) {
            // If we have a custom sort, we need to make sure that we always request at least enough values to always receive them
            var usedValues = this.getUnionWithCustomSortLowercase(this.facet.options.customSort, this.facet.values.getSelected().concat(this.facet.values.getExcluded()));
            nbOfRequestedValues = Math.max(nbOfRequestedValues, usedValues.length);
        }
        var groupByRequest = {
            field: this.facet.options.field,
            maximumNumberOfValues: nbOfRequestedValues + (this.facet.options.enableMoreLess ? 1 : 0),
            sortCriteria: this.facet.options.sortCriteria,
            injectionDepth: this.facet.options.injectionDepth,
            completeFacetWithStandardValues: this.facet.options.allowedValues == undefined ? true : false
        };
        if (this.facet.options.lookupField) {
            groupByRequest.lookupField = this.facet.options.lookupField;
        }
        if (allowedValues != null) {
            groupByRequest.allowedValues = allowedValues;
        }
        if (addComputedField && Utils_1.Utils.isNonEmptyString(this.facet.options.computedField)) {
            groupByRequest.computedFields = [
                {
                    field: this.facet.options.computedField,
                    operation: this.facet.options.computedFieldOperation
                }
            ];
        }
        return groupByRequest;
    };
    FacetQueryController.prototype.getAllowedValuesFromSelected = function () {
        var facetValues = [];
        if (this.facet.options.useAnd || !this.facet.keepDisplayedValuesNextTime) {
            var selected = this.facet.values.getSelected();
            if (selected.length == 0) {
                return undefined;
            }
            facetValues = this.facet.values.getSelected();
        }
        else {
            facetValues = this.facet.values.getAll();
        }
        return facetValues;
    };
    Object.defineProperty(FacetQueryController.prototype, "additionalFilter", {
        get: function () {
            return this.facet.options.additionalFilter ? this.facet.options.additionalFilter : '';
        },
        enumerable: true,
        configurable: true
    });
    FacetQueryController.prototype.getUnionWithCustomSortLowercase = function (customSort, facetValues) {
        // This will take the custom sort, compare it against the passed in facetValues
        // The comparison is lowercase.
        // The union of the 2 arrays with duplicated filtered out is returned.
        var toCompare = _.map(customSort, function (val) {
            return val.toLowerCase();
        });
        var filtered = _.chain(facetValues)
            .filter(function (facetValue) {
            return !_.contains(toCompare, facetValue.value.toLowerCase());
        })
            .map(function (facetValue) {
            return facetValue.value;
        })
            .value();
        return _.compact(customSort.concat(filtered));
    };
    FacetQueryController.prototype.createGroupByQueryOverride = function (queryBuilder) {
        var queryBuilderExpression = queryBuilder.computeCompleteExpressionParts();
        if (this.queryOverrideIsNeededForMultiSelection()) {
            queryBuilderExpression = this.processQueryOverrideForMultiSelection(queryBuilder, queryBuilderExpression);
        }
        else {
            queryBuilderExpression.reset();
        }
        if (this.queryOverrideIsNeededForAdditionalFilter()) {
            queryBuilderExpression = this.processQueryOverrideForAdditionalFilter(queryBuilder, queryBuilderExpression);
        }
        queryBuilderExpression = this.processQueryOverrideForEmptyValues(queryBuilder, queryBuilderExpression);
        if (QueryBuilderExpression_1.QueryBuilderExpression.isEmpty(queryBuilderExpression)) {
            return null;
        }
        return queryBuilderExpression;
    };
    FacetQueryController.prototype.queryOverrideIsNeededForMultiSelection = function () {
        if (this.facet.options.useAnd) {
            return false;
        }
        if (this.facet.values.hasSelectedOrExcludedValues()) {
            return true;
        }
        return false;
    };
    FacetQueryController.prototype.queryOverrideIsNeededForAdditionalFilter = function () {
        return Utils_1.Utils.isNonEmptyString(this.additionalFilter);
    };
    FacetQueryController.prototype.processQueryOverrideForMultiSelection = function (queryBuilder, mergeWith) {
        Eif (this.facet.values.hasSelectedOrExcludedValues()) {
            var ourExpression = this.computeOurFilterExpression();
            mergeWith = queryBuilder.computeCompleteExpressionPartsExcept(ourExpression);
            if (QueryBuilderExpression_1.QueryBuilderExpression.isEmpty(mergeWith)) {
                mergeWith.advanced = '@uri';
            }
        }
        return mergeWith;
    };
    FacetQueryController.prototype.processQueryOverrideForAdditionalFilter = function (queryBuilder, mergeWith) {
        if (Utils_1.Utils.isEmptyString(mergeWith.basic)) {
            mergeWith.basic = queryBuilder.expression.build();
        }
        if (Utils_1.Utils.isEmptyString(mergeWith.constant)) {
            var addExistingConstantExpressionIfNotEmpty = queryBuilder.constantExpression.isEmpty()
                ? ''
                : queryBuilder.constantExpression.build() + ' ';
            mergeWith.constant = "" + addExistingConstantExpressionIfNotEmpty + this.additionalFilter;
        }
        else {
            mergeWith.constant = mergeWith.constant + " " + this.additionalFilter;
        }
        if (!mergeWith.advanced) {
            mergeWith.advanced = this.getFilterExpressionWithoutOurFilterExpression(queryBuilder);
        }
        return mergeWith;
    };
    FacetQueryController.prototype.getFilterExpressionWithoutOurFilterExpression = function (queryBuilder) {
        var expression = new ExpressionBuilder_1.ExpressionBuilder();
        var advancedExpressionParts = queryBuilder.advancedExpression.getParts();
        advancedExpressionParts.forEach(function (part) { return expression.add(part); });
        var currentFacetAdvancedExpression = this.computeOurFilterExpression();
        expression.remove(currentFacetAdvancedExpression);
        return expression.build();
    };
    FacetQueryController.prototype.processQueryOverrideForEmptyValues = function (queryBuilder, mergeWith) {
        var withoutEmptyValues = _.chain(mergeWith)
            .keys()
            .each(function (key) {
            if (Utils_1.Utils.isEmptyString(mergeWith[key]) || Utils_1.Utils.isNullOrUndefined(mergeWith[key])) {
                delete mergeWith[key];
            }
        })
            .value();
        Iif (_.keys(withoutEmptyValues).length == 0) {
            mergeWith = undefined;
        }
        return mergeWith;
    };
    FacetQueryController.prototype.checkForFacetSearchValuesToRemove = function (fieldValues, valueToCheckAgainst) {
        var _this = this;
        var regex = FacetUtils_1.FacetUtils.getRegexToUseForFacetSearch(valueToCheckAgainst, this.facet.options.facetSearchIgnoreAccents);
        return _.filter(fieldValues, function (fieldValue) {
            var isAllowed = _.isEmpty(_this.facet.options.allowedValues) || _this.isValueAllowedByAllowedValueOption(fieldValue.value);
            var value = _this.facet.getValueCaption(fieldValue);
            return isAllowed && regex.test(value);
        });
    };
    FacetQueryController.prototype.filterByAllowedValueOption = function (values) {
        var _this = this;
        return _.filter(values, function (value) { return _this.isValueAllowedByAllowedValueOption(value.value); });
    };
    FacetQueryController.prototype.isValueAllowedByAllowedValueOption = function (value) {
        var _this = this;
        return _.some(this.facet.options.allowedValues, function (allowedValue) {
            var regexContent = _this.replaceWildcardsWithRegexEquivalent(_this.escapeMostRegexCharacters(allowedValue));
            var regex = new RegExp("^" + regexContent + "$", 'gi');
            return regex.test(value);
        });
    };
    FacetQueryController.prototype.escapeMostRegexCharacters = function (text) {
        // Regex taken from https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions
        // `*` and `?` were removed because they are used for wildcards
        return text.replace(/[.+^${}()|[\]\\]/g, '\\$&');
    };
    FacetQueryController.prototype.replaceWildcardsWithRegexEquivalent = function (text) {
        // Allowed value option on the facet should support * (wildcard searches)
        // We need to filter values client side the index will completeWithStandardValues
        // Replace the wildcard (*) for a regex match (.*)
        // Also replace the (?) with "any character once" since it is also supported by the index
        return text.replace(/\*/g, '.*').replace(/\?/g, '.');
    };
    return FacetQueryController;
}());
exports.FacetQueryController = FacetQueryController;
 
 
/***/ }),
/* 185 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var underscore_1 = __webpack_require__(1);
var Core_1 = __webpack_require__(9);
var ComponentsTypes_1 = __webpack_require__(69);
var Dom_1 = __webpack_require__(0);
var InitializationEvents_1 = __webpack_require__(22);
var DependsOnManager = /** @class */ (function () {
    function DependsOnManager(facet) {
        var _this = this;
        this.facet = facet;
        Dom_1.$$(this.facet.ref.searchInterface.element).on(Core_1.QueryEvents.buildingQuery, function () { return _this.handleBuildingQuery(); });
        if (this.getDependsOn(this.facet.ref)) {
            this.facet.ref.bind.onRootElement(InitializationEvents_1.InitializationEvents.afterComponentsInitialization, function () { return _this.setupDependentFacet(); });
        }
    }
    DependsOnManager.prototype.setupDependentFacet = function () {
        var _this = this;
        Dom_1.$$(this.facet.ref.element).addClass('coveo-hidden-dependant-facet');
        this.parentFacetRef = this.getParentFacet(this.facet.ref);
        Eif (this.parentFacetRef) {
            Dom_1.$$(this.facet.ref.root).on('state:change', function () { return _this.resetIfConditionUnfullfiled(); });
        }
    };
    DependsOnManager.prototype.resetIfConditionUnfullfiled = function () {
        var condition = this.getDependsOnCondition(this.facet.ref);
        if (!condition(this.parentFacetRef)) {
            this.facet.reset();
        }
    };
    DependsOnManager.prototype.getId = function (component) {
        var id = component.options.id;
        return id ? "" + id : null;
    };
    DependsOnManager.prototype.getDependsOn = function (component) {
        var dependsOn = component.options.dependsOn;
        return dependsOn ? "" + dependsOn : null;
    };
    DependsOnManager.prototype.getDependsOnCondition = function (component) {
        var _this = this;
        var conditionOption = component.options.dependsOnCondition;
        return conditionOption && underscore_1.isFunction(conditionOption)
            ? conditionOption
            : function () { return _this.parentHasSelectedValues(component) && _this.parentIsEnabled(component); };
    };
    DependsOnManager.prototype.parentHasSelectedValues = function (component) {
        var parent = this.getParentFacet(component);
        return parent && this.valuesExistForFacetWithId(this.getId(parent));
    };
    DependsOnManager.prototype.parentIsEnabled = function (component) {
        var parent = this.getParentFacet(component);
        return parent && !parent.disabled;
    };
    DependsOnManager.prototype.valuesExistForFacetWithId = function (facetId) {
        var values = this.facet.ref.queryStateModel.get(Core_1.QueryStateModel.getFacetId(facetId));
        return !!values && !!values.length;
    };
    Object.defineProperty(DependsOnManager.prototype, "allFacetsInInterface", {
        get: function () {
            return ComponentsTypes_1.ComponentsTypes.getAllFacetsFromSearchInterface(this.facet.ref.searchInterface);
        },
        enumerable: true,
        configurable: true
    });
    DependsOnManager.prototype.getParentFacet = function (component) {
        var _this = this;
        var parent = this.allFacetsInInterface.filter(function (potentialParentFacet) { return _this.getId(potentialParentFacet) === _this.getDependsOn(component); });
        Iif (!parent.length) {
            component.logger.warn('DependsOn reference does not exist', this.getDependsOn(this.facet.ref));
            return null;
        }
        return parent[0];
    };
    Object.defineProperty(DependsOnManager.prototype, "dependentFacets", {
        get: function () {
            var _this = this;
            return this.allFacetsInInterface.filter(function (potentialDependentFacet) { return _this.getId(_this.facet.ref) === _this.getDependsOn(potentialDependentFacet); });
        },
        enumerable: true,
        configurable: true
    });
    DependsOnManager.prototype.handleBuildingQuery = function () {
        var _this = this;
        this.dependentFacets.forEach(function (dependentFacet) {
            var condition = _this.getDependsOnCondition(dependentFacet);
            if (condition(_this.facet.ref)) {
                Dom_1.$$(dependentFacet.element).removeClass('coveo-hidden-dependant-facet');
                return dependentFacet.enable();
            }
            dependentFacet.disable();
            Dom_1.$$(dependentFacet.element).addClass('coveo-hidden-dependant-facet');
        });
    };
    Object.defineProperty(DependsOnManager.prototype, "hasDependentFacets", {
        get: function () {
            return !!this.dependentFacets.length;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(DependsOnManager.prototype, "dependentFacetsHaveSelectedValues", {
        get: function () {
            var _this = this;
            return this.dependentFacets.some(function (dependentFacet) { return _this.valuesExistForFacetWithId(_this.getId(dependentFacet)); });
        },
        enumerable: true,
        configurable: true
    });
    return DependsOnManager;
}());
exports.DependsOnManager = DependsOnManager;
 
 
/***/ }),
/* 186 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
/// <reference path="Facet.ts" />
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
var ValueElement_1 = __webpack_require__(329);
var FacetValueElement = /** @class */ (function (_super) {
    __extends(FacetValueElement, _super);
    function FacetValueElement(facet, facetValue, keepDisplayedValueNextTime) {
        var _this = _super.call(this, facet, facetValue) || this;
        _this.facet = facet;
        _this.facetValue = facetValue;
        _this.keepDisplayedValueNextTime = keepDisplayedValueNextTime;
        return _this;
    }
    FacetValueElement.prototype.bindEvent = function () {
        _super.prototype.bindEvent.call(this, {
            displayNextTime: this.keepDisplayedValueNextTime,
            pinFacet: this.facet.options.preservePosition
        });
    };
    return FacetValueElement;
}(ValueElement_1.ValueElement));
exports.FacetValueElement = FacetValueElement;
 
 
/***/ }),
/* 187 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony default export */ __webpack_exports__["a"] = (function(x) {
  return x === null ? NaN : +x;
});
 
 
/***/ }),
/* 188 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["g"] = spherical;
/* harmony export (immutable) */ __webpack_exports__["a"] = cartesian;
/* harmony export (immutable) */ __webpack_exports__["d"] = cartesianDot;
/* harmony export (immutable) */ __webpack_exports__["c"] = cartesianCross;
/* harmony export (immutable) */ __webpack_exports__["b"] = cartesianAddInPlace;
/* harmony export (immutable) */ __webpack_exports__["f"] = cartesianScale;
/* harmony export (immutable) */ __webpack_exports__["e"] = cartesianNormalizeInPlace;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__math_js__ = __webpack_require__(19);
 
 
function spherical(cartesian) {
  return [Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["e" /* atan2 */])(cartesian[1], cartesian[0]), Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["c" /* asin */])(cartesian[2])];
}
 
function cartesian(spherical) {
  var lambda = spherical[0], phi = spherical[1], cosPhi = Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["g" /* cos */])(phi);
  return [cosPhi * Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["g" /* cos */])(lambda), cosPhi * Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["t" /* sin */])(lambda), Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["t" /* sin */])(phi)];
}
 
function cartesianDot(a, b) {
  return a[0] * b[0] + a[1] * b[1] + a[2] * b[2];
}
 
function cartesianCross(a, b) {
  return [a[1] * b[2] - a[2] * b[1], a[2] * b[0] - a[0] * b[2], a[0] * b[1] - a[1] * b[0]];
}
 
// TODO return a
function cartesianAddInPlace(a, b) {
  a[0] += b[0], a[1] += b[1], a[2] += b[2];
}
 
function cartesianScale(vector, k) {
  return [vector[0] * k, vector[1] * k, vector[2] * k];
}
 
// TODO return d
function cartesianNormalizeInPlace(d) {
  var l = Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["u" /* sqrt */])(d[0] * d[0] + d[1] * d[1] + d[2] * d[2]);
  d[0] /= l, d[1] /= l, d[2] /= l;
}
 
 
/***/ }),
/* 189 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["b"] = azimuthalRaw;
/* harmony export (immutable) */ __webpack_exports__["a"] = azimuthalInvert;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__math_js__ = __webpack_require__(19);
 
 
function azimuthalRaw(scale) {
  return function(x, y) {
    var cx = Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["g" /* cos */])(x),
        cy = Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["g" /* cos */])(y),
        k = scale(cx * cy);
    return [
      k * cy * Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["t" /* sin */])(x),
      k * Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["t" /* sin */])(y)
    ];
  }
}
 
function azimuthalInvert(angle) {
  return function(x, y) {
    var z = Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["u" /* sqrt */])(x * x + y * y),
        c = angle(z),
        sc = Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["t" /* sin */])(c),
        cc = Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["g" /* cos */])(c);
    return [
      Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["e" /* atan2 */])(x * sc, z * cc),
      Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["c" /* asin */])(z && y * sc / z)
    ];
  }
}
 
 
/***/ }),
/* 190 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony default export */ __webpack_exports__["a"] = (function(parent, x0, y0, x1, y1) {
  var nodes = parent.children,
      node,
      i = -1,
      n = nodes.length,
      k = parent.value && (x1 - x0) / parent.value;
 
  while (++i < n) {
    node = nodes[i], node.y0 = y0, node.y1 = y1;
    node.x0 = x0, node.x1 = x0 += node.value * k;
  }
});
 
 
/***/ }),
/* 191 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return abs; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return atan2; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return cos; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return max; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return min; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "k", function() { return sin; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "l", function() { return sqrt; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return epsilon; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return pi; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return halfPi; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "m", function() { return tau; });
/* harmony export (immutable) */ __webpack_exports__["b"] = acos;
/* harmony export (immutable) */ __webpack_exports__["c"] = asin;
var abs = Math.abs;
var atan2 = Math.atan2;
var cos = Math.cos;
var max = Math.max;
var min = Math.min;
var sin = Math.sin;
var sqrt = Math.sqrt;
 
var epsilon = 1e-12;
var pi = Math.PI;
var halfPi = pi / 2;
var tau = 2 * pi;
 
function acos(x) {
  return x > 1 ? 0 : x < -1 ? pi : Math.acos(x);
}
 
function asin(x) {
  return x >= 1 ? halfPi : x <= -1 ? -halfPi : Math.asin(x);
}
 
 
/***/ }),
/* 192 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony default export */ __webpack_exports__["a"] = (function(series, order) {
  if (!((n = series.length) > 1)) return;
  for (var i = 1, j, s0, s1 = series[order[0]], n, m = s1.length; i < n; ++i) {
    s0 = s1, s1 = series[order[i]];
    for (j = 0; j < m; ++j) {
      s1[j][1] += s1[j][0] = isNaN(s0[j][1]) ? s0[j][0] : s0[j][1];
    }
  }
});
 
 
/***/ }),
/* 193 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony default export */ __webpack_exports__["a"] = (function(series) {
  var n = series.length, o = new Array(n);
  while (--n >= 0) o[n] = n;
  return o;
});
 
 
/***/ }),
/* 194 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return epsilon; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return epsilon2; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return beaches; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return cells; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return circles; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return edges; });
/* harmony export (immutable) */ __webpack_exports__["d"] = Diagram;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Beach__ = __webpack_require__(1460);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Cell__ = __webpack_require__(783);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Circle__ = __webpack_require__(784);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Edge__ = __webpack_require__(375);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__RedBlackTree__ = __webpack_require__(374);
 
 
 
 
 
 
var epsilon = 1e-6;
var epsilon2 = 1e-12;
var beaches;
var cells;
var circles;
var edges;
 
function triangleArea(a, b, c) {
  return (a[0] - c[0]) * (b[1] - a[1]) - (a[0] - b[0]) * (c[1] - a[1]);
}
 
function lexicographic(a, b) {
  return b[1] - a[1]
      || b[0] - a[0];
}
 
function Diagram(sites, extent) {
  var site = sites.sort(lexicographic).pop(),
      x,
      y,
      circle;
 
  edges = [];
  cells = new Array(sites.length);
  beaches = new __WEBPACK_IMPORTED_MODULE_4__RedBlackTree__["b" /* default */];
  circles = new __WEBPACK_IMPORTED_MODULE_4__RedBlackTree__["b" /* default */];
 
  while (true) {
    circle = __WEBPACK_IMPORTED_MODULE_2__Circle__["c" /* firstCircle */];
    if (site && (!circle || site[1] < circle.y || (site[1] === circle.y && site[0] < circle.x))) {
      if (site[0] !== x || site[1] !== y) {
        Object(__WEBPACK_IMPORTED_MODULE_0__Beach__["a" /* addBeach */])(site);
        x = site[0], y = site[1];
      }
      site = sites.pop();
    } else if (circle) {
      Object(__WEBPACK_IMPORTED_MODULE_0__Beach__["b" /* removeBeach */])(circle.arc);
    } else {
      break;
    }
  }
 
  Object(__WEBPACK_IMPORTED_MODULE_1__Cell__["d" /* sortCellHalfedges */])();
 
  if (extent) {
    var x0 = +extent[0][0],
        y0 = +extent[0][1],
        x1 = +extent[1][0],
        y1 = +extent[1][1];
    Object(__WEBPACK_IMPORTED_MODULE_3__Edge__["a" /* clipEdges */])(x0, y0, x1, y1);
    Object(__WEBPACK_IMPORTED_MODULE_1__Cell__["b" /* clipCells */])(x0, y0, x1, y1);
  }
 
  this.edges = edges;
  this.cells = cells;
 
  beaches =
  circles =
  edges =
  cells = null;
}
 
Diagram.prototype = {
  constructor: Diagram,
 
  polygons: function() {
    var edges = this.edges;
 
    return this.cells.map(function(cell) {
      var polygon = cell.halfedges.map(function(i) { return Object(__WEBPACK_IMPORTED_MODULE_1__Cell__["a" /* cellHalfedgeStart */])(cell, edges[i]); });
      polygon.data = cell.site.data;
      return polygon;
    });
  },
 
  triangles: function() {
    var triangles = [],
        edges = this.edges;
 
    this.cells.forEach(function(cell, i) {
      if (!(m = (halfedges = cell.halfedges).length)) return;
      var site = cell.site,
          halfedges,
          j = -1,
          m,
          s0,
          e1 = edges[halfedges[m - 1]],
          s1 = e1.left === site ? e1.right : e1.left;
 
      while (++j < m) {
        s0 = s1;
        e1 = edges[halfedges[j]];
        s1 = e1.left === site ? e1.right : e1.left;
        if (s0 && s1 && i < s0.index && i < s1.index && triangleArea(site, s0, s1) < 0) {
          triangles.push([site.data, s0.data, s1.data]);
        }
      }
    });
 
    return triangles;
  },
 
  links: function() {
    return this.edges.filter(function(edge) {
      return edge.right;
    }).map(function(edge) {
      return {
        source: edge.left.data,
        target: edge.right.data
      };
    });
  },
 
  find: function(x, y, radius) {
    var that = this, i0, i1 = that._found || 0, n = that.cells.length, cell;
 
    // Use the previously-found cell, or start with an arbitrary one.
    while (!(cell = that.cells[i1])) if (++i1 >= n) return null;
    var dx = x - cell.site[0], dy = y - cell.site[1], d2 = dx * dx + dy * dy;
 
    // Traverse the half-edges to find a closer cell, if any.
    do {
      cell = that.cells[i0 = i1], i1 = null;
      cell.halfedges.forEach(function(e) {
        var edge = that.edges[e], v = edge.left;
        if ((v === cell.site || !v) && !(v = edge.right)) return;
        var vx = x - v[0], vy = y - v[1], v2 = vx * vx + vy * vy;
        if (v2 < d2) d2 = v2, i1 = v.index;
      });
    } while (i1 !== null);
 
    that._found = i0;
 
    return radius == null || d2 <= radius * radius ? cell.site : null;
  }
}
 
 
/***/ }),
/* 195 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var underscore_1 = __webpack_require__(1);
var Assert_1 = __webpack_require__(12);
var VALID_SORT;
(function (VALID_SORT) {
    VALID_SORT["RELEVANCY"] = "relevancy";
    VALID_SORT["DATE"] = "date";
    VALID_SORT["QRE"] = "qre";
})(VALID_SORT = exports.VALID_SORT || (exports.VALID_SORT = {}));
var VALID_DIRECTION;
(function (VALID_DIRECTION) {
    VALID_DIRECTION["ASCENDING"] = "ascending";
    VALID_DIRECTION["DESCENDING"] = "descending";
})(VALID_DIRECTION = exports.VALID_DIRECTION || (exports.VALID_DIRECTION = {}));
var SortCriterion = /** @class */ (function () {
    /**
     * Create a new SortCriteria
     * @param sort The sort criteria (e.g.: relevancy, date)
     * @param direction The direction by which to sort (e.g.: ascending, descending)
     */
    function SortCriterion(sort, direction) {
        if (direction === void 0) { direction = ''; }
        this.sort = sort;
        this.direction = direction;
        if (!SortCriterion.sortIsField(sort)) {
            Assert_1.Assert.check(this.isValidSort(sort), sort + " is not a valid sort criteria. Valid values are " + underscore_1.values(VALID_SORT) + " or a valid index sortable index field.");
        }
        if (SortCriterion.sortNeedsDirection(sort)) {
            Assert_1.Assert.check(this.isValidDirection(direction), direction + " is not a valid sort criteria direction. Valid values are " + underscore_1.values(VALID_DIRECTION));
        }
        else {
            Assert_1.Assert.check(direction == '');
        }
    }
    SortCriterion.prototype.isValidDirection = function (direction) {
        return underscore_1.chain(VALID_DIRECTION)
            .values()
            .contains(direction)
            .value();
    };
    SortCriterion.prototype.isValidSort = function (sort) {
        return underscore_1.chain(VALID_SORT)
            .values()
            .contains(sort)
            .value();
    };
    SortCriterion.sortIsField = function (criteria) {
        return criteria.charAt(0) == '@';
    };
    SortCriterion.sortNeedsDirection = function (sort) {
        return underscore_1.contains(SortCriterion.sortsNeedingDirection, sort) || SortCriterion.sortIsField(sort);
    };
    SortCriterion.sortsNeedingDirection = [VALID_SORT.DATE];
    return SortCriterion;
}());
exports.SortCriterion = SortCriterion;
var SortCriteria = /** @class */ (function () {
    function SortCriteria(rawCriteriaString) {
        var _this = this;
        this.criteria = [];
        var criteria = rawCriteriaString.split(';');
        criteria.forEach(function (criterion) {
            var split = criterion.match(/\S+/g);
            _this.criteria.push(new SortCriterion(split[0], split[1]));
        });
    }
    Object.defineProperty(SortCriteria.prototype, "direction", {
        get: function () {
            return underscore_1.first(this.criteria).direction;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(SortCriteria.prototype, "sort", {
        get: function () {
            return underscore_1.first(this.criteria).sort;
        },
        enumerable: true,
        configurable: true
    });
    /**
     * Return a new SortCriteria from a string
     * @param criteria The string from which to create the SortCriteria
     */
    SortCriteria.parse = function (criteria) {
        return new SortCriteria(criteria);
    };
    /**
     * Put the sort criteria in the passed queryBuilder
     * @param queryBuilder The queryBuilder in which to put the sort criteria.
     */
    SortCriteria.prototype.putInQueryBuilder = function (queryBuilder) {
        Assert_1.Assert.exists(queryBuilder);
        queryBuilder.sortCriteria = this.toString()
            .split(';')
            .join(',');
    };
    /**
     * Returns a string representation of the sort criteria (e.g.: 'date ascending').
     */
    SortCriteria.prototype.toString = function () {
        return this.criteria
            .map(function (criterion) {
            return criterion.direction ? criterion.sort + " " + criterion.direction : "" + criterion.sort;
        })
            .join(';');
    };
    /**
     * Checks if the SortCriteria is equal to another.
     * @param criteria The SortCriteria to compare with
     */
    SortCriteria.prototype.equals = function (criteria) {
        return criteria.toString() == this.toString();
    };
    return SortCriteria;
}());
exports.SortCriteria = SortCriteria;
 
 
/***/ }),
/* 196 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
///<reference path="FieldAddon.ts" />
///<reference path="QueryExtensionAddon.ts" />
///<reference path="QuerySuggestAddon.ts" />
///<reference path="OldOmniboxAddon.ts" />
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __assign = (this && this.__assign) || Object.assign || function(t) {
    for (var s, i = 1, n = arguments.length; i < n; i++) {
        s = arguments[i];
        for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
            t[p] = s[p];
    }
    return t;
};
Object.defineProperty(exports, "__esModule", { value: true });
__webpack_require__(1486);
var _ = __webpack_require__(1);
var underscore_1 = __webpack_require__(1);
var BreadcrumbEvents_1 = __webpack_require__(33);
var OmniboxEvents_1 = __webpack_require__(47);
var QueryEvents_1 = __webpack_require__(14);
var StandaloneSearchInterfaceEvents_1 = __webpack_require__(170);
var GlobalExports_1 = __webpack_require__(10);
var Grammar_1 = __webpack_require__(154);
var Complete_1 = __webpack_require__(798);
var Expressions_1 = __webpack_require__(803);
var MagicBox_1 = __webpack_require__(264);
var Assert_1 = __webpack_require__(12);
var ComponentOptionsModel_1 = __webpack_require__(55);
var Model_1 = __webpack_require__(26);
var QueryStateModel_1 = __webpack_require__(17);
var Strings_1 = __webpack_require__(4);
var Dom_1 = __webpack_require__(0);
var Utils_1 = __webpack_require__(5);
var AnalyticsActionListMeta_1 = __webpack_require__(7);
var PendingSearchAsYouTypeSearchEvent_1 = __webpack_require__(179);
var SharedAnalyticsCalls_1 = __webpack_require__(172);
var Component_1 = __webpack_require__(6);
var ComponentOptions_1 = __webpack_require__(13);
var Initialization_1 = __webpack_require__(8);
var Querybox_1 = __webpack_require__(125);
var QueryboxOptionsProcessing_1 = __webpack_require__(807);
var QueryboxQueryParameters_1 = __webpack_require__(171);
var SearchInterface_1 = __webpack_require__(25);
var FieldAddon_1 = __webpack_require__(1489);
var OldOmniboxAddon_1 = __webpack_require__(1490);
var QueryExtensionAddon_1 = __webpack_require__(1491);
var QuerySuggestAddon_1 = __webpack_require__(387);
var MINIMUM_EXECUTABLE_CONFIDENCE = 0.8;
/**
 * The `Omnibox` component extends the [`Querybox`]{@link Querybox}, and thus provides the same basic options and
 * behaviors. Furthermore, the `Omnibox` adds a type-ahead capability to the search input.
 *
 * You can configure the type-ahead feature by enabling or disabling certain addons, which the Coveo JavaScript Search
 * Framework provides out-of-the-box (see the [`enableFieldAddon`]{@link Omnibox.options.enableFieldAddon},
 * [`enableQueryExtension`]{@link Omnibox.options.enableQueryExtensionAddon}, and
 * [`enableQuerySuggestAddon`]{@link Omnibox.options.enableQuerySuggestAddon} options).
 *
 * Custom components and external code can also extend or customize the type-ahead feature and the query completion
 * suggestions it provides by attaching their own handlers to the
 * [`populateOmniboxSuggestions`]{@link OmniboxEvents.populateOmniboxSuggestions} event.
 *
 * See also the [`Searchbox`]{@link Searchbox} component, which can automatically instantiate an `Omnibox` along with an
 * optional {@link SearchButton}.
 */
var Omnibox = /** @class */ (function (_super) {
    __extends(Omnibox, _super);
    /**
     * Creates a new Omnibox component. Also enables necessary addons and binds events on various query events.
     * @param element The HTMLElement on which to instantiate the component.
     * @param options The options for the Omnibox component.
     * @param bindings The bindings that the component requires to function normally. If not set, these will be
     * automatically resolved (with a slower execution time).
     */
    function Omnibox(element, options, bindings) {
        var _this = _super.call(this, element, Omnibox.ID, bindings) || this;
        _this.element = element;
        _this.options = options;
        _this.lastSuggestions = [];
        _this.movedOnce = false;
        _this.skipAutoSuggest = false;
        _this.options = ComponentOptions_1.ComponentOptions.initComponentOptions(element, Omnibox, options);
        var originalValueForQuerySyntax = _this.options.enableQuerySyntax;
        new QueryboxOptionsProcessing_1.QueryboxOptionsProcessing(_this).postProcess();
        _this.omniboxAnalytics = _this.searchInterface.getOmniboxAnalytics();
        Dom_1.$$(_this.element).toggleClass('coveo-query-syntax-disabled', _this.options.enableQuerySyntax == false);
        _this.suggestionAddon = _this.options.enableQuerySuggestAddon ? new QuerySuggestAddon_1.QuerySuggestAddon(_this) : new QuerySuggestAddon_1.VoidQuerySuggestAddon();
        new OldOmniboxAddon_1.OldOmniboxAddon(_this);
        _this.createMagicBox();
        _this.bind.onRootElement(QueryEvents_1.QueryEvents.newQuery, function (args) { return _this.handleNewQuery(args); });
        _this.bind.onRootElement(QueryEvents_1.QueryEvents.buildingQuery, function (args) { return _this.handleBuildingQuery(args); });
        _this.bind.onRootElement(StandaloneSearchInterfaceEvents_1.StandaloneSearchInterfaceEvents.beforeRedirect, function () { return _this.handleBeforeRedirect(); });
        _this.bind.onRootElement(QueryEvents_1.QueryEvents.querySuccess, function () { return _this.handleQuerySuccess(); });
        _this.bind.onQueryState(Model_1.MODEL_EVENTS.CHANGE_ONE, QueryStateModel_1.QUERY_STATE_ATTRIBUTES.Q, function (args) {
            return _this.handleQueryStateChanged(args);
        });
        if (_this.isAutoSuggestion()) {
            _this.bind.onRootElement(QueryEvents_1.QueryEvents.duringQuery, function (args) { return _this.handleDuringQuery(args); });
        }
        _this.bind.onComponentOptions(Model_1.MODEL_EVENTS.CHANGE_ONE, ComponentOptionsModel_1.COMPONENT_OPTIONS_ATTRIBUTES.SEARCH_BOX, function (args) {
            if (args.value.enableQuerySyntax != null) {
                _this.options.enableQuerySyntax = args.value.enableQuerySyntax;
            }
            else {
                _this.options.enableQuerySyntax = originalValueForQuerySyntax;
            }
            _this.updateGrammar();
        });
        _this.bind.onRootElement(OmniboxEvents_1.OmniboxEvents.querySuggestGetFocus, function (args) { return _this.handleQuerySuggestGetFocus(args); });
        return _this;
    }
    /**
     * Adds the current content of the input to the query and triggers a query if the current content of the input has
     * changed since last submit.
     *
     * Also logs a `searchboxSubmit` event in the usage analytics.
     */
    Omnibox.prototype.submit = function () {
        var _this = this;
        this.magicBox.clearSuggestion();
        this.updateQueryState();
        this.triggerNewQuery(false, function () {
            SharedAnalyticsCalls_1.logSearchBoxSubmitEvent(_this.usageAnalytics);
        });
        this.magicBox.blur();
    };
    /**
     * Gets the current content of the input.
     * @returns {string} The current content of the input.
     */
    Omnibox.prototype.getText = function () {
        return this.magicBox.getText();
    };
    /**
     * Sets the content of the input
     * @param text The string to set in the input.
     */
    Omnibox.prototype.setText = function (text) {
        this.magicBox.setText(text);
        this.updateQueryState();
    };
    /**
     * Clears the content of the input.
     */
    Omnibox.prototype.clear = function () {
        this.magicBox.clear();
    };
    /**
     * Gets the `HTMLInputElement` of the Omnibox.
     */
    Omnibox.prototype.getInput = function () {
        return this.magicBox.element.querySelector('input');
    };
    Omnibox.prototype.getResult = function () {
        return this.magicBox.getResult();
    };
    Omnibox.prototype.getDisplayedResult = function () {
        return this.magicBox.getDisplayedResult();
    };
    Omnibox.prototype.getCursor = function () {
        return this.magicBox.getCursor();
    };
    Omnibox.prototype.resultAtCursor = function (match) {
        return this.magicBox.resultAtCursor(match);
    };
    Omnibox.prototype.createGrammar = function () {
        var grammar = null;
        if (this.options.enableQuerySyntax) {
            grammar = Expressions_1.Expressions(Complete_1.Complete);
            if (this.options.enableFieldAddon) {
                new FieldAddon_1.FieldAddon(this);
            }
            Iif (this.options.fieldAlias != null) {
                this.options.listOfFields = this.options.listOfFields || [];
                this.options.listOfFields = this.options.listOfFields.concat(_.keys(this.options.fieldAlias));
            }
            if (this.options.enableQueryExtensionAddon) {
                new QueryExtensionAddon_1.QueryExtensionAddon(this);
            }
        }
        else {
            grammar = { start: 'Any', expressions: { Any: /.*/ } };
        }
        Iif (this.options.grammar != null) {
            grammar = this.options.grammar(grammar);
        }
        return grammar;
    };
    Omnibox.prototype.updateGrammar = function () {
        var grammar = this.createGrammar();
        this.magicBox.grammar = new Grammar_1.Grammar(grammar.start, grammar.expressions);
        this.magicBox.setText(this.magicBox.getText());
    };
    Omnibox.prototype.createMagicBox = function () {
        var grammar = this.createGrammar();
        this.magicBox = MagicBox_1.createMagicBox(this.element, new Grammar_1.Grammar(grammar.start, grammar.expressions), {
            inline: this.options.inline,
            selectableSuggestionClass: 'coveo-omnibox-selectable',
            selectedSuggestionClass: 'coveo-omnibox-selected',
            suggestionTimeout: this.options.omniboxTimeout
        });
        var input = Dom_1.$$(this.magicBox.element).find('input');
        Eif (input) {
            Dom_1.$$(input).setAttribute('aria-label', Strings_1.l('Search'));
        }
        this.setupMagicBox();
    };
    Omnibox.prototype.setupMagicBox = function () {
        var _this = this;
        this.magicBox.onmove = function () {
            // We assume that once the user has moved its selection, it becomes an explicit omnibox analytics event
            Iif (_this.isAutoSuggestion()) {
                _this.modifyEventTo = _this.getOmniboxAnalyticsEventCause();
            }
            _this.movedOnce = true;
        };
        this.magicBox.onfocus = function () {
            if (_this.isAutoSuggestion()) {
                // This flag is used to block the automatic query when the UI is loaded with a query (#q=foo)
                // and then the input is focused. We want to block that query, even if it match the suggestion
                // Only when there is an actual change in the input (user typing something) is when we want the automatic query to kick in
                _this.skipAutoSuggest = true;
            }
        };
        this.magicBox.onSuggestions = function (suggestions) {
            // If text is empty, this can mean that user selected text from the search box
            // and hit "delete" : Reset the partial queries in this case
            if (Utils_1.Utils.isEmptyString(_this.getText())) {
                _this.omniboxAnalytics.partialQueries = [];
            }
            _this.movedOnce = false;
            _this.lastSuggestions = suggestions;
            if (_this.isAutoSuggestion() && !_this.skipAutoSuggest) {
                _this.searchAsYouType();
            }
        };
        if (this.options.enableSearchAsYouType) {
            Dom_1.$$(this.element).addClass('coveo-magicbox-search-as-you-type');
        }
        this.magicBox.onchange = function () {
            _this.skipAutoSuggest = false;
            var text = _this.getText();
            Eif (text != undefined && text != '') {
                if (_this.isAutoSuggestion()) {
                    Iif (_this.movedOnce) {
                        _this.searchAsYouType(true);
                    }
                }
                else Eif (_this.options.enableSearchAsYouType) {
                    _this.searchAsYouType(true);
                }
            }
            else {
                _this.clear();
            }
        };
        if (this.options.placeholder) {
            this.magicBox.element.querySelector('input').placeholder = this.options.placeholder;
        }
        this.magicBox.onsubmit = function () { return _this.submit(); };
        this.magicBox.onselect = function (suggestion) {
            var index = _.indexOf(_this.lastSuggestions, suggestion);
            var suggestions = _.compact(_.map(_this.lastSuggestions, function (suggestion) { return suggestion.text; }));
            _this.magicBox.clearSuggestion();
            _this.updateQueryState();
            // A bit tricky here : When it's machine learning auto suggestions
            // the mouse selection and keyboard selection acts differently :
            // keyboard selection will automatically do the query (which will log a search as you type event -> further modified by this.modifyEventTo if needed)
            // mouse selection will not "auto" send the query.
            // the movedOnce variable detect the keyboard movement, and is used to differentiate mouse vs keyboard
            Iif (!_this.isAutoSuggestion()) {
                _this.usageAnalytics.cancelAllPendingEvents();
                _this.triggerNewQuery(false, function () {
                    _this.usageAnalytics.logSearchEvent(_this.getOmniboxAnalyticsEventCause(), _this.buildCustomDataForPartialQueries(index, suggestions));
                });
            }
            else Iif (_this.isAutoSuggestion() && _this.movedOnce) {
                _this.handleAutoSuggestionWithKeyboard(index, suggestions);
            }
            else Eif (_this.isAutoSuggestion() && !_this.movedOnce) {
                _this.handleAutoSuggestionsWithMouse(index, suggestions);
            }
            // Consider a selection like a reset of the partial queries (it's the end of a suggestion pattern)
            Eif (_this.isAutoSuggestion()) {
                _this.omniboxAnalytics.partialQueries = [];
            }
        };
        this.magicBox.onblur = function () {
            Iif (_this.isAutoSuggestion()) {
                _this.setText(_this.getQuery(true));
                _this.usageAnalytics.sendAllPendingEvents();
            }
        };
        this.magicBox.onclear = function () {
            _this.updateQueryState();
            if (_this.options.triggerQueryOnClear || _this.options.enableSearchAsYouType) {
                _this.triggerNewQuery(false, function () {
                    _this.usageAnalytics.logSearchEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.searchboxClear, {});
                });
            }
        };
        this.magicBox.ontabpress = function () {
            _this.handleTabPress();
        };
        this.magicBox.getSuggestions = function () { return _this.handleSuggestions(); };
    };
    Omnibox.prototype.handleAutoSuggestionWithKeyboard = function (index, suggestions) {
        var _this = this;
        if (this.searchAsYouTypeTimeout) {
            // Here, there is currently a search as you typed queued up :
            // Think : user typed very quickly, then very quickly selected a suggestion (without waiting for the search as you type)
            // Cancel the search as you type query, then immediately do the query with the selection (+analytics event with the selection)
            this.usageAnalytics.cancelAllPendingEvents();
            clearTimeout(this.searchAsYouTypeTimeout);
            this.searchAsYouTypeTimeout = undefined;
            this.triggerNewQuery(false, function () {
                _this.usageAnalytics.logSearchEvent(_this.getOmniboxAnalyticsEventCause(), _this.buildCustomDataForPartialQueries(index, suggestions));
            });
        }
        else {
            // Here, the search as you type query has returned, but the analytics event has not ye been sent.
            // Think : user typed slowly, the query returned, and then the user selected a suggestion.
            // Since the analytics event has not yet been sent (search as you type event have a 5 sec delay)
            // modify the pending event, then send the newly modified analytics event immediately.
            this.modifyEventTo = this.getOmniboxAnalyticsEventCause();
            this.modifyCustomDataOnPending(index, suggestions);
            this.modifyQueryContentOnPending();
            this.usageAnalytics.sendAllPendingEvents();
        }
    };
    Omnibox.prototype.handleAutoSuggestionsWithMouse = function (index, suggestions) {
        var _this = this;
        Eif (this.searchAsYouTypeTimeout || index != 0) {
            // Here : the user either very quickly chose the first suggestion, and the search as you type is still queued up.
            // OR
            // the user chose something different then the first suggestion.
            // Remove the search as you type if it's there, and do the query with the suggestion directly.
            this.clearSearchAsYouType();
            this.usageAnalytics.cancelAllPendingEvents();
            this.triggerNewQuery(false, function () {
                _this.usageAnalytics.logSearchEvent(_this.getOmniboxAnalyticsEventCause(), _this.buildCustomDataForPartialQueries(index, suggestions));
            });
        }
        else {
            // Here : the user either very slowly chose a suggestion, and there is no search as you typed queued up
            // AND
            // the user chose the first suggestion.
            // this means the query is already returned, but the analytics event is still queued up.
            // modify the analytics event, and send it.
            this.modifyEventTo = this.getOmniboxAnalyticsEventCause();
            this.modifyCustomDataOnPending(index, suggestions);
            this.modifyQueryContentOnPending();
            this.usageAnalytics.sendAllPendingEvents();
            // This should happen if :
            // users did a (short) query first, which does not match the first suggestion. (eg: typed "t", then search)
            // then, refocus the search box. The same suggestion(s) will re-appear.
            // By selecting the first one with the mouse, we need to retrigger a query because this means the search as you type could not
            // kick in and do the query automatically.
            if (this.lastQuery != this.getText()) {
                this.triggerNewQuery(false, function () {
                    _this.usageAnalytics.logSearchEvent(_this.getOmniboxAnalyticsEventCause(), _this.buildCustomDataForPartialQueries(index, suggestions));
                });
            }
        }
    };
    Omnibox.prototype.modifyCustomDataOnPending = function (index, suggestions) {
        var pendingEvt = this.usageAnalytics.getPendingSearchEvent();
        if (pendingEvt instanceof PendingSearchAsYouTypeSearchEvent_1.PendingSearchAsYouTypeSearchEvent) {
            var newCustomData_1 = this.buildCustomDataForPartialQueries(index, suggestions);
            _.each(_.keys(newCustomData_1), function (k) {
                pendingEvt.modifyCustomData(k, newCustomData_1[k]);
            });
        }
    };
    Omnibox.prototype.modifyQueryContentOnPending = function () {
        var pendingEvt = this.usageAnalytics.getPendingSearchEvent();
        if (pendingEvt instanceof PendingSearchAsYouTypeSearchEvent_1.PendingSearchAsYouTypeSearchEvent) {
            var queryContent = this.getQuery(this.options.enableSearchAsYouType);
            pendingEvt.modifyQueryContent(queryContent);
        }
    };
    Omnibox.prototype.buildCustomDataForPartialQueries = function (index, suggestions) {
        this.updateOmniboxAnalytics(suggestions, index);
        return this.omniboxAnalytics.buildCustomDataForPartialQueries();
    };
    Omnibox.prototype.handleQuerySuggestGetFocus = function (_a) {
        var suggestion = _a.suggestion;
        var suggestions = _.compact(_.map(this.lastSuggestions, function (suggestion) { return suggestion.text; }));
        var ranking = this.lastSuggestions.indexOf(underscore_1.findWhere(this.lastSuggestions, { text: suggestion }));
        this.updateOmniboxAnalytics(suggestions, ranking);
    };
    Omnibox.prototype.updateOmniboxAnalytics = function (suggestions, suggestionRanking) {
        this.omniboxAnalytics.suggestions = suggestions;
        this.omniboxAnalytics.suggestionRanking = suggestionRanking;
    };
    Omnibox.prototype.handleSuggestions = function () {
        var text = this.getText();
        if (this.options.querySuggestCharacterThreshold <= text.length) {
            var suggestionsEventArgs = {
                suggestions: [],
                omnibox: this
            };
            this.triggerOmniboxSuggestions(suggestionsEventArgs);
            if (!Utils_1.Utils.isNullOrEmptyString(text)) {
                this.omniboxAnalytics.partialQueries.push(text);
            }
            return _.compact(suggestionsEventArgs.suggestions);
        }
        else {
            return [];
        }
    };
    Omnibox.prototype.triggerOmniboxSuggestions = function (args) {
        this.bind.trigger(this.element, OmniboxEvents_1.OmniboxEvents.populateOmniboxSuggestions, args);
        if (!Dom_1.$$(this.element).isDescendant(this.root)) {
            this.bind.trigger(this.root, OmniboxEvents_1.OmniboxEvents.populateOmniboxSuggestions, args);
        }
    };
    Omnibox.prototype.handleBeforeRedirect = function () {
        this.updateQueryState();
    };
    Omnibox.prototype.handleBuildingQuery = function (data) {
        var _this = this;
        Assert_1.Assert.exists(data);
        Assert_1.Assert.exists(data.queryBuilder);
        this.updateQueryState();
        this.lastQuery = this.getQuery(data.searchAsYouType);
        var result = this.lastQuery == this.magicBox.getDisplayedResult().input
            ? this.magicBox.getDisplayedResult().clone()
            : this.magicBox.grammar.parse(this.lastQuery).clean();
        var preprocessResultForQueryArgs = {
            result: result
        };
        if (this.options.enableQuerySyntax) {
            var notQuotedValues = preprocessResultForQueryArgs.result.findAll('FieldValueNotQuoted');
            _.each(notQuotedValues, function (value) { return (value.value = '"' + value.value.replace(/"|\u00A0/g, ' ') + '"'); });
            Iif (this.options.fieldAlias) {
                var fieldNames = preprocessResultForQueryArgs.result.findAll(function (result) { return result.expression.id == 'FieldName' && result.isSuccess(); });
                _.each(fieldNames, function (result) {
                    var alias = _.find(_.keys(_this.options.fieldAlias), function (alias) { return alias.toLowerCase() == result.value.toLowerCase(); });
                    if (alias != null) {
                        result.value = _this.options.fieldAlias[alias];
                    }
                });
            }
        }
        this.triggerOmniboxPreprocessResultForQuery(preprocessResultForQueryArgs);
        var query = preprocessResultForQueryArgs.result.toString();
        new QueryboxQueryParameters_1.QueryboxQueryParameters(this.options).addParameters(data.queryBuilder, query);
    };
    Omnibox.prototype.triggerOmniboxPreprocessResultForQuery = function (args) {
        this.bind.trigger(this.element, OmniboxEvents_1.OmniboxEvents.omniboxPreprocessResultForQuery, args);
        if (!Dom_1.$$(this.element).isDescendant(this.root)) {
            this.bind.trigger(this.root, OmniboxEvents_1.OmniboxEvents.omniboxPreprocessResultForQuery, args);
        }
    };
    Omnibox.prototype.handleNewQuery = function (data) {
        Assert_1.Assert.exists(data);
        this.options.clearFiltersOnNewQuery && this.clearFiltersIfNewQuery(data);
    };
    Omnibox.prototype.clearFiltersIfNewQuery = function (_a) {
        var origin = _a.origin, searchAsYouType = _a.searchAsYouType;
        if (this.queryController.firstQuery) {
            return;
        }
        // Prevent queries triggered by unrelated components to clear the the filters
        // e.g., a facet selection
        var validOrigins = [Omnibox.ID, 'SearchButton'];
        if (!origin || validOrigins.indexOf(origin.type) === -1) {
            return;
        }
        var lastQuery = this.queryController.getLastQuery().q || '';
        var newQuery = this.getQuery(searchAsYouType);
        if (lastQuery !== newQuery) {
            this.bind.trigger(this.root, BreadcrumbEvents_1.BreadcrumbEvents.clearBreadcrumb);
        }
    };
    Omnibox.prototype.handleTabPress = function () {
        if (this.options.enableQuerySuggestAddon) {
            this.handleTabPressForSuggestions();
        }
        this.handleTabPressForOldOmniboxAddon();
    };
    Omnibox.prototype.handleTabPressForSuggestions = function () {
        if (!this.options.enableSearchAsYouType) {
            var suggestions = _.compact(_.map(this.lastSuggestions, function (suggestion) { return suggestion.text; }));
            this.usageAnalytics.logCustomEvent(this.getOmniboxAnalyticsEventCause(), this.buildCustomDataForPartialQueries(0, suggestions), this.element);
        }
        else {
            this.setText(this.getQuery(true));
        }
    };
    Omnibox.prototype.handleTabPressForOldOmniboxAddon = function () {
        var domSuggestions = this.lastSuggestions.filter(function (suggestions) { return suggestions.dom; }).map(function (suggestions) { return Dom_1.$$(suggestions.dom); });
        var selected = this.findAllElementsWithClass(domSuggestions, '.coveo-omnibox-selected');
        if (selected.length > 0) {
            Dom_1.$$(selected[0]).trigger('tabSelect');
        }
        else if (!this.options.enableQuerySuggestAddon) {
            var selectable = this.findAllElementsWithClass(domSuggestions, '.coveo-omnibox-selectable');
            if (selectable.length > 0) {
                Dom_1.$$(selectable[0]).trigger('tabSelect');
            }
        }
    };
    Omnibox.prototype.findAllElementsWithClass = function (elements, className) {
        return elements
            .map(function (element) { return element.find(className); })
            .filter(function (s) { return s; })
            .reduce(function (total, s) { return total.concat(s); }, []);
    };
    Omnibox.prototype.triggerNewQuery = function (searchAsYouType, analyticsEvent) {
        clearTimeout(this.searchAsYouTypeTimeout);
        var shouldExecuteQuery = this.shouldExecuteQuery(searchAsYouType);
        this.lastQuery = this.getQuery(searchAsYouType);
        shouldExecuteQuery && analyticsEvent();
        this.queryController.executeQuery({
            searchAsYouType: searchAsYouType,
            logInActionsHistory: true,
            cancel: !shouldExecuteQuery,
            origin: this
        });
    };
    Omnibox.prototype.getQuery = function (searchAsYouType) {
        if (this.lastQuery == this.magicBox.getText()) {
            return this.lastQuery;
        }
        if (!searchAsYouType) {
            return this.magicBox.getText();
        }
        var wordCompletion = this.magicBox.getWordCompletion();
        Iif (wordCompletion != null) {
            return wordCompletion;
        }
        var currentOmniboxSuggestion = this.magicBox.getWordCompletion() || this.getFirstSuggestion();
        if (currentOmniboxSuggestion) {
            return currentOmniboxSuggestion;
        }
        if (this.isAutoSuggestion()) {
            return this.lastQuery || this.magicBox.getText();
        }
        return this.magicBox.getText();
    };
    Omnibox.prototype.getFirstSuggestion = function () {
        Iif (this.lastSuggestions == null) {
            return '';
        }
        if (this.lastSuggestions.length <= 0) {
            return '';
        }
        var textSuggestion = _.find(this.lastSuggestions, function (suggestion) { return suggestion.text != null; });
        Iif (textSuggestion == null) {
            return '';
        }
        return textSuggestion.text;
    };
    Omnibox.prototype.updateQueryState = function () {
        this.queryStateModel.set(QueryStateModel_1.QueryStateModel.attributesEnum.q, this.magicBox.getText());
    };
    Omnibox.prototype.handleQueryStateChanged = function (args) {
        Assert_1.Assert.exists(args);
        var q = args.value;
        if (q != this.magicBox.getText()) {
            this.magicBox.setText(q);
        }
    };
    Omnibox.prototype.handleQuerySuccess = function () {
        Eif (!this.isAutoSuggestion()) {
            this.omniboxAnalytics.partialQueries = [];
        }
    };
    Omnibox.prototype.handleDuringQuery = function (args) {
        var _this = this;
        // When the query results returns ... (args.promise)
        args.promise.then(function () {
            // Get a handle on a pending search as you type (those events are delayed, not sent instantly)
            var pendingEvent = _this.usageAnalytics.getPendingSearchEvent();
            if (pendingEvent instanceof PendingSearchAsYouTypeSearchEvent_1.PendingSearchAsYouTypeSearchEvent) {
                pendingEvent.beforeResolve.then(function (evt) {
                    // Check if we need to modify the event type beforeResolving it
                    args.promise.then(function () {
                        if (_this.modifyEventTo) {
                            evt.modifyEventCause(_this.modifyEventTo);
                            _this.modifyEventTo = null;
                        }
                    });
                });
            }
        });
    };
    Omnibox.prototype.searchAsYouType = function (forceExecuteQuery) {
        var _this = this;
        if (forceExecuteQuery === void 0) { forceExecuteQuery = false; }
        this.clearSearchAsYouType();
        Eif (this.shouldExecuteQuery(true)) {
            this.searchAsYouTypeTimeout = window.setTimeout(function () {
                if (_this.suggestionShouldTriggerQuery() || forceExecuteQuery) {
                    var suggestions_1 = _.map(_this.lastSuggestions, function (suggestion) { return suggestion.text; });
                    var index_1 = _.indexOf(suggestions_1, _this.magicBox.getWordCompletion());
                    _this.triggerNewQuery(true, function () {
                        _this.usageAnalytics.logSearchAsYouType(AnalyticsActionListMeta_1.analyticsActionCauseList.searchboxAsYouType, _this.buildCustomDataForPartialQueries(index_1, suggestions_1));
                    });
                    _this.clearSearchAsYouType();
                }
            }, this.options.searchAsYouTypeDelay);
        }
    };
    Omnibox.prototype.isAutoSuggestion = function () {
        return this.options.enableSearchAsYouType && this.options.enableQuerySuggestAddon;
    };
    Omnibox.prototype.shouldExecuteQuery = function (searchAsYouType) {
        var text = this.getQuery(searchAsYouType);
        Iif (this.searchInterface.options.allowQueriesWithoutKeywords === false) {
            return this.lastQuery != text && Utils_1.Utils.isNonEmptyString(text);
        }
        return this.lastQuery != text && text != null;
    };
    Omnibox.prototype.suggestionShouldTriggerQuery = function (suggestions) {
        Eif (suggestions === void 0) { suggestions = this.lastSuggestions; }
        Eif (this.shouldExecuteQuery(true)) {
            if (suggestions && suggestions[0]) {
                var suggestion = suggestions[0];
                // If we have access to a confidence level, return true if we are equal or above the minimum confidence level.
                if (suggestion && suggestion.executableConfidence != undefined) {
                    return suggestion.executableConfidence >= MINIMUM_EXECUTABLE_CONFIDENCE;
                }
                // If we don't have access to a confidence level, return true only if it "starts with" the content of the search box
                if (suggestion.text && suggestion.text.indexOf(this.magicBox.getText()) == 0) {
                    return true;
                }
            }
        }
        return false;
    };
    Omnibox.prototype.clearSearchAsYouType = function () {
        clearTimeout(this.searchAsYouTypeTimeout);
        this.searchAsYouTypeTimeout = undefined;
    };
    Omnibox.prototype.getOmniboxAnalyticsEventCause = function () {
        Iif (this.searchInterface instanceof SearchInterface_1.StandaloneSearchInterface) {
            return AnalyticsActionListMeta_1.analyticsActionCauseList.omniboxFromLink;
        }
        return AnalyticsActionListMeta_1.analyticsActionCauseList.omniboxAnalytics;
    };
    Omnibox.ID = 'Omnibox';
    Omnibox.doExport = function () {
        GlobalExports_1.exportGlobally({
            Omnibox: Omnibox,
            QueryboxQueryParameters: QueryboxQueryParameters_1.QueryboxQueryParameters
        });
    };
    /**
     * The options for the omnibox
     * @componentOptions
     */
    Omnibox.options = {
        /**
         * Specifies whether query completion suggestions appearing in the `Omnibox` should push the result list and facets
         * down, rather than rendering themselves over them (and partially hiding them).
         *
         * Set this option as well as {@link Omnibox.options.enableSearchAsYouType} and
         * {@link Omnibox.options.enableQuerySuggestAddon} to `true` for a cool effect!
         *
         * Default value is `false`.
         */
        inline: ComponentOptions_1.ComponentOptions.buildBooleanOption({ defaultValue: false }),
        /**
         * Whether to automatically trigger a new query whenever the end user types additional text in the search box input.
         *
         * See also the [`searchAsYouTypeDelay`]{@link Omnibox.options.searchAsYouTypeDelay} option.
         *
         * **Note:**
         * > If you set this option and the [`enableQuerySuggestAddon`]{@link Omnibox.options.enableQuerySuggestAddon}
         * > option to `true`, the query suggestion feature returns the auto-completion of the currently typed keyword as
         * > its first suggestion.
         *
         * Default value is `false`.
         */
        enableSearchAsYouType: ComponentOptions_1.ComponentOptions.buildBooleanOption({ defaultValue: false, section: 'Advanced Options' }),
        /**
         * If {@link Omnibox.options.enableSearchAsYouType} is `true`, specifies the delay (in milliseconds) before
         * triggering a new query when the end user types in the `Omnibox`.
         *
         * Default value is `2000`. Minimum value is `0`.
         */
        searchAsYouTypeDelay: ComponentOptions_1.ComponentOptions.buildNumberOption({
            defaultValue: 2000,
            min: 0,
            depend: 'enableSearchAsYouType',
            section: 'Advanced Options'
        }),
        /**
         * The `field` addon makes the `Omnibox` highlight and complete field syntax. Setting this option to `true` automatically sets
         * the [enableQuerySyntax]{@link Querybox.options.enableQuerySyntax} option to `true` as a side effect.
         *
         * **Example:**
         * > Suppose you want to search for PDF files. You start typing `@f` in the search box. The `Omnibox` provides
         * > you with several matching fields. You select the `@filetype` field. Then, you start typing `=p` in the input.
         * > This time, the `Omnibox` provides you with several matching values for the `@filetype` field. You select the
         * > `pdf` suggestion, and submit your search request. Since the `enableQuerySyntax` option is set to `true`, the
         * > Coveo Search API interprets the basic expression as query syntax and returns the items whose `@filetype` field
         * > matches the `pdf` value.
         *
         * Default value is `false`.
         */
        enableFieldAddon: ComponentOptions_1.ComponentOptions.buildBooleanOption({
            defaultValue: false,
            depend: 'enableQuerySyntax',
            postProcessing: function (value, options) {
                if (value) {
                    options.enableQuerySyntax = true;
                }
                return value;
            },
            section: 'Advanced Options'
        }),
        enableSimpleFieldAddon: ComponentOptions_1.ComponentOptions.buildBooleanOption({ defaultValue: false, depend: 'enableFieldAddon' }),
        listOfFields: ComponentOptions_1.ComponentOptions.buildFieldsOption({ depend: 'enableFieldAddon' }),
        /**
         * Whether to display Coveo Machine Learning (Coveo ML) query suggestions in the `Omnibox`.
         *
         * A Coveo ML query suggestions (QS) model must be properly configured in your Coveo Cloud organization, otherwise this
         * option has no effect (see
         * [Create a QS Model](https://docs.coveo.com/en/1832/#create-a-qs-model)).
         *
         * **Note:**
         * > When you set this option and the [`enableSearchAsYouType`]{@link Omnibox.options.enableSearchAsYouType} option
         * > to `true`, the query suggestion feature returns the auto-completion of the currently typed keyword as its first
         * > query suggestion.
         *
         * @availablesince [December 2015 Release (v1.0.273)](https://docs.coveo.com/en/289/#december-2015-release-v10273)
         */
        enableQuerySuggestAddon: ComponentOptions_1.ComponentOptions.buildBooleanOption({
            defaultValue: true,
            alias: ['enableTopQueryAddon', 'enableRevealQuerySuggestAddon']
        }),
        /**
         * If {@link Querybox.options.enableQuerySyntax} is `true`, specifies whether to enable the `query extension` addon.
         *
         * The `query extension` addon allows the Omnibox to complete the syntax for query extensions.
         *
         * Default value is `false`.
         */
        enableQueryExtensionAddon: ComponentOptions_1.ComponentOptions.buildBooleanOption({
            defaultValue: false,
            depend: 'enableQuerySyntax',
            postProcessing: function (value, options) {
                if (value) {
                    options.enableQuerySyntax = true;
                }
                return value;
            },
            section: 'Advanced Options'
        }),
        /**
         * Specifies a placeholder for the input.
         *
         * @availablesince [July 2016 Release (v1.667.24)](https://docs.coveo.com/en/309/#july-2016-release-v166724)
         */
        placeholder: ComponentOptions_1.ComponentOptions.buildLocalizedStringOption(),
        /**
         * Specifies a timeout (in milliseconds) before rejecting suggestions in the Omnibox.
         *
         * Default value is `2000`. Minimum value is `0`.
         */
        omniboxTimeout: ComponentOptions_1.ComponentOptions.buildNumberOption({ defaultValue: 2000, min: 0 }),
        /**
         * Specifies whether the Coveo Platform should try to interpret special query syntax such as field references in the
         * query that the user enters in the Querybox (see
         * [Coveo Query Syntax Reference](https://docs.coveo.com/en/1552/searching-with-coveo/coveo-cloud-query-syntax)).
         *
         * Setting this option to `true` also causes the query syntax in the Querybox to highlight.
         *
         * Default value is `false`.
         */
        enableQuerySyntax: ComponentOptions_1.ComponentOptions.buildBooleanOption({
            defaultValue: false,
            section: 'Advanced Options'
        }),
        /**
         * Specifies the number of suggestions that should appear in standard ML-powered query suggestions.
         *
         * This option only affects the number of suggestions that appear with the {@link Omnibox.options.enableQuerySuggestAddon} option.
         *
         * This options does not affect the {@link AnalyticsSuggestions} or the {@link FieldSuggestions} component, which expose their own dedicated options for this parameter.
         *
         * Default value is `5`.
         *
         * Minimum value is `1`.
         */
        numberOfSuggestions: ComponentOptions_1.ComponentOptions.buildNumberOption({
            defaultValue: 5,
            min: 1
        }),
        /**
         * The minimum number of characters required in the in the text input before displaying available query suggestions when focus is on the component.
         *
         * Note: Only effective when [enableQuerySuggestAddon]{@link Omnibox.options.enableQuerySuggestAddon} is true.
         *
         * depend: 'enableQuerySuggestAddon'
         *
         * Default (and minimum): 0, meaning that trending query suggestions are displayed when focus is on the component, even if its text input is empty.
         *
         * @availablesince [July 2019 Release (v2.6459)](https://docs.coveo.com/en/2938/)
         */
        querySuggestCharacterThreshold: ComponentOptions_1.ComponentOptions.buildNumberOption({
            defaultValue: 0,
            min: 0
        }),
        /**
         * Whether to clear all active query filters when the end user submits a new query from the search box.
         *
         * Note: This does not include the filter expression enforced by the currently selected tab, if any.
         *
         * @availablesince [September 2019 Release (v2.7023)](https://docs.coveo.com/en/2990/)
         */
        clearFiltersOnNewQuery: ComponentOptions_1.ComponentOptions.buildBooleanOption({ defaultValue: false })
    };
    return Omnibox;
}(Component_1.Component));
exports.Omnibox = Omnibox;
Omnibox.options = __assign({}, Omnibox.options, Querybox_1.Querybox.options);
Initialization_1.Initialization.registerAutoCreateComponent(Omnibox);
 
 
/***/ }),
/* 197 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Result_1 = __webpack_require__(76);
var Result_2 = __webpack_require__(76);
exports.notWordStart = ' ()[],$@\'"';
exports.notInWord = ' ()[],:';
exports.Basic = {
    basicExpressions: ['Word', 'DoubleQuoted'],
    grammars: {
        DoubleQuoted: '"[NotDoubleQuote]"',
        NotDoubleQuote: /[^"]*/,
        SingleQuoted: "'[NotSingleQuote]'",
        NotSingleQuote: /[^']*/,
        Number: /-?(0|[1-9]\d*)(\.\d+)?/,
        Word: function (input, end, expression) {
            var regex = new RegExp('[^' + exports.notWordStart.replace(/(.)/g, '\\$1') + '][^' + exports.notInWord.replace(/(.)/g, '\\$1') + ']*');
            var groups = input.match(regex);
            if (groups != null && groups.index != 0) {
                groups = null;
            }
            var result = new Result_1.Result(groups != null ? groups[0] : null, expression, input);
            Iif (result.isSuccess() && end && input.length > result.value.length) {
                return new Result_2.EndOfInputResult(result);
            }
            return result;
        }
    }
};
 
 
/***/ }),
/* 198 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
/**
 * Those are the string definitions of events for ResultPreviewsManager.
 *
 * Those events should be bound to the element returned by `resolveRoot`.
 */
var ResultPreviewsManagerEvents = /** @class */ (function () {
    function ResultPreviewsManagerEvents() {
    }
    /**
     * Executed when building a query to fetch result previews.
     * This always receives {@link IBuildingResultPreviewsQueryEventArgs} as arguments.
     */
    ResultPreviewsManagerEvents.buildingResultPreviewsQuery = 'buildingResultPreviewsQuery';
    /**
     * Executed when a {@link Suggestion} is focused before {@link PopulateSearchResultPreviews} is called to fetch more options.
     * This always receives {@link IUpdateResultPreviewsManagerOptionsEventArgs} as arguments.
     */
    ResultPreviewsManagerEvents.updateResultPreviewsManagerOptions = 'updateResultPreviewsManagerOptions';
    /**
     * Executed when a {@link Suggestion} is focused and waiting for search result previews.
     * This always receives {@link IPopulateSearchResultPreviewsEventArgs} as arguments.
     */
    ResultPreviewsManagerEvents.populateSearchResultPreviews = 'populateSearchResultPreviews';
    return ResultPreviewsManagerEvents;
}());
exports.ResultPreviewsManagerEvents = ResultPreviewsManagerEvents;
 
 
/***/ }),
/* 199 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
var SearchInterface_1 = __webpack_require__(25);
var ComponentOptions_1 = __webpack_require__(13);
var QueryEvents_1 = __webpack_require__(14);
var OmniboxEvents_1 = __webpack_require__(47);
var ResultListEvents_1 = __webpack_require__(48);
var SettingsEvents_1 = __webpack_require__(66);
var PreferencesPanelEvents_1 = __webpack_require__(112);
var AnalyticsEvents_1 = __webpack_require__(111);
var AnalyticsActionListMeta_1 = __webpack_require__(7);
var BreadcrumbEvents_1 = __webpack_require__(33);
var QuickviewEvents_1 = __webpack_require__(267);
var QueryStateModel_1 = __webpack_require__(17);
var Model_1 = __webpack_require__(26);
var Utils_1 = __webpack_require__(5);
var Dom_1 = __webpack_require__(0);
var ResponsiveRecommendation_1 = __webpack_require__(818);
var RegisteredNamedMethods_1 = __webpack_require__(38);
var InitializationEvents_1 = __webpack_require__(22);
var _ = __webpack_require__(1);
var GlobalExports_1 = __webpack_require__(10);
var DefaultRecommendationTemplate_1 = __webpack_require__(331);
var RecommendationQuery_1 = __webpack_require__(820);
var RecommendationAnalyticsClient_1 = __webpack_require__(320);
__webpack_require__(1503);
var Strings_1 = __webpack_require__(4);
/**
 * The Recommendation component is a {@link SearchInterface} that displays recommendations typically based on user
 * history.
 *
 * This component usually listens to the main SearchInterface. When the main SearchInterface generates a query, the
 * Recommendation component generates another query to get the recommendations at the same time.
 *
 * To get history-based recommendations, you will likely want to include the `pageview` script in your page (see
 * [coveo.analytics.js](https://github.com/coveo/coveo.analytics.js)). However, including this script is not mandatory.
 * For instance, you could use the Recommendation component without the Coveo Machine Learning service to create a
 * simple "recommended people" interface.
 *
 * It is possible to include this component inside another SearchInterface, but it is also possible to instantiate it as
 * a "standalone" search interface, without even instantiating a main SearchInterface component. In any case, a
 * Recommendation component always acts as a full-fledged search interface. Therefore, you can include any component
 * inside the Recommendation component (Searchbox, Facet, Sort, etc.), just as you would inside the main SearchInterface
 * component.
 *
 * @availablesince [July 2016 Release (v1.667.24)](https://docs.coveo.com/en/309/#july-2016-release-v166724)
 */
var Recommendation = /** @class */ (function (_super) {
    __extends(Recommendation, _super);
    /**
     * Creates a new Recommendation component.
     * @param element The HTMLElement on which to instantiate the component.
     * @param options The options for the Recommendation component.
     * @param bindings The bindings that the component requires to function normally. If not set, these will be
     * automatically resolved (with a slower execution time)
     * @param _window
     */
    function Recommendation(element, options, analyticsOptions, _window) {
        if (options === void 0) { options = {}; }
        Eif (analyticsOptions === void 0) { analyticsOptions = {}; }
        Eif (_window === void 0) { _window = window; }
        var _this = _super.call(this, element, ComponentOptions_1.ComponentOptions.initComponentOptions(element, Recommendation, options), analyticsOptions, _window) || this;
        _this.element = element;
        _this.options = options;
        _this.analyticsOptions = analyticsOptions;
        _this.element.style.display = '';
        if (!_this.options.id) {
            _this.generateDefaultId();
        }
        // This is done to allow the component to be included in another search interface without triggering the parent events.
        _this.preventEventPropagation();
        if (_this.options.mainSearchInterface) {
            _this.bindToMainSearchInterface();
        }
        Dom_1.$$(_this.element).on(QueryEvents_1.QueryEvents.buildingQuery, function (e, args) {
            return _this.handleRecommendationBuildingQuery(args);
        });
        Dom_1.$$(_this.element).on(QueryEvents_1.QueryEvents.querySuccess, function (e, args) { return _this.handleRecommendationQuerySuccess(args); });
        Dom_1.$$(_this.element).on(QueryEvents_1.QueryEvents.noResults, function (e, args) { return _this.handleRecommendationNoResults(); });
        Dom_1.$$(_this.element).on(QueryEvents_1.QueryEvents.queryError, function (e, args) { return _this.handleRecommendationQueryError(); });
        if (!_this.options.mainSearchInterface) {
            // When the recommendation component is "standalone", we add additional safeguard against bad config.
            _this.ensureCurrentPageViewExistsInStore();
        }
        ResponsiveRecommendation_1.ResponsiveRecommendation.init(_this.root, _this, options);
        return _this;
    }
    Object.defineProperty(Recommendation.prototype, "historyStore", {
        get: function () {
            return this.queryController.historyStore;
        },
        enumerable: true,
        configurable: true
    });
    Recommendation.prototype.getId = function () {
        return this.options.id;
    };
    Recommendation.prototype.enable = function () {
        _super.prototype.enable.call(this);
        this.show();
    };
    Recommendation.prototype.disable = function () {
        _super.prototype.disable.call(this);
        this.hide();
    };
    Recommendation.prototype.hide = function () {
        Dom_1.$$(this.element).addClass('coveo-hidden');
    };
    Recommendation.prototype.show = function () {
        Dom_1.$$(this.element).removeClass('coveo-hidden');
    };
    Recommendation.prototype.ensureCurrentPageViewExistsInStore = function () {
        // It's not 100% sure that the element will actually be added in the store.
        // It's possible that an external script configured by the end user to log the page view already did that.
        // So we *could* end up with duplicate values in the store :
        // We rely on the fact that the coveo.analytics lib has defensive code against consecutive page view that are identical.
        // This is mainly done if the recommendation component is being initialized before the page view could be logged correctly by the coveo.analytics externa lib.
        var historyElement = {
            name: 'PageView',
            value: document.location.toString(),
            time: JSON.stringify(new Date()),
            title: _.escape(document.title)
        };
        this.historyStore.addElement(historyElement);
    };
    Recommendation.prototype.bindToMainSearchInterface = function () {
        this.bindComponentOptionsModelToMainSearchInterface();
        this.bindQueryEventsToMainSearchInterface();
    };
    Recommendation.prototype.bindComponentOptionsModelToMainSearchInterface = function () {
        var _this = this;
        // Try to fetch the componentOptions from the main search interface.
        // Since we do not know which interface is init first (recommendation or full search interface)
        // add a mechanism that waits for the full search interface to be correctly initialized
        // then, set the needed values on the component options model.
        var searchInterfaceComponent = RegisteredNamedMethods_1.get(this.options.mainSearchInterface, SearchInterface_1.SearchInterface);
        var alreadyInitialized = searchInterfaceComponent != null;
        var onceInitialized = function () {
            var mainSearchInterfaceOptionsModel = searchInterfaceComponent.getBindings().componentOptionsModel;
            _this.componentOptionsModel.setMultiple(mainSearchInterfaceOptionsModel.getAttributes());
            Dom_1.$$(_this.options.mainSearchInterface).on(_this.componentOptionsModel.getEventName(Model_1.MODEL_EVENTS.ALL), function () {
                _this.componentOptionsModel.setMultiple(mainSearchInterfaceOptionsModel.getAttributes());
            });
        };
        Eif (alreadyInitialized) {
            onceInitialized();
        }
        else {
            Dom_1.$$(this.options.mainSearchInterface).on(InitializationEvents_1.InitializationEvents.afterComponentsInitialization, function () {
                searchInterfaceComponent = RegisteredNamedMethods_1.get(_this.options.mainSearchInterface, SearchInterface_1.SearchInterface);
                onceInitialized();
            });
        }
    };
    Recommendation.prototype.bindQueryEventsToMainSearchInterface = function () {
        var _this = this;
        // Whenever a query sucessfully returns on the full search interface, refresh the recommendation component.
        Dom_1.$$(this.options.mainSearchInterface).on(QueryEvents_1.QueryEvents.querySuccess, function (e, args) {
            _this.mainInterfaceQuery = args;
            _this.mainQuerySearchUID = args.results.searchUid;
            _this.mainQueryPipeline = args.results.pipeline;
            if (args.results.results.length != 0) {
                _this.usageAnalytics.logSearchEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.recommendation, {});
                _this.queryController.executeQuery({
                    closeModalBox: false
                });
            }
        });
        Dom_1.$$(this.options.mainSearchInterface).on(QueryEvents_1.QueryEvents.queryError, function () { return _this.hide(); });
        Dom_1.$$(this.options.mainSearchInterface).on(QueryEvents_1.QueryEvents.noResults, function () { return _this.hide(); });
    };
    Recommendation.prototype.handleRecommendationBuildingQuery = function (data) {
        if (!this.disabled) {
            this.modifyQueryForRecommendation(data);
            this.addRecommendationInfoInQuery(data);
        }
    };
    Recommendation.prototype.handleRecommendationQuerySuccess = function (data) {
        if (!this.disabled) {
            if (this.options.hideIfNoResults) {
                if (data.results.totalCount === 0) {
                    this.hide();
                }
                else {
                    this.show();
                }
            }
        }
    };
    Recommendation.prototype.handleRecommendationNoResults = function () {
        Eif (!this.disabled) {
            if (this.options.hideIfNoResults) {
                this.hide();
            }
        }
    };
    Recommendation.prototype.handleRecommendationQueryError = function () {
        Eif (!this.disabled) {
            this.hide();
        }
    };
    Recommendation.prototype.modifyQueryForRecommendation = function (data) {
        if (this.mainInterfaceQuery) {
            Utils_1.Utils.copyObjectAttributes(data.queryBuilder, this.mainInterfaceQuery.queryBuilder, this.options.optionsToUse);
        }
    };
    Recommendation.prototype.addRecommendationInfoInQuery = function (data) {
        if (!_.isEmpty(this.options.userContext)) {
            data.queryBuilder.addContext(this.options.userContext);
        }
        data.queryBuilder.recommendation = this.options.id;
    };
    Recommendation.prototype.preventEventPropagation = function () {
        this.preventEventPropagationOn(QueryEvents_1.QueryEvents);
        this.preventEventPropagationOn(OmniboxEvents_1.OmniboxEvents);
        this.preventEventPropagationOn(ResultListEvents_1.ResultListEvents);
        this.preventEventPropagationOn(SettingsEvents_1.SettingsEvents);
        this.preventEventPropagationOn(PreferencesPanelEvents_1.PreferencesPanelEvents);
        this.preventEventPropagationOn(AnalyticsEvents_1.AnalyticsEvents);
        this.preventEventPropagationOn(BreadcrumbEvents_1.BreadcrumbEvents);
        this.preventEventPropagationOn(QuickviewEvents_1.QuickviewEvents);
        this.preventEventPropagationOn(InitializationEvents_1.InitializationEvents);
        this.preventEventPropagationOn(this.getAllModelEvents());
    };
    Recommendation.prototype.preventEventPropagationOn = function (eventType, eventName) {
        Eif (eventName === void 0) { eventName = function (event) {
            return event;
        }; }
        for (var event_1 in eventType) {
            Dom_1.$$(this.root).on(eventName(event_1), function (e) { return e.stopPropagation(); });
        }
    };
    Recommendation.prototype.getAllModelEvents = function () {
        var _this = this;
        var events = {};
        var queryStateModel = this.getBindings().queryStateModel;
        _.each(_.values(Model_1.Model.eventTypes), function (event) {
            var eventName = queryStateModel.getEventName(event);
            events[eventName] = eventName;
            _.each(_.values(QueryStateModel_1.QUERY_STATE_ATTRIBUTES), function (attribute) {
                var eventName = _this.queryStateModel.getEventName(event + attribute);
                events[eventName] = eventName;
            });
        });
        return events;
    };
    Recommendation.prototype.generateDefaultId = function () {
        var id = 'Recommendation';
        if (Recommendation.NEXT_ID !== 1) {
            this.logger.warn('Generating another recommendation default id', 'Consider configuring a human friendly / meaningful id for this interface');
            id = id + '_' + Recommendation.NEXT_ID;
        }
        Recommendation.NEXT_ID++;
        this.options.id = id;
    };
    Recommendation.ID = 'Recommendation';
    Recommendation.NEXT_ID = 1;
    Recommendation.doExport = function () {
        GlobalExports_1.exportGlobally({
            Recommendation: Recommendation,
            DefaultRecommendationTemplate: DefaultRecommendationTemplate_1.DefaultRecommendationTemplate,
            RecommendationQuery: RecommendationQuery_1.RecommendationQuery,
            RecommendationAnalyticsClient: RecommendationAnalyticsClient_1.RecommendationAnalyticsClient
        });
    };
    /**
     * The options for the recommendation component
     * @componentOptions
     */
    Recommendation.options = {
        /**
         * Specifies the main {@link SearchInterface} to listen to.
         */
        mainSearchInterface: ComponentOptions_1.ComponentOptions.buildSelectorOption(),
        /**
         * Specifies the user context to send to Coveo usage analytics.
         * The component sends this information with the query alongside the user history to get the recommendations.
         */
        userContext: ComponentOptions_1.ComponentOptions.buildJsonOption(),
        /**
         * Specifies the ID of the interface.
         * The usage analytics use the interface ID to know which recommendation interface was selected.
         *
         * Default value is `Recommendation` for the first one and `Recommendation_{number}`, where {number} depends on the
         * number of Recommendation interfaces with default IDs in the page for the others.
         */
        id: ComponentOptions_1.ComponentOptions.buildStringOption(),
        /**
         * Specifies which options from the main {@link QueryBuilder} to use in the triggered query.
         *
         * Possible values are:
         * - `expression`
         * - `advancedExpression`
         * - `constantExpression`
         * - `disjunctionExpression`
         *
         * **Example:**
         *
         * Adding the expression (`q`) and the advanced expression (`aq`) parts of the main query in the triggered query:
         *
         * `data-options-to-use="expression,advancedExpression"`
         *
         * Default value is `expression`.
         */
        optionsToUse: ComponentOptions_1.ComponentOptions.buildListOption({
            defaultValue: ['expression']
        }),
        /**
         * Specifies whether to send the actions history along with the triggered query.
         *
         * Setting this option to `false` makes it impossible for this component to get Coveo Machine Learning
         * recommendations.
         *
         * However, setting this option to `false` can be useful to display side results in a search page.
         *
         * Default value is `true`.
         *
         * @deprecated This option is now deprecated. The correct way to control this behavior is to configure an appropriate machine learning model in the administration interface (Recommendation, Relevance tuning, Query suggestions).
         */
        sendActionsHistory: ComponentOptions_1.ComponentOptions.buildBooleanOption({
            defaultValue: true,
            deprecated: 'This option is now deprecated. The correct way to control this behaviour is to configure an appropriate machine learning model in the administration interface (Recommendation, Relevance tuning, Query suggestions)'
        }),
        /**
         * Specifies whether to hide the Recommendations component if no result or recommendation is available.
         *
         * Default value is `true`.
         */
        hideIfNoResults: ComponentOptions_1.ComponentOptions.buildBooleanOption({ defaultValue: true }),
        autoTriggerQuery: ComponentOptions_1.ComponentOptions.buildBooleanOption({
            postProcessing: function (value, options) {
                if (options.mainSearchInterface) {
                    return false;
                }
                return value;
            }
        }),
        /**
         * Specifies whether to enable *responsive mode* for Recommendation components. Setting this options to `false` on
         * any Recommendation component in a search interface disables responsive mode for all other Recommendation
         * components in the search interface.
         *
         * Responsive mode displays all Recommendation components under a single dropdown button whenever the width of the
         * HTML element which the search interface is bound to reaches or falls behind a certain threshold (see
         * {@link Recommendation.options.responsiveBreakpoint}).
         *
         * See also {@link Recommendation.options.dropdownHeaderLabel}.
         *
         * Default value is `true`.
         */
        enableResponsiveMode: ComponentOptions_1.ComponentOptions.buildBooleanOption({ defaultValue: true }),
        /**
         * If {@link Recommendation.options.enableResponsiveMode} is `true` for all Recommendation components, specifies the
         * width threshold (in pixels) of the search interface at which Recommendation components go in responsive mode.
         *
         * Recommendation components go in responsive mode when the width of the search interface is equal to or lower than
         * this value.
         *
         * The `search interface` corresponds to the HTML element with the class `CoveoSearchInterface`.
         *
         * If more than one Recommendation component in the search interface specifies a value for this option, then the
         * framework uses the last occurrence of the option.
         *
         * Default value is `1000`.
         */
        responsiveBreakpoint: ComponentOptions_1.ComponentOptions.buildNumberOption({ defaultValue: 1000 }),
        /**
         * If {@link Recommendation.options.enableResponsiveMode} is `true` for all Recommendation components, specifies the
         * label of the dropdown button that allows to display the Recommendation components when in responsive mode.
         *
         * If more than one Recommendation component in the search interface specifies a value for this option, then the
         * framework uses the first occurrence of the option.
         *
         * Default value is `Recommendations`.
         */
        dropdownHeaderLabel: ComponentOptions_1.ComponentOptions.buildLocalizedStringOption({
            localizedString: function () { return Strings_1.l('Recommendations'); }
        })
    };
    return Recommendation;
}(SearchInterface_1.SearchInterface));
exports.Recommendation = Recommendation;
// We do not register the Recommendation component since it is done with .coveo('initRecommendation')
 
 
/***/ }),
/* 200 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
__webpack_require__(1509);
var underscore_1 = __webpack_require__(1);
var InitializationEvents_1 = __webpack_require__(22);
var QueryEvents_1 = __webpack_require__(14);
var ResultLayoutEvents_1 = __webpack_require__(132);
var ResultListEvents_1 = __webpack_require__(48);
var Assert_1 = __webpack_require__(12);
var Model_1 = __webpack_require__(26);
var QueryStateModel_1 = __webpack_require__(17);
var GlobalExports_1 = __webpack_require__(10);
var Strings_1 = __webpack_require__(4);
var Dom_1 = __webpack_require__(0);
var SVGDom_1 = __webpack_require__(23);
var SVGIcons_1 = __webpack_require__(16);
var Utils_1 = __webpack_require__(5);
var AnalyticsActionListMeta_1 = __webpack_require__(7);
var Component_1 = __webpack_require__(6);
var ComponentOptions_1 = __webpack_require__(13);
var Initialization_1 = __webpack_require__(8);
var ResponsiveResultLayout_1 = __webpack_require__(1510);
var AccessibleButton_1 = __webpack_require__(20);
exports.defaultLayout = 'list';
/**
 * The ResultLayoutSelector component allows the end user to switch between multiple {@link ResultList} components that have
 * different {@link ResultList.options.layout} values.
 *
 * This component automatically populates itself with buttons to switch between the ResultList components that have a
 * valid layout value (see the {@link ValidLayout} type).
 *
 * See also the [Result Layouts](https://docs.coveo.com/en/360/) documentation.
 *
 * @availablesince [February 2018 Release (v2.3826.10)](https://docs.coveo.com/en/410/#february-2018-release-v2382610)
 */
var ResultLayoutSelector = /** @class */ (function (_super) {
    __extends(ResultLayoutSelector, _super);
    /**
     * Creates a new ResultLayoutSelector component.
     * @param element The HTMLElement on which to instantiate the component.
     * @param options The options for the ResultLayout component.
     * @param bindings The bindings that the component requires to function normally. If not set, these will be
     * automatically resolved (with a slower execution time).
     */
    function ResultLayoutSelector(element, options, bindings) {
        var _this = _super.call(this, element, ResultLayoutSelector.ID, bindings) || this;
        _this.element = element;
        _this.options = options;
        _this.preferredLayout = null;
        _this.options = ComponentOptions_1.ComponentOptions.initComponentOptions(element, ResultLayoutSelector, options);
        _this.currentActiveLayouts = {};
        _this.bind.onQueryState(Model_1.MODEL_EVENTS.CHANGE_ONE, QueryStateModel_1.QUERY_STATE_ATTRIBUTES.LAYOUT, _this.handleQueryStateChanged.bind(_this));
        _this.bind.onRootElement(QueryEvents_1.QueryEvents.querySuccess, function (args) { return _this.handleQuerySuccess(args); });
        _this.bind.onRootElement(QueryEvents_1.QueryEvents.queryError, function (args) { return _this.handleQueryError(args); });
        _this.resultLayoutSection = Dom_1.$$(_this.element).closest('.coveo-result-layout-section');
        _this.bind.oneRootElement(InitializationEvents_1.InitializationEvents.afterComponentsInitialization, function () { return _this.populate(); });
        _this.bind.oneRootElement(InitializationEvents_1.InitializationEvents.afterInitialization, function () { return _this.handleQueryStateChanged(); });
        ResponsiveResultLayout_1.ResponsiveResultLayout.init(_this.root, _this, {});
        return _this;
    }
    Object.defineProperty(ResultLayoutSelector.prototype, "activeLayouts", {
        get: function () {
            if (this.searchInterface.responsiveComponents.isLargeScreenWidth()) {
                return underscore_1.pick(this.currentActiveLayouts, this.options.desktopLayouts);
            }
            if (this.searchInterface.responsiveComponents.isMediumScreenWidth()) {
                return underscore_1.pick(this.currentActiveLayouts, this.options.tabletLayouts);
            }
            Eif (this.searchInterface.responsiveComponents.isSmallScreenWidth()) {
                return underscore_1.pick(this.currentActiveLayouts, this.options.mobileLayouts);
            }
            return this.currentActiveLayouts;
        },
        enumerable: true,
        configurable: true
    });
    /**
     * Changes the current layout.
     *
     * Also logs a `resultLayoutChange` event in the usage analytics with the new layout as metadeta.
     *
     * Triggers a new query.
     *
     * @param layout The new layout. The page must contain a valid {@link ResultList} component with a matching
     * {@link ResultList.options.layout} value for this method to work.
     */
    ResultLayoutSelector.prototype.changeLayout = function (layout) {
        this.preferredLayout = null;
        this.performLayoutChange(layout);
    };
    /**
     * Gets the current layout (`list`, `card` or `table`).
     * @returns {string} The current current layout.
     */
    ResultLayoutSelector.prototype.getCurrentLayout = function () {
        return this.currentLayout;
    };
    ResultLayoutSelector.prototype.disableLayouts = function (layouts) {
        var _this = this;
        Eif (Utils_1.Utils.isNonEmptyArray(layouts)) {
            underscore_1.each(layouts, function (layout) { return _this.disableLayout(layout); });
            var remainingValidLayouts = underscore_1.difference(underscore_1.keys(this.currentActiveLayouts), layouts);
            this.preferredLayout = this.currentLayout;
            Eif (!underscore_1.isEmpty(remainingValidLayouts)) {
                var newLayout = underscore_1.contains(remainingValidLayouts, this.currentLayout) ? this.currentLayout : remainingValidLayouts[0];
                this.performLayoutChange(newLayout);
            }
            else {
                this.logger.error('Cannot disable the last valid layout ... Re-enabling the first one possible');
                var firstPossibleValidLayout = underscore_1.keys(this.currentActiveLayouts)[0];
                this.enableLayout(firstPossibleValidLayout);
                this.setLayout(firstPossibleValidLayout);
            }
        }
    };
    ResultLayoutSelector.prototype.enableLayouts = function (layouts) {
        var _this = this;
        underscore_1.each(layouts, function (layout) { return _this.enableLayout(layout); });
        var preferredLayoutAvailable = underscore_1.find(layouts, function (layout) { return layout === _this.preferredLayout; });
        preferredLayoutAvailable && this.restorePreferredLayout();
    };
    ResultLayoutSelector.prototype.restorePreferredLayout = function () {
        this.performLayoutChange(this.preferredLayout);
        this.preferredLayout = null;
    };
    ResultLayoutSelector.prototype.performLayoutChange = function (layout) {
        Assert_1.Assert.check(this.isLayoutDisplayedByButton(layout), 'Layout not available or invalid');
        if (layout !== this.currentLayout || this.getModelValue() === '') {
            this.setModelValue(layout);
            var lastResults = this.queryController.getLastResults();
            this.setLayout(layout, lastResults);
            Iif (lastResults) {
                this.usageAnalytics.logCustomEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.resultsLayoutChange, {
                    resultsLayoutChangeTo: layout
                }, this.element);
            }
            else {
                this.usageAnalytics.logSearchEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.resultsLayoutChange, {
                    resultsLayoutChangeTo: layout
                });
                if (!this.queryController.firstQuery) {
                    this.queryController.executeQuery();
                }
            }
        }
    };
    ResultLayoutSelector.prototype.disableLayout = function (layout) {
        Eif (this.isLayoutDisplayedByButton(layout)) {
            this.hideButton(layout);
        }
    };
    ResultLayoutSelector.prototype.enableLayout = function (layout) {
        var allResultLists = this.resultLists;
        var atLeastOneResultListCanShowLayout = underscore_1.find(allResultLists, function (resultList) { return resultList.options.layout == layout; });
        if (atLeastOneResultListCanShowLayout && this.isLayoutDisplayedByButton(layout)) {
            this.showButton(layout);
            this.updateSelectorAppearance();
        }
    };
    Object.defineProperty(ResultLayoutSelector.prototype, "resultLists", {
        get: function () {
            return this.searchInterface.getComponents('ResultList');
        },
        enumerable: true,
        configurable: true
    });
    ResultLayoutSelector.prototype.hideButton = function (layout) {
        Eif (this.isLayoutDisplayedByButton(layout)) {
            var btn = this.currentActiveLayouts[layout].button;
            Dom_1.$$(btn.el).addClass('coveo-hidden');
            btn.visible = false;
            this.updateSelectorAppearance();
        }
    };
    ResultLayoutSelector.prototype.showButton = function (layout) {
        Eif (this.isLayoutDisplayedByButton(layout)) {
            var btn = this.currentActiveLayouts[layout].button;
            Dom_1.$$(btn.el).removeClass('coveo-hidden');
            btn.visible = true;
        }
    };
    ResultLayoutSelector.prototype.setLayout = function (layout, results) {
        Eif (layout) {
            if (this.currentLayout) {
                Dom_1.$$(this.currentActiveLayouts[this.currentLayout].button.el).removeClass('coveo-selected');
                Dom_1.$$(this.currentActiveLayouts[this.currentLayout].button.el).setAttribute('aria-pressed', false.toString());
            }
            Dom_1.$$(this.currentActiveLayouts[layout].button.el).addClass('coveo-selected');
            Dom_1.$$(this.currentActiveLayouts[layout].button.el).setAttribute('aria-pressed', true.toString());
            this.currentLayout = layout;
            Dom_1.$$(this.element).trigger(ResultListEvents_1.ResultListEvents.changeLayout, {
                layout: layout,
                results: results
            });
        }
    };
    ResultLayoutSelector.prototype.handleQuerySuccess = function (args) {
        this.hasNoResults = args.results.results.length == 0;
        if (this.shouldShowSelector()) {
            this.show();
        }
        else {
            this.hide();
        }
    };
    ResultLayoutSelector.prototype.handleQueryStateChanged = function (args) {
        var modelLayout = this.getModelValue();
        var newLayout = underscore_1.find(underscore_1.keys(this.currentActiveLayouts), function (l) { return l === modelLayout; });
        if (newLayout !== undefined) {
            this.setLayout(newLayout);
        }
        else {
            this.setLayout(underscore_1.keys(this.currentActiveLayouts)[0]);
        }
    };
    ResultLayoutSelector.prototype.handleQueryError = function (args) {
        this.hasNoResults = true;
        this.hide();
    };
    ResultLayoutSelector.prototype.updateSelectorAppearance = function () {
        if (this.shouldShowSelector()) {
            this.show();
        }
        else {
            this.hide();
        }
    };
    ResultLayoutSelector.prototype.populate = function () {
        var _this = this;
        var populateArgs = { layouts: [] };
        Dom_1.$$(this.root).trigger(ResultLayoutEvents_1.ResultLayoutEvents.populateResultLayout, populateArgs);
        var layouts = underscore_1.uniq(populateArgs.layouts.map(function (layout) { return layout.toLowerCase(); }));
        underscore_1.each(layouts, function (layout) { return Assert_1.Assert.check(underscore_1.contains(ResultLayoutSelector.validLayouts, layout), 'Invalid layout'); });
        Eif (!underscore_1.isEmpty(layouts)) {
            underscore_1.each(layouts, function (layout) { return _this.addButton(layout); });
            if (!this.shouldShowSelector()) {
                this.hide();
            }
        }
    };
    ResultLayoutSelector.prototype.addButton = function (layout) {
        var _this = this;
        var btn = Dom_1.$$('span', {
            className: 'coveo-result-layout-selector'
        });
        var caption = Dom_1.$$('span', { className: 'coveo-result-layout-selector-caption' }, Strings_1.l(layout));
        btn.append(caption.el);
        var icon = Dom_1.$$('span', { className: "coveo-icon coveo-" + layout + "-layout-icon" }, SVGIcons_1.SVGIcons.icons[layout + "Layout"]);
        SVGDom_1.SVGDom.addClassToSVGInContainer(icon.el, "coveo-" + layout + "-svg");
        btn.prepend(icon.el);
        var selectAction = function () { return _this.changeLayout(layout); };
        new AccessibleButton_1.AccessibleButton()
            .withElement(btn)
            .withLabel(Strings_1.l('DisplayResultsAs', Strings_1.l(layout)))
            .withSelectAction(selectAction)
            .withOwner(this.bind)
            .build();
        var isCurrentLayout = layout === this.currentLayout;
        btn.toggleClass('coveo-selected', isCurrentLayout);
        btn.setAttribute('aria-pressed', isCurrentLayout.toString());
        Dom_1.$$(this.element).append(btn.el);
        this.currentActiveLayouts[layout] = {
            button: {
                visible: true,
                el: btn.el
            },
            enabled: true
        };
    };
    ResultLayoutSelector.prototype.hide = function () {
        var elem = this.resultLayoutSection || this.element;
        Dom_1.$$(elem).addClass('coveo-result-layout-hidden');
    };
    ResultLayoutSelector.prototype.show = function () {
        var elem = this.resultLayoutSection || this.element;
        Dom_1.$$(elem).removeClass('coveo-result-layout-hidden');
    };
    ResultLayoutSelector.prototype.getModelValue = function () {
        return this.queryStateModel.get(QueryStateModel_1.QueryStateModel.attributesEnum.layout);
    };
    ResultLayoutSelector.prototype.setModelValue = function (val) {
        this.queryStateModel.set(QueryStateModel_1.QueryStateModel.attributesEnum.layout, val);
    };
    ResultLayoutSelector.prototype.shouldShowSelector = function () {
        return (underscore_1.keys(this.currentActiveLayouts).length > 1 &&
            underscore_1.filter(this.currentActiveLayouts, function (activeLayout) { return activeLayout.button.visible; }).length > 1 &&
            !this.hasNoResults);
    };
    ResultLayoutSelector.prototype.isLayoutDisplayedByButton = function (layout) {
        return underscore_1.contains(underscore_1.keys(this.currentActiveLayouts), layout);
    };
    ResultLayoutSelector.ID = 'ResultLayoutSelector';
    ResultLayoutSelector.aliases = ['ResultLayout'];
    ResultLayoutSelector.doExport = function () {
        GlobalExports_1.exportGlobally({
            ResultLayoutSelector: ResultLayoutSelector,
            ResultLayout: ResultLayoutSelector
        });
    };
    ResultLayoutSelector.validLayouts = ['list', 'card', 'table'];
    /**
     * The component options
     * @componentOptions
     */
    ResultLayoutSelector.options = {
        /**
         * Specifies the layouts that should be available when the search page is displayed in mobile mode.
         *
         * By default, the mobile mode breakpoint is at 480 px screen width.
         *
         * To change this default value, use the [responsiveSmallBreakpoint]{@link SearchInterface.options.responsiveSmallBreakpoint} option.
         *
         * When the breakpoint is reached, layouts that are not specified becomes inactive and the linked result list will be disabled.
         *
         * The possible values for layouts are `list`, `card`, `table`.
         *
         * The default value is `card`, `table`.
         */
        mobileLayouts: ComponentOptions_1.ComponentOptions.buildListOption({ defaultValue: ['card', 'table'] }),
        /**
         * Specifies the layouts that should be available when the search page is displayed in tablet mode.
         *
         * By default, the tablet mode breakpoint is at 800 px screen width.
         *
         * To change this default value, use the [responsiveMediumBreakpoint]{@link SearchInterface.options.responsiveMediumBreakpoint} option.
         *
         *  When the breakpoint is reached, layouts that are not specified becomes inactive and the linked result list will be disabled.
         *
         * The possible values for layouts are `list`, `card`, `table`.
         *
         * The default value is `list`, `card`, `table`.
         */
        tabletLayouts: ComponentOptions_1.ComponentOptions.buildListOption({ defaultValue: ['list', 'card', 'table'] }),
        /**
         * Specifies the layouts that should be available when the search page is displayed in desktop mode.
         *
         * By default, the desktop mode breakpoint is any screen size over 800 px.
         *
         * To change this default value, use the [responsiveMediumBreakpoint]{@link SearchInterface.options.responsiveMediumBreakpoint} option.
         *
         *  When the breakpoint is reached, layouts that are not specified becomes inactive and the linked result list will be disabled.
         *
         * The possible values for layouts are `list`, `card`, `table`.
         *
         * The default value is `list`, `card`, `table`.
         */
        desktopLayouts: ComponentOptions_1.ComponentOptions.buildListOption({ defaultValue: ['list', 'card', 'table'] })
    };
    return ResultLayoutSelector;
}(Component_1.Component));
exports.ResultLayoutSelector = ResultLayoutSelector;
Initialization_1.Initialization.registerAutoCreateComponent(ResultLayoutSelector);
 
 
/***/ }),
/* 201 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
__webpack_require__(1525);
var underscore_1 = __webpack_require__(1);
var InitializationEvents_1 = __webpack_require__(22);
var QueryEvents_1 = __webpack_require__(14);
var GlobalExports_1 = __webpack_require__(10);
var Assert_1 = __webpack_require__(12);
var Model_1 = __webpack_require__(26);
var QueryStateModel_1 = __webpack_require__(17);
var SearchEndpoint_1 = __webpack_require__(61);
var AccessibleButton_1 = __webpack_require__(20);
var Dom_1 = __webpack_require__(0);
var Utils_1 = __webpack_require__(5);
var AnalyticsActionListMeta_1 = __webpack_require__(7);
var Component_1 = __webpack_require__(6);
var ComponentOptions_1 = __webpack_require__(13);
var Initialization_1 = __webpack_require__(8);
var ResponsiveTabs_1 = __webpack_require__(396);
/**
 * The Tab component renders a widget that allows the end user to select a specific search interface.
 *
 * This component attaches itself to a `div` element. It is in charge of adding an advanced expression to the outgoing
 * query in order to refine the results.
 *
 * The Tab component can also hide and show different parts of the UI. For each individual component in the UI, you can
 * specify whether you wish to include or exclude that component when the user selects a certain Tab (see [Using Components
 * Only on Specific Tabs](https://docs.coveo.com/en/508/javascript-search-framework/using-components-only-on-specific-tabs)).
 *
 * **Setting a New Endpoint for a Tab:**
 *
 * A Tab can use a custom endpoint when performing a query. Of course, you need to make sure that the endpoint exists in
 * the array of Coveo.SearchEndpoint.endpoints (see {@link SearchEndpoint.endpoints}).
 *
 * ```
 * Coveo.SearchEndpoint.endpoints["specialEndpoint"] = new Coveo.SearchEndpoint({
 *     restUri : 'https://somewhere.com/rest/search'
 * })
 *
 * [ ... ]
 *
 * <div class='CoveoTab' data-endpoint='specialEndpoint'></div>
 *
 * ```
 */
var Tab = /** @class */ (function (_super) {
    __extends(Tab, _super);
    /**
     * Creates a new Tab. Binds on buildingQuery event as well as an event on click of the element.
     * @param element The HTMLElement on which to instantiate the component. Normally a `div`.
     * @param options The options for the Tab component.
     * @param bindings The bindings that the component requires to function normally. If not set, these will be
     * automatically resolved (with a slower execution time).
     */
    function Tab(element, options, bindings) {
        var _this = _super.call(this, element, Tab.ID, bindings) || this;
        _this.element = element;
        _this.options = options;
        _this.options = ComponentOptions_1.ComponentOptions.initComponentOptions(element, Tab, options);
        _this.bind.onRootElement(QueryEvents_1.QueryEvents.buildingQuery, function (args) { return _this.handleBuildingQuery(args); });
        _this.bind.onRootElement(InitializationEvents_1.InitializationEvents.afterInitialization, function () { return _this.handleAfterInitialization(); });
        _this.bind.onQueryState(Model_1.MODEL_EVENTS.CHANGE_ONE, QueryStateModel_1.QUERY_STATE_ATTRIBUTES.T, function (args) {
            return _this.handleQueryStateChanged(args);
        });
        new AccessibleButton_1.AccessibleButton()
            .withElement(element)
            .withSelectAction(function () { return _this.select(); })
            .withTitle(_this.options.caption)
            .withOwner(_this.bind)
            .build();
        _this.render();
        ResponsiveTabs_1.ResponsiveTabs.init(_this.root, _this, _this.options);
        return _this;
    }
    /**
     * Selects the current Tab.
     *
     * Also logs the `interfaceChange` event in the usage analytics with the new current {@link Tab.options.id} as metada
     * and triggers a new query.
     */
    Tab.prototype.select = function () {
        Eif (!this.disabled) {
            var state = {
                t: this.options.id,
                sort: this.options.sort || QueryStateModel_1.QueryStateModel.defaultAttributes.sort
            };
            if (this.options.layout) {
                state.layout = this.options.layout;
            }
            this.queryStateModel.setMultiple(state);
            this.usageAnalytics.logSearchEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.interfaceChange, {
                interfaceChangeTo: this.options.id
            });
            this.queryController.executeQuery();
        }
    };
    /**
     * Indicates whether the HTMLElement argument is included in the Tab. *Included* elements are shown when the Tab is
     * selected, whereas *excluded* elements are not.
     * @param element The HTMLElement to verify.
     * @returns {boolean} `true` if the HTMLElement is included in the Tab; `false` if it is excluded.
     */
    Tab.prototype.isElementIncludedInTab = function (element) {
        Assert_1.Assert.exists(element);
        var includedTabs = this.splitListOfTabs(element.getAttribute('data-tab'));
        var excludedTabs = this.splitListOfTabs(element.getAttribute('data-tab-not'));
        Assert_1.Assert.check(!(includedTabs.length != 0 && excludedTabs.length != 0), 'You cannot both explicitly include and exclude an element from tabs.');
        return ((includedTabs.length != 0 && underscore_1.indexOf(includedTabs, this.options.id) != -1) ||
            (excludedTabs.length != 0 && underscore_1.indexOf(excludedTabs, this.options.id) == -1) ||
            (includedTabs.length == 0 && excludedTabs.length == 0));
    };
    Tab.prototype.render = function () {
        var icon = this.options.icon;
        if (Utils_1.Utils.isNonEmptyString(icon)) {
            var iconSpan = Dom_1.$$('span').el;
            Dom_1.$$(iconSpan).addClass(['coveo-icon', icon]);
            this.element.insertBefore(iconSpan, this.element.firstChild);
        }
        var caption = this.options.caption;
        if (Utils_1.Utils.isNonEmptyString(caption)) {
            var captionP = document.createElement('p');
            Dom_1.$$(captionP).text(caption);
            this.element.appendChild(captionP);
        }
    };
    Tab.prototype.handleBuildingQuery = function (data) {
        Assert_1.Assert.exists(data);
        if (!this.disabled && this.isSelected()) {
            data.queryBuilder.tab = this.options.id;
            if (Utils_1.Utils.isNonEmptyString(this.options.expression)) {
                if (this.options.constant) {
                    data.queryBuilder.constantExpression.add(this.options.expression);
                }
                else {
                    data.queryBuilder.advancedExpression.add(this.options.expression);
                }
            }
            if (this.options.enableDuplicateFiltering) {
                data.queryBuilder.enableDuplicateFiltering = true;
            }
            if (this.options.pipeline != null) {
                data.queryBuilder.pipeline = this.options.pipeline;
            }
            if (this.options.maximumAge != null) {
                data.queryBuilder.maximumAge = this.options.maximumAge;
            }
        }
    };
    Tab.prototype.handleQueryStateChanged = function (data) {
        Assert_1.Assert.exists(data);
        if (!this.disabled && this.isSelected()) {
            Dom_1.$$(this.element).addClass('coveo-selected');
            this.queryController.setEndpoint(this.options.endpoint);
            this.showAndHideAppropriateElements();
        }
        else {
            Dom_1.$$(this.element).removeClass('coveo-selected');
        }
    };
    Tab.prototype.handleAfterInitialization = function () {
        if (this.isSelected() && this.options.layout) {
            this.queryStateModel.set(QueryStateModel_1.QUERY_STATE_ATTRIBUTES.LAYOUT, this.options.layout);
        }
    };
    Tab.prototype.isSelected = function () {
        var activeTab = this.queryStateModel.get(QueryStateModel_1.QueryStateModel.attributesEnum.t);
        return activeTab == this.options.id;
    };
    Tab.prototype.showAndHideAppropriateElements = function () {
        var _this = this;
        var showElements = [];
        var hideElements = [];
        underscore_1.each(Dom_1.$$(this.root).findAll('[data-tab],[data-tab-not]'), function (element) {
            if (_this.isElementIncludedInTab(element)) {
                _this.toggleAllComponentsUnder(element, true);
                showElements.push(element);
            }
            else {
                _this.toggleAllComponentsUnder(element, false);
                hideElements.push(element);
            }
        });
        Dom_1.$$(this.root).one(QueryEvents_1.QueryEvents.querySuccess, function () {
            underscore_1.each(showElements, function (elem) { return Dom_1.$$(elem).removeClass('coveo-tab-disabled'); });
            underscore_1.each(hideElements, function (elem) { return Dom_1.$$(elem).addClass('coveo-tab-disabled'); });
        });
    };
    Tab.prototype.splitListOfTabs = function (value) {
        if (Utils_1.Utils.exists(value)) {
            return underscore_1.map(value.split(','), function (tab) { return Utils_1.Utils.trim(tab); });
        }
        else {
            return [];
        }
    };
    Tab.prototype.toggleAllComponentsUnder = function (element, enable) {
        Assert_1.Assert.exists(element);
        var togglePossibleComponent = function (possibleComponent) {
            var possibleCmp = Component_1.Component.get(possibleComponent, undefined, true);
            if (possibleCmp) {
                if (enable) {
                    possibleCmp.enable();
                }
                else {
                    possibleCmp.disable();
                }
            }
        };
        togglePossibleComponent(element);
        underscore_1.each(Dom_1.$$(element).findAll('*'), function (el) {
            togglePossibleComponent(el);
        });
    };
    Tab.prototype.enable = function () {
        _super.prototype.enable.call(this);
        this.element.style.display = '';
    };
    Tab.prototype.disable = function () {
        _super.prototype.disable.call(this);
        this.element.style.display = 'none';
    };
    Tab.ID = 'Tab';
    Tab.doExport = function () {
        GlobalExports_1.exportGlobally({
            Tab: Tab
        });
    };
    /**
     * The options for a Tab
     * @componentOptions
     */
    Tab.options = {
        /**
         * Specifies a unique ID for the Tab.
         *
         * Specifying a value for this option is necessary for this component to work.
         */
        id: ComponentOptions_1.ComponentOptions.buildStringOption({ required: true, section: 'Common Options' }),
        /**
         * Specifies the caption of the Tab.
         *
         * Specifying a value for this option is necessary for this component to work.
         */
        caption: ComponentOptions_1.ComponentOptions.buildLocalizedStringOption({ required: true, section: 'Common Options' }),
        /**
         * Specifies an icon to use for the Tab.
         *
         * @deprecated This options is mostly kept for legacy reasons. If possible, you should avoid using it.
         */
        icon: ComponentOptions_1.ComponentOptions.buildStringOption(),
        /**
         * Specifies an advanced expression or filter that the Tab should add to any outgoing query.
         *
         * **Example:**
         *
         * `@objecttype==Message`
         *
         * Default value is `undefined` and the Tab applies no additional expression or filter to the query.
         */
        expression: ComponentOptions_1.ComponentOptions.buildQueryExpressionOption({ section: 'Common Options' }),
        /**
         * Specifies the {@link SearchEndpoint} to point to when performing queries from within the Tab.
         *
         * By default, the Tab uses the "default" endpoint.
         */
        endpoint: ComponentOptions_1.ComponentOptions.buildCustomOption(function (endpoint) { return (endpoint != null ? SearchEndpoint_1.SearchEndpoint.endpoints[endpoint] : null); }),
        /**
         * Specifies the default sort criteria to use when selecting the Tab. A {@link Sort} component with the same
         * parameter needs to be present in the search interface in order for this option to function properly.
         *
         * **Examples:**
         *
         * - `data-sort='relevancy'`
         * - `data-sort='date descending'`
         *
         * Default value is `undefined` and the normal {@link Sort} component behavior applies.
         */
        sort: ComponentOptions_1.ComponentOptions.buildStringOption(),
        /**
         * Specifies the default layout to display when the user selects the Tab (see {@link ResultList.options.layout} and
         * {@link ResultLayout}).
         *
         * See the {@link ValidLayout} type for the list of possible values.
         *
         * If not specified, it will default to 'list'.
         *
         * See also [Result Layouts](https://docs.coveo.com/en/360/).
         *
         * Default value is `undefined` and the component selects the first available layout.
         */
        layout: ComponentOptions_1.ComponentOptions.buildStringOption(),
        /**
         * Specifies whether to include the {@link Tab.options.expression} in the constant part of the query.
         *
         * The index specially optimizes the constant part of the query to execute faster. However, you must be careful not
         * to include dynamic query expressions, otherwise the cache will lose its efficiency.
         *
         * Default value is `true`.
         */
        constant: ComponentOptions_1.ComponentOptions.buildBooleanOption({ defaultValue: true, section: 'Filtering' }),
        /**
         * Whether to filter out duplicates, so that items resembling one another only appear once in the query results.
         *
         * **Notes:**
         * - Two items must be at least 85% similar to one another to be considered duplicates.
         * - When a pair of duplicates is found, only the higher-ranked item of the two is kept in the result set.
         * - Enabling this feature can make the total result count less precise, as only the requested page of query results is submitted to duplicate filtering.
         * - The default value for this option can be modified through the {@link SearchInterface} component.
         */
        enableDuplicateFiltering: ComponentOptions_1.ComponentOptions.buildBooleanOption({ defaultValue: false }),
        /**
         * Specifies the name of the query pipeline to use for the queries when the Tab is selected.
         *
         * You can specify a value for this option if your index is in a Coveo Cloud organization in which pipelines have
         * been created (see [Adding and Managing Query Pipelines](https://docs.coveo.com/en/1791/)).
         *
         * Default value is `undefined`, which means that pipeline selection conditions defined in the Coveo Cloud
         * organization apply.
         */
        pipeline: ComponentOptions_1.ComponentOptions.buildStringOption(),
        /**
         * Specifies the maximum age (in milliseconds) that cached query results can have to still be usable as results
         * instead of performing a new query on the index from within the Tab. The cache is located in the Coveo Search API
         * (which resides between the index and the search interface).
         *
         * If cached results that are older than the age you specify in this option are available, a new query will be
         * performed on the index anyhow.
         *
         * On high-volume public web sites, specifying a higher value for this option can greatly improve query response
         * time at the cost of result freshness.
         *
         * **Note:**
         *
         * > It is also possible to set a maximum cache age for the entire {@link SearchInterface} rather than for a single
         * > Tab (see {@link SearchInterface.options.maximumAge}).
         *
         * Default value is `undefined` and the Coveo Search API determines the maximum cache age. This is typically
         * equivalent to 30 minutes (see [maximumAge](https://docs.coveo.com/en/1461/#RestQueryParameters-maximumAge)).
         */
        maximumAge: ComponentOptions_1.ComponentOptions.buildNumberOption(),
        /**
         * Specifies whether to enable responsive mode for tabs. Responsive mode makes overflowing tabs disappear, instead
         * making them available using a dropdown button. Responsive tabs are enabled either when tabs overflow or when the
         * width of the search interface becomes too small.
         *
         * Disabling responsive mode for one Tab also disables it for all tabs. Therefore, you only need to set this option
         * to `false` on one Tab to disable responsive mode.
         *
         * Default value is `true`.
         *
         * @availablesince [October 2016 Release (v1.1550.5)](https://docs.coveo.com/en/309/#october-2016-release-v115505)
         */
        enableResponsiveMode: ComponentOptions_1.ComponentOptions.buildBooleanOption({ defaultValue: true, section: 'ResponsiveOptions' }),
        /**
         * Specifies the label of the button that allows to show the hidden tabs when in responsive mode.
         *
         * If more than one Tab in the search interface specifies a value for this option, then the framework uses the first
         * occurrence of the option.
         *
         * The default value is `"More"`.
         */
        dropdownHeaderLabel: ComponentOptions_1.ComponentOptions.buildLocalizedStringOption({ section: 'ResponsiveOptions' })
    };
    return Tab;
}(Component_1.Component));
exports.Tab = Tab;
Initialization_1.Initialization.registerAutoCreateComponent(Tab);
 
 
/***/ }),
/* 202 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
__webpack_require__(1535);
var Dom_1 = __webpack_require__(0);
var underscore_1 = __webpack_require__(1);
var FacetValueState_1 = __webpack_require__(36);
var Strings_1 = __webpack_require__(4);
var DynamicFacetValueMoreLessButton_1 = __webpack_require__(399);
var Utils_1 = __webpack_require__(5);
var DynamicFacetHeader_1 = __webpack_require__(155);
var DynamicFacetValues = /** @class */ (function () {
    function DynamicFacetValues(facet, creatorKlass) {
        this.facet = facet;
        this.list = Dom_1.$$('ul', {
            className: 'coveo-dynamic-facet-values',
            'aria-labelledby': DynamicFacetHeader_1.getDynamicFacetHeaderId(this.facet.options.id),
            role: 'group'
        }).el;
        this.valueCreator = new creatorKlass(this.facet);
        this.resetValues();
    }
    DynamicFacetValues.prototype.createFromResponse = function (response) {
        var _this = this;
        this.facetValues = response.values.map(function (facetValue, index) { return _this.valueCreator.createFromResponse(facetValue, index); });
    };
    DynamicFacetValues.prototype.reorderValues = function (order) {
        this.facetValues = Utils_1.Utils.reorderValuesByKeys(this.facetValues, order, function (value) { return value.value; });
    };
    DynamicFacetValues.prototype.resetValues = function () {
        this.facetValues = this.valueCreator.getDefaultValues();
    };
    Object.defineProperty(DynamicFacetValues.prototype, "allFacetValues", {
        get: function () {
            return this.facetValues;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(DynamicFacetValues.prototype, "allValues", {
        get: function () {
            return this.facetValues.map(function (facetValue) { return facetValue.value; });
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(DynamicFacetValues.prototype, "selectedValues", {
        get: function () {
            return this.facetValues.filter(function (value) { return value.isSelected; }).map(function (_a) {
                var value = _a.value;
                return value;
            });
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(DynamicFacetValues.prototype, "selectedDisplayValues", {
        get: function () {
            return this.facetValues.filter(function (value) { return value.isSelected; }).map(function (_a) {
                var displayValue = _a.displayValue;
                return displayValue;
            });
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(DynamicFacetValues.prototype, "activeValues", {
        get: function () {
            return this.facetValues.filter(function (value) { return !value.isIdle; });
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(DynamicFacetValues.prototype, "displayedValues", {
        get: function () {
            return this.facetValues.filter(function (value) { return !value.isIdle || value.numberOfResults > 0; });
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(DynamicFacetValues.prototype, "hasSelectedValues", {
        get: function () {
            return !!underscore_1.findWhere(this.facetValues, { state: FacetValueState_1.FacetValueState.selected });
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(DynamicFacetValues.prototype, "hasActiveValues", {
        get: function () {
            return !!this.activeValues.length;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(DynamicFacetValues.prototype, "hasIdleValues", {
        get: function () {
            return !!underscore_1.findWhere(this.facetValues, { state: FacetValueState_1.FacetValueState.idle });
        },
        enumerable: true,
        configurable: true
    });
    DynamicFacetValues.prototype.clearAll = function () {
        this.facetValues.forEach(function (value) { return value.deselect(); });
    };
    Object.defineProperty(DynamicFacetValues.prototype, "hasValues", {
        get: function () {
            return !!this.allFacetValues.length;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(DynamicFacetValues.prototype, "hasDisplayedValues", {
        get: function () {
            return !!this.displayedValues.length;
        },
        enumerable: true,
        configurable: true
    });
    DynamicFacetValues.prototype.hasSelectedValue = function (arg) {
        var value = typeof arg === 'string' ? arg : arg.value;
        var foundValue = underscore_1.find(this.facetValues, function (facetValue) { return facetValue.equals(value); });
        return foundValue && foundValue.isSelected;
    };
    DynamicFacetValues.prototype.get = function (arg) {
        var value = typeof arg === 'string' ? arg : arg.value;
        var facetValue = underscore_1.find(this.facetValues, function (facetValue) { return facetValue.equals(value); });
        if (facetValue) {
            return facetValue;
        }
        var newFacetValue = this.valueCreator.createFromValue(value);
        if (!newFacetValue) {
            return null;
        }
        this.facetValues.push(newFacetValue);
        return newFacetValue;
    };
    DynamicFacetValues.prototype.focus = function (value) {
        var facetValue = underscore_1.find(this.facetValues, function (facetValue) { return facetValue.equals(value); });
        if (!facetValue) {
            return;
        }
        facetValue.focus();
    };
    DynamicFacetValues.prototype.buildShowLess = function () {
        var _this = this;
        var showLess = new DynamicFacetValueMoreLessButton_1.DynamicFacetValueShowMoreLessButton({
            className: 'coveo-dynamic-facet-show-less',
            ariaLabel: Strings_1.l('ShowLessFacetResults', this.facet.options.title),
            label: Strings_1.l('ShowLess'),
            action: function () {
                _this.facet.enableFreezeFacetOrderFlag();
                _this.facet.showLessValues();
            }
        });
        return showLess.element;
    };
    DynamicFacetValues.prototype.buildShowMore = function () {
        var _this = this;
        var showMore = new DynamicFacetValueMoreLessButton_1.DynamicFacetValueShowMoreLessButton({
            className: 'coveo-dynamic-facet-show-more',
            ariaLabel: Strings_1.l('ShowMoreFacetResults', this.facet.options.title),
            label: Strings_1.l('ShowMore'),
            action: function () {
                _this.facet.enableFreezeFacetOrderFlag();
                _this.facet.showMoreValues();
            }
        });
        return showMore.element;
    };
    Object.defineProperty(DynamicFacetValues.prototype, "shouldEnableShowLess", {
        get: function () {
            var hasMoreValuesThenDefault = this.facetValues.length > this.facet.options.numberOfValues;
            return hasMoreValuesThenDefault && this.hasIdleValues;
        },
        enumerable: true,
        configurable: true
    });
    DynamicFacetValues.prototype.appendShowMoreLess = function (fragment) {
        if (!this.facet.options.enableMoreLess) {
            return;
        }
        if (this.shouldEnableShowLess) {
            fragment.appendChild(this.buildShowLess());
        }
        if (this.facet.moreValuesAvailable) {
            fragment.appendChild(this.buildShowMore());
        }
    };
    DynamicFacetValues.prototype.appendSelectedCollapsedValues = function (fragment) {
        if (!this.hasSelectedValues) {
            return;
        }
        var selectedValues = this.selectedDisplayValues.join(', ');
        fragment.appendChild(Dom_1.$$('li', {
            className: 'coveo-dynamic-facet-collapsed-values',
            ariaLabel: Strings_1.l('CurrentSelections') + ": " + selectedValues
        }, underscore_1.escape(selectedValues)).el);
    };
    DynamicFacetValues.prototype.render = function () {
        var fragment = document.createDocumentFragment();
        Dom_1.$$(this.list).empty();
        this.displayedValues.forEach(function (facetValue) {
            fragment.appendChild(facetValue.renderedElement);
        });
        this.appendShowMoreLess(fragment);
        this.appendSelectedCollapsedValues(fragment);
        this.list.appendChild(fragment);
        return this.list;
    };
    return DynamicFacetValues;
}());
exports.DynamicFacetValues = DynamicFacetValues;
 
 
/***/ }),
/* 203 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __assign = (this && this.__assign) || Object.assign || function(t) {
    for (var s, i = 1, n = arguments.length; i < n; i++) {
        s = arguments[i];
        for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
            t[p] = s[p];
    }
    return t;
};
Object.defineProperty(exports, "__esModule", { value: true });
var Utils_1 = __webpack_require__(5);
var DynamicFacetRequestBuilder = /** @class */ (function () {
    function DynamicFacetRequestBuilder(request) {
        this.request = request;
    }
    DynamicFacetRequestBuilder.prototype.buildBaseRequestForQuery = function () {
        return __assign({}, this.request, { filterFacetCount: determineFilterFacetCount(this.request) });
    };
    return DynamicFacetRequestBuilder;
}());
exports.DynamicFacetRequestBuilder = DynamicFacetRequestBuilder;
function determineFilterFacetCount(options) {
    var filterFacetCount = options.filterFacetCount;
    return Utils_1.Utils.isUndefined(filterFacetCount) ? true : filterFacetCount;
}
exports.determineFilterFacetCount = determineFilterFacetCount;
 
 
/***/ }),
/* 204 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __assign = (this && this.__assign) || Object.assign || function(t) {
    for (var s, i = 1, n = arguments.length; i < n; i++) {
        s = arguments[i];
        for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
            t[p] = s[p];
    }
    return t;
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { Iif (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        Iif (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            Iif (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
            Iif (y = 0, t) op = [0, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    Eif (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        Iif (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
Object.defineProperty(exports, "__esModule", { value: true });
var Dom_1 = __webpack_require__(0);
var ComboboxInput_1 = __webpack_require__(841);
var underscore_1 = __webpack_require__(1);
var SVGIcons_1 = __webpack_require__(16);
var SVGDom_1 = __webpack_require__(23);
var ComboboxValues_1 = __webpack_require__(842);
__webpack_require__(1537);
var Utils_1 = __webpack_require__(5);
var Strings_1 = __webpack_require__(4);
var Combobox = /** @class */ (function () {
    function Combobox(options) {
        this.options = options;
        this.defaultOptions = {
            wrapperClassName: '',
            clearOnBlur: false
        };
        this.throttlingDelay = 600;
        this.isRequestCancelled = false;
        this.throttledRequest = underscore_1.throttle(this.triggerRequest, this.throttlingDelay, {
            leading: true,
            trailing: true
        });
        this.options = __assign({}, this.defaultOptions, this.options);
        this.id = underscore_1.uniqueId('coveo-combobox-');
        this.create();
    }
    Combobox.prototype.create = function () {
        this.element = Dom_1.$$('div', { className: "coveo-combobox-wrapper " + this.options.wrapperClassName }).el;
        this.createAndAppendInput();
        this.createAndAppendWaitAnimation();
        this.createAndAppendValues();
    };
    Combobox.prototype.createAndAppendInput = function () {
        this.input = new ComboboxInput_1.ComboboxInput(this);
        this.element.appendChild(this.input.element);
    };
    Combobox.prototype.createAndAppendWaitAnimation = function () {
        this.waitAnimationElement = Dom_1.$$('div', { className: 'coveo-combobox-wait-animation' }, SVGIcons_1.SVGIcons.icons.loading).el;
        SVGDom_1.SVGDom.addClassToSVGInContainer(this.waitAnimationElement, 'coveo-combobox-wait-animation-svg');
        this.toggleWaitAnimation(false);
        this.input.element.appendChild(this.waitAnimationElement);
    };
    Combobox.prototype.toggleWaitAnimation = function (show) {
        Dom_1.$$(this.waitAnimationElement).toggle(show);
    };
    Combobox.prototype.createAndAppendValues = function () {
        this.values = new ComboboxValues_1.ComboboxValues(this);
        this.element.appendChild(this.values.element);
    };
    Combobox.prototype.clearAll = function () {
        this.clearValues();
        this.input.clearInput();
    };
    Combobox.prototype.clearValues = function () {
        this.values.clearValues();
        this.cancelRequest();
    };
    Combobox.prototype.cancelRequest = function () {
        this.toggleWaitAnimation(false);
        this.throttledRequest.cancel();
        this.isRequestCancelled = true;
    };
    Combobox.prototype.onInputChange = function (value) {
        var _this = this;
        if (Utils_1.Utils.isEmptyString(value)) {
            return this.clearValues();
        }
        this.throttledRequest(function () { return _this.options.requestValues(value); }, function () { return _this.values.resetScroll(); });
    };
    Combobox.prototype.onInputBlur = function () {
        if (this.values.mouseIsOverValue) {
            return;
        }
        if (this.values.isRenderingNewValues) {
            return;
        }
        if (this.options.clearOnBlur) {
            return this.clearAll();
        }
        this.clearValues();
    };
    Combobox.prototype.updateAccessibilityAttributes = function (attributes) {
        this.input.updateAccessibilityAttributes(attributes);
    };
    Combobox.prototype.updateAriaLive = function () {
        if (!this.values.hasValues()) {
            this.options.ariaLive.updateText(Strings_1.l('NoValuesFound'));
            return;
        }
        var text = Strings_1.l('ShowingResultsWithQuery', this.values.numberOfValues, this.input.value, this.values.numberOfValues);
        if (this.options.scrollable && this.options.scrollable.areMoreValuesAvailable()) {
            text = text + " (" + Strings_1.l('MoreValuesAvailable') + ")";
        }
        this.options.ariaLive.updateText(text);
    };
    Combobox.prototype.onScrollEndReached = function () {
        var _this = this;
        this.values.saveFocusedValue();
        this.options.scrollable &&
            this.throttledRequest(function () { return _this.options.scrollable.requestMoreValues(); }, function () { return _this.values.restoreFocusedValue(); });
    };
    Combobox.prototype.triggerRequest = function (request, callback) {
        return __awaiter(this, void 0, void 0, function () {
            var response;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        this.isRequestCancelled = false;
                        this.toggleWaitAnimation(true);
                        return [4 /*yield*/, request()];
                    case 1:
                        response = _a.sent();
                        this.toggleWaitAnimation(false);
                        Eif (!this.isRequestCancelled) {
                            this.values.renderFromResponse(response);
                            callback && callback();
                        }
                        return [2 /*return*/];
                }
            });
        });
    };
    return Combobox;
}());
exports.Combobox = Combobox;
 
 
/***/ }),
/* 205 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
/**
 * The allowed values for the [`valueFormat`]{@link DynamicFacetRange.options.valueFormat} option
 * of the [`DynamicFacetRange`]{@link DynamicFacetRange} component.
 */
var DynamicFacetRangeValueFormat;
(function (DynamicFacetRangeValueFormat) {
    /**
     * Format range values as localized currency strings.
     */
    DynamicFacetRangeValueFormat["currency"] = "currency";
    /**
     * Format range values as localized numeric strings.
     */
    DynamicFacetRangeValueFormat["number"] = "number";
    /**
     * Format range values as localized date strings.
     */
    DynamicFacetRangeValueFormat["date"] = "date";
})(DynamicFacetRangeValueFormat = exports.DynamicFacetRangeValueFormat || (exports.DynamicFacetRangeValueFormat = {}));
function isFacetRangeValueFormat(rangeValueFormat) {
    return !!DynamicFacetRangeValueFormat[rangeValueFormat];
}
exports.isFacetRangeValueFormat = isFacetRangeValueFormat;
 
 
/***/ }),
/* 206 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var dompurify_1 = __webpack_require__(1551);
var Dom_1 = __webpack_require__(0);
var ResultLinkCommon_1 = __webpack_require__(638);
exports.getDefaultSnippetStyle = function (contentClassName) { return "\n  body {\n    font-family: \"Lato\", \"Helvetica Neue\", Helvetica, Arial, sans-serif, sans-serif;\n  }\n\n  ." + contentClassName + " > :first-child {\n    margin-top: 0;\n  }\n\n  ." + contentClassName + " > :last-child {\n    margin-bottom: 0;\n  }\n"; };
function getSanitizedAnswerSnippet(questionAnswer) {
    return (questionAnswer.answerSnippet &&
        dompurify_1.sanitize(questionAnswer.answerSnippet, {
            USE_PROFILES: { html: true }
        }));
}
exports.getSanitizedAnswerSnippet = getSanitizedAnswerSnippet;
exports.transformSnippetLinks = function (renderedSnippetParent, alwaysOpenInNewWindow, logAnalytics) {
    Dom_1.Dom.nodeListToArray(renderedSnippetParent.querySelectorAll('a')).forEach(function (link) {
        ResultLinkCommon_1.bindAnalyticsToLink(link, function () { return logAnalytics(link); });
        link.target = alwaysOpenInNewWindow ? '_blank' : '_top';
    });
};
 
 
/***/ }),
/* 207 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
var Component_1 = __webpack_require__(6);
var NoopComponent = /** @class */ (function (_super) {
    __extends(NoopComponent, _super);
    function NoopComponent(element, options, bindings) {
        return _super.call(this, element, NoopComponent.ID, bindings) || this;
    }
    NoopComponent.ID = 'NoopComponent';
    return NoopComponent;
}(Component_1.Component));
exports.NoopComponent = NoopComponent;
 
 
/***/ }),
/* 208 */
/***/ (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;
 
 
/***/ }),
/* 209 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = matcher;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__extendOwn_js__ = __webpack_require__(284);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isMatch_js__ = __webpack_require__(427);
 
 
 
// Returns a predicate for checking whether an object has a given set of
// `key:value` pairs.
function matcher(attrs) {
  attrs = Object(__WEBPACK_IMPORTED_MODULE_0__extendOwn_js__["a" /* default */])({}, attrs);
  return function(obj) {
    return Object(__WEBPACK_IMPORTED_MODULE_1__isMatch_js__["a" /* default */])(obj, attrs);
  };
}
 
 
/***/ }),
/* 210 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__restArguments_js__ = __webpack_require__(58);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__executeBound_js__ = __webpack_require__(443);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__underscore_js__ = __webpack_require__(59);
 
 
 
 
// Partially apply a function by creating a version that has had some of its
// arguments pre-filled, without changing its dynamic `this` context. `_` acts
// as a placeholder by default, allowing any combination of arguments to be
// pre-filled. Set `_.partial.placeholder` for a custom placeholder argument.
var partial = Object(__WEBPACK_IMPORTED_MODULE_0__restArguments_js__["a" /* default */])(function(func, boundArgs) {
  var placeholder = partial.placeholder;
  var bound = function() {
    var position = 0, length = boundArgs.length;
    var args = Array(length);
    for (var i = 0; i < length; i++) {
      args[i] = boundArgs[i] === placeholder ? arguments[position++] : boundArgs[i];
    }
    while (position < arguments.length) args.push(arguments[position++]);
    return Object(__WEBPACK_IMPORTED_MODULE_1__executeBound_js__["a" /* default */])(func, bound, this, this, args);
  };
  return bound;
});
 
partial.placeholder = __WEBPACK_IMPORTED_MODULE_2__underscore_js__["a" /* default */];
/* harmony default export */ __webpack_exports__["a"] = (partial);
 
 
/***/ }),
/* 211 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = group;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__cb_js__ = __webpack_require__(53);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__each_js__ = __webpack_require__(107);
 
 
 
// An internal function used for aggregate "group by" operations.
function group(behavior, partition) {
  return function(obj, iteratee, context) {
    var result = partition ? [[], []] : {};
    iteratee = Object(__WEBPACK_IMPORTED_MODULE_0__cb_js__["a" /* default */])(iteratee, context);
    Object(__WEBPACK_IMPORTED_MODULE_1__each_js__["a" /* default */])(obj, function(value, index) {
      var key = iteratee(value, index, obj);
      behavior(result, value, key);
    });
    return result;
  };
}
 
 
/***/ }),
/* 212 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var JQueryUtils = /** @class */ (function () {
    function JQueryUtils() {
    }
    JQueryUtils.getJQuery = function () {
        if (window && window['Coveo'] && window['Coveo']['$']) {
            return window['Coveo']['$'];
        }
        return false;
    };
    JQueryUtils.isInstanceOfJQuery = function (obj) {
        var jq = this.getJQuery();
        Eif (jq) {
            return obj instanceof jq;
        }
        return false;
    };
    JQueryUtils.isInstanceOfJqueryEvent = function (obj) {
        var jq = this.getJQuery();
        Eif (jq) {
            return obj instanceof jq.Event;
        }
        return false;
    };
    return JQueryUtils;
}());
exports.JQueryUtils = JQueryUtils;
 
 
/***/ }),
/* 213 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Assert_1 = __webpack_require__(12);
var QueryError = /** @class */ (function () {
    function QueryError(errorResponse) {
        this.status = errorResponse.statusCode;
        this.message = errorResponse.data.message;
        this.name = this.type = errorResponse.data.type;
        this.queryExecutionReport = errorResponse.data.executionReport;
        Assert_1.Assert.isNumber(this.status);
        Assert_1.Assert.isNonEmptyString(this.message);
        Assert_1.Assert.isNonEmptyString(this.type);
    }
    return QueryError;
}());
exports.QueryError = QueryError;
 
 
/***/ }),
/* 214 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
/**
 * The plan of execution of a search request.
 */
var ExecutionPlan = /** @class */ (function () {
    function ExecutionPlan(response) {
        this.response = response;
    }
    Object.defineProperty(ExecutionPlan.prototype, "basicExpression", {
        /**
         * Gets the final value of the basic expression (`q`) after the search request has been processed in the query pipeline, but before it is sent to the index.
         */
        get: function () {
            return this.response.parsedInput.basicExpression;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ExecutionPlan.prototype, "largeExpression", {
        /**
         * Gets the final value of the large expression (`lq`) after the search request has been processed in the query pipeline, but before it is sent to the index.
         */
        get: function () {
            return this.response.parsedInput.largeExpression;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ExecutionPlan.prototype, "redirectionURL", {
        /**
         * Gets the URL to redirect the browser to, if the search request satisfies the condition of a `redirect` trigger rule in the query pipeline.
         *
         * Returns `null` otherwise.
         */
        get: function () {
            var redirects = this.response.preprocessingOutput.triggers.filter(function (trigger) { return trigger.type === 'redirect'; });
            return redirects.length ? redirects[0].content : null;
        },
        enumerable: true,
        configurable: true
    });
    return ExecutionPlan;
}());
exports.ExecutionPlan = ExecutionPlan;
 
 
/***/ }),
/* 215 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Utils_1 = __webpack_require__(5);
var _ = __webpack_require__(1);
var Options = /** @class */ (function () {
    function Options() {
    }
    Options.prototype.merge = function (provided) {
        return _.extend({}, this, provided);
    };
    Options.prototype.mergeDeep = function (provided) {
        return _.extend({}, Utils_1.Utils.extendDeep(this, provided));
    };
    return Options;
}());
exports.Options = Options;
 
 
/***/ }),
/* 216 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
var Assert_1 = __webpack_require__(12);
var InitializationEvents_1 = __webpack_require__(22);
var Dom_1 = __webpack_require__(0);
var HashUtils_1 = __webpack_require__(88);
var Defer_1 = __webpack_require__(31);
var RootComponent_1 = __webpack_require__(133);
var Utils_1 = __webpack_require__(5);
var _ = __webpack_require__(1);
var QueryStateModel_1 = __webpack_require__(17);
var AnalyticsActionListMeta_1 = __webpack_require__(7);
var SharedAnalyticsCalls_1 = __webpack_require__(172);
var Model_1 = __webpack_require__(26);
/**
 * This component is instantiated automatically by the framework on the root if the {@link SearchInterface}.<br/>
 * When the {@link SearchInterface.options.enableHistory} option is set to true, this component is instantiated.<br/>
 * It's only job is to apply changes in the {@link QueryStateModel} to the hash in the URL, and vice versa.<br/>
 * This component does *not* hold the state of the interface, it only represent it in the URL.
 */
var HistoryController = /** @class */ (function (_super) {
    __extends(HistoryController, _super);
    /**
     * Create a new HistoryController
     * @param element
     * @param window
     * @param queryStateModel
     * @param queryController
     * @param usageAnalytics **Deprecated.** Since the [October 2019 Release (v2.7219)](https://docs.coveo.com/en/3084/), the class retrieves and uses the {@link AnalyticsClient} from the `queryController` constructor parameter.
     */
    function HistoryController(element, window, queryStateModel, queryController, usageAnalytics) {
        var _this = _super.call(this, element, HistoryController.ID) || this;
        _this.window = window;
        _this.queryStateModel = queryStateModel;
        _this.queryController = queryController;
        _this.willUpdateHash = false;
        Assert_1.Assert.exists(_this.queryStateModel);
        Assert_1.Assert.exists(_this.queryController);
        Dom_1.$$(_this.element).on(InitializationEvents_1.InitializationEvents.restoreHistoryState, function () {
            _this.logger.trace('Restore history state. Update model');
            _this.updateModelFromHash();
            _this.lastState = _this.queryStateModel.getAttributes();
        });
        Dom_1.$$(_this.element).on(_this.queryStateModel.getEventName(Model_1.Model.eventTypes.all), function () {
            _this.logger.trace('Query model changed. Update hash');
            _this.updateHashFromModel();
        });
        _this.hashchange = function () {
            _this.handleHashChange();
            _this.lastState = _this.queryStateModel.getAttributes();
        };
        _this.window.addEventListener('hashchange', _this.hashchange);
        Dom_1.$$(_this.element).on(InitializationEvents_1.InitializationEvents.nuke, function () { return _this.handleNuke(); });
        return _this;
    }
    Object.defineProperty(HistoryController.prototype, "usageAnalytics", {
        get: function () {
            return this.queryController.usageAnalytics;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(HistoryController.prototype, "hashUtils", {
        get: function () {
            return this.hashUtilsModule ? this.hashUtilsModule : HashUtils_1.HashUtils;
        },
        set: function (hashUtils) {
            this.hashUtilsModule = hashUtils;
        },
        enumerable: true,
        configurable: true
    });
    HistoryController.prototype.setState = function (state) {
        this.setHashValues(state);
    };
    HistoryController.prototype.replaceState = function (state) {
        var hash = '#' + this.hashUtils.encodeValues(state);
        this.window.location.replace(hash);
    };
    HistoryController.prototype.replaceUrl = function (url) {
        this.window.location.replace(url);
    };
    /**
     * Set the given map of key value in the hash of the URL
     * @param values
     */
    HistoryController.prototype.setHashValues = function (values) {
        this.logger.trace('Update history hash');
        var encoded = this.hashUtils.encodeValues(values);
        var hash = encoded ? "#" + encoded : '';
        var hashHasChanged = this.window.location.hash != hash;
        this.logger.trace('from', this.window.location.hash, 'to', hash);
        var location = this.window.location;
        var url = "" + location.pathname + location.search + hash;
        Iif (this.queryController.firstQuery) {
            if (hashHasChanged) {
                // Using replace avoids adding an entry in the History of the browser.
                // This means that this new URL will become the new initial URL.
                this.replaceUrl(url);
                this.logger.trace('History hash modified', hash);
            }
        }
        else if (hashHasChanged) {
            this.window.history.pushState('', '', url);
            this.logger.trace('History hash created', hash);
        }
    };
    HistoryController.prototype.debugInfo = function () {
        return {
            state: this.queryStateModel.getAttributes()
        };
    };
    HistoryController.prototype.handleHashChange = function () {
        this.logger.trace('History hash changed');
        var attributesThatGotApplied = this.updateModelFromHash();
        if (_.difference(attributesThatGotApplied, HistoryController.attributesThatDoNotTriggerQuery).length > 0) {
            if (this.lastState) {
                var differenceWithLastState = Utils_1.Utils.differenceBetweenObjects(this.queryStateModel.getAttributes(), this.lastState);
                this.mapStateDifferenceToUsageAnalyticsCall(differenceWithLastState);
            }
            this.queryController.executeQuery();
        }
    };
    HistoryController.prototype.handleNuke = function () {
        this.window.removeEventListener('hashchange', this.hashchange);
    };
    HistoryController.prototype.updateHashFromModel = function () {
        var _this = this;
        this.logger.trace('Model -> history hash');
        if (!this.willUpdateHash) {
            Defer_1.Defer.defer(function () {
                var attributes = _this.queryStateModel.getAttributes();
                _this.setHashValues(attributes);
                _this.logger.debug('Saving state to hash', attributes);
                _this.willUpdateHash = false;
            });
            this.willUpdateHash = true;
        }
    };
    HistoryController.prototype.updateModelFromHash = function () {
        var _this = this;
        this.logger.trace('History hash -> model');
        var toSet = {};
        var diff = [];
        _.each(this.queryStateModel.attributes, function (value, key, obj) {
            var valToSet = _this.getHashValue(key);
            toSet[key] = valToSet;
            if ("" + _this.queryStateModel.get(key) !== "" + valToSet) {
                diff.push(key);
            }
        });
        this.queryStateModel.setMultiple(toSet);
        return diff;
    };
    HistoryController.prototype.getHashValue = function (key) {
        Assert_1.Assert.isNonEmptyString(key);
        var value;
        try {
            var hash = this.hashUtils.getHash(this.window);
            value = this.hashUtils.getValue(key, hash);
        }
        catch (error) {
            this.logger.error("Could not parse parameter " + key + " from URI");
        }
        if (Utils_1.Utils.isUndefined(value)) {
            value = this.queryStateModel.defaultAttributes[key];
        }
        return value;
    };
    HistoryController.prototype.mapStateDifferenceToUsageAnalyticsCall = function (stateDifference) {
        // In this method, we want to only match a single analytics event for the current state change.
        // Even though it's technically possible that many property changed at the same time since the last state,
        // the backend UA service does not support multiple search cause for a single search event.
        // So we find the first event that match (if any), by order of importance (query expression > sort > facet)
        var _this = this;
        Iif (!this.usageAnalytics) {
            this.logger.warn("The query state has been modified directly in the URL and we couldn't log the proper analytics call.");
            this.logger.warn('This is caused by an history controller that has been initialized without the usage analytics parameter.');
            return;
        }
        if (QueryStateModel_1.QUERY_STATE_ATTRIBUTES.Q in stateDifference) {
            SharedAnalyticsCalls_1.logSearchBoxSubmitEvent(this.usageAnalytics);
            return;
        }
        else if (QueryStateModel_1.QUERY_STATE_ATTRIBUTES.SORT in stateDifference) {
            SharedAnalyticsCalls_1.logSortEvent(this.usageAnalytics, stateDifference[QueryStateModel_1.QUERY_STATE_ATTRIBUTES.SORT]);
            return;
        }
        else {
            // Facet id are not known at compilation time, so we iterate on all keys,
            // and try to determine if at least one is linked to a facet selection or exclusion.
            _.keys(stateDifference).forEach(function (key) {
                var facetInfo = _this.extractFacetInfoFromStateDifference(key);
                Eif (facetInfo) {
                    _this.usageAnalytics.logSearchEvent(facetInfo.actionCause, {
                        facetId: facetInfo.fieldName,
                        facetField: facetInfo.fieldName,
                        facetTitle: facetInfo.fieldName,
                        facetValue: facetInfo.valueModified
                    });
                }
            });
        }
    };
    HistoryController.prototype.extractFacetInfoFromStateDifference = function (key) {
        var regexForFacetInclusion = /^f:(?!.*:not)(.*)/;
        var matchForInclusion = regexForFacetInclusion.exec(key);
        var regexForFacetExclusion = /^f:(.*):not/;
        var matchForExclusion = regexForFacetExclusion.exec(key);
        var currentValue = this.queryStateModel.get(key) || [];
        var lastValue = this.lastState[key] || [];
        var valueRemoved = currentValue.length < lastValue.length;
        var valueModified;
        if (valueRemoved) {
            valueModified = _.first(_.difference(lastValue, currentValue));
        }
        else {
            valueModified = _.first(_.difference(currentValue, lastValue));
        }
        if (matchForInclusion) {
            var fieldName = matchForInclusion[1];
            var actionCause = void 0;
            if (valueRemoved) {
                actionCause = AnalyticsActionListMeta_1.analyticsActionCauseList.facetDeselect;
            }
            else {
                actionCause = AnalyticsActionListMeta_1.analyticsActionCauseList.facetSelect;
            }
            return {
                fieldName: fieldName,
                actionCause: actionCause,
                valueModified: valueModified
            };
        }
        Eif (matchForExclusion) {
            var fieldName = matchForExclusion[1];
            var actionCause = void 0;
            if (valueRemoved) {
                actionCause = AnalyticsActionListMeta_1.analyticsActionCauseList.facetUnexclude;
            }
            else {
                actionCause = AnalyticsActionListMeta_1.analyticsActionCauseList.facetExclude;
            }
            return {
                fieldName: fieldName,
                actionCause: actionCause,
                valueModified: valueModified
            };
        }
        return null;
    };
    HistoryController.ID = 'HistoryController';
    HistoryController.attributesThatDoNotTriggerQuery = ['quickview'];
    return HistoryController;
}(RootComponent_1.RootComponent));
exports.HistoryController = HistoryController;
 
 
/***/ }),
/* 217 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
var Template_1 = __webpack_require__(29);
var Assert_1 = __webpack_require__(12);
var TemplateFromAScriptTag_1 = __webpack_require__(304);
var HtmlTemplate = /** @class */ (function (_super) {
    __extends(HtmlTemplate, _super);
    function HtmlTemplate(element) {
        var _this = _super.call(this, function () { return element.innerHTML; }) || this;
        _this.element = element;
        _this.templateFromAScriptTag = new TemplateFromAScriptTag_1.TemplateFromAScriptTag(_this, _this.element);
        return _this;
    }
    HtmlTemplate.prototype.toHtmlElement = function () {
        var script = this.templateFromAScriptTag.toHtmlElement();
        // We don't set the type attribute for 2 reasons:
        // 1) LockerService doesn't like when we set it.
        // 2) The HTML Template is the default one.
        return script;
    };
    HtmlTemplate.prototype.getType = function () {
        return 'HtmlTemplate';
    };
    HtmlTemplate.create = function (element) {
        Assert_1.Assert.exists(element);
        return new HtmlTemplate(element);
    };
    HtmlTemplate.fromString = function (template, properties) {
        var script = TemplateFromAScriptTag_1.TemplateFromAScriptTag.fromString(template, properties);
        // We don't set the type attribute for 2 reasons:
        // 1) LockerService doesn't like when we set it.
        // 2) The HTML Template is the default one.
        return new HtmlTemplate(script);
    };
    HtmlTemplate.prototype.getTemplateInfo = function () {
        return this.element;
    };
    HtmlTemplate.mimeTypes = ['text/html', 'text/HTML'];
    return HtmlTemplate;
}(Template_1.Template));
exports.HtmlTemplate = HtmlTemplate;
 
 
/***/ }),
/* 218 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var underscore_1 = __webpack_require__(1);
var TemplateFieldsEvaluator = /** @class */ (function () {
    function TemplateFieldsEvaluator() {
    }
    TemplateFieldsEvaluator.evaluateFieldsToMatch = function (toMatches, result) {
        var templateShouldBeLoaded = true;
        if (!toMatches)
            return true;
        underscore_1.each(toMatches, function (toMatch) {
            var matchAtLeastOnce = false;
            if (!toMatch.values) {
                matchAtLeastOnce = result.raw[toMatch.field] != null;
            }
            else {
                underscore_1.each(toMatch.values, function (value) {
                    if (!matchAtLeastOnce) {
                        var fieldValue = result.raw[toMatch.field];
                        var fieldValues = TemplateFieldsEvaluator.getFieldValueAsArray(fieldValue);
                        matchAtLeastOnce = TemplateFieldsEvaluator.isMatch(fieldValues, value);
                    }
                });
            }
            templateShouldBeLoaded = templateShouldBeLoaded && (toMatch.reverseCondition ? !matchAtLeastOnce : matchAtLeastOnce);
        });
        return templateShouldBeLoaded;
    };
    TemplateFieldsEvaluator.getFieldValueAsArray = function (fieldValue) {
        return typeof fieldValue === 'string' ? [fieldValue] : fieldValue;
    };
    TemplateFieldsEvaluator.isMatch = function (fieldValues, value) {
        return underscore_1.find(fieldValues, function (fieldValue) { return fieldValue.toLowerCase() == value.toLowerCase(); }) != undefined;
    };
    return TemplateFieldsEvaluator;
}());
exports.TemplateFieldsEvaluator = TemplateFieldsEvaluator;
 
 
/***/ }),
/* 219 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __assign = (this && this.__assign) || Object.assign || function(t) {
    for (var s, i = 1, n = arguments.length; i < n; i++) {
        s = arguments[i];
        for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
            t[p] = s[p];
    }
    return t;
};
Object.defineProperty(exports, "__esModule", { value: true });
var ComponentOptions_1 = __webpack_require__(13);
var LocalStorageUtils_1 = __webpack_require__(96);
var ResultListEvents_1 = __webpack_require__(48);
var DebugEvents_1 = __webpack_require__(296);
var Dom_1 = __webpack_require__(0);
var StringUtils_1 = __webpack_require__(34);
var SearchEndpoint_1 = __webpack_require__(61);
var RootComponent_1 = __webpack_require__(133);
var BaseComponent_1 = __webpack_require__(113);
var ExternalModulesShim_1 = __webpack_require__(39);
var Globalize = __webpack_require__(28);
var _ = __webpack_require__(1);
__webpack_require__(1015);
var Strings_1 = __webpack_require__(4);
var DebugHeader_1 = __webpack_require__(483);
var QueryEvents_1 = __webpack_require__(14);
var DebugForResult_1 = __webpack_require__(484);
var GlobalExports_1 = __webpack_require__(10);
var Template_1 = __webpack_require__(29);
var Debug = /** @class */ (function (_super) {
    __extends(Debug, _super);
    function Debug(element, bindings, options, ModalBox) {
        if (ModalBox === void 0) { ModalBox = ExternalModulesShim_1.ModalBox; }
        var _this = _super.call(this, element, Debug.ID) || this;
        _this.element = element;
        _this.bindings = bindings;
        _this.options = options;
        _this.ModalBox = ModalBox;
        _this.opened = false;
        _this.options = ComponentOptions_1.ComponentOptions.initComponentOptions(element, Debug, options);
        // This gets debounced so the following logic works correctly :
        // When you alt dbl click on a component, it's possible to add/merge multiple debug info source together
        // They will be merged together in this.addInfoToDebugPanel
        // Then, openModalBox, even if it's called from multiple different caller will be opened only once all the info has been merged together correctly
        _this.showDebugPanel = _.debounce(function () { return _this.openModalBox(); }, 100);
        Dom_1.$$(_this.element).on(ResultListEvents_1.ResultListEvents.newResultDisplayed, function (e, args) {
            return _this.handleNewResultDisplayed(args);
        });
        Dom_1.$$(_this.element).on(DebugEvents_1.DebugEvents.showDebugPanel, function (e, args) { return _this.handleShowDebugPanel(args); });
        Dom_1.$$(_this.element).on(QueryEvents_1.QueryEvents.querySuccess, function (e, args) { return _this.handleQuerySuccess(args); });
        Dom_1.$$(_this.element).on(QueryEvents_1.QueryEvents.newQuery, function () { return _this.handleNewQuery(); });
        _this.localStorageDebug = new LocalStorageUtils_1.LocalStorageUtils('DebugPanel');
        _this.collapsedSections = _this.localStorageDebug.load() || [];
        return _this;
    }
    Debug.prototype.debugInfo = function () {
        return null;
    };
    Debug.prototype.addInfoToDebugPanel = function (info) {
        Eif (this.stackDebug == null) {
            this.stackDebug = {};
        }
        this.stackDebug = __assign({}, this.stackDebug, info);
    };
    Debug.prototype.handleNewResultDisplayed = function (args) {
        var _this = this;
        Dom_1.$$(args.item).on('dblclick', function (e) {
            _this.handleResultDoubleClick(e, args);
        });
    };
    Debug.prototype.handleResultDoubleClick = function (e, args) {
        if (e.altKey) {
            var index_1 = args.result.index;
            var template = args.item['template'];
            var findResult = function (results) {
                return results != null ? _.find(results.results, function (result) { return result.index == index_1; }) : args.result;
            };
            var debugInfo = __assign({}, new DebugForResult_1.DebugForResult(this.bindings).generateDebugInfoForResult(args.result), { findResult: findResult, template: this.templateToJson(template) });
            this.addInfoToDebugPanel(debugInfo);
            this.showDebugPanel();
        }
    };
    Debug.prototype.handleQuerySuccess = function (args) {
        Iif (this.opened) {
            if (this.stackDebug && this.stackDebug.findResult) {
                this.addInfoToDebugPanel(new DebugForResult_1.DebugForResult(this.bindings).generateDebugInfoForResult(this.stackDebug.findResult(args.results)));
            }
            this.redrawDebugPanel();
            this.hideAnimationDuringQuery();
        }
    };
    Debug.prototype.handleNewQuery = function () {
        Iif (this.opened) {
            this.showAnimationDuringQuery();
        }
    };
    Debug.prototype.handleShowDebugPanel = function (args) {
        this.addInfoToDebugPanel(args);
        this.showDebugPanel();
    };
    Debug.prototype.buildStackPanel = function () {
        var _this = this;
        var body = Dom_1.$$('div', {
            className: 'coveo-debug'
        });
        var keys = _.chain(this.stackDebug)
            .omit('findResult') // findResult is a duplicate of the simpler "result" key used to retrieve the results only
            .keys()
            .value();
        // TODO Can't chain this properly due to a bug in underscore js definition file.
        // Yep, A PR is opened to DefinitelyTyped.
        var keysPaired = _.pairs(keys);
        keysPaired = keysPaired.sort(function (a, b) {
            var indexA = _.indexOf(Debug.customOrder, a[1]);
            var indexB = _.indexOf(Debug.customOrder, b[1]);
            if (indexA != -1 && indexB != -1) {
                return indexA - indexB;
            }
            if (indexA != -1) {
                return -1;
            }
            if (indexB != -1) {
                return 1;
            }
            return a[0] - b[0];
        });
        var json = {};
        _.forEach(keysPaired, function (key) {
            var section = _this.buildSection(key[1]);
            var build = _this.buildStackPanelSection(_this.stackDebug[key[1]], _this.stackDebug['result']);
            section.container.append(build.section);
            if (build.json != null) {
                json[key[1]] = build.json;
            }
            body.append(section.dom.el);
        });
        return {
            body: body.el,
            json: json
        };
    };
    Debug.prototype.getModalBody = function () {
        if (this.modalBox && this.modalBox.content) {
            return Dom_1.$$(this.modalBox.content).find('.coveo-modal-body');
        }
        return null;
    };
    Debug.prototype.redrawDebugPanel = function () {
        var build = this.buildStackPanel();
        var body = this.getModalBody();
        if (body) {
            Dom_1.$$(body).empty();
            Dom_1.$$(body).append(build.body);
        }
        this.updateSearchFunctionnality(build);
    };
    Debug.prototype.openModalBox = function () {
        var _this = this;
        var build = this.buildStackPanel();
        this.opened = true;
        this.modalBox = this.ModalBox.open(build.body, {
            title: Strings_1.l('Debug'),
            className: 'coveo-debug',
            titleClose: true,
            overlayClose: true,
            validation: function () {
                _this.onCloseModalBox();
                return true;
            },
            sizeMod: 'big',
            body: this.bindings.root
        });
        var title = Dom_1.$$(this.modalBox.wrapper).find('.coveo-modal-header');
        Eif (title) {
            Eif (!this.debugHeader) {
                this.debugHeader = new DebugHeader_1.DebugHeader(this, title, function (value) { return _this.search(value, build.body); }, this.stackDebug);
            }
            else {
                this.debugHeader.moveTo(title);
                this.updateSearchFunctionnality(build);
            }
        }
        else {
            this.logger.warn('No title found in modal box.');
        }
    };
    Debug.prototype.updateSearchFunctionnality = function (build) {
        var _this = this;
        if (this.debugHeader) {
            this.debugHeader.setNewInfoToDebug(this.stackDebug);
            this.debugHeader.setSearch(function (value) { return _this.search(value, build.body); });
        }
    };
    Debug.prototype.onCloseModalBox = function () {
        this.stackDebug = null;
        this.opened = false;
    };
    Debug.prototype.buildStackPanelSection = function (value, results) {
        if (value instanceof HTMLElement) {
            return { section: value };
        }
        else if (_.isFunction(value)) {
            return this.buildStackPanelSection(value(results), results);
        }
        var json = this.toJson(value);
        return { section: this.buildProperty(json), json: json };
    };
    Debug.prototype.findInProperty = function (element, value) {
        var _this = this;
        var wrappedElement = Dom_1.$$(element);
        var match = element['label'].indexOf(value) != -1;
        if (match) {
            this.highlightSearch(element['labelDom'], value);
        }
        else {
            this.removeHighlightSearch(element['labelDom']);
        }
        if (wrappedElement.hasClass('coveo-property-object')) {
            wrappedElement.toggleClass('coveo-search-match', match);
            var children = element['buildKeys']();
            var submatch_1 = false;
            _.each(children, function (child) {
                submatch_1 = _this.findInProperty(child, value) || submatch_1;
            });
            wrappedElement.toggleClass('coveo-search-submatch', submatch_1);
            return match || submatch_1;
        }
        else {
            if (element['values'].indexOf(value) != -1) {
                this.highlightSearch(element['valueDom'], value);
                match = true;
            }
            else {
                this.removeHighlightSearch(element['valueDom']);
            }
            wrappedElement.toggleClass('coveo-search-match', match);
        }
        return match;
    };
    Debug.prototype.buildSection = function (id) {
        var _this = this;
        var dom = Dom_1.$$('div', {
            className: "coveo-section coveo-" + id + "-section"
        });
        var header = Dom_1.$$('div', {
            className: 'coveo-section-header'
        });
        Dom_1.$$(header).text(id);
        dom.append(header.el);
        var container = Dom_1.$$('div', {
            className: 'coveo-section-container'
        });
        dom.append(container.el);
        Iif (_.contains(this.collapsedSections, id)) {
            Dom_1.$$(dom).addClass('coveo-debug-collapsed');
        }
        header.on('click', function () {
            Dom_1.$$(dom).toggleClass('coveo-debug-collapsed');
            if (_.contains(_this.collapsedSections, id)) {
                _this.collapsedSections = _.without(_this.collapsedSections, id);
            }
            else {
                _this.collapsedSections.push(id);
            }
            _this.localStorageDebug.save(_this.collapsedSections);
        });
        return {
            dom: dom,
            header: header,
            container: container
        };
    };
    Debug.prototype.buildProperty = function (value, label) {
        Iif (value instanceof Promise) {
            return this.buildPromise(value, label);
        }
        else if ((_.isArray(value) || _.isObject(value)) && !_.isString(value)) {
            return this.buildObjectProperty(value, label);
        }
        else {
            return this.buildBasicProperty(value, label);
        }
    };
    Debug.prototype.buildPromise = function (promise, label) {
        var _this = this;
        var dom = Dom_1.$$('div', {
            className: 'coveo-property coveo-property-promise'
        });
        promise.then(function (value) {
            var resolvedDom = _this.buildProperty(value, label);
            dom.replaceWith(resolvedDom);
        });
        return dom.el;
    };
    Debug.prototype.buildObjectProperty = function (object, label) {
        var _this = this;
        var dom = Dom_1.$$('div', {
            className: 'coveo-property coveo-property-object'
        });
        var valueContainer = Dom_1.$$('div', {
            className: 'coveo-property-value'
        });
        var keys = _.keys(object);
        Eif (!_.isArray(object)) {
            keys.sort();
        }
        var children;
        var buildKeys = function () {
            Eif (children == null) {
                children = [];
                _.each(keys, function (key) {
                    var property = _this.buildProperty(object[key], key);
                    Eif (property != null) {
                        children.push(property);
                        valueContainer.append(property);
                    }
                });
            }
            return children;
        };
        dom.el['buildKeys'] = buildKeys;
        if (label != null) {
            var labelDom = Dom_1.$$('div', {
                className: 'coveo-property-label'
            });
            labelDom.text(label);
            dom.el['labelDom'] = labelDom.el;
            dom.append(labelDom.el);
            Eif (keys.length != 0) {
                dom.addClass('coveo-collapsible');
                labelDom.on('click', function () {
                    buildKeys();
                    var className = dom.el.className.split(/\s+/);
                    if (_.contains(className, 'coveo-expanded')) {
                        className = _.without(className, 'coveo-expanded');
                    }
                    else {
                        className.push('coveo-expanded');
                    }
                    dom.el.className = className.join(' ');
                });
            }
        }
        else {
            buildKeys();
        }
        Iif (keys.length == 0) {
            var className = _.without(dom.el.className.split(/\s+/), 'coveo-property-object');
            className.push('coveo-property-basic');
            dom.el.className = className.join(' ');
            if (_.isArray(object)) {
                valueContainer.setHtml('[]');
            }
            else {
                valueContainer.setHtml('{}');
            }
            dom.el['values'] = '';
        }
        dom.el['label'] = label != null ? label.toLowerCase() : '';
        dom.append(valueContainer.el);
        return dom.el;
    };
    Debug.prototype.buildBasicProperty = function (value, label) {
        var _this = this;
        var dom = Dom_1.$$('div', {
            className: 'coveo-property coveo-property-basic'
        });
        Eif (label != null) {
            var labelDom = Dom_1.$$('div', {
                className: 'coveo-property-label'
            });
            labelDom.text(label);
            dom.append(labelDom.el);
            dom.el['labelDom'] = labelDom.el;
        }
        var stringValue = value != null ? value.toString() : String(value);
        if (value != null && value['ref'] != null) {
            value = value['ref'];
        }
        var valueDom = Dom_1.$$('div');
        valueDom.text(stringValue);
        valueDom.on('dblclick', function () {
            _this.selectElementText(valueDom.el);
        });
        dom.append(valueDom.el);
        dom.el['valueDom'] = valueDom;
        var className = ['coveo-property-value'];
        if (_.isString(value)) {
            className.push('coveo-property-value-string');
        }
        if (_.isNull(value) || _.isUndefined(value)) {
            className.push('coveo-property-value-null');
        }
        if (_.isNumber(value)) {
            className.push('coveo-property-value-number');
        }
        if (_.isBoolean(value)) {
            className.push('coveo-property-value-boolean');
        }
        if (_.isDate(value)) {
            className.push('coveo-property-value-date');
        }
        if (_.isObject(value)) {
            className.push('coveo-property-value-object');
        }
        Iif (_.isArray(value)) {
            className.push('coveo-property-value-array');
        }
        valueDom.el.className = className.join(' ');
        dom.el['label'] = label != null ? label.toLowerCase() : '';
        dom.el['values'] = stringValue.toLowerCase();
        return dom.el;
    };
    Debug.prototype.toJson = function (value, depth, done) {
        var _this = this;
        if (depth === void 0) { depth = 0; }
        if (done === void 0) { done = []; }
        Iif (value instanceof BaseComponent_1.BaseComponent || value instanceof SearchEndpoint_1.SearchEndpoint) {
            return this.componentToJson(value, depth);
        }
        Iif (value instanceof HTMLElement) {
            return this.htmlToJson(value);
        }
        Iif (value instanceof Template_1.Template) {
            return this.templateToJson(value);
        }
        Iif (value instanceof Promise) {
            return value.then(function (value) {
                return _this.toJson(value, depth, done);
            });
        }
        Iif (value == window) {
            return this.toJsonRef(value);
        }
        if (_.isArray(value) || _.isObject(value)) {
            Iif (_.contains(done, value)) {
                return this.toJsonRef(value, '< RECURSIVE >');
            }
            else Iif (depth >= Debug.maxDepth) {
                return this.toJsonRef(value);
            }
            else Iif (_.isArray(value)) {
                return _.map(value, function (subValue, key) { return _this.toJson(subValue, depth + 1, done.concat([value])); });
            }
            else if (_.isDate(value)) {
                return this.toJsonRef(value, Globalize.format(value, 'F'));
            }
            else {
                var result_1 = {};
                _.each(value, function (subValue, key) {
                    result_1[key] = _this.toJson(subValue, depth + 1, done.concat([value]));
                });
                result_1['ref'];
                return result_1;
            }
        }
        return value;
    };
    Debug.prototype.toJsonRef = function (value, stringValue) {
        stringValue = new String(stringValue || value);
        stringValue['ref'] = value;
        return stringValue;
    };
    Debug.prototype.componentToJson = function (value, depth) {
        if (depth === void 0) { depth = 0; }
        var options = _.keys(value['options']);
        if (options.length > 0) {
            return this.toJson(value['options'], depth);
        }
        else {
            return this.toJsonRef(value['options'], new String('No options'));
        }
    };
    Debug.prototype.htmlToJson = function (value) {
        if (value == null) {
            return undefined;
        }
        return {
            tagName: value.tagName,
            id: value.id,
            classList: value.className.split(/\s+/)
        };
    };
    Debug.prototype.templateToJson = function (template) {
        if (template == null) {
            return null;
        }
        var element = template['element'];
        var templateObject = {
            type: template.getType()
        };
        if (element != null) {
            templateObject.id = element.id;
            templateObject.condition = element.attributes['data-condition'];
            templateObject.content = element.innerText;
        }
        return templateObject;
    };
    Debug.prototype.selectElementText = function (el) {
        if (window.getSelection && document.createRange) {
            var selection = window.getSelection();
            var range = document.createRange();
            range.selectNodeContents(el);
            selection.removeAllRanges();
            selection.addRange(range);
        }
        else if ('createTextRange' in document.body) {
            var textRange = document.body['createTextRange']();
            textRange.moveToElementText(el);
            textRange.select();
        }
    };
    Debug.prototype.search = function (value, body) {
        var _this = this;
        if (_.isEmpty(value)) {
            Dom_1.$$(body)
                .findAll('.coveo-search-match, .coveo-search-submatch')
                .forEach(function (el) {
                Dom_1.$$(el).removeClass('coveo-search-match, coveo-search-submatch');
            });
            Dom_1.$$(body).removeClass('coveo-searching');
        }
        else {
            Dom_1.$$(body).addClass('coveo-searching-loading');
            setTimeout(function () {
                var rootProperties = Dom_1.$$(body).findAll('.coveo-section .coveo-section-container > .coveo-property');
                _.each(rootProperties, function (element) {
                    _this.findInProperty(element, value);
                });
                Dom_1.$$(body).addClass('coveo-searching');
                Dom_1.$$(body).removeClass('coveo-searching-loading');
            });
        }
    };
    Debug.prototype.highlightSearch = function (elementToSearch, search) {
        var asHTMLElement;
        if (elementToSearch instanceof HTMLElement) {
            asHTMLElement = elementToSearch;
        }
        else if (elementToSearch instanceof Dom_1.Dom) {
            asHTMLElement = elementToSearch.el;
        }
        if (asHTMLElement != null && asHTMLElement.innerText != null) {
            var match = asHTMLElement.innerText.split(new RegExp('(?=' + StringUtils_1.StringUtils.regexEncode(search) + ')', 'gi'));
            asHTMLElement.innerHTML = '';
            match.forEach(function (value) {
                var regex = new RegExp('(' + StringUtils_1.StringUtils.regexEncode(search) + ')', 'i');
                var group = value.match(regex);
                var span;
                if (group != null) {
                    span = Dom_1.$$('span', {
                        className: 'coveo-debug-highlight'
                    });
                    span.text(group[1]);
                    asHTMLElement.appendChild(span.el);
                    span = Dom_1.$$('span');
                    span.text(value.substr(group[1].length));
                    asHTMLElement.appendChild(span.el);
                }
                else {
                    span = Dom_1.$$('span');
                    span.text(value);
                    asHTMLElement.appendChild(span.el);
                }
            });
        }
    };
    Debug.prototype.removeHighlightSearch = function (element) {
        if (element != null) {
            element.innerHTML = element.innerText;
        }
    };
    Debug.prototype.showAnimationDuringQuery = function () {
        Dom_1.$$(this.modalBox.content).addClass('coveo-debug-loading');
    };
    Debug.prototype.hideAnimationDuringQuery = function () {
        Dom_1.$$(this.modalBox.content).removeClass('coveo-debug-loading');
    };
    Debug.ID = 'Debug';
    Debug.doExport = function () {
        GlobalExports_1.exportGlobally({
            Debug: Debug
        });
    };
    Debug.options = {
        enableDebug: ComponentOptions_1.ComponentOptions.buildBooleanOption({ defaultValue: false })
    };
    Debug.customOrder = ['error', 'queryDuration', 'result', 'fields', 'rankingInfo', 'template', 'query', 'results', 'state'];
    Debug.durationKeys = ['indexDuration', 'proxyDuration', 'clientDuration', 'duration'];
    Debug.maxDepth = 10;
    return Debug;
}(RootComponent_1.RootComponent));
exports.Debug = Debug;
 
 
/***/ }),
/* 220 */
/***/ (function(module, exports, __webpack_require__) {
 
var isObject = __webpack_require__(308);
module.exports = function (it) {
  Iif (!isObject(it)) throw TypeError(it + ' is not an object!');
  return it;
};
 
 
/***/ }),
/* 221 */
/***/ (function(module, exports, __webpack_require__) {
 
// Thank's IE8 for his funny defineProperty
module.exports = !__webpack_require__(309)(function () {
  return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;
});
 
 
/***/ }),
/* 222 */
/***/ (function(module, exports) {
 
var hasOwnProperty = {}.hasOwnProperty;
module.exports = function (it, key) {
  return hasOwnProperty.call(it, key);
};
 
 
/***/ }),
/* 223 */
/***/ (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;
};
 
 
/***/ }),
/* 224 */
/***/ (function(module, exports) {
 
module.exports = {};
 
 
/***/ }),
/* 225 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var underscore_1 = __webpack_require__(1);
var StringUtils_1 = __webpack_require__(34);
var Dom_1 = __webpack_require__(0);
exports.buildListOfTermsElement = function (weightPerTerm) {
    var listItems = underscore_1.map(weightPerTerm, function (value, key) {
        return {
            dt: Dom_1.$$('dt', {
                className: 'coveo-relevance-inspector-dt'
            }, "" + key),
            dd: Dom_1.$$('dd', {
                className: 'coveo-relevance-inspector-dd'
            }, "" + value)
        };
    });
    var total = underscore_1.reduce(weightPerTerm, function (memo, value) { return memo + value; }, 0);
    var list = Dom_1.$$('dl');
    listItems.forEach(function (item) {
        list.append(item.dt.el);
        list.append(item.dd.el);
    });
    list.append(Dom_1.$$('dt', { className: 'coveo-relevance-inspector-dt' }, "Total").el);
    list.append(Dom_1.$$('dd', { className: 'coveo-relevance-inspector-dd coveo-relevance-inspector-highlight' }, "" + total).el);
    return list;
};
exports.parseRankingInfo = function (value) {
    var REGEX_EXTRACT_DOCUMENT_WEIGHTS = /Document weights:\n((?:.)*?)\n+/g;
    var REGEX_EXTRACT_TERMS_WEIGHTS = /Terms weights:\n((?:.|\n)*)\n+/g;
    var REGEX_EXTRACT_TOTAL_WEIGHTS = /Total weight: ([0-9]+)/g;
    if (value) {
        var docWeightsRegexResult = REGEX_EXTRACT_DOCUMENT_WEIGHTS.exec(value);
        var termsWeightRegexResult = REGEX_EXTRACT_TERMS_WEIGHTS.exec(value);
        var totalWeigthRegexResult = REGEX_EXTRACT_TOTAL_WEIGHTS.exec(value);
        var qreWeights = parseQREWeights(value);
        var documentWeights = parseWeights(docWeightsRegexResult ? docWeightsRegexResult[1] : null);
        var termsWeight = parseTermsWeights(termsWeightRegexResult);
        var totalWeight = totalWeigthRegexResult ? Number(totalWeigthRegexResult[1]) : null;
        return {
            documentWeights: documentWeights,
            termsWeight: termsWeight,
            totalWeight: totalWeight,
            qreWeights: qreWeights
        };
    }
    return null;
};
var parseWeights = function (value) {
    var REGEX_EXTRACT_LIST_OF_WEIGHTS = /(\w+(?:\s\w+)*): ([-0-9]+)/g;
    var REGEX_EXTRACT_WEIGHT_GROUP = /^(\w+(?:\s\w+)*): ([-0-9]+)$/;
    Eif (value) {
        var listOfWeight = value.match(REGEX_EXTRACT_LIST_OF_WEIGHTS);
        Eif (listOfWeight) {
            return underscore_1.object(listOfWeight.map(function (weight) {
                var weightGroup = weight.match(REGEX_EXTRACT_WEIGHT_GROUP);
                Eif (weightGroup) {
                    var weightAppliedOn = weightGroup[1];
                    var weightValue = weightGroup[2];
                    return [weightAppliedOn, Number(weightValue)];
                }
                return null;
            }));
        }
    }
    return null;
};
var parseTermsWeights = function (termsWeight) {
    var REGEX_EXTRACT_GROUP_OF_TERMS = /((?:[^:]+: [0-9]+, [0-9]+; )+)\n((?:\w+: [0-9]+; )+)/g;
    var REGEX_EXTRACT_SINGLE_TERM = /([^:]+): ([0-9]+), ([0-9]+); /g;
    if (termsWeight && termsWeight[1]) {
        var terms = StringUtils_1.StringUtils.match(termsWeight[1], REGEX_EXTRACT_GROUP_OF_TERMS);
        return underscore_1.object(underscore_1.map(terms, function (term) {
            var words = underscore_1.object(underscore_1.map(StringUtils_1.StringUtils.match(term[1], REGEX_EXTRACT_SINGLE_TERM), function (word) {
                return [
                    word[1],
                    {
                        Correlation: Number(word[2]),
                        'TF-IDF': Number(word[3])
                    }
                ];
            }));
            var weights = parseWeights(term[2]);
            return [
                underscore_1.keys(words).join(', '),
                {
                    terms: words,
                    Weights: weights
                }
            ];
        }));
    }
    return null;
};
var parseQREWeights = function (value) {
    var REGEX_EXTRACT_QRE_WEIGHTS = /(Expression:\s".*")\sScore:\s(?!0)([-0-9]+)\n+/g;
    var qreWeightsRegexResult = REGEX_EXTRACT_QRE_WEIGHTS.exec(value);
    var qreWeights = [];
    while (qreWeightsRegexResult) {
        qreWeights.push({
            expression: qreWeightsRegexResult[1],
            score: parseInt(qreWeightsRegexResult[2], 10)
        });
        qreWeightsRegexResult = REGEX_EXTRACT_QRE_WEIGHTS.exec(value);
    }
    return qreWeights;
};
 
 
/***/ }),
/* 226 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var ColorUtils = /** @class */ (function () {
    function ColorUtils() {
    }
    ColorUtils.hsvToRgb = function (h, s, v) {
        var r, g, b;
        var i = Math.floor(h * 6);
        var f = h * 6 - i;
        var p = v * (1 - s);
        var q = v * (1 - f * s);
        var t = v * (1 - (1 - f) * s);
        switch (i % 6) {
            case 0:
                (r = v), (g = t), (b = p);
                break;
            case 1:
                (r = q), (g = v), (b = p);
                break;
            case 2:
                (r = p), (g = v), (b = t);
                break;
            case 3:
                (r = p), (g = q), (b = v);
                break;
            case 4:
                (r = t), (g = p), (b = v);
                break;
            case 5:
                (r = v), (g = p), (b = q);
                break;
        }
        return [Math.round(r * 255), Math.round(g * 255), Math.round(b * 255)];
    };
    ColorUtils.rgbToHsv = function (r, g, b) {
        (r = r / 255), (g = g / 255), (b = b / 255);
        var max = Math.max(r, g, b), min = Math.min(r, g, b);
        var h, s, v = max;
        var d = max - min;
        s = max == 0 ? 0 : d / max;
        if (max == min) {
            h = 0; // achromatic
        }
        else {
            switch (max) {
                case r:
                    h = (g - b) / d + (g < b ? 6 : 0);
                    break;
                case g:
                    h = (b - r) / d + 2;
                    break;
                case b:
                    h = (r - g) / d + 4;
                    break;
            }
            h /= 6;
        }
        return [h, s, v];
    };
    return ColorUtils;
}());
exports.ColorUtils = ColorUtils;
 
 
/***/ }),
/* 227 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Dom_1 = __webpack_require__(0);
var PopupVerticalAlignment;
(function (PopupVerticalAlignment) {
    PopupVerticalAlignment[PopupVerticalAlignment["TOP"] = 0] = "TOP";
    PopupVerticalAlignment[PopupVerticalAlignment["MIDDLE"] = 1] = "MIDDLE";
    PopupVerticalAlignment[PopupVerticalAlignment["BOTTOM"] = 2] = "BOTTOM";
    PopupVerticalAlignment[PopupVerticalAlignment["INNERTOP"] = 3] = "INNERTOP";
    PopupVerticalAlignment[PopupVerticalAlignment["INNERBOTTOM"] = 4] = "INNERBOTTOM";
})(PopupVerticalAlignment = exports.PopupVerticalAlignment || (exports.PopupVerticalAlignment = {}));
var PopupHorizontalAlignment;
(function (PopupHorizontalAlignment) {
    PopupHorizontalAlignment[PopupHorizontalAlignment["LEFT"] = 0] = "LEFT";
    PopupHorizontalAlignment[PopupHorizontalAlignment["CENTER"] = 1] = "CENTER";
    PopupHorizontalAlignment[PopupHorizontalAlignment["RIGHT"] = 2] = "RIGHT";
    PopupHorizontalAlignment[PopupHorizontalAlignment["INNERLEFT"] = 3] = "INNERLEFT";
    PopupHorizontalAlignment[PopupHorizontalAlignment["INNERRIGHT"] = 4] = "INNERRIGHT";
})(PopupHorizontalAlignment = exports.PopupHorizontalAlignment || (exports.PopupHorizontalAlignment = {}));
var PopupUtils = /** @class */ (function () {
    function PopupUtils() {
    }
    PopupUtils.positionPopup = function (popUp, nextTo, boundary, desiredPosition, appendTo, checkForBoundary) {
        if (checkForBoundary === void 0) { checkForBoundary = 0; }
        popUp.style.position = 'absolute';
        Iif (appendTo) {
            Dom_1.$$(appendTo).append(popUp);
        }
        desiredPosition.verticalOffset = desiredPosition.verticalOffset ? desiredPosition.verticalOffset : 0;
        desiredPosition.horizontalOffset = desiredPosition.horizontalOffset ? desiredPosition.horizontalOffset : 0;
        var popUpPosition = Dom_1.$$(nextTo).offset();
        PopupUtils.basicVerticalAlignment(popUpPosition, popUp, nextTo, desiredPosition);
        PopupUtils.basicHorizontalAlignment(popUpPosition, popUp, nextTo, desiredPosition);
        PopupUtils.finalAdjustement(Dom_1.$$(popUp).offset(), popUpPosition, popUp, desiredPosition);
        var popUpBoundary = PopupUtils.getBoundary(popUp);
        var boundaryPosition = PopupUtils.getBoundary(boundary);
        if (checkForBoundary < 2) {
            var checkBoundary = PopupUtils.checkForOutOfBoundary(popUpBoundary, boundaryPosition);
            Iif (checkBoundary.horizontal != 'ok' && desiredPosition.horizontalClip === true) {
                var width = popUp.offsetWidth;
                if (popUpBoundary.left < boundaryPosition.left) {
                    width -= boundaryPosition.left - popUpBoundary.left;
                }
                if (popUpBoundary.right > boundaryPosition.right) {
                    width -= popUpBoundary.right - boundaryPosition.right;
                }
                popUp.style.width = width + 'px';
                checkBoundary.horizontal = 'ok';
            }
            Eif (checkBoundary.vertical != 'ok' || checkBoundary.horizontal != 'ok') {
                var newDesiredPosition = PopupUtils.alignInsideBoundary(desiredPosition, checkBoundary);
                PopupUtils.positionPopup(popUp, nextTo, boundary, newDesiredPosition, appendTo, checkForBoundary + 1);
            }
        }
    };
    PopupUtils.finalAdjustement = function (popUpOffSet, popUpPosition, popUp, desiredPosition) {
        var position = Dom_1.$$(popUp).position();
        popUp.style.top = position.top + desiredPosition.verticalOffset - (popUpOffSet.top - popUpPosition.top) + 'px';
        popUp.style.left = position.left + desiredPosition.horizontalOffset - (popUpOffSet.left - popUpPosition.left) + 'px';
    };
    PopupUtils.basicVerticalAlignment = function (popUpPosition, popUp, nextTo, desiredPosition) {
        switch (desiredPosition.vertical) {
            case PopupVerticalAlignment.TOP:
                popUpPosition.top -= popUp.offsetHeight;
                break;
            case PopupVerticalAlignment.BOTTOM:
                popUpPosition.top += nextTo.offsetHeight;
                break;
            case PopupVerticalAlignment.MIDDLE:
                popUpPosition.top -= popUp.offsetHeight / 3;
            case PopupVerticalAlignment.INNERTOP:
                break; // Nothing to do, it's the default alignment normally
            case PopupVerticalAlignment.INNERBOTTOM:
                popUpPosition.top -= popUp.offsetHeight - nextTo.offsetHeight;
                break;
            default:
                break;
        }
    };
    PopupUtils.basicHorizontalAlignment = function (popUpPosition, popUp, nextTo, desiredPosition) {
        switch (desiredPosition.horizontal) {
            case PopupHorizontalAlignment.LEFT:
                popUpPosition.left -= popUp.offsetWidth;
                break;
            case PopupHorizontalAlignment.RIGHT:
                popUpPosition.left += nextTo.offsetWidth;
                break;
            case PopupHorizontalAlignment.CENTER:
                popUpPosition.left += PopupUtils.offSetToAlignCenter(popUp, nextTo);
                break;
            case PopupHorizontalAlignment.INNERLEFT:
                break; // Nothing to do, it's the default alignment normally
            case PopupHorizontalAlignment.INNERRIGHT:
                popUpPosition.left -= popUp.offsetWidth - nextTo.offsetWidth;
                break;
            default:
                break;
        }
    };
    PopupUtils.alignInsideBoundary = function (oldPosition, checkBoundary) {
        var newDesiredPosition = oldPosition;
        Eif (checkBoundary.horizontal == 'left') {
            newDesiredPosition.horizontal = PopupHorizontalAlignment.RIGHT;
        }
        Iif (checkBoundary.horizontal == 'right') {
            newDesiredPosition.horizontal = PopupHorizontalAlignment.LEFT;
        }
        Eif (checkBoundary.vertical == 'top') {
            newDesiredPosition.vertical = PopupVerticalAlignment.BOTTOM;
        }
        Iif (checkBoundary.vertical == 'bottom') {
            newDesiredPosition.vertical = PopupVerticalAlignment.TOP;
        }
        return newDesiredPosition;
    };
    PopupUtils.offSetToAlignCenter = function (popUp, nextTo) {
        return (nextTo.offsetWidth - popUp.offsetWidth) / 2;
    };
    PopupUtils.getBoundary = function (element) {
        var boundaryOffset = Dom_1.$$(element).offset();
        var toAddVertically;
        if (element.tagName.toLowerCase() == 'body') {
            toAddVertically = Math.max(element.scrollHeight, element.offsetHeight);
        }
        else Iif (element.tagName.toLowerCase() == 'html') {
            toAddVertically = Math.max(element.clientHeight, element.scrollHeight, element.offsetHeight);
        }
        else {
            toAddVertically = element.offsetHeight;
        }
        return {
            top: boundaryOffset.top,
            left: boundaryOffset.left,
            right: boundaryOffset.left + element.offsetWidth,
            bottom: boundaryOffset.top + toAddVertically
        };
    };
    PopupUtils.checkForOutOfBoundary = function (popUpBoundary, boundary) {
        var ret = {
            vertical: 'ok',
            horizontal: 'ok'
        };
        Eif (popUpBoundary.top < boundary.top) {
            ret.vertical = 'top';
        }
        Iif (popUpBoundary.bottom > boundary.bottom) {
            ret.vertical = 'bottom';
        }
        Eif (popUpBoundary.left < boundary.left) {
            ret.horizontal = 'left';
        }
        Iif (popUpBoundary.right > boundary.right) {
            ret.horizontal = 'right';
        }
        return ret;
    };
    return PopupUtils;
}());
exports.PopupUtils = PopupUtils;
 
 
/***/ }),
/* 228 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __assign = (this && this.__assign) || Object.assign || function(t) {
    for (var s, i = 1, n = arguments.length; i < n; i++) {
        s = arguments[i];
        for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
            t[p] = s[p];
    }
    return t;
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { Iif (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        Iif (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            Iif (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
            Iif (y = 0, t) op = [0, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    Eif (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        Iif (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
Object.defineProperty(exports, "__esModule", { value: true });
var TableBuilder_1 = __webpack_require__(62);
var underscore_1 = __webpack_require__(1);
var GenericValueOutput_1 = __webpack_require__(91);
var UtilsModules_1 = __webpack_require__(67);
var QueryBuilder_1 = __webpack_require__(24);
var PopupUtils_1 = __webpack_require__(227);
var AvailableFieldsTable = /** @class */ (function () {
    function AvailableFieldsTable(bindings) {
        this.bindings = bindings;
    }
    AvailableFieldsTable.prototype.build = function () {
        return __awaiter(this, void 0, void 0, function () {
            var _this = this;
            var container, agGridElement, allFieldsDescription, _a, dataSource, gridOptions;
            return __generator(this, function (_b) {
                switch (_b.label) {
                    case 0:
                        container = UtilsModules_1.$$('div');
                        agGridElement = UtilsModules_1.$$('div', {
                            className: 'ag-theme-fresh'
                        });
                        container.append(agGridElement.el);
                        Iif (!this.bindings.queryController) return [3 /*break*/, 2];
                        return [4 /*yield*/, this.bindings.queryController.getEndpoint().listFields()];
                    case 1:
                        _a = _b.sent();
                        return [3 /*break*/, 3];
                    case 2:
                        _a = null;
                        _b.label = 3;
                    case 3:
                        allFieldsDescription = _a;
                        Iif (!allFieldsDescription) return [3 /*break*/, 5];
                        dataSource = underscore_1.map(allFieldsDescription, function (description) {
                            return {
                                Name: new GenericValueOutput_1.GenericValueOutput().output(description.name),
                                Description: __assign({}, new GenericValueOutput_1.GenericValueOutput().output(description.description), { width: 150 }),
                                'Default Value': new GenericValueOutput_1.GenericValueOutput().output(description.defaultValue),
                                'Field Type': new GenericValueOutput_1.GenericValueOutput().output(description.fieldType),
                                'Field Source Type': new GenericValueOutput_1.GenericValueOutput().output(description.fieldSourceType),
                                'Include In Query': new GenericValueOutput_1.GenericValueOutput().output(description.includeInQuery),
                                'Include In Results': new GenericValueOutput_1.GenericValueOutput().output(description.includeInResults),
                                'Group By Field': new GenericValueOutput_1.GenericValueOutput().output(description.groupByField),
                                'Split Group By Field': new GenericValueOutput_1.GenericValueOutput().output(description.splitGroupByField),
                                'Sort By Field': new GenericValueOutput_1.GenericValueOutput().output(description.sortByField),
                                'Sample Of Available Values': {
                                    content: {
                                        content: {
                                            description: description,
                                            bindings: _this.bindings,
                                            container: container
                                        }
                                    },
                                    width: 200,
                                    suppressSorting: true,
                                    suppressFilter: true,
                                    cellRenderer: AvailableFieldsSampleValue
                                }
                            };
                        });
                        return [4 /*yield*/, new TableBuilder_1.TableBuilder().build(dataSource, agGridElement, {
                                enableFilter: true,
                                rowModelType: 'infinite',
                                pagination: true,
                                paginationPageSize: 25,
                                rowHeight: 100,
                                enableServerSideFilter: true,
                                enableServerSideSorting: true,
                                datasource: new AvailableFieldsDatasource(dataSource)
                            })];
                    case 4:
                        gridOptions = (_b.sent()).gridOptions;
                        this.gridOptions = gridOptions;
                        _b.label = 5;
                    case 5: return [2 /*return*/, container];
                }
            });
        });
    };
    return AvailableFieldsTable;
}());
exports.AvailableFieldsTable = AvailableFieldsTable;
var AvailableFieldsSampleValue = /** @class */ (function () {
    function AvailableFieldsSampleValue() {
    }
    AvailableFieldsSampleValue.prototype.init = function (params) {
        Eif (params.value && params.value.content) {
            this.description = params.value.content.description;
            this.bindings = params.value.content.bindings;
            this.container = params.value.content.container;
        }
    };
    AvailableFieldsSampleValue.prototype.getGui = function () {
        var _this = this;
        var btn = UtilsModules_1.$$('button', {
            className: 'coveo-button coveo-available-fields-table-button',
            type: 'button'
        }, 'Hover For Sample Values');
        var popperElement;
        var userHoveringButtonWithHisMouse = false;
        btn.on('mouseover', function () { return __awaiter(_this, void 0, void 0, function () {
            var values;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        userHoveringButtonWithHisMouse = true;
                        Iif (!(this.description && this.container && userHoveringButtonWithHisMouse)) return [3 /*break*/, 2];
                        return [4 /*yield*/, this.getFieldsValues(this.description)];
                    case 1:
                        values = _a.sent();
                        Eif (userHoveringButtonWithHisMouse) {
                            popperElement = this.renderFieldValues(values);
                            this.container.append(popperElement.el);
                            UtilsModules_1.PopupUtils.positionPopup(popperElement.el, btn.el, document.body, {
                                horizontal: PopupUtils_1.PopupHorizontalAlignment.LEFT,
                                vertical: PopupUtils_1.PopupVerticalAlignment.MIDDLE
                            });
                        }
                        userHoveringButtonWithHisMouse = false;
                        _a.label = 2;
                    case 2: return [2 /*return*/];
                }
            });
        }); });
        btn.on('mouseout', function () {
            if (popperElement) {
                popperElement.remove();
            }
            userHoveringButtonWithHisMouse = false;
        });
        return btn.el;
    };
    AvailableFieldsSampleValue.prototype.getFieldsValues = function (fieldDesciption) {
        return __awaiter(this, void 0, void 0, function () {
            var queryBuilder, queryResults, _a;
            return __generator(this, function (_b) {
                switch (_b.label) {
                    case 0:
                        Iif (!this.bindings || !this.description || !this.bindings.queryController || !this.container) {
                            return [2 /*return*/, []];
                        }
                        if (!fieldDesciption.groupByField) return [3 /*break*/, 2];
                        return [4 /*yield*/, this.bindings.queryController.getEndpoint().listFieldValues({
                                field: this.description.name
                            })];
                    case 1: return [2 /*return*/, _b.sent()];
                    case 2:
                        queryBuilder = new QueryBuilder_1.QueryBuilder();
                        queryBuilder.advancedExpression.add(fieldDesciption.name);
                        Iif (!this.bindings) return [3 /*break*/, 4];
                        return [4 /*yield*/, this.bindings.queryController.getEndpoint().search(queryBuilder.build())];
                    case 3:
                        _a = _b.sent();
                        return [3 /*break*/, 5];
                    case 4:
                        _a = null;
                        _b.label = 5;
                    case 5:
                        queryResults = _a;
                        Eif (queryResults) {
                            return [2 /*return*/, underscore_1.map(queryResults.results, function (result) {
                                    return { value: UtilsModules_1.Utils.getFieldValue(result, fieldDesciption.name) };
                                })];
                        }
                        else {
                            return [2 /*return*/, []];
                        }
                        _b.label = 6;
                    case 6: return [2 /*return*/];
                }
            });
        });
    };
    AvailableFieldsSampleValue.prototype.renderFieldValues = function (fieldValues) {
        var list = UtilsModules_1.$$('ul', { className: 'coveo-relevance-inspector-available-fields-popup' });
        list.el.style.background = 'white';
        if (fieldValues.length == 0) {
            list.append(UtilsModules_1.$$('li', undefined, 'No Values Available ...').el);
        }
        else {
            fieldValues.forEach(function (fieldValue) {
                var listItem = UtilsModules_1.$$('li', {
                    className: 'coveo-relevance-inspector-available-fields-popup-value'
                }, new GenericValueOutput_1.GenericValueOutput().output(fieldValue.value).content);
                list.append(listItem.el);
            });
        }
        return list;
    };
    AvailableFieldsSampleValue.prototype.refresh = function () {
        return true;
    };
    return AvailableFieldsSampleValue;
}());
exports.AvailableFieldsSampleValue = AvailableFieldsSampleValue;
var AvailableFieldsDatasource = /** @class */ (function () {
    function AvailableFieldsDatasource(dataSource) {
        this.dataSource = dataSource;
        this.rowsData = [];
        this.rowsData = underscore_1.map(this.dataSource, function (source) {
            var merged = {};
            var extractContent = function (value, key) {
                Eif (value.content != null) {
                    merged[key] = value.content;
                }
                else if (value.children) {
                    underscore_1.each(value.children, function (child) {
                        underscore_1.each(child, extractContent);
                    });
                }
            };
            underscore_1.each(source, extractContent);
            return merged;
        });
    }
    AvailableFieldsDatasource.prototype.getRows = function (params) {
        var filtered = this.filter(this.rowsData, params.filterModel);
        var filteredAndSorted = this.sort(filtered, params.sortModel);
        params.successCallback(filteredAndSorted.slice(params.startRow, params.endRow), filteredAndSorted.length);
    };
    AvailableFieldsDatasource.prototype.filter = function (rows, filterModel) {
        underscore_1.each(filterModel, function (value, key) {
            switch (value.type) {
                case 'equals':
                    rows = underscore_1.where(rows, (_a = {}, _a[key] = value.filter, _a));
                    break;
                case 'notEqual':
                    rows = underscore_1.reject(rows, function (possibleReturn) {
                        return possibleReturn[key] == value.filter;
                    });
                    break;
                case 'startsWith':
                    rows = underscore_1.filter(rows, function (possibleReturn) {
                        return possibleReturn[key].toLowerCase().indexOf(value.filter) == 0;
                    });
                    break;
                case 'endsWith':
                    rows = underscore_1.filter(rows, function (possibleReturn) {
                        return possibleReturn[key].toLowerCase().indexOf(value.filter) == possibleReturn[key].length - value.filter.length;
                    });
                    break;
                case 'contains':
                    rows = underscore_1.filter(rows, function (possibleReturn) {
                        return possibleReturn[key].toLowerCase().indexOf(value.filter) != -1;
                    });
                    break;
                case 'notContains':
                    rows = underscore_1.filter(rows, function (possibleReturn) {
                        return possibleReturn[key].toLowerCase().indexOf(value.filter) == -1;
                    });
                    break;
            }
            var _a;
        });
        return rows;
    };
    AvailableFieldsDatasource.prototype.sort = function (rows, sortModels) {
        if (sortModels && sortModels[0]) {
            var sortModel_1 = sortModels[0];
            return rows.sort(function (first, second) {
                var firstValue = first[sortModel_1.colId];
                var secondValue = second[sortModel_1.colId];
                var ascendingOrDescendingMultiplier = sortModel_1.sort == 'asc' ? 1 : -1;
                Iif (UtilsModules_1.Utils.isNullOrEmptyString(firstValue) && UtilsModules_1.Utils.isNullOrEmptyString(secondValue)) {
                    return 0;
                }
                Iif (UtilsModules_1.Utils.isNullOrEmptyString(firstValue)) {
                    return -1 * ascendingOrDescendingMultiplier;
                }
                Iif (UtilsModules_1.Utils.isNullOrEmptyString(secondValue)) {
                    return 1 * ascendingOrDescendingMultiplier;
                }
                Iif (isNaN(firstValue) || isNaN(secondValue)) {
                    return firstValue.localeCompare(secondValue) * ascendingOrDescendingMultiplier;
                }
                else {
                    return (Number(firstValue) - Number(secondValue)) * ascendingOrDescendingMultiplier;
                }
            });
        }
        return rows;
    };
    return AvailableFieldsDatasource;
}());
exports.AvailableFieldsDatasource = AvailableFieldsDatasource;
 
 
/***/ }),
/* 229 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var DeviceUtils_1 = __webpack_require__(42);
var PendingSearchEvent_1 = __webpack_require__(230);
var PendingSearchAsYouTypeSearchEvent_1 = __webpack_require__(179);
var Assert_1 = __webpack_require__(12);
var Logger_1 = __webpack_require__(18);
var AnalyticsActionListMeta_1 = __webpack_require__(7);
var Defer_1 = __webpack_require__(31);
var Dom_1 = __webpack_require__(0);
var AnalyticsEvents_1 = __webpack_require__(111);
var APIAnalyticsBuilder_1 = __webpack_require__(648);
var QueryStateModel_1 = __webpack_require__(17);
var Component_1 = __webpack_require__(6);
var Version_1 = __webpack_require__(292);
var QueryUtils_1 = __webpack_require__(37);
var _ = __webpack_require__(1);
var AnalyticsInformation_1 = __webpack_require__(85);
var ControllersModules_1 = __webpack_require__(474);
var LiveAnalyticsClient = /** @class */ (function () {
    function LiveAnalyticsClient(endpoint, rootElement, userId, userDisplayName, anonymous, splitTestRunName, splitTestRunVersion, originLevel1, sendToCloud, bindings) {
        this.endpoint = endpoint;
        this.rootElement = rootElement;
        this.userId = userId;
        this.userDisplayName = userDisplayName;
        this.anonymous = anonymous;
        this.splitTestRunName = splitTestRunName;
        this.splitTestRunVersion = splitTestRunVersion;
        this.originLevel1 = originLevel1;
        this.sendToCloud = sendToCloud;
        this.bindings = bindings;
        this.isContextual = false;
        this.originContext = 'Search';
        this.language = String['locale'];
        this.device = DeviceUtils_1.DeviceUtils.getDeviceName();
        this.mobile = DeviceUtils_1.DeviceUtils.isMobileDevice();
        Assert_1.Assert.exists(endpoint);
        Assert_1.Assert.exists(rootElement);
        Assert_1.Assert.isNonEmptyString(this.language);
        Assert_1.Assert.isNonEmptyString(this.device);
        Assert_1.Assert.isNonEmptyString(this.originLevel1);
        this.logger = new Logger_1.Logger(this);
    }
    LiveAnalyticsClient.prototype.isActivated = function () {
        return true;
    };
    LiveAnalyticsClient.prototype.getCurrentVisitId = function () {
        return this.endpoint.getCurrentVisitId();
    };
    LiveAnalyticsClient.prototype.getCurrentVisitIdPromise = function () {
        return this.endpoint.getCurrentVisitIdPromise();
    };
    LiveAnalyticsClient.prototype.getCurrentEventCause = function () {
        if (this.pendingSearchEvent != null) {
            return this.pendingSearchEvent.getEventCause();
        }
        if (this.pendingSearchAsYouTypeSearchEvent != null) {
            return this.pendingSearchAsYouTypeSearchEvent.getEventCause();
        }
        return null;
    };
    LiveAnalyticsClient.prototype.getCurrentEventMeta = function () {
        if (this.pendingSearchEvent != null) {
            return this.pendingSearchEvent.getEventMeta();
        }
        if (this.pendingSearchAsYouTypeSearchEvent != null) {
            return this.pendingSearchAsYouTypeSearchEvent.getEventMeta();
        }
        return null;
    };
    LiveAnalyticsClient.prototype.logSearchEvent = function (actionCause, meta) {
        var metaObject = this.buildMetaObject(meta);
        this.pushSearchEvent(actionCause, metaObject);
    };
    LiveAnalyticsClient.prototype.logSearchAsYouType = function (actionCause, meta) {
        var metaObject = this.buildMetaObject(meta);
        this.pushSearchAsYouTypeEvent(actionCause, metaObject);
    };
    LiveAnalyticsClient.prototype.logClickEvent = function (actionCause, meta, result, element) {
        var metaObject = this.buildMetaObject(meta, result);
        return this.pushClickEvent(actionCause, metaObject, result, element);
    };
    LiveAnalyticsClient.prototype.logCustomEvent = function (actionCause, meta, element, result) {
        var metaObject = this.buildMetaObject(meta, result);
        return this.pushCustomEvent(actionCause, metaObject, element);
    };
    LiveAnalyticsClient.prototype.getTopQueries = function (params) {
        return this.endpoint.getTopQueries(params);
    };
    LiveAnalyticsClient.prototype.sendAllPendingEvents = function () {
        if (this.pendingSearchAsYouTypeSearchEvent) {
            this.pendingSearchAsYouTypeSearchEvent.sendRightNow();
        }
    };
    LiveAnalyticsClient.prototype.cancelAllPendingEvents = function () {
        Iif (this.pendingSearchAsYouTypeSearchEvent) {
            this.pendingSearchAsYouTypeSearchEvent.cancel();
            this.pendingSearchAsYouTypeSearchEvent = null;
        }
        if (this.pendingSearchEvent) {
            this.pendingSearchEvent.cancel();
            this.pendingSearchEvent = null;
        }
    };
    LiveAnalyticsClient.prototype.getPendingSearchEvent = function () {
        if (this.pendingSearchEvent) {
            return this.pendingSearchEvent;
        }
        else Eif (this.pendingSearchAsYouTypeSearchEvent) {
            return this.pendingSearchAsYouTypeSearchEvent;
        }
        return null;
    };
    LiveAnalyticsClient.prototype.warnAboutSearchEvent = function () {
        if (_.isUndefined(this.pendingSearchEvent) && _.isUndefined(this.pendingSearchAsYouTypeSearchEvent)) {
            this.logger.warn('A search was triggered, but no analytics event was logged. If you wish to have consistent analytics data, consider logging a search event using the methods provided by the framework', 'https://docs.coveo.com/en/2726/#logging-your-own-search-events');
            if (window['console'] && console.trace) {
                console.trace();
            }
        }
    };
    LiveAnalyticsClient.prototype.setOriginContext = function (originContext) {
        this.originContext = originContext;
    };
    LiveAnalyticsClient.prototype.getOriginContext = function () {
        return this.originContext;
    };
    LiveAnalyticsClient.prototype.getUserDisplayName = function () {
        return this.userDisplayName;
    };
    LiveAnalyticsClient.prototype.pushCustomEvent = function (actionCause, metaObject, element) {
        var customEvent = this.buildCustomEvent(actionCause, metaObject, element);
        this.triggerChangeAnalyticsCustomData('CustomEvent', metaObject, customEvent);
        this.checkToSendAnyPendingSearchAsYouType(actionCause);
        Dom_1.$$(this.rootElement).trigger(AnalyticsEvents_1.AnalyticsEvents.customEvent, {
            customEvent: APIAnalyticsBuilder_1.APIAnalyticsBuilder.convertCustomEventToAPI(customEvent)
        });
        Dom_1.$$(this.rootElement).trigger(AnalyticsEvents_1.AnalyticsEvents.analyticsEventReady, {
            event: 'CoveoCustomEvent',
            coveoAnalyticsEventData: customEvent
        });
        return this.sendToCloud ? this.endpoint.sendCustomEvent(customEvent) : Promise.resolve(null);
    };
    LiveAnalyticsClient.prototype.pushSearchEvent = function (actionCause, metaObject) {
        var _this = this;
        Assert_1.Assert.exists(actionCause);
        Iif (this.pendingSearchEvent && this.pendingSearchEvent.getEventCause() !== actionCause.name) {
            this.pendingSearchEvent.stopRecording();
            this.pendingSearchEvent = null;
        }
        this.checkToSendAnyPendingSearchAsYouType(actionCause);
        Eif (!this.pendingSearchEvent) {
            var searchEvent = this.buildSearchEvent(actionCause, metaObject);
            this.triggerChangeAnalyticsCustomData('SearchEvent', metaObject, searchEvent);
            var pendingSearchEvent = (this.pendingSearchEvent = new PendingSearchEvent_1.PendingSearchEvent(this.rootElement, this.endpoint, searchEvent, this.sendToCloud));
            Defer_1.Defer.defer(function () {
                // At this point all `duringQuery` events should have been fired, so we can forget
                // about the pending search event. It will finish processing automatically when
                // all the deferred that were caught terminate.
                _this.pendingSearchEvent = undefined;
                pendingSearchEvent.stopRecording();
            });
        }
    };
    LiveAnalyticsClient.prototype.checkToSendAnyPendingSearchAsYouType = function (actionCause) {
        if (this.eventIsNotRelatedToSearchbox(actionCause.name)) {
            this.sendAllPendingEvents();
        }
        else {
            this.cancelAnyPendingSearchAsYouTypeEvent();
        }
    };
    LiveAnalyticsClient.prototype.pushSearchAsYouTypeEvent = function (actionCause, metaObject) {
        this.cancelAnyPendingSearchAsYouTypeEvent();
        var searchEvent = this.buildSearchEvent(actionCause, metaObject);
        this.triggerChangeAnalyticsCustomData('SearchEvent', metaObject, searchEvent);
        this.pendingSearchAsYouTypeSearchEvent = new PendingSearchAsYouTypeSearchEvent_1.PendingSearchAsYouTypeSearchEvent(this.rootElement, this.endpoint, searchEvent, this.sendToCloud);
    };
    LiveAnalyticsClient.prototype.pushClickEvent = function (actionCause, metaObject, result, element) {
        var event = this.buildClickEvent(actionCause, metaObject, result, element);
        this.checkToSendAnyPendingSearchAsYouType(actionCause);
        this.triggerChangeAnalyticsCustomData('ClickEvent', metaObject, event, { resultData: result });
        Assert_1.Assert.isNonEmptyString(event.searchQueryUid);
        Assert_1.Assert.isNonEmptyString(event.collectionName);
        Assert_1.Assert.isNonEmptyString(event.sourceName);
        Assert_1.Assert.isNumber(event.documentPosition);
        Dom_1.$$(this.rootElement).trigger(AnalyticsEvents_1.AnalyticsEvents.documentViewEvent, {
            documentViewEvent: APIAnalyticsBuilder_1.APIAnalyticsBuilder.convertDocumentViewToAPI(event)
        });
        Dom_1.$$(this.rootElement).trigger(AnalyticsEvents_1.AnalyticsEvents.analyticsEventReady, {
            event: 'CoveoClickEvent',
            coveoAnalyticsEventData: event
        });
        return this.sendToCloud ? this.endpoint.sendDocumentViewEvent(event) : Promise.resolve(null);
    };
    LiveAnalyticsClient.prototype.buildAnalyticsEvent = function (actionCause, metaObject) {
        return {
            searchQueryUid: undefined,
            actionCause: actionCause.name,
            actionType: actionCause.type,
            username: this.userId,
            userDisplayName: this.userDisplayName,
            anonymous: this.anonymous,
            device: this.device,
            mobile: this.mobile,
            language: this.language,
            responseTime: undefined,
            originLevel1: this.originLevel1,
            originLevel2: this.getOriginLevel2(this.rootElement),
            originLevel3: document.referrer,
            originContext: this.originContext,
            customData: _.keys(metaObject).length > 0 ? metaObject : undefined,
            userAgent: navigator.userAgent,
            clientId: new AnalyticsInformation_1.AnalyticsInformation().clientId
        };
    };
    LiveAnalyticsClient.prototype.buildSearchEvent = function (actionCause, metaObject) {
        return this.merge(this.buildAnalyticsEvent(actionCause, metaObject), {
            searchQueryUid: undefined,
            pipeline: undefined,
            splitTestRunName: this.splitTestRunName,
            splitTestRunVersion: this.splitTestRunVersion,
            queryText: undefined,
            advancedQuery: undefined,
            results: undefined,
            resultsPerPage: undefined,
            pageNumber: undefined,
            didYouMean: undefined,
            facets: undefined,
            contextual: this.isContextual
        });
    };
    LiveAnalyticsClient.prototype.buildClickEvent = function (actionCause, metaObject, result, element) {
        return this.merge(this.buildAnalyticsEvent(actionCause, metaObject), {
            searchQueryUid: result.queryUid,
            queryPipeline: result.pipeline,
            splitTestRunName: this.splitTestRunName || result.splitTestRun,
            splitTestRunVersion: this.splitTestRunVersion || (result.splitTestRun != undefined ? result.pipeline : undefined),
            documentUri: result.uri,
            documentUriHash: QueryUtils_1.QueryUtils.getUriHash(result),
            documentUrl: result.clickUri,
            documentTitle: result.title,
            documentCategory: QueryUtils_1.QueryUtils.getObjectType(result),
            originLevel2: this.getOriginLevel2(element),
            collectionName: QueryUtils_1.QueryUtils.getCollection(result),
            sourceName: QueryUtils_1.QueryUtils.getSource(result),
            documentPosition: result.index + 1,
            responseTime: 0,
            viewMethod: actionCause.name,
            rankingModifier: result.rankingModifier
        });
    };
    LiveAnalyticsClient.prototype.buildCustomEvent = function (actionCause, metaObject, element) {
        return this.merge(this.buildAnalyticsEvent(actionCause, metaObject), {
            searchQueryUid: this.getLastSearchQueryUid(),
            eventType: actionCause.type,
            eventValue: actionCause.name,
            originLevel2: this.getOriginLevel2(element),
            responseTime: 0
        });
    };
    LiveAnalyticsClient.prototype.getOriginLevel2 = function (element) {
        return this.resolveActiveTabFromElement(element) || 'default';
    };
    LiveAnalyticsClient.prototype.getLastSearchQueryUid = function () {
        var queryController = Component_1.Component.resolveBinding(Component_1.Component.resolveRoot(this.rootElement), ControllersModules_1.QueryController);
        Iif (!queryController) {
            return;
        }
        var lastResults = queryController.getLastResults();
        if (!lastResults) {
            return;
        }
        return lastResults.searchUid;
    };
    LiveAnalyticsClient.prototype.buildMetaObject = function (meta, result) {
        var modifiedMeta = _.extend({}, meta);
        modifiedMeta['JSUIVersion'] = Version_1.version.lib + ';' + Version_1.version.product;
        var contentIDsAreAlreadySet = modifiedMeta['contentIDKey'] && modifiedMeta['contentIDValue'];
        if (!contentIDsAreAlreadySet && result) {
            var uniqueId = QueryUtils_1.QueryUtils.getPermanentId(result);
            modifiedMeta['contentIDKey'] = uniqueId.fieldUsed;
            modifiedMeta['contentIDValue'] = uniqueId.fieldValue;
        }
        return modifiedMeta;
    };
    LiveAnalyticsClient.prototype.cancelAnyPendingSearchAsYouTypeEvent = function () {
        if (this.pendingSearchAsYouTypeSearchEvent) {
            this.pendingSearchAsYouTypeSearchEvent.cancel();
            this.pendingSearchAsYouTypeSearchEvent = undefined;
        }
    };
    LiveAnalyticsClient.prototype.resolveActiveTabFromElement = function (element) {
        Assert_1.Assert.exists(element);
        var queryStateModel = this.resolveQueryStateModel(element);
        return queryStateModel && queryStateModel.get(QueryStateModel_1.QueryStateModel.attributesEnum.t);
    };
    LiveAnalyticsClient.prototype.resolveQueryStateModel = function (rootElement) {
        return Component_1.Component.resolveBinding(rootElement, QueryStateModel_1.QueryStateModel);
    };
    LiveAnalyticsClient.prototype.eventIsNotRelatedToSearchbox = function (event) {
        return event !== AnalyticsActionListMeta_1.analyticsActionCauseList.searchboxSubmit.name && event !== AnalyticsActionListMeta_1.analyticsActionCauseList.searchboxClear.name;
    };
    LiveAnalyticsClient.prototype.triggerChangeAnalyticsCustomData = function (type, metaObject, event, data) {
        // This is for backward compatibility. Before the analytics were using either numbered
        // metas in `metaDataAsNumber` of later on named metas in `metaDataAsString`. Thus we still
        // provide those properties in a deprecated way. Below we are moving any data that put
        // in them to the root.
        metaObject['metaDataAsString'] = {};
        metaObject['metaDataAsNumber'] = {};
        var changeableAnalyticsDataObject = {
            language: event.language,
            originLevel1: event.originLevel1,
            originLevel2: event.originLevel2,
            originLevel3: event.originLevel3,
            metaObject: metaObject
        };
        var args = _.extend({}, {
            type: type,
            actionType: event.actionType,
            actionCause: event.actionCause
        }, changeableAnalyticsDataObject, data);
        Dom_1.$$(this.rootElement).trigger(AnalyticsEvents_1.AnalyticsEvents.changeAnalyticsCustomData, args);
        event.language = args.language;
        event.originLevel1 = args.originLevel1;
        event.originLevel2 = args.originLevel2;
        event.originLevel3 = args.originLevel3;
        event.customData = metaObject;
        // This is for backward compatibility. Before the analytics were using either numbered
        // metas in `metaDataAsNumber` of later on named metas in `metaDataAsString`. We are now putting
        // them all at the root, and if I encounter the older properties I move them to the top
        // level after issuing a warning.
        var metaDataAsString = event.customData['metaDataAsString'];
        Iif (_.keys(metaDataAsString).length > 0) {
            this.logger.warn("Using deprecated 'metaDataAsString' key to log custom analytics data. Custom meta should now be put at the root of the object.");
            _.extend(event.customData, metaDataAsString);
        }
        delete event.customData['metaDataAsString'];
        var metaDataAsNumber = event.customData['metaDataAsNumber'];
        Iif (_.keys(metaDataAsNumber).length > 0) {
            this.logger.warn("Using deprecated 'metaDataAsNumber' key to log custom analytics data. Custom meta should now be put at the root of the object.");
            _.extend(event.customData, metaDataAsNumber);
        }
        delete event.customData['metaDataAsNumber'];
    };
    LiveAnalyticsClient.prototype.merge = function (first, second) {
        return _.extend({}, first, second);
    };
    return LiveAnalyticsClient;
}());
exports.LiveAnalyticsClient = LiveAnalyticsClient;
 
 
/***/ }),
/* 230 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __assign = (this && this.__assign) || Object.assign || function(t) {
    for (var s, i = 1, n = arguments.length; i < n; i++) {
        s = arguments[i];
        for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
            t[p] = s[p];
    }
    return t;
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        Iif (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            Iif (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
            Iif (y = 0, t) op = [0, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    Iif (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    Iif (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        Iif (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
Object.defineProperty(exports, "__esModule", { value: true });
var QueryEvents_1 = __webpack_require__(14);
var Assert_1 = __webpack_require__(12);
var Dom_1 = __webpack_require__(0);
var SearchInterface_1 = __webpack_require__(25);
var Component_1 = __webpack_require__(6);
var QueryController_1 = __webpack_require__(78);
var Defer_1 = __webpack_require__(31);
var APIAnalyticsBuilder_1 = __webpack_require__(648);
var AnalyticsEvents_1 = __webpack_require__(111);
var AnalyticsActionListMeta_1 = __webpack_require__(7);
var QueryStateModel_1 = __webpack_require__(17);
var underscore_1 = __webpack_require__(1);
var Logger_1 = __webpack_require__(18);
var PendingSearchEvent = /** @class */ (function () {
    function PendingSearchEvent(root, endpoint, templateSearchEvent, sendToCloud) {
        var _this = this;
        this.root = root;
        this.endpoint = endpoint;
        this.templateSearchEvent = templateSearchEvent;
        this.sendToCloud = sendToCloud;
        this.searchPromises = [];
        this.results = [];
        this.cancelled = false;
        this.finished = false;
        this.searchEvents = [];
        Assert_1.Assert.exists(root);
        Assert_1.Assert.exists(endpoint);
        Assert_1.Assert.exists(templateSearchEvent);
        this.handler = function (evt, arg) {
            _this.handleDuringQuery(evt, arg);
        };
        Dom_1.$$(root).on(QueryEvents_1.QueryEvents.duringQuery, this.handler);
    }
    PendingSearchEvent.prototype.getEventCause = function () {
        return this.templateSearchEvent.actionCause;
    };
    PendingSearchEvent.prototype.getEventMeta = function () {
        return this.templateSearchEvent.customData;
    };
    PendingSearchEvent.prototype.addFacetState = function (state) {
        if (!this.facetState) {
            this.facetState = [];
        }
        (_a = this.facetState).push.apply(_a, state);
        var _a;
    };
    PendingSearchEvent.prototype.cancel = function () {
        this.stopRecording();
        this.cancelled = true;
    };
    PendingSearchEvent.prototype.stopRecording = function () {
        if (this.handler) {
            Dom_1.$$(this.root).off(QueryEvents_1.QueryEvents.duringQuery, this.handler);
            Dom_1.$$(this.root).off(QueryEvents_1.QueryEvents.duringFetchMoreQuery, this.handler);
            this.handler = null;
        }
    };
    PendingSearchEvent.prototype.handleDuringQuery = function (evt, args, queryBoxContentToUse) {
        Assert_1.Assert.check(!this.finished);
        Assert_1.Assert.check(!this.cancelled);
        // When synchronizing multiple search interfaces under a single search event
        // (think Salesforce boxes), we need to collect all search events and send them
        // in one single batch. So we gather all events until we idle out and then we
        // monitor those before sending the data.
        this.searchPromises.push(args.promise);
        var eventTarget = evt.target;
        var searchInterface = Component_1.Component.get(eventTarget, SearchInterface_1.SearchInterface);
        Assert_1.Assert.exists(searchInterface);
        // We try to grab ahead of time the content of the search box before the query returns
        // This is because it's possible that the content of the search box gets modified when the query returns (for example : DidYouMean)
        if (!queryBoxContentToUse) {
            queryBoxContentToUse = searchInterface.queryStateModel.get(QueryStateModel_1.QueryStateModel.attributesEnum.q);
        }
        var queryController = Component_1.Component.get(eventTarget, QueryController_1.QueryController);
        Assert_1.Assert.exists(queryController);
        this.updateSearchEventsAndQueryResults(args, searchInterface, queryBoxContentToUse);
    };
    PendingSearchEvent.prototype.updateSearchEventsAndQueryResults = function (args, searchInterface, queryBoxContentToUse) {
        return __awaiter(this, void 0, void 0, function () {
            var queryResults, isRecommendationPanelAction, searchEvent, e_1, index;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        _a.trys.push([0, 2, , 3]);
                        return [4 /*yield*/, args.promise];
                    case 1:
                        queryResults = _a.sent();
                        Assert_1.Assert.exists(queryResults);
                        Assert_1.Assert.check(!this.finished);
                        isRecommendationPanelAction = this.templateSearchEvent.actionCause === AnalyticsActionListMeta_1.analyticsActionCauseList.recommendation.name;
                        Eif (queryResults._reusedSearchUid !== true || isRecommendationPanelAction) {
                            searchEvent = __assign({}, this.templateSearchEvent);
                            this.fillSearchEvent(searchEvent, searchInterface, args.query, queryResults, queryBoxContentToUse);
                            this.searchEvents.push(searchEvent);
                            this.results.push(queryResults);
                        }
                        return [3 /*break*/, 3];
                    case 2:
                        e_1 = _a.sent();
                        new Logger_1.Logger(this).error(e_1);
                        return [3 /*break*/, 3];
                    case 3:
                        index = underscore_1.indexOf(this.searchPromises, args.promise);
                        this.searchPromises.splice(index, 1);
                        if (!this.searchPromises.length) {
                            this.flush();
                        }
                        return [2 /*return*/];
                }
            });
        });
    };
    PendingSearchEvent.prototype.flush = function () {
        var _this = this;
        Eif (!this.cancelled) {
            this.stopRecording();
            this.finished = true;
            Assert_1.Assert.check(this.searchEvents.length == this.results.length);
            Defer_1.Defer.defer(function () {
                Eif (_this.sendToCloud) {
                    _this.endpoint.sendSearchEvents(_this.searchEvents);
                }
                var apiSearchEvents = underscore_1.map(_this.searchEvents, function (searchEvent) {
                    return APIAnalyticsBuilder_1.APIAnalyticsBuilder.convertSearchEventToAPI(searchEvent);
                });
                Dom_1.$$(_this.root).trigger(AnalyticsEvents_1.AnalyticsEvents.searchEvent, {
                    searchEvents: apiSearchEvents
                });
                Eif (_this.searchEvents.length) {
                    _this.searchEvents.forEach(function (searchEvent) {
                        Dom_1.$$(_this.root).trigger(AnalyticsEvents_1.AnalyticsEvents.analyticsEventReady, {
                            event: 'CoveoSearchEvent',
                            coveoAnalyticsEventData: searchEvent
                        });
                    });
                }
            });
        }
    };
    PendingSearchEvent.prototype.fillSearchEvent = function (searchEvent, searchInterface, query, queryResults, queryBoxContentToUse) {
        Assert_1.Assert.exists(searchEvent);
        Assert_1.Assert.exists(searchInterface);
        Assert_1.Assert.exists(query);
        Assert_1.Assert.exists(queryResults);
        var currentQuery = searchInterface.queryStateModel.get(QueryStateModel_1.QueryStateModel.attributesEnum.q);
        searchEvent.queryPipeline = queryResults.pipeline;
        searchEvent.splitTestRunName = searchEvent.splitTestRunName || queryResults.splitTestRun;
        searchEvent.splitTestRunVersion =
            searchEvent.splitTestRunVersion || (queryResults.splitTestRun != undefined ? queryResults.pipeline : undefined);
        searchEvent.originLevel2 = searchEvent.originLevel2 || searchInterface.queryStateModel.get('t') || 'default';
        searchEvent.queryText = queryBoxContentToUse || currentQuery || query.q || ''; // do not log the query sent to the server if possible; it may contain added syntax depending on options
        searchEvent.advancedQuery = query.aq || '';
        searchEvent.didYouMean = query.enableDidYouMean;
        searchEvent.numberOfResults = queryResults.totalCount;
        searchEvent.responseTime = queryResults.duration;
        searchEvent.pageNumber = query.firstResult / query.numberOfResults;
        searchEvent.resultsPerPage = query.numberOfResults;
        searchEvent.searchQueryUid = queryResults.searchUid;
        searchEvent.queryPipeline = queryResults.pipeline;
        searchEvent.facetState = this.facetState;
        // The context_${key} format is important for the Analytics backend
        // This is what they use to recognize a custom data that will be used internally by other coveo's service.
        // In this case, Coveo Machine Learning will be the consumer of this information.
        if (query.context != undefined) {
            underscore_1.each(query.context, function (value, key) { return (searchEvent.customData["context_" + key] = value); });
        }
        Iif (queryResults.refinedKeywords != undefined && queryResults.refinedKeywords.length != 0) {
            searchEvent.customData['refinedKeywords'] = queryResults.refinedKeywords;
        }
    };
    return PendingSearchEvent;
}());
exports.PendingSearchEvent = PendingSearchEvent;
 
 
/***/ }),
/* 231 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Dom_1 = __webpack_require__(0);
var Assert_1 = __webpack_require__(12);
var ResponsiveDropdownHeader = /** @class */ (function () {
    function ResponsiveDropdownHeader(componentName, element) {
        this.element = element;
        Assert_1.Assert.isString(componentName);
        Assert_1.Assert.exists(element);
        this.element.addClass("coveo-" + componentName + "-dropdown-header");
        this.element.addClass(ResponsiveDropdownHeader.DEFAULT_CSS_CLASS_NAME);
    }
    ResponsiveDropdownHeader.prototype.open = function () {
        this.element.addClass(ResponsiveDropdownHeader.ACTIVE_HEADER_CSS_CLASS_NAME);
    };
    ResponsiveDropdownHeader.prototype.close = function () {
        this.element.removeClass(ResponsiveDropdownHeader.ACTIVE_HEADER_CSS_CLASS_NAME);
    };
    ResponsiveDropdownHeader.prototype.cleanUp = function () {
        this.element.detach();
    };
    ResponsiveDropdownHeader.prototype.hide = function () {
        Dom_1.$$(this.element).addClass('coveo-hidden');
    };
    ResponsiveDropdownHeader.prototype.show = function () {
        Dom_1.$$(this.element).removeClass('coveo-hidden');
    };
    ResponsiveDropdownHeader.DEFAULT_CSS_CLASS_NAME = 'coveo-dropdown-header';
    ResponsiveDropdownHeader.ACTIVE_HEADER_CSS_CLASS_NAME = 'coveo-dropdown-header-active';
    return ResponsiveDropdownHeader;
}());
exports.ResponsiveDropdownHeader = ResponsiveDropdownHeader;
 
 
/***/ }),
/* 232 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Dom_1 = __webpack_require__(0);
var AdvancedSearchEvents_1 = __webpack_require__(110);
var Strings_1 = __webpack_require__(4);
var DocumentInput = /** @class */ (function () {
    function DocumentInput(inputName, root) {
        this.inputName = inputName;
        this.root = root;
    }
    DocumentInput.prototype.reset = function () { };
    DocumentInput.prototype.build = function () {
        var documentInput = Dom_1.$$('div', { className: 'coveo-advanced-search-document-input-section' });
        var label = Dom_1.$$('span', { className: 'coveo-advanced-search-label' });
        label.text(Strings_1.l(this.inputName));
        documentInput.append(label.el);
        this.element = documentInput.el;
        return this.element;
    };
    DocumentInput.prototype.getValue = function () {
        return '';
    };
    DocumentInput.prototype.updateQuery = function (queryBuilder) {
        var value = this.getValue();
        if (value) {
            queryBuilder.advancedExpression.add(this.getValue());
        }
    };
    DocumentInput.prototype.onChange = function () {
        Eif (this.root) {
            Dom_1.$$(this.root).trigger(AdvancedSearchEvents_1.AdvancedSearchEvents.executeAdvancedSearch);
        }
        else if (this.element) {
            Dom_1.$$(this.element).trigger(AdvancedSearchEvents_1.AdvancedSearchEvents.executeAdvancedSearch);
        }
    };
    return DocumentInput;
}());
exports.DocumentInput = DocumentInput;
 
 
/***/ }),
/* 233 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
/**
 * The possible values for the [allowedValuesPatternType]{@link IGroupByRequest.allowedValuesPatternType} property of the `IGroupByRequest` interface.
 */
var AllowedValuesPatternType;
(function (AllowedValuesPatternType) {
    /**
     * Only supports trailing wildcards in the pattern.
     */
    AllowedValuesPatternType["Legacy"] = "legacy";
    /**
     * Fully supports wildcards.
     */
    AllowedValuesPatternType["Wildcards"] = "wildcards";
    /**
     * Supports regular expression as the pattern.
     */
    AllowedValuesPatternType["Regex"] = "regex";
    /**
     *Applies the Edit Distance algorithm to match values that are close to the specified pattern.
     */
    AllowedValuesPatternType["EditDistance"] = "editdistance";
    /**
     *Applies a phonetic algorithm to match values that are phonetically similar to the specified pattern.
     */
    AllowedValuesPatternType["Phonetic"] = "phonetic";
})(AllowedValuesPatternType = exports.AllowedValuesPatternType || (exports.AllowedValuesPatternType = {}));
 
 
/***/ }),
/* 234 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
__webpack_require__(1107);
var QueryEvents_1 = __webpack_require__(14);
var Logger_1 = __webpack_require__(18);
var Strings_1 = __webpack_require__(4);
var Dom_1 = __webpack_require__(0);
var Utils_1 = __webpack_require__(5);
var Component_1 = __webpack_require__(6);
var SearchInterface_1 = __webpack_require__(25);
var ResponsiveComponents_1 = __webpack_require__(54);
var ResponsiveComponentsManager_1 = __webpack_require__(70);
var ResponsiveComponentsUtils_1 = __webpack_require__(93);
var ResponsiveDropdown_1 = __webpack_require__(180);
var ResponsiveDropdownContent_1 = __webpack_require__(99);
var ResponsiveDropdownHeader_1 = __webpack_require__(231);
var underscore_1 = __webpack_require__(1);
var ComponentsTypes_1 = __webpack_require__(69);
var ResponsiveDropdownModalContent_1 = __webpack_require__(326);
var FacetsMobileMode_1 = __webpack_require__(176);
var FacetsMobileModeEvents_1 = __webpack_require__(680);
var ResponsiveFacetColumn = /** @class */ (function () {
    function ResponsiveFacetColumn(coveoRoot, ID, options, responsiveDropdown) {
        this.coveoRoot = coveoRoot;
        this.ID = ID;
        this.componentsInFacetColumn = [];
        this.preservePositionOriginalValues = [];
        this.searchInterface = Component_1.Component.get(this.coveoRoot.el, SearchInterface_1.SearchInterface, false);
        this.dropdownHeaderLabel = this.getDropdownHeaderLabel();
        this.dropdown = this.buildDropdown(responsiveDropdown);
        this.bindDropdownContentEvents();
        this.bindFacetsMobileModeEvents();
        this.registerOnCloseHandler();
        this.registerQueryEvents();
        this.initializeBreakpoint(options.responsiveBreakpoint);
    }
    ResponsiveFacetColumn.init = function (responsiveComponentConstructor, root, component, options, ID) {
        var column = this.findColumn(root);
        if (!column) {
            return;
        }
        ResponsiveComponentsManager_1.ResponsiveComponentsManager.register(ResponsiveFacetColumn, Dom_1.$$(root), 'ResponsiveFacetColumn', component, options);
        ResponsiveComponentsManager_1.ResponsiveComponentsManager.register(responsiveComponentConstructor, Dom_1.$$(root), ID, component, options);
    };
    ResponsiveFacetColumn.findColumn = function (root) {
        var column = Dom_1.$$(root).find('.coveo-facet-column');
        if (!column) {
            this.logger.info('No element with class coveo-facet-column. Responsive facets cannot be enabled');
        }
        return column;
    };
    Object.defineProperty(ResponsiveFacetColumn.prototype, "facetsMobileModeComponent", {
        get: function () {
            return this.searchInterface ? this.searchInterface.getComponents(FacetsMobileMode_1.FacetsMobileMode.ID)[0] : null;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ResponsiveFacetColumn.prototype, "facetsMobileModeOptions", {
        get: function () {
            var facetsMobileModeComponent = this.facetsMobileModeComponent;
            if (!facetsMobileModeComponent) {
                ResponsiveFacetColumn.logger.warn('The "FacetsMobileMode" component did not load properly, disabling the ResponsiveFacets modal.');
                return {
                    isModal: false,
                    preventScrolling: false,
                    displayOverlayWhileOpen: true
                };
            }
            return facetsMobileModeComponent.options;
        },
        enumerable: true,
        configurable: true
    });
    ResponsiveFacetColumn.prototype.registerComponent = function (accept) {
        this.componentsInFacetColumn.push(accept);
        this.preservePositionOriginalValues.push(accept.options.preservePosition);
        return true;
    };
    ResponsiveFacetColumn.prototype.needDropdownWrapper = function () {
        return this.needSmallMode();
    };
    ResponsiveFacetColumn.prototype.handleResizeEvent = function () {
        if (this.needSmallMode() && !ResponsiveComponentsUtils_1.ResponsiveComponentsUtils.isSmallFacetActivated(this.coveoRoot)) {
            this.changeToSmallMode();
        }
        else if (!this.needSmallMode() && ResponsiveComponentsUtils_1.ResponsiveComponentsUtils.isSmallFacetActivated(this.coveoRoot)) {
            this.changeToLargeMode();
        }
        if (this.dropdown.isOpened) {
            this.dropdown.dropdownContent.positionDropdown();
        }
    };
    ResponsiveFacetColumn.prototype.dismissFacetSearches = function () {
        underscore_1.each(this.componentsInFacetColumn, function (component) {
            Eif (component.facetSearch && component.facetSearch.currentlyDisplayedResults) {
                component.facetSearch.dismissSearchResults();
            }
        });
    };
    ResponsiveFacetColumn.prototype.needSmallMode = function () {
        if (!this.searchInterface) {
            return (this.coveoRoot.width() <=
                (Utils_1.Utils.isNullOrUndefined(this.breakpoint) ? new ResponsiveComponents_1.ResponsiveComponents().getMediumScreenWidth() : this.breakpoint));
        }
        switch (this.searchInterface.responsiveComponents.getResponsiveMode()) {
            case 'small':
            case 'medium':
                return true;
            case 'auto':
                return (this.coveoRoot.width() <=
                    (Utils_1.Utils.isNullOrUndefined(this.breakpoint) ? this.searchInterface.responsiveComponents.getMediumScreenWidth() : this.breakpoint));
            default:
                return false;
        }
    };
    ResponsiveFacetColumn.prototype.changeToSmallMode = function () {
        this.dropdown.close();
        this.disableFacetPreservePosition();
        Dom_1.$$(this.coveoRoot.find("." + ResponsiveComponentsManager_1.ResponsiveComponentsManager.DROPDOWN_HEADER_WRAPPER_CSS_CLASS)).append(this.dropdown.dropdownHeader.element.el);
        ResponsiveComponentsUtils_1.ResponsiveComponentsUtils.activateSmallFacet(this.coveoRoot);
    };
    ResponsiveFacetColumn.prototype.changeToLargeMode = function () {
        this.restoreFacetPreservePositionValue();
        this.dropdown.cleanUp();
        ResponsiveComponentsUtils_1.ResponsiveComponentsUtils.deactivateSmallFacet(this.coveoRoot);
    };
    ResponsiveFacetColumn.prototype.buildDropdown = function (responsiveDropdown) {
        var dropdownContent = this.buildDropdownContent();
        var dropdownHeader = this.buildDropdownHeader();
        var dropdown = responsiveDropdown ? responsiveDropdown : new ResponsiveDropdown_1.ResponsiveDropdown(dropdownContent, dropdownHeader, this.coveoRoot);
        if (!this.facetsMobileModeOptions.displayOverlayWhileOpen) {
            dropdown.disablePopupBackground();
        }
        if (this.facetsMobileModeOptions.preventScrolling) {
            dropdown.enableScrollLocking(this.facetsMobileModeOptions.scrollContainer);
        }
        return dropdown;
    };
    ResponsiveFacetColumn.prototype.buildDropdownContent = function () {
        var _this = this;
        var dropdownContentElement = Dom_1.$$(this.coveoRoot.find('.coveo-facet-column'));
        var filterByContainer = Dom_1.$$('div', { className: 'coveo-facet-header-filter-by-container', style: 'display: none' });
        var filterBy = Dom_1.$$('div', { className: 'coveo-facet-header-filter-by' });
        filterBy.text(Strings_1.l('Filter by:'));
        filterByContainer.append(filterBy.el);
        dropdownContentElement.prepend(filterByContainer.el);
        if (this.facetsMobileModeOptions.isModal) {
            return new ResponsiveDropdownModalContent_1.ResponsiveDropdownModalContent('facet', dropdownContentElement, Strings_1.l('CloseFiltersDropdown'), function () { return _this.dropdown.close(); });
        }
        return new ResponsiveDropdownContent_1.ResponsiveDropdownContent('facet', dropdownContentElement, this.coveoRoot, ResponsiveFacetColumn.DROPDOWN_MIN_WIDTH, ResponsiveFacetColumn.DROPDOWN_WIDTH_RATIO);
    };
    ResponsiveFacetColumn.prototype.buildDropdownHeader = function () {
        var dropdownHeaderElement = Dom_1.$$('a');
        var content = Dom_1.$$('p');
        content.text(this.dropdownHeaderLabel);
        dropdownHeaderElement.el.appendChild(content.el);
        var dropdownHeader = new ResponsiveDropdownHeader_1.ResponsiveDropdownHeader('facet', dropdownHeaderElement);
        return dropdownHeader;
    };
    ResponsiveFacetColumn.prototype.initializeBreakpoint = function (defaultBreakpoint) {
        var facetsMobileModeBreakpoint = this.facetsMobileModeOptions.breakpoint;
        this.breakpoint = Utils_1.Utils.isNullOrUndefined(facetsMobileModeBreakpoint) ? defaultBreakpoint : facetsMobileModeBreakpoint;
    };
    ResponsiveFacetColumn.prototype.registerOnCloseHandler = function () {
        this.dropdown.registerOnCloseHandler(this.dismissFacetSearches, this);
    };
    ResponsiveFacetColumn.prototype.registerQueryEvents = function () {
        var _this = this;
        this.coveoRoot.on(QueryEvents_1.QueryEvents.noResults, function () { return _this.handleNoResults(); });
        this.coveoRoot.on(QueryEvents_1.QueryEvents.querySuccess, function (e, data) { return _this.handleQuerySuccess(data); });
        this.coveoRoot.on(QueryEvents_1.QueryEvents.queryError, function () { return _this.handleQueryError(); });
    };
    ResponsiveFacetColumn.prototype.bindDropdownContentEvents = function () {
        var _this = this;
        this.dropdown.dropdownContent.element.on('scroll', underscore_1.debounce(function () {
            underscore_1.each(_this.componentsInFacetColumn, function (component) {
                var facetSearch = component.facetSearch;
                Iif (facetSearch && facetSearch.currentlyDisplayedResults && !_this.isFacetSearchScrolledIntoView(facetSearch.search)) {
                    component.facetSearch.positionSearchResults(_this.dropdown.dropdownContent.element.el);
                }
                else Eif (facetSearch && component.facetSearch.currentlyDisplayedResults) {
                    component.facetSearch.positionSearchResults();
                }
            });
        }, ResponsiveFacetColumn.DEBOUNCE_SCROLL_WAIT));
    };
    ResponsiveFacetColumn.prototype.bindFacetsMobileModeEvents = function () {
        var facetsMobileModeComponent = this.facetsMobileModeComponent;
        if (facetsMobileModeComponent) {
            this.dropdown.registerOnOpenHandler(function () { return Dom_1.$$(facetsMobileModeComponent.element).trigger(FacetsMobileModeEvents_1.FacetsMobileModeEvents.popupOpened); }, facetsMobileModeComponent);
            this.dropdown.registerOnCloseHandler(function () { return Dom_1.$$(facetsMobileModeComponent.element).trigger(FacetsMobileModeEvents_1.FacetsMobileModeEvents.popupClosed); }, facetsMobileModeComponent);
        }
    };
    ResponsiveFacetColumn.prototype.restoreFacetPreservePositionValue = function () {
        var _this = this;
        underscore_1.each(this.componentsInFacetColumn, function (component, index) {
            Eif (component.options) {
                component.options.preservePosition = _this.preservePositionOriginalValues[index];
            }
        });
    };
    ResponsiveFacetColumn.prototype.disableFacetPreservePosition = function () {
        underscore_1.each(this.componentsInFacetColumn, function (component) {
            Eif (component.options) {
                component.options.preservePosition = false;
            }
        });
    };
    ResponsiveFacetColumn.prototype.isFacetSearchScrolledIntoView = function (facetSearchElement) {
        var facetTop = facetSearchElement.getBoundingClientRect().top;
        var facetBottom = facetSearchElement.getBoundingClientRect().bottom;
        var dropdownTop = this.dropdown.dropdownContent.element.el.getBoundingClientRect().top;
        var dropdownBottom = this.dropdown.dropdownContent.element.el.getBoundingClientRect().bottom;
        dropdownTop = dropdownTop >= 0 ? dropdownTop : 0;
        return facetTop >= dropdownTop && facetBottom <= dropdownBottom;
    };
    ResponsiveFacetColumn.prototype.getDropdownHeaderLabel = function () {
        var dropdownHeaderLabel;
        ComponentsTypes_1.ComponentsTypes.getAllFacetInstancesFromElement(this.coveoRoot.find('.coveo-facet-column')).forEach(function (facet) {
            var options = facet.options;
            if (!dropdownHeaderLabel && options.dropdownHeaderLabel) {
                dropdownHeaderLabel = options.dropdownHeaderLabel;
            }
        });
        Eif (!dropdownHeaderLabel) {
            dropdownHeaderLabel = Strings_1.l(ResponsiveFacetColumn.DROPDOWN_HEADER_LABEL_DEFAULT_VALUE);
        }
        return dropdownHeaderLabel;
    };
    ResponsiveFacetColumn.prototype.handleNoResults = function () {
        this.dropdown.dropdownHeader.hide();
    };
    ResponsiveFacetColumn.prototype.handleQueryError = function () {
        this.dropdown.dropdownHeader.hide();
    };
    ResponsiveFacetColumn.prototype.handleQuerySuccess = function (data) {
        if (data.results.totalCount === 0) {
            this.dropdown.dropdownHeader.hide();
        }
        else {
            this.dropdown.dropdownHeader.show();
        }
    };
    ResponsiveFacetColumn.DEBOUNCE_SCROLL_WAIT = 250;
    ResponsiveFacetColumn.logger = new Logger_1.Logger('ResponsiveFacets');
    ResponsiveFacetColumn.DROPDOWN_MIN_WIDTH = 280;
    ResponsiveFacetColumn.DROPDOWN_WIDTH_RATIO = 0.35; // Used to set the width relative to the coveo root.
    ResponsiveFacetColumn.DROPDOWN_HEADER_LABEL_DEFAULT_VALUE = 'Filters';
    return ResponsiveFacetColumn;
}());
exports.ResponsiveFacetColumn = ResponsiveFacetColumn;
 
 
/***/ }),
/* 235 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Dom_1 = __webpack_require__(0);
var Strings_1 = __webpack_require__(4);
var AnalyticsActionListMeta_1 = __webpack_require__(7);
__webpack_require__(1109);
var SVGIcons_1 = __webpack_require__(16);
var SVGDom_1 = __webpack_require__(23);
var AccessibleButton_1 = __webpack_require__(20);
var FacetHeader = /** @class */ (function () {
    function FacetHeader(options) {
        this.options = options;
        this.element = document.createElement('div');
        Dom_1.$$(this.element).addClass('coveo-facet-header');
    }
    FacetHeader.prototype.build = function () {
        var titleSection = Dom_1.$$('div', {
            className: 'coveo-facet-header-title-section'
        });
        if (this.options.icon != undefined) {
            this.iconElement = this.buildIcon();
            titleSection.append(this.iconElement);
        }
        titleSection.append(this.buildTitle());
        this.waitElement = this.buildWaitAnimation();
        titleSection.append(this.waitElement);
        this.element.appendChild(titleSection.el);
        var settingsSection = Dom_1.$$('div', {
            className: 'coveo-facet-header-settings-section'
        });
        this.eraserElement = this.buildEraser();
        settingsSection.append(this.eraserElement);
        if (this.options.facet) {
            this.operatorElement = this.buildOperatorToggle();
            settingsSection.append(this.operatorElement);
            Dom_1.$$(this.operatorElement).toggle(this.options.facet.options.enableTogglingOperator);
        }
        if (this.options.settingsKlass) {
            this.sort = this.settings = new this.options.settingsKlass(this.options.availableSorts, this.options.facet);
            settingsSection.append(this.settings.build());
        }
        else if (this.options.sortKlass) {
            this.sort = new this.options.sortKlass(this.options.availableSorts, this.options.facet);
        }
        this.element.appendChild(settingsSection.el);
        return this.element;
    };
    FacetHeader.prototype.switchToAnd = function () {
        Eif (this.options.facet) {
            this.options.facet.options.useAnd = true;
            this.rebuildOperatorToggle();
            this.updateOperatorQueryStateModel();
        }
    };
    FacetHeader.prototype.switchToOr = function () {
        Eif (this.options.facet) {
            this.options.facet.options.useAnd = false;
            this.rebuildOperatorToggle();
            this.updateOperatorQueryStateModel();
        }
    };
    FacetHeader.prototype.collapseFacet = function () {
        Iif (this.collapseElement && this.expandElement) {
            Dom_1.$$(this.collapseElement).hide();
            Dom_1.$$(this.expandElement).show();
        }
        Dom_1.$$(this.options.facetElement).addClass('coveo-facet-collapsed');
    };
    FacetHeader.prototype.expandFacet = function () {
        Iif (this.collapseElement && this.expandElement) {
            Dom_1.$$(this.expandElement).hide();
            Dom_1.$$(this.collapseElement).show();
        }
        Dom_1.$$(this.options.facetElement).removeClass('coveo-facet-collapsed');
    };
    FacetHeader.prototype.updateOperatorQueryStateModel = function () {
        if (this.options.facet && this.options.facet.options.enableTogglingOperator) {
            var valueToSet = '';
            Eif (this.options.facet.getSelectedValues().length != 0 || this.options.facet.getExcludedValues().length != 0) {
                valueToSet = this.options.facet.options.useAnd ? 'and' : 'or';
            }
            this.options.facet.queryStateModel.set(this.options.facet.operatorAttributeId, valueToSet);
        }
    };
    FacetHeader.prototype.rebuildOperatorToggle = function () {
        var newElement = this.buildOperatorToggle();
        Eif (this.operatorElement) {
            Dom_1.$$(this.operatorElement).replaceWith(newElement);
        }
        this.operatorElement = newElement;
    };
    FacetHeader.prototype.buildIcon = function () {
        var cssClassForIcon;
        Eif (this.options.icon) {
            cssClassForIcon = 'coveo-icon-custom ' + this.options.icon;
        }
        else {
            cssClassForIcon = 'coveo-icon ' + this.options.field.substr(1);
        }
        this.iconElement = document.createElement('div');
        Dom_1.$$(this.iconElement).addClass(cssClassForIcon);
        return this.iconElement;
    };
    FacetHeader.prototype.buildWaitAnimation = function () {
        this.waitElement = Dom_1.$$('div', { className: 'coveo-facet-header-wait-animation' }, SVGIcons_1.SVGIcons.icons.loading).el;
        SVGDom_1.SVGDom.addClassToSVGInContainer(this.waitElement, 'coveo-facet-header-wait-animation-svg');
        this.waitElement.style.visibility = 'hidden';
        return this.waitElement;
    };
    FacetHeader.prototype.buildOperatorToggle = function () {
        var _this = this;
        var label = Strings_1.l('SwitchTo', this.options.facet.options.useAnd ? Strings_1.l('Or') : Strings_1.l('And'));
        var icon = Dom_1.$$('span', { className: 'coveo-' + (this.options.facet.options.useAnd ? 'and' : 'or') }, SVGIcons_1.SVGIcons.icons.orAnd);
        SVGDom_1.SVGDom.addClassToSVGInContainer(icon.el, 'coveo-or-and-svg');
        var toggle = Dom_1.$$('div', {
            className: 'coveo-facet-header-operator',
            title: label
        });
        toggle.append(icon.el);
        new AccessibleButton_1.AccessibleButton()
            .withElement(toggle)
            .withLabel(label)
            .withSelectAction(function () { return _this.handleOperatorClick(); })
            .build();
        return toggle.el;
    };
    FacetHeader.prototype.handleOperatorClick = function () {
        var _this = this;
        if (this.options.facet.options.useAnd) {
            this.options.facet.switchToOr();
        }
        else {
            this.options.facet.switchToAnd();
        }
        Eif (this.options.facet.getSelectedValues().length != 0) {
            var operatorNow_1 = this.options.facet.options.useAnd ? 'AND' : 'OR';
            var operatorBefore_1 = this.options.facet.options.useAnd ? 'OR' : 'AND';
            this.options.facet.triggerNewQuery(function () {
                return _this.options.facet.usageAnalytics.logSearchEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.facetToggle, {
                    facetId: _this.options.facet.options.id,
                    facetField: _this.options.field.toString(),
                    facetOperatorBefore: operatorBefore_1,
                    facetOperatorAfter: operatorNow_1,
                    facetTitle: _this.options.title
                });
            });
        }
    };
    FacetHeader.prototype.buildTitle = function () {
        var title = Dom_1.$$('div', { className: 'coveo-facet-header-title' });
        title.text(this.options.title);
        title.setAttribute('role', 'heading');
        title.setAttribute('aria-level', '2');
        title.setAttribute('aria-label', Strings_1.l('FacetTitle', this.options.title) + ".");
        return title.el;
    };
    FacetHeader.prototype.buildEraser = function () {
        var _this = this;
        var eraser = Dom_1.$$('div', { className: 'coveo-facet-header-eraser' }, SVGIcons_1.SVGIcons.icons.mainClear);
        SVGDom_1.SVGDom.addClassToSVGInContainer(eraser.el, 'coveo-facet-header-eraser-svg');
        new AccessibleButton_1.AccessibleButton()
            .withElement(eraser.el)
            .withLabel(Strings_1.l('Clear', this.options.title))
            .withClickAction(function () { return _this.onEraserClick(); })
            .withEnterKeyboardAction(function () { return _this.onEraserClick(); })
            .build();
        return eraser.el;
    };
    FacetHeader.prototype.onEraserClick = function () {
        var cmp = this.options.facet || this.options.facetSlider;
        cmp.reset();
        cmp.usageAnalytics.logSearchEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.facetClearAll, {
            facetId: cmp.options.id,
            facetField: cmp.options.field.toString(),
            facetTitle: cmp.options.title
        });
        cmp.queryController.executeQuery();
    };
    return FacetHeader;
}());
exports.FacetHeader = FacetHeader;
 
 
/***/ }),
/* 236 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Dom_1 = __webpack_require__(0);
var Utils_1 = __webpack_require__(5);
var Strings_1 = __webpack_require__(4);
var Component_1 = __webpack_require__(6);
var _ = __webpack_require__(1);
var SVGIcons_1 = __webpack_require__(16);
var SVGDom_1 = __webpack_require__(23);
var ValueElementRenderer = /** @class */ (function () {
    function ValueElementRenderer(facet, facetValue) {
        this.facet = facet;
        this.facetValue = facetValue;
    }
    ValueElementRenderer.prototype.withNo = function (element) {
        if (_.isArray(element)) {
            _.each(element, function (e) {
                if (e) {
                    Dom_1.$$(e).detach();
                }
            });
        }
        else {
            Eif (element) {
                Dom_1.$$(element).detach();
            }
        }
        return this;
    };
    ValueElementRenderer.prototype.build = function () {
        this.buildListItem();
        this.initAndAppendLabel();
        this.initAndAppendExcludeIcon();
        this.setCssClassOnListValueElement();
        this.addAccessibilityAttributesToTargetElement();
        return this;
    };
    ValueElementRenderer.prototype.setCssClassOnListValueElement = function () {
        Dom_1.$$(this.listItem).toggleClass('coveo-selected', this.facetValue.selected);
        Dom_1.$$(this.listItem).toggleClass('coveo-excluded', this.facetValue.excluded);
    };
    Object.defineProperty(ValueElementRenderer.prototype, "accessibleElement", {
        get: function () {
            return this.stylishCheckbox;
        },
        enumerable: true,
        configurable: true
    });
    ValueElementRenderer.prototype.buildExcludeIcon = function () {
        var isExcluded = this.facetValue.excluded;
        var excludeIcon = Dom_1.$$('div', {
            ariaLabel: Strings_1.l('ExcludeValueWithResultCount', this.caption, Strings_1.l('ResultCount', this.count, parseInt(this.count, 10))),
            className: 'coveo-facet-value-exclude',
            tabindex: 0,
            role: 'button',
            ariaPressed: isExcluded.toString()
        }).el;
        this.addFocusAndBlurEventListeners(excludeIcon);
        excludeIcon.innerHTML = isExcluded ? SVGIcons_1.SVGIcons.icons.plus : SVGIcons_1.SVGIcons.icons.checkboxHookExclusionMore;
        SVGDom_1.SVGDom.addClassToSVGInContainer(excludeIcon, isExcluded ? 'coveo-facet-value-unexclude-svg' : 'coveo-facet-value-exclude-svg');
        SVGDom_1.SVGDom.addAttributesToSVGInContainer(excludeIcon, { 'aria-hidden': 'true' });
        return excludeIcon;
    };
    ValueElementRenderer.prototype.buildValueComputedField = function () {
        var computedField = this.facetValue.getFormattedComputedField(this.facet.options.computedFieldFormat);
        Eif (Utils_1.Utils.isNonEmptyString(computedField)) {
            var elem = Dom_1.$$('span', {
                className: 'coveo-facet-value-computed-field'
            }).el;
            Dom_1.$$(elem).text(computedField);
            return elem;
        }
        else {
            return undefined;
        }
    };
    ValueElementRenderer.prototype.buildValueCheckbox = function () {
        var checkbox = Dom_1.$$('input', {
            type: 'checkbox',
            ariaHidden: true,
            ariaLabel: this.ariaLabel
        }).el;
        this.facetValue.selected ? checkbox.setAttribute('checked', 'checked') : checkbox.removeAttribute('checked');
        this.facetValue.excluded ? checkbox.setAttribute('disabled', 'disabled') : checkbox.removeAttribute('disabled');
        Component_1.Component.pointElementsToDummyForm(checkbox);
        return checkbox;
    };
    ValueElementRenderer.prototype.buildValueStylishCheckbox = function () {
        var checkbox = Dom_1.$$('div', {
            className: 'coveo-facet-value-checkbox',
            tabindex: 0
        }).el;
        checkbox.innerHTML = SVGIcons_1.SVGIcons.icons.checkboxHookExclusionMore;
        SVGDom_1.SVGDom.addClassToSVGInContainer(checkbox, 'coveo-facet-value-checkbox-svg');
        this.addFocusAndBlurEventListeners(checkbox);
        return checkbox;
    };
    ValueElementRenderer.prototype.buildValueIcon = function () {
        var icon = this.getValueIcon();
        if (Utils_1.Utils.exists(icon)) {
            return Dom_1.$$('img', {
                className: 'coveo-facet-value-icon coveo-icon',
                src: this.getValueIcon()
            }).el;
        }
        else {
            return this.buildValueIconFromSprite();
        }
    };
    ValueElementRenderer.prototype.getValueIcon = function () {
        if (Utils_1.Utils.exists(this.facet.options.valueIcon)) {
            return this.facet.options.valueIcon(this.facetValue);
        }
        else {
            return undefined;
        }
    };
    ValueElementRenderer.prototype.buildValueIconFromSprite = function () {
        return Dom_1.$$('div', {
            className: 'coveo-facet-value-icon coveo-icon ' + this.facet.options.field.substr(1) + ' ' + this.facetValue.value
        }).el;
    };
    ValueElementRenderer.prototype.buildValueCaption = function () {
        var valueCaption = Dom_1.$$('span', {
            className: 'coveo-facet-value-caption',
            title: this.caption,
            'data-original-value': this.facetValue.value
        }).el;
        Dom_1.$$(valueCaption).text(this.caption);
        return valueCaption;
    };
    ValueElementRenderer.prototype.buildValueCount = function () {
        if (Utils_1.Utils.isNonEmptyString(this.count)) {
            var countElement = Dom_1.$$('span', {
                className: 'coveo-facet-value-count'
            }).el;
            Dom_1.$$(countElement).text(this.count);
            return countElement;
        }
        else {
            return undefined;
        }
    };
    Object.defineProperty(ValueElementRenderer.prototype, "caption", {
        get: function () {
            return this.facet.getValueCaption(this.facetValue);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ValueElementRenderer.prototype, "count", {
        get: function () {
            return this.facetValue.getFormattedCount();
        },
        enumerable: true,
        configurable: true
    });
    ValueElementRenderer.prototype.addFocusAndBlurEventListeners = function (elem) {
        var _this = this;
        Dom_1.$$(elem).on('focus', function () { return Dom_1.$$(_this.listItem).addClass('coveo-focused'); });
        Dom_1.$$(elem).on('blur', function () { return Dom_1.$$(_this.listItem).removeClass('coveo-focused'); });
    };
    ValueElementRenderer.prototype.buildListItem = function () {
        this.listItem = Dom_1.$$('li', { className: 'coveo-facet-value coveo-facet-selectable', ariaLabel: this.ariaLabel }).el;
        Eif (!Dom_1.$$(this.listItem).canHandleEvent('touchstart')) {
            Dom_1.$$(this.listItem).addClass('coveo-with-hover');
        }
        this.listItem.setAttribute('data-value', this.facetValue.value);
    };
    ValueElementRenderer.prototype.initAndAppendLabel = function () {
        this.label = Dom_1.$$('label', { className: 'coveo-facet-value-label', role: 'group' }).el;
        this.tryToInitAndAppendComputedField();
        this.initAndAppendFacetValueLabelWrapper();
        this.listItem.appendChild(this.label);
    };
    ValueElementRenderer.prototype.initAndAppendExcludeIcon = function () {
        this.excludeIcon = this.buildExcludeIcon();
        this.attachExcludeIconEventHandlers();
        this.listItem.appendChild(this.excludeIcon);
    };
    ValueElementRenderer.prototype.attachExcludeIconEventHandlers = function () {
        var _this = this;
        Dom_1.$$(this.excludeIcon).on('mouseover', function () {
            Dom_1.$$(_this.listItem).addClass('coveo-facet-value-will-exclude');
        });
        Dom_1.$$(this.excludeIcon).on('mouseout', function () {
            Dom_1.$$(_this.listItem).removeClass('coveo-facet-value-will-exclude');
        });
    };
    ValueElementRenderer.prototype.tryToInitAndAppendComputedField = function () {
        if (!Utils_1.Utils.exists(this.facetValue.computedField)) {
            return;
        }
        this.computedField = this.buildValueComputedField();
        Iif (!this.computedField) {
            return;
        }
        this.label.appendChild(this.computedField);
        Dom_1.$$(this.label).addClass('coveo-with-computed-field');
    };
    ValueElementRenderer.prototype.initAndAppendFacetValueLabelWrapper = function () {
        this.facetValueLabelWrapper = Dom_1.$$('div', { className: 'coveo-facet-value-label-wrapper' }).el;
        this.initAndAppendCheckbox();
        this.initAndAppendStylishCheckbox();
        this.initAndAppendValueCaption();
        this.initAndAppendValueCount();
        this.label.appendChild(this.facetValueLabelWrapper);
    };
    ValueElementRenderer.prototype.initAndAppendCheckbox = function () {
        this.checkbox = this.buildValueCheckbox();
        this.facetValueLabelWrapper.appendChild(this.checkbox);
    };
    ValueElementRenderer.prototype.initAndAppendStylishCheckbox = function () {
        this.stylishCheckbox = this.buildValueStylishCheckbox();
        this.facetValueLabelWrapper.appendChild(this.stylishCheckbox);
    };
    ValueElementRenderer.prototype.initAndAppendValueCount = function () {
        this.valueCount = this.buildValueCount();
        if (!this.valueCount) {
            return;
        }
        this.facetValueLabelWrapper.appendChild(this.valueCount);
    };
    ValueElementRenderer.prototype.initAndAppendValueCaption = function () {
        this.valueCaption = this.buildValueCaption();
        this.facetValueLabelWrapper.appendChild(this.valueCaption);
    };
    ValueElementRenderer.prototype.addAccessibilityAttributesToTargetElement = function () {
        var el = this.accessibleElement;
        el.setAttribute('aria-label', this.ariaLabel);
        el.setAttribute('role', 'button');
        el.setAttribute('aria-pressed', this.ariaPressed);
    };
    Object.defineProperty(ValueElementRenderer.prototype, "ariaLabel", {
        get: function () {
            var resultCount = Strings_1.l('ResultCount', this.count, parseInt(this.count, 10));
            return "" + Strings_1.l('IncludeValueWithResultCount', this.caption, resultCount);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ValueElementRenderer.prototype, "ariaPressed", {
        get: function () {
            if (this.facetValue.excluded) {
                return 'mixed';
            }
            return this.facetValue.selected ? 'true' : 'false';
        },
        enumerable: true,
        configurable: true
    });
    return ValueElementRenderer;
}());
exports.ValueElementRenderer = ValueElementRenderer;
 
 
/***/ }),
/* 237 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var StringUtils_1 = __webpack_require__(34);
var _ = __webpack_require__(1);
var FacetValuesOrder = /** @class */ (function () {
    function FacetValuesOrder(facet, facetSort) {
        this.facet = facet;
        this.facetSort = facetSort;
    }
    FacetValuesOrder.prototype.reorderValues = function (facetValues) {
        if (this.facetSort && this.facetSort.activeSort) {
            if (this.usingCustomSort) {
                return this.reorderValuesWithCustomOrder(facetValues);
            }
            Eif (this.usingAlphabeticalSort) {
                return this.reorderValuesWithCustomCaption(facetValues);
            }
        }
        return facetValues;
    };
    FacetValuesOrder.prototype.reorderValuesIfUsingCustomSort = function (values) {
        return this.usingCustomSort ? this.reorderValuesWithCustomOrder(values) : values;
    };
    FacetValuesOrder.prototype.reorderValuesIfUsingAlphabeticalSort = function (values) {
        return this.usingAlphabeticalSort ? this.reorderValuesWithCustomCaption(values) : values;
    };
    Object.defineProperty(FacetValuesOrder.prototype, "usingCustomSort", {
        get: function () {
            return this.facetSort.activeSort.name == 'custom' && this.facet.options.customSort != undefined;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(FacetValuesOrder.prototype, "usingAlphabeticalSort", {
        get: function () {
            return this.facetSort.activeSort.name.indexOf('alpha') != -1;
        },
        enumerable: true,
        configurable: true
    });
    FacetValuesOrder.prototype.reorderValuesWithCustomOrder = function (facetValues) {
        var customSortsLowercase = _.map(this.facet.options.customSort, function (customSort) { return customSort.toLowerCase(); });
        var valueIndexPair = _.map(facetValues, function (facetValue, i) {
            // Get the index of the current value in the custom sort array.
            // If it's not found, put it's index to it's original value + the length of customSort so that's always after the specified custom sort order.
            var index = _.findIndex(customSortsLowercase, function (customSort) {
                return (StringUtils_1.StringUtils.equalsCaseInsensitive(customSort, facetValue.value) ||
                    (facetValue.lookupValue != null && StringUtils_1.StringUtils.equalsCaseInsensitive(customSort, facetValue.lookupValue)));
            });
            if (index == -1) {
                index = i + customSortsLowercase.length;
            }
            return { facetValue: facetValue, index: index };
        });
        var sorted = _.sortBy(valueIndexPair, 'index');
        sorted = this.facetSort.customSortDirection == 'ascending' ? sorted : sorted.reverse();
        return _.pluck(sorted, 'facetValue');
    };
    FacetValuesOrder.prototype.reorderValuesWithCustomCaption = function (facetValues) {
        var _this = this;
        var sorted = facetValues.sort(function (firstValue, secondValue) {
            return _this.facet.getValueCaption(firstValue).localeCompare(_this.facet.getValueCaption(secondValue), String['locale'], {
                sensitivity: 'base'
            });
        });
        if (this.facetSort.activeSort.name.indexOf('descending') != -1) {
            sorted = sorted.reverse();
        }
        return sorted;
    };
    return FacetValuesOrder;
}());
exports.FacetValuesOrder = FacetValuesOrder;
 
 
/***/ }),
/* 238 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __assign = (this && this.__assign) || Object.assign || function(t) {
    for (var s, i = 1, n = arguments.length; i < n; i++) {
        s = arguments[i];
        for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
            t[p] = s[p];
    }
    return t;
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { Iif (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        Iif (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            Iif (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
            Iif (y = 0, t) op = [0, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    Eif (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        Iif (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
Object.defineProperty(exports, "__esModule", { value: true });
var AllowedValuesPatternType_1 = __webpack_require__(233);
var Utils_1 = __webpack_require__(5);
var CategoryFacetQueryController = /** @class */ (function () {
    function CategoryFacetQueryController(categoryFacet) {
        this.categoryFacet = categoryFacet;
    }
    CategoryFacetQueryController.prototype.putCategoryFacetInQueryBuilder = function (queryBuilder, path, maximumNumberOfValues) {
        var positionInQuery = queryBuilder.categoryFacets.length;
        this.addQueryFilter(queryBuilder, path);
        this.addCategoryFacetRequest(queryBuilder, path, maximumNumberOfValues);
        return positionInQuery;
    };
    CategoryFacetQueryController.prototype.searchFacetValues = function (value, numberOfValues) {
        return __awaiter(this, void 0, void 0, function () {
            var lastQuery, groupByRequest, results, sortByNumberOfResultsThenPathLength;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        lastQuery = __assign({}, this.categoryFacet.queryController.getLastQuery());
                        groupByRequest = {
                            allowedValues: [this.getAllowedValuesPattern(value)],
                            allowedValuesPatternType: AllowedValuesPatternType_1.AllowedValuesPatternType.Wildcards,
                            maximumNumberOfValues: numberOfValues,
                            field: this.categoryFacet.options.field,
                            sortCriteria: 'occurrences',
                            injectionDepth: this.categoryFacet.options.injectionDepth
                        };
                        lastQuery.groupBy = [groupByRequest];
                        lastQuery.categoryFacets.splice(this.categoryFacet.positionInQuery, 1);
                        return [4 /*yield*/, this.categoryFacet.queryController.getEndpoint().search(lastQuery)];
                    case 1:
                        results = _a.sent();
                        sortByNumberOfResultsThenPathLength = function (firstGroupByValue, secondGroupByValue) {
                            if (firstGroupByValue.numberOfResults == secondGroupByValue.numberOfResults) {
                                return firstGroupByValue.value.length - secondGroupByValue.value.length;
                            }
                            return secondGroupByValue.numberOfResults - firstGroupByValue.numberOfResults;
                        };
                        return [2 /*return*/, results.groupByResults[0].values.sort(sortByNumberOfResultsThenPathLength)];
                }
            });
        });
    };
    CategoryFacetQueryController.prototype.addDebugGroupBy = function (queryBuilder, value) {
        queryBuilder.groupByRequests.push({
            field: this.categoryFacet.options.field,
            allowedValues: [".*" + Utils_1.Utils.escapeRegexCharacter(value) + ".*"],
            allowedValuesPatternType: AllowedValuesPatternType_1.AllowedValuesPatternType.Regex
        });
    };
    CategoryFacetQueryController.prototype.shouldAddFilterToQuery = function (path) {
        return path.length != 0 && !Utils_1.Utils.arrayEqual(path, this.categoryFacet.options.basePath);
    };
    CategoryFacetQueryController.prototype.addQueryFilter = function (queryBuilder, path) {
        if (this.shouldAddFilterToQuery(path)) {
            queryBuilder.advancedExpression.addFieldExpression(this.categoryFacet.options.field, '==', [
                path.join(this.categoryFacet.options.delimitingCharacter)
            ]);
        }
    };
    CategoryFacetQueryController.prototype.addCategoryFacetRequest = function (queryBuilder, path, maximumNumberOfValues) {
        var categoryFacetsRequest = {
            field: this.categoryFacet.options.field,
            path: path,
            injectionDepth: this.categoryFacet.options.injectionDepth,
            maximumNumberOfValues: maximumNumberOfValues,
            delimitingCharacter: this.categoryFacet.options.delimitingCharacter
        };
        queryBuilder.categoryFacets.push(categoryFacetsRequest);
    };
    CategoryFacetQueryController.prototype.getAllowedValuesPattern = function (value) {
        var basePath = this.categoryFacet.options.basePath;
        var delimiter = this.categoryFacet.options.delimitingCharacter;
        if (Utils_1.Utils.isNonEmptyArray(basePath)) {
            return "" + basePath.join(delimiter) + delimiter + "*" + value + "*";
        }
        return "*" + value + "*";
    };
    return CategoryFacetQueryController;
}());
exports.CategoryFacetQueryController = CategoryFacetQueryController;
 
 
/***/ }),
/* 239 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
var Template_1 = __webpack_require__(29);
var TemplateList_1 = __webpack_require__(135);
var _ = __webpack_require__(1);
var TableTemplate = /** @class */ (function (_super) {
    __extends(TableTemplate, _super);
    function TableTemplate() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        _this.defaultTemplate = "<td><a class=\"CoveoResultLink\"></a></td>\n                             <td><span class=\"CoveoExcerpt\"></span></td>\n                             <td><span class=\"CoveoFieldValue\" data-field=\"@date\" data-helper=\"date\"></span></td>";
        _this.defaultRoledTemplates = {
            'table-header': "<th style=\"width: 40%\">Link</th>\n                     <th>Excerpt</th>\n                     <th style=\"width: 20%\"\n                         class=\"CoveoSort coveo-table-header-sort\"\n                         data-sort-criteria=\"date ascending,date descending\"\n                         data-display-unselected-icon=\"false\">Date</th>",
            'table-footer': "<th>Link</th>\n                     <th>Excerpt</th>\n                     <th>Date</th>"
        };
        return _this;
    }
    TableTemplate.prototype.instantiateRoleToString = function (role) {
        var roledTemplate = _.find(this.templates, function (t) { return t.role === role; });
        if (roledTemplate) {
            return roledTemplate.instantiateToString(undefined, {});
        }
        else {
            return this.defaultRoledTemplates[role];
        }
    };
    TableTemplate.prototype.instantiateRoleToElement = function (role) {
        var _this = this;
        var roledTemplate = _.find(this.templates, function (t) { return t.role === role; });
        if (roledTemplate) {
            return roledTemplate.instantiateToElement(undefined, {});
        }
        else {
            var tmpl = new Template_1.Template(function () { return _this.defaultRoledTemplates[role]; });
            tmpl.layout = 'table';
            return tmpl.instantiateToElement(undefined);
        }
    };
    TableTemplate.prototype.getFallbackTemplate = function () {
        var _this = this;
        return new Template_1.Template(function () { return _this.defaultTemplate; });
    };
    TableTemplate.prototype.hasTemplateWithRole = function (role) {
        return _.find(this.templates, function (t) { return t.role === role; });
    };
    return TableTemplate;
}(TemplateList_1.TemplateList));
exports.TableTemplate = TableTemplate;
 
 
/***/ }),
/* 240 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var _ = __webpack_require__(1);
var FacetSearchValuesList = /** @class */ (function () {
    function FacetSearchValuesList(facet, facetValueElementKlass) {
        this.facet = facet;
        this.facetValueElementKlass = facetValueElementKlass;
    }
    FacetSearchValuesList.prototype.build = function (facetValues) {
        var _this = this;
        var valuesToBuildWith = _.map(facetValues, function (facetValue) {
            return (_.find(_this.facet.values.getAll(), function (valueAlreadyInFacet) {
                return valueAlreadyInFacet.value == facetValue.value;
            }) || facetValue);
        });
        return _.map(valuesToBuildWith, function (facetValue) {
            var valueElement = new _this.facetValueElementKlass(_this.facet, facetValue, _this.facet.keepDisplayedValuesNextTime).build();
            valueElement.renderer.excludeIcon.setAttribute('aria-hidden', 'true');
            valueElement.renderer.label.setAttribute('aria-hidden', 'true');
            return valueElement.renderer.listItem;
        });
    };
    return FacetSearchValuesList;
}());
exports.FacetSearchValuesList = FacetSearchValuesList;
 
 
/***/ }),
/* 241 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
var popper_js_1 = __webpack_require__(181);
__webpack_require__(1123);
var underscore_1 = __webpack_require__(1);
var InitializationEvents_1 = __webpack_require__(22);
var QueryStateModel_1 = __webpack_require__(17);
var Strings_1 = __webpack_require__(4);
var AccessibleButton_1 = __webpack_require__(20);
var Dom_1 = __webpack_require__(0);
var KeyboardUtils_1 = __webpack_require__(35);
var LocalStorageUtils_1 = __webpack_require__(96);
var SVGDom_1 = __webpack_require__(23);
var SVGIcons_1 = __webpack_require__(16);
var Utils_1 = __webpack_require__(5);
var AnalyticsActionListMeta_1 = __webpack_require__(7);
var FacetSort_1 = __webpack_require__(333);
/**
 * Handle the rendering of the {@link Facet} settings menu (typically the ... in the facet header).
 */
var FacetSettings = /** @class */ (function (_super) {
    __extends(FacetSettings, _super);
    function FacetSettings(sorts, facet) {
        var _this = _super.call(this, sorts, facet) || this;
        _this.sorts = sorts;
        _this.facet = facet;
        _this.customSortDirectionChange = false;
        _this.onDocumentClick = function () { return _this.close(); };
        _this.enabledSortsIgnoreRenderBecauseOfPairs = [];
        _this.filterDuplicateForRendering();
        return _this;
    }
    Object.defineProperty(FacetSettings.prototype, "isExpanded", {
        get: function () {
            return this.settingsButton && this.settingsButton.getAttribute('aria-expanded') === "" + true;
        },
        set: function (expanded) {
            this.settingsButton.setAttribute('aria-expanded', "" + expanded);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(FacetSettings.prototype, "firstFocusablePopupElement", {
        get: function () {
            return underscore_1.find(Dom_1.$$(this.settingsPopup).findAll('[tabindex]'), function (element) { return element.tabIndex >= 0; });
        },
        enumerable: true,
        configurable: true
    });
    /**
     * Build the menu, hook click events.
     * @returns {HTMLElement}
     */
    FacetSettings.prototype.build = function () {
        var _this = this;
        this.buildSettingsButton();
        this.buildSettingsPopup();
        if (Utils_1.Utils.isNonEmptyArray(this.enabledSorts)) {
            this.sortSection = this.buildSortSection();
            if (this.enabledSortsAllowDirection()) {
                this.directionSection = this.buildDirectionSection();
            }
        }
        if (this.facet.options.enableSettingsFacetState) {
            this.saveStateSection = this.buildSaveStateSection();
            this.clearStateSection = this.buildClearStateSection();
        }
        if (this.facet.options.enableCollapse) {
            this.hideSection = this.buildHideSection();
            this.showSection = this.buildShowSection();
        }
        var appendCommon = function () {
            _this.appendIfNotUndefined(_this.saveStateSection);
            _this.appendIfNotUndefined(_this.clearStateSection);
            _this.appendIfNotUndefined(_this.hideSection);
            _this.appendIfNotUndefined(_this.showSection);
        };
        this.addOnDocumentClickHandler();
        this.addOnNukeHandler();
        if (Utils_1.Utils.isNonEmptyArray(this.enabledSorts)) {
            this.settingsPopup.appendChild(this.sortSection.element);
            underscore_1.each(this.directionSection, function (d) {
                _this.appendIfNotUndefined(d);
            });
            appendCommon();
        }
        else {
            appendCommon();
        }
        return this.settingsButton;
    };
    /**
     * Restore the facet state from local storage, and apply it in the query state model.
     */
    FacetSettings.prototype.loadSavedState = function () {
        if (this.facetStateLocalStorage) {
            // set the state from the settings only if there is nothing
            // in the query state model for the current facet
            var state = this.facetStateLocalStorage.load();
            var currentStateIncluded = this.facet.queryStateModel.get(this.includedStateAttribute);
            var currentStateExcluded = this.facet.queryStateModel.get(this.excludedStateAttribute);
            var currentStateOperator = this.facet.queryStateModel.get(this.operatorStateAttribute);
            Eif (!Utils_1.Utils.isNullOrUndefined(state) &&
                Utils_1.Utils.isEmptyArray(currentStateIncluded) &&
                Utils_1.Utils.isEmptyArray(currentStateExcluded) &&
                !Utils_1.Utils.isNonEmptyString(currentStateOperator)) {
                var toSet = {};
                toSet[this.includedStateAttribute] = state.included;
                toSet[this.excludedStateAttribute] = state.excluded;
                toSet[this.operatorStateAttribute] = state.operator;
                this.facet.queryStateModel.setMultiple(toSet);
                this.loadedFromSettings = toSet;
            }
        }
        else {
            this.facet.logger.info('Facet state local storage not enabled : See Facet.options.enableSettingsFacetState');
        }
    };
    /**
     * Take the current state of the facet and save it in the local storage.
     */
    FacetSettings.prototype.saveState = function () {
        if (this.facetStateLocalStorage) {
            this.facetStateLocalStorage.save({
                included: this.facet.queryStateModel.get(this.includedStateAttribute),
                excluded: this.facet.queryStateModel.get(this.excludedStateAttribute),
                operator: this.facet.queryStateModel.get(this.operatorStateAttribute)
            });
        }
        else {
            this.facet.logger.info('Facet state local storage not enabled : See Facet.options.enableSettingsFacetState');
        }
    };
    /**
     * Close the settings menu
     */
    FacetSettings.prototype.close = function () {
        if (!this.isExpanded) {
            return;
        }
        this.isExpanded = false;
        Dom_1.$$(this.settingsPopup).detach();
    };
    /**
     * Open the settings menu
     */
    FacetSettings.prototype.open = function () {
        var _this = this;
        Dom_1.$$(this.settingsPopup).insertAfter(this.settingsButton);
        new popper_js_1.default(this.settingsButton, this.settingsPopup);
        this.isExpanded = true;
        if (this.hideSection && this.showSection) {
            Dom_1.$$(this.hideSection).toggle(!Dom_1.$$(this.facet.element).hasClass('coveo-facet-collapsed'));
            Dom_1.$$(this.showSection).toggle(Dom_1.$$(this.facet.element).hasClass('coveo-facet-collapsed'));
        }
        if (this.facet.options.enableSettingsFacetState) {
            Dom_1.$$(this.clearStateSection).toggle(!Utils_1.Utils.isNullOrUndefined(this.facetStateLocalStorage.load()));
        }
        underscore_1.each(this.enabledSorts, function (criteria, i) {
            if (_this.activeSort.name == criteria.name.toLowerCase()) {
                _this.selectItem(_this.getSortItem(criteria.name));
            }
            else {
                _this.unselectItem(_this.getSortItem(criteria.name));
            }
        });
        var elementToFocus = this.firstFocusablePopupElement;
        if (elementToFocus) {
            elementToFocus.focus();
        }
    };
    FacetSettings.prototype.getSortItem = function (sortName) {
        return underscore_1.find(this.sortSection.sortItems, function (sortItem) {
            return Dom_1.$$(sortItem).getAttribute('data-sort-name').toLowerCase() == sortName.replace('ascending|descending', '').toLowerCase();
        });
    };
    Object.defineProperty(FacetSettings.prototype, "button", {
        get: function () {
            return this.settingsButton;
        },
        enumerable: true,
        configurable: true
    });
    FacetSettings.prototype.buildSettingsButton = function () {
        var _this = this;
        this.settingsButton = Dom_1.$$('div', { className: 'coveo-facet-header-settings', 'aria-haspopup': 'true' }).el;
        this.settingsButton.innerHTML = SVGIcons_1.SVGIcons.icons.more;
        SVGDom_1.SVGDom.addClassToSVGInContainer(this.settingsButton, 'coveo-facet-settings-more-svg');
        this.hideElementOnMouseEnterLeave(this.settingsButton);
        this.isExpanded = false;
        new AccessibleButton_1.AccessibleButton()
            .withElement(this.settingsButton)
            .withLabel(Strings_1.l('Settings'))
            .withClickAction(function (e) { return _this.handleSettingsButtonClick(e); })
            .withEnterKeyboardAction(function (e) { return _this.handleSettingsButtonClick(e); })
            .build();
    };
    FacetSettings.prototype.hideElementOnMouseEnterLeave = function (el) {
        var _this = this;
        var mouseLeave = function () { return (_this.closeTimeout = window.setTimeout(function () { return _this.close(); }, 300)); };
        var mouseEnter = function () { return clearTimeout(_this.closeTimeout); };
        Dom_1.$$(el).on('mouseleave', mouseLeave);
        Dom_1.$$(el).on('mouseenter', mouseEnter);
        Dom_1.$$(el).on('keyup', KeyboardUtils_1.KeyboardUtils.keypressAction(KeyboardUtils_1.KEYBOARD.ESCAPE, function () { return _this.handleKeyboardClose(); }));
    };
    FacetSettings.prototype.handleKeyboardClose = function () {
        this.close();
        this.settingsButton.focus();
    };
    FacetSettings.prototype.buildSettingsPopup = function () {
        var _this = this;
        this.settingsPopup = Dom_1.$$('div', { className: 'coveo-facet-settings-popup' }).el;
        this.hideElementOnMouseEnterLeave(this.settingsPopup);
        Dom_1.$$(this.settingsPopup).on('focusout', function (e) {
            Iif (e.relatedTarget && _this.settingsPopup.contains(e.relatedTarget)) {
                return;
            }
            _this.close();
        });
    };
    FacetSettings.prototype.buildSortSection = function () {
        var sortSection = this.buildSection('coveo-facet-settings-section-sort');
        var sortSectionIcon = this.buildIcon('coveo-facet-settings-section-sort-svg', SVGIcons_1.SVGIcons.icons.sort);
        var sortSectionItems = this.buildItems();
        var sortTitle = document.createElement('div');
        Dom_1.$$(sortTitle).addClass('coveo-facet-settings-section-sort-title');
        Dom_1.$$(sortTitle).text(Strings_1.l('SortBy') + ' :');
        sortSectionItems.appendChild(sortTitle);
        var sortItems = this.buildSortSectionItems();
        underscore_1.each(sortItems, function (s) {
            sortSectionItems.appendChild(s);
        });
        sortSection.appendChild(sortSectionIcon);
        sortSection.appendChild(sortSectionItems);
        return { element: sortSection, sortItems: sortItems };
    };
    FacetSettings.prototype.buildSortSectionItems = function () {
        var _this = this;
        var elems = underscore_1.map(this.enabledSorts, function (enabledSort) {
            if (underscore_1.contains(_this.enabledSortsIgnoreRenderBecauseOfPairs, enabledSort)) {
                return undefined;
            }
            else {
                var elem = _this.buildItem(Strings_1.l(enabledSort.label), enabledSort.description);
                Dom_1.$$(elem).setAttribute('data-sort-name', enabledSort.name.toLowerCase().replace('ascending|descending', ''));
                new AccessibleButton_1.AccessibleButton()
                    .withElement(elem)
                    .withSelectAction(function (e) { return _this.handleClickSortButton(e, enabledSort); })
                    .withLabel(enabledSort.label)
                    .build();
                return elem;
            }
        });
        elems = underscore_1.compact(elems);
        return elems;
    };
    FacetSettings.prototype.closePopupAndUpdateSort = function () {
        this.close();
        Eif (this.activeSort.name != 'custom') {
            this.facet.updateSort(this.activeSort.name);
        }
        else {
            this.facet.updateSort('nosort');
            if (this.customSortDirectionChange) {
                this.customSortDirectionChange = false;
                this.facet.queryController.executeQuery();
            }
        }
    };
    FacetSettings.prototype.enabledSortsAllowDirection = function () {
        var _this = this;
        var allEnabledSortsWithPossibleDirectionToggle = underscore_1.filter(this.enabledSorts, function (facetSortDescription) {
            return facetSortDescription.directionToggle;
        });
        var allowToggle = underscore_1.filter(allEnabledSortsWithPossibleDirectionToggle, function (possibleDirectionToggle) {
            return underscore_1.findWhere(_this.enabledSorts, { name: possibleDirectionToggle.relatedSort }) != undefined;
        });
        return allowToggle.length > 0;
    };
    FacetSettings.prototype.buildDirectionSection = function () {
        var _this = this;
        var directionAscendingSection = this.buildAscendingOrDescendingSection('Ascending');
        var iconAscending = this.buildIcon('coveo-facet-settings-section-direction-ascending-svg', SVGIcons_1.SVGIcons.icons.ascending);
        var iconDescending = this.buildIcon('coveo-facet-settings-section-direction-descending-svg', SVGIcons_1.SVGIcons.icons.descending);
        var directionItemsAscending = this.buildItems();
        var ascending = this.buildAscendingOrDescending('Ascending');
        directionItemsAscending.appendChild(ascending);
        directionAscendingSection.appendChild(iconAscending);
        directionAscendingSection.appendChild(directionItemsAscending);
        new AccessibleButton_1.AccessibleButton()
            .withElement(ascending)
            .withoutLabelOrTitle()
            .withSelectAction(function () { return _this.handleDirectionClick(ascending, 'ascending'); })
            .build();
        this.unselectSection(directionAscendingSection);
        var directionDescendingSection = this.buildAscendingOrDescendingSection('Descending');
        var directionItemsDescending = this.buildItems();
        var descending = this.buildAscendingOrDescending('Descending');
        directionItemsDescending.appendChild(descending);
        directionDescendingSection.appendChild(iconDescending);
        directionDescendingSection.appendChild(directionItemsDescending);
        new AccessibleButton_1.AccessibleButton()
            .withElement(descending)
            .withoutLabelOrTitle()
            .withSelectAction(function () { return _this.handleDirectionClick(descending, 'descending'); })
            .build();
        this.unselectSection(directionDescendingSection);
        if (!this.activeSort.directionToggle) {
            Dom_1.$$(directionAscendingSection).addClass('coveo-facet-settings-disabled');
            Dom_1.$$(directionDescendingSection).addClass('coveo-facet-settings-disabled');
        }
        else {
            this.selectItem(this.getItems(directionAscendingSection)[0]);
        }
        return [directionAscendingSection, directionDescendingSection];
    };
    FacetSettings.prototype.buildSaveStateSection = function () {
        var _this = this;
        var saveStateSection = this.buildSection('coveo-facet-settings-section-save-state');
        var icon = this.buildIcon('coveo-facet-settings-section-save-state-svg', SVGIcons_1.SVGIcons.icons.dropdownMore);
        var saveStateItems = this.buildItems();
        this.facetStateLocalStorage = new LocalStorageUtils_1.LocalStorageUtils('facet-state-' + this.facet.options.id);
        this.includedStateAttribute = QueryStateModel_1.QueryStateModel.getFacetId(this.facet.options.id);
        this.excludedStateAttribute = QueryStateModel_1.QueryStateModel.getFacetId(this.facet.options.id, false);
        this.operatorStateAttribute = QueryStateModel_1.QueryStateModel.getFacetOperator(this.facet.options.id);
        var saveStateItem = document.createElement('div');
        Dom_1.$$(saveStateItem).addClass('coveo-facet-settings-item');
        saveStateItem.setAttribute('title', Strings_1.l('SaveFacetState'));
        Dom_1.$$(saveStateItem).text(Strings_1.l('SaveFacetState'));
        saveStateItems.appendChild(saveStateItem);
        saveStateSection.appendChild(icon);
        saveStateSection.appendChild(saveStateItems);
        new AccessibleButton_1.AccessibleButton()
            .withElement(saveStateSection)
            .withSelectAction(function () { return _this.handleSaveStateClick(); })
            .withoutLabelOrTitle()
            .build();
        return saveStateSection;
    };
    FacetSettings.prototype.buildClearStateSection = function () {
        var _this = this;
        var clearStateSection = this.buildSection('coveo-facet-settings-section-clear-state');
        var icon = this.buildIcon('coveo-facet-settings-section-clear-state-svg', SVGIcons_1.SVGIcons.icons.dropdownLess);
        var clearStateItems = this.buildItems();
        var clearStateItem = this.buildItem(Strings_1.l('ClearFacetState'));
        clearStateItems.appendChild(clearStateItem);
        clearStateSection.appendChild(icon);
        clearStateSection.appendChild(clearStateItems);
        new AccessibleButton_1.AccessibleButton()
            .withElement(clearStateSection)
            .withSelectAction(function () { return _this.handleClearStateClick(); })
            .withoutLabelOrTitle()
            .build();
        return clearStateSection;
    };
    FacetSettings.prototype.buildHideSection = function () {
        var _this = this;
        var hideSection = this.buildSection('coveo-facet-settings-section-hide');
        var icon = this.buildIcon('coveo-facet-settings-section-hide-svg', SVGIcons_1.SVGIcons.icons.facetCollapse);
        var hideItems = this.buildItems();
        var hideItem = this.buildItem(Strings_1.l('Collapse'));
        hideItems.appendChild(hideItem);
        hideSection.appendChild(icon);
        hideSection.appendChild(hideItems);
        new AccessibleButton_1.AccessibleButton()
            .withElement(hideSection)
            .withSelectAction(function () {
            _this.facet.facetHeader.collapseFacet();
            _this.close();
        })
            .withLabel(Strings_1.l('CollapseFacet', this.facet.options.title))
            .build();
        return hideSection;
    };
    FacetSettings.prototype.buildShowSection = function () {
        var _this = this;
        var showSection = this.buildSection('coveo-facet-settings-section-show');
        var icon = this.buildIcon('coveo-facet-settings-section-show-svg', SVGIcons_1.SVGIcons.icons.facetExpand);
        var showItems = this.buildItems();
        var showItem = this.buildItem(Strings_1.l('Expand'));
        showItems.appendChild(showItem);
        showSection.appendChild(icon);
        showSection.appendChild(showItems);
        new AccessibleButton_1.AccessibleButton()
            .withElement(showSection)
            .withSelectAction(function () {
            _this.facet.facetHeader.expandFacet();
            _this.close();
        })
            .withLabel(Strings_1.l('ExpandFacet', this.facet.options.title))
            .build();
        return showSection;
    };
    FacetSettings.prototype.buildIcon = function (iconClass, svgIcon) {
        Eif (iconClass && svgIcon) {
            var icon = Dom_1.$$('div', { className: 'coveo-icon-container' }, svgIcon);
            SVGDom_1.SVGDom.addClassToSVGInContainer(icon.el, iconClass);
            return icon.el;
        }
        else {
            return Dom_1.$$('div', { className: 'coveo-icon' }).el;
        }
    };
    FacetSettings.prototype.buildAscendingOrDescending = function (direction) {
        var elem = this.buildItem(Strings_1.l(direction));
        elem.setAttribute('aria-disabled', 'true');
        elem.setAttribute('data-direction', direction.toLowerCase());
        return elem;
    };
    FacetSettings.prototype.buildAscendingOrDescendingSection = function (direction) {
        return this.buildSection('coveo-facet-settings-section-direction-' + direction.toLowerCase());
    };
    FacetSettings.prototype.buildItem = function (label, title) {
        if (title === void 0) { title = label; }
        return Dom_1.$$('div', {
            className: 'coveo-facet-settings-item',
            title: title
        }, underscore_1.escape(label)).el;
    };
    FacetSettings.prototype.buildItems = function () {
        var elem = document.createElement('div');
        Dom_1.$$(elem).addClass('coveo-facet-settings-items');
        return elem;
    };
    FacetSettings.prototype.buildSection = function (className) {
        var section = document.createElement('div');
        Dom_1.$$(section).addClass(['coveo-facet-settings-section', className]);
        return section;
    };
    FacetSettings.prototype.handleSettingsButtonClick = function (event) {
        event.stopPropagation();
        var settingsPopupIsOpen = !Utils_1.Utils.isNullOrUndefined(this.settingsPopup.parentElement);
        settingsPopupIsOpen ? this.close() : this.open();
    };
    FacetSettings.prototype.handleClickSortButton = function (e, enabledSort) {
        Eif (this.activeSort != enabledSort && this.activeSort.relatedSort != enabledSort.name) {
            this.activeSort = enabledSort;
            if (enabledSort.directionToggle && underscore_1.contains(this.enabledSorts, FacetSettings.availableSorts[this.activeSort.relatedSort])) {
                this.activateDirectionSection();
            }
            else {
                this.disableDirectionSection();
            }
            this.unselectSection(this.sortSection.element);
            this.selectItem(e.target);
            this.closePopupAndUpdateSort();
        }
    };
    FacetSettings.prototype.handleDirectionClick = function (item, direction) {
        var _this = this;
        Eif (item.getAttribute('aria-disabled') === 'false' && this.activeSort.name.indexOf(direction) === -1) {
            this.activeSort = FacetSettings.availableSorts[this.activeSort.relatedSort];
            underscore_1.each(this.directionSection, function (d) {
                _this.unselectSection(d);
            });
            this.selectItem(item);
            Iif (this.activeSort.name == 'custom' && this.customSortDirection != direction) {
                this.customSortDirection = direction;
                this.customSortDirectionChange = true;
            }
            this.closePopupAndUpdateSort();
        }
    };
    FacetSettings.prototype.handleSaveStateClick = function () {
        this.saveState();
        this.close();
    };
    FacetSettings.prototype.handleClearStateClick = function () {
        var _this = this;
        this.facetStateLocalStorage.remove();
        this.facet.reset();
        this.close();
        this.facet.triggerNewQuery(function () {
            return _this.facet.usageAnalytics.logSearchEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.facetClearAll, {
                facetId: _this.facet.options.id,
                facetField: _this.facet.options.field.toString(),
                facetTitle: _this.facet.options.title
            });
        });
    };
    FacetSettings.prototype.addOnNukeHandler = function () {
        var _this = this;
        Dom_1.$$(this.facet.root).on(InitializationEvents_1.InitializationEvents.nuke, function () { return _this.handleNuke(); });
    };
    FacetSettings.prototype.addOnDocumentClickHandler = function () {
        var _this = this;
        document.addEventListener('click', function () { return _this.onDocumentClick(); });
    };
    FacetSettings.prototype.getCurrentDirectionItem = function (directionSection) {
        var _this = this;
        Eif (directionSection === void 0) { directionSection = this.directionSection; }
        var found;
        underscore_1.each(directionSection, function (direction) {
            if (!found) {
                found = underscore_1.find(_this.getItems(direction), function (direction) {
                    return _this.activeSort.name.indexOf(direction.getAttribute('data-direction')) != -1;
                });
            }
        });
        Iif (!found) {
            found = directionSection[0];
        }
        return found;
    };
    FacetSettings.prototype.activateDirectionSection = function () {
        var _this = this;
        underscore_1.each(this.directionSection, function (direction) {
            Dom_1.$$(direction).removeClass('coveo-facet-settings-disabled');
            Dom_1.$$(direction).find('.coveo-facet-settings-item').setAttribute('aria-disabled', 'false');
            _this.unselectSection(direction);
        });
        this.selectItem(this.getCurrentDirectionItem());
    };
    FacetSettings.prototype.disableDirectionSection = function () {
        var _this = this;
        underscore_1.each(this.directionSection, function (direction) {
            Dom_1.$$(direction).addClass('coveo-facet-settings-disabled');
            Dom_1.$$(direction).find('.coveo-facet-settings-item').setAttribute('aria-disabled', 'true');
            _this.unselectSection(direction);
        });
    };
    FacetSettings.prototype.getItems = function (section) {
        return Dom_1.$$(section).findAll('.coveo-facet-settings-item');
    };
    FacetSettings.prototype.unselectSection = function (section) {
        var _this = this;
        underscore_1.each(this.getItems(section), function (i) { return _this.unselectItem(i); });
    };
    FacetSettings.prototype.selectItem = function (item) {
        Eif (item) {
            Dom_1.$$(item).addClass('coveo-selected');
            item.setAttribute('aria-pressed', 'true');
        }
    };
    FacetSettings.prototype.unselectItem = function (item) {
        if (item) {
            Dom_1.$$(item).removeClass('coveo-selected');
            item.setAttribute('aria-pressed', 'false');
        }
    };
    FacetSettings.prototype.filterDuplicateForRendering = function () {
        var _this = this;
        underscore_1.each(this.enabledSorts, function (enabledSort, i) {
            if (enabledSort.relatedSort != null) {
                for (var j = i + 1; j < _this.enabledSorts.length; j++) {
                    if (_this.enabledSorts[j].name == enabledSort.relatedSort) {
                        _this.enabledSortsIgnoreRenderBecauseOfPairs.push(_this.enabledSorts[j]);
                        break;
                    }
                }
            }
        });
    };
    FacetSettings.prototype.appendIfNotUndefined = function (toAppend) {
        if (!Utils_1.Utils.isNullOrUndefined(toAppend)) {
            this.settingsPopup.appendChild(toAppend);
        }
    };
    FacetSettings.prototype.handleNuke = function () {
        document.removeEventListener('click', this.onDocumentClick);
    };
    return FacetSettings;
}(FacetSort_1.FacetSort));
exports.FacetSettings = FacetSettings;
 
 
/***/ }),
/* 242 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
/// <reference path='../Facet/Facet.ts' />
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __assign = (this && this.__assign) || Object.assign || function(t) {
    for (var s, i = 1, n = arguments.length; i < n; i++) {
        s = arguments[i];
        for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
            t[p] = s[p];
    }
    return t;
};
Object.defineProperty(exports, "__esModule", { value: true });
var Facet_1 = __webpack_require__(32);
var ComponentOptions_1 = __webpack_require__(13);
var TemplateHelpers_1 = __webpack_require__(141);
var FacetRangeQueryController_1 = __webpack_require__(1124);
var Initialization_1 = __webpack_require__(8);
var Globalize = __webpack_require__(28);
var GlobalExports_1 = __webpack_require__(10);
var ResponsiveFacetOptions_1 = __webpack_require__(100);
var ResponsiveFacets_1 = __webpack_require__(146);
var underscore_1 = __webpack_require__(1);
/**
 * A `FacetRange` is a [facet](https://docs.coveo.com/en/198/) whose values are expressed as ranges.
 *
 * You must set the [`field`]{@link Facet.options.field} option to a value targeting a numeric or date [field](https://docs.coveo.com/en/200/) in your index for this component to work.
 *
 * This component extends the [`Facet`]{@link Facet} component and supports all `Facet` options except:
 *
 * - **Settings** menu options
 *   - [`enableSettings`]{@link Facet.options.enableSettings}
 *   - [`enableSettingsFacetState`]{@link Facet.options.enableSettingsFacetState}
 *   - [`enableCollapse`]{@link Facet.options.enableCollapse}
 *   - [`availableSorts`]{@link Facet.options.availableSorts}
 *   - [`customSort`]{@link Facet.options.customSort}
 *   - [`computedFieldCaption`]{@link Facet.options.computedFieldCaption}
 * - **Facet Search** options
 *   - [`enableFacetSearch`]{@link Facet.options.enableFacetSearch}
 *   - [`facetSearchDelay`]{@link Facet.options.facetSearchDelay}
 *   - [`facetSearchIgnoreAccents`]{@link Facet.options.facetSearchIgnoreAccents}
 *   - [`numberOfValuesInFacetSearch`]{@link Facet.options.numberOfValuesInFacetSearch}
 * - **More and Less** options
 *   - [`enableMoreLess`]{@link Facet.options.enableMoreLess}
 *   - [`pageSize`]{@link Facet.options.pageSize}
 *
 *  @notSupportedIn salesforcefree
 */
var FacetRange = /** @class */ (function (_super) {
    __extends(FacetRange, _super);
    /**
     * Creates a new `FacetRange`.
     * @param element The HTML element on which to instantiate the component.
     * @param options The configuration options to apply when creating the component.
     * @param bindings The bindings required by the component.
     */
    function FacetRange(element, options, bindings) {
        var _this = _super.call(this, element, ComponentOptions_1.ComponentOptions.initComponentOptions(element, FacetRange, options), bindings, FacetRange.ID) || this;
        _this.element = element;
        _this.isFieldValueCompatible = false;
        _this.options.enableFacetSearch = false;
        _this.options.enableSettings = false;
        _this.options.includeInOmnibox = false;
        _this.options.enableMoreLess = false;
        ResponsiveFacets_1.ResponsiveFacets.init(_this.root, _this, _this.options);
        return _this;
    }
    FacetRange.prototype.getValueCaption = function (facetValue) {
        if (this.options.valueCaption || this.isLabelSpecifiedForValue(facetValue)) {
            return _super.prototype.getValueCaption.call(this, facetValue);
        }
        return this.translateValuesFromFormat(facetValue);
    };
    FacetRange.prototype.isLabelSpecifiedForValue = function (facetValue) {
        return this.options.ranges && !!underscore_1.find(this.options.ranges, function (range) { return !underscore_1.isUndefined(range.label) && range.label === facetValue.lookupValue; });
    };
    FacetRange.prototype.initFacetQueryController = function () {
        this.facetQueryController = new FacetRangeQueryController_1.FacetRangeQueryController(this);
    };
    FacetRange.prototype.processNewGroupByResults = function (groupByResults) {
        var _this = this;
        if (groupByResults != null && this.options.ranges == null) {
            groupByResults.values.sort(function (valueA, valueB) { return _this.sortRangeGroupByResults(valueA.value, valueB.value); });
        }
        _super.prototype.processNewGroupByResults.call(this, groupByResults);
    };
    FacetRange.prototype.sortRangeGroupByResults = function (valueA, valueB) {
        var startEndA = this.extractStartAndEndValue(valueA);
        var startEndB = this.extractStartAndEndValue(valueB);
        var firstValue;
        var secondValue;
        if (!startEndA) {
            firstValue = valueA;
        }
        else {
            firstValue = startEndA.start;
        }
        if (!startEndB) {
            secondValue = valueB;
        }
        else {
            secondValue = startEndB.start;
        }
        if (this.options.dateField) {
            return Date.parse(firstValue) - Date.parse(secondValue);
        }
        return Number(firstValue) - Number(secondValue);
    };
    FacetRange.prototype.translateValuesFromFormat = function (facetValue) {
        var startAndEnd = this.extractStartAndEndValue(facetValue.lookupValue || facetValue.value);
        if (!startAndEnd) {
            return null;
        }
        return this.formatValue(startAndEnd.start) + " - " + this.formatValue(startAndEnd.end);
    };
    FacetRange.prototype.extractStartAndEndValue = function (value) {
        var startAndEnd = /^(.*)\.\.(.*)$/.exec(value);
        if (startAndEnd == null) {
            return null;
        }
        return {
            start: startAndEnd[1],
            end: startAndEnd[2]
        };
    };
    FacetRange.prototype.formatValue = function (value) {
        var isNumber = !!value.match(/^[\+\-]?[0-9]+(\.[0-9]+)?$/);
        return this.options.dateField || !isNumber ? this.formatDateValue(value) : this.formatNumberValue(Number(value));
    };
    FacetRange.prototype.formatDateValue = function (value) {
        var helper = TemplateHelpers_1.TemplateHelpers.getHelper('dateTime');
        var helperOptions = {
            alwaysIncludeTime: false,
            includeTimeIfThisWeek: false,
            includeTimeIfToday: false,
            omitYearIfCurrentOne: false,
            useTodayYesterdayAndTomorrow: false,
            useWeekdayIfThisWeek: false
        };
        return helper(value, helperOptions);
    };
    FacetRange.prototype.formatNumberValue = function (value) {
        return Globalize.format(value, this.options.valueFormat);
    };
    FacetRange.ID = 'FacetRange';
    FacetRange.parent = Facet_1.Facet;
    FacetRange.doExport = function () {
        GlobalExports_1.exportGlobally({
            FacetRange: FacetRange
        });
    };
    /**
     * The options for the component
     * @componentOptions
     */
    FacetRange.options = __assign({ 
        /**
         * Whether the specified [`field`]{@link Facet.options.field} option value targets a date field in your index.
         *
         * This allows the component to correctly build the outgoing [Group By](https://docs.coveo.com/en/203/).
         *
         * **Default:** `false`.
         */
        dateField: ComponentOptions_1.ComponentOptions.buildBooleanOption({ defaultValue: false }), 
        /**
         * The list of [range values]{@link IRangeValue} to request (see [Requesting Specific FacetRange Values](https://docs.coveo.com/en/2790/)).
         *
         * By default, the index automatically generates range values.
         *
         * **Note:**
         * > The index cannot automatically generate range values for a `FacetRange` whose [`field`]{@link Facet.options.field} option value references a dynamic field generated by a [query function](https://docs.coveo.com/en/232/). In such a case, you _must_ use the `ranges` option.
         */
        ranges: ComponentOptions_1.ComponentOptions.buildJsonOption(), 
        /**
         * The format to apply to the range values. Only works for numeric values.
         *
         * Some of the most commonly used formats are:
         *
         * - `c0`: format  a numeric value as currency.
         * - `n0`: formats a numeric value as an integer.
         * - `n2`: formats a numeric value as a floating point number with two decimal digits.
         *
         * The available formats are defined in the [Globalize](https://github.com/klaaspieter/jquery-global#numbers) library.
         *
         * **Note:** This option is ignored when the [`valueCaption`]{@link Facet.options.valueCaption} is defined.
         */
        valueFormat: ComponentOptions_1.ComponentOptions.buildStringOption({ defaultValue: 'n0' }) }, ResponsiveFacetOptions_1.ResponsiveFacetOptions);
    return FacetRange;
}(Facet_1.Facet));
exports.FacetRange = FacetRange;
Initialization_1.Initialization.registerAutoCreateComponent(FacetRange);
 
 
/***/ }),
/* 243 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
/// <reference path="../Facet/FacetHeader.ts" />
/// <reference path="../../controllers/FacetSliderQueryController.ts" />
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __assign = (this && this.__assign) || Object.assign || function(t) {
    for (var s, i = 1, n = arguments.length; i < n; i++) {
        s = arguments[i];
        for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
            t[p] = s[p];
    }
    return t;
};
Object.defineProperty(exports, "__esModule", { value: true });
__webpack_require__(1125);
var underscore_1 = __webpack_require__(1);
var FacetSliderQueryController_1 = __webpack_require__(695);
var BreadcrumbEvents_1 = __webpack_require__(33);
var InitializationEvents_1 = __webpack_require__(22);
var QueryEvents_1 = __webpack_require__(14);
var SearchAlertEvents_1 = __webpack_require__(86);
var SliderEvents_1 = __webpack_require__(298);
var GlobalExports_1 = __webpack_require__(10);
var Assert_1 = __webpack_require__(12);
var MiscModules_1 = __webpack_require__(97);
var Model_1 = __webpack_require__(26);
var QueryStateModel_1 = __webpack_require__(17);
var Strings_1 = __webpack_require__(4);
var AccessibilityUtils_1 = __webpack_require__(81);
var Dom_1 = __webpack_require__(0);
var SVGDom_1 = __webpack_require__(23);
var SVGIcons_1 = __webpack_require__(16);
var Utils_1 = __webpack_require__(5);
var AnalyticsActionListMeta_1 = __webpack_require__(7);
var Component_1 = __webpack_require__(6);
var ComponentOptions_1 = __webpack_require__(13);
var Initialization_1 = __webpack_require__(8);
var FacetHeader_1 = __webpack_require__(235);
var Slider_1 = __webpack_require__(696);
var ResponsiveComponentsUtils_1 = __webpack_require__(93);
var ResponsiveDropdown_1 = __webpack_require__(180);
var ResponsiveFacetOptions_1 = __webpack_require__(100);
var ResponsiveFacetSlider_1 = __webpack_require__(1466);
/**
 * The `FacetSlider` component creates a facet which contains a slider widget that allows the end user to filter results
 * based on a range of numerical values (e.g., a date range, a price range, etc.).
 *
 * **Note:**
 * > This component does **not** inherit from the [`Facet`]{@link Facet} component. Consequently, it does not offer the
 * > same configuration options. Moreover, some of the `FacetSlider` options (see
 * > [`getSteps`]{@link FacetSlider.options.getSteps} and [`valueCaption`]{@link FacetSlider.options.valueCaption})
 * > cannot be configured as `data-` attributes in the markup. If you wish to configure those options, you must either
 * > do so in the [`init`]{@link init} call of your search interface (see
 * > [Passing Component Options in the init Call](https://docs.coveo.com/en/346/#passing-component-options-in-the-init-call)),
 * > or before the `init` call, using the `options` top-level function (see
 * > [Passing Component Options Before the init Call](https://docs.coveo.com/en/346/#passing-component-options-before-the-init-call)).
 * @notSupportedIn salesforcefree
 */
var FacetSlider = /** @class */ (function (_super) {
    __extends(FacetSlider, _super);
    /**
     * Creates a new `FacetSlider` component. Binds multiple query events as well.
     * @param element The HTMLElement on which to instantiate the component.
     * @param options The options for the `FacetSlider` component.
     * @param bindings The bindings that the component requires to function normally. If not set, these will be
     * automatically resolved (with a slower execution time).
     * @param slider
     */
    function FacetSlider(element, options, bindings, slider) {
        var _this = _super.call(this, element, FacetSlider.ID, bindings) || this;
        _this.element = element;
        _this.options = options;
        _this.slider = slider;
        _this.isSimpleSliderConfig = false;
        _this.isFieldValueCompatible = false;
        _this.isEmpty = false;
        _this.options = ComponentOptions_1.ComponentOptions.initComponentOptions(element, FacetSlider, options);
        _this.isSimpleSliderConfig = _this.options.start != null && _this.options.end != null;
        ResponsiveFacetSlider_1.ResponsiveFacetSlider.init(_this.root, _this, _this.options);
        Iif (_this.options.excludeOuterBounds == null) {
            _this.options.excludeOuterBounds = false;
        }
        _this.normalizeStartAndEndOptionsValues();
        _this.facetQueryController = new FacetSliderQueryController_1.FacetSliderQueryController(_this);
        _this.bindQueryStateEvents();
        _this.bindQueryEvents();
        _this.bindResizeEvents();
        _this.bindBreadcrumbEvents();
        _this.bind.onRootElement(SearchAlertEvents_1.SearchAlertsEvents.searchAlertsPopulateMessage, function (args) {
            return _this.handlePopulateSearchAlerts(args);
        });
        return _this;
    }
    FacetSlider.prototype.isCurrentlyDisplayed = function () {
        if (!Dom_1.$$(this.element).isVisible()) {
            return false;
        }
        if (Dom_1.$$(this.element).hasClass('coveo-disabled-empty')) {
            return false;
        }
        return true;
    };
    FacetSlider.prototype.createDom = function () {
        this.facetHeader = new FacetHeader_1.FacetHeader({
            field: this.options.field,
            facetElement: this.element,
            title: this.options.title,
            enableClearElement: true,
            enableCollapseElement: true,
            facetSlider: this
        });
        this.element.appendChild(this.facetHeader.build());
    };
    /**
     * Resets the `FacetSlider` (meaning that you need to set the range value as inactive).
     */
    FacetSlider.prototype.reset = function () {
        if (this.slider) {
            this.slider.initializeState();
            this.updateQueryState();
            this.updateAppearanceDependingOnState();
        }
    };
    /**
     * Gets the current selection in the slider.
     *
     * **Note:**
     * > This method returns an array of number for selected date values. These numbers represent a number of milliseconds
     * > before or after January 1, 1970. Therefore, you can use these numbers to instantiate standard JavaScript Date
     * > objects.
     *
     * @returns {any} An array of number containing the first and last selected values, if possible. An array containing
     * two `undefined` values otherwise.
     */
    FacetSlider.prototype.getSelectedValues = function () {
        if (this.startOfSlider != undefined && this.endOfSlider != undefined) {
            return [this.startOfSlider, this.endOfSlider];
        }
        else {
            return [undefined, undefined];
        }
    };
    /**
     * Sets the selected values in the slider.
     *
     * **Note:**
     * > You must set date values with numbers representing a number of milliseconds before or after January 1, 1970. You
     * > can easily extract such numbers from standard JavaScript Date objects.
     *
     * @param values [start, end] An array containing the first and last values to select in the slider.
     */
    FacetSlider.prototype.setSelectedValues = function (values) {
        this.setupSliderIfNeeded(undefined);
        this.startOfSlider = values[0];
        this.endOfSlider = values[1];
        this.slider.setValues([this.startOfSlider, this.endOfSlider]);
        this.updateAppearanceDependingOnState();
    };
    /**
     * Indicates whether the `FacetSlider` is active. An active `FacetSlider` outputs an expression in the query when a
     * search is performed.
     * @returns {boolean} `true` if the FacetSlider is active; `false` otherwise.
     */
    FacetSlider.prototype.isActive = function () {
        return (!isNaN(this.startOfSlider) &&
            !isNaN(this.endOfSlider) &&
            !isNaN(this.initialStartOfSlider) &&
            !isNaN(this.initialEndOfSlider) &&
            (this.startOfSlider != this.initialStartOfSlider || this.endOfSlider != this.initialEndOfSlider));
    };
    FacetSlider.prototype.getSliderBoundaryForQuery = function () {
        var needToReturnABoundary = false;
        if (!this.slider) {
            needToReturnABoundary = true;
        }
        else if (this.slider && this.isActive()) {
            needToReturnABoundary = true;
        }
        if (needToReturnABoundary) {
            return this.generateBoundary();
        }
        else {
            return undefined;
        }
    };
    // There is delayed graph data if at the time the facet slider tried to draw, the facet was hidden in the
    // facet dropdown. This method will draw delayed graph data if it exists.
    FacetSlider.prototype.drawDelayedGraphData = function () {
        if (this.delayedGraphData != null && !this.isEmpty) {
            this.slider.drawGraph(this.delayedGraphData);
        }
        this.delayedGraphData = null;
    };
    FacetSlider.prototype.hasAGraph = function () {
        return this.options.graph != undefined;
    };
    FacetSlider.prototype.normalizeStartAndEndOptionsValues = function () {
        if (this.options.start) {
            this.options.start = this.options.dateField
                ? new Date(this.options.start.replace(/-/g, '/')).getTime()
                : Number(this.options.start);
        }
        if (this.options.end) {
            this.options.end = this.options.dateField
                ? new Date(this.options.end.replace(/-/g, '/')).getTime()
                : Number(this.options.end);
        }
    };
    FacetSlider.prototype.bindQueryEvents = function () {
        var _this = this;
        this.bind.onRootElement(QueryEvents_1.QueryEvents.newQuery, function () { return _this.handleNewQuery(); });
        this.bind.onRootElement(QueryEvents_1.QueryEvents.noResults, function () { return _this.handleNoresults(); });
        this.bind.onRootElement(QueryEvents_1.QueryEvents.deferredQuerySuccess, function (args) { return _this.handleDeferredQuerySuccess(args); });
        this.bind.onRootElement(QueryEvents_1.QueryEvents.buildingQuery, function (args) { return _this.handleBuildingQuery(args); });
        this.bind.onRootElement(QueryEvents_1.QueryEvents.doneBuildingQuery, function (args) { return _this.handleDoneBuildingQuery(args); });
    };
    FacetSlider.prototype.bindResizeEvents = function () {
        var _this = this;
        this.onResize = underscore_1.debounce(function () {
            if (ResponsiveComponentsUtils_1.ResponsiveComponentsUtils.shouldDrawFacetSlider(Dom_1.$$(_this.root), Dom_1.$$(_this.element)) && _this.slider && !_this.isEmpty) {
                Iif (_this.delayedGraphData) {
                    _this.drawDelayedGraphData();
                }
                else {
                    _this.slider.drawGraph();
                }
            }
            if (_this.slider) {
                _this.slider.onMoving();
            }
        }, 250);
        window.addEventListener('resize', this.onResize);
        this.bind.onRootElement(ResponsiveDropdown_1.ResponsiveDropdownEvent.OPEN, this.onResize);
        // This is used inside SF integration
        this.bind.onRootElement('onPopupOpen', this.onResize);
        Dom_1.$$(this.root).on(InitializationEvents_1.InitializationEvents.nuke, function () { return _this.handleNuke(); });
    };
    FacetSlider.prototype.bindBreadcrumbEvents = function () {
        var _this = this;
        this.bind.onRootElement(BreadcrumbEvents_1.BreadcrumbEvents.clearBreadcrumb, function () { return _this.reset(); });
        this.bind.onRootElement(BreadcrumbEvents_1.BreadcrumbEvents.populateBreadcrumb, function (args) {
            return _this.handlePopulateBreadcrumb(args);
        });
    };
    FacetSlider.prototype.handleNoresults = function () {
        this.isEmpty = true;
        this.updateAppearanceDependingOnState();
    };
    FacetSlider.prototype.handleNewQuery = function () {
        this.isEmpty = false;
    };
    FacetSlider.prototype.handleRangeQueryStateChanged = function (args) {
        this.setupSliderIfNeeded(args);
        this.startOfSlider = args.value[0] == undefined ? this.startOfSlider : args.value[0];
        this.endOfSlider = args.value[1] == undefined ? this.endOfSlider : args.value[1];
        this.setSelectedValues([this.startOfSlider, this.endOfSlider]);
    };
    FacetSlider.prototype.handlePopulateBreadcrumb = function (args) {
        var _this = this;
        var populateBreadcrumb = function () {
            Eif (_this.isActive()) {
                args.breadcrumbs.push({
                    element: _this.buildBreadcrumbFacetSlider(args.headingLevel)
                });
            }
        };
        if (this.slider) {
            populateBreadcrumb();
        }
        else {
            Dom_1.$$(this.root).one(QueryEvents_1.QueryEvents.deferredQuerySuccess, function () {
                populateBreadcrumb();
                Dom_1.$$(_this.root).trigger(BreadcrumbEvents_1.BreadcrumbEvents.redrawBreadcrumb);
            });
        }
    };
    FacetSlider.prototype.handlePopulateSearchAlerts = function (args) {
        if (this.isActive()) {
            args.text.push(Dom_1.$$(this.buildBreadcrumbFacetSlider()).text());
        }
    };
    FacetSlider.prototype.buildBreadcrumbFacetSlider = function (headingLevel) {
        var _this = this;
        var elem = Dom_1.$$('div', {
            className: 'coveo-facet-slider-breadcrumb'
        }).el;
        var title = Dom_1.$$(AccessibilityUtils_1.getHeadingTag(headingLevel, 'span'), {
            className: 'coveo-facet-slider-breadcrumb-title'
        });
        title.text(this.options.title + ': ');
        elem.appendChild(title.el);
        var values = Dom_1.$$('span', {
            className: 'coveo-facet-slider-breadcrumb-values'
        });
        elem.appendChild(values.el);
        var value = Dom_1.$$('span', {
            className: 'coveo-facet-slider-breadcrumb-value'
        });
        var caption = Dom_1.$$('span', {
            className: 'coveo-facet-slider-breadcrumb-caption'
        });
        caption.text(this.slider.getCaption());
        value.append(caption.el);
        values.el.appendChild(value.el);
        var clear = Dom_1.$$('span', {
            className: 'coveo-facet-slider-breadcrumb-clear'
        }, SVGIcons_1.SVGIcons.icons.mainClear);
        SVGDom_1.SVGDom.addClassToSVGInContainer(clear.el, 'coveo-facet-slider-clear-svg');
        value.el.appendChild(clear.el);
        value.on('click', function () {
            _this.reset();
            _this.usageAnalytics.logSearchEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.facetClearAll, {
                facetId: _this.options.id,
                facetField: _this.options.field.toString(),
                facetTitle: _this.options.title
            });
            _this.queryController.executeQuery();
        });
        return elem;
    };
    FacetSlider.prototype.initSlider = function () {
        this.buildSlider();
        this.slider.initializeState([this.startOfSlider, this.endOfSlider]);
        this.updateAppearanceDependingOnState();
    };
    FacetSlider.prototype.bindQueryStateEvents = function () {
        var _this = this;
        this.rangeQueryStateAttribute = QueryStateModel_1.QueryStateModel.getFacetId(this.options.id) + ':range';
        this.queryStateModel.registerNewAttribute(this.rangeQueryStateAttribute, [undefined, undefined]);
        var eventName = this.queryStateModel.getEventName(Model_1.Model.eventTypes.changeOne + this.rangeQueryStateAttribute);
        this.bind.onRootElement(eventName, function (args) {
            _this.slider ? _this.handleRangeQueryStateChanged(args) : _this.setRangeStateSliderStillNotCreated(args);
        });
    };
    FacetSlider.prototype.setRangeStateSliderStillNotCreated = function (args) {
        this.rangeFromUrlState = this.copyValues(args.value);
    };
    FacetSlider.prototype.buildSlider = function () {
        var _this = this;
        var sliderContainer = Dom_1.$$('div', {
            className: 'coveo-slider-container'
        }).el;
        Iif (this.hasAGraph()) {
            Dom_1.$$(sliderContainer).addClass('coveo-with-graph');
        }
        var sliderDiv = Dom_1.$$('div').el;
        this.slider = this.slider
            ? this.slider
            : new Slider_1.Slider(sliderDiv, __assign({}, this.options, { dateField: this.options.dateField }), this.root);
        Dom_1.$$(sliderDiv).on(SliderEvents_1.SliderEvents.endSlide, function (e, args) {
            _this.handleEndSlide(args);
        });
        Dom_1.$$(sliderDiv).on(SliderEvents_1.SliderEvents.duringSlide, function (e, args) {
            _this.handleDuringSlide(args);
        });
        Iif (this.hasAGraph()) {
            Dom_1.$$(sliderDiv).on(SliderEvents_1.SliderEvents.graphValueSelected, function (e, args) {
                _this.handleGraphValueSelected(args);
            });
        }
        sliderContainer.appendChild(sliderDiv);
        this.element.appendChild(sliderContainer);
        this.updateAppearanceDependingOnState();
    };
    FacetSlider.prototype.handleBuildingQuery = function (data) {
        Assert_1.Assert.exists(data);
        Assert_1.Assert.exists(data.queryBuilder);
        var boundary = this.getSliderBoundaryForQuery();
        if (boundary != undefined) {
            this.facetQueryController.prepareForNewQuery();
            var expression = this.facetQueryController.computeOurFilterExpression(boundary);
            if (Utils_1.Utils.isNonEmptyString(expression)) {
                this.logger.trace('Putting filter in query', expression);
                data.queryBuilder.advancedExpression.add(expression);
            }
        }
    };
    FacetSlider.prototype.handleDoneBuildingQuery = function (data) {
        var queryBuilder = data.queryBuilder;
        this.facetQueryController.putGroupByIntoQueryBuilder(queryBuilder);
    };
    FacetSlider.prototype.handleDeferredQuerySuccess = function (data) {
        this.ensureDom();
        this.setupSliderIfNeeded(data);
        var groupByResults = data.results.groupByResults[this.facetQueryController.lastGroupByRequestIndex];
        this.isEmpty = this.isFacetEmpty(groupByResults, data);
        this.updateAppearanceDependingOnState();
        if (this.hasAGraph()) {
            this.renderToSliderGraph(data);
        }
    };
    FacetSlider.prototype.handleEndSlide = function (args) {
        var values = args.slider.getValues();
        this.startOfSlider = values[0];
        this.endOfSlider = values[1];
        if (this.updateQueryState(values)) {
            this.updateAppearanceDependingOnState();
            this.usageAnalytics.logSearchEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.facetRangeSlider, {
                facetId: this.options.id,
                facetField: this.options.field.toString(),
                facetRangeStart: this.startOfSlider.toString(),
                facetRangeEnd: this.endOfSlider.toString()
            });
            this.queryController.executeQuery();
        }
    };
    FacetSlider.prototype.handleDuringSlide = function (args) {
        var values = args.slider.getValues();
        this.startOfSlider = values[0];
        this.endOfSlider = values[1];
        this.slider.setValues([this.startOfSlider, this.endOfSlider]);
        this.updateAppearanceDependingOnState(true);
    };
    FacetSlider.prototype.handleGraphValueSelected = function (args) {
        if ((this.options.rangeSlider && this.startOfSlider != args.start) || this.endOfSlider != args.end) {
            if (this.options.rangeSlider) {
                this.startOfSlider = args.start;
            }
            this.endOfSlider = args.end;
            this.slider.setValues([this.startOfSlider, this.endOfSlider]);
            this.updateQueryState();
            this.usageAnalytics.logSearchEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.facetRangeGraph, {
                facetId: this.options.id,
                facetField: this.options.field.toString(),
                facetRangeStart: this.startOfSlider.toString(),
                facetRangeEnd: this.endOfSlider.toString()
            });
            this.queryController.executeQuery();
        }
    };
    FacetSlider.prototype.updateQueryState = function (values, silent) {
        Eif (values === void 0) { values = this.slider.getValues(); }
        Eif (silent === void 0) { silent = false; }
        var copyOfValues = this.copyValues(values);
        var start = values[0] + 0.0;
        var end = values[1] + 0.0;
        var model = this.queryStateModel.get(this.rangeQueryStateAttribute);
        if (model == null || copyOfValues[0] != model[0] || copyOfValues[1] != model[1]) {
            copyOfValues[0] = start;
            copyOfValues[1] = end;
            this.queryStateModel.set(this.rangeQueryStateAttribute, copyOfValues, { silent: silent });
            return true;
        }
        return false;
    };
    FacetSlider.prototype.copyValues = function (values) {
        // Creating a copy of the values prevents an unwanted automatic update of the state while sliding
        // That's the cleanest way I found to copy that array correctly
        var copyOfValues = [];
        copyOfValues[0] = Number(values[0]) + 0.0;
        copyOfValues[1] = Number(values[1]) + 0.0;
        return copyOfValues;
    };
    FacetSlider.prototype.renderToSliderGraph = function (data) {
        var _this = this;
        var rawGroupByResults = data.results.groupByResults[this.facetQueryController.graphGroupByQueriesIndex];
        var graphData;
        var totalGraphResults = 0;
        Eif (rawGroupByResults) {
            graphData = underscore_1.map(rawGroupByResults.values, function (value) {
                totalGraphResults += value.numberOfResults;
                var start = value.value.split('..')[0];
                var end = value.value.split('..')[1];
                Eif (!_this.options.dateField) {
                    start = Number(start);
                    end = Number(end);
                }
                else {
                    start = new Date(start.split('@')[0]).getTime();
                    end = new Date(end.split('@')[0]).getTime();
                }
                var y = value.numberOfResults;
                return {
                    start: start,
                    y: y,
                    end: end,
                    isDate: _this.options.dateField
                };
            });
        }
        if (totalGraphResults == 0) {
            this.isEmpty = true;
            this.updateAppearanceDependingOnState();
        }
        if (graphData != undefined && !this.isDropdownHidden()) {
            // This is deferred since it might be called on initialization with a placehoder over the facet during load time
            // We need to wait that the animation is gone so that the width/height calculation done by the graph are okay.
            MiscModules_1.Defer.defer(function () { return _this.slider.drawGraph(graphData); });
        }
        else Eif (graphData != undefined && this.isDropdownHidden()) {
            this.delayedGraphData = graphData;
        }
    };
    FacetSlider.prototype.isDropdownHidden = function () {
        var facetDropdown = this.root.querySelector('.coveo-facet-column');
        if (facetDropdown) {
            return Dom_1.$$(facetDropdown).css('display') == 'none';
        }
        Iif (Dom_1.$$(this.root).hasClass('CoveoRecommendation')) {
            var recommendationDropdown = Dom_1.$$(this.root).parents('.coveo-recommendation-column')[0] || this.root;
            return Dom_1.$$(recommendationDropdown).css('display') == 'none';
        }
        return false;
    };
    FacetSlider.prototype.generateBoundary = function () {
        if (!this.slider) {
            // If the slider is not initialized, the only boundary we can get is from the state.
            return this.generateBoundaryFromState();
        }
        else {
            // Else, try to get one from the slider itself. If we cant, try to return one from the state.
            var boundary = this.generateBoundaryFromSlider();
            Iif (boundary[0] == undefined && boundary[1] == undefined) {
                return this.generateBoundaryFromState();
            }
            else {
                return boundary;
            }
        }
    };
    FacetSlider.prototype.generateBoundaryFromSlider = function () {
        var start, end;
        Eif (this.startOfSlider != undefined) {
            start = this.startOfSlider;
        }
        Eif (this.endOfSlider != undefined) {
            end = this.endOfSlider;
        }
        return [start, end];
    };
    FacetSlider.prototype.generateBoundaryFromState = function () {
        var start, end;
        var startFromState = this.queryStateModel.get(this.rangeQueryStateAttribute)[0];
        Eif (startFromState != undefined) {
            start = startFromState;
        }
        var endFromState = this.queryStateModel.get(this.rangeQueryStateAttribute)[1];
        Eif (endFromState != undefined) {
            end = endFromState;
        }
        if (start != this.queryStateModel.getDefault(this.rangeQueryStateAttribute)[0] ||
            end != this.queryStateModel.getDefault(this.rangeQueryStateAttribute)[1]) {
            return [start, end];
        }
        else {
            return [undefined, undefined];
        }
    };
    FacetSlider.prototype.setupSliderIfNeeded = function (data) {
        this.ensureDom();
        if (Utils_1.Utils.isNullOrUndefined(this.slider)) {
            Eif (!this.alreadySetBoundary()) {
                this.trySetSliderBoundaryFromOptions();
            }
            if (!this.alreadySetBoundary() && data != undefined) {
                this.trySetSliderBoundaryFromQueryResult(data);
            }
            this.trySetSliderBoundaryFromState();
            this.setupSliderStateVariables();
            var isInError = this.verifySetup();
            Iif (isInError) {
                this.logger.warn('Unable to initialize slider with current values', this);
            }
            else {
                this.initSlider();
                this.updateQueryState();
            }
        }
    };
    FacetSlider.prototype.verifySetup = function () {
        var isInError = 0;
        isInError += this.initialStartOfSlider == undefined ? 1 : 0;
        isInError += isNaN(this.initialStartOfSlider) ? 1 : 0;
        isInError += this.initialEndOfSlider == undefined ? 1 : 0;
        isInError += isNaN(this.initialEndOfSlider) ? 1 : 0;
        return isInError;
    };
    FacetSlider.prototype.setupSliderStateVariables = function () {
        Iif (isNaN(this.initialStartOfSlider) || isNaN(this.initialEndOfSlider)) {
            this.logger.warn('Cannnot initialize slider with those values : start: ' + this.initialStartOfSlider + ' end: ' + this.initialEndOfSlider);
        }
        else {
            this.initialStartOfSlider = Number(this.initialStartOfSlider);
            this.initialEndOfSlider = Number(this.initialEndOfSlider);
            this.startOfSlider = this.startOfSlider != undefined ? Number(this.startOfSlider) : this.initialStartOfSlider;
            this.endOfSlider = this.endOfSlider != undefined ? Number(this.endOfSlider) : this.initialEndOfSlider;
            this.options.start = this.initialStartOfSlider;
            this.options.end = this.initialEndOfSlider;
            this.queryStateModel.setNewDefault(this.rangeQueryStateAttribute, [this.initialStartOfSlider, this.initialEndOfSlider]);
        }
    };
    FacetSlider.prototype.alreadySetBoundary = function () {
        return this.startOfSlider != undefined && this.endOfSlider != undefined;
    };
    FacetSlider.prototype.trySetSliderBoundaryFromOptions = function () {
        if (!Utils_1.Utils.isNullOrUndefined(this.options.start)) {
            this.setupInitialSliderStateStart(this.options.start);
        }
        if (!Utils_1.Utils.isNullOrUndefined(this.options.end)) {
            this.setupInitialSliderStateEnd(this.options.end);
        }
    };
    FacetSlider.prototype.trySetSliderBoundaryFromState = function () {
        var boundaries = this.getBoundariesFromState();
        if (!boundaries) {
            return;
        }
        this.setupInitialSliderStateStart(boundaries.start);
        this.setupInitialSliderStateEnd(boundaries.end);
        this.startOfSlider = boundaries.start;
        this.endOfSlider = boundaries.end;
    };
    FacetSlider.prototype.trySetSliderBoundaryFromQueryResult = function (data) {
        var groupByResults = data.results.groupByResults[this.facetQueryController.lastGroupByRequestForFullRangeIndex];
        if (!groupByResults || groupByResults.values.length <= 0 || groupByResults.values[0].numberOfResults == 0) {
            return;
        }
        var start = groupByResults.values[0].value.split('..')[0];
        var end = groupByResults.values[groupByResults.values.length - 1].value.split('..')[1];
        Iif (this.isValueADate(start) && this.isValueADate(end)) {
            this.setupInitialSliderStateStart(start);
            this.setupInitialSliderStateEnd(end);
            return;
        }
        var boudariesFromState = this.getBoundariesFromState();
        var startAsNumber = Number(start);
        var endAsNumber = Number(end);
        Eif (boudariesFromState) {
            startAsNumber = Math.min(startAsNumber, boudariesFromState.start);
            endAsNumber = Math.max(endAsNumber, boudariesFromState.end);
        }
        this.setupInitialSliderStateStart(startAsNumber);
        this.setupInitialSliderStateEnd(endAsNumber);
    };
    FacetSlider.prototype.getBoundariesFromState = function () {
        var stateValues = this.rangeFromUrlState || this.queryStateModel.get(this.rangeQueryStateAttribute);
        if (!stateValues || stateValues[0] == undefined || stateValues[1] == undefined) {
            return undefined;
        }
        var startAsNumber = Number(stateValues[0]);
        var endAsNumber = Number(stateValues[1]);
        Iif (isNaN(startAsNumber) || isNaN(endAsNumber)) {
            return undefined;
        }
        return {
            start: startAsNumber,
            end: endAsNumber
        };
    };
    FacetSlider.prototype.setupInitialSliderStateStart = function (value) {
        if (this.initialStartOfSlider == undefined) {
            this.initialStartOfSlider = value;
            Iif (this.isValueADate(value)) {
                this.initialStartOfSlider = this.getTimeFromAPIResponse(value);
            }
        }
    };
    FacetSlider.prototype.setupInitialSliderStateEnd = function (value) {
        if (this.initialEndOfSlider == undefined) {
            this.initialEndOfSlider = value;
            Iif (this.isValueADate(value)) {
                this.initialEndOfSlider = this.getTimeFromAPIResponse(value);
            }
        }
    };
    FacetSlider.prototype.getTimeFromAPIResponse = function (value) {
        return new Date(value.replace('@', ' ')).getTime();
    };
    FacetSlider.prototype.isValueADate = function (value) {
        return this.options.dateField && isNaN(value);
    };
    FacetSlider.prototype.updateAppearanceDependingOnState = function (sliding) {
        var _this = this;
        Eif (sliding === void 0) { sliding = false; }
        // Defer the visual update so that we can execute it after the current call stack has resolved.
        // Since this component is closely linked to DOM size calculation (width), this allows to cover some corner cases
        // where the component would be visually hidden, leading to incorrect width calculation.
        // For example, first query placeholder animation hiding the component, or switching between different tabs would affect the calculation otherwise.
        MiscModules_1.Defer.defer(function () {
            if (_this.isEmpty && !_this.isActive() && !sliding) {
                Dom_1.$$(_this.element).addClass('coveo-disabled-empty');
            }
            else {
                Dom_1.$$(_this.element).removeClass('coveo-disabled-empty');
                Dom_1.$$(_this.facetHeader.eraserElement).toggle(_this.isActive());
            }
            if (!_this.isActive() && !sliding) {
                Dom_1.$$(_this.element).addClass('coveo-disabled');
            }
            else {
                Dom_1.$$(_this.element).removeClass('coveo-disabled');
            }
            if (_this.isActive() && _this.slider) {
                _this.slider.onMoving();
            }
        });
    };
    FacetSlider.prototype.handleNuke = function () {
        window.removeEventListener('resize', this.onResize);
    };
    FacetSlider.prototype.isFacetEmpty = function (groupByResults, data) {
        return (Utils_1.Utils.isNullOrUndefined(groupByResults) ||
            underscore_1.every(groupByResults.values, function (value) { return Utils_1.Utils.isNullOrUndefined(value) || value.numberOfResults === 0; }) ||
            data.results.results.length == 0);
    };
    /**
     * The component options
     * @componentOptions
     */
    FacetSlider.options = __assign({ 
        /**
         * Specifies the title to display on top of the `FacetSlider`.
         *
         * Default value is the localized string for `NoTitle`.
         */
        title: ComponentOptions_1.ComponentOptions.buildLocalizedStringOption({
            localizedString: function () { return Strings_1.l('NoTitle'); },
            section: 'CommonOptions'
        }), 
        /**
         * Specifies whether the [`field`]{@link FacetSlider.options.field} for which you are requesting a range is a date
         * field. This allows the `FacetSlider` to correctly build the outgoing [GroupByRequest]{@link IGroupByRequest} and
         * render itself properly.
         *
         * Default value is `false`.
         */
        dateField: ComponentOptions_1.ComponentOptions.buildBooleanOption({ defaultValue: false, section: 'CommonOptions' }), 
        /**
         * Specifies the index field whose values the `FacetSlider` should use.
         *
         * The field must be configured correctly as a Facet field in the index (see
         * [Adding and Managing Fields](https://docs.coveo.com/en/1833/)).
         *
         * Specifying a value for this option is required for the `FacetSlider` component to work.
         */
        field: ComponentOptions_1.ComponentOptions.buildFieldOption({ groupByField: true, required: true, section: 'CommonOptions' }), 
        /**
         * Specifies a unique identifier for the `FacetSlider`. Among other things, this identifier serves the purpose of
         * saving the facet state in the URL hash.
         *
         * If you have two facets with the same field in the same page, you should specify a unique `id` value for at least
         * one of those two facets. This `id` must be unique in the page.
         *
         * Default value is the [`field`]{@link FacetSlider.options.field} option value.
         */
        id: ComponentOptions_1.ComponentOptions.buildStringOption({
            postProcessing: function (value, options) { return value || options.field; }
        }), 
        /**
         * Specifies the format to use when displaying date values.
         *
         * See also the [`dateField`]{@link FacetSlider.options.dateField} option.
         *
         * Default value is `MMM dd, yyyy`.
         */
        dateFormat: ComponentOptions_1.ComponentOptions.buildStringOption({ section: 'Display' }), 
        /**
         * Specifies a query to filter automatic minimum and maximum values for the slider range.
         *
         * This is especially useful in the case of date ranges since the index may contain values which are not set, and
         * thus return values from the year 1400 (the earliest date from the boost C++ library).
         *
         * **Example:**
         *
         * The query override in the following markup filters out any `@date` value anterior to January 1st 2000.
         * ```html
         * <div class="CoveoFacetSlider" data-field="@date" data-date-field="true" data-query-override="@date>2000/01/01"></div>
         * ```
         */
        queryOverride: ComponentOptions_1.ComponentOptions.buildQueryExpressionOption({ section: 'Filtering' }), 
        /**
         * Specifies the starting boundary of the slider.
         *
         * Date values are rounded to the nearest year when you set the [`dateField`]{@link FacetSlider.options.dateField}
         * option to `true`.
         *
         * Default value is the lowest available field value in the index.
         */
        start: ComponentOptions_1.ComponentOptions.buildStringOption({ section: 'Filtering' }), 
        /**
         * Specifies the ending boundary of the slider.
         *
         * Date values are rounded to the nearest year when you set the [`dateField`]{@link FacetSlider.options.dateField}
         * option to `true`.
         *
         * Default value is the highest available field value in the index.
         */
        end: ComponentOptions_1.ComponentOptions.buildStringOption({ section: 'Filtering' }), 
        /**
         * Specifies whether to exclude the outer bounds of the slider in the generated query when they are not active.
         *
         * Default value is `false`.
         */
        excludeOuterBounds: ComponentOptions_1.ComponentOptions.buildBooleanOption({ defaultValue: false, section: 'Filtering' }), 
        /**
         * Specifies the number of decimal places to round the displayed numerical values to.
         *
         * Default (and minimum) value is `0`.
         */
        rounded: ComponentOptions_1.ComponentOptions.buildNumberOption({ min: 0, section: 'Filtering' }), 
        /**
         * Specifies the number of steps to split the slider into.
         *
         * For example, if your range is [ 0 , 100 ] and you specify `10` steps, then the end user can move the slider only
         * to the values [ 0, 10, 20, 30 ... , 100 ].
         *
         * For performance reasons, the maximum value for this option is `100`
         *
         * Default value is `undefined`, and the slider allows up to 100 steps. Minimum value is `2`.
         */
        steps: ComponentOptions_1.ComponentOptions.buildNumberOption({ min: 2 }), 
        /**
         * Specifies whether you want a slider with two buttons instead of a slider with a single button.
         *
         * By default, only one button appears in the slider.
         */
        rangeSlider: ComponentOptions_1.ComponentOptions.buildBooleanOption(), 
        /**
         * Specifies the caption options to use when displaying the field values.
         *
         * Available options are:
         * - enable (`data-display-as-value-enable`): boolean; specifies whether to display the caption as a value. Default
         * value is `true`.
         * - unitSign (`data-display-as-value-unit-sign`): string; specifies the unit sign for this value (e.g., `$`).
         * Default value is `undefined`.
         * - separator (`data-display-as-value-separator`): string; specifies the character(s) to use as a separator in the
         * caption. Default value is `"-"`.
         */
        displayAsValue: ComponentOptions_1.ComponentOptions.buildObjectOption({
            subOptions: {
                enable: ComponentOptions_1.ComponentOptions.buildBooleanOption({ defaultValue: true }),
                unitSign: ComponentOptions_1.ComponentOptions.buildStringOption(),
                separator: ComponentOptions_1.ComponentOptions.buildStringOption({ defaultValue: '-' })
            },
            section: 'Display'
        }), 
        /**
         * Specifies the percentage caption options to use when displaying the field values.
         *
         * Available options are:
         * - enable (`data-display-as-percent-enable`): boolean; specifies whether to display the caption as a percentage.
         * Default value is `false`.
         * separator (`data-display-as-percent-separator`): string; specifies the character(s) to use as a separator in the
         * caption. Default value is `"-"`.
         */
        displayAsPercent: ComponentOptions_1.ComponentOptions.buildObjectOption({
            subOptions: {
                enable: ComponentOptions_1.ComponentOptions.buildBooleanOption({ defaultValue: false }),
                separator: ComponentOptions_1.ComponentOptions.buildStringOption({ defaultValue: '-' })
            },
            section: 'Display'
        }), 
        /**
         * Specifies whether to display a small graph on top of the slider.
         *
         * Available options are:
         * - steps (`data-graph-steps`): number; specifies the number of steps/columns to display in your graph. Default
         * value is `10`. Minimum value is `2`.
         */
        graph: ComponentOptions_1.ComponentOptions.buildObjectOption({
            subOptions: {
                steps: ComponentOptions_1.ComponentOptions.buildNumberOption({ min: 2 }),
                animationDuration: ComponentOptions_1.ComponentOptions.buildNumberOption({ min: 0 }),
                margin: ComponentOptions_1.ComponentOptions.buildObjectOption({
                    subOptions: {
                        top: ComponentOptions_1.ComponentOptions.buildNumberOption({ min: 0 }),
                        bottom: ComponentOptions_1.ComponentOptions.buildNumberOption({ min: 0 }),
                        left: ComponentOptions_1.ComponentOptions.buildNumberOption({ min: 0 }),
                        right: ComponentOptions_1.ComponentOptions.buildNumberOption({ min: 0 })
                    }
                })
            },
            section: 'Graph'
        }), 
        /**
         * Specifies a function to generate the `FacetSlider` steps (see the [`steps`]{@link FacetSlider.options.steps}
         * option). This function receives the `FacetSlider` boundaries (see the [`start`]{@link FacetSlider.options.start}
         * and [`end`]{@link FacetSlider.options.end} options), and must return an array of numbers (the steps).
         *
         * **Note:**
         * > You cannot set this option directly in the component markup as an HTML attribute. You must either set it in the
         * > [`init`]{@link init} call of your search interface (see
         * > [Passing Component Options in the init Call](https://docs.coveo.com/en/346/#passing-component-options-in-the-init-call)),
         * > or before the `init` call, using the `options` top-level function (see
         * > [Passing Component Options Before the init Call](https://docs.coveo.com/en/346/#passing-component-options-before-the-init-call)).
         *
         * **Example:**
         * ```javascript
         *
         * var myGetStepsFunction = function(start, end) {
         *   var result = [];
         *   for (i = start; i < end; i += 2) {
         *     result.push(i);
         *   }
         *   return result;
         * }
         *
         * // You can set the option in the 'init' call:
         * Coveo.init(document.querySelector("#search"), {
         *    FacetSlider: {
         *      getSteps: myGetStepsFunction
         *    }
         * });
         *
         * // Or before the 'init' call, using the 'options' top-level function:
         * // Coveo.options(document.querySelector("#search"), {
         * //   FacetSlider : {
         * //     valueCaption : myGetStepsFunction
         * //   }
         * // });
         * ```
         */
        getSteps: ComponentOptions_1.ComponentOptions.buildCustomOption(function () {
            return null;
        }), 
        /**
         * Specifies a function to generate the value caption for the `FacetSlider`. This function receives the current
         * slider values (number[]), and must return the caption (string).
         *
         * **Note:**
         * > You cannot set this option directly in the component markup as an HTML attribute. You must either set it in the
         * > [`init`]{@link init} call of your search interface (see
         * > [Passing Component Options in the init Call](https://docs.coveo.com/en/346/#passing-component-options-in-the-init-call)),
         * > or before the `init` call, using the `options` top-level function (see
         * > [Passing Component Options Before the init Call](https://docs.coveo.com/en/346/#passing-component-options-before-the-init-call)).
         *
         * **Example:**
         * ```javascript
         *
         * var myValueCaptionFunction = function(values) {
         *   return "From " + values[0] + " to " + values[1];
         * }
         *
         * // You can set the option in the 'init' call:
         * Coveo.init(document.querySelector("#search"), {
         *   FacetSlider: {
         *     valueCaption: myValueCaptionFunction
         *   }
         * });
         *
         * // Or before the 'init' call, using the 'options' top-level function:
         * // Coveo.options(document.querySelector("#search"), {
         * //   FacetSlider : {
         * //     valueCaption : myValueCaptionFunction
         * //   }
         * // });
         * ```
         */
        valueCaption: ComponentOptions_1.ComponentOptions.buildCustomOption(function () {
            return null;
        }) }, ResponsiveFacetOptions_1.ResponsiveFacetOptions);
    FacetSlider.ID = 'FacetSlider';
    FacetSlider.doExport = function () {
        GlobalExports_1.exportGlobally({
            FacetSlider: FacetSlider,
            Slider: Slider_1.Slider
        });
    };
    FacetSlider.DEBOUNCED_RESIZE_DELAY = 250;
    return FacetSlider;
}(Component_1.Component));
exports.FacetSlider = FacetSlider;
Initialization_1.Initialization.registerAutoCreateComponent(FacetSlider);
 
 
/***/ }),
/* 244 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__namespace__ = __webpack_require__(337);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__namespaces__ = __webpack_require__(338);
 
 
 
function creatorInherit(name) {
  return function() {
    var document = this.ownerDocument,
        uri = this.namespaceURI;
    return uri === __WEBPACK_IMPORTED_MODULE_1__namespaces__["b" /* xhtml */] && document.documentElement.namespaceURI === __WEBPACK_IMPORTED_MODULE_1__namespaces__["b" /* xhtml */]
        ? document.createElement(name)
        : document.createElementNS(uri, name);
  };
}
 
function creatorFixed(fullname) {
  return function() {
    return this.ownerDocument.createElementNS(fullname.space, fullname.local);
  };
}
 
/* harmony default export */ __webpack_exports__["a"] = (function(name) {
  var fullname = Object(__WEBPACK_IMPORTED_MODULE_0__namespace__["a" /* default */])(name);
  return (fullname.local
      ? creatorFixed
      : creatorInherit)(fullname);
});
 
 
/***/ }),
/* 245 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony default export */ __webpack_exports__["a"] = (function(node, event) {
  var svg = node.ownerSVGElement || node;
 
  if (svg.createSVGPoint) {
    var point = svg.createSVGPoint();
    point.x = event.clientX, point.y = event.clientY;
    point = point.matrixTransform(node.getScreenCTM().inverse());
    return [point.x, point.y];
  }
 
  var rect = node.getBoundingClientRect();
  return [event.clientX - rect.left - node.clientLeft, event.clientY - rect.top - node.clientTop];
});
 
 
/***/ }),
/* 246 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony default export */ __webpack_exports__["a"] = (function(a, b) {
  return a = +a, b = +b, function(t) {
    return a * (1 - t) + b * t;
  };
});
 
 
/***/ }),
/* 247 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__timer_js__ = __webpack_require__(349);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return __WEBPACK_IMPORTED_MODULE_0__timer_js__["b"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return __WEBPACK_IMPORTED_MODULE_0__timer_js__["c"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return __WEBPACK_IMPORTED_MODULE_0__timer_js__["d"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__timeout_js__ = __webpack_require__(1206);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return __WEBPACK_IMPORTED_MODULE_1__timeout_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__interval_js__ = __webpack_require__(1207);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_2__interval_js__["a"]; });
 
 
 
 
 
 
 
/***/ }),
/* 248 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["b"] = tweenValue;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__schedule_js__ = __webpack_require__(63);
 
 
function tweenRemove(id, name) {
  var tween0, tween1;
  return function() {
    var schedule = Object(__WEBPACK_IMPORTED_MODULE_0__schedule_js__["h" /* set */])(this, id),
        tween = schedule.tween;
 
    // If this node shared tween with the previous node,
    // just assign the updated shared tween and we’re done!
    // Otherwise, copy-on-write.
    if (tween !== tween0) {
      tween1 = tween0 = tween;
      for (var i = 0, n = tween1.length; i < n; ++i) {
        if (tween1[i].name === name) {
          tween1 = tween1.slice();
          tween1.splice(i, 1);
          break;
        }
      }
    }
 
    schedule.tween = tween1;
  };
}
 
function tweenFunction(id, name, value) {
  var tween0, tween1;
  Iif (typeof value !== "function") throw new Error;
  return function() {
    var schedule = Object(__WEBPACK_IMPORTED_MODULE_0__schedule_js__["h" /* set */])(this, id),
        tween = schedule.tween;
 
    // If this node shared tween with the previous node,
    // just assign the updated shared tween and we’re done!
    // Otherwise, copy-on-write.
    if (tween !== tween0) {
      tween1 = (tween0 = tween).slice();
      for (var t = {name: name, value: value}, i = 0, n = tween1.length; i < n; ++i) {
        if (tween1[i].name === name) {
          tween1[i] = t;
          break;
        }
      }
      if (i === n) tween1.push(t);
    }
 
    schedule.tween = tween1;
  };
}
 
/* harmony default export */ __webpack_exports__["a"] = (function(name, value) {
  var id = this._id;
 
  name += "";
 
  Iif (arguments.length < 2) {
    var tween = Object(__WEBPACK_IMPORTED_MODULE_0__schedule_js__["f" /* get */])(this.node(), id).tween;
    for (var i = 0, n = tween.length, t; i < n; ++i) {
      if ((t = tween[i]).name === name) {
        return t.value;
      }
    }
    return null;
  }
 
  return this.each((value == null ? tweenRemove : tweenFunction)(id, name, value));
});
 
function tweenValue(transition, name, value) {
  var id = transition._id;
 
  transition.each(function() {
    var schedule = Object(__WEBPACK_IMPORTED_MODULE_0__schedule_js__["h" /* set */])(this, id);
    (schedule.value || (schedule.value = {}))[name] = value.apply(this, arguments);
  });
 
  return function(node) {
    return Object(__WEBPACK_IMPORTED_MODULE_0__schedule_js__["f" /* get */])(node, id).value[name];
  };
}
 
 
/***/ }),
/* 249 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__nest__ = __webpack_require__(1247);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return __WEBPACK_IMPORTED_MODULE_0__nest__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__set__ = __webpack_require__(1248);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return __WEBPACK_IMPORTED_MODULE_1__set__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__map__ = __webpack_require__(350);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return __WEBPACK_IMPORTED_MODULE_2__map__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__keys__ = __webpack_require__(1249);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return __WEBPACK_IMPORTED_MODULE_3__keys__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__values__ = __webpack_require__(1250);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return __WEBPACK_IMPORTED_MODULE_4__values__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__entries__ = __webpack_require__(1251);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_5__entries__["a"]; });
 
 
 
 
 
 
 
 
/***/ }),
/* 250 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__formatDecimal_js__ = __webpack_require__(251);
 
 
/* harmony default export */ __webpack_exports__["a"] = (function(x) {
  return x = Object(__WEBPACK_IMPORTED_MODULE_0__formatDecimal_js__["b" /* formatDecimalParts */])(Math.abs(x)), x ? x[1] : NaN;
});
 
 
/***/ }),
/* 251 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["b"] = formatDecimalParts;
/* harmony default export */ __webpack_exports__["a"] = (function(x) {
  return Math.abs(x = Math.round(x)) >= 1e21
      ? x.toLocaleString("en").replace(/,/g, "")
      : x.toString(10);
});
 
// Computes the decimal coefficient and exponent of the specified number x with
// significant digits p, where x is positive and p is in [1, 21] or undefined.
// For example, formatDecimalParts(1.23) returns ["123", 0].
function formatDecimalParts(x, p) {
  if ((i = (x = p ? x.toExponential(p - 1) : x.toExponential()).indexOf("e")) < 0) return null; // NaN, ±Infinity
  var i, coefficient = x.slice(0, i);
 
  // The string returned by toExponential either has the form \d\.\d+e[-+]\d+
  // (e.g., 1.2e+3) or the form \de[-+]\d+ (e.g., 1e+3).
  return [
    coefficient.length > 1 ? coefficient[0] + coefficient.slice(2) : coefficient,
    +x.slice(i + 1)
  ];
}
 
 
/***/ }),
/* 252 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["b"] = rotateRadians;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__compose_js__ = __webpack_require__(740);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__math_js__ = __webpack_require__(19);
 
 
 
function rotationIdentity(lambda, phi) {
  return [Object(__WEBPACK_IMPORTED_MODULE_1__math_js__["a" /* abs */])(lambda) > __WEBPACK_IMPORTED_MODULE_1__math_js__["o" /* pi */] ? lambda + Math.round(-lambda / __WEBPACK_IMPORTED_MODULE_1__math_js__["w" /* tau */]) * __WEBPACK_IMPORTED_MODULE_1__math_js__["w" /* tau */] : lambda, phi];
}
 
rotationIdentity.invert = rotationIdentity;
 
function rotateRadians(deltaLambda, deltaPhi, deltaGamma) {
  return (deltaLambda %= __WEBPACK_IMPORTED_MODULE_1__math_js__["w" /* tau */]) ? (deltaPhi || deltaGamma ? Object(__WEBPACK_IMPORTED_MODULE_0__compose_js__["a" /* default */])(rotationLambda(deltaLambda), rotationPhiGamma(deltaPhi, deltaGamma))
    : rotationLambda(deltaLambda))
    : (deltaPhi || deltaGamma ? rotationPhiGamma(deltaPhi, deltaGamma)
    : rotationIdentity);
}
 
function forwardRotationLambda(deltaLambda) {
  return function(lambda, phi) {
    return lambda += deltaLambda, [lambda > __WEBPACK_IMPORTED_MODULE_1__math_js__["o" /* pi */] ? lambda - __WEBPACK_IMPORTED_MODULE_1__math_js__["w" /* tau */] : lambda < -__WEBPACK_IMPORTED_MODULE_1__math_js__["o" /* pi */] ? lambda + __WEBPACK_IMPORTED_MODULE_1__math_js__["w" /* tau */] : lambda, phi];
  };
}
 
function rotationLambda(deltaLambda) {
  var rotation = forwardRotationLambda(deltaLambda);
  rotation.invert = forwardRotationLambda(-deltaLambda);
  return rotation;
}
 
function rotationPhiGamma(deltaPhi, deltaGamma) {
  var cosDeltaPhi = Object(__WEBPACK_IMPORTED_MODULE_1__math_js__["g" /* cos */])(deltaPhi),
      sinDeltaPhi = Object(__WEBPACK_IMPORTED_MODULE_1__math_js__["t" /* sin */])(deltaPhi),
      cosDeltaGamma = Object(__WEBPACK_IMPORTED_MODULE_1__math_js__["g" /* cos */])(deltaGamma),
      sinDeltaGamma = Object(__WEBPACK_IMPORTED_MODULE_1__math_js__["t" /* sin */])(deltaGamma);
 
  function rotation(lambda, phi) {
    var cosPhi = Object(__WEBPACK_IMPORTED_MODULE_1__math_js__["g" /* cos */])(phi),
        x = Object(__WEBPACK_IMPORTED_MODULE_1__math_js__["g" /* cos */])(lambda) * cosPhi,
        y = Object(__WEBPACK_IMPORTED_MODULE_1__math_js__["t" /* sin */])(lambda) * cosPhi,
        z = Object(__WEBPACK_IMPORTED_MODULE_1__math_js__["t" /* sin */])(phi),
        k = z * cosDeltaPhi + x * sinDeltaPhi;
    return [
      Object(__WEBPACK_IMPORTED_MODULE_1__math_js__["e" /* atan2 */])(y * cosDeltaGamma - k * sinDeltaGamma, x * cosDeltaPhi - z * sinDeltaPhi),
      Object(__WEBPACK_IMPORTED_MODULE_1__math_js__["c" /* asin */])(k * cosDeltaGamma + y * sinDeltaGamma)
    ];
  }
 
  rotation.invert = function(lambda, phi) {
    var cosPhi = Object(__WEBPACK_IMPORTED_MODULE_1__math_js__["g" /* cos */])(phi),
        x = Object(__WEBPACK_IMPORTED_MODULE_1__math_js__["g" /* cos */])(lambda) * cosPhi,
        y = Object(__WEBPACK_IMPORTED_MODULE_1__math_js__["t" /* sin */])(lambda) * cosPhi,
        z = Object(__WEBPACK_IMPORTED_MODULE_1__math_js__["t" /* sin */])(phi),
        k = z * cosDeltaGamma - y * sinDeltaGamma;
    return [
      Object(__WEBPACK_IMPORTED_MODULE_1__math_js__["e" /* atan2 */])(y * cosDeltaGamma + z * sinDeltaGamma, x * cosDeltaPhi + k * sinDeltaPhi),
      Object(__WEBPACK_IMPORTED_MODULE_1__math_js__["c" /* asin */])(k * cosDeltaPhi - x * sinDeltaPhi)
    ];
  };
 
  return rotation;
}
 
/* harmony default export */ __webpack_exports__["a"] = (function(rotate) {
  rotate = rotateRadians(rotate[0] * __WEBPACK_IMPORTED_MODULE_1__math_js__["r" /* radians */], rotate[1] * __WEBPACK_IMPORTED_MODULE_1__math_js__["r" /* radians */], rotate.length > 2 ? rotate[2] * __WEBPACK_IMPORTED_MODULE_1__math_js__["r" /* radians */] : 0);
 
  function forward(coordinates) {
    coordinates = rotate(coordinates[0] * __WEBPACK_IMPORTED_MODULE_1__math_js__["r" /* radians */], coordinates[1] * __WEBPACK_IMPORTED_MODULE_1__math_js__["r" /* radians */]);
    return coordinates[0] *= __WEBPACK_IMPORTED_MODULE_1__math_js__["h" /* degrees */], coordinates[1] *= __WEBPACK_IMPORTED_MODULE_1__math_js__["h" /* degrees */], coordinates;
  }
 
  forward.invert = function(coordinates) {
    coordinates = rotate.invert(coordinates[0] * __WEBPACK_IMPORTED_MODULE_1__math_js__["r" /* radians */], coordinates[1] * __WEBPACK_IMPORTED_MODULE_1__math_js__["r" /* radians */]);
    return coordinates[0] *= __WEBPACK_IMPORTED_MODULE_1__math_js__["h" /* degrees */], coordinates[1] *= __WEBPACK_IMPORTED_MODULE_1__math_js__["h" /* degrees */], coordinates;
  };
 
  return forward;
});
 
 
/***/ }),
/* 253 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = clipRectangle;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__math_js__ = __webpack_require__(19);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__buffer_js__ = __webpack_require__(743);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__line_js__ = __webpack_require__(1305);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__rejoin_js__ = __webpack_require__(744);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_d3_array__ = __webpack_require__(44);
 
 
 
 
 
 
var clipMax = 1e9, clipMin = -clipMax;
 
// TODO Use d3-polygon’s polygonContains here for the ring check?
// TODO Eliminate duplicate buffering in clipBuffer and polygon.push?
 
function clipRectangle(x0, y0, x1, y1) {
 
  function visible(x, y) {
    return x0 <= x && x <= x1 && y0 <= y && y <= y1;
  }
 
  function interpolate(from, to, direction, stream) {
    var a = 0, a1 = 0;
    if (from == null
        || (a = corner(from, direction)) !== (a1 = corner(to, direction))
        || comparePoint(from, to) < 0 ^ direction > 0) {
      do stream.point(a === 0 || a === 3 ? x0 : x1, a > 1 ? y1 : y0);
      while ((a = (a + direction + 4) % 4) !== a1);
    } else {
      stream.point(to[0], to[1]);
    }
  }
 
  function corner(p, direction) {
    return Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["a" /* abs */])(p[0] - x0) < __WEBPACK_IMPORTED_MODULE_0__math_js__["i" /* epsilon */] ? direction > 0 ? 0 : 3
        : Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["a" /* abs */])(p[0] - x1) < __WEBPACK_IMPORTED_MODULE_0__math_js__["i" /* epsilon */] ? direction > 0 ? 2 : 1
        : Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["a" /* abs */])(p[1] - y0) < __WEBPACK_IMPORTED_MODULE_0__math_js__["i" /* epsilon */] ? direction > 0 ? 1 : 0
        : direction > 0 ? 3 : 2; // abs(p[1] - y1) < epsilon
  }
 
  function compareIntersection(a, b) {
    return comparePoint(a.x, b.x);
  }
 
  function comparePoint(a, b) {
    var ca = corner(a, 1),
        cb = corner(b, 1);
    return ca !== cb ? ca - cb
        : ca === 0 ? b[1] - a[1]
        : ca === 1 ? a[0] - b[0]
        : ca === 2 ? a[1] - b[1]
        : b[0] - a[0];
  }
 
  return function(stream) {
    var activeStream = stream,
        bufferStream = Object(__WEBPACK_IMPORTED_MODULE_1__buffer_js__["a" /* default */])(),
        segments,
        polygon,
        ring,
        x__, y__, v__, // first point
        x_, y_, v_, // previous point
        first,
        clean;
 
    var clipStream = {
      point: point,
      lineStart: lineStart,
      lineEnd: lineEnd,
      polygonStart: polygonStart,
      polygonEnd: polygonEnd
    };
 
    function point(x, y) {
      if (visible(x, y)) activeStream.point(x, y);
    }
 
    function polygonInside() {
      var winding = 0;
 
      for (var i = 0, n = polygon.length; i < n; ++i) {
        for (var ring = polygon[i], j = 1, m = ring.length, point = ring[0], a0, a1, b0 = point[0], b1 = point[1]; j < m; ++j) {
          a0 = b0, a1 = b1, point = ring[j], b0 = point[0], b1 = point[1];
          if (a1 <= y1) { if (b1 > y1 && (b0 - a0) * (y1 - a1) > (b1 - a1) * (x0 - a0)) ++winding; }
          else { if (b1 <= y1 && (b0 - a0) * (y1 - a1) < (b1 - a1) * (x0 - a0)) --winding; }
        }
      }
 
      return winding;
    }
 
    // Buffer geometry within a polygon and then clip it en masse.
    function polygonStart() {
      activeStream = bufferStream, segments = [], polygon = [], clean = true;
    }
 
    function polygonEnd() {
      var startInside = polygonInside(),
          cleanInside = clean && startInside,
          visible = (segments = Object(__WEBPACK_IMPORTED_MODULE_4_d3_array__["n" /* merge */])(segments)).length;
      if (cleanInside || visible) {
        stream.polygonStart();
        if (cleanInside) {
          stream.lineStart();
          interpolate(null, null, 1, stream);
          stream.lineEnd();
        }
        if (visible) {
          Object(__WEBPACK_IMPORTED_MODULE_3__rejoin_js__["a" /* default */])(segments, compareIntersection, startInside, interpolate, stream);
        }
        stream.polygonEnd();
      }
      activeStream = stream, segments = polygon = ring = null;
    }
 
    function lineStart() {
      clipStream.point = linePoint;
      if (polygon) polygon.push(ring = []);
      first = true;
      v_ = false;
      x_ = y_ = NaN;
    }
 
    // TODO rather than special-case polygons, simply handle them separately.
    // Ideally, coincident intersection points should be jittered to avoid
    // clipping issues.
    function lineEnd() {
      if (segments) {
        linePoint(x__, y__);
        if (v__ && v_) bufferStream.rejoin();
        segments.push(bufferStream.result());
      }
      clipStream.point = point;
      if (v_) activeStream.lineEnd();
    }
 
    function linePoint(x, y) {
      var v = visible(x, y);
      if (polygon) ring.push([x, y]);
      if (first) {
        x__ = x, y__ = y, v__ = v;
        first = false;
        if (v) {
          activeStream.lineStart();
          activeStream.point(x, y);
        }
      } else {
        if (v && v_) activeStream.point(x, y);
        else {
          var a = [x_ = Math.max(clipMin, Math.min(clipMax, x_)), y_ = Math.max(clipMin, Math.min(clipMax, y_))],
              b = [x = Math.max(clipMin, Math.min(clipMax, x)), y = Math.max(clipMin, Math.min(clipMax, y))];
          if (Object(__WEBPACK_IMPORTED_MODULE_2__line_js__["a" /* default */])(a, b, x0, y0, x1, y1)) {
            if (!v_) {
              activeStream.lineStart();
              activeStream.point(a[0], a[1]);
            }
            activeStream.point(b[0], b[1]);
            if (!v) activeStream.lineEnd();
            clean = false;
          } else if (v) {
            activeStream.lineStart();
            activeStream.point(x, y);
            clean = false;
          }
        }
      }
      x_ = x, y_ = y, v_ = v;
    }
 
    return clipStream;
  };
}
 
 
/***/ }),
/* 254 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["b"] = transformer;
/* harmony default export */ __webpack_exports__["a"] = (function(methods) {
  return {
    stream: transformer(methods)
  };
});
 
function transformer(methods) {
  return function(stream) {
    var s = new TransformStream;
    for (var key in methods) s[key] = methods[key];
    s.stream = stream;
    return s;
  };
}
 
function TransformStream() {}
 
TransformStream.prototype = {
  constructor: TransformStream,
  point: function(x, y) { this.stream.point(x, y); },
  sphere: function() { this.stream.sphere(); },
  lineStart: function() { this.stream.lineStart(); },
  lineEnd: function() { this.stream.lineEnd(); },
  polygonStart: function() { this.stream.polygonStart(); },
  polygonEnd: function() { this.stream.polygonEnd(); }
};
 
 
/***/ }),
/* 255 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony default export */ __webpack_exports__["a"] = (function(parent, x0, y0, x1, y1) {
  var nodes = parent.children,
      node,
      i = -1,
      n = nodes.length,
      k = parent.value && (y1 - y0) / parent.value;
 
  while (++i < n) {
    node = nodes[i], node.x0 = x0, node.x1 = x1;
    node.y0 = y0, node.y1 = y0 += node.value * k;
  }
});
 
 
/***/ }),
/* 256 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__interval_js__ = __webpack_require__(52);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return __WEBPACK_IMPORTED_MODULE_0__interval_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__millisecond_js__ = __webpack_require__(1369);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return __WEBPACK_IMPORTED_MODULE_1__millisecond_js__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return __WEBPACK_IMPORTED_MODULE_1__millisecond_js__["b"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "L", function() { return __WEBPACK_IMPORTED_MODULE_1__millisecond_js__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "M", function() { return __WEBPACK_IMPORTED_MODULE_1__millisecond_js__["b"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__second_js__ = __webpack_require__(1370);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "r", function() { return __WEBPACK_IMPORTED_MODULE_2__second_js__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "s", function() { return __WEBPACK_IMPORTED_MODULE_2__second_js__["b"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "V", function() { return __WEBPACK_IMPORTED_MODULE_2__second_js__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "W", function() { return __WEBPACK_IMPORTED_MODULE_2__second_js__["b"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__minute_js__ = __webpack_require__(1371);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return __WEBPACK_IMPORTED_MODULE_3__minute_js__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "k", function() { return __WEBPACK_IMPORTED_MODULE_3__minute_js__["b"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__hour_js__ = __webpack_require__(1372);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return __WEBPACK_IMPORTED_MODULE_4__hour_js__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return __WEBPACK_IMPORTED_MODULE_4__hour_js__["b"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__day_js__ = __webpack_require__(1373);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_5__day_js__["b"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return __WEBPACK_IMPORTED_MODULE_5__day_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__week_js__ = __webpack_require__(1374);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "B", function() { return __WEBPACK_IMPORTED_MODULE_6__week_js__["g"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "C", function() { return __WEBPACK_IMPORTED_MODULE_6__week_js__["h"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "t", function() { return __WEBPACK_IMPORTED_MODULE_6__week_js__["g"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "u", function() { return __WEBPACK_IMPORTED_MODULE_6__week_js__["h"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "l", function() { return __WEBPACK_IMPORTED_MODULE_6__week_js__["c"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "m", function() { return __WEBPACK_IMPORTED_MODULE_6__week_js__["d"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "x", function() { return __WEBPACK_IMPORTED_MODULE_6__week_js__["k"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "y", function() { return __WEBPACK_IMPORTED_MODULE_6__week_js__["l"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "z", function() { return __WEBPACK_IMPORTED_MODULE_6__week_js__["m"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "A", function() { return __WEBPACK_IMPORTED_MODULE_6__week_js__["n"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "v", function() { return __WEBPACK_IMPORTED_MODULE_6__week_js__["i"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "w", function() { return __WEBPACK_IMPORTED_MODULE_6__week_js__["j"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return __WEBPACK_IMPORTED_MODULE_6__week_js__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return __WEBPACK_IMPORTED_MODULE_6__week_js__["b"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "p", function() { return __WEBPACK_IMPORTED_MODULE_6__week_js__["e"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "q", function() { return __WEBPACK_IMPORTED_MODULE_6__week_js__["f"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__month_js__ = __webpack_require__(1375);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "n", function() { return __WEBPACK_IMPORTED_MODULE_7__month_js__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "o", function() { return __WEBPACK_IMPORTED_MODULE_7__month_js__["b"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__year_js__ = __webpack_require__(1376);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "D", function() { return __WEBPACK_IMPORTED_MODULE_8__year_js__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "E", function() { return __WEBPACK_IMPORTED_MODULE_8__year_js__["b"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__utcMinute_js__ = __webpack_require__(1377);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "N", function() { return __WEBPACK_IMPORTED_MODULE_9__utcMinute_js__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "O", function() { return __WEBPACK_IMPORTED_MODULE_9__utcMinute_js__["b"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__utcHour_js__ = __webpack_require__(1378);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "J", function() { return __WEBPACK_IMPORTED_MODULE_10__utcHour_js__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "K", function() { return __WEBPACK_IMPORTED_MODULE_10__utcHour_js__["b"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__utcDay_js__ = __webpack_require__(1379);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "F", function() { return __WEBPACK_IMPORTED_MODULE_11__utcDay_js__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "G", function() { return __WEBPACK_IMPORTED_MODULE_11__utcDay_js__["b"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__utcWeek_js__ = __webpack_require__(1380);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "_5", function() { return __WEBPACK_IMPORTED_MODULE_12__utcWeek_js__["g"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "_6", function() { return __WEBPACK_IMPORTED_MODULE_12__utcWeek_js__["h"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "X", function() { return __WEBPACK_IMPORTED_MODULE_12__utcWeek_js__["g"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Y", function() { return __WEBPACK_IMPORTED_MODULE_12__utcWeek_js__["h"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "P", function() { return __WEBPACK_IMPORTED_MODULE_12__utcWeek_js__["c"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Q", function() { return __WEBPACK_IMPORTED_MODULE_12__utcWeek_js__["d"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "_1", function() { return __WEBPACK_IMPORTED_MODULE_12__utcWeek_js__["k"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "_2", function() { return __WEBPACK_IMPORTED_MODULE_12__utcWeek_js__["l"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "_3", function() { return __WEBPACK_IMPORTED_MODULE_12__utcWeek_js__["m"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "_4", function() { return __WEBPACK_IMPORTED_MODULE_12__utcWeek_js__["n"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Z", function() { return __WEBPACK_IMPORTED_MODULE_12__utcWeek_js__["i"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "_0", function() { return __WEBPACK_IMPORTED_MODULE_12__utcWeek_js__["j"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "H", function() { return __WEBPACK_IMPORTED_MODULE_12__utcWeek_js__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "I", function() { return __WEBPACK_IMPORTED_MODULE_12__utcWeek_js__["b"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "T", function() { return __WEBPACK_IMPORTED_MODULE_12__utcWeek_js__["e"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "U", function() { return __WEBPACK_IMPORTED_MODULE_12__utcWeek_js__["f"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__utcMonth_js__ = __webpack_require__(1381);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "R", function() { return __WEBPACK_IMPORTED_MODULE_13__utcMonth_js__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "S", function() { return __WEBPACK_IMPORTED_MODULE_13__utcMonth_js__["b"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__utcYear_js__ = __webpack_require__(1382);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "_7", function() { return __WEBPACK_IMPORTED_MODULE_14__utcYear_js__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "_8", function() { return __WEBPACK_IMPORTED_MODULE_14__utcYear_js__["b"]; });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
/***/ }),
/* 257 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
function Linear(context) {
  this._context = context;
}
 
Linear.prototype = {
  areaStart: function() {
    this._line = 0;
  },
  areaEnd: function() {
    this._line = NaN;
  },
  lineStart: function() {
    this._point = 0;
  },
  lineEnd: function() {
    if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();
    this._line = 1 - this._line;
  },
  point: function(x, y) {
    x = +x, y = +y;
    switch (this._point) {
      case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;
      case 1: this._point = 2; // proceed
      default: this._context.lineTo(x, y); break;
    }
  }
};
 
/* harmony default export */ __webpack_exports__["a"] = (function(context) {
  return new Linear(context);
});
 
 
/***/ }),
/* 258 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony default export */ __webpack_exports__["a"] = (function() {});
 
 
/***/ }),
/* 259 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["c"] = point;
/* harmony export (immutable) */ __webpack_exports__["a"] = Basis;
function point(that, x, y) {
  that._context.bezierCurveTo(
    (2 * that._x0 + that._x1) / 3,
    (2 * that._y0 + that._y1) / 3,
    (that._x0 + 2 * that._x1) / 3,
    (that._y0 + 2 * that._y1) / 3,
    (that._x0 + 4 * that._x1 + x) / 6,
    (that._y0 + 4 * that._y1 + y) / 6
  );
}
 
function Basis(context) {
  this._context = context;
}
 
Basis.prototype = {
  areaStart: function() {
    this._line = 0;
  },
  areaEnd: function() {
    this._line = NaN;
  },
  lineStart: function() {
    this._x0 = this._x1 =
    this._y0 = this._y1 = NaN;
    this._point = 0;
  },
  lineEnd: function() {
    switch (this._point) {
      case 3: point(this, this._x1, this._y1); // proceed
      case 2: this._context.lineTo(this._x1, this._y1); break;
    }
    if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();
    this._line = 1 - this._line;
  },
  point: function(x, y) {
    x = +x, y = +y;
    switch (this._point) {
      case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;
      case 1: this._point = 2; break;
      case 2: this._point = 3; this._context.lineTo((5 * this._x0 + this._x1) / 6, (5 * this._y0 + this._y1) / 6); // proceed
      default: point(this, x, y); break;
    }
    this._x0 = this._x1, this._x1 = x;
    this._y0 = this._y1, this._y1 = y;
  }
};
 
/* harmony default export */ __webpack_exports__["b"] = (function(context) {
  return new Basis(context);
});
 
 
/***/ }),
/* 260 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["c"] = point;
/* harmony export (immutable) */ __webpack_exports__["a"] = Cardinal;
function point(that, x, y) {
  that._context.bezierCurveTo(
    that._x1 + that._k * (that._x2 - that._x0),
    that._y1 + that._k * (that._y2 - that._y0),
    that._x2 + that._k * (that._x1 - x),
    that._y2 + that._k * (that._y1 - y),
    that._x2,
    that._y2
  );
}
 
function Cardinal(context, tension) {
  this._context = context;
  this._k = (1 - tension) / 6;
}
 
Cardinal.prototype = {
  areaStart: function() {
    this._line = 0;
  },
  areaEnd: function() {
    this._line = NaN;
  },
  lineStart: function() {
    this._x0 = this._x1 = this._x2 =
    this._y0 = this._y1 = this._y2 = NaN;
    this._point = 0;
  },
  lineEnd: function() {
    switch (this._point) {
      case 2: this._context.lineTo(this._x2, this._y2); break;
      case 3: point(this, this._x1, this._y1); break;
    }
    if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();
    this._line = 1 - this._line;
  },
  point: function(x, y) {
    x = +x, y = +y;
    switch (this._point) {
      case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;
      case 1: this._point = 2; this._x1 = x, this._y1 = y; break;
      case 2: this._point = 3; // proceed
      default: point(this, x, y); break;
    }
    this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;
    this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;
  }
};
 
/* harmony default export */ __webpack_exports__["b"] = ((function custom(tension) {
 
  function cardinal(context) {
    return new Cardinal(context, tension);
  }
 
  cardinal.tension = function(tension) {
    return custom(+tension);
  };
 
  return cardinal;
})(0));
 
 
/***/ }),
/* 261 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
exports.SUBSCRIPTION_TYPE = {
    followQuery: 'followQuery',
    followDocument: 'followDocument'
};
 
 
/***/ }),
/* 262 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
var Component_1 = __webpack_require__(6);
var ComponentOptions_1 = __webpack_require__(13);
var Assert_1 = __webpack_require__(12);
var QueryUtils_1 = __webpack_require__(37);
var Initialization_1 = __webpack_require__(8);
var Utils_1 = __webpack_require__(5);
var FileTypes_1 = __webpack_require__(138);
var Dom_1 = __webpack_require__(0);
var GlobalExports_1 = __webpack_require__(10);
var TemplateFieldsEvaluator_1 = __webpack_require__(218);
/**
 * The Icon component outputs the corresponding icon for a given file type. The component searches for a suitable icon
 * from those available in the Coveo JavaScript Search Framework. If the component finds no suitable icon, it instead
 * outputs a generic icon.
 *
 * This component is a result template component (see [Result Templates](https://docs.coveo.com/en/413/)).
 */
var Icon = /** @class */ (function (_super) {
    __extends(Icon, _super);
    /**
     * Creates a new Icon component.
     * @param element The HTMLElement on which to instantiate the component.
     * @param options The options for the Icon component.
     * @param bindings The bindings that the component requires to function normally. If not set, these will be
     * automatically resolved (with a slower execution time).
     * @param result The result to associate the component with.
     */
    function Icon(element, options, bindings, result) {
        var _this = _super.call(this, element, Icon.ID, bindings) || this;
        _this.element = element;
        _this.options = options;
        _this.result = result;
        _this.options = ComponentOptions_1.ComponentOptions.initComponentOptions(element, Icon, options);
        _this.result = _this.result || _this.resolveResult();
        Assert_1.Assert.exists(_this.result);
        if (TemplateFieldsEvaluator_1.TemplateFieldsEvaluator.evaluateFieldsToMatch(_this.options.conditions, _this.result)) {
            _this.initialize(element, bindings);
        }
        else Eif (_this.element.parentElement != null) {
            _this.element.parentElement.removeChild(_this.element);
        }
        return _this;
    }
    Icon.prototype.initialize = function (element, bindings) {
        var possibleInternalQuickview = Dom_1.$$(this.element).find('.' + Component_1.Component.computeCssClassNameForType('Quickview'));
        Iif (!Utils_1.Utils.isNullOrUndefined(possibleInternalQuickview) && QueryUtils_1.QueryUtils.hasHTMLVersion(this.result)) {
            Dom_1.$$(this.element).addClass('coveo-with-quickview');
            Dom_1.$$(this.element).on('click', function () {
                var qv = Component_1.Component.get(possibleInternalQuickview);
                qv.open();
            });
        }
        Icon.createIcon(this.result, this.options, element, bindings);
    };
    Icon.createIcon = function (result, options, element, bindings) {
        Iif (options === void 0) { options = {}; }
        if (element === void 0) { element = Dom_1.$$('div').el; }
        var info = FileTypes_1.FileTypes.get(result);
        if (!bindings && result.searchInterface) {
            // try to resolve results bindings automatically
            bindings = result.searchInterface.getBindings();
        }
        info = Icon.preprocessIconInfo(options, info);
        Dom_1.$$(element).toggleClass('coveo-small', options.small === true);
        if (options.value != undefined) {
            Iif (options.small === true) {
                if (options.value.indexOf('-small') == -1) {
                    info.icon += '-small';
                }
            }
            Iif (options.small === false) {
                if (options.value.indexOf('-small') != -1) {
                    info.icon = info.icon.replace('-small', '');
                }
            }
        }
        Dom_1.$$(element).addClass(info.icon);
        element.setAttribute('title', info.caption);
        if (Icon.shouldDisplayLabel(options, bindings)) {
            element.appendChild(Dom_1.$$('span', {
                className: 'coveo-icon-caption-overlay'
            }, info.caption).el);
            Dom_1.$$(element).addClass('coveo-icon-with-caption-overlay');
            Dom_1.$$(element).setAttribute('data-with-label', 'true');
        }
        return element;
    };
    Icon.shouldDisplayLabel = function (options, bindings) {
        // If withLabel is explicitely set to false, the label will never display
        // If withLabel is explicitely set to true, the label will always display
        // If withLabel is set to default value (not a hard true or false), the label will display based on ./core/filetypes/**.json
        // with the property shouldDisplayLabel set on each file type/ objecttype
        // In this case, the generated css will take care of outputting the correct css to display : block
        return options.withLabel !== false;
    };
    Icon.preprocessIconInfo = function (options, info) {
        if (options.labelValue != null) {
            info.caption = options.labelValue;
        }
        if (options.value != null) {
            info.icon = 'coveo-icon ' + options.value;
        }
        Iif (info.caption == null) {
            info.caption = '';
        }
        Iif (info.icon == null) {
            info.icon = 'coveo-icon coveo-sprites-custom';
        }
        return info;
    };
    Icon.ID = 'Icon';
    Icon.doExport = function () {
        GlobalExports_1.exportGlobally({
            Icon: Icon
        });
    };
    /**
     * The options for the Icon
     * @componentOptions
     */
    Icon.options = {
        /**
         * Specifies the value that the Icon component should output as its CSS class instead of the auto-selected value.
         *
         * Default value is `undefined`, which means that the Coveo JavaScript Search Framework outputs a suitable icon
         * depending on the result file type.
         */
        value: ComponentOptions_1.ComponentOptions.buildStringOption(),
        /**
         * Specifies whether the Icon component should output the smaller version of the icon instead of the regular one.
         *
         * Default value is `undefined`.
         */
        small: ComponentOptions_1.ComponentOptions.buildBooleanOption(),
        /**
         * Specifies whether the Icon component should force the output icon to display its caption/label.
         *
         * **Note:**
         *
         * > Due to limited screen real estate, setting this option to `true` has no effect on icons used inside Coveo for
         * > Salesforce Insight Panels.
         *
         * Default value is `undefined`, which means that the Coveo JavaScript Search Framework determines whether the icon
         * needs to display a caption/label depending on the result file type.
         */
        withLabel: ComponentOptions_1.ComponentOptions.buildBooleanOption(),
        /**
         * Specifies what text to display as the icon caption/label.
         *
         * Default value is `undefined`, which means that the Coveo JavaScript Search Framework determines what text the icon
         * needs to display depending on the result file type.
         */
        labelValue: ComponentOptions_1.ComponentOptions.buildLocalizedStringOption(),
        /**
         * A field-based condition that must be satisfied by the query result item for the component to be rendered.
         *
         * Note: This option uses a distinctive markup configuration syntax allowing multiple conditions to be expressed. Its underlying logic is the same as that of the field value conditions mechanism used by result templates.
         *
         * **Examples:**
         * Render the component if the query result item's @documenttype field value is Article or Documentation.
         * ```html
         * <div class="CoveoIcon" data-field="@author" data-condition-field-documenttype="Article, Documentation"></div>
         * ```
         *
         * Render the component if the query result item's @documenttype field value is anything but Case.
         * ```html
         * <div class="CoveoIcon" data-field="@author" data-condition-field-not-documenttype="Case"></div>
         * ```
         * Render the component if the query result item's @documenttype field value is Article, and if its @author field value is anything but Anonymous.
         * ```html
         * <div class="CoveoIcon" data-field="@author" data-condition-field-documenttype="Article" data-condition-field-not-author="Anonymous"></div>
         * ```
         * Default value is `undefined`.
         */
        conditions: ComponentOptions_1.ComponentOptions.buildFieldConditionOption()
    };
    return Icon;
}(Component_1.Component));
exports.Icon = Icon;
Initialization_1.Initialization.registerAutoCreateComponent(Icon);
 
 
/***/ }),
/* 263 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Result_1 = __webpack_require__(76);
var Result_2 = __webpack_require__(76);
var ExpressionConstant = /** @class */ (function () {
    function ExpressionConstant(value, id) {
        this.value = value;
        this.id = id;
    }
    ExpressionConstant.prototype.parse = function (input, end) {
        // the value must be at the start of the input
        var success = input.indexOf(this.value) == 0;
        var result = new Result_1.Result(success ? this.value : null, this, input);
        // if is successful and we require the end but the length of parsed is
        // lower than the input length, return a EndOfInputExpected Result
        if (success && end && input.length > this.value.length) {
            return new Result_2.EndOfInputResult(result);
        }
        return result;
    };
    ExpressionConstant.prototype.toString = function () {
        return this.value;
    };
    return ExpressionConstant;
}());
exports.ExpressionConstant = ExpressionConstant;
 
 
/***/ }),
/* 264 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { Iif (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        Iif (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            Iif (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
            Iif (y = 0, t) op = [0, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    Eif (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
Object.defineProperty(exports, "__esModule", { value: true });
var underscore_1 = __webpack_require__(1);
var Core_1 = __webpack_require__(9);
var Dom_1 = __webpack_require__(0);
var doMagicBoxExport_1 = __webpack_require__(1487);
var InputManager_1 = __webpack_require__(384);
var MagicBoxClear_1 = __webpack_require__(806);
var SuggestionsManager_1 = __webpack_require__(265);
var MagicBoxInstance = /** @class */ (function () {
    function MagicBoxInstance(element, grammar, options) {
        Iif (options === void 0) { options = {}; }
        var _this = this;
        this.element = element;
        this.grammar = grammar;
        this.options = options;
        this.lastSuggestions = [];
        if (underscore_1.isUndefined(this.options.inline)) {
            this.options.inline = false;
        }
        Dom_1.$$(element).addClass('magic-box');
        if (this.options.inline) {
            Dom_1.$$(element).addClass('magic-box-inline');
        }
        this.result = this.grammar.parse('');
        this.displayedResult = this.result.clean();
        var inputContainer = Dom_1.$$(element).find('.magic-box-input');
        if (!inputContainer) {
            inputContainer = document.createElement('div');
            inputContainer.className = 'magic-box-input';
            element.appendChild(inputContainer);
        }
        this.inputManager = new InputManager_1.InputManager(inputContainer, function (text, wordCompletion) {
            if (!wordCompletion) {
                _this.setText(text);
                _this.addSuggestions();
                _this.onchange && _this.onchange();
            }
            else {
                _this.setText(text);
                _this.onselect && _this.onselect(_this.firstSuggestionWithText);
            }
        }, this);
        this.inputManager.ontabpress = function () {
            _this.ontabpress && _this.ontabpress();
        };
        var existingValue = this.inputManager.getValue();
        Iif (existingValue) {
            this.displayedResult.input = existingValue;
        }
        this.inputManager.setResult(this.displayedResult);
        var suggestionsContainer = document.createElement('div');
        suggestionsContainer.className = 'magic-box-suggestions';
        this.element.appendChild(suggestionsContainer);
        this.suggestionsManager = new SuggestionsManager_1.SuggestionsManager(suggestionsContainer, this.element, this.inputManager, {
            suggestionClass: this.options.selectableSuggestionClass,
            selectedClass: this.options.selectedSuggestionClass,
            timeout: this.options.suggestionTimeout
        });
        this.magicBoxClear = new MagicBoxClear_1.MagicBoxClear(this);
        this.setupHandler();
    }
    Object.defineProperty(MagicBoxInstance.prototype, "firstSuggestionWithText", {
        get: function () {
            return underscore_1.find(this.lastSuggestions, function (suggestion) { return suggestion.text; });
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(MagicBoxInstance.prototype, "firstSuggestionText", {
        get: function () {
            var firstSuggestionWithText = this.firstSuggestionWithText;
            return firstSuggestionWithText ? firstSuggestionWithText.text : '';
        },
        enumerable: true,
        configurable: true
    });
    MagicBoxInstance.prototype.getResult = function () {
        return this.result;
    };
    MagicBoxInstance.prototype.getDisplayedResult = function () {
        return this.displayedResult;
    };
    MagicBoxInstance.prototype.setText = function (text) {
        Dom_1.$$(this.element).toggleClass('magic-box-notEmpty', text.length > 0);
        this.magicBoxClear.toggleTabindexAndAriaHidden(text.length > 0);
        this.result = this.grammar.parse(text);
        this.displayedResult = this.result.clean();
        this.inputManager.setResult(this.displayedResult);
    };
    MagicBoxInstance.prototype.setCursor = function (index) {
        this.inputManager.setCursor(index);
    };
    MagicBoxInstance.prototype.getCursor = function () {
        return this.inputManager.getCursor();
    };
    MagicBoxInstance.prototype.resultAtCursor = function (match) {
        return this.displayedResult.resultAt(this.getCursor(), match);
    };
    MagicBoxInstance.prototype.setupHandler = function () {
        var _this = this;
        this.inputManager.onblur = function () {
            Dom_1.$$(_this.element).removeClass('magic-box-hasFocus');
            _this.onblur && _this.onblur();
            Eif (!_this.options.inline) {
                _this.clearSuggestion();
            }
        };
        this.inputManager.onfocus = function () {
            Dom_1.$$(_this.element).addClass('magic-box-hasFocus');
            _this.addSuggestions();
            _this.onfocus && _this.onfocus();
        };
        this.inputManager.onkeydown = function (key) {
            if (_this.shouldMoveInSuggestions(key)) {
                return false;
            }
            if (key === Core_1.KEYBOARD.ENTER) {
                var suggestion = _this.suggestionsManager.selectAndReturnKeyboardFocusedElement();
                if (suggestion == null) {
                    _this.onsubmit && _this.onsubmit();
                }
                return false;
            }
            else if (key === Core_1.KEYBOARD.ESCAPE) {
                _this.clearSuggestion();
                _this.blur();
            }
            else {
                _this.suggestionsManager.clearKeyboardFocusedElement();
            }
            return true;
        };
        this.inputManager.onchangecursor = function () {
            _this.addSuggestions();
        };
        this.inputManager.onkeyup = function (key) {
            _this.onmove && _this.onmove();
            Eif (!_this.shouldMoveInSuggestions(key)) {
                return true;
            }
            switch (key) {
                case Core_1.KEYBOARD.UP_ARROW:
                    _this.suggestionsManager.moveUp();
                    break;
                case Core_1.KEYBOARD.DOWN_ARROW:
                    _this.suggestionsManager.moveDown();
                    break;
                case Core_1.KEYBOARD.LEFT_ARROW:
                    _this.suggestionsManager.moveLeft();
                    break;
                case Core_1.KEYBOARD.RIGHT_ARROW:
                    _this.suggestionsManager.moveRight();
                    break;
            }
            if (_this.suggestionsManager.selectedSuggestion) {
                _this.focusOnSuggestion(_this.suggestionsManager.selectedSuggestion);
            }
            _this.onchange && _this.onchange();
            return false;
        };
    };
    MagicBoxInstance.prototype.addSuggestions = function () {
        return __awaiter(this, void 0, void 0, function () {
            var suggestions;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0: return [4 /*yield*/, this.suggestionsManager.receiveSuggestions(this.getSuggestions != null ? this.getSuggestions() : [])];
                    case 1:
                        suggestions = _a.sent();
                        this.addSelectEventHandlers(suggestions);
                        this.inputManager.setWordCompletion(this.firstSuggestionText);
                        this.onSuggestions(suggestions);
                        return [2 /*return*/];
                }
            });
        });
    };
    MagicBoxInstance.prototype.shouldMoveInSuggestions = function (key) {
        switch (key) {
            case Core_1.KEYBOARD.UP_ARROW:
            case Core_1.KEYBOARD.DOWN_ARROW:
                return true;
            case Core_1.KEYBOARD.LEFT_ARROW:
            case Core_1.KEYBOARD.RIGHT_ARROW:
                if (this.suggestionsManager.hasFocus && this.suggestionsManager.hasPreviews) {
                    return true;
                }
        }
        return false;
    };
    MagicBoxInstance.prototype.addSelectEventHandlers = function (suggestions) {
        var _this = this;
        underscore_1.each(suggestions, function (suggestion) {
            if (suggestion.onSelect == null && suggestion.text != null) {
                suggestion.onSelect = function () {
                    _this.setText(suggestion.text);
                    _this.onselect && _this.onselect(suggestion);
                };
            }
        });
    };
    MagicBoxInstance.prototype.focus = function () {
        Dom_1.$$(this.element).addClass('magic-box-hasFocus');
        this.inputManager.focus();
    };
    MagicBoxInstance.prototype.blur = function () {
        this.inputManager.blur();
    };
    MagicBoxInstance.prototype.clearSuggestion = function () {
        return __awaiter(this, void 0, void 0, function () {
            return __generator(this, function (_a) {
                this.inputManager.setWordCompletion(null);
                this.suggestionsManager.clearSuggestions();
                this.onSuggestions([]);
                return [2 /*return*/];
            });
        });
    };
    MagicBoxInstance.prototype.focusOnSuggestion = function (suggestion) {
        if (suggestion == null || suggestion.text == null) {
            this.inputManager.setResult(this.displayedResult, this.firstSuggestionText);
        }
        else {
            this.inputManager.setResult(this.grammar.parse(suggestion.text).clean(), suggestion.text);
        }
    };
    MagicBoxInstance.prototype.getText = function () {
        return this.inputManager.getValue();
    };
    MagicBoxInstance.prototype.getWordCompletion = function () {
        return this.inputManager.getWordCompletion();
    };
    MagicBoxInstance.prototype.clear = function () {
        this.setText('');
        this.clearSuggestion();
        this.focus();
        this.onclear && this.onclear();
    };
    MagicBoxInstance.prototype.hasSuggestions = function () {
        return this.suggestionsManager.hasSuggestions;
    };
    return MagicBoxInstance;
}());
exports.MagicBoxInstance = MagicBoxInstance;
function createMagicBox(element, grammar, options) {
    return new MagicBoxInstance(element, grammar, options);
}
exports.createMagicBox = createMagicBox;
function requestAnimationFrame(callback) {
    if ('requestAnimationFrame' in window) {
        return window.requestAnimationFrame(callback);
    }
    return setTimeout(callback);
}
exports.requestAnimationFrame = requestAnimationFrame;
doMagicBoxExport_1.doMagicBoxExport();
 
 
/***/ }),
/* 265 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { Iif (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        Iif (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            Iif (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
            Iif (y = 0, t) op = [0, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    Eif (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        Iif (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
Object.defineProperty(exports, "__esModule", { value: true });
var underscore_1 = __webpack_require__(1);
var OmniboxEvents_1 = __webpack_require__(47);
var Component_1 = __webpack_require__(6);
var Dom_1 = __webpack_require__(0);
var ResultPreviewsManager_1 = __webpack_require__(805);
var QueryProcessor_1 = __webpack_require__(386);
var QueryUtils_1 = __webpack_require__(37);
var Direction;
(function (Direction) {
    Direction["Up"] = "Up";
    Direction["Down"] = "Down";
    Direction["Left"] = "Left";
    Direction["Right"] = "Right";
})(Direction = exports.Direction || (exports.Direction = {}));
var SuggestionsManager = /** @class */ (function () {
    function SuggestionsManager(element, magicBoxContainer, inputManager, options) {
        var _this = this;
        this.element = element;
        this.magicBoxContainer = magicBoxContainer;
        this.inputManager = inputManager;
        this.suggestionListboxID = "coveo-magicbox-suggestions-" + QueryUtils_1.QueryUtils.createGuid();
        this.suggestionListboxClassName = "coveo-magicbox-suggestions";
        this.root = Component_1.Component.resolveRoot(element);
        this.options = underscore_1.defaults(options, {
            suggestionClass: 'magic-box-suggestion',
            selectedClass: 'magic-box-selected'
        });
        // Put in a sane default, so as to not reject every suggestions if not set on initialization
        if (this.options.timeout == undefined) {
            this.options.timeout = 500;
        }
        Dom_1.$$(this.element).on('mouseover', function (e) {
            _this.handleMouseOver(e);
        });
        Dom_1.$$(this.element).on('mouseout', function (e) {
            _this.handleMouseOut(e);
        });
        this.suggestionsProcessor = new QueryProcessor_1.QueryProcessor({ timeout: this.options.timeout });
        this.resultPreviewsManager = new ResultPreviewsManager_1.ResultPreviewsManager(element, {
            selectedClass: this.options.selectedClass,
            timeout: this.options.timeout
        });
        this.suggestionsListbox = this.buildSuggestionsContainer();
        Dom_1.$$(this.element).append(this.suggestionsListbox.el);
        this.addAccessibilityProperties();
        this.appendEmptySuggestionOption();
    }
    Object.defineProperty(SuggestionsManager.prototype, "hasSuggestions", {
        get: function () {
            return this.currentSuggestions && this.currentSuggestions.length > 0;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(SuggestionsManager.prototype, "hasFocus", {
        get: function () {
            return Dom_1.$$(this.element).findClass(this.options.selectedClass).length > 0;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(SuggestionsManager.prototype, "hasPreviews", {
        get: function () {
            return this.resultPreviewsManager.hasPreviews;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(SuggestionsManager.prototype, "focusedSuggestion", {
        get: function () {
            var _this = this;
            return underscore_1.find(this.currentSuggestions, function (suggestion) {
                return Dom_1.$$(suggestion.dom).hasClass(_this.options.selectedClass) || Dom_1.$$(suggestion.dom).findClass(_this.options.selectedClass).length > 0;
            });
        },
        enumerable: true,
        configurable: true
    });
    SuggestionsManager.prototype.handleMouseOver = function (e) {
        var target = Dom_1.$$(e.target);
        var parents = target.parents(this.options.suggestionClass);
        if (target.hasClass(this.options.suggestionClass)) {
            this.processMouseSelection(target.el);
        }
        else Eif (parents.length > 0 && this.element.contains(parents[0])) {
            this.processMouseSelection(parents[0]);
        }
    };
    SuggestionsManager.prototype.handleMouseOut = function (e) {
        var target = Dom_1.$$(e.target);
        var targetParents = target.parents(this.options.suggestionClass);
        //e.relatedTarget is not available if moving off the browser window or is an empty object `{}` when moving out of namespace in LockerService.
        if (e.relatedTarget && Dom_1.$$(e.relatedTarget).isValid()) {
            var relatedTargetParents = Dom_1.$$(e.relatedTarget).parents(this.options.suggestionClass);
            if (target.hasClass(this.options.selectedClass) && !Dom_1.$$(e.relatedTarget).hasClass(this.options.suggestionClass)) {
                this.removeSelectedStatus(target.el);
            }
            else if (relatedTargetParents.length == 0 && targetParents.length > 0) {
                this.removeSelectedStatus(targetParents[0]);
            }
        }
        else {
            if (target.hasClass(this.options.selectedClass)) {
                this.removeSelectedStatus(target.el);
            }
            else Eif (targetParents.length > 0) {
                this.removeSelectedStatus(targetParents[0]);
            }
        }
        Dom_1.$$(this.root).trigger(OmniboxEvents_1.OmniboxEvents.querySuggestLoseFocus);
    };
    SuggestionsManager.prototype.moveDown = function () {
        return __awaiter(this, void 0, void 0, function () {
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0: return [4 /*yield*/, this.move(Direction.Down)];
                    case 1:
                        _a.sent();
                        return [2 /*return*/];
                }
            });
        });
    };
    SuggestionsManager.prototype.moveUp = function () {
        return __awaiter(this, void 0, void 0, function () {
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0: return [4 /*yield*/, this.move(Direction.Up)];
                    case 1:
                        _a.sent();
                        return [2 /*return*/];
                }
            });
        });
    };
    SuggestionsManager.prototype.moveLeft = function () {
        return __awaiter(this, void 0, void 0, function () {
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0: return [4 /*yield*/, this.move(Direction.Left)];
                    case 1:
                        _a.sent();
                        return [2 /*return*/];
                }
            });
        });
    };
    SuggestionsManager.prototype.moveRight = function () {
        return __awaiter(this, void 0, void 0, function () {
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0: return [4 /*yield*/, this.move(Direction.Right)];
                    case 1:
                        _a.sent();
                        return [2 /*return*/];
                }
            });
        });
    };
    SuggestionsManager.prototype.selectAndReturnKeyboardFocusedElement = function () {
        var selected = this.keyboardFocusedElement;
        if (selected) {
            Dom_1.$$(selected).trigger('keyboardSelect');
            // By definition, once an element has been "selected" with the keyboard,
            // it is not longer "active" since the event has been processed.
            this.keyboardFocusedElement = null;
            this.inputManager.blur();
        }
        return selected;
    };
    SuggestionsManager.prototype.clearKeyboardFocusedElement = function () {
        this.keyboardFocusedElement = null;
    };
    SuggestionsManager.prototype.receiveSuggestions = function (suggestions) {
        return __awaiter(this, void 0, void 0, function () {
            var _a, results, status;
            return __generator(this, function (_b) {
                switch (_b.label) {
                    case 0: return [4 /*yield*/, this.suggestionsProcessor.processQueries(suggestions)];
                    case 1:
                        _a = _b.sent(), results = _a.results, status = _a.status;
                        Iif (status === QueryProcessor_1.ProcessingStatus.Overriden) {
                            return [2 /*return*/, []];
                        }
                        this.updateSuggestions(results);
                        return [2 /*return*/, results];
                }
            });
        });
    };
    SuggestionsManager.prototype.clearSuggestions = function () {
        this.updateSuggestions([]);
    };
    SuggestionsManager.prototype.updateSuggestions = function (suggestions) {
        var _this = this;
        this.suggestionsListbox.empty();
        this.inputManager.activeDescendant = null;
        this.currentSuggestions = suggestions;
        Dom_1.$$(this.element).toggleClass('magic-box-hasSuggestion', this.hasSuggestions);
        this.inputManager.expanded = this.hasSuggestions;
        this.resultPreviewsManager.displaySearchResultPreviewsForSuggestion(null);
        if (!this.hasSuggestions) {
            this.appendEmptySuggestionOption();
            Dom_1.$$(this.root).trigger(OmniboxEvents_1.OmniboxEvents.querySuggestLoseFocus);
            return;
        }
        suggestions
            .sort(function (a, b) { return (b.index || 0) - (a.index || 0); })
            .forEach(function (suggestion) {
            var dom = suggestion.dom ? _this.modifyDomFromExistingSuggestion(suggestion.dom) : _this.createDomFromSuggestion(suggestion);
            dom.setAttribute('id', "magic-box-suggestion-" + underscore_1.indexOf(suggestions, suggestion));
            dom.setAttribute('role', 'option');
            dom.setAttribute('aria-selected', 'false');
            dom.setAttribute('aria-label', dom.text());
            dom['suggestion'] = suggestion;
            _this.suggestionsListbox.append(dom.el);
        });
        var numberOfSuggestions = this.suggestionsListbox.findAll("." + this.options.suggestionClass).length;
        Dom_1.$$(this.root).trigger(OmniboxEvents_1.OmniboxEvents.querySuggestRendered, { numberOfSuggestions: numberOfSuggestions });
    };
    Object.defineProperty(SuggestionsManager.prototype, "selectedSuggestion", {
        get: function () {
            if (this.htmlElementIsSuggestion(this.keyboardFocusedElement)) {
                return this.returnMoved(this.keyboardFocusedElement);
            }
            return null;
        },
        enumerable: true,
        configurable: true
    });
    SuggestionsManager.prototype.processKeyboardSelection = function (suggestion) {
        return __awaiter(this, void 0, void 0, function () {
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        this.addSelectedStatus(suggestion);
                        this.keyboardFocusedElement = suggestion;
                        return [4 /*yield*/, this.updateSelectedSuggestion(this.focusedSuggestion)];
                    case 1:
                        _a.sent();
                        return [2 /*return*/];
                }
            });
        });
    };
    SuggestionsManager.prototype.processKeyboardPreviewSelection = function (preview) {
        this.addSelectedStatus(preview);
        this.keyboardFocusedElement = preview;
    };
    SuggestionsManager.prototype.processMouseSelection = function (suggestion) {
        this.addSelectedStatus(suggestion);
        this.updateSelectedSuggestion(this.focusedSuggestion);
        this.keyboardFocusedElement = null;
    };
    SuggestionsManager.prototype.buildSuggestionsContainer = function () {
        return Dom_1.$$('div', {
            className: this.suggestionListboxClassName,
            id: this.suggestionListboxID,
            role: 'listbox',
            ariaLabel: 'Search Suggestions'
        });
    };
    SuggestionsManager.prototype.createDomFromSuggestion = function (suggestion) {
        var _this = this;
        var dom = Dom_1.$$('div', {
            className: "magic-box-suggestion " + this.options.suggestionClass
        });
        suggestion.dom = dom.el;
        dom.on('click', function () {
            _this.selectSuggestion(suggestion);
        });
        dom.on('keyboardSelect', function () {
            _this.selectSuggestion(suggestion);
        });
        Iif (suggestion.html) {
            dom.el.innerHTML = suggestion.html;
            return dom;
        }
        if (suggestion.text) {
            dom.text(suggestion.text);
            return dom;
        }
        Iif (suggestion.separator) {
            dom.addClass('magic-box-suggestion-seperator');
            var suggestionLabel = Dom_1.$$('div', {
                className: 'magic-box-suggestion-seperator-label'
            }, suggestion.separator);
            dom.append(suggestionLabel.el);
            return dom;
        }
        return dom;
    };
    SuggestionsManager.prototype.selectSuggestion = function (suggestion) {
        suggestion.onSelect();
        Dom_1.$$(this.root).trigger(OmniboxEvents_1.OmniboxEvents.querySuggestSelection, { suggestion: suggestion.text });
    };
    SuggestionsManager.prototype.appendEmptySuggestionOption = function () {
        // Accessibility tools reports that a listbox element must always have at least one child with an option
        // Even if there is no suggestions to show.
        this.suggestionsListbox.append(Dom_1.$$('div', { role: 'option' }).el);
    };
    SuggestionsManager.prototype.modifyDomFromExistingSuggestion = function (dom) {
        // this need to be done if the selection is in cache and the dom is set in the suggestion
        this.removeSelectedStatus(dom);
        var found = dom.classList.contains(this.options.suggestionClass) ? dom : Dom_1.$$(dom).find('.' + this.options.suggestionClass);
        this.removeSelectedStatus(found);
        return Dom_1.$$(dom);
    };
    SuggestionsManager.prototype.move = function (direction) {
        return __awaiter(this, void 0, void 0, function () {
            var firstPreview;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        if (!this.resultPreviewsManager.focusedPreviewElement) return [3 /*break*/, 2];
                        return [4 /*yield*/, this.moveWithinPreview(direction)];
                    case 1:
                        _a.sent();
                        return [2 /*return*/];
                    case 2:
                        if (direction === Direction.Right || direction === Direction.Left) {
                            firstPreview = this.resultPreviewsManager.previewElements[0];
                            if (firstPreview) {
                                this.processKeyboardPreviewSelection(firstPreview);
                                return [2 /*return*/];
                            }
                        }
                        return [4 /*yield*/, this.moveWithinSuggestion(direction)];
                    case 3:
                        _a.sent();
                        return [2 /*return*/];
                }
            });
        });
    };
    SuggestionsManager.prototype.moveWithinSuggestion = function (direction) {
        return __awaiter(this, void 0, void 0, function () {
            var currentlySelected, selectables, currentIndex, index;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        currentlySelected = Dom_1.$$(this.element).find("." + this.options.selectedClass);
                        selectables = Dom_1.$$(this.element).findAll("." + this.options.suggestionClass);
                        currentIndex = underscore_1.indexOf(selectables, currentlySelected);
                        index = direction === Direction.Up ? currentIndex - 1 : currentIndex + 1;
                        index = (index + selectables.length) % selectables.length;
                        return [4 /*yield*/, this.selectQuerySuggest(selectables[index])];
                    case 1:
                        _a.sent();
                        return [2 /*return*/];
                }
            });
        });
    };
    SuggestionsManager.prototype.selectQuerySuggest = function (suggestion) {
        return __awaiter(this, void 0, void 0, function () {
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        Iif (!suggestion) return [3 /*break*/, 2];
                        return [4 /*yield*/, this.processKeyboardSelection(suggestion)];
                    case 1:
                        _a.sent();
                        return [3 /*break*/, 3];
                    case 2:
                        this.keyboardFocusedElement = null;
                        this.inputManager.input.removeAttribute('aria-activedescendant');
                        _a.label = 3;
                    case 3: return [2 /*return*/, suggestion];
                }
            });
        });
    };
    SuggestionsManager.prototype.moveWithinPreview = function (direction) {
        return __awaiter(this, void 0, void 0, function () {
            var newFocusedPreview;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        newFocusedPreview = this.resultPreviewsManager.getElementInDirection(direction);
                        if (!!newFocusedPreview) return [3 /*break*/, 2];
                        return [4 /*yield*/, this.selectQuerySuggest(this.resultPreviewsManager.previewsOwner.dom)];
                    case 1:
                        _a.sent();
                        return [2 /*return*/];
                    case 2:
                        this.processKeyboardPreviewSelection(newFocusedPreview);
                        return [2 /*return*/];
                }
            });
        });
    };
    SuggestionsManager.prototype.returnMoved = function (selected) {
        Eif (selected) {
            Iif (selected['suggestion']) {
                return selected['suggestion'];
            }
            Iif (selected['no-text-suggestion']) {
                return null;
            }
            Eif (selected instanceof HTMLElement) {
                return {
                    text: Dom_1.$$(selected).text()
                };
            }
        }
        return null;
    };
    SuggestionsManager.prototype.addSelectedStatus = function (element) {
        var selected = this.element.getElementsByClassName(this.options.selectedClass);
        for (var i = 0; i < selected.length; i++) {
            var elem = selected.item(i);
            this.removeSelectedStatus(elem);
        }
        Dom_1.$$(element).addClass(this.options.selectedClass);
        this.updateAreaSelectedIfDefined(element, 'true');
    };
    SuggestionsManager.prototype.updateSelectedSuggestion = function (suggestion) {
        return __awaiter(this, void 0, void 0, function () {
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        Dom_1.$$(this.root).trigger(OmniboxEvents_1.OmniboxEvents.querySuggestGetFocus, {
                            suggestion: suggestion.text
                        });
                        return [4 /*yield*/, this.resultPreviewsManager.displaySearchResultPreviewsForSuggestion(suggestion)];
                    case 1:
                        _a.sent();
                        return [2 /*return*/];
                }
            });
        });
    };
    SuggestionsManager.prototype.removeSelectedStatus = function (suggestion) {
        Dom_1.$$(suggestion).removeClass(this.options.selectedClass);
        this.updateAreaSelectedIfDefined(suggestion, 'false');
    };
    SuggestionsManager.prototype.updateAreaSelectedIfDefined = function (element, value) {
        if (Dom_1.$$(element).getAttribute('aria-selected')) {
            this.inputManager.activeDescendant = element;
            Dom_1.$$(element).setAttribute('aria-selected', value);
        }
    };
    SuggestionsManager.prototype.addAccessibilityProperties = function () {
        this.addAccessibilityPropertiesForMagicBox();
        this.addAccessibilityPropertiesForInput();
    };
    SuggestionsManager.prototype.addAccessibilityPropertiesForMagicBox = function () {
        var magicBox = Dom_1.$$(this.magicBoxContainer);
        magicBox.setAttribute('role', 'search');
        magicBox.setAttribute('aria-haspopup', 'listbox');
    };
    SuggestionsManager.prototype.addAccessibilityPropertiesForInput = function () {
        var input = Dom_1.$$(this.inputManager.input);
        this.inputManager.activeDescendant = null;
        this.inputManager.expanded = false;
        input.setAttribute('aria-owns', this.suggestionListboxID);
        input.setAttribute('aria-controls', this.suggestionListboxID);
    };
    SuggestionsManager.prototype.htmlElementIsSuggestion = function (selected) {
        var omniboxSelectables = Dom_1.$$(this.element).findAll("." + this.options.suggestionClass);
        return underscore_1.indexOf(omniboxSelectables, selected) > -1;
    };
    return SuggestionsManager;
}());
exports.SuggestionsManager = SuggestionsManager;
 
 
/***/ }),
/* 266 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
var Component_1 = __webpack_require__(6);
var ComponentOptions_1 = __webpack_require__(13);
var SettingsEvents_1 = __webpack_require__(66);
var PreferencesPanelEvents_1 = __webpack_require__(112);
var Initialization_1 = __webpack_require__(8);
var Strings_1 = __webpack_require__(4);
var Dom_1 = __webpack_require__(0);
var GlobalExports_1 = __webpack_require__(10);
var ExternalModulesShim_1 = __webpack_require__(39);
var _ = __webpack_require__(1);
var AccessibleModal_1 = __webpack_require__(144);
__webpack_require__(1494);
var InitializationEvents_1 = __webpack_require__(22);
var SVGIcons_1 = __webpack_require__(16);
/**
 * The PreferencesPanel component renders a **Preferences** item inside the {@link Settings} component which the end
 * user can click to access a panel from which it is possible to specify certain customization options for the search
 * interface. These customization options are then saved in the browser local storage.
 *
 * This component should be used inside the {@link Settings} component.
 *
 * See also the {@link ResultsFiltersPreferences} and {@link ResultsPreferences} components.
 */
var PreferencesPanel = /** @class */ (function (_super) {
    __extends(PreferencesPanel, _super);
    /**
     * Creates a new PreferencesPanel.
     * @param element The HTMLElement on which to instantiate the component.
     * @param options The options for the PreferencesPanel component.
     * @param bindings The bindings that the component requires to function normally. If not set, these will be
     * automatically resolved (with a slower execution time).
     */
    function PreferencesPanel(element, options, bindings, ModalBox) {
        if (ModalBox === void 0) { ModalBox = ExternalModulesShim_1.ModalBox; }
        var _this = _super.call(this, element, PreferencesPanel.ID, bindings) || this;
        _this.element = element;
        _this.options = options;
        _this.ModalBox = ModalBox;
        _this.content = [];
        _this.options = ComponentOptions_1.ComponentOptions.initComponentOptions(element, PreferencesPanel, options);
        _this.bind.onRootElement(SettingsEvents_1.SettingsEvents.settingsPopulateMenu, function (args) {
            args.menuData.push({
                className: 'coveo-preferences-panel',
                text: Strings_1.l('Preferences'),
                onOpen: function () { return _this.open(); },
                onClose: function () { return _this.close(); },
                svgIcon: SVGIcons_1.SVGIcons.icons.dropdownPreferences,
                svgIconClassName: 'coveo-preferences-panel-svg'
            });
        });
        _this.bind.onRootElement(InitializationEvents_1.InitializationEvents.afterComponentsInitialization, function () {
            _this.content = Dom_1.$$(_this.element).children();
        });
        _this.modalbox = new AccessibleModal_1.AccessibleModal('coveo-preferences-panel', _this.searchInterface.options.modalContainer, _this.ModalBox, {
            overlayClose: true
        });
        return _this;
    }
    /**
     * Opens the PreferencesPanel.
     */
    PreferencesPanel.prototype.open = function () {
        var _this = this;
        var root = Dom_1.$$('div');
        _.each(this.content, function (oneChild) {
            root.append(oneChild);
        });
        this.modalbox.open({
            title: Strings_1.l('Preferences'),
            content: root.el,
            origin: this.element,
            validation: function () {
                _this.cleanupOnExit();
                return true;
            }
        });
    };
    /**
     * Closes the PreferencesPanel without saving changes.
     *
     * Also triggers the `exitPreferencesWithoutSave` event.
     */
    PreferencesPanel.prototype.close = function () {
        this.cleanupOnExit();
        this.modalbox.close();
    };
    /**
     * Saves the changes and executes a new query.
     *
     * Also triggers the `savePreferences` event.
     */
    PreferencesPanel.prototype.save = function () {
        Dom_1.$$(this.element).trigger(PreferencesPanelEvents_1.PreferencesPanelEvents.savePreferences);
        this.queryController.executeQuery();
    };
    PreferencesPanel.prototype.cleanupOnExit = function () {
        Dom_1.$$(this.element).trigger(PreferencesPanelEvents_1.PreferencesPanelEvents.exitPreferencesWithoutSave);
    };
    PreferencesPanel.ID = 'PreferencesPanel';
    PreferencesPanel.doExport = function () {
        GlobalExports_1.exportGlobally({
            PreferencesPanel: PreferencesPanel
        });
    };
    PreferencesPanel.options = {};
    return PreferencesPanel;
}(Component_1.Component));
exports.PreferencesPanel = PreferencesPanel;
Initialization_1.Initialization.registerAutoCreateComponent(PreferencesPanel);
 
 
/***/ }),
/* 267 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
/**
 * The `QuickviewEvents` static class contains the string definitions of all events that strongly relate to the
 * [`Quickview`]{@link Quickview} component.
 */
var QuickviewEvents = /** @class */ (function () {
    function QuickviewEvents() {
    }
    /**
     * Triggered by the [`QuickviewDocument`]{@link QuickviewDocument} component when the content to display in the
     * quickview modal window has just finished downloading.
     *
     * The [`Quickview`]{@link Quickview} component listens to this event to know when to remove its loading animation.
     *
     * All `quickviewLoaded` event handlers receive a [`QuickviewLoadedEventArgs`]{@link IQuickviewLoadedEventArgs} object
     * as an argument.
     *
     * @type {string} The string value is `quickviewLoaded`.
     */
    QuickviewEvents.quickviewLoaded = 'quickviewLoaded';
    /**
     * Triggered by the [`QuickviewDocument`]{@link QuickviewDocument} component when the end user has just clicked the
     * **Quickview** button/link to open the quickview modal window.
     *
     * This event allows external code to modify the terms to highlight before the content of the quickview modal window
     * is rendered.
     *
     * All `openQuickview` event handlers receive an
     * [`OpenQuickviewEventArgs`]{@link ResultListEvents.IOpenQuickviewEventArgs} object as an argument.
     *
     * @type {string} The string value is `openQuickview`.
     */
    QuickviewEvents.openQuickview = 'openQuickview';
    return QuickviewEvents;
}());
exports.QuickviewEvents = QuickviewEvents;
 
 
/***/ }),
/* 268 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __assign = (this && this.__assign) || Object.assign || function(t) {
    for (var s, i = 1, n = arguments.length; i < n; i++) {
        s = arguments[i];
        for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
            t[p] = s[p];
    }
    return t;
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        Iif (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            Iif (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
            Iif (y = 0, t) op = [0, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    Iif (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    Iif (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
Object.defineProperty(exports, "__esModule", { value: true });
var QuickviewEvents_1 = __webpack_require__(267);
var Assert_1 = __webpack_require__(12);
var Dom_1 = __webpack_require__(0);
var Utils_1 = __webpack_require__(5);
var Component_1 = __webpack_require__(6);
var ComponentOptions_1 = __webpack_require__(13);
var Initialization_1 = __webpack_require__(8);
var QuickviewDocumentIframe_1 = __webpack_require__(812);
var QuickviewDocumentHeader_1 = __webpack_require__(813);
var QuickviewDocumentWords_1 = __webpack_require__(814);
var underscore_1 = __webpack_require__(1);
var QuickviewDocumentWordButton_1 = __webpack_require__(816);
var QuickviewDocumentPreviewBar_1 = __webpack_require__(817);
exports.HIGHLIGHT_PREFIX = 'CoveoHighlight';
/**
 * The `QuickviewDocument` component normally exists within a [`Quickview`]{@link Quickview} component. The sole purpose
 * of this component is to add an `<iframe>` which loads the correct HTML version of the current item.
 *
 * The default [`contentTemplate`]{@link Quickview.options.contentTemplate} of the
 * `Quickview` component includes the `QuickviewDocument` component.
 *
 * This component is a result template component (see [Result Templates](https://docs.coveo.com/en/413/)).
 */
var QuickviewDocument = /** @class */ (function (_super) {
    __extends(QuickviewDocument, _super);
    /**
     * Creates a new `QuickviewDocument` component.
     * @param element The HTMLElement on which to instantiate the component.
     * @param options The options for the `QuickviewDocument` component.
     * @param bindings The bindings that the component requires to function normally. If not set, these will be
     * automatically resolved (with a slower execution time).
     * @param result The current result.
     */
    function QuickviewDocument(element, options, bindings, result) {
        var _this = _super.call(this, element, QuickviewDocument.ID, bindings) || this;
        _this.element = element;
        _this.options = options;
        _this.result = result;
        _this.options = ComponentOptions_1.ComponentOptions.initComponentOptions(element, QuickviewDocument, options);
        _this.result = result || _this.resolveResult();
        Assert_1.Assert.exists(_this.result);
        return _this;
    }
    QuickviewDocument.prototype.createDom = function () {
        var container = Dom_1.$$('div', {
            className: 'coveo-quickview-document'
        });
        this.element.appendChild(container.el);
        this.header = new QuickviewDocumentHeader_1.QuickviewDocumentHeader();
        this.iframe = new QuickviewDocumentIframe_1.QuickviewDocumentIframe();
        container.append(this.header.el);
        container.append(this.iframe.el);
    };
    QuickviewDocument.prototype.open = function () {
        return __awaiter(this, void 0, void 0, function () {
            var _this = this;
            var beforeLoad, termsToHighlight, termsWereModified, documentHTML, documentWords, previewBar_1, afterLoad, error_1, afterLoad;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        this.ensureDom();
                        beforeLoad = new Date().getTime();
                        termsToHighlight = this.initialTermsToHighlight;
                        this.triggerOpenQuickViewEvent({ termsToHighlight: termsToHighlight });
                        termsWereModified = this.wereTermsToHighlightModified(termsToHighlight);
                        if (termsWereModified) {
                            this.handleTermsToHighlight(termsToHighlight, this.query);
                        }
                        _a.label = 1;
                    case 1:
                        _a.trys.push([1, 4, , 6]);
                        return [4 /*yield*/, this.queryController.getEndpoint().getDocumentHtml(this.result.uniqueId, {
                                queryObject: this.query,
                                requestedOutputSize: this.options.maximumDocumentSize
                            })];
                    case 2:
                        documentHTML = _a.sent();
                        return [4 /*yield*/, this.iframe.render(documentHTML, this.result.title)];
                    case 3:
                        _a.sent();
                        documentWords = new QuickviewDocumentWords_1.QuickviewDocumentWords(this.iframe, this.result);
                        previewBar_1 = new QuickviewDocumentPreviewBar_1.QuickviewDocumentPreviewBar(this.iframe, documentWords);
                        underscore_1.each(documentWords.words, function (word) {
                            var button = new QuickviewDocumentWordButton_1.QuickviewDocumentWordButton(word, previewBar_1, _this.iframe);
                            _this.header.addWord(button);
                        });
                        afterLoad = new Date().getTime();
                        this.triggerQuickviewLoaded(afterLoad - beforeLoad);
                        return [3 /*break*/, 6];
                    case 4:
                        error_1 = _a.sent();
                        return [4 /*yield*/, this.iframe.renderError(error_1)];
                    case 5:
                        _a.sent();
                        afterLoad = new Date().getTime();
                        this.triggerQuickviewLoaded(afterLoad - beforeLoad);
                        return [3 /*break*/, 6];
                    case 6: return [2 /*return*/];
                }
            });
        });
    };
    Object.defineProperty(QuickviewDocument.prototype, "initialTermsToHighlight", {
        get: function () {
            return underscore_1.keys(this.result.termsToHighlight);
        },
        enumerable: true,
        configurable: true
    });
    QuickviewDocument.prototype.triggerOpenQuickViewEvent = function (args) {
        Dom_1.$$(this.root).trigger(QuickviewEvents_1.QuickviewEvents.openQuickview, args);
    };
    Object.defineProperty(QuickviewDocument.prototype, "query", {
        get: function () {
            return __assign({}, this.queryController.getLastQuery());
        },
        enumerable: true,
        configurable: true
    });
    QuickviewDocument.prototype.triggerQuickviewLoaded = function (duration) {
        Dom_1.$$(this.element).trigger(QuickviewEvents_1.QuickviewEvents.quickviewLoaded, {
            duration: duration
        });
    };
    QuickviewDocument.prototype.handleTermsToHighlight = function (termsToHighlight, queryObject) {
        var _this = this;
        for (var term in this.result.termsToHighlight) {
            delete this.result.termsToHighlight[term];
        }
        var query = '';
        underscore_1.each(termsToHighlight, function (term) {
            query += term + ' ';
            _this.result.termsToHighlight[term] = [term];
        });
        query = query.substring(0, query.length - 1);
        queryObject.q = query;
    };
    QuickviewDocument.prototype.wereTermsToHighlightModified = function (termsToHighlight) {
        return !Utils_1.Utils.arrayEqual(termsToHighlight, this.initialTermsToHighlight);
    };
    QuickviewDocument.ID = 'QuickviewDocument';
    /**
     * The options for the component
     * @componentOptions
     */
    QuickviewDocument.options = {
        /**
         * Specifies the maximum preview size that the index should return.
         *
         * Default value is `0`, and the index returns the entire preview. Minimum value is `0`.
         */
        maximumDocumentSize: ComponentOptions_1.ComponentOptions.buildNumberOption({ defaultValue: 0, min: 0 })
    };
    return QuickviewDocument;
}(Component_1.Component));
exports.QuickviewDocument = QuickviewDocument;
Initialization_1.Initialization.registerAutoCreateComponent(QuickviewDocument);
 
 
/***/ }),
/* 269 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var ColorUtils_1 = __webpack_require__(226);
var QuickviewDocumentWordColor = /** @class */ (function () {
    function QuickviewDocumentWordColor(htmlColor) {
        this.htmlColor = htmlColor;
        var rgbExtracted = htmlColor.match(/\d+/g);
        if (rgbExtracted) {
            this.r = parseInt(rgbExtracted[0], 10);
            this.g = parseInt(rgbExtracted[1], 10);
            this.b = parseInt(rgbExtracted[2], 10);
        }
    }
    QuickviewDocumentWordColor.prototype.invert = function () {
        return "rgb(" + (255 - this.r) + ", " + (255 - this.g) + ", " + (255 - this.b) + ")";
    };
    QuickviewDocumentWordColor.prototype.saturate = function () {
        var hsv = ColorUtils_1.ColorUtils.rgbToHsv(this.r, this.g, this.b);
        hsv[1] *= 2;
        if (hsv[1] > 1) {
            hsv[1] = 1;
        }
        var rgb = ColorUtils_1.ColorUtils.hsvToRgb(hsv[0], hsv[1], hsv[2]);
        return "rgb(" + rgb[0] + ", " + rgb[1] + ", " + rgb[2] + ")";
    };
    return QuickviewDocumentWordColor;
}());
exports.QuickviewDocumentWordColor = QuickviewDocumentWordColor;
 
 
/***/ }),
/* 270 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Dom_1 = __webpack_require__(0);
var _ = __webpack_require__(1);
__webpack_require__(1514);
var GlobalExports_1 = __webpack_require__(10);
/**
 * A simple `fieldset` HTMLElement containing multiple form widgets.
 */
var FormGroup = /** @class */ (function () {
    /**
     * Creates a new `FormGroup`.
     * @param contents The form widgets to include in the form group.
     * @param label The label to display for the form group.
     */
    function FormGroup(contents, label) {
        var _this = this;
        this.labelElement = Dom_1.$$('span', { className: 'coveo-form-group-label' });
        this.labelElement.text(label);
        this.element = Dom_1.$$('fieldset', { className: 'coveo-form-group' }, this.labelElement);
        _.each(contents, function (content) {
            _this.element.append(content.build());
        });
    }
    FormGroup.doExport = function () {
        GlobalExports_1.exportGlobally({
            FormGroup: FormGroup
        });
    };
    /**
     * Gets the element on which the form group is bound.
     * @returns {HTMLElement} The form group element.
     */
    FormGroup.prototype.build = function () {
        return this.element.el;
    };
    return FormGroup;
}());
exports.FormGroup = FormGroup;
 
 
/***/ }),
/* 271 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
__webpack_require__(1523);
var GlobalExports_1 = __webpack_require__(10);
var QueryEvents_1 = __webpack_require__(14);
var Assert_1 = __webpack_require__(12);
var Model_1 = __webpack_require__(26);
var QueryStateModel_1 = __webpack_require__(17);
var Dom_1 = __webpack_require__(0);
var SVGDom_1 = __webpack_require__(23);
var SVGIcons_1 = __webpack_require__(16);
var Utils_1 = __webpack_require__(5);
var SharedAnalyticsCalls_1 = __webpack_require__(172);
var Component_1 = __webpack_require__(6);
var ComponentOptions_1 = __webpack_require__(13);
var Initialization_1 = __webpack_require__(8);
var SortCriteria_1 = __webpack_require__(195);
var AccessibleButton_1 = __webpack_require__(20);
var Strings_1 = __webpack_require__(4);
var underscore_1 = __webpack_require__(1);
/**
 * The `Sort` component renders a widget that the end user can interact with to select the criterion to use when sorting query results.
 *
 * To improve accessibility, it's recommended to group `Sort` components in a container with `role="radiogroup"`.
 */
var Sort = /** @class */ (function (_super) {
    __extends(Sort, _super);
    /**
     * Creates a new `Sort` component instance.
     * @param element The HTMLElement on which to instantiate the component.
     * @param options The options for this component instance.
     * @param bindings The bindings that the component requires to function normally. If not set, these will be
     * automatically resolved (with a slower execution time).
     */
    function Sort(element, options, bindings) {
        var _this = _super.call(this, element, Sort.ID, bindings) || this;
        _this.element = element;
        _this.options = options;
        _this.options = ComponentOptions_1.ComponentOptions.initComponentOptions(element, Sort, options);
        Assert_1.Assert.isLargerOrEqualsThan(1, _this.options.sortCriteria.length);
        _this.bind.onQueryState(Model_1.MODEL_EVENTS.CHANGE_ONE, QueryStateModel_1.QUERY_STATE_ATTRIBUTES.SORT, function () { return _this.handleQueryStateChanged(); });
        _this.bind.onRootElement(QueryEvents_1.QueryEvents.querySuccess, function (args) { return _this.handleQuerySuccess(args); });
        _this.bind.onRootElement(QueryEvents_1.QueryEvents.buildingQuery, function (args) { return _this.handleBuildingQuery(args); });
        _this.bind.onRootElement(QueryEvents_1.QueryEvents.queryError, function (args) { return _this.handleQueryError(args); });
        _this.ensureDom();
        return _this;
    }
    Sort.prototype.createDom = function () {
        var _this = this;
        var el = Dom_1.$$(this.element);
        el.on('click', function () { return _this.selectAndExecuteQuery(); });
        var innerText = el.text();
        el.empty();
        this.findOrCreateRadioGroup();
        this.createSortButton(innerText);
        if (this.isToggle()) {
            this.createDirectionButton();
        }
        this.update();
    };
    /**
     * Selects this `Sort` component.
     *
     * Updates the state model if selecting this component toggles its current [`sortCriteria`]{@link Sort.options.sortCriteria}.
     *
     * @param direction The sort direction. Can be one of: `ascending`, `descending`.
     */
    Sort.prototype.select = function (direction) {
        if (direction) {
            this.currentCriteria = underscore_1.find(this.options.sortCriteria, function (criteria) {
                return criteria.direction == direction;
            });
            this.updateQueryStateModel();
        }
        else if (Utils_1.Utils.exists(this.currentCriteria)) {
            this.selectNextCriteria();
        }
        else {
            this.selectFirstCriteria();
        }
    };
    /**
     * Selects this `Sort` component, then triggers a query if selecting this component toggles its current [`sortCriteria`]{@link Sort.options.sortCriteria}.
     *
     * Also logs an event in the usage analytics with the new current sort criteria.
     */
    Sort.prototype.selectAndExecuteQuery = function () {
        var oldCriteria = this.currentCriteria;
        this.select();
        if (oldCriteria != this.currentCriteria) {
            this.executeSearchQuery();
        }
    };
    Sort.prototype.enable = function () {
        Dom_1.$$(this.element).removeClass('coveo-tab-disabled');
        this.update();
        _super.prototype.enable.call(this);
    };
    Sort.prototype.disable = function () {
        Dom_1.$$(this.element).addClass('coveo-tab-disabled');
        _super.prototype.disable.call(this);
    };
    /**
     * Gets the current [`sortCriteria`]{@link Sort.options.sortCriteria} of this `Sort` component.
     * @returns {SortCriteria}
     */
    Sort.prototype.getCurrentCriteria = function () {
        return this.currentCriteria;
    };
    /**
     * Indicates whether the name of any of the available [`sortCriteria`]{@link Sort.options.sortCriteria} of this `Sort` component matches the argument.
     * @param sortId The sort criteria name to look for (e.g., `date descending`).
     */
    Sort.prototype.match = function (sortId) {
        return underscore_1.any(this.options.sortCriteria, function (sortCriteria) { return sortId == sortCriteria.toString(); });
    };
    Sort.prototype.findOrCreateRadioGroup = function () {
        this.radioGroup = this.findRadioGroup();
        if (!this.radioGroup) {
            this.element.setAttribute('role', 'radiogroup');
            this.radioGroup = this.element;
        }
    };
    Sort.prototype.createSortButton = function (innerText) {
        var _this = this;
        this.sortButton = Dom_1.$$('span').el;
        this.sortButton.innerText = this.options.caption || innerText;
        new AccessibleButton_1.AccessibleButton()
            .withElement(this.sortButton)
            .withEnterKeyboardAction(function () { return _this.selectAndExecuteQuery(); })
            .withArrowsAction(function (direction, e) { return _this.onArrowPressed(direction, e); })
            .withLabel(this.isToggle() ? this.getDirectionalLabel(this.initialDirection) : this.getOmnidirectionalLabel())
            .withRole('radio')
            .build();
        this.element.appendChild(this.sortButton);
    };
    Sort.prototype.createDirectionButton = function () {
        var _this = this;
        this.directionButton = Dom_1.$$.apply(void 0, ['span', { className: 'coveo-icon' }].concat(this.createIcons())).el;
        new AccessibleButton_1.AccessibleButton()
            .withElement(this.directionButton)
            .withSelectAction(function (e) {
            e.stopPropagation();
            _this.selectNextCriteriaAndExecuteQuery();
        })
            .withArrowsAction(function (direction, e) { return _this.onArrowPressed(direction, e); })
            .withLabel(this.getDirectionalLabel(this.initialDirection === SortCriteria_1.VALID_DIRECTION.DESCENDING ? SortCriteria_1.VALID_DIRECTION.ASCENDING : SortCriteria_1.VALID_DIRECTION.DESCENDING))
            .withRole('radio')
            .build();
        this.element.appendChild(this.directionButton);
    };
    Sort.prototype.onArrowPressed = function (direction, e) {
        this.selectNextRadioButton(direction === AccessibleButton_1.ArrowDirection.RIGHT || direction === AccessibleButton_1.ArrowDirection.DOWN ? 1 : -1);
        e.stopPropagation();
    };
    Sort.prototype.createIcons = function () {
        var iconAscending = Dom_1.$$('span', { className: 'coveo-sort-icon-ascending' }, SVGIcons_1.SVGIcons.icons.arrowUp);
        SVGDom_1.SVGDom.addClassToSVGInContainer(iconAscending.el, 'coveo-sort-icon-ascending-svg');
        var iconDescending = Dom_1.$$('span', { className: 'coveo-sort-icon-descending' }, SVGIcons_1.SVGIcons.icons.arrowDown);
        SVGDom_1.SVGDom.addClassToSVGInContainer(iconDescending.el, 'coveo-sort-icon-descending-svg');
        return [iconAscending, iconDescending];
    };
    Sort.prototype.findRadioGroup = function (element) {
        if (element === void 0) { element = this.element; }
        if (!element || element === document.body) {
            return null;
        }
        if (element.getAttribute('role') === 'radiogroup') {
            return element;
        }
        return this.findRadioGroup(element.parentElement);
    };
    Sort.prototype.selectNextRadioButton = function (direction) {
        Iif (direction === void 0) { direction = 1; }
        var radioButtons = Dom_1.$$(this.radioGroup).findAll('[role="radio"]');
        var currentIndex = underscore_1.findIndex(radioButtons, function (radio) { return radio.getAttribute('aria-checked') === 'true'; });
        var indexToSelect;
        var isAnythingSelected = currentIndex !== -1;
        if (isAnythingSelected) {
            indexToSelect = (currentIndex + direction + radioButtons.length) % radioButtons.length;
        }
        else {
            if (direction >= 0) {
                indexToSelect = 0;
            }
            else {
                indexToSelect = radioButtons.length - 1;
            }
        }
        var radioToSelect = radioButtons[indexToSelect];
        radioToSelect.focus();
        radioToSelect.click();
    };
    Sort.prototype.executeSearchQuery = function () {
        var _this = this;
        this.queryController.deferExecuteQuery({
            beforeExecuteQuery: function () { return SharedAnalyticsCalls_1.logSortEvent(_this.usageAnalytics, _this.currentCriteria.sort + _this.currentCriteria.direction); }
        });
    };
    Sort.prototype.selectFirstCriteria = function () {
        this.currentCriteria = this.options.sortCriteria[0];
        this.updateQueryStateModel();
    };
    Sort.prototype.selectNextCriteria = function () {
        var indexOfCurrentCriteria = this.currentCriteria ? this.options.sortCriteria.indexOf(this.currentCriteria) : 0;
        this.currentCriteria = this.options.sortCriteria[(indexOfCurrentCriteria + 1) % this.options.sortCriteria.length];
        this.updateQueryStateModel();
    };
    Sort.prototype.selectNextCriteriaAndExecuteQuery = function () {
        var oldCriteria = this.currentCriteria;
        this.selectNextCriteria();
        Eif (oldCriteria != this.currentCriteria) {
            this.executeSearchQuery();
        }
    };
    Sort.prototype.handleQueryStateChanged = function () {
        this.update();
    };
    Sort.prototype.update = function () {
        // Basically, if the criteria in the model fits with one of ours, it'll become our active criteria
        var sortCriteria = this.queryStateModel.get(QueryStateModel_1.QueryStateModel.attributesEnum.sort);
        if (Utils_1.Utils.isNonEmptyString(sortCriteria)) {
            var criteriaFromModel = SortCriteria_1.SortCriteria.parse(sortCriteria);
            this.currentCriteria = underscore_1.find(this.options.sortCriteria, function (criteria) { return criteriaFromModel.equals(criteria); });
        }
        else {
            this.currentCriteria = null;
        }
        this.updateAppearance();
        this.updateAccessibilityProperties();
    };
    Object.defineProperty(Sort.prototype, "captionIsDefined", {
        get: function () {
            return Utils_1.Utils.isNonEmptyString(this.options.caption);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(Sort.prototype, "currentDirection", {
        get: function () {
            return this.currentCriteria ? this.currentCriteria.direction : this.initialDirection;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(Sort.prototype, "initialDirection", {
        get: function () {
            return this.options.sortCriteria[0].direction;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(Sort.prototype, "displayedSortText", {
        get: function () {
            return this.captionIsDefined ? this.options.caption : this.element.textContent;
        },
        enumerable: true,
        configurable: true
    });
    Sort.prototype.handleBuildingQuery = function (data) {
        Assert_1.Assert.exists(data);
        var sort = this.queryStateModel.get(QueryStateModel_1.QueryStateModel.attributesEnum.sort);
        Eif (sort == QueryStateModel_1.QueryStateModel.defaultAttributes.sort || this.isSelected()) {
            if (this.currentCriteria) {
                this.currentCriteria.putInQueryBuilder(data.queryBuilder);
            }
        }
    };
    Sort.prototype.handleQuerySuccess = function (data) {
        if (data.results.results.length == 0) {
            Dom_1.$$(this.element).addClass('coveo-sort-hidden');
        }
        else {
            Dom_1.$$(this.element).removeClass('coveo-sort-hidden');
        }
    };
    Sort.prototype.handleQueryError = function (data) {
        Dom_1.$$(this.element).addClass('coveo-sort-hidden');
    };
    Sort.prototype.isToggle = function () {
        return this.options.sortCriteria.length > 1;
    };
    Sort.prototype.isSelected = function () {
        return Utils_1.Utils.exists(this.currentCriteria);
    };
    Sort.prototype.updateAppearance = function () {
        Dom_1.$$(this.element).toggleClass('coveo-selected', this.isSelected());
        if (this.isToggle()) {
            Dom_1.$$(this.element).removeClass('coveo-ascending');
            Dom_1.$$(this.element).removeClass('coveo-descending');
            if (this.isSelected()) {
                Dom_1.$$(this.element).addClass(this.currentDirection === 'ascending' ? 'coveo-ascending' : 'coveo-descending');
            }
        }
    };
    Sort.prototype.updateAccessibilityProperties = function () {
        this.sortButton.setAttribute('aria-controls', this.resultListsIds);
        var directionIsInitial = this.currentDirection === this.initialDirection;
        this.sortButton.setAttribute('aria-checked', "" + (this.isSelected() && directionIsInitial));
        if (this.isToggle()) {
            this.directionButton.setAttribute('aria-controls', this.resultListsIds);
            this.directionButton.setAttribute('aria-checked', "" + (this.isSelected() && !directionIsInitial));
        }
    };
    Object.defineProperty(Sort.prototype, "resultListsIds", {
        get: function () {
            var resultLists = this.searchInterface.getComponents('ResultList');
            return resultLists.map(function (resultList) { return resultList.element.id; }).join(' ');
        },
        enumerable: true,
        configurable: true
    });
    Sort.prototype.getDirectionalLabel = function (direction) {
        var localizedCaption = Strings_1.l(this.displayedSortText);
        return direction === SortCriteria_1.VALID_DIRECTION.DESCENDING
            ? Strings_1.l('SortResultsByDescending', localizedCaption)
            : Strings_1.l('SortResultsByAscending', localizedCaption);
    };
    Sort.prototype.getOmnidirectionalLabel = function () {
        var localizedCaption = Strings_1.l(this.displayedSortText);
        return Strings_1.l('SortResultsBy', localizedCaption);
    };
    Sort.prototype.updateQueryStateModel = function () {
        this.queryStateModel.set(QueryStateModel_1.QueryStateModel.attributesEnum.sort, this.currentCriteria.toString());
    };
    Sort.ID = 'Sort';
    Sort.doExport = function () {
        GlobalExports_1.exportGlobally({
            Sort: Sort,
            SortCriteria: SortCriteria_1.SortCriteria
        });
    };
    /**
     * Options for the component
     * @componentOptions
     */
    Sort.options = {
        /**
         * The sort criterion/criteria the end user can select/toggle between when interacting with this component instance.
         *
         * The available sort criteria are:
         * - `relevancy`
         * - `date ascending`/`date descending`
         * - `qre`
         * - `@field ascending`/`@field descending`, where you must replace `field` with the name of a sortable field in your index (e.g., `data-sort-criteria="@size ascending"`).
         *
         * You can specify a comma separated list of sort criteria to toggle between when interacting with this component instance (e.g., `data-sort-criteria="date descending,date ascending"`).
         *
         * You can specify multiple sort criteria to be used in the same request by separating them with a semicolon (e.g., `data-sort-criteria="@size ascending;date ascending"` ).
         *
         * Interacting with this component instance will cycle through those criteria in the order they are listed in.
         * Typically, you should only specify a list of sort criteria when you want the end user to be able to to toggle the direction of a `date` or `@field` sort criteria.
         * Otherwise, you should configure a distinct `Sort` component instance for each sort criterion you want to make available in your search page.
         *
         * You must specify a valid value for this option in order for this component instance to work correctly.
         *
         * Examples:
         *
         * - `data-sort-criteria="date ascending"` createes a Sort component that allows to sort on `date ascending`, without being able to toggle the order.
         * - `data-sort-criteria="date ascending, date descending"` creates a Sort component that allows end users to toggle between `date ascending` and `date descending` on click.
         * - `data-sort-criteria="@size ascending; date descending"` creates a Sort component that only allows end users to sort on `@size ascending`. The index then applies a second sort on `date descending` when two items are of equal value.
         * - `data-sort-criteria="@size ascending; date descending, @size descending; date descending"` creates a Sort component that allows end users to toggle between `@size ascending` and `@size descending`. For each value, the index applies a second sort on `date descending` when two items are of equal value.
         */
        sortCriteria: ComponentOptions_1.ComponentOptions.buildCustomListOption(function (values) {
            return values.map(function (criteria) {
                // 'any' because Underscore won't accept the union type as an argument.
                Eif (typeof criteria === 'string') {
                    return new SortCriteria_1.SortCriteria(criteria);
                }
                else {
                    return criteria;
                }
            });
        }, { required: true }),
        /**
         * The caption to display on this component instance.
         *
         * By default, the component uses the text content of the element it is instanciated on.
         */
        caption: ComponentOptions_1.ComponentOptions.buildLocalizedStringOption({ required: true })
    };
    return Sort;
}(Component_1.Component));
exports.Sort = Sort;
Initialization_1.Initialization.registerAutoCreateComponent(Sort);
 
 
/***/ }),
/* 272 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __assign = (this && this.__assign) || Object.assign || function(t) {
    for (var s, i = 1, n = arguments.length; i < n; i++) {
        s = arguments[i];
        for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
            t[p] = s[p];
    }
    return t;
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { Iif (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        Iif (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            Iif (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
            Iif (y = 0, t) op = [0, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    Iif (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    Iif (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        Iif (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
Object.defineProperty(exports, "__esModule", { value: true });
__webpack_require__(397);
var underscore_1 = __webpack_require__(1);
var Dom_1 = __webpack_require__(0);
var GlobalExports_1 = __webpack_require__(10);
var Component_1 = __webpack_require__(6);
var ComponentOptions_1 = __webpack_require__(13);
var Initialization_1 = __webpack_require__(8);
var ResponsiveFacetOptions_1 = __webpack_require__(100);
var ResponsiveDynamicFacets_1 = __webpack_require__(1533);
var DynamicFacetBreadcrumbs_1 = __webpack_require__(838);
var DynamicFacetHeader_1 = __webpack_require__(155);
var DynamicFacetValues_1 = __webpack_require__(202);
var QueryEvents_1 = __webpack_require__(14);
var QueryStateModel_1 = __webpack_require__(17);
var DynamicFacetQueryController_1 = __webpack_require__(400);
var Utils_1 = __webpack_require__(5);
var Model_1 = __webpack_require__(26);
var Assert_1 = __webpack_require__(12);
var FacetSortCriteria_1 = __webpack_require__(156);
var Strings_1 = __webpack_require__(4);
var DeviceUtils_1 = __webpack_require__(42);
var BreadcrumbEvents_1 = __webpack_require__(33);
var AnalyticsActionListMeta_1 = __webpack_require__(7);
var DynamicFacetSearch_1 = __webpack_require__(1536);
var ResultListUtils_1 = __webpack_require__(72);
var FacetRequest_1 = __webpack_require__(127);
var DependsOnManager_1 = __webpack_require__(185);
var DynamicFacetValueCreator_1 = __webpack_require__(273);
var Logger_1 = __webpack_require__(18);
var FacetUtils_1 = __webpack_require__(49);
/**
 * The `DynamicFacet` component displays a *facet* of the results for the current query. A facet is a list of values for a
 * certain field occurring in the results, ordered using a configurable criteria (e.g., number of occurrences).
 *
 * The list of values is obtained using an array of [`FacetRequest`]{@link IFacetRequest} operations performed at the same time
 * as the main query.
 *
 * The `DynamicFacet` component allows the end-user to drill down inside a result set by restricting the result to certain
 * field values.
 *
 * This facet is more easy to use than the original [`Facet`]{@link Facet} component. It implements additional Coveo Machine Learning (Coveo ML) features
 * such as dynamic navigation experience (DNE).
 *
 * @notSupportedIn salesforcefree
 * @availablesince [May 2019 Release (v2.6063)](https://docs.coveo.com/en/2909/)
 */
var DynamicFacet = /** @class */ (function (_super) {
    __extends(DynamicFacet, _super);
    /**
     * Creates a new `DynamicFacet` instance.
     *
     * @param element The element from which to instantiate the component.
     * @param options The component options.
     * @param bindings The component bindings. Automatically resolved by default.
     */
    function DynamicFacet(element, options, bindings, classId) {
        if (classId === void 0) { classId = DynamicFacet.ID; }
        var _this = _super.call(this, element, classId, bindings) || this;
        _this.element = element;
        _this.listenToQueryStateChange = true;
        _this.moreValuesAvailable = false;
        _this.isDynamicFacet = true;
        _this.isFieldValueCompatible = true;
        _this.isFieldValueHierarchical = false;
        _this.handleQueryStateChangedIncluded = function (querySelectedValues) {
            var currentSelectedValues = _this.values.selectedValues;
            var validQuerySelectedValues = querySelectedValues.filter(function (value) { return _this.values.get(value); });
            var valuesToSelect = underscore_1.difference(validQuerySelectedValues, currentSelectedValues);
            var valuesToDeselect = underscore_1.difference(currentSelectedValues, validQuerySelectedValues);
            if (Utils_1.Utils.isNonEmptyArray(valuesToSelect)) {
                _this.selectMultipleValues(valuesToSelect);
            }
            if (Utils_1.Utils.isNonEmptyArray(valuesToDeselect)) {
                _this.deselectMultipleValues(valuesToDeselect);
            }
        };
        _this.options = ComponentOptions_1.ComponentOptions.initComponentOptions(element, DynamicFacet, options);
        _this.initDynamicFacetQueryController();
        _this.initDependsOnManager();
        _this.initQueryEvents();
        _this.initQueryStateEvents();
        _this.initBreadCrumbEvents();
        _this.initComponentStateEvents();
        _this.initValues();
        _this.verifyCollapsingConfiguration();
        _this.isCollapsed = _this.options.enableCollapse && _this.options.collapsedByDefault;
        ResponsiveDynamicFacets_1.ResponsiveDynamicFacets.init(_this.root, _this, _this.options);
        return _this;
    }
    Object.defineProperty(DynamicFacet.prototype, "fieldName", {
        get: function () {
            return this.options.field.slice(1);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(DynamicFacet.prototype, "facetType", {
        get: function () {
            return FacetRequest_1.FacetType.specific;
        },
        enumerable: true,
        configurable: true
    });
    /**
     * Selects a single value in this facet.
     *
     * Does **not** trigger a query automatically.
     * Does **not** update the visual of the facet until a query is performed.
     *
     * @param value The name of the facet value to select.
     */
    DynamicFacet.prototype.selectValue = function (value) {
        Assert_1.Assert.exists(value);
        this.selectMultipleValues([value]);
    };
    /**
     * Selects multiple values in this facet.
     *
     * Does **not** trigger a query automatically.
     * Does **not** update the visual of the facet until a query is performed.
     *
     * @param values The names of the facet values to select.
     */
    DynamicFacet.prototype.selectMultipleValues = function (values) {
        var _this = this;
        Assert_1.Assert.exists(values);
        this.ensureDom();
        this.logger.info('Selecting facet value(s)', values);
        values.forEach(function (value) {
            _this.values.get(value).select();
        });
        this.updateQueryStateModel();
    };
    /**
     * Deselects a single value in this facet.
     *
     * Does **not** trigger a query automatically.
     * Does **not** update the visual of the facet until a query is performed.
     *
     * @param values The name of the facet value to deselect.
     */
    DynamicFacet.prototype.deselectValue = function (value) {
        Assert_1.Assert.exists(value);
        this.deselectMultipleValues([value]);
    };
    /**
     * Determines whether the specified value is selected in the facet.
     * @param value The name of the facet value to verify.
     */
    DynamicFacet.prototype.hasSelectedValue = function (value) {
        return this.values.hasSelectedValue(value);
    };
    /**
     * Deselects multiple values in this facet.
     *
     * Does **not** trigger a query automatically.
     * Does **not** update the visual of the facet until a query is performed.
     *
     * @param values The names of the facet values to deselect.
     */
    DynamicFacet.prototype.deselectMultipleValues = function (values) {
        var _this = this;
        Assert_1.Assert.exists(values);
        this.ensureDom();
        this.logger.info('Deselecting facet value(s)', values);
        values.forEach(function (value) {
            _this.values.get(value).deselect();
        });
        this.updateQueryStateModel();
    };
    /**
     * Toggles the selection state of a single value in this facet.
     *
     * Does **not** trigger a query automatically.
     *
     * @param values The name of the facet value to toggle.
     */
    DynamicFacet.prototype.toggleSelectValue = function (value) {
        Assert_1.Assert.exists(value);
        this.ensureDom();
        var facetValue = this.values.get(value);
        facetValue.toggleSelect();
        this.logger.info('Toggle select facet value', facetValue);
        this.updateQueryStateModel();
    };
    /**
     * Keyboard focuses a value once it has been re-rendered.
     *
     * @param value The name of the facet value to focus
     */
    DynamicFacet.prototype.focusValueAfterRerender = function (value) {
        Assert_1.Assert.exists(value);
        this.valueToFocusOnRender = value;
    };
    /**
     * Returns the configured caption for a desired facet value.
     *
     * @param value The string facet value whose caption the method should return.
     */
    DynamicFacet.prototype.getCaptionForStringValue = function (value) {
        return FacetUtils_1.FacetUtils.getDisplayValueFromValueCaption(value, this.options.field, this.options.valueCaption);
    };
    /**
     * Requests additional values.
     *
     * Automatically triggers an isolated query.
     * @param additionalNumberOfValues The number of additional values to request. Minimum value is 1. Defaults to the [numberOfValues]{@link DynamicFacet.options.numberOfValues} option value.
     */
    DynamicFacet.prototype.showMoreValues = function (additionalNumberOfValues) {
        var _this = this;
        if (additionalNumberOfValues === void 0) { additionalNumberOfValues = this.options.numberOfValues; }
        this.ensureDom();
        this.logger.info('Show more values');
        this.dynamicFacetQueryController.increaseNumberOfValuesToRequest(additionalNumberOfValues);
        this.triggerNewIsolatedQuery(function () { return _this.logAnalyticsFacetShowMoreLess(AnalyticsActionListMeta_1.analyticsActionCauseList.dynamicFacetShowMore); });
    };
    /**
     * Reduces the number of displayed facet values down to [numberOfValues]{@link DynamicFacet.options.numberOfValues}.
     *
     * Automatically triggers an isolated query.
     */
    DynamicFacet.prototype.showLessValues = function () {
        var _this = this;
        this.ensureDom();
        this.logger.info('Show less values');
        this.dynamicFacetQueryController.resetNumberOfValuesToRequest();
        this.triggerNewIsolatedQuery(function () { return _this.logAnalyticsFacetShowMoreLess(AnalyticsActionListMeta_1.analyticsActionCauseList.dynamicFacetShowLess); });
    };
    /**
     * Deselects all values in this facet.
     *
     * Does **not** trigger a query automatically.
     * Updates the visual of the facet.
     *
     */
    DynamicFacet.prototype.reset = function () {
        this.ensureDom();
        if (this.values.hasActiveValues) {
            this.logger.info('Deselect all values');
            this.values.clearAll();
            this.values.render();
        }
        this.enablePreventAutoSelectionFlag();
        this.updateAppearance();
        this.updateQueryStateModel();
    };
    /**
     * Collapses or expands the facet depending on it's current state.
     */
    DynamicFacet.prototype.toggleCollapse = function () {
        this.isCollapsed ? this.expand() : this.collapse();
    };
    /**
     * Expands the facet, displaying all of its currently fetched values.
     */
    DynamicFacet.prototype.expand = function () {
        if (!this.options.enableCollapse) {
            return this.logger.warn("Calling expand() won't do anything on a facet that has the option \"enableCollapse\" set to \"false\"");
        }
        if (!this.isCollapsed) {
            return;
        }
        this.ensureDom();
        this.logger.info('Expand facet values');
        this.isCollapsed = false;
        this.updateAppearance();
    };
    /**
     * Collapses the facet, displaying only its currently selected values.
     */
    DynamicFacet.prototype.collapse = function () {
        if (!this.options.enableCollapse) {
            return this.logger.warn("Calling collapse() won't do anything on a facet that has the option \"enableCollapse\" set to \"false\"");
        }
        if (this.isCollapsed) {
            return;
        }
        this.ensureDom();
        this.logger.info('Collapse facet values');
        this.isCollapsed = true;
        this.updateAppearance();
    };
    /**
     * Sets a flag indicating whether the facet values should be returned in their current order.
     *
     * Setting the flag to `true` helps ensuring that the values do not move around while the end-user is interacting with them.
     *
     * The flag is automatically set back to `false` after a query is built.
     */
    DynamicFacet.prototype.enableFreezeCurrentValuesFlag = function () {
        this.dynamicFacetQueryController.enableFreezeCurrentValuesFlag();
    };
    /**
     * For this method to work, the component has to be the child of a [DynamicFacetManager]{@link DynamicFacetManager} component.
     *
     * Sets a flag indicating whether the facets should be returned in their current order.
     *
     * Setting the flag to `true` helps ensuring that the facets do not move around while the end-user is interacting with them.
     *
     * The flag is automatically set back to `false` after a query is built.
     */
    DynamicFacet.prototype.enableFreezeFacetOrderFlag = function () {
        this.dynamicFacetQueryController.enableFreezeFacetOrderFlag();
    };
    DynamicFacet.prototype.enablePreventAutoSelectionFlag = function () {
        this.dynamicFacetQueryController.enablePreventAutoSelectionFlag();
    };
    DynamicFacet.prototype.scrollToTop = function () {
        if (this.options.enableScrollToTop) {
            ResultListUtils_1.ResultListUtils.scrollToTop(this.root);
        }
    };
    Object.defineProperty(DynamicFacet.prototype, "analyticsFacetState", {
        get: function () {
            return this.values.activeValues.map(function (facetValue) { return facetValue.analyticsFacetState; });
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(DynamicFacet.prototype, "basicAnalyticsFacetState", {
        get: function () {
            return {
                field: this.options.field.toString(),
                id: this.options.id,
                title: this.options.title,
                facetType: this.facetType,
                facetPosition: this.position
            };
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(DynamicFacet.prototype, "basicAnalyticsFacetMeta", {
        get: function () {
            return {
                facetField: this.options.field.toString(),
                facetId: this.options.id,
                facetTitle: this.options.title
            };
        },
        enumerable: true,
        configurable: true
    });
    DynamicFacet.prototype.logAnalyticsEvent = function (actionCause, facetMeta) {
        this.usageAnalytics.logSearchEvent(actionCause, facetMeta);
    };
    DynamicFacet.prototype.putStateIntoQueryBuilder = function (queryBuilder) {
        Assert_1.Assert.exists(queryBuilder);
        this.dynamicFacetQueryController.putFacetIntoQueryBuilder(queryBuilder);
    };
    DynamicFacet.prototype.putStateIntoAnalytics = function () {
        var pendingEvent = this.usageAnalytics.getPendingSearchEvent();
        pendingEvent && pendingEvent.addFacetState(this.analyticsFacetState);
    };
    DynamicFacet.prototype.isCurrentlyDisplayed = function () {
        return Dom_1.$$(this.element).isVisible();
    };
    Object.defineProperty(DynamicFacet.prototype, "hasActiveValues", {
        get: function () {
            return this.values.hasActiveValues;
        },
        enumerable: true,
        configurable: true
    });
    DynamicFacet.prototype.initQueryEvents = function () {
        var _this = this;
        this.bind.onRootElement(QueryEvents_1.QueryEvents.duringQuery, function () { return _this.ensureDom(); });
        this.bind.onRootElement(QueryEvents_1.QueryEvents.doneBuildingQuery, function (data) { return _this.handleDoneBuildingQuery(data); });
        this.bind.onRootElement(QueryEvents_1.QueryEvents.deferredQuerySuccess, function (data) { return _this.handleQuerySuccess(data.results); });
        this.bind.onRootElement(QueryEvents_1.QueryEvents.queryError, function () { return _this.onNoValues(); });
    };
    DynamicFacet.prototype.initQueryStateEvents = function () {
        this.includedAttributeId = QueryStateModel_1.QueryStateModel.getFacetId(this.options.id);
        this.queryStateModel.registerNewAttribute(this.includedAttributeId, []);
        this.bind.onQueryState(Model_1.MODEL_EVENTS.CHANGE, undefined, this.handleQueryStateChanged);
    };
    DynamicFacet.prototype.initBreadCrumbEvents = function () {
        var _this = this;
        if (this.options.includeInBreadcrumb) {
            this.bind.onRootElement(BreadcrumbEvents_1.BreadcrumbEvents.populateBreadcrumb, function (args) {
                return _this.handlePopulateBreadcrumb(args);
            });
            this.bind.onRootElement(BreadcrumbEvents_1.BreadcrumbEvents.clearBreadcrumb, function () { return _this.reset(); });
        }
    };
    DynamicFacet.prototype.initValues = function () {
        this.values = new DynamicFacetValues_1.DynamicFacetValues(this, DynamicFacetValueCreator_1.DynamicFacetValueCreator);
    };
    DynamicFacet.prototype.initComponentStateEvents = function () {
        var componentStateId = QueryStateModel_1.QueryStateModel.getFacetId(this.options.id);
        this.componentStateModel.registerComponent(componentStateId, this);
    };
    DynamicFacet.prototype.initDynamicFacetQueryController = function () {
        this.dynamicFacetQueryController = new DynamicFacetQueryController_1.DynamicFacetQueryController(this);
    };
    DynamicFacet.prototype.handleDoneBuildingQuery = function (data) {
        // If there is a DynamicFacetManager, it will take care of adding the facet's state
        if (this.dynamicFacetManager) {
            return;
        }
        Assert_1.Assert.exists(data);
        Assert_1.Assert.exists(data.queryBuilder);
        this.putStateIntoQueryBuilder(data.queryBuilder);
        this.putStateIntoAnalytics();
    };
    DynamicFacet.prototype.handleQuerySuccess = function (results) {
        // If there is a DynamicFacetManager, it will take care of handling the results
        if (this.dynamicFacetManager) {
            return;
        }
        if (Utils_1.Utils.isNullOrUndefined(results.facets)) {
            return this.notImplementedError();
        }
        this.handleQueryResults(results);
    };
    DynamicFacet.prototype.handleQueryResults = function (results) {
        var _this = this;
        var index = underscore_1.findIndex(results.facets, { facetId: this.options.id });
        var facetResponse = index !== -1 ? results.facets[index] : null;
        this.position = facetResponse ? index + 1 : undefined;
        facetResponse ? this.onNewValues(facetResponse) : this.onNoValues();
        this.header.hideLoading();
        this.updateQueryStateModel();
        this.values.render();
        this.updateAppearance();
        Iif (this.valueToFocusOnRender) {
            var value_1 = this.valueToFocusOnRender;
            this.valueToFocusOnRender = null;
            underscore_1.defer(function () { return _this.values.focus(value_1); });
        }
    };
    DynamicFacet.prototype.onNewValues = function (facetResponse) {
        this.moreValuesAvailable = facetResponse.moreValuesAvailable;
        this.values.createFromResponse(facetResponse);
        Iif (this.options.customSort) {
            this.values.reorderValues(this.options.customSort);
        }
    };
    DynamicFacet.prototype.onNoValues = function () {
        this.moreValuesAvailable = false;
        this.values.resetValues();
    };
    DynamicFacet.prototype.handleQueryStateChanged = function (data) {
        if (!this.listenToQueryStateChange) {
            return;
        }
        var querySelectedValues = data.attributes[this.includedAttributeId];
        Iif (!querySelectedValues) {
            return;
        }
        this.handleQueryStateChangedIncluded(querySelectedValues);
    };
    DynamicFacet.prototype.handlePopulateBreadcrumb = function (args) {
        Assert_1.Assert.exists(args);
        Iif (!this.values.hasActiveValues) {
            return;
        }
        var breadcrumbs = new DynamicFacetBreadcrumbs_1.DynamicFacetBreadcrumbs(this, { headingLevel: args.headingLevel });
        args.breadcrumbs.push({ element: breadcrumbs.element });
    };
    DynamicFacet.prototype.initDependsOnManager = function () {
        var _this = this;
        var facetInfo = {
            reset: function () { return _this.reset(); },
            ref: this
        };
        this.dependsOnManager = new DependsOnManager_1.DependsOnManager(facetInfo);
    };
    DynamicFacet.prototype.createDom = function () {
        this.createAndAppendContent();
        this.updateAppearance();
    };
    DynamicFacet.prototype.createAndAppendContent = function () {
        this.createAndAppendHeader();
        this.createAndAppendSearch();
        this.createAndAppendValues();
    };
    DynamicFacet.prototype.createAndAppendHeader = function () {
        var _this = this;
        this.header = new DynamicFacetHeader_1.DynamicFacetHeader({
            id: this.options.id,
            title: this.options.title,
            enableCollapse: this.options.enableCollapse,
            headingLevel: this.options.headingLevel,
            clear: function () { return _this.clear(); },
            toggleCollapse: function () { return _this.toggleCollapse(); },
            collapse: function () { return _this.collapse(); },
            expand: function () { return _this.expand(); }
        });
        this.element.appendChild(this.header.element);
    };
    DynamicFacet.prototype.createAndAppendSearch = function () {
        if (this.options.enableFacetSearch === false) {
            return;
        }
        this.search = new DynamicFacetSearch_1.DynamicFacetSearch(this);
        this.element.appendChild(this.search.element);
    };
    DynamicFacet.prototype.createAndAppendValues = function () {
        this.element.appendChild(this.values.render());
    };
    DynamicFacet.prototype.updateQueryStateModel = function () {
        this.listenToQueryStateChange = false;
        this.queryStateModel.set(this.includedAttributeId, this.values.selectedValues);
        this.listenToQueryStateChange = true;
    };
    DynamicFacet.prototype.updateAppearance = function () {
        this.header.toggleClear(this.values.hasSelectedValues);
        this.header.toggleCollapse(this.isCollapsed);
        this.toggleSearchDisplay();
        Dom_1.$$(this.element).toggleClass('coveo-dynamic-facet-collapsed', this.isCollapsed);
        Dom_1.$$(this.element).toggleClass('coveo-active', this.values.hasSelectedValues);
        Dom_1.$$(this.element).toggleClass('coveo-hidden', !this.values.hasDisplayedValues);
    };
    DynamicFacet.prototype.toggleSearchDisplay = function () {
        if (this.options.enableFacetSearch === false) {
            return;
        }
        if (this.isCollapsed) {
            return Dom_1.$$(this.search.element).toggleClass('coveo-hidden', true);
        }
        Dom_1.$$(this.search.element).toggleClass('coveo-hidden', !this.options.enableFacetSearch && !this.moreValuesAvailable);
    };
    DynamicFacet.prototype.triggerNewQuery = function (beforeExecuteQuery) {
        this.beforeSendingQuery();
        var options = beforeExecuteQuery ? { beforeExecuteQuery: beforeExecuteQuery } : { ignoreWarningSearchEvent: true };
        this.queryController.executeQuery(options);
    };
    DynamicFacet.prototype.triggerNewIsolatedQuery = function (beforeExecuteQuery) {
        return __awaiter(this, void 0, void 0, function () {
            var results, e_1;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        this.beforeSendingQuery();
                        beforeExecuteQuery && beforeExecuteQuery();
                        _a.label = 1;
                    case 1:
                        _a.trys.push([1, 3, , 4]);
                        return [4 /*yield*/, this.dynamicFacetQueryController.getQueryResults()];
                    case 2:
                        results = _a.sent();
                        this.handleQueryResults(results);
                        return [3 /*break*/, 4];
                    case 3:
                        e_1 = _a.sent();
                        this.header.hideLoading();
                        return [3 /*break*/, 4];
                    case 4: return [2 /*return*/];
                }
            });
        });
    };
    DynamicFacet.prototype.beforeSendingQuery = function () {
        this.header.showLoading();
    };
    DynamicFacet.prototype.notImplementedError = function () {
        this.logger.error('DynamicFacets are not supported by your current search endpoint. Disabling this component.');
        this.disable();
        this.updateAppearance();
    };
    DynamicFacet.prototype.verifyCollapsingConfiguration = function () {
        if (this.options.collapsedByDefault && !this.options.enableCollapse) {
            this.logger.warn('The "collapsedByDefault" option is "true" while the "enableCollapse" is "false"');
        }
    };
    DynamicFacet.prototype.logAnalyticsFacetShowMoreLess = function (cause) {
        this.usageAnalytics.logCustomEvent(cause, this.basicAnalyticsFacetMeta, this.element);
    };
    DynamicFacet.prototype.clear = function () {
        var _this = this;
        this.reset();
        this.enableFreezeFacetOrderFlag();
        this.scrollToTop();
        this.triggerNewQuery(function () { return _this.logClearAllToAnalytics(); });
    };
    DynamicFacet.prototype.logClearAllToAnalytics = function () {
        this.logAnalyticsEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.dynamicFacetClearAll, this.basicAnalyticsFacetMeta);
    };
    DynamicFacet.ID = 'DynamicFacet';
    DynamicFacet.doExport = function () { return GlobalExports_1.exportGlobally({ DynamicFacet: DynamicFacet }); };
    /**
     * The options for the DynamicFacet
     * @componentOptions
     */
    DynamicFacet.options = __assign({}, ResponsiveFacetOptions_1.ResponsiveFacetOptions, { 
        /**
         * The unique identifier for this facet.
         *
         * Among other things, this is used to record and read the facet
         * state in the URL fragment identifier (see the
         * [`enableHistory`]{@link SearchInterface.options.enableHistory} `SearchInterface`
         * option).
         *
         * **Tip:** When several facets in a given search interface are based on
         * the same field, ensure that each of those facets has a distinct `id`.
         *
         * If specified, must contain between 1 and 60 characters.
         * Only alphanumeric (A-Za-z0-9), underscore (_), and hyphen (-) characters are kept; other characters are automatically removed.
         *
         * Defaults to the [`field`]{@link DynamicFacet.options.field} option value.
         *
         * @examples author-facet
         */
        id: ComponentOptions_1.ComponentOptions.buildStringOption({
            postProcessing: function (value, options) {
                if (value === void 0) { value = ''; }
                var maxCharLength = 60;
                var sanitizedValue = value.replace(/[^A-Za-z0-9-_@]+/g, '');
                if (Utils_1.Utils.isNonEmptyString(sanitizedValue)) {
                    return sanitizedValue.slice(0, maxCharLength - 1);
                }
                return options.field.slice(0, maxCharLength - 1);
            },
            section: 'CommonOptions'
        }), 
        /**
         * The title to display for this facet.
         *
         * Defaults to the localized string for `NoTitle`.
         *
         * @examples Author
         */
        title: ComponentOptions_1.ComponentOptions.buildLocalizedStringOption({
            localizedString: function () { return Strings_1.l('NoTitle'); },
            section: 'CommonOptions',
            priority: 10
        }), 
        /**
         * The name of the field on which to base this facet.
         *
         * The field must of the `string` type.
         *
         * Must be prefixed by `@`, and must reference an existing field whose
         * **Facet** option is enabled.
         *
         * @externaldocs [Add or Edit Fields](https://docs.coveo.com/en/1982/)
         * @examples @author
         */
        field: ComponentOptions_1.ComponentOptions.buildFieldOption({ required: true, section: 'CommonOptions' }), 
        /**
         * The sort criterion to use for this facet.
         *
         * See [`FacetSortCriteria`]{@link FacetSortCriteria} for the list and
         * description of allowed values.
         *
         * By default, the following behavior applies:
         *
         * - If the requested [`numberOfValues`]{@link DynamicFacet.options.numberOfValues}
         * is greater than or equal to the currently displayed number of values,
         * the [`alphanumeric`]{@link FacetSortCriteria.alphanumeric} criterion is
         * used.
         * - If the requested `numberOfValues` is less than the currently displayed
         * number of values and the facet is not currently expanded, the [`score`]{@link FacetSortCriteria.score}
         * criterion is used.
         * - Otherwise, the `alphanumeric` criterion is used.
         *
         * @examples score
         */
        sortCriteria: ComponentOptions_1.ComponentOptions.buildStringOption({
            postProcessing: function (value) {
                if (!value) {
                    return undefined;
                }
                Eif (FacetSortCriteria_1.isFacetSortCriteria(value)) {
                    return value;
                }
                new Logger_1.Logger(value).warn('sortCriteria is not of the the allowed values: "score", "alphanumeric", "occurrences"');
                return undefined;
            },
            section: 'Sorting'
        }), 
        /**
         * Specifies a custom order by which to sort the dynamic facet values.
         *
         * Custom-ordered values won't necessarily retrieve values from the index.
         *
         * **Example:**
         *
         * You could use this option to specify a logical order for support tickets, such as:
         * ```html
         * <div class="CoveoDynamicFacet" data-field="@ticketstatus" data-title="Ticket Status" data-tab="All" data-custom-sort="New,Opened,Feedback,Resolved"></div>
         * ```
         *
         * **Note:**
         * > The [`DynamicFacetRange`]{@link DynamicFacetRange} component does not support this option.
         */
        customSort: ComponentOptions_1.ComponentOptions.buildListOption({ section: 'Sorting' }), 
        /**
         * The number of values to request for this facet.
         *
         * Also determines the default maximum number of additional values to request each time this facet is expanded,
         * and the maximum number of values to display when this facet is collapsed (see the [`enableCollapse`]{@link DynamicFacet.options.enableCollapse} option).
         */
        numberOfValues: ComponentOptions_1.ComponentOptions.buildNumberOption({ min: 0, defaultValue: 8, section: 'CommonOptions' }), 
        /**
         * Whether to allow the end-user to expand and collapse this facet.
         */
        enableCollapse: ComponentOptions_1.ComponentOptions.buildBooleanOption({ defaultValue: true, section: 'CommonOptions' }), 
        /**
         * Whether to scroll back to the top of the page whenever the end-user interacts with the facet.
         */
        enableScrollToTop: ComponentOptions_1.ComponentOptions.buildBooleanOption({ defaultValue: true, section: 'CommonOptions' }), 
        /**
         * Whether to enable the **Show more** and **Show less** buttons in the facet.
         *
         * **Note:** The [`DynamicFacetRange`]{@link DynamicFacetRange} component does not support this option.
         */
        enableMoreLess: ComponentOptions_1.ComponentOptions.buildBooleanOption({ defaultValue: true, section: 'CommonOptions' }), 
        /**
         * Whether to allow the end-user to search the facet values.
         *
         * **Note:** The [`DynamicFacetRange`]{@link DynamicFacetRange} component does not support this option.
         *
         * By default, the following behavior applies:
         *
         * - Enabled when more facet values are available.
         * - Disabled when all available facet values are already displayed.
         */
        enableFacetSearch: ComponentOptions_1.ComponentOptions.buildBooleanOption({ section: 'Filtering' }), 
        /**
         * Whether to prepend facet search queries with a wildcard.
         *
         * **Note:** The [`DynamicFacetRange`]{@link DynamicFacetRange} component does not support this option.
         */
        useLeadingWildcardInFacetSearch: ComponentOptions_1.ComponentOptions.buildBooleanOption({
            defaultValue: true,
            section: 'Filtering',
            depend: 'enableFacetSearch'
        }), 
        /**
         * Whether this facet should be collapsed by default.
         */
        collapsedByDefault: ComponentOptions_1.ComponentOptions.buildBooleanOption({ defaultValue: false, section: 'CommonOptions', depend: 'enableCollapse' }), 
        /**
         * Whether to notify the [`Breadcrumb`]{@link Breadcrumb} component when toggling values in the facet.
         *
         * See also the [`numberOfValuesInBreadcrumb`]{@link DynamicFacet.options.numberOfValuesInBreadcrumb} option.
         */
        includeInBreadcrumb: ComponentOptions_1.ComponentOptions.buildBooleanOption({ defaultValue: true, section: 'CommonOptions' }), 
        /**
         * The maximum number of selected values the [`Breadcrumb`]{@link Breadcrumb} component can display before outputting a **N more...** link for the facet.
         */
        numberOfValuesInBreadcrumb: ComponentOptions_1.ComponentOptions.buildNumberOption({
            defaultFunction: function () { return (DeviceUtils_1.DeviceUtils.isMobileDevice() ? 3 : 5); },
            min: 0,
            depend: 'includeInBreadcrumb',
            section: 'CommonOptions'
        }), 
        /**
         * A mapping of facet values to their desired captions.
         *
         * **Note:** The [`DynamicFacetRange`]{@link DynamicFacetRange} component does not support this option.
         *
         * @externaldocs [Normalizing Facet Value Captions](https://docs.coveo.com/368/).
         * @examples { "smith_alice": "Alice Smith"\, "jones_bob_r": "Bob R. Jones" }
         */
        valueCaption: ComponentOptions_1.ComponentOptions.buildJsonOption({ defaultValue: {} }), 
        /**
         * The [`id`]{@link DynamicFacet.options.id} of another facet in which at least one value must be selected in order for the dependent facet to be visible.
         *
         * By default, the facet does not depend on any other facet to be displayed.
         *
         * @examples document-type-facet
         *
         * @availablesince [December 2019 Release (v2.7610)](https://docs.coveo.com/en/3142/)
         */
        dependsOn: ComponentOptions_1.ComponentOptions.buildStringOption({ section: 'CommonOptions' }), 
        /**
         * A function that verifies whether the current state of the `dependsOn` facet allows the dependent facet to be displayed.
         *
         * If specified, the function receives a reference to the resolved `dependsOn` facet component instance as an argument, and must return a boolean.
         * The function's argument should typically be treated as read-only.
         *
         * By default, the dependent facet is displayed whenever one or more values are selected in its `dependsOn` facet.
         *
         * @externaldocs [Defining Dependent Facets](https://docs.coveo.com/3210/)
         *
         * @availablesince [April 2020 Release (v2.8864)](https://docs.coveo.com/en/3231/)
         */
        dependsOnCondition: ComponentOptions_1.ComponentOptions.buildCustomOption(function () {
            return null;
        }, { depend: 'dependsOn', section: 'CommonOptions' }), 
        /**
         * The number of items to scan for facet values.
         *
         * Setting this option to a higher value may enhance the accuracy of facet value counts at the cost of slower query performance.
         *
         * @availablesince [January 2020 Release (v2.7968)](https://docs.coveo.com/en/3163/)
         *
         * @examples 1500
         */
        injectionDepth: ComponentOptions_1.ComponentOptions.buildNumberOption({ defaultValue: 1000, min: 1000 }), 
        /**
         * Whether to exclude folded result parents when estimating result counts for facet values.
         *
         * **Note:** The target folding field must be a facet field with the **Use cache for nested queries** options enabled (see [Add or Edit a Field](https://docs.coveo.com/en/1982)).
         *
         * See also the [`Folding`]{@link Folding} and [`FoldingForThread`]{@link FoldingForThread} components.
         *
         * **Default:** `true`.
         *
         * @availablesince [March 2020 Release (v2.8521)](https://docs.coveo.com/en/3203/)
         */
        filterFacetCount: ComponentOptions_1.ComponentOptions.buildBooleanOption({ section: 'Filtering' }), 
        /**
         * The [heading level](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Heading_Elements) to use for the heading above the facet.
         *
         * A value of 0 will render a [`div`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/div) element instead.
         *
         * **Default:** `2`.
         */
        headingLevel: ComponentOptions_1.ComponentOptions.buildNumberOption({ defaultValue: 2, min: 0, max: 6 }) });
    return DynamicFacet;
}(Component_1.Component));
exports.DynamicFacet = DynamicFacet;
Initialization_1.Initialization.registerAutoCreateComponent(DynamicFacet);
DynamicFacet.doExport();
 
 
/***/ }),
/* 273 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var FacetUtils_1 = __webpack_require__(49);
var DynamicFacetValue_1 = __webpack_require__(126);
var FacetValueState_1 = __webpack_require__(36);
var DynamicFacetValueRenderer_1 = __webpack_require__(274);
var DynamicFacetValueCreator = /** @class */ (function () {
    function DynamicFacetValueCreator(facet) {
        this.facet = facet;
    }
    DynamicFacetValueCreator.prototype.getDisplayValue = function (value) {
        return FacetUtils_1.FacetUtils.getDisplayValueFromValueCaption(value, this.facet.options.field, this.facet.options.valueCaption);
    };
    DynamicFacetValueCreator.prototype.getDefaultValues = function () {
        return [];
    };
    DynamicFacetValueCreator.prototype.createFromResponse = function (facetValue, index) {
        return new DynamicFacetValue_1.DynamicFacetValue({
            value: facetValue.value,
            displayValue: this.getDisplayValue(facetValue.value),
            numberOfResults: facetValue.numberOfResults,
            state: facetValue.state,
            position: index + 1
        }, this.facet, DynamicFacetValueRenderer_1.DynamicFacetValueRenderer);
    };
    DynamicFacetValueCreator.prototype.createFromValue = function (value) {
        var position = this.facet.values.allFacetValues.length + 1;
        var state = FacetValueState_1.FacetValueState.idle;
        var displayValue = this.getDisplayValue(value);
        return new DynamicFacetValue_1.DynamicFacetValue({ value: value, displayValue: displayValue, state: state, numberOfResults: 0, position: position }, this.facet, DynamicFacetValueRenderer_1.DynamicFacetValueRenderer);
    };
    return DynamicFacetValueCreator;
}());
exports.DynamicFacetValueCreator = DynamicFacetValueCreator;
 
 
/***/ }),
/* 274 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Dom_1 = __webpack_require__(0);
var DynamicFacetValueCheckbox_1 = __webpack_require__(401);
var DynamicFacetValueRenderer = /** @class */ (function () {
    function DynamicFacetValueRenderer(facetValue, facet) {
        this.facetValue = facetValue;
        this.facet = facet;
    }
    DynamicFacetValueRenderer.prototype.render = function () {
        this.dom = Dom_1.$$('li', {
            className: 'coveo-dynamic-facet-value',
            role: 'none',
            dataValue: this.facetValue.value
        });
        this.toggleSelectedClass();
        this.renderCheckbox();
        this.addFocusAndBlurEventListeners();
        return this.dom.el;
    };
    DynamicFacetValueRenderer.prototype.toggleSelectedClass = function () {
        this.dom.toggleClass('coveo-selected', this.facetValue.isSelected);
    };
    DynamicFacetValueRenderer.prototype.renderCheckbox = function () {
        this.valueCheckbox = new DynamicFacetValueCheckbox_1.DynamicFacetValueCheckbox(this.facetValue, this.selectAction.bind(this));
        this.dom.append(this.valueCheckbox.element);
    };
    DynamicFacetValueRenderer.prototype.addFocusAndBlurEventListeners = function () {
        var _this = this;
        var checkboxButton = Dom_1.$$(this.valueCheckbox.element).find('button');
        Dom_1.$$(checkboxButton).on('focusin', function () { return _this.onFocusIn(); });
        Dom_1.$$(checkboxButton).on('focusout', function () { return _this.onFocusOut(); });
    };
    DynamicFacetValueRenderer.prototype.onFocusIn = function () {
        this.dom.addClass('coveo-focused');
    };
    DynamicFacetValueRenderer.prototype.onFocusOut = function () {
        this.dom.removeClass('coveo-focused');
    };
    DynamicFacetValueRenderer.prototype.selectAction = function () {
        var _this = this;
        this.facet.toggleSelectValue(this.facetValue.value);
        this.toggleSelectedClass();
        this.facet.enableFreezeCurrentValuesFlag();
        this.facet.enableFreezeFacetOrderFlag();
        this.facet.enablePreventAutoSelectionFlag();
        this.facet.scrollToTop();
        this.facet.focusValueAfterRerender(this.facetValue.value);
        this.facet.triggerNewQuery(function () { return _this.facetValue.logSelectActionToAnalytics(); });
    };
    return DynamicFacetValueRenderer;
}());
exports.DynamicFacetValueRenderer = DynamicFacetValueRenderer;
 
 
/***/ }),
/* 275 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var FacetRangeSortOrder;
(function (FacetRangeSortOrder) {
    /**
     * Sort facet values in ascending order.
     */
    FacetRangeSortOrder["ascending"] = "ascending";
    /**
     * Sort facet values in ascending order.
     */
    FacetRangeSortOrder["descending"] = "descending";
})(FacetRangeSortOrder = exports.FacetRangeSortOrder || (exports.FacetRangeSortOrder = {}));
function isFacetRangeSortOrder(sortOrder) {
    return !!FacetRangeSortOrder[sortOrder];
}
exports.isFacetRangeSortOrder = isFacetRangeSortOrder;
 
 
/***/ }),
/* 276 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
var Component_1 = __webpack_require__(6);
var InitializationEvents_1 = __webpack_require__(22);
var QueryEvents_1 = __webpack_require__(14);
var GlobalExports_1 = __webpack_require__(10);
var underscore_1 = __webpack_require__(1);
var Dom_1 = __webpack_require__(0);
var Utils_1 = __webpack_require__(5);
var ComponentOptions_1 = __webpack_require__(13);
var Assert_1 = __webpack_require__(12);
var Initialization_1 = __webpack_require__(8);
var ComponentsTypes_1 = __webpack_require__(69);
/**
 * The `DynamicFacetManager` component is meant to be a parent for multiple [DynamicFacet]{@link DynamicFacet} & [DynamicFacetRange]{@link DynamicFacetRange} components.
 * This component allows controlling a set of [`DynamicFacet`]{@link DynamicFacet} and [`DynamicFacetRange`]{@link DynamicFacetRange} as a group.
 *
 * @externaldocs [Using Dynamic Facets](https://docs.coveo.com/en/2917/).
 * @availablesince [May 2019 Release (v2.6063)](https://docs.coveo.com/en/2909/)
 */
var DynamicFacetManager = /** @class */ (function (_super) {
    __extends(DynamicFacetManager, _super);
    /**
     * Creates a new `DynamicFacetManager` instance.
     *
     * @param element The element from which to instantiate the component.
     * @param options The component options.
     * @param bindings The component bindings. Automatically resolved by default.
     */
    function DynamicFacetManager(element, options) {
        var _this = _super.call(this, element, 'DynamicFacetManager') || this;
        _this.options = options;
        _this.childrenFacets = [];
        _this.options = ComponentOptions_1.ComponentOptions.initComponentOptions(element, DynamicFacetManager, options);
        _this.resetContainer();
        _this.prependContainer();
        _this.initEvents();
        return _this;
    }
    Object.defineProperty(DynamicFacetManager.prototype, "enabledFacets", {
        get: function () {
            return this.childrenFacets.filter(function (facet) { return !facet.disabled; });
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(DynamicFacetManager.prototype, "displayedFacets", {
        get: function () {
            return this.childrenFacets.filter(function (facet) { return facet.isCurrentlyDisplayed(); });
        },
        enumerable: true,
        configurable: true
    });
    DynamicFacetManager.prototype.resetContainer = function () {
        this.containerElement && Dom_1.$$(this.containerElement).remove();
        this.containerElement = Dom_1.$$('div', { className: 'coveo-dynamic-facet-manager-container' }).el;
    };
    DynamicFacetManager.prototype.prependContainer = function () {
        Dom_1.$$(this.element).prepend(this.containerElement);
    };
    DynamicFacetManager.prototype.initEvents = function () {
        var _this = this;
        this.bind.onRootElement(InitializationEvents_1.InitializationEvents.afterComponentsInitialization, function () { return _this.handleAfterComponentsInitialization(); });
        this.bind.onRootElement(QueryEvents_1.QueryEvents.doneBuildingQuery, function (data) { return _this.handleDoneBuildingQuery(data); });
        this.bind.onRootElement(QueryEvents_1.QueryEvents.deferredQuerySuccess, function (data) { return _this.handleQuerySuccess(data); });
    };
    DynamicFacetManager.prototype.isDynamicFacet = function (component) {
        return !!component.isDynamicFacet;
    };
    Object.defineProperty(DynamicFacetManager.prototype, "allDynamicFacets", {
        get: function () {
            var allFacetsInComponent = ComponentsTypes_1.ComponentsTypes.getAllFacetInstancesFromElement(this.element);
            return allFacetsInComponent.filter(this.isDynamicFacet);
        },
        enumerable: true,
        configurable: true
    });
    DynamicFacetManager.prototype.handleAfterComponentsInitialization = function () {
        var _this = this;
        this.childrenFacets = this.allDynamicFacets;
        this.childrenFacets.forEach(function (dynamicFacet) {
            dynamicFacet.dynamicFacetManager = _this;
            _this.containerElement.appendChild(dynamicFacet.element);
        });
        if (this.element.children.length > 1) {
            this.logger.warn("DynamicFacetManager contains incompatible elements. Those elements may be moved in the DOM.\n        To prevent this warning, move those elements outside of the DynamicFacetManager.");
        }
        if (!this.childrenFacets.length) {
            this.disable();
        }
    };
    DynamicFacetManager.prototype.handleDoneBuildingQuery = function (data) {
        Assert_1.Assert.exists(data);
        Assert_1.Assert.exists(data.queryBuilder);
        this.enabledFacets.forEach(function (dynamicFacet) {
            dynamicFacet.putStateIntoQueryBuilder(data.queryBuilder);
            dynamicFacet.putStateIntoAnalytics();
        });
    };
    DynamicFacetManager.prototype.handleQuerySuccess = function (data) {
        if (Utils_1.Utils.isNullOrUndefined(data.results.facets)) {
            return this.notImplementedError();
        }
        this.enabledFacets.forEach(function (dynamicFacet) {
            dynamicFacet.handleQueryResults(data.results);
        });
        var wasFacetOrderFrozen = data.query.facetOptions && data.query.facetOptions.freezeFacetOrder;
        if (wasFacetOrderFrozen) {
            return this.callOnUpdateOnChildrenFacets();
        }
        if (this.options.enableReorder) {
            this.options.compareFacets ? this.sortFacetsWithCompareOption() : this.sortFacetsWithResponseOrder(data.results.facets);
            this.reorderFacetsInDom();
        }
        this.respectMaximumExpandedFacetsThreshold();
        this.callOnUpdateOnChildrenFacets();
    };
    DynamicFacetManager.prototype.callOnUpdateOnChildrenFacets = function () {
        var _this = this;
        if (!this.options.onUpdate) {
            return;
        }
        this.childrenFacets.forEach(function (dynamicFacet, index) { return _this.options.onUpdate(dynamicFacet, index); });
    };
    DynamicFacetManager.prototype.sortFacetsWithResponseOrder = function (facetsResponse) {
        var _this = this;
        var facetsInResponse = facetsResponse.map(function (_a) {
            var facetId = _a.facetId;
            return _this.getChildFacetWithId(facetId);
        }).filter(Utils_1.Utils.exists);
        var facetsNotInResponse = underscore_1.without.apply(void 0, [this.childrenFacets].concat(facetsInResponse));
        this.childrenFacets = facetsInResponse.concat(facetsNotInResponse);
    };
    DynamicFacetManager.prototype.sortFacetsWithCompareOption = function () {
        this.childrenFacets = this.childrenFacets.sort(this.options.compareFacets);
    };
    DynamicFacetManager.prototype.reorderFacetsInDom = function () {
        this.resetContainer();
        var fragment = document.createDocumentFragment();
        this.childrenFacets.forEach(function (dynamicFacet) { return fragment.appendChild(dynamicFacet.element); });
        this.containerElement.appendChild(fragment);
        this.prependContainer();
    };
    DynamicFacetManager.prototype.respectMaximumExpandedFacetsThreshold = function () {
        if (this.options.maximumNumberOfExpandedFacets === -1) {
            return;
        }
        var _a = underscore_1.partition(this.displayedFacets, function (facet) { return facet.options.enableCollapse; }), collapsableFacets = _a[0], uncollapsableFacets = _a[1];
        var facetsLeftToExpandCounter = this.options.maximumNumberOfExpandedFacets - uncollapsableFacets.length;
        collapsableFacets.forEach(function (dynamicFacet) {
            if (facetsLeftToExpandCounter < 1) {
                return dynamicFacet.collapse();
            }
            if (dynamicFacet.options.collapsedByDefault) {
                dynamicFacet.logger.info('The facet has its "collapsedByDefault" option set to "true", which prevents the DynamicFacetManager from expanding it.', 'While this configuration may be legitimate, it partially defeats the purpose of the dynamic navigation experience feature.', 'For more information, see https://docs.coveo.com/en/2917/.');
                return dynamicFacet.collapse();
            }
            facetsLeftToExpandCounter--;
            dynamicFacet.expand();
        });
    };
    DynamicFacetManager.prototype.getChildFacetWithId = function (id) {
        return underscore_1.find(this.childrenFacets, function (facet) { return facet.options.id === id; });
    };
    DynamicFacetManager.prototype.notImplementedError = function () {
        this.logger.error('DynamicFacetManager is not supported by your current search endpoint. Disabling this component.');
        this.disable();
    };
    DynamicFacetManager.prototype.isCurrentlyDisplayed = function () {
        return !!underscore_1.find(this.childrenFacets, function (facet) { return facet.isCurrentlyDisplayed(); });
    };
    DynamicFacetManager.ID = 'DynamicFacetManager';
    DynamicFacetManager.doExport = function () { return GlobalExports_1.exportGlobally({ DynamicFacetManager: DynamicFacetManager }); };
    /**
     * The options for the DynamicFacetManager
     * @componentOptions
     */
    DynamicFacetManager.options = {
        /**
         * Whether to allow the reordering of facets based on Coveo ML and index ranking scores.
         *
         * **Default:** `true`
         */
        enableReorder: ComponentOptions_1.ComponentOptions.buildBooleanOption({ defaultValue: true, section: 'Filtering' }),
        /**
         * A function to execute whenever facets are updated in the query response @externaldocs [Defining Custom Dynamic Facet Behaviors](https://docs.coveo.com/en/2917/javascript-search-framework/using-dynamic-facets#defining-custom-dynamic-facet-behaviors).
         *
         * **Note:**
         * > You cannot set this option directly in the component markup as an HTML attribute. You must either set it in the
         * > [`init`]{@link init} call of your search interface (see
         * > [Passing Component Options in the init Call](https://developers.coveo.com/x/PoGfAQ#Components-PassingComponentOptionsintheinitCall)),
         * > or before the `init` call, using the `options` top-level function (see
         * > [Passing Component Options Before the init Call](https://developers.coveo.com/x/PoGfAQ#Components-PassingComponentOptionsBeforetheinitCall)).
         */
        onUpdate: ComponentOptions_1.ComponentOptions.buildCustomOption(function () {
            return null;
        }),
        /**
         * A custom sort function to execute on facets on every successful query response @externaldocs [Using Custom Dynamic Facet Sort Functions](https://docs.coveo.com/en/2917/javascript-search-framework/using-dynamic-facets#using-custom-dynamic-facet-sort-functions).
         *
         * **Note:**
         * > If specified, the function must implement the JavaScript compareFunction (see [Array.prototype.sort](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort).
         * > You cannot set this option directly in the component markup as an HTML attribute. You must either set it in the
         * > [`init`]{@link init} call of your search interface (see
         * > [Passing Component Options in the init Call](https://developers.coveo.com/x/PoGfAQ#Components-PassingComponentOptionsintheinitCall)),
         * > or before the `init` call, using the `options` top-level function (see
         * > [Passing Component Options Before the init Call](https://developers.coveo.com/x/PoGfAQ#Components-PassingComponentOptionsBeforetheinitCall)).
         */
        compareFacets: ComponentOptions_1.ComponentOptions.buildCustomOption(function () {
            return null;
        }),
        /**
         * The maximum number of expanded facets inside the manager.
         * Remaining facets are collapsed.
         *
         * **Note:**
         * Prioritizes facets with active values, and then prioritizes first facets.
         * If the number of facets with active values exceeds the value of the `maximumNumberOfExpandedFacets` option, it overrides the option.
         *
         * Using the value `-1` disables the feature and keeps all facets expanded.
         *
         * @availablesince [September 2019 Release (v2.7023)](https://docs.coveo.com/en/2990/)
         */
        maximumNumberOfExpandedFacets: ComponentOptions_1.ComponentOptions.buildNumberOption({ defaultValue: 4, min: -1 })
    };
    return DynamicFacetManager;
}(Component_1.Component));
exports.DynamicFacetManager = DynamicFacetManager;
Initialization_1.Initialization.registerAutoCreateComponent(DynamicFacetManager);
DynamicFacetManager.doExport();
 
 
/***/ }),
/* 277 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__setup_js__ = __webpack_require__(30);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "VERSION", function() { return __WEBPACK_IMPORTED_MODULE_0__setup_js__["e"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__restArguments_js__ = __webpack_require__(58);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "restArguments", function() { return __WEBPACK_IMPORTED_MODULE_1__restArguments_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isObject_js__ = __webpack_require__(105);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "isObject", function() { return __WEBPACK_IMPORTED_MODULE_2__isObject_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__isNull_js__ = __webpack_require__(873);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "isNull", function() { return __WEBPACK_IMPORTED_MODULE_3__isNull_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__isUndefined_js__ = __webpack_require__(416);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "isUndefined", function() { return __WEBPACK_IMPORTED_MODULE_4__isUndefined_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__isBoolean_js__ = __webpack_require__(417);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "isBoolean", function() { return __WEBPACK_IMPORTED_MODULE_5__isBoolean_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__isElement_js__ = __webpack_require__(874);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "isElement", function() { return __WEBPACK_IMPORTED_MODULE_6__isElement_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__isString_js__ = __webpack_require__(278);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "isString", function() { return __WEBPACK_IMPORTED_MODULE_7__isString_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__isNumber_js__ = __webpack_require__(418);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "isNumber", function() { return __WEBPACK_IMPORTED_MODULE_8__isNumber_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__isDate_js__ = __webpack_require__(875);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "isDate", function() { return __WEBPACK_IMPORTED_MODULE_9__isDate_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__isRegExp_js__ = __webpack_require__(876);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "isRegExp", function() { return __WEBPACK_IMPORTED_MODULE_10__isRegExp_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__isError_js__ = __webpack_require__(877);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "isError", function() { return __WEBPACK_IMPORTED_MODULE_11__isError_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__isSymbol_js__ = __webpack_require__(419);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "isSymbol", function() { return __WEBPACK_IMPORTED_MODULE_12__isSymbol_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__isArrayBuffer_js__ = __webpack_require__(420);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "isArrayBuffer", function() { return __WEBPACK_IMPORTED_MODULE_13__isArrayBuffer_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__isDataView_js__ = __webpack_require__(279);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "isDataView", function() { return __WEBPACK_IMPORTED_MODULE_14__isDataView_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__isArray_js__ = __webpack_require__(106);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "isArray", function() { return __WEBPACK_IMPORTED_MODULE_15__isArray_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__isFunction_js__ = __webpack_require__(64);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "isFunction", function() { return __WEBPACK_IMPORTED_MODULE_16__isFunction_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_17__isArguments_js__ = __webpack_require__(280);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "isArguments", function() { return __WEBPACK_IMPORTED_MODULE_17__isArguments_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_18__isFinite_js__ = __webpack_require__(879);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "isFinite", function() { return __WEBPACK_IMPORTED_MODULE_18__isFinite_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_19__isNaN_js__ = __webpack_require__(421);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "isNaN", function() { return __WEBPACK_IMPORTED_MODULE_19__isNaN_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_20__isTypedArray_js__ = __webpack_require__(422);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "isTypedArray", function() { return __WEBPACK_IMPORTED_MODULE_20__isTypedArray_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_21__isEmpty_js__ = __webpack_require__(881);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "isEmpty", function() { return __WEBPACK_IMPORTED_MODULE_21__isEmpty_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_22__isMatch_js__ = __webpack_require__(427);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "isMatch", function() { return __WEBPACK_IMPORTED_MODULE_22__isMatch_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_23__isEqual_js__ = __webpack_require__(882);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "isEqual", function() { return __WEBPACK_IMPORTED_MODULE_23__isEqual_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_24__isMap_js__ = __webpack_require__(884);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "isMap", function() { return __WEBPACK_IMPORTED_MODULE_24__isMap_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_25__isWeakMap_js__ = __webpack_require__(885);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "isWeakMap", function() { return __WEBPACK_IMPORTED_MODULE_25__isWeakMap_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_26__isSet_js__ = __webpack_require__(886);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "isSet", function() { return __WEBPACK_IMPORTED_MODULE_26__isSet_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_27__isWeakSet_js__ = __webpack_require__(887);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "isWeakSet", function() { return __WEBPACK_IMPORTED_MODULE_27__isWeakSet_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_28__keys_js__ = __webpack_require__(41);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "keys", function() { return __WEBPACK_IMPORTED_MODULE_28__keys_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_29__allKeys_js__ = __webpack_require__(160);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "allKeys", function() { return __WEBPACK_IMPORTED_MODULE_29__allKeys_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_30__values_js__ = __webpack_require__(129);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "values", function() { return __WEBPACK_IMPORTED_MODULE_30__values_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_31__pairs_js__ = __webpack_require__(888);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "pairs", function() { return __WEBPACK_IMPORTED_MODULE_31__pairs_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_32__invert_js__ = __webpack_require__(428);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "invert", function() { return __WEBPACK_IMPORTED_MODULE_32__invert_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_33__functions_js__ = __webpack_require__(429);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "functions", function() { return __WEBPACK_IMPORTED_MODULE_33__functions_js__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "methods", function() { return __WEBPACK_IMPORTED_MODULE_33__functions_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_34__extend_js__ = __webpack_require__(430);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "extend", function() { return __WEBPACK_IMPORTED_MODULE_34__extend_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_35__extendOwn_js__ = __webpack_require__(284);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "extendOwn", function() { return __WEBPACK_IMPORTED_MODULE_35__extendOwn_js__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "assign", function() { return __WEBPACK_IMPORTED_MODULE_35__extendOwn_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_36__defaults_js__ = __webpack_require__(431);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "defaults", function() { return __WEBPACK_IMPORTED_MODULE_36__defaults_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_37__create_js__ = __webpack_require__(889);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "create", function() { return __WEBPACK_IMPORTED_MODULE_37__create_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_38__clone_js__ = __webpack_require__(433);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "clone", function() { return __WEBPACK_IMPORTED_MODULE_38__clone_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_39__tap_js__ = __webpack_require__(890);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "tap", function() { return __WEBPACK_IMPORTED_MODULE_39__tap_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_40__get_js__ = __webpack_require__(434);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "get", function() { return __WEBPACK_IMPORTED_MODULE_40__get_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_41__has_js__ = __webpack_require__(891);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "has", function() { return __WEBPACK_IMPORTED_MODULE_41__has_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_42__mapObject_js__ = __webpack_require__(892);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "mapObject", function() { return __WEBPACK_IMPORTED_MODULE_42__mapObject_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_43__identity_js__ = __webpack_require__(286);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "identity", function() { return __WEBPACK_IMPORTED_MODULE_43__identity_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_44__constant_js__ = __webpack_require__(423);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "constant", function() { return __WEBPACK_IMPORTED_MODULE_44__constant_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_45__noop_js__ = __webpack_require__(438);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "noop", function() { return __WEBPACK_IMPORTED_MODULE_45__noop_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_46__toPath_js__ = __webpack_require__(435);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "toPath", function() { return __WEBPACK_IMPORTED_MODULE_46__toPath_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_47__property_js__ = __webpack_require__(287);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "property", function() { return __WEBPACK_IMPORTED_MODULE_47__property_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_48__propertyOf_js__ = __webpack_require__(893);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "propertyOf", function() { return __WEBPACK_IMPORTED_MODULE_48__propertyOf_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_49__matcher_js__ = __webpack_require__(209);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "matcher", function() { return __WEBPACK_IMPORTED_MODULE_49__matcher_js__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "matches", function() { return __WEBPACK_IMPORTED_MODULE_49__matcher_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_50__times_js__ = __webpack_require__(894);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "times", function() { return __WEBPACK_IMPORTED_MODULE_50__times_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_51__random_js__ = __webpack_require__(439);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "random", function() { return __WEBPACK_IMPORTED_MODULE_51__random_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_52__now_js__ = __webpack_require__(288);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "now", function() { return __WEBPACK_IMPORTED_MODULE_52__now_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_53__escape_js__ = __webpack_require__(895);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "escape", function() { return __WEBPACK_IMPORTED_MODULE_53__escape_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_54__unescape_js__ = __webpack_require__(896);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "unescape", function() { return __WEBPACK_IMPORTED_MODULE_54__unescape_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_55__templateSettings_js__ = __webpack_require__(442);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "templateSettings", function() { return __WEBPACK_IMPORTED_MODULE_55__templateSettings_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_56__template_js__ = __webpack_require__(898);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "template", function() { return __WEBPACK_IMPORTED_MODULE_56__template_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_57__result_js__ = __webpack_require__(899);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "result", function() { return __WEBPACK_IMPORTED_MODULE_57__result_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_58__uniqueId_js__ = __webpack_require__(900);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "uniqueId", function() { return __WEBPACK_IMPORTED_MODULE_58__uniqueId_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_59__chain_js__ = __webpack_require__(901);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "chain", function() { return __WEBPACK_IMPORTED_MODULE_59__chain_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_60__iteratee_js__ = __webpack_require__(437);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "iteratee", function() { return __WEBPACK_IMPORTED_MODULE_60__iteratee_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_61__partial_js__ = __webpack_require__(210);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "partial", function() { return __WEBPACK_IMPORTED_MODULE_61__partial_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_62__bind_js__ = __webpack_require__(444);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "bind", function() { return __WEBPACK_IMPORTED_MODULE_62__bind_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_63__bindAll_js__ = __webpack_require__(902);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "bindAll", function() { return __WEBPACK_IMPORTED_MODULE_63__bindAll_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_64__memoize_js__ = __webpack_require__(903);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "memoize", function() { return __WEBPACK_IMPORTED_MODULE_64__memoize_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_65__delay_js__ = __webpack_require__(445);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "delay", function() { return __WEBPACK_IMPORTED_MODULE_65__delay_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_66__defer_js__ = __webpack_require__(904);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "defer", function() { return __WEBPACK_IMPORTED_MODULE_66__defer_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_67__throttle_js__ = __webpack_require__(905);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "throttle", function() { return __WEBPACK_IMPORTED_MODULE_67__throttle_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_68__debounce_js__ = __webpack_require__(906);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "debounce", function() { return __WEBPACK_IMPORTED_MODULE_68__debounce_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_69__wrap_js__ = __webpack_require__(907);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "wrap", function() { return __WEBPACK_IMPORTED_MODULE_69__wrap_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_70__negate_js__ = __webpack_require__(289);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "negate", function() { return __WEBPACK_IMPORTED_MODULE_70__negate_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_71__compose_js__ = __webpack_require__(908);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "compose", function() { return __WEBPACK_IMPORTED_MODULE_71__compose_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_72__after_js__ = __webpack_require__(909);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "after", function() { return __WEBPACK_IMPORTED_MODULE_72__after_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_73__before_js__ = __webpack_require__(446);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "before", function() { return __WEBPACK_IMPORTED_MODULE_73__before_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_74__once_js__ = __webpack_require__(910);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "once", function() { return __WEBPACK_IMPORTED_MODULE_74__once_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_75__findKey_js__ = __webpack_require__(447);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "findKey", function() { return __WEBPACK_IMPORTED_MODULE_75__findKey_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_76__findIndex_js__ = __webpack_require__(290);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "findIndex", function() { return __WEBPACK_IMPORTED_MODULE_76__findIndex_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_77__findLastIndex_js__ = __webpack_require__(449);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "findLastIndex", function() { return __WEBPACK_IMPORTED_MODULE_77__findLastIndex_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_78__sortedIndex_js__ = __webpack_require__(450);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "sortedIndex", function() { return __WEBPACK_IMPORTED_MODULE_78__sortedIndex_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_79__indexOf_js__ = __webpack_require__(451);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "indexOf", function() { return __WEBPACK_IMPORTED_MODULE_79__indexOf_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_80__lastIndexOf_js__ = __webpack_require__(911);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "lastIndexOf", function() { return __WEBPACK_IMPORTED_MODULE_80__lastIndexOf_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_81__find_js__ = __webpack_require__(453);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "find", function() { return __WEBPACK_IMPORTED_MODULE_81__find_js__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "detect", function() { return __WEBPACK_IMPORTED_MODULE_81__find_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_82__findWhere_js__ = __webpack_require__(912);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "findWhere", function() { return __WEBPACK_IMPORTED_MODULE_82__findWhere_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_83__each_js__ = __webpack_require__(107);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "each", function() { return __WEBPACK_IMPORTED_MODULE_83__each_js__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "forEach", function() { return __WEBPACK_IMPORTED_MODULE_83__each_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_84__map_js__ = __webpack_require__(131);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "map", function() { return __WEBPACK_IMPORTED_MODULE_84__map_js__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "collect", function() { return __WEBPACK_IMPORTED_MODULE_84__map_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_85__reduce_js__ = __webpack_require__(913);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "reduce", function() { return __WEBPACK_IMPORTED_MODULE_85__reduce_js__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "foldl", function() { return __WEBPACK_IMPORTED_MODULE_85__reduce_js__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "inject", function() { return __WEBPACK_IMPORTED_MODULE_85__reduce_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_86__reduceRight_js__ = __webpack_require__(914);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "reduceRight", function() { return __WEBPACK_IMPORTED_MODULE_86__reduceRight_js__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "foldr", function() { return __WEBPACK_IMPORTED_MODULE_86__reduceRight_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_87__filter_js__ = __webpack_require__(163);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "filter", function() { return __WEBPACK_IMPORTED_MODULE_87__filter_js__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "select", function() { return __WEBPACK_IMPORTED_MODULE_87__filter_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_88__reject_js__ = __webpack_require__(915);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "reject", function() { return __WEBPACK_IMPORTED_MODULE_88__reject_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_89__every_js__ = __webpack_require__(916);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "every", function() { return __WEBPACK_IMPORTED_MODULE_89__every_js__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "all", function() { return __WEBPACK_IMPORTED_MODULE_89__every_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_90__some_js__ = __webpack_require__(917);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "some", function() { return __WEBPACK_IMPORTED_MODULE_90__some_js__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "any", function() { return __WEBPACK_IMPORTED_MODULE_90__some_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_91__contains_js__ = __webpack_require__(164);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "contains", function() { return __WEBPACK_IMPORTED_MODULE_91__contains_js__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "includes", function() { return __WEBPACK_IMPORTED_MODULE_91__contains_js__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "include", function() { return __WEBPACK_IMPORTED_MODULE_91__contains_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_92__invoke_js__ = __webpack_require__(918);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "invoke", function() { return __WEBPACK_IMPORTED_MODULE_92__invoke_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_93__pluck_js__ = __webpack_require__(291);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "pluck", function() { return __WEBPACK_IMPORTED_MODULE_93__pluck_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_94__where_js__ = __webpack_require__(919);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "where", function() { return __WEBPACK_IMPORTED_MODULE_94__where_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_95__max_js__ = __webpack_require__(455);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "max", function() { return __WEBPACK_IMPORTED_MODULE_95__max_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_96__min_js__ = __webpack_require__(920);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "min", function() { return __WEBPACK_IMPORTED_MODULE_96__min_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_97__shuffle_js__ = __webpack_require__(921);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "shuffle", function() { return __WEBPACK_IMPORTED_MODULE_97__shuffle_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_98__sample_js__ = __webpack_require__(456);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "sample", function() { return __WEBPACK_IMPORTED_MODULE_98__sample_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_99__sortBy_js__ = __webpack_require__(922);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "sortBy", function() { return __WEBPACK_IMPORTED_MODULE_99__sortBy_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_100__groupBy_js__ = __webpack_require__(923);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "groupBy", function() { return __WEBPACK_IMPORTED_MODULE_100__groupBy_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_101__indexBy_js__ = __webpack_require__(924);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "indexBy", function() { return __WEBPACK_IMPORTED_MODULE_101__indexBy_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_102__countBy_js__ = __webpack_require__(925);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "countBy", function() { return __WEBPACK_IMPORTED_MODULE_102__countBy_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_103__partition_js__ = __webpack_require__(926);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "partition", function() { return __WEBPACK_IMPORTED_MODULE_103__partition_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_104__toArray_js__ = __webpack_require__(927);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "toArray", function() { return __WEBPACK_IMPORTED_MODULE_104__toArray_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_105__size_js__ = __webpack_require__(928);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "size", function() { return __WEBPACK_IMPORTED_MODULE_105__size_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_106__pick_js__ = __webpack_require__(457);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "pick", function() { return __WEBPACK_IMPORTED_MODULE_106__pick_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_107__omit_js__ = __webpack_require__(930);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "omit", function() { return __WEBPACK_IMPORTED_MODULE_107__omit_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_108__first_js__ = __webpack_require__(931);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "first", function() { return __WEBPACK_IMPORTED_MODULE_108__first_js__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "head", function() { return __WEBPACK_IMPORTED_MODULE_108__first_js__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "take", function() { return __WEBPACK_IMPORTED_MODULE_108__first_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_109__initial_js__ = __webpack_require__(458);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "initial", function() { return __WEBPACK_IMPORTED_MODULE_109__initial_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_110__last_js__ = __webpack_require__(932);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "last", function() { return __WEBPACK_IMPORTED_MODULE_110__last_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_111__rest_js__ = __webpack_require__(459);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "rest", function() { return __WEBPACK_IMPORTED_MODULE_111__rest_js__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "tail", function() { return __WEBPACK_IMPORTED_MODULE_111__rest_js__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "drop", function() { return __WEBPACK_IMPORTED_MODULE_111__rest_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_112__compact_js__ = __webpack_require__(933);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "compact", function() { return __WEBPACK_IMPORTED_MODULE_112__compact_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_113__flatten_js__ = __webpack_require__(934);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "flatten", function() { return __WEBPACK_IMPORTED_MODULE_113__flatten_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_114__without_js__ = __webpack_require__(935);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "without", function() { return __WEBPACK_IMPORTED_MODULE_114__without_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_115__uniq_js__ = __webpack_require__(461);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "uniq", function() { return __WEBPACK_IMPORTED_MODULE_115__uniq_js__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "unique", function() { return __WEBPACK_IMPORTED_MODULE_115__uniq_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_116__union_js__ = __webpack_require__(936);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "union", function() { return __WEBPACK_IMPORTED_MODULE_116__union_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_117__intersection_js__ = __webpack_require__(937);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "intersection", function() { return __WEBPACK_IMPORTED_MODULE_117__intersection_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_118__difference_js__ = __webpack_require__(460);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "difference", function() { return __WEBPACK_IMPORTED_MODULE_118__difference_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_119__unzip_js__ = __webpack_require__(462);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "unzip", function() { return __WEBPACK_IMPORTED_MODULE_119__unzip_js__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "transpose", function() { return __WEBPACK_IMPORTED_MODULE_119__unzip_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_120__zip_js__ = __webpack_require__(938);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "zip", function() { return __WEBPACK_IMPORTED_MODULE_120__zip_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_121__object_js__ = __webpack_require__(939);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "object", function() { return __WEBPACK_IMPORTED_MODULE_121__object_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_122__range_js__ = __webpack_require__(940);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "range", function() { return __WEBPACK_IMPORTED_MODULE_122__range_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_123__chunk_js__ = __webpack_require__(941);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "chunk", function() { return __WEBPACK_IMPORTED_MODULE_123__chunk_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_124__mixin_js__ = __webpack_require__(942);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "mixin", function() { return __WEBPACK_IMPORTED_MODULE_124__mixin_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_125__underscore_array_methods_js__ = __webpack_require__(943);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return __WEBPACK_IMPORTED_MODULE_125__underscore_array_methods_js__["a"]; });
// Named Exports
// =============
 
//     Underscore.js 1.13.1
//     https://underscorejs.org
//     (c) 2009-2021 Jeremy Ashkenas, Julian Gonggrijp, and DocumentCloud and Investigative Reporters & Editors
//     Underscore may be freely distributed under the MIT license.
 
// Baseline setup.
 
 
 
// Object Functions
// ----------------
// Our most fundamental functions operate on any JavaScript object.
// Most functions in Underscore depend on at least one function in this section.
 
// A group of functions that check the types of core JavaScript values.
// These are often informally referred to as the "isType" functions.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
// Functions that treat an object as a dictionary of key-value pairs.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
// Utility Functions
// -----------------
// A bit of a grab bag: Predicate-generating functions for use with filters and
// loops, string escaping and templating, create random numbers and unique ids,
// and functions that facilitate Underscore's chaining and iteration conventions.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
// Function (ahem) Functions
// -------------------------
// These functions take a function as an argument and return a new function
// as the result. Also known as higher-order functions.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
// Finders
// -------
// Functions that extract (the position of) a single element from an object
// or array based on some criterion.
 
 
 
 
 
 
 
 
 
// Collection Functions
// --------------------
// Functions that work on any collection of elements: either an array, or
// an object of key-value pairs.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
// `_.pick` and `_.omit` are actually object functions, but we put
// them here in order to create a more natural reading order in the
// monolithic build as they depend on `_.contains`.
 
 
 
// Array Functions
// ---------------
// Functions that operate on arrays (and array-likes) only, because they’re
// expressed in terms of operations on an ordered list of values.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
// OOP
// ---
// These modules support the "object-oriented" calling style. See also
// `underscore.js` and `index-default.js`.
 
 
 
 
/***/ }),
/* 278 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__tagTester_js__ = __webpack_require__(46);
 
 
/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__tagTester_js__["a" /* default */])('String'));
 
 
/***/ }),
/* 279 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__tagTester_js__ = __webpack_require__(46);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isFunction_js__ = __webpack_require__(64);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isArrayBuffer_js__ = __webpack_require__(420);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__stringTagBug_js__ = __webpack_require__(159);
 
 
 
 
 
var isDataView = Object(__WEBPACK_IMPORTED_MODULE_0__tagTester_js__["a" /* default */])('DataView');
 
// In IE 10 - Edge 13, we need a different heuristic
// to determine whether an object is a `DataView`.
function ie10IsDataView(obj) {
  return obj != null && Object(__WEBPACK_IMPORTED_MODULE_1__isFunction_js__["a" /* default */])(obj.getInt8) && Object(__WEBPACK_IMPORTED_MODULE_2__isArrayBuffer_js__["a" /* default */])(obj.buffer);
}
 
/* harmony default export */ __webpack_exports__["a"] = (__WEBPACK_IMPORTED_MODULE_3__stringTagBug_js__["a" /* hasStringTagBug */] ? ie10IsDataView : isDataView);
 
 
/***/ }),
/* 280 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__tagTester_js__ = __webpack_require__(46);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__has_js__ = __webpack_require__(95);
 
 
 
var isArguments = Object(__WEBPACK_IMPORTED_MODULE_0__tagTester_js__["a" /* default */])('Arguments');
 
// Define a fallback version of the method in browsers (ahem, IE < 9), where
// there isn't any inspectable "Arguments" type.
(function() {
  Iif (!isArguments(arguments)) {
    isArguments = function(obj) {
      return Object(__WEBPACK_IMPORTED_MODULE_1__has_js__["a" /* default */])(obj, 'callee');
    };
  }
}());
 
/* harmony default export */ __webpack_exports__["a"] = (isArguments);
 
 
/***/ }),
/* 281 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__shallowProperty_js__ = __webpack_require__(425);
 
 
// Internal helper to obtain the `byteLength` property of an object.
/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__shallowProperty_js__["a" /* default */])('byteLength'));
 
 
/***/ }),
/* 282 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = ie11fingerprint;
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return mapMethods; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return weakMapMethods; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return setMethods; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__getLength_js__ = __webpack_require__(65);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isFunction_js__ = __webpack_require__(64);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__allKeys_js__ = __webpack_require__(160);
 
 
 
 
// Since the regular `Object.prototype.toString` type tests don't work for
// some types in IE 11, we use a fingerprinting heuristic instead, based
// on the methods. It's not great, but it's the best we got.
// The fingerprint method lists are defined below.
function ie11fingerprint(methods) {
  var length = Object(__WEBPACK_IMPORTED_MODULE_0__getLength_js__["a" /* default */])(methods);
  return function(obj) {
    if (obj == null) return false;
    // `Map`, `WeakMap` and `Set` have no enumerable keys.
    var keys = Object(__WEBPACK_IMPORTED_MODULE_2__allKeys_js__["a" /* default */])(obj);
    if (Object(__WEBPACK_IMPORTED_MODULE_0__getLength_js__["a" /* default */])(keys)) return false;
    for (var i = 0; i < length; i++) {
      if (!Object(__WEBPACK_IMPORTED_MODULE_1__isFunction_js__["a" /* default */])(obj[methods[i]])) return false;
    }
    // If we are testing against `WeakMap`, we need to ensure that
    // `obj` doesn't have a `forEach` method in order to distinguish
    // it from a regular `Map`.
    return methods !== weakMapMethods || !Object(__WEBPACK_IMPORTED_MODULE_1__isFunction_js__["a" /* default */])(obj[forEachName]);
  };
}
 
// In the interest of compact minification, we write
// each string in the fingerprints only once.
var forEachName = 'forEach',
    hasName = 'has',
    commonInit = ['clear', 'delete'],
    mapTail = ['get', hasName, 'set'];
 
// `Map`, `WeakMap` and `Set` each have slightly different
// combinations of the above sublists.
var mapMethods = commonInit.concat(forEachName, mapTail),
    weakMapMethods = commonInit.concat(mapTail),
    setMethods = ['add'].concat(commonInit, forEachName, hasName);
 
 
/***/ }),
/* 283 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = createAssigner;
// An internal function for creating assigner functions.
function createAssigner(keysFunc, defaults) {
  return function(obj) {
    var length = arguments.length;
    if (defaults) obj = Object(obj);
    Iif (length < 2 || obj == null) return obj;
    for (var index = 1; index < length; index++) {
      var source = arguments[index],
          keys = keysFunc(source),
          l = keys.length;
      for (var i = 0; i < l; i++) {
        var key = keys[i];
        if (!defaults || obj[key] === void 0) obj[key] = source[key];
      }
    }
    return obj;
  };
}
 
 
/***/ }),
/* 284 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createAssigner_js__ = __webpack_require__(283);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__keys_js__ = __webpack_require__(41);
 
 
 
// Assigns a given object with all the own properties in the passed-in
// object(s).
// (https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/assign)
/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__createAssigner_js__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__keys_js__["a" /* default */]));
 
 
/***/ }),
/* 285 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = deepGet;
// Internal function to obtain a nested property in `obj` along `path`.
function deepGet(obj, path) {
  var length = path.length;
  for (var i = 0; i < length; i++) {
    Iif (obj == null) return void 0;
    obj = obj[path[i]];
  }
  return length ? obj : void 0;
}
 
 
/***/ }),
/* 286 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = identity;
// Keep the identity function around for default iteratees.
function identity(value) {
  return value;
}
 
 
/***/ }),
/* 287 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = property;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__deepGet_js__ = __webpack_require__(285);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__toPath_js__ = __webpack_require__(161);
 
 
 
// Creates a function that, when passed an object, will traverse that object’s
// properties down the given `path`, specified as an array of keys or indices.
function property(path) {
  path = Object(__WEBPACK_IMPORTED_MODULE_1__toPath_js__["a" /* default */])(path);
  return function(obj) {
    return Object(__WEBPACK_IMPORTED_MODULE_0__deepGet_js__["a" /* default */])(obj, path);
  };
}
 
 
/***/ }),
/* 288 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
// A (possibly faster) way to get the current timestamp as an integer.
/* harmony default export */ __webpack_exports__["a"] = (Date.now || function() {
  return new Date().getTime();
});
 
 
/***/ }),
/* 289 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = negate;
// Returns a negated version of the passed-in predicate.
function negate(predicate) {
  return function() {
    return !predicate.apply(this, arguments);
  };
}
 
 
/***/ }),
/* 290 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createPredicateIndexFinder_js__ = __webpack_require__(448);
 
 
// Returns the first index on an array-like that passes a truth test.
/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__createPredicateIndexFinder_js__["a" /* default */])(1));
 
 
/***/ }),
/* 291 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = pluck;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__map_js__ = __webpack_require__(131);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__property_js__ = __webpack_require__(287);
 
 
 
// Convenience version of a common use case of `_.map`: fetching a property.
function pluck(obj, key) {
  return Object(__WEBPACK_IMPORTED_MODULE_0__map_js__["a" /* default */])(obj, Object(__WEBPACK_IMPORTED_MODULE_1__property_js__["a" /* default */])(key));
}
 
 
/***/ }),
/* 292 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
exports.version = {
    lib: '2.10107.0',
    product: '2.10107.0',
    supportedApiVersion: 2
};
 
 
/***/ }),
/* 293 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var detector = __webpack_require__(469);
var cookieutils_1 = __webpack_require__(948);
exports.preferredStorage = null;
function getAvailableStorage() {
    Iif (exports.preferredStorage) {
        return exports.preferredStorage;
    }
    Eif (detector.hasLocalStorage()) {
        return localStorage;
    }
    if (detector.hasCookieStorage()) {
        return new CookieStorage();
    }
    if (detector.hasSessionStorage()) {
        return sessionStorage;
    }
    return new NullStorage();
}
exports.getAvailableStorage = getAvailableStorage;
var CookieStorage = (function () {
    function CookieStorage() {
    }
    CookieStorage.prototype.getItem = function (key) {
        return cookieutils_1.Cookie.get(key);
    };
    CookieStorage.prototype.removeItem = function (key) {
        cookieutils_1.Cookie.erase(key);
    };
    CookieStorage.prototype.setItem = function (key, data) {
        cookieutils_1.Cookie.set(key, data);
    };
    return CookieStorage;
}());
exports.CookieStorage = CookieStorage;
var NullStorage = (function () {
    function NullStorage() {
    }
    NullStorage.prototype.getItem = function (key) { return null; };
    NullStorage.prototype.removeItem = function (key) { };
    NullStorage.prototype.setItem = function (key, data) { };
    return NullStorage;
}());
exports.NullStorage = NullStorage;
 
 
/***/ }),
/* 294 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Globalize = __webpack_require__(28);
var merge = function (obj1, obj2) {
    var obj3 = {};
    for (var attrname in obj1) {
        obj3[attrname] = obj1[attrname];
    }
    for (var attrname in obj2) {
        obj3[attrname] = obj2[attrname];
    }
    return obj3;
};
var dict = {
    "box user": "User",
    "filetype_box user": "User",
    "html": "HTML File",
    "filetype_html": "HTML File",
    "wiki": "Wiki",
    "filetype_wiki": "Wiki",
    "webscraperwebpage": "Web Page",
    "filetype_webscraperwebpage": "Web Page",
    "image": "Image",
    "filetype_image": "Image",
    "folder": "Folder",
    "filetype_folder": "Folder",
    "txt": "Text",
    "filetype_txt": "Text",
    "zip": "Zip File",
    "filetype_zip": "Zip File",
    "olefile": "OLE file",
    "filetype_olefile": "OLE file",
    "gmailmessage": "Gmail Message",
    "filetype_gmailmessage": "Gmail Message",
    "pdf": "PDF File",
    "filetype_pdf": "PDF File",
    "swf": "Flash File",
    "filetype_swf": "Flash File",
    "xml": "XML File",
    "filetype_xml": "XML File",
    "vsd": "Visio",
    "filetype_vsd": "Visio",
    "svg": "SVG",
    "filetype_svg": "SVG",
    "svm": "Open Office",
    "filetype_svm": "Open Office",
    "rssitem": "RSS feed",
    "filetype_rssitem": "RSS feed",
    "doc": "Document",
    "filetype_doc": "Document",
    "docx": "Microsoft Word Document",
    "filetype_docx": "Microsoft Word Document",
    "xls": "Spreadsheet Document",
    "filetype_xls": "Spreadsheet Document",
    "ppt": "Presentation Document",
    "filetype_ppt": "Presentation Document",
    "video": "Video",
    "filetype_video": "Video",
    "youtube": "YouTube video",
    "filetype_youtube": "YouTube video",
    "saleforceitem": "Salesforce",
    "filetype_saleforceitem": "Salesforce",
    "dynamicscrmitem": "Dynamics CRM",
    "filetype_dynamicscrmitem": "Dynamics CRM",
    "salesforceitem": "Salesforce",
    "filetype_salesforceitem": "Salesforce",
    "odt": "Open Text Document",
    "filetype_odt": "Open Text Document",
    "box": "User",
    "filetype_box": "User",
    "jiraissue": "Jira Issue",
    "filetype_jiraissue": "Jira Issue",
    "cfpage": "Confluence Page",
    "filetype_cfpage": "Confluence Page",
    "cfcomment": "Confluence Comment",
    "filetype_cfcomment": "Confluence Comment",
    "cfspace": "Confluence Space",
    "filetype_cfspace": "Confluence Space",
    "cfblogentry": "Confluence Blog Entry",
    "filetype_cfblogentry": "Confluence Blog Entry",
    "confluencespace": "Confluence Space",
    "filetype_confluencespace": "Confluence Space",
    "exchangemessage": "Message",
    "filetype_exchangemessage": "Message",
    "exchangeappointment": "Appointment",
    "filetype_exchangeappointment": "Appointment",
    "exchangenote": "Note",
    "filetype_exchangenote": "Note",
    "exchangetask": "Task",
    "filetype_exchangetask": "Task",
    "exchangeperson": "Exchange User",
    "filetype_exchangeperson": "Exchange User",
    "activedirperson": "Active Directory User",
    "filetype_activedirperson": "Active Directory User",
    "exchangeactivity": "Activity",
    "filetype_exchangeactivity": "Activity",
    "exchangecalendarmessage": "Calendar Message",
    "filetype_exchangecalendarmessage": "Calendar Message",
    "exchangedocument": "Exchange Document",
    "filetype_exchangedocument": "Exchange Document",
    "exchangedsn": "DSN",
    "filetype_exchangedsn": "DSN",
    "exchangefreebusy": "Free/Busy",
    "filetype_exchangefreebusy": "Free/Busy",
    "exchangegroup": "Group",
    "filetype_exchangegroup": "Group",
    "exchangerssfeed": "RSS Feed",
    "filetype_exchangerssfeed": "RSS Feed",
    "exchangejunkmessage": "Junk Email",
    "filetype_exchangejunkmessage": "Junk Email",
    "exchangeofficecom": "Communications",
    "filetype_exchangeofficecom": "Communications",
    "lithiummessage": "Lithium Message",
    "filetype_lithiummessage": "Lithium Message",
    "lithiumthread": "Lithium Thread",
    "filetype_lithiumthread": "Lithium Thread",
    "lithiumboard": "Lithium Board",
    "filetype_lithiumboard": "Lithium Board",
    "lithiumcategory": "Lithium Category",
    "filetype_lithiumcategory": "Lithium Category",
    "lithiumcommunity": "Lithium Community",
    "filetype_lithiumcommunity": "Lithium Community",
    "people": "User",
    "objecttype_people": "User",
    "message": "Message",
    "objecttype_message": "Message",
    "feed": "RSS Feed",
    "objecttype_feed": "RSS Feed",
    "thread": "Thread",
    "objecttype_thread": "Thread",
    "file": "File",
    "objecttype_file": "File",
    "board": "Board",
    "objecttype_board": "Board",
    "category": "Category",
    "objecttype_category": "Category",
    "account": "Account",
    "objecttype_account": "Account",
    "annotation": "Note",
    "objecttype_annotation": "Note",
    "campaign": "Campaign",
    "objecttype_campaign": "Campaign",
    "case": "Case",
    "objecttype_case": "Case",
    "contact": "Contact",
    "objecttype_contact": "Contact",
    "contract": "Contract",
    "objecttype_contract": "Contract",
    "event": "Event",
    "objecttype_event": "Event",
    "email": "Email",
    "objecttype_email": "Email",
    "goal": "Goal",
    "objecttype_goal": "Goal",
    "incident": "Incident",
    "objecttype_incident": "Incident",
    "invoice": "Invoice",
    "objecttype_invoice": "Invoice",
    "lead": "Lead",
    "objecttype_lead": "Lead",
    "list": "List",
    "objecttype_list": "Marketing List",
    "solution": "Solution",
    "objecttype_solution": "Solution",
    "report": "Report",
    "objecttype_report": "Report",
    "task": "Task",
    "objecttype_task": "Task",
    "user": "User",
    "objecttype_user": "User",
    "attachment": "Attachment",
    "objecttype_attachment": "Attachment",
    "casecomment": "Case Comment",
    "objecttype_casecomment": "Case Comment",
    "opportunity": "Opportunity",
    "objecttype_opportunity": "Opportunity",
    "opportunityproduct": "Opportunity Product",
    "objecttype_opportunityproduct": "Opportunity Product",
    "feeditem": "Chatter",
    "objecttype_feeditem": "Chatter",
    "feedcomment": "Comment",
    "objecttype_feedcomment": "Comment",
    "note": "Note",
    "objecttype_note": "Note",
    "product": "Product",
    "objecttype_product": "Product",
    "partner": "Partner",
    "objecttype_partner": "Partner",
    "queueitem": "Queue Item",
    "objecttype_queueitem": "Queue Item",
    "quote": "Quote",
    "objecttype_quote": "Quote",
    "salesliterature": "Sales Literature",
    "objecttype_salesliterature": "Sales Literature",
    "salesorder": "Sales Order",
    "objecttype_salesorder": "Sales Order",
    "service": "Service",
    "objecttype_service": "Service",
    "socialprofile": "Social Profile",
    "objecttype_socialprofile": "Social Profile",
    "kbdocumentation": "Knowledge Document",
    "objecttype_kbdocumentation": "Knowledge Document",
    "kbtechnicalarticle": "Technical Documentation",
    "objecttype_kbtechnicalarticle": "Technical Documentation",
    "kbsolution": "Solution",
    "objecttype_kbsolution": "Solution",
    "kbknowledgearticle": "Knowledge Article",
    "objecttype_kbknowledgearticle": "Knowledge Article",
    "kbattachment": "Attachment",
    "objecttype_kbattachment": "Attachment",
    "kbarticle": "Article",
    "objecttype_kbarticle": "Article",
    "kbarticlecomment": "Article Comment",
    "objecttype_kbarticlecomment": "Article Comment",
    "knowledgearticle": "Knowledge Article",
    "objecttype_knowledgearticle": "Knowledge Article",
    "topic": "Topic",
    "objecttype_topic": "Topic",
    "dashboard": "Dashboard",
    "objecttype_dashboard": "Dashboard",
    "contentversion": "Document",
    "objecttype_contentversion": "Document",
    "collaborationgroup": "Collaboration group",
    "objecttype_collaborationgroup": "Collaboration group",
    "phonecall": "Phone call",
    "objecttype_phonecall": "Phone call",
    "appointment": "Appointment",
    "objecttype_appointment": "Appointment",
    "sn_hr_core_case": "HR Case",
    "filetype_sn_hr_core_case": "HR Case",
    "sc_cat_item": "Catalog Item",
    "filetype_sc_cat_item": "Catalog Item",
    "sn_customerservice_case": "Case",
    "filetype_sn_customerservice_case": "Case",
    "kb_social_qa_answer": "Answer",
    "filetype_kb_social_qa_answer": "Answer",
    "kb_social_qa_question": "Question",
    "filetype_kb_social_qa_question": "Question",
    "kb_social_qa_comment": "Comment",
    "filetype_kb_social_qa_comment": "Comment",
    "filetype_incident": "Incident",
    "kb_knowledge": "Knowledge Article",
    "filetype_kb_knowledge": "Knowledge Article",
    "spportal": "Portal",
    "filetype_spportal": "Portal",
    "spsite": "SharePoint Site",
    "filetype_spsite": "SharePoint Site",
    "spuserprofile": "SharePoint User",
    "filetype_spuserprofile": "SharePoint User",
    "sparea": "Area",
    "filetype_sparea": "Area",
    "spannouncement": "Announcement",
    "filetype_spannouncement": "Announcement",
    "spannouncementlist": "Announcements",
    "filetype_spannouncementlist": "Announcements",
    "spcontact": "Contact",
    "filetype_spcontact": "Contact",
    "spcontactlist": "Contacts",
    "filetype_spcontactlist": "Contacts",
    "spcustomlist": "Custom Lists",
    "filetype_spcustomlist": "Custom Lists",
    "spdiscussionboard": "Discussion Board",
    "filetype_spdiscussionboard": "Discussion Board",
    "spdiscussionboardlist": "Discussion Boards",
    "filetype_spdiscussionboardlist": "Discussion Boards",
    "spdocumentlibrarylist": "Document Library",
    "filetype_spdocumentlibrarylist": "Document Library",
    "spevent": "Event",
    "filetype_spevent": "Event",
    "speventlist": "Events",
    "filetype_speventlist": "Events",
    "spformlibrarylist": "Form Library",
    "filetype_spformlibrarylist": "Form Library",
    "spissue": "Issue",
    "filetype_spissue": "Issue",
    "spissuelist": "Issues",
    "filetype_spissuelist": "Issues",
    "splink": "Link",
    "filetype_splink": "Link",
    "splinklist": "Links",
    "filetype_splinklist": "Links",
    "sppicturelibrarylist": "Picture Library",
    "filetype_sppicturelibrarylist": "Picture Library",
    "spsurvey": "Survey",
    "filetype_spsurvey": "Survey",
    "spsurveylist": "Surveys",
    "filetype_spsurveylist": "Surveys",
    "sptask": "Task",
    "filetype_sptask": "Task",
    "sptasklist": "Tasks",
    "filetype_sptasklist": "Tasks",
    "spagenda": "Agenda",
    "filetype_spagenda": "Agenda",
    "spagendalist": "Agendas",
    "filetype_spagendalist": "Agendas",
    "spattendee": "Attendee",
    "filetype_spattendee": "Attendee",
    "spattendeelist": "Attendees",
    "filetype_spattendeelist": "Attendees",
    "spcustomgridlist": "Custom Grids",
    "filetype_spcustomgridlist": "Custom Grids",
    "spdecision": "Decision",
    "filetype_spdecision": "Decision",
    "spdecisionlist": "Decisions",
    "filetype_spdecisionlist": "Decisions",
    "spobjective": "Objective",
    "filetype_spobjective": "Objective",
    "spobjectivelist": "Objectives",
    "filetype_spobjectivelist": "Objectives",
    "sptextbox": "Textbox",
    "filetype_sptextbox": "Textbox",
    "sptextboxlist": "Textbox list",
    "filetype_sptextboxlist": "Textbox list",
    "spthingstobring": "Thing To Bring",
    "filetype_spthingstobring": "Thing To Bring",
    "spthingstobringlist": "Things To Bring",
    "filetype_spthingstobringlist": "Things To Bring",
    "sparealisting": "Area Listing",
    "filetype_sparealisting": "Area Listing",
    "spmeetingserie": "Meeting series",
    "filetype_spmeetingserie": "Meeting series",
    "spmeetingserielist": "Meeting Series List",
    "filetype_spmeetingserielist": "Meeting Series List",
    "spsitedirectory": "Site Directory Item",
    "filetype_spsitedirectory": "Site Directory Item",
    "spsitedirectorylist": "Site Directory",
    "filetype_spsitedirectorylist": "Site Directory",
    "spdatasource": "Data Source",
    "filetype_spdatasource": "Data Source",
    "spdatasourcelist": "Data Source List",
    "filetype_spdatasourcelist": "Data Source List",
    "splisttemplatecataloglist": "List Template Gallery",
    "filetype_splisttemplatecataloglist": "List Template Gallery",
    "spwebpartcataloglist": "WebPart Gallery",
    "filetype_spwebpartcataloglist": "WebPart Gallery",
    "spwebtemplatecataloglist": "Site Template Gallery",
    "filetype_spwebtemplatecataloglist": "Site Template Gallery",
    "spworkspacepagelist": "Workspace Pages",
    "filetype_spworkspacepagelist": "Workspace Pages",
    "spunknownlist": "Custom List",
    "filetype_spunknownlist": "Custom List",
    "spadministratortask": "Administrator Task",
    "filetype_spadministratortask": "Administrator Task",
    "spadministratortasklist": "Administrator Tasks",
    "filetype_spadministratortasklist": "Administrator Tasks",
    "spareadocumentlibrarylist": "Area Document Library",
    "filetype_spareadocumentlibrarylist": "Area Document Library",
    "spblogcategory": "Blog Category",
    "filetype_spblogcategory": "Blog Category",
    "spblogcategorylist": "Blog Categories",
    "filetype_spblogcategorylist": "Blog Categories",
    "spblogcomment": "Blog Comment",
    "filetype_spblogcomment": "Blog Comment",
    "spblogcommentlist": "Blog Comments",
    "filetype_spblogcommentlist": "Blog Comments",
    "spblogpost": "Blog Post",
    "filetype_spblogpost": "Blog Post",
    "spblogpostlist": "Blog Posts",
    "filetype_spblogpostlist": "Blog Posts",
    "spdataconnectionlibrarylist": "Data Connection Library",
    "filetype_spdataconnectionlibrarylist": "Data Connection Library",
    "spdistributiongroup": "Distribution Group",
    "filetype_spdistributiongroup": "Distribution Group",
    "spdistributiongrouplist": "Distribution Groups",
    "filetype_spdistributiongrouplist": "Distribution Groups",
    "spipfslist": "InfoPath Forms Servers",
    "filetype_spipfslist": "InfoPath Forms Servers",
    "spkeyperformanceindicator": "Key Performance Indicator",
    "filetype_spkeyperformanceindicator": "Key Performance Indicator",
    "spkeyperformanceindicatorlist": "Key Performance Indicators",
    "filetype_spkeyperformanceindicatorlist": "Key Performance Indicators",
    "splanguagesandtranslator": "Languages and Translator",
    "filetype_splanguagesandtranslator": "Languages and Translator",
    "splanguagesandtranslatorlist": "Languages and Translators",
    "filetype_splanguagesandtranslatorlist": "Languages and Translators",
    "spmasterpagescataloglist": "Master Page Gallery",
    "filetype_spmasterpagescataloglist": "Master Page Gallery",
    "spnocodeworkflowlibrarylist": "No-code Workflow Libraries",
    "filetype_spnocodeworkflowlibrarylist": "No-code Workflow Libraries",
    "spprojecttask": "Project Task",
    "filetype_spprojecttask": "Project Task",
    "spprojecttasklist": "Project Tasks",
    "filetype_spprojecttasklist": "Project Tasks",
    "sppublishingpageslibrarylist": "Page Library",
    "filetype_sppublishingpageslibrarylist": "Page Library",
    "spreportdocumentlibrarylist": "Report Document Library",
    "filetype_spreportdocumentlibrarylist": "Report Document Library",
    "spreportlibrarylist": "Report Library",
    "filetype_spreportlibrarylist": "Report Library",
    "spslidelibrarylist": "Slide Library",
    "filetype_spslidelibrarylist": "Slide Library",
    "sptab": "Tabs",
    "filetype_sptab": "Tabs",
    "sptablist": "Tabs List",
    "filetype_sptablist": "Tabs List",
    "sptranslationmanagementlibrarylist": "Translation Management Library",
    "filetype_sptranslationmanagementlibrarylist": "Translation Management Library",
    "spuserinformation": "User Information",
    "filetype_spuserinformation": "User Information",
    "spuserinformationlist": "User Information List",
    "filetype_spuserinformationlist": "User Information List",
    "spwikipagelibrarylist": "Wiki Page Library",
    "filetype_spwikipagelibrarylist": "Wiki Page Library",
    "spworkflowhistory": "Workflow History",
    "filetype_spworkflowhistory": "Workflow History",
    "spworkflowhistorylist": "Workflow History List",
    "filetype_spworkflowhistorylist": "Workflow History List",
    "spworkflowprocess": "Custom Workflow Process",
    "filetype_spworkflowprocess": "Custom Workflow Process",
    "spworkflowprocesslist": "Custom Workflow Processes",
    "filetype_spworkflowprocesslist": "Custom Workflow Processes",
    "sppublishingimageslibrarylist": "Publishing Image Library",
    "filetype_sppublishingimageslibrarylist": "Publishing Image Library",
    "spcirculation": "Circulation",
    "filetype_spcirculation": "Circulation",
    "spcirculationlist": "Circulations",
    "filetype_spcirculationlist": "Circulations",
    "spdashboardslibrarylist": "Dashboards Library",
    "filetype_spdashboardslibrarylist": "Dashboards Library",
    "spdataconnectionforperformancepointlibrarylist": "PerformancePoint Data Connection Library",
    "filetype_spdataconnectionforperformancepointlibrarylist": "PerformancePoint Data Connection Library",
    "sphealthreport": "Health Report",
    "filetype_sphealthreport": "Health Report",
    "sphealthreportlist": "Health Reports",
    "filetype_sphealthreportlist": "Health Reports",
    "sphealthrule": "Health Rule",
    "filetype_sphealthrule": "Health Rule",
    "sphealthrulelist": "Health Rules",
    "filetype_sphealthrulelist": "Health Rules",
    "spimedictionary": "IME Dictionary",
    "filetype_spimedictionary": "IME Dictionary",
    "spimedictionarylist": "IME Dictionaries",
    "filetype_spimedictionarylist": "IME Dictionaries",
    "spperformancepointcontent": "PerformancePoint Content",
    "filetype_spperformancepointcontent": "PerformancePoint Content",
    "spperformancepointcontentlist": "PerformancePoint Contents",
    "filetype_spperformancepointcontentlist": "PerformancePoint Contents",
    "spphonecallmemo": "Phone Call Memo",
    "filetype_spphonecallmemo": "Phone Call Memo",
    "spphonecallmemolist": "Phone Call Memos",
    "filetype_spphonecallmemolist": "Phone Call Memos",
    "sprecordlibrarylist": "Record Library",
    "filetype_sprecordlibrarylist": "Record Library",
    "spresource": "Resource",
    "filetype_spresource": "Resource",
    "spresourcelist": "Resources",
    "filetype_spresourcelist": "Resources",
    "spprocessdiagramslibrarylist": "Process Diagram Library",
    "filetype_spprocessdiagramslibrarylist": "Process Diagram Library",
    "spsitethemeslibrarylist": "Site Theme Library",
    "filetype_spsitethemeslibrarylist": "Site Theme Library",
    "spsolutionslibrarylist": "Solution Library",
    "filetype_spsolutionslibrarylist": "Solution Library",
    "spwfpublibrarylist": "WFPUB Library",
    "filetype_spwfpublibrarylist": "WFPUB Library",
    "spwhereabout": "Whereabout",
    "filetype_spwhereabout": "Whereabout",
    "spwhereaboutlist": "Whereabouts",
    "filetype_spwhereaboutlist": "Whereabouts",
    "spdocumentlink": "Link to a Document",
    "filetype_spdocumentlink": "Link to a Document",
    "spdocumentset": "Document Set",
    "filetype_spdocumentset": "Document Set",
    "spmicrofeedpost": "Microfeed Post",
    "filetype_spmicrofeedpost": "Microfeed Post",
    "spmicrofeedlist": "Microfeed",
    "filetype_spmicrofeedlist": "Microfeed",
    "splistfolder": "List Folder",
    "filetype_splistfolder": "List Folder",
    "slackmessage": "Slack Message",
    "filetype_slackmessage": "Slack Message",
    "slackchannel": "Slack Channel",
    "filetype_slackchannel": "Slack Channel",
    "slackfile": "Slack File",
    "filetype_slackfile": "Slack File",
    "slackuser": "Slack User",
    "filetype_slackuser": "Slack User",
    "youtubevideo": "YouTube video",
    "filetype_youtubevideo": "YouTube video",
    "youtubeplaylistitem": "YouTube playlist item",
    "filetype_youtubeplaylistitem": "YouTube playlist item",
    "youtubeplaylist": "YouTube playlist",
    "filetype_youtubeplaylist": "YouTube playlist",
    "Unknown": "Unknown",
    "And": "AND",
    "Authenticating": "Authenticating {0}...",
    "Clear": "Clear {0}",
    "CompleteQuery": "Complete query",
    "Exclude": "Exclude {0}",
    "EnterTag": "Add Tag",
    "Next": "Next",
    "Last": "Last",
    "Link": "Link",
    "Or": "OR",
    "Previous": "Previous",
    "QueryDidntMatchAnyDocuments": "Your query did not match any documents.",
    "QueryException": "Your query has an error: {0}.",
    "Me": "Me",
    "Remove": "Remove",
    "Search": "Search",
    "SearchFor": "Search for {0}",
    "SubmitSearch": "Submit search",
    "ShareQuery": "Share Query",
    "Preferences": "Preferences",
    "LinkOpeningSettings": "Link opening settings",
    "Reauthenticate": "Reauthenticate {0}",
    "ResultsFilteringExpression": "Result filtering expressions",
    "FiltersInYourPreferences": "Filters in your preferences",
    "Create": "Create",
    "SearchIn": "Search in {0}",
    "Seconds": "in {0} second<pl>s</pl>",
    "ShowingResultsOf": "Result<pl>s</pl> {0}<pl>-{1}</pl> of {2}",
    "ShowingResultsOfWithQuery": "Result<pl>s</pl> {0}<pl>-{1}</pl> of {2} for {3}",
    "SwitchTo": "Switch to {0}",
    "Unexclude": "Remove exclusion filter on {0}",
    "ClearAllFilters": "Clear All Filters",
    "SkipLogin": "Skip login",
    "LoginInProgress": "Login in progress, please wait ...",
    "Login": "Log In",
    "GetStarted": "Get Started",
    "More": "More",
    "NMore": "{0} more...",
    "Less": "Fewer",
    "Settings": "Settings",
    "Score": "Score",
    "ScoreDescription": "The score is computed from the number of occurrences as well as from the position in the result set.",
    "Occurrences": "Occurrences",
    "OccurrencesDescription": "Sort by number of occurrences, with values having the highest number appearing first.",
    "Label": "Label",
    "Of": "of",
    "LabelDescription": "Sort alphabetically on the field values.",
    "Value": "Value",
    "ValueDescription": "Sort on the values of the first computed field",
    "AlphaAscending": "Value Ascending",
    "AlphaDescending": "Value Descending",
    "ChiSquare": "Chi Square",
    "Nosort": "No Sort",
    "NosortDescription": "Do not sort the values. The values will be returned in a random order.",
    "RelativeFrequency": "Relative Frequency",
    "RelativeFrequencyDescription": "Sort based on the relative frequency of values. Less common values will appear higher.",
    "DateDistribution": "Date distribution",
    "Custom": "Custom",
    "CustomDescription": "Sort based on a custom order",
    "ComputedField": "Computed Field",
    "Ascending": "Ascending",
    "Descending": "Descending",
    "noResultFor": "No results for {0}",
    "noResult": "No results",
    "autoCorrectedQueryTo": "Query was automatically corrected to {0}",
    "didYouMean": "Did you mean: {0}",
    "SuggestedResults": "Suggested Results",
    "SuggestedQueries": "Suggested Queries",
    "MostRelevantItems": "Most relevant items:",
    "AllItems": "All items:",
    "ShowLess": "Show less",
    "ShowMore": "Show more",
    "HideFacet": "Hide Facet",
    "ShowFacet": "Show Facet",
    "AndOthers": "and {0} other<pl>s</pl>",
    "Others": "{0} other<pl>s</pl>",
    "MostRelevantPosts": "Most Relevant Posts:",
    "CompleteThread": "Complete Thread:",
    "ShowCompleteThread": "Show Complete Thread",
    "ShowOnlyTopMatchingPosts": "Show Only Top Matching Posts",
    "MostRelevantReplies": "Most Relevant Replies:",
    "AllConversation": "All Conversation:",
    "ShowAllConversation": "Show All Conversation",
    "ShowAllReplies": "Show All Replies",
    "ShowOnlyMostRelevantReplies": "Show Only Most Relevant Replies",
    "Close": "Close",
    "Open": "Open",
    "OpenInOutlookWhenPossible": "Open in Outlook (when possible)",
    "AlwaysOpenInNewWindow": "Always open results in new window",
    "Quickview": "Quick View",
    "NoQuickview": "The Quick View for this document is unavailable",
    "ErrorReport": "Error Report",
    "OopsError": "Something went wrong.",
    "ProblemPersists": "If the problem persists contact the administrator.",
    "GoBack": "Go Back",
    "Reset": "Reset",
    "Retry": "Retry",
    "MoreInfo": "More Information",
    "Username": "Username",
    "Password": "Password",
    "PostedBy": "Posted by",
    "CannotConnect": "Cannot connect to the server address.",
    "BadUserPass": "Password does not match with username.",
    "PleaseEnterYourCredentials": "Please enter your credentials for {0}.",
    "PleaseEnterYourSearchPage": "Please enter your search page URL",
    "Collapse": "Collapse",
    "Collapsable": "Collapsible",
    "Expand": "Expand",
    "CollapseFacet": "Collapse {0} facet",
    "ExpandFacet": "Expand {0} facet",
    "ShowLessFacetResults": "Show fewer results for {0} facet",
    "ShowMoreFacetResults": "Show more results for {0} facet",
    "ShowLessCategoryResults": "Show fewer results for the {0} category",
    "ShowMoreCategoryResults": "Show more results for the {0} category",
    "ShowLessHierarchicalResults": "Show fewer results for the {0} facet",
    "ShowMoreHierarchicalResults": "Show more results for the {0} facet",
    "SearchFacetResults": "Search for values in {0} facet",
    "Today": "Today",
    "Yesterday": "Yesterday",
    "Tomorrow": "Tomorrow",
    "Duration": "Duration: {0}",
    "IndexDuration": "Index Duration: {0}",
    "ProxyDuration": "Proxy Duration: {0}",
    "ClientDuration": "Client Duration: {0}",
    "Unavailable": "Unavailable",
    "Reply": "Reply",
    "ReplyAll": "Reply All",
    "Forward": "Forward",
    "From": "From",
    "Caption": "Caption",
    "Expression": "Expression",
    "Tab": "Tab",
    "Tabs": "Tabs",
    "EnterExpressionName": "Enter expression name",
    "EnterExpressionToFilterWith": "Enter expression to filter results with",
    "SelectTab": "Select Tab",
    "SelectAll": "Select All",
    "PageUrl": "Search page URL",
    "ErrorSavingToDevice": "Error while saving the information to your device",
    "ErrorReadingFromDevice": "Error while reading the information from your device",
    "AppIntro": "Speak with a product specialist who can answer your questions about Coveo and help you decide which Coveo solution is right for you. Or, try a live demo !",
    "TryDemo": "Try the demo",
    "ContactUs": "Contact us",
    "NewToCoveo": "New to Coveo?",
    "LetUsHelpGetStarted": "Let us help you get started",
    "LikesThis": "{0} like<sn>s</sn> this.",
    "CannotConnectSearchPage": "Cannot connect to your search page",
    "AreYouSureDeleteFilter": "Are you sure you want to delete the filter {0} with the expression {1}",
    "OnlineHelp": "Online Help",
    "Done": "Done",
    "SaveFacetState": "Save this facet state",
    "ClearFacetState": "Clear facet state",
    "DisplayingTheOnlyMessage": "Displaying the only message in this conversation",
    "NoNetworkConnection": "No network connection",
    "UnknownConnection": "Unknown connection",
    "EthernetConnection": "Ethernet connection",
    "WiFi": "WiFi connection",
    "CELL": "Cellular connection",
    "CELL_2G": "Cellular 2G connection",
    "CELL_3G": "Cellular 3G connection",
    "CELL_4G": "Cellular 4G connection",
    "Relevance": "Relevance",
    "Date": "Date",
    "Amount": "Amount",
    "QueryExceptionNoException": "No exception",
    "QueryExceptionInvalidSyntax": "Invalid syntax",
    "QueryExceptionInvalidCustomField": "Invalid custom field",
    "QueryExceptionInvalidDate": "Invalid date",
    "QueryExceptionInvalidExactPhrase": "Invalid exact phrase",
    "QueryExceptionInvalidDateOp": "Invalid date operator",
    "QueryExceptionInvalidNear": "Invalid NEAR operator",
    "QueryExceptionInvalidWeightedNear": "Invalid weighted NEAR",
    "QueryExceptionInvalidTerm": "Invalid term",
    "QueryExceptionTooManyTerms": "Too many terms",
    "QueryExceptionWildcardTooGeneral": "Wildcard too general",
    "QueryExceptionInvalidSortField": "Invalid sort field",
    "QueryExceptionInvalidSmallStringOp": "Invalid small string operator",
    "QueryExceptionRequestedResultsMax": "Requested results maximum",
    "QueryExceptionAggregatedMirrorDead": "Aggregated mirror is offline",
    "QueryExceptionAggregatedMirrorQueryTimeOut": "Aggregated mirror query timeout",
    "QueryExceptionAggregatedMirrorInvalidBuildNumber": "Aggregated mirror invalid build number",
    "QueryExceptionAggregatedMirrorCannotConnect": "Aggregated mirror cannot connect",
    "QueryExceptionNotEnoughLeadingCharsWildcard": "Not enough leading character wildcard",
    "QueryExceptionSecurityInverterNotFound": "Security inverter not found",
    "QueryExceptionSecurityInverterAccessDenied": "Security inverter access denied",
    "QueryExceptionAggregatedMirrorCannotImpersonate": "Aggregated mirror cannot impersonate",
    "QueryExceptionUnexpected": "Unexpected",
    "QueryExceptionAccessDenied": "Access denied",
    "QueryExceptionSuperUserTokenInvalid": "Super user token invalid",
    "QueryExceptionSuperUserTokenExpired": "Super user token is expired",
    "QueryExceptionLicenseQueriesExpired": "Queries license expired",
    "QueryExceptionLicenseSuperUserTokenNotSupported": "License super user token not supported",
    "QueryExceptionInvalidSession": "Invalid session",
    "QueryExceptionInvalidDocument": "Invalid document",
    "QueryExceptionSearchDisabled": "Search disabled",
    "FileType": "File type",
    "ShowAttachment": "Show attachment",
    "OnFeed": "on {0}'s feed.",
    "Author": "Author",
    "NoTitle": "No title",
    "CurrentSelections": "Current selections",
    "AllContent": "All content",
    "CancelLastAction": "Cancel last action",
    "SearchTips": "Search tips",
    "CheckSpelling": "Check the spelling of your keywords.",
    "TryUsingFewerKeywords": "Try using fewer, different or more general keywords.",
    "SelectFewerFilters": "Select fewer filters to broaden your search.",
    "Document": "Document",
    "Time": "Time",
    "StartDate": "Start Date",
    "StartTime": "Start Time",
    "DurationTitle": "Duration",
    "UserQuery": "User query",
    "ShowUserActions": "Show User Actions",
    "NoData": "No data available",
    "EventType": "Event type",
    "GoToFullSearch": "Full search",
    "GoToEdition": "Customize Panel",
    "RemoveContext": "Remove context",
    "BoxAttachToCase": "Attach to case",
    "AttachToCase": "Attach to case",
    "Attach": "Attach",
    "Attached": "Attached",
    "Detach": "Detach",
    "Details": "Details",
    "AdditionalFilters": "Additional filters",
    "SelectNonContextualSearch": "Remove the context from the current record to broaden your search",
    "CopyPasteToSupport": "Copy paste this message to the Coveo Support team for more information.",
    "FollowQueryDescription": "Alert me for changes to the search results of this query.",
    "SearchAlerts_Panel": "Manage Alerts",
    "SearchAlerts_PanelDescription": "View and manage your search alerts.",
    "SearchAlerts_PanelNoSearchAlerts": "You have no subscriptions.",
    "SearchAlerts_Fail": "The Search Alerts service is currently unavailable.",
    "SearchAlerts_Type": "Type",
    "SearchAlerts_Content": "Content",
    "SearchAlerts_Actions": "Action",
    "EmptyQuery": "<empty>",
    "SearchAlerts_Type_followQuery": "Query",
    "SearchAlerts_Type_followDocument": "Item",
    "SearchAlerts_unFollowing": "Stop Following",
    "SearchAlerts_follow": "Follow",
    "SearchAlerts_followed": "Followed",
    "SearchAlerts_followQuery": "Follow Query",
    "Subscription_StopFollowingQuery": "Stop Following Query",
    "SearchAlerts_Frequency": "When",
    "SubscriptionsManageSubscriptions": "Manage Alerts",
    "SubscriptionsMessageFollowQuery": "You will receive alerts when the query <b>{0}</b> returns new or updated items.",
    "SubscriptionsMessageFollow": "You will receive alerts for changes to the item <b>{0}</b>.",
    "Expiration": "Expiration",
    "Monthly": "Monthly",
    "Daily": "Daily",
    "Monday": "Monday",
    "Tuesday": "Tuesday",
    "Wednesday": "Wednesday",
    "Thursday": "Thursday",
    "Friday": "Friday",
    "Saturday": "Saturday",
    "Sunday": "Sunday",
    "NextDay": "Next {0}",
    "LastDay": "Last {0}",
    "StartTypingCaseForSuggestions": "Describe your problem to see possible solutions",
    "ExportToExcel": "Export to Excel",
    "ExportToExcelDescription": "Export search results to Excel",
    "CaseCreationNoResults": "No recommended solutions were found",
    "SortBy": "Sort by",
    "BoxCreateArticle": "Create Article",
    "Facets": "Facets",
    "AdvancedSearch": "Advanced Search",
    "Keywords": "Keywords",
    "AllTheseWords": "All these words",
    "ExactPhrase": "This exact phrase",
    "AnyOfTheseWords": "Any of these words",
    "NoneOfTheseWords": "None of these words",
    "Anytime": "Anytime",
    "InTheLast": "In the last",
    "Days": "days",
    "Months": "months",
    "Month": "Month",
    "Year": "Year",
    "Between": "Between",
    "Language": "Language",
    "Size": "Size",
    "AtLeast": "at least",
    "AtMost": "at most",
    "Contains": "contains",
    "DoesNotContain": "does not contain",
    "Matches": "matches",
    "Bytes": "bytes",
    "card": "Card",
    "table": "Table",
    "ResultLinks": "Result links",
    "EnableQuerySyntax": "Enable query syntax",
    "On": "On",
    "Off": "Off",
    "Automatic": "Automatic",
    "ResultsPerPage": "Results per page",
    "PreviousMonth": "Previous month",
    "NextMonth": "Next month",
    "Title": "Title",
    "FiltersInAdvancedSearch": "Filters in Advanced Search",
    "NoEndpoints": "{0} has no registered endpoints.",
    "InvalidToken": "The token used is invalid.",
    "AddSources": "You will need to add sources in your index, or wait for the created sources to finish indexing.",
    "TryAgain": "Please try again.",
    "CoveoOnlineHelp": "Coveo Online Help",
    "CannotAccess": "{0} cannot be accessed.",
    "CoveoOrganization": "Coveo Organization",
    "SearchAPIDuration": "Search API Duration: {0}",
    "LastUpdated": "Last updated",
    "AllDates": "All dates",
    "WithinLastDay": "Within last day",
    "WithinLastWeek": "Within last week",
    "WithinLastMonth": "Within last month",
    "WithinLastYear": "Within last year",
    "RelevanceInspector": "Relevance Inspector",
    "KeywordInCategory": "{0} <span class=\"coveo-omnibox-suggestion-category\">in {1}</span>",
    "Result": "Result",
    "ResultCount": "{0} result<pl>s</pl>",
    "ShowingResults": "{0} result<pl>s</pl>",
    "ShowingResultsWithQuery": "{0} result<pl>s</pl> for {1}",
    "NumberOfVideos": "Number of videos",
    "AllCategories": "All Categories",
    "Recommended": "Recommended",
    "Featured": "Featured",
    "CoveoHomePage": "Coveo Home page",
    "SizeValue": "Size value",
    "UnitMeasurement": "Unit of measurement",
    "Toggle": "Toggle",
    "FilterOn": "Filter on {0}",
    "RemoveFilterOn": "Remove inclusion filter on {0}",
    "Enter": "Enter",
    "InsertAQuery": "Insert a query",
    "PressEnterToSend": "Press enter to send",
    "SortResultsBy": "Sort results by {0}",
    "SortResultsByAscending": "Sort by {0} in ascending order",
    "SortResultsByDescending": "Sort by {0} in descending order",
    "DisplayResultsAs": "Display results as {0}",
    "FacetTitle": "{0} facet",
    "IncludeValueWithResultCount": "Inclusion filter on {0}; {1}",
    "ExcludeValueWithResultCount": "Exclusion filter on {0}; {1}",
    "PageNumber": "Page {0}",
    "DisplayResultsPerPage": "Display {0} results per page",
    "GroupByAndFacetRequestsCannotCoexist": "The query is invalid because it contains both Group By and Facet requests. Ensure that the search interface does not initialize DynamicFacet components alongside Facet components (or alongside any component extending the Facet component, such as FacetRange or FacetSlider).",
    "MustContain": "Must contain:",
    "Missing": "Missing:",
    "Filters": "Filters",
    "FiltersDropdown": "Filters dropdown",
    "OpenFiltersDropdown": "Open the filters dropdown",
    "CloseFiltersDropdown": "Close the filters dropdown",
    "NoValuesFound": "No values found.",
    "To": "to",
    "DeselectFilterValues": "Deselect all active filters on {0} field",
    "Rated": "Rated {0} out of {1} star<pl>s</pl>",
    "RatedBy": "by {0} user<pl>s</pl>",
    "NoRatings": "No ratings",
    "Pagination": "Pagination",
    "ThumbnailOf": "Thumbnail of \"{0}\"",
    "CollapsedUriParts": "Collapsed URI parts",
    "HierarchicalFacetValueIndentedUnder": "{0} under {1}",
    "HierarchicalFacetValuePathPrefix": "in",
    "UsefulnessFeedbackRequest": "Was this useful?",
    "UsefulnessFeedbackThankYou": "Thanks for your feedback!",
    "UsefulnessFeedbackExplainWhy": "Explain why",
    "UsefulnessFeedbackExplainWhyImperative": "Explain why",
    "UsefulnessFeedbackDoesNotAnswer": "This didn't answer my question at all",
    "UsefulnessFeedbackPartiallyAnswers": "This only partially answered my question",
    "UsefulnessFeedbackWasNotAQuestion": "My request wasn't meant to be perceived as a question",
    "Yes": "Yes",
    "No": "No",
    "Other": "Other",
    "Send": "Send",
    "Edit": "Edit",
    "Delete": "Delete",
    "Save": "Save",
    "UsefulnessFeedbackReason": "Reason",
    "AnswerSnippet": "Answer to your question",
    "AnswerSpecificSnippet": "Answer to \"{0}\"",
    "SuggestedQuestions": "People also ask",
    "ExpandQuestionAnswer": "View answer for \"{0}\"",
    "MoreValuesAvailable": "additional values are available",
    "Breadcrumb": "Active filters",
    "OrganizationIsPaused": "Your Coveo organization is paused due to inactivity and search is currently unavailable.",
    "OrganizationWillResume": "Your organization is resuming and will be available shortly.",
    "UpdatingResults": "Updating results",
    "QuerySuggestionsAvailable": "{0} search suggestion<pl>s are</pl> available.",
    "QuerySuggestionsUnavailable": "There are no search suggestions.",
};
function defaultLanguage() {
    var locales = String["locales"] || (String["locales"] = {});
    locales["en"] = merge(locales["en"], dict);
    String["toLocaleString"].call(this, { "en": dict });
    String["locale"] = "en";
    String["defaultLocale"] = "en";
    Globalize.culture("en");
}
exports.defaultLanguage = defaultLanguage;
function setLanguageAfterPageLoaded() {
    var locales = String["locales"] || (String["locales"] = {});
    locales["en"] = merge(locales["en"], dict);
    String["toLocaleString"].call(this, { "en": dict });
    String["locale"] = "en";
    String["defaultLocale"] = "en";
    Globalize.culture("en");
}
exports.setLanguageAfterPageLoaded = setLanguageAfterPageLoaded;
 
 
/***/ }),
/* 295 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var ExternalModulesShim_1 = __webpack_require__(39);
var _ = __webpack_require__(1);
String.toLocaleString = ExternalModulesShim_1.LocaleString;
var pluralRegex = /<pl>(((?!<\/pl>).)*)<\/pl>/g;
var singularRegex = /<sn>(((?!<\/sn>).)*)<\/sn>/g;
exports.L10N = {
    format: function (key) {
        var args = [];
        for (var _i = 1; _i < arguments.length; _i++) {
            args[_i - 1] = arguments[_i];
        }
        var value = key.toLocaleString();
        // Try to find a soft match
        // These conditions check if there was a change in the string (meaning toLocaleString found a match). If there was no
        // match, try another format.
        if (value == key) {
            var tryTranslationInUpperCase = key.toUpperCase().toLocaleString();
            var tryTranslationInLowerCase = key.toLowerCase().toLocaleString();
            var tryTranslationAfterCapitalization = (key.charAt(0).toUpperCase() + key.toLowerCase().slice(1)).toLocaleString();
            Iif (tryTranslationInUpperCase != key.toUpperCase().toLocaleString()) {
                value = tryTranslationInUpperCase;
            }
            else Iif (tryTranslationInLowerCase != key.toLowerCase().toLocaleString()) {
                value = tryTranslationInLowerCase;
            }
            else if (tryTranslationAfterCapitalization != key.charAt(0).toUpperCase() + key.toLowerCase().slice(1)) {
                value = tryTranslationAfterCapitalization;
            }
        }
        if (args.length > 0) {
            var last = _.last(args);
            // Last argument is either the count or a boolean forcing plural (true) or singular (false)
            if (_.isBoolean(last) || _.isNumber(last)) {
                args.pop();
                value = exports.L10N.formatPlSn(value, last);
            }
            _.each(args, function (arg, i) { return (value = value.replace("{" + i + "}", arg)); });
        }
        else {
            // If there was no parameters passed, we try to cleanup the possible parameters in the translated string.
            value = value.replace(/{[0-9]}|<pl>[a-zA-Z]+<\/pl>|<sn>|<\/sn>/g, '').trim();
        }
        return value;
    },
    formatPlSn: function (value, count) {
        var isPlural = _.isBoolean(count) ? count : count > 1;
        if (isPlural) {
            value = value.replace(pluralRegex, '$1').replace(singularRegex, '');
        }
        else {
            value = value.replace(pluralRegex, '').replace(singularRegex, '$1');
        }
        return value;
    }
};
 
 
/***/ }),
/* 296 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var DebugEvents = /** @class */ (function () {
    function DebugEvents() {
    }
    DebugEvents.showDebugPanel = 'showDebugPanel';
    return DebugEvents;
}());
exports.DebugEvents = DebugEvents;
 
 
/***/ }),
/* 297 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
/**
 * The `DistanceEvents` static class contains the string definitions of all events related to distance
 * list.
 *
 * See [Events](https://docs.coveo.com/en/417/).
 */
var DistanceEvents = /** @class */ (function () {
    function DistanceEvents() {
    }
    /**
     * Triggered when the [`DistanceResources`]{@link DistanceResources} component successfully resolves the position.
     *
     * All `onPositionResolved` event handlers receive a [`PositionResolvedEventArgs`]{@link IPositionResolvedEventArgs}
     * object as an argument.
     *
     * @type {string} The string value is `onPositionResolved`.
     */
    DistanceEvents.onPositionResolved = 'onPositionResolved';
    /**
     * Triggered when the [`DistanceResources`]{@link DistanceResources} component tries to resolve the position.
     *
     * All `onResolvingPosition` event handlers receive a
     * [`ResolvingPositionEventArgs`]{@link IResolvingPositionEventArgs} object as an argument.
     *
     * **Note:**
     * > You should bind a handler to this event if you want to register one or several new position providers.
     *
     * @type {string} The string value is `onResolvingPosition`.
     */
    DistanceEvents.onResolvingPosition = 'onResolvingPosition';
    /**
     * Triggered when the [`DistanceResources`]{@link DistanceResources} component fails to resolve the position.
     *
     * **Note:**
     * > You should bind a handler to this event if you want to display an error message to the end user, or hide
     * > components that cannot be used.
     *
     * @type {string} The string value is `onPositionNotResolved`.
     */
    DistanceEvents.onPositionNotResolved = 'onPositionNotResolved';
    return DistanceEvents;
}());
exports.DistanceEvents = DistanceEvents;
 
 
/***/ }),
/* 298 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var SliderEvents = /** @class */ (function () {
    function SliderEvents() {
    }
    SliderEvents.startSlide = 'startSlide';
    SliderEvents.duringSlide = 'duringSlide';
    SliderEvents.endSlide = 'endSlide';
    SliderEvents.graphValueSelected = 'graphValueSelected';
    return SliderEvents;
}());
exports.SliderEvents = SliderEvents;
 
 
/***/ }),
/* 299 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
var LocalStorageUtils_1 = __webpack_require__(96);
var Model_1 = __webpack_require__(26);
var Logger_1 = __webpack_require__(18);
var Assert_1 = __webpack_require__(12);
var InitializationEvents_1 = __webpack_require__(22);
var RootComponent_1 = __webpack_require__(133);
var Dom_1 = __webpack_require__(0);
var underscore_1 = __webpack_require__(1);
/**
 * This component acts like the {@link HistoryController} excepts that is saves the {@link QueryStateModel} in the local storage.<br/>
 * This will not allow 'back' and 'forward' navigation in the history, like the standard {@link HistoryController} allows. Instead, it load the query state only on page load.<br/>
 * To enable this component, you should set the {@link SearchInterface.options.useLocalStorageForHistory} as well as the {@link SearchInterface.options.enableHistory} options to true.
 */
var LocalStorageHistoryController = /** @class */ (function (_super) {
    __extends(LocalStorageHistoryController, _super);
    /**
     * Create a new LocalStorageHistoryController instance
     * @param element
     * @param windoh For mock purpose
     * @param model
     * @param queryController
     */
    function LocalStorageHistoryController(element, windoh, model, queryController) {
        var _this = _super.call(this, element, LocalStorageHistoryController.ID) || this;
        _this.windoh = windoh;
        _this.model = model;
        _this.queryController = queryController;
        _this.omit = [];
        Iif (!LocalStorageUtils_1.localStorageExists) {
            new Logger_1.Logger(element).info('No local storage available in current browser. LocalStorageHistoryController cannot initialize itself', _this);
        }
        else {
            _this.storage = new LocalStorageUtils_1.LocalStorageUtils(LocalStorageHistoryController.ID);
            Assert_1.Assert.exists(_this.model);
            Assert_1.Assert.exists(_this.queryController);
            Dom_1.$$(_this.element).on(InitializationEvents_1.InitializationEvents.restoreHistoryState, function () { return _this.initModelFromLocalStorage(); });
            Dom_1.$$(_this.element).on(_this.model.getEventName(Model_1.Model.eventTypes.all), function () { return _this.updateLocalStorageFromModel(); });
        }
        return _this;
    }
    LocalStorageHistoryController.prototype.replaceState = function (state) {
        this.storage.save(state);
    };
    /**
     * Specifies an array of attributes from the query state model that should not be persisted in the local storage
     * @param attributes
     */
    LocalStorageHistoryController.prototype.withoutThoseAttribute = function (attributes) {
        this.omit = attributes;
    };
    LocalStorageHistoryController.prototype.setState = function (values) {
        this.storage.save(values);
    };
    LocalStorageHistoryController.prototype.updateLocalStorageFromModel = function () {
        var attributes = underscore_1.omit(this.model.getAttributes(), this.omit);
        this.setState(attributes);
        this.logger.debug('Saving state to localstorage', attributes);
    };
    LocalStorageHistoryController.prototype.initModelFromLocalStorage = function () {
        var model = this.localStorageModel;
        this.model.setMultiple(model);
    };
    Object.defineProperty(LocalStorageHistoryController.prototype, "localStorageModel", {
        get: function () {
            var _this = this;
            var model = {};
            var storedValues = this.storage.load() || {};
            underscore_1.each(this.model.attributes, function (value, key) {
                var storedValue = storedValues[key];
                var defaultValue = _this.model.defaultAttributes[key];
                var valueToSet = storedValue == undefined ? defaultValue : storedValue;
                model[key] = valueToSet;
            });
            return model;
        },
        enumerable: true,
        configurable: true
    });
    LocalStorageHistoryController.ID = 'LocalStorageHistoryController';
    return LocalStorageHistoryController;
}(RootComponent_1.RootComponent));
exports.LocalStorageHistoryController = LocalStorageHistoryController;
 
 
/***/ }),
/* 300 */
/***/ (function(module, exports) {
 
/* WEBPACK VAR INJECTION */(function(__webpack_amd_options__) {/* globals __webpack_amd_options__ */
module.exports = __webpack_amd_options__;
 
/* WEBPACK VAR INJECTION */}.call(exports, {}))
 
/***/ }),
/* 301 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var NoopHistoryController = /** @class */ (function () {
    function NoopHistoryController() {
    }
    NoopHistoryController.prototype.setState = function (state) { };
    NoopHistoryController.prototype.replaceState = function (state) { };
    return NoopHistoryController;
}());
exports.NoopHistoryController = NoopHistoryController;
 
 
/***/ }),
/* 302 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Globalize = __webpack_require__(28);
var underscore_1 = __webpack_require__(1);
var Strings_1 = __webpack_require__(4);
var RegisteredNamedMethods_1 = __webpack_require__(38);
var Dom_1 = __webpack_require__(0);
var QuerySummaryUtils = /** @class */ (function () {
    function QuerySummaryUtils() {
    }
    QuerySummaryUtils.message = function (root, data) {
        var messageBuilder = QuerySummaryUtils.messageBuilderForMode(root);
        var strings = QuerySummaryUtils.getSummaryStrings(data);
        return messageBuilder(data, strings);
    };
    QuerySummaryUtils.htmlMessage = function (root, data) {
        var messageBuilder = QuerySummaryUtils.messageBuilderForMode(root);
        var strings = QuerySummaryUtils.getHtmlSummaryStrings(data);
        return messageBuilder(data, strings);
    };
    QuerySummaryUtils.replaceQueryTags = function (template, replacement) {
        var queryTag = /\$\{query\}/g;
        return template ? template.replace(queryTag, replacement) : '';
    };
    QuerySummaryUtils.messageBuilderForMode = function (root) {
        if (QuerySummaryUtils.isInfiniteScrollMode(root)) {
            return QuerySummaryUtils.buildInfiniteScrollMessage;
        }
        return QuerySummaryUtils.buildStandardMessage;
    };
    QuerySummaryUtils.isInfiniteScrollMode = function (root) {
        var resultListSelector = ".CoveoResultList";
        var resultLists = Dom_1.$$(root).findAll(resultListSelector);
        return underscore_1.any(resultLists, function (resultList) {
            var options = RegisteredNamedMethods_1.get(resultList).options;
            return options && options.enableInfiniteScroll;
        });
    };
    QuerySummaryUtils.buildStandardMessage = function (data, strings) {
        var numOfResults = data.results.results.length;
        var messages = {
            includingQuery: Strings_1.l('ShowingResultsOfWithQuery', strings.first, strings.last, strings.totalCount, strings.query, numOfResults),
            excludingQuery: Strings_1.l('ShowingResultsOf', strings.first, strings.last, strings.totalCount, numOfResults)
        };
        return QuerySummaryUtils.buildMessage(data, messages);
    };
    QuerySummaryUtils.buildInfiniteScrollMessage = function (data, strings) {
        var numOfResults = data.results.results.length;
        var messages = {
            includingQuery: Strings_1.l('ShowingResultsWithQuery', strings.totalCount, strings.query, numOfResults),
            excludingQuery: Strings_1.l('ShowingResults', strings.totalCount, numOfResults)
        };
        return QuerySummaryUtils.buildMessage(data, messages);
    };
    QuerySummaryUtils.buildMessage = function (data, message) {
        var numOfResults = data.results.results.length;
        var sanitizedQuery = QuerySummaryUtils.sanitizeQuery(data.query);
        if (!numOfResults) {
            return '';
        }
        return sanitizedQuery ? message.includingQuery : message.excludingQuery;
    };
    QuerySummaryUtils.getHtmlSummaryStrings = function (data) {
        var strings = QuerySummaryUtils.getSummaryStrings(data);
        return {
            first: QuerySummaryUtils.wrapWithSpanTag(strings.first, 'first'),
            last: QuerySummaryUtils.wrapWithSpanTag(strings.last, 'last'),
            totalCount: QuerySummaryUtils.wrapWithSpanTag(strings.totalCount, 'total-count'),
            query: QuerySummaryUtils.wrapWithSpanTag(strings.query, 'query')
        };
    };
    QuerySummaryUtils.wrapWithSpanTag = function (word, classSuffix) {
        return Dom_1.$$('span', { className: "coveo-highlight coveo-highlight-" + classSuffix }, word).el.outerHTML;
    };
    QuerySummaryUtils.getSummaryStrings = function (data) {
        var queryPerformed = data.query;
        var queryResults = data.results;
        var first = Globalize.format(queryPerformed.firstResult + 1, 'n0');
        var last = Globalize.format(queryPerformed.firstResult + queryResults.results.length, 'n0');
        var totalCount = Globalize.format(queryResults.totalCountFiltered, 'n0');
        var query = QuerySummaryUtils.sanitizeQuery(queryPerformed);
        return { first: first, last: last, totalCount: totalCount, query: query };
    };
    QuerySummaryUtils.sanitizeQuery = function (query) {
        return query.q ? underscore_1.escape(query.q.trim()) : '';
    };
    return QuerySummaryUtils;
}());
exports.QuerySummaryUtils = QuerySummaryUtils;
 
 
/***/ }),
/* 303 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var StringUtils_1 = __webpack_require__(34);
var ResponsiveComponents_1 = __webpack_require__(54);
var _ = __webpack_require__(1);
var TemplateConditionEvaluator = /** @class */ (function () {
    function TemplateConditionEvaluator() {
    }
    TemplateConditionEvaluator.getFieldFromString = function (text) {
        var acceptableCharacterInFieldName = '[a-z0-9_]';
        var fieldWithAtSymbolPrefix = "@(" + acceptableCharacterInFieldName + "+)\\b";
        var rawFieldAccessedUsingDotOperator = "\\braw\\.(" + acceptableCharacterInFieldName + "+)\\b";
        var fieldBetweenDoubleQuotes = "\"[^\"]*?(" + acceptableCharacterInFieldName + "+)[^\"]*?\"";
        var fieldBetweenSingleQuotes = "'[^']*?(" + acceptableCharacterInFieldName + "+)[^']*?'";
        var rawFieldAccessedUsingString = "\\braw\\[(?:" + fieldBetweenDoubleQuotes + "|" + fieldBetweenSingleQuotes + ")\\]";
        var fieldUsedInCondition = "data-condition-field-(?:not-)?(" + acceptableCharacterInFieldName + "+)=";
        var fieldMatcher = new RegExp(fieldWithAtSymbolPrefix + "|" + rawFieldAccessedUsingDotOperator + "|" + rawFieldAccessedUsingString + "|" + fieldUsedInCondition, 'gi');
        var matchedFields = StringUtils_1.StringUtils.match(text, fieldMatcher);
        return _.map(matchedFields, function (match) { return _.find(match.splice(1), function (field) { return field; }); });
    };
    TemplateConditionEvaluator.evaluateCondition = function (condition, result, responsiveComponents) {
        if (responsiveComponents === void 0) { responsiveComponents = new ResponsiveComponents_1.ResponsiveComponents(); }
        var templateShouldBeLoaded = true;
        var fieldsInCondition = TemplateConditionEvaluator.getFieldFromString(condition);
        _.each(fieldsInCondition, function (fieldInCondition) {
            var matchingFieldValues = TemplateConditionEvaluator.evaluateMatchingFieldValues(fieldInCondition, condition);
            var fieldShouldNotBeNull = matchingFieldValues.length != 0 || TemplateConditionEvaluator.evaluateFieldShouldNotBeNull(fieldInCondition, condition);
            Eif (fieldShouldNotBeNull) {
                templateShouldBeLoaded = templateShouldBeLoaded && result.raw[fieldInCondition] != null;
            }
            if (templateShouldBeLoaded) {
                _.each(matchingFieldValues, function (fieldValue) {
                    templateShouldBeLoaded = templateShouldBeLoaded && result.raw[fieldInCondition].toLowerCase() == fieldValue.toLowerCase();
                });
            }
        });
        if (templateShouldBeLoaded) {
            if (TemplateConditionEvaluator.evaluateShouldUseSmallScreen(condition)) {
                templateShouldBeLoaded = templateShouldBeLoaded && responsiveComponents.isSmallScreenWidth();
            }
        }
        return templateShouldBeLoaded;
    };
    TemplateConditionEvaluator.evaluateMatchingFieldValues = function (field, condition) {
        var foundForCurrentField = [];
        // try to get the field value in the format raw.filetype == "YouTubeVideo"
        var firstRegexToGetValue = new RegExp("raw." + field + "\\s*=+\\s*[\"|']([a-zA-Z]+)[\"|']", 'gi');
        // try to get the field value in the format raw['filetype'] == "YouTubeVideo"
        var secondRegexToGetValue = new RegExp("raw[[\"|']" + field + "[\"|']]\\s*=+\\s*[\"|']([a-zA-Z]+)[\"|']", 'gi');
        var matches = StringUtils_1.StringUtils.match(condition, firstRegexToGetValue).concat(StringUtils_1.StringUtils.match(condition, secondRegexToGetValue));
        matches.forEach(function (match) {
            foundForCurrentField = foundForCurrentField.concat(match[1]);
        });
        return _.unique(foundForCurrentField);
    };
    TemplateConditionEvaluator.evaluateFieldShouldNotBeNull = function (field, condition) {
        var firstRegexToMatchNonNull = new RegExp("raw." + field + "\\s*!=\\s*(?=null|undefined)", 'gi');
        var secondRegexToMatchNonNull = new RegExp("raw[[\"|']" + field + "[\"|']]\\s*!=\\s*(?=null|undefined)", 'gi');
        return condition.match(firstRegexToMatchNonNull) != null || condition.match(secondRegexToMatchNonNull) != null;
    };
    TemplateConditionEvaluator.evaluateShouldUseSmallScreen = function (condition) {
        return condition.match(/Coveo\.DeviceUtils\.isSmallScreenWidth/gi);
    };
    return TemplateConditionEvaluator;
}());
exports.TemplateConditionEvaluator = TemplateConditionEvaluator;
 
 
/***/ }),
/* 304 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Utils_1 = __webpack_require__(5);
var TemplateConditionEvaluator_1 = __webpack_require__(303);
var ComponentOptions_1 = __webpack_require__(13);
var Dom_1 = __webpack_require__(0);
var Initialization_1 = __webpack_require__(8);
var underscore_1 = __webpack_require__(1);
var TemplateFromAScriptTag = /** @class */ (function () {
    function TemplateFromAScriptTag(template, scriptTag) {
        this.template = template;
        this.scriptTag = scriptTag;
        var condition = scriptTag.getAttribute('data-condition');
        if (condition != null) {
            // Allows to add quotes in data-condition on the templates
            condition = condition.toString().replace(/&quot;/g, '"');
            template.setConditionWithFallback(condition);
        }
        else {
            var parsedFieldsAttributes = this.parseFieldsAttributes();
            if (parsedFieldsAttributes && Utils_1.Utils.isNonEmptyArray(parsedFieldsAttributes)) {
                this.template.fieldsToMatch = parsedFieldsAttributes;
            }
        }
        this.template.layout = this.parseLayout();
        this.template.mobile = this.parseScreenSize('data-mobile');
        this.template.tablet = this.parseScreenSize('data-tablet');
        this.template.desktop = this.parseScreenSize('data-desktop');
        this.template.fields = TemplateConditionEvaluator_1.TemplateConditionEvaluator.getFieldFromString(scriptTag.innerHTML + " " + (condition ? condition : ''));
        this.template.role = scriptTag.getAttribute('data-role');
        this.template.addFields(TemplateConditionEvaluator_1.TemplateConditionEvaluator.getFieldFromString(scriptTag.innerHTML + ' ' + condition) || []);
        // Additional fields that might be specified directly on the script element
        var additionalFields = ComponentOptions_1.ComponentOptions.loadFieldsOption(scriptTag, 'fields', {
            includeInResults: true
        });
        if (additionalFields != null) {
            // remove the @
            this.template.addFields(underscore_1.map(additionalFields, function (field) { return field.substr(1); }));
        }
        // Additional fields that might be used to conditionally load the template when it's going to be rendered.
        this.template.addFields(underscore_1.map(this.template.fieldsToMatch, function (toMatch) {
            return toMatch.field;
        }));
        // Scan components in this template
        // return the fields needed for the content of this template
        var neededFieldsForComponents = underscore_1.chain(this.template.getComponentsInside(scriptTag.innerHTML))
            .map(function (component) {
            return Initialization_1.Initialization.getRegisteredFieldsComponentForQuery(component);
        })
            .flatten()
            .value();
        this.template.addFields(neededFieldsForComponents);
    }
    TemplateFromAScriptTag.prototype.toHtmlElement = function (container) {
        if (!container) {
            container = Dom_1.$$('code');
        }
        var condition = Dom_1.$$(this.scriptTag).getAttribute('data-condition');
        if (condition) {
            container.setAttribute('data-condition', condition);
        }
        container.setHtml(this.scriptTag.innerHTML);
        return container.el;
    };
    TemplateFromAScriptTag.prototype.parseFieldsAttributes = function () {
        var dataSet = this.scriptTag.dataset;
        return underscore_1.chain(dataSet)
            .map(function (value, key) {
            var match = key.match(/field([a-zA-Z0-9_\.]*)/i);
            if (match) {
                var values = void 0;
                if (value != null && value != 'null' && value != '') {
                    values = underscore_1.map(value.split(','), function (val) { return val.trim(); });
                }
                return {
                    field: match[1].toLowerCase(),
                    values: values
                };
            }
            else {
                return undefined;
            }
        })
            .compact()
            .value();
    };
    TemplateFromAScriptTag.prototype.parseScreenSize = function (attribute) {
        return Utils_1.Utils.parseBooleanIfNotUndefined(this.scriptTag.getAttribute(attribute));
    };
    TemplateFromAScriptTag.prototype.parseLayout = function () {
        var layout = this.scriptTag.getAttribute('data-layout');
        return layout;
    };
    TemplateFromAScriptTag.fromString = function (template, properties, container) {
        Iif (properties === void 0) { properties = {}; }
        if (container === void 0) { container = document.createElement('code'); }
        container.innerHTML = template;
        if (properties.condition != null) {
            container.setAttribute('data-condition', properties.condition);
        }
        if (properties.layout != null) {
            container.setAttribute('data-layout', properties.layout);
        }
        else {
            container.setAttribute('data-layout', 'list');
        }
        if (properties.mobile != null) {
            container.setAttribute('data-mobile', properties.mobile.toString());
        }
        if (properties.tablet != null) {
            container.setAttribute('data-tablet', properties.tablet.toString());
        }
        if (properties.desktop != null) {
            container.setAttribute('data-desktop', properties.desktop.toString());
        }
        if (properties.fieldsToMatch != null) {
            underscore_1.each(properties.fieldsToMatch, function (fieldToMatch) {
                if (fieldToMatch.values) {
                    container.setAttribute("data-field-" + fieldToMatch.field.toLowerCase(), fieldToMatch.values.join(','));
                }
                else {
                    container.setAttribute("data-field-" + fieldToMatch.field.toLowerCase(), null);
                }
            });
        }
        Iif (properties.role != null) {
            container.setAttribute('data-role', properties.role);
        }
        return container;
    };
    return TemplateFromAScriptTag;
}());
exports.TemplateFromAScriptTag = TemplateFromAScriptTag;
 
 
/***/ }),
/* 305 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Dom_1 = __webpack_require__(0);
var Utils_1 = __webpack_require__(5);
var _ = __webpack_require__(1);
__webpack_require__(1014);
var QueryEvents_1 = __webpack_require__(14);
var InitializationEvents_1 = __webpack_require__(22);
var ResultListEvents_1 = __webpack_require__(48);
var HashUtils_1 = __webpack_require__(88);
var ComponentsTypes_1 = __webpack_require__(69);
var InitializationPlaceholder = /** @class */ (function () {
    function InitializationPlaceholder(root) {
        this.root = root;
        this.facetPlaceholder = "<div class=\"coveo-placeholder-title\"></div>\n    <div class=\"coveo-facet-placeholder-line\">\n      <div class=\"coveo-facet-placeholder-checkbox\"></div>\n      <div class=\"coveo-placeholder-text\"></div>\n    </div>\n    <div class=\"coveo-facet-placeholder-line\">\n      <div class=\"coveo-facet-placeholder-checkbox\"></div>\n      <div class=\"coveo-placeholder-text\"></div>\n    </div>\n    <div class=\"coveo-facet-placeholder-line\">\n      <div class=\"coveo-facet-placeholder-checkbox\"></div>\n      <div class=\"coveo-placeholder-text\"></div>\n    </div>\n    <div class=\"coveo-facet-placeholder-line\">\n      <div class=\"coveo-facet-placeholder-checkbox\"></div>\n      <div class=\"coveo-placeholder-text\"></div>\n    </div>\n    <div class=\"coveo-facet-placeholder-line\">\n      <div class=\"coveo-facet-placeholder-checkbox\"></div>\n      <div class=\"coveo-placeholder-text\"></div>\n    </div>";
        this.resultListPlaceholder = "<div class=\"coveo-result-frame coveo-placeholder-result\">\n  <div class=\"coveo-result-row\">\n    <div class=\"coveo-result-cell\" style=\"width:85px;text-align:center;\">\n      <div class=\"coveo-placeholder-icon\"></div>\n    </div>\n    <div class=\"coveo-result-cell\" style=\"padding-left:15px;\">\n      <div class=\"coveo-result-row\">\n        <div class=\"coveo-result-cell\">\n          <div class=\"coveo-placeholder-title\" style=\"width: 60%\"></div>\n        </div>\n        <div class=\"coveo-result-cell\" style=\"width:120px; text-align:right;\">\n          <div class=\"coveo-placeholder-text\" style=\"width: 80%\"></div>\n        </div>\n      </div>\n      <div class=\"coveo-result-row\">\n        <div class=\"coveo-result-cell\">\n          <div class=\"coveo-placeholder-text\" style=\"width: 70%\"></div>\n          <div class=\"coveo-placeholder-text\" style=\"width: 90%\"></div>\n          <div class=\"coveo-placeholder-text\" style=\"width: 60%\"></div>\n        </div>\n      </div>\n    </div>\n  </div>\n</div>";
        this.cardResultListPlaceholder = "<div class=\"coveo-card-layout coveo-placeholder-result CoveoResult\">\n  <div class=\"coveo-result-frame\">\n    <div class=\"coveo-result-row\" style=\"margin-bottom: 20px;\">\n      <div class=\"coveo-result-cell\" style=\"width: 32px; vertical-align: middle;\">\n        <div class=\"coveo-placeholder-icon-small\"></div>\n      </div>\n      <div class=\"coveo-result-cell\" style=\"text-align:left; padding-left: 10px; vertical-align: middle;\">\n        <div class=\"coveo-placeholder-title\" style=\"width: 60%\"></div>\n      </div>\n    </div>\n    <div class=\"coveo-result-row\" style=\"margin-bottom: 20px;\">\n      <div class=\"coveo-result-cell\">\n        <div class=\"coveo-placeholder-text\" style=\"width: 70%\"></div>\n        <div class=\"coveo-placeholder-text\" style=\"width: 90%\"></div>\n        <div class=\"coveo-placeholder-text\" style=\"width: 60%\"></div>\n      </div>\n      <div class=\"coveo-result-cell\">\n        <div class=\"coveo-placeholder-text\" style=\"width: 90%\"></div>\n        <div class=\"coveo-placeholder-text\" style=\"width: 70%\"></div>\n        <div class=\"coveo-placeholder-text\" style=\"width: 60%\"></div>\n      </div>\n    </div>\n    <div class=\"coveo-result-row\">\n      <div class=\"coveo-result-cell\">\n        <div class=\"coveo-placeholder-text\" style=\"width: 90%\"></div>\n          <div class=\"coveo-placeholder-text\" style=\"width: 100%\"></div>\n      </div>\n    </div>\n  </div>\n</div>\n";
        this.recommendationResultListPlaceholder = "<div class=\"coveo-result-frame coveo-placeholder-result\">\n  <div class=\"coveo-result-row\">\n    <div class=\"coveo-result-cell\" style=\"width: 32px; vertical-align: middle;\">\n        <div class=\"coveo-placeholder-icon-small\"></div>\n      </div>\n    <div class=\"coveo-result-cell\" style=\"padding-left:10px; vertical-align: middle;\">\n      <div class=\"coveo-result-row\">\n        <div class=\"coveo-result-cell\">\n          <div class=\"coveo-placeholder-title\" style=\"width: 90%\"></div>\n        </div>\n      </div>\n    </div>\n  </div>\n  ";
        this.eventToRemovePlaceholder = InitializationEvents_1.InitializationEvents.afterComponentsInitialization;
    }
    InitializationPlaceholder.prototype.withEventToRemovePlaceholder = function (event) {
        this.eventToRemovePlaceholder = event;
        return this;
    };
    InitializationPlaceholder.prototype.withFullInitializationStyling = function () {
        var _this = this;
        Dom_1.$$(this.root).addClass(InitializationPlaceholder.INITIALIZATION_CLASS);
        Dom_1.$$(this.root).removeClass(InitializationPlaceholder.AFTER_INITIALIZATION_CLASS);
        Dom_1.$$(this.root).one(this.eventToRemovePlaceholder, function () {
            Dom_1.$$(_this.root).removeClass(InitializationPlaceholder.INITIALIZATION_CLASS);
            Dom_1.$$(_this.root).addClass(InitializationPlaceholder.AFTER_INITIALIZATION_CLASS);
        });
        return this;
    };
    InitializationPlaceholder.prototype.withHiddenRootElement = function () {
        Dom_1.$$(this.root).addClass('coveo-hidden');
        return this;
    };
    InitializationPlaceholder.prototype.withVisibleRootElement = function () {
        Dom_1.$$(this.root).removeClass('coveo-hidden');
        return this;
    };
    InitializationPlaceholder.prototype.withWaitingForFirstQueryMode = function () {
        var _this = this;
        Dom_1.$$(this.root).addClass('coveo-waiting-for-query');
        Dom_1.$$(this.root).one(QueryEvents_1.QueryEvents.duringQuery, function () {
            Dom_1.$$(_this.root).removeClass('coveo-waiting-for-query');
        });
        return this;
    };
    InitializationPlaceholder.prototype.withAllPlaceholders = function () {
        this.withPlaceholderForFacets();
        this.withPlaceholderForResultList();
        this.withPlaceholderSearchbox();
        return this;
    };
    InitializationPlaceholder.prototype.withPlaceholderForFacets = function () {
        // Render an arbitrary number of placeholder facet.
        // Facets should become usable on the first deferredQuerySuccess
        var _this = this;
        var facetElements = ComponentsTypes_1.ComponentsTypes.getAllFacetElementsFromElement(this.root);
        if (Utils_1.Utils.isNonEmptyArray(facetElements)) {
            var placeholders_1 = [];
            _.each(facetElements, function (facetElement) { return Dom_1.$$(facetElement).addClass(InitializationPlaceholder.INITIALIZATION_CLASS); });
            _.each(_.first(facetElements, InitializationPlaceholder.NUMBER_OF_FACETS), function (facetElement) {
                Dom_1.$$(facetElement).addClass('coveo-with-placeholder');
                var placeHolder = Dom_1.$$('div', { className: 'coveo-facet-placeholder' }, _this.facetPlaceholder);
                facetElement.appendChild(placeHolder.el);
                placeholders_1.push(placeHolder);
            });
            Dom_1.$$(this.root).one(this.eventToRemovePlaceholder, function () {
                var toExecuteAfterInitialization = function () {
                    _.each(placeholders_1, function (placeholder) { return placeholder.remove(); });
                    _.each(facetElements, function (facetElement) {
                        return Dom_1.$$(facetElement).removeClass(InitializationPlaceholder.INITIALIZATION_CLASS);
                    });
                    _.each(facetElements, function (facetElement) { return Dom_1.$$(facetElement).removeClass('coveo-with-placeholder'); });
                };
                Dom_1.$$(_this.root).one(QueryEvents_1.QueryEvents.queryError, function () { return toExecuteAfterInitialization(); });
                Dom_1.$$(_this.root).one(QueryEvents_1.QueryEvents.deferredQuerySuccess, function () { return toExecuteAfterInitialization(); });
            });
        }
        return this;
    };
    InitializationPlaceholder.prototype.withPlaceholderSearchbox = function () {
        // Searchbox should be good/usable afterComponentsInitialization
        // Create a placeholder until we reach that event.
        var searchBoxElements = Dom_1.$$(this.root).findAll('.CoveoSearchbox');
        if (Utils_1.Utils.isNonEmptyArray(searchBoxElements)) {
            _.each(searchBoxElements, function (el) {
                Dom_1.$$(el).addClass(InitializationPlaceholder.INITIALIZATION_CLASS);
            });
            Dom_1.$$(this.root).one(this.eventToRemovePlaceholder, function () {
                _.each(searchBoxElements, function (el) { return Dom_1.$$(el).removeClass(InitializationPlaceholder.INITIALIZATION_CLASS); });
            });
        }
        return this;
    };
    InitializationPlaceholder.prototype.withPlaceholderForResultList = function () {
        // Render an arbitrary number of placeholder in the first result list we find
        // When we get the first newResultDisplayedEvent, the result list should be usable.
        var resultListsElements = Dom_1.$$(this.root).findAll('.CoveoResultList');
        if (Utils_1.Utils.isNonEmptyArray(resultListsElements)) {
            _.each(resultListsElements, function (el) { return Dom_1.$$(el).addClass(InitializationPlaceholder.INITIALIZATION_CLASS); });
            var _a = this.determineResultListPlaceholder(resultListsElements), placeholderToUse_1 = _a.placeholderToUse, resultListToUse_1 = _a.resultListToUse, rootToUse_1 = _a.rootToUse;
            Dom_1.$$(resultListToUse_1).append(rootToUse_1);
            Dom_1.$$(resultListToUse_1).addClass('coveo-with-placeholder');
            _.times(this.isRecommendationRoot()
                ? InitializationPlaceholder.NUMBER_OF_RESULTS_RECOMMENDATION
                : InitializationPlaceholder.NUMBER_OF_RESULTS, function () {
                rootToUse_1.innerHTML += placeholderToUse_1;
            });
            var reset_1 = function () {
                Dom_1.$$(rootToUse_1).remove();
                _.each(resultListsElements, function (el) { return Dom_1.$$(el).removeClass(InitializationPlaceholder.INITIALIZATION_CLASS); });
                Dom_1.$$(resultListToUse_1).removeClass('coveo-with-placeholder');
            };
            Dom_1.$$(this.root).one(ResultListEvents_1.ResultListEvents.newResultDisplayed, function () { return reset_1(); });
            Dom_1.$$(this.root).one(QueryEvents_1.QueryEvents.queryError, function () { return reset_1(); });
            Dom_1.$$(this.root).one(QueryEvents_1.QueryEvents.noResults, function () { return reset_1(); });
        }
        return this;
    };
    InitializationPlaceholder.prototype.determineResultListPlaceholder = function (resultListElements) {
        var currentLayout;
        if (resultListElements.length > 1) {
            currentLayout = HashUtils_1.HashUtils.getValue('layout', HashUtils_1.HashUtils.getHash());
        }
        else Eif (resultListElements.length == 1) {
            currentLayout = resultListElements[0].getAttribute('data-layout');
        }
        Eif (!currentLayout) {
            currentLayout = 'list';
        }
        if (resultListElements.length > 1) {
            var resultListElement = _.find(resultListElements, function (resultListElement) {
                return resultListElement.getAttribute('data-layout') == currentLayout;
            });
            Eif (!resultListElement) {
                // No data-layout default to list
                resultListElement = _.find(resultListElements, function (resultListElement) {
                    return resultListElement.getAttribute('data-layout') == null;
                });
            }
            Iif (!resultListElement) {
                // Last fallback
                resultListElement = _.first(resultListElements);
            }
            return {
                placeholderToUse: this.determineResultListFromLayout(currentLayout),
                resultListToUse: resultListElement,
                rootToUse: this.determineRootFromLayout(currentLayout)
            };
        }
        else Eif (resultListElements.length == 1) {
            return {
                placeholderToUse: this.determineResultListFromLayout(currentLayout),
                resultListToUse: resultListElements[0],
                rootToUse: this.determineRootFromLayout(currentLayout)
            };
        }
        else {
            return null;
        }
    };
    InitializationPlaceholder.prototype.determineResultListFromLayout = function (layout) {
        switch (layout) {
            case 'list':
                Iif (this.isRecommendationRoot()) {
                    return this.recommendationResultListPlaceholder;
                }
                else {
                    return this.resultListPlaceholder;
                }
            case 'card':
                return this.cardResultListPlaceholder;
            default:
                return this.resultListPlaceholder;
        }
    };
    InitializationPlaceholder.prototype.determineRootFromLayout = function (layout) {
        switch (layout) {
            case 'list':
                return Dom_1.$$('div').el;
            case 'card':
                return Dom_1.$$('div', { className: 'coveo-result-list-container coveo-card-layout-container' }).el;
            default:
                return Dom_1.$$('div').el;
        }
    };
    InitializationPlaceholder.prototype.isRecommendationRoot = function () {
        return Dom_1.$$(this.root).hasClass('CoveoRecommendation');
    };
    InitializationPlaceholder.NUMBER_OF_FACETS = 3;
    InitializationPlaceholder.NUMBER_OF_RESULTS = 10;
    InitializationPlaceholder.NUMBER_OF_RESULTS_RECOMMENDATION = 5;
    InitializationPlaceholder.INITIALIZATION_CLASS = 'coveo-during-initialization';
    InitializationPlaceholder.AFTER_INITIALIZATION_CLASS = 'coveo-after-initialization';
    return InitializationPlaceholder;
}());
exports.InitializationPlaceholder = InitializationPlaceholder;
 
 
/***/ }),
/* 306 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
__webpack_require__(1017);
var Dom_1 = __webpack_require__(0);
var AnalyticsActionListMeta_1 = __webpack_require__(7);
var Core_1 = __webpack_require__(9);
var SVGIcons_1 = __webpack_require__(16);
var Model_1 = __webpack_require__(26);
var QueryStateModel_1 = __webpack_require__(17);
var XRegExp = __webpack_require__(485);
var underscore_1 = __webpack_require__(1);
var AccessibilityUtils_1 = __webpack_require__(81);
var MissingTermManager = /** @class */ (function () {
    function MissingTermManager(args) {
        var _this = this;
        this.args = args;
        Dom_1.$$(args.element).on(Core_1.QueryEvents.doneBuildingQuery, function (event, args) {
            return _this.handleBuildingQuery(args);
        });
        Dom_1.$$(args.element).on("state:" + Model_1.MODEL_EVENTS.CHANGE_ONE + QueryStateModel_1.QUERY_STATE_ATTRIBUTES.Q, function (evt, args) {
            return _this.handleQueryChange(args);
        });
        Dom_1.$$(args.element).on(Core_1.BreadcrumbEvents.populateBreadcrumb, function (evt, args) {
            _this.handlePopulateBreadcrumb(args);
        });
        Dom_1.$$(args.element).on(Core_1.BreadcrumbEvents.clearBreadcrumb, function (evt, args) { return _this.handleClearBreadcrumb(); });
    }
    MissingTermManager.prototype.handleBuildingQuery = function (data) {
        var currentMissingTerm = this.args.queryStateModel.get('missingTerms');
        currentMissingTerm.forEach(function (term) {
            data.queryBuilder.advancedExpression.add(term);
        });
    };
    Object.defineProperty(MissingTermManager.prototype, "termsForcedToAppear", {
        get: function () {
            return this.args.queryStateModel.get('missingTerms').slice();
        },
        enumerable: true,
        configurable: true
    });
    MissingTermManager.prototype.setUpdateTermsForcedToAppear = function (terms) {
        this.args.queryStateModel.set('missingTerms', terms.slice());
    };
    MissingTermManager.prototype.handlePopulateBreadcrumb = function (args) {
        Iif (this.termsForcedToAppear.length === 0) {
            return;
        }
        var missingTerms = this.buildTermForcedToAppear();
        var BreadcrumbContainer = this.buildBreadcrumbContainer(args.headingLevel);
        missingTerms.forEach(function (term) { return Dom_1.$$(BreadcrumbContainer).append(term.el); });
        args.breadcrumbs.push({
            element: BreadcrumbContainer.el
        });
    };
    MissingTermManager.prototype.buildTermForcedToAppear = function () {
        var _this = this;
        return this.termsForcedToAppear.map(function (term) {
            var termContainer = Dom_1.$$('button', {
                type: 'button',
                className: 'coveo-missing-term-breadcrumb-value coveo-accessible-button'
            }, Dom_1.$$('span', { className: 'coveo-missing-term-breadcrumb-caption' }, underscore_1.escape(term)), Dom_1.$$('span', { className: 'coveo-missing-term-breadcrumb-clear' }, SVGIcons_1.SVGIcons.icons.mainClear));
            termContainer.on('click', function () { return _this.removeTermForcedToAppear(term); });
            return termContainer;
        });
    };
    MissingTermManager.prototype.buildBreadcrumbContainer = function (headingLevel) {
        return Dom_1.$$('div', {
            className: 'coveo-remove-term-container'
        }, Dom_1.$$(AccessibilityUtils_1.getHeadingTag(headingLevel, 'span'), {
            className: 'coveo-missing-term-breadcrumb-title'
        }, Core_1.l('MustContain')));
    };
    MissingTermManager.prototype.removeTermForcedToAppear = function (term) {
        var termsForcedToAppearCopy = this.termsForcedToAppear;
        var termIndex = termsForcedToAppearCopy.indexOf(term);
        termsForcedToAppearCopy.splice(termIndex, 1);
        this.setUpdateTermsForcedToAppear(termsForcedToAppearCopy);
        this.logAnalyticsRemoveMissingTerm(term);
        this.args.queryController.executeQuery();
    };
    MissingTermManager.prototype.logAnalyticsRemoveMissingTerm = function (term) {
        this.args.usageAnalytics.logSearchEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.removeMissingTerm, {
            missingTerm: term
        });
    };
    MissingTermManager.prototype.handleClearBreadcrumb = function () {
        this.setUpdateTermsForcedToAppear([]);
    };
    MissingTermManager.prototype.handleQueryChange = function (args) {
        this.updateTermsForcedToAppearToOnlyIncludeWords(args);
        var breadcrumbSelector = document.querySelector('.CoveoBreadcrumb');
        Eif (!breadcrumbSelector) {
            return;
        }
        var breadcrumb = Core_1.get(breadcrumbSelector);
        if (breadcrumb) {
            breadcrumb.getBreadcrumbs();
            Dom_1.$$(this.args.element).trigger(Core_1.BreadcrumbEvents.redrawBreadcrumb);
        }
    };
    MissingTermManager.prototype.updateTermsForcedToAppearToOnlyIncludeWords = function (args) {
        var termForcedToAppearCopy = this.termsForcedToAppear;
        this.termsForcedToAppear.forEach(function (term) {
            var regex = XRegExp(MissingTermManager.wordBoundary + "(" + term + ")" + MissingTermManager.wordBoundary, 'g');
            if (!regex.test(args.value)) {
                var termIndex = termForcedToAppearCopy.indexOf(term);
                termForcedToAppearCopy.splice(termIndex, 1);
            }
        });
        this.setUpdateTermsForcedToAppear(termForcedToAppearCopy);
    };
    MissingTermManager.ID = 'MissingTermManager';
    // We only need to import one Asian characters script because what is important here is the space
    // between characters and any of those scripts will contain it.
    // p{Han}: import the unicode script for chinese caracter
    // List of script: https://www.fontspace.com/unicode/script
    MissingTermManager.wordBoundary = '(([\\p{Han}])?([^(\\p{Latin}-)])|^|$)';
    return MissingTermManager;
}());
exports.MissingTermManager = MissingTermManager;
 
 
/***/ }),
/* 307 */
/***/ (function(module, exports, __webpack_require__) {
 
var anObject = __webpack_require__(220);
var IE8_DOM_DEFINE = __webpack_require__(1024);
var toPrimitive = __webpack_require__(1025);
var dP = Object.defineProperty;
 
exports.f = __webpack_require__(221) ? 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;
};
 
 
/***/ }),
/* 308 */
/***/ (function(module, exports) {
 
module.exports = function (it) {
  return typeof it === 'object' ? it !== null : typeof it === 'function';
};
 
 
/***/ }),
/* 309 */
/***/ (function(module, exports) {
 
module.exports = function (exec) {
  try {
    return !!exec();
  } catch (e) {
    return true;
  }
};
 
 
/***/ }),
/* 310 */
/***/ (function(module, exports, __webpack_require__) {
 
// to indexed object, toObject with fallback for non-array-like ES3 strings
var IObject = __webpack_require__(1029);
var defined = __webpack_require__(223);
module.exports = function (it) {
  return IObject(defined(it));
};
 
 
/***/ }),
/* 311 */
/***/ (function(module, exports) {
 
var toString = {}.toString;
 
module.exports = function (it) {
  return toString.call(it).slice(8, -1);
};
 
 
/***/ }),
/* 312 */
/***/ (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);
};
 
 
/***/ }),
/* 313 */
/***/ (function(module, exports, __webpack_require__) {
 
var shared = __webpack_require__(489)('keys');
var uid = __webpack_require__(491);
module.exports = function (key) {
  return shared[key] || (shared[key] = uid(key));
};
 
 
/***/ }),
/* 314 */
/***/ (function(module, exports, __webpack_require__) {
 
module.exports = __webpack_require__(1041);
 
/***/ }),
/* 315 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        Iif (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            Iif (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
            Iif (y = 0, t) op = [0, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    Eif (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
Object.defineProperty(exports, "__esModule", { value: true });
var RankingInfoTable_1 = __webpack_require__(1073);
var MetaDataTable_1 = __webpack_require__(318);
var Dom_1 = __webpack_require__(0);
var ExternalModulesShim_1 = __webpack_require__(39);
var Core_1 = __webpack_require__(9);
var RelevanceInspectorTabs_1 = __webpack_require__(639);
__webpack_require__(1078);
var ExecutionReport_1 = __webpack_require__(50);
var AvailableFieldsTable_1 = __webpack_require__(228);
var underscore_1 = __webpack_require__(1);
var InlineRankingInfo_1 = __webpack_require__(646);
var RelevanceInspector = /** @class */ (function () {
    function RelevanceInspector(element, bindings) {
        var _this = this;
        this.element = element;
        this.bindings = bindings;
        this.opened = false;
        this.modalBoxModule = ExternalModulesShim_1.ModalBox;
        Dom_1.$$(this.element).text('Relevance Inspector');
        Dom_1.$$(this.element).addClass('coveo-button coveo-relevance-inspector');
        Dom_1.$$(this.bindings.root).on(this.bindings.queryStateModel.getEventName(Core_1.QueryStateModel.eventTypes.changeOne + Core_1.QueryStateModel.attributesEnum.debug), function (e, args) { return _this.toggleFromState(args.value); });
        Dom_1.$$(this.element).on('click', function () { return _this.open(); });
        Dom_1.$$(this.bindings.root).on(Core_1.ResultListEvents.newResultDisplayed, function (e, args) {
            return _this.handleNewResultDisplayed(args);
        });
        this.bindings.queryStateModel.get(Core_1.QueryStateModel.attributesEnum.debug) ? this.show() : this.hide();
    }
    Object.defineProperty(RelevanceInspector.prototype, "modalBox", {
        get: function () {
            return this.modalBoxModule;
        },
        set: function (modalBoxModule) {
            this.modalBoxModule = modalBoxModule;
        },
        enumerable: true,
        configurable: true
    });
    RelevanceInspector.prototype.hide = function () {
        Dom_1.$$(this.element).addClass('coveo-hidden');
    };
    RelevanceInspector.prototype.show = function () {
        Dom_1.$$(this.element).removeClass('coveo-hidden');
    };
    RelevanceInspector.prototype.open = function () {
        return __awaiter(this, void 0, void 0, function () {
            var content, animation, rows;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        if (this.opened) {
                            return [2 /*return*/];
                        }
                        this.opened = true;
                        content = Dom_1.$$('div');
                        animation = Core_1.DomUtils.getBasicLoadingAnimation();
                        content.append(animation);
                        this.modalBox.open(content.el, this.modalBoxOptions);
                        return [4 /*yield*/, this.buildTabs()];
                    case 1:
                        rows = _a.sent();
                        if (rows) {
                            animation.remove();
                            content.append(rows.el);
                        }
                        else {
                            this.modalBox.close();
                        }
                        return [2 /*return*/];
                }
            });
        });
    };
    RelevanceInspector.prototype.handleNewResultDisplayed = function (args) {
        if (this.bindings.queryStateModel.get(Core_1.QueryStateModel.attributesEnum.debug)) {
            Dom_1.$$(args.item).addClass('coveo-with-inline-ranking-info');
            Iif (Dom_1.$$(args.item).hasClass('coveo-table-layout')) {
                Dom_1.$$(args.item).append(new InlineRankingInfo_1.InlineRankingInfo(args.result).build().el);
            }
            else {
                Dom_1.$$(args.item).prepend(new InlineRankingInfo_1.InlineRankingInfo(args.result).build().el);
            }
        }
    };
    Object.defineProperty(RelevanceInspector.prototype, "modalBoxOptions", {
        get: function () {
            var _this = this;
            return {
                title: 'Relevance Inspector',
                titleClose: false,
                overlayClose: true,
                sizeMod: 'big',
                className: 'relevance-inspector-modal',
                validation: function () {
                    _this.opened = false;
                    return true;
                },
                body: document.getElementsByClassName('CoveoSearchInterface')[0] // Will return undefined if no CoveoSearchInterface is present
            };
        },
        enumerable: true,
        configurable: true
    });
    RelevanceInspector.prototype.toggleFromState = function (stateValue) {
        stateValue != 0 ? this.show() : this.hide();
        this.modalBox.close();
    };
    RelevanceInspector.prototype.buildTabs = function () {
        return __awaiter(this, void 0, void 0, function () {
            var _this = this;
            var lastResults, container, rankingInfoTable, metadataTable, executionReport, availableFields, inspectorTabs, debouncedResize, _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
            return __generator(this, function (_o) {
                switch (_o.label) {
                    case 0:
                        lastResults = this.bindings.queryController.getLastResults().results;
                        if (!lastResults || lastResults.length == 0) {
                            new Core_1.Logger(this).error('Could not open Relevance Inspector because there is no results to display. Please execute a query beforehand', lastResults);
                            return [2 /*return*/];
                        }
                        if (!lastResults[0].rankingInfo) {
                            new Core_1.Logger(this).error('Could not open Relevance Inspector because there is no ranking info returned on the results. Please execute a query in debug mode beforehad', lastResults);
                            return [2 /*return*/];
                        }
                        container = Dom_1.$$('div');
                        rankingInfoTable = new RankingInfoTable_1.RankingInfoTable(lastResults, this.bindings);
                        metadataTable = new MetaDataTable_1.MetaDataTable(lastResults, this.bindings);
                        executionReport = new ExecutionReport_1.ExecutionReport(this.bindings.queryController.getLastResults(), this.bindings);
                        availableFields = new AvailableFieldsTable_1.AvailableFieldsTable(this.bindings);
                        this.tabs = {
                            relevanceInspectorRankingInfo: rankingInfoTable,
                            relevanceInspectorMetadata: metadataTable,
                            relevanceInspectorExecutionReport: executionReport,
                            relevanceInspectorAvailableFields: availableFields
                        };
                        inspectorTabs = new RelevanceInspectorTabs_1.RelevanceInspectorTabs(function (tabChangedTo) {
                            _this.activeTab = tabChangedTo;
                            _this.resize();
                        });
                        debouncedResize = underscore_1.debounce(function () { return _this.resize(); }, 100);
                        window.addEventListener('resize', debouncedResize);
                        _b = (_a = inspectorTabs).addSection;
                        _c = ['Ranking Information'];
                        return [4 /*yield*/, rankingInfoTable.build()];
                    case 1:
                        _b.apply(_a, _c.concat([_o.sent(), 'relevanceInspectorRankingInfo']));
                        _e = (_d = inspectorTabs).addSection;
                        _f = ['Metadata'];
                        return [4 /*yield*/, metadataTable.build()];
                    case 2:
                        _e.apply(_d, _f.concat([_o.sent(), 'relevanceInspectorMetadata']));
                        _h = (_g = inspectorTabs).addSection;
                        _j = ['Execution Report'];
                        return [4 /*yield*/, executionReport.build()];
                    case 3:
                        _h.apply(_g, _j.concat([_o.sent(), 'relevanceInspectorExecutionReport']));
                        _l = (_k = inspectorTabs).addSection;
                        _m = ['Available Fields'];
                        return [4 /*yield*/, availableFields.build()];
                    case 4:
                        _l.apply(_k, _m.concat([_o.sent(), 'relevanceInspectorAvailableFields']));
                        inspectorTabs.select('relevanceInspectorRankingInfo');
                        container.append(inspectorTabs.navigationSection.el);
                        container.append(inspectorTabs.tabContentSection.el);
                        return [2 /*return*/, container];
                }
            });
        });
    };
    RelevanceInspector.prototype.resize = function () {
        Iif (!this.activeTab) {
            return;
        }
        Iif (!this.tabs[this.activeTab]) {
            return;
        }
        this.tabs[this.activeTab].gridOptions.api.sizeColumnsToFit();
    };
    return RelevanceInspector;
}());
exports.RelevanceInspector = RelevanceInspector;
 
 
/***/ }),
/* 316 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
var Assert_1 = __webpack_require__(12);
var Options_1 = __webpack_require__(215);
var Utils_1 = __webpack_require__(5);
var Globalize = __webpack_require__(28);
var DefaultCurrencyToStringOptions = /** @class */ (function (_super) {
    __extends(DefaultCurrencyToStringOptions, _super);
    function DefaultCurrencyToStringOptions() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        _this.decimals = 0;
        return _this;
    }
    return DefaultCurrencyToStringOptions;
}(Options_1.Options));
var CurrencyUtils = /** @class */ (function () {
    function CurrencyUtils() {
    }
    CurrencyUtils.currencyToString = function (value, options) {
        if (Utils_1.Utils.isNullOrUndefined(value)) {
            return '';
        }
        value = Number(value);
        Assert_1.Assert.isNumber(value);
        options = new DefaultCurrencyToStringOptions().merge(options);
        var currency = Globalize.culture().numberFormat.currency;
        var backup = currency.symbol;
        if (Utils_1.Utils.isNonEmptyString(options.symbol)) {
            currency.symbol = options.symbol;
        }
        var str = Globalize.format(value, 'c' + options.decimals.toString());
        currency.symbol = backup;
        return str;
    };
    return CurrencyUtils;
}());
exports.CurrencyUtils = CurrencyUtils;
 
 
/***/ }),
/* 317 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var OS_NAME;
(function (OS_NAME) {
    OS_NAME[OS_NAME["WINDOWS"] = 0] = "WINDOWS";
    OS_NAME[OS_NAME["MACOSX"] = 1] = "MACOSX";
    OS_NAME[OS_NAME["UNIX"] = 2] = "UNIX";
    OS_NAME[OS_NAME["LINUX"] = 3] = "LINUX";
    OS_NAME[OS_NAME["UNKNOWN"] = 4] = "UNKNOWN";
})(OS_NAME = exports.OS_NAME || (exports.OS_NAME = {}));
var OSUtils = /** @class */ (function () {
    function OSUtils() {
    }
    OSUtils.get = function (nav) {
        if (nav === void 0) { nav = navigator; }
        var osName;
        if (nav.appVersion.indexOf('Win') != -1) {
            osName = OS_NAME.WINDOWS;
        }
        else if (nav.appVersion.indexOf('Mac') != -1) {
            osName = OS_NAME.MACOSX;
        }
        else if (nav.appVersion.indexOf('X11') != -1) {
            osName = OS_NAME.UNIX;
        }
        else if (nav.appVersion.indexOf('Linux') != -1) {
            osName = OS_NAME.LINUX;
        }
        else {
            osName = OS_NAME.UNKNOWN;
        }
        return osName;
    };
    return OSUtils;
}());
exports.OSUtils = OSUtils;
 
 
/***/ }),
/* 318 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __assign = (this && this.__assign) || Object.assign || function(t) {
    for (var s, i = 1, n = arguments.length; i < n; i++) {
        s = arguments[i];
        for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
            t[p] = s[p];
    }
    return t;
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { Iif (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        Iif (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            Iif (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
            Iif (y = 0, t) op = [0, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    Eif (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        Iif (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
Object.defineProperty(exports, "__esModule", { value: true });
var TableBuilder_1 = __webpack_require__(62);
var underscore_1 = __webpack_require__(1);
var Dom_1 = __webpack_require__(0);
var StringUtils_1 = __webpack_require__(34);
var DateUtils_1 = __webpack_require__(43);
var TextInput_1 = __webpack_require__(80);
var MetaDataTable = /** @class */ (function () {
    function MetaDataTable(results, bindings) {
        this.results = results;
        this.bindings = bindings;
    }
    MetaDataTable.prototype.build = function () {
        return __awaiter(this, void 0, void 0, function () {
            var _this = this;
            var fieldsDescription, container, builders, builtTables, textInput;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        Iif (!this.bindings.queryController) {
                            return [2 /*return*/];
                        }
                        return [4 /*yield*/, this.bindings.queryController.getEndpoint().listFields()];
                    case 1:
                        fieldsDescription = _a.sent();
                        container = Dom_1.$$('div', {
                            className: 'metadata-table'
                        });
                        builders = this.results.map(function (result) { return __awaiter(_this, void 0, void 0, function () {
                            var nestedContainer, nestedAgGrid, thumbnail, fields;
                            return __generator(this, function (_a) {
                                switch (_a.label) {
                                    case 0:
                                        nestedContainer = Dom_1.$$('div');
                                        container.append(nestedContainer.el);
                                        nestedAgGrid = Dom_1.$$('div', {
                                            className: 'ag-theme-fresh'
                                        });
                                        nestedContainer.append(nestedAgGrid.el);
                                        thumbnail = TableBuilder_1.TableBuilder.thumbnailCell(result, this.bindings);
                                        fields = {};
                                        fields["Fields Values"] = {
                                            content: { result: result, fieldsDescription: fieldsDescription },
                                            cellRenderer: FieldValuesRenderer,
                                            width: 900,
                                            getQuickFilterText: function (params) {
                                                var allValues = underscore_1.map(params.value.result.raw, function (val) { return val.toString(); });
                                                return Object.keys(params.value.result.raw)
                                                    .concat(allValues)
                                                    .join(' ');
                                            },
                                            onCellDoubleClicked: function (params) {
                                                var el = params.event ? params.event.target : null;
                                                if (el && window.getSelection && document.createRange) {
                                                    var selection = window.getSelection();
                                                    var range = document.createRange();
                                                    range.selectNodeContents(el);
                                                    selection.removeAllRanges();
                                                    selection.addRange(range);
                                                }
                                            }
                                        };
                                        return [4 /*yield*/, new TableBuilder_1.TableBuilder().build([
                                                __assign({}, thumbnail, fields)
                                            ], nestedAgGrid, {
                                                rowHeight: 400
                                            })];
                                    case 1: return [2 /*return*/, _a.sent()];
                                }
                            });
                        }); });
                        this.gridOptions = {
                            api: {
                                sizeColumnsToFit: function () {
                                    builtTables.forEach(function (built) { return (built.gridOptions.api ? built.gridOptions.api.sizeColumnsToFit : null); });
                                }
                            }
                        };
                        return [4 /*yield*/, Promise.all(builders)];
                    case 2:
                        builtTables = _a.sent();
                        textInput = new TextInput_1.TextInput(function (input) {
                            builtTables.forEach(function (built) {
                                var api = built.gridOptions && built.gridOptions.api;
                                if (api) {
                                    api.setQuickFilter(input.getValue());
                                    api.onRowHeightChanged();
                                }
                            });
                        }, 'Filters on Fields Values');
                        container.prepend(textInput.getElement());
                        return [2 /*return*/, container];
                }
            });
        });
    };
    return MetaDataTable;
}());
exports.MetaDataTable = MetaDataTable;
var FieldValuesRenderer = /** @class */ (function () {
    function FieldValuesRenderer() {
    }
    FieldValuesRenderer.prototype.init = function (params) {
        this.element = params.value;
        this.params = params;
        this.currentFilter = params.api.filterManager.quickFilter;
        params.value.el = this.listAsInput(this.element.result);
    };
    FieldValuesRenderer.prototype.getGui = function () {
        Eif (this.element) {
            var list = this.listAsInput(this.element.result);
            this.params.eParentOfValue.appendChild(list.el);
            var height = Math.max(list.height() + 50, 200);
            var maxHeight = Math.min(height, 5000);
            this.params.node.setRowHeight(maxHeight);
            return Dom_1.$$('div', undefined, list).el;
        }
        return Dom_1.$$('div', undefined, 'N.A').el;
    };
    FieldValuesRenderer.prototype.listAsInput = function (result) {
        var _this = this;
        var container = Dom_1.$$('div');
        underscore_1.each(result.raw, function (value, fieldInResult) {
            Iif (fieldInResult == 'allmetadatavalues' || fieldInResult.indexOf('sys') == 0) {
                return;
            }
            if (_this.isCurrentElementFilteredOut(value, fieldInResult)) {
                return;
            }
            var inputGroup = Dom_1.$$('div', { className: 'coveo-relevance-inspector-input-group' });
            var fieldName = Dom_1.$$('div', {
                className: 'coveo-relevance-inspector-metadata-name'
            }, fieldInResult);
            var fieldValue = _this.convertFieldValueToReadableFormat(result, fieldInResult);
            var fieldValueElement = Dom_1.$$('div', {
                className: 'coveo-relevance-inspector-metadata-value'
            }, fieldValue);
            if (_this.currentFilter) {
                _this.highlightSearch(fieldName.el, _this.currentFilter);
                _this.highlightSearch(fieldValueElement.el, _this.currentFilter);
            }
            inputGroup.append(fieldName.el);
            inputGroup.append(fieldValueElement.el);
            container.append(inputGroup.el);
        });
        return container;
    };
    FieldValuesRenderer.prototype.isCurrentElementFilteredOut = function (value, fieldInResult) {
        if (this.currentFilter) {
            var matchInFieldName = fieldInResult.toLowerCase().indexOf(this.currentFilter.toLowerCase()) != -1;
            var matchInFieldValue = value
                ? value
                    .toString()
                    .toLowerCase()
                    .indexOf(this.currentFilter.toLowerCase()) != -1
                : false;
            if (!matchInFieldName && !matchInFieldValue) {
                return true;
            }
        }
        return false;
    };
    FieldValuesRenderer.prototype.convertFieldValueToReadableFormat = function (result, fieldInResult) {
        var fieldValue = result.raw[fieldInResult].toString();
        Eif (this.element.fieldsDescription) {
            var matchingFieldDescription = underscore_1.find(this.element.fieldsDescription, function (description) {
                return description.name.replace('@', '').toLowerCase() == fieldInResult;
            });
            if (matchingFieldDescription && matchingFieldDescription.fieldType == 'Date') {
                fieldValue = DateUtils_1.DateUtils.convertToStandardDate(fieldValue).toString() + " ( Epoch : " + fieldValue + " )";
            }
        }
        return fieldValue;
    };
    FieldValuesRenderer.prototype.highlightSearch = function (elementToSearch, search) {
        var asHTMLElement = elementToSearch;
        Eif (asHTMLElement != null && asHTMLElement.innerText != null) {
            var match = asHTMLElement.innerText.split(new RegExp('(?=' + StringUtils_1.StringUtils.regexEncode(search) + ')', 'gi'));
            asHTMLElement.innerHTML = '';
            match.forEach(function (value) {
                var regex = new RegExp('(' + StringUtils_1.StringUtils.regexEncode(search) + ')', 'i');
                var group = value.match(regex);
                var span;
                if (group != null) {
                    span = Dom_1.$$('span', {
                        className: 'coveo-relevance-inspector-highlight'
                    });
                    span.text(group[1]);
                    asHTMLElement.appendChild(span.el);
                    span = Dom_1.$$('span');
                    span.text(value.substr(group[1].length));
                    asHTMLElement.appendChild(span.el);
                }
                else {
                    span = Dom_1.$$('span');
                    span.text(value);
                    asHTMLElement.appendChild(span.el);
                }
            });
        }
    };
    FieldValuesRenderer.prototype.refresh = function (params) {
        return true;
    };
    return FieldValuesRenderer;
}());
exports.FieldValuesRenderer = FieldValuesRenderer;
 
 
/***/ }),
/* 319 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __assign = (this && this.__assign) || Object.assign || function(t) {
    for (var s, i = 1, n = arguments.length; i < n; i++) {
        s = arguments[i];
        for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
            t[p] = s[p];
    }
    return t;
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { Iif (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        Iif (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            Iif (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
            Iif (y = 0, t) op = [0, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    Eif (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        Iif (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
Object.defineProperty(exports, "__esModule", { value: true });
var ExecutionReport_1 = __webpack_require__(50);
var underscore_1 = __webpack_require__(1);
var ExecutionReportGenericSection_1 = __webpack_require__(177);
var GenericValueOutput_1 = __webpack_require__(91);
var TableBuilder_1 = __webpack_require__(62);
var ExecutionReportSimpleSection = /** @class */ (function () {
    function ExecutionReportSimpleSection(topLevelProperty, secondLevelProperty, sectionTitle) {
        this.topLevelProperty = topLevelProperty;
        this.secondLevelProperty = secondLevelProperty;
        this.sectionTitle = sectionTitle;
    }
    ExecutionReportSimpleSection.prototype.build = function (executionReport) {
        return __awaiter(this, void 0, void 0, function () {
            var _this = this;
            var _a, container, agGridElement, gridOptions, topLevelProperty, secondLevelProperty, dataSource, tableBuilder, tableBuilder, _b;
            return __generator(this, function (_c) {
                switch (_c.label) {
                    case 0:
                        _a = ExecutionReport_1.ExecutionReport.standardSectionHeader(this.sectionTitle), container = _a.container, agGridElement = _a.agGridElement;
                        topLevelProperty = underscore_1.find(executionReport.children, function (child) {
                            return child.name == _this.topLevelProperty && child.children && underscore_1.findWhere(child.children, { name: _this.secondLevelProperty });
                        });
                        if (!(topLevelProperty && topLevelProperty.children)) return [3 /*break*/, 3];
                        secondLevelProperty = underscore_1.findWhere(topLevelProperty.children, { name: this.secondLevelProperty });
                        Iif (!secondLevelProperty) return [3 /*break*/, 2];
                        dataSource = [
                            __assign({}, new ExecutionReportGenericSection_1.ExecutionReportGenericSection().build(secondLevelProperty), { Applied: new GenericValueOutput_1.GenericValueOutput().output(secondLevelProperty.applied) })
                        ];
                        return [4 /*yield*/, new TableBuilder_1.TableBuilder().build(dataSource, agGridElement)];
                    case 1:
                        tableBuilder = _c.sent();
                        gridOptions = tableBuilder.gridOptions;
                        _c.label = 2;
                    case 2: return [3 /*break*/, 5];
                    case 3: return [4 /*yield*/, new TableBuilder_1.TableBuilder().build([
                            (_b = {},
                                _b["" + this.sectionTitle] = {
                                    content: "NO DATA AVAILABLE FOR " + this.sectionTitle + " IN CURRENT EXECUTION REPORT"
                                },
                                _b)
                        ], agGridElement)];
                    case 4:
                        tableBuilder = _c.sent();
                        gridOptions = tableBuilder.gridOptions;
                        _c.label = 5;
                    case 5: return [2 /*return*/, { container: container, gridOptions: gridOptions }];
                }
            });
        });
    };
    return ExecutionReportSimpleSection;
}());
exports.ExecutionReportSimpleSection = ExecutionReportSimpleSection;
 
 
/***/ }),
/* 320 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
var LiveAnalyticsClient_1 = __webpack_require__(229);
var AnalyticsActionListMeta_1 = __webpack_require__(7);
var Component_1 = __webpack_require__(6);
var SearchInterface_1 = __webpack_require__(25);
var _ = __webpack_require__(1);
var RecommendationAnalyticsClient = /** @class */ (function (_super) {
    __extends(RecommendationAnalyticsClient, _super);
    function RecommendationAnalyticsClient(endpoint, rootElement, userId, userDisplayName, anonymous, splitTestRunName, splitTestRunVersion, originLevel1, sendToCloud, bindings) {
        var _this = _super.call(this, endpoint, rootElement, userId, userDisplayName, anonymous, splitTestRunName, splitTestRunVersion, originLevel1, sendToCloud, bindings) || this;
        _this.endpoint = endpoint;
        _this.rootElement = rootElement;
        _this.userId = userId;
        _this.userDisplayName = userDisplayName;
        _this.anonymous = anonymous;
        _this.splitTestRunName = splitTestRunName;
        _this.splitTestRunVersion = splitTestRunVersion;
        _this.originLevel1 = originLevel1;
        _this.sendToCloud = sendToCloud;
        _this.bindings = bindings;
        _this.recommendation = _this.bindings.searchInterface;
        return _this;
    }
    RecommendationAnalyticsClient.prototype.logSearchEvent = function (actionCause, meta) {
        Eif (actionCause == AnalyticsActionListMeta_1.analyticsActionCauseList.interfaceLoad) {
            actionCause = AnalyticsActionListMeta_1.analyticsActionCauseList.recommendationInterfaceLoad;
        }
        _super.prototype.logSearchEvent.call(this, actionCause, meta);
    };
    RecommendationAnalyticsClient.prototype.logClickEvent = function (actionCause, meta, result, element) {
        Eif (actionCause == AnalyticsActionListMeta_1.analyticsActionCauseList.documentOpen) {
            actionCause = AnalyticsActionListMeta_1.analyticsActionCauseList.recommendationOpen;
        }
        var promises = [_super.prototype.logClickEvent.call(this, actionCause, meta, result, element)];
        if (this.recommendation.mainQuerySearchUID && this.recommendation.mainQueryPipeline != null) {
            // We log a second click associated with the main interface query to tell the analytics that the query was a success.
            var mainInterface = Component_1.Component.get(this.recommendation.options.mainSearchInterface, SearchInterface_1.SearchInterface);
            result.queryUid = this.recommendation.mainQuerySearchUID;
            result.pipeline = this.recommendation.mainQueryPipeline;
            promises.push(mainInterface.usageAnalytics.logClickEvent(actionCause, meta, result, element));
        }
        return Promise.all(promises).then(function (responses) { return _.first(responses); });
    };
    RecommendationAnalyticsClient.prototype.getOriginLevel2 = function (element) {
        return this.recommendation.getId();
    };
    return RecommendationAnalyticsClient;
}(LiveAnalyticsClient_1.LiveAnalyticsClient));
exports.RecommendationAnalyticsClient = RecommendationAnalyticsClient;
 
 
/***/ }),
/* 321 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var AnalyticsActionListMeta_1 = __webpack_require__(7);
var AnalyticsUtils = /** @class */ (function () {
    function AnalyticsUtils() {
    }
    AnalyticsUtils.addActionCauseToList = function (newActionCause) {
        Eif (newActionCause.name && newActionCause.type) {
            AnalyticsActionListMeta_1.analyticsActionCauseList[newActionCause.name] = newActionCause;
        }
    };
    AnalyticsUtils.removeActionCauseFromList = function (actionCauseToRemoveName) {
        delete AnalyticsActionListMeta_1.analyticsActionCauseList[actionCauseToRemoveName];
    };
    return AnalyticsUtils;
}());
exports.AnalyticsUtils = AnalyticsUtils;
 
 
/***/ }),
/* 322 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var _ = __webpack_require__(1);
var EventsUtils = /** @class */ (function () {
    function EventsUtils() {
    }
    // eventName must be in PascalCase
    EventsUtils.addPrefixedEvent = function (element, pascalCaseEventName, callback) {
        _.each(this.prefixes, function (prefix) {
            if (prefix == '') {
                pascalCaseEventName = pascalCaseEventName.toLowerCase();
            }
            element.addEventListener(prefix + pascalCaseEventName, callback, false);
        });
    };
    // eventName must be in PascalCase
    EventsUtils.removePrefixedEvent = function (element, pascalCaseEventName, callback) {
        _.each(this.prefixes, function (prefix) {
            if (prefix == '') {
                pascalCaseEventName = pascalCaseEventName.toLowerCase();
            }
            element.removeEventListener(prefix + pascalCaseEventName, callback, false);
        });
    };
    EventsUtils.prefixes = ['webkit', 'moz', 'MS', 'o', ''];
    return EventsUtils;
}());
exports.EventsUtils = EventsUtils;
 
 
/***/ }),
/* 323 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var AdvancedSearchEvents_1 = __webpack_require__(110);
var Dom_1 = __webpack_require__(0);
var RadioButton_1 = __webpack_require__(142);
var _ = __webpack_require__(1);
var DateInput = /** @class */ (function () {
    function DateInput(inputName, root) {
        this.inputName = inputName;
        this.root = root;
        this.buildContent();
    }
    DateInput.prototype.reset = function () {
        this.radio.reset();
    };
    DateInput.prototype.build = function () {
        return this.element;
    };
    DateInput.prototype.getElement = function () {
        return this.element;
    };
    DateInput.prototype.isSelected = function () {
        return this.getRadio().checked;
    };
    DateInput.prototype.updateQuery = function (queryBuilder) {
        try {
            var value = this.getValue();
            if (value) {
                queryBuilder.advancedExpression.add(value);
            }
            this.removeErrorMessage();
        }
        catch (error) {
            this.setErrorMessage(error);
        }
    };
    DateInput.prototype.getRadio = function () {
        return Dom_1.$$(this.element).find('input');
    };
    DateInput.prototype.setErrorMessage = function (message) {
        this.removeErrorMessage();
        this.error = Dom_1.$$('div', {
            className: 'coveo-error coveo-error-date-input'
        }, message).el;
        Dom_1.$$(this.element).append(this.error);
    };
    DateInput.prototype.removeErrorMessage = function () {
        if (this.error) {
            Dom_1.$$(this.error).remove();
        }
    };
    DateInput.prototype.buildContent = function () {
        var _this = this;
        this.radio = new RadioButton_1.RadioButton(function () {
            _this.deactivateAllInputs();
            _this.activateSelectedInput();
        }, this.inputName, 'coveo-advanced-search-date-input');
        this.element = this.radio.getElement();
        Dom_1.$$(this.element).addClass('coveo-advanced-search-date-input-section');
        Dom_1.$$(this.radio.getRadio()).addClass('coveo-advanced-search-date');
        Dom_1.$$(this.radio.getLabel()).addClass('coveo-advanced-search-label');
    };
    DateInput.prototype.deactivateAllInputs = function () {
        var elements = Dom_1.$$(this.element.parentElement).findAll('fieldset');
        _.each(elements, function (element) {
            element.disabled = true;
        });
    };
    DateInput.prototype.activateSelectedInput = function () {
        var elements = Dom_1.$$(this.element).findAll('fieldset');
        _.each(elements, function (element) {
            element.disabled = false;
        });
    };
    DateInput.prototype.onChange = function () {
        Eif (this.root) {
            Dom_1.$$(this.root).trigger(AdvancedSearchEvents_1.AdvancedSearchEvents.executeAdvancedSearch);
        }
        else if (this.element) {
            Dom_1.$$(this.element).trigger(AdvancedSearchEvents_1.AdvancedSearchEvents.executeAdvancedSearch);
        }
    };
    return DateInput;
}());
exports.DateInput = DateInput;
 
 
/***/ }),
/* 324 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
var ExternalModulesShim_1 = __webpack_require__(39);
var GlobalExports_1 = __webpack_require__(10);
var Dom_1 = __webpack_require__(0);
var SVGDom_1 = __webpack_require__(23);
var SVGIcons_1 = __webpack_require__(16);
var Utils_1 = __webpack_require__(5);
var Component_1 = __webpack_require__(6);
var ComponentOptions_1 = __webpack_require__(13);
var Initialization_1 = __webpack_require__(8);
var RegisteredNamedMethods_1 = __webpack_require__(38);
var ResultLink_1 = __webpack_require__(56);
var AccessibleModal_1 = __webpack_require__(144);
/**
 * The YouTubeThumbnail component automatically fetches the thumbnail of a YouTube video.
 *
 * This component differs from the standard {@link Thumbnail} component because the thumbnail it outputs is always
 * clickable.
 *
 * Depending on the component configuration, clicking a YouTube thumbnail can either automatically open a modal box
 * containing the `iframe` from YouTube, or open the target URL in the current window (see
 * {@link YouTubeThumbnail.options.embed}).
 *
 * This component is a result template component (see [Result Templates](https://docs.coveo.com/en/413/)).
 */
var YouTubeThumbnail = /** @class */ (function (_super) {
    __extends(YouTubeThumbnail, _super);
    function YouTubeThumbnail(element, options, bindings, result, ModalBox, origin) {
        if (ModalBox === void 0) { ModalBox = ExternalModulesShim_1.ModalBox; }
        var _this = _super.call(this, element, YouTubeThumbnail.ID, bindings) || this;
        _this.element = element;
        _this.options = options;
        _this.bindings = bindings;
        _this.result = result;
        _this.origin = origin;
        _this.options = ComponentOptions_1.ComponentOptions.initComponentOptions(element, YouTubeThumbnail, options);
        _this.resultLink = Dom_1.$$('a', {
            className: Component_1.Component.computeCssClassName(ResultLink_1.ResultLink)
        });
        if (!origin) {
            _this.origin = _this.resultLink.el;
        }
        var thumbnailDiv = Dom_1.$$('div', {
            className: 'coveo-youtube-thumbnail-container'
        });
        _this.resultLink.append(thumbnailDiv.el);
        var img = Dom_1.$$('img', {
            src: Utils_1.Utils.getFieldValue(_this.result, 'ytthumbnailurl'),
            className: 'coveo-youtube-thumbnail-img',
            alt: _this.result.title,
            title: _this.result.title
        });
        img.el.style.width = _this.options.width;
        img.el.style.height = _this.options.height;
        img.el.onerror = function () {
            var svgVideo = Dom_1.$$('div', {}, SVGIcons_1.SVGIcons.icons.video).el;
            SVGDom_1.SVGDom.addStyleToSVGInContainer(svgVideo, {
                width: _this.options.width
            });
            Dom_1.$$(img).remove();
            thumbnailDiv.append(svgVideo);
        };
        thumbnailDiv.append(img.el);
        var span = Dom_1.$$('span', {
            className: 'coveo-youtube-thumbnail-play-button'
        });
        thumbnailDiv.append(span.el);
        Dom_1.$$(_this.element).append(_this.resultLink.el);
        Initialization_1.Initialization.automaticallyCreateComponentsInsideResult(element, result, {
            ResultLink: _this.options.embed ? { onClick: function () { return _this.openYoutubeIframe(); } } : null
        });
        _this.modalbox = new AccessibleModal_1.AccessibleModal('coveo-youtube-player', _this.searchInterface.options.modalContainer, ModalBox, {
            overlayClose: true
        });
        return _this;
    }
    /**
     * Open the result link embedded in this component.
     *
     * With a standard configuration of this component, this will open an iframe that automatically plays the video.
     */
    YouTubeThumbnail.prototype.openResultLink = function () {
        var resultLinkComponent = RegisteredNamedMethods_1.get(this.resultLink.el);
        resultLinkComponent.openLinkAsConfigured();
    };
    YouTubeThumbnail.prototype.openYoutubeIframe = function () {
        var _this = this;
        // need to put iframe inside div : iframe with position absolute and left:0, right : 0 , bottom: 0 is not standard/supported
        var iframe = Dom_1.$$('iframe', {
            src: "https://www.youtube.com/embed/" + this.extractVideoId() + "?autoplay=1",
            allowfullscreen: 'allowfullscreen',
            width: '100%',
            height: '100%',
            title: this.result.title
        });
        var div = Dom_1.$$('div');
        div.append(iframe.el);
        this.modalbox.openResult({
            result: this.result,
            options: { showDate: true, title: this.result.title },
            bindings: this.bindings,
            content: div.el,
            validation: function () { return true; },
            origin: this.origin
        });
        Dom_1.$$(Dom_1.$$(this.modalbox.wrapper).find('.coveo-quickview-close-button')).on('click', function () {
            _this.modalbox.close();
        });
    };
    YouTubeThumbnail.prototype.extractVideoId = function () {
        return this.result.clickUri.split('watch?v=')[1];
    };
    YouTubeThumbnail.ID = 'YouTubeThumbnail';
    YouTubeThumbnail.doExport = function () {
        GlobalExports_1.exportGlobally({
            YouTubeThumbnail: YouTubeThumbnail
        });
    };
    /**
     * @componentOptions
     */
    YouTubeThumbnail.options = {
        /**
         * Specifies the width (in pixels) of the YouTube thumbnail.
         *
         * Default value is `200px`.
         */
        width: ComponentOptions_1.ComponentOptions.buildStringOption({ defaultValue: '200px' }),
        /**
         * Specifies the height (in pixels) of the YouTube thumbnail.
         *
         * Default value is `112px`.
         */
        height: ComponentOptions_1.ComponentOptions.buildStringOption({ defaultValue: '112px' }),
        /**
         * Specifies whether clicking on the YouTube thumbnail loads the video in a modal box.
         *
         * Setting this option to `false` causes the browser to change its current location to that of the target URL when
         * the end user clicks the YouTube thumbnail.
         *
         * Default value is `true`.
         */
        embed: ComponentOptions_1.ComponentOptions.buildBooleanOption({ defaultValue: true })
    };
    return YouTubeThumbnail;
}(Component_1.Component));
exports.YouTubeThumbnail = YouTubeThumbnail;
Initialization_1.Initialization.registerAutoCreateComponent(YouTubeThumbnail);
 
 
/***/ }),
/* 325 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Defer_1 = __webpack_require__(31);
var underscore_1 = __webpack_require__(1);
var Dom_1 = __webpack_require__(0);
var FocusTrap = /** @class */ (function () {
    function FocusTrap(container, options) {
        if (options === void 0) { options = {
            focusableSelector: '[tabindex], button'
        }; }
        this.container = container;
        this.options = options;
        this.hiddenElements = [];
        this.enable();
    }
    Object.defineProperty(FocusTrap.prototype, "focusableElements", {
        get: function () {
            return underscore_1.chain(Dom_1.Dom.nodeListToArray(this.container.querySelectorAll(this.options.focusableSelector)))
                .filter(function (element) { return Dom_1.$$(element).isVisible(); })
                .sortBy(function (element) { return element.tabIndex; })
                .value();
        },
        enumerable: true,
        configurable: true
    });
    FocusTrap.prototype.disable = function () {
        document.removeEventListener('focusin', this.focusInEvent);
        document.removeEventListener('focusout', this.focusOutEvent);
        this.showHiddenElements();
        this.enabled = false;
    };
    FocusTrap.prototype.enable = function () {
        var _this = this;
        document.addEventListener('focusin', (this.focusInEvent = function (e) { return _this.onFocusIn(e); }));
        document.addEventListener('focusout', (this.focusOutEvent = function (e) { return _this.onFocusOut(e); }));
        this.hideAllExcept(this.container);
        this.enabled = true;
    };
    FocusTrap.prototype.showHiddenElements = function () {
        while (this.hiddenElements.length) {
            this.hiddenElements.pop().removeAttribute('aria-hidden');
        }
    };
    FocusTrap.prototype.hideElement = function (element) {
        if (element.getAttribute('aria-hidden')) {
            return;
        }
        this.hiddenElements.push(element);
        element.setAttribute('aria-hidden', "" + true);
    };
    FocusTrap.prototype.hideSiblings = function (allowedElement) {
        var _this = this;
        var parent = allowedElement.parentElement;
        if (parent) {
            underscore_1.without(Dom_1.$$(parent).children(), allowedElement).forEach(function (elementToHide) {
                _this.hideElement(elementToHide);
            });
        }
    };
    FocusTrap.prototype.hideAllExcept = function (allowedElement) {
        this.hideSiblings(allowedElement);
        var parent = allowedElement.parentElement;
        if (parent && parent !== document.body) {
            this.hideAllExcept(parent);
        }
    };
    FocusTrap.prototype.getFocusableSibling = function (element, previous) {
        Iif (previous === void 0) { previous = false; }
        var elements = this.focusableElements;
        var currentIndex = elements.indexOf(element);
        Iif (currentIndex === -1) {
            return null;
        }
        return elements[(currentIndex + (previous ? -1 : 1) + elements.length) % elements.length];
    };
    FocusTrap.prototype.focusSibling = function (element, previous) {
        Iif (previous === void 0) { previous = false; }
        var sibling = this.getFocusableSibling(element, previous);
        Eif (sibling) {
            sibling.focus();
        }
    };
    FocusTrap.prototype.focusFirstElement = function () {
        var elements = this.focusableElements;
        Eif (elements.length) {
            elements[0].focus();
        }
    };
    FocusTrap.prototype.elementIsBefore = function (oldElement, newElement) {
        Iif (!newElement) {
            return false;
        }
        return oldElement.compareDocumentPosition(newElement) === Node.DOCUMENT_POSITION_PRECEDING;
    };
    FocusTrap.prototype.onLosingFocus = function (oldElement, newElement) {
        var _this = this;
        Defer_1.Defer.defer(function () {
            Iif (!_this.enabled) {
                return;
            }
            _this.enabled = false;
            if (oldElement && _this.focusIsAllowed(oldElement)) {
                _this.focusSibling(oldElement, _this.elementIsBefore(oldElement, newElement));
            }
            else {
                _this.focusFirstElement();
            }
            _this.enabled = true;
        });
    };
    FocusTrap.prototype.focusIsAllowed = function (element) {
        return this.container.contains(element);
    };
    FocusTrap.prototype.elementIsInPage = function (element) {
        return element && element !== document.body.parentElement;
    };
    FocusTrap.prototype.onFocusIn = function (e) {
        if (!this.enabled) {
            return;
        }
        var oldElement = e.relatedTarget;
        var handledByFocusOut = this.elementIsInPage(oldElement);
        if (handledByFocusOut) {
            return;
        }
        var newElement = e.target;
        Iif (!this.elementIsInPage(newElement)) {
            return;
        }
        if (!this.focusIsAllowed(newElement)) {
            this.onLosingFocus(null, newElement);
        }
    };
    FocusTrap.prototype.onFocusOut = function (e) {
        if (!this.enabled) {
            return;
        }
        var newElement = e.relatedTarget;
        if (!this.elementIsInPage(newElement)) {
            return;
        }
        if (!newElement || !this.focusIsAllowed(newElement)) {
            this.onLosingFocus(e.target, newElement);
        }
    };
    return FocusTrap;
}());
exports.FocusTrap = FocusTrap;
 
 
/***/ }),
/* 326 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var ResponsiveDropdownContent_1 = __webpack_require__(99);
var Core_1 = __webpack_require__(9);
var SVGIcons_1 = __webpack_require__(16);
var FocusTrap_1 = __webpack_require__(325);
var ResponsiveDropdownModalContent = /** @class */ (function () {
    function ResponsiveDropdownModalContent(componentName, element, closeButtonLabel, close) {
        this.componentName = componentName;
        this.element = element;
        this.closeButtonLabel = closeButtonLabel;
        this.close = close;
        this.className = "coveo-" + this.componentName + "-dropdown-modal-content";
    }
    Object.defineProperty(ResponsiveDropdownModalContent.prototype, "hidden", {
        set: function (shouldHide) {
            this.element.toggleClass('coveo-hidden', shouldHide);
        },
        enumerable: true,
        configurable: true
    });
    ResponsiveDropdownModalContent.prototype.positionDropdown = function () {
        this.element.el.classList.add(this.className, ResponsiveDropdownContent_1.ResponsiveDropdownContent.DEFAULT_CSS_CLASS_NAME);
        this.element.setAttribute('role', 'group');
        this.element.setAttribute('aria-label', Core_1.l('FiltersDropdown'));
        this.hidden = false;
        this.ensureCloseButton();
        this.ensureFocusTrap();
    };
    ResponsiveDropdownModalContent.prototype.hideDropdown = function () {
        this.element.el.classList.remove(this.className, ResponsiveDropdownContent_1.ResponsiveDropdownContent.DEFAULT_CSS_CLASS_NAME);
        this.element.setAttribute('role', null);
        this.element.setAttribute('aria-label', null);
        this.hidden = true;
        this.removeCloseButton();
        this.removeFocusTrap();
    };
    ResponsiveDropdownModalContent.prototype.cleanUp = function () {
        this.hidden = false;
    };
    ResponsiveDropdownModalContent.prototype.ensureCloseButton = function () {
        var _this = this;
        if (!this.closeButton) {
            this.closeButton = Core_1.$$('button', {
                className: 'coveo-facet-modal-close-button',
                type: 'button',
                ariaLabel: this.closeButtonLabel
            }, SVGIcons_1.SVGIcons.icons.mainClear);
            this.closeButton.on('click', function () { return _this.close(); });
            this.element.prepend(this.closeButton.el);
        }
    };
    Object.defineProperty(ResponsiveDropdownModalContent.prototype, "focusableSelector", {
        get: function () {
            var facetElements = '[data-field]:not(.coveo-facet-empty) [tabindex]';
            var dynamicFacetsElements = '[data-field]:not(.coveo-hidden) button';
            var modalButton = '.coveo-facet-modal-close-button';
            return [facetElements, dynamicFacetsElements, modalButton].join(' , ');
        },
        enumerable: true,
        configurable: true
    });
    ResponsiveDropdownModalContent.prototype.ensureFocusTrap = function () {
        if (!this.focusTrap) {
            this.focusTrap = new FocusTrap_1.FocusTrap(this.element.el, { focusableSelector: this.focusableSelector });
        }
    };
    ResponsiveDropdownModalContent.prototype.removeCloseButton = function () {
        if (this.closeButton) {
            this.closeButton.remove();
            this.closeButton = null;
        }
    };
    ResponsiveDropdownModalContent.prototype.removeFocusTrap = function () {
        if (this.focusTrap) {
            this.focusTrap.disable();
            this.focusTrap = null;
        }
    };
    return ResponsiveDropdownModalContent;
}());
exports.ResponsiveDropdownModalContent = ResponsiveDropdownModalContent;
 
 
/***/ }),
/* 327 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
/// <reference path="Facet.ts" />
Object.defineProperty(exports, "__esModule", { value: true });
__webpack_require__(1108);
var underscore_1 = __webpack_require__(1);
var Assert_1 = __webpack_require__(12);
var AccessibleButton_1 = __webpack_require__(20);
var Dom_1 = __webpack_require__(0);
var SVGIcons_1 = __webpack_require__(16);
var AnalyticsActionListMeta_1 = __webpack_require__(7);
var Strings_1 = __webpack_require__(4);
var BreadcrumbValueElement = /** @class */ (function () {
    function BreadcrumbValueElement(facet, facetValue) {
        this.facet = facet;
        this.facetValue = facetValue;
    }
    BreadcrumbValueElement.prototype.build = function () {
        Assert_1.Assert.exists(this.facetValue);
        var _a = this.buildElements(), container = _a.container, caption = _a.caption, clear = _a.clear, listContainer = _a.listContainer;
        container.append(caption.el);
        container.append(clear.el);
        listContainer.append(container.el);
        return listContainer;
    };
    BreadcrumbValueElement.prototype.getBreadcrumbTooltip = function () {
        var tooltipParts = [
            this.facet.getValueCaption(this.facetValue),
            this.facetValue.getFormattedCount(),
            this.facetValue.getFormattedComputedField(this.facet.options.computedFieldFormat)
        ];
        return underscore_1.compact(tooltipParts).join(' ');
    };
    BreadcrumbValueElement.prototype.buildElements = function () {
        return {
            container: this.buildContainer(),
            clear: this.buildClear(),
            caption: this.buildCaption(),
            listContainer: this.buildListContainer()
        };
    };
    BreadcrumbValueElement.prototype.buildContainer = function () {
        var _this = this;
        var container = Dom_1.$$('div', {
            className: 'coveo-facet-breadcrumb-value'
        });
        container.toggleClass('coveo-selected', this.facetValue.selected);
        container.toggleClass('coveo-excluded', this.facetValue.excluded);
        var labelString = this.facetValue.excluded ? 'Unexclude' : 'RemoveFilterOn';
        var label = Strings_1.l(labelString, this.facet.getValueCaption(this.facetValue));
        new AccessibleButton_1.AccessibleButton()
            .withElement(container)
            .withLabel(label)
            .withSelectAction(function () { return _this.selectAction(); })
            .build();
        return container;
    };
    BreadcrumbValueElement.prototype.buildListContainer = function () {
        return Dom_1.$$('li', {
            className: 'coveo-facet-breadcrumb-value-list-item'
        });
    };
    BreadcrumbValueElement.prototype.buildClear = function () {
        var clear = Dom_1.$$('span', {
            className: 'coveo-facet-breadcrumb-clear'
        }, SVGIcons_1.SVGIcons.icons.mainClear);
        return clear;
    };
    BreadcrumbValueElement.prototype.buildCaption = function () {
        var caption = Dom_1.$$('span', {
            className: 'coveo-facet-breadcrumb-caption'
        });
        caption.text(this.facet.getValueCaption(this.facetValue));
        return caption;
    };
    BreadcrumbValueElement.prototype.selectAction = function () {
        var _this = this;
        if (this.facetValue.excluded) {
            this.facet.unexcludeValue(this.facetValue.value);
        }
        else {
            this.facet.deselectValue(this.facetValue.value);
        }
        this.facet.triggerNewQuery(function () {
            return _this.facet.usageAnalytics.logSearchEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.breadcrumbFacet, {
                facetId: _this.facet.options.id,
                facetField: _this.facet.options.field.toString(),
                facetValue: _this.facetValue.value,
                facetTitle: _this.facet.options.title
            });
        });
        this.focusOnContainer();
    };
    BreadcrumbValueElement.prototype.focusOnContainer = function () {
        var breadcrumb = underscore_1.first(this.facet.searchInterface.getComponents('Breadcrumb'));
        breadcrumb ? breadcrumb.element.focus() : null;
    };
    return BreadcrumbValueElement;
}());
exports.BreadcrumbValueElement = BreadcrumbValueElement;
 
 
/***/ }),
/* 328 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Globalize = __webpack_require__(28);
var underscore_1 = __webpack_require__(1);
var Assert_1 = __webpack_require__(12);
var Strings_1 = __webpack_require__(4);
var Dom_1 = __webpack_require__(0);
var AccessibleButton_1 = __webpack_require__(20);
var AccessibilityUtils_1 = __webpack_require__(81);
var BreadcrumbValueList = /** @class */ (function () {
    function BreadcrumbValueList(facet, facetValues, breadcrumbValueElementKlass, options) {
        this.facet = facet;
        this.facetValues = facetValues;
        this.breadcrumbValueElementKlass = breadcrumbValueElementKlass;
        this.options = options;
        this.setExpandedAndCollapsed();
        this.elem = Dom_1.$$('div', {
            className: 'coveo-facet-breadcrumb'
        }).el;
        var title = Dom_1.$$(AccessibilityUtils_1.getHeadingTag(this.options && this.options.headingLevel, 'span'));
        title.addClass('coveo-facet-breadcrumb-title');
        title.text(this.facet.options.title + ':');
        this.elem.appendChild(title.el);
        this.valueContainer = Dom_1.$$('ul', {
            className: 'coveo-facet-breadcrumb-values'
        }).el;
        this.elem.appendChild(this.valueContainer);
    }
    BreadcrumbValueList.prototype.build = function () {
        this.buildExpanded();
        if (this.collapsed.length != 0) {
            this.buildCollapsed();
        }
        return this.elem;
    };
    BreadcrumbValueList.prototype.buildAsString = function () {
        this.build();
        Eif (this.elem) {
            return (this.facet.options.title + ": " +
                Dom_1.$$(this.elem)
                    .findAll('.coveo-facet-breadcrumb-value')
                    .map(function (value) {
                    return Dom_1.$$(value).text();
                })
                    .join(', '));
        }
        return '';
    };
    BreadcrumbValueList.prototype.buildExpanded = function () {
        var _this = this;
        this.expanded.forEach(function (value) {
            var elementBreadcrumb = new _this.breadcrumbValueElementKlass(_this.facet, value).build();
            _this.valueContainer.appendChild(elementBreadcrumb.el);
        });
    };
    BreadcrumbValueList.prototype.buildCollapsed = function () {
        var _this = this;
        var numberOfSelected = underscore_1.filter(this.collapsed, function (value) { return value.selected; }).length;
        var numberOfExcluded = underscore_1.filter(this.collapsed, function (value) { return value.excluded; }).length;
        Assert_1.Assert.check(numberOfSelected + numberOfExcluded == this.collapsed.length);
        var nMoreElement = Dom_1.$$('div', {
            className: 'coveo-facet-breadcrumb-value'
        }, Dom_1.$$('span', {
            className: 'coveo-facet-breadcrumb-multi-count'
        }, Strings_1.l('NMore', Globalize.format(numberOfSelected + numberOfExcluded, 'n0'))));
        var nMoreContainer = Dom_1.$$('li', {
            className: 'coveo-facet-breadcrumb-value-list-item'
        }, nMoreElement);
        var collapsedBreadcrumbs = this.collapsed.map(function (value) { return new _this.breadcrumbValueElementKlass(_this.facet, value); });
        var toolTip = collapsedBreadcrumbs.map(function (element) { return element.getBreadcrumbTooltip(); }).join('\n');
        new AccessibleButton_1.AccessibleButton()
            .withElement(nMoreElement)
            .withTitle(toolTip)
            .withSelectAction(function () {
            nMoreElement.remove();
            collapsedBreadcrumbs.forEach(function (breadcrumb) {
                _this.valueContainer.appendChild(breadcrumb.build().el);
            });
        })
            .build();
        this.valueContainer.appendChild(nMoreContainer.el);
    };
    BreadcrumbValueList.prototype.setExpandedAndCollapsed = function () {
        if (this.facetValues.length > this.facet.options.numberOfValuesInBreadcrumb) {
            this.collapsed = underscore_1.rest(this.facetValues, this.facet.options.numberOfValuesInBreadcrumb);
            this.expanded = underscore_1.first(this.facetValues, this.facet.options.numberOfValuesInBreadcrumb);
        }
        else {
            this.collapsed = [];
            this.expanded = this.facetValues;
        }
    };
    return BreadcrumbValueList;
}());
exports.BreadcrumbValueList = BreadcrumbValueList;
 
 
/***/ }),
/* 329 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var ValueElementRenderer_1 = __webpack_require__(236);
var Utils_1 = __webpack_require__(5);
var AnalyticsActionListMeta_1 = __webpack_require__(7);
var Dom_1 = __webpack_require__(0);
var KeyboardUtils_1 = __webpack_require__(35);
var ValueElement = /** @class */ (function () {
    function ValueElement(facet, facetValue, onSelect, onExclude) {
        this.facet = facet;
        this.facetValue = facetValue;
        this.onSelect = onSelect;
        this.onExclude = onExclude;
    }
    ValueElement.prototype.build = function () {
        this.renderer = new ValueElementRenderer_1.ValueElementRenderer(this.facet, this.facetValue).build();
        this.bindEvent({ displayNextTime: true, pinFacet: this.facet.options.preservePosition });
        return this;
    };
    ValueElement.prototype.bindEvent = function (eventBindings) {
        Iif (!Utils_1.Utils.isNullOrUndefined(eventBindings.omniboxObject)) {
            this.isOmnibox = true;
        }
        else {
            this.isOmnibox = false;
        }
        this.handleEventForCheckboxChange(eventBindings);
        if (this.facetValue.excluded) {
            this.handleEventForExcludedValueElement(eventBindings);
        }
        else {
            this.handleEventForValueElement(eventBindings);
        }
    };
    ValueElement.prototype.select = function () {
        this.facetValue.selected = true;
        this.facetValue.excluded = false;
        this.renderer.setCssClassOnListValueElement();
    };
    ValueElement.prototype.unselect = function () {
        this.facetValue.selected = false;
        this.facetValue.excluded = false;
        this.renderer.setCssClassOnListValueElement();
    };
    ValueElement.prototype.exclude = function () {
        this.facetValue.selected = false;
        this.facetValue.excluded = true;
        this.renderer.setCssClassOnListValueElement();
    };
    ValueElement.prototype.unexclude = function () {
        this.facetValue.selected = false;
        this.facetValue.excluded = false;
        this.renderer.setCssClassOnListValueElement();
    };
    ValueElement.prototype.toggleExcludeWithUA = function () {
        var _this = this;
        var actionCause;
        if (this.facetValue.excluded) {
            actionCause = this.isOmnibox ? AnalyticsActionListMeta_1.analyticsActionCauseList.omniboxFacetUnexclude : AnalyticsActionListMeta_1.analyticsActionCauseList.facetUnexclude;
        }
        else {
            actionCause = this.isOmnibox ? AnalyticsActionListMeta_1.analyticsActionCauseList.omniboxFacetExclude : AnalyticsActionListMeta_1.analyticsActionCauseList.facetExclude;
        }
        this.facet.toggleExcludeValue(this.facetValue);
        Iif (this.onExclude) {
            this.facet.triggerNewQuery(function () { return _this.onExclude(_this, actionCause); });
        }
        else {
            this.facet.triggerNewQuery(function () {
                return _this.facet.usageAnalytics.logSearchEvent(actionCause, _this.getAnalyticsFacetMeta());
            });
        }
    };
    ValueElement.prototype.handleSelectValue = function (eventBindings) {
        var _this = this;
        this.facet.keepDisplayedValuesNextTime = eventBindings.displayNextTime && !this.facet.options.useAnd;
        var actionCause;
        if (this.facetValue.excluded) {
            actionCause = this.isOmnibox ? AnalyticsActionListMeta_1.analyticsActionCauseList.omniboxFacetUnexclude : AnalyticsActionListMeta_1.analyticsActionCauseList.facetUnexclude;
            this.facet.unexcludeValue(this.facetValue);
        }
        else {
            if (this.facetValue.selected) {
                actionCause = this.isOmnibox ? AnalyticsActionListMeta_1.analyticsActionCauseList.omniboxFacetDeselect : AnalyticsActionListMeta_1.analyticsActionCauseList.facetDeselect;
            }
            else {
                actionCause = this.isOmnibox ? AnalyticsActionListMeta_1.analyticsActionCauseList.omniboxFacetSelect : AnalyticsActionListMeta_1.analyticsActionCauseList.facetSelect;
            }
            this.facet.toggleSelectValue(this.facetValue);
        }
        Iif (this.onSelect) {
            this.facet.triggerNewQuery(function () { return _this.onSelect(_this, actionCause); });
        }
        else {
            this.facet.triggerNewQuery(function () {
                return _this.facet.usageAnalytics.logSearchEvent(actionCause, _this.getAnalyticsFacetMeta());
            });
        }
    };
    ValueElement.prototype.handleExcludeClick = function (eventBindings) {
        this.facet.keepDisplayedValuesNextTime = eventBindings.displayNextTime && !this.facet.options.useAnd;
        this.toggleExcludeWithUA();
    };
    ValueElement.prototype.handleSelectEventForExcludedValueElement = function (eventBindings) {
        var _this = this;
        var clickEvent = function () {
            Eif (eventBindings.pinFacet) {
                _this.facet.pinFacetPosition();
            }
            Iif (eventBindings.omniboxObject) {
                _this.omniboxCloseEvent(eventBindings.omniboxObject);
            }
            _this.handleSelectValue(eventBindings);
            _this.tryDismissSearchResults();
            return false;
        };
        Dom_1.$$(this.renderer.label).on('click', function (e) {
            e.stopPropagation();
            clickEvent();
        });
        Dom_1.$$(this.renderer.stylishCheckbox).on('keydown', KeyboardUtils_1.KeyboardUtils.keypressAction([KeyboardUtils_1.KEYBOARD.SPACEBAR, KeyboardUtils_1.KEYBOARD.ENTER], clickEvent));
    };
    ValueElement.prototype.handleExcludeEventForValueElement = function (eventBindings) {
        var _this = this;
        var excludeAction = function (event) {
            Iif (eventBindings.omniboxObject) {
                _this.omniboxCloseEvent(eventBindings.omniboxObject);
            }
            _this.handleExcludeClick(eventBindings);
            _this.tryDismissSearchResults();
            event.stopPropagation();
            event.preventDefault();
        };
        Dom_1.$$(this.renderer.excludeIcon).on('click', excludeAction);
        Dom_1.$$(this.renderer.excludeIcon).on('keydown', KeyboardUtils_1.KeyboardUtils.keypressAction([KeyboardUtils_1.KEYBOARD.SPACEBAR, KeyboardUtils_1.KEYBOARD.ENTER], excludeAction));
    };
    ValueElement.prototype.handleSelectEventForValueElement = function (eventBindings) {
        var _this = this;
        var selectAction = function (event) {
            Eif (eventBindings.pinFacet) {
                _this.facet.pinFacetPosition();
            }
            _this.tryDismissSearchResults();
            Dom_1.$$(_this.renderer.checkbox).trigger('change');
            event.preventDefault();
        };
        Dom_1.$$(this.renderer.label).on('click', selectAction);
        Dom_1.$$(this.renderer.stylishCheckbox).on('keydown', KeyboardUtils_1.KeyboardUtils.keypressAction([KeyboardUtils_1.KEYBOARD.SPACEBAR, KeyboardUtils_1.KEYBOARD.ENTER], selectAction));
    };
    ValueElement.prototype.handleEventForExcludedValueElement = function (eventBindings) {
        this.handleSelectEventForExcludedValueElement(eventBindings);
        this.handleExcludeEventForValueElement(eventBindings);
    };
    ValueElement.prototype.handleEventForValueElement = function (eventBindings) {
        this.handleSelectEventForValueElement(eventBindings);
        this.handleExcludeEventForValueElement(eventBindings);
    };
    ValueElement.prototype.handleEventForCheckboxChange = function (eventBindings) {
        var _this = this;
        Dom_1.$$(this.renderer.checkbox).on('change', function () {
            Iif (eventBindings.omniboxObject) {
                _this.omniboxCloseEvent(eventBindings.omniboxObject);
            }
            _this.handleSelectValue(eventBindings);
        });
    };
    ValueElement.prototype.omniboxCloseEvent = function (eventArg) {
        eventArg.closeOmnibox();
        eventArg.clear();
    };
    ValueElement.prototype.tryDismissSearchResults = function () {
        Eif (this.facet && this.facet.facetSearch && this.facet.facetSearch.dismissSearchResults) {
            this.facet.facetSearch.dismissSearchResults();
        }
    };
    ValueElement.prototype.getAnalyticsFacetMeta = function () {
        return {
            facetId: this.facet.options.id,
            facetField: this.facet.options.field.toString(),
            facetValue: this.facetValue.value,
            facetTitle: this.facet.options.title
        };
    };
    return ValueElement;
}());
exports.ValueElement = ValueElement;
 
 
/***/ }),
/* 330 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Dom_1 = __webpack_require__(0);
var SVGIcons_1 = __webpack_require__(16);
var SVGDom_1 = __webpack_require__(23);
var Component_1 = __webpack_require__(6);
var Strings_1 = __webpack_require__(4);
var EventsUtils_1 = __webpack_require__(322);
var FacetSearchUserInputHandler_1 = __webpack_require__(1111);
var underscore_1 = __webpack_require__(1);
var SearchDropdownNavigatorFactory_1 = __webpack_require__(1112);
var KeyboardUtils_1 = __webpack_require__(35);
var FacetSearchElement = /** @class */ (function () {
    function FacetSearchElement(facetSearch) {
        this.facetSearch = facetSearch;
        this.searchBarIsAnimating = false;
        this.triggeredScroll = false;
        this.facetSearchId = underscore_1.uniqueId('coveo-facet-search-results');
        this.facetValueNotFoundId = underscore_1.uniqueId('coveo-facet-value-not-found');
        this.facetSearchUserInputHandler = new FacetSearchUserInputHandler_1.FacetSearchUserInputHandler(this.facetSearch);
        this.initSearchResults();
    }
    FacetSearchElement.prototype.build = function (handleFacetSearchClear) {
        var _this = this;
        this.search = document.createElement('div');
        Dom_1.$$(this.search).addClass('coveo-facet-search');
        this.magnifier = this.buildMagnifierIcon();
        this.search.appendChild(this.magnifier);
        this.wait = this.buildWaitIcon();
        this.search.appendChild(this.wait);
        this.hideFacetSearchWaitingAnimation();
        this.clear = Dom_1.$$('div', { className: 'coveo-facet-search-clear', title: Strings_1.l('Clear', Strings_1.l('Search')) }, SVGIcons_1.SVGIcons.icons.clear).el;
        SVGDom_1.SVGDom.addClassToSVGInContainer(this.clear, 'coveo-facet-search-clear-svg');
        this.clear.style.display = 'none';
        this.search.appendChild(this.clear);
        this.combobox = this.buildCombobox();
        this.search.appendChild(this.combobox);
        this.input = this.buildInputElement();
        Component_1.Component.pointElementsToDummyForm(this.input);
        this.combobox.appendChild(this.input);
        Dom_1.$$(this.input).on('keyup', function (e) {
            _this.facetSearchUserInputHandler.handleKeyboardEvent(e);
        });
        Dom_1.$$(this.clear).on('click', function (e) {
            handleFacetSearchClear && handleFacetSearchClear();
        });
        Dom_1.$$(this.input).on('focus', function (e) {
            _this.handleFacetSearchFocus();
        });
        Dom_1.$$(this.input).on('blur', function (e) { return _this.onInputBlur(e); });
        this.detectSearchBarAnimation();
        this.initSearchDropdownNavigator();
        return this.search;
    };
    FacetSearchElement.prototype.initSearchResults = function () {
        var _this = this;
        this.searchResults = Dom_1.$$('ul', { id: this.facetSearchId, className: 'coveo-facet-search-results', role: 'listbox' }).el;
        Dom_1.$$(this.searchResults).on('scroll', function () { return _this.handleScrollEvent(); });
        Dom_1.$$(this.searchResults).on('keyup', function (e) {
            Eif (e.which === KeyboardUtils_1.KEYBOARD.ESCAPE) {
                _this.facetSearch.dismissSearchResults();
            }
        });
        Dom_1.$$(this.searchResults).on('focusout', function (event) { return _this.onSearchResultsFocusOut(event); });
        Dom_1.$$(this.searchResults).hide();
    };
    FacetSearchElement.prototype.onInputBlur = function (e) {
        var target = e.relatedTarget;
        var isUsingKeyboard = !!target;
        var focusedOnSearchResult = this.searchResults.contains(target);
        if (isUsingKeyboard && !focusedOnSearchResult) {
            this.facetSearch.dismissSearchResults();
        }
    };
    FacetSearchElement.prototype.onSearchResultsFocusOut = function (e) {
        var target = e.relatedTarget;
        var isUsingKeyboard = !!target;
        var focusedOnInput = this.input.contains(target);
        var focusedOnSearchResult = this.searchResults.contains(target);
        if (isUsingKeyboard && !focusedOnInput && !focusedOnSearchResult) {
            this.facetSearch.dismissSearchResults();
        }
    };
    FacetSearchElement.prototype.initSearchDropdownNavigator = function () {
        var _this = this;
        var config = {
            input: this.input,
            searchResults: this.searchResults,
            setScrollTrigger: function (val) { return (_this.triggeredScroll = val); }
        };
        this.searchDropdownNavigator = SearchDropdownNavigatorFactory_1.SearchDropdownNavigatorFactory(this.facetSearch, config);
    };
    FacetSearchElement.prototype.buildCombobox = function () {
        return Dom_1.$$('div', {
            className: 'coveo-facet-search-middle',
            ariaHaspopup: 'listbox',
            ariaExpanded: 'true'
        }).el;
    };
    FacetSearchElement.prototype.showFacetSearchWaitingAnimation = function () {
        this.magnifier && Dom_1.$$(this.magnifier).hide();
        Dom_1.$$(this.wait).show();
    };
    FacetSearchElement.prototype.getValueInInputForFacetSearch = function () {
        return this.input.value.trim();
    };
    FacetSearchElement.prototype.hideFacetSearchWaitingAnimation = function () {
        Dom_1.$$(this.magnifier).show();
        Dom_1.$$(this.wait).hide();
    };
    FacetSearchElement.prototype.detectSearchBarAnimation = function () {
        var _this = this;
        EventsUtils_1.EventsUtils.addPrefixedEvent(this.search, 'AnimationStart', function (event) {
            if (event.animationName == 'grow') {
                _this.searchBarIsAnimating = true;
            }
        });
        EventsUtils_1.EventsUtils.addPrefixedEvent(this.search, 'AnimationEnd', function (event) {
            if (event.animationName == 'grow') {
                _this.searchBarIsAnimating = false;
            }
        });
    };
    FacetSearchElement.prototype.positionSearchResults = function () {
        var _this = this;
        Eif (this.searchResults != null) {
            Dom_1.$$(this.searchResults).insertAfter(this.search);
            Dom_1.$$(this.searchResults).show();
            Iif (Dom_1.$$(this.searchResults).css('display') == 'none') {
                this.searchResults.style.display = '';
            }
            var searchBar = Dom_1.$$(this.search);
            Iif (searchBar.css('display') == 'none' || this.searchBarIsAnimating) {
                if (Dom_1.$$(this.searchResults).css('display') == 'none') {
                    this.searchResults.style.display = '';
                }
                EventsUtils_1.EventsUtils.addPrefixedEvent(this.search, 'AnimationEnd', function () {
                    EventsUtils_1.EventsUtils.removePrefixedEvent(_this.search, 'AnimationEnd', _this);
                });
            }
        }
        this.addAriaAttributes();
    };
    FacetSearchElement.prototype.setAsCurrentResult = function (toSet) {
        this.searchDropdownNavigator.setAsCurrentResult(toSet);
    };
    Object.defineProperty(FacetSearchElement.prototype, "currentResult", {
        get: function () {
            return this.searchDropdownNavigator.currentResult;
        },
        enumerable: true,
        configurable: true
    });
    FacetSearchElement.prototype.moveCurrentResultDown = function () {
        this.searchDropdownNavigator.focusNextElement();
    };
    FacetSearchElement.prototype.moveCurrentResultUp = function () {
        this.searchDropdownNavigator.focusPreviousElement();
    };
    FacetSearchElement.prototype.highlightCurrentQueryInSearchResults = function (regex) {
        var captions = this.facetSearch.getCaptions();
        captions.forEach(function (caption) {
            caption.innerHTML = Dom_1.$$(caption).text().replace(regex, '<span class="coveo-highlight">$1</span>');
        });
    };
    FacetSearchElement.prototype.appendToSearchResults = function (el) {
        this.searchResults.appendChild(el);
        this.setupFacetSearchResultsEvents(el);
    };
    FacetSearchElement.prototype.emptyAndShowNoResults = function () {
        Dom_1.$$(this.searchResults).empty();
        this.searchResults.appendChild(Dom_1.$$('li', { id: this.facetValueNotFoundId, className: 'coveo-facet-value-not-found', role: 'option', ariaSelected: 'true', tabindex: 0 }, Strings_1.l('NoValuesFound')).el);
        this.input.setAttribute('aria-activedescendant', this.facetValueNotFoundId);
    };
    FacetSearchElement.prototype.updateAriaLiveWithResults = function (inputValue, numberOfResults, moreValuesToFetch) {
        var ariaLiveText = inputValue === ''
            ? Strings_1.l('ShowingResults', numberOfResults, inputValue, numberOfResults)
            : Strings_1.l('ShowingResultsWithQuery', numberOfResults, inputValue, numberOfResults);
        if (moreValuesToFetch) {
            ariaLiveText = ariaLiveText + " (" + Strings_1.l('MoreValuesAvailable') + ")";
        }
        this.facetSearch.updateAriaLive(ariaLiveText);
    };
    FacetSearchElement.prototype.focus = function () {
        this.input.focus();
        this.handleFacetSearchFocus();
    };
    FacetSearchElement.prototype.handleFacetSearchFocus = function () {
        if (this.facetSearch.currentlyDisplayedResults == null) {
            this.facetSearch.displayNewValues();
            this.addAriaAttributes();
        }
    };
    FacetSearchElement.prototype.setupFacetSearchResultsEvents = function (el) {
        var _this = this;
        Dom_1.$$(el).on('mousemove', function () {
            _this.setAsCurrentResult(Dom_1.$$(el));
        });
        // Prevent closing the search results on the end of a touch drag
        var touchDragging = false;
        var mouseDragging = false;
        Dom_1.$$(el).on('mousedown', function () { return (mouseDragging = false); });
        Dom_1.$$(el).on('mousemove', function () { return (mouseDragging = true); });
        Dom_1.$$(el).on('touchmove', function () { return (touchDragging = true); });
        Dom_1.$$(el).on('mouseup touchend', function () {
            if (!touchDragging && !mouseDragging) {
                setTimeout(function () {
                    _this.facetSearch.dismissSearchResults();
                }, 0); // setTimeout is to give time to trigger the click event before hiding the search menu.
            }
            touchDragging = false;
            mouseDragging = false;
        });
    };
    FacetSearchElement.prototype.hideSearchResultsElement = function () {
        this.removeAriaAttributes();
        Dom_1.$$(this.searchResults).hide();
        Dom_1.$$(this.searchResults).remove();
    };
    FacetSearchElement.prototype.clearSearchInput = function () {
        if (this.input) {
            this.input.value = '';
        }
    };
    FacetSearchElement.prototype.buildMagnifierIcon = function () {
        var magnifier = document.createElement('div');
        magnifier.innerHTML = SVGIcons_1.SVGIcons.icons.search;
        Dom_1.$$(magnifier).addClass('coveo-facet-search-magnifier');
        SVGDom_1.SVGDom.addClassToSVGInContainer(magnifier, 'coveo-facet-search-magnifier-svg');
        this.search.appendChild(magnifier);
        return magnifier;
    };
    FacetSearchElement.prototype.buildWaitIcon = function () {
        var wait = document.createElement('div');
        wait.innerHTML = SVGIcons_1.SVGIcons.icons.loading;
        Dom_1.$$(wait).addClass('coveo-facet-search-wait-animation');
        SVGDom_1.SVGDom.addClassToSVGInContainer(wait, 'coveo-facet-search-wait-animation-svg');
        return wait;
    };
    FacetSearchElement.prototype.buildInputElement = function () {
        return Dom_1.$$('input', {
            className: 'coveo-facet-search-input',
            type: 'text',
            autocapitalize: 'off',
            autocorrect: 'off',
            ariaLabel: Strings_1.l('SearchFacetResults', this.facetSearch.facetTitle),
            ariaHaspopup: 'true',
            ariaAutocomplete: 'list'
        }).el;
    };
    FacetSearchElement.prototype.handleScrollEvent = function () {
        if (this.triggeredScroll) {
            this.triggeredScroll = false;
        }
        else {
            this.facetSearchUserInputHandler.handleFacetSearchResultsScroll();
        }
    };
    FacetSearchElement.prototype.addAriaAttributes = function () {
        Iif (!this.input || !this.combobox) {
            return;
        }
        this.combobox.setAttribute('role', 'combobox');
        this.combobox.setAttribute('aria-owns', this.facetSearchId);
        this.input.setAttribute('aria-controls', this.facetSearchId);
        this.input.setAttribute('aria-expanded', 'true');
        this.facetSearch.setExpandedFacetSearchAccessibilityAttributes(this.searchResults);
    };
    FacetSearchElement.prototype.removeAriaAttributes = function () {
        if (!this.input || !this.combobox) {
            return;
        }
        this.combobox.removeAttribute('role');
        this.combobox.removeAttribute('aria-owns');
        this.input.removeAttribute('aria-controls');
        this.input.removeAttribute('aria-activedescendant');
        this.input.setAttribute('aria-expanded', 'false');
        this.facetSearch.setCollapsedFacetSearchAccessibilityAttributes();
    };
    return FacetSearchElement;
}());
exports.FacetSearchElement = FacetSearchElement;
 
 
/***/ }),
/* 331 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
var Template_1 = __webpack_require__(29);
var DefaultRecommendationTemplate = /** @class */ (function (_super) {
    __extends(DefaultRecommendationTemplate, _super);
    function DefaultRecommendationTemplate() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    DefaultRecommendationTemplate.prototype.instantiateToString = function (object) {
        var template = "<div class=\"coveo-result-frame\">\n        <div class=\"coveo-result-row\">\n          <div class=\"coveo-result-cell\" style=\"width:40px;text-align:center;vertical-align:middle;\">\n            <span class=\"CoveoIcon\" data-small=\"true\" data-with-label=\"false\">\n            </span>\n          </div>\n          <div class=\"coveo-result-cell\" style=\"padding:0 0 3px 5px;vertical-align:middle\">\n            <div class=\"coveo-result-row\">\n              <div class=\"coveo-result-cell\" style=\"font-size:10pt;\">\n                <a class=\"CoveoResultLink\" style=\"display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis\">\n                </a>\n              </div>\n            </div>\n          </div>\n        </div>\n      </div>";
        return template;
    };
    DefaultRecommendationTemplate.prototype.instantiateToElement = function (object) {
        var _this = this;
        return new Promise(function (resolve, reject) {
            var div = document.createElement('div');
            div.innerHTML = _this.instantiateToString(object);
            resolve(div);
        });
    };
    return DefaultRecommendationTemplate;
}(Template_1.Template));
exports.DefaultRecommendationTemplate = DefaultRecommendationTemplate;
 
 
/***/ }),
/* 332 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Component_1 = __webpack_require__(6);
var _ = __webpack_require__(1);
var ResultListRenderer = /** @class */ (function () {
    function ResultListRenderer(resultListOptions, autoCreateComponentsFn) {
        this.resultListOptions = resultListOptions;
        this.autoCreateComponentsFn = autoCreateComponentsFn;
    }
    ResultListRenderer.prototype.renderResults = function (resultElements, append, resultDisplayedCallback) {
        var _this = this;
        Iif (append === void 0) { append = false; }
        return Promise.all([this.getStartFragment(resultElements, append), this.getEndFragment(resultElements, append)]).then(function (_a) {
            var startFrag = _a[0], endFrag = _a[1];
            var resultsFragment = document.createDocumentFragment();
            if (startFrag) {
                resultsFragment.appendChild(startFrag);
            }
            _.each(resultElements, function (resultElement) {
                resultsFragment.appendChild(resultElement);
                resultDisplayedCallback(Component_1.Component.getResult(resultElement), resultElement);
            });
            if (endFrag) {
                resultsFragment.appendChild(endFrag);
            }
            _this.resultListOptions.resultsContainer.appendChild(resultsFragment);
        });
    };
    ResultListRenderer.prototype.getStartFragment = function (resultElements, append) {
        return Promise.resolve(document.createDocumentFragment());
    };
    ResultListRenderer.prototype.getEndFragment = function (resultElements, append) {
        return Promise.resolve(document.createDocumentFragment());
    };
    return ResultListRenderer;
}());
exports.ResultListRenderer = ResultListRenderer;
 
 
/***/ }),
/* 333 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Strings_1 = __webpack_require__(4);
var FacetSettings_1 = __webpack_require__(241);
var Utils_1 = __webpack_require__(5);
var _ = __webpack_require__(1);
var FacetSort = /** @class */ (function () {
    function FacetSort(sorts, facet) {
        var _this = this;
        this.facet = facet;
        this.enabledSorts = [];
        this.customSortDirection = 'ascending';
        _.each(sorts, function (sortToActivate) {
            var newSortToEnable = FacetSettings_1.FacetSettings.availableSorts[sortToActivate.toLowerCase()];
            if (newSortToEnable != undefined) {
                _this.enabledSorts.push(newSortToEnable);
            }
        });
        this.removeEnabledSortsBasedOnFacetType();
        if (Utils_1.Utils.isNonEmptyArray(this.enabledSorts)) {
            Eif (this.facet.options.sortCriteria != undefined) {
                this.activeSort = _.find(this.enabledSorts, function (enabledSort) {
                    return enabledSort.name == _this.facet.options.sortCriteria;
                });
            }
            if (!this.activeSort) {
                this.activeSort = this.enabledSorts[0];
            }
        }
    }
    FacetSort.prototype.removeEnabledSortsBasedOnFacetType = function () {
        if (Coveo.FacetRange && this.facet instanceof Coveo.FacetRange) {
            var facetRange = this.facet;
            Iif (facetRange.options['slider']) {
                this.enabledSorts = [];
            }
        }
    };
    FacetSort.availableSorts = {
        score: {
            label: Strings_1.l('Score'),
            directionToggle: false,
            description: Strings_1.l('ScoreDescription'),
            name: 'score'
        },
        occurrences: {
            label: Strings_1.l('Occurrences'),
            directionToggle: false,
            description: Strings_1.l('OccurrencesDescription'),
            name: 'occurrences'
        },
        alphaascending: {
            label: Strings_1.l('Label'),
            directionToggle: true,
            description: Strings_1.l('LabelDescription'),
            name: 'alphaascending',
            relatedSort: 'alphadescending'
        },
        alphadescending: {
            label: Strings_1.l('Label'),
            directionToggle: true,
            description: Strings_1.l('LabelDescription'),
            name: 'alphadescending',
            relatedSort: 'alphaascending'
        },
        computedfieldascending: {
            label: Strings_1.l('Value'),
            directionToggle: true,
            description: Strings_1.l('ValueDescription'),
            name: 'computedfieldascending',
            relatedSort: 'computedfielddescending'
        },
        computedfielddescending: {
            label: Strings_1.l('Value'),
            directionToggle: true,
            description: Strings_1.l('ValueDescription'),
            name: 'computedfielddescending',
            relatedSort: 'computedfieldascending'
        },
        chisquare: {
            label: Strings_1.l('RelativeFrequency'),
            directionToggle: false,
            description: Strings_1.l('RelativeFrequencyDescription'),
            name: 'chisquare'
        },
        nosort: {
            label: Strings_1.l('Nosort'),
            directionToggle: false,
            description: Strings_1.l('NosortDescription'),
            name: 'nosort'
        },
        custom: {
            label: Strings_1.l('Custom'),
            directionToggle: true,
            description: Strings_1.l('CustomDescription'),
            name: 'custom',
            relatedSort: 'custom'
        }
    };
    return FacetSort;
}());
exports.FacetSort = FacetSort;
 
 
/***/ }),
/* 334 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Assert_1 = __webpack_require__(12);
var Utils_1 = __webpack_require__(5);
var FacetValue_1 = __webpack_require__(51);
var _ = __webpack_require__(1);
var FacetValues = /** @class */ (function () {
    function FacetValues(groupByResult) {
        if (Utils_1.Utils.exists(groupByResult)) {
            this.values = _.map(groupByResult.values, function (groupByValue) { return FacetValue_1.FacetValue.createFromGroupByValue(groupByValue); });
        }
        else {
            this.values = [];
        }
    }
    FacetValues.prototype.add = function (facetValue) {
        Assert_1.Assert.exists(facetValue);
        Assert_1.Assert.check(!this.contains(facetValue.value));
        this.values.push(facetValue);
    };
    FacetValues.prototype.remove = function (value) {
        Assert_1.Assert.isNonEmptyString(value);
        value = value;
        this.values = _.filter(this.values, function (elem) { return elem.value != value; });
    };
    FacetValues.prototype.size = function () {
        return this.values.length;
    };
    FacetValues.prototype.isEmpty = function () {
        return this.values.length == 0;
    };
    FacetValues.prototype.at = function (index) {
        Assert_1.Assert.isLargerOrEqualsThan(0, index);
        Assert_1.Assert.isSmallerThan(this.values.length, index);
        return this.values[index];
    };
    FacetValues.prototype.get = function (value) {
        return _.find(this.values, function (elem) { return elem.value.toLowerCase() == value.toLowerCase(); });
    };
    FacetValues.prototype.contains = function (value) {
        return Utils_1.Utils.exists(this.get(value));
    };
    FacetValues.prototype.getAll = function () {
        return this.values;
    };
    FacetValues.prototype.getSelected = function () {
        return _.filter(this.values, function (value) { return value.selected; });
    };
    FacetValues.prototype.getExcluded = function () {
        return _.filter(this.values, function (value) { return value.excluded; });
    };
    FacetValues.prototype.hasSelectedOrExcludedValues = function () {
        return this.getSelected().length != 0 || this.getExcluded().length != 0;
    };
    FacetValues.prototype.hasSelectedAndExcludedValues = function () {
        return this.getSelected().length != 0 && this.getExcluded().length != 0;
    };
    FacetValues.prototype.hasOnlyExcludedValues = function () {
        return this.getSelected().length == 0 && this.getExcluded().length != 0;
    };
    FacetValues.prototype.hasOnlySelectedValues = function () {
        return this.getSelected().length != 0 && this.getExcluded().length == 0;
    };
    FacetValues.prototype.reset = function () {
        _.each(this.values, function (elem) { return elem.reset(); });
    };
    FacetValues.prototype.importActiveValuesFromOtherList = function (other) {
        var _this = this;
        Assert_1.Assert.exists(other);
        _.each(other.getSelected(), function (otherValue) {
            var myValue = _this.get(otherValue.value);
            if (Utils_1.Utils.exists(myValue)) {
                myValue.selected = true;
            }
            else {
                _this.values.push(otherValue.cloneWithZeroOccurrences());
            }
        });
        _.each(other.getExcluded(), function (otherValue) {
            var myValue = _this.get(otherValue.value);
            Iif (Utils_1.Utils.exists(myValue)) {
                myValue.excluded = true;
            }
            else Eif (otherValue.occurrences != 0) {
                var occurrences = otherValue.occurrences;
                var clone = otherValue.cloneWithZeroOccurrences();
                clone.occurrences = occurrences;
                _this.values.push(clone);
            }
            else {
                _this.values.push(otherValue.cloneWithZeroOccurrences());
            }
        });
    };
    FacetValues.prototype.updateCountsFromNewValues = function (newValues) {
        Assert_1.Assert.exists(newValues);
        this.values = _.map(this.values, function (myValue) {
            var newValue = newValues.get(myValue.value);
            if (Utils_1.Utils.exists(newValue)) {
                myValue.updateCountsFromNewValue(newValue);
                return myValue;
            }
            else if (myValue.occurrences == null) {
                return myValue.cloneWithZeroOccurrences();
            }
            return myValue;
        });
    };
    FacetValues.prototype.updateDeltaWithFilteredFacetValues = function (filtered, isMultiValueField) {
        var _this = this;
        Assert_1.Assert.exists(filtered);
        _.each(this.values, function (unfilteredValue) {
            var filteredValue = filtered.get(unfilteredValue.value);
            unfilteredValue.waitingForDelta = false;
            Iif (Utils_1.Utils.exists(filteredValue)) {
                if (unfilteredValue.occurrences - filteredValue.occurrences > 0) {
                    // When there are only exclusion in the facet, there should be no "delta"
                    // The number of value for each facet will be what is selected, no addition.
                    if (_this.hasOnlyExcludedValues()) {
                        unfilteredValue.delta = null;
                        unfilteredValue.occurrences = filteredValue.occurrences;
                    }
                    else {
                        unfilteredValue.delta = unfilteredValue.occurrences - filteredValue.occurrences;
                    }
                }
                else {
                    unfilteredValue.delta = null;
                }
            }
            else if (!unfilteredValue.selected && !unfilteredValue.excluded) {
                Iif (isMultiValueField && filtered.values.length == 0) {
                    unfilteredValue.delta = null;
                    unfilteredValue.occurrences = 0;
                }
                else {
                    unfilteredValue.delta = unfilteredValue.occurrences;
                }
            }
        });
    };
    FacetValues.prototype.mergeWithUnfilteredFacetValues = function (unfiltered) {
        var _this = this;
        Assert_1.Assert.exists(unfiltered);
        var values = [];
        _.each(unfiltered.values, function (unfilteredValue) {
            var filteredValue = _this.get(unfilteredValue.value);
            if (Utils_1.Utils.exists(filteredValue)) {
                if (filteredValue.occurrences == unfilteredValue.occurrences) {
                    values.push(filteredValue);
                }
                else {
                    values.push(unfilteredValue.cloneWithDelta(unfilteredValue.occurrences, unfilteredValue.occurrences - filteredValue.occurrences));
                }
            }
            else {
                values.push(unfilteredValue.cloneWithDelta(unfilteredValue.occurrences, unfilteredValue.occurrences));
            }
        });
        var index = 0;
        _.each(this.values, function (value) {
            var unfilteredValue = unfiltered.get(value.value);
            if (!Utils_1.Utils.exists(unfilteredValue)) {
                if (value.selected || value.excluded) {
                    values.splice(index, 0, value);
                    index++;
                }
            }
            else {
                for (var i = 0; i < values.length; i++) {
                    if (values[i].value == value.value) {
                        index = i + 1;
                        break;
                    }
                }
            }
        });
        this.values = values;
    };
    FacetValues.prototype.sort = function (options) {
        var facetValuesOrder = options.facetValuesOrder, numberOfValues = options.numberOfValues;
        this.values = facetValuesOrder.reorderValuesIfUsingAlphabeticalSort(this.values);
        this.sortValuesDependingOnStatus(numberOfValues);
        this.values = facetValuesOrder.reorderValuesIfUsingCustomSort(this.values);
    };
    FacetValues.prototype.sortValuesDependingOnStatus = function (numOfDisplayedValues) {
        this.values = _.sortBy(this.values, function (value) {
            if (value.selected) {
                return 1;
            }
            else if (value.excluded) {
                return 3;
            }
            else {
                return 2;
            }
        });
        this.ensureExcludedValuesAreDisplayed(numOfDisplayedValues);
    };
    FacetValues.prototype.ensureExcludedValuesAreDisplayed = function (numOfDisplayedValues) {
        if (numOfDisplayedValues != null && numOfDisplayedValues < this.values.length) {
            var nbExclude = this.getExcluded().length;
            var excludedValues = this.values.splice(this.values.length - nbExclude, nbExclude);
            (_a = this.values).splice.apply(_a, [numOfDisplayedValues - nbExclude, 0].concat(excludedValues));
        }
        var _a;
    };
    return FacetValues;
}());
exports.FacetValues = FacetValues;
 
 
/***/ }),
/* 335 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__number__ = __webpack_require__(187);
 
 
/* harmony default export */ __webpack_exports__["a"] = (function(values, p, valueof) {
  if (valueof == null) valueof = __WEBPACK_IMPORTED_MODULE_0__number__["a" /* default */];
  if (!(n = values.length)) return;
  if ((p = +p) <= 0 || n < 2) return +valueof(values[0], 0, values);
  if (p >= 1) return +valueof(values[n - 1], n - 1, values);
  var n,
      i = (n - 1) * p,
      i0 = Math.floor(i),
      value0 = +valueof(values[i0], i0, values),
      value1 = +valueof(values[i0 + 1], i0 + 1, values);
  return value0 + (value1 - value0) * (i - i0);
});
 
 
/***/ }),
/* 336 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__drag_js__ = __webpack_require__(1151);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_0__drag_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__nodrag_js__ = __webpack_require__(715);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return __WEBPACK_IMPORTED_MODULE_1__nodrag_js__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return __WEBPACK_IMPORTED_MODULE_1__nodrag_js__["b"]; });
 
 
 
 
/***/ }),
/* 337 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__namespaces__ = __webpack_require__(338);
 
 
/* harmony default export */ __webpack_exports__["a"] = (function(name) {
  var prefix = name += "", i = prefix.indexOf(":");
  Iif (i >= 0 && (prefix = name.slice(0, i)) !== "xmlns") name = name.slice(i + 1);
  return __WEBPACK_IMPORTED_MODULE_0__namespaces__["a" /* default */].hasOwnProperty(prefix) ? {space: __WEBPACK_IMPORTED_MODULE_0__namespaces__["a" /* default */][prefix], local: name} : name;
});
 
 
/***/ }),
/* 338 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return xhtml; });
var xhtml = "http://www.w3.org/1999/xhtml";
 
/* harmony default export */ __webpack_exports__["a"] = ({
  svg: "http://www.w3.org/2000/svg",
  xhtml: xhtml,
  xlink: "http://www.w3.org/1999/xlink",
  xml: "http://www.w3.org/XML/1998/namespace",
  xmlns: "http://www.w3.org/2000/xmlns/"
});
 
 
/***/ }),
/* 339 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
function none() {}
 
/* harmony default export */ __webpack_exports__["a"] = (function(selector) {
  return selector == null ? none : function() {
    return this.querySelector(selector);
  };
});
 
 
/***/ }),
/* 340 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony default export */ __webpack_exports__["a"] = (function(node) {
  return (node.ownerDocument && node.ownerDocument.defaultView) // node is a Node
      || (node.document && node) // node is a Window
      || node.defaultView; // node is a Document
});
 
 
/***/ }),
/* 341 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return event; });
/* harmony export (immutable) */ __webpack_exports__["a"] = customEvent;
var filterEvents = {};
 
var event = null;
 
Eif (typeof document !== "undefined") {
  var element = document.documentElement;
  Iif (!("onmouseenter" in element)) {
    filterEvents = {mouseenter: "mouseover", mouseleave: "mouseout"};
  }
}
 
function filterContextListener(listener, index, group) {
  listener = contextListener(listener, index, group);
  return function(event) {
    var related = event.relatedTarget;
    if (!related || (related !== this && !(related.compareDocumentPosition(this) & 8))) {
      listener.call(this, event);
    }
  };
}
 
function contextListener(listener, index, group) {
  return function(event1) {
    var event0 = event; // Events can be reentrant (e.g., focus).
    event = event1;
    try {
      listener.call(this, this.__data__, index, group);
    } finally {
      event = event0;
    }
  };
}
 
function parseTypenames(typenames) {
  return typenames.trim().split(/^|\s+/).map(function(t) {
    var name = "", i = t.indexOf(".");
    Iif (i >= 0) name = t.slice(i + 1), t = t.slice(0, i);
    return {type: t, name: name};
  });
}
 
function onRemove(typename) {
  return function() {
    var on = this.__on;
    if (!on) return;
    for (var j = 0, i = -1, m = on.length, o; j < m; ++j) {
      if (o = on[j], (!typename.type || o.type === typename.type) && o.name === typename.name) {
        this.removeEventListener(o.type, o.listener, o.capture);
      } else {
        on[++i] = o;
      }
    }
    if (++i) on.length = i;
    else delete this.__on;
  };
}
 
function onAdd(typename, value, capture) {
  var wrap = filterEvents.hasOwnProperty(typename.type) ? filterContextListener : contextListener;
  return function(d, i, group) {
    var on = this.__on, o, listener = wrap(value, i, group);
    if (on) for (var j = 0, m = on.length; j < m; ++j) {
      Iif ((o = on[j]).type === typename.type && o.name === typename.name) {
        this.removeEventListener(o.type, o.listener, o.capture);
        this.addEventListener(o.type, o.listener = listener, o.capture = capture);
        o.value = value;
        return;
      }
    }
    this.addEventListener(typename.type, listener, capture);
    o = {type: typename.type, name: typename.name, value: value, listener: listener, capture: capture};
    if (!on) this.__on = [o];
    else on.push(o);
  };
}
 
/* harmony default export */ __webpack_exports__["b"] = (function(typename, value, capture) {
  var typenames = parseTypenames(typename + ""), i, n = typenames.length, t;
 
  Iif (arguments.length < 2) {
    var on = this.node().__on;
    if (on) for (var j = 0, m = on.length, o; j < m; ++j) {
      for (i = 0, o = on[j]; i < n; ++i) {
        if ((t = typenames[i]).type === o.type && t.name === o.name) {
          return o.value;
        }
      }
    }
    return;
  }
 
  on = value ? onAdd : onRemove;
  Eif (capture == null) capture = false;
  for (i = 0; i < n; ++i) this.each(on(typenames[i], value, capture));
  return this;
});
 
function customEvent(event1, listener, that, args) {
  var event0 = event;
  event1.sourceEvent = event;
  event = event1;
  try {
    return listener.apply(that, args);
  } finally {
    event = event0;
  }
}
 
 
/***/ }),
/* 342 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__selection_on__ = __webpack_require__(341);
 
 
/* harmony default export */ __webpack_exports__["a"] = (function() {
  var current = __WEBPACK_IMPORTED_MODULE_0__selection_on__["c" /* event */], source;
  while (source = current.sourceEvent) current = source;
  return current;
});
 
 
/***/ }),
/* 343 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_d3_color__ = __webpack_require__(74);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__rgb_js__ = __webpack_require__(718);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__array_js__ = __webpack_require__(721);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__date_js__ = __webpack_require__(722);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__number_js__ = __webpack_require__(246);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__object_js__ = __webpack_require__(723);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__string_js__ = __webpack_require__(724);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__constant_js__ = __webpack_require__(720);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__numberArray_js__ = __webpack_require__(347);
 
 
 
 
 
 
 
 
 
 
/* harmony default export */ __webpack_exports__["a"] = (function(a, b) {
  var t = typeof b, c;
  return b == null || t === "boolean" ? Object(__WEBPACK_IMPORTED_MODULE_7__constant_js__["a" /* default */])(b)
      : (t === "number" ? __WEBPACK_IMPORTED_MODULE_4__number_js__["a" /* default */]
      : t === "string" ? ((c = Object(__WEBPACK_IMPORTED_MODULE_0_d3_color__["a" /* color */])(b)) ? (b = c, __WEBPACK_IMPORTED_MODULE_1__rgb_js__["a" /* default */]) : __WEBPACK_IMPORTED_MODULE_6__string_js__["a" /* default */])
      : b instanceof __WEBPACK_IMPORTED_MODULE_0_d3_color__["a" /* color */] ? __WEBPACK_IMPORTED_MODULE_1__rgb_js__["a" /* default */]
      : b instanceof Date ? __WEBPACK_IMPORTED_MODULE_3__date_js__["a" /* default */]
      : Object(__WEBPACK_IMPORTED_MODULE_8__numberArray_js__["b" /* isNumberArray */])(b) ? __WEBPACK_IMPORTED_MODULE_8__numberArray_js__["a" /* default */]
      : Array.isArray(b) ? __WEBPACK_IMPORTED_MODULE_2__array_js__["b" /* genericArray */]
      : typeof b.valueOf !== "function" && typeof b.toString !== "function" || isNaN(b) ? __WEBPACK_IMPORTED_MODULE_5__object_js__["a" /* default */]
      : __WEBPACK_IMPORTED_MODULE_4__number_js__["a" /* default */])(a, b);
});
 
 
/***/ }),
/* 344 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = Color;
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return darker; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return brighter; });
/* harmony export (immutable) */ __webpack_exports__["e"] = color;
/* harmony export (immutable) */ __webpack_exports__["h"] = rgbConvert;
/* harmony export (immutable) */ __webpack_exports__["g"] = rgb;
/* harmony export (immutable) */ __webpack_exports__["b"] = Rgb;
/* unused harmony export hslConvert */
/* harmony export (immutable) */ __webpack_exports__["f"] = hsl;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__define_js__ = __webpack_require__(345);
 
 
function Color() {}
 
var darker = 0.7;
var brighter = 1 / darker;
 
var reI = "\\s*([+-]?\\d+)\\s*",
    reN = "\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",
    reP = "\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",
    reHex = /^#([0-9a-f]{3,8})$/,
    reRgbInteger = new RegExp("^rgb\\(" + [reI, reI, reI] + "\\)$"),
    reRgbPercent = new RegExp("^rgb\\(" + [reP, reP, reP] + "\\)$"),
    reRgbaInteger = new RegExp("^rgba\\(" + [reI, reI, reI, reN] + "\\)$"),
    reRgbaPercent = new RegExp("^rgba\\(" + [reP, reP, reP, reN] + "\\)$"),
    reHslPercent = new RegExp("^hsl\\(" + [reN, reP, reP] + "\\)$"),
    reHslaPercent = new RegExp("^hsla\\(" + [reN, reP, reP, reN] + "\\)$");
 
var named = {
  aliceblue: 0xf0f8ff,
  antiquewhite: 0xfaebd7,
  aqua: 0x00ffff,
  aquamarine: 0x7fffd4,
  azure: 0xf0ffff,
  beige: 0xf5f5dc,
  bisque: 0xffe4c4,
  black: 0x000000,
  blanchedalmond: 0xffebcd,
  blue: 0x0000ff,
  blueviolet: 0x8a2be2,
  brown: 0xa52a2a,
  burlywood: 0xdeb887,
  cadetblue: 0x5f9ea0,
  chartreuse: 0x7fff00,
  chocolate: 0xd2691e,
  coral: 0xff7f50,
  cornflowerblue: 0x6495ed,
  cornsilk: 0xfff8dc,
  crimson: 0xdc143c,
  cyan: 0x00ffff,
  darkblue: 0x00008b,
  darkcyan: 0x008b8b,
  darkgoldenrod: 0xb8860b,
  darkgray: 0xa9a9a9,
  darkgreen: 0x006400,
  darkgrey: 0xa9a9a9,
  darkkhaki: 0xbdb76b,
  darkmagenta: 0x8b008b,
  darkolivegreen: 0x556b2f,
  darkorange: 0xff8c00,
  darkorchid: 0x9932cc,
  darkred: 0x8b0000,
  darksalmon: 0xe9967a,
  darkseagreen: 0x8fbc8f,
  darkslateblue: 0x483d8b,
  darkslategray: 0x2f4f4f,
  darkslategrey: 0x2f4f4f,
  darkturquoise: 0x00ced1,
  darkviolet: 0x9400d3,
  deeppink: 0xff1493,
  deepskyblue: 0x00bfff,
  dimgray: 0x696969,
  dimgrey: 0x696969,
  dodgerblue: 0x1e90ff,
  firebrick: 0xb22222,
  floralwhite: 0xfffaf0,
  forestgreen: 0x228b22,
  fuchsia: 0xff00ff,
  gainsboro: 0xdcdcdc,
  ghostwhite: 0xf8f8ff,
  gold: 0xffd700,
  goldenrod: 0xdaa520,
  gray: 0x808080,
  green: 0x008000,
  greenyellow: 0xadff2f,
  grey: 0x808080,
  honeydew: 0xf0fff0,
  hotpink: 0xff69b4,
  indianred: 0xcd5c5c,
  indigo: 0x4b0082,
  ivory: 0xfffff0,
  khaki: 0xf0e68c,
  lavender: 0xe6e6fa,
  lavenderblush: 0xfff0f5,
  lawngreen: 0x7cfc00,
  lemonchiffon: 0xfffacd,
  lightblue: 0xadd8e6,
  lightcoral: 0xf08080,
  lightcyan: 0xe0ffff,
  lightgoldenrodyellow: 0xfafad2,
  lightgray: 0xd3d3d3,
  lightgreen: 0x90ee90,
  lightgrey: 0xd3d3d3,
  lightpink: 0xffb6c1,
  lightsalmon: 0xffa07a,
  lightseagreen: 0x20b2aa,
  lightskyblue: 0x87cefa,
  lightslategray: 0x778899,
  lightslategrey: 0x778899,
  lightsteelblue: 0xb0c4de,
  lightyellow: 0xffffe0,
  lime: 0x00ff00,
  limegreen: 0x32cd32,
  linen: 0xfaf0e6,
  magenta: 0xff00ff,
  maroon: 0x800000,
  mediumaquamarine: 0x66cdaa,
  mediumblue: 0x0000cd,
  mediumorchid: 0xba55d3,
  mediumpurple: 0x9370db,
  mediumseagreen: 0x3cb371,
  mediumslateblue: 0x7b68ee,
  mediumspringgreen: 0x00fa9a,
  mediumturquoise: 0x48d1cc,
  mediumvioletred: 0xc71585,
  midnightblue: 0x191970,
  mintcream: 0xf5fffa,
  mistyrose: 0xffe4e1,
  moccasin: 0xffe4b5,
  navajowhite: 0xffdead,
  navy: 0x000080,
  oldlace: 0xfdf5e6,
  olive: 0x808000,
  olivedrab: 0x6b8e23,
  orange: 0xffa500,
  orangered: 0xff4500,
  orchid: 0xda70d6,
  palegoldenrod: 0xeee8aa,
  palegreen: 0x98fb98,
  paleturquoise: 0xafeeee,
  palevioletred: 0xdb7093,
  papayawhip: 0xffefd5,
  peachpuff: 0xffdab9,
  peru: 0xcd853f,
  pink: 0xffc0cb,
  plum: 0xdda0dd,
  powderblue: 0xb0e0e6,
  purple: 0x800080,
  rebeccapurple: 0x663399,
  red: 0xff0000,
  rosybrown: 0xbc8f8f,
  royalblue: 0x4169e1,
  saddlebrown: 0x8b4513,
  salmon: 0xfa8072,
  sandybrown: 0xf4a460,
  seagreen: 0x2e8b57,
  seashell: 0xfff5ee,
  sienna: 0xa0522d,
  silver: 0xc0c0c0,
  skyblue: 0x87ceeb,
  slateblue: 0x6a5acd,
  slategray: 0x708090,
  slategrey: 0x708090,
  snow: 0xfffafa,
  springgreen: 0x00ff7f,
  steelblue: 0x4682b4,
  tan: 0xd2b48c,
  teal: 0x008080,
  thistle: 0xd8bfd8,
  tomato: 0xff6347,
  turquoise: 0x40e0d0,
  violet: 0xee82ee,
  wheat: 0xf5deb3,
  white: 0xffffff,
  whitesmoke: 0xf5f5f5,
  yellow: 0xffff00,
  yellowgreen: 0x9acd32
};
 
Object(__WEBPACK_IMPORTED_MODULE_0__define_js__["a" /* default */])(Color, color, {
  copy: function(channels) {
    return Object.assign(new this.constructor, this, channels);
  },
  displayable: function() {
    return this.rgb().displayable();
  },
  hex: color_formatHex, // Deprecated! Use color.formatHex.
  formatHex: color_formatHex,
  formatHsl: color_formatHsl,
  formatRgb: color_formatRgb,
  toString: color_formatRgb
});
 
function color_formatHex() {
  return this.rgb().formatHex();
}
 
function color_formatHsl() {
  return hslConvert(this).formatHsl();
}
 
function color_formatRgb() {
  return this.rgb().formatRgb();
}
 
function color(format) {
  var m, l;
  format = (format + "").trim().toLowerCase();
  return (m = reHex.exec(format)) ? (l = m[1].length, m = parseInt(m[1], 16), l === 6 ? rgbn(m) // #ff0000
      : l === 3 ? new Rgb((m >> 8 & 0xf) | (m >> 4 & 0xf0), (m >> 4 & 0xf) | (m & 0xf0), ((m & 0xf) << 4) | (m & 0xf), 1) // #f00
      : l === 8 ? rgba(m >> 24 & 0xff, m >> 16 & 0xff, m >> 8 & 0xff, (m & 0xff) / 0xff) // #ff000000
      : l === 4 ? rgba((m >> 12 & 0xf) | (m >> 8 & 0xf0), (m >> 8 & 0xf) | (m >> 4 & 0xf0), (m >> 4 & 0xf) | (m & 0xf0), (((m & 0xf) << 4) | (m & 0xf)) / 0xff) // #f000
      : null) // invalid hex
      : (m = reRgbInteger.exec(format)) ? new Rgb(m[1], m[2], m[3], 1) // rgb(255, 0, 0)
      : (m = reRgbPercent.exec(format)) ? new Rgb(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, 1) // rgb(100%, 0%, 0%)
      : (m = reRgbaInteger.exec(format)) ? rgba(m[1], m[2], m[3], m[4]) // rgba(255, 0, 0, 1)
      : (m = reRgbaPercent.exec(format)) ? rgba(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, m[4]) // rgb(100%, 0%, 0%, 1)
      : (m = reHslPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, 1) // hsl(120, 50%, 50%)
      : (m = reHslaPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, m[4]) // hsla(120, 50%, 50%, 1)
      : named.hasOwnProperty(format) ? rgbn(named[format]) // eslint-disable-line no-prototype-builtins
      : format === "transparent" ? new Rgb(NaN, NaN, NaN, 0)
      : null;
}
 
function rgbn(n) {
  return new Rgb(n >> 16 & 0xff, n >> 8 & 0xff, n & 0xff, 1);
}
 
function rgba(r, g, b, a) {
  if (a <= 0) r = g = b = NaN;
  return new Rgb(r, g, b, a);
}
 
function rgbConvert(o) {
  Eif (!(o instanceof Color)) o = color(o);
  Iif (!o) return new Rgb;
  o = o.rgb();
  return new Rgb(o.r, o.g, o.b, o.opacity);
}
 
function rgb(r, g, b, opacity) {
  return arguments.length === 1 ? rgbConvert(r) : new Rgb(r, g, b, opacity == null ? 1 : opacity);
}
 
function Rgb(r, g, b, opacity) {
  this.r = +r;
  this.g = +g;
  this.b = +b;
  this.opacity = +opacity;
}
 
Object(__WEBPACK_IMPORTED_MODULE_0__define_js__["a" /* default */])(Rgb, rgb, Object(__WEBPACK_IMPORTED_MODULE_0__define_js__["b" /* extend */])(Color, {
  brighter: function(k) {
    k = k == null ? brighter : Math.pow(brighter, k);
    return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);
  },
  darker: function(k) {
    k = k == null ? darker : Math.pow(darker, k);
    return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);
  },
  rgb: function() {
    return this;
  },
  displayable: function() {
    return (-0.5 <= this.r && this.r < 255.5)
        && (-0.5 <= this.g && this.g < 255.5)
        && (-0.5 <= this.b && this.b < 255.5)
        && (0 <= this.opacity && this.opacity <= 1);
  },
  hex: rgb_formatHex, // Deprecated! Use color.formatHex.
  formatHex: rgb_formatHex,
  formatRgb: rgb_formatRgb,
  toString: rgb_formatRgb
}));
 
function rgb_formatHex() {
  return "#" + hex(this.r) + hex(this.g) + hex(this.b);
}
 
function rgb_formatRgb() {
  var a = this.opacity; a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a));
  return (a === 1 ? "rgb(" : "rgba(")
      + Math.max(0, Math.min(255, Math.round(this.r) || 0)) + ", "
      + Math.max(0, Math.min(255, Math.round(this.g) || 0)) + ", "
      + Math.max(0, Math.min(255, Math.round(this.b) || 0))
      + (a === 1 ? ")" : ", " + a + ")");
}
 
function hex(value) {
  value = Math.max(0, Math.min(255, Math.round(value) || 0));
  return (value < 16 ? "0" : "") + value.toString(16);
}
 
function hsla(h, s, l, a) {
  if (a <= 0) h = s = l = NaN;
  else if (l <= 0 || l >= 1) h = s = NaN;
  else if (s <= 0) h = NaN;
  return new Hsl(h, s, l, a);
}
 
function hslConvert(o) {
  if (o instanceof Hsl) return new Hsl(o.h, o.s, o.l, o.opacity);
  if (!(o instanceof Color)) o = color(o);
  if (!o) return new Hsl;
  if (o instanceof Hsl) return o;
  o = o.rgb();
  var r = o.r / 255,
      g = o.g / 255,
      b = o.b / 255,
      min = Math.min(r, g, b),
      max = Math.max(r, g, b),
      h = NaN,
      s = max - min,
      l = (max + min) / 2;
  if (s) {
    if (r === max) h = (g - b) / s + (g < b) * 6;
    else if (g === max) h = (b - r) / s + 2;
    else h = (r - g) / s + 4;
    s /= l < 0.5 ? max + min : 2 - max - min;
    h *= 60;
  } else {
    s = l > 0 && l < 1 ? 0 : h;
  }
  return new Hsl(h, s, l, o.opacity);
}
 
function hsl(h, s, l, opacity) {
  return arguments.length === 1 ? hslConvert(h) : new Hsl(h, s, l, opacity == null ? 1 : opacity);
}
 
function Hsl(h, s, l, opacity) {
  this.h = +h;
  this.s = +s;
  this.l = +l;
  this.opacity = +opacity;
}
 
Object(__WEBPACK_IMPORTED_MODULE_0__define_js__["a" /* default */])(Hsl, hsl, Object(__WEBPACK_IMPORTED_MODULE_0__define_js__["b" /* extend */])(Color, {
  brighter: function(k) {
    k = k == null ? brighter : Math.pow(brighter, k);
    return new Hsl(this.h, this.s, this.l * k, this.opacity);
  },
  darker: function(k) {
    k = k == null ? darker : Math.pow(darker, k);
    return new Hsl(this.h, this.s, this.l * k, this.opacity);
  },
  rgb: function() {
    var h = this.h % 360 + (this.h < 0) * 360,
        s = isNaN(h) || isNaN(this.s) ? 0 : this.s,
        l = this.l,
        m2 = l + (l < 0.5 ? l : 1 - l) * s,
        m1 = 2 * l - m2;
    return new Rgb(
      hsl2rgb(h >= 240 ? h - 240 : h + 120, m1, m2),
      hsl2rgb(h, m1, m2),
      hsl2rgb(h < 120 ? h + 240 : h - 120, m1, m2),
      this.opacity
    );
  },
  displayable: function() {
    return (0 <= this.s && this.s <= 1 || isNaN(this.s))
        && (0 <= this.l && this.l <= 1)
        && (0 <= this.opacity && this.opacity <= 1);
  },
  formatHsl: function() {
    var a = this.opacity; a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a));
    return (a === 1 ? "hsl(" : "hsla(")
        + (this.h || 0) + ", "
        + (this.s || 0) * 100 + "%, "
        + (this.l || 0) * 100 + "%"
        + (a === 1 ? ")" : ", " + a + ")");
  }
}));
 
/* From FvD 13.37, CSS Color Module Level 3 */
function hsl2rgb(h, m1, m2) {
  return (h < 60 ? m1 + (m2 - m1) * h / 60
      : h < 180 ? m2
      : h < 240 ? m1 + (m2 - m1) * (240 - h) / 60
      : m1) * 255;
}
 
 
/***/ }),
/* 345 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["b"] = extend;
/* harmony default export */ __webpack_exports__["a"] = (function(constructor, factory, prototype) {
  constructor.prototype = factory.prototype = prototype;
  prototype.constructor = constructor;
});
 
function extend(parent, definition) {
  var prototype = Object.create(parent.prototype);
  for (var key in definition) prototype[key] = definition[key];
  return prototype;
}
 
 
/***/ }),
/* 346 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = basis;
function basis(t1, v0, v1, v2, v3) {
  var t2 = t1 * t1, t3 = t2 * t1;
  return ((1 - 3 * t1 + 3 * t2 - t3) * v0
      + (4 - 6 * t2 + 3 * t3) * v1
      + (1 + 3 * t1 + 3 * t2 - 3 * t3) * v2
      + t3 * v3) / 6;
}
 
/* harmony default export */ __webpack_exports__["b"] = (function(values) {
  var n = values.length - 1;
  return function(t) {
    var i = t <= 0 ? (t = 0) : t >= 1 ? (t = 1, n - 1) : Math.floor(t * n),
        v1 = values[i],
        v2 = values[i + 1],
        v0 = i > 0 ? values[i - 1] : 2 * v1 - v2,
        v3 = i < n - 1 ? values[i + 2] : 2 * v2 - v1;
    return basis((t - i / n) * n, v0, v1, v2, v3);
  };
});
 
 
/***/ }),
/* 347 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["b"] = isNumberArray;
/* harmony default export */ __webpack_exports__["a"] = (function(a, b) {
  if (!b) b = [];
  var n = a ? Math.min(b.length, a.length) : 0,
      c = b.slice(),
      i;
  return function(t) {
    for (i = 0; i < n; ++i) c[i] = a[i] * (1 - t) + b[i] * t;
    return c;
  };
});
 
function isNumberArray(x) {
  return ArrayBuffer.isView(x) && !(x instanceof DataView);
}
 
 
/***/ }),
/* 348 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__selection_index_js__ = __webpack_require__(1204);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__transition_index_js__ = __webpack_require__(101);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return __WEBPACK_IMPORTED_MODULE_1__transition_index_js__["b"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__active_js__ = __webpack_require__(1237);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_2__active_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__interrupt_js__ = __webpack_require__(725);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return __WEBPACK_IMPORTED_MODULE_3__interrupt_js__["a"]; });
 
 
 
 
 
 
/***/ }),
/* 349 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["b"] = now;
/* harmony export (immutable) */ __webpack_exports__["a"] = Timer;
/* harmony export (immutable) */ __webpack_exports__["c"] = timer;
/* harmony export (immutable) */ __webpack_exports__["d"] = timerFlush;
var frame = 0, // is an animation frame pending?
    timeout = 0, // is a timeout pending?
    interval = 0, // are any timers active?
    pokeDelay = 1000, // how frequently we check for clock skew
    taskHead,
    taskTail,
    clockLast = 0,
    clockNow = 0,
    clockSkew = 0,
    clock = typeof performance === "object" && performance.now ? performance : Date,
    setFrame = typeof window === "object" && window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : function(f) { setTimeout(f, 17); };
 
function now() {
  return clockNow || (setFrame(clearNow), clockNow = clock.now() + clockSkew);
}
 
function clearNow() {
  clockNow = 0;
}
 
function Timer() {
  this._call =
  this._time =
  this._next = null;
}
 
Timer.prototype = timer.prototype = {
  constructor: Timer,
  restart: function(callback, delay, time) {
    if (typeof callback !== "function") throw new TypeError("callback is not a function");
    time = (time == null ? now() : +time) + (delay == null ? 0 : +delay);
    if (!this._next && taskTail !== this) {
      if (taskTail) taskTail._next = this;
      else taskHead = this;
      taskTail = this;
    }
    this._call = callback;
    this._time = time;
    sleep();
  },
  stop: function() {
    if (this._call) {
      this._call = null;
      this._time = Infinity;
      sleep();
    }
  }
};
 
function timer(callback, delay, time) {
  var t = new Timer;
  t.restart(callback, delay, time);
  return t;
}
 
function timerFlush() {
  now(); // Get the current time, if not already set.
  ++frame; // Pretend we’ve set an alarm, if we haven’t already.
  var t = taskHead, e;
  while (t) {
    if ((e = clockNow - t._time) >= 0) t._call.call(null, e);
    t = t._next;
  }
  --frame;
}
 
function wake() {
  clockNow = (clockLast = clock.now()) + clockSkew;
  frame = timeout = 0;
  try {
    timerFlush();
  } finally {
    frame = 0;
    nap();
    clockNow = 0;
  }
}
 
function poke() {
  var now = clock.now(), delay = now - clockLast;
  if (delay > pokeDelay) clockSkew -= delay, clockLast = now;
}
 
function nap() {
  var t0, t1 = taskHead, t2, time = Infinity;
  while (t1) {
    if (t1._call) {
      if (time > t1._time) time = t1._time;
      t0 = t1, t1 = t1._next;
    } else {
      t2 = t1._next, t1._next = null;
      t1 = t0 ? t0._next = t2 : taskHead = t2;
    }
  }
  taskTail = t0;
  sleep(time);
}
 
function sleep(time) {
  if (frame) return; // Soonest alarm already set, or will be.
  if (timeout) timeout = clearTimeout(timeout);
  var delay = time - clockNow; // Strictly less than if we recomputed clockNow.
  if (delay > 24) {
    if (time < Infinity) timeout = setTimeout(wake, time - clock.now() - clockSkew);
    if (interval) interval = clearInterval(interval);
  } else {
    if (!interval) clockLast = clock.now(), interval = setInterval(poke, pokeDelay);
    frame = 1, setFrame(wake);
  }
}
 
 
/***/ }),
/* 350 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return prefix; });
var prefix = "$";
 
function Map() {}
 
Map.prototype = map.prototype = {
  constructor: Map,
  has: function(key) {
    return (prefix + key) in this;
  },
  get: function(key) {
    return this[prefix + key];
  },
  set: function(key, value) {
    this[prefix + key] = value;
    return this;
  },
  remove: function(key) {
    var property = prefix + key;
    return property in this && delete this[property];
  },
  clear: function() {
    for (var property in this) if (property[0] === prefix) delete this[property];
  },
  keys: function() {
    var keys = [];
    for (var property in this) if (property[0] === prefix) keys.push(property.slice(1));
    return keys;
  },
  values: function() {
    var values = [];
    for (var property in this) if (property[0] === prefix) values.push(this[property]);
    return values;
  },
  entries: function() {
    var entries = [];
    for (var property in this) if (property[0] === prefix) entries.push({key: property.slice(1), value: this[property]});
    return entries;
  },
  size: function() {
    var size = 0;
    for (var property in this) if (property[0] === prefix) ++size;
    return size;
  },
  empty: function() {
    for (var property in this) if (property[0] === prefix) return false;
    return true;
  },
  each: function(f) {
    for (var property in this) if (property[0] === prefix) f(this[property], property.slice(1), this);
  }
};
 
function map(object, f) {
  var map = new Map;
 
  // Copy constructor.
  Iif (object instanceof Map) object.each(function(value, key) { map.set(key, value); });
 
  // Index array by numeric index or specified key function.
  else Iif (Array.isArray(object)) {
    var i = -1,
        n = object.length,
        o;
 
    if (f == null) while (++i < n) map.set(i, object[i]);
    else while (++i < n) map.set(f(o = object[i], i, object), o);
  }
 
  // Convert object to map.
  else Iif (object) for (var key in object) map.set(key, object[key]);
 
  return map;
}
 
/* harmony default export */ __webpack_exports__["a"] = (map);
 
 
/***/ }),
/* 351 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
var EOL = {},
    EOF = {},
    QUOTE = 34,
    NEWLINE = 10,
    RETURN = 13;
 
function objectConverter(columns) {
  return new Function("d", "return {" + columns.map(function(name, i) {
    return JSON.stringify(name) + ": d[" + i + "] || \"\"";
  }).join(",") + "}");
}
 
function customConverter(columns, f) {
  var object = objectConverter(columns);
  return function(row, i) {
    return f(object(row), i, columns);
  };
}
 
// Compute unique columns in order of discovery.
function inferColumns(rows) {
  var columnSet = Object.create(null),
      columns = [];
 
  rows.forEach(function(row) {
    for (var column in row) {
      if (!(column in columnSet)) {
        columns.push(columnSet[column] = column);
      }
    }
  });
 
  return columns;
}
 
function pad(value, width) {
  var s = value + "", length = s.length;
  return length < width ? new Array(width - length + 1).join(0) + s : s;
}
 
function formatYear(year) {
  return year < 0 ? "-" + pad(-year, 6)
    : year > 9999 ? "+" + pad(year, 6)
    : pad(year, 4);
}
 
function formatDate(date) {
  var hours = date.getUTCHours(),
      minutes = date.getUTCMinutes(),
      seconds = date.getUTCSeconds(),
      milliseconds = date.getUTCMilliseconds();
  return isNaN(date) ? "Invalid Date"
      : formatYear(date.getUTCFullYear(), 4) + "-" + pad(date.getUTCMonth() + 1, 2) + "-" + pad(date.getUTCDate(), 2)
      + (milliseconds ? "T" + pad(hours, 2) + ":" + pad(minutes, 2) + ":" + pad(seconds, 2) + "." + pad(milliseconds, 3) + "Z"
      : seconds ? "T" + pad(hours, 2) + ":" + pad(minutes, 2) + ":" + pad(seconds, 2) + "Z"
      : minutes || hours ? "T" + pad(hours, 2) + ":" + pad(minutes, 2) + "Z"
      : "");
}
 
/* harmony default export */ __webpack_exports__["a"] = (function(delimiter) {
  var reFormat = new RegExp("[\"" + delimiter + "\n\r]"),
      DELIMITER = delimiter.charCodeAt(0);
 
  function parse(text, f) {
    var convert, columns, rows = parseRows(text, function(row, i) {
      if (convert) return convert(row, i - 1);
      columns = row, convert = f ? customConverter(row, f) : objectConverter(row);
    });
    rows.columns = columns || [];
    return rows;
  }
 
  function parseRows(text, f) {
    var rows = [], // output rows
        N = text.length,
        I = 0, // current character index
        n = 0, // current line number
        t, // current token
        eof = N <= 0, // current token followed by EOF?
        eol = false; // current token followed by EOL?
 
    // Strip the trailing newline.
    if (text.charCodeAt(N - 1) === NEWLINE) --N;
    if (text.charCodeAt(N - 1) === RETURN) --N;
 
    function token() {
      if (eof) return EOF;
      if (eol) return eol = false, EOL;
 
      // Unescape quotes.
      var i, j = I, c;
      if (text.charCodeAt(j) === QUOTE) {
        while (I++ < N && text.charCodeAt(I) !== QUOTE || text.charCodeAt(++I) === QUOTE);
        if ((i = I) >= N) eof = true;
        else if ((c = text.charCodeAt(I++)) === NEWLINE) eol = true;
        else if (c === RETURN) { eol = true; if (text.charCodeAt(I) === NEWLINE) ++I; }
        return text.slice(j + 1, i - 1).replace(/""/g, "\"");
      }
 
      // Find next delimiter or newline.
      while (I < N) {
        if ((c = text.charCodeAt(i = I++)) === NEWLINE) eol = true;
        else if (c === RETURN) { eol = true; if (text.charCodeAt(I) === NEWLINE) ++I; }
        else if (c !== DELIMITER) continue;
        return text.slice(j, i);
      }
 
      // Return last token before EOF.
      return eof = true, text.slice(j, N);
    }
 
    while ((t = token()) !== EOF) {
      var row = [];
      while (t !== EOL && t !== EOF) row.push(t), t = token();
      if (f && (row = f(row, n++)) == null) continue;
      rows.push(row);
    }
 
    return rows;
  }
 
  function preformatBody(rows, columns) {
    return rows.map(function(row) {
      return columns.map(function(column) {
        return formatValue(row[column]);
      }).join(delimiter);
    });
  }
 
  function format(rows, columns) {
    if (columns == null) columns = inferColumns(rows);
    return [columns.map(formatValue).join(delimiter)].concat(preformatBody(rows, columns)).join("\n");
  }
 
  function formatBody(rows, columns) {
    if (columns == null) columns = inferColumns(rows);
    return preformatBody(rows, columns).join("\n");
  }
 
  function formatRows(rows) {
    return rows.map(formatRow).join("\n");
  }
 
  function formatRow(row) {
    return row.map(formatValue).join(delimiter);
  }
 
  function formatValue(value) {
    return value == null ? ""
        : value instanceof Date ? formatDate(value)
        : reFormat.test(value += "") ? "\"" + value.replace(/"/g, "\"\"") + "\""
        : value;
  }
 
  return {
    parse: parse,
    parseRows: parseRows,
    format: format,
    formatBody: formatBody,
    formatRows: formatRows,
    formatRow: formatRow,
    formatValue: formatValue
  };
});
 
 
/***/ }),
/* 352 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
function responseText(response) {
  if (!response.ok) throw new Error(response.status + " " + response.statusText);
  return response.text();
}
 
/* harmony default export */ __webpack_exports__["a"] = (function(input, init) {
  return fetch(input, init).then(responseText);
});
 
 
/***/ }),
/* 353 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony default export */ __webpack_exports__["a"] = (function() {
  return (Math.random() - 0.5) * 1e-6;
});
 
 
/***/ }),
/* 354 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__quadtree_js__ = __webpack_require__(1272);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_0__quadtree_js__["a"]; });
 
 
 
/***/ }),
/* 355 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony default export */ __webpack_exports__["a"] = (function(node, x0, y0, x1, y1) {
  this.node = node;
  this.x0 = x0;
  this.y0 = y0;
  this.x1 = x1;
  this.y1 = y1;
});
 
 
/***/ }),
/* 356 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__defaultLocale_js__ = __webpack_require__(1290);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return __WEBPACK_IMPORTED_MODULE_0__defaultLocale_js__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return __WEBPACK_IMPORTED_MODULE_0__defaultLocale_js__["b"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return __WEBPACK_IMPORTED_MODULE_0__defaultLocale_js__["c"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__locale_js__ = __webpack_require__(735);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return __WEBPACK_IMPORTED_MODULE_1__locale_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__formatSpecifier_js__ = __webpack_require__(736);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return __WEBPACK_IMPORTED_MODULE_2__formatSpecifier_js__["b"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_2__formatSpecifier_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__precisionFixed_js__ = __webpack_require__(1297);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return __WEBPACK_IMPORTED_MODULE_3__precisionFixed_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__precisionPrefix_js__ = __webpack_require__(1298);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return __WEBPACK_IMPORTED_MODULE_4__precisionPrefix_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__precisionRound_js__ = __webpack_require__(1299);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return __WEBPACK_IMPORTED_MODULE_5__precisionRound_js__["a"]; });
 
 
 
 
 
 
 
 
/***/ }),
/* 357 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony default export */ __webpack_exports__["a"] = (function(x) {
  return x;
});
 
 
/***/ }),
/* 358 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = conicEqualAreaRaw;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__math_js__ = __webpack_require__(19);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__conic_js__ = __webpack_require__(359);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__cylindricalEqualArea_js__ = __webpack_require__(1316);
 
 
 
 
function conicEqualAreaRaw(y0, y1) {
  var sy0 = Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["t" /* sin */])(y0), n = (sy0 + Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["t" /* sin */])(y1)) / 2;
 
  // Are the parallels symmetrical around the Equator?
  if (Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["a" /* abs */])(n) < __WEBPACK_IMPORTED_MODULE_0__math_js__["i" /* epsilon */]) return Object(__WEBPACK_IMPORTED_MODULE_2__cylindricalEqualArea_js__["a" /* cylindricalEqualAreaRaw */])(y0);
 
  var c = 1 + sy0 * (2 * n - sy0), r0 = Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["u" /* sqrt */])(c) / n;
 
  function project(x, y) {
    var r = Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["u" /* sqrt */])(c - 2 * n * Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["t" /* sin */])(y)) / n;
    return [r * Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["t" /* sin */])(x *= n), r0 - r * Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["g" /* cos */])(x)];
  }
 
  project.invert = function(x, y) {
    var r0y = r0 - y,
        l = Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["e" /* atan2 */])(x, Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["a" /* abs */])(r0y)) * Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["s" /* sign */])(r0y);
    if (r0y * n < 0)
      l -= __WEBPACK_IMPORTED_MODULE_0__math_js__["o" /* pi */] * Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["s" /* sign */])(x) * Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["s" /* sign */])(r0y);
    return [l / n, Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["c" /* asin */])((c - (x * x + r0y * r0y) * n * n) / (2 * n))];
  };
 
  return project;
}
 
/* harmony default export */ __webpack_exports__["b"] = (function() {
  return Object(__WEBPACK_IMPORTED_MODULE_1__conic_js__["a" /* conicProjection */])(conicEqualAreaRaw)
      .scale(155.424)
      .center([0, 33.6442]);
});
 
 
/***/ }),
/* 359 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = conicProjection;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__math_js__ = __webpack_require__(19);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__index_js__ = __webpack_require__(75);
 
 
 
function conicProjection(projectAt) {
  var phi0 = 0,
      phi1 = __WEBPACK_IMPORTED_MODULE_0__math_js__["o" /* pi */] / 3,
      m = Object(__WEBPACK_IMPORTED_MODULE_1__index_js__["b" /* projectionMutator */])(projectAt),
      p = m(phi0, phi1);
 
  p.parallels = function(_) {
    return arguments.length ? m(phi0 = _[0] * __WEBPACK_IMPORTED_MODULE_0__math_js__["r" /* radians */], phi1 = _[1] * __WEBPACK_IMPORTED_MODULE_0__math_js__["r" /* radians */]) : [phi0 * __WEBPACK_IMPORTED_MODULE_0__math_js__["h" /* degrees */], phi1 * __WEBPACK_IMPORTED_MODULE_0__math_js__["h" /* degrees */]];
  };
 
  return p;
}
 
 
/***/ }),
/* 360 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = fitExtent;
/* harmony export (immutable) */ __webpack_exports__["c"] = fitSize;
/* harmony export (immutable) */ __webpack_exports__["d"] = fitWidth;
/* harmony export (immutable) */ __webpack_exports__["b"] = fitHeight;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__stream_js__ = __webpack_require__(121);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__path_bounds_js__ = __webpack_require__(750);
 
 
 
function fit(projection, fitBounds, object) {
  var clip = projection.clipExtent && projection.clipExtent();
  projection.scale(150).translate([0, 0]);
  if (clip != null) projection.clipExtent(null);
  Object(__WEBPACK_IMPORTED_MODULE_0__stream_js__["a" /* default */])(object, projection.stream(__WEBPACK_IMPORTED_MODULE_1__path_bounds_js__["a" /* default */]));
  fitBounds(__WEBPACK_IMPORTED_MODULE_1__path_bounds_js__["a" /* default */].result());
  if (clip != null) projection.clipExtent(clip);
  return projection;
}
 
function fitExtent(projection, extent, object) {
  return fit(projection, function(b) {
    var w = extent[1][0] - extent[0][0],
        h = extent[1][1] - extent[0][1],
        k = Math.min(w / (b[1][0] - b[0][0]), h / (b[1][1] - b[0][1])),
        x = +extent[0][0] + (w - k * (b[1][0] + b[0][0])) / 2,
        y = +extent[0][1] + (h - k * (b[1][1] + b[0][1])) / 2;
    projection.scale(150 * k).translate([x, y]);
  }, object);
}
 
function fitSize(projection, size, object) {
  return fitExtent(projection, [[0, 0], size], object);
}
 
function fitWidth(projection, width, object) {
  return fit(projection, function(b) {
    var w = +width,
        k = w / (b[1][0] - b[0][0]),
        x = (w - k * (b[1][0] + b[0][0])) / 2,
        y = -k * b[0][1];
    projection.scale(150 * k).translate([x, y]);
  }, object);
}
 
function fitHeight(projection, height, object) {
  return fit(projection, function(b) {
    var h = +height,
        k = h / (b[1][1] - b[0][1]),
        x = -k * b[0][0],
        y = (h - k * (b[1][1] + b[0][1])) / 2;
    projection.scale(150 * k).translate([x, y]);
  }, object);
}
 
 
/***/ }),
/* 361 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["c"] = mercatorRaw;
/* harmony export (immutable) */ __webpack_exports__["b"] = mercatorProjection;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__math_js__ = __webpack_require__(19);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__rotation_js__ = __webpack_require__(252);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__index_js__ = __webpack_require__(75);
 
 
 
 
function mercatorRaw(lambda, phi) {
  return [lambda, Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["n" /* log */])(Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["v" /* tan */])((__WEBPACK_IMPORTED_MODULE_0__math_js__["l" /* halfPi */] + phi) / 2))];
}
 
mercatorRaw.invert = function(x, y) {
  return [x, 2 * Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["d" /* atan */])(Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["k" /* exp */])(y)) - __WEBPACK_IMPORTED_MODULE_0__math_js__["l" /* halfPi */]];
};
 
/* harmony default export */ __webpack_exports__["a"] = (function() {
  return mercatorProjection(mercatorRaw)
      .scale(961 / __WEBPACK_IMPORTED_MODULE_0__math_js__["w" /* tau */]);
});
 
function mercatorProjection(project) {
  var m = Object(__WEBPACK_IMPORTED_MODULE_2__index_js__["a" /* default */])(project),
      center = m.center,
      scale = m.scale,
      translate = m.translate,
      clipExtent = m.clipExtent,
      x0 = null, y0, x1, y1; // clip extent
 
  m.scale = function(_) {
    return arguments.length ? (scale(_), reclip()) : scale();
  };
 
  m.translate = function(_) {
    return arguments.length ? (translate(_), reclip()) : translate();
  };
 
  m.center = function(_) {
    return arguments.length ? (center(_), reclip()) : center();
  };
 
  m.clipExtent = function(_) {
    return arguments.length ? ((_ == null ? x0 = y0 = x1 = y1 = null : (x0 = +_[0][0], y0 = +_[0][1], x1 = +_[1][0], y1 = +_[1][1])), reclip()) : x0 == null ? null : [[x0, y0], [x1, y1]];
  };
 
  function reclip() {
    var k = __WEBPACK_IMPORTED_MODULE_0__math_js__["o" /* pi */] * scale(),
        t = m(Object(__WEBPACK_IMPORTED_MODULE_1__rotation_js__["a" /* default */])(m.rotate()).invert([0, 0]));
    return clipExtent(x0 == null
        ? [[t[0] - k, t[1] - k], [t[0] + k, t[1] + k]] : project === mercatorRaw
        ? [[Math.max(t[0] - k, x0), y0], [Math.min(t[0] + k, x1), y1]]
        : [[x0, Math.max(t[1] - k, y0)], [x1, Math.min(t[1] + k, y1)]]);
  }
 
  return reclip();
}
 
 
/***/ }),
/* 362 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["c"] = hierarchy;
/* harmony export (immutable) */ __webpack_exports__["b"] = computeHeight;
/* harmony export (immutable) */ __webpack_exports__["a"] = Node;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__count_js__ = __webpack_require__(1331);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__each_js__ = __webpack_require__(1332);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__eachBefore_js__ = __webpack_require__(1333);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__eachAfter_js__ = __webpack_require__(1334);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__sum_js__ = __webpack_require__(1335);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__sort_js__ = __webpack_require__(1336);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__path_js__ = __webpack_require__(1337);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__ancestors_js__ = __webpack_require__(1338);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__descendants_js__ = __webpack_require__(1339);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__leaves_js__ = __webpack_require__(1340);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__links_js__ = __webpack_require__(1341);
 
 
 
 
 
 
 
 
 
 
 
 
function hierarchy(data, children) {
  var root = new Node(data),
      valued = +data.value && (root.value = data.value),
      node,
      nodes = [root],
      child,
      childs,
      i,
      n;
 
  if (children == null) children = defaultChildren;
 
  while (node = nodes.pop()) {
    if (valued) node.value = +node.data.value;
    if ((childs = children(node.data)) && (n = childs.length)) {
      node.children = new Array(n);
      for (i = n - 1; i >= 0; --i) {
        nodes.push(child = node.children[i] = new Node(childs[i]));
        child.parent = node;
        child.depth = node.depth + 1;
      }
    }
  }
 
  return root.eachBefore(computeHeight);
}
 
function node_copy() {
  return hierarchy(this).eachBefore(copyData);
}
 
function defaultChildren(d) {
  return d.children;
}
 
function copyData(node) {
  node.data = node.data.data;
}
 
function computeHeight(node) {
  var height = 0;
  do node.height = height;
  while ((node = node.parent) && (node.height < ++height));
}
 
function Node(data) {
  this.data = data;
  this.depth =
  this.height = 0;
  this.parent = null;
}
 
Node.prototype = hierarchy.prototype = {
  constructor: Node,
  count: __WEBPACK_IMPORTED_MODULE_0__count_js__["a" /* default */],
  each: __WEBPACK_IMPORTED_MODULE_1__each_js__["a" /* default */],
  eachAfter: __WEBPACK_IMPORTED_MODULE_3__eachAfter_js__["a" /* default */],
  eachBefore: __WEBPACK_IMPORTED_MODULE_2__eachBefore_js__["a" /* default */],
  sum: __WEBPACK_IMPORTED_MODULE_4__sum_js__["a" /* default */],
  sort: __WEBPACK_IMPORTED_MODULE_5__sort_js__["a" /* default */],
  path: __WEBPACK_IMPORTED_MODULE_6__path_js__["a" /* default */],
  ancestors: __WEBPACK_IMPORTED_MODULE_7__ancestors_js__["a" /* default */],
  descendants: __WEBPACK_IMPORTED_MODULE_8__descendants_js__["a" /* default */],
  leaves: __WEBPACK_IMPORTED_MODULE_9__leaves_js__["a" /* default */],
  links: __WEBPACK_IMPORTED_MODULE_10__links_js__["a" /* default */],
  copy: node_copy
};
 
 
/***/ }),
/* 363 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = optional;
/* harmony export (immutable) */ __webpack_exports__["b"] = required;
function optional(f) {
  return f == null ? null : required(f);
}
 
function required(f) {
  if (typeof f !== "function") throw new Error;
  return f;
}
 
 
/***/ }),
/* 364 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return phi; });
/* harmony export (immutable) */ __webpack_exports__["c"] = squarifyRatio;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__dice_js__ = __webpack_require__(190);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__slice_js__ = __webpack_require__(255);
 
 
 
var phi = (1 + Math.sqrt(5)) / 2;
 
function squarifyRatio(ratio, parent, x0, y0, x1, y1) {
  var rows = [],
      nodes = parent.children,
      row,
      nodeValue,
      i0 = 0,
      i1 = 0,
      n = nodes.length,
      dx, dy,
      value = parent.value,
      sumValue,
      minValue,
      maxValue,
      newRatio,
      minRatio,
      alpha,
      beta;
 
  while (i0 < n) {
    dx = x1 - x0, dy = y1 - y0;
 
    // Find the next non-empty node.
    do sumValue = nodes[i1++].value; while (!sumValue && i1 < n);
    minValue = maxValue = sumValue;
    alpha = Math.max(dy / dx, dx / dy) / (value * ratio);
    beta = sumValue * sumValue * alpha;
    minRatio = Math.max(maxValue / beta, beta / minValue);
 
    // Keep adding nodes while the aspect ratio maintains or improves.
    for (; i1 < n; ++i1) {
      sumValue += nodeValue = nodes[i1].value;
      if (nodeValue < minValue) minValue = nodeValue;
      if (nodeValue > maxValue) maxValue = nodeValue;
      beta = sumValue * sumValue * alpha;
      newRatio = Math.max(maxValue / beta, beta / minValue);
      if (newRatio > minRatio) { sumValue -= nodeValue; break; }
      minRatio = newRatio;
    }
 
    // Position and record the row orientation.
    rows.push(row = {value: sumValue, dice: dx < dy, children: nodes.slice(i0, i1)});
    if (row.dice) Object(__WEBPACK_IMPORTED_MODULE_0__dice_js__["a" /* default */])(row, x0, y0, x1, value ? y0 += dy * sumValue / value : y1);
    else Object(__WEBPACK_IMPORTED_MODULE_1__slice_js__["a" /* default */])(row, x0, y0, value ? x0 += dx * sumValue / value : x1, y1);
    value -= sumValue, i0 = i1;
  }
 
  return rows;
}
 
/* harmony default export */ __webpack_exports__["a"] = ((function custom(ratio) {
 
  function squarify(parent, x0, y0, x1, y1) {
    squarifyRatio(ratio, parent, x0, y0, x1, y1);
  }
 
  squarify.ratio = function(x) {
    return custom((x = +x) > 1 ? x : 1);
  };
 
  return squarify;
})(phi));
 
 
/***/ }),
/* 365 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["b"] = loggish;
/* harmony export (immutable) */ __webpack_exports__["a"] = log;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_d3_array__ = __webpack_require__(44);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_d3_format__ = __webpack_require__(356);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__nice__ = __webpack_require__(763);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__continuous__ = __webpack_require__(103);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__init__ = __webpack_require__(57);
 
 
 
 
 
 
function transformLog(x) {
  return Math.log(x);
}
 
function transformExp(x) {
  return Math.exp(x);
}
 
function transformLogn(x) {
  return -Math.log(-x);
}
 
function transformExpn(x) {
  return -Math.exp(-x);
}
 
function pow10(x) {
  return isFinite(x) ? +("1e" + x) : x < 0 ? 0 : x;
}
 
function powp(base) {
  return base === 10 ? pow10
      : base === Math.E ? Math.exp
      : function(x) { return Math.pow(base, x); };
}
 
function logp(base) {
  return base === Math.E ? Math.log
      : base === 10 && Math.log10
      || base === 2 && Math.log2
      || (base = Math.log(base), function(x) { return Math.log(x) / base; });
}
 
function reflect(f) {
  return function(x) {
    return -f(-x);
  };
}
 
function loggish(transform) {
  var scale = transform(transformLog, transformExp),
      domain = scale.domain,
      base = 10,
      logs,
      pows;
 
  function rescale() {
    logs = logp(base), pows = powp(base);
    if (domain()[0] < 0) {
      logs = reflect(logs), pows = reflect(pows);
      transform(transformLogn, transformExpn);
    } else {
      transform(transformLog, transformExp);
    }
    return scale;
  }
 
  scale.base = function(_) {
    return arguments.length ? (base = +_, rescale()) : base;
  };
 
  scale.domain = function(_) {
    return arguments.length ? (domain(_), rescale()) : domain();
  };
 
  scale.ticks = function(count) {
    var d = domain(),
        u = d[0],
        v = d[d.length - 1],
        r;
 
    if (r = v < u) i = u, u = v, v = i;
 
    var i = logs(u),
        j = logs(v),
        p,
        k,
        t,
        n = count == null ? 10 : +count,
        z = [];
 
    if (!(base % 1) && j - i < n) {
      i = Math.round(i) - 1, j = Math.round(j) + 1;
      if (u > 0) for (; i < j; ++i) {
        for (k = 1, p = pows(i); k < base; ++k) {
          t = p * k;
          if (t < u) continue;
          if (t > v) break;
          z.push(t);
        }
      } else for (; i < j; ++i) {
        for (k = base - 1, p = pows(i); k >= 1; --k) {
          t = p * k;
          if (t < u) continue;
          if (t > v) break;
          z.push(t);
        }
      }
    } else {
      z = Object(__WEBPACK_IMPORTED_MODULE_0_d3_array__["B" /* ticks */])(i, j, Math.min(j - i, n)).map(pows);
    }
 
    return r ? z.reverse() : z;
  };
 
  scale.tickFormat = function(count, specifier) {
    if (specifier == null) specifier = base === 10 ? ".0e" : ",";
    if (typeof specifier !== "function") specifier = Object(__WEBPACK_IMPORTED_MODULE_1_d3_format__["b" /* format */])(specifier);
    if (count === Infinity) return specifier;
    if (count == null) count = 10;
    var k = Math.max(1, base * count / scale.ticks().length); // TODO fast estimate?
    return function(d) {
      var i = d / pows(Math.round(logs(d)));
      if (i * base < base - 0.5) i *= base;
      return i <= k ? specifier(d) : "";
    };
  };
 
  scale.nice = function() {
    return domain(Object(__WEBPACK_IMPORTED_MODULE_2__nice__["a" /* default */])(domain(), {
      floor: function(x) { return pows(Math.floor(logs(x))); },
      ceil: function(x) { return pows(Math.ceil(logs(x))); }
    }));
  };
 
  return scale;
}
 
function log() {
  var scale = loggish(Object(__WEBPACK_IMPORTED_MODULE_3__continuous__["d" /* transformer */])()).domain([1, 10]);
 
  scale.copy = function() {
    return Object(__WEBPACK_IMPORTED_MODULE_3__continuous__["a" /* copy */])(scale, log()).base(scale.base());
  };
 
  __WEBPACK_IMPORTED_MODULE_4__init__["b" /* initRange */].apply(scale, arguments);
 
  return scale;
}
 
 
/***/ }),
/* 366 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["b"] = symlogish;
/* harmony export (immutable) */ __webpack_exports__["a"] = symlog;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__linear__ = __webpack_require__(123);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__continuous__ = __webpack_require__(103);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__init__ = __webpack_require__(57);
 
 
 
 
function transformSymlog(c) {
  return function(x) {
    return Math.sign(x) * Math.log1p(Math.abs(x / c));
  };
}
 
function transformSymexp(c) {
  return function(x) {
    return Math.sign(x) * Math.expm1(Math.abs(x)) * c;
  };
}
 
function symlogish(transform) {
  var c = 1, scale = transform(transformSymlog(c), transformSymexp(c));
 
  scale.constant = function(_) {
    return arguments.length ? transform(transformSymlog(c = +_), transformSymexp(c)) : c;
  };
 
  return Object(__WEBPACK_IMPORTED_MODULE_0__linear__["b" /* linearish */])(scale);
}
 
function symlog() {
  var scale = symlogish(Object(__WEBPACK_IMPORTED_MODULE_1__continuous__["d" /* transformer */])());
 
  scale.copy = function() {
    return Object(__WEBPACK_IMPORTED_MODULE_1__continuous__["a" /* copy */])(scale, symlog()).constant(scale.constant());
  };
 
  return __WEBPACK_IMPORTED_MODULE_2__init__["b" /* initRange */].apply(scale, arguments);
}
 
 
/***/ }),
/* 367 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["b"] = powish;
/* harmony export (immutable) */ __webpack_exports__["a"] = pow;
/* harmony export (immutable) */ __webpack_exports__["c"] = sqrt;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__linear__ = __webpack_require__(123);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__continuous__ = __webpack_require__(103);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__init__ = __webpack_require__(57);
 
 
 
 
function transformPow(exponent) {
  return function(x) {
    return x < 0 ? -Math.pow(-x, exponent) : Math.pow(x, exponent);
  };
}
 
function transformSqrt(x) {
  return x < 0 ? -Math.sqrt(-x) : Math.sqrt(x);
}
 
function transformSquare(x) {
  return x < 0 ? -x * x : x * x;
}
 
function powish(transform) {
  var scale = transform(__WEBPACK_IMPORTED_MODULE_1__continuous__["c" /* identity */], __WEBPACK_IMPORTED_MODULE_1__continuous__["c" /* identity */]),
      exponent = 1;
 
  function rescale() {
    return exponent === 1 ? transform(__WEBPACK_IMPORTED_MODULE_1__continuous__["c" /* identity */], __WEBPACK_IMPORTED_MODULE_1__continuous__["c" /* identity */])
        : exponent === 0.5 ? transform(transformSqrt, transformSquare)
        : transform(transformPow(exponent), transformPow(1 / exponent));
  }
 
  scale.exponent = function(_) {
    return arguments.length ? (exponent = +_, rescale()) : exponent;
  };
 
  return Object(__WEBPACK_IMPORTED_MODULE_0__linear__["b" /* linearish */])(scale);
}
 
function pow() {
  var scale = powish(Object(__WEBPACK_IMPORTED_MODULE_1__continuous__["d" /* transformer */])());
 
  scale.copy = function() {
    return Object(__WEBPACK_IMPORTED_MODULE_1__continuous__["a" /* copy */])(scale, pow()).exponent(scale.exponent());
  };
 
  __WEBPACK_IMPORTED_MODULE_2__init__["b" /* initRange */].apply(scale, arguments);
 
  return scale;
}
 
function sqrt() {
  return pow.apply(null, arguments).exponent(0.5);
}
 
 
/***/ }),
/* 368 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__defaultLocale_js__ = __webpack_require__(369);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return __WEBPACK_IMPORTED_MODULE_0__defaultLocale_js__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return __WEBPACK_IMPORTED_MODULE_0__defaultLocale_js__["b"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return __WEBPACK_IMPORTED_MODULE_0__defaultLocale_js__["c"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return __WEBPACK_IMPORTED_MODULE_0__defaultLocale_js__["d"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return __WEBPACK_IMPORTED_MODULE_0__defaultLocale_js__["e"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__locale_js__ = __webpack_require__(765);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return __WEBPACK_IMPORTED_MODULE_1__locale_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isoFormat_js__ = __webpack_require__(766);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_2__isoFormat_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__isoParse_js__ = __webpack_require__(1383);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return __WEBPACK_IMPORTED_MODULE_3__isoParse_js__["a"]; });
 
 
 
 
 
 
/***/ }),
/* 369 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return timeFormat; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return timeParse; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return utcFormat; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return utcParse; });
/* harmony export (immutable) */ __webpack_exports__["a"] = defaultLocale;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__locale_js__ = __webpack_require__(765);
 
 
var locale;
var timeFormat;
var timeParse;
var utcFormat;
var utcParse;
 
defaultLocale({
  dateTime: "%x, %X",
  date: "%-m/%-d/%Y",
  time: "%-I:%M:%S %p",
  periods: ["AM", "PM"],
  days: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"],
  shortDays: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
  months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"],
  shortMonths: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]
});
 
function defaultLocale(definition) {
  locale = Object(__WEBPACK_IMPORTED_MODULE_0__locale_js__["a" /* default */])(definition);
  timeFormat = locale.format;
  timeParse = locale.parse;
  utcFormat = locale.utcFormat;
  utcParse = locale.utcParse;
  return locale;
}
 
 
/***/ }),
/* 370 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_d3_path__ = __webpack_require__(120);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__constant_js__ = __webpack_require__(124);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__curve_linear_js__ = __webpack_require__(257);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__point_js__ = __webpack_require__(371);
 
 
 
 
 
/* harmony default export */ __webpack_exports__["a"] = (function() {
  var x = __WEBPACK_IMPORTED_MODULE_3__point_js__["a" /* x */],
      y = __WEBPACK_IMPORTED_MODULE_3__point_js__["b" /* y */],
      defined = Object(__WEBPACK_IMPORTED_MODULE_1__constant_js__["a" /* default */])(true),
      context = null,
      curve = __WEBPACK_IMPORTED_MODULE_2__curve_linear_js__["a" /* default */],
      output = null;
 
  function line(data) {
    var i,
        n = data.length,
        d,
        defined0 = false,
        buffer;
 
    if (context == null) output = curve(buffer = Object(__WEBPACK_IMPORTED_MODULE_0_d3_path__["a" /* path */])());
 
    for (i = 0; i <= n; ++i) {
      if (!(i < n && defined(d = data[i], i, data)) === defined0) {
        if (defined0 = !defined0) output.lineStart();
        else output.lineEnd();
      }
      if (defined0) output.point(+x(d, i, data), +y(d, i, data));
    }
 
    if (buffer) return output = null, buffer + "" || null;
  }
 
  line.x = function(_) {
    return arguments.length ? (x = typeof _ === "function" ? _ : Object(__WEBPACK_IMPORTED_MODULE_1__constant_js__["a" /* default */])(+_), line) : x;
  };
 
  line.y = function(_) {
    return arguments.length ? (y = typeof _ === "function" ? _ : Object(__WEBPACK_IMPORTED_MODULE_1__constant_js__["a" /* default */])(+_), line) : y;
  };
 
  line.defined = function(_) {
    return arguments.length ? (defined = typeof _ === "function" ? _ : Object(__WEBPACK_IMPORTED_MODULE_1__constant_js__["a" /* default */])(!!_), line) : defined;
  };
 
  line.curve = function(_) {
    return arguments.length ? (curve = _, context != null && (output = curve(context)), line) : curve;
  };
 
  line.context = function(_) {
    return arguments.length ? (_ == null ? context = output = null : output = curve(context = _), line) : context;
  };
 
  return line;
});
 
 
/***/ }),
/* 371 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = x;
/* harmony export (immutable) */ __webpack_exports__["b"] = y;
function x(p) {
  return p[0];
}
 
function y(p) {
  return p[1];
}
 
 
/***/ }),
/* 372 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["b"] = point;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__math_js__ = __webpack_require__(191);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__cardinal_js__ = __webpack_require__(260);
 
 
 
function point(that, x, y) {
  var x1 = that._x1,
      y1 = that._y1,
      x2 = that._x2,
      y2 = that._y2;
 
  if (that._l01_a > __WEBPACK_IMPORTED_MODULE_0__math_js__["f" /* epsilon */]) {
    var a = 2 * that._l01_2a + 3 * that._l01_a * that._l12_a + that._l12_2a,
        n = 3 * that._l01_a * (that._l01_a + that._l12_a);
    x1 = (x1 * a - that._x0 * that._l12_2a + that._x2 * that._l01_2a) / n;
    y1 = (y1 * a - that._y0 * that._l12_2a + that._y2 * that._l01_2a) / n;
  }
 
  if (that._l23_a > __WEBPACK_IMPORTED_MODULE_0__math_js__["f" /* epsilon */]) {
    var b = 2 * that._l23_2a + 3 * that._l23_a * that._l12_a + that._l12_2a,
        m = 3 * that._l23_a * (that._l23_a + that._l12_a);
    x2 = (x2 * b + that._x1 * that._l23_2a - x * that._l12_2a) / m;
    y2 = (y2 * b + that._y1 * that._l23_2a - y * that._l12_2a) / m;
  }
 
  that._context.bezierCurveTo(x1, y1, x2, y2, that._x2, that._y2);
}
 
function CatmullRom(context, alpha) {
  this._context = context;
  this._alpha = alpha;
}
 
CatmullRom.prototype = {
  areaStart: function() {
    this._line = 0;
  },
  areaEnd: function() {
    this._line = NaN;
  },
  lineStart: function() {
    this._x0 = this._x1 = this._x2 =
    this._y0 = this._y1 = this._y2 = NaN;
    this._l01_a = this._l12_a = this._l23_a =
    this._l01_2a = this._l12_2a = this._l23_2a =
    this._point = 0;
  },
  lineEnd: function() {
    switch (this._point) {
      case 2: this._context.lineTo(this._x2, this._y2); break;
      case 3: this.point(this._x2, this._y2); break;
    }
    if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();
    this._line = 1 - this._line;
  },
  point: function(x, y) {
    x = +x, y = +y;
 
    if (this._point) {
      var x23 = this._x2 - x,
          y23 = this._y2 - y;
      this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, this._alpha));
    }
 
    switch (this._point) {
      case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;
      case 1: this._point = 2; break;
      case 2: this._point = 3; // proceed
      default: point(this, x, y); break;
    }
 
    this._l01_a = this._l12_a, this._l12_a = this._l23_a;
    this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a;
    this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;
    this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;
  }
};
 
/* harmony default export */ __webpack_exports__["a"] = ((function custom(alpha) {
 
  function catmullRom(context) {
    return alpha ? new CatmullRom(context, alpha) : new __WEBPACK_IMPORTED_MODULE_1__cardinal_js__["a" /* Cardinal */](context, 0);
  }
 
  catmullRom.alpha = function(alpha) {
    return custom(+alpha);
  };
 
  return catmullRom;
})(0.5));
 
 
/***/ }),
/* 373 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["b"] = sum;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__none_js__ = __webpack_require__(193);
 
 
/* harmony default export */ __webpack_exports__["a"] = (function(series) {
  var sums = series.map(sum);
  return Object(__WEBPACK_IMPORTED_MODULE_0__none_js__["a" /* default */])(series).sort(function(a, b) { return sums[a] - sums[b]; });
});
 
function sum(series) {
  var s = 0, i = -1, n = series.length, v;
  while (++i < n) if (v = +series[i][1]) s += v;
  return s;
}
 
 
/***/ }),
/* 374 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = RedBlackNode;
function RedBlackTree() {
  this._ = null; // root node
}
 
function RedBlackNode(node) {
  node.U = // parent node
  node.C = // color - true for red, false for black
  node.L = // left node
  node.R = // right node
  node.P = // previous node
  node.N = null; // next node
}
 
RedBlackTree.prototype = {
  constructor: RedBlackTree,
 
  insert: function(after, node) {
    var parent, grandpa, uncle;
 
    if (after) {
      node.P = after;
      node.N = after.N;
      if (after.N) after.N.P = node;
      after.N = node;
      if (after.R) {
        after = after.R;
        while (after.L) after = after.L;
        after.L = node;
      } else {
        after.R = node;
      }
      parent = after;
    } else if (this._) {
      after = RedBlackFirst(this._);
      node.P = null;
      node.N = after;
      after.P = after.L = node;
      parent = after;
    } else {
      node.P = node.N = null;
      this._ = node;
      parent = null;
    }
    node.L = node.R = null;
    node.U = parent;
    node.C = true;
 
    after = node;
    while (parent && parent.C) {
      grandpa = parent.U;
      if (parent === grandpa.L) {
        uncle = grandpa.R;
        if (uncle && uncle.C) {
          parent.C = uncle.C = false;
          grandpa.C = true;
          after = grandpa;
        } else {
          if (after === parent.R) {
            RedBlackRotateLeft(this, parent);
            after = parent;
            parent = after.U;
          }
          parent.C = false;
          grandpa.C = true;
          RedBlackRotateRight(this, grandpa);
        }
      } else {
        uncle = grandpa.L;
        if (uncle && uncle.C) {
          parent.C = uncle.C = false;
          grandpa.C = true;
          after = grandpa;
        } else {
          if (after === parent.L) {
            RedBlackRotateRight(this, parent);
            after = parent;
            parent = after.U;
          }
          parent.C = false;
          grandpa.C = true;
          RedBlackRotateLeft(this, grandpa);
        }
      }
      parent = after.U;
    }
    this._.C = false;
  },
 
  remove: function(node) {
    if (node.N) node.N.P = node.P;
    if (node.P) node.P.N = node.N;
    node.N = node.P = null;
 
    var parent = node.U,
        sibling,
        left = node.L,
        right = node.R,
        next,
        red;
 
    if (!left) next = right;
    else if (!right) next = left;
    else next = RedBlackFirst(right);
 
    if (parent) {
      if (parent.L === node) parent.L = next;
      else parent.R = next;
    } else {
      this._ = next;
    }
 
    if (left && right) {
      red = next.C;
      next.C = node.C;
      next.L = left;
      left.U = next;
      if (next !== right) {
        parent = next.U;
        next.U = node.U;
        node = next.R;
        parent.L = node;
        next.R = right;
        right.U = next;
      } else {
        next.U = parent;
        parent = next;
        node = next.R;
      }
    } else {
      red = node.C;
      node = next;
    }
 
    if (node) node.U = parent;
    if (red) return;
    if (node && node.C) { node.C = false; return; }
 
    do {
      if (node === this._) break;
      if (node === parent.L) {
        sibling = parent.R;
        if (sibling.C) {
          sibling.C = false;
          parent.C = true;
          RedBlackRotateLeft(this, parent);
          sibling = parent.R;
        }
        if ((sibling.L && sibling.L.C)
            || (sibling.R && sibling.R.C)) {
          if (!sibling.R || !sibling.R.C) {
            sibling.L.C = false;
            sibling.C = true;
            RedBlackRotateRight(this, sibling);
            sibling = parent.R;
          }
          sibling.C = parent.C;
          parent.C = sibling.R.C = false;
          RedBlackRotateLeft(this, parent);
          node = this._;
          break;
        }
      } else {
        sibling = parent.L;
        if (sibling.C) {
          sibling.C = false;
          parent.C = true;
          RedBlackRotateRight(this, parent);
          sibling = parent.L;
        }
        if ((sibling.L && sibling.L.C)
          || (sibling.R && sibling.R.C)) {
          if (!sibling.L || !sibling.L.C) {
            sibling.R.C = false;
            sibling.C = true;
            RedBlackRotateLeft(this, sibling);
            sibling = parent.L;
          }
          sibling.C = parent.C;
          parent.C = sibling.L.C = false;
          RedBlackRotateRight(this, parent);
          node = this._;
          break;
        }
      }
      sibling.C = true;
      node = parent;
      parent = parent.U;
    } while (!node.C);
 
    if (node) node.C = false;
  }
};
 
function RedBlackRotateLeft(tree, node) {
  var p = node,
      q = node.R,
      parent = p.U;
 
  if (parent) {
    if (parent.L === p) parent.L = q;
    else parent.R = q;
  } else {
    tree._ = q;
  }
 
  q.U = parent;
  p.U = q;
  p.R = q.L;
  if (p.R) p.R.U = p;
  q.L = p;
}
 
function RedBlackRotateRight(tree, node) {
  var p = node,
      q = node.L,
      parent = p.U;
 
  if (parent) {
    if (parent.L === p) parent.L = q;
    else parent.R = q;
  } else {
    tree._ = q;
  }
 
  q.U = parent;
  p.U = q;
  p.L = q.R;
  if (p.L) p.L.U = p;
  q.R = p;
}
 
function RedBlackFirst(node) {
  while (node.L) node = node.L;
  return node;
}
 
/* harmony default export */ __webpack_exports__["b"] = (RedBlackTree);
 
 
/***/ }),
/* 375 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["c"] = createEdge;
/* harmony export (immutable) */ __webpack_exports__["b"] = createBorderEdge;
/* harmony export (immutable) */ __webpack_exports__["d"] = setEdgeEnd;
/* harmony export (immutable) */ __webpack_exports__["a"] = clipEdges;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Diagram__ = __webpack_require__(194);
 
 
function createEdge(left, right, v0, v1) {
  var edge = [null, null],
      index = __WEBPACK_IMPORTED_MODULE_0__Diagram__["e" /* edges */].push(edge) - 1;
  edge.left = left;
  edge.right = right;
  if (v0) setEdgeEnd(edge, left, right, v0);
  if (v1) setEdgeEnd(edge, right, left, v1);
  __WEBPACK_IMPORTED_MODULE_0__Diagram__["b" /* cells */][left.index].halfedges.push(index);
  __WEBPACK_IMPORTED_MODULE_0__Diagram__["b" /* cells */][right.index].halfedges.push(index);
  return edge;
}
 
function createBorderEdge(left, v0, v1) {
  var edge = [v0, v1];
  edge.left = left;
  return edge;
}
 
function setEdgeEnd(edge, left, right, vertex) {
  if (!edge[0] && !edge[1]) {
    edge[0] = vertex;
    edge.left = left;
    edge.right = right;
  } else if (edge.left === right) {
    edge[1] = vertex;
  } else {
    edge[0] = vertex;
  }
}
 
// Liang–Barsky line clipping.
function clipEdge(edge, x0, y0, x1, y1) {
  var a = edge[0],
      b = edge[1],
      ax = a[0],
      ay = a[1],
      bx = b[0],
      by = b[1],
      t0 = 0,
      t1 = 1,
      dx = bx - ax,
      dy = by - ay,
      r;
 
  r = x0 - ax;
  if (!dx && r > 0) return;
  r /= dx;
  if (dx < 0) {
    if (r < t0) return;
    if (r < t1) t1 = r;
  } else if (dx > 0) {
    if (r > t1) return;
    if (r > t0) t0 = r;
  }
 
  r = x1 - ax;
  if (!dx && r < 0) return;
  r /= dx;
  if (dx < 0) {
    if (r > t1) return;
    if (r > t0) t0 = r;
  } else if (dx > 0) {
    if (r < t0) return;
    if (r < t1) t1 = r;
  }
 
  r = y0 - ay;
  if (!dy && r > 0) return;
  r /= dy;
  if (dy < 0) {
    if (r < t0) return;
    if (r < t1) t1 = r;
  } else if (dy > 0) {
    if (r > t1) return;
    if (r > t0) t0 = r;
  }
 
  r = y1 - ay;
  if (!dy && r < 0) return;
  r /= dy;
  if (dy < 0) {
    if (r > t1) return;
    if (r > t0) t0 = r;
  } else if (dy > 0) {
    if (r < t0) return;
    if (r < t1) t1 = r;
  }
 
  if (!(t0 > 0) && !(t1 < 1)) return true; // TODO Better check?
 
  if (t0 > 0) edge[0] = [ax + t0 * dx, ay + t0 * dy];
  if (t1 < 1) edge[1] = [ax + t1 * dx, ay + t1 * dy];
  return true;
}
 
function connectEdge(edge, x0, y0, x1, y1) {
  var v1 = edge[1];
  if (v1) return true;
 
  var v0 = edge[0],
      left = edge.left,
      right = edge.right,
      lx = left[0],
      ly = left[1],
      rx = right[0],
      ry = right[1],
      fx = (lx + rx) / 2,
      fy = (ly + ry) / 2,
      fm,
      fb;
 
  if (ry === ly) {
    if (fx < x0 || fx >= x1) return;
    if (lx > rx) {
      if (!v0) v0 = [fx, y0];
      else if (v0[1] >= y1) return;
      v1 = [fx, y1];
    } else {
      if (!v0) v0 = [fx, y1];
      else if (v0[1] < y0) return;
      v1 = [fx, y0];
    }
  } else {
    fm = (lx - rx) / (ry - ly);
    fb = fy - fm * fx;
    if (fm < -1 || fm > 1) {
      if (lx > rx) {
        if (!v0) v0 = [(y0 - fb) / fm, y0];
        else if (v0[1] >= y1) return;
        v1 = [(y1 - fb) / fm, y1];
      } else {
        if (!v0) v0 = [(y1 - fb) / fm, y1];
        else if (v0[1] < y0) return;
        v1 = [(y0 - fb) / fm, y0];
      }
    } else {
      if (ly < ry) {
        if (!v0) v0 = [x0, fm * x0 + fb];
        else if (v0[0] >= x1) return;
        v1 = [x1, fm * x1 + fb];
      } else {
        if (!v0) v0 = [x1, fm * x1 + fb];
        else if (v0[0] < x0) return;
        v1 = [x0, fm * x0 + fb];
      }
    }
  }
 
  edge[0] = v0;
  edge[1] = v1;
  return true;
}
 
function clipEdges(x0, y0, x1, y1) {
  var i = __WEBPACK_IMPORTED_MODULE_0__Diagram__["e" /* edges */].length,
      edge;
 
  while (i--) {
    if (!connectEdge(edge = __WEBPACK_IMPORTED_MODULE_0__Diagram__["e" /* edges */][i], x0, y0, x1, y1)
        || !clipEdge(edge, x0, y0, x1, y1)
        || !(Math.abs(edge[0][0] - edge[1][0]) > __WEBPACK_IMPORTED_MODULE_0__Diagram__["f" /* epsilon */]
            || Math.abs(edge[0][1] - edge[1][1]) > __WEBPACK_IMPORTED_MODULE_0__Diagram__["f" /* epsilon */])) {
      delete __WEBPACK_IMPORTED_MODULE_0__Diagram__["e" /* edges */][i];
    }
  }
}
 
 
/***/ }),
/* 376 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
__webpack_require__(1467);
var underscore_1 = __webpack_require__(1);
var GlobalExports_1 = __webpack_require__(10);
var Strings_1 = __webpack_require__(4);
var AccessibleButton_1 = __webpack_require__(20);
var Dom_1 = __webpack_require__(0);
var QueryUtils_1 = __webpack_require__(37);
var SVGDom_1 = __webpack_require__(23);
var SVGIcons_1 = __webpack_require__(16);
var Component_1 = __webpack_require__(6);
var ComponentOptions_1 = __webpack_require__(13);
var Initialization_1 = __webpack_require__(8);
var FieldValue_1 = __webpack_require__(183);
/**
 * The FieldTable component displays a set of {@link FieldValue} components in a table that can optionally be
 * expandable and minimizable. This component automatically takes care of not displaying empty field values.
 *
 * This component is a result template component (see [Result Templates](https://docs.coveo.com/en/413/)).
 *
 * **Example:**
 *
 * ```
 * // This is the FieldTable component itself, which holds a list of table rows.
 * // Each row is a FieldValue component.
 * <table class='CoveoFieldTable'>
 *    // Items
 *    <tr data-field='@sysdate' data-caption='Date' data-helper='dateTime' />
 *    <tr data-field='@sysauthor' data-caption='Author' />
 *    <tr data-field='@clickuri' data-html-value='true' data-caption='URL' data-helper='anchor' data-helper-options='{text: \"<%= raw.syssource %>\" , target:\"_blank\"}'>
 * </table>
 * ```
 */
var FieldTable = /** @class */ (function (_super) {
    __extends(FieldTable, _super);
    /**
     * Creates a new FieldTable.
     * @param element The HTMLElement on which to instantiate the component.
     * @param options The options for the FieldTable component.
     * @param bindings The bindings that the component requires to function normally. If not set, these will be
     * automatically resolved (with a slower execution time).
     * @param result The result to associate the component with.
     */
    function FieldTable(element, options, bindings, result) {
        var _this = _super.call(this, element, ValueRow.ID, bindings) || this;
        _this.element = element;
        _this.options = options;
        _this.result = result;
        _this.options = ComponentOptions_1.ComponentOptions.initComponentOptions(element, FieldTable, options);
        var rows = Dom_1.$$(_this.element).findAll('tr[data-field]');
        underscore_1.each(rows, function (e) {
            new ValueRow(e, {}, bindings, result);
        });
        if (Dom_1.$$(_this.element).find('tr') == null) {
            Dom_1.$$(element).detach();
        }
        if (_this.isTogglable()) {
            var className = 'coveo-field-table-toggle-container';
            _this.toggleContainer = Dom_1.$$('div', { className: className, id: underscore_1.uniqueId(className) }).el;
            _this.buildToggle();
            Dom_1.$$(_this.toggleContainer).insertBefore(_this.element);
            _this.toggleContainer.appendChild(_this.element);
            _this.toggleContainer.appendChild(_this.toggleButtonInsideTable);
        }
        return _this;
    }
    Object.defineProperty(FieldTable.prototype, "isExpanded", {
        get: function () {
            return !this.toggleButton || this.toggleButton.getAttribute('aria-expanded') === 'true';
        },
        set: function (expanded) {
            Eif (this.toggleButton) {
                this.toggleButton.setAttribute('aria-expanded', expanded.toString());
            }
        },
        enumerable: true,
        configurable: true
    });
    /**
     * Toggles between expanding (showing) and minimizing (collapsing) the FieldTable.
     *
     * @param anim Specifies whether to show a sliding animation when toggling the display of the FieldTable.
     */
    FieldTable.prototype.toggle = function (anim) {
        Eif (anim === void 0) { anim = false; }
        this.isExpanded ? this.minimize(anim) : this.expand(anim);
    };
    /**
     * Expands (shows) the FieldTable,
     * @param anim Specifies whether to show a sliding animation when expanding the FieldTable.
     */
    FieldTable.prototype.expand = function (anim) {
        if (anim === void 0) { anim = false; }
        if (this.isTogglable()) {
            this.isExpanded = true;
            this.toggleCaption.textContent = this.options.expandedTitle;
            SVGDom_1.SVGDom.addClassToSVGInContainer(this.toggleButtonSVGContainer, 'coveo-opened');
            SVGDom_1.SVGDom.addClassToSVGInContainer(this.toggleButtonInsideTable, 'coveo-opened');
            anim ? this.slideToggle(true) : this.slideToggle(true, false);
        }
    };
    /**
     * Minimizes (collapses) the FieldTable.
     * @param anim Specifies whether to show a sliding animation when minimizing the FieldTable.
     */
    FieldTable.prototype.minimize = function (anim) {
        if (anim === void 0) { anim = false; }
        if (this.isTogglable()) {
            this.isExpanded = false;
            this.toggleCaption.textContent = this.options.minimizedTitle;
            SVGDom_1.SVGDom.removeClassFromSVGInContainer(this.toggleButtonSVGContainer, 'coveo-opened');
            SVGDom_1.SVGDom.removeClassFromSVGInContainer(this.toggleButtonInsideTable, 'coveo-opened');
            anim ? this.slideToggle(false) : this.slideToggle(false, false);
        }
    };
    /**
     * Updates the toggle height if the content was dynamically resized, so that the expanding and minimizing animation
     * can match the new content size.
     */
    FieldTable.prototype.updateToggleHeight = function () {
        this.updateToggleContainerHeight();
        this.isExpanded ? this.expand() : this.minimize();
    };
    FieldTable.prototype.isTogglable = function () {
        if (this.options.allowMinimization) {
            return true;
        }
        return false;
    };
    FieldTable.prototype.buildToggle = function () {
        var _this = this;
        this.toggleCaption = Dom_1.$$('span', {
            className: 'coveo-field-table-toggle-caption'
        }).el;
        this.toggleButton = Dom_1.$$('div', {
            className: 'coveo-field-table-toggle coveo-field-table-toggle-down',
            ariaControls: this.toggleContainer.id
        }).el;
        this.toggleButtonSVGContainer = Dom_1.$$('span', null, SVGIcons_1.SVGIcons.icons.arrowDown).el;
        SVGDom_1.SVGDom.addClassToSVGInContainer(this.toggleButtonSVGContainer, 'coveo-field-table-toggle-down-svg');
        this.toggleButton.appendChild(this.toggleCaption);
        this.toggleButton.appendChild(this.toggleButtonSVGContainer);
        Dom_1.$$(this.toggleButton).insertBefore(this.element);
        this.toggleButtonInsideTable = Dom_1.$$('span', { className: 'coveo-field-table-toggle coveo-field-table-toggle-up' }, SVGIcons_1.SVGIcons.icons.arrowUp).el;
        SVGDom_1.SVGDom.addClassToSVGInContainer(this.toggleButtonInsideTable, 'coveo-field-table-toggle-up-svg');
        if (this.options.minimizedByDefault === true) {
            this.isExpanded = false;
        }
        else if (this.options.minimizedByDefault === false) {
            this.isExpanded = true;
        }
        else {
            this.isExpanded = !QueryUtils_1.QueryUtils.hasExcerpt(this.result);
        }
        requestAnimationFrame(function () { return _this.updateToggleHeight(); });
        var toggleAction = function () { return _this.toggle(true); };
        new AccessibleButton_1.AccessibleButton()
            .withElement(this.toggleButton)
            .withSelectAction(function () { return toggleAction(); })
            .withOwner(this.bind)
            .withLabel(Strings_1.l('Details'))
            .build();
        Dom_1.$$(this.toggleButtonInsideTable).on('click', toggleAction);
    };
    FieldTable.prototype.slideToggle = function (visible, anim) {
        Iif (visible === void 0) { visible = true; }
        Iif (anim === void 0) { anim = true; }
        Eif (!anim) {
            Dom_1.$$(this.toggleContainer).addClass('coveo-no-transition');
        }
        if (visible) {
            this.toggleContainer.style.display = 'block';
            this.toggleContainer.style.height = this.containerHeight;
        }
        else {
            this.toggleContainer.style.height = '0';
        }
        Eif (!anim) {
            this.toggleContainer.offsetHeight; // Force reflow
            Dom_1.$$(this.toggleContainer).removeClass('coveo-no-transition');
        }
    };
    Object.defineProperty(FieldTable.prototype, "containerHeight", {
        get: function () {
            if (!this.toggleContainerHeight) {
                this.updateToggleContainerHeight();
            }
            return this.toggleContainerHeight + 'px';
        },
        enumerable: true,
        configurable: true
    });
    FieldTable.prototype.updateToggleContainerHeight = function () {
        this.toggleContainerHeight = this.toggleContainer.scrollHeight;
    };
    FieldTable.ID = 'FieldTable';
    FieldTable.doExport = function () {
        GlobalExports_1.exportGlobally({
            FieldTable: FieldTable,
            FieldValue: FieldValue_1.FieldValue
        });
    };
    /**
     * The options for the component
     * @componentOptions
     */
    FieldTable.options = {
        /**
         * Specifies whether to allow the minimization (collapsing) of the FieldTable.
         *
         * If you set this option to `false`, the component will not create the **Minimize** / **Expand** toggle links.
         *
         * See also {@link FieldTable.options.expandedTitle}, {@link FieldTable.options.minimizedTitle} and
         * {@link FieldTable.options.minimizedByDefault}.
         *
         * Default value is `true`.
         */
        allowMinimization: ComponentOptions_1.ComponentOptions.buildBooleanOption({ defaultValue: true }),
        /**
         * If {@link FieldTable.options.allowMinimization} is `true`, specifies the caption to show on the **Minimize** link
         * (the link that appears when the FieldTable is expanded).
         *
         * Default value is `"Details"`.
         */
        expandedTitle: ComponentOptions_1.ComponentOptions.buildLocalizedStringOption({
            localizedString: function () { return Strings_1.l('Details'); },
            depend: 'allowMinimization'
        }),
        /**
         * If {@link FieldTable.options.allowMinimization} is `true`, specifies the caption to show on the **Expand** link
         * (the link that appears when the FieldTable is minimized).
         *
         * Default value is `"Details"`.
         */
        minimizedTitle: ComponentOptions_1.ComponentOptions.buildLocalizedStringOption({
            localizedString: function () { return Strings_1.l('Details'); },
            depend: 'allowMinimization'
        }),
        /**
         * If {@link FieldTable.options.allowMinimization} is `true`, specifies whether to minimize the table by default.
         *
         * Default value is `undefined`, and the FieldTable will collapse by default if the result it is associated with has
         * a non-empty excerpt.
         */
        minimizedByDefault: ComponentOptions_1.ComponentOptions.buildBooleanOption({ depend: 'allowMinimization' })
    };
    return FieldTable;
}(Component_1.Component));
exports.FieldTable = FieldTable;
Initialization_1.Initialization.registerAutoCreateComponent(FieldTable);
var ValueRow = /** @class */ (function (_super) {
    __extends(ValueRow, _super);
    function ValueRow(element, options, bindings, result) {
        var _this = _super.call(this, element, options, bindings, result, ValueRow.ID) || this;
        _this.element = element;
        _this.options = options;
        _this.result = result;
        _this.options = ComponentOptions_1.ComponentOptions.initComponentOptions(element, ValueRow, options);
        var caption = Dom_1.$$('th').el;
        caption.appendChild(document.createTextNode(_this.options.caption.toLocaleString()));
        _this.element.insertBefore(caption, _this.getValueContainer());
        return _this;
    }
    ValueRow.prototype.getValueContainer = function () {
        if (this.valueContainer == null) {
            this.valueContainer = document.createElement('td');
            this.element.appendChild(this.valueContainer);
        }
        return this.valueContainer;
    };
    ValueRow.ID = 'ValueRow';
    ValueRow.options = {
        caption: ComponentOptions_1.ComponentOptions.buildStringOption({
            postProcessing: function (value, options) { return value || options.field.substr(1); }
        })
    };
    ValueRow.parent = FieldValue_1.FieldValue;
    return ValueRow;
}(FieldValue_1.FieldValue));
 
 
/***/ }),
/* 377 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
var underscore_1 = __webpack_require__(1);
var QueryEvents_1 = __webpack_require__(14);
var GlobalExports_1 = __webpack_require__(10);
var Assert_1 = __webpack_require__(12);
var Dom_1 = __webpack_require__(0);
var Utils_1 = __webpack_require__(5);
var Component_1 = __webpack_require__(6);
var ComponentOptions_1 = __webpack_require__(13);
var Initialization_1 = __webpack_require__(8);
var QueryBuilder_1 = __webpack_require__(24);
var SortCriteria_1 = __webpack_require__(195);
/**
 * The `Folding` component makes it possible to render hierarchic representations of search results sharing a common
 * [`field`]{@link Folding.options.field}.
 *
 * This component has no visual impact on its own. It simply folds certain search results so that the
 * [`ResultFolding`]{@link ResultFolding} and [`ResultAttachments`]{@link ResultAttachments} components can then nicely
 * render them within result templates (see [Result Templates](https://docs.coveo.com/en/413/)).
 *
 * A typical use case of the `Folding` component is to fold email conversations and message board threads results in a
 * result set in order to display them in a convenient format. Messages belonging to a single conversation typically
 * have a unique conversation ID. By indexing this ID on a field, you can use it to fold search results (see
 * [Folding Results](https://docs.coveo.com/en/428/)).
 *
 * **Note:**
 * > There can only be one `Folding` component per [`Tab`]{@link Tab} component.
 *
 */
var Folding = /** @class */ (function (_super) {
    __extends(Folding, _super);
    /**
     * Creates a new `Folding` component.
     * @param element The HTMLElement on which to instantiate the component.
     * @param options The options for the `Folding` component.
     * @param bindings The bindings that the component requires to function normally. If not set, these will be
     * automatically resolved (with a slower execution time).
     */
    function Folding(element, options, bindings) {
        var _this = _super.call(this, element, Folding.ID, bindings) || this;
        _this.element = element;
        _this.options = options;
        _this.options = ComponentOptions_1.ComponentOptions.initComponentOptions(element, Folding, options);
        Assert_1.Assert.check(Utils_1.Utils.isCoveoField(_this.options.field), _this.options.field + ' is not a valid field');
        Assert_1.Assert.exists(_this.options.maximumExpandedResults);
        _this.swapParentChildFoldingFields();
        _this.bind.onRootElement(QueryEvents_1.QueryEvents.buildingQuery, _this.handleBuildingQuery);
        _this.bind.onRootElement(QueryEvents_1.QueryEvents.preprocessResults, _this.handlepreprocessResults);
        return _this;
    }
    // From a list of results, return a list of results and their attachments
    // We use parentResult to build a tree of result
    Folding.foldWithParent = function (queryResults) {
        var rootNode = {
            score: Number.NEGATIVE_INFINITY,
            children: [],
            result: {
                raw: false
            }
        };
        underscore_1.each(queryResults, function (queryResult, i) {
            var resultNode = Folding.findUniqueId(rootNode.children, queryResult.uniqueId);
            // If he have no parent or is parent is him self, add it to the root
            if (queryResult.parentResult == null || queryResult.parentResult.uniqueId == queryResult.uniqueId) {
                // Add it only if he do not exist
                if (resultNode == null) {
                    resultNode = {
                        result: queryResult,
                        score: i,
                        children: []
                    };
                    rootNode.children.push(resultNode);
                    resultNode.parent = rootNode;
                }
            }
            else {
                // If the resultNode already exist
                if (resultNode != null) {
                    resultNode.score = Math.min(i, resultNode.score);
                    // Remove himself from his parent because it will be added in his parent. This allowed to remove duplicate.
                    resultNode.parent.children = underscore_1.without(resultNode.parent.children, resultNode);
                }
                else {
                    resultNode = {
                        result: queryResult,
                        score: i,
                        children: []
                    };
                }
                var parentResult = Folding.findUniqueId(rootNode.children, queryResult.parentResult.uniqueId);
                // If the parent does not already exist, create it and add it the root
                if (parentResult == null) {
                    parentResult = {
                        result: queryResult.parentResult,
                        score: Number.POSITIVE_INFINITY,
                        children: []
                    };
                    rootNode.children.push(parentResult);
                    parentResult.parent = rootNode;
                }
                // Add the resultNode to parent
                parentResult.children.push(resultNode);
                resultNode.parent = parentResult;
                var parent_1 = parentResult;
                while (parent_1 != null && resultNode.score < parent_1.score) {
                    parent_1.score = resultNode.score;
                    parent_1 = parent_1.parent;
                }
            }
        });
        var rootResult = Folding.resultNodeToQueryResult(rootNode);
        // Remove the root from all results
        underscore_1.each(rootResult.attachments, function (attachment) { return (attachment.parentResult = null); });
        return rootResult.attachments;
    };
    // 99.9% of the folding case will be alright with those default functions.
    // Otherwise use the options getResult and getMoreResults
    Folding.defaultGetResult = function (result) {
        var results = result.childResults || [];
        // Add the top result at the top of the list
        results.unshift(result);
        // Empty childResults just to make it more clean
        result.childResults = [];
        // Fold those results
        results = Folding.foldWithParent(results);
        // The first result is the top one
        var topResult = results.shift();
        // All other the results are childResults
        topResult.childResults = results;
        return topResult;
    };
    Folding.defaultGetMoreResults = function (results) {
        // The result are flat, just do the fold
        return Folding.foldWithParent(results);
    };
    // Convert ResultNode to QueryResult
    Folding.resultNodeToQueryResult = function (resultNode) {
        var result = resultNode.result;
        result.attachments = underscore_1.map(underscore_1.sortBy(resultNode.children, 'score'), Folding.resultNodeToQueryResult);
        result.parentResult = resultNode.parent != null ? resultNode.parent.result : null;
        return result;
    };
    Folding.findUniqueId = function (resultNodes, uniqueId) {
        for (var i = 0; i < resultNodes.length; i++) {
            if (resultNodes[i].result.uniqueId == uniqueId) {
                return resultNodes[i];
            }
            var resultNode = Folding.findUniqueId(resultNodes[i].children, uniqueId);
            if (resultNode != null) {
                return resultNode;
            }
        }
        return null;
    };
    Folding.prototype.swapParentChildFoldingFields = function () {
        // Swap "old" childField and parentField and assign them to the "new" parent option
        // This needs to be done because connectors push the default data in *reverse* order compared to what the index expect.
        if (this.options.childField != null) {
            this.logger.warn('Detecting usage of deprecated option "childField". Assigning it automatically to the "parent" option instead.');
            this.logger.warn('The option definition was changed to support universal folding across all sources.');
            this.logger.warn('To remove this warning, rename the "childField" option (data-child-field) to "parent" (data-parent).');
            this.options.parent = this.options.childField;
        }
        if (this.options.parentField != null) {
            this.logger.warn('Detecting usage of deprecated option "parentField". Assigning it automatically to the "child" option instead.');
            this.logger.warn('The option definition was changed to support universal folding across all sources.');
            this.logger.warn('To remove this warning, rename the "parentField" option (data-parent-field) to "child" (data-child).');
            this.options.child = this.options.parentField;
        }
    };
    Folding.prototype.handleBuildingQuery = function (data) {
        Assert_1.Assert.exists(data);
        Eif (!this.disabled) {
            data.queryBuilder.childField = this.options.parent;
            data.queryBuilder.parentField = this.options.child;
            data.queryBuilder.filterField = this.options.field;
            data.queryBuilder.filterFieldRange = this.options.range;
            data.queryBuilder.requiredFields.push(this.options.field);
            Eif (this.options.parent != null) {
                data.queryBuilder.requiredFields.push(this.options.parent);
            }
            Eif (this.options.child != null) {
                data.queryBuilder.requiredFields.push(this.options.child);
            }
        }
    };
    Folding.prototype.handlepreprocessResults = function (data) {
        var _this = this;
        Assert_1.Assert.exists(data);
        Assert_1.Assert.check(!data.results._folded, 'Two or more Folding components are active at the same time for the same Tab. Cannot process the results.');
        data.results._folded = true;
        var queryResults = data.results;
        var getResult = this.options.getResult || Folding.defaultGetResult;
        queryResults.results = underscore_1.map(queryResults.results, getResult);
        if (this.options.rearrange) {
            queryResults.results.forEach(function (result) {
                result.childResults = underscore_1.sortBy(result.childResults, function (result) { return Utils_1.Utils.getFieldValue(result, _this.options.rearrange.sort); });
                if (_this.shouldBeReversed(result.childResults)) {
                    result.childResults = result.childResults.reverse();
                }
            });
        }
        this.addLoadMoreHandler(queryResults.results, data.query);
    };
    Folding.prototype.shouldBeReversed = function (childResults) {
        var _this = this;
        if (this.options.rearrange.direction == 'ascending') {
            return false;
        }
        var childMissingSortByValue = underscore_1.any(childResults, function (childResult) {
            return Utils_1.Utils.isNullOrUndefined(Utils_1.Utils.getFieldValue(childResult, _this.options.rearrange.sort));
        });
        if (childMissingSortByValue) {
            return false;
        }
        return true;
    };
    Folding.prototype.addLoadMoreHandler = function (results, originalQuery) {
        var _this = this;
        return underscore_1.map(results, function (result) {
            if (_this.options.enableExpand && !Utils_1.Utils.isNullOrUndefined(Utils_1.Utils.getFieldValue(result, _this.options.field))) {
                result.moreResults = function () {
                    return _this.moreResults(result, originalQuery);
                };
            }
            return result;
        });
    };
    Folding.prototype.moreResults = function (result, originalQuery) {
        var _this = this;
        var query = underscore_1.clone(originalQuery);
        var builder = new QueryBuilder_1.QueryBuilder();
        query.numberOfResults = this.options.maximumExpandedResults;
        var fieldValue = Utils_1.Utils.getFieldValue(result, this.options.field);
        Eif (Utils_1.Utils.isNonEmptyString(fieldValue)) {
            builder.advancedExpression.addFieldExpression(this.options.field, '=', [fieldValue]);
            query.aq = builder.build().aq;
            query.facets = [];
            query.categoryFacets = [];
            query.facetOptions = {};
        }
        if (Utils_1.Utils.isNonEmptyString(originalQuery.q)) {
            // We add keywords to get the highlight and we add @uri to get all results
            // To ensure it plays nicely with query syntax, we ensure that the needed part of the query
            // are correctly surrounded with the no syntax block
            Iif (originalQuery.enableQuerySyntax) {
                query.q = "( " + originalQuery.q + " ) OR @uri";
            }
            else {
                query.enableQuerySyntax = true;
                query.q = "( <@- " + originalQuery.q + " -@> ) OR @uri";
            }
        }
        if (Utils_1.Utils.isNonEmptyString(this.options.expandExpression)) {
            query.cq = this.options.expandExpression;
        }
        Eif (this.options.child != null) {
            query.parentField = this.options.child;
        }
        Eif (this.options.parent != null) {
            query.childField = this.options.parent;
        }
        query.filterField = null;
        query.filterFieldRange = null;
        query.firstResult = 0;
        Iif (this.options.rearrange) {
            this.options.rearrange.putInQueryBuilder(builder);
            query.sortCriteria = builder.sortCriteria;
            query.sortField = builder.sortField;
        }
        else {
            query.sortCriteria = originalQuery.sortCriteria;
            query.sortField = originalQuery.sortField;
        }
        return this.queryController
            .getEndpoint()
            .search(query)
            .then(function (results) {
            _this.handlePreprocessMoreResults(results);
            return results.results;
        })
            .catch(function (e) {
            _this.logger.error("Invalid query performed while trying to retrieve more results for folding.", e);
            return [];
        });
    };
    Folding.prototype.handlePreprocessMoreResults = function (queryResults) {
        var getResults = this.options.getMoreResults || Folding.defaultGetMoreResults;
        queryResults.results = getResults(queryResults.results);
        Dom_1.$$(this.element).trigger(QueryEvents_1.QueryEvents.preprocessMoreResults, {
            results: queryResults
        });
    };
    Folding.ID = 'Folding';
    Folding.doExport = function () {
        GlobalExports_1.exportGlobally({
            Folding: Folding
        });
    };
    /**
     * The options for the component
     * @componentOptions
     */
    Folding.options = {
        /**
         * Specifies the name of the field on which to do the folding.
         *
         * Specifying a value for this option is required for this component to work.
         *
         * **Note:**
         * > In an Elasticsearch index, the corresponding field must be configured as a *Facet* field
         * > (see [Add or Edit Fields](https://docs.coveo.com/en/1982/)).
         * > This limitation does not apply to Coveo indexes.
         *
         * Default value is `@foldingcollection`.
         */
        field: ComponentOptions_1.ComponentOptions.buildFieldOption({ defaultValue: '@foldingcollection' }),
        /**
         * Specifies the field that determines whether a certain result is a child of another top result.
         *
         * **Note:**
         * > In the index, the values of the corresponding field must:
         * > - Contain alphanumerical characters only.
         * > - Contain no more than 60 characters.
         *
         * Default value is `@foldingchild`.
         */
        child: ComponentOptions_1.ComponentOptions.buildFieldOption({ defaultValue: '@foldingchild' }),
        /**
         * Specifies the field that determines whether a certain result is a top result containing other child results.
         *
         * **Note:**
         * > In the index, the values of the corresponding field must:
         * > - Contain alphanumerical characters only.
         * > - Contain no more than 60 characters.
         *
         * Default value is `@foldingparent`.
         */
        parent: ComponentOptions_1.ComponentOptions.buildFieldOption({ defaultValue: '@foldingparent' }),
        /**
         * This option is deprecated. Instead, use the {@link Folding.options.parent} option.
         * @deprecated
         */
        childField: ComponentOptions_1.ComponentOptions.buildFieldOption({
            deprecated: 'This option is deprecated. Instead, use the data-parent option.'
        }),
        /**
         * This option is deprecated. Instead, use the {@link Folding.options.child} option.
         * @deprecated
         */
        parentField: ComponentOptions_1.ComponentOptions.buildFieldOption({
            deprecated: 'This option is deprecated. Instead, use the data-child option.'
        }),
        /**
         * Specifies the maximum number of child results to fold.
         *
         * **Example:**
         * > For an email thread with a total of 20 messages, using the default value of `2` means that the component loads
         * > up to a maximum of 2 child messages under the original message, unless the end user expands the entire
         * > conversation using the **Show More** link (see the [`enableExpand`]{@link Folding.options.enableExpand}
         * > option).
         *
         * Default value is `2`. Minimum value is `0`.
         */
        range: ComponentOptions_1.ComponentOptions.buildNumberOption({ defaultValue: 2, min: 0 }),
        /**
         * Specifies the sort criteria to apply to the top result and its child results (e.g., `date ascending`,
         * `@myfield descending`, etc.). See [sortCriteria](https://docs.coveo.com/en/1461/#RestQueryParameters-sortCriteria).
         *
         * This option works from the results returned by the index. This means that if only the three most relevant folded results are returned by the index
         * and you choose to rearrange the folded results by date, then the three most relevant results will be rearranged by date,
         * meaning that the first folded result is not necessarily the oldest or newest item.
         *
         * However, since clicking on the `Show More` button triggers a new query, you would receive new results based on the sort criteria of this option.
         *
         * **Example**
         * > If you are folding email results by conversation and you specify `date descending` as the `rearrange` value of
         * > the `Folding` component, the component re-arranges email conversations so that the newest email is always the
         * > top result. Specifying `date ascending` instead always makes the original email the top result, as it is also
         * > necessarily the oldest.
         *
         * By default, the component displays the results in the order that the index returns them.
         */
        rearrange: ComponentOptions_1.ComponentOptions.buildCustomOption(function (value) { return (Utils_1.Utils.isNonEmptyString(value) ? SortCriteria_1.SortCriteria.parse(value) : null); }),
        /**
         * Specifies whether to add a callback function on the top result, allowing to make an additional query to load all
         * of its child results (e.g., to load all conversations of a given thread).
         *
         * Concretely, the [`ResultFolding`]{@link ResultFolding} component uses this for its **Show More** link.
         *
         * See also the [`expandExpression`]{@link Folding.options.expandExpression} and
         * [`maximumExpandedResults`]{@link Folding.options.maximumExpandedResults} options.
         *
         * Default value is `true`.
         */
        enableExpand: ComponentOptions_1.ComponentOptions.buildBooleanOption({ defaultValue: true }),
        /**
         * If the [`enableExpand`]{@link Folding.options.enableExpand} option is `true`, specifies a custom constant
         * expression to send when querying the expanded results.
         *
         * Default value is `undefined`.
         */
        expandExpression: ComponentOptions_1.ComponentOptions.buildQueryExpressionOption({ depend: 'enableExpand' }),
        /**
         * If the [`enableExpand`]{@link Folding.options.enableExpand} option is `true`, specifies the maximum number of
         * results to load when expanding.
         *
         * Default value is `100`. Minimum value is `1`.
         */
        maximumExpandedResults: ComponentOptions_1.ComponentOptions.buildNumberOption({ defaultValue: 100, min: 1, depend: 'enableExpand' }),
        /**
         * Specifies the function that manages the individual folding of each result.
         *
         * Default value is:
         *
         * ```javascript
         * var results = result.childResults || [];
         * // Add the top result at the top of the list.
         * results.unshift(result);
         * // Empty childResults just to clean it.
         * result.childResults = [];
         * // Fold those results.
         * results = Coveo.Folding.foldWithParent(results);
         * // The first result is the top one.
         * var topResult = results.shift();
         * // All other results are childResults.
         * topResult.childResults = results;
         * return topResult;
         * ```
         *
         * You can pre-process all the result with this option in the [`init`]{@link init} call of your search interface:
         *
         * ```javascript
         * Coveo.init(document.querySelector('#search'), {
         *    Folding: {
         *      getResult: function(result) {
         *        result = Coveo.Folding.defaultGetResult(result);
         *        // Your code here
         *      }
         *    }
         * })
         * ```
         */
        getResult: ComponentOptions_1.ComponentOptions.buildCustomOption(function () {
            return null;
        }),
        /**
         * Specifies the function that manages the folding of all results.
         *
         * Default value is:
         *
         * ```javascript
         * Coveo.Folding.defaultGetMoreResults = function(results) {
         *    // The results are flat, just do the folding.
         *    return Coveo.Folding.foldWithParent(results);
         * }
         * ```
         */
        getMoreResults: ComponentOptions_1.ComponentOptions.buildCustomOption(function () {
            return null;
        })
    };
    return Folding;
}(Component_1.Component));
exports.Folding = Folding;
Initialization_1.Initialization.registerAutoCreateComponent(Folding);
 
 
/***/ }),
/* 378 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Result_1 = __webpack_require__(76);
var RefResult_1 = __webpack_require__(795);
var ExpressionEndOfInput_1 = __webpack_require__(379);
var _ = __webpack_require__(1);
var ExpressionRef = /** @class */ (function () {
    function ExpressionRef(ref, occurrence, id, grammar) {
        this.ref = ref;
        this.occurrence = occurrence;
        this.id = id;
        this.grammar = grammar;
    }
    ExpressionRef.prototype.parse = function (input, end) {
        var ref = this.grammar.getExpression(this.ref);
        Iif (ref == null) {
            throw new Error('Expression not found:' + this.ref);
        }
        if (this.occurrence == '?' || this.occurrence == null) {
            return this.parseOnce(input, end, ref);
        }
        else {
            return this.parseMany(input, end, ref);
        }
    };
    ExpressionRef.prototype.parseOnce = function (input, end, ref) {
        var refResult = ref.parse(input, end);
        var success = refResult.isSuccess();
        if (!success && this.occurrence == '?') {
            if (end) {
                // if end was found
                if (input.length == 0) {
                    return new RefResult_1.RefResult([], this, input, refResult);
                }
                // if end was not found and all error expression are EndOfInput, reparse with end = false.
                Iif (_.all(refResult.getBestExpect(), function (expect) { return expect.expression == ExpressionEndOfInput_1.ExpressionEndOfInput; })) {
                    return new RefResult_1.RefResult([new Result_1.Result(null, ExpressionEndOfInput_1.ExpressionEndOfInput, input)], this, input, refResult);
                }
                return refResult;
            }
            // the ref is not required and it do not need to end the input
            return new RefResult_1.RefResult([], this, input, null);
        }
        return new RefResult_1.RefResult([refResult], this, input, success ? null : refResult);
    };
    ExpressionRef.prototype.parseMany = function (input, end, ref) {
        var subResults = [];
        var subResult;
        var subInput = input;
        var success;
        // try to parse until it do not match, do not manage the end yet
        do {
            subResult = ref.parse(subInput, false);
            success = subResult.isSuccess();
            if (success) {
                subResults.push(subResult);
                subInput = subInput.substr(subResult.getLength());
            }
        } while (success && subResult.input != subInput);
        // minimal occurance of a ref
        var requiredOccurance = _.isNumber(this.occurrence) ? this.occurrence : this.occurrence == '+' ? 1 : 0;
        // if the minimal occurance is not reached add the fail result to the list
        if (subResults.length < requiredOccurance) {
            subResults.push(subResult);
        }
        else if (end) {
            // if there is at least one match, check if the last match is at the end
            if (subResults.length > 0) {
                var last = _.last(subResults);
                subResult = ref.parse(last.input, true);
                if (subResult.isSuccess()) {
                    // if successful, replace the last subResult by the one with end
                    subResults[subResults.length - 1] = subResult;
                }
                else {
                    // if not successful, we keep the last successful result and we add a endOfInputExpected Result after it
                    subResults.push(new Result_1.Result(null, ExpressionEndOfInput_1.ExpressionEndOfInput, last.input.substr(last.getLength())));
                    // we parse back the last with the length of the successful Result (at the same place we put the endOfInputExpected) and put it in failAttempt
                    subResult = ref.parse(last.input.substr(last.getLength()), true);
                }
            }
            else Eif (input.length != 0) {
                // if there is no result at all and we are not at the end, return a endOfInputExpected Result
                var endOfInput = new Result_1.Result(null, ExpressionEndOfInput_1.ExpressionEndOfInput, input);
                return new RefResult_1.RefResult([endOfInput], this, input, subResult);
            }
        }
        return new RefResult_1.RefResult(subResults, this, input, subResult);
    };
    ExpressionRef.prototype.toString = function () {
        return this.id;
    };
    return ExpressionRef;
}());
exports.ExpressionRef = ExpressionRef;
 
 
/***/ }),
/* 379 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
exports.ExpressionEndOfInput = {
    id: 'end of input',
    parse: null
};
 
 
/***/ }),
/* 380 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var OptionResult_1 = __webpack_require__(796);
var ExpressionOptions = /** @class */ (function () {
    function ExpressionOptions(parts, id) {
        this.parts = parts;
        this.id = id;
    }
    ExpressionOptions.prototype.parse = function (input, end) {
        var failAttempt = [];
        for (var i = 0; i < this.parts.length; i++) {
            var subResult = this.parts[i].parse(input, end);
            if (subResult.isSuccess()) {
                return new OptionResult_1.OptionResult(subResult, this, input, failAttempt);
            }
            failAttempt.push(subResult);
        }
        return new OptionResult_1.OptionResult(null, this, input, failAttempt);
    };
    ExpressionOptions.prototype.toString = function () {
        return this.id;
    };
    return ExpressionOptions;
}());
exports.ExpressionOptions = ExpressionOptions;
 
 
/***/ }),
/* 381 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Result_1 = __webpack_require__(76);
var Result_2 = __webpack_require__(76);
var ExpressionRegExp = /** @class */ (function () {
    function ExpressionRegExp(value, id, grammar) {
        this.value = value;
        this.id = id;
    }
    ExpressionRegExp.prototype.parse = function (input, end) {
        var groups = input.match(this.value);
        // if the RegExp do not match at the start, ignore it
        if (groups != null && groups.index != 0) {
            groups = null;
        }
        var result = new Result_1.Result(groups != null ? groups[0] : null, this, input);
        // if is successful and we require the end but the length of parsed is
        // lower than the input length, return a EndOfInputExpected Result
        if (result.isSuccess() && end && input.length > result.value.length) {
            return new Result_2.EndOfInputResult(result);
        }
        return result;
    };
    ExpressionRegExp.prototype.toString = function () {
        return this.id;
    };
    return ExpressionRegExp;
}());
exports.ExpressionRegExp = ExpressionRegExp;
 
 
/***/ }),
/* 382 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Result_1 = __webpack_require__(76);
var ExpressionList = /** @class */ (function () {
    function ExpressionList(parts, id) {
        this.parts = parts;
        this.id = id;
        Iif (parts.length == 0) {
            throw new Error(JSON.stringify(id) + ' should have at least 1 parts');
        }
    }
    ExpressionList.prototype.parse = function (input, end) {
        var subResults = [];
        var subResult;
        var subInput = input;
        for (var i = 0; i < this.parts.length; i++) {
            var part = this.parts[i];
            subResult = part.parse(subInput, end && i == this.parts.length - 1);
            subResults.push(subResult);
            // if the subResult do not succeed, stop the parsing
            if (!subResult.isSuccess()) {
                break;
            }
            else {
                subInput = subInput.substr(subResult.getLength());
            }
        }
        return new Result_1.Result(subResults, this, input);
    };
    ExpressionList.prototype.toString = function () {
        return this.id;
    };
    return ExpressionList;
}());
exports.ExpressionList = ExpressionList;
 
 
/***/ }),
/* 383 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Basic_1 = __webpack_require__(197);
var Date_1 = __webpack_require__(800);
exports.Field = {
    basicExpressions: ['FieldSimpleQuery', 'FieldQuery', 'Field'],
    grammars: {
        FieldQuery: '[Field][OptionalSpaces][FieldQueryOperation]',
        FieldQueryOperation: ['FieldQueryValue', 'FieldQueryNumeric'],
        FieldQueryValue: '[FieldOperator][OptionalSpaces][FieldValue]',
        FieldQueryNumeric: '[FieldOperatorNumeric][OptionalSpaces][FieldValueNumeric]',
        FieldSimpleQuery: '[FieldName]:[OptionalSpaces][FieldValue]',
        Field: '@[FieldName]',
        FieldName: /[a-zA-Z][a-zA-Z0-9\.\_]*/,
        FieldOperator: /==|=|<>/,
        FieldOperatorNumeric: /<=|>=|<|>/,
        FieldValue: ['DateRange', 'NumberRange', 'DateRelative', 'Date', 'Number', 'FieldValueList', 'FieldValueString'],
        FieldValueNumeric: ['DateRelative', 'Date', 'Number'],
        FieldValueString: ['DoubleQuoted', 'FieldValueNotQuoted'],
        FieldValueList: '([FieldValueString][FieldValueStringList*])',
        FieldValueStringList: '[FieldValueSeparator][FieldValueString]',
        FieldValueSeparator: / *, */,
        FieldValueNotQuoted: /[^ \(\)\[\],]+/,
        NumberRange: '[Number][Spaces?]..[Spaces?][Number]'
    },
    include: [Date_1.Date, Basic_1.Basic]
};
 
 
/***/ }),
/* 384 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var _ = __webpack_require__(1);
var Core_1 = __webpack_require__(9);
var Strings_1 = __webpack_require__(4);
var Dom_1 = __webpack_require__(0);
var KeyboardUtils_1 = __webpack_require__(35);
var InputManager = /** @class */ (function () {
    function InputManager(element, onchange, magicBox) {
        this.onchange = onchange;
        this.magicBox = magicBox;
        this.hasFocus = false;
        this.root = Core_1.Component.resolveRoot(element);
        this.underlay = document.createElement('div');
        this.underlay.className = 'magic-box-underlay';
        this.highlightContainer = document.createElement('span');
        this.highlightContainer.className = 'magic-box-highlight-container';
        this.underlay.appendChild(this.highlightContainer);
        this.ghostTextContainer = document.createElement('span');
        this.ghostTextContainer.className = 'magic-box-ghost-text';
        this.underlay.appendChild(this.ghostTextContainer);
        this.input = Dom_1.$$(element).find('input');
        if (!this.input) {
            this.input = document.createElement('input');
            element.appendChild(this.underlay);
            element.appendChild(this.input);
        }
        else {
            element.insertBefore(this.underlay, this.input);
        }
        this.setupHandler();
        this.addAccessibilitiesProperties();
    }
    Object.defineProperty(InputManager.prototype, "expanded", {
        set: function (isExpanded) {
            this.input.setAttribute('aria-expanded', isExpanded.toString());
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(InputManager.prototype, "activeDescendant", {
        set: function (element) {
            if (element) {
                this.input.setAttribute('aria-activedescendant', element.id);
            }
            else {
                this.input.removeAttribute('aria-activedescendant');
            }
        },
        enumerable: true,
        configurable: true
    });
    /**
     * Update the input with the result value
     */
    InputManager.prototype.updateInput = function () {
        if (this.input.value != this.result.input) {
            this.input.value = this.result.input;
            Iif (this.hasFocus) {
                this.setCursor(this.getValue().length);
            }
        }
    };
    /**
     * Update the highlight with the result value
     */
    InputManager.prototype.updateHighlight = function () {
        Dom_1.$$(this.highlightContainer).empty();
        this.highlightContainer.appendChild(this.result.toHtmlElement());
    };
    /**
     * Update the ghostText with the wordCompletion
     */
    InputManager.prototype.updateWordCompletion = function () {
        Dom_1.$$(this.ghostTextContainer).empty();
        this.ghostTextContainer.innerHTML = '';
        if (this.wordCompletion != null) {
            this.ghostTextContainer.appendChild(document.createTextNode(this.wordCompletion.substr(this.result.input.length)));
        }
    };
    /**
     * Set the result and update visual if needed
     */
    InputManager.prototype.setResult = function (result, wordCompletion) {
        this.result = result;
        this.updateInput();
        this.updateHighlight();
        // reuse last wordCompletion for a better visual
        Iif (_.isUndefined(wordCompletion) && this.wordCompletion != null && this.wordCompletion.indexOf(this.result.input) == 0) {
            this.updateWordCompletion();
        }
        else {
            this.setWordCompletion(wordCompletion);
        }
        this.updateScroll();
    };
    /**
     * Set the word completion. will be ignore if the word completion do not start with the result input
     */
    InputManager.prototype.setWordCompletion = function (wordCompletion) {
        Iif (wordCompletion != null && wordCompletion.toLowerCase().indexOf(this.result.input.toLowerCase()) != 0) {
            wordCompletion = null;
        }
        this.wordCompletion = wordCompletion;
        this.updateWordCompletion();
        this.updateScroll();
    };
    /**
     * Set cursor position
     */
    InputManager.prototype.setCursor = function (index) {
        this.input.focus();
        Iif (this.input.createTextRange) {
            var range = this.input.createTextRange();
            range.move('character', index);
            range.select();
        }
        else Eif (this.input.selectionStart != null) {
            this.input.focus();
            this.input.setSelectionRange(index, index);
        }
    };
    InputManager.prototype.getCursor = function () {
        return this.input.selectionStart;
    };
    InputManager.prototype.updateScroll = function (defer) {
        var _this = this;
        Eif (defer === void 0) { defer = true; }
        var callback = function () {
            // this is the cheapest call we can do before update scroll
            Iif (_this.underlay.clientWidth < _this.underlay.scrollWidth) {
                _this.underlay.style.visibility = 'hidden';
                _this.underlay.scrollLeft = _this.input.scrollLeft;
                _this.underlay.scrollTop = _this.input.scrollTop;
                _this.underlay.style.visibility = 'visible';
            }
            _this.updateScrollDefer = null;
            // one day we will have to remove this
            if (_this.hasFocus) {
                _this.updateScroll();
            }
        };
        // sometime we want it to be updated as soon as posible to have no flickering
        Iif (!defer) {
            callback();
        }
        else if (this.updateScrollDefer == null) {
            this.updateScrollDefer = requestAnimationFrame(callback);
        }
    };
    InputManager.prototype.setupHandler = function () {
        var _this = this;
        this.input.onblur = function () {
            _this.hasFocus = false;
            setTimeout(function () {
                if (!_this.hasFocus) {
                    _this.onblur && _this.onblur();
                }
            }, 300);
            _this.updateScroll();
        };
        this.input.onfocus = function () {
            if (!_this.hasFocus) {
                _this.hasFocus = true;
                _this.updateScroll();
                _this.onfocus && _this.onfocus();
            }
        };
        this.input.onkeydown = function (e) {
            _this.keydown(e);
        };
        this.input.onkeyup = function (e) {
            _this.keyup(e);
        };
        this.input.oncut = function () {
            setTimeout(function () {
                _this.onInputChange();
            });
        };
        this.input.onpaste = function () {
            setTimeout(function () {
                _this.onInputChange();
            });
        };
    };
    InputManager.prototype.addAccessibilitiesProperties = function () {
        this.input.setAttribute('autocomplete', 'off');
        this.input.setAttribute('type', 'text');
        this.input.setAttribute('role', 'combobox');
        this.input.setAttribute('form', 'coveo-dummy-form');
        this.input.setAttribute('aria-autocomplete', 'list');
        this.input.setAttribute('title', Strings_1.l('InsertAQuery') + ". " + Strings_1.l('PressEnterToSend'));
    };
    InputManager.prototype.focus = function () {
        var _this = this;
        // neet a timeout for IE8-9
        setTimeout(function () {
            _this.input.focus();
            _this.setCursor(_this.getValue().length);
        });
    };
    InputManager.prototype.blur = function () {
        Iif (this.hasFocus) {
            this.input.blur();
        }
    };
    InputManager.prototype.keydown = function (e) {
        var _this = this;
        switch (e.keyCode || e.which) {
            case KeyboardUtils_1.KEYBOARD.TAB:
                // Take care of not "preventing" the default event behaviour : For accessibility reasons, it is much simpler
                // to simply let the browser do it's standard action (which is to focus out of the input).
                // Instead, handle "tabPress" immediately instead of "keyup".
                // The focus will be on the next element in the page when the key is released, so keyup on the input will never be triggered.
                this.tabPress();
                this.magicBox.clearSuggestion();
                break;
            default:
                e.stopPropagation();
                if (this.onkeydown == null || this.onkeydown(e.keyCode || e.which)) {
                    requestAnimationFrame(function () {
                        _this.onInputChange();
                    });
                }
                else {
                    e.preventDefault();
                }
                break;
        }
    };
    InputManager.prototype.keyup = function (e) {
        switch (e.keyCode || e.which) {
            case KeyboardUtils_1.KEYBOARD.LEFT_ARROW:
            case KeyboardUtils_1.KEYBOARD.RIGHT_ARROW:
                this.handleLeftRightArrow(e);
                break;
            default:
                Eif (this.onkeydown == null || this.onkeyup(e.keyCode || e.which)) {
                    this.onInputChange();
                }
                else {
                    e.preventDefault();
                }
                break;
        }
    };
    InputManager.prototype.handleLeftRightArrow = function (e) {
        var querySuggestPreview = Dom_1.$$(this.root).find("." + Core_1.Component.computeCssClassNameForType('QuerySuggestPreview'));
        if (!querySuggestPreview) {
            this.onchangecursor();
        }
        var inputChanged = this.onkeydown == null || this.onkeyup(e.keyCode || e.which);
        inputChanged ? this.onInputChange() : e.preventDefault();
    };
    InputManager.prototype.tabPress = function () {
        this.ontabpress && this.ontabpress();
        this.onblur && this.onblur();
    };
    InputManager.prototype.onInputChange = function () {
        Iif (this.result.input != this.input.value) {
            this.onchange(this.input.value, false);
        }
    };
    InputManager.prototype.getValue = function () {
        return this.input.value;
    };
    InputManager.prototype.getWordCompletion = function () {
        return this.wordCompletion;
    };
    return InputManager;
}());
exports.InputManager = InputManager;
 
 
/***/ }),
/* 385 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var _ = __webpack_require__(1);
var MagicBoxUtils = /** @class */ (function () {
    function MagicBoxUtils() {
    }
    MagicBoxUtils.escapeRegExp = function (str) {
        return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, '\\$&');
    };
    MagicBoxUtils.highlightText = function (text, highligth, ignoreCase, matchClass, doNotMatchClass) {
        var _this = this;
        Iif (ignoreCase === void 0) { ignoreCase = false; }
        Eif (matchClass === void 0) { matchClass = 'magic-box-hightlight'; }
        Eif (doNotMatchClass === void 0) { doNotMatchClass = ''; }
        Iif (highligth.length == 0) {
            return text;
        }
        var escaped = this.escapeRegExp(highligth);
        var stringRegex = '(' + escaped + ')|(.*?(?=' + escaped + ')|.+)';
        var regex = new RegExp(stringRegex, ignoreCase ? 'gi' : 'g');
        return text.replace(regex, function (text, match, notmatch) { return _this.escapeText(match != null ? matchClass : doNotMatchClass, text); });
    };
    MagicBoxUtils.escapeText = function (classname, text) {
        return "<span class=\"" + classname + "\">" + _.escape(text) + "</span>";
    };
    return MagicBoxUtils;
}());
exports.MagicBoxUtils = MagicBoxUtils;
 
 
/***/ }),
/* 386 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __assign = (this && this.__assign) || Object.assign || function(t) {
    for (var s, i = 1, n = arguments.length; i < n; i++) {
        s = arguments[i];
        for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
            t[p] = s[p];
    }
    return t;
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { Iif (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        Iif (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            Iif (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
            Iif (y = 0, t) op = [0, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    Eif (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        Iif (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
Object.defineProperty(exports, "__esModule", { value: true });
var underscore_1 = __webpack_require__(1);
var ProcessingStatus;
(function (ProcessingStatus) {
    ProcessingStatus[ProcessingStatus["Finished"] = 0] = "Finished";
    ProcessingStatus[ProcessingStatus["TimedOut"] = 1] = "TimedOut";
    ProcessingStatus[ProcessingStatus["Overriden"] = 2] = "Overriden";
})(ProcessingStatus = exports.ProcessingStatus || (exports.ProcessingStatus = {}));
/**
 * IE11 equivalent of Promise.race
 * Adapted from Promise.race(iterable) polyfill on https://www.promisejs.org/api/
 */
function racePromises(promises) {
    return new Promise(function (resolve, reject) { return promises.forEach(function (value) { return Promise.resolve(value).then(resolve, reject); }); });
}
var QueryProcessor = /** @class */ (function () {
    function QueryProcessor(options) {
        if (options === void 0) { options = {}; }
        this.options = __assign({ timeout: 500 }, options);
    }
    /**
     * Overrides the previous queries and accumulates the result of promise arrays with a timeout.
     */
    QueryProcessor.prototype.processQueries = function (queries) {
        return __awaiter(this, void 0, void 0, function () {
            var _this = this;
            var asyncQueries;
            return __generator(this, function (_a) {
                this.overrideIfProcessing();
                this.processedResults = new Array(queries.length);
                asyncQueries = queries.map(function (query) { return (query instanceof Promise ? query : Promise.resolve(query)); });
                return [2 /*return*/, racePromises([
                        this.accumulateResultsChronologically(asyncQueries).then(function () { return _this.buildProcessResults(ProcessingStatus.Finished); }),
                        this.waitForOverride().then(function () { return _this.buildProcessResults(ProcessingStatus.Overriden); }),
                        this.waitForTimeout().then(function () { return _this.buildProcessResults(ProcessingStatus.TimedOut); })
                    ])];
            });
        });
    };
    QueryProcessor.prototype.overrideIfProcessing = function () {
        return __awaiter(this, void 0, void 0, function () {
            return __generator(this, function (_a) {
                if (this.override) {
                    this.override();
                }
                return [2 /*return*/];
            });
        });
    };
    Object.defineProperty(QueryProcessor.prototype, "orderedResults", {
        get: function () {
            return underscore_1.flatten(this.processedResults.filter(function (result) { return !!result; }), true);
        },
        enumerable: true,
        configurable: true
    });
    QueryProcessor.prototype.buildProcessResults = function (status) {
        return {
            status: status,
            results: status !== ProcessingStatus.Overriden ? this.orderedResults : []
        };
    };
    QueryProcessor.prototype.accumulateResultsChronologically = function (queries) {
        return __awaiter(this, void 0, void 0, function () {
            var output;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        output = this.processedResults;
                        return [4 /*yield*/, Promise.all(queries.map(function (query, i) { return query.then(function (items) { return (output[i] = items); }); }))];
                    case 1:
                        _a.sent();
                        return [2 /*return*/];
                }
            });
        });
    };
    QueryProcessor.prototype.waitForOverride = function () {
        var _this = this;
        return new Promise(function (resolve) {
            _this.override = function () {
                _this.override = null;
                resolve();
            };
        });
    };
    QueryProcessor.prototype.waitForTimeout = function () {
        var _this = this;
        return new Promise(function (resolve) { return setTimeout(function () { return resolve(); }, _this.options.timeout); });
    };
    return QueryProcessor;
}());
exports.QueryProcessor = QueryProcessor;
 
 
/***/ }),
/* 387 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { Iif (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        Iif (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            Iif (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
            Iif (y = 0, t) op = [0, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    Iif (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    Iif (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    Iif (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        Iif (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
Object.defineProperty(exports, "__esModule", { value: true });
var Dom_1 = __webpack_require__(0);
var ComponentOptionsModel_1 = __webpack_require__(55);
var OmniboxEvents_1 = __webpack_require__(47);
var StringUtils_1 = __webpack_require__(34);
var underscore_1 = __webpack_require__(1);
var QueryStateModel_1 = __webpack_require__(17);
var Utils_1 = __webpack_require__(5);
var HistoryStore_1 = __webpack_require__(84);
var AnalyticsInformation_1 = __webpack_require__(85);
var QuerySuggestAddon = /** @class */ (function () {
    function QuerySuggestAddon(omnibox) {
        var _this = this;
        this.omnibox = omnibox;
        Dom_1.$$(this.omnibox.element).on(OmniboxEvents_1.OmniboxEvents.populateOmniboxSuggestions, function (e, args) {
            args.suggestions.push(_this.getSuggestion());
        });
    }
    QuerySuggestAddon.suggestiontHtml = function (suggestion) {
        return suggestion.highlighted.replace(/\[(.*?)\]|\{(.*?)\}|\((.*?)\)/g, function (part, notMatched, matched, corrected) {
            var className = '';
            if (matched) {
                className = 'coveo-omnibox-hightlight';
            }
            if (corrected) {
                className = 'coveo-omnibox-hightlight2';
            }
            var ret;
            if (className) {
                ret = Dom_1.$$('span', {
                    className: className
                });
            }
            else {
                ret = Dom_1.$$('span');
            }
            ret.text(notMatched || matched || corrected);
            return ret.el.outerHTML;
        });
    };
    QuerySuggestAddon.isPartialMatch = function (suggestion) {
        // groups : 1=notMatched, 2=matched, 3=corrected
        var parts = StringUtils_1.StringUtils.match(suggestion.highlighted, /\[(.*?)\]|\{(.*?)\}|\((.*?)\)/g);
        var firstFail = underscore_1.find(parts, function (part) { return part[1] != null; });
        // if no fail found, this is a partial or a full match
        Eif (firstFail == null) {
            return true;
        }
        // if all right parts are notMatched, the right parts is autocomplete
        return underscore_1.every(underscore_1.last(parts, underscore_1.indexOf(parts, firstFail) - parts.length), function (part) { return part[1] != null; });
    };
    QuerySuggestAddon.prototype.getSuggestion = function () {
        var text = this.omnibox.magicBox.getText();
        if (text.length >= this.omnibox.options.querySuggestCharacterThreshold) {
            return this.getQuerySuggest(text);
        }
        return Promise.resolve([]);
    };
    QuerySuggestAddon.prototype.getQuerySuggest = function (text) {
        return __awaiter(this, void 0, void 0, function () {
            var payload, results, _a, completions;
            return __generator(this, function (_b) {
                switch (_b.label) {
                    case 0:
                        payload = {
                            q: text,
                            locale: this.locale,
                            searchHub: this.searchHub,
                            pipeline: this.pipeline,
                            enableWordCompletion: this.enableWordCompletion,
                            context: this.context,
                            count: this.count,
                            tab: this.tab,
                            referrer: document.referrer,
                            actionsHistory: this.actionsHistory,
                            timezone: this.timezone,
                            visitorId: this.visitorId,
                            isGuestUser: this.isGuestUser
                        };
                        Dom_1.$$(this.omnibox.getBindings().searchInterface.element).trigger(OmniboxEvents_1.OmniboxEvents.buildingQuerySuggest, {
                            payload: payload
                        });
                        _b.label = 1;
                    case 1:
                        _b.trys.push([1, 3, , 4]);
                        return [4 /*yield*/, this.omnibox.queryController.getEndpoint().getQuerySuggest(payload)];
                    case 2:
                        results = _b.sent();
                        return [3 /*break*/, 4];
                    case 3:
                        _a = _b.sent();
                        return [2 /*return*/, []];
                    case 4:
                        completions = results.completions;
                        Dom_1.$$(this.omnibox.getBindings().searchInterface.element).trigger(OmniboxEvents_1.OmniboxEvents.querySuggestSuccess, {
                            completions: completions
                        });
                        return [2 /*return*/, underscore_1.map(completions, function (completion, i) {
                                return {
                                    html: QuerySuggestAddon.suggestiontHtml(completion),
                                    text: completion.expression,
                                    index: QuerySuggestAddon.INDEX - i / completions.length,
                                    partial: QuerySuggestAddon.isPartialMatch(completion),
                                    executableConfidence: completion.executableConfidence
                                };
                            })];
                }
            });
        });
    };
    Object.defineProperty(QuerySuggestAddon.prototype, "tab", {
        get: function () {
            var tab = this.omnibox.getBindings().queryStateModel.get(QueryStateModel_1.QUERY_STATE_ATTRIBUTES.T);
            if (Utils_1.Utils.isNonEmptyString(tab)) {
                return tab;
            }
            return undefined;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(QuerySuggestAddon.prototype, "locale", {
        get: function () {
            return String['locale'];
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(QuerySuggestAddon.prototype, "searchHub", {
        get: function () {
            return this.omnibox.getBindings().componentOptionsModel.get(ComponentOptionsModel_1.ComponentOptionsModel.attributesEnum.searchHub);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(QuerySuggestAddon.prototype, "pipeline", {
        get: function () {
            return this.omnibox.getBindings().searchInterface.options.pipeline;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(QuerySuggestAddon.prototype, "enableWordCompletion", {
        get: function () {
            return this.omnibox.options.enableSearchAsYouType;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(QuerySuggestAddon.prototype, "context", {
        get: function () {
            return this.omnibox.getBindings().searchInterface.getQueryContext();
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(QuerySuggestAddon.prototype, "count", {
        get: function () {
            return this.omnibox.options.numberOfSuggestions;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(QuerySuggestAddon.prototype, "actionsHistory", {
        get: function () {
            var historyStore = HistoryStore_1.buildHistoryStore();
            var historyFromStore = historyStore.getHistory();
            if (historyFromStore == null) {
                return [];
            }
            return historyFromStore;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(QuerySuggestAddon.prototype, "timezone", {
        get: function () {
            return this.omnibox.getBindings().searchInterface.options.timezone;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(QuerySuggestAddon.prototype, "visitorId", {
        get: function () {
            return new AnalyticsInformation_1.AnalyticsInformation().clientId;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(QuerySuggestAddon.prototype, "isGuestUser", {
        get: function () {
            return this.omnibox.getBindings().queryController.getEndpoint().options.isGuestUser;
        },
        enumerable: true,
        configurable: true
    });
    QuerySuggestAddon.INDEX = 60;
    return QuerySuggestAddon;
}());
exports.QuerySuggestAddon = QuerySuggestAddon;
var VoidQuerySuggestAddon = /** @class */ (function () {
    function VoidQuerySuggestAddon() {
    }
    VoidQuerySuggestAddon.prototype.getSuggestion = function () {
        return Promise.resolve([]);
    };
    return VoidQuerySuggestAddon;
}());
exports.VoidQuerySuggestAddon = VoidQuerySuggestAddon;
 
 
/***/ }),
/* 388 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
__webpack_require__(1493);
var QueryEvents_1 = __webpack_require__(14);
var ResultListEvents_1 = __webpack_require__(48);
var GlobalExports_1 = __webpack_require__(10);
var Assert_1 = __webpack_require__(12);
var Model_1 = __webpack_require__(26);
var QueryStateModel_1 = __webpack_require__(17);
var Strings_1 = __webpack_require__(4);
var AccessibleButton_1 = __webpack_require__(20);
var DeviceUtils_1 = __webpack_require__(42);
var Dom_1 = __webpack_require__(0);
var ResultListUtils_1 = __webpack_require__(72);
var SVGDom_1 = __webpack_require__(23);
var SVGIcons_1 = __webpack_require__(16);
var AnalyticsActionListMeta_1 = __webpack_require__(7);
var Component_1 = __webpack_require__(6);
var ComponentOptions_1 = __webpack_require__(13);
var Initialization_1 = __webpack_require__(8);
/**
 * The Pager component attaches itself to a `div` element and renders widgets that allow the end user to navigate
 * through the different result pages.
 *
 * This component takes care of triggering a query with the correct result range whenever the end user selects a page or
 * uses the navigation buttons (**Previous** and **Next**).
 */
var Pager = /** @class */ (function (_super) {
    __extends(Pager, _super);
    /**
     * Creates a new Pager. Binds multiple query events ({@link QueryEvents.newQuery}, {@link QueryEvents.buildingQuery},
     * {@link QueryEvents.querySuccess}, {@link QueryEvents.queryError} and {@link QueryEvents.noResults}. Renders itself
     * on every query success.
     * @param element The HTMLElement on which to instantiate the component (normally a `div`).
     * @param options The options for the Pager component.
     * @param bindings The bindings that the component requires to function normally. If not set, these will be
     * automatically resolved (with a slower execution time).
     */
    function Pager(element, options, bindings) {
        var _this = _super.call(this, element, Pager.ID, bindings) || this;
        _this.element = element;
        _this.options = options;
        _this.listenToQueryStateChange = true;
        _this.ignoreNextQuerySuccess = false;
        // The normal behavior of this component is to reset to page 1 when a new
        // query is performed by other components (i.e. not pagers).
        //
        // This behavior is overridden when the 'first' state is
        // programmatically modified.
        _this.needToReset = true;
        _this.options = ComponentOptions_1.ComponentOptions.initComponentOptions(element, Pager, options);
        _this.currentPage = 1;
        _this.bind.onRootElement(QueryEvents_1.QueryEvents.newQuery, function (args) { return _this.handleNewQuery(args); });
        _this.bind.onRootElement(QueryEvents_1.QueryEvents.buildingQuery, function (args) { return _this.handleBuildingQuery(args); });
        _this.bind.onRootElement(QueryEvents_1.QueryEvents.querySuccess, function (args) { return _this.handleQuerySuccess(args); });
        _this.bind.onRootElement(QueryEvents_1.QueryEvents.queryError, function () { return _this.handleQueryError(); });
        _this.bind.onRootElement(QueryEvents_1.QueryEvents.noResults, function (args) { return _this.handleNoResults(args); });
        _this.bind.onQueryState(Model_1.MODEL_EVENTS.CHANGE_ONE, QueryStateModel_1.QUERY_STATE_ATTRIBUTES.FIRST, function (data) {
            return _this.handleQueryStateFirstResultChanged(data);
        });
        _this.bind.onQueryState(Model_1.MODEL_EVENTS.CHANGE_ONE, QueryStateModel_1.QUERY_STATE_ATTRIBUTES.NUMBER_OF_RESULTS, function (data) {
            return _this.handleQueryStateNumberOfResultsPerPageChanged(data);
        });
        _this.addAlwaysActiveListeners();
        _this.addAccessibilityAttributes();
        _this.list = Dom_1.$$('ul', {
            className: 'coveo-pager-list'
        }).el;
        element.appendChild(_this.list);
        return _this;
    }
    Object.defineProperty(Pager.prototype, "currentPage", {
        /**
         * The current page (1-based index).
         */
        get: function () {
            return this._currentPage;
        },
        set: function (value) {
            var sanitizedValue = value;
            if (isNaN(value)) {
                this.logger.warn("Unable to set pager current page to an invalid value: " + value + ". Resetting to 1.");
                sanitizedValue = 1;
            }
            sanitizedValue = Math.max(Math.min(sanitizedValue, this.getMaxNumberOfPagesForCurrentResultsPerPage()), 1);
            sanitizedValue = Math.floor(sanitizedValue);
            this._currentPage = sanitizedValue;
        },
        enumerable: true,
        configurable: true
    });
    /**
     * Sets the current page, then executes a query.
     *
     * Also logs an event in the usage analytics (`pageNumber` by default) with the new current page number as meta data.
     *
     * @param pageNumber The page number to navigate to.
     * @param analyticCause The event to log in the usage analytics.
     */
    Pager.prototype.setPage = function (pageNumber, analyticCause) {
        if (analyticCause === void 0) { analyticCause = AnalyticsActionListMeta_1.analyticsActionCauseList.pagerNumber; }
        Assert_1.Assert.exists(pageNumber);
        this.currentPage = pageNumber;
        this.updateQueryStateModel(this.getFirstResultNumber(this.currentPage));
        this.usageAnalytics.logCustomEvent(analyticCause, { pagerNumber: this.currentPage }, this.element);
        this.queryController.executeQuery({
            ignoreWarningSearchEvent: true,
            keepLastSearchUid: true,
            origin: this
        });
    };
    /**
     * Navigates to the previous page, then executes a query.
     *
     * Also logs the `pagePrevious` event in the usage analytics with the new current page number as meta data.
     */
    Pager.prototype.previousPage = function () {
        this.setPage(this.currentPage - 1, AnalyticsActionListMeta_1.analyticsActionCauseList.pagerPrevious);
    };
    /**
     * Navigates to the next page, then executes a query.
     *
     * Also logs the `pageNext` event in the usage analytics with the new current page number as meta data.
     */
    Pager.prototype.nextPage = function () {
        this.setPage(this.currentPage + 1, AnalyticsActionListMeta_1.analyticsActionCauseList.pagerNext);
    };
    Pager.prototype.addAccessibilityAttributes = function () {
        Eif (!this.element.getAttribute('role')) {
            this.element.setAttribute('role', 'navigation');
        }
        Eif (!this.element.hasAttribute('aria-label')) {
            this.element.setAttribute('aria-label', Strings_1.l('Pagination'));
        }
    };
    Pager.prototype.addAlwaysActiveListeners = function () {
        var _this = this;
        this.searchInterface.element.addEventListener(ResultListEvents_1.ResultListEvents.newResultsDisplayed, function () {
            return ResultListUtils_1.ResultListUtils.hideIfInfiniteScrollEnabled(_this);
        });
    };
    Pager.prototype.getMaxNumberOfPagesForCurrentResultsPerPage = function () {
        return Math.ceil(this.options.maximumNumberOfResultsFromIndex / this.searchInterface.resultsPerPage);
    };
    Pager.prototype.handleNewQuery = function (data) {
        var triggeredByPagerOrDebugMode = data && data.origin && (data.origin.type == Pager.ID || data.origin.type == 'Debug');
        if (this.needToReset && !triggeredByPagerOrDebugMode) {
            this.currentPage = 1;
            this.updateQueryStateModel(this.getFirstResultNumber(this.currentPage));
        }
        this.needToReset = true;
    };
    Pager.prototype.updateQueryStateModel = function (attrValue) {
        this.listenToQueryStateChange = false;
        this.queryStateModel.set(QueryStateModel_1.QueryStateModel.attributesEnum.first, attrValue);
        this.listenToQueryStateChange = true;
    };
    Pager.prototype.handleQueryError = function () {
        this.reset();
    };
    Pager.prototype.handleQuerySuccess = function (data) {
        var _this = this;
        this.reset();
        Iif (this.ignoreNextQuerySuccess) {
            this.ignoreNextQuerySuccess = false;
        }
        else {
            Assert_1.Assert.isNotUndefined(data);
            var firstResult = data.query.firstResult;
            var count = data.results.totalCountFiltered;
            var pagerBoundary = this.computePagerBoundary(firstResult, count);
            this.currentPage = pagerBoundary.currentPage;
            if (pagerBoundary.end - pagerBoundary.start > 0) {
                var _loop_1 = function (i) {
                    var page = i;
                    var isCurrentPage = page === this_1.currentPage;
                    var button = Dom_1.$$('span', {
                        className: 'coveo-pager-list-item-text coveo-pager-anchor',
                        tabindex: 0,
                        ariaPressed: "" + isCurrentPage
                    }, i.toString(10)).el;
                    var listItem = Dom_1.$$('li', {
                        className: 'coveo-pager-list-item'
                    }).el;
                    if (isCurrentPage) {
                        Dom_1.$$(listItem).addClass('coveo-active');
                        button.setAttribute('aria-current', 'page');
                    }
                    var clickAction = function (e) {
                        e.stopPropagation();
                        _this.handleClickPage(page);
                    };
                    new AccessibleButton_1.AccessibleButton()
                        .withElement(button)
                        .withLabel(Strings_1.l('PageNumber', i.toString(10)))
                        .withClickAction(clickAction)
                        .withEnterKeyboardAction(clickAction)
                        .build();
                    Dom_1.$$(listItem).on('click', function (e) { return clickAction(e); });
                    listItem.appendChild(button);
                    this_1.list.appendChild(listItem);
                };
                var this_1 = this;
                for (var i = pagerBoundary.start; i <= pagerBoundary.end; i++) {
                    _loop_1(i);
                }
                if (this.options.enableNavigationButton && pagerBoundary.lastResultPage > 1) {
                    this.renderNavigationButton(pagerBoundary);
                }
            }
        }
    };
    Pager.prototype.handleNoResults = function (data) {
        var lastValidPage;
        if (data.results.totalCount > 0) {
            // First scenario : The index returned less results than expected (because of folding).
            // Recalculate the last valid page, and change to that new page.
            var possibleValidPage = this.computePagerBoundary(data.results.totalCountFiltered, data.results.totalCount).lastResultPage;
            Eif (this.currentPage > possibleValidPage) {
                lastValidPage = possibleValidPage;
            }
        }
        else if (this.currentPage > this.getMaxNumberOfPagesForCurrentResultsPerPage()) {
            // Second scenario : Someone tried to access a non-valid page by the URL for example, which is  higher than the current possible with the number of
            // possible results. The last valid page will be the maximum number of results avaiable from the index.
            lastValidPage = this.getMaxNumberOfPagesForCurrentResultsPerPage();
        }
        // This needs to be deferred because we still want all the "querySuccess" callbacks the complete their execution
        // before triggering/queuing the next query;
        // if we cannot find a lastValidPage to go to, do nothing : this means it's a query that simply return nothing.
        if (lastValidPage != null) {
            this.currentPage = lastValidPage;
            data.retryTheQuery = true;
            this.needToReset = false;
            this.ignoreNextQuerySuccess = false;
            this.updateQueryStateModel(this.getFirstResultNumber(this.currentPage));
        }
    };
    Pager.prototype.reset = function () {
        Dom_1.$$(this.list).empty();
    };
    Pager.prototype.handleBuildingQuery = function (data) {
        Assert_1.Assert.exists(data);
        var eventArgs = this.getQueryEventArgs();
        data.queryBuilder.firstResult = eventArgs.first;
        // Set the number of results only if it was not already set by external code
        // Most of the time this will be set by either : the SearchInterface with the resultsPerPage option
        // Or by the ResultsPerPage component (so the end user decides).
        // Pager will realistically never set this value itself.
        Iif (data.queryBuilder.numberOfResults == null) {
            data.queryBuilder.numberOfResults = eventArgs.count;
        }
        var maxResultNumber = data.queryBuilder.firstResult + data.queryBuilder.numberOfResults;
        var numOfExcessResults = Math.max(0, maxResultNumber - this.options.maximumNumberOfResultsFromIndex);
        data.queryBuilder.numberOfResults -= numOfExcessResults;
    };
    Pager.prototype.computePagerBoundary = function (firstResult, totalCount) {
        var resultPerPage = this.searchInterface.resultsPerPage;
        var currentPage = Math.floor(firstResult / resultPerPage) + 1;
        var lastPageNumber = Math.max(Math.min(Math.ceil(totalCount / resultPerPage), this.getMaxNumberOfPagesForCurrentResultsPerPage()), 1);
        var halfLength = Math.floor(this.options.numberOfPages / 2);
        var firstPageNumber = Math.max(Math.min(currentPage - halfLength, lastPageNumber - this.options.numberOfPages + 1), 1);
        var endPageNumber = Math.min(firstPageNumber + this.options.numberOfPages - 1, lastPageNumber);
        return {
            start: firstPageNumber,
            end: endPageNumber,
            lastResultPage: lastPageNumber,
            currentPage: currentPage
        };
    };
    Pager.prototype.renderNavigationButton = function (pagerBoundary) {
        if (this.currentPage > 1) {
            var previous = this.renderPreviousButton();
            this.list.insertBefore(previous.el, this.list.firstChild);
        }
        if (this.currentPage < pagerBoundary.lastResultPage) {
            var next = this.renderNextButton();
            this.list.appendChild(next.el);
        }
    };
    Pager.prototype.renderPreviousButton = function () {
        var _this = this;
        var previousListItem = Dom_1.$$('li', {
            className: 'coveo-pager-previous coveo-pager-anchor coveo-pager-list-item'
        });
        var previousButton = Dom_1.$$('span', {
            title: Strings_1.l('Previous'),
            tabindex: 0
        });
        var previousIcon = Dom_1.$$('span', {
            className: 'coveo-pager-previous-icon'
        }, SVGIcons_1.SVGIcons.icons.pagerLeftArrow);
        SVGDom_1.SVGDom.addClassToSVGInContainer(previousIcon.el, 'coveo-pager-previous-icon-svg');
        previousButton.append(previousIcon.el);
        previousListItem.append(previousButton.el);
        new AccessibleButton_1.AccessibleButton()
            .withElement(previousButton)
            .withLabel(Strings_1.l('Previous'))
            .withSelectAction(function () { return _this.handleClickPrevious(); })
            .build();
        return previousListItem;
    };
    Pager.prototype.renderNextButton = function () {
        var _this = this;
        var nextListItem = Dom_1.$$('li', {
            className: 'coveo-pager-next coveo-pager-anchor coveo-pager-list-item'
        });
        var nextButton = Dom_1.$$('span', {
            title: Strings_1.l('Next'),
            tabindex: 0
        });
        var nextIcon = Dom_1.$$('span', {
            className: 'coveo-pager-next-icon'
        }, SVGIcons_1.SVGIcons.icons.pagerRightArrow);
        SVGDom_1.SVGDom.addClassToSVGInContainer(nextIcon.el, 'coveo-pager-next-icon-svg');
        nextButton.append(nextIcon.el);
        nextListItem.append(nextButton.el);
        new AccessibleButton_1.AccessibleButton()
            .withElement(nextButton)
            .withLabel(Strings_1.l('Next'))
            .withSelectAction(function () { return _this.handleClickNext(); })
            .build();
        return nextListItem;
    };
    Pager.prototype.handleQueryStateFirstResultChanged = function (data) {
        Iif (!this.listenToQueryStateChange) {
            return;
        }
        Assert_1.Assert.exists(data);
        this.needToReset = false;
        var firstResult = data.value;
        this.currentPage = this.fromFirstResultsToPageNumber(firstResult);
    };
    Pager.prototype.handleQueryStateNumberOfResultsPerPageChanged = function (data) {
        var firstResult = this.queryStateModel.get(QueryStateModel_1.QUERY_STATE_ATTRIBUTES.FIRST);
        this.searchInterface.resultsPerPage = data.value;
        this.currentPage = this.fromFirstResultsToPageNumber(firstResult);
    };
    Pager.prototype.handleClickPage = function (pageNumber) {
        Assert_1.Assert.exists(pageNumber);
        this.setPage(pageNumber);
    };
    Pager.prototype.handleClickPrevious = function () {
        this.previousPage();
    };
    Pager.prototype.handleClickNext = function () {
        this.nextPage();
    };
    Pager.prototype.fromFirstResultsToPageNumber = function (firstResult) {
        return firstResult / this.searchInterface.resultsPerPage + 1;
    };
    Pager.prototype.getFirstResultNumber = function (pageNumber) {
        if (pageNumber === void 0) { pageNumber = this.currentPage; }
        return (pageNumber - 1) * this.searchInterface.resultsPerPage;
    };
    Pager.prototype.getQueryEventArgs = function () {
        return {
            count: this.searchInterface.resultsPerPage,
            first: this.getFirstResultNumber()
        };
    };
    Pager.ID = 'Pager';
    Pager.doExport = function () {
        GlobalExports_1.exportGlobally({
            Pager: Pager
        });
    };
    /**
     * The options for the Pager
     * @componentOptions
     */
    Pager.options = {
        /**
         * Specifies how many page links to display in the pager.
         *
         * Default value is `5` on a desktop computers and `3` on a mobile device. Minimum value is `1`.
         */
        numberOfPages: ComponentOptions_1.ComponentOptions.buildNumberOption({
            defaultFunction: function () {
                Iif (DeviceUtils_1.DeviceUtils.isMobileDevice()) {
                    return 3;
                }
                else {
                    return 5;
                }
            },
            min: 1
        }),
        /**
         * Specifies whether the **Previous** and **Next** buttons should appear at each end of the pager when appropriate.
         *
         * The default value is `true`.
         */
        enableNavigationButton: ComponentOptions_1.ComponentOptions.buildBooleanOption({ defaultValue: true }),
        /**
         * Specifies the maximum number of pages to display if enough results are available.
         *
         * This property is typically set when the default number of accessible results from the index has been changed from its default value of `1000` (10 results per page X 100 `maxNumberOfPages`).
         * Default value is `100`
         *
         * @deprecated This is a deprecated option. The `Pager` now automatically adapts itself on each new query, so you no longer need to specify a value for this option. However, if the default maximum number of accessible results value was changed on your Coveo index, you should use the [`maximumNumberOfResultsFromIndex`]{@link Pager.options.maximumNumberOfResultsFromIndex} option to specify the new value.
         */
        maxNumberOfPages: ComponentOptions_1.ComponentOptions.buildNumberOption({
            defaultValue: undefined,
            deprecated: 'This is a deprecated option. The pager will automatically adapt itself on each new query. You no longer need to specify this option. Use maximumNumberOfResultsFromIndex instead.'
        }),
        /**
         * Specifies the maximum number of results that the index can return for any query.
         *
         * Default value is `1000` in a Coveo index.
         *
         * If this value was modified in your Coveo index, you must specify the new value in this option for the Pager component to work properly
         */
        maximumNumberOfResultsFromIndex: ComponentOptions_1.ComponentOptions.buildNumberOption({
            defaultValue: 1000
        })
    };
    return Pager;
}(Component_1.Component));
exports.Pager = Pager;
Initialization_1.Initialization.registerAutoCreateComponent(Pager);
 
 
/***/ }),
/* 389 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
var _ = __webpack_require__(1);
var QueryEvents_1 = __webpack_require__(14);
var GlobalExports_1 = __webpack_require__(10);
var Dom_1 = __webpack_require__(0);
var Utils_1 = __webpack_require__(5);
var Component_1 = __webpack_require__(6);
var ComponentOptions_1 = __webpack_require__(13);
var Initialization_1 = __webpack_require__(8);
/**
 * The `PipelineContext` component injects custom contextual information into the search requests and usage analytics search events sent from a search interface.
 *
 * This component is meant to be initialized on a `script` HTML tag whose `type` attribute is set to `text/context` and whose optional JSON content defines the custom information to send (each value can be set to a string or array of strings).
 *
 * See [Sending Custom Context Information](https://docs.coveo.com/en/399/).
 * Note: To customize the context sent on all usage analytics events, see [Sending Custom Metadata with Search, Click, or Custom Events](https://docs.coveo.com/en/2004/javascript-search-framework/sending-custom-metadata-with-search-click-or-custom-events).
 */
var PipelineContext = /** @class */ (function (_super) {
    __extends(PipelineContext, _super);
    function PipelineContext(element, options, bindings) {
        var _this = _super.call(this, element, PipelineContext.ID, bindings) || this;
        _this.element = element;
        _this.options = options;
        _this.bindings = bindings;
        _this.contextContent = {};
        _this.options = ComponentOptions_1.ComponentOptions.initComponentOptions(element, PipelineContext, options);
        _this.setContext(Dom_1.$$(_this.element)
            .text()
            .trim());
        _this.bind.onRootElement(QueryEvents_1.QueryEvents.buildingQuery, function (args) { return _this.handleBuildingQuery(args); });
        return _this;
    }
    /**
     * **Available since the [December 2017 Release](https://docs.coveo.com/en/373).**
     *
     * Sets a new context, replacing the previous context if applicable.
     *
     * @param newContext The new context to set, which can be directly passed as a JSON, or as a stringified JSON.
     */
    PipelineContext.prototype.setContext = function (newContext) {
        if (_.isString(newContext)) {
            var contextParsed = this.tryParseContextFromString(newContext);
            this.contextContent = contextParsed;
        }
        else {
            this.contextContent = newContext;
        }
    };
    /**
     * Returns the current context
     */
    PipelineContext.prototype.getContext = function () {
        var _this = this;
        var keys = this.getContextKeys();
        return _.object(keys, _.map(keys, function (key) { return _this.getContextValue(key); }));
    };
    /**
     * **Available since the [December 2017 Release](https://docs.coveo.com/en/373).**
     *
     * Sets a value for a context key, replacing the previous value if applicable.
     * @param contextKey
     * @param contextValue
     */
    PipelineContext.prototype.setContextValue = function (contextKey, contextValue) {
        this.contextContent[contextKey] = contextValue;
    };
    /**
     * Return all the context keys configured for context.
     * @returns {string[]}
     */
    PipelineContext.prototype.getContextKeys = function () {
        return _.keys(this.contextContent);
    };
    /**
     * Get the context value associated to the given key.
     *
     * If the global variable Coveo.context contains the requested key, this method will return the value contained in Coveo.context instead of the one contained internally.
     *
     * This is especially useful in a Coveo for Salesforce context, where context values can be extracted from a backend service.
     * @param key
     * @returns {string}
     */
    PipelineContext.prototype.getContextValue = function (key) {
        var _this = this;
        var contextValue = this.contextContent[key];
        if (_.isArray(contextValue)) {
            var contextValues_1 = [];
            _.each(this.contextContent[key], function (value) {
                contextValues_1.push(_this.getModifiedData(value));
            });
            return contextValues_1;
        }
        else Eif (_.isString(contextValue)) {
            return this.getModifiedData(contextValue);
        }
        return '';
    };
    PipelineContext.prototype.handleBuildingQuery = function (args) {
        var _this = this;
        var keys = this.getContextKeys();
        _.each(keys, function (key) {
            args.queryBuilder.addContextValue(key, _this.getContextValue(key));
        });
    };
    PipelineContext.prototype.tryParseContextFromString = function (contextAsString) {
        if (_.isEmpty(contextAsString)) {
            return {};
        }
        try {
            // Context could be HTML encoded (eg: Coveo for Salesforce)
            return JSON.parse(Utils_1.Utils.decodeHTMLEntities(contextAsString));
        }
        catch (e) {
            try {
                return JSON.parse(contextAsString);
            }
            catch (e) {
                this.logger.error("Error while trying to parse context from the PipelineContext component", e);
                return null;
            }
        }
    };
    PipelineContext.prototype.getModifiedData = function (value) {
        /* We need to modify the data to escape special salesforce characters. eg: {! }
         If we find the matching value in the global Coveo.context variable, we return that one instead of the one present locally.
         So, concretely, the component could contain :
         {
           "productName" : "{! productValueFromSalesforce }"
         }
    
         This means that in those case, we would try to access Coveo.context.productValueFromSalesforce (which would in theory be a "real" product value from salesforce, and not a placeholder/variable)
        */
        return value.replace(/\{\!([^\}]+)\}/g, function (all, contextKey) {
            var trimmedKey = contextKey.trim();
            if (Coveo.context && trimmedKey in Coveo.context) {
                return Coveo.context[trimmedKey];
            }
            else Iif (trimmedKey == PipelineContext.CURRENT_URL) {
                return window.location.href;
            }
            return '';
        });
    };
    PipelineContext.ID = 'PipelineContext';
    PipelineContext.CURRENT_URL = 'CurrentUrl';
    PipelineContext.doExport = function () {
        GlobalExports_1.exportGlobally({
            PipelineContext: PipelineContext
        });
    };
    return PipelineContext;
}(Component_1.Component));
exports.PipelineContext = PipelineContext;
Initialization_1.Initialization.registerAutoCreateComponent(PipelineContext);
 
 
/***/ }),
/* 390 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { Iif (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        Iif (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            Iif (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
            Iif (y = 0, t) op = [0, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    Iif (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    Eif (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        Iif (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
Object.defineProperty(exports, "__esModule", { value: true });
var popper_js_1 = __webpack_require__(181);
__webpack_require__(1499);
var QuickviewEvents_1 = __webpack_require__(267);
var ResultListEvents_1 = __webpack_require__(48);
var ExternalModulesShim_1 = __webpack_require__(39);
var GlobalExports_1 = __webpack_require__(10);
var QueryStateModel_1 = __webpack_require__(17);
var Strings_1 = __webpack_require__(4);
var AccessibleButton_1 = __webpack_require__(20);
var Dom_1 = __webpack_require__(0);
var DomUtils_1 = __webpack_require__(137);
var StringUtils_1 = __webpack_require__(34);
var SVGDom_1 = __webpack_require__(23);
var SVGIcons_1 = __webpack_require__(16);
var Utils_1 = __webpack_require__(5);
var AnalyticsActionListMeta_1 = __webpack_require__(7);
var Component_1 = __webpack_require__(6);
var ComponentOptions_1 = __webpack_require__(13);
var IComponentOptions_1 = __webpack_require__(115);
var Initialization_1 = __webpack_require__(8);
var TemplateComponentOptions_1 = __webpack_require__(89);
var DefaultQuickviewTemplate_1 = __webpack_require__(1500);
var QuickviewDocument_1 = __webpack_require__(268);
var AccessibleModal_1 = __webpack_require__(144);
/**
 * The `Quickview` component renders a button/link which the end user can click to open a modal box containing certain
 * information about a result. Most of the time, this component references a
 * [`QuickviewDocument`]{@link QuickviewDocument} in its [`contentTemplate`]{@link Quickview.options.contentTemplate}.
 *
 * **Notes:**
 * > - `Quickview` is not meant to replace a [ResultLink]{@link ResultLink} to access an item; it has certain limitations (e.g., custom styles and embedded
 * images/links may not work as expected in a `Quickview`).
 * > - You can change the appearance of the `Quickview` link/button by adding elements in the inner HTML of its `div`.
 * > - You can change the content of the `Quickview` modal box link by specifying a template `id` or CSS selector (see
 * > the [`contentTemplate`]{@link Quickview.options.contentTemplate} option).
 * > - When using Coveo for Salesforce 3.16, in an environment compliant with LockerService, ensure you use `CoveoSalesforceQuickview` (see [Changing the Default Quick View in Coveo for Salesforce](https://docs.coveo.com/en/1234/)).
 *
 * **Example:**
 * ```html
 * [ ... ]
 *
 * <script class='result-template' type='text/underscore' id='myContentTemplateId'>
 *   <div>
 *     <span>This content will be displayed when then end user opens the quickview modal box. It could also include other Coveo component, and use core helpers.</span>
 *     <table class="CoveoFieldTable">
 *       <tr data-field="@liboardshorttitle" data-caption="Board" />
 *       <tr data-field="@licategoryshorttitle" data-caption="Category" />
 *       <tr data-field="@sysauthor" data-caption="Author" />
 *     </table>
 *   </div>
 * </script>
 *
 * [ ... ]
 *
 * <div class='CoveoResultList'>
 *   <script class='result-template' type='text/underscore' id='myResultTemplateId'>
 *
 *   [ ... ]
 *
 *     <!-- The `myContentTemplateId` template applies when displaying content in the quickview modal box. -->
 *       <div class='CoveoQuickview' data-template-id='myContentTemplateId'>
 *         <!-- This changes the appearance of the Quickview button itself in the results -->
 *         <span>Click here for a quickview</span>
 *       </div>
 *   </script>
 *
 *   [ ... ]
 *
 * <!-- Note that simply including `<div class='CoveoQuickview'></div>` in the markup will be enough most of the time, since the component includes a default template and a default button appearance. -->
 * ```
 *
 * This component is a result template component (see [Result Templates](https://docs.coveo.com/en/413/)).
 */
var Quickview = /** @class */ (function (_super) {
    __extends(Quickview, _super);
    /**
     * Creates a new `Quickview` component.
     * @param element The HTMLElement on which to instantiate the component.
     * @param options The options for the `Quickview` component.
     * @param bindings The bindings that the component requires to function normally. If not set, these will be
     * automatically resolved (with a slower execution time).
     * @param result The result to associate the component with.
     * @param ModalBox The quickview modal box.
     */
    function Quickview(element, options, bindings, result, ModalBox) {
        if (ModalBox === void 0) { ModalBox = ExternalModulesShim_1.ModalBox; }
        var _this = _super.call(this, element, Quickview.ID, bindings) || this;
        _this.element = element;
        _this.options = options;
        _this.bindings = bindings;
        _this.result = result;
        _this.options = ComponentOptions_1.ComponentOptions.initComponentOptions(element, Quickview, options);
        if (_this.options.contentTemplate == null) {
            _this.options.contentTemplate = new DefaultQuickviewTemplate_1.DefaultQuickviewTemplate();
        }
        // If there is no content inside the Quickview div,
        // we need to add something that will show up in the result template itself
        Eif (/^\s*$/.test(_this.element.innerHTML)) {
            _this.buildContent();
        }
        _this.bindClick(result);
        if (_this.bindings.resultElement) {
            _this.bind.on(_this.bindings.resultElement, ResultListEvents_1.ResultListEvents.openQuickview, function (event) {
                event && event.stopPropagation();
                _this.open();
            });
        }
        _this.modalbox = new AccessibleModal_1.AccessibleModal('coveo-quick-view', _this.searchInterface.options.modalContainer, ModalBox);
        return _this;
    }
    Quickview.prototype.buildContent = function () {
        var icon = this.buildIcon();
        var caption = this.buildCaption();
        var content = Dom_1.$$('div');
        content.append(icon);
        content.append(caption);
        Dom_1.$$(this.element).append(content.el);
        this.buildTooltipIfNotInCardLayout(icon, caption);
    };
    Quickview.prototype.buildIcon = function () {
        var icon = Dom_1.$$('div', { className: 'coveo-icon-for-quickview' }, SVGIcons_1.SVGIcons.icons.quickview).el;
        SVGDom_1.SVGDom.addClassToSVGInContainer(icon, 'coveo-icon-for-quickview-svg');
        return icon;
    };
    Quickview.prototype.buildCaption = function () {
        return Dom_1.$$('div', { className: 'coveo-caption-for-icon' }, 'Quickview'.toLocaleString()).el;
    };
    Quickview.prototype.buildTooltipIfNotInCardLayout = function (icon, caption) {
        if (this.resultsAreInCardLayout) {
            return;
        }
        var arrow = Dom_1.$$('div').el;
        caption.appendChild(arrow);
        this.buildPopper(icon, caption, arrow);
    };
    Object.defineProperty(Quickview.prototype, "resultsAreInCardLayout", {
        get: function () {
            return this.queryStateModel.get(QueryStateModel_1.QueryStateModel.attributesEnum.layout) === 'card';
        },
        enumerable: true,
        configurable: true
    });
    Quickview.prototype.buildPopper = function (icon, caption, arrow) {
        var popperReference = new popper_js_1.default(icon, caption, {
            placement: this.options.tooltipPlacement,
            modifiers: {
                preventOverflow: {
                    boundariesElement: Dom_1.$$(this.root).el,
                    padding: 0
                },
                arrow: {
                    element: arrow
                },
                // X,Y offset of the tooltip relative to the icon
                offset: {
                    offset: '0,8'
                }
            },
            eventsEnabled: false
        });
        Dom_1.$$(this.element).on('mouseover', function () {
            popperReference.update();
        });
    };
    /**
     * Opens the `Quickview` modal box.
     */
    Quickview.prototype.open = function () {
        var _this = this;
        Eif (!this.modalbox.isOpen) {
            // To prevent the keyboard from opening on mobile if the search bar has focus
            Quickview.resultCurrentlyBeingRendered = this.result;
            // activeElement does not exist in LockerService
            Eif (document.activeElement && document.activeElement instanceof HTMLElement) {
                Dom_1.$$(document.activeElement).trigger('blur');
            }
            var openerObject_1 = this.prepareOpenQuickviewObject();
            return this.createModalBox(openerObject_1).then(function () {
                _this.bindQuickviewEvents(openerObject_1);
                _this.animateAndOpen();
                _this.logUsageAnalyticsEvent();
                _this.queryStateModel.set(QueryStateModel_1.QueryStateModel.attributesEnum.quickview, _this.getHashId());
                Quickview.resultCurrentlyBeingRendered = null;
            });
        }
    };
    /**
     * Closes the `Quickview` modal box.
     */
    Quickview.prototype.close = function () {
        Eif (this.modalbox.isOpen) {
            this.modalbox.close();
        }
    };
    Quickview.prototype.getHashId = function () {
        return this.result.queryUid + '.' + this.result.index + '.' + StringUtils_1.StringUtils.hashCode(this.result.uniqueId);
    };
    Quickview.prototype.logUsageAnalyticsEvent = function () {
        this.usageAnalytics.logClickEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.documentQuickview, {
            author: Utils_1.Utils.getFieldValue(this.result, 'author'),
            documentURL: this.result.clickUri,
            documentTitle: this.result.title
        }, this.result, this.element);
    };
    Quickview.prototype.bindClick = function (result) {
        var _this = this;
        Eif (typeof result.hasHtmlVersion == 'undefined' || result.hasHtmlVersion || this.options.alwaysShow) {
            var clickAction = function () { return _this.open(); };
            new AccessibleButton_1.AccessibleButton().withElement(this.element).withSelectAction(clickAction).withLabel(Strings_1.l('Quickview')).withOwner(this.bind).build();
        }
        else {
            this.element.style.display = 'none';
        }
    };
    Quickview.prototype.bindQuickviewEvents = function (openerObject) {
        var _this = this;
        Dom_1.$$(this.modalbox.content).on(QuickviewEvents_1.QuickviewEvents.quickviewLoaded, function () { return __awaiter(_this, void 0, void 0, function () {
            var anim;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0: return [4 /*yield*/, openerObject.loadingAnimation];
                    case 1:
                        anim = _a.sent();
                        Dom_1.$$(anim).remove();
                        return [2 /*return*/];
                }
            });
        }); });
    };
    Quickview.prototype.animateAndOpen = function () {
        var quickviewDocument = Dom_1.$$(this.modalbox.element).find('.' + Component_1.Component.computeCssClassName(QuickviewDocument_1.QuickviewDocument));
        Iif (quickviewDocument) {
            Initialization_1.Initialization.dispatchNamedMethodCallOrComponentCreation('open', quickviewDocument, null);
        }
    };
    Quickview.prototype.createModalBox = function (openerObject) {
        var _this = this;
        var computedModalBoxContent = Dom_1.$$('div');
        computedModalBoxContent.addClass('coveo-computed-modal-box-content');
        return openerObject.content.then(function (builtContent) {
            computedModalBoxContent.append(builtContent.el);
            _this.modalbox.openResult({
                result: _this.result,
                options: {
                    showDate: _this.options.showDate,
                    title: _this.options.title
                },
                bindings: _this.bindings,
                content: computedModalBoxContent.el,
                validation: function () {
                    _this.closeQuickview();
                    return true;
                },
                origin: _this.element
            });
            return computedModalBoxContent;
        });
    };
    Quickview.prototype.prepareOpenQuickviewObject = function () {
        var loadingAnimation = this.options.loadingAnimation;
        return {
            loadingAnimation: loadingAnimation,
            content: this.prepareQuickviewContent(loadingAnimation)
        };
    };
    Quickview.prototype.prepareQuickviewContent = function (loadingAnimation) {
        return __awaiter(this, void 0, void 0, function () {
            var _this = this;
            var domContent, initOptions, initParameters, containsQuickviewDocumentAndCustomAnimation;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0: return [4 /*yield*/, this.instantiateTemplateToDom()];
                    case 1:
                        domContent = _a.sent();
                        initOptions = this.searchInterface.options;
                        initParameters = {
                            options: initOptions,
                            bindings: this.getBindings(),
                            result: this.result
                        };
                        return [4 /*yield*/, Initialization_1.Initialization.automaticallyCreateComponentsInside(domContent.el, initParameters).initResult];
                    case 2:
                        _a.sent();
                        containsQuickviewDocumentAndCustomAnimation = function () {
                            return domContent.find("." + Component_1.Component.computeCssClassName(QuickviewDocument_1.QuickviewDocument)) != undefined && _this.options.enableLoadingAnimation;
                        };
                        if (containsQuickviewDocumentAndCustomAnimation()) {
                            Eif (loadingAnimation instanceof HTMLElement) {
                                domContent.prepend(loadingAnimation);
                            }
                            else if (loadingAnimation instanceof Promise) {
                                loadingAnimation.then(function (anim) {
                                    domContent.prepend(anim);
                                });
                            }
                        }
                        return [2 /*return*/, domContent];
                }
            });
        });
    };
    Quickview.prototype.instantiateTemplateToDom = function () {
        return __awaiter(this, void 0, void 0, function () {
            var templateInstantiated, e_1;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        _a.trys.push([0, 2, 3, 6]);
                        return [4 /*yield*/, this.options.contentTemplate.instantiateToElement(this.result)];
                    case 1:
                        templateInstantiated = _a.sent();
                        return [3 /*break*/, 6];
                    case 2:
                        e_1 = _a.sent();
                        this.logger.warn(e_1);
                        return [3 /*break*/, 6];
                    case 3:
                        if (!!templateInstantiated) return [3 /*break*/, 5];
                        this.logger.warn('An unexpected error happened while trying to render a custom template quickview, fallbacking on default quickview template...', this.options.contentTemplate);
                        return [4 /*yield*/, new DefaultQuickviewTemplate_1.DefaultQuickviewTemplate().instantiateToElement(this.result)];
                    case 4:
                        templateInstantiated = _a.sent();
                        _a.label = 5;
                    case 5: return [7 /*endfinally*/];
                    case 6: return [2 /*return*/, Dom_1.$$(templateInstantiated)];
                }
            });
        });
    };
    Quickview.prototype.closeQuickview = function () {
        this.queryStateModel.set(QueryStateModel_1.QueryStateModel.attributesEnum.quickview, '');
    };
    Quickview.ID = 'Quickview';
    Quickview.doExport = function () {
        GlobalExports_1.exportGlobally({
            Quickview: Quickview,
            QuickviewDocument: QuickviewDocument_1.QuickviewDocument
        });
    };
    /**
     * @componentOptions
     */
    Quickview.options = {
        /**
         * Specifies whether to always show the `Quickview` button/link, even when the index body of an item is empty.
         *
         * In such cases, the [`contentTemplate`]{@link Quickview.options.contentTemplate} defines what appears in the
         * `Quickview` modal box. Consequently, if there is no quickview for the item, you *MUST* specify a custom
         * `contentTemplate`, otherwise the component will throw an error when opened.
         *
         * Default value is `false`.
         *
         * @availablesince [September 2015 Release (v1.0.59)](https://docs.coveo.com/en/289/#september-2015-release-v1059)
         */
        alwaysShow: ComponentOptions_1.ComponentOptions.buildBooleanOption({ defaultValue: false }),
        /**
         * Specifies the title that should appear in the `Quickview` modal box header.
         *
         * Default value is undefined, which is equivalent to the empty string.
         */
        title: ComponentOptions_1.ComponentOptions.buildStringOption(),
        /**
         * Specifies whether to display the item date in the `Quickview` modal box header.
         *
         * Default value is `true`.
         */
        showDate: ComponentOptions_1.ComponentOptions.buildBooleanOption({ defaultValue: true }),
        /**
         * Specifies whether to enable the loading animation.
         *
         * See also [`loadingAnimation`]{Quickview.options.loadingAnimation}.
         *
         * Default value is `true`.
         */
        enableLoadingAnimation: ComponentOptions_1.ComponentOptions.buildBooleanOption({ defaultValue: true }),
        /**
         * Specifies a custom template to use when displaying content in the `Quickview` modal box.
         *
         * **Note:**
         * > You can use [`CoreHelpers`]{@link ICoreHelpers} methods in your content template.
         *
         * You can specify a previously registered template to use either by referring to its HTML `id` attribute or to a
         * CSS selector (see [`TemplateCache`]{@link TemplateCache}).
         *
         * **Example:**
         *
         * * Specifying a previously registered template by referring to its HTML `id` attribute:
         *
         * ```html
         * <div class="CoveoQuickview" data-template-id="myContentTemplateId"></div>
         * ```
         *
         * * Specifying a previously registered template by referring to a CSS selector:
         *
         * ```html
         * <div class='CoveoQuickview' data-template-selector=".myContentTemplateSelector"></div>
         * ```
         *
         * If you do not specify a custom content template, the component uses its default template.
         */
        contentTemplate: TemplateComponentOptions_1.TemplateComponentOptions.buildTemplateOption({
            selectorAttr: 'data-template-selector',
            idAttr: 'data-template-id'
        }),
        /**
         * If [`enableLoadingAnimation`]{@link Quickview.options.enableLoadingAnimation} is `true`, specifies a custom
         * animation to display while the content of the quickview modal window is loading. You can either specify the CSS
         * selector of the HTML element you wish to display, or the `id` of a previously registered template (see
         * [`TemplateCache`]{@link TemplateCache}).
         *
         * **Examples:**
         *
         * * Specifying the CSS selector of the HTML element to display:
         *
         * ```html
         * <div class="CoveoQuickview" data-loading-animation-selector=".my-loading-animation"></div>
         * ```
         *
         * * Specifying the `id` of a previously registered template:
         *
         * ```html
         * <div class="CoveoQuickview" data-loading-animation-template-id="my-loading-animation-template"></div>
         * ```
         *
         * By default, the loading animation is a Coveo animation, which you can customize with CSS (see
         * [Styling the Coveo JavaScript Search Framework](https://docs.coveo.com/en/423/)).
         */
        loadingAnimation: ComponentOptions_1.ComponentOptions.buildOption(IComponentOptions_1.ComponentOptionsType.NONE, function (element) {
            var loadingAnimationSelector = element.getAttribute('data-loading-animation-selector');
            Iif (loadingAnimationSelector != null) {
                var loadingAnimation = Dom_1.$$(document.documentElement).find(loadingAnimationSelector);
                if (loadingAnimation != null) {
                    Dom_1.$$(loadingAnimation).detach();
                    return loadingAnimation;
                }
            }
            var id = element.getAttribute('data-loading-animation-template-id');
            Iif (id != null) {
                var loadingAnimationTemplate = TemplateComponentOptions_1.TemplateComponentOptions.loadResultTemplateFromId(id);
                if (loadingAnimationTemplate) {
                    return loadingAnimationTemplate.instantiateToElement(undefined, {
                        checkCondition: false
                    });
                }
            }
            return DomUtils_1.DomUtils.getBasicLoadingAnimation();
        }),
        /**
         * Specifies the emplacement of the tooltip in relation to the `Quickview` HTML element.
         *
         * **Example:**
         * > Setting this option to `top-start` will make the tooltip appear on top of the `Quickview` button, aligned to the left.
         *
         * @availablesince [January 2019 Release (v2.5395.12)](https://docs.coveo.com/en/2938/)
         */
        tooltipPlacement: ComponentOptions_1.ComponentOptions.buildCustomOption(function (value) { return value; }, {
            defaultValue: 'bottom'
        })
    };
    Quickview.resultCurrentlyBeingRendered = null;
    return Quickview;
}(Component_1.Component));
exports.Quickview = Quickview;
Initialization_1.Initialization.registerAutoCreateComponent(Quickview);
 
 
/***/ }),
/* 391 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
__webpack_require__(1512);
var GlobalExports_1 = __webpack_require__(10);
var AccessibleButton_1 = __webpack_require__(20);
var Dom_1 = __webpack_require__(0);
var SVGDom_1 = __webpack_require__(23);
var SVGIcons_1 = __webpack_require__(16);
var Utils_1 = __webpack_require__(5);
var Component_1 = __webpack_require__(6);
var ComponentOptions_1 = __webpack_require__(13);
var Initialization_1 = __webpack_require__(8);
var RatingValues;
(function (RatingValues) {
    RatingValues[RatingValues["Undefined"] = 0] = "Undefined";
    RatingValues[RatingValues["Lowest"] = 1] = "Lowest";
    RatingValues[RatingValues["Low"] = 2] = "Low";
    RatingValues[RatingValues["Average"] = 3] = "Average";
    RatingValues[RatingValues["Good"] = 4] = "Good";
    RatingValues[RatingValues["Best"] = 5] = "Best";
})(RatingValues = exports.RatingValues || (exports.RatingValues = {}));
/**
 * **Note:**
 *
 * > The Coveo Cloud V2 platform does not support collaborative rating. Therefore, this component is obsolete in Coveo Cloud V2.
 *
 * The `ResultRating` component renders a 5-star rating widget. Interactive rating is possible if
 * the [`enableCollaborativeRating`]{@link SearchInterface.options.enableCollaborativeRating} option of your
 * search interface is `true`, and if collaborative rating is enabled on your Coveo index.
 *
 * This component is a result template component (see [Result Templates](https://docs.coveo.com/en/413/)).
 *
 * @notSupportedIn salesforcefree
 */
var ResultRating = /** @class */ (function (_super) {
    __extends(ResultRating, _super);
    /**
     * Creates a new `ResultRating` component.
     * @param element The HTMLElement on which to instantiate the component.
     * @param options The options for the `ResultRating` component.
     * @param bindings The bindings that the component requires to function normally. If not set, these will be
     * automatically resolved (with a slower execution time).
     * @param result The result to associate the component with.
     */
    function ResultRating(element, options, bindings, result) {
        var _this = _super.call(this, element, ResultRating.ID, bindings) || this;
        _this.element = element;
        _this.options = options;
        _this.bindings = bindings;
        _this.result = result;
        _this.options = ComponentOptions_1.ComponentOptions.initComponentOptions(element, ResultRating, options);
        if (!Utils_1.Utils.isNullOrUndefined(result.rating)) {
            _this.renderComponent(element, result.rating);
        }
        return _this;
    }
    ResultRating.prototype.renderComponent = function (element, rating) {
        for (var starNumber = 1; starNumber <= 5; starNumber++) {
            this.renderStar(element, starNumber <= rating, starNumber);
        }
    };
    ResultRating.prototype.renderStar = function (element, isChecked, value) {
        var _this = this;
        var star;
        var starElement = Dom_1.$$(element).find('a[rating-value="' + value + '"]');
        if (starElement == null) {
            star = Dom_1.$$('a', { className: 'coveo-result-rating-star' }, SVGIcons_1.SVGIcons.icons.star);
            SVGDom_1.SVGDom.addClassToSVGInContainer(star.el, 'coveo-result-rating-star-svg');
            element.appendChild(star.el);
            if (this.bindings.searchInterface.options.enableCollaborativeRating) {
                new AccessibleButton_1.AccessibleButton()
                    .withElement(star)
                    .withSelectAction(function (e) {
                    var targetElement = e.currentTarget;
                    _this.rateDocument(parseInt(targetElement.getAttribute('rating-value')));
                })
                    .withLabel(value.toString())
                    .build();
                star.on('mouseover', function (e) {
                    var targetElement = e.currentTarget;
                    _this.renderComponent(element, parseInt(targetElement.getAttribute('rating-value')));
                });
                star.on('mouseout', function () {
                    _this.renderComponent(element, _this.result.rating);
                });
            }
            star.el.setAttribute('rating-value', value.toString());
        }
        else {
            star = Dom_1.$$(starElement);
        }
        star.toggleClass('coveo-result-rating-star-active', isChecked);
    };
    /**
     * Rates an item using the the specified `rating` value.
     * @param rating The rating to assign to the item.
     *
     * The possible values are:
     *
     * - `0`: renders no star.
     * - `1`: renders 1 star.
     * - `2`: renders 2 stars.
     * - `3`: renders 3 stars.
     * - `4`: renders 4 stars.
     * - `5`: renders 5 stars.
     */
    ResultRating.prototype.rateDocument = function (rating) {
        var _this = this;
        var request = {
            rating: RatingValues[rating],
            uniqueId: this.result.uniqueId
        };
        this.queryController
            .getEndpoint()
            .rateDocument(request)
            .then(function () {
            _this.result.rating = rating;
            _this.renderComponent(_this.element, rating);
        })
            .catch(function () {
            _this.logger.error('An error occurred while rating the item');
        });
    };
    ResultRating.ID = 'ResultRating';
    ResultRating.doExport = function () {
        GlobalExports_1.exportGlobally({
            ResultRating: ResultRating
        });
    };
    return ResultRating;
}(Component_1.Component));
exports.ResultRating = ResultRating;
Initialization_1.Initialization.registerAutoCreateComponent(ResultRating);
 
 
/***/ }),
/* 392 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Dom_1 = __webpack_require__(0);
var _ = __webpack_require__(1);
var Strings_1 = __webpack_require__(4);
__webpack_require__(1515);
var Utils_1 = __webpack_require__(5);
var GlobalExports_1 = __webpack_require__(10);
/**
 * A multi select widget with standard styling.
 */
var MultiSelect = /** @class */ (function () {
    /**
     * Creates a new `MultiSelect`.
     * @param onChange The function to call when the widget selected values change. This function takes the current
     * `MultiSelect` instance as an argument.
     * @param options The values which can be selected with the multi select.
     * @param label The label to display for the multi select.
     */
    function MultiSelect(onChange, options, label) {
        Iif (onChange === void 0) { onChange = function (multiSelect) { }; }
        this.onChange = onChange;
        this.options = options;
        this.label = label;
        this.buildContent();
    }
    MultiSelect.doExport = function () {
        GlobalExports_1.exportGlobally({
            MultiSelect: MultiSelect
        });
    };
    /**
     * Gets the element on which the multi select is bound.
     * @returns {HTMLSelectElement} The multi select element.
     */
    MultiSelect.prototype.build = function () {
        return this.element;
    };
    /**
     * Gets the element on which the multi select is bound.
     * @returns {HTMLSelectElement} The multi select element.
     */
    MultiSelect.prototype.getElement = function () {
        return this.element;
    };
    /**
     * Gets the currently selected values.
     * @returns {string[]} The array of selected multi select values.
     */
    MultiSelect.prototype.getValue = function () {
        return _.chain(this.element.options)
            .toArray()
            .filter(function (opt) { return opt.selected; })
            .map(function (selected) { return selected.value; })
            .value();
    };
    /**
     * Gets the currently un-selected values.
     * @returns {string[]} The array of un-selected multi select values.
     */
    MultiSelect.prototype.getUnselectedValues = function () {
        return _.chain(this.element.options)
            .toArray()
            .filter(function (opt) { return !opt.selected; })
            .map(function (selected) { return selected.value; })
            .value();
    };
    /**
     * Sets the currently selected values.
     * @param values The values to select.
     */
    MultiSelect.prototype.setValue = function (values) {
        var currentlySelected = this.getValue();
        var currentStateSplit = _.partition(_.toArray(this.element.options), function (opt) {
            return _.contains(currentlySelected, opt.value);
        });
        var newStateToApplySplit = _.partition(_.toArray(this.element.options), function (opt) { return _.contains(values, opt.value); });
        _.each(newStateToApplySplit[0], function (toSelect) { return (toSelect.selected = true); });
        _.each(newStateToApplySplit[1], function (toUnSelect) { return (toUnSelect.selected = false); });
        var hasChanged = false;
        if (!Utils_1.Utils.arrayEqual(currentStateSplit[0], newStateToApplySplit[0], false)) {
            hasChanged = true;
        }
        if (!Utils_1.Utils.arrayEqual(currentStateSplit[1], newStateToApplySplit[1], false)) {
            hasChanged = true;
        }
        if (hasChanged) {
            Dom_1.$$(this.element).trigger('change');
        }
    };
    /**
     * Resets the multi select.
     */
    MultiSelect.prototype.reset = function () {
        var currentlySelected = this.getValue();
        this.element.selectedIndex = -1;
        if (!Utils_1.Utils.isEmptyArray(currentlySelected)) {
            Dom_1.$$(this.element).trigger('change');
        }
    };
    MultiSelect.prototype.buildContent = function () {
        var _this = this;
        this.element = Dom_1.$$('select', {
            className: 'coveo-multi-select',
            multiple: '',
            size: this.options.length.toString()
        }).el;
        var optgroup = Dom_1.$$('optgroup', {
            className: 'coveo-list-group',
            label: this.label
        });
        var options = _.map(this.options, function (opt) {
            return Dom_1.$$('option', { value: opt, className: 'coveo-list-item' }, Strings_1.l(opt));
        });
        _.each(options, function (opt) { return optgroup.append(opt.el); });
        this.element.appendChild(optgroup.el);
        Dom_1.$$(this.element).on('change', function () { return _this.onChange(_this); });
    };
    return MultiSelect;
}());
exports.MultiSelect = MultiSelect;
 
 
/***/ }),
/* 393 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __assign = (this && this.__assign) || Object.assign || function(t) {
    for (var s, i = 1, n = arguments.length; i < n; i++) {
        s = arguments[i];
        for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
            t[p] = s[p];
    }
    return t;
};
Object.defineProperty(exports, "__esModule", { value: true });
__webpack_require__(1519);
var GlobalExports_1 = __webpack_require__(10);
var Dom_1 = __webpack_require__(0);
var SVGDom_1 = __webpack_require__(23);
var SVGIcons_1 = __webpack_require__(16);
var SearchBoxResize_1 = __webpack_require__(1520);
var Component_1 = __webpack_require__(6);
var ComponentOptions_1 = __webpack_require__(13);
var Initialization_1 = __webpack_require__(8);
var Omnibox_1 = __webpack_require__(196);
var Querybox_1 = __webpack_require__(125);
var SearchButton_1 = __webpack_require__(394);
var underscore_1 = __webpack_require__(1);
/**
 * The `Searchbox` component allows you to conveniently instantiate two components which end users frequently use to
 * enter and submit queries.
 *
 * This component attaches itself to a `div` element and takes care of instantiating either a
 * [`Querybox`]{@link Querybox} or an [`Omnibox`]{@link Omnibox} component (see the
 * [`enableOmnibox`]{@link Searchbox.options.enableOmnibox} option). Optionally, the `Searchbox` can also instantiate a
 * [`SearchButton`]{@link SearchButton} component, and append it inside the same `div` (see the
 * [`addSearchButton`]{@link Searchbox.options.addSearchButton} option).
 */
var Searchbox = /** @class */ (function (_super) {
    __extends(Searchbox, _super);
    /**
     * Creates a new `Searchbox` component. Creates a new `Coveo.Magicbox` instance and wraps magic box methods (`onblur`,
     * `onsubmit`, etc.). Binds event on `buildingQuery` and on redirection (for standalone box).
     * @param element The HTMLElement on which to instantiate the component. This cannot be an HTMLInputElement for
     * technical reasons.
     * @param options The options for the `Searchbox component`. These will merge with the options from the component set
     * directly on the `HTMLElement`.
     * @param bindings The bindings that the component requires to function normally. If not set, these will be
     * automatically resolved (with a slower execution time).
     */
    function Searchbox(element, options, bindings) {
        var _this = _super.call(this, element, Searchbox.ID, bindings) || this;
        _this.element = element;
        _this.options = options;
        _this.bindings = bindings;
        _this.options = ComponentOptions_1.ComponentOptions.initComponentOptions(element, Searchbox, options);
        Iif (_this.options.inline) {
            Dom_1.$$(element).addClass('coveo-inline');
        }
        _this.initSearchBox();
        _this.initSearchButton();
        _this.applyMagicBoxIcon();
        _this.applyCustomHeight();
        return _this;
    }
    Searchbox.prototype.initSearchBox = function () {
        var div = document.createElement('div');
        this.element.appendChild(div);
        if (this.options.enableOmnibox) {
            this.searchbox = new Omnibox_1.Omnibox(div, this.options, this.bindings);
        }
        else {
            this.searchbox = new Querybox_1.Querybox(div, this.options, this.bindings);
        }
    };
    Searchbox.prototype.initSearchButton = function () {
        if (!this.options.addSearchButton) {
            return;
        }
        var anchor = Dom_1.$$('a');
        this.element.appendChild(anchor.el);
        this.searchButton = new SearchButton_1.SearchButton(anchor.el, { searchbox: this.searchbox }, this.bindings);
    };
    Searchbox.prototype.applyMagicBoxIcon = function () {
        var magicBoxIcon = Dom_1.$$(this.element).find('.magic-box-icon');
        magicBoxIcon.innerHTML = SVGIcons_1.SVGIcons.icons.mainClear;
        SVGDom_1.SVGDom.addClassToSVGInContainer(magicBoxIcon, 'magic-box-clear-svg');
    };
    Searchbox.prototype.applyCustomHeight = function () {
        if (!this.options.height) {
            return;
        }
        Dom_1.$$(this.element).addClass('coveo-custom-height');
        SearchBoxResize_1.SearchBoxResize.resize(this.element, this.options.height);
    };
    Searchbox.ID = 'Searchbox';
    Searchbox.parent = Omnibox_1.Omnibox;
    Searchbox.doExport = function () {
        GlobalExports_1.exportGlobally({
            Searchbox: Searchbox,
            SearchButton: SearchButton_1.SearchButton,
            Omnibox: Omnibox_1.Omnibox,
            Querybox: Querybox_1.Querybox
        });
    };
    /**
     * Possible options for the {@link Searchbox}
     * @componentOptions
     */
    Searchbox.options = {
        /**
         * Specifies whether to instantiate a [`SearchButton`]{@link SearchButton} component.
         *
         * Default value is `true`.
         */
        addSearchButton: ComponentOptions_1.ComponentOptions.buildBooleanOption({ defaultValue: true }),
        /**
         * A custom height for the search box (in pixels).
         *
         * Note: Avoid setting this option if you want to modify the search box styling through custom CSS.
         *
         * Minimum value is `25`
         *
         * Default behavior: The most specific CSS rules targeting HTML elements generated by the Searchbox component are used
         * (e.g., if you are only using the default CoveoFullSearch.css stylesheet with no further styling customizations,
         * the search box height will be set to 50 pixels by default).
         *
         * @availablesince [July 2019 Release (v2.6459)](https://docs.coveo.com/en/2938/)
         */
        height: ComponentOptions_1.ComponentOptions.buildNumberOption({ min: 25 }),
        /**
         * Specifies whether to instantiate an [`Omnibox`]{@link Omnibox} component.
         *
         * When this option is `false`, the `Searchbox` instantiates a [`Querybox`]{@link Querybox} component instead.
         *
         * **Note:**
         * > You can use configuration options specific to the component you choose to instantiate with the `Searchbox`.
         *
         * **Examples:**
         *
         * In this first case, the `Searchbox` instantiates a `Querybox` component. You can configure this `Querybox`
         * instance using any of the `Querybox` component options, such as
         * [`triggerQueryOnClear`]{@link Querybox.options.triggerQueryOnClear}.
         * ```html
         * <div class='CoveoSearchbox' data-trigger-query-on-clear='true'></div>
         * ```
         *
         * In this second case, the `Searchbox` instantiates an `Omnibox` component. You can configure this `Omnibox`
         * instance using any of the `Omnibox` component options, such as
         * [`placeholder`]{@link Omnibox.options.placeholder}.
         * Moreover, since the `Omnibox` component inherits all of the `Querybox` component options, the
         * `data-trigger-query-on-clear` option from the previous example would also work on this `Omnibox` instance.
         * ```html
         * <div class='CoveoSearchbox' data-enable-omnibox='true' data-placeholder='Please enter a query'></div>
         * ```
         *
         * Default value is `true`.
         */
        enableOmnibox: ComponentOptions_1.ComponentOptions.buildBooleanOption({ defaultValue: true })
    };
    return Searchbox;
}(Component_1.Component));
exports.Searchbox = Searchbox;
Searchbox.options = __assign({}, Searchbox.options, Omnibox_1.Omnibox.options, Querybox_1.Querybox.options);
// Only parse omnibox option if omnibox is enabled
underscore_1.each(Searchbox.options, function (value, key) {
    if (key in Omnibox_1.Omnibox.options && !(key in Querybox_1.Querybox.options)) {
        Searchbox.options[key] = underscore_1.extend({ depend: 'enableOmnibox' }, value);
    }
});
Initialization_1.Initialization.registerAutoCreateComponent(Searchbox);
 
 
/***/ }),
/* 394 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
var GlobalExports_1 = __webpack_require__(10);
var Strings_1 = __webpack_require__(4);
var AccessibleButton_1 = __webpack_require__(20);
var Dom_1 = __webpack_require__(0);
var SVGDom_1 = __webpack_require__(23);
var SVGIcons_1 = __webpack_require__(16);
var Utils_1 = __webpack_require__(5);
var AnalyticsActionListMeta_1 = __webpack_require__(7);
var Component_1 = __webpack_require__(6);
var Initialization_1 = __webpack_require__(8);
var QueryStateModel_1 = __webpack_require__(17);
/**
 * The SearchButton component renders a search icon that the end user can click to trigger a new query.
 *
 * See also the {@link Searchbox} component, which can automatically instantiate a SearchButton component along with a
 * {@link Querybox} component or an {@link Omnibox} component.
 */
var SearchButton = /** @class */ (function (_super) {
    __extends(SearchButton, _super);
    /**
     * Creates a new SearchButton. Binds a `click` event on the element. Adds a search icon on the element.
     * @param element The HTMLElement on which to instantiate the component.
     * @param options The options for the SearchButton component.
     * @param bindings The bindings that the component requires to function normally. If not set, these will be
     * automatically resolved (with a slower execution time).
     */
    function SearchButton(element, options, bindings) {
        var _this = _super.call(this, element, SearchButton.ID, bindings) || this;
        _this.element = element;
        _this.options = options;
        new AccessibleButton_1.AccessibleButton()
            .withElement(element)
            .withOwner(_this.bind)
            .withLabel(Strings_1.l('Search'))
            .withSelectAction(function () { return _this.handleClick(); })
            .build();
        // Provide a magnifier icon if element contains nothing
        Eif (Utils_1.Utils.trim(Dom_1.$$(_this.element).text()) == '') {
            var svgMagnifierContainer = Dom_1.$$('span', { className: 'coveo-search-button' }, SVGIcons_1.SVGIcons.icons.search).el;
            SVGDom_1.SVGDom.addClassToSVGInContainer(svgMagnifierContainer, 'coveo-search-button-svg');
            var svgLoadingAnimationContainer = Dom_1.$$('span', { className: 'coveo-search-button-loading' }, SVGIcons_1.SVGIcons.icons.loading).el;
            SVGDom_1.SVGDom.addClassToSVGInContainer(svgLoadingAnimationContainer, 'coveo-search-button-loading-svg');
            element.appendChild(svgMagnifierContainer);
            element.appendChild(svgLoadingAnimationContainer);
        }
        return _this;
    }
    /**
     * Triggers the `click` event handler, which logs a `searchboxSubmit` event in the usage analytics and executes a
     * query.
     */
    SearchButton.prototype.click = function () {
        this.handleClick();
    };
    SearchButton.prototype.handleClick = function () {
        this.logger.debug('Performing query following button click');
        this.updateQueryStateModelWithSearchboxQuery();
        this.usageAnalytics.logSearchEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.searchboxSubmit, {});
        this.queryController.executeQuery({ origin: this, logInActionsHistory: true });
    };
    SearchButton.prototype.updateQueryStateModelWithSearchboxQuery = function () {
        var searchbox = this.options && this.options.searchbox;
        searchbox && this.queryStateModel.set(QueryStateModel_1.QueryStateModel.attributesEnum.q, searchbox.getText());
    };
    SearchButton.ID = 'SearchButton';
    SearchButton.doExport = function () {
        GlobalExports_1.exportGlobally({
            SearchButton: SearchButton
        });
    };
    SearchButton.options = {};
    return SearchButton;
}(Component_1.Component));
exports.SearchButton = SearchButton;
Initialization_1.Initialization.registerAutoCreateComponent(SearchButton);
 
 
/***/ }),
/* 395 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
var popper_js_1 = __webpack_require__(181);
__webpack_require__(1521);
var underscore_1 = __webpack_require__(1);
var InitializationEvents_1 = __webpack_require__(22);
var SettingsEvents_1 = __webpack_require__(66);
var GlobalExports_1 = __webpack_require__(10);
var Strings_1 = __webpack_require__(4);
var AccessibleButton_1 = __webpack_require__(20);
var Dom_1 = __webpack_require__(0);
var SVGDom_1 = __webpack_require__(23);
var Component_1 = __webpack_require__(6);
var ComponentOptions_1 = __webpack_require__(13);
var Initialization_1 = __webpack_require__(8);
/**
 * The Settings component renders a **Settings** button that the end user can click to access a popup menu from which
 * it is possible to perform several contextual actions. The usual location of the **Settings** button in the page is to
 * the right of the {@link Searchbox}.
 *
 * This component can reference several components to populate its popup menu:
 * - {@link AdvancedSearch}
 * - {@link ExportToExcel}
 * - {@link PreferencesPanel} (see also {@link ResultsFiltersPreferences} and {@link ResultsPreferences})
 * - {@link SearchAlerts} (see also {@link SearchAlertsMessage})
 * - {@link ShareQuery}
 */
var Settings = /** @class */ (function (_super) {
    __extends(Settings, _super);
    /**
     * Creates a new Settings component.
     * @param element The HTMLElement on which to instantiate the component.
     * @param options The options for the Settings component.
     * @param bindings The bindings that the component requires to function normally. If not set, these will be
     * automatically resolved (with a slower execution time).
     */
    function Settings(element, options, bindings) {
        var _this = _super.call(this, element, Settings.ID, bindings) || this;
        _this.element = element;
        _this.options = options;
        _this.isOpened = false;
        _this.options = ComponentOptions_1.ComponentOptions.initComponentOptions(element, Settings, options);
        _this.bind.onRootElement(InitializationEvents_1.InitializationEvents.afterInitialization, function () { return _this.init(); });
        return _this;
    }
    /**
     * Opens the **Settings** popup menu.
     */
    Settings.prototype.open = function () {
        this.isOpened = true;
        if (this.menu != null) {
            Dom_1.$$(this.menu).detach();
        }
        this.menu = this.buildMenu();
        Dom_1.$$(this.menu).insertAfter(this.element);
        new popper_js_1.default(this.element, this.menu, {
            placement: 'bottom-end',
            modifiers: {
                offset: {
                    offset: '0, 5'
                },
                preventOverflow: {
                    boundariesElement: this.root
                }
            }
        });
    };
    /**
     * Closes the **Settings** popup menu.
     */
    Settings.prototype.close = function () {
        this.isOpened = false;
        if (this.menu != null) {
            Dom_1.$$(this.menu).detach();
            this.menu = null;
        }
    };
    Settings.prototype.toggle = function () {
        if (this.isOpened) {
            this.close();
        }
        else {
            this.open();
        }
    };
    Settings.prototype.init = function () {
        var _this = this;
        var square = Dom_1.$$('span', { className: 'coveo-settings-square' }).el;
        var squares = Dom_1.$$('span', { className: 'coveo-settings-squares' }).el;
        underscore_1.times(3, function () { return squares.appendChild(square.cloneNode()); });
        this.element.appendChild(squares);
        new AccessibleButton_1.AccessibleButton()
            .withElement(this.element)
            .withOwner(this.bind)
            .withSelectAction(function () { return _this.toggle(); })
            .withFocusAndMouseEnterAction(function () { return _this.onfocus(); })
            .withBlurAndMouseLeaveAction(function () { return _this.onblur(); })
            .withLabel(Strings_1.l('Settings'))
            .build();
    };
    Settings.prototype.buildMenu = function () {
        var _this = this;
        var menu = Dom_1.$$('div', { className: 'coveo-settings-advanced-menu' }).el;
        var settingsPopulateMenuArgs = {
            settings: this,
            menuData: []
        };
        Dom_1.$$(this.root).trigger(SettingsEvents_1.SettingsEvents.settingsPopulateMenu, settingsPopulateMenuArgs);
        underscore_1.each(settingsPopulateMenuArgs.menuData, function (menuItem) {
            var _a = _this.buildMenuItem(menuItem, settingsPopulateMenuArgs), menuItemElement = _a.menuItemElement, menuItemIcon = _a.menuItemIcon, menuItemText = _a.menuItemText;
            menuItemElement.appendChild(menuItemIcon);
            menuItemElement.appendChild(menuItemText);
            menu.appendChild(menuItemElement);
        });
        return menu;
    };
    Settings.prototype.buildMenuItem = function (menuItem, settingsPopulateMenuArgs) {
        var _this = this;
        var menuItemElement = Dom_1.$$('div', {
            className: "coveo-settings-item " + menuItem.className
        }).el;
        var selectAction = function () {
            underscore_1.each(settingsPopulateMenuArgs.menuData, function (menuItem) {
                menuItem.onClose && menuItem.onClose();
            });
            _this.close();
            menuItem.onOpen();
        };
        new AccessibleButton_1.AccessibleButton()
            .withElement(menuItemElement)
            .withSelectAction(selectAction)
            .withFocusAndMouseEnterAction(function () { return _this.onfocus(); })
            .withBlurAndMouseLeaveAction(function () { return _this.onblur(); })
            .withLabel(menuItem.tooltip || menuItem.text)
            .build();
        return {
            menuItemElement: menuItemElement,
            menuItemIcon: this.buildMenuItemIcon(menuItem),
            menuItemText: this.buildMenuItemText(menuItem)
        };
    };
    Settings.prototype.buildMenuItemIcon = function (menuItem) {
        var iconElement = Dom_1.$$('div', {
            className: 'coveo-icon'
        }).el;
        if (menuItem.svgIcon) {
            iconElement.innerHTML = menuItem.svgIcon;
        }
        if (menuItem.svgIconClassName) {
            SVGDom_1.SVGDom.addClassToSVGInContainer(iconElement, menuItem.svgIconClassName);
        }
        return iconElement;
    };
    Settings.prototype.buildMenuItemText = function (menuItem) {
        var textElement = Dom_1.$$('div', {
            className: 'coveo-settings-text'
        }, underscore_1.escape(menuItem.text)).el;
        return textElement;
    };
    Settings.prototype.onblur = function () {
        var _this = this;
        clearTimeout(this.closeTimeout);
        this.closeTimeout = window.setTimeout(function () {
            _this.close();
        }, this.options.menuDelay);
    };
    Settings.prototype.onfocus = function () {
        clearTimeout(this.closeTimeout);
    };
    Settings.ID = 'Settings';
    Settings.doExport = function () {
        GlobalExports_1.exportGlobally({
            Settings: Settings
        });
    };
    /**
     * The options for Settings
     * @componentOptions
     */
    Settings.options = {
        /**
         * Specifies the delay (in milliseconds) before hiding the popup menu when the cursor is not hovering over it.
         *
         * Default value is `300`. Minimum value is `0 `.
         */
        menuDelay: ComponentOptions_1.ComponentOptions.buildNumberOption({ defaultValue: 300, min: 0 })
    };
    return Settings;
}(Component_1.Component));
exports.Settings = Settings;
Initialization_1.Initialization.registerAutoCreateComponent(Settings);
 
 
/***/ }),
/* 396 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
__webpack_require__(1526);
var underscore_1 = __webpack_require__(1);
var InitializationEvents_1 = __webpack_require__(22);
var Logger_1 = __webpack_require__(18);
var Strings_1 = __webpack_require__(4);
var Dom_1 = __webpack_require__(0);
var EventsUtils_1 = __webpack_require__(322);
var SVGDom_1 = __webpack_require__(23);
var SVGIcons_1 = __webpack_require__(16);
var Utils_1 = __webpack_require__(5);
var Component_1 = __webpack_require__(6);
var SearchInterface_1 = __webpack_require__(25);
var Tab_1 = __webpack_require__(201);
var ResponsiveComponents_1 = __webpack_require__(54);
var ResponsiveComponentsManager_1 = __webpack_require__(70);
var ResponsiveComponentsUtils_1 = __webpack_require__(93);
var AccessibleButton_1 = __webpack_require__(20);
var popper_js_1 = __webpack_require__(181);
var KeyboardUtils_1 = __webpack_require__(35);
var ResponsiveTabs = /** @class */ (function () {
    function ResponsiveTabs(coveoRoot, ID) {
        this.coveoRoot = coveoRoot;
        this.ID = ID;
        this.ignoreNextDocumentClick = false;
        this.dropdownHeaderLabel = this.getDropdownHeaderLabel();
        this.searchInterface = Component_1.Component.get(this.coveoRoot.el, SearchInterface_1.SearchInterface, false);
        this.dropdownContent = this.buildDropdownContent();
        this.dropdownHeader = this.buildDropdownHeader();
        this.bindDropdownContentEvents();
        this.bindDropdownHeaderEvents();
        this.tabSection = Dom_1.$$(this.coveoRoot.find('.coveo-tab-section'));
        this.manageTabSwapping();
        this.bindNukeEvents();
        this.initialTabOrder = this.tabsInTabSection.slice();
    }
    ResponsiveTabs.init = function (root, component, options) {
        this.logger = new Logger_1.Logger('ResponsiveTabs');
        Eif (!Dom_1.$$(root).find('.coveo-tab-section')) {
            this.logger.info('No element with class coveo-tab-section. Responsive tabs cannot be enabled.');
            return;
        }
        ResponsiveComponentsManager_1.ResponsiveComponentsManager.register(ResponsiveTabs, Dom_1.$$(root), Tab_1.Tab.ID, component, options);
    };
    ResponsiveTabs.prototype.handleResizeEvent = function () {
        if (this.needSmallMode() && !ResponsiveComponentsUtils_1.ResponsiveComponentsUtils.isSmallTabsActivated(this.coveoRoot)) {
            this.changeToSmallMode();
        }
        else if (!this.needSmallMode() && ResponsiveComponentsUtils_1.ResponsiveComponentsUtils.isSmallTabsActivated(this.coveoRoot)) {
            this.changeToLargeMode();
        }
        if (this.shouldAddTabsToDropdown()) {
            this.addTabsToDropdown();
        }
        else if (this.shouldRemoveTabsFromDropdown()) {
            this.removeTabsFromDropdown();
        }
        Iif (this.isDropdownOpen()) {
            this.positionPopup();
        }
    };
    ResponsiveTabs.prototype.needSmallMode = function () {
        // Ignore everything if the responsiveMode is not auto.
        if (!this.searchInterface) {
            return this.shouldAutoModeResolveToSmall();
        }
        switch (this.searchInterface.responsiveComponents.getResponsiveMode()) {
            case 'small':
            case 'medium':
                return true;
            case 'auto':
            default:
                return this.shouldAutoModeResolveToSmall();
        }
    };
    ResponsiveTabs.prototype.shouldAutoModeResolveToSmall = function () {
        var mediumWidth = this.searchInterface
            ? this.searchInterface.responsiveComponents.getMediumScreenWidth()
            : new ResponsiveComponents_1.ResponsiveComponents().getMediumScreenWidth();
        if (this.coveoRoot.width() <= mediumWidth) {
            return true;
        }
        else Iif (!ResponsiveComponentsUtils_1.ResponsiveComponentsUtils.isSmallTabsActivated(this.coveoRoot)) {
            return this.isOverflowing(this.tabSection.el);
        }
        else {
            return this.isLargeFormatOverflowing();
        }
    };
    ResponsiveTabs.prototype.changeToSmallMode = function () {
        ResponsiveComponentsUtils_1.ResponsiveComponentsUtils.activateSmallTabs(this.coveoRoot);
    };
    ResponsiveTabs.prototype.changeToLargeMode = function () {
        this.emptyDropdown();
        this.cleanUpDropdown();
        ResponsiveComponentsUtils_1.ResponsiveComponentsUtils.deactivateSmallTabs(this.coveoRoot);
    };
    ResponsiveTabs.prototype.shouldAddTabsToDropdown = function () {
        return ((this.isOverflowing(this.tabSection.el) || this.tabSection.el.clientWidth === 0) &&
            ResponsiveComponentsUtils_1.ResponsiveComponentsUtils.isSmallTabsActivated(this.coveoRoot));
    };
    ResponsiveTabs.prototype.addTabsToDropdown = function () {
        var currentTab;
        Eif (!this.tabSection.find("." + ResponsiveTabs.TAB_IN_DROPDOWN_HEADER_CSS_CLASS)) {
            var facetDropdownHeader = this.tabSection.find('.coveo-facet-dropdown-header');
            Iif (facetDropdownHeader) {
                this.dropdownHeader.insertBefore(facetDropdownHeader);
            }
            else {
                this.tabSection.el.appendChild(this.dropdownHeader.el);
            }
        }
        for (var i = this.initialTabOrder.length - 1; i >= 0; i--) {
            currentTab = this.initialTabOrder[i];
            if (this.tabIsSelected(currentTab) && i > 0) {
                currentTab = this.initialTabOrder[--i];
            }
            this.addToDropdownIfNeeded(currentTab);
            Eif (!this.isOverflowing(this.tabSection.el)) {
                break;
            }
        }
    };
    ResponsiveTabs.prototype.shouldRemoveTabsFromDropdown = function () {
        return (!this.isOverflowing(this.tabSection.el) &&
            this.tabSection.el.clientWidth !== 0 &&
            ResponsiveComponentsUtils_1.ResponsiveComponentsUtils.isSmallTabsActivated(this.coveoRoot) &&
            !this.isDropdownEmpty());
    };
    ResponsiveTabs.prototype.removeTabsFromDropdown = function () {
        var _this = this;
        var dropdownTabs = this.tabsInTabDropdown;
        var current;
        while (!this.isOverflowing(this.tabSection.el) && !this.isDropdownEmpty()) {
            current = dropdownTabs.shift();
            this.removeFromDropdownIfNeeded(current);
            this.fromDropdownToTabSection(Dom_1.$$(current));
        }
        Iif (this.isOverflowing(this.tabSection.el)) {
            var unselectedTabs = underscore_1.filter(this.tabsInTabSection, function (tab) { return !_this.tabIsSelected(tab); });
            this.addToDropdownIfNeeded(unselectedTabs.pop());
        }
        Eif (this.isDropdownEmpty()) {
            this.cleanUpDropdown();
        }
    };
    ResponsiveTabs.prototype.emptyDropdown = function () {
        var _this = this;
        Iif (!this.isDropdownEmpty()) {
            var dropdownTabs = this.tabsInTabDropdown;
            while (!this.isDropdownEmpty()) {
                var current = dropdownTabs.shift();
                this.removeFromDropdownIfNeeded(current);
            }
            this.initialTabOrder.forEach(function (tab) { return _this.tabSection.append(tab); });
        }
    };
    ResponsiveTabs.prototype.isLargeFormatOverflowing = function () {
        var virtualTabSection = Dom_1.$$(this.tabSection.el.cloneNode(true));
        var dropdownHeader = virtualTabSection.find("." + ResponsiveTabs.TAB_IN_DROPDOWN_HEADER_CSS_CLASS);
        Iif (dropdownHeader) {
            virtualTabSection.el.removeChild(dropdownHeader);
        }
        virtualTabSection.el.style.position = 'absolute';
        virtualTabSection.el.style.visibility = 'hidden';
        Iif (!this.isDropdownEmpty()) {
            underscore_1.each(this.dropdownContent.findAll('.CoveoTab'), function (tab) {
                virtualTabSection.el.appendChild(tab.cloneNode(true));
            });
        }
        virtualTabSection.insertBefore(this.tabSection.el);
        ResponsiveComponentsUtils_1.ResponsiveComponentsUtils.deactivateSmallTabs(this.coveoRoot);
        var isOverflowing = this.isOverflowing(this.tabSection.el) || this.isOverflowing(virtualTabSection.el);
        ResponsiveComponentsUtils_1.ResponsiveComponentsUtils.activateSmallTabs(this.coveoRoot);
        virtualTabSection.detach();
        return isOverflowing;
    };
    ResponsiveTabs.prototype.isOverflowing = function (el) {
        return el.clientWidth < el.scrollWidth;
    };
    ResponsiveTabs.prototype.buildDropdownHeader = function () {
        var dropdownHeader = Dom_1.$$('a', { className: "coveo-dropdown-header " + ResponsiveTabs.TAB_IN_DROPDOWN_HEADER_CSS_CLASS });
        var content = Dom_1.$$('p');
        content.text(this.dropdownHeaderLabel);
        var icon = Dom_1.$$('span', { className: 'coveo-more-tabs' }, SVGIcons_1.SVGIcons.icons.arrowDown);
        SVGDom_1.SVGDom.addClassToSVGInContainer(icon.el, 'coveo-more-tabs-svg');
        content.el.appendChild(icon.el);
        dropdownHeader.el.appendChild(content.el);
        return dropdownHeader;
    };
    ResponsiveTabs.prototype.bindDropdownHeaderEvents = function () {
        var _this = this;
        var toggle = function (event) {
            if (_this.isDropdownOpen()) {
                _this.closeDropdown();
            }
            else {
                _this.openDropdown();
            }
            if (event.type === 'click') {
                _this.ignoreNextDocumentClick = true;
            }
        };
        new AccessibleButton_1.AccessibleButton()
            .withElement(this.dropdownHeader)
            .withSelectAction(toggle)
            .withLabel(this.getDropdownHeaderLabel())
            .build();
    };
    ResponsiveTabs.prototype.buildDropdownContent = function () {
        var dropdownContent = Dom_1.$$('div', {
            className: 'coveo-tab-list-container ' + SearchInterface_1.SearchInterface.SMALL_INTERFACE_CLASS_NAME
        });
        var contentList = Dom_1.$$('ol', { className: 'coveo-tab-list' });
        dropdownContent.el.appendChild(contentList.el);
        return dropdownContent;
    };
    ResponsiveTabs.prototype.bindDropdownContentEvents = function () {
        var _this = this;
        this.dropdownClickListener = function () {
            if (_this.isDropdownOpen()) {
                _this.ignoreNextDocumentClick = true;
            }
        };
        this.documentClickListener = function (event) {
            if (!_this.ignoreNextDocumentClick) {
                _this.closeDropdown();
            }
            _this.ignoreNextDocumentClick = false;
        };
        Dom_1.$$(this.dropdownHeader).on('click', this.dropdownClickListener);
        Dom_1.$$(this.dropdownContent).on('click', this.dropdownClickListener);
    };
    ResponsiveTabs.prototype.isDropdownOpen = function () {
        return this.dropdownHeader.hasClass(ResponsiveTabs.ACTIVE_DROPDOWN_CSS_CLASS);
    };
    ResponsiveTabs.prototype.closeDropdown = function () {
        Dom_1.$$(document.documentElement).off('click', this.documentClickListener);
        this.dropdownContent.detach();
        this.dropdownHeader.removeClass(ResponsiveTabs.ACTIVE_DROPDOWN_CSS_CLASS);
    };
    ResponsiveTabs.prototype.openDropdown = function () {
        Dom_1.$$(document.documentElement).on('click', this.documentClickListener);
        this.positionPopup();
        this.dropdownHeader.addClass(ResponsiveTabs.ACTIVE_DROPDOWN_CSS_CLASS);
    };
    ResponsiveTabs.prototype.addToDropdownIfNeeded = function (tab) {
        Iif (!this.canAddTabToDropdown(tab)) {
            return;
        }
        Dom_1.$$(tab).addClass(ResponsiveTabs.TAB_IN_DROPDOWN_CSS_CLASS);
        var list = Dom_1.$$(this.dropdownContent.find('ol'));
        var listElement = Dom_1.$$('li', null, tab);
        list.prepend(listElement.el);
    };
    ResponsiveTabs.prototype.removeFromDropdownIfNeeded = function (tab) {
        Iif (!this.canRemoveTabFromDropdown(tab)) {
            return;
        }
        Dom_1.$$(tab).removeClass(ResponsiveTabs.TAB_IN_DROPDOWN_CSS_CLASS);
        Dom_1.$$(tab.parentElement).detach();
    };
    ResponsiveTabs.prototype.canAddTabToDropdown = function (tab) {
        return tab && !this.tabIsInDropdown(tab) && this.dropdownHeader;
    };
    ResponsiveTabs.prototype.canRemoveTabFromDropdown = function (tab) {
        return tab && this.tabIsInDropdown(tab) && this.dropdownContent;
    };
    ResponsiveTabs.prototype.cleanUpDropdown = function () {
        this.dropdownHeader.removeClass(ResponsiveTabs.ACTIVE_DROPDOWN_CSS_CLASS);
        this.dropdownHeader.detach();
        this.dropdownContent.detach();
    };
    ResponsiveTabs.prototype.isDropdownEmpty = function () {
        Eif (this.dropdownContent) {
            var tabs = this.dropdownContent.findAll('.CoveoTab');
            return tabs.length == 0;
        }
        return false;
    };
    ResponsiveTabs.prototype.manageTabSwapping = function () {
        var _this = this;
        underscore_1.each(this.coveoRoot.findAll('.' + Component_1.Component.computeCssClassNameForType(this.ID)), function (tabElement) {
            var tab = Dom_1.$$(tabElement);
            var fadeOutFadeIn = function (event) {
                var lastTabInSection = _this.tabsInTabSection.pop();
                if (event.propertyName == 'opacity') {
                    if (tab.el.style.opacity == '0') {
                        Dom_1.$$(lastTabInSection).addClass(ResponsiveTabs.TAB_IN_DROPDOWN_CSS_CLASS);
                        tab.replaceWith(lastTabInSection);
                        tab.removeClass(ResponsiveTabs.TAB_IN_DROPDOWN_CSS_CLASS);
                        _this.fromDropdownToTabSection(tab);
                        // Because of the DOM manipulation, sometimes the animation will not trigger. Accessing the computed styles makes sure
                        // the animation will happen.
                        window.getComputedStyle(tab.el).opacity;
                        window.getComputedStyle(lastTabInSection).opacity;
                        tab.el.style.opacity = lastTabInSection.style.opacity = '1';
                    }
                    else if (tab.el.style.opacity == '1') {
                        _this.closeDropdown();
                        EventsUtils_1.EventsUtils.removePrefixedEvent(tab.el, 'TransitionEnd', fadeOutFadeIn);
                        _this.handleResizeEvent();
                    }
                }
            };
            var swapOnSelect = function () {
                if (_this.tabIsInDropdown(tab)) {
                    var lastTabInSection = _this.tabsInTabSection.pop();
                    if (lastTabInSection) {
                        EventsUtils_1.EventsUtils.addPrefixedEvent(tab.el, 'TransitionEnd', fadeOutFadeIn);
                        tab.el.style.opacity = lastTabInSection.style.opacity = '0';
                    }
                }
            };
            tab.on('click', function () { return swapOnSelect(); });
            tab.on('keyup', KeyboardUtils_1.KeyboardUtils.keypressAction(KeyboardUtils_1.KEYBOARD.ENTER, swapOnSelect));
            tab.on('blur', function (e) {
                if (e.relatedTarget && !_this.tabIsInDropdown(e.relatedTarget)) {
                    _this.closeDropdown();
                }
            });
        });
    };
    ResponsiveTabs.prototype.bindNukeEvents = function () {
        var _this = this;
        Dom_1.$$(this.coveoRoot).on(InitializationEvents_1.InitializationEvents.nuke, function () {
            Dom_1.$$(document.documentElement).off('click', _this.documentClickListener);
        });
    };
    ResponsiveTabs.prototype.positionPopup = function () {
        this.dropdownContent.insertAfter(this.dropdownHeader.el);
        new popper_js_1.default(this.dropdownHeader.el, this.dropdownContent.el, {
            modifiers: {
                preventOverflow: {
                    boundariesElement: this.coveoRoot.el
                }
            }
        });
    };
    ResponsiveTabs.prototype.fromDropdownToTabSection = function (tab) {
        var lastTabInTabSection = underscore_1.last(this.tabsInTabSection);
        Iif (!lastTabInTabSection) {
            this.tabSection.prepend(tab.el);
            return;
        }
        var comesAfterInitialTabOrder = this.initialTabOrder.indexOf(tab.el) > this.initialTabOrder.indexOf(lastTabInTabSection);
        if (comesAfterInitialTabOrder) {
            tab.insertAfter(lastTabInTabSection);
        }
        else {
            tab.insertBefore(lastTabInTabSection);
        }
    };
    ResponsiveTabs.prototype.getDropdownHeaderLabel = function () {
        var dropdownHeaderLabel;
        underscore_1.each(Dom_1.$$(this.coveoRoot.find('.coveo-tab-section')).findAll('.' + Component_1.Component.computeCssClassName(Tab_1.Tab)), function (tabElement) {
            var tab = Component_1.Component.get(tabElement, Tab_1.Tab);
            Iif (!dropdownHeaderLabel && tab && tab.options.dropdownHeaderLabel) {
                dropdownHeaderLabel = tab.options.dropdownHeaderLabel;
            }
        });
        Eif (!dropdownHeaderLabel) {
            dropdownHeaderLabel = Strings_1.l(ResponsiveTabs.DROPDOWN_HEADER_LABEL_DEFAULT_VALUE);
        }
        return dropdownHeaderLabel;
    };
    ResponsiveTabs.prototype.tabIsSelected = function (tab) {
        return Dom_1.$$(tab).hasClass('coveo-selected');
    };
    ResponsiveTabs.prototype.tabIsInDropdown = function (tab) {
        return Dom_1.$$(tab).hasClass(ResponsiveTabs.TAB_IN_DROPDOWN_CSS_CLASS);
    };
    Object.defineProperty(ResponsiveTabs.prototype, "tabsInTabSection", {
        get: function () {
            var _this = this;
            var tabsInSection = [];
            underscore_1.each(this.tabSection.children(), function (childElement) {
                Eif (Utils_1.Utils.isHtmlElement(childElement)) {
                    var child = Dom_1.$$(childElement);
                    var childHasTabCssClassName = child.hasClass(Component_1.Component.computeCssClassNameForType(_this.ID));
                    if (!_this.tabIsInDropdown(child) && childHasTabCssClassName) {
                        tabsInSection.push(child.el);
                    }
                }
            });
            return tabsInSection;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ResponsiveTabs.prototype, "tabsInTabDropdown", {
        get: function () {
            Iif (!this.dropdownContent) {
                return [];
            }
            return this.dropdownContent.findAll("." + ResponsiveTabs.TAB_IN_DROPDOWN_CSS_CLASS);
        },
        enumerable: true,
        configurable: true
    });
    ResponsiveTabs.DROPDOWN_HEADER_LABEL_DEFAULT_VALUE = 'More';
    ResponsiveTabs.TAB_IN_DROPDOWN_CSS_CLASS = 'coveo-tab-dropdown';
    ResponsiveTabs.TAB_IN_DROPDOWN_HEADER_CSS_CLASS = ResponsiveTabs.TAB_IN_DROPDOWN_CSS_CLASS + "-header";
    ResponsiveTabs.ACTIVE_DROPDOWN_CSS_CLASS = 'coveo-dropdown-header-active';
    return ResponsiveTabs;
}());
exports.ResponsiveTabs = ResponsiveTabs;
 
 
/***/ }),
/* 397 */
/***/ (function(module, exports) {
 
// empty (null-loader)
 
/***/ }),
/* 398 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Dom_1 = __webpack_require__(0);
var SVGDom_1 = __webpack_require__(23);
var DynamicFacetHeaderButton = /** @class */ (function () {
    function DynamicFacetHeaderButton(rootOptions) {
        this.rootOptions = rootOptions;
        this.create();
    }
    DynamicFacetHeaderButton.prototype.create = function () {
        var hasIcon = this.rootOptions.iconSVG && this.rootOptions.iconClassName;
        this.button = Dom_1.$$('button', {
            className: ("coveo-dynamic-facet-header-btn " + (this.rootOptions.className || '')).trim(),
            type: 'button'
        }, hasIcon ? this.rootOptions.iconSVG : this.rootOptions.label);
        this.rootOptions.action && this.button.on('click', this.rootOptions.action);
        if (hasIcon) {
            this.button.setAttribute('aria-label', this.rootOptions.label);
            this.button.setAttribute('title', this.rootOptions.label);
            SVGDom_1.SVGDom.addClassToSVGInContainer(this.button.el, this.rootOptions.iconClassName);
        }
        if (this.rootOptions.ariaLabel) {
            this.button.setAttribute('aria-label', this.rootOptions.ariaLabel);
        }
        if (this.rootOptions.shouldDisplay !== undefined) {
            this.toggle(this.rootOptions.shouldDisplay);
        }
        this.element = this.button.el;
    };
    DynamicFacetHeaderButton.prototype.toggle = function (shouldDisplay) {
        this.button.toggle(shouldDisplay);
    };
    return DynamicFacetHeaderButton;
}());
exports.DynamicFacetHeaderButton = DynamicFacetHeaderButton;
 
 
/***/ }),
/* 399 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Dom_1 = __webpack_require__(0);
var DynamicFacetValueShowMoreLessButton = /** @class */ (function () {
    function DynamicFacetValueShowMoreLessButton(options) {
        var btn = Dom_1.$$('button', {
            className: options.className,
            ariaLabel: options.ariaLabel,
            type: 'button'
        }, options.label);
        this.element = Dom_1.$$('li', { role: 'none' }, btn).el;
        btn.on('click', function () { return options.action(); });
    }
    return DynamicFacetValueShowMoreLessButton;
}());
exports.DynamicFacetValueShowMoreLessButton = DynamicFacetValueShowMoreLessButton;
 
 
/***/ }),
/* 400 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __assign = (this && this.__assign) || Object.assign || function(t) {
    for (var s, i = 1, n = arguments.length; i < n; i++) {
        s = arguments[i];
        for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
            t[p] = s[p];
    }
    return t;
};
Object.defineProperty(exports, "__esModule", { value: true });
var Assert_1 = __webpack_require__(12);
var QueryEvents_1 = __webpack_require__(14);
var underscore_1 = __webpack_require__(1);
var DynamicFacetRequestBuilder_1 = __webpack_require__(203);
var DynamicFacetQueryController = /** @class */ (function () {
    function DynamicFacetQueryController(facet) {
        this.facet = facet;
        this.freezeCurrentValues = false;
        this.freezeFacetOrder = false;
        this.preventAutoSelection = false;
        this.requestBuilder = new DynamicFacetRequestBuilder_1.DynamicFacetRequestBuilder({
            facetId: this.facet.options.id,
            field: this.facet.fieldName,
            type: this.facet.facetType,
            sortCriteria: this.facet.options.sortCriteria,
            injectionDepth: this.facet.options.injectionDepth,
            filterFacetCount: this.facet.options.filterFacetCount
        });
        this.resetNumberOfValuesToRequest();
        this.resetFlagsDuringQuery();
    }
    DynamicFacetQueryController.prototype.resetFlagsDuringQuery = function () {
        var _this = this;
        this.facet.bind.onRootElement(QueryEvents_1.QueryEvents.duringQuery, function () {
            _this.freezeCurrentValues = false;
            _this.freezeFacetOrder = false;
            _this.preventAutoSelection = false;
        });
    };
    DynamicFacetQueryController.prototype.increaseNumberOfValuesToRequest = function (additionalNumberOfValues) {
        this.numberOfValuesToRequest += additionalNumberOfValues;
    };
    DynamicFacetQueryController.prototype.resetNumberOfValuesToRequest = function () {
        this.numberOfValuesToRequest = this.facet.options.numberOfValues;
    };
    DynamicFacetQueryController.prototype.enablePreventAutoSelectionFlag = function () {
        this.preventAutoSelection = true;
    };
    DynamicFacetQueryController.prototype.enableFreezeCurrentValuesFlag = function () {
        if (this.areValuesIncorrectlyAffectedByDependsOn) {
            return;
        }
        this.freezeCurrentValues = true;
    };
    DynamicFacetQueryController.prototype.enableFreezeFacetOrderFlag = function () {
        this.freezeFacetOrder = true;
    };
    Object.defineProperty(DynamicFacetQueryController.prototype, "areValuesIncorrectlyAffectedByDependsOn", {
        get: function () {
            if (!this.facet.dependsOnManager.hasDependentFacets) {
                return false;
            }
            if (this.facet.dependsOnManager.dependentFacetsHaveSelectedValues) {
                return false;
            }
            return this.currentValues.length < this.numberOfValuesToRequest;
        },
        enumerable: true,
        configurable: true
    });
    /**
     * Build the facets request for the DynamicFacet, and insert it in the query builder
     * @param queryBuilder
     */
    DynamicFacetQueryController.prototype.putFacetIntoQueryBuilder = function (queryBuilder) {
        Assert_1.Assert.exists(queryBuilder);
        queryBuilder.facetRequests.push(this.buildFacetRequest());
        if (this.freezeFacetOrder) {
            queryBuilder.facetOptions.freezeFacetOrder = true;
        }
    };
    DynamicFacetQueryController.prototype.buildFacetRequest = function () {
        return __assign({}, this.requestBuilder.buildBaseRequestForQuery(), { currentValues: this.currentValues, numberOfValues: this.numberOfValues, freezeCurrentValues: this.freezeCurrentValues, preventAutoSelect: this.preventAutoSelection, isFieldExpanded: this.numberOfValuesToRequest > this.facet.options.numberOfValues });
    };
    DynamicFacetQueryController.prototype.getQueryResults = function () {
        var query = this.facet.queryController.getLastQuery();
        // Specifying a numberOfResults of 0 will not log the query as a full fledged query in the API
        // it will also alleviate the load on the index
        query.numberOfResults = 0;
        var previousFacetRequestIndex = underscore_1.findIndex(query.facets, { facetId: this.facet.options.id });
        if (previousFacetRequestIndex !== -1) {
            query.facets[previousFacetRequestIndex] = this.buildFacetRequest();
        }
        else if (query.facets) {
            query.facets.push(this.buildFacetRequest());
        }
        else {
            query.facets = [this.buildFacetRequest()];
        }
        return this.facet.queryController.getEndpoint().search(query);
    };
    Object.defineProperty(DynamicFacetQueryController.prototype, "currentValues", {
        get: function () {
            return this.facet.values.allFacetValues.map(function (_a) {
                var value = _a.value, state = _a.state;
                return ({
                    value: value,
                    state: state
                });
            });
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(DynamicFacetQueryController.prototype, "numberOfValues", {
        get: function () {
            if (this.freezeCurrentValues) {
                return this.currentValues.length;
            }
            return Math.max(this.numberOfValuesToRequest, this.facet.values.activeValues.length);
        },
        enumerable: true,
        configurable: true
    });
    return DynamicFacetQueryController;
}());
exports.DynamicFacetQueryController = DynamicFacetQueryController;
 
 
/***/ }),
/* 401 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Checkbox_1 = __webpack_require__(98);
var Dom_1 = __webpack_require__(0);
var DynamicFacetValueCheckbox = /** @class */ (function () {
    function DynamicFacetValueCheckbox(facetValue, selectAction) {
        if (selectAction === void 0) { selectAction = function () { }; }
        this.facetValue = facetValue;
        this.checkbox = new Checkbox_1.Checkbox(selectAction.bind(this), this.facetValue.displayValue, this.facetValue.selectAriaLabel, "(" + this.facetValue.formattedCount + ")");
        var label = Dom_1.$$(this.checkbox.getElement()).find('.coveo-checkbox-span-label');
        var labelSuffix = Dom_1.$$(this.checkbox.getElement()).find('.coveo-checkbox-span-label-suffix');
        Eif (label && labelSuffix) {
            label.setAttribute('title', this.facetValue.displayValue);
            label.setAttribute('aria-hidden', 'true');
            labelSuffix.setAttribute('aria-hidden', 'true');
        }
        this.facetValue.isSelected && this.checkbox.select(false);
        this.element = this.checkbox.getElement();
    }
    return DynamicFacetValueCheckbox;
}());
exports.DynamicFacetValueCheckbox = DynamicFacetValueCheckbox;
 
 
/***/ }),
/* 402 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var DynamicFacetValue_1 = __webpack_require__(126);
var FacetValueState_1 = __webpack_require__(36);
var DynamicFacetRangeValueParser_1 = __webpack_require__(847);
var DynamicFacetValueRenderer_1 = __webpack_require__(274);
var DynamicFacetRangeValueCreator = /** @class */ (function () {
    function DynamicFacetRangeValueCreator(facet) {
        this.facet = facet;
        this.parser = new DynamicFacetRangeValueParser_1.DynamicFacetRangeValueParser(this.facet);
    }
    DynamicFacetRangeValueCreator.prototype.getDefaultValues = function () {
        var _this = this;
        var ranges = this.facet.options.ranges;
        return ranges.map(function (range, index) { return _this.createFromRange(range, index); }).filter(function (facetValue) { return !!facetValue; });
    };
    DynamicFacetRangeValueCreator.prototype.createFromRange = function (unvalidatedRange, index) {
        var range = this.parser.validate(unvalidatedRange);
        Iif (!range) {
            this.facet.logger.error("Unvalid range for " + this.facet.options.valueFormat + " format", unvalidatedRange);
            return null;
        }
        var displayValue = range.label ? range.label : this.parser.formatDisplayValue(range);
        return new DynamicFacetValue_1.DynamicFacetValue({
            displayValue: displayValue,
            value: this.parser.formatValue(range),
            start: range.start,
            end: range.end,
            endInclusive: !!range.endInclusive,
            numberOfResults: 0,
            state: FacetValueState_1.FacetValueState.idle,
            position: index + 1
        }, this.facet, DynamicFacetValueRenderer_1.DynamicFacetValueRenderer);
    };
    DynamicFacetRangeValueCreator.prototype.createFromResponse = function (responseValue, index) {
        var value = this.parser.formatValue(responseValue);
        // SEARCHAPI-3887 will return displayValue in the response
        var displayValue = this.facet.values.get(value).displayValue;
        return new DynamicFacetValue_1.DynamicFacetValue({
            state: responseValue.state,
            numberOfResults: responseValue.numberOfResults,
            start: responseValue.start,
            end: responseValue.end,
            endInclusive: responseValue.endInclusive,
            value: value,
            displayValue: displayValue,
            position: index + 1
        }, this.facet, DynamicFacetValueRenderer_1.DynamicFacetValueRenderer);
    };
    DynamicFacetRangeValueCreator.prototype.createFromValue = function (value) {
        var range = this.parser.parse(value);
        if (!range) {
            this.facet.logger.error('Facet range value invalid', value);
            return null;
        }
        return this.createFromRange(range, this.facet.values.allFacetValues.length);
    };
    return DynamicFacetRangeValueCreator;
}());
exports.DynamicFacetRangeValueCreator = DynamicFacetRangeValueCreator;
 
 
/***/ }),
/* 403 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var RangeEndScope;
(function (RangeEndScope) {
    RangeEndScope["Inclusive"] = "inc";
    RangeEndScope["Exclusive"] = "exc";
})(RangeEndScope = exports.RangeEndScope || (exports.RangeEndScope = {}));
 
 
/***/ }),
/* 404 */
/***/ (function(module, exports, __webpack_require__) {
 
/* WEBPACK VAR INJECTION */(function(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 getOwnPropertyDescriptors = Object.getOwnPropertyDescriptors ||
  function getOwnPropertyDescriptors(obj) {
    var keys = Object.keys(obj);
    var descriptors = {};
    for (var i = 0; i < keys.length; i++) {
      descriptors[keys[i]] = Object.getOwnPropertyDescriptor(obj, keys[i]);
    }
    return descriptors;
  };
 
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) {
  if (typeof process !== 'undefined' && process.noDeprecation === true) {
    return fn;
  }
 
  // Allow for deprecating things in the process of starting up.
  if (typeof process === 'undefined') {
    return function() {
      return exports.deprecate(fn, msg).apply(this, arguments);
    };
  }
 
  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__(1538);
 
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__(1539);
 
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);
}
 
var kCustomPromisifiedSymbol = typeof Symbol !== 'undefined' ? Symbol('util.promisify.custom') : undefined;
 
exports.promisify = function promisify(original) {
  if (typeof original !== 'function')
    throw new TypeError('The "original" argument must be of type Function');
 
  if (kCustomPromisifiedSymbol && original[kCustomPromisifiedSymbol]) {
    var fn = original[kCustomPromisifiedSymbol];
    if (typeof fn !== 'function') {
      throw new TypeError('The "util.promisify.custom" argument must be of type Function');
    }
    Object.defineProperty(fn, kCustomPromisifiedSymbol, {
      value: fn, enumerable: false, writable: false, configurable: true
    });
    return fn;
  }
 
  function fn() {
    var promiseResolve, promiseReject;
    var promise = new Promise(function (resolve, reject) {
      promiseResolve = resolve;
      promiseReject = reject;
    });
 
    var args = [];
    for (var i = 0; i < arguments.length; i++) {
      args.push(arguments[i]);
    }
    args.push(function (err, value) {
      if (err) {
        promiseReject(err);
      } else {
        promiseResolve(value);
      }
    });
 
    try {
      original.apply(this, args);
    } catch (err) {
      promiseReject(err);
    }
 
    return promise;
  }
 
  Object.setPrototypeOf(fn, Object.getPrototypeOf(original));
 
  if (kCustomPromisifiedSymbol) Object.defineProperty(fn, kCustomPromisifiedSymbol, {
    value: fn, enumerable: false, writable: false, configurable: true
  });
  return Object.defineProperties(
    fn,
    getOwnPropertyDescriptors(original)
  );
}
 
exports.promisify.custom = kCustomPromisifiedSymbol
 
function callbackifyOnRejected(reason, cb) {
  // `!reason` guard inspired by bluebird (Ref: https://goo.gl/t5IS6M).
  // Because `null` is a special error value in callbacks which means "no error
  // occurred", we error-wrap so the callback consumer can distinguish between
  // "the promise rejected with null" or "the promise fulfilled with undefined".
  if (!reason) {
    var newReason = new Error('Promise was rejected with a falsy value');
    newReason.reason = reason;
    reason = newReason;
  }
  return cb(reason);
}
 
function callbackify(original) {
  if (typeof original !== 'function') {
    throw new TypeError('The "original" argument must be of type Function');
  }
 
  // We DO NOT return the promise as it gives the user a false sense that
  // the promise is actually somehow related to the callback's execution
  // and that the callback throwing will reject the promise.
  function callbackified() {
    var args = [];
    for (var i = 0; i < arguments.length; i++) {
      args.push(arguments[i]);
    }
 
    var maybeCb = args.pop();
    if (typeof maybeCb !== 'function') {
      throw new TypeError('The last argument must be of type Function');
    }
    var self = this;
    var cb = function() {
      return maybeCb.apply(self, arguments);
    };
    // In true node style we process the callback on `nextTick` with all the
    // implications (stack, `uncaughtException`, `async_hooks`)
    original.apply(this, args)
      .then(function(ret) { process.nextTick(cb, null, ret) },
            function(rej) { process.nextTick(callbackifyOnRejected, rej, cb) });
  }
 
  Object.setPrototypeOf(callbackified, Object.getPrototypeOf(original));
  Object.defineProperties(callbackified,
                          getOwnPropertyDescriptors(original));
  return callbackified;
}
exports.callbackify = callbackify;
 
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(414)))
 
/***/ }),
/* 405 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __assign = (this && this.__assign) || Object.assign || function(t) {
    for (var s, i = 1, n = arguments.length; i < n; i++) {
        s = arguments[i];
        for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
            t[p] = s[p];
    }
    return t;
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { Iif (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        Iif (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            Iif (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
            Iif (y = 0, t) op = [0, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    Iif (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    Iif (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        Iif (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
Object.defineProperty(exports, "__esModule", { value: true });
__webpack_require__(397);
var Component_1 = __webpack_require__(6);
var Strings_1 = __webpack_require__(4);
var ComponentOptions_1 = __webpack_require__(13);
var Dom_1 = __webpack_require__(0);
var Initialization_1 = __webpack_require__(8);
var GlobalExports_1 = __webpack_require__(10);
var DynamicHierarchicalFacetQueryController_1 = __webpack_require__(851);
var QueryStateModel_1 = __webpack_require__(17);
var Model_1 = __webpack_require__(26);
var Utils_1 = __webpack_require__(5);
var underscore_1 = __webpack_require__(1);
var Assert_1 = __webpack_require__(12);
var QueryEvents_1 = __webpack_require__(14);
var BreadcrumbEvents_1 = __webpack_require__(33);
var DynamicHierarchicalFacetBreadcrumb_1 = __webpack_require__(852);
var AnalyticsActionListMeta_1 = __webpack_require__(7);
var ResponsiveFacets_1 = __webpack_require__(146);
var ResponsiveFacetOptions_1 = __webpack_require__(100);
var DynamicFacetHeader_1 = __webpack_require__(155);
var DependsOnManager_1 = __webpack_require__(185);
var ResultListUtils_1 = __webpack_require__(72);
var FacetRequest_1 = __webpack_require__(127);
var DynamicHierarchicalFacetValues_1 = __webpack_require__(406);
var FacetValueState_1 = __webpack_require__(36);
var FacetSortCriteria_1 = __webpack_require__(156);
var Logger_1 = __webpack_require__(18);
var DynamicHierarchicalFacetSearch_1 = __webpack_require__(1542);
/**
 * The `DynamicHierarchicalFacet` component is a facet that renders values in a hierarchical fashion. It determines the filter to apply depending on the
 * selected path of values.
 *
 * This facet requires a [`field`]{@link DynamicHierarchicalFacet.options.field} with a special format to work correctly.
 *
 * @notSupportedIn salesforcefree
 * @availablesince [January 2020 Release (v2.7968)](https://docs.coveo.com/en/3163/)
 * @externaldocs [Using Hierarchical Facets](https://docs.coveo.com/en/2667)
 */
var DynamicHierarchicalFacet = /** @class */ (function (_super) {
    __extends(DynamicHierarchicalFacet, _super);
    function DynamicHierarchicalFacet(element, options, bindings) {
        var _this = _super.call(this, element, 'DynamicHierarchicalFacet', bindings) || this;
        _this.element = element;
        _this.listenToQueryStateChange = true;
        _this.moreValuesAvailable = false;
        _this.isDynamicFacet = true;
        _this.isFieldValueCompatible = true;
        _this.isFieldValueHierarchical = true;
        _this.options = ComponentOptions_1.ComponentOptions.initComponentOptions(element, DynamicHierarchicalFacet, options);
        _this.dynamicHierarchicalFacetQueryController = new DynamicHierarchicalFacetQueryController_1.DynamicHierarchicalFacetQueryController(_this);
        _this.isCollapsed = _this.options.enableCollapse && _this.options.collapsedByDefault;
        _this.verifyCollapsingConfiguration();
        _this.values = new DynamicHierarchicalFacetValues_1.DynamicHierarchicalFacetValues(_this);
        ResponsiveFacets_1.ResponsiveFacets.init(_this.root, _this, _this.options);
        _this.initDependsOnManager();
        _this.initBreadCrumbEvents();
        _this.initQueryEvents();
        _this.initQueryStateEvents();
        return _this;
    }
    Object.defineProperty(DynamicHierarchicalFacet.prototype, "fieldName", {
        get: function () {
            return this.options.field.slice(1);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(DynamicHierarchicalFacet.prototype, "facetType", {
        get: function () {
            return FacetRequest_1.FacetType.hierarchical;
        },
        enumerable: true,
        configurable: true
    });
    DynamicHierarchicalFacet.prototype.isCurrentlyDisplayed = function () {
        return Dom_1.$$(this.element).isVisible();
    };
    Object.defineProperty(DynamicHierarchicalFacet.prototype, "hasActiveValues", {
        get: function () {
            return this.values.hasSelectedValue;
        },
        enumerable: true,
        configurable: true
    });
    DynamicHierarchicalFacet.prototype.hasSelectedValue = function (value) {
        var values = this.splitValue(value);
        return underscore_1.isEqual(values, this.values.selectedPath);
    };
    DynamicHierarchicalFacet.prototype.selectValue = function (value) {
        this.selectPath(this.splitValue(value));
    };
    DynamicHierarchicalFacet.prototype.deselectValue = function () {
        this.clear();
    };
    DynamicHierarchicalFacet.prototype.getCaptionForStringValue = function (value) {
        return this.getCaption(underscore_1.last(this.splitValue(value)));
    };
    DynamicHierarchicalFacet.prototype.initQueryEvents = function () {
        var _this = this;
        this.bind.onRootElement(QueryEvents_1.QueryEvents.doneBuildingQuery, function (data) { return _this.handleDoneBuildingQuery(data); });
        this.bind.onRootElement(QueryEvents_1.QueryEvents.deferredQuerySuccess, function (data) { return _this.handleQuerySuccess(data.results); });
        this.bind.onRootElement(QueryEvents_1.QueryEvents.duringQuery, function () { return _this.ensureDom(); });
        this.bind.onRootElement(QueryEvents_1.QueryEvents.queryError, function () { return _this.onNoValues(); });
    };
    DynamicHierarchicalFacet.prototype.initBreadCrumbEvents = function () {
        var _this = this;
        if (this.options.includeInBreadcrumb) {
            this.bind.onRootElement(BreadcrumbEvents_1.BreadcrumbEvents.populateBreadcrumb, function (args) {
                return _this.handlePopulateBreadcrumb(args);
            });
            this.bind.onRootElement(BreadcrumbEvents_1.BreadcrumbEvents.clearBreadcrumb, function () { return _this.reset(); });
        }
    };
    Object.defineProperty(DynamicHierarchicalFacet.prototype, "queryStateAttribute", {
        get: function () {
            return QueryStateModel_1.QueryStateModel.getFacetId(this.options.id);
        },
        enumerable: true,
        configurable: true
    });
    DynamicHierarchicalFacet.prototype.handleDoneBuildingQuery = function (data) {
        // If there is a DynamicFacetManager, it will take care of adding the facet's state
        if (this.dynamicFacetManager) {
            return;
        }
        Assert_1.Assert.exists(data);
        Assert_1.Assert.exists(data.queryBuilder);
        this.putStateIntoQueryBuilder(data.queryBuilder);
        this.putStateIntoAnalytics();
    };
    DynamicHierarchicalFacet.prototype.verifyCollapsingConfiguration = function () {
        if (this.options.collapsedByDefault && !this.options.enableCollapse) {
            this.logger.warn('Setting "collapseByDefault" to "true" has no effect when "enableCollapse" is set to "false"');
        }
    };
    DynamicHierarchicalFacet.prototype.putStateIntoQueryBuilder = function (queryBuilder) {
        Assert_1.Assert.exists(queryBuilder);
        this.dynamicHierarchicalFacetQueryController.putFacetIntoQueryBuilder(queryBuilder);
    };
    DynamicHierarchicalFacet.prototype.putStateIntoAnalytics = function () {
        var pendingEvent = this.usageAnalytics.getPendingSearchEvent();
        pendingEvent && pendingEvent.addFacetState(this.analyticsFacetState);
    };
    DynamicHierarchicalFacet.prototype.scrollToTop = function () {
        if (this.options.enableScrollToTop) {
            ResultListUtils_1.ResultListUtils.scrollToTop(this.root);
        }
    };
    DynamicHierarchicalFacet.prototype.updateAppearance = function () {
        this.header.toggleCollapse(this.isCollapsed);
        this.toggleSearchDisplay();
        Dom_1.$$(this.element).toggleClass('coveo-dynamic-hierarchical-facet-collapsed', this.isCollapsed);
        Dom_1.$$(this.element).toggleClass('coveo-hidden', !this.values.allFacetValues.length);
    };
    DynamicHierarchicalFacet.prototype.toggleSearchDisplay = function () {
        if (this.options.enableFacetSearch === false) {
            return;
        }
        return Dom_1.$$(this.search.element).toggleClass('coveo-hidden', this.isCollapsed);
    };
    DynamicHierarchicalFacet.prototype.handleQuerySuccess = function (results) {
        // If there is a DynamicFacetManager, it will take care of handling the results
        if (this.dynamicFacetManager) {
            return;
        }
        if (Utils_1.Utils.isNullOrUndefined(results.facets)) {
            return this.notImplementedError();
        }
        this.handleQueryResults(results);
    };
    DynamicHierarchicalFacet.prototype.handleQueryResults = function (results) {
        var index = underscore_1.findIndex(results.facets, { facetId: this.options.id });
        var facetResponse = index !== -1 ? results.facets[index] : null;
        this.position = facetResponse ? index + 1 : undefined;
        facetResponse ? this.onNewValues(facetResponse) : this.onNoValues();
        this.header.hideLoading();
        this.updateQueryStateModel(this.values.selectedPath);
        this.values.render();
        this.updateAppearance();
    };
    DynamicHierarchicalFacet.prototype.splitValue = function (value) {
        return value.trim().split(this.options.delimitingCharacter);
    };
    DynamicHierarchicalFacet.prototype.onNewValues = function (facetResponse) {
        var _this = this;
        this.moreValuesAvailable = facetResponse.moreValuesAvailable;
        this.values.createFromResponse(facetResponse);
        Iif (this.options.customSort) {
            var order = this.options.customSort.split(this.options.customSortDelimitingCharacter).map(function (value) { return _this.splitValue(value); });
            this.values.reorderValues(order);
        }
    };
    DynamicHierarchicalFacet.prototype.onNoValues = function () {
        this.moreValuesAvailable = false;
        this.values.resetValues();
    };
    DynamicHierarchicalFacet.prototype.updateQueryStateModel = function (path) {
        this.listenToQueryStateChange = false;
        this.queryStateModel.set(this.queryStateAttribute, path);
        this.listenToQueryStateChange = true;
    };
    DynamicHierarchicalFacet.prototype.beforeSendingQuery = function () {
        this.header.showLoading();
    };
    DynamicHierarchicalFacet.prototype.triggerNewQuery = function (beforeExecuteQuery) {
        this.beforeSendingQuery();
        var options = beforeExecuteQuery ? { beforeExecuteQuery: beforeExecuteQuery } : { ignoreWarningSearchEvent: true };
        this.queryController.executeQuery(options);
    };
    DynamicHierarchicalFacet.prototype.triggerNewIsolatedQuery = function (beforeExecuteQuery) {
        return __awaiter(this, void 0, void 0, function () {
            var results, e_1;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        this.beforeSendingQuery();
                        beforeExecuteQuery && beforeExecuteQuery();
                        _a.label = 1;
                    case 1:
                        _a.trys.push([1, 3, , 4]);
                        return [4 /*yield*/, this.dynamicHierarchicalFacetQueryController.getQueryResults()];
                    case 2:
                        results = _a.sent();
                        this.handleQueryResults(results);
                        return [3 /*break*/, 4];
                    case 3:
                        e_1 = _a.sent();
                        this.header.hideLoading();
                        return [3 /*break*/, 4];
                    case 4: return [2 /*return*/];
                }
            });
        });
    };
    /**
     * Requests additional values.
     *
     * See the [`enableMoreLess`]{@link DynamicHierarchicalFacet.options.enableMoreLess} option.
     *
     * Automatically triggers an isolated query.
     * @param additionalNumberOfValues The number of additional values to request. Minimum value is 1. Defaults to the [numberOfValues]{@link DynamicHierarchicalFacet.options.numberOfValues} option value.
     */
    DynamicHierarchicalFacet.prototype.showMoreValues = function (additionalNumberOfValues) {
        var _this = this;
        if (additionalNumberOfValues === void 0) { additionalNumberOfValues = this.options.numberOfValues; }
        this.ensureDom();
        this.logger.info('Show more values');
        this.dynamicHierarchicalFacetQueryController.increaseNumberOfValuesToRequest(additionalNumberOfValues);
        this.triggerNewIsolatedQuery(function () { return _this.logAnalyticsFacetShowMoreLess(AnalyticsActionListMeta_1.analyticsActionCauseList.dynamicFacetShowMore); });
    };
    /**
     * Reduces the number of displayed facet values down to [numberOfValues]{@link DynamicFacet.options.numberOfValues}.
     *
     * See the [`enableMoreLess`]{@link DynamicHierarchicalFacet.options.enableMoreLess} option.
     *
     * Automatically triggers an isolated query.
     */
    DynamicHierarchicalFacet.prototype.showLessValues = function () {
        var _this = this;
        this.ensureDom();
        this.logger.info('Show less values');
        this.dynamicHierarchicalFacetQueryController.resetNumberOfValuesToRequest();
        this.triggerNewIsolatedQuery(function () { return _this.logAnalyticsFacetShowMoreLess(AnalyticsActionListMeta_1.analyticsActionCauseList.dynamicFacetShowLess); });
    };
    /**
     * Select a path in the hierarchy.
     *
     * Does **not** trigger a query automatically.
     * Does **not** update the visual of the facet until a query is performed.
     *
     * @param path The values representing the path.
     */
    DynamicHierarchicalFacet.prototype.selectPath = function (path) {
        Assert_1.Assert.exists(path);
        Assert_1.Assert.isLargerThan(0, path.length);
        this.ensureDom();
        this.updateQueryStateModel(path);
        this.values.selectPath(path);
        this.logger.info('Toggle select facet value at path', path);
    };
    DynamicHierarchicalFacet.prototype.clear = function () {
        var _this = this;
        this.reset();
        this.scrollToTop();
        this.triggerNewQuery(function () { return _this.logAnalyticsEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.dynamicFacetClearAll); });
    };
    /**
     * Deselects the path in the facet.
     *
     * Does **not** trigger a query automatically.
     * Does **not** update the visual of the facet until a query is performed.
     */
    DynamicHierarchicalFacet.prototype.reset = function () {
        this.ensureDom();
        Iif (!this.values.hasSelectedValue) {
            return;
        }
        this.enablePreventAutoSelectionFlag();
        this.logger.info('Deselect facet value');
        this.values.clearPath();
        this.updateQueryStateModel([]);
    };
    /**
     * Collapses or expands the facet depending on it's current state.
     */
    DynamicHierarchicalFacet.prototype.toggleCollapse = function () {
        this.isCollapsed ? this.expand() : this.collapse();
    };
    /**
     * Expands the facet, displaying all of its currently fetched values.
     */
    DynamicHierarchicalFacet.prototype.expand = function () {
        if (!this.options.enableCollapse) {
            return this.logger.warn("Calling expand() won't do anything on a facet that has the option \"enableCollapse\" set to \"false\"");
        }
        Iif (!this.isCollapsed) {
            return;
        }
        this.ensureDom();
        this.logger.info('Expand facet values');
        this.isCollapsed = false;
        this.updateAppearance();
    };
    /**
     * For this method to work, the component has to be the child of a [DynamicFacetManager]{@link DynamicFacetManager} component.
     *
     * Sets a flag indicating whether the facets should be returned in their current order.
     *
     * Setting the flag to `true` helps ensuring that the facets do not move around while the end-user is interacting with them.
     *
     * The flag is automatically set back to `false` after a query is built.
     */
    DynamicHierarchicalFacet.prototype.enableFreezeFacetOrderFlag = function () {
        this.dynamicHierarchicalFacetQueryController.enableFreezeFacetOrderFlag();
    };
    DynamicHierarchicalFacet.prototype.enablePreventAutoSelectionFlag = function () {
        this.dynamicHierarchicalFacetQueryController.enablePreventAutoSelectionFlag();
    };
    /**
     * Collapses the facet, hiding values.
     */
    DynamicHierarchicalFacet.prototype.collapse = function () {
        if (!this.options.enableCollapse) {
            return this.logger.warn("Calling collapse() won't do anything on a facet that has the option \"enableCollapse\" set to \"false\"");
        }
        Iif (this.isCollapsed) {
            return;
        }
        this.ensureDom();
        this.logger.info('Collapse facet values');
        this.isCollapsed = true;
        this.updateAppearance();
    };
    DynamicHierarchicalFacet.prototype.createDom = function () {
        this.createAndAppendContent();
        this.updateAppearance();
    };
    /**
     *
     * @param value The string to find a caption for.
     * Returns the caption for a value or the value itself if no caption is available.
     */
    DynamicHierarchicalFacet.prototype.getCaption = function (value) {
        var valueCaptions = this.options.valueCaption;
        var caption = valueCaptions[value];
        return caption ? caption : value;
    };
    DynamicHierarchicalFacet.prototype.logAnalyticsEvent = function (actionCause) {
        this.usageAnalytics.logSearchEvent(actionCause, this.analyticsFacetMeta);
    };
    Object.defineProperty(DynamicHierarchicalFacet.prototype, "analyticsFacetValue", {
        get: function () {
            return this.values.selectedPath.join(this.options.delimitingCharacter);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(DynamicHierarchicalFacet.prototype, "analyticsFacetState", {
        get: function () {
            if (!this.values.hasSelectedValue) {
                return [];
            }
            return [
                {
                    field: this.options.field.toString(),
                    id: this.options.id,
                    title: this.options.title,
                    facetType: this.facetType,
                    facetPosition: this.position,
                    value: this.analyticsFacetValue,
                    displayValue: this.analyticsFacetValue,
                    state: FacetValueState_1.FacetValueState.selected,
                    valuePosition: 1
                }
            ];
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(DynamicHierarchicalFacet.prototype, "analyticsFacetMeta", {
        get: function () {
            return {
                facetField: this.options.field.toString(),
                facetId: this.options.id,
                facetTitle: this.options.title,
                facetValue: this.analyticsFacetValue
            };
        },
        enumerable: true,
        configurable: true
    });
    DynamicHierarchicalFacet.prototype.createAndAppendContent = function () {
        this.createAndAppendHeader();
        this.createAndAppendSearch();
        this.createAndAppendValues();
    };
    DynamicHierarchicalFacet.prototype.createAndAppendHeader = function () {
        var _this = this;
        this.header = new DynamicFacetHeader_1.DynamicFacetHeader({
            id: this.options.id,
            title: this.options.title,
            enableCollapse: this.options.enableCollapse,
            headingLevel: this.options.headingLevel,
            clear: function () { return _this.clear(); },
            toggleCollapse: function () { return _this.toggleCollapse(); },
            expand: function () { return _this.expand(); },
            collapse: function () { return _this.collapse(); }
        });
        this.element.appendChild(this.header.element);
    };
    DynamicHierarchicalFacet.prototype.createAndAppendSearch = function () {
        if (this.options.enableFacetSearch === false) {
            return;
        }
        this.search = new DynamicHierarchicalFacetSearch_1.DynamicHierarchicalFacetSearch(this);
        this.element.appendChild(this.search.element);
    };
    DynamicHierarchicalFacet.prototype.createAndAppendValues = function () {
        this.element.appendChild(this.values.render());
    };
    DynamicHierarchicalFacet.prototype.pathIsValidForSelection = function (path) {
        return !Utils_1.Utils.isNullOrUndefined(path) && underscore_1.isArray(path);
    };
    DynamicHierarchicalFacet.prototype.handleQueryStateChanged = function (data) {
        if (!this.listenToQueryStateChange) {
            return;
        }
        var queryStatePath = data.attributes[this.queryStateAttribute];
        Iif (!this.pathIsValidForSelection(queryStatePath)) {
            return;
        }
        if (Utils_1.Utils.arrayEqual(queryStatePath, this.values.selectedPath)) {
            return;
        }
        queryStatePath.length ? this.selectPath(queryStatePath) : this.reset();
    };
    DynamicHierarchicalFacet.prototype.initQueryStateEvents = function () {
        var _this = this;
        this.queryStateModel.registerNewAttribute(this.queryStateAttribute, []);
        this.bind.onQueryState(Model_1.MODEL_EVENTS.CHANGE, undefined, function (data) { return _this.handleQueryStateChanged(data); });
    };
    DynamicHierarchicalFacet.prototype.initDependsOnManager = function () {
        var _this = this;
        var facetInfo = {
            reset: function () { return _this.reset(); },
            ref: this
        };
        this.dependsOnManager = new DependsOnManager_1.DependsOnManager(facetInfo);
    };
    DynamicHierarchicalFacet.prototype.notImplementedError = function () {
        this.logger.error('DynamicHierarchicalFacets are not supported by your current search endpoint. Disabling this component.');
        this.disable();
        this.updateAppearance();
    };
    DynamicHierarchicalFacet.prototype.handlePopulateBreadcrumb = function (args) {
        Assert_1.Assert.exists(args);
        Iif (!this.values.hasSelectedValue) {
            return;
        }
        var breadcrumbs = new DynamicHierarchicalFacetBreadcrumb_1.DynamicHierarchicalFacetBreadcrumb(this, { headingLevel: args.headingLevel });
        args.breadcrumbs.push({ element: breadcrumbs.element });
    };
    DynamicHierarchicalFacet.prototype.logAnalyticsFacetShowMoreLess = function (cause) {
        this.usageAnalytics.logCustomEvent(cause, this.analyticsFacetMeta, this.element);
    };
    DynamicHierarchicalFacet.ID = 'DynamicHierarchicalFacet';
    DynamicHierarchicalFacet.doExport = function () {
        GlobalExports_1.exportGlobally({
            DynamicHierarchicalFacet: DynamicHierarchicalFacet
        });
    };
    /**
     * The options for the DynamicHierarchicalFacet
     * @componentOptions
     */
    DynamicHierarchicalFacet.options = __assign({ 
        /**
         * A unique identifier for the facet. Among other things, this identifier serves the purpose of saving
         * the facet state in the URL hash.
         *
         * If you have two facets with the same field on the same page, you should specify an `id` value for at least one of
         * those two facets. This `id` must be unique among the facets.
         *
         * Default value is the [`field`]{@link DynamicHierarchicalFacet.options.field} option value.
         *
         * @examples productcategory
         */
        id: ComponentOptions_1.ComponentOptions.buildStringOption({
            postProcessing: function (value, options) { return value || options.field; },
            section: 'CommonOptions'
        }), 
        /**
         * The index field whose values the facet should use. The field values should have the form:
         * `the; the|path; the|path|to; the|path|to|given; the|path|to|given|item;`
         * where the delimiting character is `|`. This default delimiting character can be changed using the [delimitingCharacter]{@link DynamicHierarchicalFacet.options.delimitingCharacter} option.
         *
         * To help you verify whether your fields are setup correctly, use the [`debugInfo`]{@link DynamicHierarchicalFacet.debugInfo} method.
         *
         * @externaldocs [Using the Hierarchical Facet Component](https://docs.coveo.com/en/2667).
         * @examples @category
         */
        field: ComponentOptions_1.ComponentOptions.buildFieldOption({ required: true, section: 'CommonOptions' }), 
        /**
         * The title to display at the top of the facet.
         *
         * Default value is the localized string for `NoTitle`.
         *
         * @examples Product category
         */
        title: ComponentOptions_1.ComponentOptions.buildLocalizedStringOption({
            localizedString: function () { return Strings_1.l('NoTitle'); },
            section: 'CommonOptions'
        }), 
        /**
         * The maximum number of field values to display by default in the facet before the user
         * clicks the arrow to show more.
         *
         * See also the [`enableMoreLess`]{@link DynamicHierarchicalFacet.options.enableMoreLess} option.
         *
         * @examples 8
         */
        numberOfValues: ComponentOptions_1.ComponentOptions.buildNumberOption({ defaultValue: 5, min: 0, section: 'CommonOptions' }), 
        /**
         * Whether to allow the end-user to expand and collapse this facet.
         */
        enableCollapse: ComponentOptions_1.ComponentOptions.buildBooleanOption({ defaultValue: true, section: 'CommonOptions' }), 
        /**
         * Whether this facet should be collapsed by default.
         */
        collapsedByDefault: ComponentOptions_1.ComponentOptions.buildBooleanOption({ defaultValue: false, section: 'CommonOptions', depend: 'enableCollapse' }), 
        /**
         * Whether to scroll back to the top of the page whenever the end-user interacts with a facet.
         */
        enableScrollToTop: ComponentOptions_1.ComponentOptions.buildBooleanOption({ defaultValue: true, section: 'CommonOptions' }), 
        /**
         * Whether to notify the [`Breadcrumb`]{@link Breadcrumb} component when toggling values in the facet.
         */
        includeInBreadcrumb: ComponentOptions_1.ComponentOptions.buildBooleanOption({ defaultValue: true, section: 'CommonOptions' }), 
        /**
         * The number of items to scan for facet values.
         *
         * Setting this option to a higher value may enhance the accuracy of facet value counts at the cost of slower query performance.
         *
         * @examples 1500
         */
        injectionDepth: ComponentOptions_1.ComponentOptions.buildNumberOption({ defaultValue: 1000, min: 1000 }), 
        /**
         * Whether to enable the **More** and **Less** buttons in the Facet.
         *
         * See also the [`numberOfValues`]{@link DynamicHierarchicalFacet.options.numberOfValues} option.
         */
        enableMoreLess: ComponentOptions_1.ComponentOptions.buildBooleanOption({ defaultValue: true, section: 'CommonOptions' }), 
        /**
         * Whether to allow the end-user to search the facet values.
         */
        enableFacetSearch: ComponentOptions_1.ComponentOptions.buildBooleanOption({ section: 'Filtering', defaultValue: false }), 
        /**
         * The character that specifies the hierarchical dependency.
         *
         * **Example:**
         *
         * If your field has the following values:
         *
         * `electronics; electronics>laptops; electronics>laptops>gaming;`
         *
         * The delimiting character is `>`.
         *
         * @examples >
         */
        delimitingCharacter: ComponentOptions_1.ComponentOptions.buildStringOption({ defaultValue: '|', section: 'CommonOptions' }), 
        /**
         * A mapping of facet values to their desired captions.
         *
         * @externaldocs [Normalizing Facet Value Captions](https://docs.coveo.com/en/368/)
         */
        valueCaption: ComponentOptions_1.ComponentOptions.buildJsonOption({ defaultValue: {} }), 
        /**
         * The `id` option value of another facet in which at least one value must be selected in order
         * for the dependent hierarchical facet to be visible.
         *
         * **Default:** `undefined` and the hierarchical facet does not depend on any other facet to be displayed.
         *
         * @externaldocs [Defining Dependent Facets](https://docs.coveo.com/3210/)
         * @examples department
         */
        dependsOn: ComponentOptions_1.ComponentOptions.buildStringOption({ section: 'CommonOptions' }), 
        /**
         * A function that verifies whether the current state of the `dependsOn` facet allows the dependent facet to be displayed.
         *
         * If specified, the function receives a reference to the resolved `dependsOn` facet component instance as an argument, and must return a boolean.
         * The function's argument should typically be treated as read-only.
         *
         * By default, the dependent facet is displayed whenever one or more values are selected in its `dependsOn` facet.
         *
         * @externaldocs [Defining Dependent Facets](https://docs.coveo.com/3210/)
         */
        dependsOnCondition: ComponentOptions_1.ComponentOptions.buildCustomOption(function () {
            return null;
        }, { depend: 'dependsOn', section: 'CommonOptions' }), 
        /**
         * Whether to exclude folded result parents when estimating result counts for facet values.
         *
         * **Note:** The target folding field must be a facet field with the **Use cache for nested queries** options enabled (see [Add or Edit a Field](https://docs.coveo.com/en/1982)).
         *
         * See also the [`Folding`]{@link Folding} and [`FoldingForThread`]{@link FoldingForThread} components.
         *
         * **Default:** `true`.
         */
        filterFacetCount: ComponentOptions_1.ComponentOptions.buildBooleanOption({ section: 'Filtering' }), 
        /**
         * The sort criterion to use for this facet.
         *
         * **Default (Search API):** `occurrences`.
         *
         * @examples alphanumeric
         *
         * @availablesince [March 2020 Release (v2.8521)](https://docs.coveo.com/en/3203/)
         */
        sortCriteria: ComponentOptions_1.ComponentOptions.buildStringOption({
            postProcessing: function (value) {
                if (!value) {
                    return undefined;
                }
                if (value === FacetSortCriteria_1.FacetSortCriteria.alphanumeric || value === FacetSortCriteria_1.FacetSortCriteria.occurrences) {
                    return value;
                }
                new Logger_1.Logger(value).warn('sortCriteria is not of the the allowed values: "alphanumeric", "occurrences"');
                return undefined;
            },
            section: 'Sorting'
        }), 
        /**
         * Specifies a custom order by which to sort the dynamic hierarchical facet values.
         *
         * Custom-ordered values won't necessarily retrieve values from the index.
         *
         * **Example:**
         * ```html
         * <div
         *   class="CoveoDynamicHierarchicalFacet"
         *   data-field="@countries"
         *   data-title="Countries"
         *   data-tab="All"
         *   data-clear-label="All Countries"
         *   data-delimiting-character="|"
         *   data-custom-sort="America, Asia|Japan, America|Mexico, America|Canada, Europe|Germany, Europe|France, Oceania"
         * ></div>
         * ```
         */
        customSort: ComponentOptions_1.ComponentOptions.buildStringOption({ section: 'Sorting' }), 
        /**
         * If a custom sort is defined, this specifies the delimiter that separates paths from each other.
         *
         * *Example:**
         * ```html
         * <div
         *   class="CoveoDynamicHierarchicalFacet"
         *   data-field="@countries"
         *   data-title="Countries"
         *   data-tab="All"
         *   data-clear-label="All Countries"
         *   data-delimiting-character="|"
         *   data-custom-sort="America...Asia|Japan...America|Mexico...America|Canada...Europe|Germany...Europe|France...Oceania"
         *   data-custom-sort-delimiting-character="..."
         * ></div>
         * ```
         */
        customSortDelimitingCharacter: ComponentOptions_1.ComponentOptions.buildStringOption({
            section: 'Sorting',
            depend: 'customSort',
            postProcessing: function (value, options) {
                return Utils_1.Utils.isNullOrUndefined(value) ? (options.delimitingCharacter === ',' ? '|' : ',') : value;
            }
        }), 
        /**
         * The label to display to clear the facet when a value is selected.
         *
         * Default value is the localized string for `AllCategories`.
         *
         * @examples Everything
         */
        clearLabel: ComponentOptions_1.ComponentOptions.buildLocalizedStringOption({
            localizedString: function () { return Strings_1.l('AllCategories'); },
            section: 'CommonOptions'
        }), 
        /**
         * The base path shared by all values to display in the hierarchical facet.
         *
         * If you set this option, the specified base path will always be active on the facet.
         *
         * This implies that:
         * - The end user will not have to manually select the specified base path values.
         * - Values that do not have the specified base path will not be displayed in the facet.
         *
         * @examples electronics, electronics\,laptops
         *
         * @availablesince [April 2020 Release (v2.8864)](https://docs.coveo.com/en/3231/)
         */
        basePath: ComponentOptions_1.ComponentOptions.buildListOption({ defaultValue: [] }), 
        /**
         * The [heading level](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Heading_Elements) to use for the heading above the facet.
         *
         * A value of 0 will render a [`div`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/div) element instead.
         *
         * **Default:** `2`.
         */
        headingLevel: ComponentOptions_1.ComponentOptions.buildNumberOption({ defaultValue: 2, min: 0, max: 6 }) }, ResponsiveFacetOptions_1.ResponsiveFacetOptions);
    return DynamicHierarchicalFacet;
}(Component_1.Component));
exports.DynamicHierarchicalFacet = DynamicHierarchicalFacet;
Initialization_1.Initialization.registerAutoCreateComponent(DynamicHierarchicalFacet);
DynamicHierarchicalFacet.doExport();
 
 
/***/ }),
/* 406 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
__webpack_require__(1541);
var DynamicHierarchicalFacetValue_1 = __webpack_require__(407);
var FacetUtils_1 = __webpack_require__(49);
var Dom_1 = __webpack_require__(0);
var underscore_1 = __webpack_require__(1);
var FacetValueState_1 = __webpack_require__(36);
var Utils_1 = __webpack_require__(5);
var Strings_1 = __webpack_require__(4);
var DynamicFacetValueMoreLessButton_1 = __webpack_require__(399);
var SVGIcons_1 = __webpack_require__(16);
var HashUtils_1 = __webpack_require__(88);
var DynamicFacetHeader_1 = __webpack_require__(155);
var DynamicHierarchicalFacetValues = /** @class */ (function () {
    function DynamicHierarchicalFacetValues(facet) {
        this.facet = facet;
        this.facetValues = [];
        this._selectedPath = [];
        this.list = Dom_1.$$('ul', {
            className: 'coveo-dynamic-hierarchical-facet-values',
            'aria-labelledby': DynamicFacetHeader_1.getDynamicFacetHeaderId(this.facet.options.id),
            role: 'group'
        }).el;
    }
    DynamicHierarchicalFacetValues.prototype.formatDisplayValue = function (value) {
        var returnValue = FacetUtils_1.FacetUtils.tryToGetTranslatedCaption(this.facet.options.field, value);
        return this.facet.options.valueCaption[value] || returnValue;
    };
    DynamicHierarchicalFacetValues.prototype.createFromResponse = function (response) {
        var _this = this;
        this.clearPath();
        this.facetValues = response.values.map(function (responseValue) { return _this.createFacetValueFromResponse(responseValue); });
    };
    DynamicHierarchicalFacetValues.prototype.reorderValues = function (pathsOrder) {
        var order = pathsOrder.map(function (path) { return HashUtils_1.HashUtils.encodeArray(path); });
        if (!this.hasSelectedValue) {
            this.facetValues = Utils_1.Utils.reorderValuesByKeys(this.facetValues, order, function (value) { return HashUtils_1.HashUtils.encodeArray(value.path); });
        }
        else {
            var parentFacetValue = this.findValueWithPath(this.selectedPath);
            parentFacetValue.children = Utils_1.Utils.reorderValuesByKeys(parentFacetValue.children, order, function (value) { return HashUtils_1.HashUtils.encodeArray(value.path); });
        }
    };
    DynamicHierarchicalFacetValues.prototype.createFacetValueFromResponse = function (responseValue, path) {
        var _this = this;
        if (path === void 0) { path = []; }
        var newPath = path.concat([responseValue.value]);
        var displayValue = FacetUtils_1.FacetUtils.getDisplayValueFromValueCaption(responseValue.value, this.facet.options.field, this.facet.options.valueCaption);
        var children = responseValue.children
            ? responseValue.children.map(function (responseValue) { return _this.createFacetValueFromResponse(responseValue, newPath); })
            : [];
        if (responseValue.state === FacetValueState_1.FacetValueState.selected) {
            this._selectedPath = newPath;
        }
        return new DynamicHierarchicalFacetValue_1.DynamicHierarchicalFacetValue({
            value: responseValue.value,
            numberOfResults: responseValue.numberOfResults,
            state: responseValue.state,
            moreValuesAvailable: responseValue.moreValuesAvailable,
            path: newPath,
            isLeafValue: responseValue.isLeafValue,
            displayValue: displayValue,
            children: children
        }, this.facet);
    };
    Object.defineProperty(DynamicHierarchicalFacetValues.prototype, "allFacetValues", {
        get: function () {
            return this.facetValues;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(DynamicHierarchicalFacetValues.prototype, "hasSelectedValue", {
        get: function () {
            return !!this._selectedPath.length;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(DynamicHierarchicalFacetValues.prototype, "selectedPath", {
        get: function () {
            return this._selectedPath.slice();
        },
        enumerable: true,
        configurable: true
    });
    DynamicHierarchicalFacetValues.prototype.resetValues = function () {
        this.facetValues = [];
        this.clearPath();
    };
    DynamicHierarchicalFacetValues.prototype.clearPath = function () {
        this._selectedPath = [];
    };
    DynamicHierarchicalFacetValues.prototype.findValueWithPath = function (path) {
        var facetValues = this.facetValues;
        var facetValue;
        var remainingPath = path.slice();
        var _loop_1 = function () {
            var value = remainingPath.shift();
            facetValue = underscore_1.find(facetValues, function (facetValue) { return facetValue.value === value; });
            if (!facetValue) {
                return { value: null };
            }
            facetValues = facetValue.children;
        };
        do {
            var state_1 = _loop_1();
            if (typeof state_1 === "object")
                return state_1.value;
        } while (remainingPath.length);
        return facetValue;
    };
    DynamicHierarchicalFacetValues.prototype.createFacetValueWithPath = function (path, children) {
        Eif (children === void 0) { children = []; }
        var value = path[path.length - 1];
        return new DynamicHierarchicalFacetValue_1.DynamicHierarchicalFacetValue({
            value: value,
            path: path,
            displayValue: this.formatDisplayValue(value),
            numberOfResults: 0,
            state: FacetValueState_1.FacetValueState.idle,
            isLeafValue: !children.length,
            moreValuesAvailable: false,
            children: children
        }, this.facet);
    };
    DynamicHierarchicalFacetValues.prototype.getOrCreateFacetValueWithPath = function (path) {
        var existingFacetValue = this.findValueWithPath(path);
        if (existingFacetValue) {
            return existingFacetValue;
        }
        var newFacetValue = this.createFacetValueWithPath(path);
        var siblingValues = path.length === 1 ? this.facetValues : this.getOrCreateFacetValueWithPath(path.slice(0, -1)).children;
        siblingValues.push(newFacetValue);
        return newFacetValue;
    };
    DynamicHierarchicalFacetValues.prototype.filterHierarchyAtPathLevel = function (facetValues, path, level) {
        var _this = this;
        if (level === void 0) { level = 1; }
        var filteredFacetValues = facetValues.filter(function (facetValue) {
            var targetPath = path.slice(0, level);
            return Utils_1.Utils.arrayEqual(targetPath, facetValue.path);
        });
        filteredFacetValues.forEach(function (facetValue) {
            facetValue.state = FacetValueState_1.FacetValueState.idle;
            facetValue.children = _this.filterHierarchyAtPathLevel(facetValue.children, path, level + 1);
        });
        return filteredFacetValues;
    };
    DynamicHierarchicalFacetValues.prototype.filterHierarchyWithPath = function (path) {
        this.facetValues = this.filterHierarchyAtPathLevel(this.facetValues, path);
    };
    DynamicHierarchicalFacetValues.prototype.selectPath = function (path) {
        this.filterHierarchyWithPath(path);
        this.getOrCreateFacetValueWithPath(path).select();
        this._selectedPath = path.slice();
    };
    DynamicHierarchicalFacetValues.prototype.prependAllCategories = function () {
        var _this = this;
        var clearButton = Dom_1.$$('button', {
            className: 'coveo-dynamic-hierarchical-facet-all',
            type: 'button',
            title: this.facet.options.clearLabel
        }, this.facet.options.clearLabel);
        clearButton.toggleClass('coveo-show-when-collapsed', this.facet.values.selectedPath.length === 1);
        var arrowIcon = Dom_1.$$('div', { className: 'coveo-dynamic-hierarchical-facet-value-arrow-left' }, SVGIcons_1.SVGIcons.icons.arrowDown);
        clearButton.prepend(arrowIcon.el);
        var clear = Dom_1.$$('li', { role: 'none' }, clearButton);
        clear.on('click', function () { return _this.facet.header.options.clear(); });
        Dom_1.$$(this.list).prepend(clear.el);
    };
    DynamicHierarchicalFacetValues.prototype.buildShowLess = function () {
        var _this = this;
        var showLess = new DynamicFacetValueMoreLessButton_1.DynamicFacetValueShowMoreLessButton({
            className: 'coveo-dynamic-hierarchical-facet-show-less',
            ariaLabel: Strings_1.l('ShowLessFacetResults', this.facet.options.title),
            label: Strings_1.l('ShowLess'),
            action: function () {
                _this.facet.enableFreezeFacetOrderFlag();
                _this.facet.showLessValues();
            }
        });
        return showLess.element;
    };
    DynamicHierarchicalFacetValues.prototype.buildShowMore = function () {
        var _this = this;
        var showMore = new DynamicFacetValueMoreLessButton_1.DynamicFacetValueShowMoreLessButton({
            className: 'coveo-dynamic-hierarchical-facet-show-more',
            ariaLabel: Strings_1.l('ShowMoreFacetResults', this.facet.options.title),
            label: Strings_1.l('ShowMore'),
            action: function () {
                _this.facet.enableFreezeFacetOrderFlag();
                _this.facet.showMoreValues();
            }
        });
        return showMore.element;
    };
    Object.defineProperty(DynamicHierarchicalFacetValues.prototype, "shouldEnableShowLess", {
        get: function () {
            return this.facetValues.length > this.facet.options.numberOfValues;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(DynamicHierarchicalFacetValues.prototype, "shouldEnableShowMore", {
        get: function () {
            return this.facet.moreValuesAvailable && !this.hasSelectedValue;
        },
        enumerable: true,
        configurable: true
    });
    DynamicHierarchicalFacetValues.prototype.appendShowMoreLess = function (fragment) {
        if (!this.facet.options.enableMoreLess) {
            return;
        }
        if (this.shouldEnableShowLess) {
            fragment.appendChild(this.buildShowLess());
        }
        if (this.shouldEnableShowMore) {
            fragment.appendChild(this.buildShowMore());
        }
    };
    DynamicHierarchicalFacetValues.prototype.render = function () {
        var fragment = document.createDocumentFragment();
        Dom_1.$$(this.list).empty();
        this.facetValues.forEach(function (facetValue) {
            facetValue.render(fragment);
        });
        Dom_1.$$(this.list).toggleClass('coveo-with-space', !!this._selectedPath.length);
        this._selectedPath.length && this.prependAllCategories();
        this.appendShowMoreLess(fragment);
        this.list.appendChild(fragment);
        return this.list;
    };
    return DynamicHierarchicalFacetValues;
}());
exports.DynamicHierarchicalFacetValues = DynamicHierarchicalFacetValues;
 
 
/***/ }),
/* 407 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Globalize = __webpack_require__(28);
var FacetValueState_1 = __webpack_require__(36);
var DynamicHierarchicalFacetValueRenderer_1 = __webpack_require__(853);
var Strings_1 = __webpack_require__(4);
var DynamicFacetValueMoreLessButton_1 = __webpack_require__(399);
var AnalyticsActionListMeta_1 = __webpack_require__(7);
var DynamicHierarchicalFacetValue = /** @class */ (function () {
    function DynamicHierarchicalFacetValue(facetValue, facet) {
        this.facetValue = facetValue;
        this.facet = facet;
        this.element = null;
        this.renderer = new DynamicHierarchicalFacetValueRenderer_1.DynamicHierarchicalFacetValueRenderer(this, this.facet);
        this.retrieveCount = Math.max(this.facet.options.numberOfValues, this.facetValue.children.length);
    }
    Object.defineProperty(DynamicHierarchicalFacetValue.prototype, "value", {
        get: function () {
            return this.facetValue.value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(DynamicHierarchicalFacetValue.prototype, "path", {
        get: function () {
            return this.facetValue.path;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(DynamicHierarchicalFacetValue.prototype, "state", {
        get: function () {
            return this.facetValue.state;
        },
        set: function (state) {
            this.facetValue.state = state;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(DynamicHierarchicalFacetValue.prototype, "moreValuesAvailable", {
        get: function () {
            return this.facetValue.moreValuesAvailable;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(DynamicHierarchicalFacetValue.prototype, "numberOfResults", {
        get: function () {
            return this.facetValue.numberOfResults;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(DynamicHierarchicalFacetValue.prototype, "displayValue", {
        get: function () {
            return this.facetValue.displayValue;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(DynamicHierarchicalFacetValue.prototype, "children", {
        get: function () {
            return this.facetValue.children;
        },
        set: function (children) {
            this.facetValue.children = children;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(DynamicHierarchicalFacetValue.prototype, "isLeafValue", {
        get: function () {
            return this.facetValue.isLeafValue;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(DynamicHierarchicalFacetValue.prototype, "isIdle", {
        get: function () {
            return this.state === FacetValueState_1.FacetValueState.idle;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(DynamicHierarchicalFacetValue.prototype, "isSelected", {
        get: function () {
            return this.state === FacetValueState_1.FacetValueState.selected;
        },
        enumerable: true,
        configurable: true
    });
    DynamicHierarchicalFacetValue.prototype.select = function () {
        this.state = FacetValueState_1.FacetValueState.selected;
    };
    Object.defineProperty(DynamicHierarchicalFacetValue.prototype, "selectAriaLabel", {
        get: function () {
            var resultCount = Strings_1.l('ResultCount', this.formattedCount, this.numberOfResults);
            return this.displayValue + " " + resultCount;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(DynamicHierarchicalFacetValue.prototype, "formattedCount", {
        get: function () {
            return Globalize.format(this.numberOfResults, 'n0');
        },
        enumerable: true,
        configurable: true
    });
    DynamicHierarchicalFacetValue.prototype.buildShowLess = function () {
        var _this = this;
        var showLess = new DynamicFacetValueMoreLessButton_1.DynamicFacetValueShowMoreLessButton({
            className: 'coveo-dynamic-hierarchical-facet-show-less coveo-with-space',
            ariaLabel: Strings_1.l('ShowLessHierarchicalResults', this.displayValue),
            label: Strings_1.l('ShowLess'),
            action: function () {
                _this.facet.enableFreezeFacetOrderFlag();
                _this.retrieveCount = _this.facet.options.numberOfValues;
                _this.facet.triggerNewIsolatedQuery();
            }
        });
        return showLess.element;
    };
    DynamicHierarchicalFacetValue.prototype.buildShowMore = function () {
        var _this = this;
        var showMore = new DynamicFacetValueMoreLessButton_1.DynamicFacetValueShowMoreLessButton({
            className: 'coveo-dynamic-hierarchical-facet-show-more coveo-with-space',
            ariaLabel: Strings_1.l('ShowMoreHierarchicalResults', this.displayValue),
            label: Strings_1.l('ShowMore'),
            action: function () {
                _this.facet.enableFreezeFacetOrderFlag();
                _this.retrieveCount += _this.facet.options.numberOfValues;
                _this.facet.triggerNewIsolatedQuery();
            }
        });
        return showMore.element;
    };
    Object.defineProperty(DynamicHierarchicalFacetValue.prototype, "shouldEnableShowLess", {
        get: function () {
            return this.children.length > this.facet.options.numberOfValues;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(DynamicHierarchicalFacetValue.prototype, "shouldEnableShowMore", {
        get: function () {
            return this.moreValuesAvailable;
        },
        enumerable: true,
        configurable: true
    });
    DynamicHierarchicalFacetValue.prototype.appendShowMoreLess = function (fragment) {
        if (!this.facet.options.enableMoreLess) {
            return;
        }
        if (this.shouldEnableShowLess) {
            fragment.appendChild(this.buildShowLess());
        }
        if (this.shouldEnableShowMore) {
            fragment.appendChild(this.buildShowMore());
        }
    };
    DynamicHierarchicalFacetValue.prototype.render = function (fragment) {
        this.element = this.renderer.render();
        fragment.appendChild(this.element);
        this.children.forEach(function (facetValue) { return facetValue.render(fragment); });
        this.appendShowMoreLess(fragment);
        return this.element;
    };
    DynamicHierarchicalFacetValue.prototype.logSelectActionToAnalytics = function () {
        this.facet.logAnalyticsEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.dynamicFacetSelect);
    };
    return DynamicHierarchicalFacetValue;
}());
exports.DynamicHierarchicalFacetValue = DynamicHierarchicalFacetValue;
 
 
/***/ }),
/* 408 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
var Core_1 = __webpack_require__(9);
var GlobalExports_1 = __webpack_require__(10);
var ComponentOptions_1 = __webpack_require__(13);
var FieldValue_1 = __webpack_require__(183);
/**
 * This component renders an image from a URL retrieved in a given [`field`]{@link ImageFieldValue.options.field}.
 *
 * A typical use case of this component is to display product images in the context of commerce.
 *
 * @isresulttemplatecomponent
 * @availablesince [September 2019 Release (v2.7023)](https://docs.coveo.com/en/2990/)
 */
var ImageFieldValue = /** @class */ (function (_super) {
    __extends(ImageFieldValue, _super);
    /**
     * Creates a new ImageFieldValue.
     * @param element The HTMLElement on which to instantiate the component.
     * @param options The options for the ImageFieldValue component.
     * @param bindings The bindings that the component requires to function normally. If not set, these will be
     * automatically resolved (with a slower execution time).
     * @param result The result to associate the component with.
     */
    function ImageFieldValue(element, options, bindings, result) {
        var _this = _super.call(this, element, ImageFieldValue.ID, bindings) || this;
        _this.element = element;
        _this.options = options;
        _this.result = result;
        _this.options = ComponentOptions_1.ComponentOptions.initComponentOptions(element, ImageFieldValue, options);
        var fieldValueOption = {
            field: _this.options.field,
            helper: 'image',
            htmlValue: true,
            helperOptions: {
                height: _this.options.height,
                width: _this.options.width,
                alt: result.title,
                srcTemplate: _this.options.srcTemplate
            }
        };
        new FieldValue_1.FieldValue(element, fieldValueOption, bindings, result);
        return _this;
    }
    ImageFieldValue.ID = 'ImageFieldValue';
    ImageFieldValue.doExport = function () {
        GlobalExports_1.exportGlobally({
            ImageFieldValue: ImageFieldValue
        });
    };
    /**
     * The options for the component
     * @componentOptions
     */
    ImageFieldValue.options = {
        /**
         * **Required**. The name of a field whose value is the URL of the image to display.
         *
         * **Note:** The component uses the value of this field to set the `src` attribute of the [`img`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img) HTML tag it generates.
         */
        field: ComponentOptions_1.ComponentOptions.buildFieldOption({ required: true }),
        /**
         * The width of the image (in pixels).
         *
         * **Note:** The component uses this value to set the `width` attribute of the [`img`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img) HTML tag it generates.
         */
        width: ComponentOptions_1.ComponentOptions.buildNumberOption(),
        /**
         * The height of the image (in pixels).
         *
         * **Note:** The component uses this value to set the `height` attribute of the [`img`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img) HTML tag it generates.
         */
        height: ComponentOptions_1.ComponentOptions.buildNumberOption(),
        /**
         * A [template literal](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Template_literals)
         * from which to generate the `img` tag's `src` attribute value.
         *
         * This option overrides the [`field`]{@link ImageFieldValue.options.field} option value.
         *
         * The template literal can reference any number of fields from the parent result. It can also reference global
         * scope properties.
         *
         * **Examples:**
         *
         * - The following markup generates an `src` value such as `http://uri.com?id=itemTitle`:
         *
         * ```html
         * <a class='CoveoImageFieldValue' data-src-template='${clickUri}?id=${raw.title}'></a>
         * ```
         *
         * - The following markup generates an `src` value such as `localhost/fooBar`:
         *
         * ```html
         * <a class='CoveoImageFieldValue' data-src-template='${window.location.hostname}/{Foo.Bar}'></a>
         * ```
         *
         * Default value is `undefined`.
         */
        srcTemplate: ComponentOptions_1.ComponentOptions.buildStringOption()
    };
    return ImageFieldValue;
}(Core_1.Component));
exports.ImageFieldValue = ImageFieldValue;
Core_1.Initialization.registerAutoCreateComponent(ImageFieldValue);
 
 
/***/ }),
/* 409 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __assign = (this && this.__assign) || Object.assign || function(t) {
    for (var s, i = 1, n = arguments.length; i < n; i++) {
        s = arguments[i];
        for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
            t[p] = s[p];
    }
    return t;
};
Object.defineProperty(exports, "__esModule", { value: true });
var Dom_1 = __webpack_require__(0);
var Strings_1 = __webpack_require__(4);
var SVGIcons_1 = __webpack_require__(16);
var underscore_1 = __webpack_require__(1);
var ROOT_CLASSNAME = 'coveo-user-feedback-banner';
var CONTAINER_CLASSNAME = ROOT_CLASSNAME + "-container";
var LABEL_CLASSNAME = ROOT_CLASSNAME + "-label";
var BUTTONS_CONTAINER_CLASSNAME = ROOT_CLASSNAME + "-buttons";
var YES_BUTTON_CLASSNAME = ROOT_CLASSNAME + "-yes-button";
var NO_BUTTON_CLASSNAME = ROOT_CLASSNAME + "-no-button";
var BUTTON_ACTIVE_CLASSNAME = ROOT_CLASSNAME + "-button-active";
var THANK_YOU_BANNER_CLASSNAME = ROOT_CLASSNAME + "-thanks";
var THANK_YOU_BANNER_ACTIVE_CLASSNAME = THANK_YOU_BANNER_CLASSNAME + "-active";
var ICON_CLASSNAME = THANK_YOU_BANNER_CLASSNAME + "-icon";
var EXPLAIN_WHY_CLASSNAME = ROOT_CLASSNAME + "-explain-why";
var EXPLAIN_WHY_ACTIVE_CLASSNAME = EXPLAIN_WHY_CLASSNAME + "-active";
var UsefulState;
(function (UsefulState) {
    UsefulState[UsefulState["Unknown"] = 0] = "Unknown";
    UsefulState[UsefulState["Yes"] = 1] = "Yes";
    UsefulState[UsefulState["No"] = 2] = "No";
})(UsefulState || (UsefulState = {}));
exports.UserFeedbackBannerClassNames = {
    ROOT_CLASSNAME: ROOT_CLASSNAME,
    CONTAINER_CLASSNAME: CONTAINER_CLASSNAME,
    LABEL_CLASSNAME: LABEL_CLASSNAME,
    BUTTONS_CONTAINER_CLASSNAME: BUTTONS_CONTAINER_CLASSNAME,
    YES_BUTTON_CLASSNAME: YES_BUTTON_CLASSNAME,
    NO_BUTTON_CLASSNAME: NO_BUTTON_CLASSNAME,
    BUTTON_ACTIVE_CLASSNAME: BUTTON_ACTIVE_CLASSNAME,
    THANK_YOU_BANNER_CLASSNAME: THANK_YOU_BANNER_CLASSNAME,
    THANK_YOU_BANNER_ACTIVE_CLASSNAME: THANK_YOU_BANNER_ACTIVE_CLASSNAME,
    ICON_CLASSNAME: ICON_CLASSNAME,
    EXPLAIN_WHY_CLASSNAME: EXPLAIN_WHY_CLASSNAME,
    EXPLAIN_WHY_ACTIVE_CLASSNAME: EXPLAIN_WHY_ACTIVE_CLASSNAME
};
var UserFeedbackBanner = /** @class */ (function () {
    function UserFeedbackBanner(sendUsefulnessAnalytics, onExplainWhyPressed) {
        this.sendUsefulnessAnalytics = sendUsefulnessAnalytics;
        this.onExplainWhyPressed = onExplainWhyPressed;
        this.isUseful = UsefulState.Unknown;
        this.labelId = underscore_1.uniqueId(LABEL_CLASSNAME);
    }
    UserFeedbackBanner.prototype.build = function () {
        return Dom_1.$$('div', {
            className: ROOT_CLASSNAME,
            ariaLive: 'polite'
        }, this.buildContainer(), this.buildThankYouBanner()).el;
    };
    UserFeedbackBanner.prototype.reset = function () {
        this.isUseful = UsefulState.Unknown;
        Dom_1.$$(this.yesButton).removeClass(BUTTON_ACTIVE_CLASSNAME);
        Dom_1.$$(this.yesButton).setAttribute('aria-pressed', 'false');
        Dom_1.$$(this.noButton).removeClass(BUTTON_ACTIVE_CLASSNAME);
        Dom_1.$$(this.noButton).setAttribute('aria-pressed', 'false');
        Dom_1.$$(this.thankYouBanner).removeClass(THANK_YOU_BANNER_ACTIVE_CLASSNAME);
        Dom_1.$$(this.explainWhy).removeClass(EXPLAIN_WHY_ACTIVE_CLASSNAME);
    };
    UserFeedbackBanner.prototype.buildContainer = function () {
        return Dom_1.$$('div', {
            className: CONTAINER_CLASSNAME,
            ariaLabelledby: this.labelId
        }, this.buildLabel(), this.buildButtons()).el;
    };
    UserFeedbackBanner.prototype.buildLabel = function () {
        return Dom_1.$$('span', { className: LABEL_CLASSNAME, id: this.labelId }, Strings_1.l('UsefulnessFeedbackRequest')).el;
    };
    UserFeedbackBanner.prototype.buildThankYouBanner = function () {
        var _this = this;
        this.thankYouBanner = Dom_1.$$('div', { className: THANK_YOU_BANNER_CLASSNAME }).el;
        var text = Dom_1.$$('span', {}, Strings_1.l('UsefulnessFeedbackThankYou')).el;
        this.thankYouBanner.appendChild(text);
        this.explainWhy = this.buildButton({
            text: Strings_1.l('UsefulnessFeedbackExplainWhy'),
            className: EXPLAIN_WHY_CLASSNAME,
            action: function () { return _this.requestExplaination(); }
        });
        this.thankYouBanner.appendChild(this.explainWhy);
        return this.thankYouBanner;
    };
    UserFeedbackBanner.prototype.buildButtons = function () {
        var _this = this;
        var buttonsContainer = Dom_1.$$('div', { className: BUTTONS_CONTAINER_CLASSNAME }).el;
        this.yesButton = this.buildButton({
            text: Strings_1.l('Yes'),
            className: YES_BUTTON_CLASSNAME,
            action: function () { return _this.showThankYouBanner(true); },
            icon: {
                className: ICON_CLASSNAME,
                content: SVGIcons_1.SVGIcons.icons.checkYes
            },
            attributes: {
                ariaPressed: false,
                ariaDescribedby: this.labelId
            }
        });
        this.yesButton.setAttribute('aria-pressed', 'false');
        buttonsContainer.appendChild(this.yesButton);
        this.noButton = this.buildButton({
            text: Strings_1.l('No'),
            className: NO_BUTTON_CLASSNAME,
            action: function () { return _this.showThankYouBanner(false); },
            icon: {
                className: ICON_CLASSNAME,
                content: SVGIcons_1.SVGIcons.icons.clearSmall
            },
            attributes: {
                ariaPressed: false,
                ariaDescribedby: this.labelId
            }
        });
        buttonsContainer.appendChild(this.noButton);
        return buttonsContainer;
    };
    UserFeedbackBanner.prototype.buildButton = function (options) {
        var button = Dom_1.$$('button', __assign({}, (options.attributes || {}), { className: options.className, type: 'button' })).el;
        if (options.icon) {
            var icon = Dom_1.$$('span', { className: options.icon.className }, options.icon.content).el;
            button.appendChild(icon);
            var text = Dom_1.$$('span', {}, options.text).el;
            button.appendChild(text);
        }
        else {
            button.innerText = options.text;
        }
        button.addEventListener('click', function () { return options.action(); });
        return button;
    };
    UserFeedbackBanner.prototype.showThankYouBanner = function (isUseful) {
        if (this.isUseful !== UsefulState.Unknown && isUseful === (this.isUseful === UsefulState.Yes)) {
            return;
        }
        this.isUseful = isUseful ? UsefulState.Yes : UsefulState.No;
        Dom_1.$$(this.yesButton).toggleClass(BUTTON_ACTIVE_CLASSNAME, isUseful);
        Dom_1.$$(this.yesButton).setAttribute('aria-pressed', "" + isUseful);
        Dom_1.$$(this.noButton).toggleClass(BUTTON_ACTIVE_CLASSNAME, !isUseful);
        Dom_1.$$(this.noButton).setAttribute('aria-pressed', "" + !isUseful);
        Dom_1.$$(this.thankYouBanner).addClass(THANK_YOU_BANNER_ACTIVE_CLASSNAME);
        Dom_1.$$(this.explainWhy).toggleClass(EXPLAIN_WHY_ACTIVE_CLASSNAME, !isUseful);
        this.sendUsefulnessAnalytics(isUseful);
    };
    UserFeedbackBanner.prototype.requestExplaination = function () {
        this.onExplainWhyPressed();
    };
    return UserFeedbackBanner;
}());
exports.UserFeedbackBanner = UserFeedbackBanner;
 
 
/***/ }),
/* 410 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Dom_1 = __webpack_require__(0);
var SVGIcons_1 = __webpack_require__(16);
var Strings_1 = __webpack_require__(4);
var BASE_CLASSNAME = 'coveo-height-limiter';
var CONTAINER_ACTIVE_CLASSNAME = BASE_CLASSNAME + "-container-active";
var CONTAINER_EXPANDED_CLASSNAME = BASE_CLASSNAME + "-container-expanded";
var BUTTON_CLASSNAME = BASE_CLASSNAME + "-button";
var BUTTON_LABEL_CLASSNAME = BUTTON_CLASSNAME + "-label";
var BUTTON_ICON_CLASSNAME = BUTTON_CLASSNAME + "-icon";
var BUTTON_ACTIVE_CLASSNAME = BUTTON_CLASSNAME + "-active";
exports.HeightLimiterClassNames = {
    CONTAINER_ACTIVE_CLASSNAME: CONTAINER_ACTIVE_CLASSNAME,
    CONTAINER_EXPANDED_CLASSNAME: CONTAINER_EXPANDED_CLASSNAME,
    BUTTON_CLASSNAME: BUTTON_CLASSNAME,
    BUTTON_LABEL_CLASSNAME: BUTTON_LABEL_CLASSNAME,
    BUTTON_ICON_CLASSNAME: BUTTON_ICON_CLASSNAME,
    BUTTON_ACTIVE_CLASSNAME: BUTTON_ACTIVE_CLASSNAME
};
var HeightLimiter = /** @class */ (function () {
    function HeightLimiter(containerElement, contentElement, heightLimit, onToggle) {
        this.containerElement = containerElement;
        this.contentElement = contentElement;
        this.heightLimit = heightLimit;
        this.onToggle = onToggle;
        this.isExpanded = false;
        this.buildButton();
        this.updateActiveAppearance();
    }
    Object.defineProperty(HeightLimiter.prototype, "toggleButton", {
        get: function () {
            return this.button;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(HeightLimiter.prototype, "height", {
        set: function (height) {
            this.containerElement.style.height = height + "px";
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(HeightLimiter.prototype, "contentHeight", {
        get: function () {
            return this.contentElement.clientHeight;
        },
        enumerable: true,
        configurable: true
    });
    HeightLimiter.prototype.onContentHeightChanged = function () {
        this.updateActiveAppearance();
    };
    HeightLimiter.prototype.buildButton = function () {
        var _this = this;
        this.button = Dom_1.$$('button', { className: BUTTON_CLASSNAME, type: 'button', ariaLabel: Strings_1.l('ShowMore'), ariaPressed: 'false', ariaHidden: 'true' }, (this.buttonLabel = Dom_1.$$('span', { className: BUTTON_LABEL_CLASSNAME }).el), (this.buttonIcon = Dom_1.$$('span', { className: BUTTON_ICON_CLASSNAME }).el)).el;
        this.button.addEventListener('click', function () { return _this.toggle(); });
        this.updateButton();
        return this.button;
    };
    HeightLimiter.prototype.updateActiveAppearance = function () {
        var shouldBeActive = this.contentHeight > this.heightLimit;
        Dom_1.$$(this.containerElement).toggleClass(CONTAINER_ACTIVE_CLASSNAME, shouldBeActive);
        Dom_1.$$(this.button).toggleClass(BUTTON_ACTIVE_CLASSNAME, shouldBeActive);
        if (shouldBeActive) {
            this.updateExpandedAppearance();
        }
        else {
            this.isExpanded = false;
            this.updateExpandedAppearance();
            this.containerElement.style.height = '';
        }
    };
    HeightLimiter.prototype.updateButton = function () {
        this.buttonLabel.innerText = this.isExpanded ? Strings_1.l('ShowLess') : Strings_1.l('ShowMore');
        this.button.setAttribute('aria-pressed', "" + this.isExpanded);
        this.buttonIcon.innerHTML = this.isExpanded ? SVGIcons_1.SVGIcons.icons.arrowUp : SVGIcons_1.SVGIcons.icons.arrowDown;
    };
    HeightLimiter.prototype.updateExpandedAppearance = function () {
        this.updateButton();
        Dom_1.$$(this.containerElement).toggleClass(CONTAINER_EXPANDED_CLASSNAME, this.isExpanded);
        this.height = this.isExpanded ? this.contentHeight : this.heightLimit;
    };
    HeightLimiter.prototype.toggle = function () {
        this.isExpanded = !this.isExpanded;
        this.updateExpandedAppearance();
        Eif (this.onToggle) {
            this.onToggle(this.isExpanded);
        }
    };
    return HeightLimiter;
}());
exports.HeightLimiter = HeightLimiter;
 
 
/***/ }),
/* 411 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var AccessibleModal_1 = __webpack_require__(144);
var Strings_1 = __webpack_require__(4);
var Dom_1 = __webpack_require__(0);
var RadioButton_1 = __webpack_require__(142);
__webpack_require__(1549);
var ROOT_CLASSNAME = 'coveo-user-explanation-modal';
var CONTENT_CLASSNAME = ROOT_CLASSNAME + "-content";
var EXPLANATION_SECTION_CLASSNAME = ROOT_CLASSNAME + "-explanation-section";
var REASONS_CLASSNAME = ROOT_CLASSNAME + "-explanations";
var REASONS_LABEL_CLASSNAME = REASONS_CLASSNAME + "-label";
var DETAILS_SECTION_CLASSNAME = ROOT_CLASSNAME + "-details";
var DETAILS_TEXTAREA_CLASSNAME = DETAILS_SECTION_CLASSNAME + "-textarea";
var DETAILS_LABEL_CLASSNAME = DETAILS_SECTION_CLASSNAME + "-label";
var BUTTONS_SECTION_CLASSNAME = ROOT_CLASSNAME + "-buttons-section";
var SEND_BUTTON_CLASSNAME = ROOT_CLASSNAME + "-send-button";
var CANCEL_BUTTON_CLASSNAME = ROOT_CLASSNAME + "-cancel-button";
var DETAILS_ID = DETAILS_SECTION_CLASSNAME;
exports.ExplanationModalClassNames = {
    ROOT_CLASSNAME: ROOT_CLASSNAME,
    CONTENT_CLASSNAME: CONTENT_CLASSNAME,
    EXPLANATION_SECTION_CLASSNAME: EXPLANATION_SECTION_CLASSNAME,
    REASONS_CLASSNAME: REASONS_CLASSNAME,
    REASONS_LABEL_CLASSNAME: REASONS_LABEL_CLASSNAME,
    DETAILS_SECTION_CLASSNAME: DETAILS_SECTION_CLASSNAME,
    DETAILS_TEXTAREA_CLASSNAME: DETAILS_TEXTAREA_CLASSNAME,
    DETAILS_LABEL_CLASSNAME: DETAILS_LABEL_CLASSNAME,
    BUTTONS_SECTION_CLASSNAME: BUTTONS_SECTION_CLASSNAME,
    SEND_BUTTON_CLASSNAME: SEND_BUTTON_CLASSNAME,
    CANCEL_BUTTON_CLASSNAME: CANCEL_BUTTON_CLASSNAME
};
var ExplanationModal = /** @class */ (function () {
    function ExplanationModal(options) {
        var _this = this;
        this.options = options;
        this.shouldCallCloseEvent = false;
        this.modal = new AccessibleModal_1.AccessibleModal(ROOT_CLASSNAME, this.options.ownerElement, this.options.modalBoxModule, {
            focusOnOpen: function () { return _this.sendButton(); }
        });
    }
    ExplanationModal.prototype.sendButton = function () {
        return this.modal.element.querySelector("." + REASONS_CLASSNAME + " input");
    };
    Object.defineProperty(ExplanationModal.prototype, "details", {
        get: function () {
            if (!this.selectedReason || !this.selectedReason.hasDetails) {
                return null;
            }
            return this.detailsTextArea.value;
        },
        enumerable: true,
        configurable: true
    });
    ExplanationModal.prototype.open = function (origin) {
        var _this = this;
        this.modal.open({
            origin: origin,
            title: Dom_1.$$('span', {}, Strings_1.l('UsefulnessFeedbackExplainWhyImperative')).el,
            content: this.buildContent(),
            validation: function () {
                if (_this.shouldCallCloseEvent) {
                    _this.options.onClosed();
                    _this.shouldCallCloseEvent = false;
                }
                return true;
            }
        });
        this.shouldCallCloseEvent = true;
    };
    ExplanationModal.prototype.buildContent = function () {
        return Dom_1.$$('div', {
            className: CONTENT_CLASSNAME
        }, this.buildExplanationSection(), this.buildButtonsSection()).el;
    };
    ExplanationModal.prototype.buildExplanationSection = function () {
        var detailsSection = this.buildDetailsSection();
        return Dom_1.$$('div', {
            className: EXPLANATION_SECTION_CLASSNAME
        }, this.buildReasons(), detailsSection).el;
    };
    ExplanationModal.prototype.buildButtonsSection = function () {
        return Dom_1.$$('div', {
            className: BUTTONS_SECTION_CLASSNAME
        }, this.buildSendButton(), this.buildCancelButton());
    };
    ExplanationModal.prototype.buildReasons = function () {
        var _this = this;
        var reasonsContainer = Dom_1.$$('fieldset', { className: REASONS_CLASSNAME }, this.buildReasonsLabel()).el;
        this.reasons = this.options.reasons.map(function (reason) { return _this.buildReasonRadioButton(reason); });
        this.reasons[0].select();
        this.reasons.forEach(function (radioButton) { return reasonsContainer.appendChild(radioButton.getElement()); });
        return reasonsContainer;
    };
    ExplanationModal.prototype.buildReasonsLabel = function () {
        return Dom_1.$$('legend', { className: REASONS_LABEL_CLASSNAME }, Strings_1.l('UsefulnessFeedbackReason')).el;
    };
    ExplanationModal.prototype.buildDetailsSection = function () {
        return (this.detailsSection = Dom_1.$$('div', { className: "coveo-hidden " + DETAILS_SECTION_CLASSNAME }, Dom_1.$$('label', { className: DETAILS_LABEL_CLASSNAME, for: DETAILS_ID }, Strings_1.l('Details')).el, (this.detailsTextArea = Dom_1.$$('textarea', { className: DETAILS_TEXTAREA_CLASSNAME, id: DETAILS_ID, disabled: true })
            .el)));
    };
    ExplanationModal.prototype.buildSendButton = function () {
        var _this = this;
        var button = Dom_1.$$('button', { className: SEND_BUTTON_CLASSNAME, type: 'button' }, Strings_1.l('Send'));
        button.on('click', function () {
            _this.selectedReason.onSelect();
            _this.shouldCallCloseEvent = false;
            _this.modal.close();
        });
        return button.el;
    };
    ExplanationModal.prototype.buildCancelButton = function () {
        var _this = this;
        var button = Dom_1.$$('button', { className: CANCEL_BUTTON_CLASSNAME, type: 'button' }, Strings_1.l('Cancel'));
        button.on('click', function () { return _this.modal.close(); });
        return button.el;
    };
    ExplanationModal.prototype.buildReasonRadioButton = function (reason) {
        var _this = this;
        return new RadioButton_1.RadioButton(function (radioButton) {
            Iif (!radioButton.isSelected()) {
                return;
            }
            _this.detailsSection.toggleClass('coveo-hidden', !reason.hasDetails);
            _this.detailsTextArea.disabled = !reason.hasDetails;
            _this.selectedReason = reason;
        }, reason.label, 'reason', "coveo-reason-" + reason.id);
    };
    return ExplanationModal;
}());
exports.ExplanationModal = ExplanationModal;
 
 
/***/ }),
/* 412 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { Iif (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        Iif (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            Iif (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
            Iif (y = 0, t) op = [0, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    Eif (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        Iif (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
Object.defineProperty(exports, "__esModule", { value: true });
var Dom_1 = __webpack_require__(0);
__webpack_require__(1550);
function attachShadow(element, options) {
    return __awaiter(this, void 0, void 0, function () {
        var elementOptions, autoUpdateContainer, contentBody, onLoad, shadowRootContainer;
        return __generator(this, function (_a) {
            switch (_a.label) {
                case 0:
                    elementOptions = { className: 'coveo-shadow-iframe', scrolling: 'no', title: options.title };
                    if (!options.useIFrame) return [3 /*break*/, 2];
                    autoUpdateContainer = Dom_1.$$('iframe', elementOptions).el;
                    onLoad = new Promise(function (resolve) { return autoUpdateContainer.addEventListener('load', function () { return resolve(); }); });
                    element.appendChild(autoUpdateContainer);
                    return [4 /*yield*/, onLoad];
                case 1:
                    _a.sent();
                    contentBody = autoUpdateContainer.contentDocument.body;
                    return [3 /*break*/, 3];
                case 2:
                    autoUpdateContainer = Dom_1.$$('div', elementOptions).el;
                    contentBody = autoUpdateContainer;
                    element.appendChild(autoUpdateContainer);
                    _a.label = 3;
                case 3:
                    contentBody.style.margin = '0';
                    shadowRootContainer = Dom_1.$$('div', { style: 'overflow: auto;' }).el;
                    contentBody.appendChild(shadowRootContainer);
                    autoUpdateHeight(autoUpdateContainer, shadowRootContainer, options.onSizeChanged);
                    Eif (options.mode === 'open') {
                        Object.defineProperty(element, 'shadowRoot', { get: function () { return shadowRootContainer; } });
                    }
                    return [2 /*return*/, shadowRootContainer];
            }
        });
    });
}
exports.attachShadow = attachShadow;
function autoUpdateHeight(elementToResize, content, onUpdate) {
    var lastWidth = content.clientWidth;
    var lastHeight = content.clientHeight;
    var heightObserver = new MutationObserver(function () {
        if (lastWidth === content.clientWidth && lastHeight === content.clientHeight) {
            return;
        }
        lastWidth = content.clientWidth;
        lastHeight = content.clientHeight;
        elementToResize.style.width = content.clientWidth + "px";
        elementToResize.style.height = content.clientHeight + "px";
        if (onUpdate) {
            onUpdate();
        }
    });
    heightObserver.observe(content, {
        attributes: true,
        characterData: true,
        childList: true,
        subtree: true
    });
}
 
 
/***/ }),
/* 413 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __assign = (this && this.__assign) || Object.assign || function(t) {
    for (var s, i = 1, n = arguments.length; i < n; i++) {
        s = arguments[i];
        for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
            t[p] = s[p];
    }
    return t;
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { Iif (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        Iif (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            Iif (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
            Iif (y = 0, t) op = [0, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    Eif (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        Iif (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
Object.defineProperty(exports, "__esModule", { value: true });
var Core_1 = __webpack_require__(9);
var Combobox_1 = __webpack_require__(204);
var MockEnvironment_1 = __webpack_require__(2);
function comboboxDefaultOptions() {
    var _this = this;
    return {
        label: 'Label',
        createValuesFromResponse: jasmine.createSpy('createValuesFromResponse').and.callFake(function () { return []; }),
        requestValues: jasmine.createSpy('requestValues').and.callFake(function () { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
            switch (_a.label) {
                case 0: return [4 /*yield*/, []];
                case 1: return [2 /*return*/, _a.sent()];
            }
        }); }); }),
        onSelectValue: jasmine.createSpy('onSelectValue'),
        ariaLive: MockEnvironment_1.mockSearchInterface().ariaLive,
        scrollable: {
            requestMoreValues: jasmine.createSpy('requestMoreValues').and.callFake(function () { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0: return [4 /*yield*/, []];
                    case 1: return [2 /*return*/, _a.sent()];
                }
            }); }); }),
            areMoreValuesAvailable: function () { return true; },
            maxDropdownHeight: 100
        }
    };
}
exports.comboboxDefaultOptions = comboboxDefaultOptions;
function ComboboxTest() {
    var _this = this;
    describe('Combobox', function () {
        var combobox;
        beforeEach(function () {
            initializeComponent();
        });
        function initializeComponent(additionalOptions) {
            combobox = new Combobox_1.Combobox(__assign({}, comboboxDefaultOptions(), additionalOptions));
            spyOn(combobox.values, 'clearValues');
            spyOn(combobox, 'clearAll');
        }
        function getInput() {
            return Core_1.$$(combobox.element).find('input');
        }
        function getValues() {
            return Core_1.$$(combobox.element).find('ul');
        }
        function getWaitAnimation() {
            return Core_1.$$(combobox.element).find('.coveo-combobox-wait-animation');
        }
        describe('when initializing the combobox', function () {
            it('should render the input', function () {
                expect(getInput()).toBeTruthy();
            });
            it('should render the hidden wait animation', function () {
                expect(Core_1.$$(getWaitAnimation()).isVisible()).toBe(false);
            });
            it('should render the values', function () {
                expect(getValues()).toBeTruthy();
            });
        });
        describe('when calling onInputChange', function () {
            describe('with a value', function () {
                beforeEach(function () {
                    combobox.onInputChange('test');
                });
                it('should trigger a new request', function () {
                    expect(combobox.options.requestValues).toHaveBeenCalled();
                });
                it('should show and then hide the wait animation', function (done) {
                    expect(Core_1.$$(getWaitAnimation()).isVisible()).toBe(true);
                    setTimeout(function () {
                        expect(Core_1.$$(getWaitAnimation()).isVisible()).toBe(false);
                        done();
                    }, 100);
                });
            });
            describe('with an empty value', function () {
                beforeEach(function () {
                    combobox.onInputChange('');
                });
                it('should not trigger a new request', function () {
                    expect(combobox.options.requestValues).not.toHaveBeenCalled();
                });
                it('should clear the values', function () {
                    expect(combobox.values.clearValues).toHaveBeenCalled();
                });
            });
        });
        describe('when calling onInputChange multiple times', function () {
            beforeEach(function () {
                combobox.onInputChange('te');
                combobox.onInputChange('tes');
            });
            it("multiple times before the delay expiration\n      should not trigger more than 1 request instantly", function () {
                expect(combobox.options.requestValues).toHaveBeenCalledTimes(1);
            });
            it("multiple times before the delay expiration\n      should trigger 2 requests (leading and trailing)", function (done) {
                setTimeout(function () {
                    expect(combobox.options.requestValues).toHaveBeenCalledTimes(2);
                    done();
                }, 600);
            });
        });
        describe('when calling onScrollEndReached', function () {
            beforeEach(function () {
                spyOn(combobox.values, 'saveFocusedValue');
                spyOn(combobox.values, 'restoreFocusedValue');
                combobox.onScrollEndReached();
            });
            it('should trigger a new requestMoreValues', function () {
                expect(combobox.options.scrollable.requestMoreValues).toHaveBeenCalled();
                expect(combobox.values.saveFocusedValue).toHaveBeenCalled();
            });
            it('should call saveFocusedValue and restoreFocusedValue', function (done) { return __awaiter(_this, void 0, void 0, function () {
                return __generator(this, function (_a) {
                    expect(combobox.values.saveFocusedValue).toHaveBeenCalled();
                    setTimeout(function () {
                        expect(combobox.values.restoreFocusedValue).toHaveBeenCalled();
                        done();
                    }, 0);
                    return [2 /*return*/];
                });
            }); });
        });
        describe('when calling onScrollEndReached multiple times', function () {
            beforeEach(function () {
                combobox.onScrollEndReached();
                combobox.onScrollEndReached();
            });
            it("multiple times before the delay expiration\n      should not trigger more than 1 request instantly", function () {
                expect(combobox.options.scrollable.requestMoreValues).toHaveBeenCalledTimes(1);
            });
            it("multiple times before the delay expiration\n      should trigger 2 requests (leading and trailing)", function (done) {
                setTimeout(function () {
                    expect(combobox.options.scrollable.requestMoreValues).toHaveBeenCalledTimes(2);
                    done();
                }, 600);
            });
        });
        describe('when calling onInputBlur', function () {
            it('should clear the values by default', function () {
                combobox.onInputBlur();
                expect(combobox.values.clearValues).toHaveBeenCalled();
            });
            it("when mouse is over the values\n      should not clear the values", function () {
                combobox.values.mouseIsOverValue = true;
                combobox.onInputBlur();
                expect(combobox.values.clearValues).not.toHaveBeenCalled();
            });
            it("when new values are rendering\n      should not clear the values", function () {
                combobox.values.isRenderingNewValues = true;
                combobox.onInputBlur();
                expect(combobox.values.clearValues).not.toHaveBeenCalled();
            });
            it("when clearOnBlur option is true\n      should call the clearAll method", function () {
                initializeComponent({
                    clearOnBlur: true
                });
                combobox.onInputBlur();
                expect(combobox.clearAll).toHaveBeenCalled();
            });
        });
        describe('when calling updateAriaLive', function () {
            beforeEach(function () {
                spyOn(combobox.options.ariaLive, 'updateText');
                getInput().value = 'query';
            });
            it("when there are no results\n      should update the AriaLive component with \"No Values found.\"", function () {
                combobox.updateAriaLive();
                expect(combobox.options.ariaLive.updateText).toHaveBeenCalledWith(Core_1.l('NoValuesFound'));
            });
            it("when there are results\n      when there is no more values available\n      should update the AriaLive component with \"{X} result(s) for {query}\"", function () {
                spyOn(combobox.values, 'hasValues').and.returnValue(true);
                spyOn(combobox.options.scrollable, 'areMoreValuesAvailable').and.returnValue(false);
                combobox.updateAriaLive();
                expect(combobox.options.ariaLive.updateText).toHaveBeenCalledWith(Core_1.l('ShowingResultsWithQuery', combobox.values.numberOfValues, 'query', combobox.values.numberOfValues));
            });
            it("when there are results\n      when there are more values available\n      should update the AriaLive component with \"{X} result(s) for {query}. (more values are available)\"", function () {
                spyOn(combobox.values, 'hasValues').and.returnValue(true);
                spyOn(combobox.options.scrollable, 'areMoreValuesAvailable').and.returnValue(true);
                combobox.updateAriaLive();
                expect(combobox.options.ariaLive.updateText).toHaveBeenCalledWith(Core_1.l('ShowingResultsWithQuery', combobox.values.numberOfValues, 'query', combobox.values.numberOfValues) + " (" + Core_1.l('MoreValuesAvailable') + ")");
            });
        });
    });
}
exports.ComboboxTest = ComboboxTest;
 
 
/***/ }),
/* 414 */
/***/ (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 {
        Eif (typeof setTimeout === 'function') {
            cachedSetTimeout = setTimeout;
        } else {
            cachedSetTimeout = defaultSetTimout;
        }
    } catch (e) {
        cachedSetTimeout = defaultSetTimout;
    }
    try {
        Eif (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; };
 
 
/***/ }),
/* 415 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var _ = __webpack_require__(1);
exports.underscoreInstance = _;
setCoveoUnderscore();
function setCoveoUnderscore() {
    Iif (window['Coveo'] == undefined) {
        window['Coveo'] = {};
    }
    Iif (window['Coveo']['_'] == undefined) {
        window['Coveo']['_'] = _;
        setTemplateSettings(window['Coveo']['_']);
        exports.underscoreInstance = window['Coveo']['_'];
    }
}
function setTemplateSettings(_a) {
    var templateSettings = _a.templateSettings;
    templateSettings.evaluate = /(?:<%|{{)([\s\S]+?)(?:%>|}})/g;
    templateSettings.interpolate = /(?:<%|{{)=([\s\S]+?)(?:%>|}})/g;
    templateSettings.escape = /(?:<%|{{)-([\s\S]+?)(?:%>|}})/g;
}
var previousUnderscore = window['_'];
window['_'] = _;
// Run Underscore.js in "noConflict" mode, returning the `_` variable to its previous owner.
// Returns a reference to the Underscore object. This method was removed from the module in v1.10.0
window['_'].noConflict = function () {
    window['_'] = previousUnderscore;
    return _;
};
setTemplateSettings(window['_']);
 
 
/***/ }),
/* 416 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = isUndefined;
// Is a given variable undefined?
function isUndefined(obj) {
  return obj === void 0;
}
 
 
/***/ }),
/* 417 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = isBoolean;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__setup_js__ = __webpack_require__(30);
 
 
// Is a given value a boolean?
function isBoolean(obj) {
  return obj === true || obj === false || __WEBPACK_IMPORTED_MODULE_0__setup_js__["t" /* toString */].call(obj) === '[object Boolean]';
}
 
 
/***/ }),
/* 418 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__tagTester_js__ = __webpack_require__(46);
 
 
/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__tagTester_js__["a" /* default */])('Number'));
 
 
/***/ }),
/* 419 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__tagTester_js__ = __webpack_require__(46);
 
 
/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__tagTester_js__["a" /* default */])('Symbol'));
 
 
/***/ }),
/* 420 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__tagTester_js__ = __webpack_require__(46);
 
 
/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__tagTester_js__["a" /* default */])('ArrayBuffer'));
 
 
/***/ }),
/* 421 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = isNaN;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__setup_js__ = __webpack_require__(30);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isNumber_js__ = __webpack_require__(418);
 
 
 
// Is the given value `NaN`?
function isNaN(obj) {
  return Object(__WEBPACK_IMPORTED_MODULE_1__isNumber_js__["a" /* default */])(obj) && Object(__WEBPACK_IMPORTED_MODULE_0__setup_js__["g" /* _isNaN */])(obj);
}
 
 
/***/ }),
/* 422 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__setup_js__ = __webpack_require__(30);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isDataView_js__ = __webpack_require__(279);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__constant_js__ = __webpack_require__(423);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__isBufferLike_js__ = __webpack_require__(880);
 
 
 
 
 
// Is a given value a typed array?
var typedArrayPattern = /\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\]/;
function isTypedArray(obj) {
  // `ArrayBuffer.isView` is the most future-proof, so use it when available.
  // Otherwise, fall back on the above regular expression.
  return __WEBPACK_IMPORTED_MODULE_0__setup_js__["l" /* nativeIsView */] ? (Object(__WEBPACK_IMPORTED_MODULE_0__setup_js__["l" /* nativeIsView */])(obj) && !Object(__WEBPACK_IMPORTED_MODULE_1__isDataView_js__["a" /* default */])(obj)) :
                Object(__WEBPACK_IMPORTED_MODULE_3__isBufferLike_js__["a" /* default */])(obj) && typedArrayPattern.test(__WEBPACK_IMPORTED_MODULE_0__setup_js__["t" /* toString */].call(obj));
}
 
/* harmony default export */ __webpack_exports__["a"] = (__WEBPACK_IMPORTED_MODULE_0__setup_js__["r" /* supportsArrayBuffer */] ? isTypedArray : Object(__WEBPACK_IMPORTED_MODULE_2__constant_js__["a" /* default */])(false));
 
 
/***/ }),
/* 423 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = constant;
// Predicate-generating function. Often useful outside of Underscore.
function constant(value) {
  return function() {
    return value;
  };
}
 
 
/***/ }),
/* 424 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = createSizePropertyCheck;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__setup_js__ = __webpack_require__(30);
 
 
// Common internal logic for `isArrayLike` and `isBufferLike`.
function createSizePropertyCheck(getSizeProperty) {
  return function(collection) {
    var sizeProperty = getSizeProperty(collection);
    return typeof sizeProperty == 'number' && sizeProperty >= 0 && sizeProperty <= __WEBPACK_IMPORTED_MODULE_0__setup_js__["b" /* MAX_ARRAY_INDEX */];
  }
}
 
 
/***/ }),
/* 425 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = shallowProperty;
// Internal helper to generate a function to obtain property `key` from `obj`.
function shallowProperty(key) {
  return function(obj) {
    return obj == null ? void 0 : obj[key];
  };
}
 
 
/***/ }),
/* 426 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = collectNonEnumProps;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__setup_js__ = __webpack_require__(30);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isFunction_js__ = __webpack_require__(64);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__has_js__ = __webpack_require__(95);
 
 
 
 
// Internal helper to create a simple lookup structure.
// `collectNonEnumProps` used to depend on `_.contains`, but this led to
// circular imports. `emulatedSet` is a one-off solution that only works for
// arrays of strings.
function emulatedSet(keys) {
  var hash = {};
  for (var l = keys.length, i = 0; i < l; ++i) hash[keys[i]] = true;
  return {
    contains: function(key) { return hash[key]; },
    push: function(key) {
      hash[key] = true;
      return keys.push(key);
    }
  };
}
 
// Internal helper. Checks `keys` for the presence of keys in IE < 9 that won't
// be iterated by `for key in ...` and thus missed. Extends `keys` in place if
// needed.
function collectNonEnumProps(obj, keys) {
  keys = emulatedSet(keys);
  var nonEnumIdx = __WEBPACK_IMPORTED_MODULE_0__setup_js__["n" /* nonEnumerableProps */].length;
  var constructor = obj.constructor;
  var proto = Object(__WEBPACK_IMPORTED_MODULE_1__isFunction_js__["a" /* default */])(constructor) && constructor.prototype || __WEBPACK_IMPORTED_MODULE_0__setup_js__["c" /* ObjProto */];
 
  // Constructor is a special case.
  var prop = 'constructor';
  if (Object(__WEBPACK_IMPORTED_MODULE_2__has_js__["a" /* default */])(obj, prop) && !keys.contains(prop)) keys.push(prop);
 
  while (nonEnumIdx--) {
    prop = __WEBPACK_IMPORTED_MODULE_0__setup_js__["n" /* nonEnumerableProps */][nonEnumIdx];
    if (prop in obj && obj[prop] !== proto[prop] && !keys.contains(prop)) {
      keys.push(prop);
    }
  }
}
 
 
/***/ }),
/* 427 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = isMatch;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__keys_js__ = __webpack_require__(41);
 
 
// Returns whether an object has a given set of `key:value` pairs.
function isMatch(object, attrs) {
  var _keys = Object(__WEBPACK_IMPORTED_MODULE_0__keys_js__["a" /* default */])(attrs), length = _keys.length;
  Iif (object == null) return !length;
  var obj = Object(object);
  for (var i = 0; i < length; i++) {
    var key = _keys[i];
    if (attrs[key] !== obj[key] || !(key in obj)) return false;
  }
  return true;
}
 
 
/***/ }),
/* 428 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = invert;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__keys_js__ = __webpack_require__(41);
 
 
// Invert the keys and values of an object. The values must be serializable.
function invert(obj) {
  var result = {};
  var _keys = Object(__WEBPACK_IMPORTED_MODULE_0__keys_js__["a" /* default */])(obj);
  for (var i = 0, length = _keys.length; i < length; i++) {
    result[obj[_keys[i]]] = _keys[i];
  }
  return result;
}
 
 
/***/ }),
/* 429 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = functions;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isFunction_js__ = __webpack_require__(64);
 
 
// Return a sorted list of the function names available on the object.
function functions(obj) {
  var names = [];
  for (var key in obj) {
    if (Object(__WEBPACK_IMPORTED_MODULE_0__isFunction_js__["a" /* default */])(obj[key])) names.push(key);
  }
  return names.sort();
}
 
 
/***/ }),
/* 430 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createAssigner_js__ = __webpack_require__(283);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__allKeys_js__ = __webpack_require__(160);
 
 
 
// Extend a given object with all the properties in passed-in object(s).
/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__createAssigner_js__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__allKeys_js__["a" /* default */]));
 
 
/***/ }),
/* 431 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createAssigner_js__ = __webpack_require__(283);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__allKeys_js__ = __webpack_require__(160);
 
 
 
// Fill in a given object with default properties.
/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__createAssigner_js__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__allKeys_js__["a" /* default */], true));
 
 
/***/ }),
/* 432 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = baseCreate;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isObject_js__ = __webpack_require__(105);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__setup_js__ = __webpack_require__(30);
 
 
 
// Create a naked function reference for surrogate-prototype-swapping.
function ctor() {
  return function(){};
}
 
// An internal function for creating a new object that inherits from another.
function baseCreate(prototype) {
  if (!Object(__WEBPACK_IMPORTED_MODULE_0__isObject_js__["a" /* default */])(prototype)) return {};
  if (__WEBPACK_IMPORTED_MODULE_1__setup_js__["j" /* nativeCreate */]) return Object(__WEBPACK_IMPORTED_MODULE_1__setup_js__["j" /* nativeCreate */])(prototype);
  var Ctor = ctor();
  Ctor.prototype = prototype;
  var result = new Ctor;
  Ctor.prototype = null;
  return result;
}
 
 
/***/ }),
/* 433 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = clone;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isObject_js__ = __webpack_require__(105);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isArray_js__ = __webpack_require__(106);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__extend_js__ = __webpack_require__(430);
 
 
 
 
// Create a (shallow-cloned) duplicate of an object.
function clone(obj) {
  Iif (!Object(__WEBPACK_IMPORTED_MODULE_0__isObject_js__["a" /* default */])(obj)) return obj;
  return Object(__WEBPACK_IMPORTED_MODULE_1__isArray_js__["a" /* default */])(obj) ? obj.slice() : Object(__WEBPACK_IMPORTED_MODULE_2__extend_js__["a" /* default */])({}, obj);
}
 
 
/***/ }),
/* 434 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = get;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__toPath_js__ = __webpack_require__(161);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__deepGet_js__ = __webpack_require__(285);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isUndefined_js__ = __webpack_require__(416);
 
 
 
 
// Get the value of the (deep) property on `path` from `object`.
// If any property in `path` does not exist or if the value is
// `undefined`, return `defaultValue` instead.
// The `path` is normalized through `_.toPath`.
function get(object, path, defaultValue) {
  var value = Object(__WEBPACK_IMPORTED_MODULE_1__deepGet_js__["a" /* default */])(object, Object(__WEBPACK_IMPORTED_MODULE_0__toPath_js__["a" /* default */])(path));
  return Object(__WEBPACK_IMPORTED_MODULE_2__isUndefined_js__["a" /* default */])(value) ? defaultValue : value;
}
 
 
/***/ }),
/* 435 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = toPath;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__underscore_js__ = __webpack_require__(59);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isArray_js__ = __webpack_require__(106);
 
 
 
// Normalize a (deep) property `path` to array.
// Like `_.iteratee`, this function can be customized.
function toPath(path) {
  return Object(__WEBPACK_IMPORTED_MODULE_1__isArray_js__["a" /* default */])(path) ? path : [path];
}
__WEBPACK_IMPORTED_MODULE_0__underscore_js__["a" /* default */].toPath = toPath;
 
 
/***/ }),
/* 436 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = baseIteratee;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__identity_js__ = __webpack_require__(286);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isFunction_js__ = __webpack_require__(64);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isObject_js__ = __webpack_require__(105);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__isArray_js__ = __webpack_require__(106);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__matcher_js__ = __webpack_require__(209);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__property_js__ = __webpack_require__(287);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__optimizeCb_js__ = __webpack_require__(162);
 
 
 
 
 
 
 
 
// An internal function to generate callbacks that can be applied to each
// element in a collection, returning the desired result — either `_.identity`,
// an arbitrary callback, a property matcher, or a property accessor.
function baseIteratee(value, context, argCount) {
  Iif (value == null) return __WEBPACK_IMPORTED_MODULE_0__identity_js__["a" /* default */];
  if (Object(__WEBPACK_IMPORTED_MODULE_1__isFunction_js__["a" /* default */])(value)) return Object(__WEBPACK_IMPORTED_MODULE_6__optimizeCb_js__["a" /* default */])(value, context, argCount);
  if (Object(__WEBPACK_IMPORTED_MODULE_2__isObject_js__["a" /* default */])(value) && !Object(__WEBPACK_IMPORTED_MODULE_3__isArray_js__["a" /* default */])(value)) return Object(__WEBPACK_IMPORTED_MODULE_4__matcher_js__["a" /* default */])(value);
  return Object(__WEBPACK_IMPORTED_MODULE_5__property_js__["a" /* default */])(value);
}
 
 
/***/ }),
/* 437 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = iteratee;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__underscore_js__ = __webpack_require__(59);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseIteratee_js__ = __webpack_require__(436);
 
 
 
// External wrapper for our callback generator. Users may customize
// `_.iteratee` if they want additional predicate/iteratee shorthand styles.
// This abstraction hides the internal-only `argCount` argument.
function iteratee(value, context) {
  return Object(__WEBPACK_IMPORTED_MODULE_1__baseIteratee_js__["a" /* default */])(value, context, Infinity);
}
__WEBPACK_IMPORTED_MODULE_0__underscore_js__["a" /* default */].iteratee = iteratee;
 
 
/***/ }),
/* 438 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = noop;
// Predicate-generating function. Often useful outside of Underscore.
function noop(){}
 
 
/***/ }),
/* 439 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = random;
// Return a random integer between `min` and `max` (inclusive).
function random(min, max) {
  Iif (max == null) {
    max = min;
    min = 0;
  }
  return min + Math.floor(Math.random() * (max - min + 1));
}
 
 
/***/ }),
/* 440 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = createEscaper;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__keys_js__ = __webpack_require__(41);
 
 
// Internal helper to generate functions for escaping and unescaping strings
// to/from HTML interpolation.
function createEscaper(map) {
  var escaper = function(match) {
    return map[match];
  };
  // Regexes for identifying a key that needs to be escaped.
  var source = '(?:' + Object(__WEBPACK_IMPORTED_MODULE_0__keys_js__["a" /* default */])(map).join('|') + ')';
  var testRegexp = RegExp(source);
  var replaceRegexp = RegExp(source, 'g');
  return function(string) {
    string = string == null ? '' : '' + string;
    return testRegexp.test(string) ? string.replace(replaceRegexp, escaper) : string;
  };
}
 
 
/***/ }),
/* 441 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
// Internal list of HTML entities for escaping.
/* harmony default export */ __webpack_exports__["a"] = ({
  '&': '&amp;',
  '<': '&lt;',
  '>': '&gt;',
  '"': '&quot;',
  "'": '&#x27;',
  '`': '&#x60;'
});
 
 
/***/ }),
/* 442 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__underscore_js__ = __webpack_require__(59);
 
 
// By default, Underscore uses ERB-style template delimiters. Change the
// following template settings to use alternative delimiters.
/* harmony default export */ __webpack_exports__["a"] = (__WEBPACK_IMPORTED_MODULE_0__underscore_js__["a" /* default */].templateSettings = {
  evaluate: /<%([\s\S]+?)%>/g,
  interpolate: /<%=([\s\S]+?)%>/g,
  escape: /<%-([\s\S]+?)%>/g
});
 
 
/***/ }),
/* 443 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = executeBound;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseCreate_js__ = __webpack_require__(432);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isObject_js__ = __webpack_require__(105);
 
 
 
// Internal function to execute `sourceFunc` bound to `context` with optional
// `args`. Determines whether to execute a function as a constructor or as a
// normal function.
function executeBound(sourceFunc, boundFunc, context, callingContext, args) {
  Eif (!(callingContext instanceof boundFunc)) return sourceFunc.apply(context, args);
  var self = Object(__WEBPACK_IMPORTED_MODULE_0__baseCreate_js__["a" /* default */])(sourceFunc.prototype);
  var result = sourceFunc.apply(self, args);
  if (Object(__WEBPACK_IMPORTED_MODULE_1__isObject_js__["a" /* default */])(result)) return result;
  return self;
}
 
 
/***/ }),
/* 444 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__restArguments_js__ = __webpack_require__(58);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isFunction_js__ = __webpack_require__(64);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__executeBound_js__ = __webpack_require__(443);
 
 
 
 
// Create a function bound to a given object (assigning `this`, and arguments,
// optionally).
/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__restArguments_js__["a" /* default */])(function(func, context, args) {
  if (!Object(__WEBPACK_IMPORTED_MODULE_1__isFunction_js__["a" /* default */])(func)) throw new TypeError('Bind must be called on a function');
  var bound = Object(__WEBPACK_IMPORTED_MODULE_0__restArguments_js__["a" /* default */])(function(callArgs) {
    return Object(__WEBPACK_IMPORTED_MODULE_2__executeBound_js__["a" /* default */])(func, bound, context, this, args.concat(callArgs));
  });
  return bound;
}));
 
 
/***/ }),
/* 445 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__restArguments_js__ = __webpack_require__(58);
 
 
// Delays a function for the given number of milliseconds, and then calls
// it with the arguments supplied.
/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__restArguments_js__["a" /* default */])(function(func, wait, args) {
  return setTimeout(function() {
    return func.apply(null, args);
  }, wait);
}));
 
 
/***/ }),
/* 446 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = before;
// Returns a function that will only be executed up to (but not including) the
// Nth call.
function before(times, func) {
  var memo;
  return function() {
    if (--times > 0) {
      memo = func.apply(this, arguments);
    }
    Eif (times <= 1) func = null;
    return memo;
  };
}
 
 
/***/ }),
/* 447 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = findKey;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__cb_js__ = __webpack_require__(53);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__keys_js__ = __webpack_require__(41);
 
 
 
// Returns the first key on an object that passes a truth test.
function findKey(obj, predicate, context) {
  predicate = Object(__WEBPACK_IMPORTED_MODULE_0__cb_js__["a" /* default */])(predicate, context);
  var _keys = Object(__WEBPACK_IMPORTED_MODULE_1__keys_js__["a" /* default */])(obj), key;
  for (var i = 0, length = _keys.length; i < length; i++) {
    key = _keys[i];
    if (predicate(obj[key], key, obj)) return key;
  }
}
 
 
/***/ }),
/* 448 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = createPredicateIndexFinder;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__cb_js__ = __webpack_require__(53);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__getLength_js__ = __webpack_require__(65);
 
 
 
// Internal function to generate `_.findIndex` and `_.findLastIndex`.
function createPredicateIndexFinder(dir) {
  return function(array, predicate, context) {
    predicate = Object(__WEBPACK_IMPORTED_MODULE_0__cb_js__["a" /* default */])(predicate, context);
    var length = Object(__WEBPACK_IMPORTED_MODULE_1__getLength_js__["a" /* default */])(array);
    var index = dir > 0 ? 0 : length - 1;
    for (; index >= 0 && index < length; index += dir) {
      if (predicate(array[index], index, array)) return index;
    }
    return -1;
  };
}
 
 
/***/ }),
/* 449 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createPredicateIndexFinder_js__ = __webpack_require__(448);
 
 
// Returns the last index on an array-like that passes a truth test.
/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__createPredicateIndexFinder_js__["a" /* default */])(-1));
 
 
/***/ }),
/* 450 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = sortedIndex;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__cb_js__ = __webpack_require__(53);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__getLength_js__ = __webpack_require__(65);
 
 
 
// Use a comparator function to figure out the smallest index at which
// an object should be inserted so as to maintain order. Uses binary search.
function sortedIndex(array, obj, iteratee, context) {
  iteratee = Object(__WEBPACK_IMPORTED_MODULE_0__cb_js__["a" /* default */])(iteratee, context, 1);
  var value = iteratee(obj);
  var low = 0, high = Object(__WEBPACK_IMPORTED_MODULE_1__getLength_js__["a" /* default */])(array);
  while (low < high) {
    var mid = Math.floor((low + high) / 2);
    if (iteratee(array[mid]) < value) low = mid + 1; else high = mid;
  }
  return low;
}
 
 
/***/ }),
/* 451 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__sortedIndex_js__ = __webpack_require__(450);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__findIndex_js__ = __webpack_require__(290);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__createIndexFinder_js__ = __webpack_require__(452);
 
 
 
 
// Return the position of the first occurrence of an item in an array,
// or -1 if the item is not included in the array.
// If the array is large and already in sort order, pass `true`
// for **isSorted** to use binary search.
/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_2__createIndexFinder_js__["a" /* default */])(1, __WEBPACK_IMPORTED_MODULE_1__findIndex_js__["a" /* default */], __WEBPACK_IMPORTED_MODULE_0__sortedIndex_js__["a" /* default */]));
 
 
/***/ }),
/* 452 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = createIndexFinder;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__getLength_js__ = __webpack_require__(65);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__setup_js__ = __webpack_require__(30);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isNaN_js__ = __webpack_require__(421);
 
 
 
 
// Internal function to generate the `_.indexOf` and `_.lastIndexOf` functions.
function createIndexFinder(dir, predicateFind, sortedIndex) {
  return function(array, item, idx) {
    var i = 0, length = Object(__WEBPACK_IMPORTED_MODULE_0__getLength_js__["a" /* default */])(array);
    if (typeof idx == 'number') {
      Eif (dir > 0) {
        i = idx >= 0 ? idx : Math.max(idx + length, i);
      } else {
        length = idx >= 0 ? Math.min(idx + 1, length) : idx + length + 1;
      }
    } else Iif (sortedIndex && idx && length) {
      idx = sortedIndex(array, item);
      return array[idx] === item ? idx : -1;
    }
    Iif (item !== item) {
      idx = predicateFind(__WEBPACK_IMPORTED_MODULE_1__setup_js__["q" /* slice */].call(array, i, length), __WEBPACK_IMPORTED_MODULE_2__isNaN_js__["a" /* default */]);
      return idx >= 0 ? idx + i : -1;
    }
    for (idx = dir > 0 ? i : length - 1; idx >= 0 && idx < length; idx += dir) {
      if (array[idx] === item) return idx;
    }
    return -1;
  };
}
 
 
/***/ }),
/* 453 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = find;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isArrayLike_js__ = __webpack_require__(60);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__findIndex_js__ = __webpack_require__(290);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__findKey_js__ = __webpack_require__(447);
 
 
 
 
// Return the first value which passes a truth test.
function find(obj, predicate, context) {
  var keyFinder = Object(__WEBPACK_IMPORTED_MODULE_0__isArrayLike_js__["a" /* default */])(obj) ? __WEBPACK_IMPORTED_MODULE_1__findIndex_js__["a" /* default */] : __WEBPACK_IMPORTED_MODULE_2__findKey_js__["a" /* default */];
  var key = keyFinder(obj, predicate, context);
  if (key !== void 0 && key !== -1) return obj[key];
}
 
 
/***/ }),
/* 454 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = createReduce;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isArrayLike_js__ = __webpack_require__(60);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__keys_js__ = __webpack_require__(41);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__optimizeCb_js__ = __webpack_require__(162);
 
 
 
 
// Internal helper to create a reducing function, iterating left or right.
function createReduce(dir) {
  // Wrap code that reassigns argument variables in a separate function than
  // the one that accesses `arguments.length` to avoid a perf hit. (#1991)
  var reducer = function(obj, iteratee, memo, initial) {
    var _keys = !Object(__WEBPACK_IMPORTED_MODULE_0__isArrayLike_js__["a" /* default */])(obj) && Object(__WEBPACK_IMPORTED_MODULE_1__keys_js__["a" /* default */])(obj),
        length = (_keys || obj).length,
        index = dir > 0 ? 0 : length - 1;
    Iif (!initial) {
      memo = obj[_keys ? _keys[index] : index];
      index += dir;
    }
    for (; index >= 0 && index < length; index += dir) {
      var currentKey = _keys ? _keys[index] : index;
      memo = iteratee(memo, obj[currentKey], currentKey, obj);
    }
    return memo;
  };
 
  return function(obj, iteratee, memo, context) {
    var initial = arguments.length >= 3;
    return reducer(obj, Object(__WEBPACK_IMPORTED_MODULE_2__optimizeCb_js__["a" /* default */])(iteratee, context, 4), memo, initial);
  };
}
 
 
/***/ }),
/* 455 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = max;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isArrayLike_js__ = __webpack_require__(60);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__values_js__ = __webpack_require__(129);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__cb_js__ = __webpack_require__(53);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__each_js__ = __webpack_require__(107);
 
 
 
 
 
// Return the maximum element (or element-based computation).
function max(obj, iteratee, context) {
  var result = -Infinity, lastComputed = -Infinity,
      value, computed;
  if (iteratee == null || typeof iteratee == 'number' && typeof obj[0] != 'object' && obj != null) {
    obj = Object(__WEBPACK_IMPORTED_MODULE_0__isArrayLike_js__["a" /* default */])(obj) ? obj : Object(__WEBPACK_IMPORTED_MODULE_1__values_js__["a" /* default */])(obj);
    for (var i = 0, length = obj.length; i < length; i++) {
      value = obj[i];
      if (value != null && value > result) {
        result = value;
      }
    }
  } else {
    iteratee = Object(__WEBPACK_IMPORTED_MODULE_2__cb_js__["a" /* default */])(iteratee, context);
    Object(__WEBPACK_IMPORTED_MODULE_3__each_js__["a" /* default */])(obj, function(v, index, list) {
      computed = iteratee(v, index, list);
      if (computed > lastComputed || computed === -Infinity && result === -Infinity) {
        result = v;
        lastComputed = computed;
      }
    });
  }
  return result;
}
 
 
/***/ }),
/* 456 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = sample;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isArrayLike_js__ = __webpack_require__(60);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__clone_js__ = __webpack_require__(433);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__values_js__ = __webpack_require__(129);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__getLength_js__ = __webpack_require__(65);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__random_js__ = __webpack_require__(439);
 
 
 
 
 
 
// Sample **n** random values from a collection using the modern version of the
// [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher–Yates_shuffle).
// If **n** is not specified, returns a single random element.
// The internal `guard` argument allows it to work with `_.map`.
function sample(obj, n, guard) {
  Iif (n == null || guard) {
    if (!Object(__WEBPACK_IMPORTED_MODULE_0__isArrayLike_js__["a" /* default */])(obj)) obj = Object(__WEBPACK_IMPORTED_MODULE_2__values_js__["a" /* default */])(obj);
    return obj[Object(__WEBPACK_IMPORTED_MODULE_4__random_js__["a" /* default */])(obj.length - 1)];
  }
  var sample = Object(__WEBPACK_IMPORTED_MODULE_0__isArrayLike_js__["a" /* default */])(obj) ? Object(__WEBPACK_IMPORTED_MODULE_1__clone_js__["a" /* default */])(obj) : Object(__WEBPACK_IMPORTED_MODULE_2__values_js__["a" /* default */])(obj);
  var length = Object(__WEBPACK_IMPORTED_MODULE_3__getLength_js__["a" /* default */])(sample);
  n = Math.max(Math.min(n, length), 0);
  var last = length - 1;
  for (var index = 0; index < n; index++) {
    var rand = Object(__WEBPACK_IMPORTED_MODULE_4__random_js__["a" /* default */])(index, last);
    var temp = sample[index];
    sample[index] = sample[rand];
    sample[rand] = temp;
  }
  return sample.slice(0, n);
}
 
 
/***/ }),
/* 457 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__restArguments_js__ = __webpack_require__(58);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isFunction_js__ = __webpack_require__(64);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__optimizeCb_js__ = __webpack_require__(162);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__allKeys_js__ = __webpack_require__(160);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__keyInObj_js__ = __webpack_require__(929);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__flatten_js__ = __webpack_require__(130);
 
 
 
 
 
 
 
// Return a copy of the object only containing the allowed properties.
/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__restArguments_js__["a" /* default */])(function(obj, keys) {
  var result = {}, iteratee = keys[0];
  if (obj == null) return result;
  if (Object(__WEBPACK_IMPORTED_MODULE_1__isFunction_js__["a" /* default */])(iteratee)) {
    Eif (keys.length > 1) iteratee = Object(__WEBPACK_IMPORTED_MODULE_2__optimizeCb_js__["a" /* default */])(iteratee, keys[1]);
    keys = Object(__WEBPACK_IMPORTED_MODULE_3__allKeys_js__["a" /* default */])(obj);
  } else {
    iteratee = __WEBPACK_IMPORTED_MODULE_4__keyInObj_js__["a" /* default */];
    keys = Object(__WEBPACK_IMPORTED_MODULE_5__flatten_js__["a" /* default */])(keys, false, false);
    obj = Object(obj);
  }
  for (var i = 0, length = keys.length; i < length; i++) {
    var key = keys[i];
    var value = obj[key];
    if (iteratee(value, key, obj)) result[key] = value;
  }
  return result;
}));
 
 
/***/ }),
/* 458 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = initial;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__setup_js__ = __webpack_require__(30);
 
 
// Returns everything but the last entry of the array. Especially useful on
// the arguments object. Passing **n** will return all the values in
// the array, excluding the last N.
function initial(array, n, guard) {
  return __WEBPACK_IMPORTED_MODULE_0__setup_js__["q" /* slice */].call(array, 0, Math.max(0, array.length - (n == null || guard ? 1 : n)));
}
 
 
/***/ }),
/* 459 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = rest;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__setup_js__ = __webpack_require__(30);
 
 
// Returns everything but the first entry of the `array`. Especially useful on
// the `arguments` object. Passing an **n** will return the rest N values in the
// `array`.
function rest(array, n, guard) {
  return __WEBPACK_IMPORTED_MODULE_0__setup_js__["q" /* slice */].call(array, n == null || guard ? 1 : n);
}
 
 
/***/ }),
/* 460 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__restArguments_js__ = __webpack_require__(58);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__flatten_js__ = __webpack_require__(130);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__filter_js__ = __webpack_require__(163);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__contains_js__ = __webpack_require__(164);
 
 
 
 
 
// Take the difference between one array and a number of other arrays.
// Only the elements present in just the first array will remain.
/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__restArguments_js__["a" /* default */])(function(array, rest) {
  rest = Object(__WEBPACK_IMPORTED_MODULE_1__flatten_js__["a" /* default */])(rest, true, true);
  return Object(__WEBPACK_IMPORTED_MODULE_2__filter_js__["a" /* default */])(array, function(value){
    return !Object(__WEBPACK_IMPORTED_MODULE_3__contains_js__["a" /* default */])(rest, value);
  });
}));
 
 
/***/ }),
/* 461 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = uniq;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isBoolean_js__ = __webpack_require__(417);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__cb_js__ = __webpack_require__(53);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__getLength_js__ = __webpack_require__(65);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__contains_js__ = __webpack_require__(164);
 
 
 
 
 
// Produce a duplicate-free version of the array. If the array has already
// been sorted, you have the option of using a faster algorithm.
// The faster algorithm will not work with an iteratee if the iteratee
// is not a one-to-one function, so providing an iteratee will disable
// the faster algorithm.
function uniq(array, isSorted, iteratee, context) {
  Eif (!Object(__WEBPACK_IMPORTED_MODULE_0__isBoolean_js__["a" /* default */])(isSorted)) {
    context = iteratee;
    iteratee = isSorted;
    isSorted = false;
  }
  if (iteratee != null) iteratee = Object(__WEBPACK_IMPORTED_MODULE_1__cb_js__["a" /* default */])(iteratee, context);
  var result = [];
  var seen = [];
  for (var i = 0, length = Object(__WEBPACK_IMPORTED_MODULE_2__getLength_js__["a" /* default */])(array); i < length; i++) {
    var value = array[i],
        computed = iteratee ? iteratee(value, i, array) : value;
    Iif (isSorted && !iteratee) {
      if (!i || seen !== computed) result.push(value);
      seen = computed;
    } else if (iteratee) {
      if (!Object(__WEBPACK_IMPORTED_MODULE_3__contains_js__["a" /* default */])(seen, computed)) {
        seen.push(computed);
        result.push(value);
      }
    } else if (!Object(__WEBPACK_IMPORTED_MODULE_3__contains_js__["a" /* default */])(result, value)) {
      result.push(value);
    }
  }
  return result;
}
 
 
/***/ }),
/* 462 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = unzip;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__max_js__ = __webpack_require__(455);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__getLength_js__ = __webpack_require__(65);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__pluck_js__ = __webpack_require__(291);
 
 
 
 
// Complement of zip. Unzip accepts an array of arrays and groups
// each array's elements on shared indices.
function unzip(array) {
  var length = array && Object(__WEBPACK_IMPORTED_MODULE_0__max_js__["a" /* default */])(array, __WEBPACK_IMPORTED_MODULE_1__getLength_js__["a" /* default */]).length || 0;
  var result = Array(length);
 
  for (var index = 0; index < length; index++) {
    result[index] = Object(__WEBPACK_IMPORTED_MODULE_2__pluck_js__["a" /* default */])(array, index);
  }
  return result;
}
 
 
/***/ }),
/* 463 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = chainResult;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__underscore_js__ = __webpack_require__(59);
 
 
// Helper function to continue chaining intermediate results.
function chainResult(instance, obj) {
  return instance._chain ? Object(__WEBPACK_IMPORTED_MODULE_0__underscore_js__["a" /* default */])(obj).chain() : obj;
}
 
 
/***/ }),
/* 464 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
function __export(m) {
    for (var p in m) Eif (!exports.hasOwnProperty(p)) exports[p] = m[p];
}
Object.defineProperty(exports, "__esModule", { value: true });
var PromisesShim_1 = __webpack_require__(944);
PromisesShim_1.shim();
var CustomEventPolyfill_1 = __webpack_require__(945);
CustomEventPolyfill_1.customEventPolyfill();
// MISC
var Version_1 = __webpack_require__(292);
exports.version = Version_1.version;
var SearchEndpoint_1 = __webpack_require__(61);
exports.SearchEndpoint = SearchEndpoint_1.SearchEndpoint;
__export(__webpack_require__(39));
// Default language needs to be set after external module, since this is where l10n will be imported
var DefaultLanguage_1 = __webpack_require__(294);
DefaultLanguage_1.defaultLanguage();
var DefaultLanguage_2 = __webpack_require__(294);
exports.setLanguageAfterPageLoaded = DefaultLanguage_2.setLanguageAfterPageLoaded;
 
 
/***/ }),
/* 465 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Assert_1 = __webpack_require__(12);
var AjaxError = /** @class */ (function () {
    function AjaxError(message, status) {
        this.message = message;
        this.status = status;
        Assert_1.Assert.exists(message);
        Assert_1.Assert.exists(status);
        this.name = this.type = 'Ajax Error (status: ' + status + ')';
    }
    return AjaxError;
}());
exports.AjaxError = AjaxError;
 
 
/***/ }),
/* 466 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var MissingAuthenticationError = /** @class */ (function () {
    function MissingAuthenticationError(provider) {
        this.provider = provider;
        this.isMissingAuthentication = true;
        this.name = this.type = this.message = "Missing Authentication (provider: " + provider + ")";
    }
    return MissingAuthenticationError;
}());
exports.MissingAuthenticationError = MissingAuthenticationError;
 
 
/***/ }),
/* 467 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var history_1 = __webpack_require__(468);
__webpack_require__(949);
exports.Version = 'v15';
exports.Endpoints = {
    default: 'https://usageanalytics.coveo.com',
    production: 'https://usageanalytics.coveo.com',
    dev: 'https://usageanalyticsdev.coveo.com',
    staging: 'https://usageanalyticsstaging.coveo.com'
};
;
function defaultResponseTransformer(response) {
    return response.json().then(function (data) {
        data.raw = response;
        return data;
    });
}
var Client = (function () {
    function Client(opts) {
        if (typeof opts === 'undefined') {
            throw new Error('You have to pass options to this constructor');
        }
        this.endpoint = opts.endpoint || exports.Endpoints.default;
        this.token = opts.token;
        this.version = opts.version || exports.Version;
    }
    Client.prototype.sendEvent = function (eventType, request) {
        return fetch(this.getRestEndpoint() + "/analytics/" + eventType, {
            method: 'POST',
            headers: this.getHeaders(),
            mode: 'cors',
            body: JSON.stringify(request),
            credentials: 'include'
        });
    };
    Client.prototype.sendSearchEvent = function (request) {
        return this.sendEvent('search', request).then(defaultResponseTransformer);
    };
    Client.prototype.sendClickEvent = function (request) {
        return this.sendEvent('click', request).then(defaultResponseTransformer);
    };
    Client.prototype.sendCustomEvent = function (request) {
        return this.sendEvent('custom', request).then(defaultResponseTransformer);
    };
    Client.prototype.sendViewEvent = function (request) {
        if (request.referrer === '') {
            delete request.referrer;
        }
        var store = new history_1.HistoryStore();
        var historyElement = {
            name: 'PageView',
            value: request.contentIdValue,
            time: JSON.stringify(new Date()),
        };
        store.addElement(historyElement);
        return this.sendEvent('view', request).then(defaultResponseTransformer);
    };
    Client.prototype.getVisit = function () {
        return fetch(this.getRestEndpoint() + "/analytics/visit")
            .then(defaultResponseTransformer);
    };
    Client.prototype.getHealth = function () {
        return fetch(this.getRestEndpoint() + "/analytics/monitoring/health")
            .then(defaultResponseTransformer);
    };
    Client.prototype.getRestEndpoint = function () {
        return this.endpoint + "/rest/" + this.version;
    };
    Client.prototype.getHeaders = function () {
        var headers = {
            'Content-Type': "application/json"
        };
        if (this.token) {
            headers['Authorization'] = "Bearer " + this.token;
        }
        return headers;
    };
    return Client;
}());
exports.Client = Client;
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = Client;
 
 
/***/ }),
/* 468 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var storage_1 = __webpack_require__(293);
var detector = __webpack_require__(469);
exports.STORE_KEY = '__coveo.analytics.history';
exports.MAX_NUMBER_OF_HISTORY_ELEMENTS = 20;
exports.MIN_THRESHOLD_FOR_DUPLICATE_VALUE = 1000 * 60;
exports.MAX_VALUE_SIZE = 75;
var HistoryStore = (function () {
    function HistoryStore(store) {
        this.store = store || storage_1.getAvailableStorage();
        Iif (!(this.store instanceof storage_1.CookieStorage) && detector.hasCookieStorage()) {
            new storage_1.CookieStorage().removeItem(exports.STORE_KEY);
        }
    }
    ;
    HistoryStore.prototype.addElement = function (elem) {
        elem.internalTime = new Date().getTime();
        this.cropQueryElement(elem);
        var currentHistory = this.getHistoryWithInternalTime();
        if (currentHistory != null) {
            Eif (this.isValidEntry(elem)) {
                this.setHistory([elem].concat(currentHistory));
            }
        }
        else {
            this.setHistory([elem]);
        }
    };
    HistoryStore.prototype.getHistory = function () {
        var history = this.getHistoryWithInternalTime();
        return this.stripInternalTime(history);
    };
    HistoryStore.prototype.getHistoryWithInternalTime = function () {
        try {
            return JSON.parse(this.store.getItem(exports.STORE_KEY));
        }
        catch (e) {
            return [];
        }
    };
    HistoryStore.prototype.setHistory = function (history) {
        try {
            this.store.setItem(exports.STORE_KEY, JSON.stringify(history.slice(0, exports.MAX_NUMBER_OF_HISTORY_ELEMENTS)));
        }
        catch (e) { }
    };
    HistoryStore.prototype.clear = function () {
        try {
            this.store.removeItem(exports.STORE_KEY);
        }
        catch (e) { }
    };
    HistoryStore.prototype.getMostRecentElement = function () {
        var currentHistory = this.getHistoryWithInternalTime();
        Eif (currentHistory != null) {
            var sorted = currentHistory.sort(function (first, second) {
                if (first.internalTime == null && second.internalTime == null) {
                    return 0;
                }
                if (first.internalTime == null && second.internalTime != null) {
                    return 1;
                }
                if (first.internalTime != null && second.internalTime == null) {
                    return -1;
                }
                return second.internalTime - first.internalTime;
            });
            return sorted[0];
        }
        return null;
    };
    HistoryStore.prototype.cropQueryElement = function (elem) {
        Iif (elem.name && elem.name.toLowerCase() == 'query' && elem.value != null) {
            elem.value = elem.value.slice(0, exports.MAX_VALUE_SIZE);
        }
    };
    HistoryStore.prototype.isValidEntry = function (elem) {
        var lastEntry = this.getMostRecentElement();
        Iif (lastEntry && lastEntry.value == elem.value) {
            return elem.internalTime - lastEntry.internalTime > exports.MIN_THRESHOLD_FOR_DUPLICATE_VALUE;
        }
        return true;
    };
    HistoryStore.prototype.stripInternalTime = function (history) {
        if (history) {
            history.forEach(function (part, index, array) {
                delete part.internalTime;
            });
        }
        return history;
    };
    return HistoryStore;
}());
exports.HistoryStore = HistoryStore;
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = HistoryStore;
 
 
/***/ }),
/* 469 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
function hasLocalStorage() {
    try {
        return 'localStorage' in window && window['localStorage'] !== null;
    }
    catch (e) {
        return false;
    }
}
exports.hasLocalStorage = hasLocalStorage;
;
function hasSessionStorage() {
    try {
        return 'sessionStorage' in window && window['sessionStorage'] !== null;
    }
    catch (e) {
        return false;
    }
}
exports.hasSessionStorage = hasSessionStorage;
;
function hasCookieStorage() {
    return navigator.cookieEnabled;
}
exports.hasCookieStorage = hasCookieStorage;
;
function hasDocument() {
    return document !== null;
}
exports.hasDocument = hasDocument;
;
function hasDocumentLocation() {
    return hasDocument() && document.location !== null;
}
exports.hasDocumentLocation = hasDocumentLocation;
;
 
 
/***/ }),
/* 470 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { Iif (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        Iif (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            Iif (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
            Iif (y = 0, t) op = [0, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    Eif (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        Iif (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
Object.defineProperty(exports, "__esModule", { value: true });
var exponential_backoff_1 = __webpack_require__(954);
var backOff = exponential_backoff_1.backOff;
function setBackOffModule(newModule) {
    backOff = newModule || exponential_backoff_1.backOff;
}
exports.setBackOffModule = setBackOffModule;
var BackOffRequest = /** @class */ (function () {
    function BackOffRequest() {
    }
    BackOffRequest.enqueue = function (request) {
        return new Promise(function (resolve, reject) {
            BackOffRequest.enqueueRequest(request, resolve, reject);
            BackOffRequest.clearQueueIfNotAlready();
        });
    };
    BackOffRequest.enqueueRequest = function (request, resolve, reject) {
        var req = function () {
            return backOff(request.fn, request.options)
                .then(resolve)
                .catch(reject);
        };
        BackOffRequest.queue.push(req);
    };
    BackOffRequest.clearQueueIfNotAlready = function () {
        return __awaiter(this, void 0, void 0, function () {
            var request;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        if (BackOffRequest.clearingQueue) {
                            return [2 /*return*/];
                        }
                        BackOffRequest.clearingQueue = true;
                        _a.label = 1;
                    case 1:
                        if (!BackOffRequest.queue.length) return [3 /*break*/, 3];
                        request = BackOffRequest.queue.shift();
                        return [4 /*yield*/, request()];
                    case 2:
                        _a.sent();
                        return [3 /*break*/, 1];
                    case 3:
                        BackOffRequest.clearingQueue = false;
                        return [2 /*return*/];
                }
            });
        });
    };
    BackOffRequest.queue = [];
    BackOffRequest.clearingQueue = false;
    return BackOffRequest;
}());
exports.BackOffRequest = BackOffRequest;
 
 
/***/ }),
/* 471 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __assign = (this && this.__assign) || function () {
    __assign = Object.assign || function(t) {
        for (var s, i = 1, n = arguments.length; i < n; i++) {
            s = arguments[i];
            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
                t[p] = s[p];
        }
        return t;
    };
    return __assign.apply(this, arguments);
};
Object.defineProperty(exports, "__esModule", { value: true });
var JitterTypes;
(function (JitterTypes) {
    JitterTypes["None"] = "none";
    JitterTypes["Full"] = "full";
})(JitterTypes = exports.JitterTypes || (exports.JitterTypes = {}));
var defaultOptions = {
    delayFirstAttempt: false,
    jitter: JitterTypes.None,
    maxDelay: Infinity,
    numOfAttempts: 10,
    retry: function () { return true; },
    startingDelay: 100,
    timeMultiple: 2
};
function getSanitizedOptions(options) {
    var sanitized = __assign(__assign({}, defaultOptions), options);
    if (sanitized.numOfAttempts < 1) {
        sanitized.numOfAttempts = 1;
    }
    return sanitized;
}
exports.getSanitizedOptions = getSanitizedOptions;
//# sourceMappingURL=options.js.map
 
/***/ }),
/* 472 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var jitter_factory_1 = __webpack_require__(957);
var Delay = /** @class */ (function () {
    function Delay(options) {
        this.options = options;
        this.attempt = 0;
    }
    Delay.prototype.apply = function () {
        var _this = this;
        return new Promise(function (resolve) { return setTimeout(resolve, _this.jitteredDelay); });
    };
    Delay.prototype.setAttemptNumber = function (attempt) {
        this.attempt = attempt;
    };
    Object.defineProperty(Delay.prototype, "jitteredDelay", {
        get: function () {
            var jitter = jitter_factory_1.JitterFactory(this.options);
            return jitter(this.delay);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(Delay.prototype, "delay", {
        get: function () {
            var constant = this.options.startingDelay;
            var base = this.options.timeMultiple;
            var power = this.numOfDelayedAttempts;
            var delay = constant * Math.pow(base, power);
            return Math.min(delay, this.options.maxDelay);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(Delay.prototype, "numOfDelayedAttempts", {
        get: function () {
            return this.attempt;
        },
        enumerable: true,
        configurable: true
    });
    return Delay;
}());
exports.Delay = Delay;
//# sourceMappingURL=delay.base.js.map
 
/***/ }),
/* 473 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var EndpointCaller_1 = __webpack_require__(165);
var UrlUtils_1 = __webpack_require__(108);
var AnalyticsEndpointCaller = /** @class */ (function () {
    function AnalyticsEndpointCaller(options) {
        if (options === void 0) { options = {}; }
        this.options = options;
        this.passthrough = new EndpointCaller_1.EndpointCaller(options);
    }
    AnalyticsEndpointCaller.prototype.call = function (params) {
        if (this.shouldSendAsBeacon(params)) {
            this.sendBeacon(params);
            return;
        }
        return this.passthrough.call(params);
    };
    Object.defineProperty(AnalyticsEndpointCaller.prototype, "beaconApiIsUsable", {
        get: function () {
            return typeof navigator.sendBeacon === 'function';
        },
        enumerable: true,
        configurable: true
    });
    AnalyticsEndpointCaller.prototype.sendBeacon = function (params) {
        var queryAsString = params.queryString.concat(this.additionalQueryStringParams);
        var url = UrlUtils_1.UrlUtils.normalizeAsString({ paths: params.url, queryAsString: queryAsString });
        var data = EndpointCaller_1.EndpointCaller.convertJsonToFormBody({ clickEvent: params.requestData });
        navigator.sendBeacon(url, new Blob([data], { type: 'application/x-www-form-urlencoded' }));
    };
    Object.defineProperty(AnalyticsEndpointCaller.prototype, "additionalQueryStringParams", {
        get: function () {
            var tokenParam = this.accessTokenAsQueryString;
            return tokenParam ? [tokenParam] : [];
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(AnalyticsEndpointCaller.prototype, "accessTokenAsQueryString", {
        get: function () {
            var token = this.options.accessToken;
            return token ? "access_token=" + token : '';
        },
        enumerable: true,
        configurable: true
    });
    AnalyticsEndpointCaller.prototype.shouldSendAsBeacon = function (params) {
        return params.url.indexOf('/click') != -1 && this.beaconApiIsUsable;
    };
    return AnalyticsEndpointCaller;
}());
exports.AnalyticsEndpointCaller = AnalyticsEndpointCaller;
 
 
/***/ }),
/* 474 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var QueryController_1 = __webpack_require__(78);
exports.QueryController = QueryController_1.QueryController;
var HistoryController_1 = __webpack_require__(216);
exports.HistoryController = HistoryController_1.HistoryController;
var LocalStorageHistoryController_1 = __webpack_require__(299);
exports.LocalStorageHistoryController = LocalStorageHistoryController_1.LocalStorageHistoryController;
 
 
/***/ }),
/* 475 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var _ = __webpack_require__(1);
var ExpressionBuilder_1 = __webpack_require__(87);
var Utils_1 = __webpack_require__(5);
var QueryBuilderExpression = /** @class */ (function () {
    function QueryBuilderExpression(basicExpression, advancedExpression, constantExpression, disjunctionExpression) {
        this.basicExpression = basicExpression;
        this.advancedExpression = advancedExpression;
        this.constantExpression = constantExpression;
        this.disjunctionExpression = disjunctionExpression;
    }
    QueryBuilderExpression.isEmpty = function (queryBuilderExpression) {
        var allNonEmptyValues = _.chain(queryBuilderExpression)
            .values()
            .compact()
            .value();
        return _.isEmpty(allNonEmptyValues);
    };
    QueryBuilderExpression.prototype.reset = function () {
        this.basicExpression = '';
        this.advancedExpression = '';
        this.constantExpression = '';
        this.disjunctionExpression = '';
    };
    Object.defineProperty(QueryBuilderExpression.prototype, "withoutConstant", {
        get: function () {
            return this.expressionBuilders.withoutConstantExpression.build();
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(QueryBuilderExpression.prototype, "full", {
        get: function () {
            return ExpressionBuilder_1.ExpressionBuilder.mergeUsingOr(this.expressionBuilders.fullExpression, this.expressionBuilders.disjunctionExpression).build();
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(QueryBuilderExpression.prototype, "basic", {
        get: function () {
            return this.expressionBuilders.basicExpression.build();
        },
        set: function (value) {
            this.basicExpression = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(QueryBuilderExpression.prototype, "advanced", {
        get: function () {
            return this.expressionBuilders.advancedExpression.build();
        },
        set: function (value) {
            this.advancedExpression = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(QueryBuilderExpression.prototype, "constant", {
        get: function () {
            return this.expressionBuilders.constantExpression.build();
        },
        set: function (value) {
            this.constantExpression = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(QueryBuilderExpression.prototype, "expressionBuilders", {
        get: function () {
            var addIfNotEmpty = function (expression, value) {
                if (Utils_1.Utils.isNonEmptyString(value)) {
                    expression.add(value);
                }
            };
            var basicExpression = new ExpressionBuilder_1.ExpressionBuilder();
            addIfNotEmpty(basicExpression, this.basicExpression);
            var advancedExpression = new ExpressionBuilder_1.ExpressionBuilder();
            addIfNotEmpty(advancedExpression, this.advancedExpression);
            var constantExpression = new ExpressionBuilder_1.ExpressionBuilder();
            addIfNotEmpty(constantExpression, this.constantExpression);
            var disjunctionExpression = new ExpressionBuilder_1.ExpressionBuilder();
            addIfNotEmpty(disjunctionExpression, this.disjunctionExpression);
            var withoutConstantExpression = ExpressionBuilder_1.ExpressionBuilder.merge(basicExpression, advancedExpression);
            var fullExpression = ExpressionBuilder_1.ExpressionBuilder.merge(basicExpression, advancedExpression, constantExpression);
            return {
                basicExpression: basicExpression,
                advancedExpression: advancedExpression,
                constantExpression: constantExpression,
                disjunctionExpression: disjunctionExpression,
                withoutConstantExpression: withoutConstantExpression,
                fullExpression: fullExpression
            };
        },
        enumerable: true,
        configurable: true
    });
    return QueryBuilderExpression;
}());
exports.QueryBuilderExpression = QueryBuilderExpression;
 
 
/***/ }),
/* 476 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Model_1 = __webpack_require__(26);
exports.Model = Model_1.Model;
var QueryStateModel_1 = __webpack_require__(17);
exports.QueryStateModel = QueryStateModel_1.QueryStateModel;
var ComponentOptionsModel_1 = __webpack_require__(55);
exports.ComponentOptionsModel = ComponentOptionsModel_1.ComponentOptionsModel;
var ComponentStateModel_1 = __webpack_require__(134);
exports.ComponentStateModel = ComponentStateModel_1.ComponentStateModel;
 
 
/***/ }),
/* 477 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
function __export(m) {
    for (var p in m) Eif (!exports.hasOwnProperty(p)) exports[p] = m[p];
}
Object.defineProperty(exports, "__esModule", { value: true });
__export(__webpack_require__(38));
var IComponentOptions_1 = __webpack_require__(115);
exports.ComponentOptionsType = IComponentOptions_1.ComponentOptionsType;
var ComponentOptions_1 = __webpack_require__(13);
exports.ComponentOptions = ComponentOptions_1.ComponentOptions;
var Component_1 = __webpack_require__(6);
exports.Component = Component_1.Component;
var BaseComponent_1 = __webpack_require__(113);
exports.BaseComponent = BaseComponent_1.BaseComponent;
var RootComponent_1 = __webpack_require__(133);
exports.RootComponent = RootComponent_1.RootComponent;
var QueryBuilder_1 = __webpack_require__(24);
exports.QueryBuilder = QueryBuilder_1.QueryBuilder;
var ExpressionBuilder_1 = __webpack_require__(87);
exports.ExpressionBuilder = ExpressionBuilder_1.ExpressionBuilder;
// Export Initialization under both name, for legacy reason and old code in the wild that
// reference the old CoveoJQuery module
var Initialization_1 = __webpack_require__(8);
exports.Initialization = Initialization_1.Initialization;
var Initialization_2 = __webpack_require__(8);
exports.CoveoJQuery = Initialization_2.Initialization;
var CoveoJQuery_1 = __webpack_require__(650);
exports.initCoveoJQuery = CoveoJQuery_1.initCoveoJQuery;
var DatePicker_1 = __webpack_require__(140);
exports.DatePicker = DatePicker_1.DatePicker;
var ResponsiveComponentsManager_1 = __webpack_require__(70);
exports.ResponsiveComponentsManager = ResponsiveComponentsManager_1.ResponsiveComponentsManager;
var ResponsiveDropdown_1 = __webpack_require__(180);
exports.ResponsiveDropdown = ResponsiveDropdown_1.ResponsiveDropdown;
var ResponsiveDropdownHeader_1 = __webpack_require__(231);
exports.ResponsiveDropdownHeader = ResponsiveDropdownHeader_1.ResponsiveDropdownHeader;
var ResponsiveDropdownContent_1 = __webpack_require__(99);
exports.ResponsiveDropdownContent = ResponsiveDropdownContent_1.ResponsiveDropdownContent;
 
 
/***/ }),
/* 478 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
__webpack_require__(972);
var Dom_1 = __webpack_require__(0);
var QueryEvents_1 = __webpack_require__(14);
var QuerySummaryUtils_1 = __webpack_require__(302);
var Strings_1 = __webpack_require__(4);
var EventsModules_1 = __webpack_require__(109);
var AriaLive = /** @class */ (function () {
    function AriaLive(root) {
        this.root = root;
        this.initAriaLiveEl();
        this.appendToRoot();
        this.addQueryEventListeners();
    }
    AriaLive.prototype.updateText = function (text) {
        var liveText = text === Dom_1.$$(this.ariaLiveEl).text() ? text + "\u00A0" : text;
        Dom_1.$$(this.ariaLiveEl).text(liveText);
    };
    AriaLive.prototype.appendToRoot = function () {
        this.root.appendChild(this.ariaLiveEl);
    };
    AriaLive.prototype.initAriaLiveEl = function () {
        this.ariaLiveEl = Dom_1.$$('div', {
            'aria-live': 'polite',
            className: 'coveo-visible-to-screen-reader-only'
        }).el;
    };
    AriaLive.prototype.addQueryEventListeners = function () {
        var _this = this;
        var root = Dom_1.$$(this.root);
        root.on(QueryEvents_1.QueryEvents.duringQuery, function () { return _this.onDuringQuery(); });
        root.on(QueryEvents_1.QueryEvents.querySuccess, function (e, args) { return _this.onQuerySuccess(args); });
        root.on(QueryEvents_1.QueryEvents.queryError, function (e, args) { return _this.onQueryError(args); });
        root.on(EventsModules_1.OmniboxEvents.querySuggestRendered, function (e, args) {
            if (args.numberOfSuggestions > 0) {
                _this.onQuerySuggest(args.numberOfSuggestions);
                return;
            }
            _this.onNoQuerySuggest();
        });
    };
    AriaLive.prototype.onDuringQuery = function () {
        var message = Strings_1.l('UpdatingResults');
        this.updateText(message);
    };
    AriaLive.prototype.onQuerySuccess = function (args) {
        var message = this.messageForResultCount(args);
        this.updateText(message);
    };
    AriaLive.prototype.onQuerySuggest = function (numberOfSuggestions) {
        var message = Strings_1.l('QuerySuggestionsAvailable', numberOfSuggestions, numberOfSuggestions);
        this.updateText(message);
    };
    AriaLive.prototype.onNoQuerySuggest = function () {
        var message = Strings_1.l('QuerySuggestionsUnavailable');
        this.updateText(message);
    };
    AriaLive.prototype.messageForResultCount = function (args) {
        var hasResults = args.results.results.length;
        if (hasResults) {
            return QuerySummaryUtils_1.QuerySummaryUtils.message(this.root, args);
        }
        return this.noResultMessage(args.query.q);
    };
    AriaLive.prototype.noResultMessage = function (query) {
        var noResultsMessage = Strings_1.l('noResultFor', '${query}');
        var sanitizedQuery = escape(query);
        return QuerySummaryUtils_1.QuerySummaryUtils.replaceQueryTags(noResultsMessage, sanitizedQuery);
    };
    AriaLive.prototype.onQueryError = function (args) {
        var message = Strings_1.l('QueryException', args.error.message);
        this.updateText(message);
    };
    return AriaLive;
}());
exports.AriaLive = AriaLive;
 
 
/***/ }),
/* 479 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __assign = (this && this.__assign) || Object.assign || function(t) {
    for (var s, i = 1, n = arguments.length; i < n; i++) {
        s = arguments[i];
        for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
            t[p] = s[p];
    }
    return t;
};
Object.defineProperty(exports, "__esModule", { value: true });
var underscore_1 = __webpack_require__(1);
var Logger_1 = __webpack_require__(18);
var Utils_1 = __webpack_require__(5);
var IComponentOptions_1 = __webpack_require__(115);
var ComponentOptionLoader = /** @class */ (function () {
    function ComponentOptionLoader(element, values, optionName, optionDefinition) {
        this.element = element;
        this.values = values;
        this.optionName = optionName;
        this.optionDefinition = optionDefinition;
        this.logger = new Logger_1.Logger(this);
    }
    ComponentOptionLoader.prototype.load = function () {
        return this.findFirstValidValue(this.loadFromAttribute.bind(this), this.loadFromOptionsDictionnary.bind(this), this.loadFromDefaultValue.bind(this), this.loadFromDefaultFunction.bind(this));
    };
    ComponentOptionLoader.prototype.loadFromAttribute = function () {
        return this.optionDefinition.load ? this.optionDefinition.load(this.element, this.optionName, this.optionDefinition) : null;
    };
    ComponentOptionLoader.prototype.loadFromOptionsDictionnary = function () {
        return this.values[this.optionName];
    };
    ComponentOptionLoader.prototype.loadFromDefaultValue = function () {
        if (this.optionDefinition.type == IComponentOptions_1.ComponentOptionsType.LOCALIZED_STRING) {
            return this.loadDefaultLocalizedString();
        }
        if (Utils_1.Utils.isNullOrUndefined(this.optionDefinition.defaultValue)) {
            return null;
        }
        switch (this.optionDefinition.type) {
            case IComponentOptions_1.ComponentOptionsType.LIST:
                return this.optionDefinition.defaultValue.slice();
            case IComponentOptions_1.ComponentOptionsType.OBJECT:
                return __assign({}, this.optionDefinition.defaultValue);
            default:
                return this.optionDefinition.defaultValue;
        }
    };
    ComponentOptionLoader.prototype.loadDefaultLocalizedString = function () {
        if (!Utils_1.Utils.isNullOrUndefined(this.optionDefinition.defaultValue)) {
            return this.warnDeprecatedLocalizedStringAndReturnDefaultValue();
        }
        var isLocalizedOptionLoader = this.optionDefinition;
        return isLocalizedOptionLoader.localizedString ? isLocalizedOptionLoader.localizedString() : null;
    };
    ComponentOptionLoader.prototype.loadFromDefaultFunction = function () {
        return this.optionDefinition.defaultFunction ? this.optionDefinition.defaultFunction(this.element) : null;
    };
    ComponentOptionLoader.prototype.warnDeprecatedLocalizedStringAndReturnDefaultValue = function () {
        this.logger.warn("defaultValue for option " + this.optionName + " is deprecated. You should instead use localizedString. Not doing so could cause localization bug in your interface.");
        return this.optionDefinition.defaultValue;
    };
    ComponentOptionLoader.prototype.findFirstValidValue = function () {
        var chain = [];
        for (var _i = 0; _i < arguments.length; _i++) {
            chain[_i] = arguments[_i];
        }
        var resolvedValue = null;
        underscore_1.find(chain, function (fn) {
            resolvedValue = fn();
            return !Utils_1.Utils.isNullOrUndefined(resolvedValue);
        });
        return resolvedValue;
    };
    return ComponentOptionLoader;
}());
exports.ComponentOptionLoader = ComponentOptionLoader;
 
 
/***/ }),
/* 480 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __assign = (this && this.__assign) || Object.assign || function(t) {
    for (var s, i = 1, n = arguments.length; i < n; i++) {
        s = arguments[i];
        for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
            t[p] = s[p];
    }
    return t;
};
Object.defineProperty(exports, "__esModule", { value: true });
var Strings_1 = __webpack_require__(4);
var Utils_1 = __webpack_require__(5);
var IComponentOptions_1 = __webpack_require__(115);
var ComponentOptionsMerger = /** @class */ (function () {
    function ComponentOptionsMerger(optionDefinition, valueToMerge, optionsDictionary) {
        this.optionDefinition = optionDefinition;
        this.valueToMerge = valueToMerge;
        this.optionsDictionary = optionsDictionary;
    }
    ComponentOptionsMerger.prototype.merge = function () {
        var _a = this.valueToMerge, name = _a.name, value = _a.value;
        if (Utils_1.Utils.isNullOrUndefined(value)) {
            return;
        }
        switch (this.optionDefinition.type) {
            case IComponentOptions_1.ComponentOptionsType.OBJECT:
                var currentValue = this.optionsDictionary[name] || {};
                this.optionsDictionary[name] = __assign({}, currentValue, value);
                break;
            case IComponentOptions_1.ComponentOptionsType.LOCALIZED_STRING:
                this.optionsDictionary[name] = Strings_1.l(value);
                break;
            default:
                this.optionsDictionary[name] = value;
        }
        return this.valueToMerge;
    };
    return ComponentOptionsMerger;
}());
exports.ComponentOptionsMerger = ComponentOptionsMerger;
 
 
/***/ }),
/* 481 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var underscore_1 = __webpack_require__(1);
var Utils_1 = __webpack_require__(5);
var Logger_1 = __webpack_require__(18);
var ComponentOptionsPostProcessor = /** @class */ (function () {
    function ComponentOptionsPostProcessor(allOptionsDefinitions, optionsDictionnary, componentID) {
        this.allOptionsDefinitions = allOptionsDefinitions;
        this.optionsDictionnary = optionsDictionnary;
        this.componentID = componentID;
        this.logger = new Logger_1.Logger(this);
    }
    ComponentOptionsPostProcessor.prototype.postProcess = function () {
        var _this = this;
        underscore_1.each(this.allOptionsDefinitions, function (optionDefinition, name) {
            if (optionDefinition.required && Utils_1.Utils.isNullOrUndefined(_this.optionsDictionnary[name])) {
                _this.logger.warn("Option \"" + name + "\" is *REQUIRED* on the component \"" + _this.componentID + "\". The component or the search page might *NOT WORK PROPERLY*.");
            }
            if (optionDefinition.postProcessing) {
                _this.optionsDictionnary[name] = optionDefinition.postProcessing(_this.optionsDictionnary[name], _this.optionsDictionnary);
            }
        });
    };
    return ComponentOptionsPostProcessor;
}());
exports.ComponentOptionsPostProcessor = ComponentOptionsPostProcessor;
 
 
/***/ }),
/* 482 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Logger_1 = __webpack_require__(18);
var ComponentOptionsValidator = /** @class */ (function () {
    function ComponentOptionsValidator(optionDefinition, valueToValidate, optionsDictionnary) {
        this.optionDefinition = optionDefinition;
        this.valueToValidate = valueToValidate;
        this.optionsDictionnary = optionsDictionnary;
        this.logger = new Logger_1.Logger(this);
    }
    ComponentOptionsValidator.prototype.validate = function () {
        var _a = this.valueToValidate, name = _a.name, value = _a.value, componentID = _a.componentID;
        var isValid = this.optionDefinition.validator ? this.optionDefinition.validator(value) : true;
        if (isValid) {
            return;
        }
        this.logger.warn(componentID + " ." + name + " has invalid value: " + value);
        if (this.optionDefinition.required) {
            this.logger.error(componentID + " ." + name + " is required and has an invalid value: " + value + ". ***THIS COMPONENT WILL NOT WORK***");
        }
        delete this.optionsDictionnary[name];
    };
    return ComponentOptionsValidator;
}());
exports.ComponentOptionsValidator = ComponentOptionsValidator;
 
 
/***/ }),
/* 483 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var underscore_1 = __webpack_require__(1);
var QueryEvents_1 = __webpack_require__(14);
var ResultListEvents_1 = __webpack_require__(48);
var ComponentOptionsModel_1 = __webpack_require__(55);
var Dom_1 = __webpack_require__(0);
var Checkbox_1 = __webpack_require__(98);
var TextInput_1 = __webpack_require__(80);
var DebugHeader = /** @class */ (function () {
    function DebugHeader(debugInstance, element, onSearch, infoToDebug) {
        var _this = this;
        this.debugInstance = debugInstance;
        this.element = element;
        this.onSearch = onSearch;
        this.infoToDebug = infoToDebug;
        this.debug = false;
        this.enableQuerySyntax = false;
        this.highlightRecommendation = false;
        this.requestAllFields = false;
        this.widgets = [];
        this.widgets.push(this.buildEnabledHighlightRecommendation());
        this.widgets.push(this.buildEnableDebugCheckbox());
        this.widgets.push(this.buildEnableQuerySyntaxCheckbox());
        this.widgets.push(this.buildRequestAllFieldsCheckbox());
        this.widgets.push(this.buildSearch());
        this.moveTo(element);
        Dom_1.$$(this.root).on(ResultListEvents_1.ResultListEvents.newResultDisplayed, function (e, args) { return _this.handleNewResultDisplayed(args); });
        Dom_1.$$(this.root).on(QueryEvents_1.QueryEvents.doneBuildingQuery, function (e, args) { return _this.handleDoneBuildingQuery(args); });
    }
    DebugHeader.prototype.moveTo = function (newElement) {
        underscore_1.each(this.widgets, function (widget) { return newElement.appendChild(widget); });
        this.element = newElement;
    };
    DebugHeader.prototype.setSearch = function (onSearch) {
        this.onSearch = onSearch;
        this.resetSearchbox();
    };
    DebugHeader.prototype.setNewInfoToDebug = function (newInfoToDebug) {
        this.infoToDebug = newInfoToDebug;
    };
    DebugHeader.prototype.resetSearchbox = function () {
        Eif (this.search) {
            this.search.reset();
        }
    };
    Object.defineProperty(DebugHeader.prototype, "bindings", {
        get: function () {
            return this.debugInstance.bindings;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(DebugHeader.prototype, "root", {
        get: function () {
            return this.debugInstance.element;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(DebugHeader.prototype, "queryOptions", {
        get: function () {
            return {
                closeModalBox: false,
                origin: this.debugInstance
            };
        },
        enumerable: true,
        configurable: true
    });
    DebugHeader.prototype.handleNewResultDisplayed = function (args) {
        Eif (args.item != null && args.result.isRecommendation && this.highlightRecommendation) {
            Dom_1.$$(args.item).addClass('coveo-is-recommendation');
        }
    };
    DebugHeader.prototype.handleDoneBuildingQuery = function (args) {
        args.queryBuilder.enableDebug = this.debug || args.queryBuilder.enableDebug;
        if (this.requestAllFields) {
            args.queryBuilder.fieldsToInclude = undefined;
            args.queryBuilder.includeRequiredFields = false;
        }
    };
    DebugHeader.prototype.buildSearch = function () {
        var _this = this;
        this.search = new TextInput_1.TextInput(function (txtInputInstance) {
            var value = txtInputInstance.getValue().toLowerCase();
            _this.onSearch(value);
        }, 'Search in debug');
        this.search.build();
        return this.search.getElement();
    };
    DebugHeader.prototype.buildEnableDebugCheckbox = function () {
        var _this = this;
        var checkbox = new Checkbox_1.Checkbox(function (checkboxInstance) {
            _this.debug = checkboxInstance.isSelected();
            _this.bindings.queryController.executeQuery(_this.queryOptions);
            _this.resetSearchbox();
        }, 'Enable query debug');
        Iif (this.debug) {
            checkbox.select();
        }
        return checkbox.build();
    };
    DebugHeader.prototype.buildEnableQuerySyntaxCheckbox = function () {
        var _this = this;
        var checkbox = new Checkbox_1.Checkbox(function (checkboxInstance) {
            _this.enableQuerySyntax = checkboxInstance.isSelected();
            _this.bindings.componentOptionsModel.set(ComponentOptionsModel_1.COMPONENT_OPTIONS_ATTRIBUTES.SEARCH_BOX, {
                enableQuerySyntax: _this.enableQuerySyntax
            });
            _this.bindings.queryController.executeQuery(_this.queryOptions);
        }, 'Enable query syntax in search box');
        Iif (this.enableQuerySyntax) {
            checkbox.select();
        }
        return checkbox.build();
    };
    DebugHeader.prototype.buildRequestAllFieldsCheckbox = function () {
        var _this = this;
        var checkbox = new Checkbox_1.Checkbox(function (checkboxInstance) {
            _this.requestAllFields = checkboxInstance.isSelected();
            _this.bindings.queryController.executeQuery(_this.queryOptions);
        }, 'Request all fields available');
        Iif (this.requestAllFields) {
            checkbox.select();
        }
        return checkbox.build();
    };
    DebugHeader.prototype.buildEnabledHighlightRecommendation = function () {
        var _this = this;
        var checkbox = new Checkbox_1.Checkbox(function (checkboxInstance) {
            _this.highlightRecommendation = checkboxInstance.isSelected();
            _this.bindings.queryController.executeQuery(_this.queryOptions);
        }, 'Highlight recommendation');
        Iif (this.highlightRecommendation) {
            checkbox.select();
        }
        return checkbox.build();
    };
    return DebugHeader;
}());
exports.DebugHeader = DebugHeader;
 
 
/***/ }),
/* 484 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var StringUtils_1 = __webpack_require__(34);
var _ = __webpack_require__(1);
var DebugForResult = /** @class */ (function () {
    function DebugForResult(bindings) {
        this.bindings = bindings;
    }
    DebugForResult.prototype.generateDebugInfoForResult = function (result) {
        var _this = this;
        return {
            result: result,
            fields: function () { return _this.buildFieldsSection(result); },
            rankingInfo: function () { return _this.buildRankingInfoSection(result); }
        };
    };
    DebugForResult.prototype.fetchFields = function () {
        var _this = this;
        Eif (this.fields == null) {
            return this.bindings.queryController
                .getEndpoint()
                .listFields()
                .then(function (fields) {
                _this.fields = {};
                fields.forEach(function (field) {
                    _this.fields[field.name] = field;
                });
                return _this.fields;
            });
        }
        else {
            return Promise.resolve(this.fields);
        }
    };
    DebugForResult.prototype.buildRankingInfoSection = function (result) {
        return result.rankingInfo && this.parseRankingInfo(result.rankingInfo);
    };
    DebugForResult.prototype.parseWeights = function (value) {
        var listOfWeight = value.match(/(\w+(?:\s\w+)*): ([-0-9]+)/g);
        return _.object(_.map(listOfWeight, function (weight) {
            var weightGroup = weight.match(/^(\w+(?:\s\w+)*): ([-0-9]+)$/);
            return [weightGroup[1], Number(weightGroup[2])];
        }));
    };
    DebugForResult.prototype.buildFieldsSection = function (result) {
        return this.fetchFields().then(function (fieldDescriptions) {
            var fields = {};
            _.each(result.raw, function (value, key) {
                var fieldDescription = fieldDescriptions['@' + key];
                Iif (fieldDescription == null && key.match(/^sys/)) {
                    fieldDescription = fieldDescriptions['@' + key.substr(3)];
                }
                if (fieldDescription == null) {
                    fields['@' + key] = value;
                }
                else if (fieldDescription.fieldType == 'Date') {
                    fields['@' + key] = new Date(value);
                }
                else Eif (fieldDescription.splitGroupByField && _.isString(value)) {
                    fields['@' + key] = value.split(/\s*;\s*/);
                }
                else {
                    fields['@' + key] = value;
                }
            });
            return fields;
        });
    };
    DebugForResult.prototype.parseRankingInfo = function (value) {
        var _this = this;
        var rankingInfo = {};
        Eif (value) {
            var documentWeights = /Document weights:\n((?:.)*?)\n+/g.exec(value);
            var termsWeight = /Terms weights:\n((?:.|\n)*)\n+/g.exec(value);
            var totalWeight = /Total weight: ([0-9]+)/g.exec(value);
            if (documentWeights && documentWeights[1]) {
                rankingInfo['Document weights'] = this.parseWeights(documentWeights[1]);
            }
            if (totalWeight && totalWeight[1]) {
                rankingInfo['Total weight'] = Number(totalWeight[1]);
            }
            if (termsWeight && termsWeight[1]) {
                var terms = StringUtils_1.StringUtils.match(termsWeight[1], /((?:[^:]+: [0-9]+, [0-9]+; )+)\n((?:\w+: [0-9]+; )+)/g);
                rankingInfo['Terms weights'] = _.object(_.map(terms, function (term) {
                    var words = _.object(_.map(StringUtils_1.StringUtils.match(term[1], /([^:]+): ([0-9]+), ([0-9]+); /g), function (word) {
                        return [
                            word[1],
                            {
                                Correlation: Number(word[2]),
                                'TF-IDF': Number(word[3])
                            }
                        ];
                    }));
                    var weights = _this.parseWeights(term[2]);
                    return [
                        _.keys(words).join(', '),
                        {
                            terms: words,
                            Weights: weights
                        }
                    ];
                }));
            }
        }
        return rankingInfo;
    };
    return DebugForResult;
}());
exports.DebugForResult = DebugForResult;
 
 
/***/ }),
/* 485 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
 
var _interopRequireDefault = __webpack_require__(116);
 
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;
 
var _xregexp = _interopRequireDefault(__webpack_require__(1018));
 
var _build = _interopRequireDefault(__webpack_require__(1061));
 
var _matchrecursive = _interopRequireDefault(__webpack_require__(1062));
 
var _unicodeBase = _interopRequireDefault(__webpack_require__(1063));
 
var _unicodeBlocks = _interopRequireDefault(__webpack_require__(1064));
 
var _unicodeCategories = _interopRequireDefault(__webpack_require__(1066));
 
var _unicodeProperties = _interopRequireDefault(__webpack_require__(1068));
 
var _unicodeScripts = _interopRequireDefault(__webpack_require__(1070));
 
(0, _build.default)(_xregexp.default);
(0, _matchrecursive.default)(_xregexp.default);
(0, _unicodeBase.default)(_xregexp.default);
(0, _unicodeBlocks.default)(_xregexp.default);
(0, _unicodeCategories.default)(_xregexp.default);
(0, _unicodeProperties.default)(_xregexp.default);
(0, _unicodeScripts.default)(_xregexp.default);
var _default = _xregexp.default;
exports.default = _default;
module.exports = exports["default"];
 
/***/ }),
/* 486 */
/***/ (function(module, exports, __webpack_require__) {
 
var isObject = __webpack_require__(308);
var document = __webpack_require__(117).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) : {};
};
 
 
/***/ }),
/* 487 */
/***/ (function(module, exports) {
 
module.exports = function (bitmap, value) {
  return {
    enumerable: !(bitmap & 1),
    configurable: !(bitmap & 2),
    writable: !(bitmap & 4),
    value: value
  };
};
 
 
/***/ }),
/* 488 */
/***/ (function(module, exports, __webpack_require__) {
 
// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
var anObject = __webpack_require__(220);
var dPs = __webpack_require__(1026);
var enumBugKeys = __webpack_require__(492);
var IE_PROTO = __webpack_require__(313)('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__(486)('iframe');
  var i = enumBugKeys.length;
  var lt = '<';
  var gt = '>';
  var iframeDocument;
  iframe.style.display = 'none';
  __webpack_require__(1033).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);
};
 
 
/***/ }),
/* 489 */
/***/ (function(module, exports, __webpack_require__) {
 
var core = __webpack_require__(118);
var global = __webpack_require__(117);
var SHARED = '__core-js_shared__';
var store = global[SHARED] || (global[SHARED] = {});
 
(module.exports = function (key, value) {
  return store[key] || (store[key] = value !== undefined ? value : {});
})('versions', []).push({
  version: core.version,
  mode: __webpack_require__(490) ? 'pure' : 'global',
  copyright: '© 2019 Denis Pushkarev (zloirock.ru)'
});
 
 
/***/ }),
/* 490 */
/***/ (function(module, exports) {
 
module.exports = true;
 
 
/***/ }),
/* 491 */
/***/ (function(module, exports) {
 
var id = 0;
var px = Math.random();
module.exports = function (key) {
  return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));
};
 
 
/***/ }),
/* 492 */
/***/ (function(module, exports) {
 
// IE 8- don't enum bug keys
module.exports = (
  'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'
).split(',');
 
 
/***/ }),
/* 493 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var LIBRARY = __webpack_require__(490);
var $export = __webpack_require__(174);
var redefine = __webpack_require__(1046);
var hide = __webpack_require__(175);
var Iterators = __webpack_require__(224);
var $iterCreate = __webpack_require__(1047);
var setToStringTag = __webpack_require__(494);
var getPrototypeOf = __webpack_require__(1048);
var ITERATOR = __webpack_require__(136)('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) {
    Eif (!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 = $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
  Eif ($anyNative) {
    IteratorPrototype = getPrototypeOf($anyNative.call(new Base()));
    Eif (IteratorPrototype !== Object.prototype && IteratorPrototype.next) {
      // Set @@toStringTag to native iterators
      setToStringTag(IteratorPrototype, TAG, true);
      // fix for some old engines
      Iif (!LIBRARY && typeof IteratorPrototype[ITERATOR] != 'function') hide(IteratorPrototype, ITERATOR, returnThis);
    }
  }
  // fix Array#{values, @@iterator}.name in V8 / FF
  Iif (DEF_VALUES && $native && $native.name !== VALUES) {
    VALUES_BUG = true;
    $default = function values() { return $native.call(this); };
  }
  // Define iterator
  Iif ((!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
    };
    Iif (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;
};
 
 
/***/ }),
/* 494 */
/***/ (function(module, exports, __webpack_require__) {
 
var def = __webpack_require__(307).f;
var has = __webpack_require__(222);
var TAG = __webpack_require__(136)('toStringTag');
 
module.exports = function (it, tag, stat) {
  if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag });
};
 
 
/***/ }),
/* 495 */
/***/ (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';
 
 
/***/ }),
/* 496 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var underscore_1 = __webpack_require__(1);
var OmniboxAnalytics = /** @class */ (function () {
    function OmniboxAnalytics() {
        this.partialQueries = [];
        this.suggestions = [];
        this.analyticsLengthLimit = 256;
    }
    OmniboxAnalytics.prototype.buildCustomDataForPartialQueries = function () {
        this.partialQuery = underscore_1.last(this.partialQueries);
        return {
            partialQueries: this.cleanCustomData(this.partialQueries),
            suggestionRanking: this.suggestionRanking,
            suggestions: this.cleanCustomData(this.suggestions),
            partialQuery: this.partialQuery
        };
    };
    OmniboxAnalytics.prototype.cleanCustomData = function (toClean, rejectLength) {
        var _this = this;
        if (rejectLength === void 0) { rejectLength = this.analyticsLengthLimit; }
        var filterOutConsecutiveValues = this.filterOutConsecutiveValues(toClean);
        // Custom dimensions cannot be an array in analytics service: Send a string joined by ; instead.
        // Need to replace ;
        var redimensionedArray = filterOutConsecutiveValues.map(function (value) { return _this.removeSemicolons(value); });
        // Reduce right to get the last X words that adds to less then rejectLength
        var reducedToRejectLengthOrLess = this.reduceAnalyticsToLengthLimit(redimensionedArray, rejectLength);
        var cleanStrings = reducedToRejectLengthOrLess.reverse();
        var ret = cleanStrings.join(';');
        // analytics service can store max 256 char in a custom event
        // if we're over that, call cleanup again with an arbitrary 10 less char accepted
        if (ret.length >= this.analyticsLengthLimit) {
            return this.cleanCustomData(cleanStrings, rejectLength - 10);
        }
        return cleanStrings.join(';');
    };
    OmniboxAnalytics.prototype.filterOutConsecutiveValues = function (toClean) {
        return underscore_1.compact(underscore_1.filter(toClean, function (partial, pos, array) {
            return pos === 0 || partial !== array[pos - 1];
        }));
    };
    OmniboxAnalytics.prototype.removeSemicolons = function (partial) {
        return partial.replace(/;/g, '');
    };
    OmniboxAnalytics.prototype.reduceAnalyticsToLengthLimit = function (toClean, rejectLength) {
        var reducedToRejectLengthOrLess = [];
        underscore_1.reduceRight(toClean, function (memo, partial) {
            var totalSoFar = memo + partial.length;
            if (totalSoFar <= rejectLength) {
                reducedToRejectLengthOrLess.push(partial);
            }
            return totalSoFar;
        }, 0);
        return reducedToRejectLengthOrLess;
    };
    return OmniboxAnalytics;
}());
exports.OmniboxAnalytics = OmniboxAnalytics;
 
 
/***/ }),
/* 497 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Dom_1 = __webpack_require__(0);
var Logger_1 = __webpack_require__(18);
var QueryEvents_1 = __webpack_require__(14);
var underscore_1 = __webpack_require__(1);
var RegisteredNamedMethods_1 = __webpack_require__(38);
var FacetColumnAutoLayoutAdjustment = /** @class */ (function () {
    function FacetColumnAutoLayoutAdjustment() {
    }
    FacetColumnAutoLayoutAdjustment.isAutoLayoutAdjustable = function (component) {
        return 'isCurrentlyDisplayed' in component;
    };
    FacetColumnAutoLayoutAdjustment.initializeAutoLayoutAdjustment = function (root, component) {
        var _this = this;
        if (!this.autoLayoutAdjustmentComponent.has(root)) {
            this.autoLayoutAdjustmentComponent.set(root, []);
        }
        this.autoLayoutAdjustmentComponent.get(root).push(component);
        if (this.autoLayoutAdjustmentHandlers.has(root)) {
            return;
        }
        var hiddenClass = 'coveo-no-visible-facet';
        var handler = function () {
            return Dom_1.$$(root).on(QueryEvents_1.QueryEvents.deferredQuerySuccess, function () {
                var column = _this.findColumn(root);
                if (_this.everyStandardComponentsAreInvisible(root) && _this.columnsDoesNotContainVisibleCustomElement(column)) {
                    Dom_1.$$(root).addClass(hiddenClass);
                }
                else {
                    Dom_1.$$(root).removeClass(hiddenClass);
                }
            });
        };
        handler();
        this.autoLayoutAdjustmentHandlers.set(root, handler);
    };
    FacetColumnAutoLayoutAdjustment.columnsDoesNotContainVisibleCustomElement = function (column) {
        var _this = this;
        Iif (!column) {
            return true;
        }
        var children = Dom_1.$$(column).children();
        var shouldBeIgnored = ['coveo-facet-header-filter-by-container', 'coveo-topSpace', 'coveo-bottomSpace'];
        var columnDoesNotContainVisibleCustomElement = underscore_1.every(children, function (child) {
            var willBeIgnored = underscore_1.find(shouldBeIgnored, function (toIgnore) {
                return Dom_1.$$(child).hasClass(toIgnore);
            });
            if (willBeIgnored != null) {
                return true;
            }
            try {
                var component = RegisteredNamedMethods_1.get(child);
                Iif (component && _this.isAutoLayoutAdjustable(component)) {
                    return true;
                }
            }
            catch (e) { }
            return !Dom_1.$$(child).isVisible();
        });
        return columnDoesNotContainVisibleCustomElement;
    };
    FacetColumnAutoLayoutAdjustment.everyStandardComponentsAreInvisible = function (root) {
        var components = this.autoLayoutAdjustmentComponent.get(root);
        return underscore_1.every(components, function (component) { return !component.isCurrentlyDisplayed(); });
    };
    FacetColumnAutoLayoutAdjustment.findColumn = function (root) {
        var column = Dom_1.$$(root).find('.coveo-facet-column');
        Iif (!column) {
            var logger = new Logger_1.Logger('ResponsiveFacets');
            logger.info('No element with class coveo-facet-column. Facet column auto layout adjustment cannot be enabled');
        }
        return column;
    };
    FacetColumnAutoLayoutAdjustment.autoLayoutAdjustmentComponent = new Map();
    FacetColumnAutoLayoutAdjustment.autoLayoutAdjustmentHandlers = new Map();
    return FacetColumnAutoLayoutAdjustment;
}());
exports.FacetColumnAutoLayoutAdjustment = FacetColumnAutoLayoutAdjustment;
 
 
/***/ }),
/* 498 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var QueryStateModel_1 = __webpack_require__(17);
var ComponentsTypes_1 = __webpack_require__(69);
var FacetValueStateHandler = /** @class */ (function () {
    function FacetValueStateHandler(searchInterface) {
        this.searchInterface = searchInterface;
    }
    FacetValueStateHandler.prototype.handleFacetValueState = function (stateToSet) {
        var allFacets = ComponentsTypes_1.ComponentsTypes.getAllFacetsFromSearchInterface(this.searchInterface);
        var fvState = stateToSet.fv;
        var facetValueStateToFacetState = new FacetValueStateToFacetStateTransformer(stateToSet, fvState, allFacets);
        var facetValueStateToHiddenQuery = new FacetValueStateToHiddenQueryTransformer(stateToSet, fvState);
        var allFieldIdsInFacetValueState = Object.keys(fvState);
        var remainingFields = allFieldIdsInFacetValueState
            .filter(function (field) { return fvState[field] && fvState[field].length > 0; })
            .filter(function (field) { return !facetValueStateToFacetState.tryTransform(field, fvState[field]); });
        facetValueStateToHiddenQuery.transform(remainingFields);
    };
    return FacetValueStateHandler;
}());
exports.FacetValueStateHandler = FacetValueStateHandler;
var FacetValueStateToFacetStateTransformer = /** @class */ (function () {
    function FacetValueStateToFacetStateTransformer(queryState, facetValueState, allFacets) {
        this.queryState = queryState;
        this.facetValueState = facetValueState;
        this.allFacets = allFacets;
    }
    FacetValueStateToFacetStateTransformer.prototype.tryTransform = function (fieldId, valueInState) {
        var _this = this;
        var facetsWithField = this.allFacets.filter(function (facet) { return facet.options.field == fieldId; });
        if (facetsWithField.length > 0) {
            delete this.facetValueState[fieldId];
            facetsWithField.forEach(function (facet) { return (_this.queryState[QueryStateModel_1.QueryStateModel.getFacetId(facet.options.id)] = valueInState); });
            return true;
        }
        else {
            return false;
        }
    };
    return FacetValueStateToFacetStateTransformer;
}());
var FacetValueStateToHiddenQueryTransformer = /** @class */ (function () {
    function FacetValueStateToHiddenQueryTransformer(queryState, facetValueState) {
        this.queryState = queryState;
        this.facetValueState = facetValueState;
    }
    FacetValueStateToHiddenQueryTransformer.prototype.transform = function (fieldIds) {
        var _this = this;
        var valuesTransformedToHiddenQuery = fieldIds.map(function (fieldId) { return _this.facetValueIntoQuery(fieldId); });
        if (valuesTransformedToHiddenQuery.length > 0) {
            this.queryState[QueryStateModel_1.QueryStateModel.attributesEnum.hq] = valuesTransformedToHiddenQuery.join(' AND ');
        }
    };
    FacetValueStateToHiddenQueryTransformer.prototype.facetValueIntoQuery = function (fieldId) {
        var value = this.facetValueState[fieldId];
        delete this.facetValueState[fieldId];
        return fieldId + "==\"" + value + "\"";
    };
    return FacetValueStateToHiddenQueryTransformer;
}());
 
 
/***/ }),
/* 499 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var StorageUtils = /** @class */ (function () {
    function StorageUtils(id, storageProvider) {
        if (storageProvider === void 0) { storageProvider = 'local'; }
        this.id = id;
        // This check must be made in a try/catch. If cookies are disabled for a
        // browser then window.localStorage will throw an undefined exception.
        try {
            switch (storageProvider) {
                case 'local':
                    this.storage = window.localStorage;
                    break;
                case 'session':
                    this.storage = window.sessionStorage;
                    break;
                default:
                    this.storage = null;
            }
        }
        catch (error) {
            this.storage = null;
        }
    }
    StorageUtils.prototype.save = function (data) {
        Iif (!this.storage) {
            return;
        }
        try {
            this.storage.setItem(this.getStorageKey(), JSON.stringify(data));
        }
        catch (error) { }
    };
    StorageUtils.prototype.load = function () {
        Iif (!this.storage) {
            return null;
        }
        try {
            var value = this.storage.getItem(this.getStorageKey());
            return value && JSON.parse(value);
        }
        catch (error) {
            return null;
        }
    };
    StorageUtils.prototype.remove = function (key) {
        if (!this.storage) {
            return;
        }
        try {
            if (key == undefined) {
                this.storage.removeItem(this.getStorageKey());
            }
            else {
                var oldObj = this.load();
                delete oldObj[key];
                this.save(oldObj);
            }
        }
        catch (error) { }
    };
    StorageUtils.prototype.getStorageKey = function () {
        return 'coveo-' + this.id;
    };
    return StorageUtils;
}());
exports.StorageUtils = StorageUtils;
 
 
/***/ }),
/* 500 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Dom_1 = __webpack_require__(0);
var isAgGridLoaded = false;
var isAgGridLoading = null;
var agGridLibUrl = 'https://cdnjs.cloudflare.com/ajax/libs/ag-grid/16.0.1/ag-grid.min.noStyle.js';
var agGridStyleBaseUrl = 'https://cdnjs.cloudflare.com/ajax/libs/ag-grid/16.0.1/styles/ag-grid.css';
var agGridStyleFreshUrl = 'https://cdnjs.cloudflare.com/ajax/libs/ag-grid/16.0.1/styles/ag-theme-fresh.css';
// Should only be used for UT
exports.reset = function (doc) {
    Eif (doc === void 0) { doc = document; }
    isAgGridLoaded = false;
    isAgGridLoading = null;
};
exports.loadAgGridLibrary = function (doc) {
    if (doc === void 0) { doc = document; }
    return new Promise(function (resolve, reject) {
        if (isAgGridLoaded) {
            resolve(true);
        }
        else if (typeof agGrid !== 'undefined') {
            isAgGridLoaded = true;
            resolve(true);
        }
        else {
            addAgGridScriptsToDocument(doc);
            isAgGridLoading.then(function () { return resolve(true); });
            isAgGridLoading.catch(function () { return reject(false); });
        }
    });
};
var addAgGridScriptsToDocument = function (doc) {
    Iif (doc === void 0) { doc = document; }
    if (!isAgGridLoading) {
        var script_1 = Dom_1.$$('script', {
            src: agGridLibUrl,
            type: 'text/javascript',
            async: true
        }).el;
        var styleBase = Dom_1.$$('link', {
            href: agGridStyleBaseUrl,
            rel: 'stylesheet',
            type: 'text/css'
        }).el;
        var style = Dom_1.$$('link', {
            href: agGridStyleFreshUrl,
            rel: 'stylesheet',
            type: 'text/css'
        }).el;
        doc.head.appendChild(script_1);
        doc.head.appendChild(styleBase);
        doc.head.appendChild(style);
        isAgGridLoading = new Promise(function (resolveScriptLoaded, rejectScriptLoaded) {
            script_1.onload = function () {
                resolveScriptLoaded(true);
            };
            script_1.onerror = function () {
                isAgGridLoaded = false;
                rejectScriptLoaded(false);
            };
        });
    }
};
 
 
/***/ }),
/* 501 */
/***/ (function(module, exports, __webpack_require__) {
 
//! moment.js locale configuration
//! locale : Afrikaans [af]
//! author : Werner Mollentze : https://github.com/wernerm
 
;(function (global, factory) {
    true ? factory(__webpack_require__(3)) :
   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
   factory(global.moment)
}(this, (function (moment) { 'use strict';
 
    //! moment.js locale configuration
 
    var af = moment.defineLocale('af', {
        months: 'Januarie_Februarie_Maart_April_Mei_Junie_Julie_Augustus_September_Oktober_November_Desember'.split(
            '_'
        ),
        monthsShort: 'Jan_Feb_Mrt_Apr_Mei_Jun_Jul_Aug_Sep_Okt_Nov_Des'.split('_'),
        weekdays: 'Sondag_Maandag_Dinsdag_Woensdag_Donderdag_Vrydag_Saterdag'.split(
            '_'
        ),
        weekdaysShort: 'Son_Maa_Din_Woe_Don_Vry_Sat'.split('_'),
        weekdaysMin: 'So_Ma_Di_Wo_Do_Vr_Sa'.split('_'),
        meridiemParse: /vm|nm/i,
        isPM: function (input) {
            return /^nm$/i.test(input);
        },
        meridiem: function (hours, minutes, isLower) {
            if (hours < 12) {
                return isLower ? 'vm' : 'VM';
            } else {
                return isLower ? 'nm' : 'NM';
            }
        },
        longDateFormat: {
            LT: 'HH:mm',
            LTS: 'HH:mm:ss',
            L: 'DD/MM/YYYY',
            LL: 'D MMMM YYYY',
            LLL: 'D MMMM YYYY HH:mm',
            LLLL: 'dddd, D MMMM YYYY HH:mm',
        },
        calendar: {
            sameDay: '[Vandag om] LT',
            nextDay: '[Môre om] LT',
            nextWeek: 'dddd [om] LT',
            lastDay: '[Gister om] LT',
            lastWeek: '[Laas] dddd [om] LT',
            sameElse: 'L',
        },
        relativeTime: {
            future: 'oor %s',
            past: '%s gelede',
            s: "'n paar sekondes",
            ss: '%d sekondes',
            m: "'n minuut",
            mm: '%d minute',
            h: "'n uur",
            hh: '%d ure',
            d: "'n dag",
            dd: '%d dae',
            M: "'n maand",
            MM: '%d maande',
            y: "'n jaar",
            yy: '%d jaar',
        },
        dayOfMonthOrdinalParse: /\d{1,2}(ste|de)/,
        ordinal: function (number) {
            return (
                number +
                (number === 1 || number === 8 || number >= 20 ? 'ste' : 'de')
            ); // Thanks to Joris Röling : https://github.com/jjupiter
        },
        week: {
            dow: 1, // Maandag is die eerste dag van die week.
            doy: 4, // Die week wat die 4de Januarie bevat is die eerste week van die jaar.
        },
    });
 
    return af;
 
})));
 
 
/***/ }),
/* 502 */
/***/ (function(module, exports, __webpack_require__) {
 
//! moment.js locale configuration
//! locale : Arabic [ar]
//! author : Abdel Said: https://github.com/abdelsaid
//! author : Ahmed Elkhatib
//! author : forabi https://github.com/forabi
 
;(function (global, factory) {
    true ? factory(__webpack_require__(3)) :
   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
   factory(global.moment)
}(this, (function (moment) { 'use strict';
 
    //! moment.js locale configuration
 
    var symbolMap = {
            1: '١',
            2: '٢',
            3: '٣',
            4: '٤',
            5: '٥',
            6: '٦',
            7: '٧',
            8: '٨',
            9: '٩',
            0: '٠',
        },
        numberMap = {
            '١': '1',
            '٢': '2',
            '٣': '3',
            '٤': '4',
            '٥': '5',
            '٦': '6',
            '٧': '7',
            '٨': '8',
            '٩': '9',
            '٠': '0',
        },
        pluralForm = function (n) {
            return n === 0
                ? 0
                : n === 1
                ? 1
                : n === 2
                ? 2
                : n % 100 >= 3 && n % 100 <= 10
                ? 3
                : n % 100 >= 11
                ? 4
                : 5;
        },
        plurals = {
            s: [
                'أقل من ثانية',
                'ثانية واحدة',
                ['ثانيتان', 'ثانيتين'],
                '%d ثوان',
                '%d ثانية',
                '%d ثانية',
            ],
            m: [
                'أقل من دقيقة',
                'دقيقة واحدة',
                ['دقيقتان', 'دقيقتين'],
                '%d دقائق',
                '%d دقيقة',
                '%d دقيقة',
            ],
            h: [
                'أقل من ساعة',
                'ساعة واحدة',
                ['ساعتان', 'ساعتين'],
                '%d ساعات',
                '%d ساعة',
                '%d ساعة',
            ],
            d: [
                'أقل من يوم',
                'يوم واحد',
                ['يومان', 'يومين'],
                '%d أيام',
                '%d يومًا',
                '%d يوم',
            ],
            M: [
                'أقل من شهر',
                'شهر واحد',
                ['شهران', 'شهرين'],
                '%d أشهر',
                '%d شهرا',
                '%d شهر',
            ],
            y: [
                'أقل من عام',
                'عام واحد',
                ['عامان', 'عامين'],
                '%d أعوام',
                '%d عامًا',
                '%d عام',
            ],
        },
        pluralize = function (u) {
            return function (number, withoutSuffix, string, isFuture) {
                var f = pluralForm(number),
                    str = plurals[u][pluralForm(number)];
                if (f === 2) {
                    str = str[withoutSuffix ? 0 : 1];
                }
                return str.replace(/%d/i, number);
            };
        },
        months = [
            'يناير',
            'فبراير',
            'مارس',
            'أبريل',
            'مايو',
            'يونيو',
            'يوليو',
            'أغسطس',
            'سبتمبر',
            'أكتوبر',
            'نوفمبر',
            'ديسمبر',
        ];
 
    var ar = moment.defineLocale('ar', {
        months: months,
        monthsShort: months,
        weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
        weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),
        weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),
        weekdaysParseExact: true,
        longDateFormat: {
            LT: 'HH:mm',
            LTS: 'HH:mm:ss',
            L: 'D/\u200FM/\u200FYYYY',
            LL: 'D MMMM YYYY',
            LLL: 'D MMMM YYYY HH:mm',
            LLLL: 'dddd D MMMM YYYY HH:mm',
        },
        meridiemParse: /ص|م/,
        isPM: function (input) {
            return 'م' === input;
        },
        meridiem: function (hour, minute, isLower) {
            if (hour < 12) {
                return 'ص';
            } else {
                return 'م';
            }
        },
        calendar: {
            sameDay: '[اليوم عند الساعة] LT',
            nextDay: '[غدًا عند الساعة] LT',
            nextWeek: 'dddd [عند الساعة] LT',
            lastDay: '[أمس عند الساعة] LT',
            lastWeek: 'dddd [عند الساعة] LT',
            sameElse: 'L',
        },
        relativeTime: {
            future: 'بعد %s',
            past: 'منذ %s',
            s: pluralize('s'),
            ss: pluralize('s'),
            m: pluralize('m'),
            mm: pluralize('m'),
            h: pluralize('h'),
            hh: pluralize('h'),
            d: pluralize('d'),
            dd: pluralize('d'),
            M: pluralize('M'),
            MM: pluralize('M'),
            y: pluralize('y'),
            yy: pluralize('y'),
        },
        preparse: function (string) {
            return string
                .replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) {
                    return numberMap[match];
                })
                .replace(/،/g, ',');
        },
        postformat: function (string) {
            return string
                .replace(/\d/g, function (match) {
                    return symbolMap[match];
                })
                .replace(/,/g, '،');
        },
        week: {
            dow: 6, // Saturday is the first day of the week.
            doy: 12, // The week that contains Jan 12th is the first week of the year.
        },
    });
 
    return ar;
 
})));
 
 
/***/ }),
/* 503 */
/***/ (function(module, exports, __webpack_require__) {
 
//! moment.js locale configuration
//! locale : Arabic (Algeria) [ar-dz]
//! author : Amine Roukh: https://github.com/Amine27
//! author : Abdel Said: https://github.com/abdelsaid
//! author : Ahmed Elkhatib
//! author : forabi https://github.com/forabi
//! author : Noureddine LOUAHEDJ : https://github.com/noureddinem
 
;(function (global, factory) {
    true ? factory(__webpack_require__(3)) :
   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
   factory(global.moment)
}(this, (function (moment) { 'use strict';
 
    //! moment.js locale configuration
 
    var pluralForm = function (n) {
            return n === 0
                ? 0
                : n === 1
                ? 1
                : n === 2
                ? 2
                : n % 100 >= 3 && n % 100 <= 10
                ? 3
                : n % 100 >= 11
                ? 4
                : 5;
        },
        plurals = {
            s: [
                'أقل من ثانية',
                'ثانية واحدة',
                ['ثانيتان', 'ثانيتين'],
                '%d ثوان',
                '%d ثانية',
                '%d ثانية',
            ],
            m: [
                'أقل من دقيقة',
                'دقيقة واحدة',
                ['دقيقتان', 'دقيقتين'],
                '%d دقائق',
                '%d دقيقة',
                '%d دقيقة',
            ],
            h: [
                'أقل من ساعة',
                'ساعة واحدة',
                ['ساعتان', 'ساعتين'],
                '%d ساعات',
                '%d ساعة',
                '%d ساعة',
            ],
            d: [
                'أقل من يوم',
                'يوم واحد',
                ['يومان', 'يومين'],
                '%d أيام',
                '%d يومًا',
                '%d يوم',
            ],
            M: [
                'أقل من شهر',
                'شهر واحد',
                ['شهران', 'شهرين'],
                '%d أشهر',
                '%d شهرا',
                '%d شهر',
            ],
            y: [
                'أقل من عام',
                'عام واحد',
                ['عامان', 'عامين'],
                '%d أعوام',
                '%d عامًا',
                '%d عام',
            ],
        },
        pluralize = function (u) {
            return function (number, withoutSuffix, string, isFuture) {
                var f = pluralForm(number),
                    str = plurals[u][pluralForm(number)];
                if (f === 2) {
                    str = str[withoutSuffix ? 0 : 1];
                }
                return str.replace(/%d/i, number);
            };
        },
        months = [
            'جانفي',
            'فيفري',
            'مارس',
            'أفريل',
            'ماي',
            'جوان',
            'جويلية',
            'أوت',
            'سبتمبر',
            'أكتوبر',
            'نوفمبر',
            'ديسمبر',
        ];
 
    var arDz = moment.defineLocale('ar-dz', {
        months: months,
        monthsShort: months,
        weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
        weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),
        weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),
        weekdaysParseExact: true,
        longDateFormat: {
            LT: 'HH:mm',
            LTS: 'HH:mm:ss',
            L: 'D/\u200FM/\u200FYYYY',
            LL: 'D MMMM YYYY',
            LLL: 'D MMMM YYYY HH:mm',
            LLLL: 'dddd D MMMM YYYY HH:mm',
        },
        meridiemParse: /ص|م/,
        isPM: function (input) {
            return 'م' === input;
        },
        meridiem: function (hour, minute, isLower) {
            if (hour < 12) {
                return 'ص';
            } else {
                return 'م';
            }
        },
        calendar: {
            sameDay: '[اليوم عند الساعة] LT',
            nextDay: '[غدًا عند الساعة] LT',
            nextWeek: 'dddd [عند الساعة] LT',
            lastDay: '[أمس عند الساعة] LT',
            lastWeek: 'dddd [عند الساعة] LT',
            sameElse: 'L',
        },
        relativeTime: {
            future: 'بعد %s',
            past: 'منذ %s',
            s: pluralize('s'),
            ss: pluralize('s'),
            m: pluralize('m'),
            mm: pluralize('m'),
            h: pluralize('h'),
            hh: pluralize('h'),
            d: pluralize('d'),
            dd: pluralize('d'),
            M: pluralize('M'),
            MM: pluralize('M'),
            y: pluralize('y'),
            yy: pluralize('y'),
        },
        postformat: function (string) {
            return string.replace(/,/g, '،');
        },
        week: {
            dow: 0, // Sunday is the first day of the week.
            doy: 4, // The week that contains Jan 4th is the first week of the year.
        },
    });
 
    return arDz;
 
})));
 
 
/***/ }),
/* 504 */
/***/ (function(module, exports, __webpack_require__) {
 
//! moment.js locale configuration
//! locale : Arabic (Kuwait) [ar-kw]
//! author : Nusret Parlak: https://github.com/nusretparlak
 
;(function (global, factory) {
    true ? factory(__webpack_require__(3)) :
   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
   factory(global.moment)
}(this, (function (moment) { 'use strict';
 
    //! moment.js locale configuration
 
    var arKw = moment.defineLocale('ar-kw', {
        months: 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split(
            '_'
        ),
        monthsShort:
            'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split(
                '_'
            ),
        weekdays: 'الأحد_الإتنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
        weekdaysShort: 'احد_اتنين_ثلاثاء_اربعاء_خميس_جمعة_سبت'.split('_'),
        weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),
        weekdaysParseExact: true,
        longDateFormat: {
            LT: 'HH:mm',
            LTS: 'HH:mm:ss',
            L: 'DD/MM/YYYY',
            LL: 'D MMMM YYYY',
            LLL: 'D MMMM YYYY HH:mm',
            LLLL: 'dddd D MMMM YYYY HH:mm',
        },
        calendar: {
            sameDay: '[اليوم على الساعة] LT',
            nextDay: '[غدا على الساعة] LT',
            nextWeek: 'dddd [على الساعة] LT',
            lastDay: '[أمس على الساعة] LT',
            lastWeek: 'dddd [على الساعة] LT',
            sameElse: 'L',
        },
        relativeTime: {
            future: 'في %s',
            past: 'منذ %s',
            s: 'ثوان',
            ss: '%d ثانية',
            m: 'دقيقة',
            mm: '%d دقائق',
            h: 'ساعة',
            hh: '%d ساعات',
            d: 'يوم',
            dd: '%d أيام',
            M: 'شهر',
            MM: '%d أشهر',
            y: 'سنة',
            yy: '%d سنوات',
        },
        week: {
            dow: 0, // Sunday is the first day of the week.
            doy: 12, // The week that contains Jan 12th is the first week of the year.
        },
    });
 
    return arKw;
 
})));
 
 
/***/ }),
/* 505 */
/***/ (function(module, exports, __webpack_require__) {
 
//! moment.js locale configuration
//! locale : Arabic (Libya) [ar-ly]
//! author : Ali Hmer: https://github.com/kikoanis
 
;(function (global, factory) {
    true ? factory(__webpack_require__(3)) :
   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
   factory(global.moment)
}(this, (function (moment) { 'use strict';
 
    //! moment.js locale configuration
 
    var symbolMap = {
            1: '1',
            2: '2',
            3: '3',
            4: '4',
            5: '5',
            6: '6',
            7: '7',
            8: '8',
            9: '9',
            0: '0',
        },
        pluralForm = function (n) {
            return n === 0
                ? 0
                : n === 1
                ? 1
                : n === 2
                ? 2
                : n % 100 >= 3 && n % 100 <= 10
                ? 3
                : n % 100 >= 11
                ? 4
                : 5;
        },
        plurals = {
            s: [
                'أقل من ثانية',
                'ثانية واحدة',
                ['ثانيتان', 'ثانيتين'],
                '%d ثوان',
                '%d ثانية',
                '%d ثانية',
            ],
            m: [
                'أقل من دقيقة',
                'دقيقة واحدة',
                ['دقيقتان', 'دقيقتين'],
                '%d دقائق',
                '%d دقيقة',
                '%d دقيقة',
            ],
            h: [
                'أقل من ساعة',
                'ساعة واحدة',
                ['ساعتان', 'ساعتين'],
                '%d ساعات',
                '%d ساعة',
                '%d ساعة',
            ],
            d: [
                'أقل من يوم',
                'يوم واحد',
                ['يومان', 'يومين'],
                '%d أيام',
                '%d يومًا',
                '%d يوم',
            ],
            M: [
                'أقل من شهر',
                'شهر واحد',
                ['شهران', 'شهرين'],
                '%d أشهر',
                '%d شهرا',
                '%d شهر',
            ],
            y: [
                'أقل من عام',
                'عام واحد',
                ['عامان', 'عامين'],
                '%d أعوام',
                '%d عامًا',
                '%d عام',
            ],
        },
        pluralize = function (u) {
            return function (number, withoutSuffix, string, isFuture) {
                var f = pluralForm(number),
                    str = plurals[u][pluralForm(number)];
                if (f === 2) {
                    str = str[withoutSuffix ? 0 : 1];
                }
                return str.replace(/%d/i, number);
            };
        },
        months = [
            'يناير',
            'فبراير',
            'مارس',
            'أبريل',
            'مايو',
            'يونيو',
            'يوليو',
            'أغسطس',
            'سبتمبر',
            'أكتوبر',
            'نوفمبر',
            'ديسمبر',
        ];
 
    var arLy = moment.defineLocale('ar-ly', {
        months: months,
        monthsShort: months,
        weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
        weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),
        weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),
        weekdaysParseExact: true,
        longDateFormat: {
            LT: 'HH:mm',
            LTS: 'HH:mm:ss',
            L: 'D/\u200FM/\u200FYYYY',
            LL: 'D MMMM YYYY',
            LLL: 'D MMMM YYYY HH:mm',
            LLLL: 'dddd D MMMM YYYY HH:mm',
        },
        meridiemParse: /ص|م/,
        isPM: function (input) {
            return 'م' === input;
        },
        meridiem: function (hour, minute, isLower) {
            if (hour < 12) {
                return 'ص';
            } else {
                return 'م';
            }
        },
        calendar: {
            sameDay: '[اليوم عند الساعة] LT',
            nextDay: '[غدًا عند الساعة] LT',
            nextWeek: 'dddd [عند الساعة] LT',
            lastDay: '[أمس عند الساعة] LT',
            lastWeek: 'dddd [عند الساعة] LT',
            sameElse: 'L',
        },
        relativeTime: {
            future: 'بعد %s',
            past: 'منذ %s',
            s: pluralize('s'),
            ss: pluralize('s'),
            m: pluralize('m'),
            mm: pluralize('m'),
            h: pluralize('h'),
            hh: pluralize('h'),
            d: pluralize('d'),
            dd: pluralize('d'),
            M: pluralize('M'),
            MM: pluralize('M'),
            y: pluralize('y'),
            yy: pluralize('y'),
        },
        preparse: function (string) {
            return string.replace(/،/g, ',');
        },
        postformat: function (string) {
            return string
                .replace(/\d/g, function (match) {
                    return symbolMap[match];
                })
                .replace(/,/g, '،');
        },
        week: {
            dow: 6, // Saturday is the first day of the week.
            doy: 12, // The week that contains Jan 12th is the first week of the year.
        },
    });
 
    return arLy;
 
})));
 
 
/***/ }),
/* 506 */
/***/ (function(module, exports, __webpack_require__) {
 
//! moment.js locale configuration
//! locale : Arabic (Morocco) [ar-ma]
//! author : ElFadili Yassine : https://github.com/ElFadiliY
//! author : Abdel Said : https://github.com/abdelsaid
 
;(function (global, factory) {
    true ? factory(__webpack_require__(3)) :
   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
   factory(global.moment)
}(this, (function (moment) { 'use strict';
 
    //! moment.js locale configuration
 
    var arMa = moment.defineLocale('ar-ma', {
        months: 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split(
            '_'
        ),
        monthsShort:
            'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split(
                '_'
            ),
        weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
        weekdaysShort: 'احد_اثنين_ثلاثاء_اربعاء_خميس_جمعة_سبت'.split('_'),
        weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),
        weekdaysParseExact: true,
        longDateFormat: {
            LT: 'HH:mm',
            LTS: 'HH:mm:ss',
            L: 'DD/MM/YYYY',
            LL: 'D MMMM YYYY',
            LLL: 'D MMMM YYYY HH:mm',
            LLLL: 'dddd D MMMM YYYY HH:mm',
        },
        calendar: {
            sameDay: '[اليوم على الساعة] LT',
            nextDay: '[غدا على الساعة] LT',
            nextWeek: 'dddd [على الساعة] LT',
            lastDay: '[أمس على الساعة] LT',
            lastWeek: 'dddd [على الساعة] LT',
            sameElse: 'L',
        },
        relativeTime: {
            future: 'في %s',
            past: 'منذ %s',
            s: 'ثوان',
            ss: '%d ثانية',
            m: 'دقيقة',
            mm: '%d دقائق',
            h: 'ساعة',
            hh: '%d ساعات',
            d: 'يوم',
            dd: '%d أيام',
            M: 'شهر',
            MM: '%d أشهر',
            y: 'سنة',
            yy: '%d سنوات',
        },
        week: {
            dow: 1, // Monday is the first day of the week.
            doy: 4, // The week that contains Jan 4th is the first week of the year.
        },
    });
 
    return arMa;
 
})));
 
 
/***/ }),
/* 507 */
/***/ (function(module, exports, __webpack_require__) {
 
//! moment.js locale configuration
//! locale : Arabic (Saudi Arabia) [ar-sa]
//! author : Suhail Alkowaileet : https://github.com/xsoh
 
;(function (global, factory) {
    true ? factory(__webpack_require__(3)) :
   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
   factory(global.moment)
}(this, (function (moment) { 'use strict';
 
    //! moment.js locale configuration
 
    var symbolMap = {
            1: '١',
            2: '٢',
            3: '٣',
            4: '٤',
            5: '٥',
            6: '٦',
            7: '٧',
            8: '٨',
            9: '٩',
            0: '٠',
        },
        numberMap = {
            '١': '1',
            '٢': '2',
            '٣': '3',
            '٤': '4',
            '٥': '5',
            '٦': '6',
            '٧': '7',
            '٨': '8',
            '٩': '9',
            '٠': '0',
        };
 
    var arSa = moment.defineLocale('ar-sa', {
        months: 'يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split(
            '_'
        ),
        monthsShort:
            'يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split(
                '_'
            ),
        weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
        weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),
        weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),
        weekdaysParseExact: true,
        longDateFormat: {
            LT: 'HH:mm',
            LTS: 'HH:mm:ss',
            L: 'DD/MM/YYYY',
            LL: 'D MMMM YYYY',
            LLL: 'D MMMM YYYY HH:mm',
            LLLL: 'dddd D MMMM YYYY HH:mm',
        },
        meridiemParse: /ص|م/,
        isPM: function (input) {
            return 'م' === input;
        },
        meridiem: function (hour, minute, isLower) {
            if (hour < 12) {
                return 'ص';
            } else {
                return 'م';
            }
        },
        calendar: {
            sameDay: '[اليوم على الساعة] LT',
            nextDay: '[غدا على الساعة] LT',
            nextWeek: 'dddd [على الساعة] LT',
            lastDay: '[أمس على الساعة] LT',
            lastWeek: 'dddd [على الساعة] LT',
            sameElse: 'L',
        },
        relativeTime: {
            future: 'في %s',
            past: 'منذ %s',
            s: 'ثوان',
            ss: '%d ثانية',
            m: 'دقيقة',
            mm: '%d دقائق',
            h: 'ساعة',
            hh: '%d ساعات',
            d: 'يوم',
            dd: '%d أيام',
            M: 'شهر',
            MM: '%d أشهر',
            y: 'سنة',
            yy: '%d سنوات',
        },
        preparse: function (string) {
            return string
                .replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) {
                    return numberMap[match];
                })
                .replace(/،/g, ',');
        },
        postformat: function (string) {
            return string
                .replace(/\d/g, function (match) {
                    return symbolMap[match];
                })
                .replace(/,/g, '،');
        },
        week: {
            dow: 0, // Sunday is the first day of the week.
            doy: 6, // The week that contains Jan 6th is the first week of the year.
        },
    });
 
    return arSa;
 
})));
 
 
/***/ }),
/* 508 */
/***/ (function(module, exports, __webpack_require__) {
 
//! moment.js locale configuration
//! locale  :  Arabic (Tunisia) [ar-tn]
//! author : Nader Toukabri : https://github.com/naderio
 
;(function (global, factory) {
    true ? factory(__webpack_require__(3)) :
   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
   factory(global.moment)
}(this, (function (moment) { 'use strict';
 
    //! moment.js locale configuration
 
    var arTn = moment.defineLocale('ar-tn', {
        months: 'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split(
            '_'
        ),
        monthsShort:
            'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split(
                '_'
            ),
        weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
        weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),
        weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),
        weekdaysParseExact: true,
        longDateFormat: {
            LT: 'HH:mm',
            LTS: 'HH:mm:ss',
            L: 'DD/MM/YYYY',
            LL: 'D MMMM YYYY',
            LLL: 'D MMMM YYYY HH:mm',
            LLLL: 'dddd D MMMM YYYY HH:mm',
        },
        calendar: {
            sameDay: '[اليوم على الساعة] LT',
            nextDay: '[غدا على الساعة] LT',
            nextWeek: 'dddd [على الساعة] LT',
            lastDay: '[أمس على الساعة] LT',
            lastWeek: 'dddd [على الساعة] LT',
            sameElse: 'L',
        },
        relativeTime: {
            future: 'في %s',
            past: 'منذ %s',
            s: 'ثوان',
            ss: '%d ثانية',
            m: 'دقيقة',
            mm: '%d دقائق',
            h: 'ساعة',
            hh: '%d ساعات',
            d: 'يوم',
            dd: '%d أيام',
            M: 'شهر',
            MM: '%d أشهر',
            y: 'سنة',
            yy: '%d سنوات',
        },
        week: {
            dow: 1, // Monday is the first day of the week.
            doy: 4, // The week that contains Jan 4th is the first week of the year.
        },
    });
 
    return arTn;
 
})));
 
 
/***/ }),
/* 509 */
/***/ (function(module, exports, __webpack_require__) {
 
//! moment.js locale configuration
//! locale : Azerbaijani [az]
//! author : topchiyev : https://github.com/topchiyev
 
;(function (global, factory) {
    true ? factory(__webpack_require__(3)) :
   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
   factory(global.moment)
}(this, (function (moment) { 'use strict';
 
    //! moment.js locale configuration
 
    var suffixes = {
        1: '-inci',
        5: '-inci',
        8: '-inci',
        70: '-inci',
        80: '-inci',
        2: '-nci',
        7: '-nci',
        20: '-nci',
        50: '-nci',
        3: '-üncü',
        4: '-üncü',
        100: '-üncü',
        6: '-ncı',
        9: '-uncu',
        10: '-uncu',
        30: '-uncu',
        60: '-ıncı',
        90: '-ıncı',
    };
 
    var az = moment.defineLocale('az', {
        months: 'yanvar_fevral_mart_aprel_may_iyun_iyul_avqust_sentyabr_oktyabr_noyabr_dekabr'.split(
            '_'
        ),
        monthsShort: 'yan_fev_mar_apr_may_iyn_iyl_avq_sen_okt_noy_dek'.split('_'),
        weekdays:
            'Bazar_Bazar ertəsi_Çərşənbə axşamı_Çərşənbə_Cümə axşamı_Cümə_Şənbə'.split(
                '_'
            ),
        weekdaysShort: 'Baz_BzE_ÇAx_Çər_CAx_Cüm_Şən'.split('_'),
        weekdaysMin: 'Bz_BE_ÇA_Çə_CA_Cü_Şə'.split('_'),
        weekdaysParseExact: true,
        longDateFormat: {
            LT: 'HH:mm',
            LTS: 'HH:mm:ss',
            L: 'DD.MM.YYYY',
            LL: 'D MMMM YYYY',
            LLL: 'D MMMM YYYY HH:mm',
            LLLL: 'dddd, D MMMM YYYY HH:mm',
        },
        calendar: {
            sameDay: '[bugün saat] LT',
            nextDay: '[sabah saat] LT',
            nextWeek: '[gələn həftə] dddd [saat] LT',
            lastDay: '[dünən] LT',
            lastWeek: '[keçən həftə] dddd [saat] LT',
            sameElse: 'L',
        },
        relativeTime: {
            future: '%s sonra',
            past: '%s əvvəl',
            s: 'bir neçə saniyə',
            ss: '%d saniyə',
            m: 'bir dəqiqə',
            mm: '%d dəqiqə',
            h: 'bir saat',
            hh: '%d saat',
            d: 'bir gün',
            dd: '%d gün',
            M: 'bir ay',
            MM: '%d ay',
            y: 'bir il',
            yy: '%d il',
        },
        meridiemParse: /gecə|səhər|gündüz|axşam/,
        isPM: function (input) {
            return /^(gündüz|axşam)$/.test(input);
        },
        meridiem: function (hour, minute, isLower) {
            if (hour < 4) {
                return 'gecə';
            } else if (hour < 12) {
                return 'səhər';
            } else if (hour < 17) {
                return 'gündüz';
            } else {
                return 'axşam';
            }
        },
        dayOfMonthOrdinalParse: /\d{1,2}-(ıncı|inci|nci|üncü|ncı|uncu)/,
        ordinal: function (number) {
            if (number === 0) {
                // special case for zero
                return number + '-ıncı';
            }
            var a = number % 10,
                b = (number % 100) - a,
                c = number >= 100 ? 100 : null;
            return number + (suffixes[a] || suffixes[b] || suffixes[c]);
        },
        week: {
            dow: 1, // Monday is the first day of the week.
            doy: 7, // The week that contains Jan 7th is the first week of the year.
        },
    });
 
    return az;
 
})));
 
 
/***/ }),
/* 510 */
/***/ (function(module, exports, __webpack_require__) {
 
//! moment.js locale configuration
//! locale : Belarusian [be]
//! author : Dmitry Demidov : https://github.com/demidov91
//! author: Praleska: http://praleska.pro/
//! Author : Menelion Elensúle : https://github.com/Oire
 
;(function (global, factory) {
    true ? factory(__webpack_require__(3)) :
   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
   factory(global.moment)
}(this, (function (moment) { 'use strict';
 
    //! moment.js locale configuration
 
    function plural(word, num) {
        var forms = word.split('_');
        return num % 10 === 1 && num % 100 !== 11
            ? forms[0]
            : num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20)
            ? forms[1]
            : forms[2];
    }
    function relativeTimeWithPlural(number, withoutSuffix, key) {
        var format = {
            ss: withoutSuffix ? 'секунда_секунды_секунд' : 'секунду_секунды_секунд',
            mm: withoutSuffix ? 'хвіліна_хвіліны_хвілін' : 'хвіліну_хвіліны_хвілін',
            hh: withoutSuffix ? 'гадзіна_гадзіны_гадзін' : 'гадзіну_гадзіны_гадзін',
            dd: 'дзень_дні_дзён',
            MM: 'месяц_месяцы_месяцаў',
            yy: 'год_гады_гадоў',
        };
        if (key === 'm') {
            return withoutSuffix ? 'хвіліна' : 'хвіліну';
        } else if (key === 'h') {
            return withoutSuffix ? 'гадзіна' : 'гадзіну';
        } else {
            return number + ' ' + plural(format[key], +number);
        }
    }
 
    var be = moment.defineLocale('be', {
        months: {
            format: 'студзеня_лютага_сакавіка_красавіка_траўня_чэрвеня_ліпеня_жніўня_верасня_кастрычніка_лістапада_снежня'.split(
                '_'
            ),
            standalone:
                'студзень_люты_сакавік_красавік_травень_чэрвень_ліпень_жнівень_верасень_кастрычнік_лістапад_снежань'.split(
                    '_'
                ),
        },
        monthsShort:
            'студ_лют_сак_крас_трав_чэрв_ліп_жнів_вер_каст_ліст_снеж'.split('_'),
        weekdays: {
            format: 'нядзелю_панядзелак_аўторак_сераду_чацвер_пятніцу_суботу'.split(
                '_'
            ),
            standalone:
                'нядзеля_панядзелак_аўторак_серада_чацвер_пятніца_субота'.split(
                    '_'
                ),
            isFormat: /\[ ?[Ууў] ?(?:мінулую|наступную)? ?\] ?dddd/,
        },
        weekdaysShort: 'нд_пн_ат_ср_чц_пт_сб'.split('_'),
        weekdaysMin: 'нд_пн_ат_ср_чц_пт_сб'.split('_'),
        longDateFormat: {
            LT: 'HH:mm',
            LTS: 'HH:mm:ss',
            L: 'DD.MM.YYYY',
            LL: 'D MMMM YYYY г.',
            LLL: 'D MMMM YYYY г., HH:mm',
            LLLL: 'dddd, D MMMM YYYY г., HH:mm',
        },
        calendar: {
            sameDay: '[Сёння ў] LT',
            nextDay: '[Заўтра ў] LT',
            lastDay: '[Учора ў] LT',
            nextWeek: function () {
                return '[У] dddd [ў] LT';
            },
            lastWeek: function () {
                switch (this.day()) {
                    case 0:
                    case 3:
                    case 5:
                    case 6:
                        return '[У мінулую] dddd [ў] LT';
                    case 1:
                    case 2:
                    case 4:
                        return '[У мінулы] dddd [ў] LT';
                }
            },
            sameElse: 'L',
        },
        relativeTime: {
            future: 'праз %s',
            past: '%s таму',
            s: 'некалькі секунд',
            m: relativeTimeWithPlural,
            mm: relativeTimeWithPlural,
            h: relativeTimeWithPlural,
            hh: relativeTimeWithPlural,
            d: 'дзень',
            dd: relativeTimeWithPlural,
            M: 'месяц',
            MM: relativeTimeWithPlural,
            y: 'год',
            yy: relativeTimeWithPlural,
        },
        meridiemParse: /ночы|раніцы|дня|вечара/,
        isPM: function (input) {
            return /^(дня|вечара)$/.test(input);
        },
        meridiem: function (hour, minute, isLower) {
            if (hour < 4) {
                return 'ночы';
            } else if (hour < 12) {
                return 'раніцы';
            } else if (hour < 17) {
                return 'дня';
            } else {
                return 'вечара';
            }
        },
        dayOfMonthOrdinalParse: /\d{1,2}-(і|ы|га)/,
        ordinal: function (number, period) {
            switch (period) {
                case 'M':
                case 'd':
                case 'DDD':
                case 'w':
                case 'W':
                    return (number % 10 === 2 || number % 10 === 3) &&
                        number % 100 !== 12 &&
                        number % 100 !== 13
                        ? number + '-і'
                        : number + '-ы';
                case 'D':
                    return number + '-га';
                default:
                    return number;
            }
        },
        week: {
            dow: 1, // Monday is the first day of the week.
            doy: 7, // The week that contains Jan 7th is the first week of the year.
        },
    });
 
    return be;
 
})));
 
 
/***/ }),
/* 511 */
/***/ (function(module, exports, __webpack_require__) {
 
//! moment.js locale configuration
//! locale : Bulgarian [bg]
//! author : Krasen Borisov : https://github.com/kraz
 
;(function (global, factory) {
    true ? factory(__webpack_require__(3)) :
   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
   factory(global.moment)
}(this, (function (moment) { 'use strict';
 
    //! moment.js locale configuration
 
    var bg = moment.defineLocale('bg', {
        months: 'януари_февруари_март_април_май_юни_юли_август_септември_октомври_ноември_декември'.split(
            '_'
        ),
        monthsShort: 'яну_фев_мар_апр_май_юни_юли_авг_сеп_окт_ное_дек'.split('_'),
        weekdays: 'неделя_понеделник_вторник_сряда_четвъртък_петък_събота'.split(
            '_'
        ),
        weekdaysShort: 'нед_пон_вто_сря_чет_пет_съб'.split('_'),
        weekdaysMin: 'нд_пн_вт_ср_чт_пт_сб'.split('_'),
        longDateFormat: {
            LT: 'H:mm',
            LTS: 'H:mm:ss',
            L: 'D.MM.YYYY',
            LL: 'D MMMM YYYY',
            LLL: 'D MMMM YYYY H:mm',
            LLLL: 'dddd, D MMMM YYYY H:mm',
        },
        calendar: {
            sameDay: '[Днес в] LT',
            nextDay: '[Утре в] LT',
            nextWeek: 'dddd [в] LT',
            lastDay: '[Вчера в] LT',
            lastWeek: function () {
                switch (this.day()) {
                    case 0:
                    case 3:
                    case 6:
                        return '[Миналата] dddd [в] LT';
                    case 1:
                    case 2:
                    case 4:
                    case 5:
                        return '[Миналия] dddd [в] LT';
                }
            },
            sameElse: 'L',
        },
        relativeTime: {
            future: 'след %s',
            past: 'преди %s',
            s: 'няколко секунди',
            ss: '%d секунди',
            m: 'минута',
            mm: '%d минути',
            h: 'час',
            hh: '%d часа',
            d: 'ден',
            dd: '%d дена',
            w: 'седмица',
            ww: '%d седмици',
            M: 'месец',
            MM: '%d месеца',
            y: 'година',
            yy: '%d години',
        },
        dayOfMonthOrdinalParse: /\d{1,2}-(ев|ен|ти|ви|ри|ми)/,
        ordinal: function (number) {
            var lastDigit = number % 10,
                last2Digits = number % 100;
            if (number === 0) {
                return number + '-ев';
            } else if (last2Digits === 0) {
                return number + '-ен';
            } else if (last2Digits > 10 && last2Digits < 20) {
                return number + '-ти';
            } else if (lastDigit === 1) {
                return number + '-ви';
            } else if (lastDigit === 2) {
                return number + '-ри';
            } else if (lastDigit === 7 || lastDigit === 8) {
                return number + '-ми';
            } else {
                return number + '-ти';
            }
        },
        week: {
            dow: 1, // Monday is the first day of the week.
            doy: 7, // The week that contains Jan 7th is the first week of the year.
        },
    });
 
    return bg;
 
})));
 
 
/***/ }),
/* 512 */
/***/ (function(module, exports, __webpack_require__) {
 
//! moment.js locale configuration
//! locale : Bambara [bm]
//! author : Estelle Comment : https://github.com/estellecomment
 
;(function (global, factory) {
    true ? factory(__webpack_require__(3)) :
   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
   factory(global.moment)
}(this, (function (moment) { 'use strict';
 
    //! moment.js locale configuration
 
    var bm = moment.defineLocale('bm', {
        months: 'Zanwuyekalo_Fewuruyekalo_Marisikalo_Awirilikalo_Mɛkalo_Zuwɛnkalo_Zuluyekalo_Utikalo_Sɛtanburukalo_ɔkutɔburukalo_Nowanburukalo_Desanburukalo'.split(
            '_'
        ),
        monthsShort: 'Zan_Few_Mar_Awi_Mɛ_Zuw_Zul_Uti_Sɛt_ɔku_Now_Des'.split('_'),
        weekdays: 'Kari_Ntɛnɛn_Tarata_Araba_Alamisa_Juma_Sibiri'.split('_'),
        weekdaysShort: 'Kar_Ntɛ_Tar_Ara_Ala_Jum_Sib'.split('_'),
        weekdaysMin: 'Ka_Nt_Ta_Ar_Al_Ju_Si'.split('_'),
        longDateFormat: {
            LT: 'HH:mm',
            LTS: 'HH:mm:ss',
            L: 'DD/MM/YYYY',
            LL: 'MMMM [tile] D [san] YYYY',
            LLL: 'MMMM [tile] D [san] YYYY [lɛrɛ] HH:mm',
            LLLL: 'dddd MMMM [tile] D [san] YYYY [lɛrɛ] HH:mm',
        },
        calendar: {
            sameDay: '[Bi lɛrɛ] LT',
            nextDay: '[Sini lɛrɛ] LT',
            nextWeek: 'dddd [don lɛrɛ] LT',
            lastDay: '[Kunu lɛrɛ] LT',
            lastWeek: 'dddd [tɛmɛnen lɛrɛ] LT',
            sameElse: 'L',
        },
        relativeTime: {
            future: '%s kɔnɔ',
            past: 'a bɛ %s bɔ',
            s: 'sanga dama dama',
            ss: 'sekondi %d',
            m: 'miniti kelen',
            mm: 'miniti %d',
            h: 'lɛrɛ kelen',
            hh: 'lɛrɛ %d',
            d: 'tile kelen',
            dd: 'tile %d',
            M: 'kalo kelen',
            MM: 'kalo %d',
            y: 'san kelen',
            yy: 'san %d',
        },
        week: {
            dow: 1, // Monday is the first day of the week.
            doy: 4, // The week that contains Jan 4th is the first week of the year.
        },
    });
 
    return bm;
 
})));
 
 
/***/ }),
/* 513 */
/***/ (function(module, exports, __webpack_require__) {
 
//! moment.js locale configuration
//! locale : Bengali [bn]
//! author : Kaushik Gandhi : https://github.com/kaushikgandhi
 
;(function (global, factory) {
    true ? factory(__webpack_require__(3)) :
   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
   factory(global.moment)
}(this, (function (moment) { 'use strict';
 
    //! moment.js locale configuration
 
    var symbolMap = {
            1: '১',
            2: '২',
            3: '৩',
            4: '৪',
            5: '৫',
            6: '৬',
            7: '৭',
            8: '৮',
            9: '৯',
            0: '০',
        },
        numberMap = {
            '১': '1',
            '২': '2',
            '৩': '3',
            '৪': '4',
            '৫': '5',
            '৬': '6',
            '৭': '7',
            '৮': '8',
            '৯': '9',
            '০': '0',
        };
 
    var bn = moment.defineLocale('bn', {
        months: 'জানুয়ারি_ফেব্রুয়ারি_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্টেম্বর_অক্টোবর_নভেম্বর_ডিসেম্বর'.split(
            '_'
        ),
        monthsShort:
            'জানু_ফেব্রু_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্ট_অক্টো_নভে_ডিসে'.split(
                '_'
            ),
        weekdays: 'রবিবার_সোমবার_মঙ্গলবার_বুধবার_বৃহস্পতিবার_শুক্রবার_শনিবার'.split(
            '_'
        ),
        weekdaysShort: 'রবি_সোম_মঙ্গল_বুধ_বৃহস্পতি_শুক্র_শনি'.split('_'),
        weekdaysMin: 'রবি_সোম_মঙ্গল_বুধ_বৃহ_শুক্র_শনি'.split('_'),
        longDateFormat: {
            LT: 'A h:mm সময়',
            LTS: 'A h:mm:ss সময়',
            L: 'DD/MM/YYYY',
            LL: 'D MMMM YYYY',
            LLL: 'D MMMM YYYY, A h:mm সময়',
            LLLL: 'dddd, D MMMM YYYY, A h:mm সময়',
        },
        calendar: {
            sameDay: '[আজ] LT',
            nextDay: '[আগামীকাল] LT',
            nextWeek: 'dddd, LT',
            lastDay: '[গতকাল] LT',
            lastWeek: '[গত] dddd, LT',
            sameElse: 'L',
        },
        relativeTime: {
            future: '%s পরে',
            past: '%s আগে',
            s: 'কয়েক সেকেন্ড',
            ss: '%d সেকেন্ড',
            m: 'এক মিনিট',
            mm: '%d মিনিট',
            h: 'এক ঘন্টা',
            hh: '%d ঘন্টা',
            d: 'এক দিন',
            dd: '%d দিন',
            M: 'এক মাস',
            MM: '%d মাস',
            y: 'এক বছর',
            yy: '%d বছর',
        },
        preparse: function (string) {
            return string.replace(/[১২৩৪৫৬৭৮৯০]/g, function (match) {
                return numberMap[match];
            });
        },
        postformat: function (string) {
            return string.replace(/\d/g, function (match) {
                return symbolMap[match];
            });
        },
        meridiemParse: /রাত|সকাল|দুপুর|বিকাল|রাত/,
        meridiemHour: function (hour, meridiem) {
            if (hour === 12) {
                hour = 0;
            }
            if (
                (meridiem === 'রাত' && hour >= 4) ||
                (meridiem === 'দুপুর' && hour < 5) ||
                meridiem === 'বিকাল'
            ) {
                return hour + 12;
            } else {
                return hour;
            }
        },
        meridiem: function (hour, minute, isLower) {
            if (hour < 4) {
                return 'রাত';
            } else if (hour < 10) {
                return 'সকাল';
            } else if (hour < 17) {
                return 'দুপুর';
            } else if (hour < 20) {
                return 'বিকাল';
            } else {
                return 'রাত';
            }
        },
        week: {
            dow: 0, // Sunday is the first day of the week.
            doy: 6, // The week that contains Jan 6th is the first week of the year.
        },
    });
 
    return bn;
 
})));
 
 
/***/ }),
/* 514 */
/***/ (function(module, exports, __webpack_require__) {
 
//! moment.js locale configuration
//! locale : Bengali (Bangladesh) [bn-bd]
//! author : Asraf Hossain Patoary : https://github.com/ashwoolford
 
;(function (global, factory) {
    true ? factory(__webpack_require__(3)) :
   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
   factory(global.moment)
}(this, (function (moment) { 'use strict';
 
    //! moment.js locale configuration
 
    var symbolMap = {
            1: '১',
            2: '২',
            3: '৩',
            4: '৪',
            5: '৫',
            6: '৬',
            7: '৭',
            8: '৮',
            9: '৯',
            0: '০',
        },
        numberMap = {
            '১': '1',
            '২': '2',
            '৩': '3',
            '৪': '4',
            '৫': '5',
            '৬': '6',
            '৭': '7',
            '৮': '8',
            '৯': '9',
            '০': '0',
        };
 
    var bnBd = moment.defineLocale('bn-bd', {
        months: 'জানুয়ারি_ফেব্রুয়ারি_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্টেম্বর_অক্টোবর_নভেম্বর_ডিসেম্বর'.split(
            '_'
        ),
        monthsShort:
            'জানু_ফেব্রু_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্ট_অক্টো_নভে_ডিসে'.split(
                '_'
            ),
        weekdays: 'রবিবার_সোমবার_মঙ্গলবার_বুধবার_বৃহস্পতিবার_শুক্রবার_শনিবার'.split(
            '_'
        ),
        weekdaysShort: 'রবি_সোম_মঙ্গল_বুধ_বৃহস্পতি_শুক্র_শনি'.split('_'),
        weekdaysMin: 'রবি_সোম_মঙ্গল_বুধ_বৃহ_শুক্র_শনি'.split('_'),
        longDateFormat: {
            LT: 'A h:mm সময়',
            LTS: 'A h:mm:ss সময়',
            L: 'DD/MM/YYYY',
            LL: 'D MMMM YYYY',
            LLL: 'D MMMM YYYY, A h:mm সময়',
            LLLL: 'dddd, D MMMM YYYY, A h:mm সময়',
        },
        calendar: {
            sameDay: '[আজ] LT',
            nextDay: '[আগামীকাল] LT',
            nextWeek: 'dddd, LT',
            lastDay: '[গতকাল] LT',
            lastWeek: '[গত] dddd, LT',
            sameElse: 'L',
        },
        relativeTime: {
            future: '%s পরে',
            past: '%s আগে',
            s: 'কয়েক সেকেন্ড',
            ss: '%d সেকেন্ড',
            m: 'এক মিনিট',
            mm: '%d মিনিট',
            h: 'এক ঘন্টা',
            hh: '%d ঘন্টা',
            d: 'এক দিন',
            dd: '%d দিন',
            M: 'এক মাস',
            MM: '%d মাস',
            y: 'এক বছর',
            yy: '%d বছর',
        },
        preparse: function (string) {
            return string.replace(/[১২৩৪৫৬৭৮৯০]/g, function (match) {
                return numberMap[match];
            });
        },
        postformat: function (string) {
            return string.replace(/\d/g, function (match) {
                return symbolMap[match];
            });
        },
 
        meridiemParse: /রাত|ভোর|সকাল|দুপুর|বিকাল|সন্ধ্যা|রাত/,
        meridiemHour: function (hour, meridiem) {
            if (hour === 12) {
                hour = 0;
            }
            if (meridiem === 'রাত') {
                return hour < 4 ? hour : hour + 12;
            } else if (meridiem === 'ভোর') {
                return hour;
            } else if (meridiem === 'সকাল') {
                return hour;
            } else if (meridiem === 'দুপুর') {
                return hour >= 3 ? hour : hour + 12;
            } else if (meridiem === 'বিকাল') {
                return hour + 12;
            } else if (meridiem === 'সন্ধ্যা') {
                return hour + 12;
            }
        },
 
        meridiem: function (hour, minute, isLower) {
            if (hour < 4) {
                return 'রাত';
            } else if (hour < 6) {
                return 'ভোর';
            } else if (hour < 12) {
                return 'সকাল';
            } else if (hour < 15) {
                return 'দুপুর';
            } else if (hour < 18) {
                return 'বিকাল';
            } else if (hour < 20) {
                return 'সন্ধ্যা';
            } else {
                return 'রাত';
            }
        },
        week: {
            dow: 0, // Sunday is the first day of the week.
            doy: 6, // The week that contains Jan 6th is the first week of the year.
        },
    });
 
    return bnBd;
 
})));
 
 
/***/ }),
/* 515 */
/***/ (function(module, exports, __webpack_require__) {
 
//! moment.js locale configuration
//! locale : Tibetan [bo]
//! author : Thupten N. Chakrishar : https://github.com/vajradog
 
;(function (global, factory) {
    true ? factory(__webpack_require__(3)) :
   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
   factory(global.moment)
}(this, (function (moment) { 'use strict';
 
    //! moment.js locale configuration
 
    var symbolMap = {
            1: '༡',
            2: '༢',
            3: '༣',
            4: '༤',
            5: '༥',
            6: '༦',
            7: '༧',
            8: '༨',
            9: '༩',
            0: '༠',
        },
        numberMap = {
            '༡': '1',
            '༢': '2',
            '༣': '3',
            '༤': '4',
            '༥': '5',
            '༦': '6',
            '༧': '7',
            '༨': '8',
            '༩': '9',
            '༠': '0',
        };
 
    var bo = moment.defineLocale('bo', {
        months: 'ཟླ་བ་དང་པོ_ཟླ་བ་གཉིས་པ_ཟླ་བ་གསུམ་པ_ཟླ་བ་བཞི་པ_ཟླ་བ་ལྔ་པ_ཟླ་བ་དྲུག་པ_ཟླ་བ་བདུན་པ_ཟླ་བ་བརྒྱད་པ_ཟླ་བ་དགུ་པ_ཟླ་བ་བཅུ་པ_ཟླ་བ་བཅུ་གཅིག་པ_ཟླ་བ་བཅུ་གཉིས་པ'.split(
            '_'
        ),
        monthsShort:
            'ཟླ་1_ཟླ་2_ཟླ་3_ཟླ་4_ཟླ་5_ཟླ་6_ཟླ་7_ཟླ་8_ཟླ་9_ཟླ་10_ཟླ་11_ཟླ་12'.split(
                '_'
            ),
        monthsShortRegex: /^(ཟླ་\d{1,2})/,
        monthsParseExact: true,
        weekdays:
            'གཟའ་ཉི་མ་_གཟའ་ཟླ་བ་_གཟའ་མིག་དམར་_གཟའ་ལྷག་པ་_གཟའ་ཕུར་བུ_གཟའ་པ་སངས་_གཟའ་སྤེན་པ་'.split(
                '_'
            ),
        weekdaysShort: 'ཉི་མ་_ཟླ་བ་_མིག་དམར་_ལྷག་པ་_ཕུར་བུ_པ་སངས་_སྤེན་པ་'.split(
            '_'
        ),
        weekdaysMin: 'ཉི_ཟླ_མིག_ལྷག_ཕུར_སངས_སྤེན'.split('_'),
        longDateFormat: {
            LT: 'A h:mm',
            LTS: 'A h:mm:ss',
            L: 'DD/MM/YYYY',
            LL: 'D MMMM YYYY',
            LLL: 'D MMMM YYYY, A h:mm',
            LLLL: 'dddd, D MMMM YYYY, A h:mm',
        },
        calendar: {
            sameDay: '[དི་རིང] LT',
            nextDay: '[སང་ཉིན] LT',
            nextWeek: '[བདུན་ཕྲག་རྗེས་མ], LT',
            lastDay: '[ཁ་སང] LT',
            lastWeek: '[བདུན་ཕྲག་མཐའ་མ] dddd, LT',
            sameElse: 'L',
        },
        relativeTime: {
            future: '%s ལ་',
            past: '%s སྔན་ལ',
            s: 'ལམ་སང',
            ss: '%d སྐར་ཆ།',
            m: 'སྐར་མ་གཅིག',
            mm: '%d སྐར་མ',
            h: 'ཆུ་ཚོད་གཅིག',
            hh: '%d ཆུ་ཚོད',
            d: 'ཉིན་གཅིག',
            dd: '%d ཉིན་',
            M: 'ཟླ་བ་གཅིག',
            MM: '%d ཟླ་བ',
            y: 'ལོ་གཅིག',
            yy: '%d ལོ',
        },
        preparse: function (string) {
            return string.replace(/[༡༢༣༤༥༦༧༨༩༠]/g, function (match) {
                return numberMap[match];
            });
        },
        postformat: function (string) {
            return string.replace(/\d/g, function (match) {
                return symbolMap[match];
            });
        },
        meridiemParse: /མཚན་མོ|ཞོགས་ཀས|ཉིན་གུང|དགོང་དག|མཚན་མོ/,
        meridiemHour: function (hour, meridiem) {
            if (hour === 12) {
                hour = 0;
            }
            if (
                (meridiem === 'མཚན་མོ' && hour >= 4) ||
                (meridiem === 'ཉིན་གུང' && hour < 5) ||
                meridiem === 'དགོང་དག'
            ) {
                return hour + 12;
            } else {
                return hour;
            }
        },
        meridiem: function (hour, minute, isLower) {
            if (hour < 4) {
                return 'མཚན་མོ';
            } else if (hour < 10) {
                return 'ཞོགས་ཀས';
            } else if (hour < 17) {
                return 'ཉིན་གུང';
            } else if (hour < 20) {
                return 'དགོང་དག';
            } else {
                return 'མཚན་མོ';
            }
        },
        week: {
            dow: 0, // Sunday is the first day of the week.
            doy: 6, // The week that contains Jan 6th is the first week of the year.
        },
    });
 
    return bo;
 
})));
 
 
/***/ }),
/* 516 */
/***/ (function(module, exports, __webpack_require__) {
 
//! moment.js locale configuration
//! locale : Breton [br]
//! author : Jean-Baptiste Le Duigou : https://github.com/jbleduigou
 
;(function (global, factory) {
    true ? factory(__webpack_require__(3)) :
   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
   factory(global.moment)
}(this, (function (moment) { 'use strict';
 
    //! moment.js locale configuration
 
    function relativeTimeWithMutation(number, withoutSuffix, key) {
        var format = {
            mm: 'munutenn',
            MM: 'miz',
            dd: 'devezh',
        };
        return number + ' ' + mutation(format[key], number);
    }
    function specialMutationForYears(number) {
        switch (lastNumber(number)) {
            case 1:
            case 3:
            case 4:
            case 5:
            case 9:
                return number + ' bloaz';
            default:
                return number + ' vloaz';
        }
    }
    function lastNumber(number) {
        if (number > 9) {
            return lastNumber(number % 10);
        }
        return number;
    }
    function mutation(text, number) {
        if (number === 2) {
            return softMutation(text);
        }
        return text;
    }
    function softMutation(text) {
        var mutationTable = {
            m: 'v',
            b: 'v',
            d: 'z',
        };
        if (mutationTable[text.charAt(0)] === undefined) {
            return text;
        }
        return mutationTable[text.charAt(0)] + text.substring(1);
    }
 
    var monthsParse = [
            /^gen/i,
            /^c[ʼ\']hwe/i,
            /^meu/i,
            /^ebr/i,
            /^mae/i,
            /^(mez|eve)/i,
            /^gou/i,
            /^eos/i,
            /^gwe/i,
            /^her/i,
            /^du/i,
            /^ker/i,
        ],
        monthsRegex =
            /^(genver|c[ʼ\']hwevrer|meurzh|ebrel|mae|mezheven|gouere|eost|gwengolo|here|du|kerzu|gen|c[ʼ\']hwe|meu|ebr|mae|eve|gou|eos|gwe|her|du|ker)/i,
        monthsStrictRegex =
            /^(genver|c[ʼ\']hwevrer|meurzh|ebrel|mae|mezheven|gouere|eost|gwengolo|here|du|kerzu)/i,
        monthsShortStrictRegex =
            /^(gen|c[ʼ\']hwe|meu|ebr|mae|eve|gou|eos|gwe|her|du|ker)/i,
        fullWeekdaysParse = [
            /^sul/i,
            /^lun/i,
            /^meurzh/i,
            /^merc[ʼ\']her/i,
            /^yaou/i,
            /^gwener/i,
            /^sadorn/i,
        ],
        shortWeekdaysParse = [
            /^Sul/i,
            /^Lun/i,
            /^Meu/i,
            /^Mer/i,
            /^Yao/i,
            /^Gwe/i,
            /^Sad/i,
        ],
        minWeekdaysParse = [
            /^Su/i,
            /^Lu/i,
            /^Me([^r]|$)/i,
            /^Mer/i,
            /^Ya/i,
            /^Gw/i,
            /^Sa/i,
        ];
 
    var br = moment.defineLocale('br', {
        months: 'Genver_Cʼhwevrer_Meurzh_Ebrel_Mae_Mezheven_Gouere_Eost_Gwengolo_Here_Du_Kerzu'.split(
            '_'
        ),
        monthsShort: 'Gen_Cʼhwe_Meu_Ebr_Mae_Eve_Gou_Eos_Gwe_Her_Du_Ker'.split('_'),
        weekdays: 'Sul_Lun_Meurzh_Mercʼher_Yaou_Gwener_Sadorn'.split('_'),
        weekdaysShort: 'Sul_Lun_Meu_Mer_Yao_Gwe_Sad'.split('_'),
        weekdaysMin: 'Su_Lu_Me_Mer_Ya_Gw_Sa'.split('_'),
        weekdaysParse: minWeekdaysParse,
        fullWeekdaysParse: fullWeekdaysParse,
        shortWeekdaysParse: shortWeekdaysParse,
        minWeekdaysParse: minWeekdaysParse,
 
        monthsRegex: monthsRegex,
        monthsShortRegex: monthsRegex,
        monthsStrictRegex: monthsStrictRegex,
        monthsShortStrictRegex: monthsShortStrictRegex,
        monthsParse: monthsParse,
        longMonthsParse: monthsParse,
        shortMonthsParse: monthsParse,
 
        longDateFormat: {
            LT: 'HH:mm',
            LTS: 'HH:mm:ss',
            L: 'DD/MM/YYYY',
            LL: 'D [a viz] MMMM YYYY',
            LLL: 'D [a viz] MMMM YYYY HH:mm',
            LLLL: 'dddd, D [a viz] MMMM YYYY HH:mm',
        },
        calendar: {
            sameDay: '[Hiziv da] LT',
            nextDay: '[Warcʼhoazh da] LT',
            nextWeek: 'dddd [da] LT',
            lastDay: '[Decʼh da] LT',
            lastWeek: 'dddd [paset da] LT',
            sameElse: 'L',
        },
        relativeTime: {
            future: 'a-benn %s',
            past: '%s ʼzo',
            s: 'un nebeud segondennoù',
            ss: '%d eilenn',
            m: 'ur vunutenn',
            mm: relativeTimeWithMutation,
            h: 'un eur',
            hh: '%d eur',
            d: 'un devezh',
            dd: relativeTimeWithMutation,
            M: 'ur miz',
            MM: relativeTimeWithMutation,
            y: 'ur bloaz',
            yy: specialMutationForYears,
        },
        dayOfMonthOrdinalParse: /\d{1,2}(añ|vet)/,
        ordinal: function (number) {
            var output = number === 1 ? 'añ' : 'vet';
            return number + output;
        },
        week: {
            dow: 1, // Monday is the first day of the week.
            doy: 4, // The week that contains Jan 4th is the first week of the year.
        },
        meridiemParse: /a.m.|g.m./, // goude merenn | a-raok merenn
        isPM: function (token) {
            return token === 'g.m.';
        },
        meridiem: function (hour, minute, isLower) {
            return hour < 12 ? 'a.m.' : 'g.m.';
        },
    });
 
    return br;
 
})));
 
 
/***/ }),
/* 517 */
/***/ (function(module, exports, __webpack_require__) {
 
//! moment.js locale configuration
//! locale : Bosnian [bs]
//! author : Nedim Cholich : https://github.com/frontyard
//! based on (hr) translation by Bojan Marković
 
;(function (global, factory) {
    true ? factory(__webpack_require__(3)) :
   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
   factory(global.moment)
}(this, (function (moment) { 'use strict';
 
    //! moment.js locale configuration
 
    function translate(number, withoutSuffix, key) {
        var result = number + ' ';
        switch (key) {
            case 'ss':
                if (number === 1) {
                    result += 'sekunda';
                } else if (number === 2 || number === 3 || number === 4) {
                    result += 'sekunde';
                } else {
                    result += 'sekundi';
                }
                return result;
            case 'm':
                return withoutSuffix ? 'jedna minuta' : 'jedne minute';
            case 'mm':
                if (number === 1) {
                    result += 'minuta';
                } else if (number === 2 || number === 3 || number === 4) {
                    result += 'minute';
                } else {
                    result += 'minuta';
                }
                return result;
            case 'h':
                return withoutSuffix ? 'jedan sat' : 'jednog sata';
            case 'hh':
                if (number === 1) {
                    result += 'sat';
                } else if (number === 2 || number === 3 || number === 4) {
                    result += 'sata';
                } else {
                    result += 'sati';
                }
                return result;
            case 'dd':
                if (number === 1) {
                    result += 'dan';
                } else {
                    result += 'dana';
                }
                return result;
            case 'MM':
                if (number === 1) {
                    result += 'mjesec';
                } else if (number === 2 || number === 3 || number === 4) {
                    result += 'mjeseca';
                } else {
                    result += 'mjeseci';
                }
                return result;
            case 'yy':
                if (number === 1) {
                    result += 'godina';
                } else if (number === 2 || number === 3 || number === 4) {
                    result += 'godine';
                } else {
                    result += 'godina';
                }
                return result;
        }
    }
 
    var bs = moment.defineLocale('bs', {
        months: 'januar_februar_mart_april_maj_juni_juli_august_septembar_oktobar_novembar_decembar'.split(
            '_'
        ),
        monthsShort:
            'jan._feb._mar._apr._maj._jun._jul._aug._sep._okt._nov._dec.'.split(
                '_'
            ),
        monthsParseExact: true,
        weekdays: 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split(
            '_'
        ),
        weekdaysShort: 'ned._pon._uto._sri._čet._pet._sub.'.split('_'),
        weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'),
        weekdaysParseExact: true,
        longDateFormat: {
            LT: 'H:mm',
            LTS: 'H:mm:ss',
            L: 'DD.MM.YYYY',
            LL: 'D. MMMM YYYY',
            LLL: 'D. MMMM YYYY H:mm',
            LLLL: 'dddd, D. MMMM YYYY H:mm',
        },
        calendar: {
            sameDay: '[danas u] LT',
            nextDay: '[sutra u] LT',
            nextWeek: function () {
                switch (this.day()) {
                    case 0:
                        return '[u] [nedjelju] [u] LT';
                    case 3:
                        return '[u] [srijedu] [u] LT';
                    case 6:
                        return '[u] [subotu] [u] LT';
                    case 1:
                    case 2:
                    case 4:
                    case 5:
                        return '[u] dddd [u] LT';
                }
            },
            lastDay: '[jučer u] LT',
            lastWeek: function () {
                switch (this.day()) {
                    case 0:
                    case 3:
                        return '[prošlu] dddd [u] LT';
                    case 6:
                        return '[prošle] [subote] [u] LT';
                    case 1:
                    case 2:
                    case 4:
                    case 5:
                        return '[prošli] dddd [u] LT';
                }
            },
            sameElse: 'L',
        },
        relativeTime: {
            future: 'za %s',
            past: 'prije %s',
            s: 'par sekundi',
            ss: translate,
            m: translate,
            mm: translate,
            h: translate,
            hh: translate,
            d: 'dan',
            dd: translate,
            M: 'mjesec',
            MM: translate,
            y: 'godinu',
            yy: translate,
        },
        dayOfMonthOrdinalParse: /\d{1,2}\./,
        ordinal: '%d.',
        week: {
            dow: 1, // Monday is the first day of the week.
            doy: 7, // The week that contains Jan 7th is the first week of the year.
        },
    });
 
    return bs;
 
})));
 
 
/***/ }),
/* 518 */
/***/ (function(module, exports, __webpack_require__) {
 
//! moment.js locale configuration
//! locale : Catalan [ca]
//! author : Juan G. Hurtado : https://github.com/juanghurtado
 
;(function (global, factory) {
    true ? factory(__webpack_require__(3)) :
   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
   factory(global.moment)
}(this, (function (moment) { 'use strict';
 
    //! moment.js locale configuration
 
    var ca = moment.defineLocale('ca', {
        months: {
            standalone:
                'gener_febrer_març_abril_maig_juny_juliol_agost_setembre_octubre_novembre_desembre'.split(
                    '_'
                ),
            format: "de gener_de febrer_de març_d'abril_de maig_de juny_de juliol_d'agost_de setembre_d'octubre_de novembre_de desembre".split(
                '_'
            ),
            isFormat: /D[oD]?(\s)+MMMM/,
        },
        monthsShort:
            'gen._febr._març_abr._maig_juny_jul._ag._set._oct._nov._des.'.split(
                '_'
            ),
        monthsParseExact: true,
        weekdays:
            'diumenge_dilluns_dimarts_dimecres_dijous_divendres_dissabte'.split(
                '_'
            ),
        weekdaysShort: 'dg._dl._dt._dc._dj._dv._ds.'.split('_'),
        weekdaysMin: 'dg_dl_dt_dc_dj_dv_ds'.split('_'),
        weekdaysParseExact: true,
        longDateFormat: {
            LT: 'H:mm',
            LTS: 'H:mm:ss',
            L: 'DD/MM/YYYY',
            LL: 'D MMMM [de] YYYY',
            ll: 'D MMM YYYY',
            LLL: 'D MMMM [de] YYYY [a les] H:mm',
            lll: 'D MMM YYYY, H:mm',
            LLLL: 'dddd D MMMM [de] YYYY [a les] H:mm',
            llll: 'ddd D MMM YYYY, H:mm',
        },
        calendar: {
            sameDay: function () {
                return '[avui a ' + (this.hours() !== 1 ? 'les' : 'la') + '] LT';
            },
            nextDay: function () {
                return '[demà a ' + (this.hours() !== 1 ? 'les' : 'la') + '] LT';
            },
            nextWeek: function () {
                return 'dddd [a ' + (this.hours() !== 1 ? 'les' : 'la') + '] LT';
            },
            lastDay: function () {
                return '[ahir a ' + (this.hours() !== 1 ? 'les' : 'la') + '] LT';
            },
            lastWeek: function () {
                return (
                    '[el] dddd [passat a ' +
                    (this.hours() !== 1 ? 'les' : 'la') +
                    '] LT'
                );
            },
            sameElse: 'L',
        },
        relativeTime: {
            future: "d'aquí %s",
            past: 'fa %s',
            s: 'uns segons',
            ss: '%d segons',
            m: 'un minut',
            mm: '%d minuts',
            h: 'una hora',
            hh: '%d hores',
            d: 'un dia',
            dd: '%d dies',
            M: 'un mes',
            MM: '%d mesos',
            y: 'un any',
            yy: '%d anys',
        },
        dayOfMonthOrdinalParse: /\d{1,2}(r|n|t|è|a)/,
        ordinal: function (number, period) {
            var output =
                number === 1
                    ? 'r'
                    : number === 2
                    ? 'n'
                    : number === 3
                    ? 'r'
                    : number === 4
                    ? 't'
                    : 'è';
            if (period === 'w' || period === 'W') {
                output = 'a';
            }
            return number + output;
        },
        week: {
            dow: 1, // Monday is the first day of the week.
            doy: 4, // The week that contains Jan 4th is the first week of the year.
        },
    });
 
    return ca;
 
})));
 
 
/***/ }),
/* 519 */
/***/ (function(module, exports, __webpack_require__) {
 
//! moment.js locale configuration
//! locale : Czech [cs]
//! author : petrbela : https://github.com/petrbela
 
;(function (global, factory) {
    true ? factory(__webpack_require__(3)) :
   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
   factory(global.moment)
}(this, (function (moment) { 'use strict';
 
    //! moment.js locale configuration
 
    var months = {
            format: 'leden_únor_březen_duben_květen_červen_červenec_srpen_září_říjen_listopad_prosinec'.split(
                '_'
            ),
            standalone:
                'ledna_února_března_dubna_května_června_července_srpna_září_října_listopadu_prosince'.split(
                    '_'
                ),
        },
        monthsShort = 'led_úno_bře_dub_kvě_čvn_čvc_srp_zář_říj_lis_pro'.split('_'),
        monthsParse = [
            /^led/i,
            /^úno/i,
            /^bře/i,
            /^dub/i,
            /^kvě/i,
            /^(čvn|červen$|června)/i,
            /^(čvc|červenec|července)/i,
            /^srp/i,
            /^zář/i,
            /^říj/i,
            /^lis/i,
            /^pro/i,
        ],
        // NOTE: 'červen' is substring of 'červenec'; therefore 'červenec' must precede 'červen' in the regex to be fully matched.
        // Otherwise parser matches '1. červenec' as '1. červen' + 'ec'.
        monthsRegex =
            /^(leden|únor|březen|duben|květen|červenec|července|červen|června|srpen|září|říjen|listopad|prosinec|led|úno|bře|dub|kvě|čvn|čvc|srp|zář|říj|lis|pro)/i;
 
    function plural(n) {
        return n > 1 && n < 5 && ~~(n / 10) !== 1;
    }
    function translate(number, withoutSuffix, key, isFuture) {
        var result = number + ' ';
        switch (key) {
            case 's': // a few seconds / in a few seconds / a few seconds ago
                return withoutSuffix || isFuture ? 'pár sekund' : 'pár sekundami';
            case 'ss': // 9 seconds / in 9 seconds / 9 seconds ago
                if (withoutSuffix || isFuture) {
                    return result + (plural(number) ? 'sekundy' : 'sekund');
                } else {
                    return result + 'sekundami';
                }
            case 'm': // a minute / in a minute / a minute ago
                return withoutSuffix ? 'minuta' : isFuture ? 'minutu' : 'minutou';
            case 'mm': // 9 minutes / in 9 minutes / 9 minutes ago
                if (withoutSuffix || isFuture) {
                    return result + (plural(number) ? 'minuty' : 'minut');
                } else {
                    return result + 'minutami';
                }
            case 'h': // an hour / in an hour / an hour ago
                return withoutSuffix ? 'hodina' : isFuture ? 'hodinu' : 'hodinou';
            case 'hh': // 9 hours / in 9 hours / 9 hours ago
                if (withoutSuffix || isFuture) {
                    return result + (plural(number) ? 'hodiny' : 'hodin');
                } else {
                    return result + 'hodinami';
                }
            case 'd': // a day / in a day / a day ago
                return withoutSuffix || isFuture ? 'den' : 'dnem';
            case 'dd': // 9 days / in 9 days / 9 days ago
                if (withoutSuffix || isFuture) {
                    return result + (plural(number) ? 'dny' : 'dní');
                } else {
                    return result + 'dny';
                }
            case 'M': // a month / in a month / a month ago
                return withoutSuffix || isFuture ? 'měsíc' : 'měsícem';
            case 'MM': // 9 months / in 9 months / 9 months ago
                if (withoutSuffix || isFuture) {
                    return result + (plural(number) ? 'měsíce' : 'měsíců');
                } else {
                    return result + 'měsíci';
                }
            case 'y': // a year / in a year / a year ago
                return withoutSuffix || isFuture ? 'rok' : 'rokem';
            case 'yy': // 9 years / in 9 years / 9 years ago
                if (withoutSuffix || isFuture) {
                    return result + (plural(number) ? 'roky' : 'let');
                } else {
                    return result + 'lety';
                }
        }
    }
 
    var cs = moment.defineLocale('cs', {
        months: months,
        monthsShort: monthsShort,
        monthsRegex: monthsRegex,
        monthsShortRegex: monthsRegex,
        // NOTE: 'červen' is substring of 'červenec'; therefore 'červenec' must precede 'červen' in the regex to be fully matched.
        // Otherwise parser matches '1. červenec' as '1. červen' + 'ec'.
        monthsStrictRegex:
            /^(leden|ledna|února|únor|březen|března|duben|dubna|květen|května|červenec|července|červen|června|srpen|srpna|září|říjen|října|listopadu|listopad|prosinec|prosince)/i,
        monthsShortStrictRegex:
            /^(led|úno|bře|dub|kvě|čvn|čvc|srp|zář|říj|lis|pro)/i,
        monthsParse: monthsParse,
        longMonthsParse: monthsParse,
        shortMonthsParse: monthsParse,
        weekdays: 'neděle_pondělí_úterý_středa_čtvrtek_pátek_sobota'.split('_'),
        weekdaysShort: 'ne_po_út_st_čt_pá_so'.split('_'),
        weekdaysMin: 'ne_po_út_st_čt_pá_so'.split('_'),
        longDateFormat: {
            LT: 'H:mm',
            LTS: 'H:mm:ss',
            L: 'DD.MM.YYYY',
            LL: 'D. MMMM YYYY',
            LLL: 'D. MMMM YYYY H:mm',
            LLLL: 'dddd D. MMMM YYYY H:mm',
            l: 'D. M. YYYY',
        },
        calendar: {
            sameDay: '[dnes v] LT',
            nextDay: '[zítra v] LT',
            nextWeek: function () {
                switch (this.day()) {
                    case 0:
                        return '[v neděli v] LT';
                    case 1:
                    case 2:
                        return '[v] dddd [v] LT';
                    case 3:
                        return '[ve středu v] LT';
                    case 4:
                        return '[ve čtvrtek v] LT';
                    case 5:
                        return '[v pátek v] LT';
                    case 6:
                        return '[v sobotu v] LT';
                }
            },
            lastDay: '[včera v] LT',
            lastWeek: function () {
                switch (this.day()) {
                    case 0:
                        return '[minulou neděli v] LT';
                    case 1:
                    case 2:
                        return '[minulé] dddd [v] LT';
                    case 3:
                        return '[minulou středu v] LT';
                    case 4:
                    case 5:
                        return '[minulý] dddd [v] LT';
                    case 6:
                        return '[minulou sobotu v] LT';
                }
            },
            sameElse: 'L',
        },
        relativeTime: {
            future: 'za %s',
            past: 'před %s',
            s: translate,
            ss: translate,
            m: translate,
            mm: translate,
            h: translate,
            hh: translate,
            d: translate,
            dd: translate,
            M: translate,
            MM: translate,
            y: translate,
            yy: translate,
        },
        dayOfMonthOrdinalParse: /\d{1,2}\./,
        ordinal: '%d.',
        week: {
            dow: 1, // Monday is the first day of the week.
            doy: 4, // The week that contains Jan 4th is the first week of the year.
        },
    });
 
    return cs;
 
})));
 
 
/***/ }),
/* 520 */
/***/ (function(module, exports, __webpack_require__) {
 
//! moment.js locale configuration
//! locale : Chuvash [cv]
//! author : Anatoly Mironov : https://github.com/mirontoli
 
;(function (global, factory) {
    true ? factory(__webpack_require__(3)) :
   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
   factory(global.moment)
}(this, (function (moment) { 'use strict';
 
    //! moment.js locale configuration
 
    var cv = moment.defineLocale('cv', {
        months: 'кӑрлач_нарӑс_пуш_ака_май_ҫӗртме_утӑ_ҫурла_авӑн_юпа_чӳк_раштав'.split(
            '_'
        ),
        monthsShort: 'кӑр_нар_пуш_ака_май_ҫӗр_утӑ_ҫур_авн_юпа_чӳк_раш'.split('_'),
        weekdays:
            'вырсарникун_тунтикун_ытларикун_юнкун_кӗҫнерникун_эрнекун_шӑматкун'.split(
                '_'
            ),
        weekdaysShort: 'выр_тун_ытл_юн_кӗҫ_эрн_шӑм'.split('_'),
        weekdaysMin: 'вр_тн_ыт_юн_кҫ_эр_шм'.split('_'),
        longDateFormat: {
            LT: 'HH:mm',
            LTS: 'HH:mm:ss',
            L: 'DD-MM-YYYY',
            LL: 'YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ]',
            LLL: 'YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm',
            LLLL: 'dddd, YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm',
        },
        calendar: {
            sameDay: '[Паян] LT [сехетре]',
            nextDay: '[Ыран] LT [сехетре]',
            lastDay: '[Ӗнер] LT [сехетре]',
            nextWeek: '[Ҫитес] dddd LT [сехетре]',
            lastWeek: '[Иртнӗ] dddd LT [сехетре]',
            sameElse: 'L',
        },
        relativeTime: {
            future: function (output) {
                var affix = /сехет$/i.exec(output)
                    ? 'рен'
                    : /ҫул$/i.exec(output)
                    ? 'тан'
                    : 'ран';
                return output + affix;
            },
            past: '%s каялла',
            s: 'пӗр-ик ҫеккунт',
            ss: '%d ҫеккунт',
            m: 'пӗр минут',
            mm: '%d минут',
            h: 'пӗр сехет',
            hh: '%d сехет',
            d: 'пӗр кун',
            dd: '%d кун',
            M: 'пӗр уйӑх',
            MM: '%d уйӑх',
            y: 'пӗр ҫул',
            yy: '%d ҫул',
        },
        dayOfMonthOrdinalParse: /\d{1,2}-мӗш/,
        ordinal: '%d-мӗш',
        week: {
            dow: 1, // Monday is the first day of the week.
            doy: 7, // The week that contains Jan 7th is the first week of the year.
        },
    });
 
    return cv;
 
})));
 
 
/***/ }),
/* 521 */
/***/ (function(module, exports, __webpack_require__) {
 
//! moment.js locale configuration
//! locale : Welsh [cy]
//! author : Robert Allen : https://github.com/robgallen
//! author : https://github.com/ryangreaves
 
;(function (global, factory) {
    true ? factory(__webpack_require__(3)) :
   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
   factory(global.moment)
}(this, (function (moment) { 'use strict';
 
    //! moment.js locale configuration
 
    var cy = moment.defineLocale('cy', {
        months: 'Ionawr_Chwefror_Mawrth_Ebrill_Mai_Mehefin_Gorffennaf_Awst_Medi_Hydref_Tachwedd_Rhagfyr'.split(
            '_'
        ),
        monthsShort: 'Ion_Chwe_Maw_Ebr_Mai_Meh_Gor_Aws_Med_Hyd_Tach_Rhag'.split(
            '_'
        ),
        weekdays:
            'Dydd Sul_Dydd Llun_Dydd Mawrth_Dydd Mercher_Dydd Iau_Dydd Gwener_Dydd Sadwrn'.split(
                '_'
            ),
        weekdaysShort: 'Sul_Llun_Maw_Mer_Iau_Gwe_Sad'.split('_'),
        weekdaysMin: 'Su_Ll_Ma_Me_Ia_Gw_Sa'.split('_'),
        weekdaysParseExact: true,
        // time formats are the same as en-gb
        longDateFormat: {
            LT: 'HH:mm',
            LTS: 'HH:mm:ss',
            L: 'DD/MM/YYYY',
            LL: 'D MMMM YYYY',
            LLL: 'D MMMM YYYY HH:mm',
            LLLL: 'dddd, D MMMM YYYY HH:mm',
        },
        calendar: {
            sameDay: '[Heddiw am] LT',
            nextDay: '[Yfory am] LT',
            nextWeek: 'dddd [am] LT',
            lastDay: '[Ddoe am] LT',
            lastWeek: 'dddd [diwethaf am] LT',
            sameElse: 'L',
        },
        relativeTime: {
            future: 'mewn %s',
            past: '%s yn ôl',
            s: 'ychydig eiliadau',
            ss: '%d eiliad',
            m: 'munud',
            mm: '%d munud',
            h: 'awr',
            hh: '%d awr',
            d: 'diwrnod',
            dd: '%d diwrnod',
            M: 'mis',
            MM: '%d mis',
            y: 'blwyddyn',
            yy: '%d flynedd',
        },
        dayOfMonthOrdinalParse: /\d{1,2}(fed|ain|af|il|ydd|ed|eg)/,
        // traditional ordinal numbers above 31 are not commonly used in colloquial Welsh
        ordinal: function (number) {
            var b = number,
                output = '',
                lookup = [
                    '',
                    'af',
                    'il',
                    'ydd',
                    'ydd',
                    'ed',
                    'ed',
                    'ed',
                    'fed',
                    'fed',
                    'fed', // 1af to 10fed
                    'eg',
                    'fed',
                    'eg',
                    'eg',
                    'fed',
                    'eg',
                    'eg',
                    'fed',
                    'eg',
                    'fed', // 11eg to 20fed
                ];
            if (b > 20) {
                if (b === 40 || b === 50 || b === 60 || b === 80 || b === 100) {
                    output = 'fed'; // not 30ain, 70ain or 90ain
                } else {
                    output = 'ain';
                }
            } else if (b > 0) {
                output = lookup[b];
            }
            return number + output;
        },
        week: {
            dow: 1, // Monday is the first day of the week.
            doy: 4, // The week that contains Jan 4th is the first week of the year.
        },
    });
 
    return cy;
 
})));
 
 
/***/ }),
/* 522 */
/***/ (function(module, exports, __webpack_require__) {
 
//! moment.js locale configuration
//! locale : Danish [da]
//! author : Ulrik Nielsen : https://github.com/mrbase
 
;(function (global, factory) {
    true ? factory(__webpack_require__(3)) :
   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
   factory(global.moment)
}(this, (function (moment) { 'use strict';
 
    //! moment.js locale configuration
 
    var da = moment.defineLocale('da', {
        months: 'januar_februar_marts_april_maj_juni_juli_august_september_oktober_november_december'.split(
            '_'
        ),
        monthsShort: 'jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec'.split('_'),
        weekdays: 'søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag'.split('_'),
        weekdaysShort: 'søn_man_tir_ons_tor_fre_lør'.split('_'),
        weekdaysMin: 'sø_ma_ti_on_to_fr_lø'.split('_'),
        longDateFormat: {
            LT: 'HH:mm',
            LTS: 'HH:mm:ss',
            L: 'DD.MM.YYYY',
            LL: 'D. MMMM YYYY',
            LLL: 'D. MMMM YYYY HH:mm',
            LLLL: 'dddd [d.] D. MMMM YYYY [kl.] HH:mm',
        },
        calendar: {
            sameDay: '[i dag kl.] LT',
            nextDay: '[i morgen kl.] LT',
            nextWeek: 'på dddd [kl.] LT',
            lastDay: '[i går kl.] LT',
            lastWeek: '[i] dddd[s kl.] LT',
            sameElse: 'L',
        },
        relativeTime: {
            future: 'om %s',
            past: '%s siden',
            s: 'få sekunder',
            ss: '%d sekunder',
            m: 'et minut',
            mm: '%d minutter',
            h: 'en time',
            hh: '%d timer',
            d: 'en dag',
            dd: '%d dage',
            M: 'en måned',
            MM: '%d måneder',
            y: 'et år',
            yy: '%d år',
        },
        dayOfMonthOrdinalParse: /\d{1,2}\./,
        ordinal: '%d.',
        week: {
            dow: 1, // Monday is the first day of the week.
            doy: 4, // The week that contains Jan 4th is the first week of the year.
        },
    });
 
    return da;
 
})));
 
 
/***/ }),
/* 523 */
/***/ (function(module, exports, __webpack_require__) {
 
//! moment.js locale configuration
//! locale : German [de]
//! author : lluchs : https://github.com/lluchs
//! author: Menelion Elensúle: https://github.com/Oire
//! author : Mikolaj Dadela : https://github.com/mik01aj
 
;(function (global, factory) {
    true ? factory(__webpack_require__(3)) :
   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
   factory(global.moment)
}(this, (function (moment) { 'use strict';
 
    //! moment.js locale configuration
 
    function processRelativeTime(number, withoutSuffix, key, isFuture) {
        var format = {
            m: ['eine Minute', 'einer Minute'],
            h: ['eine Stunde', 'einer Stunde'],
            d: ['ein Tag', 'einem Tag'],
            dd: [number + ' Tage', number + ' Tagen'],
            w: ['eine Woche', 'einer Woche'],
            M: ['ein Monat', 'einem Monat'],
            MM: [number + ' Monate', number + ' Monaten'],
            y: ['ein Jahr', 'einem Jahr'],
            yy: [number + ' Jahre', number + ' Jahren'],
        };
        return withoutSuffix ? format[key][0] : format[key][1];
    }
 
    var de = moment.defineLocale('de', {
        months: 'Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split(
            '_'
        ),
        monthsShort:
            'Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split('_'),
        monthsParseExact: true,
        weekdays:
            'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split(
                '_'
            ),
        weekdaysShort: 'So._Mo._Di._Mi._Do._Fr._Sa.'.split('_'),
        weekdaysMin: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),
        weekdaysParseExact: true,
        longDateFormat: {
            LT: 'HH:mm',
            LTS: 'HH:mm:ss',
            L: 'DD.MM.YYYY',
            LL: 'D. MMMM YYYY',
            LLL: 'D. MMMM YYYY HH:mm',
            LLLL: 'dddd, D. MMMM YYYY HH:mm',
        },
        calendar: {
            sameDay: '[heute um] LT [Uhr]',
            sameElse: 'L',
            nextDay: '[morgen um] LT [Uhr]',
            nextWeek: 'dddd [um] LT [Uhr]',
            lastDay: '[gestern um] LT [Uhr]',
            lastWeek: '[letzten] dddd [um] LT [Uhr]',
        },
        relativeTime: {
            future: 'in %s',
            past: 'vor %s',
            s: 'ein paar Sekunden',
            ss: '%d Sekunden',
            m: processRelativeTime,
            mm: '%d Minuten',
            h: processRelativeTime,
            hh: '%d Stunden',
            d: processRelativeTime,
            dd: processRelativeTime,
            w: processRelativeTime,
            ww: '%d Wochen',
            M: processRelativeTime,
            MM: processRelativeTime,
            y: processRelativeTime,
            yy: processRelativeTime,
        },
        dayOfMonthOrdinalParse: /\d{1,2}\./,
        ordinal: '%d.',
        week: {
            dow: 1, // Monday is the first day of the week.
            doy: 4, // The week that contains Jan 4th is the first week of the year.
        },
    });
 
    return de;
 
})));
 
 
/***/ }),
/* 524 */
/***/ (function(module, exports, __webpack_require__) {
 
//! moment.js locale configuration
//! locale : German (Austria) [de-at]
//! author : lluchs : https://github.com/lluchs
//! author: Menelion Elensúle: https://github.com/Oire
//! author : Martin Groller : https://github.com/MadMG
//! author : Mikolaj Dadela : https://github.com/mik01aj
 
;(function (global, factory) {
    true ? factory(__webpack_require__(3)) :
   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
   factory(global.moment)
}(this, (function (moment) { 'use strict';
 
    //! moment.js locale configuration
 
    function processRelativeTime(number, withoutSuffix, key, isFuture) {
        var format = {
            m: ['eine Minute', 'einer Minute'],
            h: ['eine Stunde', 'einer Stunde'],
            d: ['ein Tag', 'einem Tag'],
            dd: [number + ' Tage', number + ' Tagen'],
            w: ['eine Woche', 'einer Woche'],
            M: ['ein Monat', 'einem Monat'],
            MM: [number + ' Monate', number + ' Monaten'],
            y: ['ein Jahr', 'einem Jahr'],
            yy: [number + ' Jahre', number + ' Jahren'],
        };
        return withoutSuffix ? format[key][0] : format[key][1];
    }
 
    var deAt = moment.defineLocale('de-at', {
        months: 'Jänner_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split(
            '_'
        ),
        monthsShort:
            'Jän._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split('_'),
        monthsParseExact: true,
        weekdays:
            'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split(
                '_'
            ),
        weekdaysShort: 'So._Mo._Di._Mi._Do._Fr._Sa.'.split('_'),
        weekdaysMin: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),
        weekdaysParseExact: true,
        longDateFormat: {
            LT: 'HH:mm',
            LTS: 'HH:mm:ss',
            L: 'DD.MM.YYYY',
            LL: 'D. MMMM YYYY',
            LLL: 'D. MMMM YYYY HH:mm',
            LLLL: 'dddd, D. MMMM YYYY HH:mm',
        },
        calendar: {
            sameDay: '[heute um] LT [Uhr]',
            sameElse: 'L',
            nextDay: '[morgen um] LT [Uhr]',
            nextWeek: 'dddd [um] LT [Uhr]',
            lastDay: '[gestern um] LT [Uhr]',
            lastWeek: '[letzten] dddd [um] LT [Uhr]',
        },
        relativeTime: {
            future: 'in %s',
            past: 'vor %s',
            s: 'ein paar Sekunden',
            ss: '%d Sekunden',
            m: processRelativeTime,
            mm: '%d Minuten',
            h: processRelativeTime,
            hh: '%d Stunden',
            d: processRelativeTime,
            dd: processRelativeTime,
            w: processRelativeTime,
            ww: '%d Wochen',
            M: processRelativeTime,
            MM: processRelativeTime,
            y: processRelativeTime,
            yy: processRelativeTime,
        },
        dayOfMonthOrdinalParse: /\d{1,2}\./,
        ordinal: '%d.',
        week: {
            dow: 1, // Monday is the first day of the week.
            doy: 4, // The week that contains Jan 4th is the first week of the year.
        },
    });
 
    return deAt;
 
})));
 
 
/***/ }),
/* 525 */
/***/ (function(module, exports, __webpack_require__) {
 
//! moment.js locale configuration
//! locale : German (Switzerland) [de-ch]
//! author : sschueller : https://github.com/sschueller
 
;(function (global, factory) {
    true ? factory(__webpack_require__(3)) :
   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
   factory(global.moment)
}(this, (function (moment) { 'use strict';
 
    //! moment.js locale configuration
 
    function processRelativeTime(number, withoutSuffix, key, isFuture) {
        var format = {
            m: ['eine Minute', 'einer Minute'],
            h: ['eine Stunde', 'einer Stunde'],
            d: ['ein Tag', 'einem Tag'],
            dd: [number + ' Tage', number + ' Tagen'],
            w: ['eine Woche', 'einer Woche'],
            M: ['ein Monat', 'einem Monat'],
            MM: [number + ' Monate', number + ' Monaten'],
            y: ['ein Jahr', 'einem Jahr'],
            yy: [number + ' Jahre', number + ' Jahren'],
        };
        return withoutSuffix ? format[key][0] : format[key][1];
    }
 
    var deCh = moment.defineLocale('de-ch', {
        months: 'Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split(
            '_'
        ),
        monthsShort:
            'Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split('_'),
        monthsParseExact: true,
        weekdays:
            'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split(
                '_'
            ),
        weekdaysShort: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),
        weekdaysMin: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),
        weekdaysParseExact: true,
        longDateFormat: {
            LT: 'HH:mm',
            LTS: 'HH:mm:ss',
            L: 'DD.MM.YYYY',
            LL: 'D. MMMM YYYY',
            LLL: 'D. MMMM YYYY HH:mm',
            LLLL: 'dddd, D. MMMM YYYY HH:mm',
        },
        calendar: {
            sameDay: '[heute um] LT [Uhr]',
            sameElse: 'L',
            nextDay: '[morgen um] LT [Uhr]',
            nextWeek: 'dddd [um] LT [Uhr]',
            lastDay: '[gestern um] LT [Uhr]',
            lastWeek: '[letzten] dddd [um] LT [Uhr]',
        },
        relativeTime: {
            future: 'in %s',
            past: 'vor %s',
            s: 'ein paar Sekunden',
            ss: '%d Sekunden',
            m: processRelativeTime,
            mm: '%d Minuten',
            h: processRelativeTime,
            hh: '%d Stunden',
            d: processRelativeTime,
            dd: processRelativeTime,
            w: processRelativeTime,
            ww: '%d Wochen',
            M: processRelativeTime,
            MM: processRelativeTime,
            y: processRelativeTime,
            yy: processRelativeTime,
        },
        dayOfMonthOrdinalParse: /\d{1,2}\./,
        ordinal: '%d.',
        week: {
            dow: 1, // Monday is the first day of the week.
            doy: 4, // The week that contains Jan 4th is the first week of the year.
        },
    });
 
    return deCh;
 
})));
 
 
/***/ }),
/* 526 */
/***/ (function(module, exports, __webpack_require__) {
 
//! moment.js locale configuration
//! locale : Maldivian [dv]
//! author : Jawish Hameed : https://github.com/jawish
 
;(function (global, factory) {
    true ? factory(__webpack_require__(3)) :
   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
   factory(global.moment)
}(this, (function (moment) { 'use strict';
 
    //! moment.js locale configuration
 
    var months = [
            'ޖެނުއަރީ',
            'ފެބްރުއަރީ',
            'މާރިޗު',
            'އޭޕްރީލު',
            'މޭ',
            'ޖޫން',
            'ޖުލައި',
            'އޯގަސްޓު',
            'ސެޕްޓެމްބަރު',
            'އޮކްޓޯބަރު',
            'ނޮވެމްބަރު',
            'ޑިސެމްބަރު',
        ],
        weekdays = [
            'އާދިއްތަ',
            'ހޯމަ',
            'އަންގާރަ',
            'ބުދަ',
            'ބުރާސްފަތި',
            'ހުކުރު',
            'ހޮނިހިރު',
        ];
 
    var dv = moment.defineLocale('dv', {
        months: months,
        monthsShort: months,
        weekdays: weekdays,
        weekdaysShort: weekdays,
        weekdaysMin: 'އާދި_ހޯމަ_އަން_ބުދަ_ބުރާ_ހުކު_ހޮނި'.split('_'),
        longDateFormat: {
            LT: 'HH:mm',
            LTS: 'HH:mm:ss',
            L: 'D/M/YYYY',
            LL: 'D MMMM YYYY',
            LLL: 'D MMMM YYYY HH:mm',
            LLLL: 'dddd D MMMM YYYY HH:mm',
        },
        meridiemParse: /މކ|މފ/,
        isPM: function (input) {
            return 'މފ' === input;
        },
        meridiem: function (hour, minute, isLower) {
            if (hour < 12) {
                return 'މކ';
            } else {
                return 'މފ';
            }
        },
        calendar: {
            sameDay: '[މިއަދު] LT',
            nextDay: '[މާދަމާ] LT',
            nextWeek: 'dddd LT',
            lastDay: '[އިއްޔެ] LT',
            lastWeek: '[ފާއިތުވި] dddd LT',
            sameElse: 'L',
        },
        relativeTime: {
            future: 'ތެރޭގައި %s',
            past: 'ކުރިން %s',
            s: 'ސިކުންތުކޮޅެއް',
            ss: 'd% ސިކުންތު',
            m: 'މިނިޓެއް',
            mm: 'މިނިޓު %d',
            h: 'ގަޑިއިރެއް',
            hh: 'ގަޑިއިރު %d',
            d: 'ދުވަހެއް',
            dd: 'ދުވަސް %d',
            M: 'މަހެއް',
            MM: 'މަސް %d',
            y: 'އަހަރެއް',
            yy: 'އަހަރު %d',
        },
        preparse: function (string) {
            return string.replace(/،/g, ',');
        },
        postformat: function (string) {
            return string.replace(/,/g, '،');
        },
        week: {
            dow: 7, // Sunday is the first day of the week.
            doy: 12, // The week that contains Jan 12th is the first week of the year.
        },
    });
 
    return dv;
 
})));
 
 
/***/ }),
/* 527 */
/***/ (function(module, exports, __webpack_require__) {
 
//! moment.js locale configuration
//! locale : Greek [el]
//! author : Aggelos Karalias : https://github.com/mehiel
 
;(function (global, factory) {
    true ? factory(__webpack_require__(3)) :
   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
   factory(global.moment)
}(this, (function (moment) { 'use strict';
 
    //! moment.js locale configuration
 
    function isFunction(input) {
        return (
            (typeof Function !== 'undefined' && input instanceof Function) ||
            Object.prototype.toString.call(input) === '[object Function]'
        );
    }
 
    var el = moment.defineLocale('el', {
        monthsNominativeEl:
            'Ιανουάριος_Φεβρουάριος_Μάρτιος_Απρίλιος_Μάιος_Ιούνιος_Ιούλιος_Αύγουστος_Σεπτέμβριος_Οκτώβριος_Νοέμβριος_Δεκέμβριος'.split(
                '_'
            ),
        monthsGenitiveEl:
            'Ιανουαρίου_Φεβρουαρίου_Μαρτίου_Απριλίου_Μαΐου_Ιουνίου_Ιουλίου_Αυγούστου_Σεπτεμβρίου_Οκτωβρίου_Νοεμβρίου_Δεκεμβρίου'.split(
                '_'
            ),
        months: function (momentToFormat, format) {
            if (!momentToFormat) {
                return this._monthsNominativeEl;
            } else if (
                typeof format === 'string' &&
                /D/.test(format.substring(0, format.indexOf('MMMM')))
            ) {
                // if there is a day number before 'MMMM'
                return this._monthsGenitiveEl[momentToFormat.month()];
            } else {
                return this._monthsNominativeEl[momentToFormat.month()];
            }
        },
        monthsShort: 'Ιαν_Φεβ_Μαρ_Απρ_Μαϊ_Ιουν_Ιουλ_Αυγ_Σεπ_Οκτ_Νοε_Δεκ'.split('_'),
        weekdays: 'Κυριακή_Δευτέρα_Τρίτη_Τετάρτη_Πέμπτη_Παρασκευή_Σάββατο'.split(
            '_'
        ),
        weekdaysShort: 'Κυρ_Δευ_Τρι_Τετ_Πεμ_Παρ_Σαβ'.split('_'),
        weekdaysMin: 'Κυ_Δε_Τρ_Τε_Πε_Πα_Σα'.split('_'),
        meridiem: function (hours, minutes, isLower) {
            if (hours > 11) {
                return isLower ? 'μμ' : 'ΜΜ';
            } else {
                return isLower ? 'πμ' : 'ΠΜ';
            }
        },
        isPM: function (input) {
            return (input + '').toLowerCase()[0] === 'μ';
        },
        meridiemParse: /[ΠΜ]\.?Μ?\.?/i,
        longDateFormat: {
            LT: 'h:mm A',
            LTS: 'h:mm:ss A',
            L: 'DD/MM/YYYY',
            LL: 'D MMMM YYYY',
            LLL: 'D MMMM YYYY h:mm A',
            LLLL: 'dddd, D MMMM YYYY h:mm A',
        },
        calendarEl: {
            sameDay: '[Σήμερα {}] LT',
            nextDay: '[Αύριο {}] LT',
            nextWeek: 'dddd [{}] LT',
            lastDay: '[Χθες {}] LT',
            lastWeek: function () {
                switch (this.day()) {
                    case 6:
                        return '[το προηγούμενο] dddd [{}] LT';
                    default:
                        return '[την προηγούμενη] dddd [{}] LT';
                }
            },
            sameElse: 'L',
        },
        calendar: function (key, mom) {
            var output = this._calendarEl[key],
                hours = mom && mom.hours();
            if (isFunction(output)) {
                output = output.apply(mom);
            }
            return output.replace('{}', hours % 12 === 1 ? 'στη' : 'στις');
        },
        relativeTime: {
            future: 'σε %s',
            past: '%s πριν',
            s: 'λίγα δευτερόλεπτα',
            ss: '%d δευτερόλεπτα',
            m: 'ένα λεπτό',
            mm: '%d λεπτά',
            h: 'μία ώρα',
            hh: '%d ώρες',
            d: 'μία μέρα',
            dd: '%d μέρες',
            M: 'ένας μήνας',
            MM: '%d μήνες',
            y: 'ένας χρόνος',
            yy: '%d χρόνια',
        },
        dayOfMonthOrdinalParse: /\d{1,2}η/,
        ordinal: '%dη',
        week: {
            dow: 1, // Monday is the first day of the week.
            doy: 4, // The week that contains Jan 4st is the first week of the year.
        },
    });
 
    return el;
 
})));
 
 
/***/ }),
/* 528 */
/***/ (function(module, exports, __webpack_require__) {
 
//! moment.js locale configuration
//! locale : English (Australia) [en-au]
//! author : Jared Morse : https://github.com/jarcoal
 
;(function (global, factory) {
    true ? factory(__webpack_require__(3)) :
   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
   factory(global.moment)
}(this, (function (moment) { 'use strict';
 
    //! moment.js locale configuration
 
    var enAu = moment.defineLocale('en-au', {
        months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(
            '_'
        ),
        monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
        weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(
            '_'
        ),
        weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
        weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
        longDateFormat: {
            LT: 'h:mm A',
            LTS: 'h:mm:ss A',
            L: 'DD/MM/YYYY',
            LL: 'D MMMM YYYY',
            LLL: 'D MMMM YYYY h:mm A',
            LLLL: 'dddd, D MMMM YYYY h:mm A',
        },
        calendar: {
            sameDay: '[Today at] LT',
            nextDay: '[Tomorrow at] LT',
            nextWeek: 'dddd [at] LT',
            lastDay: '[Yesterday at] LT',
            lastWeek: '[Last] dddd [at] LT',
            sameElse: 'L',
        },
        relativeTime: {
            future: 'in %s',
            past: '%s ago',
            s: 'a few seconds',
            ss: '%d seconds',
            m: 'a minute',
            mm: '%d minutes',
            h: 'an hour',
            hh: '%d hours',
            d: 'a day',
            dd: '%d days',
            M: 'a month',
            MM: '%d months',
            y: 'a year',
            yy: '%d years',
        },
        dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
        ordinal: function (number) {
            var b = number % 10,
                output =
                    ~~((number % 100) / 10) === 1
                        ? 'th'
                        : b === 1
                        ? 'st'
                        : b === 2
                        ? 'nd'
                        : b === 3
                        ? 'rd'
                        : 'th';
            return number + output;
        },
        week: {
            dow: 0, // Sunday is the first day of the week.
            doy: 4, // The week that contains Jan 4th is the first week of the year.
        },
    });
 
    return enAu;
 
})));
 
 
/***/ }),
/* 529 */
/***/ (function(module, exports, __webpack_require__) {
 
//! moment.js locale configuration
//! locale : English (Canada) [en-ca]
//! author : Jonathan Abourbih : https://github.com/jonbca
 
;(function (global, factory) {
    true ? factory(__webpack_require__(3)) :
   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
   factory(global.moment)
}(this, (function (moment) { 'use strict';
 
    //! moment.js locale configuration
 
    var enCa = moment.defineLocale('en-ca', {
        months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(
            '_'
        ),
        monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
        weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(
            '_'
        ),
        weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
        weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
        longDateFormat: {
            LT: 'h:mm A',
            LTS: 'h:mm:ss A',
            L: 'YYYY-MM-DD',
            LL: 'MMMM D, YYYY',
            LLL: 'MMMM D, YYYY h:mm A',
            LLLL: 'dddd, MMMM D, YYYY h:mm A',
        },
        calendar: {
            sameDay: '[Today at] LT',
            nextDay: '[Tomorrow at] LT',
            nextWeek: 'dddd [at] LT',
            lastDay: '[Yesterday at] LT',
            lastWeek: '[Last] dddd [at] LT',
            sameElse: 'L',
        },
        relativeTime: {
            future: 'in %s',
            past: '%s ago',
            s: 'a few seconds',
            ss: '%d seconds',
            m: 'a minute',
            mm: '%d minutes',
            h: 'an hour',
            hh: '%d hours',
            d: 'a day',
            dd: '%d days',
            M: 'a month',
            MM: '%d months',
            y: 'a year',
            yy: '%d years',
        },
        dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
        ordinal: function (number) {
            var b = number % 10,
                output =
                    ~~((number % 100) / 10) === 1
                        ? 'th'
                        : b === 1
                        ? 'st'
                        : b === 2
                        ? 'nd'
                        : b === 3
                        ? 'rd'
                        : 'th';
            return number + output;
        },
    });
 
    return enCa;
 
})));
 
 
/***/ }),
/* 530 */
/***/ (function(module, exports, __webpack_require__) {
 
//! moment.js locale configuration
//! locale : English (United Kingdom) [en-gb]
//! author : Chris Gedrim : https://github.com/chrisgedrim
 
;(function (global, factory) {
    true ? factory(__webpack_require__(3)) :
   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
   factory(global.moment)
}(this, (function (moment) { 'use strict';
 
    //! moment.js locale configuration
 
    var enGb = moment.defineLocale('en-gb', {
        months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(
            '_'
        ),
        monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
        weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(
            '_'
        ),
        weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
        weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
        longDateFormat: {
            LT: 'HH:mm',
            LTS: 'HH:mm:ss',
            L: 'DD/MM/YYYY',
            LL: 'D MMMM YYYY',
            LLL: 'D MMMM YYYY HH:mm',
            LLLL: 'dddd, D MMMM YYYY HH:mm',
        },
        calendar: {
            sameDay: '[Today at] LT',
            nextDay: '[Tomorrow at] LT',
            nextWeek: 'dddd [at] LT',
            lastDay: '[Yesterday at] LT',
            lastWeek: '[Last] dddd [at] LT',
            sameElse: 'L',
        },
        relativeTime: {
            future: 'in %s',
            past: '%s ago',
            s: 'a few seconds',
            ss: '%d seconds',
            m: 'a minute',
            mm: '%d minutes',
            h: 'an hour',
            hh: '%d hours',
            d: 'a day',
            dd: '%d days',
            M: 'a month',
            MM: '%d months',
            y: 'a year',
            yy: '%d years',
        },
        dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
        ordinal: function (number) {
            var b = number % 10,
                output =
                    ~~((number % 100) / 10) === 1
                        ? 'th'
                        : b === 1
                        ? 'st'
                        : b === 2
                        ? 'nd'
                        : b === 3
                        ? 'rd'
                        : 'th';
            return number + output;
        },
        week: {
            dow: 1, // Monday is the first day of the week.
            doy: 4, // The week that contains Jan 4th is the first week of the year.
        },
    });
 
    return enGb;
 
})));
 
 
/***/ }),
/* 531 */
/***/ (function(module, exports, __webpack_require__) {
 
//! moment.js locale configuration
//! locale : English (Ireland) [en-ie]
//! author : Chris Cartlidge : https://github.com/chriscartlidge
 
;(function (global, factory) {
    true ? factory(__webpack_require__(3)) :
   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
   factory(global.moment)
}(this, (function (moment) { 'use strict';
 
    //! moment.js locale configuration
 
    var enIe = moment.defineLocale('en-ie', {
        months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(
            '_'
        ),
        monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
        weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(
            '_'
        ),
        weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
        weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
        longDateFormat: {
            LT: 'HH:mm',
            LTS: 'HH:mm:ss',
            L: 'DD/MM/YYYY',
            LL: 'D MMMM YYYY',
            LLL: 'D MMMM YYYY HH:mm',
            LLLL: 'dddd D MMMM YYYY HH:mm',
        },
        calendar: {
            sameDay: '[Today at] LT',
            nextDay: '[Tomorrow at] LT',
            nextWeek: 'dddd [at] LT',
            lastDay: '[Yesterday at] LT',
            lastWeek: '[Last] dddd [at] LT',
            sameElse: 'L',
        },
        relativeTime: {
            future: 'in %s',
            past: '%s ago',
            s: 'a few seconds',
            ss: '%d seconds',
            m: 'a minute',
            mm: '%d minutes',
            h: 'an hour',
            hh: '%d hours',
            d: 'a day',
            dd: '%d days',
            M: 'a month',
            MM: '%d months',
            y: 'a year',
            yy: '%d years',
        },
        dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
        ordinal: function (number) {
            var b = number % 10,
                output =
                    ~~((number % 100) / 10) === 1
                        ? 'th'
                        : b === 1
                        ? 'st'
                        : b === 2
                        ? 'nd'
                        : b === 3
                        ? 'rd'
                        : 'th';
            return number + output;
        },
        week: {
            dow: 1, // Monday is the first day of the week.
            doy: 4, // The week that contains Jan 4th is the first week of the year.
        },
    });
 
    return enIe;
 
})));
 
 
/***/ }),
/* 532 */
/***/ (function(module, exports, __webpack_require__) {
 
//! moment.js locale configuration
//! locale : English (Israel) [en-il]
//! author : Chris Gedrim : https://github.com/chrisgedrim
 
;(function (global, factory) {
    true ? factory(__webpack_require__(3)) :
   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
   factory(global.moment)
}(this, (function (moment) { 'use strict';
 
    //! moment.js locale configuration
 
    var enIl = moment.defineLocale('en-il', {
        months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(
            '_'
        ),
        monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
        weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(
            '_'
        ),
        weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
        weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
        longDateFormat: {
            LT: 'HH:mm',
            LTS: 'HH:mm:ss',
            L: 'DD/MM/YYYY',
            LL: 'D MMMM YYYY',
            LLL: 'D MMMM YYYY HH:mm',
            LLLL: 'dddd, D MMMM YYYY HH:mm',
        },
        calendar: {
            sameDay: '[Today at] LT',
            nextDay: '[Tomorrow at] LT',
            nextWeek: 'dddd [at] LT',
            lastDay: '[Yesterday at] LT',
            lastWeek: '[Last] dddd [at] LT',
            sameElse: 'L',
        },
        relativeTime: {
            future: 'in %s',
            past: '%s ago',
            s: 'a few seconds',
            ss: '%d seconds',
            m: 'a minute',
            mm: '%d minutes',
            h: 'an hour',
            hh: '%d hours',
            d: 'a day',
            dd: '%d days',
            M: 'a month',
            MM: '%d months',
            y: 'a year',
            yy: '%d years',
        },
        dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
        ordinal: function (number) {
            var b = number % 10,
                output =
                    ~~((number % 100) / 10) === 1
                        ? 'th'
                        : b === 1
                        ? 'st'
                        : b === 2
                        ? 'nd'
                        : b === 3
                        ? 'rd'
                        : 'th';
            return number + output;
        },
    });
 
    return enIl;
 
})));
 
 
/***/ }),
/* 533 */
/***/ (function(module, exports, __webpack_require__) {
 
//! moment.js locale configuration
//! locale : English (India) [en-in]
//! author : Jatin Agrawal : https://github.com/jatinag22
 
;(function (global, factory) {
    true ? factory(__webpack_require__(3)) :
   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
   factory(global.moment)
}(this, (function (moment) { 'use strict';
 
    //! moment.js locale configuration
 
    var enIn = moment.defineLocale('en-in', {
        months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(
            '_'
        ),
        monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
        weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(
            '_'
        ),
        weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
        weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
        longDateFormat: {
            LT: 'h:mm A',
            LTS: 'h:mm:ss A',
            L: 'DD/MM/YYYY',
            LL: 'D MMMM YYYY',
            LLL: 'D MMMM YYYY h:mm A',
            LLLL: 'dddd, D MMMM YYYY h:mm A',
        },
        calendar: {
            sameDay: '[Today at] LT',
            nextDay: '[Tomorrow at] LT',
            nextWeek: 'dddd [at] LT',
            lastDay: '[Yesterday at] LT',
            lastWeek: '[Last] dddd [at] LT',
            sameElse: 'L',
        },
        relativeTime: {
            future: 'in %s',
            past: '%s ago',
            s: 'a few seconds',
            ss: '%d seconds',
            m: 'a minute',
            mm: '%d minutes',
            h: 'an hour',
            hh: '%d hours',
            d: 'a day',
            dd: '%d days',
            M: 'a month',
            MM: '%d months',
            y: 'a year',
            yy: '%d years',
        },
        dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
        ordinal: function (number) {
            var b = number % 10,
                output =
                    ~~((number % 100) / 10) === 1
                        ? 'th'
                        : b === 1
                        ? 'st'
                        : b === 2
                        ? 'nd'
                        : b === 3
                        ? 'rd'
                        : 'th';
            return number + output;
        },
        week: {
            dow: 0, // Sunday is the first day of the week.
            doy: 6, // The week that contains Jan 1st is the first week of the year.
        },
    });
 
    return enIn;
 
})));
 
 
/***/ }),
/* 534 */
/***/ (function(module, exports, __webpack_require__) {
 
//! moment.js locale configuration
//! locale : English (New Zealand) [en-nz]
//! author : Luke McGregor : https://github.com/lukemcgregor
 
;(function (global, factory) {
    true ? factory(__webpack_require__(3)) :
   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
   factory(global.moment)
}(this, (function (moment) { 'use strict';
 
    //! moment.js locale configuration
 
    var enNz = moment.defineLocale('en-nz', {
        months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(
            '_'
        ),
        monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
        weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(
            '_'
        ),
        weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
        weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
        longDateFormat: {
            LT: 'h:mm A',
            LTS: 'h:mm:ss A',
            L: 'DD/MM/YYYY',
            LL: 'D MMMM YYYY',
            LLL: 'D MMMM YYYY h:mm A',
            LLLL: 'dddd, D MMMM YYYY h:mm A',
        },
        calendar: {
            sameDay: '[Today at] LT',
            nextDay: '[Tomorrow at] LT',
            nextWeek: 'dddd [at] LT',
            lastDay: '[Yesterday at] LT',
            lastWeek: '[Last] dddd [at] LT',
            sameElse: 'L',
        },
        relativeTime: {
            future: 'in %s',
            past: '%s ago',
            s: 'a few seconds',
            ss: '%d seconds',
            m: 'a minute',
            mm: '%d minutes',
            h: 'an hour',
            hh: '%d hours',
            d: 'a day',
            dd: '%d days',
            M: 'a month',
            MM: '%d months',
            y: 'a year',
            yy: '%d years',
        },
        dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
        ordinal: function (number) {
            var b = number % 10,
                output =
                    ~~((number % 100) / 10) === 1
                        ? 'th'
                        : b === 1
                        ? 'st'
                        : b === 2
                        ? 'nd'
                        : b === 3
                        ? 'rd'
                        : 'th';
            return number + output;
        },
        week: {
            dow: 1, // Monday is the first day of the week.
            doy: 4, // The week that contains Jan 4th is the first week of the year.
        },
    });
 
    return enNz;
 
})));
 
 
/***/ }),
/* 535 */
/***/ (function(module, exports, __webpack_require__) {
 
//! moment.js locale configuration
//! locale : English (Singapore) [en-sg]
//! author : Matthew Castrillon-Madrigal : https://github.com/techdimension
 
;(function (global, factory) {
    true ? factory(__webpack_require__(3)) :
   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
   factory(global.moment)
}(this, (function (moment) { 'use strict';
 
    //! moment.js locale configuration
 
    var enSg = moment.defineLocale('en-sg', {
        months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(
            '_'
        ),
        monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
        weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(
            '_'
        ),
        weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
        weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
        longDateFormat: {
            LT: 'HH:mm',
            LTS: 'HH:mm:ss',
            L: 'DD/MM/YYYY',
            LL: 'D MMMM YYYY',
            LLL: 'D MMMM YYYY HH:mm',
            LLLL: 'dddd, D MMMM YYYY HH:mm',
        },
        calendar: {
            sameDay: '[Today at] LT',
            nextDay: '[Tomorrow at] LT',
            nextWeek: 'dddd [at] LT',
            lastDay: '[Yesterday at] LT',
            lastWeek: '[Last] dddd [at] LT',
            sameElse: 'L',
        },
        relativeTime: {
            future: 'in %s',
            past: '%s ago',
            s: 'a few seconds',
            ss: '%d seconds',
            m: 'a minute',
            mm: '%d minutes',
            h: 'an hour',
            hh: '%d hours',
            d: 'a day',
            dd: '%d days',
            M: 'a month',
            MM: '%d months',
            y: 'a year',
            yy: '%d years',
        },
        dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
        ordinal: function (number) {
            var b = number % 10,
                output =
                    ~~((number % 100) / 10) === 1
                        ? 'th'
                        : b === 1
                        ? 'st'
                        : b === 2
                        ? 'nd'
                        : b === 3
                        ? 'rd'
                        : 'th';
            return number + output;
        },
        week: {
            dow: 1, // Monday is the first day of the week.
            doy: 4, // The week that contains Jan 4th is the first week of the year.
        },
    });
 
    return enSg;
 
})));
 
 
/***/ }),
/* 536 */
/***/ (function(module, exports, __webpack_require__) {
 
//! moment.js locale configuration
//! locale : Esperanto [eo]
//! author : Colin Dean : https://github.com/colindean
//! author : Mia Nordentoft Imperatori : https://github.com/miestasmia
//! comment : miestasmia corrected the translation by colindean
//! comment : Vivakvo corrected the translation by colindean and miestasmia
 
;(function (global, factory) {
    true ? factory(__webpack_require__(3)) :
   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
   factory(global.moment)
}(this, (function (moment) { 'use strict';
 
    //! moment.js locale configuration
 
    var eo = moment.defineLocale('eo', {
        months: 'januaro_februaro_marto_aprilo_majo_junio_julio_aŭgusto_septembro_oktobro_novembro_decembro'.split(
            '_'
        ),
        monthsShort: 'jan_feb_mart_apr_maj_jun_jul_aŭg_sept_okt_nov_dec'.split('_'),
        weekdays: 'dimanĉo_lundo_mardo_merkredo_ĵaŭdo_vendredo_sabato'.split('_'),
        weekdaysShort: 'dim_lun_mard_merk_ĵaŭ_ven_sab'.split('_'),
        weekdaysMin: 'di_lu_ma_me_ĵa_ve_sa'.split('_'),
        longDateFormat: {
            LT: 'HH:mm',
            LTS: 'HH:mm:ss',
            L: 'YYYY-MM-DD',
            LL: '[la] D[-an de] MMMM, YYYY',
            LLL: '[la] D[-an de] MMMM, YYYY HH:mm',
            LLLL: 'dddd[n], [la] D[-an de] MMMM, YYYY HH:mm',
            llll: 'ddd, [la] D[-an de] MMM, YYYY HH:mm',
        },
        meridiemParse: /[ap]\.t\.m/i,
        isPM: function (input) {
            return input.charAt(0).toLowerCase() === 'p';
        },
        meridiem: function (hours, minutes, isLower) {
            if (hours > 11) {
                return isLower ? 'p.t.m.' : 'P.T.M.';
            } else {
                return isLower ? 'a.t.m.' : 'A.T.M.';
            }
        },
        calendar: {
            sameDay: '[Hodiaŭ je] LT',
            nextDay: '[Morgaŭ je] LT',
            nextWeek: 'dddd[n je] LT',
            lastDay: '[Hieraŭ je] LT',
            lastWeek: '[pasintan] dddd[n je] LT',
            sameElse: 'L',
        },
        relativeTime: {
            future: 'post %s',
            past: 'antaŭ %s',
            s: 'kelkaj sekundoj',
            ss: '%d sekundoj',
            m: 'unu minuto',
            mm: '%d minutoj',
            h: 'unu horo',
            hh: '%d horoj',
            d: 'unu tago', //ne 'diurno', ĉar estas uzita por proksimumo
            dd: '%d tagoj',
            M: 'unu monato',
            MM: '%d monatoj',
            y: 'unu jaro',
            yy: '%d jaroj',
        },
        dayOfMonthOrdinalParse: /\d{1,2}a/,
        ordinal: '%da',
        week: {
            dow: 1, // Monday is the first day of the week.
            doy: 7, // The week that contains Jan 7th is the first week of the year.
        },
    });
 
    return eo;
 
})));
 
 
/***/ }),
/* 537 */
/***/ (function(module, exports, __webpack_require__) {
 
//! moment.js locale configuration
//! locale : Spanish [es]
//! author : Julio Napurí : https://github.com/julionc
 
;(function (global, factory) {
    true ? factory(__webpack_require__(3)) :
   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
   factory(global.moment)
}(this, (function (moment) { 'use strict';
 
    //! moment.js locale configuration
 
    var monthsShortDot =
            'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split(
                '_'
            ),
        monthsShort = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'),
        monthsParse = [
            /^ene/i,
            /^feb/i,
            /^mar/i,
            /^abr/i,
            /^may/i,
            /^jun/i,
            /^jul/i,
            /^ago/i,
            /^sep/i,
            /^oct/i,
            /^nov/i,
            /^dic/i,
        ],
        monthsRegex =
            /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i;
 
    var es = moment.defineLocale('es', {
        months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split(
            '_'
        ),
        monthsShort: function (m, format) {
            if (!m) {
                return monthsShortDot;
            } else if (/-MMM-/.test(format)) {
                return monthsShort[m.month()];
            } else {
                return monthsShortDot[m.month()];
            }
        },
        monthsRegex: monthsRegex,
        monthsShortRegex: monthsRegex,
        monthsStrictRegex:
            /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,
        monthsShortStrictRegex:
            /^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,
        monthsParse: monthsParse,
        longMonthsParse: monthsParse,
        shortMonthsParse: monthsParse,
        weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),
        weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),
        weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'),
        weekdaysParseExact: true,
        longDateFormat: {
            LT: 'H:mm',
            LTS: 'H:mm:ss',
            L: 'DD/MM/YYYY',
            LL: 'D [de] MMMM [de] YYYY',
            LLL: 'D [de] MMMM [de] YYYY H:mm',
            LLLL: 'dddd, D [de] MMMM [de] YYYY H:mm',
        },
        calendar: {
            sameDay: function () {
                return '[hoy a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
            },
            nextDay: function () {
                return '[mañana a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
            },
            nextWeek: function () {
                return 'dddd [a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
            },
            lastDay: function () {
                return '[ayer a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
            },
            lastWeek: function () {
                return (
                    '[el] dddd [pasado a la' +
                    (this.hours() !== 1 ? 's' : '') +
                    '] LT'
                );
            },
            sameElse: 'L',
        },
        relativeTime: {
            future: 'en %s',
            past: 'hace %s',
            s: 'unos segundos',
            ss: '%d segundos',
            m: 'un minuto',
            mm: '%d minutos',
            h: 'una hora',
            hh: '%d horas',
            d: 'un día',
            dd: '%d días',
            w: 'una semana',
            ww: '%d semanas',
            M: 'un mes',
            MM: '%d meses',
            y: 'un año',
            yy: '%d años',
        },
        dayOfMonthOrdinalParse: /\d{1,2}º/,
        ordinal: '%dº',
        week: {
            dow: 1, // Monday is the first day of the week.
            doy: 4, // The week that contains Jan 4th is the first week of the year.
        },
        invalidDate: 'Fecha inválida',
    });
 
    return es;
 
})));
 
 
/***/ }),
/* 538 */
/***/ (function(module, exports, __webpack_require__) {
 
//! moment.js locale configuration
//! locale : Spanish (Dominican Republic) [es-do]
 
;(function (global, factory) {
    true ? factory(__webpack_require__(3)) :
   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
   factory(global.moment)
}(this, (function (moment) { 'use strict';
 
    //! moment.js locale configuration
 
    var monthsShortDot =
            'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split(
                '_'
            ),
        monthsShort = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'),
        monthsParse = [
            /^ene/i,
            /^feb/i,
            /^mar/i,
            /^abr/i,
            /^may/i,
            /^jun/i,
            /^jul/i,
            /^ago/i,
            /^sep/i,
            /^oct/i,
            /^nov/i,
            /^dic/i,
        ],
        monthsRegex =
            /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i;
 
    var esDo = moment.defineLocale('es-do', {
        months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split(
            '_'
        ),
        monthsShort: function (m, format) {
            if (!m) {
                return monthsShortDot;
            } else if (/-MMM-/.test(format)) {
                return monthsShort[m.month()];
            } else {
                return monthsShortDot[m.month()];
            }
        },
        monthsRegex: monthsRegex,
        monthsShortRegex: monthsRegex,
        monthsStrictRegex:
            /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,
        monthsShortStrictRegex:
            /^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,
        monthsParse: monthsParse,
        longMonthsParse: monthsParse,
        shortMonthsParse: monthsParse,
        weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),
        weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),
        weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'),
        weekdaysParseExact: true,
        longDateFormat: {
            LT: 'h:mm A',
            LTS: 'h:mm:ss A',
            L: 'DD/MM/YYYY',
            LL: 'D [de] MMMM [de] YYYY',
            LLL: 'D [de] MMMM [de] YYYY h:mm A',
            LLLL: 'dddd, D [de] MMMM [de] YYYY h:mm A',
        },
        calendar: {
            sameDay: function () {
                return '[hoy a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
            },
            nextDay: function () {
                return '[mañana a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
            },
            nextWeek: function () {
                return 'dddd [a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
            },
            lastDay: function () {
                return '[ayer a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
            },
            lastWeek: function () {
                return (
                    '[el] dddd [pasado a la' +
                    (this.hours() !== 1 ? 's' : '') +
                    '] LT'
                );
            },
            sameElse: 'L',
        },
        relativeTime: {
            future: 'en %s',
            past: 'hace %s',
            s: 'unos segundos',
            ss: '%d segundos',
            m: 'un minuto',
            mm: '%d minutos',
            h: 'una hora',
            hh: '%d horas',
            d: 'un día',
            dd: '%d días',
            w: 'una semana',
            ww: '%d semanas',
            M: 'un mes',
            MM: '%d meses',
            y: 'un año',
            yy: '%d años',
        },
        dayOfMonthOrdinalParse: /\d{1,2}º/,
        ordinal: '%dº',
        week: {
            dow: 1, // Monday is the first day of the week.
            doy: 4, // The week that contains Jan 4th is the first week of the year.
        },
    });
 
    return esDo;
 
})));
 
 
/***/ }),
/* 539 */
/***/ (function(module, exports, __webpack_require__) {
 
//! moment.js locale configuration
//! locale : Spanish (Mexico) [es-mx]
//! author : JC Franco : https://github.com/jcfranco
 
;(function (global, factory) {
    true ? factory(__webpack_require__(3)) :
   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
   factory(global.moment)
}(this, (function (moment) { 'use strict';
 
    //! moment.js locale configuration
 
    var monthsShortDot =
            'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split(
                '_'
            ),
        monthsShort = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'),
        monthsParse = [
            /^ene/i,
            /^feb/i,
            /^mar/i,
            /^abr/i,
            /^may/i,
            /^jun/i,
            /^jul/i,
            /^ago/i,
            /^sep/i,
            /^oct/i,
            /^nov/i,
            /^dic/i,
        ],
        monthsRegex =
            /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i;
 
    var esMx = moment.defineLocale('es-mx', {
        months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split(
            '_'
        ),
        monthsShort: function (m, format) {
            if (!m) {
                return monthsShortDot;
            } else if (/-MMM-/.test(format)) {
                return monthsShort[m.month()];
            } else {
                return monthsShortDot[m.month()];
            }
        },
        monthsRegex: monthsRegex,
        monthsShortRegex: monthsRegex,
        monthsStrictRegex:
            /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,
        monthsShortStrictRegex:
            /^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,
        monthsParse: monthsParse,
        longMonthsParse: monthsParse,
        shortMonthsParse: monthsParse,
        weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),
        weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),
        weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'),
        weekdaysParseExact: true,
        longDateFormat: {
            LT: 'H:mm',
            LTS: 'H:mm:ss',
            L: 'DD/MM/YYYY',
            LL: 'D [de] MMMM [de] YYYY',
            LLL: 'D [de] MMMM [de] YYYY H:mm',
            LLLL: 'dddd, D [de] MMMM [de] YYYY H:mm',
        },
        calendar: {
            sameDay: function () {
                return '[hoy a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
            },
            nextDay: function () {
                return '[mañana a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
            },
            nextWeek: function () {
                return 'dddd [a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
            },
            lastDay: function () {
                return '[ayer a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
            },
            lastWeek: function () {
                return (
                    '[el] dddd [pasado a la' +
                    (this.hours() !== 1 ? 's' : '') +
                    '] LT'
                );
            },
            sameElse: 'L',
        },
        relativeTime: {
            future: 'en %s',
            past: 'hace %s',
            s: 'unos segundos',
            ss: '%d segundos',
            m: 'un minuto',
            mm: '%d minutos',
            h: 'una hora',
            hh: '%d horas',
            d: 'un día',
            dd: '%d días',
            w: 'una semana',
            ww: '%d semanas',
            M: 'un mes',
            MM: '%d meses',
            y: 'un año',
            yy: '%d años',
        },
        dayOfMonthOrdinalParse: /\d{1,2}º/,
        ordinal: '%dº',
        week: {
            dow: 0, // Sunday is the first day of the week.
            doy: 4, // The week that contains Jan 4th is the first week of the year.
        },
        invalidDate: 'Fecha inválida',
    });
 
    return esMx;
 
})));
 
 
/***/ }),
/* 540 */
/***/ (function(module, exports, __webpack_require__) {
 
//! moment.js locale configuration
//! locale : Spanish (United States) [es-us]
//! author : bustta : https://github.com/bustta
//! author : chrisrodz : https://github.com/chrisrodz
 
;(function (global, factory) {
    true ? factory(__webpack_require__(3)) :
   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
   factory(global.moment)
}(this, (function (moment) { 'use strict';
 
    //! moment.js locale configuration
 
    var monthsShortDot =
            'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split(
                '_'
            ),
        monthsShort = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'),
        monthsParse = [
            /^ene/i,
            /^feb/i,
            /^mar/i,
            /^abr/i,
            /^may/i,
            /^jun/i,
            /^jul/i,
            /^ago/i,
            /^sep/i,
            /^oct/i,
            /^nov/i,
            /^dic/i,
        ],
        monthsRegex =
            /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i;
 
    var esUs = moment.defineLocale('es-us', {
        months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split(
            '_'
        ),
        monthsShort: function (m, format) {
            if (!m) {
                return monthsShortDot;
            } else if (/-MMM-/.test(format)) {
                return monthsShort[m.month()];
            } else {
                return monthsShortDot[m.month()];
            }
        },
        monthsRegex: monthsRegex,
        monthsShortRegex: monthsRegex,
        monthsStrictRegex:
            /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,
        monthsShortStrictRegex:
            /^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,
        monthsParse: monthsParse,
        longMonthsParse: monthsParse,
        shortMonthsParse: monthsParse,
        weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),
        weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),
        weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'),
        weekdaysParseExact: true,
        longDateFormat: {
            LT: 'h:mm A',
            LTS: 'h:mm:ss A',
            L: 'MM/DD/YYYY',
            LL: 'D [de] MMMM [de] YYYY',
            LLL: 'D [de] MMMM [de] YYYY h:mm A',
            LLLL: 'dddd, D [de] MMMM [de] YYYY h:mm A',
        },
        calendar: {
            sameDay: function () {
                return '[hoy a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
            },
            nextDay: function () {
                return '[mañana a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
            },
            nextWeek: function () {
                return 'dddd [a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
            },
            lastDay: function () {
                return '[ayer a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
            },
            lastWeek: function () {
                return (
                    '[el] dddd [pasado a la' +
                    (this.hours() !== 1 ? 's' : '') +
                    '] LT'
                );
            },
            sameElse: 'L',
        },
        relativeTime: {
            future: 'en %s',
            past: 'hace %s',
            s: 'unos segundos',
            ss: '%d segundos',
            m: 'un minuto',
            mm: '%d minutos',
            h: 'una hora',
            hh: '%d horas',
            d: 'un día',
            dd: '%d días',
            w: 'una semana',
            ww: '%d semanas',
            M: 'un mes',
            MM: '%d meses',
            y: 'un año',
            yy: '%d años',
        },
        dayOfMonthOrdinalParse: /\d{1,2}º/,
        ordinal: '%dº',
        week: {
            dow: 0, // Sunday is the first day of the week.
            doy: 6, // The week that contains Jan 6th is the first week of the year.
        },
    });
 
    return esUs;
 
})));
 
 
/***/ }),
/* 541 */
/***/ (function(module, exports, __webpack_require__) {
 
//! moment.js locale configuration
//! locale : Estonian [et]
//! author : Henry Kehlmann : https://github.com/madhenry
//! improvements : Illimar Tambek : https://github.com/ragulka
 
;(function (global, factory) {
    true ? factory(__webpack_require__(3)) :
   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
   factory(global.moment)
}(this, (function (moment) { 'use strict';
 
    //! moment.js locale configuration
 
    function processRelativeTime(number, withoutSuffix, key, isFuture) {
        var format = {
            s: ['mõne sekundi', 'mõni sekund', 'paar sekundit'],
            ss: [number + 'sekundi', number + 'sekundit'],
            m: ['ühe minuti', 'üks minut'],
            mm: [number + ' minuti', number + ' minutit'],
            h: ['ühe tunni', 'tund aega', 'üks tund'],
            hh: [number + ' tunni', number + ' tundi'],
            d: ['ühe päeva', 'üks päev'],
            M: ['kuu aja', 'kuu aega', 'üks kuu'],
            MM: [number + ' kuu', number + ' kuud'],
            y: ['ühe aasta', 'aasta', 'üks aasta'],
            yy: [number + ' aasta', number + ' aastat'],
        };
        if (withoutSuffix) {
            return format[key][2] ? format[key][2] : format[key][1];
        }
        return isFuture ? format[key][0] : format[key][1];
    }
 
    var et = moment.defineLocale('et', {
        months: 'jaanuar_veebruar_märts_aprill_mai_juuni_juuli_august_september_oktoober_november_detsember'.split(
            '_'
        ),
        monthsShort:
            'jaan_veebr_märts_apr_mai_juuni_juuli_aug_sept_okt_nov_dets'.split('_'),
        weekdays:
            'pühapäev_esmaspäev_teisipäev_kolmapäev_neljapäev_reede_laupäev'.split(
                '_'
            ),
        weekdaysShort: 'P_E_T_K_N_R_L'.split('_'),
        weekdaysMin: 'P_E_T_K_N_R_L'.split('_'),
        longDateFormat: {
            LT: 'H:mm',
            LTS: 'H:mm:ss',
            L: 'DD.MM.YYYY',
            LL: 'D. MMMM YYYY',
            LLL: 'D. MMMM YYYY H:mm',
            LLLL: 'dddd, D. MMMM YYYY H:mm',
        },
        calendar: {
            sameDay: '[Täna,] LT',
            nextDay: '[Homme,] LT',
            nextWeek: '[Järgmine] dddd LT',
            lastDay: '[Eile,] LT',
            lastWeek: '[Eelmine] dddd LT',
            sameElse: 'L',
        },
        relativeTime: {
            future: '%s pärast',
            past: '%s tagasi',
            s: processRelativeTime,
            ss: processRelativeTime,
            m: processRelativeTime,
            mm: processRelativeTime,
            h: processRelativeTime,
            hh: processRelativeTime,
            d: processRelativeTime,
            dd: '%d päeva',
            M: processRelativeTime,
            MM: processRelativeTime,
            y: processRelativeTime,
            yy: processRelativeTime,
        },
        dayOfMonthOrdinalParse: /\d{1,2}\./,
        ordinal: '%d.',
        week: {
            dow: 1, // Monday is the first day of the week.
            doy: 4, // The week that contains Jan 4th is the first week of the year.
        },
    });
 
    return et;
 
})));
 
 
/***/ }),
/* 542 */
/***/ (function(module, exports, __webpack_require__) {
 
//! moment.js locale configuration
//! locale : Basque [eu]
//! author : Eneko Illarramendi : https://github.com/eillarra
 
;(function (global, factory) {
    true ? factory(__webpack_require__(3)) :
   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
   factory(global.moment)
}(this, (function (moment) { 'use strict';
 
    //! moment.js locale configuration
 
    var eu = moment.defineLocale('eu', {
        months: 'urtarrila_otsaila_martxoa_apirila_maiatza_ekaina_uztaila_abuztua_iraila_urria_azaroa_abendua'.split(
            '_'
        ),
        monthsShort:
            'urt._ots._mar._api._mai._eka._uzt._abu._ira._urr._aza._abe.'.split(
                '_'
            ),
        monthsParseExact: true,
        weekdays:
            'igandea_astelehena_asteartea_asteazkena_osteguna_ostirala_larunbata'.split(
                '_'
            ),
        weekdaysShort: 'ig._al._ar._az._og._ol._lr.'.split('_'),
        weekdaysMin: 'ig_al_ar_az_og_ol_lr'.split('_'),
        weekdaysParseExact: true,
        longDateFormat: {
            LT: 'HH:mm',
            LTS: 'HH:mm:ss',
            L: 'YYYY-MM-DD',
            LL: 'YYYY[ko] MMMM[ren] D[a]',
            LLL: 'YYYY[ko] MMMM[ren] D[a] HH:mm',
            LLLL: 'dddd, YYYY[ko] MMMM[ren] D[a] HH:mm',
            l: 'YYYY-M-D',
            ll: 'YYYY[ko] MMM D[a]',
            lll: 'YYYY[ko] MMM D[a] HH:mm',
            llll: 'ddd, YYYY[ko] MMM D[a] HH:mm',
        },
        calendar: {
            sameDay: '[gaur] LT[etan]',
            nextDay: '[bihar] LT[etan]',
            nextWeek: 'dddd LT[etan]',
            lastDay: '[atzo] LT[etan]',
            lastWeek: '[aurreko] dddd LT[etan]',
            sameElse: 'L',
        },
        relativeTime: {
            future: '%s barru',
            past: 'duela %s',
            s: 'segundo batzuk',
            ss: '%d segundo',
            m: 'minutu bat',
            mm: '%d minutu',
            h: 'ordu bat',
            hh: '%d ordu',
            d: 'egun bat',
            dd: '%d egun',
            M: 'hilabete bat',
            MM: '%d hilabete',
            y: 'urte bat',
            yy: '%d urte',
        },
        dayOfMonthOrdinalParse: /\d{1,2}\./,
        ordinal: '%d.',
        week: {
            dow: 1, // Monday is the first day of the week.
            doy: 7, // The week that contains Jan 7th is the first week of the year.
        },
    });
 
    return eu;
 
})));
 
 
/***/ }),
/* 543 */
/***/ (function(module, exports, __webpack_require__) {
 
//! moment.js locale configuration
//! locale : Persian [fa]
//! author : Ebrahim Byagowi : https://github.com/ebraminio
 
;(function (global, factory) {
    true ? factory(__webpack_require__(3)) :
   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
   factory(global.moment)
}(this, (function (moment) { 'use strict';
 
    //! moment.js locale configuration
 
    var symbolMap = {
            1: '۱',
            2: '۲',
            3: '۳',
            4: '۴',
            5: '۵',
            6: '۶',
            7: '۷',
            8: '۸',
            9: '۹',
            0: '۰',
        },
        numberMap = {
            '۱': '1',
            '۲': '2',
            '۳': '3',
            '۴': '4',
            '۵': '5',
            '۶': '6',
            '۷': '7',
            '۸': '8',
            '۹': '9',
            '۰': '0',
        };
 
    var fa = moment.defineLocale('fa', {
        months: 'ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر'.split(
            '_'
        ),
        monthsShort:
            'ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر'.split(
                '_'
            ),
        weekdays:
            'یک\u200cشنبه_دوشنبه_سه\u200cشنبه_چهارشنبه_پنج\u200cشنبه_جمعه_شنبه'.split(
                '_'
            ),
        weekdaysShort:
            'یک\u200cشنبه_دوشنبه_سه\u200cشنبه_چهارشنبه_پنج\u200cشنبه_جمعه_شنبه'.split(
                '_'
            ),
        weekdaysMin: 'ی_د_س_چ_پ_ج_ش'.split('_'),
        weekdaysParseExact: true,
        longDateFormat: {
            LT: 'HH:mm',
            LTS: 'HH:mm:ss',
            L: 'DD/MM/YYYY',
            LL: 'D MMMM YYYY',
            LLL: 'D MMMM YYYY HH:mm',
            LLLL: 'dddd, D MMMM YYYY HH:mm',
        },
        meridiemParse: /قبل از ظهر|بعد از ظهر/,
        isPM: function (input) {
            return /بعد از ظهر/.test(input);
        },
        meridiem: function (hour, minute, isLower) {
            if (hour < 12) {
                return 'قبل از ظهر';
            } else {
                return 'بعد از ظهر';
            }
        },
        calendar: {
            sameDay: '[امروز ساعت] LT',
            nextDay: '[فردا ساعت] LT',
            nextWeek: 'dddd [ساعت] LT',
            lastDay: '[دیروز ساعت] LT',
            lastWeek: 'dddd [پیش] [ساعت] LT',
            sameElse: 'L',
        },
        relativeTime: {
            future: 'در %s',
            past: '%s پیش',
            s: 'چند ثانیه',
            ss: '%d ثانیه',
            m: 'یک دقیقه',
            mm: '%d دقیقه',
            h: 'یک ساعت',
            hh: '%d ساعت',
            d: 'یک روز',
            dd: '%d روز',
            M: 'یک ماه',
            MM: '%d ماه',
            y: 'یک سال',
            yy: '%d سال',
        },
        preparse: function (string) {
            return string
                .replace(/[۰-۹]/g, function (match) {
                    return numberMap[match];
                })
                .replace(/،/g, ',');
        },
        postformat: function (string) {
            return string
                .replace(/\d/g, function (match) {
                    return symbolMap[match];
                })
                .replace(/,/g, '،');
        },
        dayOfMonthOrdinalParse: /\d{1,2}م/,
        ordinal: '%dم',
        week: {
            dow: 6, // Saturday is the first day of the week.
            doy: 12, // The week that contains Jan 12th is the first week of the year.
        },
    });
 
    return fa;
 
})));
 
 
/***/ }),
/* 544 */
/***/ (function(module, exports, __webpack_require__) {
 
//! moment.js locale configuration
//! locale : Finnish [fi]
//! author : Tarmo Aidantausta : https://github.com/bleadof
 
;(function (global, factory) {
    true ? factory(__webpack_require__(3)) :
   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
   factory(global.moment)
}(this, (function (moment) { 'use strict';
 
    //! moment.js locale configuration
 
    var numbersPast =
            'nolla yksi kaksi kolme neljä viisi kuusi seitsemän kahdeksan yhdeksän'.split(
                ' '
            ),
        numbersFuture = [
            'nolla',
            'yhden',
            'kahden',
            'kolmen',
            'neljän',
            'viiden',
            'kuuden',
            numbersPast[7],
            numbersPast[8],
            numbersPast[9],
        ];
    function translate(number, withoutSuffix, key, isFuture) {
        var result = '';
        switch (key) {
            case 's':
                return isFuture ? 'muutaman sekunnin' : 'muutama sekunti';
            case 'ss':
                result = isFuture ? 'sekunnin' : 'sekuntia';
                break;
            case 'm':
                return isFuture ? 'minuutin' : 'minuutti';
            case 'mm':
                result = isFuture ? 'minuutin' : 'minuuttia';
                break;
            case 'h':
                return isFuture ? 'tunnin' : 'tunti';
            case 'hh':
                result = isFuture ? 'tunnin' : 'tuntia';
                break;
            case 'd':
                return isFuture ? 'päivän' : 'päivä';
            case 'dd':
                result = isFuture ? 'päivän' : 'päivää';
                break;
            case 'M':
                return isFuture ? 'kuukauden' : 'kuukausi';
            case 'MM':
                result = isFuture ? 'kuukauden' : 'kuukautta';
                break;
            case 'y':
                return isFuture ? 'vuoden' : 'vuosi';
            case 'yy':
                result = isFuture ? 'vuoden' : 'vuotta';
                break;
        }
        result = verbalNumber(number, isFuture) + ' ' + result;
        return result;
    }
    function verbalNumber(number, isFuture) {
        return number < 10
            ? isFuture
                ? numbersFuture[number]
                : numbersPast[number]
            : number;
    }
 
    var fi = moment.defineLocale('fi', {
        months: 'tammikuu_helmikuu_maaliskuu_huhtikuu_toukokuu_kesäkuu_heinäkuu_elokuu_syyskuu_lokakuu_marraskuu_joulukuu'.split(
            '_'
        ),
        monthsShort:
            'tammi_helmi_maalis_huhti_touko_kesä_heinä_elo_syys_loka_marras_joulu'.split(
                '_'
            ),
        weekdays:
            'sunnuntai_maanantai_tiistai_keskiviikko_torstai_perjantai_lauantai'.split(
                '_'
            ),
        weekdaysShort: 'su_ma_ti_ke_to_pe_la'.split('_'),
        weekdaysMin: 'su_ma_ti_ke_to_pe_la'.split('_'),
        longDateFormat: {
            LT: 'HH.mm',
            LTS: 'HH.mm.ss',
            L: 'DD.MM.YYYY',
            LL: 'Do MMMM[ta] YYYY',
            LLL: 'Do MMMM[ta] YYYY, [klo] HH.mm',
            LLLL: 'dddd, Do MMMM[ta] YYYY, [klo] HH.mm',
            l: 'D.M.YYYY',
            ll: 'Do MMM YYYY',
            lll: 'Do MMM YYYY, [klo] HH.mm',
            llll: 'ddd, Do MMM YYYY, [klo] HH.mm',
        },
        calendar: {
            sameDay: '[tänään] [klo] LT',
            nextDay: '[huomenna] [klo] LT',
            nextWeek: 'dddd [klo] LT',
            lastDay: '[eilen] [klo] LT',
            lastWeek: '[viime] dddd[na] [klo] LT',
            sameElse: 'L',
        },
        relativeTime: {
            future: '%s päästä',
            past: '%s sitten',
            s: translate,
            ss: translate,
            m: translate,
            mm: translate,
            h: translate,
            hh: translate,
            d: translate,
            dd: translate,
            M: translate,
            MM: translate,
            y: translate,
            yy: translate,
        },
        dayOfMonthOrdinalParse: /\d{1,2}\./,
        ordinal: '%d.',
        week: {
            dow: 1, // Monday is the first day of the week.
            doy: 4, // The week that contains Jan 4th is the first week of the year.
        },
    });
 
    return fi;
 
})));
 
 
/***/ }),
/* 545 */
/***/ (function(module, exports, __webpack_require__) {
 
//! moment.js locale configuration
//! locale : Filipino [fil]
//! author : Dan Hagman : https://github.com/hagmandan
//! author : Matthew Co : https://github.com/matthewdeeco
 
;(function (global, factory) {
    true ? factory(__webpack_require__(3)) :
   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
   factory(global.moment)
}(this, (function (moment) { 'use strict';
 
    //! moment.js locale configuration
 
    var fil = moment.defineLocale('fil', {
        months: 'Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre'.split(
            '_'
        ),
        monthsShort: 'Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis'.split('_'),
        weekdays: 'Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado'.split(
            '_'
        ),
        weekdaysShort: 'Lin_Lun_Mar_Miy_Huw_Biy_Sab'.split('_'),
        weekdaysMin: 'Li_Lu_Ma_Mi_Hu_Bi_Sab'.split('_'),
        longDateFormat: {
            LT: 'HH:mm',
            LTS: 'HH:mm:ss',
            L: 'MM/D/YYYY',
            LL: 'MMMM D, YYYY',
            LLL: 'MMMM D, YYYY HH:mm',
            LLLL: 'dddd, MMMM DD, YYYY HH:mm',
        },
        calendar: {
            sameDay: 'LT [ngayong araw]',
            nextDay: '[Bukas ng] LT',
            nextWeek: 'LT [sa susunod na] dddd',
            lastDay: 'LT [kahapon]',
            lastWeek: 'LT [noong nakaraang] dddd',
            sameElse: 'L',
        },
        relativeTime: {
            future: 'sa loob ng %s',
            past: '%s ang nakalipas',
            s: 'ilang segundo',
            ss: '%d segundo',
            m: 'isang minuto',
            mm: '%d minuto',
            h: 'isang oras',
            hh: '%d oras',
            d: 'isang araw',
            dd: '%d araw',
            M: 'isang buwan',
            MM: '%d buwan',
            y: 'isang taon',
            yy: '%d taon',
        },
        dayOfMonthOrdinalParse: /\d{1,2}/,
        ordinal: function (number) {
            return number;
        },
        week: {
            dow: 1, // Monday is the first day of the week.
            doy: 4, // The week that contains Jan 4th is the first week of the year.
        },
    });
 
    return fil;
 
})));
 
 
/***/ }),
/* 546 */
/***/ (function(module, exports, __webpack_require__) {
 
//! moment.js locale configuration
//! locale : Faroese [fo]
//! author : Ragnar Johannesen : https://github.com/ragnar123
//! author : Kristian Sakarisson : https://github.com/sakarisson
 
;(function (global, factory) {
    true ? factory(__webpack_require__(3)) :
   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
   factory(global.moment)
}(this, (function (moment) { 'use strict';
 
    //! moment.js locale configuration
 
    var fo = moment.defineLocale('fo', {
        months: 'januar_februar_mars_apríl_mai_juni_juli_august_september_oktober_november_desember'.split(
            '_'
        ),
        monthsShort: 'jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des'.split('_'),
        weekdays:
            'sunnudagur_mánadagur_týsdagur_mikudagur_hósdagur_fríggjadagur_leygardagur'.split(
                '_'
            ),
        weekdaysShort: 'sun_mán_týs_mik_hós_frí_ley'.split('_'),
        weekdaysMin: 'su_má_tý_mi_hó_fr_le'.split('_'),
        longDateFormat: {
            LT: 'HH:mm',
            LTS: 'HH:mm:ss',
            L: 'DD/MM/YYYY',
            LL: 'D MMMM YYYY',
            LLL: 'D MMMM YYYY HH:mm',
            LLLL: 'dddd D. MMMM, YYYY HH:mm',
        },
        calendar: {
            sameDay: '[Í dag kl.] LT',
            nextDay: '[Í morgin kl.] LT',
            nextWeek: 'dddd [kl.] LT',
            lastDay: '[Í gjár kl.] LT',
            lastWeek: '[síðstu] dddd [kl] LT',
            sameElse: 'L',
        },
        relativeTime: {
            future: 'um %s',
            past: '%s síðani',
            s: 'fá sekund',
            ss: '%d sekundir',
            m: 'ein minuttur',
            mm: '%d minuttir',
            h: 'ein tími',
            hh: '%d tímar',
            d: 'ein dagur',
            dd: '%d dagar',
            M: 'ein mánaður',
            MM: '%d mánaðir',
            y: 'eitt ár',
            yy: '%d ár',
        },
        dayOfMonthOrdinalParse: /\d{1,2}\./,
        ordinal: '%d.',
        week: {
            dow: 1, // Monday is the first day of the week.
            doy: 4, // The week that contains Jan 4th is the first week of the year.
        },
    });
 
    return fo;
 
})));
 
 
/***/ }),
/* 547 */
/***/ (function(module, exports, __webpack_require__) {
 
//! moment.js locale configuration
//! locale : French [fr]
//! author : John Fischer : https://github.com/jfroffice
 
;(function (global, factory) {
    true ? factory(__webpack_require__(3)) :
   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
   factory(global.moment)
}(this, (function (moment) { 'use strict';
 
    //! moment.js locale configuration
 
    var monthsStrictRegex =
            /^(janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i,
        monthsShortStrictRegex =
            /(janv\.?|févr\.?|mars|avr\.?|mai|juin|juil\.?|août|sept\.?|oct\.?|nov\.?|déc\.?)/i,
        monthsRegex =
            /(janv\.?|févr\.?|mars|avr\.?|mai|juin|juil\.?|août|sept\.?|oct\.?|nov\.?|déc\.?|janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i,
        monthsParse = [
            /^janv/i,
            /^févr/i,
            /^mars/i,
            /^avr/i,
            /^mai/i,
            /^juin/i,
            /^juil/i,
            /^août/i,
            /^sept/i,
            /^oct/i,
            /^nov/i,
            /^déc/i,
        ];
 
    var fr = moment.defineLocale('fr', {
        months: 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split(
            '_'
        ),
        monthsShort:
            'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split(
                '_'
            ),
        monthsRegex: monthsRegex,
        monthsShortRegex: monthsRegex,
        monthsStrictRegex: monthsStrictRegex,
        monthsShortStrictRegex: monthsShortStrictRegex,
        monthsParse: monthsParse,
        longMonthsParse: monthsParse,
        shortMonthsParse: monthsParse,
        weekdays: 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'),
        weekdaysShort: 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'),
        weekdaysMin: 'di_lu_ma_me_je_ve_sa'.split('_'),
        weekdaysParseExact: true,
        longDateFormat: {
            LT: 'HH:mm',
            LTS: 'HH:mm:ss',
            L: 'DD/MM/YYYY',
            LL: 'D MMMM YYYY',
            LLL: 'D MMMM YYYY HH:mm',
            LLLL: 'dddd D MMMM YYYY HH:mm',
        },
        calendar: {
            sameDay: '[Aujourd’hui à] LT',
            nextDay: '[Demain à] LT',
            nextWeek: 'dddd [à] LT',
            lastDay: '[Hier à] LT',
            lastWeek: 'dddd [dernier à] LT',
            sameElse: 'L',
        },
        relativeTime: {
            future: 'dans %s',
            past: 'il y a %s',
            s: 'quelques secondes',
            ss: '%d secondes',
            m: 'une minute',
            mm: '%d minutes',
            h: 'une heure',
            hh: '%d heures',
            d: 'un jour',
            dd: '%d jours',
            w: 'une semaine',
            ww: '%d semaines',
            M: 'un mois',
            MM: '%d mois',
            y: 'un an',
            yy: '%d ans',
        },
        dayOfMonthOrdinalParse: /\d{1,2}(er|)/,
        ordinal: function (number, period) {
            switch (period) {
                // TODO: Return 'e' when day of month > 1. Move this case inside
                // block for masculine words below.
                // See https://github.com/moment/moment/issues/3375
                case 'D':
                    return number + (number === 1 ? 'er' : '');
 
                // Words with masculine grammatical gender: mois, trimestre, jour
                default:
                case 'M':
                case 'Q':
                case 'DDD':
                case 'd':
                    return number + (number === 1 ? 'er' : 'e');
 
                // Words with feminine grammatical gender: semaine
                case 'w':
                case 'W':
                    return number + (number === 1 ? 're' : 'e');
            }
        },
        week: {
            dow: 1, // Monday is the first day of the week.
            doy: 4, // The week that contains Jan 4th is the first week of the year.
        },
    });
 
    return fr;
 
})));
 
 
/***/ }),
/* 548 */
/***/ (function(module, exports, __webpack_require__) {
 
//! moment.js locale configuration
//! locale : French (Canada) [fr-ca]
//! author : Jonathan Abourbih : https://github.com/jonbca
 
;(function (global, factory) {
    true ? factory(__webpack_require__(3)) :
   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
   factory(global.moment)
}(this, (function (moment) { 'use strict';
 
    //! moment.js locale configuration
 
    var frCa = moment.defineLocale('fr-ca', {
        months: 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split(
            '_'
        ),
        monthsShort:
            'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split(
                '_'
            ),
        monthsParseExact: true,
        weekdays: 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'),
        weekdaysShort: 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'),
        weekdaysMin: 'di_lu_ma_me_je_ve_sa'.split('_'),
        weekdaysParseExact: true,
        longDateFormat: {
            LT: 'HH:mm',
            LTS: 'HH:mm:ss',
            L: 'YYYY-MM-DD',
            LL: 'D MMMM YYYY',
            LLL: 'D MMMM YYYY HH:mm',
            LLLL: 'dddd D MMMM YYYY HH:mm',
        },
        calendar: {
            sameDay: '[Aujourd’hui à] LT',
            nextDay: '[Demain à] LT',
            nextWeek: 'dddd [à] LT',
            lastDay: '[Hier à] LT',
            lastWeek: 'dddd [dernier à] LT',
            sameElse: 'L',
        },
        relativeTime: {
            future: 'dans %s',
            past: 'il y a %s',
            s: 'quelques secondes',
            ss: '%d secondes',
            m: 'une minute',
            mm: '%d minutes',
            h: 'une heure',
            hh: '%d heures',
            d: 'un jour',
            dd: '%d jours',
            M: 'un mois',
            MM: '%d mois',
            y: 'un an',
            yy: '%d ans',
        },
        dayOfMonthOrdinalParse: /\d{1,2}(er|e)/,
        ordinal: function (number, period) {
            switch (period) {
                // Words with masculine grammatical gender: mois, trimestre, jour
                default:
                case 'M':
                case 'Q':
                case 'D':
                case 'DDD':
                case 'd':
                    return number + (number === 1 ? 'er' : 'e');
 
                // Words with feminine grammatical gender: semaine
                case 'w':
                case 'W':
                    return number + (number === 1 ? 're' : 'e');
            }
        },
    });
 
    return frCa;
 
})));
 
 
/***/ }),
/* 549 */
/***/ (function(module, exports, __webpack_require__) {
 
//! moment.js locale configuration
//! locale : French (Switzerland) [fr-ch]
//! author : Gaspard Bucher : https://github.com/gaspard
 
;(function (global, factory) {
    true ? factory(__webpack_require__(3)) :
   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
   factory(global.moment)
}(this, (function (moment) { 'use strict';
 
    //! moment.js locale configuration
 
    var frCh = moment.defineLocale('fr-ch', {
        months: 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split(
            '_'
        ),
        monthsShort:
            'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split(
                '_'
            ),
        monthsParseExact: true,
        weekdays: 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'),
        weekdaysShort: 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'),
        weekdaysMin: 'di_lu_ma_me_je_ve_sa'.split('_'),
        weekdaysParseExact: true,
        longDateFormat: {
            LT: 'HH:mm',
            LTS: 'HH:mm:ss',
            L: 'DD.MM.YYYY',
            LL: 'D MMMM YYYY',
            LLL: 'D MMMM YYYY HH:mm',
            LLLL: 'dddd D MMMM YYYY HH:mm',
        },
        calendar: {
            sameDay: '[Aujourd’hui à] LT',
            nextDay: '[Demain à] LT',
            nextWeek: 'dddd [à] LT',
            lastDay: '[Hier à] LT',
            lastWeek: 'dddd [dernier à] LT',
            sameElse: 'L',
        },
        relativeTime: {
            future: 'dans %s',
            past: 'il y a %s',
            s: 'quelques secondes',
            ss: '%d secondes',
            m: 'une minute',
            mm: '%d minutes',
            h: 'une heure',
            hh: '%d heures',
            d: 'un jour',
            dd: '%d jours',
            M: 'un mois',
            MM: '%d mois',
            y: 'un an',
            yy: '%d ans',
        },
        dayOfMonthOrdinalParse: /\d{1,2}(er|e)/,
        ordinal: function (number, period) {
            switch (period) {
                // Words with masculine grammatical gender: mois, trimestre, jour
                default:
                case 'M':
                case 'Q':
                case 'D':
                case 'DDD':
                case 'd':
                    return number + (number === 1 ? 'er' : 'e');
 
                // Words with feminine grammatical gender: semaine
                case 'w':
                case 'W':
                    return number + (number === 1 ? 're' : 'e');
            }
        },
        week: {
            dow: 1, // Monday is the first day of the week.
            doy: 4, // The week that contains Jan 4th is the first week of the year.
        },
    });
 
    return frCh;
 
})));
 
 
/***/ }),
/* 550 */
/***/ (function(module, exports, __webpack_require__) {
 
//! moment.js locale configuration
//! locale : Frisian [fy]
//! author : Robin van der Vliet : https://github.com/robin0van0der0v
 
;(function (global, factory) {
    true ? factory(__webpack_require__(3)) :
   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
   factory(global.moment)
}(this, (function (moment) { 'use strict';
 
    //! moment.js locale configuration
 
    var monthsShortWithDots =
            'jan._feb._mrt._apr._mai_jun._jul._aug._sep._okt._nov._des.'.split('_'),
        monthsShortWithoutDots =
            'jan_feb_mrt_apr_mai_jun_jul_aug_sep_okt_nov_des'.split('_');
 
    var fy = moment.defineLocale('fy', {
        months: 'jannewaris_febrewaris_maart_april_maaie_juny_july_augustus_septimber_oktober_novimber_desimber'.split(
            '_'
        ),
        monthsShort: function (m, format) {
            if (!m) {
                return monthsShortWithDots;
            } else if (/-MMM-/.test(format)) {
                return monthsShortWithoutDots[m.month()];
            } else {
                return monthsShortWithDots[m.month()];
            }
        },
        monthsParseExact: true,
        weekdays: 'snein_moandei_tiisdei_woansdei_tongersdei_freed_sneon'.split(
            '_'
        ),
        weekdaysShort: 'si._mo._ti._wo._to._fr._so.'.split('_'),
        weekdaysMin: 'Si_Mo_Ti_Wo_To_Fr_So'.split('_'),
        weekdaysParseExact: true,
        longDateFormat: {
            LT: 'HH:mm',
            LTS: 'HH:mm:ss',
            L: 'DD-MM-YYYY',
            LL: 'D MMMM YYYY',
            LLL: 'D MMMM YYYY HH:mm',
            LLLL: 'dddd D MMMM YYYY HH:mm',
        },
        calendar: {
            sameDay: '[hjoed om] LT',
            nextDay: '[moarn om] LT',
            nextWeek: 'dddd [om] LT',
            lastDay: '[juster om] LT',
            lastWeek: '[ôfrûne] dddd [om] LT',
            sameElse: 'L',
        },
        relativeTime: {
            future: 'oer %s',
            past: '%s lyn',
            s: 'in pear sekonden',
            ss: '%d sekonden',
            m: 'ien minút',
            mm: '%d minuten',
            h: 'ien oere',
            hh: '%d oeren',
            d: 'ien dei',
            dd: '%d dagen',
            M: 'ien moanne',
            MM: '%d moannen',
            y: 'ien jier',
            yy: '%d jierren',
        },
        dayOfMonthOrdinalParse: /\d{1,2}(ste|de)/,
        ordinal: function (number) {
            return (
                number +
                (number === 1 || number === 8 || number >= 20 ? 'ste' : 'de')
            );
        },
        week: {
            dow: 1, // Monday is the first day of the week.
            doy: 4, // The week that contains Jan 4th is the first week of the year.
        },
    });
 
    return fy;
 
})));
 
 
/***/ }),
/* 551 */
/***/ (function(module, exports, __webpack_require__) {
 
//! moment.js locale configuration
//! locale : Irish or Irish Gaelic [ga]
//! author : André Silva : https://github.com/askpt
 
;(function (global, factory) {
    true ? factory(__webpack_require__(3)) :
   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
   factory(global.moment)
}(this, (function (moment) { 'use strict';
 
    //! moment.js locale configuration
 
    var months = [
            'Eanáir',
            'Feabhra',
            'Márta',
            'Aibreán',
            'Bealtaine',
            'Meitheamh',
            'Iúil',
            'Lúnasa',
            'Meán Fómhair',
            'Deireadh Fómhair',
            'Samhain',
            'Nollaig',
        ],
        monthsShort = [
            'Ean',
            'Feabh',
            'Márt',
            'Aib',
            'Beal',
            'Meith',
            'Iúil',
            'Lún',
            'M.F.',
            'D.F.',
            'Samh',
            'Noll',
        ],
        weekdays = [
            'Dé Domhnaigh',
            'Dé Luain',
            'Dé Máirt',
            'Dé Céadaoin',
            'Déardaoin',
            'Dé hAoine',
            'Dé Sathairn',
        ],
        weekdaysShort = ['Domh', 'Luan', 'Máirt', 'Céad', 'Déar', 'Aoine', 'Sath'],
        weekdaysMin = ['Do', 'Lu', 'Má', 'Cé', 'Dé', 'A', 'Sa'];
 
    var ga = moment.defineLocale('ga', {
        months: months,
        monthsShort: monthsShort,
        monthsParseExact: true,
        weekdays: weekdays,
        weekdaysShort: weekdaysShort,
        weekdaysMin: weekdaysMin,
        longDateFormat: {
            LT: 'HH:mm',
            LTS: 'HH:mm:ss',
            L: 'DD/MM/YYYY',
            LL: 'D MMMM YYYY',
            LLL: 'D MMMM YYYY HH:mm',
            LLLL: 'dddd, D MMMM YYYY HH:mm',
        },
        calendar: {
            sameDay: '[Inniu ag] LT',
            nextDay: '[Amárach ag] LT',
            nextWeek: 'dddd [ag] LT',
            lastDay: '[Inné ag] LT',
            lastWeek: 'dddd [seo caite] [ag] LT',
            sameElse: 'L',
        },
        relativeTime: {
            future: 'i %s',
            past: '%s ó shin',
            s: 'cúpla soicind',
            ss: '%d soicind',
            m: 'nóiméad',
            mm: '%d nóiméad',
            h: 'uair an chloig',
            hh: '%d uair an chloig',
            d: 'lá',
            dd: '%d lá',
            M: 'mí',
            MM: '%d míonna',
            y: 'bliain',
            yy: '%d bliain',
        },
        dayOfMonthOrdinalParse: /\d{1,2}(d|na|mh)/,
        ordinal: function (number) {
            var output = number === 1 ? 'd' : number % 10 === 2 ? 'na' : 'mh';
            return number + output;
        },
        week: {
            dow: 1, // Monday is the first day of the week.
            doy: 4, // The week that contains Jan 4th is the first week of the year.
        },
    });
 
    return ga;
 
})));
 
 
/***/ }),
/* 552 */
/***/ (function(module, exports, __webpack_require__) {
 
//! moment.js locale configuration
//! locale : Scottish Gaelic [gd]
//! author : Jon Ashdown : https://github.com/jonashdown
 
;(function (global, factory) {
    true ? factory(__webpack_require__(3)) :
   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
   factory(global.moment)
}(this, (function (moment) { 'use strict';
 
    //! moment.js locale configuration
 
    var months = [
            'Am Faoilleach',
            'An Gearran',
            'Am Màrt',
            'An Giblean',
            'An Cèitean',
            'An t-Ògmhios',
            'An t-Iuchar',
            'An Lùnastal',
            'An t-Sultain',
            'An Dàmhair',
            'An t-Samhain',
            'An Dùbhlachd',
        ],
        monthsShort = [
            'Faoi',
            'Gear',
            'Màrt',
            'Gibl',
            'Cèit',
            'Ògmh',
            'Iuch',
            'Lùn',
            'Sult',
            'Dàmh',
            'Samh',
            'Dùbh',
        ],
        weekdays = [
            'Didòmhnaich',
            'Diluain',
            'Dimàirt',
            'Diciadain',
            'Diardaoin',
            'Dihaoine',
            'Disathairne',
        ],
        weekdaysShort = ['Did', 'Dil', 'Dim', 'Dic', 'Dia', 'Dih', 'Dis'],
        weekdaysMin = ['Dò', 'Lu', 'Mà', 'Ci', 'Ar', 'Ha', 'Sa'];
 
    var gd = moment.defineLocale('gd', {
        months: months,
        monthsShort: monthsShort,
        monthsParseExact: true,
        weekdays: weekdays,
        weekdaysShort: weekdaysShort,
        weekdaysMin: weekdaysMin,
        longDateFormat: {
            LT: 'HH:mm',
            LTS: 'HH:mm:ss',
            L: 'DD/MM/YYYY',
            LL: 'D MMMM YYYY',
            LLL: 'D MMMM YYYY HH:mm',
            LLLL: 'dddd, D MMMM YYYY HH:mm',
        },
        calendar: {
            sameDay: '[An-diugh aig] LT',
            nextDay: '[A-màireach aig] LT',
            nextWeek: 'dddd [aig] LT',
            lastDay: '[An-dè aig] LT',
            lastWeek: 'dddd [seo chaidh] [aig] LT',
            sameElse: 'L',
        },
        relativeTime: {
            future: 'ann an %s',
            past: 'bho chionn %s',
            s: 'beagan diogan',
            ss: '%d diogan',
            m: 'mionaid',
            mm: '%d mionaidean',
            h: 'uair',
            hh: '%d uairean',
            d: 'latha',
            dd: '%d latha',
            M: 'mìos',
            MM: '%d mìosan',
            y: 'bliadhna',
            yy: '%d bliadhna',
        },
        dayOfMonthOrdinalParse: /\d{1,2}(d|na|mh)/,
        ordinal: function (number) {
            var output = number === 1 ? 'd' : number % 10 === 2 ? 'na' : 'mh';
            return number + output;
        },
        week: {
            dow: 1, // Monday is the first day of the week.
            doy: 4, // The week that contains Jan 4th is the first week of the year.
        },
    });
 
    return gd;
 
})));
 
 
/***/ }),
/* 553 */
/***/ (function(module, exports, __webpack_require__) {
 
//! moment.js locale configuration
//! locale : Galician [gl]
//! author : Juan G. Hurtado : https://github.com/juanghurtado
 
;(function (global, factory) {
    true ? factory(__webpack_require__(3)) :
   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
   factory(global.moment)
}(this, (function (moment) { 'use strict';
 
    //! moment.js locale configuration
 
    var gl = moment.defineLocale('gl', {
        months: 'xaneiro_febreiro_marzo_abril_maio_xuño_xullo_agosto_setembro_outubro_novembro_decembro'.split(
            '_'
        ),
        monthsShort:
            'xan._feb._mar._abr._mai._xuñ._xul._ago._set._out._nov._dec.'.split(
                '_'
            ),
        monthsParseExact: true,
        weekdays: 'domingo_luns_martes_mércores_xoves_venres_sábado'.split('_'),
        weekdaysShort: 'dom._lun._mar._mér._xov._ven._sáb.'.split('_'),
        weekdaysMin: 'do_lu_ma_mé_xo_ve_sá'.split('_'),
        weekdaysParseExact: true,
        longDateFormat: {
            LT: 'H:mm',
            LTS: 'H:mm:ss',
            L: 'DD/MM/YYYY',
            LL: 'D [de] MMMM [de] YYYY',
            LLL: 'D [de] MMMM [de] YYYY H:mm',
            LLLL: 'dddd, D [de] MMMM [de] YYYY H:mm',
        },
        calendar: {
            sameDay: function () {
                return '[hoxe ' + (this.hours() !== 1 ? 'ás' : 'á') + '] LT';
            },
            nextDay: function () {
                return '[mañá ' + (this.hours() !== 1 ? 'ás' : 'á') + '] LT';
            },
            nextWeek: function () {
                return 'dddd [' + (this.hours() !== 1 ? 'ás' : 'a') + '] LT';
            },
            lastDay: function () {
                return '[onte ' + (this.hours() !== 1 ? 'á' : 'a') + '] LT';
            },
            lastWeek: function () {
                return (
                    '[o] dddd [pasado ' + (this.hours() !== 1 ? 'ás' : 'a') + '] LT'
                );
            },
            sameElse: 'L',
        },
        relativeTime: {
            future: function (str) {
                if (str.indexOf('un') === 0) {
                    return 'n' + str;
                }
                return 'en ' + str;
            },
            past: 'hai %s',
            s: 'uns segundos',
            ss: '%d segundos',
            m: 'un minuto',
            mm: '%d minutos',
            h: 'unha hora',
            hh: '%d horas',
            d: 'un día',
            dd: '%d días',
            M: 'un mes',
            MM: '%d meses',
            y: 'un ano',
            yy: '%d anos',
        },
        dayOfMonthOrdinalParse: /\d{1,2}º/,
        ordinal: '%dº',
        week: {
            dow: 1, // Monday is the first day of the week.
            doy: 4, // The week that contains Jan 4th is the first week of the year.
        },
    });
 
    return gl;
 
})));
 
 
/***/ }),
/* 554 */
/***/ (function(module, exports, __webpack_require__) {
 
//! moment.js locale configuration
//! locale : Konkani Devanagari script [gom-deva]
//! author : The Discoverer : https://github.com/WikiDiscoverer
 
;(function (global, factory) {
    true ? factory(__webpack_require__(3)) :
   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
   factory(global.moment)
}(this, (function (moment) { 'use strict';
 
    //! moment.js locale configuration
 
    function processRelativeTime(number, withoutSuffix, key, isFuture) {
        var format = {
            s: ['थोडया सॅकंडांनी', 'थोडे सॅकंड'],
            ss: [number + ' सॅकंडांनी', number + ' सॅकंड'],
            m: ['एका मिणटान', 'एक मिनूट'],
            mm: [number + ' मिणटांनी', number + ' मिणटां'],
            h: ['एका वरान', 'एक वर'],
            hh: [number + ' वरांनी', number + ' वरां'],
            d: ['एका दिसान', 'एक दीस'],
            dd: [number + ' दिसांनी', number + ' दीस'],
            M: ['एका म्हयन्यान', 'एक म्हयनो'],
            MM: [number + ' म्हयन्यानी', number + ' म्हयने'],
            y: ['एका वर्सान', 'एक वर्स'],
            yy: [number + ' वर्सांनी', number + ' वर्सां'],
        };
        return isFuture ? format[key][0] : format[key][1];
    }
 
    var gomDeva = moment.defineLocale('gom-deva', {
        months: {
            standalone:
                'जानेवारी_फेब्रुवारी_मार्च_एप्रील_मे_जून_जुलय_ऑगस्ट_सप्टेंबर_ऑक्टोबर_नोव्हेंबर_डिसेंबर'.split(
                    '_'
                ),
            format: 'जानेवारीच्या_फेब्रुवारीच्या_मार्चाच्या_एप्रीलाच्या_मेयाच्या_जूनाच्या_जुलयाच्या_ऑगस्टाच्या_सप्टेंबराच्या_ऑक्टोबराच्या_नोव्हेंबराच्या_डिसेंबराच्या'.split(
                '_'
            ),
            isFormat: /MMMM(\s)+D[oD]?/,
        },
        monthsShort:
            'जाने._फेब्रु._मार्च_एप्री._मे_जून_जुल._ऑग._सप्टें._ऑक्टो._नोव्हें._डिसें.'.split(
                '_'
            ),
        monthsParseExact: true,
        weekdays: 'आयतार_सोमार_मंगळार_बुधवार_बिरेस्तार_सुक्रार_शेनवार'.split('_'),
        weekdaysShort: 'आयत._सोम._मंगळ._बुध._ब्रेस्त._सुक्र._शेन.'.split('_'),
        weekdaysMin: 'आ_सो_मं_बु_ब्रे_सु_शे'.split('_'),
        weekdaysParseExact: true,
        longDateFormat: {
            LT: 'A h:mm [वाजतां]',
            LTS: 'A h:mm:ss [वाजतां]',
            L: 'DD-MM-YYYY',
            LL: 'D MMMM YYYY',
            LLL: 'D MMMM YYYY A h:mm [वाजतां]',
            LLLL: 'dddd, MMMM Do, YYYY, A h:mm [वाजतां]',
            llll: 'ddd, D MMM YYYY, A h:mm [वाजतां]',
        },
        calendar: {
            sameDay: '[आयज] LT',
            nextDay: '[फाल्यां] LT',
            nextWeek: '[फुडलो] dddd[,] LT',
            lastDay: '[काल] LT',
            lastWeek: '[फाटलो] dddd[,] LT',
            sameElse: 'L',
        },
        relativeTime: {
            future: '%s',
            past: '%s आदीं',
            s: processRelativeTime,
            ss: processRelativeTime,
            m: processRelativeTime,
            mm: processRelativeTime,
            h: processRelativeTime,
            hh: processRelativeTime,
            d: processRelativeTime,
            dd: processRelativeTime,
            M: processRelativeTime,
            MM: processRelativeTime,
            y: processRelativeTime,
            yy: processRelativeTime,
        },
        dayOfMonthOrdinalParse: /\d{1,2}(वेर)/,
        ordinal: function (number, period) {
            switch (period) {
                // the ordinal 'वेर' only applies to day of the month
                case 'D':
                    return number + 'वेर';
                default:
                case 'M':
                case 'Q':
                case 'DDD':
                case 'd':
                case 'w':
                case 'W':
                    return number;
            }
        },
        week: {
            dow: 0, // Sunday is the first day of the week
            doy: 3, // The week that contains Jan 4th is the first week of the year (7 + 0 - 4)
        },
        meridiemParse: /राती|सकाळीं|दनपारां|सांजे/,
        meridiemHour: function (hour, meridiem) {
            if (hour === 12) {
                hour = 0;
            }
            if (meridiem === 'राती') {
                return hour < 4 ? hour : hour + 12;
            } else if (meridiem === 'सकाळीं') {
                return hour;
            } else if (meridiem === 'दनपारां') {
                return hour > 12 ? hour : hour + 12;
            } else if (meridiem === 'सांजे') {
                return hour + 12;
            }
        },
        meridiem: function (hour, minute, isLower) {
            if (hour < 4) {
                return 'राती';
            } else if (hour < 12) {
                return 'सकाळीं';
            } else if (hour < 16) {
                return 'दनपारां';
            } else if (hour < 20) {
                return 'सांजे';
            } else {
                return 'राती';
            }
        },
    });
 
    return gomDeva;
 
})));
 
 
/***/ }),
/* 555 */
/***/ (function(module, exports, __webpack_require__) {
 
//! moment.js locale configuration
//! locale : Konkani Latin script [gom-latn]
//! author : The Discoverer : https://github.com/WikiDiscoverer
 
;(function (global, factory) {
    true ? factory(__webpack_require__(3)) :
   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
   factory(global.moment)
}(this, (function (moment) { 'use strict';
 
    //! moment.js locale configuration
 
    function processRelativeTime(number, withoutSuffix, key, isFuture) {
        var format = {
            s: ['thoddea sekondamni', 'thodde sekond'],
            ss: [number + ' sekondamni', number + ' sekond'],
            m: ['eka mintan', 'ek minut'],
            mm: [number + ' mintamni', number + ' mintam'],
            h: ['eka voran', 'ek vor'],
            hh: [number + ' voramni', number + ' voram'],
            d: ['eka disan', 'ek dis'],
            dd: [number + ' disamni', number + ' dis'],
            M: ['eka mhoinean', 'ek mhoino'],
            MM: [number + ' mhoineamni', number + ' mhoine'],
            y: ['eka vorsan', 'ek voros'],
            yy: [number + ' vorsamni', number + ' vorsam'],
        };
        return isFuture ? format[key][0] : format[key][1];
    }
 
    var gomLatn = moment.defineLocale('gom-latn', {
        months: {
            standalone:
                'Janer_Febrer_Mars_Abril_Mai_Jun_Julai_Agost_Setembr_Otubr_Novembr_Dezembr'.split(
                    '_'
                ),
            format: 'Janerachea_Febrerachea_Marsachea_Abrilachea_Maiachea_Junachea_Julaiachea_Agostachea_Setembrachea_Otubrachea_Novembrachea_Dezembrachea'.split(
                '_'
            ),
            isFormat: /MMMM(\s)+D[oD]?/,
        },
        monthsShort:
            'Jan._Feb._Mars_Abr._Mai_Jun_Jul._Ago._Set._Otu._Nov._Dez.'.split('_'),
        monthsParseExact: true,
        weekdays: "Aitar_Somar_Mongllar_Budhvar_Birestar_Sukrar_Son'var".split('_'),
        weekdaysShort: 'Ait._Som._Mon._Bud._Bre._Suk._Son.'.split('_'),
        weekdaysMin: 'Ai_Sm_Mo_Bu_Br_Su_Sn'.split('_'),
        weekdaysParseExact: true,
        longDateFormat: {
            LT: 'A h:mm [vazta]',
            LTS: 'A h:mm:ss [vazta]',
            L: 'DD-MM-YYYY',
            LL: 'D MMMM YYYY',
            LLL: 'D MMMM YYYY A h:mm [vazta]',
            LLLL: 'dddd, MMMM Do, YYYY, A h:mm [vazta]',
            llll: 'ddd, D MMM YYYY, A h:mm [vazta]',
        },
        calendar: {
            sameDay: '[Aiz] LT',
            nextDay: '[Faleam] LT',
            nextWeek: '[Fuddlo] dddd[,] LT',
            lastDay: '[Kal] LT',
            lastWeek: '[Fattlo] dddd[,] LT',
            sameElse: 'L',
        },
        relativeTime: {
            future: '%s',
            past: '%s adim',
            s: processRelativeTime,
            ss: processRelativeTime,
            m: processRelativeTime,
            mm: processRelativeTime,
            h: processRelativeTime,
            hh: processRelativeTime,
            d: processRelativeTime,
            dd: processRelativeTime,
            M: processRelativeTime,
            MM: processRelativeTime,
            y: processRelativeTime,
            yy: processRelativeTime,
        },
        dayOfMonthOrdinalParse: /\d{1,2}(er)/,
        ordinal: function (number, period) {
            switch (period) {
                // the ordinal 'er' only applies to day of the month
                case 'D':
                    return number + 'er';
                default:
                case 'M':
                case 'Q':
                case 'DDD':
                case 'd':
                case 'w':
                case 'W':
                    return number;
            }
        },
        week: {
            dow: 0, // Sunday is the first day of the week
            doy: 3, // The week that contains Jan 4th is the first week of the year (7 + 0 - 4)
        },
        meridiemParse: /rati|sokallim|donparam|sanje/,
        meridiemHour: function (hour, meridiem) {
            if (hour === 12) {
                hour = 0;
            }
            if (meridiem === 'rati') {
                return hour < 4 ? hour : hour + 12;
            } else if (meridiem === 'sokallim') {
                return hour;
            } else if (meridiem === 'donparam') {
                return hour > 12 ? hour : hour + 12;
            } else if (meridiem === 'sanje') {
                return hour + 12;
            }
        },
        meridiem: function (hour, minute, isLower) {
            if (hour < 4) {
                return 'rati';
            } else if (hour < 12) {
                return 'sokallim';
            } else if (hour < 16) {
                return 'donparam';
            } else if (hour < 20) {
                return 'sanje';
            } else {
                return 'rati';
            }
        },
    });
 
    return gomLatn;
 
})));
 
 
/***/ }),
/* 556 */
/***/ (function(module, exports, __webpack_require__) {
 
//! moment.js locale configuration
//! locale : Gujarati [gu]
//! author : Kaushik Thanki : https://github.com/Kaushik1987
 
;(function (global, factory) {
    true ? factory(__webpack_require__(3)) :
   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
   factory(global.moment)
}(this, (function (moment) { 'use strict';
 
    //! moment.js locale configuration
 
    var symbolMap = {
            1: '૧',
            2: '૨',
            3: '૩',
            4: '૪',
            5: '૫',
            6: '૬',
            7: '૭',
            8: '૮',
            9: '૯',
            0: '૦',
        },
        numberMap = {
            '૧': '1',
            '૨': '2',
            '૩': '3',
            '૪': '4',
            '૫': '5',
            '૬': '6',
            '૭': '7',
            '૮': '8',
            '૯': '9',
            '૦': '0',
        };
 
    var gu = moment.defineLocale('gu', {
        months: 'જાન્યુઆરી_ફેબ્રુઆરી_માર્ચ_એપ્રિલ_મે_જૂન_જુલાઈ_ઑગસ્ટ_સપ્ટેમ્બર_ઑક્ટ્બર_નવેમ્બર_ડિસેમ્બર'.split(
            '_'
        ),
        monthsShort:
            'જાન્યુ._ફેબ્રુ._માર્ચ_એપ્રિ._મે_જૂન_જુલા._ઑગ._સપ્ટે._ઑક્ટ્._નવે._ડિસે.'.split(
                '_'
            ),
        monthsParseExact: true,
        weekdays: 'રવિવાર_સોમવાર_મંગળવાર_બુધ્વાર_ગુરુવાર_શુક્રવાર_શનિવાર'.split(
            '_'
        ),
        weekdaysShort: 'રવિ_સોમ_મંગળ_બુધ્_ગુરુ_શુક્ર_શનિ'.split('_'),
        weekdaysMin: 'ર_સો_મં_બુ_ગુ_શુ_શ'.split('_'),
        longDateFormat: {
            LT: 'A h:mm વાગ્યે',
            LTS: 'A h:mm:ss વાગ્યે',
            L: 'DD/MM/YYYY',
            LL: 'D MMMM YYYY',
            LLL: 'D MMMM YYYY, A h:mm વાગ્યે',
            LLLL: 'dddd, D MMMM YYYY, A h:mm વાગ્યે',
        },
        calendar: {
            sameDay: '[આજ] LT',
            nextDay: '[કાલે] LT',
            nextWeek: 'dddd, LT',
            lastDay: '[ગઇકાલે] LT',
            lastWeek: '[પાછલા] dddd, LT',
            sameElse: 'L',
        },
        relativeTime: {
            future: '%s મા',
            past: '%s પહેલા',
            s: 'અમુક પળો',
            ss: '%d સેકંડ',
            m: 'એક મિનિટ',
            mm: '%d મિનિટ',
            h: 'એક કલાક',
            hh: '%d કલાક',
            d: 'એક દિવસ',
            dd: '%d દિવસ',
            M: 'એક મહિનો',
            MM: '%d મહિનો',
            y: 'એક વર્ષ',
            yy: '%d વર્ષ',
        },
        preparse: function (string) {
            return string.replace(/[૧૨૩૪૫૬૭૮૯૦]/g, function (match) {
                return numberMap[match];
            });
        },
        postformat: function (string) {
            return string.replace(/\d/g, function (match) {
                return symbolMap[match];
            });
        },
        // Gujarati notation for meridiems are quite fuzzy in practice. While there exists
        // a rigid notion of a 'Pahar' it is not used as rigidly in modern Gujarati.
        meridiemParse: /રાત|બપોર|સવાર|સાંજ/,
        meridiemHour: function (hour, meridiem) {
            if (hour === 12) {
                hour = 0;
            }
            if (meridiem === 'રાત') {
                return hour < 4 ? hour : hour + 12;
            } else if (meridiem === 'સવાર') {
                return hour;
            } else if (meridiem === 'બપોર') {
                return hour >= 10 ? hour : hour + 12;
            } else if (meridiem === 'સાંજ') {
                return hour + 12;
            }
        },
        meridiem: function (hour, minute, isLower) {
            if (hour < 4) {
                return 'રાત';
            } else if (hour < 10) {
                return 'સવાર';
            } else if (hour < 17) {
                return 'બપોર';
            } else if (hour < 20) {
                return 'સાંજ';
            } else {
                return 'રાત';
            }
        },
        week: {
            dow: 0, // Sunday is the first day of the week.
            doy: 6, // The week that contains Jan 6th is the first week of the year.
        },
    });
 
    return gu;
 
})));
 
 
/***/ }),
/* 557 */
/***/ (function(module, exports, __webpack_require__) {
 
//! moment.js locale configuration
//! locale : Hebrew [he]
//! author : Tomer Cohen : https://github.com/tomer
//! author : Moshe Simantov : https://github.com/DevelopmentIL
//! author : Tal Ater : https://github.com/TalAter
 
;(function (global, factory) {
    true ? factory(__webpack_require__(3)) :
   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
   factory(global.moment)
}(this, (function (moment) { 'use strict';
 
    //! moment.js locale configuration
 
    var he = moment.defineLocale('he', {
        months: 'ינואר_פברואר_מרץ_אפריל_מאי_יוני_יולי_אוגוסט_ספטמבר_אוקטובר_נובמבר_דצמבר'.split(
            '_'
        ),
        monthsShort:
            'ינו׳_פבר׳_מרץ_אפר׳_מאי_יוני_יולי_אוג׳_ספט׳_אוק׳_נוב׳_דצמ׳'.split('_'),
        weekdays: 'ראשון_שני_שלישי_רביעי_חמישי_שישי_שבת'.split('_'),
        weekdaysShort: 'א׳_ב׳_ג׳_ד׳_ה׳_ו׳_ש׳'.split('_'),
        weekdaysMin: 'א_ב_ג_ד_ה_ו_ש'.split('_'),
        longDateFormat: {
            LT: 'HH:mm',
            LTS: 'HH:mm:ss',
            L: 'DD/MM/YYYY',
            LL: 'D [ב]MMMM YYYY',
            LLL: 'D [ב]MMMM YYYY HH:mm',
            LLLL: 'dddd, D [ב]MMMM YYYY HH:mm',
            l: 'D/M/YYYY',
            ll: 'D MMM YYYY',
            lll: 'D MMM YYYY HH:mm',
            llll: 'ddd, D MMM YYYY HH:mm',
        },
        calendar: {
            sameDay: '[היום ב־]LT',
            nextDay: '[מחר ב־]LT',
            nextWeek: 'dddd [בשעה] LT',
            lastDay: '[אתמול ב־]LT',
            lastWeek: '[ביום] dddd [האחרון בשעה] LT',
            sameElse: 'L',
        },
        relativeTime: {
            future: 'בעוד %s',
            past: 'לפני %s',
            s: 'מספר שניות',
            ss: '%d שניות',
            m: 'דקה',
            mm: '%d דקות',
            h: 'שעה',
            hh: function (number) {
                if (number === 2) {
                    return 'שעתיים';
                }
                return number + ' שעות';
            },
            d: 'יום',
            dd: function (number) {
                if (number === 2) {
                    return 'יומיים';
                }
                return number + ' ימים';
            },
            M: 'חודש',
            MM: function (number) {
                if (number === 2) {
                    return 'חודשיים';
                }
                return number + ' חודשים';
            },
            y: 'שנה',
            yy: function (number) {
                if (number === 2) {
                    return 'שנתיים';
                } else if (number % 10 === 0 && number !== 10) {
                    return number + ' שנה';
                }
                return number + ' שנים';
            },
        },
        meridiemParse:
            /אחה"צ|לפנה"צ|אחרי הצהריים|לפני הצהריים|לפנות בוקר|בבוקר|בערב/i,
        isPM: function (input) {
            return /^(אחה"צ|אחרי הצהריים|בערב)$/.test(input);
        },
        meridiem: function (hour, minute, isLower) {
            if (hour < 5) {
                return 'לפנות בוקר';
            } else if (hour < 10) {
                return 'בבוקר';
            } else if (hour < 12) {
                return isLower ? 'לפנה"צ' : 'לפני הצהריים';
            } else if (hour < 18) {
                return isLower ? 'אחה"צ' : 'אחרי הצהריים';
            } else {
                return 'בערב';
            }
        },
    });
 
    return he;
 
})));
 
 
/***/ }),
/* 558 */
/***/ (function(module, exports, __webpack_require__) {
 
//! moment.js locale configuration
//! locale : Hindi [hi]
//! author : Mayank Singhal : https://github.com/mayanksinghal
 
;(function (global, factory) {
    true ? factory(__webpack_require__(3)) :
   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
   factory(global.moment)
}(this, (function (moment) { 'use strict';
 
    //! moment.js locale configuration
 
    var symbolMap = {
            1: '१',
            2: '२',
            3: '३',
            4: '४',
            5: '५',
            6: '६',
            7: '७',
            8: '८',
            9: '९',
            0: '०',
        },
        numberMap = {
            '१': '1',
            '२': '2',
            '३': '3',
            '४': '4',
            '५': '5',
            '६': '6',
            '७': '7',
            '८': '8',
            '९': '9',
            '०': '0',
        },
        monthsParse = [
            /^जन/i,
            /^फ़र|फर/i,
            /^मार्च/i,
            /^अप्रै/i,
            /^मई/i,
            /^जून/i,
            /^जुल/i,
            /^अग/i,
            /^सितं|सित/i,
            /^अक्टू/i,
            /^नव|नवं/i,
            /^दिसं|दिस/i,
        ],
        shortMonthsParse = [
            /^जन/i,
            /^फ़र/i,
            /^मार्च/i,
            /^अप्रै/i,
            /^मई/i,
            /^जून/i,
            /^जुल/i,
            /^अग/i,
            /^सित/i,
            /^अक्टू/i,
            /^नव/i,
            /^दिस/i,
        ];
 
    var hi = moment.defineLocale('hi', {
        months: {
            format: 'जनवरी_फ़रवरी_मार्च_अप्रैल_मई_जून_जुलाई_अगस्त_सितम्बर_अक्टूबर_नवम्बर_दिसम्बर'.split(
                '_'
            ),
            standalone:
                'जनवरी_फरवरी_मार्च_अप्रैल_मई_जून_जुलाई_अगस्त_सितंबर_अक्टूबर_नवंबर_दिसंबर'.split(
                    '_'
                ),
        },
        monthsShort:
            'जन._फ़र._मार्च_अप्रै._मई_जून_जुल._अग._सित._अक्टू._नव._दिस.'.split('_'),
        weekdays: 'रविवार_सोमवार_मंगलवार_बुधवार_गुरूवार_शुक्रवार_शनिवार'.split('_'),
        weekdaysShort: 'रवि_सोम_मंगल_बुध_गुरू_शुक्र_शनि'.split('_'),
        weekdaysMin: 'र_सो_मं_बु_गु_शु_श'.split('_'),
        longDateFormat: {
            LT: 'A h:mm बजे',
            LTS: 'A h:mm:ss बजे',
            L: 'DD/MM/YYYY',
            LL: 'D MMMM YYYY',
            LLL: 'D MMMM YYYY, A h:mm बजे',
            LLLL: 'dddd, D MMMM YYYY, A h:mm बजे',
        },
 
        monthsParse: monthsParse,
        longMonthsParse: monthsParse,
        shortMonthsParse: shortMonthsParse,
 
        monthsRegex:
            /^(जनवरी|जन\.?|फ़रवरी|फरवरी|फ़र\.?|मार्च?|अप्रैल|अप्रै\.?|मई?|जून?|जुलाई|जुल\.?|अगस्त|अग\.?|सितम्बर|सितंबर|सित\.?|अक्टूबर|अक्टू\.?|नवम्बर|नवंबर|नव\.?|दिसम्बर|दिसंबर|दिस\.?)/i,
 
        monthsShortRegex:
            /^(जनवरी|जन\.?|फ़रवरी|फरवरी|फ़र\.?|मार्च?|अप्रैल|अप्रै\.?|मई?|जून?|जुलाई|जुल\.?|अगस्त|अग\.?|सितम्बर|सितंबर|सित\.?|अक्टूबर|अक्टू\.?|नवम्बर|नवंबर|नव\.?|दिसम्बर|दिसंबर|दिस\.?)/i,
 
        monthsStrictRegex:
            /^(जनवरी?|फ़रवरी|फरवरी?|मार्च?|अप्रैल?|मई?|जून?|जुलाई?|अगस्त?|सितम्बर|सितंबर|सित?\.?|अक्टूबर|अक्टू\.?|नवम्बर|नवंबर?|दिसम्बर|दिसंबर?)/i,
 
        monthsShortStrictRegex:
            /^(जन\.?|फ़र\.?|मार्च?|अप्रै\.?|मई?|जून?|जुल\.?|अग\.?|सित\.?|अक्टू\.?|नव\.?|दिस\.?)/i,
 
        calendar: {
            sameDay: '[आज] LT',
            nextDay: '[कल] LT',
            nextWeek: 'dddd, LT',
            lastDay: '[कल] LT',
            lastWeek: '[पिछले] dddd, LT',
            sameElse: 'L',
        },
        relativeTime: {
            future: '%s में',
            past: '%s पहले',
            s: 'कुछ ही क्षण',
            ss: '%d सेकंड',
            m: 'एक मिनट',
            mm: '%d मिनट',
            h: 'एक घंटा',
            hh: '%d घंटे',
            d: 'एक दिन',
            dd: '%d दिन',
            M: 'एक महीने',
            MM: '%d महीने',
            y: 'एक वर्ष',
            yy: '%d वर्ष',
        },
        preparse: function (string) {
            return string.replace(/[१२३४५६७८९०]/g, function (match) {
                return numberMap[match];
            });
        },
        postformat: function (string) {
            return string.replace(/\d/g, function (match) {
                return symbolMap[match];
            });
        },
        // Hindi notation for meridiems are quite fuzzy in practice. While there exists
        // a rigid notion of a 'Pahar' it is not used as rigidly in modern Hindi.
        meridiemParse: /रात|सुबह|दोपहर|शाम/,
        meridiemHour: function (hour, meridiem) {
            if (hour === 12) {
                hour = 0;
            }
            if (meridiem === 'रात') {
                return hour < 4 ? hour : hour + 12;
            } else if (meridiem === 'सुबह') {
                return hour;
            } else if (meridiem === 'दोपहर') {
                return hour >= 10 ? hour : hour + 12;
            } else if (meridiem === 'शाम') {
                return hour + 12;
            }
        },
        meridiem: function (hour, minute, isLower) {
            if (hour < 4) {
                return 'रात';
            } else if (hour < 10) {
                return 'सुबह';
            } else if (hour < 17) {
                return 'दोपहर';
            } else if (hour < 20) {
                return 'शाम';
            } else {
                return 'रात';
            }
        },
        week: {
            dow: 0, // Sunday is the first day of the week.
            doy: 6, // The week that contains Jan 6th is the first week of the year.
        },
    });
 
    return hi;
 
})));
 
 
/***/ }),
/* 559 */
/***/ (function(module, exports, __webpack_require__) {
 
//! moment.js locale configuration
//! locale : Croatian [hr]
//! author : Bojan Marković : https://github.com/bmarkovic
 
;(function (global, factory) {
    true ? factory(__webpack_require__(3)) :
   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
   factory(global.moment)
}(this, (function (moment) { 'use strict';
 
    //! moment.js locale configuration
 
    function translate(number, withoutSuffix, key) {
        var result = number + ' ';
        switch (key) {
            case 'ss':
                if (number === 1) {
                    result += 'sekunda';
                } else if (number === 2 || number === 3 || number === 4) {
                    result += 'sekunde';
                } else {
                    result += 'sekundi';
                }
                return result;
            case 'm':
                return withoutSuffix ? 'jedna minuta' : 'jedne minute';
            case 'mm':
                if (number === 1) {
                    result += 'minuta';
                } else if (number === 2 || number === 3 || number === 4) {
                    result += 'minute';
                } else {
                    result += 'minuta';
                }
                return result;
            case 'h':
                return withoutSuffix ? 'jedan sat' : 'jednog sata';
            case 'hh':
                if (number === 1) {
                    result += 'sat';
                } else if (number === 2 || number === 3 || number === 4) {
                    result += 'sata';
                } else {
                    result += 'sati';
                }
                return result;
            case 'dd':
                if (number === 1) {
                    result += 'dan';
                } else {
                    result += 'dana';
                }
                return result;
            case 'MM':
                if (number === 1) {
                    result += 'mjesec';
                } else if (number === 2 || number === 3 || number === 4) {
                    result += 'mjeseca';
                } else {
                    result += 'mjeseci';
                }
                return result;
            case 'yy':
                if (number === 1) {
                    result += 'godina';
                } else if (number === 2 || number === 3 || number === 4) {
                    result += 'godine';
                } else {
                    result += 'godina';
                }
                return result;
        }
    }
 
    var hr = moment.defineLocale('hr', {
        months: {
            format: 'siječnja_veljače_ožujka_travnja_svibnja_lipnja_srpnja_kolovoza_rujna_listopada_studenoga_prosinca'.split(
                '_'
            ),
            standalone:
                'siječanj_veljača_ožujak_travanj_svibanj_lipanj_srpanj_kolovoz_rujan_listopad_studeni_prosinac'.split(
                    '_'
                ),
        },
        monthsShort:
            'sij._velj._ožu._tra._svi._lip._srp._kol._ruj._lis._stu._pro.'.split(
                '_'
            ),
        monthsParseExact: true,
        weekdays: 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split(
            '_'
        ),
        weekdaysShort: 'ned._pon._uto._sri._čet._pet._sub.'.split('_'),
        weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'),
        weekdaysParseExact: true,
        longDateFormat: {
            LT: 'H:mm',
            LTS: 'H:mm:ss',
            L: 'DD.MM.YYYY',
            LL: 'Do MMMM YYYY',
            LLL: 'Do MMMM YYYY H:mm',
            LLLL: 'dddd, Do MMMM YYYY H:mm',
        },
        calendar: {
            sameDay: '[danas u] LT',
            nextDay: '[sutra u] LT',
            nextWeek: function () {
                switch (this.day()) {
                    case 0:
                        return '[u] [nedjelju] [u] LT';
                    case 3:
                        return '[u] [srijedu] [u] LT';
                    case 6:
                        return '[u] [subotu] [u] LT';
                    case 1:
                    case 2:
                    case 4:
                    case 5:
                        return '[u] dddd [u] LT';
                }
            },
            lastDay: '[jučer u] LT',
            lastWeek: function () {
                switch (this.day()) {
                    case 0:
                        return '[prošlu] [nedjelju] [u] LT';
                    case 3:
                        return '[prošlu] [srijedu] [u] LT';
                    case 6:
                        return '[prošle] [subote] [u] LT';
                    case 1:
                    case 2:
                    case 4:
                    case 5:
                        return '[prošli] dddd [u] LT';
                }
            },
            sameElse: 'L',
        },
        relativeTime: {
            future: 'za %s',
            past: 'prije %s',
            s: 'par sekundi',
            ss: translate,
            m: translate,
            mm: translate,
            h: translate,
            hh: translate,
            d: 'dan',
            dd: translate,
            M: 'mjesec',
            MM: translate,
            y: 'godinu',
            yy: translate,
        },
        dayOfMonthOrdinalParse: /\d{1,2}\./,
        ordinal: '%d.',
        week: {
            dow: 1, // Monday is the first day of the week.
            doy: 7, // The week that contains Jan 7th is the first week of the year.
        },
    });
 
    return hr;
 
})));
 
 
/***/ }),
/* 560 */
/***/ (function(module, exports, __webpack_require__) {
 
//! moment.js locale configuration
//! locale : Hungarian [hu]
//! author : Adam Brunner : https://github.com/adambrunner
//! author : Peter Viszt  : https://github.com/passatgt
 
;(function (global, factory) {
    true ? factory(__webpack_require__(3)) :
   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
   factory(global.moment)
}(this, (function (moment) { 'use strict';
 
    //! moment.js locale configuration
 
    var weekEndings =
        'vasárnap hétfőn kedden szerdán csütörtökön pénteken szombaton'.split(' ');
    function translate(number, withoutSuffix, key, isFuture) {
        var num = number;
        switch (key) {
            case 's':
                return isFuture || withoutSuffix
                    ? 'néhány másodperc'
                    : 'néhány másodperce';
            case 'ss':
                return num + (isFuture || withoutSuffix)
                    ? ' másodperc'
                    : ' másodperce';
            case 'm':
                return 'egy' + (isFuture || withoutSuffix ? ' perc' : ' perce');
            case 'mm':
                return num + (isFuture || withoutSuffix ? ' perc' : ' perce');
            case 'h':
                return 'egy' + (isFuture || withoutSuffix ? ' óra' : ' órája');
            case 'hh':
                return num + (isFuture || withoutSuffix ? ' óra' : ' órája');
            case 'd':
                return 'egy' + (isFuture || withoutSuffix ? ' nap' : ' napja');
            case 'dd':
                return num + (isFuture || withoutSuffix ? ' nap' : ' napja');
            case 'M':
                return 'egy' + (isFuture || withoutSuffix ? ' hónap' : ' hónapja');
            case 'MM':
                return num + (isFuture || withoutSuffix ? ' hónap' : ' hónapja');
            case 'y':
                return 'egy' + (isFuture || withoutSuffix ? ' év' : ' éve');
            case 'yy':
                return num + (isFuture || withoutSuffix ? ' év' : ' éve');
        }
        return '';
    }
    function week(isFuture) {
        return (
            (isFuture ? '' : '[múlt] ') +
            '[' +
            weekEndings[this.day()] +
            '] LT[-kor]'
        );
    }
 
    var hu = moment.defineLocale('hu', {
        months: 'január_február_március_április_május_június_július_augusztus_szeptember_október_november_december'.split(
            '_'
        ),
        monthsShort:
            'jan._feb._márc._ápr._máj._jún._júl._aug._szept._okt._nov._dec.'.split(
                '_'
            ),
        monthsParseExact: true,
        weekdays: 'vasárnap_hétfő_kedd_szerda_csütörtök_péntek_szombat'.split('_'),
        weekdaysShort: 'vas_hét_kedd_sze_csüt_pén_szo'.split('_'),
        weekdaysMin: 'v_h_k_sze_cs_p_szo'.split('_'),
        longDateFormat: {
            LT: 'H:mm',
            LTS: 'H:mm:ss',
            L: 'YYYY.MM.DD.',
            LL: 'YYYY. MMMM D.',
            LLL: 'YYYY. MMMM D. H:mm',
            LLLL: 'YYYY. MMMM D., dddd H:mm',
        },
        meridiemParse: /de|du/i,
        isPM: function (input) {
            return input.charAt(1).toLowerCase() === 'u';
        },
        meridiem: function (hours, minutes, isLower) {
            if (hours < 12) {
                return isLower === true ? 'de' : 'DE';
            } else {
                return isLower === true ? 'du' : 'DU';
            }
        },
        calendar: {
            sameDay: '[ma] LT[-kor]',
            nextDay: '[holnap] LT[-kor]',
            nextWeek: function () {
                return week.call(this, true);
            },
            lastDay: '[tegnap] LT[-kor]',
            lastWeek: function () {
                return week.call(this, false);
            },
            sameElse: 'L',
        },
        relativeTime: {
            future: '%s múlva',
            past: '%s',
            s: translate,
            ss: translate,
            m: translate,
            mm: translate,
            h: translate,
            hh: translate,
            d: translate,
            dd: translate,
            M: translate,
            MM: translate,
            y: translate,
            yy: translate,
        },
        dayOfMonthOrdinalParse: /\d{1,2}\./,
        ordinal: '%d.',
        week: {
            dow: 1, // Monday is the first day of the week.
            doy: 4, // The week that contains Jan 4th is the first week of the year.
        },
    });
 
    return hu;
 
})));
 
 
/***/ }),
/* 561 */
/***/ (function(module, exports, __webpack_require__) {
 
//! moment.js locale configuration
//! locale : Armenian [hy-am]
//! author : Armendarabyan : https://github.com/armendarabyan
 
;(function (global, factory) {
    true ? factory(__webpack_require__(3)) :
   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
   factory(global.moment)
}(this, (function (moment) { 'use strict';
 
    //! moment.js locale configuration
 
    var hyAm = moment.defineLocale('hy-am', {
        months: {
            format: 'հունվարի_փետրվարի_մարտի_ապրիլի_մայիսի_հունիսի_հուլիսի_օգոստոսի_սեպտեմբերի_հոկտեմբերի_նոյեմբերի_դեկտեմբերի'.split(
                '_'
            ),
            standalone:
                'հունվար_փետրվար_մարտ_ապրիլ_մայիս_հունիս_հուլիս_օգոստոս_սեպտեմբեր_հոկտեմբեր_նոյեմբեր_դեկտեմբեր'.split(
                    '_'
                ),
        },
        monthsShort: 'հնվ_փտր_մրտ_ապր_մյս_հնս_հլս_օգս_սպտ_հկտ_նմբ_դկտ'.split('_'),
        weekdays:
            'կիրակի_երկուշաբթի_երեքշաբթի_չորեքշաբթի_հինգշաբթի_ուրբաթ_շաբաթ'.split(
                '_'
            ),
        weekdaysShort: 'կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ'.split('_'),
        weekdaysMin: 'կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ'.split('_'),
        longDateFormat: {
            LT: 'HH:mm',
            LTS: 'HH:mm:ss',
            L: 'DD.MM.YYYY',
            LL: 'D MMMM YYYY թ.',
            LLL: 'D MMMM YYYY թ., HH:mm',
            LLLL: 'dddd, D MMMM YYYY թ., HH:mm',
        },
        calendar: {
            sameDay: '[այսօր] LT',
            nextDay: '[վաղը] LT',
            lastDay: '[երեկ] LT',
            nextWeek: function () {
                return 'dddd [օրը ժամը] LT';
            },
            lastWeek: function () {
                return '[անցած] dddd [օրը ժամը] LT';
            },
            sameElse: 'L',
        },
        relativeTime: {
            future: '%s հետո',
            past: '%s առաջ',
            s: 'մի քանի վայրկյան',
            ss: '%d վայրկյան',
            m: 'րոպե',
            mm: '%d րոպե',
            h: 'ժամ',
            hh: '%d ժամ',
            d: 'օր',
            dd: '%d օր',
            M: 'ամիս',
            MM: '%d ամիս',
            y: 'տարի',
            yy: '%d տարի',
        },
        meridiemParse: /գիշերվա|առավոտվա|ցերեկվա|երեկոյան/,
        isPM: function (input) {
            return /^(ցերեկվա|երեկոյան)$/.test(input);
        },
        meridiem: function (hour) {
            if (hour < 4) {
                return 'գիշերվա';
            } else if (hour < 12) {
                return 'առավոտվա';
            } else if (hour < 17) {
                return 'ցերեկվա';
            } else {
                return 'երեկոյան';
            }
        },
        dayOfMonthOrdinalParse: /\d{1,2}|\d{1,2}-(ին|րդ)/,
        ordinal: function (number, period) {
            switch (period) {
                case 'DDD':
                case 'w':
                case 'W':
                case 'DDDo':
                    if (number === 1) {
                        return number + '-ին';
                    }
                    return number + '-րդ';
                default:
                    return number;
            }
        },
        week: {
            dow: 1, // Monday is the first day of the week.
            doy: 7, // The week that contains Jan 7th is the first week of the year.
        },
    });
 
    return hyAm;
 
})));
 
 
/***/ }),
/* 562 */
/***/ (function(module, exports, __webpack_require__) {
 
//! moment.js locale configuration
//! locale : Indonesian [id]
//! author : Mohammad Satrio Utomo : https://github.com/tyok
//! reference: http://id.wikisource.org/wiki/Pedoman_Umum_Ejaan_Bahasa_Indonesia_yang_Disempurnakan
 
;(function (global, factory) {
    true ? factory(__webpack_require__(3)) :
   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
   factory(global.moment)
}(this, (function (moment) { 'use strict';
 
    //! moment.js locale configuration
 
    var id = moment.defineLocale('id', {
        months: 'Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_November_Desember'.split(
            '_'
        ),
        monthsShort: 'Jan_Feb_Mar_Apr_Mei_Jun_Jul_Agt_Sep_Okt_Nov_Des'.split('_'),
        weekdays: 'Minggu_Senin_Selasa_Rabu_Kamis_Jumat_Sabtu'.split('_'),
        weekdaysShort: 'Min_Sen_Sel_Rab_Kam_Jum_Sab'.split('_'),
        weekdaysMin: 'Mg_Sn_Sl_Rb_Km_Jm_Sb'.split('_'),
        longDateFormat: {
            LT: 'HH.mm',
            LTS: 'HH.mm.ss',
            L: 'DD/MM/YYYY',
            LL: 'D MMMM YYYY',
            LLL: 'D MMMM YYYY [pukul] HH.mm',
            LLLL: 'dddd, D MMMM YYYY [pukul] HH.mm',
        },
        meridiemParse: /pagi|siang|sore|malam/,
        meridiemHour: function (hour, meridiem) {
            if (hour === 12) {
                hour = 0;
            }
            if (meridiem === 'pagi') {
                return hour;
            } else if (meridiem === 'siang') {
                return hour >= 11 ? hour : hour + 12;
            } else if (meridiem === 'sore' || meridiem === 'malam') {
                return hour + 12;
            }
        },
        meridiem: function (hours, minutes, isLower) {
            if (hours < 11) {
                return 'pagi';
            } else if (hours < 15) {
                return 'siang';
            } else if (hours < 19) {
                return 'sore';
            } else {
                return 'malam';
            }
        },
        calendar: {
            sameDay: '[Hari ini pukul] LT',
            nextDay: '[Besok pukul] LT',
            nextWeek: 'dddd [pukul] LT',
            lastDay: '[Kemarin pukul] LT',
            lastWeek: 'dddd [lalu pukul] LT',
            sameElse: 'L',
        },
        relativeTime: {
            future: 'dalam %s',
            past: '%s yang lalu',
            s: 'beberapa detik',
            ss: '%d detik',
            m: 'semenit',
            mm: '%d menit',
            h: 'sejam',
            hh: '%d jam',
            d: 'sehari',
            dd: '%d hari',
            M: 'sebulan',
            MM: '%d bulan',
            y: 'setahun',
            yy: '%d tahun',
        },
        week: {
            dow: 0, // Sunday is the first day of the week.
            doy: 6, // The week that contains Jan 6th is the first week of the year.
        },
    });
 
    return id;
 
})));
 
 
/***/ }),
/* 563 */
/***/ (function(module, exports, __webpack_require__) {
 
//! moment.js locale configuration
//! locale : Icelandic [is]
//! author : Hinrik Örn Sigurðsson : https://github.com/hinrik
 
;(function (global, factory) {
    true ? factory(__webpack_require__(3)) :
   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
   factory(global.moment)
}(this, (function (moment) { 'use strict';
 
    //! moment.js locale configuration
 
    function plural(n) {
        if (n % 100 === 11) {
            return true;
        } else if (n % 10 === 1) {
            return false;
        }
        return true;
    }
    function translate(number, withoutSuffix, key, isFuture) {
        var result = number + ' ';
        switch (key) {
            case 's':
                return withoutSuffix || isFuture
                    ? 'nokkrar sekúndur'
                    : 'nokkrum sekúndum';
            case 'ss':
                if (plural(number)) {
                    return (
                        result +
                        (withoutSuffix || isFuture ? 'sekúndur' : 'sekúndum')
                    );
                }
                return result + 'sekúnda';
            case 'm':
                return withoutSuffix ? 'mínúta' : 'mínútu';
            case 'mm':
                if (plural(number)) {
                    return (
                        result + (withoutSuffix || isFuture ? 'mínútur' : 'mínútum')
                    );
                } else if (withoutSuffix) {
                    return result + 'mínúta';
                }
                return result + 'mínútu';
            case 'hh':
                if (plural(number)) {
                    return (
                        result +
                        (withoutSuffix || isFuture
                            ? 'klukkustundir'
                            : 'klukkustundum')
                    );
                }
                return result + 'klukkustund';
            case 'd':
                if (withoutSuffix) {
                    return 'dagur';
                }
                return isFuture ? 'dag' : 'degi';
            case 'dd':
                if (plural(number)) {
                    if (withoutSuffix) {
                        return result + 'dagar';
                    }
                    return result + (isFuture ? 'daga' : 'dögum');
                } else if (withoutSuffix) {
                    return result + 'dagur';
                }
                return result + (isFuture ? 'dag' : 'degi');
            case 'M':
                if (withoutSuffix) {
                    return 'mánuður';
                }
                return isFuture ? 'mánuð' : 'mánuði';
            case 'MM':
                if (plural(number)) {
                    if (withoutSuffix) {
                        return result + 'mánuðir';
                    }
                    return result + (isFuture ? 'mánuði' : 'mánuðum');
                } else if (withoutSuffix) {
                    return result + 'mánuður';
                }
                return result + (isFuture ? 'mánuð' : 'mánuði');
            case 'y':
                return withoutSuffix || isFuture ? 'ár' : 'ári';
            case 'yy':
                if (plural(number)) {
                    return result + (withoutSuffix || isFuture ? 'ár' : 'árum');
                }
                return result + (withoutSuffix || isFuture ? 'ár' : 'ári');
        }
    }
 
    var is = moment.defineLocale('is', {
        months: 'janúar_febrúar_mars_apríl_maí_júní_júlí_ágúst_september_október_nóvember_desember'.split(
            '_'
        ),
        monthsShort: 'jan_feb_mar_apr_maí_jún_júl_ágú_sep_okt_nóv_des'.split('_'),
        weekdays:
            'sunnudagur_mánudagur_þriðjudagur_miðvikudagur_fimmtudagur_föstudagur_laugardagur'.split(
                '_'
            ),
        weekdaysShort: 'sun_mán_þri_mið_fim_fös_lau'.split('_'),
        weekdaysMin: 'Su_Má_Þr_Mi_Fi_Fö_La'.split('_'),
        longDateFormat: {
            LT: 'H:mm',
            LTS: 'H:mm:ss',
            L: 'DD.MM.YYYY',
            LL: 'D. MMMM YYYY',
            LLL: 'D. MMMM YYYY [kl.] H:mm',
            LLLL: 'dddd, D. MMMM YYYY [kl.] H:mm',
        },
        calendar: {
            sameDay: '[í dag kl.] LT',
            nextDay: '[á morgun kl.] LT',
            nextWeek: 'dddd [kl.] LT',
            lastDay: '[í gær kl.] LT',
            lastWeek: '[síðasta] dddd [kl.] LT',
            sameElse: 'L',
        },
        relativeTime: {
            future: 'eftir %s',
            past: 'fyrir %s síðan',
            s: translate,
            ss: translate,
            m: translate,
            mm: translate,
            h: 'klukkustund',
            hh: translate,
            d: translate,
            dd: translate,
            M: translate,
            MM: translate,
            y: translate,
            yy: translate,
        },
        dayOfMonthOrdinalParse: /\d{1,2}\./,
        ordinal: '%d.',
        week: {
            dow: 1, // Monday is the first day of the week.
            doy: 4, // The week that contains Jan 4th is the first week of the year.
        },
    });
 
    return is;
 
})));
 
 
/***/ }),
/* 564 */
/***/ (function(module, exports, __webpack_require__) {
 
//! moment.js locale configuration
//! locale : Italian [it]
//! author : Lorenzo : https://github.com/aliem
//! author: Mattia Larentis: https://github.com/nostalgiaz
//! author: Marco : https://github.com/Manfre98
 
;(function (global, factory) {
    true ? factory(__webpack_require__(3)) :
   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
   factory(global.moment)
}(this, (function (moment) { 'use strict';
 
    //! moment.js locale configuration
 
    var it = moment.defineLocale('it', {
        months: 'gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre'.split(
            '_'
        ),
        monthsShort: 'gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic'.split('_'),
        weekdays: 'domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato'.split(
            '_'
        ),
        weekdaysShort: 'dom_lun_mar_mer_gio_ven_sab'.split('_'),
        weekdaysMin: 'do_lu_ma_me_gi_ve_sa'.split('_'),
        longDateFormat: {
            LT: 'HH:mm',
            LTS: 'HH:mm:ss',
            L: 'DD/MM/YYYY',
            LL: 'D MMMM YYYY',
            LLL: 'D MMMM YYYY HH:mm',
            LLLL: 'dddd D MMMM YYYY HH:mm',
        },
        calendar: {
            sameDay: function () {
                return (
                    '[Oggi a' +
                    (this.hours() > 1 ? 'lle ' : this.hours() === 0 ? ' ' : "ll'") +
                    ']LT'
                );
            },
            nextDay: function () {
                return (
                    '[Domani a' +
                    (this.hours() > 1 ? 'lle ' : this.hours() === 0 ? ' ' : "ll'") +
                    ']LT'
                );
            },
            nextWeek: function () {
                return (
                    'dddd [a' +
                    (this.hours() > 1 ? 'lle ' : this.hours() === 0 ? ' ' : "ll'") +
                    ']LT'
                );
            },
            lastDay: function () {
                return (
                    '[Ieri a' +
                    (this.hours() > 1 ? 'lle ' : this.hours() === 0 ? ' ' : "ll'") +
                    ']LT'
                );
            },
            lastWeek: function () {
                switch (this.day()) {
                    case 0:
                        return (
                            '[La scorsa] dddd [a' +
                            (this.hours() > 1
                                ? 'lle '
                                : this.hours() === 0
                                ? ' '
                                : "ll'") +
                            ']LT'
                        );
                    default:
                        return (
                            '[Lo scorso] dddd [a' +
                            (this.hours() > 1
                                ? 'lle '
                                : this.hours() === 0
                                ? ' '
                                : "ll'") +
                            ']LT'
                        );
                }
            },
            sameElse: 'L',
        },
        relativeTime: {
            future: 'tra %s',
            past: '%s fa',
            s: 'alcuni secondi',
            ss: '%d secondi',
            m: 'un minuto',
            mm: '%d minuti',
            h: "un'ora",
            hh: '%d ore',
            d: 'un giorno',
            dd: '%d giorni',
            w: 'una settimana',
            ww: '%d settimane',
            M: 'un mese',
            MM: '%d mesi',
            y: 'un anno',
            yy: '%d anni',
        },
        dayOfMonthOrdinalParse: /\d{1,2}º/,
        ordinal: '%dº',
        week: {
            dow: 1, // Monday is the first day of the week.
            doy: 4, // The week that contains Jan 4th is the first week of the year.
        },
    });
 
    return it;
 
})));
 
 
/***/ }),
/* 565 */
/***/ (function(module, exports, __webpack_require__) {
 
//! moment.js locale configuration
//! locale : Italian (Switzerland) [it-ch]
//! author : xfh : https://github.com/xfh
 
;(function (global, factory) {
    true ? factory(__webpack_require__(3)) :
   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
   factory(global.moment)
}(this, (function (moment) { 'use strict';
 
    //! moment.js locale configuration
 
    var itCh = moment.defineLocale('it-ch', {
        months: 'gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre'.split(
            '_'
        ),
        monthsShort: 'gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic'.split('_'),
        weekdays: 'domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato'.split(
            '_'
        ),
        weekdaysShort: 'dom_lun_mar_mer_gio_ven_sab'.split('_'),
        weekdaysMin: 'do_lu_ma_me_gi_ve_sa'.split('_'),
        longDateFormat: {
            LT: 'HH:mm',
            LTS: 'HH:mm:ss',
            L: 'DD.MM.YYYY',
            LL: 'D MMMM YYYY',
            LLL: 'D MMMM YYYY HH:mm',
            LLLL: 'dddd D MMMM YYYY HH:mm',
        },
        calendar: {
            sameDay: '[Oggi alle] LT',
            nextDay: '[Domani alle] LT',
            nextWeek: 'dddd [alle] LT',
            lastDay: '[Ieri alle] LT',
            lastWeek: function () {
                switch (this.day()) {
                    case 0:
                        return '[la scorsa] dddd [alle] LT';
                    default:
                        return '[lo scorso] dddd [alle] LT';
                }
            },
            sameElse: 'L',
        },
        relativeTime: {
            future: function (s) {
                return (/^[0-9].+$/.test(s) ? 'tra' : 'in') + ' ' + s;
            },
            past: '%s fa',
            s: 'alcuni secondi',
            ss: '%d secondi',
            m: 'un minuto',
            mm: '%d minuti',
            h: "un'ora",
            hh: '%d ore',
            d: 'un giorno',
            dd: '%d giorni',
            M: 'un mese',
            MM: '%d mesi',
            y: 'un anno',
            yy: '%d anni',
        },
        dayOfMonthOrdinalParse: /\d{1,2}º/,
        ordinal: '%dº',
        week: {
            dow: 1, // Monday is the first day of the week.
            doy: 4, // The week that contains Jan 4th is the first week of the year.
        },
    });
 
    return itCh;
 
})));
 
 
/***/ }),
/* 566 */
/***/ (function(module, exports, __webpack_require__) {
 
//! moment.js locale configuration
//! locale : Japanese [ja]
//! author : LI Long : https://github.com/baryon
 
;(function (global, factory) {
    true ? factory(__webpack_require__(3)) :
   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
   factory(global.moment)
}(this, (function (moment) { 'use strict';
 
    //! moment.js locale configuration
 
    var ja = moment.defineLocale('ja', {
        eras: [
            {
                since: '2019-05-01',
                offset: 1,
                name: '令和',
                narrow: '㋿',
                abbr: 'R',
            },
            {
                since: '1989-01-08',
                until: '2019-04-30',
                offset: 1,
                name: '平成',
                narrow: '㍻',
                abbr: 'H',
            },
            {
                since: '1926-12-25',
                until: '1989-01-07',
                offset: 1,
                name: '昭和',
                narrow: '㍼',
                abbr: 'S',
            },
            {
                since: '1912-07-30',
                until: '1926-12-24',
                offset: 1,
                name: '大正',
                narrow: '㍽',
                abbr: 'T',
            },
            {
                since: '1873-01-01',
                until: '1912-07-29',
                offset: 6,
                name: '明治',
                narrow: '㍾',
                abbr: 'M',
            },
            {
                since: '0001-01-01',
                until: '1873-12-31',
                offset: 1,
                name: '西暦',
                narrow: 'AD',
                abbr: 'AD',
            },
            {
                since: '0000-12-31',
                until: -Infinity,
                offset: 1,
                name: '紀元前',
                narrow: 'BC',
                abbr: 'BC',
            },
        ],
        eraYearOrdinalRegex: /(元|\d+)年/,
        eraYearOrdinalParse: function (input, match) {
            return match[1] === '元' ? 1 : parseInt(match[1] || input, 10);
        },
        months: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'),
        monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split(
            '_'
        ),
        weekdays: '日曜日_月曜日_火曜日_水曜日_木曜日_金曜日_土曜日'.split('_'),
        weekdaysShort: '日_月_火_水_木_金_土'.split('_'),
        weekdaysMin: '日_月_火_水_木_金_土'.split('_'),
        longDateFormat: {
            LT: 'HH:mm',
            LTS: 'HH:mm:ss',
            L: 'YYYY/MM/DD',
            LL: 'YYYY年M月D日',
            LLL: 'YYYY年M月D日 HH:mm',
            LLLL: 'YYYY年M月D日 dddd HH:mm',
            l: 'YYYY/MM/DD',
            ll: 'YYYY年M月D日',
            lll: 'YYYY年M月D日 HH:mm',
            llll: 'YYYY年M月D日(ddd) HH:mm',
        },
        meridiemParse: /午前|午後/i,
        isPM: function (input) {
            return input === '午後';
        },
        meridiem: function (hour, minute, isLower) {
            if (hour < 12) {
                return '午前';
            } else {
                return '午後';
            }
        },
        calendar: {
            sameDay: '[今日] LT',
            nextDay: '[明日] LT',
            nextWeek: function (now) {
                if (now.week() !== this.week()) {
                    return '[来週]dddd LT';
                } else {
                    return 'dddd LT';
                }
            },
            lastDay: '[昨日] LT',
            lastWeek: function (now) {
                if (this.week() !== now.week()) {
                    return '[先週]dddd LT';
                } else {
                    return 'dddd LT';
                }
            },
            sameElse: 'L',
        },
        dayOfMonthOrdinalParse: /\d{1,2}日/,
        ordinal: function (number, period) {
            switch (period) {
                case 'y':
                    return number === 1 ? '元年' : number + '年';
                case 'd':
                case 'D':
                case 'DDD':
                    return number + '日';
                default:
                    return number;
            }
        },
        relativeTime: {
            future: '%s後',
            past: '%s前',
            s: '数秒',
            ss: '%d秒',
            m: '1分',
            mm: '%d分',
            h: '1時間',
            hh: '%d時間',
            d: '1日',
            dd: '%d日',
            M: '1ヶ月',
            MM: '%dヶ月',
            y: '1年',
            yy: '%d年',
        },
    });
 
    return ja;
 
})));
 
 
/***/ }),
/* 567 */
/***/ (function(module, exports, __webpack_require__) {
 
//! moment.js locale configuration
//! locale : Javanese [jv]
//! author : Rony Lantip : https://github.com/lantip
//! reference: http://jv.wikipedia.org/wiki/Basa_Jawa
 
;(function (global, factory) {
    true ? factory(__webpack_require__(3)) :
   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
   factory(global.moment)
}(this, (function (moment) { 'use strict';
 
    //! moment.js locale configuration
 
    var jv = moment.defineLocale('jv', {
        months: 'Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_Nopember_Desember'.split(
            '_'
        ),
        monthsShort: 'Jan_Feb_Mar_Apr_Mei_Jun_Jul_Ags_Sep_Okt_Nop_Des'.split('_'),
        weekdays: 'Minggu_Senen_Seloso_Rebu_Kemis_Jemuwah_Septu'.split('_'),
        weekdaysShort: 'Min_Sen_Sel_Reb_Kem_Jem_Sep'.split('_'),
        weekdaysMin: 'Mg_Sn_Sl_Rb_Km_Jm_Sp'.split('_'),
        longDateFormat: {
            LT: 'HH.mm',
            LTS: 'HH.mm.ss',
            L: 'DD/MM/YYYY',
            LL: 'D MMMM YYYY',
            LLL: 'D MMMM YYYY [pukul] HH.mm',
            LLLL: 'dddd, D MMMM YYYY [pukul] HH.mm',
        },
        meridiemParse: /enjing|siyang|sonten|ndalu/,
        meridiemHour: function (hour, meridiem) {
            if (hour === 12) {
                hour = 0;
            }
            if (meridiem === 'enjing') {
                return hour;
            } else if (meridiem === 'siyang') {
                return hour >= 11 ? hour : hour + 12;
            } else if (meridiem === 'sonten' || meridiem === 'ndalu') {
                return hour + 12;
            }
        },
        meridiem: function (hours, minutes, isLower) {
            if (hours < 11) {
                return 'enjing';
            } else if (hours < 15) {
                return 'siyang';
            } else if (hours < 19) {
                return 'sonten';
            } else {
                return 'ndalu';
            }
        },
        calendar: {
            sameDay: '[Dinten puniko pukul] LT',
            nextDay: '[Mbenjang pukul] LT',
            nextWeek: 'dddd [pukul] LT',
            lastDay: '[Kala wingi pukul] LT',
            lastWeek: 'dddd [kepengker pukul] LT',
            sameElse: 'L',
        },
        relativeTime: {
            future: 'wonten ing %s',
            past: '%s ingkang kepengker',
            s: 'sawetawis detik',
            ss: '%d detik',
            m: 'setunggal menit',
            mm: '%d menit',
            h: 'setunggal jam',
            hh: '%d jam',
            d: 'sedinten',
            dd: '%d dinten',
            M: 'sewulan',
            MM: '%d wulan',
            y: 'setaun',
            yy: '%d taun',
        },
        week: {
            dow: 1, // Monday is the first day of the week.
            doy: 7, // The week that contains Jan 7th is the first week of the year.
        },
    });
 
    return jv;
 
})));
 
 
/***/ }),
/* 568 */
/***/ (function(module, exports, __webpack_require__) {
 
//! moment.js locale configuration
//! locale : Georgian [ka]
//! author : Irakli Janiashvili : https://github.com/IrakliJani
 
;(function (global, factory) {
    true ? factory(__webpack_require__(3)) :
   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
   factory(global.moment)
}(this, (function (moment) { 'use strict';
 
    //! moment.js locale configuration
 
    var ka = moment.defineLocale('ka', {
        months: 'იანვარი_თებერვალი_მარტი_აპრილი_მაისი_ივნისი_ივლისი_აგვისტო_სექტემბერი_ოქტომბერი_ნოემბერი_დეკემბერი'.split(
            '_'
        ),
        monthsShort: 'იან_თებ_მარ_აპრ_მაი_ივნ_ივლ_აგვ_სექ_ოქტ_ნოე_დეკ'.split('_'),
        weekdays: {
            standalone:
                'კვირა_ორშაბათი_სამშაბათი_ოთხშაბათი_ხუთშაბათი_პარასკევი_შაბათი'.split(
                    '_'
                ),
            format: 'კვირას_ორშაბათს_სამშაბათს_ოთხშაბათს_ხუთშაბათს_პარასკევს_შაბათს'.split(
                '_'
            ),
            isFormat: /(წინა|შემდეგ)/,
        },
        weekdaysShort: 'კვი_ორშ_სამ_ოთხ_ხუთ_პარ_შაბ'.split('_'),
        weekdaysMin: 'კვ_ორ_სა_ოთ_ხუ_პა_შა'.split('_'),
        longDateFormat: {
            LT: 'HH:mm',
            LTS: 'HH:mm:ss',
            L: 'DD/MM/YYYY',
            LL: 'D MMMM YYYY',
            LLL: 'D MMMM YYYY HH:mm',
            LLLL: 'dddd, D MMMM YYYY HH:mm',
        },
        calendar: {
            sameDay: '[დღეს] LT[-ზე]',
            nextDay: '[ხვალ] LT[-ზე]',
            lastDay: '[გუშინ] LT[-ზე]',
            nextWeek: '[შემდეგ] dddd LT[-ზე]',
            lastWeek: '[წინა] dddd LT-ზე',
            sameElse: 'L',
        },
        relativeTime: {
            future: function (s) {
                return s.replace(
                    /(წამ|წუთ|საათ|წელ|დღ|თვ)(ი|ე)/,
                    function ($0, $1, $2) {
                        return $2 === 'ი' ? $1 + 'ში' : $1 + $2 + 'ში';
                    }
                );
            },
            past: function (s) {
                if (/(წამი|წუთი|საათი|დღე|თვე)/.test(s)) {
                    return s.replace(/(ი|ე)$/, 'ის წინ');
                }
                if (/წელი/.test(s)) {
                    return s.replace(/წელი$/, 'წლის წინ');
                }
                return s;
            },
            s: 'რამდენიმე წამი',
            ss: '%d წამი',
            m: 'წუთი',
            mm: '%d წუთი',
            h: 'საათი',
            hh: '%d საათი',
            d: 'დღე',
            dd: '%d დღე',
            M: 'თვე',
            MM: '%d თვე',
            y: 'წელი',
            yy: '%d წელი',
        },
        dayOfMonthOrdinalParse: /0|1-ლი|მე-\d{1,2}|\d{1,2}-ე/,
        ordinal: function (number) {
            if (number === 0) {
                return number;
            }
            if (number === 1) {
                return number + '-ლი';
            }
            if (
                number < 20 ||
                (number <= 100 && number % 20 === 0) ||
                number % 100 === 0
            ) {
                return 'მე-' + number;
            }
            return number + '-ე';
        },
        week: {
            dow: 1,
            doy: 7,
        },
    });
 
    return ka;
 
})));
 
 
/***/ }),
/* 569 */
/***/ (function(module, exports, __webpack_require__) {
 
//! moment.js locale configuration
//! locale : Kazakh [kk]
//! authors : Nurlan Rakhimzhanov : https://github.com/nurlan
 
;(function (global, factory) {
    true ? factory(__webpack_require__(3)) :
   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
   factory(global.moment)
}(this, (function (moment) { 'use strict';
 
    //! moment.js locale configuration
 
    var suffixes = {
        0: '-ші',
        1: '-ші',
        2: '-ші',
        3: '-ші',
        4: '-ші',
        5: '-ші',
        6: '-шы',
        7: '-ші',
        8: '-ші',
        9: '-шы',
        10: '-шы',
        20: '-шы',
        30: '-шы',
        40: '-шы',
        50: '-ші',
        60: '-шы',
        70: '-ші',
        80: '-ші',
        90: '-шы',
        100: '-ші',
    };
 
    var kk = moment.defineLocale('kk', {
        months: 'қаңтар_ақпан_наурыз_сәуір_мамыр_маусым_шілде_тамыз_қыркүйек_қазан_қараша_желтоқсан'.split(
            '_'
        ),
        monthsShort: 'қаң_ақп_нау_сәу_мам_мау_шіл_там_қыр_қаз_қар_жел'.split('_'),
        weekdays: 'жексенбі_дүйсенбі_сейсенбі_сәрсенбі_бейсенбі_жұма_сенбі'.split(
            '_'
        ),
        weekdaysShort: 'жек_дүй_сей_сәр_бей_жұм_сен'.split('_'),
        weekdaysMin: 'жк_дй_сй_ср_бй_жм_сн'.split('_'),
        longDateFormat: {
            LT: 'HH:mm',
            LTS: 'HH:mm:ss',
            L: 'DD.MM.YYYY',
            LL: 'D MMMM YYYY',
            LLL: 'D MMMM YYYY HH:mm',
            LLLL: 'dddd, D MMMM YYYY HH:mm',
        },
        calendar: {
            sameDay: '[Бүгін сағат] LT',
            nextDay: '[Ертең сағат] LT',
            nextWeek: 'dddd [сағат] LT',
            lastDay: '[Кеше сағат] LT',
            lastWeek: '[Өткен аптаның] dddd [сағат] LT',
            sameElse: 'L',
        },
        relativeTime: {
            future: '%s ішінде',
            past: '%s бұрын',
            s: 'бірнеше секунд',
            ss: '%d секунд',
            m: 'бір минут',
            mm: '%d минут',
            h: 'бір сағат',
            hh: '%d сағат',
            d: 'бір күн',
            dd: '%d күн',
            M: 'бір ай',
            MM: '%d ай',
            y: 'бір жыл',
            yy: '%d жыл',
        },
        dayOfMonthOrdinalParse: /\d{1,2}-(ші|шы)/,
        ordinal: function (number) {
            var a = number % 10,
                b = number >= 100 ? 100 : null;
            return number + (suffixes[number] || suffixes[a] || suffixes[b]);
        },
        week: {
            dow: 1, // Monday is the first day of the week.
            doy: 7, // The week that contains Jan 7th is the first week of the year.
        },
    });
 
    return kk;
 
})));
 
 
/***/ }),
/* 570 */
/***/ (function(module, exports, __webpack_require__) {
 
//! moment.js locale configuration
//! locale : Cambodian [km]
//! author : Kruy Vanna : https://github.com/kruyvanna
 
;(function (global, factory) {
    true ? factory(__webpack_require__(3)) :
   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
   factory(global.moment)
}(this, (function (moment) { 'use strict';
 
    //! moment.js locale configuration
 
    var symbolMap = {
            1: '១',
            2: '២',
            3: '៣',
            4: '៤',
            5: '៥',
            6: '៦',
            7: '៧',
            8: '៨',
            9: '៩',
            0: '០',
        },
        numberMap = {
            '១': '1',
            '២': '2',
            '៣': '3',
            '៤': '4',
            '៥': '5',
            '៦': '6',
            '៧': '7',
            '៨': '8',
            '៩': '9',
            '០': '0',
        };
 
    var km = moment.defineLocale('km', {
        months: 'មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ'.split(
            '_'
        ),
        monthsShort:
            'មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ'.split(
                '_'
            ),
        weekdays: 'អាទិត្យ_ច័ន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍'.split('_'),
        weekdaysShort: 'អា_ច_អ_ព_ព្រ_សុ_ស'.split('_'),
        weekdaysMin: 'អា_ច_អ_ព_ព្រ_សុ_ស'.split('_'),
        weekdaysParseExact: true,
        longDateFormat: {
            LT: 'HH:mm',
            LTS: 'HH:mm:ss',
            L: 'DD/MM/YYYY',
            LL: 'D MMMM YYYY',
            LLL: 'D MMMM YYYY HH:mm',
            LLLL: 'dddd, D MMMM YYYY HH:mm',
        },
        meridiemParse: /ព្រឹក|ល្ងាច/,
        isPM: function (input) {
            return input === 'ល្ងាច';
        },
        meridiem: function (hour, minute, isLower) {
            if (hour < 12) {
                return 'ព្រឹក';
            } else {
                return 'ល្ងាច';
            }
        },
        calendar: {
            sameDay: '[ថ្ងៃនេះ ម៉ោង] LT',
            nextDay: '[ស្អែក ម៉ោង] LT',
            nextWeek: 'dddd [ម៉ោង] LT',
            lastDay: '[ម្សិលមិញ ម៉ោង] LT',
            lastWeek: 'dddd [សប្តាហ៍មុន] [ម៉ោង] LT',
            sameElse: 'L',
        },
        relativeTime: {
            future: '%sទៀត',
            past: '%sមុន',
            s: 'ប៉ុន្មានវិនាទី',
            ss: '%d វិនាទី',
            m: 'មួយនាទី',
            mm: '%d នាទី',
            h: 'មួយម៉ោង',
            hh: '%d ម៉ោង',
            d: 'មួយថ្ងៃ',
            dd: '%d ថ្ងៃ',
            M: 'មួយខែ',
            MM: '%d ខែ',
            y: 'មួយឆ្នាំ',
            yy: '%d ឆ្នាំ',
        },
        dayOfMonthOrdinalParse: /ទី\d{1,2}/,
        ordinal: 'ទី%d',
        preparse: function (string) {
            return string.replace(/[១២៣៤៥៦៧៨៩០]/g, function (match) {
                return numberMap[match];
            });
        },
        postformat: function (string) {
            return string.replace(/\d/g, function (match) {
                return symbolMap[match];
            });
        },
        week: {
            dow: 1, // Monday is the first day of the week.
            doy: 4, // The week that contains Jan 4th is the first week of the year.
        },
    });
 
    return km;
 
})));
 
 
/***/ }),
/* 571 */
/***/ (function(module, exports, __webpack_require__) {
 
//! moment.js locale configuration
//! locale : Kannada [kn]
//! author : Rajeev Naik : https://github.com/rajeevnaikte
 
;(function (global, factory) {
    true ? factory(__webpack_require__(3)) :
   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
   factory(global.moment)
}(this, (function (moment) { 'use strict';
 
    //! moment.js locale configuration
 
    var symbolMap = {
            1: '೧',
            2: '೨',
            3: '೩',
            4: '೪',
            5: '೫',
            6: '೬',
            7: '೭',
            8: '೮',
            9: '೯',
            0: '೦',
        },
        numberMap = {
            '೧': '1',
            '೨': '2',
            '೩': '3',
            '೪': '4',
            '೫': '5',
            '೬': '6',
            '೭': '7',
            '೮': '8',
            '೯': '9',
            '೦': '0',
        };
 
    var kn = moment.defineLocale('kn', {
        months: 'ಜನವರಿ_ಫೆಬ್ರವರಿ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂಬರ್_ಅಕ್ಟೋಬರ್_ನವೆಂಬರ್_ಡಿಸೆಂಬರ್'.split(
            '_'
        ),
        monthsShort:
            'ಜನ_ಫೆಬ್ರ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂ_ಅಕ್ಟೋ_ನವೆಂ_ಡಿಸೆಂ'.split(
                '_'
            ),
        monthsParseExact: true,
        weekdays: 'ಭಾನುವಾರ_ಸೋಮವಾರ_ಮಂಗಳವಾರ_ಬುಧವಾರ_ಗುರುವಾರ_ಶುಕ್ರವಾರ_ಶನಿವಾರ'.split(
            '_'
        ),
        weekdaysShort: 'ಭಾನು_ಸೋಮ_ಮಂಗಳ_ಬುಧ_ಗುರು_ಶುಕ್ರ_ಶನಿ'.split('_'),
        weekdaysMin: 'ಭಾ_ಸೋ_ಮಂ_ಬು_ಗು_ಶು_ಶ'.split('_'),
        longDateFormat: {
            LT: 'A h:mm',
            LTS: 'A h:mm:ss',
            L: 'DD/MM/YYYY',
            LL: 'D MMMM YYYY',
            LLL: 'D MMMM YYYY, A h:mm',
            LLLL: 'dddd, D MMMM YYYY, A h:mm',
        },
        calendar: {
            sameDay: '[ಇಂದು] LT',
            nextDay: '[ನಾಳೆ] LT',
            nextWeek: 'dddd, LT',
            lastDay: '[ನಿನ್ನೆ] LT',
            lastWeek: '[ಕೊನೆಯ] dddd, LT',
            sameElse: 'L',
        },
        relativeTime: {
            future: '%s ನಂತರ',
            past: '%s ಹಿಂದೆ',
            s: 'ಕೆಲವು ಕ್ಷಣಗಳು',
            ss: '%d ಸೆಕೆಂಡುಗಳು',
            m: 'ಒಂದು ನಿಮಿಷ',
            mm: '%d ನಿಮಿಷ',
            h: 'ಒಂದು ಗಂಟೆ',
            hh: '%d ಗಂಟೆ',
            d: 'ಒಂದು ದಿನ',
            dd: '%d ದಿನ',
            M: 'ಒಂದು ತಿಂಗಳು',
            MM: '%d ತಿಂಗಳು',
            y: 'ಒಂದು ವರ್ಷ',
            yy: '%d ವರ್ಷ',
        },
        preparse: function (string) {
            return string.replace(/[೧೨೩೪೫೬೭೮೯೦]/g, function (match) {
                return numberMap[match];
            });
        },
        postformat: function (string) {
            return string.replace(/\d/g, function (match) {
                return symbolMap[match];
            });
        },
        meridiemParse: /ರಾತ್ರಿ|ಬೆಳಿಗ್ಗೆ|ಮಧ್ಯಾಹ್ನ|ಸಂಜೆ/,
        meridiemHour: function (hour, meridiem) {
            if (hour === 12) {
                hour = 0;
            }
            if (meridiem === 'ರಾತ್ರಿ') {
                return hour < 4 ? hour : hour + 12;
            } else if (meridiem === 'ಬೆಳಿಗ್ಗೆ') {
                return hour;
            } else if (meridiem === 'ಮಧ್ಯಾಹ್ನ') {
                return hour >= 10 ? hour : hour + 12;
            } else if (meridiem === 'ಸಂಜೆ') {
                return hour + 12;
            }
        },
        meridiem: function (hour, minute, isLower) {
            if (hour < 4) {
                return 'ರಾತ್ರಿ';
            } else if (hour < 10) {
                return 'ಬೆಳಿಗ್ಗೆ';
            } else if (hour < 17) {
                return 'ಮಧ್ಯಾಹ್ನ';
            } else if (hour < 20) {
                return 'ಸಂಜೆ';
            } else {
                return 'ರಾತ್ರಿ';
            }
        },
        dayOfMonthOrdinalParse: /\d{1,2}(ನೇ)/,
        ordinal: function (number) {
            return number + 'ನೇ';
        },
        week: {
            dow: 0, // Sunday is the first day of the week.
            doy: 6, // The week that contains Jan 6th is the first week of the year.
        },
    });
 
    return kn;
 
})));
 
 
/***/ }),
/* 572 */
/***/ (function(module, exports, __webpack_require__) {
 
//! moment.js locale configuration
//! locale : Korean [ko]
//! author : Kyungwook, Park : https://github.com/kyungw00k
//! author : Jeeeyul Lee <jeeeyul@gmail.com>
 
;(function (global, factory) {
    true ? factory(__webpack_require__(3)) :
   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
   factory(global.moment)
}(this, (function (moment) { 'use strict';
 
    //! moment.js locale configuration
 
    var ko = moment.defineLocale('ko', {
        months: '1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월'.split('_'),
        monthsShort: '1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월'.split(
            '_'
        ),
        weekdays: '일요일_월요일_화요일_수요일_목요일_금요일_토요일'.split('_'),
        weekdaysShort: '일_월_화_수_목_금_토'.split('_'),
        weekdaysMin: '일_월_화_수_목_금_토'.split('_'),
        longDateFormat: {
            LT: 'A h:mm',
            LTS: 'A h:mm:ss',
            L: 'YYYY.MM.DD.',
            LL: 'YYYY년 MMMM D일',
            LLL: 'YYYY년 MMMM D일 A h:mm',
            LLLL: 'YYYY년 MMMM D일 dddd A h:mm',
            l: 'YYYY.MM.DD.',
            ll: 'YYYY년 MMMM D일',
            lll: 'YYYY년 MMMM D일 A h:mm',
            llll: 'YYYY년 MMMM D일 dddd A h:mm',
        },
        calendar: {
            sameDay: '오늘 LT',
            nextDay: '내일 LT',
            nextWeek: 'dddd LT',
            lastDay: '어제 LT',
            lastWeek: '지난주 dddd LT',
            sameElse: 'L',
        },
        relativeTime: {
            future: '%s 후',
            past: '%s 전',
            s: '몇 초',
            ss: '%d초',
            m: '1분',
            mm: '%d분',
            h: '한 시간',
            hh: '%d시간',
            d: '하루',
            dd: '%d일',
            M: '한 달',
            MM: '%d달',
            y: '일 년',
            yy: '%d년',
        },
        dayOfMonthOrdinalParse: /\d{1,2}(일|월|주)/,
        ordinal: function (number, period) {
            switch (period) {
                case 'd':
                case 'D':
                case 'DDD':
                    return number + '일';
                case 'M':
                    return number + '월';
                case 'w':
                case 'W':
                    return number + '주';
                default:
                    return number;
            }
        },
        meridiemParse: /오전|오후/,
        isPM: function (token) {
            return token === '오후';
        },
        meridiem: function (hour, minute, isUpper) {
            return hour < 12 ? '오전' : '오후';
        },
    });
 
    return ko;
 
})));
 
 
/***/ }),
/* 573 */
/***/ (function(module, exports, __webpack_require__) {
 
//! moment.js locale configuration
//! locale : Kurdish [ku]
//! author : Shahram Mebashar : https://github.com/ShahramMebashar
 
;(function (global, factory) {
    true ? factory(__webpack_require__(3)) :
   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
   factory(global.moment)
}(this, (function (moment) { 'use strict';
 
    //! moment.js locale configuration
 
    var symbolMap = {
            1: '١',
            2: '٢',
            3: '٣',
            4: '٤',
            5: '٥',
            6: '٦',
            7: '٧',
            8: '٨',
            9: '٩',
            0: '٠',
        },
        numberMap = {
            '١': '1',
            '٢': '2',
            '٣': '3',
            '٤': '4',
            '٥': '5',
            '٦': '6',
            '٧': '7',
            '٨': '8',
            '٩': '9',
            '٠': '0',
        },
        months = [
            'کانونی دووەم',
            'شوبات',
            'ئازار',
            'نیسان',
            'ئایار',
            'حوزەیران',
            'تەمموز',
            'ئاب',
            'ئەیلوول',
            'تشرینی یەكەم',
            'تشرینی دووەم',
            'كانونی یەکەم',
        ];
 
    var ku = moment.defineLocale('ku', {
        months: months,
        monthsShort: months,
        weekdays:
            'یه‌كشه‌ممه‌_دووشه‌ممه‌_سێشه‌ممه‌_چوارشه‌ممه‌_پێنجشه‌ممه‌_هه‌ینی_شه‌ممه‌'.split(
                '_'
            ),
        weekdaysShort:
            'یه‌كشه‌م_دووشه‌م_سێشه‌م_چوارشه‌م_پێنجشه‌م_هه‌ینی_شه‌ممه‌'.split('_'),
        weekdaysMin: 'ی_د_س_چ_پ_ه_ش'.split('_'),
        weekdaysParseExact: true,
        longDateFormat: {
            LT: 'HH:mm',
            LTS: 'HH:mm:ss',
            L: 'DD/MM/YYYY',
            LL: 'D MMMM YYYY',
            LLL: 'D MMMM YYYY HH:mm',
            LLLL: 'dddd, D MMMM YYYY HH:mm',
        },
        meridiemParse: /ئێواره‌|به‌یانی/,
        isPM: function (input) {
            return /ئێواره‌/.test(input);
        },
        meridiem: function (hour, minute, isLower) {
            if (hour < 12) {
                return 'به‌یانی';
            } else {
                return 'ئێواره‌';
            }
        },
        calendar: {
            sameDay: '[ئه‌مرۆ كاتژمێر] LT',
            nextDay: '[به‌یانی كاتژمێر] LT',
            nextWeek: 'dddd [كاتژمێر] LT',
            lastDay: '[دوێنێ كاتژمێر] LT',
            lastWeek: 'dddd [كاتژمێر] LT',
            sameElse: 'L',
        },
        relativeTime: {
            future: 'له‌ %s',
            past: '%s',
            s: 'چه‌ند چركه‌یه‌ك',
            ss: 'چركه‌ %d',
            m: 'یه‌ك خوله‌ك',
            mm: '%d خوله‌ك',
            h: 'یه‌ك كاتژمێر',
            hh: '%d كاتژمێر',
            d: 'یه‌ك ڕۆژ',
            dd: '%d ڕۆژ',
            M: 'یه‌ك مانگ',
            MM: '%d مانگ',
            y: 'یه‌ك ساڵ',
            yy: '%d ساڵ',
        },
        preparse: function (string) {
            return string
                .replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) {
                    return numberMap[match];
                })
                .replace(/،/g, ',');
        },
        postformat: function (string) {
            return string
                .replace(/\d/g, function (match) {
                    return symbolMap[match];
                })
                .replace(/,/g, '،');
        },
        week: {
            dow: 6, // Saturday is the first day of the week.
            doy: 12, // The week that contains Jan 12th is the first week of the year.
        },
    });
 
    return ku;
 
})));
 
 
/***/ }),
/* 574 */
/***/ (function(module, exports, __webpack_require__) {
 
//! moment.js locale configuration
//! locale : Kyrgyz [ky]
//! author : Chyngyz Arystan uulu : https://github.com/chyngyz
 
;(function (global, factory) {
    true ? factory(__webpack_require__(3)) :
   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
   factory(global.moment)
}(this, (function (moment) { 'use strict';
 
    //! moment.js locale configuration
 
    var suffixes = {
        0: '-чү',
        1: '-чи',
        2: '-чи',
        3: '-чү',
        4: '-чү',
        5: '-чи',
        6: '-чы',
        7: '-чи',
        8: '-чи',
        9: '-чу',
        10: '-чу',
        20: '-чы',
        30: '-чу',
        40: '-чы',
        50: '-чү',
        60: '-чы',
        70: '-чи',
        80: '-чи',
        90: '-чу',
        100: '-чү',
    };
 
    var ky = moment.defineLocale('ky', {
        months: 'январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь'.split(
            '_'
        ),
        monthsShort: 'янв_фев_март_апр_май_июнь_июль_авг_сен_окт_ноя_дек'.split(
            '_'
        ),
        weekdays: 'Жекшемби_Дүйшөмбү_Шейшемби_Шаршемби_Бейшемби_Жума_Ишемби'.split(
            '_'
        ),
        weekdaysShort: 'Жек_Дүй_Шей_Шар_Бей_Жум_Ише'.split('_'),
        weekdaysMin: 'Жк_Дй_Шй_Шр_Бй_Жм_Иш'.split('_'),
        longDateFormat: {
            LT: 'HH:mm',
            LTS: 'HH:mm:ss',
            L: 'DD.MM.YYYY',
            LL: 'D MMMM YYYY',
            LLL: 'D MMMM YYYY HH:mm',
            LLLL: 'dddd, D MMMM YYYY HH:mm',
        },
        calendar: {
            sameDay: '[Бүгүн саат] LT',
            nextDay: '[Эртең саат] LT',
            nextWeek: 'dddd [саат] LT',
            lastDay: '[Кечээ саат] LT',
            lastWeek: '[Өткөн аптанын] dddd [күнү] [саат] LT',
            sameElse: 'L',
        },
        relativeTime: {
            future: '%s ичинде',
            past: '%s мурун',
            s: 'бирнече секунд',
            ss: '%d секунд',
            m: 'бир мүнөт',
            mm: '%d мүнөт',
            h: 'бир саат',
            hh: '%d саат',
            d: 'бир күн',
            dd: '%d күн',
            M: 'бир ай',
            MM: '%d ай',
            y: 'бир жыл',
            yy: '%d жыл',
        },
        dayOfMonthOrdinalParse: /\d{1,2}-(чи|чы|чү|чу)/,
        ordinal: function (number) {
            var a = number % 10,
                b = number >= 100 ? 100 : null;
            return number + (suffixes[number] || suffixes[a] || suffixes[b]);
        },
        week: {
            dow: 1, // Monday is the first day of the week.
            doy: 7, // The week that contains Jan 7th is the first week of the year.
        },
    });
 
    return ky;
 
})));
 
 
/***/ }),
/* 575 */
/***/ (function(module, exports, __webpack_require__) {
 
//! moment.js locale configuration
//! locale : Luxembourgish [lb]
//! author : mweimerskirch : https://github.com/mweimerskirch
//! author : David Raison : https://github.com/kwisatz
 
;(function (global, factory) {
    true ? factory(__webpack_require__(3)) :
   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
   factory(global.moment)
}(this, (function (moment) { 'use strict';
 
    //! moment.js locale configuration
 
    function processRelativeTime(number, withoutSuffix, key, isFuture) {
        var format = {
            m: ['eng Minutt', 'enger Minutt'],
            h: ['eng Stonn', 'enger Stonn'],
            d: ['een Dag', 'engem Dag'],
            M: ['ee Mount', 'engem Mount'],
            y: ['ee Joer', 'engem Joer'],
        };
        return withoutSuffix ? format[key][0] : format[key][1];
    }
    function processFutureTime(string) {
        var number = string.substr(0, string.indexOf(' '));
        if (eifelerRegelAppliesToNumber(number)) {
            return 'a ' + string;
        }
        return 'an ' + string;
    }
    function processPastTime(string) {
        var number = string.substr(0, string.indexOf(' '));
        if (eifelerRegelAppliesToNumber(number)) {
            return 'viru ' + string;
        }
        return 'virun ' + string;
    }
    /**
     * Returns true if the word before the given number loses the '-n' ending.
     * e.g. 'an 10 Deeg' but 'a 5 Deeg'
     *
     * @param number {integer}
     * @returns {boolean}
     */
    function eifelerRegelAppliesToNumber(number) {
        number = parseInt(number, 10);
        if (isNaN(number)) {
            return false;
        }
        if (number < 0) {
            // Negative Number --> always true
            return true;
        } else if (number < 10) {
            // Only 1 digit
            if (4 <= number && number <= 7) {
                return true;
            }
            return false;
        } else if (number < 100) {
            // 2 digits
            var lastDigit = number % 10,
                firstDigit = number / 10;
            if (lastDigit === 0) {
                return eifelerRegelAppliesToNumber(firstDigit);
            }
            return eifelerRegelAppliesToNumber(lastDigit);
        } else if (number < 10000) {
            // 3 or 4 digits --> recursively check first digit
            while (number >= 10) {
                number = number / 10;
            }
            return eifelerRegelAppliesToNumber(number);
        } else {
            // Anything larger than 4 digits: recursively check first n-3 digits
            number = number / 1000;
            return eifelerRegelAppliesToNumber(number);
        }
    }
 
    var lb = moment.defineLocale('lb', {
        months: 'Januar_Februar_Mäerz_Abrëll_Mee_Juni_Juli_August_September_Oktober_November_Dezember'.split(
            '_'
        ),
        monthsShort:
            'Jan._Febr._Mrz._Abr._Mee_Jun._Jul._Aug._Sept._Okt._Nov._Dez.'.split(
                '_'
            ),
        monthsParseExact: true,
        weekdays:
            'Sonndeg_Méindeg_Dënschdeg_Mëttwoch_Donneschdeg_Freideg_Samschdeg'.split(
                '_'
            ),
        weekdaysShort: 'So._Mé._Dë._Më._Do._Fr._Sa.'.split('_'),
        weekdaysMin: 'So_Mé_Dë_Më_Do_Fr_Sa'.split('_'),
        weekdaysParseExact: true,
        longDateFormat: {
            LT: 'H:mm [Auer]',
            LTS: 'H:mm:ss [Auer]',
            L: 'DD.MM.YYYY',
            LL: 'D. MMMM YYYY',
            LLL: 'D. MMMM YYYY H:mm [Auer]',
            LLLL: 'dddd, D. MMMM YYYY H:mm [Auer]',
        },
        calendar: {
            sameDay: '[Haut um] LT',
            sameElse: 'L',
            nextDay: '[Muer um] LT',
            nextWeek: 'dddd [um] LT',
            lastDay: '[Gëschter um] LT',
            lastWeek: function () {
                // Different date string for 'Dënschdeg' (Tuesday) and 'Donneschdeg' (Thursday) due to phonological rule
                switch (this.day()) {
                    case 2:
                    case 4:
                        return '[Leschten] dddd [um] LT';
                    default:
                        return '[Leschte] dddd [um] LT';
                }
            },
        },
        relativeTime: {
            future: processFutureTime,
            past: processPastTime,
            s: 'e puer Sekonnen',
            ss: '%d Sekonnen',
            m: processRelativeTime,
            mm: '%d Minutten',
            h: processRelativeTime,
            hh: '%d Stonnen',
            d: processRelativeTime,
            dd: '%d Deeg',
            M: processRelativeTime,
            MM: '%d Méint',
            y: processRelativeTime,
            yy: '%d Joer',
        },
        dayOfMonthOrdinalParse: /\d{1,2}\./,
        ordinal: '%d.',
        week: {
            dow: 1, // Monday is the first day of the week.
            doy: 4, // The week that contains Jan 4th is the first week of the year.
        },
    });
 
    return lb;
 
})));
 
 
/***/ }),
/* 576 */
/***/ (function(module, exports, __webpack_require__) {
 
//! moment.js locale configuration
//! locale : Lao [lo]
//! author : Ryan Hart : https://github.com/ryanhart2
 
;(function (global, factory) {
    true ? factory(__webpack_require__(3)) :
   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
   factory(global.moment)
}(this, (function (moment) { 'use strict';
 
    //! moment.js locale configuration
 
    var lo = moment.defineLocale('lo', {
        months: 'ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ'.split(
            '_'
        ),
        monthsShort:
            'ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ'.split(
                '_'
            ),
        weekdays: 'ອາທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ'.split('_'),
        weekdaysShort: 'ທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ'.split('_'),
        weekdaysMin: 'ທ_ຈ_ອຄ_ພ_ພຫ_ສກ_ສ'.split('_'),
        weekdaysParseExact: true,
        longDateFormat: {
            LT: 'HH:mm',
            LTS: 'HH:mm:ss',
            L: 'DD/MM/YYYY',
            LL: 'D MMMM YYYY',
            LLL: 'D MMMM YYYY HH:mm',
            LLLL: 'ວັນdddd D MMMM YYYY HH:mm',
        },
        meridiemParse: /ຕອນເຊົ້າ|ຕອນແລງ/,
        isPM: function (input) {
            return input === 'ຕອນແລງ';
        },
        meridiem: function (hour, minute, isLower) {
            if (hour < 12) {
                return 'ຕອນເຊົ້າ';
            } else {
                return 'ຕອນແລງ';
            }
        },
        calendar: {
            sameDay: '[ມື້ນີ້ເວລາ] LT',
            nextDay: '[ມື້ອື່ນເວລາ] LT',
            nextWeek: '[ວັນ]dddd[ໜ້າເວລາ] LT',
            lastDay: '[ມື້ວານນີ້ເວລາ] LT',
            lastWeek: '[ວັນ]dddd[ແລ້ວນີ້ເວລາ] LT',
            sameElse: 'L',
        },
        relativeTime: {
            future: 'ອີກ %s',
            past: '%sຜ່ານມາ',
            s: 'ບໍ່ເທົ່າໃດວິນາທີ',
            ss: '%d ວິນາທີ',
            m: '1 ນາທີ',
            mm: '%d ນາທີ',
            h: '1 ຊົ່ວໂມງ',
            hh: '%d ຊົ່ວໂມງ',
            d: '1 ມື້',
            dd: '%d ມື້',
            M: '1 ເດືອນ',
            MM: '%d ເດືອນ',
            y: '1 ປີ',
            yy: '%d ປີ',
        },
        dayOfMonthOrdinalParse: /(ທີ່)\d{1,2}/,
        ordinal: function (number) {
            return 'ທີ່' + number;
        },
    });
 
    return lo;
 
})));
 
 
/***/ }),
/* 577 */
/***/ (function(module, exports, __webpack_require__) {
 
//! moment.js locale configuration
//! locale : Lithuanian [lt]
//! author : Mindaugas Mozūras : https://github.com/mmozuras
 
;(function (global, factory) {
    true ? factory(__webpack_require__(3)) :
   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
   factory(global.moment)
}(this, (function (moment) { 'use strict';
 
    //! moment.js locale configuration
 
    var units = {
        ss: 'sekundė_sekundžių_sekundes',
        m: 'minutė_minutės_minutę',
        mm: 'minutės_minučių_minutes',
        h: 'valanda_valandos_valandą',
        hh: 'valandos_valandų_valandas',
        d: 'diena_dienos_dieną',
        dd: 'dienos_dienų_dienas',
        M: 'mėnuo_mėnesio_mėnesį',
        MM: 'mėnesiai_mėnesių_mėnesius',
        y: 'metai_metų_metus',
        yy: 'metai_metų_metus',
    };
    function translateSeconds(number, withoutSuffix, key, isFuture) {
        if (withoutSuffix) {
            return 'kelios sekundės';
        } else {
            return isFuture ? 'kelių sekundžių' : 'kelias sekundes';
        }
    }
    function translateSingular(number, withoutSuffix, key, isFuture) {
        return withoutSuffix
            ? forms(key)[0]
            : isFuture
            ? forms(key)[1]
            : forms(key)[2];
    }
    function special(number) {
        return number % 10 === 0 || (number > 10 && number < 20);
    }
    function forms(key) {
        return units[key].split('_');
    }
    function translate(number, withoutSuffix, key, isFuture) {
        var result = number + ' ';
        if (number === 1) {
            return (
                result + translateSingular(number, withoutSuffix, key[0], isFuture)
            );
        } else if (withoutSuffix) {
            return result + (special(number) ? forms(key)[1] : forms(key)[0]);
        } else {
            if (isFuture) {
                return result + forms(key)[1];
            } else {
                return result + (special(number) ? forms(key)[1] : forms(key)[2]);
            }
        }
    }
    var lt = moment.defineLocale('lt', {
        months: {
            format: 'sausio_vasario_kovo_balandžio_gegužės_birželio_liepos_rugpjūčio_rugsėjo_spalio_lapkričio_gruodžio'.split(
                '_'
            ),
            standalone:
                'sausis_vasaris_kovas_balandis_gegužė_birželis_liepa_rugpjūtis_rugsėjis_spalis_lapkritis_gruodis'.split(
                    '_'
                ),
            isFormat: /D[oD]?(\[[^\[\]]*\]|\s)+MMMM?|MMMM?(\[[^\[\]]*\]|\s)+D[oD]?/,
        },
        monthsShort: 'sau_vas_kov_bal_geg_bir_lie_rgp_rgs_spa_lap_grd'.split('_'),
        weekdays: {
            format: 'sekmadienį_pirmadienį_antradienį_trečiadienį_ketvirtadienį_penktadienį_šeštadienį'.split(
                '_'
            ),
            standalone:
                'sekmadienis_pirmadienis_antradienis_trečiadienis_ketvirtadienis_penktadienis_šeštadienis'.split(
                    '_'
                ),
            isFormat: /dddd HH:mm/,
        },
        weekdaysShort: 'Sek_Pir_Ant_Tre_Ket_Pen_Šeš'.split('_'),
        weekdaysMin: 'S_P_A_T_K_Pn_Š'.split('_'),
        weekdaysParseExact: true,
        longDateFormat: {
            LT: 'HH:mm',
            LTS: 'HH:mm:ss',
            L: 'YYYY-MM-DD',
            LL: 'YYYY [m.] MMMM D [d.]',
            LLL: 'YYYY [m.] MMMM D [d.], HH:mm [val.]',
            LLLL: 'YYYY [m.] MMMM D [d.], dddd, HH:mm [val.]',
            l: 'YYYY-MM-DD',
            ll: 'YYYY [m.] MMMM D [d.]',
            lll: 'YYYY [m.] MMMM D [d.], HH:mm [val.]',
            llll: 'YYYY [m.] MMMM D [d.], ddd, HH:mm [val.]',
        },
        calendar: {
            sameDay: '[Šiandien] LT',
            nextDay: '[Rytoj] LT',
            nextWeek: 'dddd LT',
            lastDay: '[Vakar] LT',
            lastWeek: '[Praėjusį] dddd LT',
            sameElse: 'L',
        },
        relativeTime: {
            future: 'po %s',
            past: 'prieš %s',
            s: translateSeconds,
            ss: translate,
            m: translateSingular,
            mm: translate,
            h: translateSingular,
            hh: translate,
            d: translateSingular,
            dd: translate,
            M: translateSingular,
            MM: translate,
            y: translateSingular,
            yy: translate,
        },
        dayOfMonthOrdinalParse: /\d{1,2}-oji/,
        ordinal: function (number) {
            return number + '-oji';
        },
        week: {
            dow: 1, // Monday is the first day of the week.
            doy: 4, // The week that contains Jan 4th is the first week of the year.
        },
    });
 
    return lt;
 
})));
 
 
/***/ }),
/* 578 */
/***/ (function(module, exports, __webpack_require__) {
 
//! moment.js locale configuration
//! locale : Latvian [lv]
//! author : Kristaps Karlsons : https://github.com/skakri
//! author : Jānis Elmeris : https://github.com/JanisE
 
;(function (global, factory) {
    true ? factory(__webpack_require__(3)) :
   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
   factory(global.moment)
}(this, (function (moment) { 'use strict';
 
    //! moment.js locale configuration
 
    var units = {
        ss: 'sekundes_sekundēm_sekunde_sekundes'.split('_'),
        m: 'minūtes_minūtēm_minūte_minūtes'.split('_'),
        mm: 'minūtes_minūtēm_minūte_minūtes'.split('_'),
        h: 'stundas_stundām_stunda_stundas'.split('_'),
        hh: 'stundas_stundām_stunda_stundas'.split('_'),
        d: 'dienas_dienām_diena_dienas'.split('_'),
        dd: 'dienas_dienām_diena_dienas'.split('_'),
        M: 'mēneša_mēnešiem_mēnesis_mēneši'.split('_'),
        MM: 'mēneša_mēnešiem_mēnesis_mēneši'.split('_'),
        y: 'gada_gadiem_gads_gadi'.split('_'),
        yy: 'gada_gadiem_gads_gadi'.split('_'),
    };
    /**
     * @param withoutSuffix boolean true = a length of time; false = before/after a period of time.
     */
    function format(forms, number, withoutSuffix) {
        if (withoutSuffix) {
            // E.g. "21 minūte", "3 minūtes".
            return number % 10 === 1 && number % 100 !== 11 ? forms[2] : forms[3];
        } else {
            // E.g. "21 minūtes" as in "pēc 21 minūtes".
            // E.g. "3 minūtēm" as in "pēc 3 minūtēm".
            return number % 10 === 1 && number % 100 !== 11 ? forms[0] : forms[1];
        }
    }
    function relativeTimeWithPlural(number, withoutSuffix, key) {
        return number + ' ' + format(units[key], number, withoutSuffix);
    }
    function relativeTimeWithSingular(number, withoutSuffix, key) {
        return format(units[key], number, withoutSuffix);
    }
    function relativeSeconds(number, withoutSuffix) {
        return withoutSuffix ? 'dažas sekundes' : 'dažām sekundēm';
    }
 
    var lv = moment.defineLocale('lv', {
        months: 'janvāris_februāris_marts_aprīlis_maijs_jūnijs_jūlijs_augusts_septembris_oktobris_novembris_decembris'.split(
            '_'
        ),
        monthsShort: 'jan_feb_mar_apr_mai_jūn_jūl_aug_sep_okt_nov_dec'.split('_'),
        weekdays:
            'svētdiena_pirmdiena_otrdiena_trešdiena_ceturtdiena_piektdiena_sestdiena'.split(
                '_'
            ),
        weekdaysShort: 'Sv_P_O_T_C_Pk_S'.split('_'),
        weekdaysMin: 'Sv_P_O_T_C_Pk_S'.split('_'),
        weekdaysParseExact: true,
        longDateFormat: {
            LT: 'HH:mm',
            LTS: 'HH:mm:ss',
            L: 'DD.MM.YYYY.',
            LL: 'YYYY. [gada] D. MMMM',
            LLL: 'YYYY. [gada] D. MMMM, HH:mm',
            LLLL: 'YYYY. [gada] D. MMMM, dddd, HH:mm',
        },
        calendar: {
            sameDay: '[Šodien pulksten] LT',
            nextDay: '[Rīt pulksten] LT',
            nextWeek: 'dddd [pulksten] LT',
            lastDay: '[Vakar pulksten] LT',
            lastWeek: '[Pagājušā] dddd [pulksten] LT',
            sameElse: 'L',
        },
        relativeTime: {
            future: 'pēc %s',
            past: 'pirms %s',
            s: relativeSeconds,
            ss: relativeTimeWithPlural,
            m: relativeTimeWithSingular,
            mm: relativeTimeWithPlural,
            h: relativeTimeWithSingular,
            hh: relativeTimeWithPlural,
            d: relativeTimeWithSingular,
            dd: relativeTimeWithPlural,
            M: relativeTimeWithSingular,
            MM: relativeTimeWithPlural,
            y: relativeTimeWithSingular,
            yy: relativeTimeWithPlural,
        },
        dayOfMonthOrdinalParse: /\d{1,2}\./,
        ordinal: '%d.',
        week: {
            dow: 1, // Monday is the first day of the week.
            doy: 4, // The week that contains Jan 4th is the first week of the year.
        },
    });
 
    return lv;
 
})));
 
 
/***/ }),
/* 579 */
/***/ (function(module, exports, __webpack_require__) {
 
//! moment.js locale configuration
//! locale : Montenegrin [me]
//! author : Miodrag Nikač <miodrag@restartit.me> : https://github.com/miodragnikac
 
;(function (global, factory) {
    true ? factory(__webpack_require__(3)) :
   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
   factory(global.moment)
}(this, (function (moment) { 'use strict';
 
    //! moment.js locale configuration
 
    var translator = {
        words: {
            //Different grammatical cases
            ss: ['sekund', 'sekunda', 'sekundi'],
            m: ['jedan minut', 'jednog minuta'],
            mm: ['minut', 'minuta', 'minuta'],
            h: ['jedan sat', 'jednog sata'],
            hh: ['sat', 'sata', 'sati'],
            dd: ['dan', 'dana', 'dana'],
            MM: ['mjesec', 'mjeseca', 'mjeseci'],
            yy: ['godina', 'godine', 'godina'],
        },
        correctGrammaticalCase: function (number, wordKey) {
            return number === 1
                ? wordKey[0]
                : number >= 2 && number <= 4
                ? wordKey[1]
                : wordKey[2];
        },
        translate: function (number, withoutSuffix, key) {
            var wordKey = translator.words[key];
            if (key.length === 1) {
                return withoutSuffix ? wordKey[0] : wordKey[1];
            } else {
                return (
                    number +
                    ' ' +
                    translator.correctGrammaticalCase(number, wordKey)
                );
            }
        },
    };
 
    var me = moment.defineLocale('me', {
        months: 'januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar'.split(
            '_'
        ),
        monthsShort:
            'jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.'.split('_'),
        monthsParseExact: true,
        weekdays: 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split(
            '_'
        ),
        weekdaysShort: 'ned._pon._uto._sri._čet._pet._sub.'.split('_'),
        weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'),
        weekdaysParseExact: true,
        longDateFormat: {
            LT: 'H:mm',
            LTS: 'H:mm:ss',
            L: 'DD.MM.YYYY',
            LL: 'D. MMMM YYYY',
            LLL: 'D. MMMM YYYY H:mm',
            LLLL: 'dddd, D. MMMM YYYY H:mm',
        },
        calendar: {
            sameDay: '[danas u] LT',
            nextDay: '[sjutra u] LT',
 
            nextWeek: function () {
                switch (this.day()) {
                    case 0:
                        return '[u] [nedjelju] [u] LT';
                    case 3:
                        return '[u] [srijedu] [u] LT';
                    case 6:
                        return '[u] [subotu] [u] LT';
                    case 1:
                    case 2:
                    case 4:
                    case 5:
                        return '[u] dddd [u] LT';
                }
            },
            lastDay: '[juče u] LT',
            lastWeek: function () {
                var lastWeekDays = [
                    '[prošle] [nedjelje] [u] LT',
                    '[prošlog] [ponedjeljka] [u] LT',
                    '[prošlog] [utorka] [u] LT',
                    '[prošle] [srijede] [u] LT',
                    '[prošlog] [četvrtka] [u] LT',
                    '[prošlog] [petka] [u] LT',
                    '[prošle] [subote] [u] LT',
                ];
                return lastWeekDays[this.day()];
            },
            sameElse: 'L',
        },
        relativeTime: {
            future: 'za %s',
            past: 'prije %s',
            s: 'nekoliko sekundi',
            ss: translator.translate,
            m: translator.translate,
            mm: translator.translate,
            h: translator.translate,
            hh: translator.translate,
            d: 'dan',
            dd: translator.translate,
            M: 'mjesec',
            MM: translator.translate,
            y: 'godinu',
            yy: translator.translate,
        },
        dayOfMonthOrdinalParse: /\d{1,2}\./,
        ordinal: '%d.',
        week: {
            dow: 1, // Monday is the first day of the week.
            doy: 7, // The week that contains Jan 7th is the first week of the year.
        },
    });
 
    return me;
 
})));
 
 
/***/ }),
/* 580 */
/***/ (function(module, exports, __webpack_require__) {
 
//! moment.js locale configuration
//! locale : Maori [mi]
//! author : John Corrigan <robbiecloset@gmail.com> : https://github.com/johnideal
 
;(function (global, factory) {
    true ? factory(__webpack_require__(3)) :
   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
   factory(global.moment)
}(this, (function (moment) { 'use strict';
 
    //! moment.js locale configuration
 
    var mi = moment.defineLocale('mi', {
        months: 'Kohi-tāte_Hui-tanguru_Poutū-te-rangi_Paenga-whāwhā_Haratua_Pipiri_Hōngoingoi_Here-turi-kōkā_Mahuru_Whiringa-ā-nuku_Whiringa-ā-rangi_Hakihea'.split(
            '_'
        ),
        monthsShort:
            'Kohi_Hui_Pou_Pae_Hara_Pipi_Hōngoi_Here_Mahu_Whi-nu_Whi-ra_Haki'.split(
                '_'
            ),
        monthsRegex: /(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,
        monthsStrictRegex: /(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,
        monthsShortRegex: /(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,
        monthsShortStrictRegex: /(?:['a-z\u0101\u014D\u016B]+\-?){1,2}/i,
        weekdays: 'Rātapu_Mane_Tūrei_Wenerei_Tāite_Paraire_Hātarei'.split('_'),
        weekdaysShort: 'Ta_Ma_Tū_We_Tāi_Pa_Hā'.split('_'),
        weekdaysMin: 'Ta_Ma_Tū_We_Tāi_Pa_Hā'.split('_'),
        longDateFormat: {
            LT: 'HH:mm',
            LTS: 'HH:mm:ss',
            L: 'DD/MM/YYYY',
            LL: 'D MMMM YYYY',
            LLL: 'D MMMM YYYY [i] HH:mm',
            LLLL: 'dddd, D MMMM YYYY [i] HH:mm',
        },
        calendar: {
            sameDay: '[i teie mahana, i] LT',
            nextDay: '[apopo i] LT',
            nextWeek: 'dddd [i] LT',
            lastDay: '[inanahi i] LT',
            lastWeek: 'dddd [whakamutunga i] LT',
            sameElse: 'L',
        },
        relativeTime: {
            future: 'i roto i %s',
            past: '%s i mua',
            s: 'te hēkona ruarua',
            ss: '%d hēkona',
            m: 'he meneti',
            mm: '%d meneti',
            h: 'te haora',
            hh: '%d haora',
            d: 'he ra',
            dd: '%d ra',
            M: 'he marama',
            MM: '%d marama',
            y: 'he tau',
            yy: '%d tau',
        },
        dayOfMonthOrdinalParse: /\d{1,2}º/,
        ordinal: '%dº',
        week: {
            dow: 1, // Monday is the first day of the week.
            doy: 4, // The week that contains Jan 4th is the first week of the year.
        },
    });
 
    return mi;
 
})));
 
 
/***/ }),
/* 581 */
/***/ (function(module, exports, __webpack_require__) {
 
//! moment.js locale configuration
//! locale : Macedonian [mk]
//! author : Borislav Mickov : https://github.com/B0k0
//! author : Sashko Todorov : https://github.com/bkyceh
 
;(function (global, factory) {
    true ? factory(__webpack_require__(3)) :
   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
   factory(global.moment)
}(this, (function (moment) { 'use strict';
 
    //! moment.js locale configuration
 
    var mk = moment.defineLocale('mk', {
        months: 'јануари_февруари_март_април_мај_јуни_јули_август_септември_октомври_ноември_декември'.split(
            '_'
        ),
        monthsShort: 'јан_фев_мар_апр_мај_јун_јул_авг_сеп_окт_ное_дек'.split('_'),
        weekdays: 'недела_понеделник_вторник_среда_четврток_петок_сабота'.split(
            '_'
        ),
        weekdaysShort: 'нед_пон_вто_сре_чет_пет_саб'.split('_'),
        weekdaysMin: 'нe_пo_вт_ср_че_пе_сa'.split('_'),
        longDateFormat: {
            LT: 'H:mm',
            LTS: 'H:mm:ss',
            L: 'D.MM.YYYY',
            LL: 'D MMMM YYYY',
            LLL: 'D MMMM YYYY H:mm',
            LLLL: 'dddd, D MMMM YYYY H:mm',
        },
        calendar: {
            sameDay: '[Денес во] LT',
            nextDay: '[Утре во] LT',
            nextWeek: '[Во] dddd [во] LT',
            lastDay: '[Вчера во] LT',
            lastWeek: function () {
                switch (this.day()) {
                    case 0:
                    case 3:
                    case 6:
                        return '[Изминатата] dddd [во] LT';
                    case 1:
                    case 2:
                    case 4:
                    case 5:
                        return '[Изминатиот] dddd [во] LT';
                }
            },
            sameElse: 'L',
        },
        relativeTime: {
            future: 'за %s',
            past: 'пред %s',
            s: 'неколку секунди',
            ss: '%d секунди',
            m: 'една минута',
            mm: '%d минути',
            h: 'еден час',
            hh: '%d часа',
            d: 'еден ден',
            dd: '%d дена',
            M: 'еден месец',
            MM: '%d месеци',
            y: 'една година',
            yy: '%d години',
        },
        dayOfMonthOrdinalParse: /\d{1,2}-(ев|ен|ти|ви|ри|ми)/,
        ordinal: function (number) {
            var lastDigit = number % 10,
                last2Digits = number % 100;
            if (number === 0) {
                return number + '-ев';
            } else if (last2Digits === 0) {
                return number + '-ен';
            } else if (last2Digits > 10 && last2Digits < 20) {
                return number + '-ти';
            } else if (lastDigit === 1) {
                return number + '-ви';
            } else if (lastDigit === 2) {
                return number + '-ри';
            } else if (lastDigit === 7 || lastDigit === 8) {
                return number + '-ми';
            } else {
                return number + '-ти';
            }
        },
        week: {
            dow: 1, // Monday is the first day of the week.
            doy: 7, // The week that contains Jan 7th is the first week of the year.
        },
    });
 
    return mk;
 
})));
 
 
/***/ }),
/* 582 */
/***/ (function(module, exports, __webpack_require__) {
 
//! moment.js locale configuration
//! locale : Malayalam [ml]
//! author : Floyd Pink : https://github.com/floydpink
 
;(function (global, factory) {
    true ? factory(__webpack_require__(3)) :
   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
   factory(global.moment)
}(this, (function (moment) { 'use strict';
 
    //! moment.js locale configuration
 
    var ml = moment.defineLocale('ml', {
        months: 'ജനുവരി_ഫെബ്രുവരി_മാർച്ച്_ഏപ്രിൽ_മേയ്_ജൂൺ_ജൂലൈ_ഓഗസ്റ്റ്_സെപ്റ്റംബർ_ഒക്ടോബർ_നവംബർ_ഡിസംബർ'.split(
            '_'
        ),
        monthsShort:
            'ജനു._ഫെബ്രു._മാർ._ഏപ്രി._മേയ്_ജൂൺ_ജൂലൈ._ഓഗ._സെപ്റ്റ._ഒക്ടോ._നവം._ഡിസം.'.split(
                '_'
            ),
        monthsParseExact: true,
        weekdays:
            'ഞായറാഴ്ച_തിങ്കളാഴ്ച_ചൊവ്വാഴ്ച_ബുധനാഴ്ച_വ്യാഴാഴ്ച_വെള്ളിയാഴ്ച_ശനിയാഴ്ച'.split(
                '_'
            ),
        weekdaysShort: 'ഞായർ_തിങ്കൾ_ചൊവ്വ_ബുധൻ_വ്യാഴം_വെള്ളി_ശനി'.split('_'),
        weekdaysMin: 'ഞാ_തി_ചൊ_ബു_വ്യാ_വെ_ശ'.split('_'),
        longDateFormat: {
            LT: 'A h:mm -നു',
            LTS: 'A h:mm:ss -നു',
            L: 'DD/MM/YYYY',
            LL: 'D MMMM YYYY',
            LLL: 'D MMMM YYYY, A h:mm -നു',
            LLLL: 'dddd, D MMMM YYYY, A h:mm -നു',
        },
        calendar: {
            sameDay: '[ഇന്ന്] LT',
            nextDay: '[നാളെ] LT',
            nextWeek: 'dddd, LT',
            lastDay: '[ഇന്നലെ] LT',
            lastWeek: '[കഴിഞ്ഞ] dddd, LT',
            sameElse: 'L',
        },
        relativeTime: {
            future: '%s കഴിഞ്ഞ്',
            past: '%s മുൻപ്',
            s: 'അൽപ നിമിഷങ്ങൾ',
            ss: '%d സെക്കൻഡ്',
            m: 'ഒരു മിനിറ്റ്',
            mm: '%d മിനിറ്റ്',
            h: 'ഒരു മണിക്കൂർ',
            hh: '%d മണിക്കൂർ',
            d: 'ഒരു ദിവസം',
            dd: '%d ദിവസം',
            M: 'ഒരു മാസം',
            MM: '%d മാസം',
            y: 'ഒരു വർഷം',
            yy: '%d വർഷം',
        },
        meridiemParse: /രാത്രി|രാവിലെ|ഉച്ച കഴിഞ്ഞ്|വൈകുന്നേരം|രാത്രി/i,
        meridiemHour: function (hour, meridiem) {
            if (hour === 12) {
                hour = 0;
            }
            if (
                (meridiem === 'രാത്രി' && hour >= 4) ||
                meridiem === 'ഉച്ച കഴിഞ്ഞ്' ||
                meridiem === 'വൈകുന്നേരം'
            ) {
                return hour + 12;
            } else {
                return hour;
            }
        },
        meridiem: function (hour, minute, isLower) {
            if (hour < 4) {
                return 'രാത്രി';
            } else if (hour < 12) {
                return 'രാവിലെ';
            } else if (hour < 17) {
                return 'ഉച്ച കഴിഞ്ഞ്';
            } else if (hour < 20) {
                return 'വൈകുന്നേരം';
            } else {
                return 'രാത്രി';
            }
        },
    });
 
    return ml;
 
})));
 
 
/***/ }),
/* 583 */
/***/ (function(module, exports, __webpack_require__) {
 
//! moment.js locale configuration
//! locale : Mongolian [mn]
//! author : Javkhlantugs Nyamdorj : https://github.com/javkhaanj7
 
;(function (global, factory) {
    true ? factory(__webpack_require__(3)) :
   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
   factory(global.moment)
}(this, (function (moment) { 'use strict';
 
    //! moment.js locale configuration
 
    function translate(number, withoutSuffix, key, isFuture) {
        switch (key) {
            case 's':
                return withoutSuffix ? 'хэдхэн секунд' : 'хэдхэн секундын';
            case 'ss':
                return number + (withoutSuffix ? ' секунд' : ' секундын');
            case 'm':
            case 'mm':
                return number + (withoutSuffix ? ' минут' : ' минутын');
            case 'h':
            case 'hh':
                return number + (withoutSuffix ? ' цаг' : ' цагийн');
            case 'd':
            case 'dd':
                return number + (withoutSuffix ? ' өдөр' : ' өдрийн');
            case 'M':
            case 'MM':
                return number + (withoutSuffix ? ' сар' : ' сарын');
            case 'y':
            case 'yy':
                return number + (withoutSuffix ? ' жил' : ' жилийн');
            default:
                return number;
        }
    }
 
    var mn = moment.defineLocale('mn', {
        months: 'Нэгдүгээр сар_Хоёрдугаар сар_Гуравдугаар сар_Дөрөвдүгээр сар_Тавдугаар сар_Зургадугаар сар_Долдугаар сар_Наймдугаар сар_Есдүгээр сар_Аравдугаар сар_Арван нэгдүгээр сар_Арван хоёрдугаар сар'.split(
            '_'
        ),
        monthsShort:
            '1 сар_2 сар_3 сар_4 сар_5 сар_6 сар_7 сар_8 сар_9 сар_10 сар_11 сар_12 сар'.split(
                '_'
            ),
        monthsParseExact: true,
        weekdays: 'Ням_Даваа_Мягмар_Лхагва_Пүрэв_Баасан_Бямба'.split('_'),
        weekdaysShort: 'Ням_Дав_Мяг_Лха_Пүр_Баа_Бям'.split('_'),
        weekdaysMin: 'Ня_Да_Мя_Лх_Пү_Ба_Бя'.split('_'),
        weekdaysParseExact: true,
        longDateFormat: {
            LT: 'HH:mm',
            LTS: 'HH:mm:ss',
            L: 'YYYY-MM-DD',
            LL: 'YYYY оны MMMMын D',
            LLL: 'YYYY оны MMMMын D HH:mm',
            LLLL: 'dddd, YYYY оны MMMMын D HH:mm',
        },
        meridiemParse: /ҮӨ|ҮХ/i,
        isPM: function (input) {
            return input === 'ҮХ';
        },
        meridiem: function (hour, minute, isLower) {
            if (hour < 12) {
                return 'ҮӨ';
            } else {
                return 'ҮХ';
            }
        },
        calendar: {
            sameDay: '[Өнөөдөр] LT',
            nextDay: '[Маргааш] LT',
            nextWeek: '[Ирэх] dddd LT',
            lastDay: '[Өчигдөр] LT',
            lastWeek: '[Өнгөрсөн] dddd LT',
            sameElse: 'L',
        },
        relativeTime: {
            future: '%s дараа',
            past: '%s өмнө',
            s: translate,
            ss: translate,
            m: translate,
            mm: translate,
            h: translate,
            hh: translate,
            d: translate,
            dd: translate,
            M: translate,
            MM: translate,
            y: translate,
            yy: translate,
        },
        dayOfMonthOrdinalParse: /\d{1,2} өдөр/,
        ordinal: function (number, period) {
            switch (period) {
                case 'd':
                case 'D':
                case 'DDD':
                    return number + ' өдөр';
                default:
                    return number;
            }
        },
    });
 
    return mn;
 
})));
 
 
/***/ }),
/* 584 */
/***/ (function(module, exports, __webpack_require__) {
 
//! moment.js locale configuration
//! locale : Marathi [mr]
//! author : Harshad Kale : https://github.com/kalehv
//! author : Vivek Athalye : https://github.com/vnathalye
 
;(function (global, factory) {
    true ? factory(__webpack_require__(3)) :
   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
   factory(global.moment)
}(this, (function (moment) { 'use strict';
 
    //! moment.js locale configuration
 
    var symbolMap = {
            1: '१',
            2: '२',
            3: '३',
            4: '४',
            5: '५',
            6: '६',
            7: '७',
            8: '८',
            9: '९',
            0: '०',
        },
        numberMap = {
            '१': '1',
            '२': '2',
            '३': '3',
            '४': '4',
            '५': '5',
            '६': '6',
            '७': '7',
            '८': '8',
            '९': '9',
            '०': '0',
        };
 
    function relativeTimeMr(number, withoutSuffix, string, isFuture) {
        var output = '';
        if (withoutSuffix) {
            switch (string) {
                case 's':
                    output = 'काही सेकंद';
                    break;
                case 'ss':
                    output = '%d सेकंद';
                    break;
                case 'm':
                    output = 'एक मिनिट';
                    break;
                case 'mm':
                    output = '%d मिनिटे';
                    break;
                case 'h':
                    output = 'एक तास';
                    break;
                case 'hh':
                    output = '%d तास';
                    break;
                case 'd':
                    output = 'एक दिवस';
                    break;
                case 'dd':
                    output = '%d दिवस';
                    break;
                case 'M':
                    output = 'एक महिना';
                    break;
                case 'MM':
                    output = '%d महिने';
                    break;
                case 'y':
                    output = 'एक वर्ष';
                    break;
                case 'yy':
                    output = '%d वर्षे';
                    break;
            }
        } else {
            switch (string) {
                case 's':
                    output = 'काही सेकंदां';
                    break;
                case 'ss':
                    output = '%d सेकंदां';
                    break;
                case 'm':
                    output = 'एका मिनिटा';
                    break;
                case 'mm':
                    output = '%d मिनिटां';
                    break;
                case 'h':
                    output = 'एका तासा';
                    break;
                case 'hh':
                    output = '%d तासां';
                    break;
                case 'd':
                    output = 'एका दिवसा';
                    break;
                case 'dd':
                    output = '%d दिवसां';
                    break;
                case 'M':
                    output = 'एका महिन्या';
                    break;
                case 'MM':
                    output = '%d महिन्यां';
                    break;
                case 'y':
                    output = 'एका वर्षा';
                    break;
                case 'yy':
                    output = '%d वर्षां';
                    break;
            }
        }
        return output.replace(/%d/i, number);
    }
 
    var mr = moment.defineLocale('mr', {
        months: 'जानेवारी_फेब्रुवारी_मार्च_एप्रिल_मे_जून_जुलै_ऑगस्ट_सप्टेंबर_ऑक्टोबर_नोव्हेंबर_डिसेंबर'.split(
            '_'
        ),
        monthsShort:
            'जाने._फेब्रु._मार्च._एप्रि._मे._जून._जुलै._ऑग._सप्टें._ऑक्टो._नोव्हें._डिसें.'.split(
                '_'
            ),
        monthsParseExact: true,
        weekdays: 'रविवार_सोमवार_मंगळवार_बुधवार_गुरूवार_शुक्रवार_शनिवार'.split('_'),
        weekdaysShort: 'रवि_सोम_मंगळ_बुध_गुरू_शुक्र_शनि'.split('_'),
        weekdaysMin: 'र_सो_मं_बु_गु_शु_श'.split('_'),
        longDateFormat: {
            LT: 'A h:mm वाजता',
            LTS: 'A h:mm:ss वाजता',
            L: 'DD/MM/YYYY',
            LL: 'D MMMM YYYY',
            LLL: 'D MMMM YYYY, A h:mm वाजता',
            LLLL: 'dddd, D MMMM YYYY, A h:mm वाजता',
        },
        calendar: {
            sameDay: '[आज] LT',
            nextDay: '[उद्या] LT',
            nextWeek: 'dddd, LT',
            lastDay: '[काल] LT',
            lastWeek: '[मागील] dddd, LT',
            sameElse: 'L',
        },
        relativeTime: {
            future: '%sमध्ये',
            past: '%sपूर्वी',
            s: relativeTimeMr,
            ss: relativeTimeMr,
            m: relativeTimeMr,
            mm: relativeTimeMr,
            h: relativeTimeMr,
            hh: relativeTimeMr,
            d: relativeTimeMr,
            dd: relativeTimeMr,
            M: relativeTimeMr,
            MM: relativeTimeMr,
            y: relativeTimeMr,
            yy: relativeTimeMr,
        },
        preparse: function (string) {
            return string.replace(/[१२३४५६७८९०]/g, function (match) {
                return numberMap[match];
            });
        },
        postformat: function (string) {
            return string.replace(/\d/g, function (match) {
                return symbolMap[match];
            });
        },
        meridiemParse: /पहाटे|सकाळी|दुपारी|सायंकाळी|रात्री/,
        meridiemHour: function (hour, meridiem) {
            if (hour === 12) {
                hour = 0;
            }
            if (meridiem === 'पहाटे' || meridiem === 'सकाळी') {
                return hour;
            } else if (
                meridiem === 'दुपारी' ||
                meridiem === 'सायंकाळी' ||
                meridiem === 'रात्री'
            ) {
                return hour >= 12 ? hour : hour + 12;
            }
        },
        meridiem: function (hour, minute, isLower) {
            if (hour >= 0 && hour < 6) {
                return 'पहाटे';
            } else if (hour < 12) {
                return 'सकाळी';
            } else if (hour < 17) {
                return 'दुपारी';
            } else if (hour < 20) {
                return 'सायंकाळी';
            } else {
                return 'रात्री';
            }
        },
        week: {
            dow: 0, // Sunday is the first day of the week.
            doy: 6, // The week that contains Jan 6th is the first week of the year.
        },
    });
 
    return mr;
 
})));
 
 
/***/ }),
/* 585 */
/***/ (function(module, exports, __webpack_require__) {
 
//! moment.js locale configuration
//! locale : Malay [ms]
//! author : Weldan Jamili : https://github.com/weldan
 
;(function (global, factory) {
    true ? factory(__webpack_require__(3)) :
   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
   factory(global.moment)
}(this, (function (moment) { 'use strict';
 
    //! moment.js locale configuration
 
    var ms = moment.defineLocale('ms', {
        months: 'Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember'.split(
            '_'
        ),
        monthsShort: 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis'.split('_'),
        weekdays: 'Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu'.split('_'),
        weekdaysShort: 'Ahd_Isn_Sel_Rab_Kha_Jum_Sab'.split('_'),
        weekdaysMin: 'Ah_Is_Sl_Rb_Km_Jm_Sb'.split('_'),
        longDateFormat: {
            LT: 'HH.mm',
            LTS: 'HH.mm.ss',
            L: 'DD/MM/YYYY',
            LL: 'D MMMM YYYY',
            LLL: 'D MMMM YYYY [pukul] HH.mm',
            LLLL: 'dddd, D MMMM YYYY [pukul] HH.mm',
        },
        meridiemParse: /pagi|tengahari|petang|malam/,
        meridiemHour: function (hour, meridiem) {
            if (hour === 12) {
                hour = 0;
            }
            if (meridiem === 'pagi') {
                return hour;
            } else if (meridiem === 'tengahari') {
                return hour >= 11 ? hour : hour + 12;
            } else if (meridiem === 'petang' || meridiem === 'malam') {
                return hour + 12;
            }
        },
        meridiem: function (hours, minutes, isLower) {
            if (hours < 11) {
                return 'pagi';
            } else if (hours < 15) {
                return 'tengahari';
            } else if (hours < 19) {
                return 'petang';
            } else {
                return 'malam';
            }
        },
        calendar: {
            sameDay: '[Hari ini pukul] LT',
            nextDay: '[Esok pukul] LT',
            nextWeek: 'dddd [pukul] LT',
            lastDay: '[Kelmarin pukul] LT',
            lastWeek: 'dddd [lepas pukul] LT',
            sameElse: 'L',
        },
        relativeTime: {
            future: 'dalam %s',
            past: '%s yang lepas',
            s: 'beberapa saat',
            ss: '%d saat',
            m: 'seminit',
            mm: '%d minit',
            h: 'sejam',
            hh: '%d jam',
            d: 'sehari',
            dd: '%d hari',
            M: 'sebulan',
            MM: '%d bulan',
            y: 'setahun',
            yy: '%d tahun',
        },
        week: {
            dow: 1, // Monday is the first day of the week.
            doy: 7, // The week that contains Jan 7th is the first week of the year.
        },
    });
 
    return ms;
 
})));
 
 
/***/ }),
/* 586 */
/***/ (function(module, exports, __webpack_require__) {
 
//! moment.js locale configuration
//! locale : Malay [ms-my]
//! note : DEPRECATED, the correct one is [ms]
//! author : Weldan Jamili : https://github.com/weldan
 
;(function (global, factory) {
    true ? factory(__webpack_require__(3)) :
   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
   factory(global.moment)
}(this, (function (moment) { 'use strict';
 
    //! moment.js locale configuration
 
    var msMy = moment.defineLocale('ms-my', {
        months: 'Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember'.split(
            '_'
        ),
        monthsShort: 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis'.split('_'),
        weekdays: 'Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu'.split('_'),
        weekdaysShort: 'Ahd_Isn_Sel_Rab_Kha_Jum_Sab'.split('_'),
        weekdaysMin: 'Ah_Is_Sl_Rb_Km_Jm_Sb'.split('_'),
        longDateFormat: {
            LT: 'HH.mm',
            LTS: 'HH.mm.ss',
            L: 'DD/MM/YYYY',
            LL: 'D MMMM YYYY',
            LLL: 'D MMMM YYYY [pukul] HH.mm',
            LLLL: 'dddd, D MMMM YYYY [pukul] HH.mm',
        },
        meridiemParse: /pagi|tengahari|petang|malam/,
        meridiemHour: function (hour, meridiem) {
            if (hour === 12) {
                hour = 0;
            }
            if (meridiem === 'pagi') {
                return hour;
            } else if (meridiem === 'tengahari') {
                return hour >= 11 ? hour : hour + 12;
            } else if (meridiem === 'petang' || meridiem === 'malam') {
                return hour + 12;
            }
        },
        meridiem: function (hours, minutes, isLower) {
            if (hours < 11) {
                return 'pagi';
            } else if (hours < 15) {
                return 'tengahari';
            } else if (hours < 19) {
                return 'petang';
            } else {
                return 'malam';
            }
        },
        calendar: {
            sameDay: '[Hari ini pukul] LT',
            nextDay: '[Esok pukul] LT',
            nextWeek: 'dddd [pukul] LT',
            lastDay: '[Kelmarin pukul] LT',
            lastWeek: 'dddd [lepas pukul] LT',
            sameElse: 'L',
        },
        relativeTime: {
            future: 'dalam %s',
            past: '%s yang lepas',
            s: 'beberapa saat',
            ss: '%d saat',
            m: 'seminit',
            mm: '%d minit',
            h: 'sejam',
            hh: '%d jam',
            d: 'sehari',
            dd: '%d hari',
            M: 'sebulan',
            MM: '%d bulan',
            y: 'setahun',
            yy: '%d tahun',
        },
        week: {
            dow: 1, // Monday is the first day of the week.
            doy: 7, // The week that contains Jan 7th is the first week of the year.
        },
    });
 
    return msMy;
 
})));
 
 
/***/ }),
/* 587 */
/***/ (function(module, exports, __webpack_require__) {
 
//! moment.js locale configuration
//! locale : Maltese (Malta) [mt]
//! author : Alessandro Maruccia : https://github.com/alesma
 
;(function (global, factory) {
    true ? factory(__webpack_require__(3)) :
   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
   factory(global.moment)
}(this, (function (moment) { 'use strict';
 
    //! moment.js locale configuration
 
    var mt = moment.defineLocale('mt', {
        months: 'Jannar_Frar_Marzu_April_Mejju_Ġunju_Lulju_Awwissu_Settembru_Ottubru_Novembru_Diċembru'.split(
            '_'
        ),
        monthsShort: 'Jan_Fra_Mar_Apr_Mej_Ġun_Lul_Aww_Set_Ott_Nov_Diċ'.split('_'),
        weekdays:
            'Il-Ħadd_It-Tnejn_It-Tlieta_L-Erbgħa_Il-Ħamis_Il-Ġimgħa_Is-Sibt'.split(
                '_'
            ),
        weekdaysShort: 'Ħad_Tne_Tli_Erb_Ħam_Ġim_Sib'.split('_'),
        weekdaysMin: 'Ħa_Tn_Tl_Er_Ħa_Ġi_Si'.split('_'),
        longDateFormat: {
            LT: 'HH:mm',
            LTS: 'HH:mm:ss',
            L: 'DD/MM/YYYY',
            LL: 'D MMMM YYYY',
            LLL: 'D MMMM YYYY HH:mm',
            LLLL: 'dddd, D MMMM YYYY HH:mm',
        },
        calendar: {
            sameDay: '[Illum fil-]LT',
            nextDay: '[Għada fil-]LT',
            nextWeek: 'dddd [fil-]LT',
            lastDay: '[Il-bieraħ fil-]LT',
            lastWeek: 'dddd [li għadda] [fil-]LT',
            sameElse: 'L',
        },
        relativeTime: {
            future: 'f’ %s',
            past: '%s ilu',
            s: 'ftit sekondi',
            ss: '%d sekondi',
            m: 'minuta',
            mm: '%d minuti',
            h: 'siegħa',
            hh: '%d siegħat',
            d: 'ġurnata',
            dd: '%d ġranet',
            M: 'xahar',
            MM: '%d xhur',
            y: 'sena',
            yy: '%d sni',
        },
        dayOfMonthOrdinalParse: /\d{1,2}º/,
        ordinal: '%dº',
        week: {
            dow: 1, // Monday is the first day of the week.
            doy: 4, // The week that contains Jan 4th is the first week of the year.
        },
    });
 
    return mt;
 
})));
 
 
/***/ }),
/* 588 */
/***/ (function(module, exports, __webpack_require__) {
 
//! moment.js locale configuration
//! locale : Burmese [my]
//! author : Squar team, mysquar.com
//! author : David Rossellat : https://github.com/gholadr
//! author : Tin Aung Lin : https://github.com/thanyawzinmin
 
;(function (global, factory) {
    true ? factory(__webpack_require__(3)) :
   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
   factory(global.moment)
}(this, (function (moment) { 'use strict';
 
    //! moment.js locale configuration
 
    var symbolMap = {
            1: '၁',
            2: '၂',
            3: '၃',
            4: '၄',
            5: '၅',
            6: '၆',
            7: '၇',
            8: '၈',
            9: '၉',
            0: '၀',
        },
        numberMap = {
            '၁': '1',
            '၂': '2',
            '၃': '3',
            '၄': '4',
            '၅': '5',
            '၆': '6',
            '၇': '7',
            '၈': '8',
            '၉': '9',
            '၀': '0',
        };
 
    var my = moment.defineLocale('my', {
        months: 'ဇန်နဝါရီ_ဖေဖော်ဝါရီ_မတ်_ဧပြီ_မေ_ဇွန်_ဇူလိုင်_သြဂုတ်_စက်တင်ဘာ_အောက်တိုဘာ_နိုဝင်ဘာ_ဒီဇင်ဘာ'.split(
            '_'
        ),
        monthsShort: 'ဇန်_ဖေ_မတ်_ပြီ_မေ_ဇွန်_လိုင်_သြ_စက်_အောက်_နို_ဒီ'.split('_'),
        weekdays: 'တနင်္ဂနွေ_တနင်္လာ_အင်္ဂါ_ဗုဒ္ဓဟူး_ကြာသပတေး_သောကြာ_စနေ'.split(
            '_'
        ),
        weekdaysShort: 'နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ'.split('_'),
        weekdaysMin: 'နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ'.split('_'),
 
        longDateFormat: {
            LT: 'HH:mm',
            LTS: 'HH:mm:ss',
            L: 'DD/MM/YYYY',
            LL: 'D MMMM YYYY',
            LLL: 'D MMMM YYYY HH:mm',
            LLLL: 'dddd D MMMM YYYY HH:mm',
        },
        calendar: {
            sameDay: '[ယနေ.] LT [မှာ]',
            nextDay: '[မနက်ဖြန်] LT [မှာ]',
            nextWeek: 'dddd LT [မှာ]',
            lastDay: '[မနေ.က] LT [မှာ]',
            lastWeek: '[ပြီးခဲ့သော] dddd LT [မှာ]',
            sameElse: 'L',
        },
        relativeTime: {
            future: 'လာမည့် %s မှာ',
            past: 'လွန်ခဲ့သော %s က',
            s: 'စက္ကန်.အနည်းငယ်',
            ss: '%d စက္ကန့်',
            m: 'တစ်မိနစ်',
            mm: '%d မိနစ်',
            h: 'တစ်နာရီ',
            hh: '%d နာရီ',
            d: 'တစ်ရက်',
            dd: '%d ရက်',
            M: 'တစ်လ',
            MM: '%d လ',
            y: 'တစ်နှစ်',
            yy: '%d နှစ်',
        },
        preparse: function (string) {
            return string.replace(/[၁၂၃၄၅၆၇၈၉၀]/g, function (match) {
                return numberMap[match];
            });
        },
        postformat: function (string) {
            return string.replace(/\d/g, function (match) {
                return symbolMap[match];
            });
        },
        week: {
            dow: 1, // Monday is the first day of the week.
            doy: 4, // The week that contains Jan 4th is the first week of the year.
        },
    });
 
    return my;
 
})));
 
 
/***/ }),
/* 589 */
/***/ (function(module, exports, __webpack_require__) {
 
//! moment.js locale configuration
//! locale : Norwegian Bokmål [nb]
//! authors : Espen Hovlandsdal : https://github.com/rexxars
//!           Sigurd Gartmann : https://github.com/sigurdga
//!           Stephen Ramthun : https://github.com/stephenramthun
 
;(function (global, factory) {
    true ? factory(__webpack_require__(3)) :
   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
   factory(global.moment)
}(this, (function (moment) { 'use strict';
 
    //! moment.js locale configuration
 
    var nb = moment.defineLocale('nb', {
        months: 'januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember'.split(
            '_'
        ),
        monthsShort:
            'jan._feb._mars_apr._mai_juni_juli_aug._sep._okt._nov._des.'.split('_'),
        monthsParseExact: true,
        weekdays: 'søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag'.split('_'),
        weekdaysShort: 'sø._ma._ti._on._to._fr._lø.'.split('_'),
        weekdaysMin: 'sø_ma_ti_on_to_fr_lø'.split('_'),
        weekdaysParseExact: true,
        longDateFormat: {
            LT: 'HH:mm',
            LTS: 'HH:mm:ss',
            L: 'DD.MM.YYYY',
            LL: 'D. MMMM YYYY',
            LLL: 'D. MMMM YYYY [kl.] HH:mm',
            LLLL: 'dddd D. MMMM YYYY [kl.] HH:mm',
        },
        calendar: {
            sameDay: '[i dag kl.] LT',
            nextDay: '[i morgen kl.] LT',
            nextWeek: 'dddd [kl.] LT',
            lastDay: '[i går kl.] LT',
            lastWeek: '[forrige] dddd [kl.] LT',
            sameElse: 'L',
        },
        relativeTime: {
            future: 'om %s',
            past: '%s siden',
            s: 'noen sekunder',
            ss: '%d sekunder',
            m: 'ett minutt',
            mm: '%d minutter',
            h: 'en time',
            hh: '%d timer',
            d: 'en dag',
            dd: '%d dager',
            w: 'en uke',
            ww: '%d uker',
            M: 'en måned',
            MM: '%d måneder',
            y: 'ett år',
            yy: '%d år',
        },
        dayOfMonthOrdinalParse: /\d{1,2}\./,
        ordinal: '%d.',
        week: {
            dow: 1, // Monday is the first day of the week.
            doy: 4, // The week that contains Jan 4th is the first week of the year.
        },
    });
 
    return nb;
 
})));
 
 
/***/ }),
/* 590 */
/***/ (function(module, exports, __webpack_require__) {
 
//! moment.js locale configuration
//! locale : Nepalese [ne]
//! author : suvash : https://github.com/suvash
 
;(function (global, factory) {
    true ? factory(__webpack_require__(3)) :
   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
   factory(global.moment)
}(this, (function (moment) { 'use strict';
 
    //! moment.js locale configuration
 
    var symbolMap = {
            1: '१',
            2: '२',
            3: '३',
            4: '४',
            5: '५',
            6: '६',
            7: '७',
            8: '८',
            9: '९',
            0: '०',
        },
        numberMap = {
            '१': '1',
            '२': '2',
            '३': '3',
            '४': '4',
            '५': '5',
            '६': '6',
            '७': '7',
            '८': '8',
            '९': '9',
            '०': '0',
        };
 
    var ne = moment.defineLocale('ne', {
        months: 'जनवरी_फेब्रुवरी_मार्च_अप्रिल_मई_जुन_जुलाई_अगष्ट_सेप्टेम्बर_अक्टोबर_नोभेम्बर_डिसेम्बर'.split(
            '_'
        ),
        monthsShort:
            'जन._फेब्रु._मार्च_अप्रि._मई_जुन_जुलाई._अग._सेप्ट._अक्टो._नोभे._डिसे.'.split(
                '_'
            ),
        monthsParseExact: true,
        weekdays: 'आइतबार_सोमबार_मङ्गलबार_बुधबार_बिहिबार_शुक्रबार_शनिबार'.split(
            '_'
        ),
        weekdaysShort: 'आइत._सोम._मङ्गल._बुध._बिहि._शुक्र._शनि.'.split('_'),
        weekdaysMin: 'आ._सो._मं._बु._बि._शु._श.'.split('_'),
        weekdaysParseExact: true,
        longDateFormat: {
            LT: 'Aको h:mm बजे',
            LTS: 'Aको h:mm:ss बजे',
            L: 'DD/MM/YYYY',
            LL: 'D MMMM YYYY',
            LLL: 'D MMMM YYYY, Aको h:mm बजे',
            LLLL: 'dddd, D MMMM YYYY, Aको h:mm बजे',
        },
        preparse: function (string) {
            return string.replace(/[१२३४५६७८९०]/g, function (match) {
                return numberMap[match];
            });
        },
        postformat: function (string) {
            return string.replace(/\d/g, function (match) {
                return symbolMap[match];
            });
        },
        meridiemParse: /राति|बिहान|दिउँसो|साँझ/,
        meridiemHour: function (hour, meridiem) {
            if (hour === 12) {
                hour = 0;
            }
            if (meridiem === 'राति') {
                return hour < 4 ? hour : hour + 12;
            } else if (meridiem === 'बिहान') {
                return hour;
            } else if (meridiem === 'दिउँसो') {
                return hour >= 10 ? hour : hour + 12;
            } else if (meridiem === 'साँझ') {
                return hour + 12;
            }
        },
        meridiem: function (hour, minute, isLower) {
            if (hour < 3) {
                return 'राति';
            } else if (hour < 12) {
                return 'बिहान';
            } else if (hour < 16) {
                return 'दिउँसो';
            } else if (hour < 20) {
                return 'साँझ';
            } else {
                return 'राति';
            }
        },
        calendar: {
            sameDay: '[आज] LT',
            nextDay: '[भोलि] LT',
            nextWeek: '[आउँदो] dddd[,] LT',
            lastDay: '[हिजो] LT',
            lastWeek: '[गएको] dddd[,] LT',
            sameElse: 'L',
        },
        relativeTime: {
            future: '%sमा',
            past: '%s अगाडि',
            s: 'केही क्षण',
            ss: '%d सेकेण्ड',
            m: 'एक मिनेट',
            mm: '%d मिनेट',
            h: 'एक घण्टा',
            hh: '%d घण्टा',
            d: 'एक दिन',
            dd: '%d दिन',
            M: 'एक महिना',
            MM: '%d महिना',
            y: 'एक बर्ष',
            yy: '%d बर्ष',
        },
        week: {
            dow: 0, // Sunday is the first day of the week.
            doy: 6, // The week that contains Jan 6th is the first week of the year.
        },
    });
 
    return ne;
 
})));
 
 
/***/ }),
/* 591 */
/***/ (function(module, exports, __webpack_require__) {
 
//! moment.js locale configuration
//! locale : Dutch [nl]
//! author : Joris Röling : https://github.com/jorisroling
//! author : Jacob Middag : https://github.com/middagj
 
;(function (global, factory) {
    true ? factory(__webpack_require__(3)) :
   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
   factory(global.moment)
}(this, (function (moment) { 'use strict';
 
    //! moment.js locale configuration
 
    var monthsShortWithDots =
            'jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.'.split('_'),
        monthsShortWithoutDots =
            'jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec'.split('_'),
        monthsParse = [
            /^jan/i,
            /^feb/i,
            /^maart|mrt.?$/i,
            /^apr/i,
            /^mei$/i,
            /^jun[i.]?$/i,
            /^jul[i.]?$/i,
            /^aug/i,
            /^sep/i,
            /^okt/i,
            /^nov/i,
            /^dec/i,
        ],
        monthsRegex =
            /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i;
 
    var nl = moment.defineLocale('nl', {
        months: 'januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december'.split(
            '_'
        ),
        monthsShort: function (m, format) {
            if (!m) {
                return monthsShortWithDots;
            } else if (/-MMM-/.test(format)) {
                return monthsShortWithoutDots[m.month()];
            } else {
                return monthsShortWithDots[m.month()];
            }
        },
 
        monthsRegex: monthsRegex,
        monthsShortRegex: monthsRegex,
        monthsStrictRegex:
            /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i,
        monthsShortStrictRegex:
            /^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,
 
        monthsParse: monthsParse,
        longMonthsParse: monthsParse,
        shortMonthsParse: monthsParse,
 
        weekdays:
            'zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag'.split('_'),
        weekdaysShort: 'zo._ma._di._wo._do._vr._za.'.split('_'),
        weekdaysMin: 'zo_ma_di_wo_do_vr_za'.split('_'),
        weekdaysParseExact: true,
        longDateFormat: {
            LT: 'HH:mm',
            LTS: 'HH:mm:ss',
            L: 'DD-MM-YYYY',
            LL: 'D MMMM YYYY',
            LLL: 'D MMMM YYYY HH:mm',
            LLLL: 'dddd D MMMM YYYY HH:mm',
        },
        calendar: {
            sameDay: '[vandaag om] LT',
            nextDay: '[morgen om] LT',
            nextWeek: 'dddd [om] LT',
            lastDay: '[gisteren om] LT',
            lastWeek: '[afgelopen] dddd [om] LT',
            sameElse: 'L',
        },
        relativeTime: {
            future: 'over %s',
            past: '%s geleden',
            s: 'een paar seconden',
            ss: '%d seconden',
            m: 'één minuut',
            mm: '%d minuten',
            h: 'één uur',
            hh: '%d uur',
            d: 'één dag',
            dd: '%d dagen',
            w: 'één week',
            ww: '%d weken',
            M: 'één maand',
            MM: '%d maanden',
            y: 'één jaar',
            yy: '%d jaar',
        },
        dayOfMonthOrdinalParse: /\d{1,2}(ste|de)/,
        ordinal: function (number) {
            return (
                number +
                (number === 1 || number === 8 || number >= 20 ? 'ste' : 'de')
            );
        },
        week: {
            dow: 1, // Monday is the first day of the week.
            doy: 4, // The week that contains Jan 4th is the first week of the year.
        },
    });
 
    return nl;
 
})));
 
 
/***/ }),
/* 592 */
/***/ (function(module, exports, __webpack_require__) {
 
//! moment.js locale configuration
//! locale : Dutch (Belgium) [nl-be]
//! author : Joris Röling : https://github.com/jorisroling
//! author : Jacob Middag : https://github.com/middagj
 
;(function (global, factory) {
    true ? factory(__webpack_require__(3)) :
   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
   factory(global.moment)
}(this, (function (moment) { 'use strict';
 
    //! moment.js locale configuration
 
    var monthsShortWithDots =
            'jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.'.split('_'),
        monthsShortWithoutDots =
            'jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec'.split('_'),
        monthsParse = [
            /^jan/i,
            /^feb/i,
            /^maart|mrt.?$/i,
            /^apr/i,
            /^mei$/i,
            /^jun[i.]?$/i,
            /^jul[i.]?$/i,
            /^aug/i,
            /^sep/i,
            /^okt/i,
            /^nov/i,
            /^dec/i,
        ],
        monthsRegex =
            /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i;
 
    var nlBe = moment.defineLocale('nl-be', {
        months: 'januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december'.split(
            '_'
        ),
        monthsShort: function (m, format) {
            if (!m) {
                return monthsShortWithDots;
            } else if (/-MMM-/.test(format)) {
                return monthsShortWithoutDots[m.month()];
            } else {
                return monthsShortWithDots[m.month()];
            }
        },
 
        monthsRegex: monthsRegex,
        monthsShortRegex: monthsRegex,
        monthsStrictRegex:
            /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i,
        monthsShortStrictRegex:
            /^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,
 
        monthsParse: monthsParse,
        longMonthsParse: monthsParse,
        shortMonthsParse: monthsParse,
 
        weekdays:
            'zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag'.split('_'),
        weekdaysShort: 'zo._ma._di._wo._do._vr._za.'.split('_'),
        weekdaysMin: 'zo_ma_di_wo_do_vr_za'.split('_'),
        weekdaysParseExact: true,
        longDateFormat: {
            LT: 'HH:mm',
            LTS: 'HH:mm:ss',
            L: 'DD/MM/YYYY',
            LL: 'D MMMM YYYY',
            LLL: 'D MMMM YYYY HH:mm',
            LLLL: 'dddd D MMMM YYYY HH:mm',
        },
        calendar: {
            sameDay: '[vandaag om] LT',
            nextDay: '[morgen om] LT',
            nextWeek: 'dddd [om] LT',
            lastDay: '[gisteren om] LT',
            lastWeek: '[afgelopen] dddd [om] LT',
            sameElse: 'L',
        },
        relativeTime: {
            future: 'over %s',
            past: '%s geleden',
            s: 'een paar seconden',
            ss: '%d seconden',
            m: 'één minuut',
            mm: '%d minuten',
            h: 'één uur',
            hh: '%d uur',
            d: 'één dag',
            dd: '%d dagen',
            M: 'één maand',
            MM: '%d maanden',
            y: 'één jaar',
            yy: '%d jaar',
        },
        dayOfMonthOrdinalParse: /\d{1,2}(ste|de)/,
        ordinal: function (number) {
            return (
                number +
                (number === 1 || number === 8 || number >= 20 ? 'ste' : 'de')
            );
        },
        week: {
            dow: 1, // Monday is the first day of the week.
            doy: 4, // The week that contains Jan 4th is the first week of the year.
        },
    });
 
    return nlBe;
 
})));
 
 
/***/ }),
/* 593 */
/***/ (function(module, exports, __webpack_require__) {
 
//! moment.js locale configuration
//! locale : Nynorsk [nn]
//! authors : https://github.com/mechuwind
//!           Stephen Ramthun : https://github.com/stephenramthun
 
;(function (global, factory) {
    true ? factory(__webpack_require__(3)) :
   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
   factory(global.moment)
}(this, (function (moment) { 'use strict';
 
    //! moment.js locale configuration
 
    var nn = moment.defineLocale('nn', {
        months: 'januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember'.split(
            '_'
        ),
        monthsShort:
            'jan._feb._mars_apr._mai_juni_juli_aug._sep._okt._nov._des.'.split('_'),
        monthsParseExact: true,
        weekdays: 'sundag_måndag_tysdag_onsdag_torsdag_fredag_laurdag'.split('_'),
        weekdaysShort: 'su._må._ty._on._to._fr._lau.'.split('_'),
        weekdaysMin: 'su_må_ty_on_to_fr_la'.split('_'),
        weekdaysParseExact: true,
        longDateFormat: {
            LT: 'HH:mm',
            LTS: 'HH:mm:ss',
            L: 'DD.MM.YYYY',
            LL: 'D. MMMM YYYY',
            LLL: 'D. MMMM YYYY [kl.] H:mm',
            LLLL: 'dddd D. MMMM YYYY [kl.] HH:mm',
        },
        calendar: {
            sameDay: '[I dag klokka] LT',
            nextDay: '[I morgon klokka] LT',
            nextWeek: 'dddd [klokka] LT',
            lastDay: '[I går klokka] LT',
            lastWeek: '[Føregåande] dddd [klokka] LT',
            sameElse: 'L',
        },
        relativeTime: {
            future: 'om %s',
            past: '%s sidan',
            s: 'nokre sekund',
            ss: '%d sekund',
            m: 'eit minutt',
            mm: '%d minutt',
            h: 'ein time',
            hh: '%d timar',
            d: 'ein dag',
            dd: '%d dagar',
            w: 'ei veke',
            ww: '%d veker',
            M: 'ein månad',
            MM: '%d månader',
            y: 'eit år',
            yy: '%d år',
        },
        dayOfMonthOrdinalParse: /\d{1,2}\./,
        ordinal: '%d.',
        week: {
            dow: 1, // Monday is the first day of the week.
            doy: 4, // The week that contains Jan 4th is the first week of the year.
        },
    });
 
    return nn;
 
})));
 
 
/***/ }),
/* 594 */
/***/ (function(module, exports, __webpack_require__) {
 
//! moment.js locale configuration
//! locale : Occitan, lengadocian dialecte [oc-lnc]
//! author : Quentin PAGÈS : https://github.com/Quenty31
 
;(function (global, factory) {
    true ? factory(__webpack_require__(3)) :
   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
   factory(global.moment)
}(this, (function (moment) { 'use strict';
 
    //! moment.js locale configuration
 
    var ocLnc = moment.defineLocale('oc-lnc', {
        months: {
            standalone:
                'genièr_febrièr_març_abril_mai_junh_julhet_agost_setembre_octòbre_novembre_decembre'.split(
                    '_'
                ),
            format: "de genièr_de febrièr_de març_d'abril_de mai_de junh_de julhet_d'agost_de setembre_d'octòbre_de novembre_de decembre".split(
                '_'
            ),
            isFormat: /D[oD]?(\s)+MMMM/,
        },
        monthsShort:
            'gen._febr._març_abr._mai_junh_julh._ago._set._oct._nov._dec.'.split(
                '_'
            ),
        monthsParseExact: true,
        weekdays: 'dimenge_diluns_dimars_dimècres_dijòus_divendres_dissabte'.split(
            '_'
        ),
        weekdaysShort: 'dg._dl._dm._dc._dj._dv._ds.'.split('_'),
        weekdaysMin: 'dg_dl_dm_dc_dj_dv_ds'.split('_'),
        weekdaysParseExact: true,
        longDateFormat: {
            LT: 'H:mm',
            LTS: 'H:mm:ss',
            L: 'DD/MM/YYYY',
            LL: 'D MMMM [de] YYYY',
            ll: 'D MMM YYYY',
            LLL: 'D MMMM [de] YYYY [a] H:mm',
            lll: 'D MMM YYYY, H:mm',
            LLLL: 'dddd D MMMM [de] YYYY [a] H:mm',
            llll: 'ddd D MMM YYYY, H:mm',
        },
        calendar: {
            sameDay: '[uèi a] LT',
            nextDay: '[deman a] LT',
            nextWeek: 'dddd [a] LT',
            lastDay: '[ièr a] LT',
            lastWeek: 'dddd [passat a] LT',
            sameElse: 'L',
        },
        relativeTime: {
            future: "d'aquí %s",
            past: 'fa %s',
            s: 'unas segondas',
            ss: '%d segondas',
            m: 'una minuta',
            mm: '%d minutas',
            h: 'una ora',
            hh: '%d oras',
            d: 'un jorn',
            dd: '%d jorns',
            M: 'un mes',
            MM: '%d meses',
            y: 'un an',
            yy: '%d ans',
        },
        dayOfMonthOrdinalParse: /\d{1,2}(r|n|t|è|a)/,
        ordinal: function (number, period) {
            var output =
                number === 1
                    ? 'r'
                    : number === 2
                    ? 'n'
                    : number === 3
                    ? 'r'
                    : number === 4
                    ? 't'
                    : 'è';
            if (period === 'w' || period === 'W') {
                output = 'a';
            }
            return number + output;
        },
        week: {
            dow: 1, // Monday is the first day of the week.
            doy: 4,
        },
    });
 
    return ocLnc;
 
})));
 
 
/***/ }),
/* 595 */
/***/ (function(module, exports, __webpack_require__) {
 
//! moment.js locale configuration
//! locale : Punjabi (India) [pa-in]
//! author : Harpreet Singh : https://github.com/harpreetkhalsagtbit
 
;(function (global, factory) {
    true ? factory(__webpack_require__(3)) :
   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
   factory(global.moment)
}(this, (function (moment) { 'use strict';
 
    //! moment.js locale configuration
 
    var symbolMap = {
            1: '੧',
            2: '੨',
            3: '੩',
            4: '੪',
            5: '੫',
            6: '੬',
            7: '੭',
            8: '੮',
            9: '੯',
            0: '੦',
        },
        numberMap = {
            '੧': '1',
            '੨': '2',
            '੩': '3',
            '੪': '4',
            '੫': '5',
            '੬': '6',
            '੭': '7',
            '੮': '8',
            '੯': '9',
            '੦': '0',
        };
 
    var paIn = moment.defineLocale('pa-in', {
        // There are months name as per Nanakshahi Calendar but they are not used as rigidly in modern Punjabi.
        months: 'ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ'.split(
            '_'
        ),
        monthsShort:
            'ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ'.split(
                '_'
            ),
        weekdays: 'ਐਤਵਾਰ_ਸੋਮਵਾਰ_ਮੰਗਲਵਾਰ_ਬੁਧਵਾਰ_ਵੀਰਵਾਰ_ਸ਼ੁੱਕਰਵਾਰ_ਸ਼ਨੀਚਰਵਾਰ'.split(
            '_'
        ),
        weekdaysShort: 'ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ'.split('_'),
        weekdaysMin: 'ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ'.split('_'),
        longDateFormat: {
            LT: 'A h:mm ਵਜੇ',
            LTS: 'A h:mm:ss ਵਜੇ',
            L: 'DD/MM/YYYY',
            LL: 'D MMMM YYYY',
            LLL: 'D MMMM YYYY, A h:mm ਵਜੇ',
            LLLL: 'dddd, D MMMM YYYY, A h:mm ਵਜੇ',
        },
        calendar: {
            sameDay: '[ਅਜ] LT',
            nextDay: '[ਕਲ] LT',
            nextWeek: '[ਅਗਲਾ] dddd, LT',
            lastDay: '[ਕਲ] LT',
            lastWeek: '[ਪਿਛਲੇ] dddd, LT',
            sameElse: 'L',
        },
        relativeTime: {
            future: '%s ਵਿੱਚ',
            past: '%s ਪਿਛਲੇ',
            s: 'ਕੁਝ ਸਕਿੰਟ',
            ss: '%d ਸਕਿੰਟ',
            m: 'ਇਕ ਮਿੰਟ',
            mm: '%d ਮਿੰਟ',
            h: 'ਇੱਕ ਘੰਟਾ',
            hh: '%d ਘੰਟੇ',
            d: 'ਇੱਕ ਦਿਨ',
            dd: '%d ਦਿਨ',
            M: 'ਇੱਕ ਮਹੀਨਾ',
            MM: '%d ਮਹੀਨੇ',
            y: 'ਇੱਕ ਸਾਲ',
            yy: '%d ਸਾਲ',
        },
        preparse: function (string) {
            return string.replace(/[੧੨੩੪੫੬੭੮੯੦]/g, function (match) {
                return numberMap[match];
            });
        },
        postformat: function (string) {
            return string.replace(/\d/g, function (match) {
                return symbolMap[match];
            });
        },
        // Punjabi notation for meridiems are quite fuzzy in practice. While there exists
        // a rigid notion of a 'Pahar' it is not used as rigidly in modern Punjabi.
        meridiemParse: /ਰਾਤ|ਸਵੇਰ|ਦੁਪਹਿਰ|ਸ਼ਾਮ/,
        meridiemHour: function (hour, meridiem) {
            if (hour === 12) {
                hour = 0;
            }
            if (meridiem === 'ਰਾਤ') {
                return hour < 4 ? hour : hour + 12;
            } else if (meridiem === 'ਸਵੇਰ') {
                return hour;
            } else if (meridiem === 'ਦੁਪਹਿਰ') {
                return hour >= 10 ? hour : hour + 12;
            } else if (meridiem === 'ਸ਼ਾਮ') {
                return hour + 12;
            }
        },
        meridiem: function (hour, minute, isLower) {
            if (hour < 4) {
                return 'ਰਾਤ';
            } else if (hour < 10) {
                return 'ਸਵੇਰ';
            } else if (hour < 17) {
                return 'ਦੁਪਹਿਰ';
            } else if (hour < 20) {
                return 'ਸ਼ਾਮ';
            } else {
                return 'ਰਾਤ';
            }
        },
        week: {
            dow: 0, // Sunday is the first day of the week.
            doy: 6, // The week that contains Jan 6th is the first week of the year.
        },
    });
 
    return paIn;
 
})));
 
 
/***/ }),
/* 596 */
/***/ (function(module, exports, __webpack_require__) {
 
//! moment.js locale configuration
//! locale : Polish [pl]
//! author : Rafal Hirsz : https://github.com/evoL
 
;(function (global, factory) {
    true ? factory(__webpack_require__(3)) :
   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
   factory(global.moment)
}(this, (function (moment) { 'use strict';
 
    //! moment.js locale configuration
 
    var monthsNominative =
            'styczeń_luty_marzec_kwiecień_maj_czerwiec_lipiec_sierpień_wrzesień_październik_listopad_grudzień'.split(
                '_'
            ),
        monthsSubjective =
            'stycznia_lutego_marca_kwietnia_maja_czerwca_lipca_sierpnia_września_października_listopada_grudnia'.split(
                '_'
            ),
        monthsParse = [
            /^sty/i,
            /^lut/i,
            /^mar/i,
            /^kwi/i,
            /^maj/i,
            /^cze/i,
            /^lip/i,
            /^sie/i,
            /^wrz/i,
            /^paź/i,
            /^lis/i,
            /^gru/i,
        ];
    function plural(n) {
        return n % 10 < 5 && n % 10 > 1 && ~~(n / 10) % 10 !== 1;
    }
    function translate(number, withoutSuffix, key) {
        var result = number + ' ';
        switch (key) {
            case 'ss':
                return result + (plural(number) ? 'sekundy' : 'sekund');
            case 'm':
                return withoutSuffix ? 'minuta' : 'minutę';
            case 'mm':
                return result + (plural(number) ? 'minuty' : 'minut');
            case 'h':
                return withoutSuffix ? 'godzina' : 'godzinę';
            case 'hh':
                return result + (plural(number) ? 'godziny' : 'godzin');
            case 'ww':
                return result + (plural(number) ? 'tygodnie' : 'tygodni');
            case 'MM':
                return result + (plural(number) ? 'miesiące' : 'miesięcy');
            case 'yy':
                return result + (plural(number) ? 'lata' : 'lat');
        }
    }
 
    var pl = moment.defineLocale('pl', {
        months: function (momentToFormat, format) {
            if (!momentToFormat) {
                return monthsNominative;
            } else if (/D MMMM/.test(format)) {
                return monthsSubjective[momentToFormat.month()];
            } else {
                return monthsNominative[momentToFormat.month()];
            }
        },
        monthsShort: 'sty_lut_mar_kwi_maj_cze_lip_sie_wrz_paź_lis_gru'.split('_'),
        monthsParse: monthsParse,
        longMonthsParse: monthsParse,
        shortMonthsParse: monthsParse,
        weekdays:
            'niedziela_poniedziałek_wtorek_środa_czwartek_piątek_sobota'.split('_'),
        weekdaysShort: 'ndz_pon_wt_śr_czw_pt_sob'.split('_'),
        weekdaysMin: 'Nd_Pn_Wt_Śr_Cz_Pt_So'.split('_'),
        longDateFormat: {
            LT: 'HH:mm',
            LTS: 'HH:mm:ss',
            L: 'DD.MM.YYYY',
            LL: 'D MMMM YYYY',
            LLL: 'D MMMM YYYY HH:mm',
            LLLL: 'dddd, D MMMM YYYY HH:mm',
        },
        calendar: {
            sameDay: '[Dziś o] LT',
            nextDay: '[Jutro o] LT',
            nextWeek: function () {
                switch (this.day()) {
                    case 0:
                        return '[W niedzielę o] LT';
 
                    case 2:
                        return '[We wtorek o] LT';
 
                    case 3:
                        return '[W środę o] LT';
 
                    case 6:
                        return '[W sobotę o] LT';
 
                    default:
                        return '[W] dddd [o] LT';
                }
            },
            lastDay: '[Wczoraj o] LT',
            lastWeek: function () {
                switch (this.day()) {
                    case 0:
                        return '[W zeszłą niedzielę o] LT';
                    case 3:
                        return '[W zeszłą środę o] LT';
                    case 6:
                        return '[W zeszłą sobotę o] LT';
                    default:
                        return '[W zeszły] dddd [o] LT';
                }
            },
            sameElse: 'L',
        },
        relativeTime: {
            future: 'za %s',
            past: '%s temu',
            s: 'kilka sekund',
            ss: translate,
            m: translate,
            mm: translate,
            h: translate,
            hh: translate,
            d: '1 dzień',
            dd: '%d dni',
            w: 'tydzień',
            ww: translate,
            M: 'miesiąc',
            MM: translate,
            y: 'rok',
            yy: translate,
        },
        dayOfMonthOrdinalParse: /\d{1,2}\./,
        ordinal: '%d.',
        week: {
            dow: 1, // Monday is the first day of the week.
            doy: 4, // The week that contains Jan 4th is the first week of the year.
        },
    });
 
    return pl;
 
})));
 
 
/***/ }),
/* 597 */
/***/ (function(module, exports, __webpack_require__) {
 
//! moment.js locale configuration
//! locale : Portuguese [pt]
//! author : Jefferson : https://github.com/jalex79
 
;(function (global, factory) {
    true ? factory(__webpack_require__(3)) :
   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
   factory(global.moment)
}(this, (function (moment) { 'use strict';
 
    //! moment.js locale configuration
 
    var pt = moment.defineLocale('pt', {
        months: 'janeiro_fevereiro_março_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro'.split(
            '_'
        ),
        monthsShort: 'jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez'.split('_'),
        weekdays:
            'Domingo_Segunda-feira_Terça-feira_Quarta-feira_Quinta-feira_Sexta-feira_Sábado'.split(
                '_'
            ),
        weekdaysShort: 'Dom_Seg_Ter_Qua_Qui_Sex_Sáb'.split('_'),
        weekdaysMin: 'Do_2ª_3ª_4ª_5ª_6ª_Sá'.split('_'),
        weekdaysParseExact: true,
        longDateFormat: {
            LT: 'HH:mm',
            LTS: 'HH:mm:ss',
            L: 'DD/MM/YYYY',
            LL: 'D [de] MMMM [de] YYYY',
            LLL: 'D [de] MMMM [de] YYYY HH:mm',
            LLLL: 'dddd, D [de] MMMM [de] YYYY HH:mm',
        },
        calendar: {
            sameDay: '[Hoje às] LT',
            nextDay: '[Amanhã às] LT',
            nextWeek: 'dddd [às] LT',
            lastDay: '[Ontem às] LT',
            lastWeek: function () {
                return this.day() === 0 || this.day() === 6
                    ? '[Último] dddd [às] LT' // Saturday + Sunday
                    : '[Última] dddd [às] LT'; // Monday - Friday
            },
            sameElse: 'L',
        },
        relativeTime: {
            future: 'em %s',
            past: 'há %s',
            s: 'segundos',
            ss: '%d segundos',
            m: 'um minuto',
            mm: '%d minutos',
            h: 'uma hora',
            hh: '%d horas',
            d: 'um dia',
            dd: '%d dias',
            w: 'uma semana',
            ww: '%d semanas',
            M: 'um mês',
            MM: '%d meses',
            y: 'um ano',
            yy: '%d anos',
        },
        dayOfMonthOrdinalParse: /\d{1,2}º/,
        ordinal: '%dº',
        week: {
            dow: 1, // Monday is the first day of the week.
            doy: 4, // The week that contains Jan 4th is the first week of the year.
        },
    });
 
    return pt;
 
})));
 
 
/***/ }),
/* 598 */
/***/ (function(module, exports, __webpack_require__) {
 
//! moment.js locale configuration
//! locale : Portuguese (Brazil) [pt-br]
//! author : Caio Ribeiro Pereira : https://github.com/caio-ribeiro-pereira
 
;(function (global, factory) {
    true ? factory(__webpack_require__(3)) :
   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
   factory(global.moment)
}(this, (function (moment) { 'use strict';
 
    //! moment.js locale configuration
 
    var ptBr = moment.defineLocale('pt-br', {
        months: 'janeiro_fevereiro_março_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro'.split(
            '_'
        ),
        monthsShort: 'jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez'.split('_'),
        weekdays:
            'domingo_segunda-feira_terça-feira_quarta-feira_quinta-feira_sexta-feira_sábado'.split(
                '_'
            ),
        weekdaysShort: 'dom_seg_ter_qua_qui_sex_sáb'.split('_'),
        weekdaysMin: 'do_2ª_3ª_4ª_5ª_6ª_sá'.split('_'),
        weekdaysParseExact: true,
        longDateFormat: {
            LT: 'HH:mm',
            LTS: 'HH:mm:ss',
            L: 'DD/MM/YYYY',
            LL: 'D [de] MMMM [de] YYYY',
            LLL: 'D [de] MMMM [de] YYYY [às] HH:mm',
            LLLL: 'dddd, D [de] MMMM [de] YYYY [às] HH:mm',
        },
        calendar: {
            sameDay: '[Hoje às] LT',
            nextDay: '[Amanhã às] LT',
            nextWeek: 'dddd [às] LT',
            lastDay: '[Ontem às] LT',
            lastWeek: function () {
                return this.day() === 0 || this.day() === 6
                    ? '[Último] dddd [às] LT' // Saturday + Sunday
                    : '[Última] dddd [às] LT'; // Monday - Friday
            },
            sameElse: 'L',
        },
        relativeTime: {
            future: 'em %s',
            past: 'há %s',
            s: 'poucos segundos',
            ss: '%d segundos',
            m: 'um minuto',
            mm: '%d minutos',
            h: 'uma hora',
            hh: '%d horas',
            d: 'um dia',
            dd: '%d dias',
            M: 'um mês',
            MM: '%d meses',
            y: 'um ano',
            yy: '%d anos',
        },
        dayOfMonthOrdinalParse: /\d{1,2}º/,
        ordinal: '%dº',
        invalidDate: 'Data inválida',
    });
 
    return ptBr;
 
})));
 
 
/***/ }),
/* 599 */
/***/ (function(module, exports, __webpack_require__) {
 
//! moment.js locale configuration
//! locale : Romanian [ro]
//! author : Vlad Gurdiga : https://github.com/gurdiga
//! author : Valentin Agachi : https://github.com/avaly
//! author : Emanuel Cepoi : https://github.com/cepem
 
;(function (global, factory) {
    true ? factory(__webpack_require__(3)) :
   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
   factory(global.moment)
}(this, (function (moment) { 'use strict';
 
    //! moment.js locale configuration
 
    function relativeTimeWithPlural(number, withoutSuffix, key) {
        var format = {
                ss: 'secunde',
                mm: 'minute',
                hh: 'ore',
                dd: 'zile',
                ww: 'săptămâni',
                MM: 'luni',
                yy: 'ani',
            },
            separator = ' ';
        if (number % 100 >= 20 || (number >= 100 && number % 100 === 0)) {
            separator = ' de ';
        }
        return number + separator + format[key];
    }
 
    var ro = moment.defineLocale('ro', {
        months: 'ianuarie_februarie_martie_aprilie_mai_iunie_iulie_august_septembrie_octombrie_noiembrie_decembrie'.split(
            '_'
        ),
        monthsShort:
            'ian._feb._mart._apr._mai_iun._iul._aug._sept._oct._nov._dec.'.split(
                '_'
            ),
        monthsParseExact: true,
        weekdays: 'duminică_luni_marți_miercuri_joi_vineri_sâmbătă'.split('_'),
        weekdaysShort: 'Dum_Lun_Mar_Mie_Joi_Vin_Sâm'.split('_'),
        weekdaysMin: 'Du_Lu_Ma_Mi_Jo_Vi_Sâ'.split('_'),
        longDateFormat: {
            LT: 'H:mm',
            LTS: 'H:mm:ss',
            L: 'DD.MM.YYYY',
            LL: 'D MMMM YYYY',
            LLL: 'D MMMM YYYY H:mm',
            LLLL: 'dddd, D MMMM YYYY H:mm',
        },
        calendar: {
            sameDay: '[azi la] LT',
            nextDay: '[mâine la] LT',
            nextWeek: 'dddd [la] LT',
            lastDay: '[ieri la] LT',
            lastWeek: '[fosta] dddd [la] LT',
            sameElse: 'L',
        },
        relativeTime: {
            future: 'peste %s',
            past: '%s în urmă',
            s: 'câteva secunde',
            ss: relativeTimeWithPlural,
            m: 'un minut',
            mm: relativeTimeWithPlural,
            h: 'o oră',
            hh: relativeTimeWithPlural,
            d: 'o zi',
            dd: relativeTimeWithPlural,
            w: 'o săptămână',
            ww: relativeTimeWithPlural,
            M: 'o lună',
            MM: relativeTimeWithPlural,
            y: 'un an',
            yy: relativeTimeWithPlural,
        },
        week: {
            dow: 1, // Monday is the first day of the week.
            doy: 7, // The week that contains Jan 7th is the first week of the year.
        },
    });
 
    return ro;
 
})));
 
 
/***/ }),
/* 600 */
/***/ (function(module, exports, __webpack_require__) {
 
//! moment.js locale configuration
//! locale : Russian [ru]
//! author : Viktorminator : https://github.com/Viktorminator
//! author : Menelion Elensúle : https://github.com/Oire
//! author : Коренберг Марк : https://github.com/socketpair
 
;(function (global, factory) {
    true ? factory(__webpack_require__(3)) :
   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
   factory(global.moment)
}(this, (function (moment) { 'use strict';
 
    //! moment.js locale configuration
 
    function plural(word, num) {
        var forms = word.split('_');
        return num % 10 === 1 && num % 100 !== 11
            ? forms[0]
            : num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20)
            ? forms[1]
            : forms[2];
    }
    function relativeTimeWithPlural(number, withoutSuffix, key) {
        var format = {
            ss: withoutSuffix ? 'секунда_секунды_секунд' : 'секунду_секунды_секунд',
            mm: withoutSuffix ? 'минута_минуты_минут' : 'минуту_минуты_минут',
            hh: 'час_часа_часов',
            dd: 'день_дня_дней',
            ww: 'неделя_недели_недель',
            MM: 'месяц_месяца_месяцев',
            yy: 'год_года_лет',
        };
        if (key === 'm') {
            return withoutSuffix ? 'минута' : 'минуту';
        } else {
            return number + ' ' + plural(format[key], +number);
        }
    }
    var monthsParse = [
        /^янв/i,
        /^фев/i,
        /^мар/i,
        /^апр/i,
        /^ма[йя]/i,
        /^июн/i,
        /^июл/i,
        /^авг/i,
        /^сен/i,
        /^окт/i,
        /^ноя/i,
        /^дек/i,
    ];
 
    // http://new.gramota.ru/spravka/rules/139-prop : § 103
    // Сокращения месяцев: http://new.gramota.ru/spravka/buro/search-answer?s=242637
    // CLDR data:          http://www.unicode.org/cldr/charts/28/summary/ru.html#1753
    var ru = moment.defineLocale('ru', {
        months: {
            format: 'января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря'.split(
                '_'
            ),
            standalone:
                'январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь'.split(
                    '_'
                ),
        },
        monthsShort: {
            // по CLDR именно "июл." и "июн.", но какой смысл менять букву на точку?
            format: 'янв._февр._мар._апр._мая_июня_июля_авг._сент._окт._нояб._дек.'.split(
                '_'
            ),
            standalone:
                'янв._февр._март_апр._май_июнь_июль_авг._сент._окт._нояб._дек.'.split(
                    '_'
                ),
        },
        weekdays: {
            standalone:
                'воскресенье_понедельник_вторник_среда_четверг_пятница_суббота'.split(
                    '_'
                ),
            format: 'воскресенье_понедельник_вторник_среду_четверг_пятницу_субботу'.split(
                '_'
            ),
            isFormat: /\[ ?[Вв] ?(?:прошлую|следующую|эту)? ?] ?dddd/,
        },
        weekdaysShort: 'вс_пн_вт_ср_чт_пт_сб'.split('_'),
        weekdaysMin: 'вс_пн_вт_ср_чт_пт_сб'.split('_'),
        monthsParse: monthsParse,
        longMonthsParse: monthsParse,
        shortMonthsParse: monthsParse,
 
        // полные названия с падежами, по три буквы, для некоторых, по 4 буквы, сокращения с точкой и без точки
        monthsRegex:
            /^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i,
 
        // копия предыдущего
        monthsShortRegex:
            /^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i,
 
        // полные названия с падежами
        monthsStrictRegex:
            /^(январ[яь]|феврал[яь]|марта?|апрел[яь]|ма[яй]|июн[яь]|июл[яь]|августа?|сентябр[яь]|октябр[яь]|ноябр[яь]|декабр[яь])/i,
 
        // Выражение, которое соответствует только сокращённым формам
        monthsShortStrictRegex:
            /^(янв\.|февр?\.|мар[т.]|апр\.|ма[яй]|июн[ья.]|июл[ья.]|авг\.|сент?\.|окт\.|нояб?\.|дек\.)/i,
        longDateFormat: {
            LT: 'H:mm',
            LTS: 'H:mm:ss',
            L: 'DD.MM.YYYY',
            LL: 'D MMMM YYYY г.',
            LLL: 'D MMMM YYYY г., H:mm',
            LLLL: 'dddd, D MMMM YYYY г., H:mm',
        },
        calendar: {
            sameDay: '[Сегодня, в] LT',
            nextDay: '[Завтра, в] LT',
            lastDay: '[Вчера, в] LT',
            nextWeek: function (now) {
                if (now.week() !== this.week()) {
                    switch (this.day()) {
                        case 0:
                            return '[В следующее] dddd, [в] LT';
                        case 1:
                        case 2:
                        case 4:
                            return '[В следующий] dddd, [в] LT';
                        case 3:
                        case 5:
                        case 6:
                            return '[В следующую] dddd, [в] LT';
                    }
                } else {
                    if (this.day() === 2) {
                        return '[Во] dddd, [в] LT';
                    } else {
                        return '[В] dddd, [в] LT';
                    }
                }
            },
            lastWeek: function (now) {
                if (now.week() !== this.week()) {
                    switch (this.day()) {
                        case 0:
                            return '[В прошлое] dddd, [в] LT';
                        case 1:
                        case 2:
                        case 4:
                            return '[В прошлый] dddd, [в] LT';
                        case 3:
                        case 5:
                        case 6:
                            return '[В прошлую] dddd, [в] LT';
                    }
                } else {
                    if (this.day() === 2) {
                        return '[Во] dddd, [в] LT';
                    } else {
                        return '[В] dddd, [в] LT';
                    }
                }
            },
            sameElse: 'L',
        },
        relativeTime: {
            future: 'через %s',
            past: '%s назад',
            s: 'несколько секунд',
            ss: relativeTimeWithPlural,
            m: relativeTimeWithPlural,
            mm: relativeTimeWithPlural,
            h: 'час',
            hh: relativeTimeWithPlural,
            d: 'день',
            dd: relativeTimeWithPlural,
            w: 'неделя',
            ww: relativeTimeWithPlural,
            M: 'месяц',
            MM: relativeTimeWithPlural,
            y: 'год',
            yy: relativeTimeWithPlural,
        },
        meridiemParse: /ночи|утра|дня|вечера/i,
        isPM: function (input) {
            return /^(дня|вечера)$/.test(input);
        },
        meridiem: function (hour, minute, isLower) {
            if (hour < 4) {
                return 'ночи';
            } else if (hour < 12) {
                return 'утра';
            } else if (hour < 17) {
                return 'дня';
            } else {
                return 'вечера';
            }
        },
        dayOfMonthOrdinalParse: /\d{1,2}-(й|го|я)/,
        ordinal: function (number, period) {
            switch (period) {
                case 'M':
                case 'd':
                case 'DDD':
                    return number + '-й';
                case 'D':
                    return number + '-го';
                case 'w':
                case 'W':
                    return number + '-я';
                default:
                    return number;
            }
        },
        week: {
            dow: 1, // Monday is the first day of the week.
            doy: 4, // The week that contains Jan 4th is the first week of the year.
        },
    });
 
    return ru;
 
})));
 
 
/***/ }),
/* 601 */
/***/ (function(module, exports, __webpack_require__) {
 
//! moment.js locale configuration
//! locale : Sindhi [sd]
//! author : Narain Sagar : https://github.com/narainsagar
 
;(function (global, factory) {
    true ? factory(__webpack_require__(3)) :
   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
   factory(global.moment)
}(this, (function (moment) { 'use strict';
 
    //! moment.js locale configuration
 
    var months = [
            'جنوري',
            'فيبروري',
            'مارچ',
            'اپريل',
            'مئي',
            'جون',
            'جولاءِ',
            'آگسٽ',
            'سيپٽمبر',
            'آڪٽوبر',
            'نومبر',
            'ڊسمبر',
        ],
        days = ['آچر', 'سومر', 'اڱارو', 'اربع', 'خميس', 'جمع', 'ڇنڇر'];
 
    var sd = moment.defineLocale('sd', {
        months: months,
        monthsShort: months,
        weekdays: days,
        weekdaysShort: days,
        weekdaysMin: days,
        longDateFormat: {
            LT: 'HH:mm',
            LTS: 'HH:mm:ss',
            L: 'DD/MM/YYYY',
            LL: 'D MMMM YYYY',
            LLL: 'D MMMM YYYY HH:mm',
            LLLL: 'dddd، D MMMM YYYY HH:mm',
        },
        meridiemParse: /صبح|شام/,
        isPM: function (input) {
            return 'شام' === input;
        },
        meridiem: function (hour, minute, isLower) {
            if (hour < 12) {
                return 'صبح';
            }
            return 'شام';
        },
        calendar: {
            sameDay: '[اڄ] LT',
            nextDay: '[سڀاڻي] LT',
            nextWeek: 'dddd [اڳين هفتي تي] LT',
            lastDay: '[ڪالهه] LT',
            lastWeek: '[گزريل هفتي] dddd [تي] LT',
            sameElse: 'L',
        },
        relativeTime: {
            future: '%s پوء',
            past: '%s اڳ',
            s: 'چند سيڪنڊ',
            ss: '%d سيڪنڊ',
            m: 'هڪ منٽ',
            mm: '%d منٽ',
            h: 'هڪ ڪلاڪ',
            hh: '%d ڪلاڪ',
            d: 'هڪ ڏينهن',
            dd: '%d ڏينهن',
            M: 'هڪ مهينو',
            MM: '%d مهينا',
            y: 'هڪ سال',
            yy: '%d سال',
        },
        preparse: function (string) {
            return string.replace(/،/g, ',');
        },
        postformat: function (string) {
            return string.replace(/,/g, '،');
        },
        week: {
            dow: 1, // Monday is the first day of the week.
            doy: 4, // The week that contains Jan 4th is the first week of the year.
        },
    });
 
    return sd;
 
})));
 
 
/***/ }),
/* 602 */
/***/ (function(module, exports, __webpack_require__) {
 
//! moment.js locale configuration
//! locale : Northern Sami [se]
//! authors : Bård Rolstad Henriksen : https://github.com/karamell
 
;(function (global, factory) {
    true ? factory(__webpack_require__(3)) :
   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
   factory(global.moment)
}(this, (function (moment) { 'use strict';
 
    //! moment.js locale configuration
 
    var se = moment.defineLocale('se', {
        months: 'ođđajagemánnu_guovvamánnu_njukčamánnu_cuoŋománnu_miessemánnu_geassemánnu_suoidnemánnu_borgemánnu_čakčamánnu_golggotmánnu_skábmamánnu_juovlamánnu'.split(
            '_'
        ),
        monthsShort:
            'ođđj_guov_njuk_cuo_mies_geas_suoi_borg_čakč_golg_skáb_juov'.split('_'),
        weekdays:
            'sotnabeaivi_vuossárga_maŋŋebárga_gaskavahkku_duorastat_bearjadat_lávvardat'.split(
                '_'
            ),
        weekdaysShort: 'sotn_vuos_maŋ_gask_duor_bear_láv'.split('_'),
        weekdaysMin: 's_v_m_g_d_b_L'.split('_'),
        longDateFormat: {
            LT: 'HH:mm',
            LTS: 'HH:mm:ss',
            L: 'DD.MM.YYYY',
            LL: 'MMMM D. [b.] YYYY',
            LLL: 'MMMM D. [b.] YYYY [ti.] HH:mm',
            LLLL: 'dddd, MMMM D. [b.] YYYY [ti.] HH:mm',
        },
        calendar: {
            sameDay: '[otne ti] LT',
            nextDay: '[ihttin ti] LT',
            nextWeek: 'dddd [ti] LT',
            lastDay: '[ikte ti] LT',
            lastWeek: '[ovddit] dddd [ti] LT',
            sameElse: 'L',
        },
        relativeTime: {
            future: '%s geažes',
            past: 'maŋit %s',
            s: 'moadde sekunddat',
            ss: '%d sekunddat',
            m: 'okta minuhta',
            mm: '%d minuhtat',
            h: 'okta diimmu',
            hh: '%d diimmut',
            d: 'okta beaivi',
            dd: '%d beaivvit',
            M: 'okta mánnu',
            MM: '%d mánut',
            y: 'okta jahki',
            yy: '%d jagit',
        },
        dayOfMonthOrdinalParse: /\d{1,2}\./,
        ordinal: '%d.',
        week: {
            dow: 1, // Monday is the first day of the week.
            doy: 4, // The week that contains Jan 4th is the first week of the year.
        },
    });
 
    return se;
 
})));
 
 
/***/ }),
/* 603 */
/***/ (function(module, exports, __webpack_require__) {
 
//! moment.js locale configuration
//! locale : Sinhalese [si]
//! author : Sampath Sitinamaluwa : https://github.com/sampathsris
 
;(function (global, factory) {
    true ? factory(__webpack_require__(3)) :
   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
   factory(global.moment)
}(this, (function (moment) { 'use strict';
 
    //! moment.js locale configuration
 
    /*jshint -W100*/
    var si = moment.defineLocale('si', {
        months: 'ජනවාරි_පෙබරවාරි_මාර්තු_අප්‍රේල්_මැයි_ජූනි_ජූලි_අගෝස්තු_සැප්තැම්බර්_ඔක්තෝබර්_නොවැම්බර්_දෙසැම්බර්'.split(
            '_'
        ),
        monthsShort: 'ජන_පෙබ_මාර්_අප්_මැයි_ජූනි_ජූලි_අගෝ_සැප්_ඔක්_නොවැ_දෙසැ'.split(
            '_'
        ),
        weekdays:
            'ඉරිදා_සඳුදා_අඟහරුවාදා_බදාදා_බ්‍රහස්පතින්දා_සිකුරාදා_සෙනසුරාදා'.split(
                '_'
            ),
        weekdaysShort: 'ඉරි_සඳු_අඟ_බදා_බ්‍රහ_සිකු_සෙන'.split('_'),
        weekdaysMin: 'ඉ_ස_අ_බ_බ්‍ර_සි_සෙ'.split('_'),
        weekdaysParseExact: true,
        longDateFormat: {
            LT: 'a h:mm',
            LTS: 'a h:mm:ss',
            L: 'YYYY/MM/DD',
            LL: 'YYYY MMMM D',
            LLL: 'YYYY MMMM D, a h:mm',
            LLLL: 'YYYY MMMM D [වැනි] dddd, a h:mm:ss',
        },
        calendar: {
            sameDay: '[අද] LT[ට]',
            nextDay: '[හෙට] LT[ට]',
            nextWeek: 'dddd LT[ට]',
            lastDay: '[ඊයේ] LT[ට]',
            lastWeek: '[පසුගිය] dddd LT[ට]',
            sameElse: 'L',
        },
        relativeTime: {
            future: '%sකින්',
            past: '%sකට පෙර',
            s: 'තත්පර කිහිපය',
            ss: 'තත්පර %d',
            m: 'මිනිත්තුව',
            mm: 'මිනිත්තු %d',
            h: 'පැය',
            hh: 'පැය %d',
            d: 'දිනය',
            dd: 'දින %d',
            M: 'මාසය',
            MM: 'මාස %d',
            y: 'වසර',
            yy: 'වසර %d',
        },
        dayOfMonthOrdinalParse: /\d{1,2} වැනි/,
        ordinal: function (number) {
            return number + ' වැනි';
        },
        meridiemParse: /පෙර වරු|පස් වරු|පෙ.ව|ප.ව./,
        isPM: function (input) {
            return input === 'ප.ව.' || input === 'පස් වරු';
        },
        meridiem: function (hours, minutes, isLower) {
            if (hours > 11) {
                return isLower ? 'ප.ව.' : 'පස් වරු';
            } else {
                return isLower ? 'පෙ.ව.' : 'පෙර වරු';
            }
        },
    });
 
    return si;
 
})));
 
 
/***/ }),
/* 604 */
/***/ (function(module, exports, __webpack_require__) {
 
//! moment.js locale configuration
//! locale : Slovak [sk]
//! author : Martin Minka : https://github.com/k2s
//! based on work of petrbela : https://github.com/petrbela
 
;(function (global, factory) {
    true ? factory(__webpack_require__(3)) :
   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
   factory(global.moment)
}(this, (function (moment) { 'use strict';
 
    //! moment.js locale configuration
 
    var months =
            'január_február_marec_apríl_máj_jún_júl_august_september_október_november_december'.split(
                '_'
            ),
        monthsShort = 'jan_feb_mar_apr_máj_jún_júl_aug_sep_okt_nov_dec'.split('_');
    function plural(n) {
        return n > 1 && n < 5;
    }
    function translate(number, withoutSuffix, key, isFuture) {
        var result = number + ' ';
        switch (key) {
            case 's': // a few seconds / in a few seconds / a few seconds ago
                return withoutSuffix || isFuture ? 'pár sekúnd' : 'pár sekundami';
            case 'ss': // 9 seconds / in 9 seconds / 9 seconds ago
                if (withoutSuffix || isFuture) {
                    return result + (plural(number) ? 'sekundy' : 'sekúnd');
                } else {
                    return result + 'sekundami';
                }
            case 'm': // a minute / in a minute / a minute ago
                return withoutSuffix ? 'minúta' : isFuture ? 'minútu' : 'minútou';
            case 'mm': // 9 minutes / in 9 minutes / 9 minutes ago
                if (withoutSuffix || isFuture) {
                    return result + (plural(number) ? 'minúty' : 'minút');
                } else {
                    return result + 'minútami';
                }
            case 'h': // an hour / in an hour / an hour ago
                return withoutSuffix ? 'hodina' : isFuture ? 'hodinu' : 'hodinou';
            case 'hh': // 9 hours / in 9 hours / 9 hours ago
                if (withoutSuffix || isFuture) {
                    return result + (plural(number) ? 'hodiny' : 'hodín');
                } else {
                    return result + 'hodinami';
                }
            case 'd': // a day / in a day / a day ago
                return withoutSuffix || isFuture ? 'deň' : 'dňom';
            case 'dd': // 9 days / in 9 days / 9 days ago
                if (withoutSuffix || isFuture) {
                    return result + (plural(number) ? 'dni' : 'dní');
                } else {
                    return result + 'dňami';
                }
            case 'M': // a month / in a month / a month ago
                return withoutSuffix || isFuture ? 'mesiac' : 'mesiacom';
            case 'MM': // 9 months / in 9 months / 9 months ago
                if (withoutSuffix || isFuture) {
                    return result + (plural(number) ? 'mesiace' : 'mesiacov');
                } else {
                    return result + 'mesiacmi';
                }
            case 'y': // a year / in a year / a year ago
                return withoutSuffix || isFuture ? 'rok' : 'rokom';
            case 'yy': // 9 years / in 9 years / 9 years ago
                if (withoutSuffix || isFuture) {
                    return result + (plural(number) ? 'roky' : 'rokov');
                } else {
                    return result + 'rokmi';
                }
        }
    }
 
    var sk = moment.defineLocale('sk', {
        months: months,
        monthsShort: monthsShort,
        weekdays: 'nedeľa_pondelok_utorok_streda_štvrtok_piatok_sobota'.split('_'),
        weekdaysShort: 'ne_po_ut_st_št_pi_so'.split('_'),
        weekdaysMin: 'ne_po_ut_st_št_pi_so'.split('_'),
        longDateFormat: {
            LT: 'H:mm',
            LTS: 'H:mm:ss',
            L: 'DD.MM.YYYY',
            LL: 'D. MMMM YYYY',
            LLL: 'D. MMMM YYYY H:mm',
            LLLL: 'dddd D. MMMM YYYY H:mm',
        },
        calendar: {
            sameDay: '[dnes o] LT',
            nextDay: '[zajtra o] LT',
            nextWeek: function () {
                switch (this.day()) {
                    case 0:
                        return '[v nedeľu o] LT';
                    case 1:
                    case 2:
                        return '[v] dddd [o] LT';
                    case 3:
                        return '[v stredu o] LT';
                    case 4:
                        return '[vo štvrtok o] LT';
                    case 5:
                        return '[v piatok o] LT';
                    case 6:
                        return '[v sobotu o] LT';
                }
            },
            lastDay: '[včera o] LT',
            lastWeek: function () {
                switch (this.day()) {
                    case 0:
                        return '[minulú nedeľu o] LT';
                    case 1:
                    case 2:
                        return '[minulý] dddd [o] LT';
                    case 3:
                        return '[minulú stredu o] LT';
                    case 4:
                    case 5:
                        return '[minulý] dddd [o] LT';
                    case 6:
                        return '[minulú sobotu o] LT';
                }
            },
            sameElse: 'L',
        },
        relativeTime: {
            future: 'za %s',
            past: 'pred %s',
            s: translate,
            ss: translate,
            m: translate,
            mm: translate,
            h: translate,
            hh: translate,
            d: translate,
            dd: translate,
            M: translate,
            MM: translate,
            y: translate,
            yy: translate,
        },
        dayOfMonthOrdinalParse: /\d{1,2}\./,
        ordinal: '%d.',
        week: {
            dow: 1, // Monday is the first day of the week.
            doy: 4, // The week that contains Jan 4th is the first week of the year.
        },
    });
 
    return sk;
 
})));
 
 
/***/ }),
/* 605 */
/***/ (function(module, exports, __webpack_require__) {
 
//! moment.js locale configuration
//! locale : Slovenian [sl]
//! author : Robert Sedovšek : https://github.com/sedovsek
 
;(function (global, factory) {
    true ? factory(__webpack_require__(3)) :
   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
   factory(global.moment)
}(this, (function (moment) { 'use strict';
 
    //! moment.js locale configuration
 
    function processRelativeTime(number, withoutSuffix, key, isFuture) {
        var result = number + ' ';
        switch (key) {
            case 's':
                return withoutSuffix || isFuture
                    ? 'nekaj sekund'
                    : 'nekaj sekundami';
            case 'ss':
                if (number === 1) {
                    result += withoutSuffix ? 'sekundo' : 'sekundi';
                } else if (number === 2) {
                    result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah';
                } else if (number < 5) {
                    result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah';
                } else {
                    result += 'sekund';
                }
                return result;
            case 'm':
                return withoutSuffix ? 'ena minuta' : 'eno minuto';
            case 'mm':
                if (number === 1) {
                    result += withoutSuffix ? 'minuta' : 'minuto';
                } else if (number === 2) {
                    result += withoutSuffix || isFuture ? 'minuti' : 'minutama';
                } else if (number < 5) {
                    result += withoutSuffix || isFuture ? 'minute' : 'minutami';
                } else {
                    result += withoutSuffix || isFuture ? 'minut' : 'minutami';
                }
                return result;
            case 'h':
                return withoutSuffix ? 'ena ura' : 'eno uro';
            case 'hh':
                if (number === 1) {
                    result += withoutSuffix ? 'ura' : 'uro';
                } else if (number === 2) {
                    result += withoutSuffix || isFuture ? 'uri' : 'urama';
                } else if (number < 5) {
                    result += withoutSuffix || isFuture ? 'ure' : 'urami';
                } else {
                    result += withoutSuffix || isFuture ? 'ur' : 'urami';
                }
                return result;
            case 'd':
                return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';
            case 'dd':
                if (number === 1) {
                    result += withoutSuffix || isFuture ? 'dan' : 'dnem';
                } else if (number === 2) {
                    result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';
                } else {
                    result += withoutSuffix || isFuture ? 'dni' : 'dnevi';
                }
                return result;
            case 'M':
                return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';
            case 'MM':
                if (number === 1) {
                    result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';
                } else if (number === 2) {
                    result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';
                } else if (number < 5) {
                    result += withoutSuffix || isFuture ? 'mesece' : 'meseci';
                } else {
                    result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';
                }
                return result;
            case 'y':
                return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';
            case 'yy':
                if (number === 1) {
                    result += withoutSuffix || isFuture ? 'leto' : 'letom';
                } else if (number === 2) {
                    result += withoutSuffix || isFuture ? 'leti' : 'letoma';
                } else if (number < 5) {
                    result += withoutSuffix || isFuture ? 'leta' : 'leti';
                } else {
                    result += withoutSuffix || isFuture ? 'let' : 'leti';
                }
                return result;
        }
    }
 
    var sl = moment.defineLocale('sl', {
        months: 'januar_februar_marec_april_maj_junij_julij_avgust_september_oktober_november_december'.split(
            '_'
        ),
        monthsShort:
            'jan._feb._mar._apr._maj._jun._jul._avg._sep._okt._nov._dec.'.split(
                '_'
            ),
        monthsParseExact: true,
        weekdays: 'nedelja_ponedeljek_torek_sreda_četrtek_petek_sobota'.split('_'),
        weekdaysShort: 'ned._pon._tor._sre._čet._pet._sob.'.split('_'),
        weekdaysMin: 'ne_po_to_sr_če_pe_so'.split('_'),
        weekdaysParseExact: true,
        longDateFormat: {
            LT: 'H:mm',
            LTS: 'H:mm:ss',
            L: 'DD. MM. YYYY',
            LL: 'D. MMMM YYYY',
            LLL: 'D. MMMM YYYY H:mm',
            LLLL: 'dddd, D. MMMM YYYY H:mm',
        },
        calendar: {
            sameDay: '[danes ob] LT',
            nextDay: '[jutri ob] LT',
 
            nextWeek: function () {
                switch (this.day()) {
                    case 0:
                        return '[v] [nedeljo] [ob] LT';
                    case 3:
                        return '[v] [sredo] [ob] LT';
                    case 6:
                        return '[v] [soboto] [ob] LT';
                    case 1:
                    case 2:
                    case 4:
                    case 5:
                        return '[v] dddd [ob] LT';
                }
            },
            lastDay: '[včeraj ob] LT',
            lastWeek: function () {
                switch (this.day()) {
                    case 0:
                        return '[prejšnjo] [nedeljo] [ob] LT';
                    case 3:
                        return '[prejšnjo] [sredo] [ob] LT';
                    case 6:
                        return '[prejšnjo] [soboto] [ob] LT';
                    case 1:
                    case 2:
                    case 4:
                    case 5:
                        return '[prejšnji] dddd [ob] LT';
                }
            },
            sameElse: 'L',
        },
        relativeTime: {
            future: 'čez %s',
            past: 'pred %s',
            s: processRelativeTime,
            ss: processRelativeTime,
            m: processRelativeTime,
            mm: processRelativeTime,
            h: processRelativeTime,
            hh: processRelativeTime,
            d: processRelativeTime,
            dd: processRelativeTime,
            M: processRelativeTime,
            MM: processRelativeTime,
            y: processRelativeTime,
            yy: processRelativeTime,
        },
        dayOfMonthOrdinalParse: /\d{1,2}\./,
        ordinal: '%d.',
        week: {
            dow: 1, // Monday is the first day of the week.
            doy: 7, // The week that contains Jan 7th is the first week of the year.
        },
    });
 
    return sl;
 
})));
 
 
/***/ }),
/* 606 */
/***/ (function(module, exports, __webpack_require__) {
 
//! moment.js locale configuration
//! locale : Albanian [sq]
//! author : Flakërim Ismani : https://github.com/flakerimi
//! author : Menelion Elensúle : https://github.com/Oire
//! author : Oerd Cukalla : https://github.com/oerd
 
;(function (global, factory) {
    true ? factory(__webpack_require__(3)) :
   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
   factory(global.moment)
}(this, (function (moment) { 'use strict';
 
    //! moment.js locale configuration
 
    var sq = moment.defineLocale('sq', {
        months: 'Janar_Shkurt_Mars_Prill_Maj_Qershor_Korrik_Gusht_Shtator_Tetor_Nëntor_Dhjetor'.split(
            '_'
        ),
        monthsShort: 'Jan_Shk_Mar_Pri_Maj_Qer_Kor_Gus_Sht_Tet_Nën_Dhj'.split('_'),
        weekdays: 'E Diel_E Hënë_E Martë_E Mërkurë_E Enjte_E Premte_E Shtunë'.split(
            '_'
        ),
        weekdaysShort: 'Die_Hën_Mar_Mër_Enj_Pre_Sht'.split('_'),
        weekdaysMin: 'D_H_Ma_Më_E_P_Sh'.split('_'),
        weekdaysParseExact: true,
        meridiemParse: /PD|MD/,
        isPM: function (input) {
            return input.charAt(0) === 'M';
        },
        meridiem: function (hours, minutes, isLower) {
            return hours < 12 ? 'PD' : 'MD';
        },
        longDateFormat: {
            LT: 'HH:mm',
            LTS: 'HH:mm:ss',
            L: 'DD/MM/YYYY',
            LL: 'D MMMM YYYY',
            LLL: 'D MMMM YYYY HH:mm',
            LLLL: 'dddd, D MMMM YYYY HH:mm',
        },
        calendar: {
            sameDay: '[Sot në] LT',
            nextDay: '[Nesër në] LT',
            nextWeek: 'dddd [në] LT',
            lastDay: '[Dje në] LT',
            lastWeek: 'dddd [e kaluar në] LT',
            sameElse: 'L',
        },
        relativeTime: {
            future: 'në %s',
            past: '%s më parë',
            s: 'disa sekonda',
            ss: '%d sekonda',
            m: 'një minutë',
            mm: '%d minuta',
            h: 'një orë',
            hh: '%d orë',
            d: 'një ditë',
            dd: '%d ditë',
            M: 'një muaj',
            MM: '%d muaj',
            y: 'një vit',
            yy: '%d vite',
        },
        dayOfMonthOrdinalParse: /\d{1,2}\./,
        ordinal: '%d.',
        week: {
            dow: 1, // Monday is the first day of the week.
            doy: 4, // The week that contains Jan 4th is the first week of the year.
        },
    });
 
    return sq;
 
})));
 
 
/***/ }),
/* 607 */
/***/ (function(module, exports, __webpack_require__) {
 
//! moment.js locale configuration
//! locale : Serbian [sr]
//! author : Milan Janačković<milanjanackovic@gmail.com> : https://github.com/milan-j
//! author : Stefan Crnjaković <stefan@hotmail.rs> : https://github.com/crnjakovic
 
;(function (global, factory) {
    true ? factory(__webpack_require__(3)) :
   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
   factory(global.moment)
}(this, (function (moment) { 'use strict';
 
    //! moment.js locale configuration
 
    var translator = {
        words: {
            //Different grammatical cases
            ss: ['sekunda', 'sekunde', 'sekundi'],
            m: ['jedan minut', 'jednog minuta'],
            mm: ['minut', 'minuta', 'minuta'],
            h: ['jedan sat', 'jednog sata'],
            hh: ['sat', 'sata', 'sati'],
            d: ['jedan dan', 'jednog dana'],
            dd: ['dan', 'dana', 'dana'],
            M: ['jedan mesec', 'jednog meseca'],
            MM: ['mesec', 'meseca', 'meseci'],
            y: ['jednu godinu', 'jedne godine'],
            yy: ['godinu', 'godine', 'godina'],
        },
        correctGrammaticalCase: function (number, wordKey) {
            if (
                number % 10 >= 1 &&
                number % 10 <= 4 &&
                (number % 100 < 10 || number % 100 >= 20)
            ) {
                return number % 10 === 1 ? wordKey[0] : wordKey[1];
            }
            return wordKey[2];
        },
        translate: function (number, withoutSuffix, key, isFuture) {
            var wordKey = translator.words[key],
                word;
 
            if (key.length === 1) {
                // Nominativ
                if (key === 'y' && withoutSuffix) return 'jedna godina';
                return isFuture || withoutSuffix ? wordKey[0] : wordKey[1];
            }
 
            word = translator.correctGrammaticalCase(number, wordKey);
            // Nominativ
            if (key === 'yy' && withoutSuffix && word === 'godinu') {
                return number + ' godina';
            }
 
            return number + ' ' + word;
        },
    };
 
    var sr = moment.defineLocale('sr', {
        months: 'januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar'.split(
            '_'
        ),
        monthsShort:
            'jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.'.split('_'),
        monthsParseExact: true,
        weekdays: 'nedelja_ponedeljak_utorak_sreda_četvrtak_petak_subota'.split(
            '_'
        ),
        weekdaysShort: 'ned._pon._uto._sre._čet._pet._sub.'.split('_'),
        weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'),
        weekdaysParseExact: true,
        longDateFormat: {
            LT: 'H:mm',
            LTS: 'H:mm:ss',
            L: 'D. M. YYYY.',
            LL: 'D. MMMM YYYY.',
            LLL: 'D. MMMM YYYY. H:mm',
            LLLL: 'dddd, D. MMMM YYYY. H:mm',
        },
        calendar: {
            sameDay: '[danas u] LT',
            nextDay: '[sutra u] LT',
            nextWeek: function () {
                switch (this.day()) {
                    case 0:
                        return '[u] [nedelju] [u] LT';
                    case 3:
                        return '[u] [sredu] [u] LT';
                    case 6:
                        return '[u] [subotu] [u] LT';
                    case 1:
                    case 2:
                    case 4:
                    case 5:
                        return '[u] dddd [u] LT';
                }
            },
            lastDay: '[juče u] LT',
            lastWeek: function () {
                var lastWeekDays = [
                    '[prošle] [nedelje] [u] LT',
                    '[prošlog] [ponedeljka] [u] LT',
                    '[prošlog] [utorka] [u] LT',
                    '[prošle] [srede] [u] LT',
                    '[prošlog] [četvrtka] [u] LT',
                    '[prošlog] [petka] [u] LT',
                    '[prošle] [subote] [u] LT',
                ];
                return lastWeekDays[this.day()];
            },
            sameElse: 'L',
        },
        relativeTime: {
            future: 'za %s',
            past: 'pre %s',
            s: 'nekoliko sekundi',
            ss: translator.translate,
            m: translator.translate,
            mm: translator.translate,
            h: translator.translate,
            hh: translator.translate,
            d: translator.translate,
            dd: translator.translate,
            M: translator.translate,
            MM: translator.translate,
            y: translator.translate,
            yy: translator.translate,
        },
        dayOfMonthOrdinalParse: /\d{1,2}\./,
        ordinal: '%d.',
        week: {
            dow: 1, // Monday is the first day of the week.
            doy: 7, // The week that contains Jan 7th is the first week of the year.
        },
    });
 
    return sr;
 
})));
 
 
/***/ }),
/* 608 */
/***/ (function(module, exports, __webpack_require__) {
 
//! moment.js locale configuration
//! locale : Serbian Cyrillic [sr-cyrl]
//! author : Milan Janačković<milanjanackovic@gmail.com> : https://github.com/milan-j
//! author : Stefan Crnjaković <stefan@hotmail.rs> : https://github.com/crnjakovic
 
;(function (global, factory) {
    true ? factory(__webpack_require__(3)) :
   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
   factory(global.moment)
}(this, (function (moment) { 'use strict';
 
    //! moment.js locale configuration
 
    var translator = {
        words: {
            //Different grammatical cases
            ss: ['секунда', 'секунде', 'секунди'],
            m: ['један минут', 'једног минута'],
            mm: ['минут', 'минута', 'минута'],
            h: ['један сат', 'једног сата'],
            hh: ['сат', 'сата', 'сати'],
            d: ['један дан', 'једног дана'],
            dd: ['дан', 'дана', 'дана'],
            M: ['један месец', 'једног месеца'],
            MM: ['месец', 'месеца', 'месеци'],
            y: ['једну годину', 'једне године'],
            yy: ['годину', 'године', 'година'],
        },
        correctGrammaticalCase: function (number, wordKey) {
            if (
                number % 10 >= 1 &&
                number % 10 <= 4 &&
                (number % 100 < 10 || number % 100 >= 20)
            ) {
                return number % 10 === 1 ? wordKey[0] : wordKey[1];
            }
            return wordKey[2];
        },
        translate: function (number, withoutSuffix, key, isFuture) {
            var wordKey = translator.words[key],
                word;
 
            if (key.length === 1) {
                // Nominativ
                if (key === 'y' && withoutSuffix) return 'једна година';
                return isFuture || withoutSuffix ? wordKey[0] : wordKey[1];
            }
 
            word = translator.correctGrammaticalCase(number, wordKey);
            // Nominativ
            if (key === 'yy' && withoutSuffix && word === 'годину') {
                return number + ' година';
            }
 
            return number + ' ' + word;
        },
    };
 
    var srCyrl = moment.defineLocale('sr-cyrl', {
        months: 'јануар_фебруар_март_април_мај_јун_јул_август_септембар_октобар_новембар_децембар'.split(
            '_'
        ),
        monthsShort:
            'јан._феб._мар._апр._мај_јун_јул_авг._сеп._окт._нов._дец.'.split('_'),
        monthsParseExact: true,
        weekdays: 'недеља_понедељак_уторак_среда_четвртак_петак_субота'.split('_'),
        weekdaysShort: 'нед._пон._уто._сре._чет._пет._суб.'.split('_'),
        weekdaysMin: 'не_по_ут_ср_че_пе_су'.split('_'),
        weekdaysParseExact: true,
        longDateFormat: {
            LT: 'H:mm',
            LTS: 'H:mm:ss',
            L: 'D. M. YYYY.',
            LL: 'D. MMMM YYYY.',
            LLL: 'D. MMMM YYYY. H:mm',
            LLLL: 'dddd, D. MMMM YYYY. H:mm',
        },
        calendar: {
            sameDay: '[данас у] LT',
            nextDay: '[сутра у] LT',
            nextWeek: function () {
                switch (this.day()) {
                    case 0:
                        return '[у] [недељу] [у] LT';
                    case 3:
                        return '[у] [среду] [у] LT';
                    case 6:
                        return '[у] [суботу] [у] LT';
                    case 1:
                    case 2:
                    case 4:
                    case 5:
                        return '[у] dddd [у] LT';
                }
            },
            lastDay: '[јуче у] LT',
            lastWeek: function () {
                var lastWeekDays = [
                    '[прошле] [недеље] [у] LT',
                    '[прошлог] [понедељка] [у] LT',
                    '[прошлог] [уторка] [у] LT',
                    '[прошле] [среде] [у] LT',
                    '[прошлог] [четвртка] [у] LT',
                    '[прошлог] [петка] [у] LT',
                    '[прошле] [суботе] [у] LT',
                ];
                return lastWeekDays[this.day()];
            },
            sameElse: 'L',
        },
        relativeTime: {
            future: 'за %s',
            past: 'пре %s',
            s: 'неколико секунди',
            ss: translator.translate,
            m: translator.translate,
            mm: translator.translate,
            h: translator.translate,
            hh: translator.translate,
            d: translator.translate,
            dd: translator.translate,
            M: translator.translate,
            MM: translator.translate,
            y: translator.translate,
            yy: translator.translate,
        },
        dayOfMonthOrdinalParse: /\d{1,2}\./,
        ordinal: '%d.',
        week: {
            dow: 1, // Monday is the first day of the week.
            doy: 7, // The week that contains Jan 1st is the first week of the year.
        },
    });
 
    return srCyrl;
 
})));
 
 
/***/ }),
/* 609 */
/***/ (function(module, exports, __webpack_require__) {
 
//! moment.js locale configuration
//! locale : siSwati [ss]
//! author : Nicolai Davies<mail@nicolai.io> : https://github.com/nicolaidavies
 
;(function (global, factory) {
    true ? factory(__webpack_require__(3)) :
   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
   factory(global.moment)
}(this, (function (moment) { 'use strict';
 
    //! moment.js locale configuration
 
    var ss = moment.defineLocale('ss', {
        months: "Bhimbidvwane_Indlovana_Indlov'lenkhulu_Mabasa_Inkhwekhweti_Inhlaba_Kholwane_Ingci_Inyoni_Imphala_Lweti_Ingongoni".split(
            '_'
        ),
        monthsShort: 'Bhi_Ina_Inu_Mab_Ink_Inh_Kho_Igc_Iny_Imp_Lwe_Igo'.split('_'),
        weekdays:
            'Lisontfo_Umsombuluko_Lesibili_Lesitsatfu_Lesine_Lesihlanu_Umgcibelo'.split(
                '_'
            ),
        weekdaysShort: 'Lis_Umb_Lsb_Les_Lsi_Lsh_Umg'.split('_'),
        weekdaysMin: 'Li_Us_Lb_Lt_Ls_Lh_Ug'.split('_'),
        weekdaysParseExact: true,
        longDateFormat: {
            LT: 'h:mm A',
            LTS: 'h:mm:ss A',
            L: 'DD/MM/YYYY',
            LL: 'D MMMM YYYY',
            LLL: 'D MMMM YYYY h:mm A',
            LLLL: 'dddd, D MMMM YYYY h:mm A',
        },
        calendar: {
            sameDay: '[Namuhla nga] LT',
            nextDay: '[Kusasa nga] LT',
            nextWeek: 'dddd [nga] LT',
            lastDay: '[Itolo nga] LT',
            lastWeek: 'dddd [leliphelile] [nga] LT',
            sameElse: 'L',
        },
        relativeTime: {
            future: 'nga %s',
            past: 'wenteka nga %s',
            s: 'emizuzwana lomcane',
            ss: '%d mzuzwana',
            m: 'umzuzu',
            mm: '%d emizuzu',
            h: 'lihora',
            hh: '%d emahora',
            d: 'lilanga',
            dd: '%d emalanga',
            M: 'inyanga',
            MM: '%d tinyanga',
            y: 'umnyaka',
            yy: '%d iminyaka',
        },
        meridiemParse: /ekuseni|emini|entsambama|ebusuku/,
        meridiem: function (hours, minutes, isLower) {
            if (hours < 11) {
                return 'ekuseni';
            } else if (hours < 15) {
                return 'emini';
            } else if (hours < 19) {
                return 'entsambama';
            } else {
                return 'ebusuku';
            }
        },
        meridiemHour: function (hour, meridiem) {
            if (hour === 12) {
                hour = 0;
            }
            if (meridiem === 'ekuseni') {
                return hour;
            } else if (meridiem === 'emini') {
                return hour >= 11 ? hour : hour + 12;
            } else if (meridiem === 'entsambama' || meridiem === 'ebusuku') {
                if (hour === 0) {
                    return 0;
                }
                return hour + 12;
            }
        },
        dayOfMonthOrdinalParse: /\d{1,2}/,
        ordinal: '%d',
        week: {
            dow: 1, // Monday is the first day of the week.
            doy: 4, // The week that contains Jan 4th is the first week of the year.
        },
    });
 
    return ss;
 
})));
 
 
/***/ }),
/* 610 */
/***/ (function(module, exports, __webpack_require__) {
 
//! moment.js locale configuration
//! locale : Swedish [sv]
//! author : Jens Alm : https://github.com/ulmus
 
;(function (global, factory) {
    true ? factory(__webpack_require__(3)) :
   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
   factory(global.moment)
}(this, (function (moment) { 'use strict';
 
    //! moment.js locale configuration
 
    var sv = moment.defineLocale('sv', {
        months: 'januari_februari_mars_april_maj_juni_juli_augusti_september_oktober_november_december'.split(
            '_'
        ),
        monthsShort: 'jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec'.split('_'),
        weekdays: 'söndag_måndag_tisdag_onsdag_torsdag_fredag_lördag'.split('_'),
        weekdaysShort: 'sön_mån_tis_ons_tor_fre_lör'.split('_'),
        weekdaysMin: 'sö_må_ti_on_to_fr_lö'.split('_'),
        longDateFormat: {
            LT: 'HH:mm',
            LTS: 'HH:mm:ss',
            L: 'YYYY-MM-DD',
            LL: 'D MMMM YYYY',
            LLL: 'D MMMM YYYY [kl.] HH:mm',
            LLLL: 'dddd D MMMM YYYY [kl.] HH:mm',
            lll: 'D MMM YYYY HH:mm',
            llll: 'ddd D MMM YYYY HH:mm',
        },
        calendar: {
            sameDay: '[Idag] LT',
            nextDay: '[Imorgon] LT',
            lastDay: '[Igår] LT',
            nextWeek: '[På] dddd LT',
            lastWeek: '[I] dddd[s] LT',
            sameElse: 'L',
        },
        relativeTime: {
            future: 'om %s',
            past: 'för %s sedan',
            s: 'några sekunder',
            ss: '%d sekunder',
            m: 'en minut',
            mm: '%d minuter',
            h: 'en timme',
            hh: '%d timmar',
            d: 'en dag',
            dd: '%d dagar',
            M: 'en månad',
            MM: '%d månader',
            y: 'ett år',
            yy: '%d år',
        },
        dayOfMonthOrdinalParse: /\d{1,2}(\:e|\:a)/,
        ordinal: function (number) {
            var b = number % 10,
                output =
                    ~~((number % 100) / 10) === 1
                        ? ':e'
                        : b === 1
                        ? ':a'
                        : b === 2
                        ? ':a'
                        : b === 3
                        ? ':e'
                        : ':e';
            return number + output;
        },
        week: {
            dow: 1, // Monday is the first day of the week.
            doy: 4, // The week that contains Jan 4th is the first week of the year.
        },
    });
 
    return sv;
 
})));
 
 
/***/ }),
/* 611 */
/***/ (function(module, exports, __webpack_require__) {
 
//! moment.js locale configuration
//! locale : Swahili [sw]
//! author : Fahad Kassim : https://github.com/fadsel
 
;(function (global, factory) {
    true ? factory(__webpack_require__(3)) :
   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
   factory(global.moment)
}(this, (function (moment) { 'use strict';
 
    //! moment.js locale configuration
 
    var sw = moment.defineLocale('sw', {
        months: 'Januari_Februari_Machi_Aprili_Mei_Juni_Julai_Agosti_Septemba_Oktoba_Novemba_Desemba'.split(
            '_'
        ),
        monthsShort: 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ago_Sep_Okt_Nov_Des'.split('_'),
        weekdays:
            'Jumapili_Jumatatu_Jumanne_Jumatano_Alhamisi_Ijumaa_Jumamosi'.split(
                '_'
            ),
        weekdaysShort: 'Jpl_Jtat_Jnne_Jtan_Alh_Ijm_Jmos'.split('_'),
        weekdaysMin: 'J2_J3_J4_J5_Al_Ij_J1'.split('_'),
        weekdaysParseExact: true,
        longDateFormat: {
            LT: 'hh:mm A',
            LTS: 'HH:mm:ss',
            L: 'DD.MM.YYYY',
            LL: 'D MMMM YYYY',
            LLL: 'D MMMM YYYY HH:mm',
            LLLL: 'dddd, D MMMM YYYY HH:mm',
        },
        calendar: {
            sameDay: '[leo saa] LT',
            nextDay: '[kesho saa] LT',
            nextWeek: '[wiki ijayo] dddd [saat] LT',
            lastDay: '[jana] LT',
            lastWeek: '[wiki iliyopita] dddd [saat] LT',
            sameElse: 'L',
        },
        relativeTime: {
            future: '%s baadaye',
            past: 'tokea %s',
            s: 'hivi punde',
            ss: 'sekunde %d',
            m: 'dakika moja',
            mm: 'dakika %d',
            h: 'saa limoja',
            hh: 'masaa %d',
            d: 'siku moja',
            dd: 'siku %d',
            M: 'mwezi mmoja',
            MM: 'miezi %d',
            y: 'mwaka mmoja',
            yy: 'miaka %d',
        },
        week: {
            dow: 1, // Monday is the first day of the week.
            doy: 7, // The week that contains Jan 7th is the first week of the year.
        },
    });
 
    return sw;
 
})));
 
 
/***/ }),
/* 612 */
/***/ (function(module, exports, __webpack_require__) {
 
//! moment.js locale configuration
//! locale : Tamil [ta]
//! author : Arjunkumar Krishnamoorthy : https://github.com/tk120404
 
;(function (global, factory) {
    true ? factory(__webpack_require__(3)) :
   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
   factory(global.moment)
}(this, (function (moment) { 'use strict';
 
    //! moment.js locale configuration
 
    var symbolMap = {
            1: '௧',
            2: '௨',
            3: '௩',
            4: '௪',
            5: '௫',
            6: '௬',
            7: '௭',
            8: '௮',
            9: '௯',
            0: '௦',
        },
        numberMap = {
            '௧': '1',
            '௨': '2',
            '௩': '3',
            '௪': '4',
            '௫': '5',
            '௬': '6',
            '௭': '7',
            '௮': '8',
            '௯': '9',
            '௦': '0',
        };
 
    var ta = moment.defineLocale('ta', {
        months: 'ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்'.split(
            '_'
        ),
        monthsShort:
            'ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்'.split(
                '_'
            ),
        weekdays:
            'ஞாயிற்றுக்கிழமை_திங்கட்கிழமை_செவ்வாய்கிழமை_புதன்கிழமை_வியாழக்கிழமை_வெள்ளிக்கிழமை_சனிக்கிழமை'.split(
                '_'
            ),
        weekdaysShort: 'ஞாயிறு_திங்கள்_செவ்வாய்_புதன்_வியாழன்_வெள்ளி_சனி'.split(
            '_'
        ),
        weekdaysMin: 'ஞா_தி_செ_பு_வி_வெ_ச'.split('_'),
        longDateFormat: {
            LT: 'HH:mm',
            LTS: 'HH:mm:ss',
            L: 'DD/MM/YYYY',
            LL: 'D MMMM YYYY',
            LLL: 'D MMMM YYYY, HH:mm',
            LLLL: 'dddd, D MMMM YYYY, HH:mm',
        },
        calendar: {
            sameDay: '[இன்று] LT',
            nextDay: '[நாளை] LT',
            nextWeek: 'dddd, LT',
            lastDay: '[நேற்று] LT',
            lastWeek: '[கடந்த வாரம்] dddd, LT',
            sameElse: 'L',
        },
        relativeTime: {
            future: '%s இல்',
            past: '%s முன்',
            s: 'ஒரு சில விநாடிகள்',
            ss: '%d விநாடிகள்',
            m: 'ஒரு நிமிடம்',
            mm: '%d நிமிடங்கள்',
            h: 'ஒரு மணி நேரம்',
            hh: '%d மணி நேரம்',
            d: 'ஒரு நாள்',
            dd: '%d நாட்கள்',
            M: 'ஒரு மாதம்',
            MM: '%d மாதங்கள்',
            y: 'ஒரு வருடம்',
            yy: '%d ஆண்டுகள்',
        },
        dayOfMonthOrdinalParse: /\d{1,2}வது/,
        ordinal: function (number) {
            return number + 'வது';
        },
        preparse: function (string) {
            return string.replace(/[௧௨௩௪௫௬௭௮௯௦]/g, function (match) {
                return numberMap[match];
            });
        },
        postformat: function (string) {
            return string.replace(/\d/g, function (match) {
                return symbolMap[match];
            });
        },
        // refer http://ta.wikipedia.org/s/1er1
        meridiemParse: /யாமம்|வைகறை|காலை|நண்பகல்|எற்பாடு|மாலை/,
        meridiem: function (hour, minute, isLower) {
            if (hour < 2) {
                return ' யாமம்';
            } else if (hour < 6) {
                return ' வைகறை'; // வைகறை
            } else if (hour < 10) {
                return ' காலை'; // காலை
            } else if (hour < 14) {
                return ' நண்பகல்'; // நண்பகல்
            } else if (hour < 18) {
                return ' எற்பாடு'; // எற்பாடு
            } else if (hour < 22) {
                return ' மாலை'; // மாலை
            } else {
                return ' யாமம்';
            }
        },
        meridiemHour: function (hour, meridiem) {
            if (hour === 12) {
                hour = 0;
            }
            if (meridiem === 'யாமம்') {
                return hour < 2 ? hour : hour + 12;
            } else if (meridiem === 'வைகறை' || meridiem === 'காலை') {
                return hour;
            } else if (meridiem === 'நண்பகல்') {
                return hour >= 10 ? hour : hour + 12;
            } else {
                return hour + 12;
            }
        },
        week: {
            dow: 0, // Sunday is the first day of the week.
            doy: 6, // The week that contains Jan 6th is the first week of the year.
        },
    });
 
    return ta;
 
})));
 
 
/***/ }),
/* 613 */
/***/ (function(module, exports, __webpack_require__) {
 
//! moment.js locale configuration
//! locale : Telugu [te]
//! author : Krishna Chaitanya Thota : https://github.com/kcthota
 
;(function (global, factory) {
    true ? factory(__webpack_require__(3)) :
   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
   factory(global.moment)
}(this, (function (moment) { 'use strict';
 
    //! moment.js locale configuration
 
    var te = moment.defineLocale('te', {
        months: 'జనవరి_ఫిబ్రవరి_మార్చి_ఏప్రిల్_మే_జూన్_జులై_ఆగస్టు_సెప్టెంబర్_అక్టోబర్_నవంబర్_డిసెంబర్'.split(
            '_'
        ),
        monthsShort:
            'జన._ఫిబ్ర._మార్చి_ఏప్రి._మే_జూన్_జులై_ఆగ._సెప్._అక్టో._నవ._డిసె.'.split(
                '_'
            ),
        monthsParseExact: true,
        weekdays:
            'ఆదివారం_సోమవారం_మంగళవారం_బుధవారం_గురువారం_శుక్రవారం_శనివారం'.split(
                '_'
            ),
        weekdaysShort: 'ఆది_సోమ_మంగళ_బుధ_గురు_శుక్ర_శని'.split('_'),
        weekdaysMin: 'ఆ_సో_మం_బు_గు_శు_శ'.split('_'),
        longDateFormat: {
            LT: 'A h:mm',
            LTS: 'A h:mm:ss',
            L: 'DD/MM/YYYY',
            LL: 'D MMMM YYYY',
            LLL: 'D MMMM YYYY, A h:mm',
            LLLL: 'dddd, D MMMM YYYY, A h:mm',
        },
        calendar: {
            sameDay: '[నేడు] LT',
            nextDay: '[రేపు] LT',
            nextWeek: 'dddd, LT',
            lastDay: '[నిన్న] LT',
            lastWeek: '[గత] dddd, LT',
            sameElse: 'L',
        },
        relativeTime: {
            future: '%s లో',
            past: '%s క్రితం',
            s: 'కొన్ని క్షణాలు',
            ss: '%d సెకన్లు',
            m: 'ఒక నిమిషం',
            mm: '%d నిమిషాలు',
            h: 'ఒక గంట',
            hh: '%d గంటలు',
            d: 'ఒక రోజు',
            dd: '%d రోజులు',
            M: 'ఒక నెల',
            MM: '%d నెలలు',
            y: 'ఒక సంవత్సరం',
            yy: '%d సంవత్సరాలు',
        },
        dayOfMonthOrdinalParse: /\d{1,2}వ/,
        ordinal: '%dవ',
        meridiemParse: /రాత్రి|ఉదయం|మధ్యాహ్నం|సాయంత్రం/,
        meridiemHour: function (hour, meridiem) {
            if (hour === 12) {
                hour = 0;
            }
            if (meridiem === 'రాత్రి') {
                return hour < 4 ? hour : hour + 12;
            } else if (meridiem === 'ఉదయం') {
                return hour;
            } else if (meridiem === 'మధ్యాహ్నం') {
                return hour >= 10 ? hour : hour + 12;
            } else if (meridiem === 'సాయంత్రం') {
                return hour + 12;
            }
        },
        meridiem: function (hour, minute, isLower) {
            if (hour < 4) {
                return 'రాత్రి';
            } else if (hour < 10) {
                return 'ఉదయం';
            } else if (hour < 17) {
                return 'మధ్యాహ్నం';
            } else if (hour < 20) {
                return 'సాయంత్రం';
            } else {
                return 'రాత్రి';
            }
        },
        week: {
            dow: 0, // Sunday is the first day of the week.
            doy: 6, // The week that contains Jan 6th is the first week of the year.
        },
    });
 
    return te;
 
})));
 
 
/***/ }),
/* 614 */
/***/ (function(module, exports, __webpack_require__) {
 
//! moment.js locale configuration
//! locale : Tetun Dili (East Timor) [tet]
//! author : Joshua Brooks : https://github.com/joshbrooks
//! author : Onorio De J. Afonso : https://github.com/marobo
//! author : Sonia Simoes : https://github.com/soniasimoes
 
;(function (global, factory) {
    true ? factory(__webpack_require__(3)) :
   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
   factory(global.moment)
}(this, (function (moment) { 'use strict';
 
    //! moment.js locale configuration
 
    var tet = moment.defineLocale('tet', {
        months: 'Janeiru_Fevereiru_Marsu_Abril_Maiu_Juñu_Jullu_Agustu_Setembru_Outubru_Novembru_Dezembru'.split(
            '_'
        ),
        monthsShort: 'Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez'.split('_'),
        weekdays: 'Domingu_Segunda_Tersa_Kuarta_Kinta_Sesta_Sabadu'.split('_'),
        weekdaysShort: 'Dom_Seg_Ters_Kua_Kint_Sest_Sab'.split('_'),
        weekdaysMin: 'Do_Seg_Te_Ku_Ki_Ses_Sa'.split('_'),
        longDateFormat: {
            LT: 'HH:mm',
            LTS: 'HH:mm:ss',
            L: 'DD/MM/YYYY',
            LL: 'D MMMM YYYY',
            LLL: 'D MMMM YYYY HH:mm',
            LLLL: 'dddd, D MMMM YYYY HH:mm',
        },
        calendar: {
            sameDay: '[Ohin iha] LT',
            nextDay: '[Aban iha] LT',
            nextWeek: 'dddd [iha] LT',
            lastDay: '[Horiseik iha] LT',
            lastWeek: 'dddd [semana kotuk] [iha] LT',
            sameElse: 'L',
        },
        relativeTime: {
            future: 'iha %s',
            past: '%s liuba',
            s: 'segundu balun',
            ss: 'segundu %d',
            m: 'minutu ida',
            mm: 'minutu %d',
            h: 'oras ida',
            hh: 'oras %d',
            d: 'loron ida',
            dd: 'loron %d',
            M: 'fulan ida',
            MM: 'fulan %d',
            y: 'tinan ida',
            yy: 'tinan %d',
        },
        dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
        ordinal: function (number) {
            var b = number % 10,
                output =
                    ~~((number % 100) / 10) === 1
                        ? 'th'
                        : b === 1
                        ? 'st'
                        : b === 2
                        ? 'nd'
                        : b === 3
                        ? 'rd'
                        : 'th';
            return number + output;
        },
        week: {
            dow: 1, // Monday is the first day of the week.
            doy: 4, // The week that contains Jan 4th is the first week of the year.
        },
    });
 
    return tet;
 
})));
 
 
/***/ }),
/* 615 */
/***/ (function(module, exports, __webpack_require__) {
 
//! moment.js locale configuration
//! locale : Tajik [tg]
//! author : Orif N. Jr. : https://github.com/orif-jr
 
;(function (global, factory) {
    true ? factory(__webpack_require__(3)) :
   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
   factory(global.moment)
}(this, (function (moment) { 'use strict';
 
    //! moment.js locale configuration
 
    var suffixes = {
        0: '-ум',
        1: '-ум',
        2: '-юм',
        3: '-юм',
        4: '-ум',
        5: '-ум',
        6: '-ум',
        7: '-ум',
        8: '-ум',
        9: '-ум',
        10: '-ум',
        12: '-ум',
        13: '-ум',
        20: '-ум',
        30: '-юм',
        40: '-ум',
        50: '-ум',
        60: '-ум',
        70: '-ум',
        80: '-ум',
        90: '-ум',
        100: '-ум',
    };
 
    var tg = moment.defineLocale('tg', {
        months: {
            format: 'январи_феврали_марти_апрели_майи_июни_июли_августи_сентябри_октябри_ноябри_декабри'.split(
                '_'
            ),
            standalone:
                'январ_феврал_март_апрел_май_июн_июл_август_сентябр_октябр_ноябр_декабр'.split(
                    '_'
                ),
        },
        monthsShort: 'янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек'.split('_'),
        weekdays: 'якшанбе_душанбе_сешанбе_чоршанбе_панҷшанбе_ҷумъа_шанбе'.split(
            '_'
        ),
        weekdaysShort: 'яшб_дшб_сшб_чшб_пшб_ҷум_шнб'.split('_'),
        weekdaysMin: 'яш_дш_сш_чш_пш_ҷм_шб'.split('_'),
        longDateFormat: {
            LT: 'HH:mm',
            LTS: 'HH:mm:ss',
            L: 'DD.MM.YYYY',
            LL: 'D MMMM YYYY',
            LLL: 'D MMMM YYYY HH:mm',
            LLLL: 'dddd, D MMMM YYYY HH:mm',
        },
        calendar: {
            sameDay: '[Имрӯз соати] LT',
            nextDay: '[Фардо соати] LT',
            lastDay: '[Дирӯз соати] LT',
            nextWeek: 'dddd[и] [ҳафтаи оянда соати] LT',
            lastWeek: 'dddd[и] [ҳафтаи гузашта соати] LT',
            sameElse: 'L',
        },
        relativeTime: {
            future: 'баъди %s',
            past: '%s пеш',
            s: 'якчанд сония',
            m: 'як дақиқа',
            mm: '%d дақиқа',
            h: 'як соат',
            hh: '%d соат',
            d: 'як рӯз',
            dd: '%d рӯз',
            M: 'як моҳ',
            MM: '%d моҳ',
            y: 'як сол',
            yy: '%d сол',
        },
        meridiemParse: /шаб|субҳ|рӯз|бегоҳ/,
        meridiemHour: function (hour, meridiem) {
            if (hour === 12) {
                hour = 0;
            }
            if (meridiem === 'шаб') {
                return hour < 4 ? hour : hour + 12;
            } else if (meridiem === 'субҳ') {
                return hour;
            } else if (meridiem === 'рӯз') {
                return hour >= 11 ? hour : hour + 12;
            } else if (meridiem === 'бегоҳ') {
                return hour + 12;
            }
        },
        meridiem: function (hour, minute, isLower) {
            if (hour < 4) {
                return 'шаб';
            } else if (hour < 11) {
                return 'субҳ';
            } else if (hour < 16) {
                return 'рӯз';
            } else if (hour < 19) {
                return 'бегоҳ';
            } else {
                return 'шаб';
            }
        },
        dayOfMonthOrdinalParse: /\d{1,2}-(ум|юм)/,
        ordinal: function (number) {
            var a = number % 10,
                b = number >= 100 ? 100 : null;
            return number + (suffixes[number] || suffixes[a] || suffixes[b]);
        },
        week: {
            dow: 1, // Monday is the first day of the week.
            doy: 7, // The week that contains Jan 1th is the first week of the year.
        },
    });
 
    return tg;
 
})));
 
 
/***/ }),
/* 616 */
/***/ (function(module, exports, __webpack_require__) {
 
//! moment.js locale configuration
//! locale : Thai [th]
//! author : Kridsada Thanabulpong : https://github.com/sirn
 
;(function (global, factory) {
    true ? factory(__webpack_require__(3)) :
   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
   factory(global.moment)
}(this, (function (moment) { 'use strict';
 
    //! moment.js locale configuration
 
    var th = moment.defineLocale('th', {
        months: 'มกราคม_กุมภาพันธ์_มีนาคม_เมษายน_พฤษภาคม_มิถุนายน_กรกฎาคม_สิงหาคม_กันยายน_ตุลาคม_พฤศจิกายน_ธันวาคม'.split(
            '_'
        ),
        monthsShort:
            'ม.ค._ก.พ._มี.ค._เม.ย._พ.ค._มิ.ย._ก.ค._ส.ค._ก.ย._ต.ค._พ.ย._ธ.ค.'.split(
                '_'
            ),
        monthsParseExact: true,
        weekdays: 'อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัสบดี_ศุกร์_เสาร์'.split('_'),
        weekdaysShort: 'อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัส_ศุกร์_เสาร์'.split('_'), // yes, three characters difference
        weekdaysMin: 'อา._จ._อ._พ._พฤ._ศ._ส.'.split('_'),
        weekdaysParseExact: true,
        longDateFormat: {
            LT: 'H:mm',
            LTS: 'H:mm:ss',
            L: 'DD/MM/YYYY',
            LL: 'D MMMM YYYY',
            LLL: 'D MMMM YYYY เวลา H:mm',
            LLLL: 'วันddddที่ D MMMM YYYY เวลา H:mm',
        },
        meridiemParse: /ก่อนเที่ยง|หลังเที่ยง/,
        isPM: function (input) {
            return input === 'หลังเที่ยง';
        },
        meridiem: function (hour, minute, isLower) {
            if (hour < 12) {
                return 'ก่อนเที่ยง';
            } else {
                return 'หลังเที่ยง';
            }
        },
        calendar: {
            sameDay: '[วันนี้ เวลา] LT',
            nextDay: '[พรุ่งนี้ เวลา] LT',
            nextWeek: 'dddd[หน้า เวลา] LT',
            lastDay: '[เมื่อวานนี้ เวลา] LT',
            lastWeek: '[วัน]dddd[ที่แล้ว เวลา] LT',
            sameElse: 'L',
        },
        relativeTime: {
            future: 'อีก %s',
            past: '%sที่แล้ว',
            s: 'ไม่กี่วินาที',
            ss: '%d วินาที',
            m: '1 นาที',
            mm: '%d นาที',
            h: '1 ชั่วโมง',
            hh: '%d ชั่วโมง',
            d: '1 วัน',
            dd: '%d วัน',
            w: '1 สัปดาห์',
            ww: '%d สัปดาห์',
            M: '1 เดือน',
            MM: '%d เดือน',
            y: '1 ปี',
            yy: '%d ปี',
        },
    });
 
    return th;
 
})));
 
 
/***/ }),
/* 617 */
/***/ (function(module, exports, __webpack_require__) {
 
//! moment.js locale configuration
//! locale : Turkmen [tk]
//! author : Atamyrat Abdyrahmanov : https://github.com/atamyratabdy
 
;(function (global, factory) {
    true ? factory(__webpack_require__(3)) :
   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
   factory(global.moment)
}(this, (function (moment) { 'use strict';
 
    //! moment.js locale configuration
 
    var suffixes = {
        1: "'inji",
        5: "'inji",
        8: "'inji",
        70: "'inji",
        80: "'inji",
        2: "'nji",
        7: "'nji",
        20: "'nji",
        50: "'nji",
        3: "'ünji",
        4: "'ünji",
        100: "'ünji",
        6: "'njy",
        9: "'unjy",
        10: "'unjy",
        30: "'unjy",
        60: "'ynjy",
        90: "'ynjy",
    };
 
    var tk = moment.defineLocale('tk', {
        months: 'Ýanwar_Fewral_Mart_Aprel_Maý_Iýun_Iýul_Awgust_Sentýabr_Oktýabr_Noýabr_Dekabr'.split(
            '_'
        ),
        monthsShort: 'Ýan_Few_Mar_Apr_Maý_Iýn_Iýl_Awg_Sen_Okt_Noý_Dek'.split('_'),
        weekdays: 'Ýekşenbe_Duşenbe_Sişenbe_Çarşenbe_Penşenbe_Anna_Şenbe'.split(
            '_'
        ),
        weekdaysShort: 'Ýek_Duş_Siş_Çar_Pen_Ann_Şen'.split('_'),
        weekdaysMin: 'Ýk_Dş_Sş_Çr_Pn_An_Şn'.split('_'),
        longDateFormat: {
            LT: 'HH:mm',
            LTS: 'HH:mm:ss',
            L: 'DD.MM.YYYY',
            LL: 'D MMMM YYYY',
            LLL: 'D MMMM YYYY HH:mm',
            LLLL: 'dddd, D MMMM YYYY HH:mm',
        },
        calendar: {
            sameDay: '[bugün sagat] LT',
            nextDay: '[ertir sagat] LT',
            nextWeek: '[indiki] dddd [sagat] LT',
            lastDay: '[düýn] LT',
            lastWeek: '[geçen] dddd [sagat] LT',
            sameElse: 'L',
        },
        relativeTime: {
            future: '%s soň',
            past: '%s öň',
            s: 'birnäçe sekunt',
            m: 'bir minut',
            mm: '%d minut',
            h: 'bir sagat',
            hh: '%d sagat',
            d: 'bir gün',
            dd: '%d gün',
            M: 'bir aý',
            MM: '%d aý',
            y: 'bir ýyl',
            yy: '%d ýyl',
        },
        ordinal: function (number, period) {
            switch (period) {
                case 'd':
                case 'D':
                case 'Do':
                case 'DD':
                    return number;
                default:
                    if (number === 0) {
                        // special case for zero
                        return number + "'unjy";
                    }
                    var a = number % 10,
                        b = (number % 100) - a,
                        c = number >= 100 ? 100 : null;
                    return number + (suffixes[a] || suffixes[b] || suffixes[c]);
            }
        },
        week: {
            dow: 1, // Monday is the first day of the week.
            doy: 7, // The week that contains Jan 7th is the first week of the year.
        },
    });
 
    return tk;
 
})));
 
 
/***/ }),
/* 618 */
/***/ (function(module, exports, __webpack_require__) {
 
//! moment.js locale configuration
//! locale : Tagalog (Philippines) [tl-ph]
//! author : Dan Hagman : https://github.com/hagmandan
 
;(function (global, factory) {
    true ? factory(__webpack_require__(3)) :
   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
   factory(global.moment)
}(this, (function (moment) { 'use strict';
 
    //! moment.js locale configuration
 
    var tlPh = moment.defineLocale('tl-ph', {
        months: 'Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre'.split(
            '_'
        ),
        monthsShort: 'Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis'.split('_'),
        weekdays: 'Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado'.split(
            '_'
        ),
        weekdaysShort: 'Lin_Lun_Mar_Miy_Huw_Biy_Sab'.split('_'),
        weekdaysMin: 'Li_Lu_Ma_Mi_Hu_Bi_Sab'.split('_'),
        longDateFormat: {
            LT: 'HH:mm',
            LTS: 'HH:mm:ss',
            L: 'MM/D/YYYY',
            LL: 'MMMM D, YYYY',
            LLL: 'MMMM D, YYYY HH:mm',
            LLLL: 'dddd, MMMM DD, YYYY HH:mm',
        },
        calendar: {
            sameDay: 'LT [ngayong araw]',
            nextDay: '[Bukas ng] LT',
            nextWeek: 'LT [sa susunod na] dddd',
            lastDay: 'LT [kahapon]',
            lastWeek: 'LT [noong nakaraang] dddd',
            sameElse: 'L',
        },
        relativeTime: {
            future: 'sa loob ng %s',
            past: '%s ang nakalipas',
            s: 'ilang segundo',
            ss: '%d segundo',
            m: 'isang minuto',
            mm: '%d minuto',
            h: 'isang oras',
            hh: '%d oras',
            d: 'isang araw',
            dd: '%d araw',
            M: 'isang buwan',
            MM: '%d buwan',
            y: 'isang taon',
            yy: '%d taon',
        },
        dayOfMonthOrdinalParse: /\d{1,2}/,
        ordinal: function (number) {
            return number;
        },
        week: {
            dow: 1, // Monday is the first day of the week.
            doy: 4, // The week that contains Jan 4th is the first week of the year.
        },
    });
 
    return tlPh;
 
})));
 
 
/***/ }),
/* 619 */
/***/ (function(module, exports, __webpack_require__) {
 
//! moment.js locale configuration
//! locale : Klingon [tlh]
//! author : Dominika Kruk : https://github.com/amaranthrose
 
;(function (global, factory) {
    true ? factory(__webpack_require__(3)) :
   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
   factory(global.moment)
}(this, (function (moment) { 'use strict';
 
    //! moment.js locale configuration
 
    var numbersNouns = 'pagh_wa’_cha’_wej_loS_vagh_jav_Soch_chorgh_Hut'.split('_');
 
    function translateFuture(output) {
        var time = output;
        time =
            output.indexOf('jaj') !== -1
                ? time.slice(0, -3) + 'leS'
                : output.indexOf('jar') !== -1
                ? time.slice(0, -3) + 'waQ'
                : output.indexOf('DIS') !== -1
                ? time.slice(0, -3) + 'nem'
                : time + ' pIq';
        return time;
    }
 
    function translatePast(output) {
        var time = output;
        time =
            output.indexOf('jaj') !== -1
                ? time.slice(0, -3) + 'Hu’'
                : output.indexOf('jar') !== -1
                ? time.slice(0, -3) + 'wen'
                : output.indexOf('DIS') !== -1
                ? time.slice(0, -3) + 'ben'
                : time + ' ret';
        return time;
    }
 
    function translate(number, withoutSuffix, string, isFuture) {
        var numberNoun = numberAsNoun(number);
        switch (string) {
            case 'ss':
                return numberNoun + ' lup';
            case 'mm':
                return numberNoun + ' tup';
            case 'hh':
                return numberNoun + ' rep';
            case 'dd':
                return numberNoun + ' jaj';
            case 'MM':
                return numberNoun + ' jar';
            case 'yy':
                return numberNoun + ' DIS';
        }
    }
 
    function numberAsNoun(number) {
        var hundred = Math.floor((number % 1000) / 100),
            ten = Math.floor((number % 100) / 10),
            one = number % 10,
            word = '';
        if (hundred > 0) {
            word += numbersNouns[hundred] + 'vatlh';
        }
        if (ten > 0) {
            word += (word !== '' ? ' ' : '') + numbersNouns[ten] + 'maH';
        }
        if (one > 0) {
            word += (word !== '' ? ' ' : '') + numbersNouns[one];
        }
        return word === '' ? 'pagh' : word;
    }
 
    var tlh = moment.defineLocale('tlh', {
        months: 'tera’ jar wa’_tera’ jar cha’_tera’ jar wej_tera’ jar loS_tera’ jar vagh_tera’ jar jav_tera’ jar Soch_tera’ jar chorgh_tera’ jar Hut_tera’ jar wa’maH_tera’ jar wa’maH wa’_tera’ jar wa’maH cha’'.split(
            '_'
        ),
        monthsShort:
            'jar wa’_jar cha’_jar wej_jar loS_jar vagh_jar jav_jar Soch_jar chorgh_jar Hut_jar wa’maH_jar wa’maH wa’_jar wa’maH cha’'.split(
                '_'
            ),
        monthsParseExact: true,
        weekdays: 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split(
            '_'
        ),
        weekdaysShort:
            'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split('_'),
        weekdaysMin:
            'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split('_'),
        longDateFormat: {
            LT: 'HH:mm',
            LTS: 'HH:mm:ss',
            L: 'DD.MM.YYYY',
            LL: 'D MMMM YYYY',
            LLL: 'D MMMM YYYY HH:mm',
            LLLL: 'dddd, D MMMM YYYY HH:mm',
        },
        calendar: {
            sameDay: '[DaHjaj] LT',
            nextDay: '[wa’leS] LT',
            nextWeek: 'LLL',
            lastDay: '[wa’Hu’] LT',
            lastWeek: 'LLL',
            sameElse: 'L',
        },
        relativeTime: {
            future: translateFuture,
            past: translatePast,
            s: 'puS lup',
            ss: translate,
            m: 'wa’ tup',
            mm: translate,
            h: 'wa’ rep',
            hh: translate,
            d: 'wa’ jaj',
            dd: translate,
            M: 'wa’ jar',
            MM: translate,
            y: 'wa’ DIS',
            yy: translate,
        },
        dayOfMonthOrdinalParse: /\d{1,2}\./,
        ordinal: '%d.',
        week: {
            dow: 1, // Monday is the first day of the week.
            doy: 4, // The week that contains Jan 4th is the first week of the year.
        },
    });
 
    return tlh;
 
})));
 
 
/***/ }),
/* 620 */
/***/ (function(module, exports, __webpack_require__) {
 
//! moment.js locale configuration
//! locale : Turkish [tr]
//! authors : Erhan Gundogan : https://github.com/erhangundogan,
//!           Burak Yiğit Kaya: https://github.com/BYK
 
;(function (global, factory) {
    true ? factory(__webpack_require__(3)) :
   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
   factory(global.moment)
}(this, (function (moment) { 'use strict';
 
    //! moment.js locale configuration
 
    var suffixes = {
        1: "'inci",
        5: "'inci",
        8: "'inci",
        70: "'inci",
        80: "'inci",
        2: "'nci",
        7: "'nci",
        20: "'nci",
        50: "'nci",
        3: "'üncü",
        4: "'üncü",
        100: "'üncü",
        6: "'ncı",
        9: "'uncu",
        10: "'uncu",
        30: "'uncu",
        60: "'ıncı",
        90: "'ıncı",
    };
 
    var tr = moment.defineLocale('tr', {
        months: 'Ocak_Şubat_Mart_Nisan_Mayıs_Haziran_Temmuz_Ağustos_Eylül_Ekim_Kasım_Aralık'.split(
            '_'
        ),
        monthsShort: 'Oca_Şub_Mar_Nis_May_Haz_Tem_Ağu_Eyl_Eki_Kas_Ara'.split('_'),
        weekdays: 'Pazar_Pazartesi_Salı_Çarşamba_Perşembe_Cuma_Cumartesi'.split(
            '_'
        ),
        weekdaysShort: 'Paz_Pzt_Sal_Çar_Per_Cum_Cmt'.split('_'),
        weekdaysMin: 'Pz_Pt_Sa_Ça_Pe_Cu_Ct'.split('_'),
        meridiem: function (hours, minutes, isLower) {
            if (hours < 12) {
                return isLower ? 'öö' : 'ÖÖ';
            } else {
                return isLower ? 'ös' : 'ÖS';
            }
        },
        meridiemParse: /öö|ÖÖ|ös|ÖS/,
        isPM: function (input) {
            return input === 'ös' || input === 'ÖS';
        },
        longDateFormat: {
            LT: 'HH:mm',
            LTS: 'HH:mm:ss',
            L: 'DD.MM.YYYY',
            LL: 'D MMMM YYYY',
            LLL: 'D MMMM YYYY HH:mm',
            LLLL: 'dddd, D MMMM YYYY HH:mm',
        },
        calendar: {
            sameDay: '[bugün saat] LT',
            nextDay: '[yarın saat] LT',
            nextWeek: '[gelecek] dddd [saat] LT',
            lastDay: '[dün] LT',
            lastWeek: '[geçen] dddd [saat] LT',
            sameElse: 'L',
        },
        relativeTime: {
            future: '%s sonra',
            past: '%s önce',
            s: 'birkaç saniye',
            ss: '%d saniye',
            m: 'bir dakika',
            mm: '%d dakika',
            h: 'bir saat',
            hh: '%d saat',
            d: 'bir gün',
            dd: '%d gün',
            w: 'bir hafta',
            ww: '%d hafta',
            M: 'bir ay',
            MM: '%d ay',
            y: 'bir yıl',
            yy: '%d yıl',
        },
        ordinal: function (number, period) {
            switch (period) {
                case 'd':
                case 'D':
                case 'Do':
                case 'DD':
                    return number;
                default:
                    if (number === 0) {
                        // special case for zero
                        return number + "'ıncı";
                    }
                    var a = number % 10,
                        b = (number % 100) - a,
                        c = number >= 100 ? 100 : null;
                    return number + (suffixes[a] || suffixes[b] || suffixes[c]);
            }
        },
        week: {
            dow: 1, // Monday is the first day of the week.
            doy: 7, // The week that contains Jan 7th is the first week of the year.
        },
    });
 
    return tr;
 
})));
 
 
/***/ }),
/* 621 */
/***/ (function(module, exports, __webpack_require__) {
 
//! moment.js locale configuration
//! locale : Talossan [tzl]
//! author : Robin van der Vliet : https://github.com/robin0van0der0v
//! author : Iustì Canun
 
;(function (global, factory) {
    true ? factory(__webpack_require__(3)) :
   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
   factory(global.moment)
}(this, (function (moment) { 'use strict';
 
    //! moment.js locale configuration
 
    // After the year there should be a slash and the amount of years since December 26, 1979 in Roman numerals.
    // This is currently too difficult (maybe even impossible) to add.
    var tzl = moment.defineLocale('tzl', {
        months: 'Januar_Fevraglh_Març_Avrïu_Mai_Gün_Julia_Guscht_Setemvar_Listopäts_Noemvar_Zecemvar'.split(
            '_'
        ),
        monthsShort: 'Jan_Fev_Mar_Avr_Mai_Gün_Jul_Gus_Set_Lis_Noe_Zec'.split('_'),
        weekdays: 'Súladi_Lúneçi_Maitzi_Márcuri_Xhúadi_Viénerçi_Sáturi'.split('_'),
        weekdaysShort: 'Súl_Lún_Mai_Már_Xhú_Vié_Sát'.split('_'),
        weekdaysMin: 'Sú_Lú_Ma_Má_Xh_Vi_Sá'.split('_'),
        longDateFormat: {
            LT: 'HH.mm',
            LTS: 'HH.mm.ss',
            L: 'DD.MM.YYYY',
            LL: 'D. MMMM [dallas] YYYY',
            LLL: 'D. MMMM [dallas] YYYY HH.mm',
            LLLL: 'dddd, [li] D. MMMM [dallas] YYYY HH.mm',
        },
        meridiemParse: /d\'o|d\'a/i,
        isPM: function (input) {
            return "d'o" === input.toLowerCase();
        },
        meridiem: function (hours, minutes, isLower) {
            if (hours > 11) {
                return isLower ? "d'o" : "D'O";
            } else {
                return isLower ? "d'a" : "D'A";
            }
        },
        calendar: {
            sameDay: '[oxhi à] LT',
            nextDay: '[demà à] LT',
            nextWeek: 'dddd [à] LT',
            lastDay: '[ieiri à] LT',
            lastWeek: '[sür el] dddd [lasteu à] LT',
            sameElse: 'L',
        },
        relativeTime: {
            future: 'osprei %s',
            past: 'ja%s',
            s: processRelativeTime,
            ss: processRelativeTime,
            m: processRelativeTime,
            mm: processRelativeTime,
            h: processRelativeTime,
            hh: processRelativeTime,
            d: processRelativeTime,
            dd: processRelativeTime,
            M: processRelativeTime,
            MM: processRelativeTime,
            y: processRelativeTime,
            yy: processRelativeTime,
        },
        dayOfMonthOrdinalParse: /\d{1,2}\./,
        ordinal: '%d.',
        week: {
            dow: 1, // Monday is the first day of the week.
            doy: 4, // The week that contains Jan 4th is the first week of the year.
        },
    });
 
    function processRelativeTime(number, withoutSuffix, key, isFuture) {
        var format = {
            s: ['viensas secunds', "'iensas secunds"],
            ss: [number + ' secunds', '' + number + ' secunds'],
            m: ["'n míut", "'iens míut"],
            mm: [number + ' míuts', '' + number + ' míuts'],
            h: ["'n þora", "'iensa þora"],
            hh: [number + ' þoras', '' + number + ' þoras'],
            d: ["'n ziua", "'iensa ziua"],
            dd: [number + ' ziuas', '' + number + ' ziuas'],
            M: ["'n mes", "'iens mes"],
            MM: [number + ' mesen', '' + number + ' mesen'],
            y: ["'n ar", "'iens ar"],
            yy: [number + ' ars', '' + number + ' ars'],
        };
        return isFuture
            ? format[key][0]
            : withoutSuffix
            ? format[key][0]
            : format[key][1];
    }
 
    return tzl;
 
})));
 
 
/***/ }),
/* 622 */
/***/ (function(module, exports, __webpack_require__) {
 
//! moment.js locale configuration
//! locale : Central Atlas Tamazight [tzm]
//! author : Abdel Said : https://github.com/abdelsaid
 
;(function (global, factory) {
    true ? factory(__webpack_require__(3)) :
   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
   factory(global.moment)
}(this, (function (moment) { 'use strict';
 
    //! moment.js locale configuration
 
    var tzm = moment.defineLocale('tzm', {
        months: 'ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ'.split(
            '_'
        ),
        monthsShort:
            'ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ'.split(
                '_'
            ),
        weekdays: 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'),
        weekdaysShort: 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'),
        weekdaysMin: 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'),
        longDateFormat: {
            LT: 'HH:mm',
            LTS: 'HH:mm:ss',
            L: 'DD/MM/YYYY',
            LL: 'D MMMM YYYY',
            LLL: 'D MMMM YYYY HH:mm',
            LLLL: 'dddd D MMMM YYYY HH:mm',
        },
        calendar: {
            sameDay: '[ⴰⵙⴷⵅ ⴴ] LT',
            nextDay: '[ⴰⵙⴽⴰ ⴴ] LT',
            nextWeek: 'dddd [ⴴ] LT',
            lastDay: '[ⴰⵚⴰⵏⵜ ⴴ] LT',
            lastWeek: 'dddd [ⴴ] LT',
            sameElse: 'L',
        },
        relativeTime: {
            future: 'ⴷⴰⴷⵅ ⵙ ⵢⴰⵏ %s',
            past: 'ⵢⴰⵏ %s',
            s: 'ⵉⵎⵉⴽ',
            ss: '%d ⵉⵎⵉⴽ',
            m: 'ⵎⵉⵏⵓⴺ',
            mm: '%d ⵎⵉⵏⵓⴺ',
            h: 'ⵙⴰⵄⴰ',
            hh: '%d ⵜⴰⵙⵙⴰⵄⵉⵏ',
            d: 'ⴰⵙⵙ',
            dd: '%d oⵙⵙⴰⵏ',
            M: 'ⴰⵢoⵓⵔ',
            MM: '%d ⵉⵢⵢⵉⵔⵏ',
            y: 'ⴰⵙⴳⴰⵙ',
            yy: '%d ⵉⵙⴳⴰⵙⵏ',
        },
        week: {
            dow: 6, // Saturday is the first day of the week.
            doy: 12, // The week that contains Jan 12th is the first week of the year.
        },
    });
 
    return tzm;
 
})));
 
 
/***/ }),
/* 623 */
/***/ (function(module, exports, __webpack_require__) {
 
//! moment.js locale configuration
//! locale : Central Atlas Tamazight Latin [tzm-latn]
//! author : Abdel Said : https://github.com/abdelsaid
 
;(function (global, factory) {
    true ? factory(__webpack_require__(3)) :
   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
   factory(global.moment)
}(this, (function (moment) { 'use strict';
 
    //! moment.js locale configuration
 
    var tzmLatn = moment.defineLocale('tzm-latn', {
        months: 'innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir'.split(
            '_'
        ),
        monthsShort:
            'innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir'.split(
                '_'
            ),
        weekdays: 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'),
        weekdaysShort: 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'),
        weekdaysMin: 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'),
        longDateFormat: {
            LT: 'HH:mm',
            LTS: 'HH:mm:ss',
            L: 'DD/MM/YYYY',
            LL: 'D MMMM YYYY',
            LLL: 'D MMMM YYYY HH:mm',
            LLLL: 'dddd D MMMM YYYY HH:mm',
        },
        calendar: {
            sameDay: '[asdkh g] LT',
            nextDay: '[aska g] LT',
            nextWeek: 'dddd [g] LT',
            lastDay: '[assant g] LT',
            lastWeek: 'dddd [g] LT',
            sameElse: 'L',
        },
        relativeTime: {
            future: 'dadkh s yan %s',
            past: 'yan %s',
            s: 'imik',
            ss: '%d imik',
            m: 'minuḍ',
            mm: '%d minuḍ',
            h: 'saɛa',
            hh: '%d tassaɛin',
            d: 'ass',
            dd: '%d ossan',
            M: 'ayowr',
            MM: '%d iyyirn',
            y: 'asgas',
            yy: '%d isgasn',
        },
        week: {
            dow: 6, // Saturday is the first day of the week.
            doy: 12, // The week that contains Jan 12th is the first week of the year.
        },
    });
 
    return tzmLatn;
 
})));
 
 
/***/ }),
/* 624 */
/***/ (function(module, exports, __webpack_require__) {
 
//! moment.js locale configuration
//! locale : Uyghur (China) [ug-cn]
//! author: boyaq : https://github.com/boyaq
 
;(function (global, factory) {
    true ? factory(__webpack_require__(3)) :
   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
   factory(global.moment)
}(this, (function (moment) { 'use strict';
 
    //! moment.js locale configuration
 
    var ugCn = moment.defineLocale('ug-cn', {
        months: 'يانۋار_فېۋرال_مارت_ئاپرېل_ماي_ئىيۇن_ئىيۇل_ئاۋغۇست_سېنتەبىر_ئۆكتەبىر_نويابىر_دېكابىر'.split(
            '_'
        ),
        monthsShort:
            'يانۋار_فېۋرال_مارت_ئاپرېل_ماي_ئىيۇن_ئىيۇل_ئاۋغۇست_سېنتەبىر_ئۆكتەبىر_نويابىر_دېكابىر'.split(
                '_'
            ),
        weekdays: 'يەكشەنبە_دۈشەنبە_سەيشەنبە_چارشەنبە_پەيشەنبە_جۈمە_شەنبە'.split(
            '_'
        ),
        weekdaysShort: 'يە_دۈ_سە_چا_پە_جۈ_شە'.split('_'),
        weekdaysMin: 'يە_دۈ_سە_چا_پە_جۈ_شە'.split('_'),
        longDateFormat: {
            LT: 'HH:mm',
            LTS: 'HH:mm:ss',
            L: 'YYYY-MM-DD',
            LL: 'YYYY-يىلىM-ئاينىڭD-كۈنى',
            LLL: 'YYYY-يىلىM-ئاينىڭD-كۈنى، HH:mm',
            LLLL: 'dddd، YYYY-يىلىM-ئاينىڭD-كۈنى، HH:mm',
        },
        meridiemParse: /يېرىم كېچە|سەھەر|چۈشتىن بۇرۇن|چۈش|چۈشتىن كېيىن|كەچ/,
        meridiemHour: function (hour, meridiem) {
            if (hour === 12) {
                hour = 0;
            }
            if (
                meridiem === 'يېرىم كېچە' ||
                meridiem === 'سەھەر' ||
                meridiem === 'چۈشتىن بۇرۇن'
            ) {
                return hour;
            } else if (meridiem === 'چۈشتىن كېيىن' || meridiem === 'كەچ') {
                return hour + 12;
            } else {
                return hour >= 11 ? hour : hour + 12;
            }
        },
        meridiem: function (hour, minute, isLower) {
            var hm = hour * 100 + minute;
            if (hm < 600) {
                return 'يېرىم كېچە';
            } else if (hm < 900) {
                return 'سەھەر';
            } else if (hm < 1130) {
                return 'چۈشتىن بۇرۇن';
            } else if (hm < 1230) {
                return 'چۈش';
            } else if (hm < 1800) {
                return 'چۈشتىن كېيىن';
            } else {
                return 'كەچ';
            }
        },
        calendar: {
            sameDay: '[بۈگۈن سائەت] LT',
            nextDay: '[ئەتە سائەت] LT',
            nextWeek: '[كېلەركى] dddd [سائەت] LT',
            lastDay: '[تۆنۈگۈن] LT',
            lastWeek: '[ئالدىنقى] dddd [سائەت] LT',
            sameElse: 'L',
        },
        relativeTime: {
            future: '%s كېيىن',
            past: '%s بۇرۇن',
            s: 'نەچچە سېكونت',
            ss: '%d سېكونت',
            m: 'بىر مىنۇت',
            mm: '%d مىنۇت',
            h: 'بىر سائەت',
            hh: '%d سائەت',
            d: 'بىر كۈن',
            dd: '%d كۈن',
            M: 'بىر ئاي',
            MM: '%d ئاي',
            y: 'بىر يىل',
            yy: '%d يىل',
        },
 
        dayOfMonthOrdinalParse: /\d{1,2}(-كۈنى|-ئاي|-ھەپتە)/,
        ordinal: function (number, period) {
            switch (period) {
                case 'd':
                case 'D':
                case 'DDD':
                    return number + '-كۈنى';
                case 'w':
                case 'W':
                    return number + '-ھەپتە';
                default:
                    return number;
            }
        },
        preparse: function (string) {
            return string.replace(/،/g, ',');
        },
        postformat: function (string) {
            return string.replace(/,/g, '،');
        },
        week: {
            // GB/T 7408-1994《数据元和交换格式·信息交换·日期和时间表示法》与ISO 8601:1988等效
            dow: 1, // Monday is the first day of the week.
            doy: 7, // The week that contains Jan 1st is the first week of the year.
        },
    });
 
    return ugCn;
 
})));
 
 
/***/ }),
/* 625 */
/***/ (function(module, exports, __webpack_require__) {
 
//! moment.js locale configuration
//! locale : Ukrainian [uk]
//! author : zemlanin : https://github.com/zemlanin
//! Author : Menelion Elensúle : https://github.com/Oire
 
;(function (global, factory) {
    true ? factory(__webpack_require__(3)) :
   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
   factory(global.moment)
}(this, (function (moment) { 'use strict';
 
    //! moment.js locale configuration
 
    function plural(word, num) {
        var forms = word.split('_');
        return num % 10 === 1 && num % 100 !== 11
            ? forms[0]
            : num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20)
            ? forms[1]
            : forms[2];
    }
    function relativeTimeWithPlural(number, withoutSuffix, key) {
        var format = {
            ss: withoutSuffix ? 'секунда_секунди_секунд' : 'секунду_секунди_секунд',
            mm: withoutSuffix ? 'хвилина_хвилини_хвилин' : 'хвилину_хвилини_хвилин',
            hh: withoutSuffix ? 'година_години_годин' : 'годину_години_годин',
            dd: 'день_дні_днів',
            MM: 'місяць_місяці_місяців',
            yy: 'рік_роки_років',
        };
        if (key === 'm') {
            return withoutSuffix ? 'хвилина' : 'хвилину';
        } else if (key === 'h') {
            return withoutSuffix ? 'година' : 'годину';
        } else {
            return number + ' ' + plural(format[key], +number);
        }
    }
    function weekdaysCaseReplace(m, format) {
        var weekdays = {
                nominative:
                    'неділя_понеділок_вівторок_середа_четвер_п’ятниця_субота'.split(
                        '_'
                    ),
                accusative:
                    'неділю_понеділок_вівторок_середу_четвер_п’ятницю_суботу'.split(
                        '_'
                    ),
                genitive:
                    'неділі_понеділка_вівторка_середи_четверга_п’ятниці_суботи'.split(
                        '_'
                    ),
            },
            nounCase;
 
        if (m === true) {
            return weekdays['nominative']
                .slice(1, 7)
                .concat(weekdays['nominative'].slice(0, 1));
        }
        if (!m) {
            return weekdays['nominative'];
        }
 
        nounCase = /(\[[ВвУу]\]) ?dddd/.test(format)
            ? 'accusative'
            : /\[?(?:минулої|наступної)? ?\] ?dddd/.test(format)
            ? 'genitive'
            : 'nominative';
        return weekdays[nounCase][m.day()];
    }
    function processHoursFunction(str) {
        return function () {
            return str + 'о' + (this.hours() === 11 ? 'б' : '') + '] LT';
        };
    }
 
    var uk = moment.defineLocale('uk', {
        months: {
            format: 'січня_лютого_березня_квітня_травня_червня_липня_серпня_вересня_жовтня_листопада_грудня'.split(
                '_'
            ),
            standalone:
                'січень_лютий_березень_квітень_травень_червень_липень_серпень_вересень_жовтень_листопад_грудень'.split(
                    '_'
                ),
        },
        monthsShort: 'січ_лют_бер_квіт_трав_черв_лип_серп_вер_жовт_лист_груд'.split(
            '_'
        ),
        weekdays: weekdaysCaseReplace,
        weekdaysShort: 'нд_пн_вт_ср_чт_пт_сб'.split('_'),
        weekdaysMin: 'нд_пн_вт_ср_чт_пт_сб'.split('_'),
        longDateFormat: {
            LT: 'HH:mm',
            LTS: 'HH:mm:ss',
            L: 'DD.MM.YYYY',
            LL: 'D MMMM YYYY р.',
            LLL: 'D MMMM YYYY р., HH:mm',
            LLLL: 'dddd, D MMMM YYYY р., HH:mm',
        },
        calendar: {
            sameDay: processHoursFunction('[Сьогодні '),
            nextDay: processHoursFunction('[Завтра '),
            lastDay: processHoursFunction('[Вчора '),
            nextWeek: processHoursFunction('[У] dddd ['),
            lastWeek: function () {
                switch (this.day()) {
                    case 0:
                    case 3:
                    case 5:
                    case 6:
                        return processHoursFunction('[Минулої] dddd [').call(this);
                    case 1:
                    case 2:
                    case 4:
                        return processHoursFunction('[Минулого] dddd [').call(this);
                }
            },
            sameElse: 'L',
        },
        relativeTime: {
            future: 'за %s',
            past: '%s тому',
            s: 'декілька секунд',
            ss: relativeTimeWithPlural,
            m: relativeTimeWithPlural,
            mm: relativeTimeWithPlural,
            h: 'годину',
            hh: relativeTimeWithPlural,
            d: 'день',
            dd: relativeTimeWithPlural,
            M: 'місяць',
            MM: relativeTimeWithPlural,
            y: 'рік',
            yy: relativeTimeWithPlural,
        },
        // M. E.: those two are virtually unused but a user might want to implement them for his/her website for some reason
        meridiemParse: /ночі|ранку|дня|вечора/,
        isPM: function (input) {
            return /^(дня|вечора)$/.test(input);
        },
        meridiem: function (hour, minute, isLower) {
            if (hour < 4) {
                return 'ночі';
            } else if (hour < 12) {
                return 'ранку';
            } else if (hour < 17) {
                return 'дня';
            } else {
                return 'вечора';
            }
        },
        dayOfMonthOrdinalParse: /\d{1,2}-(й|го)/,
        ordinal: function (number, period) {
            switch (period) {
                case 'M':
                case 'd':
                case 'DDD':
                case 'w':
                case 'W':
                    return number + '-й';
                case 'D':
                    return number + '-го';
                default:
                    return number;
            }
        },
        week: {
            dow: 1, // Monday is the first day of the week.
            doy: 7, // The week that contains Jan 7th is the first week of the year.
        },
    });
 
    return uk;
 
})));
 
 
/***/ }),
/* 626 */
/***/ (function(module, exports, __webpack_require__) {
 
//! moment.js locale configuration
//! locale : Urdu [ur]
//! author : Sawood Alam : https://github.com/ibnesayeed
//! author : Zack : https://github.com/ZackVision
 
;(function (global, factory) {
    true ? factory(__webpack_require__(3)) :
   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
   factory(global.moment)
}(this, (function (moment) { 'use strict';
 
    //! moment.js locale configuration
 
    var months = [
            'جنوری',
            'فروری',
            'مارچ',
            'اپریل',
            'مئی',
            'جون',
            'جولائی',
            'اگست',
            'ستمبر',
            'اکتوبر',
            'نومبر',
            'دسمبر',
        ],
        days = ['اتوار', 'پیر', 'منگل', 'بدھ', 'جمعرات', 'جمعہ', 'ہفتہ'];
 
    var ur = moment.defineLocale('ur', {
        months: months,
        monthsShort: months,
        weekdays: days,
        weekdaysShort: days,
        weekdaysMin: days,
        longDateFormat: {
            LT: 'HH:mm',
            LTS: 'HH:mm:ss',
            L: 'DD/MM/YYYY',
            LL: 'D MMMM YYYY',
            LLL: 'D MMMM YYYY HH:mm',
            LLLL: 'dddd، D MMMM YYYY HH:mm',
        },
        meridiemParse: /صبح|شام/,
        isPM: function (input) {
            return 'شام' === input;
        },
        meridiem: function (hour, minute, isLower) {
            if (hour < 12) {
                return 'صبح';
            }
            return 'شام';
        },
        calendar: {
            sameDay: '[آج بوقت] LT',
            nextDay: '[کل بوقت] LT',
            nextWeek: 'dddd [بوقت] LT',
            lastDay: '[گذشتہ روز بوقت] LT',
            lastWeek: '[گذشتہ] dddd [بوقت] LT',
            sameElse: 'L',
        },
        relativeTime: {
            future: '%s بعد',
            past: '%s قبل',
            s: 'چند سیکنڈ',
            ss: '%d سیکنڈ',
            m: 'ایک منٹ',
            mm: '%d منٹ',
            h: 'ایک گھنٹہ',
            hh: '%d گھنٹے',
            d: 'ایک دن',
            dd: '%d دن',
            M: 'ایک ماہ',
            MM: '%d ماہ',
            y: 'ایک سال',
            yy: '%d سال',
        },
        preparse: function (string) {
            return string.replace(/،/g, ',');
        },
        postformat: function (string) {
            return string.replace(/,/g, '،');
        },
        week: {
            dow: 1, // Monday is the first day of the week.
            doy: 4, // The week that contains Jan 4th is the first week of the year.
        },
    });
 
    return ur;
 
})));
 
 
/***/ }),
/* 627 */
/***/ (function(module, exports, __webpack_require__) {
 
//! moment.js locale configuration
//! locale : Uzbek [uz]
//! author : Sardor Muminov : https://github.com/muminoff
 
;(function (global, factory) {
    true ? factory(__webpack_require__(3)) :
   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
   factory(global.moment)
}(this, (function (moment) { 'use strict';
 
    //! moment.js locale configuration
 
    var uz = moment.defineLocale('uz', {
        months: 'январ_феврал_март_апрел_май_июн_июл_август_сентябр_октябр_ноябр_декабр'.split(
            '_'
        ),
        monthsShort: 'янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек'.split('_'),
        weekdays: 'Якшанба_Душанба_Сешанба_Чоршанба_Пайшанба_Жума_Шанба'.split('_'),
        weekdaysShort: 'Якш_Душ_Сеш_Чор_Пай_Жум_Шан'.split('_'),
        weekdaysMin: 'Як_Ду_Се_Чо_Па_Жу_Ша'.split('_'),
        longDateFormat: {
            LT: 'HH:mm',
            LTS: 'HH:mm:ss',
            L: 'DD/MM/YYYY',
            LL: 'D MMMM YYYY',
            LLL: 'D MMMM YYYY HH:mm',
            LLLL: 'D MMMM YYYY, dddd HH:mm',
        },
        calendar: {
            sameDay: '[Бугун соат] LT [да]',
            nextDay: '[Эртага] LT [да]',
            nextWeek: 'dddd [куни соат] LT [да]',
            lastDay: '[Кеча соат] LT [да]',
            lastWeek: '[Утган] dddd [куни соат] LT [да]',
            sameElse: 'L',
        },
        relativeTime: {
            future: 'Якин %s ичида',
            past: 'Бир неча %s олдин',
            s: 'фурсат',
            ss: '%d фурсат',
            m: 'бир дакика',
            mm: '%d дакика',
            h: 'бир соат',
            hh: '%d соат',
            d: 'бир кун',
            dd: '%d кун',
            M: 'бир ой',
            MM: '%d ой',
            y: 'бир йил',
            yy: '%d йил',
        },
        week: {
            dow: 1, // Monday is the first day of the week.
            doy: 7, // The week that contains Jan 4th is the first week of the year.
        },
    });
 
    return uz;
 
})));
 
 
/***/ }),
/* 628 */
/***/ (function(module, exports, __webpack_require__) {
 
//! moment.js locale configuration
//! locale : Uzbek Latin [uz-latn]
//! author : Rasulbek Mirzayev : github.com/Rasulbeeek
 
;(function (global, factory) {
    true ? factory(__webpack_require__(3)) :
   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
   factory(global.moment)
}(this, (function (moment) { 'use strict';
 
    //! moment.js locale configuration
 
    var uzLatn = moment.defineLocale('uz-latn', {
        months: 'Yanvar_Fevral_Mart_Aprel_May_Iyun_Iyul_Avgust_Sentabr_Oktabr_Noyabr_Dekabr'.split(
            '_'
        ),
        monthsShort: 'Yan_Fev_Mar_Apr_May_Iyun_Iyul_Avg_Sen_Okt_Noy_Dek'.split('_'),
        weekdays:
            'Yakshanba_Dushanba_Seshanba_Chorshanba_Payshanba_Juma_Shanba'.split(
                '_'
            ),
        weekdaysShort: 'Yak_Dush_Sesh_Chor_Pay_Jum_Shan'.split('_'),
        weekdaysMin: 'Ya_Du_Se_Cho_Pa_Ju_Sha'.split('_'),
        longDateFormat: {
            LT: 'HH:mm',
            LTS: 'HH:mm:ss',
            L: 'DD/MM/YYYY',
            LL: 'D MMMM YYYY',
            LLL: 'D MMMM YYYY HH:mm',
            LLLL: 'D MMMM YYYY, dddd HH:mm',
        },
        calendar: {
            sameDay: '[Bugun soat] LT [da]',
            nextDay: '[Ertaga] LT [da]',
            nextWeek: 'dddd [kuni soat] LT [da]',
            lastDay: '[Kecha soat] LT [da]',
            lastWeek: "[O'tgan] dddd [kuni soat] LT [da]",
            sameElse: 'L',
        },
        relativeTime: {
            future: 'Yaqin %s ichida',
            past: 'Bir necha %s oldin',
            s: 'soniya',
            ss: '%d soniya',
            m: 'bir daqiqa',
            mm: '%d daqiqa',
            h: 'bir soat',
            hh: '%d soat',
            d: 'bir kun',
            dd: '%d kun',
            M: 'bir oy',
            MM: '%d oy',
            y: 'bir yil',
            yy: '%d yil',
        },
        week: {
            dow: 1, // Monday is the first day of the week.
            doy: 7, // The week that contains Jan 7th is the first week of the year.
        },
    });
 
    return uzLatn;
 
})));
 
 
/***/ }),
/* 629 */
/***/ (function(module, exports, __webpack_require__) {
 
//! moment.js locale configuration
//! locale : Vietnamese [vi]
//! author : Bang Nguyen : https://github.com/bangnk
//! author : Chien Kira : https://github.com/chienkira
 
;(function (global, factory) {
    true ? factory(__webpack_require__(3)) :
   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
   factory(global.moment)
}(this, (function (moment) { 'use strict';
 
    //! moment.js locale configuration
 
    var vi = moment.defineLocale('vi', {
        months: 'tháng 1_tháng 2_tháng 3_tháng 4_tháng 5_tháng 6_tháng 7_tháng 8_tháng 9_tháng 10_tháng 11_tháng 12'.split(
            '_'
        ),
        monthsShort:
            'Thg 01_Thg 02_Thg 03_Thg 04_Thg 05_Thg 06_Thg 07_Thg 08_Thg 09_Thg 10_Thg 11_Thg 12'.split(
                '_'
            ),
        monthsParseExact: true,
        weekdays: 'chủ nhật_thứ hai_thứ ba_thứ tư_thứ năm_thứ sáu_thứ bảy'.split(
            '_'
        ),
        weekdaysShort: 'CN_T2_T3_T4_T5_T6_T7'.split('_'),
        weekdaysMin: 'CN_T2_T3_T4_T5_T6_T7'.split('_'),
        weekdaysParseExact: true,
        meridiemParse: /sa|ch/i,
        isPM: function (input) {
            return /^ch$/i.test(input);
        },
        meridiem: function (hours, minutes, isLower) {
            if (hours < 12) {
                return isLower ? 'sa' : 'SA';
            } else {
                return isLower ? 'ch' : 'CH';
            }
        },
        longDateFormat: {
            LT: 'HH:mm',
            LTS: 'HH:mm:ss',
            L: 'DD/MM/YYYY',
            LL: 'D MMMM [năm] YYYY',
            LLL: 'D MMMM [năm] YYYY HH:mm',
            LLLL: 'dddd, D MMMM [năm] YYYY HH:mm',
            l: 'DD/M/YYYY',
            ll: 'D MMM YYYY',
            lll: 'D MMM YYYY HH:mm',
            llll: 'ddd, D MMM YYYY HH:mm',
        },
        calendar: {
            sameDay: '[Hôm nay lúc] LT',
            nextDay: '[Ngày mai lúc] LT',
            nextWeek: 'dddd [tuần tới lúc] LT',
            lastDay: '[Hôm qua lúc] LT',
            lastWeek: 'dddd [tuần trước lúc] LT',
            sameElse: 'L',
        },
        relativeTime: {
            future: '%s tới',
            past: '%s trước',
            s: 'vài giây',
            ss: '%d giây',
            m: 'một phút',
            mm: '%d phút',
            h: 'một giờ',
            hh: '%d giờ',
            d: 'một ngày',
            dd: '%d ngày',
            w: 'một tuần',
            ww: '%d tuần',
            M: 'một tháng',
            MM: '%d tháng',
            y: 'một năm',
            yy: '%d năm',
        },
        dayOfMonthOrdinalParse: /\d{1,2}/,
        ordinal: function (number) {
            return number;
        },
        week: {
            dow: 1, // Monday is the first day of the week.
            doy: 4, // The week that contains Jan 4th is the first week of the year.
        },
    });
 
    return vi;
 
})));
 
 
/***/ }),
/* 630 */
/***/ (function(module, exports, __webpack_require__) {
 
//! moment.js locale configuration
//! locale : Pseudo [x-pseudo]
//! author : Andrew Hood : https://github.com/andrewhood125
 
;(function (global, factory) {
    true ? factory(__webpack_require__(3)) :
   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
   factory(global.moment)
}(this, (function (moment) { 'use strict';
 
    //! moment.js locale configuration
 
    var xPseudo = moment.defineLocale('x-pseudo', {
        months: 'J~áñúá~rý_F~ébrú~árý_~Márc~h_Áp~ríl_~Máý_~Júñé~_Júl~ý_Áú~gúst~_Sép~témb~ér_Ó~ctób~ér_Ñ~óvém~bér_~Décé~mbér'.split(
            '_'
        ),
        monthsShort:
            'J~áñ_~Féb_~Már_~Ápr_~Máý_~Júñ_~Júl_~Áúg_~Sép_~Óct_~Ñóv_~Déc'.split(
                '_'
            ),
        monthsParseExact: true,
        weekdays:
            'S~úñdá~ý_Mó~ñdáý~_Túé~sdáý~_Wéd~ñésd~áý_T~húrs~dáý_~Fríd~áý_S~átúr~dáý'.split(
                '_'
            ),
        weekdaysShort: 'S~úñ_~Móñ_~Túé_~Wéd_~Thú_~Frí_~Sát'.split('_'),
        weekdaysMin: 'S~ú_Mó~_Tú_~Wé_T~h_Fr~_Sá'.split('_'),
        weekdaysParseExact: true,
        longDateFormat: {
            LT: 'HH:mm',
            L: 'DD/MM/YYYY',
            LL: 'D MMMM YYYY',
            LLL: 'D MMMM YYYY HH:mm',
            LLLL: 'dddd, D MMMM YYYY HH:mm',
        },
        calendar: {
            sameDay: '[T~ódá~ý át] LT',
            nextDay: '[T~ómó~rró~w át] LT',
            nextWeek: 'dddd [át] LT',
            lastDay: '[Ý~ést~érdá~ý át] LT',
            lastWeek: '[L~ást] dddd [át] LT',
            sameElse: 'L',
        },
        relativeTime: {
            future: 'í~ñ %s',
            past: '%s á~gó',
            s: 'á ~féw ~sécó~ñds',
            ss: '%d s~écóñ~ds',
            m: 'á ~míñ~úté',
            mm: '%d m~íñú~tés',
            h: 'á~ñ hó~úr',
            hh: '%d h~óúrs',
            d: 'á ~dáý',
            dd: '%d d~áýs',
            M: 'á ~móñ~th',
            MM: '%d m~óñt~hs',
            y: 'á ~ýéár',
            yy: '%d ý~éárs',
        },
        dayOfMonthOrdinalParse: /\d{1,2}(th|st|nd|rd)/,
        ordinal: function (number) {
            var b = number % 10,
                output =
                    ~~((number % 100) / 10) === 1
                        ? 'th'
                        : b === 1
                        ? 'st'
                        : b === 2
                        ? 'nd'
                        : b === 3
                        ? 'rd'
                        : 'th';
            return number + output;
        },
        week: {
            dow: 1, // Monday is the first day of the week.
            doy: 4, // The week that contains Jan 4th is the first week of the year.
        },
    });
 
    return xPseudo;
 
})));
 
 
/***/ }),
/* 631 */
/***/ (function(module, exports, __webpack_require__) {
 
//! moment.js locale configuration
//! locale : Yoruba Nigeria [yo]
//! author : Atolagbe Abisoye : https://github.com/andela-batolagbe
 
;(function (global, factory) {
    true ? factory(__webpack_require__(3)) :
   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
   factory(global.moment)
}(this, (function (moment) { 'use strict';
 
    //! moment.js locale configuration
 
    var yo = moment.defineLocale('yo', {
        months: 'Sẹ́rẹ́_Èrèlè_Ẹrẹ̀nà_Ìgbé_Èbibi_Òkùdu_Agẹmo_Ògún_Owewe_Ọ̀wàrà_Bélú_Ọ̀pẹ̀̀'.split(
            '_'
        ),
        monthsShort: 'Sẹ́r_Èrl_Ẹrn_Ìgb_Èbi_Òkù_Agẹ_Ògú_Owe_Ọ̀wà_Bél_Ọ̀pẹ̀̀'.split('_'),
        weekdays: 'Àìkú_Ajé_Ìsẹ́gun_Ọjọ́rú_Ọjọ́bọ_Ẹtì_Àbámẹ́ta'.split('_'),
        weekdaysShort: 'Àìk_Ajé_Ìsẹ́_Ọjr_Ọjb_Ẹtì_Àbá'.split('_'),
        weekdaysMin: 'Àì_Aj_Ìs_Ọr_Ọb_Ẹt_Àb'.split('_'),
        longDateFormat: {
            LT: 'h:mm A',
            LTS: 'h:mm:ss A',
            L: 'DD/MM/YYYY',
            LL: 'D MMMM YYYY',
            LLL: 'D MMMM YYYY h:mm A',
            LLLL: 'dddd, D MMMM YYYY h:mm A',
        },
        calendar: {
            sameDay: '[Ònì ni] LT',
            nextDay: '[Ọ̀la ni] LT',
            nextWeek: "dddd [Ọsẹ̀ tón'bọ] [ni] LT",
            lastDay: '[Àna ni] LT',
            lastWeek: 'dddd [Ọsẹ̀ tólọ́] [ni] LT',
            sameElse: 'L',
        },
        relativeTime: {
            future: 'ní %s',
            past: '%s kọjá',
            s: 'ìsẹjú aayá die',
            ss: 'aayá %d',
            m: 'ìsẹjú kan',
            mm: 'ìsẹjú %d',
            h: 'wákati kan',
            hh: 'wákati %d',
            d: 'ọjọ́ kan',
            dd: 'ọjọ́ %d',
            M: 'osù kan',
            MM: 'osù %d',
            y: 'ọdún kan',
            yy: 'ọdún %d',
        },
        dayOfMonthOrdinalParse: /ọjọ́\s\d{1,2}/,
        ordinal: 'ọjọ́ %d',
        week: {
            dow: 1, // Monday is the first day of the week.
            doy: 4, // The week that contains Jan 4th is the first week of the year.
        },
    });
 
    return yo;
 
})));
 
 
/***/ }),
/* 632 */
/***/ (function(module, exports, __webpack_require__) {
 
//! moment.js locale configuration
//! locale : Chinese (China) [zh-cn]
//! author : suupic : https://github.com/suupic
//! author : Zeno Zeng : https://github.com/zenozeng
//! author : uu109 : https://github.com/uu109
 
;(function (global, factory) {
    true ? factory(__webpack_require__(3)) :
   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
   factory(global.moment)
}(this, (function (moment) { 'use strict';
 
    //! moment.js locale configuration
 
    var zhCn = moment.defineLocale('zh-cn', {
        months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split(
            '_'
        ),
        monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split(
            '_'
        ),
        weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),
        weekdaysShort: '周日_周一_周二_周三_周四_周五_周六'.split('_'),
        weekdaysMin: '日_一_二_三_四_五_六'.split('_'),
        longDateFormat: {
            LT: 'HH:mm',
            LTS: 'HH:mm:ss',
            L: 'YYYY/MM/DD',
            LL: 'YYYY年M月D日',
            LLL: 'YYYY年M月D日Ah点mm分',
            LLLL: 'YYYY年M月D日ddddAh点mm分',
            l: 'YYYY/M/D',
            ll: 'YYYY年M月D日',
            lll: 'YYYY年M月D日 HH:mm',
            llll: 'YYYY年M月D日dddd HH:mm',
        },
        meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,
        meridiemHour: function (hour, meridiem) {
            if (hour === 12) {
                hour = 0;
            }
            if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') {
                return hour;
            } else if (meridiem === '下午' || meridiem === '晚上') {
                return hour + 12;
            } else {
                // '中午'
                return hour >= 11 ? hour : hour + 12;
            }
        },
        meridiem: function (hour, minute, isLower) {
            var hm = hour * 100 + minute;
            if (hm < 600) {
                return '凌晨';
            } else if (hm < 900) {
                return '早上';
            } else if (hm < 1130) {
                return '上午';
            } else if (hm < 1230) {
                return '中午';
            } else if (hm < 1800) {
                return '下午';
            } else {
                return '晚上';
            }
        },
        calendar: {
            sameDay: '[今天]LT',
            nextDay: '[明天]LT',
            nextWeek: function (now) {
                if (now.week() !== this.week()) {
                    return '[下]dddLT';
                } else {
                    return '[本]dddLT';
                }
            },
            lastDay: '[昨天]LT',
            lastWeek: function (now) {
                if (this.week() !== now.week()) {
                    return '[上]dddLT';
                } else {
                    return '[本]dddLT';
                }
            },
            sameElse: 'L',
        },
        dayOfMonthOrdinalParse: /\d{1,2}(日|月|周)/,
        ordinal: function (number, period) {
            switch (period) {
                case 'd':
                case 'D':
                case 'DDD':
                    return number + '日';
                case 'M':
                    return number + '月';
                case 'w':
                case 'W':
                    return number + '周';
                default:
                    return number;
            }
        },
        relativeTime: {
            future: '%s后',
            past: '%s前',
            s: '几秒',
            ss: '%d 秒',
            m: '1 分钟',
            mm: '%d 分钟',
            h: '1 小时',
            hh: '%d 小时',
            d: '1 天',
            dd: '%d 天',
            w: '1 周',
            ww: '%d 周',
            M: '1 个月',
            MM: '%d 个月',
            y: '1 年',
            yy: '%d 年',
        },
        week: {
            // GB/T 7408-1994《数据元和交换格式·信息交换·日期和时间表示法》与ISO 8601:1988等效
            dow: 1, // Monday is the first day of the week.
            doy: 4, // The week that contains Jan 4th is the first week of the year.
        },
    });
 
    return zhCn;
 
})));
 
 
/***/ }),
/* 633 */
/***/ (function(module, exports, __webpack_require__) {
 
//! moment.js locale configuration
//! locale : Chinese (Hong Kong) [zh-hk]
//! author : Ben : https://github.com/ben-lin
//! author : Chris Lam : https://github.com/hehachris
//! author : Konstantin : https://github.com/skfd
//! author : Anthony : https://github.com/anthonylau
 
;(function (global, factory) {
    true ? factory(__webpack_require__(3)) :
   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
   factory(global.moment)
}(this, (function (moment) { 'use strict';
 
    //! moment.js locale configuration
 
    var zhHk = moment.defineLocale('zh-hk', {
        months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split(
            '_'
        ),
        monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split(
            '_'
        ),
        weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),
        weekdaysShort: '週日_週一_週二_週三_週四_週五_週六'.split('_'),
        weekdaysMin: '日_一_二_三_四_五_六'.split('_'),
        longDateFormat: {
            LT: 'HH:mm',
            LTS: 'HH:mm:ss',
            L: 'YYYY/MM/DD',
            LL: 'YYYY年M月D日',
            LLL: 'YYYY年M月D日 HH:mm',
            LLLL: 'YYYY年M月D日dddd HH:mm',
            l: 'YYYY/M/D',
            ll: 'YYYY年M月D日',
            lll: 'YYYY年M月D日 HH:mm',
            llll: 'YYYY年M月D日dddd HH:mm',
        },
        meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,
        meridiemHour: function (hour, meridiem) {
            if (hour === 12) {
                hour = 0;
            }
            if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') {
                return hour;
            } else if (meridiem === '中午') {
                return hour >= 11 ? hour : hour + 12;
            } else if (meridiem === '下午' || meridiem === '晚上') {
                return hour + 12;
            }
        },
        meridiem: function (hour, minute, isLower) {
            var hm = hour * 100 + minute;
            if (hm < 600) {
                return '凌晨';
            } else if (hm < 900) {
                return '早上';
            } else if (hm < 1200) {
                return '上午';
            } else if (hm === 1200) {
                return '中午';
            } else if (hm < 1800) {
                return '下午';
            } else {
                return '晚上';
            }
        },
        calendar: {
            sameDay: '[今天]LT',
            nextDay: '[明天]LT',
            nextWeek: '[下]ddddLT',
            lastDay: '[昨天]LT',
            lastWeek: '[上]ddddLT',
            sameElse: 'L',
        },
        dayOfMonthOrdinalParse: /\d{1,2}(日|月|週)/,
        ordinal: function (number, period) {
            switch (period) {
                case 'd':
                case 'D':
                case 'DDD':
                    return number + '日';
                case 'M':
                    return number + '月';
                case 'w':
                case 'W':
                    return number + '週';
                default:
                    return number;
            }
        },
        relativeTime: {
            future: '%s後',
            past: '%s前',
            s: '幾秒',
            ss: '%d 秒',
            m: '1 分鐘',
            mm: '%d 分鐘',
            h: '1 小時',
            hh: '%d 小時',
            d: '1 天',
            dd: '%d 天',
            M: '1 個月',
            MM: '%d 個月',
            y: '1 年',
            yy: '%d 年',
        },
    });
 
    return zhHk;
 
})));
 
 
/***/ }),
/* 634 */
/***/ (function(module, exports, __webpack_require__) {
 
//! moment.js locale configuration
//! locale : Chinese (Macau) [zh-mo]
//! author : Ben : https://github.com/ben-lin
//! author : Chris Lam : https://github.com/hehachris
//! author : Tan Yuanhong : https://github.com/le0tan
 
;(function (global, factory) {
    true ? factory(__webpack_require__(3)) :
   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
   factory(global.moment)
}(this, (function (moment) { 'use strict';
 
    //! moment.js locale configuration
 
    var zhMo = moment.defineLocale('zh-mo', {
        months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split(
            '_'
        ),
        monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split(
            '_'
        ),
        weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),
        weekdaysShort: '週日_週一_週二_週三_週四_週五_週六'.split('_'),
        weekdaysMin: '日_一_二_三_四_五_六'.split('_'),
        longDateFormat: {
            LT: 'HH:mm',
            LTS: 'HH:mm:ss',
            L: 'DD/MM/YYYY',
            LL: 'YYYY年M月D日',
            LLL: 'YYYY年M月D日 HH:mm',
            LLLL: 'YYYY年M月D日dddd HH:mm',
            l: 'D/M/YYYY',
            ll: 'YYYY年M月D日',
            lll: 'YYYY年M月D日 HH:mm',
            llll: 'YYYY年M月D日dddd HH:mm',
        },
        meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,
        meridiemHour: function (hour, meridiem) {
            if (hour === 12) {
                hour = 0;
            }
            if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') {
                return hour;
            } else if (meridiem === '中午') {
                return hour >= 11 ? hour : hour + 12;
            } else if (meridiem === '下午' || meridiem === '晚上') {
                return hour + 12;
            }
        },
        meridiem: function (hour, minute, isLower) {
            var hm = hour * 100 + minute;
            if (hm < 600) {
                return '凌晨';
            } else if (hm < 900) {
                return '早上';
            } else if (hm < 1130) {
                return '上午';
            } else if (hm < 1230) {
                return '中午';
            } else if (hm < 1800) {
                return '下午';
            } else {
                return '晚上';
            }
        },
        calendar: {
            sameDay: '[今天] LT',
            nextDay: '[明天] LT',
            nextWeek: '[下]dddd LT',
            lastDay: '[昨天] LT',
            lastWeek: '[上]dddd LT',
            sameElse: 'L',
        },
        dayOfMonthOrdinalParse: /\d{1,2}(日|月|週)/,
        ordinal: function (number, period) {
            switch (period) {
                case 'd':
                case 'D':
                case 'DDD':
                    return number + '日';
                case 'M':
                    return number + '月';
                case 'w':
                case 'W':
                    return number + '週';
                default:
                    return number;
            }
        },
        relativeTime: {
            future: '%s內',
            past: '%s前',
            s: '幾秒',
            ss: '%d 秒',
            m: '1 分鐘',
            mm: '%d 分鐘',
            h: '1 小時',
            hh: '%d 小時',
            d: '1 天',
            dd: '%d 天',
            M: '1 個月',
            MM: '%d 個月',
            y: '1 年',
            yy: '%d 年',
        },
    });
 
    return zhMo;
 
})));
 
 
/***/ }),
/* 635 */
/***/ (function(module, exports, __webpack_require__) {
 
//! moment.js locale configuration
//! locale : Chinese (Taiwan) [zh-tw]
//! author : Ben : https://github.com/ben-lin
//! author : Chris Lam : https://github.com/hehachris
 
;(function (global, factory) {
    true ? factory(__webpack_require__(3)) :
   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
   factory(global.moment)
}(this, (function (moment) { 'use strict';
 
    //! moment.js locale configuration
 
    var zhTw = moment.defineLocale('zh-tw', {
        months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split(
            '_'
        ),
        monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split(
            '_'
        ),
        weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),
        weekdaysShort: '週日_週一_週二_週三_週四_週五_週六'.split('_'),
        weekdaysMin: '日_一_二_三_四_五_六'.split('_'),
        longDateFormat: {
            LT: 'HH:mm',
            LTS: 'HH:mm:ss',
            L: 'YYYY/MM/DD',
            LL: 'YYYY年M月D日',
            LLL: 'YYYY年M月D日 HH:mm',
            LLLL: 'YYYY年M月D日dddd HH:mm',
            l: 'YYYY/M/D',
            ll: 'YYYY年M月D日',
            lll: 'YYYY年M月D日 HH:mm',
            llll: 'YYYY年M月D日dddd HH:mm',
        },
        meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,
        meridiemHour: function (hour, meridiem) {
            if (hour === 12) {
                hour = 0;
            }
            if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') {
                return hour;
            } else if (meridiem === '中午') {
                return hour >= 11 ? hour : hour + 12;
            } else if (meridiem === '下午' || meridiem === '晚上') {
                return hour + 12;
            }
        },
        meridiem: function (hour, minute, isLower) {
            var hm = hour * 100 + minute;
            if (hm < 600) {
                return '凌晨';
            } else if (hm < 900) {
                return '早上';
            } else if (hm < 1130) {
                return '上午';
            } else if (hm < 1230) {
                return '中午';
            } else if (hm < 1800) {
                return '下午';
            } else {
                return '晚上';
            }
        },
        calendar: {
            sameDay: '[今天] LT',
            nextDay: '[明天] LT',
            nextWeek: '[下]dddd LT',
            lastDay: '[昨天] LT',
            lastWeek: '[上]dddd LT',
            sameElse: 'L',
        },
        dayOfMonthOrdinalParse: /\d{1,2}(日|月|週)/,
        ordinal: function (number, period) {
            switch (period) {
                case 'd':
                case 'D':
                case 'DDD':
                    return number + '日';
                case 'M':
                    return number + '月';
                case 'w':
                case 'W':
                    return number + '週';
                default:
                    return number;
            }
        },
        relativeTime: {
            future: '%s後',
            past: '%s前',
            s: '幾秒',
            ss: '%d 秒',
            m: '1 分鐘',
            mm: '%d 分鐘',
            h: '1 小時',
            hh: '%d 小時',
            d: '1 天',
            dd: '%d 天',
            M: '1 個月',
            MM: '%d 個月',
            y: '1 年',
            yy: '%d 年',
        },
    });
 
    return zhTw;
 
})));
 
 
/***/ }),
/* 636 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Utils_1 = __webpack_require__(5);
var Strings_1 = __webpack_require__(4);
var _ = __webpack_require__(1);
var EmailUtils = /** @class */ (function () {
    function EmailUtils() {
    }
    EmailUtils.splitSemicolonSeparatedListOfEmailAddresses = function (addresses) {
        var addressesAsList = addresses.split(/\s*;\s*/);
        return _.filter(addressesAsList, function (s) {
            return Utils_1.Utils.exists(s) && Utils_1.Utils.isNonEmptyString(Utils_1.Utils.trim(s));
        });
    };
    EmailUtils.emailAddressesToHyperlinks = function (addresses, companyDomain, me, lengthLimit, truncateName) {
        Iif (lengthLimit === void 0) { lengthLimit = 2; }
        Iif (truncateName === void 0) { truncateName = false; }
        addresses = _.filter(addresses, function (s) {
            return Utils_1.Utils.exists(s) && Utils_1.Utils.isNonEmptyString(Utils_1.Utils.trim(s));
        });
        var hyperlinks = _.map(addresses, function (item) {
            var emailArray = EmailUtils.parseEmail(item);
            var email = emailArray[1];
            var name = emailArray[0];
            if (Utils_1.Utils.exists(me) && email == me) {
                name = Strings_1.l('Me');
            }
            Iif (truncateName) {
                var split = name.split(' ');
                if (!Utils_1.Utils.isNullOrUndefined(split[1])) {
                    name = split[0] + ' ' + split[1].substring(0, 1) + '.';
                }
            }
            var domainIndex = email.indexOf('@') >= 0 ? email.indexOf('@') + 1 : 0;
            var domain = email.substr(domainIndex);
            Iif (Utils_1.Utils.exists(companyDomain) && domain != companyDomain) {
                name += ' (' + domain + ')';
            }
            return '<a title="' + item.replace(/'/g, '&quot;') + '" href="mailto:' + encodeURI(email) + '">' + name + '</a>';
        });
        var excess = hyperlinks.length - lengthLimit;
        var andOthers = excess > 0 ? EmailUtils.buildEmailAddressesAndOthers(_.last(hyperlinks, excess)) : '';
        return _.first(hyperlinks, lengthLimit).join(', ') + andOthers;
    };
    EmailUtils.buildEmailAddressesAndOthers = function (excessHyperLinks) {
        return ('<span class="coveo-emails-excess-collapsed coveo-active" onclick="Coveo.TemplateHelpers.getHelper(\'excessEmailToggle\')(this);"> ' +
            Strings_1.l('AndOthers', excessHyperLinks.length.toString(), excessHyperLinks.length) +
            '</span>' +
            '<span class="coveo-emails-excess-expanded"> , ' +
            excessHyperLinks.join(' , ') +
            '</span>');
    };
    EmailUtils.parseEmail = function (email) {
        var name;
        var match = email.match(/^\s*(.*)\s+<(.*)>$/);
        if (match != null) {
            name = match[1];
            Iif (/^'.*'|'.*'$/.test(name)) {
                name = name.substr(1, name.length - 2);
            }
            email = match[2];
        }
        else {
            name = email;
            email = email;
        }
        return [name, email];
    };
    return EmailUtils;
}());
exports.EmailUtils = EmailUtils;
 
 
/***/ }),
/* 637 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var _ = __webpack_require__(1);
var HTMLUtils = /** @class */ (function () {
    function HTMLUtils() {
    }
    HTMLUtils.buildAttributeString = function (options) {
        var ret = [];
        _.each(options, function (val, key, obj) {
            if (val != undefined) {
                ret.push(key + '=' + JSON.stringify(val.toString()));
            }
        });
        return ret.join(' ');
    };
    return HTMLUtils;
}());
exports.HTMLUtils = HTMLUtils;
var AnchorUtils = /** @class */ (function () {
    function AnchorUtils() {
    }
    AnchorUtils.buildAnchor = function (href, options) {
        var text;
        if (!options || !options.text) {
            text = href;
        }
        else {
            text = options.text;
            options.text = undefined;
        }
        return "<a href='" + href + "' " + HTMLUtils.buildAttributeString(options) + ">" + text + "</a>";
    };
    return AnchorUtils;
}());
exports.AnchorUtils = AnchorUtils;
var ImageUtils = /** @class */ (function () {
    function ImageUtils() {
    }
    ImageUtils.buildImage = function (src, options) {
        var ret = '<img ';
        ret += src ? "src='" + src + "' " : '';
        ret += HTMLUtils.buildAttributeString(options) + '/>';
        return ret;
    };
    ImageUtils.selectImageFromResult = function (result) {
        return document.querySelector("img[data-coveo-uri-hash=" + result.raw['urihash'] + "]");
    };
    ImageUtils.buildImageWithDirectSrcAttribute = function (endpoint, result) {
        var image = new Image();
        var dataStreamUri = endpoint.getViewAsDatastreamUri(result.uniqueId, '$Thumbnail$', { contentType: 'image/png' });
        image.onload = function () {
            ImageUtils.selectImageFromResult(result).setAttribute('src', dataStreamUri);
        };
        image.src = dataStreamUri;
    };
    ImageUtils.buildImageWithBase64SrcAttribute = function (endpoint, result) {
        endpoint
            .getRawDataStream(result.uniqueId, '$Thumbnail$')
            .then(function (response) {
            var rawBinary = String.fromCharCode.apply(null, new Uint8Array(response));
            ImageUtils.selectImageFromResult(result).setAttribute('src', 'data:image/png;base64, ' + btoa(rawBinary));
        })
            .catch(function () {
            ImageUtils.selectImageFromResult(result).remove();
        });
    };
    ImageUtils.buildImageFromResult = function (result, endpoint, options) {
        options = options ? options : {};
        var img = ImageUtils.buildImage(undefined, _.extend(options, { 'data-coveo-uri-hash': result.raw['urihash'] }));
        Iif (endpoint.isJsonp()) {
            // For jsonp we can't GET/POST for binary data. We are limited to only setting the src attribute directly on the img.
            ImageUtils.buildImageWithDirectSrcAttribute(endpoint, result);
        }
        else {
            // Base 64 img allows us to GET/POST the image as raw binary, so that we can also pass the credential of the user
            // Useful for phonegap.
            ImageUtils.buildImageWithBase64SrcAttribute(endpoint, result);
        }
        return img;
    };
    return ImageUtils;
}());
exports.ImageUtils = ImageUtils;
 
 
/***/ }),
/* 638 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var underscore_1 = __webpack_require__(1);
var Dom_1 = __webpack_require__(0);
function bindAnalyticsToLink(element, logAnalytics) {
    var executeOnlyOnce = underscore_1.once(function () { return logAnalytics(); });
    Dom_1.$$(element).on(['contextmenu', 'click', 'mousedown', 'mouseup'], executeOnlyOnce);
    var longPressTimer;
    Dom_1.$$(element).on('touchstart', function () {
        longPressTimer = window.setTimeout(executeOnlyOnce, 1000);
    });
    Dom_1.$$(element).on('touchend', function () {
        Eif (longPressTimer) {
            clearTimeout(longPressTimer);
        }
    });
}
exports.bindAnalyticsToLink = bindAnalyticsToLink;
 
 
/***/ }),
/* 639 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Dom_1 = __webpack_require__(0);
var underscore_1 = __webpack_require__(1);
var RelevanceInspectorTabs = /** @class */ (function () {
    function RelevanceInspectorTabs(onTabChange) {
        this.onTabChange = onTabChange;
        this.navigationSection = Dom_1.$$('div', {
            className: 'coveo-relevance-inspector-tab-navigation-section'
        });
        this.tabContentSection = Dom_1.$$('div', {
            className: 'coveo-relevance-inspector-tab-content-section'
        });
        this.navigationElements = [];
        this.tabContentElements = [];
    }
    RelevanceInspectorTabs.prototype.select = function (id) {
        var navElementToActivate = this.findNavigationById(id);
        var tabContentToActivate = this.findTabContentById(id);
        Eif (navElementToActivate && tabContentToActivate) {
            this.activateTabNavigation(navElementToActivate);
            this.activateTabContent(tabContentToActivate);
            Eif (this.onTabChange) {
                this.onTabChange(id);
            }
        }
    };
    RelevanceInspectorTabs.prototype.addNavigation = function (caption, id) {
        var _this = this;
        var navigationElement = Dom_1.$$('div', {
            id: id,
            className: 'coveo-relevance-inspector-tab'
        }, caption);
        navigationElement.on('click', function () { return _this.select(id); });
        this.navigationElements.push(navigationElement);
        this.navigationSection.append(navigationElement.el);
        return this;
    };
    RelevanceInspectorTabs.prototype.addContent = function (content, targetId) {
        var tabContent = Dom_1.$$('div', {
            className: 'coveo-relevance-inspector-tab-content',
            'data-target-tab': targetId
        });
        tabContent.append(content.el);
        this.tabContentElements.push(tabContent);
        this.tabContentSection.append(tabContent.el);
        return this;
    };
    RelevanceInspectorTabs.prototype.addSection = function (caption, content, id) {
        return this.addNavigation(caption, id).addContent(content, id);
    };
    RelevanceInspectorTabs.prototype.findNavigationById = function (id) {
        return underscore_1.find(this.navigationElements, function (element) { return element.getAttribute('id') == id; });
    };
    RelevanceInspectorTabs.prototype.findTabContentById = function (id) {
        return underscore_1.find(this.tabContentElements, function (tabContentElement) { return tabContentElement.getAttribute('data-target-tab') == id; });
    };
    RelevanceInspectorTabs.prototype.activateTabNavigation = function (navigationElement) {
        this.navigationElements.forEach(function (element) {
            element.removeClass('coveo-selected');
        });
        navigationElement.addClass('coveo-selected');
    };
    RelevanceInspectorTabs.prototype.activateTabContent = function (contentElement) {
        this.tabContentElements.forEach(function (element) {
            element.removeClass('coveo-selected');
        });
        contentElement.addClass('coveo-selected');
    };
    return RelevanceInspectorTabs;
}());
exports.RelevanceInspectorTabs = RelevanceInspectorTabs;
 
 
/***/ }),
/* 640 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __assign = (this && this.__assign) || Object.assign || function(t) {
    for (var s, i = 1, n = arguments.length; i < n; i++) {
        s = arguments[i];
        for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
            t[p] = s[p];
    }
    return t;
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { Iif (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        Iif (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            Iif (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
            Iif (y = 0, t) op = [0, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    Eif (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        Iif (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
Object.defineProperty(exports, "__esModule", { value: true });
var ExecutionReport_1 = __webpack_require__(50);
var TableBuilder_1 = __webpack_require__(62);
var underscore_1 = __webpack_require__(1);
var ExecutionReportGenericSection_1 = __webpack_require__(177);
var GenericValueOutput_1 = __webpack_require__(91);
var ExecutionReportAuthenticationSection = /** @class */ (function () {
    function ExecutionReportAuthenticationSection() {
    }
    ExecutionReportAuthenticationSection.prototype.build = function (executionReport) {
        return __awaiter(this, void 0, void 0, function () {
            var _a, container, agGridElement, gridOptions, authenticationSection, dataSource, tableBuilder;
            return __generator(this, function (_b) {
                switch (_b.label) {
                    case 0:
                        _a = ExecutionReport_1.ExecutionReport.standardSectionHeader('Authentication'), container = _a.container, agGridElement = _a.agGridElement;
                        authenticationSection = underscore_1.find(executionReport.children, function (child) { return child.name == ExecutionReport_1.EXECUTION_REPORT_SECTION.PERFORM_AUTHENTICATION; });
                        if (!authenticationSection) return [3 /*break*/, 2];
                        dataSource = [
                            __assign({}, new ExecutionReportGenericSection_1.ExecutionReportGenericSection().build(authenticationSection), this.configurationSection(authenticationSection), this.pipelineOuputSection(authenticationSection))
                        ];
                        return [4 /*yield*/, new TableBuilder_1.TableBuilder().build(dataSource, agGridElement, {
                                rowHeight: 150
                            })];
                    case 1:
                        tableBuilder = _b.sent();
                        gridOptions = tableBuilder.gridOptions;
                        _b.label = 2;
                    case 2: return [2 /*return*/, { container: container, gridOptions: gridOptions }];
                }
            });
        });
    };
    ExecutionReportAuthenticationSection.prototype.configurationSection = function (authenticationSection) {
        return {
            Configured: {
                children: [
                    {
                        Primary: this.genericOutput(authenticationSection.configured.primary),
                        Secondary: this.genericOutput(authenticationSection.configured.secondary),
                        Mandatory: this.genericOutput(authenticationSection.configured.mandatory)
                    }
                ]
            }
        };
    };
    ExecutionReportAuthenticationSection.prototype.pipelineOuputSection = function (authenticationSection) {
        return {
            'Pipeline Output': {
                children: [
                    {
                        'User ids': {
                            children: this.usersIds(authenticationSection.result.userIds)
                        },
                        'Query restriction': {
                            children: this.queryRestrictions(authenticationSection.result.queryRestrictions)
                        },
                        Roles: __assign({}, this.genericOutput(authenticationSection.result.roles), { width: 200 }),
                        'User groups': this.genericOutput(authenticationSection.result.userGroups)
                    }
                ]
            }
        };
    };
    ExecutionReportAuthenticationSection.prototype.usersIds = function (userIds) {
        var _this = this;
        return underscore_1.map(userIds, function (userId) {
            return _a = {},
                _a[userId.name] = {
                    children: [
                        {
                            Kind: _this.genericOutput(userId.kind),
                            Provider: __assign({}, _this.genericOutput(userId.provider), { width: 150 }),
                            Info: { content: userId.info }
                        }
                    ]
                },
                _a;
            var _a;
        });
    };
    ExecutionReportAuthenticationSection.prototype.genericOutput = function (section) {
        return new GenericValueOutput_1.GenericValueOutput().output(section);
    };
    ExecutionReportAuthenticationSection.prototype.queryRestrictions = function (queryRestrictions) {
        var _this = this;
        return underscore_1.map(queryRestrictions, function (value, key) {
            return _a = {},
                _a[key] = _this.genericOutput(value),
                _a;
            var _a;
        });
    };
    return ExecutionReportAuthenticationSection;
}());
exports.ExecutionReportAuthenticationSection = ExecutionReportAuthenticationSection;
 
 
/***/ }),
/* 641 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __assign = (this && this.__assign) || Object.assign || function(t) {
    for (var s, i = 1, n = arguments.length; i < n; i++) {
        s = arguments[i];
        for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
            t[p] = s[p];
    }
    return t;
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { Iif (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        Iif (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            Iif (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
            Iif (y = 0, t) op = [0, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    Eif (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        Iif (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
Object.defineProperty(exports, "__esModule", { value: true });
var ExecutionReport_1 = __webpack_require__(50);
var underscore_1 = __webpack_require__(1);
var ExecutionReportGenericSection_1 = __webpack_require__(177);
var TableBuilder_1 = __webpack_require__(62);
var GenericValueOutput_1 = __webpack_require__(91);
var ExecutionReportResolvedPipelineSection = /** @class */ (function () {
    function ExecutionReportResolvedPipelineSection() {
    }
    ExecutionReportResolvedPipelineSection.prototype.build = function (executionReport) {
        return __awaiter(this, void 0, void 0, function () {
            var _a, container, agGridElement, gridOptions, resolvedPipelineSection, dataSource, tableBuilder;
            return __generator(this, function (_b) {
                switch (_b.label) {
                    case 0:
                        _a = ExecutionReport_1.ExecutionReport.standardSectionHeader('Pipeline'), container = _a.container, agGridElement = _a.agGridElement;
                        resolvedPipelineSection = underscore_1.find(executionReport.children, function (child) { return child.name == ExecutionReport_1.EXECUTION_REPORT_SECTION.RESOLVE_PIPELINE; });
                        if (!resolvedPipelineSection) return [3 /*break*/, 2];
                        dataSource = [
                            __assign({}, new ExecutionReportGenericSection_1.ExecutionReportGenericSection().build(resolvedPipelineSection), { Pipeline: new GenericValueOutput_1.GenericValueOutput().output(resolvedPipelineSection.result.pipeline) }, { 'Split Test': new GenericValueOutput_1.GenericValueOutput().output(resolvedPipelineSection.result.splitTest) })
                        ];
                        return [4 /*yield*/, new TableBuilder_1.TableBuilder().build(dataSource, agGridElement)];
                    case 1:
                        tableBuilder = _b.sent();
                        gridOptions = tableBuilder.gridOptions;
                        _b.label = 2;
                    case 2: return [2 /*return*/, { container: container, gridOptions: gridOptions }];
                }
            });
        });
    };
    return ExecutionReportResolvedPipelineSection;
}());
exports.ExecutionReportResolvedPipelineSection = ExecutionReportResolvedPipelineSection;
 
 
/***/ }),
/* 642 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __assign = (this && this.__assign) || Object.assign || function(t) {
    for (var s, i = 1, n = arguments.length; i < n; i++) {
        s = arguments[i];
        for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
            t[p] = s[p];
    }
    return t;
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { Iif (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        Iif (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            Iif (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
            Iif (y = 0, t) op = [0, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    Eif (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        Iif (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
Object.defineProperty(exports, "__esModule", { value: true });
var ExecutionReport_1 = __webpack_require__(50);
var underscore_1 = __webpack_require__(1);
var ExecutionReportGenericSection_1 = __webpack_require__(177);
var TableBuilder_1 = __webpack_require__(62);
var GenericValueOutput_1 = __webpack_require__(91);
var ExecutionReportQueryOverrideSection = /** @class */ (function () {
    function ExecutionReportQueryOverrideSection() {
    }
    ExecutionReportQueryOverrideSection.prototype.build = function (executionReport) {
        return __awaiter(this, void 0, void 0, function () {
            var _a, container, agGridElement, gridOptions, queryOverrideSection, dataSource, tableBuilder;
            return __generator(this, function (_b) {
                switch (_b.label) {
                    case 0:
                        _a = ExecutionReport_1.ExecutionReport.standardSectionHeader('Query Params Override'), container = _a.container, agGridElement = _a.agGridElement;
                        queryOverrideSection = underscore_1.find(executionReport.children, function (child) { return child.name == ExecutionReport_1.EXECUTION_REPORT_SECTION.QUERY_PARAM_OVERRIDE; });
                        if (!queryOverrideSection) return [3 /*break*/, 2];
                        dataSource = [
                            __assign({}, new ExecutionReportGenericSection_1.ExecutionReportGenericSection().build(queryOverrideSection), { Applied: new GenericValueOutput_1.GenericValueOutput().output(queryOverrideSection.applied) })
                        ];
                        return [4 /*yield*/, new TableBuilder_1.TableBuilder().build(dataSource, agGridElement)];
                    case 1:
                        tableBuilder = _b.sent();
                        gridOptions = tableBuilder.gridOptions;
                        _b.label = 2;
                    case 2: return [2 /*return*/, { container: container, gridOptions: gridOptions }];
                }
            });
        });
    };
    return ExecutionReportQueryOverrideSection;
}());
exports.ExecutionReportQueryOverrideSection = ExecutionReportQueryOverrideSection;
 
 
/***/ }),
/* 643 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        Iif (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            Iif (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
            Iif (y = 0, t) op = [0, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    Eif (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        Iif (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
Object.defineProperty(exports, "__esModule", { value: true });
var ExecutionReport_1 = __webpack_require__(50);
var underscore_1 = __webpack_require__(1);
var GenericValueOutput_1 = __webpack_require__(91);
var Dom_1 = __webpack_require__(0);
var collapsibleSectionsInReport = ['Facets', 'RankingOverrides', 'RankingExpressions'];
var ExecutionReportEffectiveIndexQuerySection = /** @class */ (function () {
    function ExecutionReportEffectiveIndexQuerySection() {
    }
    ExecutionReportEffectiveIndexQuerySection.prototype.build = function (executionReport) {
        return __awaiter(this, void 0, void 0, function () {
            var container, table, indexQuerySection;
            return __generator(this, function (_a) {
                container = ExecutionReport_1.ExecutionReport.standardSectionHeader('Query sent to index').container;
                table = Dom_1.$$('table', {
                    className: 'coveo-relevance-inspector-table'
                });
                container.append(table.el);
                indexQuerySection = underscore_1.findWhere(executionReport.children, { description: ExecutionReport_1.EXECUTION_REPORT_SECTION.INDEX_QUERY });
                if (indexQuerySection) {
                    underscore_1.each(indexQuerySection.result.in, function (paramValue, paramKey) {
                        var row = Dom_1.$$('tr');
                        table.append(row.el);
                        var id = "executionReportIndexExecution" + paramKey;
                        if (underscore_1.contains(collapsibleSectionsInReport, paramKey) && paramValue) {
                            var btn = Dom_1.$$('button', {
                                className: 'coveo-button',
                                type: 'button'
                            }, paramKey);
                            var tdTarget_1 = Dom_1.$$('td', {
                                id: id,
                                className: 'coveo-relevance-inspector-effective-query-collapsible'
                            }, new GenericValueOutput_1.GenericValueOutput().output(paramValue).content);
                            btn.on('click', function () {
                                tdTarget_1.toggleClass('coveo-active');
                            });
                            row.append(Dom_1.$$('td', undefined, btn).el);
                            row.append(tdTarget_1.el);
                        }
                        else {
                            row.append(Dom_1.$$('td', undefined, paramKey).el);
                            row.append(Dom_1.$$('td', undefined, new GenericValueOutput_1.GenericValueOutput().output(paramValue).content).el);
                        }
                    });
                }
                return [2 /*return*/, { container: container }];
            });
        });
    };
    return ExecutionReportEffectiveIndexQuerySection;
}());
exports.ExecutionReportEffectiveIndexQuerySection = ExecutionReportEffectiveIndexQuerySection;
 
 
/***/ }),
/* 644 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __assign = (this && this.__assign) || Object.assign || function(t) {
    for (var s, i = 1, n = arguments.length; i < n; i++) {
        s = arguments[i];
        for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
            t[p] = s[p];
    }
    return t;
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { Iif (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        Iif (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            Iif (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
            Iif (y = 0, t) op = [0, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    Eif (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        Iif (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
Object.defineProperty(exports, "__esModule", { value: true });
var ExecutionReport_1 = __webpack_require__(50);
var TableBuilder_1 = __webpack_require__(62);
var underscore_1 = __webpack_require__(1);
var GenericValueOutput_1 = __webpack_require__(91);
var QueryBuilder_1 = __webpack_require__(24);
var ExecutionReportRankingModifiers = /** @class */ (function () {
    function ExecutionReportRankingModifiers() {
    }
    ExecutionReportRankingModifiers.prototype.build = function (results, rankingExpressions, bindings) {
        return __awaiter(this, void 0, void 0, function () {
            var _this = this;
            var _a, container, agGridElement, dataSourcePromises, dataSource, gridOptions;
            return __generator(this, function (_b) {
                switch (_b.label) {
                    case 0:
                        _a = ExecutionReport_1.ExecutionReport.standardSectionHeader('Ranking Modifiers & Machine Learning Boosts'), container = _a.container, agGridElement = _a.agGridElement;
                        dataSourcePromises = underscore_1.map(rankingExpressions, function (rankingExpression) { return __awaiter(_this, void 0, void 0, function () {
                            var isAutomaticBoostRegex, thumbnailPreview, returnedByIndexForCurrentQuery, result, isAutomaticBoost, permanentIDUsedInAutomaticBoost, extracted;
                            return __generator(this, function (_a) {
                                switch (_a.label) {
                                    case 0:
                                        isAutomaticBoostRegex = /^(@permanentid|@urihash)="?([a-zA-Z0-9]+)"?$/;
                                        thumbnailPreview = TableBuilder_1.TableBuilder.thumbnailCell(null, null);
                                        returnedByIndexForCurrentQuery = '-- NULL --';
                                        result = null;
                                        isAutomaticBoost = rankingExpression.expression.match(isAutomaticBoostRegex);
                                        if (!isAutomaticBoost) return [3 /*break*/, 2];
                                        permanentIDUsedInAutomaticBoost = isAutomaticBoost[2];
                                        return [4 /*yield*/, this.extractDocumentInfoFromBoost(results, permanentIDUsedInAutomaticBoost, rankingExpression, bindings)];
                                    case 1:
                                        extracted = _a.sent();
                                        thumbnailPreview = TableBuilder_1.TableBuilder.thumbnailCell(extracted.result, bindings);
                                        result = extracted.result;
                                        returnedByIndexForCurrentQuery = extracted.returnedByIndexForCurrentQuery.toString();
                                        _a.label = 2;
                                    case 2: return [2 /*return*/, __assign({}, thumbnailPreview, { ReturnedByIndexForCurrentQuery: new GenericValueOutput_1.GenericValueOutput().output(returnedByIndexForCurrentQuery), IsRecommendation: new GenericValueOutput_1.GenericValueOutput().output(result ? result.isRecommendation : '-- NULL --'), Expression: __assign({}, new GenericValueOutput_1.GenericValueOutput().output(rankingExpression.expression), { width: 150 }), Modifier: new GenericValueOutput_1.GenericValueOutput().output(rankingExpression.modifier) })];
                                }
                            });
                        }); });
                        return [4 /*yield*/, Promise.all(dataSourcePromises)];
                    case 1:
                        dataSource = _b.sent();
                        return [4 /*yield*/, new TableBuilder_1.TableBuilder().build(dataSource, agGridElement, {
                                rowHeight: 150
                            })];
                    case 2:
                        gridOptions = (_b.sent()).gridOptions;
                        return [2 /*return*/, {
                                container: container,
                                gridOptions: gridOptions
                            }];
                }
            });
        });
    };
    ExecutionReportRankingModifiers.prototype.extractDocumentInfoFromBoost = function (results, permanentID, rankingExpression, bindings) {
        return __awaiter(this, void 0, void 0, function () {
            var matchingResult, resultInResultSet, queryBuilder, resultsFromIndex;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        matchingResult = {
                            result: null,
                            returnedByIndexForCurrentQuery: false
                        };
                        resultInResultSet = underscore_1.find(results, function (result) {
                            return result.raw.permanentid == permanentID || result.raw.urihash == permanentID;
                        });
                        if (resultInResultSet) {
                            matchingResult = {
                                result: resultInResultSet,
                                returnedByIndexForCurrentQuery: true
                            };
                            return [2 /*return*/, matchingResult];
                        }
                        queryBuilder = new QueryBuilder_1.QueryBuilder();
                        queryBuilder.advancedExpression.add(rankingExpression.expression);
                        return [4 /*yield*/, bindings.queryController.getEndpoint().search(queryBuilder.build())];
                    case 1:
                        resultsFromIndex = _a.sent();
                        matchingResult = {
                            result: resultsFromIndex.results[0],
                            returnedByIndexForCurrentQuery: false
                        };
                        return [2 /*return*/, matchingResult];
                }
            });
        });
    };
    return ExecutionReportRankingModifiers;
}());
exports.ExecutionReportRankingModifiers = ExecutionReportRankingModifiers;
 
 
/***/ }),
/* 645 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { Iif (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        Iif (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            Iif (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
            Iif (y = 0, t) op = [0, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    Eif (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        Iif (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
Object.defineProperty(exports, "__esModule", { value: true });
var ExecutionReport_1 = __webpack_require__(50);
var underscore_1 = __webpack_require__(1);
var TableBuilder_1 = __webpack_require__(62);
var Dom_1 = __webpack_require__(0);
var Utils_1 = __webpack_require__(5);
var StreamHighlightUtils_1 = __webpack_require__(139);
var ExecutionReportSimpleSection_1 = __webpack_require__(319);
var ExecutionReportITDSection = /** @class */ (function () {
    function ExecutionReportITDSection() {
    }
    ExecutionReportITDSection.prototype.build = function (executionReport) {
        return __awaiter(this, void 0, void 0, function () {
            var preprocessQuerySection, originalLongQuery, topClicksSection, _a, container, agGridElement, gridOptions, dataSource, tableBuilder;
            return __generator(this, function (_b) {
                switch (_b.label) {
                    case 0:
                        preprocessQuerySection = underscore_1.find(executionReport.children, function (child) { return child.name == ExecutionReport_1.EXECUTION_REPORT_SECTION.PREPROCESS_QUERY; });
                        if (!preprocessQuerySection) {
                            return [2 /*return*/, this.buildFallbackEmptyTable(executionReport)];
                        }
                        originalLongQuery = preprocessQuerySection.result.in.lq;
                        topClicksSection = underscore_1.find(preprocessQuerySection.children, function (child) { return child.name == ExecutionReport_1.EXECUTION_REPORT_SECTION.TOP_CLICKS; });
                        if (!topClicksSection || !originalLongQuery) {
                            return [2 /*return*/, this.buildFallbackEmptyTable(executionReport)];
                        }
                        _a = ExecutionReport_1.ExecutionReport.standardSectionHeader('Large Query Intelligent Term Detection (ITD)'), container = _a.container, agGridElement = _a.agGridElement;
                        dataSource = [
                            {
                                'Original large query': this.buildOriginalLongQueryCell(originalLongQuery, topClicksSection.refinedQueries),
                                'Keyword(s) extracted': this.buildRefinedQueryCell(executionReport, topClicksSection.refinedQueries, preprocessQuerySection)
                            }
                        ];
                        return [4 /*yield*/, new TableBuilder_1.TableBuilder().build(dataSource, agGridElement, {
                                rowHeight: 300
                            })];
                    case 1:
                        tableBuilder = _b.sent();
                        gridOptions = tableBuilder.gridOptions;
                        return [2 /*return*/, { container: container, gridOptions: gridOptions }];
                }
            });
        });
    };
    ExecutionReportITDSection.prototype.doHighlights = function (originalLongQuery, refinedQueries) {
        var termsToHighlight = {};
        underscore_1.each(refinedQueries, function (refined) {
            termsToHighlight[refined.q] = [];
        });
        return StreamHighlightUtils_1.StreamHighlightUtils.highlightStreamText(originalLongQuery, termsToHighlight, {});
    };
    ExecutionReportITDSection.prototype.buildOriginalLongQueryCell = function (originalLongQuery, refinedQueries) {
        return {
            content: this.doHighlights(originalLongQuery, refinedQueries),
            cellRenderer: TableBuilder_1.GenericHtmlRenderer
        };
    };
    ExecutionReportITDSection.prototype.buildRefinedQueryCell = function (executionReport, refinedQueries, preprocessSection) {
        if (Utils_1.Utils.isNonEmptyArray(refinedQueries)) {
            return this.buildRefinedQueryByMLCell(refinedQueries);
        }
        var fallbackIndexPartialMatch = underscore_1.find(preprocessSection.children, function (child) { return child.name == ExecutionReport_1.EXECUTION_REPORT_SECTION.PARTIAL_MATCH; });
        var isUsingPartialMatch = fallbackIndexPartialMatch ? fallbackIndexPartialMatch.result.out.match(/^PartialMatch/) : false;
        if (isUsingPartialMatch) {
            return this.buildRefinedQueryByPartialMatchCell(fallbackIndexPartialMatch);
        }
        return this.buildRefinedQueryNoExtraction();
    };
    ExecutionReportITDSection.prototype.buildRefinedQueryByMLCell = function (refinedQueries) {
        var _this = this;
        var topLevelContainer = Dom_1.$$('div', undefined, Dom_1.$$('h2', undefined, 'Extraction and scoring performed using Coveo Machine Learning:'));
        var keywordsList = Dom_1.$$('ul');
        topLevelContainer.append(keywordsList.el);
        underscore_1.chain(refinedQueries)
            .map(function (refinedQuery) {
            var content = _this.doHighlights("Keyword: " + refinedQuery.q + " ==> Score: " + refinedQuery.score, [refinedQuery]);
            var container = Dom_1.$$('li', null, content);
            return container;
        })
            .each(function (refinedQueryContainer) {
            keywordsList.append(refinedQueryContainer.el);
        });
        return {
            content: topLevelContainer,
            cellRenderer: TableBuilder_1.GenericHtmlRenderer
        };
    };
    ExecutionReportITDSection.prototype.buildRefinedQueryByPartialMatchCell = function (partialMatch) {
        var topLevelContainer = Dom_1.$$('div');
        topLevelContainer.append(Dom_1.$$('h2', undefined, 'Coveo Machine learning was unable to suggest any refined keywords').el);
        topLevelContainer.append(Dom_1.$$('h4', undefined, 'Fallback on Coveo Index partial match feature').el);
        var content = Dom_1.$$('code', undefined, partialMatch.result.out);
        topLevelContainer.append(content.el);
        return {
            content: topLevelContainer,
            cellRenderer: TableBuilder_1.GenericHtmlRenderer
        };
    };
    ExecutionReportITDSection.prototype.buildRefinedQueryNoExtraction = function () {
        var topLevelContainer = Dom_1.$$('div');
        topLevelContainer.append(Dom_1.$$('h2', undefined, 'No keywords were extracted').el);
        topLevelContainer.append(Dom_1.$$('h4', undefined, 'The query is probably too small, or Coveo is lacking usage analytics data to return any meaningful suggestions.')
            .el);
        return {
            content: topLevelContainer,
            cellRenderer: TableBuilder_1.GenericHtmlRenderer
        };
    };
    ExecutionReportITDSection.prototype.buildFallbackEmptyTable = function (executionReport) {
        return new ExecutionReportSimpleSection_1.ExecutionReportSimpleSection(ExecutionReport_1.EXECUTION_REPORT_SECTION.NONE, ExecutionReport_1.EXECUTION_REPORT_SECTION.NONE, 'Large Query Intelligent Term Detection (ITD)').build(executionReport);
    };
    return ExecutionReportITDSection;
}());
exports.ExecutionReportITDSection = ExecutionReportITDSection;
 
 
/***/ }),
/* 646 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var RankingInfoParser_1 = __webpack_require__(225);
var Dom_1 = __webpack_require__(0);
var underscore_1 = __webpack_require__(1);
var Utils_1 = __webpack_require__(5);
var InlineRankingInfo = /** @class */ (function () {
    function InlineRankingInfo(result) {
        this.result = result;
        this.rankingInfo = RankingInfoParser_1.parseRankingInfo(result.rankingInfo);
    }
    InlineRankingInfo.prototype.build = function () {
        var container = Dom_1.$$('div', {
            className: 'coveo-relevance-inspector-inline-ranking'
        });
        underscore_1.each(this.rankingInfo.documentWeights, function (value, key) {
            var section = Dom_1.$$('div', { className: 'coveo-relevance-inspector-inline-ranking-section' }, key + ": " + value);
            container.append(section.el);
        });
        var total = Dom_1.$$('div', { className: 'coveo-relevance-inspector-highlight coveo-relevance-inspector-inline-ranking-section' }, "Total: " + this.rankingInfo.totalWeight);
        container.append(total.el);
        if (this.rankingInfo.termsWeight) {
            this.buildTogglableTermsSection(container);
        }
        if (Utils_1.Utils.isNonEmptyArray(this.rankingInfo.qreWeights)) {
            this.buildTogglableQRESection(container);
        }
        return container;
    };
    InlineRankingInfo.prototype.buildTogglableTermsSection = function (container) {
        var termsButton = Dom_1.$$('button', { className: 'coveo-button coveo-relevance-inspector-inline-ranking-button', type: 'button' }, 'Toggle Terms Relevancy Breakdown');
        container.append(termsButton.el);
        var termsSection = Dom_1.$$('div', { className: 'coveo-relevance-inspector-inline-ranking-terms' });
        container.append(termsSection.el);
        underscore_1.each(this.rankingInfo.termsWeight || {}, function (value, key) {
            var builtKey = "Keyword: " + key;
            termsSection.append(Dom_1.$$('h2', undefined, builtKey).el);
            termsSection.append(RankingInfoParser_1.buildListOfTermsElement(value.Weights).el);
        });
        termsButton.on('click', function () { return termsSection.toggleClass('coveo-active'); });
    };
    InlineRankingInfo.prototype.buildTogglableQRESection = function (container) {
        var qreButton = Dom_1.$$('button', { className: 'coveo-button coveo-relevance-inspector-inline-ranking-button', type: 'button' }, 'Toggle QRE Breakdown');
        container.append(qreButton.el);
        var qreSection = Dom_1.$$('ul', { className: 'coveo-relevance-inspector-inline-ranking-terms' });
        container.append(qreSection.el);
        underscore_1.each(this.rankingInfo.qreWeights, function (value) {
            qreSection.append(Dom_1.$$('dd', { className: 'coveo-relevance-inspector-inline-ranking-qre-expression' }, "" + value.expression).el);
            qreSection.append(Dom_1.$$('dt', undefined, "Score: " + value.score).el);
        });
        qreButton.on('click', function () { return qreSection.toggleClass('coveo-active'); });
    };
    return InlineRankingInfo;
}());
exports.InlineRankingInfo = InlineRankingInfo;
 
 
/***/ }),
/* 647 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Utils_1 = __webpack_require__(5);
var Core_1 = __webpack_require__(9);
var underscore_1 = __webpack_require__(1);
/**
 * Set of utilities to determine where to load the lazy chunks from.
 * You should add the `coveo-script` class on the script tag that includes the Coveo framework to make sure the framework can always
 * auto-detect the path to load the lazy chunks from. More details [here]{@link https://docs.coveo.com/en/295/javascript-search-framework/lazy-versus-eager-component-loading#fixing-code-chunks-loading-path-issues}
 */
var PublicPathUtils = /** @class */ (function () {
    function PublicPathUtils() {
    }
    // Dynamically set the public path to load the chunks relative to the Coveo script
    // Fallback on last parsed script if document.currentScript is not available.
    PublicPathUtils.detectPublicPath = function () {
        if (!this.pathHasBeenConfigured) {
            __webpack_require__.p = PublicPathUtils.getDynamicPublicPath();
        }
    };
    /**
     * Helper function to resolve the public path used to load the chunks relative to the Coveo script.
     * You should add the `coveo-script` class on the script tag that includes the Coveo framework
     * to make sure the framework can always auto-detect the path to load the lazy chunks from.
     * More details [here]{@link https://docs.coveo.com/en/295/javascript-search-framework/lazy-versus-eager-component-loading#fixing-code-chunks-loading-path-issues}
     */
    PublicPathUtils.getDynamicPublicPath = function () {
        var currentScript = this.getCurrentScript();
        var coveoScript = this.getCoveoScript();
        if (!this.isScript(coveoScript)) {
            new Core_1.Logger(this)
                .warn("You should add the class coveo-script on the script tag that includes the Coveo framework. Not doing so may cause the framework to not be able to auto-detect the path to load the lazy chunks in certain environments.\n        More details [here](https://docs.coveo.com/en/295/javascript-search-framework/lazy-versus-eager-component-loading#fixing-code-chunks-loading-path-issues).");
        }
        if (!Utils_1.Utils.isNullOrUndefined(currentScript)) {
            return this.parseScriptDirectoryPath(currentScript);
        }
        else if (this.isScript(coveoScript)) {
            return this.parseScriptDirectoryPath(coveoScript);
        }
        else {
            var scripts = document.getElementsByTagName('script');
            return this.parseScriptDirectoryPath(scripts[scripts.length - 1]);
        }
    };
    /**
     * @deprecated Instead of using this method, you should add the `coveo-script` class on the script tag that includes the Coveo framework.
     * @param path
     */
    PublicPathUtils.configureResourceRoot = function (path) {
        this.pathHasBeenConfigured = true;
        __webpack_require__.p = path;
    };
    PublicPathUtils.reset = function () {
        this.pathHasBeenConfigured = false;
    };
    PublicPathUtils.getCurrentScript = function () {
        return document.currentScript;
    };
    PublicPathUtils.getCoveoScript = function () {
        var _this = this;
        return underscore_1.find(document.querySelectorAll('.coveo-script'), function (el) { return _this.isScript(el); });
    };
    PublicPathUtils.parseScriptDirectoryPath = function (script) {
        return script.src.replace(/\/[\w\.-]*\.js((#|\?)(.*)){0,1}$/, '/');
    };
    PublicPathUtils.isScript = function (el) {
        return el && Core_1.$$(el).is('script');
    };
    PublicPathUtils.pathHasBeenConfigured = false;
    return PublicPathUtils;
}());
exports.PublicPathUtils = PublicPathUtils;
 
 
/***/ }),
/* 648 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var APIAnalyticsBuilder = /** @class */ (function () {
    function APIAnalyticsBuilder() {
    }
    APIAnalyticsBuilder.convertSearchEventToAPI = function (searchEvent) {
        var apiSearchEvent = {
            advancedQuery: searchEvent.advancedQuery,
            customMetadatas: searchEvent.customData,
            device: searchEvent.device,
            didYouMean: searchEvent.didYouMean,
            language: searchEvent.language,
            pageNumber: searchEvent.pageNumber,
            queryText: searchEvent.queryText,
            responseTime: searchEvent.responseTime,
            numberOfResults: searchEvent.numberOfResults,
            resultsPerPage: searchEvent.resultsPerPage,
            searchHub: searchEvent.originLevel1,
            searchInterface: searchEvent.originLevel2,
            searchQueryUid: searchEvent.searchQueryUid,
            type: searchEvent.actionType,
            actionCause: searchEvent.actionCause,
            queryPipeline: searchEvent.queryPipeline,
            splitTestRunName: searchEvent.splitTestRunName,
            splitTestRunVersion: searchEvent.splitTestRunVersion
        };
        return apiSearchEvent;
    };
    APIAnalyticsBuilder.convertDocumentViewToAPI = function (documentView) {
        var apiDocumentView = {
            collectionName: documentView.collectionName,
            device: documentView.device,
            documentPosition: documentView.documentPosition,
            title: documentView.documentTitle,
            documentUrl: documentView.documentUrl,
            documentUri: documentView.documentUri,
            documentUriHash: documentView.documentUriHash,
            language: documentView.language,
            responseTime: documentView.responseTime,
            searchHub: documentView.originLevel1,
            searchInterface: documentView.originLevel2,
            searchQueryUid: documentView.searchQueryUid,
            sourceName: documentView.sourceName,
            viewMethod: documentView.viewMethod,
            customMetadatas: documentView.customData,
            actionCause: documentView.actionCause,
            queryPipeline: documentView.queryPipeline,
            splitTestRunName: documentView.splitTestRunName,
            splitTestRunVersion: documentView.splitTestRunVersion
        };
        return apiDocumentView;
    };
    APIAnalyticsBuilder.convertCustomEventToAPI = function (customEvent) {
        var apiCustomEvent = {
            actionCause: customEvent.actionCause,
            actionType: customEvent.actionType,
            device: customEvent.device,
            language: customEvent.language,
            responseTime: customEvent.responseTime,
            searchHub: customEvent.originLevel1,
            searchInterface: customEvent.originLevel2,
            customMetadatas: customEvent.customData
        };
        return apiCustomEvent;
    };
    return APIAnalyticsBuilder;
}());
exports.APIAnalyticsBuilder = APIAnalyticsBuilder;
 
 
/***/ }),
/* 649 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var _ = __webpack_require__(1);
var MultiAnalyticsClient = /** @class */ (function () {
    function MultiAnalyticsClient(analyticsClients) {
        Iif (analyticsClients === void 0) { analyticsClients = []; }
        this.analyticsClients = analyticsClients;
        this.isContextual = false;
        this.endpoint = _.first(this.analyticsClients).endpoint;
    }
    MultiAnalyticsClient.prototype.isActivated = function () {
        return _.some(this.analyticsClients, function (analyticsClient) { return analyticsClient.isActivated(); });
    };
    MultiAnalyticsClient.prototype.getCurrentEventCause = function () {
        return _.find(_.map(this.analyticsClients, function (analyticsClient) { return analyticsClient.getCurrentEventCause(); }), function (currentEventCause) { return currentEventCause != null; });
    };
    MultiAnalyticsClient.prototype.getCurrentEventMeta = function () {
        return _.find(_.map(this.analyticsClients, function (analyticsClient) { return analyticsClient.getCurrentEventMeta(); }), function (currentEventMeta) { return currentEventMeta != null; });
    };
    MultiAnalyticsClient.prototype.logSearchEvent = function (actionCause, meta) {
        _.each(this.analyticsClients, function (analyticsClient) { return analyticsClient.logSearchEvent(actionCause, meta); });
    };
    MultiAnalyticsClient.prototype.logSearchAsYouType = function (actionCause, meta) {
        _.each(this.analyticsClients, function (analyticsClient) { return analyticsClient.logSearchEvent(actionCause, meta); });
    };
    MultiAnalyticsClient.prototype.logClickEvent = function (actionCause, meta, result, element) {
        return Promise.all(_.map(this.analyticsClients, function (analyticsClient) {
            return analyticsClient.logClickEvent(actionCause, meta, result, element);
        })).then(function (responses) { return _.first(responses); });
    };
    MultiAnalyticsClient.prototype.logCustomEvent = function (actionCause, meta, element) {
        return Promise.all(_.map(this.analyticsClients, function (analyticsClient) {
            return analyticsClient.logCustomEvent(actionCause, meta, element);
        })).then(function (responses) { return _.first(responses); });
    };
    MultiAnalyticsClient.prototype.getTopQueries = function (params) {
        var _this = this;
        return Promise.all(_.map(this.analyticsClients, function (client) {
            return client.getTopQueries(params);
        })).then(function (values) {
            return _this.mergeTopQueries(values, params.pageSize);
        });
    };
    MultiAnalyticsClient.prototype.getCurrentVisitIdPromise = function () {
        return _.first(this.analyticsClients).getCurrentVisitIdPromise();
    };
    MultiAnalyticsClient.prototype.getCurrentVisitId = function () {
        return _.first(this.analyticsClients).getCurrentVisitId();
    };
    MultiAnalyticsClient.prototype.sendAllPendingEvents = function () {
        _.each(this.analyticsClients, function (analyticsClient) { return analyticsClient.sendAllPendingEvents(); });
    };
    MultiAnalyticsClient.prototype.warnAboutSearchEvent = function () {
        _.each(this.analyticsClients, function (analyticsClient) { return analyticsClient.warnAboutSearchEvent(); });
    };
    MultiAnalyticsClient.prototype.cancelAllPendingEvents = function () {
        _.each(this.analyticsClients, function (analyticsClient) { return analyticsClient.cancelAllPendingEvents(); });
    };
    MultiAnalyticsClient.prototype.getPendingSearchEvent = function () {
        return _.first(this.analyticsClients).getPendingSearchEvent();
    };
    MultiAnalyticsClient.prototype.setOriginContext = function (originContext) {
        _.each(this.analyticsClients, function (analyticsClient) { return analyticsClient.setOriginContext(originContext); });
    };
    MultiAnalyticsClient.prototype.getOriginContext = function () {
        return _.first(this.analyticsClients).getOriginContext();
    };
    MultiAnalyticsClient.prototype.getUserDisplayName = function () {
        return _.first(this.analyticsClients).getUserDisplayName();
    };
    MultiAnalyticsClient.prototype.mergeTopQueries = function (values, pageSize) {
        if (pageSize === void 0) { pageSize = 5; }
        return _.chain(values).flatten().first(pageSize).value();
    };
    return MultiAnalyticsClient;
}());
exports.MultiAnalyticsClient = MultiAnalyticsClient;
 
 
/***/ }),
/* 650 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Initialization_1 = __webpack_require__(8);
var _ = __webpack_require__(1);
Eif (!initCoveoJQuery()) {
    // Adding a check in case jQuery was added after the jsSearch
    // Since this event listener is registered before the Coveo.init call, JQuery should always be initiated before the Coveo.init call
    document.addEventListener('DOMContentLoaded', function () {
        initCoveoJQuery();
    });
}
function initCoveoJQuery() {
    if (!jQueryIsDefined()) {
        return false;
    }
    exports.jQueryInstance = getJQuery();
    Iif (window['Coveo'] == undefined) {
        window['Coveo'] = {};
    }
    Iif (window['Coveo']['$'] == undefined) {
        window['Coveo']['$'] = exports.jQueryInstance;
    }
    exports.jQueryInstance.fn.coveo = function () {
        var args = [];
        for (var _i = 0; _i < arguments.length; _i++) {
            args[_i] = arguments[_i];
        }
        var returnValue;
        this.each(function (index, element) {
            var returnValueForThisElement;
            if (_.isString(args[0])) {
                var token = args[0];
                returnValueForThisElement = Initialization_1.Initialization.dispatchNamedMethodCallOrComponentCreation(token, element, args.slice(1));
            }
            else {
                // Invoking with no method name is a shortcut for the 'get' method (from Component).
                returnValueForThisElement = Initialization_1.Initialization.dispatchNamedMethodCall('get', element, args);
            }
            // Keep only the first return value we encounter
            returnValue = returnValue || returnValueForThisElement;
        });
        return returnValue;
    };
    return true;
}
exports.initCoveoJQuery = initCoveoJQuery;
function jQueryIsDefined() {
    return jQueryDefinedOnWindow() || jQueryDefinedOnCoveoObject();
}
exports.jQueryIsDefined = jQueryIsDefined;
function jQueryDefinedOnCoveoObject() {
    return window['Coveo'] != undefined && window['Coveo']['$'] != undefined;
}
function jQueryDefinedOnWindow() {
    return window['$'] != undefined && window['$'].fn != undefined && window['$'].fn.jquery != undefined;
}
function getJQuery() {
    var jQueryInstance;
    Eif (window['$']) {
        jQueryInstance = window['$'];
    }
    else {
        jQueryInstance = window['Coveo']['$'];
    }
    return jQueryInstance;
}
 
 
/***/ }),
/* 651 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __assign = (this && this.__assign) || Object.assign || function(t) {
    for (var s, i = 1, n = arguments.length; i < n; i++) {
        s = arguments[i];
        for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
            t[p] = s[p];
    }
    return t;
};
Object.defineProperty(exports, "__esModule", { value: true });
var TemplateHelpers_1 = __webpack_require__(141);
var HighlightUtils_1 = __webpack_require__(82);
var DateUtils_1 = __webpack_require__(43);
var CurrencyUtils_1 = __webpack_require__(316);
var HtmlUtils_1 = __webpack_require__(637);
var Utils_1 = __webpack_require__(5);
var StringUtils_1 = __webpack_require__(34);
var TimeSpanUtils_1 = __webpack_require__(166);
var EmailUtils_1 = __webpack_require__(636);
var QueryUtils_1 = __webpack_require__(37);
var DeviceUtils_1 = __webpack_require__(42);
var Dom_1 = __webpack_require__(0);
var SearchEndpoint_1 = __webpack_require__(61);
var StreamHighlightUtils_1 = __webpack_require__(139);
var FacetUtils_1 = __webpack_require__(49);
var Globalize = __webpack_require__(28);
var _ = __webpack_require__(1);
var Component_1 = __webpack_require__(6);
var TemplateCache_1 = __webpack_require__(79);
var CoreHelpers = /** @class */ (function () {
    function CoreHelpers() {
    }
    /**
     * For backward compatibility reason, the "global" template helper should be available under the
     * coveo namespace.
     * @param scope
     */
    CoreHelpers.exportAllHelpersGlobally = function (scope) {
        _.each(TemplateHelpers_1.TemplateHelpers.getHelpers(), function (helper, name) {
            Iif (scope[name] == undefined) {
                scope[name] = helper;
            }
        });
    };
    return CoreHelpers;
}());
exports.CoreHelpers = CoreHelpers;
TemplateHelpers_1.TemplateHelpers.registerFieldHelper('javascriptEncode', function (value) {
    return Utils_1.Utils.exists(value) ? StringUtils_1.StringUtils.javascriptEncode(value) : undefined;
});
var executeShorten = function (content, options) {
    var strAndHoles = HighlightUtils_1.StringAndHoles.shortenString(content, options.length, '...');
    if (Utils_1.Utils.exists(options.highlights)) {
        return HighlightUtils_1.HighlightUtils.highlightString(strAndHoles.value, options.highlights, strAndHoles.holes, options.cssClass || 'highlight');
    }
    else {
        return strAndHoles.value;
    }
};
TemplateHelpers_1.TemplateHelpers.registerTemplateHelper('shorten', function (content, length, highlights, cssClass) {
    return executeShorten(content, {
        length: length,
        highlights: highlights,
        cssClass: cssClass
    });
});
TemplateHelpers_1.TemplateHelpers.registerTemplateHelper('shortenv2', function (content, options) {
    return executeShorten(content, options);
});
var executeShortenPath = function (content, options) {
    var strAndHoles = HighlightUtils_1.StringAndHoles.shortenPath(content, options.length);
    Iif (Utils_1.Utils.exists(options.highlights)) {
        return HighlightUtils_1.HighlightUtils.highlightString(strAndHoles.value, options.highlights, strAndHoles.holes, options.cssClass || 'highlight');
    }
    else {
        return strAndHoles.value;
    }
};
TemplateHelpers_1.TemplateHelpers.registerTemplateHelper('shortenPath', function (content, length, highlights, cssClass) {
    return executeShortenPath(content, {
        length: length,
        highlights: highlights,
        cssClass: cssClass
    });
});
TemplateHelpers_1.TemplateHelpers.registerFieldHelper('shortenPathv2', function (content, options) {
    return executeShortenPath(content, options);
});
var executeShortenUri = function (content, options) {
    var strAndHoles = HighlightUtils_1.StringAndHoles.shortenUri(content, options.length);
    Iif (Utils_1.Utils.exists(options.highlights)) {
        return HighlightUtils_1.HighlightUtils.highlightString(strAndHoles.value, options.highlights, strAndHoles.holes, options.cssClass || 'highlight');
    }
    else {
        return strAndHoles.value;
    }
};
TemplateHelpers_1.TemplateHelpers.registerTemplateHelper('shortenUri', function (content, length, highlights, cssClass) {
    return executeShortenUri(content, {
        length: length,
        highlights: highlights,
        cssClass: cssClass
    });
});
TemplateHelpers_1.TemplateHelpers.registerTemplateHelper('shortenUriv2', function (content, options) {
    return executeShortenUri(content, options);
});
var executeHighlight = function (content, options) {
    Eif (Utils_1.Utils.exists(content)) {
        Eif (Utils_1.Utils.exists(options.highlights)) {
            return HighlightUtils_1.HighlightUtils.highlightString(content, options.highlights, null, options.cssClass || 'highlight');
        }
        else {
            return content;
        }
    }
    else {
        return undefined;
    }
};
TemplateHelpers_1.TemplateHelpers.registerTemplateHelper('highlight', function (content, highlights, cssClass) {
    return executeHighlight(content, {
        highlights: highlights,
        cssClass: cssClass
    });
});
TemplateHelpers_1.TemplateHelpers.registerTemplateHelper('highlightv2', function (content, options) {
    return executeHighlight(content, options);
});
var executeHighlightStreamText = function (content, options) {
    Eif (Utils_1.Utils.exists(content) && Utils_1.Utils.exists(options.termsToHighlight) && Utils_1.Utils.exists(options.phrasesToHighlight)) {
        Eif (termsToHighlightAreDefined(options.termsToHighlight, options.phrasesToHighlight)) {
            return StreamHighlightUtils_1.StreamHighlightUtils.highlightStreamText(content, options.termsToHighlight, options.phrasesToHighlight, options.opts);
        }
        else {
            return content;
        }
    }
    else {
        return undefined;
    }
};
TemplateHelpers_1.TemplateHelpers.registerTemplateHelper('highlightStreamText', function (content, termsToHighlight, phrasesToHighlight, opts) {
    Iif (termsToHighlight === void 0) { termsToHighlight = resolveTermsToHighlight(); }
    Iif (phrasesToHighlight === void 0) { phrasesToHighlight = resolvePhrasesToHighlight(); }
    return executeHighlightStreamText(content, {
        termsToHighlight: termsToHighlight,
        phrasesToHighlight: phrasesToHighlight,
        opts: opts
    });
});
TemplateHelpers_1.TemplateHelpers.registerTemplateHelper('highlightStreamTextv2', function (content, options) {
    var mergedOptions = __assign({ termsToHighlight: resolveTermsToHighlight(), phrasesToHighlight: resolvePhrasesToHighlight() }, options);
    return executeHighlightStreamText(content, mergedOptions);
});
var executeHighlightStreamHTML = function (content, options) {
    Eif (Utils_1.Utils.exists(content) && Utils_1.Utils.exists(options.termsToHighlight) && Utils_1.Utils.exists(options.phrasesToHighlight)) {
        Eif (termsToHighlightAreDefined(options.termsToHighlight, options.phrasesToHighlight)) {
            return StreamHighlightUtils_1.StreamHighlightUtils.highlightStreamHTML(content, options.termsToHighlight, options.phrasesToHighlight, options.opts);
        }
        else {
            return content;
        }
    }
    else {
        return undefined;
    }
};
TemplateHelpers_1.TemplateHelpers.registerTemplateHelper('highlightStreamHTML', function (content, termsToHighlight, phrasesToHighlight, opts) {
    Iif (termsToHighlight === void 0) { termsToHighlight = resolveTermsToHighlight(); }
    Iif (phrasesToHighlight === void 0) { phrasesToHighlight = resolvePhrasesToHighlight(); }
    return executeHighlightStreamHTML(content, {
        termsToHighlight: termsToHighlight,
        phrasesToHighlight: phrasesToHighlight,
        opts: opts
    });
});
TemplateHelpers_1.TemplateHelpers.registerTemplateHelper('highlightStreamHTMLv2', function (content, options) {
    var mergedOptions = __assign({ termsToHighlight: resolveTermsToHighlight(), phrasesToHighlight: resolvePhrasesToHighlight() }, options);
    return executeHighlightStreamHTML(content, mergedOptions);
});
TemplateHelpers_1.TemplateHelpers.registerFieldHelper('number', function (value, options) {
    Iif (!Utils_1.Utils.exists(value)) {
        return undefined;
    }
    var numberValue = Number(value);
    var format = _.isString(options) ? options : options && options.format;
    if (!format) {
        return StringUtils_1.StringUtils.htmlEncode(numberValue.toString());
    }
    return StringUtils_1.StringUtils.htmlEncode(Globalize.format(numberValue, format));
});
TemplateHelpers_1.TemplateHelpers.registerFieldHelper('date', function (value, options) {
    return DateUtils_1.DateUtils.dateToString(DateUtils_1.DateUtils.convertFromJsonDateIfNeeded(value), options);
});
TemplateHelpers_1.TemplateHelpers.registerFieldHelper('time', function (value, options) {
    return DateUtils_1.DateUtils.timeToString(DateUtils_1.DateUtils.convertFromJsonDateIfNeeded(value), options);
});
TemplateHelpers_1.TemplateHelpers.registerFieldHelper('dateTime', function (value, options) {
    return DateUtils_1.DateUtils.dateTimeToString(DateUtils_1.DateUtils.convertFromJsonDateIfNeeded(value), options);
});
TemplateHelpers_1.TemplateHelpers.registerFieldHelper('emailDateTime', function (value, options) {
    var defaultOptions = {};
    defaultOptions.includeTimeIfThisWeek = true;
    var optionsToUse = _.extend(options, defaultOptions);
    return value ? DateUtils_1.DateUtils.dateTimeToString(DateUtils_1.DateUtils.convertFromJsonDateIfNeeded(value), optionsToUse) : undefined;
});
TemplateHelpers_1.TemplateHelpers.registerFieldHelper('currency', function (value, options) {
    return CurrencyUtils_1.CurrencyUtils.currencyToString(value, options);
});
TemplateHelpers_1.TemplateHelpers.registerFieldHelper('timeSpan', function (value, options) {
    Iif (options === void 0) { options = { isMilliseconds: false }; }
    return new TimeSpanUtils_1.TimeSpan(value, options.isMilliseconds).getHHMMSS();
});
TemplateHelpers_1.TemplateHelpers.registerFieldHelper('email', function (value) {
    var args = [];
    for (var _i = 1; _i < arguments.length; _i++) {
        args[_i - 1] = arguments[_i];
    }
    // support old arguments (value: any, companyDomain: string, me: string, lengthLimit = 2, truncateName = false)
    var companyDomain;
    var me;
    var lengthLimit;
    var truncateName;
    if (_.isObject(args[0])) {
        companyDomain = args[0]['companyDomain'];
        me = args[0]['me'];
        lengthLimit = args[0]['lengthLimit'];
        truncateName = args[0]['truncateName'];
    }
    else {
        companyDomain = args[0];
        me = args[1];
        lengthLimit = args[2];
        truncateName = args[3];
    }
    if (lengthLimit == undefined) {
        lengthLimit = 2;
    }
    Eif (truncateName == undefined) {
        truncateName = false;
    }
    if (_.isString(value)) {
        var listOfAddresses = EmailUtils_1.EmailUtils.splitSemicolonSeparatedListOfEmailAddresses(value);
        return EmailUtils_1.EmailUtils.emailAddressesToHyperlinks(listOfAddresses, companyDomain, me, lengthLimit, truncateName);
    }
    else Eif (_.isArray(value)) {
        return EmailUtils_1.EmailUtils.emailAddressesToHyperlinks(value, companyDomain, me, lengthLimit, truncateName);
    }
    else {
        return undefined;
    }
});
TemplateHelpers_1.TemplateHelpers.registerTemplateHelper('excessEmailToggle', function (target) {
    Dom_1.$$(target).removeClass('coveo-active');
    if (Dom_1.$$(target).hasClass('coveo-emails-excess-collapsed')) {
        _.each(Dom_1.$$(target).siblings('.coveo-emails-excess-expanded'), function (sibling) {
            Dom_1.$$(sibling).addClass('coveo-active');
        });
    }
    else if (Dom_1.$$(target).hasClass('coveo-hide-expanded')) {
        Dom_1.$$(target.parentElement).addClass('coveo-inactive');
        _.each(Dom_1.$$(target.parentElement).siblings('.coveo-emails-excess-collapsed'), function (sibling) {
            Dom_1.$$(sibling).addClass('coveo-active');
        });
    }
    return undefined;
});
TemplateHelpers_1.TemplateHelpers.registerFieldHelper('anchor', function (href, options) {
    return HtmlUtils_1.AnchorUtils.buildAnchor(href, options);
});
TemplateHelpers_1.TemplateHelpers.registerFieldHelper('image', function (src, options, result) {
    if (result === void 0) { result = resolveQueryResult(); }
    if (options && options.srcTemplate) {
        return HtmlUtils_1.ImageUtils.buildImage(StringUtils_1.StringUtils.buildStringTemplateFromResult(options.srcTemplate, result), {
            alt: options.alt,
            height: options.height,
            width: options.width
        });
    }
    return HtmlUtils_1.ImageUtils.buildImage(src, options);
});
TemplateHelpers_1.TemplateHelpers.registerTemplateHelper('thumbnail', function (result, endpoint, options) {
    Iif (result === void 0) { result = resolveQueryResult(); }
    Eif (endpoint === void 0) { endpoint = 'default'; }
    Eif (QueryUtils_1.QueryUtils.hasThumbnail(result)) {
        return HtmlUtils_1.ImageUtils.buildImageFromResult(result, SearchEndpoint_1.SearchEndpoint.endpoints[endpoint], options);
    }
});
TemplateHelpers_1.TemplateHelpers.registerTemplateHelper('fromFileTypeToIcon', function (result, options) {
    Iif (result === void 0) { result = resolveQueryResult(); }
    if (options === void 0) { options = {}; }
    var icon = Component_1.Component.getComponentRef('Icon');
    Eif (icon) {
        return icon.createIcon(result, options).outerHTML;
    }
});
TemplateHelpers_1.TemplateHelpers.registerTemplateHelper('attrEncode', function (value) {
    return ('' + value) /* Forces the conversion to string. */
        .replace(/&/g, '&amp;') /* This MUST be the 1st replacement. */
        .replace(/'/g, '&apos;') /* The 4 other predefined entities, required. */
        .replace(/'/g, '&quot;')
        .replace(/</g, '&lt;')
        .replace(/>/g, '&gt;');
});
TemplateHelpers_1.TemplateHelpers.registerTemplateHelper('loadTemplates', function (templatesToLoad, once) {
    if (once === void 0) { once = true; }
    var ret = '';
    var data = resolveQueryResult();
    var atLeastOneWasLoaded = false;
    var toLoad = templatesToLoad;
    var defaultTmpl;
    _.each(templatesToLoad, function (value, key, obj) {
        if (value == 'default') {
            defaultTmpl = key;
        }
    });
    if (defaultTmpl != undefined) {
        toLoad = _.omit(templatesToLoad, defaultTmpl);
    }
    _.each(toLoad, function (condition, id, obj) {
        if (!atLeastOneWasLoaded || !once) {
            atLeastOneWasLoaded = atLeastOneWasLoaded || condition;
            ret += TemplateHelpers_1.TemplateHelpers.getHelper('loadTemplate')(id, condition, data);
        }
    });
    if (!atLeastOneWasLoaded && defaultTmpl != undefined) {
        ret += TemplateHelpers_1.TemplateHelpers.getHelper('loadTemplate')(defaultTmpl, true, data);
    }
    return ret;
});
var byteMeasure = ['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB'];
TemplateHelpers_1.TemplateHelpers.registerFieldHelper('size', function (value, options) {
    var size = parseInt(value, 10);
    var precision = options != null && options.precision != null ? options.precision : 2;
    var base = options != null && options.base != null ? options.base : 0;
    while (size > 1024 && base + 1 < byteMeasure.length) {
        size /= 1024;
        base++;
    }
    size = Math.floor(size * Math.pow(10, precision)) / Math.pow(10, precision);
    return size + ' ' + byteMeasure[base];
});
TemplateHelpers_1.TemplateHelpers.registerFieldHelper('translatedCaption', function (value) {
    return FacetUtils_1.FacetUtils.tryToGetTranslatedCaption('@filetype', value);
});
TemplateHelpers_1.TemplateHelpers.registerTemplateHelper('loadTemplate', function (id, condition, data) {
    if (condition === void 0) { condition = true; }
    if (Utils_1.Utils.isNullOrUndefined(data)) {
        data = resolveQueryResult();
    }
    if (condition) {
        return TemplateCache_1.TemplateCache.getTemplate(id).instantiateToString(data, {
            checkCondition: false
        });
    }
    return '';
});
TemplateHelpers_1.TemplateHelpers.registerTemplateHelper('encodeCarriageReturn', function (data) {
    Iif (Utils_1.Utils.isNullOrUndefined(data)) {
        return undefined;
    }
    else {
        return StringUtils_1.StringUtils.encodeCarriageReturn(data);
    }
});
TemplateHelpers_1.TemplateHelpers.registerTemplateHelper('isMobileDevice', function () {
    return DeviceUtils_1.DeviceUtils.isMobileDevice() ? DeviceUtils_1.DeviceUtils.getDeviceName() : null;
});
TemplateHelpers_1.TemplateHelpers.registerTemplateHelper('pluralHelper', function (count, options) {
    return count > 1 ? options.plural : options.singular;
});
function resolveQueryResult() {
    var found;
    var resultList = Component_1.Component.getComponentRef('ResultList');
    Eif (resultList) {
        found = resultList.resultCurrentlyBeingRendered;
    }
    if (!found) {
        var quickview = Component_1.Component.getComponentRef('Quickview');
        Eif (quickview) {
            found = quickview.resultCurrentlyBeingRendered;
        }
    }
    return found;
}
function resolveTermsToHighlight() {
    var currentQueryResult = resolveQueryResult();
    if (currentQueryResult) {
        return currentQueryResult.termsToHighlight;
    }
}
function resolvePhrasesToHighlight() {
    var currentQueryResult = resolveQueryResult();
    if (currentQueryResult) {
        return currentQueryResult.phrasesToHighlight;
    }
}
function termsToHighlightAreDefined(termsToHighlight, phrasesToHighlight) {
    return Utils_1.Utils.isNonEmptyArray(_.keys(termsToHighlight)) || Utils_1.Utils.isNonEmptyArray(_.keys(phrasesToHighlight));
}
 
 
/***/ }),
/* 652 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
var Component_1 = __webpack_require__(6);
var ComponentOptions_1 = __webpack_require__(13);
var QueryEvents_1 = __webpack_require__(14);
var AdvancedSearchEvents_1 = __webpack_require__(110);
var SettingsEvents_1 = __webpack_require__(66);
var Initialization_1 = __webpack_require__(8);
var Strings_1 = __webpack_require__(4);
var Dom_1 = __webpack_require__(0);
var AdvancedSearchInputFactory_1 = __webpack_require__(1082);
var AnalyticsActionListMeta_1 = __webpack_require__(7);
var QuerySummaryEvents_1 = __webpack_require__(661);
var _ = __webpack_require__(1);
var GlobalExports_1 = __webpack_require__(10);
__webpack_require__(1086);
var NumericSpinner_1 = __webpack_require__(143);
var DatePicker_1 = __webpack_require__(140);
var Dropdown_1 = __webpack_require__(92);
var TextInput_1 = __webpack_require__(80);
var RadioButton_1 = __webpack_require__(142);
var ExternalModulesShim_1 = __webpack_require__(39);
var BreadcrumbEvents_1 = __webpack_require__(33);
var SVGIcons_1 = __webpack_require__(16);
var AccessibleButton_1 = __webpack_require__(20);
var AccessibilityUtils_1 = __webpack_require__(81);
/**
 * The `AdvancedSearch` component is meant to render a section in the [`Settings`]{@link Settings} menu to allow the end
 * user to easily create complex queries to send to the index.
 *
 * **Note:**
 * > You can write custom code to add new sections in the **Advanced Search** modal box generated by this component by
 * > attaching a handler to the [`buildingAdvancedSearch`]{@link AdvancedSearchEvents.buildingAdvancedSearch} event.
 *
 * @availablesince [October 2016 Release (v1.1550.5)](https://docs.coveo.com/en/309/#october-2016-release-v115505)
 */
var AdvancedSearch = /** @class */ (function (_super) {
    __extends(AdvancedSearch, _super);
    /**
     * Creates a new `AdvancedSearch` component.
     *
     * Triggers the [`buildingAdvancedSearch`]{@link AdvancedSearchEvents.buildingAdvancedSearch} event.
     * @param element The HTMLElement on which to instantiate the component.
     * @param options The options for the `AdvancedSearch` component.
     * @param bindings The bindings that the component requires to function normally. If not set, these will be
     * automatically resolved (with a slower execution time).
     */
    function AdvancedSearch(element, options, bindings, ModalBox) {
        Iif (ModalBox === void 0) { ModalBox = ExternalModulesShim_1.ModalBox; }
        var _this = _super.call(this, element, AdvancedSearch.ID, bindings) || this;
        _this.element = element;
        _this.options = options;
        _this.ModalBox = ModalBox;
        _this.inputs = [];
        _this.inputFactory = new AdvancedSearchInputFactory_1.AdvancedSearchInputFactory(_this.queryController.getEndpoint(), _this.root);
        _this.externalSections = [];
        _this.needToPopulateBreadcrumb = false;
        // Used as an internal flag to determine if the component should execute the advanced search event
        // This flag is typically set to false when the breadcrumb is resetting, for example.
        // This is because the query will already be executed anyway from external code.
        // Without this, we might get analytics event being sent multiple time, or multiple query being triggered (which gets cancelled).
        _this.needToExecuteAdvancedSearch = true;
        _this.options = ComponentOptions_1.ComponentOptions.initComponentOptions(element, AdvancedSearch, options);
        _this.bindEvents();
        _this.buildContent();
        return _this;
    }
    /**
     * Launches the advanced search query.
     * If query returns successfully, also logs an `advancedSearch` event in the usage analytics (see
     * {@link Analytics.logSearchEvent}).
     */
    AdvancedSearch.prototype.executeAdvancedSearch = function () {
        Eif (this.needToExecuteAdvancedSearch) {
            this.usageAnalytics.logSearchEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.advancedSearch, {});
            this.queryController.executeQuery({
                closeModalBox: false
            });
        }
    };
    /**
     * Resets the state of all form inputs inside the `AdvancedSearch` component.
     */
    AdvancedSearch.prototype.reset = function () {
        _.each(this.inputs, function (input) {
            input.reset();
        });
    };
    /**
     * Opens the `AdvancedSearch` modal box.
     */
    AdvancedSearch.prototype.open = function () {
        Eif (this.modalbox == null) {
            this.modalbox = this.ModalBox.open(this.content.el, {
                sizeMod: 'big',
                title: Strings_1.l('AdvancedSearch'),
                className: 'coveo-advanced-search-modal',
                body: this.searchInterface.options.modalContainer
            });
        }
    };
    /**
     * Closes the `AdvancedSearch` modal box.
     */
    AdvancedSearch.prototype.close = function () {
        Eif (this.modalbox != null) {
            this.modalbox.close();
            this.modalbox = null;
        }
    };
    AdvancedSearch.prototype.handlePopulateBreadcrumb = function (args) {
        if (this.needToPopulateBreadcrumb) {
            var _a = this.buildBreadcrumbElements(args.headingLevel), container = _a.container, title = _a.title, clear = _a.clear;
            container.append(title.el);
            container.append(clear.el);
            args.breadcrumbs.push({
                element: container.el
            });
        }
    };
    AdvancedSearch.prototype.buildBreadcrumbElements = function (headingLevel) {
        return {
            container: this.buildBreadcrumbContainer(),
            title: this.buildBreadcrumbTitle(headingLevel),
            clear: this.buildBreacrumbClear()
        };
    };
    AdvancedSearch.prototype.buildBreadcrumbContainer = function () {
        return Dom_1.$$('div', {
            className: 'coveo-advanced-search-breadcrumb'
        });
    };
    AdvancedSearch.prototype.buildBreadcrumbTitle = function (headingLevel) {
        return Dom_1.$$(AccessibilityUtils_1.getHeadingTag(headingLevel, 'span'), {
            className: 'coveo-advanced-search-breadcrumb-title'
        }, Strings_1.l('FiltersInAdvancedSearch') + ":");
    };
    AdvancedSearch.prototype.buildBreacrumbClear = function () {
        var _this = this;
        var clear = Dom_1.$$('span', {
            className: 'coveo-advanced-search-breadcrumb-clear'
        }, SVGIcons_1.SVGIcons.icons.mainClear);
        var selectAction = function () {
            _this.handleClearBreadcrumb();
            _this.usageAnalytics.logSearchEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.breadcrumbAdvancedSearch, {});
            _this.queryController.executeQuery();
        };
        new AccessibleButton_1.AccessibleButton()
            .withElement(clear)
            .withLabel(Strings_1.l('Clear'))
            .withSelectAction(function () { return selectAction(); })
            .build();
        return clear;
    };
    AdvancedSearch.prototype.handleClearBreadcrumb = function () {
        Eif (this.needToPopulateBreadcrumb) {
            this.needToExecuteAdvancedSearch = false;
            this.reset();
            this.needToExecuteAdvancedSearch = true;
        }
    };
    AdvancedSearch.prototype.handleQuerySummaryCancelLastAction = function () {
        this.needToExecuteAdvancedSearch = false;
        this.reset();
        this.needToExecuteAdvancedSearch = true;
    };
    AdvancedSearch.prototype.handlePopulateMenu = function (args) {
        var _this = this;
        args.menuData.push({
            text: Strings_1.l('AdvancedSearch'),
            className: 'coveo-advanced-search',
            onOpen: function () { return _this.open(); },
            onClose: function () { return _this.close(); },
            svgIcon: SVGIcons_1.SVGIcons.icons.dropdownPreferences,
            svgIconClassName: 'coveo-advanced-search-svg'
        });
    };
    AdvancedSearch.prototype.handleBuildingQuery = function (data) {
        var originalQuery = data.queryBuilder.build();
        _.each(this.externalSections, function (section) {
            Eif (section.updateQuery) {
                section.updateQuery(section.inputs, data.queryBuilder);
            }
        });
        _.each(this.inputs, function (input) {
            if (input.updateQuery) {
                input.updateQuery(data.queryBuilder);
            }
        });
        var modifiedQuery = data.queryBuilder.build();
        this.needToPopulateBreadcrumb = modifiedQuery.aq != originalQuery.aq;
    };
    AdvancedSearch.prototype.buildContent = function () {
        var _this = this;
        var component = Dom_1.$$('div');
        var inputSections = [];
        if (this.options.includeKeywords) {
            inputSections.push(this.getKeywordsSection());
        }
        if (this.options.includeDate) {
            inputSections.push(this.getDateSection());
        }
        if (this.options.includeDocument) {
            inputSections.push(this.getDocumentSection());
        }
        this.externalSections = [];
        Dom_1.$$(this.root).trigger(AdvancedSearchEvents_1.AdvancedSearchEvents.buildingAdvancedSearch, {
            sections: this.externalSections,
            executeQuery: function (options) {
                options = _.extend({}, options, { closeModalBox: false });
                return _this.queryController.executeQuery(options);
            }
        });
        _.each(this.externalSections, function (section) {
            component.append(_this.buildExternalSection(section));
        });
        _.each(inputSections, function (section) {
            component.append(_this.buildInternalSection(section));
        });
        this.content = component;
    };
    AdvancedSearch.prototype.getKeywordsSection = function () {
        var sectionName = Strings_1.l('Keywords');
        var keywordsInputs = [];
        keywordsInputs.push(this.inputFactory.createAllKeywordsInput());
        keywordsInputs.push(this.inputFactory.createExactKeywordsInput());
        keywordsInputs.push(this.inputFactory.createAnyKeywordsInput());
        keywordsInputs.push(this.inputFactory.createNoneKeywordsInput());
        return { name: sectionName, inputs: keywordsInputs };
    };
    AdvancedSearch.prototype.getDateSection = function () {
        var sectionName = Strings_1.l('Date');
        var dateInputs = [];
        dateInputs.push(this.inputFactory.createAnytimeDateInput());
        dateInputs.push(this.inputFactory.createInTheLastDateInput());
        dateInputs.push(this.inputFactory.createBetweenDateInput());
        return { name: sectionName, inputs: dateInputs };
    };
    AdvancedSearch.prototype.getDocumentSection = function () {
        var sectionName = Strings_1.l('Document');
        var documentInputs = [];
        documentInputs.push(this.inputFactory.createSimpleFieldInput(Strings_1.l('FileType'), '@filetype'));
        documentInputs.push(this.inputFactory.createSimpleFieldInput(Strings_1.l('Language'), '@language'));
        documentInputs.push(this.inputFactory.createSizeInput());
        documentInputs.push(this.inputFactory.createAdvancedFieldInput(Strings_1.l('Title'), '@title'));
        documentInputs.push(this.inputFactory.createAdvancedFieldInput(Strings_1.l('Author'), '@author'));
        return { name: sectionName, inputs: documentInputs };
    };
    AdvancedSearch.prototype.buildExternalSection = function (section) {
        var el = this.buildSectionTitle(section).el;
        this.inputs = _.union(this.inputs, section.inputs);
        el.appendChild(section.content);
        return el;
    };
    AdvancedSearch.prototype.buildInternalSection = function (section) {
        var _this = this;
        var _a = this.buildSectionTitle(section), el = _a.el, id = _a.id;
        var sectionInputs = [];
        _.each(section.inputs, function (input) {
            sectionInputs.push(_this.buildDefaultInput(input));
        });
        this.inputs = _.union(this.inputs, sectionInputs);
        _.each(sectionInputs, function (input) {
            var built = input.build();
            var inputElement = built.querySelector('input');
            if (inputElement) {
                inputElement.setAttribute('aria-labelledby', id);
            }
            Dom_1.$$(el).append(built);
        });
        return el;
    };
    AdvancedSearch.prototype.buildSectionTitle = function (section) {
        var sectionHTML = Dom_1.$$('div', { className: 'coveo-advanced-search-section' });
        var title = Dom_1.$$('div', { className: 'coveo-advanced-search-section-title' });
        title.text(section.name);
        var id = "coveo-advanced-search-section-" + section.name;
        title.el.id = id;
        sectionHTML.append(title.el);
        return {
            el: sectionHTML.el,
            id: id
        };
    };
    AdvancedSearch.prototype.buildDefaultInput = function (input) {
        Iif (this.isPrebuiltInput(input)) {
            return this.inputFactory.create(input.name, input.parameters);
        }
        else {
            return input;
        }
    };
    AdvancedSearch.prototype.isPrebuiltInput = function (input) {
        return input.name !== undefined;
    };
    AdvancedSearch.prototype.bindEvents = function () {
        var _this = this;
        this.bind.onRootElement(BreadcrumbEvents_1.BreadcrumbEvents.populateBreadcrumb, function (args) {
            return _this.handlePopulateBreadcrumb(args);
        });
        this.bind.onRootElement(BreadcrumbEvents_1.BreadcrumbEvents.clearBreadcrumb, function (args) { return _this.handleClearBreadcrumb(); });
        this.bind.onRootElement(SettingsEvents_1.SettingsEvents.settingsPopulateMenu, function (args) { return _this.handlePopulateMenu(args); });
        this.bind.onRootElement(QueryEvents_1.QueryEvents.buildingQuery, function (data) { return _this.handleBuildingQuery(data); });
        this.bind.onRootElement(AdvancedSearchEvents_1.AdvancedSearchEvents.executeAdvancedSearch, function () { return _this.executeAdvancedSearch(); });
        this.bind.onRootElement(QuerySummaryEvents_1.QuerySummaryEvents.cancelLastAction, function () { return _this.handleQuerySummaryCancelLastAction(); });
    };
    AdvancedSearch.ID = 'AdvancedSearch';
    AdvancedSearch.doExport = function () {
        GlobalExports_1.exportGlobally({
            AdvancedSearch: AdvancedSearch,
            NumericSpinner: NumericSpinner_1.NumericSpinner,
            DatePicker: DatePicker_1.DatePicker,
            Dropdown: Dropdown_1.Dropdown,
            TextInput: TextInput_1.TextInput,
            RadioButton: RadioButton_1.RadioButton
        });
    };
    /**
     * @componentOptions
     */
    AdvancedSearch.options = {
        /**
         * Specifies whether to include the built-in **Keywords** section.
         *
         * Default value is `true`.
         */
        includeKeywords: ComponentOptions_1.ComponentOptions.buildBooleanOption({ defaultValue: true }),
        /**
         * Specifies whether to include the built-in **Date** section.
         *
         * Default value is `true`.
         */
        includeDate: ComponentOptions_1.ComponentOptions.buildBooleanOption({ defaultValue: true }),
        /**
         * Specifies whether to include the built-in **Document** section.
         *
         * Default value is `true`.
         */
        includeDocument: ComponentOptions_1.ComponentOptions.buildBooleanOption({ defaultValue: true })
    };
    return AdvancedSearch;
}(Component_1.Component));
exports.AdvancedSearch = AdvancedSearch;
Initialization_1.Initialization.registerAutoCreateComponent(AdvancedSearch);
 
 
/***/ }),
/* 653 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
var KeywordsInput_1 = __webpack_require__(182);
var Strings_1 = __webpack_require__(4);
var ExactKeywordsInput = /** @class */ (function (_super) {
    __extends(ExactKeywordsInput, _super);
    function ExactKeywordsInput(root) {
        var _this = _super.call(this, Strings_1.l('ExactPhrase'), root) || this;
        _this.root = root;
        return _this;
    }
    ExactKeywordsInput.prototype.getValue = function () {
        var value = _super.prototype.getValue.call(this);
        if (!value) {
            return '';
        }
        return "\"<@-" + value + "-@>\"";
    };
    return ExactKeywordsInput;
}(KeywordsInput_1.KeywordsInput));
exports.ExactKeywordsInput = ExactKeywordsInput;
 
 
/***/ }),
/* 654 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
var KeywordsInput_1 = __webpack_require__(182);
var Strings_1 = __webpack_require__(4);
var AnyKeywordsInput = /** @class */ (function (_super) {
    __extends(AnyKeywordsInput, _super);
    function AnyKeywordsInput(root) {
        var _this = _super.call(this, Strings_1.l('AnyOfTheseWords'), root) || this;
        _this.root = root;
        return _this;
    }
    AnyKeywordsInput.prototype.getValue = function () {
        var value = _super.prototype.getValue.call(this);
        if (!value) {
            return '';
        }
        return _super.prototype.getValue.call(this)
            .replace(/\s+/g, ' ')
            .split(' ')
            .map(function (keyword) { return "\"<@-" + keyword + "-@>\""; })
            .join(' OR ');
    };
    return AnyKeywordsInput;
}(KeywordsInput_1.KeywordsInput));
exports.AnyKeywordsInput = AnyKeywordsInput;
 
 
/***/ }),
/* 655 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
var KeywordsInput_1 = __webpack_require__(182);
var Strings_1 = __webpack_require__(4);
var NoneKeywordsInput = /** @class */ (function (_super) {
    __extends(NoneKeywordsInput, _super);
    function NoneKeywordsInput(root) {
        var _this = _super.call(this, Strings_1.l('NoneOfTheseWords'), root) || this;
        _this.root = root;
        return _this;
    }
    NoneKeywordsInput.prototype.getValue = function () {
        var value = _super.prototype.getValue.call(this);
        if (!value) {
            return '';
        }
        return value
            .replace(/\s+/g, ' ')
            .split(' ')
            .map(function (keyword) { return "NOT \"<@-" + keyword + "-@>\""; })
            .join(' ');
    };
    return NoneKeywordsInput;
}(KeywordsInput_1.KeywordsInput));
exports.NoneKeywordsInput = NoneKeywordsInput;
 
 
/***/ }),
/* 656 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
var DateInput_1 = __webpack_require__(323);
var Dom_1 = __webpack_require__(0);
var Strings_1 = __webpack_require__(4);
var Dropdown_1 = __webpack_require__(92);
var NumericSpinner_1 = __webpack_require__(143);
var DateUtils_1 = __webpack_require__(43);
var InTheLastDateInput = /** @class */ (function (_super) {
    __extends(InTheLastDateInput, _super);
    function InTheLastDateInput(root) {
        var _this = _super.call(this, Strings_1.l('InTheLast'), root) || this;
        _this.root = root;
        return _this;
    }
    InTheLastDateInput.prototype.reset = function () {
        this.dropdown.reset();
        this.spinner.reset();
    };
    InTheLastDateInput.prototype.build = function () {
        _super.prototype.build.call(this);
        var input = Dom_1.$$('fieldset', { className: 'coveo-advanced-search-date-input' });
        input.el.disabled = true;
        this.spinner = new NumericSpinner_1.NumericSpinner(this.onChange.bind(this), undefined, undefined, Strings_1.l('InTheLast'));
        input.append(this.spinner.getElement());
        this.dropdown = new Dropdown_1.Dropdown(this.onChange.bind(this), ['Days', 'Months'], undefined, Strings_1.l('InTheLast'));
        this.dropdown.setId('coveo-advanced-search-in-the-last-select');
        input.append(this.dropdown.getElement());
        this.element.appendChild(input.el);
        Dom_1.$$(this.getRadio()).on('change', this.onChange.bind(this));
        return this.element;
    };
    InTheLastDateInput.prototype.getValue = function () {
        var currentDate = new Date();
        var time = this.spinner.getIntValue();
        var size = this.dropdown.getValue().toLowerCase();
        var date = new Date();
        if (size == 'months') {
            date.setMonth(currentDate.getMonth() - time);
        }
        else {
            date.setDate(currentDate.getDate() - time);
        }
        return this.isSelected() && time ? '@date>=' + DateUtils_1.DateUtils.dateForQuery(date) : '';
    };
    return InTheLastDateInput;
}(DateInput_1.DateInput));
exports.InTheLastDateInput = InTheLastDateInput;
 
 
/***/ }),
/* 657 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
var DateInput_1 = __webpack_require__(323);
var DatePicker_1 = __webpack_require__(140);
var Strings_1 = __webpack_require__(4);
var Dom_1 = __webpack_require__(0);
var DateUtils_1 = __webpack_require__(43);
var TimeSpanUtils_1 = __webpack_require__(166);
var BetweenDateInput = /** @class */ (function (_super) {
    __extends(BetweenDateInput, _super);
    function BetweenDateInput(root) {
        var _this = _super.call(this, Strings_1.l('Between'), root) || this;
        _this.root = root;
        _this.firstDatePicker = new DatePicker_1.DatePicker(_this.onChange.bind(_this));
        _this.secondDatePicker = new DatePicker_1.DatePicker(_this.onChange.bind(_this));
        return _this;
    }
    BetweenDateInput.prototype.reset = function () {
        this.firstDatePicker.reset();
        this.secondDatePicker.reset();
    };
    BetweenDateInput.prototype.build = function () {
        _super.prototype.build.call(this);
        var container = Dom_1.$$('fieldset', { className: 'coveo-advanced-search-date-input' });
        container.el.disabled = true;
        container.append(this.firstDatePicker.getElement());
        container.append(this.buildAnd());
        container.append(this.secondDatePicker.getElement());
        this.element.appendChild(container.el);
        return this.element;
    };
    BetweenDateInput.prototype.getValue = function () {
        var firstDate = this.firstDatePicker.getDateValue();
        var secondDate = this.secondDatePicker.getDateValue();
        var firstDateAsString = this.firstDatePicker.getValue();
        var secondDateAsString = this.secondDatePicker.getValue();
        var query = '';
        if (this.isSelected()) {
            if (firstDate && secondDate) {
                var timespan = TimeSpanUtils_1.TimeSpan.fromDates(DateUtils_1.DateUtils.convertFromJsonDateIfNeeded(firstDate), DateUtils_1.DateUtils.convertFromJsonDateIfNeeded(secondDateAsString));
                if (timespan.getMilliseconds() < 0) {
                    throw Strings_1.l('QueryExceptionInvalidDate');
                }
            }
            if (firstDateAsString) {
                query += "(@date>=" + firstDateAsString + ")";
            }
            if (secondDateAsString) {
                query += "(@date<=" + secondDateAsString + ")";
            }
        }
        return query;
    };
    BetweenDateInput.prototype.buildAnd = function () {
        var and = Dom_1.$$('div', { className: 'coveo-advanced-search-and' });
        and.text(Strings_1.l('And').toLowerCase());
        return and.el;
    };
    return BetweenDateInput;
}(DateInput_1.DateInput));
exports.BetweenDateInput = BetweenDateInput;
 
 
/***/ }),
/* 658 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
var _ = __webpack_require__(1);
var FacetUtils_1 = __webpack_require__(49);
var Dom_1 = __webpack_require__(0);
var QueryBuilder_1 = __webpack_require__(24);
var Dropdown_1 = __webpack_require__(92);
var DocumentInput_1 = __webpack_require__(232);
var SimpleFieldInput = /** @class */ (function (_super) {
    __extends(SimpleFieldInput, _super);
    function SimpleFieldInput(inputName, fieldName, endpoint, root) {
        var _this = _super.call(this, inputName, root) || this;
        _this.inputName = inputName;
        _this.fieldName = fieldName;
        _this.endpoint = endpoint;
        _this.root = root;
        return _this;
    }
    SimpleFieldInput.prototype.reset = function () {
        this.dropDown.reset();
    };
    SimpleFieldInput.prototype.build = function () {
        var _this = this;
        var fieldInput = Dom_1.$$(_super.prototype.build.call(this));
        this.buildFieldSelect().then(function () {
            fieldInput.append(_this.dropDown.getElement());
        });
        this.element = fieldInput.el;
        return this.element;
    };
    SimpleFieldInput.prototype.getValue = function () {
        var value = this.dropDown ? this.dropDown.getValue() : '';
        var queryBuilder = new QueryBuilder_1.QueryBuilder();
        if (value) {
            queryBuilder.advancedExpression.addFieldExpression(this.fieldName, '==', [value]);
            return queryBuilder.build().aq;
        }
        else {
            return '';
        }
    };
    SimpleFieldInput.prototype.buildFieldSelect = function () {
        var _this = this;
        return this.endpoint
            .listFieldValues({
            field: this.fieldName,
            maximumNumberOfValues: 50
        })
            .then(function (values) {
            var options = [''];
            _.each(values, function (value) {
                options.push(value.value);
            });
            _this.dropDown = new Dropdown_1.Dropdown(_this.onChange.bind(_this), options, function (str) {
                return FacetUtils_1.FacetUtils.tryToGetTranslatedCaption(_this.fieldName, str);
            }, _this.inputName);
        });
    };
    return SimpleFieldInput;
}(DocumentInput_1.DocumentInput));
exports.SimpleFieldInput = SimpleFieldInput;
 
 
/***/ }),
/* 659 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
var Dropdown_1 = __webpack_require__(92);
var TextInput_1 = __webpack_require__(80);
var Dom_1 = __webpack_require__(0);
var DocumentInput_1 = __webpack_require__(232);
var QueryBuilder_1 = __webpack_require__(24);
var AdvancedFieldInput = /** @class */ (function (_super) {
    __extends(AdvancedFieldInput, _super);
    function AdvancedFieldInput(inputName, fieldName, root) {
        var _this = _super.call(this, inputName, root) || this;
        _this.inputName = inputName;
        _this.fieldName = fieldName;
        _this.root = root;
        return _this;
    }
    AdvancedFieldInput.prototype.reset = function () {
        this.mode.reset();
        this.input.reset();
    };
    AdvancedFieldInput.prototype.build = function () {
        var fieldInput = Dom_1.$$(_super.prototype.build.call(this));
        this.mode = new Dropdown_1.Dropdown(this.onChange.bind(this), ['Contains', 'DoesNotContain', 'Matches'], undefined, this.inputName);
        fieldInput.append(this.mode.getElement());
        this.input = new TextInput_1.TextInput(this.onChange.bind(this), this.inputName);
        fieldInput.append(this.input.getElement());
        this.element = fieldInput.el;
        return this.element;
    };
    AdvancedFieldInput.prototype.getValue = function () {
        var inputValue = this.input.getValue();
        var builder = new QueryBuilder_1.QueryBuilder();
        if (inputValue) {
            switch (this.mode.getValue()) {
                case 'Contains':
                    builder.advancedExpression.addFieldExpression(this.fieldName, '=', [inputValue]);
                    return builder.build().aq;
                case 'DoesNotContain':
                    builder.advancedExpression.addFieldExpression(this.fieldName, '<>', [inputValue]);
                    return builder.build().aq;
                default:
                    builder.advancedExpression.addFieldExpression(this.fieldName, '==', [inputValue]);
                    return builder.build().aq;
            }
        }
        return '';
    };
    return AdvancedFieldInput;
}(DocumentInput_1.DocumentInput));
exports.AdvancedFieldInput = AdvancedFieldInput;
 
 
/***/ }),
/* 660 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
var Strings_1 = __webpack_require__(4);
var Dom_1 = __webpack_require__(0);
var QueryBuilder_1 = __webpack_require__(24);
var Dropdown_1 = __webpack_require__(92);
var NumericSpinner_1 = __webpack_require__(143);
var DocumentInput_1 = __webpack_require__(232);
var SizeInput = /** @class */ (function (_super) {
    __extends(SizeInput, _super);
    function SizeInput(root) {
        var _this = _super.call(this, 'Size', root) || this;
        _this.root = root;
        return _this;
    }
    SizeInput.prototype.reset = function () {
        this.modeSelect.reset();
        this.sizeInput.reset();
    };
    SizeInput.prototype.build = function () {
        var sizeInput = Dom_1.$$(_super.prototype.build.call(this));
        var sizeInputSection = Dom_1.$$('div', { className: 'coveo-size-input-mode-section' });
        this.modeSelect = new Dropdown_1.Dropdown(this.onChange.bind(this), SizeInput.modes, undefined, Strings_1.l('Size'));
        this.modeSelect.setId('coveo-size-input-mode');
        sizeInputSection.append(this.modeSelect.getElement());
        this.sizeInput = new NumericSpinner_1.NumericSpinner(this.onChange.bind(this), undefined, undefined, Strings_1.l('SizeValue'));
        sizeInputSection.append(this.sizeInput.getElement());
        this.sizeSelect = new Dropdown_1.Dropdown(this.onChange.bind(this), SizeInput.sizes, undefined, Strings_1.l('UnitMeasurement'));
        this.sizeSelect.setId('coveo-size-input-select');
        sizeInputSection.append(this.sizeSelect.getElement());
        sizeInput.append(sizeInputSection.el);
        this.element = sizeInput.el;
        return this.element;
    };
    SizeInput.prototype.getValue = function () {
        var size = this.getSizeInBytes();
        var queryBuilder = new QueryBuilder_1.QueryBuilder();
        if (size) {
            switch (this.modeSelect.getValue()) {
                case 'AtLeast':
                    queryBuilder.advancedExpression.addFieldExpression('@size', '>=', [this.getSizeInBytes().toString()]);
                    return queryBuilder.build().aq;
                default:
                    queryBuilder.advancedExpression.addFieldExpression('@size', '<=', [this.getSizeInBytes().toString()]);
                    return queryBuilder.build().aq;
            }
        }
        return '';
    };
    SizeInput.prototype.getSizeInBytes = function () {
        var size = this.sizeInput.getFloatValue();
        switch (this.sizeSelect.getValue()) {
            case 'KB':
                return size * 1024;
            case 'MB':
                return size * Math.pow(1024, 2);
            default:
                return size;
        }
    };
    SizeInput.modes = ['AtLeast', 'AtMost'];
    SizeInput.sizes = ['KB', 'MB', 'Bytes'];
    return SizeInput;
}(DocumentInput_1.DocumentInput));
exports.SizeInput = SizeInput;
 
 
/***/ }),
/* 661 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
/**
 * This static class is there to contains the different string definition for all the events related to the {@link AdvancedSearch} component.
 */
var QuerySummaryEvents = /** @class */ (function () {
    function QuerySummaryEvents() {
    }
    /**
     * Triggered when the last action is being cancelled by the query summary component
     *
     * Allows external code to revert their last action.
     * @type {string}
     */
    QuerySummaryEvents.cancelLastAction = 'cancelLastAction';
    return QuerySummaryEvents;
}());
exports.QuerySummaryEvents = QuerySummaryEvents;
 
 
/***/ }),
/* 662 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
var Component_1 = __webpack_require__(6);
var ComponentOptions_1 = __webpack_require__(13);
var QueryEvents_1 = __webpack_require__(14);
var Initialization_1 = __webpack_require__(8);
var Dom_1 = __webpack_require__(0);
var Globalize = __webpack_require__(28);
var _ = __webpack_require__(1);
var GlobalExports_1 = __webpack_require__(10);
/**
 * The Aggregate component allows to display the result on an aggregate operation on the index.
 *
 * It hooks itself to the query to add a new {@link IGroupByRequest}, then displays the result.
 */
var Aggregate = /** @class */ (function (_super) {
    __extends(Aggregate, _super);
    /**
     * Creates a new Aggregate component.
     * @param element The HTMLElement on which to instantiate the component.
     * @param options The options for the Aggregate component.
     * @param bindings The bindings that the component requires to function normally. If not set, these will be
     * automatically resolved (with a slower execution time).
     */
    function Aggregate(element, options, bindings) {
        var _this = _super.call(this, element, Aggregate.ID, bindings) || this;
        _this.element = element;
        _this.options = options;
        _this.options = ComponentOptions_1.ComponentOptions.initComponentOptions(element, Aggregate, options);
        _this.bind.onRootElement(QueryEvents_1.QueryEvents.buildingQuery, function (args) { return _this.handleBuildingQuery(args); });
        _this.bind.onRootElement(QueryEvents_1.QueryEvents.querySuccess, function (args) { return _this.handleQuerySuccess(args); });
        Dom_1.$$(_this.element).hide();
        return _this;
    }
    Aggregate.doExport = function () {
        GlobalExports_1.exportGlobally({
            Aggregate: Aggregate
        });
    };
    Aggregate.prototype.handleBuildingQuery = function (args) {
        var request = {
            field: this.options.field,
            maximumNumberOfValues: 0,
            computedFields: [
                {
                    field: this.options.field,
                    operation: this.options.operation
                }
            ]
        };
        this.index = args.queryBuilder.groupByRequests.length;
        args.queryBuilder.groupByRequests.push(request);
    };
    Aggregate.prototype.handleQuerySuccess = function (args) {
        if (_.isNumber(this.index) && args.results.groupByResults.length != 0) {
            var gbr = args.results.groupByResults[this.index];
            var aggregate = gbr.globalComputedFieldResults[0];
            Dom_1.$$(this.element).text(Globalize.format(aggregate, this.options.format));
            Dom_1.$$(this.element).show();
        }
        else {
            Dom_1.$$(this.element).hide();
        }
    };
    Aggregate.ID = 'Aggregate';
    /**
     * The options for the component
     * @componentOptions
     */
    Aggregate.options = {
        /**
         * Specifies the field on which to do the aggregate operation. This parameter is mandatory.
         */
        field: ComponentOptions_1.ComponentOptions.buildFieldOption({ required: true }),
        /**
         * Specifies the aggregate operation to perform.
         *
         * The possible values are:
         * - `sum` - Computes the sum of the computed field values.
         * - `average` - Computes the average of the computed field values.
         * - `minimum` - Finds the minimum value of the computed field values.
         * - `maximum` - Finds the maximum value of the computed field values.
         *
         * Default value is `sum`.
         */
        operation: ComponentOptions_1.ComponentOptions.buildStringOption({ defaultValue: 'sum' }),
        /**
         * Specifies how to format the value.
         *
         * The available formats are defined in the Globalize library (see
         * [Globalize](https://github.com/klaaspieter/jquery-global#globalizeformat-value-format-culture-).
         *
         * The most commonly used formats are:
         * - `c0` - Formats the value as a currency.
         * - `n0` - Formats the value as an integer.
         * - `n2` - Formats the value as a floating point with 2 decimal digits.
         *
         * Default value is `c0`.
         */
        format: ComponentOptions_1.ComponentOptions.buildStringOption({ defaultValue: 'c0' })
    };
    return Aggregate;
}(Component_1.Component));
exports.Aggregate = Aggregate;
Initialization_1.Initialization.registerAutoCreateComponent(Aggregate);
 
 
/***/ }),
/* 663 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
var _ = __webpack_require__(1);
var OmniboxEvents_1 = __webpack_require__(47);
var QueryEvents_1 = __webpack_require__(14);
var GlobalExports_1 = __webpack_require__(10);
var Assert_1 = __webpack_require__(12);
var QueryStateModel_1 = __webpack_require__(17);
var Strings_1 = __webpack_require__(4);
var AccessibleButton_1 = __webpack_require__(20);
var Dom_1 = __webpack_require__(0);
var AnalyticsActionListMeta_1 = __webpack_require__(7);
var Component_1 = __webpack_require__(6);
var ComponentOptions_1 = __webpack_require__(13);
var Initialization_1 = __webpack_require__(8);
var SuggestionForOmnibox_1 = __webpack_require__(664);
var SearchInterface_1 = __webpack_require__(25);
/**
 * The AnalyticsSuggestion component provides query suggestions based on the queries that a Coveo Analytics service most
 * commonly logs (see [`topQueries`](https://platform.cloud.coveo.com/docs?urls.primaryName=Usage%20Analytics%20Read#/Statistics%20API%20-%20Version%2015/get__v15_stats_topQueries)).
 *
 * This component orders possible query suggestions by their respective number of successful item views, thus
 * prioritizing the most relevant query suggestions. Consequently, when better options are available, this component
 * does not suggest queries resulting in no clicks from users or requiring refinements.
 *
 * The query suggestions appear in the {@link Omnibox} Component. The AnalyticsSuggestion component strongly
 * relates to the {@link Analytics} component. While a user is typing in a query box, the AnalyticsSuggestion component
 * allows them to see and select the most commonly used and relevant queries.
 *
 * @deprecated This component is exposed for legacy reasons. If possible, you should avoid using this component.
 * Instead, you should use the [`Omnibox`]{@link Omnibox}
 * [`enableQuerySuggestAddon`]{@link Omnibox.options.enableQuerySuggestAddon} option.
 */
var AnalyticsSuggestions = /** @class */ (function (_super) {
    __extends(AnalyticsSuggestions, _super);
    /**
     * Creates a new AnalyticsSuggestions component.
     *
     * Also binds event handlers so that when a user selects a suggestion, an `omniboxFromLink` usage analytics event is
     * logged if the suggestion comes from a standalone search box, or an `omniboxAnalytics` usage analytics
     * event is logged otherwise.
     *
     * @param element The HTMLElement on which to instantiate the component.
     * @param options The options for the AnalyticsSuggestions component.
     * @param bindings The bindings that the component requires to function normally. If not set, these will be
     * automatically resolved (with a slower execution time).
     */
    function AnalyticsSuggestions(element, options, bindings) {
        var _this = _super.call(this, element, AnalyticsSuggestions.ID, bindings) || this;
        _this.options = options;
        _this.partialQueries = [];
        _this.lastSuggestions = [];
        _this.resultsToBuildWith = [];
        Iif (_this.options && 'omniboxSuggestionOptions' in _this.options) {
            _this.options = _.extend(_this.options, _this.options['omniboxSuggestionOptions']);
        }
        _this.options = ComponentOptions_1.ComponentOptions.initComponentOptions(element, AnalyticsSuggestions, _this.options);
        var rowTemplate = function (toRender) {
            var rowElement = Dom_1.$$('div', {
                className: 'magic-box-suggestion coveo-omnibox-selectable coveo-top-analytics-suggestion-row'
            });
            new AccessibleButton_1.AccessibleButton()
                .withElement(rowElement)
                .withLabel(toRender.rawValue)
                .build();
            Eif (toRender['data']) {
                rowElement.el.innerHTML = toRender['data'];
            }
            return rowElement.el.outerHTML;
        };
        _this.options.onSelect = _this.options.onSelect || _this.onRowSelection;
        var suggestionStructure = {
            row: rowTemplate
        };
        _this.suggestionForOmnibox = new SuggestionForOmnibox_1.SuggestionForOmnibox(suggestionStructure, function (value, args) {
            _this.options.onSelect.call(_this, value, args);
        }, function (value, args) {
            _this.onRowTab.call(_this, value, args);
        });
        _this.bind.onRootElement(OmniboxEvents_1.OmniboxEvents.populateOmnibox, function (args) { return _this.handlePopulateOmnibox(args); });
        _this.bind.onRootElement(QueryEvents_1.QueryEvents.querySuccess, function () { return (_this.partialQueries = []); });
        return _this;
    }
    AnalyticsSuggestions.doExport = function () {
        GlobalExports_1.exportGlobally({
            AnalyticsSuggestions: AnalyticsSuggestions
        });
    };
    AnalyticsSuggestions.prototype.selectSuggestion = function (suggestion) {
        Eif (this.currentlyDisplayedSuggestions) {
            if (isNaN(suggestion)) {
                Eif (this.currentlyDisplayedSuggestions[suggestion]) {
                    Dom_1.$$(this.currentlyDisplayedSuggestions[suggestion].element).trigger('click');
                }
            }
            else {
                var currentlySuggested = _.findWhere(this.currentlyDisplayedSuggestions, {
                    pos: suggestion
                });
                Eif (currentlySuggested) {
                    Dom_1.$$(currentlySuggested.element).trigger('click');
                }
            }
        }
    };
    AnalyticsSuggestions.prototype.handlePopulateOmnibox = function (args) {
        var _this = this;
        Assert_1.Assert.exists(args);
        var promise = new Promise(function (resolve, reject) {
            var searchPromise = _this.usageAnalytics.getTopQueries({
                pageSize: _this.options.numberOfSuggestions,
                queryText: args.completeQueryExpression.word
            });
            searchPromise.then(function (results) {
                _this.resultsToBuildWith = _.map(results, function (result) {
                    return {
                        value: result
                    };
                });
                _this.lastSuggestions = results;
                Eif (!_.isEmpty(_this.resultsToBuildWith) && args.completeQueryExpression.word != '') {
                    _this.partialQueries.push(args.completeQueryExpression.word);
                }
                var element = _this.suggestionForOmnibox.buildOmniboxElement(_this.resultsToBuildWith, args);
                _this.currentlyDisplayedSuggestions = {};
                Eif (element) {
                    _.map(Dom_1.$$(element).findAll('.coveo-omnibox-selectable'), function (selectable, i) {
                        _this.currentlyDisplayedSuggestions[Dom_1.$$(selectable).text()] = {
                            element: selectable,
                            pos: i
                        };
                    });
                }
                resolve({
                    element: element,
                    zIndex: _this.options.omniboxZIndex
                });
            });
            searchPromise.catch(function () {
                resolve({
                    element: undefined
                });
            });
        });
        args.rows.push({ deferred: promise });
    };
    AnalyticsSuggestions.prototype.onRowSelection = function (value, args) {
        args.clear();
        args.closeOmnibox();
        this.queryStateModel.set(QueryStateModel_1.QueryStateModel.attributesEnum.q, value);
        this.usageAnalytics.logSearchEvent(this.getOmniboxAnalyticsEventCause(), {
            partialQueries: this.cleanCustomData(this.partialQueries),
            suggestionRanking: _.indexOf(_.pluck(this.resultsToBuildWith, 'value'), value),
            suggestions: this.cleanCustomData(this.lastSuggestions),
            partialQuery: args.completeQueryExpression.word
        });
        this.queryController.executeQuery();
    };
    AnalyticsSuggestions.prototype.onRowTab = function (value, args) {
        args.clear();
        args.closeOmnibox();
        this.queryStateModel.set(QueryStateModel_1.QueryStateModel.attributesEnum.q, "" + value);
        this.usageAnalytics.logCustomEvent(this.getOmniboxAnalyticsEventCause(), {
            partialQueries: this.cleanCustomData(this.partialQueries),
            suggestionRanking: _.indexOf(_.pluck(this.resultsToBuildWith, 'value'), value),
            suggestions: this.cleanCustomData(this.lastSuggestions),
            partialQuery: args.completeQueryExpression.word
        }, this.element);
    };
    AnalyticsSuggestions.prototype.cleanCustomData = function (toClean, rejectLength) {
        Eif (rejectLength === void 0) { rejectLength = 256; }
        // Filter out only consecutive values that are the identical
        toClean = _.compact(_.filter(toClean, function (partial, pos, array) {
            return pos === 0 || partial !== array[pos - 1];
        }));
        // Custom dimensions cannot be an array in analytics service: Send a string joined by ; instead.
        // Need to replace ;
        toClean = _.map(toClean, function (partial) {
            return partial.replace(/;/g, '');
        });
        // Reduce right to get the last X words that adds to less then rejectLength
        var reducedToRejectLengthOrLess = [];
        _.reduceRight(toClean, function (memo, partial) {
            var totalSoFar = memo + partial.length;
            if (totalSoFar <= rejectLength) {
                reducedToRejectLengthOrLess.push(partial);
            }
            return totalSoFar;
        }, 0);
        toClean = reducedToRejectLengthOrLess.reverse();
        var ret = toClean.join(';');
        // analytics service can store max 256 char in a custom event
        // if we're over that, call cleanup again with an arbitrary 10 less char accepted
        Iif (ret.length >= 256) {
            return this.cleanCustomData(toClean, rejectLength - 10);
        }
        return toClean.join(';');
    };
    AnalyticsSuggestions.prototype.getOmniboxAnalyticsEventCause = function () {
        Iif (this.searchInterface instanceof SearchInterface_1.StandaloneSearchInterface) {
            return AnalyticsActionListMeta_1.analyticsActionCauseList.omniboxFromLink;
        }
        return AnalyticsActionListMeta_1.analyticsActionCauseList.omniboxAnalytics;
    };
    AnalyticsSuggestions.ID = 'AnalyticsSuggestions';
    /**
     * The options for the component
     * @componentOptions
     */
    AnalyticsSuggestions.options = {
        /**
         * Specifies the z-index position at which the query suggestions render themselves in the {@link Omnibox}
         * component. Higher values are placed first.
         *
         * Default value is `52` and minimum value is `0`.
         */
        omniboxZIndex: ComponentOptions_1.ComponentOptions.buildNumberOption({ defaultValue: 52, min: 0 }),
        /**
         * Specifies the title of the query suggestions group in the {@link Omnibox} component. This option is not available
         * when using the default Lightning Friendly Theme.
         *
         * Default value is the localized string for `"Suggested Queries"`.
         */
        headerTitle: ComponentOptions_1.ComponentOptions.buildLocalizedStringOption({
            localizedString: function () { return Strings_1.l('SuggestedQueries'); }
        }),
        /**
         * Specifies the number of query suggestions to request and display in the {@link Omnibox} component.
         *
         * Default value is `5` and minimum value is `1`.
         */
        numberOfSuggestions: ComponentOptions_1.ComponentOptions.buildNumberOption({ defaultValue: 5, min: 1 })
    };
    return AnalyticsSuggestions;
}(Component_1.Component));
exports.AnalyticsSuggestions = AnalyticsSuggestions;
Initialization_1.Initialization.registerAutoCreateComponent(AnalyticsSuggestions);
 
 
/***/ }),
/* 664 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var DomUtils_1 = __webpack_require__(137);
var Dom_1 = __webpack_require__(0);
var _ = __webpack_require__(1);
var SuggestionForOmnibox = /** @class */ (function () {
    function SuggestionForOmnibox(structure, onSelect, onTabPress) {
        this.structure = structure;
        this.onSelect = onSelect;
        this.onTabPress = onTabPress;
    }
    SuggestionForOmnibox.prototype.buildOmniboxElement = function (results, args) {
        var element;
        Eif (results.length != 0) {
            element = Dom_1.$$('div').el;
            if (this.structure.header) {
                var header = this.buildElementHeader();
                element.appendChild(header);
            }
            var rows = this.buildRowElements(results, args);
            _.each(rows, function (row) {
                element.appendChild(row);
            });
        }
        return element;
    };
    SuggestionForOmnibox.prototype.buildElementHeader = function () {
        return Dom_1.$$('div', undefined, this.structure.header.template({
            headerTitle: this.structure.header.title
        })).el;
    };
    SuggestionForOmnibox.prototype.buildRowElements = function (results, args) {
        var _this = this;
        var ret = [];
        _.each(results, function (result) {
            var row = Dom_1.$$('div', undefined, _this.structure.row({
                rawValue: result.value,
                data: DomUtils_1.DomUtils.highlightElement(result.value, args.completeQueryExpression.word)
            })).el;
            Dom_1.$$(row).on('click', function () {
                _this.onSelect.call(_this, result.value, args);
            });
            Dom_1.$$(row).on('keyboardSelect', function () {
                _this.onSelect.call(_this, result.value, args);
            });
            Dom_1.$$(row).on('tabSelect', function () {
                _this.onTabPress.call(_this, result.value, args);
            });
            ret.push(row);
        });
        return ret;
    };
    return SuggestionForOmnibox;
}());
exports.SuggestionForOmnibox = SuggestionForOmnibox;
 
 
/***/ }),
/* 665 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
var Component_1 = __webpack_require__(6);
var ComponentOptions_1 = __webpack_require__(13);
var Assert_1 = __webpack_require__(12);
var QueryEvents_1 = __webpack_require__(14);
var InitializationEvents_1 = __webpack_require__(22);
var SettingsEvents_1 = __webpack_require__(66);
var DomUtils_1 = __webpack_require__(137);
var Dom_1 = __webpack_require__(0);
var Initialization_1 = __webpack_require__(8);
var Strings_1 = __webpack_require__(4);
var ExternalModulesShim_1 = __webpack_require__(39);
var _ = __webpack_require__(1);
var GlobalExports_1 = __webpack_require__(10);
__webpack_require__(1087);
var SVGIcons_1 = __webpack_require__(16);
var HashUtils_1 = __webpack_require__(88);
var QueryStateModel_1 = __webpack_require__(17);
var LocalStorageUtils_1 = __webpack_require__(96);
var handshakeTokenParamName = 'handshake_token';
/**
 * The `AuthenticationProvider` component makes it possible to execute queries with an identity that the end user
 * can obtain using an authentication provider configured on the Coveo REST Search API
 * (see [Claims Authentication](https://docs.coveo.com/en/113/)).
 *
 * When necessary, this component handles redirecting the browser to the address that starts the authentication process.
 *
 * You can use the `data-tab` attribute to enable the `AuthenticationProvider` component only for the tabs of your
 * search interface that require authentication (see the [`Tab`]{@link Tab} component).
 */
var AuthenticationProvider = /** @class */ (function (_super) {
    __extends(AuthenticationProvider, _super);
    /**
     * Creates a new `AuthenticationProvider` component.
     * @param element The HTMLElement on which to instantiate the component.
     * @param options The options for the `AuthenticationProvider` component.
     * @param bindings The bindings that the component requires to function normally. If not set, these will be
     * automatically resolved (with a slower execution time).
     */
    function AuthenticationProvider(element, options, bindings, _window) {
        Iif (options === void 0) { options = {}; }
        var _this = _super.call(this, element, AuthenticationProvider.ID, bindings) || this;
        _this.element = element;
        _this.options = options;
        _this._window = _window;
        _this.storage = new LocalStorageUtils_1.SafeLocalStorage();
        _this.options = ComponentOptions_1.ComponentOptions.initComponentOptions(element, AuthenticationProvider, options);
        Assert_1.Assert.exists(_this.options.name);
        _this.handlers = [];
        _this._window = _this._window || window;
        _this.redirectCount = 0;
        _this.bind.onRootElement(QueryEvents_1.QueryEvents.buildingCallOptions, _this.handleBuildingCallOptions);
        _this.bind.onRootElement(QueryEvents_1.QueryEvents.queryError, _this.handleQueryError);
        _this.bind.onRootElement(InitializationEvents_1.InitializationEvents.nuke, _this.handleNuke);
        _this.bind.onRootElement(InitializationEvents_1.InitializationEvents.afterComponentsInitialization, function (args) {
            return _this.onAfterComponentsInitialization(args);
        });
        _this.bind.onRootElement(SettingsEvents_1.SettingsEvents.settingsPopulateMenu, function (args) {
            args.menuData.push({
                text: Strings_1.l('Reauthenticate', _this.options.caption),
                className: 'coveo-authentication-provider',
                onOpen: function () { return _this.authenticateWithProvider(); },
                svgIcon: SVGIcons_1.SVGIcons.icons.dropdownAuthenticate,
                svgIconClassName: 'coveo-authentication-provider-svg'
            });
        });
        return _this;
    }
    AuthenticationProvider.prototype.getHandshakeTokenFromUrl = function () {
        var hash = this.getHashAfterAdjustingForAngular();
        var token = HashUtils_1.HashUtils.getValue(handshakeTokenParamName, hash);
        return typeof token === 'string' ? token : '';
    };
    AuthenticationProvider.prototype.getHashAfterAdjustingForAngular = function () {
        var hash = HashUtils_1.HashUtils.getHash();
        return this.isAngularHash ? "#" + hash.slice(2) : hash;
    };
    Object.defineProperty(AuthenticationProvider.prototype, "isAngularHash", {
        get: function () {
            var rawHash = HashUtils_1.HashUtils.getHash();
            return rawHash.indexOf('#/') === 0;
        },
        enumerable: true,
        configurable: true
    });
    AuthenticationProvider.prototype.onAfterComponentsInitialization = function (args) {
        var _this = this;
        if (AuthenticationProvider.handshakeInProgress) {
            var promise_1 = this.waitForHandshakeToFinish().then(function () { return _this.loadAccessTokenFromStorage(); });
            args.defer.push(promise_1);
            return;
        }
        var handshakeToken = this.getHandshakeTokenFromUrl();
        if (!handshakeToken) {
            return this.loadAccessTokenFromStorage();
        }
        if (!this.shouldExchangeHandshakeToken) {
            return;
        }
        this.enableHandshakeInProgressFlag();
        var promise = this.exchangeHandshakeToken(handshakeToken)
            .then(function (token) { return _this.storeAccessToken(token); })
            .then(function () { return _this.removeHandshakeTokenFromUrl(); })
            .then(function () { return _this.loadAccessTokenFromStorage(); })
            .catch(function (e) { return _this.logger.error(e); })
            .finally(function () { return _this.disableHandshakeInProgressFlag(); });
        args.defer.push(promise);
    };
    Object.defineProperty(AuthenticationProvider.prototype, "shouldExchangeHandshakeToken", {
        get: function () {
            var tabId = Dom_1.$$(this.element).getAttribute('data-tab');
            var hash = HashUtils_1.HashUtils.getHash();
            var activeTabId = HashUtils_1.HashUtils.getValue(QueryStateModel_1.QUERY_STATE_ATTRIBUTES.T, hash);
            return !tabId || tabId === activeTabId;
        },
        enumerable: true,
        configurable: true
    });
    AuthenticationProvider.prototype.exchangeHandshakeToken = function (handshakeToken) {
        var accessToken = this.getAccessTokenFromStorage();
        var options = accessToken ? { handshakeToken: handshakeToken, accessToken: accessToken } : { handshakeToken: handshakeToken };
        return this.queryController.getEndpoint().exchangeHandshakeToken(options);
    };
    AuthenticationProvider.prototype.storeAccessToken = function (accessToken) {
        this.storage.setItem(this.accessTokenStorageKey, accessToken);
    };
    Object.defineProperty(AuthenticationProvider.prototype, "accessTokenStorageKey", {
        get: function () {
            var organizationId = this.queryController.getEndpoint().options.queryStringArguments.organizationId;
            return "coveo-auth-provider-access-token-" + organizationId;
        },
        enumerable: true,
        configurable: true
    });
    AuthenticationProvider.prototype.waitForHandshakeToFinish = function () {
        return new Promise(function (resolve) {
            var interval = setInterval(function () {
                if (AuthenticationProvider.handshakeInProgress) {
                    return;
                }
                clearInterval(interval);
                resolve();
            }, 100);
        });
    };
    AuthenticationProvider.prototype.enableHandshakeInProgressFlag = function () {
        AuthenticationProvider.handshakeInProgress = true;
    };
    AuthenticationProvider.prototype.disableHandshakeInProgressFlag = function () {
        AuthenticationProvider.handshakeInProgress = false;
    };
    AuthenticationProvider.prototype.removeHandshakeTokenFromUrl = function () {
        var delimiter = "&";
        var hash = this.getHashAfterAdjustingForAngular();
        var token = this.getHandshakeTokenFromUrl();
        var handshakeEntry = handshakeTokenParamName + "=" + token;
        var entries = hash.substr(1).split(delimiter);
        var newHash = entries.filter(function (param) { return param !== handshakeEntry; }).join(delimiter);
        var adjustedHash = this.isAngularHash ? "/" + newHash : newHash;
        this._window.history.replaceState(null, '', "#" + adjustedHash);
    };
    AuthenticationProvider.prototype.loadAccessTokenFromStorage = function () {
        var token = this.getAccessTokenFromStorage();
        token && this.queryController.getEndpoint().accessToken.updateToken(token);
    };
    AuthenticationProvider.prototype.getAccessTokenFromStorage = function () {
        return this.storage.getItem(this.accessTokenStorageKey);
    };
    AuthenticationProvider.prototype.handleBuildingCallOptions = function (args) {
        args.options.authentication.push(this.options.name);
    };
    AuthenticationProvider.prototype.handleQueryError = function (args) {
        var token = this.getAccessTokenFromStorage();
        var shouldClearToken = this.shouldClearTokenFollowingErrorEvent(args);
        if (token && shouldClearToken) {
            this.storage.removeItem(this.accessTokenStorageKey);
            this._window.location.reload();
            return;
        }
        var missingAuthError = args.error;
        if (missingAuthError.isMissingAuthentication &&
            missingAuthError.provider === this.options.name &&
            this.redirectCount < 2 &&
            this.redirectCount !== -1) {
            ++this.redirectCount;
            this.authenticateWithProvider();
        }
        else {
            this.logger.error('The AuthenticationProvider is in a redirect loop. This may be due to a back-end configuration problem.');
            this.redirectCount = -1;
        }
    };
    AuthenticationProvider.prototype.shouldClearTokenFollowingErrorEvent = function (args) {
        var exceptions = ['InvalidTokenException', 'ExpiredTokenException', 'InvalidAuthenticationProviderException'];
        var error = args.error.name;
        return exceptions.indexOf(error) !== -1;
    };
    AuthenticationProvider.prototype.authenticateWithProvider = function () {
        this.options.useIFrame ? this.authenticateWithIFrame() : this.redirectToAuthenticationProvider();
    };
    AuthenticationProvider.prototype.redirectToAuthenticationProvider = function () {
        this.logger.info("Redirecting to authentication provider " + this.options.name);
        this._window.location.href = this.getAuthenticationProviderUriForRedirect();
    };
    AuthenticationProvider.prototype.authenticateWithIFrame = function () {
        this.logger.info("Using iframe to retrieve authentication for provider " + this.options.name);
        var iframe = Dom_1.$$('iframe', {
            src: this.getAuthenticationProviderUriForIFrame()
        }).el;
        var modalbox;
        modalbox = this.options.showIFrame ? this.createPopupForVisibleIFrame(iframe) : this.createPopupForWaitMessage(iframe);
        var handler = this.createHandler(modalbox, iframe);
        Dom_1.$$(this._window).one('message', handler);
        this.handlers.push(handler);
    };
    AuthenticationProvider.prototype.createHandler = function (modalbox, iframe) {
        var _this = this;
        return function () {
            Dom_1.$$(iframe).detach();
            _this.logger.info("Got authentication for provider " + _this.options.name + "; retrying query.");
            modalbox.close();
            _this.queryController.executeQuery();
        };
    };
    AuthenticationProvider.prototype.handleNuke = function () {
        var _this = this;
        _.each(this.handlers, function (handler) { return Dom_1.$$(_this._window).off('message', handler); });
    };
    AuthenticationProvider.prototype.createPopupForWaitMessage = function (iframe) {
        var popup = Dom_1.$$('div', {
            className: 'coveo-waiting-for-authentication-popup'
        }, DomUtils_1.DomUtils.getBasicLoadingAnimation()).el;
        Dom_1.$$(iframe).hide();
        document.body.appendChild(iframe);
        ExternalModulesShim_1.ModalBox.open(popup, {
            title: Strings_1.l('Authenticating', this.options.caption),
            sizeMod: 'small',
            body: this.searchInterface.options.modalContainer
        });
        return ExternalModulesShim_1.ModalBox;
    };
    AuthenticationProvider.prototype.createPopupForVisibleIFrame = function (iframe) {
        Dom_1.$$(iframe).addClass('coveo-authentication-iframe');
        var popup = Dom_1.$$('div', {}, iframe).el;
        ExternalModulesShim_1.ModalBox.open(popup, {
            title: Strings_1.l('Authenticating', this.options.caption),
            className: 'coveo-authentication-popup',
            sizeMod: 'big',
            body: this.searchInterface.options.modalContainer
        });
        return ExternalModulesShim_1.ModalBox;
    };
    AuthenticationProvider.prototype.getAuthenticationProviderUriForRedirect = function () {
        return this.queryController.getEndpoint().getAuthenticationProviderUri(this.options.name, this._window.location.href, undefined);
    };
    AuthenticationProvider.prototype.getAuthenticationProviderUriForIFrame = function () {
        return this.queryController.getEndpoint().getAuthenticationProviderUri(this.options.name, undefined, 'success');
    };
    AuthenticationProvider.ID = 'AuthenticationProvider';
    AuthenticationProvider.handshakeInProgress = false;
    AuthenticationProvider.doExport = function () {
        GlobalExports_1.exportGlobally({
            AuthenticationProvider: AuthenticationProvider
        });
    };
    /**
     * The options for the component.
     * @componentOptions
     */
    AuthenticationProvider.options = {
        /**
         * Specifies the name of the authentication provider.
         *
         * See [SAML Authentication](https://docs.coveo.com/en/91/).
         */
        name: ComponentOptions_1.ComponentOptions.buildStringOption(),
        /**
         * Specifies the display name of the authentication provider. This is the name that you want to appear in the user
         * interface when the end user is logging in.
         *
         * Default value is the [`name`]{@link AuthenticationProvider.options.name} option value.
         */
        caption: ComponentOptions_1.ComponentOptions.buildStringOption({ postProcessing: function (value, options) { return value || options.name; } }),
        /**
         * Specifies whether to use an `<iframe>` to host the chain of redirection that make up the authentication
         * process.
         *
         * Using an `<iframe>` prevents leaving the search page as part of the authentication process. However, some login
         * providers refuse to load in an `<iframe>`.
         *
         * Default value is `false`.
         */
        useIFrame: ComponentOptions_1.ComponentOptions.buildBooleanOption({
            defaultValue: false,
            alias: ['useIframe']
        }),
        /**
         * If the [`useIFrame`]{@link AuthenticationProvider.options.useIFrame} option is `true`, specifies whether to make
         * the authentication `<iframe>` visible to the user (inside a popup).
         *
         * When the underlying authentication provider requires no user interaction (for example, when a user authenticates
         * using Windows authentication along with SharePoint claims), setting this option to `false` reduces the visual
         * impact of the authentication process.
         *
         * Default value is `true`.
         */
        showIFrame: ComponentOptions_1.ComponentOptions.buildBooleanOption({
            defaultValue: true,
            alias: ['showIframe'],
            depend: 'useIFrame'
        })
    };
    return AuthenticationProvider;
}(Component_1.Component));
exports.AuthenticationProvider = AuthenticationProvider;
Initialization_1.Initialization.registerAutoCreateComponent(AuthenticationProvider);
 
 
/***/ }),
/* 666 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
__webpack_require__(1088);
var ExternalModulesShim_1 = __webpack_require__(39);
var GlobalExports_1 = __webpack_require__(10);
var Dom_1 = __webpack_require__(0);
var Utils_1 = __webpack_require__(5);
var Component_1 = __webpack_require__(6);
var ComponentOptions_1 = __webpack_require__(13);
var Initialization_1 = __webpack_require__(8);
var YouTubeThumbnail_1 = __webpack_require__(324);
var AccessibleButton_1 = __webpack_require__(20);
/**
 * The Backdrop component renders an image URL (either passed as a direct URL or contained in a result field) as a
 * background image. It is useful for displaying information in front of a dynamic background image.
 *
 * The Backdrop component will automatically initialize components embedded within itself:
 *
 * ```html
 *   <div class="CoveoBackdrop" data-image-field="ytthumbnailurl">
 *     <div class="CoveoFieldValue" data-field="somefield"></div>
 *   </div>
 * ```
 */
var Backdrop = /** @class */ (function (_super) {
    __extends(Backdrop, _super);
    /**
     * Creates a new Backdrop component.
     * @param element The HTMLElement on which the component will be instantiated.
     * @param options The options for the Backdrop component.
     * @param bindings The bindings that the component requires to function normally. If not set, it will be automatically
     * resolved (with a slower execution time).
     * @param result The {@link IQueryResult}.
     */
    function Backdrop(element, options, bindings, result, _window, ModalBox) {
        if (ModalBox === void 0) { ModalBox = ExternalModulesShim_1.ModalBox; }
        var _this = _super.call(this, element, Backdrop.ID, bindings) || this;
        _this.element = element;
        _this.options = options;
        _this.result = result;
        _this._window = _window;
        _this.ModalBox = ModalBox;
        _this.options = ComponentOptions_1.ComponentOptions.initComponentOptions(element, Backdrop, options);
        _this._window = _this._window || window;
        var background = '';
        if (_this.options.overlayColor) {
            background +=
                "linear-gradient(" + _this.options.overlayColor + ", " +
                    (_this.options.overlayGradient ? 'rgba(0,0,0,0)' : _this.options.overlayColor) +
                    '), ';
        }
        var imageSource = _this.options.imageUrl || Utils_1.Utils.getFieldValue(result, _this.options.imageField);
        background += "url('" + imageSource + "') center center";
        _this.element.style.background = background;
        _this.element.style.backgroundSize = 'cover';
        Initialization_1.Initialization.automaticallyCreateComponentsInsideResult(element, result);
        _this.configureSpecialBackdropActions();
        return _this;
    }
    Backdrop.prototype.configureSpecialBackdropActions = function () {
        // If the current backdrop is used for a youtube thumbnail, we automatically configure a component for this
        if (Utils_1.Utils.getFieldValue(this.result, 'ytthumbnailurl')) {
            // We create the element "in memory", but do not append it to the DOM.
            // We don't want to see a duplicate of the preview for youtube : the backdrop already renders a preview.
            var thumbnailYouTube_1 = new YouTubeThumbnail_1.YouTubeThumbnail(Dom_1.$$('div').el, {
                embed: true
            }, this.getBindings(), this.result, this.ModalBox, this.element);
            new AccessibleButton_1.AccessibleButton()
                .withElement(this.element)
                .withLabel(this.result.title)
                .withSelectAction(function (e) {
                // Since the backdrop often contain a result link, we must make sure the click did no originate from one.
                // Otherwise, we might end up opening 2 results at the same time
                Eif (!Dom_1.$$(e.target).hasClass('CoveoResultLink')) {
                    thumbnailYouTube_1.openResultLink();
                }
            })
                .build();
        }
    };
    Backdrop.ID = 'Backdrop';
    Backdrop.doExport = function () {
        GlobalExports_1.exportGlobally({
            Backdrop: Backdrop
        });
    };
    /**
     * @componentOptions
     */
    Backdrop.options = {
        /**
         * Specifies a direct URL from which the background image will be sourced.
         *
         * Has priority over {@link Backdrop.options.imageField}.
         */
        imageUrl: ComponentOptions_1.ComponentOptions.buildStringOption(),
        /**
         * Specifies the field from which the background image will be pulled.
         *
         * If {@link Backdrop.options.imageUrl} is specified, it will override this option.
         */
        imageField: ComponentOptions_1.ComponentOptions.buildFieldOption(),
        /**
         * Specifies the color that will be overlaid on top of the background image.
         * This option needs to be declared as a CSS color. Be sure to use RGBA with an alpha value lower than 1 in order to
         * be able to see the image behind the overlay color.
         *
         * Example value : "`rgba(101, 123, 76, 0.5)`"
         */
        overlayColor: ComponentOptions_1.ComponentOptions.buildColorOption(),
        /**
         * Specifies whether the overlay color should be instead be rendered as a top-to-bottom gradient from
         * {@link Backdrop.options.overlayColor} to transparent.
         *
         * Default value is `false`.
         */
        overlayGradient: ComponentOptions_1.ComponentOptions.buildBooleanOption({ defaultValue: false, depend: 'overlayColor' })
    };
    return Backdrop;
}(Component_1.Component));
exports.Backdrop = Backdrop;
Initialization_1.Initialization.registerAutoCreateComponent(Backdrop);
 
 
/***/ }),
/* 667 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
var ComponentOptions_1 = __webpack_require__(13);
var Initialization_1 = __webpack_require__(8);
var FieldValue_1 = __webpack_require__(183);
var StringUtils_1 = __webpack_require__(34);
var Assert_1 = __webpack_require__(12);
var Dom_1 = __webpack_require__(0);
var _ = __webpack_require__(1);
var GlobalExports_1 = __webpack_require__(10);
/**
 * The Badge component outputs a field value with customizable colors and an icon preceding it.
 *
 * This component is a result template component (see [Result Templates](https://docs.coveo.com/en/413/)). It
 * extends the {@link FieldValue} component. Therefore all FieldValue options are also available for a Badge component.
 */
var Badge = /** @class */ (function (_super) {
    __extends(Badge, _super);
    /**
     * Creates a new Badge component.
     * @param element The HTMLElement on which to instantiate the component.
     * @param options The options for the Badge component.
     * @param bindings The bindings that the component requires to function normally. If not set, these will be
     * automatically resolved (with a slower execution time).
     * @param result The result to associate the component with.
     */
    function Badge(element, options, bindings, result) {
        var _this = _super.call(this, element, ComponentOptions_1.ComponentOptions.initComponentOptions(element, Badge, options), bindings, result, Badge.ID) || this;
        _this.options = options;
        Iif (_.isString(_this.options.colors)) {
            // to support the old string options
            _this.options.colors = Badge.parseColors(_this.options.colors);
        }
        Iif (_this.options.colors.values == null) {
            _this.options.colors.values = {};
        }
        return _this;
    }
    /**
     * Parses a {@link Badge.options.colors} option string into a workable JSON format.
     *
     * @param colorsOption The colors option string to parse. See {@link Badge.options.colors}.
     */
    Badge.parseColors = function (colorsOption) {
        Eif (colorsOption) {
            if (Badge.colorsRegex.test(colorsOption)) {
                var badgeColors_1 = {
                    values: {}
                };
                var colors = StringUtils_1.StringUtils.match(colorsOption, Badge.colorRegex);
                _.each(colors, function (color) {
                    var fieldValue = color[1], colorValue = color[2];
                    if (fieldValue != null) {
                        badgeColors_1.values[fieldValue.replace(/\\(:|;)/g, '$1')] = {
                            icon: colorValue
                        };
                    }
                    else {
                        badgeColors_1.icon = colorValue;
                    }
                });
                return badgeColors_1;
            }
            try {
                return JSON.parse(colorsOption);
            }
            catch (e) {
                Assert_1.Assert.fail("Invalid colors for badge '" + colorsOption + "'");
            }
        }
        return {};
    };
    /**
     * Gets the icon and text color of a field value.
     *
     * @param value The field value whose colors to return.
     * @returns {{icon: string, text: string}} An object with the `icon` and `text` keys.
     */
    Badge.prototype.getColor = function (value) {
        if (value === void 0) { value = ''; }
        var colorKey = _.find(_.keys(this.options.colors.values), function (key) { return value.toLowerCase() == key.toLowerCase(); });
        var color = colorKey ? this.options.colors.values[colorKey] : {};
        return {
            icon: color.icon || this.options.colors.icon,
            text: color.text || this.options.colors.text
        };
    };
    /**
     * Renders one string value with the appropriate colors and icon.
     *
     * @param value The field value to render.
     * @returns {HTMLElement} An HTML `<span>` tag containing the rendered value.
     */
    Badge.prototype.renderOneValue = function (value) {
        var valueDom = _super.prototype.renderOneValue.call(this, value);
        Dom_1.$$(valueDom).addClass('coveo-value');
        var color = this.getColor(value);
        var icon = Dom_1.$$('span', { className: 'coveo-badge-icon' }).el;
        Eif (color.icon != null) {
            icon.style.color = color.icon;
        }
        var label = Dom_1.$$('span', { className: 'coveo-badge-label' }, valueDom.innerHTML).el;
        Eif (color.text != null) {
            label.style.color = color.text;
        }
        Dom_1.$$(valueDom).empty();
        valueDom.appendChild(icon);
        valueDom.appendChild(label);
        return valueDom;
    };
    // Override the protected method from FieldValue class to ignore a potential textCaption on a Badge.
    Badge.prototype.prependTextCaptionToDom = function () {
        return;
    };
    Badge.ID = 'Badge';
    Badge.doExport = function () {
        GlobalExports_1.exportGlobally({
            Badge: Badge
        });
    };
    /**
     * The options for the component
     * @componentOptions
     */
    Badge.options = {
        /**
         * Specifies the colors for the Badge component.
         *
         * You must specify the colors in a JSON format similar to what follows:
         * ```json
         * {
         *   "values":{
         *     "foo":{
         *       "icon":"blue",
         *       "text":"#222"
         *     },
         *     "bar":{
         *       "icon":"green",
         *       "text":"lightgreen"
         *     }
         *   },
         *   "icon":"red",
         *   "text":"#9ab52b"
         * }
         * ```
         * This format allows you to customize both the icon and text colors for each field value as well as the default
         * values.
         *
         * Colors can be specified in HTML or hexadecimal format.
         */
        colors: ComponentOptions_1.ComponentOptions.buildCustomOption(function (value) { return Badge.parseColors(value); }, {
            defaultValue: { values: {} }
        }),
        textCaption: ComponentOptions_1.ComponentOptions.buildLocalizedStringOption()
    };
    Badge.parent = FieldValue_1.FieldValue;
    // The following regexes are used to match the old color format:
    // This one matches a single color, e.g. either "red" or "foo: blue".
    // Its capture groups will be the following :
    // 0:( 1:() 2:(red)) or 0:( 1:(foo) 2:(blue))
    Badge.colorRegex = /(?:\s*((?:[^:;]|\\[;:])*)\s*:\s*)?(\w+|#[A-Fa-f0-9]{6}|#[A-Fa-f0-9]{3})/g;
    // This one matches all colors, separated by semicolons, e.g. "red; foo: blue; bar: green".
    // It wraps 'colorRegex' in other capture groups, such as the following:
    // 0:(red) 1:(foo: blue;) 2:(bar: green)
    Badge.colorsRegex = new RegExp('^(\\s*' + Badge.colorRegex.source + '\\s*;)*(\\s*' + Badge.colorRegex.source + ')?\\s*$');
    return Badge;
}(FieldValue_1.FieldValue));
exports.Badge = Badge;
Badge.options = _.omit(Badge.options, 'textCaption');
Initialization_1.Initialization.registerAutoCreateComponent(Badge);
 
 
/***/ }),
/* 668 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
__webpack_require__(1090);
var underscore_1 = __webpack_require__(1);
var BreadcrumbEvents_1 = __webpack_require__(33);
var InitializationEvents_1 = __webpack_require__(22);
var QueryEvents_1 = __webpack_require__(14);
var GlobalExports_1 = __webpack_require__(10);
var Strings_1 = __webpack_require__(4);
var AccessibleButton_1 = __webpack_require__(20);
var Dom_1 = __webpack_require__(0);
var AnalyticsActionListMeta_1 = __webpack_require__(7);
var Component_1 = __webpack_require__(6);
var ComponentOptions_1 = __webpack_require__(13);
var Initialization_1 = __webpack_require__(8);
/**
 * The Breadcrumb component displays a summary of the currently active query filters.
 *
 * For example, when the user selects a {@link Facet} value, the breadcrumbs display this value.
 *
 * The active filters are obtained by the component by firing an event in the Breadcrumb component.
 *
 * All other components having an active state can react to this event by providing custom bits of HTML to display
 * inside the breadcrumbs.
 *
 * Thus, it is possible to easily extend the Breadcrumb component using custom code to display information about custom
 * states and filters.
 *
 * See {@link BreadcrumbEvents} for the list of events and parameters sent when a Breadcrumb component is populated.
 */
var Breadcrumb = /** @class */ (function (_super) {
    __extends(Breadcrumb, _super);
    /**
     * Creates a new Breadcrumb component. Binds event on {@link QueryEvents.deferredQuerySuccess} to draw the
     * breadcrumbs.
     * @param element The HTMLElement on which to instantiate the component.
     * @param options The options for the Breadcrumb component.
     * @param bindings The bindings that the component requires to function normally. If not set, these will be
     * automatically resolved (with a slower execution time).
     */
    function Breadcrumb(element, options, bindings) {
        var _this = _super.call(this, element, Breadcrumb.ID, bindings) || this;
        _this.element = element;
        _this.options = options;
        _this.options = ComponentOptions_1.ComponentOptions.initComponentOptions(element, Breadcrumb, options);
        _this.bind.oneRootElement(InitializationEvents_1.InitializationEvents.afterInitialization, function () { return _this.handleAfterInitialization(); });
        _this.bind.onRootElement(BreadcrumbEvents_1.BreadcrumbEvents.redrawBreadcrumb, function () { return _this.redrawBreadcrumb(); });
        _this.element.style.display = 'none';
        _this.element.setAttribute('tabindex', '-1');
        _this.addDefaultAccessibilityAttributes();
        return _this;
    }
    /**
     * Triggers the event to populate the breadcrumbs. Components such as {@link Facet} can populate the breadcrumbs.
     *
     * This method triggers a {@link BreadcrumbEvents.populateBreadcrumb} event with an
     * {@link IPopulateBreadcrumbEventArgs} object (an array) that other components or code can populate.
     * @returns {IBreadcrumbItem[]} A populated breadcrumb item list.
     */
    Breadcrumb.prototype.getBreadcrumbs = function () {
        var args = { breadcrumbs: [], headingLevel: this.options.headingLevel };
        this.bind.trigger(this.root, BreadcrumbEvents_1.BreadcrumbEvents.populateBreadcrumb, args);
        this.logger.debug('Retrieved breadcrumbs', args.breadcrumbs);
        // If newly received breadcrumbs are empty, and last breadcrumbs were not.
        // this means end user removed the last filter:
        // We want to shift keyboard focus to the result list container in that case, for ease of use of the interface
        // https://coveord.atlassian.net/browse/JSUI-3078
        Iif (underscore_1.isEmpty(args.breadcrumbs) && !underscore_1.isEmpty(this.lastBreadcrumbs)) {
            this.focusFirstEnabledResultList();
        }
        this.lastBreadcrumbs = args.breadcrumbs;
        return args.breadcrumbs;
    };
    /**
     * Triggers the event to clear the current breadcrumbs that components such as {@link Facet} can populate.
     *
     * Also triggers a new query and logs the `breadcrumbResetAll` event in the usage analytics.
     */
    Breadcrumb.prototype.clearBreadcrumbs = function () {
        var args = {};
        this.bind.trigger(this.root, BreadcrumbEvents_1.BreadcrumbEvents.clearBreadcrumb, args);
        this.logger.debug('Clearing breadcrumbs');
        this.usageAnalytics.logSearchEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.breadcrumbResetAll, {});
        this.queryController.executeQuery();
    };
    /**
     * Draws the specified breadcrumb items.
     * @param breadcrumbs The breadcrumb items to draw.
     */
    Breadcrumb.prototype.drawBreadcrumb = function (breadcrumbs) {
        var _this = this;
        Dom_1.$$(this.element).empty();
        if (breadcrumbs.length != 0) {
            this.element.style.display = '';
        }
        else {
            this.element.style.display = 'none';
        }
        var breadcrumbItems = document.createElement('div');
        Dom_1.$$(breadcrumbItems).addClass('coveo-breadcrumb-items');
        this.element.appendChild(breadcrumbItems);
        underscore_1.each(breadcrumbs, function (bcrumb) {
            var elem = bcrumb.element;
            Dom_1.$$(elem).addClass('coveo-breadcrumb-item');
            breadcrumbItems.appendChild(elem);
        });
        var clearText = Dom_1.$$('div', undefined, Strings_1.l('ClearAllFilters')).el;
        var clear = Dom_1.$$('div', {
            className: 'coveo-breadcrumb-clear-all'
        }, clearText).el;
        new AccessibleButton_1.AccessibleButton()
            .withElement(clear)
            .withSelectAction(function () { return _this.clearBreadcrumbs(); })
            .withOwner(this.bind)
            .withoutLabelOrTitle()
            .build();
        this.element.appendChild(clear);
    };
    Breadcrumb.prototype.redrawBreadcrumb = function () {
        this.lastBreadcrumbs ? this.drawBreadcrumb(this.lastBreadcrumbs) : this.drawBreadcrumb(this.getBreadcrumbs());
    };
    Breadcrumb.prototype.handleDeferredQuerySuccess = function () {
        this.drawBreadcrumb(this.getBreadcrumbs());
    };
    Breadcrumb.prototype.handleQueryError = function () {
        this.drawBreadcrumb(this.getBreadcrumbs());
    };
    Breadcrumb.prototype.handleAfterInitialization = function () {
        var _this = this;
        // We must bind to these events after the initialization to make sure the breadcrumb generation
        // is made with updated components. (E.G facet, facetrange, ...)
        this.bind.onRootElement(QueryEvents_1.QueryEvents.deferredQuerySuccess, function () { return _this.handleDeferredQuerySuccess(); });
        this.bind.onRootElement(QueryEvents_1.QueryEvents.queryError, function () { return _this.handleQueryError(); });
    };
    Breadcrumb.prototype.focusFirstEnabledResultList = function () {
        var resultLists = this.searchInterface.getComponents('ResultList');
        var firstEnabledResultList = underscore_1.find(resultLists, function (resultList) { return resultList.disabled === false; });
        if (firstEnabledResultList) {
            Dom_1.$$(firstEnabledResultList.element).focus(true);
        }
    };
    Breadcrumb.prototype.addDefaultAccessibilityAttributes = function () {
        if (!this.element.getAttribute('role')) {
            this.element.setAttribute('role', 'navigation');
        }
        if (!this.element.getAttribute('aria-label')) {
            this.element.setAttribute('aria-label', Strings_1.l('Breadcrumb'));
        }
    };
    Breadcrumb.ID = 'Breadcrumb';
    /**
     * The options for the Breadcrumb.
     * @componentOptions
     */
    Breadcrumb.options = {
        /**
         * The [heading level](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Heading_Elements) to use for the heading before the breadcrumbs.
         *
         * A value of 0 will render a [`div`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/div) element instead.
         */
        headingLevel: ComponentOptions_1.ComponentOptions.buildNumberOption({ min: 0, max: 6 })
    };
    Breadcrumb.doExport = function () {
        GlobalExports_1.exportGlobally({
            Breadcrumb: Breadcrumb
        });
    };
    return Breadcrumb;
}(Component_1.Component));
exports.Breadcrumb = Breadcrumb;
Initialization_1.Initialization.registerAutoCreateComponent(Breadcrumb);
 
 
/***/ }),
/* 669 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
var Component_1 = __webpack_require__(6);
var ComponentOptions_1 = __webpack_require__(13);
var Initialization_1 = __webpack_require__(8);
var Assert_1 = __webpack_require__(12);
var Dom_1 = __webpack_require__(0);
var KeyboardUtils_1 = __webpack_require__(35);
var _ = __webpack_require__(1);
var GlobalExports_1 = __webpack_require__(10);
__webpack_require__(1091);
var SVGIcons_1 = __webpack_require__(16);
var SVGDom_1 = __webpack_require__(23);
/**
 * The `CardActionBar` component displays an action bar at the bottom of a card result (see
 * [Result Layouts](https://docs.coveo.com/en/360/)). It is a simple container for buttons or complementary
 * information.
 *
 * You should place this component at the bottom of a card result template (i.e., as the last child of the surrounding
 * `coveo-result-frame` div).
 *
 * See [Using the CardActionBar Component](https://docs.coveo.com/en/1349/#using-the-cardactionbar-component)
 */
var CardActionBar = /** @class */ (function (_super) {
    __extends(CardActionBar, _super);
    /**
     * Creates a new `CardActionBar` component.
     * @param element The HTMLElement on which to instantiate the component.
     * @param options The options for the component.
     * @param bindings The bindings that the component requires to function normally. If not set, these will be
     * automatically resolved (with a slower execution time).
     * @param result The parent [query result]{@link IQueryResult}..
     */
    function CardActionBar(element, options, bindings, result) {
        var _this = _super.call(this, element, CardActionBar.ID, bindings) || this;
        _this.element = element;
        _this.options = options;
        _this.result = result;
        _this.removedTabIndexElements = [];
        _this.options = ComponentOptions_1.ComponentOptions.initComponentOptions(element, CardActionBar, options);
        _this.parentResult = Dom_1.$$(_this.element).closest('CoveoResult');
        Assert_1.Assert.check(_this.parentResult !== undefined, 'ActionBar needs to be a child of a Result');
        if (_this.options.hidden) {
            Dom_1.$$(_this.parentResult).addClass('coveo-clickable');
            _this.appendArrow();
            _this.bindEvents();
            _.forEach(Dom_1.$$(_this.element).findAll('*'), function (elem) {
                if (elem.hasAttribute('tabindex') && elem.getAttribute('tabindex') == '0') {
                    _this.removedTabIndexElements.push(elem);
                    elem.removeAttribute('tabindex');
                }
            });
        }
        else {
            _this.element.style.transition = 'none';
            _this.element.style.transform = 'none';
        }
        return _this;
    }
    /**
     * Shows the component.
     */
    CardActionBar.prototype.show = function () {
        Dom_1.$$(this.element).addClass('coveo-opened');
        _.forEach(this.removedTabIndexElements, function (e) {
            e.setAttribute('tabindex', '0');
        });
    };
    /**
     * Hides the component.
     */
    CardActionBar.prototype.hide = function () {
        Dom_1.$$(this.element).removeClass('coveo-opened');
        _.forEach(this.removedTabIndexElements, function (e) {
            e.removeAttribute('tabindex');
        });
    };
    CardActionBar.prototype.bindEvents = function () {
        var _this = this;
        Dom_1.$$(this.parentResult).on('click', function () { return _this.show(); });
        Dom_1.$$(this.parentResult).on('mouseleave', function () { return _this.hide(); });
        Dom_1.$$(this.element).on('focusin', function () { return _this.show(); });
        Dom_1.$$(this.element).on('focusout', function () { return _this.hide(); });
        if (this.options.openOnMouseOver) {
            Dom_1.$$(this.arrowContainer).on('mouseenter', function () { return _this.show(); });
        }
    };
    CardActionBar.prototype.appendArrow = function () {
        var _this = this;
        this.arrowContainer = Dom_1.$$('div', { className: 'coveo-card-action-bar-arrow-container', tabindex: 0 }).el;
        this.bind.on(this.arrowContainer, 'keyup', KeyboardUtils_1.KeyboardUtils.keypressAction(KeyboardUtils_1.KEYBOARD.ENTER, function () { return _this.show(); }));
        var arrowUp = Dom_1.$$('span', { className: 'coveo-icon coveo-card-action-bar-arrow-icon' }, SVGIcons_1.SVGIcons.icons.arrowUp);
        SVGDom_1.SVGDom.addClassToSVGInContainer(arrowUp.el, 'coveo-card-action-bar-arrow-svg');
        this.arrowContainer.appendChild(arrowUp.el);
        this.parentResult.appendChild(this.arrowContainer);
    };
    CardActionBar.ID = 'CardActionBar';
    CardActionBar.doExport = function () {
        GlobalExports_1.exportGlobally({
            CardActionBar: CardActionBar
        });
    };
    /**
     * @componentOptions
     */
    CardActionBar.options = {
        /**
         * Whether to hide the component by default and append a visual indicator to its parent query result.
         *
         * If this option is set to `true`, the component will show itself when the user clicks its parent query result.
         *
         * Default value is `true`.
         */
        hidden: ComponentOptions_1.ComponentOptions.buildBooleanOption({ defaultValue: true }),
        /**
         * Whether to open the `CardActionBar` when the cursor hovers over it.
         *
         * This option is only meaningful when [`hidden`]{@link CardActionBar.options.hidden} is set to `true`.
         *
         * Default value is `true`.
         */
        openOnMouseOver: ComponentOptions_1.ComponentOptions.buildBooleanOption({ defaultValue: true, depend: 'hidden' })
    };
    return CardActionBar;
}(Component_1.Component));
exports.CardActionBar = CardActionBar;
Initialization_1.Initialization.registerAutoCreateComponent(CardActionBar);
 
 
/***/ }),
/* 670 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
var Component_1 = __webpack_require__(6);
var ComponentOptions_1 = __webpack_require__(13);
var Initialization_1 = __webpack_require__(8);
var CardOverlayEvents_1 = __webpack_require__(671);
var Dom_1 = __webpack_require__(0);
var Assert_1 = __webpack_require__(12);
var KeyboardUtils_1 = __webpack_require__(35);
var GlobalExports_1 = __webpack_require__(10);
__webpack_require__(1092);
var SVGIcons_1 = __webpack_require__(16);
var SVGDom_1 = __webpack_require__(23);
var Utils_1 = __webpack_require__(5);
var Strings_1 = __webpack_require__(4);
/**
 * The CardOverlay component displays a button that the user can click to toggle the visibility of an overlay on top of
 * an {@link IQueryResult}. While this component typically populates a {@link CardActionBar} component, it is actually
 * possible to place a CardOverlay component anywhere in any result.
 *
 * The primary purpose of the CardOverlay component is to display additional information about a result in a format that
 * fits well within a card result layout (see [Result Layouts](https://docs.coveo.com/en/360/)).
 *
 * When initialized, this component creates a `<div class="coveo-card-overlay">` element as the last child of its parent
 * IQueryResult, and displays a button which toggles the visibility of the overlay.
 */
var CardOverlay = /** @class */ (function (_super) {
    __extends(CardOverlay, _super);
    /**
     * Creates a new CardOverlay component.
     * @param element The HTMLElement on which to instantiate the component.
     * @param options The options for the CardOverlay component.
     * @param bindings The bindings that the component requires to function normally. If not set, these will be
     * automatically resolved (with a slower execution time).
     */
    function CardOverlay(element, options, bindings) {
        var _this = _super.call(this, element, CardOverlay.ID, bindings) || this;
        _this.element = element;
        _this.options = options;
        _this.options = ComponentOptions_1.ComponentOptions.initComponentOptions(element, CardOverlay, options);
        _this.parentCard = Dom_1.$$(_this.element).closest('.CoveoResult');
        Assert_1.Assert.exists(_this.parentCard);
        Dom_1.$$(_this.parentCard).addClass('coveo-with-card-overlay');
        _this.createOverlay();
        _this.createButton(_this.element);
        _this.closeOverlay();
        return _this;
    }
    /**
     * Toggles the CardOverlay visibility.
     *
     * @param swtch Specifying a value for this parameter forces the component visibility to take the corresponding value
     * (`true` for visible; `false` for hidden).
     */
    CardOverlay.prototype.toggleOverlay = function (swtch) {
        Iif (swtch !== undefined) {
            swtch ? this.openOverlay() : this.closeOverlay();
        }
        else {
            if (Dom_1.$$(this.overlay).hasClass('coveo-opened')) {
                this.closeOverlay();
            }
            else {
                this.openOverlay();
            }
        }
    };
    /**
     * Opens the CardOverlay.
     *
     * Also triggers the {@link CardOverlayEvents.openCardOverlay} event.
     */
    CardOverlay.prototype.openOverlay = function () {
        Dom_1.$$(this.overlay).removeClass('coveo-hidden-for-tab-nav');
        Dom_1.$$(this.overlay).addClass('coveo-opened');
        Dom_1.$$(this.parentCard).addClass('coveo-card-overlay-opened');
        this.bind.trigger(this.element, CardOverlayEvents_1.CardOverlayEvents.openCardOverlay);
    };
    /**
     * Closes the CardOverlay.
     *
     * Also triggers the {@link CardOverlayEvents.closeCardOverlay} event.
     */
    CardOverlay.prototype.closeOverlay = function () {
        Dom_1.$$(this.overlay).addClass('coveo-hidden-for-tab-nav');
        Dom_1.$$(this.overlay).removeClass('coveo-opened');
        Dom_1.$$(this.parentCard).removeClass('coveo-card-overlay-opened');
        this.bind.trigger(this.element, CardOverlayEvents_1.CardOverlayEvents.closeCardOverlay);
    };
    CardOverlay.prototype.createOverlay = function () {
        var _this = this;
        this.overlay = Dom_1.$$('div', { className: 'coveo-card-overlay' }).el;
        // Create header
        var overlayHeader = Dom_1.$$('div', { className: 'coveo-card-overlay-header' }).el;
        this.createButton(overlayHeader);
        this.overlay.appendChild(overlayHeader);
        // Create body
        var overlayBody = Dom_1.$$('div', { className: 'coveo-card-overlay-body' }).el;
        // Transfer all of element's children to the overlay
        while (this.element.childNodes.length > 0) {
            overlayBody.appendChild(this.element.firstChild);
        }
        this.overlay.appendChild(overlayBody);
        // Create footer
        var icon = Dom_1.$$('span', { className: 'coveo-icon coveo-open-card-overlay' }, SVGIcons_1.SVGIcons.icons.arrowDown);
        SVGDom_1.SVGDom.addClassToSVGInContainer(icon.el, 'coveo-open-card-overlay-svg');
        var overlayFooter = Dom_1.$$('div', { className: 'coveo-card-overlay-footer', tabindex: '0' }, icon.el);
        overlayFooter.on('click', function () { return _this.toggleOverlay(false); });
        this.bind.on(overlayFooter.el, 'keyup', KeyboardUtils_1.KeyboardUtils.keypressAction(KeyboardUtils_1.KEYBOARD.ENTER, function () { return _this.toggleOverlay(false); }));
        this.overlay.appendChild(overlayFooter.el);
        this.parentCard.appendChild(this.overlay);
    };
    CardOverlay.prototype.createButton = function (element) {
        var _this = this;
        if (this.options.icon) {
            var icon = Dom_1.$$('span', { className: 'coveo-icon ' }, SVGIcons_1.SVGIcons.icons[this.options.icon]).el;
            element.appendChild(icon);
            SVGDom_1.SVGDom.addClassToSVGInContainer(element, "coveo-" + Utils_1.Utils.toDashCase(this.options.icon) + "-svg");
        }
        element.appendChild(Dom_1.$$('span', { className: 'coveo-label' }, this.options.title).el);
        element.setAttribute('tabindex', '0');
        Dom_1.$$(element).on('click', function () { return _this.toggleOverlay(); });
        this.bind.on(element, 'keyup', KeyboardUtils_1.KeyboardUtils.keypressAction(KeyboardUtils_1.KEYBOARD.ENTER, function () { return _this.toggleOverlay(); }));
    };
    CardOverlay.ID = 'CardOverlay';
    CardOverlay.doExport = function () {
        GlobalExports_1.exportGlobally({
            CardOverlay: CardOverlay
        });
    };
    /**
     * @componentOptions
     */
    CardOverlay.options = {
        /**
         * Specifies the string to use for the overlay title and for the button text.
         *
         * Setting a value for this option is required for this component to work.
         */
        title: ComponentOptions_1.ComponentOptions.buildLocalizedStringOption({
            required: true,
            localizedString: function () { return Strings_1.l('NoTitle'); }
        }),
        /**
         * Specifies the icon to use for the overlay icon and for the button icon.
         *
         * The name of the icon to use should be specified in dashed case. ie: facet-expand
         */
        icon: ComponentOptions_1.ComponentOptions.buildIconOption()
    };
    return CardOverlay;
}(Component_1.Component));
exports.CardOverlay = CardOverlay;
Initialization_1.Initialization.registerAutoCreateComponent(CardOverlay);
 
 
/***/ }),
/* 671 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
/**
 * The CardOverlayEvents class contains string definitions for all events related to the {@link CardOverlay} component.
 */
var CardOverlayEvents = /** @class */ (function () {
    function CardOverlayEvents() {
    }
    /**
     * Opening a {@link CardOverlay} component triggers this event (see {@link CardOverlay.openOverlay}).
     *
     * @type {string}
     */
    CardOverlayEvents.openCardOverlay = 'openCardOverlay';
    /**
     * Closing a {@link CardOverlay} component triggers this event (see {@link CardOverlay.closeOverlay}).
     *
     * @type {string}
     */
    CardOverlayEvents.closeCardOverlay = 'closeCardOverlay';
    return CardOverlayEvents;
}());
exports.CardOverlayEvents = CardOverlayEvents;
 
 
/***/ }),
/* 672 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
var Initialization_1 = __webpack_require__(8);
var ComponentOptions_1 = __webpack_require__(13);
var Component_1 = __webpack_require__(6);
var Utils_1 = __webpack_require__(5);
var Dom_1 = __webpack_require__(0);
var Strings_1 = __webpack_require__(4);
var ChatterUtils_1 = __webpack_require__(145);
var GlobalExports_1 = __webpack_require__(10);
var ChatterLikedBy = /** @class */ (function (_super) {
    __extends(ChatterLikedBy, _super);
    function ChatterLikedBy(element, options, bindings, result) {
        var _this = _super.call(this, element, ChatterLikedBy.ID, bindings) || this;
        _this.element = element;
        _this.options = options;
        _this.bindings = bindings;
        _this.result = result;
        _this.options = ComponentOptions_1.ComponentOptions.initComponentOptions(element, ChatterLikedBy, options);
        if (!Utils_1.Utils.isNullOrUndefined(Utils_1.Utils.getFieldValue(result, 'sflikedby')) &&
            !Utils_1.Utils.isNullOrUndefined(Utils_1.Utils.getFieldValue(result, 'sflikedbyid'))) {
            var likeNames = Utils_1.Utils.getFieldValue(result, 'sflikedby').split(';');
            var likeIds = Utils_1.Utils.getFieldValue(result, 'sflikedbyid').split(';');
            var rootElement = Dom_1.$$('div', {
                className: 'coveo-chatter-result-box-row'
            });
            Dom_1.$$(element).append(rootElement.el);
            var thumbIcon = Dom_1.$$('div', {
                className: 'coveo-sprites-common-thumbup_inactive coveo-chatter-result-box-icon'
            });
            rootElement.append(thumbIcon.el);
            var fullListElement = Dom_1.$$('div', {
                className: 'coveo-chatter-result-likes'
            });
            rootElement.append(fullListElement.el);
            _this.renderLikesList(fullListElement.el, result, likeNames, likeIds, _this.options.nbLikesToRender);
        }
        return _this;
    }
    ChatterLikedBy.prototype.renderLikesList = function (element, result, likeNames, likeIds, nbLikesToRender) {
        var _this = this;
        var tempElement = Dom_1.$$('div');
        for (var i = 0; i < likeIds.length - 1 && (nbLikesToRender == 0 || i < nbLikesToRender); i++) {
            tempElement.append(this.renderLikeLink(result, likeNames[i], likeIds[i]));
            if ((nbLikesToRender == 0 || i < nbLikesToRender - 1) && i < likeIds.length - 2) {
                tempElement.append(Dom_1.$$('span', {}, ', ').el);
            }
            else Eif (i < likeIds.length - 1) {
                tempElement.append(Dom_1.$$('span', {}, " " + Strings_1.l('And').toLowerCase() + " ").el);
            }
        }
        if (nbLikesToRender == 0 || likeIds.length <= nbLikesToRender) {
            tempElement.append(this.renderLikeLink(result, likeNames[likeIds.length - 1], likeIds[likeIds.length - 1]));
        }
        else {
            var othersCount = likeIds.length - nbLikesToRender;
            var clickableLink = Dom_1.$$('a');
            clickableLink.text(" " + Strings_1.l('Others', othersCount.toString(), othersCount));
            clickableLink.on('click', function (e) {
                e.preventDefault();
                Dom_1.$$(element).empty();
                _this.renderLikesList(element, result, likeNames, likeIds, 0);
            });
            tempElement.append(clickableLink.el);
        }
        Eif (likeIds.length > 0) {
            var name_1 = Dom_1.$$('span');
            name_1.el.innerHTML = Strings_1.l('LikesThis', tempElement.el.innerHTML, likeIds.length);
            Dom_1.$$(element).append(name_1.el);
        }
    };
    ChatterLikedBy.prototype.renderLikeLink = function (result, likeName, likeId) {
        var link = Dom_1.$$('a', {
            href: ChatterUtils_1.ChatterUtils.buildURI(result.clickUri, Utils_1.Utils.getFieldValue(result, 'sffeeditemid'), likeId)
        });
        link.text(likeName);
        return link.el;
    };
    ChatterLikedBy.ID = 'ChatterLikedBy';
    ChatterLikedBy.doExport = function () {
        GlobalExports_1.exportGlobally({
            ChatterLikedBy: ChatterLikedBy
        });
    };
    ChatterLikedBy.options = {
        nbLikesToRender: ComponentOptions_1.ComponentOptions.buildNumberOption({ defaultValue: 2, min: 0 }),
        openInPrimaryTab: ComponentOptions_1.ComponentOptions.buildBooleanOption({ defaultValue: false }),
        openInSubTab: ComponentOptions_1.ComponentOptions.buildBooleanOption({ defaultValue: true })
    };
    return ChatterLikedBy;
}(Component_1.Component));
exports.ChatterLikedBy = ChatterLikedBy;
Initialization_1.Initialization.registerAutoCreateComponent(ChatterLikedBy);
 
 
/***/ }),
/* 673 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
var Component_1 = __webpack_require__(6);
var Utils_1 = __webpack_require__(5);
var ChatterUtils_1 = __webpack_require__(145);
var Strings_1 = __webpack_require__(4);
var Initialization_1 = __webpack_require__(8);
var Dom_1 = __webpack_require__(0);
var GlobalExports_1 = __webpack_require__(10);
var ChatterPostAttachment = /** @class */ (function (_super) {
    __extends(ChatterPostAttachment, _super);
    function ChatterPostAttachment(element, options, bindings, result) {
        var _this = _super.call(this, element, ChatterPostAttachment.ID, bindings) || this;
        _this.element = element;
        _this.options = options;
        _this.bindings = bindings;
        _this.result = result;
        Eif (!Utils_1.Utils.isNullOrUndefined(Utils_1.Utils.getFieldValue(result, 'sfcontentversionid'))) {
            var rootElement = Dom_1.$$('div', {
                className: 'coveo-chatter-result-box-row'
            });
            Dom_1.$$(element).append(rootElement.el);
            var icon = Dom_1.$$('div', {
                className: 'coveo-sprites-common-system coveo-chatter-result-box-icon'
            });
            rootElement.append(icon.el);
            var linkElement = Dom_1.$$('a', {
                href: ChatterUtils_1.ChatterUtils.buildURI(result.clickUri, Utils_1.Utils.getFieldValue(result, 'sffeeditemid'), Utils_1.Utils.getFieldValue(result, 'sfcontentversionid'))
            });
            rootElement.append(linkElement.el);
            var fieldValue = Utils_1.Utils.getFirstAvailableFieldValue(result, ['sfcontentfilename', 'sftitle', 'sf_title']);
            if (!Utils_1.Utils.isNullOrUndefined(fieldValue)) {
                linkElement.text(fieldValue);
            }
            else {
                linkElement.text(Strings_1.l('ShowAttachment'));
            }
        }
        return _this;
    }
    ChatterPostAttachment.ID = 'ChatterPostAttachment';
    ChatterPostAttachment.doExport = function () {
        GlobalExports_1.exportGlobally({
            ChatterPostAttachment: ChatterPostAttachment
        });
    };
    return ChatterPostAttachment;
}(Component_1.Component));
exports.ChatterPostAttachment = ChatterPostAttachment;
Initialization_1.Initialization.registerAutoCreateComponent(ChatterPostAttachment);
 
 
/***/ }),
/* 674 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
var Component_1 = __webpack_require__(6);
var ComponentOptions_1 = __webpack_require__(13);
var ChatterUtils_1 = __webpack_require__(145);
var Initialization_1 = __webpack_require__(8);
var Strings_1 = __webpack_require__(4);
var Utils_1 = __webpack_require__(5);
var Dom_1 = __webpack_require__(0);
var GlobalExports_1 = __webpack_require__(10);
var ChatterPostedBy = /** @class */ (function (_super) {
    __extends(ChatterPostedBy, _super);
    function ChatterPostedBy(element, options, bindings, result) {
        var _this = _super.call(this, element, ChatterPostedBy.ID, bindings) || this;
        _this.element = element;
        _this.options = options;
        _this.bindings = bindings;
        _this.result = result;
        _this.options = ComponentOptions_1.ComponentOptions.initComponentOptions(element, ChatterPostedBy, options);
        Eif (Utils_1.Utils.getFieldValue(_this.result, 'sfcreatedbyname') != null) {
            var from = Dom_1.$$('span');
            from.text((_this.options.useFromInstead ? Strings_1.l('From') : Strings_1.l('PostedBy')) + " ");
            Dom_1.$$(element).append(from.el);
            Dom_1.$$(element).append(_this.renderLink(Utils_1.Utils.getFieldValue(_this.result, 'sfcreatedbyname'), Utils_1.Utils.getFieldValue(_this.result, 'sfcreatedbyid')));
            if (_this.options.enablePostedOn &&
                !Utils_1.Utils.isNullOrUndefined(Utils_1.Utils.getFieldValue(_this.result, 'sfparentname')) &&
                !Utils_1.Utils.isNullOrUndefined(Utils_1.Utils.getFieldValue(_this.result, 'sfparentid'))) {
                // Post on user's wall
                Iif (!Utils_1.Utils.isNullOrUndefined(Utils_1.Utils.getFieldValue(_this.result, 'sfuserid')) &&
                    Utils_1.Utils.getFieldValue(_this.result, 'sfuserid') != Utils_1.Utils.getFieldValue(_this.result, 'sfinsertedbyid')) {
                    var onFeed = Dom_1.$$('span');
                    var content = " " + Strings_1.l('OnFeed', _this.renderLink(Utils_1.Utils.getFieldValue(_this.result, 'sfparentname'), Utils_1.Utils.getFieldValue(_this.result, 'sfparentid')).outerHTML);
                    onFeed.el.innerHTML = content;
                    Dom_1.$$(element).append(onFeed.el);
                }
                else Eif (Utils_1.Utils.isNullOrUndefined(Utils_1.Utils.getFieldValue(_this.result, 'sfuserid'))) {
                    var onUser = Dom_1.$$('span');
                    onUser.text(" " + Strings_1.l('On').toLowerCase() + " ");
                    Dom_1.$$(element).append(onUser.el);
                    Dom_1.$$(element).append(_this.renderLink(Utils_1.Utils.getFieldValue(_this.result, 'sfparentname'), Utils_1.Utils.getFieldValue(_this.result, 'sfparentid')));
                }
            }
        }
        return _this;
    }
    ChatterPostedBy.prototype.renderLink = function (text, id) {
        var link = Dom_1.$$('a', {
            href: ChatterUtils_1.ChatterUtils.buildURI(this.result.clickUri, Utils_1.Utils.getFieldValue(this.result, 'sffeeditemid'), id)
        });
        link.text(text);
        return ChatterUtils_1.ChatterUtils.bindClickEventToElement(link.el, this.options.openInPrimaryTab, this.options.openInSubTab);
    };
    ChatterPostedBy.ID = 'ChatterPostedBy';
    ChatterPostedBy.doExport = function () {
        GlobalExports_1.exportGlobally({
            ChatterPostedBy: ChatterPostedBy
        });
    };
    ChatterPostedBy.options = {
        enablePostedOn: ComponentOptions_1.ComponentOptions.buildBooleanOption({ defaultValue: true }),
        useFromInstead: ComponentOptions_1.ComponentOptions.buildBooleanOption({ defaultValue: false }),
        openInPrimaryTab: ComponentOptions_1.ComponentOptions.buildBooleanOption({ defaultValue: false }),
        openInSubTab: ComponentOptions_1.ComponentOptions.buildBooleanOption({ defaultValue: true })
    };
    ChatterPostedBy.fields = ['sfcreatedbyname', 'sfcreatedbyid', 'sffeeditemid', 'sfuserid', 'sfinsertedbyid', 'sfparentid', 'sfparentname'];
    return ChatterPostedBy;
}(Component_1.Component));
exports.ChatterPostedBy = ChatterPostedBy;
Initialization_1.Initialization.registerAutoCreateComponent(ChatterPostedBy);
 
 
/***/ }),
/* 675 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
__webpack_require__(1098);
var _ = __webpack_require__(1);
var GlobalExports_1 = __webpack_require__(10);
var QueryEvents_1 = __webpack_require__(14);
var Assert_1 = __webpack_require__(12);
var QueryStateModel_1 = __webpack_require__(17);
var Strings_1 = __webpack_require__(4);
var Dom_1 = __webpack_require__(0);
var StringUtils_1 = __webpack_require__(34);
var Utils_1 = __webpack_require__(5);
var AnalyticsActionListMeta_1 = __webpack_require__(7);
var Component_1 = __webpack_require__(6);
var ComponentOptions_1 = __webpack_require__(13);
var Initialization_1 = __webpack_require__(8);
/**
 * The DidYouMean component is responsible for displaying query corrections. If this component is in the page and the
 * query returns no result but finds a possible query correction, the component either suggests the correction or
 * automatically triggers a new query with the suggested term.
 */
var DidYouMean = /** @class */ (function (_super) {
    __extends(DidYouMean, _super);
    /**
     * Creates a new DidYouMean component.
     * @param element The HTMLElement on which to instantiate the component.
     * @param options The options for the DidYouMean component.
     * @param bindings The bindings that the component requires to function normally. If not set, these will be
     * automatically resolved (with a slower execution time).
     */
    function DidYouMean(element, options, bindings) {
        var _this = _super.call(this, element, DidYouMean.ID, bindings) || this;
        _this.element = element;
        _this.options = options;
        _this.bindings = bindings;
        _this.options = ComponentOptions_1.ComponentOptions.initComponentOptions(element, DidYouMean, options);
        Assert_1.Assert.exists(element);
        Assert_1.Assert.exists(_this.options);
        _this.hideNext = true;
        _this.ignoreNextNoResults = false;
        _this.correctedTerm = null;
        _this.bind.onRootElement(QueryEvents_1.QueryEvents.buildingQuery, _this.handlePrepareQueryBuilder);
        _this.bind.onRootElement(QueryEvents_1.QueryEvents.querySuccess, _this.handleProcessNewQueryResults);
        _this.bind.onRootElement(QueryEvents_1.QueryEvents.noResults, _this.handleNoResults);
        _this.bind.onRootElement(QueryEvents_1.QueryEvents.newQuery, _this.handleNewQuery);
        Dom_1.$$(_this.element).hide();
        return _this;
    }
    /**
     * Executes a query with the corrected term.
     * Throws an exception if the corrected term has not been initialized.
     * If successful, logs a `didyoumeanClick` event in the usage analytics.
     */
    DidYouMean.prototype.doQueryWithCorrectedTerm = function () {
        var _this = this;
        Assert_1.Assert.exists(this.correctedTerm);
        this.queryStateModel.set(QueryStateModel_1.QueryStateModel.attributesEnum.q, this.correctedTerm);
        this.queryController.deferExecuteQuery({
            beforeExecuteQuery: function () { return _this.usageAnalytics.logSearchEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.didyoumeanClick, {}); }
        });
    };
    DidYouMean.prototype.handleNewQuery = function () {
        if (this.hideNext) {
            Dom_1.$$(this.element).empty();
            Dom_1.$$(this.element).hide();
            this.correctedTerm = null;
        }
        else {
            this.hideNext = true;
        }
    };
    DidYouMean.prototype.handlePrepareQueryBuilder = function (data) {
        Assert_1.Assert.exists(data);
        data.queryBuilder.enableDidYouMean = true;
    };
    DidYouMean.prototype.handleNoResults = function (data) {
        if (this.ignoreNextNoResults) {
            this.logger.warn('Query is being automatically corrected twice while returning no results.');
            return;
        }
        // We do not auto-correct on search-as-you-type queries
        if (Utils_1.Utils.isNonEmptyArray(data.results.queryCorrections) && !data.searchAsYouType && this.options.enableAutoCorrection) {
            this.ignoreNextNoResults = true;
            var originalQuery = this.queryStateModel.get(QueryStateModel_1.QueryStateModel.attributesEnum.q);
            this.correctedTerm = data.results.queryCorrections[0].correctedQuery;
            var correctedSentence = this.buildCorrectedSentence(data.results.queryCorrections[0]);
            this.queryStateModel.set(QueryStateModel_1.QueryStateModel.attributesEnum.q, data.results.queryCorrections[0].correctedQuery);
            this.searchInterface.historyManager.replaceState(this.queryStateModel.getAttributes());
            data.retryTheQuery = true;
            this.hideNext = false;
            var noResultsFor = Dom_1.$$('div', { className: 'coveo-did-you-mean-no-results-for' }).el;
            noResultsFor.innerHTML = Strings_1.l('noResultFor', '<span class="coveo-highlight coveo-did-you-mean-highlight">' + StringUtils_1.StringUtils.htmlEncode(originalQuery) + '</span>');
            this.element.appendChild(noResultsFor);
            var automaticCorrect = Dom_1.$$('div', { className: 'coveo-did-you-mean-automatic-correct' }).el;
            automaticCorrect.innerHTML = Strings_1.l('autoCorrectedQueryTo', '<span class="coveo-highlight">' + correctedSentence + '</span>');
            this.element.appendChild(automaticCorrect);
            Dom_1.$$(this.element).show();
            this.usageAnalytics.logSearchEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.didyoumeanAutomatic, {});
        }
    };
    DidYouMean.prototype.handleProcessNewQueryResults = function (data) {
        var _this = this;
        Assert_1.Assert.exists(data);
        Assert_1.Assert.exists(data.results);
        this.ignoreNextNoResults = false;
        var results = data.results;
        this.logger.trace('Received query results from new query', results);
        if (Utils_1.Utils.isNonEmptyArray(results.queryCorrections)) {
            var correctedSentence = this.buildCorrectedSentence(results.queryCorrections[0]);
            this.correctedTerm = results.queryCorrections[0].correctedQuery;
            var correctedWordEl = Dom_1.$$('button', { type: 'button' }, correctedSentence).el;
            var didYouMean = Dom_1.$$('div', { className: 'coveo-did-you-mean-suggestion' }, Strings_1.l('didYouMean', correctedWordEl.outerHTML));
            this.element.appendChild(didYouMean.el);
            var appendedCorrectedWordEl = didYouMean.find(correctedWordEl.tagName);
            Dom_1.$$(appendedCorrectedWordEl).on('click', function () { return _this.doQueryWithCorrectedTerm(); });
            Dom_1.$$(this.element).show();
        }
    };
    DidYouMean.prototype.buildCorrectedSentence = function (correction) {
        var toReturn = [];
        var tagStart = "<span class='coveo-did-you-mean-word-correction'>";
        var tagEnd = '</span>';
        var currentOffset = 0;
        _.each(correction.wordCorrections, function (wordCorrection) {
            toReturn.push(StringUtils_1.StringUtils.htmlEncode(correction.correctedQuery.slice(currentOffset, wordCorrection.offset)));
            currentOffset = wordCorrection.offset;
            toReturn.push(tagStart);
            toReturn.push(StringUtils_1.StringUtils.htmlEncode(correction.correctedQuery.slice(currentOffset, wordCorrection.length + currentOffset)));
            toReturn.push(tagEnd);
            currentOffset = wordCorrection.offset + wordCorrection.length;
        });
        toReturn.push(StringUtils_1.StringUtils.htmlEncode(correction.correctedQuery.slice(currentOffset)));
        return toReturn.join('');
    };
    DidYouMean.ID = 'DidYouMean';
    DidYouMean.doExport = function () {
        GlobalExports_1.exportGlobally({
            DidYouMean: DidYouMean
        });
    };
    /**
     * The options for the component
     * @componentOptions
     */
    DidYouMean.options = {
        /**
         * Specifies whether the DidYouMean component automatically triggers a new query when a query returns no result and
         * a possible correction is available.
         *
         * Default value is `true`.
         */
        enableAutoCorrection: ComponentOptions_1.ComponentOptions.buildBooleanOption({ defaultValue: true })
    };
    return DidYouMean;
}(Component_1.Component));
exports.DidYouMean = DidYouMean;
Initialization_1.Initialization.registerAutoCreateComponent(DidYouMean);
 
 
/***/ }),
/* 676 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        Iif (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            Iif (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
            Iif (y = 0, t) op = [0, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    Iif (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    Iif (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        Iif (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
Object.defineProperty(exports, "__esModule", { value: true });
var DistanceEvents_1 = __webpack_require__(297);
var EventsModules_1 = __webpack_require__(109);
var GlobalExports_1 = __webpack_require__(10);
var Dom_1 = __webpack_require__(0);
var AnalyticsActionListMeta_1 = __webpack_require__(7);
var Component_1 = __webpack_require__(6);
var ComponentOptions_1 = __webpack_require__(13);
var Initialization_1 = __webpack_require__(8);
var RegisteredNamedMethods_1 = __webpack_require__(38);
var GoogleApiPositionProvider_1 = __webpack_require__(1099);
var NavigatorPositionProvider_1 = __webpack_require__(1100);
var StaticPositionProvider_1 = __webpack_require__(1101);
/**
 * The `DistanceResources` component defines a field that computes the distance according to the current position of the
 * end user.
 *
 * Components relying on the current distance should be disabled until this component successfully provides a distance.
 *
 * See also [`DistanceEvents`]{@link DistanceEvents}.
 *
 * @availablesince [November 2017 Release (v2.3477.9)](https://docs.coveo.com/en/373/#november-2017-release-v234779)
 */
var DistanceResources = /** @class */ (function (_super) {
    __extends(DistanceResources, _super);
    /**
     * Creates a new `DistanceResources` component.
     * @param element The HTMLElement on which to instantiate the component.
     * @param options The options for the `DistanceResources` component.
     * @param bindings The bindings that the component requires to function normally. If not set, these will be
     * automatically resolved (with a slower execution time).
     */
    function DistanceResources(element, options, bindings) {
        var _this = _super.call(this, element, DistanceResources.ID, bindings) || this;
        _this.element = element;
        _this.options = options;
        _this.bindings = bindings;
        _this.isFirstPositionResolved = false;
        _this.options = ComponentOptions_1.ComponentOptions.initComponentOptions(element, DistanceResources, options);
        _this.registerDistanceQuery();
        _this.bind.onRootElement(EventsModules_1.InitializationEvents.afterComponentsInitialization, function (args) {
            return _this.onAfterComponentsInitialization(args);
        });
        return _this;
    }
    /**
     * Overrides the current position with the provided values.
     *
     * **Note:**
     * > Calling this method does not automatically trigger a query.
     *
     * @param latitude The latitude to set.
     * @param longitude The longitude to set.
     */
    DistanceResources.prototype.setPosition = function (latitude, longitude) {
        this.enable();
        this.latitude = latitude;
        this.longitude = longitude;
        var args = {
            position: {
                latitude: latitude,
                longitude: longitude
            }
        };
        this.bind.trigger(this.element, DistanceEvents_1.DistanceEvents.onPositionResolved, args);
        var shouldTriggerQuery = this.shouldTriggerQueryWhenPositionSet();
        this.isFirstPositionResolved = true;
        if (shouldTriggerQuery) {
            this.sendAnalytics();
            this.queryController.executeQuery();
        }
    };
    /**
     * Returns a promise of the last position resolved using the registered position providers.
     *
     * @returns {Promise<IGeolocationPosition>} A promise of the last resolved position value.
     */
    DistanceResources.prototype.getLastPositionRequest = function () {
        return __awaiter(this, void 0, void 0, function () {
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        Iif (!!!this.lastPositionRequest) return [3 /*break*/, 2];
                        return [4 /*yield*/, this.lastPositionRequest];
                    case 1:
                        _a.sent();
                        return [2 /*return*/, {
                                latitude: this.latitude,
                                longitude: this.longitude
                            }];
                    case 2:
                        Promise.reject('No position request was executed yet.');
                        _a.label = 3;
                    case 3: return [2 /*return*/];
                }
            });
        });
    };
    DistanceResources.prototype.sendAnalytics = function () {
        this.usageAnalytics.logSearchEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.positionSet, {});
    };
    DistanceResources.prototype.shouldTriggerQueryWhenPositionSet = function () {
        // Don't trigger the query if the first one is not yet executed.
        return !this.queryController.firstQuery && this.options.triggerNewQueryOnNewPosition;
    };
    DistanceResources.prototype.onAfterComponentsInitialization = function (afterComponentsInitializationArgs) {
        var args = {
            providers: this.getProvidersFromOptions()
        };
        this.bind.trigger(this.element, DistanceEvents_1.DistanceEvents.onResolvingPosition, args);
        this.lastPositionRequest = this.tryToSetPositionFromProviders(args.providers);
        if (this.options.cancelQueryUntilPositionResolved) {
            afterComponentsInitializationArgs.defer.push(this.lastPositionRequest);
        }
    };
    DistanceResources.prototype.tryToSetPositionFromProviders = function (providers) {
        return __awaiter(this, void 0, void 0, function () {
            var position, error_1;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        _a.trys.push([0, 2, , 3]);
                        return [4 /*yield*/, this.tryGetPositionFromProviders(providers)];
                    case 1:
                        position = _a.sent();
                        if (position) {
                            this.setPosition(position.latitude, position.longitude);
                        }
                        else {
                            this.triggerDistanceNotSet();
                        }
                        return [3 /*break*/, 3];
                    case 2:
                        error_1 = _a.sent();
                        this.logger.error('An error occurred while trying to resolve the current position.', error_1);
                        this.triggerDistanceNotSet();
                        return [3 /*break*/, 3];
                    case 3: return [2 /*return*/];
                }
            });
        });
    };
    DistanceResources.prototype.getProvidersFromOptions = function () {
        var providers = [];
        Iif (this.options.useNavigator) {
            providers.push(new NavigatorPositionProvider_1.NavigatorPositionProvider());
        }
        Iif (this.options.googleApiKey) {
            providers.push(new GoogleApiPositionProvider_1.GoogleApiPositionProvider(this.options.googleApiKey));
        }
        Iif (this.options.longitudeValue && this.options.latitudeValue) {
            providers.push(new StaticPositionProvider_1.StaticPositionProvider(this.options.latitudeValue, this.options.longitudeValue));
        }
        return providers;
    };
    DistanceResources.prototype.tryGetPositionFromProviders = function (providers) {
        return __awaiter(this, void 0, void 0, function () {
            var provider, position, error_2;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        if (!(providers.length > 0)) return [3 /*break*/, 5];
                        provider = providers.shift();
                        _a.label = 1;
                    case 1:
                        _a.trys.push([1, 3, , 4]);
                        return [4 /*yield*/, provider.getPosition()];
                    case 2:
                        position = _a.sent();
                        Eif (!!position.latitude && !!position.longitude) {
                            return [2 /*return*/, position];
                        }
                        return [3 /*break*/, 4];
                    case 3:
                        error_2 = _a.sent();
                        this.logger.warn('An error occurred while trying to resolve the position within a position provider.', error_2);
                        return [3 /*break*/, 4];
                    case 4: return [3 /*break*/, 0];
                    case 5: return [2 /*return*/];
                }
            });
        });
    };
    DistanceResources.prototype.triggerDistanceNotSet = function () {
        this.isFirstPositionResolved = true;
        this.logger.warn("None of the given position providers could resolve the current position. The distance field will not be calculated and the distance components will be disabled until the next call to 'setPosition'.");
        this.bind.trigger(this.element, DistanceEvents_1.DistanceEvents.onPositionNotResolved, {});
        this.disable();
    };
    DistanceResources.prototype.registerDistanceQuery = function () {
        var _this = this;
        this.bind.onRootElement(EventsModules_1.QueryEvents.buildingQuery, function (args) {
            if (_this.isFirstPositionResolved) {
                Eif (args && args.queryBuilder) {
                    var geoQueryFunction = {
                        function: _this.getConvertedUnitsFunction("dist(" + _this.options.latitudeField + ", " + _this.options.longitudeField + ", " + _this.latitude + ", " + _this.longitude + ")"),
                        fieldName: "" + _this.options.distanceField
                    };
                    args.queryBuilder.queryFunctions.push(geoQueryFunction);
                    _this.enableDistanceComponents();
                }
            }
        });
    };
    DistanceResources.prototype.enableDistanceComponents = function () {
        var _this = this;
        Dom_1.$$(this.root)
            .findAll("." + this.options.disabledDistanceCssClass)
            .forEach(function (element) {
            try {
                element.classList.remove(_this.options.disabledDistanceCssClass);
                var coveoComponent = RegisteredNamedMethods_1.get(element);
                if (coveoComponent) {
                    coveoComponent.enable();
                }
            }
            catch (exception) {
                _this.logger.error('Could not re-enable distance component.', exception, element);
            }
        });
    };
    DistanceResources.prototype.getConvertedUnitsFunction = function (queryFunction) {
        return queryFunction + "/" + this.options.unitConversionFactor;
    };
    DistanceResources.ID = 'DistanceResources';
    DistanceResources.doExport = function () {
        GlobalExports_1.exportGlobally({
            DistanceResources: DistanceResources
        });
    };
    /**
     * The possible options for a DistanceResources.
     * @componentOptions
     */
    DistanceResources.options = {
        /**
         * Specifies the name of the field in which to store the distance value.
         *
         * Specifying a value for this option is required for the `DistanceResources` component to work.
         */
        distanceField: ComponentOptions_1.ComponentOptions.buildFieldOption({
            required: true
        }),
        /**
         * Specifies the name of the field that contains the latitude value.
         *
         * **Note:**
         * > The field you specify for this option must be an existing numerical field in your index (see
         * > [Adding and Managing Fields](https://docs.coveo.com/en/1833/). Otherwise, your query responses
         * > will contain a `QueryExceptionInvalidQueryFunctionField` or QueryExceptionInvalidQueryFunctionFieldType`
         * > exception, and the DistanceResources component will be unable to evaluate distances.
         *
         * Specifying a value for this option is required for the `DistanceResources` component to work.
         */
        latitudeField: ComponentOptions_1.ComponentOptions.buildFieldOption({
            required: true
        }),
        /**
         * Specifies the name of the field that contains the longitude value.
         *
         * **Note:**
         * > The field you specify for this option must be an existing numerical field in your index (see
         * > [Adding and Managing Fields](https://docs.coveo.com/en/1833/). Otherwise, your query responses
         * > will contain a `QueryExceptionInvalidQueryFunctionField` or QueryExceptionInvalidQueryFunctionFieldType`
         * > exception, and the DistanceResources component will be unable to evaluate distances.
         *
         * Specifying a value for this option is required for the `DistanceResources` component to work.
         */
        longitudeField: ComponentOptions_1.ComponentOptions.buildFieldOption({
            required: true
        }),
        /**
         * The conversion factor to apply to the base distance unit (meter).
         *
         * **Note:**
         * > - If you want to convert distances to kilometers, you should set the `unitConversionFactor` to `1000`.
         * > - If you want to convert distance to miles, you should set the `unitConversionFactor` to `1610` (one mile is
         * > approximately equal to 1610 meters).
         *
         * Default value is `1000`.
         */
        unitConversionFactor: ComponentOptions_1.ComponentOptions.buildNumberOption({
            defaultValue: 1000,
            validator: function (value) {
                return !!value && value > 0;
            }
        }),
        /**
         * The CSS class for components that need to be re-enabled when the `DistanceResources` component successfully
         * provides a distance.
         *
         * Default value is `coveo-distance-disabled`.
         */
        disabledDistanceCssClass: ComponentOptions_1.ComponentOptions.buildStringOption({
            defaultValue: 'coveo-distance-disabled'
        }),
        /**
         * The latitude to use if no other position was provided.
         *
         * **Note:**
         * > You must also specify a [`longitudeValue`]{@link DistanceResources.options.longitudeValue} if you specify a
         * > `latitudeValue`.
         */
        latitudeValue: ComponentOptions_1.ComponentOptions.buildNumberOption({
            float: true
        }),
        /**
         * The longitude to use if no other position was provided.
         *
         * **Note:**
         * > You must also specify a [`latitudeValue`]{@link DistanceResources.options.latitudeValue} if you specify a
         * > `longitudeValue`.
         */
        longitudeValue: ComponentOptions_1.ComponentOptions.buildNumberOption({
            float: true
        }),
        /**
         * The API key to use to request the Google API geolocation service.
         *
         * If you do not specify a value for this option, the `DistanceResources` component does not try to request the
         * service.
         */
        googleApiKey: ComponentOptions_1.ComponentOptions.buildStringOption(),
        /**
         * Whether to request the geolocation service of the web browser.
         *
         * If not defined, will not try to request the service.
         *
         * **Note:**
         * > Recent web browsers typically require a site to be in HTTPS to enable their geolocation service.
         *
         * If you do not specify a value for this option, the `DistanceResources` component does not try to request the
         * service.
         */
        useNavigator: ComponentOptions_1.ComponentOptions.buildBooleanOption(),
        /**
         * Whether to execute a new query when the `DistanceResources` component successfully provides a new position.
         *
         * Default value is `false`.
         */
        triggerNewQueryOnNewPosition: ComponentOptions_1.ComponentOptions.buildBooleanOption({
            defaultValue: false
        }),
        /**
         * Whether to cancel all the queries until the `DistanceResources` component successfully resolves a position.
         *
         * Default value is `true`
         */
        cancelQueryUntilPositionResolved: ComponentOptions_1.ComponentOptions.buildBooleanOption({
            defaultValue: true
        })
    };
    return DistanceResources;
}(Component_1.Component));
exports.DistanceResources = DistanceResources;
Initialization_1.Initialization.registerAutoCreateComponent(DistanceResources);
 
 
/***/ }),
/* 677 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
__webpack_require__(1102);
var QueryEvents_1 = __webpack_require__(14);
var GlobalExports_1 = __webpack_require__(10);
var Assert_1 = __webpack_require__(12);
var Strings_1 = __webpack_require__(4);
var AccessibleButton_1 = __webpack_require__(20);
var Dom_1 = __webpack_require__(0);
var AnalyticsActionListMeta_1 = __webpack_require__(7);
var Component_1 = __webpack_require__(6);
var ComponentOptions_1 = __webpack_require__(13);
var Initialization_1 = __webpack_require__(8);
/**
 * The ErrorReport component takes care of handling fatal error when doing a query on the index / Search API.
 *
 * For example, the ErrorReport component displays a message when the service responds with a 401 or 503 error. This
 * component also renders a small text area with the JSON content of the error response, for debugging purposes.
 */
var ErrorReport = /** @class */ (function (_super) {
    __extends(ErrorReport, _super);
    /**
     * Creates a new ErrorReport component.
     * @param element The HTMLElement on which to instantiate the component.
     * @param options The options for the ErrorReport component.
     * @param bindings The bindings that the component requires to function normally. If not set, these will be
     * automatically resolved (with a slower execution time).
     */
    function ErrorReport(element, options, bindings) {
        var _this = _super.call(this, element, ErrorReport.ID, bindings) || this;
        _this.element = element;
        _this.options = options;
        _this.options = ComponentOptions_1.ComponentOptions.initComponentOptions(element, ErrorReport, options);
        _this.container = Dom_1.$$('div', { className: 'coveo-error-report-container' });
        _this.element.appendChild(_this.container.el);
        if (_this.options.showDetailedError) {
            _this.message = Dom_1.$$('div', {
                className: 'coveo-error-report-message'
            });
            _this.container.append(_this.message.el);
        }
        _this.helpSuggestion = Dom_1.$$('div', {
            className: 'coveo-error-report-help-suggestion'
        });
        Dom_1.$$(_this.element).hide();
        _this.bind.onRootElement(QueryEvents_1.QueryEvents.newQuery, function () { return _this.handleNewQuery(); });
        _this.bind.onRootElement(QueryEvents_1.QueryEvents.queryError, function (data) { return _this.handleQueryError(data); });
        return _this;
    }
    /**
     * Performs the "back" action in the browser.
     * Also logs an `errorBack` event in the usage analytics.
     */
    ErrorReport.prototype.back = function () {
        this.usageAnalytics.logCustomEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.errorBack, {}, this.root);
        this.usageAnalytics.logSearchEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.errorBack, {});
        history.back();
    };
    /**
     * Resets the current state of the query and triggers a new query.
     * Also logs an `errorClearQuery` event in the usage analytics.
     */
    ErrorReport.prototype.reset = function () {
        this.queryStateModel.reset();
        this.usageAnalytics.logSearchEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.errorClearQuery, {});
        this.usageAnalytics.logCustomEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.errorClearQuery, {}, this.root);
        this.queryController.executeQuery();
    };
    /**
     * Retries the same query, in case of a temporary service error.
     * Also logs an `errorRetry` event in the usage analytics.
     */
    ErrorReport.prototype.retry = function () {
        this.usageAnalytics.logSearchEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.errorRetry, {});
        this.usageAnalytics.logCustomEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.errorRetry, {}, this.root);
        this.queryController.executeQuery();
    };
    ErrorReport.prototype.buildOrGetTitleElements = function () {
        var titleElement = Dom_1.$$(this.element).find('.coveo-error-report-title');
        var title;
        if (titleElement) {
            title = Dom_1.$$(titleElement);
        }
        else {
            title = Dom_1.$$('div', { className: 'coveo-error-report-title' });
            this.container.prepend(title.el);
        }
        var firstHeading = title.find('h1');
        if (!firstHeading) {
            firstHeading = Dom_1.$$('h1').el;
            title.append(firstHeading);
        }
        var secondHeading = title.find('h2');
        if (!secondHeading) {
            secondHeading = Dom_1.$$('h2').el;
            title.append(secondHeading);
        }
        return {
            title: title,
            h1: Dom_1.$$(firstHeading),
            h2: Dom_1.$$(secondHeading)
        };
    };
    ErrorReport.prototype.setErrorTitle = function (errorName, helpSuggestion) {
        var errorTitle = {
            h1: errorName ? Strings_1.l(errorName) : Strings_1.l('OopsError'),
            h2: helpSuggestion ? Strings_1.l(helpSuggestion) : Strings_1.l('ProblemPersists')
        };
        var _a = this.buildOrGetTitleElements(), h1 = _a.h1, h2 = _a.h2;
        Eif (h1 && h2) {
            Dom_1.$$(h1).text(errorTitle.h1);
            Dom_1.$$(h2).text(errorTitle.h2);
        }
    };
    ErrorReport.prototype.buildPrevious = function () {
        var _this = this;
        var previous = Dom_1.$$('span', {
            className: 'coveo-error-report-previous'
        }, Strings_1.l('GoBack'));
        new AccessibleButton_1.AccessibleButton()
            .withElement(previous)
            .withSelectAction(function () { return _this.back(); })
            .withLabel(Strings_1.l('GoBack'))
            .build();
        return previous.el;
    };
    ErrorReport.prototype.buildReset = function () {
        var _this = this;
        var reset = Dom_1.$$('span', {
            className: 'coveo-error-report-clear'
        }, Strings_1.l('Reset'));
        new AccessibleButton_1.AccessibleButton()
            .withElement(reset)
            .withSelectAction(function () { return _this.reset(); })
            .withLabel(Strings_1.l('Reset'))
            .build();
        return reset.el;
    };
    ErrorReport.prototype.buildRetry = function () {
        var _this = this;
        var retry = Dom_1.$$('span', {
            className: 'coveo-error-report-retry'
        }, Strings_1.l('Retry'));
        new AccessibleButton_1.AccessibleButton()
            .withElement(retry)
            .withSelectAction(function () { return _this.retry(); })
            .withLabel(Strings_1.l('Retry'))
            .build();
        return retry.el;
    };
    ErrorReport.prototype.handleNewQuery = function () {
        Dom_1.$$(this.element).hide();
        var _a = this.buildOrGetTitleElements(), h1 = _a.h1, h2 = _a.h2;
        h1.remove();
        h2.remove();
        Iif (this.closePopup != null) {
            this.closePopup();
        }
    };
    ErrorReport.prototype.handleQueryError = function (data) {
        var _this = this;
        Assert_1.Assert.exists(data);
        Assert_1.Assert.exists(data.error);
        Eif (data.endpoint.options.queryStringArguments.organizationId) {
            this.organizationId = data.endpoint.options.queryStringArguments.organizationId;
        }
        else {
            this.organizationId = Strings_1.l('CoveoOrganization');
        }
        // Do not display the panel if the error is for missing authentication. The
        // appropriate authentication provider should take care of redirecting.
        Iif (data.error.isMissingAuthentication) {
            return;
        }
        switch (data.error.name) {
            case 'NoEndpointsException':
                this.options.showDetailedError = false;
                this.buildEndpointErrorElements('https://docs.coveo.com/en/331/');
                this.setErrorTitle(Strings_1.l('NoEndpoints', this.organizationId), Strings_1.l('AddSources'));
                break;
            case 'InvalidTokenException':
                this.options.showDetailedError = false;
                this.buildEndpointErrorElements('https://docs.coveo.com/en/56/');
                this.setErrorTitle(Strings_1.l('CannotAccess', this.organizationId), Strings_1.l('InvalidToken'));
                break;
            case 'GroupByAndFacetBothExistingException':
                this.options.showDetailedError = false;
                this.buildEndpointErrorElements('https://docs.coveo.com/en/2917');
                this.setErrorTitle(undefined, Strings_1.l('GroupByAndFacetRequestsCannotCoexist'));
                break;
            case 'OrganizationIsPausedException':
                this.options.showDetailedError = false;
                this.buildEndpointErrorElements('https://docs.coveo.com/l6af0467');
                this.setErrorTitle(Strings_1.l('OrganizationWillResume'), Strings_1.l('OrganizationIsPaused'));
                break;
            default:
                this.buildOptionsElement();
                this.setErrorTitle();
        }
        if (this.options.showDetailedError) {
            this.message.empty();
            var moreInfo_1 = Dom_1.$$('span', {
                className: 'coveo-error-report-more-info'
            }, Strings_1.l('MoreInfo'));
            moreInfo_1.on('click', function () {
                moreInfo_1.empty();
                _this.message.el.appendChild(_this.buildErrorInfo(data.error));
            });
            this.message.el.appendChild(moreInfo_1.el);
        }
        Dom_1.$$(this.element).show();
    };
    ErrorReport.prototype.buildErrorInfo = function (data) {
        var errorInfo = Dom_1.$$('div', {
            className: 'coveo-error-info'
        });
        var textArea = Dom_1.$$('textarea', undefined, JSON.stringify(data, null, 2));
        errorInfo.el.appendChild(textArea.el);
        var infoLabel = Dom_1.$$('div', {
            className: 'coveo-error-info-label'
        }, Strings_1.l('CopyPasteToSupport'));
        errorInfo.el.appendChild(infoLabel.el);
        return errorInfo.el;
    };
    ErrorReport.prototype.buildOptionsElement = function () {
        var oldOptions = this.container.find('.coveo-error-report-options');
        if (oldOptions) {
            Dom_1.$$(oldOptions).remove();
        }
        var optionsElement = Dom_1.$$('div', { className: 'coveo-error-report-options' });
        optionsElement.el.appendChild(this.buildPrevious());
        optionsElement.el.appendChild(this.buildReset());
        optionsElement.el.appendChild(this.buildRetry());
        this.container.append(optionsElement.el);
    };
    ErrorReport.prototype.buildEndpointErrorElements = function (helpLink) {
        Iif (helpLink === void 0) { helpLink = 'https://docs.coveo.com/en/331/'; }
        this.helpSuggestion.empty();
        var link = Dom_1.$$('a', {
            href: helpLink,
            className: 'coveo-error-report-help-link'
        });
        link.setHtml(Strings_1.l('CoveoOnlineHelp'));
        this.helpSuggestion.append(link.el);
        this.container.el.insertBefore(this.helpSuggestion.el, this.message.el);
    };
    ErrorReport.ID = 'ErrorReport';
    ErrorReport.doExport = function () {
        GlobalExports_1.exportGlobally({
            ErrorReport: ErrorReport
        });
    };
    /**
     * The options for the component
     * @componentOptions
     */
    ErrorReport.options = {
        /**
         * Specifies whether to display a detailed error message as a JSON in a text content area.
         *
         * Default value is `true`.
         */
        showDetailedError: ComponentOptions_1.ComponentOptions.buildBooleanOption({ defaultValue: true })
    };
    return ErrorReport;
}(Component_1.Component));
exports.ErrorReport = ErrorReport;
Initialization_1.Initialization.registerAutoCreateComponent(ErrorReport);
 
 
/***/ }),
/* 678 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
var Component_1 = __webpack_require__(6);
var ComponentOptions_1 = __webpack_require__(13);
var Assert_1 = __webpack_require__(12);
var HighlightUtils_1 = __webpack_require__(82);
var Initialization_1 = __webpack_require__(8);
var GlobalExports_1 = __webpack_require__(10);
__webpack_require__(1103);
/**
 * The Excerpt component renders an excerpt of its associated result and highlights the keywords from the query using
 * the appropriate template helpers.
 *
 * This component is a result template component (see [Result Templates](https://docs.coveo.com/en/413/)).
 */
var Excerpt = /** @class */ (function (_super) {
    __extends(Excerpt, _super);
    /**
     * Creates a new Excerpt component.
     * @param element The HTMLElement on which to instantiate the component.
     * @param options The options for the Excerpt component.
     * @param bindings The bindings that the component requires to function normally. If not set, these will be
     * automatically resolved (with a slower execution time).
     * @param result The result to associate the component with.
     */
    function Excerpt(element, options, bindings, result) {
        var _this = _super.call(this, element, Excerpt.ID, bindings) || this;
        _this.element = element;
        _this.options = options;
        _this.bindings = bindings;
        _this.result = result;
        _this.options = ComponentOptions_1.ComponentOptions.initComponentOptions(element, Excerpt, options);
        _this.result = _this.result || _this.resolveResult();
        Assert_1.Assert.exists(_this.result);
        _this.element.innerHTML = HighlightUtils_1.HighlightUtils.highlightString(_this.result.excerpt, _this.result.excerptHighlights, null, 'coveo-highlight');
        return _this;
    }
    Excerpt.ID = 'Excerpt';
    Excerpt.doExport = function () {
        GlobalExports_1.exportGlobally({
            Excerpt: Excerpt
        });
    };
    return Excerpt;
}(Component_1.Component));
exports.Excerpt = Excerpt;
Initialization_1.Initialization.registerAutoCreateComponent(Excerpt);
 
 
/***/ }),
/* 679 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __assign = (this && this.__assign) || Object.assign || function(t) {
    for (var s, i = 1, n = arguments.length; i < n; i++) {
        s = arguments[i];
        for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
            t[p] = s[p];
    }
    return t;
};
Object.defineProperty(exports, "__esModule", { value: true });
var Component_1 = __webpack_require__(6);
var ComponentOptions_1 = __webpack_require__(13);
var SettingsEvents_1 = __webpack_require__(66);
var AnalyticsActionListMeta_1 = __webpack_require__(7);
var Initialization_1 = __webpack_require__(8);
var Strings_1 = __webpack_require__(4);
var _ = __webpack_require__(1);
var GlobalExports_1 = __webpack_require__(10);
__webpack_require__(1104);
var SVGIcons_1 = __webpack_require__(16);
var SearchInterface_1 = __webpack_require__(25);
var RegisteredNamedMethods_1 = __webpack_require__(38);
var moment = __webpack_require__(3);
var createAnchor = function () { return document.createElement('a'); };
function setCreateAnchor(fn) {
    createAnchor = fn;
}
exports.setCreateAnchor = setCreateAnchor;
/**
 * The ExportToExcel component renders an item in the {@link Settings} menu to allow the end user to export the current
 * search results to the Microsoft Excel format (.xlsx).
 *
 * @availablesince [November 2015 Release (v1.0.139)](https://docs.coveo.com/en/289/#november-2015-release-v10139)
 */
var ExportToExcel = /** @class */ (function (_super) {
    __extends(ExportToExcel, _super);
    /**
     * Creates a new ExportToExcel component.
     * @param element The HTMLElement on which to instantiate the component.
     * @param options The options for the ExportToExcel component.
     * @param bindings The bindings that the component requires to function normally. If not set, these will be
     * automatically resolved (with a slower execution time).
     * @param _window The global Window object (used to download the Excel link).
     */
    function ExportToExcel(element, options, bindings, _window) {
        var _this = _super.call(this, element, ExportToExcel.ID, bindings) || this;
        _this.element = element;
        _this.options = options;
        _this.bindings = bindings;
        _this._window = _window;
        _this._window = _this._window || window;
        _this.options = ComponentOptions_1.ComponentOptions.initComponentOptions(element, ExportToExcel, options);
        _this.bind.onRootElement(SettingsEvents_1.SettingsEvents.settingsPopulateMenu, function (args) {
            args.menuData.push({
                text: Strings_1.l('ExportToExcel'),
                className: 'coveo-export-to-excel',
                tooltip: Strings_1.l('ExportToExcelDescription'),
                onOpen: function () { return _this.download(); },
                svgIcon: SVGIcons_1.SVGIcons.icons.dropdownExport,
                svgIconClassName: 'coveo-export-to-excel-svg'
            });
        });
        return _this;
    }
    /**
     * Downloads the Excel representation of the current query.
     *
     * Also logs an `exportToExcel` event in the usage analytics.
     */
    ExportToExcel.prototype.download = function () {
        var _this = this;
        var query = this.buildExcelQuery();
        this.logger.debug("Performing query following 'Export to Excel' click");
        var endpoint = this.queryController.getEndpoint();
        this.usageAnalytics.logCustomEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.exportToExcel, {}, this.element);
        endpoint.fetchBinary(query).then(function (content) { return _this.downloadExcelFile(content); });
    };
    ExportToExcel.prototype.buildExcelQuery = function () {
        var query = this.queryController.getLastQuery();
        query = _.omit(query, ['numberOfResults', 'fieldsToInclude']);
        if (this.options.fieldsToInclude) {
            query.fieldsToInclude = this.options.fieldsToInclude;
        }
        return __assign({}, query, { format: 'xlsx', numberOfResults: this.options.numberOfResults });
    };
    ExportToExcel.prototype.downloadExcelFile = function (content) {
        var blob = new Blob([content], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' });
        var fileName = this.buildExcelFileName();
        if (window.navigator.msSaveOrOpenBlob) {
            window.navigator.msSaveOrOpenBlob(blob, fileName);
            return;
        }
        var url = URL.createObjectURL(blob);
        var a = createAnchor();
        a.href = url;
        a.download = fileName;
        a.click();
        URL.revokeObjectURL(url);
    };
    ExportToExcel.prototype.buildExcelFileName = function () {
        var utc = moment().utc();
        var year = utc.format('YYYY');
        var month = utc.format('MM');
        var day = utc.format('DD');
        var hour = utc.format('HH');
        var minute = utc.format('mm');
        var second = utc.format('ss');
        return "query--" + year + "-" + month + "-" + day + "--" + hour + "-" + minute + "-" + second + ".xlsx";
    };
    ExportToExcel.create = function (element, options, root) {
        return new ExportToExcel(element, options, RegisteredNamedMethods_1.get(root, SearchInterface_1.SearchInterface).getBindings());
    };
    ExportToExcel.ID = 'ExportToExcel';
    ExportToExcel.doExport = function () {
        GlobalExports_1.exportGlobally({
            ExportToExcel: ExportToExcel
        });
    };
    /**
     * The options for the ExportToExcel
     * @componentOptions
     */
    ExportToExcel.options = {
        /**
         * Specifies the number of results to include in the resulting Excel file.
         *
         * Generating and downloading the Excel file should take a reasonably short amount of time when using the default
         * value. However, this amount of time will increase exponentially as you set the value higher.
         *
         * Consequently, you should avoid setting this value above the default index limit of 1000 search results.
         *
         * Default value is `100`. Minimum value is `1`.
         *
         * @availablesince [February 2016 Release (v1.0.318)](https://docs.coveo.com/en/309/#february-2016-release-v10318)
         */
        numberOfResults: ComponentOptions_1.ComponentOptions.buildNumberOption({ defaultValue: 100, min: 1 }),
        /**
         * Specifies the fields to include in the CSV output.
         *
         * Note that this does not affect top level properties such as the title, clickUri, printableUri and sysUri, for example.
         *
         * Default value is `undefined`, meaning all fields will be exported.
         */
        fieldsToInclude: ComponentOptions_1.ComponentOptions.buildFieldsOption()
    };
    return ExportToExcel;
}(Component_1.Component));
exports.ExportToExcel = ExportToExcel;
Initialization_1.Initialization.registerAutoCreateComponent(ExportToExcel);
 
 
/***/ }),
/* 680 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
/**
 * The names of the events that can be triggered by the [FacetsMobileMode]{@link FacetsMobileMode} component.
 */
var FacetsMobileModeEvents = /** @class */ (function () {
    function FacetsMobileModeEvents() {
    }
    /**
     * The name of the event that gets triggered when the facets pop-up (or modal) is opened in mobile mode.
     */
    FacetsMobileModeEvents.popupOpened = 'popupOpened';
    /**
     * The name of the event that gets triggered when the facets pop-up (or modal) is closed in mobile mode.
     */
    FacetsMobileModeEvents.popupClosed = 'popupClosed';
    return FacetsMobileModeEvents;
}());
exports.FacetsMobileModeEvents = FacetsMobileModeEvents;
 
 
/***/ }),
/* 681 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var underscore_1 = __webpack_require__(1);
var Dom_1 = __webpack_require__(0);
var DefaultSearchDropdownNavigator = /** @class */ (function () {
    function DefaultSearchDropdownNavigator(config) {
        this.config = config;
    }
    DefaultSearchDropdownNavigator.prototype.setAsCurrentResult = function (toSet) {
        this.currentResult && this.currentResult.removeClass('coveo-facet-search-current-result');
        this.currentResult = toSet;
        toSet.addClass('coveo-facet-search-current-result');
        this.updateSelectedOption(toSet);
    };
    DefaultSearchDropdownNavigator.prototype.focusNextElement = function () {
        this.moveCurrentResultDown();
    };
    DefaultSearchDropdownNavigator.prototype.focusPreviousElement = function () {
        this.moveCurrentResultUp();
    };
    DefaultSearchDropdownNavigator.prototype.moveCurrentResultDown = function () {
        var nextResult = this.currentResult.el.nextElementSibling;
        Iif (!nextResult) {
            nextResult = underscore_1.first(this.searchResults.children);
        }
        this.setAsCurrentResult(Dom_1.$$(nextResult));
        this.highlightAndShowCurrentResultWithKeyboard();
    };
    DefaultSearchDropdownNavigator.prototype.moveCurrentResultUp = function () {
        var previousResult = this.currentResult.el.previousElementSibling;
        if (!previousResult) {
            previousResult = underscore_1.last(this.searchResults.children);
        }
        this.setAsCurrentResult(Dom_1.$$(previousResult));
        this.highlightAndShowCurrentResultWithKeyboard();
    };
    DefaultSearchDropdownNavigator.prototype.highlightAndShowCurrentResultWithKeyboard = function () {
        this.currentResult.addClass('coveo-facet-search-current-result');
        this.config.setScrollTrigger(true);
        this.searchResults.scrollTop = this.currentResult.el.offsetTop;
    };
    Object.defineProperty(DefaultSearchDropdownNavigator.prototype, "searchResults", {
        get: function () {
            return this.config.searchResults;
        },
        enumerable: true,
        configurable: true
    });
    DefaultSearchDropdownNavigator.prototype.updateSelectedOption = function (option) {
        this.config.input.setAttribute('aria-activedescendant', option.getAttribute('id'));
        var previouslySelectedOption = Dom_1.$$(this.searchResults).find('[aria-selected^="true"]');
        previouslySelectedOption && previouslySelectedOption.setAttribute('aria-selected', 'false');
        option.setAttribute('aria-selected', 'true');
    };
    return DefaultSearchDropdownNavigator;
}());
exports.DefaultSearchDropdownNavigator = DefaultSearchDropdownNavigator;
 
 
/***/ }),
/* 682 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Dom_1 = __webpack_require__(0);
var SVGIcons_1 = __webpack_require__(16);
var SVGDom_1 = __webpack_require__(23);
var underscore_1 = __webpack_require__(1);
var Strings_1 = __webpack_require__(4);
var Globalize = __webpack_require__(28);
var CategoryFacetTemplates = /** @class */ (function () {
    function CategoryFacetTemplates() {
        this.listRoot = Dom_1.$$('ul', { className: 'coveo-category-facet-values' });
        this.collapseArrow = Dom_1.$$('span', { className: 'coveo-category-facet-collapse-children' }, SVGIcons_1.SVGIcons.icons.arrowDown);
        SVGDom_1.SVGDom.addClassToSVGInContainer(this.collapseArrow.el, 'coveo-category-facet-collapse-children-svg');
    }
    CategoryFacetTemplates.prototype.buildListRoot = function () {
        return this.listRoot.clone(true);
    };
    CategoryFacetTemplates.prototype.buildListElement = function (data) {
        var div = Dom_1.$$('div', {}, this.createListElement(data));
        return Dom_1.$$(div.el.firstChild);
    };
    CategoryFacetTemplates.prototype.buildAllCategoriesButton = function () {
        var allCategoriesCaption = Dom_1.$$('span', { className: 'coveo-category-facet-all-categories-caption' }, Strings_1.l('AllCategories'));
        var allCategories = Dom_1.$$('li', { className: 'coveo-category-facet-value coveo-category-facet-all-categories' }, this.buildCollapseArrow(), allCategoriesCaption);
        return allCategories;
    };
    CategoryFacetTemplates.prototype.buildEllipsis = function () {
        var ellipsisCaption = Dom_1.$$('span', { className: 'coveo-category-facet-ellipsis-caption' }, '[ ... ]');
        var ellipsis = Dom_1.$$('li', { className: 'coveo-category-facet-ellipsis' }, ellipsisCaption);
        return ellipsis;
    };
    CategoryFacetTemplates.prototype.buildCollapseArrow = function () {
        return this.collapseArrow.clone(true);
    };
    CategoryFacetTemplates.prototype.getFormattedCount = function (count) {
        return Globalize.format(count, 'n0');
    };
    CategoryFacetTemplates.prototype.createListElement = function (data) {
        return "<li class=\"coveo-category-facet-value\">\n        <label class=\"coveo-category-facet-value-label\">\n          <span title=\"" + underscore_1.escape(data.value) + "\" class=\"coveo-category-facet-value-caption\">" + underscore_1.escape(data.value) + "</span>\n          <span class=\"coveo-category-facet-value-count\">" + this.getFormattedCount(data.count) + "</span>\n        </label>\n      </li>";
    };
    return CategoryFacetTemplates;
}());
exports.CategoryFacetTemplates = CategoryFacetTemplates;
 
 
/***/ }),
/* 683 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var CategoryValue_1 = __webpack_require__(684);
var underscore_1 = __webpack_require__(1);
var CategoryChildrenValueRenderer = /** @class */ (function () {
    function CategoryChildrenValueRenderer(element, categoryFacetTemplates, categoryValue, categoryFacet) {
        this.element = element;
        this.categoryFacetTemplates = categoryFacetTemplates;
        this.categoryValue = categoryValue;
        this.categoryFacet = categoryFacet;
        this.children = [];
    }
    CategoryChildrenValueRenderer.prototype.clearChildren = function () {
        this.element.removeClass('coveo-active-category-facet-parent');
        this.children.forEach(function (child) {
            child.clear();
        });
        this.children = [];
    };
    CategoryChildrenValueRenderer.prototype.renderChildren = function (values) {
        var _this = this;
        underscore_1.each(values, function (value) {
            _this.renderValue(value, true).makeSelectable();
        });
    };
    CategoryChildrenValueRenderer.prototype.renderAsParent = function (value) {
        var categoryValue = this.renderValue(value, false);
        return categoryValue;
    };
    CategoryChildrenValueRenderer.prototype.renderValue = function (value, isChild) {
        var path = this.categoryValue.path.concat([value.value]);
        var categoryValueDescriptor = {
            value: value.value,
            count: value.numberOfResults,
            path: path
        };
        var categoryValue = new CategoryValue_1.CategoryValue(this.categoryValue.listRoot, categoryValueDescriptor, this.categoryFacetTemplates, this.categoryFacet);
        categoryValue.render(isChild);
        this.children.push(categoryValue);
        return categoryValue;
    };
    return CategoryChildrenValueRenderer;
}());
exports.CategoryChildrenValueRenderer = CategoryChildrenValueRenderer;
 
 
/***/ }),
/* 684 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Dom_1 = __webpack_require__(0);
var CategoryValueChildrenRenderer_1 = __webpack_require__(683);
var AnalyticsActionListMeta_1 = __webpack_require__(7);
var AccessibleButton_1 = __webpack_require__(20);
var Strings_1 = __webpack_require__(4);
var CategoryValue = /** @class */ (function () {
    function CategoryValue(listRoot, categoryValueDescriptor, categoryFacetTemplates, categoryFacet) {
        this.listRoot = listRoot;
        this.categoryValueDescriptor = categoryValueDescriptor;
        this.categoryFacetTemplates = categoryFacetTemplates;
        this.categoryFacet = categoryFacet;
        this.isActive = false;
        this.element = this.categoryFacetTemplates.buildListElement({
            value: this.captionedValueDescriptorValue,
            count: this.categoryValueDescriptor.count
        });
        this.collapseArrow = this.categoryFacetTemplates.buildCollapseArrow();
        this.categoryChildrenValueRenderer = new CategoryValueChildrenRenderer_1.CategoryChildrenValueRenderer(this.element, categoryFacetTemplates, this, this.categoryFacet);
        this.path = this.categoryValueDescriptor.path;
    }
    CategoryValue.prototype.render = function (isChild) {
        Iif (this.pastMaximumDepth()) {
            this.element.addClass('coveo-category-facet-last-value');
        }
        if (isChild) {
            this.element.addClass('coveo-category-facet-child-value');
        }
        else {
            this.element.addClass('coveo-category-facet-parent-value');
        }
        this.listRoot.append(this.element.el);
    };
    CategoryValue.prototype.getDescriptor = function () {
        return {
            value: this.categoryValueDescriptor.value,
            count: this.categoryValueDescriptor.count,
            path: this.path
        };
    };
    CategoryValue.prototype.clear = function () {
        this.element.detach();
        this.categoryChildrenValueRenderer.clearChildren();
    };
    CategoryValue.prototype.renderChildren = function (values) {
        this.isActive = true;
        this.element.addClass('coveo-active-category-facet-parent');
        this.categoryChildrenValueRenderer.renderChildren(values);
    };
    CategoryValue.prototype.renderAsParent = function (value) {
        return this.categoryChildrenValueRenderer.renderAsParent(value);
    };
    Object.defineProperty(CategoryValue.prototype, "children", {
        get: function () {
            return this.categoryChildrenValueRenderer.children;
        },
        enumerable: true,
        configurable: true
    });
    CategoryValue.prototype.makeSelectable = function () {
        var _this = this;
        var element = Dom_1.$$(this.element.find('.coveo-category-facet-value-label'));
        element.addClass('coveo-selectable');
        var count = this.categoryValueDescriptor.count;
        var countLabel = Strings_1.l('ResultCount', count.toString(), count);
        var label = Strings_1.l('IncludeValueWithResultCount', this.captionedValueDescriptorValue, countLabel);
        new AccessibleButton_1.AccessibleButton()
            .withElement(element)
            .withSelectAction(function () { return _this.onSelect(); })
            .withLabel(label)
            .build();
        return this;
    };
    CategoryValue.prototype.showCollapseArrow = function () {
        Eif (!this.collapseArrow.el.parentElement) {
            var label = this.element.find('label');
            Dom_1.$$(label).prepend(this.collapseArrow.el);
        }
        return this;
    };
    Object.defineProperty(CategoryValue.prototype, "captionedValueDescriptorValue", {
        get: function () {
            var value = this.categoryValueDescriptor.value;
            return this.categoryFacet.getCaption(value);
        },
        enumerable: true,
        configurable: true
    });
    CategoryValue.prototype.onSelect = function () {
        if (!this.pastMaximumDepth()) {
            this.categoryFacet.logAnalyticsEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.categoryFacetSelect, this.path);
            this.categoryFacet.scrollToTop();
            this.categoryFacet.changeActivePath(this.path);
            this.categoryFacet.executeQuery();
        }
    };
    CategoryValue.prototype.pastMaximumDepth = function () {
        return this.path.length - this.categoryFacet.options.basePath.length >= this.categoryFacet.options.maximumDepth;
    };
    return CategoryValue;
}());
exports.CategoryValue = CategoryValue;
 
 
/***/ }),
/* 685 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { Iif (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        Iif (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            Iif (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
            Iif (y = 0, t) op = [0, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    Eif (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        Iif (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
Object.defineProperty(exports, "__esModule", { value: true });
var CategoryFacet_1 = __webpack_require__(71);
var FacetSearchElement_1 = __webpack_require__(330);
var underscore_1 = __webpack_require__(1);
var Dom_1 = __webpack_require__(0);
var SVGDom_1 = __webpack_require__(23);
var SVGIcons_1 = __webpack_require__(16);
var Strings_1 = __webpack_require__(4);
__webpack_require__(1116);
var StringUtils_1 = __webpack_require__(34);
var AnalyticsActionListMeta_1 = __webpack_require__(7);
var AccessibleButton_1 = __webpack_require__(20);
var Globalize = __webpack_require__(28);
var CategoryFacetSearch = /** @class */ (function () {
    function CategoryFacetSearch(categoryFacet, displayButton) {
        if (displayButton === void 0) { displayButton = true; }
        var _this = this;
        this.categoryFacet = categoryFacet;
        this.displayButton = displayButton;
        this.moreValuesToFetch = true;
        this.facetSearchElement = new FacetSearchElement_1.FacetSearchElement(this);
        this.displayNewValues = underscore_1.debounce(this.getDisplayNewValuesFunction(), this.categoryFacet.options.facetSearchDelay);
        this.categoryFacet.root.addEventListener('click', function (e) { return _this.handleClickElsewhere(e); });
        this.numberOfValuesToFetch = this.categoryFacet.options.numberOfResultsInFacetSearch;
    }
    Object.defineProperty(CategoryFacetSearch.prototype, "facetType", {
        get: function () {
            return CategoryFacet_1.CategoryFacet.ID;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(CategoryFacetSearch.prototype, "facetTitle", {
        get: function () {
            return this.categoryFacet.options.title || this.categoryFacet.options.field.toString();
        },
        enumerable: true,
        configurable: true
    });
    CategoryFacetSearch.prototype.setExpandedFacetSearchAccessibilityAttributes = function (searchResultsElements) {
        this.container.setAttribute('aria-expanded', 'true');
    };
    CategoryFacetSearch.prototype.setCollapsedFacetSearchAccessibilityAttributes = function () {
        this.container.setAttribute('aria-expanded', 'false');
    };
    CategoryFacetSearch.prototype.build = function () {
        this.container = Dom_1.$$('div', {
            className: 'coveo-category-facet-search-container',
            role: 'button'
        });
        this.container.toggleClass('coveo-category-facet-search-without-button', !this.displayButton);
        this.displayButton && this.buildButton();
        this.container.append(this.facetSearchElement.build());
        Dom_1.$$(this.facetSearchElement.search).toggleClass('without-animation', !this.displayButton);
        return this.container;
    };
    CategoryFacetSearch.prototype.buildButton = function () {
        var _this = this;
        new AccessibleButton_1.AccessibleButton()
            .withElement(this.container)
            .withSelectAction(function () {
            Dom_1.$$(_this.categoryFacet.element).addClass('coveo-category-facet-searching');
            _this.focus();
        })
            .withLabel(Strings_1.l('SearchFacetResults', this.facetTitle))
            .build();
        this.buildfacetSearchPlaceholder();
    };
    CategoryFacetSearch.prototype.focus = function () {
        this.facetSearchElement.focus();
    };
    CategoryFacetSearch.prototype.clear = function () {
        this.dismissSearchResults();
        this.container && this.container.detach();
    };
    CategoryFacetSearch.prototype.dismissSearchResults = function () {
        this.removeNoResultsCssClasses();
        Dom_1.$$(this.categoryFacet.element).removeClass('coveo-category-facet-searching');
        Dom_1.$$(this.facetSearchElement.searchResults).empty();
        this.facetSearchElement.clearSearchInput();
        this.facetSearchElement.hideSearchResultsElement();
        this.currentlyDisplayedResults = null;
        this.numberOfValuesToFetch = this.categoryFacet.options.numberOfResultsInFacetSearch;
        this.moreValuesToFetch = true;
    };
    CategoryFacetSearch.prototype.keyboardEventDefaultHandler = function () {
        this.moreValuesToFetch = true;
        this.displayNewValues();
    };
    CategoryFacetSearch.prototype.keyboardNavigationEnterPressed = function () {
        this.selectCurrentResult();
    };
    CategoryFacetSearch.prototype.fetchMoreValues = function () {
        this.numberOfValuesToFetch += this.categoryFacet.options.numberOfResultsInFacetSearch;
        this.displayNewValues();
    };
    CategoryFacetSearch.prototype.getCaptions = function () {
        var searchResults = Dom_1.$$(this.facetSearchElement.searchResults);
        var captions = searchResults
            .findAll('.coveo-category-facet-search-value-caption')
            .concat(searchResults.findAll('.coveo-category-facet-search-path-parents'))
            .concat(searchResults.findAll('.coveo-category-facet-search-path-last-value'));
        return captions;
    };
    CategoryFacetSearch.prototype.updateAriaLive = function (text) {
        this.categoryFacet.searchInterface.ariaLive.updateText(text);
    };
    CategoryFacetSearch.prototype.selectCurrentResult = function () {
        Eif (this.facetSearchElement.currentResult) {
            var currentResultPathData = this.facetSearchElement.currentResult.el.dataset.path;
            var delimiter = this.categoryFacet.options.delimitingCharacter;
            var path = currentResultPathData.split(delimiter);
            this.categoryFacet.changeActivePath(path);
            this.categoryFacet.logAnalyticsEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.categoryFacetSelect, path);
            this.categoryFacet.executeQuery();
            this.categoryFacet.scrollToTop();
        }
    };
    CategoryFacetSearch.prototype.handleClickElsewhere = function (e) {
        var closestContainer = Dom_1.$$(e.target).closest('.coveo-category-facet-search-container');
        var isSelfContainer = this.container && closestContainer === this.container.el;
        Eif (!closestContainer || !isSelfContainer) {
            this.dismissSearchResults();
        }
    };
    CategoryFacetSearch.prototype.buildfacetSearchPlaceholder = function () {
        var placeholder = Dom_1.$$('div', { className: 'coveo-category-facet-search-placeholder' });
        var icon = Dom_1.$$('div', { className: 'coveo-category-facet-search-icon' }, SVGIcons_1.SVGIcons.icons.checkboxHookExclusionMore);
        SVGDom_1.SVGDom.addClassToSVGInContainer(icon.el, 'coveo-category-facet-search-icon-svg');
        var label = Dom_1.$$('span', { className: 'coveo-category-facet-search-label' }, Strings_1.l('Search'));
        placeholder.append(icon.el);
        placeholder.append(label.el);
        this.container.append(placeholder.el);
    };
    CategoryFacetSearch.prototype.getDisplayNewValuesFunction = function () {
        var _this = this;
        return function () { return __awaiter(_this, void 0, void 0, function () {
            var categoryFacetValues;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        this.facetSearchElement.showFacetSearchWaitingAnimation();
                        this.categoryFacet.logger.info('Triggering new Category Facet search');
                        return [4 /*yield*/, this.categoryFacet.categoryFacetQueryController.searchFacetValues(this.facetSearchElement.input.value, this.numberOfValuesToFetch)];
                    case 1:
                        categoryFacetValues = _a.sent();
                        this.logAnalyticsEvent();
                        Eif (categoryFacetValues.length < this.numberOfValuesToFetch) {
                            this.moreValuesToFetch = false;
                        }
                        if (categoryFacetValues.length == 0) {
                            this.noFacetSearchResults();
                            return [2 /*return*/];
                        }
                        this.removeNoResultsCssClasses();
                        this.setFacetSearchResults(categoryFacetValues);
                        Eif (this.shouldPositionSearchResults) {
                            this.facetSearchElement.positionSearchResults();
                        }
                        this.facetSearchElement.hideFacetSearchWaitingAnimation();
                        return [2 /*return*/];
                }
            });
        }); };
    };
    CategoryFacetSearch.prototype.setFacetSearchResults = function (categoryFacetValues) {
        Dom_1.$$(this.facetSearchElement.searchResults).empty();
        this.currentlyDisplayedResults = underscore_1.pluck(categoryFacetValues, 'value');
        for (var i = 0; i < categoryFacetValues.length; i++) {
            var searchResult = this.buildFacetSearchValue(categoryFacetValues[i], i);
            if (i == 0) {
                this.facetSearchElement.setAsCurrentResult(searchResult);
            }
            this.facetSearchElement.appendToSearchResults(searchResult.el);
        }
        this.highlightCurrentQueryWithinSearchResults();
        this.facetSearchElement.updateAriaLiveWithResults(this.facetSearchElement.input.value, this.currentlyDisplayedResults.length, this.moreValuesToFetch);
    };
    CategoryFacetSearch.prototype.getFormattedCount = function (count) {
        return Globalize.format(count, 'n0');
    };
    CategoryFacetSearch.prototype.buildFacetSearchValue = function (categoryFacetValue, index) {
        var _this = this;
        var path = categoryFacetValue.value.split(this.categoryFacet.options.delimitingCharacter);
        var pathParents = path.slice(0, -1).length != 0 ? path.slice(0, -1).join('/') + "/" : '';
        var value = Dom_1.$$('span', { className: 'coveo-category-facet-search-value-caption' }, underscore_1.last(path));
        var number = Dom_1.$$('span', { className: 'coveo-category-facet-search-value-number' }, this.getFormattedCount(categoryFacetValue.numberOfResults));
        var pathParentsCaption = Dom_1.$$('span', { className: 'coveo-category-facet-search-path-parents' }, pathParents);
        var pathToValueCaption = Dom_1.$$('span', { className: 'coveo-category-facet-search-path' }, pathParentsCaption);
        var firstRow = Dom_1.$$('div', { className: 'coveo-category-facet-search-first-row' }, value, number);
        var secondRow = Dom_1.$$('div', { className: 'coveo-category-facet-search-second-row' }, pathToValueCaption);
        var item = Dom_1.$$('li', {
            id: "coveo-category-facet-search-suggestion-" + index,
            role: 'option',
            ariaSelected: 'false',
            className: 'coveo-category-facet-search-value',
            title: path
        }, firstRow, secondRow);
        item.el.dataset.path = categoryFacetValue.value;
        var countLabel = Strings_1.l('ResultCount', this.getFormattedCount(categoryFacetValue.numberOfResults), categoryFacetValue.numberOfResults);
        var label = Strings_1.l('IncludeValueWithResultCount', underscore_1.last(path), countLabel);
        new AccessibleButton_1.AccessibleButton()
            .withElement(item)
            .withSelectAction(function () {
            _this.categoryFacet.changeActivePath(path);
            _this.categoryFacet.scrollToTop();
            _this.categoryFacet.logAnalyticsEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.categoryFacetSelect, path);
            _this.categoryFacet.executeQuery();
        })
            .withLabel(label)
            .build();
        return item;
    };
    CategoryFacetSearch.prototype.noFacetSearchResults = function () {
        this.facetSearchElement.hideFacetSearchWaitingAnimation();
        this.facetSearchElement.emptyAndShowNoResults();
        Dom_1.$$(this.facetSearchElement.search).addClass('coveo-facet-search-no-results');
        Dom_1.$$(this.categoryFacet.element).addClass('coveo-no-results');
    };
    CategoryFacetSearch.prototype.removeNoResultsCssClasses = function () {
        this.facetSearchElement.search && Dom_1.$$(this.facetSearchElement.search).removeClass('coveo-facet-search-no-results');
        Dom_1.$$(this.categoryFacet.element).removeClass('coveo-no-results');
    };
    CategoryFacetSearch.prototype.highlightCurrentQueryWithinSearchResults = function () {
        var regex = new RegExp("(" + StringUtils_1.StringUtils.stringToRegex(this.facetSearchElement.input.value, true) + ")", 'ig');
        this.facetSearchElement.highlightCurrentQueryInSearchResults(regex);
    };
    CategoryFacetSearch.prototype.logAnalyticsEvent = function () {
        this.categoryFacet.usageAnalytics.logCustomEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.categoryFacetSearch, {
            categoryFacetId: this.categoryFacet.options.id,
            categoryFacetField: this.categoryFacet.options.field.toString(),
            categoryFacetTitle: this.categoryFacet.options.title
        }, this.categoryFacet.root);
    };
    Object.defineProperty(CategoryFacetSearch.prototype, "shouldPositionSearchResults", {
        get: function () {
            var searchResults = this.facetSearchElement.searchResults;
            return searchResults && !searchResults.parentElement;
        },
        enumerable: true,
        configurable: true
    });
    return CategoryFacetSearch;
}());
exports.CategoryFacetSearch = CategoryFacetSearch;
 
 
/***/ }),
/* 686 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Dom_1 = __webpack_require__(0);
var SVGIcons_1 = __webpack_require__(16);
var AccessibleButton_1 = __webpack_require__(20);
var Strings_1 = __webpack_require__(4);
var underscore_1 = __webpack_require__(1);
var AccessibilityUtils_1 = __webpack_require__(81);
var CategoryFacetBreadcrumb = /** @class */ (function () {
    function CategoryFacetBreadcrumb(categoryFacet, onClickHandler, categoryValueDescriptor, options) {
        this.categoryFacet = categoryFacet;
        this.onClickHandler = onClickHandler;
        this.categoryValueDescriptor = categoryValueDescriptor;
        this.options = options;
    }
    CategoryFacetBreadcrumb.prototype.build = function () {
        var _this = this;
        var clear = Dom_1.$$('span', {
            className: 'coveo-facet-breadcrumb-clear'
        }, SVGIcons_1.SVGIcons.icons.mainClear);
        var pathToRender = underscore_1.without.apply(void 0, [this.categoryValueDescriptor.path].concat(this.categoryFacet.options.basePath));
        var captionLabel = pathToRender.map(function (pathPart) { return _this.categoryFacet.getCaption(pathPart); }).join('/');
        var breadcrumbTitle = Dom_1.$$(AccessibilityUtils_1.getHeadingTag(this.options && this.options.headingLevel, 'span'), { className: 'coveo-category-facet-breadcrumb-title' }, this.categoryFacet.options.title + ":");
        var valuesContainer = Dom_1.$$('span', { className: 'coveo-category-facet-breadcrumb-values' }, captionLabel, clear);
        new AccessibleButton_1.AccessibleButton()
            .withElement(valuesContainer)
            .withLabel(Strings_1.l('RemoveFilterOn', captionLabel))
            .withSelectAction(this.onClickHandler)
            .build();
        var breadcrumb = Dom_1.$$('span', { className: 'coveo-category-facet-breadcrumb' }, breadcrumbTitle, valuesContainer);
        return breadcrumb.el;
    };
    return CategoryFacetBreadcrumb;
}());
exports.CategoryFacetBreadcrumb = CategoryFacetBreadcrumb;
 
 
/***/ }),
/* 687 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var CategoryFacet_1 = __webpack_require__(71);
var QueryEvents_1 = __webpack_require__(14);
var underscore_1 = __webpack_require__(1);
var Logger_1 = __webpack_require__(18);
var PathMap = /** @class */ (function () {
    function PathMap() {
    }
    return PathMap;
}());
var CategoryFacetDebug = /** @class */ (function () {
    function CategoryFacetDebug(categoryFacet) {
        var _this = this;
        this.categoryFacet = categoryFacet;
        this.categoryFacet.bind.onRootElement(QueryEvents_1.QueryEvents.buildingQuery, function (args) { return _this.handleBuildingQuery(args); });
        this.categoryFacet.bind.onRootElement(QueryEvents_1.QueryEvents.querySuccess, function (args) {
            _this.handleQuerySuccess(args);
        });
    }
    CategoryFacetDebug.prototype.handleBuildingQuery = function (args) {
        var firstPositionInQuery = args.queryBuilder.groupByRequests.length;
        if (this.categoryFacet.activePath.length == 0) {
            this.positionInQuery = { start: firstPositionInQuery, end: firstPositionInQuery + 1 };
            this.addGroupByForEmptyPath(args.queryBuilder);
        }
        else {
            var path = this.categoryFacet.activePath;
            this.positionInQuery = { start: firstPositionInQuery, end: firstPositionInQuery + path.length };
            this.addGroupByForEachPathElement(args.queryBuilder, path);
        }
    };
    CategoryFacetDebug.prototype.handleQuerySuccess = function (args) {
        var _this = this;
        args.results.groupByResults
            .slice(this.positionInQuery.start, this.positionInQuery.end)
            .forEach(function (groupByResult) { return CategoryFacetDebug.analyzeResults(groupByResult, _this.categoryFacet.options.delimitingCharacter); });
    };
    CategoryFacetDebug.prototype.addGroupByForEmptyPath = function (queryBuilder) {
        queryBuilder.groupByRequests.push({
            field: this.categoryFacet.options.field,
            injectionDepth: this.categoryFacet.options.injectionDepth
        });
    };
    CategoryFacetDebug.prototype.addGroupByForEachPathElement = function (queryBuilder, path) {
        var _this = this;
        path.forEach(function (pathElement) {
            _this.categoryFacet.categoryFacetQueryController.addDebugGroupBy(queryBuilder, pathElement);
        });
    };
    CategoryFacetDebug.analyzeResults = function (groupByResults, delimiter) {
        var _this = this;
        var treeRoot = new Map();
        var orphans = [];
        var paths = this.buildPathsFromGroupByValues(groupByResults.values, delimiter);
        paths = underscore_1.sortBy(paths, function (value) { return value.length; });
        paths.forEach(function (path) {
            if (path.length == 1) {
                _this.addFirstNodeToTree(treeRoot, path);
            }
            else {
                var pathIsValid = true;
                var parentsOnly = path.slice(0, -1);
                var currentNode = treeRoot;
                for (var _i = 0, parentsOnly_1 = parentsOnly; _i < parentsOnly_1.length; _i++) {
                    var parent_1 = parentsOnly_1[_i];
                    currentNode = currentNode.get(parent_1);
                    if (!currentNode) {
                        _this.processOrphan(orphans, path, delimiter);
                        pathIsValid = false;
                        break;
                    }
                }
                if (pathIsValid) {
                    _this.addValidNodeToTree(currentNode, path);
                }
            }
        });
        return orphans;
    };
    CategoryFacetDebug.buildPathsFromGroupByValues = function (values, delimiter) {
        return underscore_1.chain(values)
            .pluck('value')
            .map(function (value) { return value.split(delimiter); })
            .sortBy(function (value) { return value.length; })
            .value();
    };
    CategoryFacetDebug.addFirstNodeToTree = function (treeRoot, path) {
        treeRoot.set(path[0], new Map());
    };
    CategoryFacetDebug.addValidNodeToTree = function (node, path) {
        node.set(path.slice(-1)[0], new Map());
    };
    CategoryFacetDebug.processOrphan = function (orphans, path, delimiter) {
        var formattedOrphan = path.join(delimiter);
        orphans.push(formattedOrphan);
        this.logger.error("Value " + formattedOrphan + " has no parent.");
    };
    CategoryFacetDebug.logger = new Logger_1.Logger(CategoryFacet_1.CategoryFacet);
    return CategoryFacetDebug;
}());
exports.CategoryFacetDebug = CategoryFacetDebug;
 
 
/***/ }),
/* 688 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var CategoryFacet_1 = __webpack_require__(71);
var Dom_1 = __webpack_require__(0);
var Strings_1 = __webpack_require__(4);
var SVGIcons_1 = __webpack_require__(16);
var SVGDom_1 = __webpack_require__(23);
var AccessibleButton_1 = __webpack_require__(20);
var CategoryFacetHeader = /** @class */ (function () {
    function CategoryFacetHeader(options) {
        this.options = options;
        this.element = document.createElement('div');
        Dom_1.$$(this.element).addClass('coveo-facet-header');
    }
    CategoryFacetHeader.prototype.build = function () {
        var waitElement = this.buildWaitAnimation();
        var titleSection = Dom_1.$$('div', {
            className: 'coveo-category-facet-title',
            role: 'heading',
            'aria-level': '2',
            'aria-label': Strings_1.l('FacetTitle', this.options.title) + "."
        }, this.options.title);
        this.element = Dom_1.$$('div', { className: 'coveo-category-facet-header' }, titleSection).el;
        Dom_1.$$(this.element).append(waitElement);
        var eraserElement = this.buildEraser();
        Dom_1.$$(this.element).append(eraserElement);
        return this.element;
    };
    CategoryFacetHeader.prototype.buildWaitAnimation = function () {
        var waitElement = Dom_1.$$('div', { className: CategoryFacet_1.CategoryFacet.WAIT_ELEMENT_CLASS }, SVGIcons_1.SVGIcons.icons.loading).el;
        SVGDom_1.SVGDom.addClassToSVGInContainer(waitElement, 'coveo-category-facet-header-wait-animation-svg');
        waitElement.style.visibility = 'hidden';
        return waitElement;
    };
    CategoryFacetHeader.prototype.buildEraser = function () {
        var _this = this;
        var eraserElement = Dom_1.$$('div', { className: 'coveo-category-facet-header-eraser coveo-facet-header-eraser' }, SVGIcons_1.SVGIcons.icons.mainClear)
            .el;
        SVGDom_1.SVGDom.addClassToSVGInContainer(eraserElement, 'coveo-facet-header-eraser-svg');
        var onClearClick = function () {
            _this.options.categoryFacet.reset();
            _this.options.categoryFacet.scrollToTop();
        };
        new AccessibleButton_1.AccessibleButton()
            .withElement(eraserElement)
            .withLabel(Strings_1.l('Clear', this.options.title))
            .withClickAction(onClearClick)
            .withEnterKeyboardAction(onClearClick)
            .build();
        return eraserElement;
    };
    return CategoryFacetHeader;
}());
exports.CategoryFacetHeader = CategoryFacetHeader;
 
 
/***/ }),
/* 689 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { Iif (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        Iif (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            Iif (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
            Iif (y = 0, t) op = [0, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    Eif (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        Iif (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
Object.defineProperty(exports, "__esModule", { value: true });
var ResultListRenderer_1 = __webpack_require__(332);
var TableTemplate_1 = __webpack_require__(239);
var Dom_1 = __webpack_require__(0);
var _ = __webpack_require__(1);
var ResultListTableRenderer = /** @class */ (function (_super) {
    __extends(ResultListTableRenderer, _super);
    function ResultListTableRenderer(resultListOptions, autoCreateComponentsFn) {
        var _this = _super.call(this, resultListOptions, autoCreateComponentsFn) || this;
        _this.resultListOptions = resultListOptions;
        _this.autoCreateComponentsFn = autoCreateComponentsFn;
        _this.shouldDisplayHeader = true;
        _this.shouldDisplayFooter = false;
        if (_this.resultListOptions.resultTemplate instanceof TableTemplate_1.TableTemplate) {
            if (_this.resultListOptions.resultTemplate.hasTemplateWithRole('table-footer')) {
                _this.shouldDisplayFooter = true;
            }
            // If custom templates are defined but no header template, do not display it.
            if (_this.resultListOptions.resultTemplate.templates.length !== 0 &&
                !_this.resultListOptions.resultTemplate.hasTemplateWithRole('table-header')) {
                _this.shouldDisplayHeader = false;
            }
        }
        return _this;
    }
    ResultListTableRenderer.prototype.getStartFragment = function (resultElements, append) {
        if (!append && !_.isEmpty(resultElements) && this.shouldDisplayHeader) {
            return this.renderRoledTemplate('table-header');
        }
    };
    ResultListTableRenderer.prototype.getEndFragment = function (resultElements, append) {
        if (!append && !_.isEmpty(resultElements) && this.shouldDisplayFooter) {
            return this.renderRoledTemplate('table-footer');
        }
    };
    ResultListTableRenderer.prototype.renderRoledTemplate = function (role) {
        return __awaiter(this, void 0, void 0, function () {
            var elem, frag;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0: return [4 /*yield*/, this.resultListOptions.resultTemplate.instantiateRoleToElement(role)];
                    case 1:
                        elem = _a.sent();
                        Dom_1.$$(elem).addClass("coveo-result-list-" + role);
                        this.autoCreateComponentsFn(elem, undefined);
                        frag = document.createDocumentFragment();
                        frag.appendChild(elem);
                        return [2 /*return*/, frag];
                }
            });
        });
    };
    return ResultListTableRenderer;
}(ResultListRenderer_1.ResultListRenderer));
exports.ResultListTableRenderer = ResultListTableRenderer;
 
 
/***/ }),
/* 690 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { Iif (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        Iif (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            Iif (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
            Iif (y = 0, t) op = [0, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    Eif (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        Iif (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
Object.defineProperty(exports, "__esModule", { value: true });
var Core_1 = __webpack_require__(9);
var ResultList_1 = __webpack_require__(68);
var underscore_1 = __webpack_require__(1);
var Dom_1 = __webpack_require__(0);
var Logger_1 = __webpack_require__(18);
var TemplateToHtml = /** @class */ (function () {
    function TemplateToHtml(args) {
        this.args = args;
    }
    TemplateToHtml.prototype.buildResults = function (results, layout, currentlyDisplayedResults) {
        return __awaiter(this, void 0, void 0, function () {
            var _this = this;
            var res, resultsPromises;
            return __generator(this, function (_a) {
                res = [];
                resultsPromises = underscore_1.map(results.results, function (result, index) {
                    return _this.buildResult(result, layout, currentlyDisplayedResults).then(function (resultElement) {
                        Eif (resultElement != null) {
                            res.push({ elem: resultElement, idx: index });
                        }
                        ResultList_1.ResultList.resultCurrentlyBeingRendered = null;
                        return resultElement;
                    });
                });
                // We need to sort by the original index order, because in lazy loading mode, it's possible that results does not gets rendered
                // in the correct order returned by the index, depending on the time it takes to load all the results component for a given result template
                return [2 /*return*/, Promise.all(resultsPromises).then(function () {
                        return underscore_1.pluck(underscore_1.sortBy(res, 'idx'), 'elem');
                    })];
            });
        });
    };
    TemplateToHtml.prototype.buildResult = function (result, layout, currentlyDisplayedResults) {
        return __awaiter(this, void 0, void 0, function () {
            var resultElement;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        Core_1.Assert.exists(result);
                        Core_1.QueryUtils.setStateObjectOnQueryResult(this.args.queryStateModel.get(), result);
                        Core_1.QueryUtils.setSearchInterfaceObjectOnQueryResult(this.args.searchInterface, result);
                        ResultList_1.ResultList.resultCurrentlyBeingRendered = result;
                        return [4 /*yield*/, this.createHtmlElement(result, layout)];
                    case 1:
                        resultElement = _a.sent();
                        Eif (resultElement != null) {
                            Core_1.Component.bindResultToElement(resultElement, result);
                        }
                        currentlyDisplayedResults.push(result);
                        return [4 /*yield*/, this.autoCreateComponentsInsideResult(resultElement, result).initResult];
                    case 2:
                        _a.sent();
                        this.verifyChildren(resultElement);
                        return [2 /*return*/, resultElement];
                }
            });
        });
    };
    TemplateToHtml.prototype.autoCreateComponentsInsideResult = function (element, result) {
        Core_1.Assert.exists(element);
        return Core_1.Initialization.automaticallyCreateComponentsInsideResult(element, result);
    };
    TemplateToHtml.prototype.createHtmlElement = function (result, layout) {
        return this.args.resultTemplate.instantiateToElement(result, {
            wrapInDiv: true,
            checkCondition: true,
            currentLayout: layout,
            responsiveComponents: this.args.searchInterface.responsiveComponents
        });
    };
    TemplateToHtml.prototype.verifyChildren = function (element) {
        var containsResultLink = !!Dom_1.$$(element).find('.CoveoResultLink');
        if (containsResultLink) {
            return;
        }
        var msg = "Result does not contain a \"CoveoResultLink\" component, please verify the result template";
        new Logger_1.Logger(element).warn(msg, this.args.resultTemplate);
    };
    return TemplateToHtml;
}());
exports.TemplateToHtml = TemplateToHtml;
 
 
/***/ }),
/* 691 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var underscore_1 = __webpack_require__(1);
var CategoryFacetValuesTree = /** @class */ (function () {
    function CategoryFacetValuesTree() {
        this.seenValues = [];
    }
    CategoryFacetValuesTree.prototype.getValueForLastPartInPath = function (path) {
        var nullCategoryFacetValue = { value: '', numberOfResults: 0 };
        var currentNode;
        for (var _i = 0, path_1 = path; _i < path_1.length; _i++) {
            var part = path_1[_i];
            var nodesToSearch = currentNode ? currentNode.children : this.seenValues;
            var node = this.findNodeWithValue(nodesToSearch, part);
            if (!node) {
                return nullCategoryFacetValue;
            }
            currentNode = node;
        }
        return currentNode ? currentNode.result : nullCategoryFacetValue;
    };
    CategoryFacetValuesTree.prototype.storeNewValues = function (categoryFacetResult) {
        var _this = this;
        var currentNodes = this.seenValues;
        for (var _i = 0, _a = categoryFacetResult.parentValues; _i < _a.length; _i++) {
            var parent_1 = _a[_i];
            var node = this.findNodeWithValue(currentNodes, parent_1.value);
            if (!node) {
                var newNode = { result: parent_1, children: [] };
                currentNodes.push(newNode);
            }
            currentNodes = this.findNodeWithValue(currentNodes, parent_1.value).children;
        }
        categoryFacetResult.values
            .filter(function (result) { return !_this.findNodeWithValue(currentNodes, result.value); })
            .forEach(function (result) { return currentNodes.push({ result: result, children: [] }); });
    };
    CategoryFacetValuesTree.prototype.findNodeWithValue = function (nodes, value) {
        return underscore_1.find(nodes, function (node) { return node.result.value === value; });
    };
    return CategoryFacetValuesTree;
}());
exports.CategoryFacetValuesTree = CategoryFacetValuesTree;
 
 
/***/ }),
/* 692 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
/// <reference path="Facet.ts" />
Object.defineProperty(exports, "__esModule", { value: true });
var FacetValueElement_1 = __webpack_require__(186);
var Dom_1 = __webpack_require__(0);
var FacetValue_1 = __webpack_require__(51);
var Utils_1 = __webpack_require__(5);
var FacetUtils_1 = __webpack_require__(49);
var _ = __webpack_require__(1);
var FacetValuesList = /** @class */ (function () {
    function FacetValuesList(facet, facetValueElementKlass) {
        this.facet = facet;
        this.facetValueElementKlass = facetValueElementKlass;
        // Dictionary of values. The key is always in lowercase.
        this.valueList = {};
        this.currentlyDisplayed = [];
    }
    FacetValuesList.prototype.build = function () {
        this.valueContainer = document.createElement('ul');
        Dom_1.$$(this.valueContainer).addClass('coveo-facet-values');
        return this.valueContainer;
    };
    FacetValuesList.prototype.getAllCurrentlyDisplayed = function () {
        return this.currentlyDisplayed;
    };
    FacetValuesList.prototype.getAll = function () {
        return _.toArray(this.valueList);
    };
    FacetValuesList.prototype.getAllFacetValue = function () {
        return _.map(this.getAll(), function (v) {
            return v.facetValue;
        });
    };
    FacetValuesList.prototype.get = function (value) {
        var getter;
        if (value instanceof FacetValue_1.FacetValue) {
            getter = value.value;
        }
        else {
            value = Utils_1.Utils.anyTypeToString(value);
            getter = value;
        }
        this.ensureFacetValueIsInList(value);
        return this.valueList[getter.toLowerCase()];
    };
    FacetValuesList.prototype.select = function (value) {
        var valueElement = this.get(value);
        valueElement.select();
        return valueElement;
    };
    FacetValuesList.prototype.unselect = function (value) {
        var valueElement = this.get(value);
        valueElement.unselect();
        return valueElement;
    };
    FacetValuesList.prototype.exclude = function (value) {
        var valueElement = this.get(value);
        valueElement.exclude();
        return valueElement;
    };
    FacetValuesList.prototype.unExclude = function (value) {
        var valueElement = this.get(value);
        valueElement.unexclude();
        return valueElement;
    };
    FacetValuesList.prototype.toggleSelect = function (value) {
        var valueElement = this.get(value);
        if (valueElement.facetValue.selected) {
            valueElement.unselect();
        }
        else {
            valueElement.select();
        }
        return valueElement;
    };
    FacetValuesList.prototype.toggleExclude = function (value) {
        var valueElement = this.get(value);
        if (valueElement.facetValue.excluded) {
            valueElement.unexclude();
        }
        else {
            valueElement.exclude();
        }
        return valueElement;
    };
    FacetValuesList.prototype.rebuild = function (numberOfValues) {
        var _this = this;
        Dom_1.$$(this.valueContainer).empty();
        this.currentlyDisplayed = [];
        var allValues = this.getValuesToBuildWith();
        var toCompare = numberOfValues;
        var docFragment = document.createDocumentFragment();
        _.each(allValues, function (facetValue, index, list) {
            Iif (_this.facetValueShouldBeRemoved(facetValue)) {
                _this.facet.values.remove(facetValue.value);
                toCompare += 1;
            }
            else if (index < toCompare) {
                var valueElement = new _this.facetValueElementKlass(_this.facet, facetValue, true);
                _this.valueList[facetValue.value.toLowerCase()] = valueElement;
                var valueListElement = valueElement.build().renderer.listItem;
                docFragment.appendChild(valueListElement);
                _this.currentlyDisplayed.push(valueElement);
            }
        });
        this.valueContainer.appendChild(docFragment);
        FacetUtils_1.FacetUtils.addNoStateCssClassToFacetValues(this.facet, this.valueContainer);
    };
    FacetValuesList.prototype.getValuesToBuildWith = function () {
        return this.facet.values.getAll();
    };
    FacetValuesList.prototype.facetValueShouldBeRemoved = function (facetValue) {
        return (facetValue.occurrences == 0 &&
            (facetValue.delta == 0 || facetValue.delta == undefined) &&
            !facetValue.selected &&
            !facetValue.excluded &&
            !this.facet.keepDisplayedValuesNextTime);
    };
    FacetValuesList.prototype.ensureFacetValueIsInList = function (value) {
        var facetValue;
        if (value instanceof FacetValue_1.FacetValue) {
            facetValue = this.facet.values.get(value.value);
            if (facetValue == null) {
                this.facet.values.add(value);
                facetValue = value;
            }
        }
        else {
            facetValue = this.facet.values.get(value);
            if (facetValue == null) {
                facetValue = FacetValue_1.FacetValue.createFromValue(value);
                this.facet.values.add(facetValue);
            }
        }
        var key = facetValue.value.toLowerCase();
        var found = this.valueList[key];
        if (found == undefined) {
            found = this.valueList[key] = new FacetValueElement_1.FacetValueElement(this.facet, facetValue, true);
            found.build();
        }
        else {
            found.facetValue = facetValue;
        }
    };
    return FacetValuesList;
}());
exports.FacetValuesList = FacetValuesList;
 
 
/***/ }),
/* 693 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
/// <reference path="Facet.ts" />
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
var ValueElement_1 = __webpack_require__(329);
var OmniboxValueElement = /** @class */ (function (_super) {
    __extends(OmniboxValueElement, _super);
    function OmniboxValueElement(facet, facetValue, eventArg, onSelect, onExclude) {
        var _this = _super.call(this, facet, facetValue, onSelect, onExclude) || this;
        _this.facet = facet;
        _this.facetValue = facetValue;
        _this.eventArg = eventArg;
        return _this;
    }
    OmniboxValueElement.prototype.bindEvent = function () {
        _super.prototype.bindEvent.call(this, { displayNextTime: false, pinFacet: false, omniboxObject: this.eventArg });
    };
    return OmniboxValueElement;
}(ValueElement_1.ValueElement));
exports.OmniboxValueElement = OmniboxValueElement;
 
 
/***/ }),
/* 694 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
/// <reference path="Facet.ts" />
var underscore_1 = __webpack_require__(1);
var Dom_1 = __webpack_require__(0);
var Utils_1 = __webpack_require__(5);
var FacetUtils_1 = __webpack_require__(49);
var OmniboxValuesList = /** @class */ (function () {
    function OmniboxValuesList(facet, facetValues, omniboxObject, omniboxValueElementKlass) {
        this.facet = facet;
        this.facetValues = facetValues;
        this.omniboxObject = omniboxObject;
        this.omniboxValueElementKlass = omniboxValueElementKlass;
    }
    OmniboxValuesList.prototype.build = function () {
        var _this = this;
        var rows = [];
        underscore_1.each(this.facetValues, function (facetValue) {
            rows.push(_this.buildOmniboxForOneRow(facetValue, _this.omniboxObject));
        });
        return this.buildFinalOmniboxElement(rows);
    };
    OmniboxValuesList.prototype.buildOmniboxForOneRow = function (facetValue, omniboxObject) {
        var _this = this;
        var selectCallback = function (elem, cause) { return _this.logAnalyticsEvent(elem, cause); };
        var excludeCallback = function (elem, cause) { return _this.logAnalyticsEvent(elem, cause); };
        var omniboxValueElement = new this.omniboxValueElementKlass(this.facet, facetValue, omniboxObject, selectCallback, excludeCallback);
        var omniboxRowContent = omniboxValueElement.build().renderer.listItem;
        var regex = omniboxObject.completeQueryExpression.regex;
        var valueToSearch = omniboxObject.completeQueryExpression.word;
        var caption = Dom_1.$$(omniboxRowContent).find('.coveo-facet-value-caption');
        caption.innerHTML = this.highlightOmniboxMatch(this.facet.getValueCaption(facetValue), regex, valueToSearch);
        var omniboxRow = Dom_1.$$('ul', {
            className: 'coveo-omnibox-selectable coveo-facet-value coveo-omnibox-facet-value'
        }).el;
        omniboxRow.appendChild(omniboxRowContent);
        Dom_1.$$(omniboxRow).on('keyboardSelect', function () {
            var input = Dom_1.$$(omniboxRowContent).find('input[type=checkbox]');
            Dom_1.$$(input).trigger('change');
        });
        omniboxRow['no-text-suggestion'] = true;
        return omniboxRow;
    };
    OmniboxValuesList.prototype.buildFinalOmniboxElement = function (rows) {
        var header = this.buildOmniboxHeader();
        Eif (Utils_1.Utils.isEmptyArray(rows)) {
            return undefined;
        }
        else {
            var ret_1 = Dom_1.$$('div', {
                className: 'coveo-omnibox-facet-value'
            }).el;
            ret_1.appendChild(header);
            underscore_1.each(rows, function (r) {
                ret_1.appendChild(r);
            });
            FacetUtils_1.FacetUtils.addNoStateCssClassToFacetValues(this.facet, ret_1);
            return ret_1;
        }
    };
    OmniboxValuesList.prototype.buildOmniboxHeader = function () {
        var title = this.facet.options.title;
        var header = Dom_1.$$('div', {
            className: 'coveo-omnibox-facet-header'
        }).el;
        Dom_1.$$(header).text(title);
        return header;
    };
    OmniboxValuesList.prototype.highlightOmniboxMatch = function (orignalStr, regex, valueToSearch) {
        var firstChar = orignalStr.search(regex);
        var lastChar = firstChar + valueToSearch.length;
        return (orignalStr.slice(0, firstChar) +
            '<span class="coveo-highlight">' +
            orignalStr.slice(firstChar, lastChar) +
            '</span>' +
            orignalStr.slice(lastChar));
    };
    OmniboxValuesList.prototype.logAnalyticsEvent = function (elem, cause) {
        var strippedFacetValues = underscore_1.pluck(this.facetValues, 'value');
        elem.facet.usageAnalytics.logSearchEvent(cause, {
            query: this.omniboxObject.completeQueryExpression.word,
            facetId: elem.facet.options.id,
            facetField: elem.facet.options.field.toString(),
            facetTitle: elem.facet.options.title,
            facetValue: elem.facetValue.value,
            suggestions: strippedFacetValues.join(';'),
            suggestionRanking: underscore_1.indexOf(strippedFacetValues, elem.facetValue.value)
        });
    };
    return OmniboxValuesList;
}());
exports.OmniboxValuesList = OmniboxValuesList;
 
 
/***/ }),
/* 695 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
/// <reference path="../ui/FacetSlider/FacetSlider.ts" />
var __assign = (this && this.__assign) || Object.assign || function(t) {
    for (var s, i = 1, n = arguments.length; i < n; i++) {
        s = arguments[i];
        for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
            t[p] = s[p];
    }
    return t;
};
Object.defineProperty(exports, "__esModule", { value: true });
var underscore_1 = __webpack_require__(1);
var QueryEvents_1 = __webpack_require__(14);
var Logger_1 = __webpack_require__(18);
var ExpressionBuilder_1 = __webpack_require__(87);
var QueryBuilder_1 = __webpack_require__(24);
var DateUtils_1 = __webpack_require__(43);
var QueryUtils_1 = __webpack_require__(37);
var Utils_1 = __webpack_require__(5);
var FacetSliderQueryController = /** @class */ (function () {
    function FacetSliderQueryController(facet) {
        var _this = this;
        this.facet = facet;
        this.facet.bind.onRootElement(QueryEvents_1.QueryEvents.querySuccess, function (args) { return _this.handleQuerySuccess(args); });
    }
    FacetSliderQueryController.prototype.prepareForNewQuery = function () {
        this.lastGroupByRequestIndex = undefined;
    };
    FacetSliderQueryController.prototype.putGroupByIntoQueryBuilder = function (queryBuilder) {
        if (this.facet.options.graph) {
            this.putGroupByForGraphIntoQueryBuilder(queryBuilder);
        }
        this.putGroupByForSliderIntoQueryBuilder(queryBuilder);
    };
    FacetSliderQueryController.prototype.createBasicGroupByRequest = function () {
        var groupByQuery = {
            field: this.facet.options.field,
            completeFacetWithStandardValues: true,
            allowedValues: undefined
        };
        return groupByQuery;
    };
    FacetSliderQueryController.prototype.computeOurFilterExpression = function (boundary) {
        if (boundary === void 0) { boundary = [this.facet.startOfSlider, this.facet.endOfSlider]; }
        var builder = new ExpressionBuilder_1.ExpressionBuilder();
        if (boundary[0] != undefined && boundary[1] != undefined) {
            if (this.facet.options.excludeOuterBounds) {
                this.addFilterExpressionWithOuterBoundsExcluded(boundary[0], boundary[1], builder);
            }
            else {
                this.addFilterExpressionWithOuterBoundsIncluded(boundary[0], boundary[1], builder);
            }
        }
        return builder.build();
    };
    FacetSliderQueryController.prototype.handleQuerySuccess = function (args) {
        var _this = this;
        if (!this.isAValidRangeResponse(args)) {
            var logger = new Logger_1.Logger(this);
            logger.error("Cannot instantiate FacetSlider for this field : " + this.facet.options.field + ". It needs to be configured as a numerical field in the index");
            logger.error("Disabling the FacetSlider", this.facet);
            this.facet.disable();
            return;
        }
        if (this.facet.options && this.facet.options.graph && this.rangeValuesForGraphToUse == undefined) {
            this.rangeValuesForGraphToUse = [];
            var groupByResult = args.results.groupByResults[this.graphGroupByQueriesIndex];
            var rawValues = groupByResult ? groupByResult.values : [];
            underscore_1.each(rawValues, function (rawValue) {
                var rawSplit = rawValue.value.split('..');
                _this.rangeValuesForGraphToUse.push({
                    start: _this.facet.options.dateField ? _this.getISOFormat(rawSplit[0].replace('@', ' ')) : parseInt(rawSplit[0], 10),
                    end: _this.facet.options.dateField ? _this.getISOFormat(rawSplit[1].replace('@', ' ')) : parseInt(rawSplit[1], 10)
                });
            });
        }
    };
    FacetSliderQueryController.prototype.isAValidRangeResponse = function (args) {
        if (this.lastGroupByRequestIndex != undefined && args.results.groupByResults[this.lastGroupByRequestIndex]) {
            var firstValue = args.results.groupByResults[this.lastGroupByRequestIndex].values[0];
            if (firstValue && !QueryUtils_1.QueryUtils.isRangeString(firstValue.value)) {
                return false;
            }
        }
        return true;
    };
    FacetSliderQueryController.prototype.addFilterExpressionWithOuterBoundsIncluded = function (start, end, builder) {
        if (start != this.facet.options.start || end != this.facet.options.end) {
            if (this.facet.options.dateField) {
                start = this.getFilterDateFormat(start);
                end = this.getFilterDateFormat(end);
            }
            builder.addFieldExpression(this.facet.options.field, '==', [start + '..' + end]);
        }
    };
    FacetSliderQueryController.prototype.addFilterExpressionWithOuterBoundsExcluded = function (start, end, builder) {
        var startCompare = this.facet.options.start;
        var endCompare = this.facet.options.end;
        var startCompared = start;
        var endCompared = end;
        if (this.facet.options.dateField) {
            startCompared = this.getFilterDateFormat(start);
            endCompared = this.getFilterDateFormat(end);
            startCompare = this.getFilterDateFormat(startCompare);
            endCompare = this.getFilterDateFormat(endCompare);
        }
        else {
            startCompared += '';
            endCompared += '';
            startCompare += '';
            endCompare += '';
        }
        if (startCompared != startCompare && endCompared == endCompare) {
            builder.addFieldExpression(this.facet.options.field, '>=', [startCompared]);
        }
        else if (startCompared == startCompare && endCompared != endCompare) {
            builder.addFieldExpression(this.facet.options.field, '<=', [endCompared]);
        }
        else {
            this.addFilterExpressionWithOuterBoundsIncluded(start, end, builder);
        }
    };
    FacetSliderQueryController.prototype.putGroupByForGraphIntoQueryBuilder = function (queryBuilder) {
        this.graphGroupByQueriesIndex = queryBuilder.groupByRequests.length;
        var basicGroupByRequestForGraph = this.createBasicGroupByRequest();
        if (this.facet.isSimpleSliderConfig) {
            basicGroupByRequestForGraph.rangeValues = this.createRangeValuesForGraphUsingStartAndEnd();
            basicGroupByRequestForGraph.generateAutomaticRanges = false;
        }
        else {
            basicGroupByRequestForGraph.generateAutomaticRanges = true;
        }
        this.addExpressionToExcludeInvalidDates(basicGroupByRequestForGraph);
        var filter = this.computeOurFilterExpression(this.facet.getSliderBoundaryForQuery());
        this.processQueryOverride(filter, basicGroupByRequestForGraph, queryBuilder);
        basicGroupByRequestForGraph.sortCriteria = 'nosort';
        basicGroupByRequestForGraph.maximumNumberOfValues = this.facet.options.graph.steps;
        queryBuilder.groupByRequests.push(basicGroupByRequestForGraph);
    };
    FacetSliderQueryController.prototype.putGroupByForSliderIntoQueryBuilder = function (queryBuilder) {
        this.lastGroupByRequestIndex = queryBuilder.groupByRequests.length;
        var basicGroupByRequestForSlider = this.putGroupByBasicSliderIntoQueryBuilder(queryBuilder);
        this.putGroupByForFullRangeSliderIntoQueryBuilder(queryBuilder, basicGroupByRequestForSlider);
    };
    FacetSliderQueryController.prototype.processQueryOverride = function (filter, groupByRequest, queryBuilder) {
        var expression;
        if (filter != undefined) {
            expression = queryBuilder.computeCompleteExpressionPartsExcept(filter);
        }
        else {
            expression = queryBuilder.computeCompleteExpressionParts();
        }
        var queryOverrideFromOptions = this.facet.options.queryOverride || '@uri';
        groupByRequest.queryOverride = this.appendOrSetGroupByOverrideParam(groupByRequest.queryOverride, expression.basic);
        groupByRequest.advancedQueryOverride = this.appendOrSetGroupByOverrideParam(groupByRequest.advancedQueryOverride, expression.advanced);
        groupByRequest.constantQueryOverride = this.appendOrSetGroupByOverrideParam(groupByRequest.constantQueryOverride, expression.constant);
        groupByRequest.advancedQueryOverride = this.appendOrSetGroupByOverrideParam(groupByRequest.advancedQueryOverride, queryOverrideFromOptions);
    };
    FacetSliderQueryController.prototype.createRangeValuesForGraphUsingStartAndEnd = function () {
        var _a = this.getFormattedStartAndEnd(), start = _a.start, end = _a.end;
        var oneRange = {
            start: start,
            end: end,
            endInclusive: true,
            label: 'Slider'
        };
        Iif (this.facet.options.graph.steps == undefined) {
            this.facet.options.graph.steps = 10;
        }
        Iif (this.facet.options.dateField && isNaN(this.facet.options.start)) {
            this.facet.options.start = new Date(this.facet.options.start).getTime();
        }
        Iif (this.facet.options.dateField && isNaN(this.facet.options.end)) {
            this.facet.options.end = new Date(this.facet.options.end).getTime();
        }
        Iif (this.rangeValuesForGraphToUse != undefined) {
            return this.usePrebuiltRange(oneRange);
        }
        else {
            return this.buildRange(oneRange);
        }
    };
    FacetSliderQueryController.prototype.usePrebuiltRange = function (basicRangeRequest) {
        return underscore_1.map(this.rangeValuesForGraphToUse, function (value) {
            return {
                start: value.start,
                end: value.end,
                endInclusive: basicRangeRequest.endInclusive,
                label: basicRangeRequest.label
            };
        });
    };
    FacetSliderQueryController.prototype.buildRange = function (basicRangeRequest) {
        var _this = this;
        var start = this.facet.options.start;
        var oneStep = (this.facet.options.end - this.facet.options.start) / this.facet.options.graph.steps;
        return underscore_1.map(underscore_1.range(0, this.facet.options.graph.steps, 1), function (step) {
            var newStart = start + step * oneStep;
            var newEnd = start + (step + 1) * oneStep;
            if (_this.facet.options.dateField) {
                newStart = _this.getISOFormat(newStart);
                newEnd = _this.getISOFormat(newEnd);
            }
            return {
                endInclusive: basicRangeRequest.endInclusive,
                label: basicRangeRequest.label,
                start: newStart,
                end: newEnd
            };
        });
    };
    FacetSliderQueryController.prototype.getFormattedStartAndEnd = function () {
        var start = this.facet.options.start;
        var end = this.facet.options.end;
        if (this.facet.options.dateField) {
            start = this.getISOFormat(start);
            end = this.getISOFormat(end);
        }
        return {
            start: start,
            end: end
        };
    };
    FacetSliderQueryController.prototype.getISOFormat = function (value) {
        Eif (value) {
            Eif (!isNaN(value)) {
                value = Number(value);
            }
            var date = new Date(value);
            Iif (!DateUtils_1.DateUtils.isValid(date)) {
                date = new Date(this.getBrowserCompatibleFormat(value));
                if (!DateUtils_1.DateUtils.isValid(date)) {
                    // If we get here, we'll probably get an error further down the line when querying the index anyway ...
                    this.facet.logger.error('Cannot parse this date format.', value, new Date(value));
                    return undefined;
                }
            }
            return date.toISOString();
        }
        else {
            return undefined;
        }
    };
    FacetSliderQueryController.prototype.getFilterDateFormat = function (rawValue) {
        if (rawValue) {
            return this.getISOFormat(rawValue).replace('T', '@').replace('.000Z', '').replace(/-/g, '/');
        }
        else {
            return undefined;
        }
    };
    FacetSliderQueryController.prototype.getBrowserCompatibleFormat = function (value) {
        return value.replace('@', 'T').replace(/\//g, '-');
    };
    FacetSliderQueryController.prototype.putGroupByForFullRangeSliderIntoQueryBuilder = function (queryBuilder, basicGroupByRequest) {
        // We need a group by request for the "full range" that does not take into account the current query (query override)
        // The goal is to obtain a query wich return the whole range of results without taking into account what the users typed in the search box,
        // so that the X range of the slider is static between each queries.
        this.lastGroupByRequestForFullRangeIndex = queryBuilder.groupByRequests.length;
        var groupByRequestForFullRange = underscore_1.clone(basicGroupByRequest);
        // This removes the "basic" query override. ie: user input
        delete groupByRequestForFullRange.queryOverride;
        // This removes any current filter in the facet caused by a selection
        delete groupByRequestForFullRange.advancedQueryOverride;
        // We keep the "constantQueryOverride", since it normally contains static filter always applied no matter what.
        if (this.facet.options.queryOverride) {
            groupByRequestForFullRange.advancedQueryOverride = this.facet.options.queryOverride;
        }
        this.addExpressionToExcludeInvalidDates(groupByRequestForFullRange);
        // If, after the above treatment, * all * parts of the group by request override are still empty,
        // we need to add at least one override for it to be able to actually "disregard" the current filters of the interface, and retrieve the full range from the index.
        // If all query override parts stays empty, we end up with a useless query that is affected by any other filters in the interface
        if (groupByRequestForFullRange.queryOverride === undefined &&
            groupByRequestForFullRange.advancedQueryOverride === undefined &&
            groupByRequestForFullRange.constantQueryOverride === undefined) {
            groupByRequestForFullRange.advancedQueryOverride = '@uri';
        }
        queryBuilder.groupByRequests.push(groupByRequestForFullRange);
    };
    FacetSliderQueryController.prototype.putGroupByBasicSliderIntoQueryBuilder = function (queryBuilder) {
        var maximumNumberOfValues = 1;
        if (this.facet.hasAGraph()) {
            maximumNumberOfValues = this.facet.options.graph.steps;
        }
        var rangeValues;
        if (this.facet.isSimpleSliderConfig) {
            rangeValues = [
                __assign({}, this.getFormattedStartAndEnd(), { label: 'slider', endInclusive: false })
            ];
        }
        // A basic group by request that takes into account the current query
        // This one will determine if the facet is empty for the current query
        var basicGroupByRequestForSlider = this.createBasicGroupByRequest();
        basicGroupByRequestForSlider.maximumNumberOfValues = maximumNumberOfValues;
        basicGroupByRequestForSlider.sortCriteria = 'nosort';
        basicGroupByRequestForSlider.generateAutomaticRanges = !this.facet.isSimpleSliderConfig;
        basicGroupByRequestForSlider.rangeValues = rangeValues;
        var filter = this.computeOurFilterExpression(this.facet.getSliderBoundaryForQuery());
        this.processQueryOverride(filter, basicGroupByRequestForSlider, queryBuilder);
        this.addExpressionToExcludeInvalidDates(basicGroupByRequestForSlider);
        queryBuilder.groupByRequests.push(basicGroupByRequestForSlider);
        return basicGroupByRequestForSlider;
    };
    FacetSliderQueryController.prototype.addExpressionToExcludeInvalidDates = function (groupByRequest) {
        if (this.facet.options.dateField) {
            // When a connector sets an invalid or un-existing date,
            // the Coveo index will automatically set its value to 1400/01/01 (the "minimum" value in the Boost C++ library).
            // Here, we try to always force those values out,
            // by putting a filter on dates above Unix epoch, otherwise all kinds of weird stuff will happen for the end users
            // For example :
            // - We'll get extremely huge range of dates, all with no values
            //   (because it turns out not many document were actually produced in the medieval ages).
            // - Graphs might get all out of bound, with very tiny slices.
            // - Moment js will incorrectly evaluate the date.
            // - You cannot actually query for those invalid document using date queries anyway,
            //   meaning playing with the slider will always return "no results" if you try and filter on those invalid documents.
            // Instead of taking the approach of garbage in/garbage out, this tries to do something a bit more sane for end users ...
            var builderToRemoveInvalidRange = new QueryBuilder_1.QueryBuilder();
            builderToRemoveInvalidRange.expression.addFieldExpression(this.facet.options.field, '>', [
                this.getFilterDateFormat(new Date(0))
            ]);
            if (groupByRequest.constantQueryOverride) {
                groupByRequest.constantQueryOverride += " " + builderToRemoveInvalidRange.expression.build();
            }
            else {
                groupByRequest.constantQueryOverride = builderToRemoveInvalidRange.expression.build();
            }
        }
    };
    FacetSliderQueryController.prototype.appendOrSetGroupByOverrideParam = function (param, value) {
        if (Utils_1.Utils.isNullOrUndefined(value)) {
            return param;
        }
        Eif (Utils_1.Utils.isNullOrUndefined(param)) {
            return value || '';
        }
        else {
            return param + ' ' + (value || '');
        }
    };
    return FacetSliderQueryController;
}());
exports.FacetSliderQueryController = FacetSliderQueryController;
 
 
/***/ }),
/* 696 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var d3_1 = __webpack_require__(1126);
var d3_scale_1 = __webpack_require__(759);
var Globalize = __webpack_require__(28);
var underscore_1 = __webpack_require__(1);
var SliderEvents_1 = __webpack_require__(298);
var Logger_1 = __webpack_require__(18);
var DeviceUtils_1 = __webpack_require__(42);
var Dom_1 = __webpack_require__(0);
var Utils_1 = __webpack_require__(5);
exports.MAX_NUMBER_OF_STEPS = 100;
var Slider = /** @class */ (function () {
    function Slider(element, options, root) {
        var _this = this;
        this.element = element;
        this.options = options;
        this.root = root;
        this.steps = [];
        if (this.options.dateField) {
            this.options.start = new Date(this.options.start).getTime();
            this.options.end = new Date(this.options.end).getTime();
        }
        Eif (this.options.rounded == undefined) {
            this.options.rounded = 0;
        }
        if (this.options.steps || this.options.getSteps) {
            this.buildSteps();
        }
        if (this.options.graph) {
            this.sliderGraph = new SliderGraph(this);
        }
        this.sliderLine = new SliderLine(this);
        underscore_1.each(this.sliderLine.build(), function (e) {
            _this.element.appendChild(e);
        });
        if (this.options.rangeSlider) {
            this.sliderRange = new SliderRange(this);
            underscore_1.each(this.sliderRange.build(), function (e) {
                _this.element.appendChild(e);
            });
        }
        else {
            this.sliderButton = new SliderButton(this, 1);
            var btnEl = this.sliderButton.build();
            Dom_1.$$(btnEl).addClass('coveo-no-range-button');
            this.element.appendChild(btnEl);
            this.sliderLine.setActiveWidth(this.sliderButton);
        }
        this.sliderCaption = new SliderCaption(this);
        this.element.appendChild(this.sliderCaption.build());
    }
    Slider.prototype.onMoving = function () {
        if (this.options.rangeSlider) {
            this.sliderRange.setBoundary();
            this.sliderLine.setActiveWidth(this.sliderRange.firstButton, this.sliderRange.secondButton);
        }
        else {
            this.setButtonBoundary();
            this.sliderLine.setActiveWidth(this.sliderButton);
        }
        if (this.options.graph) {
            this.sliderGraph.draw();
        }
        this.displayCaption();
    };
    Slider.prototype.initializeState = function (values) {
        if (values === void 0) { values = [this.options.start, this.options.end]; }
        this.currentValues = values;
        if (this.options.rangeSlider) {
            this.sliderRange.initializeSliderRangeState(values);
            this.sliderLine.setActiveWidth(this.sliderRange.firstButton, this.sliderRange.secondButton);
        }
        else {
            Iif (values == undefined) {
                this.sliderButton.toEnd();
            }
            else {
                this.sliderButton.setValue(values[1]);
            }
            this.setButtonBoundary();
            this.sliderLine.setActiveWidth(this.sliderButton);
        }
        this.displayCaption();
    };
    Slider.prototype.getPosition = function () {
        Eif (this.options.rangeSlider) {
            return this.sliderRange.getPosition();
        }
        else {
            return [0, this.sliderButton.getPosition()];
        }
    };
    Slider.prototype.getPercentPosition = function () {
        Eif (this.options.rangeSlider) {
            return this.sliderRange.getPercentPosition();
        }
        else {
            return [0, this.sliderButton.getPercent()];
        }
    };
    Slider.prototype.getValues = function () {
        if (this.currentValues != undefined) {
            return this.currentValues;
        }
        else {
            if (this.options.rangeSlider) {
                return this.sliderRange.getValue();
            }
            else {
                return [this.options.start, this.sliderButton.getValue()];
            }
        }
    };
    Slider.prototype.getCaptionFromValue = function (values) {
        return this.sliderCaption.getCaptionFromValues(values);
    };
    Slider.prototype.getCaption = function () {
        return this.sliderCaption.getCaption();
    };
    Slider.prototype.setValues = function (values) {
        Eif (values != undefined) {
            values[0] = Math.max(values[0], this.options.start);
            values[1] = Math.min(values[1], this.options.end);
        }
        this.currentValues = values;
        if (this.options.rangeSlider) {
            this.sliderRange.setValue(values);
            this.sliderLine.setActiveWidth(this.sliderRange.firstButton, this.sliderRange.secondButton);
        }
        else {
            this.sliderButton.setValue(values[1]);
            this.sliderLine.setActiveWidth(this.sliderButton);
        }
        this.displayCaption();
    };
    Slider.prototype.drawGraph = function (data) {
        Eif (this.sliderGraph) {
            this.sliderGraph.draw(data);
        }
    };
    Slider.prototype.setButtonBoundary = function () {
        this.sliderButton.leftBoundary = 0;
        this.sliderButton.rightBoundary = this.element.clientWidth;
    };
    Slider.prototype.displayCaption = function () {
        if (this.options.valueCaption != undefined) {
            this.sliderCaption.setFromString(this.options.valueCaption(this.getValues()));
        }
        else Iif (this.options.percentCaption != undefined) {
            this.sliderCaption.setFromString(this.options.percentCaption(this.getPercentPosition()));
        }
        else Iif (this.options.displayAsPercent != undefined &&
            this.options.displayAsPercent.separator != undefined &&
            this.options.displayAsPercent.enable) {
            this.sliderCaption.setAsPercent();
        }
        else {
            this.sliderCaption.setAsValue();
        }
    };
    Slider.prototype.buildSteps = function () {
        if (this.options.getSteps) {
            this.steps = this.options.getSteps(this.options.start, this.options.end);
        }
        else {
            if (this.options.steps > exports.MAX_NUMBER_OF_STEPS) {
                new Logger_1.Logger(this).warn("Maximum number of steps for slider is " + exports.MAX_NUMBER_OF_STEPS + " for performance reason");
                this.options.steps = exports.MAX_NUMBER_OF_STEPS;
            }
            var oneStep = (this.options.end - this.options.start) / Math.max(1, this.options.steps);
            Eif (oneStep > 0) {
                var currentStep = this.options.start;
                var currentNumberOfSteps = 0;
                while (currentStep <= this.options.end && currentNumberOfSteps <= exports.MAX_NUMBER_OF_STEPS) {
                    this.steps.push(currentStep);
                    currentStep += oneStep;
                    currentNumberOfSteps++;
                }
            }
            else {
                this.steps.push(this.options.start);
                this.steps.push(this.options.end);
            }
        }
    };
    return Slider;
}());
exports.Slider = Slider;
var SliderLine = /** @class */ (function () {
    function SliderLine(slider) {
        this.slider = slider;
    }
    SliderLine.prototype.build = function () {
        this.backGround = Dom_1.$$('div', {
            className: 'coveo-slider-line coveo-background'
        }).el;
        this.activePart = Dom_1.$$('div', {
            className: 'coveo-slider-line coveo-active'
        }).el;
        return [this.backGround, this.activePart];
    };
    SliderLine.prototype.setActiveWidth = function (buttonOne, buttonTwo) {
        if (this.slider.options.rangeSlider) {
            var width = (buttonTwo.getPercent() - buttonOne.getPercent()) * 100;
            this.activePart.style.width = width + '%';
            this.activePart.style.left = buttonOne.getPercent() * 100 + '%';
            this.activePart.style.right = buttonTwo.getPercent() * 100 + '%';
        }
        else {
            var width = buttonOne.getPercent() * 100;
            this.activePart.style.width = width + '%';
        }
    };
    return SliderLine;
}());
// This component relies heavily on mouse interaction, really difficult to test inside a UT context.
// Ignore it
/* istanbul ignore next */
var SliderButton = /** @class */ (function () {
    function SliderButton(slider, which) {
        this.slider = slider;
        this.which = which;
        this.eventMouseDown = DeviceUtils_1.DeviceUtils.isMobileDevice() ? 'touchstart' : 'mousedown';
        this.eventMouseMove = DeviceUtils_1.DeviceUtils.isMobileDevice() ? 'touchmove' : 'mousemove';
        this.eventMouseUp = DeviceUtils_1.DeviceUtils.isMobileDevice() ? 'touchend' : 'mouseup';
    }
    SliderButton.prototype.build = function () {
        this.element = Dom_1.$$('div', {
            className: 'coveo-slider-button'
        }).el;
        this.bindEvents();
        this.element['CoveoSliderButton'] = this;
        return this.element;
    };
    SliderButton.prototype.toBeginning = function () {
        this.element.style.left = '0%';
    };
    SliderButton.prototype.toEnd = function () {
        this.element.style.left = '100%';
    };
    SliderButton.prototype.setValue = function (value) {
        var percent = this.fromValueToPercent(value);
        this.element.style.left = Math.round(percent * 100) + '%';
    };
    SliderButton.prototype.getPosition = function () {
        var left = this.element.style.left;
        if (left.indexOf('%') != -1) {
            return (parseFloat(left) / 100) * this.slider.element.clientWidth;
        }
        else {
            return parseFloat(left);
        }
    };
    SliderButton.prototype.getPercent = function (position) {
        Eif (position === void 0) { position = this.getPosition(); }
        Eif (this.slider.element.clientWidth == 0) {
            return 0;
        }
        return +(position / this.slider.element.clientWidth).toFixed(2);
    };
    SliderButton.prototype.getValue = function () {
        var value = this.getPercent() * (this.slider.options.end - this.slider.options.start) + this.slider.options.start;
        return value;
    };
    SliderButton.prototype.fromValueToPercent = function (value) {
        return 1 - (this.slider.options.end - value) / (this.slider.options.end - this.slider.options.start);
    };
    SliderButton.prototype.fromPositionToValue = function (position) {
        var percent = this.getPercent(position);
        return this.slider.options.start + percent * (this.slider.options.end - this.slider.options.start);
    };
    SliderButton.prototype.fromValueToPosition = function (value) {
        var percent = this.fromValueToPercent(value);
        return this.slider.element.clientWidth * percent;
    };
    SliderButton.prototype.bindEvents = function () {
        var _this = this;
        Dom_1.$$(this.element).on(this.eventMouseDown, function (e) {
            _this.handleStartSlide(e);
        });
        var doc = this.slider.options.document || document;
        doc.addEventListener(this.eventMouseMove, function (e) {
            if (_this.eventMouseMove == 'touchmove' && _this.isMouseDown) {
                e.preventDefault();
            }
            _this.handleMoving(e);
        });
        doc.addEventListener(this.eventMouseUp, function () {
            _this.handleEndSlide();
        });
    };
    SliderButton.prototype.getUserSelect = function () {
        if (document.body.style.msUserSelect !== undefined) {
            return 'msUserSelect';
        }
        if (document.body.style.webkitUserSelect !== undefined) {
            return 'webkitUserSelect';
        }
        if (document.body.style['MozUserSelect'] !== undefined) {
            return 'MozUserSelect';
        }
        return 'userSelect';
    };
    SliderButton.prototype.handleStartSlide = function (e) {
        var position = this.getMousePosition(e);
        this.isMouseDown = true;
        this.startPositionX = position.x;
        this.lastElementLeft = (parseInt(this.element.style.left, 10) / 100) * this.slider.element.clientWidth;
        this.origUserSelect = document.body.style[this.getUserSelect()];
        this.origCursor = document.body.style.cursor;
        document.body.style[this.getUserSelect()] = 'none';
        document.body.style.cursor = 'pointer';
        Dom_1.$$(this.element).addClass('coveo-active');
        Dom_1.$$(this.element).trigger(SliderEvents_1.SliderEvents.startSlide, {
            button: this,
            slider: this.slider
        });
        e.stopPropagation();
    };
    SliderButton.prototype.handleMoving = function (e) {
        if (this.isMouseDown) {
            this.slider.onMoving();
            this.updatePosition(e);
            this.handleButtonNearEnd();
            Dom_1.$$(this.element).trigger(SliderEvents_1.SliderEvents.duringSlide, {
                button: this,
                slider: this.slider
            });
        }
    };
    SliderButton.prototype.handleEndSlide = function () {
        if (this.isMouseDown) {
            document.body.style[this.getUserSelect()] = this.origUserSelect;
            document.body.style.cursor = this.origCursor;
            Dom_1.$$(this.element).removeClass('coveo-active');
            Dom_1.$$(this.element).trigger(SliderEvents_1.SliderEvents.endSlide, {
                button: this,
                slider: this.slider
            });
        }
        this.isMouseDown = false;
    };
    SliderButton.prototype.handleButtonNearEnd = function () {
        if (this.which == 0) {
            if (this.origZIndex == undefined) {
                this.origZIndex = this.element.style.zIndex || '1';
            }
            if (this.currentPos > 90) {
                this.element.style.zIndex = this.origZIndex + 1;
            }
            else {
                this.element.style.zIndex = this.origZIndex;
            }
        }
    };
    SliderButton.prototype.getMousePosition = function (e) {
        var posx = 0;
        var posy = 0;
        if (e['touches'] && e['touches'][0]) {
            posx = e['touches'][0].pageX;
            posy = e['touches'][0].pageY;
        }
        else if (e.pageX && e.pageY) {
            posx = e.pageX;
            posy = e.pageY;
        }
        else if (e.clientX && e.clientY) {
            posx = e.clientX + document.body.scrollLeft + document.documentElement.scrollLeft;
            posy = e.clientY + document.body.scrollTop + document.documentElement.scrollTop;
        }
        return { x: posx, y: posy };
    };
    SliderButton.prototype.updatePosition = function (e) {
        var pos = this.getMousePosition(e);
        var spanX = pos.x - this.startPositionX;
        var currentValue;
        this.currentPos = this.lastElementLeft + spanX;
        if (this.slider.options.steps || this.slider.options.getSteps) {
            var snapResult = this.snapToStep(spanX);
            this.currentPos = snapResult.position;
            currentValue = snapResult.value;
        }
        this.currentPos = Math.max(this.leftBoundary, this.currentPos);
        this.currentPos = Math.min(this.rightBoundary, this.currentPos);
        this.currentPos = this.getPercent(this.currentPos) * 100;
        this.currentPos = Math.min(this.currentPos, 100);
        this.currentPos = Math.max(this.currentPos, 0);
        this.element.style.left = Math.round(this.currentPos) + '%';
        if (this.slider.options.steps || this.slider.options.getSteps) {
            this.slider.currentValues[this.which] = currentValue;
        }
        else {
            this.slider.currentValues[this.which] = this.getValue();
        }
    };
    SliderButton.prototype.snapToStep = function (spanX) {
        var _this = this;
        var diffs = underscore_1.map(this.slider.steps, function (step, i) {
            return Math.abs(_this.currentPos - _this.fromValueToPosition(_this.slider.steps[i]));
        });
        var diffsNext = underscore_1.map(this.slider.steps, function (step, i) {
            return Math.abs(_this.rightBoundary - _this.fromValueToPosition(_this.slider.steps[i]));
        });
        var diffsPrev = underscore_1.map(this.slider.steps, function (step, i) {
            return Math.abs(_this.leftBoundary - _this.fromValueToPosition(_this.slider.steps[i]));
        });
        var nearest = underscore_1.min(diffs);
        var nearestNext = underscore_1.min(diffsNext);
        var nearestPrevious = underscore_1.min(diffsPrev);
        var currentStep = this.slider.steps[underscore_1.indexOf(diffs, nearest)];
        var nextStep = this.slider.steps[underscore_1.indexOf(diffsNext, nearestNext)];
        var previousStep = this.slider.steps[underscore_1.indexOf(diffsPrev, nearestPrevious)];
        currentStep = Math.min(currentStep, nextStep);
        currentStep = Math.max(currentStep, previousStep);
        return { position: this.fromValueToPosition(currentStep), value: currentStep };
    };
    return SliderButton;
}());
exports.SliderButton = SliderButton;
var SliderRange = /** @class */ (function () {
    function SliderRange(slider) {
        this.slider = slider;
        this.firstButton = new SliderButton(slider, 0);
        this.secondButton = new SliderButton(slider, 1);
    }
    SliderRange.prototype.build = function () {
        var firstElem = this.firstButton.build();
        var secondElem = this.secondButton.build();
        Dom_1.$$(secondElem).addClass('coveo-range-button');
        return [firstElem, secondElem];
    };
    SliderRange.prototype.initializeSliderRangeState = function (values) {
        Iif (values == undefined) {
            this.firstButton.toBeginning();
            this.secondButton.toEnd();
        }
        else {
            this.firstButton.setValue(values[0]);
            this.secondButton.setValue(values[1]);
        }
        this.setBoundary();
    };
    SliderRange.prototype.setValue = function (values) {
        this.firstButton.setValue(values[0]);
        this.secondButton.setValue(values[1]);
    };
    SliderRange.prototype.setBoundary = function () {
        this.firstButton.leftBoundary = 0;
        this.firstButton.rightBoundary = this.secondButton.getPosition();
        this.secondButton.leftBoundary = this.firstButton.getPosition();
        this.secondButton.rightBoundary = this.slider.element.clientWidth;
    };
    SliderRange.prototype.getPosition = function () {
        return [this.firstButton.getPosition(), this.secondButton.getPosition()];
    };
    SliderRange.prototype.getPercentPosition = function () {
        return [this.firstButton.getPercent(), this.secondButton.getPercent()];
    };
    SliderRange.prototype.getValue = function () {
        return [this.firstButton.getValue(), this.secondButton.getValue()];
    };
    return SliderRange;
}());
var SliderCaption = /** @class */ (function () {
    function SliderCaption(slider) {
        this.slider = slider;
        this.separator = '-';
        this.unitSign = '';
        Iif (this.slider.options.displayAsPercent && this.slider.options.displayAsPercent.enable) {
            this.separator =
                this.slider.options.displayAsPercent.separator != undefined ? this.slider.options.displayAsPercent.separator : this.separator;
        }
        else if (this.slider.options.displayAsValue && this.slider.options.displayAsValue.enable) {
            this.separator =
                this.slider.options.displayAsValue.separator != undefined ? this.slider.options.displayAsValue.separator : this.separator;
            this.unitSign =
                this.slider.options.displayAsValue.unitSign != undefined ? this.slider.options.displayAsValue.unitSign : this.unitSign;
        }
    }
    SliderCaption.prototype.build = function () {
        this.caption = Dom_1.$$('div', {
            className: 'coveo-slider-caption'
        }).el;
        return this.caption;
    };
    SliderCaption.prototype.getCaption = function () {
        return Dom_1.$$(this.caption).text();
    };
    SliderCaption.prototype.getCaptionFromValues = function (values) {
        return this.getValueCaption(values);
    };
    SliderCaption.prototype.getCaptionFromValuesAsPercent = function (values) {
        return this.getValueCaption(values);
    };
    SliderCaption.prototype.setAsValue = function () {
        Dom_1.$$(this.caption).text(this.getValueCaption());
    };
    SliderCaption.prototype.setAsPercent = function () {
        var values = this.slider.getPercentPosition();
        Dom_1.$$(this.caption).text([
            (values[0] * 100).toFixed(this.slider.options.rounded),
            '%',
            this.separator,
            (values[1] * 100).toFixed(this.slider.options.rounded),
            '%'
        ].join(' '));
    };
    SliderCaption.prototype.setFromString = function (str) {
        Dom_1.$$(this.caption).text(str);
    };
    SliderCaption.prototype.getValueCaption = function (values) {
        if (values === void 0) { values = this.slider.getValues(); }
        var first = values[0];
        var second = values[1];
        if (this.slider.options.dateField) {
            var firstAsDate = new Date(first);
            var secondAsDate = new Date(second);
            firstAsDate.setHours(0, 0, 0, 0);
            secondAsDate.setHours(0, 0, 0, 0);
            first = Globalize.format(firstAsDate, this.slider.options.dateFormat || 'MMM dd, yyyy');
            second = Globalize.format(secondAsDate, this.slider.options.dateFormat || 'MMM dd, yyyy');
            this.unitSign = '';
        }
        else {
            first = first.toFixed(this.slider.options.rounded);
            second = second.toFixed(this.slider.options.rounded);
        }
        return [first, this.unitSign, this.separator, second, this.unitSign].join(' ');
    };
    return SliderCaption;
}());
var SliderGraph = /** @class */ (function () {
    function SliderGraph(slider) {
        this.slider = slider;
        this.svg = d3_1.select(slider.element).append('svg').append('g');
        this.x = d3_scale_1.scaleBand();
        this.y = d3_scale_1.scaleLinear();
        this.slider.options.graph.margin = Utils_1.Utils.extendDeep({
            top: 20,
            right: 0,
            left: 0,
            bottom: 20
        }, this.slider.options.graph.margin || {});
        this.slider.options.graph.animationDuration = this.slider.options.graph.animationDuration || 500;
        this.slider.options.graph.steps = this.slider.options.graph.steps || 10;
        this.buildTooltip();
    }
    SliderGraph.prototype.draw = function (data) {
        if (data === void 0) { data = this.oldData; }
        if (data) {
            Eif (data != this.oldData) {
                // only modify the data if it's new
                data = this.modifyPossibleSinglePointDataIntoValidRange(data);
            }
            var sliderOuterWidth = this.slider.element.offsetWidth;
            var sliderOuterHeight = this.slider.element.offsetHeight;
            var width = sliderOuterWidth - this.slider.options.graph.margin.left - this.slider.options.graph.margin.right;
            var height = sliderOuterHeight - this.slider.options.graph.margin.top - this.slider.options.graph.margin.bottom;
            Eif (!isNaN(width) && width >= 0 && !isNaN(height) && height >= 0) {
                this.applyTransformOnSvg(width, height);
                this.setXAndYRange(width, height);
                this.setXAndYDomain(data);
                var bars = this.svg.selectAll('.coveo-bar').data(data);
                var currentSliderValues = this.slider.getValues();
                this.renderGraphBars(bars, width, height, currentSliderValues);
                this.setGraphBarsTransition(bars, height, currentSliderValues);
            }
            this.oldData = data;
        }
    };
    SliderGraph.prototype.buildTooltip = function () {
        this.tooltip = Dom_1.$$('div', {
            className: 'coveo-slider-tooltip'
        }).el;
        this.tooltipArrow = Dom_1.$$('div', {
            className: 'coveo-slider-tooltip-arrow'
        }).el;
        this.tooltipCaption = Dom_1.$$('span', {
            className: 'coveo-caption'
        }).el;
        this.tooltipCount = Dom_1.$$('span', {
            className: 'coveo-count'
        }).el;
        Dom_1.$$(this.tooltip).append(this.tooltipArrow);
        Dom_1.$$(this.tooltip).append(this.tooltipCaption);
        Dom_1.$$(this.tooltip).append(this.tooltipCount);
        Dom_1.$$(this.tooltip).hide();
        Dom_1.$$(this.slider.element).append(this.tooltip);
    };
    SliderGraph.prototype.modifyPossibleSinglePointDataIntoValidRange = function (data) {
        var _this = this;
        return underscore_1.map(data, function (d) {
            // In some rare corner case, the index can return range values where the start of the data is equal to the end of the data
            // Since it's a "point" as opposed to a real range, it's impossible to display this properly on a graph (where the range is the x axis)
            // An element in a graph with with 0 width on the x axis is illogical and cannot work.
            // In those case, we must "widen" the x range. Instead of adding an arbitrary value (like +1 to end, for example), we need something that won't make the range super small to click on.
            // We use the total width available, and subtract half a step at the beginning, and add half a step at the end
            if (d.start == d.end) {
                var oneStep = (_this.slider.options.end - _this.slider.options.start) / _this.slider.options.graph.steps;
                d.start = Math.round(d.start - oneStep / 2);
                d.end = Math.round(d.end + oneStep / 2);
            }
            return d;
        });
    };
    SliderGraph.prototype.setXAndYRange = function (width, height) {
        this.x.range([0, width]);
        this.x.padding(0.2);
        this.y.range([height - this.slider.options.graph.margin.top, 0]);
    };
    SliderGraph.prototype.setXAndYDomain = function (data) {
        this.padGraphWithEmptyData(data);
        this.x.domain(underscore_1.map(data, function (d) {
            return d.start;
        }));
        this.y.domain([
            0,
            d3_1.max(data, function (d) {
                return d.y;
            })
        ]);
    };
    SliderGraph.prototype.calculateOneStepOfGraph = function (data) {
        var oneStep = Math.abs(data[0].end - data[0].start);
        return oneStep || 1;
    };
    SliderGraph.prototype.padGraphWithEmptyData = function (data) {
        var oneStepOfGraph = this.calculateOneStepOfGraph(data);
        this.padBeginningOfGraphWithEmptyData(data, oneStepOfGraph);
        this.padEndOfGraphWithEmptyData(data, oneStepOfGraph);
    };
    SliderGraph.prototype.padBeginningOfGraphWithEmptyData = function (data, oneStepOfGraph) {
        if (data[0].start > this.slider.options.start && data[0].start > oneStepOfGraph) {
            var difToFillAtStart = data[0].start - this.slider.options.start;
            var nbOfStepsAtStart = Math.min(exports.MAX_NUMBER_OF_STEPS, Math.round(difToFillAtStart / oneStepOfGraph));
            var currentStep = data[0].start;
            for (var i = nbOfStepsAtStart; i > 0; i--) {
                data.unshift({ start: currentStep - oneStepOfGraph, end: currentStep, y: 0 });
                currentStep -= oneStepOfGraph;
            }
        }
    };
    SliderGraph.prototype.padEndOfGraphWithEmptyData = function (data, oneStepOfGraph) {
        var lastDataIndex = data.length - 1;
        if (data[lastDataIndex].end < this.slider.options.end) {
            var diffToFillAtEnd = this.slider.options.end - data[lastDataIndex].end;
            var nbOfStepsAtEnd = Math.min(exports.MAX_NUMBER_OF_STEPS, Math.round(diffToFillAtEnd / oneStepOfGraph));
            var currentStep = data[lastDataIndex].end;
            for (var i = 0; i < nbOfStepsAtEnd; i++) {
                data.push({ start: currentStep, end: currentStep + oneStepOfGraph, y: 0 });
                currentStep += oneStepOfGraph;
            }
        }
    };
    SliderGraph.prototype.applyTransformOnSvg = function (width, height) {
        var svg = Dom_1.$$(this.slider.element).find('svg');
        svg.setAttribute('width', width + 'px');
        svg.setAttribute('height', height + 'px');
        this.svg.attr('transform', 'translate(' + this.slider.options.graph.margin.left + ',' + this.slider.options.graph.margin.top + ')');
    };
    SliderGraph.prototype.renderGraphBars = function (bars, width, height, currentSliderValues) {
        bars
            .enter()
            .append('rect')
            .attr('class', this.getFunctionForClass(currentSliderValues))
            .attr('width', this.x.bandwidth())
            .attr('height', this.getFunctionForHeight(height))
            .attr('x', this.getFunctionForX())
            .attr('y', this.getFunctionForY())
            .on('click', this.getFunctionForClick())
            .on('mouseover', this.getFunctionForMouseOver(height))
            .on('mouseout', this.getFunctionForMouseOut());
    };
    SliderGraph.prototype.setGraphBarsTransition = function (bars, height, currentSliderValues) {
        bars
            .transition()
            .attr('x', this.getFunctionForX())
            .attr('width', this.x.bandwidth())
            .attr('class', this.getFunctionForClass(currentSliderValues))
            .transition()
            .duration(this.slider.options.graph.animationDuration)
            .attr('y', this.getFunctionForY())
            .attr('height', this.getFunctionForHeight(height));
    };
    SliderGraph.prototype.getBarClass = function (currentSliderValues, d, i) {
        Iif (d.start >= currentSliderValues[0] && d.end <= currentSliderValues[1]) {
            return 'coveo-active';
        }
        else if (currentSliderValues[0] == this.slider.options.start && i == 0) {
            return 'coveo-active';
        }
        else Iif (currentSliderValues[1] == this.slider.options.end && i == this.slider.options.graph.steps - 1) {
            return 'coveo-active';
        }
        else {
            return '';
        }
    };
    SliderGraph.prototype.setTooltip = function (d, height) {
        Dom_1.$$(this.tooltipCaption).text(this.slider.getCaptionFromValue([d.start, d.end]));
        Dom_1.$$(this.tooltipCount).text(d.y.toString());
        Dom_1.$$(this.tooltip).show();
        // rolled a dice and got those numbers
        var arbitraryOffsetForTooltip = 50;
        var arbitraryOffsetForScrollbar = 20;
        var tooltipArrowSize = 5;
        var leftPositionForCurrentBand = this.x(d.start) - arbitraryOffsetForTooltip;
        var halfOfBandwidth = this.x.bandwidth() / 2;
        var tooltipArrowOffset = arbitraryOffsetForTooltip + halfOfBandwidth - tooltipArrowSize;
        this.tooltip.style.left = leftPositionForCurrentBand + "px";
        this.tooltip.style.top = this.y(d.y) - height + "px";
        this.tooltipArrow.style.left = tooltipArrowOffset + "px";
        var tooltipRect = this.tooltip.getBoundingClientRect();
        var windowWidth = new Dom_1.Win(window).width();
        var tooltipOverflowsRightOfWindow = tooltipRect.right > windowWidth - arbitraryOffsetForScrollbar;
        if (tooltipOverflowsRightOfWindow) {
            var offsetToPreventWindowOverflow = windowWidth - tooltipRect.right - arbitraryOffsetForScrollbar;
            this.tooltip.style.left = leftPositionForCurrentBand + offsetToPreventWindowOverflow + "px";
            this.tooltipArrow.style.left = tooltipArrowOffset - offsetToPreventWindowOverflow + "px";
        }
    };
    SliderGraph.prototype.getFunctionForX = function () {
        var _this = this;
        return function (d) { return _this.x(d.start); };
    };
    SliderGraph.prototype.getFunctionForY = function () {
        var _this = this;
        return function (d) { return _this.y(d.y); };
    };
    SliderGraph.prototype.getFunctionForHeight = function (height) {
        var _this = this;
        return function (d) { return height - _this.y(d.y); };
    };
    SliderGraph.prototype.getFunctionForClass = function (currentSliderValues) {
        var _this = this;
        return function (d, i) { return "coveo-bar " + _this.getBarClass(currentSliderValues, d, i); };
    };
    SliderGraph.prototype.getFunctionForClick = function () {
        var _this = this;
        return function (d, i) {
            Dom_1.$$(_this.slider.element).trigger(SliderEvents_1.SliderEvents.graphValueSelected, {
                start: d.start,
                end: d.end,
                value: d.y
            });
        };
    };
    SliderGraph.prototype.getFunctionForMouseOver = function (height) {
        var _this = this;
        return function (d) { return _this.setTooltip(d, height); };
    };
    SliderGraph.prototype.getFunctionForMouseOut = function () {
        var _this = this;
        return function () { return Dom_1.$$(_this.tooltip).hide(); };
    };
    return SliderGraph;
}());
 
 
/***/ }),
/* 697 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return bisectRight; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return bisectLeft; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__ascending__ = __webpack_require__(148);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__bisector__ = __webpack_require__(698);
 
 
 
var ascendingBisect = Object(__WEBPACK_IMPORTED_MODULE_1__bisector__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_0__ascending__["a" /* default */]);
var bisectRight = ascendingBisect.right;
var bisectLeft = ascendingBisect.left;
/* harmony default export */ __webpack_exports__["c"] = (bisectRight);
 
 
/***/ }),
/* 698 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__ascending__ = __webpack_require__(148);
 
 
/* harmony default export */ __webpack_exports__["a"] = (function(compare) {
  Iif (compare.length === 1) compare = ascendingComparator(compare);
  return {
    left: function(a, x, lo, hi) {
      if (lo == null) lo = 0;
      if (hi == null) hi = a.length;
      while (lo < hi) {
        var mid = lo + hi >>> 1;
        if (compare(a[mid], x) < 0) lo = mid + 1;
        else hi = mid;
      }
      return lo;
    },
    right: function(a, x, lo, hi) {
      if (lo == null) lo = 0;
      if (hi == null) hi = a.length;
      while (lo < hi) {
        var mid = lo + hi >>> 1;
        if (compare(a[mid], x) > 0) hi = mid;
        else lo = mid + 1;
      }
      return lo;
    }
  };
});
 
function ascendingComparator(f) {
  return function(d, x) {
    return Object(__WEBPACK_IMPORTED_MODULE_0__ascending__["a" /* default */])(f(d), x);
  };
}
 
 
/***/ }),
/* 699 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["b"] = pair;
/* harmony default export */ __webpack_exports__["a"] = (function(array, f) {
  if (f == null) f = pair;
  var i = 0, n = array.length - 1, p = array[0], pairs = new Array(n < 0 ? 0 : n);
  while (i < n) pairs[i] = f(p, p = array[++i]);
  return pairs;
});
 
function pair(a, b) {
  return [a, b];
}
 
 
/***/ }),
/* 700 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__variance__ = __webpack_require__(701);
 
 
/* harmony default export */ __webpack_exports__["a"] = (function(array, f) {
  var v = Object(__WEBPACK_IMPORTED_MODULE_0__variance__["a" /* default */])(array, f);
  return v ? Math.sqrt(v) : v;
});
 
 
/***/ }),
/* 701 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__number__ = __webpack_require__(187);
 
 
/* harmony default export */ __webpack_exports__["a"] = (function(values, valueof) {
  var n = values.length,
      m = 0,
      i = -1,
      mean = 0,
      value,
      delta,
      sum = 0;
 
  if (valueof == null) {
    while (++i < n) {
      if (!isNaN(value = Object(__WEBPACK_IMPORTED_MODULE_0__number__["a" /* default */])(values[i]))) {
        delta = value - mean;
        mean += delta / ++m;
        sum += delta * (value - mean);
      }
    }
  }
 
  else {
    while (++i < n) {
      if (!isNaN(value = Object(__WEBPACK_IMPORTED_MODULE_0__number__["a" /* default */])(valueof(values[i], i, values)))) {
        delta = value - mean;
        mean += delta / ++m;
        sum += delta * (value - mean);
      }
    }
  }
 
  if (m > 1) return sum / (m - 1);
});
 
 
/***/ }),
/* 702 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony default export */ __webpack_exports__["a"] = (function(values, valueof) {
  var n = values.length,
      i = -1,
      value,
      min,
      max;
 
  if (valueof == null) {
    while (++i < n) { // Find the first comparable value.
      if ((value = values[i]) != null && value >= value) {
        min = max = value;
        while (++i < n) { // Compare the remaining values.
          if ((value = values[i]) != null) {
            if (min > value) min = value;
            if (max < value) max = value;
          }
        }
      }
    }
  }
 
  else {
    while (++i < n) { // Find the first comparable value.
      if ((value = valueof(values[i], i, values)) != null && value >= value) {
        min = max = value;
        while (++i < n) { // Compare the remaining values.
          if ((value = valueof(values[i], i, values)) != null) {
            if (min > value) min = value;
            if (max < value) max = value;
          }
        }
      }
    }
  }
 
  return [min, max];
});
 
 
/***/ }),
/* 703 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return slice; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return map; });
var array = Array.prototype;
 
var slice = array.slice;
var map = array.map;
 
 
/***/ }),
/* 704 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony default export */ __webpack_exports__["a"] = (function(start, stop, step) {
  start = +start, stop = +stop, step = (n = arguments.length) < 2 ? (stop = start, start = 0, 1) : n < 3 ? 1 : +step;
 
  var i = -1,
      n = Math.max(0, Math.ceil((stop - start) / step)) | 0,
      range = new Array(n);
 
  while (++i < n) {
    range[i] = start + i * step;
  }
 
  return range;
});
 
 
/***/ }),
/* 705 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["b"] = tickIncrement;
/* harmony export (immutable) */ __webpack_exports__["c"] = tickStep;
var e10 = Math.sqrt(50),
    e5 = Math.sqrt(10),
    e2 = Math.sqrt(2);
 
/* harmony default export */ __webpack_exports__["a"] = (function(start, stop, count) {
  var reverse,
      i = -1,
      n,
      ticks,
      step;
 
  stop = +stop, start = +start, count = +count;
  if (start === stop && count > 0) return [start];
  if (reverse = stop < start) n = start, start = stop, stop = n;
  if ((step = tickIncrement(start, stop, count)) === 0 || !isFinite(step)) return [];
 
  if (step > 0) {
    start = Math.ceil(start / step);
    stop = Math.floor(stop / step);
    ticks = new Array(n = Math.ceil(stop - start + 1));
    while (++i < n) ticks[i] = (start + i) * step;
  } else {
    start = Math.floor(start * step);
    stop = Math.ceil(stop * step);
    ticks = new Array(n = Math.ceil(start - stop + 1));
    while (++i < n) ticks[i] = (start - i) / step;
  }
 
  if (reverse) ticks.reverse();
 
  return ticks;
});
 
function tickIncrement(start, stop, count) {
  var step = (stop - start) / Math.max(0, count),
      power = Math.floor(Math.log(step) / Math.LN10),
      error = step / Math.pow(10, power);
  return power >= 0
      ? (error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1) * Math.pow(10, power)
      : -Math.pow(10, -power) / (error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1);
}
 
function tickStep(start, stop, count) {
  var step0 = Math.abs(stop - start) / Math.max(0, count),
      step1 = Math.pow(10, Math.floor(Math.log(step0) / Math.LN10)),
      error = step0 / step1;
  if (error >= e10) step1 *= 10;
  else if (error >= e5) step1 *= 5;
  else if (error >= e2) step1 *= 2;
  return stop < start ? -step1 : step1;
}
 
 
/***/ }),
/* 706 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony default export */ __webpack_exports__["a"] = (function(values) {
  return Math.ceil(Math.log(values.length) / Math.LN2) + 1;
});
 
 
/***/ }),
/* 707 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony default export */ __webpack_exports__["a"] = (function(values, valueof) {
  var n = values.length,
      i = -1,
      value,
      min;
 
  if (valueof == null) {
    while (++i < n) { // Find the first comparable value.
      if ((value = values[i]) != null && value >= value) {
        min = value;
        while (++i < n) { // Compare the remaining values.
          if ((value = values[i]) != null && min > value) {
            min = value;
          }
        }
      }
    }
  }
 
  else {
    while (++i < n) { // Find the first comparable value.
      if ((value = valueof(values[i], i, values)) != null && value >= value) {
        min = value;
        while (++i < n) { // Compare the remaining values.
          if ((value = valueof(values[i], i, values)) != null && min > value) {
            min = value;
          }
        }
      }
    }
  }
 
  return min;
});
 
 
/***/ }),
/* 708 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__min__ = __webpack_require__(707);
 
 
/* harmony default export */ __webpack_exports__["a"] = (function(matrix) {
  if (!(n = matrix.length)) return [];
  for (var i = -1, m = Object(__WEBPACK_IMPORTED_MODULE_0__min__["a" /* default */])(matrix, length), transpose = new Array(m); ++i < m;) {
    for (var j = -1, n, row = transpose[i] = new Array(n); ++j < n;) {
      row[j] = matrix[j][i];
    }
  }
  return transpose;
});
 
function length(d) {
  return d.length;
}
 
 
/***/ }),
/* 709 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__selection_index__ = __webpack_require__(73);
 
 
/* harmony default export */ __webpack_exports__["a"] = (function(selector) {
  return typeof selector === "string"
      ? new __WEBPACK_IMPORTED_MODULE_0__selection_index__["a" /* Selection */]([[document.querySelector(selector)]], [document.documentElement])
      : new __WEBPACK_IMPORTED_MODULE_0__selection_index__["a" /* Selection */]([[selector]], __WEBPACK_IMPORTED_MODULE_0__selection_index__["c" /* root */]);
});
 
 
/***/ }),
/* 710 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
function empty() {
  return [];
}
 
/* harmony default export */ __webpack_exports__["a"] = (function(selector) {
  return selector == null ? empty : function() {
    return this.querySelectorAll(selector);
  };
});
 
 
/***/ }),
/* 711 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony default export */ __webpack_exports__["a"] = (function(selector) {
  return function() {
    return this.matches(selector);
  };
});
 
 
/***/ }),
/* 712 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = EnterNode;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__sparse__ = __webpack_require__(713);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__index__ = __webpack_require__(73);
 
 
 
/* harmony default export */ __webpack_exports__["b"] = (function() {
  return new __WEBPACK_IMPORTED_MODULE_1__index__["a" /* Selection */](this._enter || this._groups.map(__WEBPACK_IMPORTED_MODULE_0__sparse__["a" /* default */]), this._parents);
});
 
function EnterNode(parent, datum) {
  this.ownerDocument = parent.ownerDocument;
  this.namespaceURI = parent.namespaceURI;
  this._next = null;
  this._parent = parent;
  this.__data__ = datum;
}
 
EnterNode.prototype = {
  constructor: EnterNode,
  appendChild: function(child) { return this._parent.insertBefore(child, this._next); },
  insertBefore: function(child, next) { return this._parent.insertBefore(child, next); },
  querySelector: function(selector) { return this._parent.querySelector(selector); },
  querySelectorAll: function(selector) { return this._parent.querySelectorAll(selector); }
};
 
 
/***/ }),
/* 713 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony default export */ __webpack_exports__["a"] = (function(update) {
  return new Array(update.length);
});
 
 
/***/ }),
/* 714 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["b"] = styleValue;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__window__ = __webpack_require__(340);
 
 
function styleRemove(name) {
  return function() {
    this.style.removeProperty(name);
  };
}
 
function styleConstant(name, value, priority) {
  return function() {
    this.style.setProperty(name, value, priority);
  };
}
 
function styleFunction(name, value, priority) {
  return function() {
    var v = value.apply(this, arguments);
    if (v == null) this.style.removeProperty(name);
    else this.style.setProperty(name, v, priority);
  };
}
 
/* harmony default export */ __webpack_exports__["a"] = (function(name, value, priority) {
  return arguments.length > 1
      ? this.each((value == null
            ? styleRemove : typeof value === "function"
            ? styleFunction
            : styleConstant)(name, value, priority == null ? "" : priority))
      : styleValue(this.node(), name);
});
 
function styleValue(node, name) {
  return node.style.getPropertyValue(name)
      || Object(__WEBPACK_IMPORTED_MODULE_0__window__["a" /* default */])(node).getComputedStyle(node, null).getPropertyValue(name);
}
 
 
/***/ }),
/* 715 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["b"] = yesdrag;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_d3_selection__ = __webpack_require__(45);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__noevent_js__ = __webpack_require__(716);
 
 
 
/* harmony default export */ __webpack_exports__["a"] = (function(view) {
  var root = view.document.documentElement,
      selection = Object(__WEBPACK_IMPORTED_MODULE_0_d3_selection__["k" /* select */])(view).on("dragstart.drag", __WEBPACK_IMPORTED_MODULE_1__noevent_js__["a" /* default */], true);
  if ("onselectstart" in root) {
    selection.on("selectstart.drag", __WEBPACK_IMPORTED_MODULE_1__noevent_js__["a" /* default */], true);
  } else {
    root.__noselect = root.style.MozUserSelect;
    root.style.MozUserSelect = "none";
  }
});
 
function yesdrag(view, noclick) {
  var root = view.document.documentElement,
      selection = Object(__WEBPACK_IMPORTED_MODULE_0_d3_selection__["k" /* select */])(view).on("dragstart.drag", null);
  if (noclick) {
    selection.on("click.drag", __WEBPACK_IMPORTED_MODULE_1__noevent_js__["a" /* default */], true);
    setTimeout(function() { selection.on("click.drag", null); }, 0);
  }
  if ("onselectstart" in root) {
    selection.on("selectstart.drag", null);
  } else {
    root.style.MozUserSelect = root.__noselect;
    delete root.__noselect;
  }
}
 
 
/***/ }),
/* 716 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["b"] = nopropagation;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_d3_selection__ = __webpack_require__(45);
 
 
function nopropagation() {
  __WEBPACK_IMPORTED_MODULE_0_d3_selection__["e" /* event */].stopImmediatePropagation();
}
 
/* harmony default export */ __webpack_exports__["a"] = (function() {
  __WEBPACK_IMPORTED_MODULE_0_d3_selection__["e" /* event */].preventDefault();
  __WEBPACK_IMPORTED_MODULE_0_d3_selection__["e" /* event */].stopImmediatePropagation();
});
 
 
/***/ }),
/* 717 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
const radians = Math.PI / 180;
/* harmony export (immutable) */ __webpack_exports__["b"] = radians;
 
const degrees = 180 / Math.PI;
/* harmony export (immutable) */ __webpack_exports__["a"] = degrees;
 
 
 
/***/ }),
/* 718 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return rgbBasis; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return rgbBasisClosed; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_d3_color__ = __webpack_require__(74);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__basis_js__ = __webpack_require__(346);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__basisClosed_js__ = __webpack_require__(719);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__color_js__ = __webpack_require__(150);
 
 
 
 
 
/* harmony default export */ __webpack_exports__["a"] = ((function rgbGamma(y) {
  var color = Object(__WEBPACK_IMPORTED_MODULE_3__color_js__["b" /* gamma */])(y);
 
  function rgb(start, end) {
    var r = color((start = Object(__WEBPACK_IMPORTED_MODULE_0_d3_color__["h" /* rgb */])(start)).r, (end = Object(__WEBPACK_IMPORTED_MODULE_0_d3_color__["h" /* rgb */])(end)).r),
        g = color(start.g, end.g),
        b = color(start.b, end.b),
        opacity = Object(__WEBPACK_IMPORTED_MODULE_3__color_js__["a" /* default */])(start.opacity, end.opacity);
    return function(t) {
      start.r = r(t);
      start.g = g(t);
      start.b = b(t);
      start.opacity = opacity(t);
      return start + "";
    };
  }
 
  rgb.gamma = rgbGamma;
 
  return rgb;
})(1));
 
function rgbSpline(spline) {
  return function(colors) {
    var n = colors.length,
        r = new Array(n),
        g = new Array(n),
        b = new Array(n),
        i, color;
    for (i = 0; i < n; ++i) {
      color = Object(__WEBPACK_IMPORTED_MODULE_0_d3_color__["h" /* rgb */])(colors[i]);
      r[i] = color.r || 0;
      g[i] = color.g || 0;
      b[i] = color.b || 0;
    }
    r = spline(r);
    g = spline(g);
    b = spline(b);
    color.opacity = 1;
    return function(t) {
      color.r = r(t);
      color.g = g(t);
      color.b = b(t);
      return color + "";
    };
  };
}
 
var rgbBasis = rgbSpline(__WEBPACK_IMPORTED_MODULE_1__basis_js__["b" /* default */]);
var rgbBasisClosed = rgbSpline(__WEBPACK_IMPORTED_MODULE_2__basisClosed_js__["a" /* default */]);
 
 
/***/ }),
/* 719 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__basis_js__ = __webpack_require__(346);
 
 
/* harmony default export */ __webpack_exports__["a"] = (function(values) {
  var n = values.length;
  return function(t) {
    var i = Math.floor(((t %= 1) < 0 ? ++t : t) * n),
        v0 = values[(i + n - 1) % n],
        v1 = values[i % n],
        v2 = values[(i + 1) % n],
        v3 = values[(i + 2) % n];
    return Object(__WEBPACK_IMPORTED_MODULE_0__basis_js__["a" /* basis */])((t - i / n) * n, v0, v1, v2, v3);
  };
});
 
 
/***/ }),
/* 720 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony default export */ __webpack_exports__["a"] = (function(x) {
  return function() {
    return x;
  };
});
 
 
/***/ }),
/* 721 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["b"] = genericArray;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__value_js__ = __webpack_require__(343);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__numberArray_js__ = __webpack_require__(347);
 
 
 
/* harmony default export */ __webpack_exports__["a"] = (function(a, b) {
  return (Object(__WEBPACK_IMPORTED_MODULE_1__numberArray_js__["b" /* isNumberArray */])(b) ? __WEBPACK_IMPORTED_MODULE_1__numberArray_js__["a" /* default */] : genericArray)(a, b);
});
 
function genericArray(a, b) {
  var nb = b ? b.length : 0,
      na = a ? Math.min(nb, a.length) : 0,
      x = new Array(na),
      c = new Array(nb),
      i;
 
  for (i = 0; i < na; ++i) x[i] = Object(__WEBPACK_IMPORTED_MODULE_0__value_js__["a" /* default */])(a[i], b[i]);
  for (; i < nb; ++i) c[i] = b[i];
 
  return function(t) {
    for (i = 0; i < na; ++i) c[i] = x[i](t);
    return c;
  };
}
 
 
/***/ }),
/* 722 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony default export */ __webpack_exports__["a"] = (function(a, b) {
  var d = new Date;
  return a = +a, b = +b, function(t) {
    return d.setTime(a * (1 - t) + b * t), d;
  };
});
 
 
/***/ }),
/* 723 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__value_js__ = __webpack_require__(343);
 
 
/* harmony default export */ __webpack_exports__["a"] = (function(a, b) {
  var i = {},
      c = {},
      k;
 
  if (a === null || typeof a !== "object") a = {};
  if (b === null || typeof b !== "object") b = {};
 
  for (k in b) {
    if (k in a) {
      i[k] = Object(__WEBPACK_IMPORTED_MODULE_0__value_js__["a" /* default */])(a[k], b[k]);
    } else {
      c[k] = b[k];
    }
  }
 
  return function(t) {
    for (k in i) c[k] = i[k](t);
    return c;
  };
});
 
 
/***/ }),
/* 724 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__number_js__ = __webpack_require__(246);
 
 
var reA = /[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,
    reB = new RegExp(reA.source, "g");
 
function zero(b) {
  return function() {
    return b;
  };
}
 
function one(b) {
  return function(t) {
    return b(t) + "";
  };
}
 
/* harmony default export */ __webpack_exports__["a"] = (function(a, b) {
  var bi = reA.lastIndex = reB.lastIndex = 0, // scan index for next number in b
      am, // current match in a
      bm, // current match in b
      bs, // string preceding current number in b, if any
      i = -1, // index in s
      s = [], // string constants and placeholders
      q = []; // number interpolators
 
  // Coerce inputs to strings.
  a = a + "", b = b + "";
 
  // Interpolate pairs of numbers in a & b.
  while ((am = reA.exec(a))
      && (bm = reB.exec(b))) {
    if ((bs = bm.index) > bi) { // a string precedes the next number in b
      bs = b.slice(bi, bs);
      if (s[i]) s[i] += bs; // coalesce with previous string
      else s[++i] = bs;
    }
    if ((am = am[0]) === (bm = bm[0])) { // numbers in a & b match
      if (s[i]) s[i] += bm; // coalesce with previous string
      else s[++i] = bm;
    } else { // interpolate non-matching numbers
      s[++i] = null;
      q.push({i: i, x: Object(__WEBPACK_IMPORTED_MODULE_0__number_js__["a" /* default */])(am, bm)});
    }
    bi = reB.lastIndex;
  }
 
  // Add remains of b.
  if (bi < b.length) {
    bs = b.slice(bi);
    if (s[i]) s[i] += bs; // coalesce with previous string
    else s[++i] = bs;
  }
 
  // Special optimization for only a single match.
  // Otherwise, interpolate each of the numbers and rejoin the string.
  return s.length < 2 ? (q[0]
      ? one(q[0].x)
      : zero(b))
      : (b = q.length, function(t) {
          for (var i = 0, o; i < b; ++i) s[(o = q[i]).i] = o.x(t);
          return s.join("");
        });
});
 
 
/***/ }),
/* 725 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__transition_schedule_js__ = __webpack_require__(63);
 
 
/* harmony default export */ __webpack_exports__["a"] = (function(node, name) {
  var schedules = node.__transition,
      schedule,
      active,
      empty = true,
      i;
 
  if (!schedules) return;
 
  name = name == null ? null : name + "";
 
  for (i in schedules) {
    if ((schedule = schedules[i]).name !== name) { empty = false; continue; }
    active = schedule.state > __WEBPACK_IMPORTED_MODULE_0__transition_schedule_js__["d" /* STARTING */] && schedule.state < __WEBPACK_IMPORTED_MODULE_0__transition_schedule_js__["b" /* ENDING */];
    schedule.state = __WEBPACK_IMPORTED_MODULE_0__transition_schedule_js__["a" /* ENDED */];
    schedule.timer.stop();
    schedule.on.call(active ? "interrupt" : "cancel", node, node.__data__, schedule.index, schedule.group);
    delete schedules[i];
  }
 
  if (empty) delete node.__transition;
});
 
 
/***/ }),
/* 726 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_d3_color__ = __webpack_require__(74);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_d3_interpolate__ = __webpack_require__(83);
 
 
 
/* harmony default export */ __webpack_exports__["a"] = (function(a, b) {
  var c;
  return (typeof b === "number" ? __WEBPACK_IMPORTED_MODULE_1_d3_interpolate__["o" /* interpolateNumber */]
      : b instanceof __WEBPACK_IMPORTED_MODULE_0_d3_color__["a" /* color */] ? __WEBPACK_IMPORTED_MODULE_1_d3_interpolate__["r" /* interpolateRgb */]
      : (c = Object(__WEBPACK_IMPORTED_MODULE_0_d3_color__["a" /* color */])(b)) ? (b = c, __WEBPACK_IMPORTED_MODULE_1_d3_interpolate__["r" /* interpolateRgb */])
      : __WEBPACK_IMPORTED_MODULE_1_d3_interpolate__["v" /* interpolateString */])(a, b);
});
 
 
/***/ }),
/* 727 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__linear_js__ = __webpack_require__(1227);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "y", function() { return __WEBPACK_IMPORTED_MODULE_0__linear_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__quad_js__ = __webpack_require__(1228);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "D", function() { return __WEBPACK_IMPORTED_MODULE_1__quad_js__["b"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "E", function() { return __WEBPACK_IMPORTED_MODULE_1__quad_js__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "G", function() { return __WEBPACK_IMPORTED_MODULE_1__quad_js__["c"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "F", function() { return __WEBPACK_IMPORTED_MODULE_1__quad_js__["b"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__cubic_js__ = __webpack_require__(1229);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "m", function() { return __WEBPACK_IMPORTED_MODULE_2__cubic_js__["b"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "n", function() { return __WEBPACK_IMPORTED_MODULE_2__cubic_js__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "p", function() { return __WEBPACK_IMPORTED_MODULE_2__cubic_js__["c"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "o", function() { return __WEBPACK_IMPORTED_MODULE_2__cubic_js__["b"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__poly_js__ = __webpack_require__(1230);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "z", function() { return __WEBPACK_IMPORTED_MODULE_3__poly_js__["b"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "A", function() { return __WEBPACK_IMPORTED_MODULE_3__poly_js__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "C", function() { return __WEBPACK_IMPORTED_MODULE_3__poly_js__["c"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "B", function() { return __WEBPACK_IMPORTED_MODULE_3__poly_js__["b"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__sin_js__ = __webpack_require__(1231);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "H", function() { return __WEBPACK_IMPORTED_MODULE_4__sin_js__["b"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "I", function() { return __WEBPACK_IMPORTED_MODULE_4__sin_js__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "K", function() { return __WEBPACK_IMPORTED_MODULE_4__sin_js__["c"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "J", function() { return __WEBPACK_IMPORTED_MODULE_4__sin_js__["b"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__exp_js__ = __webpack_require__(1232);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "u", function() { return __WEBPACK_IMPORTED_MODULE_5__exp_js__["b"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "v", function() { return __WEBPACK_IMPORTED_MODULE_5__exp_js__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "x", function() { return __WEBPACK_IMPORTED_MODULE_5__exp_js__["c"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "w", function() { return __WEBPACK_IMPORTED_MODULE_5__exp_js__["b"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__circle_js__ = __webpack_require__(1233);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return __WEBPACK_IMPORTED_MODULE_6__circle_js__["b"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return __WEBPACK_IMPORTED_MODULE_6__circle_js__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "l", function() { return __WEBPACK_IMPORTED_MODULE_6__circle_js__["c"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "k", function() { return __WEBPACK_IMPORTED_MODULE_6__circle_js__["b"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__bounce_js__ = __webpack_require__(1234);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return __WEBPACK_IMPORTED_MODULE_7__bounce_js__["c"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return __WEBPACK_IMPORTED_MODULE_7__bounce_js__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return __WEBPACK_IMPORTED_MODULE_7__bounce_js__["c"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return __WEBPACK_IMPORTED_MODULE_7__bounce_js__["b"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__back_js__ = __webpack_require__(1235);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_8__back_js__["b"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return __WEBPACK_IMPORTED_MODULE_8__back_js__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return __WEBPACK_IMPORTED_MODULE_8__back_js__["c"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return __WEBPACK_IMPORTED_MODULE_8__back_js__["b"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__elastic_js__ = __webpack_require__(1236);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "q", function() { return __WEBPACK_IMPORTED_MODULE_9__elastic_js__["c"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "r", function() { return __WEBPACK_IMPORTED_MODULE_9__elastic_js__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "t", function() { return __WEBPACK_IMPORTED_MODULE_9__elastic_js__["c"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "s", function() { return __WEBPACK_IMPORTED_MODULE_9__elastic_js__["b"]; });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
/***/ }),
/* 728 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = tpmt;
// tpmt is two power minus ten times t scaled to [0,1]
function tpmt(x) {
  return (Math.pow(2, -10 * x) - 0.0009765625) * 1.0009775171065494;
}
 
 
/***/ }),
/* 729 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return cos; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return sin; });
/* unused harmony export pi */
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return halfPi; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return tau; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return max; });
var cos = Math.cos;
var sin = Math.sin;
var pi = Math.PI;
var halfPi = pi / 2;
var tau = pi * 2;
var max = Math.max;
 
 
/***/ }),
/* 730 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_d3_array__ = __webpack_require__(44);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__array__ = __webpack_require__(731);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__ascending__ = __webpack_require__(1253);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__area__ = __webpack_require__(1254);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__constant__ = __webpack_require__(732);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__contains__ = __webpack_require__(1255);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__noop__ = __webpack_require__(1256);
 
 
 
 
 
 
 
 
var cases = [
  [],
  [[[1.0, 1.5], [0.5, 1.0]]],
  [[[1.5, 1.0], [1.0, 1.5]]],
  [[[1.5, 1.0], [0.5, 1.0]]],
  [[[1.0, 0.5], [1.5, 1.0]]],
  [[[1.0, 1.5], [0.5, 1.0]], [[1.0, 0.5], [1.5, 1.0]]],
  [[[1.0, 0.5], [1.0, 1.5]]],
  [[[1.0, 0.5], [0.5, 1.0]]],
  [[[0.5, 1.0], [1.0, 0.5]]],
  [[[1.0, 1.5], [1.0, 0.5]]],
  [[[0.5, 1.0], [1.0, 0.5]], [[1.5, 1.0], [1.0, 1.5]]],
  [[[1.5, 1.0], [1.0, 0.5]]],
  [[[0.5, 1.0], [1.5, 1.0]]],
  [[[1.0, 1.5], [1.5, 1.0]]],
  [[[0.5, 1.0], [1.0, 1.5]]],
  []
];
 
/* harmony default export */ __webpack_exports__["a"] = (function() {
  var dx = 1,
      dy = 1,
      threshold = __WEBPACK_IMPORTED_MODULE_0_d3_array__["y" /* thresholdSturges */],
      smooth = smoothLinear;
 
  function contours(values) {
    var tz = threshold(values);
 
    // Convert number of thresholds into uniform thresholds.
    if (!Array.isArray(tz)) {
      var domain = Object(__WEBPACK_IMPORTED_MODULE_0_d3_array__["i" /* extent */])(values), start = domain[0], stop = domain[1];
      tz = Object(__WEBPACK_IMPORTED_MODULE_0_d3_array__["A" /* tickStep */])(start, stop, tz);
      tz = Object(__WEBPACK_IMPORTED_MODULE_0_d3_array__["s" /* range */])(Math.floor(start / tz) * tz, Math.floor(stop / tz) * tz, tz);
    } else {
      tz = tz.slice().sort(__WEBPACK_IMPORTED_MODULE_2__ascending__["a" /* default */]);
    }
 
    return tz.map(function(value) {
      return contour(values, value);
    });
  }
 
  // Accumulate, smooth contour rings, assign holes to exterior rings.
  // Based on https://github.com/mbostock/shapefile/blob/v0.6.2/shp/polygon.js
  function contour(values, value) {
    var polygons = [],
        holes = [];
 
    isorings(values, value, function(ring) {
      smooth(ring, values, value);
      if (Object(__WEBPACK_IMPORTED_MODULE_3__area__["a" /* default */])(ring) > 0) polygons.push([ring]);
      else holes.push(ring);
    });
 
    holes.forEach(function(hole) {
      for (var i = 0, n = polygons.length, polygon; i < n; ++i) {
        if (Object(__WEBPACK_IMPORTED_MODULE_5__contains__["a" /* default */])((polygon = polygons[i])[0], hole) !== -1) {
          polygon.push(hole);
          return;
        }
      }
    });
 
    return {
      type: "MultiPolygon",
      value: value,
      coordinates: polygons
    };
  }
 
  // Marching squares with isolines stitched into rings.
  // Based on https://github.com/topojson/topojson-client/blob/v3.0.0/src/stitch.js
  function isorings(values, value, callback) {
    var fragmentByStart = new Array,
        fragmentByEnd = new Array,
        x, y, t0, t1, t2, t3;
 
    // Special case for the first row (y = -1, t2 = t3 = 0).
    x = y = -1;
    t1 = values[0] >= value;
    cases[t1 << 1].forEach(stitch);
    while (++x < dx - 1) {
      t0 = t1, t1 = values[x + 1] >= value;
      cases[t0 | t1 << 1].forEach(stitch);
    }
    cases[t1 << 0].forEach(stitch);
 
    // General case for the intermediate rows.
    while (++y < dy - 1) {
      x = -1;
      t1 = values[y * dx + dx] >= value;
      t2 = values[y * dx] >= value;
      cases[t1 << 1 | t2 << 2].forEach(stitch);
      while (++x < dx - 1) {
        t0 = t1, t1 = values[y * dx + dx + x + 1] >= value;
        t3 = t2, t2 = values[y * dx + x + 1] >= value;
        cases[t0 | t1 << 1 | t2 << 2 | t3 << 3].forEach(stitch);
      }
      cases[t1 | t2 << 3].forEach(stitch);
    }
 
    // Special case for the last row (y = dy - 1, t0 = t1 = 0).
    x = -1;
    t2 = values[y * dx] >= value;
    cases[t2 << 2].forEach(stitch);
    while (++x < dx - 1) {
      t3 = t2, t2 = values[y * dx + x + 1] >= value;
      cases[t2 << 2 | t3 << 3].forEach(stitch);
    }
    cases[t2 << 3].forEach(stitch);
 
    function stitch(line) {
      var start = [line[0][0] + x, line[0][1] + y],
          end = [line[1][0] + x, line[1][1] + y],
          startIndex = index(start),
          endIndex = index(end),
          f, g;
      if (f = fragmentByEnd[startIndex]) {
        if (g = fragmentByStart[endIndex]) {
          delete fragmentByEnd[f.end];
          delete fragmentByStart[g.start];
          if (f === g) {
            f.ring.push(end);
            callback(f.ring);
          } else {
            fragmentByStart[f.start] = fragmentByEnd[g.end] = {start: f.start, end: g.end, ring: f.ring.concat(g.ring)};
          }
        } else {
          delete fragmentByEnd[f.end];
          f.ring.push(end);
          fragmentByEnd[f.end = endIndex] = f;
        }
      } else if (f = fragmentByStart[endIndex]) {
        if (g = fragmentByEnd[startIndex]) {
          delete fragmentByStart[f.start];
          delete fragmentByEnd[g.end];
          if (f === g) {
            f.ring.push(end);
            callback(f.ring);
          } else {
            fragmentByStart[g.start] = fragmentByEnd[f.end] = {start: g.start, end: f.end, ring: g.ring.concat(f.ring)};
          }
        } else {
          delete fragmentByStart[f.start];
          f.ring.unshift(start);
          fragmentByStart[f.start = startIndex] = f;
        }
      } else {
        fragmentByStart[startIndex] = fragmentByEnd[endIndex] = {start: startIndex, end: endIndex, ring: [start, end]};
      }
    }
  }
 
  function index(point) {
    return point[0] * 2 + point[1] * (dx + 1) * 4;
  }
 
  function smoothLinear(ring, values, value) {
    ring.forEach(function(point) {
      var x = point[0],
          y = point[1],
          xt = x | 0,
          yt = y | 0,
          v0,
          v1 = values[yt * dx + xt];
      if (x > 0 && x < dx && xt === x) {
        v0 = values[yt * dx + xt - 1];
        point[0] = x + (value - v0) / (v1 - v0) - 0.5;
      }
      if (y > 0 && y < dy && yt === y) {
        v0 = values[(yt - 1) * dx + xt];
        point[1] = y + (value - v0) / (v1 - v0) - 0.5;
      }
    });
  }
 
  contours.contour = contour;
 
  contours.size = function(_) {
    if (!arguments.length) return [dx, dy];
    var _0 = Math.ceil(_[0]), _1 = Math.ceil(_[1]);
    if (!(_0 > 0) || !(_1 > 0)) throw new Error("invalid size");
    return dx = _0, dy = _1, contours;
  };
 
  contours.thresholds = function(_) {
    return arguments.length ? (threshold = typeof _ === "function" ? _ : Array.isArray(_) ? Object(__WEBPACK_IMPORTED_MODULE_4__constant__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__array__["a" /* slice */].call(_)) : Object(__WEBPACK_IMPORTED_MODULE_4__constant__["a" /* default */])(_), contours) : threshold;
  };
 
  contours.smooth = function(_) {
    return arguments.length ? (smooth = _ ? smoothLinear : __WEBPACK_IMPORTED_MODULE_6__noop__["a" /* default */], contours) : smooth === smoothLinear;
  };
 
  return contours;
});
 
 
/***/ }),
/* 731 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return slice; });
var array = Array.prototype;
 
var slice = array.slice;
 
 
/***/ }),
/* 732 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony default export */ __webpack_exports__["a"] = (function(x) {
  return function() {
    return x;
  };
});
 
 
/***/ }),
/* 733 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__dsv_js__ = __webpack_require__(351);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return __WEBPACK_IMPORTED_MODULE_0__dsv_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__csv_js__ = __webpack_require__(1259);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return __WEBPACK_IMPORTED_MODULE_1__csv_js__["f"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return __WEBPACK_IMPORTED_MODULE_1__csv_js__["g"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return __WEBPACK_IMPORTED_MODULE_1__csv_js__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return __WEBPACK_IMPORTED_MODULE_1__csv_js__["b"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return __WEBPACK_IMPORTED_MODULE_1__csv_js__["d"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return __WEBPACK_IMPORTED_MODULE_1__csv_js__["c"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return __WEBPACK_IMPORTED_MODULE_1__csv_js__["e"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__tsv_js__ = __webpack_require__(1260);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "o", function() { return __WEBPACK_IMPORTED_MODULE_2__tsv_js__["f"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "p", function() { return __WEBPACK_IMPORTED_MODULE_2__tsv_js__["g"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return __WEBPACK_IMPORTED_MODULE_2__tsv_js__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "k", function() { return __WEBPACK_IMPORTED_MODULE_2__tsv_js__["b"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "m", function() { return __WEBPACK_IMPORTED_MODULE_2__tsv_js__["d"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "l", function() { return __WEBPACK_IMPORTED_MODULE_2__tsv_js__["c"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "n", function() { return __WEBPACK_IMPORTED_MODULE_2__tsv_js__["e"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__autoType_js__ = __webpack_require__(1261);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_3__autoType_js__["a"]; });
 
 
 
 
 
 
/***/ }),
/* 734 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["b"] = x;
/* harmony export (immutable) */ __webpack_exports__["c"] = y;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_d3_dispatch__ = __webpack_require__(149);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_d3_collection__ = __webpack_require__(249);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_d3_timer__ = __webpack_require__(247);
 
 
 
 
function x(d) {
  return d.x;
}
 
function y(d) {
  return d.y;
}
 
var initialRadius = 10,
    initialAngle = Math.PI * (3 - Math.sqrt(5));
 
/* harmony default export */ __webpack_exports__["a"] = (function(nodes) {
  var simulation,
      alpha = 1,
      alphaMin = 0.001,
      alphaDecay = 1 - Math.pow(alphaMin, 1 / 300),
      alphaTarget = 0,
      velocityDecay = 0.6,
      forces = Object(__WEBPACK_IMPORTED_MODULE_1_d3_collection__["c" /* map */])(),
      stepper = Object(__WEBPACK_IMPORTED_MODULE_2_d3_timer__["d" /* timer */])(step),
      event = Object(__WEBPACK_IMPORTED_MODULE_0_d3_dispatch__["a" /* dispatch */])("tick", "end");
 
  if (nodes == null) nodes = [];
 
  function step() {
    tick();
    event.call("tick", simulation);
    if (alpha < alphaMin) {
      stepper.stop();
      event.call("end", simulation);
    }
  }
 
  function tick(iterations) {
    var i, n = nodes.length, node;
 
    if (iterations === undefined) iterations = 1;
 
    for (var k = 0; k < iterations; ++k) {
      alpha += (alphaTarget - alpha) * alphaDecay;
 
      forces.each(function (force) {
        force(alpha);
      });
 
      for (i = 0; i < n; ++i) {
        node = nodes[i];
        if (node.fx == null) node.x += node.vx *= velocityDecay;
        else node.x = node.fx, node.vx = 0;
        if (node.fy == null) node.y += node.vy *= velocityDecay;
        else node.y = node.fy, node.vy = 0;
      }
    }
 
    return simulation;
  }
 
  function initializeNodes() {
    for (var i = 0, n = nodes.length, node; i < n; ++i) {
      node = nodes[i], node.index = i;
      if (node.fx != null) node.x = node.fx;
      if (node.fy != null) node.y = node.fy;
      if (isNaN(node.x) || isNaN(node.y)) {
        var radius = initialRadius * Math.sqrt(i), angle = i * initialAngle;
        node.x = radius * Math.cos(angle);
        node.y = radius * Math.sin(angle);
      }
      if (isNaN(node.vx) || isNaN(node.vy)) {
        node.vx = node.vy = 0;
      }
    }
  }
 
  function initializeForce(force) {
    if (force.initialize) force.initialize(nodes);
    return force;
  }
 
  initializeNodes();
 
  return simulation = {
    tick: tick,
 
    restart: function() {
      return stepper.restart(step), simulation;
    },
 
    stop: function() {
      return stepper.stop(), simulation;
    },
 
    nodes: function(_) {
      return arguments.length ? (nodes = _, initializeNodes(), forces.each(initializeForce), simulation) : nodes;
    },
 
    alpha: function(_) {
      return arguments.length ? (alpha = +_, simulation) : alpha;
    },
 
    alphaMin: function(_) {
      return arguments.length ? (alphaMin = +_, simulation) : alphaMin;
    },
 
    alphaDecay: function(_) {
      return arguments.length ? (alphaDecay = +_, simulation) : +alphaDecay;
    },
 
    alphaTarget: function(_) {
      return arguments.length ? (alphaTarget = +_, simulation) : alphaTarget;
    },
 
    velocityDecay: function(_) {
      return arguments.length ? (velocityDecay = 1 - _, simulation) : 1 - velocityDecay;
    },
 
    force: function(name, _) {
      return arguments.length > 1 ? ((_ == null ? forces.remove(name) : forces.set(name, initializeForce(_))), simulation) : forces.get(name);
    },
 
    find: function(x, y, radius) {
      var i = 0,
          n = nodes.length,
          dx,
          dy,
          d2,
          node,
          closest;
 
      if (radius == null) radius = Infinity;
      else radius *= radius;
 
      for (i = 0; i < n; ++i) {
        node = nodes[i];
        dx = x - node.x;
        dy = y - node.y;
        d2 = dx * dx + dy * dy;
        if (d2 < radius) closest = node, radius = d2;
      }
 
      return closest;
    },
 
    on: function(name, _) {
      return arguments.length > 1 ? (event.on(name, _), simulation) : event.on(name);
    }
  };
});
 
 
/***/ }),
/* 735 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__exponent_js__ = __webpack_require__(250);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__formatGroup_js__ = __webpack_require__(1291);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__formatNumerals_js__ = __webpack_require__(1292);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__formatSpecifier_js__ = __webpack_require__(736);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__formatTrim_js__ = __webpack_require__(1293);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__formatTypes_js__ = __webpack_require__(1294);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__formatPrefixAuto_js__ = __webpack_require__(737);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__identity_js__ = __webpack_require__(1296);
 
 
 
 
 
 
 
 
 
var map = Array.prototype.map,
    prefixes = ["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];
 
/* harmony default export */ __webpack_exports__["a"] = (function(locale) {
  var group = locale.grouping === undefined || locale.thousands === undefined ? __WEBPACK_IMPORTED_MODULE_7__identity_js__["a" /* default */] : Object(__WEBPACK_IMPORTED_MODULE_1__formatGroup_js__["a" /* default */])(map.call(locale.grouping, Number), locale.thousands + ""),
      currencyPrefix = locale.currency === undefined ? "" : locale.currency[0] + "",
      currencySuffix = locale.currency === undefined ? "" : locale.currency[1] + "",
      decimal = locale.decimal === undefined ? "." : locale.decimal + "",
      numerals = locale.numerals === undefined ? __WEBPACK_IMPORTED_MODULE_7__identity_js__["a" /* default */] : Object(__WEBPACK_IMPORTED_MODULE_2__formatNumerals_js__["a" /* default */])(map.call(locale.numerals, String)),
      percent = locale.percent === undefined ? "%" : locale.percent + "",
      minus = locale.minus === undefined ? "-" : locale.minus + "",
      nan = locale.nan === undefined ? "NaN" : locale.nan + "";
 
  function newFormat(specifier) {
    specifier = Object(__WEBPACK_IMPORTED_MODULE_3__formatSpecifier_js__["b" /* default */])(specifier);
 
    var fill = specifier.fill,
        align = specifier.align,
        sign = specifier.sign,
        symbol = specifier.symbol,
        zero = specifier.zero,
        width = specifier.width,
        comma = specifier.comma,
        precision = specifier.precision,
        trim = specifier.trim,
        type = specifier.type;
 
    // The "n" type is an alias for ",g".
    if (type === "n") comma = true, type = "g";
 
    // The "" type, and any invalid type, is an alias for ".12~g".
    else if (!__WEBPACK_IMPORTED_MODULE_5__formatTypes_js__["a" /* default */][type]) precision === undefined && (precision = 12), trim = true, type = "g";
 
    // If zero fill is specified, padding goes after sign and before digits.
    if (zero || (fill === "0" && align === "=")) zero = true, fill = "0", align = "=";
 
    // Compute the prefix and suffix.
    // For SI-prefix, the suffix is lazily computed.
    var prefix = symbol === "$" ? currencyPrefix : symbol === "#" && /[boxX]/.test(type) ? "0" + type.toLowerCase() : "",
        suffix = symbol === "$" ? currencySuffix : /[%p]/.test(type) ? percent : "";
 
    // What format function should we use?
    // Is this an integer type?
    // Can this type generate exponential notation?
    var formatType = __WEBPACK_IMPORTED_MODULE_5__formatTypes_js__["a" /* default */][type],
        maybeSuffix = /[defgprs%]/.test(type);
 
    // Set the default precision if not specified,
    // or clamp the specified precision to the supported range.
    // For significant precision, it must be in [1, 21].
    // For fixed precision, it must be in [0, 20].
    precision = precision === undefined ? 6
        : /[gprs]/.test(type) ? Math.max(1, Math.min(21, precision))
        : Math.max(0, Math.min(20, precision));
 
    function format(value) {
      var valuePrefix = prefix,
          valueSuffix = suffix,
          i, n, c;
 
      if (type === "c") {
        valueSuffix = formatType(value) + valueSuffix;
        value = "";
      } else {
        value = +value;
 
        // Determine the sign. -0 is not less than 0, but 1 / -0 is!
        var valueNegative = value < 0 || 1 / value < 0;
 
        // Perform the initial formatting.
        value = isNaN(value) ? nan : formatType(Math.abs(value), precision);
 
        // Trim insignificant zeros.
        if (trim) value = Object(__WEBPACK_IMPORTED_MODULE_4__formatTrim_js__["a" /* default */])(value);
 
        // If a negative value rounds to zero after formatting, and no explicit positive sign is requested, hide the sign.
        if (valueNegative && +value === 0 && sign !== "+") valueNegative = false;
 
        // Compute the prefix and suffix.
        valuePrefix = (valueNegative ? (sign === "(" ? sign : minus) : sign === "-" || sign === "(" ? "" : sign) + valuePrefix;
        valueSuffix = (type === "s" ? prefixes[8 + __WEBPACK_IMPORTED_MODULE_6__formatPrefixAuto_js__["b" /* prefixExponent */] / 3] : "") + valueSuffix + (valueNegative && sign === "(" ? ")" : "");
 
        // Break the formatted value into the integer “value” part that can be
        // grouped, and fractional or exponential “suffix” part that is not.
        if (maybeSuffix) {
          i = -1, n = value.length;
          while (++i < n) {
            if (c = value.charCodeAt(i), 48 > c || c > 57) {
              valueSuffix = (c === 46 ? decimal + value.slice(i + 1) : value.slice(i)) + valueSuffix;
              value = value.slice(0, i);
              break;
            }
          }
        }
      }
 
      // If the fill character is not "0", grouping is applied before padding.
      if (comma && !zero) value = group(value, Infinity);
 
      // Compute the padding.
      var length = valuePrefix.length + value.length + valueSuffix.length,
          padding = length < width ? new Array(width - length + 1).join(fill) : "";
 
      // If the fill character is "0", grouping is applied after padding.
      if (comma && zero) value = group(padding + value, padding.length ? width - valueSuffix.length : Infinity), padding = "";
 
      // Reconstruct the final output based on the desired alignment.
      switch (align) {
        case "<": value = valuePrefix + value + valueSuffix + padding; break;
        case "=": value = valuePrefix + padding + value + valueSuffix; break;
        case "^": value = padding.slice(0, length = padding.length >> 1) + valuePrefix + value + valueSuffix + padding.slice(length); break;
        default: value = padding + valuePrefix + value + valueSuffix; break;
      }
 
      return numerals(value);
    }
 
    format.toString = function() {
      return specifier + "";
    };
 
    return format;
  }
 
  function formatPrefix(specifier, value) {
    var f = newFormat((specifier = Object(__WEBPACK_IMPORTED_MODULE_3__formatSpecifier_js__["b" /* default */])(specifier), specifier.type = "f", specifier)),
        e = Math.max(-8, Math.min(8, Math.floor(Object(__WEBPACK_IMPORTED_MODULE_0__exponent_js__["a" /* default */])(value) / 3))) * 3,
        k = Math.pow(10, -e),
        prefix = prefixes[8 + e / 3];
    return function(value) {
      return f(k * value) + prefix;
    };
  }
 
  return {
    format: newFormat,
    formatPrefix: formatPrefix
  };
});
 
 
/***/ }),
/* 736 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["b"] = formatSpecifier;
/* harmony export (immutable) */ __webpack_exports__["a"] = FormatSpecifier;
// [[fill]align][sign][symbol][0][width][,][.precision][~][type]
var re = /^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;
 
function formatSpecifier(specifier) {
  if (!(match = re.exec(specifier))) throw new Error("invalid format: " + specifier);
  var match;
  return new FormatSpecifier({
    fill: match[1],
    align: match[2],
    sign: match[3],
    symbol: match[4],
    zero: match[5],
    width: match[6],
    comma: match[7],
    precision: match[8] && match[8].slice(1),
    trim: match[9],
    type: match[10]
  });
}
 
formatSpecifier.prototype = FormatSpecifier.prototype; // instanceof
 
function FormatSpecifier(specifier) {
  this.fill = specifier.fill === undefined ? " " : specifier.fill + "";
  this.align = specifier.align === undefined ? ">" : specifier.align + "";
  this.sign = specifier.sign === undefined ? "-" : specifier.sign + "";
  this.symbol = specifier.symbol === undefined ? "" : specifier.symbol + "";
  this.zero = !!specifier.zero;
  this.width = specifier.width === undefined ? undefined : +specifier.width;
  this.comma = !!specifier.comma;
  this.precision = specifier.precision === undefined ? undefined : +specifier.precision;
  this.trim = !!specifier.trim;
  this.type = specifier.type === undefined ? "" : specifier.type + "";
}
 
FormatSpecifier.prototype.toString = function() {
  return this.fill
      + this.align
      + this.sign
      + this.symbol
      + (this.zero ? "0" : "")
      + (this.width === undefined ? "" : Math.max(1, this.width | 0))
      + (this.comma ? "," : "")
      + (this.precision === undefined ? "" : "." + Math.max(0, this.precision | 0))
      + (this.trim ? "~" : "")
      + this.type;
};
 
 
/***/ }),
/* 737 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return prefixExponent; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__formatDecimal_js__ = __webpack_require__(251);
 
 
var prefixExponent;
 
/* harmony default export */ __webpack_exports__["a"] = (function(x, p) {
  var d = Object(__WEBPACK_IMPORTED_MODULE_0__formatDecimal_js__["b" /* formatDecimalParts */])(x, p);
  if (!d) return x + "";
  var coefficient = d[0],
      exponent = d[1],
      i = exponent - (prefixExponent = Math.max(-8, Math.min(8, Math.floor(exponent / 3))) * 3) + 1,
      n = coefficient.length;
  return i === n ? coefficient
      : i > n ? coefficient + new Array(i - n + 1).join("0")
      : i > 0 ? coefficient.slice(0, i) + "." + coefficient.slice(i)
      : "0." + new Array(1 - i).join("0") + Object(__WEBPACK_IMPORTED_MODULE_0__formatDecimal_js__["b" /* formatDecimalParts */])(x, Math.max(0, p + i - 1))[0]; // less than 1y!
});
 
 
/***/ }),
/* 738 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return areaRingSum; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return areaStream; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__adder_js__ = __webpack_require__(152);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__math_js__ = __webpack_require__(19);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__noop_js__ = __webpack_require__(102);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__stream_js__ = __webpack_require__(121);
 
 
 
 
 
var areaRingSum = Object(__WEBPACK_IMPORTED_MODULE_0__adder_js__["a" /* default */])();
 
var areaSum = Object(__WEBPACK_IMPORTED_MODULE_0__adder_js__["a" /* default */])(),
    lambda00,
    phi00,
    lambda0,
    cosPhi0,
    sinPhi0;
 
var areaStream = {
  point: __WEBPACK_IMPORTED_MODULE_2__noop_js__["a" /* default */],
  lineStart: __WEBPACK_IMPORTED_MODULE_2__noop_js__["a" /* default */],
  lineEnd: __WEBPACK_IMPORTED_MODULE_2__noop_js__["a" /* default */],
  polygonStart: function() {
    areaRingSum.reset();
    areaStream.lineStart = areaRingStart;
    areaStream.lineEnd = areaRingEnd;
  },
  polygonEnd: function() {
    var areaRing = +areaRingSum;
    areaSum.add(areaRing < 0 ? __WEBPACK_IMPORTED_MODULE_1__math_js__["w" /* tau */] + areaRing : areaRing);
    this.lineStart = this.lineEnd = this.point = __WEBPACK_IMPORTED_MODULE_2__noop_js__["a" /* default */];
  },
  sphere: function() {
    areaSum.add(__WEBPACK_IMPORTED_MODULE_1__math_js__["w" /* tau */]);
  }
};
 
function areaRingStart() {
  areaStream.point = areaPointFirst;
}
 
function areaRingEnd() {
  areaPoint(lambda00, phi00);
}
 
function areaPointFirst(lambda, phi) {
  areaStream.point = areaPoint;
  lambda00 = lambda, phi00 = phi;
  lambda *= __WEBPACK_IMPORTED_MODULE_1__math_js__["r" /* radians */], phi *= __WEBPACK_IMPORTED_MODULE_1__math_js__["r" /* radians */];
  lambda0 = lambda, cosPhi0 = Object(__WEBPACK_IMPORTED_MODULE_1__math_js__["g" /* cos */])(phi = phi / 2 + __WEBPACK_IMPORTED_MODULE_1__math_js__["q" /* quarterPi */]), sinPhi0 = Object(__WEBPACK_IMPORTED_MODULE_1__math_js__["t" /* sin */])(phi);
}
 
function areaPoint(lambda, phi) {
  lambda *= __WEBPACK_IMPORTED_MODULE_1__math_js__["r" /* radians */], phi *= __WEBPACK_IMPORTED_MODULE_1__math_js__["r" /* radians */];
  phi = phi / 2 + __WEBPACK_IMPORTED_MODULE_1__math_js__["q" /* quarterPi */]; // half the angular distance from south pole
 
  // Spherical excess E for a spherical triangle with vertices: south pole,
  // previous point, current point.  Uses a formula derived from Cagnoli’s
  // theorem.  See Todhunter, Spherical Trig. (1871), Sec. 103, Eq. (2).
  var dLambda = lambda - lambda0,
      sdLambda = dLambda >= 0 ? 1 : -1,
      adLambda = sdLambda * dLambda,
      cosPhi = Object(__WEBPACK_IMPORTED_MODULE_1__math_js__["g" /* cos */])(phi),
      sinPhi = Object(__WEBPACK_IMPORTED_MODULE_1__math_js__["t" /* sin */])(phi),
      k = sinPhi0 * sinPhi,
      u = cosPhi0 * cosPhi + k * Object(__WEBPACK_IMPORTED_MODULE_1__math_js__["g" /* cos */])(adLambda),
      v = k * sdLambda * Object(__WEBPACK_IMPORTED_MODULE_1__math_js__["t" /* sin */])(adLambda);
  areaRingSum.add(Object(__WEBPACK_IMPORTED_MODULE_1__math_js__["e" /* atan2 */])(v, u));
 
  // Advance the previous points.
  lambda0 = lambda, cosPhi0 = cosPhi, sinPhi0 = sinPhi;
}
 
/* harmony default export */ __webpack_exports__["c"] = (function(object) {
  areaSum.reset();
  Object(__WEBPACK_IMPORTED_MODULE_3__stream_js__["a" /* default */])(object, areaStream);
  return areaSum * 2;
});
 
 
/***/ }),
/* 739 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = circleStream;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__cartesian_js__ = __webpack_require__(188);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__constant_js__ = __webpack_require__(1303);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__math_js__ = __webpack_require__(19);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__rotation_js__ = __webpack_require__(252);
 
 
 
 
 
// Generates a circle centered at [0°, 0°], with a given radius and precision.
function circleStream(stream, radius, delta, direction, t0, t1) {
  if (!delta) return;
  var cosRadius = Object(__WEBPACK_IMPORTED_MODULE_2__math_js__["g" /* cos */])(radius),
      sinRadius = Object(__WEBPACK_IMPORTED_MODULE_2__math_js__["t" /* sin */])(radius),
      step = direction * delta;
  if (t0 == null) {
    t0 = radius + direction * __WEBPACK_IMPORTED_MODULE_2__math_js__["w" /* tau */];
    t1 = radius - step / 2;
  } else {
    t0 = circleRadius(cosRadius, t0);
    t1 = circleRadius(cosRadius, t1);
    if (direction > 0 ? t0 < t1 : t0 > t1) t0 += direction * __WEBPACK_IMPORTED_MODULE_2__math_js__["w" /* tau */];
  }
  for (var point, t = t0; direction > 0 ? t > t1 : t < t1; t -= step) {
    point = Object(__WEBPACK_IMPORTED_MODULE_0__cartesian_js__["g" /* spherical */])([cosRadius, -sinRadius * Object(__WEBPACK_IMPORTED_MODULE_2__math_js__["g" /* cos */])(t), -sinRadius * Object(__WEBPACK_IMPORTED_MODULE_2__math_js__["t" /* sin */])(t)]);
    stream.point(point[0], point[1]);
  }
}
 
// Returns the signed angle of a cartesian point relative to [cosRadius, 0, 0].
function circleRadius(cosRadius, point) {
  point = Object(__WEBPACK_IMPORTED_MODULE_0__cartesian_js__["a" /* cartesian */])(point), point[0] -= cosRadius;
  Object(__WEBPACK_IMPORTED_MODULE_0__cartesian_js__["e" /* cartesianNormalizeInPlace */])(point);
  var radius = Object(__WEBPACK_IMPORTED_MODULE_2__math_js__["b" /* acos */])(-point[1]);
  return ((-point[2] < 0 ? -radius : radius) + __WEBPACK_IMPORTED_MODULE_2__math_js__["w" /* tau */] - __WEBPACK_IMPORTED_MODULE_2__math_js__["i" /* epsilon */]) % __WEBPACK_IMPORTED_MODULE_2__math_js__["w" /* tau */];
}
 
/* harmony default export */ __webpack_exports__["b"] = (function() {
  var center = Object(__WEBPACK_IMPORTED_MODULE_1__constant_js__["a" /* default */])([0, 0]),
      radius = Object(__WEBPACK_IMPORTED_MODULE_1__constant_js__["a" /* default */])(90),
      precision = Object(__WEBPACK_IMPORTED_MODULE_1__constant_js__["a" /* default */])(6),
      ring,
      rotate,
      stream = {point: point};
 
  function point(x, y) {
    ring.push(x = rotate(x, y));
    x[0] *= __WEBPACK_IMPORTED_MODULE_2__math_js__["h" /* degrees */], x[1] *= __WEBPACK_IMPORTED_MODULE_2__math_js__["h" /* degrees */];
  }
 
  function circle() {
    var c = center.apply(this, arguments),
        r = radius.apply(this, arguments) * __WEBPACK_IMPORTED_MODULE_2__math_js__["r" /* radians */],
        p = precision.apply(this, arguments) * __WEBPACK_IMPORTED_MODULE_2__math_js__["r" /* radians */];
    ring = [];
    rotate = Object(__WEBPACK_IMPORTED_MODULE_3__rotation_js__["b" /* rotateRadians */])(-c[0] * __WEBPACK_IMPORTED_MODULE_2__math_js__["r" /* radians */], -c[1] * __WEBPACK_IMPORTED_MODULE_2__math_js__["r" /* radians */], 0).invert;
    circleStream(stream, r, p, 1);
    c = {type: "Polygon", coordinates: [ring]};
    ring = rotate = null;
    return c;
  }
 
  circle.center = function(_) {
    return arguments.length ? (center = typeof _ === "function" ? _ : Object(__WEBPACK_IMPORTED_MODULE_1__constant_js__["a" /* default */])([+_[0], +_[1]]), circle) : center;
  };
 
  circle.radius = function(_) {
    return arguments.length ? (radius = typeof _ === "function" ? _ : Object(__WEBPACK_IMPORTED_MODULE_1__constant_js__["a" /* default */])(+_), circle) : radius;
  };
 
  circle.precision = function(_) {
    return arguments.length ? (precision = typeof _ === "function" ? _ : Object(__WEBPACK_IMPORTED_MODULE_1__constant_js__["a" /* default */])(+_), circle) : precision;
  };
 
  return circle;
});
 
 
/***/ }),
/* 740 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony default export */ __webpack_exports__["a"] = (function(a, b) {
 
  function compose(x, y) {
    return x = a(x, y), b(x[0], x[1]);
  }
 
  if (a.invert && b.invert) compose.invert = function(x, y) {
    return x = b.invert(x, y), x && a.invert(x[0], x[1]);
  };
 
  return compose;
});
 
 
/***/ }),
/* 741 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__index_js__ = __webpack_require__(742);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__math_js__ = __webpack_require__(19);
 
 
 
/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__index_js__["a" /* default */])(
  function() { return true; },
  clipAntimeridianLine,
  clipAntimeridianInterpolate,
  [-__WEBPACK_IMPORTED_MODULE_1__math_js__["o" /* pi */], -__WEBPACK_IMPORTED_MODULE_1__math_js__["l" /* halfPi */]]
));
 
// Takes a line and cuts into visible segments. Return values: 0 - there were
// intersections or the line was empty; 1 - no intersections; 2 - there were
// intersections, and the first and last segments should be rejoined.
function clipAntimeridianLine(stream) {
  var lambda0 = NaN,
      phi0 = NaN,
      sign0 = NaN,
      clean; // no intersections
 
  return {
    lineStart: function() {
      stream.lineStart();
      clean = 1;
    },
    point: function(lambda1, phi1) {
      var sign1 = lambda1 > 0 ? __WEBPACK_IMPORTED_MODULE_1__math_js__["o" /* pi */] : -__WEBPACK_IMPORTED_MODULE_1__math_js__["o" /* pi */],
          delta = Object(__WEBPACK_IMPORTED_MODULE_1__math_js__["a" /* abs */])(lambda1 - lambda0);
      if (Object(__WEBPACK_IMPORTED_MODULE_1__math_js__["a" /* abs */])(delta - __WEBPACK_IMPORTED_MODULE_1__math_js__["o" /* pi */]) < __WEBPACK_IMPORTED_MODULE_1__math_js__["i" /* epsilon */]) { // line crosses a pole
        stream.point(lambda0, phi0 = (phi0 + phi1) / 2 > 0 ? __WEBPACK_IMPORTED_MODULE_1__math_js__["l" /* halfPi */] : -__WEBPACK_IMPORTED_MODULE_1__math_js__["l" /* halfPi */]);
        stream.point(sign0, phi0);
        stream.lineEnd();
        stream.lineStart();
        stream.point(sign1, phi0);
        stream.point(lambda1, phi0);
        clean = 0;
      } else if (sign0 !== sign1 && delta >= __WEBPACK_IMPORTED_MODULE_1__math_js__["o" /* pi */]) { // line crosses antimeridian
        if (Object(__WEBPACK_IMPORTED_MODULE_1__math_js__["a" /* abs */])(lambda0 - sign0) < __WEBPACK_IMPORTED_MODULE_1__math_js__["i" /* epsilon */]) lambda0 -= sign0 * __WEBPACK_IMPORTED_MODULE_1__math_js__["i" /* epsilon */]; // handle degeneracies
        if (Object(__WEBPACK_IMPORTED_MODULE_1__math_js__["a" /* abs */])(lambda1 - sign1) < __WEBPACK_IMPORTED_MODULE_1__math_js__["i" /* epsilon */]) lambda1 -= sign1 * __WEBPACK_IMPORTED_MODULE_1__math_js__["i" /* epsilon */];
        phi0 = clipAntimeridianIntersect(lambda0, phi0, lambda1, phi1);
        stream.point(sign0, phi0);
        stream.lineEnd();
        stream.lineStart();
        stream.point(sign1, phi0);
        clean = 0;
      }
      stream.point(lambda0 = lambda1, phi0 = phi1);
      sign0 = sign1;
    },
    lineEnd: function() {
      stream.lineEnd();
      lambda0 = phi0 = NaN;
    },
    clean: function() {
      return 2 - clean; // if intersections, rejoin first and last segments
    }
  };
}
 
function clipAntimeridianIntersect(lambda0, phi0, lambda1, phi1) {
  var cosPhi0,
      cosPhi1,
      sinLambda0Lambda1 = Object(__WEBPACK_IMPORTED_MODULE_1__math_js__["t" /* sin */])(lambda0 - lambda1);
  return Object(__WEBPACK_IMPORTED_MODULE_1__math_js__["a" /* abs */])(sinLambda0Lambda1) > __WEBPACK_IMPORTED_MODULE_1__math_js__["i" /* epsilon */]
      ? Object(__WEBPACK_IMPORTED_MODULE_1__math_js__["d" /* atan */])((Object(__WEBPACK_IMPORTED_MODULE_1__math_js__["t" /* sin */])(phi0) * (cosPhi1 = Object(__WEBPACK_IMPORTED_MODULE_1__math_js__["g" /* cos */])(phi1)) * Object(__WEBPACK_IMPORTED_MODULE_1__math_js__["t" /* sin */])(lambda1)
          - Object(__WEBPACK_IMPORTED_MODULE_1__math_js__["t" /* sin */])(phi1) * (cosPhi0 = Object(__WEBPACK_IMPORTED_MODULE_1__math_js__["g" /* cos */])(phi0)) * Object(__WEBPACK_IMPORTED_MODULE_1__math_js__["t" /* sin */])(lambda0))
          / (cosPhi0 * cosPhi1 * sinLambda0Lambda1))
      : (phi0 + phi1) / 2;
}
 
function clipAntimeridianInterpolate(from, to, direction, stream) {
  var phi;
  if (from == null) {
    phi = direction * __WEBPACK_IMPORTED_MODULE_1__math_js__["l" /* halfPi */];
    stream.point(-__WEBPACK_IMPORTED_MODULE_1__math_js__["o" /* pi */], phi);
    stream.point(0, phi);
    stream.point(__WEBPACK_IMPORTED_MODULE_1__math_js__["o" /* pi */], phi);
    stream.point(__WEBPACK_IMPORTED_MODULE_1__math_js__["o" /* pi */], 0);
    stream.point(__WEBPACK_IMPORTED_MODULE_1__math_js__["o" /* pi */], -phi);
    stream.point(0, -phi);
    stream.point(-__WEBPACK_IMPORTED_MODULE_1__math_js__["o" /* pi */], -phi);
    stream.point(-__WEBPACK_IMPORTED_MODULE_1__math_js__["o" /* pi */], 0);
    stream.point(-__WEBPACK_IMPORTED_MODULE_1__math_js__["o" /* pi */], phi);
  } else if (Object(__WEBPACK_IMPORTED_MODULE_1__math_js__["a" /* abs */])(from[0] - to[0]) > __WEBPACK_IMPORTED_MODULE_1__math_js__["i" /* epsilon */]) {
    var lambda = from[0] < to[0] ? __WEBPACK_IMPORTED_MODULE_1__math_js__["o" /* pi */] : -__WEBPACK_IMPORTED_MODULE_1__math_js__["o" /* pi */];
    phi = direction * lambda / 2;
    stream.point(-lambda, phi);
    stream.point(0, phi);
    stream.point(lambda, phi);
  } else {
    stream.point(to[0], to[1]);
  }
}
 
 
/***/ }),
/* 742 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__buffer_js__ = __webpack_require__(743);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__rejoin_js__ = __webpack_require__(744);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__math_js__ = __webpack_require__(19);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__polygonContains_js__ = __webpack_require__(746);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_d3_array__ = __webpack_require__(44);
 
 
 
 
 
 
/* harmony default export */ __webpack_exports__["a"] = (function(pointVisible, clipLine, interpolate, start) {
  return function(sink) {
    var line = clipLine(sink),
        ringBuffer = Object(__WEBPACK_IMPORTED_MODULE_0__buffer_js__["a" /* default */])(),
        ringSink = clipLine(ringBuffer),
        polygonStarted = false,
        polygon,
        segments,
        ring;
 
    var clip = {
      point: point,
      lineStart: lineStart,
      lineEnd: lineEnd,
      polygonStart: function() {
        clip.point = pointRing;
        clip.lineStart = ringStart;
        clip.lineEnd = ringEnd;
        segments = [];
        polygon = [];
      },
      polygonEnd: function() {
        clip.point = point;
        clip.lineStart = lineStart;
        clip.lineEnd = lineEnd;
        segments = Object(__WEBPACK_IMPORTED_MODULE_4_d3_array__["n" /* merge */])(segments);
        var startInside = Object(__WEBPACK_IMPORTED_MODULE_3__polygonContains_js__["a" /* default */])(polygon, start);
        if (segments.length) {
          if (!polygonStarted) sink.polygonStart(), polygonStarted = true;
          Object(__WEBPACK_IMPORTED_MODULE_1__rejoin_js__["a" /* default */])(segments, compareIntersection, startInside, interpolate, sink);
        } else if (startInside) {
          if (!polygonStarted) sink.polygonStart(), polygonStarted = true;
          sink.lineStart();
          interpolate(null, null, 1, sink);
          sink.lineEnd();
        }
        if (polygonStarted) sink.polygonEnd(), polygonStarted = false;
        segments = polygon = null;
      },
      sphere: function() {
        sink.polygonStart();
        sink.lineStart();
        interpolate(null, null, 1, sink);
        sink.lineEnd();
        sink.polygonEnd();
      }
    };
 
    function point(lambda, phi) {
      if (pointVisible(lambda, phi)) sink.point(lambda, phi);
    }
 
    function pointLine(lambda, phi) {
      line.point(lambda, phi);
    }
 
    function lineStart() {
      clip.point = pointLine;
      line.lineStart();
    }
 
    function lineEnd() {
      clip.point = point;
      line.lineEnd();
    }
 
    function pointRing(lambda, phi) {
      ring.push([lambda, phi]);
      ringSink.point(lambda, phi);
    }
 
    function ringStart() {
      ringSink.lineStart();
      ring = [];
    }
 
    function ringEnd() {
      pointRing(ring[0][0], ring[0][1]);
      ringSink.lineEnd();
 
      var clean = ringSink.clean(),
          ringSegments = ringBuffer.result(),
          i, n = ringSegments.length, m,
          segment,
          point;
 
      ring.pop();
      polygon.push(ring);
      ring = null;
 
      if (!n) return;
 
      // No intersections.
      if (clean & 1) {
        segment = ringSegments[0];
        if ((m = segment.length - 1) > 0) {
          if (!polygonStarted) sink.polygonStart(), polygonStarted = true;
          sink.lineStart();
          for (i = 0; i < m; ++i) sink.point((point = segment[i])[0], point[1]);
          sink.lineEnd();
        }
        return;
      }
 
      // Rejoin connected segments.
      // TODO reuse ringBuffer.rejoin()?
      if (n > 1 && clean & 2) ringSegments.push(ringSegments.pop().concat(ringSegments.shift()));
 
      segments.push(ringSegments.filter(validSegment));
    }
 
    return clip;
  };
});
 
function validSegment(segment) {
  return segment.length > 1;
}
 
// Intersections are sorted along the clip edge. For both antimeridian cutting
// and circle clipping, the same comparison is used.
function compareIntersection(a, b) {
  return ((a = a.x)[0] < 0 ? a[1] - __WEBPACK_IMPORTED_MODULE_2__math_js__["l" /* halfPi */] - __WEBPACK_IMPORTED_MODULE_2__math_js__["i" /* epsilon */] : __WEBPACK_IMPORTED_MODULE_2__math_js__["l" /* halfPi */] - a[1])
       - ((b = b.x)[0] < 0 ? b[1] - __WEBPACK_IMPORTED_MODULE_2__math_js__["l" /* halfPi */] - __WEBPACK_IMPORTED_MODULE_2__math_js__["i" /* epsilon */] : __WEBPACK_IMPORTED_MODULE_2__math_js__["l" /* halfPi */] - b[1]);
}
 
 
/***/ }),
/* 743 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__noop_js__ = __webpack_require__(102);
 
 
/* harmony default export */ __webpack_exports__["a"] = (function() {
  var lines = [],
      line;
  return {
    point: function(x, y, m) {
      line.push([x, y, m]);
    },
    lineStart: function() {
      lines.push(line = []);
    },
    lineEnd: __WEBPACK_IMPORTED_MODULE_0__noop_js__["a" /* default */],
    rejoin: function() {
      if (lines.length > 1) lines.push(lines.pop().concat(lines.shift()));
    },
    result: function() {
      var result = lines;
      lines = [];
      line = null;
      return result;
    }
  };
});
 
 
/***/ }),
/* 744 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__pointEqual_js__ = __webpack_require__(745);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__math_js__ = __webpack_require__(19);
 
 
 
function Intersection(point, points, other, entry) {
  this.x = point;
  this.z = points;
  this.o = other; // another intersection
  this.e = entry; // is an entry?
  this.v = false; // visited
  this.n = this.p = null; // next & previous
}
 
// A generalized polygon clipping algorithm: given a polygon that has been cut
// into its visible line segments, and rejoins the segments by interpolating
// along the clip edge.
/* harmony default export */ __webpack_exports__["a"] = (function(segments, compareIntersection, startInside, interpolate, stream) {
  var subject = [],
      clip = [],
      i,
      n;
 
  segments.forEach(function(segment) {
    if ((n = segment.length - 1) <= 0) return;
    var n, p0 = segment[0], p1 = segment[n], x;
 
    if (Object(__WEBPACK_IMPORTED_MODULE_0__pointEqual_js__["a" /* default */])(p0, p1)) {
      if (!p0[2] && !p1[2]) {
        stream.lineStart();
        for (i = 0; i < n; ++i) stream.point((p0 = segment[i])[0], p0[1]);
        stream.lineEnd();
        return;
      }
      // handle degenerate cases by moving the point
      p1[0] += 2 * __WEBPACK_IMPORTED_MODULE_1__math_js__["i" /* epsilon */];
    }
 
    subject.push(x = new Intersection(p0, segment, null, true));
    clip.push(x.o = new Intersection(p0, null, x, false));
    subject.push(x = new Intersection(p1, segment, null, false));
    clip.push(x.o = new Intersection(p1, null, x, true));
  });
 
  if (!subject.length) return;
 
  clip.sort(compareIntersection);
  link(subject);
  link(clip);
 
  for (i = 0, n = clip.length; i < n; ++i) {
    clip[i].e = startInside = !startInside;
  }
 
  var start = subject[0],
      points,
      point;
 
  while (1) {
    // Find first unvisited intersection.
    var current = start,
        isSubject = true;
    while (current.v) if ((current = current.n) === start) return;
    points = current.z;
    stream.lineStart();
    do {
      current.v = current.o.v = true;
      if (current.e) {
        if (isSubject) {
          for (i = 0, n = points.length; i < n; ++i) stream.point((point = points[i])[0], point[1]);
        } else {
          interpolate(current.x, current.n.x, 1, stream);
        }
        current = current.n;
      } else {
        if (isSubject) {
          points = current.p.z;
          for (i = points.length - 1; i >= 0; --i) stream.point((point = points[i])[0], point[1]);
        } else {
          interpolate(current.x, current.p.x, -1, stream);
        }
        current = current.p;
      }
      current = current.o;
      points = current.z;
      isSubject = !isSubject;
    } while (!current.v);
    stream.lineEnd();
  }
});
 
function link(array) {
  if (!(n = array.length)) return;
  var n,
      i = 0,
      a = array[0],
      b;
  while (++i < n) {
    a.n = b = array[i];
    b.p = a;
    a = b;
  }
  a.n = b = array[0];
  b.p = a;
}
 
 
/***/ }),
/* 745 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__math_js__ = __webpack_require__(19);
 
 
/* harmony default export */ __webpack_exports__["a"] = (function(a, b) {
  return Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["a" /* abs */])(a[0] - b[0]) < __WEBPACK_IMPORTED_MODULE_0__math_js__["i" /* epsilon */] && Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["a" /* abs */])(a[1] - b[1]) < __WEBPACK_IMPORTED_MODULE_0__math_js__["i" /* epsilon */];
});
 
 
/***/ }),
/* 746 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__adder_js__ = __webpack_require__(152);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__cartesian_js__ = __webpack_require__(188);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__math_js__ = __webpack_require__(19);
 
 
 
 
var sum = Object(__WEBPACK_IMPORTED_MODULE_0__adder_js__["a" /* default */])();
 
function longitude(point) {
  if (Object(__WEBPACK_IMPORTED_MODULE_2__math_js__["a" /* abs */])(point[0]) <= __WEBPACK_IMPORTED_MODULE_2__math_js__["o" /* pi */])
    return point[0];
  else
    return Object(__WEBPACK_IMPORTED_MODULE_2__math_js__["s" /* sign */])(point[0]) * ((Object(__WEBPACK_IMPORTED_MODULE_2__math_js__["a" /* abs */])(point[0]) + __WEBPACK_IMPORTED_MODULE_2__math_js__["o" /* pi */]) % __WEBPACK_IMPORTED_MODULE_2__math_js__["w" /* tau */] - __WEBPACK_IMPORTED_MODULE_2__math_js__["o" /* pi */]);
}
 
/* harmony default export */ __webpack_exports__["a"] = (function(polygon, point) {
  var lambda = longitude(point),
      phi = point[1],
      sinPhi = Object(__WEBPACK_IMPORTED_MODULE_2__math_js__["t" /* sin */])(phi),
      normal = [Object(__WEBPACK_IMPORTED_MODULE_2__math_js__["t" /* sin */])(lambda), -Object(__WEBPACK_IMPORTED_MODULE_2__math_js__["g" /* cos */])(lambda), 0],
      angle = 0,
      winding = 0;
 
  sum.reset();
 
  if (sinPhi === 1) phi = __WEBPACK_IMPORTED_MODULE_2__math_js__["l" /* halfPi */] + __WEBPACK_IMPORTED_MODULE_2__math_js__["i" /* epsilon */];
  else if (sinPhi === -1) phi = -__WEBPACK_IMPORTED_MODULE_2__math_js__["l" /* halfPi */] - __WEBPACK_IMPORTED_MODULE_2__math_js__["i" /* epsilon */];
 
  for (var i = 0, n = polygon.length; i < n; ++i) {
    if (!(m = (ring = polygon[i]).length)) continue;
    var ring,
        m,
        point0 = ring[m - 1],
        lambda0 = longitude(point0),
        phi0 = point0[1] / 2 + __WEBPACK_IMPORTED_MODULE_2__math_js__["q" /* quarterPi */],
        sinPhi0 = Object(__WEBPACK_IMPORTED_MODULE_2__math_js__["t" /* sin */])(phi0),
        cosPhi0 = Object(__WEBPACK_IMPORTED_MODULE_2__math_js__["g" /* cos */])(phi0);
 
    for (var j = 0; j < m; ++j, lambda0 = lambda1, sinPhi0 = sinPhi1, cosPhi0 = cosPhi1, point0 = point1) {
      var point1 = ring[j],
          lambda1 = longitude(point1),
          phi1 = point1[1] / 2 + __WEBPACK_IMPORTED_MODULE_2__math_js__["q" /* quarterPi */],
          sinPhi1 = Object(__WEBPACK_IMPORTED_MODULE_2__math_js__["t" /* sin */])(phi1),
          cosPhi1 = Object(__WEBPACK_IMPORTED_MODULE_2__math_js__["g" /* cos */])(phi1),
          delta = lambda1 - lambda0,
          sign = delta >= 0 ? 1 : -1,
          absDelta = sign * delta,
          antimeridian = absDelta > __WEBPACK_IMPORTED_MODULE_2__math_js__["o" /* pi */],
          k = sinPhi0 * sinPhi1;
 
      sum.add(Object(__WEBPACK_IMPORTED_MODULE_2__math_js__["e" /* atan2 */])(k * sign * Object(__WEBPACK_IMPORTED_MODULE_2__math_js__["t" /* sin */])(absDelta), cosPhi0 * cosPhi1 + k * Object(__WEBPACK_IMPORTED_MODULE_2__math_js__["g" /* cos */])(absDelta)));
      angle += antimeridian ? delta + sign * __WEBPACK_IMPORTED_MODULE_2__math_js__["w" /* tau */] : delta;
 
      // Are the longitudes either side of the point’s meridian (lambda),
      // and are the latitudes smaller than the parallel (phi)?
      if (antimeridian ^ lambda0 >= lambda ^ lambda1 >= lambda) {
        var arc = Object(__WEBPACK_IMPORTED_MODULE_1__cartesian_js__["c" /* cartesianCross */])(Object(__WEBPACK_IMPORTED_MODULE_1__cartesian_js__["a" /* cartesian */])(point0), Object(__WEBPACK_IMPORTED_MODULE_1__cartesian_js__["a" /* cartesian */])(point1));
        Object(__WEBPACK_IMPORTED_MODULE_1__cartesian_js__["e" /* cartesianNormalizeInPlace */])(arc);
        var intersection = Object(__WEBPACK_IMPORTED_MODULE_1__cartesian_js__["c" /* cartesianCross */])(normal, arc);
        Object(__WEBPACK_IMPORTED_MODULE_1__cartesian_js__["e" /* cartesianNormalizeInPlace */])(intersection);
        var phiArc = (antimeridian ^ delta >= 0 ? -1 : 1) * Object(__WEBPACK_IMPORTED_MODULE_2__math_js__["c" /* asin */])(intersection[2]);
        if (phi > phiArc || phi === phiArc && (arc[0] || arc[1])) {
          winding += antimeridian ^ delta >= 0 ? 1 : -1;
        }
      }
    }
  }
 
  // First, determine whether the South pole is inside or outside:
  //
  // It is inside if:
  // * the polygon winds around it in a clockwise direction.
  // * the polygon does not (cumulatively) wind around it, but has a negative
  //   (counter-clockwise) area.
  //
  // Second, count the (signed) number of times a segment crosses a lambda
  // from the point to the South pole.  If it is zero, then the point is the
  // same side as the South pole.
 
  return (angle < -__WEBPACK_IMPORTED_MODULE_2__math_js__["i" /* epsilon */] || angle < __WEBPACK_IMPORTED_MODULE_2__math_js__["i" /* epsilon */] && sum < -__WEBPACK_IMPORTED_MODULE_2__math_js__["i" /* epsilon */]) ^ (winding & 1);
});
 
 
/***/ }),
/* 747 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__cartesian_js__ = __webpack_require__(188);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__circle_js__ = __webpack_require__(739);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__math_js__ = __webpack_require__(19);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__pointEqual_js__ = __webpack_require__(745);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__index_js__ = __webpack_require__(742);
 
 
 
 
 
 
/* harmony default export */ __webpack_exports__["a"] = (function(radius) {
  var cr = Object(__WEBPACK_IMPORTED_MODULE_2__math_js__["g" /* cos */])(radius),
      delta = 6 * __WEBPACK_IMPORTED_MODULE_2__math_js__["r" /* radians */],
      smallRadius = cr > 0,
      notHemisphere = Object(__WEBPACK_IMPORTED_MODULE_2__math_js__["a" /* abs */])(cr) > __WEBPACK_IMPORTED_MODULE_2__math_js__["i" /* epsilon */]; // TODO optimise for this common case
 
  function interpolate(from, to, direction, stream) {
    Object(__WEBPACK_IMPORTED_MODULE_1__circle_js__["a" /* circleStream */])(stream, radius, delta, direction, from, to);
  }
 
  function visible(lambda, phi) {
    return Object(__WEBPACK_IMPORTED_MODULE_2__math_js__["g" /* cos */])(lambda) * Object(__WEBPACK_IMPORTED_MODULE_2__math_js__["g" /* cos */])(phi) > cr;
  }
 
  // Takes a line and cuts into visible segments. Return values used for polygon
  // clipping: 0 - there were intersections or the line was empty; 1 - no
  // intersections 2 - there were intersections, and the first and last segments
  // should be rejoined.
  function clipLine(stream) {
    var point0, // previous point
        c0, // code for previous point
        v0, // visibility of previous point
        v00, // visibility of first point
        clean; // no intersections
    return {
      lineStart: function() {
        v00 = v0 = false;
        clean = 1;
      },
      point: function(lambda, phi) {
        var point1 = [lambda, phi],
            point2,
            v = visible(lambda, phi),
            c = smallRadius
              ? v ? 0 : code(lambda, phi)
              : v ? code(lambda + (lambda < 0 ? __WEBPACK_IMPORTED_MODULE_2__math_js__["o" /* pi */] : -__WEBPACK_IMPORTED_MODULE_2__math_js__["o" /* pi */]), phi) : 0;
        if (!point0 && (v00 = v0 = v)) stream.lineStart();
        if (v !== v0) {
          point2 = intersect(point0, point1);
          if (!point2 || Object(__WEBPACK_IMPORTED_MODULE_3__pointEqual_js__["a" /* default */])(point0, point2) || Object(__WEBPACK_IMPORTED_MODULE_3__pointEqual_js__["a" /* default */])(point1, point2))
            point1[2] = 1;
        }
        if (v !== v0) {
          clean = 0;
          if (v) {
            // outside going in
            stream.lineStart();
            point2 = intersect(point1, point0);
            stream.point(point2[0], point2[1]);
          } else {
            // inside going out
            point2 = intersect(point0, point1);
            stream.point(point2[0], point2[1], 2);
            stream.lineEnd();
          }
          point0 = point2;
        } else if (notHemisphere && point0 && smallRadius ^ v) {
          var t;
          // If the codes for two points are different, or are both zero,
          // and there this segment intersects with the small circle.
          if (!(c & c0) && (t = intersect(point1, point0, true))) {
            clean = 0;
            if (smallRadius) {
              stream.lineStart();
              stream.point(t[0][0], t[0][1]);
              stream.point(t[1][0], t[1][1]);
              stream.lineEnd();
            } else {
              stream.point(t[1][0], t[1][1]);
              stream.lineEnd();
              stream.lineStart();
              stream.point(t[0][0], t[0][1], 3);
            }
          }
        }
        if (v && (!point0 || !Object(__WEBPACK_IMPORTED_MODULE_3__pointEqual_js__["a" /* default */])(point0, point1))) {
          stream.point(point1[0], point1[1]);
        }
        point0 = point1, v0 = v, c0 = c;
      },
      lineEnd: function() {
        if (v0) stream.lineEnd();
        point0 = null;
      },
      // Rejoin first and last segments if there were intersections and the first
      // and last points were visible.
      clean: function() {
        return clean | ((v00 && v0) << 1);
      }
    };
  }
 
  // Intersects the great circle between a and b with the clip circle.
  function intersect(a, b, two) {
    var pa = Object(__WEBPACK_IMPORTED_MODULE_0__cartesian_js__["a" /* cartesian */])(a),
        pb = Object(__WEBPACK_IMPORTED_MODULE_0__cartesian_js__["a" /* cartesian */])(b);
 
    // We have two planes, n1.p = d1 and n2.p = d2.
    // Find intersection line p(t) = c1 n1 + c2 n2 + t (n1 ⨯ n2).
    var n1 = [1, 0, 0], // normal
        n2 = Object(__WEBPACK_IMPORTED_MODULE_0__cartesian_js__["c" /* cartesianCross */])(pa, pb),
        n2n2 = Object(__WEBPACK_IMPORTED_MODULE_0__cartesian_js__["d" /* cartesianDot */])(n2, n2),
        n1n2 = n2[0], // cartesianDot(n1, n2),
        determinant = n2n2 - n1n2 * n1n2;
 
    // Two polar points.
    if (!determinant) return !two && a;
 
    var c1 =  cr * n2n2 / determinant,
        c2 = -cr * n1n2 / determinant,
        n1xn2 = Object(__WEBPACK_IMPORTED_MODULE_0__cartesian_js__["c" /* cartesianCross */])(n1, n2),
        A = Object(__WEBPACK_IMPORTED_MODULE_0__cartesian_js__["f" /* cartesianScale */])(n1, c1),
        B = Object(__WEBPACK_IMPORTED_MODULE_0__cartesian_js__["f" /* cartesianScale */])(n2, c2);
    Object(__WEBPACK_IMPORTED_MODULE_0__cartesian_js__["b" /* cartesianAddInPlace */])(A, B);
 
    // Solve |p(t)|^2 = 1.
    var u = n1xn2,
        w = Object(__WEBPACK_IMPORTED_MODULE_0__cartesian_js__["d" /* cartesianDot */])(A, u),
        uu = Object(__WEBPACK_IMPORTED_MODULE_0__cartesian_js__["d" /* cartesianDot */])(u, u),
        t2 = w * w - uu * (Object(__WEBPACK_IMPORTED_MODULE_0__cartesian_js__["d" /* cartesianDot */])(A, A) - 1);
 
    if (t2 < 0) return;
 
    var t = Object(__WEBPACK_IMPORTED_MODULE_2__math_js__["u" /* sqrt */])(t2),
        q = Object(__WEBPACK_IMPORTED_MODULE_0__cartesian_js__["f" /* cartesianScale */])(u, (-w - t) / uu);
    Object(__WEBPACK_IMPORTED_MODULE_0__cartesian_js__["b" /* cartesianAddInPlace */])(q, A);
    q = Object(__WEBPACK_IMPORTED_MODULE_0__cartesian_js__["g" /* spherical */])(q);
 
    if (!two) return q;
 
    // Two intersection points.
    var lambda0 = a[0],
        lambda1 = b[0],
        phi0 = a[1],
        phi1 = b[1],
        z;
 
    if (lambda1 < lambda0) z = lambda0, lambda0 = lambda1, lambda1 = z;
 
    var delta = lambda1 - lambda0,
        polar = Object(__WEBPACK_IMPORTED_MODULE_2__math_js__["a" /* abs */])(delta - __WEBPACK_IMPORTED_MODULE_2__math_js__["o" /* pi */]) < __WEBPACK_IMPORTED_MODULE_2__math_js__["i" /* epsilon */],
        meridian = polar || delta < __WEBPACK_IMPORTED_MODULE_2__math_js__["i" /* epsilon */];
 
    if (!polar && phi1 < phi0) z = phi0, phi0 = phi1, phi1 = z;
 
    // Check that the first point is between a and b.
    if (meridian
        ? polar
          ? phi0 + phi1 > 0 ^ q[1] < (Object(__WEBPACK_IMPORTED_MODULE_2__math_js__["a" /* abs */])(q[0] - lambda0) < __WEBPACK_IMPORTED_MODULE_2__math_js__["i" /* epsilon */] ? phi0 : phi1)
          : phi0 <= q[1] && q[1] <= phi1
        : delta > __WEBPACK_IMPORTED_MODULE_2__math_js__["o" /* pi */] ^ (lambda0 <= q[0] && q[0] <= lambda1)) {
      var q1 = Object(__WEBPACK_IMPORTED_MODULE_0__cartesian_js__["f" /* cartesianScale */])(u, (-w + t) / uu);
      Object(__WEBPACK_IMPORTED_MODULE_0__cartesian_js__["b" /* cartesianAddInPlace */])(q1, A);
      return [q, Object(__WEBPACK_IMPORTED_MODULE_0__cartesian_js__["g" /* spherical */])(q1)];
    }
  }
 
  // Generates a 4-bit vector representing the location of a point relative to
  // the small circle's bounding box.
  function code(lambda, phi) {
    var r = smallRadius ? radius : __WEBPACK_IMPORTED_MODULE_2__math_js__["o" /* pi */] - radius,
        code = 0;
    if (lambda < -r) code |= 1; // left
    else if (lambda > r) code |= 2; // right
    if (phi < -r) code |= 4; // below
    else if (phi > r) code |= 8; // above
    return code;
  }
 
  return Object(__WEBPACK_IMPORTED_MODULE_4__index_js__["a" /* default */])(visible, clipLine, interpolate, smallRadius ? [0, -radius] : [-__WEBPACK_IMPORTED_MODULE_2__math_js__["o" /* pi */], radius - __WEBPACK_IMPORTED_MODULE_2__math_js__["o" /* pi */]]);
});
 
 
/***/ }),
/* 748 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__length_js__ = __webpack_require__(749);
 
 
var coordinates = [null, null],
    object = {type: "LineString", coordinates: coordinates};
 
/* harmony default export */ __webpack_exports__["a"] = (function(a, b) {
  coordinates[0] = a;
  coordinates[1] = b;
  return Object(__WEBPACK_IMPORTED_MODULE_0__length_js__["a" /* default */])(object);
});
 
 
/***/ }),
/* 749 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__adder_js__ = __webpack_require__(152);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__math_js__ = __webpack_require__(19);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__noop_js__ = __webpack_require__(102);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__stream_js__ = __webpack_require__(121);
 
 
 
 
 
var lengthSum = Object(__WEBPACK_IMPORTED_MODULE_0__adder_js__["a" /* default */])(),
    lambda0,
    sinPhi0,
    cosPhi0;
 
var lengthStream = {
  sphere: __WEBPACK_IMPORTED_MODULE_2__noop_js__["a" /* default */],
  point: __WEBPACK_IMPORTED_MODULE_2__noop_js__["a" /* default */],
  lineStart: lengthLineStart,
  lineEnd: __WEBPACK_IMPORTED_MODULE_2__noop_js__["a" /* default */],
  polygonStart: __WEBPACK_IMPORTED_MODULE_2__noop_js__["a" /* default */],
  polygonEnd: __WEBPACK_IMPORTED_MODULE_2__noop_js__["a" /* default */]
};
 
function lengthLineStart() {
  lengthStream.point = lengthPointFirst;
  lengthStream.lineEnd = lengthLineEnd;
}
 
function lengthLineEnd() {
  lengthStream.point = lengthStream.lineEnd = __WEBPACK_IMPORTED_MODULE_2__noop_js__["a" /* default */];
}
 
function lengthPointFirst(lambda, phi) {
  lambda *= __WEBPACK_IMPORTED_MODULE_1__math_js__["r" /* radians */], phi *= __WEBPACK_IMPORTED_MODULE_1__math_js__["r" /* radians */];
  lambda0 = lambda, sinPhi0 = Object(__WEBPACK_IMPORTED_MODULE_1__math_js__["t" /* sin */])(phi), cosPhi0 = Object(__WEBPACK_IMPORTED_MODULE_1__math_js__["g" /* cos */])(phi);
  lengthStream.point = lengthPoint;
}
 
function lengthPoint(lambda, phi) {
  lambda *= __WEBPACK_IMPORTED_MODULE_1__math_js__["r" /* radians */], phi *= __WEBPACK_IMPORTED_MODULE_1__math_js__["r" /* radians */];
  var sinPhi = Object(__WEBPACK_IMPORTED_MODULE_1__math_js__["t" /* sin */])(phi),
      cosPhi = Object(__WEBPACK_IMPORTED_MODULE_1__math_js__["g" /* cos */])(phi),
      delta = Object(__WEBPACK_IMPORTED_MODULE_1__math_js__["a" /* abs */])(lambda - lambda0),
      cosDelta = Object(__WEBPACK_IMPORTED_MODULE_1__math_js__["g" /* cos */])(delta),
      sinDelta = Object(__WEBPACK_IMPORTED_MODULE_1__math_js__["t" /* sin */])(delta),
      x = cosPhi * sinDelta,
      y = cosPhi0 * sinPhi - sinPhi0 * cosPhi * cosDelta,
      z = sinPhi0 * sinPhi + cosPhi0 * cosPhi * cosDelta;
  lengthSum.add(Object(__WEBPACK_IMPORTED_MODULE_1__math_js__["e" /* atan2 */])(Object(__WEBPACK_IMPORTED_MODULE_1__math_js__["u" /* sqrt */])(x * x + y * y), z));
  lambda0 = lambda, sinPhi0 = sinPhi, cosPhi0 = cosPhi;
}
 
/* harmony default export */ __webpack_exports__["a"] = (function(object) {
  lengthSum.reset();
  Object(__WEBPACK_IMPORTED_MODULE_3__stream_js__["a" /* default */])(object, lengthStream);
  return +lengthSum;
});
 
 
/***/ }),
/* 750 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__noop_js__ = __webpack_require__(102);
 
 
var x0 = Infinity,
    y0 = x0,
    x1 = -x0,
    y1 = x1;
 
var boundsStream = {
  point: boundsPoint,
  lineStart: __WEBPACK_IMPORTED_MODULE_0__noop_js__["a" /* default */],
  lineEnd: __WEBPACK_IMPORTED_MODULE_0__noop_js__["a" /* default */],
  polygonStart: __WEBPACK_IMPORTED_MODULE_0__noop_js__["a" /* default */],
  polygonEnd: __WEBPACK_IMPORTED_MODULE_0__noop_js__["a" /* default */],
  result: function() {
    var bounds = [[x0, y0], [x1, y1]];
    x1 = y1 = -(y0 = x0 = Infinity);
    return bounds;
  }
};
 
function boundsPoint(x, y) {
  if (x < x0) x0 = x;
  if (x > x1) x1 = x;
  if (y < y0) y0 = y;
  if (y > y1) y1 = y;
}
 
/* harmony default export */ __webpack_exports__["a"] = (boundsStream);
 
 
/***/ }),
/* 751 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__conicEqualArea_js__ = __webpack_require__(358);
 
 
/* harmony default export */ __webpack_exports__["a"] = (function() {
  return Object(__WEBPACK_IMPORTED_MODULE_0__conicEqualArea_js__["b" /* default */])()
      .parallels([29.5, 45.5])
      .scale(1070)
      .translate([480, 250])
      .rotate([96, 0])
      .center([-0.6, 38.7]);
});
 
 
/***/ }),
/* 752 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["b"] = equirectangularRaw;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__index_js__ = __webpack_require__(75);
 
 
function equirectangularRaw(lambda, phi) {
  return [lambda, phi];
}
 
equirectangularRaw.invert = equirectangularRaw;
 
/* harmony default export */ __webpack_exports__["a"] = (function() {
  return Object(__WEBPACK_IMPORTED_MODULE_0__index_js__["a" /* default */])(equirectangularRaw)
      .scale(152.63);
});
 
 
/***/ }),
/* 753 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["b"] = packEnclose;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__enclose_js__ = __webpack_require__(754);
 
 
function place(b, a, c) {
  var dx = b.x - a.x, x, a2,
      dy = b.y - a.y, y, b2,
      d2 = dx * dx + dy * dy;
  if (d2) {
    a2 = a.r + c.r, a2 *= a2;
    b2 = b.r + c.r, b2 *= b2;
    if (a2 > b2) {
      x = (d2 + b2 - a2) / (2 * d2);
      y = Math.sqrt(Math.max(0, b2 / d2 - x * x));
      c.x = b.x - x * dx - y * dy;
      c.y = b.y - x * dy + y * dx;
    } else {
      x = (d2 + a2 - b2) / (2 * d2);
      y = Math.sqrt(Math.max(0, a2 / d2 - x * x));
      c.x = a.x + x * dx - y * dy;
      c.y = a.y + x * dy + y * dx;
    }
  } else {
    c.x = a.x + c.r;
    c.y = a.y;
  }
}
 
function intersects(a, b) {
  var dr = a.r + b.r - 1e-6, dx = b.x - a.x, dy = b.y - a.y;
  return dr > 0 && dr * dr > dx * dx + dy * dy;
}
 
function score(node) {
  var a = node._,
      b = node.next._,
      ab = a.r + b.r,
      dx = (a.x * b.r + b.x * a.r) / ab,
      dy = (a.y * b.r + b.y * a.r) / ab;
  return dx * dx + dy * dy;
}
 
function Node(circle) {
  this._ = circle;
  this.next = null;
  this.previous = null;
}
 
function packEnclose(circles) {
  if (!(n = circles.length)) return 0;
 
  var a, b, c, n, aa, ca, i, j, k, sj, sk;
 
  // Place the first circle.
  a = circles[0], a.x = 0, a.y = 0;
  if (!(n > 1)) return a.r;
 
  // Place the second circle.
  b = circles[1], a.x = -b.r, b.x = a.r, b.y = 0;
  if (!(n > 2)) return a.r + b.r;
 
  // Place the third circle.
  place(b, a, c = circles[2]);
 
  // Initialize the front-chain using the first three circles a, b and c.
  a = new Node(a), b = new Node(b), c = new Node(c);
  a.next = c.previous = b;
  b.next = a.previous = c;
  c.next = b.previous = a;
 
  // Attempt to place each remaining circle…
  pack: for (i = 3; i < n; ++i) {
    place(a._, b._, c = circles[i]), c = new Node(c);
 
    // Find the closest intersecting circle on the front-chain, if any.
    // “Closeness” is determined by linear distance along the front-chain.
    // “Ahead” or “behind” is likewise determined by linear distance.
    j = b.next, k = a.previous, sj = b._.r, sk = a._.r;
    do {
      if (sj <= sk) {
        if (intersects(j._, c._)) {
          b = j, a.next = b, b.previous = a, --i;
          continue pack;
        }
        sj += j._.r, j = j.next;
      } else {
        if (intersects(k._, c._)) {
          a = k, a.next = b, b.previous = a, --i;
          continue pack;
        }
        sk += k._.r, k = k.previous;
      }
    } while (j !== k.next);
 
    // Success! Insert the new circle c between a and b.
    c.previous = a, c.next = b, a.next = b.previous = b = c;
 
    // Compute the new closest circle pair to the centroid.
    aa = score(a);
    while ((c = c.next) !== b) {
      if ((ca = score(c)) < aa) {
        a = c, aa = ca;
      }
    }
    b = a.next;
  }
 
  // Compute the enclosing circle of the front chain.
  a = [b._], c = b; while ((c = c.next) !== b) a.push(c._); c = Object(__WEBPACK_IMPORTED_MODULE_0__enclose_js__["a" /* default */])(a);
 
  // Translate the circles to put the enclosing circle around the origin.
  for (i = 0; i < n; ++i) a = circles[i], a.x -= c.x, a.y -= c.y;
 
  return c.r;
}
 
/* harmony default export */ __webpack_exports__["a"] = (function(circles) {
  packEnclose(circles);
  return circles;
});
 
 
/***/ }),
/* 754 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__array_js__ = __webpack_require__(1343);
 
 
/* harmony default export */ __webpack_exports__["a"] = (function(circles) {
  var i = 0, n = (circles = Object(__WEBPACK_IMPORTED_MODULE_0__array_js__["a" /* shuffle */])(__WEBPACK_IMPORTED_MODULE_0__array_js__["b" /* slice */].call(circles))).length, B = [], p, e;
 
  while (i < n) {
    p = circles[i];
    if (e && enclosesWeak(e, p)) ++i;
    else e = encloseBasis(B = extendBasis(B, p)), i = 0;
  }
 
  return e;
});
 
function extendBasis(B, p) {
  var i, j;
 
  if (enclosesWeakAll(p, B)) return [p];
 
  // If we get here then B must have at least one element.
  for (i = 0; i < B.length; ++i) {
    if (enclosesNot(p, B[i])
        && enclosesWeakAll(encloseBasis2(B[i], p), B)) {
      return [B[i], p];
    }
  }
 
  // If we get here then B must have at least two elements.
  for (i = 0; i < B.length - 1; ++i) {
    for (j = i + 1; j < B.length; ++j) {
      if (enclosesNot(encloseBasis2(B[i], B[j]), p)
          && enclosesNot(encloseBasis2(B[i], p), B[j])
          && enclosesNot(encloseBasis2(B[j], p), B[i])
          && enclosesWeakAll(encloseBasis3(B[i], B[j], p), B)) {
        return [B[i], B[j], p];
      }
    }
  }
 
  // If we get here then something is very wrong.
  throw new Error;
}
 
function enclosesNot(a, b) {
  var dr = a.r - b.r, dx = b.x - a.x, dy = b.y - a.y;
  return dr < 0 || dr * dr < dx * dx + dy * dy;
}
 
function enclosesWeak(a, b) {
  var dr = a.r - b.r + 1e-6, dx = b.x - a.x, dy = b.y - a.y;
  return dr > 0 && dr * dr > dx * dx + dy * dy;
}
 
function enclosesWeakAll(a, B) {
  for (var i = 0; i < B.length; ++i) {
    if (!enclosesWeak(a, B[i])) {
      return false;
    }
  }
  return true;
}
 
function encloseBasis(B) {
  switch (B.length) {
    case 1: return encloseBasis1(B[0]);
    case 2: return encloseBasis2(B[0], B[1]);
    case 3: return encloseBasis3(B[0], B[1], B[2]);
  }
}
 
function encloseBasis1(a) {
  return {
    x: a.x,
    y: a.y,
    r: a.r
  };
}
 
function encloseBasis2(a, b) {
  var x1 = a.x, y1 = a.y, r1 = a.r,
      x2 = b.x, y2 = b.y, r2 = b.r,
      x21 = x2 - x1, y21 = y2 - y1, r21 = r2 - r1,
      l = Math.sqrt(x21 * x21 + y21 * y21);
  return {
    x: (x1 + x2 + x21 / l * r21) / 2,
    y: (y1 + y2 + y21 / l * r21) / 2,
    r: (l + r1 + r2) / 2
  };
}
 
function encloseBasis3(a, b, c) {
  var x1 = a.x, y1 = a.y, r1 = a.r,
      x2 = b.x, y2 = b.y, r2 = b.r,
      x3 = c.x, y3 = c.y, r3 = c.r,
      a2 = x1 - x2,
      a3 = x1 - x3,
      b2 = y1 - y2,
      b3 = y1 - y3,
      c2 = r2 - r1,
      c3 = r3 - r1,
      d1 = x1 * x1 + y1 * y1 - r1 * r1,
      d2 = d1 - x2 * x2 - y2 * y2 + r2 * r2,
      d3 = d1 - x3 * x3 - y3 * y3 + r3 * r3,
      ab = a3 * b2 - a2 * b3,
      xa = (b2 * d3 - b3 * d2) / (ab * 2) - x1,
      xb = (b3 * c2 - b2 * c3) / ab,
      ya = (a3 * d2 - a2 * d3) / (ab * 2) - y1,
      yb = (a2 * c3 - a3 * c2) / ab,
      A = xb * xb + yb * yb - 1,
      B = 2 * (r1 + xa * xb + ya * yb),
      C = xa * xa + ya * ya - r1 * r1,
      r = -(A ? (B + Math.sqrt(B * B - 4 * A * C)) / (2 * A) : C / B);
  return {
    x: x1 + xa + xb * r,
    y: y1 + ya + yb * r,
    r: r
  };
}
 
 
/***/ }),
/* 755 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = constantZero;
function constantZero() {
  return 0;
}
 
/* harmony default export */ __webpack_exports__["b"] = (function(x) {
  return function() {
    return x;
  };
});
 
 
/***/ }),
/* 756 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony default export */ __webpack_exports__["a"] = (function(node) {
  node.x0 = Math.round(node.x0);
  node.y0 = Math.round(node.y0);
  node.x1 = Math.round(node.x1);
  node.y1 = Math.round(node.y1);
});
 
 
/***/ }),
/* 757 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__defaultSource__ = __webpack_require__(153);
 
 
/* harmony default export */ __webpack_exports__["a"] = ((function sourceRandomNormal(source) {
  function randomNormal(mu, sigma) {
    var x, r;
    mu = mu == null ? 0 : +mu;
    sigma = sigma == null ? 1 : +sigma;
    return function() {
      var y;
 
      // If available, use the second previously-generated uniform random.
      if (x != null) y = x, x = null;
 
      // Otherwise, generate a new x and y.
      else do {
        x = source() * 2 - 1;
        y = source() * 2 - 1;
        r = x * x + y * y;
      } while (!r || r > 1);
 
      return mu + sigma * y * Math.sqrt(-2 * Math.log(r) / r);
    };
  }
 
  randomNormal.source = sourceRandomNormal;
 
  return randomNormal;
})(__WEBPACK_IMPORTED_MODULE_0__defaultSource__["a" /* default */]));
 
 
/***/ }),
/* 758 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__defaultSource__ = __webpack_require__(153);
 
 
/* harmony default export */ __webpack_exports__["a"] = ((function sourceRandomIrwinHall(source) {
  function randomIrwinHall(n) {
    return function() {
      for (var sum = 0, i = 0; i < n; ++i) sum += source();
      return sum;
    };
  }
 
  randomIrwinHall.source = sourceRandomIrwinHall;
 
  return randomIrwinHall;
})(__WEBPACK_IMPORTED_MODULE_0__defaultSource__["a" /* default */]));
 
 
/***/ }),
/* 759 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__band__ = __webpack_require__(1363);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "scaleBand", function() { return __WEBPACK_IMPORTED_MODULE_0__band__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "scalePoint", function() { return __WEBPACK_IMPORTED_MODULE_0__band__["b"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__identity__ = __webpack_require__(1364);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "scaleIdentity", function() { return __WEBPACK_IMPORTED_MODULE_1__identity__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__linear__ = __webpack_require__(123);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "scaleLinear", function() { return __WEBPACK_IMPORTED_MODULE_2__linear__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__log__ = __webpack_require__(365);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "scaleLog", function() { return __WEBPACK_IMPORTED_MODULE_3__log__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__symlog__ = __webpack_require__(366);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "scaleSymlog", function() { return __WEBPACK_IMPORTED_MODULE_4__symlog__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__ordinal__ = __webpack_require__(760);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "scaleOrdinal", function() { return __WEBPACK_IMPORTED_MODULE_5__ordinal__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "scaleImplicit", function() { return __WEBPACK_IMPORTED_MODULE_5__ordinal__["b"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__pow__ = __webpack_require__(367);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "scalePow", function() { return __WEBPACK_IMPORTED_MODULE_6__pow__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "scaleSqrt", function() { return __WEBPACK_IMPORTED_MODULE_6__pow__["c"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__quantile__ = __webpack_require__(1366);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "scaleQuantile", function() { return __WEBPACK_IMPORTED_MODULE_7__quantile__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__quantize__ = __webpack_require__(1367);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "scaleQuantize", function() { return __WEBPACK_IMPORTED_MODULE_8__quantize__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__threshold__ = __webpack_require__(1368);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "scaleThreshold", function() { return __WEBPACK_IMPORTED_MODULE_9__threshold__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__time__ = __webpack_require__(764);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "scaleTime", function() { return __WEBPACK_IMPORTED_MODULE_10__time__["b"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__utcTime__ = __webpack_require__(1384);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "scaleUtc", function() { return __WEBPACK_IMPORTED_MODULE_11__utcTime__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__sequential__ = __webpack_require__(767);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "scaleSequential", function() { return __WEBPACK_IMPORTED_MODULE_12__sequential__["b"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "scaleSequentialLog", function() { return __WEBPACK_IMPORTED_MODULE_12__sequential__["c"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "scaleSequentialPow", function() { return __WEBPACK_IMPORTED_MODULE_12__sequential__["d"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "scaleSequentialSqrt", function() { return __WEBPACK_IMPORTED_MODULE_12__sequential__["e"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "scaleSequentialSymlog", function() { return __WEBPACK_IMPORTED_MODULE_12__sequential__["f"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__sequentialQuantile__ = __webpack_require__(1385);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "scaleSequentialQuantile", function() { return __WEBPACK_IMPORTED_MODULE_13__sequentialQuantile__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__diverging__ = __webpack_require__(1386);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "scaleDiverging", function() { return __WEBPACK_IMPORTED_MODULE_14__diverging__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "scaleDivergingLog", function() { return __WEBPACK_IMPORTED_MODULE_14__diverging__["b"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "scaleDivergingPow", function() { return __WEBPACK_IMPORTED_MODULE_14__diverging__["c"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "scaleDivergingSqrt", function() { return __WEBPACK_IMPORTED_MODULE_14__diverging__["d"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "scaleDivergingSymlog", function() { return __WEBPACK_IMPORTED_MODULE_14__diverging__["e"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__tickFormat__ = __webpack_require__(762);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "tickFormat", function() { return __WEBPACK_IMPORTED_MODULE_15__tickFormat__["a"]; });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
/***/ }),
/* 760 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return implicit; });
/* harmony export (immutable) */ __webpack_exports__["a"] = ordinal;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_d3_collection__ = __webpack_require__(249);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__array__ = __webpack_require__(122);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__init__ = __webpack_require__(57);
 
 
 
 
var implicit = {name: "implicit"};
 
function ordinal() {
  var index = Object(__WEBPACK_IMPORTED_MODULE_0_d3_collection__["c" /* map */])(),
      domain = [],
      range = [],
      unknown = implicit;
 
  function scale(d) {
    var key = d + "", i = index.get(key);
    Iif (!i) {
      if (unknown !== implicit) return unknown;
      index.set(key, i = domain.push(d));
    }
    return range[(i - 1) % range.length];
  }
 
  scale.domain = function(_) {
    if (!arguments.length) return domain.slice();
    domain = [], index = Object(__WEBPACK_IMPORTED_MODULE_0_d3_collection__["c" /* map */])();
    var i = -1, n = _.length, d, key;
    while (++i < n) Eif (!index.has(key = (d = _[i]) + "")) index.set(key, domain.push(d));
    return scale;
  };
 
  scale.range = function(_) {
    return arguments.length ? (range = __WEBPACK_IMPORTED_MODULE_1__array__["b" /* slice */].call(_), scale) : range.slice();
  };
 
  scale.unknown = function(_) {
    return arguments.length ? (unknown = _, scale) : unknown;
  };
 
  scale.copy = function() {
    return ordinal(domain, range).unknown(unknown);
  };
 
  __WEBPACK_IMPORTED_MODULE_2__init__["b" /* initRange */].apply(scale, arguments);
 
  return scale;
}
 
 
/***/ }),
/* 761 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony default export */ __webpack_exports__["a"] = (function(x) {
  return +x;
});
 
 
/***/ }),
/* 762 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_d3_array__ = __webpack_require__(44);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_d3_format__ = __webpack_require__(356);
 
 
 
/* harmony default export */ __webpack_exports__["a"] = (function(start, stop, count, specifier) {
  var step = Object(__WEBPACK_IMPORTED_MODULE_0_d3_array__["A" /* tickStep */])(start, stop, count),
      precision;
  specifier = Object(__WEBPACK_IMPORTED_MODULE_1_d3_format__["f" /* formatSpecifier */])(specifier == null ? ",f" : specifier);
  switch (specifier.type) {
    case "s": {
      var value = Math.max(Math.abs(start), Math.abs(stop));
      if (specifier.precision == null && !isNaN(precision = Object(__WEBPACK_IMPORTED_MODULE_1_d3_format__["h" /* precisionPrefix */])(step, value))) specifier.precision = precision;
      return Object(__WEBPACK_IMPORTED_MODULE_1_d3_format__["e" /* formatPrefix */])(specifier, value);
    }
    case "":
    case "e":
    case "g":
    case "p":
    case "r": {
      if (specifier.precision == null && !isNaN(precision = Object(__WEBPACK_IMPORTED_MODULE_1_d3_format__["i" /* precisionRound */])(step, Math.max(Math.abs(start), Math.abs(stop))))) specifier.precision = precision - (specifier.type === "e");
      break;
    }
    case "f":
    case "%": {
      if (specifier.precision == null && !isNaN(precision = Object(__WEBPACK_IMPORTED_MODULE_1_d3_format__["g" /* precisionFixed */])(step))) specifier.precision = precision - (specifier.type === "%") * 2;
      break;
    }
  }
  return Object(__WEBPACK_IMPORTED_MODULE_1_d3_format__["b" /* format */])(specifier);
});
 
 
/***/ }),
/* 763 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony default export */ __webpack_exports__["a"] = (function(domain, interval) {
  domain = domain.slice();
 
  var i0 = 0,
      i1 = domain.length - 1,
      x0 = domain[i0],
      x1 = domain[i1],
      t;
 
  if (x1 < x0) {
    t = i0, i0 = i1, i1 = t;
    t = x0, x0 = x1, x1 = t;
  }
 
  domain[i0] = interval.floor(x0);
  domain[i1] = interval.ceil(x1);
  return domain;
});
 
 
/***/ }),
/* 764 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = calendar;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_d3_array__ = __webpack_require__(44);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_d3_time__ = __webpack_require__(256);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_d3_time_format__ = __webpack_require__(368);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__array__ = __webpack_require__(122);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__continuous__ = __webpack_require__(103);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__init__ = __webpack_require__(57);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__nice__ = __webpack_require__(763);
 
 
 
 
 
 
 
 
var durationSecond = 1000,
    durationMinute = durationSecond * 60,
    durationHour = durationMinute * 60,
    durationDay = durationHour * 24,
    durationWeek = durationDay * 7,
    durationMonth = durationDay * 30,
    durationYear = durationDay * 365;
 
function date(t) {
  return new Date(t);
}
 
function number(t) {
  return t instanceof Date ? +t : +new Date(+t);
}
 
function calendar(year, month, week, day, hour, minute, second, millisecond, format) {
  var scale = Object(__WEBPACK_IMPORTED_MODULE_4__continuous__["b" /* default */])(__WEBPACK_IMPORTED_MODULE_4__continuous__["c" /* identity */], __WEBPACK_IMPORTED_MODULE_4__continuous__["c" /* identity */]),
      invert = scale.invert,
      domain = scale.domain;
 
  var formatMillisecond = format(".%L"),
      formatSecond = format(":%S"),
      formatMinute = format("%I:%M"),
      formatHour = format("%I %p"),
      formatDay = format("%a %d"),
      formatWeek = format("%b %d"),
      formatMonth = format("%B"),
      formatYear = format("%Y");
 
  var tickIntervals = [
    [second,  1,      durationSecond],
    [second,  5,  5 * durationSecond],
    [second, 15, 15 * durationSecond],
    [second, 30, 30 * durationSecond],
    [minute,  1,      durationMinute],
    [minute,  5,  5 * durationMinute],
    [minute, 15, 15 * durationMinute],
    [minute, 30, 30 * durationMinute],
    [  hour,  1,      durationHour  ],
    [  hour,  3,  3 * durationHour  ],
    [  hour,  6,  6 * durationHour  ],
    [  hour, 12, 12 * durationHour  ],
    [   day,  1,      durationDay   ],
    [   day,  2,  2 * durationDay   ],
    [  week,  1,      durationWeek  ],
    [ month,  1,      durationMonth ],
    [ month,  3,  3 * durationMonth ],
    [  year,  1,      durationYear  ]
  ];
 
  function tickFormat(date) {
    return (second(date) < date ? formatMillisecond
        : minute(date) < date ? formatSecond
        : hour(date) < date ? formatMinute
        : day(date) < date ? formatHour
        : month(date) < date ? (week(date) < date ? formatDay : formatWeek)
        : year(date) < date ? formatMonth
        : formatYear)(date);
  }
 
  function tickInterval(interval, start, stop, step) {
    if (interval == null) interval = 10;
 
    // If a desired tick count is specified, pick a reasonable tick interval
    // based on the extent of the domain and a rough estimate of tick size.
    // Otherwise, assume interval is already a time interval and use it.
    if (typeof interval === "number") {
      var target = Math.abs(stop - start) / interval,
          i = Object(__WEBPACK_IMPORTED_MODULE_0_d3_array__["e" /* bisector */])(function(i) { return i[2]; }).right(tickIntervals, target);
      if (i === tickIntervals.length) {
        step = Object(__WEBPACK_IMPORTED_MODULE_0_d3_array__["A" /* tickStep */])(start / durationYear, stop / durationYear, interval);
        interval = year;
      } else if (i) {
        i = tickIntervals[target / tickIntervals[i - 1][2] < tickIntervals[i][2] / target ? i - 1 : i];
        step = i[1];
        interval = i[0];
      } else {
        step = Math.max(Object(__WEBPACK_IMPORTED_MODULE_0_d3_array__["A" /* tickStep */])(start, stop, interval), 1);
        interval = millisecond;
      }
    }
 
    return step == null ? interval : interval.every(step);
  }
 
  scale.invert = function(y) {
    return new Date(invert(y));
  };
 
  scale.domain = function(_) {
    return arguments.length ? domain(__WEBPACK_IMPORTED_MODULE_3__array__["a" /* map */].call(_, number)) : domain().map(date);
  };
 
  scale.ticks = function(interval, step) {
    var d = domain(),
        t0 = d[0],
        t1 = d[d.length - 1],
        r = t1 < t0,
        t;
    if (r) t = t0, t0 = t1, t1 = t;
    t = tickInterval(interval, t0, t1, step);
    t = t ? t.range(t0, t1 + 1) : []; // inclusive stop
    return r ? t.reverse() : t;
  };
 
  scale.tickFormat = function(count, specifier) {
    return specifier == null ? tickFormat : format(specifier);
  };
 
  scale.nice = function(interval, step) {
    var d = domain();
    return (interval = tickInterval(interval, d[0], d[d.length - 1], step))
        ? domain(Object(__WEBPACK_IMPORTED_MODULE_6__nice__["a" /* default */])(d, interval))
        : scale;
  };
 
  scale.copy = function() {
    return Object(__WEBPACK_IMPORTED_MODULE_4__continuous__["a" /* copy */])(scale, calendar(year, month, week, day, hour, minute, second, millisecond, format));
  };
 
  return scale;
}
 
/* harmony default export */ __webpack_exports__["b"] = (function() {
  return __WEBPACK_IMPORTED_MODULE_5__init__["b" /* initRange */].apply(calendar(__WEBPACK_IMPORTED_MODULE_1_d3_time__["D" /* timeYear */], __WEBPACK_IMPORTED_MODULE_1_d3_time__["n" /* timeMonth */], __WEBPACK_IMPORTED_MODULE_1_d3_time__["B" /* timeWeek */], __WEBPACK_IMPORTED_MODULE_1_d3_time__["a" /* timeDay */], __WEBPACK_IMPORTED_MODULE_1_d3_time__["e" /* timeHour */], __WEBPACK_IMPORTED_MODULE_1_d3_time__["j" /* timeMinute */], __WEBPACK_IMPORTED_MODULE_1_d3_time__["r" /* timeSecond */], __WEBPACK_IMPORTED_MODULE_1_d3_time__["h" /* timeMillisecond */], __WEBPACK_IMPORTED_MODULE_2_d3_time_format__["c" /* timeFormat */]).domain([new Date(2000, 0, 1), new Date(2000, 0, 2)]), arguments);
});
 
 
/***/ }),
/* 765 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = formatLocale;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_d3_time__ = __webpack_require__(256);
 
 
function localDate(d) {
  if (0 <= d.y && d.y < 100) {
    var date = new Date(-1, d.m, d.d, d.H, d.M, d.S, d.L);
    date.setFullYear(d.y);
    return date;
  }
  return new Date(d.y, d.m, d.d, d.H, d.M, d.S, d.L);
}
 
function utcDate(d) {
  if (0 <= d.y && d.y < 100) {
    var date = new Date(Date.UTC(-1, d.m, d.d, d.H, d.M, d.S, d.L));
    date.setUTCFullYear(d.y);
    return date;
  }
  return new Date(Date.UTC(d.y, d.m, d.d, d.H, d.M, d.S, d.L));
}
 
function newDate(y, m, d) {
  return {y: y, m: m, d: d, H: 0, M: 0, S: 0, L: 0};
}
 
function formatLocale(locale) {
  var locale_dateTime = locale.dateTime,
      locale_date = locale.date,
      locale_time = locale.time,
      locale_periods = locale.periods,
      locale_weekdays = locale.days,
      locale_shortWeekdays = locale.shortDays,
      locale_months = locale.months,
      locale_shortMonths = locale.shortMonths;
 
  var periodRe = formatRe(locale_periods),
      periodLookup = formatLookup(locale_periods),
      weekdayRe = formatRe(locale_weekdays),
      weekdayLookup = formatLookup(locale_weekdays),
      shortWeekdayRe = formatRe(locale_shortWeekdays),
      shortWeekdayLookup = formatLookup(locale_shortWeekdays),
      monthRe = formatRe(locale_months),
      monthLookup = formatLookup(locale_months),
      shortMonthRe = formatRe(locale_shortMonths),
      shortMonthLookup = formatLookup(locale_shortMonths);
 
  var formats = {
    "a": formatShortWeekday,
    "A": formatWeekday,
    "b": formatShortMonth,
    "B": formatMonth,
    "c": null,
    "d": formatDayOfMonth,
    "e": formatDayOfMonth,
    "f": formatMicroseconds,
    "g": formatYearISO,
    "G": formatFullYearISO,
    "H": formatHour24,
    "I": formatHour12,
    "j": formatDayOfYear,
    "L": formatMilliseconds,
    "m": formatMonthNumber,
    "M": formatMinutes,
    "p": formatPeriod,
    "q": formatQuarter,
    "Q": formatUnixTimestamp,
    "s": formatUnixTimestampSeconds,
    "S": formatSeconds,
    "u": formatWeekdayNumberMonday,
    "U": formatWeekNumberSunday,
    "V": formatWeekNumberISO,
    "w": formatWeekdayNumberSunday,
    "W": formatWeekNumberMonday,
    "x": null,
    "X": null,
    "y": formatYear,
    "Y": formatFullYear,
    "Z": formatZone,
    "%": formatLiteralPercent
  };
 
  var utcFormats = {
    "a": formatUTCShortWeekday,
    "A": formatUTCWeekday,
    "b": formatUTCShortMonth,
    "B": formatUTCMonth,
    "c": null,
    "d": formatUTCDayOfMonth,
    "e": formatUTCDayOfMonth,
    "f": formatUTCMicroseconds,
    "g": formatUTCYearISO,
    "G": formatUTCFullYearISO,
    "H": formatUTCHour24,
    "I": formatUTCHour12,
    "j": formatUTCDayOfYear,
    "L": formatUTCMilliseconds,
    "m": formatUTCMonthNumber,
    "M": formatUTCMinutes,
    "p": formatUTCPeriod,
    "q": formatUTCQuarter,
    "Q": formatUnixTimestamp,
    "s": formatUnixTimestampSeconds,
    "S": formatUTCSeconds,
    "u": formatUTCWeekdayNumberMonday,
    "U": formatUTCWeekNumberSunday,
    "V": formatUTCWeekNumberISO,
    "w": formatUTCWeekdayNumberSunday,
    "W": formatUTCWeekNumberMonday,
    "x": null,
    "X": null,
    "y": formatUTCYear,
    "Y": formatUTCFullYear,
    "Z": formatUTCZone,
    "%": formatLiteralPercent
  };
 
  var parses = {
    "a": parseShortWeekday,
    "A": parseWeekday,
    "b": parseShortMonth,
    "B": parseMonth,
    "c": parseLocaleDateTime,
    "d": parseDayOfMonth,
    "e": parseDayOfMonth,
    "f": parseMicroseconds,
    "g": parseYear,
    "G": parseFullYear,
    "H": parseHour24,
    "I": parseHour24,
    "j": parseDayOfYear,
    "L": parseMilliseconds,
    "m": parseMonthNumber,
    "M": parseMinutes,
    "p": parsePeriod,
    "q": parseQuarter,
    "Q": parseUnixTimestamp,
    "s": parseUnixTimestampSeconds,
    "S": parseSeconds,
    "u": parseWeekdayNumberMonday,
    "U": parseWeekNumberSunday,
    "V": parseWeekNumberISO,
    "w": parseWeekdayNumberSunday,
    "W": parseWeekNumberMonday,
    "x": parseLocaleDate,
    "X": parseLocaleTime,
    "y": parseYear,
    "Y": parseFullYear,
    "Z": parseZone,
    "%": parseLiteralPercent
  };
 
  // These recursive directive definitions must be deferred.
  formats.x = newFormat(locale_date, formats);
  formats.X = newFormat(locale_time, formats);
  formats.c = newFormat(locale_dateTime, formats);
  utcFormats.x = newFormat(locale_date, utcFormats);
  utcFormats.X = newFormat(locale_time, utcFormats);
  utcFormats.c = newFormat(locale_dateTime, utcFormats);
 
  function newFormat(specifier, formats) {
    return function(date) {
      var string = [],
          i = -1,
          j = 0,
          n = specifier.length,
          c,
          pad,
          format;
 
      if (!(date instanceof Date)) date = new Date(+date);
 
      while (++i < n) {
        if (specifier.charCodeAt(i) === 37) {
          string.push(specifier.slice(j, i));
          if ((pad = pads[c = specifier.charAt(++i)]) != null) c = specifier.charAt(++i);
          else pad = c === "e" ? " " : "0";
          if (format = formats[c]) c = format(date, pad);
          string.push(c);
          j = i + 1;
        }
      }
 
      string.push(specifier.slice(j, i));
      return string.join("");
    };
  }
 
  function newParse(specifier, Z) {
    return function(string) {
      var d = newDate(1900, undefined, 1),
          i = parseSpecifier(d, specifier, string += "", 0),
          week, day;
      if (i != string.length) return null;
 
      // If a UNIX timestamp is specified, return it.
      if ("Q" in d) return new Date(d.Q);
      if ("s" in d) return new Date(d.s * 1000 + ("L" in d ? d.L : 0));
 
      // If this is utcParse, never use the local timezone.
      if (Z && !("Z" in d)) d.Z = 0;
 
      // The am-pm flag is 0 for AM, and 1 for PM.
      if ("p" in d) d.H = d.H % 12 + d.p * 12;
 
      // If the month was not specified, inherit from the quarter.
      if (d.m === undefined) d.m = "q" in d ? d.q : 0;
 
      // Convert day-of-week and week-of-year to day-of-year.
      if ("V" in d) {
        if (d.V < 1 || d.V > 53) return null;
        if (!("w" in d)) d.w = 1;
        if ("Z" in d) {
          week = utcDate(newDate(d.y, 0, 1)), day = week.getUTCDay();
          week = day > 4 || day === 0 ? __WEBPACK_IMPORTED_MODULE_0_d3_time__["P" /* utcMonday */].ceil(week) : Object(__WEBPACK_IMPORTED_MODULE_0_d3_time__["P" /* utcMonday */])(week);
          week = __WEBPACK_IMPORTED_MODULE_0_d3_time__["F" /* utcDay */].offset(week, (d.V - 1) * 7);
          d.y = week.getUTCFullYear();
          d.m = week.getUTCMonth();
          d.d = week.getUTCDate() + (d.w + 6) % 7;
        } else {
          week = localDate(newDate(d.y, 0, 1)), day = week.getDay();
          week = day > 4 || day === 0 ? __WEBPACK_IMPORTED_MODULE_0_d3_time__["l" /* timeMonday */].ceil(week) : Object(__WEBPACK_IMPORTED_MODULE_0_d3_time__["l" /* timeMonday */])(week);
          week = __WEBPACK_IMPORTED_MODULE_0_d3_time__["a" /* timeDay */].offset(week, (d.V - 1) * 7);
          d.y = week.getFullYear();
          d.m = week.getMonth();
          d.d = week.getDate() + (d.w + 6) % 7;
        }
      } else if ("W" in d || "U" in d) {
        if (!("w" in d)) d.w = "u" in d ? d.u % 7 : "W" in d ? 1 : 0;
        day = "Z" in d ? utcDate(newDate(d.y, 0, 1)).getUTCDay() : localDate(newDate(d.y, 0, 1)).getDay();
        d.m = 0;
        d.d = "W" in d ? (d.w + 6) % 7 + d.W * 7 - (day + 5) % 7 : d.w + d.U * 7 - (day + 6) % 7;
      }
 
      // If a time zone is specified, all fields are interpreted as UTC and then
      // offset according to the specified time zone.
      if ("Z" in d) {
        d.H += d.Z / 100 | 0;
        d.M += d.Z % 100;
        return utcDate(d);
      }
 
      // Otherwise, all fields are in local time.
      return localDate(d);
    };
  }
 
  function parseSpecifier(d, specifier, string, j) {
    var i = 0,
        n = specifier.length,
        m = string.length,
        c,
        parse;
 
    while (i < n) {
      if (j >= m) return -1;
      c = specifier.charCodeAt(i++);
      if (c === 37) {
        c = specifier.charAt(i++);
        parse = parses[c in pads ? specifier.charAt(i++) : c];
        if (!parse || ((j = parse(d, string, j)) < 0)) return -1;
      } else if (c != string.charCodeAt(j++)) {
        return -1;
      }
    }
 
    return j;
  }
 
  function parsePeriod(d, string, i) {
    var n = periodRe.exec(string.slice(i));
    return n ? (d.p = periodLookup[n[0].toLowerCase()], i + n[0].length) : -1;
  }
 
  function parseShortWeekday(d, string, i) {
    var n = shortWeekdayRe.exec(string.slice(i));
    return n ? (d.w = shortWeekdayLookup[n[0].toLowerCase()], i + n[0].length) : -1;
  }
 
  function parseWeekday(d, string, i) {
    var n = weekdayRe.exec(string.slice(i));
    return n ? (d.w = weekdayLookup[n[0].toLowerCase()], i + n[0].length) : -1;
  }
 
  function parseShortMonth(d, string, i) {
    var n = shortMonthRe.exec(string.slice(i));
    return n ? (d.m = shortMonthLookup[n[0].toLowerCase()], i + n[0].length) : -1;
  }
 
  function parseMonth(d, string, i) {
    var n = monthRe.exec(string.slice(i));
    return n ? (d.m = monthLookup[n[0].toLowerCase()], i + n[0].length) : -1;
  }
 
  function parseLocaleDateTime(d, string, i) {
    return parseSpecifier(d, locale_dateTime, string, i);
  }
 
  function parseLocaleDate(d, string, i) {
    return parseSpecifier(d, locale_date, string, i);
  }
 
  function parseLocaleTime(d, string, i) {
    return parseSpecifier(d, locale_time, string, i);
  }
 
  function formatShortWeekday(d) {
    return locale_shortWeekdays[d.getDay()];
  }
 
  function formatWeekday(d) {
    return locale_weekdays[d.getDay()];
  }
 
  function formatShortMonth(d) {
    return locale_shortMonths[d.getMonth()];
  }
 
  function formatMonth(d) {
    return locale_months[d.getMonth()];
  }
 
  function formatPeriod(d) {
    return locale_periods[+(d.getHours() >= 12)];
  }
 
  function formatQuarter(d) {
    return 1 + ~~(d.getMonth() / 3);
  }
 
  function formatUTCShortWeekday(d) {
    return locale_shortWeekdays[d.getUTCDay()];
  }
 
  function formatUTCWeekday(d) {
    return locale_weekdays[d.getUTCDay()];
  }
 
  function formatUTCShortMonth(d) {
    return locale_shortMonths[d.getUTCMonth()];
  }
 
  function formatUTCMonth(d) {
    return locale_months[d.getUTCMonth()];
  }
 
  function formatUTCPeriod(d) {
    return locale_periods[+(d.getUTCHours() >= 12)];
  }
 
  function formatUTCQuarter(d) {
    return 1 + ~~(d.getUTCMonth() / 3);
  }
 
  return {
    format: function(specifier) {
      var f = newFormat(specifier += "", formats);
      f.toString = function() { return specifier; };
      return f;
    },
    parse: function(specifier) {
      var p = newParse(specifier += "", false);
      p.toString = function() { return specifier; };
      return p;
    },
    utcFormat: function(specifier) {
      var f = newFormat(specifier += "", utcFormats);
      f.toString = function() { return specifier; };
      return f;
    },
    utcParse: function(specifier) {
      var p = newParse(specifier += "", true);
      p.toString = function() { return specifier; };
      return p;
    }
  };
}
 
var pads = {"-": "", "_": " ", "0": "0"},
    numberRe = /^\s*\d+/, // note: ignores next directive
    percentRe = /^%/,
    requoteRe = /[\\^$*+?|[\]().{}]/g;
 
function pad(value, fill, width) {
  var sign = value < 0 ? "-" : "",
      string = (sign ? -value : value) + "",
      length = string.length;
  return sign + (length < width ? new Array(width - length + 1).join(fill) + string : string);
}
 
function requote(s) {
  return s.replace(requoteRe, "\\$&");
}
 
function formatRe(names) {
  return new RegExp("^(?:" + names.map(requote).join("|") + ")", "i");
}
 
function formatLookup(names) {
  var map = {}, i = -1, n = names.length;
  while (++i < n) map[names[i].toLowerCase()] = i;
  return map;
}
 
function parseWeekdayNumberSunday(d, string, i) {
  var n = numberRe.exec(string.slice(i, i + 1));
  return n ? (d.w = +n[0], i + n[0].length) : -1;
}
 
function parseWeekdayNumberMonday(d, string, i) {
  var n = numberRe.exec(string.slice(i, i + 1));
  return n ? (d.u = +n[0], i + n[0].length) : -1;
}
 
function parseWeekNumberSunday(d, string, i) {
  var n = numberRe.exec(string.slice(i, i + 2));
  return n ? (d.U = +n[0], i + n[0].length) : -1;
}
 
function parseWeekNumberISO(d, string, i) {
  var n = numberRe.exec(string.slice(i, i + 2));
  return n ? (d.V = +n[0], i + n[0].length) : -1;
}
 
function parseWeekNumberMonday(d, string, i) {
  var n = numberRe.exec(string.slice(i, i + 2));
  return n ? (d.W = +n[0], i + n[0].length) : -1;
}
 
function parseFullYear(d, string, i) {
  var n = numberRe.exec(string.slice(i, i + 4));
  return n ? (d.y = +n[0], i + n[0].length) : -1;
}
 
function parseYear(d, string, i) {
  var n = numberRe.exec(string.slice(i, i + 2));
  return n ? (d.y = +n[0] + (+n[0] > 68 ? 1900 : 2000), i + n[0].length) : -1;
}
 
function parseZone(d, string, i) {
  var n = /^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(string.slice(i, i + 6));
  return n ? (d.Z = n[1] ? 0 : -(n[2] + (n[3] || "00")), i + n[0].length) : -1;
}
 
function parseQuarter(d, string, i) {
  var n = numberRe.exec(string.slice(i, i + 1));
  return n ? (d.q = n[0] * 3 - 3, i + n[0].length) : -1;
}
 
function parseMonthNumber(d, string, i) {
  var n = numberRe.exec(string.slice(i, i + 2));
  return n ? (d.m = n[0] - 1, i + n[0].length) : -1;
}
 
function parseDayOfMonth(d, string, i) {
  var n = numberRe.exec(string.slice(i, i + 2));
  return n ? (d.d = +n[0], i + n[0].length) : -1;
}
 
function parseDayOfYear(d, string, i) {
  var n = numberRe.exec(string.slice(i, i + 3));
  return n ? (d.m = 0, d.d = +n[0], i + n[0].length) : -1;
}
 
function parseHour24(d, string, i) {
  var n = numberRe.exec(string.slice(i, i + 2));
  return n ? (d.H = +n[0], i + n[0].length) : -1;
}
 
function parseMinutes(d, string, i) {
  var n = numberRe.exec(string.slice(i, i + 2));
  return n ? (d.M = +n[0], i + n[0].length) : -1;
}
 
function parseSeconds(d, string, i) {
  var n = numberRe.exec(string.slice(i, i + 2));
  return n ? (d.S = +n[0], i + n[0].length) : -1;
}
 
function parseMilliseconds(d, string, i) {
  var n = numberRe.exec(string.slice(i, i + 3));
  return n ? (d.L = +n[0], i + n[0].length) : -1;
}
 
function parseMicroseconds(d, string, i) {
  var n = numberRe.exec(string.slice(i, i + 6));
  return n ? (d.L = Math.floor(n[0] / 1000), i + n[0].length) : -1;
}
 
function parseLiteralPercent(d, string, i) {
  var n = percentRe.exec(string.slice(i, i + 1));
  return n ? i + n[0].length : -1;
}
 
function parseUnixTimestamp(d, string, i) {
  var n = numberRe.exec(string.slice(i));
  return n ? (d.Q = +n[0], i + n[0].length) : -1;
}
 
function parseUnixTimestampSeconds(d, string, i) {
  var n = numberRe.exec(string.slice(i));
  return n ? (d.s = +n[0], i + n[0].length) : -1;
}
 
function formatDayOfMonth(d, p) {
  return pad(d.getDate(), p, 2);
}
 
function formatHour24(d, p) {
  return pad(d.getHours(), p, 2);
}
 
function formatHour12(d, p) {
  return pad(d.getHours() % 12 || 12, p, 2);
}
 
function formatDayOfYear(d, p) {
  return pad(1 + __WEBPACK_IMPORTED_MODULE_0_d3_time__["a" /* timeDay */].count(Object(__WEBPACK_IMPORTED_MODULE_0_d3_time__["D" /* timeYear */])(d), d), p, 3);
}
 
function formatMilliseconds(d, p) {
  return pad(d.getMilliseconds(), p, 3);
}
 
function formatMicroseconds(d, p) {
  return formatMilliseconds(d, p) + "000";
}
 
function formatMonthNumber(d, p) {
  return pad(d.getMonth() + 1, p, 2);
}
 
function formatMinutes(d, p) {
  return pad(d.getMinutes(), p, 2);
}
 
function formatSeconds(d, p) {
  return pad(d.getSeconds(), p, 2);
}
 
function formatWeekdayNumberMonday(d) {
  var day = d.getDay();
  return day === 0 ? 7 : day;
}
 
function formatWeekNumberSunday(d, p) {
  return pad(__WEBPACK_IMPORTED_MODULE_0_d3_time__["t" /* timeSunday */].count(Object(__WEBPACK_IMPORTED_MODULE_0_d3_time__["D" /* timeYear */])(d) - 1, d), p, 2);
}
 
function dISO(d) {
  var day = d.getDay();
  return (day >= 4 || day === 0) ? Object(__WEBPACK_IMPORTED_MODULE_0_d3_time__["v" /* timeThursday */])(d) : __WEBPACK_IMPORTED_MODULE_0_d3_time__["v" /* timeThursday */].ceil(d);
}
 
function formatWeekNumberISO(d, p) {
  d = dISO(d);
  return pad(__WEBPACK_IMPORTED_MODULE_0_d3_time__["v" /* timeThursday */].count(Object(__WEBPACK_IMPORTED_MODULE_0_d3_time__["D" /* timeYear */])(d), d) + (Object(__WEBPACK_IMPORTED_MODULE_0_d3_time__["D" /* timeYear */])(d).getDay() === 4), p, 2);
}
 
function formatWeekdayNumberSunday(d) {
  return d.getDay();
}
 
function formatWeekNumberMonday(d, p) {
  return pad(__WEBPACK_IMPORTED_MODULE_0_d3_time__["l" /* timeMonday */].count(Object(__WEBPACK_IMPORTED_MODULE_0_d3_time__["D" /* timeYear */])(d) - 1, d), p, 2);
}
 
function formatYear(d, p) {
  return pad(d.getFullYear() % 100, p, 2);
}
 
function formatYearISO(d, p) {
  d = dISO(d);
  return pad(d.getFullYear() % 100, p, 2);
}
 
function formatFullYear(d, p) {
  return pad(d.getFullYear() % 10000, p, 4);
}
 
function formatFullYearISO(d, p) {
  var day = d.getDay();
  d = (day >= 4 || day === 0) ? Object(__WEBPACK_IMPORTED_MODULE_0_d3_time__["v" /* timeThursday */])(d) : __WEBPACK_IMPORTED_MODULE_0_d3_time__["v" /* timeThursday */].ceil(d);
  return pad(d.getFullYear() % 10000, p, 4);
}
 
function formatZone(d) {
  var z = d.getTimezoneOffset();
  return (z > 0 ? "-" : (z *= -1, "+"))
      + pad(z / 60 | 0, "0", 2)
      + pad(z % 60, "0", 2);
}
 
function formatUTCDayOfMonth(d, p) {
  return pad(d.getUTCDate(), p, 2);
}
 
function formatUTCHour24(d, p) {
  return pad(d.getUTCHours(), p, 2);
}
 
function formatUTCHour12(d, p) {
  return pad(d.getUTCHours() % 12 || 12, p, 2);
}
 
function formatUTCDayOfYear(d, p) {
  return pad(1 + __WEBPACK_IMPORTED_MODULE_0_d3_time__["F" /* utcDay */].count(Object(__WEBPACK_IMPORTED_MODULE_0_d3_time__["_7" /* utcYear */])(d), d), p, 3);
}
 
function formatUTCMilliseconds(d, p) {
  return pad(d.getUTCMilliseconds(), p, 3);
}
 
function formatUTCMicroseconds(d, p) {
  return formatUTCMilliseconds(d, p) + "000";
}
 
function formatUTCMonthNumber(d, p) {
  return pad(d.getUTCMonth() + 1, p, 2);
}
 
function formatUTCMinutes(d, p) {
  return pad(d.getUTCMinutes(), p, 2);
}
 
function formatUTCSeconds(d, p) {
  return pad(d.getUTCSeconds(), p, 2);
}
 
function formatUTCWeekdayNumberMonday(d) {
  var dow = d.getUTCDay();
  return dow === 0 ? 7 : dow;
}
 
function formatUTCWeekNumberSunday(d, p) {
  return pad(__WEBPACK_IMPORTED_MODULE_0_d3_time__["X" /* utcSunday */].count(Object(__WEBPACK_IMPORTED_MODULE_0_d3_time__["_7" /* utcYear */])(d) - 1, d), p, 2);
}
 
function UTCdISO(d) {
  var day = d.getUTCDay();
  return (day >= 4 || day === 0) ? Object(__WEBPACK_IMPORTED_MODULE_0_d3_time__["Z" /* utcThursday */])(d) : __WEBPACK_IMPORTED_MODULE_0_d3_time__["Z" /* utcThursday */].ceil(d);
}
 
function formatUTCWeekNumberISO(d, p) {
  d = UTCdISO(d);
  return pad(__WEBPACK_IMPORTED_MODULE_0_d3_time__["Z" /* utcThursday */].count(Object(__WEBPACK_IMPORTED_MODULE_0_d3_time__["_7" /* utcYear */])(d), d) + (Object(__WEBPACK_IMPORTED_MODULE_0_d3_time__["_7" /* utcYear */])(d).getUTCDay() === 4), p, 2);
}
 
function formatUTCWeekdayNumberSunday(d) {
  return d.getUTCDay();
}
 
function formatUTCWeekNumberMonday(d, p) {
  return pad(__WEBPACK_IMPORTED_MODULE_0_d3_time__["P" /* utcMonday */].count(Object(__WEBPACK_IMPORTED_MODULE_0_d3_time__["_7" /* utcYear */])(d) - 1, d), p, 2);
}
 
function formatUTCYear(d, p) {
  return pad(d.getUTCFullYear() % 100, p, 2);
}
 
function formatUTCYearISO(d, p) {
  d = UTCdISO(d);
  return pad(d.getUTCFullYear() % 100, p, 2);
}
 
function formatUTCFullYear(d, p) {
  return pad(d.getUTCFullYear() % 10000, p, 4);
}
 
function formatUTCFullYearISO(d, p) {
  var day = d.getUTCDay();
  d = (day >= 4 || day === 0) ? Object(__WEBPACK_IMPORTED_MODULE_0_d3_time__["Z" /* utcThursday */])(d) : __WEBPACK_IMPORTED_MODULE_0_d3_time__["Z" /* utcThursday */].ceil(d);
  return pad(d.getUTCFullYear() % 10000, p, 4);
}
 
function formatUTCZone() {
  return "+0000";
}
 
function formatLiteralPercent() {
  return "%";
}
 
function formatUnixTimestamp(d) {
  return +d;
}
 
function formatUnixTimestampSeconds(d) {
  return Math.floor(+d / 1000);
}
 
 
/***/ }),
/* 766 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return isoSpecifier; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__defaultLocale_js__ = __webpack_require__(369);
 
 
var isoSpecifier = "%Y-%m-%dT%H:%M:%S.%LZ";
 
function formatIsoNative(date) {
  return date.toISOString();
}
 
var formatIso = Date.prototype.toISOString
    ? formatIsoNative
    : Object(__WEBPACK_IMPORTED_MODULE_0__defaultLocale_js__["d" /* utcFormat */])(isoSpecifier);
 
/* harmony default export */ __webpack_exports__["a"] = (formatIso);
 
 
/***/ }),
/* 767 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = copy;
/* harmony export (immutable) */ __webpack_exports__["b"] = sequential;
/* harmony export (immutable) */ __webpack_exports__["c"] = sequentialLog;
/* harmony export (immutable) */ __webpack_exports__["f"] = sequentialSymlog;
/* harmony export (immutable) */ __webpack_exports__["d"] = sequentialPow;
/* harmony export (immutable) */ __webpack_exports__["e"] = sequentialSqrt;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__continuous__ = __webpack_require__(103);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__init__ = __webpack_require__(57);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__linear__ = __webpack_require__(123);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__log__ = __webpack_require__(365);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__symlog__ = __webpack_require__(366);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__pow__ = __webpack_require__(367);
 
 
 
 
 
 
 
function transformer() {
  var x0 = 0,
      x1 = 1,
      t0,
      t1,
      k10,
      transform,
      interpolator = __WEBPACK_IMPORTED_MODULE_0__continuous__["c" /* identity */],
      clamp = false,
      unknown;
 
  function scale(x) {
    return isNaN(x = +x) ? unknown : interpolator(k10 === 0 ? 0.5 : (x = (transform(x) - t0) * k10, clamp ? Math.max(0, Math.min(1, x)) : x));
  }
 
  scale.domain = function(_) {
    return arguments.length ? (t0 = transform(x0 = +_[0]), t1 = transform(x1 = +_[1]), k10 = t0 === t1 ? 0 : 1 / (t1 - t0), scale) : [x0, x1];
  };
 
  scale.clamp = function(_) {
    return arguments.length ? (clamp = !!_, scale) : clamp;
  };
 
  scale.interpolator = function(_) {
    return arguments.length ? (interpolator = _, scale) : interpolator;
  };
 
  scale.unknown = function(_) {
    return arguments.length ? (unknown = _, scale) : unknown;
  };
 
  return function(t) {
    transform = t, t0 = t(x0), t1 = t(x1), k10 = t0 === t1 ? 0 : 1 / (t1 - t0);
    return scale;
  };
}
 
function copy(source, target) {
  return target
      .domain(source.domain())
      .interpolator(source.interpolator())
      .clamp(source.clamp())
      .unknown(source.unknown());
}
 
function sequential() {
  var scale = Object(__WEBPACK_IMPORTED_MODULE_2__linear__["b" /* linearish */])(transformer()(__WEBPACK_IMPORTED_MODULE_0__continuous__["c" /* identity */]));
 
  scale.copy = function() {
    return copy(scale, sequential());
  };
 
  return __WEBPACK_IMPORTED_MODULE_1__init__["a" /* initInterpolator */].apply(scale, arguments);
}
 
function sequentialLog() {
  var scale = Object(__WEBPACK_IMPORTED_MODULE_3__log__["b" /* loggish */])(transformer()).domain([1, 10]);
 
  scale.copy = function() {
    return copy(scale, sequentialLog()).base(scale.base());
  };
 
  return __WEBPACK_IMPORTED_MODULE_1__init__["a" /* initInterpolator */].apply(scale, arguments);
}
 
function sequentialSymlog() {
  var scale = Object(__WEBPACK_IMPORTED_MODULE_4__symlog__["b" /* symlogish */])(transformer());
 
  scale.copy = function() {
    return copy(scale, sequentialSymlog()).constant(scale.constant());
  };
 
  return __WEBPACK_IMPORTED_MODULE_1__init__["a" /* initInterpolator */].apply(scale, arguments);
}
 
function sequentialPow() {
  var scale = Object(__WEBPACK_IMPORTED_MODULE_5__pow__["b" /* powish */])(transformer());
 
  scale.copy = function() {
    return copy(scale, sequentialPow()).exponent(scale.exponent());
  };
 
  return __WEBPACK_IMPORTED_MODULE_1__init__["a" /* initInterpolator */].apply(scale, arguments);
}
 
function sequentialSqrt() {
  return sequentialPow.apply(null, arguments).exponent(0.5);
}
 
 
/***/ }),
/* 768 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_d3_path__ = __webpack_require__(120);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__constant_js__ = __webpack_require__(124);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__curve_linear_js__ = __webpack_require__(257);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__line_js__ = __webpack_require__(370);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__point_js__ = __webpack_require__(371);
 
 
 
 
 
 
/* harmony default export */ __webpack_exports__["a"] = (function() {
  var x0 = __WEBPACK_IMPORTED_MODULE_4__point_js__["a" /* x */],
      x1 = null,
      y0 = Object(__WEBPACK_IMPORTED_MODULE_1__constant_js__["a" /* default */])(0),
      y1 = __WEBPACK_IMPORTED_MODULE_4__point_js__["b" /* y */],
      defined = Object(__WEBPACK_IMPORTED_MODULE_1__constant_js__["a" /* default */])(true),
      context = null,
      curve = __WEBPACK_IMPORTED_MODULE_2__curve_linear_js__["a" /* default */],
      output = null;
 
  function area(data) {
    var i,
        j,
        k,
        n = data.length,
        d,
        defined0 = false,
        buffer,
        x0z = new Array(n),
        y0z = new Array(n);
 
    if (context == null) output = curve(buffer = Object(__WEBPACK_IMPORTED_MODULE_0_d3_path__["a" /* path */])());
 
    for (i = 0; i <= n; ++i) {
      if (!(i < n && defined(d = data[i], i, data)) === defined0) {
        if (defined0 = !defined0) {
          j = i;
          output.areaStart();
          output.lineStart();
        } else {
          output.lineEnd();
          output.lineStart();
          for (k = i - 1; k >= j; --k) {
            output.point(x0z[k], y0z[k]);
          }
          output.lineEnd();
          output.areaEnd();
        }
      }
      if (defined0) {
        x0z[i] = +x0(d, i, data), y0z[i] = +y0(d, i, data);
        output.point(x1 ? +x1(d, i, data) : x0z[i], y1 ? +y1(d, i, data) : y0z[i]);
      }
    }
 
    if (buffer) return output = null, buffer + "" || null;
  }
 
  function arealine() {
    return Object(__WEBPACK_IMPORTED_MODULE_3__line_js__["a" /* default */])().defined(defined).curve(curve).context(context);
  }
 
  area.x = function(_) {
    return arguments.length ? (x0 = typeof _ === "function" ? _ : Object(__WEBPACK_IMPORTED_MODULE_1__constant_js__["a" /* default */])(+_), x1 = null, area) : x0;
  };
 
  area.x0 = function(_) {
    return arguments.length ? (x0 = typeof _ === "function" ? _ : Object(__WEBPACK_IMPORTED_MODULE_1__constant_js__["a" /* default */])(+_), area) : x0;
  };
 
  area.x1 = function(_) {
    return arguments.length ? (x1 = _ == null ? null : typeof _ === "function" ? _ : Object(__WEBPACK_IMPORTED_MODULE_1__constant_js__["a" /* default */])(+_), area) : x1;
  };
 
  area.y = function(_) {
    return arguments.length ? (y0 = typeof _ === "function" ? _ : Object(__WEBPACK_IMPORTED_MODULE_1__constant_js__["a" /* default */])(+_), y1 = null, area) : y0;
  };
 
  area.y0 = function(_) {
    return arguments.length ? (y0 = typeof _ === "function" ? _ : Object(__WEBPACK_IMPORTED_MODULE_1__constant_js__["a" /* default */])(+_), area) : y0;
  };
 
  area.y1 = function(_) {
    return arguments.length ? (y1 = _ == null ? null : typeof _ === "function" ? _ : Object(__WEBPACK_IMPORTED_MODULE_1__constant_js__["a" /* default */])(+_), area) : y1;
  };
 
  area.lineX0 =
  area.lineY0 = function() {
    return arealine().x(x0).y(y0);
  };
 
  area.lineY1 = function() {
    return arealine().x(x0).y(y1);
  };
 
  area.lineX1 = function() {
    return arealine().x(x1).y(y0);
  };
 
  area.defined = function(_) {
    return arguments.length ? (defined = typeof _ === "function" ? _ : Object(__WEBPACK_IMPORTED_MODULE_1__constant_js__["a" /* default */])(!!_), area) : defined;
  };
 
  area.curve = function(_) {
    return arguments.length ? (curve = _, context != null && (output = curve(context)), area) : curve;
  };
 
  area.context = function(_) {
    return arguments.length ? (_ == null ? context = output = null : output = curve(context = _), area) : context;
  };
 
  return area;
});
 
 
/***/ }),
/* 769 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return curveRadialLinear; });
/* harmony export (immutable) */ __webpack_exports__["b"] = curveRadial;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__linear_js__ = __webpack_require__(257);
 
 
var curveRadialLinear = curveRadial(__WEBPACK_IMPORTED_MODULE_0__linear_js__["a" /* default */]);
 
function Radial(curve) {
  this._curve = curve;
}
 
Radial.prototype = {
  areaStart: function() {
    this._curve.areaStart();
  },
  areaEnd: function() {
    this._curve.areaEnd();
  },
  lineStart: function() {
    this._curve.lineStart();
  },
  lineEnd: function() {
    this._curve.lineEnd();
  },
  point: function(a, r) {
    this._curve.point(r * Math.sin(a), r * -Math.cos(a));
  }
};
 
function curveRadial(curve) {
 
  function radial(context) {
    return new Radial(curve(context));
  }
 
  radial._curve = curve;
 
  return radial;
}
 
 
/***/ }),
/* 770 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["b"] = lineRadial;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__curve_radial_js__ = __webpack_require__(769);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__line_js__ = __webpack_require__(370);
 
 
 
function lineRadial(l) {
  var c = l.curve;
 
  l.angle = l.x, delete l.x;
  l.radius = l.y, delete l.y;
 
  l.curve = function(_) {
    return arguments.length ? c(Object(__WEBPACK_IMPORTED_MODULE_0__curve_radial_js__["b" /* default */])(_)) : c()._curve;
  };
 
  return l;
}
 
/* harmony default export */ __webpack_exports__["a"] = (function() {
  return lineRadial(Object(__WEBPACK_IMPORTED_MODULE_1__line_js__["a" /* default */])().curve(__WEBPACK_IMPORTED_MODULE_0__curve_radial_js__["a" /* curveRadialLinear */]));
});
 
 
/***/ }),
/* 771 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony default export */ __webpack_exports__["a"] = (function(x, y) {
  return [(y = +y) * Math.cos(x -= Math.PI / 2), y * Math.sin(x)];
});
 
 
/***/ }),
/* 772 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return slice; });
var slice = Array.prototype.slice;
 
 
/***/ }),
/* 773 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__math_js__ = __webpack_require__(191);
 
 
/* harmony default export */ __webpack_exports__["a"] = ({
  draw: function(context, size) {
    var r = Math.sqrt(size / __WEBPACK_IMPORTED_MODULE_0__math_js__["j" /* pi */]);
    context.moveTo(r, 0);
    context.arc(0, 0, r, 0, __WEBPACK_IMPORTED_MODULE_0__math_js__["m" /* tau */]);
  }
});
 
 
/***/ }),
/* 774 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony default export */ __webpack_exports__["a"] = ({
  draw: function(context, size) {
    var r = Math.sqrt(size / 5) / 2;
    context.moveTo(-3 * r, -r);
    context.lineTo(-r, -r);
    context.lineTo(-r, -3 * r);
    context.lineTo(r, -3 * r);
    context.lineTo(r, -r);
    context.lineTo(3 * r, -r);
    context.lineTo(3 * r, r);
    context.lineTo(r, r);
    context.lineTo(r, 3 * r);
    context.lineTo(-r, 3 * r);
    context.lineTo(-r, r);
    context.lineTo(-3 * r, r);
    context.closePath();
  }
});
 
 
/***/ }),
/* 775 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
var tan30 = Math.sqrt(1 / 3),
    tan30_2 = tan30 * 2;
 
/* harmony default export */ __webpack_exports__["a"] = ({
  draw: function(context, size) {
    var y = Math.sqrt(size / tan30_2),
        x = y * tan30;
    context.moveTo(0, -y);
    context.lineTo(x, 0);
    context.lineTo(0, y);
    context.lineTo(-x, 0);
    context.closePath();
  }
});
 
 
/***/ }),
/* 776 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__math_js__ = __webpack_require__(191);
 
 
var ka = 0.89081309152928522810,
    kr = Math.sin(__WEBPACK_IMPORTED_MODULE_0__math_js__["j" /* pi */] / 10) / Math.sin(7 * __WEBPACK_IMPORTED_MODULE_0__math_js__["j" /* pi */] / 10),
    kx = Math.sin(__WEBPACK_IMPORTED_MODULE_0__math_js__["m" /* tau */] / 10) * kr,
    ky = -Math.cos(__WEBPACK_IMPORTED_MODULE_0__math_js__["m" /* tau */] / 10) * kr;
 
/* harmony default export */ __webpack_exports__["a"] = ({
  draw: function(context, size) {
    var r = Math.sqrt(size * ka),
        x = kx * r,
        y = ky * r;
    context.moveTo(0, -r);
    context.lineTo(x, y);
    for (var i = 1; i < 5; ++i) {
      var a = __WEBPACK_IMPORTED_MODULE_0__math_js__["m" /* tau */] * i / 5,
          c = Math.cos(a),
          s = Math.sin(a);
      context.lineTo(s * r, -c * r);
      context.lineTo(c * x - s * y, s * x + c * y);
    }
    context.closePath();
  }
});
 
 
/***/ }),
/* 777 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony default export */ __webpack_exports__["a"] = ({
  draw: function(context, size) {
    var w = Math.sqrt(size),
        x = -w / 2;
    context.rect(x, x, w, w);
  }
});
 
 
/***/ }),
/* 778 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
var sqrt3 = Math.sqrt(3);
 
/* harmony default export */ __webpack_exports__["a"] = ({
  draw: function(context, size) {
    var y = -Math.sqrt(size / (sqrt3 * 3));
    context.moveTo(0, y * 2);
    context.lineTo(-sqrt3 * y, -y);
    context.lineTo(sqrt3 * y, -y);
    context.closePath();
  }
});
 
 
/***/ }),
/* 779 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
var c = -0.5,
    s = Math.sqrt(3) / 2,
    k = 1 / Math.sqrt(12),
    a = (k / 2 + 1) * 3;
 
/* harmony default export */ __webpack_exports__["a"] = ({
  draw: function(context, size) {
    var r = Math.sqrt(size / a),
        x0 = r / 2,
        y0 = r * k,
        x1 = x0,
        y1 = r * k + r,
        x2 = -x1,
        y2 = y1;
    context.moveTo(x0, y0);
    context.lineTo(x1, y1);
    context.lineTo(x2, y2);
    context.lineTo(c * x0 - s * y0, s * x0 + c * y0);
    context.lineTo(c * x1 - s * y1, s * x1 + c * y1);
    context.lineTo(c * x2 - s * y2, s * x2 + c * y2);
    context.lineTo(c * x0 + s * y0, c * y0 - s * x0);
    context.lineTo(c * x1 + s * y1, c * y1 - s * x1);
    context.lineTo(c * x2 + s * y2, c * y2 - s * x2);
    context.closePath();
  }
});
 
 
/***/ }),
/* 780 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = CardinalClosed;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__noop_js__ = __webpack_require__(258);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__cardinal_js__ = __webpack_require__(260);
 
 
 
function CardinalClosed(context, tension) {
  this._context = context;
  this._k = (1 - tension) / 6;
}
 
CardinalClosed.prototype = {
  areaStart: __WEBPACK_IMPORTED_MODULE_0__noop_js__["a" /* default */],
  areaEnd: __WEBPACK_IMPORTED_MODULE_0__noop_js__["a" /* default */],
  lineStart: function() {
    this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._x5 =
    this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = this._y5 = NaN;
    this._point = 0;
  },
  lineEnd: function() {
    switch (this._point) {
      case 1: {
        this._context.moveTo(this._x3, this._y3);
        this._context.closePath();
        break;
      }
      case 2: {
        this._context.lineTo(this._x3, this._y3);
        this._context.closePath();
        break;
      }
      case 3: {
        this.point(this._x3, this._y3);
        this.point(this._x4, this._y4);
        this.point(this._x5, this._y5);
        break;
      }
    }
  },
  point: function(x, y) {
    x = +x, y = +y;
    switch (this._point) {
      case 0: this._point = 1; this._x3 = x, this._y3 = y; break;
      case 1: this._point = 2; this._context.moveTo(this._x4 = x, this._y4 = y); break;
      case 2: this._point = 3; this._x5 = x, this._y5 = y; break;
      default: Object(__WEBPACK_IMPORTED_MODULE_1__cardinal_js__["c" /* point */])(this, x, y); break;
    }
    this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;
    this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;
  }
};
 
/* harmony default export */ __webpack_exports__["b"] = ((function custom(tension) {
 
  function cardinal(context) {
    return new CardinalClosed(context, tension);
  }
 
  cardinal.tension = function(tension) {
    return custom(+tension);
  };
 
  return cardinal;
})(0));
 
 
/***/ }),
/* 781 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = CardinalOpen;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__cardinal_js__ = __webpack_require__(260);
 
 
function CardinalOpen(context, tension) {
  this._context = context;
  this._k = (1 - tension) / 6;
}
 
CardinalOpen.prototype = {
  areaStart: function() {
    this._line = 0;
  },
  areaEnd: function() {
    this._line = NaN;
  },
  lineStart: function() {
    this._x0 = this._x1 = this._x2 =
    this._y0 = this._y1 = this._y2 = NaN;
    this._point = 0;
  },
  lineEnd: function() {
    if (this._line || (this._line !== 0 && this._point === 3)) this._context.closePath();
    this._line = 1 - this._line;
  },
  point: function(x, y) {
    x = +x, y = +y;
    switch (this._point) {
      case 0: this._point = 1; break;
      case 1: this._point = 2; break;
      case 2: this._point = 3; this._line ? this._context.lineTo(this._x2, this._y2) : this._context.moveTo(this._x2, this._y2); break;
      case 3: this._point = 4; // proceed
      default: Object(__WEBPACK_IMPORTED_MODULE_0__cardinal_js__["c" /* point */])(this, x, y); break;
    }
    this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;
    this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;
  }
};
 
/* harmony default export */ __webpack_exports__["b"] = ((function custom(tension) {
 
  function cardinal(context) {
    return new CardinalOpen(context, tension);
  }
 
  cardinal.tension = function(tension) {
    return custom(+tension);
  };
 
  return cardinal;
})(0));
 
 
/***/ }),
/* 782 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__none_js__ = __webpack_require__(193);
 
 
/* harmony default export */ __webpack_exports__["a"] = (function(series) {
  var peaks = series.map(peak);
  return Object(__WEBPACK_IMPORTED_MODULE_0__none_js__["a" /* default */])(series).sort(function(a, b) { return peaks[a] - peaks[b]; });
});
 
function peak(series) {
  var i = -1, j = 0, n = series.length, vi, vj = -Infinity;
  while (++i < n) if ((vi = +series[i][1]) > vj) vj = vi, j = i;
  return j;
}
 
 
/***/ }),
/* 783 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["c"] = createCell;
/* harmony export (immutable) */ __webpack_exports__["a"] = cellHalfedgeStart;
/* unused harmony export cellHalfedgeEnd */
/* harmony export (immutable) */ __webpack_exports__["d"] = sortCellHalfedges;
/* harmony export (immutable) */ __webpack_exports__["b"] = clipCells;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Edge__ = __webpack_require__(375);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Diagram__ = __webpack_require__(194);
 
 
 
function createCell(site) {
  return __WEBPACK_IMPORTED_MODULE_1__Diagram__["b" /* cells */][site.index] = {
    site: site,
    halfedges: []
  };
}
 
function cellHalfedgeAngle(cell, edge) {
  var site = cell.site,
      va = edge.left,
      vb = edge.right;
  if (site === vb) vb = va, va = site;
  if (vb) return Math.atan2(vb[1] - va[1], vb[0] - va[0]);
  if (site === va) va = edge[1], vb = edge[0];
  else va = edge[0], vb = edge[1];
  return Math.atan2(va[0] - vb[0], vb[1] - va[1]);
}
 
function cellHalfedgeStart(cell, edge) {
  return edge[+(edge.left !== cell.site)];
}
 
function cellHalfedgeEnd(cell, edge) {
  return edge[+(edge.left === cell.site)];
}
 
function sortCellHalfedges() {
  for (var i = 0, n = __WEBPACK_IMPORTED_MODULE_1__Diagram__["b" /* cells */].length, cell, halfedges, j, m; i < n; ++i) {
    if ((cell = __WEBPACK_IMPORTED_MODULE_1__Diagram__["b" /* cells */][i]) && (m = (halfedges = cell.halfedges).length)) {
      var index = new Array(m),
          array = new Array(m);
      for (j = 0; j < m; ++j) index[j] = j, array[j] = cellHalfedgeAngle(cell, __WEBPACK_IMPORTED_MODULE_1__Diagram__["e" /* edges */][halfedges[j]]);
      index.sort(function(i, j) { return array[j] - array[i]; });
      for (j = 0; j < m; ++j) array[j] = halfedges[index[j]];
      for (j = 0; j < m; ++j) halfedges[j] = array[j];
    }
  }
}
 
function clipCells(x0, y0, x1, y1) {
  var nCells = __WEBPACK_IMPORTED_MODULE_1__Diagram__["b" /* cells */].length,
      iCell,
      cell,
      site,
      iHalfedge,
      halfedges,
      nHalfedges,
      start,
      startX,
      startY,
      end,
      endX,
      endY,
      cover = true;
 
  for (iCell = 0; iCell < nCells; ++iCell) {
    if (cell = __WEBPACK_IMPORTED_MODULE_1__Diagram__["b" /* cells */][iCell]) {
      site = cell.site;
      halfedges = cell.halfedges;
      iHalfedge = halfedges.length;
 
      // Remove any dangling clipped edges.
      while (iHalfedge--) {
        if (!__WEBPACK_IMPORTED_MODULE_1__Diagram__["e" /* edges */][halfedges[iHalfedge]]) {
          halfedges.splice(iHalfedge, 1);
        }
      }
 
      // Insert any border edges as necessary.
      iHalfedge = 0, nHalfedges = halfedges.length;
      while (iHalfedge < nHalfedges) {
        end = cellHalfedgeEnd(cell, __WEBPACK_IMPORTED_MODULE_1__Diagram__["e" /* edges */][halfedges[iHalfedge]]), endX = end[0], endY = end[1];
        start = cellHalfedgeStart(cell, __WEBPACK_IMPORTED_MODULE_1__Diagram__["e" /* edges */][halfedges[++iHalfedge % nHalfedges]]), startX = start[0], startY = start[1];
        if (Math.abs(endX - startX) > __WEBPACK_IMPORTED_MODULE_1__Diagram__["f" /* epsilon */] || Math.abs(endY - startY) > __WEBPACK_IMPORTED_MODULE_1__Diagram__["f" /* epsilon */]) {
          halfedges.splice(iHalfedge, 0, __WEBPACK_IMPORTED_MODULE_1__Diagram__["e" /* edges */].push(Object(__WEBPACK_IMPORTED_MODULE_0__Edge__["b" /* createBorderEdge */])(site, end,
              Math.abs(endX - x0) < __WEBPACK_IMPORTED_MODULE_1__Diagram__["f" /* epsilon */] && y1 - endY > __WEBPACK_IMPORTED_MODULE_1__Diagram__["f" /* epsilon */] ? [x0, Math.abs(startX - x0) < __WEBPACK_IMPORTED_MODULE_1__Diagram__["f" /* epsilon */] ? startY : y1]
              : Math.abs(endY - y1) < __WEBPACK_IMPORTED_MODULE_1__Diagram__["f" /* epsilon */] && x1 - endX > __WEBPACK_IMPORTED_MODULE_1__Diagram__["f" /* epsilon */] ? [Math.abs(startY - y1) < __WEBPACK_IMPORTED_MODULE_1__Diagram__["f" /* epsilon */] ? startX : x1, y1]
              : Math.abs(endX - x1) < __WEBPACK_IMPORTED_MODULE_1__Diagram__["f" /* epsilon */] && endY - y0 > __WEBPACK_IMPORTED_MODULE_1__Diagram__["f" /* epsilon */] ? [x1, Math.abs(startX - x1) < __WEBPACK_IMPORTED_MODULE_1__Diagram__["f" /* epsilon */] ? startY : y0]
              : Math.abs(endY - y0) < __WEBPACK_IMPORTED_MODULE_1__Diagram__["f" /* epsilon */] && endX - x0 > __WEBPACK_IMPORTED_MODULE_1__Diagram__["f" /* epsilon */] ? [Math.abs(startY - y0) < __WEBPACK_IMPORTED_MODULE_1__Diagram__["f" /* epsilon */] ? startX : x0, y0]
              : null)) - 1);
          ++nHalfedges;
        }
      }
 
      if (nHalfedges) cover = false;
    }
  }
 
  // If there weren’t any edges, have the closest site cover the extent.
  // It doesn’t matter which corner of the extent we measure!
  if (cover) {
    var dx, dy, d2, dc = Infinity;
 
    for (iCell = 0, cover = null; iCell < nCells; ++iCell) {
      if (cell = __WEBPACK_IMPORTED_MODULE_1__Diagram__["b" /* cells */][iCell]) {
        site = cell.site;
        dx = site[0] - x0;
        dy = site[1] - y0;
        d2 = dx * dx + dy * dy;
        if (d2 < dc) dc = d2, cover = cell;
      }
    }
 
    if (cover) {
      var v00 = [x0, y0], v01 = [x0, y1], v11 = [x1, y1], v10 = [x1, y0];
      cover.halfedges.push(
        __WEBPACK_IMPORTED_MODULE_1__Diagram__["e" /* edges */].push(Object(__WEBPACK_IMPORTED_MODULE_0__Edge__["b" /* createBorderEdge */])(site = cover.site, v00, v01)) - 1,
        __WEBPACK_IMPORTED_MODULE_1__Diagram__["e" /* edges */].push(Object(__WEBPACK_IMPORTED_MODULE_0__Edge__["b" /* createBorderEdge */])(site, v01, v11)) - 1,
        __WEBPACK_IMPORTED_MODULE_1__Diagram__["e" /* edges */].push(Object(__WEBPACK_IMPORTED_MODULE_0__Edge__["b" /* createBorderEdge */])(site, v11, v10)) - 1,
        __WEBPACK_IMPORTED_MODULE_1__Diagram__["e" /* edges */].push(Object(__WEBPACK_IMPORTED_MODULE_0__Edge__["b" /* createBorderEdge */])(site, v10, v00)) - 1
      );
    }
  }
 
  // Lastly delete any cells with no edges; these were entirely clipped.
  for (iCell = 0; iCell < nCells; ++iCell) {
    if (cell = __WEBPACK_IMPORTED_MODULE_1__Diagram__["b" /* cells */][iCell]) {
      if (!cell.halfedges.length) {
        delete __WEBPACK_IMPORTED_MODULE_1__Diagram__["b" /* cells */][iCell];
      }
    }
  }
}
 
 
/***/ }),
/* 784 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return firstCircle; });
/* harmony export (immutable) */ __webpack_exports__["a"] = attachCircle;
/* harmony export (immutable) */ __webpack_exports__["b"] = detachCircle;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__RedBlackTree__ = __webpack_require__(374);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Diagram__ = __webpack_require__(194);
 
 
 
var circlePool = [];
 
var firstCircle;
 
function Circle() {
  Object(__WEBPACK_IMPORTED_MODULE_0__RedBlackTree__["a" /* RedBlackNode */])(this);
  this.x =
  this.y =
  this.arc =
  this.site =
  this.cy = null;
}
 
function attachCircle(arc) {
  var lArc = arc.P,
      rArc = arc.N;
 
  if (!lArc || !rArc) return;
 
  var lSite = lArc.site,
      cSite = arc.site,
      rSite = rArc.site;
 
  if (lSite === rSite) return;
 
  var bx = cSite[0],
      by = cSite[1],
      ax = lSite[0] - bx,
      ay = lSite[1] - by,
      cx = rSite[0] - bx,
      cy = rSite[1] - by;
 
  var d = 2 * (ax * cy - ay * cx);
  if (d >= -__WEBPACK_IMPORTED_MODULE_1__Diagram__["g" /* epsilon2 */]) return;
 
  var ha = ax * ax + ay * ay,
      hc = cx * cx + cy * cy,
      x = (cy * ha - ay * hc) / d,
      y = (ax * hc - cx * ha) / d;
 
  var circle = circlePool.pop() || new Circle;
  circle.arc = arc;
  circle.site = cSite;
  circle.x = x + bx;
  circle.y = (circle.cy = y + by) + Math.sqrt(x * x + y * y); // y bottom
 
  arc.circle = circle;
 
  var before = null,
      node = __WEBPACK_IMPORTED_MODULE_1__Diagram__["c" /* circles */]._;
 
  while (node) {
    if (circle.y < node.y || (circle.y === node.y && circle.x <= node.x)) {
      if (node.L) node = node.L;
      else { before = node.P; break; }
    } else {
      if (node.R) node = node.R;
      else { before = node; break; }
    }
  }
 
  __WEBPACK_IMPORTED_MODULE_1__Diagram__["c" /* circles */].insert(before, circle);
  if (!before) firstCircle = circle;
}
 
function detachCircle(arc) {
  var circle = arc.circle;
  if (circle) {
    if (!circle.P) firstCircle = circle.N;
    __WEBPACK_IMPORTED_MODULE_1__Diagram__["c" /* circles */].remove(circle);
    circlePool.push(circle);
    Object(__WEBPACK_IMPORTED_MODULE_0__RedBlackTree__["a" /* RedBlackNode */])(circle);
    arc.circle = null;
  }
}
 
 
/***/ }),
/* 785 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = Transform;
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return identity; });
/* harmony export (immutable) */ __webpack_exports__["b"] = transform;
function Transform(k, x, y) {
  this.k = k;
  this.x = x;
  this.y = y;
}
 
Transform.prototype = {
  constructor: Transform,
  scale: function(k) {
    return k === 1 ? this : new Transform(this.k * k, this.x, this.y);
  },
  translate: function(x, y) {
    return x === 0 & y === 0 ? this : new Transform(this.k, this.x + this.k * x, this.y + this.k * y);
  },
  apply: function(point) {
    return [point[0] * this.k + this.x, point[1] * this.k + this.y];
  },
  applyX: function(x) {
    return x * this.k + this.x;
  },
  applyY: function(y) {
    return y * this.k + this.y;
  },
  invert: function(location) {
    return [(location[0] - this.x) / this.k, (location[1] - this.y) / this.k];
  },
  invertX: function(x) {
    return (x - this.x) / this.k;
  },
  invertY: function(y) {
    return (y - this.y) / this.k;
  },
  rescaleX: function(x) {
    return x.copy().domain(x.range().map(this.invertX, this).map(x.invert, x));
  },
  rescaleY: function(y) {
    return y.copy().domain(y.range().map(this.invertY, this).map(y.invert, y));
  },
  toString: function() {
    return "translate(" + this.x + "," + this.y + ") scale(" + this.k + ")";
  }
};
 
var identity = new Transform(1, 0, 0);
 
transform.prototype = Transform.prototype;
 
function transform(node) {
  while (!node.__zoom) if (!(node = node.parentNode)) return identity;
  return node.__zoom;
}
 
 
/***/ }),
/* 786 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
__webpack_require__(787);
var _ = __webpack_require__(1);
var OmniboxEvents_1 = __webpack_require__(47);
var GlobalExports_1 = __webpack_require__(10);
var Assert_1 = __webpack_require__(12);
var QueryStateModel_1 = __webpack_require__(17);
var Dom_1 = __webpack_require__(0);
var Utils_1 = __webpack_require__(5);
var AnalyticsActionListMeta_1 = __webpack_require__(7);
var Component_1 = __webpack_require__(6);
var ComponentOptions_1 = __webpack_require__(13);
var Initialization_1 = __webpack_require__(8);
var SuggestionForOmnibox_1 = __webpack_require__(664);
/**
 * The `FieldSuggestions` component provides query suggestions based on a particular facet field. For example, you could
 * use this component to provide auto-complete suggestions while the end user is typing the title of an item.
 *
 * The query suggestions provided by this component appear in the [`Omnibox`]{@link Omnibox} component.
 *
 * **Note:** Consider [providing Coveo ML query suggestions](https://docs.coveo.com/en/340/#providing-coveo-machine-learning-query-suggestions)
 * rather than field suggestions, as the former yields better performance and relevance.
 */
var FieldSuggestions = /** @class */ (function (_super) {
    __extends(FieldSuggestions, _super);
    /**
     * Creates a new `FieldSuggestions` component.
     * @param element The HTMLElement on which to instantiate the component.
     * @param options The options for the `FieldSuggestions` component.
     * @param bindings The bindings that the component requires to function normally. If not set, these will be
     * automatically resolved (with a slower execution time).
     */
    function FieldSuggestions(element, options, bindings) {
        var _this = _super.call(this, element, FieldSuggestions.ID, bindings) || this;
        _this.options = options;
        Iif (_this.options && 'omniboxSuggestionOptions' in _this.options) {
            _this.options = _.extend(_this.options, _this.options['omniboxSuggestionOptions']);
        }
        _this.options = ComponentOptions_1.ComponentOptions.initComponentOptions(element, FieldSuggestions, options);
        Assert_1.Assert.check(Utils_1.Utils.isCoveoField(_this.options.field), _this.options.field + ' is not a valid field');
        _this.options.onSelect = _this.options.onSelect || _this.onRowSelection;
        var rowTemplate = function (toRender) {
            var rowElement = Dom_1.$$('div', {
                className: 'magic-box-suggestion coveo-omnibox-selectable coveo-top-field-suggestion-row'
            });
            Eif (toRender['data']) {
                rowElement.el.innerHTML = toRender['data'];
            }
            return rowElement.el.outerHTML;
        };
        var suggestionStructure;
        if (_this.options.headerTitle == null) {
            suggestionStructure = {
                row: rowTemplate
            };
        }
        else {
            var headerTemplate = function () {
                var headerElement = Dom_1.$$('div', {
                    className: 'coveo-top-field-suggestion-header'
                });
                var iconElement = Dom_1.$$('span', {
                    className: 'coveo-icon-top-field'
                });
                var captionElement = Dom_1.$$('span', {
                    className: 'coveo-caption'
                });
                Eif (_this.options.headerTitle) {
                    captionElement.text(_this.options.headerTitle);
                }
                headerElement.append(iconElement.el);
                headerElement.append(captionElement.el);
                return headerElement.el.outerHTML;
            };
            suggestionStructure = {
                header: { template: headerTemplate, title: _this.options.headerTitle },
                row: rowTemplate
            };
        }
        _this.suggestionForOmnibox = new SuggestionForOmnibox_1.SuggestionForOmnibox(suggestionStructure, function (value, args) {
            _this.options.onSelect.call(_this, value, args);
        }, function (value, args) {
            _this.onRowTab(value, args);
        });
        _this.bind.onRootElement(OmniboxEvents_1.OmniboxEvents.populateOmnibox, function (args) { return _this.handlePopulateOmnibox(args); });
        return _this;
    }
    /**
     * Selects a currently displayed query suggestion. This implies that at least one suggestion must have been returned
     * at least once.
     * @param suggestion Either a number (0-based index position of the query suggestion to select) or a string that
     * matches the suggestion to select.
     */
    FieldSuggestions.prototype.selectSuggestion = function (suggestion) {
        if (this.currentlyDisplayedSuggestions) {
            Iif (isNaN(suggestion)) {
                if (this.currentlyDisplayedSuggestions[suggestion]) {
                    Dom_1.$$(this.currentlyDisplayedSuggestions[suggestion].element).trigger('click');
                }
            }
            else {
                var currentlySuggested = _.findWhere(this.currentlyDisplayedSuggestions, {
                    pos: suggestion
                });
                Eif (currentlySuggested) {
                    Dom_1.$$(currentlySuggested.element).trigger('click');
                }
            }
        }
    };
    FieldSuggestions.prototype.handlePopulateOmnibox = function (args) {
        var _this = this;
        Assert_1.Assert.exists(args);
        var valueToSearch = args.completeQueryExpression.word;
        var promise = new Promise(function (resolve) {
            _this.queryController
                .getEndpoint()
                .listFieldValues(_this.buildListFieldValueRequest(valueToSearch))
                .then(function (results) {
                var element = _this.suggestionForOmnibox.buildOmniboxElement(results, args);
                _this.currentlyDisplayedSuggestions = {};
                Eif (element) {
                    _.map(Dom_1.$$(element).findAll('.coveo-omnibox-selectable'), function (selectable, i) {
                        _this.currentlyDisplayedSuggestions[Dom_1.$$(selectable).text()] = {
                            element: selectable,
                            pos: i
                        };
                    });
                    resolve({
                        element: element,
                        zIndex: _this.options.omniboxZIndex
                    });
                }
                else {
                    resolve({
                        element: undefined
                    });
                }
            })
                .catch(function () {
                resolve({
                    element: undefined
                });
            });
        });
        args.rows.push({
            deferred: promise
        });
    };
    FieldSuggestions.prototype.onRowSelection = function (value, args) {
        args.closeOmnibox();
        this.queryStateModel.set(QueryStateModel_1.QueryStateModel.attributesEnum.q, value);
        this.usageAnalytics.logSearchEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.omniboxField, {});
        this.queryController.executeQuery();
    };
    FieldSuggestions.prototype.onRowTab = function (value, args) {
        args.clear();
        args.closeOmnibox();
        this.queryStateModel.set(QueryStateModel_1.QueryStateModel.attributesEnum.q, "" + value);
        this.usageAnalytics.logCustomEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.omniboxField, {}, this.element);
    };
    FieldSuggestions.prototype.buildListFieldValueRequest = function (valueToSearch) {
        return {
            field: this.options.field,
            ignoreAccents: true,
            sortCriteria: 'occurrences',
            maximumNumberOfValues: this.options.numberOfSuggestions,
            patternType: 'Wildcards',
            pattern: '*' + valueToSearch + '*',
            queryOverride: this.options.queryOverride
        };
    };
    FieldSuggestions.ID = 'FieldSuggestions';
    FieldSuggestions.doExport = function () {
        GlobalExports_1.exportGlobally({
            FieldSuggestions: FieldSuggestions
        });
    };
    /**
     * @componentOptions
     */
    FieldSuggestions.options = {
        /**
         * Specifies the facet field from which to provide suggestions.
         *
         * Specifying a value for this option is required for the `FieldSuggestions` component to work.
         */
        field: ComponentOptions_1.ComponentOptions.buildFieldOption({ required: true }),
        /**
         * Specifies a query override to apply when retrieving suggestions. You can use any valid query expression (see
         * [Coveo Query Syntax Reference](https://docs.coveo.com/en/1552/searching-with-coveo/coveo-cloud-query-syntax)).
         *
         * Default value is the empty string, and the component applies no query override.
         */
        queryOverride: ComponentOptions_1.ComponentOptions.buildQueryExpressionOption({ defaultValue: '' }),
        /**
         * Specifies the z-index position at which the suggestions render themselves in the [`Omnibox`]{@link Omnibox}.
         *
         * When there are multiple suggestion providers, components with higher `omniboxZIndex` values render themselves
         * first.
         *
         * Default value is `51`. Minimum value is `0`.
         */
        omniboxZIndex: ComponentOptions_1.ComponentOptions.buildNumberOption({ defaultValue: 51, min: 0 }),
        /**
         * Specifies the title of the result suggestions group in the [`Omnibox`]{@link Omnibox} component.
         * If not provided, the component will simply not output any title.
         *
         * Default value is `null`.
         */
        headerTitle: ComponentOptions_1.ComponentOptions.buildLocalizedStringOption(),
        /**
         * Specifies the number of suggestions to render in the [`Omnibox`]{@link Omnibox}.
         *
         * Default value is `5`. Minimum value is `1`.
         */
        numberOfSuggestions: ComponentOptions_1.ComponentOptions.buildNumberOption({ defaultValue: 5, min: 1 }),
        /**
         * Specifies the event handler function to execute when the end user selects a suggested value in the
         * [`Omnibox`]{@link Omnibox}. By default, the query box text is replaced by what the end user selected and a new
         * query is executed. You can, however, replace this default behavior by providing a callback function to execute
         * when the value is selected.
         *
         * **Note:**
         * > You cannot set this option directly in the component markup as an HTML attribute. You must either set it in the
         * > [`init`]{@link init} call of your search interface (see
         * > [Passing Component Options in the init Call](https://docs.coveo.com/en/346/#passing-component-options-in-the-init-call)),
         * > or before the `init` call, using the `options` top-level function (see
         * > [Passing Component Options Before the init Call](https://docs.coveo.com/en/346/#passing-component-options-before-the-init-call)).
         *
         * **Example:**
         *
         * ```javascript
         *
         * var myOnSelectFunction = function(selectedValue, populateOmniboxEventArgs) {
         *
         *   // Close the suggestion list when the user clicks a suggestion.
         *   populateOmniboxEventArgs.closeOmnibox();
         *
         *   // Search for matching title results in the default endpoint.
         *   Coveo.SearchEndpoint.endpoints["default"].search({
         *     q: "@title==" + selectedValue
         *   }).done(function(results) {
         *
         *     // If more than one result is found, select a result that matches the selected title.
         *     var foundResult = Coveo._.find(results.results, function(result) {
         *       return selectedValue == result.raw.title;
         *     });
         *
         *     // Open the found result in the current window, or log an error.
         *     if (foundResult) {
         *       window.location = foundResult.clickUri;
         *     }
         *     else {
         *       new Coveo.Logger.warn("Selected suggested result '" + selectedValue + "' not found.");
         *     }
         *   });
         * };
         *
         * // You can set the option in the 'init' call:
         * Coveo.init(document.querySelector("#search"), {
         *    FieldSuggestions : {
         *      onSelect : myOnSelectFunction
         *    }
         * });
         *
         * // Or before the 'init' call, using the 'options' top-level function:
         * // Coveo.options(document.querySelector("#search"), {
         * //   FieldSuggestions : {
         * //     onSelect : myOnSelectFunction
         * //   }
         * // });
         * ```
         */
        onSelect: ComponentOptions_1.ComponentOptions.buildCustomOption(function () {
            return null;
        })
    };
    return FieldSuggestions;
}(Component_1.Component));
exports.FieldSuggestions = FieldSuggestions;
Initialization_1.Initialization.registerAutoCreateComponent(FieldSuggestions);
 
 
/***/ }),
/* 787 */
/***/ (function(module, exports) {
 
// empty (null-loader)
 
/***/ }),
/* 788 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __assign = (this && this.__assign) || Object.assign || function(t) {
    for (var s, i = 1, n = arguments.length; i < n; i++) {
        s = arguments[i];
        for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
            t[p] = s[p];
    }
    return t;
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { Iif (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        Iif (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            Iif (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
            Iif (y = 0, t) op = [0, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    Iif (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    Iif (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    Iif (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        Iif (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
Object.defineProperty(exports, "__esModule", { value: true });
__webpack_require__(787);
var _ = __webpack_require__(1);
var OmniboxEvents_1 = __webpack_require__(47);
var GlobalExports_1 = __webpack_require__(10);
var MiscModules_1 = __webpack_require__(97);
var ModelsModules_1 = __webpack_require__(476);
var Dom_1 = __webpack_require__(0);
var UtilsModules_1 = __webpack_require__(67);
var AnalyticsActionListMeta_1 = __webpack_require__(7);
var Component_1 = __webpack_require__(6);
var ComponentOptions_1 = __webpack_require__(13);
var Initialization_1 = __webpack_require__(8);
var FacetValueSuggestionsProvider_1 = __webpack_require__(789);
/**
 * This component provides [`Omnibox`]{@link Omnibox} query suggestions scoped to distinct categories based on the values of a
 * specific [`field`]{@link FacetValueSuggestions.options.field} whose [Facet](https://docs.coveo.com/en/1982/#facet) option is enabled.
 *
 * @externaldocs [Providing Facet Value Suggestions](https://docs.coveo.com/en/340/#providing-facet-value-suggestions)
 *
 * @availablesince [May 2018 Release (v2.4094.8)](https://docs.coveo.com/410/#may-2018-release-v240948)
 */
var FacetValueSuggestions = /** @class */ (function (_super) {
    __extends(FacetValueSuggestions, _super);
    /**
     * Creates a new `FacetValueSuggestions` component.
     * @param element The HTMLElement on which to instantiate the component.
     * @param options The options for the `FacetValueSuggestions` component.
     * @param bindings The bindings that the component requires to function normally. If not set, these will be
     * automatically resolved (with a slower execution time).
     */
    function FacetValueSuggestions(element, options, bindings) {
        var _this = _super.call(this, element, FacetValueSuggestions.ID, bindings) || this;
        _this.options = options;
        _this.options = ComponentOptions_1.ComponentOptions.initComponentOptions(element, FacetValueSuggestions, options);
        _this.facetValueSuggestionsProvider = new FacetValueSuggestionsProvider_1.FacetValueSuggestionsProvider(_this.queryController, {
            field: _this.options.field,
            expression: _this.options.expression
        });
        _this.queryStateFieldFacetId = "f:" + _this.options.field;
        Eif (!_this.options.templateHelper) {
            _this.options.templateHelper = FacetValueSuggestions.defaultTemplate;
        }
        Dom_1.$$(_this.root).on(OmniboxEvents_1.OmniboxEvents.populateOmniboxSuggestions, function (e, args) {
            args.suggestions.push(_this.getSuggestions(args.omnibox));
        });
        return _this;
    }
    FacetValueSuggestions.defaultTemplate = function (row, omnibox) {
        var keyword = row.keyword.html;
        var facetValue = UtilsModules_1.DomUtils.highlight(row.value, 'coveo-omnibox-hightlight');
        var details = this.options.displayEstimateNumberOfResults
            ? UtilsModules_1.DomUtils.highlight(" (" + MiscModules_1.l('ResultCount', row.numberOfResults.toString(), row.numberOfResults) + ")", 'coveo-omnibox-suggestion-results-count', true)
            : '';
        return "" + MiscModules_1.l('KeywordInCategory', keyword, facetValue) + details;
    };
    FacetValueSuggestions.getQuerySuggestionKeywordFromText = function (text) {
        return {
            text: text,
            html: UtilsModules_1.DomUtils.highlight(text, 'coveo-omnibox-hightlight')
        };
    };
    FacetValueSuggestions.prototype.getSuggestions = function (omnibox) {
        return __awaiter(this, void 0, void 0, function () {
            var text, suggestions;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        if (this.options.numberOfSuggestions == 0) {
                            return [2 /*return*/, []];
                        }
                        text = omnibox.getText();
                        return [4 /*yield*/, this.getFacetValueSuggestions(text, omnibox)];
                    case 1:
                        suggestions = _a.sent();
                        return [2 /*return*/, suggestions || []];
                }
            });
        });
    };
    FacetValueSuggestions.prototype.getQuerySuggestionsKeywords = function (omnibox) {
        return __awaiter(this, void 0, void 0, function () {
            var suggestions;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        if (!(this.options.useQuerySuggestions && omnibox.suggestionAddon)) return [3 /*break*/, 2];
                        return [4 /*yield*/, omnibox.suggestionAddon.getSuggestion()];
                    case 1:
                        suggestions = _a.sent();
                        return [2 /*return*/, suggestions.map(function (_a) {
                                var text = _a.text, html = _a.html;
                                return ({ text: text || '', html: html });
                            })];
                    case 2: return [2 /*return*/, []];
                }
            });
        });
    };
    FacetValueSuggestions.prototype.getFacetValueSuggestions = function (text, omnibox) {
        return __awaiter(this, void 0, void 0, function () {
            var wordsToQuery, suggestionsKeywords, allKeywordsToQuery;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        wordsToQuery = this.options.useValueFromSearchbox ? [FacetValueSuggestions.getQuerySuggestionKeywordFromText(text)] : [];
                        return [4 /*yield*/, this.getQuerySuggestionsKeywords(omnibox)];
                    case 1:
                        suggestionsKeywords = _a.sent();
                        allKeywordsToQuery = _.unique(wordsToQuery.concat(suggestionsKeywords).filter(function (keyword) { return keyword.text != ''; }), function (keyword) { return keyword.text; });
                        if (allKeywordsToQuery.length === 0) {
                            return [2 /*return*/, []];
                        }
                        return [2 /*return*/, this.getSuggestionsForWords(allKeywordsToQuery, omnibox)];
                }
            });
        });
    };
    FacetValueSuggestions.prototype.getSuggestionsForWords = function (keywordToQuery, omnibox) {
        return __awaiter(this, void 0, void 0, function () {
            var _this = this;
            var suggestions, currentSelectedValues_1, filteredSuggestions, error_1;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        _a.trys.push([0, 2, , 3]);
                        return [4 /*yield*/, this.facetValueSuggestionsProvider.getSuggestions(keywordToQuery)];
                    case 1:
                        suggestions = _a.sent();
                        this.logger.debug('FacetValue Suggestions Results', suggestions);
                        currentSelectedValues_1 = this.queryStateModel.get(this.queryStateFieldFacetId) || [];
                        filteredSuggestions = suggestions.filter(function (suggestion) {
                            return _this.isSuggestionRowAlreadyCheckedInFacet(suggestion, currentSelectedValues_1);
                        });
                        return [2 /*return*/, this.rankSuggestionRows(filteredSuggestions).map(function (result) { return _this.mapFacetValueSuggestion(result, omnibox); })];
                    case 2:
                        error_1 = _a.sent();
                        this.logger.error(error_1);
                        return [2 /*return*/, []];
                    case 3: return [2 /*return*/];
                }
            });
        });
    };
    FacetValueSuggestions.prototype.isSuggestionRowAlreadyCheckedInFacet = function (suggestion, currentlySelectedValues) {
        return !currentlySelectedValues.some(function (value) { return value == suggestion.value; });
    };
    FacetValueSuggestions.prototype.rankSuggestionRows = function (suggestions) {
        var rankedResults = suggestions.sort(function (a, b) { return b.score.distanceFromTotalForField - a.score.distanceFromTotalForField; }).slice();
        var firstSlice = Math.ceil(this.options.numberOfSuggestions / 2);
        var lastSlice = -Math.floor(this.options.numberOfSuggestions / 2);
        var firstResultsToReturn = rankedResults.splice(0, firstSlice);
        if (lastSlice != 0) {
            var lastResultsToReturn = rankedResults.slice(lastSlice);
            return firstResultsToReturn.concat(lastResultsToReturn);
        }
        return firstResultsToReturn;
    };
    FacetValueSuggestions.prototype.mapFacetValueSuggestion = function (resultToShow, omnibox) {
        var _this = this;
        var suggestion = {
            html: this.buildDisplayNameForRow(resultToShow, omnibox),
            text: resultToShow.keyword.text
        };
        var fieldValues = this.options.isCategoryField
            ? resultToShow.value.split(this.options.categoryFieldDelimitingCharacter)
            : [resultToShow.value];
        suggestion.advancedQuery = fieldValues.map(function (value) { return _this.options.field + "==\"" + value + "\""; }).join(' AND ');
        suggestion.onSelect = function () { return _this.onSuggestionSelected(suggestion, fieldValues, omnibox); };
        return suggestion;
    };
    FacetValueSuggestions.prototype.buildDisplayNameForRow = function (row, omnibox) {
        try {
            return this.options.templateHelper.call(this, row, omnibox);
        }
        catch (ex) {
            this.logger.error('Could not apply template from options for the given row. Will use default template.', ex, row, omnibox);
            return FacetValueSuggestions.defaultTemplate.call(this, row, omnibox);
        }
    };
    FacetValueSuggestions.prototype.onSuggestionSelected = function (suggestion, fieldValues, omnibox) {
        omnibox.setText(suggestion.text);
        // Copy the state here, else it will directly modify queryStateModel.defaultAttributes.fv.
        var fvState = __assign({}, this.queryStateModel.get(ModelsModules_1.QueryStateModel.attributesEnum.fv));
        var existingValues = fvState[this.options.field.toString()] || [];
        fvState[this.options.field.toString()] = existingValues.concat(fieldValues);
        this.queryStateModel.set(ModelsModules_1.QueryStateModel.attributesEnum.fv, fvState);
        omnibox.magicBox.blur();
        this.usageAnalytics.logSearchEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.omniboxField, {});
        this.queryController.executeQuery();
    };
    FacetValueSuggestions.ID = 'FacetValueSuggestions';
    FacetValueSuggestions.doExport = function () {
        GlobalExports_1.exportGlobally({
            FacetValueSuggestions: FacetValueSuggestions
        });
    };
    /**
     * @componentOptions
     */
    FacetValueSuggestions.options = {
        /**
         * The field on whose values the scoped query suggestions should be based.
         *
         * @examples @productcategory
         */
        field: ComponentOptions_1.ComponentOptions.buildFieldOption({ required: true }),
        /**
         * The maximum number of suggestions to render in the [`Omnibox`]{@link Omnibox}.
         */
        numberOfSuggestions: ComponentOptions_1.ComponentOptions.buildNumberOption({ defaultValue: 5, min: 1 }),
        /**
         * Whether to get scoped query suggestions from the current Coveo ML query suggestions.
         *
         * **Notes:**
         * - If this option is set to `true`, the [`enableQuerySuggestAddon`]{@link Omnibox.options.enableQuerySuggestAddon} option of the [`Omnibox`]{@link Omnibox} component must be set to `true` as well.
         * - If this option is set to `true`, an additional `POST` HTTP request is sent to `https://platform.cloud.coveo.com/rest/search/v2/querySuggest`.
         */
        useQuerySuggestions: ComponentOptions_1.ComponentOptions.buildBooleanOption({ defaultValue: true }),
        /**
         * Whether to get scoped query suggestions from the current user query entered in the search box.
         *
         * **Default:** `true` if [`useQuerySuggestions`]{@link FacetValueSuggestions.options.useQuerySuggestions} is `false`; `false` otherwise
         */
        useValueFromSearchbox: ComponentOptions_1.ComponentOptions.buildBooleanOption({
            postProcessing: function (value, options) {
                return value || !options.useQuerySuggestions;
            }
        }),
        /**
         * Whether to display an estimate of the number of results for each scoped query suggestions.
         *
         * **Notes:**
         * - Setting this option to `true` has no effect when the [`templateHelper`]{@link FacetValueSuggestions.options.templateHelper} options is set.
         * - When displaying scoped query suggestions for a standalone search box whose queries are redirected to a search interface enforcing other filters, the number of results will be inaccurate.
         */
        displayEstimateNumberOfResults: ComponentOptions_1.ComponentOptions.buildBooleanOption({ defaultValue: false }),
        /**
         * The template helper function to execute when rendering each scoped query suggestion.
         *
         * If specified, the function must have the following signature: (row: [IFacetValueSuggestionRow]{@link IFacetValueSuggestionRow}, omnibox: Omnibox) => string
         *
         * If not specified, a default function will be used.
         *
         * **Note:** You cannot set this option directly in the component markup as an HTML attribute. You must either set it:
         * - In the [`init`]{@link init} call of your search interface (see [Passing Component Options in the init Call](https://docs.coveo.com/en/346/#passing-component-options-in-the-init-call)
         * - Before the `init` call, using the [`options`](@link options) top-level function (see [Passing Component Options Before the init Call](https://docs.coveo.com/en/346/#passing-component-options-before-the-init-call)).
         *
         * **Example:**
         *
         * ```javascript
         * Coveo.init(document.getElementById('search'), {
         *   FacetValueSuggestions: {
         *     templateHelper: (row, omnibox) => { return `Searching for <strong>${row.keyword}</strong> in category <em>${row.value}</em>`; }
         *   }
         * })
         * ```
         */
        templateHelper: ComponentOptions_1.ComponentOptions.buildCustomOption(function () {
            return null;
        }),
        /**
         * Whether the [`field`]{@link FacetValueSuggestions.options.field} option references a multi-value field.
         *
         * Setting this option to `true` if appropriate will allow the corresponding [`CategoryFacet`]{@link CategoryFacet} or [`DynamicHierarchicalFacet`]{@link DynamicHierarchicalFacet} component (if present) to properly handle the filter format.
         *
         * See also the [`categoryFieldDelimitingCharacter`]{@link FacetValueSuggestions.options.categoryFieldDelimitingCharacter} option.
         */
        isCategoryField: ComponentOptions_1.ComponentOptions.buildBooleanOption({ defaultValue: false }),
        /**
         * The delimiting character used for the multi-value field referenced by the [`field`]{@link FacetValueSuggestions.options.field} option.
         *
         * @examples ;, #
         */
        categoryFieldDelimitingCharacter: ComponentOptions_1.ComponentOptions.buildStringOption({ defaultValue: '|', depend: 'isCategoryField' }),
        /**
         * An advanced query expression to add when requesting facet value suggestions.
         *
         * Set this option to ensure that the suggestions are properly scoped when using the component with a standalone search box. For instance, if a certain [tab]{@link Tab} is automatically selected in the search interface the standalone search box is redirecting its queries to, you should set this option to that tab's [`expression`]{@link Tab.options.expression}.
         *
         * @examples @objecttype==Message
         */
        expression: ComponentOptions_1.ComponentOptions.buildQueryExpressionOption()
    };
    return FacetValueSuggestions;
}(Component_1.Component));
exports.FacetValueSuggestions = FacetValueSuggestions;
Initialization_1.Initialization.registerAutoCreateComponent(FacetValueSuggestions);
 
 
/***/ }),
/* 789 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { Iif (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        Iif (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            Iif (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
            Iif (y = 0, t) op = [0, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    Eif (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        Iif (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
Object.defineProperty(exports, "__esModule", { value: true });
var FacetValueSuggestionsProvider = /** @class */ (function () {
    function FacetValueSuggestionsProvider(queryController, options) {
        this.queryController = queryController;
        this.options = options;
    }
    FacetValueSuggestionsProvider.prototype.getSuggestions = function (valuesToSearch) {
        return __awaiter(this, void 0, void 0, function () {
            var fieldsToQuery;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0: return [4 /*yield*/, this.getFieldValuesToQuery(valuesToSearch)];
                    case 1:
                        fieldsToQuery = _a.sent();
                        return [2 /*return*/, this.getAllSuggestionsRows(fieldsToQuery.responses, fieldsToQuery.reference)];
                }
            });
        });
    };
    FacetValueSuggestionsProvider.prototype.getAllSuggestionsRows = function (fieldResponses, fieldTotalReference) {
        var _this = this;
        return fieldResponses.reduce(function (allValues, fieldResponse) {
            var suggestionRows = fieldResponse.values.map(function (indexFieldValue) {
                return {
                    numberOfResults: indexFieldValue.numberOfResults,
                    keyword: fieldResponse.keyword,
                    value: indexFieldValue.value,
                    score: _this.computeScoreForSuggestionRow(indexFieldValue, fieldTotalReference),
                    field: _this.options.field
                };
            });
            return allValues.concat(suggestionRows);
        }, []);
    };
    FacetValueSuggestionsProvider.prototype.getFieldValuesToQuery = function (valuesToSearch) {
        return __awaiter(this, void 0, void 0, function () {
            var _this = this;
            var referenceValuesRequest, queryParts, suggestionValuesRequests, requests, values, reference, responses;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        referenceValuesRequest = this.buildReferenceFieldValueRequest();
                        queryParts = this.getQueryToExecuteParts();
                        if (this.options.expression) {
                            queryParts.push(this.options.expression);
                        }
                        suggestionValuesRequests = valuesToSearch.map(function (keyword) {
                            var queryToExecute = queryParts.concat([keyword.text]).join(' ');
                            return _this.buildListFieldValueRequest(queryToExecute);
                        });
                        requests = suggestionValuesRequests.concat([referenceValuesRequest]);
                        return [4 /*yield*/, this.queryController.getEndpoint().listFieldValuesBatch({
                                batch: requests
                            })];
                    case 1:
                        values = _a.sent();
                        reference = this.computeReferenceFromBatch(values.pop());
                        responses = values.map(function (value, i) {
                            return {
                                keyword: valuesToSearch[i],
                                values: value
                            };
                        });
                        return [2 /*return*/, {
                                responses: responses,
                                reference: reference
                            }];
                }
            });
        });
    };
    FacetValueSuggestionsProvider.prototype.computeScoreForSuggestionRow = function (fieldValue, reference) {
        var totalNumberForFieldValue = reference.fieldsTotal[fieldValue.value] || reference.smallestTotal;
        var distanceFromTotalForField = (totalNumberForFieldValue - fieldValue.numberOfResults) / totalNumberForFieldValue * 100;
        return {
            distanceFromTotalForField: distanceFromTotalForField
        };
    };
    FacetValueSuggestionsProvider.prototype.computeReferenceFromBatch = function (batch) {
        var fieldsTotal = {};
        batch.forEach(function (value) { return (fieldsTotal[value.value] = value.numberOfResults); });
        return {
            fieldsTotal: fieldsTotal,
            smallestTotal: batch[batch.length - 1].numberOfResults
        };
    };
    FacetValueSuggestionsProvider.prototype.buildListFieldValueRequest = function (queryToExecute) {
        return {
            field: this.options.field,
            ignoreAccents: true,
            maximumNumberOfValues: 3,
            queryOverride: queryToExecute
        };
    };
    FacetValueSuggestionsProvider.prototype.buildReferenceFieldValueRequest = function () {
        return {
            field: this.options.field
        };
    };
    FacetValueSuggestionsProvider.prototype.getQueryToExecuteParts = function () {
        var lastQuery = this.queryController.getLastQuery();
        var aqWithoutCurrentField = lastQuery && lastQuery.aq ? this.removeFieldExpressionFromExpression(this.options.field.toString(), lastQuery.aq) : '';
        return [aqWithoutCurrentField, lastQuery.cq].filter(function (part) { return !!part; });
    };
    FacetValueSuggestionsProvider.prototype.removeFieldExpressionFromExpression = function (field, expression) {
        var expressionWithParenthesis = '([^)]*)';
        var expressionAsSingleValue = '[^ ]*';
        return expression
            .replace(new RegExp(field + "==" + expressionWithParenthesis, 'gi'), '')
            .replace(new RegExp(field + "==" + expressionAsSingleValue, 'gi'), '');
    };
    return FacetValueSuggestionsProvider;
}());
exports.FacetValueSuggestionsProvider = FacetValueSuggestionsProvider;
 
 
/***/ }),
/* 790 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
var _ = __webpack_require__(1);
var SearchAlertEvents_1 = __webpack_require__(86);
var GlobalExports_1 = __webpack_require__(10);
var Assert_1 = __webpack_require__(12);
var Subscription_1 = __webpack_require__(261);
var Strings_1 = __webpack_require__(4);
var Dom_1 = __webpack_require__(0);
var KeyboardUtils_1 = __webpack_require__(35);
var QueryUtils_1 = __webpack_require__(37);
var SVGDom_1 = __webpack_require__(23);
var SVGIcons_1 = __webpack_require__(16);
var Utils_1 = __webpack_require__(5);
var AnalyticsActionListMeta_1 = __webpack_require__(7);
var Component_1 = __webpack_require__(6);
var ComponentOptions_1 = __webpack_require__(13);
var Initialization_1 = __webpack_require__(8);
/**
 * The FollowItem component renders a widget that the end user can click to follow a particular item. A user following
 * an item receives email notifications when the item changes.
 *
 * **Note:**
 * > A {@link SearchAlerts} component must be present in the page for this component to work. It is also necessary to
 * > meet certain requirements to be able to use this component (see
 * > [Deploying Search Alerts on a Coveo JS Search Page](https://docs.coveo.com/en/1932/)).
 *
 * This component is a result template component (see [Result Templates](https://docs.coveo.com/en/413/)).
 */
var FollowItem = /** @class */ (function (_super) {
    __extends(FollowItem, _super);
    /**
     * Creates a new FollowItem component.
     * @param element The HTMLElement on which to instantiate the component.
     * @param options The options for the FollowItem component.
     * @param bindings The bindings that the component requires to function normally. If not set, these will be
     * automatically resolved (with a slower execution time)
     * @param result The result to associate the component with.
     */
    function FollowItem(element, options, bindings, result) {
        var _this = _super.call(this, element, FollowItem.ID, bindings) || this;
        _this.element = element;
        _this.options = options;
        _this.bindings = bindings;
        _this.result = result;
        _this.options = ComponentOptions_1.ComponentOptions.initComponentOptions(element, FollowItem, options);
        Assert_1.Assert.exists(_this.result);
        _this.container = Dom_1.$$(_this.element);
        _this.text = Dom_1.$$('span');
        var icon = _this.buildIcon();
        var loadingIcon = _this.buildLoadingIcon();
        _this.container.append(icon);
        _this.container.append(loadingIcon);
        _this.container.append(_this.text.el);
        _this.container.on('click', function () { return _this.toggleFollow(); });
        _this.container.setAttribute('tabindex', '0');
        _this.bind.on(_this.container, 'keyup', KeyboardUtils_1.KeyboardUtils.keypressAction(KeyboardUtils_1.KEYBOARD.ENTER, function () { return _this.toggleFollow(); }));
        _this.bind.onRootElement(SearchAlertEvents_1.SearchAlertsEvents.searchAlertsDeleted, function (args) { return _this.handleSubscriptionDeleted(args); });
        _this.bind.onRootElement(SearchAlertEvents_1.SearchAlertsEvents.searchAlertsCreated, function (args) { return _this.handleSubscriptionCreated(args); });
        _this.container.addClass('coveo-follow-item-loading');
        _this.updateIsFollowed();
        return _this;
    }
    FollowItem.prototype.setFollowed = function (subscription) {
        this.container.removeClass('coveo-follow-item-loading');
        this.subscription = subscription;
        this.container.addClass('coveo-follow-item-followed');
        this.text.text(Strings_1.l('SearchAlerts_unFollowing'));
    };
    FollowItem.prototype.setNotFollowed = function () {
        this.container.removeClass('coveo-follow-item-loading');
        this.subscription = FollowItem.buildFollowRequest(this.getId(), this.result.title, this.options);
        this.container.removeClass('coveo-follow-item-followed');
        this.text.text(Strings_1.l('SearchAlerts_follow'));
    };
    /**
     * Follows the item if not already following it. Stops following the item otherwise.
     *
     * Also logs the appropriate event in the usage analytics (either `searchAlertsFollowDocument` or
     * `searchAlertsUnfollowDocument`).
     */
    FollowItem.prototype.toggleFollow = function () {
        var _this = this;
        Eif (!this.container.hasClass('coveo-follow-item-loading')) {
            this.container.removeClass('coveo-follow-item-followed');
            this.container.addClass('coveo-follow-item-loading');
            if (this.subscription.id) {
                this.logAnalyticsEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.searchAlertsUnfollowDocument);
                this.queryController
                    .getEndpoint()
                    .deleteSubscription(this.subscription)
                    .then(function () {
                    var eventArgs = {
                        subscription: _this.subscription,
                        dom: _this.element
                    };
                    Dom_1.$$(_this.root).trigger(SearchAlertEvents_1.SearchAlertsEvents.searchAlertsDeleted, eventArgs);
                })
                    .catch(function () {
                    _this.container.removeClass('coveo-follow-item-loading');
                    var eventArgs = {
                        dom: _this.element
                    };
                    Dom_1.$$(_this.root).trigger(SearchAlertEvents_1.SearchAlertsEvents.searchAlertsFail, eventArgs);
                });
            }
            else {
                this.logAnalyticsEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.searchAlertsFollowDocument);
                this.queryController
                    .getEndpoint()
                    .follow(this.subscription)
                    .then(function (subscription) {
                    var eventArgs = {
                        subscription: subscription,
                        dom: _this.element
                    };
                    Dom_1.$$(_this.root).trigger(SearchAlertEvents_1.SearchAlertsEvents.searchAlertsCreated, eventArgs);
                })
                    .catch(function () {
                    _this.container.removeClass('coveo-follow-item-loading');
                    var eventArgs = {
                        dom: _this.element
                    };
                    Dom_1.$$(_this.root).trigger(SearchAlertEvents_1.SearchAlertsEvents.searchAlertsFail, eventArgs);
                });
            }
        }
    };
    FollowItem.prototype.getText = function () {
        return this.text.text();
    };
    FollowItem.prototype.updateIsFollowed = function () {
        var _this = this;
        this.queryController
            .getEndpoint()
            .listSubscriptions()
            .then(function (subscriptions) {
            if (_.isArray(subscriptions)) {
                var subscription = _.find(subscriptions, function (subscription) {
                    var typeConfig = subscription.typeConfig;
                    return typeConfig && typeConfig.id != null && typeConfig.id == _this.getId();
                });
                if (subscription != null) {
                    _this.setFollowed(subscription);
                }
                else {
                    _this.setNotFollowed();
                }
            }
            else {
                _this.remove();
            }
        })
            .catch(function () {
            _this.remove();
        });
    };
    FollowItem.prototype.buildIcon = function () {
        var icon = Dom_1.$$('span', { className: 'coveo-follow-item-icon' }, SVGIcons_1.SVGIcons.icons.dropdownFollowQuery);
        SVGDom_1.SVGDom.addClassToSVGInContainer(icon.el, 'coveo-follow-item-icon-svg');
        return icon.el;
    };
    FollowItem.prototype.buildLoadingIcon = function () {
        var loadingIcon = Dom_1.$$('span', { className: 'coveo-follow-item-icon-loading' }, SVGIcons_1.SVGIcons.icons.loading);
        SVGDom_1.SVGDom.addClassToSVGInContainer(loadingIcon.el, 'coveo-follow-item-icon-loading-svg');
        return loadingIcon.el;
    };
    FollowItem.prototype.handleSubscriptionDeleted = function (args) {
        if (args.subscription && args.subscription.type == Subscription_1.SUBSCRIPTION_TYPE.followDocument) {
            var typeConfig = args.subscription.typeConfig;
            Eif (typeConfig.id == this.getId()) {
                this.setNotFollowed();
            }
        }
    };
    FollowItem.prototype.handleSubscriptionCreated = function (args) {
        if (args.subscription && args.subscription.type == Subscription_1.SUBSCRIPTION_TYPE.followDocument) {
            var typeConfig = args.subscription.typeConfig;
            Eif (typeConfig.id == this.getId()) {
                this.setFollowed(args.subscription);
            }
        }
    };
    FollowItem.prototype.remove = function () {
        this.element.parentElement && this.element.parentElement.removeChild(this.element);
    };
    FollowItem.prototype.getId = function () {
        return Utils_1.Utils.getFieldValue(this.result, 'sysurihash') || Utils_1.Utils.getFieldValue(this.result, 'urihash');
    };
    FollowItem.buildFollowRequest = function (id, title, options) {
        var typeCofig = {
            id: id,
            title: title
        };
        Iif (options.modifiedDateField) {
            typeCofig.modifiedDateField = options.modifiedDateField;
        }
        Iif (options.watchedFields) {
            typeCofig.watchedFields = options.watchedFields;
        }
        return {
            type: Subscription_1.SUBSCRIPTION_TYPE.followDocument,
            typeConfig: typeCofig,
            name: title
        };
    };
    FollowItem.prototype.logAnalyticsEvent = function (type) {
        this.usageAnalytics.logCustomEvent(type, {
            author: QueryUtils_1.QueryUtils.getAuthor(this.result),
            documentLanguage: QueryUtils_1.QueryUtils.getLanguage(this.result),
            documentSource: QueryUtils_1.QueryUtils.getSource(this.result),
            documentTitle: this.result.title,
            contentIDValue: QueryUtils_1.QueryUtils.getPermanentId(this.result).fieldValue,
            contentIDKey: QueryUtils_1.QueryUtils.getPermanentId(this.result).fieldUsed
        }, this.element);
    };
    FollowItem.ID = 'FollowItem';
    FollowItem.doExport = function () {
        GlobalExports_1.exportGlobally({
            FollowItem: FollowItem
        });
    };
    /**
     * The options for the follow item component
     * @componentOptions
     */
    FollowItem.options = {
        /**
         * Specifies the {@link ISubscriptionItemRequest.watchedFields} to use when sending the
         * {@link ISubscriptionItemRequest}.
         *
         * Default value is `undefined`.
         */
        watchedFields: ComponentOptions_1.ComponentOptions.buildFieldsOption(),
        /**
         * Specifies the {@link ISubscriptionItemRequest.modifiedDateField} to use when sending the
         * {@link ISubscriptionItemRequest}.
         *
         * Default value is `undefined`.
         */
        modifiedDateField: ComponentOptions_1.ComponentOptions.buildStringOption()
    };
    return FollowItem;
}(Component_1.Component));
exports.FollowItem = FollowItem;
Initialization_1.Initialization.registerAutoCreateComponent(FollowItem);
 
 
/***/ }),
/* 791 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
var Component_1 = __webpack_require__(6);
var ComponentOptions_1 = __webpack_require__(13);
var Strings_1 = __webpack_require__(4);
var QueryEvents_1 = __webpack_require__(14);
var BreadcrumbEvents_1 = __webpack_require__(33);
var AnalyticsActionListMeta_1 = __webpack_require__(7);
var QueryStateModel_1 = __webpack_require__(17);
var Dom_1 = __webpack_require__(0);
var Utils_1 = __webpack_require__(5);
var Initialization_1 = __webpack_require__(8);
var Assert_1 = __webpack_require__(12);
var _ = __webpack_require__(1);
var GlobalExports_1 = __webpack_require__(10);
__webpack_require__(1470);
var SVGIcons_1 = __webpack_require__(16);
/**
 * The HiddenQuery component handles a "hidden" query parameter (`hq`) and its description (`hd`).
 *
 * Concretely, this means that if a HiddenQuery component is present in your page and you load your search interface
 * with `hq=foo&hd=bar` in the URL hash, the component adds `foo` as an expression to the query (`hq` is the hidden
 * query) and renders `bar` in the {@link Breadcrumb} (`hd` is the hidden query description).
 */
var HiddenQuery = /** @class */ (function (_super) {
    __extends(HiddenQuery, _super);
    /**
     * Creates a new HiddenQuery component, which binds multiple events ({@link QueryEvents.buildingQuery},
     * {@link BreadcrumbEvents.populateBreadcrumb} and {@link BreadcrumbEvents.clearBreadcrumb}).
     * @param element The HTMLElement on which to instantiate the component.
     * @param options The options for the HiddenQuery component.
     * @param bindings The bindings that the component requires to function normally. If not set, these will be
     * automatically resolved (with a slower execution time).
     */
    function HiddenQuery(element, options, bindings) {
        var _this = _super.call(this, element, HiddenQuery.ID, bindings) || this;
        _this.element = element;
        _this.options = options;
        _this.options = ComponentOptions_1.ComponentOptions.initComponentOptions(element, HiddenQuery, options);
        _this.bind.onRootElement(QueryEvents_1.QueryEvents.buildingQuery, function (args) { return _this.handleBuildingQuery(args); });
        _this.bind.onRootElement(BreadcrumbEvents_1.BreadcrumbEvents.populateBreadcrumb, function (args) {
            return _this.handlePopulateBreadcrumb(args);
        });
        _this.bind.onRootElement(BreadcrumbEvents_1.BreadcrumbEvents.clearBreadcrumb, function () { return _this.setStateEmpty(); });
        return _this;
    }
    /**
     * Clears any `hd` or `hq` set in the {@link QueryStateModel}.
     * Also logs the `contextRemove` event in the usage analytics and triggers a new query.
     */
    HiddenQuery.prototype.clear = function () {
        this.setStateEmpty();
        var hiddenDescriptionRemoved = this.getDescription();
        this.usageAnalytics.logSearchEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.contextRemove, {
            contextName: hiddenDescriptionRemoved
        });
        this.queryController.executeQuery();
    };
    HiddenQuery.prototype.setStateEmpty = function () {
        this.queryStateModel.set(QueryStateModel_1.QUERY_STATE_ATTRIBUTES.HD, '');
        this.queryStateModel.set(QueryStateModel_1.QUERY_STATE_ATTRIBUTES.HQ, '');
    };
    HiddenQuery.prototype.handleBuildingQuery = function (data) {
        Assert_1.Assert.exists(data);
        var hiddenQuery = this.queryStateModel.get(QueryStateModel_1.QUERY_STATE_ATTRIBUTES.HQ);
        if (Utils_1.Utils.isNonEmptyString(hiddenQuery)) {
            data.queryBuilder.advancedExpression.add(hiddenQuery);
        }
    };
    HiddenQuery.prototype.handlePopulateBreadcrumb = function (args) {
        var _this = this;
        var description = this.getDescription();
        if (!_.isEmpty(description) && !_.isEmpty(this.queryStateModel.get(QueryStateModel_1.QUERY_STATE_ATTRIBUTES.HQ))) {
            var elem = document.createElement('div');
            Dom_1.$$(elem).addClass('coveo-hidden-query-breadcrumb');
            var title = document.createElement('span');
            Dom_1.$$(title).addClass('coveo-hidden-query-breadcrumb-title');
            Dom_1.$$(title).text(this.options.title);
            elem.appendChild(title);
            var value = Dom_1.$$('span', { className: 'coveo-hidden-query-breadcrumb-value' }, _.escape(description)).el;
            elem.appendChild(value);
            var clear = Dom_1.$$('span', { className: 'coveo-hidden-query-breadcrumb-clear' }, SVGIcons_1.SVGIcons.icons.mainClear);
            value.appendChild(clear.el);
            Dom_1.$$(value).on('click', function () { return _this.clear(); });
            args.breadcrumbs.push({
                element: elem
            });
        }
    };
    HiddenQuery.prototype.getDescription = function () {
        var description = this.queryStateModel.get(QueryStateModel_1.QueryStateModel.attributesEnum.hd);
        if (_.isEmpty(description)) {
            description = this.queryStateModel.get(QueryStateModel_1.QueryStateModel.attributesEnum.hq);
        }
        if (!_.isEmpty(description)) {
            if (description.length > this.options.maximumDescriptionLength) {
                description = description.slice(0, this.options.maximumDescriptionLength) + ' ...';
            }
        }
        return description;
    };
    HiddenQuery.ID = 'HiddenQuery';
    HiddenQuery.doExport = function () {
        GlobalExports_1.exportGlobally({
            HiddenQuery: HiddenQuery
        });
    };
    /**
     * Possible options for the `HiddenQuery` component
     * @componentOptions
     */
    HiddenQuery.options = {
        /**
         * Specifies the maximum number of characters from the hidden query description (`hd`) to display in the
         * {@link Breadcrumb}.
         *
         * Beyond this length, the HiddenQuery component slices the rest of the description and replaces it by `...`.
         *
         * Default value is `100`. Minimum value is `0`.
         */
        maximumDescriptionLength: ComponentOptions_1.ComponentOptions.buildNumberOption({ min: 0, defaultValue: 100 }),
        /**
         * Specifies the title that should appear in the {@link Breadcrumb} when the HiddenQuery populates it.
         *
         * Default value is the localized string f
         * or `"Additional filters:"`
         */
        title: ComponentOptions_1.ComponentOptions.buildLocalizedStringOption({
            localizedString: function () { return Strings_1.l('AdditionalFilters') + ':'; }
        })
    };
    return HiddenQuery;
}(Component_1.Component));
exports.HiddenQuery = HiddenQuery;
Initialization_1.Initialization.registerAutoCreateComponent(HiddenQuery);
 
 
/***/ }),
/* 792 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
/// <reference path="../../controllers/HierarchicalFacetQueryController.ts" />
/// <reference path="HierarchicalFacetValuesList.ts" />
/// <reference path="HierarchicalFacetSearch.ts" />
/// <reference path="HierarchicalBreadcrumbValuesList.ts" />
/// <reference path="HierarchicalFacetValueElement.ts" />
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __assign = (this && this.__assign) || Object.assign || function(t) {
    for (var s, i = 1, n = arguments.length; i < n; i++) {
        s = arguments[i];
        for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
            t[p] = s[p];
    }
    return t;
};
Object.defineProperty(exports, "__esModule", { value: true });
var FacetValue_1 = __webpack_require__(51);
var Facet_1 = __webpack_require__(32);
var ComponentOptions_1 = __webpack_require__(13);
var HierarchicalFacetValuesList_1 = __webpack_require__(1471);
var HierarchicalFacetQueryController_1 = __webpack_require__(1472);
var Utils_1 = __webpack_require__(5);
var Dom_1 = __webpack_require__(0);
var Defer_1 = __webpack_require__(31);
var HierarchicalFacetSearchValuesList_1 = __webpack_require__(1473);
var HierarchicalFacetSearch_1 = __webpack_require__(1475);
var HierarchicalBreadcrumbValuesList_1 = __webpack_require__(1476);
var Assert_1 = __webpack_require__(12);
var OmniboxHierarchicalValuesList_1 = __webpack_require__(1478);
var HierarchicalFacetValueElement_1 = __webpack_require__(1480);
var Initialization_1 = __webpack_require__(8);
var _ = __webpack_require__(1);
var GlobalExports_1 = __webpack_require__(10);
__webpack_require__(1481);
var SVGIcons_1 = __webpack_require__(16);
var SVGDom_1 = __webpack_require__(23);
var ResponsiveFacetOptions_1 = __webpack_require__(100);
var AccessibleButton_1 = __webpack_require__(20);
/**
 * @deprecated This component is exposed for legacy reasons. Instead, use the {@link CategoryFacet} component, which is more performant and easier to use.
 *
 * The `HierarchicalFacet` component inherits all of its options and behaviors from the [`Facet`]{@link Facet}
 * component, but is meant to be used to render hierarchical values.
 *
 * **Note:**
 * > The `HierarchicalFacet` component does not support the [`customSort`]{@link Facet.options.customSort}
 * > `Facet` option.
 *
 * The `HierarchicalFacet` component can be used to display files in a file system, or categories for items in a
 * hierarchy.
 *
 * This facet requires a group by field with a special format to work correctly.
 *
 * **Example:**
 *
 * You have the following files indexed on a file system:
 * ```
 * c:\
 *   folder1\
 *     text1.txt
 *   folder2\
 *     folder3\
 *       text2.txt
 * ```
 * The `text1.txt` item would have a field with the following format:
 * `c; c|folder1;`
 *
 * The `text2.txt` item would have a field with the following format:
 * `c; c|folder2; c|folder2|folder3;`
 *
 * By default, the `|` character determines the hierarchy (`folder3` inside `folder2` inside `c`).
 *
 * Since both items contain the `c` value, selecting it value in the facet would return both items.
 *
 * Selecting the `folder3` value in the facet would only return the `text2.txt` item.
 *
 * @notSupportedIn salesforcefree
 *
 * @deprecatedSince [January 2019 Release (v2.5395.12)](https://docs.coveo.com/en/2763/)
 */
var HierarchicalFacet = /** @class */ (function (_super) {
    __extends(HierarchicalFacet, _super);
    /**
     * Creates a new `HierarchicalFacet` component.
     * @param element The HTMLElement on which to instantiate the component.
     * @param options The options for the `HierarchicalFacet` component.
     * @param bindings The bindings that the component requires to function normally. If not set, these will be
     * automatically resolved (with a slower execution time).
     */
    function HierarchicalFacet(element, options, bindings) {
        var _this = _super.call(this, element, options, bindings, HierarchicalFacet.ID) || this;
        _this.element = element;
        _this.bindings = bindings;
        _this.shouldReshuffleFacetValuesClientSide = false;
        _this.isFieldValueCompatible = false;
        _this.correctLevels = [];
        _this.options = ComponentOptions_1.ComponentOptions.initComponentOptions(element, HierarchicalFacet, _this.options);
        _this.numberOfValuesToShow = _this.originalNumberOfValuesToShow = _this.options.numberOfValues || 5;
        _this.numberOfValues = Math.max(_this.options.numberOfValues, 10000);
        _this.options.injectionDepth = Math.max(_this.options.injectionDepth, 10000);
        _this.logger.info('Hierarchy facet: Set number of values very high in order to build hierarchy', _this.numberOfValues, _this);
        _this.logger.info('Hierarchy facet: Set injection depth very high in order to build hierarchy', _this.options.injectionDepth);
        return _this;
    }
    /**
     * Selects a single value.
     * @param value The value to select.
     * @param selectChildren Specifies whether to also select all child values (if any). Default value is the opposite of
     * the [`useAnd`]{@link Facet.options.useAnd} option value set for this `HierarchicalFacet`.
     */
    HierarchicalFacet.prototype.selectValue = function (value, selectChildren) {
        Eif (selectChildren === void 0) { selectChildren = !this.options.useAnd; }
        this.ensureDom();
        this.ensureValueHierarchyExists([value]);
        var valueHierarchy = this.getValueFromHierarchy(value);
        Eif (selectChildren) {
            this.selectChilds(valueHierarchy, valueHierarchy.childs);
        }
        this.flagParentForSelection(valueHierarchy);
        _super.prototype.selectValue.call(this, value);
    };
    /**
     * Selects multiple values
     * @param values The array of values to select.
     * @param selectChildren Specifies whether to also select all child values (if any). Default value is the opposite of
     * the [`useAnd`]{@link Facet.options.useAnd} option value set for this `HierarchicalFacet`.
     */
    HierarchicalFacet.prototype.selectMultipleValues = function (values, selectChildren) {
        var _this = this;
        Eif (selectChildren === void 0) { selectChildren = !this.options.useAnd; }
        this.ensureDom();
        this.ensureValueHierarchyExists(values);
        _.each(values, function (value) {
            var valueHierarchy = _this.getValueFromHierarchy(value);
            _this.flagParentForSelection(valueHierarchy);
            Eif (selectChildren) {
                _.each(valueHierarchy.childs, function (child) {
                    _this.selectValue(child.facetValue);
                });
            }
        });
        _super.prototype.selectMultipleValues.call(this, values);
    };
    /**
     * Deselects a single value
     * @param value The value to deselect.
     * @param deselectChildren Specifies whether to also deselect all child values (if any). Default value is `true`.
     */
    HierarchicalFacet.prototype.deselectValue = function (value, deselectChildren) {
        var _this = this;
        if (deselectChildren === void 0) { deselectChildren = true; }
        this.ensureDom();
        this.ensureValueHierarchyExists([value]);
        var valueHierarchy = this.getValueFromHierarchy(value);
        if (deselectChildren) {
            var hasChilds = valueHierarchy.childs != undefined;
            Eif (hasChilds) {
                var activeChilds = _.filter(valueHierarchy.childs, function (child) {
                    var valueToCompare = _this.getFacetValueFromHierarchy(child.facetValue);
                    return valueToCompare.selected || valueToCompare.excluded;
                });
                valueHierarchy.hasChildSelected = false;
                Eif (activeChilds.length == valueHierarchy.childs.length) {
                    this.deselectChilds(valueHierarchy, valueHierarchy.childs);
                }
            }
        }
        this.deselectParent(valueHierarchy.parent);
        this.unflagParentForSelection(valueHierarchy);
        _super.prototype.deselectValue.call(this, value);
    };
    /**
     * Excludes a single value.
     * @param value The value to exclude.
     * @param excludeChildren Specifies whether to also exclude all child values (if any). Default value is the opposite
     * of the [`useAnd`]{@link Facet.options.useAnd} option value set for this `HierarchicalFacet`.
     */
    HierarchicalFacet.prototype.excludeValue = function (value, excludeChildren) {
        if (excludeChildren === void 0) { excludeChildren = !this.options.useAnd; }
        this.ensureDom();
        this.ensureValueHierarchyExists([value]);
        var valueHierarchy = this.getValueFromHierarchy(value);
        if (excludeChildren) {
            this.excludeChilds(valueHierarchy.childs);
        }
        else {
            this.deselectChilds(valueHierarchy, valueHierarchy.childs);
            this.close(valueHierarchy);
        }
        this.flagParentForSelection(valueHierarchy);
        _super.prototype.excludeValue.call(this, value);
    };
    /**
     * Un-excludes a single value.
     * @param value The value to un-exclude.
     * @param unexludeChildren Specifies whether to also un-exclude all child values (if any). Default value is the
     * opposite of the [`useAnd`]{@link Facet.options.useAnd} option value set for this `HierarchicalFacet`.
     */
    HierarchicalFacet.prototype.unexcludeValue = function (value, unexludeChildren) {
        if (unexludeChildren === void 0) { unexludeChildren = !this.options.useAnd; }
        this.ensureDom();
        this.ensureValueHierarchyExists([value]);
        var valueHierarchy = this.getValueFromHierarchy(value);
        if (unexludeChildren) {
            this.unexcludeChilds(valueHierarchy.childs);
        }
        this.unflagParentForSelection(valueHierarchy);
        _super.prototype.unexcludeValue.call(this, value);
    };
    /**
     * Deselects multiple values.
     * @param values The array of values to deselect.
     * @param deselectChildren Specifies whether to also deselect all child values (if any). Default value is the opposite
     * of the [`useAnd`]{@link Facet.options.useAnd} option value set for this `HierarchicalFacet`.
     */
    HierarchicalFacet.prototype.deselectMultipleValues = function (values, deselectChildren) {
        var _this = this;
        Eif (deselectChildren === void 0) { deselectChildren = !this.options.useAnd; }
        this.ensureDom();
        this.ensureValueHierarchyExists(values);
        _.each(values, function (value) {
            var valueHierarchy = _this.getValueFromHierarchy(value);
            valueHierarchy.hasChildSelected = false;
            _this.unflagParentForSelection(valueHierarchy);
            Eif (deselectChildren) {
                _.each(valueHierarchy.childs, function (child) {
                    var childInHierarchy = _this.getValueFromHierarchy(child.facetValue);
                    childInHierarchy.hasChildSelected = false;
                    _this.deselectValue(child.facetValue);
                });
            }
        });
        _super.prototype.deselectMultipleValues.call(this, values);
    };
    /**
     * Toggles the selection of a single value (selects value if not selected; deselects value if selected).
     * @param value The value to select or deselect.
     */
    HierarchicalFacet.prototype.toggleSelectValue = function (value) {
        this.ensureDom();
        this.ensureValueHierarchyExists([value]);
        if (this.getFacetValueFromHierarchy(value).selected == false) {
            this.selectValue(value);
        }
        else {
            this.deselectValue(value);
        }
    };
    /**
     * Toggles the exclusion of a single value (excludes value if not excluded; un-excludes value if excluded).
     * @param value The value to exclude or un-exclude.
     */
    HierarchicalFacet.prototype.toggleExcludeValue = function (value) {
        this.ensureDom();
        this.ensureValueHierarchyExists([value]);
        if (this.getFacetValueFromHierarchy(value).excluded == false) {
            this.excludeValue(value);
        }
        else {
            this.unexcludeValue(value);
        }
    };
    /**
     * Gets the caption of a single value.
     * @param facetValue The value whose caption the method should return.
     * @returns {string} The caption of the value.
     */
    HierarchicalFacet.prototype.getValueCaption = function (facetValue) {
        var stringValue = this.getSelf(facetValue);
        var ret = stringValue;
        Iif (Utils_1.Utils.exists(this.options.valueCaption)) {
            if (typeof this.options.valueCaption == 'object') {
                ret = this.options.valueCaption[stringValue] || ret;
            }
            if (typeof this.options.valueCaption == 'function') {
                ret = this.options.valueCaption.call(this, facetValue);
            }
        }
        return ret;
    };
    /**
     * Gets the values that the `HierarchicalFacet` is currently displaying.
     * @returns {any[]} An array containing all the values that the `HierarchicalFacet` is currently displaying.
     */
    HierarchicalFacet.prototype.getDisplayedValues = function () {
        var _this = this;
        var displayed = _.filter(this.values.getAll(), function (v) {
            var valFromHierarchy = _this.getValueFromHierarchy(v);
            if (valFromHierarchy) {
                var elem = _this.getElementFromFacetValueList(v);
                return !Dom_1.$$(elem).hasClass('coveo-inactive');
            }
            return false;
        });
        return _.pluck(displayed, 'value');
    };
    /**
     * Updates the sort criteria for the `HierarchicalFacet`.
     *
     * See the [`sortCriteria`]{@link IGroupByRequest.sortCriteria} property of the [`IGroupByRequest`] interface for the
     * list and description of possible values.
     *
     * @param criteria The new sort criteria.
     */
    HierarchicalFacet.prototype.updateSort = function (criteria) {
        _super.prototype.updateSort.call(this, criteria);
    };
    /**
     * Opens (expands) a single value and shows all its children.
     * @param value The value to open.
     */
    HierarchicalFacet.prototype.open = function (value) {
        var getter;
        if (_.isString(value)) {
            getter = this.getValueHierarchy(value);
        }
        else Iif (value instanceof FacetValue_1.FacetValue) {
            getter = this.getValueHierarchy(value.value);
        }
        else {
            getter = value;
        }
        if (getter != undefined) {
            Dom_1.$$(this.getElementFromFacetValueList(getter.facetValue.value)).addClass('coveo-open');
            this.showChilds(getter.childs);
            Iif (getter.parent != undefined) {
                this.open(this.getValueHierarchy(getter.facetValue.value).parent);
            }
            this.getValueHierarchy(getter.facetValue.value).keepOpened = true;
        }
    };
    /**
     * Closes (collapses) a single value and hides all its children.
     * @param value The value to close.
     */
    HierarchicalFacet.prototype.close = function (value) {
        var _this = this;
        var getter;
        if (_.isString(value)) {
            getter = this.getValueHierarchy(value);
        }
        else Iif (value instanceof FacetValue_1.FacetValue) {
            getter = this.getValueHierarchy(value.value);
        }
        else {
            getter = value;
        }
        Eif (getter != undefined) {
            Dom_1.$$(this.getElementFromFacetValueList(getter.facetValue)).removeClass('coveo-open');
            this.hideChilds(getter.childs);
            _.each(getter.childs, function (child) {
                _this.close(_this.getValueHierarchy(child.facetValue.value));
            });
            this.getValueHierarchy(getter.facetValue.value).keepOpened = false;
        }
    };
    /**
     * Resets the `HierarchicalFacet` state.
     */
    HierarchicalFacet.prototype.reset = function () {
        var _this = this;
        _.each(this.getAllValueHierarchy(), function (valueHierarchy) {
            valueHierarchy.hasChildSelected = false;
            valueHierarchy.allChildShouldBeSelected = false;
        });
        // Need to close all values, otherwise we might end up with orphan(s)
        // if a parent value, after reset, is no longer visible.
        _.each(this.getAllValueHierarchy(), function (valueHierarchy) {
            _this.close(valueHierarchy);
        });
        _super.prototype.reset.call(this);
    };
    HierarchicalFacet.prototype.processFacetSearchAllResultsSelected = function (facetValues) {
        this.selectMultipleValues(facetValues);
        this.triggerNewQuery();
    };
    HierarchicalFacet.prototype.triggerUpdateDeltaQuery = function (facetValues) {
        this.shouldReshuffleFacetValuesClientSide = this.keepDisplayedValuesNextTime;
        _super.prototype.triggerUpdateDeltaQuery.call(this, facetValues);
    };
    HierarchicalFacet.prototype.updateSearchElement = function (moreValuesAvailable) {
        Iif (moreValuesAvailable === void 0) { moreValuesAvailable = true; }
        // We always want to show search for hierarchical facet :
        // It's useful since child values are folded under their parent most of the time
        _super.prototype.updateSearchElement.call(this, true);
    };
    HierarchicalFacet.prototype.facetValueHasChanged = function () {
        var _this = this;
        this.updateQueryStateModel();
        Defer_1.Defer.defer(function () {
            _this.updateAppearanceDependingOnState();
        });
    };
    HierarchicalFacet.prototype.initFacetQueryController = function () {
        this.facetQueryController = new HierarchicalFacetQueryController_1.HierarchicalFacetQueryController(this);
    };
    HierarchicalFacet.prototype.initFacetSearch = function () {
        this.facetSearch = new HierarchicalFacetSearch_1.HierarchicalFacetSearch(this, HierarchicalFacetSearchValuesList_1.HierarchicalFacetSearchValuesList, this.root);
        this.element.appendChild(this.facetSearch.build());
    };
    HierarchicalFacet.prototype.handleDeferredQuerySuccess = function (data) {
        this.updateAppearanceDependingOnState();
        _super.prototype.handleDeferredQuerySuccess.call(this, data);
    };
    HierarchicalFacet.prototype.handlePopulateSearchAlerts = function (args) {
        if (this.values.hasSelectedOrExcludedValues()) {
            args.text.push(new HierarchicalBreadcrumbValuesList_1.HierarchicalBreadcrumbValuesList(this, this.values.getSelected().concat(this.values.getExcluded()), this.getAllValueHierarchy()).buildAsString());
        }
    };
    HierarchicalFacet.prototype.handlePopulateBreadcrumb = function (args) {
        Assert_1.Assert.exists(args);
        Eif (this.values.hasSelectedOrExcludedValues()) {
            var element = new HierarchicalBreadcrumbValuesList_1.HierarchicalBreadcrumbValuesList(this, this.values.getSelected().concat(this.values.getExcluded()), this.getAllValueHierarchy(), { headingLevel: args.headingLevel }).build();
            args.breadcrumbs.push({
                element: element
            });
        }
    };
    HierarchicalFacet.prototype.handleOmniboxWithStaticValue = function (eventArg) {
        var _this = this;
        var regex = eventArg.completeQueryExpression.regex;
        var match = _.first(_.filter(this.getAllValueHierarchy(), function (existingValue) {
            return regex.test(_this.getValueCaption(existingValue.facetValue));
        }), this.options.numberOfValuesInOmnibox);
        var facetValues = _.compact(_.map(match, function (gotAMatch) {
            var fromList = _this.getFromFacetValueList(gotAMatch.facetValue);
            return fromList ? fromList.facetValue : undefined;
        }));
        var element = new OmniboxHierarchicalValuesList_1.OmniboxHierarchicalValuesList(this, facetValues, eventArg).build();
        eventArg.rows.push({
            element: element,
            zIndex: this.omniboxZIndex
        });
    };
    HierarchicalFacet.prototype.rebuildValueElements = function () {
        this.shouldReshuffleFacetValuesClientSide = this.shouldReshuffleFacetValuesClientSide || this.keepDisplayedValuesNextTime;
        this.numberOfValues = Math.max(this.numberOfValues, 10000);
        this.processHierarchy();
        this.setValueListContent();
        _super.prototype.rebuildValueElements.call(this);
        this.buildParentChildRelationship();
        this.checkForOrphans();
        this.checkForNewUnselectedChild();
        this.crop();
        this.shouldReshuffleFacetValuesClientSide = false;
    };
    HierarchicalFacet.prototype.initFacetValuesList = function () {
        this.facetValuesList = new HierarchicalFacetValuesList_1.HierarchicalFacetValuesList(this, HierarchicalFacetValueElement_1.HierarchicalFacetValueElement);
        this.element.appendChild(this.facetValuesList.build());
    };
    HierarchicalFacet.prototype.updateMoreLess = function () {
        var moreValuesAvailable = this.numberOfValuesToShow < this.topLevelHierarchy.length;
        var lessIsShown = this.numberOfValuesToShow > this.originalNumberOfValuesToShow;
        _super.prototype.updateMoreLess.call(this, lessIsShown, moreValuesAvailable);
    };
    HierarchicalFacet.prototype.handleClickMore = function () {
        this.numberOfValuesToShow += this.originalNumberOfValuesToShow;
        this.numberOfValuesToShow = Math.min(this.numberOfValuesToShow, this.values.size());
        this.crop();
        this.updateMoreLess();
    };
    HierarchicalFacet.prototype.handleClickLess = function () {
        this.numberOfValuesToShow = this.originalNumberOfValuesToShow;
        this.crop();
        this.updateMoreLess();
    };
    HierarchicalFacet.prototype.updateNumberOfValues = function () {
        this.numberOfValues = Math.max(this.numberOfValues, 10000);
    };
    HierarchicalFacet.prototype.ensureValueHierarchyExists = function (facetValues) {
        var _this = this;
        if (facetValues[0] && typeof facetValues[0] == 'string') {
            facetValues = _.map(facetValues, function (value) {
                return FacetValue_1.FacetValue.createFromValue(value);
            });
        }
        var atLeastOneDoesNotExists = false;
        _.each(facetValues, function (facetValue) {
            if (_this.getValueHierarchy(facetValue.value) == undefined) {
                atLeastOneDoesNotExists = true;
            }
        });
        if (atLeastOneDoesNotExists) {
            this.processHierarchy(facetValues);
        }
    };
    HierarchicalFacet.prototype.crop = function () {
        var _this = this;
        // Partition the top level or the facet to only operate on the values that are not selected or excluded
        var partition = _.partition(this.topLevelHierarchy, function (hierarchy) {
            return hierarchy.facetValue.selected || hierarchy.facetValue.excluded || hierarchy.hasChildSelected;
        });
        // Hide and show the partitionned top level values, depending on the numberOfValuesToShow
        var numberOfValuesLeft = this.numberOfValuesToShow - partition[0].length;
        _.each(_.last(partition[1], partition[1].length - numberOfValuesLeft), function (toHide) {
            _this.hideFacetValue(toHide);
            _this.hideChilds(toHide.childs);
        });
        _.each(_.first(partition[1], numberOfValuesLeft), function (toShow) {
            _this.showFacetValue(toShow);
        });
    };
    HierarchicalFacet.prototype.placeChildsUnderTheirParent = function (hierarchy, hierarchyElement) {
        var _this = this;
        var toIterateOver = hierarchy.childs;
        Eif (toIterateOver) {
            var toIterateOverSorted = this.facetValuesList.sortFacetValues(_.pluck(toIterateOver, 'facetValue')).reverse();
            _.each(toIterateOverSorted, function (child) {
                var childFromHierarchy = _this.getValueFromHierarchy(child);
                Eif (childFromHierarchy) {
                    var childElement = _this.getElementFromFacetValueList(child);
                    Dom_1.$$(childElement).insertAfter(hierarchyElement);
                    if (childFromHierarchy.childs && childFromHierarchy.childs.length != 0) {
                        _this.placeChildsUnderTheirParent(childFromHierarchy, childElement);
                    }
                }
            });
        }
        if (hierarchy.keepOpened) {
            this.open(hierarchy);
            this.showChilds(hierarchy.childs);
        }
        else {
            this.hideChilds(hierarchy.childs);
        }
    };
    HierarchicalFacet.prototype.addCssClassToParentAndChilds = function (hierarchy, hierarchyElement) {
        var _this = this;
        Dom_1.$$(hierarchyElement).addClass('coveo-has-childs');
        if (hierarchy.hasChildSelected) {
            Dom_1.$$(hierarchyElement).addClass('coveo-has-childs-selected');
        }
        var expandChilds = Dom_1.$$('span', { className: 'coveo-hierarchical-facet-expand' }, SVGIcons_1.SVGIcons.icons.facetExpand);
        var collapseChilds = Dom_1.$$('span', { className: 'coveo-hierarchical-facet-collapse' }, SVGIcons_1.SVGIcons.icons.facetCollapse);
        SVGDom_1.SVGDom.addClassToSVGInContainer(expandChilds.el, 'coveo-hierarchical-facet-expand-svg');
        SVGDom_1.SVGDom.addClassToSVGInContainer(collapseChilds.el, 'coveo-hierarchical-facet-collapse-svg');
        var openAndCloseChilds = Dom_1.$$('div', {
            className: 'coveo-has-childs-toggle'
        }, expandChilds.el, collapseChilds.el).el;
        new AccessibleButton_1.AccessibleButton()
            .withElement(openAndCloseChilds)
            .withoutLabelOrTitle()
            .withSelectAction(function () {
            Dom_1.$$(hierarchyElement).hasClass('coveo-open') ? _this.close(hierarchy) : _this.open(hierarchy);
        })
            .build();
        Dom_1.$$(hierarchyElement).prepend(openAndCloseChilds);
    };
    HierarchicalFacet.prototype.buildParentChildRelationship = function () {
        var _this = this;
        var fragment = document.createDocumentFragment();
        fragment.appendChild(this.facetValuesList.valueContainer);
        var sorted = _.map(this.facetValuesList.sortFacetValues(), function (facetValue) {
            return _this.getValueFromHierarchy(facetValue);
        });
        _.each(sorted, function (hierarchy) {
            var hierarchyElement = _this.getElementFromFacetValueList(hierarchy.facetValue);
            if (Utils_1.Utils.isNonEmptyArray(hierarchy.childs)) {
                _this.placeChildsUnderTheirParent(hierarchy, hierarchyElement);
                _this.addCssClassToParentAndChilds(hierarchy, hierarchyElement);
            }
            else {
                Dom_1.$$(hierarchyElement).addClass('coveo-no-childs');
            }
            hierarchyElement.style.marginLeft = _this.options.marginByLevel * (hierarchy.level - _this.options.levelStart) + 'px';
        });
        Dom_1.$$(fragment).insertAfter(this.headerElement);
    };
    HierarchicalFacet.prototype.setValueListContent = function () {
        var _this = this;
        this.facetValuesList.hierarchyFacetValues = _.map(this.correctLevels, function (hierarchy) {
            Iif (!_this.values.contains(hierarchy.facetValue.value)) {
                hierarchy.facetValue.occurrences = 0;
                _this.values.add(hierarchy.facetValue);
            }
            return hierarchy.facetValue;
        });
    };
    HierarchicalFacet.prototype.createHierarchy = function (valuesToBuildWith) {
        var _this = this;
        var flatHierarchy = _.map(valuesToBuildWith, function (value) {
            var parent = _this.getParent(value);
            var self = value.lookupValue || value.value;
            return {
                facetValue: value,
                level: _this.getLevel(value),
                parent: parent,
                self: self
            };
        });
        this.setInHierarchy(flatHierarchy);
        _.each(this.getAllValueHierarchy(), function (valueHierarchy) {
            if (valueHierarchy.facetValue.selected) {
                _this.flagParentForSelection(valueHierarchy);
            }
        });
        return flatHierarchy;
    };
    HierarchicalFacet.prototype.processHierarchy = function (facetValues) {
        var _this = this;
        if (facetValues === void 0) { facetValues = this.values.getAll(); }
        _.each(this.getAllValueHierarchy(), function (hierarchy) {
            if (_this.values.get(hierarchy.facetValue.value) == undefined) {
                _this.deleteValueHierarchy(_this.getLookupOrValue(hierarchy.facetValue));
            }
        });
        this.createHierarchy(facetValues);
    };
    HierarchicalFacet.prototype.setInHierarchy = function (flatHierarchy) {
        var _this = this;
        this.correctLevels = _.filter(flatHierarchy, function (hierarchy) {
            var isCorrectMinimumLevel = _this.options.levelStart == undefined || hierarchy.level >= _this.options.levelStart;
            var isCorrectMaximumLevel = _this.options.levelEnd == undefined || hierarchy.level < _this.options.levelEnd;
            return isCorrectMinimumLevel && isCorrectMaximumLevel;
        });
        _.each(this.correctLevels, function (hierarchy) {
            var childs = _.map(_.filter(_this.correctLevels, function (possibleChild) {
                return possibleChild.parent != null && possibleChild.parent.toLowerCase() == hierarchy.self.toLowerCase();
            }), function (child) {
                return {
                    facetValue: child.facetValue,
                    level: child.level,
                    keepOpened: false,
                    hasChildSelected: false,
                    allChildShouldBeSelected: false
                };
            });
            var parent = hierarchy.parent != null
                ? _.find(_this.correctLevels, function (possibleParent) {
                    return possibleParent.self.toLowerCase() == hierarchy.parent.toLowerCase();
                })
                : null;
            var hierarchyThatAlreadyExists = _this.getValueHierarchy(hierarchy.facetValue.value);
            if (hierarchyThatAlreadyExists && hierarchyThatAlreadyExists.childs.length != childs.length) {
                hierarchyThatAlreadyExists.childs = childs;
            }
            var hierarchyThatAlreadyExistsAtParent;
            if (parent) {
                hierarchyThatAlreadyExistsAtParent = _this.getValueHierarchy(parent.facetValue.value);
            }
            _this.setValueHierarchy(hierarchy.facetValue.value, {
                childs: childs,
                parent: parent == undefined
                    ? undefined
                    : {
                        facetValue: parent.facetValue,
                        level: parent.level,
                        keepOpened: hierarchyThatAlreadyExistsAtParent ? hierarchyThatAlreadyExistsAtParent.keepOpened : false,
                        hasChildSelected: hierarchyThatAlreadyExistsAtParent ? hierarchyThatAlreadyExistsAtParent.hasChildSelected : false,
                        originalPosition: hierarchyThatAlreadyExistsAtParent ? hierarchyThatAlreadyExistsAtParent.originalPosition : undefined,
                        allChildShouldBeSelected: hierarchyThatAlreadyExistsAtParent
                            ? hierarchyThatAlreadyExistsAtParent.allChildShouldBeSelected
                            : false
                    },
                facetValue: hierarchy.facetValue,
                level: hierarchy.level,
                keepOpened: hierarchyThatAlreadyExists ? hierarchyThatAlreadyExists.keepOpened : false,
                hasChildSelected: hierarchyThatAlreadyExists ? hierarchyThatAlreadyExists.hasChildSelected : false,
                originalPosition: hierarchyThatAlreadyExists ? hierarchyThatAlreadyExists.originalPosition : undefined,
                allChildShouldBeSelected: hierarchyThatAlreadyExists ? hierarchyThatAlreadyExists.allChildShouldBeSelected : false
            });
        });
        this.topLevelHierarchy = _.chain(this.values.getAll())
            .filter(function (value) {
            var fromHierarchy = _this.getValueFromHierarchy(value);
            if (fromHierarchy) {
                return fromHierarchy.level == (_this.options.levelStart || 0);
            }
            else {
                return false;
            }
        })
            .map(function (value) {
            return _this.getValueFromHierarchy(value);
        })
            .value();
    };
    HierarchicalFacet.prototype.getParent = function (value) {
        var lastIndexOfDelimiting = this.getLookupOrValue(value).lastIndexOf(this.options.delimitingCharacter);
        if (lastIndexOfDelimiting != -1) {
            return this.getLookupOrValue(value).substring(0, lastIndexOfDelimiting);
        }
        return undefined;
    };
    HierarchicalFacet.prototype.getSelf = function (value) {
        var parent = this.getParent(value);
        if (parent == undefined) {
            return this.getLookupOrValue(value);
        }
        else {
            var indexOfParent = this.getLookupOrValue(value).indexOf(parent);
            return this.getLookupOrValue(value).substring(indexOfParent + parent.length + 1);
        }
    };
    HierarchicalFacet.prototype.showFacetValue = function (value) {
        Dom_1.$$(this.getElementFromFacetValueList(value.facetValue.value)).removeClass('coveo-inactive');
    };
    HierarchicalFacet.prototype.hideFacetValue = function (value) {
        Dom_1.$$(this.getElementFromFacetValueList(value.facetValue.value)).addClass('coveo-inactive');
    };
    HierarchicalFacet.prototype.hideChilds = function (children) {
        var _this = this;
        _.each(children, function (child) {
            _this.hideFacetValue(child);
        });
    };
    HierarchicalFacet.prototype.showChilds = function (children) {
        var _this = this;
        _.each(children, function (child) {
            _this.showFacetValue(child);
        });
    };
    HierarchicalFacet.prototype.selectChilds = function (parent, children) {
        this.flagParentForSelection(parent);
        parent.allChildShouldBeSelected = true;
        this.selectMultipleValues(_.map(children, function (child) {
            return child.facetValue;
        }));
    };
    HierarchicalFacet.prototype.deselectChilds = function (parent, children) {
        parent.hasChildSelected = false;
        parent.allChildShouldBeSelected = false;
        this.deselectMultipleValues(_.map(children, function (child) {
            return child.facetValue;
        }));
    };
    HierarchicalFacet.prototype.excludeChilds = function (children) {
        this.excludeMultipleValues(_.map(children, function (child) {
            return child.facetValue;
        }));
    };
    HierarchicalFacet.prototype.unexcludeChilds = function (children) {
        this.unexcludeMultipleValues(_.map(children, function (child) {
            return child.facetValue;
        }));
    };
    HierarchicalFacet.prototype.deselectParent = function (parent) {
        if (parent != undefined) {
            this.deselectValue(parent.facetValue, false);
        }
    };
    HierarchicalFacet.prototype.flagParentForSelection = function (valueHierarchy) {
        var parent = valueHierarchy.parent;
        var current = valueHierarchy;
        while (parent) {
            var parentInHierarchy = this.getValueHierarchy(parent.facetValue.value);
            parentInHierarchy.hasChildSelected = true;
            var found = _.find(parentInHierarchy.childs, function (child) {
                return child.facetValue.value.toLowerCase() == current.facetValue.value.toLowerCase();
            });
            Eif (found) {
                if (this.getValueHierarchy(found.facetValue.value).hasChildSelected) {
                    found.hasChildSelected = true;
                }
            }
            parent = parentInHierarchy.parent;
            current = parentInHierarchy;
        }
    };
    HierarchicalFacet.prototype.unflagParentForSelection = function (valueHierarchy) {
        var _this = this;
        var parent = valueHierarchy.parent;
        while (parent) {
            var parentInHierarchy = this.getValueHierarchy(parent.facetValue.value);
            var otherSelectedChilds = _.filter(parentInHierarchy.childs, function (child) {
                var childInHierarchy = _this.getValueHierarchy(child.facetValue.value);
                Eif (childInHierarchy != undefined) {
                    return (childInHierarchy.facetValue.value != valueHierarchy.facetValue.value &&
                        (childInHierarchy.facetValue.selected || childInHierarchy.facetValue.excluded || childInHierarchy.hasChildSelected));
                }
            });
            if (otherSelectedChilds.length == 0) {
                parentInHierarchy.hasChildSelected = false;
            }
            parentInHierarchy.allChildShouldBeSelected = false;
            parent = parentInHierarchy.parent;
        }
    };
    HierarchicalFacet.prototype.getValueFromHierarchy = function (value) {
        var getter = value instanceof FacetValue_1.FacetValue ? value.value : value;
        return this.getValueHierarchy(getter);
    };
    HierarchicalFacet.prototype.getFacetValueFromHierarchy = function (value) {
        return this.getValueFromHierarchy(value).facetValue;
    };
    HierarchicalFacet.prototype.getLookupOrValue = function (value) {
        return value.lookupValue || value.value;
    };
    HierarchicalFacet.prototype.getElementFromFacetValueList = function (value) {
        var ret = this.getFromFacetValueList(value);
        Eif (ret) {
            return ret.renderer.listItem;
        }
        else {
            return Dom_1.$$('div').el;
        }
    };
    HierarchicalFacet.prototype.getFromFacetValueList = function (value) {
        var fromHierarchy = this.getValueFromHierarchy(value);
        Eif (fromHierarchy != undefined) {
            return this.facetValuesList.get(value);
        }
        else {
            return undefined;
        }
    };
    HierarchicalFacet.prototype.getLevel = function (value) {
        return value.value.split(this.options.delimitingCharacter).length - 1;
    };
    HierarchicalFacet.prototype.getAllValueHierarchy = function () {
        if (this.valueHierarchy == null) {
            this.valueHierarchy = {};
        }
        return this.valueHierarchy;
    };
    HierarchicalFacet.prototype.deleteValueHierarchy = function (key) {
        Eif (this.valueHierarchy != null) {
            delete this.valueHierarchy[key.toLowerCase()];
        }
    };
    HierarchicalFacet.prototype.getValueHierarchy = function (key) {
        Iif (this.valueHierarchy == null) {
            return undefined;
        }
        return this.valueHierarchy[key.toLowerCase()];
    };
    HierarchicalFacet.prototype.setValueHierarchy = function (key, value) {
        Iif (this.valueHierarchy == null) {
            this.valueHierarchy = {};
        }
        this.valueHierarchy[key.toLowerCase()] = value;
    };
    HierarchicalFacet.prototype.checkForOrphans = function () {
        var _this = this;
        _.each(this.valueHierarchy, function (v) {
            if (_this.getLevel(v.facetValue) != _this.options.levelStart) {
                if (_this.getValueHierarchy(_this.getParent(v.facetValue)) == undefined) {
                    _this.logger.error("Orphan value found in HierarchicalFacet : " + v.facetValue.value, "Needed : " + _this.getParent(v.facetValue) + " but not found");
                    _this.logger.warn("Removing incoherent facet value : " + v.facetValue.value);
                    _this.hideFacetValue(v);
                }
            }
        });
    };
    HierarchicalFacet.prototype.checkForNewUnselectedChild = function () {
        var _this = this;
        // It's possible that after checking a facet value, the index returns new facet values (because of injection depth);
        _.each(this.valueHierarchy, function (v) {
            if (v.allChildShouldBeSelected) {
                var notAlreadySelected = _.find(v.childs, function (child) {
                    return child.facetValue.selected != true;
                });
                Iif (notAlreadySelected) {
                    _this.selectValue(v.facetValue, true);
                    _this.logger.info('Re-executing query with new facet values returned by index');
                    _this.queryController.deferExecuteQuery();
                }
            }
        });
    };
    HierarchicalFacet.ID = 'HierarchicalFacet';
    HierarchicalFacet.doExport = function () {
        GlobalExports_1.exportGlobally({
            HierarchicalFacet: HierarchicalFacet
        });
    };
    /**
     * The options for the component
     * @componentOptions
     */
    HierarchicalFacet.options = __assign({ 
        /**
         * The character that allows to specify the hierarchical dependency.
         *
         * **Example:**
         *
         * If your field has the following values:
         *
         * `@field: c; c>folder2; c>folder2>folder3;`
         *
         * The delimiting character is `>`.
         *
         * Default value is `|`.
         */
        delimitingCharacter: ComponentOptions_1.ComponentOptions.buildStringOption({ defaultValue: '|' }), 
        /**
         * Specifies at which level (0-based index) of the hierarchy the `HierarchicalFacet` should start displaying its
         * values.
         *
         * **Example:**
         *
         * If you have the following files indexed on a file system:
         * ```
         * c:\
         *    folder1\
         *        text1.txt
         *    folder2\
         *      folder3\
         *        text2.txt
         * ```
         * Setting `levelStart` to `1` displays `folder1` and `folder2` in the `HierarchicalFacet`, but omits `c:`.
         *
         * Default (and minimum) value is `0`.
         */
        levelStart: ComponentOptions_1.ComponentOptions.buildNumberOption({ defaultValue: 0, min: 0 }), 
        /**
         * Specifies at which level (0-based index) of the hierarchy the `HierarchicalFacet` should stop displaying its
         * values.
         *
         * Default value is `undefined`, which means the `HierarchicalFacet` component renders all hierarchical levels.
         * Minimum value is `0`.
         */
        levelEnd: ComponentOptions_1.ComponentOptions.buildNumberOption({ min: 0 }), 
        /**
         * Specifies the margin (in pixels) to display between each hierarchical level when expanding.
         *
         * Default value is `10`.
         */
        marginByLevel: ComponentOptions_1.ComponentOptions.buildNumberOption({ defaultValue: 10, min: 0 }) }, ResponsiveFacetOptions_1.ResponsiveFacetOptions);
    HierarchicalFacet.parent = Facet_1.Facet;
    return HierarchicalFacet;
}(Facet_1.Facet));
exports.HierarchicalFacet = HierarchicalFacet;
Initialization_1.Initialization.registerAutoCreateComponent(HierarchicalFacet);
 
 
/***/ }),
/* 793 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
var QueryEvents_1 = __webpack_require__(14);
var GlobalExports_1 = __webpack_require__(10);
var Strings_1 = __webpack_require__(4);
var Dom_1 = __webpack_require__(0);
var SVGDom_1 = __webpack_require__(23);
var SVGIcons_1 = __webpack_require__(16);
var Component_1 = __webpack_require__(6);
var ComponentOptions_1 = __webpack_require__(13);
var Initialization_1 = __webpack_require__(8);
/**
 * The Logo component adds a clickable Coveo logo in the search interface.
 */
var Logo = /** @class */ (function (_super) {
    __extends(Logo, _super);
    /**
     * Creates a new Logo component.
     * @param element The HTMLElement on which to instantiate the component.
     * @param options The options for the Logo component.
     * @param bindings The bindings that the component requires to function normally. If not set, these will be
     * automatically resolved (with a slower execution time).
     */
    function Logo(element, options, bindings) {
        var _this = _super.call(this, element, Logo.ID, bindings) || this;
        _this.element = element;
        _this.options = options;
        _this.options = ComponentOptions_1.ComponentOptions.initComponentOptions(element, Logo, options);
        _this.buildLink();
        _this.bind.onRootElement(QueryEvents_1.QueryEvents.queryError, function () { return _this.hide(); });
        _this.bind.onRootElement(QueryEvents_1.QueryEvents.querySuccess, function (data) { return _this.handleQuerySuccess(data); });
        return _this;
    }
    Logo.prototype.buildLink = function () {
        var link = Dom_1.$$('a', {
            className: 'coveo-powered-by coveo-footer-logo',
            href: 'https://www.coveo.com/',
            'aria-label': Strings_1.l('CoveoHomePage')
        }, SVGIcons_1.SVGIcons.icons.coveoPoweredBy);
        this.options.target && link.setAttribute('target', this.options.target);
        SVGDom_1.SVGDom.addClassToSVGInContainer(link.el, 'coveo-powered-by-svg');
        this.element.appendChild(link.el);
    };
    Logo.prototype.handleQuerySuccess = function (data) {
        data.results.results.length > 0 ? this.show() : this.hide();
    };
    Logo.prototype.hide = function () {
        Dom_1.$$(this.element).addClass('coveo-hidden');
    };
    Logo.prototype.show = function () {
        Dom_1.$$(this.element).removeClass('coveo-hidden');
    };
    Logo.ID = 'Logo';
    Logo.doExport = function () {
        GlobalExports_1.exportGlobally({
            Logo: Logo
        });
    };
    /**
     * The possible options for the component
     * @componentOptions
     */
    Logo.options = {
        /**
         * Specifies how the link to the Coveo website should be opened.
         *
         * Valid values supported are `_top`, `_blank`, `_self`, `_parent`.
         *
         * Default value is `undefined`, meaning standard browser behaviour for links will be respected.
         */
        target: ComponentOptions_1.ComponentOptions.buildStringOption()
    };
    return Logo;
}(Component_1.Component));
exports.Logo = Logo;
Initialization_1.Initialization.registerAutoCreateComponent(Logo);
 
 
/***/ }),
/* 794 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
var Globalize = __webpack_require__(28);
__webpack_require__(1483);
var _ = __webpack_require__(1);
var QueryEvents_1 = __webpack_require__(14);
var GlobalExports_1 = __webpack_require__(10);
var QueryStateModel_1 = __webpack_require__(17);
var Dom_1 = __webpack_require__(0);
var QueryUtils_1 = __webpack_require__(37);
var Utils_1 = __webpack_require__(5);
var Component_1 = __webpack_require__(6);
var ComponentOptions_1 = __webpack_require__(13);
var Initialization_1 = __webpack_require__(8);
var TemplateComponentOptions_1 = __webpack_require__(89);
var Cell_1 = __webpack_require__(1484);
var DefaultMatrixResultPreviewTemplate_1 = __webpack_require__(1485);
/**
 * The Matrix component uses the values of two fields (row and column) to display the results of the specified computed
 * field in a table.
 *
 * The user specifies the values to use for the columns. An {@link IGroupByRequest} operation performed at the same time
 * as the main query retrieves the values to use for the rows.
 *
 * In a way that is similar to the {@link Facet} component, selecting a Matrix cell allows the end user to drill down
 * inside the results by restricting the row field and the column field to match the values of the selected cell.
 *
 * @notSupportedIn salesforcefree
 */
var Matrix = /** @class */ (function (_super) {
    __extends(Matrix, _super);
    /**
     * Creates a new Matrix. Also verifies whether options are valid and coherent. Binds query events.
     * @param element The HTMLElement on which to instantiate the component.
     * @param options The options for the Matrix component.
     * @param bindings The bindings that the component requires to function normally. If not set, these will be
     * automatically resolved (with a slower execution time).
     */
    function Matrix(element, options, bindings) {
        var _this = _super.call(this, element, Matrix.ID, bindings) || this;
        _this.element = element;
        _this.options = options;
        _this.groupByIndex = [];
        _this.rowId = '';
        _this.columnId = '';
        /**
         * The currently selected row value, or `undefined` if nothing is selected.
         */
        _this.selectedRowValue = undefined;
        /**
         * The currently selected column value, or `undefined` if nothing is selected.
         */
        _this.selectedColumnValue = undefined;
        _this.numberOfRows = 0;
        _this.numberOfColumns = 0;
        _this.options = ComponentOptions_1.ComponentOptions.initComponentOptions(element, Matrix, options);
        Eif (!_this.options.previewTemplate) {
            _this.options.previewTemplate = new DefaultMatrixResultPreviewTemplate_1.DefaultMatrixResultPreviewTemplate(_this.options.computedField, _this.options.computedFieldFormat);
        }
        Eif (!_this.options.previewSortField) {
            _this.options.previewSortField = _this.options.computedField;
        }
        if (_this.options.columnFieldValues.length != _this.options.columnLabels.length) {
            _this.options.columnLabels = _this.options.columnFieldValues;
        }
        _this.buildMatrix();
        Iif (_this.options.rowField == null) {
            _this.logger.error("'rowField' option is required in the Matrix component");
        }
        else Iif (_this.options.columnField == null) {
            _this.logger.error("'columnField' option is required in the Matrix component");
        }
        else Iif (_this.options.computedField == null) {
            _this.logger.error("'computedField' option is required in the Matrix component");
        }
        else {
            _this.bindEvents();
            _this.initQueryState();
        }
        return _this;
    }
    /**
     * Selects a cell by its row and column number. Does not execute a query.
     * @param rowNumber The row number of the cell to select.
     * @param columnNumber The column number of the cell to select.
     */
    Matrix.prototype.selectCell = function (rowNumber, columnNumber) {
        var rowValue, columnValue;
        Eif (rowNumber !== 0 && rowNumber !== this.numberOfRows - 1) {
            rowValue = this.getRowValue(rowNumber);
        }
        Eif (columnNumber !== 0 && columnNumber !== this.numberOfColumns - 1) {
            columnValue = this.getColumnValue(columnNumber);
        }
        Iif (rowValue && this.isRowFacetPresent()) {
            this.queryStateModel.set(this.rowId, [rowValue]);
        }
        else {
            this.selectedRowValue = rowValue;
            this.queryStateModel.set(this.rowId, []);
        }
        Iif (columnValue && this.isColumnFacetPresent()) {
            this.queryStateModel.set(this.columnId, [columnValue]);
        }
        else {
            this.selectedColumnValue = columnValue;
            this.queryStateModel.set(this.columnId, []);
        }
    };
    /**
     * Returns the currently selected column value.
     */
    Matrix.prototype.getSelectedColumnValue = function () {
        return this.selectedColumnValue;
    };
    /**
     * Returns the currently selected row value.
     */
    Matrix.prototype.getSelectedRowValue = function () {
        return this.selectedRowValue;
    };
    /**
     * Gets the HTMLElement associated to a cell.
     * @param rowNumber The row number of the cell.
     * @param columnNumber The column number of the cell.
     * @returns {HTMLElement} The associated HTMLElement.
     */
    Matrix.prototype.getCellElement = function (rowNumber, columnNumber) {
        return this.data[rowNumber][columnNumber].getHTML();
    };
    /**
     * Gets the string associated to a cell.
     * @param rowNumber The row number of the cell.
     * @param columnNumber The column number of the cell.
     * @returns {string} The associated string.
     */
    Matrix.prototype.getCellValue = function (rowNumber, columnNumber) {
        var cell = this.getCellElement(rowNumber, columnNumber);
        return Dom_1.$$(cell).text();
    };
    Matrix.prototype.drawMatrix = function () {
        var _this = this;
        var headerRow = Dom_1.$$('div', {
            className: 'coveo-matrix-row matrix-header-row'
        });
        this.drawRow(headerRow.el, 0);
        var numberOfRowsToDraw = this.options.enableColumnTotals ? this.numberOfRows - 1 : this.numberOfRows;
        for (var i = 1; i < numberOfRowsToDraw; i++) {
            var row = Dom_1.$$('div', {
                className: 'coveo-matrix-row'
            }).el;
            this.drawRow(row, i);
        }
        if (this.options.enableColumnTotals) {
            var totalRow = Dom_1.$$('div', {
                className: 'coveo-matrix-row matrix-total-row'
            }).el;
            this.drawRow(totalRow, this.numberOfRows - 1);
        }
        Iif (this.options.cellFontSize !== '') {
            var cells = Dom_1.$$(this.element).findAll('.coveo-matrix-cell');
            _.each(cells, function (c) {
                c.style.fontSize = _this.options.cellFontSize;
            });
        }
    };
    Matrix.prototype.bindEvents = function () {
        var _this = this;
        this.bind.onRootElement(QueryEvents_1.QueryEvents.buildingQuery, function (args) { return _this.handleBuildingQuery(args); });
        this.bind.onRootElement(QueryEvents_1.QueryEvents.doneBuildingQuery, function (args) { return _this.handleDoneBuildingQuery(args); });
        this.bind.onRootElement(QueryEvents_1.QueryEvents.deferredQuerySuccess, function (args) { return _this.handleDeferredQuerySuccess(args); });
    };
    Matrix.prototype.initQueryState = function () {
        this.rowId = QueryStateModel_1.QueryStateModel.getFacetId(this.options.rowField);
        this.columnId = QueryStateModel_1.QueryStateModel.getFacetId(this.options.columnField);
        this.queryStateModel.registerNewAttribute(this.rowId, []);
        this.queryStateModel.registerNewAttribute(this.columnId, []);
    };
    Matrix.prototype.buildMatrix = function () {
        this.buildTitle();
        this.buildBody();
        this.data = new Array();
        this.addHeaderRow();
    };
    Matrix.prototype.buildTitle = function () {
        var title = this.options.title ? this.options.title : '';
        var titleHtml = Dom_1.$$('div', {
            className: 'coveo-matrix-title'
        }, title).el;
        this.element.appendChild(titleHtml);
    };
    Matrix.prototype.buildBody = function () {
        var body = Dom_1.$$('div', {
            className: 'coveo-matrix'
        }).el;
        this.element.appendChild(body);
    };
    Matrix.prototype.handleBuildingQuery = function (args) {
        Eif (!this.areFacetsPresent()) {
            if (this.selectedRowValue && !this.isRowFacetPresent()) {
                args.queryBuilder.advancedExpression.addFieldExpression(this.options.rowField, '=', [this.selectedRowValue]);
            }
            if (this.selectedColumnValue && !this.isColumnFacetPresent()) {
                args.queryBuilder.advancedExpression.addFieldExpression(this.options.columnField, '=', [this.selectedColumnValue]);
            }
        }
    };
    Matrix.prototype.handleDoneBuildingQuery = function (args) {
        this.groupByIndex = [];
        this.addMainGroubByRequest(args.queryBuilder);
        this.addColumnsGroupByRequests(args.queryBuilder);
    };
    Matrix.prototype.handleDeferredQuerySuccess = function (args) {
        this.reset();
        this.parseResults(args.results);
        this.addTotals();
        this.drawMatrix();
        this.formatCells();
        this.selectedRowValue = undefined;
        this.selectedColumnValue = undefined;
    };
    Matrix.prototype.addMainGroubByRequest = function (queryBuilder) {
        var groupBy = {
            field: this.options.rowField,
            sortCriteria: this.options.sortCriteria,
            computedFields: this.getComputedFields(),
            maximumNumberOfValues: this.options.maximumNumberOfRows
        };
        this.groupByIndex.push(queryBuilder.groupByRequests.length);
        queryBuilder.groupByRequests.push(groupBy);
    };
    Matrix.prototype.addColumnsGroupByRequests = function (queryBuilder) {
        for (var i = 0; i < this.options.columnFieldValues.length; i++) {
            var groupBy = {
                field: this.options.rowField,
                sortCriteria: this.options.sortCriteria,
                computedFields: this.getComputedFields(),
                queryOverride: '(' + this.buildExpression(queryBuilder) + ')' + '(' + this.options.columnField + "='" + this.options.columnFieldValues[i] + "')",
                maximumNumberOfValues: this.options.maximumNumberOfValuesInGroupBy
            };
            this.groupByIndex.push(queryBuilder.groupByRequests.length);
            queryBuilder.groupByRequests.push(groupBy);
        }
    };
    Matrix.prototype.buildExpression = function (queryBuilder) {
        var expression = queryBuilder.expression.build();
        var advancedExpression = queryBuilder.advancedExpression.build();
        var constantExpression = queryBuilder.constantExpression.build();
        var totalQuery = '';
        Iif (expression) {
            totalQuery += ' ' + expression;
        }
        if (advancedExpression) {
            totalQuery += ' ' + advancedExpression;
        }
        Iif (constantExpression) {
            totalQuery += ' ' + constantExpression;
        }
        return totalQuery;
    };
    Matrix.prototype.getComputedFields = function () {
        var computedFields = [
            {
                field: this.options.computedField,
                operation: this.options.computedFieldOperation
            }
        ];
        return computedFields;
    };
    Matrix.prototype.getCellResult = function (results, rowNumber, columnNumber) {
        var rowValue = this.getRowValue(rowNumber);
        var columnValue = this.getColumnValue(columnNumber);
        var cellResult = 0;
        for (var i = 0; i < results.values.length; i++) {
            if (results.values[i].value === rowValue) {
                cellResult = results.values[i].computedFieldResults[0];
                break;
            }
        }
        Iif (this.isAColumnSelected() && !this.isColumnSelected(columnValue)) {
            cellResult = 0;
        }
        return cellResult;
    };
    Matrix.prototype.addTotals = function () {
        Eif (this.options.enableRowTotals) {
            this.addRowTotals();
        }
        if (this.options.enableColumnTotals) {
            this.addColumnTotals();
        }
    };
    Matrix.prototype.addRowTotals = function () {
        var _this = this;
        this.addColumn();
        this.setValue('Total', 0, this.numberOfColumns - 1);
        for (var i = 1; i < this.numberOfRows; i++) {
            var rowTotal = this.computeRowTotal(i);
            this.setValue(rowTotal, i, this.numberOfColumns - 1);
        }
        // Fix sort ordering when not all columns field values are present.
        Eif (this.options.sortCriteria.toLowerCase() == 'computedfielddescending') {
            this.data.sort(function (a, b) {
                return b[_this.numberOfColumns - 1].getValue() - a[_this.numberOfColumns - 1].getValue();
            });
        }
        Iif (this.options.sortCriteria.toLowerCase() == 'computedfieldascending') {
            this.data.sort(function (a, b) {
                return a[_this.numberOfColumns - 1].getValue() - b[_this.numberOfColumns - 1].getValue();
            });
        }
    };
    Matrix.prototype.addColumnTotals = function () {
        this.addRow();
        this.setValue('Total', this.numberOfRows - 1, 0);
        for (var i = 1; i < this.numberOfColumns; i++) {
            var columnTotal = this.computeColumnTotal(i);
            this.setValue(columnTotal, this.numberOfRows - 1, i);
        }
    };
    Matrix.prototype.computeRowTotal = function (rowNumber) {
        var total = 0;
        for (var columnNumber = 1; columnNumber < this.numberOfColumns - 1; columnNumber++) {
            total += parseInt(this.getCellValue(rowNumber, columnNumber));
        }
        return total;
    };
    Matrix.prototype.computeColumnTotal = function (columnNumber) {
        var total = 0;
        for (var rowNumber = 1; rowNumber < this.numberOfRows - 1; rowNumber++) {
            total += parseInt(this.getCellValue(rowNumber, columnNumber));
        }
        return total;
    };
    Matrix.prototype.formatCells = function () {
        for (var i = 1; i < this.numberOfRows; i++) {
            for (var j = 1; j < this.numberOfColumns; j++) {
                var cellValue = this.getCellValue(i, j);
                cellValue = Globalize.format(parseInt(cellValue), this.options.computedFieldFormat);
                this.setValue(cellValue, i, j);
            }
        }
    };
    Matrix.prototype.addHeaderRow = function () {
        this.addRow();
        this.addColumn();
        this.setValue(this.options.columnHeader, 0, 0);
        for (var i = 0; i < this.options.columnLabels.length; i++) {
            this.addColumn();
            this.setValue(this.options.columnLabels[i], 0, i + 1);
        }
    };
    Matrix.prototype.addRow = function () {
        this.data.push(new Array());
        for (var i = 0; i < this.numberOfColumns; i++) {
            this.addCellToRow(this.numberOfRows, i);
        }
        this.numberOfRows++;
    };
    Matrix.prototype.addColumn = function () {
        for (var i = 0; i < this.numberOfRows; i++) {
            this.addCellToRow(i, this.numberOfColumns);
        }
        this.numberOfColumns++;
    };
    Matrix.prototype.addCellToRow = function (rowNumber, columnNumber) {
        var column = Dom_1.$$('div', {
            className: 'coveo-matrix-cell'
        });
        if (columnNumber == 0) {
            column.addClass('matrix-first-column');
        }
        this.data[rowNumber].push(new Cell_1.Cell(0, column.el));
    };
    Matrix.prototype.setValue = function (value, rowNumber, columnNumber) {
        var cell = this.getCellElement(rowNumber, columnNumber);
        if (!Utils_1.Utils.isNullOrUndefined(value)) {
            Dom_1.$$(cell).text(value.toString());
        }
        Iif (this.isCellSelected(this.getRowValue(rowNumber), this.getColumnValue(columnNumber))) {
            Dom_1.$$(cell).addClass('coveo-matrix-selected');
        }
        if (this.isAColumnSelected() && !this.isColumnSelected(this.getColumnValue(columnNumber))) {
            if (columnNumber != 0 && rowNumber != 0) {
                Dom_1.$$(cell).addClass('coveo-matrix-unimportant');
            }
        }
        this.data[rowNumber][columnNumber].setValue(value);
    };
    Matrix.prototype.handleClick = function (rowNumber, columnNumber) {
        this.selectCell(rowNumber, columnNumber);
        this.queryController.executeQuery();
    };
    Matrix.prototype.getRowValue = function (rowNumber) {
        return this.data[rowNumber][0].getValue();
    };
    Matrix.prototype.getColumnValue = function (columnNumber) {
        return this.options.columnFieldValues[columnNumber - 1];
    };
    Matrix.prototype.isAColumnSelected = function () {
        var selectedColumnValues = this.queryStateModel.get(this.columnId) || [];
        return selectedColumnValues.length !== 0 || this.selectedColumnValue != undefined;
    };
    Matrix.prototype.isColumnSelected = function (columnValue) {
        if (this.isAColumnSelected() && columnValue) {
            var selectedColumnValues = this.queryStateModel.attributes[this.columnId] || [];
            for (var i = 0; i < selectedColumnValues.length; i++) {
                if (selectedColumnValues[i].toLowerCase() === columnValue.toLowerCase()) {
                    return true;
                }
            }
        }
        return this.selectedColumnValue == columnValue;
    };
    Matrix.prototype.isARowSelected = function () {
        var selectedRowValues = this.queryStateModel.get(this.rowId) || [];
        return selectedRowValues.length !== 0 || this.selectedRowValue !== undefined;
    };
    Matrix.prototype.isRowSelected = function (rowValue) {
        if (this.isARowSelected() && rowValue) {
            var selectedRowValues = this.queryStateModel.get(this.rowId) || [];
            for (var i = 0; i < selectedRowValues.length; i++) {
                if (selectedRowValues[i].toLowerCase() === rowValue.toLowerCase()) {
                    return true;
                }
            }
        }
        return this.selectedRowValue == rowValue;
    };
    Matrix.prototype.isCellSelected = function (rowValue, columnValue) {
        if (this.isAColumnSelected() && this.isARowSelected()) {
            return this.isRowSelected(rowValue) && this.isColumnSelected(columnValue);
        }
        else Iif (this.isAColumnSelected()) {
            return this.isColumnSelected(columnValue);
        }
        return false;
    };
    Matrix.prototype.areFacetsPresent = function () {
        return this.isRowFacetPresent() && this.isColumnFacetPresent();
    };
    Matrix.prototype.isRowFacetPresent = function () {
        var facet = this.componentStateModel.get(this.rowId);
        return facet && !facet[0].disabled;
    };
    Matrix.prototype.isColumnFacetPresent = function () {
        var facet = this.componentStateModel.get(this.columnId);
        return facet && !facet[0].disabled;
    };
    Matrix.prototype.reset = function () {
        Dom_1.$$(this.element).empty();
        this.numberOfRows = 0;
        this.numberOfColumns = 0;
        this.data = new Array();
        this.buildMatrix();
    };
    Matrix.prototype.parseResults = function (results) {
        Eif (results) {
            var mainResults = results.groupByResults[this.groupByIndex[0]];
            if (mainResults) {
                for (var i = 0; i < mainResults.values.length; i++) {
                    var value = mainResults.values[i].value;
                    this.addRow();
                    this.setValue(value, i + 1, 0);
                }
            }
            for (var i = 1; i < this.numberOfRows; i++) {
                for (var j = 1; j < this.numberOfColumns; j++) {
                    var columnResult = results.groupByResults[this.groupByIndex[j]];
                    var cellValue = this.getCellResult(columnResult, i, j);
                    this.setValue(cellValue, i, j);
                }
            }
        }
    };
    Matrix.prototype.drawRow = function (row, rowNumber) {
        var _this = this;
        var body = Dom_1.$$(this.element).find('.coveo-matrix');
        var _loop_1 = function (i) {
            var cell = this_1.data[rowNumber][i].getHTML();
            Dom_1.$$(cell).on('click', function () {
                var handler = function (num) {
                    _this.handleClick(rowNumber, num);
                };
                handler(i);
            });
            Eif (this_1.options.enableHoverPreview) {
                (function (num) {
                    Dom_1.$$(cell).on('mouseover', function () { return _this.handleHoverIn(rowNumber, num); });
                    Dom_1.$$(cell).on('mouseout', function () { return _this.handleHoverOut(rowNumber, num); });
                })(i);
            }
            row.appendChild(cell);
        };
        var this_1 = this;
        for (var i = 0; i < this.numberOfColumns; i++) {
            _loop_1(i);
        }
        body.appendChild(row);
    };
    Matrix.prototype.handleHoverIn = function (rowNumber, columnNumber) {
        var _this = this;
        if (this.isHoverWorkingOnRow(rowNumber) && this.isHoverWorkingOnColumn(columnNumber)) {
            this.previewTimeout = window.setTimeout(function () {
                _this.displayResultsPreview(rowNumber, columnNumber);
            }, this.options.previewDelay);
        }
    };
    Matrix.prototype.handleHoverOut = function (rowNumber, columnNumber) {
        clearTimeout(this.previewTimeout);
        var cell = this.data[rowNumber][columnNumber];
        cell.removePreview();
    };
    Matrix.prototype.displayResultsPreview = function (rowNumber, columnNumber) {
        var _this = this;
        var query = this.createPreviewQuery(rowNumber, columnNumber);
        var cell = this.data[rowNumber][columnNumber];
        cell.addPreview(this.options.previewMinWidth, this.options.previewMaxWidth);
        var endpoint = this.queryController.getEndpoint();
        endpoint.search(query).then(function (data) {
            // During the time it take for the query to return, the matrix can change size depending
            // on if another query was performed : Need to check for undefined before accessing the data
            // we're trying to render;
            if (!_this.isDataAvailable(rowNumber, columnNumber)) {
                return;
            }
            var cell = _this.data[rowNumber][columnNumber];
            var instantiatedResults = _.map(data.results, function (r) {
                return _this.instantiateTemplate(r);
            });
            var html = '';
            _.each(instantiatedResults, function (result) {
                result.then(function (builtResultElement) {
                    html += builtResultElement.outerHTML;
                });
            });
            Promise.all(instantiatedResults).then(function () {
                cell.updatePreview(html);
            });
        });
    };
    Matrix.prototype.instantiateTemplate = function (result) {
        var _this = this;
        return this.options.previewTemplate
            .instantiateToElement(result, {
            checkCondition: false,
            responsiveComponents: this.searchInterface.responsiveComponents
        })
            .then(function (content) {
            var initParameters = {
                options: _this.options,
                bindings: _this.getBindings(),
                result: result
            };
            return Initialization_1.Initialization.automaticallyCreateComponentsInside(content, initParameters).initResult.then(function () {
                return content;
            });
        });
    };
    Matrix.prototype.createPreviewQuery = function (rowNumber, columnNumber) {
        var rowFieldExpression = '(' + QueryUtils_1.QueryUtils.buildFieldExpression(this.options.rowField, '=', [this.getRowValue(rowNumber)]) + ')';
        var columnFieldExpression = '(' + QueryUtils_1.QueryUtils.buildFieldExpression(this.options.columnField, '=', [this.getColumnValue(columnNumber)]) + ')';
        var query = this.queryController.getLastQuery();
        query.aq = rowFieldExpression;
        query.aq += columnFieldExpression;
        query.sortCriteria = this.options.previewSortCriteria;
        query.sortField = this.options.previewSortField;
        var fieldSliced = this.options.computedField.slice(1);
        var fieldExists = _.find(query.fieldsToInclude, function (field) {
            return field == fieldSliced;
        });
        if (!fieldExists && query.fieldsToInclude) {
            query.fieldsToInclude.push(fieldSliced);
        }
        return query;
    };
    Matrix.prototype.isHoverWorkingOnRow = function (rowNumber) {
        if (this.options.enableColumnTotals) {
            return rowNumber !== 0 && rowNumber !== this.numberOfRows - 1;
        }
        return rowNumber !== 0;
    };
    Matrix.prototype.isHoverWorkingOnColumn = function (columnNumber) {
        if (this.options.enableRowTotals) {
            return columnNumber !== 0 && columnNumber !== this.numberOfColumns - 1;
        }
        return columnNumber !== 0;
    };
    Matrix.prototype.isDataAvailable = function (row, column) {
        return this.data[row] !== undefined && this.data[row][column] !== undefined;
    };
    Matrix.ID = 'Matrix';
    Matrix.doExport = function () {
        GlobalExports_1.exportGlobally({
            Matrix: Matrix
        });
    };
    /**
     * The possible options for the component
     * @componentOptions
     */
    Matrix.options = {
        /**
         * Specifies the text to display at the top of the Matrix.
         */
        title: ComponentOptions_1.ComponentOptions.buildStringOption(),
        /**
         * Specifies the field to use for the rows.
         *
         * Specifying a value for this options is required for this component to work.
         */
        rowField: ComponentOptions_1.ComponentOptions.buildFieldOption({ required: true }),
        /**
         * Specifies the field to use for the columns.
         *
         * Specifying a value for this options is required for this component to work.
         */
        columnField: ComponentOptions_1.ComponentOptions.buildFieldOption({ required: true }),
        /**
         * Specifies the criteria to use for sorting the rows.
         *
         * See {@link IGroupByRequest.sortCriteria} for the list of possible values.
         *
         * Default value is `computedfielddescending`.
         */
        sortCriteria: ComponentOptions_1.ComponentOptions.buildStringOption({ defaultValue: 'computedfielddescending' }),
        /**
         * Specifies the maximum number of rows to display in the Matrix.
         *
         * Default value is `10`. Minimum value is `0`.
         */
        maximumNumberOfRows: ComponentOptions_1.ComponentOptions.buildNumberOption({ defaultValue: 10, min: 0 }),
        /**
         * Specifies whether to display a **Total** column containing the sum of each row.
         *
         * Default value is `true`.
         */
        enableRowTotals: ComponentOptions_1.ComponentOptions.buildBooleanOption({ defaultValue: true }),
        /**
         * Specifies the field values to use for each column.
         *
         * See also {@link Matrix.options.columnLabels}.
         *
         * Default value is `[]`, which means that the Matrix will not generate any column (except the **Total** column, if
         * {@link Matrix.options.enableRowTotals} is `true`).
         */
        columnFieldValues: ComponentOptions_1.ComponentOptions.buildListOption({ defaultValue: [] }),
        /**
         * Specifies the label values to use for each column.
         *
         * Default value is `[]`. The array set for this options should match the {@link Matrix.options.columnFieldValues}.
         */
        columnLabels: ComponentOptions_1.ComponentOptions.buildListOption({ defaultValue: [] }),
        /**
         * Specifies the label for the first column on the left as a description of the {@link Matrix.options.columnField}.
         *
         * Default value is `undefined`.
         */
        columnHeader: ComponentOptions_1.ComponentOptions.buildStringOption(),
        /**
         * Specifies the maximum number of results to include in the {@link IGroupByRequest} for the columns.
         *
         * This value should always be greater than the {@link Matrix.options.maximumNumberOfRows}. If it is too small, some
         * of the results will not be displayed in the Matrix.
         *
         * Default value is `100`. Minimum value is `0`.
         */
        maximumNumberOfValuesInGroupBy: ComponentOptions_1.ComponentOptions.buildNumberOption({ defaultValue: 100, min: 0 }),
        /**
         * Specifies whether to add a **Total** row containing the total of each column.
         *
         * Default value is `true`
         */
        enableColumnTotals: ComponentOptions_1.ComponentOptions.buildBooleanOption({ defaultValue: true }),
        /**
         * Specifies the field whose computed values you want to display in the cells.
         *
         * Specifying a value for this options is required for this component to work.
         */
        computedField: ComponentOptions_1.ComponentOptions.buildFieldOption({ required: true }),
        /**
         * Specifies the type of aggregate operation to perform on the {@link Matrix.options.computedField}.
         *
         * The possible values are:
         * - `sum` - Computes the sum of the computed field values.
         * - `average` - Computes the average of the computed field values.
         * - `minimum` - Finds the minimum value of the computed field values.
         * - `maximum` - Finds the maximum value of the computed field values.
         *
         * Default value is `sum`.
         */
        computedFieldOperation: ComponentOptions_1.ComponentOptions.buildStringOption({ defaultValue: 'sum' }),
        /**
         * Specifies how to format the values resulting from a {@link Matrix.options.computedFieldOperation}.
         *
         * The Globalize library defines all available formats (see
         * [Globalize](https://github.com/klaaspieter/jquery-global#globalizeformat-value-format-culture-)).
         *
         * The most commonly used formats are:
         * - `c0` - Formats the value as a currency.
         * - `n0` - Formats the value as an integer.
         * - `n2` - Formats the value as a floating point with 2 decimal digits.
         *
         * Default value is `c0`.
         */
        computedFieldFormat: ComponentOptions_1.ComponentOptions.buildStringOption({ defaultValue: 'c0' }),
        /**
         * Specifies the font-size to use for displaying text inside the cells.
         *
         * This option is mainly useful to prevent a Matrix containing many columns from cropping some of its values.
         *
         * However, instead of using this option to solve this kind of issue, you could also remove some of the less
         * important columns from your Matrix or modify the CSS of your page to allow the Matrix to occupy a larger space.
         *
         * Default value is `''`.
         */
        cellFontSize: ComponentOptions_1.ComponentOptions.buildStringOption({ defaultValue: '' }),
        /**
         * Specifies whether to show a preview popup of cell results when hovering over a cell.
         *
         * See also {@link Matrix.options.previewSortCriteria}, {@link Matrix.options.previewMaxWidth},
         * {@link Matrix.options.previewMinWidth}, {@link Matrix.options.previewDelay} and
         * {@link Matrix.options.previewTemplate}.
         *
         * Default value is `true`.
         */
        enableHoverPreview: ComponentOptions_1.ComponentOptions.buildBooleanOption({ defaultValue: true }),
        /**
         * If {@link Matrix.options.enableHoverPreview} is `true`, specifies the criteria to use for sorting the results of
         * the hover preview.
         *
         * The available sort criteria values are the same as those of the {@link IQuery}.
         *
         * The possible values are:
         * - `relevancy`: Uses all configured ranking weights and any specified ranking expressions to sort the results.
         * - `dateascending` / `datedescending`: Sorts the results using the `@date` field value, which is typically the
         * last modification date of an item in the index.
         * - `qre`: Sorts the results using only the weights applied by ranking expressions. Using `qre` is much like using
         * `relevancy`, except that `qre` does not compute automatic weights, such as weights based on keyword proximity.
         * - `nosort`: Does not sort the results. Using `nosort` returns the items in an essentially random order.
         * - `fieldascending` / `fielddescending`: Sorts the results using the value of a custom field.
         * - `fieldascending` / `fielddescending`: Sorts the results using the value of a custom field.
         *
         * See also {@link Matrix.options.previewSortField}.
         *
         * Default value is `FieldDescending`.
         */
        previewSortCriteria: ComponentOptions_1.ComponentOptions.buildStringOption({ defaultValue: 'FieldDescending' }),
        /**
         * If {@link Matrix.options.previewSortCriteria} is `fieldascending` or `fielddescending`, specifies the field to
         * use for sorting the results of the hover preview.
         *
         * Default value is the value of {@link Matrix.options.computedField}.
         */
        previewSortField: ComponentOptions_1.ComponentOptions.buildFieldOption(),
        /**
         * If {@link Matrix.options.enableHoverPreview} is `true`, specifies the maximum width (in pixels) of the preview
         * popup.
         *
         * Default value is `500px`.
         */
        previewMaxWidth: ComponentOptions_1.ComponentOptions.buildStringOption({ defaultValue: '500px' }),
        /**
         * If {@link Matrix.options.enableHoverPreview} is `true`, specifies the minimum width (in pixels) of the preview
         * popup.
         *
         * Default value is `0`.
         */
        previewMinWidth: ComponentOptions_1.ComponentOptions.buildStringOption({ defaultValue: '0' }),
        /**
         * If {@link Matrix.options.enableHoverPreview} is `true`, specifies the delay (in milliseconds) before sending the
         * query to get the preview results.
         *
         * Default value is `500`.
         */
        previewDelay: ComponentOptions_1.ComponentOptions.buildNumberOption({ defaultValue: 500 }),
        /**
         * If {@link Matrix.options.enableHoverPreview} is `true`, specifies the template ID or CSS selector of the template
         * to use to render the results of the hover preview.
         *
         * You must use either `data-template-id` or `data-template-selector` in the markup to specify a value for this
         * option.
         *
         * **Examples:**
         *
         * Specifying what template to use by referring to its template ID:
         * ```html
         * <div class='CoveoMatrix' data-template-id='TemplateId'></div>
         * ```
         *
         * Specifying what template to use by referring to its CSS selector:
         * ```html
         * <div class='CoveoMatrix' data-template-selector='.templateSelector'></div>
         * ```
         */
        previewTemplate: TemplateComponentOptions_1.TemplateComponentOptions.buildTemplateOption()
    };
    return Matrix;
}(Component_1.Component));
exports.Matrix = Matrix;
Initialization_1.Initialization.registerAutoCreateComponent(Matrix);
 
 
/***/ }),
/* 795 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
var Result_1 = __webpack_require__(76);
var _ = __webpack_require__(1);
var RefResult = /** @class */ (function (_super) {
    __extends(RefResult, _super);
    function RefResult(results, expression, input, lastResult) {
        var _this = _super.call(this, results, expression, input) || this;
        _this.expression = expression;
        _this.input = input;
        if (_.last(results) != lastResult) {
            _this.failAttempt = lastResult;
            if (_this.failAttempt != null) {
                _this.failAttempt.parent = _this;
            }
        }
        return _this;
    }
    /**
     * Return all fail result.
     */
    RefResult.prototype.getExpect = function () {
        var expect = _super.prototype.getExpect.call(this);
        // add the failAttempt to the expect
        if (this.failAttempt != null) {
            return expect.concat(this.failAttempt.getExpect());
        }
        return expect;
    };
    /**
     * Clean the result to have the most relevant result. If the result is successful just return a clone of it.
     */
    RefResult.prototype.clean = function (path) {
        // if there is no failAttempt, we will use the default clean
        if (this.failAttempt != null && (path != null || !this.isSuccess())) {
            path = path || _.last(this.getBestExpect()).path(this);
            var next = _.first(path);
            // if the next is in the subResults, not the failAttempt, do the default clean;
            Eif (next != null && next == this.failAttempt) {
                var last = _.last(this.subResults);
                // if the last is not successful, remove it because we want the failAttempt path
                var subResults = _.map(last != null && last.isSuccess() ? this.subResults : _.initial(this.subResults), function (subResult) {
                    return subResult.clean();
                });
                subResults.push(next.clean(_.rest(path)));
                return new Result_1.Result(subResults, this.expression, this.input);
            }
        }
        return _super.prototype.clean.call(this, path);
    };
    return RefResult;
}(Result_1.Result));
exports.RefResult = RefResult;
 
 
/***/ }),
/* 796 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
var Result_1 = __webpack_require__(76);
var _ = __webpack_require__(1);
var OptionResult = /** @class */ (function (_super) {
    __extends(OptionResult, _super);
    function OptionResult(result, expression, input, failAttempt) {
        var _this = _super.call(this, result != null ? [result] : null, expression, input) || this;
        _this.result = result;
        _this.expression = expression;
        _this.input = input;
        _this.failAttempt = failAttempt;
        _.forEach(_this.failAttempt, function (subResult) {
            subResult.parent = _this;
        });
        return _this;
    }
    /**
     * Return all fail result.
     */
    OptionResult.prototype.getExpect = function () {
        var _this = this;
        var expect = [];
        if (this.result != null) {
            expect = this.result.getExpect();
        }
        expect = _.reduce(this.failAttempt, function (expect, result) { return expect.concat(result.getExpect()); }, expect);
        if (expect.length > 0 && _.all(expect, function (result) { return result.input == _this.input; })) {
            return [this];
        }
        return expect;
    };
    /**
     * Clean the result to have the most relevant result. If the result is successful just return a clone of it.
     */
    OptionResult.prototype.clean = function (path) {
        if (path != null || !this.isSuccess()) {
            // Result will be a ref. We skip it for cleaner tree.
            path = _.rest(path || _.last(this.getBestExpect()).path(this));
            // next can be Result or one of the failAttempt. In both case we have only one child
            var next = _.first(path);
            if (next == null) {
                return new Result_1.Result(null, this.expression, this.input);
            }
            return new Result_1.Result([next.clean(_.rest(path))], this.expression, this.input);
        }
        // Result will be a ref. We skip it for cleaner tree.
        return new Result_1.Result(_.map(this.result.subResults, function (subResult) { return subResult.clean(); }), this.expression, this.input);
    };
    return OptionResult;
}(Result_1.Result));
exports.OptionResult = OptionResult;
 
 
/***/ }),
/* 797 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var ExpressionFunction = /** @class */ (function () {
    function ExpressionFunction(func, id, grammar) {
        this.func = func;
        this.id = id;
        this.grammar = grammar;
    }
    ExpressionFunction.prototype.parse = function (input, end) {
        return this.func(input, end, this);
    };
    ExpressionFunction.prototype.toString = function () {
        return this.id;
    };
    return ExpressionFunction;
}());
exports.ExpressionFunction = ExpressionFunction;
 
 
/***/ }),
/* 798 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var NestedQuery_1 = __webpack_require__(799);
var QueryExtension_1 = __webpack_require__(801);
var Basic_1 = __webpack_require__(197);
var Field_1 = __webpack_require__(383);
var SubExpression_1 = __webpack_require__(802);
exports.Complete = {
    include: [NestedQuery_1.NestedQuery, QueryExtension_1.QueryExtension, SubExpression_1.SubExpression, Field_1.Field, Basic_1.Basic]
};
 
 
/***/ }),
/* 799 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Field_1 = __webpack_require__(383);
exports.NestedQuery = {
    basicExpressions: ['NestedQuery'],
    grammars: {
        NestedQuery: '[[NestedField][OptionalSpaces][Expressions]]',
        NestedField: '[[Field]]',
        FieldValue: ['NestedQuery']
    },
    include: [Field_1.Field]
};
 
 
/***/ }),
/* 800 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Basic_1 = __webpack_require__(197);
exports.Date = {
    grammars: {
        Date: '[DateYear]/[DateMonth]/[DateDay]',
        DateYear: /([0-9]{4})/,
        DateMonth: /(1[0-2]|0?[1-9])/,
        DateDay: /([1-2][0-9]|3[0-1]|0?[1-9])/,
        DateRange: '[Date][Spaces?]..[Spaces?][Date]',
        DateRelative: ['DateRelativeNegative', 'DateRelativeTerm'],
        DateRelativeTerm: /now|today|yesterday/,
        DateRelativeNegative: '[DateRelativeTerm][DateRelativeNegativeRef]',
        DateRelativeNegativeRef: /([\-\+][0-9]+(s|m|h|d|mo|y))/
    },
    include: [Basic_1.Basic]
};
 
 
/***/ }),
/* 801 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Basic_1 = __webpack_require__(197);
exports.QueryExtension = {
    basicExpressions: ['QueryExtension'],
    grammars: {
        QueryExtension: '$[QueryExtensionName]([QueryExtensionArguments])',
        QueryExtensionName: /\w+/,
        QueryExtensionArguments: '[QueryExtensionArgumentList*][QueryExtensionArgument]',
        QueryExtensionArgumentList: '[QueryExtensionArgument][Spaces?],[Spaces?]',
        QueryExtensionArgument: '[QueryExtensionArgumentName]:[Spaces?][QueryExtensionArgumentValue]',
        QueryExtensionArgumentName: /\w+/,
        QueryExtensionArgumentValue: ['SingleQuoted', 'Expressions']
    },
    include: [Basic_1.Basic]
};
 
 
/***/ }),
/* 802 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
exports.SubExpression = {
    basicExpressions: ['SubExpression'],
    grammars: {
        SubExpression: '([Expressions])'
    }
};
 
 
/***/ }),
/* 803 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Grammar_1 = __webpack_require__(154);
var _ = __webpack_require__(1);
function loadSubGrammar(expressions, basicExpressions, grammars, subGrammar) {
    _.each(subGrammar.expressions, function (expression) {
        if (!_.contains(expressions, expression)) {
            expressions.push(expression);
        }
    });
    _.each(subGrammar.basicExpressions, function (expression) {
        Eif (!_.contains(basicExpressions, expression)) {
            basicExpressions.push(expression);
        }
    });
    _.each(subGrammar.grammars, function (expressionDef, id) {
        if (!(id in grammars)) {
            grammars[id] = expressionDef;
        }
        else {
            Eif (_.isArray(grammars[id]) && _.isArray(expressionDef)) {
                _.each(expressionDef, function (value) {
                    grammars[id].push(value);
                });
            }
            else {
                _.each(expressionDef, function (value) {
                    grammars[id].push(value);
                });
                throw new Error('Can not merge ' + id + '(' + JSON.stringify(expressionDef) + ' => ' + JSON.stringify(grammars[id]) + ')');
            }
        }
    });
}
function Expressions() {
    var subGrammars = [];
    for (var _i = 0; _i < arguments.length; _i++) {
        subGrammars[_i] = arguments[_i];
    }
    var expressions = [];
    var BasicExpression = [];
    var grammars = {
        Start: ['Expressions', 'Empty'],
        Expressions: '[OptionalSpaces][Expression][ExpressionsList*][OptionalSpaces]',
        ExpressionsList: '[Spaces][Expression]',
        Expression: expressions,
        BasicExpression: BasicExpression,
        OptionalSpaces: / */,
        Spaces: / +/,
        Empty: /(?!.)/
    };
    for (var i = 0; i < subGrammars.length; i++) {
        loadSubGrammar(expressions, BasicExpression, grammars, subGrammars[i]);
        _.each(subGrammars[i].include, function (subGrammar) {
            if (!_.contains(subGrammars, subGrammar)) {
                subGrammars.push(subGrammar);
            }
        });
    }
    expressions.push('BasicExpression');
    return {
        start: 'Start',
        expressions: grammars
    };
}
exports.Expressions = Expressions;
function ExpressionsGrammar() {
    var subGrammars = [];
    for (var _i = 0; _i < arguments.length; _i++) {
        subGrammars[_i] = arguments[_i];
    }
    var grammar = Expressions.apply(this, subGrammars);
    return new Grammar_1.Grammar(grammar.start, grammar.expressions);
}
exports.ExpressionsGrammar = ExpressionsGrammar;
 
 
/***/ }),
/* 804 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Basic_1 = __webpack_require__(197);
var Complete_1 = __webpack_require__(798);
var Date_1 = __webpack_require__(800);
var Expressions_1 = __webpack_require__(803);
var Field_1 = __webpack_require__(383);
var NestedQuery_1 = __webpack_require__(799);
var QueryExtension_1 = __webpack_require__(801);
var SubExpression_1 = __webpack_require__(802);
exports.Grammars = {
    Basic: Basic_1.Basic,
    notInWord: Basic_1.notInWord,
    notWordStart: Basic_1.notWordStart,
    Complete: Complete_1.Complete,
    Date: Date_1.Date,
    Expressions: Expressions_1.Expressions,
    ExpressionsGrammar: Expressions_1.ExpressionsGrammar,
    Field: Field_1.Field,
    NestedQuery: NestedQuery_1.NestedQuery,
    QueryExtension: QueryExtension_1.QueryExtension,
    SubExpression: SubExpression_1.SubExpression
};
 
 
/***/ }),
/* 805 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { Iif (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        Iif (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            Iif (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
            Iif (y = 0, t) op = [0, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    Eif (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        Iif (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
Object.defineProperty(exports, "__esModule", { value: true });
var Dom_1 = __webpack_require__(0);
var Strings_1 = __webpack_require__(4);
var underscore_1 = __webpack_require__(1);
var Component_1 = __webpack_require__(6);
var SuggestionsManager_1 = __webpack_require__(265);
var ResultPreviewsManagerEvents_1 = __webpack_require__(198);
var QueryProcessor_1 = __webpack_require__(386);
var Utils_1 = __webpack_require__(5);
var ResultPreviewsManager = /** @class */ (function () {
    function ResultPreviewsManager(element, options) {
        Iif (options === void 0) { options = {}; }
        this.element = element;
        this.options = underscore_1.defaults(options, {
            previewHeaderText: Strings_1.l('QuerySuggestPreview'),
            previewHeaderFieldText: Strings_1.l('QuerySuggestPreviewWithField'),
            previewClass: 'coveo-preview-selectable',
            selectedClass: 'magic-box-selected'
        });
        this.root = Component_1.Component.resolveRoot(element);
        this.previewsProcessor = new QueryProcessor_1.QueryProcessor({ timeout: this.options.timeout });
    }
    Object.defineProperty(ResultPreviewsManager.prototype, "previewsOwner", {
        get: function () {
            return this.lastDisplayedSuggestion;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ResultPreviewsManager.prototype, "hasPreviews", {
        get: function () {
            return !!this.suggestionsPreviewContainer;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ResultPreviewsManager.prototype, "focusedPreviewElement", {
        get: function () {
            if (!this.hasPreviews) {
                return null;
            }
            var focusedElement = this.suggestionsPreviewContainer.findClass(this.options.selectedClass)[0];
            if (!focusedElement || !focusedElement.classList.contains(this.options.previewClass)) {
                return null;
            }
            return focusedElement;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ResultPreviewsManager.prototype, "previewElements", {
        get: function () {
            if (!this.hasPreviews) {
                return [];
            }
            return this.suggestionsPreviewContainer.findClass(this.options.previewClass);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ResultPreviewsManager.prototype, "suggestionsListbox", {
        get: function () {
            return Dom_1.$$(Dom_1.$$(this.element).findClass('coveo-magicbox-suggestions')[0]);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ResultPreviewsManager.prototype, "numberOfResultsPerRow", {
        get: function () {
            var previewSelectables = this.suggestionsPreviewContainer.findClass(this.options.previewClass);
            if (previewSelectables.length === 0) {
                return 0;
            }
            var firstVerticalOffset = previewSelectables[0].offsetTop;
            var firstIndexOnNextRow = underscore_1.findIndex(previewSelectables, function (previewSelectable) { return previewSelectable.offsetTop !== firstVerticalOffset; });
            return firstIndexOnNextRow !== -1 ? firstIndexOnNextRow : previewSelectables.length;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ResultPreviewsManager.prototype, "previewContainerId", {
        get: function () {
            return "coveo-previews-for-" + this.lastDisplayedSuggestion.dom.id;
        },
        enumerable: true,
        configurable: true
    });
    ResultPreviewsManager.prototype.displaySearchResultPreviewsForSuggestion = function (suggestion) {
        return __awaiter(this, void 0, void 0, function () {
            var externalOptions, currentDelay, isQueryForSuggestionOngoing, arePreviewsForSuggestionCurrentlyDisplayed, _a, status, results;
            return __generator(this, function (_b) {
                switch (_b.label) {
                    case 0:
                        externalOptions = this.getExternalOptions();
                        currentDelay = (this.lastDelay = Utils_1.Utils.resolveAfter(Utils_1.Utils.isNullOrUndefined(externalOptions.displayAfterDuration) ? 200 : externalOptions.displayAfterDuration));
                        return [4 /*yield*/, currentDelay];
                    case 1:
                        _b.sent();
                        if (currentDelay !== this.lastDelay) {
                            return [2 /*return*/];
                        }
                        isQueryForSuggestionOngoing = suggestion && this.lastQueriedSuggestion === suggestion;
                        Iif (isQueryForSuggestionOngoing) {
                            return [2 /*return*/];
                        }
                        arePreviewsForSuggestionCurrentlyDisplayed = this.lastDisplayedSuggestion === suggestion;
                        Iif (arePreviewsForSuggestionCurrentlyDisplayed) {
                            this.previewsProcessor.overrideIfProcessing();
                            this.lastQueriedSuggestion = null;
                            return [2 /*return*/];
                        }
                        this.lastQueriedSuggestion = suggestion;
                        if (!suggestion) {
                            this.displaySuggestionPreviews(null, []);
                            return [2 /*return*/];
                        }
                        return [4 /*yield*/, this.getSearchResultPreviewsQuery(suggestion)];
                    case 2:
                        _a = _b.sent(), status = _a.status, results = _a.results;
                        Iif (status === QueryProcessor_1.ProcessingStatus.Overriden) {
                            return [2 /*return*/];
                        }
                        this.lastQueriedSuggestion = null;
                        this.displaySuggestionPreviews(suggestion, results);
                        return [2 /*return*/];
                }
            });
        });
    };
    ResultPreviewsManager.prototype.getElementInDirection = function (direction) {
        var previewElements = this.previewElements;
        var focusedIndex = previewElements.indexOf(this.focusedPreviewElement);
        Iif (focusedIndex === -1) {
            return null;
        }
        if (focusedIndex === 0 && direction === SuggestionsManager_1.Direction.Left) {
            return null;
        }
        return previewElements[(focusedIndex + this.getIncrementInDirection(direction)) % previewElements.length];
    };
    ResultPreviewsManager.prototype.getIncrementInDirection = function (direction) {
        switch (direction) {
            case SuggestionsManager_1.Direction.Left:
                return -1;
            case SuggestionsManager_1.Direction.Right:
                return 1;
            case SuggestionsManager_1.Direction.Up:
                return -this.numberOfResultsPerRow;
            case SuggestionsManager_1.Direction.Down:
                return this.numberOfResultsPerRow;
        }
    };
    ResultPreviewsManager.prototype.setHasPreviews = function (shouldHavePreviews) {
        if (this.hasPreviews === !!shouldHavePreviews) {
            return;
        }
        Eif (shouldHavePreviews) {
            this.initPreviewForSuggestions();
        }
        else {
            this.revertPreviewForSuggestions();
        }
    };
    ResultPreviewsManager.prototype.initPreviewForSuggestions = function () {
        this.suggestionsPreviewContainer = Dom_1.$$('div', {
            className: 'coveo-suggestion-container'
        }, this.suggestionsListbox.el, this.buildPreviewContainer());
        this.element.appendChild(this.suggestionsPreviewContainer.el);
        this.suggestionsListbox.setAttribute('aria-controls', this.previewContainerId);
    };
    ResultPreviewsManager.prototype.revertPreviewForSuggestions = function () {
        this.element.appendChild(this.suggestionsListbox.el);
        this.suggestionsPreviewContainer.remove();
        this.suggestionsPreviewContainer = null;
    };
    ResultPreviewsManager.prototype.buildPreviewContainer = function () {
        return Dom_1.$$('div', {
            className: 'coveo-preview-container',
            id: this.previewContainerId
        }, (this.resultPreviewsContainer = Dom_1.$$('div', {
            className: 'coveo-preview-results',
            role: 'listbox',
            'aria-orientation': 'horizontal'
        }))).el;
    };
    ResultPreviewsManager.prototype.getExternalOptions = function () {
        var optionsEventArgs = {};
        Dom_1.$$(this.root).trigger(ResultPreviewsManagerEvents_1.ResultPreviewsManagerEvents.updateResultPreviewsManagerOptions, optionsEventArgs);
        return optionsEventArgs;
    };
    ResultPreviewsManager.prototype.getSearchResultPreviewsQuery = function (suggestion) {
        var populateEventArgs = {
            suggestion: suggestion,
            previewsQueries: []
        };
        Dom_1.$$(this.root).trigger(ResultPreviewsManagerEvents_1.ResultPreviewsManagerEvents.populateSearchResultPreviews, populateEventArgs);
        return this.previewsProcessor.processQueries(populateEventArgs.previewsQueries);
    };
    ResultPreviewsManager.prototype.appendSearchResultPreview = function (preview, position) {
        this.resultPreviewsContainer.append(preview.element);
        preview.element.id = "coveo-result-preview-" + position;
        var elementDom = Dom_1.$$(preview.element);
        elementDom.setAttribute('aria-selected', 'false');
        elementDom.setAttribute('role', 'option');
        elementDom.on('click', function () { return preview.onSelect(); });
        elementDom.on('keyboardSelect', function () { return preview.onSelect(); });
    };
    ResultPreviewsManager.prototype.appendSearchResultPreviews = function (previews) {
        var _this = this;
        this.resultPreviewsContainer.empty();
        previews.forEach(function (preview, i) { return _this.appendSearchResultPreview(preview, i); });
    };
    ResultPreviewsManager.prototype.displaySuggestionPreviews = function (suggestion, previews) {
        this.lastDisplayedSuggestion = suggestion;
        this.setHasPreviews(previews && previews.length > 0);
        this.element.classList.toggle('magic-box-hasPreviews', this.hasPreviews);
        if (!this.hasPreviews) {
            return;
        }
        this.appendSearchResultPreviews(previews);
    };
    return ResultPreviewsManager;
}());
exports.ResultPreviewsManager = ResultPreviewsManager;
 
 
/***/ }),
/* 806 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Dom_1 = __webpack_require__(0);
var Strings_1 = __webpack_require__(4);
var AccessibleButton_1 = __webpack_require__(20);
var MagicBoxClear = /** @class */ (function () {
    function MagicBoxClear(magicBox) {
        this.element = Dom_1.$$('div', {
            className: 'magic-box-clear'
        });
        var clearIcon = Dom_1.$$('div', {
            className: 'magic-box-icon'
        });
        this.element.append(clearIcon.el);
        this.element.insertAfter(Dom_1.$$(magicBox.element).find('input'));
        new AccessibleButton_1.AccessibleButton()
            .withElement(this.element)
            .withLabel(Strings_1.l('Clear'))
            .withSelectAction(function () { return magicBox.clear(); })
            .build();
        this.toggleTabindexAndAriaHidden(false);
    }
    MagicBoxClear.prototype.toggleTabindexAndAriaHidden = function (hasText) {
        var tabindex = hasText ? '0' : '-1';
        this.element.setAttribute('tabindex', tabindex);
        this.element.setAttribute('aria-hidden', "" + !hasText);
    };
    return MagicBoxClear;
}());
exports.MagicBoxClear = MagicBoxClear;
 
 
/***/ }),
/* 807 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __assign = (this && this.__assign) || Object.assign || function(t) {
    for (var s, i = 1, n = arguments.length; i < n; i++) {
        s = arguments[i];
        for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
            t[p] = s[p];
    }
    return t;
};
Object.defineProperty(exports, "__esModule", { value: true });
var ComponentOptionsModel_1 = __webpack_require__(55);
var QueryboxOptionsProcessing = /** @class */ (function () {
    function QueryboxOptionsProcessing(owner) {
        this.owner = owner;
    }
    Object.defineProperty(QueryboxOptionsProcessing.prototype, "options", {
        get: function () {
            return this.owner.options;
        },
        set: function (options) {
            this.owner.options = options;
        },
        enumerable: true,
        configurable: true
    });
    QueryboxOptionsProcessing.prototype.postProcess = function () {
        this.options = __assign({}, this.options, this.owner.componentOptionsModel.get(ComponentOptionsModel_1.ComponentOptionsModel.attributesEnum.searchBox));
        this.processQueryOnClearVersusEmptyQuery();
        this.processQueryOnClearVersusSearchAsYouType();
    };
    QueryboxOptionsProcessing.prototype.processQueryOnClearVersusEmptyQuery = function () {
        if (this.options.triggerQueryOnClear && this.owner.searchInterface.options.allowQueriesWithoutKeywords === false) {
            this.owner.logger.warn('Forcing option triggerQueryOnClear to false, as it is not supported when the search interface is configured to not allow queries without keywords (data-allow-queries-without-keywords="false")', this.owner);
            this.options.triggerQueryOnClear = false;
        }
    };
    QueryboxOptionsProcessing.prototype.processQueryOnClearVersusSearchAsYouType = function () {
        if (this.owner.searchInterface.options.allowQueriesWithoutKeywords === true &&
            this.options.triggerQueryOnClear === false &&
            this.options.enableSearchAsYouType === true) {
            this.owner.logger.warn('Forcing option triggerQueryOnClear to true, since search-as-you-type is enabled', this.owner);
            this.options.triggerQueryOnClear = true;
        }
    };
    return QueryboxOptionsProcessing;
}());
exports.QueryboxOptionsProcessing = QueryboxOptionsProcessing;
 
 
/***/ }),
/* 808 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
__webpack_require__(1492);
var _ = __webpack_require__(1);
var OmniboxEvents_1 = __webpack_require__(47);
var QueryEvents_1 = __webpack_require__(14);
var EventsModules_1 = __webpack_require__(109);
var GlobalExports_1 = __webpack_require__(10);
var Assert_1 = __webpack_require__(12);
var Logger_1 = __webpack_require__(18);
var Strings_1 = __webpack_require__(4);
var Dom_1 = __webpack_require__(0);
var Utils_1 = __webpack_require__(5);
var AnalyticsActionListMeta_1 = __webpack_require__(7);
var SharedAnalyticsCalls_1 = __webpack_require__(172);
var Component_1 = __webpack_require__(6);
var ComponentOptions_1 = __webpack_require__(13);
var Initialization_1 = __webpack_require__(8);
var ResultList_1 = __webpack_require__(68);
/**
 * The OmniboxResultList component behaves exactly like the {@link ResultList} component (which it extends), except that
 * it renders itself inside the {@link Omnibox} component.
 *
 * This component can provide a kind of search-as-you-type functionality, allowing you to easily render complex Result
 * Templates inside the Omnibox component.
 *
 * **Example:**
 *
 * ```html
 * <div class="CoveoOmniboxResultList">
 *   <script class="result-template" type="text/x-underscore">
 *     <div>
 *       <a class='CoveoResultLink'></a>
 *     </div>
 *   </script>
 * </div>
 * ```
 */
var OmniboxResultList = /** @class */ (function (_super) {
    __extends(OmniboxResultList, _super);
    /**
     * Creates a new OmniboxResultList component.
     * @param element The HTMLElement on which to instantiate the component.
     * @param options The options for the OmniboxResultList component.
     * @param bindings The bindings that the component requires to function normally. If not set, these will be
     * automatically resolved (with a slower execution time).
     */
    function OmniboxResultList(element, options, bindings) {
        var _this = _super.call(this, element, options, bindings, OmniboxResultList.ID) || this;
        _this.element = element;
        _this.options = options;
        _this.bindings = bindings;
        _this.options = ComponentOptions_1.ComponentOptions.initComponentOptions(element, OmniboxResultList, options);
        _this.setupOptions();
        _this.bind.onRootElement(OmniboxEvents_1.OmniboxEvents.populateOmnibox, function (args) { return _this.handlePopulateOmnibox(args); });
        _this.bind.onRootElement(QueryEvents_1.QueryEvents.buildingQuery, function (args) { return _this.handleBuildingQuery(args); });
        _this.bind.onRootElement(EventsModules_1.InitializationEvents.afterComponentsInitialization, function () {
            _this.handleAfterComponentInit();
        });
        return _this;
    }
    /**
     * Builds and returns an array of `HTMLElement` from the {@link IQueryResults} set received as an argument.
     * @param results The IQueryResults set to build an array of `HTMLElement` from.
     */
    OmniboxResultList.prototype.buildResults = function (results) {
        var _this = this;
        var builtResults = [];
        var builtPromises = _.map(results.results, function (result) {
            return _this.buildResult(result).then(function (resultElement) {
                Dom_1.$$(resultElement).addClass('coveo-omnibox-selectable');
                resultElement['no-text-suggestion'] = true;
                Dom_1.$$(resultElement).on(['keyboardSelect', 'click'], function (e) { return _this.handleOmniboxElementSelection(e, resultElement, result); });
                return _this.autoCreateComponentsInsideResult(resultElement, result).initResult.then(function () {
                    builtResults.push(resultElement);
                    return resultElement;
                });
            });
        });
        return Promise.all(builtPromises).then(function () {
            return builtResults;
        });
    };
    /**
     * Creates a result container and appends each element from the received `HTMLElement` array to it. For each element
     * it appends to the result container, this method triggers a `newResultDisplayed` event. Once all elements have been
     * appended to the result container, the method triggers a `newResultsDisplayed` event.
     * @param resultElements The array of `HTMLElement` to render.
     * @param append
     */
    OmniboxResultList.prototype.renderResults = function (resultElements, append) {
        Eif (append === void 0) { append = false; }
        Dom_1.$$(this.options.resultsContainer).empty();
        Iif (!this.lastOmniboxRequest) {
            return Promise.resolve(null);
        }
        if (resultElements.length) {
            this.appendHeaderIfTitleIsSpecified();
            this.appendResults(resultElements);
        }
        this.resolveLastOmniboxRequest();
        return Promise.resolve(null);
    };
    OmniboxResultList.prototype.handleAfterComponentInit = function () {
        var _this = this;
        var omniboxElement = Dom_1.$$(this.root).find("." + Component_1.Component.computeCssClassNameForType('Omnibox'));
        if (omniboxElement) {
            var omnibox = Component_1.Component.get(omniboxElement);
            var magicBox = omnibox.magicBox;
            magicBox.onsubmit = function () {
                SharedAnalyticsCalls_1.logSearchBoxSubmitEvent(_this.usageAnalytics);
                _this.queryController.executeQuery();
            };
        }
    };
    OmniboxResultList.prototype.appendHeaderIfTitleIsSpecified = function () {
        Eif (this.options.headerTitle) {
            this.options.resultsContainer.appendChild(Dom_1.$$('div', { className: 'coveo-omnibox-result-list-header' }, Dom_1.$$('span', { className: 'coveo-icon-omnibox-result-list' }).el, Dom_1.$$('span', { className: 'coveo-caption' }, Strings_1.l(this.options.headerTitle)).el).el);
        }
    };
    OmniboxResultList.prototype.appendResults = function (resultElements) {
        var _this = this;
        _.each(resultElements, function (resultElement) {
            _this.options.resultsContainer.appendChild(resultElement);
            _this.triggerNewResultDisplayed(Component_1.Component.getResult(resultElement), resultElement);
        });
        this.triggerNewResultsDisplayed();
    };
    OmniboxResultList.prototype.resolveLastOmniboxRequest = function () {
        if (Dom_1.$$(this.options.resultsContainer).findAll('.coveo-omnibox-selectable').length == 0) {
            this.lastOmniboxRequest.resolve({ element: null, zIndex: this.options.omniboxZIndex });
        }
        else {
            this.lastOmniboxRequest.resolve({ element: this.options.resultsContainer, zIndex: this.options.omniboxZIndex });
        }
    };
    OmniboxResultList.prototype.handleChangeLayout = function () {
        // Since OmniboxResultList does not allow multiple layout,
        // we simply ignore the event change since the component does not have anything meaningful to do.
        return;
    };
    OmniboxResultList.prototype.setupOptions = function () {
        this.logger.info('Disabling infinite scroll for OmniboxResultList', this);
        this.options.enableInfiniteScroll = false;
        this.options.onSelect = this.options.onSelect || this.onRowSelection;
    };
    OmniboxResultList.prototype.handlePopulateOmnibox = function (args) {
        var _this = this;
        var promise = new Promise(function (resolve, reject) {
            _this.queryController.executeQuery({
                searchAsYouType: true,
                shouldRedirectStandaloneSearchbox: false,
                beforeExecuteQuery: function () { return _this.usageAnalytics.logSearchAsYouType(AnalyticsActionListMeta_1.analyticsActionCauseList.searchboxSubmit, {}); }
            });
            _this.lastOmniboxRequest = { omniboxObject: args, resolve: resolve };
        });
        args.rows.push({
            deferred: promise
        });
    };
    OmniboxResultList.prototype.handleBuildingQuery = function (args) {
        Assert_1.Assert.exists(args);
        if (Utils_1.Utils.isNonEmptyString(this.options.queryOverride)) {
            args.queryBuilder.constantExpression.add(this.options.queryOverride);
        }
    };
    OmniboxResultList.prototype.handleOmniboxElementSelection = function (e, resultElement, result) {
        if (e && e.target && this.otherComponentShouldHandleSelection(e, resultElement)) {
            return;
        }
        Eif (this.lastOmniboxRequest) {
            this.options.onSelect.call(this, result, resultElement, this.lastOmniboxRequest.omniboxObject, e);
        }
    };
    OmniboxResultList.prototype.otherComponentShouldHandleSelection = function (e, resultElement) {
        // Other components can "trap" the click event, and instead trigger the "standard" component behaviour.
        // So, for example, if someones clicks the ResultLink directly, we want the result link code to execute to redirect to the result, and not the OmniboxResultList selection code.
        // Same for Quickview, YouTubeThumbnail, etc.
        var current = e.target;
        var otherComponentWillHandleClick = false;
        while (current && current != resultElement) {
            otherComponentWillHandleClick =
                _.find(OmniboxResultList.elementsToIgnore, function (elementToIgnore) { return Dom_1.$$(current).hasClass(elementToIgnore); }) != null;
            if (otherComponentWillHandleClick) {
                break;
            }
            current = current.parentElement;
        }
        return otherComponentWillHandleClick;
    };
    OmniboxResultList.prototype.onRowSelection = function (result, resultElement, omniboxObject, e) {
        this.usageAnalytics.logClickEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.documentOpen, { author: Utils_1.Utils.getFieldValue(result, 'author') }, result, this.root);
        window.location.href = result.clickUri;
    };
    OmniboxResultList.prototype.initResultContainerAddToDom = function () {
        //This function is overwritten and don't do anything because we don't want to append the result container
        //to the DOM. If the resultContainer was to be appended to the DOM, this could lead to result appearing
        //outside of the magicBox so the rest of the page would be push down
    };
    OmniboxResultList.ID = 'OmniboxResultList';
    /**
     * Specifies a list a css class that should be ignored when the end user click result in the omnibox
     *
     * Any element that is specified here should normally be able to handle the standard click event.
     *
     * Any element that does not match this css class and that is clicked will trigger a redirection by the OmniboxResultList.
     */
    OmniboxResultList.elementsToIgnore = [
        'coveo-field-table-toggle-caption',
        'CoveoFollowItem',
        'CoveoPrintableUri',
        'CoveoQuickview',
        'CoveoResultLink',
        'CoveoResultRating',
        'CoveoResultTagging',
        'CoveoYouTubeThumbnail'
    ];
    OmniboxResultList.doExport = function () {
        GlobalExports_1.exportGlobally({
            OmniboxResultList: OmniboxResultList
        });
    };
    /**
     * The options for the component
     * @componentOptions
     */
    OmniboxResultList.options = {
        layout: ComponentOptions_1.ComponentOptions.buildStringOption({
            defaultValue: 'list',
            postProcessing: function (optionSetByUser) {
                if (optionSetByUser != 'list') {
                    var logger = new Logger_1.Logger(OmniboxResultList);
                    logger.warn("Cannot apply layout " + optionSetByUser + " on the OmniboxResultListComponent");
                    logger.warn("OmniboxResultList does not support any layout other than \"list\"");
                }
                return 'list';
            }
        }),
        /**
         * Specifies the z-index at which to render the ResultList inside the Omnibox.
         *
         * Default value is `51`. Minimum value is `16` ({@link Facet} components are at `50` by default)
         */
        omniboxZIndex: ComponentOptions_1.ComponentOptions.buildNumberOption({ defaultValue: 51, min: 16 }),
        /**
         * Specifies the title to use for this section.
         *
         * Default value is the localized string for `Suggested Results`.
         */
        headerTitle: ComponentOptions_1.ComponentOptions.buildStringOption(),
        /**
         * Specifies the override to use on the query sent to the OmniboxResultList component.
         *
         * Default value is `undefined`, which means no default override is specified.
         */
        queryOverride: ComponentOptions_1.ComponentOptions.buildQueryExpressionOption(),
        /**
         * Specifies the function to execute when the user selects a result suggestion.
         *
         * The default function opens the corresponding result URI in the browser.
         *
         * It is only possible to specify a value for this option in the {@link init} call of your search interface. You
         * cannot set it directly as an HTML attribute.
         *
         * **Example:**
         *
         * ```javascript
         * // You can call the init script using "pure" JavaScript:
         * Coveo.init(document.querySelector('#search'), {
         *    OmniboxResultList : {
         *        //Close the omnibox, change the selected HTMLElement background color and alert the result title.
         *        onSelect : function(result, resultElement, omniBoxObject) {
         *            omniBoxObject.close();
         *            resultElement.css('background-color', 'red');
         *            alert(result.title);
         *        }
         *     }
         * })
         *
         * // Or you can call the init script using the jQuery extension:
         * $("#search").coveo("init", {
         *    OmniboxResultList : {
         *        //Close the Omnibox, change the selected HTMLElement background color and alert the result title.
         *        onSelect : function(result, resultElement, omniBoxObject) {
         *            omniBoxObject.close();
         *            resultElement.css('background-color', 'red');
         *            alert(result.title);
         *        }
         *     }
         * })
         * ```
         */
        onSelect: ComponentOptions_1.ComponentOptions.buildCustomOption(function () {
            return null;
        })
    };
    return OmniboxResultList;
}(ResultList_1.ResultList));
exports.OmniboxResultList = OmniboxResultList;
Initialization_1.Initialization.registerAutoCreateComponent(OmniboxResultList);
 
 
/***/ }),
/* 809 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __assign = (this && this.__assign) || Object.assign || function(t) {
    for (var s, i = 1, n = arguments.length; i < n; i++) {
        s = arguments[i];
        for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
            t[p] = s[p];
    }
    return t;
};
Object.defineProperty(exports, "__esModule", { value: true });
var ComponentOptions_1 = __webpack_require__(13);
var HighlightUtils_1 = __webpack_require__(82);
var Initialization_1 = __webpack_require__(8);
var Utils_1 = __webpack_require__(5);
var Dom_1 = __webpack_require__(0);
var GlobalExports_1 = __webpack_require__(10);
__webpack_require__(1495);
var ResultLink_1 = __webpack_require__(56);
var StreamHighlightUtils_1 = __webpack_require__(139);
var _ = __webpack_require__(1);
var ComponentOptionsModel_1 = __webpack_require__(55);
var Component_1 = __webpack_require__(6);
var AccessibleButton_1 = __webpack_require__(20);
var DeviceUtils_1 = __webpack_require__(42);
var Strings_1 = __webpack_require__(4);
/**
 * The `PrintableUri` component inherits from the [ `ResultLink` ]{@link ResultLink} component and supports all of its options.
 *
 * This component displays the URI, or path, to access a result.
 *
 * This component is a result template component (see [Result Templates](https://docs.coveo.com/en/413/)).
 */
var PrintableUri = /** @class */ (function (_super) {
    __extends(PrintableUri, _super);
    /**
     * Creates a new PrintableUri.
     * @param element The HTMLElement on which to instantiate the component.
     * @param options The options for the PrintableUri component.
     * @param bindings The bindings that the component requires to function normally. If not set, these will be
     * automatically resolved (with a slower execution time).
     * @param result The result to associate the component with.
     */
    function PrintableUri(element, options, bindings, result) {
        var _this = _super.call(this, element, PrintableUri.ID, bindings) || this;
        _this.element = element;
        _this.options = options;
        _this.bindings = bindings;
        _this.result = result;
        _this.links = [];
        _this.options = ComponentOptions_1.ComponentOptions.initComponentOptions(element, PrintableUri, options);
        _this.options = _.extend({}, _this.options, _this.componentOptionsModel.get(ComponentOptionsModel_1.ComponentOptionsModel.attributesEnum.resultLink));
        _this.renderUri(_this.result);
        _this.addAccessibilityAttributes();
        return _this;
    }
    /**
     * Opens the result in the same window, no matter how the actual component is configured for the end user.
     * @param logAnalytics Specifies whether the method should log an analytics event.
     */
    PrintableUri.prototype.openLink = function (logAnalytics) {
        if (logAnalytics === void 0) { logAnalytics = true; }
        _.last(this.links).openLink(logAnalytics);
    };
    /**
     * Opens the result in a new window, no matter how the actual component is configured for the end user.
     * @param logAnalytics Specifies whether the method should log an analytics event.
     */
    PrintableUri.prototype.openLinkInNewWindow = function (logAnalytics) {
        Eif (logAnalytics === void 0) { logAnalytics = true; }
        _.last(this.links).openLinkInNewWindow(logAnalytics);
    };
    /**
     * Opens the link in the same manner the end user would.
     *
     * This essentially simulates a click on the result link.
     *
     * @param logAnalytics Specifies whether the method should log an analytics event.
     */
    PrintableUri.prototype.openLinkAsConfigured = function (logAnalytics) {
        if (logAnalytics === void 0) { logAnalytics = true; }
        _.last(this.links).openLinkAsConfigured(logAnalytics);
    };
    PrintableUri.prototype.renderUri = function (result) {
        var parentsXml = Utils_1.Utils.getFieldValue(result, 'parents');
        if (parentsXml) {
            this.renderParents({
                parents: this.parseXmlParents(parentsXml),
                firstIndexToRender: 0,
                maxNumOfParts: DeviceUtils_1.DeviceUtils.isMobileDevice() ? 3 : 5
            });
        }
        else if (this.options.titleTemplate) {
            var link = new ResultLink_1.ResultLink(this.buildElementForResultLink(result.printableUri), this.options, this.bindings, this.result);
            this.links.push(link);
            this.element.appendChild(this.makeLinkAccessible(link.element));
        }
        else {
            this.renderShortenedUri();
        }
    };
    PrintableUri.prototype.buildSeparator = function () {
        var separator = Dom_1.$$('span', { className: 'coveo-printable-uri-separator', role: 'separator' }, ' > ');
        return separator.el;
    };
    PrintableUri.prototype.buildHtmlToken = function (name, uri) {
        var modifiedName = name.charAt(0).toUpperCase() + name.slice(1);
        var resultPart = _.extend({}, this.result, {
            clickUri: uri,
            title: modifiedName,
            titleHighlights: this.getModifiedHighlightsForModifiedResultTitle(modifiedName)
        });
        var link = new ResultLink_1.ResultLink(this.buildElementForResultLink(modifiedName), this.options, this.bindings, resultPart);
        this.links.push(link);
        return link.element;
    };
    PrintableUri.prototype.parseXmlParents = function (parentsXml) {
        var elements = Utils_1.Utils.parseXml(parentsXml).getElementsByTagName('parent');
        var parents = [];
        for (var i = 0; i < elements.length; i++) {
            parents.push(elements.item(i));
        }
        return parents;
    };
    PrintableUri.prototype.renderParents = function (renderOptions) {
        Dom_1.$$(this.element).empty();
        var lastIndex = renderOptions.parents.length - 1;
        var beforeLastIndex = lastIndex - 1;
        var maxMiddleParts = renderOptions.maxNumOfParts - 1;
        var lastMiddlePartIndex = Math.min(beforeLastIndex, renderOptions.firstIndexToRender + maxMiddleParts - 1);
        var partsBetweenMiddlePartsAndLastPart = beforeLastIndex - lastMiddlePartIndex;
        this.optionallyRenderFirstEllipsis(renderOptions);
        this.renderMiddleParts(renderOptions, lastMiddlePartIndex);
        if (partsBetweenMiddlePartsAndLastPart > 0) {
            this.renderLastEllipsis(__assign({}, renderOptions, { firstIndexToRender: Math.min(Math.max(lastMiddlePartIndex + 1, 0), renderOptions.parents.length - renderOptions.maxNumOfParts) }));
        }
        this.renderLastPart(renderOptions);
    };
    PrintableUri.prototype.optionallyRenderFirstEllipsis = function (nextRenderOptions) {
        if (nextRenderOptions.firstIndexToRender > 0) {
            this.appendEllipsis(__assign({}, nextRenderOptions, { firstIndexToRender: Math.max(0, nextRenderOptions.firstIndexToRender - nextRenderOptions.maxNumOfParts + 1) }));
            this.appendSeparator();
        }
    };
    PrintableUri.prototype.renderMiddleParts = function (renderOptions, lastIndexToRender) {
        for (var i = renderOptions.firstIndexToRender; i <= lastIndexToRender; i++) {
            if (i > renderOptions.firstIndexToRender) {
                this.appendSeparator();
            }
            this.appendToken(renderOptions.parents[i]);
        }
    };
    PrintableUri.prototype.renderLastEllipsis = function (nextRenderOptions) {
        this.appendSeparator();
        this.appendEllipsis(nextRenderOptions);
    };
    PrintableUri.prototype.renderLastPart = function (renderOptions) {
        this.appendSeparator();
        this.appendToken(renderOptions.parents[renderOptions.parents.length - 1]);
    };
    PrintableUri.prototype.appendSeparator = function () {
        this.element.appendChild(this.buildSeparator());
    };
    PrintableUri.prototype.appendEllipsis = function (nextRenderOptions) {
        var _this = this;
        this.element.appendChild(this.buildEllipsis(function () {
            _this.renderParents(nextRenderOptions);
            _this.element.firstChild.firstChild.focus();
        }));
    };
    PrintableUri.prototype.appendToken = function (part) {
        this.element.appendChild(this.makeLinkAccessible(this.buildHtmlToken(part.getAttribute('name'), part.getAttribute('uri'))));
    };
    PrintableUri.prototype.renderShortenedUri = function () {
        var stringAndHoles;
        Eif (this.result.printableUri.indexOf('\\') == -1) {
            stringAndHoles = HighlightUtils_1.StringAndHoles.shortenUri(this.result.printableUri, Dom_1.$$(this.element).width());
        }
        else {
            stringAndHoles = HighlightUtils_1.StringAndHoles.shortenPath(this.result.printableUri, Dom_1.$$(this.element).width());
        }
        var shortenedUri = HighlightUtils_1.HighlightUtils.highlightString(stringAndHoles.value, this.result.printableUriHighlights, stringAndHoles.holes, 'coveo-highlight');
        var resultPart = _.extend({}, this.result, {
            title: shortenedUri,
            titleHighlights: this.getModifiedHighlightsForModifiedResultTitle(shortenedUri)
        });
        var link = new ResultLink_1.ResultLink(this.buildElementForResultLink(this.result.printableUri), this.options, this.bindings, resultPart);
        this.links.push(link);
        this.element.appendChild(this.makeLinkAccessible(link.element));
    };
    PrintableUri.prototype.makeLinkAccessible = function (link) {
        return Dom_1.$$('span', {
            className: 'coveo-printable-uri-part',
            role: 'listitem'
        }, link).el;
    };
    PrintableUri.prototype.buildEllipsis = function (action) {
        var button = Dom_1.$$('button', { type: 'button' }, '...');
        var element = Dom_1.$$('span', {
            className: 'coveo-printable-uri-ellipsis',
            role: 'listitem'
        }, button).el;
        new AccessibleButton_1.AccessibleButton().withElement(button).withLabel(Strings_1.l('CollapsedUriParts')).withSelectAction(action).build();
        return element;
    };
    PrintableUri.prototype.buildElementForResultLink = function (title) {
        return Dom_1.$$('a', {
            className: 'CoveoResultLink',
            title: title
        }).el;
    };
    PrintableUri.prototype.getModifiedHighlightsForModifiedResultTitle = function (newTitle) {
        return StreamHighlightUtils_1.getRestHighlightsForAllTerms(newTitle, this.result.termsToHighlight, this.result.phrasesToHighlight, new StreamHighlightUtils_1.DefaultStreamHighlightOptions());
    };
    PrintableUri.prototype.addAccessibilityAttributes = function () {
        this.element.setAttribute('role', 'list');
    };
    PrintableUri.ID = 'PrintableUri';
    PrintableUri.options = {};
    PrintableUri.doExport = function () {
        GlobalExports_1.exportGlobally({
            PrintableUri: PrintableUri
        });
    };
    return PrintableUri;
}(Component_1.Component));
exports.PrintableUri = PrintableUri;
PrintableUri.options = _.extend({}, PrintableUri.options, ResultLink_1.ResultLink.options);
Initialization_1.Initialization.registerAutoCreateComponent(PrintableUri);
 
 
/***/ }),
/* 810 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
var Component_1 = __webpack_require__(6);
var ComponentOptions_1 = __webpack_require__(13);
var QueryEvents_1 = __webpack_require__(14);
var Assert_1 = __webpack_require__(12);
var Dom_1 = __webpack_require__(0);
var Strings_1 = __webpack_require__(4);
var Initialization_1 = __webpack_require__(8);
var Globalize = __webpack_require__(28);
var GlobalExports_1 = __webpack_require__(10);
__webpack_require__(1497);
/**
 * The QueryDuration component displays the duration of the last query execution.
 *
 * When a {@link QueryEvents.querySuccess} event is triggered, the QueryDuration component becomes visible. It also
 * displays the global duration, the index duration, and the client duration in a single tooltip.
 *
 * If a {@link QueryEvents.queryError} event is triggered, the QueryDuration component becomes hidden.
 */
var QueryDuration = /** @class */ (function (_super) {
    __extends(QueryDuration, _super);
    /**
     * Creates a new QueryDuration component.
     * Binds handlers on the {@link QueryEvents.querySuccess} and {@link QueryEvents.queryError} events.
     * @param element The HTMLElement on which to instantiate the component.
     * @param options The options for the QueryDuration component.
     * @param bindings The bindings that the component requires to function normally. If not set, these will be
     * automatically resolved (with a slower execution time).
     */
    function QueryDuration(element, options, bindings) {
        var _this = _super.call(this, element, QueryDuration.ID, bindings) || this;
        _this.element = element;
        _this.options = options;
        _this.options = ComponentOptions_1.ComponentOptions.initComponentOptions(element, QueryDuration, options);
        _this.bind.onRootElement(QueryEvents_1.QueryEvents.querySuccess, function (data) { return _this.handleQuerySuccess(data); });
        _this.bind.onRootElement(QueryEvents_1.QueryEvents.queryError, function () { return Dom_1.$$(_this.element).hide(); });
        _this.element.style.display = 'none';
        _this.textContainer = Dom_1.$$('span').el;
        _this.element.appendChild(_this.textContainer);
        return _this;
    }
    QueryDuration.prototype.handleQuerySuccess = function (data) {
        Eif (!this.disabled && data.results.results.length > 0) {
            Assert_1.Assert.exists(data);
            var tooltip = [
                Strings_1.l('Duration', this.formatQueryDuration(data.results.duration)),
                Strings_1.l('SearchAPIDuration', this.formatQueryDuration(data.results.searchAPIDuration)),
                Strings_1.l('IndexDuration', this.formatQueryDuration(data.results.indexDuration))
            ].join('\n');
            this.textContainer.textContent = this.formatQueryDuration(data.results.duration);
            this.element.setAttribute('title', tooltip);
            this.element.style.display = 'inline';
        }
        else {
            this.element.style.display = 'none';
        }
    };
    QueryDuration.prototype.formatQueryDuration = function (durationInMillis) {
        Iif (durationInMillis == undefined) {
            return Strings_1.l('Unavailable');
        }
        else {
            var seconds = Math.max(durationInMillis / 1000, 0.01);
            Eif (String['locale'] === 'en') {
                return Strings_1.l('Seconds', Globalize.format(seconds, 'n2'), seconds, true);
            }
            else {
                return Strings_1.l('Seconds', Globalize.format(seconds, 'n2'), seconds);
            }
        }
    };
    QueryDuration.ID = 'QueryDuration';
    QueryDuration.doExport = function () {
        GlobalExports_1.exportGlobally({
            QueryDuration: QueryDuration
        });
    };
    QueryDuration.options = {};
    return QueryDuration;
}(Component_1.Component));
exports.QueryDuration = QueryDuration;
Initialization_1.Initialization.registerAutoCreateComponent(QueryDuration);
 
 
/***/ }),
/* 811 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
__webpack_require__(1498);
var underscore_1 = __webpack_require__(1);
var QueryEvents_1 = __webpack_require__(14);
var QuerySummaryEvents_1 = __webpack_require__(661);
var GlobalExports_1 = __webpack_require__(10);
var Assert_1 = __webpack_require__(12);
var QueryStateModel_1 = __webpack_require__(17);
var Strings_1 = __webpack_require__(4);
var Dom_1 = __webpack_require__(0);
var QuerySummaryUtils_1 = __webpack_require__(302);
var AnalyticsActionListMeta_1 = __webpack_require__(7);
var Component_1 = __webpack_require__(6);
var ComponentOptions_1 = __webpack_require__(13);
var Initialization_1 = __webpack_require__(8);
var AccessibleButton_1 = __webpack_require__(20);
exports.noResultsCssClass = 'coveo-show-if-no-results';
/**
 * The QuerySummary component can display information about the currently displayed range of results (e.g., "Results
 * 1-10 of 123").
 *
 * When the query does not match any items, the QuerySummary component can instead display information to the end users.
 *
 * The information displayed to the end user is customizable through this component.
 */
var QuerySummary = /** @class */ (function (_super) {
    __extends(QuerySummary, _super);
    /**
     * Creates a new QuerySummary component.
     * @param element The HTMLElement on which to instantiate the component.
     * @param options The options for the QuerySummary component.
     * @param bindings The bindings that the component requires to function normally. If not set, these will be
     * automatically resolved (with a slower execution time).
     */
    function QuerySummary(element, options, bindings) {
        var _this = _super.call(this, element, QuerySummary.ID, bindings) || this;
        _this.element = element;
        _this.options = options;
        _this.options = ComponentOptions_1.ComponentOptions.initComponentOptions(element, QuerySummary, options);
        _this.bind.onRootElement(QueryEvents_1.QueryEvents.querySuccess, function (data) { return _this.handleQuerySuccess(data); });
        _this.bind.onRootElement(QueryEvents_1.QueryEvents.queryError, function () { return _this.hide(); });
        _this.hide();
        _this.textContainer = Dom_1.$$('span').el;
        Dom_1.$$(_this.element).prepend(_this.textContainer);
        return _this;
    }
    QuerySummary.prototype.hide = function () {
        Dom_1.$$(this.element).addClass('coveo-hidden');
    };
    QuerySummary.prototype.show = function () {
        Dom_1.$$(this.element).removeClass('coveo-hidden');
    };
    QuerySummary.prototype.render = function (data) {
        Dom_1.$$(this.textContainer).empty();
        this.show();
        this.updateNoResultsSnapshot();
        this.hideNoResultsPage();
        if (!this.options.onlyDisplaySearchTips) {
            this.updateSummaryIfResultsWereReceived(data);
        }
        var queryResults = data.results;
        Iif (queryResults.exception != null && queryResults.exception.code != null) {
            var code = ('QueryException' + queryResults.exception.code).toLocaleString();
            this.textContainer.innerHTML = Strings_1.l('QueryException', code);
        }
        else if (queryResults.results.length == 0) {
            this.updateQueryTagsInNoResultsContainer();
            this.displayInfoOnNoResults();
        }
        else {
            this.lastKnownGoodState = this.queryStateModel.getAttributes();
        }
    };
    QuerySummary.prototype.handleQuerySuccess = function (data) {
        Assert_1.Assert.exists(data);
        this.render(data);
    };
    QuerySummary.prototype.updateSummaryIfResultsWereReceived = function (data) {
        if (!data.results.results.length) {
            return;
        }
        var message = QuerySummaryUtils_1.QuerySummaryUtils.htmlMessage(this.root, data);
        this.textContainer.innerHTML = message;
    };
    QuerySummary.prototype.updateNoResultsSnapshot = function () {
        var noResultsContainer = this.getNoResultsContainer();
        if (this.noResultsSnapshot == null && noResultsContainer) {
            this.noResultsSnapshot = noResultsContainer.innerHTML;
        }
    };
    QuerySummary.prototype.updateQueryTagsInNoResultsContainer = function () {
        var noResultsContainer = this.getNoResultsContainer();
        if (noResultsContainer) {
            noResultsContainer.innerHTML = this.replaceQueryTagsWithHighlightedQuery(this.noResultsSnapshot);
        }
    };
    QuerySummary.prototype.replaceQueryTagsWithHighlightedQuery = function (template) {
        var highlightedQuery = "<span class=\"coveo-highlight\">" + this.sanitizedQuery + "</span>";
        return QuerySummaryUtils_1.QuerySummaryUtils.replaceQueryTags(template, highlightedQuery);
    };
    Object.defineProperty(QuerySummary.prototype, "sanitizedQuery", {
        get: function () {
            return underscore_1.escape(this.queryStateModel.get(QueryStateModel_1.QueryStateModel.attributesEnum.q));
        },
        enumerable: true,
        configurable: true
    });
    QuerySummary.prototype.displayInfoOnNoResults = function () {
        this.showNoResultsPage();
        if (this.options.enableNoResultsFoundMessage) {
            var noResultsFoundMessage = this.getNoResultsFoundMessageElement();
            this.textContainer.appendChild(noResultsFoundMessage.el);
        }
        if (this.options.enableCancelLastAction) {
            var cancelLastAction = this.getCancelLastActionElement();
            this.textContainer.appendChild(cancelLastAction.el);
        }
        if (this.options.enableSearchTips) {
            var searchTipsTitle = this.getSearchTipsTitleElement();
            var searchTipsList = this.getSearchTipsListElement();
            this.textContainer.appendChild(searchTipsTitle.el);
            this.textContainer.appendChild(searchTipsList.el);
        }
    };
    QuerySummary.prototype.hideNoResultsPage = function () {
        var noResultsContainers = this.getAllNoResultsContainer();
        noResultsContainers.forEach(function (noResultsContainer) {
            Dom_1.$$(noResultsContainer).removeClass('coveo-no-results');
        });
    };
    QuerySummary.prototype.showNoResultsPage = function () {
        var noResultsContainers = this.getAllNoResultsContainer();
        noResultsContainers.forEach(function (noResultsContainer) {
            Dom_1.$$(noResultsContainer).addClass('coveo-no-results');
        });
    };
    QuerySummary.prototype.getNoResultsContainer = function () {
        return Dom_1.$$(this.element).find("." + exports.noResultsCssClass);
    };
    QuerySummary.prototype.getAllNoResultsContainer = function () {
        return Dom_1.$$(this.element).findAll("." + exports.noResultsCssClass);
    };
    Object.defineProperty(QuerySummary.prototype, "parsedNoResultsFoundMessage", {
        get: function () {
            if (this.sanitizedQuery.trim() === '') {
                return Strings_1.l('noResult');
            }
            return this.replaceQueryTagsWithHighlightedQuery(this.options.noResultsFoundMessage);
        },
        enumerable: true,
        configurable: true
    });
    QuerySummary.prototype.getNoResultsFoundMessageElement = function () {
        var noResultsFoundMessage = Dom_1.$$('div', {
            className: 'coveo-query-summary-no-results-string'
        }, this.parsedNoResultsFoundMessage);
        return noResultsFoundMessage;
    };
    QuerySummary.prototype.getCancelLastActionElement = function () {
        var _this = this;
        var cancelLastAction = Dom_1.$$('div', {
            className: 'coveo-query-summary-cancel-last'
        }, Strings_1.l('CancelLastAction'));
        new AccessibleButton_1.AccessibleButton()
            .withLabel(Strings_1.l('CancelLastAction'))
            .withElement(cancelLastAction)
            .withSelectAction(function () {
            _this.usageAnalytics.logCustomEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.noResultsBack, {}, _this.root);
            _this.usageAnalytics.logSearchEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.noResultsBack, {});
            if (_this.lastKnownGoodState) {
                _this.queryStateModel.reset();
                _this.queryStateModel.setMultiple(_this.lastKnownGoodState);
                Dom_1.$$(_this.root).trigger(QuerySummaryEvents_1.QuerySummaryEvents.cancelLastAction);
                _this.queryController.executeQuery();
            }
            else {
                history.back();
            }
        })
            .build();
        return cancelLastAction;
    };
    QuerySummary.prototype.getSearchTipsTitleElement = function () {
        var searchTipsInfo = Dom_1.$$('div', {
            className: 'coveo-query-summary-search-tips-info'
        });
        searchTipsInfo.text(Strings_1.l('SearchTips'));
        return searchTipsInfo;
    };
    QuerySummary.prototype.getSearchTipsListElement = function () {
        var searchTips = Dom_1.$$('ul');
        var checkSpelling = Dom_1.$$('li');
        checkSpelling.text(Strings_1.l('CheckSpelling'));
        var fewerKeywords = Dom_1.$$('li');
        fewerKeywords.text(Strings_1.l('TryUsingFewerKeywords'));
        searchTips.el.appendChild(checkSpelling.el);
        searchTips.el.appendChild(fewerKeywords.el);
        Iif (this.queryStateModel.atLeastOneFacetIsActive()) {
            var fewerFilter = Dom_1.$$('li');
            fewerFilter.text(Strings_1.l('SelectFewerFilters'));
            searchTips.el.appendChild(fewerFilter.el);
        }
        return searchTips;
    };
    QuerySummary.ID = 'QuerySummary';
    QuerySummary.doExport = function () {
        GlobalExports_1.exportGlobally({
            QuerySummary: QuerySummary
        });
    };
    /**
     * Options for the component
     * @componentOptions
     */
    QuerySummary.options = {
        /**
         * Specifies whether to hide the number of returned results.
         *
         * When this option is set to true, the number of returned results will be hidden from the page, meaning that your end users will not know how many results were returned for their query.
         *
         * Default value is `false`.
         */
        onlyDisplaySearchTips: ComponentOptions_1.ComponentOptions.buildBooleanOption({ defaultValue: false }),
        /**
         * Specifies whether to display the {@link QuerySummary.options.noResultsFoundMessage} message when there are no search results.
         *
         * Default value is `true`.
         *
         * @availablesince [August 2018 Release (v2.4609.6)](https://docs.coveo.com/410/#august-2018-release-v246096)
         */
        enableNoResultsFoundMessage: ComponentOptions_1.ComponentOptions.buildBooleanOption({ defaultValue: true }),
        /**
         * Specifies a custom message to display when there are no search results.
         *
         * You can refer to the query the end user has entered using the `${query}` query tag.
         *
         * **Example**
         * > For the `noResultFoundMessage` option, you enter `There were no results found for "${query}"`.
         * > Your end user searches for `query without results`, which does not return any result.
         * > On your page, they see this message: `There were no results found for "query without results"`.
         *
         * Default value is `No results for ${query}`.
         *
         * **Note**
         * > If there is no query, the value will fallback to `No results`.
         *
         * @availablesince [August 2018 Release (v2.4609.6)](https://docs.coveo.com/410/#august-2018-release-v246096)
         */
        noResultsFoundMessage: ComponentOptions_1.ComponentOptions.buildLocalizedStringOption({
            localizedString: function () { return Strings_1.l('noResultFor', '${query}'); },
            depend: 'enableNoResultsFoundMessage',
            postProcessing: function (value) {
                return underscore_1.escape(value);
            }
        }),
        /**
         * Specifies whether to display the `Cancel last action` link when there are no search results.
         *
         * When clicked, the link restores the previous query that contained results.
         *
         * Default value is `true`.
         */
        enableCancelLastAction: ComponentOptions_1.ComponentOptions.buildBooleanOption({ defaultValue: true }),
        /**
         * Specifies whether to display search tips when there are no search results.
         *
         * Default value is `true`.
         */
        enableSearchTips: ComponentOptions_1.ComponentOptions.buildBooleanOption({ defaultValue: true })
    };
    return QuerySummary;
}(Component_1.Component));
exports.QuerySummary = QuerySummary;
Initialization_1.Initialization.registerAutoCreateComponent(QuerySummary);
 
 
/***/ }),
/* 812 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var underscore_1 = __webpack_require__(1);
var Core_1 = __webpack_require__(9);
var Dom_1 = __webpack_require__(0);
var QuickviewDocumentIframe = /** @class */ (function () {
    function QuickviewDocumentIframe() {
        this.el = this.buildIFrame().el;
    }
    Object.defineProperty(QuickviewDocumentIframe.prototype, "iframeHTMLElement", {
        get: function () {
            return this.iframeElement;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(QuickviewDocumentIframe.prototype, "document", {
        get: function () {
            return this.iframeElement.contentWindow.document;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(QuickviewDocumentIframe.prototype, "body", {
        get: function () {
            return this.document.body;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(QuickviewDocumentIframe.prototype, "window", {
        get: function () {
            return this.iframeElement.contentWindow;
        },
        enumerable: true,
        configurable: true
    });
    QuickviewDocumentIframe.prototype.isNewQuickviewDocument = function () {
        var meta = Dom_1.$$(this.document.head).find("meta[name='generator']");
        return meta && meta.getAttribute('content') == 'pdf2htmlEX';
    };
    QuickviewDocumentIframe.prototype.render = function (htmlDocument, title) {
        var _this = this;
        if (this.quickviewIsClosedByEndUser()) {
            return Promise.reject(null);
        }
        return new Promise(function (resolve, reject) {
            // Take care to bind the onload function before actually writing to the iframe :
            // Safari, IE, Edge need this, otherwise the onload function is never called
            _this.iframeElement.onload = function () {
                resolve(_this.iframeElement);
            };
            _this.addClientSideTweaksToIFrameStyling(htmlDocument);
            _this.writeToIFrame(htmlDocument);
            _this.iframeElement.title = title;
        });
    };
    QuickviewDocumentIframe.prototype.renderError = function (error) {
        var _this = this;
        if (this.quickviewIsClosedByEndUser()) {
            return Promise.reject(null);
        }
        return new Promise(function (resolve, reject) {
            var errorMessage = '';
            switch (error.status) {
                case 400:
                    errorMessage = Core_1.l('NoQuickview');
                    break;
                default:
                    errorMessage = Core_1.l('OoopsError');
                    break;
            }
            var errorDocument = document.implementation.createHTMLDocument();
            errorDocument.body.style.fontFamily = "Arimo, 'Helvetica Neue', Helvetica, Arial, sans-serif";
            Dom_1.$$(errorDocument.body).text(errorMessage);
            _this.writeToIFrame(errorDocument);
            resolve(_this.iframeElement);
        });
    };
    QuickviewDocumentIframe.prototype.quickviewIsClosedByEndUser = function () {
        return this.iframeElement.contentDocument == null;
    };
    QuickviewDocumentIframe.prototype.buildIFrame = function () {
        var iframe = Dom_1.$$('iframe', {
            sandbox: 'allow-popups allow-same-origin allow-top-navigation',
            src: 'about:blank'
        });
        this.iframeElement = iframe.el;
        var iframewrapper = Dom_1.$$('div', {
            className: 'coveo-iframeWrapper'
        });
        iframewrapper.append(iframe.el);
        return iframewrapper;
    };
    QuickviewDocumentIframe.prototype.writeToIFrame = function (htmlDocument) {
        this.allowDocumentLinkToEscapeSandbox(htmlDocument);
        this.document.open();
        this.document.write(htmlDocument.getElementsByTagName('html')[0].outerHTML);
        this.document.close();
    };
    QuickviewDocumentIframe.prototype.allowDocumentLinkToEscapeSandbox = function (htmlDocument) {
        // On the iframe, we set the sandbox attribute to "allow top navigation".
        // For this to work, we need to force all link to target _top.
        // This is especially useful for quickview on web pages.
        underscore_1.each(Dom_1.$$(htmlDocument.body).findAll('a'), function (link) {
            link.setAttribute('target', '_top');
        });
    };
    QuickviewDocumentIframe.prototype.addClientSideTweaksToIFrameStyling = function (htmlDocument) {
        var style = Dom_1.$$('style', { type: 'text/css' }).el;
        // Safari on iOS forces resize iframes to fit their content, even if an explicit size
        // is set on the iframe. Isn't that great? By chance there is a trick around it: by
        // setting a very small size on the body and instead using min-* to set the size to
        // 100% we're able to trick Safari from thinking it must expand the iframe. Amazed.
        // The 'scrolling' part is required otherwise the hack doesn't work.
        //
        // https://stackoverflow.com/questions/23083462/how-to-get-an-iframe-to-be-responsive-in-ios-safari
        var cssHackForIOS = "\n      body, html {\n        height: 1px !important;\n        min-height: 100%;\n        width: 1px !important;\n        min-width: 100%;\n        overflow: scroll;\n        margin: auto\n      }\n      ";
        var cssText = "\n      html pre {\n        white-space: pre-wrap;\n        word-wrap: break-word;\n      }\n      body, html {\n        font-family: Arimo, 'Helvetica Neue', Helvetica, Arial, sans-serif; -webkit-text-size-adjust: none;\n      }\n      " + (Core_1.DeviceUtils.isIos() ? cssHackForIOS : '') + "\n      ";
        Iif (Core_1.DeviceUtils.isIos()) {
            Dom_1.$$(this.iframeElement).setAttribute('scrolling', 'no');
            this.iframeElement.parentElement.style.margin = '0 0 5px 5px';
        }
        style.appendChild(document.createTextNode(cssText));
        htmlDocument.head.appendChild(style);
    };
    return QuickviewDocumentIframe;
}());
exports.QuickviewDocumentIframe = QuickviewDocumentIframe;
 
 
/***/ }),
/* 813 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Dom_1 = __webpack_require__(0);
var QuickviewDocumentHeader = /** @class */ (function () {
    function QuickviewDocumentHeader() {
        this.el = this.buildHeader().el;
    }
    QuickviewDocumentHeader.prototype.addWord = function (wordButton) {
        this.el.appendChild(wordButton.el);
    };
    QuickviewDocumentHeader.prototype.buildHeader = function () {
        var header = Dom_1.$$('div', {
            className: 'coveo-quickview-header'
        });
        return header;
    };
    return QuickviewDocumentHeader;
}());
exports.QuickviewDocumentHeader = QuickviewDocumentHeader;
 
 
/***/ }),
/* 814 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Dom_1 = __webpack_require__(0);
var underscore_1 = __webpack_require__(1);
var QuickviewDocumentWord_1 = __webpack_require__(815);
var QuickviewDocument_1 = __webpack_require__(268);
var QuickviewDocumentWords = /** @class */ (function () {
    function QuickviewDocumentWords(iframe, result) {
        this.iframe = iframe;
        this.result = result;
        this.words = {};
        this.scanDocument();
    }
    QuickviewDocumentWords.prototype.scanDocument = function () {
        var _this = this;
        underscore_1.each(Dom_1.$$(this.iframe.body).findAll("[id^=\"" + QuickviewDocument_1.HIGHLIGHT_PREFIX + "\"]"), function (element, index) {
            var quickviewWord = new QuickviewDocumentWord_1.QuickviewDocumentWord(_this.result);
            quickviewWord.doCompleteInitialScanForKeywordInDocument(element);
            if (!quickviewWord.text) {
                return;
            }
            var alreadyScannedKeyword = _this.words[quickviewWord.indexIdentifier];
            if (!alreadyScannedKeyword) {
                _this.words[quickviewWord.indexIdentifier] = quickviewWord;
            }
            else {
                alreadyScannedKeyword.addElement(element);
                // Special code needed to workaround invalid HTML returned by the index with embedded keyword
                Iif (alreadyScannedKeyword.occurrence == quickviewWord.occurrence) {
                    alreadyScannedKeyword.text += quickviewWord.text;
                }
            }
        });
    };
    return QuickviewDocumentWords;
}());
exports.QuickviewDocumentWords = QuickviewDocumentWords;
 
 
/***/ }),
/* 815 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var underscore_1 = __webpack_require__(1);
var Core_1 = __webpack_require__(9);
var Logger_1 = __webpack_require__(18);
var Dom_1 = __webpack_require__(0);
var QuickviewDocument_1 = __webpack_require__(268);
var QuickviewDocumentWordColor_1 = __webpack_require__(269);
var QuickviewDocumentWord = /** @class */ (function () {
    function QuickviewDocumentWord(result) {
        this.result = result;
        this.count = 0;
        this.elements = [];
        this.currentNavigationPosition = -1;
        this.logger = new Logger_1.Logger(this);
    }
    QuickviewDocumentWord.prototype.addElement = function (element) {
        this.count++;
        this.elements.push(element);
    };
    QuickviewDocumentWord.prototype.navigateForward = function () {
        this.currentNavigationPosition++;
        if (this.currentNavigationPosition >= this.elements.length) {
            this.currentNavigationPosition = 0;
        }
        this.highlightNavigation();
        this.putElementIntoView();
        return this.elements[this.currentNavigationPosition];
    };
    QuickviewDocumentWord.prototype.navigateBackward = function () {
        this.currentNavigationPosition--;
        if (this.currentNavigationPosition < 0) {
            this.currentNavigationPosition = this.elements.length - 1;
        }
        this.highlightNavigation();
        this.putElementIntoView();
        return this.elements[this.currentNavigationPosition];
    };
    QuickviewDocumentWord.prototype.navigateTo = function (position) {
        this.currentNavigationPosition = position;
        if (this.currentNavigationPosition < 0 || this.currentNavigationPosition >= this.elements.length) {
            this.currentNavigationPosition = 0;
            this.logger.warn("Invalid position in quickview navigation: " + position);
        }
        this.highlightNavigation();
        return this.elements[this.currentNavigationPosition];
    };
    QuickviewDocumentWord.prototype.doCompleteInitialScanForKeywordInDocument = function (element) {
        var parsed = this.parseKeywordIdentifier(element);
        Eif (parsed) {
            this.indexIdentifier = parsed.keywordIdentifier;
            this.occurrence = parsed.keywordOccurrencesInDocument;
            this.indexTermPart = parsed.keywordTermPart;
            this.text = this.getText(element);
            this.color = new QuickviewDocumentWordColor_1.QuickviewDocumentWordColor(element.style.backgroundColor);
            this.addElement(element);
        }
    };
    QuickviewDocumentWord.prototype.isTaggedWord = function (element) {
        return element.nodeName.toLowerCase() == 'coveotaggedword';
    };
    QuickviewDocumentWord.prototype.highlightNavigation = function () {
        var _this = this;
        var currentElement = this.elements[this.currentNavigationPosition];
        var otherElements = underscore_1.without(this.elements, currentElement);
        currentElement.style.color = this.color.htmlColor;
        currentElement.style.backgroundColor = this.color.invert();
        otherElements.forEach(function (element) {
            element.style.color = '';
            element.style.backgroundColor = _this.color.htmlColor;
        });
    };
    QuickviewDocumentWord.prototype.putElementIntoView = function () {
        var element = this.elements[this.currentNavigationPosition];
        element.scrollIntoView();
    };
    QuickviewDocumentWord.prototype.getText = function (element) {
        var innerTextOfHTMLElement = this.getHighlightedInnerText(element);
        return this.resolveOriginalTerm(innerTextOfHTMLElement);
    };
    QuickviewDocumentWord.prototype.resolveOriginalTerm = function (highlight) {
        var _this = this;
        if (!this.result || !this.result.termsToHighlight) {
            return highlight;
        }
        var found = underscore_1.find(underscore_1.keys(this.result.termsToHighlight), function (originalTerm) {
            // The expansions do NOT include the original term (makes sense), so be sure to check
            // the original term for a match too.
            var originalTermMatch = Core_1.StringUtils.equalsCaseInsensitive(originalTerm, highlight);
            var expansionMatch = underscore_1.find(_this.result.termsToHighlight[originalTerm], function (expansion) { return Core_1.StringUtils.equalsCaseInsensitive(expansion, highlight); }) !=
                undefined;
            return originalTermMatch || expansionMatch;
        });
        return found || highlight;
    };
    QuickviewDocumentWord.prototype.getHighlightedInnerText = function (element) {
        if (!this.isTaggedWord(element)) {
            return Dom_1.$$(element).text() || '';
        }
        var children = Dom_1.$$(element).children();
        Iif (children.length >= 1) {
            return Dom_1.$$(underscore_1.first(children)).text() || '';
        }
        return '';
    };
    QuickviewDocumentWord.prototype.parseKeywordIdentifier = function (element) {
        var parts = element.id.substr(QuickviewDocument_1.HIGHLIGHT_PREFIX.length + 1).match(/^([0-9]+)\.([0-9]+)\.([0-9]+)$/);
        Iif (!parts || parts.length <= 3) {
            return null;
        }
        return {
            keywordIdentifier: parts[1],
            keywordOccurrencesInDocument: parseInt(parts[2], 10),
            keywordTermPart: parseInt(parts[3], 10)
        };
    };
    return QuickviewDocumentWord;
}());
exports.QuickviewDocumentWord = QuickviewDocumentWord;
 
 
/***/ }),
/* 816 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Dom_1 = __webpack_require__(0);
var QuickviewDocumentWordButton = /** @class */ (function () {
    function QuickviewDocumentWordButton(word, previewBar, iframe) {
        this.word = word;
        this.previewBar = previewBar;
        this.iframe = iframe;
        this.el = this.render();
    }
    QuickviewDocumentWordButton.prototype.render = function () {
        var wordHtml = Dom_1.$$('span', {
            className: 'coveo-term-for-quickview'
        });
        wordHtml.append(this.buildName().el);
        wordHtml.append(this.renderArrow('up').el);
        wordHtml.append(this.renderArrow('down').el);
        wordHtml.el.style.backgroundColor = this.word.color.htmlColor;
        wordHtml.el.style.borderColor = this.word.color.saturate();
        return wordHtml.el;
    };
    QuickviewDocumentWordButton.prototype.buildName = function () {
        var _this = this;
        var name = Dom_1.$$('span', {
            className: 'coveo-term-for-quickview-name'
        }, this.word.text + " (" + this.word.count + ")");
        name.on('click', function () { return _this.navigate(false); });
        return name;
    };
    QuickviewDocumentWordButton.prototype.navigate = function (backward) {
        var element;
        if (backward) {
            element = this.word.navigateBackward();
            this.previewBar.navigateBackward(this.word);
        }
        else {
            element = this.word.navigateForward();
            this.previewBar.navigateForward(this.word);
        }
        // pdf2html docs hide the non-visible frames by default, to speed up browsers.
        // But this prevents keyword navigation from working so we must force show it. This
        // is done by adding the 'opened' class to it (defined by pdf2html).
        Iif (this.iframe.isNewQuickviewDocument()) {
            var pdf = Dom_1.$$(element).closest('.pc');
            Dom_1.$$(pdf).addClass('opened');
        }
        element.scrollIntoView();
    };
    QuickviewDocumentWordButton.prototype.renderArrow = function (direction) {
        var _this = this;
        var arrow = Dom_1.$$('span', {
            className: "coveo-term-for-quickview-" + direction + "-arrow"
        });
        var arrowIcon = Dom_1.$$('span', {
            className: "coveo-term-for-quickview-" + direction + "-arrow-icon"
        });
        arrow.append(arrowIcon.el);
        arrow.on('click', function () { return _this.navigate(direction == 'up'); });
        return arrow;
    };
    return QuickviewDocumentWordButton;
}());
exports.QuickviewDocumentWordButton = QuickviewDocumentWordButton;
 
 
/***/ }),
/* 817 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Dom_1 = __webpack_require__(0);
var underscore_1 = __webpack_require__(1);
var Logger_1 = __webpack_require__(18);
var QuickviewDocumentPreviewBar = /** @class */ (function () {
    function QuickviewDocumentPreviewBar(iframe, words) {
        this.iframe = iframe;
        this.words = words;
        this.wordIndicators = new Map();
        this.logger = new Logger_1.Logger(this);
        this.renderPreviewBar();
    }
    QuickviewDocumentPreviewBar.prototype.navigateForward = function (word) {
        var currentWord = this.wordIndicators.get(word);
        if (!currentWord) {
            this.logger.warn("Invalid navigation for given word.", word);
            return null;
        }
        currentWord.position++;
        if (currentWord.position >= currentWord.indicators.length) {
            currentWord.position = 0;
        }
        this.highlightNavigation(word);
        return currentWord.indicators[currentWord.position];
    };
    QuickviewDocumentPreviewBar.prototype.navigateBackward = function (word) {
        var currentWord = this.wordIndicators.get(word);
        if (!currentWord) {
            this.logger.warn("Invalid navigation for the given word.", word);
            return null;
        }
        currentWord.position--;
        if (currentWord.position < 0) {
            currentWord.position = currentWord.indicators.length - 1;
        }
        this.highlightNavigation(word);
        return currentWord.indicators[currentWord.position];
    };
    QuickviewDocumentPreviewBar.prototype.navigateTo = function (position, word) {
        var currentWord = this.wordIndicators.get(word);
        if (!currentWord) {
            this.logger.warn("Invalid navigation for the given word", word);
            return null;
        }
        currentWord.position = position;
        if (currentWord.position < 0 || currentWord.position >= currentWord.indicators.length) {
            this.logger.warn("Invalid navigation for the given position: " + position);
            currentWord.position = 0;
        }
        this.highlightNavigation(word);
        return currentWord.indicators[currentWord.position];
    };
    QuickviewDocumentPreviewBar.prototype.highlightNavigation = function (word) {
        var _this = this;
        var currentWord = this.wordIndicators.get(word);
        var currentElement = currentWord.indicators[currentWord.position];
        var otherElements = underscore_1.without(currentWord.indicators, currentElement);
        currentElement.style.backgroundColor = word.color.invert();
        currentElement.style.border = "1px solid " + word.color.invert();
        otherElements.forEach(function (element) { return _this.defaultStyleColor(element, word); });
    };
    QuickviewDocumentPreviewBar.prototype.renderPreviewBar = function () {
        var _this = this;
        var previewBar = Dom_1.$$('div');
        previewBar.el.style.width = '15px';
        previewBar.el.style.position = 'fixed';
        previewBar.el.style.top = '0';
        previewBar.el.style.right = '0px';
        previewBar.el.style.height = '100%';
        this.iframe.body.appendChild(previewBar.el);
        underscore_1.each(this.words.words, function (word) {
            underscore_1.each(word.elements, function (element) {
                var indicator = _this.renderWordPositionIndicator(element, word).el;
                if (_this.wordIndicators.has(word)) {
                    _this.wordIndicators.get(word).indicators.push(indicator);
                }
                else {
                    _this.wordIndicators.set(word, {
                        indicators: [indicator],
                        position: -1
                    });
                }
                previewBar.append(indicator);
            });
            _this.handleOverlappingIndicators(word);
        });
    };
    QuickviewDocumentPreviewBar.prototype.renderWordPositionIndicator = function (element, word) {
        var docHeight = new Dom_1.Doc(this.iframe.document).height();
        var elementPosition = element.getBoundingClientRect().top;
        var previewUnit = Dom_1.$$('div');
        previewUnit.el.style.position = 'absolute';
        previewUnit.el.style.top = elementPosition / docHeight * 100 + "%";
        previewUnit.el.style.width = '100%';
        previewUnit.el.style.height = '1px';
        this.defaultStyleColor(previewUnit.el, word);
        return previewUnit;
    };
    QuickviewDocumentPreviewBar.prototype.defaultStyleColor = function (element, word) {
        element.style.border = "1px solid " + word.color.saturate();
        element.style.backgroundColor = word.color.htmlColor;
    };
    QuickviewDocumentPreviewBar.prototype.handleOverlappingIndicators = function (word) {
        var allIndicators = this.wordIndicators.get(word).indicators;
        var _loop_1 = function (i) {
            var otherIndicatorAtSamePositionInDocument = underscore_1.chain(allIndicators)
                .without(allIndicators[i])
                .find(function (otherIndicator) { return otherIndicator.style.top == allIndicators[i].style.top; })
                .value();
            if (otherIndicatorAtSamePositionInDocument) {
                Dom_1.$$(allIndicators[i]).remove();
                allIndicators[i] = otherIndicatorAtSamePositionInDocument;
            }
        };
        for (var i = 0; i < allIndicators.length; i++) {
            _loop_1(i);
        }
    };
    return QuickviewDocumentPreviewBar;
}());
exports.QuickviewDocumentPreviewBar = QuickviewDocumentPreviewBar;
 
 
/***/ }),
/* 818 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var ResponsiveComponentsManager_1 = __webpack_require__(70);
var ResponsiveComponentsUtils_1 = __webpack_require__(93);
var SearchInterface_1 = __webpack_require__(25);
var Utils_1 = __webpack_require__(5);
var Dom_1 = __webpack_require__(0);
var Logger_1 = __webpack_require__(18);
var Recommendation_1 = __webpack_require__(199);
var RecommendationDropdownContent_1 = __webpack_require__(819);
var ResponsiveDropdownHeader_1 = __webpack_require__(231);
var ResponsiveDropdown_1 = __webpack_require__(180);
var Strings_1 = __webpack_require__(4);
var Component_1 = __webpack_require__(6);
var RegisteredNamedMethods_1 = __webpack_require__(38);
var QueryEvents_1 = __webpack_require__(14);
var _ = __webpack_require__(1);
__webpack_require__(1502);
var MiscModules_1 = __webpack_require__(97);
var ResponsiveRecommendation = /** @class */ (function () {
    function ResponsiveRecommendation(coveoRoot, ID, options, responsiveDropdown) {
        this.coveoRoot = coveoRoot;
        this.ID = ID;
        this.responsiveDropdown = responsiveDropdown;
        this.recommendationRoot = this.getRecommendationRoot();
        this.dropdownHeaderLabel = options.dropdownHeaderLabel;
        this.breakpoint = this.defineResponsiveBreakpoint(options);
        this.searchInterface = Component_1.Component.get(this.coveoRoot.el, SearchInterface_1.SearchInterface, false);
        this.dropdown = this.buildDropdown(responsiveDropdown);
        this.registerOnOpenHandler();
        this.registerQueryEvents();
        this.handleResizeEvent();
    }
    ResponsiveRecommendation.init = function (root, component, options) {
        var logger = new Logger_1.Logger('ResponsiveRecommendation');
        var coveoRoot = this.findParentRootOfRecommendationComponent(root);
        Eif (!coveoRoot) {
            logger.info('Recommendation component has no parent interface. Disabling responsive mode for this component.');
            return;
        }
        if (!Dom_1.$$(coveoRoot).find('.coveo-results-column')) {
            logger.info('Cannot find element with class coveo-results-column. Disabling responsive mode for this component.');
            return;
        }
        ResponsiveComponentsManager_1.ResponsiveComponentsManager.register(ResponsiveRecommendation, Dom_1.$$(coveoRoot), Recommendation_1.Recommendation.ID, component, _.extend({}, options, { initializationEventRoot: Dom_1.$$(root) }));
    };
    ResponsiveRecommendation.findParentRootOfRecommendationComponent = function (root) {
        var coveoRoot = Dom_1.$$(root).parents(Component_1.Component.computeCssClassName(SearchInterface_1.SearchInterface));
        Iif (coveoRoot[0]) {
            return Dom_1.$$(coveoRoot[0]);
        }
        return null;
    };
    ResponsiveRecommendation.prototype.handleResizeEvent = function () {
        if (this.needSmallMode() && !ResponsiveComponentsUtils_1.ResponsiveComponentsUtils.isSmallRecommendationActivated(this.coveoRoot)) {
            this.changeToSmallMode();
        }
        else if (!this.needSmallMode() && ResponsiveComponentsUtils_1.ResponsiveComponentsUtils.isSmallRecommendationActivated(this.coveoRoot)) {
            this.changeToLargeMode();
        }
        if (this.dropdown.isOpened) {
            this.dropdown.dropdownContent.positionDropdown();
        }
    };
    ResponsiveRecommendation.prototype.needDropdownWrapper = function () {
        return this.needSmallMode();
    };
    ResponsiveRecommendation.prototype.needSmallMode = function () {
        var isWidthSmallerThanBreakpoint = this.coveoRoot.width() <= this.breakpoint;
        if (!this.searchInterface) {
            return isWidthSmallerThanBreakpoint;
        }
        switch (this.searchInterface.responsiveComponents.getResponsiveMode()) {
            case 'small':
                return true;
            case 'auto':
                return isWidthSmallerThanBreakpoint;
            default:
                return false;
        }
    };
    ResponsiveRecommendation.prototype.changeToSmallMode = function () {
        var _this = this;
        this.dropdown.close();
        var header = this.coveoRoot.find("." + ResponsiveComponentsManager_1.ResponsiveComponentsManager.DROPDOWN_HEADER_WRAPPER_CSS_CLASS);
        Iif (!header) {
            // It's possible that recommendation gets initialized before the main interface is completed.
            // We defer the resize event execution in that case.
            MiscModules_1.Defer.defer(function () { return _this.handleResizeEvent(); });
        }
        else {
            Dom_1.$$(header).append(this.dropdown.dropdownHeader.element.el);
            this.disableFacetPreservePosition();
            ResponsiveComponentsUtils_1.ResponsiveComponentsUtils.activateSmallRecommendation(this.coveoRoot);
            ResponsiveComponentsUtils_1.ResponsiveComponentsUtils.activateSmallRecommendation(this.recommendationRoot);
        }
    };
    ResponsiveRecommendation.prototype.changeToLargeMode = function () {
        this.enableFacetPreservePosition();
        this.dropdown.cleanUp();
        ResponsiveComponentsUtils_1.ResponsiveComponentsUtils.deactivateSmallRecommendation(this.coveoRoot);
        ResponsiveComponentsUtils_1.ResponsiveComponentsUtils.deactivateSmallRecommendation(this.recommendationRoot);
    };
    ResponsiveRecommendation.prototype.buildDropdown = function (responsiveDropdown) {
        var dropdownContent = this.buildDropdownContent();
        var dropdownHeader = this.buildDropdownHeader();
        var dropdown = responsiveDropdown ? responsiveDropdown : new ResponsiveDropdown_1.ResponsiveDropdown(dropdownContent, dropdownHeader, this.coveoRoot);
        dropdown.disablePopupBackground();
        return dropdown;
    };
    ResponsiveRecommendation.prototype.buildDropdownHeader = function () {
        var dropdownHeaderElement = Dom_1.$$('a');
        var content = Dom_1.$$('p');
        content.text(Strings_1.l(this.dropdownHeaderLabel));
        dropdownHeaderElement.el.appendChild(content.el);
        var dropdownHeader = new ResponsiveDropdownHeader_1.ResponsiveDropdownHeader('recommendation', dropdownHeaderElement);
        return dropdownHeader;
    };
    ResponsiveRecommendation.prototype.buildDropdownContent = function () {
        var dropdownContentElement;
        var recommendationColumn = this.coveoRoot.find('.coveo-recommendation-column');
        Iif (recommendationColumn) {
            dropdownContentElement = Dom_1.$$(recommendationColumn);
        }
        else {
            dropdownContentElement = Dom_1.$$(this.coveoRoot.find('.' + Component_1.Component.computeCssClassName(Recommendation_1.Recommendation)));
        }
        var dropdownContent = new RecommendationDropdownContent_1.RecommendationDropdownContent('recommendation', dropdownContentElement, this.coveoRoot);
        return dropdownContent;
    };
    ResponsiveRecommendation.prototype.defineResponsiveBreakpoint = function (options) {
        var breakpoint;
        Eif (Utils_1.Utils.isNullOrUndefined(options.responsiveBreakpoint)) {
            breakpoint = ResponsiveRecommendation.RESPONSIVE_BREAKPOINT;
        }
        else {
            breakpoint = options.responsiveBreakpoint;
        }
        return breakpoint;
    };
    ResponsiveRecommendation.prototype.getFacetSliders = function () {
        var facetSliders = [];
        this.coveoRoot.findAll(Component_1.Component.computeSelectorForType('FacetSlider')).forEach(function (facetSliderElement) {
            var facetSlider = Component_1.Component.get(facetSliderElement);
            facetSlider && facetSliders.push(facetSlider);
        });
        return facetSliders;
    };
    ResponsiveRecommendation.prototype.getFacets = function () {
        var facets = [];
        this.coveoRoot.findAll(Component_1.Component.computeSelectorForType('Facet')).forEach(function (facetElement) {
            var facet = Component_1.Component.get(facetElement);
            facet && facets.push(facet);
        });
        return facets;
    };
    ResponsiveRecommendation.prototype.enableFacetPreservePosition = function () {
        this.getFacets().forEach(function (facet) { return (facet.options.preservePosition = true); });
    };
    ResponsiveRecommendation.prototype.disableFacetPreservePosition = function () {
        this.getFacets().forEach(function (facet) { return (facet.options.preservePosition = false); });
    };
    ResponsiveRecommendation.prototype.drawFacetSliderGraphs = function () {
        this.getFacetSliders().forEach(function (facetSlider) { return facetSlider.drawDelayedGraphData(); });
    };
    ResponsiveRecommendation.prototype.registerOnOpenHandler = function () {
        this.dropdown.registerOnOpenHandler(this.drawFacetSliderGraphs, this);
    };
    ResponsiveRecommendation.prototype.getRecommendationRoot = function () {
        return Dom_1.$$(this.coveoRoot.find('.' + Component_1.Component.computeCssClassName(Recommendation_1.Recommendation)));
    };
    ResponsiveRecommendation.prototype.registerQueryEvents = function () {
        var _this = this;
        var recommendationInstance = RegisteredNamedMethods_1.get(this.recommendationRoot.el, SearchInterface_1.SearchInterface);
        Eif (recommendationInstance && recommendationInstance.options.hideIfNoResults) {
            this.coveoRoot.on(QueryEvents_1.QueryEvents.querySuccess, function (e, data) { return _this.handleRecommnendationQuerySucess(data); });
            this.coveoRoot.on(QueryEvents_1.QueryEvents.noResults, function (e, data) { return _this.handleRecommendationNoResults(); });
        }
        this.coveoRoot.on(QueryEvents_1.QueryEvents.queryError, function () { return _this.handleRecommendationQueryError(); });
    };
    ResponsiveRecommendation.prototype.handleRecommnendationQuerySucess = function (data) {
        if (data.results.totalCount === 0) {
            this.dropdown.close();
            this.dropdown.dropdownHeader.hide();
        }
        else {
            this.dropdown.dropdownHeader.show();
        }
    };
    ResponsiveRecommendation.prototype.handleRecommendationNoResults = function () {
        this.dropdown.close();
        this.dropdown.dropdownHeader.hide();
    };
    ResponsiveRecommendation.prototype.handleRecommendationQueryError = function () {
        this.dropdown.close();
        this.dropdown.dropdownHeader.hide();
    };
    ResponsiveRecommendation.DROPDOWN_CONTAINER_CSS_CLASS_NAME = 'coveo-recommendation-dropdown-container';
    ResponsiveRecommendation.RESPONSIVE_BREAKPOINT = 1000;
    return ResponsiveRecommendation;
}());
exports.ResponsiveRecommendation = ResponsiveRecommendation;
 
 
/***/ }),
/* 819 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var ResponsiveDropdownContent_1 = __webpack_require__(99);
var Dom_1 = __webpack_require__(0);
var RecommendationDropdownContent = /** @class */ (function () {
    function RecommendationDropdownContent(componentName, element, coveoRoot) {
        this.element = element;
        this.coveoRoot = coveoRoot;
        this.cssClassName = "coveo-" + componentName + "-dropdown-content";
        this.element.addClass(this.cssClassName);
        this.element.addClass(ResponsiveDropdownContent_1.ResponsiveDropdownContent.DEFAULT_CSS_CLASS_NAME);
    }
    RecommendationDropdownContent.prototype.positionDropdown = function () {
        this.element.el.style.display = '';
        var dropdownContentWrapper = this.coveoRoot.find('.coveo-results-column');
        Dom_1.$$(dropdownContentWrapper).prepend(this.element.el);
        this.element.addClass(ResponsiveDropdownContent_1.ResponsiveDropdownContent.DEFAULT_CSS_CLASS_NAME);
        this.element.addClass(this.cssClassName);
        // forces the browser to reflow the element, so that the transition is applied.
        window.getComputedStyle(this.element.el).maxHeight;
        this.element.addClass(RecommendationDropdownContent.OPENED_DROPDOWN_CSS_CLASS_NAME);
    };
    RecommendationDropdownContent.prototype.hideDropdown = function () {
        this.element.addClass(ResponsiveDropdownContent_1.ResponsiveDropdownContent.DEFAULT_CSS_CLASS_NAME);
        this.element.addClass(this.cssClassName);
        this.element.removeClass(RecommendationDropdownContent.OPENED_DROPDOWN_CSS_CLASS_NAME);
    };
    RecommendationDropdownContent.prototype.cleanUp = function () {
        this.element.removeClass(this.cssClassName);
        this.element.removeClass(ResponsiveDropdownContent_1.ResponsiveDropdownContent.DEFAULT_CSS_CLASS_NAME);
    };
    RecommendationDropdownContent.OPENED_DROPDOWN_CSS_CLASS_NAME = 'coveo-open-dropdown-content';
    return RecommendationDropdownContent;
}());
exports.RecommendationDropdownContent = RecommendationDropdownContent;
 
 
/***/ }),
/* 820 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
var Component_1 = __webpack_require__(6);
var ComponentOptions_1 = __webpack_require__(13);
var Utils_1 = __webpack_require__(5);
var QueryEvents_1 = __webpack_require__(14);
var Initialization_1 = __webpack_require__(8);
var Dom_1 = __webpack_require__(0);
var _ = __webpack_require__(1);
var RecommendationQuery = /** @class */ (function (_super) {
    __extends(RecommendationQuery, _super);
    function RecommendationQuery(element, options, bindings) {
        var _this = _super.call(this, element, RecommendationQuery.ID, bindings) || this;
        _this.element = element;
        _this.options = options;
        _this.options = ComponentOptions_1.ComponentOptions.initComponentOptions(element, RecommendationQuery, options);
        if (_this.element.tagName.toLowerCase() === 'script') {
            try {
                _this.content = Utils_1.Utils.decodeHTMLEntities(Dom_1.$$(_this.element).text());
            }
            catch (e) {
                return _this;
            }
            Eif (!_.isUndefined(_this.content) && _this.content != '') {
                _this.bind.onRootElement(QueryEvents_1.QueryEvents.buildingQuery, _this.handleBuildingQuery);
            }
        }
        return _this;
    }
    RecommendationQuery.prototype.handleBuildingQuery = function (data) {
        data.queryBuilder.advancedExpression.add(this.content);
    };
    RecommendationQuery.ID = 'RecommendationQuery';
    /**
     * The options for the RecommendationQuery component
     * @componentOptions
     */
    RecommendationQuery.options = {};
    return RecommendationQuery;
}(Component_1.Component));
exports.RecommendationQuery = RecommendationQuery;
Initialization_1.Initialization.registerAutoCreateComponent(RecommendationQuery);
 
 
/***/ }),
/* 821 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
var Component_1 = __webpack_require__(6);
var ComponentOptions_1 = __webpack_require__(13);
var DefaultResultAttachmentTemplate_1 = __webpack_require__(1504);
var Utils_1 = __webpack_require__(5);
var QueryUtils_1 = __webpack_require__(37);
var Initialization_1 = __webpack_require__(8);
var Assert_1 = __webpack_require__(12);
var Dom_1 = __webpack_require__(0);
var _ = __webpack_require__(1);
var GlobalExports_1 = __webpack_require__(10);
__webpack_require__(1505);
var TemplateComponentOptions_1 = __webpack_require__(89);
/**
 * The `ResultAttachments` component renders attachments in a result set, for example when displaying emails. This
 * component is usable inside a result template when there is an active [`Folding`]{@link Folding} component in the
 * page.
 *
 * This component is a result template component (see [Result Templates](https://docs.coveo.com/en/413/)).
 * @notSupportedIn salesforcefree
 */
var ResultAttachments = /** @class */ (function (_super) {
    __extends(ResultAttachments, _super);
    /**
     * Creates a new `ResultAttachments` component.
     * @param element The HTMLElement on which to instantiate the component.
     * @param options The options for the `ResultAttachments` component.
     * @param bindings The bindings that the component requires to function normally. If not set, these will be
     * automatically resolved (with a slower execution time).
     * @param result The result to associate the component with.
     * @param attachmentLevel The nesting depth.
     */
    function ResultAttachments(element, options, bindings, result, attachmentLevel) {
        if (attachmentLevel === void 0) { attachmentLevel = 0; }
        var _this = _super.call(this, element, ResultAttachments.ID, bindings) || this;
        _this.element = element;
        _this.options = options;
        _this.bindings = bindings;
        _this.attachmentLevel = attachmentLevel;
        _this.options = ComponentOptions_1.ComponentOptions.initComponentOptions(element, ResultAttachments, options);
        _this.attachments = result.attachments;
        if (Utils_1.Utils.isNonEmptyArray(_this.attachments)) {
            _this.renderAttachments();
        }
        return _this;
    }
    ResultAttachments.prototype.renderAttachments = function () {
        var _this = this;
        _.each(this.attachments, function (attachment) {
            QueryUtils_1.QueryUtils.setStateObjectOnQueryResult(_this.queryStateModel.get(), attachment);
            QueryUtils_1.QueryUtils.setSearchInterfaceObjectOnQueryResult(_this.searchInterface, attachment);
            var subTemplatePromise = _this.attachmentLevel > 0
                ? _this.options.subResultTemplate.instantiateToElement(attachment)
                : _this.options.resultTemplate.instantiateToElement(attachment);
            subTemplatePromise.then(function (container) {
                _this.autoCreateComponentsInsideResult(container, _.extend({}, attachment, { attachments: [] }));
                Dom_1.$$(container).addClass('coveo-result-attachments-container');
                _this.element.appendChild(container);
                if (_this.attachmentHasSubAttachment(attachment) && _this.attachmentLevel < _this.options.maximumAttachmentLevel) {
                    var childAttachmentContainer = Dom_1.$$('div').el;
                    container.appendChild(childAttachmentContainer);
                    new ResultAttachments(childAttachmentContainer, _this.options, _this.bindings, attachment, _this.attachmentLevel + 1);
                }
            });
        });
    };
    ResultAttachments.prototype.attachmentHasSubAttachment = function (attachment) {
        if (Utils_1.Utils.isNonEmptyArray(attachment.attachments)) {
            return true;
        }
        else Iif (Utils_1.Utils.isNonEmptyArray(attachment.childResults)) {
            attachment.attachments = attachment.childResults;
            return true;
        }
        else {
            return false;
        }
    };
    ResultAttachments.prototype.autoCreateComponentsInsideResult = function (element, result) {
        Assert_1.Assert.exists(element);
        var initOptions = this.searchInterface.options;
        var initParameters = {
            options: initOptions,
            bindings: this.getBindings(),
            result: result
        };
        Initialization_1.Initialization.automaticallyCreateComponentsInside(element, initParameters, [ResultAttachments.ID]);
    };
    ResultAttachments.ID = 'ResultAttachments';
    ResultAttachments.doExport = function () {
        GlobalExports_1.exportGlobally({
            ResultAttachments: ResultAttachments,
            DefaultResultAttachmentTemplate: DefaultResultAttachmentTemplate_1.DefaultResultAttachmentTemplate
        });
    };
    /**
     * The options for the component
     * @componentOptions
     */
    ResultAttachments.options = {
        /**
         * Specifies the template to use to render each attachment for a top result.
         *
         * You can specify a previously registered template to use either by referring to its HTML `id` attribute or to a
         * CSS selector (see {@link TemplateCache}).
         *
         * **Examples:**
         *
         * Specifying a previously registered template by referring to its HTML `id` attribute:
         *
         * ```html
         * <div class="CoveoResultAttachments" data-result-template-id="Foo"></div>
         * ```
         *
         * Specifying a previously registered template by referring to a CSS selector:
         *
         * ```html
         * <div class='CoveoResultAttachments' data-result-template-selector=".Foo"></div>
         * ```
         *
         * If you do not specify a custom folding template, the component uses the default result attachment template.
         */
        resultTemplate: TemplateComponentOptions_1.TemplateComponentOptions.buildTemplateOption({
            defaultFunction: function (e) { return new DefaultResultAttachmentTemplate_1.DefaultResultAttachmentTemplate(); }
        }),
        /**
         * Specifies the template to use to render sub-attachments, which are attachments within attachments, for example
         * when multiple files are embedded within a `.zip` attachment.
         *
         * Sub-attachments can themselves contain sub-attachments, and so on up to a certain level (see the
         * [`maximumAttachmentLevel`]{@link ResultAttachments.options.maximumAttachmentLevel} option).
         *
         * You can specify a previously registered template to use either by referring to its HTML `id` attribute or to a
         * CSS selector (see {@link TemplateCache}).
         *
         * **Example:**
         *
         * Specifying a previously registered template by referring to its HTML `id` attribute:
         *
         * ```html
         * <div class="CoveoResultAttachments" data-sub-result-template-id="Foo"></div>
         * ```
         *
         * Specifying a previously registered template by referring to a CSS selector:
         *
         * ```html
         * <div class="CoveoResultAttachments" data-sub-result-template-selector=".Foo"></div>
         * ```
         *
         * By default, this option uses the same template you specify for the
         * [`resultTemplate`]{@link ResultAttachments.options.resultTemplate} option.
         */
        subResultTemplate: TemplateComponentOptions_1.TemplateComponentOptions.buildTemplateOption({
            postProcessing: function (value, options) { return (value != null ? value : options.resultTemplate); }
        }),
        /**
         * Specifies the maximum nesting depth. Beyond this depth, the component stops rendering sub-attachments.
         *
         * Default value is `5`. Minimum value is `0`.
         */
        maximumAttachmentLevel: ComponentOptions_1.ComponentOptions.buildNumberOption({ defaultValue: 5, min: 0 })
    };
    return ResultAttachments;
}(Component_1.Component));
exports.ResultAttachments = ResultAttachments;
Initialization_1.Initialization.registerAutoCreateComponent(ResultAttachments);
 
 
/***/ }),
/* 822 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
var Component_1 = __webpack_require__(6);
var ComponentOptions_1 = __webpack_require__(13);
var Dom_1 = __webpack_require__(0);
var Assert_1 = __webpack_require__(12);
var Initialization_1 = __webpack_require__(8);
var underscore_1 = __webpack_require__(1);
var GlobalExports_1 = __webpack_require__(10);
__webpack_require__(1506);
/**
 * The _ResultActionsMenu_ component adds a floating result action menu, meant to be used inside result templates (see [Result Templates](https://docs.coveo.com/en/413/javascript-search-framework/result-templates)).
 * It is designed to contain other components that can execute actions related to the result,
 * typically the [Quickview]{@link Quickview} and AttachToCase components, available in the Coveo for Salesforce and Coveo for Dynamics integrations.
 *
 * ```html
 * <script type="text/html" class="result-template" [...]
 *   <div class="coveo-result-frame">
 *     <div class="CoveoResultActionsMenu">
 *       <div class="CoveoQuickview"></div>
 *     </div>
 *   [...]
 * </script>
 * ```
 *
 * @availablesince [July 2018 Release (v2.4382.10)](https://docs.coveo.com/410/#july-2018-release-v2438210)
 */
var ResultActionsMenu = /** @class */ (function (_super) {
    __extends(ResultActionsMenu, _super);
    /**
     * Creates a new `ResultActionsMenu` component.
     * @param element The HTMLElement on which to instantiate the component.
     * @param options The options for the `ResultActionsMenu` component.
     * @param bindings The bindings that the component requires to function normally. If not set, these will be
     * automatically resolved (with a slower execution time).
     * @param result The result to associate the component with.
     */
    function ResultActionsMenu(element, options, bindings, result) {
        var _this = _super.call(this, element, ResultActionsMenu.ID, bindings) || this;
        _this.element = element;
        _this.options = options;
        _this.bindings = bindings;
        _this.result = result;
        _this.options = ComponentOptions_1.ComponentOptions.initComponentOptions(element, ResultActionsMenu, options);
        _this.initializeParentResult();
        _this.bindEvents();
        _this.buildMenuItems();
        return _this;
    }
    /**
     * Shows the floating menu.
     */
    ResultActionsMenu.prototype.show = function () {
        Dom_1.$$(this.element).addClass(ResultActionsMenu.SHOW_CLASS);
    };
    /**
     * Hides the floating menu.
     */
    ResultActionsMenu.prototype.hide = function () {
        Dom_1.$$(this.element).removeClass(ResultActionsMenu.SHOW_CLASS);
    };
    ResultActionsMenu.prototype.initializeParentResult = function () {
        // Find the result containing this ResultActionsMenu
        this.parentResult = Dom_1.$$(this.element).closest('CoveoResult') || Dom_1.$$(this.element).closest('coveo-result-folding-child-result');
        Assert_1.Assert.check(this.parentResult !== undefined, 'ResultActionsMenu needs to be a child of a Result');
        Dom_1.$$(this.parentResult).addClass('coveo-clickable');
    };
    ResultActionsMenu.prototype.bindEvents = function () {
        var _this = this;
        Dom_1.$$(this.parentResult).on('click', function () { return _this.show(); });
        Dom_1.$$(this.parentResult).on('mouseleave', function () { return _this.hide(); });
        if (this.options.openOnMouseOver) {
            Dom_1.$$(this.parentResult).on('mouseenter', function () { return _this.show(); });
        }
    };
    ResultActionsMenu.prototype.buildMenuItems = function () {
        var _this = this;
        this.menuItems = [];
        underscore_1.forEach(Dom_1.$$(this.element).children(), function (elem) {
            _this.menuItems.push(elem);
            Dom_1.$$(elem).addClass('coveo-result-actions-menu-menu-item');
        });
    };
    ResultActionsMenu.ID = 'ResultActionsMenu';
    ResultActionsMenu.doExport = function () {
        GlobalExports_1.exportGlobally({
            ResultActionsMenu: ResultActionsMenu
        });
    };
    ResultActionsMenu.SHOW_CLASS = 'coveo-menu-opened';
    /**
     * @componentOptions
     */
    ResultActionsMenu.options = {
        /**
         * Specifies whether the menu should open when the user hovers over the result.
         *
         * When set to false, the menu opens only when clicking on the result.
         *
         * Default value is `true`.
         */
        openOnMouseOver: ComponentOptions_1.ComponentOptions.buildBooleanOption({ defaultValue: true })
    };
    return ResultActionsMenu;
}(Component_1.Component));
exports.ResultActionsMenu = ResultActionsMenu;
Initialization_1.Initialization.registerAutoCreateComponent(ResultActionsMenu);
 
 
/***/ }),
/* 823 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        Iif (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            Iif (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
            Iif (y = 0, t) op = [0, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    Iif (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    Iif (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
Object.defineProperty(exports, "__esModule", { value: true });
var Component_1 = __webpack_require__(6);
var ComponentOptions_1 = __webpack_require__(13);
var DefaultFoldingTemplate_1 = __webpack_require__(1507);
var Utils_1 = __webpack_require__(5);
var QueryUtils_1 = __webpack_require__(37);
var Initialization_1 = __webpack_require__(8);
var Assert_1 = __webpack_require__(12);
var Dom_1 = __webpack_require__(0);
var Strings_1 = __webpack_require__(4);
var underscore_1 = __webpack_require__(1);
var GlobalExports_1 = __webpack_require__(10);
var AnalyticsActionListMeta_1 = __webpack_require__(7);
var Logger_1 = __webpack_require__(18);
__webpack_require__(1508);
var SVGIcons_1 = __webpack_require__(16);
var SVGDom_1 = __webpack_require__(23);
var TemplateComponentOptions_1 = __webpack_require__(89);
var AccessibleButton_1 = __webpack_require__(20);
/**
 * The `ResultFolding` component renders folded result sets. It is usable inside a result template when there is an
 * active [`Folding`]{@link Folding} component in the page. This component takes care of rendering the parent result and
 * its child results in a coherent manner.
 *
 * This component is a result template component (see [Result Templates](https://docs.coveo.com/en/413/)).
 *
 * See [Folding Results](https://docs.coveo.com/en/428/).
 */
var ResultFolding = /** @class */ (function (_super) {
    __extends(ResultFolding, _super);
    /**
     * Creates a new ResultFolding component.
     * @param options The options for the ResultFolding component.
     * @param bindings The bindings that the component requires to function normally. If not set, these will be
     * automatically resolved (with a slower execution time).
     * @param result The result to associate the component with.
     */
    function ResultFolding(element, options, bindings, result) {
        var _this = _super.call(this, element, ResultFolding.ID, bindings) || this;
        _this.element = element;
        _this.options = options;
        _this.result = result;
        _this.showingMoreResults = false;
        _this.options = ComponentOptions_1.ComponentOptions.initComponentOptions(_this.element, ResultFolding, options);
        Assert_1.Assert.exists(result);
        _this.buildElements();
        _this.renderElements();
        return _this;
    }
    /**
     * Show more results by fetching additional results from the index, which match the current folded conversation.
     * This is the equivalent of clicking "Show all conversation".
     * @returns {Promise<IQueryResult[]>}
     */
    ResultFolding.prototype.showMoreResults = function () {
        return __awaiter(this, void 0, void 0, function () {
            var results, e_1, logger;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        Assert_1.Assert.exists(this.result.moreResults);
                        this.cancelAnyPendingShowMore();
                        this.moreResultsPromise = this.result.moreResults();
                        this.waitAnimation = Dom_1.$$('div', { className: 'coveo-loading-spinner' }).el;
                        this.results.appendChild(this.waitAnimation);
                        this.updateElementVisibility();
                        return [4 /*yield*/, this.moreResultsPromise];
                    case 1:
                        results = _a.sent();
                        this.childResults = results;
                        this.showingMoreResults = true;
                        this.usageAnalytics.logClickEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.foldingShowMore, this.getAnalyticsMetadata(), this.result, this.element);
                        _a.label = 2;
                    case 2:
                        _a.trys.push([2, 4, , 5]);
                        return [4 /*yield*/, this.displayThoseResults(results)];
                    case 3:
                        _a.sent();
                        this.updateElementVisibility(results.length);
                        return [3 /*break*/, 5];
                    case 4:
                        e_1 = _a.sent();
                        logger = new Logger_1.Logger(this);
                        logger.warn('An error occured when trying to display more results');
                        return [3 /*break*/, 5];
                    case 5:
                        this.moreResultsPromise = undefined;
                        Dom_1.$$(this.waitAnimation).detach();
                        this.waitAnimation = undefined;
                        return [2 /*return*/, results];
                }
            });
        });
    };
    /**
     * Show less results for a given conversation. This is the equivalent of clicking "Show less"
     */
    ResultFolding.prototype.showLessResults = function () {
        return __awaiter(this, void 0, void 0, function () {
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        this.cancelAnyPendingShowMore();
                        this.showingMoreResults = false;
                        this.usageAnalytics.logCustomEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.foldingShowLess, this.getAnalyticsMetadata(), this.element);
                        return [4 /*yield*/, this.displayThoseResults(this.result.childResults)];
                    case 1:
                        _a.sent();
                        this.updateElementVisibility();
                        this.scrollToResultElement();
                        return [2 /*return*/];
                }
            });
        });
    };
    ResultFolding.prototype.buildElements = function () {
        this.buildHeader();
        this.buildResults();
        this.buildFooter();
    };
    ResultFolding.prototype.renderElements = function () {
        return __awaiter(this, void 0, void 0, function () {
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0: return [4 /*yield*/, this.displayThoseResults(this.result.childResults)];
                    case 1:
                        _a.sent();
                        this.updateElementVisibility();
                        if (Dom_1.$$(this.element.parentElement).hasClass('CoveoCardOverlay')) {
                            this.bindOverlayEvents();
                        }
                        if (this.result.childResults.length == 0 && !this.result.moreResults) {
                            Dom_1.$$(this.element).hide();
                        }
                        return [2 /*return*/];
                }
            });
        });
    };
    ResultFolding.prototype.buildHeader = function () {
        var header = Dom_1.$$('div', { className: 'coveo-folding-header' }).el;
        this.element.appendChild(header);
        if (this.options.normalCaption != undefined && this.options.expandedCaption != undefined) {
            this.normalCaption = Dom_1.$$('div', { className: 'coveo-folding-normal-caption' }, this.options.normalCaption).el;
            header.appendChild(this.normalCaption);
            this.expandedCaption = Dom_1.$$('div', { className: 'coveo-folding-expanded-caption' }, this.options.expandedCaption).el;
            header.appendChild(this.expandedCaption);
        }
        this.oneResultCaption = Dom_1.$$('div', { className: 'coveo-folding-oneresult-caption' }, this.options.oneResultCaption).el;
        header.appendChild(this.oneResultCaption);
    };
    ResultFolding.prototype.buildResults = function () {
        this.results = Dom_1.$$('div', { className: 'coveo-folding-results' }).el;
        this.element.appendChild(this.results);
    };
    ResultFolding.prototype.buildFooter = function () {
        var _this = this;
        var footer = Dom_1.$$('div', { className: 'coveo-folding-footer' }).el;
        this.element.parentElement.appendChild(footer);
        if (this.result.moreResults) {
            this.showMore = Dom_1.$$('div', { className: 'coveo-folding-footer-section-for-less' }).el;
            footer.appendChild(this.showMore);
            this.showLess = Dom_1.$$('div', { className: 'coveo-folding-footer-section-for-more' }).el;
            footer.appendChild(this.showLess);
            var footerIconShowMore = Dom_1.$$('div', { className: 'coveo-folding-more' }, Dom_1.$$('span', { className: 'coveo-folding-footer-icon' }, SVGIcons_1.SVGIcons.icons.arrowDown).el).el;
            SVGDom_1.SVGDom.addClassToSVGInContainer(footerIconShowMore, 'coveo-folding-more-svg');
            var footerIconShowLess = Dom_1.$$('div', { className: 'coveo-folding-less' }, Dom_1.$$('span', { className: 'coveo-folding-footer-icon' }, SVGIcons_1.SVGIcons.icons.arrowUp).el).el;
            SVGDom_1.SVGDom.addClassToSVGInContainer(footerIconShowLess, 'coveo-folding-less-svg');
            var showMoreLink = Dom_1.$$('a', { className: 'coveo-folding-show-more' }, this.options.moreCaption).el;
            var showLessLink = Dom_1.$$('a', { className: 'coveo-folding-show-less' }, this.options.lessCaption).el;
            new AccessibleButton_1.AccessibleButton()
                .withElement(this.showMore)
                .withLabel(this.options.moreCaption)
                .withSelectAction(function () { return _this.showMoreResults(); })
                .build();
            new AccessibleButton_1.AccessibleButton()
                .withElement(this.showLess)
                .withLabel(this.options.lessCaption)
                .withSelectAction(function () { return _this.showLessResults(); })
                .build();
            this.showMore.appendChild(showMoreLink);
            this.showLess.appendChild(showLessLink);
            this.showMore.appendChild(footerIconShowMore);
            this.showLess.appendChild(footerIconShowLess);
        }
    };
    ResultFolding.prototype.updateElementVisibility = function (subResultsLength) {
        if (this.normalCaption) {
            Dom_1.$$(this.normalCaption).toggle(!this.showingMoreResults && this.result.childResults.length > 0);
        }
        if (this.expandedCaption) {
            Dom_1.$$(this.expandedCaption).toggle(this.showingMoreResults);
        }
        Dom_1.$$(this.oneResultCaption).toggleClass('coveo-hidden', !(subResultsLength && subResultsLength == 1));
        if (this.showMore) {
            Dom_1.$$(this.showMore).toggleClass('coveo-visible', !this.showingMoreResults && !Utils_1.Utils.exists(this.moreResultsPromise));
            Dom_1.$$(this.showLess).toggleClass('coveo-visible', this.showingMoreResults);
        }
        var showIfNormal = Dom_1.$$(this.element).find('.coveo-show-if-normal');
        if (showIfNormal) {
            Dom_1.$$(showIfNormal).toggle(!this.showingMoreResults);
        }
        var showIfExpanded = Dom_1.$$(this.element).find('.coveo-show-if-expanded');
        if (showIfExpanded) {
            Dom_1.$$(showIfExpanded).toggle(this.showingMoreResults);
        }
    };
    ResultFolding.prototype.scrollToResultElement = function () {
        var resultElem = Dom_1.$$(this.element).closest('CoveoResult');
        window.scrollTo(0, new Dom_1.Win(window).scrollY() + resultElem.getBoundingClientRect().top);
    };
    ResultFolding.prototype.displayThoseResults = function (results) {
        return __awaiter(this, void 0, void 0, function () {
            var _this = this;
            var childResultsPromises, childsToAppend;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        childResultsPromises = underscore_1.map(results, function (result) {
                            return _this.renderChildResult(result);
                        });
                        return [4 /*yield*/, Promise.all(childResultsPromises)];
                    case 1:
                        childsToAppend = _a.sent();
                        Dom_1.$$(this.results).empty();
                        underscore_1.each(childsToAppend, function (oneChild) {
                            _this.results.appendChild(oneChild);
                        });
                        return [2 /*return*/, true];
                }
            });
        });
    };
    ResultFolding.prototype.renderChildResult = function (childResult) {
        return __awaiter(this, void 0, void 0, function () {
            var oneChild;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        QueryUtils_1.QueryUtils.setStateObjectOnQueryResult(this.queryStateModel.get(), childResult);
                        QueryUtils_1.QueryUtils.setSearchInterfaceObjectOnQueryResult(this.searchInterface, childResult);
                        return [4 /*yield*/, this.options.resultTemplate.instantiateToElement(childResult, {
                                wrapInDiv: false,
                                checkCondition: false,
                                responsiveComponents: this.searchInterface.responsiveComponents
                            })];
                    case 1:
                        oneChild = _a.sent();
                        Dom_1.$$(oneChild).addClass('coveo-result-folding-child-result');
                        Dom_1.$$(oneChild).toggleClass('coveo-normal-child-result', !this.showingMoreResults);
                        Dom_1.$$(oneChild).toggleClass('coveo-expanded-child-result', this.showingMoreResults);
                        return [4 /*yield*/, Initialization_1.Initialization.automaticallyCreateComponentsInsideResult(oneChild, childResult).initResult];
                    case 2:
                        _a.sent();
                        return [2 /*return*/, oneChild];
                }
            });
        });
    };
    ResultFolding.prototype.cancelAnyPendingShowMore = function () {
        Iif (this.moreResultsPromise) {
            this.moreResultsPromise = undefined;
        }
        Assert_1.Assert.doesNotExists(this.moreResultsPromise);
        Assert_1.Assert.doesNotExists(this.waitAnimation);
    };
    ResultFolding.prototype.bindOverlayEvents = function () {
        var _this = this;
        this.bind.one(this.element.parentElement, 'openCardOverlay', function () {
            Eif (_this.result.moreResults) {
                _this.showMoreResults();
            }
        });
    };
    ResultFolding.prototype.getAnalyticsMetadata = function () {
        return {
            documentURL: this.result.clickUri,
            documentTitle: this.result.title,
            author: Utils_1.Utils.getFieldValue(this.result, 'author')
        };
    };
    ResultFolding.ID = 'ResultFolding';
    ResultFolding.doExport = function () {
        GlobalExports_1.exportGlobally({
            ResultFolding: ResultFolding,
            DefaultFoldingTemplate: DefaultFoldingTemplate_1.DefaultFoldingTemplate
        });
    };
    /**
     * The options for the component
     * @componentOptions
     */
    ResultFolding.options = {
        /**
         * Specifies the template to use to render each of the child results for a top result.
         *
         * You can specify a previously registered template to use either by referring to its HTML `id` attribute or to a
         * CSS selector (see {@link TemplateCache}).
         *
         * **Example:**
         *
         * Specifying a previously registered template by referring to its HTML `id` attribute:
         *
         * ```html
         * <span class="CoveoResultFolding" data-result-template-id="Foo"></span>
         * ```
         *
         * Specifying a previously registered template by referring to a CSS selector:
         *
         * ```html
         * <span class='CoveoResultFolding' data-result-template-selector="#Foo"></span>
         * ```
         *
         * If you do not specify a custom folding template, the component uses the default result folding template.
         */
        resultTemplate: TemplateComponentOptions_1.TemplateComponentOptions.buildTemplateOption({ defaultFunction: function () { return new DefaultFoldingTemplate_1.DefaultFoldingTemplate(); } }),
        /**
         * Specifies the caption to display at the top of the child results when the folding result set is not expanded.
         *
         * Default value is `undefined`, which displays no caption.
         */
        normalCaption: ComponentOptions_1.ComponentOptions.buildLocalizedStringOption(),
        /**
         * Specifies the caption to display at the top of the child results when the folding result set is expanded.
         *
         * Default value is `undefined`, which displays no caption.
         */
        expandedCaption: ComponentOptions_1.ComponentOptions.buildLocalizedStringOption(),
        /**
         * Specifies the caption to display on the link to expand / show child results.
         *
         * Default value is the localized string for `ShowMore`.
         */
        moreCaption: ComponentOptions_1.ComponentOptions.buildLocalizedStringOption({ postProcessing: function (value) { return value || Strings_1.l('ShowMore'); } }),
        /**
         * Specifies the caption to display on the link to shrink the loaded folding result set back to only the top result.
         *
         * Default value is the localized string for `ShowLess`.
         */
        lessCaption: ComponentOptions_1.ComponentOptions.buildLocalizedStringOption({ postProcessing: function (value) { return value || Strings_1.l('ShowLess'); } }),
        /**
         * Specifies the caption to display when there is only one result in a folding result set.
         *
         * Default value is the localized string for `DisplayingTheOnlyMessage`
         */
        oneResultCaption: ComponentOptions_1.ComponentOptions.buildLocalizedStringOption({
            postProcessing: function (value) { return value || Strings_1.l('DisplayingTheOnlyMessage'); }
        })
    };
    return ResultFolding;
}(Component_1.Component));
exports.ResultFolding = ResultFolding;
Initialization_1.Initialization.registerAutoCreateComponent(ResultFolding);
 
 
/***/ }),
/* 824 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
__webpack_require__(1513);
var _ = __webpack_require__(1);
var BreadcrumbEvents_1 = __webpack_require__(33);
var InitializationEvents_1 = __webpack_require__(22);
var PreferencesPanelEvents_1 = __webpack_require__(112);
var QueryEvents_1 = __webpack_require__(14);
var GlobalExports_1 = __webpack_require__(10);
var Model_1 = __webpack_require__(26);
var QueryStateModel_1 = __webpack_require__(17);
var Strings_1 = __webpack_require__(4);
var AccessibilityUtils_1 = __webpack_require__(81);
var AccessibleButton_1 = __webpack_require__(20);
var Dom_1 = __webpack_require__(0);
var LocalStorageUtils_1 = __webpack_require__(96);
var SVGDom_1 = __webpack_require__(23);
var SVGIcons_1 = __webpack_require__(16);
var Utils_1 = __webpack_require__(5);
var AnalyticsActionListMeta_1 = __webpack_require__(7);
var Component_1 = __webpack_require__(6);
var ComponentOptions_1 = __webpack_require__(13);
var Initialization_1 = __webpack_require__(8);
var Checkbox_1 = __webpack_require__(98);
var FormGroup_1 = __webpack_require__(270);
var MultiSelect_1 = __webpack_require__(392);
var TextInput_1 = __webpack_require__(80);
/**
 * The `ResultFiltersPreferences` component allows end users to create custom filters to apply to queries. These filters
 * are saved to local storage.
 *
 * Only advanced end users who understand the Coveo query syntax should use this feature (see
 * [Coveo Query Syntax Reference](https://docs.coveo.com/en/1552/searching-with-coveo/coveo-cloud-query-syntax)).
 *
 * This component is normally accessible through the [`Settings`]{@link Settings} menu. Its usual location in the DOM is
 * inside the [`PreferencesPanel`]{@link PreferencesPanel} element.
 *
 * See also the {@link ResultsPreferences} component.
 */
var ResultsFiltersPreferences = /** @class */ (function (_super) {
    __extends(ResultsFiltersPreferences, _super);
    /**
     * Creates a new `ResultsFiltersPreferences` component.
     * @param element The HTMLElement on which to instantiate the component.
     * @param options The options for the `ResultsFiltersPreferences` component.
     * @param bindings The bindings that the component requires to function normally. If not set, these will be
     * automatically resolved (with a slower execution time).
     */
    function ResultsFiltersPreferences(element, options, bindings) {
        var _this = _super.call(this, element, ResultsFiltersPreferences.ID, bindings) || this;
        _this.element = element;
        _this.options = options;
        _this.bindings = bindings;
        _this.preferencePanelCheckboxInput = {};
        _this.options = ComponentOptions_1.ComponentOptions.initComponentOptions(element, ResultsFiltersPreferences, options);
        _this.preferencePanel = Dom_1.$$(_this.element).closest(Component_1.Component.computeCssClassNameForType('PreferencesPanel'));
        Iif (!_this.preferencePanel) {
            _this.logger.warn("Cannot instantiate ResultsFilterPreferences, as there is no \"CoveoPreferencesPanel\" in your page !");
            return _this;
        }
        _this.preferencePanelLocalStorage = new LocalStorageUtils_1.LocalStorageUtils(ResultsFiltersPreferences.ID);
        _this.mergeLocalPreferencesWithStaticPreferences();
        _this.bindPreferencePanelEvent();
        _this.bindBreadcrumbEvent();
        _this.bindQueryEvent();
        // We need to wait after all components are initialized before building the dom, because this component interacts with Tab
        // And we don't know if Tab(s) are initialized before or after this component.
        _this.bind.oneRootElement(InitializationEvents_1.InitializationEvents.afterComponentsInitialization, function () { return _this.createDom(); });
        _this.bind.oneQueryState(Model_1.MODEL_EVENTS.CHANGE_ONE, QueryStateModel_1.QUERY_STATE_ATTRIBUTES.T, function () { return _this.fromPreferencesToCheckboxInput(); });
        return _this;
    }
    ResultsFiltersPreferences.prototype.createDom = function () {
        this.container = new FormGroup_1.FormGroup([], Strings_1.l('ResultsFilteringExpression')).build();
        this.element.appendChild(this.container);
        this.buildCheckboxesInput();
        Eif (this.options.showAdvancedFilters) {
            this.buildAdvancedFilters();
        }
    };
    ResultsFiltersPreferences.prototype.save = function () {
        this.fromCheckboxInputToPreferences();
        var toSave = _.omit(this.preferences, 'tab');
        this.logger.info('Saving preferences', toSave);
        this.preferencePanelLocalStorage.save(toSave);
    };
    ResultsFiltersPreferences.prototype.exitWithoutSave = function () {
        this.fromPreferencesToCheckboxInput();
        this.hideAdvancedFilterBuilder();
    };
    ResultsFiltersPreferences.prototype.bindPreferencePanelEvent = function () {
        var _this = this;
        this.bind.on(this.preferencePanel, PreferencesPanelEvents_1.PreferencesPanelEvents.savePreferences, function () { return _this.save(); });
        this.bind.on(this.preferencePanel, PreferencesPanelEvents_1.PreferencesPanelEvents.exitPreferencesWithoutSave, function () { return _this.exitWithoutSave(); });
    };
    ResultsFiltersPreferences.prototype.bindBreadcrumbEvent = function () {
        var _this = this;
        Eif (this.options.includeInBreadcrumb) {
            this.bind.onRootElement(BreadcrumbEvents_1.BreadcrumbEvents.populateBreadcrumb, function (args) {
                return _this.handlePopulateBreadcrumb(args);
            });
            this.bind.onRootElement(BreadcrumbEvents_1.BreadcrumbEvents.clearBreadcrumb, function () { return _this.handleClearBreadcrumb(); });
        }
    };
    ResultsFiltersPreferences.prototype.bindQueryEvent = function () {
        var _this = this;
        this.bind.onRootElement(QueryEvents_1.QueryEvents.buildingQuery, function (args) { return _this.handleBuildingQuery(args); });
    };
    ResultsFiltersPreferences.prototype.handleBuildingQuery = function (args) {
        _.each(this.getActiveFilters(), function (filter) {
            Eif (Utils_1.Utils.isNonEmptyString(filter.expression)) {
                args.queryBuilder.advancedExpression.add(filter.expression);
            }
        });
    };
    ResultsFiltersPreferences.prototype.handlePopulateBreadcrumb = function (args) {
        var actives = this.getActiveFilters();
        Eif (Utils_1.Utils.isNonEmptyArray(actives)) {
            var container = Dom_1.$$('div', { className: 'coveo-results-filter-preferences-breadcrumb' });
            var title = Dom_1.$$(AccessibilityUtils_1.getHeadingTag(args.headingLevel, 'span'), { className: 'coveo-title' });
            title.text(Strings_1.l('FiltersInYourPreferences') + ':');
            container.el.appendChild(title.el);
            var valuesContainer = Dom_1.$$('span', { className: 'coveo-values' });
            container.el.appendChild(valuesContainer.el);
            for (var i = 0; i < actives.length; i++) {
                valuesContainer.el.appendChild(this.buildBreadcrumb(actives[i]));
            }
            args.breadcrumbs.push({ element: container.el });
        }
    };
    ResultsFiltersPreferences.prototype.handleClearBreadcrumb = function () {
        this.isFullBreadcrumbClear = true;
        _.each(this.getActiveFilters(), function (filter) {
            filter.selected = false;
        });
        this.fromPreferencesToCheckboxInput();
        this.isFullBreadcrumbClear = false;
    };
    ResultsFiltersPreferences.prototype.buildAdvancedFilters = function () {
        var _this = this;
        this.advancedFilters = Dom_1.$$('div', { className: 'coveo-advanced-filters' }, Strings_1.l('Create')).el;
        new AccessibleButton_1.AccessibleButton()
            .withElement(this.advancedFilters)
            .withoutLabelOrTitle()
            .withSelectAction(function () { return _this.openAdvancedFilterSectionOrSaveFilters(); })
            .build();
        this.buildAdvancedFilterInput();
        this.buildAdvancedFilterFormValidate();
        this.advancedFiltersBuilder = Dom_1.$$('div', { className: 'coveo-advanced-filters-builder' }).el;
        this.advancedFiltersBuilder.appendChild(this.advancedFilterFormValidate);
        var onlineHelp = Dom_1.$$('a', {
            href: 'https://docs.coveo.com/en/2053/index-content/inspect-items-with-the-content-browser#result-filtering-expressions',
            className: 'coveo-online-help'
        }, '?');
        var title = Dom_1.$$(this.container).find('.coveo-form-group-label');
        onlineHelp.insertAfter(title);
        Dom_1.$$(this.advancedFilters).insertAfter(title);
        this.container.appendChild(this.advancedFiltersBuilder);
    };
    ResultsFiltersPreferences.prototype.buildAdvancedFilterInput = function () {
        this.advancedFiltersTextInputCaption = new TextInput_1.TextInput(function () { }, Strings_1.l('Caption'));
        this.advancedFiltersTextInputCaption.getInput().setAttribute('required', '');
        this.advancedFiltersTextInputExpression = new TextInput_1.TextInput(function () { }, Strings_1.l('Expression'));
        this.advancedFiltersTextInputExpression.getInput().setAttribute('required', '');
        this.advancedFiltersTabSelect = new MultiSelect_1.MultiSelect(function () { }, this.getAllTabs(), Strings_1.l('Tab'));
    };
    ResultsFiltersPreferences.prototype.buildAdvancedFilterFormValidate = function () {
        var _this = this;
        this.advancedFilterFormValidate = Dom_1.$$('form').el;
        var formSubmit = Dom_1.$$('input', {
            type: 'submit'
        });
        var saveFormButton = Dom_1.$$('span', {
            className: 'coveo-save'
        }, SVGIcons_1.SVGIcons.icons.save);
        SVGDom_1.SVGDom.addClassToSVGInContainer(saveFormButton.el, 'coveo-save-svg');
        new AccessibleButton_1.AccessibleButton()
            .withElement(saveFormButton.el)
            .withLabel(Strings_1.l('Save'))
            .withSelectAction(function () { return formSubmit.el.click(); })
            .build();
        var closeFormButton = Dom_1.$$('span', {
            className: 'coveo-close'
        }, SVGIcons_1.SVGIcons.icons.close);
        SVGDom_1.SVGDom.addClassToSVGInContainer(closeFormButton.el, 'coveo-close-svg');
        new AccessibleButton_1.AccessibleButton()
            .withElement(closeFormButton.el)
            .withLabel(Strings_1.l('Close'))
            .withSelectAction(function () { return _this.hideAdvancedFilterBuilder(); })
            .build();
        var saveAndCloseContainer = Dom_1.$$('div', {
            className: 'coveo-choice-container coveo-close-and-save'
        });
        saveAndCloseContainer.el.appendChild(saveFormButton.el);
        saveAndCloseContainer.el.appendChild(closeFormButton.el);
        var inputCaption = this.advancedFiltersTextInputCaption.build();
        Dom_1.$$(inputCaption).addClass('coveo-caption');
        var filtersTabSelect = this.advancedFiltersTabSelect.build();
        Dom_1.$$(filtersTabSelect).addClass('coveo-tab');
        var filtersExpression = this.advancedFiltersTextInputExpression.build();
        Dom_1.$$(filtersExpression).addClass('coveo-expression');
        _.each([inputCaption, filtersExpression, filtersTabSelect, saveAndCloseContainer.el, formSubmit.el], function (el) {
            _this.advancedFilterFormValidate.appendChild(el);
        });
        Dom_1.$$(this.advancedFilterFormValidate).on('submit', function (e) { return _this.validateAndSaveAdvancedFilter(e); });
    };
    ResultsFiltersPreferences.prototype.getAllTabs = function () {
        var tabRef = Component_1.Component.getComponentRef('Tab');
        Eif (tabRef) {
            var tabsElement = Dom_1.$$(this.root).findAll('.' + Component_1.Component.computeCssClassName(tabRef));
            return _.map(tabsElement, function (tabElement) {
                var tab = Component_1.Component.get(tabElement);
                return tab.options.id;
            });
        }
        else {
            return [];
        }
    };
    ResultsFiltersPreferences.prototype.getPreferencesBoxInputToBuild = function () {
        return _.map(this.preferences, function (filter) {
            return {
                label: filter.caption,
                tab: filter.tab,
                expression: filter.expression
            };
        });
    };
    ResultsFiltersPreferences.prototype.buildCheckboxesInput = function () {
        var _this = this;
        if (this.preferenceContainer != undefined) {
            this.preferenceContainer.remove();
        }
        var toBuild = this.getPreferencesBoxInputToBuild();
        if (Utils_1.Utils.isNonEmptyArray(toBuild)) {
            this.preferenceContainer = Dom_1.$$('div', {
                className: 'coveo-choices-container'
            }).el;
            _.each(toBuild, function (filterToBuild) {
                var checkbox = new Checkbox_1.Checkbox(function (checkbox) {
                    _this.save();
                    var filter = _this.preferences[checkbox.getValue()];
                    if (!_this.queryController.firstQuery && !_this.isFullBreadcrumbClear) {
                        _this.fromFilterToAnalyticsEvent(filter, filter.selected ? 'selected' : 'unselected');
                        _this.queryController.executeQuery({
                            closeModalBox: false
                        });
                    }
                }, filterToBuild.label);
                Dom_1.$$(checkbox.build()).addClass('coveo-choice-container');
                _this.preferencePanelCheckboxInput[filterToBuild.label] = checkbox;
                _this.preferenceContainer.appendChild(checkbox.getElement());
            });
            _.each(Dom_1.$$(this.preferenceContainer).findAll('.coveo-choice-container'), function (choiceContainer) {
                choiceContainer.appendChild(Dom_1.$$('div', { className: 'coveo-section coveo-section-edit-delete' }).el);
            });
            Dom_1.$$(this.container).append(this.preferenceContainer);
            this.buildEditAdvancedFilter();
            this.buildDeleteAdvancedFilter();
            this.fromPreferencesToCheckboxInput();
        }
    };
    ResultsFiltersPreferences.prototype.buildDeleteAdvancedFilter = function () {
        var _this = this;
        _.each(this.preferences, function (filter) {
            if (filter.custom) {
                var deleteElement = Dom_1.$$('span', {
                    className: 'coveo-delete'
                }, SVGIcons_1.SVGIcons.icons.delete).el;
                new AccessibleButton_1.AccessibleButton()
                    .withElement(deleteElement)
                    .withLabel(Strings_1.l('Delete'))
                    .withSelectAction(function () { return _this.confirmDelete(filter, filterElement_1); })
                    .build();
                SVGDom_1.SVGDom.addClassToSVGInContainer(deleteElement, 'coveo-delete-svg');
                var filterElement_1 = _this.getFilterElementByCaption(filter.caption);
                var insertInto = Dom_1.$$(filterElement_1).find('.coveo-section-edit-delete');
                insertInto.appendChild(deleteElement);
            }
        });
    };
    ResultsFiltersPreferences.prototype.buildEditAdvancedFilter = function () {
        var _this = this;
        _.each(this.preferences, function (filter) {
            if (filter.custom) {
                var editElement = Dom_1.$$('span', {
                    className: 'coveo-edit'
                }, SVGIcons_1.SVGIcons.icons.edit);
                new AccessibleButton_1.AccessibleButton()
                    .withElement(editElement)
                    .withLabel(Strings_1.l('Edit'))
                    .withSelectAction(function () { return _this.editElement(filter, filterElement_2); })
                    .build();
                SVGDom_1.SVGDom.addClassToSVGInContainer(editElement.el, 'coveo-edit-svg');
                var filterElement_2 = _this.getFilterElementByCaption(filter.caption);
                var insertInto = Dom_1.$$(filterElement_2).find('.coveo-section-edit-delete');
                insertInto.appendChild(editElement.el);
            }
        });
    };
    ResultsFiltersPreferences.prototype.buildBreadcrumb = function (filter) {
        var _this = this;
        var elem = Dom_1.$$('span', { className: 'coveo-value' });
        var caption = Dom_1.$$('span', { className: 'coveo-caption' });
        caption.text(filter.caption);
        elem.el.appendChild(caption.el);
        var clear = Dom_1.$$('span', { className: 'coveo-clear' }, SVGIcons_1.SVGIcons.icons.mainClear);
        elem.el.appendChild(clear.el);
        var onSelectAction = function () {
            filter.selected = false;
            _this.fromFilterToAnalyticsEvent(filter, 'cleared from breadcrumb');
            _this.fromPreferencesToCheckboxInput();
        };
        new AccessibleButton_1.AccessibleButton().withElement(elem).withLabel(Strings_1.l('RemoveFilterOn', filter.caption)).withSelectAction(onSelectAction).build();
        return elem.el;
    };
    ResultsFiltersPreferences.prototype.confirmDelete = function (filter, filterElement) {
        if (confirm(Strings_1.l('AreYouSureDeleteFilter', filter.caption, filter.expression))) {
            var isSelected = filter.selected;
            this.deleteFilterPreference(filter, filterElement);
            if (isSelected) {
                this.fromFilterToAnalyticsEvent(filter, 'deleted');
                this.queryController.executeQuery({
                    closeModalBox: false
                });
            }
        }
    };
    ResultsFiltersPreferences.prototype.editElement = function (filter, filterElement) {
        var oldCaption = this.preferences[filter.caption].caption;
        var oldTab = this.preferences[filter.caption].tab;
        var oldExpression = this.preferences[filter.caption].expression;
        this.deleteFilterPreference(filter, filterElement);
        this.openAdvancedFilterSectionOrSaveFilters();
        this.populateEditSection({ tab: oldTab, caption: oldCaption, expression: oldExpression });
    };
    ResultsFiltersPreferences.prototype.populateEditSection = function (toPopulate) {
        if (toPopulate === void 0) { toPopulate = { tab: [''], caption: '', expression: '' }; }
        this.advancedFiltersTextInputCaption.setValue(toPopulate.caption);
        this.advancedFiltersTextInputExpression.setValue(toPopulate.expression);
        this.advancedFiltersTabSelect.setValue(toPopulate.tab);
    };
    ResultsFiltersPreferences.prototype.deleteFilterPreference = function (filter, filterElement) {
        this.preferencePanelLocalStorage.remove(filter.caption);
        delete this.preferences[filter.caption];
        Dom_1.$$(Dom_1.$$(filterElement).closest('.coveo-choice-container')).detach();
    };
    ResultsFiltersPreferences.prototype.openAdvancedFilterSectionOrSaveFilters = function () {
        if (Dom_1.$$(this.advancedFiltersBuilder).hasClass('coveo-active')) {
            Dom_1.$$(Dom_1.$$(this.advancedFilterFormValidate).find('input[type=submit]')).trigger('click');
            this.hideAdvancedFilterBuilder();
        }
        else {
            this.populateEditSection();
            this.showAdvancedFilterBuilder();
        }
    };
    ResultsFiltersPreferences.prototype.validateAndSaveAdvancedFilter = function (e) {
        e.preventDefault();
        this.hideAdvancedFilterBuilder();
        var caption = this.advancedFiltersTextInputCaption.getValue();
        var expression = this.advancedFiltersTextInputExpression.getValue();
        var tabs = this.advancedFiltersTabSelect.getValue();
        this.preferences[caption] = {
            caption: caption,
            custom: true,
            expression: expression,
            tab: tabs,
            selected: true
        };
        this.buildCheckboxesInput();
        this.save();
        this.queryStateModel.set(QueryStateModel_1.QueryStateModel.attributesEnum.t, this.getActiveTab());
        this.advancedFiltersTextInputCaption.reset();
        this.advancedFiltersTextInputExpression.reset();
        this.advancedFiltersTabSelect.reset();
        this.container.appendChild(this.advancedFiltersBuilder);
        this.fromFilterToAnalyticsEvent(this.preferences[caption], 'saved');
        this.queryController.executeQuery({
            closeModalBox: false
        });
    };
    ResultsFiltersPreferences.prototype.fromPreferencesToCheckboxInput = function () {
        var _this = this;
        _.each(this.getActiveFilters(), function (filter) {
            _this.preferencePanelCheckboxInput[filter.caption].select();
        });
        _.each(this.getInactiveFilters(), function (filter) {
            _this.preferencePanelCheckboxInput[filter.caption].reset();
        });
        _.each(this.getDormantFilters(), function (filter) {
            _this.preferencePanelCheckboxInput[filter.caption].select();
        });
    };
    ResultsFiltersPreferences.prototype.fromCheckboxInputToPreferences = function () {
        Eif (this.preferencePanelCheckboxInput) {
            var selecteds_1 = _.map(_.filter(this.preferencePanelCheckboxInput, function (checkbox) { return checkbox.isSelected(); }), function (selected) { return selected.getValue(); });
            _.each(this.preferences, function (filter) {
                if (_.contains(selecteds_1, filter.caption)) {
                    filter.selected = true;
                }
                else {
                    filter.selected = false;
                }
            });
        }
    };
    ResultsFiltersPreferences.prototype.getDormantFilters = function () {
        var _this = this;
        var activeTab = this.getActiveTab();
        return _.filter(this.preferences, function (filter) {
            return filter.selected && !_this.filterIsInActiveTab(filter, activeTab);
        });
    };
    ResultsFiltersPreferences.prototype.getActiveFilters = function () {
        var _this = this;
        var activeTab = this.getActiveTab();
        return _.filter(this.preferences, function (filter) {
            return filter.selected && _this.filterIsInActiveTab(filter, activeTab);
        });
    };
    ResultsFiltersPreferences.prototype.getInactiveFilters = function () {
        var _this = this;
        var activeTab = this.getActiveTab();
        return _.filter(this.preferences, function (filter) {
            return !filter.selected || !_this.filterIsInActiveTab(filter, activeTab);
        });
    };
    ResultsFiltersPreferences.prototype.getActiveTab = function () {
        return this.queryStateModel.get(QueryStateModel_1.QueryStateModel.attributesEnum.t);
    };
    ResultsFiltersPreferences.prototype.filterIsInActiveTab = function (filter, tab) {
        filter.tab = _.compact(filter.tab);
        return _.contains(filter.tab, tab) || Utils_1.Utils.isEmptyArray(filter.tab);
    };
    ResultsFiltersPreferences.prototype.getFilterElementByCaption = function (caption) {
        return Dom_1.$$(this.preferenceContainer).find("input[value='" + caption.replace(/'/g, "\\'") + "']").parentElement;
    };
    ResultsFiltersPreferences.prototype.fromResultsFilterOptionToResultsPreferenceInterface = function () {
        var ret = {};
        _.each(this.options.filters, function (filter, caption) {
            ret[caption] = {
                expression: filter.expression,
                tab: filter.tab,
                selected: filter.selected ? filter.selected : false,
                custom: false,
                caption: caption
            };
        });
        return ret;
    };
    ResultsFiltersPreferences.prototype.mergeLocalPreferencesWithStaticPreferences = function () {
        var staticPreferences = this.fromResultsFilterOptionToResultsPreferenceInterface();
        var localPreferences = this.preferencePanelLocalStorage.load();
        var localPreferencesWithoutRemoved = _.filter(localPreferences, function (preference) {
            var isCustom = preference.custom;
            var existsInStatic = _.find(staticPreferences, function (staticPreference) {
                return staticPreference.caption == preference.caption;
            });
            return isCustom || existsInStatic != undefined;
        });
        var localToMerge = {};
        _.each(localPreferencesWithoutRemoved, function (filter) {
            localToMerge[filter.caption] = {
                expression: filter.expression,
                tab: filter.tab,
                selected: filter.selected,
                custom: filter.custom,
                caption: filter.caption
            };
        });
        this.preferences = Utils_1.Utils.extendDeep(staticPreferences, localToMerge);
    };
    ResultsFiltersPreferences.prototype.fromFilterToAnalyticsEvent = function (filter, type) {
        this.usageAnalytics.logSearchEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.customfiltersChange, {
            customFilterName: filter.caption,
            customFilterExpression: filter.expression,
            customFilterType: type
        });
    };
    ResultsFiltersPreferences.prototype.enlargeModalBox = function () {
        var modalBoxContainer = Dom_1.$$(document.body).find('.coveo-modal-container');
        if (modalBoxContainer) {
            Dom_1.$$(modalBoxContainer).addClass('coveo-mod-big');
        }
    };
    ResultsFiltersPreferences.prototype.shrinkModalBox = function () {
        var modalBoxContainer = Dom_1.$$(document.body).find('.coveo-modal-container');
        Iif (modalBoxContainer) {
            Dom_1.$$(modalBoxContainer).removeClass('coveo-mod-big');
        }
    };
    ResultsFiltersPreferences.prototype.showAdvancedFilterBuilder = function () {
        if (this.advancedFiltersBuilder) {
            Dom_1.$$(this.advancedFiltersBuilder).addClass('coveo-active');
            this.enlargeModalBox();
        }
    };
    ResultsFiltersPreferences.prototype.hideAdvancedFilterBuilder = function () {
        Eif (this.advancedFiltersBuilder) {
            Dom_1.$$(this.advancedFiltersBuilder).removeClass('coveo-active');
            this.shrinkModalBox();
        }
    };
    ResultsFiltersPreferences.ID = 'ResultsFiltersPreferences';
    ResultsFiltersPreferences.doExport = function () {
        GlobalExports_1.exportGlobally({
            ResultsFiltersPreferences: ResultsFiltersPreferences
        });
    };
    /**
     * The options for the component
     * @componentOptions
     */
    ResultsFiltersPreferences.options = {
        /**
         * Specifies whether to display the active filter(s) in the [`Breadcrumb`]{@link Breadcrumb}.
         *
         * Default value is `true`.
         */
        includeInBreadcrumb: ComponentOptions_1.ComponentOptions.buildBooleanOption({ defaultValue: true }),
        /**
         * Specifies whether to show the **Create** button that allows the end user to create filters.
         *
         * If you set this option to `false`, only the pre-populated
         * [`filters`]{@link ResultsFiltersPreferences.options.filters} are available to the end user.
         *
         * Default value is `true`.
         */
        showAdvancedFilters: ComponentOptions_1.ComponentOptions.buildBooleanOption({ defaultValue: true }),
        /**
         * Specifies the default filters which all end users can apply.
         *
         * End users cannot modify or delete these filters. These filters do not count as "user-made" filters, but rather as
         * "built-in" filters created by the developer of the search page.
         *
         * **Note:**
         * > You cannot set this option directly in the component markup as an HTML attribute. You must either set it in the
         * > [`init`]{@link init} call of your search interface (see
         * > [Passing Component Options in the init Call](https://docs.coveo.com/en/346/#passing-component-options-in-the-init-call)),
         * > or before the `init` call, using the `options` top-level function (see
         * > [Passing Component Options Before the init Call](https://docs.coveo.com/en/346/#passing-component-options-before-the-init-call)).
         *
         * Filters should follow this definition:
         *
         * `filters : { [caption : string] : { expression : string, tab? : string[] } }`;
         *
         * **Example:**
         *
         * var myFilters = {
         *   "Only Google Drive Items" : {
         *     expression : "@connectortype == 'GoogleDriveCrawler'",
         *     tab : ["Tab1", "Tab2"]
         *   },
         *
         *   "Another Filter" : {
         *     expression : [ ... another expression ... ]
         *   },
         *
         *   [ ... ]
         * };
         *
         * ```javascript
         * // You can set the option in the 'init' call:
         * Coveo.init(document.querySelector("#search"), {
         *   ResultsFiltersPreferences : {
         *     filters : myFilters
         *   }
         * });
         *
         * // Or before the 'init' call, using the 'options' top-level function:
         * // Coveo.options(document.querySelector("#search"), {
         * //   ResultsFiltersPreferences : {
         *        filters : myFilters
         *      }
         * // });
         * ```
         *
         * Default value is `undefined`.
         */
        filters: ComponentOptions_1.ComponentOptions.buildJsonOption()
    };
    return ResultsFiltersPreferences;
}(Component_1.Component));
exports.ResultsFiltersPreferences = ResultsFiltersPreferences;
Initialization_1.Initialization.registerAutoCreateComponent(ResultsFiltersPreferences);
 
 
/***/ }),
/* 825 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
__webpack_require__(1516);
var _ = __webpack_require__(1);
var InitializationEvents_1 = __webpack_require__(22);
var QueryEvents_1 = __webpack_require__(14);
var ResultListEvents_1 = __webpack_require__(48);
var GlobalExports_1 = __webpack_require__(10);
var Assert_1 = __webpack_require__(12);
var Model_1 = __webpack_require__(26);
var QueryStateModel_1 = __webpack_require__(17);
var Strings_1 = __webpack_require__(4);
var AccessibleButton_1 = __webpack_require__(20);
var DeviceUtils_1 = __webpack_require__(42);
var Dom_1 = __webpack_require__(0);
var ResultListUtils_1 = __webpack_require__(72);
var AnalyticsActionListMeta_1 = __webpack_require__(7);
var Component_1 = __webpack_require__(6);
var ComponentOptions_1 = __webpack_require__(13);
var Initialization_1 = __webpack_require__(8);
var underscore_1 = __webpack_require__(1);
/**
 * The ResultsPerPage component attaches itself to a `div` and allows the end user to choose how many results to
 * display per page.
 *
 * **Note:** Adding a ResultPerPage component to your page overrides the value of
 * {@link SearchInterface.options.resultsPerPage}.
 */
var ResultsPerPage = /** @class */ (function (_super) {
    __extends(ResultsPerPage, _super);
    /**
     * Creates a new ResultsPerPage. The component renders itself on every query success.
     * @param element The HTMLElement on which to instantiate the component (normally a `div`).
     * @param options The options for the ResultsPerPage component.
     * @param bindings The bindings that the component requires to function normally. If not set, these will be
     * automatically resolved (with a slower execution time).
     */
    function ResultsPerPage(element, options, bindings) {
        var _this = _super.call(this, element, ResultsPerPage.ID, bindings) || this;
        _this.element = element;
        _this.options = options;
        _this.options = ComponentOptions_1.ComponentOptions.initComponentOptions(element, ResultsPerPage, options);
        _this.bind.onRootElement(InitializationEvents_1.InitializationEvents.afterInitialization, function () { return _this.resolveInitialState(); });
        _this.bind.onRootElement(QueryEvents_1.QueryEvents.querySuccess, function (args) { return _this.handleQuerySuccess(args); });
        _this.bind.onRootElement(QueryEvents_1.QueryEvents.queryError, function () { return _this.handleQueryError(); });
        _this.bind.onRootElement(QueryEvents_1.QueryEvents.noResults, function (args) { return _this.handleNoResults(); });
        _this.bind.onQueryState(Model_1.MODEL_EVENTS.CHANGE_ONE, QueryStateModel_1.QUERY_STATE_ATTRIBUTES.NUMBER_OF_RESULTS, function (args) {
            return _this.handleQueryStateModelChanged(args);
        });
        _this.addAlwaysActiveListeners();
        _this.initComponent();
        return _this;
    }
    /**
     * Sets the current number of results per page, then executes a query.
     *
     * Also logs an event in the usage analytics (`pagerResize` by default) with the new current number of results per
     * page as meta data.
     * @param resultsPerPage The new number of results per page to select.
     * @param analyticCause The event to log in the usage analytics.
     */
    ResultsPerPage.prototype.setResultsPerPage = function (resultsPerPage, analyticCause) {
        Eif (analyticCause === void 0) { analyticCause = AnalyticsActionListMeta_1.analyticsActionCauseList.pagerResize; }
        Assert_1.Assert.exists(resultsPerPage);
        Assert_1.Assert.check(this.isValidChoice(resultsPerPage), 'The specified number of results is not available in the options.');
        this.updateResultsPerPage(resultsPerPage);
        this.updateQueryStateModelResultsPerPage();
        this.logAnalyticsEvent(analyticCause);
        this.executeQuery();
    };
    Object.defineProperty(ResultsPerPage.prototype, "resultsPerPage", {
        /**
         * Returns the current number of results per page.
         */
        get: function () {
            return this.currentResultsPerPage;
        },
        enumerable: true,
        configurable: true
    });
    ResultsPerPage.prototype.updateResultsPerPage = function (resultsPerPage) {
        this.queryController.options.resultsPerPage = resultsPerPage;
        this.searchInterface.resultsPerPage = resultsPerPage;
        this.currentResultsPerPage = resultsPerPage;
    };
    ResultsPerPage.prototype.updateQueryStateModelResultsPerPage = function () {
        this.queryStateModel.set(QueryStateModel_1.QueryStateModel.attributesEnum.numberOfResults, this.currentResultsPerPage);
    };
    ResultsPerPage.prototype.logAnalyticsEvent = function (analyticCause) {
        this.usageAnalytics.logCustomEvent(analyticCause, { currentResultsPerPage: this.currentResultsPerPage }, this.element);
    };
    ResultsPerPage.prototype.executeQuery = function () {
        this.queryController.executeQuery({
            ignoreWarningSearchEvent: true,
            keepLastSearchUid: true,
            origin: this
        });
    };
    ResultsPerPage.prototype.handleQueryStateModelChanged = function (args) {
        var valueToSet = args.value;
        if (!this.isValidChoice(valueToSet)) {
            this.logInvalidConfiguredChoiceWarning(valueToSet);
            this.resolveInitialState();
        }
        else {
            this.updateResultsPerPage(valueToSet);
        }
    };
    ResultsPerPage.prototype.addAlwaysActiveListeners = function () {
        var _this = this;
        this.searchInterface.element.addEventListener(ResultListEvents_1.ResultListEvents.newResultsDisplayed, function () {
            return ResultListUtils_1.ResultListUtils.hideIfInfiniteScrollEnabled(_this);
        });
    };
    ResultsPerPage.prototype.resolveInitialState = function () {
        this.updateResultsPerPage(this.getInitialChoice());
        this.updateQueryStateModelResultsPerPage();
    };
    ResultsPerPage.prototype.getInitialChoice = function () {
        var firstDisplayedChoice = this.options.choicesDisplayed[0];
        var configuredChoice = this.options.initialChoice;
        var queryStateModelChoice = this.queryStateModel.get(QueryStateModel_1.QueryStateModel.attributesEnum.numberOfResults);
        var queryStateModelChoiceIsNotDefault = queryStateModelChoice !== QueryStateModel_1.QueryStateModel.defaultAttributes.numberOfResults;
        Iif (queryStateModelChoiceIsNotDefault && this.isValidChoice(queryStateModelChoice)) {
            return queryStateModelChoice;
        }
        if (configuredChoice !== undefined) {
            if (this.isValidChoice(configuredChoice)) {
                return configuredChoice;
            }
            this.logInvalidConfiguredChoiceWarning(configuredChoice);
        }
        return firstDisplayedChoice;
    };
    ResultsPerPage.prototype.isValidChoice = function (choice) {
        return this.options.choicesDisplayed.indexOf(choice) !== -1;
    };
    ResultsPerPage.prototype.logInvalidConfiguredChoiceWarning = function (configuredChoice) {
        var validChoices = this.options.choicesDisplayed;
        this.logger.warn("The choice " + configuredChoice + " is not within the choices displayed. Consider setting a value that is valid: " + validChoices + ". The first choice will be selected instead.");
    };
    ResultsPerPage.prototype.initComponent = function () {
        this.span = Dom_1.$$('span', {
            id: underscore_1.uniqueId('coveo-results-per-page-text-'),
            className: 'coveo-results-per-page-text'
        }, Strings_1.l('ResultsPerPage')).el;
        this.element.appendChild(this.span);
        this.list = Dom_1.$$('ul', {
            className: 'coveo-results-per-page-list',
            'aria-labelledby': this.span.id
        }).el;
        this.element.appendChild(this.list);
    };
    ResultsPerPage.prototype.render = function () {
        var _this = this;
        Dom_1.$$(this.span).removeClass('coveo-results-per-page-no-results');
        var numResultsList = this.options.choicesDisplayed;
        var _loop_1 = function () {
            var listItem = Dom_1.$$('li', {
                className: 'coveo-results-per-page-list-item'
            }).el;
            var resultsPerPage = numResultsList[i];
            var isActive = resultsPerPage === this_1.currentResultsPerPage;
            if (isActive) {
                Dom_1.$$(listItem).addClass('coveo-active');
            }
            var clickAction = function (e) {
                e.stopPropagation();
                _this.handleClickPage(resultsPerPage);
            };
            var button = Dom_1.$$('span', {
                className: 'coveo-results-per-page-list-item-text',
                tabindex: 0,
                ariaPressed: isActive.toString()
            }, numResultsList[i].toString()).el;
            listItem.appendChild(button);
            listItem.addEventListener('click', function (e) { return clickAction(e); });
            new AccessibleButton_1.AccessibleButton()
                .withElement(button)
                .withLabel(Strings_1.l('DisplayResultsPerPage', numResultsList[i].toString()))
                .withClickAction(clickAction)
                .withEnterKeyboardAction(clickAction)
                .build();
            this_1.list.appendChild(listItem);
        };
        var this_1 = this;
        for (var i = 0; i < numResultsList.length; i++) {
            _loop_1();
        }
    };
    ResultsPerPage.prototype.handleQueryError = function () {
        this.reset();
    };
    ResultsPerPage.prototype.handleNoResults = function () {
        this.reset();
    };
    ResultsPerPage.prototype.handleQuerySuccess = function (data) {
        if (this.searchInterface.isResultsPerPageModifiedByPipeline) {
            this.logger.info('Results per page was modified by backend code (query pipeline). ResultsPerPage component will be hidden', this);
            this.reset();
            var resultsPerPage = this.getInitialChoice();
            this.updateResultsPerPage(resultsPerPage);
            return;
        }
        if (data.results.results.length != 0) {
            this.reset();
            this.render();
        }
    };
    ResultsPerPage.prototype.handleClickPage = function (resultsPerPage) {
        Assert_1.Assert.exists(resultsPerPage);
        this.setResultsPerPage(resultsPerPage);
    };
    ResultsPerPage.prototype.reset = function () {
        Dom_1.$$(this.span).addClass('coveo-results-per-page-no-results');
        Dom_1.$$(this.list).empty();
    };
    ResultsPerPage.ID = 'ResultsPerPage';
    ResultsPerPage.doExport = function () {
        GlobalExports_1.exportGlobally({
            ResultsPerPage: ResultsPerPage
        });
    };
    /**
     * The options for the ResultsPerPage
     * @componentOptions
     */
    ResultsPerPage.options = {
        /**
         * Specifies the possible values of number of results to display per page that the end user can select from.
         *
         * See also {@link ResultsPerPage.options.initialChoice}.
         *
         * Default value is `[10, 25, 50, 100]`.
         */
        choicesDisplayed: ComponentOptions_1.ComponentOptions.buildCustomListOption(function (list) {
            var values = _.map(list, function (value) {
                return parseInt(value, 10);
            });
            return values.length == 0 ? null : values;
        }, {
            defaultFunction: function () {
                Iif (DeviceUtils_1.DeviceUtils.isMobileDevice()) {
                    return [10, 25, 50];
                }
                else {
                    return [10, 25, 50, 100];
                }
            }
        }),
        /**
         * Specifies the value to select by default for the number of results to display per page.
         *
         * Default value is the first value of {@link ResultsPerPage.options.choicesDisplayed}.
         */
        initialChoice: ComponentOptions_1.ComponentOptions.buildNumberOption()
    };
    return ResultsPerPage;
}(Component_1.Component));
exports.ResultsPerPage = ResultsPerPage;
Initialization_1.Initialization.registerAutoCreateComponent(ResultsPerPage);
 
 
/***/ }),
/* 826 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
__webpack_require__(1517);
var _ = __webpack_require__(1);
var PreferencesPanelEvents_1 = __webpack_require__(112);
var GlobalExports_1 = __webpack_require__(10);
var Assert_1 = __webpack_require__(12);
var Defer_1 = __webpack_require__(31);
var ComponentOptionsModel_1 = __webpack_require__(55);
var Strings_1 = __webpack_require__(4);
var Dom_1 = __webpack_require__(0);
var StorageUtils_1 = __webpack_require__(499);
var AnalyticsActionListMeta_1 = __webpack_require__(7);
var Component_1 = __webpack_require__(6);
var ComponentOptions_1 = __webpack_require__(13);
var Initialization_1 = __webpack_require__(8);
var Checkbox_1 = __webpack_require__(98);
var FormGroup_1 = __webpack_require__(270);
var RadioButton_1 = __webpack_require__(142);
/**
 * The ResultsPreferences component allows the end user to select preferences related to the search results. These
 * preferences are then saved in the local storage of the end user.
 *
 * This component is normally accessible through the {@link Settings} menu. Its usual location in the DOM is inside the
 * {@link PreferencesPanel} component.
 *
 * See also the {@link ResultsFiltersPreferences} component.
 */
var ResultsPreferences = /** @class */ (function (_super) {
    __extends(ResultsPreferences, _super);
    /**
     * Creates a new ResultsPreference component.
     * @param element The HTMLElement on which to instantiate the component.
     * @param options The options for the ResultsPreferences component.
     * @param bindings The bindings that the component requires to function normally. If not set, these will be
     * automatically resolved (with a slower execution time).
     */
    function ResultsPreferences(element, options, bindings) {
        var _this = _super.call(this, element, ResultsPreferences.ID, bindings) || this;
        _this.element = element;
        _this.options = options;
        _this.bindings = bindings;
        _this.preferencePanelCheckboxInputs = {};
        _this.preferencePanelRadioInputs = {};
        _this.options = ComponentOptions_1.ComponentOptions.initComponentOptions(element, ResultsPreferences, options);
        _this.preferencesPanel = Dom_1.$$(_this.element).closest(Component_1.Component.computeCssClassNameForType('PreferencesPanel'));
        _this.preferencePanelLocalStorage = new StorageUtils_1.StorageUtils(ResultsPreferences.ID);
        Assert_1.Assert.exists(_this.componentOptionsModel);
        Assert_1.Assert.exists(_this.preferencesPanel);
        _this.preferences = _this.preferencePanelLocalStorage.load() || {};
        _this.adjustPreferencesToComponentConfig();
        ComponentOptions_1.ComponentOptions.initComponentOptions(_this.element, ResultsPreferences, _this.options);
        _this.updateComponentOptionsModel();
        _this.bind.on(_this.preferencesPanel, PreferencesPanelEvents_1.PreferencesPanelEvents.savePreferences, function () { return _this.save(); });
        _this.bind.on(_this.preferencesPanel, PreferencesPanelEvents_1.PreferencesPanelEvents.exitPreferencesWithoutSave, function () { return _this.exitWithoutSave(); });
        _this.buildCheckboxesInput();
        _this.buildRadiosInput();
        return _this;
    }
    /**
     * Saves the current state of the ResultsPreferences component in the local storage.
     */
    ResultsPreferences.prototype.save = function () {
        this.fromInputToPreferences();
        this.logger.info('Saving preferences', this.preferences);
        this.preferencePanelLocalStorage.save(this.preferences);
        this.updateComponentOptionsModel();
    };
    ResultsPreferences.prototype.exitWithoutSave = function () {
        this.fromPreferencesToCheckboxInput();
    };
    ResultsPreferences.prototype.updateComponentOptionsModel = function () {
        var resultLinkOption = _.pick(this.preferences, 'openInOutlook', 'alwaysOpenInNewWindow');
        var searchBoxOption = _.pick(this.preferences, 'enableQuerySyntax');
        this.componentOptionsModel.set(ComponentOptionsModel_1.ComponentOptionsModel.attributesEnum.resultLink, resultLinkOption);
        this.componentOptionsModel.set(ComponentOptionsModel_1.ComponentOptionsModel.attributesEnum.searchBox, searchBoxOption);
    };
    ResultsPreferences.prototype.buildRadiosInput = function () {
        var _this = this;
        if (this.options.enableQuerySyntax) {
            var createRadioButton_1 = function (label) {
                var radio = new RadioButton_1.RadioButton(function (radioButtonInstance) {
                    _this.fromPreferenceChangeEventToUsageAnalyticsLog(radioButtonInstance.isSelected() ? 'selected' : 'unselected', label);
                    _this.save();
                    _this.queryController.executeQuery({
                        closeModalBox: false
                    });
                }, label, 'coveo-results-preferences-query-syntax');
                return radio;
            };
            var translatedLabels = _.map(['On', 'Off', 'Automatic'], function (label) { return Strings_1.l(label); });
            var radios = _.map(translatedLabels, function (label) {
                var radio = createRadioButton_1(label);
                _this.preferencePanelRadioInputs[label] = radio;
                return radio;
            });
            var formGroup = new FormGroup_1.FormGroup(radios, Strings_1.l('EnableQuerySyntax'));
            Dom_1.$$(this.element).append(formGroup.build());
            this.fromPreferencesToRadioInput();
        }
    };
    ResultsPreferences.prototype.buildCheckboxesInput = function () {
        var _this = this;
        var createCheckbox = function (label) {
            var checkbox = new Checkbox_1.Checkbox(function (checkboxInstance) {
                _this.fromPreferenceChangeEventToUsageAnalyticsLog(checkboxInstance.isSelected() ? 'selected' : 'unselected', label);
                _this.save();
                _this.queryController.executeQuery({
                    closeModalBox: false
                });
            }, label);
            _this.preferencePanelCheckboxInputs[label] = checkbox;
            return checkbox;
        };
        var checkboxes = [];
        if (this.options.enableOpenInOutlook) {
            checkboxes.push(createCheckbox(Strings_1.l('OpenInOutlookWhenPossible')));
        }
        if (this.options.enableOpenInNewWindow) {
            checkboxes.push(createCheckbox(Strings_1.l('AlwaysOpenInNewWindow')));
        }
        this.element.appendChild(new FormGroup_1.FormGroup(checkboxes, Strings_1.l('ResultLinks')).build());
        this.fromPreferencesToCheckboxInput();
    };
    ResultsPreferences.prototype.fromInputToPreferences = function () {
        var _this = this;
        this.preferences = this.preferences || {
            openInOutlook: false,
            alwaysOpenInNewWindow: false,
            enableQuerySyntax: undefined
        };
        _.each(this.preferencePanelCheckboxInputs, function (checkbox, label) {
            if (label == Strings_1.l('OpenInOutlookWhenPossible')) {
                Iif (_this.isSelected(Strings_1.l('OpenInOutlookWhenPossible'), label, checkbox)) {
                    _this.preferences.openInOutlook = true;
                }
                else Iif (_this.preferences.openInOutlook != null) {
                    _this.preferences.openInOutlook = false;
                }
            }
            if (label == Strings_1.l('AlwaysOpenInNewWindow')) {
                Iif (_this.isSelected(Strings_1.l('AlwaysOpenInNewWindow'), label, checkbox)) {
                    _this.preferences.alwaysOpenInNewWindow = true;
                }
                else Iif (_this.preferences.alwaysOpenInNewWindow != null) {
                    _this.preferences.alwaysOpenInNewWindow = false;
                }
            }
        });
        _.each(this.preferencePanelRadioInputs, function (radio, label) {
            Iif (_this.isSelected(Strings_1.l('On'), label, radio)) {
                _this.preferences.enableQuerySyntax = true;
            }
            Iif (_this.isSelected(Strings_1.l('Off'), label, radio)) {
                _this.preferences.enableQuerySyntax = false;
            }
            if (_this.isSelected(Strings_1.l('Automatic'), label, radio)) {
                delete _this.preferences.enableQuerySyntax;
            }
        });
    };
    ResultsPreferences.prototype.fromPreferencesToCheckboxInput = function () {
        Iif (this.preferences.openInOutlook) {
            this.preferencePanelCheckboxInputs[Strings_1.l('OpenInOutlookWhenPossible')].select(false);
        }
        Iif (this.preferences.alwaysOpenInNewWindow) {
            this.preferencePanelCheckboxInputs[Strings_1.l('AlwaysOpenInNewWindow')].select(false);
        }
    };
    ResultsPreferences.prototype.fromPreferencesToRadioInput = function () {
        Iif (this.preferences.enableQuerySyntax === true) {
            this.preferencePanelRadioInputs[Strings_1.l('On')].select(false);
        }
        else Iif (this.preferences.enableQuerySyntax === false) {
            this.preferencePanelRadioInputs[Strings_1.l('Off')].select(false);
        }
        else {
            this.preferencePanelRadioInputs[Strings_1.l('Automatic')].select(false);
        }
    };
    ResultsPreferences.prototype.fromPreferenceChangeEventToUsageAnalyticsLog = function (type, preference) {
        this.usageAnalytics.logCustomEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.preferencesChange, { preferenceName: preference, preferenceType: type }, this.element);
        this.usageAnalytics.logSearchEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.preferencesChange, {
            preferenceName: preference,
            preferenceType: type
        });
    };
    ResultsPreferences.prototype.adjustPreferencesToComponentConfig = function () {
        var _this = this;
        // This method is used when there are illogical configuration between what's saved in local storage (the preferences)
        // and how the component is configured.
        // This can happen if an admin change the component configuration after end users have already selected a preferences.
        // We need to adapt the saved preferences to what's actually available in the component
        var needToSave = false;
        if (!this.options.enableOpenInNewWindow) {
            delete this.preferences.alwaysOpenInNewWindow;
            needToSave = true;
        }
        if (!this.options.enableOpenInOutlook) {
            delete this.preferences.openInOutlook;
            needToSave = true;
        }
        if (!this.options.enableQuerySyntax) {
            delete this.preferences.enableQuerySyntax;
            needToSave = true;
        }
        Eif (needToSave) {
            Defer_1.Defer.defer(function () {
                _this.save();
            });
        }
    };
    ResultsPreferences.prototype.isSelected = function (checkingFor, label, input) {
        return checkingFor == label && input.isSelected();
    };
    ResultsPreferences.ID = 'ResultsPreferences';
    ResultsPreferences.doExport = function () {
        GlobalExports_1.exportGlobally({
            ResultsPreferences: ResultsPreferences
        });
    };
    /**
     * The options for the component
     * @componentOptions
     */
    ResultsPreferences.options = {
        /**
         * Specifies whether to make the option to open results in Microsoft Outlook available.
         *
         * Default value is `false`
         */
        enableOpenInOutlook: ComponentOptions_1.ComponentOptions.buildBooleanOption({ defaultValue: false }),
        /**
         * Specifies whether to make the option to open results in a new window available.
         *
         * Default value is `true`
         */
        enableOpenInNewWindow: ComponentOptions_1.ComponentOptions.buildBooleanOption({ defaultValue: true }),
        /**
         * Specifies whether to make the option to allow end users to turn query syntax on or off available.
         *
         * If query syntax is enabled, the Coveo Platform tries to interpret special query syntax (e.g.,
         * `@objecttype=message`) when the end user types a query in the [`Querybox`]{@link Querybox} (see
         * [Coveo Query Syntax Reference](https://docs.coveo.com/en/1552/searching-with-coveo/coveo-cloud-query-syntax)). Enabling query
         * syntax also causes the `Querybox` to highlight any query syntax.
         *
         * Selecting **On** for the **Enable query syntax** setting enables query syntax, whereas selecting **Off** disables
         * it. Selecting **Automatic** uses the `Querybox` [`enableQuerySyntax`]{@link Querybox.options.enableQuerySyntax}
         * option value (which is `false` by default).
         *
         * Default value is `false`
         */
        enableQuerySyntax: ComponentOptions_1.ComponentOptions.buildBooleanOption({ defaultValue: false })
    };
    return ResultsPreferences;
}(Component_1.Component));
exports.ResultsPreferences = ResultsPreferences;
Initialization_1.Initialization.registerAutoCreateComponent(ResultsPreferences);
 
 
/***/ }),
/* 827 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
__webpack_require__(1518);
var _ = __webpack_require__(1);
var GlobalExports_1 = __webpack_require__(10);
var Assert_1 = __webpack_require__(12);
var QueryStateModel_1 = __webpack_require__(17);
var Strings_1 = __webpack_require__(4);
var Dom_1 = __webpack_require__(0);
var KeyboardUtils_1 = __webpack_require__(35);
var StringUtils_1 = __webpack_require__(34);
var SVGDom_1 = __webpack_require__(23);
var SVGIcons_1 = __webpack_require__(16);
var Utils_1 = __webpack_require__(5);
var AnalyticsActionListMeta_1 = __webpack_require__(7);
var Component_1 = __webpack_require__(6);
var ComponentOptions_1 = __webpack_require__(13);
var Initialization_1 = __webpack_require__(8);
/**
 * The ResultTagging component lists the current tag field values of its associated result and renders a control that
 * allows the end user to add values to a tag field.
 *
 * This component is a result template component (see [Result Templates](https://docs.coveo.com/en/413/)).
 *
 * **Note:**
 * > The ResultTagging component is not supported with Coveo Cloud V2. To implement the ResultTagging component in Coveo Cloud V1, contact [Coveo Support](https://support.coveo.com/s/).
 *
 * @notSupportedIn salesforcefree
 */
var ResultTagging = /** @class */ (function (_super) {
    __extends(ResultTagging, _super);
    /**
     * Creates a new ResultTagging component.
     * @param element The HTMLElement on which to instantiate the component.
     * @param options The options for the ResultTagging component.
     * @param bindings The bindings that the component requires to function normally. If not set, these will be
     * automatically resolved (with a slower execution time).
     * @param result The result to associate the component with.
     */
    function ResultTagging(element, options, bindings, result) {
        var _this = _super.call(this, element, ResultTagging.ID, bindings) || this;
        _this.element = element;
        _this.options = options;
        _this.result = result;
        _this.options = ComponentOptions_1.ComponentOptions.initComponentOptions(element, ResultTagging, options);
        _this.result = result || _this.resolveResult();
        Assert_1.Assert.exists(_this.componentOptionsModel);
        Assert_1.Assert.exists(_this.result);
        Iif (!_this.options.field) {
            _this.logger.error('You must specify a field to the ResultTagging component');
            return _this;
        }
        var fieldValue = Utils_1.Utils.getFieldValue(_this.result, _this.options.field);
        Eif (fieldValue && Utils_1.Utils.isNonEmptyString(fieldValue)) {
            _this.tags = fieldValue.split(';');
        }
        else if (fieldValue && Utils_1.Utils.isNonEmptyArray(fieldValue)) {
            _this.tags = fieldValue;
        }
        else {
            _this.tags = [];
        }
        _this.tags = _.map(_this.tags, function (t) {
            return t.trim();
        });
        _this.tagZone = Dom_1.$$('div', {
            className: 'coveo-result-tagging-tag-zone'
        }).el;
        element.appendChild(_this.tagZone);
        element.appendChild(_this.buildTagIcon());
        _this.autoCompleteZone = Dom_1.$$('div', {
            className: 'coveo-result-tagging-auto-complete-zone'
        }).el;
        element.appendChild(_this.autoCompleteZone);
        _this.autoCompleteZone.appendChild(_this.buildTextBox());
        _this.autoCompleteZone.appendChild(_this.buildAddIcon());
        _this.autoCompleteZone.appendChild(_this.buildClearIcon());
        _this.buildExistingTags();
        return _this;
    }
    ResultTagging.prototype.buildExistingTags = function () {
        var _this = this;
        Eif (this.tags) {
            _.each(this.tags, function (tag) {
                _this.tagZone.appendChild(_this.buildTagValue(tag));
            });
        }
    };
    ResultTagging.prototype.buildTagIcon = function () {
        var _this = this;
        var tagZone = Dom_1.$$('div', {
            className: 'coveo-result-tagging-add-tag'
        });
        var tagTextBox = Dom_1.$$('span', {
            className: 'coveo-result-tagging-add-tag-text'
        });
        tagTextBox.text(Strings_1.l('EnterTag'));
        var tagIcon = Dom_1.$$('span', {
            className: 'coveo-result-tagging-add-tag-icon'
        });
        tagIcon.on('click', function () {
            _.defer(function () {
                _this.focusOnTextBox();
            }, 20);
        });
        tagZone.el.appendChild(tagIcon.el);
        tagZone.append(tagTextBox.el);
        tagZone.setAttribute('title', Strings_1.l('EnterTag'));
        return tagZone.el;
    };
    ResultTagging.prototype.focusOnTextBox = function () {
        this.textBox.focus();
    };
    ResultTagging.prototype.buildTagValue = function (tagValue) {
        var _this = this;
        var tag = Dom_1.$$('div', {
            className: 'coveo-result-tagging-coveo-tag'
        });
        tag.el.appendChild(this.buildShortenedTagWithTitle(tagValue));
        var deleteIcon = Dom_1.$$('span', {
            className: 'coveo-result-tagging-delete-icon'
        }, SVGIcons_1.SVGIcons.icons.delete);
        SVGDom_1.SVGDom.addClassToSVGInContainer(deleteIcon.el, 'coveo-result-tagging-delete-icon-svg');
        tag.el.appendChild(deleteIcon.el);
        deleteIcon.on('click', function () {
            _this.doRemoveTag(tag.el, tagValue.toLowerCase());
        });
        return tag.el;
    };
    ResultTagging.prototype.buildShortenedTagWithTitle = function (tagValue) {
        var shortenedTag = StringUtils_1.StringUtils.removeMiddle(tagValue, 16, '...');
        var clickableValue = Dom_1.$$('a', {
            title: tagValue,
            href: 'javascript:void(0);'
        });
        clickableValue.text(shortenedTag);
        this.bindFacetEventOnValue(clickableValue.el, tagValue);
        return clickableValue.el;
    };
    ResultTagging.prototype.buildTextBox = function () {
        var _this = this;
        this.textBox = Dom_1.$$('input', {
            type: 'text',
            className: 'coveo-add-tag-textbox',
            placeholder: Strings_1.l('EnterTag')
        }).el;
        this.autoCompletePopup = Dom_1.$$('div', {
            className: ResultTagging.autoCompleteClass
        }).el;
        this.autoCompleteZone.appendChild(this.autoCompletePopup);
        this.manageAutocompleteAutoHide();
        Dom_1.$$(this.textBox).on('keyup', function (e) {
            if (e.keyCode == KeyboardUtils_1.KEYBOARD.UP_ARROW || e.keyCode == KeyboardUtils_1.KEYBOARD.DOWN_ARROW || e.keyCode == KeyboardUtils_1.KEYBOARD.ENTER) {
                _this.manageUpDownEnter(e.keyCode);
            }
            else if (!KeyboardUtils_1.KeyboardUtils.isArrowKeyPushed(e.keyCode)) {
                _this.populateSuggestions();
            }
            Dom_1.$$(_this.element).removeClass('coveo-error');
        });
        Dom_1.$$(this.textBox).on('click', function () {
            _this.populateSuggestions();
        });
        return this.textBox;
    };
    ResultTagging.prototype.buildAddIcon = function () {
        var _this = this;
        var icon = Dom_1.$$('div', {
            className: 'coveo-result-tagging-add-tag-tick-icon'
        }, SVGIcons_1.SVGIcons.icons.taggingOk);
        SVGDom_1.SVGDom.addClassToSVGInContainer(icon.el, 'coveo-result-tagging-add-tag-tick-icon-svg');
        var clickable = Dom_1.$$('span');
        clickable.on('click', function () {
            _this.doAddTag();
        });
        icon.el.appendChild(clickable.el);
        return icon.el;
    };
    ResultTagging.prototype.buildClearIcon = function () {
        var _this = this;
        var icon = Dom_1.$$('div', {
            className: 'coveo-result-tagging-clear-icon'
        }, SVGIcons_1.SVGIcons.icons.clear);
        SVGDom_1.SVGDom.addClassToSVGInContainer(icon.el, 'coveo-result-tagging-clear-icon-svg');
        var clickable = Dom_1.$$('span');
        clickable.on('click', function () {
            _this.textBox.value = '';
        });
        icon.el.appendChild(clickable.el);
        return icon.el;
    };
    ResultTagging.prototype.bindFacetEventOnValue = function (element, value) {
        var _this = this;
        var facetAttributeName = QueryStateModel_1.QueryStateModel.getFacetId(this.options.field);
        var facetModel = this.queryStateModel.get(facetAttributeName);
        var facets = this.componentStateModel.get(facetAttributeName);
        var atLeastOneFacetIsEnabled = _.filter(facets, function (value) { return !value.disabled; }).length > 0;
        Iif (facetModel != null && atLeastOneFacetIsEnabled) {
            Dom_1.$$(element).on('click', function () {
                if (_.contains(facetModel, value)) {
                    _this.queryStateModel.set(facetAttributeName, _.without(facetModel, value));
                }
                else {
                    _this.queryStateModel.set(facetAttributeName, _.union(facetModel, [value]));
                }
                _this.queryController.deferExecuteQuery({
                    beforeExecuteQuery: function () {
                        return _this.usageAnalytics.logSearchEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.documentTag, {
                            facetId: _this.options.field,
                            facetField: _this.options.field,
                            facetValue: value
                        });
                    }
                });
            });
            if (_.contains(facetModel, value)) {
                Dom_1.$$(element).addClass('coveo-selected');
            }
            Dom_1.$$(element).addClass('coveo-clickable');
        }
    };
    ResultTagging.prototype.clearPopup = function () {
        Dom_1.$$(this.autoCompletePopup).hide();
        Dom_1.$$(this.autoCompletePopup).empty();
    };
    ResultTagging.prototype.showPopup = function () {
        Dom_1.$$(this.autoCompletePopup).show();
    };
    ResultTagging.prototype.populateSuggestions = function () {
        var _this = this;
        var endpoint = this.queryController.getEndpoint();
        var searchText = this.textBox.value;
        var searchOptions = {
            field: this.options.field,
            ignoreAccents: true,
            sortCriteria: 'occurences',
            maximumNumberOfValues: this.options.suggestBoxSize,
            queryOverride: '@uri',
            pattern: this.buildRegEx(searchText),
            patternType: 'RegularExpression'
        };
        endpoint.listFieldValues(searchOptions).then(function (fieldValues) {
            _this.clearPopup();
            _.each(fieldValues, function (fieldValue) {
                _this.autoCompletePopup.appendChild(_this.buildSelectableValue(fieldValue.lookupValue));
            });
            _this.showPopup();
            _this.autoCompletePopup.style.width = _this.textBox.offsetWidth + ' px';
        });
    };
    ResultTagging.prototype.manageAutocompleteAutoHide = function () {
        var _this = this;
        var timeout;
        Dom_1.$$(this.textBox).on('mouseover', function () {
            clearTimeout(timeout);
        });
        Dom_1.$$(this.autoCompletePopup).on('mouseout', function (e) {
            if (Dom_1.$$(e.target).hasClass(ResultTagging.autoCompleteClass)) {
                timeout = setTimeout(function () {
                    _this.clearPopup();
                }, _this.options.autoCompleteTimer);
            }
        });
        Dom_1.$$(this.autoCompletePopup).on('mouseenter', function () {
            clearTimeout(timeout);
        });
        Dom_1.$$(this.element).on('mouseenter', function () {
            _this.clearPopup();
            Dom_1.$$(_this.element).addClass('coveo-opened');
        });
        Dom_1.$$(Dom_1.$$(this.element).closest('.CoveoResult')).on('mouseleave', function () {
            _this.clearPopup();
            if (_this.textBox.value == '') {
                Dom_1.$$(_this.element).removeClass('coveo-opened');
            }
        });
        Dom_1.$$(Dom_1.$$(this.element).closest('.CoveoResult')).on('focusout', function (e) {
            if (_this.textBox.value != '' && Dom_1.$$(e.target).closest('.CoveoResult') != Dom_1.$$(_this.element).closest('.CoveoResult')) {
                Dom_1.$$(_this.element).addClass('coveo-error');
            }
        });
        Dom_1.$$(Dom_1.$$(this.element).closest('.CoveoResult')).on('focusin', function () {
            Dom_1.$$(_this.element).removeClass('coveo-error');
        });
    };
    // Exclude tags that are already on the result (Since we can tag with the same value twice.
    ResultTagging.prototype.buildRegEx = function (searchTerm) {
        var _this = this;
        return '(?=.*' + searchTerm + ')' + _.map(this.tags, function (tag) { return _this.buildTermToExclude(tag); }).join('') + '.*';
    };
    ResultTagging.prototype.buildTermToExclude = function (term) {
        return '(?!^' + term + '$)';
    };
    ResultTagging.prototype.manageUpDownEnter = function (code) {
        var selectableArray = Dom_1.$$(this.element).findAll('.coveo-selectable');
        if (code == KeyboardUtils_1.KEYBOARD.ENTER) {
            this.doAddTag();
            return;
        }
        if (selectableArray.length > 0) {
            var newIndex = this.computeNextIndex(code, selectableArray);
            newIndex = Math.max(0, newIndex);
            newIndex = Math.min(selectableArray.length - 1, newIndex);
            var selected = Dom_1.$$(selectableArray[newIndex]);
            selected.addClass('coveo-selected');
            this.textBox.value = selected.text();
        }
    };
    ResultTagging.prototype.computeNextIndex = function (code, selectableArray) {
        var nextIndex = 0;
        _.each(selectableArray, function (selectable, index) {
            if (Dom_1.$$(selectable).hasClass('coveo-selected')) {
                if (code == KeyboardUtils_1.KEYBOARD.UP_ARROW) {
                    nextIndex = index - 1;
                }
                else if (code == KeyboardUtils_1.KEYBOARD.DOWN_ARROW) {
                    nextIndex = index + 1;
                }
                Dom_1.$$(selectable).removeClass('coveo-selected');
            }
        });
        return nextIndex;
    };
    ResultTagging.prototype.buildSelectableValue = function (lookupValue) {
        var _this = this;
        var line = Dom_1.$$('div', {
            className: 'coveo-selectable'
        });
        line.el.appendChild(this.buildShortenedTagWithTitle(lookupValue));
        line.on('click', function () {
            _this.doAddTagWithValue(lookupValue);
        });
        return line.el;
    };
    ResultTagging.prototype.doRemoveTag = function (element, tagValue) {
        var _this = this;
        var request = {
            fieldName: this.options.field,
            fieldValue: tagValue,
            doAdd: false,
            uniqueId: this.result.uniqueId
        };
        this.queryController
            .getEndpoint()
            .tagDocument(request)
            .then(function () {
            _this.tags.splice(_.indexOf(_this.tags, tagValue), 1);
            Dom_1.$$(element).detach();
        });
    };
    ResultTagging.prototype.doAddTagWithValue = function (tagValue) {
        var _this = this;
        _.each(tagValue.split(','), function (tag) {
            _this.doAddSingleTagValue(tag);
        });
    };
    ResultTagging.prototype.doAddSingleTagValue = function (tagValue) {
        var _this = this;
        this.clearPopup();
        if (_.indexOf(this.tags, tagValue) > -1) {
            Dom_1.$$(this.element).addClass('coveo-error');
            return;
        }
        this.tags.push(tagValue);
        var request = {
            fieldName: this.options.field,
            fieldValue: tagValue,
            doAdd: true,
            uniqueId: this.result.uniqueId
        };
        this.queryController
            .getEndpoint()
            .tagDocument(request)
            .then(function () {
            _this.tagZone.appendChild(_this.buildTagValue(tagValue));
            _this.textBox.value = '';
            Dom_1.$$(_this.element).removeClass('coveo-error');
        })
            .catch(function () {
            // We do this otherwise it's possible to add the same tag while we wait for the server's response
            _this.tags = _.without(_this.tags, _.findWhere(_this.tags, tagValue));
        });
    };
    ResultTagging.prototype.doAddTag = function () {
        var tagValue = Utils_1.Utils.trim(this.textBox.value.toLowerCase());
        this.doAddTagWithValue(tagValue);
    };
    ResultTagging.ID = 'ResultTagging';
    ResultTagging.autoCompleteClass = 'coveo-result-tagging-auto-complete';
    ResultTagging.doExport = function () {
        GlobalExports_1.exportGlobally({
            ResultTagging: ResultTagging
        });
    };
    /**
     * @componentOptions
     */
    ResultTagging.options = {
        /**
         * Specifies the tag field that the component will use.
         *
         * Specifying a value for this options is necessary for this component to work.
         */
        field: ComponentOptions_1.ComponentOptions.buildFieldOption({
            match: function (field) { return field.type == 'Tag'; },
            required: true
        }),
        /**
         * Specifies the number of items to show in the list of suggested items.
         *
         * Default value is `5`. Minimum value is `0 `.
         */
        suggestBoxSize: ComponentOptions_1.ComponentOptions.buildNumberOption({ defaultValue: 5, min: 0 }),
        /**
         * Specifies how much time (in milliseconds) it takes for the list of suggested items to disappear when it loses
         * focus.
         *
         * Default value is `2000`. Minimum value is `0`.
         */
        autoCompleteTimer: ComponentOptions_1.ComponentOptions.buildNumberOption({ defaultValue: 2000, min: 0 })
    };
    ResultTagging.AUTO_COMPLETE_CLASS = 'coveo-result-tagging-auto-complete';
    return ResultTagging;
}(Component_1.Component));
exports.ResultTagging = ResultTagging;
Initialization_1.Initialization.registerAutoCreateComponent(ResultTagging);
 
 
/***/ }),
/* 828 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        Iif (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            Iif (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
            Iif (y = 0, t) op = [0, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    Iif (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    Iif (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        Iif (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
Object.defineProperty(exports, "__esModule", { value: true });
var _ = __webpack_require__(1);
var QueryEvents_1 = __webpack_require__(14);
var SearchAlertEvents_1 = __webpack_require__(86);
var SettingsEvents_1 = __webpack_require__(66);
var ExternalModulesShim_1 = __webpack_require__(39);
var GlobalExports_1 = __webpack_require__(10);
var Assert_1 = __webpack_require__(12);
var Subscription_1 = __webpack_require__(261);
var Strings_1 = __webpack_require__(4);
var Dom_1 = __webpack_require__(0);
var SVGIcons_1 = __webpack_require__(16);
var AnalyticsActionListMeta_1 = __webpack_require__(7);
var Component_1 = __webpack_require__(6);
var ComponentOptions_1 = __webpack_require__(13);
var Initialization_1 = __webpack_require__(8);
var RegisteredNamedMethods_1 = __webpack_require__(38);
var Dropdown_1 = __webpack_require__(92);
var SearchInterface_1 = __webpack_require__(25);
var SearchAlertsMessage_1 = __webpack_require__(829);
/**
 * The Search Alerts component renders items in the {@link Settings} menu that allow the end user to follow queries
 * and to manage search alerts. A user following a query receives email notifications when the query results change.
 *
 * **Note:**
 * > It is necessary to meet certain requirements to be able to use this component (see
 * > [Deploying Search Alerts on a Coveo JS Search Page](https://docs.coveo.com/en/1932/)).
 *
 * See also the {@link FollowItem} component.
 */
var SearchAlerts = /** @class */ (function (_super) {
    __extends(SearchAlerts, _super);
    /**
     * Creates a new SearchAlerts component.
     * @param element The HTMLElement on which to instantiate the component.
     * @param options The options for the SearchAlerts component.
     * @param bindings The bindings that the component requires to function normally. If not set, these will be
     * automatically resolved (with a slower execution time).
     */
    function SearchAlerts(element, options, bindings, ModalBox) {
        Iif (ModalBox === void 0) { ModalBox = ExternalModulesShim_1.ModalBox; }
        var _this = _super.call(this, element, SearchAlerts.ID, bindings) || this;
        _this.element = element;
        _this.options = options;
        _this.ModalBox = ModalBox;
        _this.options = ComponentOptions_1.ComponentOptions.initComponentOptions(element, SearchAlerts, options);
        if (_this.options.enableMessage) {
            _this.message = new SearchAlertsMessage_1.SearchAlertsMessage(element, { closeDelay: _this.options.messageCloseDelay }, _this.getBindings());
        }
        if (!_this.queryController.getEndpoint().options.isGuestUser) {
            _this.bind.onRootElement(SettingsEvents_1.SettingsEvents.settingsPopulateMenu, function (args) {
                if (_this.options.enableManagePanel) {
                    args.menuData.push({
                        text: Strings_1.l('SearchAlerts_Panel'),
                        className: 'coveo-subscriptions-panel',
                        onOpen: function () { return _this.openPanel(); },
                        onClose: function () { return _this.close(); },
                        svgIcon: SVGIcons_1.SVGIcons.icons.dropdownFollowQuery,
                        svgIconClassName: 'coveo-subscriptions-panel-svg'
                    });
                }
            });
        }
        else {
            _this.logger.warn('Logged in as guest user, search alerts are therefore not available.');
        }
        var once = false;
        _this.bind.onRootElement(QueryEvents_1.QueryEvents.querySuccess, function () {
            Eif (!once) {
                once = true;
                _this.queryController
                    .getEndpoint()
                    .listSubscriptions()
                    .then(function () {
                    _this.bind.onRootElement(SettingsEvents_1.SettingsEvents.settingsPopulateMenu, function (args) {
                        Eif (_this.options.enableFollowQuery) {
                            args.menuData.push({
                                text: Strings_1.l('SearchAlerts_followQuery'),
                                className: 'coveo-follow-query',
                                tooltip: Strings_1.l('FollowQueryDescription'),
                                onOpen: function () { return _this.followQuery(); },
                                onClose: function () { },
                                svgIcon: SVGIcons_1.SVGIcons.icons.dropdownFollowQuery,
                                svgIconClassName: 'coveo-follow-query-svg'
                            });
                        }
                    });
                })
                    .catch(function (e) {
                    // Trap 403 error, as the listSubscription call is called on every page initialization
                    // to check for current subscriptions. By default, the search alert service is not enabled for most organization
                    // Don't want to pollute the console with un-needed noise and confusion
                    Eif (e.status != 403) {
                        throw e;
                    }
                });
            }
        });
        return _this;
    }
    /**
     * Follows the last query. The user will start receiving email notifications when the query results change.
     *
     * Also logs the `searchAlertsFollowQuery` event in the usage analytics with the name of the request as meta data.
     */
    SearchAlerts.prototype.followQuery = function () {
        var _this = this;
        var queryBuilder = this.queryController.createQueryBuilder({});
        var request = this.buildFollowQueryRequest(queryBuilder.build(), this.options);
        this.usageAnalytics.logCustomEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.searchAlertsFollowQuery, {
            subscription: request.name
        }, this.element);
        this.queryController
            .getEndpoint()
            .follow(request)
            .then(function (subscription) {
            if (subscription) {
                var eventArgs = {
                    subscription: subscription,
                    dom: _this.findQueryBoxDom()
                };
                Dom_1.$$(_this.root).trigger(SearchAlertEvents_1.SearchAlertsEvents.searchAlertsCreated, eventArgs);
            }
            else {
                _this.triggerSearchAlertsFail();
            }
        })
            .catch(function () {
            _this.triggerSearchAlertsFail();
        });
    };
    /**
     * Opens the **Manage Alerts** panel. This panel allows the end user to stop following queries or items. It also
     * allows the end user to specify email notification frequency for each followed query or item.
     */
    SearchAlerts.prototype.openPanel = function () {
        return __awaiter(this, void 0, void 0, function () {
            var _this = this;
            var title, titleInfo, container, table, tableHead, rowHead, headerType, headerContent, headerFrequency, headerActions, tableBodySpacer, tableBodySubscriptions, sizeModForModalBox, subscriptions, e_1;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        title = Dom_1.$$('div');
                        titleInfo = Dom_1.$$('div', {
                            className: 'coveo-subscriptions-panel-title'
                        }, Strings_1.l('SearchAlerts_Panel'));
                        title.append(titleInfo.el);
                        container = Dom_1.$$('div');
                        table = Dom_1.$$('table', {
                            className: 'coveo-subscriptions-panel-content',
                            cellspacing: 0
                        });
                        container.append(table.el);
                        tableHead = Dom_1.$$('thead');
                        table.append(tableHead.el);
                        rowHead = Dom_1.$$('tr');
                        tableHead.append(rowHead.el);
                        headerType = Dom_1.$$('th', {
                            className: 'coveo-subscriptions-panel-content-type'
                        }, Strings_1.l('SearchAlerts_Type'));
                        headerContent = Dom_1.$$('th', null, Strings_1.l('SearchAlerts_Content'));
                        headerFrequency = Dom_1.$$('th', null, Strings_1.l('SearchAlerts_Frequency'));
                        headerActions = Dom_1.$$('th', {
                            className: 'coveo-subscriptions-panel-content-actions'
                        }, Strings_1.l('SearchAlerts_Actions'));
                        rowHead.append(headerType.el);
                        rowHead.append(headerContent.el);
                        rowHead.append(headerFrequency.el);
                        rowHead.append(headerActions.el);
                        tableBodySpacer = Dom_1.$$('tbody', {
                            className: 'coveo-subscriptions-panel-spacer'
                        }, Dom_1.$$('tr', null, Dom_1.$$('td', {
                            colsspan: 3
                        })));
                        table.append(tableBodySpacer.el);
                        tableBodySubscriptions = Dom_1.$$('tbody', {
                            className: 'coveo-subscriptions-panel-subscriptions'
                        }, Dom_1.$$('tr', {
                            className: 'coveo-subscriptions-panel-no-subscriptions'
                        }, Dom_1.$$('td', {
                            colspan: 3
                        }, Strings_1.l('SearchAlerts_PanelNoSearchAlerts'))));
                        table.append(tableBodySubscriptions.el);
                        sizeModForModalBox = 'big';
                        _a.label = 1;
                    case 1:
                        _a.trys.push([1, 3, , 4]);
                        return [4 /*yield*/, this.queryController.getEndpoint().listSubscriptions()];
                    case 2:
                        subscriptions = _a.sent();
                        _.each(subscriptions, function (subscription) { return _this.addSearchAlert(subscription, container); });
                        return [3 /*break*/, 4];
                    case 3:
                        e_1 = _a.sent();
                        this.logger.error('Error retrieving subscriptions', e_1);
                        sizeModForModalBox = 'small';
                        container.empty();
                        container.append(this.getFailureMessage().el);
                        return [3 /*break*/, 4];
                    case 4:
                        this.modal = this.ModalBox.open(container.el, {
                            title: title.el.outerHTML,
                            className: 'coveo-subscriptions-panel',
                            sizeMod: sizeModForModalBox,
                            body: this.searchInterface.options.modalContainer
                        });
                        return [2 /*return*/];
                }
            });
        });
    };
    SearchAlerts.prototype.getFailureMessage = function () {
        return Dom_1.$$('div', {
            className: 'coveo-subscriptions-panel-fail'
        }, Strings_1.l('SearchAlerts_Fail'));
    };
    SearchAlerts.prototype.handleSearchAlertsFail = function () {
        Eif (this.modal != null) {
            var modalBody = Dom_1.$$(this.modal.wrapper).find('.coveo-modal-body');
            Dom_1.$$(modalBody).empty();
            Dom_1.$$(modalBody).append(this.getFailureMessage().el);
        }
    };
    SearchAlerts.prototype.close = function () {
        if (this.modal) {
            this.modal.close();
            this.modal = null;
        }
    };
    SearchAlerts.prototype.addSearchAlert = function (subscription, container) {
        var _this = this;
        var frequencies = [
            { value: 'monthly', label: Strings_1.l('Monthly') },
            { value: 'daily', label: Strings_1.l('Daily') },
            { value: 'monday', label: Strings_1.l('Monday') },
            { value: 'tuesday', label: Strings_1.l('Tuesday') },
            { value: 'wednesday', label: Strings_1.l('Wednesday') },
            { value: 'thursday', label: Strings_1.l('Thursday') },
            { value: 'friday', label: Strings_1.l('Friday') },
            { value: 'saturday', label: Strings_1.l('Saturday') },
            { value: 'sunday', label: Strings_1.l('Sunday') }
        ];
        var context;
        if (subscription.name) {
            Iif (subscription.name == '<empty>') {
                context = '&lt;empty&gt;';
            }
            else {
                var textExtracted = Dom_1.$$('div').el;
                textExtracted.innerHTML = subscription.name;
                context = Dom_1.$$(textExtracted).text();
            }
        }
        else if (subscription.type == Subscription_1.SUBSCRIPTION_TYPE.followQuery) {
            var typeConfig = subscription.typeConfig;
            context = _.escape(typeConfig.query.q) || Strings_1.l('EmptyQuery');
        }
        else {
            var typeConfig = subscription.typeConfig;
            context = _.escape(typeConfig.title || typeConfig.id);
        }
        var row = Dom_1.$$('tr', {
            className: 'coveo-subscriptions-panel-subscription'
        });
        var pluckFrequenciesValues = _.pluck(frequencies, 'value');
        var valueToLabel = function (valueMappedToLabel) { return _.findWhere(frequencies, { value: valueMappedToLabel }).label; };
        var buildDropdown = function () {
            return new Dropdown_1.Dropdown(function (dropdownInstance) {
                _this.usageAnalytics.logCustomEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.searchAlertsUpdateSubscription, {
                    subscription: context,
                    frequency: dropdownInstance.getValue()
                }, _this.element);
                subscription.frequency = dropdownInstance.getValue();
                _this.updateAndSyncSearchAlert(subscription);
            }, pluckFrequenciesValues, valueToLabel).build();
        };
        var contentTypeElement = Dom_1.$$('td', {
            className: 'coveo-subscriptions-panel-content-type'
        }, Strings_1.l('SearchAlerts_Type_' + subscription.type));
        var contextElement = Dom_1.$$('td', {
            className: 'coveo-subscriptions-panel-context',
            title: context
        });
        contextElement.setHtml(context);
        var frequencyElement = Dom_1.$$('td', null, Dom_1.$$('div', {
            className: 'coveo-subscriptions-panel-frequency'
        }, buildDropdown()));
        var contentActionsElement = Dom_1.$$('td', {
            className: 'coveo-subscriptions-panel-content-actions'
        }, null, Dom_1.$$('div', {
            className: 'coveo-subscriptions-panel-action coveo-subscriptions-panel-action-unfollow'
        }, Strings_1.l('SearchAlerts_unFollowing')), Dom_1.$$('div', {
            className: 'coveo-subscriptions-panel-action coveo-subscriptions-panel-action-follow'
        }, Strings_1.l('SearchAlerts_follow')));
        row.append(contentTypeElement.el);
        row.append(contextElement.el);
        row.append(frequencyElement.el);
        row.append(contentActionsElement.el);
        var noSearchAlerts = container.find('.coveo-subscriptions-panel-no-subscriptions');
        row.insertBefore(noSearchAlerts);
        var frequencyInput = frequencyElement.find('select');
        frequencyInput.value = subscription.frequency;
        Dom_1.$$(row.find('.coveo-subscriptions-panel-action-unfollow')).on('click', function () {
            row.addClass('coveo-subscription-unfollowed');
            _this.queryController
                .getEndpoint()
                .deleteSubscription(subscription)
                .then(function () {
                Eif (subscription.type == Subscription_1.SUBSCRIPTION_TYPE.followDocument) {
                    _this.logAnalyticsEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.searchAlertsUnfollowDocument, subscription);
                }
                else if (subscription.type == Subscription_1.SUBSCRIPTION_TYPE.followQuery) {
                    _this.logAnalyticsEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.searchAlertsUnfollowQuery, subscription);
                }
                delete subscription.id;
                var eventArgs = { subscription: subscription };
                Dom_1.$$(_this.root).trigger(SearchAlertEvents_1.SearchAlertsEvents.searchAlertsDeleted, eventArgs);
            })
                .catch(function () {
                _this.handleSearchAlertsFail();
            });
        });
        Dom_1.$$(row.find('.coveo-subscriptions-panel-action-follow')).on('click', function () {
            row.removeClass('coveo-subscription-unfollowed');
            _this.queryController
                .getEndpoint()
                .follow(subscription)
                .then(function (updatedSearchAlert) {
                Eif (subscription.type == Subscription_1.SUBSCRIPTION_TYPE.followDocument) {
                    _this.logAnalyticsEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.searchAlertsFollowDocument, subscription);
                }
                else if (subscription.type == Subscription_1.SUBSCRIPTION_TYPE.followQuery) {
                    _this.logAnalyticsEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.searchAlertsFollowQuery, subscription);
                }
                subscription.id = updatedSearchAlert.id;
                var eventArgs = { subscription: subscription };
                Dom_1.$$(_this.root).trigger(SearchAlertEvents_1.SearchAlertsEvents.searchAlertsCreated, eventArgs);
            })
                .catch(function () {
                _this.handleSearchAlertsFail();
            });
        });
    };
    SearchAlerts.prototype.updateAndSyncSearchAlert = function (subscription) {
        var _this = this;
        this.queryController
            .getEndpoint()
            .updateSubscription(subscription)
            .then(function (updated) { return _.extend(subscription, updated); })
            .catch(function () {
            _this.handleSearchAlertsFail();
        });
    };
    SearchAlerts.prototype.triggerSearchAlertsFail = function () {
        var eventArgs = {
            dom: this.findQueryBoxDom()
        };
        Dom_1.$$(this.root).trigger(SearchAlertEvents_1.SearchAlertsEvents.searchAlertsFail, eventArgs);
    };
    SearchAlerts.prototype.findQueryBoxDom = function () {
        var dom;
        var components = this.searchInterface.getComponents('Querybox');
        Iif (components && components.length > 0) {
            dom = _.first(components).element;
        }
        else {
            var components_1 = this.searchInterface.getComponents('Omnibox');
            Iif (components_1 && components_1.length > 0) {
                dom = _.first(components_1).element;
            }
        }
        return dom;
    };
    SearchAlerts.prototype.buildFollowQueryRequest = function (query, options) {
        var typeConfig = {
            query: query
        };
        Iif (options.modifiedDateField) {
            typeConfig.modifiedDateField = options.modifiedDateField;
        }
        return {
            type: Subscription_1.SUBSCRIPTION_TYPE.followQuery,
            typeConfig: typeConfig,
            name: this.message.getFollowQueryMessage(query.q)
        };
    };
    SearchAlerts.prototype.logAnalyticsEvent = function (cause, subscription) {
        this.usageAnalytics.logCustomEvent(cause, {
            subscription: subscription.name
        }, this.element);
    };
    SearchAlerts.create = function (element, options, root) {
        Assert_1.Assert.exists(element);
        return new SearchAlerts(element, options, RegisteredNamedMethods_1.get(root, SearchInterface_1.SearchInterface).getBindings());
    };
    SearchAlerts.ID = 'SearchAlerts';
    SearchAlerts.doExport = function () {
        GlobalExports_1.exportGlobally({
            SearchAlerts: SearchAlerts,
            SearchAlertsMessage: SearchAlertsMessage_1.SearchAlertsMessage
        });
    };
    /**
     * The options for the search alerts
     * @componentOptions
     */
    SearchAlerts.options = {
        /**
         * Specifies whether to add the **Manage Alerts** item in the {@link Settings} menu to allow the end user to manage
         * search alerts.
         *
         * Clicking the **Manage Alerts** item calls the {@link SearchAlerts.openPanel} method.
         *
         * Default value is `true`.
         */
        enableManagePanel: ComponentOptions_1.ComponentOptions.buildBooleanOption({ defaultValue: true }),
        /**
         * Specifies whether to add the **Follow Query** item in the {@link Settings} menu to allow the end user to follow
         * the last query.
         *
         * Clicking the **Follow Query** item calls the {@link SearchAlerts.followQuery} method.
         *
         * Default value is `true`.
         */
        enableFollowQuery: ComponentOptions_1.ComponentOptions.buildBooleanOption({ defaultValue: true }),
        /**
         * Specifies which field to use to represent the modification date when sending the
         * {@link ISubscriptionQueryRequest}.
         *
         * Default value is `undefined`.
         */
        modifiedDateField: ComponentOptions_1.ComponentOptions.buildFieldOption(),
        /**
         * Specifies whether to display info and error messages when performing search alerts actions.
         *
         * If this options is `true`, the SearchAlerts constructor will automatically instantiate a
         * {@link SearchAlertsMessage} component and set it to the {@link SearchAlerts.message} attribute.
         *
         * See also {@link SearchAlerts.options.messageCloseDelay}.
         *
         * Default value is `true`.
         */
        enableMessage: ComponentOptions_1.ComponentOptions.buildBooleanOption({ defaultValue: true }),
        /**
         * If {@link SearchAlerts.options.enableMessage} is `true`, specifies how long to display the search alert messages
         * (in milliseconds).
         *
         * Default value is `2000`. Minimum value is `0`.
         */
        messageCloseDelay: ComponentOptions_1.ComponentOptions.buildNumberOption({ defaultValue: 2000, min: 0, depend: 'enableMessage' })
    };
    return SearchAlerts;
}(Component_1.Component));
exports.SearchAlerts = SearchAlerts;
Initialization_1.Initialization.registerAutoCreateComponent(SearchAlerts);
 
 
/***/ }),
/* 829 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
var Component_1 = __webpack_require__(6);
var ComponentOptions_1 = __webpack_require__(13);
var SearchAlertEvents_1 = __webpack_require__(86);
var QueryEvents_1 = __webpack_require__(14);
var Subscription_1 = __webpack_require__(261);
var PopupUtils_1 = __webpack_require__(227);
var Strings_1 = __webpack_require__(4);
var Dom_1 = __webpack_require__(0);
var _ = __webpack_require__(1);
var SVGIcons_1 = __webpack_require__(16);
var SVGDom_1 = __webpack_require__(23);
/**
 * The SearchAlertsMessage component allows the {@link SearchAlerts} component to display messages.
 *
 * You should not include this component in your page. Instead, use a {@link SearchAlerts} component, and access the
 * {@link SearchAlerts.message} attribute.
 */
var SearchAlertsMessage = /** @class */ (function (_super) {
    __extends(SearchAlertsMessage, _super);
    /**
     * Creates a new SearchAlertsMessage component
     * @param element The HTMLElement on which to instantiate the component.
     * @param options The options for the SearchAlertsMessage component.
     * @param bindings The bindings that the component requires to function normally. If not set, these will be
     * automatically resolved (with a slower execution time).
     */
    function SearchAlertsMessage(element, options, bindings) {
        var _this = _super.call(this, element, SearchAlertsMessage.ID, bindings) || this;
        _this.element = element;
        _this.options = options;
        _this.bindings = bindings;
        _this.bind.onRootElement(SearchAlertEvents_1.SearchAlertsEvents.searchAlertsCreated, function (args) { return _this.handleSubscriptionCreated(args); });
        _this.bind.oneRootElement(SearchAlertEvents_1.SearchAlertsEvents.searchAlertsFail, function (args) { return _this.handleSearchAlertsFail(args); });
        _this.bind.oneRootElement(SearchAlertEvents_1.SearchAlertsEvents.searchAlertsDeleted, function () { return _this.close(); });
        _this.bind.oneRootElement(QueryEvents_1.QueryEvents.newQuery, function () { return _this.close(); });
        return _this;
    }
    SearchAlertsMessage.prototype.getCssClass = function () {
        return 'coveo-subscriptions-messages';
    };
    SearchAlertsMessage.prototype.getFollowQueryMessage = function (query, htmlFormatted) {
        var _this = this;
        if (htmlFormatted === void 0) { htmlFormatted = false; }
        var populateMessageArguments = {
            text: []
        };
        var getAdditionalTextFormatted = function () {
            return _.map(populateMessageArguments.text, function (text) {
                text = _this.formatMessageArgumentsText(text);
                return "" + (htmlFormatted ? '<li>' : '(') + text + (htmlFormatted ? '</li>' : ')');
            }).join(' ');
        };
        Dom_1.$$(this.root).trigger(SearchAlertEvents_1.SearchAlertsEvents.searchAlertsPopulateMessage, populateMessageArguments);
        var additionalMessage = "" + (htmlFormatted ? '<ul>' : '') + getAdditionalTextFormatted() + (htmlFormatted ? '</ul>' : '');
        var automaticallyBuiltMessage;
        if (query && populateMessageArguments.text.length != 0) {
            automaticallyBuiltMessage = _.escape(query) + " " + additionalMessage;
        }
        if (query && populateMessageArguments.text.length == 0) {
            automaticallyBuiltMessage = "" + _.escape(query);
        }
        Iif (!query && populateMessageArguments.text.length != 0) {
            automaticallyBuiltMessage = "" + additionalMessage;
        }
        if (!query && populateMessageArguments.text.length == 0) {
            automaticallyBuiltMessage = htmlFormatted ? Strings_1.l('EmptyQuery') : _.unescape(Strings_1.l('EmptyQuery'));
        }
        return automaticallyBuiltMessage;
    };
    /**
     * Displays a message near the passed dom attribute.
     * @param dom Specifies where to display the message.
     * @param message The message.
     * @param error Specifies whether the message is an error message.
     */
    SearchAlertsMessage.prototype.showMessage = function (dom, message, error) {
        var _this = this;
        this.message = Dom_1.$$('div', {
            className: 'coveo-subscriptions-messages'
        });
        this.message.el.innerHTML = "\n      <div class='coveo-subscriptions-messages-message'>\n        <div class='coveo-subscriptions-messages-content'><span>" + message + "</span></div>\n        <div class='coveo-subscriptions-messages-info-close'>" + SVGIcons_1.SVGIcons.icons.checkboxHookExclusionMore + "</div>\n      </div>";
        this.message.toggleClass('coveo-subscriptions-messages-error', error);
        var closeButton = this.message.find('.coveo-subscriptions-messages-info-close');
        SVGDom_1.SVGDom.addClassToSVGInContainer(closeButton, 'coveo-subscript-messages-info-close-svg');
        Dom_1.$$(closeButton).on('click', function () { return _this.close(); });
        PopupUtils_1.PopupUtils.positionPopup(this.message.el, dom.el, this.root, {
            horizontal: PopupUtils_1.PopupHorizontalAlignment.INNERLEFT,
            vertical: PopupUtils_1.PopupVerticalAlignment.BOTTOM,
            verticalOffset: 12,
            horizontalClip: true
        }, this.root);
        this.startCloseDelay();
        this.message.on('mouseleave', function () {
            _this.startCloseDelay();
        });
        this.message.on('mouseenter', function () {
            _this.stopCloseDelay();
        });
    };
    SearchAlertsMessage.prototype.formatMessageArgumentsText = function (text) {
        Eif (_.isString(text)) {
            text = _.escape(text);
        }
        else if (text.lineThrough) {
            text = '<span style="text-decoration:line-through">' + _.escape(text.value) + '</span>';
        }
        else {
            text = _.escape(text.value);
        }
        return text;
    };
    SearchAlertsMessage.prototype.handleSubscriptionCreated = function (args) {
        this.close();
        if (args.dom != null) {
            Eif (args.subscription.type == Subscription_1.SUBSCRIPTION_TYPE.followQuery) {
                var typeConfig = args.subscription.typeConfig;
                this.showMessage(Dom_1.$$(args.dom), Strings_1.l('SubscriptionsMessageFollowQuery', this.getFollowQueryMessage(typeConfig.query.q, true)), false);
            }
            else {
                this.showMessage(Dom_1.$$(args.dom), Strings_1.l('SubscriptionsMessageFollow'), false);
            }
        }
    };
    SearchAlertsMessage.prototype.handleSearchAlertsFail = function (args) {
        this.close();
        if (args.dom != null) {
            this.showMessage(Dom_1.$$(args.dom), Strings_1.l('SearchAlerts_Fail'), true);
        }
    };
    SearchAlertsMessage.prototype.startCloseDelay = function () {
        var _this = this;
        clearTimeout(this.closeTimeout);
        this.closeTimeout = window.setTimeout(function () {
            _this.close();
        }, this.options.closeDelay);
    };
    SearchAlertsMessage.prototype.stopCloseDelay = function () {
        clearTimeout(this.closeTimeout);
    };
    SearchAlertsMessage.prototype.close = function () {
        Iif (this.message != null) {
            clearTimeout(this.closeTimeout);
            this.message.remove();
            this.message = null;
        }
    };
    SearchAlertsMessage.ID = 'SubscriptionsMessages';
    /**
     * The options for the SearchAlertsMessage component
     * @componentOptions
     */
    SearchAlertsMessage.options = {
        /**
         * Specifies how long to display the search alerts messages (in milliseconds).
         *
         * Default value is `2000`. Minimum value is `0`.
         */
        closeDelay: ComponentOptions_1.ComponentOptions.buildNumberOption({ defaultValue: 2000, min: 0 })
    };
    return SearchAlertsMessage;
}(Component_1.Component));
exports.SearchAlertsMessage = SearchAlertsMessage;
 
 
/***/ }),
/* 830 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
var Component_1 = __webpack_require__(6);
var SettingsEvents_1 = __webpack_require__(66);
var Dom_1 = __webpack_require__(0);
var Strings_1 = __webpack_require__(4);
var Utils_1 = __webpack_require__(5);
var Initialization_1 = __webpack_require__(8);
var GlobalExports_1 = __webpack_require__(10);
var ExternalModulesShim_1 = __webpack_require__(39);
__webpack_require__(1522);
var SVGIcons_1 = __webpack_require__(16);
/**
 * The ShareQuery component populates the {@link Settings} popup menu with the **Share Query** menu item. When the end
 * user clicks this item, it displays a panel containing two input boxes: one containing a shareable link and the other
 * containing the complete current query expression.
 */
var ShareQuery = /** @class */ (function (_super) {
    __extends(ShareQuery, _super);
    /**
     * Creates a new ShareQuery component.
     * @param element The HTMLElement on which to instantiate the component.
     * @param options The options for the ShareQuery component.
     * @param bindings The bindings that the component requires to function normally. If not set, these will be
     * automatically resolved (with a slower execution time).
     */
    function ShareQuery(element, options, bindings, ModalBox) {
        Iif (ModalBox === void 0) { ModalBox = ExternalModulesShim_1.ModalBox; }
        var _this = _super.call(this, element, ShareQuery.ID, bindings) || this;
        _this.element = element;
        _this.options = options;
        _this.ModalBox = ModalBox;
        _this.bind.onRootElement(SettingsEvents_1.SettingsEvents.settingsPopulateMenu, function (args) {
            args.menuData.push({
                className: 'coveo-share-query',
                text: Strings_1.l('ShareQuery'),
                onOpen: function () { return _this.open(); },
                onClose: function () { return _this.close(); },
                svgIcon: SVGIcons_1.SVGIcons.icons.dropdownShareQuery,
                svgIconClassName: 'coveo-share-query-svg'
            });
        });
        return _this;
    }
    /**
     * Open the **Share Query** modal box.
     */
    ShareQuery.prototype.open = function () {
        Eif (this.modalbox == null) {
            this.dialogBoxContent = this.buildContent();
            this.modalbox = this.ModalBox.open(this.dialogBoxContent, {
                title: Strings_1.l('ShareQuery'),
                className: 'coveo-share-query-opened',
                body: this.searchInterface.options.modalContainer
            });
        }
    };
    /**
     * Close the **Share Query** modal box.
     */
    ShareQuery.prototype.close = function () {
        Eif (this.modalbox) {
            this.modalbox.close();
            this.modalbox = null;
        }
    };
    /**
     * Gets the link to the current query.
     */
    ShareQuery.prototype.getLinkToThisQuery = function () {
        Iif (!this.linkToThisQuery) {
            this.buildLinkToThisQuery();
        }
        return this.linkToThisQuery.value;
    };
    /**
     * Sets the link to the current query.
     */
    ShareQuery.prototype.setLinkToThisQuery = function (link) {
        Eif (!this.linkToThisQuery) {
            this.buildLinkToThisQuery();
        }
        this.linkToThisQuery.value = link;
    };
    /**
     * Gets the complete query expression string
     */
    ShareQuery.prototype.getCompleteQuery = function () {
        if (!this.completeQuery) {
            this.buildCompleteQuery();
        }
        return this.completeQuery.value;
    };
    /**
     * Set the complete query expression string.
     */
    ShareQuery.prototype.setCompleteQuery = function (completeQuery) {
        Eif (!this.completeQuery) {
            this.buildCompleteQuery();
        }
        this.completeQuery.value = completeQuery;
    };
    ShareQuery.prototype.outputIfNotNull = function (value) {
        if (value) {
            return '(' + value + ')';
        }
        return '';
    };
    ShareQuery.prototype.buildContent = function () {
        var content = Dom_1.$$('div', {
            className: 'coveo-share-query-summary-info'
        }).el;
        var boxes = Dom_1.$$('div', {
            className: 'coveo-share-query-summary-info-boxes'
        }).el;
        this.buildLinkToThisQuery();
        this.buildCompleteQuery();
        boxes.appendChild(this.buildTextBoxWithLabel(Strings_1.l('Link'), this.linkToThisQuery));
        boxes.appendChild(this.buildTextBoxWithLabel(Strings_1.l('CompleteQuery'), this.completeQuery));
        content.appendChild(boxes);
        Component_1.Component.pointElementsToDummyForm(content);
        return content;
    };
    ShareQuery.prototype.buildCompleteQuery = function () {
        this.completeQuery = Dom_1.$$('input', {
            type: 'text',
            className: 'coveo-share-query-summary-info-input'
        }).el;
        var lastQuery = this.queryController.getLastQuery();
        this.completeQuery.value = Utils_1.Utils.trim(this.outputIfNotNull(lastQuery.q) + " " + this.outputIfNotNull(lastQuery.aq) + " " + this.outputIfNotNull(lastQuery.cq));
    };
    ShareQuery.prototype.buildLinkToThisQuery = function () {
        var _this = this;
        this.linkToThisQuery = Dom_1.$$('input', {
            type: 'text',
            className: 'coveo-share-query-summary-info-input'
        }).el;
        Dom_1.$$(this.linkToThisQuery).on('click', function () { return _this.linkToThisQuery.select(); });
        this.linkToThisQuery.value = window.location.href;
    };
    ShareQuery.prototype.buildTextBoxWithLabel = function (label, input) {
        var labelElement = Dom_1.$$('span', {
            className: 'coveo-share-query-summary-info-label'
        });
        labelElement.text(label);
        var returnDiv = Dom_1.$$('div').el;
        returnDiv.appendChild(labelElement.el);
        returnDiv.appendChild(input);
        return returnDiv;
    };
    ShareQuery.ID = 'ShareQuery';
    ShareQuery.options = {};
    ShareQuery.doExport = function () {
        GlobalExports_1.exportGlobally({
            ShareQuery: ShareQuery
        });
    };
    return ShareQuery;
}(Component_1.Component));
exports.ShareQuery = ShareQuery;
Initialization_1.Initialization.registerAutoCreateComponent(ShareQuery);
 
 
/***/ }),
/* 831 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
__webpack_require__(1524);
var Dom_1 = __webpack_require__(0);
var Utils_1 = __webpack_require__(5);
var Strings_1 = __webpack_require__(4);
var Component_1 = __webpack_require__(6);
var SVGIcons_1 = __webpack_require__(16);
var GlobalExports_1 = __webpack_require__(10);
var Initialization_1 = __webpack_require__(8);
var ComponentOptions_1 = __webpack_require__(13);
var DEFAULT_SCALE = 5;
/**
 * The `StarRating` component renders a five-star rating widget for use in commerce result templates.
 *
 * @isresulttemplatecomponent
 *
 * @availablesince [January 2020 Release (v2.7968)](https://docs.coveo.com/en/3163/)
 */
var StarRating = /** @class */ (function (_super) {
    __extends(StarRating, _super);
    /**
     * Creates a new `StarRating` component.
     * @param element The HTMLElement on which to instantiate the component.
     * @param options The options for the `StarRating` component.
     * @param bindings The bindings that the component requires to function normally.
     */
    function StarRating(element, options, bindings, result) {
        var _this = _super.call(this, element, StarRating.ID) || this;
        _this.element = element;
        _this.options = options;
        _this.bindings = bindings;
        _this.result = result;
        _this.options = ComponentOptions_1.ComponentOptions.initComponentOptions(element, StarRating, options);
        Iif (!result) {
            _this.logger.error('No result passed to Star Rating component.');
            return _this;
        }
        _this.renderComponent();
        return _this;
    }
    Object.defineProperty(StarRating.prototype, "configuredFieldsAreValid", {
        get: function () {
            var rawRating = Utils_1.Utils.getFieldValue(this.result, this.options.ratingField);
            var rawNumberOfRatings = Utils_1.Utils.getFieldValue(this.result, this.options.numberOfRatingsField);
            if (rawNumberOfRatings !== undefined) {
                this.numberOfRatings = Number(rawNumberOfRatings) < 0 ? 0 : Number(rawNumberOfRatings) || 0;
            }
            this.rating = Number(rawRating) < 0 ? 0 : Number(rawRating) || 0;
            var scale = this.options.ratingScale;
            if (scale < this.rating || scale <= 0) {
                this.logger.error("The rating scale property is either missing or invalid.");
                return false;
            }
            this.rating = Math.round(this.rating * (DEFAULT_SCALE / scale));
            return true;
        },
        enumerable: true,
        configurable: true
    });
    StarRating.prototype.renderComponent = function () {
        if (this.configuredFieldsAreValid) {
            this.makeAccessible();
            for (var starNumber = 1; starNumber <= DEFAULT_SCALE; starNumber++) {
                this.renderStar(starNumber <= this.rating);
            }
            if (this.numberOfRatings !== undefined) {
                this.renderNumberOfReviews(this.numberOfRatings);
            }
        }
    };
    StarRating.prototype.makeAccessible = function () {
        this.setDefaultTabIndex();
        this.element.setAttribute('aria-label', this.getAriaLabel());
    };
    StarRating.prototype.setDefaultTabIndex = function () {
        Eif (Utils_1.Utils.isNullOrUndefined(this.element.getAttribute('tabindex'))) {
            this.element.tabIndex = 0;
        }
    };
    StarRating.prototype.getAriaLabel = function () {
        var numberOfRatingsIsKnown = !Utils_1.Utils.isNullOrUndefined(this.numberOfRatings);
        var wasRated = !!this.numberOfRatings;
        if (numberOfRatingsIsKnown && !wasRated) {
            return Strings_1.l('NoRatings');
        }
        var label = Strings_1.l('Rated', this.rating, this.options.ratingScale, this.options.ratingScale);
        if (numberOfRatingsIsKnown) {
            return label + ' ' + Strings_1.l('RatedBy', this.numberOfRatings, this.numberOfRatings);
        }
        return label;
    };
    StarRating.prototype.renderStar = function (isChecked) {
        var star = Dom_1.$$('span', { className: 'coveo-star-rating-star' }, SVGIcons_1.SVGIcons.icons.star);
        star.toggleClass('coveo-star-rating-star-active', isChecked);
        this.element.appendChild(star.el);
    };
    StarRating.prototype.renderNumberOfReviews = function (value) {
        var numberString = Dom_1.$$('span', { className: 'coveo-star-rating-label' });
        numberString.text(value > 0 ? "(" + value + ")" : Strings_1.l('NoRatings'));
        this.element.appendChild(numberString.el);
    };
    StarRating.ID = 'StarRating';
    StarRating.doExport = function () {
        GlobalExports_1.exportGlobally({
            StarRating: StarRating
        });
    };
    /**
     * @componentOptions
     */
    StarRating.options = {
        /**
         * Specifies the rating to be displayed as stars. If the rating is on a different scale than 0-5, a `ratingScale` value must be provided.
         */
        ratingField: ComponentOptions_1.ComponentOptions.buildFieldOption({ required: true }),
        /**
         * A numeric field whose value should be used to display the total number of ratings label for the result item.
         *
         * If unspecified, no number of ratings label is displayed. If the `numberOfRatingsField`'s value is `0` or less, a `(No Ratings)` label is displayed.
         */
        numberOfRatingsField: ComponentOptions_1.ComponentOptions.buildFieldOption(),
        /**
         * The scale to apply to the [`ratingField`]{@link StarRating.options.ratingField}'s value. Must be smaller than or equal to the highest possible `ratingField`'s value.
         *
         * **Example:** If the `ratingScale` is `100` and the current `ratingField`'s value is `75`, the component will render 3 stars (i.e., `75 * (5 / 100)`, rounded down).
         */
        ratingScale: ComponentOptions_1.ComponentOptions.buildNumberOption({ defaultValue: 5, min: 1, max: 100000 })
    };
    return StarRating;
}(Component_1.Component));
exports.StarRating = StarRating;
Initialization_1.Initialization.registerAutoCreateComponent(StarRating);
 
 
/***/ }),
/* 832 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
var underscore_1 = __webpack_require__(1);
var GlobalExports_1 = __webpack_require__(10);
var Assert_1 = __webpack_require__(12);
var Dom_1 = __webpack_require__(0);
var Component_1 = __webpack_require__(6);
var ComponentOptions_1 = __webpack_require__(13);
var Initialization_1 = __webpack_require__(8);
var TemplateComponentOptions_1 = __webpack_require__(89);
/**
 * The TemplateLoader component can load one result template into another. You should normally declare any reusable
 * result template outside of the {@link ResultList} component. Otherwise, the framework will evaluate the
 * `data-condition` of the reusable result template and possibly render it.
 *
 * **Example:**
 *
 * ```html
 * [ ... ]
 *
 * <!-- A reusable result template. Note that it is important to declare it outside of the ResultList component. -->
 * <script type='text/underscore' class='result-template' id='ReusableTemplate'>
 *   <table class='CoveoFieldTable'>
 *     <tr data-field='@source' data-caption='Source'></tr>
 *     <tr data-field='@percentScore' data-caption='Score'></tr>
 *   </table>
 * </script>
 *
 * [ ... ]
 *
 * <div class="CoveoResultList" data-wait-animation="fade" data-auto-select-fields-to-include="true">
 *
 *   <!-- A custom result template for Lithium messages. -->
 *   <script type='text/underscore' class='result-template' data-condition='raw.filetype == "lithiummessage"'>
 *     <div>
 *       <img class='CoveoIcon' data-small='true'>
 *       <a class='CoveoResultLink'></a>
 *       <div class='CoveoTemplateLoader' data-template-id='ReusableTemplate'></div>
 *     </div>
 *   </script>
 *
 *   <!-- A custom result template for images. -->
 *   <script type='text/underscore' class='result-template' data-condition='raw.filetype == "Image"'>
 *     <div>
 *       <img class='CoveoIcon' data-small='true'></img>
 *         <a class='CoveoResultLink'>
 *           <img class='CoveoThumbnail'>
 *         </a>
 *       <div class='CoveoTemplateLoader' data-template-id='ReusableTemplate'></div>
 *     </div>
 *   </script>
 * </div>
 *
 * [ ... ]
 * ```
 *
 * See [Result Templates](https://docs.coveo.com/en/413/).
 */
var TemplateLoader = /** @class */ (function (_super) {
    __extends(TemplateLoader, _super);
    /**
     * Creates a new TemplateLoader.
     * @param element The HTMLElement on which to instantiate the component.
     * @param options The options for the TemplateLoader component.
     * @param bindings The bindings that the component requires to function normally. If not set, these will be
     * automatically resolved (with a slower execution time).
     * @param result The result to associate the component with.
     */
    function TemplateLoader(element, options, bindings, result) {
        var _this = _super.call(this, element, TemplateLoader.ID, bindings) || this;
        _this.element = element;
        _this.options = options;
        _this.bindings = bindings;
        _this.result = result;
        _this.options = ComponentOptions_1.ComponentOptions.initComponentOptions(element, TemplateLoader, options);
        _this.result = _this.result || _this.resolveResult();
        Assert_1.Assert.exists(_this.result);
        if (_this.options.condition != null) {
            var conditionFunction = new Function('obj', 'with(obj||{}){return ' + _this.options.condition + '}');
            if (conditionFunction(_this.result)) {
                _this.initialize();
            }
        }
        else {
            _this.initialize();
        }
        return _this;
    }
    TemplateLoader.prototype.initialize = function () {
        var _this = this;
        if (this.options.template != null) {
            var initOptions = this.searchInterface.options;
            var initParameters = {
                options: initOptions,
                bindings: this.bindings,
                result: this.result
            };
            var parents = Dom_1.$$(this.element).parents(Component_1.Component.computeCssClassName(TemplateLoader));
            underscore_1.each(parents, function (parent) {
                var clone = parent.cloneNode();
                Dom_1.$$(clone).empty();
                var outerHTMLParent = clone.outerHTML;
                Assert_1.Assert.check(outerHTMLParent.indexOf(_this.element.outerHTML) === -1, 'TemplateLoader cannot load a template into itself.');
            });
            this.element.innerHTML = this.options.template.instantiateToString(this.result, {
                checkCondition: false,
                responsiveComponents: this.bindings ? this.bindings.searchInterface.responsiveComponents : null
            });
            Initialization_1.Initialization.automaticallyCreateComponentsInside(this.element, initParameters);
        }
    };
    TemplateLoader.ID = 'TemplateLoader';
    TemplateLoader.doExport = function () {
        GlobalExports_1.exportGlobally({
            TemplateLoader: TemplateLoader
        });
    };
    /**
     * The possible options for a TemplateLoader.
     * @componentOptions
     */
    TemplateLoader.options = {
        /**
         * Specifies how to find the template. This can be either a CSS selector or an HTML `id` attribute.
         *
         * **Examples:**
         *
         * - With a CSS selector: `data-template-selector='.MySelector'`
         * - With an HTML `id`: `data-template-id='MyId'`
         */
        template: TemplateComponentOptions_1.TemplateComponentOptions.buildTemplateOption(),
        /**
         * Specifies the boolean condition that the result must satisfy in order for the template to load.
         *
         * **Example:**
         *
         * `data-condition='percentScore > 80'`
         */
        condition: ComponentOptions_1.ComponentOptions.buildStringOption()
    };
    return TemplateLoader;
}(Component_1.Component));
exports.TemplateLoader = TemplateLoader;
Initialization_1.Initialization.registerAutoCreateComponent(TemplateLoader);
 
 
/***/ }),
/* 833 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
var _ = __webpack_require__(1);
var GlobalExports_1 = __webpack_require__(10);
var Dom_1 = __webpack_require__(0);
var QueryUtils_1 = __webpack_require__(37);
var Component_1 = __webpack_require__(6);
var ComponentOptions_1 = __webpack_require__(13);
var Initialization_1 = __webpack_require__(8);
var RegisteredNamedMethods_1 = __webpack_require__(38);
var Icon_1 = __webpack_require__(262);
var ResultLink_1 = __webpack_require__(56);
var Strings_1 = __webpack_require__(4);
/**
 * The Thumbnail component automatically fetches the thumbnail of the result object and outputs an HTML `img` tag with
 * it.
 * @notSupportedIn salesforcefree
 */
var Thumbnail = /** @class */ (function (_super) {
    __extends(Thumbnail, _super);
    /**
     * Creates a new Thumbnail component.
     * @param element The HTMLElement on which to instantiate the component.
     * @param options The options for the Thumbnail component.
     * @param bindings The bindings that the component requires to function normally. If not set, these will be
     * automatically resolved (with a slower execution time).
     * @param result The result to associate the component with.
     */
    function Thumbnail(element, options, bindings, result) {
        var _this = _super.call(this, element, Thumbnail.ID, bindings) || this;
        _this.element = element;
        _this.options = options;
        _this.bindings = bindings;
        _this.result = result;
        _this.options = ComponentOptions_1.ComponentOptions.initOptions(element, Thumbnail.options, options, Thumbnail.ID);
        if (_this.element.tagName.toLowerCase() != 'img') {
            _this.img = Dom_1.$$('img').el;
            _this.element.appendChild(_this.img);
        }
        else {
            _this.img = _this.element;
        }
        if (_this.options.clickable) {
            if (_this.element.tagName.toLowerCase() != 'img') {
                new ResultLink_1.ResultLink(_this.element, _this.options, _this.bindings, _this.result);
            }
            else {
                var href = Dom_1.$$('a');
                Dom_1.$$(_this.element).replaceWith(href.el);
                Dom_1.$$(href).append(_this.element);
                new ResultLink_1.ResultLink(href.el, _this.options, _this.bindings, _this.result);
            }
        }
        // We need to set src to a blank image right away to avoid the image from
        // changing size once it's loaded. Also, doing this prevents a border from
        // appearing on some browsers when there is no thumbnail. I've found no other
        // way to get rid of it...
        _this.img.setAttribute('src', 'data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==');
        if (QueryUtils_1.QueryUtils.hasThumbnail(result)) {
            _this.buildThumbnailImage();
        }
        else {
            _this.logger.info('Result has no thumbnail. Cannot build thumbnail image, instanciating an Icon component instead.');
            var icn = new Icon_1.Icon(Dom_1.$$('div').el, { small: true }, bindings, result);
            Dom_1.$$(_this.element).replaceWith(icn.element);
        }
        return _this;
    }
    Thumbnail.prototype.buildThumbnailImage = function () {
        var endpoint = this.bindings.queryController.getEndpoint();
        if (endpoint.isJsonp()) {
            // For jsonp we can't GET/POST for binary data. We are limited
            // to only setting the src attribute directly on the img.
            this.buildImageWithDirectSrcAttribute(endpoint);
        }
        else {
            // Base 64 img allows us to GET/POST the image as raw binary, so that we can also
            // pass the credential of the user. Useful for phonegap among others.
            this.buildImageWithBase64SrcAttribute(endpoint);
        }
        this.makeAccessible();
    };
    Thumbnail.prototype.buildImageWithDirectSrcAttribute = function (endpoint) {
        var dataStreamUri = endpoint.getViewAsDatastreamUri(this.result.uniqueId, '$Thumbnail$', {
            contentType: 'image/png'
        });
        this.img.setAttribute('src', dataStreamUri);
        this.resizeContainingFieldTable();
    };
    Thumbnail.prototype.buildImageWithBase64SrcAttribute = function (endpoint) {
        var _this = this;
        endpoint
            .getRawDataStream(this.result.uniqueId, '$Thumbnail$')
            .then(function (response) {
            var rawBinary = String.fromCharCode.apply(null, new Uint8Array(response));
            _this.img.setAttribute('src', 'data:image/png;base64, ' + btoa(rawBinary));
            _this.resizeContainingFieldTable();
        })
            .catch(function () {
            _this.setEmptyThumbnailClass();
        });
    };
    Thumbnail.prototype.makeAccessible = function () {
        this.img.setAttribute('alt', Strings_1.l('ThumbnailOf', this.result.title));
    };
    Thumbnail.prototype.resizeContainingFieldTable = function () {
        var className = Component_1.Component.computeCssClassNameForType('FieldTable');
        var closestFieldTableElement = Dom_1.$$(this.element).closest(className);
        if (closestFieldTableElement != null) {
            var fieldTable = RegisteredNamedMethods_1.get(closestFieldTableElement);
            fieldTable.updateToggleHeight();
        }
    };
    Thumbnail.prototype.setEmptyThumbnailClass = function () {
        Dom_1.$$(this.img).addClass(this.options.noThumbnailClass);
    };
    Thumbnail.ID = 'Thumbnail';
    Thumbnail.doExport = function () {
        GlobalExports_1.exportGlobally({
            Thumbnail: Thumbnail
        });
    };
    /**
     * Options for the Thumbnail
     * @componentOptions
     */
    Thumbnail.options = {
        /**
         * Specifies the CSS class to use on the `img` tag that the Thumbnail component outputs when a result has no
         * thumbnail in the index.
         *
         * Default value is `coveo-no-thumbnail`.
         */
        noThumbnailClass: ComponentOptions_1.ComponentOptions.buildStringOption({ defaultValue: 'coveo-no-thumbnail' }),
        /**
         * Specifies whether to create a clickable {@link ResultLink} around the Thumbnail.
         *
         * Default value is `false`.
         *
         * If set to true, you can use the options specified on {@link ResultLink.options}
         */
        clickable: ComponentOptions_1.ComponentOptions.buildBooleanOption({ defaultValue: false })
    };
    Thumbnail.parent = ResultLink_1.ResultLink;
    return Thumbnail;
}(Component_1.Component));
exports.Thumbnail = Thumbnail;
Thumbnail.options = _.extend({}, ResultLink_1.ResultLink.options, Thumbnail.options);
Initialization_1.Initialization.registerAutoCreateComponent(Thumbnail);
 
 
/***/ }),
/* 834 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
var Component_1 = __webpack_require__(6);
var ComponentOptions_1 = __webpack_require__(13);
var Assert_1 = __webpack_require__(12);
var QueryEvents_1 = __webpack_require__(14);
var Dom_1 = __webpack_require__(0);
var AnalyticsActionListMeta_1 = __webpack_require__(7);
var QueryStateModel_1 = __webpack_require__(17);
var Initialization_1 = __webpack_require__(8);
var underscore_1 = __webpack_require__(1);
var GlobalExports_1 = __webpack_require__(10);
__webpack_require__(1530);
var UtilsModules_1 = __webpack_require__(67);
function isTriggerNotify(trigger) {
    return trigger.type === 'notify';
}
function isTriggerRedirect(trigger) {
    return trigger.type === 'redirect';
}
function isTriggerQuery(trigger) {
    return trigger.type === 'query';
}
function isTriggerExecute(trigger) {
    return trigger.type === 'execute';
}
/**
 * The Triggers component enables the use of triggers (`notify`, `execute`, `query`, `redirect`) generated by the Coveo
 * Search API (see [Trigger](https://docs.coveo.com/en/1458/)) in the query pipeline (see
 * [Managing the Query Pipeline](https://docs.coveo.com/en/1450/)).
 *
 * Note: adding the Triggers component gives query pipeline administrators the power to influence users' search experience.
 * Bad actors will be able to perform XSS attacks, or redirect users to dangerous sites. Make sure only individuals you trust
 * have query pipeline edit privileges.
 */
var Triggers = /** @class */ (function (_super) {
    __extends(Triggers, _super);
    /**
     * Creates a new Triggers component.
     * @param element The HTMLElement on which to instantiate the component.
     * @param options The options for the Triggers component.
     * @param bindings The bindings that the component requires to function normally. If not set, these will be
     * automatically resolved (with a slower execution time).
     * @param _window The window on which to execute the triggers.
     */
    function Triggers(element, options, bindings, _window) {
        var _this = _super.call(this, element, Triggers.ID, bindings) || this;
        _this.element = element;
        _this.options = options;
        _this.bindings = bindings;
        _this._window = _window;
        _this._window = _this._window || window;
        _this.options = ComponentOptions_1.ComponentOptions.initComponentOptions(element, Triggers, options);
        Assert_1.Assert.exists(element);
        Assert_1.Assert.exists(_this.options);
        _this.notifications = [];
        _this.bind.onRootElement(QueryEvents_1.QueryEvents.querySuccess, _this.handleProcessNewQueryResults);
        return _this;
    }
    Triggers.prototype.handleProcessNewQueryResults = function (data) {
        Assert_1.Assert.exists(data);
        Assert_1.Assert.exists(data.results);
        Dom_1.$$(this.element).empty();
        this.notifications = [];
        if (UtilsModules_1.Utils.isNullOrUndefined(data.results.triggers)) {
            Dom_1.$$(this.element).removeClass('coveo-visible');
            return;
        }
        var notifyTriggers = [];
        var redirectTrigger = null;
        var queryTrigger = null;
        var executeTrigger = null;
        data.results.triggers.forEach(function (trigger) {
            if (isTriggerNotify(trigger)) {
                notifyTriggers.push(trigger);
            }
            else if (isTriggerRedirect(trigger)) {
                redirectTrigger = redirectTrigger || trigger;
            }
            else if (isTriggerQuery(trigger)) {
                queryTrigger = queryTrigger || trigger;
            }
            else Eif (isTriggerExecute(trigger)) {
                executeTrigger = executeTrigger || trigger;
            }
        });
        if (notifyTriggers.length) {
            this.processNotifyTriggers(notifyTriggers);
            Dom_1.$$(this.element).addClass('coveo-visible');
        }
        redirectTrigger && this.processRedirectTrigger(redirectTrigger);
        queryTrigger && this.processQueryTrigger(queryTrigger);
        executeTrigger && this.processExecuteTrigger(executeTrigger, data.query);
    };
    Triggers.prototype.processNotifyTriggers = function (triggers) {
        var _this = this;
        this.usageAnalytics.logCustomEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.triggerNotify, {
            notifications: triggers.map(function (trigger) { return trigger.content; })
        }, this.element);
        triggers.forEach(function (trigger) {
            _this.notifications.push(trigger.content);
            _this.element.appendChild(Dom_1.$$('div', { className: 'coveo-trigger-notify' }, trigger.content).el);
        });
    };
    Triggers.prototype.processRedirectTrigger = function (trigger) {
        this.usageAnalytics.logCustomEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.triggerRedirect, {
            redirectedTo: trigger.content
        }, this.element);
        this._window.location.replace(trigger.content);
    };
    Triggers.prototype.processQueryTrigger = function (trigger) {
        var _this = this;
        this.queryStateModel.set(QueryStateModel_1.QueryStateModel.attributesEnum.q, trigger.content);
        this.queryController.executeQuery({
            beforeExecuteQuery: function () {
                _this.usageAnalytics.logCustomEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.triggerQuery, {
                    query: trigger.content
                }, _this.element);
            }
        });
    };
    Triggers.prototype.processExecuteTrigger = function (trigger, query) {
        try {
            var func = this._window['' + trigger.content.name];
            if (typeof func === 'function') {
                var params = underscore_1.object(underscore_1.map(trigger.content.params, function (value, index) {
                    return ['param' + (index + 1), value];
                }));
                params['element'] = this.element;
                this.usageAnalytics.logCustomEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.triggerExecute, {
                    executions: [{ functionName: trigger.content.name, params: trigger.content.params }]
                }, this.element);
                func.apply(this._window, [params]);
            }
            else {
                this.logger.error("A trigger tried to call the function '" + trigger.content.name + "', which doesn't exist.", this, query, trigger);
            }
        }
        catch (error) {
            this.logger.error("A trigger called the function '" + trigger.content.name + "', which threw an error.", this, query, trigger);
        }
    };
    Triggers.ID = 'Triggers';
    Triggers.options = {};
    Triggers.doExport = function () {
        GlobalExports_1.exportGlobally({
            Triggers: Triggers
        });
    };
    return Triggers;
}(Component_1.Component));
exports.Triggers = Triggers;
Initialization_1.Initialization.registerAutoCreateComponent(Triggers);
 
 
/***/ }),
/* 835 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
__webpack_require__(836);
var underscore_1 = __webpack_require__(1);
var BreadcrumbEvents_1 = __webpack_require__(33);
var QueryEvents_1 = __webpack_require__(14);
var GlobalExports_1 = __webpack_require__(10);
var Assert_1 = __webpack_require__(12);
var Logger_1 = __webpack_require__(18);
var Strings_1 = __webpack_require__(4);
var AccessibilityUtils_1 = __webpack_require__(81);
var AccessibleButton_1 = __webpack_require__(20);
var Dom_1 = __webpack_require__(0);
var SVGDom_1 = __webpack_require__(23);
var SVGIcons_1 = __webpack_require__(16);
var AnalyticsActionListMeta_1 = __webpack_require__(7);
var Component_1 = __webpack_require__(6);
var ComponentOptions_1 = __webpack_require__(13);
var Initialization_1 = __webpack_require__(8);
var FacetUtils_1 = __webpack_require__(49);
var Checkbox_1 = __webpack_require__(98);
var SimpleFilterValues_1 = __webpack_require__(1532);
/**
 * The `SimpleFilter` component displays a dropdown menu containing field values which the end user can select to filter
 * the query results.
 *
 * The list of available field values in the dropdown menu can either be static (defined through the
 * [`values`]{@link SimpleFilter.options.values} option), or dynamic (automatically obtained through a
 * [`GroupByRequest`]{@link IGroupByRequest} operation performed at the same time as the main query).
 *
 * @availablesince [November 2017 Release (v2.3477.9)](https://docs.coveo.com/en/373/#november-2017-release-v234779)
 */
var SimpleFilter = /** @class */ (function (_super) {
    __extends(SimpleFilter, _super);
    /**
     * Creates a new `SimpleFilter` component. Binds multiple query events as well.
     * @param element the HTMLElement on which to instantiate the component.
     * @param options The options for the `SimpleFilter` component.
     * @param bindings The bindings that the component requires to function normally.
     */
    function SimpleFilter(element, options, bindings) {
        var _this = _super.call(this, element, SimpleFilter.ID, bindings) || this;
        _this.element = element;
        _this.options = options;
        _this.bindings = bindings;
        _this.previouslySelected = [];
        _this.groupByRequestValues = [];
        _this.isSticky = false;
        _this.shouldTriggerQuery = true;
        _this.options = ComponentOptions_1.ComponentOptions.initComponentOptions(element, SimpleFilter, options);
        _this.element.title = _this.options.title;
        _this.buildContent();
        new AccessibleButton_1.AccessibleButton()
            .withElement(_this.element)
            .withClickAction(function (e) { return _this.handleClick(e); })
            .withEnterKeyboardAction(function (e) { return _this.handleKeyboardSelect(e); })
            .withBlurAction(function (e) { return _this.handleBlur(e); })
            .withLabel(_this.options.title)
            .build();
        _this.bind.onRootElement(BreadcrumbEvents_1.BreadcrumbEvents.populateBreadcrumb, function (args) {
            return _this.handlePopulateBreadcrumb(args);
        });
        _this.bind.onRootElement(BreadcrumbEvents_1.BreadcrumbEvents.clearBreadcrumb, function () { return _this.handleClearBreadcrumb(); });
        _this.bind.onRootElement(QueryEvents_1.QueryEvents.buildingQuery, function (args) { return _this.handleBuildingQuery(args); });
        _this.bind.onRootElement(QueryEvents_1.QueryEvents.doneBuildingQuery, function (args) { return _this.handleDoneBuildingQuery(args); });
        _this.bind.onRootElement(QueryEvents_1.QueryEvents.querySuccess, function (args) { return _this.handleQuerySuccess(args); });
        return _this;
    }
    SimpleFilter.simpleFilterSortCritera = function () {
        return ['score', 'occurrences', 'alphaascending', 'alphadescending', 'chisquare'];
    };
    /**
     * Gets the `SimpleFilter` `valueContainer`.
     * @returns {Dom} The `SimpleFilter` valueContainer.
     */
    SimpleFilter.prototype.getValueContainer = function () {
        return this.valueContainer;
    };
    /**
     * Gets the caption of a specific field value.
     * @param value The field value whose caption the method should attempt to get.
     * @returns {any} The value caption, if available; the original value otherwise.
     */
    SimpleFilter.prototype.getValueCaption = function (value) {
        var ret = value;
        if (underscore_1.contains(underscore_1.keys(this.options.valueCaption), value)) {
            ret = this.options.valueCaption[ret] || ret;
            return Strings_1.l(ret);
        }
        else {
            return FacetUtils_1.FacetUtils.tryToGetTranslatedCaption(this.options.field.toString(), ret);
        }
    };
    /**
     * Gets the captions of the currently selected field values in the `SimpleFilter`.
     * @returns {string[]} An array containing the selected captions.
     */
    SimpleFilter.prototype.getSelectedCaptions = function () {
        var _this = this;
        return underscore_1.map(this.getSelectedValues(), function (selectedValue) { return _this.getValueCaption(selectedValue); });
    };
    /**
     * Opens or closes the `SimpleFilter` `valueContainer`, depending on its current state.
     */
    SimpleFilter.prototype.toggleContainer = function () {
        Dom_1.$$(this.valueContainer).hasClass('coveo-simplefilter-value-container-expanded') ? this.closeContainer() : this.openContainer();
    };
    /**
     * Selects the specified value. Also triggers a query, by default.
     * @param value The value to select.
     * @param triggerQuery `true` by default. If set to `false`, the method triggers no query.
     */
    SimpleFilter.prototype.selectValue = function (value, triggerQuery) {
        var _this = this;
        if (triggerQuery === void 0) { triggerQuery = true; }
        underscore_1.each(this.checkboxes, function (labeledCheckbox) {
            var translated = _this.getValueCaption(labeledCheckbox.label);
            if (labeledCheckbox.label == value || translated == value) {
                labeledCheckbox.checkbox.select(triggerQuery);
            }
        });
    };
    /**
     * Un-selects the specified value.
     * @param value The value whose state the method should reset.
     */
    SimpleFilter.prototype.deselectValue = function (value) {
        var _this = this;
        underscore_1.each(this.checkboxes, function (labeledCheckbox) {
            var translated = _this.getValueCaption(labeledCheckbox.label);
            if (labeledCheckbox.label == value || translated == value) {
                labeledCheckbox.checkbox.reset();
            }
        });
    };
    /**
     * Selects or un-selects the specified value, depending on its current state.
     * @param value The value whose state the method should toggle.
     */
    SimpleFilter.prototype.toggleValue = function (value) {
        var _this = this;
        underscore_1.each(this.checkboxes, function (labeledCheckbox) {
            var translated = _this.getValueCaption(labeledCheckbox.label);
            if (labeledCheckbox.label == value || translated == value) {
                labeledCheckbox.checkbox.toggle();
            }
        });
    };
    /**
     * Resets the component to its original state.
     */
    SimpleFilter.prototype.resetSimpleFilter = function () {
        var _this = this;
        underscore_1.each(this.checkboxes, function (labeledCheckbox) {
            if (labeledCheckbox.checkbox.isSelected()) {
                _this.deselectValue(labeledCheckbox.label);
            }
        });
    };
    /**
     * Opens the `SimpleFilter` `valueContainer`.
     */
    SimpleFilter.prototype.openContainer = function () {
        Dom_1.$$(this.element).addClass('coveo-simplefilter-value-container-expanded');
        this.valueContainer.addClass('coveo-simplefilter-value-container-expanded');
        this.refreshValueContainer();
        this.isSticky = true;
        if (!this.backdrop.hasClass('coveo-dropdown-background-active')) {
            this.showBackdrop();
        }
    };
    /**
     * Closes the `SimpleFilter` `valueContainer`.
     */
    SimpleFilter.prototype.closeContainer = function () {
        Dom_1.$$(this.element).removeClass('coveo-simplefilter-value-container-expanded');
        this.valueContainer.removeClass('coveo-simplefilter-value-container-expanded');
        Eif (this.backdrop.hasClass('coveo-dropdown-background-active')) {
            this.hideBackdrop();
        }
        Eif (this.getSelectedLabeledCheckboxes().length == 0) {
            this.isSticky = false;
        }
    };
    SimpleFilter.prototype.getSelectedValues = function () {
        return underscore_1.map(this.getSelectedLabeledCheckboxes(), function (labeledCheckbox) { return labeledCheckbox.label; });
    };
    SimpleFilter.prototype.handleClick = function (e) {
        e.stopPropagation();
        if (e.target == this.element) {
            this.toggleContainer();
        }
    };
    SimpleFilter.prototype.handleKeyboardSelect = function (e) {
        if (e.target == this.element) {
            this.toggleContainer();
        }
        else {
            this.toggleValue(Dom_1.$$(e.target).text());
        }
    };
    SimpleFilter.prototype.handleBlur = function (e) {
        var relatedTarget = e.relatedTarget;
        if (!relatedTarget) {
            return;
        }
        if (!Dom_1.$$(relatedTarget).parent(Component_1.Component.computeCssClassName(SimpleFilter))) {
            this.closeContainer();
        }
    };
    SimpleFilter.prototype.handleValueToggle = function (checkbox) {
        var selectedValues = this.getSelectedValues();
        this.circleElement.text(selectedValues.length.toString());
        this.circleElement.removeClass('coveo-simplefilter-circle-hidden');
        this.options.enableClearButton && this.clearElement.show();
        if (selectedValues.length == 1) {
            this.setDisplayedTitle(this.getValueCaption(selectedValues[0]));
            this.element.title = this.getValueCaption(selectedValues[0]);
        }
        else {
            this.setDisplayedTitle(this.options.title);
            this.element.title = this.options.title;
            if (selectedValues.length < 1) {
                this.circleElement.addClass('coveo-simplefilter-circle-hidden');
                this.options.enableClearButton && this.clearElement.hide();
            }
        }
        if (selectedValues.length == 0) {
            this.isSticky = false;
        }
        var action = checkbox.isSelected()
            ? AnalyticsActionListMeta_1.analyticsActionCauseList.simpleFilterSelectValue
            : AnalyticsActionListMeta_1.analyticsActionCauseList.simpleFilterDeselectValue;
        if (this.shouldTriggerQuery) {
            this.usageAnalytics.logSearchEvent(action, {
                simpleFilterTitle: this.options.title,
                simpleFilterSelectedValue: checkbox.label,
                simpleFilterField: this.options.field
            });
            this.queryController.executeQuery();
        }
    };
    SimpleFilter.prototype.createCheckbox = function (label) {
        var _this = this;
        var checkbox = new Checkbox_1.Checkbox(function () {
            _this.handleValueToggle(checkbox);
        }, this.getValueCaption(label));
        checkbox.getElement().title = Strings_1.l(label);
        return { checkbox: checkbox, label: label };
    };
    SimpleFilter.prototype.createCheckboxes = function () {
        var _this = this;
        if (this.previouslySelected.length > 0) {
            this.checkboxes = underscore_1.map(this.previouslySelected, function (caption) { return _this.createCheckbox(caption); });
            underscore_1.each(this.checkboxes, function (checkbox) {
                Eif (_this.previouslySelected.indexOf(checkbox.label) >= 0) {
                    _this.selectValue(checkbox.label, false);
                }
            });
        }
        else if (this.options.values != undefined) {
            this.checkboxes = underscore_1.map(this.options.values, function (caption) { return _this.createCheckbox(caption); });
        }
        else Eif (this.groupByRequestValues != undefined) {
            this.checkboxes = underscore_1.map(this.groupByRequestValues, function (caption) { return _this.createCheckbox(caption); });
        }
        Iif (this.options.sortCriteria.toLocaleLowerCase() === 'alphaascending' ||
            this.options.sortCriteria.toLowerCase() === 'alphadescending') {
            this.checkboxes.sort(function (a, b) { return a.checkbox.label.localeCompare(b.checkbox.label); });
            if (this.options.sortCriteria.toLowerCase() === 'alphadescending') {
                this.checkboxes.reverse();
            }
        }
        underscore_1.each(this.checkboxes, function (result) {
            _this.valueContainer.append(result.checkbox.getElement());
        });
        Eif (this.checkboxes.length > 0) {
            Dom_1.$$(Dom_1.$$(this.checkboxes[this.checkboxes.length - 1].checkbox.getElement()).find('.coveo-checkbox-button')).on('blur', function () {
                _this.closeContainer();
            });
        }
    };
    SimpleFilter.prototype.createValueContainer = function () {
        this.valueContainer = Dom_1.$$('div', { className: 'coveo-simplefilter-value-container' });
    };
    SimpleFilter.prototype.buildContent = function () {
        this.createValueContainer();
        this.element.appendChild(this.buildSelect());
        this.element.appendChild(this.valueContainer.el);
        this.findOrCreateWrapper().append(this.element);
        this.createBackdrop();
    };
    SimpleFilter.prototype.buildSelect = function () {
        var select = Dom_1.$$('span', { className: 'coveo-simplefilter-select' });
        this.selectTitle = Dom_1.$$('span', { className: 'coveo-simplefilter-selecttext' }, this.options.title);
        select.append(this.selectTitle.el);
        select.append(this.buildCircleElement());
        this.options.enableClearButton && select.append(this.buildClearElement());
        select.append(this.buildSvgToggleUpIcon());
        return select.el;
    };
    SimpleFilter.prototype.buildSvgToggleUpIcon = function () {
        var svgIcon = Dom_1.$$('span', { className: 'coveo-simplefilter-toggle-svg-container' }, SVGIcons_1.SVGIcons.icons.arrowDown).el;
        SVGDom_1.SVGDom.addClassToSVGInContainer(svgIcon, 'coveo-simplefilter-toggle-down-svg');
        return svgIcon;
    };
    SimpleFilter.prototype.buildCircleElement = function () {
        this.circleElement = Dom_1.$$('span', { className: 'coveo-simplefilter-circle coveo-simplefilter-circle-hidden' }, this.getSelectedLabeledCheckboxes().length.toString());
        return this.circleElement.el;
    };
    SimpleFilter.prototype.buildClearElement = function () {
        var _this = this;
        this.clearElement = Dom_1.$$('button', {
            title: Strings_1.l('DeselectFilterValues', this.options.title),
            'aria-label': Strings_1.l('Clear', this.options.title),
            className: 'coveo-simplefilter-eraser',
            type: 'button'
        }, SVGIcons_1.SVGIcons.icons.mainClear);
        this.clearElement.hide();
        this.clearElement.on('click', function (evt) {
            evt.stopPropagation();
            _this.handleClear();
        });
        return this.clearElement.el;
    };
    SimpleFilter.prototype.createBackdrop = function () {
        var _this = this;
        var backdrop = Dom_1.$$(this.root).find('.coveo-dropdown-background');
        if (backdrop == null) {
            this.backdrop = Dom_1.$$('div', { className: 'coveo-dropdown-background' });
            this.root.appendChild(this.backdrop.el);
        }
        else {
            this.backdrop = Dom_1.$$(backdrop);
        }
        this.backdrop.on('click', function () { return _this.closeContainer(); });
    };
    SimpleFilter.prototype.handlePopulateBreadcrumb = function (args) {
        var _this = this;
        Eif (this.getSelectedLabeledCheckboxes().length > 0) {
            var elem = Dom_1.$$('div', { className: 'coveo-simplefilter-breadcrumb' });
            var title = Dom_1.$$(AccessibilityUtils_1.getHeadingTag(args.headingLevel, 'span'), { className: 'coveo-simplefilter-breadcrumb-title' }, this.options.title + ":");
            elem.append(title.el);
            var values_1 = Dom_1.$$('span', { className: 'coveo-simplefilter-breadcrumb-values' });
            elem.append(values_1.el);
            underscore_1.each(this.getSelectedLabeledCheckboxes(), function (selectedlabeledCheckbox) {
                var value = Dom_1.$$('span', { className: 'coveo-simplefilter-breadcrumb-value' }, _this.getValueCaption(selectedlabeledCheckbox.label));
                values_1.append(value.el);
                var svgContainer = Dom_1.$$('span', { className: 'coveo-simplefilter-breadcrumb-clear' }, SVGIcons_1.SVGIcons.icons.mainClear);
                value.append(svgContainer.el);
                value.el.title = _this.getValueCaption(selectedlabeledCheckbox.label);
                Dom_1.$$(value).on('click', function () { return _this.handleRemoveFromBreadcrumb(selectedlabeledCheckbox); });
            });
            args.breadcrumbs.push({
                element: elem.el
            });
        }
    };
    SimpleFilter.prototype.handleRemoveFromBreadcrumb = function (labeledCheckbox) {
        labeledCheckbox.checkbox.reset();
        this.refreshValueContainer();
    };
    SimpleFilter.prototype.handleClearBreadcrumb = function () {
        // Bit of a hack with that flag, but essentially we want "clear breadcrumb" to be a global, unique event.
        // Not something that will log a special event for SimpleFilter (or any component)
        this.resetWithoutTriggeringQuery();
    };
    SimpleFilter.prototype.handleClear = function () {
        this.usageAnalytics.logSearchEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.simpleFilterClearAll, {
            simpleFilterTitle: this.options.title,
            simpleFilterField: this.options.field
        });
        this.resetWithoutTriggeringQuery();
        this.queryController.executeQuery();
    };
    SimpleFilter.prototype.resetWithoutTriggeringQuery = function () {
        this.shouldTriggerQuery = false;
        this.resetSimpleFilter();
        this.shouldTriggerQuery = true;
    };
    SimpleFilter.prototype.handleQuerySuccess = function (data) {
        Eif (data.results.results.length > 0) {
            this.findOrCreateWrapper().removeClass('coveo-no-results');
        }
        else {
            this.findOrCreateWrapper().addClass('coveo-no-results');
        }
        if (this.options.values == undefined) {
            this.groupByBuilder.groupBy(data);
            this.groupByRequestValues = this.groupByBuilder.getValuesFromGroupBy();
            this.refreshValueContainer();
            if (!Dom_1.$$(this.element).hasClass('coveo-simplefilter-value-container-expanded')) {
                this.isSticky = false;
            }
        }
    };
    SimpleFilter.prototype.handleBuildingQuery = function (args) {
        Assert_1.Assert.exists(args);
        Assert_1.Assert.exists(args.queryBuilder);
        var selectedValues = this.getSelectedValues();
        if (selectedValues.length > 0) {
            args.queryBuilder.advancedExpression.addFieldExpression(this.options.field.toString(), '==', selectedValues);
        }
    };
    SimpleFilter.prototype.handleDoneBuildingQuery = function (data) {
        if (this.options.values == undefined) {
            Assert_1.Assert.exists(data);
            Assert_1.Assert.exists(data.queryBuilder);
            this.previouslySelected = this.getSelectedValues();
            this.groupByBuilder = new SimpleFilterValues_1.SimpleFilterValues(this, this.options);
            this.groupByBuilder.handleDoneBuildingQuery(data);
        }
    };
    SimpleFilter.prototype.getSelectedLabeledCheckboxes = function () {
        return underscore_1.filter(this.checkboxes, function (labeledCheckbox) { return labeledCheckbox.checkbox.isSelected(); });
    };
    SimpleFilter.prototype.setDisplayedTitle = function (title) {
        this.selectTitle.text(this.getValueCaption(title));
    };
    SimpleFilter.prototype.showBackdrop = function () {
        this.backdrop.addClass('coveo-dropdown-background-active');
    };
    SimpleFilter.prototype.hideBackdrop = function () {
        this.backdrop.removeClass('coveo-dropdown-background-active');
    };
    SimpleFilter.prototype.findOrCreateWrapper = function () {
        if (Dom_1.$$(this.root).find('.coveo-simplefilter-header-wrapper') == null) {
            var wrapper = Dom_1.$$('div', { className: 'coveo-simplefilter-header-wrapper' });
            wrapper.insertBefore(this.element);
            return wrapper;
        }
        else {
            var wrapper = Dom_1.$$(this.root).find('.coveo-simplefilter-header-wrapper');
            return Dom_1.$$(wrapper);
        }
    };
    SimpleFilter.prototype.refreshValueContainer = function () {
        if (!this.isSticky) {
            this.valueContainer.empty();
            this.createCheckboxes();
        }
        Iif (this.checkboxes.length == 0 && !this.isSticky) {
            Dom_1.$$(this.element).addClass('coveo-simplefilter-empty');
        }
        else {
            Dom_1.$$(this.element).removeClass('coveo-simplefilter-empty');
        }
        Dom_1.$$(this.circleElement).text(this.getSelectedLabeledCheckboxes().length.toString());
    };
    SimpleFilter.ID = 'SimpleFilter';
    SimpleFilter.doExport = function () {
        GlobalExports_1.exportGlobally({
            SimpleFilter: SimpleFilter
        });
    };
    /**
     * The possible options for the SimpleFilter.
     * @componentOptions
     */
    SimpleFilter.options = {
        /**
         * Specifies the maximum number of field values to display in the `SimpleFilter` dropdown menu.
         *
         * Default value is `5`. Minimum value is `0`.
         */
        maximumNumberOfValues: ComponentOptions_1.ComponentOptions.buildNumberOption({ defaultValue: 5, min: 0 }),
        /**
         * Specifies a static list of field values to display in the `SimpleFilter` dropdown menu.
         *
         * This option is undefined by default, which means that the component generates a dynamic list of field values
         * by performing a [`GroupByRequest`]{@link IGroupByRequest} operation at the same time as the main query.
         */
        values: ComponentOptions_1.ComponentOptions.buildListOption(),
        /**
         * Specifies the field whose values the `SimpleFilter` should output result filters from.
         *
         * Specifying a value for this option is required for the `SimpleFilter` component to work.
         */
        field: ComponentOptions_1.ComponentOptions.buildFieldOption({ required: true }),
        /**
         * Specifies the title to display for the `SimpleFilter`.
         *
         * Default value is the localized string for `NoTitle`.
         */
        title: ComponentOptions_1.ComponentOptions.buildLocalizedStringOption({ localizedString: function () { return Strings_1.l('NoTitle'); } }),
        /**
         * Specifies a JSON object describing a mapping of `SimpleFilter` values to their desired captions.
         *
         * **Examples:**
         *
         * * You can set the option in the ['init']{@link init} call:
         * ```javascript
         * var myValueCaptions = {
         *   "txt" : "Text files",
         *   "html" : "Web page",
         *   [ ... ]
         * };
         *
         * Coveo.init(document.querySelector("#search"), {
         *   SimpleFilter : {
         *     valueCaption : myValueCaptions
         *   }
         * });
         * ```
         *
         * * Or before the `init` call, using the ['options']{@link options} top-level function:
         * ```javascript
         * Coveo.options(document.querySelector("#search"), {
         *   SimpleFilter : {
         *     valueCaption : myValueCaptions
         *   }
         * });
         * ```
         *
         * * Or directly in the markup:
         * ```html
         * <!-- Ensure that the double quotes are properly handled in `data-value-caption`. -->
         * <div class='CoveoSimpleFilter' data-field='@myotherfield' data-value-caption='{"txt":"Text files","html":"Web page"}'></div>
         * ```
         */
        valueCaption: ComponentOptions_1.ComponentOptions.buildJsonOption(),
        /**
         *
         * string?
         * The sort criteria to use.
         *
         * **Default:** `score`
         *
         * **Allowed values:**
         *
         * `score`: sort using the score value which is computed from the number of occurrences of a field value, as well as from the position
         * where query result items having this field value appear in the ranked query result set. When using this sort criterion, a field value
         * with 100 occurrences might appear after one with only 10 occurrences, if the occurrences of the latter field value tend to appear higher
         * in the ranked query result set.
         *
         * `occurrences`: sort by number of occurrences, with field values having the highest number of occurrences appearing first.
         *
         * `alphaascending/alphadescending`: sort alphabetically on the field values.
         *
         * `chisquare`: sort based on the relative frequency of field values in the query result set compared to their frequency in the entire index. This means that a field value that does
         * not appear often in the index, but does appear often in the query result set will tend to appear higher.
         *
         * @availablesince [July 2019 Release (v2.6459)](https://docs.coveo.com/en/2938/)
         *
         */
        sortCriteria: ComponentOptions_1.ComponentOptions.buildStringOption({
            postProcessing: function (value, options) {
                var sortCriteriaToValidate = value || 'score';
                Eif (SimpleFilter.simpleFilterSortCritera().indexOf(sortCriteriaToValidate.toLowerCase()) !== -1) {
                    return sortCriteriaToValidate;
                }
                else {
                    new Logger_1.Logger(SimpleFilter).warn("The simpleFilter component doesn't accept " + sortCriteriaToValidate + " as the value for the sortCriteria option.", "Available option are : " + SimpleFilter.simpleFilterSortCritera().toString());
                    return 'score';
                }
            }
        }),
        /**
         * Whether to show a button to clear all selected values.
         *
         * @availablesince [March 2020 Release (v2.8521)](https://docs.coveo.com/en/3203/)
         */
        enableClearButton: ComponentOptions_1.ComponentOptions.buildBooleanOption({ defaultValue: false })
    };
    return SimpleFilter;
}(Component_1.Component));
exports.SimpleFilter = SimpleFilter;
Initialization_1.Initialization.registerAutoCreateComponent(SimpleFilter);
 
 
/***/ }),
/* 836 */
/***/ (function(module, exports) {
 
// empty (null-loader)
 
/***/ }),
/* 837 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __assign = (this && this.__assign) || Object.assign || function(t) {
    for (var s, i = 1, n = arguments.length; i < n; i++) {
        s = arguments[i];
        for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
            t[p] = s[p];
    }
    return t;
};
Object.defineProperty(exports, "__esModule", { value: true });
var moment = __webpack_require__(3);
var underscore_1 = __webpack_require__(1);
var GlobalExports_1 = __webpack_require__(10);
var Strings_1 = __webpack_require__(4);
var Dom_1 = __webpack_require__(0);
var Component_1 = __webpack_require__(6);
var ComponentOptions_1 = __webpack_require__(13);
var Initialization_1 = __webpack_require__(8);
var FacetRange_1 = __webpack_require__(242);
var ResponsiveFacetOptions_1 = __webpack_require__(100);
/**
 * The TimespanFacet component displays a {@link FacetRange} with prebuilt ranges.
 *
 * The prebuilt ranges allow you to see the items last updated in the last day, week, month, or year.
 *
 * This component in a thin wrapper around the standard {@link FacetRange} component.
 *
 * This component is meant to offer out of the box default ranges, so it can easily be inserted in a standard search page.
 *
 * To configure different ranges than those offered by this component, use the standard {@link FacetRange} component instead.
 *
 * @notSupportedIn salesforcefree
 */
var TimespanFacet = /** @class */ (function (_super) {
    __extends(TimespanFacet, _super);
    function TimespanFacet(element, options, bindings) {
        var _this = _super.call(this, element, TimespanFacet.ID, bindings) || this;
        _this.element = element;
        _this.options = options;
        _this.bindings = bindings;
        _this.isFieldValueCompatible = false;
        _this.rangeValues = [
            {
                start: moment(0).toDate(),
                end: moment().endOf('day').toDate(),
                label: Strings_1.l('AllDates'),
                endInclusive: false
            },
            {
                start: moment().startOf('day').subtract(1, 'day').toDate(),
                end: moment().endOf('day').toDate(),
                label: Strings_1.l('WithinLastDay'),
                endInclusive: false
            },
            {
                start: moment().startOf('day').subtract(1, 'week').toDate(),
                end: moment().endOf('day').toDate(),
                label: Strings_1.l('WithinLastWeek'),
                endInclusive: false
            },
            {
                start: moment().startOf('day').subtract(1, 'month').toDate(),
                end: moment().endOf('day').toDate(),
                label: Strings_1.l('WithinLastMonth'),
                endInclusive: false
            },
            {
                start: moment().startOf('day').subtract(1, 'year').toDate(),
                end: moment().endOf('day').toDate(),
                label: Strings_1.l('WithinLastYear'),
                endInclusive: false
            }
        ];
        _this.options = ComponentOptions_1.ComponentOptions.initComponentOptions(element, TimespanFacet, options);
        _this.buildFacet();
        return _this;
    }
    TimespanFacet.prototype.isCurrentlyDisplayed = function () {
        if (!Dom_1.$$(this.element).isVisible()) {
            return false;
        }
        if (this.disabled) {
            return false;
        }
        return true;
    };
    Object.defineProperty(TimespanFacet.prototype, "ranges", {
        /**
         * Returns the current range the facet uses to query the index
         */
        get: function () {
            return this.rangeValues;
        },
        /**
         * Sets a new range for the component.
         */
        set: function (ranges) {
            this.rangeValues = ranges;
            this.buildFacet();
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(TimespanFacet.prototype, "facet", {
        /**
         * Returns the underlying {@link FacetRange} component associated to the Timespan Facet.
         */
        get: function () {
            return this.facetRange;
        },
        enumerable: true,
        configurable: true
    });
    TimespanFacet.prototype.buildFacet = function () {
        this.destroyFacet();
        this.facetRangeElement = Dom_1.$$('div');
        Dom_1.$$(this.element).append(this.facetRangeElement.el);
        this.facetRange = new FacetRange_1.FacetRange(this.facetRangeElement.el, {
            field: this.options.field,
            title: this.options.title,
            ranges: this.rangeValues,
            availableSorts: ['custom'],
            customSort: underscore_1.pluck(this.rangeValues, 'label'),
            id: this.options.id
        }, this.bindings);
        this.facetRange.isCurrentlyDisplayed = this.isCurrentlyDisplayed;
    };
    TimespanFacet.prototype.destroyFacet = function () {
        if (this.facetRangeElement) {
            this.facetRangeElement.remove();
        }
        delete this.facetRange;
    };
    TimespanFacet.ID = 'TimespanFacet';
    /**
     * @componentOptions
     */
    TimespanFacet.options = __assign({ 
        /**
         * Specifies the title to display at the top of the facet.
         *
         * Default value is the localized string for `Last updated`.
         */
        title: ComponentOptions_1.ComponentOptions.buildStringOption({
            defaultValue: Strings_1.l('LastUpdated')
        }), 
        /**
         * Specifies the index field whose values the facet should use.
         *
         * Default value is the field `@date`
         */
        field: ComponentOptions_1.ComponentOptions.buildFieldOption({
            defaultValue: '@date'
        }), 
        /**
         * Specifies a unique identifier for the facet. Among other things, this identifier serves the purpose of saving
         * the facet state in the URL hash.
         *
         * If you have two facets with the same field on the same page, you should specify an `id` value for at least one of
         * those two facets. This `id` must be unique in the page.
         *
         * Default value is the [`field`]{@link TimespanFacet.options.field} option value.
         */
        id: ComponentOptions_1.ComponentOptions.buildStringOption({
            postProcessing: function (value, options) { return value || options.field; }
        }) }, ResponsiveFacetOptions_1.ResponsiveFacetOptions);
    TimespanFacet.doExport = function () {
        GlobalExports_1.exportGlobally({
            TimespanFacet: TimespanFacet
        });
    };
    return TimespanFacet;
}(Component_1.Component));
exports.TimespanFacet = TimespanFacet;
Initialization_1.Initialization.registerAutoCreateComponent(TimespanFacet);
 
 
/***/ }),
/* 838 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
__webpack_require__(839);
var Dom_1 = __webpack_require__(0);
var Strings_1 = __webpack_require__(4);
var SVGIcons_1 = __webpack_require__(16);
var AnalyticsActionListMeta_1 = __webpack_require__(7);
var underscore_1 = __webpack_require__(1);
var AccessibilityUtils_1 = __webpack_require__(81);
var DynamicFacetBreadcrumbs = /** @class */ (function () {
    function DynamicFacetBreadcrumbs(facet, options) {
        this.facet = facet;
        this.options = options;
        this.create();
    }
    DynamicFacetBreadcrumbs.prototype.create = function () {
        this.element = Dom_1.$$('ul', { className: 'coveo-dynamic-facet-breadcrumb coveo-breadcrumb-item', ariaLabel: this.facet.options.title }).el;
        this.createAndAppendTitle();
        var activeFacetValues = this.facet.values.activeValues;
        var breadcrumbFacetValues = activeFacetValues.slice(0, this.facet.options.numberOfValuesInBreadcrumb);
        var collapsedFacetValues = activeFacetValues.slice(this.facet.options.numberOfValuesInBreadcrumb);
        this.createAndAppendBreadcrumbValues(breadcrumbFacetValues);
        if (collapsedFacetValues.length) {
            this.createAndAppendCollapsedBreadcrumbs(collapsedFacetValues);
        }
    };
    DynamicFacetBreadcrumbs.prototype.createAndAppendTitle = function () {
        var titleElement = Dom_1.$$(AccessibilityUtils_1.getHeadingTag(this.options && this.options.headingLevel, 'h3'), { className: 'coveo-dynamic-facet-breadcrumb-title', ariaHidden: 'true' }, this.facet.options.title + ":").el;
        this.element.appendChild(titleElement);
    };
    DynamicFacetBreadcrumbs.prototype.createAndAppendBreadcrumbValues = function (facetValues) {
        var _this = this;
        facetValues.forEach(function (facetValue) { return _this.createAndAppendBreadcrumbValue(facetValue); });
    };
    DynamicFacetBreadcrumbs.prototype.createAndAppendBreadcrumbValue = function (facetValue) {
        var _this = this;
        var listContainer = Dom_1.$$('li', { className: 'coveo-dynamic-facet-breadcrumb-value-list-item' }).el;
        var valueElement = Dom_1.$$('button', {
            type: 'button',
            className: 'coveo-dynamic-facet-breadcrumb-value',
            ariaLabel: Strings_1.l('RemoveFilterOn', facetValue.displayValue)
        }, underscore_1.escape(facetValue.displayValue)).el;
        var clearElement = Dom_1.$$('span', { className: 'coveo-dynamic-facet-breadcrumb-value-clear' }, SVGIcons_1.SVGIcons.icons.mainClear).el;
        valueElement.appendChild(clearElement);
        Dom_1.$$(valueElement).on('click', function () { return _this.valueSelectAction(facetValue); });
        listContainer.appendChild(valueElement);
        this.element.appendChild(listContainer);
    };
    DynamicFacetBreadcrumbs.prototype.valueSelectAction = function (facetValue) {
        var _this = this;
        this.facet.deselectValue(facetValue.value);
        this.facet.enablePreventAutoSelectionFlag();
        this.facet.triggerNewQuery(function () { return _this.logActionToAnalytics(); });
    };
    DynamicFacetBreadcrumbs.prototype.logActionToAnalytics = function () {
        this.facet.logAnalyticsEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.breadcrumbFacet, this.facet.basicAnalyticsFacetMeta);
    };
    DynamicFacetBreadcrumbs.prototype.createAndAppendCollapsedBreadcrumbs = function (facetValues) {
        var _this = this;
        var label = Strings_1.l('NMore', "" + facetValues.length);
        var title = facetValues.map(function (_a) {
            var value = _a.value;
            return value;
        }).join('\n');
        var collapsedElement = Dom_1.$$('button', {
            className: 'coveo-dynamic-facet-breadcrumb-collapse',
            type: 'button',
            title: title
        }, label).el;
        Dom_1.$$(collapsedElement).on('click', function () {
            Dom_1.$$(collapsedElement).remove();
            _this.createAndAppendBreadcrumbValues(facetValues);
        });
        this.element.appendChild(collapsedElement);
    };
    return DynamicFacetBreadcrumbs;
}());
exports.DynamicFacetBreadcrumbs = DynamicFacetBreadcrumbs;
 
 
/***/ }),
/* 839 */
/***/ (function(module, exports) {
 
// empty (null-loader)
 
/***/ }),
/* 840 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Strings_1 = __webpack_require__(4);
var SVGIcons_1 = __webpack_require__(16);
var Dom_1 = __webpack_require__(0);
var DynamicFacetHeaderButton_1 = __webpack_require__(398);
var SVGDom_1 = __webpack_require__(23);
var DynamicFacetHeaderCollapseToggle = /** @class */ (function () {
    function DynamicFacetHeaderCollapseToggle(options) {
        this.options = options;
        this.create();
    }
    DynamicFacetHeaderCollapseToggle.prototype.create = function () {
        var _this = this;
        var parent = Dom_1.$$('div');
        this.button = new DynamicFacetHeaderButton_1.DynamicFacetHeaderButton({
            label: Strings_1.l('CollapseFacet', this.options.title),
            iconSVG: SVGIcons_1.SVGIcons.icons.arrowUp,
            iconClassName: 'coveo-dynamic-facet-collapse-toggle-svg',
            className: 'coveo-dynamic-facet-header-collapse',
            shouldDisplay: true,
            action: function () { return _this.options.toggleCollapse(); }
        });
        parent.append(this.button.element);
        this.element = parent.el;
    };
    DynamicFacetHeaderCollapseToggle.prototype.toggleButton = function (isCollapsed) {
        var node = Dom_1.$$(this.button.element);
        var label = isCollapsed ? Strings_1.l('ExpandFacet', this.options.title) : Strings_1.l('CollapseFacet', this.options.title);
        var icon = isCollapsed ? SVGIcons_1.SVGIcons.icons.arrowDown : SVGIcons_1.SVGIcons.icons.arrowUp;
        node.setAttribute('aria-label', label);
        node.setAttribute('title', label);
        node.setAttribute('aria-expanded', (!isCollapsed).toString());
        node.toggleClass('coveo-dynamic-facet-header-expand', isCollapsed);
        node.toggleClass('coveo-dynamic-facet-header-collapse', !isCollapsed);
        node.setHtml(icon);
        SVGDom_1.SVGDom.addClassToSVGInContainer(node.el, 'coveo-dynamic-facet-collapse-toggle-svg');
    };
    return DynamicFacetHeaderCollapseToggle;
}());
exports.DynamicFacetHeaderCollapseToggle = DynamicFacetHeaderCollapseToggle;
 
 
/***/ }),
/* 841 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var TextInput_1 = __webpack_require__(80);
var Dom_1 = __webpack_require__(0);
var KeyboardUtils_1 = __webpack_require__(35);
var Utils_1 = __webpack_require__(5);
var ComboboxInput = /** @class */ (function () {
    function ComboboxInput(combobox) {
        this.combobox = combobox;
        this.inputOptions = {
            usePlaceholder: true,
            className: 'coveo-combobox-input',
            triggerOnChangeAsYouType: true,
            isRequired: false,
            icon: 'search'
        };
        this.create();
        this.element = this.textInput.getElement();
        this.inputElement = Dom_1.$$(this.element).find('input');
        this.addEventListeners();
        this.addAccessibilityAttributes();
    }
    Object.defineProperty(ComboboxInput.prototype, "value", {
        get: function () {
            return this.inputElement.value;
        },
        enumerable: true,
        configurable: true
    });
    ComboboxInput.prototype.create = function () {
        var _this = this;
        this.textInput = new TextInput_1.TextInput(function (inputInstance) { return _this.combobox.onInputChange(inputInstance.getValue()); }, this.combobox.options.placeholderText, this.inputOptions);
    };
    ComboboxInput.prototype.addEventListeners = function () {
        var _this = this;
        if (!this.combobox.options.clearOnBlur) {
            this.inputElement.addEventListener('focus', function () { return _this.combobox.onInputChange(_this.textInput.getValue()); });
        }
        this.combobox.element.addEventListener('focusout', function (e) { return _this.handleFocusOut(e); });
        this.combobox.element.addEventListener('keydown', function (e) { return _this.handleKeyboardDirection(e); });
        this.combobox.element.addEventListener('keyup', function (e) { return _this.handleKeyboardEnterEscape(e); });
    };
    ComboboxInput.prototype.addAccessibilityAttributes = function () {
        var listboxId = this.combobox.id + "-listbox";
        this.inputElement.setAttribute('role', 'combobox');
        this.inputElement.setAttribute('aria-owns', listboxId);
        this.inputElement.setAttribute('aria-haspopup', 'listbox');
        this.inputElement.setAttribute('aria-autocomplete', 'list');
        this.inputElement.setAttribute('id', this.combobox.id + "-input");
        this.inputElement.setAttribute('aria-label', this.combobox.options.label);
        this.updateAccessibilityAttributes({
            activeDescendant: '',
            expanded: false
        });
    };
    ComboboxInput.prototype.updateAccessibilityAttributes = function (attributes) {
        this.inputElement.setAttribute('aria-expanded', attributes.expanded ? 'true' : 'false');
        Utils_1.Utils.isEmptyString(attributes.activeDescendant)
            ? this.inputElement.removeAttribute('aria-activedescendant')
            : this.inputElement.setAttribute('aria-activedescendant', attributes.activeDescendant);
    };
    ComboboxInput.prototype.clearInput = function () {
        this.textInput.reset();
    };
    ComboboxInput.prototype.handleFocusOut = function (event) {
        var newTarget = event.relatedTarget;
        var focusInsideCombobox = this.combobox.element.contains(newTarget);
        if (focusInsideCombobox) {
            return;
        }
        var comboboxValuesHovered = Dom_1.$$(this.combobox.element).find('.coveo-combobox-values:hover');
        Iif (comboboxValuesHovered) {
            this.inputElement.focus();
            return;
        }
        this.combobox.onInputBlur();
    };
    ComboboxInput.prototype.handleKeyboardDirection = function (event) {
        switch (event.which) {
            case KeyboardUtils_1.KEYBOARD.DOWN_ARROW:
                event.preventDefault();
                this.combobox.values.focusNextValue();
                break;
            case KeyboardUtils_1.KEYBOARD.UP_ARROW:
                event.preventDefault();
                this.combobox.values.focusPreviousValue();
                break;
            case KeyboardUtils_1.KEYBOARD.HOME:
                event.preventDefault();
                this.combobox.values.focusFirstValue();
                break;
            case KeyboardUtils_1.KEYBOARD.END:
                event.preventDefault();
                this.combobox.values.focusLastValue();
                break;
        }
    };
    ComboboxInput.prototype.handleKeyboardEnterEscape = function (event) {
        switch (event.which) {
            case KeyboardUtils_1.KEYBOARD.ENTER:
                this.combobox.values.selectActiveValue();
                break;
            case KeyboardUtils_1.KEYBOARD.ESCAPE:
                Iif (Utils_1.Utils.isNonEmptyString(this.textInput.getValue())) {
                    event.stopPropagation();
                }
                this.combobox.clearAll();
                break;
        }
    };
    return ComboboxInput;
}());
exports.ComboboxInput = ComboboxInput;
 
 
/***/ }),
/* 842 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Dom_1 = __webpack_require__(0);
var underscore_1 = __webpack_require__(1);
var Strings_1 = __webpack_require__(4);
var UtilsModules_1 = __webpack_require__(67);
var ComboboxValues = /** @class */ (function () {
    function ComboboxValues(combobox) {
        var _this = this;
        this.combobox = combobox;
        this.mouseIsOverValue = false;
        this.isRenderingNewValues = false;
        this.values = [];
        this.element = Dom_1.$$('ul', {
            id: this.combobox.id + "-listbox",
            role: 'listbox',
            className: 'coveo-combobox-values',
            ariaLabelledby: this.combobox.id + "-input"
        }).el;
        Dom_1.$$(this.element).hide();
        this.isScrollable = !!this.combobox.options.scrollable;
        this.isScrollable && this.element.addEventListener('scroll', function () { return _this.onScroll(); });
    }
    ComboboxValues.prototype.renderFromResponse = function (response) {
        this.isRenderingNewValues = true;
        this.clearValues();
        this.values = this.combobox.options.createValuesFromResponse(response);
        this.render();
        this.combobox.updateAriaLive();
        this.isRenderingNewValues = false;
    };
    ComboboxValues.prototype.render = function () {
        Dom_1.$$(this.element).show();
        if (!this.hasValues()) {
            return this.renderNoValuesFound();
        }
        this.renderValues();
        this.addEventListeners();
        this.updateAccessibilityAttributes();
    };
    ComboboxValues.prototype.renderValues = function () {
        var _this = this;
        var fragment = document.createDocumentFragment();
        this.values.forEach(function (value, index) {
            var elementWrapper = Dom_1.$$('li', { id: _this.combobox.id + "-value-" + index, className: 'coveo-combobox-value', role: 'option', tabindex: 0 }, value.element).el;
            _this.highlightCurrentQueryInSearchResults(value.element);
            value.element = elementWrapper;
            fragment.appendChild(value.element);
        });
        this.element.appendChild(fragment);
    };
    ComboboxValues.prototype.highlightCurrentQueryInSearchResults = function (searchResult) {
        Eif (this.combobox.options.highlightValueClassName) {
            var query = this.combobox.element.querySelector('input').value;
            var result_1 = Dom_1.$$(searchResult).hasClass(this.combobox.options.highlightValueClassName)
                ? searchResult
                : Dom_1.$$(searchResult).find("." + this.combobox.options.highlightValueClassName);
            Eif (result_1) {
                var text = Dom_1.$$(result_1).text();
                var nodes = UtilsModules_1.HighlightUtils.highlight(text, query, 'coveo-highlight');
                Dom_1.$$(result_1).empty();
                nodes.forEach(function (node) { return result_1.appendChild(node); });
            }
        }
    };
    ComboboxValues.prototype.hasValues = function () {
        return !!this.numberOfValues;
    };
    Object.defineProperty(ComboboxValues.prototype, "numberOfValues", {
        get: function () {
            return this.values.length;
        },
        enumerable: true,
        configurable: true
    });
    ComboboxValues.prototype.renderNoValuesFound = function () {
        var noValuesFoundElement = Dom_1.$$('li', {
            role: 'option',
            className: 'coveo-combobox-value-not-found'
        }, Strings_1.l('NoValuesFound')).el;
        this.element.appendChild(noValuesFoundElement);
    };
    ComboboxValues.prototype.addEventListeners = function () {
        var _this = this;
        this.values.forEach(function (value) {
            Dom_1.$$(value.element).on('mouseenter', function () { return (_this.mouseIsOverValue = true); });
            Dom_1.$$(value.element).on('mouseleave', function () { return (_this.mouseIsOverValue = false); });
            Dom_1.$$(value.element).on('click', function (e) { return _this.onValueClick(e); });
            Dom_1.$$(value.element).on('focus', function () { return _this.setKeyboardActiveValue(value); });
        });
    };
    ComboboxValues.prototype.onValueClick = function (e) {
        var target = e.target;
        var targetElement = Dom_1.$$(target).hasClass('coveo-combobox-value') ? target : Dom_1.$$(target).parent('coveo-combobox-value');
        Iif (!targetElement) {
            return;
        }
        var targetId = targetElement.getAttribute('id');
        var value = underscore_1.find(this.values, function (_a) {
            var element = _a.element;
            return element.getAttribute('id') === targetId;
        });
        value && this.combobox.options.onSelectValue(value);
        this.combobox.clearAll();
    };
    ComboboxValues.prototype.updateAccessibilityAttributes = function () {
        var activeDescendant = this.keyboardActiveValue ? this.keyboardActiveValue.element.getAttribute('id') : '';
        this.combobox.updateAccessibilityAttributes({
            activeDescendant: activeDescendant,
            expanded: this.hasValues()
        });
    };
    ComboboxValues.prototype.clearValues = function () {
        this.mouseIsOverValue = false;
        this.resetKeyboardActiveValue();
        Dom_1.$$(this.element).empty();
        Dom_1.$$(this.element).hide();
        this.values = [];
        this.updateAccessibilityAttributes();
    };
    ComboboxValues.prototype.setKeyboardActiveValue = function (value) {
        this.resetKeyboardActiveValue();
        this.keyboardActiveValue = value;
        this.activateFocusOnValue(this.keyboardActiveValue);
        this.updateAccessibilityAttributes();
    };
    ComboboxValues.prototype.resetKeyboardActiveValue = function () {
        if (!this.keyboardActiveValue) {
            return;
        }
        this.deactivateFocusOnValue(this.keyboardActiveValue);
        this.keyboardActiveValue = null;
    };
    ComboboxValues.prototype.activateFocusOnValue = function (_a) {
        var element = _a.element;
        Dom_1.$$(element).addClass('coveo-focused');
        element.setAttribute('aria-selected', 'true');
    };
    ComboboxValues.prototype.deactivateFocusOnValue = function (_a) {
        var element = _a.element;
        Dom_1.$$(element).removeClass('coveo-focused');
        element.setAttribute('aria-selected', 'false');
    };
    ComboboxValues.prototype.selectActiveValue = function () {
        if (!this.keyboardActiveValue) {
            return;
        }
        this.combobox.options.onSelectValue(this.keyboardActiveValue);
        this.combobox.clearAll();
    };
    ComboboxValues.prototype.onScroll = function () {
        var scrollEndReached = this.element.scrollTop + this.element.clientHeight >= this.element.scrollHeight;
        if (scrollEndReached && this.combobox.options.scrollable.areMoreValuesAvailable()) {
            this.combobox.onScrollEndReached();
        }
    };
    ComboboxValues.prototype.resetScroll = function () {
        Iif (!this.isScrollable) {
            return;
        }
        this.element.style.maxHeight = this.combobox.options.scrollable.maxDropdownHeight + "px";
        this.element.scrollTop = 0;
    };
    ComboboxValues.prototype.focusFirstValue = function () {
        Iif (!this.hasValues()) {
            return;
        }
        this.firstValue.element.focus();
    };
    ComboboxValues.prototype.focusLastValue = function () {
        Iif (!this.hasValues()) {
            return;
        }
        this.lastValue.element.focus();
    };
    ComboboxValues.prototype.focusNextValue = function () {
        Iif (!this.hasValues()) {
            return;
        }
        var nextActiveValue = this.nextOrFirstValue;
        nextActiveValue.element.focus();
    };
    ComboboxValues.prototype.focusPreviousValue = function () {
        Iif (!this.hasValues()) {
            return;
        }
        var previousActiveValue = this.previousOrLastValue;
        previousActiveValue.element.focus();
    };
    Object.defineProperty(ComboboxValues.prototype, "nextOrFirstValue", {
        get: function () {
            if (!this.keyboardActiveValue) {
                return this.firstValue;
            }
            var nextValueIndex = (this.values.indexOf(this.keyboardActiveValue) + 1) % this.numberOfValues;
            return this.values[nextValueIndex];
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ComboboxValues.prototype, "firstValue", {
        get: function () {
            return this.values[0];
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ComboboxValues.prototype, "previousOrLastValue", {
        get: function () {
            if (!this.keyboardActiveValue) {
                return this.lastValue;
            }
            var previousValueIndex = this.values.indexOf(this.keyboardActiveValue) - 1;
            return previousValueIndex >= 0 ? this.values[previousValueIndex] : this.values[this.numberOfValues - 1];
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ComboboxValues.prototype, "lastValue", {
        get: function () {
            var lastValueIndex = this.numberOfValues - 1;
            return this.values[lastValueIndex];
        },
        enumerable: true,
        configurable: true
    });
    ComboboxValues.prototype.saveFocusedValue = function () {
        if (!this.keyboardActiveValue) {
            this.focusedValueId = null;
            return;
        }
        this.focusedValueId = this.keyboardActiveValue.element.id;
    };
    ComboboxValues.prototype.restoreFocusedValue = function () {
        if (!this.focusedValueId) {
            return;
        }
        var element = Dom_1.$$(this.element).find("#" + this.focusedValueId);
        element.focus();
        this.focusedValueId = null;
    };
    return ComboboxValues;
}());
exports.ComboboxValues = ComboboxValues;
 
 
/***/ }),
/* 843 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __assign = (this && this.__assign) || Object.assign || function(t) {
    for (var s, i = 1, n = arguments.length; i < n; i++) {
        s = arguments[i];
        for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
            t[p] = s[p];
    }
    return t;
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { Iif (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        Iif (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            Iif (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
            Iif (y = 0, t) op = [0, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    Eif (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        Eif (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
Object.defineProperty(exports, "__esModule", { value: true });
var FileTypes_1 = __webpack_require__(138);
var QueryUtils_1 = __webpack_require__(37);
var DateUtils_1 = __webpack_require__(43);
var DynamicFacetRequestBuilder_1 = __webpack_require__(203);
var FacetSearchController = /** @class */ (function () {
    function FacetSearchController(facet) {
        this.facet = facet;
        this.terms = '';
        this.pageCount = 1;
        this.numberOfValuesMultiplier = 3;
        this.moreValuesAvailable = true;
    }
    FacetSearchController.prototype.getMonthsValueCaptions = function () {
        var monthsValueCaptions = {};
        for (var month = 1; month <= 12; month++) {
            var key = ("0" + month).substr(-2);
            monthsValueCaptions[key] = DateUtils_1.DateUtils.monthToString(month - 1);
        }
        return monthsValueCaptions;
    };
    FacetSearchController.prototype.addTypesCaptionsIfNecessary = function () {
        var field = this.facet.options.field.toLowerCase();
        var isFileType = QueryUtils_1.QueryUtils.isStratusAgnosticField(field, '@filetype');
        var isObjectType = QueryUtils_1.QueryUtils.isStratusAgnosticField(field, '@objecttype');
        var isMonth = QueryUtils_1.QueryUtils.isStratusAgnosticField(field, '@month');
        if (isFileType || isObjectType) {
            return FileTypes_1.FileTypes.getFileTypeCaptions();
        }
        if (isMonth) {
            return this.getMonthsValueCaptions();
        }
        return {};
    };
    Object.defineProperty(FacetSearchController.prototype, "captions", {
        get: function () {
            return __assign({}, this.addTypesCaptionsIfNecessary(), this.facet.options.valueCaption);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(FacetSearchController.prototype, "numberOfValues", {
        get: function () {
            return this.facet.options.numberOfValues * this.numberOfValuesMultiplier * this.pageCount;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(FacetSearchController.prototype, "request", {
        get: function () {
            var optionalLeadingWildcard = this.facet.options.useLeadingWildcardInFacetSearch ? '*' : '';
            return {
                field: this.facet.fieldName,
                filterFacetCount: DynamicFacetRequestBuilder_1.determineFilterFacetCount(this.facet.options),
                numberOfValues: this.numberOfValues,
                ignoreValues: this.facet.values.activeValues.map(function (value) { return value.value; }),
                captions: this.captions,
                searchContext: this.facet.queryController.getLastQuery(),
                query: "" + optionalLeadingWildcard + this.terms + "*"
            };
        },
        enumerable: true,
        configurable: true
    });
    FacetSearchController.prototype.triggerRequest = function () {
        return __awaiter(this, void 0, void 0, function () {
            var response;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0: return [4 /*yield*/, this.facet.queryController.getEndpoint().facetSearch(this.request)];
                    case 1:
                        response = _a.sent();
                        this.moreValuesAvailable = response.moreValuesAvailable;
                        return [2 /*return*/, response];
                }
            });
        });
    };
    FacetSearchController.prototype.search = function (terms) {
        this.terms = terms;
        this.pageCount = 1;
        return this.triggerRequest();
    };
    FacetSearchController.prototype.fetchMoreResults = function () {
        this.pageCount++;
        return this.triggerRequest();
    };
    return FacetSearchController;
}());
exports.FacetSearchController = FacetSearchController;
 
 
/***/ }),
/* 844 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Dom_1 = __webpack_require__(0);
var DynamicFacetValueCheckbox_1 = __webpack_require__(401);
var DynamicFacetSearchValueRenderer = /** @class */ (function () {
    function DynamicFacetSearchValueRenderer(facetValue, facet) {
        this.facetValue = facetValue;
        this.facet = facet;
    }
    DynamicFacetSearchValueRenderer.prototype.render = function () {
        this.dom = Dom_1.$$('div', {
            className: 'coveo-dynamic-facet-value',
            dataValue: this.facetValue.value
        });
        this.renderCheckbox();
        return this.dom.el;
    };
    DynamicFacetSearchValueRenderer.prototype.renderCheckbox = function () {
        this.valueCheckbox = new DynamicFacetValueCheckbox_1.DynamicFacetValueCheckbox(this.facetValue);
        Dom_1.$$(this.valueCheckbox.element).find('button').setAttribute('tabindex', '-1');
        this.dom.append(this.valueCheckbox.element);
    };
    DynamicFacetSearchValueRenderer.prototype.selectAction = function () {
        var _this = this;
        this.facet.enableFreezeFacetOrderFlag();
        this.facet.toggleSelectValue(this.facetValue.value);
        this.facetValue.select();
        this.facet.scrollToTop();
        this.facet.triggerNewQuery(function () { return _this.facetValue.logSelectActionToAnalytics(); });
    };
    return DynamicFacetSearchValueRenderer;
}());
exports.DynamicFacetSearchValueRenderer = DynamicFacetSearchValueRenderer;
 
 
/***/ }),
/* 845 */
/***/ (function(module, exports) {
 
// empty (null-loader)
 
/***/ }),
/* 846 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        Iif (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            Iif (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
            Iif (y = 0, t) op = [0, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    Eif (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        Iif (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
Object.defineProperty(exports, "__esModule", { value: true });
__webpack_require__(397);
var Initialization_1 = __webpack_require__(8);
var DynamicFacet_1 = __webpack_require__(272);
var IDynamicFacetRange_1 = __webpack_require__(205);
var ComponentOptions_1 = __webpack_require__(13);
var GlobalExports_1 = __webpack_require__(10);
var Strings_1 = __webpack_require__(4);
var FacetRequest_1 = __webpack_require__(127);
var DynamicFacetValues_1 = __webpack_require__(202);
var DynamicFacetRangeValueCreator_1 = __webpack_require__(402);
var DynamicFacetRangeQueryController_1 = __webpack_require__(849);
var Core_1 = __webpack_require__(9);
var FacetRangeSortOrder_1 = __webpack_require__(275);
var Logger_1 = __webpack_require__(18);
/**
 * A `DynamicFacetRange` is a [facet](https://docs.coveo.com/en/198/) whose values are expressed as ranges.
 *
 * You must set the [`field`]{@link DynamicFacet.options.field} option to a value targeting a numeric or date [field](https://docs.coveo.com/en/200/)
 * in your index for this component to work.
 *
 * This component extends the [`DynamicFacet`]{@link DynamicFacet} component and supports all `DynamicFacet` options except:
 *
 * - [`enableFacetSearch`]{@link DynamicFacet.options.enableFacetSearch}
 * - [`useLeadingWildcardInFacetSearch`]{@link DynamicFacet.options.useLeadingWildcardInFacetSearch}
 * - [`enableMoreLess`]{@link DynamicFacet.options.enableMoreLess}
 * - [`valueCaption`]{@link DynamicFacet.options.valueCaption}
 *
 * @notSupportedIn salesforcefree
 * @availablesince [October 2019 Release (v2.7219)](https://docs.coveo.com/en/3084/)
 */
var DynamicFacetRange = /** @class */ (function (_super) {
    __extends(DynamicFacetRange, _super);
    /**
     * Creates a new `DynamicFacetRange` instance.
     *
     * @param element The element from which to instantiate the component.
     * @param options The component options.
     * @param bindings The component bindings. Automatically resolved by default.
     */
    function DynamicFacetRange(element, options, bindings) {
        var _this = _super.call(this, element, ComponentOptions_1.ComponentOptions.initComponentOptions(element, DynamicFacetRange, options), bindings, DynamicFacetRange.ID) || this;
        _this.element = element;
        _this.options = options;
        _this.isFieldValueCompatible = false;
        _this.disableUnavailableOptions();
        return _this;
    }
    DynamicFacetRange.prototype.initValues = function () {
        this.values = new DynamicFacetValues_1.DynamicFacetValues(this, DynamicFacetRangeValueCreator_1.DynamicFacetRangeValueCreator);
    };
    DynamicFacetRange.prototype.initDynamicFacetQueryController = function () {
        this.dynamicFacetQueryController = new DynamicFacetRangeQueryController_1.DynamicFacetRangeQueryController(this);
    };
    DynamicFacetRange.prototype.disableUnavailableOptions = function () {
        this.options.enableFacetSearch = false;
        this.options.useLeadingWildcardInFacetSearch = false;
        this.options.enableMoreLess = false;
        this.options.valueCaption = {};
        this.options.sortCriteria = undefined;
        this.options.customSort = undefined;
    };
    Object.defineProperty(DynamicFacetRange.prototype, "facetType", {
        get: function () {
            if (this.options.valueFormat === IDynamicFacetRange_1.DynamicFacetRangeValueFormat.date) {
                return FacetRequest_1.FacetType.dateRange;
            }
            return FacetRequest_1.FacetType.numericalRange;
        },
        enumerable: true,
        configurable: true
    });
    DynamicFacetRange.prototype.showMoreValues = function () {
        this.logger.warn('The "showMoreValues" method is not available on the "DynamicFacetRange" component');
    };
    DynamicFacetRange.prototype.showLessValues = function () {
        this.logger.warn('The "showLessValues" method is not available on the "DynamicFacetRange" component');
    };
    DynamicFacetRange.prototype.triggerNewIsolatedQuery = function () {
        return __awaiter(this, void 0, void 0, function () {
            return __generator(this, function (_a) {
                this.logger.warn('The "triggerNewIsolatedQuery" method is not available on the "DynamicFacetRange" component');
                return [2 /*return*/];
            });
        });
    };
    DynamicFacetRange.ID = 'DynamicFacetRange';
    DynamicFacetRange.parent = DynamicFacet_1.DynamicFacet;
    DynamicFacetRange.doExport = function () { return GlobalExports_1.exportGlobally({ DynamicFacetRange: DynamicFacetRange }); };
    /**
     * The options for the DynamicFacetRange
     * @componentOptions
     */
    DynamicFacetRange.options = {
        /**
         * The label to insert between the minimum and maximum value of each range displayed in the facet.
         *
         * **Default:** The localized string for `to`.
         *
         * @examples until, up to
         */
        valueSeparator: ComponentOptions_1.ComponentOptions.buildLocalizedStringOption({
            localizedString: function () { return Strings_1.l('To'); },
            section: 'CommonOptions'
        }),
        field: ComponentOptions_1.ComponentOptions.buildFieldOption({ required: true, section: 'CommonOptions' }),
        /**
         * The string format to apply to the minimum and maximum value of each range displayed in the facet.
         *
         * See [`DynamicFacetRangeValueFormat`]{@link DynamicFacetRangeValueFormat} for the list and
         * description of allowed formats.
         *
         * **Default:** If the [`field`]{@link DynamicFacet.options.field} contains "date", the format will be [`date`]{@link DynamicFacetRangeValueFormat.date}.
         * Else, it will be [`number`]{@link DynamicFacetRangeValueFormat.number}.
         *
         * @examples date
         */
        valueFormat: ComponentOptions_1.ComponentOptions.buildStringOption({
            postProcessing: function (value, options) {
                if (IDynamicFacetRange_1.isFacetRangeValueFormat(value)) {
                    return value;
                }
                if (options.field.indexOf('date') !== -1) {
                    return IDynamicFacetRange_1.DynamicFacetRangeValueFormat.date;
                }
                return IDynamicFacetRange_1.DynamicFacetRangeValueFormat.number;
            },
            section: 'CommonOptions'
        }),
        /**
         * The number of decimals to display when the [`valueFormat`]{@link DynamicFacetRange.options.valueFormat} is [`number`]{@link DynamicFacetRangeValueFormat.number}
         *
         * By default, the number of decimals is what's returned by the index.
         *
         * @examples 2
         */
        numberOfDecimals: ComponentOptions_1.ComponentOptions.buildNumberOption(),
        /**
         * The currency symbol to use if the [`valueFormat`]{@link DynamicFacetRange.options.valueFormat} is [`currency`]{@link DynamicFacetRangeValueFormat.currency}.
         *
         * By default, the component uses the currency associated with the currently loaded culture file (see [Changing the Language of Your Search Interface](https://docs.coveo.com/421/)).
         */
        currencySymbol: ComponentOptions_1.ComponentOptions.buildStringOption({ section: 'CommonOptions' }),
        /**
         * The list of [range values]{@link IRangeValue} to request (see [Requesting Specific FacetRange Values](https://docs.coveo.com/en/2790/)).
         *
         * This value will override the [`numberOfValues`]{@link DynamicFacet.options.numberOfValues} value.
         *
         * If this option is not defined, the index will try to generate automatic ranges.
         */
        ranges: ComponentOptions_1.ComponentOptions.buildJsonOption({
            section: 'CommonOptions',
            postProcessing: function (ranges) { return (Core_1.Utils.isNonEmptyArray(ranges) ? ranges : []); }
        }),
        /**
         * The sort order to use for this facet.
         *
         * Can be either `ascending` or `descending`.
         *
         * **Default:** `ascending`.
         */
        sortOrder: ComponentOptions_1.ComponentOptions.buildStringOption({
            postProcessing: function (value) {
                if (!value) {
                    return undefined;
                }
                Eif (FacetRangeSortOrder_1.isFacetRangeSortOrder(value)) {
                    return value;
                }
                new Logger_1.Logger(value).warn('sortOrder is not of the the allowed values: "ascending", "descending"');
                return undefined;
            },
            section: 'Sorting'
        })
    };
    return DynamicFacetRange;
}(DynamicFacet_1.DynamicFacet));
exports.DynamicFacetRange = DynamicFacetRange;
Initialization_1.Initialization.registerAutoCreateComponent(DynamicFacetRange);
DynamicFacetRange.doExport();
 
 
/***/ }),
/* 847 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __assign = (this && this.__assign) || Object.assign || function(t) {
    for (var s, i = 1, n = arguments.length; i < n; i++) {
        s = arguments[i];
        for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
            t[p] = s[p];
    }
    return t;
};
Object.defineProperty(exports, "__esModule", { value: true });
var Globalize = __webpack_require__(28);
var RangeValue_1 = __webpack_require__(403);
var NumberUtils_1 = __webpack_require__(848);
var util_1 = __webpack_require__(404);
var DateUtils_1 = __webpack_require__(43);
var IDynamicFacetRange_1 = __webpack_require__(205);
var Logger_1 = __webpack_require__(18);
var Core_1 = __webpack_require__(9);
var underscore_1 = __webpack_require__(1);
var DynamicFacetRangeValueParser = /** @class */ (function () {
    function DynamicFacetRangeValueParser(facet) {
        this.facet = facet;
    }
    Object.defineProperty(DynamicFacetRangeValueParser.prototype, "valueFormat", {
        get: function () {
            return this.facet.options.valueFormat;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(DynamicFacetRangeValueParser.prototype, "valueSeparator", {
        get: function () {
            return this.facet.options.valueSeparator;
        },
        enumerable: true,
        configurable: true
    });
    DynamicFacetRangeValueParser.prototype.parseDateFromRangeType = function (value) {
        var parsedDate = DateUtils_1.DateUtils.convertToStandardDate(value);
        if (!DateUtils_1.DateUtils.isValid(parsedDate)) {
            new Logger_1.Logger(this).warn('Date value is not valid', value);
            return null;
        }
        return parsedDate;
    };
    DynamicFacetRangeValueParser.prototype.formatDisplayValueFromLimit = function (value) {
        switch (this.valueFormat) {
            case IDynamicFacetRange_1.DynamicFacetRangeValueFormat.number:
                var numberOfDecimals = underscore_1.isUndefined(this.facet.options.numberOfDecimals)
                    ? NumberUtils_1.NumberUtils.countDecimals("" + value)
                    : this.facet.options.numberOfDecimals;
                return Globalize.format(value, "n" + numberOfDecimals);
            case IDynamicFacetRange_1.DynamicFacetRangeValueFormat.currency:
                return Core_1.CurrencyUtils.currencyToString(parseFloat("" + value), {
                    symbol: this.facet.options.currencySymbol,
                    decimals: NumberUtils_1.NumberUtils.countDecimals("" + value) ? 2 : 0
                });
            case IDynamicFacetRange_1.DynamicFacetRangeValueFormat.date:
                return DateUtils_1.DateUtils.dateToString(this.parseDateFromRangeType(value), {
                    alwaysIncludeTime: false,
                    includeTimeIfThisWeek: false,
                    includeTimeIfToday: false,
                    omitYearIfCurrentOne: false,
                    useTodayYesterdayAndTomorrow: false,
                    useWeekdayIfThisWeek: false
                });
            default:
                return "" + value;
        }
    };
    DynamicFacetRangeValueParser.prototype.formatDisplayValue = function (range) {
        var formattedStart = this.formatDisplayValueFromLimit(range.start);
        var formattedEnd = this.formatDisplayValueFromLimit(range.end);
        return formattedStart + " " + this.valueSeparator + " " + formattedEnd;
    };
    DynamicFacetRangeValueParser.prototype.validateRangeLimit = function (value) {
        switch (this.valueFormat) {
            case IDynamicFacetRange_1.DynamicFacetRangeValueFormat.number:
            case IDynamicFacetRange_1.DynamicFacetRangeValueFormat.currency:
                return this.validateNumberValue(value);
            case IDynamicFacetRange_1.DynamicFacetRangeValueFormat.date:
                return this.validateDateValue(value);
            default:
                return "" + value;
        }
    };
    DynamicFacetRangeValueParser.prototype.validateNumberValue = function (value) {
        var number = parseFloat("" + value);
        return isNaN(number) ? null : number;
    };
    DynamicFacetRangeValueParser.prototype.validateDateValue = function (value) {
        var parsedValue = DateUtils_1.DateUtils.dateTimeForQuery(this.parseDateFromRangeType(value));
        return parsedValue === 'Invalid date' ? null : parsedValue;
    };
    DynamicFacetRangeValueParser.prototype.validate = function (unvalidatedRange) {
        var start = this.validateRangeLimit(unvalidatedRange.start);
        var end = this.validateRangeLimit(unvalidatedRange.end);
        if (util_1.isNull(start) || util_1.isNull(end)) {
            return null;
        }
        return __assign({}, unvalidatedRange, { start: start,
            end: end });
    };
    DynamicFacetRangeValueParser.prototype.formatValue = function (range) {
        var scope = range.endInclusive ? RangeValue_1.RangeEndScope.Inclusive : RangeValue_1.RangeEndScope.Exclusive;
        return range.start + ".." + range.end + scope;
    };
    DynamicFacetRangeValueParser.prototype.parse = function (value) {
        var valueRegex = new RegExp("^(.+)\\.\\.(.+)(" + RangeValue_1.RangeEndScope.Inclusive + "|" + RangeValue_1.RangeEndScope.Exclusive + ")$");
        var startAndEnd = valueRegex.exec(value);
        if (!startAndEnd) {
            return null;
        }
        var start = this.validateRangeLimit(startAndEnd[1]);
        var end = this.validateRangeLimit(startAndEnd[2]);
        if (util_1.isNull(start) || util_1.isNull(end)) {
            return null;
        }
        return {
            start: start,
            end: end,
            endInclusive: startAndEnd[3] === RangeValue_1.RangeEndScope.Inclusive
        };
    };
    return DynamicFacetRangeValueParser;
}());
exports.DynamicFacetRangeValueParser = DynamicFacetRangeValueParser;
 
 
/***/ }),
/* 848 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var util_1 = __webpack_require__(404);
var NumberUtils = /** @class */ (function () {
    function NumberUtils() {
    }
    NumberUtils.countDecimals = function (value) {
        var decimalsMatch = /^\d+\.?([\d]*)$/.exec("" + value);
        return util_1.isNull(decimalsMatch) ? 0 : decimalsMatch[1].length;
    };
    return NumberUtils;
}());
exports.NumberUtils = NumberUtils;
 
 
/***/ }),
/* 849 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __assign = (this && this.__assign) || Object.assign || function(t) {
    for (var s, i = 1, n = arguments.length; i < n; i++) {
        s = arguments[i];
        for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
            t[p] = s[p];
    }
    return t;
};
Object.defineProperty(exports, "__esModule", { value: true });
var DynamicFacetQueryController_1 = __webpack_require__(400);
var DynamicFacetRangeQueryController = /** @class */ (function (_super) {
    __extends(DynamicFacetRangeQueryController, _super);
    function DynamicFacetRangeQueryController() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    DynamicFacetRangeQueryController.prototype.buildFacetRequest = function () {
        return __assign({}, this.requestBuilder.buildBaseRequestForQuery(), { currentValues: this.currentValues, numberOfValues: this.numberOfValues, freezeCurrentValues: false, sortCriteria: this.facet.options.sortOrder, generateAutomaticRanges: !this.manualRangesAreDefined });
    };
    Object.defineProperty(DynamicFacetRangeQueryController.prototype, "numberOfValues", {
        get: function () {
            return this.manualRangesAreDefined ? this.facet.options.ranges.length : this.facet.options.numberOfValues;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(DynamicFacetRangeQueryController.prototype, "manualRangesAreDefined", {
        get: function () {
            return !!this.facet.options.ranges.length;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(DynamicFacetRangeQueryController.prototype, "currentValues", {
        get: function () {
            if (!this.manualRangesAreDefined && !this.facet.hasActiveValues) {
                return [];
            }
            return this.facet.values.allFacetValues.map(function (_a) {
                var start = _a.start, end = _a.end, endInclusive = _a.endInclusive, state = _a.state;
                return ({
                    start: start,
                    end: end,
                    endInclusive: endInclusive,
                    state: state
                });
            });
        },
        enumerable: true,
        configurable: true
    });
    return DynamicFacetRangeQueryController;
}(DynamicFacetQueryController_1.DynamicFacetQueryController));
exports.DynamicFacetRangeQueryController = DynamicFacetRangeQueryController;
 
 
/***/ }),
/* 850 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
__webpack_require__(1540);
var Core_1 = __webpack_require__(9);
var GlobalExports_1 = __webpack_require__(10);
var Component_1 = __webpack_require__(6);
/**
 * Depending on its configuration, this component will render badges on query result items whose ranking scores were increased by [featured results](https://docs.coveo.com/en/1961/) query pipeline rules and/or [Coveo ML ART](https://docs.coveo.com/en/1671/#automatic-relevance-tuning-art-feature).
 *
 * This component can be put anywhere in the markup configuration of a search interface. However, it is meant to be initialized only once, and should thus never be included in a result template.
 *
 * @externaldocs [Adding Promoted Results Badges](https://docs.coveo.com/en/3123/)
 * @availablesince [July 2018 Release (v2.4382.10)](https://docs.coveo.com/en/1360/)
 */
var PromotedResultsBadge = /** @class */ (function (_super) {
    __extends(PromotedResultsBadge, _super);
    function PromotedResultsBadge(element, options, bindings) {
        var _this = _super.call(this, element, PromotedResultsBadge.ID, bindings) || this;
        _this.element = element;
        _this.options = options;
        _this.bindings = bindings;
        _this.options = Core_1.ComponentOptions.initComponentOptions(element, PromotedResultsBadge, options);
        _this.bind.onRootElement(Core_1.ResultListEvents.newResultDisplayed, function (args) {
            var badge = _this.buildBadge(args.result, args.item);
            if (badge) {
                _this.appendBadge(badge, args.item);
            }
        });
        return _this;
    }
    PromotedResultsBadge.prototype.buildBadge = function (result, resultElement) {
        if (!this.shouldShowABadge(result, resultElement)) {
            return null;
        }
        var badge = Core_1.$$('div', {
            className: this.getClassName(result)
        });
        this.applyTagline(result, badge);
        this.applyColor(result, badge);
        return badge;
    };
    PromotedResultsBadge.prototype.appendBadge = function (badge, resultElement) {
        if (this.isCardLayout(resultElement)) {
            this.addBadgeToCardLayout(badge, resultElement);
        }
        else {
            Core_1.$$(resultElement).prepend(badge.el);
        }
    };
    PromotedResultsBadge.prototype.addBadgeToCardLayout = function (badge, resultElement) {
        var container;
        Eif (resultElement.parentElement == null) {
            container = Core_1.$$('div', {
                className: 'coveo-promoted-result-badge-container-card-layout'
            });
            container.insertBefore(resultElement);
        }
        else {
            container = Core_1.$$(resultElement.parentElement);
        }
        container.append(badge.el);
        container.append(resultElement);
    };
    PromotedResultsBadge.prototype.applyColor = function (result, badge) {
        if (this.isFeatured(result) && this.options.colorForFeaturedResults) {
            badge.el.style.backgroundColor = this.options.colorForFeaturedResults;
        }
        if (this.isRecommended(result) && this.options.colorForRecommendedResults) {
            badge.el.style.backgroundColor = this.options.colorForRecommendedResults;
        }
    };
    PromotedResultsBadge.prototype.applyTagline = function (result, badge) {
        if (this.isFeatured(result) && this.options.showBadgeForFeaturedResults) {
            badge.text(this.options.captionForFeatured);
        }
        if (this.isRecommended(result) && this.options.showBadgeForRecommendedResults) {
            return badge.text(this.options.captionForRecommended);
        }
    };
    PromotedResultsBadge.prototype.isFeatured = function (result) {
        return result.isTopResult;
    };
    PromotedResultsBadge.prototype.isRecommended = function (result) {
        return result.isRecommendation && !result.isTopResult;
    };
    PromotedResultsBadge.prototype.isTableLayout = function (resultElement) {
        return Core_1.$$(resultElement).hasClass('coveo-table-layout');
    };
    PromotedResultsBadge.prototype.isCardLayout = function (resultElement) {
        return Core_1.$$(resultElement).hasClass('coveo-card-layout');
    };
    PromotedResultsBadge.prototype.getClassName = function (result) {
        return "coveo-promoted-result-badge coveo-" + (this.isFeatured(result) ? 'featured' : 'recommended') + "-result-badge";
    };
    PromotedResultsBadge.prototype.shouldShowABadge = function (result, resultElement) {
        if (this.isTableLayout(resultElement)) {
            return false;
        }
        if (this.isFeatured(result) && this.options.showBadgeForFeaturedResults) {
            return true;
        }
        if (this.isRecommended(result) && this.options.showBadgeForRecommendedResults) {
            return true;
        }
        return false;
    };
    PromotedResultsBadge.ID = 'PromotedResultsBadge';
    PromotedResultsBadge.doExport = function () {
        GlobalExports_1.exportGlobally({
            PromotedResultsBadge: PromotedResultsBadge
        });
    };
    /**
     * @componentOptions
     */
    PromotedResultsBadge.options = {
        /**
         * Whether to show a badge when a result was promoted by a featured results query pipeline rule.
         */
        showBadgeForFeaturedResults: Core_1.ComponentOptions.buildBooleanOption({ defaultValue: true }),
        /**
         * Whether to show a badge when a result was promoted by Coveo ML ART.
         */
        showBadgeForRecommendedResults: Core_1.ComponentOptions.buildBooleanOption({ defaultValue: false }),
        /**
         * The caption to show on the badge for results promoted by Coveo ML ART.
         *
         * Default value is the localized string for `Recommended`.
         *
         * @examples Recommended by Coveo ML
         */
        captionForRecommended: Core_1.ComponentOptions.buildLocalizedStringOption({
            localizedString: function () { return Core_1.l('Recommended'); },
            depend: 'showBadgeForRecommendedResults'
        }),
        /**
         * The caption to show on the badge for results promoted by a _featured results_ query pipeline rule.
         *
         * Default value is the localized string for `Featured`.
         *
         * @examples Recommended by ACME
         */
        captionForFeatured: Core_1.ComponentOptions.buildLocalizedStringOption({
            localizedString: function () { return Core_1.l('Featured'); },
            depend: 'showBadgeForFeaturedResults'
        }),
        /**
         * The badge color for results promoted by a _featured results_ query pipeline rule.
         *
         * Can be specified using:
         * - a hexadecimal value
         * - an RGB value
         * - a CSS color name
         *
         * @examples #f58020, rgb(125 10 36), red
         *
         * Default value is controlled through the default stylesheet of the framework.
         */
        colorForFeaturedResults: Core_1.ComponentOptions.buildColorOption({ depend: 'showBadgeForFeaturedResults' }),
        /**
         * The badge color for results promoted by Coveo ML ART.
         *
         * Can be specified using:
         * - a hexadecimal value
         * - an RGB value
         * - a CSS color name
         *
         * @examples #f58020, rgb(125 10 36), red
         *
         * Default value is controlled through the default stylesheet of the framework.
         */
        colorForRecommendedResults: Core_1.ComponentOptions.buildColorOption({ depend: 'showBadgeForRecommendedResults' })
    };
    return PromotedResultsBadge;
}(Component_1.Component));
exports.PromotedResultsBadge = PromotedResultsBadge;
Core_1.Initialization.registerAutoCreateComponent(PromotedResultsBadge);
 
 
/***/ }),
/* 851 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __assign = (this && this.__assign) || Object.assign || function(t) {
    for (var s, i = 1, n = arguments.length; i < n; i++) {
        s = arguments[i];
        for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
            t[p] = s[p];
    }
    return t;
};
Object.defineProperty(exports, "__esModule", { value: true });
var Assert_1 = __webpack_require__(12);
var QueryEvents_1 = __webpack_require__(14);
var FacetValueState_1 = __webpack_require__(36);
var underscore_1 = __webpack_require__(1);
var DynamicFacetRequestBuilder_1 = __webpack_require__(203);
var DynamicHierarchicalFacetQueryController = /** @class */ (function () {
    function DynamicHierarchicalFacetQueryController(facet) {
        this.facet = facet;
        this.freezeFacetOrder = false;
        this.preventAutoSelection = false;
        this.requestBuilder = new DynamicFacetRequestBuilder_1.DynamicFacetRequestBuilder({
            facetId: this.facet.options.id,
            field: this.facet.fieldName,
            type: this.facet.facetType,
            sortCriteria: this.facet.options.sortCriteria,
            injectionDepth: this.facet.options.injectionDepth,
            delimitingCharacter: this.facet.options.delimitingCharacter,
            filterFacetCount: this.facet.options.filterFacetCount,
            basePath: this.facet.options.basePath,
            // TODO: add configurable option when API has fixed the facet value issue
            filterByBasePath: false
        });
        this.resetNumberOfValuesToRequest();
        this.resetFlagsDuringQuery();
    }
    DynamicHierarchicalFacetQueryController.prototype.resetFlagsDuringQuery = function () {
        var _this = this;
        this.facet.bind.onRootElement(QueryEvents_1.QueryEvents.duringQuery, function () {
            _this.freezeFacetOrder = false;
            _this.preventAutoSelection = false;
        });
    };
    DynamicHierarchicalFacetQueryController.prototype.increaseNumberOfValuesToRequest = function (additionalNumberOfValues) {
        this.numberOfValuesToRequest += additionalNumberOfValues;
    };
    DynamicHierarchicalFacetQueryController.prototype.resetNumberOfValuesToRequest = function () {
        this.numberOfValuesToRequest = this.facet.options.numberOfValues;
    };
    DynamicHierarchicalFacetQueryController.prototype.enableFreezeFacetOrderFlag = function () {
        this.freezeFacetOrder = true;
    };
    DynamicHierarchicalFacetQueryController.prototype.enablePreventAutoSelectionFlag = function () {
        this.preventAutoSelection = true;
    };
    DynamicHierarchicalFacetQueryController.prototype.putFacetIntoQueryBuilder = function (queryBuilder) {
        Assert_1.Assert.exists(queryBuilder);
        queryBuilder.facetRequests.push(this.buildFacetRequest());
        if (this.freezeFacetOrder) {
            queryBuilder.facetOptions.freezeFacetOrder = this.freezeFacetOrder;
        }
    };
    DynamicHierarchicalFacetQueryController.prototype.buildFacetRequest = function () {
        return __assign({}, this.requestBuilder.buildBaseRequestForQuery(), { currentValues: this.currentValues, preventAutoSelect: this.preventAutoSelection, numberOfValues: this.facet.values.hasSelectedValue ? 1 : this.numberOfValuesToRequest, isFieldExpanded: this.numberOfValuesToRequest > this.facet.options.numberOfValues });
    };
    DynamicHierarchicalFacetQueryController.prototype.getQueryResults = function () {
        var query = this.facet.queryController.getLastQuery();
        // Specifying a numberOfResults of 0 will not log the query as a full fledged query in the API
        // it will also alleviate the load on the index
        query.numberOfResults = 0;
        var previousFacetRequestIndex = underscore_1.findIndex(query.facets, { facetId: this.facet.options.id });
        if (previousFacetRequestIndex !== -1) {
            query.facets[previousFacetRequestIndex] = this.buildFacetRequest();
        }
        else if (query.facets) {
            query.facets.push(this.buildFacetRequest());
        }
        else {
            query.facets = [this.buildFacetRequest()];
        }
        return this.facet.queryController.getEndpoint().search(query);
    };
    Object.defineProperty(DynamicHierarchicalFacetQueryController.prototype, "currentValues", {
        get: function () {
            var _this = this;
            return this.facet.values.hasSelectedValue
                ? this.facet.values.allFacetValues.map(function (requestValue) { return _this.buildRequestValue(requestValue); })
                : [];
        },
        enumerable: true,
        configurable: true
    });
    DynamicHierarchicalFacetQueryController.prototype.buildRequestValue = function (facetValue) {
        return {
            value: facetValue.value,
            state: facetValue.state,
            children: this.childrenForFacetValue(facetValue),
            retrieveChildren: this.shouldRetrieveChildren(facetValue),
            retrieveCount: facetValue.retrieveCount
        };
    };
    DynamicHierarchicalFacetQueryController.prototype.childrenForFacetValue = function (facetValue) {
        var _this = this;
        return this.shouldRetrieveChildren(facetValue) ? [] : facetValue.children.map(function (requestValue) { return _this.buildRequestValue(requestValue); });
    };
    DynamicHierarchicalFacetQueryController.prototype.shouldRetrieveChildren = function (facetValue) {
        return facetValue.state === FacetValueState_1.FacetValueState.selected;
    };
    return DynamicHierarchicalFacetQueryController;
}());
exports.DynamicHierarchicalFacetQueryController = DynamicHierarchicalFacetQueryController;
 
 
/***/ }),
/* 852 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
__webpack_require__(839);
var Dom_1 = __webpack_require__(0);
var SVGIcons_1 = __webpack_require__(16);
var Strings_1 = __webpack_require__(4);
var AnalyticsActionListMeta_1 = __webpack_require__(7);
var AccessibilityUtils_1 = __webpack_require__(81);
var underscore_1 = __webpack_require__(1);
var DynamicHierarchicalFacetBreadcrumb = /** @class */ (function () {
    function DynamicHierarchicalFacetBreadcrumb(facet, options) {
        this.facet = facet;
        this.options = options;
        this.create();
    }
    DynamicHierarchicalFacetBreadcrumb.prototype.create = function () {
        var _this = this;
        this.element = Dom_1.$$('div', { className: 'coveo-dynamic-facet-breadcrumb coveo-breadcrumb-item' }).el;
        var pathToRender = this.facet.values.selectedPath;
        var captionLabel = pathToRender.map(function (pathPart) { return underscore_1.escape(_this.facet.getCaption(pathPart)); }).join(' / ');
        this.createAndAppendTitle();
        this.createAndAppendCaption(captionLabel);
    };
    DynamicHierarchicalFacetBreadcrumb.prototype.createAndAppendTitle = function () {
        var titleElement = Dom_1.$$(AccessibilityUtils_1.getHeadingTag(this.options && this.options.headingLevel, 'h3'), { className: 'coveo-dynamic-facet-breadcrumb-title' }, this.facet.options.title + ":").el;
        this.element.appendChild(titleElement);
    };
    DynamicHierarchicalFacetBreadcrumb.prototype.createAndAppendCaption = function (caption) {
        var _this = this;
        var valueElement = Dom_1.$$('button', {
            type: 'button',
            className: 'coveo-dynamic-facet-breadcrumb-value',
            ariaLabel: Strings_1.l('RemoveFilterOn', caption)
        }, caption).el;
        var clearElement = Dom_1.$$('span', { className: 'coveo-dynamic-facet-breadcrumb-value-clear' }, SVGIcons_1.SVGIcons.icons.mainClear).el;
        valueElement.appendChild(clearElement);
        Dom_1.$$(valueElement).on('click', function () { return _this.valueSelectAction(); });
        this.element.appendChild(valueElement);
    };
    DynamicHierarchicalFacetBreadcrumb.prototype.valueSelectAction = function () {
        var _this = this;
        this.facet.reset();
        this.facet.triggerNewQuery(function () { return _this.facet.logAnalyticsEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.breadcrumbFacet); });
    };
    return DynamicHierarchicalFacetBreadcrumb;
}());
exports.DynamicHierarchicalFacetBreadcrumb = DynamicHierarchicalFacetBreadcrumb;
 
 
/***/ }),
/* 853 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Dom_1 = __webpack_require__(0);
var SVGIcons_1 = __webpack_require__(16);
var Utils_1 = __webpack_require__(5);
var DynamicHierarchicalFacetValueRenderer = /** @class */ (function () {
    function DynamicHierarchicalFacetValueRenderer(facetValue, facet) {
        this.facetValue = facetValue;
        this.facet = facet;
    }
    DynamicHierarchicalFacetValueRenderer.prototype.render = function () {
        var _this = this;
        this.button = Dom_1.$$('button', {
            className: 'coveo-dynamic-hierarchical-facet-value',
            type: 'button',
            ariaLabel: this.facetValue.selectAriaLabel
        });
        this.button.on('click', function () { return _this.selectAction(); });
        this.renderLabel();
        this.renderCount();
        this.toggleButtonStates();
        return Dom_1.$$('li', { role: 'none', dataValue: this.facetValue.value }, this.button).el;
    };
    DynamicHierarchicalFacetValueRenderer.prototype.renderLabel = function () {
        var label = Dom_1.$$('span', { className: 'coveo-dynamic-hierarchical-facet-value-label', title: this.facetValue.displayValue });
        label.text(this.facetValue.displayValue);
        this.button.append(label.el);
    };
    DynamicHierarchicalFacetValueRenderer.prototype.renderCount = function () {
        var count = Dom_1.$$('span', { className: 'coveo-dynamic-hierarchical-facet-value-count' }, "(" + this.facetValue.formattedCount + ")");
        this.button.append(count.el);
    };
    DynamicHierarchicalFacetValueRenderer.prototype.toggleButtonStates = function () {
        this.button.toggleClass('coveo-selected', this.facetValue.isSelected);
        this.button.toggleClass('coveo-with-space', this.shouldHaveMargin);
        this.button.toggleClass('coveo-show-when-collapsed', this.shouldShowWhenCollapsed);
        this.facetValue.isSelected && this.button.setAttribute('disabled', 'true');
        this.shouldHaveBackArrow && this.prependBackArrow();
        this.shouldHaveForwardArrow && this.appendForwardArrow();
    };
    DynamicHierarchicalFacetValueRenderer.prototype.prependBackArrow = function () {
        var arrowIcon = Dom_1.$$('div', { className: 'coveo-dynamic-hierarchical-facet-value-arrow-left' }, SVGIcons_1.SVGIcons.icons.arrowDown);
        this.button.prepend(arrowIcon.el);
    };
    DynamicHierarchicalFacetValueRenderer.prototype.appendForwardArrow = function () {
        var arrowIcon = Dom_1.$$('div', { className: 'coveo-dynamic-hierarchical-facet-value-arrow-right' }, SVGIcons_1.SVGIcons.icons.arrowDown);
        this.button.append(arrowIcon.el);
    };
    Object.defineProperty(DynamicHierarchicalFacetValueRenderer.prototype, "shouldHaveMargin", {
        get: function () {
            return !this.facetValue.isSelected && this.facetValue.path.length > 1 && !this.facetValue.children.length;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(DynamicHierarchicalFacetValueRenderer.prototype, "shouldHaveBackArrow", {
        get: function () {
            return this.facet.values.hasSelectedValue && !this.facetValue.isSelected && !!this.facetValue.children.length;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(DynamicHierarchicalFacetValueRenderer.prototype, "shouldHaveForwardArrow", {
        get: function () {
            return !this.facetValue.isLeafValue && !this.facetValue.isSelected && !this.facetValue.children.length;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(DynamicHierarchicalFacetValueRenderer.prototype, "shouldShowWhenCollapsed", {
        get: function () {
            var isParentOfTheSelectedValue = Utils_1.Utils.arrayEqual(this.facetValue.path, this.facet.values.selectedPath.slice(0, -1));
            return this.facetValue.isSelected || isParentOfTheSelectedValue;
        },
        enumerable: true,
        configurable: true
    });
    DynamicHierarchicalFacetValueRenderer.prototype.selectAction = function () {
        var _this = this;
        this.facet.selectPath(this.facetValue.path);
        this.facet.enableFreezeFacetOrderFlag();
        this.facet.enablePreventAutoSelectionFlag();
        this.facet.scrollToTop();
        this.facet.triggerNewQuery(function () { return _this.facetValue.logSelectActionToAnalytics(); });
    };
    return DynamicHierarchicalFacetValueRenderer;
}());
exports.DynamicHierarchicalFacetValueRenderer = DynamicHierarchicalFacetValueRenderer;
 
 
/***/ }),
/* 854 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { Iif (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        Iif (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            Iif (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
            Iif (y = 0, t) op = [0, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    Eif (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        Eif (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
Object.defineProperty(exports, "__esModule", { value: true });
var FacetSearchRequest_1 = __webpack_require__(855);
var underscore_1 = __webpack_require__(1);
var DynamicFacetRequestBuilder_1 = __webpack_require__(203);
var HierarchicalFacetSearchController = /** @class */ (function () {
    function HierarchicalFacetSearchController(facet) {
        this.facet = facet;
        this.terms = '';
        this.pageCount = 1;
        this.numberOfValuesMultiplier = 2;
        this.moreValuesAvailable = true;
    }
    Object.defineProperty(HierarchicalFacetSearchController.prototype, "ignoredPaths", {
        get: function () {
            return [underscore_1.flatten(this.facet.values.selectedPath, true)];
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(HierarchicalFacetSearchController.prototype, "numberOfValues", {
        get: function () {
            return this.facet.options.numberOfValues * this.numberOfValuesMultiplier * this.pageCount;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(HierarchicalFacetSearchController.prototype, "request", {
        get: function () {
            return {
                field: this.facet.fieldName,
                filterFacetCount: DynamicFacetRequestBuilder_1.determineFilterFacetCount(this.facet.options),
                type: FacetSearchRequest_1.FacetSearchType.hierarchical,
                numberOfValues: this.numberOfValues,
                ignorePaths: this.ignoredPaths,
                basePath: this.facet.options.basePath,
                captions: this.facet.options.valueCaption,
                searchContext: this.facet.queryController.getLastQuery(),
                delimitingCharacter: this.facet.options.delimitingCharacter,
                query: this.terms.length ? "*" + this.terms + "*" : '*'
            };
        },
        enumerable: true,
        configurable: true
    });
    HierarchicalFacetSearchController.prototype.triggerRequest = function () {
        return __awaiter(this, void 0, void 0, function () {
            var response;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0: return [4 /*yield*/, this.facet.queryController.getEndpoint().facetSearch(this.request)];
                    case 1:
                        response = _a.sent();
                        this.moreValuesAvailable = response.moreValuesAvailable;
                        return [2 /*return*/, response];
                }
            });
        });
    };
    HierarchicalFacetSearchController.prototype.search = function (terms) {
        this.terms = terms;
        this.pageCount = 1;
        return this.triggerRequest();
    };
    HierarchicalFacetSearchController.prototype.fetchMoreResults = function () {
        this.pageCount++;
        return this.triggerRequest();
    };
    return HierarchicalFacetSearchController;
}());
exports.HierarchicalFacetSearchController = HierarchicalFacetSearchController;
 
 
/***/ }),
/* 855 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
/**
 * The facet types against which facet search is allowed.
 */
var FacetSearchType;
(function (FacetSearchType) {
    /**
     * Search among specific (i.e., scalar) facet values (e.g., Alice Smith, Bob Jones, etc.).
     */
    FacetSearchType["specific"] = "specific";
    /**
     * Search among hierarchical facet values (e.g., Electronics|Entertainment|Gaming Consoles;, Electronics|Computers|Laptops;, etc.).
     */
    FacetSearchType["hierarchical"] = "hierarchical";
})(FacetSearchType = exports.FacetSearchType || (exports.FacetSearchType = {}));
 
 
/***/ }),
/* 856 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var DynamicHierarchicalFacetSearchValueRenderer_1 = __webpack_require__(857);
var AnalyticsActionListMeta_1 = __webpack_require__(7);
var DynamicHierarchicalFacetSearchValue = /** @class */ (function () {
    function DynamicHierarchicalFacetSearchValue(facetValue, facet) {
        this.facetValue = facetValue;
        this.facet = facet;
        this.renderer = new DynamicHierarchicalFacetSearchValueRenderer_1.DynamicHierarchicalFacetSearchValueRenderer(this, facet);
    }
    Object.defineProperty(DynamicHierarchicalFacetSearchValue.prototype, "fullPath", {
        get: function () {
            return this.facetValue.fullPath;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(DynamicHierarchicalFacetSearchValue.prototype, "displayValue", {
        get: function () {
            return this.facetValue.displayValue;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(DynamicHierarchicalFacetSearchValue.prototype, "numberOfResults", {
        get: function () {
            return this.facetValue.numberOfResults;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(DynamicHierarchicalFacetSearchValue.prototype, "renderedElement", {
        get: function () {
            if (this.element) {
                return this.element;
            }
            return this.render();
        },
        enumerable: true,
        configurable: true
    });
    DynamicHierarchicalFacetSearchValue.prototype.logSelectActionToAnalytics = function () {
        this.facet.logAnalyticsEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.dynamicFacetSelect);
    };
    DynamicHierarchicalFacetSearchValue.prototype.render = function () {
        this.element = this.renderer.render();
        return this.element;
    };
    return DynamicHierarchicalFacetSearchValue;
}());
exports.DynamicHierarchicalFacetSearchValue = DynamicHierarchicalFacetSearchValue;
 
 
/***/ }),
/* 857 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Dom_1 = __webpack_require__(0);
var Strings_1 = __webpack_require__(4);
var PATH_START_LENGTH = 1;
var PATH_END_LENGTH = 2;
var PATH_SEPARATOR = '/';
var VALUE_CLASSNAME = 'coveo-dynamic-hierarchical-facet-search-value';
var HEADER_CLASSNAME = VALUE_CLASSNAME + "-header";
var LABEL_CLASSNAME = VALUE_CLASSNAME + "-label";
var COUNT_CLASSNAME = VALUE_CLASSNAME + "-results-count";
var PATH_CLASSNAME = VALUE_CLASSNAME + "-path";
var PATH_ELLIPSIS_CLASSNAME = PATH_CLASSNAME + "-ellipsis";
var PATH_PREFIX_CLASSNAME = PATH_CLASSNAME + "-prefix";
var PATH_PART_CLASSNAME = PATH_CLASSNAME + "-part";
var PATH_SEPARATOR_CLASSNAME = PATH_CLASSNAME + "-separator";
exports.DynamicHierarchicalFacetSearchValueRendererClassNames = {
    VALUE_CLASSNAME: VALUE_CLASSNAME,
    HEADER_CLASSNAME: HEADER_CLASSNAME,
    LABEL_CLASSNAME: LABEL_CLASSNAME,
    COUNT_CLASSNAME: COUNT_CLASSNAME,
    PATH_CLASSNAME: PATH_CLASSNAME,
    PATH_ELLIPSIS_CLASSNAME: PATH_ELLIPSIS_CLASSNAME,
    PATH_PREFIX_CLASSNAME: PATH_PREFIX_CLASSNAME,
    PATH_PART_CLASSNAME: PATH_PART_CLASSNAME,
    PATH_SEPARATOR_CLASSNAME: PATH_SEPARATOR_CLASSNAME
};
var DynamicHierarchicalFacetSearchValueRenderer = /** @class */ (function () {
    function DynamicHierarchicalFacetSearchValueRenderer(facetValue, facet) {
        this.facetValue = facetValue;
        this.facet = facet;
    }
    Object.defineProperty(DynamicHierarchicalFacetSearchValueRenderer.prototype, "pathToRender", {
        get: function () {
            var parentPath = this.facetValue.fullPath.slice(0, -1);
            if (!parentPath.length) {
                return { start: [Strings_1.l('AllCategories')] };
            }
            if (parentPath.length > PATH_START_LENGTH + PATH_END_LENGTH) {
                return { start: parentPath.slice(0, PATH_START_LENGTH), end: parentPath.slice(-PATH_END_LENGTH) };
            }
            return { start: parentPath };
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(DynamicHierarchicalFacetSearchValueRenderer.prototype, "label", {
        get: function () {
            var _a = this.pathToRender, start = _a.start, end = _a.end;
            var resultCount = Strings_1.l('ResultCount', this.facetValue.numberOfResults, this.facetValue.numberOfResults);
            return Strings_1.l('HierarchicalFacetValueIndentedUnder', this.facetValue.displayValue + " " + resultCount, start.concat((end || [])).join(', '));
        },
        enumerable: true,
        configurable: true
    });
    DynamicHierarchicalFacetSearchValueRenderer.prototype.render = function () {
        var element = Dom_1.$$('div', { className: VALUE_CLASSNAME, ariaLabel: this.label }, this.renderHeader(), this.renderPath());
        return element.el;
    };
    DynamicHierarchicalFacetSearchValueRenderer.prototype.selectAction = function () {
        var _this = this;
        this.facet.selectPath(this.facetValue.fullPath);
        this.facet.enableFreezeFacetOrderFlag();
        this.facet.enablePreventAutoSelectionFlag();
        this.facet.scrollToTop();
        this.facet.triggerNewQuery(function () { return _this.facetValue.logSelectActionToAnalytics(); });
    };
    DynamicHierarchicalFacetSearchValueRenderer.prototype.renderHeader = function () {
        return Dom_1.$$('header', { className: HEADER_CLASSNAME, ariaHidden: true }, this.renderLabel(), this.renderResultsCount());
    };
    DynamicHierarchicalFacetSearchValueRenderer.prototype.renderLabel = function () {
        return Dom_1.$$('span', { className: LABEL_CLASSNAME }, this.facetValue.displayValue);
    };
    DynamicHierarchicalFacetSearchValueRenderer.prototype.renderResultsCount = function () {
        var element = Dom_1.$$('span', { className: COUNT_CLASSNAME });
        element.text("(" + this.facetValue.numberOfResults + ")");
        return element;
    };
    DynamicHierarchicalFacetSearchValueRenderer.prototype.renderPath = function () {
        var _this = this;
        var element = Dom_1.$$('ul', {
            className: PATH_CLASSNAME,
            ariaHidden: true
        }, this.renderPathPrefix());
        var _a = this.pathToRender, start = _a.start, end = _a.end;
        start.forEach(function (part, index) {
            if (index > 0) {
                element.append(_this.renderPathSeparator().el);
            }
            element.append(_this.renderPathPart(part).el);
        });
        if (end) {
            element.append(this.renderPathSeparator().el);
            element.append(this.renderEllipsis().el);
            end.forEach(function (part) {
                element.append(_this.renderPathSeparator().el);
                element.append(_this.renderPathPart(part).el);
            });
        }
        return element;
    };
    DynamicHierarchicalFacetSearchValueRenderer.prototype.renderPathPrefix = function () {
        var element = Dom_1.$$('li', { className: PATH_PREFIX_CLASSNAME });
        element.text(Strings_1.l('HierarchicalFacetValuePathPrefix') + " ");
        return element;
    };
    DynamicHierarchicalFacetSearchValueRenderer.prototype.renderEllipsis = function () {
        return Dom_1.$$('li', { className: PATH_ELLIPSIS_CLASSNAME }, '...');
    };
    DynamicHierarchicalFacetSearchValueRenderer.prototype.renderPathPart = function (part) {
        var element = Dom_1.$$('li', { className: PATH_PART_CLASSNAME });
        element.text(part);
        return element;
    };
    DynamicHierarchicalFacetSearchValueRenderer.prototype.renderPathSeparator = function () {
        return Dom_1.$$('span', { className: PATH_SEPARATOR_CLASSNAME, role: 'separator' }, PATH_SEPARATOR);
    };
    return DynamicHierarchicalFacetSearchValueRenderer;
}());
exports.DynamicHierarchicalFacetSearchValueRenderer = DynamicHierarchicalFacetSearchValueRenderer;
 
 
/***/ }),
/* 858 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
__webpack_require__(1544);
var Core_1 = __webpack_require__(9);
var GlobalExports_1 = __webpack_require__(10);
var AnalyticsActionListMeta_1 = __webpack_require__(7);
var Component_1 = __webpack_require__(6);
var ComponentOptions_1 = __webpack_require__(13);
var MissingTermManager_1 = __webpack_require__(306);
var XRegExp = __webpack_require__(485);
var underscore_1 = __webpack_require__(1);
var UtilsModules_1 = __webpack_require__(67);
/**
 * This [result template component](https://docs.coveo.com/en/513/#using-result-template-components) renders a list of query terms
 * that were not matched by the associated result item.
 *
 * @availablesince [July 2019 Release (v2.6459)](https://docs.coveo.com/en/2938/)
 */
var MissingTerms = /** @class */ (function (_super) {
    __extends(MissingTerms, _super);
    /**
     * Creates a new `MissingTerms` component instance.
     * @param element The element on which to instantiate the component.
     * @param options The configuration options for the component.
     * @param bindings The bindings required by the component to function normally. If not set, these will be automatically resolved (with a slower execution time).
     * @param result The query result item to associate the component with.
     */
    function MissingTerms(element, options, bindings, result) {
        var _this = _super.call(this, element, MissingTerms.ID, bindings) || this;
        _this.element = element;
        _this.options = options;
        _this.result = result;
        _this.options = ComponentOptions_1.ComponentOptions.initComponentOptions(element, MissingTerms, options);
        _this.addMissingTerms();
        return _this;
    }
    Object.defineProperty(MissingTerms.prototype, "allResultTerms", {
        get: function () {
            var absentTerms = this.result.absentTerms;
            if (this.result.attachments) {
                absentTerms = this.intersectAbsentTerms(absentTerms, this.result.attachments);
            }
            Eif (this.result.childResults) {
                absentTerms = this.intersectAbsentTerms(absentTerms, this.result.childResults);
            }
            return absentTerms;
        },
        enumerable: true,
        configurable: true
    });
    MissingTerms.prototype.intersectAbsentTerms = function (absentTerms, results) {
        return underscore_1.intersection.apply(void 0, [absentTerms].concat(results.map(function (result) { return result.absentTerms; })));
    };
    Object.defineProperty(MissingTerms.prototype, "missingTerms", {
        /**
         * Returns all original basic query expression terms and phrases that were not matched by the result item the component instance is associated with.
         */
        get: function () {
            return this.absentTerms.concat(this.absentPhrases);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(MissingTerms.prototype, "absentTerms", {
        get: function () {
            var _this = this;
            var absentTerms = [];
            var terms = this.allResultTerms.filter(function (value) { return !_this.isMissingPhrase(value); });
            for (var _i = 0, terms_1 = terms; _i < terms_1.length; _i++) {
                var term = terms_1[_i];
                var termMatch = this.queryMatch(term);
                termMatch && absentTerms.push(termMatch);
            }
            return absentTerms;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(MissingTerms.prototype, "absentPhrases", {
        get: function () {
            var _this = this;
            var absentPhrases = [];
            var phrases = this.allResultTerms.filter(function (value) { return _this.isMissingPhrase(value); });
            for (var _i = 0, phrases_1 = phrases; _i < phrases_1.length; _i++) {
                var phrase = phrases_1[_i];
                var withoutQuotes = phrase.slice(1, -1);
                var phraseMatch = this.queryMatch(withoutQuotes, true);
                phraseMatch && absentPhrases.push(phraseMatch);
            }
            return absentPhrases;
        },
        enumerable: true,
        configurable: true
    });
    MissingTerms.prototype.isMissingPhrase = function (value) {
        return UtilsModules_1.Utils.stringStartsWith(value, '"') && UtilsModules_1.Utils.stringEndsWith(value, '"');
    };
    MissingTerms.prototype.queryMatch = function (term, stripBreakingCharacters) {
        if (stripBreakingCharacters === void 0) { stripBreakingCharacters = false; }
        var regex = this.createWordBoundaryDelimitedRegex(term);
        var query = this.queryStateModel.get('q');
        // Mimics the query received by the index
        var queryToExec = stripBreakingCharacters ? query.replace(XRegExp(this.breakingCharacters, 'gi'), ' ') : query;
        var result = regex.exec(queryToExec);
        if (result) {
            var originalKeywordInQuery = result[4];
            return originalKeywordInQuery;
        }
        return null;
    };
    /**
     * Injects a term in the advanced part of the query expression (aq) to filter out items that do not match the term.
     * @param term The term to add to the advanced query expression.
     */
    MissingTerms.prototype.addTermForcedToAppear = function (term) {
        if (this.missingTerms.indexOf(term) === -1) {
            this.logger.warn("Method execution aborted because the term to inject in aq (\"" + term + "\") is not a missing term.", "Allowed missing terms: " + this.missingTerms.toString() + ".");
            return;
        }
        this.updateTermForcedToAppear();
        this.termForcedToAppear.push(term);
        this.queryStateModel.set('missingTerms', this.termForcedToAppear.slice());
    };
    MissingTerms.prototype.updateTermForcedToAppear = function () {
        this.termForcedToAppear = this.queryStateModel.get('missingTerms').slice();
    };
    MissingTerms.prototype.addMissingTerms = function () {
        var _this = this;
        if (this.missingTerms.length === 0) {
            return;
        }
        var missingTermElement = this.buildContainer();
        if (missingTermElement.length > 1) {
            this.hideMissingTermsOverTheNumberOfResults(missingTermElement);
            missingTermElement.map(function (element) {
                Core_1.$$(_this.element).append(element);
            });
        }
    };
    MissingTerms.prototype.buildContainer = function () {
        var elements = [];
        elements.push(this.buildCaption().el);
        this.buildMissingTerms().forEach(function (term) {
            Eif (term) {
                elements.push(term.el);
            }
        });
        return elements;
    };
    MissingTerms.prototype.buildCaption = function () {
        return Core_1.$$('span', { className: 'coveo-field-caption' }, this.options.caption);
    };
    MissingTerms.prototype.buildMissingTerms = function () {
        var _this = this;
        var validTerms = this.absentTerms.filter(function (term) { return _this.isValidTerm(term); });
        var validPhrases = this.absentPhrases.filter(function (phrase) { return _this.isValidPhrase(phrase, validTerms); });
        return validTerms.concat(validPhrases).map(function (term) {
            return _this.makeTermClickableIfEnabled(term);
        });
    };
    MissingTerms.prototype.executeNewQuery = function (missingTerm) {
        Iif (missingTerm === void 0) { missingTerm = this.queryStateModel.get('q'); }
        this.queryController.executeQuery();
    };
    MissingTerms.prototype.makeTermClickableIfEnabled = function (term) {
        var _this = this;
        if (this.options.clickable) {
            var termElement = Core_1.$$('button', { className: 'coveo-missing-term coveo-clickable', type: 'button' }, term);
            termElement.on('click', function () {
                _this.addTermForcedToAppear(term);
                _this.logAnalyticsAddMissingTerm(term);
                _this.executeNewQuery(term);
            });
            return termElement;
        }
        else {
            return Core_1.$$('span', { className: 'coveo-missing-term' }, term);
        }
    };
    MissingTerms.prototype.createWordBoundaryDelimitedRegex = function (term) {
        return XRegExp(MissingTermManager_1.MissingTermManager.wordBoundary + "(" + term + ")" + MissingTermManager_1.MissingTermManager.wordBoundary, 'gi');
    };
    MissingTerms.prototype.containsFeaturedResults = function (term) {
        this.updateTermForcedToAppear();
        return this.termForcedToAppear.indexOf(term) !== -1;
    };
    MissingTerms.prototype.hideMissingTermsOverTheNumberOfResults = function (elements) {
        var _this = this;
        var allMissingTerms = elements.filter(function (element) {
            return element.tagName === 'BUTTON';
        });
        if (allMissingTerms.length <= this.options.numberOfTerms) {
            return;
        }
        for (var index = this.options.numberOfTerms; index < allMissingTerms.length; index++) {
            Core_1.$$(allMissingTerms[index]).hide();
        }
        var nbMoreResults = allMissingTerms.length - this.options.numberOfTerms;
        var showMore = Core_1.$$('button', { className: 'coveo-missing-term-show-more coveo-clickable', type: 'button' }, Core_1.l('NMore', [nbMoreResults]));
        showMore.on('click', function () {
            _this.showAllHiddenMissingTerms();
        });
        elements.push(showMore.el);
    };
    MissingTerms.prototype.showAllHiddenMissingTerms = function () {
        var showMore = Core_1.$$(this.element).find('.coveo-missing-term-show-more');
        showMore.parentNode.removeChild(showMore);
        var allMissingTerms = Core_1.$$(this.element).findAll('.coveo-missing-term');
        for (var index = this.options.numberOfTerms; index < allMissingTerms.length; index++) {
            Core_1.$$(allMissingTerms[index]).show();
            allMissingTerms[index].removeAttribute('style');
        }
    };
    MissingTerms.prototype.isValidTerm = function (term) {
        return this.isNonBoundaryTerm(term) && !this.containsFeaturedResults(term);
    };
    MissingTerms.prototype.isValidPhrase = function (phrase, terms) {
        var _this = this;
        return terms.every(function (term) {
            var regex = _this.createWordBoundaryDelimitedRegex(term);
            var termInPhrase = regex.exec(phrase);
            return !termInPhrase;
        });
    };
    Object.defineProperty(MissingTerms.prototype, "breakingCharacters", {
        get: function () {
            return "[-'?*\u2019.~=,/\\\\:`;_!&()]+";
        },
        enumerable: true,
        configurable: true
    });
    MissingTerms.prototype.isNonBoundaryTerm = function (term) {
        //p{L} is a Unicode script that matches any character in any language.
        var wordWithBreakpoints = "\\p{L}*" + this.breakingCharacters + "\\p{L}*";
        var regex = XRegExp(wordWithBreakpoints, 'gi');
        var query = this.queryStateModel.get('q');
        var matches = query.match(regex) || [];
        return matches.every(function (word) {
            return word.indexOf(term) === -1;
        });
    };
    MissingTerms.prototype.logAnalyticsAddMissingTerm = function (term) {
        this.usageAnalytics.logSearchEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.addMissingTerm, {
            missingTerm: term
        });
    };
    MissingTerms.ID = 'MissingTerms';
    /**
     * @componentOptions
     */
    MissingTerms.options = {
        /**
         * Whether to allow the end-user to click a missing term to filter out items that do not match this term.
         *
         * **Default:** `true`
         */
        clickable: ComponentOptions_1.ComponentOptions.buildBooleanOption({ defaultValue: true }),
        /**
         * The text to display before missing terms.
         *
         * **Default:** The localized string for `Missing`.
         */
        caption: ComponentOptions_1.ComponentOptions.buildLocalizedStringOption({
            localizedString: function () { return Core_1.l('Missing'); }
        }),
        /**
         * The maximum number of missing term to be displayed
         *
         * **Default:** `5`
         * **Minimum value:** `1`
         */
        numberOfTerms: ComponentOptions_1.ComponentOptions.buildNumberOption({
            defaultValue: 5,
            min: 1
        })
    };
    MissingTerms.doExport = function () {
        GlobalExports_1.exportGlobally({
            MissingTerms: MissingTerms
        });
    };
    return MissingTerms;
}(Component_1.Component));
exports.MissingTerms = MissingTerms;
Core_1.Initialization.registerAutoCreateComponent(MissingTerms);
 
 
/***/ }),
/* 859 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __assign = (this && this.__assign) || Object.assign || function(t) {
    for (var s, i = 1, n = arguments.length; i < n; i++) {
        s = arguments[i];
        for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
            t[p] = s[p];
    }
    return t;
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { Iif (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        Iif (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            Iif (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
            Iif (y = 0, t) op = [0, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    Eif (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        Iif (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
Object.defineProperty(exports, "__esModule", { value: true });
var GlobalExports_1 = __webpack_require__(10);
var Core_1 = __webpack_require__(9);
__webpack_require__(1545);
var TemplateComponentOptions_1 = __webpack_require__(89);
var TemplateToHtml_1 = __webpack_require__(690);
var ResultLink_1 = __webpack_require__(56);
var AnalyticsActionListMeta_1 = __webpack_require__(7);
var ImageFieldValue_1 = __webpack_require__(408);
var ResultPreviewsManagerEvents_1 = __webpack_require__(198);
/**
 * This component renders previews of the top query results matching the currently focused query suggestion in the search box.
 *
 * As such, this component only works when the search interface can
 * [provide Coveo Machine Learning query suggestions](https://docs.coveo.com/en/340/#providing-coveo-machine-learning-query-suggestions).
 *
 * This component should be initialized on a `div` which can be nested anywhere inside the root element of your search interface.
 *
 * See [Rendering Query Suggestion Result Previews](https://docs.coveo.com/en/340/#rendering-query-suggestion-result-previews).
 *
 * @availablesince [December 2019 Release (v2.7610)](https://docs.coveo.com/en/3142/)
 */
var QuerySuggestPreview = /** @class */ (function (_super) {
    __extends(QuerySuggestPreview, _super);
    /**
     * Creates a new QuerySuggestPreview component.
     * @param element The HTMLElement on which to instantiate the component.
     * @param options The options for the QuerySuggestPreview component.
     * @param bindings The bindings that the component requires to function normally. If not set, these will be
     * automatically resolved (with a slower execution time).
     */
    function QuerySuggestPreview(element, options, bindings) {
        var _this = _super.call(this, element, QuerySuggestPreview.ID, bindings) || this;
        _this.element = element;
        _this.options = options;
        _this.bindings = bindings;
        _this.options = Core_1.ComponentOptions.initComponentOptions(element, QuerySuggestPreview, options);
        if (!_this.options.resultTemplate) {
            _this.logger.warn("No template was provided for " + QuerySuggestPreview.ID + ", a default template was used instead.");
            _this.options.resultTemplate = _this.buildDefaultSearchResultPreviewTemplate();
        }
        _this.bind.onRootElement(ResultPreviewsManagerEvents_1.ResultPreviewsManagerEvents.updateResultPreviewsManagerOptions, function (args) {
            return (args.displayAfterDuration = Math.max(args.displayAfterDuration || 0, _this.options.executeQueryDelay));
        });
        _this.bind.onRootElement(ResultPreviewsManagerEvents_1.ResultPreviewsManagerEvents.populateSearchResultPreviews, function (args) {
            return _this.populateSearchResultPreviews(args);
        });
        _this.omniboxAnalytics = _this.searchInterface.getOmniboxAnalytics();
        return _this;
    }
    QuerySuggestPreview.prototype.buildDefaultSearchResultPreviewTemplate = function () {
        return Core_1.HtmlTemplate.create(Core_1.$$('div', { className: 'result-template' }, Core_1.$$('div', { className: 'coveo-result-frame coveo-default-result-preview' }, Core_1.$$('div', { className: Core_1.Component.computeCssClassName(ImageFieldValue_1.ImageFieldValue), 'data-field': '@image' }), Core_1.$$('a', { className: Core_1.Component.computeCssClassName(ResultLink_1.ResultLink) }))).el);
    };
    Object.defineProperty(QuerySuggestPreview.prototype, "templateToHtml", {
        get: function () {
            var templateToHtmlArgs = {
                searchInterface: this.searchInterface,
                queryStateModel: this.queryStateModel,
                resultTemplate: this.options.resultTemplate
            };
            return new TemplateToHtml_1.TemplateToHtml(templateToHtmlArgs);
        },
        enumerable: true,
        configurable: true
    });
    QuerySuggestPreview.prototype.populateSearchResultPreviews = function (args) {
        args.previewsQueries.push(this.fetchSearchResultPreviews(args.suggestion));
    };
    QuerySuggestPreview.prototype.fetchSearchResultPreviews = function (suggestion) {
        return __awaiter(this, void 0, void 0, function () {
            var query, results;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        query = this.buildQuery(suggestion);
                        this.logShowQuerySuggestPreview();
                        return [4 /*yield*/, this.queryController.getEndpoint().search(query)];
                    case 1:
                        results = _a.sent();
                        Iif (!results) {
                            return [2 /*return*/, []];
                        }
                        return [2 /*return*/, this.buildResultsPreview(suggestion, results)];
                }
            });
        });
    };
    QuerySuggestPreview.prototype.buildQuery = function (suggestion) {
        var query = this.buildDefaultQuery(suggestion);
        Core_1.$$(this.root).trigger(ResultPreviewsManagerEvents_1.ResultPreviewsManagerEvents.buildingResultPreviewsQuery, { query: query });
        return query;
    };
    QuerySuggestPreview.prototype.buildDefaultQuery = function (suggestion) {
        var _a = this.queryController.getLastQuery(), searchHub = _a.searchHub, pipeline = _a.pipeline, tab = _a.tab, locale = _a.locale, timezone = _a.timezone, context = _a.context, cq = _a.cq;
        return __assign({ firstResult: 0, searchHub: searchHub,
            pipeline: pipeline,
            tab: tab,
            locale: locale,
            timezone: timezone,
            context: context,
            cq: cq, numberOfResults: this.options.numberOfPreviewResults, q: suggestion.text || suggestion.dom.innerText }, (suggestion.advancedQuery && { aq: suggestion.advancedQuery }));
    };
    QuerySuggestPreview.prototype.buildResultsPreview = function (suggestion, results) {
        return __awaiter(this, void 0, void 0, function () {
            var _this = this;
            var buildResults;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0: return [4 /*yield*/, this.templateToHtml.buildResults(results, 'preview', [])];
                    case 1:
                        buildResults = _a.sent();
                        Iif (!(buildResults.length > 0)) {
                            return [2 /*return*/, []];
                        }
                        return [2 /*return*/, buildResults.map(function (element, index) { return _this.buildResultPreview(suggestion, element, index); })];
                }
            });
        });
    };
    QuerySuggestPreview.prototype.buildResultPreview = function (suggestion, element, rank) {
        var _this = this;
        element.classList.add('coveo-preview-selectable');
        var resultLink = element.querySelector(Core_1.Component.computeSelectorForType(ResultLink_1.ResultLink.ID));
        if (resultLink) {
            element.setAttribute('aria-label', resultLink.textContent);
            resultLink.setAttribute('role', 'link');
            resultLink.removeAttribute('aria-level');
        }
        return {
            element: element,
            onSelect: function () { return _this.handleSelect(suggestion, element, rank); }
        };
    };
    QuerySuggestPreview.prototype.handleSelect = function (suggestion, element, rank) {
        this.logClickQuerySuggestPreview(suggestion, rank, element);
        var link = Core_1.$$(element).find("." + Core_1.Component.computeCssClassNameForType('ResultLink'));
        Iif (link) {
            var resultLink = Core_1.Component.get(link);
            resultLink.openLinkAsConfigured();
            resultLink.openLink();
        }
    };
    QuerySuggestPreview.prototype.logShowQuerySuggestPreview = function () {
        this.usageAnalytics.logSearchEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.showQuerySuggestPreview, this.omniboxAnalytics.buildCustomDataForPartialQueries());
    };
    QuerySuggestPreview.prototype.logClickQuerySuggestPreview = function (suggestion, displayedRank, element) {
        this.usageAnalytics.logCustomEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.clickQuerySuggestPreview, {
            suggestion: suggestion.text || suggestion.dom.innerText,
            displayedRank: displayedRank
        }, element);
    };
    QuerySuggestPreview.ID = 'QuerySuggestPreview';
    QuerySuggestPreview.doExport = function () {
        GlobalExports_1.exportGlobally({
            QuerySuggestPreview: QuerySuggestPreview
        });
    };
    /**
     * The options for the component
     * @componentOptions
     */
    QuerySuggestPreview.options = {
        /**
         * The HTML `id` attribute value, or CSS selector of the previously registered
         * [result template](https://docs.coveo.com/413/) to apply when rendering the
         * query suggestion result previews.
         *
         * **Examples**
         * * Specifying the `id` attribute of the target result template:
         * ```html
         * <div class="CoveoQuerySuggestPreview" data-result-template-id="myTemplateId"></div>
         * ```
         * * Specifying an equivalent CSS selector:
         * ```html
         * <div class="CoveoQuerySuggestPreview" data-result-template-selector="#myTemplateId"></div>
         * ```
         *
         * If you specify no previously registered template through this option, the component uses its default template.
         */
        resultTemplate: TemplateComponentOptions_1.TemplateComponentOptions.buildTemplateOption(),
        /**
         * The maximum number of query results to render in the preview.
         */
        numberOfPreviewResults: Core_1.ComponentOptions.buildNumberOption({
            defaultValue: 4,
            min: 1,
            max: 6
        }),
        /**
         *  The amount of focus time (in milliseconds) required on a query suggestion before requesting a preview of its top results.
         */
        executeQueryDelay: Core_1.ComponentOptions.buildNumberOption({ defaultValue: 200 })
    };
    return QuerySuggestPreview;
}(Core_1.Component));
exports.QuerySuggestPreview = QuerySuggestPreview;
Core_1.Initialization.registerAutoCreateComponent(QuerySuggestPreview);
 
 
/***/ }),
/* 860 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
var Component_1 = __webpack_require__(6);
var ComponentOptions_1 = __webpack_require__(13);
var QueryEvents_1 = __webpack_require__(14);
var AnalyticsEvents_1 = __webpack_require__(111);
var Initialization_1 = __webpack_require__(8);
var GlobalExports_1 = __webpack_require__(10);
var OmniboxEvents_1 = __webpack_require__(47);
/**
 * This component exposes options to handle commerce-related queries.
 *
 * @availablesince [March 2020 Release (v2.8521)](https://docs.coveo.com/en/3203/)
 */
var CommerceQuery = /** @class */ (function (_super) {
    __extends(CommerceQuery, _super);
    /**
     * Creates a new CommerceQuery component.
     * @param element The HTMLElement on which to instantiate the component.
     * @param options The options for the CommerceQuery component.
     * @param bindings The bindings that the component requires to function normally. If not set, these will be
     * automatically resolved (with a slower execution time).
     */
    function CommerceQuery(element, options, bindings) {
        var _this = _super.call(this, element, CommerceQuery.ID, bindings) || this;
        _this.element = element;
        _this.options = options;
        _this.bindings = bindings;
        _this.options = ComponentOptions_1.ComponentOptions.initComponentOptions(element, CommerceQuery, options);
        _this.bind.onRootElement(QueryEvents_1.QueryEvents.doneBuildingQuery, _this.handleDoneBuildingQuery);
        _this.bind.onRootElement(OmniboxEvents_1.OmniboxEvents.buildingQuerySuggest, _this.handleBuildingQuerySuggest);
        _this.bind.onRootElement(AnalyticsEvents_1.AnalyticsEvents.changeAnalyticsCustomData, _this.handleChangeAnalytics);
        return _this;
    }
    CommerceQuery.prototype.handleDoneBuildingQuery = function (event) {
        if (this.options.listing) {
            event.queryBuilder.tab = this.options.listing;
            event.queryBuilder.addContextValue('listing', this.options.listing);
        }
    };
    CommerceQuery.prototype.handleBuildingQuerySuggest = function (event) {
        Eif (this.options.listing) {
            event.payload.tab = this.options.listing;
            (event.payload.context || (event.payload.context = {})).listing = this.options.listing;
        }
    };
    CommerceQuery.prototype.handleChangeAnalytics = function (event) {
        if (this.options.listing) {
            event.originLevel2 = this.options.listing;
        }
    };
    CommerceQuery.ID = 'CommerceQuery';
    CommerceQuery.doExport = function () {
        GlobalExports_1.exportGlobally({
            CommerceQuery: CommerceQuery
        });
    };
    /**
     * The options for the CommerceQuery.
     * @componentOptions
     */
    CommerceQuery.options = {
        /**
         * The listing page identifier.
         *
         * In a typical Coveo for Commerce solution, all listing pages should share the same `searchHub`/`originLevel1` and be differentiated by setting this option to a unique, human-readable value.
         *
         * When specified, this option sets the `tab`/`originLevel2` parameter, as well as the `listing` property of the `context`/`customData` object of each query/usage analytics event originating from the listing page. This allows Coveo ML to provide relevant output for the listing page, and can also be useful for usage analytics reporting purposes.
         *
         * @examples ACME Furniture, ACME Jewelry, ACME Clothes
         */
        listing: ComponentOptions_1.ComponentOptions.buildStringOption()
    };
    return CommerceQuery;
}(Component_1.Component));
exports.CommerceQuery = CommerceQuery;
Initialization_1.Initialization.registerAutoCreateComponent(CommerceQuery);
 
 
/***/ }),
/* 861 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
__webpack_require__(1547);
var underscore_1 = __webpack_require__(1);
var GlobalExports_1 = __webpack_require__(10);
var QueryEvents_1 = __webpack_require__(14);
var Model_1 = __webpack_require__(26);
var QueryStateModel_1 = __webpack_require__(17);
var Dom_1 = __webpack_require__(0);
var Component_1 = __webpack_require__(6);
var ComponentOptions_1 = __webpack_require__(13);
var Initialization_1 = __webpack_require__(8);
var InitializationEvents_1 = __webpack_require__(22);
var Sort_1 = __webpack_require__(271);
var Dropdown_1 = __webpack_require__(92);
var Strings_1 = __webpack_require__(4);
/**
 * The `SortDropdown` component renders a dropdown that the end user can interact with to select the criteria to use when sorting query results.
 *
 * It is meant to be a parent of regular [`Sort`]{@link Sort} components. Example:
 * ```
 * <div class="CoveoSortDropdown">
 *   <span class="CoveoSort" data-sort-criteria="relevancy" data-caption="Relevance"></span>
 *   <span class="CoveoSort" data-sort-criteria="date descending" data-caption="Newest"></span>
 *   <span class="CoveoSort" data-sort-criteria="date ascending" data-caption="Oldest"></span>
 * </div>
 * ```
 * Each one of the children `Sort` components should have only one sort criteria to prevent the regular toggle behaviour.
 *
 * @availablesince [March 2020 Release (v2.8521)](https://docs.coveo.com/en/3203/)
 */
var SortDropdown = /** @class */ (function (_super) {
    __extends(SortDropdown, _super);
    /**
     * Creates a new `SortDropdown` component instance.
     * @param element The HTMLElement on which to instantiate the component.
     * @param options The options for this component instance.
     * @param bindings The bindings that the component requires to function normally. If not set, these will be
     * automatically resolved (with a slower execution time).
     */
    function SortDropdown(element, options, bindings) {
        var _this = _super.call(this, element, SortDropdown.ID, bindings) || this;
        _this.element = element;
        _this.options = options;
        _this.sortComponents = [];
        _this.options = ComponentOptions_1.ComponentOptions.initComponentOptions(element, SortDropdown, options);
        _this.removeTabSupport();
        _this.bind.oneRootElement(InitializationEvents_1.InitializationEvents.afterInitialization, function () { return _this.handleAfterInitialization(); });
        _this.bind.onQueryState(Model_1.MODEL_EVENTS.CHANGE_ONE, QueryStateModel_1.QUERY_STATE_ATTRIBUTES.SORT, function (args) {
            return _this.handleQueryStateChanged(args);
        });
        _this.bind.onRootElement(QueryEvents_1.QueryEvents.querySuccess, function (args) { return _this.handleQuerySuccess(args); });
        _this.bind.onRootElement(QueryEvents_1.QueryEvents.queryError, function (args) { return _this.handleQueryError(args); });
        return _this;
    }
    SortDropdown.prototype.handleAfterInitialization = function () {
        this.buildDropdown();
    };
    SortDropdown.prototype.clearDropdown = function () {
        this.dropdown && this.element.removeChild(this.dropdown.getElement());
        this.dropdown = null;
    };
    SortDropdown.prototype.buildDropdown = function () {
        var _this = this;
        this.sortComponents = this.getEnabledSortComponents();
        this.clearDropdown();
        if (!this.sortComponents.length) {
            return;
        }
        this.dropdown = new Dropdown_1.Dropdown(function () { return _this.handleChange(); }, this.getValuesForDropdown(), function (value) { return _this.getCaptionForValue(value); }, Strings_1.l('SortBy'));
        this.element.appendChild(this.dropdown.getElement());
        this.update();
    };
    SortDropdown.prototype.getEnabledSortComponents = function () {
        var _this = this;
        var sortComponents = Dom_1.$$(this.element)
            .findAll("." + Component_1.Component.computeCssClassNameForType('Sort'))
            .map(function (sortElement) {
            var sortCmp = Component_1.Component.get(sortElement, Sort_1.Sort);
            if (sortCmp.options.sortCriteria.length == 1) {
                return sortCmp;
            }
            else {
                _this.logger.warn("Each Sort component inside a SortDropdown should have only one sort criteria. Skipping " + sortCmp.options.caption + " in the SortDropdown.");
                return;
            }
        })
            .filter(function (sortCmp) { return sortCmp && !sortCmp.disabled; });
        return sortComponents;
    };
    SortDropdown.prototype.getValuesForDropdown = function () {
        return this.sortComponents.map(function (sort) { return sort.options.sortCriteria.toString(); });
    };
    SortDropdown.prototype.handleQueryStateChanged = function (data) {
        this.update();
    };
    SortDropdown.prototype.update = function () {
        Iif (!this.dropdown) {
            return;
        }
        var sortCriteria = this.queryStateModel.get(QueryStateModel_1.QueryStateModel.attributesEnum.sort);
        this.select(sortCriteria);
    };
    /**
     * Selects a sort criteria from the options.
     * @param sortCriteria The sort criteria to select.
     * @param executeQuery Whether to execute a query after changing the sort criteria
     */
    SortDropdown.prototype.select = function (sortCriteria, executeQuery) {
        if (executeQuery === void 0) { executeQuery = false; }
        var sortIndex = this.getSortIndex(sortCriteria);
        sortIndex > -1 && this.dropdown.select(sortIndex, executeQuery);
        Dom_1.$$(this.dropdown.getElement()).toggleClass('coveo-selected', sortIndex > -1);
    };
    SortDropdown.prototype.handleQuerySuccess = function (data) {
        if (!data.results.results.length) {
            return this.hideElement();
        }
        this.buildDropdown();
        if (!this.sortComponents.length) {
            return this.hideElement();
        }
        this.showElement();
    };
    SortDropdown.prototype.handleQueryError = function (data) {
        this.hideElement();
    };
    SortDropdown.prototype.handleChange = function () {
        var selectedValue = this.dropdown.getValue();
        var sortIndex = this.getSortIndex(selectedValue);
        sortIndex > -1 && this.sortComponents[sortIndex].selectAndExecuteQuery();
    };
    SortDropdown.prototype.getCaptionForValue = function (value) {
        var sortIndex = this.getSortIndex(value);
        return sortIndex > -1 ? this.sortComponents[sortIndex].options.caption : '';
    };
    SortDropdown.prototype.getSortIndex = function (itemValue) {
        return underscore_1.findIndex(this.sortComponents, function (sort) { return sort.options.sortCriteria.toString() === itemValue; });
    };
    SortDropdown.prototype.hideElement = function () {
        Dom_1.$$(this.element).hide();
    };
    SortDropdown.prototype.showElement = function () {
        Dom_1.$$(this.element).show();
    };
    SortDropdown.ID = 'SortDropdown';
    SortDropdown.options = {};
    SortDropdown.doExport = function () {
        GlobalExports_1.exportGlobally({
            SortDropdown: SortDropdown
        });
    };
    return SortDropdown;
}(Component_1.Component));
exports.SortDropdown = SortDropdown;
Initialization_1.Initialization.registerAutoCreateComponent(SortDropdown);
 
 
/***/ }),
/* 862 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __assign = (this && this.__assign) || Object.assign || function(t) {
    for (var s, i = 1, n = arguments.length; i < n; i++) {
        s = arguments[i];
        for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
            t[p] = s[p];
    }
    return t;
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        Iif (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            Iif (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
            Iif (y = 0, t) op = [0, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    Eif (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
Object.defineProperty(exports, "__esModule", { value: true });
var ExternalModulesShim_1 = __webpack_require__(39);
var GlobalExports_1 = __webpack_require__(10);
var Component_1 = __webpack_require__(6);
var Core_1 = __webpack_require__(9);
__webpack_require__(1548);
var underscore_1 = __webpack_require__(1);
var UserFeedbackBanner_1 = __webpack_require__(409);
var AnalyticsActionListMeta_1 = __webpack_require__(7);
var HeightLimiter_1 = __webpack_require__(410);
var ExplanationModal_1 = __webpack_require__(411);
var Strings_1 = __webpack_require__(4);
var AttachShadowPolyfill_1 = __webpack_require__(412);
var Utils_1 = __webpack_require__(5);
var ComponentOptions_1 = __webpack_require__(13);
var SmartSnippetCommon_1 = __webpack_require__(206);
var ResultLink_1 = __webpack_require__(56);
var reasons = [
    {
        analytics: AnalyticsActionListMeta_1.AnalyticsSmartSnippetFeedbackReason.DoesNotAnswer,
        localeKey: 'UsefulnessFeedbackDoesNotAnswer'
    },
    {
        analytics: AnalyticsActionListMeta_1.AnalyticsSmartSnippetFeedbackReason.PartiallyAnswers,
        localeKey: 'UsefulnessFeedbackPartiallyAnswers'
    },
    {
        analytics: AnalyticsActionListMeta_1.AnalyticsSmartSnippetFeedbackReason.WasNotAQuestion,
        localeKey: 'UsefulnessFeedbackWasNotAQuestion'
    },
    {
        analytics: AnalyticsActionListMeta_1.AnalyticsSmartSnippetFeedbackReason.Other,
        localeKey: 'Other',
        hasDetails: true
    }
];
var BASE_CLASSNAME = 'coveo-smart-snippet';
var QUESTION_CLASSNAME = BASE_CLASSNAME + "-question";
var ANSWER_CONTAINER_CLASSNAME = BASE_CLASSNAME + "-answer";
var HAS_ANSWER_CLASSNAME = BASE_CLASSNAME + "-has-answer";
var SHADOW_CLASSNAME = BASE_CLASSNAME + "-content";
var CONTENT_CLASSNAME = BASE_CLASSNAME + "-content-wrapper";
var SOURCE_CLASSNAME = BASE_CLASSNAME + "-source";
var SOURCE_TITLE_CLASSNAME = SOURCE_CLASSNAME + "-title";
var SOURCE_URL_CLASSNAME = SOURCE_CLASSNAME + "-url";
exports.SmartSnippetClassNames = {
    QUESTION_CLASSNAME: QUESTION_CLASSNAME,
    ANSWER_CONTAINER_CLASSNAME: ANSWER_CONTAINER_CLASSNAME,
    HAS_ANSWER_CLASSNAME: HAS_ANSWER_CLASSNAME,
    SHADOW_CLASSNAME: SHADOW_CLASSNAME,
    CONTENT_CLASSNAME: CONTENT_CLASSNAME,
    SOURCE_CLASSNAME: SOURCE_CLASSNAME,
    SOURCE_TITLE_CLASSNAME: SOURCE_TITLE_CLASSNAME,
    SOURCE_URL_CLASSNAME: SOURCE_URL_CLASSNAME
};
/**
 * The SmartSnippet component displays the excerpt of a document that would be most likely to answer a particular query.
 *
 * This excerpt can be visually customized using inline styling.
 */
var SmartSnippet = /** @class */ (function (_super) {
    __extends(SmartSnippet, _super);
    function SmartSnippet(element, options, bindings, ModalBox) {
        Eif (ModalBox === void 0) { ModalBox = ExternalModulesShim_1.ModalBox; }
        var _this = _super.call(this, element, SmartSnippet.ID, bindings) || this;
        _this.element = element;
        _this.options = options;
        _this.ModalBox = ModalBox;
        _this.lastRenderedResult = null;
        _this.options = ComponentOptions_1.ComponentOptions.initComponentOptions(element, SmartSnippet, options);
        _this.bind.onRootElement(Core_1.QueryEvents.deferredQuerySuccess, function (data) { return _this.handleQuerySuccess(data); });
        return _this;
    }
    Object.defineProperty(SmartSnippet.prototype, "loading", {
        get: function () {
            return this.shadowLoading;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(SmartSnippet.prototype, "style", {
        get: function () {
            var styles = Core_1.$$(this.element)
                .children()
                .filter(function (element) { return element instanceof HTMLScriptElement && element.type.toLowerCase() === 'text/css'; })
                .map(function (element) { return element.innerHTML; });
            return styles.length ? styles.join('\n') : null;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(SmartSnippet.prototype, "hasAnswer", {
        set: function (hasAnswer) {
            Core_1.$$(this.element).toggleClass(HAS_ANSWER_CLASSNAME, hasAnswer);
        },
        enumerable: true,
        configurable: true
    });
    SmartSnippet.prototype.createDom = function () {
        var _this = this;
        this.element.appendChild(this.buildAnswerContainer());
        this.feedbackBanner = new UserFeedbackBanner_1.UserFeedbackBanner(function (isUseful) { return (isUseful ? _this.sendLikeSmartSnippetAnalytics() : _this.sendDislikeSmartSnippetAnalytics()); }, function () { return _this.openExplanationModal(); });
        this.element.appendChild(this.feedbackBanner.build());
        this.explanationModal = new ExplanationModal_1.ExplanationModal({
            reasons: reasons.map(function (reason) {
                return ({
                    label: Strings_1.l(reason.localeKey),
                    id: reason.analytics.replace(/_/g, '-'),
                    onSelect: function () { return _this.sendExplanationAnalytics(reason.analytics, _this.explanationModal.details); },
                    hasDetails: reason.hasDetails
                });
            }),
            onClosed: function () { return _this.sendCloseFeedbackModalAnalytics(); },
            ownerElement: this.searchInterface.options.modalContainer,
            modalBoxModule: this.ModalBox
        });
    };
    SmartSnippet.prototype.buildAnswerContainer = function () {
        return Core_1.$$('div', {
            className: ANSWER_CONTAINER_CLASSNAME
        }, this.buildQuestion(), this.buildShadow(), this.buildHeightLimiter(), this.buildSourceContainer()).el;
    };
    SmartSnippet.prototype.buildQuestion = function () {
        return (this.questionContainer = Core_1.$$('div', { className: QUESTION_CLASSNAME }).el);
    };
    SmartSnippet.prototype.buildShadow = function () {
        var _this = this;
        this.shadowContainer = Core_1.$$('div', { className: SHADOW_CLASSNAME }).el;
        this.snippetContainer = Core_1.$$('section', { className: CONTENT_CLASSNAME }).el;
        this.shadowLoading = AttachShadowPolyfill_1.attachShadow(this.shadowContainer, {
            mode: 'open',
            title: Strings_1.l('AnswerSnippet'),
            onSizeChanged: function () { return _this.handleAnswerSizeChanged(); },
            useIFrame: this.options.useIFrame
        }).then(function (shadow) {
            shadow.appendChild(_this.snippetContainer);
            var style = _this.buildStyle();
            shadow.appendChild(style);
            return shadow;
        });
        return this.shadowContainer;
    };
    SmartSnippet.prototype.buildHeightLimiter = function () {
        var _this = this;
        return (this.heightLimiter = new HeightLimiter_1.HeightLimiter(this.shadowContainer, this.shadowContainer.childNodes.item(0), this.options.maximumSnippetHeight, function (isExpanded) { return (isExpanded ? _this.sendExpandSmartSnippetAnalytics() : _this.sendCollapseSmartSnippetAnalytics()); })).toggleButton;
    };
    SmartSnippet.prototype.buildSourceContainer = function () {
        return (this.sourceContainer = Core_1.$$('div', { className: SOURCE_CLASSNAME }).el);
    };
    SmartSnippet.prototype.buildStyle = function () {
        var style = Utils_1.Utils.isNullOrUndefined(this.style) ? SmartSnippetCommon_1.getDefaultSnippetStyle(CONTENT_CLASSNAME) : this.style;
        var styleTag = document.createElement('style');
        styleTag.innerHTML = style;
        return styleTag;
    };
    SmartSnippet.prototype.handleAnswerSizeChanged = function () {
        this.heightLimiter.onContentHeightChanged();
    };
    /**
     * @warning This method only works for the demo. In practice, the source of the answer will not always be part of the results.
     */
    SmartSnippet.prototype.getCorrespondingResult = function (questionAnswer) {
        var lastResults = this.queryController.getLastResults().results;
        var childResults = underscore_1.flatten(underscore_1.map(lastResults, function (lastResult) { return lastResult.childResults; }));
        var attachments = underscore_1.flatten(underscore_1.map(lastResults, function (lastResult) { return lastResult.attachments; }));
        return underscore_1.find(underscore_1.compact(lastResults.concat(childResults, attachments)), function (result) { return result.raw[questionAnswer.documentId.contentIdKey] === questionAnswer.documentId.contentIdValue; });
    };
    SmartSnippet.prototype.handleQuerySuccess = function (data) {
        return __awaiter(this, void 0, void 0, function () {
            var questionAnswer;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        questionAnswer = data.results.questionAnswer;
                        if (!this.containsQuestionAnswer(questionAnswer)) {
                            this.hasAnswer = false;
                            return [2 /*return*/];
                        }
                        this.hasAnswer = true;
                        this.searchUid = data.results.searchUid;
                        return [4 /*yield*/, this.render(questionAnswer)];
                    case 1:
                        _a.sent();
                        return [2 /*return*/];
                }
            });
        });
    };
    SmartSnippet.prototype.containsQuestionAnswer = function (questionAnswer) {
        return questionAnswer && questionAnswer.question && questionAnswer.answerSnippet;
    };
    SmartSnippet.prototype.render = function (questionAnswer) {
        return __awaiter(this, void 0, void 0, function () {
            return __generator(this, function (_a) {
                this.ensureDom();
                this.feedbackBanner.reset();
                this.questionContainer.innerText = questionAnswer.question;
                this.renderSnippet(questionAnswer);
                this.lastRenderedResult = this.getCorrespondingResult(questionAnswer);
                if (this.lastRenderedResult) {
                    this.renderSource();
                }
                else {
                    this.lastRenderedResult = null;
                }
                return [2 /*return*/];
            });
        });
    };
    SmartSnippet.prototype.renderSnippet = function (questionAnswer) {
        var _this = this;
        this.snippetContainer.innerHTML = SmartSnippetCommon_1.getSanitizedAnswerSnippet(questionAnswer);
        SmartSnippetCommon_1.transformSnippetLinks(this.snippetContainer, this.options.alwaysOpenInNewWindow, function (link) { return _this.sendClickSnippetLinkAnalytics(link); });
    };
    SmartSnippet.prototype.renderSource = function () {
        var container = Core_1.$$(this.sourceContainer);
        container.empty();
        container.append(this.renderSourceUrl().el);
        container.append(this.renderSourceTitle().el);
    };
    SmartSnippet.prototype.renderSourceTitle = function () {
        var link = this.buildLink(SOURCE_TITLE_CLASSNAME);
        link.text(Utils_1.Utils.getFieldValue(this.lastRenderedResult, this.options.titleField));
        return link;
    };
    SmartSnippet.prototype.renderSourceUrl = function () {
        var link = this.buildLink(SOURCE_URL_CLASSNAME);
        link.text(link.el.href);
        return link;
    };
    SmartSnippet.prototype.buildLink = function (className) {
        var _this = this;
        var element = Core_1.$$('a', { className: 'CoveoResultLink' });
        element.addClass(className);
        new ResultLink_1.ResultLink(element.el, {
            hrefTemplate: this.options.hrefTemplate,
            logAnalytics: function (href) { return _this.sendClickSourceAnalytics(element.el, href); },
            alwaysOpenInNewWindow: this.options.alwaysOpenInNewWindow
        }, __assign({}, this.getBindings(), { resultElement: this.element }), this.lastRenderedResult);
        return element;
    };
    SmartSnippet.prototype.openExplanationModal = function () {
        this.sendOpenFeedbackModalAnalytics();
        this.explanationModal.open(this.feedbackBanner.explainWhy);
    };
    SmartSnippet.prototype.sendLikeSmartSnippetAnalytics = function () {
        return this.usageAnalytics.logCustomEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.likeSmartSnippet, { searchQueryUid: this.searchUid }, this.element);
    };
    SmartSnippet.prototype.sendDislikeSmartSnippetAnalytics = function () {
        return this.usageAnalytics.logCustomEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.dislikeSmartSnippet, { searchQueryUid: this.searchUid }, this.element);
    };
    SmartSnippet.prototype.sendExpandSmartSnippetAnalytics = function () {
        return this.usageAnalytics.logCustomEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.expandSmartSnippet, { searchQueryUid: this.searchUid }, this.element);
    };
    SmartSnippet.prototype.sendCollapseSmartSnippetAnalytics = function () {
        return this.usageAnalytics.logCustomEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.collapseSmartSnippet, { searchQueryUid: this.searchUid }, this.element);
    };
    SmartSnippet.prototype.sendOpenFeedbackModalAnalytics = function () {
        return this.usageAnalytics.logCustomEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.openSmartSnippetFeedbackModal, { searchQueryUid: this.searchUid }, this.element);
    };
    SmartSnippet.prototype.sendCloseFeedbackModalAnalytics = function () {
        return this.usageAnalytics.logCustomEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.closeSmartSnippetFeedbackModal, { searchQueryUid: this.searchUid }, this.element);
    };
    SmartSnippet.prototype.sendExplanationAnalytics = function (reason, details) {
        return this.usageAnalytics.logCustomEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.sendSmartSnippetReason, {
            searchQueryUid: this.searchUid,
            reason: reason,
            details: details
        }, this.element);
    };
    SmartSnippet.prototype.sendClickSourceAnalytics = function (element, href) {
        return this.usageAnalytics.logClickEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.openSmartSnippetSource, {
            searchQueryUid: this.searchUid,
            documentTitle: this.lastRenderedResult.title,
            author: Utils_1.Utils.getFieldValue(this.lastRenderedResult, 'author'),
            documentURL: href
        }, this.lastRenderedResult, element);
    };
    SmartSnippet.prototype.sendClickSnippetLinkAnalytics = function (link) {
        return this.usageAnalytics.logClickEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.openSmartSnippetInlineLink, {
            searchQueryUid: this.searchUid,
            linkText: link.innerText,
            linkURL: link.href
        }, this.lastRenderedResult, link);
    };
    SmartSnippet.ID = 'SmartSnippet';
    SmartSnippet.doExport = function () {
        GlobalExports_1.exportGlobally({
            SmartSnippet: SmartSnippet
        });
    };
    /**
     * The options for the SmartSnippet
     * @componentOptions
     */
    SmartSnippet.options = {
        /**
         * The maximum height an answer can have in pixels.
         * Any part of an answer exceeding this height will be hidden by default and expendable via a "show more" button.
         * Default value is `250`.
         */
        maximumSnippetHeight: ComponentOptions_1.ComponentOptions.buildNumberOption({ defaultValue: 250, min: 0 }),
        /**
         * The field to display for the title.
         */
        titleField: ComponentOptions_1.ComponentOptions.buildFieldOption({ defaultValue: '@title' }),
        /**
         * Specifies a template literal from which to generate the title and URI's `href` attribute value (see
         * [Template literals](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Template_literals)).
         *
         * This option overrides the [`field`]{@link SmartSnippet.options.uriField} option value.
         *
         * The template literal can reference any number of fields from the parent result. It can also reference global
         * scope properties.
         *
         * **Examples:**
         *
         * - The following markup generates an `href` value such as `http://uri.com?id=itemTitle`:
         *
         * ```html
         * <a class='CoveoSmartSnippet' data-href-template='${clickUri}?id=${raw.title}'></a>
         * ```
         *
         * - The following markup generates an `href` value such as `localhost/fooBar`:
         *
         * ```html
         * <a class='CoveoSmartSnippet' data-href-template='${window.location.hostname}/{Foo.Bar}'></a>
         * ```
         *
         * Default value is `undefined`.
         */
        hrefTemplate: ComponentOptions_1.ComponentOptions.buildStringOption(),
        /**
         * Specifies whether the component should open its links in a new window instead of opening them in the current
         * context.
         *
         * Default value is `false`.
         */
        alwaysOpenInNewWindow: ComponentOptions_1.ComponentOptions.buildBooleanOption({ defaultValue: false }),
        /**
         * Specify if the SmartSnippet should be displayed inside an iframe or not.
         *
         * Use this option in specific cases where your environment has limitations around iframe usage.
         *
         * **Examples:**
         *
         * ```html
         * <div class='CoveoSmartSnippet' data-use-i-frame='true'></div>
         * ```
         *
         * Default value is `true`.
         */
        useIFrame: ComponentOptions_1.ComponentOptions.buildBooleanOption({ defaultValue: true })
    };
    return SmartSnippet;
}(Component_1.Component));
exports.SmartSnippet = SmartSnippet;
Core_1.Initialization.registerAutoCreateComponent(SmartSnippet);
 
 
/***/ }),
/* 863 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
__webpack_require__(1552);
var Component_1 = __webpack_require__(6);
var GlobalExports_1 = __webpack_require__(10);
var QueryEvents_1 = __webpack_require__(14);
var Dom_1 = __webpack_require__(0);
var underscore_1 = __webpack_require__(1);
var SmartSnippetCollapsibleSuggestion_1 = __webpack_require__(864);
var Strings_1 = __webpack_require__(4);
var Initialization_1 = __webpack_require__(8);
var Utils_1 = __webpack_require__(5);
var SmartSnippetCommon_1 = __webpack_require__(206);
var ComponentOptions_1 = __webpack_require__(13);
var BASE_CLASSNAME = 'coveo-smart-snippet-suggestions';
var HAS_QUESTIONS_CLASSNAME = BASE_CLASSNAME + "-has-questions";
var QUESTIONS_LIST_CLASSNAME = BASE_CLASSNAME + "-questions";
var QUESTIONS_LIST_TITLE_CLASSNAME = QUESTIONS_LIST_CLASSNAME + "-title";
exports.SmartSnippetSuggestionsClassNames = {
    HAS_QUESTIONS_CLASSNAME: HAS_QUESTIONS_CLASSNAME,
    QUESTIONS_LIST_CLASSNAME: QUESTIONS_LIST_CLASSNAME,
    QUESTIONS_LIST_TITLE_CLASSNAME: QUESTIONS_LIST_TITLE_CLASSNAME
};
/**
 * The SmartSnippetSuggestions component displays additional queries for which a Coveo Smart Snippets model can provide relevant excerpts.
 */
var SmartSnippetSuggestions = /** @class */ (function (_super) {
    __extends(SmartSnippetSuggestions, _super);
    function SmartSnippetSuggestions(element, options, bindings) {
        var _this = _super.call(this, element, SmartSnippetSuggestions.ID, bindings) || this;
        _this.element = element;
        _this.options = options;
        _this.titleId = underscore_1.uniqueId(QUESTIONS_LIST_TITLE_CLASSNAME);
        _this.options = ComponentOptions_1.ComponentOptions.initComponentOptions(element, SmartSnippetSuggestions, options);
        _this.bind.onRootElement(QueryEvents_1.QueryEvents.deferredQuerySuccess, function (data) { return _this.handleQuerySuccess(data); });
        return _this;
    }
    Object.defineProperty(SmartSnippetSuggestions.prototype, "loading", {
        get: function () {
            return this.contentLoaded;
        },
        enumerable: true,
        configurable: true
    });
    /**
     * @warning This method only works for the demo. In practice, the source of the answer will not always be part of the results.
     */
    SmartSnippetSuggestions.prototype.getCorrespondingResult = function (questionAnswer) {
        return underscore_1.find(this.queryController.getLastResults().results, function (result) { return result.raw[questionAnswer.documentId.contentIdKey] === questionAnswer.documentId.contentIdValue; });
    };
    SmartSnippetSuggestions.prototype.handleQuerySuccess = function (data) {
        var questionAnswer = data.results.questionAnswer;
        var hasQuestions = !!(questionAnswer && questionAnswer.relatedQuestions.length);
        Dom_1.$$(this.element).toggleClass(HAS_QUESTIONS_CLASSNAME, hasQuestions);
        if (hasQuestions) {
            this.searchUid = data.results.searchUid;
            Iif (this.renderedQuestionAnswer && underscore_1.isEqual(questionAnswer, this.renderedQuestionAnswer)) {
                return;
            }
            this.detachContent();
            this.element.appendChild((this.title = this.buildTitle()).el);
            this.element.appendChild((this.questionAnswers = this.buildQuestionAnswers(questionAnswer.relatedQuestions)).el);
        }
        else {
            this.detachContent();
        }
        this.renderedQuestionAnswer = questionAnswer;
    };
    SmartSnippetSuggestions.prototype.detachContent = function () {
        this.title && this.title.detach();
        this.questionAnswers && this.questionAnswers.detach();
        this.title = this.questionAnswers = null;
    };
    SmartSnippetSuggestions.prototype.buildTitle = function () {
        return Dom_1.$$('span', { className: QUESTIONS_LIST_TITLE_CLASSNAME, id: this.titleId }, Strings_1.l('SuggestedQuestions'));
    };
    SmartSnippetSuggestions.prototype.buildQuestionAnswers = function (questionAnswers) {
        var _this = this;
        var innerCSS = this.getInnerCSS();
        var answers = questionAnswers.map(function (questionAnswer) {
            return new SmartSnippetCollapsibleSuggestion_1.SmartSnippetCollapsibleSuggestion({
                questionAnswer: questionAnswer,
                bindings: _this.getBindings(),
                innerCSS: Utils_1.Utils.isNullOrUndefined(innerCSS)
                    ? SmartSnippetCommon_1.getDefaultSnippetStyle(SmartSnippetCollapsibleSuggestion_1.SmartSnippetCollapsibleSuggestionClassNames.RAW_CONTENT_CLASSNAME)
                    : innerCSS,
                searchUid: _this.searchUid,
                titleField: _this.options.titleField,
                hrefTemplate: _this.options.hrefTemplate,
                alwaysOpenInNewWindow: _this.options.alwaysOpenInNewWindow,
                source: _this.getCorrespondingResult(questionAnswer),
                useIFrame: _this.options.useIFrame
            });
        });
        var container = Dom_1.$$.apply(void 0, ['ul',
            { className: QUESTIONS_LIST_CLASSNAME, ariaLabelledby: this.titleId }].concat(answers.map(function (answer) { return answer.build(); })));
        this.contentLoaded = Promise.all(answers.map(function (answer) { return answer.loading.then(function () { return answer; }); }));
        return container;
    };
    SmartSnippetSuggestions.prototype.getInnerCSS = function () {
        var styles = Dom_1.$$(this.element)
            .children()
            .filter(function (element) { return element instanceof HTMLScriptElement && element.type.toLowerCase() === 'text/css'; })
            .map(function (element) { return element.innerHTML; });
        return styles.length ? styles.join('\n') : null;
    };
    SmartSnippetSuggestions.ID = 'SmartSnippetSuggestions';
    SmartSnippetSuggestions.doExport = function () {
        GlobalExports_1.exportGlobally({
            SmartSnippetSuggestions: SmartSnippetSuggestions
        });
    };
    /**
     * The options for the SmartSnippetSuggestions
     * @componentOptions
     */
    SmartSnippetSuggestions.options = {
        /**
         * The field to display for the title.
         */
        titleField: ComponentOptions_1.ComponentOptions.buildFieldOption({ defaultValue: '@title' }),
        /**
         * Specifies a template literal from which to generate the title and URI's `href` attribute value (see
         * [Template literals](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Template_literals)).
         *
         * This option overrides the [`field`]{@link SmartSnippet.options.uriField} option value.
         *
         * The template literal can reference any number of fields from the parent result. It can also reference global
         * scope properties.
         *
         * **Examples:**
         *
         * - The following markup generates an `href` value such as `http://uri.com?id=itemTitle`:
         *
         * ```html
         * <a class='CoveoSmartSnippet' data-href-template='${clickUri}?id=${raw.title}'></a>
         * ```
         *
         * - The following markup generates an `href` value such as `localhost/fooBar`:
         *
         * ```html
         * <a class='CoveoSmartSnippet' data-href-template='${window.location.hostname}/{Foo.Bar}'></a>
         * ```
         *
         * Default value is `undefined`.
         */
        hrefTemplate: ComponentOptions_1.ComponentOptions.buildStringOption(),
        /**
         * Specifies whether the component should open its links in a new window instead of opening them in the current
         * context.
         *
         * Default value is `false`.
         */
        alwaysOpenInNewWindow: ComponentOptions_1.ComponentOptions.buildBooleanOption({ defaultValue: false }),
        /**
         * Specify if the SmartSnippetSuggestion snippet should be displayed inside an iframe or not.
         *
         * Use this option in specific cases where your environment has limitations around iframe usage.
         *
         * **Examples:**
         *
         * ```html
         * <div class='CoveoSmartSnippetSuggestions' data-use-i-frame='true'></div>
         * ```
         *
         * Default value is `true`.
         */
        useIFrame: ComponentOptions_1.ComponentOptions.buildBooleanOption({ defaultValue: true })
    };
    return SmartSnippetSuggestions;
}(Component_1.Component));
exports.SmartSnippetSuggestions = SmartSnippetSuggestions;
Initialization_1.Initialization.registerAutoCreateComponent(SmartSnippetSuggestions);
SmartSnippetSuggestions.doExport();
 
 
/***/ }),
/* 864 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __assign = (this && this.__assign) || Object.assign || function(t) {
    for (var s, i = 1, n = arguments.length; i < n; i++) {
        s = arguments[i];
        for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
            t[p] = s[p];
    }
    return t;
};
Object.defineProperty(exports, "__esModule", { value: true });
var underscore_1 = __webpack_require__(1);
var AccessibleButton_1 = __webpack_require__(20);
var SVGIcons_1 = __webpack_require__(16);
var AttachShadowPolyfill_1 = __webpack_require__(412);
var Dom_1 = __webpack_require__(0);
var Strings_1 = __webpack_require__(4);
var AnalyticsActionListMeta_1 = __webpack_require__(7);
var ResultLink_1 = __webpack_require__(56);
var Utils_1 = __webpack_require__(5);
var SmartSnippetCommon_1 = __webpack_require__(206);
var QUESTION_CLASSNAME = "coveo-smart-snippet-suggestions-question";
var QUESTION_TITLE_CLASSNAME = QUESTION_CLASSNAME + "-title";
var QUESTION_TITLE_LABEL_CLASSNAME = QUESTION_TITLE_CLASSNAME + "-label";
var QUESTION_TITLE_CHECKBOX_CLASSNAME = QUESTION_TITLE_CLASSNAME + "-checkbox";
var QUESTION_SNIPPET_CLASSNAME = QUESTION_CLASSNAME + "-snippet";
var QUESTION_SNIPPET_CONTAINER_CLASSNAME = QUESTION_SNIPPET_CLASSNAME + "-container";
var QUESTION_SNIPPET_HIDDEN_CLASSNAME = QUESTION_SNIPPET_CLASSNAME + "-hidden";
var SHADOW_CLASSNAME = QUESTION_SNIPPET_CLASSNAME + "-content";
var RAW_CONTENT_CLASSNAME = SHADOW_CLASSNAME + "-raw";
var SOURCE_CLASSNAME = QUESTION_CLASSNAME + "-source";
var SOURCE_TITLE_CLASSNAME = SOURCE_CLASSNAME + "-title";
var SOURCE_URL_CLASSNAME = SOURCE_CLASSNAME + "-url";
exports.SmartSnippetCollapsibleSuggestionClassNames = {
    QUESTION_CLASSNAME: QUESTION_CLASSNAME,
    QUESTION_TITLE_CLASSNAME: QUESTION_TITLE_CLASSNAME,
    QUESTION_TITLE_LABEL_CLASSNAME: QUESTION_TITLE_LABEL_CLASSNAME,
    QUESTION_TITLE_CHECKBOX_CLASSNAME: QUESTION_TITLE_CHECKBOX_CLASSNAME,
    QUESTION_SNIPPET_CLASSNAME: QUESTION_SNIPPET_CLASSNAME,
    QUESTION_SNIPPET_CONTAINER_CLASSNAME: QUESTION_SNIPPET_CONTAINER_CLASSNAME,
    QUESTION_SNIPPET_HIDDEN_CLASSNAME: QUESTION_SNIPPET_HIDDEN_CLASSNAME,
    SHADOW_CLASSNAME: SHADOW_CLASSNAME,
    RAW_CONTENT_CLASSNAME: RAW_CONTENT_CLASSNAME,
    SOURCE_CLASSNAME: SOURCE_CLASSNAME,
    SOURCE_TITLE_CLASSNAME: SOURCE_TITLE_CLASSNAME,
    SOURCE_URL_CLASSNAME: SOURCE_URL_CLASSNAME
};
var SmartSnippetCollapsibleSuggestion = /** @class */ (function () {
    function SmartSnippetCollapsibleSuggestion(options) {
        this.options = options;
        this.labelId = underscore_1.uniqueId(QUESTION_TITLE_LABEL_CLASSNAME);
        this.snippetId = underscore_1.uniqueId(QUESTION_SNIPPET_CLASSNAME);
        this.checkboxId = underscore_1.uniqueId(QUESTION_TITLE_CHECKBOX_CLASSNAME);
        this.expanded = false;
    }
    Object.defineProperty(SmartSnippetCollapsibleSuggestion.prototype, "loading", {
        get: function () {
            return this.contentLoaded;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(SmartSnippetCollapsibleSuggestion.prototype, "analyticsSuggestionMeta", {
        get: function () {
            var _a = this.options.questionAnswer, documentId = _a.documentId, question = _a.question, answerSnippet = _a.answerSnippet;
            return {
                searchQueryUid: this.options.searchUid,
                documentId: documentId,
                question: question,
                answerSnippet: answerSnippet
            };
        },
        enumerable: true,
        configurable: true
    });
    SmartSnippetCollapsibleSuggestion.prototype.build = function () {
        var collapsibleContainer = this.buildCollapsibleContainer(this.options.questionAnswer, this.buildStyle(this.options.innerCSS));
        var title = this.buildTitle(this.options.questionAnswer.question);
        this.updateExpanded();
        return Dom_1.$$('li', {
            className: QUESTION_CLASSNAME,
            ariaLabelledby: this.labelId
        }, title, collapsibleContainer).el;
    };
    SmartSnippetCollapsibleSuggestion.prototype.buildStyle = function (innerCSS) {
        var styleTag = document.createElement('style');
        styleTag.innerHTML = innerCSS;
        return styleTag;
    };
    SmartSnippetCollapsibleSuggestion.prototype.buildTitle = function (question) {
        var _this = this;
        var checkbox = this.buildCheckbox(question);
        var label = Dom_1.$$('span', { className: QUESTION_TITLE_LABEL_CLASSNAME, id: this.labelId });
        label.text(question);
        var title = Dom_1.$$('span', { className: QUESTION_TITLE_CLASSNAME }, label, checkbox);
        title.on('click', function () { return _this.toggle(); });
        return title;
    };
    SmartSnippetCollapsibleSuggestion.prototype.buildCheckbox = function (question) {
        var _this = this;
        this.checkbox = Dom_1.$$('div', {
            role: 'button',
            tabindex: 0,
            ariaControls: this.snippetId,
            className: QUESTION_TITLE_CHECKBOX_CLASSNAME,
            id: this.checkboxId
        });
        new AccessibleButton_1.AccessibleButton()
            .withElement(this.checkbox)
            .withLabel(Strings_1.l('ExpandQuestionAnswer', question))
            .withEnterKeyboardAction(function () { return _this.toggle(); })
            .build();
        return this.checkbox;
    };
    SmartSnippetCollapsibleSuggestion.prototype.buildCollapsibleContainer = function (questionAnswer, style) {
        var _this = this;
        var shadowContainer = Dom_1.$$('div', { className: SHADOW_CLASSNAME });
        this.snippetAndSourceContainer = Dom_1.$$('div', { className: QUESTION_SNIPPET_CONTAINER_CLASSNAME }, shadowContainer);
        this.collapsibleContainer = Dom_1.$$('div', { className: QUESTION_SNIPPET_CLASSNAME, id: this.snippetId }, this.snippetAndSourceContainer);
        this.contentLoaded = AttachShadowPolyfill_1.attachShadow(shadowContainer.el, {
            mode: 'open',
            title: Strings_1.l('AnswerSpecificSnippet', questionAnswer.question),
            useIFrame: this.options.useIFrame
        }).then(function (shadowRoot) {
            shadowRoot.appendChild(_this.buildAnswerSnippetContent(questionAnswer, style).el);
        });
        if (this.options.source) {
            this.snippetAndSourceContainer.append(this.buildSourceUrl().el);
            this.snippetAndSourceContainer.append(this.buildSourceTitle().el);
        }
        return this.collapsibleContainer;
    };
    SmartSnippetCollapsibleSuggestion.prototype.buildAnswerSnippetContent = function (questionAnswer, style) {
        var _this = this;
        var snippet = Dom_1.$$('div', { className: RAW_CONTENT_CLASSNAME }, SmartSnippetCommon_1.getSanitizedAnswerSnippet(questionAnswer));
        SmartSnippetCommon_1.transformSnippetLinks(snippet.el, this.options.alwaysOpenInNewWindow, function (link) { return _this.sendOpenSnippetLinkAnalytics(link); });
        var container = Dom_1.$$('div', {}, snippet);
        container.append(style);
        return container;
    };
    SmartSnippetCollapsibleSuggestion.prototype.buildSourceTitle = function () {
        var link = this.buildLink(SOURCE_TITLE_CLASSNAME);
        link.text(Utils_1.Utils.getFieldValue(this.options.source, this.options.titleField));
        return link;
    };
    SmartSnippetCollapsibleSuggestion.prototype.buildSourceUrl = function () {
        var link = this.buildLink(SOURCE_URL_CLASSNAME);
        link.text(link.el.href);
        return link;
    };
    SmartSnippetCollapsibleSuggestion.prototype.buildLink = function (className) {
        var _this = this;
        var element = Dom_1.$$('a', { className: "CoveoResultLink " + className });
        new ResultLink_1.ResultLink(element.el, {
            hrefTemplate: this.options.hrefTemplate,
            logAnalytics: function (href) { return _this.sendOpenSourceAnalytics(element.el, href); },
            alwaysOpenInNewWindow: this.options.alwaysOpenInNewWindow
        }, __assign({}, this.options.bindings, { resultElement: this.collapsibleContainer.el }), this.options.source);
        return element;
    };
    SmartSnippetCollapsibleSuggestion.prototype.toggle = function () {
        this.expanded = !this.expanded;
        this.updateExpanded();
        if (this.expanded) {
            this.sendExpandAnalytics();
        }
        else {
            this.sendCollapseAnalytics();
        }
    };
    SmartSnippetCollapsibleSuggestion.prototype.updateIFrameExpanded = function () {
        var iframe = this.snippetAndSourceContainer.find('iframe');
        if (!iframe) {
            return;
        }
        this.expanded ? iframe.removeAttribute('tabindex') : iframe.setAttribute('tabindex', '-1');
    };
    SmartSnippetCollapsibleSuggestion.prototype.updateExpanded = function () {
        this.checkbox.setAttribute('aria-expanded', this.expanded.toString());
        this.checkbox.setHtml(this.expanded ? SVGIcons_1.SVGIcons.icons.arrowUp : SVGIcons_1.SVGIcons.icons.arrowDown);
        this.collapsibleContainer.setAttribute('aria-hidden', (!this.expanded).toString());
        this.collapsibleContainer.toggleClass(QUESTION_SNIPPET_HIDDEN_CLASSNAME, !this.expanded);
        this.collapsibleContainer.el.style.height = this.expanded ? this.snippetAndSourceContainer.el.clientHeight + "px" : '0px';
        this.updateIFrameExpanded();
    };
    SmartSnippetCollapsibleSuggestion.prototype.sendExpandAnalytics = function () {
        return this.options.bindings.usageAnalytics.logCustomEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.expandSmartSnippetSuggestion, this.analyticsSuggestionMeta, this.checkbox.el);
    };
    SmartSnippetCollapsibleSuggestion.prototype.sendCollapseAnalytics = function () {
        return this.options.bindings.usageAnalytics.logCustomEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.collapseSmartSnippetSuggestion, this.analyticsSuggestionMeta, this.checkbox.el);
    };
    SmartSnippetCollapsibleSuggestion.prototype.sendOpenSourceAnalytics = function (element, href) {
        return this.options.bindings.usageAnalytics.logClickEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.openSmartSnippetSuggestionSource, __assign({}, this.analyticsSuggestionMeta, { documentTitle: this.options.source.title, author: Utils_1.Utils.getFieldValue(this.options.source, 'author'), documentURL: href }), this.options.source, element);
    };
    SmartSnippetCollapsibleSuggestion.prototype.sendOpenSnippetLinkAnalytics = function (link) {
        return this.options.bindings.usageAnalytics.logClickEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.openSmartSnippetSuggestionInlineLink, __assign({}, this.analyticsSuggestionMeta, { linkText: link.innerText, linkURL: link.href }), this.options.source, link);
    };
    return SmartSnippetCollapsibleSuggestion;
}());
exports.SmartSnippetCollapsibleSuggestion = SmartSnippetCollapsibleSuggestion;
 
 
/***/ }),
/* 865 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
exports.JQuery = __webpack_require__(1553);
 
 
/***/ }),
/* 866 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { Iif (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        Iif (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            Iif (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
            Iif (y = 0, t) op = [0, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    Eif (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        Iif (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
Object.defineProperty(exports, "__esModule", { value: true });
var Mock = __webpack_require__(2);
var QuerySuggestPreview_1 = __webpack_require__(859);
var Core_1 = __webpack_require__(9);
var Fake_1 = __webpack_require__(11);
var AnalyticsActionListMeta_1 = __webpack_require__(7);
var underscore_1 = __webpack_require__(1);
var ResultPreviewsManagerEvents_1 = __webpack_require__(198);
var ResultLink_1 = __webpack_require__(56);
function initOmniboxAnalyticsMock(omniboxAnalytics) {
    var partialQueries = [];
    var suggestionRanking;
    var suggestions = [];
    var partialQuery;
    var buildCustomDataForPartialQueries = function () {
        return getMetadata(omniboxAnalytics);
    };
    return (omniboxAnalytics = {
        partialQueries: partialQueries,
        suggestionRanking: suggestionRanking,
        suggestions: suggestions,
        partialQuery: partialQuery,
        buildCustomDataForPartialQueries: buildCustomDataForPartialQueries
    });
}
exports.initOmniboxAnalyticsMock = initOmniboxAnalyticsMock;
function getMetadata(omniboxAnalytics) {
    return {
        suggestionRanking: omniboxAnalytics.suggestionRanking,
        suggestions: omniboxAnalytics.suggestions.join(';'),
        partialQueries: omniboxAnalytics.partialQueries.join(';'),
        partialQuery: underscore_1.last(omniboxAnalytics.partialQuery)
    };
}
function QuerySuggestPreviewTest() {
    var _this = this;
    describe('QuerySuggestPreview', function () {
        var templateClassName = 'test-template';
        var test;
        var testEnv;
        var omniboxAnalytics;
        var fakeResults;
        function setupQuerySuggestPreview(options, useCustomTemplate) {
            if (options === void 0) { options = {}; }
            if (useCustomTemplate === void 0) { useCustomTemplate = true; }
            if (useCustomTemplate) {
                options.resultTemplate = Core_1.HtmlTemplate.create(Core_1.$$('script', { className: 'result-template', type: 'text/html' }, Core_1.$$('div', { className: templateClassName })).el);
            }
            test = Mock.advancedComponentSetup(QuerySuggestPreview_1.QuerySuggestPreview, new Mock.AdvancedComponentSetupOptions(null, options, function (env) { return testEnv; }));
            spyOn(Core_1.Component, 'resolveRoot').and.returnValue(testEnv.root);
            createDefaultFakeResults();
        }
        function createDefaultFakeResults() {
            fakeResults = Fake_1.FakeResults.createFakeResults(test.cmp.options.numberOfPreviewResults);
        }
        function triggerPopulateSearchResultPreviews(suggestionText) {
            Iif (suggestionText === void 0) { suggestionText = 'test'; }
            test.env.searchEndpoint.search.and.returnValue(Promise.resolve(fakeResults));
            var event = { suggestion: { text: suggestionText }, previewsQueries: [] };
            Core_1.$$(testEnv.root).trigger(ResultPreviewsManagerEvents_1.ResultPreviewsManagerEvents.populateSearchResultPreviews, event);
            return event.previewsQueries[0];
        }
        function triggerPopulateSearchResultPreviewsAndPassTime(suggestion) {
            if (suggestion === void 0) { suggestion = 'test'; }
            var query = triggerPopulateSearchResultPreviews(suggestion);
            Eif (query instanceof Promise) {
                return query;
            }
            return Promise.resolve(query);
        }
        function getLastQuery() {
            return test.cmp.queryController.getEndpoint().search.calls.mostRecent().args[0];
        }
        beforeEach(function () {
            testEnv = new Mock.MockEnvironmentBuilder();
            omniboxAnalytics = _this.initOmniboxAnalyticsMock(omniboxAnalytics);
            testEnv.searchInterface.getOmniboxAnalytics = jasmine.createSpy('omniboxAnalytics').and.returnValue(omniboxAnalytics);
            jasmine.clock().install();
        });
        afterEach(function () {
            jasmine.clock().uninstall();
        });
        it('uses some options from the last query', function (done) { return __awaiter(_this, void 0, void 0, function () {
            var optionsToTest, lastSearchQuery, _i, _a, optionName;
            return __generator(this, function (_b) {
                switch (_b.label) {
                    case 0:
                        optionsToTest = {
                            firstResult: 0,
                            searchHub: 'some search hub',
                            pipeline: 'a pipeline',
                            tab: 'one tab',
                            locale: 'some locale',
                            timezone: 'a timezone',
                            context: {
                                'the first key': 'the first value',
                                'the second key': 'the second value'
                            },
                            cq: 'some constant query'
                        };
                        setupQuerySuggestPreview();
                        test.cmp.queryController.getLastQuery.and.returnValue(optionsToTest);
                        return [4 /*yield*/, triggerPopulateSearchResultPreviewsAndPassTime()];
                    case 1:
                        _b.sent();
                        lastSearchQuery = getLastQuery();
                        for (_i = 0, _a = Object.keys(optionsToTest); _i < _a.length; _i++) {
                            optionName = _a[_i];
                            expect(lastSearchQuery[optionName]).toEqual(optionsToTest[optionName]);
                        }
                        done();
                        return [2 /*return*/];
                }
            });
        }); });
        it('uses the suggestion text in its search', function (done) { return __awaiter(_this, void 0, void 0, function () {
            var suggestionText, lastSearchQuery;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        setupQuerySuggestPreview();
                        suggestionText = 'Hello, World!';
                        return [4 /*yield*/, triggerPopulateSearchResultPreviewsAndPassTime(suggestionText)];
                    case 1:
                        _a.sent();
                        lastSearchQuery = test.cmp.queryController.getEndpoint().search.calls.mostRecent().args[0];
                        expect(lastSearchQuery.q).toEqual(suggestionText);
                        done();
                        return [2 /*return*/];
                }
            });
        }); });
        it('on select, logs analytics once', function (done) { return __awaiter(_this, void 0, void 0, function () {
            var suggestionText, previews, previewIndexToSelect, spy;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        setupQuerySuggestPreview();
                        suggestionText = 'abcdef';
                        return [4 /*yield*/, triggerPopulateSearchResultPreviewsAndPassTime(suggestionText)];
                    case 1:
                        previews = _a.sent();
                        previewIndexToSelect = 0;
                        previews[previewIndexToSelect].onSelect();
                        spy = test.cmp.usageAnalytics.logCustomEvent;
                        expect(spy).toHaveBeenCalledTimes(1);
                        expect(spy).toHaveBeenCalledWith(AnalyticsActionListMeta_1.analyticsActionCauseList.clickQuerySuggestPreview, {
                            suggestion: suggestionText,
                            displayedRank: previewIndexToSelect
                        }, previews[previewIndexToSelect].element);
                        done();
                        return [2 /*return*/];
                }
            });
        }); });
        it('builds a default template with a div tag', function () {
            var template = test.cmp['buildDefaultSearchResultPreviewTemplate']();
            // A div tag is used instead of a script tag because Firefox doesn't support appending elements to a script tag.
            expect(template.element.tagName.toLowerCase()).toEqual('div');
        });
        it('triggers a building query event immediately when populating', function (done) { return __awaiter(_this, void 0, void 0, function () {
            var onBuildingQuery;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        onBuildingQuery = jasmine.createSpy(ResultPreviewsManagerEvents_1.ResultPreviewsManagerEvents.buildingResultPreviewsQuery);
                        Core_1.$$(testEnv.root).on(ResultPreviewsManagerEvents_1.ResultPreviewsManagerEvents.buildingResultPreviewsQuery, onBuildingQuery);
                        setupQuerySuggestPreview();
                        return [4 /*yield*/, triggerPopulateSearchResultPreviewsAndPassTime()];
                    case 1:
                        _a.sent();
                        expect(onBuildingQuery).toHaveBeenCalledTimes(1);
                        done();
                        return [2 /*return*/];
                }
            });
        }); });
        it('allows the query to be changed with the building query event', function (done) { return __awaiter(_this, void 0, void 0, function () {
            var testQuery;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        testQuery = 'abc';
                        Core_1.$$(testEnv.root).on(ResultPreviewsManagerEvents_1.ResultPreviewsManagerEvents.buildingResultPreviewsQuery, function (_, data) {
                            data.query.q = testQuery;
                        });
                        setupQuerySuggestPreview();
                        return [4 /*yield*/, triggerPopulateSearchResultPreviewsAndPassTime()];
                    case 1:
                        _a.sent();
                        expect(getLastQuery().q).toEqual(testQuery);
                        done();
                        return [2 /*return*/];
                }
            });
        }); });
        it('triggers the building query event with the same query used for search', function (done) { return __awaiter(_this, void 0, void 0, function () {
            var builtQuery;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        Core_1.$$(testEnv.root).on(ResultPreviewsManagerEvents_1.ResultPreviewsManagerEvents.buildingResultPreviewsQuery, function (_, data) {
                            builtQuery = data.query;
                        });
                        setupQuerySuggestPreview();
                        return [4 /*yield*/, triggerPopulateSearchResultPreviewsAndPassTime()];
                    case 1:
                        _a.sent();
                        expect(getLastQuery()).toEqual(builtQuery);
                        done();
                        return [2 /*return*/];
                }
            });
        }); });
        describe('with accessibility', function () {
            describe('with a ResultLink in the template', function () {
                beforeEach(function () {
                    setupQuerySuggestPreview({}, false);
                });
                it('sets the aria-label of previews to their title', function (done) { return __awaiter(_this, void 0, void 0, function () {
                    var previews;
                    return __generator(this, function (_a) {
                        switch (_a.label) {
                            case 0: return [4 /*yield*/, triggerPopulateSearchResultPreviewsAndPassTime()];
                            case 1:
                                previews = _a.sent();
                                previews.forEach(function (preview, i) { return expect(preview.element.getAttribute('aria-label')).toEqual(fakeResults.results[i].title); });
                                done();
                                return [2 /*return*/];
                        }
                    });
                }); });
                it('sets the role of the link to "link"', function (done) { return __awaiter(_this, void 0, void 0, function () {
                    var resultLinks;
                    return __generator(this, function (_a) {
                        switch (_a.label) {
                            case 0: return [4 /*yield*/, triggerPopulateSearchResultPreviewsAndPassTime()];
                            case 1:
                                resultLinks = (_a.sent()).map(function (preview) {
                                    return preview.element.querySelector(Core_1.Component.computeSelectorForType(ResultLink_1.ResultLink.ID));
                                });
                                resultLinks.forEach(function (resultLink) { return expect(resultLink.getAttribute('role')).toEqual('link'); });
                                done();
                                return [2 /*return*/];
                        }
                    });
                }); });
                it('has no "aria-level" on the link', function (done) { return __awaiter(_this, void 0, void 0, function () {
                    var resultLinks;
                    return __generator(this, function (_a) {
                        switch (_a.label) {
                            case 0: return [4 /*yield*/, triggerPopulateSearchResultPreviewsAndPassTime()];
                            case 1:
                                resultLinks = (_a.sent()).map(function (preview) {
                                    return preview.element.querySelector(Core_1.Component.computeSelectorForType(ResultLink_1.ResultLink.ID));
                                });
                                resultLinks.forEach(function (resultLink) { return expect(resultLink.getAttribute('aria-level')).toBeFalsy(); });
                                done();
                                return [2 /*return*/];
                        }
                    });
                }); });
            });
        });
        describe('expose options', function () {
            it('resultTemplate sets the template', function (done) { return __awaiter(_this, void 0, void 0, function () {
                var previews;
                return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0:
                            setupQuerySuggestPreview();
                            return [4 /*yield*/, triggerPopulateSearchResultPreviewsAndPassTime()];
                        case 1:
                            previews = _a.sent();
                            expect(previews[0].element.getElementsByClassName(templateClassName).length).toEqual(1);
                            done();
                            return [2 /*return*/];
                    }
                });
            }); });
            it('resultTemplate has a default template', function (done) { return __awaiter(_this, void 0, void 0, function () {
                var previews;
                return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0:
                            setupQuerySuggestPreview({}, false);
                            return [4 /*yield*/, triggerPopulateSearchResultPreviewsAndPassTime()];
                        case 1:
                            previews = _a.sent();
                            expect(previews[0].element.getElementsByClassName('coveo-default-result-preview').length).toEqual(1);
                            done();
                            return [2 /*return*/];
                    }
                });
            }); });
            it('numberOfPreviewResults set the number of results to query', function (done) { return __awaiter(_this, void 0, void 0, function () {
                var numberOfPreviewResults, lastSearchQuery;
                return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0:
                            numberOfPreviewResults = 5;
                            setupQuerySuggestPreview({ numberOfPreviewResults: numberOfPreviewResults });
                            return [4 /*yield*/, triggerPopulateSearchResultPreviewsAndPassTime()];
                        case 1:
                            _a.sent();
                            lastSearchQuery = test.cmp.queryController.getEndpoint().search.calls.mostRecent().args[0];
                            expect(lastSearchQuery.numberOfResults).toEqual(numberOfPreviewResults);
                            done();
                            return [2 /*return*/];
                    }
                });
            }); });
        });
        describe('When we hover', function () {
            it("and the query get executed, \n      it logs an analytics search event", function (done) { return __awaiter(_this, void 0, void 0, function () {
                return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0:
                            setupQuerySuggestPreview();
                            return [4 /*yield*/, triggerPopulateSearchResultPreviewsAndPassTime()];
                        case 1:
                            _a.sent();
                            expect(test.cmp.usageAnalytics.logSearchEvent).toHaveBeenCalledWith(AnalyticsActionListMeta_1.analyticsActionCauseList.showQuerySuggestPreview, jasmine.objectContaining(getMetadata(omniboxAnalytics)));
                            done();
                            return [2 /*return*/];
                    }
                });
            }); });
        });
        describe('Analytics', function () {
            function getAnalyticsMetadata(suggestion) {
                return jasmine.objectContaining({
                    suggestion: suggestion,
                    displayedRank: 0
                });
            }
            it('it log an analytics with the appropriate event', function (done) { return __awaiter(_this, void 0, void 0, function () {
                var suggestion, result;
                return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0:
                            suggestion = 'test';
                            setupQuerySuggestPreview();
                            return [4 /*yield*/, triggerPopulateSearchResultPreviewsAndPassTime(suggestion)];
                        case 1:
                            result = (_a.sent())[0];
                            result.onSelect();
                            expect(test.cmp.usageAnalytics.logCustomEvent).toHaveBeenCalledWith(AnalyticsActionListMeta_1.analyticsActionCauseList.clickQuerySuggestPreview, getAnalyticsMetadata(suggestion), result.element);
                            done();
                            return [2 /*return*/];
                    }
                });
            }); });
            it("it log an analytics with the appropriate event,\n      even if we hover on another suggestion before clicking", function (done) { return __awaiter(_this, void 0, void 0, function () {
                var suggestion, result;
                return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0:
                            suggestion = 'test';
                            setupQuerySuggestPreview();
                            return [4 /*yield*/, triggerPopulateSearchResultPreviewsAndPassTime(suggestion)];
                        case 1:
                            result = (_a.sent())[0];
                            return [4 /*yield*/, triggerPopulateSearchResultPreviewsAndPassTime("bad " + suggestion)];
                        case 2:
                            _a.sent();
                            result.onSelect();
                            expect(test.cmp.usageAnalytics.logCustomEvent).toHaveBeenCalledWith(AnalyticsActionListMeta_1.analyticsActionCauseList.clickQuerySuggestPreview, getAnalyticsMetadata(suggestion), result.element);
                            done();
                            return [2 /*return*/];
                    }
                });
            }); });
        });
    });
}
exports.QuerySuggestPreviewTest = QuerySuggestPreviewTest;
 
 
/***/ }),
/* 867 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __assign = (this && this.__assign) || Object.assign || function(t) {
    for (var s, i = 1, n = arguments.length; i < n; i++) {
        s = arguments[i];
        for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
            t[p] = s[p];
    }
    return t;
};
Object.defineProperty(exports, "__esModule", { value: true });
var CategoryFacet_1 = __webpack_require__(71);
var Mock = __webpack_require__(2);
var Dom_1 = __webpack_require__(0);
var MockEnvironment_1 = __webpack_require__(2);
var Simulate_1 = __webpack_require__(15);
var Fake_1 = __webpack_require__(11);
var Core_1 = __webpack_require__(9);
var CategoryFacetQueryController_1 = __webpack_require__(238);
var underscore_1 = __webpack_require__(1);
var AnalyticsActionListMeta_1 = __webpack_require__(7);
var ResultListUtils_1 = __webpack_require__(72);
function buildCategoryFacetResults(numberOfResults, numberOfRequestedValues, field) {
    if (numberOfResults === void 0) { numberOfResults = 11; }
    if (numberOfRequestedValues === void 0) { numberOfRequestedValues = 11; }
    Eif (field === void 0) { field = '@field'; }
    var fakeResults = Fake_1.FakeResults.createFakeResults();
    var queryBuilder = new Core_1.QueryBuilder();
    fakeResults.categoryFacets.push(Fake_1.FakeResults.createFakeCategoryFacetResult(field, [], 'value', numberOfResults));
    queryBuilder.categoryFacets.push({
        field: field,
        path: underscore_1.pluck(fakeResults.categoryFacets[0].parentValues, 'value'),
        maximumNumberOfValues: numberOfRequestedValues
    });
    return { results: fakeResults, query: queryBuilder.build() };
}
exports.buildCategoryFacetResults = buildCategoryFacetResults;
function CategoryFacetTest() {
    describe('CategoryFacet', function () {
        var test;
        var options;
        var simulateQueryData;
        beforeEach(function () {
            options = { field: '@field' };
            simulateQueryData = buildCategoryFacetResults();
            initializeComponent();
        });
        function initializeComponent() {
            var initializedOptions = new Mock.AdvancedComponentSetupOptions(null, options, function (env) { return env.withLiveQueryStateModel(); });
            test = Mock.advancedComponentSetup(CategoryFacet_1.CategoryFacet, initializedOptions);
            test.cmp.activePath = simulateQueryData.query.categoryFacets[0].path;
        }
        function allCategoriesButton() {
            return Dom_1.$$(test.cmp.element).find('.coveo-category-facet-all-categories');
        }
        function simulateNoResults() {
            var emptyCategoryFacetResults = Fake_1.FakeResults.createFakeCategoryFacetResult('@field', [], undefined, 0);
            simulateQueryData.results = __assign({}, simulateQueryData.results, { categoryFacets: [emptyCategoryFacetResults] });
            Simulate_1.Simulate.query(test.env, simulateQueryData);
        }
        it('when calling getVisibleParentValues returns all the visible parent values', function () {
            Simulate_1.Simulate.query(test.env, simulateQueryData);
            var visibleParentValues = underscore_1.pluck(test.cmp.getVisibleParentValues(), 'value');
            for (var i = 0; i < test.cmp.activePath.length; i++) {
                expect(visibleParentValues[i]).toEqual("parent" + i);
            }
        });
        it('when calling getVisibleParentValues when there are no parents returns empty array', function () {
            simulateQueryData.results.categoryFacets[0].parentValues = [];
            simulateQueryData.query.categoryFacets[0].path = [];
            test.cmp.activePath = [];
            var visibleParentValues = test.cmp.getVisibleParentValues();
            expect(visibleParentValues).toEqual([]);
        });
        it('when calling getAvailableValues returns children of the last parent', function () {
            Simulate_1.Simulate.query(test.env, simulateQueryData);
            var values = underscore_1.pluck(test.cmp.getAvailableValues(), 'value');
            for (var i = 0; i < simulateQueryData.results.categoryFacets[0].values.length - 1; i++) {
                expect(values[i]).toEqual("value" + i);
            }
        });
        it('when calling deselectCurrentValue it strips the last element of the path', function () {
            test.cmp.activePath = ['value1', 'value2'];
            test.cmp.deselectCurrentValue();
            expect(test.cmp.activePath).toEqual(['value1']);
        });
        it('when calling deselectCurrentValue and the path is empty the path remains empty', function () {
            test.cmp.activePath = [];
            test.cmp.deselectCurrentValue();
            expect(test.cmp.activePath).toEqual([]);
        });
        it('when calling selectValue with a non-existent value throws an error', function () {
            Simulate_1.Simulate.query(test.env, simulateQueryData);
            expect(function () { return test.cmp.selectValue('inexistentvalue'); }).toThrowError();
        });
        it('when calling selectValue appends the given value to the path', function () {
            var currentPath = test.cmp.activePath;
            Simulate_1.Simulate.query(test.env, simulateQueryData);
            test.cmp.selectValue('value9');
            expect(test.cmp.activePath).toEqual(currentPath.concat(['value9']));
        });
        it('calling hide adds the coveo hidden class', function () {
            test.cmp.hide();
            expect(Dom_1.$$(test.cmp.element).hasClass('coveo-hidden')).toBeTruthy();
        });
        it('calling show removes the coveo hidden class', function () {
            Dom_1.$$(test.cmp.element).addClass('coveo-hidden');
            test.cmp.show();
            expect(Dom_1.$$(test.cmp.element).hasClass('coveo-hidden')).toBe(false);
        });
        it('calling "scrollToTop" should call "scrollToTop" on the ResultListUtils', function () {
            spyOn(ResultListUtils_1.ResultListUtils, 'scrollToTop');
            test.cmp.scrollToTop();
            expect(ResultListUtils_1.ResultListUtils.scrollToTop).toHaveBeenCalledWith(test.cmp.root);
        });
        describe('when there is no results', function () {
            it('hides the component', function () {
                simulateNoResults();
                expect(test.cmp.isCurrentlyDisplayed()).toBe(false);
            });
            it("does not call the query state model (doing so would prevent going back in history using the back button)", function () {
                spyOn(test.cmp.queryStateModel, 'set');
                simulateNoResults();
                expect(test.cmp.queryStateModel.set).not.toHaveBeenCalled();
            });
        });
        it('when a base path is configured, when simulating a query with no results, it hides the component', function () {
            options.basePath = ['hello'];
            initializeComponent();
            simulateNoResults();
            expect(test.cmp.isCurrentlyDisplayed()).toBe(false);
        });
        it('should correctly evaluate isCurrentlyDisplayed() when facet is visible', function () {
            expect(test.cmp.isCurrentlyDisplayed()).toBe(true);
        });
        it('should correctly evaluate isCurrentlyDisplayed() when facet is not visible', function () {
            test.cmp.hide();
            expect(test.cmp.isCurrentlyDisplayed()).toBe(false);
        });
        describe('when categoryFacet is not implemented on the endpoint', function () {
            beforeEach(function () {
                var categoryFacetResults = Fake_1.FakeResults.createFakeCategoryFacetResult('@field', []);
                var fakeResults = Fake_1.FakeResults.createFakeResults();
                simulateQueryData = __assign({}, simulateQueryData, { results: __assign({}, fakeResults, { categoryFacets: [__assign({}, categoryFacetResults, { notImplemented: true })] }) });
            });
            it('disables the component', function () {
                Simulate_1.Simulate.query(test.env, simulateQueryData);
                expect(test.cmp.disabled).toBe(true);
            });
        });
        describe('calling changeActivePath', function () {
            var newPath;
            beforeEach(function () {
                newPath = ['new', 'path'];
                spyOn(test.cmp.queryStateModel, 'set').and.callThrough();
                test.cmp.changeActivePath(newPath);
            });
            it('sets the new path', function () {
                expect(test.cmp.activePath).toEqual(['new', 'path']);
            });
            it('does not trigger a new query', function () {
                expect(test.cmp.queryController.executeQuery).not.toHaveBeenCalled();
            });
            it('sets the path in the query state', function () {
                expect(test.cmp.queryStateModel.set).toHaveBeenCalledWith(test.cmp.queryStateAttribute, newPath);
            });
            it('shows a wait animation', function () {
                test.cmp.executeQuery();
                var waitIcon = Dom_1.$$(test.cmp.element).find('.' + CategoryFacet_1.CategoryFacet.WAIT_ELEMENT_CLASS);
                expect(waitIcon.style.visibility).toEqual('visible');
            });
        });
        it('calling reload calls changeActivePath', function () {
            spyOn(test.cmp, 'changeActivePath');
            test.cmp.reload();
            expect(test.cmp.changeActivePath).toHaveBeenCalledWith(test.cmp.activePath);
        });
        describe('when moreLess is enabled', function () {
            beforeEach(function () {
                test = Mock.optionsComponentSetup(CategoryFacet_1.CategoryFacet, {
                    field: '@field',
                    enableMoreLess: true,
                    numberOfValues: 10
                });
            });
            it('more arrow is appended when there are more results to fetch', function () {
                Simulate_1.Simulate.query(test.env, simulateQueryData);
                var moreArrow = Dom_1.$$(test.cmp.element).find('.coveo-category-facet-more');
                expect(moreArrow).not.toBeNull();
            });
            it('less arrow is appended when there are more results than the numberOfValues option', function () {
                var numberOfValues = test.cmp.options.numberOfValues + 2; // +1 for the fetchMoreValues and +1 to trigger the less values
                Simulate_1.Simulate.query(test.env, buildCategoryFacetResults(numberOfValues, numberOfValues));
                var downArrow = Dom_1.$$(test.cmp.element).find('.coveo-category-facet-less');
                expect(downArrow).not.toBeNull();
            });
            it('should not render the downward arrow when there are less values than the numberOfValues option', function () {
                test.cmp.changeActivePath(['path']);
                Simulate_1.Simulate.query(test.env, buildCategoryFacetResults(3));
                var downArrow = Dom_1.$$(test.cmp.element).find('.coveo-category-facet-less');
                expect(downArrow).toBeNull();
            });
            it('showMore should increment the number of values requested according the the pageSize', function () {
                var initialNumberOfValues = test.cmp.options.numberOfValues;
                var pageSize = test.cmp.options.pageSize;
                Simulate_1.Simulate.query(test.env, simulateQueryData);
                test.cmp.showMore();
                var queryBuilder = Simulate_1.Simulate.query(test.env, simulateQueryData).queryBuilder;
                expect(queryBuilder.categoryFacets[0].maximumNumberOfValues).toBe(initialNumberOfValues + pageSize + 1);
            });
            it('showLess should decrement the number of values requested according to the pageSize', function () {
                var pageSize = test.cmp.options.pageSize;
                var initialNumberOfValues = 20;
                test.cmp.showMore();
                simulateQueryData = buildCategoryFacetResults(21, 21);
                Simulate_1.Simulate.query(test.env, simulateQueryData);
                test.cmp.showLess();
                var queryBuilder = Simulate_1.Simulate.query(test.env, simulateQueryData).queryBuilder;
                expect(queryBuilder.categoryFacets[0].maximumNumberOfValues).toBe(initialNumberOfValues - pageSize + 1);
            });
            it('showLess should not request less values than the numberOfValues option', function () {
                var initialNumberOfValues = test.cmp.options.numberOfValues;
                simulateQueryData = buildCategoryFacetResults(13, 13);
                Simulate_1.Simulate.query(test.env, simulateQueryData);
                test.cmp.showLess();
                var queryBuilder = Simulate_1.Simulate.query(test.env, simulateQueryData).queryBuilder;
                expect(queryBuilder.categoryFacets[0].maximumNumberOfValues).toBe(initialNumberOfValues + 1);
            });
            it('showMore should log an analytics event when showing more results', function () {
                var expectedMetadata = jasmine.objectContaining({
                    facetId: test.cmp.options.id,
                    facetField: test.cmp.options.field.toString(),
                    facetTitle: test.cmp.options.title
                });
                test.cmp.showMore();
                expect(test.env.usageAnalytics.logCustomEvent).toHaveBeenCalledWith(AnalyticsActionListMeta_1.analyticsActionCauseList.facetShowMore, expectedMetadata, test.cmp.element);
            });
            it('showLess should log an analytics event when showing less results', function () {
                var expectedMetadata = jasmine.objectContaining({
                    facetId: test.cmp.options.id,
                    facetField: test.cmp.options.field.toString(),
                    facetTitle: test.cmp.options.title
                });
                test.cmp.showMore();
                test.cmp.showLess();
                expect(test.env.usageAnalytics.logCustomEvent).toHaveBeenCalledWith(AnalyticsActionListMeta_1.analyticsActionCauseList.facetShowLess, expectedMetadata, test.cmp.element);
            });
        });
        it('adds a facet search functionality by default', function () {
            Simulate_1.Simulate.query(test.env, simulateQueryData);
            expect(test.cmp.categoryFacetSearch).toBeDefined();
            expect(Dom_1.$$(test.cmp.element).find('.coveo-category-facet-search-container')).toBeDefined();
        });
        it('render properly when the facet search functionality is disabled', function () {
            test = Mock.optionsComponentSetup(CategoryFacet_1.CategoryFacet, {
                enableFacetSearch: false,
                field: '@someField'
            });
            Simulate_1.Simulate.query(test.env, simulateQueryData);
            expect(test.cmp.categoryFacetSearch).toBeUndefined();
            expect(Dom_1.$$(test.cmp.element).find('.coveo-category-facet-search-container')).toBeNull();
        });
        it('calls putCategoryFacetInQueryBuilder when building the query', function () {
            var queryBuilder = MockEnvironment_1.mock(Core_1.QueryBuilder);
            var buildingQueryArgs = { queryBuilder: queryBuilder };
            test.cmp.categoryFacetQueryController = MockEnvironment_1.mock(CategoryFacetQueryController_1.CategoryFacetQueryController);
            var path = (test.cmp.activePath = ['some', 'path']);
            test.cmp.handleBuildingQuery(buildingQueryArgs);
            expect(test.cmp.categoryFacetQueryController.putCategoryFacetInQueryBuilder).toHaveBeenCalledWith(queryBuilder, path, test.cmp.options.numberOfValues + 1);
        });
        it("when the #valueCaption option is an empty object,\n    it displays the facet search box", function () {
            test = Mock.optionsComponentSetup(CategoryFacet_1.CategoryFacet, {
                field: '@field',
                valueCaption: {}
            });
            expect(test.cmp.categoryFacetSearch).toBeTruthy();
        });
        describe("when the #valueCaption option is defined", function () {
            beforeEach(function () {
                test = Mock.optionsComponentSetup(CategoryFacet_1.CategoryFacet, {
                    field: '@field',
                    valueCaption: { value: 'caption' }
                });
            });
            it("does not render the facet search box", function () {
                expect(test.cmp.categoryFacetSearch).toBe(undefined);
            });
        });
        describe('renders', function () {
            function removeAllCategoriesButton() {
                allCategoriesButton() && Dom_1.$$(allCategoriesButton()).detach();
            }
            function verifyParents(numberOfParents) {
                removeAllCategoriesButton();
                var parentCategoryValues = Dom_1.$$(test.cmp.element).findAll('.coveo-category-facet-parent-value');
                var expectedValues = ['0', '251', '502', '753', '1,004', '1,255', '1,506', '1,757', '2,008', '2,259'];
                for (var _i = 0, _a = underscore_1.range(numberOfParents); _i < _a.length; _i++) {
                    var i = _a[_i];
                    var valueCaption = Dom_1.$$(parentCategoryValues[i]).find('.coveo-category-facet-value-caption');
                    var valueCount = Dom_1.$$(parentCategoryValues[i]).find('.coveo-category-facet-value-count');
                    expect(Dom_1.$$(valueCaption).text()).toEqual("parent" + i);
                    expect(Dom_1.$$(valueCount).text()).toEqual(expectedValues[i]);
                }
            }
            function verifyChildren(numberOfValues) {
                removeAllCategoriesButton();
                var categoryValues = Dom_1.$$(test.cmp.element).findAll('.coveo-category-facet-child-value');
                for (var _i = 0, _a = underscore_1.range(0, numberOfValues); _i < _a.length; _i++) {
                    var i = _a[_i];
                    var valueCaption = Dom_1.$$(categoryValues[i]).find('.coveo-category-facet-value-caption');
                    var valueCount = Dom_1.$$(categoryValues[i]).find('.coveo-category-facet-value-count');
                    expect(Dom_1.$$(valueCaption).text()).toEqual("value" + i);
                    expect(Dom_1.$$(valueCount).text()).toEqual('5');
                }
            }
            function splitSelectableParents() {
                var parentValuesLabel = Dom_1.$$(test.cmp.element).findAll('.coveo-category-facet-parent-value label');
                return underscore_1.partition(parentValuesLabel, function (parentLabel) { return Dom_1.$$(parentLabel).hasClass('coveo-selectable'); });
            }
            beforeEach(function () {
                Object.defineProperty(test.cmp, 'activePath', {
                    get: function () { return simulateQueryData.query.categoryFacets[0].path; }
                });
            });
            it('when there are only children', function () {
                var numberOfValues = simulateQueryData.results.categoryFacets[0].values.length - 1; //-1 because we always request one more result
                simulateQueryData.query.categoryFacets[0].path = [];
                simulateQueryData.results.categoryFacets[0].parentValues = [];
                Simulate_1.Simulate.query(test.env, simulateQueryData);
                verifyChildren(numberOfValues);
            });
            it('when there are only parents', function () {
                var numberOfParents = simulateQueryData.results.categoryFacets[0].parentValues.length - 1;
                simulateQueryData.results.categoryFacets[0].values = [];
                Simulate_1.Simulate.query(test.env, simulateQueryData);
                verifyParents(numberOfParents);
            });
            it('when there are children and parents', function () {
                var numberOfValues = simulateQueryData.results.categoryFacets[0].values.length - 1;
                Simulate_1.Simulate.query(test.env, simulateQueryData);
                verifyChildren(numberOfValues);
            });
            it('correctly sorts parents', function () {
                var numberOfParents = simulateQueryData.results.categoryFacets[0].parentValues.length - 1;
                simulateQueryData.results.categoryFacets[0].values = [];
                simulateQueryData.results.categoryFacets[0].parentValues = underscore_1.shuffle(simulateQueryData.results.categoryFacets[0].parentValues);
                Simulate_1.Simulate.query(test.env, simulateQueryData);
                verifyParents(numberOfParents);
            });
            it('correct number of children when there are less results than what has been queried for', function () {
                // We usually render one less result than what we queried for, because the extra result queried is just a check.
                // This makes sure we don't do it when there are less results than we queries for.
                var numberOfRequestedValues = test.cmp.options.numberOfValues - 1;
                var numberOfReturnedValues = numberOfRequestedValues - 1;
                simulateQueryData = buildCategoryFacetResults(numberOfReturnedValues, numberOfRequestedValues);
                simulateQueryData.results.categoryFacets[0].parentValues = [];
                Simulate_1.Simulate.query(test.env, simulateQueryData);
                removeAllCategoriesButton();
                expect(Dom_1.$$(test.cmp.element).findAll('.coveo-category-facet-value').length).toEqual(numberOfReturnedValues);
            });
            it('appends an all categories button when there are parents', function () {
                Simulate_1.Simulate.query(test.env, simulateQueryData);
                expect(allCategoriesButton()).not.toBeNull();
            });
            it('gives the all categories button a tabindex', function () {
                Simulate_1.Simulate.query(test.env, simulateQueryData);
                expect(allCategoriesButton().getAttribute('tabindex')).toEqual('0');
            });
            it('gives the all categories button a role', function () {
                Simulate_1.Simulate.query(test.env, simulateQueryData);
                expect(allCategoriesButton().getAttribute('role')).toEqual('button');
            });
            it('does not append an all categories button when there are no parents', function () {
                simulateQueryData.query.categoryFacets[0].path = [];
                Simulate_1.Simulate.query(test.env, simulateQueryData);
                expect(allCategoriesButton()).toBeNull();
            });
            it('all categories button should call "scrollToTop" and "reset" when clicked', function () {
                Simulate_1.Simulate.query(test.env, simulateQueryData);
                spyOn(test.cmp, 'scrollToTop');
                spyOn(test.cmp, 'reset');
                Dom_1.$$(allCategoriesButton()).trigger('click');
                expect(test.cmp.reset).toHaveBeenCalled();
                expect(test.cmp.scrollToTop).toHaveBeenCalled();
            });
            it('should make child values label selectable', function () {
                Simulate_1.Simulate.query(test.env, simulateQueryData);
                var childValuesLabel = Dom_1.$$(test.cmp.element).findAll('.coveo-category-facet-child-value label');
                childValuesLabel.forEach(function (childValue) { return expect(Dom_1.$$(childValue).hasClass('coveo-selectable')).toBe(true); });
            });
            it('should make parent values label selectable except the current active filter', function () {
                Simulate_1.Simulate.query(test.env, simulateQueryData);
                var _a = splitSelectableParents(), selectables = _a[0], notSelectable = _a[1];
                expect(notSelectable.length).toBe(1);
                var currentActiveFilterLabel = notSelectable[0];
                expect(Dom_1.$$(currentActiveFilterLabel).text()).toContain(test.cmp.activeCategoryValue.categoryValueDescriptor.value);
                expect(selectables.length).toBeGreaterThan(1);
            });
            it('should add a collapsible arrow to all parent values except the current active filter', function () {
                Simulate_1.Simulate.query(test.env, simulateQueryData);
                var _a = splitSelectableParents(), selectables = _a[0], notSelectable = _a[1];
                expect(Dom_1.$$(notSelectable[0]).find('.coveo-category-facet-collapse-children')).toBeNull();
                selectables.forEach(function (selectable) { return expect(Dom_1.$$(selectable).find('.coveo-category-facet-collapse-children')).toBeDefined(); });
            });
        });
        it('when default path is specified, sends the correct path in the query', function () {
            test = Mock.optionsComponentSetup(CategoryFacet_1.CategoryFacet, {
                field: '@field',
                basePath: ['base', 'path']
            });
            var queryBuilder = Simulate_1.Simulate.query(test.env, simulateQueryData).queryBuilder;
            expect(underscore_1.first(queryBuilder.categoryFacets[0].path, 2)).toEqual(['base', 'path']);
        });
        it('when default path is specified, exclude those values from the rendered values', function () {
            test = Mock.optionsComponentSetup(CategoryFacet_1.CategoryFacet, {
                field: '@field',
                basePath: ['parent0', 'parent1']
            });
            Simulate_1.Simulate.query(test.env, simulateQueryData);
            var values = Dom_1.$$(test.cmp.element)
                .findAll('.coveo-category-facet-value-caption')
                .map(function (el) { return Dom_1.$$(el).text(); });
            expect(values).not.toContain('parent0');
            expect(values).not.toContain('parent1');
        });
        describe('when populating the breadcrumb', function () {
            var populateBreadcrumb = function () {
                Simulate_1.Simulate.query(test.env, simulateQueryData);
                test.cmp.selectValue('value0');
                return Simulate_1.Simulate.breadcrumb(test.env);
            };
            var getClearElement = function () {
                return Dom_1.$$(populateBreadcrumb()[0].element).find('.coveo-facet-breadcrumb-clear');
            };
            it('should populate the correct title', function () {
                test.cmp.options.title = 'My Category Facet';
                expect(populateBreadcrumb()[0].element.textContent).toContain('My Category Facet');
            });
            it('should populate the correct breadcrumb value', function () {
                expect(populateBreadcrumb()[0].element.textContent).toContain('parent0/parent1/parent2');
                expect(populateBreadcrumb()[0].element.textContent).toContain('/value0');
            });
            it('should populate the correct breadcrumb value if the facet is configured with a base path that points to the last parent', function () {
                var completeBasePathUntilLastParent = underscore_1.chain(underscore_1.range(0, 10)).map(function (val) { return "parent" + val; });
                test = Mock.advancedComponentSetup(CategoryFacet_1.CategoryFacet, new Mock.AdvancedComponentSetupOptions(undefined, {
                    field: '@field',
                    basePath: completeBasePathUntilLastParent
                }, function (env) { return env.withLiveQueryStateModel(); }));
                var breadcrumbBuilt = populateBreadcrumb()[0];
                expect(breadcrumbBuilt.element.textContent).toContain('value0');
                // Also do a check on a leading /, to ensure the test is building the "right" full path hierarchy
                // If the base path is not "full", there would otherwise be a leading /
                expect(breadcrumbBuilt.element.textContent).not.toContain('/value0');
            });
            it('should clear the facet when the clear button is clicked', function () {
                Dom_1.$$(getClearElement()).trigger('click');
                expect(test.cmp.activePath).toEqual([]);
            });
            it('should log an analytics event when the clear button is clicked', function () {
                Dom_1.$$(getClearElement()).trigger('click');
                expect(test.env.usageAnalytics.logSearchEvent).toHaveBeenCalledWith(AnalyticsActionListMeta_1.analyticsActionCauseList.breadcrumbFacet, jasmine.objectContaining({
                    categoryFacetId: test.cmp.options.id,
                    categoryFacetField: test.cmp.options.field,
                    categoryFacetPath: jasmine.arrayContaining(['value0']),
                    categoryFacetTitle: test.cmp.options.title
                }));
            });
            it('should clear the facet when the clearBreadcrumb event is triggered', function () {
                populateBreadcrumb();
                expect(test.cmp.activePath).not.toEqual([]);
                Simulate_1.Simulate.clearBreadcrumb(test.env);
                expect(test.cmp.activePath).toEqual([]);
            });
            it('should not trigger a query when clearBreadcrumb event is triggered', function () {
                populateBreadcrumb();
                // Reset since it's called once inside "populateBreadcrumb()"
                test.env.queryController.executeQuery.calls.reset();
                Simulate_1.Simulate.clearBreadcrumb(test.env);
                expect(test.env.queryController.executeQuery).not.toHaveBeenCalled();
            });
        });
        describe("when there's many parent values to display", function () {
            beforeEach(function () {
                simulateQueryData = buildCategoryFacetResults(30, 30);
                Simulate_1.Simulate.query(test.env, simulateQueryData);
            });
            it('should only return the non-ellipsed values as visible', function () {
                var visibles = test.cmp.getVisibleParentValues();
                // NUMBER_OF_VALUES_TO_KEEP_AFTER_TRUNCATING parents + 1 child value
                expect(visibles.length).toBe(CategoryFacet_1.CategoryFacet.NUMBER_OF_VALUES_TO_KEEP_AFTER_TRUNCATING + 1);
            });
            it('should properly build the ellipse boundaries', function () {
                var visibles = test.cmp.getVisibleParentValues();
                var indexBeforeEllipse = CategoryFacet_1.CategoryFacet.NUMBER_OF_VALUES_TO_KEEP_AFTER_TRUNCATING / 2 - 1;
                var firstValue = visibles[0].value;
                var beforeEllipse = visibles[indexBeforeEllipse].value;
                var afterEllipse = visibles[indexBeforeEllipse + 1].value;
                var lastParent = visibles[visibles.length - 2].value;
                var lastChild = visibles[visibles.length - 1].value;
                expect(firstValue).toContain('parent0');
                expect(beforeEllipse).toContain('parent4');
                expect(afterEllipse).toContain('parent25');
                expect(lastParent).toBe('parent29');
                expect(lastChild).toBe('value0');
            });
            it('should properly render an ellipse section', function () {
                var ellipsis = Dom_1.$$(test.cmp.element).find('.coveo-category-facet-ellipsis');
                expect(ellipsis).toBeDefined();
                expect(ellipsis.previousSibling.textContent).toContain('parent4');
                expect(ellipsis.nextSibling.textContent).toContain('parent25');
            });
        });
        describe('testing the DependsOnManager', function () {
            var dependentFacet;
            beforeEach(function () {
                dependentFacet = Mock.advancedComponentSetup(CategoryFacet_1.CategoryFacet, new Mock.AdvancedComponentSetupOptions(undefined, {
                    field: '@anotherField',
                    dependsOn: test.cmp.options.id
                }, function (builder) {
                    builder.withQueryStateModel(test.env.queryStateModel);
                    builder.withRoot(test.env.root);
                    builder.withSearchInterface(test.env.searchInterface);
                    return builder;
                })).cmp;
                Dom_1.$$(dependentFacet.root).trigger(Core_1.InitializationEvents.afterComponentsInitialization);
                spyOn(dependentFacet, 'changeActivePath');
            });
            it('should initialize the dependsOnManager', function () {
                expect(test.cmp.dependsOnManager).toBeTruthy();
            });
            it("when query state changes so that parent has selected values (default condition fulfilled)\n      should not call \"changeActivePath\" on the dependent facet", function () {
                Simulate_1.Simulate.query(test.env, simulateQueryData);
                test.cmp.selectValue('value1');
                expect(dependentFacet.changeActivePath).not.toHaveBeenCalled();
            });
            it("when query state changes so that parent has no selected values (default condition not fulfilled)\n      should call \"changeActivePath\" on the dependent facet", function () {
                Simulate_1.Simulate.query(test.env, simulateQueryData);
                test.cmp.selectValue('value1');
                test.cmp.reset();
                expect(dependentFacet.changeActivePath).toHaveBeenCalledTimes(1);
            });
        });
        it("when the displaySearchOnTop option is false\n    should display the search after the result", function () {
            options.enableFacetSearch = true;
            options.displaySearchOnTop = false;
            initializeComponent();
            Simulate_1.Simulate.query(test.env, simulateQueryData);
            expect(Dom_1.$$(test.cmp.element.children[2]).hasClass('coveo-category-facet-search-container')).toBe(true);
        });
        it("when the displaySearchOnTop option is true\n    should display the search before the result", function () {
            options.enableFacetSearch = true;
            options.displaySearchOnTop = true;
            initializeComponent();
            Simulate_1.Simulate.query(test.env, simulateQueryData);
            expect(Dom_1.$$(test.cmp.element.children[1]).hasClass('coveo-category-facet-search-container')).toBe(true);
        });
    });
}
exports.CategoryFacetTest = CategoryFacetTest;
 
 
/***/ }),
/* 868 */
/***/ (function(module, exports, __webpack_require__) {
 
module.exports = __webpack_require__(40);
 
 
/***/ }),
/* 869 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
function __export(m) {
    for (var p in m) Eif (!exports.hasOwnProperty(p)) exports[p] = m[p];
}
Object.defineProperty(exports, "__esModule", { value: true });
__export(__webpack_require__(9));
var CoreHelpers_1 = __webpack_require__(651);
exports.CoreHelpers = CoreHelpers_1.CoreHelpers;
var SearchInterface_1 = __webpack_require__(25);
exports.SearchInterface = SearchInterface_1.SearchInterface;
exports.StandaloneSearchInterface = SearchInterface_1.StandaloneSearchInterface;
var CoveoJQuery_1 = __webpack_require__(650);
exports.$ = CoveoJQuery_1.jQueryInstance;
var CoveoUnderscore_1 = __webpack_require__(415);
exports._ = CoveoUnderscore_1.underscoreInstance;
var AnalyticsUtils_1 = __webpack_require__(321);
exports.AnalyticsUtils = AnalyticsUtils_1.AnalyticsUtils;
var HashUtils_1 = __webpack_require__(88);
exports.HashUtils = HashUtils_1.HashUtils;
var DeviceUtils_1 = __webpack_require__(42);
exports.DeviceUtils = DeviceUtils_1.DeviceUtils;
var ColorUtils_1 = __webpack_require__(226);
exports.ColorUtils = ColorUtils_1.ColorUtils;
var CookieUtils_1 = __webpack_require__(168);
exports.Cookie = CookieUtils_1.Cookie;
var CurrencyUtils_1 = __webpack_require__(316);
exports.CurrencyUtils = CurrencyUtils_1.CurrencyUtils;
var DateUtils_1 = __webpack_require__(43);
exports.DateUtils = DateUtils_1.DateUtils;
var AnalyticsActionListMeta_1 = __webpack_require__(7);
exports.analyticsActionCauseList = AnalyticsActionListMeta_1.analyticsActionCauseList;
var Initialization_1 = __webpack_require__(8);
Initialization_1.Initialization.componentsFactory = Initialization_1.EagerInitialization.componentsFactory;
var AdvancedSearch_1 = __webpack_require__(652);
exports.AdvancedSearch = AdvancedSearch_1.AdvancedSearch;
AdvancedSearch_1.AdvancedSearch.doExport();
var Aggregate_1 = __webpack_require__(662);
exports.Aggregate = Aggregate_1.Aggregate;
Aggregate_1.Aggregate.doExport();
var Analytics_1 = __webpack_require__(178);
Analytics_1.Analytics.doExport();
var AnalyticsSuggestions_1 = __webpack_require__(663);
exports.AnalyticsSuggestions = AnalyticsSuggestions_1.AnalyticsSuggestions;
AnalyticsSuggestions_1.AnalyticsSuggestions.doExport();
var Component_1 = __webpack_require__(6);
exports.ComponentEvents = Component_1.ComponentEvents;
Component_1.ComponentEvents.doExport();
var AuthenticationProvider_1 = __webpack_require__(665);
exports.AuthenticationProvider = AuthenticationProvider_1.AuthenticationProvider;
AuthenticationProvider_1.AuthenticationProvider.doExport();
var Backdrop_1 = __webpack_require__(666);
exports.Backdrop = Backdrop_1.Backdrop;
Backdrop_1.Backdrop.doExport();
var Badge_1 = __webpack_require__(667);
exports.Badge = Badge_1.Badge;
Badge_1.Badge.doExport();
var Breadcrumb_1 = __webpack_require__(668);
exports.Breadcrumb = Breadcrumb_1.Breadcrumb;
Breadcrumb_1.Breadcrumb.doExport();
var CardActionBar_1 = __webpack_require__(669);
exports.CardActionBar = CardActionBar_1.CardActionBar;
CardActionBar_1.CardActionBar.doExport();
var CardOverlay_1 = __webpack_require__(670);
exports.CardOverlay = CardOverlay_1.CardOverlay;
CardOverlay_1.CardOverlay.doExport();
var ChatterLikedBy_1 = __webpack_require__(672);
exports.ChatterLikedBy = ChatterLikedBy_1.ChatterLikedBy;
ChatterLikedBy_1.ChatterLikedBy.doExport();
var ChatterLikedByFields_1 = __webpack_require__(1093);
ChatterLikedByFields_1.registerFields();
var ChatterPostAttachment_1 = __webpack_require__(673);
exports.ChatterPostAttachment = ChatterPostAttachment_1.ChatterPostAttachment;
ChatterPostAttachment_1.ChatterPostAttachment.doExport();
var ChatterPostAttachmentFields_1 = __webpack_require__(1094);
ChatterPostAttachmentFields_1.registerFields();
var ChatterPostedBy_1 = __webpack_require__(674);
exports.ChatterPostedBy = ChatterPostedBy_1.ChatterPostedBy;
ChatterPostedBy_1.ChatterPostedBy.doExport();
var ChatterPostedByFields_1 = __webpack_require__(1095);
ChatterPostedByFields_1.registerFields();
var ChatterTopic_1 = __webpack_require__(1096);
exports.ChatterTopic = ChatterTopic_1.ChatterTopic;
ChatterTopic_1.ChatterTopic.doExport();
var ChatterTopicFields_1 = __webpack_require__(1097);
ChatterTopicFields_1.registerFields();
var DidYouMean_1 = __webpack_require__(675);
exports.DidYouMean = DidYouMean_1.DidYouMean;
DidYouMean_1.DidYouMean.doExport();
var DistanceResources_1 = __webpack_require__(676);
exports.DistanceResources = DistanceResources_1.DistanceResources;
DistanceResources_1.DistanceResources.doExport();
var ErrorReport_1 = __webpack_require__(677);
exports.ErrorReport = ErrorReport_1.ErrorReport;
ErrorReport_1.ErrorReport.doExport();
var Excerpt_1 = __webpack_require__(678);
exports.Excerpt = Excerpt_1.Excerpt;
Excerpt_1.Excerpt.doExport();
var ExportToExcel_1 = __webpack_require__(679);
exports.ExportToExcel = ExportToExcel_1.ExportToExcel;
ExportToExcel_1.ExportToExcel.doExport();
var Facet_1 = __webpack_require__(32);
exports.Facet = Facet_1.Facet;
Facet_1.Facet.doExport();
var FacetRange_1 = __webpack_require__(242);
exports.FacetRange = FacetRange_1.FacetRange;
FacetRange_1.FacetRange.doExport();
var FacetSlider_1 = __webpack_require__(243);
exports.FacetSlider = FacetSlider_1.FacetSlider;
FacetSlider_1.FacetSlider.doExport();
var FieldSuggestions_1 = __webpack_require__(786);
exports.FieldSuggestions = FieldSuggestions_1.FieldSuggestions;
FieldSuggestions_1.FieldSuggestions.doExport();
var FacetValueSuggestions_1 = __webpack_require__(788);
exports.FacetValueSuggestions = FacetValueSuggestions_1.FacetValueSuggestions;
FacetValueSuggestions_1.FacetValueSuggestions.doExport();
var FieldTable_1 = __webpack_require__(376);
exports.FieldTable = FieldTable_1.FieldTable;
FieldTable_1.FieldTable.doExport();
var FieldValue_1 = __webpack_require__(183);
exports.FieldValue = FieldValue_1.FieldValue;
FieldValue_1.FieldValue.doExport();
var Folding_1 = __webpack_require__(377);
exports.Folding = Folding_1.Folding;
Folding_1.Folding.doExport();
var FoldingForThread_1 = __webpack_require__(1468);
exports.FoldingForThread = FoldingForThread_1.FoldingForThread;
FoldingForThread_1.FoldingForThread.doExport();
var FollowItem_1 = __webpack_require__(790);
exports.FollowItem = FollowItem_1.FollowItem;
FollowItem_1.FollowItem.doExport();
var FollowItemFields_1 = __webpack_require__(1469);
FollowItemFields_1.registerFields();
var HiddenQuery_1 = __webpack_require__(791);
exports.HiddenQuery = HiddenQuery_1.HiddenQuery;
HiddenQuery_1.HiddenQuery.doExport();
var HierarchicalFacet_1 = __webpack_require__(792);
exports.HierarchicalFacet = HierarchicalFacet_1.HierarchicalFacet;
HierarchicalFacet_1.HierarchicalFacet.doExport();
var Icon_1 = __webpack_require__(262);
exports.Icon = Icon_1.Icon;
Icon_1.Icon.doExport();
var IconFields_1 = __webpack_require__(1482);
IconFields_1.registerFields();
var Logo_1 = __webpack_require__(793);
exports.Logo = Logo_1.Logo;
Logo_1.Logo.doExport();
var Matrix_1 = __webpack_require__(794);
exports.Matrix = Matrix_1.Matrix;
Matrix_1.Matrix.doExport();
var Omnibox_1 = __webpack_require__(196);
exports.Omnibox = Omnibox_1.Omnibox;
Omnibox_1.Omnibox.doExport();
var OmniboxResultList_1 = __webpack_require__(808);
exports.OmniboxResultList = OmniboxResultList_1.OmniboxResultList;
OmniboxResultList_1.OmniboxResultList.doExport();
var Pager_1 = __webpack_require__(388);
exports.Pager = Pager_1.Pager;
Pager_1.Pager.doExport();
var PipelineContext_1 = __webpack_require__(389);
exports.PipelineContext = PipelineContext_1.PipelineContext;
PipelineContext_1.PipelineContext.doExport();
var PreferencesPanel_1 = __webpack_require__(266);
exports.PreferencesPanel = PreferencesPanel_1.PreferencesPanel;
PreferencesPanel_1.PreferencesPanel.doExport();
var PrintableUri_1 = __webpack_require__(809);
exports.PrintableUri = PrintableUri_1.PrintableUri;
PrintableUri_1.PrintableUri.doExport();
var PrintableUriFields_1 = __webpack_require__(1496);
PrintableUriFields_1.registerFields();
var Querybox_1 = __webpack_require__(125);
exports.Querybox = Querybox_1.Querybox;
Querybox_1.Querybox.doExport();
var QueryDuration_1 = __webpack_require__(810);
exports.QueryDuration = QueryDuration_1.QueryDuration;
QueryDuration_1.QueryDuration.doExport();
var QuerySummary_1 = __webpack_require__(811);
exports.QuerySummary = QuerySummary_1.QuerySummary;
QuerySummary_1.QuerySummary.doExport();
var Quickview_1 = __webpack_require__(390);
exports.Quickview = Quickview_1.Quickview;
Quickview_1.Quickview.doExport();
var QuickviewFields_1 = __webpack_require__(1501);
QuickviewFields_1.registerFields();
var Recommendation_1 = __webpack_require__(199);
exports.Recommendation = Recommendation_1.Recommendation;
Recommendation_1.Recommendation.doExport();
var ResultAttachments_1 = __webpack_require__(821);
exports.ResultAttachments = ResultAttachments_1.ResultAttachments;
ResultAttachments_1.ResultAttachments.doExport();
var ResultActionsMenu_1 = __webpack_require__(822);
exports.ResultActionsMenu = ResultActionsMenu_1.ResultActionsMenu;
ResultActionsMenu_1.ResultActionsMenu.doExport();
var ResultFolding_1 = __webpack_require__(823);
exports.ResultFolding = ResultFolding_1.ResultFolding;
ResultFolding_1.ResultFolding.doExport();
var ResultLayoutSelector_1 = __webpack_require__(200);
exports.ResultLayoutSelector = ResultLayoutSelector_1.ResultLayoutSelector;
ResultLayoutSelector_1.ResultLayoutSelector.doExport();
var ResultLink_1 = __webpack_require__(56);
exports.ResultLink = ResultLink_1.ResultLink;
ResultLink_1.ResultLink.doExport();
var ResultLinkFields_1 = __webpack_require__(1511);
ResultLinkFields_1.registerFields();
var ResultList_1 = __webpack_require__(68);
exports.ResultList = ResultList_1.ResultList;
ResultList_1.ResultList.doExport();
var ResultRating_1 = __webpack_require__(391);
exports.ResultRating = ResultRating_1.ResultRating;
ResultRating_1.ResultRating.doExport();
var ResultsFiltersPreferences_1 = __webpack_require__(824);
exports.ResultsFiltersPreferences = ResultsFiltersPreferences_1.ResultsFiltersPreferences;
ResultsFiltersPreferences_1.ResultsFiltersPreferences.doExport();
var ResultsPerPage_1 = __webpack_require__(825);
exports.ResultsPerPage = ResultsPerPage_1.ResultsPerPage;
ResultsPerPage_1.ResultsPerPage.doExport();
var ResultsPreferences_1 = __webpack_require__(826);
exports.ResultsPreferences = ResultsPreferences_1.ResultsPreferences;
ResultsPreferences_1.ResultsPreferences.doExport();
var ResultTagging_1 = __webpack_require__(827);
exports.ResultTagging = ResultTagging_1.ResultTagging;
ResultTagging_1.ResultTagging.doExport();
var SearchAlerts_1 = __webpack_require__(828);
exports.SearchAlerts = SearchAlerts_1.SearchAlerts;
SearchAlerts_1.SearchAlerts.doExport();
var Searchbox_1 = __webpack_require__(393);
exports.Searchbox = Searchbox_1.Searchbox;
Searchbox_1.Searchbox.doExport();
var SearchButton_1 = __webpack_require__(394);
exports.SearchButton = SearchButton_1.SearchButton;
SearchButton_1.SearchButton.doExport();
var Settings_1 = __webpack_require__(395);
exports.Settings = Settings_1.Settings;
Settings_1.Settings.doExport();
var ShareQuery_1 = __webpack_require__(830);
exports.ShareQuery = ShareQuery_1.ShareQuery;
ShareQuery_1.ShareQuery.doExport();
var Sort_1 = __webpack_require__(271);
exports.Sort = Sort_1.Sort;
Sort_1.Sort.doExport();
var StarRating_1 = __webpack_require__(831);
exports.StarRating = StarRating_1.StarRating;
StarRating_1.StarRating.doExport();
var Tab_1 = __webpack_require__(201);
exports.Tab = Tab_1.Tab;
Tab_1.Tab.doExport();
var TemplateLoader_1 = __webpack_require__(832);
exports.TemplateLoader = TemplateLoader_1.TemplateLoader;
TemplateLoader_1.TemplateLoader.doExport();
var Text_1 = __webpack_require__(1527);
exports.Text = Text_1.Text;
Text_1.Text.doExport();
var Thumbnail_1 = __webpack_require__(833);
exports.Thumbnail = Thumbnail_1.Thumbnail;
Thumbnail_1.Thumbnail.doExport();
var ThumbnailFields_1 = __webpack_require__(1529);
ThumbnailFields_1.registerFields();
var Triggers_1 = __webpack_require__(834);
exports.Triggers = Triggers_1.Triggers;
Triggers_1.Triggers.doExport();
var YouTubeThumbnail_1 = __webpack_require__(324);
exports.YouTubeThumbnail = YouTubeThumbnail_1.YouTubeThumbnail;
YouTubeThumbnail_1.YouTubeThumbnail.doExport();
var YouTubeThumbnailFields_1 = __webpack_require__(1531);
YouTubeThumbnailFields_1.registerFields();
var Template_1 = __webpack_require__(29);
exports.Template = Template_1.Template;
var Checkbox_1 = __webpack_require__(98);
exports.Checkbox = Checkbox_1.Checkbox;
Checkbox_1.Checkbox.doExport();
var DatePicker_1 = __webpack_require__(140);
exports.DatePicker = DatePicker_1.DatePicker;
DatePicker_1.DatePicker.doExport();
var Dropdown_1 = __webpack_require__(92);
exports.Dropdown = Dropdown_1.Dropdown;
Dropdown_1.Dropdown.doExport();
var FormGroup_1 = __webpack_require__(270);
exports.FormGroup = FormGroup_1.FormGroup;
FormGroup_1.FormGroup.doExport();
var MultiSelect_1 = __webpack_require__(392);
exports.MultiSelect = MultiSelect_1.MultiSelect;
MultiSelect_1.MultiSelect.doExport();
var NumericSpinner_1 = __webpack_require__(143);
exports.NumericSpinner = NumericSpinner_1.NumericSpinner;
NumericSpinner_1.NumericSpinner.doExport();
var RadioButton_1 = __webpack_require__(142);
exports.RadioButton = RadioButton_1.RadioButton;
RadioButton_1.RadioButton.doExport();
var TextInput_1 = __webpack_require__(80);
exports.TextInput = TextInput_1.TextInput;
TextInput_1.TextInput.doExport();
var SimpleFilter_1 = __webpack_require__(835);
exports.SimpleFilter = SimpleFilter_1.SimpleFilter;
SimpleFilter_1.SimpleFilter.doExport();
var TimespanFacet_1 = __webpack_require__(837);
exports.TimespanFacet = TimespanFacet_1.TimespanFacet;
TimespanFacet_1.TimespanFacet.doExport();
var DynamicFacet_1 = __webpack_require__(272);
exports.DynamicFacet = DynamicFacet_1.DynamicFacet;
DynamicFacet_1.DynamicFacet.doExport();
var DynamicFacetRange_1 = __webpack_require__(846);
exports.DynamicFacetRange = DynamicFacetRange_1.DynamicFacetRange;
DynamicFacetRange_1.DynamicFacetRange.doExport();
var DynamicFacetManager_1 = __webpack_require__(276);
exports.DynamicFacetManager = DynamicFacetManager_1.DynamicFacetManager;
DynamicFacetManager_1.DynamicFacetManager.doExport();
var PromotedResultsBadge_1 = __webpack_require__(850);
exports.PromotedResultsBadge = PromotedResultsBadge_1.PromotedResultsBadge;
PromotedResultsBadge_1.PromotedResultsBadge.doExport();
var CategoryFacet_1 = __webpack_require__(71);
exports.CategoryFacet = CategoryFacet_1.CategoryFacet;
CategoryFacet_1.CategoryFacet.doExport();
var DynamicHierarchicalFacet_1 = __webpack_require__(405);
exports.DynamicHierarchicalFacet = DynamicHierarchicalFacet_1.DynamicHierarchicalFacet;
DynamicHierarchicalFacet_1.DynamicHierarchicalFacet.doExport();
var MissingTerms_1 = __webpack_require__(858);
exports.MissingTerms = MissingTerms_1.MissingTerms;
MissingTerms_1.MissingTerms.doExport();
var QuerySuggestPreview_1 = __webpack_require__(859);
exports.QuerySuggestPreview = QuerySuggestPreview_1.QuerySuggestPreview;
QuerySuggestPreview_1.QuerySuggestPreview.doExport();
var SwapVar_1 = __webpack_require__(1546);
SwapVar_1.swapVar(this);
var ImageFieldValue_1 = __webpack_require__(408);
exports.ImageFieldValue = ImageFieldValue_1.ImageFieldValue;
ImageFieldValue_1.ImageFieldValue.doExport();
var CommerceQuery_1 = __webpack_require__(860);
exports.CommerceQuery = CommerceQuery_1.CommerceQuery;
CommerceQuery_1.CommerceQuery.doExport();
var SortDropdown_1 = __webpack_require__(861);
exports.SortDropdown = SortDropdown_1.SortDropdown;
SortDropdown_1.SortDropdown.doExport();
var SmartSnippet_1 = __webpack_require__(862);
exports.SmartSnippet = SmartSnippet_1.SmartSnippet;
SmartSnippet_1.SmartSnippet.doExport();
var SmartSnippetSuggestions_1 = __webpack_require__(863);
exports.SmartSnippetSuggestions = SmartSnippetSuggestions_1.SmartSnippetSuggestions;
SmartSnippetSuggestions_1.SmartSnippetSuggestions.doExport();
var FacetsMobileMode_1 = __webpack_require__(176);
exports.FacetsMobileMode = FacetsMobileMode_1.FacetsMobileMode;
FacetsMobileMode_1.FacetsMobileMode.doExport();
var Analytics_2 = __webpack_require__(178);
exports.Analytics = Analytics_2.Analytics;
 
 
/***/ }),
/* 870 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
// This file can be required in Browserify and Node.js for automatic polyfill
// To use it:  require('es6-promise/auto');
 
module.exports = __webpack_require__(871).polyfill();
 
 
/***/ }),
/* 871 */
/***/ (function(module, exports, __webpack_require__) {
 
/* WEBPACK VAR INJECTION */(function(process, global) {/*!
 * @overview es6-promise - a tiny implementation of Promises/A+.
 * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)
 * @license   Licensed under MIT license
 *            See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE
 * @version   v4.2.4+314e4831
 */
 
(function (global, factory) {
	 true ? module.exports = factory() :
	typeof define === 'function' && define.amd ? define(factory) :
	(global.ES6Promise = factory());
}(this, (function () { 'use strict';
 
function objectOrFunction(x) {
  var type = typeof x;
  return x !== null && (type === 'object' || type === 'function');
}
 
function isFunction(x) {
  return typeof x === 'function';
}
 
 
 
var _isArray = void 0;
if (Array.isArray) {
  _isArray = Array.isArray;
} else {
  _isArray = function (x) {
    return Object.prototype.toString.call(x) === '[object Array]';
  };
}
 
var isArray = _isArray;
 
var len = 0;
var vertxNext = void 0;
var customSchedulerFn = void 0;
 
var asap = function asap(callback, arg) {
  queue[len] = callback;
  queue[len + 1] = arg;
  len += 2;
  if (len === 2) {
    // If len is 2, that means that we need to schedule an async flush.
    // If additional callbacks are queued before the queue is flushed, they
    // will be processed by this flush that we are scheduling.
    if (customSchedulerFn) {
      customSchedulerFn(flush);
    } else {
      scheduleFlush();
    }
  }
};
 
function setScheduler(scheduleFn) {
  customSchedulerFn = scheduleFn;
}
 
function setAsap(asapFn) {
  asap = asapFn;
}
 
var browserWindow = typeof window !== 'undefined' ? window : undefined;
var browserGlobal = browserWindow || {};
var BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver;
var isNode = typeof self === 'undefined' && typeof process !== 'undefined' && {}.toString.call(process) === '[object process]';
 
// test for web worker but not in IE10
var isWorker = typeof Uint8ClampedArray !== 'undefined' && typeof importScripts !== 'undefined' && typeof MessageChannel !== 'undefined';
 
// node
function useNextTick() {
  // node version 0.10.x displays a deprecation warning when nextTick is used recursively
  // see https://github.com/cujojs/when/issues/410 for details
  return function () {
    return process.nextTick(flush);
  };
}
 
// vertx
function useVertxTimer() {
  if (typeof vertxNext !== 'undefined') {
    return function () {
      vertxNext(flush);
    };
  }
 
  return useSetTimeout();
}
 
function useMutationObserver() {
  var iterations = 0;
  var observer = new BrowserMutationObserver(flush);
  var node = document.createTextNode('');
  observer.observe(node, { characterData: true });
 
  return function () {
    node.data = iterations = ++iterations % 2;
  };
}
 
// web worker
function useMessageChannel() {
  var channel = new MessageChannel();
  channel.port1.onmessage = flush;
  return function () {
    return channel.port2.postMessage(0);
  };
}
 
function useSetTimeout() {
  // Store setTimeout reference so es6-promise will be unaffected by
  // other code modifying setTimeout (like sinon.useFakeTimers())
  var globalSetTimeout = setTimeout;
  return function () {
    return globalSetTimeout(flush, 1);
  };
}
 
var queue = new Array(1000);
function flush() {
  for (var i = 0; i < len; i += 2) {
    var callback = queue[i];
    var arg = queue[i + 1];
 
    callback(arg);
 
    queue[i] = undefined;
    queue[i + 1] = undefined;
  }
 
  len = 0;
}
 
function attemptVertx() {
  try {
    var vertx = Function('return this')().require('vertx');
    vertxNext = vertx.runOnLoop || vertx.runOnContext;
    return useVertxTimer();
  } catch (e) {
    return useSetTimeout();
  }
}
 
var scheduleFlush = void 0;
// Decide what async method to use to triggering processing of queued callbacks:
if (isNode) {
  scheduleFlush = useNextTick();
} else if (BrowserMutationObserver) {
  scheduleFlush = useMutationObserver();
} else if (isWorker) {
  scheduleFlush = useMessageChannel();
} else if (browserWindow === undefined && "function" === 'function') {
  scheduleFlush = attemptVertx();
} else {
  scheduleFlush = useSetTimeout();
}
 
function then(onFulfillment, onRejection) {
  var parent = this;
 
  var child = new this.constructor(noop);
 
  if (child[PROMISE_ID] === undefined) {
    makePromise(child);
  }
 
  var _state = parent._state;
 
 
  if (_state) {
    var callback = arguments[_state - 1];
    asap(function () {
      return invokeCallback(_state, child, callback, parent._result);
    });
  } else {
    subscribe(parent, child, onFulfillment, onRejection);
  }
 
  return child;
}
 
/**
  `Promise.resolve` returns a promise that will become resolved with the
  passed `value`. It is shorthand for the following:
 
  ```javascript
  let promise = new Promise(function(resolve, reject){
    resolve(1);
  });
 
  promise.then(function(value){
    // value === 1
  });
  ```
 
  Instead of writing the above, your code now simply becomes the following:
 
  ```javascript
  let promise = Promise.resolve(1);
 
  promise.then(function(value){
    // value === 1
  });
  ```
 
  @method resolve
  @static
  @param {Any} value value that the returned promise will be resolved with
  Useful for tooling.
  @return {Promise} a promise that will become fulfilled with the given
  `value`
*/
function resolve$1(object) {
  /*jshint validthis:true */
  var Constructor = this;
 
  if (object && typeof object === 'object' && object.constructor === Constructor) {
    return object;
  }
 
  var promise = new Constructor(noop);
  resolve(promise, object);
  return promise;
}
 
var PROMISE_ID = Math.random().toString(36).substring(2);
 
function noop() {}
 
var PENDING = void 0;
var FULFILLED = 1;
var REJECTED = 2;
 
var TRY_CATCH_ERROR = { error: null };
 
function selfFulfillment() {
  return new TypeError("You cannot resolve a promise with itself");
}
 
function cannotReturnOwn() {
  return new TypeError('A promises callback cannot return that same promise.');
}
 
function getThen(promise) {
  try {
    return promise.then;
  } catch (error) {
    TRY_CATCH_ERROR.error = error;
    return TRY_CATCH_ERROR;
  }
}
 
function tryThen(then$$1, value, fulfillmentHandler, rejectionHandler) {
  try {
    then$$1.call(value, fulfillmentHandler, rejectionHandler);
  } catch (e) {
    return e;
  }
}
 
function handleForeignThenable(promise, thenable, then$$1) {
  asap(function (promise) {
    var sealed = false;
    var error = tryThen(then$$1, thenable, function (value) {
      if (sealed) {
        return;
      }
      sealed = true;
      if (thenable !== value) {
        resolve(promise, value);
      } else {
        fulfill(promise, value);
      }
    }, function (reason) {
      if (sealed) {
        return;
      }
      sealed = true;
 
      reject(promise, reason);
    }, 'Settle: ' + (promise._label || ' unknown promise'));
 
    if (!sealed && error) {
      sealed = true;
      reject(promise, error);
    }
  }, promise);
}
 
function handleOwnThenable(promise, thenable) {
  if (thenable._state === FULFILLED) {
    fulfill(promise, thenable._result);
  } else if (thenable._state === REJECTED) {
    reject(promise, thenable._result);
  } else {
    subscribe(thenable, undefined, function (value) {
      return resolve(promise, value);
    }, function (reason) {
      return reject(promise, reason);
    });
  }
}
 
function handleMaybeThenable(promise, maybeThenable, then$$1) {
  if (maybeThenable.constructor === promise.constructor && then$$1 === then && maybeThenable.constructor.resolve === resolve$1) {
    handleOwnThenable(promise, maybeThenable);
  } else {
    if (then$$1 === TRY_CATCH_ERROR) {
      reject(promise, TRY_CATCH_ERROR.error);
      TRY_CATCH_ERROR.error = null;
    } else if (then$$1 === undefined) {
      fulfill(promise, maybeThenable);
    } else if (isFunction(then$$1)) {
      handleForeignThenable(promise, maybeThenable, then$$1);
    } else {
      fulfill(promise, maybeThenable);
    }
  }
}
 
function resolve(promise, value) {
  if (promise === value) {
    reject(promise, selfFulfillment());
  } else if (objectOrFunction(value)) {
    handleMaybeThenable(promise, value, getThen(value));
  } else {
    fulfill(promise, value);
  }
}
 
function publishRejection(promise) {
  if (promise._onerror) {
    promise._onerror(promise._result);
  }
 
  publish(promise);
}
 
function fulfill(promise, value) {
  if (promise._state !== PENDING) {
    return;
  }
 
  promise._result = value;
  promise._state = FULFILLED;
 
  if (promise._subscribers.length !== 0) {
    asap(publish, promise);
  }
}
 
function reject(promise, reason) {
  if (promise._state !== PENDING) {
    return;
  }
  promise._state = REJECTED;
  promise._result = reason;
 
  asap(publishRejection, promise);
}
 
function subscribe(parent, child, onFulfillment, onRejection) {
  var _subscribers = parent._subscribers;
  var length = _subscribers.length;
 
 
  parent._onerror = null;
 
  _subscribers[length] = child;
  _subscribers[length + FULFILLED] = onFulfillment;
  _subscribers[length + REJECTED] = onRejection;
 
  if (length === 0 && parent._state) {
    asap(publish, parent);
  }
}
 
function publish(promise) {
  var subscribers = promise._subscribers;
  var settled = promise._state;
 
  if (subscribers.length === 0) {
    return;
  }
 
  var child = void 0,
      callback = void 0,
      detail = promise._result;
 
  for (var i = 0; i < subscribers.length; i += 3) {
    child = subscribers[i];
    callback = subscribers[i + settled];
 
    if (child) {
      invokeCallback(settled, child, callback, detail);
    } else {
      callback(detail);
    }
  }
 
  promise._subscribers.length = 0;
}
 
function tryCatch(callback, detail) {
  try {
    return callback(detail);
  } catch (e) {
    TRY_CATCH_ERROR.error = e;
    return TRY_CATCH_ERROR;
  }
}
 
function invokeCallback(settled, promise, callback, detail) {
  var hasCallback = isFunction(callback),
      value = void 0,
      error = void 0,
      succeeded = void 0,
      failed = void 0;
 
  if (hasCallback) {
    value = tryCatch(callback, detail);
 
    if (value === TRY_CATCH_ERROR) {
      failed = true;
      error = value.error;
      value.error = null;
    } else {
      succeeded = true;
    }
 
    if (promise === value) {
      reject(promise, cannotReturnOwn());
      return;
    }
  } else {
    value = detail;
    succeeded = true;
  }
 
  if (promise._state !== PENDING) {
    // noop
  } else if (hasCallback && succeeded) {
    resolve(promise, value);
  } else if (failed) {
    reject(promise, error);
  } else if (settled === FULFILLED) {
    fulfill(promise, value);
  } else if (settled === REJECTED) {
    reject(promise, value);
  }
}
 
function initializePromise(promise, resolver) {
  try {
    resolver(function resolvePromise(value) {
      resolve(promise, value);
    }, function rejectPromise(reason) {
      reject(promise, reason);
    });
  } catch (e) {
    reject(promise, e);
  }
}
 
var id = 0;
function nextId() {
  return id++;
}
 
function makePromise(promise) {
  promise[PROMISE_ID] = id++;
  promise._state = undefined;
  promise._result = undefined;
  promise._subscribers = [];
}
 
function validationError() {
  return new Error('Array Methods must be provided an Array');
}
 
var Enumerator = function () {
  function Enumerator(Constructor, input) {
    this._instanceConstructor = Constructor;
    this.promise = new Constructor(noop);
 
    if (!this.promise[PROMISE_ID]) {
      makePromise(this.promise);
    }
 
    if (isArray(input)) {
      this.length = input.length;
      this._remaining = input.length;
 
      this._result = new Array(this.length);
 
      if (this.length === 0) {
        fulfill(this.promise, this._result);
      } else {
        this.length = this.length || 0;
        this._enumerate(input);
        if (this._remaining === 0) {
          fulfill(this.promise, this._result);
        }
      }
    } else {
      reject(this.promise, validationError());
    }
  }
 
  Enumerator.prototype._enumerate = function _enumerate(input) {
    for (var i = 0; this._state === PENDING && i < input.length; i++) {
      this._eachEntry(input[i], i);
    }
  };
 
  Enumerator.prototype._eachEntry = function _eachEntry(entry, i) {
    var c = this._instanceConstructor;
    var resolve$$1 = c.resolve;
 
 
    if (resolve$$1 === resolve$1) {
      var _then = getThen(entry);
 
      if (_then === then && entry._state !== PENDING) {
        this._settledAt(entry._state, i, entry._result);
      } else if (typeof _then !== 'function') {
        this._remaining--;
        this._result[i] = entry;
      } else if (c === Promise$1) {
        var promise = new c(noop);
        handleMaybeThenable(promise, entry, _then);
        this._willSettleAt(promise, i);
      } else {
        this._willSettleAt(new c(function (resolve$$1) {
          return resolve$$1(entry);
        }), i);
      }
    } else {
      this._willSettleAt(resolve$$1(entry), i);
    }
  };
 
  Enumerator.prototype._settledAt = function _settledAt(state, i, value) {
    var promise = this.promise;
 
 
    if (promise._state === PENDING) {
      this._remaining--;
 
      if (state === REJECTED) {
        reject(promise, value);
      } else {
        this._result[i] = value;
      }
    }
 
    if (this._remaining === 0) {
      fulfill(promise, this._result);
    }
  };
 
  Enumerator.prototype._willSettleAt = function _willSettleAt(promise, i) {
    var enumerator = this;
 
    subscribe(promise, undefined, function (value) {
      return enumerator._settledAt(FULFILLED, i, value);
    }, function (reason) {
      return enumerator._settledAt(REJECTED, i, reason);
    });
  };
 
  return Enumerator;
}();
 
/**
  `Promise.all` accepts an array of promises, and returns a new promise which
  is fulfilled with an array of fulfillment values for the passed promises, or
  rejected with the reason of the first passed promise to be rejected. It casts all
  elements of the passed iterable to promises as it runs this algorithm.
 
  Example:
 
  ```javascript
  let promise1 = resolve(1);
  let promise2 = resolve(2);
  let promise3 = resolve(3);
  let promises = [ promise1, promise2, promise3 ];
 
  Promise.all(promises).then(function(array){
    // The array here would be [ 1, 2, 3 ];
  });
  ```
 
  If any of the `promises` given to `all` are rejected, the first promise
  that is rejected will be given as an argument to the returned promises's
  rejection handler. For example:
 
  Example:
 
  ```javascript
  let promise1 = resolve(1);
  let promise2 = reject(new Error("2"));
  let promise3 = reject(new Error("3"));
  let promises = [ promise1, promise2, promise3 ];
 
  Promise.all(promises).then(function(array){
    // Code here never runs because there are rejected promises!
  }, function(error) {
    // error.message === "2"
  });
  ```
 
  @method all
  @static
  @param {Array} entries array of promises
  @param {String} label optional string for labeling the promise.
  Useful for tooling.
  @return {Promise} promise that is fulfilled when all `promises` have been
  fulfilled, or rejected if any of them become rejected.
  @static
*/
function all(entries) {
  return new Enumerator(this, entries).promise;
}
 
/**
  `Promise.race` returns a new promise which is settled in the same way as the
  first passed promise to settle.
 
  Example:
 
  ```javascript
  let promise1 = new Promise(function(resolve, reject){
    setTimeout(function(){
      resolve('promise 1');
    }, 200);
  });
 
  let promise2 = new Promise(function(resolve, reject){
    setTimeout(function(){
      resolve('promise 2');
    }, 100);
  });
 
  Promise.race([promise1, promise2]).then(function(result){
    // result === 'promise 2' because it was resolved before promise1
    // was resolved.
  });
  ```
 
  `Promise.race` is deterministic in that only the state of the first
  settled promise matters. For example, even if other promises given to the
  `promises` array argument are resolved, but the first settled promise has
  become rejected before the other promises became fulfilled, the returned
  promise will become rejected:
 
  ```javascript
  let promise1 = new Promise(function(resolve, reject){
    setTimeout(function(){
      resolve('promise 1');
    }, 200);
  });
 
  let promise2 = new Promise(function(resolve, reject){
    setTimeout(function(){
      reject(new Error('promise 2'));
    }, 100);
  });
 
  Promise.race([promise1, promise2]).then(function(result){
    // Code here never runs
  }, function(reason){
    // reason.message === 'promise 2' because promise 2 became rejected before
    // promise 1 became fulfilled
  });
  ```
 
  An example real-world use case is implementing timeouts:
 
  ```javascript
  Promise.race([ajax('foo.json'), timeout(5000)])
  ```
 
  @method race
  @static
  @param {Array} promises array of promises to observe
  Useful for tooling.
  @return {Promise} a promise which settles in the same way as the first passed
  promise to settle.
*/
function race(entries) {
  /*jshint validthis:true */
  var Constructor = this;
 
  if (!isArray(entries)) {
    return new Constructor(function (_, reject) {
      return reject(new TypeError('You must pass an array to race.'));
    });
  } else {
    return new Constructor(function (resolve, reject) {
      var length = entries.length;
      for (var i = 0; i < length; i++) {
        Constructor.resolve(entries[i]).then(resolve, reject);
      }
    });
  }
}
 
/**
  `Promise.reject` returns a promise rejected with the passed `reason`.
  It is shorthand for the following:
 
  ```javascript
  let promise = new Promise(function(resolve, reject){
    reject(new Error('WHOOPS'));
  });
 
  promise.then(function(value){
    // Code here doesn't run because the promise is rejected!
  }, function(reason){
    // reason.message === 'WHOOPS'
  });
  ```
 
  Instead of writing the above, your code now simply becomes the following:
 
  ```javascript
  let promise = Promise.reject(new Error('WHOOPS'));
 
  promise.then(function(value){
    // Code here doesn't run because the promise is rejected!
  }, function(reason){
    // reason.message === 'WHOOPS'
  });
  ```
 
  @method reject
  @static
  @param {Any} reason value that the returned promise will be rejected with.
  Useful for tooling.
  @return {Promise} a promise rejected with the given `reason`.
*/
function reject$1(reason) {
  /*jshint validthis:true */
  var Constructor = this;
  var promise = new Constructor(noop);
  reject(promise, reason);
  return promise;
}
 
function needsResolver() {
  throw new TypeError('You must pass a resolver function as the first argument to the promise constructor');
}
 
function needsNew() {
  throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.");
}
 
/**
  Promise objects represent the eventual result of an asynchronous operation. The
  primary way of interacting with a promise is through its `then` method, which
  registers callbacks to receive either a promise's eventual value or the reason
  why the promise cannot be fulfilled.
 
  Terminology
  -----------
 
  - `promise` is an object or function with a `then` method whose behavior conforms to this specification.
  - `thenable` is an object or function that defines a `then` method.
  - `value` is any legal JavaScript value (including undefined, a thenable, or a promise).
  - `exception` is a value that is thrown using the throw statement.
  - `reason` is a value that indicates why a promise was rejected.
  - `settled` the final resting state of a promise, fulfilled or rejected.
 
  A promise can be in one of three states: pending, fulfilled, or rejected.
 
  Promises that are fulfilled have a fulfillment value and are in the fulfilled
  state.  Promises that are rejected have a rejection reason and are in the
  rejected state.  A fulfillment value is never a thenable.
 
  Promises can also be said to *resolve* a value.  If this value is also a
  promise, then the original promise's settled state will match the value's
  settled state.  So a promise that *resolves* a promise that rejects will
  itself reject, and a promise that *resolves* a promise that fulfills will
  itself fulfill.
 
 
  Basic Usage:
  ------------
 
  ```js
  let promise = new Promise(function(resolve, reject) {
    // on success
    resolve(value);
 
    // on failure
    reject(reason);
  });
 
  promise.then(function(value) {
    // on fulfillment
  }, function(reason) {
    // on rejection
  });
  ```
 
  Advanced Usage:
  ---------------
 
  Promises shine when abstracting away asynchronous interactions such as
  `XMLHttpRequest`s.
 
  ```js
  function getJSON(url) {
    return new Promise(function(resolve, reject){
      let xhr = new XMLHttpRequest();
 
      xhr.open('GET', url);
      xhr.onreadystatechange = handler;
      xhr.responseType = 'json';
      xhr.setRequestHeader('Accept', 'application/json');
      xhr.send();
 
      function handler() {
        if (this.readyState === this.DONE) {
          if (this.status === 200) {
            resolve(this.response);
          } else {
            reject(new Error('getJSON: `' + url + '` failed with status: [' + this.status + ']'));
          }
        }
      };
    });
  }
 
  getJSON('/posts.json').then(function(json) {
    // on fulfillment
  }, function(reason) {
    // on rejection
  });
  ```
 
  Unlike callbacks, promises are great composable primitives.
 
  ```js
  Promise.all([
    getJSON('/posts'),
    getJSON('/comments')
  ]).then(function(values){
    values[0] // => postsJSON
    values[1] // => commentsJSON
 
    return values;
  });
  ```
 
  @class Promise
  @param {Function} resolver
  Useful for tooling.
  @constructor
*/
 
var Promise$1 = function () {
  function Promise(resolver) {
    this[PROMISE_ID] = nextId();
    this._result = this._state = undefined;
    this._subscribers = [];
 
    if (noop !== resolver) {
      typeof resolver !== 'function' && needsResolver();
      this instanceof Promise ? initializePromise(this, resolver) : needsNew();
    }
  }
 
  /**
  The primary way of interacting with a promise is through its `then` method,
  which registers callbacks to receive either a promise's eventual value or the
  reason why the promise cannot be fulfilled.
   ```js
  findUser().then(function(user){
    // user is available
  }, function(reason){
    // user is unavailable, and you are given the reason why
  });
  ```
   Chaining
  --------
   The return value of `then` is itself a promise.  This second, 'downstream'
  promise is resolved with the return value of the first promise's fulfillment
  or rejection handler, or rejected if the handler throws an exception.
   ```js
  findUser().then(function (user) {
    return user.name;
  }, function (reason) {
    return 'default name';
  }).then(function (userName) {
    // If `findUser` fulfilled, `userName` will be the user's name, otherwise it
    // will be `'default name'`
  });
   findUser().then(function (user) {
    throw new Error('Found user, but still unhappy');
  }, function (reason) {
    throw new Error('`findUser` rejected and we're unhappy');
  }).then(function (value) {
    // never reached
  }, function (reason) {
    // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.
    // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.
  });
  ```
  If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.
   ```js
  findUser().then(function (user) {
    throw new PedagogicalException('Upstream error');
  }).then(function (value) {
    // never reached
  }).then(function (value) {
    // never reached
  }, function (reason) {
    // The `PedgagocialException` is propagated all the way down to here
  });
  ```
   Assimilation
  ------------
   Sometimes the value you want to propagate to a downstream promise can only be
  retrieved asynchronously. This can be achieved by returning a promise in the
  fulfillment or rejection handler. The downstream promise will then be pending
  until the returned promise is settled. This is called *assimilation*.
   ```js
  findUser().then(function (user) {
    return findCommentsByAuthor(user);
  }).then(function (comments) {
    // The user's comments are now available
  });
  ```
   If the assimliated promise rejects, then the downstream promise will also reject.
   ```js
  findUser().then(function (user) {
    return findCommentsByAuthor(user);
  }).then(function (comments) {
    // If `findCommentsByAuthor` fulfills, we'll have the value here
  }, function (reason) {
    // If `findCommentsByAuthor` rejects, we'll have the reason here
  });
  ```
   Simple Example
  --------------
   Synchronous Example
   ```javascript
  let result;
   try {
    result = findResult();
    // success
  } catch(reason) {
    // failure
  }
  ```
   Errback Example
   ```js
  findResult(function(result, err){
    if (err) {
      // failure
    } else {
      // success
    }
  });
  ```
   Promise Example;
   ```javascript
  findResult().then(function(result){
    // success
  }, function(reason){
    // failure
  });
  ```
   Advanced Example
  --------------
   Synchronous Example
   ```javascript
  let author, books;
   try {
    author = findAuthor();
    books  = findBooksByAuthor(author);
    // success
  } catch(reason) {
    // failure
  }
  ```
   Errback Example
   ```js
   function foundBooks(books) {
   }
   function failure(reason) {
   }
   findAuthor(function(author, err){
    if (err) {
      failure(err);
      // failure
    } else {
      try {
        findBoooksByAuthor(author, function(books, err) {
          if (err) {
            failure(err);
          } else {
            try {
              foundBooks(books);
            } catch(reason) {
              failure(reason);
            }
          }
        });
      } catch(error) {
        failure(err);
      }
      // success
    }
  });
  ```
   Promise Example;
   ```javascript
  findAuthor().
    then(findBooksByAuthor).
    then(function(books){
      // found books
  }).catch(function(reason){
    // something went wrong
  });
  ```
   @method then
  @param {Function} onFulfilled
  @param {Function} onRejected
  Useful for tooling.
  @return {Promise}
  */
 
  /**
  `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same
  as the catch block of a try/catch statement.
  ```js
  function findAuthor(){
  throw new Error('couldn't find that author');
  }
  // synchronous
  try {
  findAuthor();
  } catch(reason) {
  // something went wrong
  }
  // async with promises
  findAuthor().catch(function(reason){
  // something went wrong
  });
  ```
  @method catch
  @param {Function} onRejection
  Useful for tooling.
  @return {Promise}
  */
 
 
  Promise.prototype.catch = function _catch(onRejection) {
    return this.then(null, onRejection);
  };
 
  /**
    `finally` will be invoked regardless of the promise's fate just as native
    try/catch/finally behaves
  
    Synchronous example:
  
    ```js
    findAuthor() {
      if (Math.random() > 0.5) {
        throw new Error();
      }
      return new Author();
    }
  
    try {
      return findAuthor(); // succeed or fail
    } catch(error) {
      return findOtherAuther();
    } finally {
      // always runs
      // doesn't affect the return value
    }
    ```
  
    Asynchronous example:
  
    ```js
    findAuthor().catch(function(reason){
      return findOtherAuther();
    }).finally(function(){
      // author was either found, or not
    });
    ```
  
    @method finally
    @param {Function} callback
    @return {Promise}
  */
 
 
  Promise.prototype.finally = function _finally(callback) {
    var promise = this;
    var constructor = promise.constructor;
 
    return promise.then(function (value) {
      return constructor.resolve(callback()).then(function () {
        return value;
      });
    }, function (reason) {
      return constructor.resolve(callback()).then(function () {
        throw reason;
      });
    });
  };
 
  return Promise;
}();
 
Promise$1.prototype.then = then;
Promise$1.all = all;
Promise$1.race = race;
Promise$1.resolve = resolve$1;
Promise$1.reject = reject$1;
Promise$1._setScheduler = setScheduler;
Promise$1._setAsap = setAsap;
Promise$1._asap = asap;
 
/*global self*/
function polyfill() {
  var local = void 0;
 
  if (typeof global !== 'undefined') {
    local = global;
  } else if (typeof self !== 'undefined') {
    local = self;
  } else {
    try {
      local = Function('return this')();
    } catch (e) {
      throw new Error('polyfill failed because global object is unavailable in this environment');
    }
  }
 
  var P = local.Promise;
 
  if (P) {
    var promiseToString = null;
    try {
      promiseToString = Object.prototype.toString.call(P.resolve());
    } catch (e) {
      // silently ignored
    }
 
    if (promiseToString === '[object Promise]' && !P.cast) {
      return;
    }
  }
 
  local.Promise = Promise$1;
}
 
// Strange compat..
Promise$1.polyfill = polyfill;
Promise$1.Promise = Promise$1;
 
return Promise$1;
 
})));
 
 
 
 
 
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(414), __webpack_require__(208)))
 
/***/ }),
/* 872 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__index_js__ = __webpack_require__(277);
// Default Export
// ==============
// In this module, we mix our bundled exports into the `_` object and export
// the result. This is analogous to setting `module.exports = _` in CommonJS.
// Hence, this module is also the entry point of our UMD bundle and the package
// entry point for CommonJS and AMD users. In other words, this is (the source
// of) the module you are interfacing with when you do any of the following:
//
// ```js
// // CommonJS
// var _ = require('underscore');
//
// // AMD
// define(['underscore'], function(_) {...});
//
// // UMD in the browser
// // _ is available as a global variable
// ```
 
 
 
// Add all of the Underscore functions to the wrapper object.
var _ = Object(__WEBPACK_IMPORTED_MODULE_0__index_js__["mixin"])(__WEBPACK_IMPORTED_MODULE_0__index_js__);
// Legacy Node.js API.
_._ = _;
// Export the Underscore API.
/* harmony default export */ __webpack_exports__["a"] = (_);
 
 
/***/ }),
/* 873 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = isNull;
// Is a given value equal to null?
function isNull(obj) {
  return obj === null;
}
 
 
/***/ }),
/* 874 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = isElement;
// Is a given value a DOM element?
function isElement(obj) {
  return !!(obj && obj.nodeType === 1);
}
 
 
/***/ }),
/* 875 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__tagTester_js__ = __webpack_require__(46);
 
 
/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__tagTester_js__["a" /* default */])('Date'));
 
 
/***/ }),
/* 876 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__tagTester_js__ = __webpack_require__(46);
 
 
/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__tagTester_js__["a" /* default */])('RegExp'));
 
 
/***/ }),
/* 877 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__tagTester_js__ = __webpack_require__(46);
 
 
/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__tagTester_js__["a" /* default */])('Error'));
 
 
/***/ }),
/* 878 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__tagTester_js__ = __webpack_require__(46);
 
 
/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__tagTester_js__["a" /* default */])('Object'));
 
 
/***/ }),
/* 879 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = isFinite;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__setup_js__ = __webpack_require__(30);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isSymbol_js__ = __webpack_require__(419);
 
 
 
// Is a given object a finite number?
function isFinite(obj) {
  return !Object(__WEBPACK_IMPORTED_MODULE_1__isSymbol_js__["a" /* default */])(obj) && Object(__WEBPACK_IMPORTED_MODULE_0__setup_js__["f" /* _isFinite */])(obj) && !isNaN(parseFloat(obj));
}
 
 
/***/ }),
/* 880 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createSizePropertyCheck_js__ = __webpack_require__(424);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__getByteLength_js__ = __webpack_require__(281);
 
 
 
// Internal helper to determine whether we should spend extensive checks against
// `ArrayBuffer` et al.
/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__createSizePropertyCheck_js__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__getByteLength_js__["a" /* default */]));
 
 
/***/ }),
/* 881 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = isEmpty;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__getLength_js__ = __webpack_require__(65);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isArray_js__ = __webpack_require__(106);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isString_js__ = __webpack_require__(278);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__isArguments_js__ = __webpack_require__(280);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__keys_js__ = __webpack_require__(41);
 
 
 
 
 
 
// Is a given array, string, or object empty?
// An "empty" object has no enumerable own-properties.
function isEmpty(obj) {
  if (obj == null) return true;
  // Skip the more expensive `toString`-based type checks if `obj` has no
  // `.length`.
  var length = Object(__WEBPACK_IMPORTED_MODULE_0__getLength_js__["a" /* default */])(obj);
  if (typeof length == 'number' && (
    Object(__WEBPACK_IMPORTED_MODULE_1__isArray_js__["a" /* default */])(obj) || Object(__WEBPACK_IMPORTED_MODULE_2__isString_js__["a" /* default */])(obj) || Object(__WEBPACK_IMPORTED_MODULE_3__isArguments_js__["a" /* default */])(obj)
  )) return length === 0;
  return Object(__WEBPACK_IMPORTED_MODULE_0__getLength_js__["a" /* default */])(Object(__WEBPACK_IMPORTED_MODULE_4__keys_js__["a" /* default */])(obj)) === 0;
}
 
 
/***/ }),
/* 882 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = isEqual;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__underscore_js__ = __webpack_require__(59);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__setup_js__ = __webpack_require__(30);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__getByteLength_js__ = __webpack_require__(281);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__isTypedArray_js__ = __webpack_require__(422);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__isFunction_js__ = __webpack_require__(64);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__stringTagBug_js__ = __webpack_require__(159);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__isDataView_js__ = __webpack_require__(279);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__keys_js__ = __webpack_require__(41);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__has_js__ = __webpack_require__(95);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__toBufferView_js__ = __webpack_require__(883);
 
 
 
 
 
 
 
 
 
 
 
// We use this string twice, so give it a name for minification.
var tagDataView = '[object DataView]';
 
// Internal recursive comparison function for `_.isEqual`.
function eq(a, b, aStack, bStack) {
  // Identical objects are equal. `0 === -0`, but they aren't identical.
  // See the [Harmony `egal` proposal](https://wiki.ecmascript.org/doku.php?id=harmony:egal).
  if (a === b) return a !== 0 || 1 / a === 1 / b;
  // `null` or `undefined` only equal to itself (strict comparison).
  if (a == null || b == null) return false;
  // `NaN`s are equivalent, but non-reflexive.
  Iif (a !== a) return b !== b;
  // Exhaust primitive checks
  var type = typeof a;
  if (type !== 'function' && type !== 'object' && typeof b != 'object') return false;
  return deepEq(a, b, aStack, bStack);
}
 
// Internal recursive comparison function for `_.isEqual`.
function deepEq(a, b, aStack, bStack) {
  // Unwrap any wrapped objects.
  if (a instanceof __WEBPACK_IMPORTED_MODULE_0__underscore_js__["a" /* default */]) a = a._wrapped;
  if (b instanceof __WEBPACK_IMPORTED_MODULE_0__underscore_js__["a" /* default */]) b = b._wrapped;
  // Compare `[[Class]]` names.
  var className = __WEBPACK_IMPORTED_MODULE_1__setup_js__["t" /* toString */].call(a);
  Iif (className !== __WEBPACK_IMPORTED_MODULE_1__setup_js__["t" /* toString */].call(b)) return false;
  // Work around a bug in IE 10 - Edge 13.
  Iif (__WEBPACK_IMPORTED_MODULE_5__stringTagBug_js__["a" /* hasStringTagBug */] && className == '[object Object]' && Object(__WEBPACK_IMPORTED_MODULE_6__isDataView_js__["a" /* default */])(a)) {
    if (!Object(__WEBPACK_IMPORTED_MODULE_6__isDataView_js__["a" /* default */])(b)) return false;
    className = tagDataView;
  }
  switch (className) {
    // These types are compared by value.
    case '[object RegExp]':
      // RegExps are coerced to strings for comparison (Note: '' + /a/i === '/a/i')
    case '[object String]':
      // Primitives and their corresponding object wrappers are equivalent; thus, `"5"` is
      // equivalent to `new String("5")`.
      return '' + a === '' + b;
    case '[object Number]':
      // `NaN`s are equivalent, but non-reflexive.
      // Object(NaN) is equivalent to NaN.
      if (+a !== +a) return +b !== +b;
      // An `egal` comparison is performed for other numeric values.
      return +a === 0 ? 1 / +a === 1 / b : +a === +b;
    case '[object Date]':
    case '[object Boolean]':
      // Coerce dates and booleans to numeric primitive values. Dates are compared by their
      // millisecond representations. Note that invalid dates with millisecond representations
      // of `NaN` are not equivalent.
      return +a === +b;
    case '[object Symbol]':
      return __WEBPACK_IMPORTED_MODULE_1__setup_js__["d" /* SymbolProto */].valueOf.call(a) === __WEBPACK_IMPORTED_MODULE_1__setup_js__["d" /* SymbolProto */].valueOf.call(b);
    case '[object ArrayBuffer]':
    case tagDataView:
      // Coerce to typed array so we can fall through.
      return deepEq(Object(__WEBPACK_IMPORTED_MODULE_9__toBufferView_js__["a" /* default */])(a), Object(__WEBPACK_IMPORTED_MODULE_9__toBufferView_js__["a" /* default */])(b), aStack, bStack);
  }
 
  var areArrays = className === '[object Array]';
  Iif (!areArrays && Object(__WEBPACK_IMPORTED_MODULE_3__isTypedArray_js__["a" /* default */])(a)) {
      var byteLength = Object(__WEBPACK_IMPORTED_MODULE_2__getByteLength_js__["a" /* default */])(a);
      if (byteLength !== Object(__WEBPACK_IMPORTED_MODULE_2__getByteLength_js__["a" /* default */])(b)) return false;
      if (a.buffer === b.buffer && a.byteOffset === b.byteOffset) return true;
      areArrays = true;
  }
  if (!areArrays) {
    Iif (typeof a != 'object' || typeof b != 'object') return false;
 
    // Objects with different constructors are not equivalent, but `Object`s or `Array`s
    // from different frames are.
    var aCtor = a.constructor, bCtor = b.constructor;
    Iif (aCtor !== bCtor && !(Object(__WEBPACK_IMPORTED_MODULE_4__isFunction_js__["a" /* default */])(aCtor) && aCtor instanceof aCtor &&
                             Object(__WEBPACK_IMPORTED_MODULE_4__isFunction_js__["a" /* default */])(bCtor) && bCtor instanceof bCtor)
                        && ('constructor' in a && 'constructor' in b)) {
      return false;
    }
  }
  // Assume equality for cyclic structures. The algorithm for detecting cyclic
  // structures is adapted from ES 5.1 section 15.12.3, abstract operation `JO`.
 
  // Initializing stack of traversed objects.
  // It's done here since we only need them for objects and arrays comparison.
  aStack = aStack || [];
  bStack = bStack || [];
  var length = aStack.length;
  while (length--) {
    // Linear search. Performance is inversely proportional to the number of
    // unique nested structures.
    if (aStack[length] === a) return bStack[length] === b;
  }
 
  // Add the first object to the stack of traversed objects.
  aStack.push(a);
  bStack.push(b);
 
  // Recursively compare objects and arrays.
  if (areArrays) {
    // Compare array lengths to determine if a deep comparison is necessary.
    length = a.length;
    if (length !== b.length) return false;
    // Deep compare the contents, ignoring non-numeric properties.
    while (length--) {
      if (!eq(a[length], b[length], aStack, bStack)) return false;
    }
  } else {
    // Deep compare objects.
    var _keys = Object(__WEBPACK_IMPORTED_MODULE_7__keys_js__["a" /* default */])(a), key;
    length = _keys.length;
    // Ensure that both objects contain the same number of properties before comparing deep equality.
    if (Object(__WEBPACK_IMPORTED_MODULE_7__keys_js__["a" /* default */])(b).length !== length) return false;
    while (length--) {
      // Deep compare each member
      key = _keys[length];
      Iif (!(Object(__WEBPACK_IMPORTED_MODULE_8__has_js__["a" /* default */])(b, key) && eq(a[key], b[key], aStack, bStack))) return false;
    }
  }
  // Remove the first object from the stack of traversed objects.
  aStack.pop();
  bStack.pop();
  return true;
}
 
// Perform a deep comparison to check if two objects are equal.
function isEqual(a, b) {
  return eq(a, b);
}
 
 
/***/ }),
/* 883 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = toBufferView;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__getByteLength_js__ = __webpack_require__(281);
 
 
// Internal function to wrap or shallow-copy an ArrayBuffer,
// typed array or DataView to a new view, reusing the buffer.
function toBufferView(bufferSource) {
  return new Uint8Array(
    bufferSource.buffer || bufferSource,
    bufferSource.byteOffset || 0,
    Object(__WEBPACK_IMPORTED_MODULE_0__getByteLength_js__["a" /* default */])(bufferSource)
  );
}
 
 
/***/ }),
/* 884 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__tagTester_js__ = __webpack_require__(46);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__stringTagBug_js__ = __webpack_require__(159);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__methodFingerprint_js__ = __webpack_require__(282);
 
 
 
 
/* harmony default export */ __webpack_exports__["a"] = (__WEBPACK_IMPORTED_MODULE_1__stringTagBug_js__["b" /* isIE11 */] ? Object(__WEBPACK_IMPORTED_MODULE_2__methodFingerprint_js__["a" /* ie11fingerprint */])(__WEBPACK_IMPORTED_MODULE_2__methodFingerprint_js__["b" /* mapMethods */]) : Object(__WEBPACK_IMPORTED_MODULE_0__tagTester_js__["a" /* default */])('Map'));
 
 
/***/ }),
/* 885 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__tagTester_js__ = __webpack_require__(46);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__stringTagBug_js__ = __webpack_require__(159);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__methodFingerprint_js__ = __webpack_require__(282);
 
 
 
 
/* harmony default export */ __webpack_exports__["a"] = (__WEBPACK_IMPORTED_MODULE_1__stringTagBug_js__["b" /* isIE11 */] ? Object(__WEBPACK_IMPORTED_MODULE_2__methodFingerprint_js__["a" /* ie11fingerprint */])(__WEBPACK_IMPORTED_MODULE_2__methodFingerprint_js__["d" /* weakMapMethods */]) : Object(__WEBPACK_IMPORTED_MODULE_0__tagTester_js__["a" /* default */])('WeakMap'));
 
 
/***/ }),
/* 886 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__tagTester_js__ = __webpack_require__(46);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__stringTagBug_js__ = __webpack_require__(159);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__methodFingerprint_js__ = __webpack_require__(282);
 
 
 
 
/* harmony default export */ __webpack_exports__["a"] = (__WEBPACK_IMPORTED_MODULE_1__stringTagBug_js__["b" /* isIE11 */] ? Object(__WEBPACK_IMPORTED_MODULE_2__methodFingerprint_js__["a" /* ie11fingerprint */])(__WEBPACK_IMPORTED_MODULE_2__methodFingerprint_js__["c" /* setMethods */]) : Object(__WEBPACK_IMPORTED_MODULE_0__tagTester_js__["a" /* default */])('Set'));
 
 
/***/ }),
/* 887 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__tagTester_js__ = __webpack_require__(46);
 
 
/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__tagTester_js__["a" /* default */])('WeakSet'));
 
 
/***/ }),
/* 888 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = pairs;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__keys_js__ = __webpack_require__(41);
 
 
// Convert an object into a list of `[key, value]` pairs.
// The opposite of `_.object` with one argument.
function pairs(obj) {
  var _keys = Object(__WEBPACK_IMPORTED_MODULE_0__keys_js__["a" /* default */])(obj);
  var length = _keys.length;
  var pairs = Array(length);
  for (var i = 0; i < length; i++) {
    pairs[i] = [_keys[i], obj[_keys[i]]];
  }
  return pairs;
}
 
 
/***/ }),
/* 889 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = create;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseCreate_js__ = __webpack_require__(432);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__extendOwn_js__ = __webpack_require__(284);
 
 
 
// Creates an object that inherits from the given prototype object.
// If additional properties are provided then they will be added to the
// created object.
function create(prototype, props) {
  var result = Object(__WEBPACK_IMPORTED_MODULE_0__baseCreate_js__["a" /* default */])(prototype);
  if (props) Object(__WEBPACK_IMPORTED_MODULE_1__extendOwn_js__["a" /* default */])(result, props);
  return result;
}
 
 
/***/ }),
/* 890 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = tap;
// Invokes `interceptor` with the `obj` and then returns `obj`.
// The primary purpose of this method is to "tap into" a method chain, in
// order to perform operations on intermediate results within the chain.
function tap(obj, interceptor) {
  interceptor(obj);
  return obj;
}
 
 
/***/ }),
/* 891 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = has;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__has_js__ = __webpack_require__(95);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__toPath_js__ = __webpack_require__(161);
 
 
 
// Shortcut function for checking if an object has a given property directly on
// itself (in other words, not on a prototype). Unlike the internal `has`
// function, this public version can also traverse nested properties.
function has(obj, path) {
  path = Object(__WEBPACK_IMPORTED_MODULE_1__toPath_js__["a" /* default */])(path);
  var length = path.length;
  for (var i = 0; i < length; i++) {
    var key = path[i];
    Iif (!Object(__WEBPACK_IMPORTED_MODULE_0__has_js__["a" /* default */])(obj, key)) return false;
    obj = obj[key];
  }
  return !!length;
}
 
 
/***/ }),
/* 892 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = mapObject;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__cb_js__ = __webpack_require__(53);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__keys_js__ = __webpack_require__(41);
 
 
 
// Returns the results of applying the `iteratee` to each element of `obj`.
// In contrast to `_.map` it returns an object.
function mapObject(obj, iteratee, context) {
  iteratee = Object(__WEBPACK_IMPORTED_MODULE_0__cb_js__["a" /* default */])(iteratee, context);
  var _keys = Object(__WEBPACK_IMPORTED_MODULE_1__keys_js__["a" /* default */])(obj),
      length = _keys.length,
      results = {};
  for (var index = 0; index < length; index++) {
    var currentKey = _keys[index];
    results[currentKey] = iteratee(obj[currentKey], currentKey, obj);
  }
  return results;
}
 
 
/***/ }),
/* 893 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = propertyOf;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__noop_js__ = __webpack_require__(438);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__get_js__ = __webpack_require__(434);
 
 
 
// Generates a function for a given object that returns a given property.
function propertyOf(obj) {
  if (obj == null) return __WEBPACK_IMPORTED_MODULE_0__noop_js__["a" /* default */];
  return function(path) {
    return Object(__WEBPACK_IMPORTED_MODULE_1__get_js__["a" /* default */])(obj, path);
  };
}
 
 
/***/ }),
/* 894 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = times;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__optimizeCb_js__ = __webpack_require__(162);
 
 
// Run a function **n** times.
function times(n, iteratee, context) {
  var accum = Array(Math.max(0, n));
  iteratee = Object(__WEBPACK_IMPORTED_MODULE_0__optimizeCb_js__["a" /* default */])(iteratee, context, 1);
  for (var i = 0; i < n; i++) accum[i] = iteratee(i);
  return accum;
}
 
 
/***/ }),
/* 895 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createEscaper_js__ = __webpack_require__(440);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__escapeMap_js__ = __webpack_require__(441);
 
 
 
// Function for escaping strings to HTML interpolation.
/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__createEscaper_js__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__escapeMap_js__["a" /* default */]));
 
 
/***/ }),
/* 896 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createEscaper_js__ = __webpack_require__(440);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__unescapeMap_js__ = __webpack_require__(897);
 
 
 
// Function for unescaping strings from HTML interpolation.
/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__createEscaper_js__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__unescapeMap_js__["a" /* default */]));
 
 
/***/ }),
/* 897 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__invert_js__ = __webpack_require__(428);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__escapeMap_js__ = __webpack_require__(441);
 
 
 
// Internal list of HTML entities for unescaping.
/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__invert_js__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__escapeMap_js__["a" /* default */]));
 
 
/***/ }),
/* 898 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = template;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__defaults_js__ = __webpack_require__(431);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__underscore_js__ = __webpack_require__(59);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__templateSettings_js__ = __webpack_require__(442);
 
 
 
 
// When customizing `_.templateSettings`, if you don't want to define an
// interpolation, evaluation or escaping regex, we need one that is
// guaranteed not to match.
var noMatch = /(.)^/;
 
// Certain characters need to be escaped so that they can be put into a
// string literal.
var escapes = {
  "'": "'",
  '\\': '\\',
  '\r': 'r',
  '\n': 'n',
  '\u2028': 'u2028',
  '\u2029': 'u2029'
};
 
var escapeRegExp = /\\|'|\r|\n|\u2028|\u2029/g;
 
function escapeChar(match) {
  return '\\' + escapes[match];
}
 
// In order to prevent third-party code injection through
// `_.templateSettings.variable`, we test it against the following regular
// expression. It is intentionally a bit more liberal than just matching valid
// identifiers, but still prevents possible loopholes through defaults or
// destructuring assignment.
var bareIdentifier = /^\s*(\w|\$)+\s*$/;
 
// JavaScript micro-templating, similar to John Resig's implementation.
// Underscore templating handles arbitrary delimiters, preserves whitespace,
// and correctly escapes quotes within interpolated code.
// NB: `oldSettings` only exists for backwards compatibility.
function template(text, settings, oldSettings) {
  Iif (!settings && oldSettings) settings = oldSettings;
  settings = Object(__WEBPACK_IMPORTED_MODULE_0__defaults_js__["a" /* default */])({}, settings, __WEBPACK_IMPORTED_MODULE_1__underscore_js__["a" /* default */].templateSettings);
 
  // Combine delimiters into one regular expression via alternation.
  var matcher = RegExp([
    (settings.escape || noMatch).source,
    (settings.interpolate || noMatch).source,
    (settings.evaluate || noMatch).source
  ].join('|') + '|$', 'g');
 
  // Compile the template source, escaping string literals appropriately.
  var index = 0;
  var source = "__p+='";
  text.replace(matcher, function(match, escape, interpolate, evaluate, offset) {
    source += text.slice(index, offset).replace(escapeRegExp, escapeChar);
    index = offset + match.length;
 
    Iif (escape) {
      source += "'+\n((__t=(" + escape + "))==null?'':_.escape(__t))+\n'";
    } else if (interpolate) {
      source += "'+\n((__t=(" + interpolate + "))==null?'':__t)+\n'";
    } else Iif (evaluate) {
      source += "';\n" + evaluate + "\n__p+='";
    }
 
    // Adobe VMs need the match returned to produce the correct offset.
    return match;
  });
  source += "';\n";
 
  var argument = settings.variable;
  Iif (argument) {
    // Insure against third-party code injection. (CVE-2021-23358)
    if (!bareIdentifier.test(argument)) throw new Error(
      'variable is not a bare identifier: ' + argument
    );
  } else {
    // If a variable is not specified, place data values in local scope.
    source = 'with(obj||{}){\n' + source + '}\n';
    argument = 'obj';
  }
 
  source = "var __t,__p='',__j=Array.prototype.join," +
    "print=function(){__p+=__j.call(arguments,'');};\n" +
    source + 'return __p;\n';
 
  var render;
  try {
    render = new Function(argument, '_', source);
  } catch (e) {
    e.source = source;
    throw e;
  }
 
  var template = function(data) {
    return render.call(this, data, __WEBPACK_IMPORTED_MODULE_1__underscore_js__["a" /* default */]);
  };
 
  // Provide the compiled source as a convenience for precompilation.
  template.source = 'function(' + argument + '){\n' + source + '}';
 
  return template;
}
 
 
/***/ }),
/* 899 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = result;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isFunction_js__ = __webpack_require__(64);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__toPath_js__ = __webpack_require__(161);
 
 
 
// Traverses the children of `obj` along `path`. If a child is a function, it
// is invoked with its parent as context. Returns the value of the final
// child, or `fallback` if any child is undefined.
function result(obj, path, fallback) {
  path = Object(__WEBPACK_IMPORTED_MODULE_1__toPath_js__["a" /* default */])(path);
  var length = path.length;
  if (!length) {
    return Object(__WEBPACK_IMPORTED_MODULE_0__isFunction_js__["a" /* default */])(fallback) ? fallback.call(obj) : fallback;
  }
  for (var i = 0; i < length; i++) {
    var prop = obj == null ? void 0 : obj[path[i]];
    if (prop === void 0) {
      prop = fallback;
      i = length; // Ensure we don't continue iterating.
    }
    obj = Object(__WEBPACK_IMPORTED_MODULE_0__isFunction_js__["a" /* default */])(prop) ? prop.call(obj) : prop;
  }
  return obj;
}
 
 
/***/ }),
/* 900 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = uniqueId;
// Generate a unique integer id (unique within the entire client session).
// Useful for temporary DOM ids.
var idCounter = 0;
function uniqueId(prefix) {
  var id = ++idCounter + '';
  return prefix ? prefix + id : id;
}
 
 
/***/ }),
/* 901 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = chain;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__underscore_js__ = __webpack_require__(59);
 
 
// Start chaining a wrapped Underscore object.
function chain(obj) {
  var instance = Object(__WEBPACK_IMPORTED_MODULE_0__underscore_js__["a" /* default */])(obj);
  instance._chain = true;
  return instance;
}
 
 
/***/ }),
/* 902 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__restArguments_js__ = __webpack_require__(58);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__flatten_js__ = __webpack_require__(130);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__bind_js__ = __webpack_require__(444);
 
 
 
 
// Bind a number of an object's methods to that object. Remaining arguments
// are the method names to be bound. Useful for ensuring that all callbacks
// defined on an object belong to it.
/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__restArguments_js__["a" /* default */])(function(obj, keys) {
  keys = Object(__WEBPACK_IMPORTED_MODULE_1__flatten_js__["a" /* default */])(keys, false, false);
  var index = keys.length;
  if (index < 1) throw new Error('bindAll must be passed function names');
  while (index--) {
    var key = keys[index];
    obj[key] = Object(__WEBPACK_IMPORTED_MODULE_2__bind_js__["a" /* default */])(obj[key], obj);
  }
  return obj;
}));
 
 
/***/ }),
/* 903 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = memoize;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__has_js__ = __webpack_require__(95);
 
 
// Memoize an expensive function by storing its results.
function memoize(func, hasher) {
  var memoize = function(key) {
    var cache = memoize.cache;
    var address = '' + (hasher ? hasher.apply(this, arguments) : key);
    if (!Object(__WEBPACK_IMPORTED_MODULE_0__has_js__["a" /* default */])(cache, address)) cache[address] = func.apply(this, arguments);
    return cache[address];
  };
  memoize.cache = {};
  return memoize;
}
 
 
/***/ }),
/* 904 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__partial_js__ = __webpack_require__(210);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__delay_js__ = __webpack_require__(445);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__underscore_js__ = __webpack_require__(59);
 
 
 
 
// Defers a function, scheduling it to run after the current call stack has
// cleared.
/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__partial_js__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__delay_js__["a" /* default */], __WEBPACK_IMPORTED_MODULE_2__underscore_js__["a" /* default */], 1));
 
 
/***/ }),
/* 905 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = throttle;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__now_js__ = __webpack_require__(288);
 
 
// Returns a function, that, when invoked, will only be triggered at most once
// during a given window of time. Normally, the throttled function will run
// as much as it can, without ever going more than once per `wait` duration;
// but if you'd like to disable the execution on the leading edge, pass
// `{leading: false}`. To disable execution on the trailing edge, ditto.
function throttle(func, wait, options) {
  var timeout, context, args, result;
  var previous = 0;
  Iif (!options) options = {};
 
  var later = function() {
    previous = options.leading === false ? 0 : Object(__WEBPACK_IMPORTED_MODULE_0__now_js__["a" /* default */])();
    timeout = null;
    result = func.apply(context, args);
    Eif (!timeout) context = args = null;
  };
 
  var throttled = function() {
    var _now = Object(__WEBPACK_IMPORTED_MODULE_0__now_js__["a" /* default */])();
    Iif (!previous && options.leading === false) previous = _now;
    var remaining = wait - (_now - previous);
    context = this;
    args = arguments;
    if (remaining <= 0 || remaining > wait) {
      Iif (timeout) {
        clearTimeout(timeout);
        timeout = null;
      }
      previous = _now;
      result = func.apply(context, args);
      Eif (!timeout) context = args = null;
    } else Eif (!timeout && options.trailing !== false) {
      timeout = setTimeout(later, remaining);
    }
    return result;
  };
 
  throttled.cancel = function() {
    clearTimeout(timeout);
    previous = 0;
    timeout = context = args = null;
  };
 
  return throttled;
}
 
 
/***/ }),
/* 906 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = debounce;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__restArguments_js__ = __webpack_require__(58);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__now_js__ = __webpack_require__(288);
 
 
 
// When a sequence of calls of the returned function ends, the argument
// function is triggered. The end of a sequence is defined by the `wait`
// parameter. If `immediate` is passed, the argument function will be
// triggered at the beginning of the sequence instead of at the end.
function debounce(func, wait, immediate) {
  var timeout, previous, args, result, context;
 
  var later = function() {
    var passed = Object(__WEBPACK_IMPORTED_MODULE_1__now_js__["a" /* default */])() - previous;
    Iif (wait > passed) {
      timeout = setTimeout(later, wait - passed);
    } else {
      timeout = null;
      if (!immediate) result = func.apply(context, args);
      // This check is needed because `func` can recursively invoke `debounced`.
      Eif (!timeout) args = context = null;
    }
  };
 
  var debounced = Object(__WEBPACK_IMPORTED_MODULE_0__restArguments_js__["a" /* default */])(function(_args) {
    context = this;
    args = _args;
    previous = Object(__WEBPACK_IMPORTED_MODULE_1__now_js__["a" /* default */])();
    if (!timeout) {
      timeout = setTimeout(later, wait);
      if (immediate) result = func.apply(context, args);
    }
    return result;
  });
 
  debounced.cancel = function() {
    clearTimeout(timeout);
    timeout = args = context = null;
  };
 
  return debounced;
}
 
 
/***/ }),
/* 907 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = wrap;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__partial_js__ = __webpack_require__(210);
 
 
// Returns the first function passed as an argument to the second,
// allowing you to adjust arguments, run code before and after, and
// conditionally execute the original function.
function wrap(func, wrapper) {
  return Object(__WEBPACK_IMPORTED_MODULE_0__partial_js__["a" /* default */])(wrapper, func);
}
 
 
/***/ }),
/* 908 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = compose;
// Returns a function that is the composition of a list of functions, each
// consuming the return value of the function that follows.
function compose() {
  var args = arguments;
  var start = args.length - 1;
  return function() {
    var i = start;
    var result = args[start].apply(this, arguments);
    while (i--) result = args[i].call(this, result);
    return result;
  };
}
 
 
/***/ }),
/* 909 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = after;
// Returns a function that will only be executed on and after the Nth call.
function after(times, func) {
  return function() {
    if (--times < 1) {
      return func.apply(this, arguments);
    }
  };
}
 
 
/***/ }),
/* 910 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__partial_js__ = __webpack_require__(210);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__before_js__ = __webpack_require__(446);
 
 
 
// Returns a function that will be executed at most one time, no matter how
// often you call it. Useful for lazy initialization.
/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__partial_js__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__before_js__["a" /* default */], 2));
 
 
/***/ }),
/* 911 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__findLastIndex_js__ = __webpack_require__(449);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__createIndexFinder_js__ = __webpack_require__(452);
 
 
 
// Return the position of the last occurrence of an item in an array,
// or -1 if the item is not included in the array.
/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_1__createIndexFinder_js__["a" /* default */])(-1, __WEBPACK_IMPORTED_MODULE_0__findLastIndex_js__["a" /* default */]));
 
 
/***/ }),
/* 912 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = findWhere;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__find_js__ = __webpack_require__(453);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__matcher_js__ = __webpack_require__(209);
 
 
 
// Convenience version of a common use case of `_.find`: getting the first
// object containing specific `key:value` pairs.
function findWhere(obj, attrs) {
  return Object(__WEBPACK_IMPORTED_MODULE_0__find_js__["a" /* default */])(obj, Object(__WEBPACK_IMPORTED_MODULE_1__matcher_js__["a" /* default */])(attrs));
}
 
 
/***/ }),
/* 913 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createReduce_js__ = __webpack_require__(454);
 
 
// **Reduce** builds up a single result from a list of values, aka `inject`,
// or `foldl`.
/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__createReduce_js__["a" /* default */])(1));
 
 
/***/ }),
/* 914 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createReduce_js__ = __webpack_require__(454);
 
 
// The right-associative version of reduce, also known as `foldr`.
/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__createReduce_js__["a" /* default */])(-1));
 
 
/***/ }),
/* 915 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = reject;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__filter_js__ = __webpack_require__(163);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__negate_js__ = __webpack_require__(289);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__cb_js__ = __webpack_require__(53);
 
 
 
 
// Return all the elements for which a truth test fails.
function reject(obj, predicate, context) {
  return Object(__WEBPACK_IMPORTED_MODULE_0__filter_js__["a" /* default */])(obj, Object(__WEBPACK_IMPORTED_MODULE_1__negate_js__["a" /* default */])(Object(__WEBPACK_IMPORTED_MODULE_2__cb_js__["a" /* default */])(predicate)), context);
}
 
 
/***/ }),
/* 916 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = every;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__cb_js__ = __webpack_require__(53);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isArrayLike_js__ = __webpack_require__(60);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__keys_js__ = __webpack_require__(41);
 
 
 
 
// Determine whether all of the elements pass a truth test.
function every(obj, predicate, context) {
  predicate = Object(__WEBPACK_IMPORTED_MODULE_0__cb_js__["a" /* default */])(predicate, context);
  var _keys = !Object(__WEBPACK_IMPORTED_MODULE_1__isArrayLike_js__["a" /* default */])(obj) && Object(__WEBPACK_IMPORTED_MODULE_2__keys_js__["a" /* default */])(obj),
      length = (_keys || obj).length;
  for (var index = 0; index < length; index++) {
    var currentKey = _keys ? _keys[index] : index;
    if (!predicate(obj[currentKey], currentKey, obj)) return false;
  }
  return true;
}
 
 
/***/ }),
/* 917 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = some;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__cb_js__ = __webpack_require__(53);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isArrayLike_js__ = __webpack_require__(60);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__keys_js__ = __webpack_require__(41);
 
 
 
 
// Determine if at least one element in the object passes a truth test.
function some(obj, predicate, context) {
  predicate = Object(__WEBPACK_IMPORTED_MODULE_0__cb_js__["a" /* default */])(predicate, context);
  var _keys = !Object(__WEBPACK_IMPORTED_MODULE_1__isArrayLike_js__["a" /* default */])(obj) && Object(__WEBPACK_IMPORTED_MODULE_2__keys_js__["a" /* default */])(obj),
      length = (_keys || obj).length;
  for (var index = 0; index < length; index++) {
    var currentKey = _keys ? _keys[index] : index;
    if (predicate(obj[currentKey], currentKey, obj)) return true;
  }
  return false;
}
 
 
/***/ }),
/* 918 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__restArguments_js__ = __webpack_require__(58);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isFunction_js__ = __webpack_require__(64);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__map_js__ = __webpack_require__(131);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__deepGet_js__ = __webpack_require__(285);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__toPath_js__ = __webpack_require__(161);
 
 
 
 
 
 
// Invoke a method (with arguments) on every item in a collection.
/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__restArguments_js__["a" /* default */])(function(obj, path, args) {
  var contextPath, func;
  if (Object(__WEBPACK_IMPORTED_MODULE_1__isFunction_js__["a" /* default */])(path)) {
    func = path;
  } else {
    path = Object(__WEBPACK_IMPORTED_MODULE_4__toPath_js__["a" /* default */])(path);
    contextPath = path.slice(0, -1);
    path = path[path.length - 1];
  }
  return Object(__WEBPACK_IMPORTED_MODULE_2__map_js__["a" /* default */])(obj, function(context) {
    var method = func;
    if (!method) {
      if (contextPath && contextPath.length) {
        context = Object(__WEBPACK_IMPORTED_MODULE_3__deepGet_js__["a" /* default */])(context, contextPath);
      }
      if (context == null) return void 0;
      method = context[path];
    }
    return method == null ? method : method.apply(context, args);
  });
}));
 
 
/***/ }),
/* 919 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = where;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__filter_js__ = __webpack_require__(163);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__matcher_js__ = __webpack_require__(209);
 
 
 
// Convenience version of a common use case of `_.filter`: selecting only
// objects containing specific `key:value` pairs.
function where(obj, attrs) {
  return Object(__WEBPACK_IMPORTED_MODULE_0__filter_js__["a" /* default */])(obj, Object(__WEBPACK_IMPORTED_MODULE_1__matcher_js__["a" /* default */])(attrs));
}
 
 
/***/ }),
/* 920 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = min;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isArrayLike_js__ = __webpack_require__(60);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__values_js__ = __webpack_require__(129);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__cb_js__ = __webpack_require__(53);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__each_js__ = __webpack_require__(107);
 
 
 
 
 
// Return the minimum element (or element-based computation).
function min(obj, iteratee, context) {
  var result = Infinity, lastComputed = Infinity,
      value, computed;
  if (iteratee == null || typeof iteratee == 'number' && typeof obj[0] != 'object' && obj != null) {
    obj = Object(__WEBPACK_IMPORTED_MODULE_0__isArrayLike_js__["a" /* default */])(obj) ? obj : Object(__WEBPACK_IMPORTED_MODULE_1__values_js__["a" /* default */])(obj);
    for (var i = 0, length = obj.length; i < length; i++) {
      value = obj[i];
      if (value != null && value < result) {
        result = value;
      }
    }
  } else {
    iteratee = Object(__WEBPACK_IMPORTED_MODULE_2__cb_js__["a" /* default */])(iteratee, context);
    Object(__WEBPACK_IMPORTED_MODULE_3__each_js__["a" /* default */])(obj, function(v, index, list) {
      computed = iteratee(v, index, list);
      if (computed < lastComputed || computed === Infinity && result === Infinity) {
        result = v;
        lastComputed = computed;
      }
    });
  }
  return result;
}
 
 
/***/ }),
/* 921 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = shuffle;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__sample_js__ = __webpack_require__(456);
 
 
// Shuffle a collection.
function shuffle(obj) {
  return Object(__WEBPACK_IMPORTED_MODULE_0__sample_js__["a" /* default */])(obj, Infinity);
}
 
 
/***/ }),
/* 922 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = sortBy;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__cb_js__ = __webpack_require__(53);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__pluck_js__ = __webpack_require__(291);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__map_js__ = __webpack_require__(131);
 
 
 
 
// Sort the object's values by a criterion produced by an iteratee.
function sortBy(obj, iteratee, context) {
  var index = 0;
  iteratee = Object(__WEBPACK_IMPORTED_MODULE_0__cb_js__["a" /* default */])(iteratee, context);
  return Object(__WEBPACK_IMPORTED_MODULE_1__pluck_js__["a" /* default */])(Object(__WEBPACK_IMPORTED_MODULE_2__map_js__["a" /* default */])(obj, function(value, key, list) {
    return {
      value: value,
      index: index++,
      criteria: iteratee(value, key, list)
    };
  }).sort(function(left, right) {
    var a = left.criteria;
    var b = right.criteria;
    if (a !== b) {
      if (a > b || a === void 0) return 1;
      Eif (a < b || b === void 0) return -1;
    }
    return left.index - right.index;
  }), 'value');
}
 
 
/***/ }),
/* 923 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__group_js__ = __webpack_require__(211);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__has_js__ = __webpack_require__(95);
 
 
 
// Groups the object's values by a criterion. Pass either a string attribute
// to group by, or a function that returns the criterion.
/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__group_js__["a" /* default */])(function(result, value, key) {
  if (Object(__WEBPACK_IMPORTED_MODULE_1__has_js__["a" /* default */])(result, key)) result[key].push(value); else result[key] = [value];
}));
 
 
/***/ }),
/* 924 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__group_js__ = __webpack_require__(211);
 
 
// Indexes the object's values by a criterion, similar to `_.groupBy`, but for
// when you know that your index values will be unique.
/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__group_js__["a" /* default */])(function(result, value, key) {
  result[key] = value;
}));
 
 
/***/ }),
/* 925 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__group_js__ = __webpack_require__(211);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__has_js__ = __webpack_require__(95);
 
 
 
// Counts instances of an object that group by a certain criterion. Pass
// either a string attribute to count by, or a function that returns the
// criterion.
/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__group_js__["a" /* default */])(function(result, value, key) {
  if (Object(__WEBPACK_IMPORTED_MODULE_1__has_js__["a" /* default */])(result, key)) result[key]++; else result[key] = 1;
}));
 
 
/***/ }),
/* 926 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__group_js__ = __webpack_require__(211);
 
 
// Split a collection into two arrays: one whose elements all pass the given
// truth test, and one whose elements all do not pass the truth test.
/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__group_js__["a" /* default */])(function(result, value, pass) {
  result[pass ? 0 : 1].push(value);
}, true));
 
 
/***/ }),
/* 927 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = toArray;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isArray_js__ = __webpack_require__(106);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__setup_js__ = __webpack_require__(30);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isString_js__ = __webpack_require__(278);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__isArrayLike_js__ = __webpack_require__(60);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__map_js__ = __webpack_require__(131);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__identity_js__ = __webpack_require__(286);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__values_js__ = __webpack_require__(129);
 
 
 
 
 
 
 
 
// Safely create a real, live array from anything iterable.
var reStrSymbol = /[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g;
function toArray(obj) {
  Iif (!obj) return [];
  Iif (Object(__WEBPACK_IMPORTED_MODULE_0__isArray_js__["a" /* default */])(obj)) return __WEBPACK_IMPORTED_MODULE_1__setup_js__["q" /* slice */].call(obj);
  Iif (Object(__WEBPACK_IMPORTED_MODULE_2__isString_js__["a" /* default */])(obj)) {
    // Keep surrogate pair characters together.
    return obj.match(reStrSymbol);
  }
  Eif (Object(__WEBPACK_IMPORTED_MODULE_3__isArrayLike_js__["a" /* default */])(obj)) return Object(__WEBPACK_IMPORTED_MODULE_4__map_js__["a" /* default */])(obj, __WEBPACK_IMPORTED_MODULE_5__identity_js__["a" /* default */]);
  return Object(__WEBPACK_IMPORTED_MODULE_6__values_js__["a" /* default */])(obj);
}
 
 
/***/ }),
/* 928 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = size;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isArrayLike_js__ = __webpack_require__(60);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__keys_js__ = __webpack_require__(41);
 
 
 
// Return the number of elements in a collection.
function size(obj) {
  Iif (obj == null) return 0;
  return Object(__WEBPACK_IMPORTED_MODULE_0__isArrayLike_js__["a" /* default */])(obj) ? obj.length : Object(__WEBPACK_IMPORTED_MODULE_1__keys_js__["a" /* default */])(obj).length;
}
 
 
/***/ }),
/* 929 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = keyInObj;
// Internal `_.pick` helper function to determine whether `key` is an enumerable
// property name of `obj`.
function keyInObj(value, key, obj) {
  return key in obj;
}
 
 
/***/ }),
/* 930 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__restArguments_js__ = __webpack_require__(58);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isFunction_js__ = __webpack_require__(64);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__negate_js__ = __webpack_require__(289);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__map_js__ = __webpack_require__(131);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__flatten_js__ = __webpack_require__(130);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__contains_js__ = __webpack_require__(164);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__pick_js__ = __webpack_require__(457);
 
 
 
 
 
 
 
 
// Return a copy of the object without the disallowed properties.
/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__restArguments_js__["a" /* default */])(function(obj, keys) {
  var iteratee = keys[0], context;
  if (Object(__WEBPACK_IMPORTED_MODULE_1__isFunction_js__["a" /* default */])(iteratee)) {
    iteratee = Object(__WEBPACK_IMPORTED_MODULE_2__negate_js__["a" /* default */])(iteratee);
    Iif (keys.length > 1) context = keys[1];
  } else {
    keys = Object(__WEBPACK_IMPORTED_MODULE_3__map_js__["a" /* default */])(Object(__WEBPACK_IMPORTED_MODULE_4__flatten_js__["a" /* default */])(keys, false, false), String);
    iteratee = function(value, key) {
      return !Object(__WEBPACK_IMPORTED_MODULE_5__contains_js__["a" /* default */])(keys, key);
    };
  }
  return Object(__WEBPACK_IMPORTED_MODULE_6__pick_js__["a" /* default */])(obj, iteratee, context);
}));
 
 
/***/ }),
/* 931 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = first;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__initial_js__ = __webpack_require__(458);
 
 
// Get the first element of an array. Passing **n** will return the first N
// values in the array. The **guard** check allows it to work with `_.map`.
function first(array, n, guard) {
  if (array == null || array.length < 1) return n == null || guard ? void 0 : [];
  if (n == null || guard) return array[0];
  return Object(__WEBPACK_IMPORTED_MODULE_0__initial_js__["a" /* default */])(array, array.length - n);
}
 
 
/***/ }),
/* 932 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = last;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__rest_js__ = __webpack_require__(459);
 
 
// Get the last element of an array. Passing **n** will return the last N
// values in the array.
function last(array, n, guard) {
  if (array == null || array.length < 1) return n == null || guard ? void 0 : [];
  if (n == null || guard) return array[array.length - 1];
  return Object(__WEBPACK_IMPORTED_MODULE_0__rest_js__["a" /* default */])(array, Math.max(0, array.length - n));
}
 
 
/***/ }),
/* 933 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = compact;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__filter_js__ = __webpack_require__(163);
 
 
// Trim out all falsy values from an array.
function compact(array) {
  return Object(__WEBPACK_IMPORTED_MODULE_0__filter_js__["a" /* default */])(array, Boolean);
}
 
 
/***/ }),
/* 934 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = flatten;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__flatten_js__ = __webpack_require__(130);
 
 
// Flatten out an array, either recursively (by default), or up to `depth`.
// Passing `true` or `false` as `depth` means `1` or `Infinity`, respectively.
function flatten(array, depth) {
  return Object(__WEBPACK_IMPORTED_MODULE_0__flatten_js__["a" /* default */])(array, depth, false);
}
 
 
/***/ }),
/* 935 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__restArguments_js__ = __webpack_require__(58);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__difference_js__ = __webpack_require__(460);
 
 
 
// Return a version of the array that does not contain the specified value(s).
/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__restArguments_js__["a" /* default */])(function(array, otherArrays) {
  return Object(__WEBPACK_IMPORTED_MODULE_1__difference_js__["a" /* default */])(array, otherArrays);
}));
 
 
/***/ }),
/* 936 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__restArguments_js__ = __webpack_require__(58);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__uniq_js__ = __webpack_require__(461);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__flatten_js__ = __webpack_require__(130);
 
 
 
 
// Produce an array that contains the union: each distinct element from all of
// the passed-in arrays.
/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__restArguments_js__["a" /* default */])(function(arrays) {
  return Object(__WEBPACK_IMPORTED_MODULE_1__uniq_js__["a" /* default */])(Object(__WEBPACK_IMPORTED_MODULE_2__flatten_js__["a" /* default */])(arrays, true, true));
}));
 
 
/***/ }),
/* 937 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = intersection;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__getLength_js__ = __webpack_require__(65);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__contains_js__ = __webpack_require__(164);
 
 
 
// Produce an array that contains every item shared between all the
// passed-in arrays.
function intersection(array) {
  var result = [];
  var argsLength = arguments.length;
  for (var i = 0, length = Object(__WEBPACK_IMPORTED_MODULE_0__getLength_js__["a" /* default */])(array); i < length; i++) {
    var item = array[i];
    Iif (Object(__WEBPACK_IMPORTED_MODULE_1__contains_js__["a" /* default */])(result, item)) continue;
    var j;
    for (j = 1; j < argsLength; j++) {
      if (!Object(__WEBPACK_IMPORTED_MODULE_1__contains_js__["a" /* default */])(arguments[j], item)) break;
    }
    if (j === argsLength) result.push(item);
  }
  return result;
}
 
 
/***/ }),
/* 938 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__restArguments_js__ = __webpack_require__(58);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__unzip_js__ = __webpack_require__(462);
 
 
 
// Zip together multiple lists into a single array -- elements that share
// an index go together.
/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__restArguments_js__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__unzip_js__["a" /* default */]));
 
 
/***/ }),
/* 939 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = object;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__getLength_js__ = __webpack_require__(65);
 
 
// Converts lists into objects. Pass either a single array of `[key, value]`
// pairs, or two parallel arrays of the same length -- one of keys, and one of
// the corresponding values. Passing by pairs is the reverse of `_.pairs`.
function object(list, values) {
  var result = {};
  for (var i = 0, length = Object(__WEBPACK_IMPORTED_MODULE_0__getLength_js__["a" /* default */])(list); i < length; i++) {
    if (values) {
      result[list[i]] = values[i];
    } else {
      result[list[i][0]] = list[i][1];
    }
  }
  return result;
}
 
 
/***/ }),
/* 940 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = range;
// Generate an integer Array containing an arithmetic progression. A port of
// the native Python `range()` function. See
// [the Python documentation](https://docs.python.org/library/functions.html#range).
function range(start, stop, step) {
  if (stop == null) {
    stop = start || 0;
    start = 0;
  }
  if (!step) {
    step = stop < start ? -1 : 1;
  }
 
  var length = Math.max(Math.ceil((stop - start) / step), 0);
  var range = Array(length);
 
  for (var idx = 0; idx < length; idx++, start += step) {
    range[idx] = start;
  }
 
  return range;
}
 
 
/***/ }),
/* 941 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = chunk;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__setup_js__ = __webpack_require__(30);
 
 
// Chunk a single array into multiple arrays, each containing `count` or fewer
// items.
function chunk(array, count) {
  if (count == null || count < 1) return [];
  var result = [];
  var i = 0, length = array.length;
  while (i < length) {
    result.push(__WEBPACK_IMPORTED_MODULE_0__setup_js__["q" /* slice */].call(array, i, i += count));
  }
  return result;
}
 
 
/***/ }),
/* 942 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = mixin;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__underscore_js__ = __webpack_require__(59);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__each_js__ = __webpack_require__(107);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__functions_js__ = __webpack_require__(429);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__setup_js__ = __webpack_require__(30);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__chainResult_js__ = __webpack_require__(463);
 
 
 
 
 
 
// Add your own custom functions to the Underscore object.
function mixin(obj) {
  Object(__WEBPACK_IMPORTED_MODULE_1__each_js__["a" /* default */])(Object(__WEBPACK_IMPORTED_MODULE_2__functions_js__["a" /* default */])(obj), function(name) {
    var func = __WEBPACK_IMPORTED_MODULE_0__underscore_js__["a" /* default */][name] = obj[name];
    __WEBPACK_IMPORTED_MODULE_0__underscore_js__["a" /* default */].prototype[name] = function() {
      var args = [this._wrapped];
      __WEBPACK_IMPORTED_MODULE_3__setup_js__["o" /* push */].apply(args, arguments);
      return Object(__WEBPACK_IMPORTED_MODULE_4__chainResult_js__["a" /* default */])(this, func.apply(__WEBPACK_IMPORTED_MODULE_0__underscore_js__["a" /* default */], args));
    };
  });
  return __WEBPACK_IMPORTED_MODULE_0__underscore_js__["a" /* default */];
}
 
 
/***/ }),
/* 943 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__underscore_js__ = __webpack_require__(59);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__each_js__ = __webpack_require__(107);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__setup_js__ = __webpack_require__(30);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__chainResult_js__ = __webpack_require__(463);
 
 
 
 
 
// Add all mutator `Array` functions to the wrapper.
Object(__WEBPACK_IMPORTED_MODULE_1__each_js__["a" /* default */])(['pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift'], function(name) {
  var method = __WEBPACK_IMPORTED_MODULE_2__setup_js__["a" /* ArrayProto */][name];
  __WEBPACK_IMPORTED_MODULE_0__underscore_js__["a" /* default */].prototype[name] = function() {
    var obj = this._wrapped;
    Eif (obj != null) {
      method.apply(obj, arguments);
      Iif ((name === 'shift' || name === 'splice') && obj.length === 0) {
        delete obj[0];
      }
    }
    return Object(__WEBPACK_IMPORTED_MODULE_3__chainResult_js__["a" /* default */])(this, obj);
  };
});
 
// Add all accessor `Array` functions to the wrapper.
Object(__WEBPACK_IMPORTED_MODULE_1__each_js__["a" /* default */])(['concat', 'join', 'slice'], function(name) {
  var method = __WEBPACK_IMPORTED_MODULE_2__setup_js__["a" /* ArrayProto */][name];
  __WEBPACK_IMPORTED_MODULE_0__underscore_js__["a" /* default */].prototype[name] = function() {
    var obj = this._wrapped;
    Eif (obj != null) obj = method.apply(obj, arguments);
    return Object(__WEBPACK_IMPORTED_MODULE_3__chainResult_js__["a" /* default */])(this, obj);
  };
});
 
/* harmony default export */ __webpack_exports__["a"] = (__WEBPACK_IMPORTED_MODULE_0__underscore_js__["a" /* default */]);
 
 
/***/ }),
/* 944 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
/* istanbul ignore next */
function shim() {
    var doShim = function (promiseInstance) {
        Iif (typeof promiseInstance.prototype['finally'] != 'function') {
            promiseInstance.prototype['finally'] = function finallyPolyfill(callback) {
                var constructor = this.constructor;
                return this.then(function (value) {
                    return constructor.resolve(callback()).then(function () {
                        return value;
                    });
                }, function (reason) {
                    return constructor.resolve(callback()).then(function () {
                        throw reason;
                    });
                });
            };
        }
        var rethrowError = function (self) {
            self.then(null, function (err) {
                setTimeout(function () {
                    throw err;
                }, 0);
            });
        };
        Iif (typeof promiseInstance.prototype['done'] !== 'function') {
            promiseInstance.prototype['done'] = function (onFulfilled, onRejected) {
                var self = arguments.length ? this.then.apply(this, arguments) : this;
                rethrowError(self);
                return this;
            };
        }
        Iif (typeof promiseInstance.prototype['fail'] !== 'function') {
            promiseInstance.prototype['fail'] = function (onFulfilled, onRejected) {
                var self = arguments.length ? this.catch.apply(this, arguments) : this;
                rethrowError(self);
                return this;
            };
        }
    };
    var globalPromise = window['Promise'];
    var localPromise = Promise;
    Eif (globalPromise) {
        doShim(globalPromise);
    }
    Eif (localPromise) {
        doShim(localPromise);
    }
}
exports.shim = shim;
 
 
/***/ }),
/* 945 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
// CustomEvent polyfill from MDN
// https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent/CustomEvent#Polyfill
/* istanbul ignore next */
function customEventPolyfill() {
    // window.CustomEvent is missing from the definitions
    Eif (typeof window.CustomEvent === 'function') {
        return;
    }
    var CustomEvent = function (event, params) {
        params = params || { bubbles: false, cancelable: false, detail: undefined };
        var customEvent = document.createEvent('CustomEvent');
        customEvent.initCustomEvent(event, params.bubbles, params.cancelable, params.detail);
        return customEvent;
    };
    // window.Event is specific to IE
    CustomEvent.prototype = window.Event.prototype;
    window.CustomEvent = CustomEvent;
}
exports.customEventPolyfill = customEventPolyfill;
 
 
/***/ }),
/* 946 */
/***/ (function(module, exports) {
 
// empty (null-loader)
 
/***/ }),
/* 947 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var analytics = __webpack_require__(467);
exports.analytics = analytics;
var SimpleAnalytics = __webpack_require__(950);
exports.SimpleAnalytics = SimpleAnalytics;
var history = __webpack_require__(468);
exports.history = history;
var donottrack = __webpack_require__(953);
exports.donottrack = donottrack;
var storage = __webpack_require__(293);
exports.storage = storage;
 
 
/***/ }),
/* 948 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var Cookie = (function () {
    function Cookie() {
    }
    Cookie.set = function (name, value, expiration) {
        var domain, domainParts, date, expires, host;
        if (expiration) {
            date = new Date();
            date.setTime(date.getTime() + expiration);
            expires = '; expires=' + date.toGMTString();
        }
        else {
            expires = '';
        }
        host = location.hostname;
        if (host.indexOf('.') === -1) {
            document.cookie = name + '=' + value + expires + '; path=/';
        }
        else {
            domainParts = host.split('.');
            domainParts.shift();
            domain = '.' + domainParts.join('.');
            document.cookie = name + '=' + value + expires + '; path=/; domain=' + domain;
            if (Cookie.get(name) == null || Cookie.get(name) != value) {
                domain = '.' + host;
                document.cookie = name + '=' + value + expires + '; path=/; domain=' + domain;
            }
        }
    };
    Cookie.get = function (name) {
        var cookiePrefix = name + '=';
        var cookieArray = document.cookie.split(';');
        for (var i = 0; i < cookieArray.length; i++) {
            var cookie = cookieArray[i];
            cookie = cookie.replace(/^\s+/, '');
            if (cookie.indexOf(cookiePrefix) == 0) {
                return cookie.substring(cookiePrefix.length, cookie.length);
            }
        }
        return null;
    };
    Cookie.erase = function (name) {
        Cookie.set(name, '', -1);
    };
    return Cookie;
}());
exports.Cookie = Cookie;
 
 
/***/ }),
/* 949 */
/***/ (function(module, exports) {
 
(function(self) {
  'use strict';
 
  Eif (self.fetch) {
    return
  }
 
  var support = {
    searchParams: 'URLSearchParams' in self,
    iterable: 'Symbol' in self && 'iterator' in Symbol,
    blob: 'FileReader' in self && 'Blob' in self && (function() {
      try {
        new Blob()
        return true
      } catch(e) {
        return false
      }
    })(),
    formData: 'FormData' in self,
    arrayBuffer: 'ArrayBuffer' in self
  }
 
  if (support.arrayBuffer) {
    var viewClasses = [
      '[object Int8Array]',
      '[object Uint8Array]',
      '[object Uint8ClampedArray]',
      '[object Int16Array]',
      '[object Uint16Array]',
      '[object Int32Array]',
      '[object Uint32Array]',
      '[object Float32Array]',
      '[object Float64Array]'
    ]
 
    var isDataView = function(obj) {
      return obj && DataView.prototype.isPrototypeOf(obj)
    }
 
    var isArrayBufferView = ArrayBuffer.isView || function(obj) {
      return obj && viewClasses.indexOf(Object.prototype.toString.call(obj)) > -1
    }
  }
 
  function normalizeName(name) {
    if (typeof name !== 'string') {
      name = String(name)
    }
    if (/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(name)) {
      throw new TypeError('Invalid character in header field name')
    }
    return name.toLowerCase()
  }
 
  function normalizeValue(value) {
    if (typeof value !== 'string') {
      value = String(value)
    }
    return value
  }
 
  // Build a destructive iterator for the value list
  function iteratorFor(items) {
    var iterator = {
      next: function() {
        var value = items.shift()
        return {done: value === undefined, value: value}
      }
    }
 
    if (support.iterable) {
      iterator[Symbol.iterator] = function() {
        return iterator
      }
    }
 
    return iterator
  }
 
  function Headers(headers) {
    this.map = {}
 
    if (headers instanceof Headers) {
      headers.forEach(function(value, name) {
        this.append(name, value)
      }, this)
    } else if (Array.isArray(headers)) {
      headers.forEach(function(header) {
        this.append(header[0], header[1])
      }, this)
    } else if (headers) {
      Object.getOwnPropertyNames(headers).forEach(function(name) {
        this.append(name, headers[name])
      }, this)
    }
  }
 
  Headers.prototype.append = function(name, value) {
    name = normalizeName(name)
    value = normalizeValue(value)
    var oldValue = this.map[name]
    this.map[name] = oldValue ? oldValue+','+value : value
  }
 
  Headers.prototype['delete'] = function(name) {
    delete this.map[normalizeName(name)]
  }
 
  Headers.prototype.get = function(name) {
    name = normalizeName(name)
    return this.has(name) ? this.map[name] : null
  }
 
  Headers.prototype.has = function(name) {
    return this.map.hasOwnProperty(normalizeName(name))
  }
 
  Headers.prototype.set = function(name, value) {
    this.map[normalizeName(name)] = normalizeValue(value)
  }
 
  Headers.prototype.forEach = function(callback, thisArg) {
    for (var name in this.map) {
      if (this.map.hasOwnProperty(name)) {
        callback.call(thisArg, this.map[name], name, this)
      }
    }
  }
 
  Headers.prototype.keys = function() {
    var items = []
    this.forEach(function(value, name) { items.push(name) })
    return iteratorFor(items)
  }
 
  Headers.prototype.values = function() {
    var items = []
    this.forEach(function(value) { items.push(value) })
    return iteratorFor(items)
  }
 
  Headers.prototype.entries = function() {
    var items = []
    this.forEach(function(value, name) { items.push([name, value]) })
    return iteratorFor(items)
  }
 
  if (support.iterable) {
    Headers.prototype[Symbol.iterator] = Headers.prototype.entries
  }
 
  function consumed(body) {
    if (body.bodyUsed) {
      return Promise.reject(new TypeError('Already read'))
    }
    body.bodyUsed = true
  }
 
  function fileReaderReady(reader) {
    return new Promise(function(resolve, reject) {
      reader.onload = function() {
        resolve(reader.result)
      }
      reader.onerror = function() {
        reject(reader.error)
      }
    })
  }
 
  function readBlobAsArrayBuffer(blob) {
    var reader = new FileReader()
    var promise = fileReaderReady(reader)
    reader.readAsArrayBuffer(blob)
    return promise
  }
 
  function readBlobAsText(blob) {
    var reader = new FileReader()
    var promise = fileReaderReady(reader)
    reader.readAsText(blob)
    return promise
  }
 
  function readArrayBufferAsText(buf) {
    var view = new Uint8Array(buf)
    var chars = new Array(view.length)
 
    for (var i = 0; i < view.length; i++) {
      chars[i] = String.fromCharCode(view[i])
    }
    return chars.join('')
  }
 
  function bufferClone(buf) {
    if (buf.slice) {
      return buf.slice(0)
    } else {
      var view = new Uint8Array(buf.byteLength)
      view.set(new Uint8Array(buf))
      return view.buffer
    }
  }
 
  function Body() {
    this.bodyUsed = false
 
    this._initBody = function(body) {
      this._bodyInit = body
      if (!body) {
        this._bodyText = ''
      } else if (typeof body === 'string') {
        this._bodyText = body
      } else if (support.blob && Blob.prototype.isPrototypeOf(body)) {
        this._bodyBlob = body
      } else if (support.formData && FormData.prototype.isPrototypeOf(body)) {
        this._bodyFormData = body
      } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {
        this._bodyText = body.toString()
      } else if (support.arrayBuffer && support.blob && isDataView(body)) {
        this._bodyArrayBuffer = bufferClone(body.buffer)
        // IE 10-11 can't handle a DataView body.
        this._bodyInit = new Blob([this._bodyArrayBuffer])
      } else if (support.arrayBuffer && (ArrayBuffer.prototype.isPrototypeOf(body) || isArrayBufferView(body))) {
        this._bodyArrayBuffer = bufferClone(body)
      } else {
        throw new Error('unsupported BodyInit type')
      }
 
      if (!this.headers.get('content-type')) {
        if (typeof body === 'string') {
          this.headers.set('content-type', 'text/plain;charset=UTF-8')
        } else if (this._bodyBlob && this._bodyBlob.type) {
          this.headers.set('content-type', this._bodyBlob.type)
        } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {
          this.headers.set('content-type', 'application/x-www-form-urlencoded;charset=UTF-8')
        }
      }
    }
 
    if (support.blob) {
      this.blob = function() {
        var rejected = consumed(this)
        if (rejected) {
          return rejected
        }
 
        if (this._bodyBlob) {
          return Promise.resolve(this._bodyBlob)
        } else if (this._bodyArrayBuffer) {
          return Promise.resolve(new Blob([this._bodyArrayBuffer]))
        } else if (this._bodyFormData) {
          throw new Error('could not read FormData body as blob')
        } else {
          return Promise.resolve(new Blob([this._bodyText]))
        }
      }
 
      this.arrayBuffer = function() {
        if (this._bodyArrayBuffer) {
          return consumed(this) || Promise.resolve(this._bodyArrayBuffer)
        } else {
          return this.blob().then(readBlobAsArrayBuffer)
        }
      }
    }
 
    this.text = function() {
      var rejected = consumed(this)
      if (rejected) {
        return rejected
      }
 
      if (this._bodyBlob) {
        return readBlobAsText(this._bodyBlob)
      } else if (this._bodyArrayBuffer) {
        return Promise.resolve(readArrayBufferAsText(this._bodyArrayBuffer))
      } else if (this._bodyFormData) {
        throw new Error('could not read FormData body as text')
      } else {
        return Promise.resolve(this._bodyText)
      }
    }
 
    if (support.formData) {
      this.formData = function() {
        return this.text().then(decode)
      }
    }
 
    this.json = function() {
      return this.text().then(JSON.parse)
    }
 
    return this
  }
 
  // HTTP methods whose capitalization should be normalized
  var methods = ['DELETE', 'GET', 'HEAD', 'OPTIONS', 'POST', 'PUT']
 
  function normalizeMethod(method) {
    var upcased = method.toUpperCase()
    return (methods.indexOf(upcased) > -1) ? upcased : method
  }
 
  function Request(input, options) {
    options = options || {}
    var body = options.body
 
    if (input instanceof Request) {
      if (input.bodyUsed) {
        throw new TypeError('Already read')
      }
      this.url = input.url
      this.credentials = input.credentials
      if (!options.headers) {
        this.headers = new Headers(input.headers)
      }
      this.method = input.method
      this.mode = input.mode
      if (!body && input._bodyInit != null) {
        body = input._bodyInit
        input.bodyUsed = true
      }
    } else {
      this.url = String(input)
    }
 
    this.credentials = options.credentials || this.credentials || 'omit'
    if (options.headers || !this.headers) {
      this.headers = new Headers(options.headers)
    }
    this.method = normalizeMethod(options.method || this.method || 'GET')
    this.mode = options.mode || this.mode || null
    this.referrer = null
 
    if ((this.method === 'GET' || this.method === 'HEAD') && body) {
      throw new TypeError('Body not allowed for GET or HEAD requests')
    }
    this._initBody(body)
  }
 
  Request.prototype.clone = function() {
    return new Request(this, { body: this._bodyInit })
  }
 
  function decode(body) {
    var form = new FormData()
    body.trim().split('&').forEach(function(bytes) {
      if (bytes) {
        var split = bytes.split('=')
        var name = split.shift().replace(/\+/g, ' ')
        var value = split.join('=').replace(/\+/g, ' ')
        form.append(decodeURIComponent(name), decodeURIComponent(value))
      }
    })
    return form
  }
 
  function parseHeaders(rawHeaders) {
    var headers = new Headers()
    rawHeaders.split(/\r?\n/).forEach(function(line) {
      var parts = line.split(':')
      var key = parts.shift().trim()
      if (key) {
        var value = parts.join(':').trim()
        headers.append(key, value)
      }
    })
    return headers
  }
 
  Body.call(Request.prototype)
 
  function Response(bodyInit, options) {
    if (!options) {
      options = {}
    }
 
    this.type = 'default'
    this.status = 'status' in options ? options.status : 200
    this.ok = this.status >= 200 && this.status < 300
    this.statusText = 'statusText' in options ? options.statusText : 'OK'
    this.headers = new Headers(options.headers)
    this.url = options.url || ''
    this._initBody(bodyInit)
  }
 
  Body.call(Response.prototype)
 
  Response.prototype.clone = function() {
    return new Response(this._bodyInit, {
      status: this.status,
      statusText: this.statusText,
      headers: new Headers(this.headers),
      url: this.url
    })
  }
 
  Response.error = function() {
    var response = new Response(null, {status: 0, statusText: ''})
    response.type = 'error'
    return response
  }
 
  var redirectStatuses = [301, 302, 303, 307, 308]
 
  Response.redirect = function(url, status) {
    if (redirectStatuses.indexOf(status) === -1) {
      throw new RangeError('Invalid status code')
    }
 
    return new Response(null, {status: status, headers: {location: url}})
  }
 
  self.Headers = Headers
  self.Request = Request
  self.Response = Response
 
  self.fetch = function(input, init) {
    return new Promise(function(resolve, reject) {
      var request = new Request(input, init)
      var xhr = new XMLHttpRequest()
 
      xhr.onload = function() {
        var options = {
          status: xhr.status,
          statusText: xhr.statusText,
          headers: parseHeaders(xhr.getAllResponseHeaders() || '')
        }
        options.url = 'responseURL' in xhr ? xhr.responseURL : options.headers.get('X-Request-URL')
        var body = 'response' in xhr ? xhr.response : xhr.responseText
        resolve(new Response(body, options))
      }
 
      xhr.onerror = function() {
        reject(new TypeError('Network request failed'))
      }
 
      xhr.ontimeout = function() {
        reject(new TypeError('Network request failed'))
      }
 
      xhr.open(request.method, request.url, true)
 
      if (request.credentials === 'include') {
        xhr.withCredentials = true
      }
 
      if ('responseType' in xhr && support.blob) {
        xhr.responseType = 'blob'
      }
 
      request.headers.forEach(function(value, name) {
        xhr.setRequestHeader(name, value)
      })
 
      xhr.send(typeof request._bodyInit === 'undefined' ? null : request._bodyInit)
    })
  }
  self.fetch.polyfill = true
})(typeof self !== 'undefined' ? self : this);
 
 
/***/ }),
/* 950 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var analytics = __webpack_require__(467);
var objectassign_1 = __webpack_require__(951);
var utils_1 = __webpack_require__(952);
var SimpleAPI = (function () {
    function SimpleAPI() {
    }
    SimpleAPI.prototype.init = function (token, endpoint) {
        if (typeof token === 'undefined') {
            throw new Error("You must pass your token when you call 'init'");
        }
        if (typeof token === 'string') {
            endpoint = endpoint || analytics.Endpoints.default;
            this.client = new analytics.Client({
                token: token,
                endpoint: endpoint
            });
        }
        else if (typeof token === 'object' && typeof token.sendEvent !== 'undefined') {
            this.client = token;
        }
        else {
            throw new Error("You must pass either your token or a valid object when you call 'init'");
        }
    };
    SimpleAPI.prototype.send = function (event, customData) {
        if (typeof this.client == 'undefined') {
            throw new Error("You must call init before sending an event");
        }
        customData = objectassign_1.default({}, {
            hash: window.location.hash
        }, customData);
        switch (event) {
            case 'pageview':
                this.client.sendViewEvent({
                    location: window.location.toString(),
                    referrer: document.referrer,
                    language: document.documentElement.lang,
                    title: document.title,
                    contentIdKey: utils_1.popFromObject(customData, 'contentIdKey'),
                    contentIdValue: utils_1.popFromObject(customData, 'contentIdValue'),
                    contentType: utils_1.popFromObject(customData, 'contentType'),
                    anonymous: utils_1.popFromObject(customData, 'anonymous'),
                    customData: customData
                });
                return;
            default:
                throw new Error("Event type: '" + event + "' not implemented");
        }
    };
    SimpleAPI.prototype.onLoad = function (callback) {
        if (typeof callback == 'undefined') {
            throw new Error("You must pass a function when you call 'onLoad'");
        }
        callback();
    };
    return SimpleAPI;
}());
exports.SimpleAPI = SimpleAPI;
var simpleAPI = new SimpleAPI();
exports.SimpleAnalytics = function (action) {
    var params = [];
    for (var _i = 1; _i < arguments.length; _i++) {
        params[_i - 1] = arguments[_i];
    }
    var actionFunction = simpleAPI[action];
    if (actionFunction) {
        return actionFunction.apply(simpleAPI, params);
    }
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = exports.SimpleAnalytics;
 
 
/***/ }),
/* 951 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var hasOwnProperty = Object.prototype.hasOwnProperty;
var getOwnPropertySymbols = Object.getOwnPropertySymbols;
var propIsEnumerable = Object.prototype.propertyIsEnumerable;
var objectAssignPonyfill = function (target) {
    var sources = [];
    for (var _i = 1; _i < arguments.length; _i++) {
        sources[_i - 1] = arguments[_i];
    }
    if (target === undefined || target === null) {
        throw new TypeError('Cannot convert undefined or null to object');
    }
    var output = Object(target);
    sources.forEach(function (source) {
        var from = Object(source);
        for (var key in from) {
            if (hasOwnProperty.call(from, key)) {
                output[key] = from[key];
            }
        }
        if (getOwnPropertySymbols) {
            var symbols = getOwnPropertySymbols(from);
            symbols.forEach(function (symbol) {
                if (propIsEnumerable.call(from, symbol)) {
                    output[symbol] = from[symbol];
                }
            });
        }
    });
    return output;
};
exports.ponyfill = objectAssignPonyfill;
exports.assign = typeof Object.assign === 'function' ? Object.assign : objectAssignPonyfill;
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = exports.assign;
 
 
/***/ }),
/* 952 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
function popFromObject(object, key) {
    if (object) {
        var value = object[key];
        delete object[key];
        return value;
    }
}
exports.popFromObject = popFromObject;
 
 
/***/ }),
/* 953 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
exports.doNotTrack = [true, 'yes', '1'].indexOf(navigator.doNotTrack || navigator.msDoNotTrack || window.doNotTrack);
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = exports.doNotTrack;
 
 
/***/ }),
/* 954 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        if (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
            if (y = 0, t) op = [op[0] & 2, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
Object.defineProperty(exports, "__esModule", { value: true });
var options_1 = __webpack_require__(471);
var delay_factory_1 = __webpack_require__(955);
function backOff(request, options) {
    if (options === void 0) { options = {}; }
    return __awaiter(this, void 0, void 0, function () {
        var sanitizedOptions, backOff;
        return __generator(this, function (_a) {
            switch (_a.label) {
                case 0:
                    sanitizedOptions = options_1.getSanitizedOptions(options);
                    backOff = new BackOff(request, sanitizedOptions);
                    return [4 /*yield*/, backOff.execute()];
                case 1: return [2 /*return*/, _a.sent()];
            }
        });
    });
}
exports.backOff = backOff;
var BackOff = /** @class */ (function () {
    function BackOff(request, options) {
        this.request = request;
        this.options = options;
        this.attemptNumber = 0;
    }
    BackOff.prototype.execute = function () {
        return __awaiter(this, void 0, void 0, function () {
            var e_1, shouldRetry;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        if (!!this.attemptLimitReached) return [3 /*break*/, 6];
                        _a.label = 1;
                    case 1:
                        _a.trys.push([1, 4, , 5]);
                        return [4 /*yield*/, this.applyDelay()];
                    case 2:
                        _a.sent();
                        return [4 /*yield*/, this.request()];
                    case 3: return [2 /*return*/, _a.sent()];
                    case 4:
                        e_1 = _a.sent();
                        this.attemptNumber++;
                        shouldRetry = this.options.retry(e_1, this.attemptNumber);
                        if (!shouldRetry || this.attemptLimitReached) {
                            throw e_1;
                        }
                        return [3 /*break*/, 5];
                    case 5: return [3 /*break*/, 0];
                    case 6: throw new Error("Something went wrong.");
                }
            });
        });
    };
    Object.defineProperty(BackOff.prototype, "attemptLimitReached", {
        get: function () {
            return this.attemptNumber >= this.options.numOfAttempts;
        },
        enumerable: true,
        configurable: true
    });
    BackOff.prototype.applyDelay = function () {
        return __awaiter(this, void 0, void 0, function () {
            var delay;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        delay = delay_factory_1.DelayFactory(this.options, this.attemptNumber);
                        return [4 /*yield*/, delay.apply()];
                    case 1:
                        _a.sent();
                        return [2 /*return*/];
                }
            });
        });
    };
    return BackOff;
}());
//# sourceMappingURL=backoff.js.map
 
/***/ }),
/* 955 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var skip_first_delay_1 = __webpack_require__(956);
var always_delay_1 = __webpack_require__(960);
function DelayFactory(options, attempt) {
    var delay = initDelayClass(options);
    delay.setAttemptNumber(attempt);
    return delay;
}
exports.DelayFactory = DelayFactory;
function initDelayClass(options) {
    if (!options.delayFirstAttempt) {
        return new skip_first_delay_1.SkipFirstDelay(options);
    }
    return new always_delay_1.AlwaysDelay(options);
}
//# sourceMappingURL=delay.factory.js.map
 
/***/ }),
/* 956 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        if (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
            if (y = 0, t) op = [op[0] & 2, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
Object.defineProperty(exports, "__esModule", { value: true });
var delay_base_1 = __webpack_require__(472);
var SkipFirstDelay = /** @class */ (function (_super) {
    __extends(SkipFirstDelay, _super);
    function SkipFirstDelay() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    SkipFirstDelay.prototype.apply = function () {
        return __awaiter(this, void 0, void 0, function () {
            return __generator(this, function (_a) {
                return [2 /*return*/, this.isFirstAttempt ? true : _super.prototype.apply.call(this)];
            });
        });
    };
    Object.defineProperty(SkipFirstDelay.prototype, "isFirstAttempt", {
        get: function () {
            return this.attempt === 0;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(SkipFirstDelay.prototype, "numOfDelayedAttempts", {
        get: function () {
            return this.attempt - 1;
        },
        enumerable: true,
        configurable: true
    });
    return SkipFirstDelay;
}(delay_base_1.Delay));
exports.SkipFirstDelay = SkipFirstDelay;
//# sourceMappingURL=skip-first.delay.js.map
 
/***/ }),
/* 957 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var options_1 = __webpack_require__(471);
var full_jitter_1 = __webpack_require__(958);
var no_jitter_1 = __webpack_require__(959);
function JitterFactory(options) {
    switch (options.jitter) {
        case options_1.JitterTypes.Full:
            return full_jitter_1.fullJitter;
        case options_1.JitterTypes.None:
        default:
            return no_jitter_1.noJitter;
    }
}
exports.JitterFactory = JitterFactory;
//# sourceMappingURL=jitter.factory.js.map
 
/***/ }),
/* 958 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
function fullJitter(delay) {
    var jitteredDelay = Math.random() * delay;
    return Math.round(jitteredDelay);
}
exports.fullJitter = fullJitter;
//# sourceMappingURL=full.jitter.js.map
 
/***/ }),
/* 959 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
function noJitter(delay) {
    return delay;
}
exports.noJitter = noJitter;
//# sourceMappingURL=no.jitter.js.map
 
/***/ }),
/* 960 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
var delay_base_1 = __webpack_require__(472);
var AlwaysDelay = /** @class */ (function (_super) {
    __extends(AlwaysDelay, _super);
    function AlwaysDelay() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    return AlwaysDelay;
}(delay_base_1.Delay));
exports.AlwaysDelay = AlwaysDelay;
//# sourceMappingURL=always.delay.js.map
 
/***/ }),
/* 961 */
/***/ (function(module, exports) {
 
var Coveo;!function(e){var o;!function(e){function o(e,o){void 0===o&&(o={});var n=o.body||document.body;n.className?n.className.indexOf("coveo-modal-opened")==-1&&(n.className+=" coveo-modal-opened"):n.className="coveo-modal-opened";var s=document.createElement("div");s.className="coveo-modal-container coveo-opened ","small"==o.sizeMod&&(s.className+=" coveo-mod-small"),"big"==o.sizeMod&&(s.className+=" coveo-mod-big"),setTimeout(function(){s.className+=" coveo-mod-fade-in-scale"},0),n.appendChild(s),o.fullscreen===!0&&(s.className+=" coveo-fullscreen");var r=document.createElement("div");r.className="coveo-modal-backdrop coveo-modal-transparent",n.appendChild(r),setTimeout(function(){c(r,"coveo-modal-transparent")},0);var i=document.createElement("div");i.className="coveo-modal-content",s.appendChild(i);var m=function(e,a){void 0===e&&(e=0),void 0===a&&(a=!1);var t=null==o.validation||o.validation(e);Eif(t!==!1||a){s.parentElement&&s.parentElement.removeChild(s);var l=d.indexOf(m);return l>=0&&d.splice(l,1),null==n.querySelector(".coveo-modal-container")&&c(n,"coveo-modal-opened"),r.parentNode&&r.parentNode.removeChild(r),!0}return!1},v=a(o,m),u=v.header,p=v.closeIcon;i.appendChild(u),i.appendChild(t(o,e)),p.addEventListener("click",function(){m()}),r.addEventListener("click",function(){m()});var N=function(e){27==e.keyCode&&n.className.indexOf("coveo-modal-opened")!=-1&&(m(),document.removeEventListener("keyup",N))};document.addEventListener("keyup",N);var f,h=function(e,o){var n=document.createElement("button");n.className="coveo-btn",n.textContent=e,n.addEventListener("click",function(){return m(o)}),f.appendChild(n)};return null!=o.buttons&&(f=document.createElement("footer"),f.className="coveo-modal-footer",i.appendChild(f),o.buttons&l.OK&&h("Ok",l.OK),o.buttons&l.APPLY&&h("Apply",l.APPLY),o.buttons&l.YES&&h("Yes",l.YES),o.buttons&l.NO&&h("No",l.NO),o.buttons&l.CANCEL&&h("Cancel",l.CANCEL)),d.push(m),null!=o.className&&(s.className+=" "+o.className),{modalBox:s,wrapper:i,buttons:f,content:i,overlay:r,close:m}}function n(e){void 0===e&&(e=!1);for(var o=0;d.length>o;){var n=d[o](0,e);n||o++}}function a(e,o){var n=document.createElement("header");Eif(n.className="coveo-modal-header",null!=e.title){var a=document.createElement("h1");n.appendChild(a),e.title instanceof HTMLElement?a.appendChild(e.title):a.innerHTML=e.title,e.titleClose===!0&&a.addEventListener("click",function(){return o()})}var t=document.createElement("span");t.className="coveo-small-close",n.appendChild(t);var c='<svg viewBox="0 0 22 22" class="coveo-icon coveo-fill-pure-white">\n                    <g transform="matrix(.7071-.7071.7071.7071-3.142 11)">\n                        <path d="m9-3.4h2v26.9h-2z"></path>\n                        <path d="m-3.4 9h26.9v2h-26.9z"></path>\n                    </g>\n                </svg>';return t.innerHTML=c,{header:n,closeIcon:t}}function t(e,o){var n=document.createElement("div");return n.className="coveo-modal-body coveo-mod-header-paddding coveo-mod-form-top-bottom-padding",n.appendChild(o),n}function c(e,o){e.className=e.className.replace(new RegExp("(^|\\s)"+o+"(\\s|\\b)","g"),"$1")}!function(e){e[e.OK=1]="OK",e[e.APPLY=2]="APPLY",e[e.YES=4]="YES",e[e.NO=8]="NO",e[e.CANCEL=16]="CANCEL"}(e.BUTTON||(e.BUTTON={}));var l=e.BUTTON,d=[];e.open=o,e.close=n}(o=e.ModalBox||(e.ModalBox={}))}(Coveo||(Coveo={}));
 
/*** EXPORTS FROM exports-loader ***/
module.exports = Coveo.ModalBox;
 
/***/ }),
/* 962 */
/***/ (function(module, exports) {
 
!function(){"use strict";var t,e,n="undefined",r="string",i=self.navigator,o=String,a=Object.prototype.hasOwnProperty,l={},u={},s=!1,f=!0,c=/^\s*application\/(?:vnd\.oftn\.|x-)?l10n\+json\s*(?:$|;)/i,p="locale",g="defaultLocale",h="toLocaleString",y="toLowerCase",v=Array.prototype.indexOf||function(t){for(var e=this.length,n=0;e>n;n++)if(n in this&&this[n]===t)return n;return-1},d=function(e){var n=new t;return n.open("GET",e,s),n.send(null),200!==n.status?(setTimeout(function(){var t=new Error("Unable to load localization data: "+e);throw t.name="Localization Error",t},0),{}):JSON.parse(n.responseText)},m=o[h]=function(t){Eif(arguments.length>0&&"number"!=typeof t)Iif(typeof t===r)m(d(t));else Iif(t===s)u={};else{var e,n,i;for(e in t)Eif(a.call(t,e)){Iif(n=t[e],e=e[y](),e in u&&n!==s||(u[e]={}),n===s)continue;Iif(typeof n===r){if(0!==o[p][y]().indexOf(e)){e in l||(l[e]=[]),l[e].push(n);continue}n=d(n)}for(i in n)a.call(n,i)&&(u[e][i]=n[i])}}return Function.prototype[h].apply(o,arguments)},w=function(t){for(var e,n=l[t],r=0,i=n.length;i>r;r++)e={},e[t]=d(n[r]),m(e);delete l[t]},b=o.prototype[h]=function(){var t,n=e,r=o[n?g:p],i=r[y]().split("-"),a=i.length,c=this.valueOf();e=s;do if(t=i.slice(0,a).join("-"),t in l&&w(t),t in u&&c in u[t])return u[t][c];while(a-->1);return!n&&o[g]?(e=f,b.call(c)):c};Iif(typeof XMLHttpRequest===n&&typeof ActiveXObject!==n){var L=ActiveXObject;t=function(){try{return new L("Msxml2.XMLHTTP.6.0")}catch(t){}try{return new L("Msxml2.XMLHTTP.3.0")}catch(e){}try{return new L("Msxml2.XMLHTTP")}catch(n){}throw new Error("XMLHttpRequest not supported by this browser.")}}else t=XMLHttpRequest;Eif(o[g]=o[g]||"",o[p]=i&&(i.language||i.userLanguage)||"",typeof document!==n)for(var T,M=document.getElementsByTagName("link"),O=M.length;O--;){var X=M[O],x=(X.getAttribute("rel")||"")[y]().split(/\s+/);c.test(X.type)&&(-1!==v.call(x,"localizations")?m(X.getAttribute("href")):-1!==v.call(x,"localization")&&(T={},T[(X.getAttribute("hreflang")||"")[y]()]=X.getAttribute("href"),m(T)))}}();
 
/*** EXPORTS FROM exports-loader ***/
module.exports = window.String.toLocaleString;
 
/***/ }),
/* 963 */
/***/ (function(module, exports, __webpack_require__) {
 
/*! globalize - v0.1.1 - 2013-04-30
* https://github.com/jquery/globalize
* Copyright 2013 ; Licensed MIT */
var Globalize = (function(e,r){var t,n,a,s,u,l,i,c,o,f,d,p,h,g,b,m,y,M,v,k,z,F,A,x;t=function(e){return new t.prototype.init(e)}, true?module.exports=t:e.Globalize=t,t.cultures={},t.prototype={constructor:t,init:function(e){return this.cultures=t.cultures,this.cultureSelector=e,this}},t.prototype.init.prototype=t.prototype,t.cultures["default"]={name:"en",englishName:"English",nativeName:"English",isRTL:!1,language:"en",numberFormat:{pattern:["-n"],decimals:2,",":",",".":".",groupSizes:[3],"+":"+","-":"-",NaN:"NaN",negativeInfinity:"-Infinity",positiveInfinity:"Infinity",percent:{pattern:["-n %","n %"],decimals:2,groupSizes:[3],",":",",".":".",symbol:"%"},currency:{pattern:["($n)","$n"],decimals:2,groupSizes:[3],",":",",".":".",symbol:"$"}},calendars:{standard:{name:"Gregorian_USEnglish","/":"/",":":":",firstDay:0,days:{names:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],namesAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],namesShort:["Su","Mo","Tu","We","Th","Fr","Sa"]},months:{names:["January","February","March","April","May","June","July","August","September","October","November","December",""],namesAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec",""]},AM:["AM","am","AM"],PM:["PM","pm","PM"],eras:[{name:"A.D.",start:null,offset:0}],twoDigitYearMax:2029,patterns:{d:"M/d/yyyy",D:"dddd, MMMM dd, yyyy",t:"h:mm tt",T:"h:mm:ss tt",f:"dddd, MMMM dd, yyyy h:mm tt",F:"dddd, MMMM dd, yyyy h:mm:ss tt",M:"MMMM dd",Y:"yyyy MMMM",S:"yyyy'-'MM'-'dd'T'HH':'mm':'ss"}}},messages:{}},t.cultures["default"].calendar=t.cultures["default"].calendars.standard,t.cultures.en=t.cultures["default"],t.cultureSelector="en",n=/^0x[a-f0-9]+$/i,a=/^[+\-]?infinity$/i,s=/^[+\-]?\d*\.?\d*(e[+\-]?\d+)?$/,u=/^\s+|\s+$/g,l=function(e,r){if(e.indexOf)return e.indexOf(r);for(var t=0,n=e.length;n>t;t++)if(e[t]===r)return t;return-1},i=function(e,r){return e.substr(e.length-r.length)===r},c=function(){var e,t,n,a,s,u,l=arguments[0]||{},i=1,p=arguments.length,h=!1;for("boolean"==typeof l&&(h=l,l=arguments[1]||{},i=2),"object"==typeof l||f(l)||(l={});p>i;i++)if(null!=(e=arguments[i]))for(t in e)n=l[t],a=e[t],l!==a&&(h&&a&&(d(a)||(s=o(a)))?(s?(s=!1,u=n&&o(n)?n:[]):u=n&&d(n)?n:{},l[t]=c(h,u,a)):a!==r&&(l[t]=a));return l},o=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},f=function(e){return"[object Function]"===Object.prototype.toString.call(e)},d=function(e){return"[object Object]"===Object.prototype.toString.call(e)},p=function(e,r){return 0===e.indexOf(r)},h=function(e){return(e+"").replace(u,"")},g=function(e){return isNaN(e)?0/0:Math[0>e?"ceil":"floor"](e)},b=function(e,r,t){var n;for(n=e.length;r>n;n+=1)e=t?"0"+e:e+"0";return e},m=function(e,r){for(var t=0,n=!1,a=0,s=e.length;s>a;a++){var u=e.charAt(a);switch(u){case"'":n?r.push("'"):t++,n=!1;break;case"\\":n&&r.push("\\"),n=!n;break;default:r.push(u),n=!1}}return t},y=function(e,r){r=r||"F";var t,n=e.patterns,a=r.length;if(1===a){Iif(t=n[r],!t)throw"Invalid date format string '"+r+"'.";r=t}else 2===a&&"%"===r.charAt(0)&&(r=r.charAt(1));return r},M=function(e,r,t){function n(e,r){var t,n=e+"";return r>1&&r>n.length?(t=v[r-2]+n,t.substr(t.length-r,r)):t=n}function a(){return h||g?h:(h=A.test(r),g=!0,h)}function s(e,r){Iif(b)return b[r];switch(r){case 0:return e.getFullYear();case 1:return e.getMonth();case 2:return e.getDate();default:throw"Invalid part value "+r}}var u,l=t.calendar,i=l.convert;Iif(!r||!r.length||"i"===r){if(t&&t.name.length)if(i)u=M(e,l.patterns.F,t);else{var c=new Date(e.getTime()),o=z(e,l.eras);c.setFullYear(F(e,l,o)),u=c.toLocaleString()}else u=""+e;return u}var f=l.eras,d="s"===r;r=y(l,r),u=[];var p,h,g,b,v=["0","00","000"],A=/([^d]|^)(d|dd)([^d]|$)/g,x=0,I=k();for(!d&&i&&(b=i.fromGregorian(e));;){var S=I.lastIndex,w=I.exec(r),C=r.slice(S,w?w.index:r.length);if(x+=m(C,u),!w)break;Iif(x%2)u.push(w[0]);else{var D=w[0],H=D.length;switch(D){case"ddd":case"dddd":var O=3===H?l.days.namesAbbr:l.days.names;u.push(O[e.getDay()]);break;case"d":case"dd":h=!0,u.push(n(s(e,2),H));break;case"MMM":case"MMMM":var N=s(e,1);u.push(l.monthsGenitive&&a()?l.monthsGenitive[3===H?"namesAbbr":"names"][N]:l.months[3===H?"namesAbbr":"names"][N]);break;case"M":case"MM":u.push(n(s(e,1)+1,H));break;case"y":case"yy":case"yyyy":N=b?b[0]:F(e,l,z(e,f),d),4>H&&(N%=100),u.push(n(N,H));break;case"h":case"hh":p=e.getHours()%12,0===p&&(p=12),u.push(n(p,H));break;case"H":case"HH":u.push(n(e.getHours(),H));break;case"m":case"mm":u.push(n(e.getMinutes(),H));break;case"s":case"ss":u.push(n(e.getSeconds(),H));break;case"t":case"tt":N=12>e.getHours()?l.AM?l.AM[0]:" ":l.PM?l.PM[0]:" ",u.push(1===H?N.charAt(0):N);break;case"f":case"ff":case"fff":u.push(n(e.getMilliseconds(),3).substr(0,H));break;case"z":case"zz":p=e.getTimezoneOffset()/60,u.push((0>=p?"+":"-")+n(Math.floor(Math.abs(p)),H));break;case"zzz":p=e.getTimezoneOffset()/60,u.push((0>=p?"+":"-")+n(Math.floor(Math.abs(p)),2)+":"+n(Math.abs(e.getTimezoneOffset()%60),2));break;case"g":case"gg":l.eras&&u.push(l.eras[z(e,f)].name);break;case"/":u.push(l["/"]);break;default:throw"Invalid date format pattern '"+D+"'."}}}return u.join("")},function(){var e;e=function(e,r,t){var n=t.groupSizes,a=n[0],s=1,u=Math.pow(10,r),l=Math.round(e*u)/u;isFinite(l)||(l=e),e=l;var i=e+"",c="",o=i.split(/e/i),f=o.length>1?parseInt(o[1],10):0;i=o[0],o=i.split("."),i=o[0],c=o.length>1?o[1]:"",f>0?(c=b(c,f,!1),i+=c.slice(0,f),c=c.substr(f)):0>f&&(f=-f,i=b(i,f+1,!0),c=i.slice(-f,i.length)+c,i=i.slice(0,-f)),c=r>0?t["."]+(c.length>r?c.slice(0,r):b(c,r)):"";for(var d=i.length-1,p=t[","],h="";d>=0;){if(0===a||a>d)return i.slice(0,d+1)+(h.length?p+h+c:c);h=i.slice(d-a+1,d+1)+(h.length?p+h:""),d-=a,n.length>s&&(a=n[s],s++)}return i.slice(0,d+1)+p+h+c},v=function(r,t,n){if(!isFinite(r))return 1/0===r?n.numberFormat.positiveInfinity:r===-1/0?n.numberFormat.negativeInfinity:n.numberFormat.NaN;Iif(!t||"i"===t)return n.name.length?r.toLocaleString():""+r;t=t||"D";var a,s=n.numberFormat,u=Math.abs(r),l=-1;t.length>1&&(l=parseInt(t.slice(1),10));var i,c=t.charAt(0).toUpperCase();switch(c){case"D":a="n",u=g(u),-1!==l&&(u=b(""+u,l,!0)),0>r&&(u="-"+u);break;case"N":i=s;case"C":i=i||s.currency;case"P":i=i||s.percent,a=0>r?i.pattern[0]:i.pattern[1]||"n",-1===l&&(l=i.decimals),u=e(u*("P"===c?100:1),l,i);break;default:throw"Bad number format specifier: "+c}for(var o=/n|\$|-|%/g,f="";;){var d=o.lastIndex,p=o.exec(a);if(f+=a.slice(d,p?p.index:a.length),!p)break;switch(p[0]){case"n":f+=u;break;case"$":f+=s.currency.symbol;break;case"-":/[1-9]/.test(u)&&(f+=s["-"]);break;case"%":f+=s.percent.symbol}}return f}}(),k=function(){return/\/|dddd|ddd|dd|d|MMMM|MMM|MM|M|yyyy|yy|y|hh|h|HH|H|mm|m|ss|s|tt|t|fff|ff|f|zzz|zz|z|gg|g/g},z=function(e,r){Iif(!r)return 0;for(var t,n=e.getTime(),a=0,s=r.length;s>a;a++)Eif(t=r[a].start,null===t||n>=t)return a;return 0},F=function(e,r,t,n){var a=e.getFullYear();return!n&&r.eras&&(a-=r.eras[t].offset),a},function(){var e,r,t,n,a,s,u;e=function(e,r){if(100>r){var t=new Date,n=z(t),a=F(t,e,n),s=e.twoDigitYearMax;s="string"==typeof s?(new Date).getFullYear()%100+parseInt(s,10):s,r+=a-a%100,r>s&&(r-=100)}return r},r=function(e,r,t){var n,a=e.days,i=e._upperDays;return i||(e._upperDays=i=[u(a.names),u(a.namesAbbr),u(a.namesShort)]),r=s(r),t?(n=l(i[1],r),-1===n&&(n=l(i[2],r))):n=l(i[0],r),n},t=function(e,r,t){var n=e.months,a=e.monthsGenitive||e.months,i=e._upperMonths,c=e._upperMonthsGen;i||(e._upperMonths=i=[u(n.names),u(n.namesAbbr)],e._upperMonthsGen=c=[u(a.names),u(a.namesAbbr)]),r=s(r);var o=l(t?i[1]:i[0],r);return 0>o&&(o=l(t?c[1]:c[0],r)),o},n=function(e,r){var t=e._parseRegExp;if(t){var n=t[r];if(n)return n}else e._parseRegExp=t={};for(var a,s=y(e,r).replace(/([\^\$\.\*\+\?\|\[\]\(\)\{\}])/g,"\\\\$1"),u=["^"],l=[],i=0,c=0,o=k();null!==(a=o.exec(s));){var f=s.slice(i,a.index);if(i=o.lastIndex,c+=m(f,u),c%2)u.push(a[0]);else{var d,p=a[0],h=p.length;switch(p){case"dddd":case"ddd":case"MMMM":case"MMM":case"gg":case"g":d="(\\D+)";break;case"tt":case"t":d="(\\D*)";break;case"yyyy":case"fff":case"ff":case"f":d="(\\d{"+h+"})";break;case"dd":case"d":case"MM":case"M":case"yy":case"y":case"HH":case"H":case"hh":case"h":case"mm":case"m":case"ss":case"s":d="(\\d\\d?)";break;case"zzz":d="([+-]?\\d\\d?:\\d{2})";break;case"zz":case"z":d="([+-]?\\d\\d?)";break;case"/":d="(\\/)";break;default:throw"Invalid date format pattern '"+p+"'."}d&&u.push(d),l.push(a[0])}}m(s.slice(i),u),u.push("$");var g=u.join("").replace(/\s+/g,"\\s+"),b={regExp:g,groups:l};return t[r]=b},a=function(e,r,t){return r>e||e>t},s=function(e){return e.split("\u00a0").join(" ").toUpperCase()},u=function(e){for(var r=[],t=0,n=e.length;n>t;t++)r[t]=s(e[t]);return r},A=function(s,u,l){s=h(s);var i=l.calendar,c=n(i,u),o=RegExp(c.regExp).exec(s);if(null===o)return null;for(var f,d=c.groups,g=null,b=null,m=null,y=null,M=null,v=0,k=0,z=0,F=0,A=null,x=!1,I=0,S=d.length;S>I;I++){var w=o[I+1];if(w){var C=d[I],D=C.length,H=parseInt(w,10);switch(C){case"dd":case"d":if(y=H,a(y,1,31))return null;break;case"MMM":case"MMMM":if(m=t(i,w,3===D),a(m,0,11))return null;break;case"M":case"MM":if(m=H-1,a(m,0,11))return null;break;case"y":case"yy":case"yyyy":if(b=4>D?e(i,H):H,a(b,0,9999))return null;break;case"h":case"hh":if(v=H,12===v&&(v=0),a(v,0,11))return null;break;case"H":case"HH":if(v=H,a(v,0,23))return null;break;case"m":case"mm":if(k=H,a(k,0,59))return null;break;case"s":case"ss":if(z=H,a(z,0,59))return null;break;case"tt":case"t":if(x=i.PM&&(w===i.PM[0]||w===i.PM[1]||w===i.PM[2]),!x&&(!i.AM||w!==i.AM[0]&&w!==i.AM[1]&&w!==i.AM[2]))return null;break;case"f":case"ff":case"fff":if(F=H*Math.pow(10,3-D),a(F,0,999))return null;break;case"ddd":case"dddd":if(M=r(i,w,3===D),a(M,0,6))return null;break;case"zzz":var O=w.split(/:/);if(2!==O.length)return null;if(f=parseInt(O[0],10),a(f,-12,13))return null;var N=parseInt(O[1],10);if(a(N,0,59))return null;A=60*f+(p(w,"-")?-N:N);break;case"z":case"zz":if(f=H,a(f,-12,13))return null;A=60*f;break;case"g":case"gg":var T=w;if(!T||!i.eras)return null;T=h(T.toLowerCase());for(var j=0,$=i.eras.length;$>j;j++)if(T===i.eras[j].name.toLowerCase()){g=j;break}if(null===g)return null}}}var P,G=new Date,E=i.convert;if(P=E?E.fromGregorian(G)[0]:G.getFullYear(),null===b?b=P:i.eras&&(b+=i.eras[g||0].offset),null===m&&(m=0),null===y&&(y=1),E){if(G=E.toGregorian(b,m,y),null===G)return null}else{if(G.setFullYear(b,m,y),G.getDate()!==y)return null;if(null!==M&&G.getDay()!==M)return null}if(x&&12>v&&(v+=12),G.setHours(v,k,z,F),null!==A){var Y=G.getMinutes()-(A+G.getTimezoneOffset());G.setHours(G.getHours()+parseInt(Y/60,10),Y%60)}return G}}(),x=function(e,r,t){var n,a=r["-"],s=r["+"];switch(t){case"n -":a=" "+a,s=" "+s;case"n-":i(e,a)?n=["-",e.substr(0,e.length-a.length)]:i(e,s)&&(n=["+",e.substr(0,e.length-s.length)]);break;case"- n":a+=" ",s+=" ";case"-n":p(e,a)?n=["-",e.substr(a.length)]:p(e,s)&&(n=["+",e.substr(s.length)]);break;case"(n)":p(e,"(")&&i(e,")")&&(n=["-",e.substr(1,e.length-2)])}return n||["",e]},t.prototype.findClosestCulture=function(e){return t.findClosestCulture.call(this,e)},t.prototype.format=function(e,r,n){return t.format.call(this,e,r,n)},t.prototype.localize=function(e,r){return t.localize.call(this,e,r)},t.prototype.parseInt=function(e,r,n){return t.parseInt.call(this,e,r,n)},t.prototype.parseFloat=function(e,r,n){return t.parseFloat.call(this,e,r,n)},t.prototype.culture=function(e){return t.culture.call(this,e)},t.addCultureInfo=function(e,r,t){var n={},a=!1;"string"!=typeof e?(t=e,e=this.culture().name,n=this.cultures[e]):"string"!=typeof r?(t=r,a=null==this.cultures[e],n=this.cultures[e]||this.cultures["default"]):(a=!0,n=this.cultures[r]),this.cultures[e]=c(!0,{},n,t),a&&(this.cultures[e].calendar=this.cultures[e].calendars.standard)},t.findClosestCulture=function(e){var r;if(!e)return this.findClosestCulture(this.cultureSelector)||this.cultures["default"];Eif("string"==typeof e&&(e=e.split(",")),o(e)){var t,n,a=this.cultures,s=e,u=s.length,l=[];for(n=0;u>n;n++){e=h(s[n]);var i,c=e.split(";");t=h(c[0]),1===c.length?i=1:(e=h(c[1]),0===e.indexOf("q=")?(e=e.substr(2),i=parseFloat(e),i=isNaN(i)?0:i):i=1),l.push({lang:t,pri:i})}for(l.sort(function(e,r){return e.pri<r.pri?1:e.pri>r.pri?-1:0}),n=0;u>n;n++)if(t=l[n].lang,r=a[t])return r;for(n=0;u>n;n++)for(t=l[n].lang;;){var f=t.lastIndexOf("-");if(-1===f)break;Iif(t=t.substr(0,f),r=a[t])return r}for(n=0;u>n;n++){t=l[n].lang;for(var d in a){var p=a[d];Iif(p.language===t)return p}}}else if("object"==typeof e)return e;return r||null},t.format=function(e,r,t){var n=this.findClosestCulture(t);return e instanceof Date?e=M(e,r,n):"number"==typeof e&&(e=v(e,r,n)),e},t.localize=function(e,r){return this.findClosestCulture(r).messages[e]||this.cultures["default"].messages[e]},t.parseDate=function(e,r,t){t=this.findClosestCulture(t);var n,a,s;if(r){if("string"==typeof r&&(r=[r]),r.length)for(var u=0,l=r.length;l>u;u++){var i=r[u];if(i&&(n=A(e,i,t)))break}}else{s=t.calendar.patterns;for(a in s)if(n=A(e,s[a],t))break}return n||null},t.parseInt=function(e,r,n){return g(t.parseFloat(e,r,n))},t.parseFloat=function(e,r,t){"number"!=typeof r&&(t=r,r=10);var u=this.findClosestCulture(t),l=0/0,i=u.numberFormat;if(e.indexOf(u.numberFormat.currency.symbol)>-1&&(e=e.replace(u.numberFormat.currency.symbol,""),e=e.replace(u.numberFormat.currency["."],u.numberFormat["."])),e.indexOf(u.numberFormat.percent.symbol)>-1&&(e=e.replace(u.numberFormat.percent.symbol,"")),e=e.replace(/ /g,""),a.test(e))l=parseFloat(e);else if(!r&&n.test(e))l=parseInt(e,16);else{var c=x(e,i,i.pattern[0]),o=c[0],f=c[1];""===o&&"(n)"!==i.pattern[0]&&(c=x(e,i,"(n)"),o=c[0],f=c[1]),""===o&&"-n"!==i.pattern[0]&&(c=x(e,i,"-n"),o=c[0],f=c[1]),o=o||"+";var d,p,h=f.indexOf("e");0>h&&(h=f.indexOf("E")),0>h?(p=f,d=null):(p=f.substr(0,h),d=f.substr(h+1));var g,b,m=i["."],y=p.indexOf(m);0>y?(g=p,b=null):(g=p.substr(0,y),b=p.substr(y+m.length));var M=i[","];g=g.split(M).join("");var v=M.replace(/\u00A0/g," ");M!==v&&(g=g.split(v).join(""));var k=o+g;if(null!==b&&(k+="."+b),null!==d){var z=x(d,i,"-n");k+="e"+(z[0]||"+")+z[1]}s.test(k)&&(l=parseFloat(k))}return l},t.culture=function(e){return e!==r&&(this.cultureSelector=e),this.findClosestCulture(e)||this.cultures["default"]}; return Globalize;}(this));
 
/***/ }),
/* 964 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var AnalyticsEndpoint_1 = __webpack_require__(169);
exports.AnalyticsEndpoint = AnalyticsEndpoint_1.AnalyticsEndpoint;
var EndpointCaller_1 = __webpack_require__(165);
exports.EndpointCaller = EndpointCaller_1.EndpointCaller;
var QueryError_1 = __webpack_require__(213);
exports.QueryError = QueryError_1.QueryError;
 
 
/***/ }),
/* 965 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var _ = __webpack_require__(1);
var SearchEndpointWithDefaultCallOptions = /** @class */ (function () {
    function SearchEndpointWithDefaultCallOptions(endpoint, callOptions) {
        this.endpoint = endpoint;
        this.callOptions = callOptions;
        this.options = endpoint.options;
    }
    Object.defineProperty(SearchEndpointWithDefaultCallOptions.prototype, "accessToken", {
        get: function () {
            return this.endpoint.accessToken;
        },
        enumerable: true,
        configurable: true
    });
    SearchEndpointWithDefaultCallOptions.prototype.getBaseUri = function () {
        return this.endpoint.getBaseUri();
    };
    SearchEndpointWithDefaultCallOptions.prototype.getBaseAlertsUri = function () {
        return this.endpoint.getBaseAlertsUri();
    };
    SearchEndpointWithDefaultCallOptions.prototype.getAuthenticationProviderUri = function (provider, returnUri, message) {
        return this.endpoint.getAuthenticationProviderUri(provider, returnUri, message);
    };
    SearchEndpointWithDefaultCallOptions.prototype.isJsonp = function () {
        return this.endpoint.isJsonp();
    };
    SearchEndpointWithDefaultCallOptions.prototype.search = function (query, callOptions) {
        return this.endpoint.search(query, this.enrichCallOptions(callOptions));
    };
    SearchEndpointWithDefaultCallOptions.prototype.fetchBinary = function (query, callOptions) {
        return this.endpoint.fetchBinary(query, this.enrichCallOptions(callOptions));
    };
    SearchEndpointWithDefaultCallOptions.prototype.plan = function (query, callOptions) {
        return this.endpoint.plan(query, this.enrichCallOptions(callOptions));
    };
    SearchEndpointWithDefaultCallOptions.prototype.getExportToExcelLink = function (query, numberOfResults, callOptions) {
        return this.endpoint.getExportToExcelLink(query, numberOfResults, this.enrichCallOptions(callOptions));
    };
    SearchEndpointWithDefaultCallOptions.prototype.tagDocument = function (taggingRequest, callOptions) {
        return this.endpoint.tagDocument(taggingRequest, this.enrichCallOptions(callOptions));
    };
    SearchEndpointWithDefaultCallOptions.prototype.getQuerySuggest = function (request, callOptions) {
        return this.endpoint.getQuerySuggest(request, this.enrichCallOptions(callOptions));
    };
    SearchEndpointWithDefaultCallOptions.prototype.facetSearch = function (request, callOptions) {
        return this.endpoint.facetSearch(request, this.enrichCallOptions(callOptions));
    };
    SearchEndpointWithDefaultCallOptions.prototype.rateDocument = function (ratingRequest, callOptions) {
        return this.endpoint.rateDocument(ratingRequest, this.enrichCallOptions(callOptions));
    };
    SearchEndpointWithDefaultCallOptions.prototype.getRawDataStream = function (documentUniqueId, dataStreamType, callOptions) {
        return this.endpoint.getRawDataStream(documentUniqueId, dataStreamType, this.enrichCallOptions(callOptions));
    };
    SearchEndpointWithDefaultCallOptions.prototype.getDocument = function (documentUniqueId, callOptions) {
        return this.endpoint.getDocument(documentUniqueId, this.enrichCallOptions(callOptions));
    };
    SearchEndpointWithDefaultCallOptions.prototype.getDocumentText = function (documentUniqueID, callOptions) {
        return this.endpoint.getDocumentText(documentUniqueID, this.enrichCallOptions(callOptions));
    };
    SearchEndpointWithDefaultCallOptions.prototype.getDocumentHtml = function (documentUniqueID, callOptions) {
        return this.endpoint.getDocumentHtml(documentUniqueID, this.enrichCallOptions(callOptions));
    };
    SearchEndpointWithDefaultCallOptions.prototype.getViewAsHtmlUri = function (documentUniqueID, callOptions) {
        return this.endpoint.getViewAsHtmlUri(documentUniqueID, this.enrichCallOptions(callOptions));
    };
    SearchEndpointWithDefaultCallOptions.prototype.getViewAsDatastreamUri = function (documentUniqueID, dataStreamType, callOptions) {
        return this.endpoint.getViewAsDatastreamUri(documentUniqueID, dataStreamType, this.enrichCallOptions(callOptions));
    };
    SearchEndpointWithDefaultCallOptions.prototype.listFieldValuesBatch = function (request, callOptions) {
        return this.endpoint.listFieldValuesBatch(request, this.enrichCallOptions(callOptions));
    };
    SearchEndpointWithDefaultCallOptions.prototype.listFieldValues = function (request, callOptions) {
        return this.endpoint.listFieldValues(request, this.enrichCallOptions(callOptions));
    };
    SearchEndpointWithDefaultCallOptions.prototype.listFields = function (callOptions) {
        return this.endpoint.listFields(this.enrichCallOptions(callOptions));
    };
    SearchEndpointWithDefaultCallOptions.prototype.extensions = function (callOptions) {
        return this.endpoint.extensions(this.enrichCallOptions(callOptions));
    };
    SearchEndpointWithDefaultCallOptions.prototype.follow = function (request) {
        return this.endpoint.follow(request);
    };
    SearchEndpointWithDefaultCallOptions.prototype.listSubscriptions = function (page) {
        return this.endpoint.listSubscriptions(page);
    };
    SearchEndpointWithDefaultCallOptions.prototype.updateSubscription = function (subscription) {
        return this.endpoint.updateSubscription(subscription);
    };
    SearchEndpointWithDefaultCallOptions.prototype.deleteSubscription = function (subscription) {
        return this.endpoint.deleteSubscription(subscription);
    };
    SearchEndpointWithDefaultCallOptions.prototype.logError = function (sentryLog) {
        return this.endpoint.logError(sentryLog);
    };
    SearchEndpointWithDefaultCallOptions.prototype.exchangeHandshakeToken = function (options) {
        return this.endpoint.exchangeHandshakeToken(options);
    };
    SearchEndpointWithDefaultCallOptions.prototype.enrichCallOptions = function (callOptions) {
        return _.extend({}, callOptions, this.callOptions);
    };
    return SearchEndpointWithDefaultCallOptions;
}());
exports.SearchEndpointWithDefaultCallOptions = SearchEndpointWithDefaultCallOptions;
 
 
/***/ }),
/* 966 */
/***/ (function(module, exports, __webpack_require__) {
 
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (root) {/*global exports, Intl*/
/**
 * This script gives you the zone info key representing your device's time zone setting.
 *
 * @name jsTimezoneDetect
 * @version 1.0.6
 * @author Jon Nylander
 * @license MIT License - https://bitbucket.org/pellepim/jstimezonedetect/src/default/LICENCE.txt
 *
 * For usage and examples, visit:
 * http://pellepim.bitbucket.org/jstz/
 *
 * Copyright (c) Jon Nylander
 */
 
 
/**
 * Namespace to hold all the code for timezone detection.
 */
var jstz = (function () {
    'use strict';
    var HEMISPHERE_SOUTH = 's',
 
        consts = {
            DAY: 86400000,
            HOUR: 3600000,
            MINUTE: 60000,
            SECOND: 1000,
            BASELINE_YEAR: 2014,
            MAX_SCORE: 864000000, // 10 days
            AMBIGUITIES: {
                'America/Denver':       ['America/Mazatlan'],
                'Europe/London':        ['Africa/Casablanca'],
                'America/Chicago':      ['America/Mexico_City'],
                'America/Asuncion':     ['America/Campo_Grande', 'America/Santiago'],
                'America/Montevideo':   ['America/Sao_Paulo', 'America/Santiago'],
                // Europe/Minsk should not be in this list... but Windows.
                'Asia/Beirut':          ['Asia/Amman', 'Asia/Jerusalem', 'Europe/Helsinki', 'Asia/Damascus', 'Africa/Cairo', 'Asia/Gaza', 'Europe/Minsk'],
                'Pacific/Auckland':     ['Pacific/Fiji'],
                'America/Los_Angeles':  ['America/Santa_Isabel'],
                'America/New_York':     ['America/Havana'],
                'America/Halifax':      ['America/Goose_Bay'],
                'America/Godthab':      ['America/Miquelon'],
                'Asia/Dubai':           ['Asia/Yerevan'],
                'Asia/Jakarta':         ['Asia/Krasnoyarsk'],
                'Asia/Shanghai':        ['Asia/Irkutsk', 'Australia/Perth'],
                'Australia/Sydney':     ['Australia/Lord_Howe'],
                'Asia/Tokyo':           ['Asia/Yakutsk'],
                'Asia/Dhaka':           ['Asia/Omsk'],
                // In the real world Yerevan is not ambigous for Baku... but Windows.
                'Asia/Baku':            ['Asia/Yerevan'],
                'Australia/Brisbane':   ['Asia/Vladivostok'],
                'Pacific/Noumea':       ['Asia/Vladivostok'],
                'Pacific/Majuro':       ['Asia/Kamchatka', 'Pacific/Fiji'],
                'Pacific/Tongatapu':    ['Pacific/Apia'],
                'Asia/Baghdad':         ['Europe/Minsk', 'Europe/Moscow'],
                'Asia/Karachi':         ['Asia/Yekaterinburg'],
                'Africa/Johannesburg':  ['Asia/Gaza', 'Africa/Cairo']
            }
        },
 
        /**
         * Gets the offset in minutes from UTC for a certain date.
         * @param {Date} date
         * @returns {Number}
         */
        get_date_offset = function get_date_offset(date) {
            var offset = -date.getTimezoneOffset();
            return (offset !== null ? offset : 0);
        },
 
        /**
         * This function does some basic calculations to create information about
         * the user's timezone. It uses REFERENCE_YEAR as a solid year for which
         * the script has been tested rather than depend on the year set by the
         * client device.
         *
         * Returns a key that can be used to do lookups in jstz.olson.timezones.
         * eg: "720,1,2".
         *
         * @returns {String}
         */
        lookup_key = function lookup_key() {
            var january_offset = get_date_offset(new Date(consts.BASELINE_YEAR, 0, 2)),
                june_offset = get_date_offset(new Date(consts.BASELINE_YEAR, 5, 2)),
                diff = january_offset - june_offset;
 
            if (diff < 0) {
                return january_offset + ",1";
            } else if (diff > 0) {
                return june_offset + ",1," + HEMISPHERE_SOUTH;
            }
 
            return january_offset + ",0";
        },
 
 
        /**
         * Tries to get the time zone key directly from the operating system for those
         * environments that support the ECMAScript Internationalization API.
         */
        get_from_internationalization_api = function get_from_internationalization_api() {
            var format, timezone;
            Iif (typeof Intl === "undefined" || typeof Intl.DateTimeFormat === "undefined") {
                return;
            }
 
            format = Intl.DateTimeFormat();
 
            Iif (typeof format === "undefined" || typeof format.resolvedOptions === "undefined") {
                return;
            }
 
            timezone = format.resolvedOptions().timeZone;
 
            Eif (timezone && (timezone.indexOf("/") > -1 || timezone === 'UTC')) {
                return timezone;
            }
 
        },
 
        /**
         * Starting point for getting all the DST rules for a specific year
         * for the current timezone (as described by the client system).
         *
         * Returns an object with start and end attributes, or false if no
         * DST rules were found for the year.
         *
         * @param year
         * @returns {Object} || {Boolean}
         */
        dst_dates = function dst_dates(year) {
            var yearstart = new Date(year, 0, 1, 0, 0, 1, 0).getTime();
            var yearend = new Date(year, 12, 31, 23, 59, 59).getTime();
            var current = yearstart;
            var offset = (new Date(current)).getTimezoneOffset();
            var dst_start = null;
            var dst_end = null;
 
            while (current < yearend - 86400000) {
                var dateToCheck = new Date(current);
                var dateToCheckOffset = dateToCheck.getTimezoneOffset();
 
                if (dateToCheckOffset !== offset) {
                    if (dateToCheckOffset < offset) {
                        dst_start = dateToCheck;
                    }
                    if (dateToCheckOffset > offset) {
                        dst_end = dateToCheck;
                    }
                    offset = dateToCheckOffset;
                }
 
                current += 86400000;
            }
 
            if (dst_start && dst_end) {
                return {
                    s: find_dst_fold(dst_start).getTime(),
                    e: find_dst_fold(dst_end).getTime()
                };
            }
 
            return false;
        },
 
        /**
         * Probably completely unnecessary function that recursively finds the
         * exact (to the second) time when a DST rule was changed.
         *
         * @param a_date - The candidate Date.
         * @param padding - integer specifying the padding to allow around the candidate
         *                  date for finding the fold.
         * @param iterator - integer specifying how many milliseconds to iterate while
         *                   searching for the fold.
         *
         * @returns {Date}
         */
        find_dst_fold = function find_dst_fold(a_date, padding, iterator) {
            if (typeof padding === 'undefined') {
                padding = consts.DAY;
                iterator = consts.HOUR;
            }
 
            var date_start = new Date(a_date.getTime() - padding).getTime();
            var date_end = a_date.getTime() + padding;
            var offset = new Date(date_start).getTimezoneOffset();
 
            var current = date_start;
 
            var dst_change = null;
            while (current < date_end - iterator) {
                var dateToCheck = new Date(current);
                var dateToCheckOffset = dateToCheck.getTimezoneOffset();
 
                if (dateToCheckOffset !== offset) {
                    dst_change = dateToCheck;
                    break;
                }
                current += iterator;
            }
 
            if (padding === consts.DAY) {
                return find_dst_fold(dst_change, consts.HOUR, consts.MINUTE);
            }
 
            if (padding === consts.HOUR) {
                return find_dst_fold(dst_change, consts.MINUTE, consts.SECOND);
            }
 
            return dst_change;
        },
 
        windows7_adaptations = function windows7_adaptions(rule_list, preliminary_timezone, score, sample) {
            if (score !== 'N/A') {
                return score;
            }
            if (preliminary_timezone === 'Asia/Beirut') {
                if (sample.name === 'Africa/Cairo') {
                    if (rule_list[6].s === 1398376800000 && rule_list[6].e === 1411678800000) {
                        return 0;
                    }
                }
                if (sample.name === 'Asia/Jerusalem') {
                    if (rule_list[6].s === 1395964800000 && rule_list[6].e === 1411858800000) {
                        return 0;
                }
            }
            } else if (preliminary_timezone === 'America/Santiago') {
                if (sample.name === 'America/Asuncion') {
                    if (rule_list[6].s === 1412481600000 && rule_list[6].e === 1397358000000) {
                        return 0;
                    }
                }
                if (sample.name === 'America/Campo_Grande') {
                    if (rule_list[6].s === 1413691200000 && rule_list[6].e === 1392519600000) {
                        return 0;
                    }
                }
            } else if (preliminary_timezone === 'America/Montevideo') {
                if (sample.name === 'America/Sao_Paulo') {
                    if (rule_list[6].s === 1413687600000 && rule_list[6].e === 1392516000000) {
                        return 0;
                    }
                }
            } else if (preliminary_timezone === 'Pacific/Auckland') {
                if (sample.name === 'Pacific/Fiji') {
                    if (rule_list[6].s === 1414245600000 && rule_list[6].e === 1396101600000) {
                        return 0;
                    }
                }
            }
 
            return score;
        },
 
        /**
         * Takes the DST rules for the current timezone, and proceeds to find matches
         * in the jstz.olson.dst_rules.zones array.
         *
         * Compares samples to the current timezone on a scoring basis.
         *
         * Candidates are ruled immediately if either the candidate or the current zone
         * has a DST rule where the other does not.
         *
         * Candidates are ruled out immediately if the current zone has a rule that is
         * outside the DST scope of the candidate.
         *
         * Candidates are included for scoring if the current zones rules fall within the
         * span of the samples rules.
         *
         * Low score is best, the score is calculated by summing up the differences in DST
         * rules and if the consts.MAX_SCORE is overreached the candidate is ruled out.
         *
         * Yah follow? :)
         *
         * @param rule_list
         * @param preliminary_timezone
         * @returns {*}
         */
        best_dst_match = function best_dst_match(rule_list, preliminary_timezone) {
            var score_sample = function score_sample(sample) {
                var score = 0;
 
                for (var j = 0; j < rule_list.length; j++) {
 
                    // Both sample and current time zone report DST during the year.
                    if (!!sample.rules[j] && !!rule_list[j]) {
 
                        // The current time zone's DST rules are inside the sample's. Include.
                        if (rule_list[j].s >= sample.rules[j].s && rule_list[j].e <= sample.rules[j].e) {
                            score = 0;
                            score += Math.abs(rule_list[j].s - sample.rules[j].s);
                            score += Math.abs(sample.rules[j].e - rule_list[j].e);
 
                        // The current time zone's DST rules are outside the sample's. Discard.
                        } else {
                            score = 'N/A';
                            break;
                        }
 
                        // The max score has been reached. Discard.
                        if (score > consts.MAX_SCORE) {
                            score = 'N/A';
                            break;
                        }
                    }
                }
 
                score = windows7_adaptations(rule_list, preliminary_timezone, score, sample);
 
                return score;
            };
            var scoreboard = {};
            var dst_zones = jstz.olson.dst_rules.zones;
            var dst_zones_length = dst_zones.length;
            var ambiguities = consts.AMBIGUITIES[preliminary_timezone];
 
            for (var i = 0; i < dst_zones_length; i++) {
                var sample = dst_zones[i];
                var score = score_sample(dst_zones[i]);
 
                if (score !== 'N/A') {
                    scoreboard[sample.name] = score;
                }
            }
 
            for (var tz in scoreboard) {
                if (scoreboard.hasOwnProperty(tz)) {
                    for (var j = 0; j < ambiguities.length; j++) {
                        if (ambiguities[j] === tz) {
                            return tz;
                        }
                    }
                }
            }
 
            return preliminary_timezone;
        },
 
        /**
         * Takes the preliminary_timezone as detected by lookup_key().
         *
         * Builds up the current timezones DST rules for the years defined
         * in the jstz.olson.dst_rules.years array.
         *
         * If there are no DST occurences for those years, immediately returns
         * the preliminary timezone. Otherwise proceeds and tries to solve
         * ambiguities.
         *
         * @param preliminary_timezone
         * @returns {String} timezone_name
         */
        get_by_dst = function get_by_dst(preliminary_timezone) {
            var get_rules = function get_rules() {
                var rule_list = [];
                for (var i = 0; i < jstz.olson.dst_rules.years.length; i++) {
                    var year_rules = dst_dates(jstz.olson.dst_rules.years[i]);
                    rule_list.push(year_rules);
                }
                return rule_list;
            };
            var check_has_dst = function check_has_dst(rules) {
                for (var i = 0; i < rules.length; i++) {
                    if (rules[i] !== false) {
                        return true;
                    }
                }
                return false;
            };
            var rules = get_rules();
            var has_dst = check_has_dst(rules);
 
            if (has_dst) {
                return best_dst_match(rules, preliminary_timezone);
            }
 
            return preliminary_timezone;
        },
 
        /**
         * Uses get_timezone_info() to formulate a key to use in the olson.timezones dictionary.
         *
         * Returns an object with one function ".name()"
         *
         * @returns Object
         */
        determine = function determine() {
            var preliminary_tz = get_from_internationalization_api();
 
            Iif (!preliminary_tz) {
                preliminary_tz = jstz.olson.timezones[lookup_key()];
 
                if (typeof consts.AMBIGUITIES[preliminary_tz] !== 'undefined') {
                    preliminary_tz = get_by_dst(preliminary_tz);
                }
            }
 
            return {
                name: function () {
                    return preliminary_tz;
                }
            };
        };
 
    return {
        determine: determine
    };
}());
 
 
jstz.olson = jstz.olson || {};
 
/**
 * The keys in this dictionary are comma separated as such:
 *
 * First the offset compared to UTC time in minutes.
 *
 * Then a flag which is 0 if the timezone does not take daylight savings into account and 1 if it
 * does.
 *
 * Thirdly an optional 's' signifies that the timezone is in the southern hemisphere,
 * only interesting for timezones with DST.
 *
 * The mapped arrays is used for constructing the jstz.TimeZone object from within
 * jstz.determine();
 */
jstz.olson.timezones = {
    '-720,0': 'Etc/GMT+12',
    '-660,0': 'Pacific/Pago_Pago',
    '-660,1,s': 'Pacific/Apia', // Why? Because windows... cry!
    '-600,1': 'America/Adak',
    '-600,0': 'Pacific/Honolulu',
    '-570,0': 'Pacific/Marquesas',
    '-540,0': 'Pacific/Gambier',
    '-540,1': 'America/Anchorage',
    '-480,1': 'America/Los_Angeles',
    '-480,0': 'Pacific/Pitcairn',
    '-420,0': 'America/Phoenix',
    '-420,1': 'America/Denver',
    '-360,0': 'America/Guatemala',
    '-360,1': 'America/Chicago',
    '-360,1,s': 'Pacific/Easter',
    '-300,0': 'America/Bogota',
    '-300,1': 'America/New_York',
    '-270,0': 'America/Caracas',
    '-240,1': 'America/Halifax',
    '-240,0': 'America/Santo_Domingo',
    '-240,1,s': 'America/Asuncion',
    '-210,1': 'America/St_Johns',
    '-180,1': 'America/Godthab',
    '-180,0': 'America/Argentina/Buenos_Aires',
    '-180,1,s': 'America/Montevideo',
    '-120,0': 'America/Noronha',
    '-120,1': 'America/Noronha',
    '-60,1': 'Atlantic/Azores',
    '-60,0': 'Atlantic/Cape_Verde',
    '0,0': 'UTC',
    '0,1': 'Europe/London',
    '60,1': 'Europe/Berlin',
    '60,0': 'Africa/Lagos',
    '60,1,s': 'Africa/Windhoek',
    '120,1': 'Asia/Beirut',
    '120,0': 'Africa/Johannesburg',
    '180,0': 'Asia/Baghdad',
    '180,1': 'Europe/Moscow',
    '210,1': 'Asia/Tehran',
    '240,0': 'Asia/Dubai',
    '240,1': 'Asia/Baku',
    '270,0': 'Asia/Kabul',
    '300,1': 'Asia/Yekaterinburg',
    '300,0': 'Asia/Karachi',
    '330,0': 'Asia/Kolkata',
    '345,0': 'Asia/Kathmandu',
    '360,0': 'Asia/Dhaka',
    '360,1': 'Asia/Omsk',
    '390,0': 'Asia/Rangoon',
    '420,1': 'Asia/Krasnoyarsk',
    '420,0': 'Asia/Jakarta',
    '480,0': 'Asia/Shanghai',
    '480,1': 'Asia/Irkutsk',
    '525,0': 'Australia/Eucla',
    '525,1,s': 'Australia/Eucla',
    '540,1': 'Asia/Yakutsk',
    '540,0': 'Asia/Tokyo',
    '570,0': 'Australia/Darwin',
    '570,1,s': 'Australia/Adelaide',
    '600,0': 'Australia/Brisbane',
    '600,1': 'Asia/Vladivostok',
    '600,1,s': 'Australia/Sydney',
    '630,1,s': 'Australia/Lord_Howe',
    '660,1': 'Asia/Kamchatka',
    '660,0': 'Pacific/Noumea',
    '690,0': 'Pacific/Norfolk',
    '720,1,s': 'Pacific/Auckland',
    '720,0': 'Pacific/Majuro',
    '765,1,s': 'Pacific/Chatham',
    '780,0': 'Pacific/Tongatapu',
    '780,1,s': 'Pacific/Apia',
    '840,0': 'Pacific/Kiritimati'
};
 
/* Build time: 2015-11-02 13:01:00Z Build by invoking python utilities/dst.py generate */
jstz.olson.dst_rules = {
    "years": [
        2008,
        2009,
        2010,
        2011,
        2012,
        2013,
        2014
    ],
    "zones": [
        {
            "name": "Africa/Cairo",
            "rules": [
                {
                    "e": 1219957200000,
                    "s": 1209074400000
                },
                {
                    "e": 1250802000000,
                    "s": 1240524000000
                },
                {
                    "e": 1285880400000,
                    "s": 1284069600000
                },
                false,
                false,
                false,
                {
                    "e": 1411678800000,
                    "s": 1406844000000
                }
            ]
        },
        {
            "name": "Africa/Casablanca",
            "rules": [
                {
                    "e": 1220223600000,
                    "s": 1212278400000
                },
                {
                    "e": 1250809200000,
                    "s": 1243814400000
                },
                {
                    "e": 1281222000000,
                    "s": 1272758400000
                },
                {
                    "e": 1312066800000,
                    "s": 1301788800000
                },
                {
                    "e": 1348970400000,
                    "s": 1345428000000
                },
                {
                    "e": 1382839200000,
                    "s": 1376100000000
                },
                {
                    "e": 1414288800000,
                    "s": 1406944800000
                }
            ]
        },
        {
            "name": "America/Asuncion",
            "rules": [
                {
                    "e": 1205031600000,
                    "s": 1224388800000
                },
                {
                    "e": 1236481200000,
                    "s": 1255838400000
                },
                {
                    "e": 1270954800000,
                    "s": 1286078400000
                },
                {
                    "e": 1302404400000,
                    "s": 1317528000000
                },
                {
                    "e": 1333854000000,
                    "s": 1349582400000
                },
                {
                    "e": 1364094000000,
                    "s": 1381032000000
                },
                {
                    "e": 1395543600000,
                    "s": 1412481600000
                }
            ]
        },
        {
            "name": "America/Campo_Grande",
            "rules": [
                {
                    "e": 1203217200000,
                    "s": 1224388800000
                },
                {
                    "e": 1234666800000,
                    "s": 1255838400000
                },
                {
                    "e": 1266721200000,
                    "s": 1287288000000
                },
                {
                    "e": 1298170800000,
                    "s": 1318737600000
                },
                {
                    "e": 1330225200000,
                    "s": 1350792000000
                },
                {
                    "e": 1361070000000,
                    "s": 1382241600000
                },
                {
                    "e": 1392519600000,
                    "s": 1413691200000
                }
            ]
        },
        {
            "name": "America/Goose_Bay",
            "rules": [
                {
                    "e": 1225594860000,
                    "s": 1205035260000
                },
                {
                    "e": 1257044460000,
                    "s": 1236484860000
                },
                {
                    "e": 1289098860000,
                    "s": 1268539260000
                },
                {
                    "e": 1320555600000,
                    "s": 1299988860000
                },
                {
                    "e": 1352005200000,
                    "s": 1331445600000
                },
                {
                    "e": 1383454800000,
                    "s": 1362895200000
                },
                {
                    "e": 1414904400000,
                    "s": 1394344800000
                }
            ]
        },
        {
            "name": "America/Havana",
            "rules": [
                {
                    "e": 1224997200000,
                    "s": 1205643600000
                },
                {
                    "e": 1256446800000,
                    "s": 1236488400000
                },
                {
                    "e": 1288501200000,
                    "s": 1268542800000
                },
                {
                    "e": 1321160400000,
                    "s": 1300597200000
                },
                {
                    "e": 1352005200000,
                    "s": 1333256400000
                },
                {
                    "e": 1383454800000,
                    "s": 1362891600000
                },
                {
                    "e": 1414904400000,
                    "s": 1394341200000
                }
            ]
        },
        {
            "name": "America/Mazatlan",
            "rules": [
                {
                    "e": 1225008000000,
                    "s": 1207472400000
                },
                {
                    "e": 1256457600000,
                    "s": 1238922000000
                },
                {
                    "e": 1288512000000,
                    "s": 1270371600000
                },
                {
                    "e": 1319961600000,
                    "s": 1301821200000
                },
                {
                    "e": 1351411200000,
                    "s": 1333270800000
                },
                {
                    "e": 1382860800000,
                    "s": 1365325200000
                },
                {
                    "e": 1414310400000,
                    "s": 1396774800000
                }
            ]
        },
        {
            "name": "America/Mexico_City",
            "rules": [
                {
                    "e": 1225004400000,
                    "s": 1207468800000
                },
                {
                    "e": 1256454000000,
                    "s": 1238918400000
                },
                {
                    "e": 1288508400000,
                    "s": 1270368000000
                },
                {
                    "e": 1319958000000,
                    "s": 1301817600000
                },
                {
                    "e": 1351407600000,
                    "s": 1333267200000
                },
                {
                    "e": 1382857200000,
                    "s": 1365321600000
                },
                {
                    "e": 1414306800000,
                    "s": 1396771200000
                }
            ]
        },
        {
            "name": "America/Miquelon",
            "rules": [
                {
                    "e": 1225598400000,
                    "s": 1205038800000
                },
                {
                    "e": 1257048000000,
                    "s": 1236488400000
                },
                {
                    "e": 1289102400000,
                    "s": 1268542800000
                },
                {
                    "e": 1320552000000,
                    "s": 1299992400000
                },
                {
                    "e": 1352001600000,
                    "s": 1331442000000
                },
                {
                    "e": 1383451200000,
                    "s": 1362891600000
                },
                {
                    "e": 1414900800000,
                    "s": 1394341200000
                }
            ]
        },
        {
            "name": "America/Santa_Isabel",
            "rules": [
                {
                    "e": 1225011600000,
                    "s": 1207476000000
                },
                {
                    "e": 1256461200000,
                    "s": 1238925600000
                },
                {
                    "e": 1288515600000,
                    "s": 1270375200000
                },
                {
                    "e": 1319965200000,
                    "s": 1301824800000
                },
                {
                    "e": 1351414800000,
                    "s": 1333274400000
                },
                {
                    "e": 1382864400000,
                    "s": 1365328800000
                },
                {
                    "e": 1414314000000,
                    "s": 1396778400000
                }
            ]
        },
        {
            "name": "America/Santiago",
            "rules": [
                {
                    "e": 1206846000000,
                    "s": 1223784000000
                },
                {
                    "e": 1237086000000,
                    "s": 1255233600000
                },
                {
                    "e": 1270350000000,
                    "s": 1286683200000
                },
                {
                    "e": 1304823600000,
                    "s": 1313899200000
                },
                {
                    "e": 1335668400000,
                    "s": 1346558400000
                },
                {
                    "e": 1367118000000,
                    "s": 1378612800000
                },
                {
                    "e": 1398567600000,
                    "s": 1410062400000
                }
            ]
        },
        {
            "name": "America/Sao_Paulo",
            "rules": [
                {
                    "e": 1203213600000,
                    "s": 1224385200000
                },
                {
                    "e": 1234663200000,
                    "s": 1255834800000
                },
                {
                    "e": 1266717600000,
                    "s": 1287284400000
                },
                {
                    "e": 1298167200000,
                    "s": 1318734000000
                },
                {
                    "e": 1330221600000,
                    "s": 1350788400000
                },
                {
                    "e": 1361066400000,
                    "s": 1382238000000
                },
                {
                    "e": 1392516000000,
                    "s": 1413687600000
                }
            ]
        },
        {
            "name": "Asia/Amman",
            "rules": [
                {
                    "e": 1225404000000,
                    "s": 1206655200000
                },
                {
                    "e": 1256853600000,
                    "s": 1238104800000
                },
                {
                    "e": 1288303200000,
                    "s": 1269554400000
                },
                {
                    "e": 1319752800000,
                    "s": 1301608800000
                },
                false,
                false,
                {
                    "e": 1414706400000,
                    "s": 1395957600000
                }
            ]
        },
        {
            "name": "Asia/Damascus",
            "rules": [
                {
                    "e": 1225486800000,
                    "s": 1207260000000
                },
                {
                    "e": 1256850000000,
                    "s": 1238104800000
                },
                {
                    "e": 1288299600000,
                    "s": 1270159200000
                },
                {
                    "e": 1319749200000,
                    "s": 1301608800000
                },
                {
                    "e": 1351198800000,
                    "s": 1333058400000
                },
                {
                    "e": 1382648400000,
                    "s": 1364508000000
                },
                {
                    "e": 1414702800000,
                    "s": 1395957600000
                }
            ]
        },
        {
            "name": "Asia/Dubai",
            "rules": [
                false,
                false,
                false,
                false,
                false,
                false,
                false
            ]
        },
        {
            "name": "Asia/Gaza",
            "rules": [
                {
                    "e": 1219957200000,
                    "s": 1206655200000
                },
                {
                    "e": 1252015200000,
                    "s": 1238104800000
                },
                {
                    "e": 1281474000000,
                    "s": 1269640860000
                },
                {
                    "e": 1312146000000,
                    "s": 1301608860000
                },
                {
                    "e": 1348178400000,
                    "s": 1333058400000
                },
                {
                    "e": 1380229200000,
                    "s": 1364508000000
                },
                {
                    "e": 1414098000000,
                    "s": 1395957600000
                }
            ]
        },
        {
            "name": "Asia/Irkutsk",
            "rules": [
                {
                    "e": 1224957600000,
                    "s": 1206813600000
                },
                {
                    "e": 1256407200000,
                    "s": 1238263200000
                },
                {
                    "e": 1288461600000,
                    "s": 1269712800000
                },
                false,
                false,
                false,
                false
            ]
        },
        {
            "name": "Asia/Jerusalem",
            "rules": [
                {
                    "e": 1223161200000,
                    "s": 1206662400000
                },
                {
                    "e": 1254006000000,
                    "s": 1238112000000
                },
                {
                    "e": 1284246000000,
                    "s": 1269561600000
                },
                {
                    "e": 1317510000000,
                    "s": 1301616000000
                },
                {
                    "e": 1348354800000,
                    "s": 1333065600000
                },
                {
                    "e": 1382828400000,
                    "s": 1364515200000
                },
                {
                    "e": 1414278000000,
                    "s": 1395964800000
                }
            ]
        },
        {
            "name": "Asia/Kamchatka",
            "rules": [
                {
                    "e": 1224943200000,
                    "s": 1206799200000
                },
                {
                    "e": 1256392800000,
                    "s": 1238248800000
                },
                {
                    "e": 1288450800000,
                    "s": 1269698400000
                },
                false,
                false,
                false,
                false
            ]
        },
        {
            "name": "Asia/Krasnoyarsk",
            "rules": [
                {
                    "e": 1224961200000,
                    "s": 1206817200000
                },
                {
                    "e": 1256410800000,
                    "s": 1238266800000
                },
                {
                    "e": 1288465200000,
                    "s": 1269716400000
                },
                false,
                false,
                false,
                false
            ]
        },
        {
            "name": "Asia/Omsk",
            "rules": [
                {
                    "e": 1224964800000,
                    "s": 1206820800000
                },
                {
                    "e": 1256414400000,
                    "s": 1238270400000
                },
                {
                    "e": 1288468800000,
                    "s": 1269720000000
                },
                false,
                false,
                false,
                false
            ]
        },
        {
            "name": "Asia/Vladivostok",
            "rules": [
                {
                    "e": 1224950400000,
                    "s": 1206806400000
                },
                {
                    "e": 1256400000000,
                    "s": 1238256000000
                },
                {
                    "e": 1288454400000,
                    "s": 1269705600000
                },
                false,
                false,
                false,
                false
            ]
        },
        {
            "name": "Asia/Yakutsk",
            "rules": [
                {
                    "e": 1224954000000,
                    "s": 1206810000000
                },
                {
                    "e": 1256403600000,
                    "s": 1238259600000
                },
                {
                    "e": 1288458000000,
                    "s": 1269709200000
                },
                false,
                false,
                false,
                false
            ]
        },
        {
            "name": "Asia/Yekaterinburg",
            "rules": [
                {
                    "e": 1224968400000,
                    "s": 1206824400000
                },
                {
                    "e": 1256418000000,
                    "s": 1238274000000
                },
                {
                    "e": 1288472400000,
                    "s": 1269723600000
                },
                false,
                false,
                false,
                false
            ]
        },
        {
            "name": "Asia/Yerevan",
            "rules": [
                {
                    "e": 1224972000000,
                    "s": 1206828000000
                },
                {
                    "e": 1256421600000,
                    "s": 1238277600000
                },
                {
                    "e": 1288476000000,
                    "s": 1269727200000
                },
                {
                    "e": 1319925600000,
                    "s": 1301176800000
                },
                false,
                false,
                false
            ]
        },
        {
            "name": "Australia/Lord_Howe",
            "rules": [
                {
                    "e": 1207407600000,
                    "s": 1223134200000
                },
                {
                    "e": 1238857200000,
                    "s": 1254583800000
                },
                {
                    "e": 1270306800000,
                    "s": 1286033400000
                },
                {
                    "e": 1301756400000,
                    "s": 1317483000000
                },
                {
                    "e": 1333206000000,
                    "s": 1349537400000
                },
                {
                    "e": 1365260400000,
                    "s": 1380987000000
                },
                {
                    "e": 1396710000000,
                    "s": 1412436600000
                }
            ]
        },
        {
            "name": "Australia/Perth",
            "rules": [
                {
                    "e": 1206813600000,
                    "s": 1224957600000
                },
                false,
                false,
                false,
                false,
                false,
                false
            ]
        },
        {
            "name": "Europe/Helsinki",
            "rules": [
                {
                    "e": 1224982800000,
                    "s": 1206838800000
                },
                {
                    "e": 1256432400000,
                    "s": 1238288400000
                },
                {
                    "e": 1288486800000,
                    "s": 1269738000000
                },
                {
                    "e": 1319936400000,
                    "s": 1301187600000
                },
                {
                    "e": 1351386000000,
                    "s": 1332637200000
                },
                {
                    "e": 1382835600000,
                    "s": 1364691600000
                },
                {
                    "e": 1414285200000,
                    "s": 1396141200000
                }
            ]
        },
        {
            "name": "Europe/Minsk",
            "rules": [
                {
                    "e": 1224979200000,
                    "s": 1206835200000
                },
                {
                    "e": 1256428800000,
                    "s": 1238284800000
                },
                {
                    "e": 1288483200000,
                    "s": 1269734400000
                },
                false,
                false,
                false,
                false
            ]
        },
        {
            "name": "Europe/Moscow",
            "rules": [
                {
                    "e": 1224975600000,
                    "s": 1206831600000
                },
                {
                    "e": 1256425200000,
                    "s": 1238281200000
                },
                {
                    "e": 1288479600000,
                    "s": 1269730800000
                },
                false,
                false,
                false,
                false
            ]
        },
        {
            "name": "Pacific/Apia",
            "rules": [
                false,
                false,
                false,
                {
                    "e": 1301752800000,
                    "s": 1316872800000
                },
                {
                    "e": 1333202400000,
                    "s": 1348927200000
                },
                {
                    "e": 1365256800000,
                    "s": 1380376800000
                },
                {
                    "e": 1396706400000,
                    "s": 1411826400000
                }
            ]
        },
        {
            "name": "Pacific/Fiji",
            "rules": [
                false,
                false,
                {
                    "e": 1269698400000,
                    "s": 1287842400000
                },
                {
                    "e": 1327154400000,
                    "s": 1319292000000
                },
                {
                    "e": 1358604000000,
                    "s": 1350741600000
                },
                {
                    "e": 1390050000000,
                    "s": 1382796000000
                },
                {
                    "e": 1421503200000,
                    "s": 1414850400000
                }
            ]
        },
        {
            "name": "Europe/London",
            "rules": [
                {
                    "e": 1224982800000,
                    "s": 1206838800000
                },
                {
                    "e": 1256432400000,
                    "s": 1238288400000
                },
                {
                    "e": 1288486800000,
                    "s": 1269738000000
                },
                {
                    "e": 1319936400000,
                    "s": 1301187600000
                },
                {
                    "e": 1351386000000,
                    "s": 1332637200000
                },
                {
                    "e": 1382835600000,
                    "s": 1364691600000
                },
                {
                    "e": 1414285200000,
                    "s": 1396141200000
                }
            ]
        }
    ]
};
Eif (typeof module !== 'undefined' && typeof module.exports !== 'undefined') {
    module.exports = jstz;
} else if (("function" !== 'undefined' && __webpack_require__(967) !== null) && (__webpack_require__(300) != null)) {
    !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function() {
        return jstz;
    }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),
				__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
} else {
    if (typeof root === 'undefined') {
        window.jstz = jstz;
    } else {
        root.jstz = jstz;
    }
}
}());
 
 
/***/ }),
/* 967 */
/***/ (function(module, exports) {
 
module.exports = function() {
	throw new Error("define cannot be used indirect");
};
 
 
/***/ }),
/* 968 */
/***/ (function(module, exports) {
 
// empty (null-loader)
 
/***/ }),
/* 969 */
/***/ (function(module, exports) {
 
// empty (null-loader)
 
/***/ }),
/* 970 */
/***/ (function(module, exports) {
 
// empty (null-loader)
 
/***/ }),
/* 971 */
/***/ (function(module, exports) {
 
// empty (null-loader)
 
/***/ }),
/* 972 */
/***/ (function(module, exports) {
 
// empty (null-loader)
 
/***/ }),
/* 973 */
/***/ (function(module, exports) {
 
module.exports = "<svg focusable=\"false\" enable-background=\"new 0 0 20 20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\" role=\"img\" aria-label=\"Search\"><title>Search</title><g fill=\"currentColor\"><path class=\"coveo-magnifier-circle-svg\" d=\"m8.368 16.736c-4.614 0-8.368-3.754-8.368-8.368s3.754-8.368 8.368-8.368 8.368 3.754 8.368 8.368-3.754 8.368-8.368 8.368m0-14.161c-3.195 0-5.793 2.599-5.793 5.793s2.599 5.793 5.793 5.793 5.793-2.599 5.793-5.793-2.599-5.793-5.793-5.793\"></path><path d=\"m18.713 20c-.329 0-.659-.126-.91-.377l-4.552-4.551c-.503-.503-.503-1.318 0-1.82.503-.503 1.318-.503 1.82 0l4.552 4.551c.503.503.503 1.318 0 1.82-.252.251-.581.377-.91.377\"></path></g></svg>"
 
/***/ }),
/* 974 */
/***/ (function(module, exports) {
 
module.exports = "<svg focusable=\"false\" enable-background=\"new 0 0 16 16\" viewBox=\"0 0 16 16\" xmlns=\"http://www.w3.org/2000/svg\" role=\"img\" aria-label=\"More\"><title>More</title><g fill=\"currentColor\"><path class=\"coveo-more-background-svg\" fill-opacity=\"0\" d=\"m8.03.819c3.987 0 7.227 3.222 7.227 7.181s-3.239 7.181-7.227 7.181c-3.976 0-7.209-3.222-7.209-7.181s3.237-7.181 7.209-7.181\"></path><path d=\"m0 8c0 4.416 3.572 8 7.991 8 4.425 0 8.009-3.581 8.009-8 0-4.416-3.581-8-8.009-8-4.416 0-7.991 3.581-7.991 8m8.031-6.4c3.553 0 6.441 2.872 6.441 6.4s-2.887 6.4-6.441 6.4c-3.544 0-6.425-2.872-6.425-6.4s2.885-6.4 6.425-6.4\"></path><path d=\"m10.988 9.024c.551 0 1-.449 1-1s-.449-1-1-1-1 .449-1 1 .449 1 1 1\"></path><path d=\"m7.991 9c .551 0 1-.449 1-1s-.449-1-1-1-1 .449-1 1 .449 1 1 1\"></path><path d=\"m4.994 9c .551 0 1-.449 1-1s-.449-1-1-1-1 .449-1 1 .449 1 1 1\"></path></g></svg>"
 
/***/ }),
/* 975 */
/***/ (function(module, exports) {
 
module.exports = "<svg focusable=\"false\" enable-background=\"new 0 0 18 18\" viewBox=\"0 0 18 18\" xmlns=\"http://www.w3.org/2000/svg\" role=\"img\" aria-label=\"Loading\"><title>Loading</title><g fill=\"currentColor\"><path d=\"m16.76 8.051c-.448 0-.855-.303-.969-.757-.78-3.117-3.573-5.294-6.791-5.294s-6.01 2.177-6.79 5.294c-.134.537-.679.861-1.213.727-.536-.134-.861-.677-.728-1.212 1.004-4.009 4.594-6.809 8.731-6.809 4.138 0 7.728 2.8 8.73 6.809.135.536-.191 1.079-.727 1.213-.081.02-.162.029-.243.029z\"></path><path d=\"m9 18c-4.238 0-7.943-3.007-8.809-7.149-.113-.541.234-1.071.774-1.184.541-.112 1.071.232 1.184.773.674 3.222 3.555 5.56 6.851 5.56s6.178-2.338 6.852-5.56c.113-.539.634-.892 1.184-.773.54.112.887.643.773 1.184-.866 4.142-4.57 7.149-8.809 7.149z\"></path></g></svg>"
 
/***/ }),
/* 976 */
/***/ (function(module, exports) {
 
module.exports = "<svg focusable=\"false\" enable-background=\"new 0 0 11 11\" viewBox=\"0 0 11 11\" xmlns=\"http://www.w3.org/2000/svg\" role=\"img\" aria-label=\"Toggle\"><title>Toggle</title><g class=\"coveo-more-svg\" fill=\"none\"><path d=\"m10.083 4.583h-3.666v-3.666c0-.524-.393-.917-.917-.917s-.917.393-.917.917v3.667h-3.666c-.524-.001-.917.392-.917.916s.393.917.917.917h3.667v3.667c-.001.523.392.916.916.916s.917-.393.917-.917v-3.666h3.667c.523 0 .916-.393.916-.917-.001-.524-.394-.917-.917-.917z\"></path></g><g class=\"coveo-line-svg\" fill=\"none\"><path d=\"m10 6.5h-9c-.552 0-1-.448-1-1 0-.552.448-1 1-1h9c .552 0 1 .448 1 1 0 .552-.448 1-1 1z\"></path></g><g class=\"coveo-exclusion-svg\" fill=\"none\"><path d=\"m9.233 7.989-2.489-2.489 2.489-2.489c.356-.356.356-.889 0-1.244-.356-.356-.889-.356-1.244 0l-2.489 2.489-2.489-2.489c-.356-.356-.889-.356-1.244 0-.356.356-.356.889 0 1.244l2.489 2.489-2.489 2.489c-.356.356-.356.889 0 1.244.356.356.889.356 1.244 0l2.489-2.489 2.489 2.489c.356.356.889.356 1.244 0 .356-.355.356-.889 0-1.244z\"></path></g><g class=\"coveo-hook-svg\" fill=\"none\"><path d=\"m10.252 2.213c-.155-.142-.354-.211-.573-.213-.215.005-.414.091-.561.24l-4.873 4.932-2.39-2.19c-.154-.144-.385-.214-.57-.214-.214.004-.415.09-.563.24-.148.147-.227.343-.222.549.005.207.093.4.249.542l2.905 2.662c.168.154.388.239.618.239h.022.003c.237-.007.457-.101.618-.266l5.362-5.428c.148-.148.228-.344.223-.551s-.093-.399-.248-.542z\"></path></g></svg>"
 
/***/ }),
/* 977 */
/***/ (function(module, exports) {
 
module.exports = "<svg focusable=\"false\" enable-background=\"new 0 0 10 6\" viewBox=\"0 0 10 6\" xmlns=\"http://www.w3.org/2000/svg\" role=\"img\" aria-label=\"Arrow Up\"><title>Arrow Up</title><g fill=\"currentColor\"><path d=\"m5 .068c.222 0 .443.084.612.253l4.134 4.134c.338.338.338.886 0 1.224s-.886.338-1.224 0l-3.522-3.521-3.523 3.521c-.336.338-.886.338-1.224 0s-.337-.886.001-1.224l4.134-4.134c.168-.169.39-.253.612-.253z\"></path></g></svg>"
 
/***/ }),
/* 978 */
/***/ (function(module, exports) {
 
module.exports = "<svg focusable=\"false\" enable-background=\"new 0 0 10 6\" viewBox=\"0 0 10 6\" xmlns=\"http://www.w3.org/2000/svg\" role=\"img\" aria-label=\"Arrow Down\"><title>Arrow Down</title><g fill=\"currentColor\"><path d=\"m5 5.932c-.222 0-.443-.084-.612-.253l-4.134-4.134c-.338-.338-.338-.886 0-1.224s.886-.338 1.224 0l3.522 3.521 3.523-3.521c.336-.338.886-.338 1.224 0s .337.886-.001 1.224l-4.135 4.134c-.168.169-.39.253-.611.253z\"></path></g></svg>"
 
/***/ }),
/* 979 */
/***/ (function(module, exports) {
 
module.exports = "<svg focusable=\"false\" enable-background=\"new 0 0 13 13\" viewBox=\"0 0 13 13\" xmlns=\"http://www.w3.org/2000/svg\" role=\"img\" aria-label=\"Clear\"><title>Clear</title><g fill=\"currentColor\"><path d=\"m7.881 6.501 4.834-4.834c.38-.38.38-1.001 0-1.381s-1.001-.38-1.381 0l-4.834 4.834-4.834-4.835c-.38-.38-1.001-.38-1.381 0s-.38 1.001 0 1.381l4.834 4.834-4.834 4.834c-.38.38-.38 1.001 0 1.381s1.001.38 1.381 0l4.834-4.834 4.834 4.834c.38.38 1.001.38 1.381 0s .38-1.001 0-1.381z\"></path></g></svg>"
 
/***/ }),
/* 980 */
/***/ (function(module, exports) {
 
module.exports = "<svg viewBox=\"0 0 18 18\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"m9 16c-3.9 0-7-3.1-7-7s3.1-7 7-7 7 3.1 7 7-3.1 7-7 7m0-16c-5 0-9 4-9 9s4 9 9 9 9-4 9-9-4-9-9-9\"></path><path d=\"m11.1 5.5-2.1 2.1-2.1-2.1-1.4 1.4 2.1 2.1-2.1 2.1 1.4 1.4 2.1-2.1 2.1 2.1 1.4-1.4-2.1-2.1 2.1-2.1z\"></path></svg>"
 
/***/ }),
/* 981 */
/***/ (function(module, exports) {
 
module.exports = "<svg focusable=\"false\" enable-background=\"new 0 0 11 11\" viewBox=\"0 0 11 11\" xmlns=\"http://www.w3.org/2000/svg\" role=\"img\" aria-label=\"Clear\"><title>Clear</title><g class=\"coveo-exclusion-svg\" fill=\"none\"><path d=\"m9.233 7.989-2.489-2.489 2.489-2.489c.356-.356.356-.889 0-1.244-.356-.356-.889-.356-1.244 0l-2.489 2.489-2.489-2.489c-.356-.356-.889-.356-1.244 0-.356.356-.356.889 0 1.244l2.489 2.489-2.489 2.489c-.356.356-.356.889 0 1.244.356.356.889.356 1.244 0l2.489-2.489 2.489 2.489c.356.356.889.356 1.244 0 .356-.355.356-.889 0-1.244z\"></path></g></svg>"
 
/***/ }),
/* 982 */
/***/ (function(module, exports) {
 
module.exports = "<svg focusable=\"false\" enable-background=\"new 0 0 11 11\" viewBox=\"0 0 11 11\" xmlns=\"http://www.w3.org/2000/svg\" role=\"img\" aria-label=\"Close\"><title>Close</title><g class=\"coveo-exclusion-svg\" fill=\"none\"><path d=\"m9.233 7.989-2.489-2.489 2.489-2.489c.356-.356.356-.889 0-1.244-.356-.356-.889-.356-1.244 0l-2.489 2.489-2.489-2.489c-.356-.356-.889-.356-1.244 0-.356.356-.356.889 0 1.244l2.489 2.489-2.489 2.489c-.356.356-.356.889 0 1.244.356.356.889.356 1.244 0l2.489-2.489 2.489 2.489c.356.356.889.356 1.244 0 .356-.355.356-.889 0-1.244z\"></path></g></svg>"
 
/***/ }),
/* 983 */
/***/ (function(module, exports) {
 
module.exports = "<svg focusable=\"false\" enable-background=\"new 0 0 11 11\" viewBox=\"0 0 11 11\" xmlns=\"http://www.w3.org/2000/svg\" role=\"img\" aria-label=\"Delete\"><title>Delete</title><g class=\"coveo-exclusion-svg\" fill=\"none\"><path d=\"m9.233 7.989-2.489-2.489 2.489-2.489c.356-.356.356-.889 0-1.244-.356-.356-.889-.356-1.244 0l-2.489 2.489-2.489-2.489c-.356-.356-.889-.356-1.244 0-.356.356-.356.889 0 1.244l2.489 2.489-2.489 2.489c-.356.356-.356.889 0 1.244.356.356.889.356 1.244 0l2.489-2.489 2.489 2.489c.356.356.889.356 1.244 0 .356-.355.356-.889 0-1.244z\"></path></g></svg>"
 
/***/ }),
/* 984 */
/***/ (function(module, exports) {
 
module.exports = "<svg focusable=\"false\" enable-background=\"new 0 0 11 11\" viewBox=\"0 0 11 11\" xmlns=\"http://www.w3.org/2000/svg\" role=\"img\" aria-label=\"Save\"><title>Save</title><g class=\"coveo-hook-svg\" fill=\"none\"><path d=\"m10.252 2.213c-.155-.142-.354-.211-.573-.213-.215.005-.414.091-.561.24l-4.873 4.932-2.39-2.19c-.154-.144-.385-.214-.57-.214-.214.004-.415.09-.563.24-.148.147-.227.343-.222.549.005.207.093.4.249.542l2.905 2.662c.168.154.388.239.618.239h.022.003c.237-.007.457-.101.618-.266l5.362-5.428c.148-.148.228-.344.223-.551s-.093-.399-.248-.542z\"></path></g></svg>"
 
/***/ }),
/* 985 */
/***/ (function(module, exports) {
 
module.exports = "<svg viewBox=\"0 0 96 96\" xmlns=\"http://www.w3.org/2000/svg\"><g><path d=\"m48 .5c-26.2 0-47.5 21.3-47.5 47.5s21.3 47.5 47.5 47.5 47.5-21.3 47.5-47.5-21.3-47.5-47.5-47.5zm0 86.6c-21.6 0-39.1-17.5-39.1-39.1s17.5-39.1 39.1-39.1 39.1 17.5 39.1 39.1-17.5 39.1-39.1 39.1z\"></path><path d=\"m42.1 51.6-11.3-11.4-10 9.9 21.3 21.3 33.4-33.4-9.9-9.9z\"></path></g></svg>"
 
/***/ }),
/* 986 */
/***/ (function(module, exports) {
 
module.exports = "<svg focusable=\"false\" enable-background=\"new 0 0 18 18\" viewBox=\"0 0 18 18\" xmlns=\"http://www.w3.org/2000/svg\" role=\"img\" aria-label=\"Or/And Operator\"><title>Or/And Operator</title><g fill=\"currentColor\"><path class=\"coveo-and-svg\" d=\"m13.769 5.294h-1.063v-1.063c0-2.329-1.894-4.231-4.231-4.231h-4.244c-2.329 0-4.231 1.894-4.231 4.231v4.244c0 2.329 1.894 4.231 4.231 4.231h1.063v1.063c0 2.329 1.894 4.231 4.231 4.231h4.244c2.329 0 4.231-1.894 4.231-4.231v-4.244c0-2.329-1.894-4.231-4.231-4.231zm2.731 8.475c0 1.506-1.225 2.731-2.731 2.731h-4.244c-1.506 0-2.731-1.225-2.731-2.731v-2.563h-2.563c-1.506 0-2.731-1.225-2.731-2.731v-4.244c0-1.506 1.225-2.731 2.731-2.731h4.244c1.506 0 2.731 1.225 2.731 2.731v2.563h2.563c1.506 0 2.731 1.225 2.731 2.731z\"></path><path class=\"coveo-or-svg\" d=\"m11.206 6.794v1.909c0 1.38-1.123 2.503-2.503 2.503h-1.909v-1.909c0-1.38 1.123-2.503 2.503-2.503zm1.5-1.5h-3.409c-2.209 0-4.003 1.792-4.003 4.003v3.409h3.409c2.209 0 4.003-1.792 4.003-4.003z\"></path></g></svg>"
 
/***/ }),
/* 987 */
/***/ (function(module, exports) {
 
module.exports = "<svg focusable=\"false\" enable-background=\"new 0 0 15 14\" viewBox=\"0 0 15 14\" xmlns=\"http://www.w3.org/2000/svg\" role=\"img\" aria-label=\"Sort\"><title>Sort</title><g fill=\"currentColor\"><path class=\"coveo-active-shape-svg\" d=\"m13.002 4.076 0 0c0 .536-.439.975-.975.975h-2.925c-.536 0-.975-.439-.975-.975l0 0c0-.536.439-.975.975-.975h2.925c.537 0 .975.438.975.975z\"></path><path class=\"coveo-active-shape-svg\" d=\"m13.002 9.925 0 0c0 .536-.439.975-.975.975h-2.925c-.536 0-.975-.439-.975-.975l0 0c0-.536.439-.975.975-.975h2.925c.537 0 .975.439.975.975z\"></path><path class=\"coveo-active-shape-svg\" d=\"m15 7 0 0c0 .536-.439.975-.975.975h-4.923c-.536 0-.974-.438-.974-.975l0 0c0-.536.439-.975.975-.975h4.923c.535.001.974.439.974.975z\"></path><path d=\"m4.956 9.837-.671.671v-7.015l.671.671c.381.381.997.381 1.379 0 .381-.38.381-.997 0-1.379l-2.335-2.336c-.183-.184-.431-.286-.69-.286s-.506.102-.689.286l-2.335 2.336c-.381.381-.381.997 0 1.379s.997.381 1.379 0l .671-.671v7.015l-.671-.671c-.381-.381-.997-.381-1.379 0-.381.38-.381.997 0 1.379l2.335 2.336c.182.183.431.286.689.286s.506-.103.69-.287l2.335-2.336c.381-.381.381-.997 0-1.379-.382-.381-.998-.381-1.379.001z\"></path></g></svg>"
 
/***/ }),
/* 988 */
/***/ (function(module, exports) {
 
module.exports = "<svg focusable=\"false\" enable-background=\"new 0 0 15 12\" viewBox=\"0 0 15 12\" xmlns=\"http://www.w3.org/2000/svg\" role=\"img\" aria-label=\"Ascending\"><title>Ascending</title><g fill=\"currentColor\"><path class=\"coveo-active-shape-svg\" d=\"m10.936 2.021 0 0c0 .549-.452.998-1.004.998h-1.004c-.552 0-1.004-.449-1.004-.998l0 0c0-.549.452-.998 1.004-.998h1.004c.552 0 1.004.449 1.004.998z\"></path><path class=\"coveo-active-shape-svg\" d=\"m12.943 5.015 0 0c0 .549-.452.998-1.004.998h-3.011c-.552 0-1.004-.449-1.004-.998l0 0c0-.549.452-.998 1.004-.998h3.011c.553 0 1.004.449 1.004.998z\"></path><path class=\"coveo-active-shape-svg\" d=\"m15 8.008 0 0c0 .549-.452.998-1.004.998h-5.068c-.552 0-1.004-.449-1.004-.998l0 0c0-.549.452-.998 1.004-.998h5.068c.552 0 1.004.449 1.004.998z\"></path><path d=\"m6.521 2.683-2.403-2.391c-.188-.187-.444-.292-.71-.292s-.521.105-.71.292l-2.404 2.391c-.392.39-.392 1.021 0 1.411s1.027.39 1.419 0l .691-.687v7.594c0 .55.452.999 1.004.999s1.004-.449 1.004-.998v-7.594l.691.687c.392.39 1.027.39 1.419 0s .392-1.021-.001-1.412z\"></path></g></svg>"
 
/***/ }),
/* 989 */
/***/ (function(module, exports) {
 
module.exports = "<svg focusable=\"false\" enable-background=\"new 0 0 15 12\" viewBox=\"0 0 15 12\" xmlns=\"http://www.w3.org/2000/svg\" role=\"img\" aria-label=\"Descending\"><title>Descending</title><g fill=\"currentColor\"><path d=\"m6.521 7.906c-.392-.39-1.027-.39-1.419 0l-.69.686v-7.594c0-.549-.452-.998-1.004-.998s-1.004.449-1.004.998v7.594l-.69-.686c-.392-.39-1.027-.39-1.419 0-.392.39-.392 1.021 0 1.411l2.404 2.391c.188.187.443.292.709.292s.522-.105.71-.292l2.404-2.391c.392-.391.392-1.022-.001-1.411z\"></path><path class=\"coveo-active-shape-svg\" d=\"m9.932 11.001h-1.004c-.552 0-1.004-.449-1.004-.998l0 0c0-.549.452-.998 1.004-.998h1.004c.552 0 1.004.449 1.004.998l0 0c0 .549-.452.998-1.004.998z\"></path><path class=\"coveo-active-shape-svg\" d=\"m11.94 8.007h-3.012c-.552 0-1.004-.449-1.004-.998l0 0c0-.549.452-.998 1.004-.998h3.011c.552 0 1.004.449 1.004.998l0 0c0 .549-.451.998-1.003.998z\"></path><path class=\"coveo-active-shape-svg\" d=\"m13.996 5.014h-5.068c-.552 0-1.004-.449-1.004-.998l0 0c0-.549.452-.998 1.004-.998h5.068c.552 0 1.004.449 1.004.998l0 0c0 .548-.452.998-1.004.998z\"></path></g></svg>"
 
/***/ }),
/* 990 */
/***/ (function(module, exports) {
 
module.exports = "<svg focusable=\"false\" enable-background=\"new 0 0 16 16\" viewBox=\"0 0 16 16\" xmlns=\"http://www.w3.org/2000/svg\" role=\"img\" aria-label=\"Dropdown More\"><title>Dropdown More</title><g fill=\"currentColor\"><path class=\"coveo-active-shape-svg\" d=\"m14 2v12h-12v-12zm1.306-2h-14.607c-.386 0-.699.318-.699.694v14.607c0 .384.315.699.699.699h14.602c.385 0 .699-.316.699-.694v-14.612c0-.383-.311-.694-.694-.694z\"></path><path d=\"m10.969 7.055h-1.97v-1.968c0-.571-.448-1.032-1-1.032s-1 .462-1 1.032v1.969h-1.969c-.57 0-1.032.448-1.032 1s .463 1 1.032 1h1.97v1.969c0 .57.448 1.032 1 1.032s1-.463 1-1.032v-1.97h1.969c.571 0 1.032-.448 1.032-1 .001-.552-.462-1-1.032-1z\"></path></g></svg>"
 
/***/ }),
/* 991 */
/***/ (function(module, exports) {
 
module.exports = "<svg focusable=\"false\" enable-background=\"new 0 0 16 16\" viewBox=\"0 0 16 16\" xmlns=\"http://www.w3.org/2000/svg\" role=\"img\" aria-label=\"Dropdown Less\"><title>Dropdown Less</title><g fill=\"currentColor\"><path class=\"coveo-active-shape-svg\" d=\"m14 2v12h-11.999v-12zm1.306-2h-14.607c-.386 0-.699.318-.699.694v14.607c0 .384.315.699.699.699h14.602c.385 0 .699-.316.699-.694v-14.612c0-.383-.311-.694-.694-.694z\"></path><path d=\"m10.969 9.055h-5.939c-.569 0-1.032-.448-1.032-1s .462-1 1.032-1h5.938c.57 0 1.032.448 1.032 1 .001.552-.46 1-1.031 1\"></path></g></svg>"
 
/***/ }),
/* 992 */
/***/ (function(module, exports) {
 
module.exports = "<svg focusable=\"false\" enable-background=\"new 0 0 16 16\" viewBox=\"0 0 16 16\" xmlns=\"http://www.w3.org/2000/svg\" role=\"img\" aria-label=\"Collapse\"><title>Collapse</title><g fill=\"currentColor\"><path class=\"coveo-active-shape-svg\" d=\"m8.01 0c-4.425 0-8.01 3.581-8.01 7.992 0 4.425 3.581 8.01 7.999 8.01l.003-.003c4.417 0 7.999-3.581 7.999-7.999 0-4.417-3.581-7.999-7.992-7.999m.002 1.5c3.58 0 6.493 2.916 6.493 6.5s-2.916 6.5-6.5 6.5h-.172c-3.506-.09-6.331-2.975-6.331-6.508 0-3.58 2.92-6.493 6.51-6.492\"></path><path d=\"m11.04 10.27c-.192 0-.384-.073-.53-.22l-2.51-2.51-2.51 2.51c-.293.293-.768.293-1.061 0s-.293-.768 0-1.061l3.041-3.04c.141-.14.332-.219.53-.219l0 0c .199 0 .39.079.53.22l3.04 3.041c.293.293.293.768 0 1.061-.146.145-.337.218-.53.218z\"></path></g></svg>"
 
/***/ }),
/* 993 */
/***/ (function(module, exports) {
 
module.exports = "<svg focusable=\"false\" enable-background=\"new 0 0 16 16\" viewBox=\"0 0 16 16\" xmlns=\"http://www.w3.org/2000/svg\" role=\"img\" aria-label=\"Expand\"><title>Expand</title><g fill=\"currentColor\"><path class=\"coveo-active-shape-svg\" d=\"m7.991 16.002c4.425 0 8.01-3.581 8.01-7.992 0-4.425-3.581-8.01-7.999-8.01l-.003.003c-4.417 0-7.999 3.581-7.999 7.999 0 4.417 3.581 7.999 7.992 7.999m-.002-1.5c-3.58 0-6.493-2.916-6.493-6.5s2.916-6.5 6.5-6.5h.172c3.506.09 6.331 2.975 6.331 6.508 0 3.58-2.92 6.493-6.51 6.493\"></path><path d=\"m4.961 5.732c.192 0 .384.073.53.22l2.51 2.51 2.51-2.51c.293-.293.768-.293 1.061 0s .293.768 0 1.061l-3.041 3.04c-.141.14-.332.219-.53.219l0 0c-.199 0-.39-.079-.53-.22l-3.04-3.041c-.293-.293-.293-.768 0-1.061.146-.145.337-.218.53-.218z\"></path></g></svg>"
 
/***/ }),
/* 994 */
/***/ (function(module, exports) {
 
module.exports = "<svg focusable=\"false\" viewBox=\"0 0 18 14\" xmlns=\"http://www.w3.org/2000/svg\" role=\"img\" aria-label=\"Dropdown Share Query\"><title>Dropdown Share Query</title><g fill=\"currentColor\" fill-rule=\"evenodd\"><path class=\"coveo-active-shape-svg\" d=\"m12.1 13.5c-.426 0-.771-.332-.771-.74 0-.409.346-.74.771-.74h1.862c1.374 0 2.49-1.136 2.49-2.534v-.193c0-1.144-.756-2.15-1.839-2.448l-.488-.134-.066-.484c-.132-.979-1.11-1.673-2.041-1.458l-.635.143-.253-.578c-.626-1.429-2.024-2.352-3.562-2.352-2.147 0-3.892 1.769-3.892 3.944 0 .082.002.164.007.246l.032.541-.529.192c-.986.359-1.65 1.319-1.65 2.388v.192c0 1.398 1.117 2.535 2.49 2.535h.782c.426 0 .771.332.771.74 0 .409-.346.74-.771.74h-.782c-2.224 0-4.03-1.802-4.03-4.02v-.192c0-1.496.842-2.861 2.143-3.549.097-2.908 2.496-5.243 5.432-5.243 1.968 0 3.767 1.061 4.726 2.747 1.501-.024 2.798.945 3.198 2.327 1.495.61 2.501 2.077 2.501 3.717v.193c0 2.215-1.808 4.02-4.03 4.02h-1.863\"></path><path d=\"m9 5.234c-.098-.149-.3-.233-.511-.234-.212 0-.413.084-.561.232l-3.193 3.176c-.311.309-.312.812-.003 1.123.155.156.359.233.563.233.202 0 .406-.076.56-.231l1.822-1.813v5.485c0 .438.356.794.794.794.438 0 .794-.356.794-.794v-5.504l1.82 1.83c.309.311.812.312 1.122.002.31-.309.312-.812.002-1.123l-3.21-3.176\"></path></g></svg>"
 
/***/ }),
/* 995 */
/***/ (function(module, exports) {
 
module.exports = "<svg focusable=\"false\" enable-background=\"new 0 0 22 22\" viewBox=\"0 0 22 22\" xmlns=\"http://www.w3.org/2000/svg\" role=\"img\" aria-label=\"Dropdown Preferences\"><title>Dropdown Preferences</title><g fill=\"currentColor\"><path class=\"coveo-active-shape-svg\" d=\"m12.989 21.947h-3.978c-.752 0-1.388-.557-1.48-1.295l-.298-2.075c-.309-.154-.611-.33-.905-.526l-1.968.79c-.722.268-1.508-.028-1.858-.668l-1.977-3.419c-.366-.671-.207-1.47.365-1.922l1.669-1.306c-.013-.186-.019-.359-.019-.526s.006-.34.02-.526l-1.665-1.303c-.586-.462-.742-1.292-.365-1.932l1.985-3.434c.343-.633 1.136-.923 1.836-.65l1.98.796c.3-.2.6-.375.901-.527l.301-2.096c.089-.719.726-1.275 1.478-1.275h3.979c.753 0 1.39.557 1.479 1.296l.298 2.074c.31.154.611.33.905.526l1.968-.791c.721-.263 1.508.028 1.857.667l1.979 3.421c.365.671.207 1.47-.365 1.922l-1.669 1.305c.012.166.02.342.02.527s-.008.361-.02.526l1.665 1.302c.576.457.734 1.256.381 1.903l-2 3.463c-.35.636-1.146.922-1.84.649l-1.978-.794c-.301.199-.6.374-.902.526l-.3 2.095c-.088.72-.725 1.277-1.478 1.277m-3.539-2h3.1l.396-2.762.529-.217c.485-.2.964-.478 1.461-.851l.45-.337 2.585 1.038 1.554-2.688-2.198-1.718.071-.563c.035-.277.062-.555.062-.85s-.027-.572-.062-.85l-.071-.563 2.198-1.718-1.555-2.688-2.592 1.042-.452-.348c-.466-.358-.94-.633-1.451-.843l-.529-.217-.396-2.761h-3.1l-.396 2.762-.53.217c-.485.199-.962.477-1.46.85l-.451.337-2.584-1.038-1.554 2.688 2.196 1.718-.07.562c-.034.277-.061.564-.061.851s.027.573.062.852l.07.562-2.196 1.718 1.554 2.688 2.591-1.041.452.348c.465.356.939.632 1.452.843l.529.217z\"></path><path d=\"m11 15c-2.206 0-4-1.794-4-4s1.794-4 4-4 4 1.794 4 4-1.794 4-4 4m0-6c-1.103 0-2 .897-2 2s .897 2 2 2 2-.897 2-2-.897-2-2-2\"></path></g></svg>"
 
/***/ }),
/* 996 */
/***/ (function(module, exports) {
 
module.exports = "<svg focusable=\"false\" enable-background=\"new 0 0 12 16\" viewBox=\"0 0 12 16\" xmlns=\"http://www.w3.org/2000/svg\" role=\"img\" aria-label=\"Dropdown Authenticate\"><title>Dropdown Authenticate</title><g class=\"coveo-dropdown-authenticate-svg\" fill=\"none\"><path d=\"m10 5h-8c-1.1 0-2 .9-2 2v5c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2v-5c0-1.1-.9-2-2-2m0 1.5c.3 0 .5.2.5.5v5c0 .3-.2.5-.5.5h-8c-.3 0-.5-.2-.5-.5v-5c0-.3.2-.5.5-.5z\"></path><path d=\"m10 5h-1.6v-1.1c0-1.3-1.1-2.4-2.4-2.4s-2.4 1.1-2.4 2.4v1.1h-1.6v-1.1c0-2.1 1.8-3.9 4-3.9s4 1.8 4 3.9z\"></path></g><g class=\"coveo-dropdown-authenticate-hover-svg\" fill=\"none\"><path class=\"coveo-active-shape-svg\" d=\"m10 7h-8c-1.1 0-2 .9-2 2v5c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2v-5c0-1.1-.9-2-2-2m0 1.5c.3 0 .5.2.5.5v5c0 .3-.2.5-.5.5h-8c-.3 0-.5-.2-.5-.5v-5c0-.3.2-.5.5-.5z\"></path><path d=\"m5.1.1c-1.8.4-3.1 2.1-3.1 4v2.9h1.6v-3.1c0-1.7 1.8-3 3.6-2.1.8.4 1.2 1.3 1.2 2.2v.6c0 .4.4.8.8.8s.8-.4.8-.8v-.7c0-2.4-2.3-4.4-4.9-3.8z\"></path></g></svg>"
 
/***/ }),
/* 997 */
/***/ (function(module, exports) {
 
module.exports = "<svg focusable=\"false\" enable-background=\"new 0 0 14 14\" viewBox=\"0 0 14 14\" xmlns=\"http://www.w3.org/2000/svg\" role=\"img\" aria-label=\"Dropdown Export\"><title>Dropdown Export</title><g fill=\"currentColor\" transform=\"matrix(0 1 -1 0 20 0)\"><path d=\"m7.699 8.591 1.05 1.05c.49.49 1.05 0 1.05 0s .49-.56 0-1.05l-2.31-2.381c-.28-.28-.7-.28-.98 0l-2.309 2.451c-.49.49 0 .98 0 .98s.56.49 1.05 0l1.05-1.05v7.91c0 .42.35.7.7.7s.7-.35.7-.7z\"></path><path class=\"coveo-active-shape-svg\" d=\"m10.5 12.301h2.033l.065 6.301h-11.198v-6.301h2.1c.386 0 .7-.314.7-.7l0 0c0-.386-.314-.7-.7-.7h-2.806c-.383-.001-.694.31-.694.694v7.706c0 .385.318.699.694.699h12.607c.384 0 .699-.315.699-.699v-7.7c0-.386-.316-.699-.694-.699h-2.806c-.386 0-.7.314-.7.7l0 0c0 .385.314.699.7.699z\"></path></g></svg>"
 
/***/ }),
/* 998 */
/***/ (function(module, exports) {
 
module.exports = "<svg focusable=\"false\" enable-background=\"new 0 0 15 12\" viewBox=\"0 0 15 12\" xmlns=\"http://www.w3.org/2000/svg\" role=\"img\" aria-label=\"Dropdown Follow Query\"><title>Dropdown Follow Query</title><g fill=\"currentColor\"><path d=\"m9.224 11.999c-.198 0-.496-.103-.694-.308-.397-.411-.397-1.025 0-1.436l3.965-4.409-3.966-4.102c-.397-.411-.397-1.025 0-1.436s.991-.411 1.388 0l4.859 4.922c.298.308.298.718 0 1.025l-4.859 5.435c-.198.206-.496.309-.693.309\"></path><path class=\"coveo-active-shape-svg\" d=\"m4.958.411c-.397-.411-.991-.411-1.388 0s-.397 1.025 0 1.436l2.973 2.974h-5.552c-.594 0-.991.41-.991 1.025s.397 1.025.991 1.025h5.651l-3.074 3.384c-.397.411-.397 1.025 0 1.436.199.206.398.309.695.309.298 0 .495-.103.694-.308l4.859-5.333c.298-.308.298-.718 0-1.025z\"></path></g></svg>"
 
/***/ }),
/* 999 */
/***/ (function(module, exports) {
 
module.exports = "<svg focusable=\"false\" enable-background=\"new 0 0 20 12\" viewBox=\"0 0 20 12\" xmlns=\"http://www.w3.org/2000/svg\" role=\"img\" aria-label=\"Quickview\"><title>Quickview</title><g fill=\"currentColor\"><path d=\"m10 4.3c-1 0-1.7.8-1.7 1.7 0 1 .8 1.7 1.7 1.7 1 0 1.7-.8 1.7-1.7 0-1-.7-1.7-1.7-1.7m0 4.7c-1.6 0-3-1.4-3-3s1.4-3 3-3 3 1.4 3 3-1.4 3-3 3\"></path><path d=\"m19.8 6.4v-.001c.069-.117.109-.253.109-.399s-.04-.282-.109-.399v-.001c-.005-.008.005.007 0 0-2.203-3.473-5.917-5.6-9.8-5.6-3.884 0-7.655 2.091-9.8 5.602l0 0c-.069.117-.109.253-.109.398s.04.281.109.398c0 0-.001-.002 0 0 2.203 3.475 5.916 5.602 9.8 5.602 3.883 0 7.597-2.127 9.8-5.6.005-.007-.005.008 0 0zm-9.8 4.1c-3.236 0-6.28-1.635-8.189-4.339-.067-.095-.067-.228-.002-.324 1.908-2.797 4.953-4.337 8.191-4.337 3.235 0 6.278 1.634 8.187 4.337.068.096.068.231 0 .327-1.909 2.702-4.952 4.336-8.187 4.336z\"></path></g></svg>"
 
/***/ }),
/* 1000 */
/***/ (function(module, exports) {
 
module.exports = "<svg focusable=\"false\" enable-background=\"new 0 0 11 20\" viewBox=\"0 0 11 20\" xmlns=\"http://www.w3.org/2000/svg\" role=\"img\" aria-label=\"Right Arrow\"><title>Right Arrow</title><g fill=\"currentColor\"><path d=\"m .308 18.189c-.412.413-.411 1.086 0 1.5.2.201.465.311.746.311.282 0 .547-.11.747-.31l8.891-8.939c.199-.2.307-.466.307-.75 0-.286-.109-.551-.305-.748l-8.893-8.942c-.199-.2-.465-.311-.747-.311-.001 0-.001 0-.001 0-.281 0-.546.11-.745.309-.198.201-.308.468-.308.753 0 .284.11.548.306.745l8.145 8.193z\"></path></g></svg>"
 
/***/ }),
/* 1001 */
/***/ (function(module, exports) {
 
module.exports = "<svg focusable=\"false\" enable-background=\"new 0 0 11 20\" viewBox=\"0 0 11 20\" xmlns=\"http://www.w3.org/2000/svg\" role=\"img\" aria-label=\"Left Arrow\"><title>Left Arrow</title><g fill=\"currentColor\"><path d=\"m10.692 1.811c.412-.413.411-1.086 0-1.5-.2-.201-.465-.311-.746-.311-.283 0-.548.11-.747.31l-8.892 8.939c-.198.2-.307.466-.307.75 0 .286.109.551.305.748l8.893 8.941c.2.201.466.312.748.312h.001c.281 0 .546-.11.745-.309.199-.201.308-.468.308-.753 0-.284-.109-.548-.306-.745l-8.146-8.194z\"></path></g></svg>"
 
/***/ }),
/* 1002 */
/***/ (function(module, exports) {
 
module.exports = "<svg focusable=\"false\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\" role=\"img\" aria-label=\"Replies\"><title>Replies</title><g fill=\"currentColor\" fill-rule=\"evenodd\" transform=\"translate(1)\"><path d=\"m4 5h7v1h-7v-1m0 3h7v1h-7v-1m0 3h7v1h-7v-1\"></path><path d=\"m15 1c.009-.525.066-1-1-1h-12.998c-.651 0-1 .33-1 1v15c0 .66.351 1 1 1h1.998v2c.075.546.383 1 1 1h13c.718 0 1-.295 1-1v-16c.001-.468-.406-.99-1-1h-2v-1m-13 14v-13h11v13h-11m14 3h-11v-.995l9-.005c.5.005.976-.428 1-1l.021-12h.979v14\"></path></g></svg>"
 
/***/ }),
/* 1003 */
/***/ (function(module, exports) {
 
module.exports = "<svg focusable=\"false\" enable-background=\"new 0 0 60 60\" viewBox=\"0 0 60 60\" xmlns=\"http://www.w3.org/2000/svg\" role=\"img\" aria-label=\"Video\"><title>Video</title><path clip-rule=\"evenodd\" d=\"m3.753 60c-2.073 0-3.753-1.667-3.753-3.753v-52.494c0-2.073 1.667-3.753 3.753-3.753h52.494c2.073 0 3.753 1.667 3.753 3.753v52.493c0 2.074-1.667 3.754-3.753 3.754z\" fill=\"#cc0d00\" fill-rule=\"evenodd\"></path><path d=\"m42.8 21.536h-8.96c-.267-.64-.64-1.173-1.12-1.653l3.36-4.32c.533-.693.427-1.707-.267-2.24-.693-.533-1.707-.427-2.24.267l-3.733 4.8c-.32 0-.587-.053-.907-.053s-.587.053-.853.053l-3.733-4.8c-.533-.693-1.547-.8-2.24-.267s-.8 1.547-.267 2.24l3.36 4.32c-.48.48-.853 1.013-1.12 1.653h-6.88c-1.76 0-3.2 1.44-3.2 3.2v14.933c0 1.76 1.44 3.2 3.2 3.2h25.6c1.76 0 3.2-1.44 3.2-3.2v-14.933c0-1.76-1.44-3.2-3.2-3.2zm-4.267 17.067c0 .587-.48 1.067-1.067 1.067h-19.2c-.587 0-1.067-.48-1.067-1.067v-12.8c0-.587.48-1.067 1.067-1.067h19.2c.587 0 1.067.48 1.067 1.067zm3.734-5.334c-.907 0-1.6-.693-1.6-1.6s.693-1.6 1.6-1.6 1.6.693 1.6 1.6-.694 1.6-1.6 1.6zm0-5.333c-.907 0-1.6-.693-1.6-1.6s.693-1.6 1.6-1.6 1.6.693 1.6 1.6-.694 1.6-1.6 1.6z\" fill=\"#fff\"></path></svg>"
 
/***/ }),
/* 1004 */
/***/ (function(module, exports) {
 
module.exports = "<svg version=\"1.1\" id=\"prefix__Layer_1\" xmlns=\"http://www.w3.org/2000/svg\" x=\"0\" y=\"0\" viewBox=\"0 0 409.4 103.6\" xml:space=\"preserve\" aria-label=\"Coveo Logo\"><style>.prefix__st0{fill:#333357}</style><path class=\"prefix__st0\" d=\"M164.6 36.2l-4.9 5.2c-3.3-3.3-7-5.2-11.9-5.2-8.5 0-14.9 6.7-14.9 16.1s6.4 16.1 14.9 16.1c4.9 0 9.1-2.1 12.2-5.2l4.6 5.2c-4 4.6-9.7 7-16.4 7-14 0-23.1-10-23.1-23.1 0-13.4 9.1-23.4 23.1-23.4 6.6 0 12.4 2.7 16.4 7.3zM219.3 52.3c0 13.1-10 23.1-23.4 23.1-13.7 0-23.7-10-23.7-23.1 0-13.4 10-23.4 23.7-23.4 13.3 0 23.4 10 23.4 23.4zm-39.2 0c0 9.4 6.7 16.1 15.8 16.1 8.8 0 15.5-6.7 15.5-16.1s-6.7-16.1-15.5-16.1c-9.2 0-15.8 6.7-15.8 16.1zM252.1 74.5H243l-18.9-44.4h8.5l14.9 36.8 14.9-36.8h8.2l-18.5 44.4zM318.6 52v3h-35c.9 9.1 7.3 13.7 14.9 13.7 5.5 0 10-1.8 14-5.2l4 5.2c-5.5 5.2-11.5 6.7-18.2 6.7-13.4 0-22.8-9.1-22.8-23.1 0-13.7 9.4-23.4 22.2-23.4 12.1 0 20.9 9.7 20.9 23.1zm-34.9-3.4h27.4c-.9-7.6-6.1-12.8-13.4-12.8-7.9.1-12.8 5.2-14 12.8zM375.8 52.3c0 13.1-10 23.1-23.4 23.1-13.7 0-23.7-10-23.7-23.1 0-13.4 10-23.4 23.7-23.4 13.4 0 23.4 10 23.4 23.4zm-39.2 0c0 9.4 6.7 16.1 15.8 16.1 8.8 0 15.5-6.7 15.5-16.1s-6.7-16.1-15.5-16.1c-9.1 0-15.8 6.7-15.8 16.1z\"></path><g><path class=\"prefix__st0\" d=\"M394 30.2h-9v1.7h3.6V43h1.9V31.9h3.5v-1.7M409.4 30.2h-2l-3.7 8-3.7-8h-2V43h2v-8.6l3 6.3h1.5l2.9-6.3V43h2V30.2\"></path></g><g><path d=\"M88.1 15C79.2 6.1 67.9 1.1 56.2 0 54.8-.1 54 1.6 55 2.6l18.7 18.7c.1.1 0 .3-.2.2-5.3-3.9-11.5-6.1-17.8-6.7-1-.1-1.5 1.1-.8 1.8l12.7 12.7c.1.1 0 .3-.2.2-3.5-2.4-7.5-3.8-11.6-4.2-.7-.1-1.1.8-.6 1.2l21.6 21.6c.5.5 1.3.1 1.2-.6-.4-4.1-1.8-8-4.2-11.5-.1-.1.1-.3.2-.2L86.2 48c.7.7 1.9.1 1.8-.8-.6-6.3-2.8-12.4-6.7-17.8-.1-.1.1-.3.2-.2L100.4 48c1 1 2.7.2 2.6-1.2-1-11.6-6-22.9-14.9-31.8\" fill=\"#00adff\"></path><path d=\"M15 15C23.9 6.1 35.2 1.1 46.8 0 48.2-.1 49 1.6 48 2.6L29.4 21.3c-.1.1 0 .3.2.2 5.3-3.9 11.5-6.1 17.8-6.7 1-.1 1.5 1.1.8 1.8L35.4 29.3c-.1.1 0 .3.2.2 3.5-2.4 7.5-3.8 11.6-4.2.7-.1 1.1.8.6 1.2L26.1 48.2c-.5.5-1.3.1-1.2-.6.4-4.1 1.8-8 4.2-11.5.1-.1-.1-.3-.2-.2L16.6 48.1c-.7.7-1.9.1-1.8-.8.6-6.3 2.8-12.4 6.7-17.8.1-.1-.1-.3-.2-.2L2.6 48c-1 1-2.7.2-2.6-1.2C1.1 35.2 6.1 23.9 15 15\" fill=\"#f05245\"></path><path d=\"M15 88.7c8.9 8.9 20.2 13.9 31.9 15 1.4.1 2.2-1.6 1.2-2.6L29.4 82.4c-.1-.1 0-.3.2-.2 5.3 3.9 11.5 6.1 17.8 6.7 1 .1 1.5-1.1.8-1.8L35.4 74.3c-.1-.1 0-.3.2-.2 3.5 2.4 7.5 3.8 11.6 4.2.7.1 1.1-.8.6-1.2L26.1 55.4c-.5-.5-1.3-.1-1.2.6.4 4.1 1.8 8 4.2 11.5.1.1-.1.3-.2.2L16.6 55.5c-.7-.7-1.9-.1-1.8.8.6 6.3 2.8 12.4 6.7 17.8.1.1-.1.3-.2.2L2.6 55.6c-1-1-2.7-.2-2.6 1.2 1.1 11.7 6.1 23 15 31.9\" fill=\"#1cebcf\"></path><path d=\"M88.1 88.7c-8.9 8.9-20.2 13.9-31.9 15-1.4.1-2.2-1.6-1.2-2.6l18.7-18.7c.1-.1 0-.3-.2-.2-5.3 3.8-11.5 6.1-17.8 6.6-1 .1-1.5-1.1-.8-1.8l12.7-12.7c.1-.1 0-.3-.2-.2-3.5 2.4-7.5 3.8-11.6 4.2-.7.1-1.1-.8-.6-1.2l21.6-21.6c.5-.5 1.3-.1 1.2.6-.4 4.1-1.8 8-4.2 11.5-.1.1.1.3.2.2l12.2-12.2c.7-.7 1.9-.1 1.8.8-.6 6.3-2.8 12.4-6.7 17.8-.1.1.1.3.2.2l18.7-18.7c1-1 2.7-.2 2.6 1.2-.8 11.6-5.8 22.9-14.7 31.8\" fill=\"#ffe300\"></path></g></svg>"
 
/***/ }),
/* 1005 */
/***/ (function(module, exports) {
 
module.exports = "<svg version=\"1.1\" id=\"prefix__Layer_1\" xmlns=\"http://www.w3.org/2000/svg\" x=\"0\" y=\"0\" viewBox=\"0 0 409.4 103.6\" xml:space=\"preserve\" aria-label=\"Powered By Coveo Logo\"><style>.prefix__st0{fill:#282829}</style><path class=\"prefix__st0\" d=\"M164.6 36.2l-4.9 5.2c-3.3-3.3-7-5.2-11.9-5.2-8.5 0-14.9 6.7-14.9 16.1s6.4 16.1 14.9 16.1c4.9 0 9.1-2.1 12.2-5.2l4.6 5.2c-4 4.6-9.7 7-16.4 7-14 0-23.1-10-23.1-23.1 0-13.4 9.1-23.4 23.1-23.4 6.6 0 12.4 2.7 16.4 7.3zM219.3 52.3c0 13.1-10 23.1-23.4 23.1-13.7 0-23.7-10-23.7-23.1 0-13.4 10-23.4 23.7-23.4 13.3 0 23.4 10 23.4 23.4zm-39.2 0c0 9.4 6.7 16.1 15.8 16.1 8.8 0 15.5-6.7 15.5-16.1s-6.7-16.1-15.5-16.1c-9.2 0-15.8 6.7-15.8 16.1zM252.1 74.5H243l-18.9-44.4h8.5l14.9 36.8 14.9-36.8h8.2zM318.6 52v3h-35c.9 9.1 7.3 13.7 14.9 13.7 5.5 0 10-1.8 14-5.2l4 5.2c-5.5 5.2-11.5 6.7-18.2 6.7-13.4 0-22.8-9.1-22.8-23.1 0-13.7 9.4-23.4 22.2-23.4 12.1 0 20.9 9.7 20.9 23.1zm-34.9-3.4h27.4c-.9-7.6-6.1-12.8-13.4-12.8-7.9.1-12.8 5.2-14 12.8zM375.8 52.3c0 13.1-10 23.1-23.4 23.1-13.7 0-23.7-10-23.7-23.1 0-13.4 10-23.4 23.7-23.4 13.4 0 23.4 10 23.4 23.4zm-39.2 0c0 9.4 6.7 16.1 15.8 16.1 8.8 0 15.5-6.7 15.5-16.1s-6.7-16.1-15.5-16.1c-9.1 0-15.8 6.7-15.8 16.1z\"></path><g><path class=\"prefix__st0\" d=\"M394 30.2h-9v1.7h3.6V43h1.9V31.9h3.5v-1.7M409.4 30.2h-2l-3.7 8-3.7-8h-2V43h2v-8.6l3 6.3h1.5l2.9-6.3V43h2V30.2\"></path></g><g><path class=\"prefix__st0\" d=\"M88.1 15C79.2 6.1 67.9 1.1 56.2 0 54.8-.1 54 1.6 55 2.6l18.7 18.7c.1.1 0 .3-.2.2-5.3-3.9-11.5-6.1-17.8-6.7-1-.1-1.5 1.1-.8 1.8l12.7 12.7c.1.1 0 .3-.2.2-3.5-2.4-7.5-3.8-11.6-4.2-.7-.1-1.1.8-.6 1.2l21.6 21.6c.5.5 1.3.1 1.2-.6-.4-4.1-1.8-8-4.2-11.5-.1-.1.1-.3.2-.2L86.2 48c.7.7 1.9.1 1.8-.8-.6-6.3-2.8-12.4-6.7-17.8-.1-.1.1-.3.2-.2L100.4 48c1 1 2.7.2 2.6-1.2-1-11.6-6-22.9-14.9-31.8M15 15C23.9 6.1 35.2 1.1 46.8 0 48.2-.1 49 1.6 48 2.6L29.4 21.3c-.1.1 0 .3.2.2 5.3-3.9 11.5-6.1 17.8-6.7 1-.1 1.5 1.1.8 1.8L35.4 29.3c-.1.1 0 .3.2.2 3.5-2.4 7.5-3.8 11.6-4.2.7-.1 1.1.8.6 1.2L26.1 48.2c-.5.5-1.3.1-1.2-.6.4-4.1 1.8-8 4.2-11.5.1-.1-.1-.3-.2-.2L16.6 48.1c-.7.7-1.9.1-1.8-.8.6-6.3 2.8-12.4 6.7-17.8.1-.1-.1-.3-.2-.2L2.6 48c-1 1-2.7.2-2.6-1.2C1.1 35.2 6.1 23.9 15 15M15 88.7c8.9 8.9 20.2 13.9 31.9 15 1.4.1 2.2-1.6 1.2-2.6L29.4 82.4c-.1-.1 0-.3.2-.2 5.3 3.9 11.5 6.1 17.8 6.7 1 .1 1.5-1.1.8-1.8L35.4 74.3c-.1-.1 0-.3.2-.2 3.5 2.4 7.5 3.8 11.6 4.2.7.1 1.1-.8.6-1.2L26.1 55.4c-.5-.5-1.3-.1-1.2.6.4 4.1 1.8 8 4.2 11.5.1.1-.1.3-.2.2L16.6 55.5c-.7-.7-1.9-.1-1.8.8.6 6.3 2.8 12.4 6.7 17.8.1.1-.1.3-.2.2L2.6 55.6c-1-1-2.7-.2-2.6 1.2 1.1 11.7 6.1 23 15 31.9M88.1 88.7c-8.9 8.9-20.2 13.9-31.9 15-1.4.1-2.2-1.6-1.2-2.6l18.7-18.7c.1-.1 0-.3-.2-.2-5.3 3.8-11.5 6.1-17.8 6.6-1 .1-1.5-1.1-.8-1.8l12.7-12.7c.1-.1 0-.3-.2-.2-3.5 2.4-7.5 3.8-11.6 4.2-.7.1-1.1-.8-.6-1.2l21.6-21.6c.5-.5 1.3-.1 1.2.6-.4 4.1-1.8 8-4.2 11.5-.1.1.1.3.2.2l12.2-12.2c.7-.7 1.9-.1 1.8.8-.6 6.3-2.8 12.4-6.7 17.8-.1.1.1.3.2.2l18.7-18.7c1-1 2.7-.2 2.6 1.2-.8 11.6-5.8 22.9-14.7 31.8\"></path></g></svg>"
 
/***/ }),
/* 1006 */
/***/ (function(module, exports) {
 
module.exports = "<svg focusable=\"false\" enable-background=\"new 0 0 9 7\" viewBox=\"0 0 9 7\" xmlns=\"http://www.w3.org/2000/svg\" role=\"img\" aria-label=\"Tagging Ok\"><title>Tagging Ok</title><g fill=\"currentColor\"><path d=\"m8.755.446c-.154-.145-.35-.216-.567-.218-.212.005-.409.093-.555.246l-4.176 4.422-2.117-2.003c-.152-.147-.381-.22-.564-.22-.211.004-.41.092-.556.247-.147.151-.225.352-.22.563.005.213.092.41.246.557l2.627 2.487c.166.158.384.245.611.245h.022.003c.234-.007.452-.103.611-.272l4.66-4.931c.146-.153.225-.354.22-.566-.005-.213-.092-.41-.245-.557z\"></path></g></svg>"
 
/***/ }),
/* 1007 */
/***/ (function(module, exports) {
 
module.exports = "<svg focusable=\"false\" enable-background=\"new 0 0 20 20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\" role=\"img\" aria-label=\"Edit\"><title>Edit</title><g fill=\"currentColor\"><path d=\"m1 4c0-.552.448-1 1-1h7c .552 0 1 .448 1 1v0c0 .552-.448 1-1 1h-6v12h12v-6c0-.552.448-1 1-1h0c .552 0 1 .448 1 1v7c0 .552-.448 1-1 1h-14c-.552 0-1-.448-1-1z\"></path><path d=\"m17.8.8c-.2-.2-.5-.2-.7 0l-1.7 1.7 2 2 1.7-1.7c.2-.2.2-.5 0-.7z\"></path><path d=\"m14.5 3.5-6.9 6.9c-.1.1-.2.2-.2.3l-1.2 2.8c-.1.2.1.4.3.3l2.8-1.2c.1 0 .2-.1.3-.2l6.9-6.9z\"></path></g></svg>"
 
/***/ }),
/* 1008 */
/***/ (function(module, exports) {
 
module.exports = "<svg focusable=\"false\" enable-background=\"new 0 0 16 16\" viewBox=\"0 0 16 16\" xmlns=\"http://www.w3.org/2000/svg\" role=\"img\" aria-label=\"Star\"><title>Star</title><g fill=\"currentColor\"><path d=\"m8.683.852 1.558 4.794h5.041c.695 0 .985.889.421 1.298l-4.077 2.963 1.558 4.794c.215.661-.542 1.211-1.104.802l-4.08-2.962-4.077 2.963c-.562.409-1.32-.141-1.104-.802l1.558-4.794-4.079-2.963c-.563-.409-.274-1.298.421-1.298h5.041l1.558-4.794c.214-.662 1.15-.662 1.365-.001z\"></path></g></svg>"
 
/***/ }),
/* 1009 */
/***/ (function(module, exports) {
 
module.exports = "<svg focusable=\"false\" enable-background=\"new 0 0 19 14\" viewBox=\"0 0 19 14\" xmlns=\"http://www.w3.org/2000/svg\" role=\"img\" aria-label=\"List Layout\"><title>List Layout</title><g fill=\"currentColor\"><path d=\"m19 12c0 .552-.397 1-.813 1h-11.375c-.416 0-.813-.448-.813-1s .397-1 .813-1h11.375c.416 0 .813.448.813 1\"></path><path d=\"m19 7c0 .552-.397 1-.813 1h-11.375c-.416 0-.813-.448-.813-1s .397-1 .813-1h11.375c.416 0 .813.448.813 1\"></path><path d=\"m19 2c0 .552-.397 1-.813 1h-11.375c-.416 0-.813-.448-.813-1s .397-1 .813-1h11.375c.416 0 .813.448.813 1\"></path><path d=\"m2 10c1.105 0 2 .895 2 2s-.895 2-2 2-2-.895-2-2 .895-2 2-2\"></path><path d=\"m2 5c1.105 0 2 .895 2 2s-.895 2-2 2-2-.895-2-2 .895-2 2-2\"></path><path d=\"m2 0c1.105 0 2 .895 2 2s-.895 2-2 2-2-.895-2-2 .895-2 2-2\"></path></g></svg>"
 
/***/ }),
/* 1010 */
/***/ (function(module, exports) {
 
module.exports = "<svg focusable=\"false\" viewBox=\"0 0 16 16\" xmlns=\"http://www.w3.org/2000/svg\" role=\"img\" aria-label=\"Card Layout\"><title>Card Layout</title><g fill=\"currentColor\" fill-rule=\"evenodd\"><rect x=\"12\" y=\"12\" width=\"4\" height=\"4\" rx=\"1\"></rect><rect x=\"6\" y=\"12\" width=\"4\" height=\"4\" rx=\"1\"></rect><rect y=\"12\" width=\"4\" height=\"4\" rx=\"1\"></rect><rect x=\"12\" y=\"6\" width=\"4\" height=\"4\" rx=\"1\"></rect><rect x=\"6\" y=\"6\" width=\"4\" height=\"4\" rx=\"1\"></rect><rect y=\"6\" width=\"4\" height=\"4\" rx=\"1\"></rect><rect x=\"12\" width=\"4\" height=\"4\" rx=\"1\"></rect><rect x=\"6\" width=\"4\" height=\"4\" rx=\"1\"></rect><rect width=\"4\" height=\"4\" rx=\"1\"></rect></g></svg>"
 
/***/ }),
/* 1011 */
/***/ (function(module, exports) {
 
module.exports = "<svg focusable=\"false\" viewBox=\"0 0 18 13\" xmlns=\"http://www.w3.org/2000/svg\" role=\"img\" aria-label=\"Table Layout\"><title>Table Layout</title><g fill=\"currentColor\" fill-rule=\"evenodd\"><rect x=\"11\" y=\"10\" width=\"7\" height=\"3\" rx=\"1\"></rect><rect x=\"11\" y=\"5\" width=\"7\" height=\"3\" rx=\"1\"></rect><rect x=\"11\" width=\"7\" height=\"3\" rx=\"1\"></rect><rect y=\"10\" width=\"9\" height=\"3\" rx=\"1\"></rect><rect y=\"5\" width=\"9\" height=\"3\" rx=\"1\"></rect><rect width=\"9\" height=\"3\" rx=\"1\"></rect></g></svg>"
 
/***/ }),
/* 1012 */
/***/ (function(module, exports) {
 
module.exports = "<svg viewBox=\"0 0 512 512\" xmlns=\"http://www.w3.org/2000/svg\" role=\"img\" aria-label=\"Plus\"><title>Plus</title><path d=\"M496 208H304V16h-96v192H16v96h192v192h96V304h192\"></path></svg>"
 
/***/ }),
/* 1013 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var diacriticsToLatinCharacters = {
    Á: 'A',
    Ă: 'A',
    Ắ: 'A',
    Ặ: 'A',
    Ằ: 'A',
    Ẳ: 'A',
    Ẵ: 'A',
    Ǎ: 'A',
    Â: 'A',
    Ấ: 'A',
    Ậ: 'A',
    Ầ: 'A',
    Ẩ: 'A',
    Ẫ: 'A',
    Ä: 'A',
    Ǟ: 'A',
    Ȧ: 'A',
    Ǡ: 'A',
    Ạ: 'A',
    Ȁ: 'A',
    À: 'A',
    Ả: 'A',
    Ȃ: 'A',
    Ā: 'A',
    Ą: 'A',
    Å: 'A',
    Ǻ: 'A',
    Ḁ: 'A',
    Ⱥ: 'A',
    Ã: 'A',
    Ꜳ: 'AA',
    Æ: 'AE',
    Ǽ: 'AE',
    Ǣ: 'AE',
    Ꜵ: 'AO',
    Ꜷ: 'AU',
    Ꜹ: 'AV',
    Ꜻ: 'AV',
    Ꜽ: 'AY',
    Ḃ: 'B',
    Ḅ: 'B',
    Ɓ: 'B',
    Ḇ: 'B',
    Ƀ: 'B',
    Ƃ: 'B',
    Ć: 'C',
    Č: 'C',
    Ç: 'C',
    Ḉ: 'C',
    Ĉ: 'C',
    Ċ: 'C',
    Ƈ: 'C',
    Ȼ: 'C',
    Ď: 'D',
    Ḑ: 'D',
    Ḓ: 'D',
    Ḋ: 'D',
    Ḍ: 'D',
    Ɗ: 'D',
    Ḏ: 'D',
    Dz: 'D',
    Dž: 'D',
    Đ: 'D',
    Ð: 'D',
    Ƌ: 'D',
    DZ: 'DZ',
    DŽ: 'DZ',
    É: 'E',
    Ĕ: 'E',
    Ě: 'E',
    Ȩ: 'E',
    Ḝ: 'E',
    Ê: 'E',
    Ế: 'E',
    Ệ: 'E',
    Ề: 'E',
    Ể: 'E',
    Ễ: 'E',
    Ḙ: 'E',
    Ë: 'E',
    Ė: 'E',
    Ẹ: 'E',
    Ȅ: 'E',
    È: 'E',
    Ẻ: 'E',
    Ȇ: 'E',
    Ē: 'E',
    Ḗ: 'E',
    Ḕ: 'E',
    Ę: 'E',
    Ɇ: 'E',
    Ẽ: 'E',
    Ḛ: 'E',
    Ꝫ: 'ET',
    Ḟ: 'F',
    Ƒ: 'F',
    Ǵ: 'G',
    Ğ: 'G',
    Ǧ: 'G',
    Ģ: 'G',
    Ĝ: 'G',
    Ġ: 'G',
    Ɠ: 'G',
    Ḡ: 'G',
    Ǥ: 'G',
    Ḫ: 'H',
    Ȟ: 'H',
    Ḩ: 'H',
    Ĥ: 'H',
    Ⱨ: 'H',
    Ḧ: 'H',
    Ḣ: 'H',
    Ḥ: 'H',
    Ħ: 'H',
    Í: 'I',
    Ĭ: 'I',
    Ǐ: 'I',
    Î: 'I',
    Ï: 'I',
    Ḯ: 'I',
    İ: 'I',
    Ị: 'I',
    Ȉ: 'I',
    Ì: 'I',
    Ỉ: 'I',
    Ȋ: 'I',
    Ī: 'I',
    Į: 'I',
    Ɨ: 'I',
    Ĩ: 'I',
    Ḭ: 'I',
    І: 'I',
    Ꝺ: 'D',
    Ꝼ: 'F',
    Ᵹ: 'G',
    Ꞃ: 'R',
    Ꞅ: 'S',
    Ꞇ: 'T',
    Ꝭ: 'IS',
    Ĵ: 'J',
    Ɉ: 'J',
    Ḱ: 'K',
    Ǩ: 'K',
    Ķ: 'K',
    Ⱪ: 'K',
    Ꝃ: 'K',
    Ḳ: 'K',
    Ƙ: 'K',
    Ḵ: 'K',
    Ꝁ: 'K',
    Ꝅ: 'K',
    Ĺ: 'L',
    Ƚ: 'L',
    Ľ: 'L',
    Ļ: 'L',
    Ḽ: 'L',
    Ḷ: 'L',
    Ḹ: 'L',
    Ⱡ: 'L',
    Ꝉ: 'L',
    Ḻ: 'L',
    Ŀ: 'L',
    Ɫ: 'L',
    Lj: 'L',
    Ł: 'L',
    LJ: 'LJ',
    Ḿ: 'M',
    Ṁ: 'M',
    Ṃ: 'M',
    Ɱ: 'M',
    Ń: 'N',
    Ň: 'N',
    Ņ: 'N',
    Ṋ: 'N',
    Ṅ: 'N',
    Ṇ: 'N',
    Ǹ: 'N',
    Ɲ: 'N',
    Ṉ: 'N',
    Ƞ: 'N',
    Nj: 'N',
    Ñ: 'N',
    NJ: 'NJ',
    Ó: 'O',
    Ŏ: 'O',
    Ǒ: 'O',
    Ô: 'O',
    Ố: 'O',
    Ộ: 'O',
    Ồ: 'O',
    Ổ: 'O',
    Ỗ: 'O',
    Ö: 'O',
    Ȫ: 'O',
    Ȯ: 'O',
    Ȱ: 'O',
    Ọ: 'O',
    Ő: 'O',
    Ȍ: 'O',
    Ò: 'O',
    Ỏ: 'O',
    Ơ: 'O',
    Ớ: 'O',
    Ợ: 'O',
    Ờ: 'O',
    Ở: 'O',
    Ỡ: 'O',
    Ȏ: 'O',
    Ꝋ: 'O',
    Ꝍ: 'O',
    Ō: 'O',
    Ṓ: 'O',
    Ṑ: 'O',
    Ɵ: 'O',
    Ǫ: 'O',
    Ǭ: 'O',
    Ø: 'O',
    Ǿ: 'O',
    Õ: 'O',
    Ṍ: 'O',
    Ṏ: 'O',
    Ȭ: 'O',
    Ƣ: 'OI',
    Ꝏ: 'OO',
    Ɛ: 'E',
    Ɔ: 'O',
    Ȣ: 'OU',
    Ṕ: 'P',
    Ṗ: 'P',
    Ꝓ: 'P',
    Ƥ: 'P',
    Ꝕ: 'P',
    Ᵽ: 'P',
    Ꝑ: 'P',
    Ꝙ: 'Q',
    Ꝗ: 'Q',
    Ŕ: 'R',
    Ř: 'R',
    Ŗ: 'R',
    Ṙ: 'R',
    Ṛ: 'R',
    Ṝ: 'R',
    Ȑ: 'R',
    Ȓ: 'R',
    Ṟ: 'R',
    Ɍ: 'R',
    Ɽ: 'R',
    Ꜿ: 'C',
    Ǝ: 'E',
    Ś: 'S',
    Ṥ: 'S',
    Š: 'S',
    Ṧ: 'S',
    Ş: 'S',
    Ŝ: 'S',
    Ș: 'S',
    Ṡ: 'S',
    Ṣ: 'S',
    Ṩ: 'S',
    ß: 'ss',
    Ť: 'T',
    Ţ: 'T',
    Ṱ: 'T',
    Ț: 'T',
    Ⱦ: 'T',
    Ṫ: 'T',
    Ṭ: 'T',
    Ƭ: 'T',
    Ṯ: 'T',
    Ʈ: 'T',
    Ŧ: 'T',
    Ɐ: 'A',
    Ꞁ: 'L',
    Ɯ: 'M',
    Ʌ: 'V',
    Ꜩ: 'TZ',
    Ú: 'U',
    Ŭ: 'U',
    Ǔ: 'U',
    Û: 'U',
    Ṷ: 'U',
    Ü: 'U',
    Ǘ: 'U',
    Ǚ: 'U',
    Ǜ: 'U',
    Ǖ: 'U',
    Ṳ: 'U',
    Ụ: 'U',
    Ű: 'U',
    Ȕ: 'U',
    Ù: 'U',
    Ủ: 'U',
    Ư: 'U',
    Ứ: 'U',
    Ự: 'U',
    Ừ: 'U',
    Ử: 'U',
    Ữ: 'U',
    Ȗ: 'U',
    Ū: 'U',
    Ṻ: 'U',
    Ų: 'U',
    Ů: 'U',
    Ũ: 'U',
    Ṹ: 'U',
    Ṵ: 'U',
    Ꝟ: 'V',
    Ṿ: 'V',
    Ʋ: 'V',
    Ṽ: 'V',
    Ꝡ: 'VY',
    Ẃ: 'W',
    Ŵ: 'W',
    Ẅ: 'W',
    Ẇ: 'W',
    Ẉ: 'W',
    Ẁ: 'W',
    Ⱳ: 'W',
    Ẍ: 'X',
    Ẋ: 'X',
    Ý: 'Y',
    Ŷ: 'Y',
    Ÿ: 'Y',
    Ẏ: 'Y',
    Ỵ: 'Y',
    Ỳ: 'Y',
    Ƴ: 'Y',
    Ỷ: 'Y',
    Ỿ: 'Y',
    Ȳ: 'Y',
    Ɏ: 'Y',
    Ỹ: 'Y',
    Ї: 'YI',
    Ź: 'Z',
    Ž: 'Z',
    Ẑ: 'Z',
    Ⱬ: 'Z',
    Ż: 'Z',
    Ẓ: 'Z',
    Ȥ: 'Z',
    Ẕ: 'Z',
    Ƶ: 'Z',
    Þ: 'TH',
    IJ: 'IJ',
    Œ: 'OE',
    ᴀ: 'A',
    ᴁ: 'AE',
    ʙ: 'B',
    ᴃ: 'B',
    ᴄ: 'C',
    ᴅ: 'D',
    ᴇ: 'E',
    ꜰ: 'F',
    ɢ: 'G',
    ʛ: 'G',
    ʜ: 'H',
    ɪ: 'I',
    ʁ: 'R',
    ᴊ: 'J',
    ᴋ: 'K',
    ʟ: 'L',
    ᴌ: 'L',
    ᴍ: 'M',
    ɴ: 'N',
    ᴏ: 'O',
    ɶ: 'OE',
    ᴐ: 'O',
    ᴕ: 'OU',
    ᴘ: 'P',
    ʀ: 'R',
    ᴎ: 'N',
    ᴙ: 'R',
    ꜱ: 'S',
    ᴛ: 'T',
    ⱻ: 'E',
    ᴚ: 'R',
    ᴜ: 'U',
    ᴠ: 'V',
    ᴡ: 'W',
    ʏ: 'Y',
    ᴢ: 'Z',
    á: 'a',
    ă: 'a',
    ắ: 'a',
    ặ: 'a',
    ằ: 'a',
    ẳ: 'a',
    ẵ: 'a',
    ǎ: 'a',
    â: 'a',
    ấ: 'a',
    ậ: 'a',
    ầ: 'a',
    ẩ: 'a',
    ẫ: 'a',
    ä: 'a',
    ǟ: 'a',
    ȧ: 'a',
    ǡ: 'a',
    ạ: 'a',
    ȁ: 'a',
    à: 'a',
    ả: 'a',
    ȃ: 'a',
    ā: 'a',
    ą: 'a',
    ᶏ: 'a',
    ẚ: 'a',
    å: 'a',
    ǻ: 'a',
    ḁ: 'a',
    ⱥ: 'a',
    ã: 'a',
    ꜳ: 'aa',
    æ: 'ae',
    ǽ: 'ae',
    ǣ: 'ae',
    ꜵ: 'ao',
    ꜷ: 'au',
    ꜹ: 'av',
    ꜻ: 'av',
    ꜽ: 'ay',
    ḃ: 'b',
    ḅ: 'b',
    ɓ: 'b',
    ḇ: 'b',
    ᵬ: 'b',
    ᶀ: 'b',
    ƀ: 'b',
    ƃ: 'b',
    ɵ: 'o',
    ć: 'c',
    č: 'c',
    ç: 'c',
    ḉ: 'c',
    ĉ: 'c',
    ɕ: 'c',
    ċ: 'c',
    ƈ: 'c',
    ȼ: 'c',
    ď: 'd',
    ḑ: 'd',
    ḓ: 'd',
    ȡ: 'd',
    ḋ: 'd',
    ḍ: 'd',
    ɗ: 'd',
    ᶑ: 'd',
    ḏ: 'd',
    ᵭ: 'd',
    ᶁ: 'd',
    đ: 'd',
    ɖ: 'd',
    ƌ: 'd',
    ð: 'd',
    ı: 'i',
    ȷ: 'j',
    ɟ: 'j',
    ʄ: 'j',
    dz: 'dz',
    dž: 'dz',
    é: 'e',
    ĕ: 'e',
    ě: 'e',
    ȩ: 'e',
    ḝ: 'e',
    ê: 'e',
    ế: 'e',
    ệ: 'e',
    ề: 'e',
    ể: 'e',
    ễ: 'e',
    ḙ: 'e',
    ë: 'e',
    ė: 'e',
    ẹ: 'e',
    ȅ: 'e',
    è: 'e',
    ẻ: 'e',
    ȇ: 'e',
    ē: 'e',
    ḗ: 'e',
    ḕ: 'e',
    ⱸ: 'e',
    ę: 'e',
    ᶒ: 'e',
    ɇ: 'e',
    ẽ: 'e',
    ḛ: 'e',
    ꝫ: 'et',
    ḟ: 'f',
    ƒ: 'f',
    ᵮ: 'f',
    ᶂ: 'f',
    ǵ: 'g',
    ğ: 'g',
    ǧ: 'g',
    ģ: 'g',
    ĝ: 'g',
    ġ: 'g',
    ɠ: 'g',
    ḡ: 'g',
    ᶃ: 'g',
    ǥ: 'g',
    ḫ: 'h',
    ȟ: 'h',
    ḩ: 'h',
    ĥ: 'h',
    ⱨ: 'h',
    ḧ: 'h',
    ḣ: 'h',
    ḥ: 'h',
    ɦ: 'h',
    ẖ: 'h',
    ħ: 'h',
    ƕ: 'hv',
    í: 'i',
    ĭ: 'i',
    ǐ: 'i',
    î: 'i',
    ï: 'i',
    ḯ: 'i',
    ị: 'i',
    ȉ: 'i',
    ì: 'i',
    ỉ: 'i',
    ȋ: 'i',
    ī: 'i',
    į: 'i',
    ᶖ: 'i',
    ɨ: 'i',
    ĩ: 'i',
    ḭ: 'i',
    і: 'i',
    ꝺ: 'd',
    ꝼ: 'f',
    ᵹ: 'g',
    ꞃ: 'r',
    ꞅ: 's',
    ꞇ: 't',
    ꝭ: 'is',
    ǰ: 'j',
    ĵ: 'j',
    ʝ: 'j',
    ɉ: 'j',
    ḱ: 'k',
    ǩ: 'k',
    ķ: 'k',
    ⱪ: 'k',
    ꝃ: 'k',
    ḳ: 'k',
    ƙ: 'k',
    ḵ: 'k',
    ᶄ: 'k',
    ꝁ: 'k',
    ꝅ: 'k',
    ĺ: 'l',
    ƚ: 'l',
    ɬ: 'l',
    ľ: 'l',
    ļ: 'l',
    ḽ: 'l',
    ȴ: 'l',
    ḷ: 'l',
    ḹ: 'l',
    ⱡ: 'l',
    ꝉ: 'l',
    ḻ: 'l',
    ŀ: 'l',
    ɫ: 'l',
    ᶅ: 'l',
    ɭ: 'l',
    ł: 'l',
    lj: 'lj',
    ſ: 's',
    ẜ: 's',
    ẛ: 's',
    ẝ: 's',
    ḿ: 'm',
    ṁ: 'm',
    ṃ: 'm',
    ɱ: 'm',
    ᵯ: 'm',
    ᶆ: 'm',
    ń: 'n',
    ň: 'n',
    ņ: 'n',
    ṋ: 'n',
    ȵ: 'n',
    ṅ: 'n',
    ṇ: 'n',
    ǹ: 'n',
    ɲ: 'n',
    ṉ: 'n',
    ƞ: 'n',
    ᵰ: 'n',
    ᶇ: 'n',
    ɳ: 'n',
    ñ: 'n',
    nj: 'nj',
    ó: 'o',
    ŏ: 'o',
    ǒ: 'o',
    ô: 'o',
    ố: 'o',
    ộ: 'o',
    ồ: 'o',
    ổ: 'o',
    ỗ: 'o',
    ö: 'o',
    ȫ: 'o',
    ȯ: 'o',
    ȱ: 'o',
    ọ: 'o',
    ő: 'o',
    ȍ: 'o',
    ò: 'o',
    ỏ: 'o',
    ơ: 'o',
    ớ: 'o',
    ợ: 'o',
    ờ: 'o',
    ở: 'o',
    ỡ: 'o',
    ȏ: 'o',
    ꝋ: 'o',
    ꝍ: 'o',
    ⱺ: 'o',
    ō: 'o',
    ṓ: 'o',
    ṑ: 'o',
    ǫ: 'o',
    ǭ: 'o',
    ø: 'o',
    ǿ: 'o',
    õ: 'o',
    ṍ: 'o',
    ṏ: 'o',
    ȭ: 'o',
    ƣ: 'oi',
    ꝏ: 'oo',
    ɛ: 'e',
    ᶓ: 'e',
    ɔ: 'o',
    ᶗ: 'o',
    ȣ: 'ou',
    ṕ: 'p',
    ṗ: 'p',
    ꝓ: 'p',
    ƥ: 'p',
    ᵱ: 'p',
    ᶈ: 'p',
    ꝕ: 'p',
    ᵽ: 'p',
    ꝑ: 'p',
    ꝙ: 'q',
    ʠ: 'q',
    ɋ: 'q',
    ꝗ: 'q',
    ŕ: 'r',
    ř: 'r',
    ŗ: 'r',
    ṙ: 'r',
    ṛ: 'r',
    ṝ: 'r',
    ȑ: 'r',
    ɾ: 'r',
    ᵳ: 'r',
    ȓ: 'r',
    ṟ: 'r',
    ɼ: 'r',
    ᵲ: 'r',
    ᶉ: 'r',
    ɍ: 'r',
    ɽ: 'r',
    ↄ: 'c',
    ꜿ: 'c',
    ɘ: 'e',
    ɿ: 'r',
    ś: 's',
    ṥ: 's',
    š: 's',
    ṧ: 's',
    ş: 's',
    ŝ: 's',
    ș: 's',
    ṡ: 's',
    ṣ: 's',
    ṩ: 's',
    ʂ: 's',
    ᵴ: 's',
    ᶊ: 's',
    ȿ: 's',
    ɡ: 'g',
    ᴑ: 'o',
    ᴓ: 'o',
    ᴝ: 'u',
    ť: 't',
    ţ: 't',
    ṱ: 't',
    ț: 't',
    ȶ: 't',
    ẗ: 't',
    ⱦ: 't',
    ṫ: 't',
    ṭ: 't',
    ƭ: 't',
    ṯ: 't',
    ᵵ: 't',
    ƫ: 't',
    ʈ: 't',
    ŧ: 't',
    ᵺ: 'th',
    ɐ: 'a',
    ᴂ: 'ae',
    ǝ: 'e',
    ᵷ: 'g',
    ɥ: 'h',
    ʮ: 'h',
    ʯ: 'h',
    ᴉ: 'i',
    ʞ: 'k',
    ꞁ: 'l',
    ɯ: 'm',
    ɰ: 'm',
    ᴔ: 'oe',
    ɹ: 'r',
    ɻ: 'r',
    ɺ: 'r',
    ⱹ: 'r',
    ʇ: 't',
    ʌ: 'v',
    ʍ: 'w',
    ʎ: 'y',
    ꜩ: 'tz',
    ú: 'u',
    ŭ: 'u',
    ǔ: 'u',
    û: 'u',
    ṷ: 'u',
    ü: 'u',
    ǘ: 'u',
    ǚ: 'u',
    ǜ: 'u',
    ǖ: 'u',
    ṳ: 'u',
    ụ: 'u',
    ű: 'u',
    ȕ: 'u',
    ù: 'u',
    ủ: 'u',
    ư: 'u',
    ứ: 'u',
    ự: 'u',
    ừ: 'u',
    ử: 'u',
    ữ: 'u',
    ȗ: 'u',
    ū: 'u',
    ṻ: 'u',
    ų: 'u',
    ᶙ: 'u',
    ů: 'u',
    ũ: 'u',
    ṹ: 'u',
    ṵ: 'u',
    ᵫ: 'ue',
    ꝸ: 'um',
    ⱴ: 'v',
    ꝟ: 'v',
    ṿ: 'v',
    ʋ: 'v',
    ᶌ: 'v',
    ⱱ: 'v',
    ṽ: 'v',
    ꝡ: 'vy',
    ẃ: 'w',
    ŵ: 'w',
    ẅ: 'w',
    ẇ: 'w',
    ẉ: 'w',
    ẁ: 'w',
    ⱳ: 'w',
    ẘ: 'w',
    ẍ: 'x',
    ẋ: 'x',
    ᶍ: 'x',
    ý: 'y',
    ŷ: 'y',
    ÿ: 'y',
    ẏ: 'y',
    ỵ: 'y',
    ỳ: 'y',
    ƴ: 'y',
    ỷ: 'y',
    ỿ: 'y',
    ȳ: 'y',
    ẙ: 'y',
    ɏ: 'y',
    ỹ: 'y',
    ї: 'yi',
    ź: 'z',
    ž: 'z',
    ẑ: 'z',
    ʑ: 'z',
    ⱬ: 'z',
    ż: 'z',
    ẓ: 'z',
    ȥ: 'z',
    ẕ: 'z',
    ᵶ: 'z',
    ᶎ: 'z',
    ʐ: 'z',
    ƶ: 'z',
    ɀ: 'z',
    þ: 'th',
    ff: 'ff',
    ffi: 'ffi',
    ffl: 'ffl',
    fi: 'fi',
    fl: 'fl',
    ij: 'ij',
    œ: 'oe',
    st: 'st',
    ₐ: 'a',
    ₑ: 'e',
    ᵢ: 'i',
    ⱼ: 'j',
    ₒ: 'o',
    ᵣ: 'r',
    ᵤ: 'u',
    ᵥ: 'v',
    ₓ: 'x',
    Ё: 'YO',
    Й: 'I',
    Ц: 'TS',
    У: 'U',
    К: 'K',
    Е: 'E',
    Н: 'N',
    Г: 'G',
    Ґ: 'G',
    Ш: 'SH',
    Щ: 'SCH',
    З: 'Z',
    Х: 'H',
    Ъ: "'",
    ё: 'yo',
    й: 'i',
    ц: 'ts',
    у: 'u',
    к: 'k',
    е: 'e',
    н: 'n',
    г: 'g',
    ґ: 'g',
    ш: 'sh',
    щ: 'sch',
    з: 'z',
    х: 'h',
    ъ: "'",
    Ф: 'F',
    Ы: 'I',
    В: 'V',
    А: 'a',
    П: 'P',
    Р: 'R',
    О: 'O',
    Л: 'L',
    Д: 'D',
    Ж: 'ZH',
    Э: 'E',
    ф: 'f',
    ы: 'i',
    в: 'v',
    а: 'a',
    п: 'p',
    р: 'r',
    о: 'o',
    л: 'l',
    д: 'd',
    ж: 'zh',
    э: 'e',
    Я: 'Ya',
    Ч: 'CH',
    С: 'S',
    М: 'M',
    И: 'I',
    Т: 'T',
    Ь: "'",
    Б: 'B',
    Ю: 'YU',
    я: 'ya',
    ч: 'ch',
    с: 's',
    м: 'm',
    и: 'i',
    т: 't',
    ь: "'",
    б: 'b',
    ю: 'yu'
};
function latinize(str) {
    Eif (typeof str === 'string') {
        return str.replace(/[^A-Za-z0-9]/g, function (char) {
            return diacriticsToLatinCharacters[char] || char;
        });
    }
    else {
        return str;
    }
}
exports.latinize = latinize;
 
 
/***/ }),
/* 1014 */
/***/ (function(module, exports) {
 
// empty (null-loader)
 
/***/ }),
/* 1015 */
/***/ (function(module, exports) {
 
// empty (null-loader)
 
/***/ }),
/* 1016 */
/***/ (function(module, exports) {
 
// empty (null-loader)
 
/***/ }),
/* 1017 */
/***/ (function(module, exports) {
 
// empty (null-loader)
 
/***/ }),
/* 1018 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
 
var _interopRequireDefault = __webpack_require__(116);
 
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;
 
var _create = _interopRequireDefault(__webpack_require__(1019));
 
var _slicedToArray2 = _interopRequireDefault(__webpack_require__(1034));
 
var _getIterator2 = _interopRequireDefault(__webpack_require__(314));
 
var _parseInt2 = _interopRequireDefault(__webpack_require__(1056));
 
/*!
 * XRegExp 4.2.4
 * <xregexp.com>
 * Steven Levithan (c) 2007-present MIT License
 */
 
/**
 * XRegExp provides augmented, extensible regular expressions. You get additional regex syntax and
 * flags, beyond what browsers support natively. XRegExp is also a regex utility belt with tools to
 * make your client-side grepping simpler and more powerful, while freeing you from related
 * cross-browser inconsistencies.
 */
// ==--------------------------==
// Private stuff
// ==--------------------------==
// Property name used for extended regex instance data
var REGEX_DATA = 'xregexp'; // Optional features that can be installed and uninstalled
 
var features = {
  astral: false,
  namespacing: false
}; // Native methods to use and restore ('native' is an ES3 reserved keyword)
 
var nativ = {
  exec: RegExp.prototype.exec,
  test: RegExp.prototype.test,
  match: String.prototype.match,
  replace: String.prototype.replace,
  split: String.prototype.split
}; // Storage for fixed/extended native methods
 
var fixed = {}; // Storage for regexes cached by `XRegExp.cache`
 
var regexCache = {}; // Storage for pattern details cached by the `XRegExp` constructor
 
var patternCache = {}; // Storage for regex syntax tokens added internally or by `XRegExp.addToken`
 
var tokens = []; // Token scopes
 
var defaultScope = 'default';
var classScope = 'class'; // Regexes that match native regex syntax, including octals
 
var nativeTokens = {
  // Any native multicharacter token in default scope, or any single character
  'default': /\\(?:0(?:[0-3][0-7]{0,2}|[4-7][0-7]?)?|[1-9]\d*|x[\dA-Fa-f]{2}|u(?:[\dA-Fa-f]{4}|{[\dA-Fa-f]+})|c[A-Za-z]|[\s\S])|\(\?(?:[:=!]|<[=!])|[?*+]\?|{\d+(?:,\d*)?}\??|[\s\S]/,
  // Any native multicharacter token in character class scope, or any single character
  'class': /\\(?:[0-3][0-7]{0,2}|[4-7][0-7]?|x[\dA-Fa-f]{2}|u(?:[\dA-Fa-f]{4}|{[\dA-Fa-f]+})|c[A-Za-z]|[\s\S])|[\s\S]/
}; // Any backreference or dollar-prefixed character in replacement strings
 
var replacementToken = /\$(?:{([\w$]+)}|<([\w$]+)>|(\d\d?|[\s\S]))/g; // Check for correct `exec` handling of nonparticipating capturing groups
 
var correctExecNpcg = nativ.exec.call(/()??/, '')[1] === undefined; // Check for ES6 `flags` prop support
 
var hasFlagsProp = /x/.flags !== undefined; // Shortcut to `Object.prototype.toString`
 
var _ref = {},
    toString = _ref.toString;
 
function hasNativeFlag(flag) {
  // Can't check based on the presence of properties/getters since browsers might support such
  // properties even when they don't support the corresponding flag in regex construction (tested
  // in Chrome 48, where `'unicode' in /x/` is true but trying to construct a regex with flag `u`
  // throws an error)
  var isSupported = true;
 
  try {
    // Can't use regex literals for testing even in a `try` because regex literals with
    // unsupported flags cause a compilation error in IE
    new RegExp('', flag);
  } catch (exception) {
    isSupported = false;
  }
 
  return isSupported;
} // Check for ES6 `u` flag support
 
 
var hasNativeU = hasNativeFlag('u'); // Check for ES6 `y` flag support
 
var hasNativeY = hasNativeFlag('y'); // Tracker for known flags, including addon flags
 
var registeredFlags = {
  g: true,
  i: true,
  m: true,
  u: hasNativeU,
  y: hasNativeY
};
/**
 * Attaches extended data and `XRegExp.prototype` properties to a regex object.
 *
 * @private
 * @param {RegExp} regex Regex to augment.
 * @param {Array} captureNames Array with capture names, or `null`.
 * @param {String} xSource XRegExp pattern used to generate `regex`, or `null` if N/A.
 * @param {String} xFlags XRegExp flags used to generate `regex`, or `null` if N/A.
 * @param {Boolean} [isInternalOnly=false] Whether the regex will be used only for internal
 *   operations, and never exposed to users. For internal-only regexes, we can improve perf by
 *   skipping some operations like attaching `XRegExp.prototype` properties.
 * @returns {RegExp} Augmented regex.
 */
 
function augment(regex, captureNames, xSource, xFlags, isInternalOnly) {
  regex[REGEX_DATA] = {
    captureNames: captureNames
  };
 
  if (isInternalOnly) {
    return regex;
  } // Can't auto-inherit these since the XRegExp constructor returns a nonprimitive value
 
 
  Eif (regex.__proto__) {
    regex.__proto__ = XRegExp.prototype;
  } else {
    for (var p in XRegExp.prototype) {
      // An `XRegExp.prototype.hasOwnProperty(p)` check wouldn't be worth it here, since this
      // is performance sensitive, and enumerable `Object.prototype` or `RegExp.prototype`
      // extensions exist on `regex.prototype` anyway
      regex[p] = XRegExp.prototype[p];
    }
  }
 
  regex[REGEX_DATA].source = xSource; // Emulate the ES6 `flags` prop by ensuring flags are in alphabetical order
 
  regex[REGEX_DATA].flags = xFlags ? xFlags.split('').sort().join('') : xFlags;
  return regex;
}
/**
 * Removes any duplicate characters from the provided string.
 *
 * @private
 * @param {String} str String to remove duplicate characters from.
 * @returns {String} String with any duplicate characters removed.
 */
 
 
function clipDuplicates(str) {
  return nativ.replace.call(str, /([\s\S])(?=[\s\S]*\1)/g, '');
}
/**
 * Copies a regex object while preserving extended data and augmenting with `XRegExp.prototype`
 * properties. The copy has a fresh `lastIndex` property (set to zero). Allows adding and removing
 * flags g and y while copying the regex.
 *
 * @private
 * @param {RegExp} regex Regex to copy.
 * @param {Object} [options] Options object with optional properties:
 *   - `addG` {Boolean} Add flag g while copying the regex.
 *   - `addY` {Boolean} Add flag y while copying the regex.
 *   - `removeG` {Boolean} Remove flag g while copying the regex.
 *   - `removeY` {Boolean} Remove flag y while copying the regex.
 *   - `isInternalOnly` {Boolean} Whether the copied regex will be used only for internal
 *     operations, and never exposed to users. For internal-only regexes, we can improve perf by
 *     skipping some operations like attaching `XRegExp.prototype` properties.
 *   - `source` {String} Overrides `<regex>.source`, for special cases.
 * @returns {RegExp} Copy of the provided regex, possibly with modified flags.
 */
 
 
function copyRegex(regex, options) {
  Iif (!XRegExp.isRegExp(regex)) {
    throw new TypeError('Type RegExp expected');
  }
 
  var xData = regex[REGEX_DATA] || {};
  var flags = getNativeFlags(regex);
  var flagsToAdd = '';
  var flagsToRemove = '';
  var xregexpSource = null;
  var xregexpFlags = null;
  options = options || {};
 
  Iif (options.removeG) {
    flagsToRemove += 'g';
  }
 
  Iif (options.removeY) {
    flagsToRemove += 'y';
  }
 
  Iif (flagsToRemove) {
    flags = nativ.replace.call(flags, new RegExp("[".concat(flagsToRemove, "]+"), 'g'), '');
  }
 
  Eif (options.addG) {
    flagsToAdd += 'g';
  }
 
  Eif (options.addY) {
    flagsToAdd += 'y';
  }
 
  Eif (flagsToAdd) {
    flags = clipDuplicates(flags + flagsToAdd);
  }
 
  Iif (!options.isInternalOnly) {
    if (xData.source !== undefined) {
      xregexpSource = xData.source;
    } // null or undefined; don't want to add to `flags` if the previous value was null, since
    // that indicates we're not tracking original precompilation flags
 
 
    if (xData.flags != null) {
      // Flags are only added for non-internal regexes by `XRegExp.globalize`. Flags are never
      // removed for non-internal regexes, so don't need to handle it
      xregexpFlags = flagsToAdd ? clipDuplicates(xData.flags + flagsToAdd) : xData.flags;
    }
  } // Augment with `XRegExp.prototype` properties, but use the native `RegExp` constructor to avoid
  // searching for special tokens. That would be wrong for regexes constructed by `RegExp`, and
  // unnecessary for regexes constructed by `XRegExp` because the regex has already undergone the
  // translation to native regex syntax
 
 
  regex = augment(new RegExp(options.source || regex.source, flags), hasNamedCapture(regex) ? xData.captureNames.slice(0) : null, xregexpSource, xregexpFlags, options.isInternalOnly);
  return regex;
}
/**
 * Converts hexadecimal to decimal.
 *
 * @private
 * @param {String} hex
 * @returns {Number}
 */
 
 
function dec(hex) {
  return (0, _parseInt2.default)(hex, 16);
}
/**
 * Returns a pattern that can be used in a native RegExp in place of an ignorable token such as an
 * inline comment or whitespace with flag x. This is used directly as a token handler function
 * passed to `XRegExp.addToken`.
 *
 * @private
 * @param {String} match Match arg of `XRegExp.addToken` handler
 * @param {String} scope Scope arg of `XRegExp.addToken` handler
 * @param {String} flags Flags arg of `XRegExp.addToken` handler
 * @returns {String} Either '' or '(?:)', depending on which is needed in the context of the match.
 */
 
 
function getContextualTokenSeparator(match, scope, flags) {
  if ( // No need to separate tokens if at the beginning or end of a group
  match.input[match.index - 1] === '(' || match.input[match.index + match[0].length] === ')' || // No need to separate tokens if before or after a `|`
  match.input[match.index - 1] === '|' || match.input[match.index + match[0].length] === '|' || // No need to separate tokens if at the beginning or end of the pattern
  match.index < 1 || match.index + match[0].length >= match.input.length || // No need to separate tokens if at the beginning of a noncapturing group or lookahead.
  // The way this is written relies on:
  // - The search regex matching only 3-char strings.
  // - Although `substr` gives chars from the end of the string if given a negative index,
  //   the resulting substring will be too short to match. Ex: `'abcd'.substr(-1, 3) === 'd'`
  nativ.test.call(/^\(\?[:=!]/, match.input.substr(match.index - 3, 3)) || // Avoid separating tokens when the following token is a quantifier
  isQuantifierNext(match.input, match.index + match[0].length, flags)) {
    return '';
  } // Keep tokens separated. This avoids e.g. inadvertedly changing `\1 1` or `\1(?#)1` to `\11`.
  // This also ensures all tokens remain as discrete atoms, e.g. it avoids converting the syntax
  // error `(? :` into `(?:`.
 
 
  return '(?:)';
}
/**
 * Returns native `RegExp` flags used by a regex object.
 *
 * @private
 * @param {RegExp} regex Regex to check.
 * @returns {String} Native flags in use.
 */
 
 
function getNativeFlags(regex) {
  return hasFlagsProp ? regex.flags : // Explicitly using `RegExp.prototype.toString` (rather than e.g. `String` or concatenation
  // with an empty string) allows this to continue working predictably when
  // `XRegExp.proptotype.toString` is overridden
  nativ.exec.call(/\/([a-z]*)$/i, RegExp.prototype.toString.call(regex))[1];
}
/**
 * Determines whether a regex has extended instance data used to track capture names.
 *
 * @private
 * @param {RegExp} regex Regex to check.
 * @returns {Boolean} Whether the regex uses named capture.
 */
 
 
function hasNamedCapture(regex) {
  return !!(regex[REGEX_DATA] && regex[REGEX_DATA].captureNames);
}
/**
 * Converts decimal to hexadecimal.
 *
 * @private
 * @param {Number|String} dec
 * @returns {String}
 */
 
 
function hex(dec) {
  return (0, _parseInt2.default)(dec, 10).toString(16);
}
/**
 * Checks whether the next nonignorable token after the specified position is a quantifier.
 *
 * @private
 * @param {String} pattern Pattern to search within.
 * @param {Number} pos Index in `pattern` to search at.
 * @param {String} flags Flags used by the pattern.
 * @returns {Boolean} Whether the next nonignorable token is a quantifier.
 */
 
 
function isQuantifierNext(pattern, pos, flags) {
  var inlineCommentPattern = '\\(\\?#[^)]*\\)';
  var lineCommentPattern = '#[^#\\n]*';
  var quantifierPattern = '[?*+]|{\\d+(?:,\\d*)?}';
  return nativ.test.call(flags.indexOf('x') !== -1 ? // Ignore any leading whitespace, line comments, and inline comments
  /^(?:\s|#[^#\n]*|\(\?#[^)]*\))*(?:[?*+]|{\d+(?:,\d*)?})/ : // Ignore any leading inline comments
  /^(?:\(\?#[^)]*\))*(?:[?*+]|{\d+(?:,\d*)?})/, pattern.slice(pos));
}
/**
 * Determines whether a value is of the specified type, by resolving its internal [[Class]].
 *
 * @private
 * @param {*} value Object to check.
 * @param {String} type Type to check for, in TitleCase.
 * @returns {Boolean} Whether the object matches the type.
 */
 
 
function isType(value, type) {
  return toString.call(value) === "[object ".concat(type, "]");
}
/**
 * Adds leading zeros if shorter than four characters. Used for fixed-length hexadecimal values.
 *
 * @private
 * @param {String} str
 * @returns {String}
 */
 
 
function pad4(str) {
  while (str.length < 4) {
    str = "0".concat(str);
  }
 
  return str;
}
/**
 * Checks for flag-related errors, and strips/applies flags in a leading mode modifier. Offloads
 * the flag preparation logic from the `XRegExp` constructor.
 *
 * @private
 * @param {String} pattern Regex pattern, possibly with a leading mode modifier.
 * @param {String} flags Any combination of flags.
 * @returns {Object} Object with properties `pattern` and `flags`.
 */
 
 
function prepareFlags(pattern, flags) {
  // Recent browsers throw on duplicate flags, so copy this behavior for nonnative flags
  Iif (clipDuplicates(flags) !== flags) {
    throw new SyntaxError("Invalid duplicate regex flag ".concat(flags));
  } // Strip and apply a leading mode modifier with any combination of flags except g or y
 
 
  pattern = nativ.replace.call(pattern, /^\(\?([\w$]+)\)/, function ($0, $1) {
    if (nativ.test.call(/[gy]/, $1)) {
      throw new SyntaxError("Cannot use flag g or y in mode modifier ".concat($0));
    } // Allow duplicate flags within the mode modifier
 
 
    flags = clipDuplicates(flags + $1);
    return '';
  }); // Throw on unknown native or nonnative flags
 
  var _iteratorNormalCompletion = true;
  var _didIteratorError = false;
  var _iteratorError = undefined;
 
  try {
    for (var _iterator = (0, _getIterator2.default)(flags), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
      var flag = _step.value;
 
      Iif (!registeredFlags[flag]) {
        throw new SyntaxError("Unknown regex flag ".concat(flag));
      }
    }
  } catch (err) {
    _didIteratorError = true;
    _iteratorError = err;
  } finally {
    try {
      Iif (!_iteratorNormalCompletion && _iterator.return != null) {
        _iterator.return();
      }
    } finally {
      Iif (_didIteratorError) {
        throw _iteratorError;
      }
    }
  }
 
  return {
    pattern: pattern,
    flags: flags
  };
}
/**
 * Prepares an options object from the given value.
 *
 * @private
 * @param {String|Object} value Value to convert to an options object.
 * @returns {Object} Options object.
 */
 
 
function prepareOptions(value) {
  var options = {};
 
  if (isType(value, 'String')) {
    XRegExp.forEach(value, /[^\s,]+/, function (match) {
      options[match] = true;
    });
    return options;
  }
 
  return value;
}
/**
 * Registers a flag so it doesn't throw an 'unknown flag' error.
 *
 * @private
 * @param {String} flag Single-character flag to register.
 */
 
 
function registerFlag(flag) {
  Iif (!/^[\w$]$/.test(flag)) {
    throw new Error('Flag must be a single character A-Za-z0-9_$');
  }
 
  registeredFlags[flag] = true;
}
/**
 * Runs built-in and custom regex syntax tokens in reverse insertion order at the specified
 * position, until a match is found.
 *
 * @private
 * @param {String} pattern Original pattern from which an XRegExp object is being built.
 * @param {String} flags Flags being used to construct the regex.
 * @param {Number} pos Position to search for tokens within `pattern`.
 * @param {Number} scope Regex scope to apply: 'default' or 'class'.
 * @param {Object} context Context object to use for token handler functions.
 * @returns {Object} Object with properties `matchLength`, `output`, and `reparse`; or `null`.
 */
 
 
function runTokens(pattern, flags, pos, scope, context) {
  var i = tokens.length;
  var leadChar = pattern[pos];
  var result = null;
  var match;
  var t; // Run in reverse insertion order
 
  while (i--) {
    t = tokens[i];
 
    if (t.leadChar && t.leadChar !== leadChar || t.scope !== scope && t.scope !== 'all' || t.flag && !(flags.indexOf(t.flag) !== -1)) {
      continue;
    }
 
    match = XRegExp.exec(pattern, t.regex, pos, 'sticky');
 
    if (match) {
      result = {
        matchLength: match[0].length,
        output: t.handler.call(context, match, scope, flags),
        reparse: t.reparse
      }; // Finished with token tests
 
      break;
    }
  }
 
  return result;
}
/**
 * Enables or disables implicit astral mode opt-in. When enabled, flag A is automatically added to
 * all new regexes created by XRegExp. This causes an error to be thrown when creating regexes if
 * the Unicode Base addon is not available, since flag A is registered by that addon.
 *
 * @private
 * @param {Boolean} on `true` to enable; `false` to disable.
 */
 
 
function setAstral(on) {
  features.astral = on;
}
/**
 * Adds named capture groups to the `groups` property of match arrays. See here for details:
 * https://github.com/tc39/proposal-regexp-named-groups
 *
 * @private
 * @param {Boolean} on `true` to enable; `false` to disable.
 */
 
 
function setNamespacing(on) {
  features.namespacing = on;
}
/**
 * Returns the object, or throws an error if it is `null` or `undefined`. This is used to follow
 * the ES5 abstract operation `ToObject`.
 *
 * @private
 * @param {*} value Object to check and return.
 * @returns {*} The provided object.
 */
 
 
function toObject(value) {
  // null or undefined
  if (value == null) {
    throw new TypeError('Cannot convert null or undefined to object');
  }
 
  return value;
} // ==--------------------------==
// Constructor
// ==--------------------------==
 
/**
 * Creates an extended regular expression object for matching text with a pattern. Differs from a
 * native regular expression in that additional syntax and flags are supported. The returned object
 * is in fact a native `RegExp` and works with all native methods.
 *
 * @class XRegExp
 * @constructor
 * @param {String|RegExp} pattern Regex pattern string, or an existing regex object to copy.
 * @param {String} [flags] Any combination of flags.
 *   Native flags:
 *     - `g` - global
 *     - `i` - ignore case
 *     - `m` - multiline anchors
 *     - `u` - unicode (ES6)
 *     - `y` - sticky (Firefox 3+, ES6)
 *   Additional XRegExp flags:
 *     - `n` - explicit capture
 *     - `s` - dot matches all (aka singleline)
 *     - `x` - free-spacing and line comments (aka extended)
 *     - `A` - astral (requires the Unicode Base addon)
 *   Flags cannot be provided when constructing one `RegExp` from another.
 * @returns {RegExp} Extended regular expression object.
 * @example
 *
 * // With named capture and flag x
 * XRegExp(`(?<year>  [0-9]{4} ) -?  # year
 *          (?<month> [0-9]{2} ) -?  # month
 *          (?<day>   [0-9]{2} )     # day`, 'x');
 *
 * // Providing a regex object copies it. Native regexes are recompiled using native (not XRegExp)
 * // syntax. Copies maintain extended data, are augmented with `XRegExp.prototype` properties, and
 * // have fresh `lastIndex` properties (set to zero).
 * XRegExp(/regex/);
 */
 
 
function XRegExp(pattern, flags) {
  Iif (XRegExp.isRegExp(pattern)) {
    if (flags !== undefined) {
      throw new TypeError('Cannot supply flags when copying a RegExp');
    }
 
    return copyRegex(pattern);
  } // Copy the argument behavior of `RegExp`
 
 
  pattern = pattern === undefined ? '' : String(pattern);
  flags = flags === undefined ? '' : String(flags);
 
  Iif (XRegExp.isInstalled('astral') && !(flags.indexOf('A') !== -1)) {
    // This causes an error to be thrown if the Unicode Base addon is not available
    flags += 'A';
  }
 
  if (!patternCache[pattern]) {
    patternCache[pattern] = {};
  }
 
  if (!patternCache[pattern][flags]) {
    var context = {
      hasNamedCapture: false,
      captureNames: []
    };
    var scope = defaultScope;
    var output = '';
    var pos = 0;
    var result; // Check for flag-related errors, and strip/apply flags in a leading mode modifier
 
    var applied = prepareFlags(pattern, flags);
    var appliedPattern = applied.pattern;
    var appliedFlags = applied.flags; // Use XRegExp's tokens to translate the pattern to a native regex pattern.
    // `appliedPattern.length` may change on each iteration if tokens use `reparse`
 
    while (pos < appliedPattern.length) {
      do {
        // Check for custom tokens at the current position
        result = runTokens(appliedPattern, appliedFlags, pos, scope, context); // If the matched token used the `reparse` option, splice its output into the
        // pattern before running tokens again at the same position
 
        Iif (result && result.reparse) {
          appliedPattern = appliedPattern.slice(0, pos) + result.output + appliedPattern.slice(pos + result.matchLength);
        }
      } while (result && result.reparse);
 
      if (result) {
        output += result.output;
        pos += result.matchLength || 1;
      } else {
        // Get the native token at the current position
        var _XRegExp$exec = XRegExp.exec(appliedPattern, nativeTokens[scope], pos, 'sticky'),
            _XRegExp$exec2 = (0, _slicedToArray2.default)(_XRegExp$exec, 1),
            token = _XRegExp$exec2[0];
 
        output += token;
        pos += token.length;
 
        if (token === '[' && scope === defaultScope) {
          scope = classScope;
        } else if (token === ']' && scope === classScope) {
          scope = defaultScope;
        }
      }
    }
 
    patternCache[pattern][flags] = {
      // Use basic cleanup to collapse repeated empty groups like `(?:)(?:)` to `(?:)`. Empty
      // groups are sometimes inserted during regex transpilation in order to keep tokens
      // separated. However, more than one empty group in a row is never needed.
      pattern: nativ.replace.call(output, /(?:\(\?:\))+/g, '(?:)'),
      // Strip all but native flags
      flags: nativ.replace.call(appliedFlags, /[^gimuy]+/g, ''),
      // `context.captureNames` has an item for each capturing group, even if unnamed
      captures: context.hasNamedCapture ? context.captureNames : null
    };
  }
 
  var generated = patternCache[pattern][flags];
  return augment(new RegExp(generated.pattern, generated.flags), generated.captures, pattern, flags);
} // Add `RegExp.prototype` to the prototype chain
 
 
XRegExp.prototype = /(?:)/; // ==--------------------------==
// Public properties
// ==--------------------------==
 
/**
 * The XRegExp version number as a string containing three dot-separated parts. For example,
 * '2.0.0-beta-3'.
 *
 * @static
 * @memberOf XRegExp
 * @type String
 */
 
XRegExp.version = '4.2.4'; // ==--------------------------==
// Public methods
// ==--------------------------==
// Intentionally undocumented; used in tests and addons
 
XRegExp._clipDuplicates = clipDuplicates;
XRegExp._hasNativeFlag = hasNativeFlag;
XRegExp._dec = dec;
XRegExp._hex = hex;
XRegExp._pad4 = pad4;
/**
 * Extends XRegExp syntax and allows custom flags. This is used internally and can be used to
 * create XRegExp addons. If more than one token can match the same string, the last added wins.
 *
 * @memberOf XRegExp
 * @param {RegExp} regex Regex object that matches the new token.
 * @param {Function} handler Function that returns a new pattern string (using native regex syntax)
 *   to replace the matched token within all future XRegExp regexes. Has access to persistent
 *   properties of the regex being built, through `this`. Invoked with three arguments:
 *   - The match array, with named backreference properties.
 *   - The regex scope where the match was found: 'default' or 'class'.
 *   - The flags used by the regex, including any flags in a leading mode modifier.
 *   The handler function becomes part of the XRegExp construction process, so be careful not to
 *   construct XRegExps within the function or you will trigger infinite recursion.
 * @param {Object} [options] Options object with optional properties:
 *   - `scope` {String} Scope where the token applies: 'default', 'class', or 'all'.
 *   - `flag` {String} Single-character flag that triggers the token. This also registers the
 *     flag, which prevents XRegExp from throwing an 'unknown flag' error when the flag is used.
 *   - `optionalFlags` {String} Any custom flags checked for within the token `handler` that are
 *     not required to trigger the token. This registers the flags, to prevent XRegExp from
 *     throwing an 'unknown flag' error when any of the flags are used.
 *   - `reparse` {Boolean} Whether the `handler` function's output should not be treated as
 *     final, and instead be reparseable by other tokens (including the current token). Allows
 *     token chaining or deferring.
 *   - `leadChar` {String} Single character that occurs at the beginning of any successful match
 *     of the token (not always applicable). This doesn't change the behavior of the token unless
 *     you provide an erroneous value. However, providing it can increase the token's performance
 *     since the token can be skipped at any positions where this character doesn't appear.
 * @example
 *
 * // Basic usage: Add \a for the ALERT control code
 * XRegExp.addToken(
 *   /\\a/,
 *   () => '\\x07',
 *   {scope: 'all'}
 * );
 * XRegExp('\\a[\\a-\\n]+').test('\x07\n\x07'); // -> true
 *
 * // Add the U (ungreedy) flag from PCRE and RE2, which reverses greedy and lazy quantifiers.
 * // Since `scope` is not specified, it uses 'default' (i.e., transformations apply outside of
 * // character classes only)
 * XRegExp.addToken(
 *   /([?*+]|{\d+(?:,\d*)?})(\??)/,
 *   (match) => `${match[1]}${match[2] ? '' : '?'}`,
 *   {flag: 'U'}
 * );
 * XRegExp('a+', 'U').exec('aaa')[0]; // -> 'a'
 * XRegExp('a+?', 'U').exec('aaa')[0]; // -> 'aaa'
 */
 
XRegExp.addToken = function (regex, handler, options) {
  options = options || {};
  var _options = options,
      optionalFlags = _options.optionalFlags;
 
  if (options.flag) {
    registerFlag(options.flag);
  }
 
  if (optionalFlags) {
    optionalFlags = nativ.split.call(optionalFlags, '');
    var _iteratorNormalCompletion2 = true;
    var _didIteratorError2 = false;
    var _iteratorError2 = undefined;
 
    try {
      for (var _iterator2 = (0, _getIterator2.default)(optionalFlags), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
        var flag = _step2.value;
        registerFlag(flag);
      }
    } catch (err) {
      _didIteratorError2 = true;
      _iteratorError2 = err;
    } finally {
      try {
        Iif (!_iteratorNormalCompletion2 && _iterator2.return != null) {
          _iterator2.return();
        }
      } finally {
        Iif (_didIteratorError2) {
          throw _iteratorError2;
        }
      }
    }
  } // Add to the private list of syntax tokens
 
 
  tokens.push({
    regex: copyRegex(regex, {
      addG: true,
      addY: hasNativeY,
      isInternalOnly: true
    }),
    handler: handler,
    scope: options.scope || defaultScope,
    flag: options.flag,
    reparse: options.reparse,
    leadChar: options.leadChar
  }); // Reset the pattern cache used by the `XRegExp` constructor, since the same pattern and flags
  // might now produce different results
 
  XRegExp.cache.flush('patterns');
};
/**
 * Caches and returns the result of calling `XRegExp(pattern, flags)`. On any subsequent call with
 * the same pattern and flag combination, the cached copy of the regex is returned.
 *
 * @memberOf XRegExp
 * @param {String} pattern Regex pattern string.
 * @param {String} [flags] Any combination of XRegExp flags.
 * @returns {RegExp} Cached XRegExp object.
 * @example
 *
 * while (match = XRegExp.cache('.', 'gs').exec(str)) {
 *   // The regex is compiled once only
 * }
 */
 
 
XRegExp.cache = function (pattern, flags) {
  if (!regexCache[pattern]) {
    regexCache[pattern] = {};
  }
 
  return regexCache[pattern][flags] || (regexCache[pattern][flags] = XRegExp(pattern, flags));
}; // Intentionally undocumented; used in tests
 
 
XRegExp.cache.flush = function (cacheName) {
  Eif (cacheName === 'patterns') {
    // Flush the pattern cache used by the `XRegExp` constructor
    patternCache = {};
  } else {
    // Flush the regex cache populated by `XRegExp.cache`
    regexCache = {};
  }
};
/**
 * Escapes any regular expression metacharacters, for use when matching literal strings. The result
 * can safely be used at any point within a regex that uses any flags.
 *
 * @memberOf XRegExp
 * @param {String} str String to escape.
 * @returns {String} String with regex metacharacters escaped.
 * @example
 *
 * XRegExp.escape('Escaped? <.>');
 * // -> 'Escaped\?\ <\.>'
 */
 
 
XRegExp.escape = function (str) {
  return nativ.replace.call(toObject(str), /[-\[\]{}()*+?.,\\^$|#\s]/g, '\\$&');
};
/**
 * Executes a regex search in a specified string. Returns a match array or `null`. If the provided
 * regex uses named capture, named backreference properties are included on the match array.
 * Optional `pos` and `sticky` arguments specify the search start position, and whether the match
 * must start at the specified position only. The `lastIndex` property of the provided regex is not
 * used, but is updated for compatibility. Also fixes browser bugs compared to the native
 * `RegExp.prototype.exec` and can be used reliably cross-browser.
 *
 * @memberOf XRegExp
 * @param {String} str String to search.
 * @param {RegExp} regex Regex to search with.
 * @param {Number} [pos=0] Zero-based index at which to start the search.
 * @param {Boolean|String} [sticky=false] Whether the match must start at the specified position
 *   only. The string `'sticky'` is accepted as an alternative to `true`.
 * @returns {Array} Match array with named backreference properties, or `null`.
 * @example
 *
 * // Basic use, with named backreference
 * let match = XRegExp.exec('U+2620', XRegExp('U\\+(?<hex>[0-9A-F]{4})'));
 * match.hex; // -> '2620'
 *
 * // With pos and sticky, in a loop
 * let pos = 2, result = [], match;
 * while (match = XRegExp.exec('<1><2><3><4>5<6>', /<(\d)>/, pos, 'sticky')) {
 *   result.push(match[1]);
 *   pos = match.index + match[0].length;
 * }
 * // result -> ['2', '3', '4']
 */
 
 
XRegExp.exec = function (str, regex, pos, sticky) {
  var cacheKey = 'g';
  var addY = false;
  var fakeY = false;
  var match;
  addY = hasNativeY && !!(sticky || regex.sticky && sticky !== false);
 
  Eif (addY) {
    cacheKey += 'y';
  } else if (sticky) {
    // Simulate sticky matching by appending an empty capture to the original regex. The
    // resulting regex will succeed no matter what at the current index (set with `lastIndex`),
    // and will not search the rest of the subject string. We'll know that the original regex
    // has failed if that last capture is `''` rather than `undefined` (i.e., if that last
    // capture participated in the match).
    fakeY = true;
    cacheKey += 'FakeY';
  }
 
  regex[REGEX_DATA] = regex[REGEX_DATA] || {}; // Shares cached copies with `XRegExp.match`/`replace`
 
  var r2 = regex[REGEX_DATA][cacheKey] || (regex[REGEX_DATA][cacheKey] = copyRegex(regex, {
    addG: true,
    addY: addY,
    source: fakeY ? "".concat(regex.source, "|()") : undefined,
    removeY: sticky === false,
    isInternalOnly: true
  }));
  pos = pos || 0;
  r2.lastIndex = pos; // Fixed `exec` required for `lastIndex` fix, named backreferences, etc.
 
  match = fixed.exec.call(r2, str); // Get rid of the capture added by the pseudo-sticky matcher if needed. An empty string means
  // the original regexp failed (see above).
 
  Iif (fakeY && match && match.pop() === '') {
    match = null;
  }
 
  if (regex.global) {
    regex.lastIndex = match ? r2.lastIndex : 0;
  }
 
  return match;
};
/**
 * Executes a provided function once per regex match. Searches always start at the beginning of the
 * string and continue until the end, regardless of the state of the regex's `global` property and
 * initial `lastIndex`.
 *
 * @memberOf XRegExp
 * @param {String} str String to search.
 * @param {RegExp} regex Regex to search with.
 * @param {Function} callback Function to execute for each match. Invoked with four arguments:
 *   - The match array, with named backreference properties.
 *   - The zero-based match index.
 *   - The string being traversed.
 *   - The regex object being used to traverse the string.
 * @example
 *
 * // Extracts every other digit from a string
 * const evens = [];
 * XRegExp.forEach('1a2345', /\d/, (match, i) => {
 *   if (i % 2) evens.push(+match[0]);
 * });
 * // evens -> [2, 4]
 */
 
 
XRegExp.forEach = function (str, regex, callback) {
  var pos = 0;
  var i = -1;
  var match;
 
  while (match = XRegExp.exec(str, regex, pos)) {
    // Because `regex` is provided to `callback`, the function could use the deprecated/
    // nonstandard `RegExp.prototype.compile` to mutate the regex. However, since `XRegExp.exec`
    // doesn't use `lastIndex` to set the search position, this can't lead to an infinite loop,
    // at least. Actually, because of the way `XRegExp.exec` caches globalized versions of
    // regexes, mutating the regex will not have any effect on the iteration or matched strings,
    // which is a nice side effect that brings extra safety.
    callback(match, ++i, str, regex);
    pos = match.index + (match[0].length || 1);
  }
};
/**
 * Copies a regex object and adds flag `g`. The copy maintains extended data, is augmented with
 * `XRegExp.prototype` properties, and has a fresh `lastIndex` property (set to zero). Native
 * regexes are not recompiled using XRegExp syntax.
 *
 * @memberOf XRegExp
 * @param {RegExp} regex Regex to globalize.
 * @returns {RegExp} Copy of the provided regex with flag `g` added.
 * @example
 *
 * const globalCopy = XRegExp.globalize(/regex/);
 * globalCopy.global; // -> true
 */
 
 
XRegExp.globalize = function (regex) {
  return copyRegex(regex, {
    addG: true
  });
};
/**
 * Installs optional features according to the specified options. Can be undone using
 * `XRegExp.uninstall`.
 *
 * @memberOf XRegExp
 * @param {Object|String} options Options object or string.
 * @example
 *
 * // With an options object
 * XRegExp.install({
 *   // Enables support for astral code points in Unicode addons (implicitly sets flag A)
 *   astral: true,
 *
 *   // Adds named capture groups to the `groups` property of matches
 *   namespacing: true
 * });
 *
 * // With an options string
 * XRegExp.install('astral namespacing');
 */
 
 
XRegExp.install = function (options) {
  options = prepareOptions(options);
 
  if (!features.astral && options.astral) {
    setAstral(true);
  }
 
  if (!features.namespacing && options.namespacing) {
    setNamespacing(true);
  }
};
/**
 * Checks whether an individual optional feature is installed.
 *
 * @memberOf XRegExp
 * @param {String} feature Name of the feature to check. One of:
 *   - `astral`
 *   - `namespacing`
 * @returns {Boolean} Whether the feature is installed.
 * @example
 *
 * XRegExp.isInstalled('astral');
 */
 
 
XRegExp.isInstalled = function (feature) {
  return !!features[feature];
};
/**
 * Returns `true` if an object is a regex; `false` if it isn't. This works correctly for regexes
 * created in another frame, when `instanceof` and `constructor` checks would fail.
 *
 * @memberOf XRegExp
 * @param {*} value Object to check.
 * @returns {Boolean} Whether the object is a `RegExp` object.
 * @example
 *
 * XRegExp.isRegExp('string'); // -> false
 * XRegExp.isRegExp(/regex/i); // -> true
 * XRegExp.isRegExp(RegExp('^', 'm')); // -> true
 * XRegExp.isRegExp(XRegExp('(?s).')); // -> true
 */
 
 
XRegExp.isRegExp = function (value) {
  return toString.call(value) === '[object RegExp]';
}; // isType(value, 'RegExp');
 
/**
 * Returns the first matched string, or in global mode, an array containing all matched strings.
 * This is essentially a more convenient re-implementation of `String.prototype.match` that gives
 * the result types you actually want (string instead of `exec`-style array in match-first mode,
 * and an empty array instead of `null` when no matches are found in match-all mode). It also lets
 * you override flag g and ignore `lastIndex`, and fixes browser bugs.
 *
 * @memberOf XRegExp
 * @param {String} str String to search.
 * @param {RegExp} regex Regex to search with.
 * @param {String} [scope='one'] Use 'one' to return the first match as a string. Use 'all' to
 *   return an array of all matched strings. If not explicitly specified and `regex` uses flag g,
 *   `scope` is 'all'.
 * @returns {String|Array} In match-first mode: First match as a string, or `null`. In match-all
 *   mode: Array of all matched strings, or an empty array.
 * @example
 *
 * // Match first
 * XRegExp.match('abc', /\w/); // -> 'a'
 * XRegExp.match('abc', /\w/g, 'one'); // -> 'a'
 * XRegExp.match('abc', /x/g, 'one'); // -> null
 *
 * // Match all
 * XRegExp.match('abc', /\w/g); // -> ['a', 'b', 'c']
 * XRegExp.match('abc', /\w/, 'all'); // -> ['a', 'b', 'c']
 * XRegExp.match('abc', /x/, 'all'); // -> []
 */
 
 
XRegExp.match = function (str, regex, scope) {
  var global = regex.global && scope !== 'one' || scope === 'all';
  var cacheKey = (global ? 'g' : '') + (regex.sticky ? 'y' : '') || 'noGY';
  regex[REGEX_DATA] = regex[REGEX_DATA] || {}; // Shares cached copies with `XRegExp.exec`/`replace`
 
  var r2 = regex[REGEX_DATA][cacheKey] || (regex[REGEX_DATA][cacheKey] = copyRegex(regex, {
    addG: !!global,
    removeG: scope === 'one',
    isInternalOnly: true
  }));
  var result = nativ.match.call(toObject(str), r2);
 
  if (regex.global) {
    regex.lastIndex = scope === 'one' && result ? // Can't use `r2.lastIndex` since `r2` is nonglobal in this case
    result.index + result[0].length : 0;
  }
 
  return global ? result || [] : result && result[0];
};
/**
 * Retrieves the matches from searching a string using a chain of regexes that successively search
 * within previous matches. The provided `chain` array can contain regexes and or objects with
 * `regex` and `backref` properties. When a backreference is specified, the named or numbered
 * backreference is passed forward to the next regex or returned.
 *
 * @memberOf XRegExp
 * @param {String} str String to search.
 * @param {Array} chain Regexes that each search for matches within preceding results.
 * @returns {Array} Matches by the last regex in the chain, or an empty array.
 * @example
 *
 * // Basic usage; matches numbers within <b> tags
 * XRegExp.matchChain('1 <b>2</b> 3 <b>4 a 56</b>', [
 *   XRegExp('(?is)<b>.*?</b>'),
 *   /\d+/
 * ]);
 * // -> ['2', '4', '56']
 *
 * // Passing forward and returning specific backreferences
 * html = '<a href="http://xregexp.com/api/">XRegExp</a>\
 *         <a href="http://www.google.com/">Google</a>';
 * XRegExp.matchChain(html, [
 *   {regex: /<a href="([^"]+)">/i, backref: 1},
 *   {regex: XRegExp('(?i)^https?://(?<domain>[^/?#]+)'), backref: 'domain'}
 * ]);
 * // -> ['xregexp.com', 'www.google.com']
 */
 
 
XRegExp.matchChain = function (str, chain) {
  return function recurseChain(values, level) {
    var item = chain[level].regex ? chain[level] : {
      regex: chain[level]
    };
    var matches = [];
 
    function addMatch(match) {
      if (item.backref) {
        var ERR_UNDEFINED_GROUP = "Backreference to undefined group: ".concat(item.backref);
        var isNamedBackref = isNaN(item.backref);
 
        if (isNamedBackref && XRegExp.isInstalled('namespacing')) {
          // `groups` has `null` as prototype, so using `in` instead of `hasOwnProperty`
          if (!(item.backref in match.groups)) {
            throw new ReferenceError(ERR_UNDEFINED_GROUP);
          }
        } else if (!match.hasOwnProperty(item.backref)) {
          throw new ReferenceError(ERR_UNDEFINED_GROUP);
        }
 
        var backrefValue = isNamedBackref && XRegExp.isInstalled('namespacing') ? match.groups[item.backref] : match[item.backref];
        matches.push(backrefValue || '');
      } else {
        matches.push(match[0]);
      }
    }
 
    var _iteratorNormalCompletion3 = true;
    var _didIteratorError3 = false;
    var _iteratorError3 = undefined;
 
    try {
      for (var _iterator3 = (0, _getIterator2.default)(values), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) {
        var value = _step3.value;
        XRegExp.forEach(value, item.regex, addMatch);
      }
    } catch (err) {
      _didIteratorError3 = true;
      _iteratorError3 = err;
    } finally {
      try {
        if (!_iteratorNormalCompletion3 && _iterator3.return != null) {
          _iterator3.return();
        }
      } finally {
        if (_didIteratorError3) {
          throw _iteratorError3;
        }
      }
    }
 
    return level === chain.length - 1 || !matches.length ? matches : recurseChain(matches, level + 1);
  }([str], 0);
};
/**
 * Returns a new string with one or all matches of a pattern replaced. The pattern can be a string
 * or regex, and the replacement can be a string or a function to be called for each match. To
 * perform a global search and replace, use the optional `scope` argument or include flag g if using
 * a regex. Replacement strings can use `${n}` or `$<n>` for named and numbered backreferences.
 * Replacement functions can use named backreferences via `arguments[0].name`. Also fixes browser
 * bugs compared to the native `String.prototype.replace` and can be used reliably cross-browser.
 *
 * @memberOf XRegExp
 * @param {String} str String to search.
 * @param {RegExp|String} search Search pattern to be replaced.
 * @param {String|Function} replacement Replacement string or a function invoked to create it.
 *   Replacement strings can include special replacement syntax:
 *     - $$ - Inserts a literal $ character.
 *     - $&, $0 - Inserts the matched substring.
 *     - $` - Inserts the string that precedes the matched substring (left context).
 *     - $' - Inserts the string that follows the matched substring (right context).
 *     - $n, $nn - Where n/nn are digits referencing an existent capturing group, inserts
 *       backreference n/nn.
 *     - ${n}, $<n> - Where n is a name or any number of digits that reference an existent capturing
 *       group, inserts backreference n.
 *   Replacement functions are invoked with three or more arguments:
 *     - The matched substring (corresponds to $& above). Named backreferences are accessible as
 *       properties of this first argument.
 *     - 0..n arguments, one for each backreference (corresponding to $1, $2, etc. above).
 *     - The zero-based index of the match within the total search string.
 *     - The total string being searched.
 * @param {String} [scope='one'] Use 'one' to replace the first match only, or 'all'. If not
 *   explicitly specified and using a regex with flag g, `scope` is 'all'.
 * @returns {String} New string with one or all matches replaced.
 * @example
 *
 * // Regex search, using named backreferences in replacement string
 * const name = XRegExp('(?<first>\\w+) (?<last>\\w+)');
 * XRegExp.replace('John Smith', name, '$<last>, $<first>');
 * // -> 'Smith, John'
 *
 * // Regex search, using named backreferences in replacement function
 * XRegExp.replace('John Smith', name, (match) => `${match.last}, ${match.first}`);
 * // -> 'Smith, John'
 *
 * // String search, with replace-all
 * XRegExp.replace('RegExp builds RegExps', 'RegExp', 'XRegExp', 'all');
 * // -> 'XRegExp builds XRegExps'
 */
 
 
XRegExp.replace = function (str, search, replacement, scope) {
  var isRegex = XRegExp.isRegExp(search);
  var global = search.global && scope !== 'one' || scope === 'all';
  var cacheKey = (global ? 'g' : '') + (search.sticky ? 'y' : '') || 'noGY';
  var s2 = search;
 
  if (isRegex) {
    search[REGEX_DATA] = search[REGEX_DATA] || {}; // Shares cached copies with `XRegExp.exec`/`match`. Since a copy is used, `search`'s
    // `lastIndex` isn't updated *during* replacement iterations
 
    s2 = search[REGEX_DATA][cacheKey] || (search[REGEX_DATA][cacheKey] = copyRegex(search, {
      addG: !!global,
      removeG: scope === 'one',
      isInternalOnly: true
    }));
  } else if (global) {
    s2 = new RegExp(XRegExp.escape(String(search)), 'g');
  } // Fixed `replace` required for named backreferences, etc.
 
 
  var result = fixed.replace.call(toObject(str), s2, replacement);
 
  if (isRegex && search.global) {
    // Fixes IE, Safari bug (last tested IE 9, Safari 5.1)
    search.lastIndex = 0;
  }
 
  return result;
};
/**
 * Performs batch processing of string replacements. Used like `XRegExp.replace`, but accepts an
 * array of replacement details. Later replacements operate on the output of earlier replacements.
 * Replacement details are accepted as an array with a regex or string to search for, the
 * replacement string or function, and an optional scope of 'one' or 'all'. Uses the XRegExp
 * replacement text syntax, which supports named backreference properties via `${name}` or
 * `$<name>`.
 *
 * @memberOf XRegExp
 * @param {String} str String to search.
 * @param {Array} replacements Array of replacement detail arrays.
 * @returns {String} New string with all replacements.
 * @example
 *
 * str = XRegExp.replaceEach(str, [
 *   [XRegExp('(?<name>a)'), 'z${name}'],
 *   [/b/gi, 'y'],
 *   [/c/g, 'x', 'one'], // scope 'one' overrides /g
 *   [/d/, 'w', 'all'],  // scope 'all' overrides lack of /g
 *   ['e', 'v', 'all'],  // scope 'all' allows replace-all for strings
 *   [/f/g, ($0) => $0.toUpperCase()]
 * ]);
 */
 
 
XRegExp.replaceEach = function (str, replacements) {
  var _iteratorNormalCompletion4 = true;
  var _didIteratorError4 = false;
  var _iteratorError4 = undefined;
 
  try {
    for (var _iterator4 = (0, _getIterator2.default)(replacements), _step4; !(_iteratorNormalCompletion4 = (_step4 = _iterator4.next()).done); _iteratorNormalCompletion4 = true) {
      var r = _step4.value;
      str = XRegExp.replace(str, r[0], r[1], r[2]);
    }
  } catch (err) {
    _didIteratorError4 = true;
    _iteratorError4 = err;
  } finally {
    try {
      if (!_iteratorNormalCompletion4 && _iterator4.return != null) {
        _iterator4.return();
      }
    } finally {
      if (_didIteratorError4) {
        throw _iteratorError4;
      }
    }
  }
 
  return str;
};
/**
 * Splits a string into an array of strings using a regex or string separator. Matches of the
 * separator are not included in the result array. However, if `separator` is a regex that contains
 * capturing groups, backreferences are spliced into the result each time `separator` is matched.
 * Fixes browser bugs compared to the native `String.prototype.split` and can be used reliably
 * cross-browser.
 *
 * @memberOf XRegExp
 * @param {String} str String to split.
 * @param {RegExp|String} separator Regex or string to use for separating the string.
 * @param {Number} [limit] Maximum number of items to include in the result array.
 * @returns {Array} Array of substrings.
 * @example
 *
 * // Basic use
 * XRegExp.split('a b c', ' ');
 * // -> ['a', 'b', 'c']
 *
 * // With limit
 * XRegExp.split('a b c', ' ', 2);
 * // -> ['a', 'b']
 *
 * // Backreferences in result array
 * XRegExp.split('..word1..', /([a-z]+)(\d+)/i);
 * // -> ['..', 'word', '1', '..']
 */
 
 
XRegExp.split = function (str, separator, limit) {
  return fixed.split.call(toObject(str), separator, limit);
};
/**
 * Executes a regex search in a specified string. Returns `true` or `false`. Optional `pos` and
 * `sticky` arguments specify the search start position, and whether the match must start at the
 * specified position only. The `lastIndex` property of the provided regex is not used, but is
 * updated for compatibility. Also fixes browser bugs compared to the native
 * `RegExp.prototype.test` and can be used reliably cross-browser.
 *
 * @memberOf XRegExp
 * @param {String} str String to search.
 * @param {RegExp} regex Regex to search with.
 * @param {Number} [pos=0] Zero-based index at which to start the search.
 * @param {Boolean|String} [sticky=false] Whether the match must start at the specified position
 *   only. The string `'sticky'` is accepted as an alternative to `true`.
 * @returns {Boolean} Whether the regex matched the provided value.
 * @example
 *
 * // Basic use
 * XRegExp.test('abc', /c/); // -> true
 *
 * // With pos and sticky
 * XRegExp.test('abc', /c/, 0, 'sticky'); // -> false
 * XRegExp.test('abc', /c/, 2, 'sticky'); // -> true
 */
// Do this the easy way :-)
 
 
XRegExp.test = function (str, regex, pos, sticky) {
  return !!XRegExp.exec(str, regex, pos, sticky);
};
/**
 * Uninstalls optional features according to the specified options. All optional features start out
 * uninstalled, so this is used to undo the actions of `XRegExp.install`.
 *
 * @memberOf XRegExp
 * @param {Object|String} options Options object or string.
 * @example
 *
 * // With an options object
 * XRegExp.uninstall({
 *   // Disables support for astral code points in Unicode addons
 *   astral: true,
 *
 *   // Don't add named capture groups to the `groups` property of matches
 *   namespacing: true
 * });
 *
 * // With an options string
 * XRegExp.uninstall('astral namespacing');
 */
 
 
XRegExp.uninstall = function (options) {
  options = prepareOptions(options);
 
  if (features.astral && options.astral) {
    setAstral(false);
  }
 
  if (features.namespacing && options.namespacing) {
    setNamespacing(false);
  }
};
/**
 * Returns an XRegExp object that is the union of the given patterns. Patterns can be provided as
 * regex objects or strings. Metacharacters are escaped in patterns provided as strings.
 * Backreferences in provided regex objects are automatically renumbered to work correctly within
 * the larger combined pattern. Native flags used by provided regexes are ignored in favor of the
 * `flags` argument.
 *
 * @memberOf XRegExp
 * @param {Array} patterns Regexes and strings to combine.
 * @param {String} [flags] Any combination of XRegExp flags.
 * @param {Object} [options] Options object with optional properties:
 *   - `conjunction` {String} Type of conjunction to use: 'or' (default) or 'none'.
 * @returns {RegExp} Union of the provided regexes and strings.
 * @example
 *
 * XRegExp.union(['a+b*c', /(dogs)\1/, /(cats)\1/], 'i');
 * // -> /a\+b\*c|(dogs)\1|(cats)\2/i
 *
 * XRegExp.union([/man/, /bear/, /pig/], 'i', {conjunction: 'none'});
 * // -> /manbearpig/i
 */
 
 
XRegExp.union = function (patterns, flags, options) {
  options = options || {};
  var conjunction = options.conjunction || 'or';
  var numCaptures = 0;
  var numPriorCaptures;
  var captureNames;
 
  function rewrite(match, paren, backref) {
    var name = captureNames[numCaptures - numPriorCaptures]; // Capturing group
 
    if (paren) {
      ++numCaptures; // If the current capture has a name, preserve the name
 
      Iif (name) {
        return "(?<".concat(name, ">");
      } // Backreference
 
    } else Iif (backref) {
      // Rewrite the backreference
      return "\\".concat(+backref + numPriorCaptures);
    }
 
    return match;
  }
 
  Iif (!(isType(patterns, 'Array') && patterns.length)) {
    throw new TypeError('Must provide a nonempty array of patterns to merge');
  }
 
  var parts = /(\()(?!\?)|\\([1-9]\d*)|\\[\s\S]|\[(?:[^\\\]]|\\[\s\S])*\]/g;
  var output = [];
  var _iteratorNormalCompletion5 = true;
  var _didIteratorError5 = false;
  var _iteratorError5 = undefined;
 
  try {
    for (var _iterator5 = (0, _getIterator2.default)(patterns), _step5; !(_iteratorNormalCompletion5 = (_step5 = _iterator5.next()).done); _iteratorNormalCompletion5 = true) {
      var pattern = _step5.value;
 
      Eif (XRegExp.isRegExp(pattern)) {
        numPriorCaptures = numCaptures;
        captureNames = pattern[REGEX_DATA] && pattern[REGEX_DATA].captureNames || []; // Rewrite backreferences. Passing to XRegExp dies on octals and ensures patterns are
        // independently valid; helps keep this simple. Named captures are put back
 
        output.push(nativ.replace.call(XRegExp(pattern.source).source, parts, rewrite));
      } else {
        output.push(XRegExp.escape(pattern));
      }
    }
  } catch (err) {
    _didIteratorError5 = true;
    _iteratorError5 = err;
  } finally {
    try {
      Iif (!_iteratorNormalCompletion5 && _iterator5.return != null) {
        _iterator5.return();
      }
    } finally {
      Iif (_didIteratorError5) {
        throw _iteratorError5;
      }
    }
  }
 
  var separator = conjunction === 'none' ? '' : '|';
  return XRegExp(output.join(separator), flags);
}; // ==--------------------------==
// Fixed/extended native methods
// ==--------------------------==
 
/**
 * Adds named capture support (with backreferences returned as `result.name`), and fixes browser
 * bugs in the native `RegExp.prototype.exec`. Use via `XRegExp.exec`.
 *
 * @memberOf RegExp
 * @param {String} str String to search.
 * @returns {Array} Match array with named backreference properties, or `null`.
 */
 
 
fixed.exec = function (str) {
  var origLastIndex = this.lastIndex;
  var match = nativ.exec.apply(this, arguments);
 
  if (match) {
    // Fix browsers whose `exec` methods don't return `undefined` for nonparticipating capturing
    // groups. This fixes IE 5.5-8, but not IE 9's quirks mode or emulation of older IEs. IE 9
    // in standards mode follows the spec.
    Iif (!correctExecNpcg && match.length > 1 && match.indexOf('') !== -1) {
      var r2 = copyRegex(this, {
        removeG: true,
        isInternalOnly: true
      }); // Using `str.slice(match.index)` rather than `match[0]` in case lookahead allowed
      // matching due to characters outside the match
 
      nativ.replace.call(String(str).slice(match.index), r2, function () {
        var len = arguments.length; // Skip index 0 and the last 2
 
        for (var i = 1; i < len - 2; ++i) {
          if ((i < 0 || arguments.length <= i ? undefined : arguments[i]) === undefined) {
            match[i] = undefined;
          }
        }
      });
    } // Attach named capture properties
 
 
    var groupsObject = match;
 
    Iif (XRegExp.isInstalled('namespacing')) {
      // https://tc39.github.io/proposal-regexp-named-groups/#sec-regexpbuiltinexec
      match.groups = (0, _create.default)(null);
      groupsObject = match.groups;
    }
 
    Iif (this[REGEX_DATA] && this[REGEX_DATA].captureNames) {
      // Skip index 0
      for (var i = 1; i < match.length; ++i) {
        var name = this[REGEX_DATA].captureNames[i - 1];
 
        if (name) {
          groupsObject[name] = match[i];
        }
      }
    } // Fix browsers that increment `lastIndex` after zero-length matches
 
 
    Iif (this.global && !match[0].length && this.lastIndex > match.index) {
      this.lastIndex = match.index;
    }
  }
 
  Iif (!this.global) {
    // Fixes IE, Opera bug (last tested IE 9, Opera 11.6)
    this.lastIndex = origLastIndex;
  }
 
  return match;
};
/**
 * Fixes browser bugs in the native `RegExp.prototype.test`.
 *
 * @memberOf RegExp
 * @param {String} str String to search.
 * @returns {Boolean} Whether the regex matched the provided value.
 */
 
 
fixed.test = function (str) {
  // Do this the easy way :-)
  return !!fixed.exec.call(this, str);
};
/**
 * Adds named capture support (with backreferences returned as `result.name`), and fixes browser
 * bugs in the native `String.prototype.match`.
 *
 * @memberOf String
 * @param {RegExp|*} regex Regex to search with. If not a regex object, it is passed to `RegExp`.
 * @returns {Array} If `regex` uses flag g, an array of match strings or `null`. Without flag g,
 *   the result of calling `regex.exec(this)`.
 */
 
 
fixed.match = function (regex) {
  if (!XRegExp.isRegExp(regex)) {
    // Use the native `RegExp` rather than `XRegExp`
    regex = new RegExp(regex);
  } else if (regex.global) {
    var result = nativ.match.apply(this, arguments); // Fixes IE bug
 
    regex.lastIndex = 0;
    return result;
  }
 
  return fixed.exec.call(regex, toObject(this));
};
/**
 * Adds support for `${n}` (or `$<n>`) tokens for named and numbered backreferences in replacement
 * text, and provides named backreferences to replacement functions as `arguments[0].name`. Also
 * fixes browser bugs in replacement text syntax when performing a replacement using a nonregex
 * search value, and the value of a replacement regex's `lastIndex` property during replacement
 * iterations and upon completion. Note that this doesn't support SpiderMonkey's proprietary third
 * (`flags`) argument. Use via `XRegExp.replace`.
 *
 * @memberOf String
 * @param {RegExp|String} search Search pattern to be replaced.
 * @param {String|Function} replacement Replacement string or a function invoked to create it.
 * @returns {String} New string with one or all matches replaced.
 */
 
 
fixed.replace = function (search, replacement) {
  var isRegex = XRegExp.isRegExp(search);
  var origLastIndex;
  var captureNames;
  var result;
 
  if (isRegex) {
    if (search[REGEX_DATA]) {
      captureNames = search[REGEX_DATA].captureNames;
    } // Only needed if `search` is nonglobal
 
 
    origLastIndex = search.lastIndex;
  } else {
    search += ''; // Type-convert
  } // Don't use `typeof`; some older browsers return 'function' for regex objects
 
 
  if (isType(replacement, 'Function')) {
    // Stringifying `this` fixes a bug in IE < 9 where the last argument in replacement
    // functions isn't type-converted to a string
    result = nativ.replace.call(String(this), search, function () {
      for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
        args[_key] = arguments[_key];
      }
 
      if (captureNames) {
        var groupsObject;
 
        if (XRegExp.isInstalled('namespacing')) {
          // https://tc39.github.io/proposal-regexp-named-groups/#sec-regexpbuiltinexec
          groupsObject = (0, _create.default)(null);
          args.push(groupsObject);
        } else {
          // Change the `args[0]` string primitive to a `String` object that can store
          // properties. This really does need to use `String` as a constructor
          args[0] = new String(args[0]);
          groupsObject = args[0];
        } // Store named backreferences
 
 
        for (var i = 0; i < captureNames.length; ++i) {
          if (captureNames[i]) {
            groupsObject[captureNames[i]] = args[i + 1];
          }
        }
      } // Update `lastIndex` before calling `replacement`. Fixes IE, Chrome, Firefox, Safari
      // bug (last tested IE 9, Chrome 17, Firefox 11, Safari 5.1)
 
 
      if (isRegex && search.global) {
        search.lastIndex = args[args.length - 2] + args[0].length;
      } // ES6 specs the context for replacement functions as `undefined`
 
 
      return replacement.apply(void 0, args);
    });
  } else {
    // Ensure that the last value of `args` will be a string when given nonstring `this`,
    // while still throwing on null or undefined context
    result = nativ.replace.call(this == null ? this : String(this), search, function () {
      for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
        args[_key2] = arguments[_key2];
      }
 
      return nativ.replace.call(String(replacement), replacementToken, replacer);
 
      function replacer($0, bracketed, angled, dollarToken) {
        bracketed = bracketed || angled; // Named or numbered backreference with curly or angled braces
 
        if (bracketed) {
          // XRegExp behavior for `${n}` or `$<n>`:
          // 1. Backreference to numbered capture, if `n` is an integer. Use `0` for the
          //    entire match. Any number of leading zeros may be used.
          // 2. Backreference to named capture `n`, if it exists and is not an integer
          //    overridden by numbered capture. In practice, this does not overlap with
          //    numbered capture since XRegExp does not allow named capture to use a bare
          //    integer as the name.
          // 3. If the name or number does not refer to an existing capturing group, it's
          //    an error.
          var n = +bracketed; // Type-convert; drop leading zeros
 
          if (n <= args.length - 3) {
            return args[n] || '';
          } // Groups with the same name is an error, else would need `lastIndexOf`
 
 
          n = captureNames ? captureNames.indexOf(bracketed) : -1;
 
          if (n < 0) {
            throw new SyntaxError("Backreference to undefined group ".concat($0));
          }
 
          return args[n + 1] || '';
        } // Else, special variable or numbered backreference without curly braces
 
 
        if (dollarToken === '$') {
          // $$
          return '$';
        }
 
        if (dollarToken === '&' || +dollarToken === 0) {
          // $&, $0 (not followed by 1-9), $00
          return args[0];
        }
 
        if (dollarToken === '`') {
          // $` (left context)
          return args[args.length - 1].slice(0, args[args.length - 2]);
        }
 
        if (dollarToken === "'") {
          // $' (right context)
          return args[args.length - 1].slice(args[args.length - 2] + args[0].length);
        } // Else, numbered backreference without braces
 
 
        dollarToken = +dollarToken; // Type-convert; drop leading zero
        // XRegExp behavior for `$n` and `$nn`:
        // - Backrefs end after 1 or 2 digits. Use `${..}` or `$<..>` for more digits.
        // - `$1` is an error if no capturing groups.
        // - `$10` is an error if less than 10 capturing groups. Use `${1}0` or `$<1>0`
        //   instead.
        // - `$01` is `$1` if at least one capturing group, else it's an error.
        // - `$0` (not followed by 1-9) and `$00` are the entire match.
        // Native behavior, for comparison:
        // - Backrefs end after 1 or 2 digits. Cannot reference capturing group 100+.
        // - `$1` is a literal `$1` if no capturing groups.
        // - `$10` is `$1` followed by a literal `0` if less than 10 capturing groups.
        // - `$01` is `$1` if at least one capturing group, else it's a literal `$01`.
        // - `$0` is a literal `$0`.
 
        if (!isNaN(dollarToken)) {
          if (dollarToken > args.length - 3) {
            throw new SyntaxError("Backreference to undefined group ".concat($0));
          }
 
          return args[dollarToken] || '';
        } // `$` followed by an unsupported char is an error, unlike native JS
 
 
        throw new SyntaxError("Invalid token ".concat($0));
      }
    });
  }
 
  if (isRegex) {
    if (search.global) {
      // Fixes IE, Safari bug (last tested IE 9, Safari 5.1)
      search.lastIndex = 0;
    } else {
      // Fixes IE, Opera bug (last tested IE 9, Opera 11.6)
      search.lastIndex = origLastIndex;
    }
  }
 
  return result;
};
/**
 * Fixes browser bugs in the native `String.prototype.split`. Use via `XRegExp.split`.
 *
 * @memberOf String
 * @param {RegExp|String} separator Regex or string to use for separating the string.
 * @param {Number} [limit] Maximum number of items to include in the result array.
 * @returns {Array} Array of substrings.
 */
 
 
fixed.split = function (separator, limit) {
  if (!XRegExp.isRegExp(separator)) {
    // Browsers handle nonregex split correctly, so use the faster native method
    return nativ.split.apply(this, arguments);
  }
 
  var str = String(this);
  var output = [];
  var origLastIndex = separator.lastIndex;
  var lastLastIndex = 0;
  var lastLength; // Values for `limit`, per the spec:
  // If undefined: pow(2,32) - 1
  // If 0, Infinity, or NaN: 0
  // If positive number: limit = floor(limit); if (limit >= pow(2,32)) limit -= pow(2,32);
  // If negative number: pow(2,32) - floor(abs(limit))
  // If other: Type-convert, then use the above rules
  // This line fails in very strange ways for some values of `limit` in Opera 10.5-10.63, unless
  // Opera Dragonfly is open (go figure). It works in at least Opera 9.5-10.1 and 11+
 
  limit = (limit === undefined ? -1 : limit) >>> 0;
  XRegExp.forEach(str, separator, function (match) {
    // This condition is not the same as `if (match[0].length)`
    if (match.index + match[0].length > lastLastIndex) {
      output.push(str.slice(lastLastIndex, match.index));
 
      if (match.length > 1 && match.index < str.length) {
        Array.prototype.push.apply(output, match.slice(1));
      }
 
      lastLength = match[0].length;
      lastLastIndex = match.index + lastLength;
    }
  });
 
  if (lastLastIndex === str.length) {
    if (!nativ.test.call(separator, '') || lastLength) {
      output.push('');
    }
  } else {
    output.push(str.slice(lastLastIndex));
  }
 
  separator.lastIndex = origLastIndex;
  return output.length > limit ? output.slice(0, limit) : output;
}; // ==--------------------------==
// Built-in syntax/flag tokens
// ==--------------------------==
 
/*
 * Letter escapes that natively match literal characters: `\a`, `\A`, etc. These should be
 * SyntaxErrors but are allowed in web reality. XRegExp makes them errors for cross-browser
 * consistency and to reserve their syntax, but lets them be superseded by addons.
 */
 
 
XRegExp.addToken(/\\([ABCE-RTUVXYZaeg-mopqyz]|c(?![A-Za-z])|u(?![\dA-Fa-f]{4}|{[\dA-Fa-f]+})|x(?![\dA-Fa-f]{2}))/, function (match, scope) {
  // \B is allowed in default scope only
  if (match[1] === 'B' && scope === defaultScope) {
    return match[0];
  }
 
  throw new SyntaxError("Invalid escape ".concat(match[0]));
}, {
  scope: 'all',
  leadChar: '\\'
});
/*
 * Unicode code point escape with curly braces: `\u{N..}`. `N..` is any one or more digit
 * hexadecimal number from 0-10FFFF, and can include leading zeros. Requires the native ES6 `u` flag
 * to support code points greater than U+FFFF. Avoids converting code points above U+FFFF to
 * surrogate pairs (which could be done without flag `u`), since that could lead to broken behavior
 * if you follow a `\u{N..}` token that references a code point above U+FFFF with a quantifier, or
 * if you use the same in a character class.
 */
 
XRegExp.addToken(/\\u{([\dA-Fa-f]+)}/, function (match, scope, flags) {
  var code = dec(match[1]);
 
  if (code > 0x10FFFF) {
    throw new SyntaxError("Invalid Unicode code point ".concat(match[0]));
  }
 
  if (code <= 0xFFFF) {
    // Converting to \uNNNN avoids needing to escape the literal character and keep it
    // separate from preceding tokens
    return "\\u".concat(pad4(hex(code)));
  } // If `code` is between 0xFFFF and 0x10FFFF, require and defer to native handling
 
 
  if (hasNativeU && flags.indexOf('u') !== -1) {
    return match[0];
  }
 
  throw new SyntaxError('Cannot use Unicode code point above \\u{FFFF} without flag u');
}, {
  scope: 'all',
  leadChar: '\\'
});
/*
 * Empty character class: `[]` or `[^]`. This fixes a critical cross-browser syntax inconsistency.
 * Unless this is standardized (per the ES spec), regex syntax can't be accurately parsed because
 * character class endings can't be determined.
 */
 
XRegExp.addToken(/\[(\^?)\]/, // For cross-browser compatibility with ES3, convert [] to \b\B and [^] to [\s\S].
// (?!) should work like \b\B, but is unreliable in some versions of Firefox
 
/* eslint-disable no-confusing-arrow */
function (match) {
  return match[1] ? '[\\s\\S]' : '\\b\\B';
},
/* eslint-enable no-confusing-arrow */
{
  leadChar: '['
});
/*
 * Comment pattern: `(?# )`. Inline comments are an alternative to the line comments allowed in
 * free-spacing mode (flag x).
 */
 
XRegExp.addToken(/\(\?#[^)]*\)/, getContextualTokenSeparator, {
  leadChar: '('
});
/*
 * Whitespace and line comments, in free-spacing mode (aka extended mode, flag x) only.
 */
 
XRegExp.addToken(/\s+|#[^\n]*\n?/, getContextualTokenSeparator, {
  flag: 'x'
});
/*
 * Dot, in dotall mode (aka singleline mode, flag s) only.
 */
 
XRegExp.addToken(/\./, function () {
  return '[\\s\\S]';
}, {
  flag: 's',
  leadChar: '.'
});
/*
 * Named backreference: `\k<name>`. Backreference names can use the characters A-Z, a-z, 0-9, _,
 * and $ only. Also allows numbered backreferences as `\k<n>`.
 */
 
XRegExp.addToken(/\\k<([\w$]+)>/, function (match) {
  // Groups with the same name is an error, else would need `lastIndexOf`
  var index = isNaN(match[1]) ? this.captureNames.indexOf(match[1]) + 1 : +match[1];
  var endIndex = match.index + match[0].length;
 
  if (!index || index > this.captureNames.length) {
    throw new SyntaxError("Backreference to undefined group ".concat(match[0]));
  } // Keep backreferences separate from subsequent literal numbers. This avoids e.g.
  // inadvertedly changing `(?<n>)\k<n>1` to `()\11`.
 
 
  return "\\".concat(index).concat(endIndex === match.input.length || isNaN(match.input[endIndex]) ? '' : '(?:)');
}, {
  leadChar: '\\'
});
/*
 * Numbered backreference or octal, plus any following digits: `\0`, `\11`, etc. Octals except `\0`
 * not followed by 0-9 and backreferences to unopened capture groups throw an error. Other matches
 * are returned unaltered. IE < 9 doesn't support backreferences above `\99` in regex syntax.
 */
 
XRegExp.addToken(/\\(\d+)/, function (match, scope) {
  if (!(scope === defaultScope && /^[1-9]/.test(match[1]) && +match[1] <= this.captureNames.length) && match[1] !== '0') {
    throw new SyntaxError("Cannot use octal escape or backreference to undefined group ".concat(match[0]));
  }
 
  return match[0];
}, {
  scope: 'all',
  leadChar: '\\'
});
/*
 * Named capturing group; match the opening delimiter only: `(?<name>`. Capture names can use the
 * characters A-Z, a-z, 0-9, _, and $ only. Names can't be integers. Supports Python-style
 * `(?P<name>` as an alternate syntax to avoid issues in some older versions of Opera which natively
 * supported the Python-style syntax. Otherwise, XRegExp might treat numbered backreferences to
 * Python-style named capture as octals.
 */
 
XRegExp.addToken(/\(\?P?<([\w$]+)>/, function (match) {
  // Disallow bare integers as names because named backreferences are added to match arrays
  // and therefore numeric properties may lead to incorrect lookups
  if (!isNaN(match[1])) {
    throw new SyntaxError("Cannot use integer as capture name ".concat(match[0]));
  }
 
  if (!XRegExp.isInstalled('namespacing') && (match[1] === 'length' || match[1] === '__proto__')) {
    throw new SyntaxError("Cannot use reserved word as capture name ".concat(match[0]));
  }
 
  if (this.captureNames.indexOf(match[1]) !== -1) {
    throw new SyntaxError("Cannot use same name for multiple groups ".concat(match[0]));
  }
 
  this.captureNames.push(match[1]);
  this.hasNamedCapture = true;
  return '(';
}, {
  leadChar: '('
});
/*
 * Capturing group; match the opening parenthesis only. Required for support of named capturing
 * groups. Also adds explicit capture mode (flag n).
 */
 
XRegExp.addToken(/\((?!\?)/, function (match, scope, flags) {
  Iif (flags.indexOf('n') !== -1) {
    return '(?:';
  }
 
  this.captureNames.push(null);
  return '(';
}, {
  optionalFlags: 'n',
  leadChar: '('
});
var _default = XRegExp;
exports.default = _default;
module.exports = exports["default"];
 
/***/ }),
/* 1019 */
/***/ (function(module, exports, __webpack_require__) {
 
module.exports = __webpack_require__(1020);
 
/***/ }),
/* 1020 */
/***/ (function(module, exports, __webpack_require__) {
 
__webpack_require__(1021);
var $Object = __webpack_require__(118).Object;
module.exports = function create(P, D) {
  return $Object.create(P, D);
};
 
 
/***/ }),
/* 1021 */
/***/ (function(module, exports, __webpack_require__) {
 
var $export = __webpack_require__(174);
// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
$export($export.S, 'Object', { create: __webpack_require__(488) });
 
 
/***/ }),
/* 1022 */
/***/ (function(module, exports, __webpack_require__) {
 
// optional / simple context binding
var aFunction = __webpack_require__(1023);
module.exports = function (fn, that, length) {
  aFunction(fn);
  Iif (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);
  };
};
 
 
/***/ }),
/* 1023 */
/***/ (function(module, exports) {
 
module.exports = function (it) {
  Iif (typeof it != 'function') throw TypeError(it + ' is not a function!');
  return it;
};
 
 
/***/ }),
/* 1024 */
/***/ (function(module, exports, __webpack_require__) {
 
module.exports = !__webpack_require__(221) && !__webpack_require__(309)(function () {
  return Object.defineProperty(__webpack_require__(486)('div'), 'a', { get: function () { return 7; } }).a != 7;
});
 
 
/***/ }),
/* 1025 */
/***/ (function(module, exports, __webpack_require__) {
 
// 7.1.1 ToPrimitive(input [, PreferredType])
var isObject = __webpack_require__(308);
// 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");
};
 
 
/***/ }),
/* 1026 */
/***/ (function(module, exports, __webpack_require__) {
 
var dP = __webpack_require__(307);
var anObject = __webpack_require__(220);
var getKeys = __webpack_require__(1027);
 
module.exports = __webpack_require__(221) ? 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;
};
 
 
/***/ }),
/* 1027 */
/***/ (function(module, exports, __webpack_require__) {
 
// 19.1.2.14 / 15.2.3.14 Object.keys(O)
var $keys = __webpack_require__(1028);
var enumBugKeys = __webpack_require__(492);
 
module.exports = Object.keys || function keys(O) {
  return $keys(O, enumBugKeys);
};
 
 
/***/ }),
/* 1028 */
/***/ (function(module, exports, __webpack_require__) {
 
var has = __webpack_require__(222);
var toIObject = __webpack_require__(310);
var arrayIndexOf = __webpack_require__(1030)(false);
var IE_PROTO = __webpack_require__(313)('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;
};
 
 
/***/ }),
/* 1029 */
/***/ (function(module, exports, __webpack_require__) {
 
// fallback for non-array-like ES3 and non-enumerable old V8 strings
var cof = __webpack_require__(311);
// eslint-disable-next-line no-prototype-builtins
module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) {
  return cof(it) == 'String' ? it.split('') : Object(it);
};
 
 
/***/ }),
/* 1030 */
/***/ (function(module, exports, __webpack_require__) {
 
// false -> Array#indexOf
// true  -> Array#includes
var toIObject = __webpack_require__(310);
var toLength = __webpack_require__(1031);
var toAbsoluteIndex = __webpack_require__(1032);
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;
  };
};
 
 
/***/ }),
/* 1031 */
/***/ (function(module, exports, __webpack_require__) {
 
// 7.1.15 ToLength
var toInteger = __webpack_require__(312);
var min = Math.min;
module.exports = function (it) {
  return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991
};
 
 
/***/ }),
/* 1032 */
/***/ (function(module, exports, __webpack_require__) {
 
var toInteger = __webpack_require__(312);
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);
};
 
 
/***/ }),
/* 1033 */
/***/ (function(module, exports, __webpack_require__) {
 
var document = __webpack_require__(117).document;
module.exports = document && document.documentElement;
 
 
/***/ }),
/* 1034 */
/***/ (function(module, exports, __webpack_require__) {
 
var arrayWithHoles = __webpack_require__(1035);
 
var iterableToArrayLimit = __webpack_require__(1040);
 
var nonIterableRest = __webpack_require__(1055);
 
function _slicedToArray(arr, i) {
  return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || nonIterableRest();
}
 
module.exports = _slicedToArray;
 
/***/ }),
/* 1035 */
/***/ (function(module, exports, __webpack_require__) {
 
var _Array$isArray = __webpack_require__(1036);
 
function _arrayWithHoles(arr) {
  Eif (_Array$isArray(arr)) return arr;
}
 
module.exports = _arrayWithHoles;
 
/***/ }),
/* 1036 */
/***/ (function(module, exports, __webpack_require__) {
 
module.exports = __webpack_require__(1037);
 
/***/ }),
/* 1037 */
/***/ (function(module, exports, __webpack_require__) {
 
__webpack_require__(1038);
module.exports = __webpack_require__(118).Array.isArray;
 
 
/***/ }),
/* 1038 */
/***/ (function(module, exports, __webpack_require__) {
 
// 22.1.2.2 / 15.4.3.2 Array.isArray(arg)
var $export = __webpack_require__(174);
 
$export($export.S, 'Array', { isArray: __webpack_require__(1039) });
 
 
/***/ }),
/* 1039 */
/***/ (function(module, exports, __webpack_require__) {
 
// 7.2.2 IsArray(argument)
var cof = __webpack_require__(311);
module.exports = Array.isArray || function isArray(arg) {
  return cof(arg) == 'Array';
};
 
 
/***/ }),
/* 1040 */
/***/ (function(module, exports, __webpack_require__) {
 
var _getIterator = __webpack_require__(314);
 
function _iterableToArrayLimit(arr, i) {
  var _arr = [];
  var _n = true;
  var _d = false;
  var _e = undefined;
 
  try {
    for (var _i = _getIterator(arr), _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"] != null) _i["return"]();
    } finally {
      if (_d) throw _e;
    }
  }
 
  return _arr;
}
 
module.exports = _iterableToArrayLimit;
 
/***/ }),
/* 1041 */
/***/ (function(module, exports, __webpack_require__) {
 
__webpack_require__(1042);
__webpack_require__(1050);
module.exports = __webpack_require__(1052);
 
 
/***/ }),
/* 1042 */
/***/ (function(module, exports, __webpack_require__) {
 
__webpack_require__(1043);
var global = __webpack_require__(117);
var hide = __webpack_require__(175);
var Iterators = __webpack_require__(224);
var TO_STRING_TAG = __webpack_require__(136)('toStringTag');
 
var DOMIterables = ('CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,' +
  'DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,' +
  'MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,' +
  'SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,' +
  'TextTrackList,TouchList').split(',');
 
for (var i = 0; i < DOMIterables.length; i++) {
  var NAME = DOMIterables[i];
  var Collection = global[NAME];
  var proto = Collection && Collection.prototype;
  Iif (proto && !proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME);
  Iterators[NAME] = Iterators.Array;
}
 
 
/***/ }),
/* 1043 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var addToUnscopables = __webpack_require__(1044);
var step = __webpack_require__(1045);
var Iterators = __webpack_require__(224);
var toIObject = __webpack_require__(310);
 
// 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__(493)(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');
 
 
/***/ }),
/* 1044 */
/***/ (function(module, exports) {
 
module.exports = function () { /* empty */ };
 
 
/***/ }),
/* 1045 */
/***/ (function(module, exports) {
 
module.exports = function (done, value) {
  return { value: value, done: !!done };
};
 
 
/***/ }),
/* 1046 */
/***/ (function(module, exports, __webpack_require__) {
 
module.exports = __webpack_require__(175);
 
 
/***/ }),
/* 1047 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var create = __webpack_require__(488);
var descriptor = __webpack_require__(487);
var setToStringTag = __webpack_require__(494);
var IteratorPrototype = {};
 
// 25.1.2.1.1 %IteratorPrototype%[@@iterator]()
__webpack_require__(175)(IteratorPrototype, __webpack_require__(136)('iterator'), function () { return this; });
 
module.exports = function (Constructor, NAME, next) {
  Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) });
  setToStringTag(Constructor, NAME + ' Iterator');
};
 
 
/***/ }),
/* 1048 */
/***/ (function(module, exports, __webpack_require__) {
 
// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O)
var has = __webpack_require__(222);
var toObject = __webpack_require__(1049);
var IE_PROTO = __webpack_require__(313)('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;
};
 
 
/***/ }),
/* 1049 */
/***/ (function(module, exports, __webpack_require__) {
 
// 7.1.13 ToObject(argument)
var defined = __webpack_require__(223);
module.exports = function (it) {
  return Object(defined(it));
};
 
 
/***/ }),
/* 1050 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var $at = __webpack_require__(1051)(true);
 
// 21.1.3.27 String.prototype[@@iterator]()
__webpack_require__(493)(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 };
});
 
 
/***/ }),
/* 1051 */
/***/ (function(module, exports, __webpack_require__) {
 
var toInteger = __webpack_require__(312);
var defined = __webpack_require__(223);
// 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;
  };
};
 
 
/***/ }),
/* 1052 */
/***/ (function(module, exports, __webpack_require__) {
 
var anObject = __webpack_require__(220);
var get = __webpack_require__(1053);
module.exports = __webpack_require__(118).getIterator = function (it) {
  var iterFn = get(it);
  Iif (typeof iterFn != 'function') throw TypeError(it + ' is not iterable!');
  return anObject(iterFn.call(it));
};
 
 
/***/ }),
/* 1053 */
/***/ (function(module, exports, __webpack_require__) {
 
var classof = __webpack_require__(1054);
var ITERATOR = __webpack_require__(136)('iterator');
var Iterators = __webpack_require__(224);
module.exports = __webpack_require__(118).getIteratorMethod = function (it) {
  Eif (it != undefined) return it[ITERATOR]
    || it['@@iterator']
    || Iterators[classof(it)];
};
 
 
/***/ }),
/* 1054 */
/***/ (function(module, exports, __webpack_require__) {
 
// getting tag from 19.1.3.6 Object.prototype.toString()
var cof = __webpack_require__(311);
var TAG = __webpack_require__(136)('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;
};
 
 
/***/ }),
/* 1055 */
/***/ (function(module, exports) {
 
function _nonIterableRest() {
  throw new TypeError("Invalid attempt to destructure non-iterable instance");
}
 
module.exports = _nonIterableRest;
 
/***/ }),
/* 1056 */
/***/ (function(module, exports, __webpack_require__) {
 
module.exports = __webpack_require__(1057);
 
/***/ }),
/* 1057 */
/***/ (function(module, exports, __webpack_require__) {
 
__webpack_require__(1058);
module.exports = __webpack_require__(118).parseInt;
 
 
/***/ }),
/* 1058 */
/***/ (function(module, exports, __webpack_require__) {
 
var $export = __webpack_require__(174);
var $parseInt = __webpack_require__(1059);
// 18.2.5 parseInt(string, radix)
$export($export.G + $export.F * (parseInt != $parseInt), { parseInt: $parseInt });
 
 
/***/ }),
/* 1059 */
/***/ (function(module, exports, __webpack_require__) {
 
var $parseInt = __webpack_require__(117).parseInt;
var $trim = __webpack_require__(1060).trim;
var ws = __webpack_require__(495);
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;
 
 
/***/ }),
/* 1060 */
/***/ (function(module, exports, __webpack_require__) {
 
var $export = __webpack_require__(174);
var defined = __webpack_require__(223);
var fails = __webpack_require__(309);
var spaces = __webpack_require__(495);
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;
 
 
/***/ }),
/* 1061 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
 
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;
 
/*!
 * XRegExp.build 4.2.4
 * <xregexp.com>
 * Steven Levithan (c) 2012-present MIT License
 */
var _default = function _default(XRegExp) {
  var REGEX_DATA = 'xregexp';
  var subParts = /(\()(?!\?)|\\([1-9]\d*)|\\[\s\S]|\[(?:[^\\\]]|\\[\s\S])*\]/g;
  var parts = XRegExp.union([/\({{([\w$]+)}}\)|{{([\w$]+)}}/, subParts], 'g', {
    conjunction: 'or'
  });
  /**
   * Strips a leading `^` and trailing unescaped `$`, if both are present.
   *
   * @private
   * @param {String} pattern Pattern to process.
   * @returns {String} Pattern with edge anchors removed.
   */
 
  function deanchor(pattern) {
    // Allow any number of empty noncapturing groups before/after anchors, because regexes
    // built/generated by XRegExp sometimes include them
    var leadingAnchor = /^(?:\(\?:\))*\^/;
    var trailingAnchor = /\$(?:\(\?:\))*$/;
 
    if (leadingAnchor.test(pattern) && trailingAnchor.test(pattern) && // Ensure that the trailing `$` isn't escaped
    trailingAnchor.test(pattern.replace(/\\[\s\S]/g, ''))) {
      return pattern.replace(leadingAnchor, '').replace(trailingAnchor, '');
    }
 
    return pattern;
  }
  /**
   * Converts the provided value to an XRegExp. Native RegExp flags are not preserved.
   *
   * @private
   * @param {String|RegExp} value Value to convert.
   * @param {Boolean} [addFlagX] Whether to apply the `x` flag in cases when `value` is not
   *   already a regex generated by XRegExp
   * @returns {RegExp} XRegExp object with XRegExp syntax applied.
   */
 
 
  function asXRegExp(value, addFlagX) {
    var flags = addFlagX ? 'x' : '';
    return XRegExp.isRegExp(value) ? value[REGEX_DATA] && value[REGEX_DATA].captureNames ? // Don't recompile, to preserve capture names
    value : // Recompile as XRegExp
    XRegExp(value.source, flags) : // Compile string as XRegExp
    XRegExp(value, flags);
  }
 
  function interpolate(substitution) {
    return substitution instanceof RegExp ? substitution : XRegExp.escape(substitution);
  }
 
  function reduceToSubpatternsObject(subpatterns, interpolated, subpatternIndex) {
    subpatterns["subpattern".concat(subpatternIndex)] = interpolated;
    return subpatterns;
  }
 
  function embedSubpatternAfter(raw, subpatternIndex, rawLiterals) {
    var hasSubpattern = subpatternIndex < rawLiterals.length - 1;
    return raw + (hasSubpattern ? "{{subpattern".concat(subpatternIndex, "}}") : '');
  }
  /**
   * Provides tagged template literals that create regexes with XRegExp syntax and flags. The
   * provided pattern is handled as a raw string, so backslashes don't need to be escaped.
   *
   * Interpolation of strings and regexes shares the features of `XRegExp.build`. Interpolated
   * patterns are treated as atomic units when quantified, interpolated strings have their special
   * characters escaped, a leading `^` and trailing unescaped `$` are stripped from interpolated
   * regexes if both are present, and any backreferences within an interpolated regex are
   * rewritten to work within the overall pattern.
   *
   * @memberOf XRegExp
   * @param {String} [flags] Any combination of XRegExp flags.
   * @returns {Function} Handler for template literals that construct regexes with XRegExp syntax.
   * @example
   *
   * const h12 = /1[0-2]|0?[1-9]/;
   * const h24 = /2[0-3]|[01][0-9]/;
   * const hours = XRegExp.tag('x')`${h12} : | ${h24}`;
   * const minutes = /^[0-5][0-9]$/;
   * // Note that explicitly naming the 'minutes' group is required for named backreferences
   * const time = XRegExp.tag('x')`^ ${hours} (?<minutes>${minutes}) $`;
   * time.test('10:59'); // -> true
   * XRegExp.exec('10:59', time).minutes; // -> '59'
   */
 
 
  XRegExp.tag = function (flags) {
    return function (literals) {
      for (var _len = arguments.length, substitutions = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
        substitutions[_key - 1] = arguments[_key];
      }
 
      var subpatterns = substitutions.map(interpolate).reduce(reduceToSubpatternsObject, {});
      var pattern = literals.raw.map(embedSubpatternAfter).join('');
      return XRegExp.build(pattern, subpatterns, flags);
    };
  };
  /**
   * Builds regexes using named subpatterns, for readability and pattern reuse. Backreferences in
   * the outer pattern and provided subpatterns are automatically renumbered to work correctly.
   * Native flags used by provided subpatterns are ignored in favor of the `flags` argument.
   *
   * @memberOf XRegExp
   * @param {String} pattern XRegExp pattern using `{{name}}` for embedded subpatterns. Allows
   *   `({{name}})` as shorthand for `(?<name>{{name}})`. Patterns cannot be embedded within
   *   character classes.
   * @param {Object} subs Lookup object for named subpatterns. Values can be strings or regexes. A
   *   leading `^` and trailing unescaped `$` are stripped from subpatterns, if both are present.
   * @param {String} [flags] Any combination of XRegExp flags.
   * @returns {RegExp} Regex with interpolated subpatterns.
   * @example
   *
   * const time = XRegExp.build('(?x)^ {{hours}} ({{minutes}}) $', {
   *   hours: XRegExp.build('{{h12}} : | {{h24}}', {
   *     h12: /1[0-2]|0?[1-9]/,
   *     h24: /2[0-3]|[01][0-9]/
   *   }, 'x'),
   *   minutes: /^[0-5][0-9]$/
   * });
   * time.test('10:59'); // -> true
   * XRegExp.exec('10:59', time).minutes; // -> '59'
   */
 
 
  XRegExp.build = function (pattern, subs, flags) {
    flags = flags || ''; // Used with `asXRegExp` calls for `pattern` and subpatterns in `subs`, to work around how
    // some browsers convert `RegExp('\n')` to a regex that contains the literal characters `\`
    // and `n`. See more details at <https://github.com/slevithan/xregexp/pull/163>.
 
    var addFlagX = flags.indexOf('x') !== -1;
    var inlineFlags = /^\(\?([\w$]+)\)/.exec(pattern); // Add flags within a leading mode modifier to the overall pattern's flags
 
    if (inlineFlags) {
      flags = XRegExp._clipDuplicates(flags + inlineFlags[1]);
    }
 
    var data = {};
 
    for (var p in subs) {
      if (subs.hasOwnProperty(p)) {
        // Passing to XRegExp enables extended syntax and ensures independent validity,
        // lest an unescaped `(`, `)`, `[`, or trailing `\` breaks the `(?:)` wrapper. For
        // subpatterns provided as native regexes, it dies on octals and adds the property
        // used to hold extended regex instance data, for simplicity.
        var sub = asXRegExp(subs[p], addFlagX);
        data[p] = {
          // Deanchoring allows embedding independently useful anchored regexes. If you
          // really need to keep your anchors, double them (i.e., `^^...$$`).
          pattern: deanchor(sub.source),
          names: sub[REGEX_DATA].captureNames || []
        };
      }
    } // Passing to XRegExp dies on octals and ensures the outer pattern is independently valid;
    // helps keep this simple. Named captures will be put back.
 
 
    var patternAsRegex = asXRegExp(pattern, addFlagX); // 'Caps' is short for 'captures'
 
    var numCaps = 0;
    var numPriorCaps;
    var numOuterCaps = 0;
    var outerCapsMap = [0];
    var outerCapNames = patternAsRegex[REGEX_DATA].captureNames || [];
    var output = patternAsRegex.source.replace(parts, function ($0, $1, $2, $3, $4) {
      var subName = $1 || $2;
      var capName;
      var intro;
      var localCapIndex; // Named subpattern
 
      if (subName) {
        if (!data.hasOwnProperty(subName)) {
          throw new ReferenceError("Undefined property ".concat($0));
        } // Named subpattern was wrapped in a capturing group
 
 
        if ($1) {
          capName = outerCapNames[numOuterCaps];
          outerCapsMap[++numOuterCaps] = ++numCaps; // If it's a named group, preserve the name. Otherwise, use the subpattern name
          // as the capture name
 
          intro = "(?<".concat(capName || subName, ">");
        } else {
          intro = '(?:';
        }
 
        numPriorCaps = numCaps;
        var rewrittenSubpattern = data[subName].pattern.replace(subParts, function (match, paren, backref) {
          // Capturing group
          if (paren) {
            capName = data[subName].names[numCaps - numPriorCaps];
            ++numCaps; // If the current capture has a name, preserve the name
 
            if (capName) {
              return "(?<".concat(capName, ">");
            } // Backreference
 
          } else if (backref) {
            localCapIndex = +backref - 1; // Rewrite the backreference
 
            return data[subName].names[localCapIndex] ? // Need to preserve the backreference name in case using flag `n`
            "\\k<".concat(data[subName].names[localCapIndex], ">") : "\\".concat(+backref + numPriorCaps);
          }
 
          return match;
        });
        return "".concat(intro).concat(rewrittenSubpattern, ")");
      } // Capturing group
 
 
      if ($3) {
        capName = outerCapNames[numOuterCaps];
        outerCapsMap[++numOuterCaps] = ++numCaps; // If the current capture has a name, preserve the name
 
        if (capName) {
          return "(?<".concat(capName, ">");
        } // Backreference
 
      } else if ($4) {
        localCapIndex = +$4 - 1; // Rewrite the backreference
 
        return outerCapNames[localCapIndex] ? // Need to preserve the backreference name in case using flag `n`
        "\\k<".concat(outerCapNames[localCapIndex], ">") : "\\".concat(outerCapsMap[+$4]);
      }
 
      return $0;
    });
    return XRegExp(output, flags);
  };
};
 
exports.default = _default;
module.exports = exports["default"];
 
/***/ }),
/* 1062 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
 
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;
 
/*!
 * XRegExp.matchRecursive 4.2.4
 * <xregexp.com>
 * Steven Levithan (c) 2009-present MIT License
 */
var _default = function _default(XRegExp) {
  /**
   * Returns a match detail object composed of the provided values.
   *
   * @private
   */
  function row(name, value, start, end) {
    return {
      name: name,
      value: value,
      start: start,
      end: end
    };
  }
  /**
   * Returns an array of match strings between outermost left and right delimiters, or an array of
   * objects with detailed match parts and position data. An error is thrown if delimiters are
   * unbalanced within the data.
   *
   * @memberOf XRegExp
   * @param {String} str String to search.
   * @param {String} left Left delimiter as an XRegExp pattern.
   * @param {String} right Right delimiter as an XRegExp pattern.
   * @param {String} [flags] Any native or XRegExp flags, used for the left and right delimiters.
   * @param {Object} [options] Lets you specify `valueNames` and `escapeChar` options.
   * @returns {Array} Array of matches, or an empty array.
   * @example
   *
   * // Basic usage
   * let str = '(t((e))s)t()(ing)';
   * XRegExp.matchRecursive(str, '\\(', '\\)', 'g');
   * // -> ['t((e))s', '', 'ing']
   *
   * // Extended information mode with valueNames
   * str = 'Here is <div> <div>an</div></div> example';
   * XRegExp.matchRecursive(str, '<div\\s*>', '</div>', 'gi', {
   *   valueNames: ['between', 'left', 'match', 'right']
   * });
   * // -> [
   * // {name: 'between', value: 'Here is ',       start: 0,  end: 8},
   * // {name: 'left',    value: '<div>',          start: 8,  end: 13},
   * // {name: 'match',   value: ' <div>an</div>', start: 13, end: 27},
   * // {name: 'right',   value: '</div>',         start: 27, end: 33},
   * // {name: 'between', value: ' example',       start: 33, end: 41}
   * // ]
   *
   * // Omitting unneeded parts with null valueNames, and using escapeChar
   * str = '...{1}.\\{{function(x,y){return {y:x}}}';
   * XRegExp.matchRecursive(str, '{', '}', 'g', {
   *   valueNames: ['literal', null, 'value', null],
   *   escapeChar: '\\'
   * });
   * // -> [
   * // {name: 'literal', value: '...',  start: 0, end: 3},
   * // {name: 'value',   value: '1',    start: 4, end: 5},
   * // {name: 'literal', value: '.\\{', start: 6, end: 9},
   * // {name: 'value',   value: 'function(x,y){return {y:x}}', start: 10, end: 37}
   * // ]
   *
   * // Sticky mode via flag y
   * str = '<1><<<2>>><3>4<5>';
   * XRegExp.matchRecursive(str, '<', '>', 'gy');
   * // -> ['1', '<<2>>', '3']
   */
 
 
  XRegExp.matchRecursive = function (str, left, right, flags, options) {
    flags = flags || '';
    options = options || {};
    var global = flags.indexOf('g') !== -1;
    var sticky = flags.indexOf('y') !== -1; // Flag `y` is controlled internally
 
    var basicFlags = flags.replace(/y/g, '');
    var _options = options,
        escapeChar = _options.escapeChar;
    var vN = options.valueNames;
    var output = [];
    var openTokens = 0;
    var delimStart = 0;
    var delimEnd = 0;
    var lastOuterEnd = 0;
    var outerStart;
    var innerStart;
    var leftMatch;
    var rightMatch;
    var esc;
    left = XRegExp(left, basicFlags);
    right = XRegExp(right, basicFlags);
 
    if (escapeChar) {
      if (escapeChar.length > 1) {
        throw new Error('Cannot use more than one escape character');
      }
 
      escapeChar = XRegExp.escape(escapeChar); // Example of concatenated `esc` regex:
      // `escapeChar`: '%'
      // `left`: '<'
      // `right`: '>'
      // Regex is: /(?:%[\S\s]|(?:(?!<|>)[^%])+)+/
 
      esc = new RegExp("(?:".concat(escapeChar, "[\\S\\s]|(?:(?!").concat( // Using `XRegExp.union` safely rewrites backreferences in `left` and `right`.
      // Intentionally not passing `basicFlags` to `XRegExp.union` since any syntax
      // transformation resulting from those flags was already applied to `left` and
      // `right` when they were passed through the XRegExp constructor above.
      XRegExp.union([left, right], '', {
        conjunction: 'or'
      }).source, ")[^").concat(escapeChar, "])+)+"), // Flags `gy` not needed here
      flags.replace(/[^imu]+/g, ''));
    }
 
    while (true) {
      // If using an escape character, advance to the delimiter's next starting position,
      // skipping any escaped characters in between
      if (escapeChar) {
        delimEnd += (XRegExp.exec(str, esc, delimEnd, 'sticky') || [''])[0].length;
      }
 
      leftMatch = XRegExp.exec(str, left, delimEnd);
      rightMatch = XRegExp.exec(str, right, delimEnd); // Keep the leftmost match only
 
      if (leftMatch && rightMatch) {
        if (leftMatch.index <= rightMatch.index) {
          rightMatch = null;
        } else {
          leftMatch = null;
        }
      } // Paths (LM: leftMatch, RM: rightMatch, OT: openTokens):
      // LM | RM | OT | Result
      // 1  | 0  | 1  | loop
      // 1  | 0  | 0  | loop
      // 0  | 1  | 1  | loop
      // 0  | 1  | 0  | throw
      // 0  | 0  | 1  | throw
      // 0  | 0  | 0  | break
      // The paths above don't include the sticky mode special case. The loop ends after the
      // first completed match if not `global`.
 
 
      if (leftMatch || rightMatch) {
        delimStart = (leftMatch || rightMatch).index;
        delimEnd = delimStart + (leftMatch || rightMatch)[0].length;
      } else if (!openTokens) {
        break;
      }
 
      if (sticky && !openTokens && delimStart > lastOuterEnd) {
        break;
      }
 
      if (leftMatch) {
        if (!openTokens) {
          outerStart = delimStart;
          innerStart = delimEnd;
        }
 
        ++openTokens;
      } else if (rightMatch && openTokens) {
        if (! --openTokens) {
          if (vN) {
            if (vN[0] && outerStart > lastOuterEnd) {
              output.push(row(vN[0], str.slice(lastOuterEnd, outerStart), lastOuterEnd, outerStart));
            }
 
            if (vN[1]) {
              output.push(row(vN[1], str.slice(outerStart, innerStart), outerStart, innerStart));
            }
 
            if (vN[2]) {
              output.push(row(vN[2], str.slice(innerStart, delimStart), innerStart, delimStart));
            }
 
            if (vN[3]) {
              output.push(row(vN[3], str.slice(delimStart, delimEnd), delimStart, delimEnd));
            }
          } else {
            output.push(str.slice(innerStart, delimStart));
          }
 
          lastOuterEnd = delimEnd;
 
          if (!global) {
            break;
          }
        }
      } else {
        throw new Error('Unbalanced delimiter found in string');
      } // If the delimiter matched an empty string, avoid an infinite loop
 
 
      if (delimStart === delimEnd) {
        ++delimEnd;
      }
    }
 
    if (global && !sticky && vN && vN[0] && str.length > lastOuterEnd) {
      output.push(row(vN[0], str.slice(lastOuterEnd), lastOuterEnd, str.length));
    }
 
    return output;
  };
};
 
exports.default = _default;
module.exports = exports["default"];
 
/***/ }),
/* 1063 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
 
var _interopRequireDefault = __webpack_require__(116);
 
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;
 
var _getIterator2 = _interopRequireDefault(__webpack_require__(314));
 
/*!
 * XRegExp Unicode Base 4.2.4
 * <xregexp.com>
 * Steven Levithan (c) 2008-present MIT License
 */
var _default = function _default(XRegExp) {
  /**
   * Adds base support for Unicode matching:
   * - Adds syntax `\p{..}` for matching Unicode tokens. Tokens can be inverted using `\P{..}` or
   *   `\p{^..}`. Token names ignore case, spaces, hyphens, and underscores. You can omit the
   *   braces for token names that are a single letter (e.g. `\pL` or `PL`).
   * - Adds flag A (astral), which enables 21-bit Unicode support.
   * - Adds the `XRegExp.addUnicodeData` method used by other addons to provide character data.
   *
   * Unicode Base relies on externally provided Unicode character data. Official addons are
   * available to provide data for Unicode categories, scripts, blocks, and properties.
   *
   * @requires XRegExp
   */
  // ==--------------------------==
  // Private stuff
  // ==--------------------------==
  // Storage for Unicode data
  var unicode = {}; // Reuse utils
 
  var dec = XRegExp._dec;
  var hex = XRegExp._hex;
  var pad4 = XRegExp._pad4; // Generates a token lookup name: lowercase, with hyphens, spaces, and underscores removed
 
  function normalize(name) {
    return name.replace(/[- _]+/g, '').toLowerCase();
  } // Gets the decimal code of a literal code unit, \xHH, \uHHHH, or a backslash-escaped literal
 
 
  function charCode(chr) {
    var esc = /^\\[xu](.+)/.exec(chr);
    return esc ? dec(esc[1]) : chr.charCodeAt(chr[0] === '\\' ? 1 : 0);
  } // Inverts a list of ordered BMP characters and ranges
 
 
  function invertBmp(range) {
    var output = '';
    var lastEnd = -1;
    XRegExp.forEach(range, /(\\x..|\\u....|\\?[\s\S])(?:-(\\x..|\\u....|\\?[\s\S]))?/, function (m) {
      var start = charCode(m[1]);
 
      if (start > lastEnd + 1) {
        output += "\\u".concat(pad4(hex(lastEnd + 1)));
 
        if (start > lastEnd + 2) {
          output += "-\\u".concat(pad4(hex(start - 1)));
        }
      }
 
      lastEnd = charCode(m[2] || m[1]);
    });
 
    if (lastEnd < 0xFFFF) {
      output += "\\u".concat(pad4(hex(lastEnd + 1)));
 
      if (lastEnd < 0xFFFE) {
        output += '-\\uFFFF';
      }
    }
 
    return output;
  } // Generates an inverted BMP range on first use
 
 
  function cacheInvertedBmp(slug) {
    var prop = 'b!';
    return unicode[slug][prop] || (unicode[slug][prop] = invertBmp(unicode[slug].bmp));
  } // Combines and optionally negates BMP and astral data
 
 
  function buildAstral(slug, isNegated) {
    var item = unicode[slug];
    var combined = '';
 
    if (item.bmp && !item.isBmpLast) {
      combined = "[".concat(item.bmp, "]").concat(item.astral ? '|' : '');
    }
 
    if (item.astral) {
      combined += item.astral;
    }
 
    if (item.isBmpLast && item.bmp) {
      combined += "".concat(item.astral ? '|' : '', "[").concat(item.bmp, "]");
    } // Astral Unicode tokens always match a code point, never a code unit
 
 
    return isNegated ? "(?:(?!".concat(combined, ")(?:[\uD800-\uDBFF][\uDC00-\uDFFF]|[\0-\uFFFF]))") : "(?:".concat(combined, ")");
  } // Builds a complete astral pattern on first use
 
 
  function cacheAstral(slug, isNegated) {
    var prop = isNegated ? 'a!' : 'a=';
    return unicode[slug][prop] || (unicode[slug][prop] = buildAstral(slug, isNegated));
  } // ==--------------------------==
  // Core functionality
  // ==--------------------------==
 
  /*
   * Add astral mode (flag A) and Unicode token syntax: `\p{..}`, `\P{..}`, `\p{^..}`, `\pC`.
   */
 
 
  XRegExp.addToken( // Use `*` instead of `+` to avoid capturing `^` as the token name in `\p{^}`
  /\\([pP])(?:{(\^?)([^}]*)}|([A-Za-z]))/, function (match, scope, flags) {
    var ERR_DOUBLE_NEG = 'Invalid double negation ';
    var ERR_UNKNOWN_NAME = 'Unknown Unicode token ';
    var ERR_UNKNOWN_REF = 'Unicode token missing data ';
    var ERR_ASTRAL_ONLY = 'Astral mode required for Unicode token ';
    var ERR_ASTRAL_IN_CLASS = 'Astral mode does not support Unicode tokens within character classes'; // Negated via \P{..} or \p{^..}
 
    var isNegated = match[1] === 'P' || !!match[2]; // Switch from BMP (0-FFFF) to astral (0-10FFFF) mode via flag A
 
    var isAstralMode = flags.indexOf('A') !== -1; // Token lookup name. Check `[4]` first to avoid passing `undefined` via `\p{}`
 
    var slug = normalize(match[4] || match[3]); // Token data object
 
    var item = unicode[slug];
 
    Iif (match[1] === 'P' && match[2]) {
      throw new SyntaxError(ERR_DOUBLE_NEG + match[0]);
    }
 
    Iif (!unicode.hasOwnProperty(slug)) {
      throw new SyntaxError(ERR_UNKNOWN_NAME + match[0]);
    } // Switch to the negated form of the referenced Unicode token
 
 
    Iif (item.inverseOf) {
      slug = normalize(item.inverseOf);
 
      if (!unicode.hasOwnProperty(slug)) {
        throw new ReferenceError("".concat(ERR_UNKNOWN_REF + match[0], " -> ").concat(item.inverseOf));
      }
 
      item = unicode[slug];
      isNegated = !isNegated;
    }
 
    Iif (!(item.bmp || isAstralMode)) {
      throw new SyntaxError(ERR_ASTRAL_ONLY + match[0]);
    }
 
    Iif (isAstralMode) {
      if (scope === 'class') {
        throw new SyntaxError(ERR_ASTRAL_IN_CLASS);
      }
 
      return cacheAstral(slug, isNegated);
    }
 
    return scope === 'class' ? isNegated ? cacheInvertedBmp(slug) : item.bmp : "".concat((isNegated ? '[^' : '[') + item.bmp, "]");
  }, {
    scope: 'all',
    optionalFlags: 'A',
    leadChar: '\\'
  });
  /**
   * Adds to the list of Unicode tokens that XRegExp regexes can match via `\p` or `\P`.
   *
   * @memberOf XRegExp
   * @param {Array} data Objects with named character ranges. Each object may have properties
   *   `name`, `alias`, `isBmpLast`, `inverseOf`, `bmp`, and `astral`. All but `name` are
   *   optional, although one of `bmp` or `astral` is required (unless `inverseOf` is set). If
   *   `astral` is absent, the `bmp` data is used for BMP and astral modes. If `bmp` is absent,
   *   the name errors in BMP mode but works in astral mode. If both `bmp` and `astral` are
   *   provided, the `bmp` data only is used in BMP mode, and the combination of `bmp` and
   *   `astral` data is used in astral mode. `isBmpLast` is needed when a token matches orphan
   *   high surrogates *and* uses surrogate pairs to match astral code points. The `bmp` and
   *   `astral` data should be a combination of literal characters and `\xHH` or `\uHHHH` escape
   *   sequences, with hyphens to create ranges. Any regex metacharacters in the data should be
   *   escaped, apart from range-creating hyphens. The `astral` data can additionally use
   *   character classes and alternation, and should use surrogate pairs to represent astral code
   *   points. `inverseOf` can be used to avoid duplicating character data if a Unicode token is
   *   defined as the exact inverse of another token.
   * @example
   *
   * // Basic use
   * XRegExp.addUnicodeData([{
   *   name: 'XDigit',
   *   alias: 'Hexadecimal',
   *   bmp: '0-9A-Fa-f'
   * }]);
   * XRegExp('\\p{XDigit}:\\p{Hexadecimal}+').test('0:3D'); // -> true
   */
 
  XRegExp.addUnicodeData = function (data) {
    var ERR_NO_NAME = 'Unicode token requires name';
    var ERR_NO_DATA = 'Unicode token has no character data ';
    var _iteratorNormalCompletion = true;
    var _didIteratorError = false;
    var _iteratorError = undefined;
 
    try {
      for (var _iterator = (0, _getIterator2.default)(data), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
        var item = _step.value;
 
        Iif (!item.name) {
          throw new Error(ERR_NO_NAME);
        }
 
        Iif (!(item.inverseOf || item.bmp || item.astral)) {
          throw new Error(ERR_NO_DATA + item.name);
        }
 
        unicode[normalize(item.name)] = item;
 
        if (item.alias) {
          unicode[normalize(item.alias)] = item;
        }
      } // Reset the pattern cache used by the `XRegExp` constructor, since the same pattern and
      // flags might now produce different results
 
    } catch (err) {
      _didIteratorError = true;
      _iteratorError = err;
    } finally {
      try {
        Iif (!_iteratorNormalCompletion && _iterator.return != null) {
          _iterator.return();
        }
      } finally {
        Iif (_didIteratorError) {
          throw _iteratorError;
        }
      }
    }
 
    XRegExp.cache.flush('patterns');
  };
  /**
   * @ignore
   *
   * Return a reference to the internal Unicode definition structure for the given Unicode
   * Property if the given name is a legal Unicode Property for use in XRegExp `\p` or `\P` regex
   * constructs.
   *
   * @memberOf XRegExp
   * @param {String} name Name by which the Unicode Property may be recognized (case-insensitive),
   *   e.g. `'N'` or `'Number'`. The given name is matched against all registered Unicode
   *   Properties and Property Aliases.
   * @returns {Object} Reference to definition structure when the name matches a Unicode Property.
   *
   * @note
   * For more info on Unicode Properties, see also http://unicode.org/reports/tr18/#Categories.
   *
   * @note
   * This method is *not* part of the officially documented API and may change or be removed in
   * the future. It is meant for userland code that wishes to reuse the (large) internal Unicode
   * structures set up by XRegExp.
   */
 
 
  XRegExp._getUnicodeProperty = function (name) {
    var slug = normalize(name);
    return unicode[slug];
  };
};
 
exports.default = _default;
module.exports = exports["default"];
 
/***/ }),
/* 1064 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
 
var _interopRequireDefault = __webpack_require__(116);
 
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;
 
var _blocks = _interopRequireDefault(__webpack_require__(1065));
 
/*!
 * XRegExp Unicode Blocks 4.2.4
 * <xregexp.com>
 * Steven Levithan (c) 2010-present MIT License
 * Unicode data by Mathias Bynens <mathiasbynens.be>
 */
var _default = function _default(XRegExp) {
  /**
   * Adds support for all Unicode blocks. Block names use the prefix 'In'. E.g.,
   * `\p{InBasicLatin}`. Token names are case insensitive, and any spaces, hyphens, and
   * underscores are ignored.
   *
   * Uses Unicode 11.0.0.
   *
   * @requires XRegExp, Unicode Base
   */
  Iif (!XRegExp.addUnicodeData) {
    throw new ReferenceError('Unicode Base must be loaded before Unicode Blocks');
  }
 
  XRegExp.addUnicodeData(_blocks.default);
};
 
exports.default = _default;
module.exports = exports["default"];
 
/***/ }),
/* 1065 */
/***/ (function(module, exports) {
 
module.exports = [
    {
        'name': 'InAdlam',
        'astral': '\uD83A[\uDD00-\uDD5F]'
    },
    {
        'name': 'InAegean_Numbers',
        'astral': '\uD800[\uDD00-\uDD3F]'
    },
    {
        'name': 'InAhom',
        'astral': '\uD805[\uDF00-\uDF3F]'
    },
    {
        'name': 'InAlchemical_Symbols',
        'astral': '\uD83D[\uDF00-\uDF7F]'
    },
    {
        'name': 'InAlphabetic_Presentation_Forms',
        'bmp': '\uFB00-\uFB4F'
    },
    {
        'name': 'InAnatolian_Hieroglyphs',
        'astral': '\uD811[\uDC00-\uDE7F]'
    },
    {
        'name': 'InAncient_Greek_Musical_Notation',
        'astral': '\uD834[\uDE00-\uDE4F]'
    },
    {
        'name': 'InAncient_Greek_Numbers',
        'astral': '\uD800[\uDD40-\uDD8F]'
    },
    {
        'name': 'InAncient_Symbols',
        'astral': '\uD800[\uDD90-\uDDCF]'
    },
    {
        'name': 'InArabic',
        'bmp': '\u0600-\u06FF'
    },
    {
        'name': 'InArabic_Extended_A',
        'bmp': '\u08A0-\u08FF'
    },
    {
        'name': 'InArabic_Mathematical_Alphabetic_Symbols',
        'astral': '\uD83B[\uDE00-\uDEFF]'
    },
    {
        'name': 'InArabic_Presentation_Forms_A',
        'bmp': '\uFB50-\uFDFF'
    },
    {
        'name': 'InArabic_Presentation_Forms_B',
        'bmp': '\uFE70-\uFEFF'
    },
    {
        'name': 'InArabic_Supplement',
        'bmp': '\u0750-\u077F'
    },
    {
        'name': 'InArmenian',
        'bmp': '\u0530-\u058F'
    },
    {
        'name': 'InArrows',
        'bmp': '\u2190-\u21FF'
    },
    {
        'name': 'InAvestan',
        'astral': '\uD802[\uDF00-\uDF3F]'
    },
    {
        'name': 'InBalinese',
        'bmp': '\u1B00-\u1B7F'
    },
    {
        'name': 'InBamum',
        'bmp': '\uA6A0-\uA6FF'
    },
    {
        'name': 'InBamum_Supplement',
        'astral': '\uD81A[\uDC00-\uDE3F]'
    },
    {
        'name': 'InBasic_Latin',
        'bmp': '\0-\x7F'
    },
    {
        'name': 'InBassa_Vah',
        'astral': '\uD81A[\uDED0-\uDEFF]'
    },
    {
        'name': 'InBatak',
        'bmp': '\u1BC0-\u1BFF'
    },
    {
        'name': 'InBengali',
        'bmp': '\u0980-\u09FF'
    },
    {
        'name': 'InBhaiksuki',
        'astral': '\uD807[\uDC00-\uDC6F]'
    },
    {
        'name': 'InBlock_Elements',
        'bmp': '\u2580-\u259F'
    },
    {
        'name': 'InBopomofo',
        'bmp': '\u3100-\u312F'
    },
    {
        'name': 'InBopomofo_Extended',
        'bmp': '\u31A0-\u31BF'
    },
    {
        'name': 'InBox_Drawing',
        'bmp': '\u2500-\u257F'
    },
    {
        'name': 'InBrahmi',
        'astral': '\uD804[\uDC00-\uDC7F]'
    },
    {
        'name': 'InBraille_Patterns',
        'bmp': '\u2800-\u28FF'
    },
    {
        'name': 'InBuginese',
        'bmp': '\u1A00-\u1A1F'
    },
    {
        'name': 'InBuhid',
        'bmp': '\u1740-\u175F'
    },
    {
        'name': 'InByzantine_Musical_Symbols',
        'astral': '\uD834[\uDC00-\uDCFF]'
    },
    {
        'name': 'InCJK_Compatibility',
        'bmp': '\u3300-\u33FF'
    },
    {
        'name': 'InCJK_Compatibility_Forms',
        'bmp': '\uFE30-\uFE4F'
    },
    {
        'name': 'InCJK_Compatibility_Ideographs',
        'bmp': '\uF900-\uFAFF'
    },
    {
        'name': 'InCJK_Compatibility_Ideographs_Supplement',
        'astral': '\uD87E[\uDC00-\uDE1F]'
    },
    {
        'name': 'InCJK_Radicals_Supplement',
        'bmp': '\u2E80-\u2EFF'
    },
    {
        'name': 'InCJK_Strokes',
        'bmp': '\u31C0-\u31EF'
    },
    {
        'name': 'InCJK_Symbols_And_Punctuation',
        'bmp': '\u3000-\u303F'
    },
    {
        'name': 'InCJK_Unified_Ideographs',
        'bmp': '\u4E00-\u9FFF'
    },
    {
        'name': 'InCJK_Unified_Ideographs_Extension_A',
        'bmp': '\u3400-\u4DBF'
    },
    {
        'name': 'InCJK_Unified_Ideographs_Extension_B',
        'astral': '[\uD840-\uD868][\uDC00-\uDFFF]|\uD869[\uDC00-\uDEDF]'
    },
    {
        'name': 'InCJK_Unified_Ideographs_Extension_C',
        'astral': '\uD869[\uDF00-\uDFFF]|[\uD86A-\uD86C][\uDC00-\uDFFF]|\uD86D[\uDC00-\uDF3F]'
    },
    {
        'name': 'InCJK_Unified_Ideographs_Extension_D',
        'astral': '\uD86D[\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1F]'
    },
    {
        'name': 'InCJK_Unified_Ideographs_Extension_E',
        'astral': '\uD86E[\uDC20-\uDFFF]|[\uD86F-\uD872][\uDC00-\uDFFF]|\uD873[\uDC00-\uDEAF]'
    },
    {
        'name': 'InCJK_Unified_Ideographs_Extension_F',
        'astral': '\uD873[\uDEB0-\uDFFF]|[\uD874-\uD879][\uDC00-\uDFFF]|\uD87A[\uDC00-\uDFEF]'
    },
    {
        'name': 'InCarian',
        'astral': '\uD800[\uDEA0-\uDEDF]'
    },
    {
        'name': 'InCaucasian_Albanian',
        'astral': '\uD801[\uDD30-\uDD6F]'
    },
    {
        'name': 'InChakma',
        'astral': '\uD804[\uDD00-\uDD4F]'
    },
    {
        'name': 'InCham',
        'bmp': '\uAA00-\uAA5F'
    },
    {
        'name': 'InCherokee',
        'bmp': '\u13A0-\u13FF'
    },
    {
        'name': 'InCherokee_Supplement',
        'bmp': '\uAB70-\uABBF'
    },
    {
        'name': 'InChess_Symbols',
        'astral': '\uD83E[\uDE00-\uDE6F]'
    },
    {
        'name': 'InCombining_Diacritical_Marks',
        'bmp': '\u0300-\u036F'
    },
    {
        'name': 'InCombining_Diacritical_Marks_Extended',
        'bmp': '\u1AB0-\u1AFF'
    },
    {
        'name': 'InCombining_Diacritical_Marks_For_Symbols',
        'bmp': '\u20D0-\u20FF'
    },
    {
        'name': 'InCombining_Diacritical_Marks_Supplement',
        'bmp': '\u1DC0-\u1DFF'
    },
    {
        'name': 'InCombining_Half_Marks',
        'bmp': '\uFE20-\uFE2F'
    },
    {
        'name': 'InCommon_Indic_Number_Forms',
        'bmp': '\uA830-\uA83F'
    },
    {
        'name': 'InControl_Pictures',
        'bmp': '\u2400-\u243F'
    },
    {
        'name': 'InCoptic',
        'bmp': '\u2C80-\u2CFF'
    },
    {
        'name': 'InCoptic_Epact_Numbers',
        'astral': '\uD800[\uDEE0-\uDEFF]'
    },
    {
        'name': 'InCounting_Rod_Numerals',
        'astral': '\uD834[\uDF60-\uDF7F]'
    },
    {
        'name': 'InCuneiform',
        'astral': '\uD808[\uDC00-\uDFFF]'
    },
    {
        'name': 'InCuneiform_Numbers_And_Punctuation',
        'astral': '\uD809[\uDC00-\uDC7F]'
    },
    {
        'name': 'InCurrency_Symbols',
        'bmp': '\u20A0-\u20CF'
    },
    {
        'name': 'InCypriot_Syllabary',
        'astral': '\uD802[\uDC00-\uDC3F]'
    },
    {
        'name': 'InCyrillic',
        'bmp': '\u0400-\u04FF'
    },
    {
        'name': 'InCyrillic_Extended_A',
        'bmp': '\u2DE0-\u2DFF'
    },
    {
        'name': 'InCyrillic_Extended_B',
        'bmp': '\uA640-\uA69F'
    },
    {
        'name': 'InCyrillic_Extended_C',
        'bmp': '\u1C80-\u1C8F'
    },
    {
        'name': 'InCyrillic_Supplement',
        'bmp': '\u0500-\u052F'
    },
    {
        'name': 'InDeseret',
        'astral': '\uD801[\uDC00-\uDC4F]'
    },
    {
        'name': 'InDevanagari',
        'bmp': '\u0900-\u097F'
    },
    {
        'name': 'InDevanagari_Extended',
        'bmp': '\uA8E0-\uA8FF'
    },
    {
        'name': 'InDingbats',
        'bmp': '\u2700-\u27BF'
    },
    {
        'name': 'InDogra',
        'astral': '\uD806[\uDC00-\uDC4F]'
    },
    {
        'name': 'InDomino_Tiles',
        'astral': '\uD83C[\uDC30-\uDC9F]'
    },
    {
        'name': 'InDuployan',
        'astral': '\uD82F[\uDC00-\uDC9F]'
    },
    {
        'name': 'InEarly_Dynastic_Cuneiform',
        'astral': '\uD809[\uDC80-\uDD4F]'
    },
    {
        'name': 'InEgyptian_Hieroglyphs',
        'astral': '\uD80C[\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2F]'
    },
    {
        'name': 'InElbasan',
        'astral': '\uD801[\uDD00-\uDD2F]'
    },
    {
        'name': 'InEmoticons',
        'astral': '\uD83D[\uDE00-\uDE4F]'
    },
    {
        'name': 'InEnclosed_Alphanumeric_Supplement',
        'astral': '\uD83C[\uDD00-\uDDFF]'
    },
    {
        'name': 'InEnclosed_Alphanumerics',
        'bmp': '\u2460-\u24FF'
    },
    {
        'name': 'InEnclosed_CJK_Letters_And_Months',
        'bmp': '\u3200-\u32FF'
    },
    {
        'name': 'InEnclosed_Ideographic_Supplement',
        'astral': '\uD83C[\uDE00-\uDEFF]'
    },
    {
        'name': 'InEthiopic',
        'bmp': '\u1200-\u137F'
    },
    {
        'name': 'InEthiopic_Extended',
        'bmp': '\u2D80-\u2DDF'
    },
    {
        'name': 'InEthiopic_Extended_A',
        'bmp': '\uAB00-\uAB2F'
    },
    {
        'name': 'InEthiopic_Supplement',
        'bmp': '\u1380-\u139F'
    },
    {
        'name': 'InGeneral_Punctuation',
        'bmp': '\u2000-\u206F'
    },
    {
        'name': 'InGeometric_Shapes',
        'bmp': '\u25A0-\u25FF'
    },
    {
        'name': 'InGeometric_Shapes_Extended',
        'astral': '\uD83D[\uDF80-\uDFFF]'
    },
    {
        'name': 'InGeorgian',
        'bmp': '\u10A0-\u10FF'
    },
    {
        'name': 'InGeorgian_Extended',
        'bmp': '\u1C90-\u1CBF'
    },
    {
        'name': 'InGeorgian_Supplement',
        'bmp': '\u2D00-\u2D2F'
    },
    {
        'name': 'InGlagolitic',
        'bmp': '\u2C00-\u2C5F'
    },
    {
        'name': 'InGlagolitic_Supplement',
        'astral': '\uD838[\uDC00-\uDC2F]'
    },
    {
        'name': 'InGothic',
        'astral': '\uD800[\uDF30-\uDF4F]'
    },
    {
        'name': 'InGrantha',
        'astral': '\uD804[\uDF00-\uDF7F]'
    },
    {
        'name': 'InGreek_And_Coptic',
        'bmp': '\u0370-\u03FF'
    },
    {
        'name': 'InGreek_Extended',
        'bmp': '\u1F00-\u1FFF'
    },
    {
        'name': 'InGujarati',
        'bmp': '\u0A80-\u0AFF'
    },
    {
        'name': 'InGunjala_Gondi',
        'astral': '\uD807[\uDD60-\uDDAF]'
    },
    {
        'name': 'InGurmukhi',
        'bmp': '\u0A00-\u0A7F'
    },
    {
        'name': 'InHalfwidth_And_Fullwidth_Forms',
        'bmp': '\uFF00-\uFFEF'
    },
    {
        'name': 'InHangul_Compatibility_Jamo',
        'bmp': '\u3130-\u318F'
    },
    {
        'name': 'InHangul_Jamo',
        'bmp': '\u1100-\u11FF'
    },
    {
        'name': 'InHangul_Jamo_Extended_A',
        'bmp': '\uA960-\uA97F'
    },
    {
        'name': 'InHangul_Jamo_Extended_B',
        'bmp': '\uD7B0-\uD7FF'
    },
    {
        'name': 'InHangul_Syllables',
        'bmp': '\uAC00-\uD7AF'
    },
    {
        'name': 'InHanifi_Rohingya',
        'astral': '\uD803[\uDD00-\uDD3F]'
    },
    {
        'name': 'InHanunoo',
        'bmp': '\u1720-\u173F'
    },
    {
        'name': 'InHatran',
        'astral': '\uD802[\uDCE0-\uDCFF]'
    },
    {
        'name': 'InHebrew',
        'bmp': '\u0590-\u05FF'
    },
    {
        'name': 'InHigh_Private_Use_Surrogates',
        'bmp': '\uDB80-\uDBFF'
    },
    {
        'name': 'InHigh_Surrogates',
        'bmp': '\uD800-\uDB7F'
    },
    {
        'name': 'InHiragana',
        'bmp': '\u3040-\u309F'
    },
    {
        'name': 'InIPA_Extensions',
        'bmp': '\u0250-\u02AF'
    },
    {
        'name': 'InIdeographic_Description_Characters',
        'bmp': '\u2FF0-\u2FFF'
    },
    {
        'name': 'InIdeographic_Symbols_And_Punctuation',
        'astral': '\uD81B[\uDFE0-\uDFFF]'
    },
    {
        'name': 'InImperial_Aramaic',
        'astral': '\uD802[\uDC40-\uDC5F]'
    },
    {
        'name': 'InIndic_Siyaq_Numbers',
        'astral': '\uD83B[\uDC70-\uDCBF]'
    },
    {
        'name': 'InInscriptional_Pahlavi',
        'astral': '\uD802[\uDF60-\uDF7F]'
    },
    {
        'name': 'InInscriptional_Parthian',
        'astral': '\uD802[\uDF40-\uDF5F]'
    },
    {
        'name': 'InJavanese',
        'bmp': '\uA980-\uA9DF'
    },
    {
        'name': 'InKaithi',
        'astral': '\uD804[\uDC80-\uDCCF]'
    },
    {
        'name': 'InKana_Extended_A',
        'astral': '\uD82C[\uDD00-\uDD2F]'
    },
    {
        'name': 'InKana_Supplement',
        'astral': '\uD82C[\uDC00-\uDCFF]'
    },
    {
        'name': 'InKanbun',
        'bmp': '\u3190-\u319F'
    },
    {
        'name': 'InKangxi_Radicals',
        'bmp': '\u2F00-\u2FDF'
    },
    {
        'name': 'InKannada',
        'bmp': '\u0C80-\u0CFF'
    },
    {
        'name': 'InKatakana',
        'bmp': '\u30A0-\u30FF'
    },
    {
        'name': 'InKatakana_Phonetic_Extensions',
        'bmp': '\u31F0-\u31FF'
    },
    {
        'name': 'InKayah_Li',
        'bmp': '\uA900-\uA92F'
    },
    {
        'name': 'InKharoshthi',
        'astral': '\uD802[\uDE00-\uDE5F]'
    },
    {
        'name': 'InKhmer',
        'bmp': '\u1780-\u17FF'
    },
    {
        'name': 'InKhmer_Symbols',
        'bmp': '\u19E0-\u19FF'
    },
    {
        'name': 'InKhojki',
        'astral': '\uD804[\uDE00-\uDE4F]'
    },
    {
        'name': 'InKhudawadi',
        'astral': '\uD804[\uDEB0-\uDEFF]'
    },
    {
        'name': 'InLao',
        'bmp': '\u0E80-\u0EFF'
    },
    {
        'name': 'InLatin_1_Supplement',
        'bmp': '\x80-\xFF'
    },
    {
        'name': 'InLatin_Extended_A',
        'bmp': '\u0100-\u017F'
    },
    {
        'name': 'InLatin_Extended_Additional',
        'bmp': '\u1E00-\u1EFF'
    },
    {
        'name': 'InLatin_Extended_B',
        'bmp': '\u0180-\u024F'
    },
    {
        'name': 'InLatin_Extended_C',
        'bmp': '\u2C60-\u2C7F'
    },
    {
        'name': 'InLatin_Extended_D',
        'bmp': '\uA720-\uA7FF'
    },
    {
        'name': 'InLatin_Extended_E',
        'bmp': '\uAB30-\uAB6F'
    },
    {
        'name': 'InLepcha',
        'bmp': '\u1C00-\u1C4F'
    },
    {
        'name': 'InLetterlike_Symbols',
        'bmp': '\u2100-\u214F'
    },
    {
        'name': 'InLimbu',
        'bmp': '\u1900-\u194F'
    },
    {
        'name': 'InLinear_A',
        'astral': '\uD801[\uDE00-\uDF7F]'
    },
    {
        'name': 'InLinear_B_Ideograms',
        'astral': '\uD800[\uDC80-\uDCFF]'
    },
    {
        'name': 'InLinear_B_Syllabary',
        'astral': '\uD800[\uDC00-\uDC7F]'
    },
    {
        'name': 'InLisu',
        'bmp': '\uA4D0-\uA4FF'
    },
    {
        'name': 'InLow_Surrogates',
        'bmp': '\uDC00-\uDFFF'
    },
    {
        'name': 'InLycian',
        'astral': '\uD800[\uDE80-\uDE9F]'
    },
    {
        'name': 'InLydian',
        'astral': '\uD802[\uDD20-\uDD3F]'
    },
    {
        'name': 'InMahajani',
        'astral': '\uD804[\uDD50-\uDD7F]'
    },
    {
        'name': 'InMahjong_Tiles',
        'astral': '\uD83C[\uDC00-\uDC2F]'
    },
    {
        'name': 'InMakasar',
        'astral': '\uD807[\uDEE0-\uDEFF]'
    },
    {
        'name': 'InMalayalam',
        'bmp': '\u0D00-\u0D7F'
    },
    {
        'name': 'InMandaic',
        'bmp': '\u0840-\u085F'
    },
    {
        'name': 'InManichaean',
        'astral': '\uD802[\uDEC0-\uDEFF]'
    },
    {
        'name': 'InMarchen',
        'astral': '\uD807[\uDC70-\uDCBF]'
    },
    {
        'name': 'InMasaram_Gondi',
        'astral': '\uD807[\uDD00-\uDD5F]'
    },
    {
        'name': 'InMathematical_Alphanumeric_Symbols',
        'astral': '\uD835[\uDC00-\uDFFF]'
    },
    {
        'name': 'InMathematical_Operators',
        'bmp': '\u2200-\u22FF'
    },
    {
        'name': 'InMayan_Numerals',
        'astral': '\uD834[\uDEE0-\uDEFF]'
    },
    {
        'name': 'InMedefaidrin',
        'astral': '\uD81B[\uDE40-\uDE9F]'
    },
    {
        'name': 'InMeetei_Mayek',
        'bmp': '\uABC0-\uABFF'
    },
    {
        'name': 'InMeetei_Mayek_Extensions',
        'bmp': '\uAAE0-\uAAFF'
    },
    {
        'name': 'InMende_Kikakui',
        'astral': '\uD83A[\uDC00-\uDCDF]'
    },
    {
        'name': 'InMeroitic_Cursive',
        'astral': '\uD802[\uDDA0-\uDDFF]'
    },
    {
        'name': 'InMeroitic_Hieroglyphs',
        'astral': '\uD802[\uDD80-\uDD9F]'
    },
    {
        'name': 'InMiao',
        'astral': '\uD81B[\uDF00-\uDF9F]'
    },
    {
        'name': 'InMiscellaneous_Mathematical_Symbols_A',
        'bmp': '\u27C0-\u27EF'
    },
    {
        'name': 'InMiscellaneous_Mathematical_Symbols_B',
        'bmp': '\u2980-\u29FF'
    },
    {
        'name': 'InMiscellaneous_Symbols',
        'bmp': '\u2600-\u26FF'
    },
    {
        'name': 'InMiscellaneous_Symbols_And_Arrows',
        'bmp': '\u2B00-\u2BFF'
    },
    {
        'name': 'InMiscellaneous_Symbols_And_Pictographs',
        'astral': '\uD83C[\uDF00-\uDFFF]|\uD83D[\uDC00-\uDDFF]'
    },
    {
        'name': 'InMiscellaneous_Technical',
        'bmp': '\u2300-\u23FF'
    },
    {
        'name': 'InModi',
        'astral': '\uD805[\uDE00-\uDE5F]'
    },
    {
        'name': 'InModifier_Tone_Letters',
        'bmp': '\uA700-\uA71F'
    },
    {
        'name': 'InMongolian',
        'bmp': '\u1800-\u18AF'
    },
    {
        'name': 'InMongolian_Supplement',
        'astral': '\uD805[\uDE60-\uDE7F]'
    },
    {
        'name': 'InMro',
        'astral': '\uD81A[\uDE40-\uDE6F]'
    },
    {
        'name': 'InMultani',
        'astral': '\uD804[\uDE80-\uDEAF]'
    },
    {
        'name': 'InMusical_Symbols',
        'astral': '\uD834[\uDD00-\uDDFF]'
    },
    {
        'name': 'InMyanmar',
        'bmp': '\u1000-\u109F'
    },
    {
        'name': 'InMyanmar_Extended_A',
        'bmp': '\uAA60-\uAA7F'
    },
    {
        'name': 'InMyanmar_Extended_B',
        'bmp': '\uA9E0-\uA9FF'
    },
    {
        'name': 'InNKo',
        'bmp': '\u07C0-\u07FF'
    },
    {
        'name': 'InNabataean',
        'astral': '\uD802[\uDC80-\uDCAF]'
    },
    {
        'name': 'InNew_Tai_Lue',
        'bmp': '\u1980-\u19DF'
    },
    {
        'name': 'InNewa',
        'astral': '\uD805[\uDC00-\uDC7F]'
    },
    {
        'name': 'InNumber_Forms',
        'bmp': '\u2150-\u218F'
    },
    {
        'name': 'InNushu',
        'astral': '\uD82C[\uDD70-\uDEFF]'
    },
    {
        'name': 'InOgham',
        'bmp': '\u1680-\u169F'
    },
    {
        'name': 'InOl_Chiki',
        'bmp': '\u1C50-\u1C7F'
    },
    {
        'name': 'InOld_Hungarian',
        'astral': '\uD803[\uDC80-\uDCFF]'
    },
    {
        'name': 'InOld_Italic',
        'astral': '\uD800[\uDF00-\uDF2F]'
    },
    {
        'name': 'InOld_North_Arabian',
        'astral': '\uD802[\uDE80-\uDE9F]'
    },
    {
        'name': 'InOld_Permic',
        'astral': '\uD800[\uDF50-\uDF7F]'
    },
    {
        'name': 'InOld_Persian',
        'astral': '\uD800[\uDFA0-\uDFDF]'
    },
    {
        'name': 'InOld_Sogdian',
        'astral': '\uD803[\uDF00-\uDF2F]'
    },
    {
        'name': 'InOld_South_Arabian',
        'astral': '\uD802[\uDE60-\uDE7F]'
    },
    {
        'name': 'InOld_Turkic',
        'astral': '\uD803[\uDC00-\uDC4F]'
    },
    {
        'name': 'InOptical_Character_Recognition',
        'bmp': '\u2440-\u245F'
    },
    {
        'name': 'InOriya',
        'bmp': '\u0B00-\u0B7F'
    },
    {
        'name': 'InOrnamental_Dingbats',
        'astral': '\uD83D[\uDE50-\uDE7F]'
    },
    {
        'name': 'InOsage',
        'astral': '\uD801[\uDCB0-\uDCFF]'
    },
    {
        'name': 'InOsmanya',
        'astral': '\uD801[\uDC80-\uDCAF]'
    },
    {
        'name': 'InPahawh_Hmong',
        'astral': '\uD81A[\uDF00-\uDF8F]'
    },
    {
        'name': 'InPalmyrene',
        'astral': '\uD802[\uDC60-\uDC7F]'
    },
    {
        'name': 'InPau_Cin_Hau',
        'astral': '\uD806[\uDEC0-\uDEFF]'
    },
    {
        'name': 'InPhags_Pa',
        'bmp': '\uA840-\uA87F'
    },
    {
        'name': 'InPhaistos_Disc',
        'astral': '\uD800[\uDDD0-\uDDFF]'
    },
    {
        'name': 'InPhoenician',
        'astral': '\uD802[\uDD00-\uDD1F]'
    },
    {
        'name': 'InPhonetic_Extensions',
        'bmp': '\u1D00-\u1D7F'
    },
    {
        'name': 'InPhonetic_Extensions_Supplement',
        'bmp': '\u1D80-\u1DBF'
    },
    {
        'name': 'InPlaying_Cards',
        'astral': '\uD83C[\uDCA0-\uDCFF]'
    },
    {
        'name': 'InPrivate_Use_Area',
        'bmp': '\uE000-\uF8FF'
    },
    {
        'name': 'InPsalter_Pahlavi',
        'astral': '\uD802[\uDF80-\uDFAF]'
    },
    {
        'name': 'InRejang',
        'bmp': '\uA930-\uA95F'
    },
    {
        'name': 'InRumi_Numeral_Symbols',
        'astral': '\uD803[\uDE60-\uDE7F]'
    },
    {
        'name': 'InRunic',
        'bmp': '\u16A0-\u16FF'
    },
    {
        'name': 'InSamaritan',
        'bmp': '\u0800-\u083F'
    },
    {
        'name': 'InSaurashtra',
        'bmp': '\uA880-\uA8DF'
    },
    {
        'name': 'InSharada',
        'astral': '\uD804[\uDD80-\uDDDF]'
    },
    {
        'name': 'InShavian',
        'astral': '\uD801[\uDC50-\uDC7F]'
    },
    {
        'name': 'InShorthand_Format_Controls',
        'astral': '\uD82F[\uDCA0-\uDCAF]'
    },
    {
        'name': 'InSiddham',
        'astral': '\uD805[\uDD80-\uDDFF]'
    },
    {
        'name': 'InSinhala',
        'bmp': '\u0D80-\u0DFF'
    },
    {
        'name': 'InSinhala_Archaic_Numbers',
        'astral': '\uD804[\uDDE0-\uDDFF]'
    },
    {
        'name': 'InSmall_Form_Variants',
        'bmp': '\uFE50-\uFE6F'
    },
    {
        'name': 'InSogdian',
        'astral': '\uD803[\uDF30-\uDF6F]'
    },
    {
        'name': 'InSora_Sompeng',
        'astral': '\uD804[\uDCD0-\uDCFF]'
    },
    {
        'name': 'InSoyombo',
        'astral': '\uD806[\uDE50-\uDEAF]'
    },
    {
        'name': 'InSpacing_Modifier_Letters',
        'bmp': '\u02B0-\u02FF'
    },
    {
        'name': 'InSpecials',
        'bmp': '\uFFF0-\uFFFF'
    },
    {
        'name': 'InSundanese',
        'bmp': '\u1B80-\u1BBF'
    },
    {
        'name': 'InSundanese_Supplement',
        'bmp': '\u1CC0-\u1CCF'
    },
    {
        'name': 'InSuperscripts_And_Subscripts',
        'bmp': '\u2070-\u209F'
    },
    {
        'name': 'InSupplemental_Arrows_A',
        'bmp': '\u27F0-\u27FF'
    },
    {
        'name': 'InSupplemental_Arrows_B',
        'bmp': '\u2900-\u297F'
    },
    {
        'name': 'InSupplemental_Arrows_C',
        'astral': '\uD83E[\uDC00-\uDCFF]'
    },
    {
        'name': 'InSupplemental_Mathematical_Operators',
        'bmp': '\u2A00-\u2AFF'
    },
    {
        'name': 'InSupplemental_Punctuation',
        'bmp': '\u2E00-\u2E7F'
    },
    {
        'name': 'InSupplemental_Symbols_And_Pictographs',
        'astral': '\uD83E[\uDD00-\uDDFF]'
    },
    {
        'name': 'InSupplementary_Private_Use_Area_A',
        'astral': '[\uDB80-\uDBBF][\uDC00-\uDFFF]'
    },
    {
        'name': 'InSupplementary_Private_Use_Area_B',
        'astral': '[\uDBC0-\uDBFF][\uDC00-\uDFFF]'
    },
    {
        'name': 'InSutton_SignWriting',
        'astral': '\uD836[\uDC00-\uDEAF]'
    },
    {
        'name': 'InSyloti_Nagri',
        'bmp': '\uA800-\uA82F'
    },
    {
        'name': 'InSyriac',
        'bmp': '\u0700-\u074F'
    },
    {
        'name': 'InSyriac_Supplement',
        'bmp': '\u0860-\u086F'
    },
    {
        'name': 'InTagalog',
        'bmp': '\u1700-\u171F'
    },
    {
        'name': 'InTagbanwa',
        'bmp': '\u1760-\u177F'
    },
    {
        'name': 'InTags',
        'astral': '\uDB40[\uDC00-\uDC7F]'
    },
    {
        'name': 'InTai_Le',
        'bmp': '\u1950-\u197F'
    },
    {
        'name': 'InTai_Tham',
        'bmp': '\u1A20-\u1AAF'
    },
    {
        'name': 'InTai_Viet',
        'bmp': '\uAA80-\uAADF'
    },
    {
        'name': 'InTai_Xuan_Jing_Symbols',
        'astral': '\uD834[\uDF00-\uDF5F]'
    },
    {
        'name': 'InTakri',
        'astral': '\uD805[\uDE80-\uDECF]'
    },
    {
        'name': 'InTamil',
        'bmp': '\u0B80-\u0BFF'
    },
    {
        'name': 'InTangut',
        'astral': '[\uD81C-\uD821][\uDC00-\uDFFF]'
    },
    {
        'name': 'InTangut_Components',
        'astral': '\uD822[\uDC00-\uDEFF]'
    },
    {
        'name': 'InTelugu',
        'bmp': '\u0C00-\u0C7F'
    },
    {
        'name': 'InThaana',
        'bmp': '\u0780-\u07BF'
    },
    {
        'name': 'InThai',
        'bmp': '\u0E00-\u0E7F'
    },
    {
        'name': 'InTibetan',
        'bmp': '\u0F00-\u0FFF'
    },
    {
        'name': 'InTifinagh',
        'bmp': '\u2D30-\u2D7F'
    },
    {
        'name': 'InTirhuta',
        'astral': '\uD805[\uDC80-\uDCDF]'
    },
    {
        'name': 'InTransport_And_Map_Symbols',
        'astral': '\uD83D[\uDE80-\uDEFF]'
    },
    {
        'name': 'InUgaritic',
        'astral': '\uD800[\uDF80-\uDF9F]'
    },
    {
        'name': 'InUnified_Canadian_Aboriginal_Syllabics',
        'bmp': '\u1400-\u167F'
    },
    {
        'name': 'InUnified_Canadian_Aboriginal_Syllabics_Extended',
        'bmp': '\u18B0-\u18FF'
    },
    {
        'name': 'InVai',
        'bmp': '\uA500-\uA63F'
    },
    {
        'name': 'InVariation_Selectors',
        'bmp': '\uFE00-\uFE0F'
    },
    {
        'name': 'InVariation_Selectors_Supplement',
        'astral': '\uDB40[\uDD00-\uDDEF]'
    },
    {
        'name': 'InVedic_Extensions',
        'bmp': '\u1CD0-\u1CFF'
    },
    {
        'name': 'InVertical_Forms',
        'bmp': '\uFE10-\uFE1F'
    },
    {
        'name': 'InWarang_Citi',
        'astral': '\uD806[\uDCA0-\uDCFF]'
    },
    {
        'name': 'InYi_Radicals',
        'bmp': '\uA490-\uA4CF'
    },
    {
        'name': 'InYi_Syllables',
        'bmp': '\uA000-\uA48F'
    },
    {
        'name': 'InYijing_Hexagram_Symbols',
        'bmp': '\u4DC0-\u4DFF'
    },
    {
        'name': 'InZanabazar_Square',
        'astral': '\uD806[\uDE00-\uDE4F]'
    }
];
 
 
/***/ }),
/* 1066 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
 
var _interopRequireDefault = __webpack_require__(116);
 
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;
 
var _categories = _interopRequireDefault(__webpack_require__(1067));
 
/*!
 * XRegExp Unicode Categories 4.2.4
 * <xregexp.com>
 * Steven Levithan (c) 2010-present MIT License
 * Unicode data by Mathias Bynens <mathiasbynens.be>
 */
var _default = function _default(XRegExp) {
  /**
   * Adds support for Unicode's general categories. E.g., `\p{Lu}` or `\p{Uppercase Letter}`. See
   * category descriptions in UAX #44 <http://unicode.org/reports/tr44/#GC_Values_Table>. Token
   * names are case insensitive, and any spaces, hyphens, and underscores are ignored.
   *
   * Uses Unicode 11.0.0.
   *
   * @requires XRegExp, Unicode Base
   */
  Iif (!XRegExp.addUnicodeData) {
    throw new ReferenceError('Unicode Base must be loaded before Unicode Categories');
  }
 
  XRegExp.addUnicodeData(_categories.default);
};
 
exports.default = _default;
module.exports = exports["default"];
 
/***/ }),
/* 1067 */
/***/ (function(module, exports) {
 
module.exports = [
    {
        'name': 'C',
        'alias': 'Other',
        'isBmpLast': true,
        'bmp': '\0-\x1F\x7F-\x9F\xAD\u0378\u0379\u0380-\u0383\u038B\u038D\u03A2\u0530\u0557\u0558\u058B\u058C\u0590\u05C8-\u05CF\u05EB-\u05EE\u05F5-\u0605\u061C\u061D\u06DD\u070E\u070F\u074B\u074C\u07B2-\u07BF\u07FB\u07FC\u082E\u082F\u083F\u085C\u085D\u085F\u086B-\u089F\u08B5\u08BE-\u08D2\u08E2\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA\u09BB\u09C5\u09C6\u09C9\u09CA\u09CF-\u09D6\u09D8-\u09DB\u09DE\u09E4\u09E5\u09FF\u0A00\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A\u0A3B\u0A3D\u0A43-\u0A46\u0A49\u0A4A\u0A4E-\u0A50\u0A52-\u0A58\u0A5D\u0A5F-\u0A65\u0A77-\u0A80\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA\u0ABB\u0AC6\u0ACA\u0ACE\u0ACF\u0AD1-\u0ADF\u0AE4\u0AE5\u0AF2-\u0AF8\u0B00\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A\u0B3B\u0B45\u0B46\u0B49\u0B4A\u0B4E-\u0B55\u0B58-\u0B5B\u0B5E\u0B64\u0B65\u0B78-\u0B81\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BBD\u0BC3-\u0BC5\u0BC9\u0BCE\u0BCF\u0BD1-\u0BD6\u0BD8-\u0BE5\u0BFB-\u0BFF\u0C0D\u0C11\u0C29\u0C3A-\u0C3C\u0C45\u0C49\u0C4E-\u0C54\u0C57\u0C5B-\u0C5F\u0C64\u0C65\u0C70-\u0C77\u0C8D\u0C91\u0CA9\u0CB4\u0CBA\u0CBB\u0CC5\u0CC9\u0CCE-\u0CD4\u0CD7-\u0CDD\u0CDF\u0CE4\u0CE5\u0CF0\u0CF3-\u0CFF\u0D04\u0D0D\u0D11\u0D45\u0D49\u0D50-\u0D53\u0D64\u0D65\u0D80\u0D81\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0DC9\u0DCB-\u0DCE\u0DD5\u0DD7\u0DE0-\u0DE5\u0DF0\u0DF1\u0DF5-\u0E00\u0E3B-\u0E3E\u0E5C-\u0E80\u0E83\u0E85\u0E86\u0E89\u0E8B\u0E8C\u0E8E-\u0E93\u0E98\u0EA0\u0EA4\u0EA6\u0EA8\u0EA9\u0EAC\u0EBA\u0EBE\u0EBF\u0EC5\u0EC7\u0ECE\u0ECF\u0EDA\u0EDB\u0EE0-\u0EFF\u0F48\u0F6D-\u0F70\u0F98\u0FBD\u0FCD\u0FDB-\u0FFF\u10C6\u10C8-\u10CC\u10CE\u10CF\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B\u135C\u137D-\u137F\u139A-\u139F\u13F6\u13F7\u13FE\u13FF\u169D-\u169F\u16F9-\u16FF\u170D\u1715-\u171F\u1737-\u173F\u1754-\u175F\u176D\u1771\u1774-\u177F\u17DE\u17DF\u17EA-\u17EF\u17FA-\u17FF\u180E\u180F\u181A-\u181F\u1879-\u187F\u18AB-\u18AF\u18F6-\u18FF\u191F\u192C-\u192F\u193C-\u193F\u1941-\u1943\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19CF\u19DB-\u19DD\u1A1C\u1A1D\u1A5F\u1A7D\u1A7E\u1A8A-\u1A8F\u1A9A-\u1A9F\u1AAE\u1AAF\u1ABF-\u1AFF\u1B4C-\u1B4F\u1B7D-\u1B7F\u1BF4-\u1BFB\u1C38-\u1C3A\u1C4A-\u1C4C\u1C89-\u1C8F\u1CBB\u1CBC\u1CC8-\u1CCF\u1CFA-\u1CFF\u1DFA\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FC5\u1FD4\u1FD5\u1FDC\u1FF0\u1FF1\u1FF5\u1FFF\u200B-\u200F\u202A-\u202E\u2060-\u206F\u2072\u2073\u208F\u209D-\u209F\u20C0-\u20CF\u20F1-\u20FF\u218C-\u218F\u2427-\u243F\u244B-\u245F\u2B74\u2B75\u2B96\u2B97\u2BC9\u2BFF\u2C2F\u2C5F\u2CF4-\u2CF8\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D71-\u2D7E\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF\u2E4F-\u2E7F\u2E9A\u2EF4-\u2EFF\u2FD6-\u2FEF\u2FFC-\u2FFF\u3040\u3097\u3098\u3100-\u3104\u3130\u318F\u31BB-\u31BF\u31E4-\u31EF\u321F\u32FF\u4DB6-\u4DBF\u9FF0-\u9FFF\uA48D-\uA48F\uA4C7-\uA4CF\uA62C-\uA63F\uA6F8-\uA6FF\uA7BA-\uA7F6\uA82C-\uA82F\uA83A-\uA83F\uA878-\uA87F\uA8C6-\uA8CD\uA8DA-\uA8DF\uA954-\uA95E\uA97D-\uA97F\uA9CE\uA9DA-\uA9DD\uA9FF\uAA37-\uAA3F\uAA4E\uAA4F\uAA5A\uAA5B\uAAC3-\uAADA\uAAF7-\uAB00\uAB07\uAB08\uAB0F\uAB10\uAB17-\uAB1F\uAB27\uAB2F\uAB66-\uAB6F\uABEE\uABEF\uABFA-\uABFF\uD7A4-\uD7AF\uD7C7-\uD7CA\uD7FC-\uF8FF\uFA6E\uFA6F\uFADA-\uFAFF\uFB07-\uFB12\uFB18-\uFB1C\uFB37\uFB3D\uFB3F\uFB42\uFB45\uFBC2-\uFBD2\uFD40-\uFD4F\uFD90\uFD91\uFDC8-\uFDEF\uFDFE\uFDFF\uFE1A-\uFE1F\uFE53\uFE67\uFE6C-\uFE6F\uFE75\uFEFD-\uFF00\uFFBF-\uFFC1\uFFC8\uFFC9\uFFD0\uFFD1\uFFD8\uFFD9\uFFDD-\uFFDF\uFFE7\uFFEF-\uFFFB\uFFFE\uFFFF',
        'astral': '\uD800[\uDC0C\uDC27\uDC3B\uDC3E\uDC4E\uDC4F\uDC5E-\uDC7F\uDCFB-\uDCFF\uDD03-\uDD06\uDD34-\uDD36\uDD8F\uDD9C-\uDD9F\uDDA1-\uDDCF\uDDFE-\uDE7F\uDE9D-\uDE9F\uDED1-\uDEDF\uDEFC-\uDEFF\uDF24-\uDF2C\uDF4B-\uDF4F\uDF7B-\uDF7F\uDF9E\uDFC4-\uDFC7\uDFD6-\uDFFF]|\uD801[\uDC9E\uDC9F\uDCAA-\uDCAF\uDCD4-\uDCD7\uDCFC-\uDCFF\uDD28-\uDD2F\uDD64-\uDD6E\uDD70-\uDDFF\uDF37-\uDF3F\uDF56-\uDF5F\uDF68-\uDFFF]|\uD802[\uDC06\uDC07\uDC09\uDC36\uDC39-\uDC3B\uDC3D\uDC3E\uDC56\uDC9F-\uDCA6\uDCB0-\uDCDF\uDCF3\uDCF6-\uDCFA\uDD1C-\uDD1E\uDD3A-\uDD3E\uDD40-\uDD7F\uDDB8-\uDDBB\uDDD0\uDDD1\uDE04\uDE07-\uDE0B\uDE14\uDE18\uDE36\uDE37\uDE3B-\uDE3E\uDE49-\uDE4F\uDE59-\uDE5F\uDEA0-\uDEBF\uDEE7-\uDEEA\uDEF7-\uDEFF\uDF36-\uDF38\uDF56\uDF57\uDF73-\uDF77\uDF92-\uDF98\uDF9D-\uDFA8\uDFB0-\uDFFF]|\uD803[\uDC49-\uDC7F\uDCB3-\uDCBF\uDCF3-\uDCF9\uDD28-\uDD2F\uDD3A-\uDE5F\uDE7F-\uDEFF\uDF28-\uDF2F\uDF5A-\uDFFF]|\uD804[\uDC4E-\uDC51\uDC70-\uDC7E\uDCBD\uDCC2-\uDCCF\uDCE9-\uDCEF\uDCFA-\uDCFF\uDD35\uDD47-\uDD4F\uDD77-\uDD7F\uDDCE\uDDCF\uDDE0\uDDF5-\uDDFF\uDE12\uDE3F-\uDE7F\uDE87\uDE89\uDE8E\uDE9E\uDEAA-\uDEAF\uDEEB-\uDEEF\uDEFA-\uDEFF\uDF04\uDF0D\uDF0E\uDF11\uDF12\uDF29\uDF31\uDF34\uDF3A\uDF45\uDF46\uDF49\uDF4A\uDF4E\uDF4F\uDF51-\uDF56\uDF58-\uDF5C\uDF64\uDF65\uDF6D-\uDF6F\uDF75-\uDFFF]|\uD805[\uDC5A\uDC5C\uDC5F-\uDC7F\uDCC8-\uDCCF\uDCDA-\uDD7F\uDDB6\uDDB7\uDDDE-\uDDFF\uDE45-\uDE4F\uDE5A-\uDE5F\uDE6D-\uDE7F\uDEB8-\uDEBF\uDECA-\uDEFF\uDF1B\uDF1C\uDF2C-\uDF2F\uDF40-\uDFFF]|\uD806[\uDC3C-\uDC9F\uDCF3-\uDCFE\uDD00-\uDDFF\uDE48-\uDE4F\uDE84\uDE85\uDEA3-\uDEBF\uDEF9-\uDFFF]|\uD807[\uDC09\uDC37\uDC46-\uDC4F\uDC6D-\uDC6F\uDC90\uDC91\uDCA8\uDCB7-\uDCFF\uDD07\uDD0A\uDD37-\uDD39\uDD3B\uDD3E\uDD48-\uDD4F\uDD5A-\uDD5F\uDD66\uDD69\uDD8F\uDD92\uDD99-\uDD9F\uDDAA-\uDEDF\uDEF9-\uDFFF]|\uD808[\uDF9A-\uDFFF]|\uD809[\uDC6F\uDC75-\uDC7F\uDD44-\uDFFF]|[\uD80A\uD80B\uD80E-\uD810\uD812-\uD819\uD823-\uD82B\uD82D\uD82E\uD830-\uD833\uD837\uD839\uD83F\uD87B-\uD87D\uD87F-\uDB3F\uDB41-\uDBFF][\uDC00-\uDFFF]|\uD80D[\uDC2F-\uDFFF]|\uD811[\uDE47-\uDFFF]|\uD81A[\uDE39-\uDE3F\uDE5F\uDE6A-\uDE6D\uDE70-\uDECF\uDEEE\uDEEF\uDEF6-\uDEFF\uDF46-\uDF4F\uDF5A\uDF62\uDF78-\uDF7C\uDF90-\uDFFF]|\uD81B[\uDC00-\uDE3F\uDE9B-\uDEFF\uDF45-\uDF4F\uDF7F-\uDF8E\uDFA0-\uDFDF\uDFE2-\uDFFF]|\uD821[\uDFF2-\uDFFF]|\uD822[\uDEF3-\uDFFF]|\uD82C[\uDD1F-\uDD6F\uDEFC-\uDFFF]|\uD82F[\uDC6B-\uDC6F\uDC7D-\uDC7F\uDC89-\uDC8F\uDC9A\uDC9B\uDCA0-\uDFFF]|\uD834[\uDCF6-\uDCFF\uDD27\uDD28\uDD73-\uDD7A\uDDE9-\uDDFF\uDE46-\uDEDF\uDEF4-\uDEFF\uDF57-\uDF5F\uDF79-\uDFFF]|\uD835[\uDC55\uDC9D\uDCA0\uDCA1\uDCA3\uDCA4\uDCA7\uDCA8\uDCAD\uDCBA\uDCBC\uDCC4\uDD06\uDD0B\uDD0C\uDD15\uDD1D\uDD3A\uDD3F\uDD45\uDD47-\uDD49\uDD51\uDEA6\uDEA7\uDFCC\uDFCD]|\uD836[\uDE8C-\uDE9A\uDEA0\uDEB0-\uDFFF]|\uD838[\uDC07\uDC19\uDC1A\uDC22\uDC25\uDC2B-\uDFFF]|\uD83A[\uDCC5\uDCC6\uDCD7-\uDCFF\uDD4B-\uDD4F\uDD5A-\uDD5D\uDD60-\uDFFF]|\uD83B[\uDC00-\uDC70\uDCB5-\uDDFF\uDE04\uDE20\uDE23\uDE25\uDE26\uDE28\uDE33\uDE38\uDE3A\uDE3C-\uDE41\uDE43-\uDE46\uDE48\uDE4A\uDE4C\uDE50\uDE53\uDE55\uDE56\uDE58\uDE5A\uDE5C\uDE5E\uDE60\uDE63\uDE65\uDE66\uDE6B\uDE73\uDE78\uDE7D\uDE7F\uDE8A\uDE9C-\uDEA0\uDEA4\uDEAA\uDEBC-\uDEEF\uDEF2-\uDFFF]|\uD83C[\uDC2C-\uDC2F\uDC94-\uDC9F\uDCAF\uDCB0\uDCC0\uDCD0\uDCF6-\uDCFF\uDD0D-\uDD0F\uDD6C-\uDD6F\uDDAD-\uDDE5\uDE03-\uDE0F\uDE3C-\uDE3F\uDE49-\uDE4F\uDE52-\uDE5F\uDE66-\uDEFF]|\uD83D[\uDED5-\uDEDF\uDEED-\uDEEF\uDEFA-\uDEFF\uDF74-\uDF7F\uDFD9-\uDFFF]|\uD83E[\uDC0C-\uDC0F\uDC48-\uDC4F\uDC5A-\uDC5F\uDC88-\uDC8F\uDCAE-\uDCFF\uDD0C-\uDD0F\uDD3F\uDD71\uDD72\uDD77-\uDD79\uDD7B\uDDA3-\uDDAF\uDDBA-\uDDBF\uDDC3-\uDDCF\uDE00-\uDE5F\uDE6E-\uDFFF]|\uD869[\uDED7-\uDEFF]|\uD86D[\uDF35-\uDF3F]|\uD86E[\uDC1E\uDC1F]|\uD873[\uDEA2-\uDEAF]|\uD87A[\uDFE1-\uDFFF]|\uD87E[\uDE1E-\uDFFF]|\uDB40[\uDC00-\uDCFF\uDDF0-\uDFFF]'
    },
    {
        'name': 'Cc',
        'alias': 'Control',
        'bmp': '\0-\x1F\x7F-\x9F'
    },
    {
        'name': 'Cf',
        'alias': 'Format',
        'bmp': '\xAD\u0600-\u0605\u061C\u06DD\u070F\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB',
        'astral': '\uD804[\uDCBD\uDCCD]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]'
    },
    {
        'name': 'Cn',
        'alias': 'Unassigned',
        'bmp': '\u0378\u0379\u0380-\u0383\u038B\u038D\u03A2\u0530\u0557\u0558\u058B\u058C\u0590\u05C8-\u05CF\u05EB-\u05EE\u05F5-\u05FF\u061D\u070E\u074B\u074C\u07B2-\u07BF\u07FB\u07FC\u082E\u082F\u083F\u085C\u085D\u085F\u086B-\u089F\u08B5\u08BE-\u08D2\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA\u09BB\u09C5\u09C6\u09C9\u09CA\u09CF-\u09D6\u09D8-\u09DB\u09DE\u09E4\u09E5\u09FF\u0A00\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A\u0A3B\u0A3D\u0A43-\u0A46\u0A49\u0A4A\u0A4E-\u0A50\u0A52-\u0A58\u0A5D\u0A5F-\u0A65\u0A77-\u0A80\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA\u0ABB\u0AC6\u0ACA\u0ACE\u0ACF\u0AD1-\u0ADF\u0AE4\u0AE5\u0AF2-\u0AF8\u0B00\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A\u0B3B\u0B45\u0B46\u0B49\u0B4A\u0B4E-\u0B55\u0B58-\u0B5B\u0B5E\u0B64\u0B65\u0B78-\u0B81\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BBD\u0BC3-\u0BC5\u0BC9\u0BCE\u0BCF\u0BD1-\u0BD6\u0BD8-\u0BE5\u0BFB-\u0BFF\u0C0D\u0C11\u0C29\u0C3A-\u0C3C\u0C45\u0C49\u0C4E-\u0C54\u0C57\u0C5B-\u0C5F\u0C64\u0C65\u0C70-\u0C77\u0C8D\u0C91\u0CA9\u0CB4\u0CBA\u0CBB\u0CC5\u0CC9\u0CCE-\u0CD4\u0CD7-\u0CDD\u0CDF\u0CE4\u0CE5\u0CF0\u0CF3-\u0CFF\u0D04\u0D0D\u0D11\u0D45\u0D49\u0D50-\u0D53\u0D64\u0D65\u0D80\u0D81\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0DC9\u0DCB-\u0DCE\u0DD5\u0DD7\u0DE0-\u0DE5\u0DF0\u0DF1\u0DF5-\u0E00\u0E3B-\u0E3E\u0E5C-\u0E80\u0E83\u0E85\u0E86\u0E89\u0E8B\u0E8C\u0E8E-\u0E93\u0E98\u0EA0\u0EA4\u0EA6\u0EA8\u0EA9\u0EAC\u0EBA\u0EBE\u0EBF\u0EC5\u0EC7\u0ECE\u0ECF\u0EDA\u0EDB\u0EE0-\u0EFF\u0F48\u0F6D-\u0F70\u0F98\u0FBD\u0FCD\u0FDB-\u0FFF\u10C6\u10C8-\u10CC\u10CE\u10CF\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B\u135C\u137D-\u137F\u139A-\u139F\u13F6\u13F7\u13FE\u13FF\u169D-\u169F\u16F9-\u16FF\u170D\u1715-\u171F\u1737-\u173F\u1754-\u175F\u176D\u1771\u1774-\u177F\u17DE\u17DF\u17EA-\u17EF\u17FA-\u17FF\u180F\u181A-\u181F\u1879-\u187F\u18AB-\u18AF\u18F6-\u18FF\u191F\u192C-\u192F\u193C-\u193F\u1941-\u1943\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19CF\u19DB-\u19DD\u1A1C\u1A1D\u1A5F\u1A7D\u1A7E\u1A8A-\u1A8F\u1A9A-\u1A9F\u1AAE\u1AAF\u1ABF-\u1AFF\u1B4C-\u1B4F\u1B7D-\u1B7F\u1BF4-\u1BFB\u1C38-\u1C3A\u1C4A-\u1C4C\u1C89-\u1C8F\u1CBB\u1CBC\u1CC8-\u1CCF\u1CFA-\u1CFF\u1DFA\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FC5\u1FD4\u1FD5\u1FDC\u1FF0\u1FF1\u1FF5\u1FFF\u2065\u2072\u2073\u208F\u209D-\u209F\u20C0-\u20CF\u20F1-\u20FF\u218C-\u218F\u2427-\u243F\u244B-\u245F\u2B74\u2B75\u2B96\u2B97\u2BC9\u2BFF\u2C2F\u2C5F\u2CF4-\u2CF8\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D71-\u2D7E\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF\u2E4F-\u2E7F\u2E9A\u2EF4-\u2EFF\u2FD6-\u2FEF\u2FFC-\u2FFF\u3040\u3097\u3098\u3100-\u3104\u3130\u318F\u31BB-\u31BF\u31E4-\u31EF\u321F\u32FF\u4DB6-\u4DBF\u9FF0-\u9FFF\uA48D-\uA48F\uA4C7-\uA4CF\uA62C-\uA63F\uA6F8-\uA6FF\uA7BA-\uA7F6\uA82C-\uA82F\uA83A-\uA83F\uA878-\uA87F\uA8C6-\uA8CD\uA8DA-\uA8DF\uA954-\uA95E\uA97D-\uA97F\uA9CE\uA9DA-\uA9DD\uA9FF\uAA37-\uAA3F\uAA4E\uAA4F\uAA5A\uAA5B\uAAC3-\uAADA\uAAF7-\uAB00\uAB07\uAB08\uAB0F\uAB10\uAB17-\uAB1F\uAB27\uAB2F\uAB66-\uAB6F\uABEE\uABEF\uABFA-\uABFF\uD7A4-\uD7AF\uD7C7-\uD7CA\uD7FC-\uD7FF\uFA6E\uFA6F\uFADA-\uFAFF\uFB07-\uFB12\uFB18-\uFB1C\uFB37\uFB3D\uFB3F\uFB42\uFB45\uFBC2-\uFBD2\uFD40-\uFD4F\uFD90\uFD91\uFDC8-\uFDEF\uFDFE\uFDFF\uFE1A-\uFE1F\uFE53\uFE67\uFE6C-\uFE6F\uFE75\uFEFD\uFEFE\uFF00\uFFBF-\uFFC1\uFFC8\uFFC9\uFFD0\uFFD1\uFFD8\uFFD9\uFFDD-\uFFDF\uFFE7\uFFEF-\uFFF8\uFFFE\uFFFF',
        'astral': '\uD800[\uDC0C\uDC27\uDC3B\uDC3E\uDC4E\uDC4F\uDC5E-\uDC7F\uDCFB-\uDCFF\uDD03-\uDD06\uDD34-\uDD36\uDD8F\uDD9C-\uDD9F\uDDA1-\uDDCF\uDDFE-\uDE7F\uDE9D-\uDE9F\uDED1-\uDEDF\uDEFC-\uDEFF\uDF24-\uDF2C\uDF4B-\uDF4F\uDF7B-\uDF7F\uDF9E\uDFC4-\uDFC7\uDFD6-\uDFFF]|\uD801[\uDC9E\uDC9F\uDCAA-\uDCAF\uDCD4-\uDCD7\uDCFC-\uDCFF\uDD28-\uDD2F\uDD64-\uDD6E\uDD70-\uDDFF\uDF37-\uDF3F\uDF56-\uDF5F\uDF68-\uDFFF]|\uD802[\uDC06\uDC07\uDC09\uDC36\uDC39-\uDC3B\uDC3D\uDC3E\uDC56\uDC9F-\uDCA6\uDCB0-\uDCDF\uDCF3\uDCF6-\uDCFA\uDD1C-\uDD1E\uDD3A-\uDD3E\uDD40-\uDD7F\uDDB8-\uDDBB\uDDD0\uDDD1\uDE04\uDE07-\uDE0B\uDE14\uDE18\uDE36\uDE37\uDE3B-\uDE3E\uDE49-\uDE4F\uDE59-\uDE5F\uDEA0-\uDEBF\uDEE7-\uDEEA\uDEF7-\uDEFF\uDF36-\uDF38\uDF56\uDF57\uDF73-\uDF77\uDF92-\uDF98\uDF9D-\uDFA8\uDFB0-\uDFFF]|\uD803[\uDC49-\uDC7F\uDCB3-\uDCBF\uDCF3-\uDCF9\uDD28-\uDD2F\uDD3A-\uDE5F\uDE7F-\uDEFF\uDF28-\uDF2F\uDF5A-\uDFFF]|\uD804[\uDC4E-\uDC51\uDC70-\uDC7E\uDCC2-\uDCCC\uDCCE\uDCCF\uDCE9-\uDCEF\uDCFA-\uDCFF\uDD35\uDD47-\uDD4F\uDD77-\uDD7F\uDDCE\uDDCF\uDDE0\uDDF5-\uDDFF\uDE12\uDE3F-\uDE7F\uDE87\uDE89\uDE8E\uDE9E\uDEAA-\uDEAF\uDEEB-\uDEEF\uDEFA-\uDEFF\uDF04\uDF0D\uDF0E\uDF11\uDF12\uDF29\uDF31\uDF34\uDF3A\uDF45\uDF46\uDF49\uDF4A\uDF4E\uDF4F\uDF51-\uDF56\uDF58-\uDF5C\uDF64\uDF65\uDF6D-\uDF6F\uDF75-\uDFFF]|\uD805[\uDC5A\uDC5C\uDC5F-\uDC7F\uDCC8-\uDCCF\uDCDA-\uDD7F\uDDB6\uDDB7\uDDDE-\uDDFF\uDE45-\uDE4F\uDE5A-\uDE5F\uDE6D-\uDE7F\uDEB8-\uDEBF\uDECA-\uDEFF\uDF1B\uDF1C\uDF2C-\uDF2F\uDF40-\uDFFF]|\uD806[\uDC3C-\uDC9F\uDCF3-\uDCFE\uDD00-\uDDFF\uDE48-\uDE4F\uDE84\uDE85\uDEA3-\uDEBF\uDEF9-\uDFFF]|\uD807[\uDC09\uDC37\uDC46-\uDC4F\uDC6D-\uDC6F\uDC90\uDC91\uDCA8\uDCB7-\uDCFF\uDD07\uDD0A\uDD37-\uDD39\uDD3B\uDD3E\uDD48-\uDD4F\uDD5A-\uDD5F\uDD66\uDD69\uDD8F\uDD92\uDD99-\uDD9F\uDDAA-\uDEDF\uDEF9-\uDFFF]|\uD808[\uDF9A-\uDFFF]|\uD809[\uDC6F\uDC75-\uDC7F\uDD44-\uDFFF]|[\uD80A\uD80B\uD80E-\uD810\uD812-\uD819\uD823-\uD82B\uD82D\uD82E\uD830-\uD833\uD837\uD839\uD83F\uD87B-\uD87D\uD87F-\uDB3F\uDB41-\uDB7F][\uDC00-\uDFFF]|\uD80D[\uDC2F-\uDFFF]|\uD811[\uDE47-\uDFFF]|\uD81A[\uDE39-\uDE3F\uDE5F\uDE6A-\uDE6D\uDE70-\uDECF\uDEEE\uDEEF\uDEF6-\uDEFF\uDF46-\uDF4F\uDF5A\uDF62\uDF78-\uDF7C\uDF90-\uDFFF]|\uD81B[\uDC00-\uDE3F\uDE9B-\uDEFF\uDF45-\uDF4F\uDF7F-\uDF8E\uDFA0-\uDFDF\uDFE2-\uDFFF]|\uD821[\uDFF2-\uDFFF]|\uD822[\uDEF3-\uDFFF]|\uD82C[\uDD1F-\uDD6F\uDEFC-\uDFFF]|\uD82F[\uDC6B-\uDC6F\uDC7D-\uDC7F\uDC89-\uDC8F\uDC9A\uDC9B\uDCA4-\uDFFF]|\uD834[\uDCF6-\uDCFF\uDD27\uDD28\uDDE9-\uDDFF\uDE46-\uDEDF\uDEF4-\uDEFF\uDF57-\uDF5F\uDF79-\uDFFF]|\uD835[\uDC55\uDC9D\uDCA0\uDCA1\uDCA3\uDCA4\uDCA7\uDCA8\uDCAD\uDCBA\uDCBC\uDCC4\uDD06\uDD0B\uDD0C\uDD15\uDD1D\uDD3A\uDD3F\uDD45\uDD47-\uDD49\uDD51\uDEA6\uDEA7\uDFCC\uDFCD]|\uD836[\uDE8C-\uDE9A\uDEA0\uDEB0-\uDFFF]|\uD838[\uDC07\uDC19\uDC1A\uDC22\uDC25\uDC2B-\uDFFF]|\uD83A[\uDCC5\uDCC6\uDCD7-\uDCFF\uDD4B-\uDD4F\uDD5A-\uDD5D\uDD60-\uDFFF]|\uD83B[\uDC00-\uDC70\uDCB5-\uDDFF\uDE04\uDE20\uDE23\uDE25\uDE26\uDE28\uDE33\uDE38\uDE3A\uDE3C-\uDE41\uDE43-\uDE46\uDE48\uDE4A\uDE4C\uDE50\uDE53\uDE55\uDE56\uDE58\uDE5A\uDE5C\uDE5E\uDE60\uDE63\uDE65\uDE66\uDE6B\uDE73\uDE78\uDE7D\uDE7F\uDE8A\uDE9C-\uDEA0\uDEA4\uDEAA\uDEBC-\uDEEF\uDEF2-\uDFFF]|\uD83C[\uDC2C-\uDC2F\uDC94-\uDC9F\uDCAF\uDCB0\uDCC0\uDCD0\uDCF6-\uDCFF\uDD0D-\uDD0F\uDD6C-\uDD6F\uDDAD-\uDDE5\uDE03-\uDE0F\uDE3C-\uDE3F\uDE49-\uDE4F\uDE52-\uDE5F\uDE66-\uDEFF]|\uD83D[\uDED5-\uDEDF\uDEED-\uDEEF\uDEFA-\uDEFF\uDF74-\uDF7F\uDFD9-\uDFFF]|\uD83E[\uDC0C-\uDC0F\uDC48-\uDC4F\uDC5A-\uDC5F\uDC88-\uDC8F\uDCAE-\uDCFF\uDD0C-\uDD0F\uDD3F\uDD71\uDD72\uDD77-\uDD79\uDD7B\uDDA3-\uDDAF\uDDBA-\uDDBF\uDDC3-\uDDCF\uDE00-\uDE5F\uDE6E-\uDFFF]|\uD869[\uDED7-\uDEFF]|\uD86D[\uDF35-\uDF3F]|\uD86E[\uDC1E\uDC1F]|\uD873[\uDEA2-\uDEAF]|\uD87A[\uDFE1-\uDFFF]|\uD87E[\uDE1E-\uDFFF]|\uDB40[\uDC00\uDC02-\uDC1F\uDC80-\uDCFF\uDDF0-\uDFFF]|[\uDBBF\uDBFF][\uDFFE\uDFFF]'
    },
    {
        'name': 'Co',
        'alias': 'Private_Use',
        'bmp': '\uE000-\uF8FF',
        'astral': '[\uDB80-\uDBBE\uDBC0-\uDBFE][\uDC00-\uDFFF]|[\uDBBF\uDBFF][\uDC00-\uDFFD]'
    },
    {
        'name': 'Cs',
        'alias': 'Surrogate',
        'bmp': '\uD800-\uDFFF'
    },
    {
        'name': 'L',
        'alias': 'Letter',
        'bmp': 'A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEF\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7B9\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC',
        'astral': '\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF40\uDF42-\uDF49\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD23\uDF00-\uDF1C\uDF27\uDF30-\uDF45]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF1A]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDE9D\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFF1]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]'
    },
    {
        'name': 'LC',
        'alias': 'Cased_Letter',
        'bmp': 'A-Za-z\xB5\xC0-\xD6\xD8-\xF6\xF8-\u01BA\u01BC-\u01BF\u01C4-\u0293\u0295-\u02AF\u0370-\u0373\u0376\u0377\u037B-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0560-\u0588\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FD-\u10FF\u13A0-\u13F5\u13F8-\u13FD\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1D00-\u1D2B\u1D6B-\u1D77\u1D79-\u1D9A\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2134\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2C7B\u2C7E-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\uA640-\uA66D\uA680-\uA69B\uA722-\uA76F\uA771-\uA787\uA78B-\uA78E\uA790-\uA7B9\uA7FA\uAB30-\uAB5A\uAB60-\uAB65\uAB70-\uABBF\uFB00-\uFB06\uFB13-\uFB17\uFF21-\uFF3A\uFF41-\uFF5A',
        'astral': '\uD801[\uDC00-\uDC4F\uDCB0-\uDCD3\uDCD8-\uDCFB]|\uD803[\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD806[\uDCA0-\uDCDF]|\uD81B[\uDE40-\uDE7F]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDD00-\uDD43]'
    },
    {
        'name': 'Ll',
        'alias': 'Lowercase_Letter',
        'bmp': 'a-z\xB5\xDF-\xF6\xF8-\xFF\u0101\u0103\u0105\u0107\u0109\u010B\u010D\u010F\u0111\u0113\u0115\u0117\u0119\u011B\u011D\u011F\u0121\u0123\u0125\u0127\u0129\u012B\u012D\u012F\u0131\u0133\u0135\u0137\u0138\u013A\u013C\u013E\u0140\u0142\u0144\u0146\u0148\u0149\u014B\u014D\u014F\u0151\u0153\u0155\u0157\u0159\u015B\u015D\u015F\u0161\u0163\u0165\u0167\u0169\u016B\u016D\u016F\u0171\u0173\u0175\u0177\u017A\u017C\u017E-\u0180\u0183\u0185\u0188\u018C\u018D\u0192\u0195\u0199-\u019B\u019E\u01A1\u01A3\u01A5\u01A8\u01AA\u01AB\u01AD\u01B0\u01B4\u01B6\u01B9\u01BA\u01BD-\u01BF\u01C6\u01C9\u01CC\u01CE\u01D0\u01D2\u01D4\u01D6\u01D8\u01DA\u01DC\u01DD\u01DF\u01E1\u01E3\u01E5\u01E7\u01E9\u01EB\u01ED\u01EF\u01F0\u01F3\u01F5\u01F9\u01FB\u01FD\u01FF\u0201\u0203\u0205\u0207\u0209\u020B\u020D\u020F\u0211\u0213\u0215\u0217\u0219\u021B\u021D\u021F\u0221\u0223\u0225\u0227\u0229\u022B\u022D\u022F\u0231\u0233-\u0239\u023C\u023F\u0240\u0242\u0247\u0249\u024B\u024D\u024F-\u0293\u0295-\u02AF\u0371\u0373\u0377\u037B-\u037D\u0390\u03AC-\u03CE\u03D0\u03D1\u03D5-\u03D7\u03D9\u03DB\u03DD\u03DF\u03E1\u03E3\u03E5\u03E7\u03E9\u03EB\u03ED\u03EF-\u03F3\u03F5\u03F8\u03FB\u03FC\u0430-\u045F\u0461\u0463\u0465\u0467\u0469\u046B\u046D\u046F\u0471\u0473\u0475\u0477\u0479\u047B\u047D\u047F\u0481\u048B\u048D\u048F\u0491\u0493\u0495\u0497\u0499\u049B\u049D\u049F\u04A1\u04A3\u04A5\u04A7\u04A9\u04AB\u04AD\u04AF\u04B1\u04B3\u04B5\u04B7\u04B9\u04BB\u04BD\u04BF\u04C2\u04C4\u04C6\u04C8\u04CA\u04CC\u04CE\u04CF\u04D1\u04D3\u04D5\u04D7\u04D9\u04DB\u04DD\u04DF\u04E1\u04E3\u04E5\u04E7\u04E9\u04EB\u04ED\u04EF\u04F1\u04F3\u04F5\u04F7\u04F9\u04FB\u04FD\u04FF\u0501\u0503\u0505\u0507\u0509\u050B\u050D\u050F\u0511\u0513\u0515\u0517\u0519\u051B\u051D\u051F\u0521\u0523\u0525\u0527\u0529\u052B\u052D\u052F\u0560-\u0588\u10D0-\u10FA\u10FD-\u10FF\u13F8-\u13FD\u1C80-\u1C88\u1D00-\u1D2B\u1D6B-\u1D77\u1D79-\u1D9A\u1E01\u1E03\u1E05\u1E07\u1E09\u1E0B\u1E0D\u1E0F\u1E11\u1E13\u1E15\u1E17\u1E19\u1E1B\u1E1D\u1E1F\u1E21\u1E23\u1E25\u1E27\u1E29\u1E2B\u1E2D\u1E2F\u1E31\u1E33\u1E35\u1E37\u1E39\u1E3B\u1E3D\u1E3F\u1E41\u1E43\u1E45\u1E47\u1E49\u1E4B\u1E4D\u1E4F\u1E51\u1E53\u1E55\u1E57\u1E59\u1E5B\u1E5D\u1E5F\u1E61\u1E63\u1E65\u1E67\u1E69\u1E6B\u1E6D\u1E6F\u1E71\u1E73\u1E75\u1E77\u1E79\u1E7B\u1E7D\u1E7F\u1E81\u1E83\u1E85\u1E87\u1E89\u1E8B\u1E8D\u1E8F\u1E91\u1E93\u1E95-\u1E9D\u1E9F\u1EA1\u1EA3\u1EA5\u1EA7\u1EA9\u1EAB\u1EAD\u1EAF\u1EB1\u1EB3\u1EB5\u1EB7\u1EB9\u1EBB\u1EBD\u1EBF\u1EC1\u1EC3\u1EC5\u1EC7\u1EC9\u1ECB\u1ECD\u1ECF\u1ED1\u1ED3\u1ED5\u1ED7\u1ED9\u1EDB\u1EDD\u1EDF\u1EE1\u1EE3\u1EE5\u1EE7\u1EE9\u1EEB\u1EED\u1EEF\u1EF1\u1EF3\u1EF5\u1EF7\u1EF9\u1EFB\u1EFD\u1EFF-\u1F07\u1F10-\u1F15\u1F20-\u1F27\u1F30-\u1F37\u1F40-\u1F45\u1F50-\u1F57\u1F60-\u1F67\u1F70-\u1F7D\u1F80-\u1F87\u1F90-\u1F97\u1FA0-\u1FA7\u1FB0-\u1FB4\u1FB6\u1FB7\u1FBE\u1FC2-\u1FC4\u1FC6\u1FC7\u1FD0-\u1FD3\u1FD6\u1FD7\u1FE0-\u1FE7\u1FF2-\u1FF4\u1FF6\u1FF7\u210A\u210E\u210F\u2113\u212F\u2134\u2139\u213C\u213D\u2146-\u2149\u214E\u2184\u2C30-\u2C5E\u2C61\u2C65\u2C66\u2C68\u2C6A\u2C6C\u2C71\u2C73\u2C74\u2C76-\u2C7B\u2C81\u2C83\u2C85\u2C87\u2C89\u2C8B\u2C8D\u2C8F\u2C91\u2C93\u2C95\u2C97\u2C99\u2C9B\u2C9D\u2C9F\u2CA1\u2CA3\u2CA5\u2CA7\u2CA9\u2CAB\u2CAD\u2CAF\u2CB1\u2CB3\u2CB5\u2CB7\u2CB9\u2CBB\u2CBD\u2CBF\u2CC1\u2CC3\u2CC5\u2CC7\u2CC9\u2CCB\u2CCD\u2CCF\u2CD1\u2CD3\u2CD5\u2CD7\u2CD9\u2CDB\u2CDD\u2CDF\u2CE1\u2CE3\u2CE4\u2CEC\u2CEE\u2CF3\u2D00-\u2D25\u2D27\u2D2D\uA641\uA643\uA645\uA647\uA649\uA64B\uA64D\uA64F\uA651\uA653\uA655\uA657\uA659\uA65B\uA65D\uA65F\uA661\uA663\uA665\uA667\uA669\uA66B\uA66D\uA681\uA683\uA685\uA687\uA689\uA68B\uA68D\uA68F\uA691\uA693\uA695\uA697\uA699\uA69B\uA723\uA725\uA727\uA729\uA72B\uA72D\uA72F-\uA731\uA733\uA735\uA737\uA739\uA73B\uA73D\uA73F\uA741\uA743\uA745\uA747\uA749\uA74B\uA74D\uA74F\uA751\uA753\uA755\uA757\uA759\uA75B\uA75D\uA75F\uA761\uA763\uA765\uA767\uA769\uA76B\uA76D\uA76F\uA771-\uA778\uA77A\uA77C\uA77F\uA781\uA783\uA785\uA787\uA78C\uA78E\uA791\uA793-\uA795\uA797\uA799\uA79B\uA79D\uA79F\uA7A1\uA7A3\uA7A5\uA7A7\uA7A9\uA7AF\uA7B5\uA7B7\uA7B9\uA7FA\uAB30-\uAB5A\uAB60-\uAB65\uAB70-\uABBF\uFB00-\uFB06\uFB13-\uFB17\uFF41-\uFF5A',
        'astral': '\uD801[\uDC28-\uDC4F\uDCD8-\uDCFB]|\uD803[\uDCC0-\uDCF2]|\uD806[\uDCC0-\uDCDF]|\uD81B[\uDE60-\uDE7F]|\uD835[\uDC1A-\uDC33\uDC4E-\uDC54\uDC56-\uDC67\uDC82-\uDC9B\uDCB6-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDCCF\uDCEA-\uDD03\uDD1E-\uDD37\uDD52-\uDD6B\uDD86-\uDD9F\uDDBA-\uDDD3\uDDEE-\uDE07\uDE22-\uDE3B\uDE56-\uDE6F\uDE8A-\uDEA5\uDEC2-\uDEDA\uDEDC-\uDEE1\uDEFC-\uDF14\uDF16-\uDF1B\uDF36-\uDF4E\uDF50-\uDF55\uDF70-\uDF88\uDF8A-\uDF8F\uDFAA-\uDFC2\uDFC4-\uDFC9\uDFCB]|\uD83A[\uDD22-\uDD43]'
    },
    {
        'name': 'Lm',
        'alias': 'Modifier_Letter',
        'bmp': '\u02B0-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0374\u037A\u0559\u0640\u06E5\u06E6\u07F4\u07F5\u07FA\u081A\u0824\u0828\u0971\u0E46\u0EC6\u10FC\u17D7\u1843\u1AA7\u1C78-\u1C7D\u1D2C-\u1D6A\u1D78\u1D9B-\u1DBF\u2071\u207F\u2090-\u209C\u2C7C\u2C7D\u2D6F\u2E2F\u3005\u3031-\u3035\u303B\u309D\u309E\u30FC-\u30FE\uA015\uA4F8-\uA4FD\uA60C\uA67F\uA69C\uA69D\uA717-\uA71F\uA770\uA788\uA7F8\uA7F9\uA9CF\uA9E6\uAA70\uAADD\uAAF3\uAAF4\uAB5C-\uAB5F\uFF70\uFF9E\uFF9F',
        'astral': '\uD81A[\uDF40-\uDF43]|\uD81B[\uDF93-\uDF9F\uDFE0\uDFE1]'
    },
    {
        'name': 'Lo',
        'alias': 'Other_Letter',
        'bmp': '\xAA\xBA\u01BB\u01C0-\u01C3\u0294\u05D0-\u05EA\u05EF-\u05F2\u0620-\u063F\u0641-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u0800-\u0815\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0972-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E45\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u1100-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17DC\u1820-\u1842\u1844-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C77\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u2135-\u2138\u2D30-\u2D67\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3006\u303C\u3041-\u3096\u309F\u30A1-\u30FA\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEF\uA000-\uA014\uA016-\uA48C\uA4D0-\uA4F7\uA500-\uA60B\uA610-\uA61F\uA62A\uA62B\uA66E\uA6A0-\uA6E5\uA78F\uA7F7\uA7FB-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9E0-\uA9E4\uA9E7-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA6F\uAA71-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB\uAADC\uAAE0-\uAAEA\uAAF2\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF66-\uFF6F\uFF71-\uFF9D\uFFA0-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC',
        'astral': '\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF40\uDF42-\uDF49\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF]|\uD801[\uDC50-\uDC9D\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDD00-\uDD23\uDF00-\uDF1C\uDF27\uDF30-\uDF45]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF1A]|\uD806[\uDC00-\uDC2B\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDE9D\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50]|\uD821[\uDC00-\uDFF1]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD83A[\uDC00-\uDCC4]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]'
    },
    {
        'name': 'Lt',
        'alias': 'Titlecase_Letter',
        'bmp': '\u01C5\u01C8\u01CB\u01F2\u1F88-\u1F8F\u1F98-\u1F9F\u1FA8-\u1FAF\u1FBC\u1FCC\u1FFC'
    },
    {
        'name': 'Lu',
        'alias': 'Uppercase_Letter',
        'bmp': 'A-Z\xC0-\xD6\xD8-\xDE\u0100\u0102\u0104\u0106\u0108\u010A\u010C\u010E\u0110\u0112\u0114\u0116\u0118\u011A\u011C\u011E\u0120\u0122\u0124\u0126\u0128\u012A\u012C\u012E\u0130\u0132\u0134\u0136\u0139\u013B\u013D\u013F\u0141\u0143\u0145\u0147\u014A\u014C\u014E\u0150\u0152\u0154\u0156\u0158\u015A\u015C\u015E\u0160\u0162\u0164\u0166\u0168\u016A\u016C\u016E\u0170\u0172\u0174\u0176\u0178\u0179\u017B\u017D\u0181\u0182\u0184\u0186\u0187\u0189-\u018B\u018E-\u0191\u0193\u0194\u0196-\u0198\u019C\u019D\u019F\u01A0\u01A2\u01A4\u01A6\u01A7\u01A9\u01AC\u01AE\u01AF\u01B1-\u01B3\u01B5\u01B7\u01B8\u01BC\u01C4\u01C7\u01CA\u01CD\u01CF\u01D1\u01D3\u01D5\u01D7\u01D9\u01DB\u01DE\u01E0\u01E2\u01E4\u01E6\u01E8\u01EA\u01EC\u01EE\u01F1\u01F4\u01F6-\u01F8\u01FA\u01FC\u01FE\u0200\u0202\u0204\u0206\u0208\u020A\u020C\u020E\u0210\u0212\u0214\u0216\u0218\u021A\u021C\u021E\u0220\u0222\u0224\u0226\u0228\u022A\u022C\u022E\u0230\u0232\u023A\u023B\u023D\u023E\u0241\u0243-\u0246\u0248\u024A\u024C\u024E\u0370\u0372\u0376\u037F\u0386\u0388-\u038A\u038C\u038E\u038F\u0391-\u03A1\u03A3-\u03AB\u03CF\u03D2-\u03D4\u03D8\u03DA\u03DC\u03DE\u03E0\u03E2\u03E4\u03E6\u03E8\u03EA\u03EC\u03EE\u03F4\u03F7\u03F9\u03FA\u03FD-\u042F\u0460\u0462\u0464\u0466\u0468\u046A\u046C\u046E\u0470\u0472\u0474\u0476\u0478\u047A\u047C\u047E\u0480\u048A\u048C\u048E\u0490\u0492\u0494\u0496\u0498\u049A\u049C\u049E\u04A0\u04A2\u04A4\u04A6\u04A8\u04AA\u04AC\u04AE\u04B0\u04B2\u04B4\u04B6\u04B8\u04BA\u04BC\u04BE\u04C0\u04C1\u04C3\u04C5\u04C7\u04C9\u04CB\u04CD\u04D0\u04D2\u04D4\u04D6\u04D8\u04DA\u04DC\u04DE\u04E0\u04E2\u04E4\u04E6\u04E8\u04EA\u04EC\u04EE\u04F0\u04F2\u04F4\u04F6\u04F8\u04FA\u04FC\u04FE\u0500\u0502\u0504\u0506\u0508\u050A\u050C\u050E\u0510\u0512\u0514\u0516\u0518\u051A\u051C\u051E\u0520\u0522\u0524\u0526\u0528\u052A\u052C\u052E\u0531-\u0556\u10A0-\u10C5\u10C7\u10CD\u13A0-\u13F5\u1C90-\u1CBA\u1CBD-\u1CBF\u1E00\u1E02\u1E04\u1E06\u1E08\u1E0A\u1E0C\u1E0E\u1E10\u1E12\u1E14\u1E16\u1E18\u1E1A\u1E1C\u1E1E\u1E20\u1E22\u1E24\u1E26\u1E28\u1E2A\u1E2C\u1E2E\u1E30\u1E32\u1E34\u1E36\u1E38\u1E3A\u1E3C\u1E3E\u1E40\u1E42\u1E44\u1E46\u1E48\u1E4A\u1E4C\u1E4E\u1E50\u1E52\u1E54\u1E56\u1E58\u1E5A\u1E5C\u1E5E\u1E60\u1E62\u1E64\u1E66\u1E68\u1E6A\u1E6C\u1E6E\u1E70\u1E72\u1E74\u1E76\u1E78\u1E7A\u1E7C\u1E7E\u1E80\u1E82\u1E84\u1E86\u1E88\u1E8A\u1E8C\u1E8E\u1E90\u1E92\u1E94\u1E9E\u1EA0\u1EA2\u1EA4\u1EA6\u1EA8\u1EAA\u1EAC\u1EAE\u1EB0\u1EB2\u1EB4\u1EB6\u1EB8\u1EBA\u1EBC\u1EBE\u1EC0\u1EC2\u1EC4\u1EC6\u1EC8\u1ECA\u1ECC\u1ECE\u1ED0\u1ED2\u1ED4\u1ED6\u1ED8\u1EDA\u1EDC\u1EDE\u1EE0\u1EE2\u1EE4\u1EE6\u1EE8\u1EEA\u1EEC\u1EEE\u1EF0\u1EF2\u1EF4\u1EF6\u1EF8\u1EFA\u1EFC\u1EFE\u1F08-\u1F0F\u1F18-\u1F1D\u1F28-\u1F2F\u1F38-\u1F3F\u1F48-\u1F4D\u1F59\u1F5B\u1F5D\u1F5F\u1F68-\u1F6F\u1FB8-\u1FBB\u1FC8-\u1FCB\u1FD8-\u1FDB\u1FE8-\u1FEC\u1FF8-\u1FFB\u2102\u2107\u210B-\u210D\u2110-\u2112\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u2130-\u2133\u213E\u213F\u2145\u2183\u2C00-\u2C2E\u2C60\u2C62-\u2C64\u2C67\u2C69\u2C6B\u2C6D-\u2C70\u2C72\u2C75\u2C7E-\u2C80\u2C82\u2C84\u2C86\u2C88\u2C8A\u2C8C\u2C8E\u2C90\u2C92\u2C94\u2C96\u2C98\u2C9A\u2C9C\u2C9E\u2CA0\u2CA2\u2CA4\u2CA6\u2CA8\u2CAA\u2CAC\u2CAE\u2CB0\u2CB2\u2CB4\u2CB6\u2CB8\u2CBA\u2CBC\u2CBE\u2CC0\u2CC2\u2CC4\u2CC6\u2CC8\u2CCA\u2CCC\u2CCE\u2CD0\u2CD2\u2CD4\u2CD6\u2CD8\u2CDA\u2CDC\u2CDE\u2CE0\u2CE2\u2CEB\u2CED\u2CF2\uA640\uA642\uA644\uA646\uA648\uA64A\uA64C\uA64E\uA650\uA652\uA654\uA656\uA658\uA65A\uA65C\uA65E\uA660\uA662\uA664\uA666\uA668\uA66A\uA66C\uA680\uA682\uA684\uA686\uA688\uA68A\uA68C\uA68E\uA690\uA692\uA694\uA696\uA698\uA69A\uA722\uA724\uA726\uA728\uA72A\uA72C\uA72E\uA732\uA734\uA736\uA738\uA73A\uA73C\uA73E\uA740\uA742\uA744\uA746\uA748\uA74A\uA74C\uA74E\uA750\uA752\uA754\uA756\uA758\uA75A\uA75C\uA75E\uA760\uA762\uA764\uA766\uA768\uA76A\uA76C\uA76E\uA779\uA77B\uA77D\uA77E\uA780\uA782\uA784\uA786\uA78B\uA78D\uA790\uA792\uA796\uA798\uA79A\uA79C\uA79E\uA7A0\uA7A2\uA7A4\uA7A6\uA7A8\uA7AA-\uA7AE\uA7B0-\uA7B4\uA7B6\uA7B8\uFF21-\uFF3A',
        'astral': '\uD801[\uDC00-\uDC27\uDCB0-\uDCD3]|\uD803[\uDC80-\uDCB2]|\uD806[\uDCA0-\uDCBF]|\uD81B[\uDE40-\uDE5F]|\uD835[\uDC00-\uDC19\uDC34-\uDC4D\uDC68-\uDC81\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB5\uDCD0-\uDCE9\uDD04\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD38\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD6C-\uDD85\uDDA0-\uDDB9\uDDD4-\uDDED\uDE08-\uDE21\uDE3C-\uDE55\uDE70-\uDE89\uDEA8-\uDEC0\uDEE2-\uDEFA\uDF1C-\uDF34\uDF56-\uDF6E\uDF90-\uDFA8\uDFCA]|\uD83A[\uDD00-\uDD21]'
    },
    {
        'name': 'M',
        'alias': 'Mark',
        'bmp': '\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F',
        'astral': '\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD803[\uDD24-\uDD27\uDF46-\uDF50]|\uD804[\uDC00-\uDC02\uDC38-\uDC46\uDC7F-\uDC82\uDCB0-\uDCBA\uDD00-\uDD02\uDD27-\uDD34\uDD45\uDD46\uDD73\uDD80-\uDD82\uDDB3-\uDDC0\uDDC9-\uDDCC\uDE2C-\uDE37\uDE3E\uDEDF-\uDEEA\uDF00-\uDF03\uDF3B\uDF3C\uDF3E-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF57\uDF62\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC35-\uDC46\uDC5E\uDCB0-\uDCC3\uDDAF-\uDDB5\uDDB8-\uDDC0\uDDDC\uDDDD\uDE30-\uDE40\uDEAB-\uDEB7\uDF1D-\uDF2B]|\uD806[\uDC2C-\uDC3A\uDE01-\uDE0A\uDE33-\uDE39\uDE3B-\uDE3E\uDE47\uDE51-\uDE5B\uDE8A-\uDE99]|\uD807[\uDC2F-\uDC36\uDC38-\uDC3F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD31-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD45\uDD47\uDD8A-\uDD8E\uDD90\uDD91\uDD93-\uDD97\uDEF3-\uDEF6]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF51-\uDF7E\uDF8F-\uDF92]|\uD82F[\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A]|\uDB40[\uDD00-\uDDEF]'
    },
    {
        'name': 'Mc',
        'alias': 'Spacing_Mark',
        'bmp': '\u0903\u093B\u093E-\u0940\u0949-\u094C\u094E\u094F\u0982\u0983\u09BE-\u09C0\u09C7\u09C8\u09CB\u09CC\u09D7\u0A03\u0A3E-\u0A40\u0A83\u0ABE-\u0AC0\u0AC9\u0ACB\u0ACC\u0B02\u0B03\u0B3E\u0B40\u0B47\u0B48\u0B4B\u0B4C\u0B57\u0BBE\u0BBF\u0BC1\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCC\u0BD7\u0C01-\u0C03\u0C41-\u0C44\u0C82\u0C83\u0CBE\u0CC0-\u0CC4\u0CC7\u0CC8\u0CCA\u0CCB\u0CD5\u0CD6\u0D02\u0D03\u0D3E-\u0D40\u0D46-\u0D48\u0D4A-\u0D4C\u0D57\u0D82\u0D83\u0DCF-\u0DD1\u0DD8-\u0DDF\u0DF2\u0DF3\u0F3E\u0F3F\u0F7F\u102B\u102C\u1031\u1038\u103B\u103C\u1056\u1057\u1062-\u1064\u1067-\u106D\u1083\u1084\u1087-\u108C\u108F\u109A-\u109C\u17B6\u17BE-\u17C5\u17C7\u17C8\u1923-\u1926\u1929-\u192B\u1930\u1931\u1933-\u1938\u1A19\u1A1A\u1A55\u1A57\u1A61\u1A63\u1A64\u1A6D-\u1A72\u1B04\u1B35\u1B3B\u1B3D-\u1B41\u1B43\u1B44\u1B82\u1BA1\u1BA6\u1BA7\u1BAA\u1BE7\u1BEA-\u1BEC\u1BEE\u1BF2\u1BF3\u1C24-\u1C2B\u1C34\u1C35\u1CE1\u1CF2\u1CF3\u1CF7\u302E\u302F\uA823\uA824\uA827\uA880\uA881\uA8B4-\uA8C3\uA952\uA953\uA983\uA9B4\uA9B5\uA9BA\uA9BB\uA9BD-\uA9C0\uAA2F\uAA30\uAA33\uAA34\uAA4D\uAA7B\uAA7D\uAAEB\uAAEE\uAAEF\uAAF5\uABE3\uABE4\uABE6\uABE7\uABE9\uABEA\uABEC',
        'astral': '\uD804[\uDC00\uDC02\uDC82\uDCB0-\uDCB2\uDCB7\uDCB8\uDD2C\uDD45\uDD46\uDD82\uDDB3-\uDDB5\uDDBF\uDDC0\uDE2C-\uDE2E\uDE32\uDE33\uDE35\uDEE0-\uDEE2\uDF02\uDF03\uDF3E\uDF3F\uDF41-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF57\uDF62\uDF63]|\uD805[\uDC35-\uDC37\uDC40\uDC41\uDC45\uDCB0-\uDCB2\uDCB9\uDCBB-\uDCBE\uDCC1\uDDAF-\uDDB1\uDDB8-\uDDBB\uDDBE\uDE30-\uDE32\uDE3B\uDE3C\uDE3E\uDEAC\uDEAE\uDEAF\uDEB6\uDF20\uDF21\uDF26]|\uD806[\uDC2C-\uDC2E\uDC38\uDE39\uDE57\uDE58\uDE97]|\uD807[\uDC2F\uDC3E\uDCA9\uDCB1\uDCB4\uDD8A-\uDD8E\uDD93\uDD94\uDD96\uDEF5\uDEF6]|\uD81B[\uDF51-\uDF7E]|\uD834[\uDD65\uDD66\uDD6D-\uDD72]'
    },
    {
        'name': 'Me',
        'alias': 'Enclosing_Mark',
        'bmp': '\u0488\u0489\u1ABE\u20DD-\u20E0\u20E2-\u20E4\uA670-\uA672'
    },
    {
        'name': 'Mn',
        'alias': 'Nonspacing_Mark',
        'bmp': '\u0300-\u036F\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0902\u093A\u093C\u0941-\u0948\u094D\u0951-\u0957\u0962\u0963\u0981\u09BC\u09C1-\u09C4\u09CD\u09E2\u09E3\u09FE\u0A01\u0A02\u0A3C\u0A41\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81\u0A82\u0ABC\u0AC1-\u0AC5\u0AC7\u0AC8\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01\u0B3C\u0B3F\u0B41-\u0B44\u0B4D\u0B56\u0B62\u0B63\u0B82\u0BC0\u0BCD\u0C00\u0C04\u0C3E-\u0C40\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81\u0CBC\u0CBF\u0CC6\u0CCC\u0CCD\u0CE2\u0CE3\u0D00\u0D01\u0D3B\u0D3C\u0D41-\u0D44\u0D4D\u0D62\u0D63\u0DCA\u0DD2-\u0DD4\u0DD6\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F71-\u0F7E\u0F80-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1030\u1032-\u1037\u1039\u103A\u103D\u103E\u1058\u1059\u105E-\u1060\u1071-\u1074\u1082\u1085\u1086\u108D\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4\u17B5\u17B7-\u17BD\u17C6\u17C9-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193B\u1A17\u1A18\u1A1B\u1A56\u1A58-\u1A5E\u1A60\u1A62\u1A65-\u1A6C\u1A73-\u1A7C\u1A7F\u1AB0-\u1ABD\u1B00-\u1B03\u1B34\u1B36-\u1B3A\u1B3C\u1B42\u1B6B-\u1B73\u1B80\u1B81\u1BA2-\u1BA5\u1BA8\u1BA9\u1BAB-\u1BAD\u1BE6\u1BE8\u1BE9\u1BED\u1BEF-\u1BF1\u1C2C-\u1C33\u1C36\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1CF8\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302D\u3099\u309A\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA825\uA826\uA8C4\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA951\uA980-\uA982\uA9B3\uA9B6-\uA9B9\uA9BC\uA9E5\uAA29-\uAA2E\uAA31\uAA32\uAA35\uAA36\uAA43\uAA4C\uAA7C\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEC\uAAED\uAAF6\uABE5\uABE8\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F',
        'astral': '\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD803[\uDD24-\uDD27\uDF46-\uDF50]|\uD804[\uDC01\uDC38-\uDC46\uDC7F-\uDC81\uDCB3-\uDCB6\uDCB9\uDCBA\uDD00-\uDD02\uDD27-\uDD2B\uDD2D-\uDD34\uDD73\uDD80\uDD81\uDDB6-\uDDBE\uDDC9-\uDDCC\uDE2F-\uDE31\uDE34\uDE36\uDE37\uDE3E\uDEDF\uDEE3-\uDEEA\uDF00\uDF01\uDF3B\uDF3C\uDF40\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC38-\uDC3F\uDC42-\uDC44\uDC46\uDC5E\uDCB3-\uDCB8\uDCBA\uDCBF\uDCC0\uDCC2\uDCC3\uDDB2-\uDDB5\uDDBC\uDDBD\uDDBF\uDDC0\uDDDC\uDDDD\uDE33-\uDE3A\uDE3D\uDE3F\uDE40\uDEAB\uDEAD\uDEB0-\uDEB5\uDEB7\uDF1D-\uDF1F\uDF22-\uDF25\uDF27-\uDF2B]|\uD806[\uDC2F-\uDC37\uDC39\uDC3A\uDE01-\uDE0A\uDE33-\uDE38\uDE3B-\uDE3E\uDE47\uDE51-\uDE56\uDE59-\uDE5B\uDE8A-\uDE96\uDE98\uDE99]|\uD807[\uDC30-\uDC36\uDC38-\uDC3D\uDC3F\uDC92-\uDCA7\uDCAA-\uDCB0\uDCB2\uDCB3\uDCB5\uDCB6\uDD31-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD45\uDD47\uDD90\uDD91\uDD95\uDD97\uDEF3\uDEF4]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF8F-\uDF92]|\uD82F[\uDC9D\uDC9E]|\uD834[\uDD67-\uDD69\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A]|\uDB40[\uDD00-\uDDEF]'
    },
    {
        'name': 'N',
        'alias': 'Number',
        'bmp': '0-9\xB2\xB3\xB9\xBC-\xBE\u0660-\u0669\u06F0-\u06F9\u07C0-\u07C9\u0966-\u096F\u09E6-\u09EF\u09F4-\u09F9\u0A66-\u0A6F\u0AE6-\u0AEF\u0B66-\u0B6F\u0B72-\u0B77\u0BE6-\u0BF2\u0C66-\u0C6F\u0C78-\u0C7E\u0CE6-\u0CEF\u0D58-\u0D5E\u0D66-\u0D78\u0DE6-\u0DEF\u0E50-\u0E59\u0ED0-\u0ED9\u0F20-\u0F33\u1040-\u1049\u1090-\u1099\u1369-\u137C\u16EE-\u16F0\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1946-\u194F\u19D0-\u19DA\u1A80-\u1A89\u1A90-\u1A99\u1B50-\u1B59\u1BB0-\u1BB9\u1C40-\u1C49\u1C50-\u1C59\u2070\u2074-\u2079\u2080-\u2089\u2150-\u2182\u2185-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2CFD\u3007\u3021-\u3029\u3038-\u303A\u3192-\u3195\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\uA620-\uA629\uA6E6-\uA6EF\uA830-\uA835\uA8D0-\uA8D9\uA900-\uA909\uA9D0-\uA9D9\uA9F0-\uA9F9\uAA50-\uAA59\uABF0-\uABF9\uFF10-\uFF19',
        'astral': '\uD800[\uDD07-\uDD33\uDD40-\uDD78\uDD8A\uDD8B\uDEE1-\uDEFB\uDF20-\uDF23\uDF41\uDF4A\uDFD1-\uDFD5]|\uD801[\uDCA0-\uDCA9]|\uD802[\uDC58-\uDC5F\uDC79-\uDC7F\uDCA7-\uDCAF\uDCFB-\uDCFF\uDD16-\uDD1B\uDDBC\uDDBD\uDDC0-\uDDCF\uDDD2-\uDDFF\uDE40-\uDE48\uDE7D\uDE7E\uDE9D-\uDE9F\uDEEB-\uDEEF\uDF58-\uDF5F\uDF78-\uDF7F\uDFA9-\uDFAF]|\uD803[\uDCFA-\uDCFF\uDD30-\uDD39\uDE60-\uDE7E\uDF1D-\uDF26\uDF51-\uDF54]|\uD804[\uDC52-\uDC6F\uDCF0-\uDCF9\uDD36-\uDD3F\uDDD0-\uDDD9\uDDE1-\uDDF4\uDEF0-\uDEF9]|\uD805[\uDC50-\uDC59\uDCD0-\uDCD9\uDE50-\uDE59\uDEC0-\uDEC9\uDF30-\uDF3B]|\uD806[\uDCE0-\uDCF2]|\uD807[\uDC50-\uDC6C\uDD50-\uDD59\uDDA0-\uDDA9]|\uD809[\uDC00-\uDC6E]|\uD81A[\uDE60-\uDE69\uDF50-\uDF59\uDF5B-\uDF61]|\uD81B[\uDE80-\uDE96]|\uD834[\uDEE0-\uDEF3\uDF60-\uDF78]|\uD835[\uDFCE-\uDFFF]|\uD83A[\uDCC7-\uDCCF\uDD50-\uDD59]|\uD83B[\uDC71-\uDCAB\uDCAD-\uDCAF\uDCB1-\uDCB4]|\uD83C[\uDD00-\uDD0C]'
    },
    {
        'name': 'Nd',
        'alias': 'Decimal_Number',
        'bmp': '0-9\u0660-\u0669\u06F0-\u06F9\u07C0-\u07C9\u0966-\u096F\u09E6-\u09EF\u0A66-\u0A6F\u0AE6-\u0AEF\u0B66-\u0B6F\u0BE6-\u0BEF\u0C66-\u0C6F\u0CE6-\u0CEF\u0D66-\u0D6F\u0DE6-\u0DEF\u0E50-\u0E59\u0ED0-\u0ED9\u0F20-\u0F29\u1040-\u1049\u1090-\u1099\u17E0-\u17E9\u1810-\u1819\u1946-\u194F\u19D0-\u19D9\u1A80-\u1A89\u1A90-\u1A99\u1B50-\u1B59\u1BB0-\u1BB9\u1C40-\u1C49\u1C50-\u1C59\uA620-\uA629\uA8D0-\uA8D9\uA900-\uA909\uA9D0-\uA9D9\uA9F0-\uA9F9\uAA50-\uAA59\uABF0-\uABF9\uFF10-\uFF19',
        'astral': '\uD801[\uDCA0-\uDCA9]|\uD803[\uDD30-\uDD39]|\uD804[\uDC66-\uDC6F\uDCF0-\uDCF9\uDD36-\uDD3F\uDDD0-\uDDD9\uDEF0-\uDEF9]|\uD805[\uDC50-\uDC59\uDCD0-\uDCD9\uDE50-\uDE59\uDEC0-\uDEC9\uDF30-\uDF39]|\uD806[\uDCE0-\uDCE9]|\uD807[\uDC50-\uDC59\uDD50-\uDD59\uDDA0-\uDDA9]|\uD81A[\uDE60-\uDE69\uDF50-\uDF59]|\uD835[\uDFCE-\uDFFF]|\uD83A[\uDD50-\uDD59]'
    },
    {
        'name': 'Nl',
        'alias': 'Letter_Number',
        'bmp': '\u16EE-\u16F0\u2160-\u2182\u2185-\u2188\u3007\u3021-\u3029\u3038-\u303A\uA6E6-\uA6EF',
        'astral': '\uD800[\uDD40-\uDD74\uDF41\uDF4A\uDFD1-\uDFD5]|\uD809[\uDC00-\uDC6E]'
    },
    {
        'name': 'No',
        'alias': 'Other_Number',
        'bmp': '\xB2\xB3\xB9\xBC-\xBE\u09F4-\u09F9\u0B72-\u0B77\u0BF0-\u0BF2\u0C78-\u0C7E\u0D58-\u0D5E\u0D70-\u0D78\u0F2A-\u0F33\u1369-\u137C\u17F0-\u17F9\u19DA\u2070\u2074-\u2079\u2080-\u2089\u2150-\u215F\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2CFD\u3192-\u3195\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\uA830-\uA835',
        'astral': '\uD800[\uDD07-\uDD33\uDD75-\uDD78\uDD8A\uDD8B\uDEE1-\uDEFB\uDF20-\uDF23]|\uD802[\uDC58-\uDC5F\uDC79-\uDC7F\uDCA7-\uDCAF\uDCFB-\uDCFF\uDD16-\uDD1B\uDDBC\uDDBD\uDDC0-\uDDCF\uDDD2-\uDDFF\uDE40-\uDE48\uDE7D\uDE7E\uDE9D-\uDE9F\uDEEB-\uDEEF\uDF58-\uDF5F\uDF78-\uDF7F\uDFA9-\uDFAF]|\uD803[\uDCFA-\uDCFF\uDE60-\uDE7E\uDF1D-\uDF26\uDF51-\uDF54]|\uD804[\uDC52-\uDC65\uDDE1-\uDDF4]|\uD805[\uDF3A\uDF3B]|\uD806[\uDCEA-\uDCF2]|\uD807[\uDC5A-\uDC6C]|\uD81A[\uDF5B-\uDF61]|\uD81B[\uDE80-\uDE96]|\uD834[\uDEE0-\uDEF3\uDF60-\uDF78]|\uD83A[\uDCC7-\uDCCF]|\uD83B[\uDC71-\uDCAB\uDCAD-\uDCAF\uDCB1-\uDCB4]|\uD83C[\uDD00-\uDD0C]'
    },
    {
        'name': 'P',
        'alias': 'Punctuation',
        'bmp': '!-#%-\\*,-\\/:;\\?@\\[-\\]_\\{\\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4E\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65',
        'astral': '\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDF55-\uDF59]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDF3C-\uDF3E]|\uD806[\uDC3B\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]'
    },
    {
        'name': 'Pc',
        'alias': 'Connector_Punctuation',
        'bmp': '_\u203F\u2040\u2054\uFE33\uFE34\uFE4D-\uFE4F\uFF3F'
    },
    {
        'name': 'Pd',
        'alias': 'Dash_Punctuation',
        'bmp': '\\-\u058A\u05BE\u1400\u1806\u2010-\u2015\u2E17\u2E1A\u2E3A\u2E3B\u2E40\u301C\u3030\u30A0\uFE31\uFE32\uFE58\uFE63\uFF0D'
    },
    {
        'name': 'Pe',
        'alias': 'Close_Punctuation',
        'bmp': '\\)\\]\\}\u0F3B\u0F3D\u169C\u2046\u207E\u208E\u2309\u230B\u232A\u2769\u276B\u276D\u276F\u2771\u2773\u2775\u27C6\u27E7\u27E9\u27EB\u27ED\u27EF\u2984\u2986\u2988\u298A\u298C\u298E\u2990\u2992\u2994\u2996\u2998\u29D9\u29DB\u29FD\u2E23\u2E25\u2E27\u2E29\u3009\u300B\u300D\u300F\u3011\u3015\u3017\u3019\u301B\u301E\u301F\uFD3E\uFE18\uFE36\uFE38\uFE3A\uFE3C\uFE3E\uFE40\uFE42\uFE44\uFE48\uFE5A\uFE5C\uFE5E\uFF09\uFF3D\uFF5D\uFF60\uFF63'
    },
    {
        'name': 'Pf',
        'alias': 'Final_Punctuation',
        'bmp': '\xBB\u2019\u201D\u203A\u2E03\u2E05\u2E0A\u2E0D\u2E1D\u2E21'
    },
    {
        'name': 'Pi',
        'alias': 'Initial_Punctuation',
        'bmp': '\xAB\u2018\u201B\u201C\u201F\u2039\u2E02\u2E04\u2E09\u2E0C\u2E1C\u2E20'
    },
    {
        'name': 'Po',
        'alias': 'Other_Punctuation',
        'bmp': '!-#%-\'\\*,\\.\\/:;\\?@\\\xA1\xA7\xB6\xB7\xBF\u037E\u0387\u055A-\u055F\u0589\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u166D\u166E\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u1805\u1807-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2016\u2017\u2020-\u2027\u2030-\u2038\u203B-\u203E\u2041-\u2043\u2047-\u2051\u2053\u2055-\u205E\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00\u2E01\u2E06-\u2E08\u2E0B\u2E0E-\u2E16\u2E18\u2E19\u2E1B\u2E1E\u2E1F\u2E2A-\u2E2E\u2E30-\u2E39\u2E3C-\u2E3F\u2E41\u2E43-\u2E4E\u3001-\u3003\u303D\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFE10-\uFE16\uFE19\uFE30\uFE45\uFE46\uFE49-\uFE4C\uFE50-\uFE52\uFE54-\uFE57\uFE5F-\uFE61\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF07\uFF0A\uFF0C\uFF0E\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3C\uFF61\uFF64\uFF65',
        'astral': '\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDF55-\uDF59]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDF3C-\uDF3E]|\uD806[\uDC3B\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]'
    },
    {
        'name': 'Ps',
        'alias': 'Open_Punctuation',
        'bmp': '\\(\\[\\{\u0F3A\u0F3C\u169B\u201A\u201E\u2045\u207D\u208D\u2308\u230A\u2329\u2768\u276A\u276C\u276E\u2770\u2772\u2774\u27C5\u27E6\u27E8\u27EA\u27EC\u27EE\u2983\u2985\u2987\u2989\u298B\u298D\u298F\u2991\u2993\u2995\u2997\u29D8\u29DA\u29FC\u2E22\u2E24\u2E26\u2E28\u2E42\u3008\u300A\u300C\u300E\u3010\u3014\u3016\u3018\u301A\u301D\uFD3F\uFE17\uFE35\uFE37\uFE39\uFE3B\uFE3D\uFE3F\uFE41\uFE43\uFE47\uFE59\uFE5B\uFE5D\uFF08\uFF3B\uFF5B\uFF5F\uFF62'
    },
    {
        'name': 'S',
        'alias': 'Symbol',
        'bmp': '\\$\\+<->\\^`\\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20BF\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2B95\u2B98-\u2BC8\u2BCA-\u2BFE\u2CE5-\u2CEA\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u32FE\u3300-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uFB29\uFBB2-\uFBC1\uFDFC\uFDFD\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD',
        'astral': '\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9B\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD805\uDF3F|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDE8\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD83B[\uDCAC\uDCB0\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD10-\uDD6B\uDD70-\uDDAC\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED4\uDEE0-\uDEEC\uDEF0-\uDEF9\uDF00-\uDF73\uDF80-\uDFD8]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDD00-\uDD0B\uDD10-\uDD3E\uDD40-\uDD70\uDD73-\uDD76\uDD7A\uDD7C-\uDDA2\uDDB0-\uDDB9\uDDC0-\uDDC2\uDDD0-\uDDFF\uDE60-\uDE6D]'
    },
    {
        'name': 'Sc',
        'alias': 'Currency_Symbol',
        'bmp': '\\$\xA2-\xA5\u058F\u060B\u07FE\u07FF\u09F2\u09F3\u09FB\u0AF1\u0BF9\u0E3F\u17DB\u20A0-\u20BF\uA838\uFDFC\uFE69\uFF04\uFFE0\uFFE1\uFFE5\uFFE6',
        'astral': '\uD83B\uDCB0'
    },
    {
        'name': 'Sk',
        'alias': 'Modifier_Symbol',
        'bmp': '\\^`\xA8\xAF\xB4\xB8\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u309B\u309C\uA700-\uA716\uA720\uA721\uA789\uA78A\uAB5B\uFBB2-\uFBC1\uFF3E\uFF40\uFFE3',
        'astral': '\uD83C[\uDFFB-\uDFFF]'
    },
    {
        'name': 'Sm',
        'alias': 'Math_Symbol',
        'bmp': '\\+<->\\|~\xAC\xB1\xD7\xF7\u03F6\u0606-\u0608\u2044\u2052\u207A-\u207C\u208A-\u208C\u2118\u2140-\u2144\u214B\u2190-\u2194\u219A\u219B\u21A0\u21A3\u21A6\u21AE\u21CE\u21CF\u21D2\u21D4\u21F4-\u22FF\u2320\u2321\u237C\u239B-\u23B3\u23DC-\u23E1\u25B7\u25C1\u25F8-\u25FF\u266F\u27C0-\u27C4\u27C7-\u27E5\u27F0-\u27FF\u2900-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2AFF\u2B30-\u2B44\u2B47-\u2B4C\uFB29\uFE62\uFE64-\uFE66\uFF0B\uFF1C-\uFF1E\uFF5C\uFF5E\uFFE2\uFFE9-\uFFEC',
        'astral': '\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD83B[\uDEF0\uDEF1]'
    },
    {
        'name': 'So',
        'alias': 'Other_Symbol',
        'bmp': '\xA6\xA9\xAE\xB0\u0482\u058D\u058E\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u09FA\u0B70\u0BF3-\u0BF8\u0BFA\u0C7F\u0D4F\u0D79\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116\u2117\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u214A\u214C\u214D\u214F\u218A\u218B\u2195-\u2199\u219C-\u219F\u21A1\u21A2\u21A4\u21A5\u21A7-\u21AD\u21AF-\u21CD\u21D0\u21D1\u21D3\u21D5-\u21F3\u2300-\u2307\u230C-\u231F\u2322-\u2328\u232B-\u237B\u237D-\u239A\u23B4-\u23DB\u23E2-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u25B6\u25B8-\u25C0\u25C2-\u25F7\u2600-\u266E\u2670-\u2767\u2794-\u27BF\u2800-\u28FF\u2B00-\u2B2F\u2B45\u2B46\u2B4D-\u2B73\u2B76-\u2B95\u2B98-\u2BC8\u2BCA-\u2BFE\u2CE5-\u2CEA\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u32FE\u3300-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA828-\uA82B\uA836\uA837\uA839\uAA77-\uAA79\uFDFD\uFFE4\uFFE8\uFFED\uFFEE\uFFFC\uFFFD',
        'astral': '\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9B\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD805\uDF3F|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDE8\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD83B\uDCAC|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD10-\uDD6B\uDD70-\uDDAC\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFA]|\uD83D[\uDC00-\uDED4\uDEE0-\uDEEC\uDEF0-\uDEF9\uDF00-\uDF73\uDF80-\uDFD8]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDD00-\uDD0B\uDD10-\uDD3E\uDD40-\uDD70\uDD73-\uDD76\uDD7A\uDD7C-\uDDA2\uDDB0-\uDDB9\uDDC0-\uDDC2\uDDD0-\uDDFF\uDE60-\uDE6D]'
    },
    {
        'name': 'Z',
        'alias': 'Separator',
        'bmp': ' \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000'
    },
    {
        'name': 'Zl',
        'alias': 'Line_Separator',
        'bmp': '\u2028'
    },
    {
        'name': 'Zp',
        'alias': 'Paragraph_Separator',
        'bmp': '\u2029'
    },
    {
        'name': 'Zs',
        'alias': 'Space_Separator',
        'bmp': ' \xA0\u1680\u2000-\u200A\u202F\u205F\u3000'
    }
];
 
 
/***/ }),
/* 1068 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
 
var _interopRequireDefault = __webpack_require__(116);
 
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;
 
var _properties = _interopRequireDefault(__webpack_require__(1069));
 
/*!
 * XRegExp Unicode Properties 4.2.4
 * <xregexp.com>
 * Steven Levithan (c) 2012-present MIT License
 * Unicode data by Mathias Bynens <mathiasbynens.be>
 */
var _default = function _default(XRegExp) {
  /**
   * Adds properties to meet the UTS #18 Level 1 RL1.2 requirements for Unicode regex support. See
   * <http://unicode.org/reports/tr18/#RL1.2>. Following are definitions of these properties from
   * UAX #44 <http://unicode.org/reports/tr44/>:
   *
   * - Alphabetic
   *   Characters with the Alphabetic property. Generated from: Lowercase + Uppercase + Lt + Lm +
   *   Lo + Nl + Other_Alphabetic.
   *
   * - Default_Ignorable_Code_Point
   *   For programmatic determination of default ignorable code points. New characters that should
   *   be ignored in rendering (unless explicitly supported) will be assigned in these ranges,
   *   permitting programs to correctly handle the default rendering of such characters when not
   *   otherwise supported.
   *
   * - Lowercase
   *   Characters with the Lowercase property. Generated from: Ll + Other_Lowercase.
   *
   * - Noncharacter_Code_Point
   *   Code points permanently reserved for internal use.
   *
   * - Uppercase
   *   Characters with the Uppercase property. Generated from: Lu + Other_Uppercase.
   *
   * - White_Space
   *   Spaces, separator characters and other control characters which should be treated by
   *   programming languages as "white space" for the purpose of parsing elements.
   *
   * The properties ASCII, Any, and Assigned are also included but are not defined in UAX #44. UTS
   * #18 RL1.2 additionally requires support for Unicode scripts and general categories. These are
   * included in XRegExp's Unicode Categories and Unicode Scripts addons.
   *
   * Token names are case insensitive, and any spaces, hyphens, and underscores are ignored.
   *
   * Uses Unicode 11.0.0.
   *
   * @requires XRegExp, Unicode Base
   */
  Iif (!XRegExp.addUnicodeData) {
    throw new ReferenceError('Unicode Base must be loaded before Unicode Properties');
  }
 
  var unicodeData = _properties.default; // Add non-generated data
 
  unicodeData.push({
    name: 'Assigned',
    // Since this is defined as the inverse of Unicode category Cn (Unassigned), the Unicode
    // Categories addon is required to use this property
    inverseOf: 'Cn'
  });
  XRegExp.addUnicodeData(unicodeData);
};
 
exports.default = _default;
module.exports = exports["default"];
 
/***/ }),
/* 1069 */
/***/ (function(module, exports) {
 
module.exports = [
    {
        'name': 'ASCII',
        'bmp': '\0-\x7F'
    },
    {
        'name': 'Alphabetic',
        'bmp': 'A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0345\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05B0-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05EF-\u05F2\u0610-\u061A\u0620-\u0657\u0659-\u065F\u066E-\u06D3\u06D5-\u06DC\u06E1-\u06E8\u06ED-\u06EF\u06FA-\u06FC\u06FF\u0710-\u073F\u074D-\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0817\u081A-\u082C\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08DF\u08E3-\u08E9\u08F0-\u093B\u093D-\u094C\u094E-\u0950\u0955-\u0963\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD-\u09C4\u09C7\u09C8\u09CB\u09CC\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09F0\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3E-\u0A42\u0A47\u0A48\u0A4B\u0A4C\u0A51\u0A59-\u0A5C\u0A5E\u0A70-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD-\u0AC5\u0AC7-\u0AC9\u0ACB\u0ACC\u0AD0\u0AE0-\u0AE3\u0AF9-\u0AFC\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D-\u0B44\u0B47\u0B48\u0B4B\u0B4C\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCC\u0BD0\u0BD7\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4C\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCC\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4C\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E46\u0E4D\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0ECD\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F71-\u0F81\u0F88-\u0F97\u0F99-\u0FBC\u1000-\u1036\u1038\u103B-\u103F\u1050-\u1062\u1065-\u1068\u106E-\u1086\u108E\u109C\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1713\u1720-\u1733\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17B3\u17B6-\u17C8\u17D7\u17DC\u1820-\u1878\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u1938\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A1B\u1A20-\u1A5E\u1A61-\u1A74\u1AA7\u1B00-\u1B33\u1B35-\u1B43\u1B45-\u1B4B\u1B80-\u1BA9\u1BAC-\u1BAF\u1BBA-\u1BE5\u1BE7-\u1BF1\u1C00-\u1C35\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1D00-\u1DBF\u1DE7-\u1DF4\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u24B6-\u24E9\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEF\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA674-\uA67B\uA67F-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7B9\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA827\uA840-\uA873\uA880-\uA8C3\uA8C5\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA92A\uA930-\uA952\uA960-\uA97C\uA980-\uA9B2\uA9B4-\uA9BF\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA60-\uAA76\uAA7A\uAA7E-\uAABE\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF5\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC',
        'astral': '\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD27\uDF00-\uDF1C\uDF27\uDF30-\uDF45]|\uD804[\uDC00-\uDC45\uDC82-\uDCB8\uDCD0-\uDCE8\uDD00-\uDD32\uDD44-\uDD46\uDD50-\uDD72\uDD76\uDD80-\uDDBF\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE34\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEE8\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D-\uDF44\uDF47\uDF48\uDF4B\uDF4C\uDF50\uDF57\uDF5D-\uDF63]|\uD805[\uDC00-\uDC41\uDC43-\uDC45\uDC47-\uDC4A\uDC80-\uDCC1\uDCC4\uDCC5\uDCC7\uDD80-\uDDB5\uDDB8-\uDDBE\uDDD8-\uDDDD\uDE00-\uDE3E\uDE40\uDE44\uDE80-\uDEB5\uDF00-\uDF1A\uDF1D-\uDF2A]|\uD806[\uDC00-\uDC38\uDCA0-\uDCDF\uDCFF\uDE00-\uDE32\uDE35-\uDE3E\uDE50-\uDE83\uDE86-\uDE97\uDE9D\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC3E\uDC40\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD41\uDD43\uDD46\uDD47\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD8E\uDD90\uDD91\uDD93-\uDD96\uDD98\uDEE0-\uDEF6]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF36\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF44\uDF50-\uDF7E\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFF1]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9E]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43\uDD47]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD83C[\uDD30-\uDD49\uDD50-\uDD69\uDD70-\uDD89]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]'
    },
    {
        'name': 'Any',
        'isBmpLast': true,
        'bmp': '\0-\uFFFF',
        'astral': '[\uD800-\uDBFF][\uDC00-\uDFFF]'
    },
    {
        'name': 'Default_Ignorable_Code_Point',
        'bmp': '\xAD\u034F\u061C\u115F\u1160\u17B4\u17B5\u180B-\u180E\u200B-\u200F\u202A-\u202E\u2060-\u206F\u3164\uFE00-\uFE0F\uFEFF\uFFA0\uFFF0-\uFFF8',
        'astral': '\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|[\uDB40-\uDB43][\uDC00-\uDFFF]'
    },
    {
        'name': 'Lowercase',
        'bmp': 'a-z\xAA\xB5\xBA\xDF-\xF6\xF8-\xFF\u0101\u0103\u0105\u0107\u0109\u010B\u010D\u010F\u0111\u0113\u0115\u0117\u0119\u011B\u011D\u011F\u0121\u0123\u0125\u0127\u0129\u012B\u012D\u012F\u0131\u0133\u0135\u0137\u0138\u013A\u013C\u013E\u0140\u0142\u0144\u0146\u0148\u0149\u014B\u014D\u014F\u0151\u0153\u0155\u0157\u0159\u015B\u015D\u015F\u0161\u0163\u0165\u0167\u0169\u016B\u016D\u016F\u0171\u0173\u0175\u0177\u017A\u017C\u017E-\u0180\u0183\u0185\u0188\u018C\u018D\u0192\u0195\u0199-\u019B\u019E\u01A1\u01A3\u01A5\u01A8\u01AA\u01AB\u01AD\u01B0\u01B4\u01B6\u01B9\u01BA\u01BD-\u01BF\u01C6\u01C9\u01CC\u01CE\u01D0\u01D2\u01D4\u01D6\u01D8\u01DA\u01DC\u01DD\u01DF\u01E1\u01E3\u01E5\u01E7\u01E9\u01EB\u01ED\u01EF\u01F0\u01F3\u01F5\u01F9\u01FB\u01FD\u01FF\u0201\u0203\u0205\u0207\u0209\u020B\u020D\u020F\u0211\u0213\u0215\u0217\u0219\u021B\u021D\u021F\u0221\u0223\u0225\u0227\u0229\u022B\u022D\u022F\u0231\u0233-\u0239\u023C\u023F\u0240\u0242\u0247\u0249\u024B\u024D\u024F-\u0293\u0295-\u02B8\u02C0\u02C1\u02E0-\u02E4\u0345\u0371\u0373\u0377\u037A-\u037D\u0390\u03AC-\u03CE\u03D0\u03D1\u03D5-\u03D7\u03D9\u03DB\u03DD\u03DF\u03E1\u03E3\u03E5\u03E7\u03E9\u03EB\u03ED\u03EF-\u03F3\u03F5\u03F8\u03FB\u03FC\u0430-\u045F\u0461\u0463\u0465\u0467\u0469\u046B\u046D\u046F\u0471\u0473\u0475\u0477\u0479\u047B\u047D\u047F\u0481\u048B\u048D\u048F\u0491\u0493\u0495\u0497\u0499\u049B\u049D\u049F\u04A1\u04A3\u04A5\u04A7\u04A9\u04AB\u04AD\u04AF\u04B1\u04B3\u04B5\u04B7\u04B9\u04BB\u04BD\u04BF\u04C2\u04C4\u04C6\u04C8\u04CA\u04CC\u04CE\u04CF\u04D1\u04D3\u04D5\u04D7\u04D9\u04DB\u04DD\u04DF\u04E1\u04E3\u04E5\u04E7\u04E9\u04EB\u04ED\u04EF\u04F1\u04F3\u04F5\u04F7\u04F9\u04FB\u04FD\u04FF\u0501\u0503\u0505\u0507\u0509\u050B\u050D\u050F\u0511\u0513\u0515\u0517\u0519\u051B\u051D\u051F\u0521\u0523\u0525\u0527\u0529\u052B\u052D\u052F\u0560-\u0588\u10D0-\u10FA\u10FD-\u10FF\u13F8-\u13FD\u1C80-\u1C88\u1D00-\u1DBF\u1E01\u1E03\u1E05\u1E07\u1E09\u1E0B\u1E0D\u1E0F\u1E11\u1E13\u1E15\u1E17\u1E19\u1E1B\u1E1D\u1E1F\u1E21\u1E23\u1E25\u1E27\u1E29\u1E2B\u1E2D\u1E2F\u1E31\u1E33\u1E35\u1E37\u1E39\u1E3B\u1E3D\u1E3F\u1E41\u1E43\u1E45\u1E47\u1E49\u1E4B\u1E4D\u1E4F\u1E51\u1E53\u1E55\u1E57\u1E59\u1E5B\u1E5D\u1E5F\u1E61\u1E63\u1E65\u1E67\u1E69\u1E6B\u1E6D\u1E6F\u1E71\u1E73\u1E75\u1E77\u1E79\u1E7B\u1E7D\u1E7F\u1E81\u1E83\u1E85\u1E87\u1E89\u1E8B\u1E8D\u1E8F\u1E91\u1E93\u1E95-\u1E9D\u1E9F\u1EA1\u1EA3\u1EA5\u1EA7\u1EA9\u1EAB\u1EAD\u1EAF\u1EB1\u1EB3\u1EB5\u1EB7\u1EB9\u1EBB\u1EBD\u1EBF\u1EC1\u1EC3\u1EC5\u1EC7\u1EC9\u1ECB\u1ECD\u1ECF\u1ED1\u1ED3\u1ED5\u1ED7\u1ED9\u1EDB\u1EDD\u1EDF\u1EE1\u1EE3\u1EE5\u1EE7\u1EE9\u1EEB\u1EED\u1EEF\u1EF1\u1EF3\u1EF5\u1EF7\u1EF9\u1EFB\u1EFD\u1EFF-\u1F07\u1F10-\u1F15\u1F20-\u1F27\u1F30-\u1F37\u1F40-\u1F45\u1F50-\u1F57\u1F60-\u1F67\u1F70-\u1F7D\u1F80-\u1F87\u1F90-\u1F97\u1FA0-\u1FA7\u1FB0-\u1FB4\u1FB6\u1FB7\u1FBE\u1FC2-\u1FC4\u1FC6\u1FC7\u1FD0-\u1FD3\u1FD6\u1FD7\u1FE0-\u1FE7\u1FF2-\u1FF4\u1FF6\u1FF7\u2071\u207F\u2090-\u209C\u210A\u210E\u210F\u2113\u212F\u2134\u2139\u213C\u213D\u2146-\u2149\u214E\u2170-\u217F\u2184\u24D0-\u24E9\u2C30-\u2C5E\u2C61\u2C65\u2C66\u2C68\u2C6A\u2C6C\u2C71\u2C73\u2C74\u2C76-\u2C7D\u2C81\u2C83\u2C85\u2C87\u2C89\u2C8B\u2C8D\u2C8F\u2C91\u2C93\u2C95\u2C97\u2C99\u2C9B\u2C9D\u2C9F\u2CA1\u2CA3\u2CA5\u2CA7\u2CA9\u2CAB\u2CAD\u2CAF\u2CB1\u2CB3\u2CB5\u2CB7\u2CB9\u2CBB\u2CBD\u2CBF\u2CC1\u2CC3\u2CC5\u2CC7\u2CC9\u2CCB\u2CCD\u2CCF\u2CD1\u2CD3\u2CD5\u2CD7\u2CD9\u2CDB\u2CDD\u2CDF\u2CE1\u2CE3\u2CE4\u2CEC\u2CEE\u2CF3\u2D00-\u2D25\u2D27\u2D2D\uA641\uA643\uA645\uA647\uA649\uA64B\uA64D\uA64F\uA651\uA653\uA655\uA657\uA659\uA65B\uA65D\uA65F\uA661\uA663\uA665\uA667\uA669\uA66B\uA66D\uA681\uA683\uA685\uA687\uA689\uA68B\uA68D\uA68F\uA691\uA693\uA695\uA697\uA699\uA69B-\uA69D\uA723\uA725\uA727\uA729\uA72B\uA72D\uA72F-\uA731\uA733\uA735\uA737\uA739\uA73B\uA73D\uA73F\uA741\uA743\uA745\uA747\uA749\uA74B\uA74D\uA74F\uA751\uA753\uA755\uA757\uA759\uA75B\uA75D\uA75F\uA761\uA763\uA765\uA767\uA769\uA76B\uA76D\uA76F-\uA778\uA77A\uA77C\uA77F\uA781\uA783\uA785\uA787\uA78C\uA78E\uA791\uA793-\uA795\uA797\uA799\uA79B\uA79D\uA79F\uA7A1\uA7A3\uA7A5\uA7A7\uA7A9\uA7AF\uA7B5\uA7B7\uA7B9\uA7F8-\uA7FA\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABBF\uFB00-\uFB06\uFB13-\uFB17\uFF41-\uFF5A',
        'astral': '\uD801[\uDC28-\uDC4F\uDCD8-\uDCFB]|\uD803[\uDCC0-\uDCF2]|\uD806[\uDCC0-\uDCDF]|\uD81B[\uDE60-\uDE7F]|\uD835[\uDC1A-\uDC33\uDC4E-\uDC54\uDC56-\uDC67\uDC82-\uDC9B\uDCB6-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDCCF\uDCEA-\uDD03\uDD1E-\uDD37\uDD52-\uDD6B\uDD86-\uDD9F\uDDBA-\uDDD3\uDDEE-\uDE07\uDE22-\uDE3B\uDE56-\uDE6F\uDE8A-\uDEA5\uDEC2-\uDEDA\uDEDC-\uDEE1\uDEFC-\uDF14\uDF16-\uDF1B\uDF36-\uDF4E\uDF50-\uDF55\uDF70-\uDF88\uDF8A-\uDF8F\uDFAA-\uDFC2\uDFC4-\uDFC9\uDFCB]|\uD83A[\uDD22-\uDD43]'
    },
    {
        'name': 'Noncharacter_Code_Point',
        'bmp': '\uFDD0-\uFDEF\uFFFE\uFFFF',
        'astral': '[\uD83F\uD87F\uD8BF\uD8FF\uD93F\uD97F\uD9BF\uD9FF\uDA3F\uDA7F\uDABF\uDAFF\uDB3F\uDB7F\uDBBF\uDBFF][\uDFFE\uDFFF]'
    },
    {
        'name': 'Uppercase',
        'bmp': 'A-Z\xC0-\xD6\xD8-\xDE\u0100\u0102\u0104\u0106\u0108\u010A\u010C\u010E\u0110\u0112\u0114\u0116\u0118\u011A\u011C\u011E\u0120\u0122\u0124\u0126\u0128\u012A\u012C\u012E\u0130\u0132\u0134\u0136\u0139\u013B\u013D\u013F\u0141\u0143\u0145\u0147\u014A\u014C\u014E\u0150\u0152\u0154\u0156\u0158\u015A\u015C\u015E\u0160\u0162\u0164\u0166\u0168\u016A\u016C\u016E\u0170\u0172\u0174\u0176\u0178\u0179\u017B\u017D\u0181\u0182\u0184\u0186\u0187\u0189-\u018B\u018E-\u0191\u0193\u0194\u0196-\u0198\u019C\u019D\u019F\u01A0\u01A2\u01A4\u01A6\u01A7\u01A9\u01AC\u01AE\u01AF\u01B1-\u01B3\u01B5\u01B7\u01B8\u01BC\u01C4\u01C7\u01CA\u01CD\u01CF\u01D1\u01D3\u01D5\u01D7\u01D9\u01DB\u01DE\u01E0\u01E2\u01E4\u01E6\u01E8\u01EA\u01EC\u01EE\u01F1\u01F4\u01F6-\u01F8\u01FA\u01FC\u01FE\u0200\u0202\u0204\u0206\u0208\u020A\u020C\u020E\u0210\u0212\u0214\u0216\u0218\u021A\u021C\u021E\u0220\u0222\u0224\u0226\u0228\u022A\u022C\u022E\u0230\u0232\u023A\u023B\u023D\u023E\u0241\u0243-\u0246\u0248\u024A\u024C\u024E\u0370\u0372\u0376\u037F\u0386\u0388-\u038A\u038C\u038E\u038F\u0391-\u03A1\u03A3-\u03AB\u03CF\u03D2-\u03D4\u03D8\u03DA\u03DC\u03DE\u03E0\u03E2\u03E4\u03E6\u03E8\u03EA\u03EC\u03EE\u03F4\u03F7\u03F9\u03FA\u03FD-\u042F\u0460\u0462\u0464\u0466\u0468\u046A\u046C\u046E\u0470\u0472\u0474\u0476\u0478\u047A\u047C\u047E\u0480\u048A\u048C\u048E\u0490\u0492\u0494\u0496\u0498\u049A\u049C\u049E\u04A0\u04A2\u04A4\u04A6\u04A8\u04AA\u04AC\u04AE\u04B0\u04B2\u04B4\u04B6\u04B8\u04BA\u04BC\u04BE\u04C0\u04C1\u04C3\u04C5\u04C7\u04C9\u04CB\u04CD\u04D0\u04D2\u04D4\u04D6\u04D8\u04DA\u04DC\u04DE\u04E0\u04E2\u04E4\u04E6\u04E8\u04EA\u04EC\u04EE\u04F0\u04F2\u04F4\u04F6\u04F8\u04FA\u04FC\u04FE\u0500\u0502\u0504\u0506\u0508\u050A\u050C\u050E\u0510\u0512\u0514\u0516\u0518\u051A\u051C\u051E\u0520\u0522\u0524\u0526\u0528\u052A\u052C\u052E\u0531-\u0556\u10A0-\u10C5\u10C7\u10CD\u13A0-\u13F5\u1C90-\u1CBA\u1CBD-\u1CBF\u1E00\u1E02\u1E04\u1E06\u1E08\u1E0A\u1E0C\u1E0E\u1E10\u1E12\u1E14\u1E16\u1E18\u1E1A\u1E1C\u1E1E\u1E20\u1E22\u1E24\u1E26\u1E28\u1E2A\u1E2C\u1E2E\u1E30\u1E32\u1E34\u1E36\u1E38\u1E3A\u1E3C\u1E3E\u1E40\u1E42\u1E44\u1E46\u1E48\u1E4A\u1E4C\u1E4E\u1E50\u1E52\u1E54\u1E56\u1E58\u1E5A\u1E5C\u1E5E\u1E60\u1E62\u1E64\u1E66\u1E68\u1E6A\u1E6C\u1E6E\u1E70\u1E72\u1E74\u1E76\u1E78\u1E7A\u1E7C\u1E7E\u1E80\u1E82\u1E84\u1E86\u1E88\u1E8A\u1E8C\u1E8E\u1E90\u1E92\u1E94\u1E9E\u1EA0\u1EA2\u1EA4\u1EA6\u1EA8\u1EAA\u1EAC\u1EAE\u1EB0\u1EB2\u1EB4\u1EB6\u1EB8\u1EBA\u1EBC\u1EBE\u1EC0\u1EC2\u1EC4\u1EC6\u1EC8\u1ECA\u1ECC\u1ECE\u1ED0\u1ED2\u1ED4\u1ED6\u1ED8\u1EDA\u1EDC\u1EDE\u1EE0\u1EE2\u1EE4\u1EE6\u1EE8\u1EEA\u1EEC\u1EEE\u1EF0\u1EF2\u1EF4\u1EF6\u1EF8\u1EFA\u1EFC\u1EFE\u1F08-\u1F0F\u1F18-\u1F1D\u1F28-\u1F2F\u1F38-\u1F3F\u1F48-\u1F4D\u1F59\u1F5B\u1F5D\u1F5F\u1F68-\u1F6F\u1FB8-\u1FBB\u1FC8-\u1FCB\u1FD8-\u1FDB\u1FE8-\u1FEC\u1FF8-\u1FFB\u2102\u2107\u210B-\u210D\u2110-\u2112\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u2130-\u2133\u213E\u213F\u2145\u2160-\u216F\u2183\u24B6-\u24CF\u2C00-\u2C2E\u2C60\u2C62-\u2C64\u2C67\u2C69\u2C6B\u2C6D-\u2C70\u2C72\u2C75\u2C7E-\u2C80\u2C82\u2C84\u2C86\u2C88\u2C8A\u2C8C\u2C8E\u2C90\u2C92\u2C94\u2C96\u2C98\u2C9A\u2C9C\u2C9E\u2CA0\u2CA2\u2CA4\u2CA6\u2CA8\u2CAA\u2CAC\u2CAE\u2CB0\u2CB2\u2CB4\u2CB6\u2CB8\u2CBA\u2CBC\u2CBE\u2CC0\u2CC2\u2CC4\u2CC6\u2CC8\u2CCA\u2CCC\u2CCE\u2CD0\u2CD2\u2CD4\u2CD6\u2CD8\u2CDA\u2CDC\u2CDE\u2CE0\u2CE2\u2CEB\u2CED\u2CF2\uA640\uA642\uA644\uA646\uA648\uA64A\uA64C\uA64E\uA650\uA652\uA654\uA656\uA658\uA65A\uA65C\uA65E\uA660\uA662\uA664\uA666\uA668\uA66A\uA66C\uA680\uA682\uA684\uA686\uA688\uA68A\uA68C\uA68E\uA690\uA692\uA694\uA696\uA698\uA69A\uA722\uA724\uA726\uA728\uA72A\uA72C\uA72E\uA732\uA734\uA736\uA738\uA73A\uA73C\uA73E\uA740\uA742\uA744\uA746\uA748\uA74A\uA74C\uA74E\uA750\uA752\uA754\uA756\uA758\uA75A\uA75C\uA75E\uA760\uA762\uA764\uA766\uA768\uA76A\uA76C\uA76E\uA779\uA77B\uA77D\uA77E\uA780\uA782\uA784\uA786\uA78B\uA78D\uA790\uA792\uA796\uA798\uA79A\uA79C\uA79E\uA7A0\uA7A2\uA7A4\uA7A6\uA7A8\uA7AA-\uA7AE\uA7B0-\uA7B4\uA7B6\uA7B8\uFF21-\uFF3A',
        'astral': '\uD801[\uDC00-\uDC27\uDCB0-\uDCD3]|\uD803[\uDC80-\uDCB2]|\uD806[\uDCA0-\uDCBF]|\uD81B[\uDE40-\uDE5F]|\uD835[\uDC00-\uDC19\uDC34-\uDC4D\uDC68-\uDC81\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB5\uDCD0-\uDCE9\uDD04\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD38\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD6C-\uDD85\uDDA0-\uDDB9\uDDD4-\uDDED\uDE08-\uDE21\uDE3C-\uDE55\uDE70-\uDE89\uDEA8-\uDEC0\uDEE2-\uDEFA\uDF1C-\uDF34\uDF56-\uDF6E\uDF90-\uDFA8\uDFCA]|\uD83A[\uDD00-\uDD21]|\uD83C[\uDD30-\uDD49\uDD50-\uDD69\uDD70-\uDD89]'
    },
    {
        'name': 'White_Space',
        'bmp': '\t-\r \x85\xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000'
    }
];
 
 
/***/ }),
/* 1070 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
 
var _interopRequireDefault = __webpack_require__(116);
 
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;
 
var _scripts = _interopRequireDefault(__webpack_require__(1071));
 
/*!
 * XRegExp Unicode Scripts 4.2.4
 * <xregexp.com>
 * Steven Levithan (c) 2010-present MIT License
 * Unicode data by Mathias Bynens <mathiasbynens.be>
 */
var _default = function _default(XRegExp) {
  /**
   * Adds support for all Unicode scripts. E.g., `\p{Latin}`. Token names are case insensitive,
   * and any spaces, hyphens, and underscores are ignored.
   *
   * Uses Unicode 11.0.0.
   *
   * @requires XRegExp, Unicode Base
   */
  Iif (!XRegExp.addUnicodeData) {
    throw new ReferenceError('Unicode Base must be loaded before Unicode Scripts');
  }
 
  XRegExp.addUnicodeData(_scripts.default);
};
 
exports.default = _default;
module.exports = exports["default"];
 
/***/ }),
/* 1071 */
/***/ (function(module, exports) {
 
module.exports = [
    {
        'name': 'Adlam',
        'astral': '\uD83A[\uDD00-\uDD4A\uDD50-\uDD59\uDD5E\uDD5F]'
    },
    {
        'name': 'Ahom',
        'astral': '\uD805[\uDF00-\uDF1A\uDF1D-\uDF2B\uDF30-\uDF3F]'
    },
    {
        'name': 'Anatolian_Hieroglyphs',
        'astral': '\uD811[\uDC00-\uDE46]'
    },
    {
        'name': 'Arabic',
        'bmp': '\u0600-\u0604\u0606-\u060B\u060D-\u061A\u061C\u061E\u0620-\u063F\u0641-\u064A\u0656-\u066F\u0671-\u06DC\u06DE-\u06FF\u0750-\u077F\u08A0-\u08B4\u08B6-\u08BD\u08D3-\u08E1\u08E3-\u08FF\uFB50-\uFBC1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFD\uFE70-\uFE74\uFE76-\uFEFC',
        'astral': '\uD803[\uDE60-\uDE7E]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB\uDEF0\uDEF1]'
    },
    {
        'name': 'Armenian',
        'bmp': '\u0531-\u0556\u0559-\u0588\u058A\u058D-\u058F\uFB13-\uFB17'
    },
    {
        'name': 'Avestan',
        'astral': '\uD802[\uDF00-\uDF35\uDF39-\uDF3F]'
    },
    {
        'name': 'Balinese',
        'bmp': '\u1B00-\u1B4B\u1B50-\u1B7C'
    },
    {
        'name': 'Bamum',
        'bmp': '\uA6A0-\uA6F7',
        'astral': '\uD81A[\uDC00-\uDE38]'
    },
    {
        'name': 'Bassa_Vah',
        'astral': '\uD81A[\uDED0-\uDEED\uDEF0-\uDEF5]'
    },
    {
        'name': 'Batak',
        'bmp': '\u1BC0-\u1BF3\u1BFC-\u1BFF'
    },
    {
        'name': 'Bengali',
        'bmp': '\u0980-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09FE'
    },
    {
        'name': 'Bhaiksuki',
        'astral': '\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC45\uDC50-\uDC6C]'
    },
    {
        'name': 'Bopomofo',
        'bmp': '\u02EA\u02EB\u3105-\u312F\u31A0-\u31BA'
    },
    {
        'name': 'Brahmi',
        'astral': '\uD804[\uDC00-\uDC4D\uDC52-\uDC6F\uDC7F]'
    },
    {
        'name': 'Braille',
        'bmp': '\u2800-\u28FF'
    },
    {
        'name': 'Buginese',
        'bmp': '\u1A00-\u1A1B\u1A1E\u1A1F'
    },
    {
        'name': 'Buhid',
        'bmp': '\u1740-\u1753'
    },
    {
        'name': 'Canadian_Aboriginal',
        'bmp': '\u1400-\u167F\u18B0-\u18F5'
    },
    {
        'name': 'Carian',
        'astral': '\uD800[\uDEA0-\uDED0]'
    },
    {
        'name': 'Caucasian_Albanian',
        'astral': '\uD801[\uDD30-\uDD63\uDD6F]'
    },
    {
        'name': 'Chakma',
        'astral': '\uD804[\uDD00-\uDD34\uDD36-\uDD46]'
    },
    {
        'name': 'Cham',
        'bmp': '\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA5C-\uAA5F'
    },
    {
        'name': 'Cherokee',
        'bmp': '\u13A0-\u13F5\u13F8-\u13FD\uAB70-\uABBF'
    },
    {
        'name': 'Common',
        'bmp': '\0-@\\[-`\\{-\xA9\xAB-\xB9\xBB-\xBF\xD7\xF7\u02B9-\u02DF\u02E5-\u02E9\u02EC-\u02FF\u0374\u037E\u0385\u0387\u0589\u0605\u060C\u061B\u061F\u0640\u06DD\u08E2\u0964\u0965\u0E3F\u0FD5-\u0FD8\u10FB\u16EB-\u16ED\u1735\u1736\u1802\u1803\u1805\u1CD3\u1CE1\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5-\u1CF7\u2000-\u200B\u200E-\u2064\u2066-\u2070\u2074-\u207E\u2080-\u208E\u20A0-\u20BF\u2100-\u2125\u2127-\u2129\u212C-\u2131\u2133-\u214D\u214F-\u215F\u2189-\u218B\u2190-\u2426\u2440-\u244A\u2460-\u27FF\u2900-\u2B73\u2B76-\u2B95\u2B98-\u2BC8\u2BCA-\u2BFE\u2E00-\u2E4E\u2FF0-\u2FFB\u3000-\u3004\u3006\u3008-\u3020\u3030-\u3037\u303C-\u303F\u309B\u309C\u30A0\u30FB\u30FC\u3190-\u319F\u31C0-\u31E3\u3220-\u325F\u327F-\u32CF\u3358-\u33FF\u4DC0-\u4DFF\uA700-\uA721\uA788-\uA78A\uA830-\uA839\uA92E\uA9CF\uAB5B\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFEFF\uFF01-\uFF20\uFF3B-\uFF40\uFF5B-\uFF65\uFF70\uFF9E\uFF9F\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFF9-\uFFFD',
        'astral': '\uD800[\uDD00-\uDD02\uDD07-\uDD33\uDD37-\uDD3F\uDD90-\uDD9B\uDDD0-\uDDFC\uDEE1-\uDEFB]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD66\uDD6A-\uDD7A\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDE8\uDEE0-\uDEF3\uDF00-\uDF56\uDF60-\uDF78]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDFCB\uDFCE-\uDFFF]|\uD83B[\uDC71-\uDCB4]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD00-\uDD0C\uDD10-\uDD6B\uDD70-\uDDAC\uDDE6-\uDDFF\uDE01\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED4\uDEE0-\uDEEC\uDEF0-\uDEF9\uDF00-\uDF73\uDF80-\uDFD8]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDD00-\uDD0B\uDD10-\uDD3E\uDD40-\uDD70\uDD73-\uDD76\uDD7A\uDD7C-\uDDA2\uDDB0-\uDDB9\uDDC0-\uDDC2\uDDD0-\uDDFF\uDE60-\uDE6D]|\uDB40[\uDC01\uDC20-\uDC7F]'
    },
    {
        'name': 'Coptic',
        'bmp': '\u03E2-\u03EF\u2C80-\u2CF3\u2CF9-\u2CFF'
    },
    {
        'name': 'Cuneiform',
        'astral': '\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC70-\uDC74\uDC80-\uDD43]'
    },
    {
        'name': 'Cypriot',
        'astral': '\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F]'
    },
    {
        'name': 'Cyrillic',
        'bmp': '\u0400-\u0484\u0487-\u052F\u1C80-\u1C88\u1D2B\u1D78\u2DE0-\u2DFF\uA640-\uA69F\uFE2E\uFE2F'
    },
    {
        'name': 'Deseret',
        'astral': '\uD801[\uDC00-\uDC4F]'
    },
    {
        'name': 'Devanagari',
        'bmp': '\u0900-\u0950\u0953-\u0963\u0966-\u097F\uA8E0-\uA8FF'
    },
    {
        'name': 'Dogra',
        'astral': '\uD806[\uDC00-\uDC3B]'
    },
    {
        'name': 'Duployan',
        'astral': '\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9C-\uDC9F]'
    },
    {
        'name': 'Egyptian_Hieroglyphs',
        'astral': '\uD80C[\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]'
    },
    {
        'name': 'Elbasan',
        'astral': '\uD801[\uDD00-\uDD27]'
    },
    {
        'name': 'Ethiopic',
        'bmp': '\u1200-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u137C\u1380-\u1399\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E'
    },
    {
        'name': 'Georgian',
        'bmp': '\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u10FF\u1C90-\u1CBA\u1CBD-\u1CBF\u2D00-\u2D25\u2D27\u2D2D'
    },
    {
        'name': 'Glagolitic',
        'bmp': '\u2C00-\u2C2E\u2C30-\u2C5E',
        'astral': '\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]'
    },
    {
        'name': 'Gothic',
        'astral': '\uD800[\uDF30-\uDF4A]'
    },
    {
        'name': 'Grantha',
        'astral': '\uD804[\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]'
    },
    {
        'name': 'Greek',
        'bmp': '\u0370-\u0373\u0375-\u0377\u037A-\u037D\u037F\u0384\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03E1\u03F0-\u03FF\u1D26-\u1D2A\u1D5D-\u1D61\u1D66-\u1D6A\u1DBF\u1F00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FC4\u1FC6-\u1FD3\u1FD6-\u1FDB\u1FDD-\u1FEF\u1FF2-\u1FF4\u1FF6-\u1FFE\u2126\uAB65',
        'astral': '\uD800[\uDD40-\uDD8E\uDDA0]|\uD834[\uDE00-\uDE45]'
    },
    {
        'name': 'Gujarati',
        'bmp': '\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AF1\u0AF9-\u0AFF'
    },
    {
        'name': 'Gunjala_Gondi',
        'astral': '\uD807[\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD8E\uDD90\uDD91\uDD93-\uDD98\uDDA0-\uDDA9]'
    },
    {
        'name': 'Gurmukhi',
        'bmp': '\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A76'
    },
    {
        'name': 'Han',
        'bmp': '\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u3005\u3007\u3021-\u3029\u3038-\u303B\u3400-\u4DB5\u4E00-\u9FEF\uF900-\uFA6D\uFA70-\uFAD9',
        'astral': '[\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]'
    },
    {
        'name': 'Hangul',
        'bmp': '\u1100-\u11FF\u302E\u302F\u3131-\u318E\u3200-\u321E\u3260-\u327E\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uFFA0-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC'
    },
    {
        'name': 'Hanifi_Rohingya',
        'astral': '\uD803[\uDD00-\uDD27\uDD30-\uDD39]'
    },
    {
        'name': 'Hanunoo',
        'bmp': '\u1720-\u1734'
    },
    {
        'name': 'Hatran',
        'astral': '\uD802[\uDCE0-\uDCF2\uDCF4\uDCF5\uDCFB-\uDCFF]'
    },
    {
        'name': 'Hebrew',
        'bmp': '\u0591-\u05C7\u05D0-\u05EA\u05EF-\u05F4\uFB1D-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFB4F'
    },
    {
        'name': 'Hiragana',
        'bmp': '\u3041-\u3096\u309D-\u309F',
        'astral': '\uD82C[\uDC01-\uDD1E]|\uD83C\uDE00'
    },
    {
        'name': 'Imperial_Aramaic',
        'astral': '\uD802[\uDC40-\uDC55\uDC57-\uDC5F]'
    },
    {
        'name': 'Inherited',
        'bmp': '\u0300-\u036F\u0485\u0486\u064B-\u0655\u0670\u0951\u0952\u1AB0-\u1ABE\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1CF8\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u200C\u200D\u20D0-\u20F0\u302A-\u302D\u3099\u309A\uFE00-\uFE0F\uFE20-\uFE2D',
        'astral': '\uD800[\uDDFD\uDEE0]|\uD804\uDF3B|\uD834[\uDD67-\uDD69\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD]|\uDB40[\uDD00-\uDDEF]'
    },
    {
        'name': 'Inscriptional_Pahlavi',
        'astral': '\uD802[\uDF60-\uDF72\uDF78-\uDF7F]'
    },
    {
        'name': 'Inscriptional_Parthian',
        'astral': '\uD802[\uDF40-\uDF55\uDF58-\uDF5F]'
    },
    {
        'name': 'Javanese',
        'bmp': '\uA980-\uA9CD\uA9D0-\uA9D9\uA9DE\uA9DF'
    },
    {
        'name': 'Kaithi',
        'astral': '\uD804[\uDC80-\uDCC1\uDCCD]'
    },
    {
        'name': 'Kannada',
        'bmp': '\u0C80-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2'
    },
    {
        'name': 'Katakana',
        'bmp': '\u30A1-\u30FA\u30FD-\u30FF\u31F0-\u31FF\u32D0-\u32FE\u3300-\u3357\uFF66-\uFF6F\uFF71-\uFF9D',
        'astral': '\uD82C\uDC00'
    },
    {
        'name': 'Kayah_Li',
        'bmp': '\uA900-\uA92D\uA92F'
    },
    {
        'name': 'Kharoshthi',
        'astral': '\uD802[\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE38-\uDE3A\uDE3F-\uDE48\uDE50-\uDE58]'
    },
    {
        'name': 'Khmer',
        'bmp': '\u1780-\u17DD\u17E0-\u17E9\u17F0-\u17F9\u19E0-\u19FF'
    },
    {
        'name': 'Khojki',
        'astral': '\uD804[\uDE00-\uDE11\uDE13-\uDE3E]'
    },
    {
        'name': 'Khudawadi',
        'astral': '\uD804[\uDEB0-\uDEEA\uDEF0-\uDEF9]'
    },
    {
        'name': 'Lao',
        'bmp': '\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF'
    },
    {
        'name': 'Latin',
        'bmp': 'A-Za-z\xAA\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02B8\u02E0-\u02E4\u1D00-\u1D25\u1D2C-\u1D5C\u1D62-\u1D65\u1D6B-\u1D77\u1D79-\u1DBE\u1E00-\u1EFF\u2071\u207F\u2090-\u209C\u212A\u212B\u2132\u214E\u2160-\u2188\u2C60-\u2C7F\uA722-\uA787\uA78B-\uA7B9\uA7F7-\uA7FF\uAB30-\uAB5A\uAB5C-\uAB64\uFB00-\uFB06\uFF21-\uFF3A\uFF41-\uFF5A'
    },
    {
        'name': 'Lepcha',
        'bmp': '\u1C00-\u1C37\u1C3B-\u1C49\u1C4D-\u1C4F'
    },
    {
        'name': 'Limbu',
        'bmp': '\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1940\u1944-\u194F'
    },
    {
        'name': 'Linear_A',
        'astral': '\uD801[\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]'
    },
    {
        'name': 'Linear_B',
        'astral': '\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA]'
    },
    {
        'name': 'Lisu',
        'bmp': '\uA4D0-\uA4FF'
    },
    {
        'name': 'Lycian',
        'astral': '\uD800[\uDE80-\uDE9C]'
    },
    {
        'name': 'Lydian',
        'astral': '\uD802[\uDD20-\uDD39\uDD3F]'
    },
    {
        'name': 'Mahajani',
        'astral': '\uD804[\uDD50-\uDD76]'
    },
    {
        'name': 'Makasar',
        'astral': '\uD807[\uDEE0-\uDEF8]'
    },
    {
        'name': 'Malayalam',
        'bmp': '\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4F\u0D54-\u0D63\u0D66-\u0D7F'
    },
    {
        'name': 'Mandaic',
        'bmp': '\u0840-\u085B\u085E'
    },
    {
        'name': 'Manichaean',
        'astral': '\uD802[\uDEC0-\uDEE6\uDEEB-\uDEF6]'
    },
    {
        'name': 'Marchen',
        'astral': '\uD807[\uDC70-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6]'
    },
    {
        'name': 'Masaram_Gondi',
        'astral': '\uD807[\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]'
    },
    {
        'name': 'Medefaidrin',
        'astral': '\uD81B[\uDE40-\uDE9A]'
    },
    {
        'name': 'Meetei_Mayek',
        'bmp': '\uAAE0-\uAAF6\uABC0-\uABED\uABF0-\uABF9'
    },
    {
        'name': 'Mende_Kikakui',
        'astral': '\uD83A[\uDC00-\uDCC4\uDCC7-\uDCD6]'
    },
    {
        'name': 'Meroitic_Cursive',
        'astral': '\uD802[\uDDA0-\uDDB7\uDDBC-\uDDCF\uDDD2-\uDDFF]'
    },
    {
        'name': 'Meroitic_Hieroglyphs',
        'astral': '\uD802[\uDD80-\uDD9F]'
    },
    {
        'name': 'Miao',
        'astral': '\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F]'
    },
    {
        'name': 'Modi',
        'astral': '\uD805[\uDE00-\uDE44\uDE50-\uDE59]'
    },
    {
        'name': 'Mongolian',
        'bmp': '\u1800\u1801\u1804\u1806-\u180E\u1810-\u1819\u1820-\u1878\u1880-\u18AA',
        'astral': '\uD805[\uDE60-\uDE6C]'
    },
    {
        'name': 'Mro',
        'astral': '\uD81A[\uDE40-\uDE5E\uDE60-\uDE69\uDE6E\uDE6F]'
    },
    {
        'name': 'Multani',
        'astral': '\uD804[\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA9]'
    },
    {
        'name': 'Myanmar',
        'bmp': '\u1000-\u109F\uA9E0-\uA9FE\uAA60-\uAA7F'
    },
    {
        'name': 'Nabataean',
        'astral': '\uD802[\uDC80-\uDC9E\uDCA7-\uDCAF]'
    },
    {
        'name': 'New_Tai_Lue',
        'bmp': '\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u19DE\u19DF'
    },
    {
        'name': 'Newa',
        'astral': '\uD805[\uDC00-\uDC59\uDC5B\uDC5D\uDC5E]'
    },
    {
        'name': 'Nko',
        'bmp': '\u07C0-\u07FA\u07FD-\u07FF'
    },
    {
        'name': 'Nushu',
        'astral': '\uD81B\uDFE1|\uD82C[\uDD70-\uDEFB]'
    },
    {
        'name': 'Ogham',
        'bmp': '\u1680-\u169C'
    },
    {
        'name': 'Ol_Chiki',
        'bmp': '\u1C50-\u1C7F'
    },
    {
        'name': 'Old_Hungarian',
        'astral': '\uD803[\uDC80-\uDCB2\uDCC0-\uDCF2\uDCFA-\uDCFF]'
    },
    {
        'name': 'Old_Italic',
        'astral': '\uD800[\uDF00-\uDF23\uDF2D-\uDF2F]'
    },
    {
        'name': 'Old_North_Arabian',
        'astral': '\uD802[\uDE80-\uDE9F]'
    },
    {
        'name': 'Old_Permic',
        'astral': '\uD800[\uDF50-\uDF7A]'
    },
    {
        'name': 'Old_Persian',
        'astral': '\uD800[\uDFA0-\uDFC3\uDFC8-\uDFD5]'
    },
    {
        'name': 'Old_Sogdian',
        'astral': '\uD803[\uDF00-\uDF27]'
    },
    {
        'name': 'Old_South_Arabian',
        'astral': '\uD802[\uDE60-\uDE7F]'
    },
    {
        'name': 'Old_Turkic',
        'astral': '\uD803[\uDC00-\uDC48]'
    },
    {
        'name': 'Oriya',
        'bmp': '\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B77'
    },
    {
        'name': 'Osage',
        'astral': '\uD801[\uDCB0-\uDCD3\uDCD8-\uDCFB]'
    },
    {
        'name': 'Osmanya',
        'astral': '\uD801[\uDC80-\uDC9D\uDCA0-\uDCA9]'
    },
    {
        'name': 'Pahawh_Hmong',
        'astral': '\uD81A[\uDF00-\uDF45\uDF50-\uDF59\uDF5B-\uDF61\uDF63-\uDF77\uDF7D-\uDF8F]'
    },
    {
        'name': 'Palmyrene',
        'astral': '\uD802[\uDC60-\uDC7F]'
    },
    {
        'name': 'Pau_Cin_Hau',
        'astral': '\uD806[\uDEC0-\uDEF8]'
    },
    {
        'name': 'Phags_Pa',
        'bmp': '\uA840-\uA877'
    },
    {
        'name': 'Phoenician',
        'astral': '\uD802[\uDD00-\uDD1B\uDD1F]'
    },
    {
        'name': 'Psalter_Pahlavi',
        'astral': '\uD802[\uDF80-\uDF91\uDF99-\uDF9C\uDFA9-\uDFAF]'
    },
    {
        'name': 'Rejang',
        'bmp': '\uA930-\uA953\uA95F'
    },
    {
        'name': 'Runic',
        'bmp': '\u16A0-\u16EA\u16EE-\u16F8'
    },
    {
        'name': 'Samaritan',
        'bmp': '\u0800-\u082D\u0830-\u083E'
    },
    {
        'name': 'Saurashtra',
        'bmp': '\uA880-\uA8C5\uA8CE-\uA8D9'
    },
    {
        'name': 'Sharada',
        'astral': '\uD804[\uDD80-\uDDCD\uDDD0-\uDDDF]'
    },
    {
        'name': 'Shavian',
        'astral': '\uD801[\uDC50-\uDC7F]'
    },
    {
        'name': 'Siddham',
        'astral': '\uD805[\uDD80-\uDDB5\uDDB8-\uDDDD]'
    },
    {
        'name': 'SignWriting',
        'astral': '\uD836[\uDC00-\uDE8B\uDE9B-\uDE9F\uDEA1-\uDEAF]'
    },
    {
        'name': 'Sinhala',
        'bmp': '\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2-\u0DF4',
        'astral': '\uD804[\uDDE1-\uDDF4]'
    },
    {
        'name': 'Sogdian',
        'astral': '\uD803[\uDF30-\uDF59]'
    },
    {
        'name': 'Sora_Sompeng',
        'astral': '\uD804[\uDCD0-\uDCE8\uDCF0-\uDCF9]'
    },
    {
        'name': 'Soyombo',
        'astral': '\uD806[\uDE50-\uDE83\uDE86-\uDEA2]'
    },
    {
        'name': 'Sundanese',
        'bmp': '\u1B80-\u1BBF\u1CC0-\u1CC7'
    },
    {
        'name': 'Syloti_Nagri',
        'bmp': '\uA800-\uA82B'
    },
    {
        'name': 'Syriac',
        'bmp': '\u0700-\u070D\u070F-\u074A\u074D-\u074F\u0860-\u086A'
    },
    {
        'name': 'Tagalog',
        'bmp': '\u1700-\u170C\u170E-\u1714'
    },
    {
        'name': 'Tagbanwa',
        'bmp': '\u1760-\u176C\u176E-\u1770\u1772\u1773'
    },
    {
        'name': 'Tai_Le',
        'bmp': '\u1950-\u196D\u1970-\u1974'
    },
    {
        'name': 'Tai_Tham',
        'bmp': '\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA0-\u1AAD'
    },
    {
        'name': 'Tai_Viet',
        'bmp': '\uAA80-\uAAC2\uAADB-\uAADF'
    },
    {
        'name': 'Takri',
        'astral': '\uD805[\uDE80-\uDEB7\uDEC0-\uDEC9]'
    },
    {
        'name': 'Tamil',
        'bmp': '\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BFA'
    },
    {
        'name': 'Tangut',
        'astral': '\uD81B\uDFE0|[\uD81C-\uD820][\uDC00-\uDFFF]|\uD821[\uDC00-\uDFF1]|\uD822[\uDC00-\uDEF2]'
    },
    {
        'name': 'Telugu',
        'bmp': '\u0C00-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C78-\u0C7F'
    },
    {
        'name': 'Thaana',
        'bmp': '\u0780-\u07B1'
    },
    {
        'name': 'Thai',
        'bmp': '\u0E01-\u0E3A\u0E40-\u0E5B'
    },
    {
        'name': 'Tibetan',
        'bmp': '\u0F00-\u0F47\u0F49-\u0F6C\u0F71-\u0F97\u0F99-\u0FBC\u0FBE-\u0FCC\u0FCE-\u0FD4\u0FD9\u0FDA'
    },
    {
        'name': 'Tifinagh',
        'bmp': '\u2D30-\u2D67\u2D6F\u2D70\u2D7F'
    },
    {
        'name': 'Tirhuta',
        'astral': '\uD805[\uDC80-\uDCC7\uDCD0-\uDCD9]'
    },
    {
        'name': 'Ugaritic',
        'astral': '\uD800[\uDF80-\uDF9D\uDF9F]'
    },
    {
        'name': 'Vai',
        'bmp': '\uA500-\uA62B'
    },
    {
        'name': 'Warang_Citi',
        'astral': '\uD806[\uDCA0-\uDCF2\uDCFF]'
    },
    {
        'name': 'Yi',
        'bmp': '\uA000-\uA48C\uA490-\uA4C6'
    },
    {
        'name': 'Zanabazar_Square',
        'astral': '\uD806[\uDE00-\uDE47]'
    }
];
 
 
/***/ }),
/* 1072 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __assign = (this && this.__assign) || Object.assign || function(t) {
    for (var s, i = 1, n = arguments.length; i < n; i++) {
        s = arguments[i];
        for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
            t[p] = s[p];
    }
    return t;
};
Object.defineProperty(exports, "__esModule", { value: true });
var ResultListEvents_1 = __webpack_require__(48);
var Dom_1 = __webpack_require__(0);
var Logger_1 = __webpack_require__(18);
var StorageUtils_1 = __webpack_require__(499);
var ScrollRestorer = /** @class */ (function () {
    function ScrollRestorer(root, queryStateModel) {
        var _this = this;
        this.root = root;
        this.queryStateModel = queryStateModel;
        this.ID = 'ScrollRestorer';
        this.restorationTimeOutInMs = 5000;
        this.tryToScrollIntervalInMs = 50;
        this.scrollInfoStorage = new StorageUtils_1.StorageUtils(this.ID, 'session');
        window.addEventListener('beforeunload', function () {
            _this.saveScrollInfo();
        });
        Dom_1.$$(this.root).on(ResultListEvents_1.ResultListEvents.newResultsDisplayed, function (event, args) {
            return _this.handleNewResultsDisplayed(args);
        });
    }
    ScrollRestorer.prototype.saveScrollInfo = function () {
        var scrollInfo = {
            pageHeight: window.document.body.scrollHeight,
            lastPosition: window.pageYOffset
        };
        var key = this.getKeyForCurrentQuery();
        var prevScrollInfo = this.scrollInfoStorage.load();
        this.scrollInfoStorage.save(__assign({}, prevScrollInfo, (_a = {}, _a[key] = scrollInfo, _a)));
        var _a;
    };
    ScrollRestorer.prototype.handleNewResultsDisplayed = function (args) {
        if (args.isInfiniteScrollEnabled) {
            new Logger_1.Logger(this).warn('Scroll restoration is not supported on result lists with infinite scrolling enabled.');
            this.resetScrollInfo();
            return;
        }
        var scrollInfo = this.getScrollInfoForCurrentQuery();
        this.resetScrollInfo();
        if (scrollInfo && scrollInfo.lastPosition) {
            var stopTryingAt = Date.now() + this.restorationTimeOutInMs;
            this.tryToRestoreScrollPosition(scrollInfo, stopTryingAt);
        }
    };
    ScrollRestorer.prototype.resetScrollInfo = function () {
        this.scrollInfoStorage.remove(this.getKeyForCurrentQuery());
    };
    ScrollRestorer.prototype.tryToRestoreScrollPosition = function (scrollInfo, stopAt) {
        var _this = this;
        var html = window.document.documentElement;
        var body = window.document.body;
        var documentHeight = Math.max(body.scrollHeight, body.offsetHeight, html.clientHeight, html.scrollHeight, html.offsetHeight);
        clearTimeout(this.timeoutHandle);
        if (documentHeight >= scrollInfo.pageHeight || Date.now() >= stopAt) {
            window.scrollTo(0, scrollInfo.lastPosition);
        }
        else {
            this.timeoutHandle = setTimeout(function () { return _this.tryToRestoreScrollPosition(scrollInfo, stopAt); }, this.tryToScrollIntervalInMs);
        }
    };
    ScrollRestorer.prototype.getScrollInfoForCurrentQuery = function () {
        var scrollInfo = this.scrollInfoStorage.load() || {};
        return scrollInfo[this.getKeyForCurrentQuery()];
    };
    ScrollRestorer.prototype.getKeyForCurrentQuery = function () {
        return JSON.stringify(this.queryStateModel.getAttributes());
    };
    return ScrollRestorer;
}());
exports.ScrollRestorer = ScrollRestorer;
 
 
/***/ }),
/* 1073 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __assign = (this && this.__assign) || Object.assign || function(t) {
    for (var s, i = 1, n = arguments.length; i < n; i++) {
        s = arguments[i];
        for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
            t[p] = s[p];
    }
    return t;
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { Iif (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        Iif (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            Iif (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
            Iif (y = 0, t) op = [0, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    Eif (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        Iif (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
Object.defineProperty(exports, "__esModule", { value: true });
var RankingInfoParser_1 = __webpack_require__(225);
var underscore_1 = __webpack_require__(1);
var TableBuilder_1 = __webpack_require__(62);
var Dom_1 = __webpack_require__(0);
var RankingInfoTable = /** @class */ (function () {
    function RankingInfoTable(results, bindings) {
        this.results = results;
        this.bindings = bindings;
    }
    RankingInfoTable.prototype.build = function () {
        return __awaiter(this, void 0, void 0, function () {
            var _this = this;
            var container, agGridElement, topLevelInfoThatHaveAtLeastANonZeroValue, containsKeywordRankingInfo, data, gridOptions;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        container = Dom_1.$$('div');
                        agGridElement = Dom_1.$$('div', {
                            className: 'ag-theme-fresh'
                        });
                        container.append(agGridElement.el);
                        topLevelInfoThatHaveAtLeastANonZeroValue = [];
                        containsKeywordRankingInfo = false;
                        this.results.forEach(function (result) {
                            var rankingInfo = RankingInfoParser_1.parseRankingInfo(result.rankingInfo);
                            containsKeywordRankingInfo = rankingInfo.termsWeight != null;
                            Eif (rankingInfo && rankingInfo.documentWeights) {
                                underscore_1.each(rankingInfo.documentWeights, function (value, key) {
                                    if (value != 0) {
                                        topLevelInfoThatHaveAtLeastANonZeroValue.push(key);
                                    }
                                });
                            }
                        });
                        topLevelInfoThatHaveAtLeastANonZeroValue = underscore_1.uniq(topLevelInfoThatHaveAtLeastANonZeroValue);
                        data = this.results.map(function (result) {
                            var rankingInfo = RankingInfoParser_1.parseRankingInfo(result.rankingInfo);
                            Eif (rankingInfo) {
                                var documentsWeights = _this.buildTopLevelDocumentsWeights(rankingInfo, topLevelInfoThatHaveAtLeastANonZeroValue);
                                var breakdownPerTerm_1 = {};
                                var onlyTopFewKeywords_1 = {};
                                underscore_1.chain(rankingInfo.termsWeight)
                                    .keys()
                                    .sortBy(function (key) {
                                    var total = underscore_1.reduce(rankingInfo.termsWeight[key].Weights, function (memo, value) { return memo + value; }, 0);
                                    return total;
                                })
                                    .reverse()
                                    .first(3)
                                    .each(function (key) {
                                    onlyTopFewKeywords_1[key] = rankingInfo.termsWeight[key];
                                });
                                underscore_1.each(onlyTopFewKeywords_1, function (value, key) {
                                    var builtKey = "Keyword: " + key;
                                    breakdownPerTerm_1[builtKey] = {
                                        content: RankingInfoParser_1.buildListOfTermsElement(value.Weights).el.outerHTML,
                                        cellRenderer: TableBuilder_1.GenericHtmlRenderer,
                                        width: 200
                                    };
                                });
                                var totalContent = rankingInfo.totalWeight ? rankingInfo.totalWeight : 0;
                                return __assign({}, TableBuilder_1.TableBuilder.thumbnailCell(result, _this.bindings), documentsWeights, breakdownPerTerm_1, { Total: { content: totalContent || 0 } });
                            }
                            return {};
                        });
                        return [4 /*yield*/, new TableBuilder_1.TableBuilder().build(data, agGridElement, {
                                getRowHeight: function () {
                                    return containsKeywordRankingInfo ? 400 : 250;
                                },
                                onGridReady: function (params) {
                                    setTimeout(function () {
                                        Eif (params) {
                                            params.api.sizeColumnsToFit();
                                            params.api.setSortModel([{ colId: 'Total', sort: 'desc' }]);
                                        }
                                    }, 0);
                                }
                            })];
                    case 1:
                        gridOptions = (_a.sent()).gridOptions;
                        this.gridOptions = gridOptions;
                        return [2 /*return*/, container];
                }
            });
        });
    };
    RankingInfoTable.prototype.buildTopLevelDocumentsWeights = function (rankingInfo, hasAtLeastOneNonZeroValue) {
        var documentWeights = {};
        underscore_1.each(rankingInfo.documentWeights || {}, function (value, key) {
            if (underscore_1.contains(hasAtLeastOneNonZeroValue, key))
                documentWeights[key] = { content: value || 0 };
        });
        return documentWeights;
    };
    return RankingInfoTable;
}());
exports.RankingInfoTable = RankingInfoTable;
 
 
/***/ }),
/* 1074 */
/***/ (function(module, exports) {
 
module.exports = function(module) {
	Eif(!module.webpackPolyfill) {
		module.deprecate = function() {};
		module.paths = [];
		// module.parent = undefined by default
		Eif(!module.children) module.children = [];
		Object.defineProperty(module, "loaded", {
			enumerable: true,
			get: function() {
				return module.l;
			}
		});
		Object.defineProperty(module, "id", {
			enumerable: true,
			get: function() {
				return module.i;
			}
		});
		module.webpackPolyfill = 1;
	}
	return module;
};
 
 
/***/ }),
/* 1075 */
/***/ (function(module, exports, __webpack_require__) {
 
var map = {
	"./af": 501,
	"./af.js": 501,
	"./ar": 502,
	"./ar-dz": 503,
	"./ar-dz.js": 503,
	"./ar-kw": 504,
	"./ar-kw.js": 504,
	"./ar-ly": 505,
	"./ar-ly.js": 505,
	"./ar-ma": 506,
	"./ar-ma.js": 506,
	"./ar-sa": 507,
	"./ar-sa.js": 507,
	"./ar-tn": 508,
	"./ar-tn.js": 508,
	"./ar.js": 502,
	"./az": 509,
	"./az.js": 509,
	"./be": 510,
	"./be.js": 510,
	"./bg": 511,
	"./bg.js": 511,
	"./bm": 512,
	"./bm.js": 512,
	"./bn": 513,
	"./bn-bd": 514,
	"./bn-bd.js": 514,
	"./bn.js": 513,
	"./bo": 515,
	"./bo.js": 515,
	"./br": 516,
	"./br.js": 516,
	"./bs": 517,
	"./bs.js": 517,
	"./ca": 518,
	"./ca.js": 518,
	"./cs": 519,
	"./cs.js": 519,
	"./cv": 520,
	"./cv.js": 520,
	"./cy": 521,
	"./cy.js": 521,
	"./da": 522,
	"./da.js": 522,
	"./de": 523,
	"./de-at": 524,
	"./de-at.js": 524,
	"./de-ch": 525,
	"./de-ch.js": 525,
	"./de.js": 523,
	"./dv": 526,
	"./dv.js": 526,
	"./el": 527,
	"./el.js": 527,
	"./en-au": 528,
	"./en-au.js": 528,
	"./en-ca": 529,
	"./en-ca.js": 529,
	"./en-gb": 530,
	"./en-gb.js": 530,
	"./en-ie": 531,
	"./en-ie.js": 531,
	"./en-il": 532,
	"./en-il.js": 532,
	"./en-in": 533,
	"./en-in.js": 533,
	"./en-nz": 534,
	"./en-nz.js": 534,
	"./en-sg": 535,
	"./en-sg.js": 535,
	"./eo": 536,
	"./eo.js": 536,
	"./es": 537,
	"./es-do": 538,
	"./es-do.js": 538,
	"./es-mx": 539,
	"./es-mx.js": 539,
	"./es-us": 540,
	"./es-us.js": 540,
	"./es.js": 537,
	"./et": 541,
	"./et.js": 541,
	"./eu": 542,
	"./eu.js": 542,
	"./fa": 543,
	"./fa.js": 543,
	"./fi": 544,
	"./fi.js": 544,
	"./fil": 545,
	"./fil.js": 545,
	"./fo": 546,
	"./fo.js": 546,
	"./fr": 547,
	"./fr-ca": 548,
	"./fr-ca.js": 548,
	"./fr-ch": 549,
	"./fr-ch.js": 549,
	"./fr.js": 547,
	"./fy": 550,
	"./fy.js": 550,
	"./ga": 551,
	"./ga.js": 551,
	"./gd": 552,
	"./gd.js": 552,
	"./gl": 553,
	"./gl.js": 553,
	"./gom-deva": 554,
	"./gom-deva.js": 554,
	"./gom-latn": 555,
	"./gom-latn.js": 555,
	"./gu": 556,
	"./gu.js": 556,
	"./he": 557,
	"./he.js": 557,
	"./hi": 558,
	"./hi.js": 558,
	"./hr": 559,
	"./hr.js": 559,
	"./hu": 560,
	"./hu.js": 560,
	"./hy-am": 561,
	"./hy-am.js": 561,
	"./id": 562,
	"./id.js": 562,
	"./is": 563,
	"./is.js": 563,
	"./it": 564,
	"./it-ch": 565,
	"./it-ch.js": 565,
	"./it.js": 564,
	"./ja": 566,
	"./ja.js": 566,
	"./jv": 567,
	"./jv.js": 567,
	"./ka": 568,
	"./ka.js": 568,
	"./kk": 569,
	"./kk.js": 569,
	"./km": 570,
	"./km.js": 570,
	"./kn": 571,
	"./kn.js": 571,
	"./ko": 572,
	"./ko.js": 572,
	"./ku": 573,
	"./ku.js": 573,
	"./ky": 574,
	"./ky.js": 574,
	"./lb": 575,
	"./lb.js": 575,
	"./lo": 576,
	"./lo.js": 576,
	"./lt": 577,
	"./lt.js": 577,
	"./lv": 578,
	"./lv.js": 578,
	"./me": 579,
	"./me.js": 579,
	"./mi": 580,
	"./mi.js": 580,
	"./mk": 581,
	"./mk.js": 581,
	"./ml": 582,
	"./ml.js": 582,
	"./mn": 583,
	"./mn.js": 583,
	"./mr": 584,
	"./mr.js": 584,
	"./ms": 585,
	"./ms-my": 586,
	"./ms-my.js": 586,
	"./ms.js": 585,
	"./mt": 587,
	"./mt.js": 587,
	"./my": 588,
	"./my.js": 588,
	"./nb": 589,
	"./nb.js": 589,
	"./ne": 590,
	"./ne.js": 590,
	"./nl": 591,
	"./nl-be": 592,
	"./nl-be.js": 592,
	"./nl.js": 591,
	"./nn": 593,
	"./nn.js": 593,
	"./oc-lnc": 594,
	"./oc-lnc.js": 594,
	"./pa-in": 595,
	"./pa-in.js": 595,
	"./pl": 596,
	"./pl.js": 596,
	"./pt": 597,
	"./pt-br": 598,
	"./pt-br.js": 598,
	"./pt.js": 597,
	"./ro": 599,
	"./ro.js": 599,
	"./ru": 600,
	"./ru.js": 600,
	"./sd": 601,
	"./sd.js": 601,
	"./se": 602,
	"./se.js": 602,
	"./si": 603,
	"./si.js": 603,
	"./sk": 604,
	"./sk.js": 604,
	"./sl": 605,
	"./sl.js": 605,
	"./sq": 606,
	"./sq.js": 606,
	"./sr": 607,
	"./sr-cyrl": 608,
	"./sr-cyrl.js": 608,
	"./sr.js": 607,
	"./ss": 609,
	"./ss.js": 609,
	"./sv": 610,
	"./sv.js": 610,
	"./sw": 611,
	"./sw.js": 611,
	"./ta": 612,
	"./ta.js": 612,
	"./te": 613,
	"./te.js": 613,
	"./tet": 614,
	"./tet.js": 614,
	"./tg": 615,
	"./tg.js": 615,
	"./th": 616,
	"./th.js": 616,
	"./tk": 617,
	"./tk.js": 617,
	"./tl-ph": 618,
	"./tl-ph.js": 618,
	"./tlh": 619,
	"./tlh.js": 619,
	"./tr": 620,
	"./tr.js": 620,
	"./tzl": 621,
	"./tzl.js": 621,
	"./tzm": 622,
	"./tzm-latn": 623,
	"./tzm-latn.js": 623,
	"./tzm.js": 622,
	"./ug-cn": 624,
	"./ug-cn.js": 624,
	"./uk": 625,
	"./uk.js": 625,
	"./ur": 626,
	"./ur.js": 626,
	"./uz": 627,
	"./uz-latn": 628,
	"./uz-latn.js": 628,
	"./uz.js": 627,
	"./vi": 629,
	"./vi.js": 629,
	"./x-pseudo": 630,
	"./x-pseudo.js": 630,
	"./yo": 631,
	"./yo.js": 631,
	"./zh-cn": 632,
	"./zh-cn.js": 632,
	"./zh-hk": 633,
	"./zh-hk.js": 633,
	"./zh-mo": 634,
	"./zh-mo.js": 634,
	"./zh-tw": 635,
	"./zh-tw.js": 635
};
function webpackContext(req) {
	return __webpack_require__(webpackContextResolve(req));
};
function webpackContextResolve(req) {
	var id = map[req];
	if(!(id + 1)) // check for number or string
		throw new Error("Cannot find module '" + req + "'.");
	return id;
};
webpackContext.keys = function webpackContextKeys() {
	return Object.keys(map);
};
webpackContext.resolve = webpackContextResolve;
module.exports = webpackContext;
webpackContext.id = 1075;
 
/***/ }),
/* 1076 */
/***/ (function(module, exports) {
 
// empty (null-loader)
 
/***/ }),
/* 1077 */
/***/ (function(module, exports) {
 
// empty (null-loader)
 
/***/ }),
/* 1078 */
/***/ (function(module, exports) {
 
// empty (null-loader)
 
/***/ }),
/* 1079 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Component_1 = __webpack_require__(6);
var Dom_1 = __webpack_require__(0);
var _ = __webpack_require__(1);
var Initialization_1 = __webpack_require__(8);
var UtilsModules_1 = __webpack_require__(67);
var InitializationHelper = /** @class */ (function () {
    function InitializationHelper() {
    }
    InitializationHelper.findDOMElementsToIgnore = function (container, componentIdsToIgnore) {
        var _this = this;
        var htmlElementsToIgnore = [];
        _.each(componentIdsToIgnore, function (componentIdToIgnore) {
            var rootsToIgnore = _this.findDOMElementsMatchingComponentId(container, componentIdToIgnore);
            htmlElementsToIgnore = UtilsModules_1.Utils.concatWithoutDuplicate(htmlElementsToIgnore, rootsToIgnore);
            _.each(rootsToIgnore, function (rootToIgnore) {
                var childsElementsToIgnore = Dom_1.$$(rootToIgnore).findAll('*');
                htmlElementsToIgnore = UtilsModules_1.Utils.concatWithoutDuplicate(htmlElementsToIgnore, childsElementsToIgnore);
            });
        });
        return htmlElementsToIgnore;
    };
    InitializationHelper.findDOMElementsToInitialize = function (container, htmlElementsToIgnore) {
        var _this = this;
        var elementsToInitialize = [];
        _.each(Initialization_1.Initialization.getListOfRegisteredComponents(), function (componentClassId) {
            var htmlElements = [];
            htmlElements = UtilsModules_1.Utils.concatWithoutDuplicate(htmlElements, _this.findDOMElementsMatchingComponentId(container, componentClassId));
            var aliases = Initialization_1.Initialization.componentAliases[componentClassId];
            _.each(aliases, function (alias) {
                htmlElements = UtilsModules_1.Utils.concatWithoutDuplicate(htmlElements, _this.findDOMElementsMatchingComponentId(container, alias));
            });
            if (Dom_1.$$(container).hasClass(Component_1.Component.computeCssClassNameForType("" + componentClassId)) &&
                !_.contains(htmlElementsToIgnore, container)) {
                htmlElements.push(container);
            }
            elementsToInitialize.push({
                componentClassId: componentClassId,
                htmlElements: _.difference(htmlElements, htmlElementsToIgnore)
            });
        });
        return elementsToInitialize;
    };
    InitializationHelper.findDOMElementsMatchingComponentId = function (container, componentId) {
        var classname = Component_1.Component.computeCssClassNameForType("" + componentId);
        return Dom_1.$$(container).findAll("." + classname);
    };
    return InitializationHelper;
}());
exports.InitializationHelper = InitializationHelper;
 
 
/***/ }),
/* 1080 */
/***/ (function(module, exports, __webpack_require__) {
 
/*!
 * Pikaday
 *
 * Copyright © 2014 David Bushell | BSD & MIT license | https://github.com/dbushell/Pikaday
 */
 
(function (root, factory)
{
    'use strict';
 
    var moment;
    Eif (true) {
        // CommonJS module
        // Load moment.js as an optional dependency
        try { moment = __webpack_require__(3); } catch (e) {}
        module.exports = factory(moment);
    } else if (typeof define === 'function' && define.amd) {
        // AMD. Register as an anonymous module.
        define(function (req)
        {
            // Load moment.js as an optional dependency
            var id = 'moment';
            try { moment = req(id); } catch (e) {}
            return factory(moment);
        });
    } else {
        root.Pikaday = factory(root.moment);
    }
}(this, function (moment)
{
    'use strict';
 
    /**
     * feature detection and helper functions
     */
    var hasMoment = typeof moment === 'function',
 
    hasEventListeners = !!window.addEventListener,
 
    document = window.document,
 
    sto = window.setTimeout,
 
    addEvent = function(el, e, callback, capture)
    {
        Eif (hasEventListeners) {
            el.addEventListener(e, callback, !!capture);
        } else {
            el.attachEvent('on' + e, callback);
        }
    },
 
    removeEvent = function(el, e, callback, capture)
    {
        Eif (hasEventListeners) {
            el.removeEventListener(e, callback, !!capture);
        } else {
            el.detachEvent('on' + e, callback);
        }
    },
 
    trim = function(str)
    {
        return str.trim ? str.trim() : str.replace(/^\s+|\s+$/g,'');
    },
 
    hasClass = function(el, cn)
    {
        return (' ' + el.className + ' ').indexOf(' ' + cn + ' ') !== -1;
    },
 
    addClass = function(el, cn)
    {
        Eif (!hasClass(el, cn)) {
            el.className = (el.className === '') ? cn : el.className + ' ' + cn;
        }
    },
 
    removeClass = function(el, cn)
    {
        el.className = trim((' ' + el.className + ' ').replace(' ' + cn + ' ', ' '));
    },
 
    isArray = function(obj)
    {
        return (/Array/).test(Object.prototype.toString.call(obj));
    },
 
    isDate = function(obj)
    {
        return (/Date/).test(Object.prototype.toString.call(obj)) && !isNaN(obj.getTime());
    },
 
    isWeekend = function(date)
    {
        var day = date.getDay();
        return day === 0 || day === 6;
    },
 
    isLeapYear = function(year)
    {
        // solution by Matti Virkkunen: http://stackoverflow.com/a/4881951
        return year % 4 === 0 && year % 100 !== 0 || year % 400 === 0;
    },
 
    getDaysInMonth = function(year, month)
    {
        return [31, isLeapYear(year) ? 29 : 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][month];
    },
 
    setToStartOfDay = function(date)
    {
        Eif (isDate(date)) date.setHours(0,0,0,0);
    },
 
    compareDates = function(a,b)
    {
        // weak date comparison (use setToStartOfDay(date) to ensure correct result)
        return a.getTime() === b.getTime();
    },
 
    extend = function(to, from, overwrite)
    {
        var prop, hasProp;
        for (prop in from) {
            hasProp = to[prop] !== undefined;
            if (hasProp && typeof from[prop] === 'object' && from[prop] !== null && from[prop].nodeName === undefined) {
                Iif (isDate(from[prop])) {
                    if (overwrite) {
                        to[prop] = new Date(from[prop].getTime());
                    }
                }
                else Iif (isArray(from[prop])) {
                    if (overwrite) {
                        to[prop] = from[prop].slice(0);
                    }
                } else {
                    to[prop] = extend({}, from[prop], overwrite);
                }
            } else Eif (overwrite || !hasProp) {
                to[prop] = from[prop];
            }
        }
        return to;
    },
 
    fireEvent = function(el, eventName, data)
    {
        var ev;
 
        Eif (document.createEvent) {
            ev = document.createEvent('HTMLEvents');
            ev.initEvent(eventName, true, false);
            ev = extend(ev, data);
            el.dispatchEvent(ev);
        } else if (document.createEventObject) {
            ev = document.createEventObject();
            ev = extend(ev, data);
            el.fireEvent('on' + eventName, ev);
        }
    },
 
    adjustCalendar = function(calendar) {
        Iif (calendar.month < 0) {
            calendar.year -= Math.ceil(Math.abs(calendar.month)/12);
            calendar.month += 12;
        }
        Iif (calendar.month > 11) {
            calendar.year += Math.floor(Math.abs(calendar.month)/12);
            calendar.month -= 12;
        }
        return calendar;
    },
 
    /**
     * defaults and localisation
     */
    defaults = {
 
        // bind the picker to a form field
        field: null,
 
        // automatically show/hide the picker on `field` focus (default `true` if `field` is set)
        bound: undefined,
 
        // position of the datepicker, relative to the field (default to bottom & left)
        // ('bottom' & 'left' keywords are not used, 'top' & 'right' are modifier on the bottom/left position)
        position: 'bottom left',
 
        // automatically fit in the viewport even if it means repositioning from the position option
        reposition: true,
 
        // the default output format for `.toString()` and `field` value
        format: 'YYYY-MM-DD',
 
        // the toString function which gets passed a current date object and format
        // and returns a string
        toString: null,
 
        // used to create date object from current input string
        parse: null,
 
        // the initial date to view when first opened
        defaultDate: null,
 
        // make the `defaultDate` the initial selected value
        setDefaultDate: false,
 
        // first day of week (0: Sunday, 1: Monday etc)
        firstDay: 0,
 
        // the default flag for moment's strict date parsing
        formatStrict: false,
 
        // the minimum/earliest date that can be selected
        minDate: null,
        // the maximum/latest date that can be selected
        maxDate: null,
 
        // number of years either side, or array of upper/lower range
        yearRange: 10,
 
        // show week numbers at head of row
        showWeekNumber: false,
 
        // Week picker mode
        pickWholeWeek: false,
 
        // used internally (don't config outside)
        minYear: 0,
        maxYear: 9999,
        minMonth: undefined,
        maxMonth: undefined,
 
        startRange: null,
        endRange: null,
 
        isRTL: false,
 
        // Additional text to append to the year in the calendar title
        yearSuffix: '',
 
        // Render the month after year in the calendar title
        showMonthAfterYear: false,
 
        // Render days of the calendar grid that fall in the next or previous month
        showDaysInNextAndPreviousMonths: false,
 
        // Allows user to select days that fall in the next or previous month
        enableSelectionDaysInNextAndPreviousMonths: false,
 
        // how many months are visible
        numberOfMonths: 1,
 
        // when numberOfMonths is used, this will help you to choose where the main calendar will be (default `left`, can be set to `right`)
        // only used for the first display or when a selected date is not visible
        mainCalendar: 'left',
 
        // Specify a DOM element to render the calendar in
        container: undefined,
 
        // Blur field when date is selected
        blurFieldOnSelect : true,
 
        // internationalization
        i18n: {
            previousMonth : 'Previous Month',
            nextMonth     : 'Next Month',
            months        : ['January','February','March','April','May','June','July','August','September','October','November','December'],
            weekdays      : ['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'],
            weekdaysShort : ['Sun','Mon','Tue','Wed','Thu','Fri','Sat']
        },
 
        // Theme Classname
        theme: null,
 
        // events array
        events: [],
 
        // callback function
        onSelect: null,
        onOpen: null,
        onClose: null,
        onDraw: null,
 
        // Enable keyboard input
        keyboardInput: true
    },
 
 
    /**
     * templating functions to abstract HTML rendering
     */
    renderDayName = function(opts, day, abbr)
    {
        day += opts.firstDay;
        while (day >= 7) {
            day -= 7;
        }
        return abbr ? opts.i18n.weekdaysShort[day] : opts.i18n.weekdays[day];
    },
 
    renderDay = function(opts)
    {
        var arr = [];
        var ariaSelected = 'false';
        if (opts.isEmpty) {
            if (opts.showDaysInNextAndPreviousMonths) {
                arr.push('is-outside-current-month');
 
                if(!opts.enableSelectionDaysInNextAndPreviousMonths) {
                    arr.push('is-selection-disabled');
                }
 
            } else {
                return '<td class="is-empty"></td>';
            }
        }
        if (opts.isDisabled) {
            arr.push('is-disabled');
        }
        if (opts.isToday) {
            arr.push('is-today');
        }
        if (opts.isSelected) {
            arr.push('is-selected');
            ariaSelected = 'true';
        }
        if (opts.hasEvent) {
            arr.push('has-event');
        }
        if (opts.isInRange) {
            arr.push('is-inrange');
        }
        if (opts.isStartRange) {
            arr.push('is-startrange');
        }
        if (opts.isEndRange) {
            arr.push('is-endrange');
        }
        return '<td data-day="' + opts.day + '" class="' + arr.join(' ') + '" aria-selected="' + ariaSelected + '">' +
                 '<button class="pika-button pika-day" type="button" ' +
                    'data-pika-year="' + opts.year + '" data-pika-month="' + opts.month + '" data-pika-day="' + opts.day + '">' +
                        opts.day +
                 '</button>' +
               '</td>';
    },
 
    renderWeek = function (d, m, y) {
        // Lifted from http://javascript.about.com/library/blweekyear.htm, lightly modified.
        var onejan = new Date(y, 0, 1),
            weekNum = Math.ceil((((new Date(y, m, d) - onejan) / 86400000) + onejan.getDay()+1)/7);
        return '<td class="pika-week">' + weekNum + '</td>';
    },
 
    renderRow = function(days, isRTL, pickWholeWeek, isRowSelected)
    {
        return '<tr class="pika-row' + (pickWholeWeek ? ' pick-whole-week' : '') + (isRowSelected ? ' is-selected' : '') + '">' + (isRTL ? days.reverse() : days).join('') + '</tr>';
    },
 
    renderBody = function(rows)
    {
        return '<tbody>' + rows.join('') + '</tbody>';
    },
 
    renderHead = function(opts)
    {
        var i, arr = [];
        if (opts.showWeekNumber) {
            arr.push('<th></th>');
        }
        for (i = 0; i < 7; i++) {
            arr.push('<th scope="col"><abbr title="' + renderDayName(opts, i) + '">' + renderDayName(opts, i, true) + '</abbr></th>');
        }
        return '<thead><tr>' + (opts.isRTL ? arr.reverse() : arr).join('') + '</tr></thead>';
    },
 
    renderTitle = function(instance, c, year, month, refYear, randId)
    {
        var i, j, arr,
            opts = instance._o,
            isMinYear = year === opts.minYear,
            isMaxYear = year === opts.maxYear,
            html = '<div id="' + randId + '" class="pika-title" role="heading" aria-live="assertive">',
            monthHtml,
            yearHtml,
            prev = true,
            next = true;
 
        for (arr = [], i = 0; i < 12; i++) {
            arr.push('<option value="' + (year === refYear ? i - c : 12 + i - c) + '"' +
                (i === month ? ' selected="selected"': '') +
                ((isMinYear && i < opts.minMonth) || (isMaxYear && i > opts.maxMonth) ? 'disabled="disabled"' : '') + '>' +
                opts.i18n.months[i] + '</option>');
        }
 
        monthHtml = '<div class="pika-label">' + opts.i18n.months[month] + '<select class="pika-select pika-select-month" tabindex="-1">' + arr.join('') + '</select></div>';
 
        if (isArray(opts.yearRange)) {
            i = opts.yearRange[0];
            j = opts.yearRange[1] + 1;
        } else {
            i = year - opts.yearRange;
            j = 1 + year + opts.yearRange;
        }
 
        for (arr = []; i < j && i <= opts.maxYear; i++) {
            if (i >= opts.minYear) {
                arr.push('<option value="' + i + '"' + (i === year ? ' selected="selected"': '') + '>' + (i) + '</option>');
            }
        }
        yearHtml = '<div class="pika-label">' + year + opts.yearSuffix + '<select class="pika-select pika-select-year" tabindex="-1">' + arr.join('') + '</select></div>';
 
        if (opts.showMonthAfterYear) {
            html += yearHtml + monthHtml;
        } else {
            html += monthHtml + yearHtml;
        }
 
        if (isMinYear && (month === 0 || opts.minMonth >= month)) {
            prev = false;
        }
 
        if (isMaxYear && (month === 11 || opts.maxMonth <= month)) {
            next = false;
        }
 
        if (c === 0) {
            html += '<button class="pika-prev' + (prev ? '' : ' is-disabled') + '" type="button">' + opts.i18n.previousMonth + '</button>';
        }
        if (c === (instance._o.numberOfMonths - 1) ) {
            html += '<button class="pika-next' + (next ? '' : ' is-disabled') + '" type="button">' + opts.i18n.nextMonth + '</button>';
        }
 
        return html += '</div>';
    },
 
    renderTable = function(opts, data, randId)
    {
        return '<table cellpadding="0" cellspacing="0" class="pika-table" role="grid" aria-labelledby="' + randId + '">' + renderHead(opts) + renderBody(data) + '</table>';
    },
 
 
    /**
     * Pikaday constructor
     */
    Pikaday = function(options)
    {
        var self = this,
            opts = self.config(options);
 
        self._onMouseDown = function(e)
        {
            if (!self._v) {
                return;
            }
            e = e || window.event;
            var target = e.target || e.srcElement;
            if (!target) {
                return;
            }
 
            if (!hasClass(target, 'is-disabled')) {
                if (hasClass(target, 'pika-button') && !hasClass(target, 'is-empty') && !hasClass(target.parentNode, 'is-disabled')) {
                    self.setDate(new Date(target.getAttribute('data-pika-year'), target.getAttribute('data-pika-month'), target.getAttribute('data-pika-day')));
                    if (opts.bound) {
                        sto(function() {
                            self.hide();
                            if (opts.blurFieldOnSelect && opts.field) {
                                opts.field.blur();
                            }
                        }, 100);
                    }
                }
                else if (hasClass(target, 'pika-prev')) {
                    self.prevMonth();
                }
                else if (hasClass(target, 'pika-next')) {
                    self.nextMonth();
                }
            }
            if (!hasClass(target, 'pika-select')) {
                // if this is touch event prevent mouse events emulation
                if (e.preventDefault) {
                    e.preventDefault();
                } else {
                    e.returnValue = false;
                    return false;
                }
            } else {
                self._c = true;
            }
        };
 
        self._onChange = function(e)
        {
            e = e || window.event;
            var target = e.target || e.srcElement;
            if (!target) {
                return;
            }
            if (hasClass(target, 'pika-select-month')) {
                self.gotoMonth(target.value);
            }
            else if (hasClass(target, 'pika-select-year')) {
                self.gotoYear(target.value);
            }
        };
 
        self._onKeyChange = function(e)
        {
            e = e || window.event;
 
            if (self.isVisible()) {
 
                switch(e.keyCode){
                    case 13:
                    case 27:
                        if (opts.field) {
                            opts.field.blur();
                        }
                        break;
                    case 37:
                        e.preventDefault();
                        self.adjustDate('subtract', 1);
                        break;
                    case 38:
                        self.adjustDate('subtract', 7);
                        break;
                    case 39:
                        self.adjustDate('add', 1);
                        break;
                    case 40:
                        self.adjustDate('add', 7);
                        break;
                }
            }
        };
 
        self._onInputChange = function(e)
        {
            var date;
 
            Eif (e.firedBy === self) {
                return;
            }
            if (opts.parse) {
                date = opts.parse(opts.field.value, opts.format);
            } else if (hasMoment) {
                date = moment(opts.field.value, opts.format, opts.formatStrict);
                date = (date && date.isValid()) ? date.toDate() : null;
            }
            else {
                date = new Date(Date.parse(opts.field.value));
            }
            if (isDate(date)) {
              self.setDate(date);
            }
            if (!self._v) {
                self.show();
            }
        };
 
        self._onInputFocus = function()
        {
            self.show();
        };
 
        self._onInputClick = function()
        {
            self.show();
        };
 
        self._onInputBlur = function()
        {
            // IE allows pika div to gain focus; catch blur the input field
            var pEl = document.activeElement;
            do {
                if (hasClass(pEl, 'pika-single')) {
                    return;
                }
            }
            while ((pEl = pEl.parentNode));
 
            if (!self._c) {
                self._b = sto(function() {
                    self.hide();
                }, 50);
            }
            self._c = false;
        };
 
        self._onClick = function(e)
        {
            e = e || window.event;
            var target = e.target || e.srcElement,
                pEl = target;
            if (!target) {
                return;
            }
            if (!hasEventListeners && hasClass(target, 'pika-select')) {
                if (!target.onchange) {
                    target.setAttribute('onchange', 'return;');
                    addEvent(target, 'change', self._onChange);
                }
            }
            do {
                if (hasClass(pEl, 'pika-single') || pEl === opts.trigger) {
                    return;
                }
            }
            while ((pEl = pEl.parentNode));
            if (self._v && target !== opts.trigger && pEl !== opts.trigger) {
                self.hide();
            }
        };
 
        self.el = document.createElement('div');
        self.el.className = 'pika-single' + (opts.isRTL ? ' is-rtl' : '') + (opts.theme ? ' ' + opts.theme : '');
 
        addEvent(self.el, 'mousedown', self._onMouseDown, true);
        addEvent(self.el, 'touchend', self._onMouseDown, true);
        addEvent(self.el, 'change', self._onChange);
 
        Eif (opts.keyboardInput) {
            addEvent(document, 'keydown', self._onKeyChange);
        }
 
        Eif (opts.field) {
            Iif (opts.container) {
                opts.container.appendChild(self.el);
            } else Eif (opts.bound) {
                document.body.appendChild(self.el);
            } else {
                opts.field.parentNode.insertBefore(self.el, opts.field.nextSibling);
            }
            addEvent(opts.field, 'change', self._onInputChange);
 
            Eif (!opts.defaultDate) {
                Iif (hasMoment && opts.field.value) {
                    opts.defaultDate = moment(opts.field.value, opts.format).toDate();
                } else {
                    opts.defaultDate = new Date(Date.parse(opts.field.value));
                }
                opts.setDefaultDate = true;
            }
        }
 
        var defDate = opts.defaultDate;
 
        Iif (isDate(defDate)) {
            if (opts.setDefaultDate) {
                self.setDate(defDate, true);
            } else {
                self.gotoDate(defDate);
            }
        } else {
            self.gotoDate(new Date());
        }
 
        Eif (opts.bound) {
            this.hide();
            self.el.className += ' is-bound';
            addEvent(opts.trigger, 'click', self._onInputClick);
            addEvent(opts.trigger, 'focus', self._onInputFocus);
            addEvent(opts.trigger, 'blur', self._onInputBlur);
        } else {
            this.show();
        }
    };
 
 
    /**
     * public Pikaday API
     */
    Pikaday.prototype = {
 
 
        /**
         * configure functionality
         */
        config: function(options)
        {
            Eif (!this._o) {
                this._o = extend({}, defaults, true);
            }
 
            var opts = extend(this._o, options, true);
 
            opts.isRTL = !!opts.isRTL;
 
            opts.field = (opts.field && opts.field.nodeName) ? opts.field : null;
 
            opts.theme = (typeof opts.theme) === 'string' && opts.theme ? opts.theme : null;
 
            opts.bound = !!(opts.bound !== undefined ? opts.field && opts.bound : opts.field);
 
            opts.trigger = (opts.trigger && opts.trigger.nodeName) ? opts.trigger : opts.field;
 
            opts.disableWeekends = !!opts.disableWeekends;
 
            opts.disableDayFn = (typeof opts.disableDayFn) === 'function' ? opts.disableDayFn : null;
 
            var nom = parseInt(opts.numberOfMonths, 10) || 1;
            opts.numberOfMonths = nom > 4 ? 4 : nom;
 
            Eif (!isDate(opts.minDate)) {
                opts.minDate = false;
            }
            Eif (!isDate(opts.maxDate)) {
                opts.maxDate = false;
            }
            Iif ((opts.minDate && opts.maxDate) && opts.maxDate < opts.minDate) {
                opts.maxDate = opts.minDate = false;
            }
            Iif (opts.minDate) {
                this.setMinDate(opts.minDate);
            }
            Iif (opts.maxDate) {
                this.setMaxDate(opts.maxDate);
            }
 
            Iif (isArray(opts.yearRange)) {
                var fallback = new Date().getFullYear() - 10;
                opts.yearRange[0] = parseInt(opts.yearRange[0], 10) || fallback;
                opts.yearRange[1] = parseInt(opts.yearRange[1], 10) || fallback;
            } else {
                opts.yearRange = Math.abs(parseInt(opts.yearRange, 10)) || defaults.yearRange;
                Iif (opts.yearRange > 100) {
                    opts.yearRange = 100;
                }
            }
 
            return opts;
        },
 
        /**
         * return a formatted string of the current selection (using Moment.js if available)
         */
        toString: function(format)
        {
            format = format || this._o.format;
            Iif (!isDate(this._d)) {
                return '';
            }
            Iif (this._o.toString) {
              return this._o.toString(this._d, format);
            }
            Eif (hasMoment) {
              return moment(this._d).format(format);
            }
            return this._d.toDateString();
        },
 
        /**
         * return a Moment.js object of the current selection (if available)
         */
        getMoment: function()
        {
            return hasMoment ? moment(this._d) : null;
        },
 
        /**
         * set the current selection from a Moment.js object (if available)
         */
        setMoment: function(date, preventOnSelect)
        {
            if (hasMoment && moment.isMoment(date)) {
                this.setDate(date.toDate(), preventOnSelect);
            }
        },
 
        /**
         * return a Date object of the current selection
         */
        getDate: function()
        {
            return isDate(this._d) ? new Date(this._d.getTime()) : null;
        },
 
        /**
         * set the current selection
         */
        setDate: function(date, preventOnSelect)
        {
            if (!date) {
                this._d = null;
 
                Eif (this._o.field) {
                    this._o.field.value = '';
                    fireEvent(this._o.field, 'change', { firedBy: this });
                }
 
                return this.draw();
            }
            Iif (typeof date === 'string') {
                date = new Date(Date.parse(date));
            }
            Iif (!isDate(date)) {
                return;
            }
 
            var min = this._o.minDate,
                max = this._o.maxDate;
 
            Iif (isDate(min) && date < min) {
                date = min;
            } else Iif (isDate(max) && date > max) {
                date = max;
            }
 
            this._d = new Date(date.getTime());
            setToStartOfDay(this._d);
            this.gotoDate(this._d);
 
            Eif (this._o.field) {
                this._o.field.value = this.toString();
                fireEvent(this._o.field, 'change', { firedBy: this });
            }
            Eif (!preventOnSelect && typeof this._o.onSelect === 'function') {
                this._o.onSelect.call(this, this.getDate());
            }
        },
 
        /**
         * change view to a specific date
         */
        gotoDate: function(date)
        {
            var newCalendar = true;
 
            Iif (!isDate(date)) {
                return;
            }
 
            if (this.calendars) {
                var firstVisibleDate = new Date(this.calendars[0].year, this.calendars[0].month, 1),
                    lastVisibleDate = new Date(this.calendars[this.calendars.length-1].year, this.calendars[this.calendars.length-1].month, 1),
                    visibleDate = date.getTime();
                // get the end of the month
                lastVisibleDate.setMonth(lastVisibleDate.getMonth()+1);
                lastVisibleDate.setDate(lastVisibleDate.getDate()-1);
                newCalendar = (visibleDate < firstVisibleDate.getTime() || lastVisibleDate.getTime() < visibleDate);
            }
 
            if (newCalendar) {
                this.calendars = [{
                    month: date.getMonth(),
                    year: date.getFullYear()
                }];
                Iif (this._o.mainCalendar === 'right') {
                    this.calendars[0].month += 1 - this._o.numberOfMonths;
                }
            }
 
            this.adjustCalendars();
        },
 
        adjustDate: function(sign, days) {
 
            var day = this.getDate() || new Date();
            var difference = parseInt(days)*24*60*60*1000;
 
            var newDay;
 
            if (sign === 'add') {
                newDay = new Date(day.valueOf() + difference);
            } else if (sign === 'subtract') {
                newDay = new Date(day.valueOf() - difference);
            }
 
            this.setDate(newDay);
        },
 
        adjustCalendars: function() {
            this.calendars[0] = adjustCalendar(this.calendars[0]);
            for (var c = 1; c < this._o.numberOfMonths; c++) {
                this.calendars[c] = adjustCalendar({
                    month: this.calendars[0].month + c,
                    year: this.calendars[0].year
                });
            }
            this.draw();
        },
 
        gotoToday: function()
        {
            this.gotoDate(new Date());
        },
 
        /**
         * change view to a specific month (zero-index, e.g. 0: January)
         */
        gotoMonth: function(month)
        {
            if (!isNaN(month)) {
                this.calendars[0].month = parseInt(month, 10);
                this.adjustCalendars();
            }
        },
 
        nextMonth: function()
        {
            this.calendars[0].month++;
            this.adjustCalendars();
        },
 
        prevMonth: function()
        {
            this.calendars[0].month--;
            this.adjustCalendars();
        },
 
        /**
         * change view to a specific full year (e.g. "2012")
         */
        gotoYear: function(year)
        {
            if (!isNaN(year)) {
                this.calendars[0].year = parseInt(year, 10);
                this.adjustCalendars();
            }
        },
 
        /**
         * change the minDate
         */
        setMinDate: function(value)
        {
            if(value instanceof Date) {
                setToStartOfDay(value);
                this._o.minDate = value;
                this._o.minYear  = value.getFullYear();
                this._o.minMonth = value.getMonth();
            } else {
                this._o.minDate = defaults.minDate;
                this._o.minYear  = defaults.minYear;
                this._o.minMonth = defaults.minMonth;
                this._o.startRange = defaults.startRange;
            }
 
            this.draw();
        },
 
        /**
         * change the maxDate
         */
        setMaxDate: function(value)
        {
            if(value instanceof Date) {
                setToStartOfDay(value);
                this._o.maxDate = value;
                this._o.maxYear = value.getFullYear();
                this._o.maxMonth = value.getMonth();
            } else {
                this._o.maxDate = defaults.maxDate;
                this._o.maxYear = defaults.maxYear;
                this._o.maxMonth = defaults.maxMonth;
                this._o.endRange = defaults.endRange;
            }
 
            this.draw();
        },
 
        setStartRange: function(value)
        {
            this._o.startRange = value;
        },
 
        setEndRange: function(value)
        {
            this._o.endRange = value;
        },
 
        /**
         * refresh the HTML
         */
        draw: function(force)
        {
            Eif (!this._v && !force) {
                return;
            }
            var opts = this._o,
                minYear = opts.minYear,
                maxYear = opts.maxYear,
                minMonth = opts.minMonth,
                maxMonth = opts.maxMonth,
                html = '',
                randId;
 
            if (this._y <= minYear) {
                this._y = minYear;
                if (!isNaN(minMonth) && this._m < minMonth) {
                    this._m = minMonth;
                }
            }
            if (this._y >= maxYear) {
                this._y = maxYear;
                if (!isNaN(maxMonth) && this._m > maxMonth) {
                    this._m = maxMonth;
                }
            }
 
            randId = 'pika-title-' + Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 2);
 
            for (var c = 0; c < opts.numberOfMonths; c++) {
                html += '<div class="pika-lendar">' + renderTitle(this, c, this.calendars[c].year, this.calendars[c].month, this.calendars[0].year, randId) + this.render(this.calendars[c].year, this.calendars[c].month, randId) + '</div>';
            }
 
            this.el.innerHTML = html;
 
            if (opts.bound) {
                if(opts.field.type !== 'hidden') {
                    sto(function() {
                        opts.trigger.focus();
                    }, 1);
                }
            }
 
            if (typeof this._o.onDraw === 'function') {
                this._o.onDraw(this);
            }
 
            if (opts.bound) {
                // let the screen reader user know to use arrow keys
                opts.field.setAttribute('aria-label', 'Use the arrow keys to pick a date');
            }
        },
 
        adjustPosition: function()
        {
            var field, pEl, width, height, viewportWidth, viewportHeight, scrollTop, left, top, clientRect;
 
            if (this._o.container) return;
 
            this.el.style.position = 'absolute';
 
            field = this._o.trigger;
            pEl = field;
            width = this.el.offsetWidth;
            height = this.el.offsetHeight;
            viewportWidth = window.innerWidth || document.documentElement.clientWidth;
            viewportHeight = window.innerHeight || document.documentElement.clientHeight;
            scrollTop = window.pageYOffset || document.body.scrollTop || document.documentElement.scrollTop;
 
            if (typeof field.getBoundingClientRect === 'function') {
                clientRect = field.getBoundingClientRect();
                left = clientRect.left + window.pageXOffset;
                top = clientRect.bottom + window.pageYOffset;
            } else {
                left = pEl.offsetLeft;
                top  = pEl.offsetTop + pEl.offsetHeight;
                while((pEl = pEl.offsetParent)) {
                    left += pEl.offsetLeft;
                    top  += pEl.offsetTop;
                }
            }
 
            // default position is bottom & left
            if ((this._o.reposition && left + width > viewportWidth) ||
                (
                    this._o.position.indexOf('right') > -1 &&
                    left - width + field.offsetWidth > 0
                )
            ) {
                left = left - width + field.offsetWidth;
            }
            if ((this._o.reposition && top + height > viewportHeight + scrollTop) ||
                (
                    this._o.position.indexOf('top') > -1 &&
                    top - height - field.offsetHeight > 0
                )
            ) {
                top = top - height - field.offsetHeight;
            }
 
            this.el.style.left = left + 'px';
            this.el.style.top = top + 'px';
        },
 
        /**
         * render HTML for a particular month
         */
        render: function(year, month, randId)
        {
            var opts   = this._o,
                now    = new Date(),
                days   = getDaysInMonth(year, month),
                before = new Date(year, month, 1).getDay(),
                data   = [],
                row    = [];
            setToStartOfDay(now);
            if (opts.firstDay > 0) {
                before -= opts.firstDay;
                if (before < 0) {
                    before += 7;
                }
            }
            var previousMonth = month === 0 ? 11 : month - 1,
                nextMonth = month === 11 ? 0 : month + 1,
                yearOfPreviousMonth = month === 0 ? year - 1 : year,
                yearOfNextMonth = month === 11 ? year + 1 : year,
                daysInPreviousMonth = getDaysInMonth(yearOfPreviousMonth, previousMonth);
            var cells = days + before,
                after = cells;
            while(after > 7) {
                after -= 7;
            }
            cells += 7 - after;
            var isWeekSelected = false;
            for (var i = 0, r = 0; i < cells; i++)
            {
                var day = new Date(year, month, 1 + (i - before)),
                    isSelected = isDate(this._d) ? compareDates(day, this._d) : false,
                    isToday = compareDates(day, now),
                    hasEvent = opts.events.indexOf(day.toDateString()) !== -1 ? true : false,
                    isEmpty = i < before || i >= (days + before),
                    dayNumber = 1 + (i - before),
                    monthNumber = month,
                    yearNumber = year,
                    isStartRange = opts.startRange && compareDates(opts.startRange, day),
                    isEndRange = opts.endRange && compareDates(opts.endRange, day),
                    isInRange = opts.startRange && opts.endRange && opts.startRange < day && day < opts.endRange,
                    isDisabled = (opts.minDate && day < opts.minDate) ||
                                 (opts.maxDate && day > opts.maxDate) ||
                                 (opts.disableWeekends && isWeekend(day)) ||
                                 (opts.disableDayFn && opts.disableDayFn(day));
 
                if (isEmpty) {
                    if (i < before) {
                        dayNumber = daysInPreviousMonth + dayNumber;
                        monthNumber = previousMonth;
                        yearNumber = yearOfPreviousMonth;
                    } else {
                        dayNumber = dayNumber - days;
                        monthNumber = nextMonth;
                        yearNumber = yearOfNextMonth;
                    }
                }
 
                var dayConfig = {
                        day: dayNumber,
                        month: monthNumber,
                        year: yearNumber,
                        hasEvent: hasEvent,
                        isSelected: isSelected,
                        isToday: isToday,
                        isDisabled: isDisabled,
                        isEmpty: isEmpty,
                        isStartRange: isStartRange,
                        isEndRange: isEndRange,
                        isInRange: isInRange,
                        showDaysInNextAndPreviousMonths: opts.showDaysInNextAndPreviousMonths,
                        enableSelectionDaysInNextAndPreviousMonths: opts.enableSelectionDaysInNextAndPreviousMonths
                    };
 
                if (opts.pickWholeWeek && isSelected) {
                    isWeekSelected = true;
                }
 
                row.push(renderDay(dayConfig));
 
                if (++r === 7) {
                    if (opts.showWeekNumber) {
                        row.unshift(renderWeek(i - before, month, year));
                    }
                    data.push(renderRow(row, opts.isRTL, opts.pickWholeWeek, isWeekSelected));
                    row = [];
                    r = 0;
                    isWeekSelected = false;
                }
            }
            return renderTable(opts, data, randId);
        },
 
        isVisible: function()
        {
            return this._v;
        },
 
        show: function()
        {
            if (!this.isVisible()) {
                this._v = true;
                this.draw();
                removeClass(this.el, 'is-hidden');
                if (this._o.bound) {
                    addEvent(document, 'click', this._onClick);
                    this.adjustPosition();
                }
                if (typeof this._o.onOpen === 'function') {
                    this._o.onOpen.call(this);
                }
            }
        },
 
        hide: function()
        {
            var v = this._v;
            Eif (v !== false) {
                Eif (this._o.bound) {
                    removeEvent(document, 'click', this._onClick);
                }
                this.el.style.position = 'static'; // reset
                this.el.style.left = 'auto';
                this.el.style.top = 'auto';
                addClass(this.el, 'is-hidden');
                this._v = false;
                Iif (v !== undefined && typeof this._o.onClose === 'function') {
                    this._o.onClose.call(this);
                }
            }
        },
 
        /**
         * GAME OVER
         */
        destroy: function()
        {
            var opts = this._o;
 
            this.hide();
            removeEvent(this.el, 'mousedown', this._onMouseDown, true);
            removeEvent(this.el, 'touchend', this._onMouseDown, true);
            removeEvent(this.el, 'change', this._onChange);
            if (opts.keyboardInput) {
                removeEvent(document, 'keydown', this._onKeyChange);
            }
            if (opts.field) {
                removeEvent(opts.field, 'change', this._onInputChange);
                if (opts.bound) {
                    removeEvent(opts.trigger, 'click', this._onInputClick);
                    removeEvent(opts.trigger, 'focus', this._onInputFocus);
                    removeEvent(opts.trigger, 'blur', this._onInputBlur);
                }
            }
            if (this.el.parentNode) {
                this.el.parentNode.removeChild(this.el);
            }
        }
 
    };
 
    return Pikaday;
}));
 
 
/***/ }),
/* 1081 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var TemplateHelpers_1 = __webpack_require__(141);
exports.TemplateHelpers = TemplateHelpers_1.TemplateHelpers;
var TemplateList_1 = __webpack_require__(135);
exports.TemplateList = TemplateList_1.TemplateList;
var TemplateCache_1 = __webpack_require__(79);
exports.TemplateCache = TemplateCache_1.TemplateCache;
var HtmlTemplate_1 = __webpack_require__(217);
exports.HtmlTemplate = HtmlTemplate_1.HtmlTemplate;
var UnderscoreTemplate_1 = __webpack_require__(90);
exports.UnderscoreTemplate = UnderscoreTemplate_1.UnderscoreTemplate;
 
 
/***/ }),
/* 1082 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var AllKeywordsInput_1 = __webpack_require__(1083);
var ExactKeywordsInput_1 = __webpack_require__(653);
var AnyKeywordsInput_1 = __webpack_require__(654);
var NoneKeywordsInput_1 = __webpack_require__(655);
var AnytimeDateInput_1 = __webpack_require__(1084);
var InTheLastDateInput_1 = __webpack_require__(656);
var BetweenDateInput_1 = __webpack_require__(657);
var SimpleFieldInput_1 = __webpack_require__(658);
var AdvancedFieldInput_1 = __webpack_require__(659);
var SizeInput_1 = __webpack_require__(660);
var AdvancedSearchInputFactory = /** @class */ (function () {
    function AdvancedSearchInputFactory(endpoint, root) {
        this.endpoint = endpoint;
        this.root = root;
    }
    AdvancedSearchInputFactory.prototype.create = function (name, options) {
        switch (name) {
            case 'keywords_all':
                return this.createAllKeywordsInput();
            case 'keywords_exact':
                return this.createExactKeywordsInput();
            case 'keywords_any':
                return this.createAnyKeywordsInput();
            case 'keywords_none':
                return this.createNoneKeywordsInput();
            case 'date_any':
                return this.createAnytimeDateInput();
            case 'date_last':
                return this.createInTheLastDateInput();
            case 'date_between':
                return this.createBetweenDateInput();
            case 'document_field':
                return this.createSimpleFieldInput(options.name, options.field);
            case 'document_advanced_field':
                return this.createAdvancedFieldInput(options.name, options.field);
            case 'document_size':
                return this.createSizeInput();
            default:
                return null;
        }
    };
    AdvancedSearchInputFactory.prototype.createAllKeywordsInput = function () {
        return new AllKeywordsInput_1.AllKeywordsInput(this.root);
    };
    AdvancedSearchInputFactory.prototype.createExactKeywordsInput = function () {
        return new ExactKeywordsInput_1.ExactKeywordsInput(this.root);
    };
    AdvancedSearchInputFactory.prototype.createAnyKeywordsInput = function () {
        return new AnyKeywordsInput_1.AnyKeywordsInput(this.root);
    };
    AdvancedSearchInputFactory.prototype.createNoneKeywordsInput = function () {
        return new NoneKeywordsInput_1.NoneKeywordsInput(this.root);
    };
    AdvancedSearchInputFactory.prototype.createAnytimeDateInput = function () {
        return new AnytimeDateInput_1.AnytimeDateInput(this.root);
    };
    AdvancedSearchInputFactory.prototype.createInTheLastDateInput = function () {
        return new InTheLastDateInput_1.InTheLastDateInput(this.root);
    };
    AdvancedSearchInputFactory.prototype.createBetweenDateInput = function () {
        return new BetweenDateInput_1.BetweenDateInput(this.root);
    };
    AdvancedSearchInputFactory.prototype.createSimpleFieldInput = function (name, field) {
        return new SimpleFieldInput_1.SimpleFieldInput(name, field, this.endpoint, this.root);
    };
    AdvancedSearchInputFactory.prototype.createAdvancedFieldInput = function (name, field) {
        return new AdvancedFieldInput_1.AdvancedFieldInput(name, field, this.root);
    };
    AdvancedSearchInputFactory.prototype.createSizeInput = function () {
        return new SizeInput_1.SizeInput(this.root);
    };
    return AdvancedSearchInputFactory;
}());
exports.AdvancedSearchInputFactory = AdvancedSearchInputFactory;
 
 
/***/ }),
/* 1083 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
var KeywordsInput_1 = __webpack_require__(182);
var Strings_1 = __webpack_require__(4);
var AllKeywordsInput = /** @class */ (function (_super) {
    __extends(AllKeywordsInput, _super);
    function AllKeywordsInput(root) {
        var _this = _super.call(this, Strings_1.l('AllTheseWords'), root) || this;
        _this.root = root;
        return _this;
    }
    AllKeywordsInput.prototype.getValue = function () {
        var value = _super.prototype.getValue.call(this);
        Eif (!value) {
            return '';
        }
        return "<@-" + value + "-@>";
    };
    return AllKeywordsInput;
}(KeywordsInput_1.KeywordsInput));
exports.AllKeywordsInput = AllKeywordsInput;
 
 
/***/ }),
/* 1084 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
var DateInput_1 = __webpack_require__(323);
var Strings_1 = __webpack_require__(4);
var Dom_1 = __webpack_require__(0);
var AdvancedSearchEvents_1 = __webpack_require__(110);
var AnytimeDateInput = /** @class */ (function (_super) {
    __extends(AnytimeDateInput, _super);
    function AnytimeDateInput(root) {
        var _this = _super.call(this, Strings_1.l('Anytime'), root) || this;
        _this.root = root;
        return _this;
    }
    AnytimeDateInput.prototype.getValue = function () {
        return null;
    };
    AnytimeDateInput.prototype.build = function () {
        var _this = this;
        _super.prototype.build.call(this);
        var radio = this.getRadio();
        radio.checked = true;
        Dom_1.$$(radio).on('change', function () {
            if (_this.root) {
                Dom_1.$$(_this.root).trigger(AdvancedSearchEvents_1.AdvancedSearchEvents.executeAdvancedSearch);
            }
            else {
                Dom_1.$$(_this.element).trigger(AdvancedSearchEvents_1.AdvancedSearchEvents.executeAdvancedSearch);
            }
        });
        return this.element;
    };
    return AnytimeDateInput;
}(DateInput_1.DateInput));
exports.AnytimeDateInput = AnytimeDateInput;
 
 
/***/ }),
/* 1085 */
/***/ (function(module, exports) {
 
// empty (null-loader)
 
/***/ }),
/* 1086 */
/***/ (function(module, exports) {
 
// empty (null-loader)
 
/***/ }),
/* 1087 */
/***/ (function(module, exports) {
 
// empty (null-loader)
 
/***/ }),
/* 1088 */
/***/ (function(module, exports) {
 
// empty (null-loader)
 
/***/ }),
/* 1089 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
function isFacetFieldValueCompatible(facet) {
    return !!facet['isFieldValueCompatible'];
}
exports.isFacetFieldValueCompatible = isFacetFieldValueCompatible;
 
 
/***/ }),
/* 1090 */
/***/ (function(module, exports) {
 
// empty (null-loader)
 
/***/ }),
/* 1091 */
/***/ (function(module, exports) {
 
// empty (null-loader)
 
/***/ }),
/* 1092 */
/***/ (function(module, exports) {
 
// empty (null-loader)
 
/***/ }),
/* 1093 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Initialization_1 = __webpack_require__(8);
var fields = ['sflikedby', 'sflikedbyid', 'clickableuri', 'sffeeditemid'];
function registerFields() {
    Initialization_1.Initialization.registerComponentFields('ChatterLikedBy', fields);
}
exports.registerFields = registerFields;
 
 
/***/ }),
/* 1094 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Initialization_1 = __webpack_require__(8);
var fields = ['sfcontentversionid', 'sffeeditemid', 'sfcontentfilename', 'sftitle', 'sf_title'];
function registerFields() {
    Initialization_1.Initialization.registerComponentFields('ChatterPostAttachment', fields);
}
exports.registerFields = registerFields;
 
 
/***/ }),
/* 1095 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Initialization_1 = __webpack_require__(8);
var fields = ['sfcreatedby', 'sfcreatedbyid', 'sffeeditemid', 'sfuserid', 'sfinsertedbyid', 'sfparentid', 'sfparentname'];
function registerFields() {
    Initialization_1.Initialization.registerComponentFields('ChatterPostedBy', fields);
}
exports.registerFields = registerFields;
 
 
/***/ }),
/* 1096 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
var Component_1 = __webpack_require__(6);
var Utils_1 = __webpack_require__(5);
var Initialization_1 = __webpack_require__(8);
var Dom_1 = __webpack_require__(0);
var GlobalExports_1 = __webpack_require__(10);
var ChatterTopic = /** @class */ (function (_super) {
    __extends(ChatterTopic, _super);
    function ChatterTopic(element, options, bindings, result) {
        var _this = _super.call(this, element, ChatterTopic.ID, bindings) || this;
        _this.element = element;
        _this.options = options;
        _this.bindings = bindings;
        _this.result = result;
        if (!Utils_1.Utils.isNullOrUndefined(Utils_1.Utils.getFieldValue(_this.result, 'coveochatterfeedtopics'))) {
            var rootElement = Dom_1.$$('div', {
                className: 'coveo-chatter-result-box-row'
            });
            var topics = Utils_1.Utils.getFieldValue(result, 'coveochatterfeedtopics').split(';');
            var icon = Dom_1.$$('div', {
                className: 'coveo-sprites-common-tagging_tag coveo-chatter-result-box-icon'
            });
            rootElement.append(icon.el);
            for (var i = 0; i < topics.length; i++) {
                var topic = Dom_1.$$('span');
                topic.text(topics[i]);
                rootElement.append(topic.el);
                if (i < topics.length - 1) {
                    var separator = Dom_1.$$('span');
                    separator.text(', ');
                    rootElement.append(separator.el);
                }
            }
            Dom_1.$$(element).append(rootElement.el);
        }
        return _this;
    }
    ChatterTopic.ID = 'ChatterTopic';
    ChatterTopic.doExport = function () {
        GlobalExports_1.exportGlobally({
            ChatterTopic: ChatterTopic
        });
    };
    return ChatterTopic;
}(Component_1.Component));
exports.ChatterTopic = ChatterTopic;
Initialization_1.Initialization.registerAutoCreateComponent(ChatterTopic);
 
 
/***/ }),
/* 1097 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Initialization_1 = __webpack_require__(8);
var fields = ['coveochatterfeedtopics'];
function registerFields() {
    Initialization_1.Initialization.registerComponentFields('ChatterTopic', fields);
}
exports.registerFields = registerFields;
 
 
/***/ }),
/* 1098 */
/***/ (function(module, exports) {
 
// empty (null-loader)
 
/***/ }),
/* 1099 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        if (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            if (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
            if (y = 0, t) op = [0, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
Object.defineProperty(exports, "__esModule", { value: true });
var EndpointCaller_1 = __webpack_require__(165);
var GOOGLE_MAP_BASE_URL = 'https://www.googleapis.com/geolocation/v1/geolocate';
/**
 * The `GoogleApiPositionProvider` class uses the
 * [Google Maps Geolocation API](https://developers.google.com/maps/documentation/geolocation/intro) to provide the
 * position of the end user to a [`DistanceResources`]{@link DistanceResources} component whose
 * [`googleApiKey`]{@link DistanceResources.options.googleApiKey} option is set to a valid  Google Maps Geolocation API
 * key.
 */
var GoogleApiPositionProvider = /** @class */ (function () {
    function GoogleApiPositionProvider(googleApiKey) {
        this.googleApiKey = googleApiKey;
    }
    GoogleApiPositionProvider.prototype.getPosition = function () {
        return __awaiter(this, void 0, void 0, function () {
            var responseData, location;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0: return [4 /*yield*/, new EndpointCaller_1.EndpointCaller().call({
                            errorsAsSuccess: false,
                            method: 'POST',
                            queryString: ["key=" + this.googleApiKey],
                            requestData: {},
                            responseType: 'json',
                            url: GOOGLE_MAP_BASE_URL
                        })];
                    case 1:
                        responseData = _a.sent();
                        location = responseData.data.location;
                        return [2 /*return*/, {
                                longitude: location.lng,
                                latitude: location.lat
                            }];
                }
            });
        });
    };
    return GoogleApiPositionProvider;
}());
exports.GoogleApiPositionProvider = GoogleApiPositionProvider;
 
 
/***/ }),
/* 1100 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
/**
 * The `NavigatorPositionProvider` class uses the current web browser to provide the position of the end user to
 * a [`DistanceResources`]{@link DistanceResources} component whose
 * [`useNavigator`]{DistanceResources.options.useNavigator} option is set to `true`.
 *
 * **Note:**
 * > Recent web browsers typically require a site to be in HTTPS to enable their geolocation service.
 */
var NavigatorPositionProvider = /** @class */ (function () {
    function NavigatorPositionProvider() {
    }
    NavigatorPositionProvider.prototype.getPosition = function () {
        return new Promise(function (resolve, reject) {
            navigator.geolocation.getCurrentPosition(function (position) {
                resolve({
                    latitude: position.coords.latitude,
                    longitude: position.coords.longitude
                });
            }, function (error) {
                reject(error);
            });
        });
    };
    return NavigatorPositionProvider;
}());
exports.NavigatorPositionProvider = NavigatorPositionProvider;
 
 
/***/ }),
/* 1101 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
/**
 * The `StaticPositionProvider` class provides a static end user position to a
 * [`DistanceResources`]{@link DistanceResources} component.
 */
var StaticPositionProvider = /** @class */ (function () {
    function StaticPositionProvider(latitude, longitude) {
        this.latitude = latitude;
        this.longitude = longitude;
    }
    StaticPositionProvider.prototype.getPosition = function () {
        return Promise.resolve({
            longitude: this.longitude,
            latitude: this.latitude
        });
    };
    return StaticPositionProvider;
}());
exports.StaticPositionProvider = StaticPositionProvider;
 
 
/***/ }),
/* 1102 */
/***/ (function(module, exports) {
 
// empty (null-loader)
 
/***/ }),
/* 1103 */
/***/ (function(module, exports) {
 
// empty (null-loader)
 
/***/ }),
/* 1104 */
/***/ (function(module, exports) {
 
// empty (null-loader)
 
/***/ }),
/* 1105 */
/***/ (function(module, exports) {
 
// empty (null-loader)
 
/***/ }),
/* 1106 */
/***/ (function(module, exports) {
 
// empty (null-loader)
 
/***/ }),
/* 1107 */
/***/ (function(module, exports) {
 
// empty (null-loader)
 
/***/ }),
/* 1108 */
/***/ (function(module, exports) {
 
// empty (null-loader)
 
/***/ }),
/* 1109 */
/***/ (function(module, exports) {
 
// empty (null-loader)
 
/***/ }),
/* 1110 */
/***/ (function(module, exports) {
 
// empty (null-loader)
 
/***/ }),
/* 1111 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var KeyboardUtils_1 = __webpack_require__(35);
var FacetSearchUserInputHandler = /** @class */ (function () {
    function FacetSearchUserInputHandler(facetSearch) {
        this.facetSearch = facetSearch;
    }
    FacetSearchUserInputHandler.prototype.handleKeyboardEvent = function (event) {
        switch (event.which) {
            case KeyboardUtils_1.KEYBOARD.ENTER:
                this.facetSearch.keyboardNavigationEnterPressed(event);
                break;
            case KeyboardUtils_1.KEYBOARD.DELETE:
                this.facetSearch.keyboardNavigationDeletePressed && this.facetSearch.keyboardNavigationDeletePressed(event);
                break;
            case KeyboardUtils_1.KEYBOARD.ESCAPE:
                this.facetSearch.dismissSearchResults();
                break;
            case KeyboardUtils_1.KEYBOARD.DOWN_ARROW:
                this.facetSearch.facetSearchElement.moveCurrentResultDown();
                break;
            case KeyboardUtils_1.KEYBOARD.UP_ARROW:
                this.facetSearch.facetSearchElement.moveCurrentResultUp();
                break;
            default:
                this.facetSearch.keyboardEventDefaultHandler();
        }
    };
    FacetSearchUserInputHandler.prototype.handleFacetSearchResultsScroll = function () {
        if (this.facetSearch.facetSearchPromise ||
            this.facetSearch.facetSearchElement.getValueInInputForFacetSearch() != '' ||
            !this.facetSearch.moreValuesToFetch) {
            return;
        }
        var elementHeight = this.facetSearch.facetSearchElement.searchResults.clientHeight;
        var scrollHeight = this.facetSearch.facetSearchElement.searchResults.scrollHeight;
        var bottomPosition = this.facetSearch.facetSearchElement.searchResults.scrollTop + elementHeight;
        if (scrollHeight - bottomPosition < elementHeight / 2) {
            this.facetSearch.fetchMoreValues();
        }
    };
    return FacetSearchUserInputHandler;
}());
exports.FacetSearchUserInputHandler = FacetSearchUserInputHandler;
 
 
/***/ }),
/* 1112 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __assign = (this && this.__assign) || Object.assign || function(t) {
    for (var s, i = 1, n = arguments.length; i < n; i++) {
        s = arguments[i];
        for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
            t[p] = s[p];
    }
    return t;
};
Object.defineProperty(exports, "__esModule", { value: true });
var DefaultSearchDropdownNavigator_1 = __webpack_require__(681);
var FacetSearchDropdownNavigator_1 = __webpack_require__(1113);
var CategoryFacet_1 = __webpack_require__(71);
var Facet_1 = __webpack_require__(32);
function SearchDropdownNavigatorFactory(facetSearch, config) {
    switch (facetSearch.facetType) {
        case Facet_1.Facet.ID:
            return new FacetSearchDropdownNavigator_1.FacetSearchDropdownNavigator(__assign({}, config, { facetSearch: facetSearch }));
        case CategoryFacet_1.CategoryFacet.ID:
        default:
            return new DefaultSearchDropdownNavigator_1.DefaultSearchDropdownNavigator(config);
    }
}
exports.SearchDropdownNavigatorFactory = SearchDropdownNavigatorFactory;
 
 
/***/ }),
/* 1113 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var DefaultSearchDropdownNavigator_1 = __webpack_require__(681);
var Dom_1 = __webpack_require__(0);
var FacetSearchDropdownNavigator = /** @class */ (function () {
    function FacetSearchDropdownNavigator(config) {
        this.config = config;
        this.defaultDropdownNavigator = new DefaultSearchDropdownNavigator_1.DefaultSearchDropdownNavigator(config);
    }
    FacetSearchDropdownNavigator.prototype.setAsCurrentResult = function (dom) {
        this.defaultDropdownNavigator.setAsCurrentResult(dom);
    };
    Object.defineProperty(FacetSearchDropdownNavigator.prototype, "currentResult", {
        get: function () {
            return this.defaultDropdownNavigator.currentResult;
        },
        enumerable: true,
        configurable: true
    });
    FacetSearchDropdownNavigator.prototype.focusNextElement = function () {
        this.toggleCanExcludeCurrentResult();
        if (this.willExcludeCurrentResult) {
            this.announceCurrentResultCanBeExcluded();
            return;
        }
        this.defaultDropdownNavigator.moveCurrentResultDown();
    };
    FacetSearchDropdownNavigator.prototype.focusPreviousElement = function () {
        Iif (this.willExcludeCurrentResult) {
            this.toggleCanExcludeCurrentResult();
            return;
        }
        this.moveResultUp();
        this.toggleCanExcludeCurrentResult();
    };
    FacetSearchDropdownNavigator.prototype.moveResultUp = function () {
        Iif (this.willExcludeCurrentResult) {
            this.toggleCanExcludeCurrentResult();
            return;
        }
        this.defaultDropdownNavigator.moveCurrentResultUp();
        this.toggleCanExcludeCurrentResult();
    };
    Object.defineProperty(FacetSearchDropdownNavigator.prototype, "isCurrentResultNotAFacetValue", {
        get: function () {
            return this.currentResult.hasClass('coveo-facet-search-select-all') || this.currentResult.hasClass('coveo-facet-value-not-found');
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(FacetSearchDropdownNavigator.prototype, "willExcludeCurrentResult", {
        get: function () {
            return this.currentResult.hasClass('coveo-facet-value-will-exclude');
        },
        enumerable: true,
        configurable: true
    });
    FacetSearchDropdownNavigator.prototype.toggleCanExcludeCurrentResult = function () {
        Iif (this.isCurrentResultNotAFacetValue) {
            return;
        }
        this.currentResult.toggleClass('coveo-facet-value-will-exclude', !this.willExcludeCurrentResult);
    };
    FacetSearchDropdownNavigator.prototype.announceCurrentResultCanBeExcluded = function () {
        Iif (this.isCurrentResultNotAFacetValue) {
            return;
        }
        var excludeIcon = Dom_1.$$(this.currentResult).find('.coveo-facet-value-exclude');
        this.config.facetSearch.updateAriaLive(excludeIcon.getAttribute('aria-label'));
    };
    return FacetSearchDropdownNavigator;
}());
exports.FacetSearchDropdownNavigator = FacetSearchDropdownNavigator;
 
 
/***/ }),
/* 1114 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var CategoryValueChildrenRenderer_1 = __webpack_require__(683);
var CategoryValueRoot = /** @class */ (function () {
    function CategoryValueRoot(element, categoryFacetTemplates, categoryFacet) {
        this.element = element;
        this.path = [];
        this.categoryChildrenValueRenderer = new CategoryValueChildrenRenderer_1.CategoryChildrenValueRenderer(element, categoryFacetTemplates, this, categoryFacet);
        this.listRoot = categoryFacetTemplates.buildListRoot();
        this.appendListRoot();
    }
    CategoryValueRoot.prototype.renderChildren = function (values) {
        this.appendListRoot();
        this.categoryChildrenValueRenderer.renderChildren(values);
    };
    CategoryValueRoot.prototype.renderAsParent = function (value) {
        this.appendListRoot();
        return this.categoryChildrenValueRenderer.renderAsParent(value);
    };
    Object.defineProperty(CategoryValueRoot.prototype, "children", {
        get: function () {
            return this.categoryChildrenValueRenderer.children;
        },
        enumerable: true,
        configurable: true
    });
    CategoryValueRoot.prototype.clear = function () {
        this.listRoot.detach();
        this.listRoot.empty();
        this.categoryChildrenValueRenderer.clearChildren();
    };
    CategoryValueRoot.prototype.appendListRoot = function () {
        this.element.append(this.listRoot.el);
    };
    return CategoryValueRoot;
}());
exports.CategoryValueRoot = CategoryValueRoot;
 
 
/***/ }),
/* 1115 */
/***/ (function(module, exports) {
 
// empty (null-loader)
 
/***/ }),
/* 1116 */
/***/ (function(module, exports) {
 
// empty (null-loader)
 
/***/ }),
/* 1117 */
/***/ (function(module, exports) {
 
// empty (null-loader)
 
/***/ }),
/* 1118 */
/***/ (function(module, exports) {
 
// empty (null-loader)
 
/***/ }),
/* 1119 */
/***/ (function(module, exports) {
 
// empty (null-loader)
 
/***/ }),
/* 1120 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var ResponsiveComponentsManager_1 = __webpack_require__(70);
var SearchInterface_1 = __webpack_require__(25);
var ResultList_1 = __webpack_require__(68);
var Dom_1 = __webpack_require__(0);
var Component_1 = __webpack_require__(6);
var Logger_1 = __webpack_require__(18);
var ResponsiveDefaultResultTemplate = /** @class */ (function () {
    function ResponsiveDefaultResultTemplate(coveoRoot, ID, options, responsiveDropdown) {
        this.coveoRoot = coveoRoot;
        this.ID = ID;
        this.searchInterface = Component_1.Component.get(this.coveoRoot.el, SearchInterface_1.SearchInterface, false);
        this.currentMode = 'large';
    }
    ResponsiveDefaultResultTemplate.init = function (root, component, options) {
        if (!Dom_1.$$(root).find("." + Component_1.Component.computeCssClassName(ResultList_1.ResultList))) {
            var logger = new Logger_1.Logger('ResponsiveDefaultResultTemplate');
            logger.trace('No ResultLayout component found : Cannot instantiate ResponsiveResultLayout');
            return;
        }
        ResponsiveComponentsManager_1.ResponsiveComponentsManager.register(ResponsiveDefaultResultTemplate, Dom_1.$$(root), ResultList_1.ResultList.ID, component, options);
    };
    ResponsiveDefaultResultTemplate.prototype.registerComponent = function (accept) {
        if (accept instanceof ResultList_1.ResultList) {
            this.resultList = accept;
            return true;
        }
        return false;
    };
    ResponsiveDefaultResultTemplate.prototype.handleResizeEvent = function () {
        var _this = this;
        var lastResults = this.resultList.queryController.getLastResults();
        if (this.needSmallMode()) {
            Dom_1.$$(this.resultList.options.resultsContainer).addClass('coveo-card-layout-container');
            Dom_1.$$(this.resultList.options.resultsContainer).removeClass("coveo-list-layout-container");
            if (this.currentMode != 'small') {
                if (lastResults) {
                    this.resultList.buildResults(lastResults).then(function (elements) {
                        _this.resultList.renderResults(elements);
                    });
                }
                this.currentMode = 'small';
            }
        }
        else {
            Dom_1.$$(this.resultList.options.resultsContainer).removeClass('coveo-card-layout-container');
            Dom_1.$$(this.resultList.options.resultsContainer).addClass("coveo-list-layout-container");
            if (this.currentMode != 'large') {
                if (lastResults) {
                    this.resultList.buildResults(lastResults).then(function (elements) {
                        _this.resultList.renderResults(elements);
                    });
                }
                this.currentMode = 'large';
            }
        }
    };
    ResponsiveDefaultResultTemplate.prototype.needSmallMode = function () {
        return this.coveoRoot.width() <= this.searchInterface.responsiveComponents.getSmallScreenWidth();
    };
    return ResponsiveDefaultResultTemplate;
}());
exports.ResponsiveDefaultResultTemplate = ResponsiveDefaultResultTemplate;
 
 
/***/ }),
/* 1121 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Dom_1 = __webpack_require__(0);
var ResultContainer = /** @class */ (function () {
    function ResultContainer(resultContainer, searchInterface) {
        this.searchInterface = searchInterface;
        this.resultContainerElement = Dom_1.$$(resultContainer);
    }
    ResultContainer.prototype.empty = function () {
        this.searchInterface.detachComponentsInside(this.resultContainerElement.el);
        Dom_1.$$(this.resultContainerElement).empty();
    };
    ResultContainer.prototype.addClass = function (classToAdd) {
        this.resultContainerElement.addClass(classToAdd);
    };
    ResultContainer.prototype.isEmpty = function () {
        return this.resultContainerElement.isEmpty();
    };
    ResultContainer.prototype.hideChildren = function () {
        this.resultContainerElement.children().forEach(function (child) { return Dom_1.$$(child).hide(); });
    };
    ResultContainer.prototype.getResultElements = function () {
        return this.resultContainerElement.findAll('.CoveoResult');
    };
    Object.defineProperty(ResultContainer.prototype, "el", {
        get: function () {
            return this.resultContainerElement.el;
        },
        enumerable: true,
        configurable: true
    });
    ResultContainer.resultCurrentlyBeingRendered = null;
    return ResultContainer;
}());
exports.ResultContainer = ResultContainer;
 
 
/***/ }),
/* 1122 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
var ResultListRenderer_1 = __webpack_require__(332);
var Dom_1 = __webpack_require__(0);
var _ = __webpack_require__(1);
var ResultListCardRenderer = /** @class */ (function (_super) {
    __extends(ResultListCardRenderer, _super);
    function ResultListCardRenderer() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    ResultListCardRenderer.prototype.getEndFragment = function (resultElements) {
        var _this = this;
        return new Promise(function (resolve) {
            Eif (!_.isEmpty(resultElements)) {
                // with infinite scrolling, we want the additional results to append at the end of the previous query.
                // For this, we need to remove the padding.
                Iif (_this.resultListOptions.enableInfiniteScroll) {
                    var needToBeRemoved = Dom_1.$$(_this.resultListOptions.resultsContainer).findAll('.coveo-card-layout-padding');
                    _.each(needToBeRemoved, function (toRemove) { return Dom_1.$$(toRemove).remove(); });
                }
                // Used to prevent last card from spanning the grid's whole width
                var emptyCards_1 = document.createDocumentFragment();
                _.times(3, function () { return emptyCards_1.appendChild(Dom_1.$$('div', { className: 'coveo-card-layout coveo-card-layout-padding' }).el); });
                resolve(emptyCards_1);
            }
            resolve(null);
        });
    };
    return ResultListCardRenderer;
}(ResultListRenderer_1.ResultListRenderer));
exports.ResultListCardRenderer = ResultListCardRenderer;
 
 
/***/ }),
/* 1123 */
/***/ (function(module, exports) {
 
// empty (null-loader)
 
/***/ }),
/* 1124 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
/// <reference path="../ui/FacetRange/FacetRange.ts" />
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
var FacetQueryController_1 = __webpack_require__(184);
var Utils_1 = __webpack_require__(5);
var FacetRangeQueryController = /** @class */ (function (_super) {
    __extends(FacetRangeQueryController, _super);
    function FacetRangeQueryController(facet) {
        var _this = _super.call(this, facet) || this;
        _this.facet = facet;
        return _this;
    }
    FacetRangeQueryController.prototype.createBasicGroupByRequest = function (allowedValues, addComputedField) {
        Eif (addComputedField === void 0) { addComputedField = true; }
        var groupByQuery = _super.prototype.createBasicGroupByRequest.call(this, null, addComputedField);
        groupByQuery.allowedValues = undefined;
        Iif (Utils_1.Utils.isNonEmptyArray(this.facet.options.ranges)) {
            groupByQuery = this.buildGroupByQueryForPredefinedRanges(groupByQuery);
        }
        else {
            groupByQuery = this.buildGroupByQueryForAutomaticRanges(groupByQuery);
        }
        return groupByQuery;
    };
    FacetRangeQueryController.prototype.createGroupByAllowedValues = function () {
        return undefined;
    };
    FacetRangeQueryController.prototype.buildGroupByQueryForAutomaticRanges = function (groupByQuery) {
        groupByQuery.generateAutomaticRanges = true;
        return groupByQuery;
    };
    FacetRangeQueryController.prototype.buildGroupByQueryForPredefinedRanges = function (groupByQuery) {
        groupByQuery.rangeValues = this.facet.options.ranges;
        groupByQuery.maximumNumberOfValues = this.facet.options.ranges.length;
        return groupByQuery;
    };
    return FacetRangeQueryController;
}(FacetQueryController_1.FacetQueryController));
exports.FacetRangeQueryController = FacetRangeQueryController;
 
 
/***/ }),
/* 1125 */
/***/ (function(module, exports) {
 
// empty (null-loader)
 
/***/ }),
/* 1126 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__dist_package_js__ = __webpack_require__(1127);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "version", function() { return __WEBPACK_IMPORTED_MODULE_0__dist_package_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_d3_array__ = __webpack_require__(44);
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "bisect", function() { return __WEBPACK_IMPORTED_MODULE_1_d3_array__["b"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "bisectRight", function() { return __WEBPACK_IMPORTED_MODULE_1_d3_array__["d"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "bisectLeft", function() { return __WEBPACK_IMPORTED_MODULE_1_d3_array__["c"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "ascending", function() { return __WEBPACK_IMPORTED_MODULE_1_d3_array__["a"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "bisector", function() { return __WEBPACK_IMPORTED_MODULE_1_d3_array__["e"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "cross", function() { return __WEBPACK_IMPORTED_MODULE_1_d3_array__["f"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "descending", function() { return __WEBPACK_IMPORTED_MODULE_1_d3_array__["g"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "deviation", function() { return __WEBPACK_IMPORTED_MODULE_1_d3_array__["h"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "extent", function() { return __WEBPACK_IMPORTED_MODULE_1_d3_array__["i"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "histogram", function() { return __WEBPACK_IMPORTED_MODULE_1_d3_array__["j"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "thresholdFreedmanDiaconis", function() { return __WEBPACK_IMPORTED_MODULE_1_d3_array__["w"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "thresholdScott", function() { return __WEBPACK_IMPORTED_MODULE_1_d3_array__["x"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "thresholdSturges", function() { return __WEBPACK_IMPORTED_MODULE_1_d3_array__["y"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "max", function() { return __WEBPACK_IMPORTED_MODULE_1_d3_array__["k"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "mean", function() { return __WEBPACK_IMPORTED_MODULE_1_d3_array__["l"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "median", function() { return __WEBPACK_IMPORTED_MODULE_1_d3_array__["m"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "merge", function() { return __WEBPACK_IMPORTED_MODULE_1_d3_array__["n"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "min", function() { return __WEBPACK_IMPORTED_MODULE_1_d3_array__["o"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "pairs", function() { return __WEBPACK_IMPORTED_MODULE_1_d3_array__["p"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "permute", function() { return __WEBPACK_IMPORTED_MODULE_1_d3_array__["q"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "quantile", function() { return __WEBPACK_IMPORTED_MODULE_1_d3_array__["r"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "range", function() { return __WEBPACK_IMPORTED_MODULE_1_d3_array__["s"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "scan", function() { return __WEBPACK_IMPORTED_MODULE_1_d3_array__["t"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "shuffle", function() { return __WEBPACK_IMPORTED_MODULE_1_d3_array__["u"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "sum", function() { return __WEBPACK_IMPORTED_MODULE_1_d3_array__["v"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "ticks", function() { return __WEBPACK_IMPORTED_MODULE_1_d3_array__["B"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "tickIncrement", function() { return __WEBPACK_IMPORTED_MODULE_1_d3_array__["z"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "tickStep", function() { return __WEBPACK_IMPORTED_MODULE_1_d3_array__["A"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "transpose", function() { return __WEBPACK_IMPORTED_MODULE_1_d3_array__["C"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "variance", function() { return __WEBPACK_IMPORTED_MODULE_1_d3_array__["D"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "zip", function() { return __WEBPACK_IMPORTED_MODULE_1_d3_array__["E"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_d3_axis__ = __webpack_require__(1144);
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "axisTop", function() { return __WEBPACK_IMPORTED_MODULE_2_d3_axis__["d"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "axisRight", function() { return __WEBPACK_IMPORTED_MODULE_2_d3_axis__["c"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "axisBottom", function() { return __WEBPACK_IMPORTED_MODULE_2_d3_axis__["a"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "axisLeft", function() { return __WEBPACK_IMPORTED_MODULE_2_d3_axis__["b"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_d3_brush__ = __webpack_require__(1148);
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "brush", function() { return __WEBPACK_IMPORTED_MODULE_3_d3_brush__["a"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "brushX", function() { return __WEBPACK_IMPORTED_MODULE_3_d3_brush__["c"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "brushY", function() { return __WEBPACK_IMPORTED_MODULE_3_d3_brush__["d"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "brushSelection", function() { return __WEBPACK_IMPORTED_MODULE_3_d3_brush__["b"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_d3_chord__ = __webpack_require__(1241);
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "chord", function() { return __WEBPACK_IMPORTED_MODULE_4_d3_chord__["a"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "ribbon", function() { return __WEBPACK_IMPORTED_MODULE_4_d3_chord__["b"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_d3_collection__ = __webpack_require__(249);
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "nest", function() { return __WEBPACK_IMPORTED_MODULE_5_d3_collection__["d"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "set", function() { return __WEBPACK_IMPORTED_MODULE_5_d3_collection__["e"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "map", function() { return __WEBPACK_IMPORTED_MODULE_5_d3_collection__["c"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "keys", function() { return __WEBPACK_IMPORTED_MODULE_5_d3_collection__["b"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "values", function() { return __WEBPACK_IMPORTED_MODULE_5_d3_collection__["f"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "entries", function() { return __WEBPACK_IMPORTED_MODULE_5_d3_collection__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_d3_color__ = __webpack_require__(74);
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "color", function() { return __WEBPACK_IMPORTED_MODULE_6_d3_color__["a"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "rgb", function() { return __WEBPACK_IMPORTED_MODULE_6_d3_color__["h"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "hsl", function() { return __WEBPACK_IMPORTED_MODULE_6_d3_color__["e"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "lab", function() { return __WEBPACK_IMPORTED_MODULE_6_d3_color__["f"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "hcl", function() { return __WEBPACK_IMPORTED_MODULE_6_d3_color__["d"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "lch", function() { return __WEBPACK_IMPORTED_MODULE_6_d3_color__["g"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "gray", function() { return __WEBPACK_IMPORTED_MODULE_6_d3_color__["c"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "cubehelix", function() { return __WEBPACK_IMPORTED_MODULE_6_d3_color__["b"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_d3_contour__ = __webpack_require__(1252);
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "contours", function() { return __WEBPACK_IMPORTED_MODULE_7_d3_contour__["b"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "contourDensity", function() { return __WEBPACK_IMPORTED_MODULE_7_d3_contour__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_d3_dispatch__ = __webpack_require__(149);
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "dispatch", function() { return __WEBPACK_IMPORTED_MODULE_8_d3_dispatch__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_d3_drag__ = __webpack_require__(336);
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "drag", function() { return __WEBPACK_IMPORTED_MODULE_9_d3_drag__["a"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "dragDisable", function() { return __WEBPACK_IMPORTED_MODULE_9_d3_drag__["b"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "dragEnable", function() { return __WEBPACK_IMPORTED_MODULE_9_d3_drag__["c"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10_d3_dsv__ = __webpack_require__(733);
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "dsvFormat", function() { return __WEBPACK_IMPORTED_MODULE_10_d3_dsv__["i"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "csvParse", function() { return __WEBPACK_IMPORTED_MODULE_10_d3_dsv__["g"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "csvParseRows", function() { return __WEBPACK_IMPORTED_MODULE_10_d3_dsv__["h"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "csvFormat", function() { return __WEBPACK_IMPORTED_MODULE_10_d3_dsv__["b"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "csvFormatBody", function() { return __WEBPACK_IMPORTED_MODULE_10_d3_dsv__["c"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "csvFormatRows", function() { return __WEBPACK_IMPORTED_MODULE_10_d3_dsv__["e"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "csvFormatRow", function() { return __WEBPACK_IMPORTED_MODULE_10_d3_dsv__["d"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "csvFormatValue", function() { return __WEBPACK_IMPORTED_MODULE_10_d3_dsv__["f"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "tsvParse", function() { return __WEBPACK_IMPORTED_MODULE_10_d3_dsv__["o"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "tsvParseRows", function() { return __WEBPACK_IMPORTED_MODULE_10_d3_dsv__["p"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "tsvFormat", function() { return __WEBPACK_IMPORTED_MODULE_10_d3_dsv__["j"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "tsvFormatBody", function() { return __WEBPACK_IMPORTED_MODULE_10_d3_dsv__["k"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "tsvFormatRows", function() { return __WEBPACK_IMPORTED_MODULE_10_d3_dsv__["m"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "tsvFormatRow", function() { return __WEBPACK_IMPORTED_MODULE_10_d3_dsv__["l"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "tsvFormatValue", function() { return __WEBPACK_IMPORTED_MODULE_10_d3_dsv__["n"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "autoType", function() { return __WEBPACK_IMPORTED_MODULE_10_d3_dsv__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11_d3_ease__ = __webpack_require__(727);
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "easeLinear", function() { return __WEBPACK_IMPORTED_MODULE_11_d3_ease__["y"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "easeQuad", function() { return __WEBPACK_IMPORTED_MODULE_11_d3_ease__["D"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "easeQuadIn", function() { return __WEBPACK_IMPORTED_MODULE_11_d3_ease__["E"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "easeQuadOut", function() { return __WEBPACK_IMPORTED_MODULE_11_d3_ease__["G"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "easeQuadInOut", function() { return __WEBPACK_IMPORTED_MODULE_11_d3_ease__["F"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "easeCubic", function() { return __WEBPACK_IMPORTED_MODULE_11_d3_ease__["m"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "easeCubicIn", function() { return __WEBPACK_IMPORTED_MODULE_11_d3_ease__["n"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "easeCubicOut", function() { return __WEBPACK_IMPORTED_MODULE_11_d3_ease__["p"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "easeCubicInOut", function() { return __WEBPACK_IMPORTED_MODULE_11_d3_ease__["o"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "easePoly", function() { return __WEBPACK_IMPORTED_MODULE_11_d3_ease__["z"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "easePolyIn", function() { return __WEBPACK_IMPORTED_MODULE_11_d3_ease__["A"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "easePolyOut", function() { return __WEBPACK_IMPORTED_MODULE_11_d3_ease__["C"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "easePolyInOut", function() { return __WEBPACK_IMPORTED_MODULE_11_d3_ease__["B"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "easeSin", function() { return __WEBPACK_IMPORTED_MODULE_11_d3_ease__["H"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "easeSinIn", function() { return __WEBPACK_IMPORTED_MODULE_11_d3_ease__["I"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "easeSinOut", function() { return __WEBPACK_IMPORTED_MODULE_11_d3_ease__["K"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "easeSinInOut", function() { return __WEBPACK_IMPORTED_MODULE_11_d3_ease__["J"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "easeExp", function() { return __WEBPACK_IMPORTED_MODULE_11_d3_ease__["u"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "easeExpIn", function() { return __WEBPACK_IMPORTED_MODULE_11_d3_ease__["v"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "easeExpOut", function() { return __WEBPACK_IMPORTED_MODULE_11_d3_ease__["x"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "easeExpInOut", function() { return __WEBPACK_IMPORTED_MODULE_11_d3_ease__["w"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "easeCircle", function() { return __WEBPACK_IMPORTED_MODULE_11_d3_ease__["i"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "easeCircleIn", function() { return __WEBPACK_IMPORTED_MODULE_11_d3_ease__["j"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "easeCircleOut", function() { return __WEBPACK_IMPORTED_MODULE_11_d3_ease__["l"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "easeCircleInOut", function() { return __WEBPACK_IMPORTED_MODULE_11_d3_ease__["k"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "easeBounce", function() { return __WEBPACK_IMPORTED_MODULE_11_d3_ease__["e"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "easeBounceIn", function() { return __WEBPACK_IMPORTED_MODULE_11_d3_ease__["f"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "easeBounceOut", function() { return __WEBPACK_IMPORTED_MODULE_11_d3_ease__["h"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "easeBounceInOut", function() { return __WEBPACK_IMPORTED_MODULE_11_d3_ease__["g"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "easeBack", function() { return __WEBPACK_IMPORTED_MODULE_11_d3_ease__["a"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "easeBackIn", function() { return __WEBPACK_IMPORTED_MODULE_11_d3_ease__["b"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "easeBackOut", function() { return __WEBPACK_IMPORTED_MODULE_11_d3_ease__["d"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "easeBackInOut", function() { return __WEBPACK_IMPORTED_MODULE_11_d3_ease__["c"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "easeElastic", function() { return __WEBPACK_IMPORTED_MODULE_11_d3_ease__["q"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "easeElasticIn", function() { return __WEBPACK_IMPORTED_MODULE_11_d3_ease__["r"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "easeElasticOut", function() { return __WEBPACK_IMPORTED_MODULE_11_d3_ease__["t"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "easeElasticInOut", function() { return __WEBPACK_IMPORTED_MODULE_11_d3_ease__["s"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12_d3_fetch__ = __webpack_require__(1262);
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "blob", function() { return __WEBPACK_IMPORTED_MODULE_12_d3_fetch__["a"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "buffer", function() { return __WEBPACK_IMPORTED_MODULE_12_d3_fetch__["b"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "dsv", function() { return __WEBPACK_IMPORTED_MODULE_12_d3_fetch__["d"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "csv", function() { return __WEBPACK_IMPORTED_MODULE_12_d3_fetch__["c"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "tsv", function() { return __WEBPACK_IMPORTED_MODULE_12_d3_fetch__["j"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "image", function() { return __WEBPACK_IMPORTED_MODULE_12_d3_fetch__["f"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "json", function() { return __WEBPACK_IMPORTED_MODULE_12_d3_fetch__["g"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "text", function() { return __WEBPACK_IMPORTED_MODULE_12_d3_fetch__["i"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "xml", function() { return __WEBPACK_IMPORTED_MODULE_12_d3_fetch__["k"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "html", function() { return __WEBPACK_IMPORTED_MODULE_12_d3_fetch__["e"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "svg", function() { return __WEBPACK_IMPORTED_MODULE_12_d3_fetch__["h"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13_d3_force__ = __webpack_require__(1269);
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "forceCenter", function() { return __WEBPACK_IMPORTED_MODULE_13_d3_force__["a"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "forceCollide", function() { return __WEBPACK_IMPORTED_MODULE_13_d3_force__["b"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "forceLink", function() { return __WEBPACK_IMPORTED_MODULE_13_d3_force__["c"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "forceManyBody", function() { return __WEBPACK_IMPORTED_MODULE_13_d3_force__["d"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "forceRadial", function() { return __WEBPACK_IMPORTED_MODULE_13_d3_force__["e"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "forceSimulation", function() { return __WEBPACK_IMPORTED_MODULE_13_d3_force__["f"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "forceX", function() { return __WEBPACK_IMPORTED_MODULE_13_d3_force__["g"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "forceY", function() { return __WEBPACK_IMPORTED_MODULE_13_d3_force__["h"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14_d3_format__ = __webpack_require__(356);
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "formatDefaultLocale", function() { return __WEBPACK_IMPORTED_MODULE_14_d3_format__["c"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "format", function() { return __WEBPACK_IMPORTED_MODULE_14_d3_format__["b"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "formatPrefix", function() { return __WEBPACK_IMPORTED_MODULE_14_d3_format__["e"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "formatLocale", function() { return __WEBPACK_IMPORTED_MODULE_14_d3_format__["d"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "formatSpecifier", function() { return __WEBPACK_IMPORTED_MODULE_14_d3_format__["f"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "FormatSpecifier", function() { return __WEBPACK_IMPORTED_MODULE_14_d3_format__["a"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "precisionFixed", function() { return __WEBPACK_IMPORTED_MODULE_14_d3_format__["g"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "precisionPrefix", function() { return __WEBPACK_IMPORTED_MODULE_14_d3_format__["h"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "precisionRound", function() { return __WEBPACK_IMPORTED_MODULE_14_d3_format__["i"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_15_d3_geo__ = __webpack_require__(1300);
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "geoArea", function() { return __WEBPACK_IMPORTED_MODULE_15_d3_geo__["c"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "geoBounds", function() { return __WEBPACK_IMPORTED_MODULE_15_d3_geo__["h"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "geoCentroid", function() { return __WEBPACK_IMPORTED_MODULE_15_d3_geo__["i"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "geoCircle", function() { return __WEBPACK_IMPORTED_MODULE_15_d3_geo__["j"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "geoClipAntimeridian", function() { return __WEBPACK_IMPORTED_MODULE_15_d3_geo__["k"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "geoClipCircle", function() { return __WEBPACK_IMPORTED_MODULE_15_d3_geo__["l"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "geoClipExtent", function() { return __WEBPACK_IMPORTED_MODULE_15_d3_geo__["m"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "geoClipRectangle", function() { return __WEBPACK_IMPORTED_MODULE_15_d3_geo__["n"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "geoContains", function() { return __WEBPACK_IMPORTED_MODULE_15_d3_geo__["u"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "geoDistance", function() { return __WEBPACK_IMPORTED_MODULE_15_d3_geo__["v"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "geoGraticule", function() { return __WEBPACK_IMPORTED_MODULE_15_d3_geo__["C"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "geoGraticule10", function() { return __WEBPACK_IMPORTED_MODULE_15_d3_geo__["D"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "geoInterpolate", function() { return __WEBPACK_IMPORTED_MODULE_15_d3_geo__["F"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "geoLength", function() { return __WEBPACK_IMPORTED_MODULE_15_d3_geo__["G"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "geoPath", function() { return __WEBPACK_IMPORTED_MODULE_15_d3_geo__["N"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "geoAlbers", function() { return __WEBPACK_IMPORTED_MODULE_15_d3_geo__["a"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "geoAlbersUsa", function() { return __WEBPACK_IMPORTED_MODULE_15_d3_geo__["b"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "geoAzimuthalEqualArea", function() { return __WEBPACK_IMPORTED_MODULE_15_d3_geo__["d"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "geoAzimuthalEqualAreaRaw", function() { return __WEBPACK_IMPORTED_MODULE_15_d3_geo__["e"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "geoAzimuthalEquidistant", function() { return __WEBPACK_IMPORTED_MODULE_15_d3_geo__["f"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "geoAzimuthalEquidistantRaw", function() { return __WEBPACK_IMPORTED_MODULE_15_d3_geo__["g"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "geoConicConformal", function() { return __WEBPACK_IMPORTED_MODULE_15_d3_geo__["o"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "geoConicConformalRaw", function() { return __WEBPACK_IMPORTED_MODULE_15_d3_geo__["p"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "geoConicEqualArea", function() { return __WEBPACK_IMPORTED_MODULE_15_d3_geo__["q"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "geoConicEqualAreaRaw", function() { return __WEBPACK_IMPORTED_MODULE_15_d3_geo__["r"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "geoConicEquidistant", function() { return __WEBPACK_IMPORTED_MODULE_15_d3_geo__["s"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "geoConicEquidistantRaw", function() { return __WEBPACK_IMPORTED_MODULE_15_d3_geo__["t"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "geoEqualEarth", function() { return __WEBPACK_IMPORTED_MODULE_15_d3_geo__["w"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "geoEqualEarthRaw", function() { return __WEBPACK_IMPORTED_MODULE_15_d3_geo__["x"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "geoEquirectangular", function() { return __WEBPACK_IMPORTED_MODULE_15_d3_geo__["y"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "geoEquirectangularRaw", function() { return __WEBPACK_IMPORTED_MODULE_15_d3_geo__["z"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "geoGnomonic", function() { return __WEBPACK_IMPORTED_MODULE_15_d3_geo__["A"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "geoGnomonicRaw", function() { return __WEBPACK_IMPORTED_MODULE_15_d3_geo__["B"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "geoIdentity", function() { return __WEBPACK_IMPORTED_MODULE_15_d3_geo__["E"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "geoProjection", function() { return __WEBPACK_IMPORTED_MODULE_15_d3_geo__["O"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "geoProjectionMutator", function() { return __WEBPACK_IMPORTED_MODULE_15_d3_geo__["P"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "geoMercator", function() { return __WEBPACK_IMPORTED_MODULE_15_d3_geo__["H"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "geoMercatorRaw", function() { return __WEBPACK_IMPORTED_MODULE_15_d3_geo__["I"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "geoNaturalEarth1", function() { return __WEBPACK_IMPORTED_MODULE_15_d3_geo__["J"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "geoNaturalEarth1Raw", function() { return __WEBPACK_IMPORTED_MODULE_15_d3_geo__["K"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "geoOrthographic", function() { return __WEBPACK_IMPORTED_MODULE_15_d3_geo__["L"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "geoOrthographicRaw", function() { return __WEBPACK_IMPORTED_MODULE_15_d3_geo__["M"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "geoStereographic", function() { return __WEBPACK_IMPORTED_MODULE_15_d3_geo__["R"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "geoStereographicRaw", function() { return __WEBPACK_IMPORTED_MODULE_15_d3_geo__["S"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "geoTransverseMercator", function() { return __WEBPACK_IMPORTED_MODULE_15_d3_geo__["V"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "geoTransverseMercatorRaw", function() { return __WEBPACK_IMPORTED_MODULE_15_d3_geo__["W"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "geoRotation", function() { return __WEBPACK_IMPORTED_MODULE_15_d3_geo__["Q"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "geoStream", function() { return __WEBPACK_IMPORTED_MODULE_15_d3_geo__["T"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "geoTransform", function() { return __WEBPACK_IMPORTED_MODULE_15_d3_geo__["U"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_16_d3_hierarchy__ = __webpack_require__(1329);
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "cluster", function() { return __WEBPACK_IMPORTED_MODULE_16_d3_hierarchy__["a"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "hierarchy", function() { return __WEBPACK_IMPORTED_MODULE_16_d3_hierarchy__["b"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "pack", function() { return __WEBPACK_IMPORTED_MODULE_16_d3_hierarchy__["c"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "packSiblings", function() { return __WEBPACK_IMPORTED_MODULE_16_d3_hierarchy__["e"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "packEnclose", function() { return __WEBPACK_IMPORTED_MODULE_16_d3_hierarchy__["d"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "partition", function() { return __WEBPACK_IMPORTED_MODULE_16_d3_hierarchy__["f"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "stratify", function() { return __WEBPACK_IMPORTED_MODULE_16_d3_hierarchy__["g"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "tree", function() { return __WEBPACK_IMPORTED_MODULE_16_d3_hierarchy__["h"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "treemap", function() { return __WEBPACK_IMPORTED_MODULE_16_d3_hierarchy__["i"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "treemapBinary", function() { return __WEBPACK_IMPORTED_MODULE_16_d3_hierarchy__["j"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "treemapDice", function() { return __WEBPACK_IMPORTED_MODULE_16_d3_hierarchy__["k"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "treemapSlice", function() { return __WEBPACK_IMPORTED_MODULE_16_d3_hierarchy__["m"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "treemapSliceDice", function() { return __WEBPACK_IMPORTED_MODULE_16_d3_hierarchy__["n"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "treemapSquarify", function() { return __WEBPACK_IMPORTED_MODULE_16_d3_hierarchy__["o"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "treemapResquarify", function() { return __WEBPACK_IMPORTED_MODULE_16_d3_hierarchy__["l"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_17_d3_interpolate__ = __webpack_require__(83);
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "interpolate", function() { return __WEBPACK_IMPORTED_MODULE_17_d3_interpolate__["a"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "interpolateArray", function() { return __WEBPACK_IMPORTED_MODULE_17_d3_interpolate__["b"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "interpolateBasis", function() { return __WEBPACK_IMPORTED_MODULE_17_d3_interpolate__["c"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "interpolateBasisClosed", function() { return __WEBPACK_IMPORTED_MODULE_17_d3_interpolate__["d"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "interpolateDate", function() { return __WEBPACK_IMPORTED_MODULE_17_d3_interpolate__["g"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "interpolateDiscrete", function() { return __WEBPACK_IMPORTED_MODULE_17_d3_interpolate__["h"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "interpolateHue", function() { return __WEBPACK_IMPORTED_MODULE_17_d3_interpolate__["m"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "interpolateNumber", function() { return __WEBPACK_IMPORTED_MODULE_17_d3_interpolate__["o"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "interpolateNumberArray", function() { return __WEBPACK_IMPORTED_MODULE_17_d3_interpolate__["p"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "interpolateObject", function() { return __WEBPACK_IMPORTED_MODULE_17_d3_interpolate__["q"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "interpolateRound", function() { return __WEBPACK_IMPORTED_MODULE_17_d3_interpolate__["u"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "interpolateString", function() { return __WEBPACK_IMPORTED_MODULE_17_d3_interpolate__["v"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "interpolateTransformCss", function() { return __WEBPACK_IMPORTED_MODULE_17_d3_interpolate__["w"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "interpolateTransformSvg", function() { return __WEBPACK_IMPORTED_MODULE_17_d3_interpolate__["x"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "interpolateZoom", function() { return __WEBPACK_IMPORTED_MODULE_17_d3_interpolate__["y"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "interpolateRgb", function() { return __WEBPACK_IMPORTED_MODULE_17_d3_interpolate__["r"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "interpolateRgbBasis", function() { return __WEBPACK_IMPORTED_MODULE_17_d3_interpolate__["s"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "interpolateRgbBasisClosed", function() { return __WEBPACK_IMPORTED_MODULE_17_d3_interpolate__["t"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "interpolateHsl", function() { return __WEBPACK_IMPORTED_MODULE_17_d3_interpolate__["k"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "interpolateHslLong", function() { return __WEBPACK_IMPORTED_MODULE_17_d3_interpolate__["l"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "interpolateLab", function() { return __WEBPACK_IMPORTED_MODULE_17_d3_interpolate__["n"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "interpolateHcl", function() { return __WEBPACK_IMPORTED_MODULE_17_d3_interpolate__["i"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "interpolateHclLong", function() { return __WEBPACK_IMPORTED_MODULE_17_d3_interpolate__["j"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "interpolateCubehelix", function() { return __WEBPACK_IMPORTED_MODULE_17_d3_interpolate__["e"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "interpolateCubehelixLong", function() { return __WEBPACK_IMPORTED_MODULE_17_d3_interpolate__["f"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "piecewise", function() { return __WEBPACK_IMPORTED_MODULE_17_d3_interpolate__["z"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "quantize", function() { return __WEBPACK_IMPORTED_MODULE_17_d3_interpolate__["A"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_18_d3_path__ = __webpack_require__(120);
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "path", function() { return __WEBPACK_IMPORTED_MODULE_18_d3_path__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_19_d3_polygon__ = __webpack_require__(1351);
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "polygonArea", function() { return __WEBPACK_IMPORTED_MODULE_19_d3_polygon__["a"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "polygonCentroid", function() { return __WEBPACK_IMPORTED_MODULE_19_d3_polygon__["b"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "polygonHull", function() { return __WEBPACK_IMPORTED_MODULE_19_d3_polygon__["d"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "polygonContains", function() { return __WEBPACK_IMPORTED_MODULE_19_d3_polygon__["c"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "polygonLength", function() { return __WEBPACK_IMPORTED_MODULE_19_d3_polygon__["e"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_20_d3_quadtree__ = __webpack_require__(354);
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "quadtree", function() { return __WEBPACK_IMPORTED_MODULE_20_d3_quadtree__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_21_d3_random__ = __webpack_require__(1358);
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "randomUniform", function() { return __WEBPACK_IMPORTED_MODULE_21_d3_random__["f"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "randomNormal", function() { return __WEBPACK_IMPORTED_MODULE_21_d3_random__["e"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "randomLogNormal", function() { return __WEBPACK_IMPORTED_MODULE_21_d3_random__["d"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "randomBates", function() { return __WEBPACK_IMPORTED_MODULE_21_d3_random__["a"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "randomIrwinHall", function() { return __WEBPACK_IMPORTED_MODULE_21_d3_random__["c"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "randomExponential", function() { return __WEBPACK_IMPORTED_MODULE_21_d3_random__["b"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_22_d3_scale__ = __webpack_require__(759);
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "scaleBand", function() { return __WEBPACK_IMPORTED_MODULE_22_d3_scale__["scaleBand"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "scalePoint", function() { return __WEBPACK_IMPORTED_MODULE_22_d3_scale__["scalePoint"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "scaleIdentity", function() { return __WEBPACK_IMPORTED_MODULE_22_d3_scale__["scaleIdentity"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "scaleLinear", function() { return __WEBPACK_IMPORTED_MODULE_22_d3_scale__["scaleLinear"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "scaleLog", function() { return __WEBPACK_IMPORTED_MODULE_22_d3_scale__["scaleLog"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "scaleSymlog", function() { return __WEBPACK_IMPORTED_MODULE_22_d3_scale__["scaleSymlog"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "scaleOrdinal", function() { return __WEBPACK_IMPORTED_MODULE_22_d3_scale__["scaleOrdinal"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "scaleImplicit", function() { return __WEBPACK_IMPORTED_MODULE_22_d3_scale__["scaleImplicit"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "scalePow", function() { return __WEBPACK_IMPORTED_MODULE_22_d3_scale__["scalePow"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "scaleSqrt", function() { return __WEBPACK_IMPORTED_MODULE_22_d3_scale__["scaleSqrt"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "scaleQuantile", function() { return __WEBPACK_IMPORTED_MODULE_22_d3_scale__["scaleQuantile"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "scaleQuantize", function() { return __WEBPACK_IMPORTED_MODULE_22_d3_scale__["scaleQuantize"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "scaleThreshold", function() { return __WEBPACK_IMPORTED_MODULE_22_d3_scale__["scaleThreshold"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "scaleTime", function() { return __WEBPACK_IMPORTED_MODULE_22_d3_scale__["scaleTime"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "scaleUtc", function() { return __WEBPACK_IMPORTED_MODULE_22_d3_scale__["scaleUtc"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "scaleSequential", function() { return __WEBPACK_IMPORTED_MODULE_22_d3_scale__["scaleSequential"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "scaleSequentialLog", function() { return __WEBPACK_IMPORTED_MODULE_22_d3_scale__["scaleSequentialLog"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "scaleSequentialPow", function() { return __WEBPACK_IMPORTED_MODULE_22_d3_scale__["scaleSequentialPow"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "scaleSequentialSqrt", function() { return __WEBPACK_IMPORTED_MODULE_22_d3_scale__["scaleSequentialSqrt"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "scaleSequentialSymlog", function() { return __WEBPACK_IMPORTED_MODULE_22_d3_scale__["scaleSequentialSymlog"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "scaleSequentialQuantile", function() { return __WEBPACK_IMPORTED_MODULE_22_d3_scale__["scaleSequentialQuantile"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "scaleDiverging", function() { return __WEBPACK_IMPORTED_MODULE_22_d3_scale__["scaleDiverging"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "scaleDivergingLog", function() { return __WEBPACK_IMPORTED_MODULE_22_d3_scale__["scaleDivergingLog"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "scaleDivergingPow", function() { return __WEBPACK_IMPORTED_MODULE_22_d3_scale__["scaleDivergingPow"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "scaleDivergingSqrt", function() { return __WEBPACK_IMPORTED_MODULE_22_d3_scale__["scaleDivergingSqrt"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "scaleDivergingSymlog", function() { return __WEBPACK_IMPORTED_MODULE_22_d3_scale__["scaleDivergingSymlog"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "tickFormat", function() { return __WEBPACK_IMPORTED_MODULE_22_d3_scale__["tickFormat"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_23_d3_scale_chromatic__ = __webpack_require__(1387);
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "schemeCategory10", function() { return __WEBPACK_IMPORTED_MODULE_23_d3_scale_chromatic__["R"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "schemeAccent", function() { return __WEBPACK_IMPORTED_MODULE_23_d3_scale_chromatic__["M"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "schemeDark2", function() { return __WEBPACK_IMPORTED_MODULE_23_d3_scale_chromatic__["S"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "schemePaired", function() { return __WEBPACK_IMPORTED_MODULE_23_d3_scale_chromatic__["Z"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "schemePastel1", function() { return __WEBPACK_IMPORTED_MODULE_23_d3_scale_chromatic__["_0"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "schemePastel2", function() { return __WEBPACK_IMPORTED_MODULE_23_d3_scale_chromatic__["_1"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "schemeSet1", function() { return __WEBPACK_IMPORTED_MODULE_23_d3_scale_chromatic__["_14"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "schemeSet2", function() { return __WEBPACK_IMPORTED_MODULE_23_d3_scale_chromatic__["_15"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "schemeSet3", function() { return __WEBPACK_IMPORTED_MODULE_23_d3_scale_chromatic__["_16"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "schemeTableau10", function() { return __WEBPACK_IMPORTED_MODULE_23_d3_scale_chromatic__["_18"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "interpolateBrBG", function() { return __WEBPACK_IMPORTED_MODULE_23_d3_scale_chromatic__["b"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "schemeBrBG", function() { return __WEBPACK_IMPORTED_MODULE_23_d3_scale_chromatic__["O"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "interpolatePRGn", function() { return __WEBPACK_IMPORTED_MODULE_23_d3_scale_chromatic__["o"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "schemePRGn", function() { return __WEBPACK_IMPORTED_MODULE_23_d3_scale_chromatic__["Y"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "interpolatePiYG", function() { return __WEBPACK_IMPORTED_MODULE_23_d3_scale_chromatic__["p"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "schemePiYG", function() { return __WEBPACK_IMPORTED_MODULE_23_d3_scale_chromatic__["_2"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "interpolatePuOr", function() { return __WEBPACK_IMPORTED_MODULE_23_d3_scale_chromatic__["t"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "schemePuOr", function() { return __WEBPACK_IMPORTED_MODULE_23_d3_scale_chromatic__["_5"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "interpolateRdBu", function() { return __WEBPACK_IMPORTED_MODULE_23_d3_scale_chromatic__["x"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "schemeRdBu", function() { return __WEBPACK_IMPORTED_MODULE_23_d3_scale_chromatic__["_8"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "interpolateRdGy", function() { return __WEBPACK_IMPORTED_MODULE_23_d3_scale_chromatic__["y"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "schemeRdGy", function() { return __WEBPACK_IMPORTED_MODULE_23_d3_scale_chromatic__["_9"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "interpolateRdYlBu", function() { return __WEBPACK_IMPORTED_MODULE_23_d3_scale_chromatic__["A"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "schemeRdYlBu", function() { return __WEBPACK_IMPORTED_MODULE_23_d3_scale_chromatic__["_11"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "interpolateRdYlGn", function() { return __WEBPACK_IMPORTED_MODULE_23_d3_scale_chromatic__["B"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "schemeRdYlGn", function() { return __WEBPACK_IMPORTED_MODULE_23_d3_scale_chromatic__["_12"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "interpolateSpectral", function() { return __WEBPACK_IMPORTED_MODULE_23_d3_scale_chromatic__["E"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "schemeSpectral", function() { return __WEBPACK_IMPORTED_MODULE_23_d3_scale_chromatic__["_17"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "interpolateBuGn", function() { return __WEBPACK_IMPORTED_MODULE_23_d3_scale_chromatic__["c"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "schemeBuGn", function() { return __WEBPACK_IMPORTED_MODULE_23_d3_scale_chromatic__["P"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "interpolateBuPu", function() { return __WEBPACK_IMPORTED_MODULE_23_d3_scale_chromatic__["d"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "schemeBuPu", function() { return __WEBPACK_IMPORTED_MODULE_23_d3_scale_chromatic__["Q"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "interpolateGnBu", function() { return __WEBPACK_IMPORTED_MODULE_23_d3_scale_chromatic__["h"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "schemeGnBu", function() { return __WEBPACK_IMPORTED_MODULE_23_d3_scale_chromatic__["T"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "interpolateOrRd", function() { return __WEBPACK_IMPORTED_MODULE_23_d3_scale_chromatic__["m"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "schemeOrRd", function() { return __WEBPACK_IMPORTED_MODULE_23_d3_scale_chromatic__["W"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "interpolatePuBuGn", function() { return __WEBPACK_IMPORTED_MODULE_23_d3_scale_chromatic__["s"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "schemePuBuGn", function() { return __WEBPACK_IMPORTED_MODULE_23_d3_scale_chromatic__["_4"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "interpolatePuBu", function() { return __WEBPACK_IMPORTED_MODULE_23_d3_scale_chromatic__["r"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "schemePuBu", function() { return __WEBPACK_IMPORTED_MODULE_23_d3_scale_chromatic__["_3"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "interpolatePuRd", function() { return __WEBPACK_IMPORTED_MODULE_23_d3_scale_chromatic__["u"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "schemePuRd", function() { return __WEBPACK_IMPORTED_MODULE_23_d3_scale_chromatic__["_6"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "interpolateRdPu", function() { return __WEBPACK_IMPORTED_MODULE_23_d3_scale_chromatic__["z"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "schemeRdPu", function() { return __WEBPACK_IMPORTED_MODULE_23_d3_scale_chromatic__["_10"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "interpolateYlGnBu", function() { return __WEBPACK_IMPORTED_MODULE_23_d3_scale_chromatic__["J"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "schemeYlGnBu", function() { return __WEBPACK_IMPORTED_MODULE_23_d3_scale_chromatic__["_20"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "interpolateYlGn", function() { return __WEBPACK_IMPORTED_MODULE_23_d3_scale_chromatic__["I"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "schemeYlGn", function() { return __WEBPACK_IMPORTED_MODULE_23_d3_scale_chromatic__["_19"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "interpolateYlOrBr", function() { return __WEBPACK_IMPORTED_MODULE_23_d3_scale_chromatic__["K"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "schemeYlOrBr", function() { return __WEBPACK_IMPORTED_MODULE_23_d3_scale_chromatic__["_21"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "interpolateYlOrRd", function() { return __WEBPACK_IMPORTED_MODULE_23_d3_scale_chromatic__["L"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "schemeYlOrRd", function() { return __WEBPACK_IMPORTED_MODULE_23_d3_scale_chromatic__["_22"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "interpolateBlues", function() { return __WEBPACK_IMPORTED_MODULE_23_d3_scale_chromatic__["a"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "schemeBlues", function() { return __WEBPACK_IMPORTED_MODULE_23_d3_scale_chromatic__["N"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "interpolateGreens", function() { return __WEBPACK_IMPORTED_MODULE_23_d3_scale_chromatic__["i"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "schemeGreens", function() { return __WEBPACK_IMPORTED_MODULE_23_d3_scale_chromatic__["U"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "interpolateGreys", function() { return __WEBPACK_IMPORTED_MODULE_23_d3_scale_chromatic__["j"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "schemeGreys", function() { return __WEBPACK_IMPORTED_MODULE_23_d3_scale_chromatic__["V"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "interpolatePurples", function() { return __WEBPACK_IMPORTED_MODULE_23_d3_scale_chromatic__["v"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "schemePurples", function() { return __WEBPACK_IMPORTED_MODULE_23_d3_scale_chromatic__["_7"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "interpolateReds", function() { return __WEBPACK_IMPORTED_MODULE_23_d3_scale_chromatic__["C"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "schemeReds", function() { return __WEBPACK_IMPORTED_MODULE_23_d3_scale_chromatic__["_13"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "interpolateOranges", function() { return __WEBPACK_IMPORTED_MODULE_23_d3_scale_chromatic__["n"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "schemeOranges", function() { return __WEBPACK_IMPORTED_MODULE_23_d3_scale_chromatic__["X"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "interpolateCividis", function() { return __WEBPACK_IMPORTED_MODULE_23_d3_scale_chromatic__["e"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "interpolateCubehelixDefault", function() { return __WEBPACK_IMPORTED_MODULE_23_d3_scale_chromatic__["g"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "interpolateRainbow", function() { return __WEBPACK_IMPORTED_MODULE_23_d3_scale_chromatic__["w"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "interpolateWarm", function() { return __WEBPACK_IMPORTED_MODULE_23_d3_scale_chromatic__["H"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "interpolateCool", function() { return __WEBPACK_IMPORTED_MODULE_23_d3_scale_chromatic__["f"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "interpolateSinebow", function() { return __WEBPACK_IMPORTED_MODULE_23_d3_scale_chromatic__["D"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "interpolateTurbo", function() { return __WEBPACK_IMPORTED_MODULE_23_d3_scale_chromatic__["F"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "interpolateViridis", function() { return __WEBPACK_IMPORTED_MODULE_23_d3_scale_chromatic__["G"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "interpolateMagma", function() { return __WEBPACK_IMPORTED_MODULE_23_d3_scale_chromatic__["l"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "interpolateInferno", function() { return __WEBPACK_IMPORTED_MODULE_23_d3_scale_chromatic__["k"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "interpolatePlasma", function() { return __WEBPACK_IMPORTED_MODULE_23_d3_scale_chromatic__["q"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_24_d3_selection__ = __webpack_require__(45);
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "create", function() { return __WEBPACK_IMPORTED_MODULE_24_d3_selection__["b"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "creator", function() { return __WEBPACK_IMPORTED_MODULE_24_d3_selection__["c"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "local", function() { return __WEBPACK_IMPORTED_MODULE_24_d3_selection__["f"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "matcher", function() { return __WEBPACK_IMPORTED_MODULE_24_d3_selection__["g"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "mouse", function() { return __WEBPACK_IMPORTED_MODULE_24_d3_selection__["h"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "namespace", function() { return __WEBPACK_IMPORTED_MODULE_24_d3_selection__["i"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "namespaces", function() { return __WEBPACK_IMPORTED_MODULE_24_d3_selection__["j"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "clientPoint", function() { return __WEBPACK_IMPORTED_MODULE_24_d3_selection__["a"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "select", function() { return __WEBPACK_IMPORTED_MODULE_24_d3_selection__["k"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "selectAll", function() { return __WEBPACK_IMPORTED_MODULE_24_d3_selection__["l"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "selection", function() { return __WEBPACK_IMPORTED_MODULE_24_d3_selection__["m"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "selector", function() { return __WEBPACK_IMPORTED_MODULE_24_d3_selection__["n"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "selectorAll", function() { return __WEBPACK_IMPORTED_MODULE_24_d3_selection__["o"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "style", function() { return __WEBPACK_IMPORTED_MODULE_24_d3_selection__["p"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "touch", function() { return __WEBPACK_IMPORTED_MODULE_24_d3_selection__["q"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "touches", function() { return __WEBPACK_IMPORTED_MODULE_24_d3_selection__["r"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "window", function() { return __WEBPACK_IMPORTED_MODULE_24_d3_selection__["s"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "event", function() { return __WEBPACK_IMPORTED_MODULE_24_d3_selection__["e"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "customEvent", function() { return __WEBPACK_IMPORTED_MODULE_24_d3_selection__["d"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_25_d3_shape__ = __webpack_require__(1431);
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "arc", function() { return __WEBPACK_IMPORTED_MODULE_25_d3_shape__["a"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "area", function() { return __WEBPACK_IMPORTED_MODULE_25_d3_shape__["b"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "line", function() { return __WEBPACK_IMPORTED_MODULE_25_d3_shape__["v"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "pie", function() { return __WEBPACK_IMPORTED_MODULE_25_d3_shape__["A"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "areaRadial", function() { return __WEBPACK_IMPORTED_MODULE_25_d3_shape__["c"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "radialArea", function() { return __WEBPACK_IMPORTED_MODULE_25_d3_shape__["C"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "lineRadial", function() { return __WEBPACK_IMPORTED_MODULE_25_d3_shape__["w"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "radialLine", function() { return __WEBPACK_IMPORTED_MODULE_25_d3_shape__["D"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "pointRadial", function() { return __WEBPACK_IMPORTED_MODULE_25_d3_shape__["B"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "linkHorizontal", function() { return __WEBPACK_IMPORTED_MODULE_25_d3_shape__["x"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "linkVertical", function() { return __WEBPACK_IMPORTED_MODULE_25_d3_shape__["z"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "linkRadial", function() { return __WEBPACK_IMPORTED_MODULE_25_d3_shape__["y"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "symbol", function() { return __WEBPACK_IMPORTED_MODULE_25_d3_shape__["Q"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "symbols", function() { return __WEBPACK_IMPORTED_MODULE_25_d3_shape__["Y"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "symbolCircle", function() { return __WEBPACK_IMPORTED_MODULE_25_d3_shape__["R"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "symbolCross", function() { return __WEBPACK_IMPORTED_MODULE_25_d3_shape__["S"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "symbolDiamond", function() { return __WEBPACK_IMPORTED_MODULE_25_d3_shape__["T"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "symbolSquare", function() { return __WEBPACK_IMPORTED_MODULE_25_d3_shape__["U"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "symbolStar", function() { return __WEBPACK_IMPORTED_MODULE_25_d3_shape__["V"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "symbolTriangle", function() { return __WEBPACK_IMPORTED_MODULE_25_d3_shape__["W"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "symbolWye", function() { return __WEBPACK_IMPORTED_MODULE_25_d3_shape__["X"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "curveBasisClosed", function() { return __WEBPACK_IMPORTED_MODULE_25_d3_shape__["e"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "curveBasisOpen", function() { return __WEBPACK_IMPORTED_MODULE_25_d3_shape__["f"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "curveBasis", function() { return __WEBPACK_IMPORTED_MODULE_25_d3_shape__["d"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "curveBundle", function() { return __WEBPACK_IMPORTED_MODULE_25_d3_shape__["g"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "curveCardinalClosed", function() { return __WEBPACK_IMPORTED_MODULE_25_d3_shape__["i"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "curveCardinalOpen", function() { return __WEBPACK_IMPORTED_MODULE_25_d3_shape__["j"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "curveCardinal", function() { return __WEBPACK_IMPORTED_MODULE_25_d3_shape__["h"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "curveCatmullRomClosed", function() { return __WEBPACK_IMPORTED_MODULE_25_d3_shape__["l"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "curveCatmullRomOpen", function() { return __WEBPACK_IMPORTED_MODULE_25_d3_shape__["m"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "curveCatmullRom", function() { return __WEBPACK_IMPORTED_MODULE_25_d3_shape__["k"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "curveLinearClosed", function() { return __WEBPACK_IMPORTED_MODULE_25_d3_shape__["o"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "curveLinear", function() { return __WEBPACK_IMPORTED_MODULE_25_d3_shape__["n"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "curveMonotoneX", function() { return __WEBPACK_IMPORTED_MODULE_25_d3_shape__["p"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "curveMonotoneY", function() { return __WEBPACK_IMPORTED_MODULE_25_d3_shape__["q"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "curveNatural", function() { return __WEBPACK_IMPORTED_MODULE_25_d3_shape__["r"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "curveStep", function() { return __WEBPACK_IMPORTED_MODULE_25_d3_shape__["s"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "curveStepAfter", function() { return __WEBPACK_IMPORTED_MODULE_25_d3_shape__["t"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "curveStepBefore", function() { return __WEBPACK_IMPORTED_MODULE_25_d3_shape__["u"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "stack", function() { return __WEBPACK_IMPORTED_MODULE_25_d3_shape__["E"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "stackOffsetExpand", function() { return __WEBPACK_IMPORTED_MODULE_25_d3_shape__["G"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "stackOffsetDiverging", function() { return __WEBPACK_IMPORTED_MODULE_25_d3_shape__["F"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "stackOffsetNone", function() { return __WEBPACK_IMPORTED_MODULE_25_d3_shape__["H"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "stackOffsetSilhouette", function() { return __WEBPACK_IMPORTED_MODULE_25_d3_shape__["I"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "stackOffsetWiggle", function() { return __WEBPACK_IMPORTED_MODULE_25_d3_shape__["J"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "stackOrderAppearance", function() { return __WEBPACK_IMPORTED_MODULE_25_d3_shape__["K"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "stackOrderAscending", function() { return __WEBPACK_IMPORTED_MODULE_25_d3_shape__["L"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "stackOrderDescending", function() { return __WEBPACK_IMPORTED_MODULE_25_d3_shape__["M"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "stackOrderInsideOut", function() { return __WEBPACK_IMPORTED_MODULE_25_d3_shape__["N"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "stackOrderNone", function() { return __WEBPACK_IMPORTED_MODULE_25_d3_shape__["O"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "stackOrderReverse", function() { return __WEBPACK_IMPORTED_MODULE_25_d3_shape__["P"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_26_d3_time__ = __webpack_require__(256);
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "timeInterval", function() { return __WEBPACK_IMPORTED_MODULE_26_d3_time__["g"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "timeMillisecond", function() { return __WEBPACK_IMPORTED_MODULE_26_d3_time__["h"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "timeMilliseconds", function() { return __WEBPACK_IMPORTED_MODULE_26_d3_time__["i"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "utcMillisecond", function() { return __WEBPACK_IMPORTED_MODULE_26_d3_time__["L"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "utcMilliseconds", function() { return __WEBPACK_IMPORTED_MODULE_26_d3_time__["M"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "timeSecond", function() { return __WEBPACK_IMPORTED_MODULE_26_d3_time__["r"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "timeSeconds", function() { return __WEBPACK_IMPORTED_MODULE_26_d3_time__["s"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "utcSecond", function() { return __WEBPACK_IMPORTED_MODULE_26_d3_time__["V"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "utcSeconds", function() { return __WEBPACK_IMPORTED_MODULE_26_d3_time__["W"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "timeMinute", function() { return __WEBPACK_IMPORTED_MODULE_26_d3_time__["j"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "timeMinutes", function() { return __WEBPACK_IMPORTED_MODULE_26_d3_time__["k"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "timeHour", function() { return __WEBPACK_IMPORTED_MODULE_26_d3_time__["e"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "timeHours", function() { return __WEBPACK_IMPORTED_MODULE_26_d3_time__["f"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "timeDay", function() { return __WEBPACK_IMPORTED_MODULE_26_d3_time__["a"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "timeDays", function() { return __WEBPACK_IMPORTED_MODULE_26_d3_time__["b"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "timeWeek", function() { return __WEBPACK_IMPORTED_MODULE_26_d3_time__["B"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "timeWeeks", function() { return __WEBPACK_IMPORTED_MODULE_26_d3_time__["C"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "timeSunday", function() { return __WEBPACK_IMPORTED_MODULE_26_d3_time__["t"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "timeSundays", function() { return __WEBPACK_IMPORTED_MODULE_26_d3_time__["u"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "timeMonday", function() { return __WEBPACK_IMPORTED_MODULE_26_d3_time__["l"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "timeMondays", function() { return __WEBPACK_IMPORTED_MODULE_26_d3_time__["m"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "timeTuesday", function() { return __WEBPACK_IMPORTED_MODULE_26_d3_time__["x"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "timeTuesdays", function() { return __WEBPACK_IMPORTED_MODULE_26_d3_time__["y"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "timeWednesday", function() { return __WEBPACK_IMPORTED_MODULE_26_d3_time__["z"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "timeWednesdays", function() { return __WEBPACK_IMPORTED_MODULE_26_d3_time__["A"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "timeThursday", function() { return __WEBPACK_IMPORTED_MODULE_26_d3_time__["v"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "timeThursdays", function() { return __WEBPACK_IMPORTED_MODULE_26_d3_time__["w"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "timeFriday", function() { return __WEBPACK_IMPORTED_MODULE_26_d3_time__["c"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "timeFridays", function() { return __WEBPACK_IMPORTED_MODULE_26_d3_time__["d"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "timeSaturday", function() { return __WEBPACK_IMPORTED_MODULE_26_d3_time__["p"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "timeSaturdays", function() { return __WEBPACK_IMPORTED_MODULE_26_d3_time__["q"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "timeMonth", function() { return __WEBPACK_IMPORTED_MODULE_26_d3_time__["n"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "timeMonths", function() { return __WEBPACK_IMPORTED_MODULE_26_d3_time__["o"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "timeYear", function() { return __WEBPACK_IMPORTED_MODULE_26_d3_time__["D"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "timeYears", function() { return __WEBPACK_IMPORTED_MODULE_26_d3_time__["E"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "utcMinute", function() { return __WEBPACK_IMPORTED_MODULE_26_d3_time__["N"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "utcMinutes", function() { return __WEBPACK_IMPORTED_MODULE_26_d3_time__["O"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "utcHour", function() { return __WEBPACK_IMPORTED_MODULE_26_d3_time__["J"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "utcHours", function() { return __WEBPACK_IMPORTED_MODULE_26_d3_time__["K"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "utcDay", function() { return __WEBPACK_IMPORTED_MODULE_26_d3_time__["F"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "utcDays", function() { return __WEBPACK_IMPORTED_MODULE_26_d3_time__["G"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "utcWeek", function() { return __WEBPACK_IMPORTED_MODULE_26_d3_time__["_5"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "utcWeeks", function() { return __WEBPACK_IMPORTED_MODULE_26_d3_time__["_6"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "utcSunday", function() { return __WEBPACK_IMPORTED_MODULE_26_d3_time__["X"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "utcSundays", function() { return __WEBPACK_IMPORTED_MODULE_26_d3_time__["Y"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "utcMonday", function() { return __WEBPACK_IMPORTED_MODULE_26_d3_time__["P"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "utcMondays", function() { return __WEBPACK_IMPORTED_MODULE_26_d3_time__["Q"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "utcTuesday", function() { return __WEBPACK_IMPORTED_MODULE_26_d3_time__["_1"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "utcTuesdays", function() { return __WEBPACK_IMPORTED_MODULE_26_d3_time__["_2"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "utcWednesday", function() { return __WEBPACK_IMPORTED_MODULE_26_d3_time__["_3"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "utcWednesdays", function() { return __WEBPACK_IMPORTED_MODULE_26_d3_time__["_4"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "utcThursday", function() { return __WEBPACK_IMPORTED_MODULE_26_d3_time__["Z"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "utcThursdays", function() { return __WEBPACK_IMPORTED_MODULE_26_d3_time__["_0"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "utcFriday", function() { return __WEBPACK_IMPORTED_MODULE_26_d3_time__["H"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "utcFridays", function() { return __WEBPACK_IMPORTED_MODULE_26_d3_time__["I"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "utcSaturday", function() { return __WEBPACK_IMPORTED_MODULE_26_d3_time__["T"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "utcSaturdays", function() { return __WEBPACK_IMPORTED_MODULE_26_d3_time__["U"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "utcMonth", function() { return __WEBPACK_IMPORTED_MODULE_26_d3_time__["R"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "utcMonths", function() { return __WEBPACK_IMPORTED_MODULE_26_d3_time__["S"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "utcYear", function() { return __WEBPACK_IMPORTED_MODULE_26_d3_time__["_7"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "utcYears", function() { return __WEBPACK_IMPORTED_MODULE_26_d3_time__["_8"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_27_d3_time_format__ = __webpack_require__(368);
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "timeFormatDefaultLocale", function() { return __WEBPACK_IMPORTED_MODULE_27_d3_time_format__["d"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "timeFormat", function() { return __WEBPACK_IMPORTED_MODULE_27_d3_time_format__["c"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "timeParse", function() { return __WEBPACK_IMPORTED_MODULE_27_d3_time_format__["f"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "utcFormat", function() { return __WEBPACK_IMPORTED_MODULE_27_d3_time_format__["g"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "utcParse", function() { return __WEBPACK_IMPORTED_MODULE_27_d3_time_format__["h"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "timeFormatLocale", function() { return __WEBPACK_IMPORTED_MODULE_27_d3_time_format__["e"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "isoFormat", function() { return __WEBPACK_IMPORTED_MODULE_27_d3_time_format__["a"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "isoParse", function() { return __WEBPACK_IMPORTED_MODULE_27_d3_time_format__["b"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_28_d3_timer__ = __webpack_require__(247);
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "now", function() { return __WEBPACK_IMPORTED_MODULE_28_d3_timer__["b"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "timer", function() { return __WEBPACK_IMPORTED_MODULE_28_d3_timer__["d"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "timerFlush", function() { return __WEBPACK_IMPORTED_MODULE_28_d3_timer__["e"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "timeout", function() { return __WEBPACK_IMPORTED_MODULE_28_d3_timer__["c"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "interval", function() { return __WEBPACK_IMPORTED_MODULE_28_d3_timer__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_29_d3_transition__ = __webpack_require__(348);
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "transition", function() { return __WEBPACK_IMPORTED_MODULE_29_d3_transition__["c"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "active", function() { return __WEBPACK_IMPORTED_MODULE_29_d3_transition__["a"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "interrupt", function() { return __WEBPACK_IMPORTED_MODULE_29_d3_transition__["b"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_30_d3_voronoi__ = __webpack_require__(1456);
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "voronoi", function() { return __WEBPACK_IMPORTED_MODULE_30_d3_voronoi__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_31_d3_zoom__ = __webpack_require__(1461);
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "zoom", function() { return __WEBPACK_IMPORTED_MODULE_31_d3_zoom__["a"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "zoomTransform", function() { return __WEBPACK_IMPORTED_MODULE_31_d3_zoom__["c"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "zoomIdentity", function() { return __WEBPACK_IMPORTED_MODULE_31_d3_zoom__["b"]; });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
/***/ }),
/* 1127 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* unused harmony export name */
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return version; });
/* unused harmony export description */
/* unused harmony export keywords */
/* unused harmony export homepage */
/* unused harmony export license */
/* unused harmony export author */
/* unused harmony export main */
/* unused harmony export unpkg */
/* unused harmony export jsdelivr */
/* unused harmony export module */
/* unused harmony export repository */
/* unused harmony export files */
/* unused harmony export scripts */
/* unused harmony export devDependencies */
/* unused harmony export dependencies */
var name = "d3";
var version = "5.16.0";
var description = "Data-Driven Documents";
var keywords = ["dom","visualization","svg","animation","canvas"];
var homepage = "https://d3js.org";
var license = "BSD-3-Clause";
var author = {"name":"Mike Bostock","url":"https://bost.ocks.org/mike"};
var main = "dist/d3.node.js";
var unpkg = "dist/d3.min.js";
var jsdelivr = "dist/d3.min.js";
var module = "index.js";
var repository = {"type":"git","url":"https://github.com/d3/d3.git"};
var files = ["dist/**/*.js","index.js"];
var scripts = {"pretest":"rimraf dist && mkdir dist && json2module package.json > dist/package.js && rollup -c","test":"tape 'test/**/*-test.js'","prepublishOnly":"yarn test","postpublish":"git push && git push --tags && cd ../d3.github.com && git pull && cp ../d3/dist/d3.js d3.v5.js && cp ../d3/dist/d3.min.js d3.v5.min.js && git add d3.v5.js d3.v5.min.js && git commit -m \"d3 ${npm_package_version}\" && git push && cd - && cd ../d3-bower && git pull && cp ../d3/LICENSE ../d3/README.md ../d3/dist/d3.js ../d3/dist/d3.min.js . && git add -- LICENSE README.md d3.js d3.min.js && git commit -m \"${npm_package_version}\" && git tag -am \"${npm_package_version}\" v${npm_package_version} && git push && git push --tags && cd - && zip -j dist/d3.zip -- LICENSE README.md API.md CHANGES.md dist/d3.js dist/d3.min.js"};
var devDependencies = {"json2module":"0.0","rimraf":"2","rollup":"1","rollup-plugin-ascii":"0.0","rollup-plugin-node-resolve":"3","rollup-plugin-terser":"5","tape":"4"};
var dependencies = {"d3-array":"1","d3-axis":"1","d3-brush":"1","d3-chord":"1","d3-collection":"1","d3-color":"1","d3-contour":"1","d3-dispatch":"1","d3-drag":"1","d3-dsv":"1","d3-ease":"1","d3-fetch":"1","d3-force":"1","d3-format":"1","d3-geo":"1","d3-hierarchy":"1","d3-interpolate":"1","d3-path":"1","d3-polygon":"1","d3-quadtree":"1","d3-random":"1","d3-scale":"2","d3-scale-chromatic":"1","d3-selection":"1","d3-shape":"1","d3-time":"1","d3-time-format":"2","d3-timer":"1","d3-transition":"1","d3-voronoi":"1","d3-zoom":"1"};
 
 
/***/ }),
/* 1128 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__pairs__ = __webpack_require__(699);
 
 
/* harmony default export */ __webpack_exports__["a"] = (function(values0, values1, reduce) {
  var n0 = values0.length,
      n1 = values1.length,
      values = new Array(n0 * n1),
      i0,
      i1,
      i,
      value0;
 
  if (reduce == null) reduce = __WEBPACK_IMPORTED_MODULE_0__pairs__["b" /* pair */];
 
  for (i0 = i = 0; i0 < n0; ++i0) {
    for (value0 = values0[i0], i1 = 0; i1 < n1; ++i1, ++i) {
      values[i] = reduce(value0, values1[i1]);
    }
  }
 
  return values;
});
 
 
/***/ }),
/* 1129 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony default export */ __webpack_exports__["a"] = (function(a, b) {
  return b < a ? -1 : b > a ? 1 : b >= a ? 0 : NaN;
});
 
 
/***/ }),
/* 1130 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__array__ = __webpack_require__(703);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__bisect__ = __webpack_require__(697);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__constant__ = __webpack_require__(1131);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__extent__ = __webpack_require__(702);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__identity__ = __webpack_require__(1132);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__range__ = __webpack_require__(704);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__ticks__ = __webpack_require__(705);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__threshold_sturges__ = __webpack_require__(706);
 
 
 
 
 
 
 
 
 
/* harmony default export */ __webpack_exports__["a"] = (function() {
  var value = __WEBPACK_IMPORTED_MODULE_4__identity__["a" /* default */],
      domain = __WEBPACK_IMPORTED_MODULE_3__extent__["a" /* default */],
      threshold = __WEBPACK_IMPORTED_MODULE_7__threshold_sturges__["a" /* default */];
 
  function histogram(data) {
    var i,
        n = data.length,
        x,
        values = new Array(n);
 
    for (i = 0; i < n; ++i) {
      values[i] = value(data[i], i, data);
    }
 
    var xz = domain(values),
        x0 = xz[0],
        x1 = xz[1],
        tz = threshold(values, x0, x1);
 
    // Convert number of thresholds into uniform thresholds.
    if (!Array.isArray(tz)) {
      tz = Object(__WEBPACK_IMPORTED_MODULE_6__ticks__["c" /* tickStep */])(x0, x1, tz);
      tz = Object(__WEBPACK_IMPORTED_MODULE_5__range__["a" /* default */])(Math.ceil(x0 / tz) * tz, x1, tz); // exclusive
    }
 
    // Remove any thresholds outside the domain.
    var m = tz.length;
    while (tz[0] <= x0) tz.shift(), --m;
    while (tz[m - 1] > x1) tz.pop(), --m;
 
    var bins = new Array(m + 1),
        bin;
 
    // Initialize bins.
    for (i = 0; i <= m; ++i) {
      bin = bins[i] = [];
      bin.x0 = i > 0 ? tz[i - 1] : x0;
      bin.x1 = i < m ? tz[i] : x1;
    }
 
    // Assign data to bins by value, ignoring any outside the domain.
    for (i = 0; i < n; ++i) {
      x = values[i];
      if (x0 <= x && x <= x1) {
        bins[Object(__WEBPACK_IMPORTED_MODULE_1__bisect__["c" /* default */])(tz, x, 0, m)].push(data[i]);
      }
    }
 
    return bins;
  }
 
  histogram.value = function(_) {
    return arguments.length ? (value = typeof _ === "function" ? _ : Object(__WEBPACK_IMPORTED_MODULE_2__constant__["a" /* default */])(_), histogram) : value;
  };
 
  histogram.domain = function(_) {
    return arguments.length ? (domain = typeof _ === "function" ? _ : Object(__WEBPACK_IMPORTED_MODULE_2__constant__["a" /* default */])([_[0], _[1]]), histogram) : domain;
  };
 
  histogram.thresholds = function(_) {
    return arguments.length ? (threshold = typeof _ === "function" ? _ : Array.isArray(_) ? Object(__WEBPACK_IMPORTED_MODULE_2__constant__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_0__array__["b" /* slice */].call(_)) : Object(__WEBPACK_IMPORTED_MODULE_2__constant__["a" /* default */])(_), histogram) : threshold;
  };
 
  return histogram;
});
 
 
/***/ }),
/* 1131 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony default export */ __webpack_exports__["a"] = (function(x) {
  return function() {
    return x;
  };
});
 
 
/***/ }),
/* 1132 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony default export */ __webpack_exports__["a"] = (function(x) {
  return x;
});
 
 
/***/ }),
/* 1133 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__array__ = __webpack_require__(703);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__ascending__ = __webpack_require__(148);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__number__ = __webpack_require__(187);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__quantile__ = __webpack_require__(335);
 
 
 
 
 
/* harmony default export */ __webpack_exports__["a"] = (function(values, min, max) {
  values = __WEBPACK_IMPORTED_MODULE_0__array__["a" /* map */].call(values, __WEBPACK_IMPORTED_MODULE_2__number__["a" /* default */]).sort(__WEBPACK_IMPORTED_MODULE_1__ascending__["a" /* default */]);
  return Math.ceil((max - min) / (2 * (Object(__WEBPACK_IMPORTED_MODULE_3__quantile__["a" /* default */])(values, 0.75) - Object(__WEBPACK_IMPORTED_MODULE_3__quantile__["a" /* default */])(values, 0.25)) * Math.pow(values.length, -1 / 3)));
});
 
 
/***/ }),
/* 1134 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__deviation__ = __webpack_require__(700);
 
 
/* harmony default export */ __webpack_exports__["a"] = (function(values, min, max) {
  return Math.ceil((max - min) / (3.5 * Object(__WEBPACK_IMPORTED_MODULE_0__deviation__["a" /* default */])(values) * Math.pow(values.length, -1 / 3)));
});
 
 
/***/ }),
/* 1135 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony default export */ __webpack_exports__["a"] = (function(values, valueof) {
  var n = values.length,
      i = -1,
      value,
      max;
 
  Iif (valueof == null) {
    while (++i < n) { // Find the first comparable value.
      if ((value = values[i]) != null && value >= value) {
        max = value;
        while (++i < n) { // Compare the remaining values.
          if ((value = values[i]) != null && value > max) {
            max = value;
          }
        }
      }
    }
  }
 
  else {
    while (++i < n) { // Find the first comparable value.
      Eif ((value = valueof(values[i], i, values)) != null && value >= value) {
        max = value;
        while (++i < n) { // Compare the remaining values.
          if ((value = valueof(values[i], i, values)) != null && value > max) {
            max = value;
          }
        }
      }
    }
  }
 
  return max;
});
 
 
/***/ }),
/* 1136 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__number__ = __webpack_require__(187);
 
 
/* harmony default export */ __webpack_exports__["a"] = (function(values, valueof) {
  var n = values.length,
      m = n,
      i = -1,
      value,
      sum = 0;
 
  if (valueof == null) {
    while (++i < n) {
      if (!isNaN(value = Object(__WEBPACK_IMPORTED_MODULE_0__number__["a" /* default */])(values[i]))) sum += value;
      else --m;
    }
  }
 
  else {
    while (++i < n) {
      if (!isNaN(value = Object(__WEBPACK_IMPORTED_MODULE_0__number__["a" /* default */])(valueof(values[i], i, values)))) sum += value;
      else --m;
    }
  }
 
  if (m) return sum / m;
});
 
 
/***/ }),
/* 1137 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__ascending__ = __webpack_require__(148);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__number__ = __webpack_require__(187);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__quantile__ = __webpack_require__(335);
 
 
 
 
/* harmony default export */ __webpack_exports__["a"] = (function(values, valueof) {
  var n = values.length,
      i = -1,
      value,
      numbers = [];
 
  if (valueof == null) {
    while (++i < n) {
      if (!isNaN(value = Object(__WEBPACK_IMPORTED_MODULE_1__number__["a" /* default */])(values[i]))) {
        numbers.push(value);
      }
    }
  }
 
  else {
    while (++i < n) {
      if (!isNaN(value = Object(__WEBPACK_IMPORTED_MODULE_1__number__["a" /* default */])(valueof(values[i], i, values)))) {
        numbers.push(value);
      }
    }
  }
 
  return Object(__WEBPACK_IMPORTED_MODULE_2__quantile__["a" /* default */])(numbers.sort(__WEBPACK_IMPORTED_MODULE_0__ascending__["a" /* default */]), 0.5);
});
 
 
/***/ }),
/* 1138 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony default export */ __webpack_exports__["a"] = (function(arrays) {
  var n = arrays.length,
      m,
      i = -1,
      j = 0,
      merged,
      array;
 
  while (++i < n) j += arrays[i].length;
  merged = new Array(j);
 
  while (--n >= 0) {
    array = arrays[n];
    m = array.length;
    while (--m >= 0) {
      merged[--j] = array[m];
    }
  }
 
  return merged;
});
 
 
/***/ }),
/* 1139 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony default export */ __webpack_exports__["a"] = (function(array, indexes) {
  var i = indexes.length, permutes = new Array(i);
  while (i--) permutes[i] = array[indexes[i]];
  return permutes;
});
 
 
/***/ }),
/* 1140 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__ascending__ = __webpack_require__(148);
 
 
/* harmony default export */ __webpack_exports__["a"] = (function(values, compare) {
  if (!(n = values.length)) return;
  var n,
      i = 0,
      j = 0,
      xi,
      xj = values[j];
 
  if (compare == null) compare = __WEBPACK_IMPORTED_MODULE_0__ascending__["a" /* default */];
 
  while (++i < n) {
    if (compare(xi = values[i], xj) < 0 || compare(xj, xj) !== 0) {
      xj = xi, j = i;
    }
  }
 
  if (compare(xj, xj) === 0) return j;
});
 
 
/***/ }),
/* 1141 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony default export */ __webpack_exports__["a"] = (function(array, i0, i1) {
  var m = (i1 == null ? array.length : i1) - (i0 = i0 == null ? 0 : +i0),
      t,
      i;
 
  while (m) {
    i = Math.random() * m-- | 0;
    t = array[m + i0];
    array[m + i0] = array[i + i0];
    array[i + i0] = t;
  }
 
  return array;
});
 
 
/***/ }),
/* 1142 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony default export */ __webpack_exports__["a"] = (function(values, valueof) {
  var n = values.length,
      i = -1,
      value,
      sum = 0;
 
  if (valueof == null) {
    while (++i < n) {
      if (value = +values[i]) sum += value; // Note: zero and null are equivalent.
    }
  }
 
  else {
    while (++i < n) {
      if (value = +valueof(values[i], i, values)) sum += value;
    }
  }
 
  return sum;
});
 
 
/***/ }),
/* 1143 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__transpose__ = __webpack_require__(708);
 
 
/* harmony default export */ __webpack_exports__["a"] = (function() {
  return Object(__WEBPACK_IMPORTED_MODULE_0__transpose__["a" /* default */])(arguments);
});
 
 
/***/ }),
/* 1144 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__axis__ = __webpack_require__(1145);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return __WEBPACK_IMPORTED_MODULE_0__axis__["d"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return __WEBPACK_IMPORTED_MODULE_0__axis__["c"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_0__axis__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return __WEBPACK_IMPORTED_MODULE_0__axis__["b"]; });
 
 
 
/***/ }),
/* 1145 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["d"] = axisTop;
/* harmony export (immutable) */ __webpack_exports__["c"] = axisRight;
/* harmony export (immutable) */ __webpack_exports__["a"] = axisBottom;
/* harmony export (immutable) */ __webpack_exports__["b"] = axisLeft;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__array__ = __webpack_require__(1146);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__identity__ = __webpack_require__(1147);
 
 
 
var top = 1,
    right = 2,
    bottom = 3,
    left = 4,
    epsilon = 1e-6;
 
function translateX(x) {
  return "translate(" + (x + 0.5) + ",0)";
}
 
function translateY(y) {
  return "translate(0," + (y + 0.5) + ")";
}
 
function number(scale) {
  return function(d) {
    return +scale(d);
  };
}
 
function center(scale) {
  var offset = Math.max(0, scale.bandwidth() - 1) / 2; // Adjust for 0.5px offset.
  if (scale.round()) offset = Math.round(offset);
  return function(d) {
    return +scale(d) + offset;
  };
}
 
function entering() {
  return !this.__axis;
}
 
function axis(orient, scale) {
  var tickArguments = [],
      tickValues = null,
      tickFormat = null,
      tickSizeInner = 6,
      tickSizeOuter = 6,
      tickPadding = 3,
      k = orient === top || orient === left ? -1 : 1,
      x = orient === left || orient === right ? "x" : "y",
      transform = orient === top || orient === bottom ? translateX : translateY;
 
  function axis(context) {
    var values = tickValues == null ? (scale.ticks ? scale.ticks.apply(scale, tickArguments) : scale.domain()) : tickValues,
        format = tickFormat == null ? (scale.tickFormat ? scale.tickFormat.apply(scale, tickArguments) : __WEBPACK_IMPORTED_MODULE_1__identity__["a" /* default */]) : tickFormat,
        spacing = Math.max(tickSizeInner, 0) + tickPadding,
        range = scale.range(),
        range0 = +range[0] + 0.5,
        range1 = +range[range.length - 1] + 0.5,
        position = (scale.bandwidth ? center : number)(scale.copy()),
        selection = context.selection ? context.selection() : context,
        path = selection.selectAll(".domain").data([null]),
        tick = selection.selectAll(".tick").data(values, scale).order(),
        tickExit = tick.exit(),
        tickEnter = tick.enter().append("g").attr("class", "tick"),
        line = tick.select("line"),
        text = tick.select("text");
 
    path = path.merge(path.enter().insert("path", ".tick")
        .attr("class", "domain")
        .attr("stroke", "currentColor"));
 
    tick = tick.merge(tickEnter);
 
    line = line.merge(tickEnter.append("line")
        .attr("stroke", "currentColor")
        .attr(x + "2", k * tickSizeInner));
 
    text = text.merge(tickEnter.append("text")
        .attr("fill", "currentColor")
        .attr(x, k * spacing)
        .attr("dy", orient === top ? "0em" : orient === bottom ? "0.71em" : "0.32em"));
 
    if (context !== selection) {
      path = path.transition(context);
      tick = tick.transition(context);
      line = line.transition(context);
      text = text.transition(context);
 
      tickExit = tickExit.transition(context)
          .attr("opacity", epsilon)
          .attr("transform", function(d) { return isFinite(d = position(d)) ? transform(d) : this.getAttribute("transform"); });
 
      tickEnter
          .attr("opacity", epsilon)
          .attr("transform", function(d) { var p = this.parentNode.__axis; return transform(p && isFinite(p = p(d)) ? p : position(d)); });
    }
 
    tickExit.remove();
 
    path
        .attr("d", orient === left || orient == right
            ? (tickSizeOuter ? "M" + k * tickSizeOuter + "," + range0 + "H0.5V" + range1 + "H" + k * tickSizeOuter : "M0.5," + range0 + "V" + range1)
            : (tickSizeOuter ? "M" + range0 + "," + k * tickSizeOuter + "V0.5H" + range1 + "V" + k * tickSizeOuter : "M" + range0 + ",0.5H" + range1));
 
    tick
        .attr("opacity", 1)
        .attr("transform", function(d) { return transform(position(d)); });
 
    line
        .attr(x + "2", k * tickSizeInner);
 
    text
        .attr(x, k * spacing)
        .text(format);
 
    selection.filter(entering)
        .attr("fill", "none")
        .attr("font-size", 10)
        .attr("font-family", "sans-serif")
        .attr("text-anchor", orient === right ? "start" : orient === left ? "end" : "middle");
 
    selection
        .each(function() { this.__axis = position; });
  }
 
  axis.scale = function(_) {
    return arguments.length ? (scale = _, axis) : scale;
  };
 
  axis.ticks = function() {
    return tickArguments = __WEBPACK_IMPORTED_MODULE_0__array__["a" /* slice */].call(arguments), axis;
  };
 
  axis.tickArguments = function(_) {
    return arguments.length ? (tickArguments = _ == null ? [] : __WEBPACK_IMPORTED_MODULE_0__array__["a" /* slice */].call(_), axis) : tickArguments.slice();
  };
 
  axis.tickValues = function(_) {
    return arguments.length ? (tickValues = _ == null ? null : __WEBPACK_IMPORTED_MODULE_0__array__["a" /* slice */].call(_), axis) : tickValues && tickValues.slice();
  };
 
  axis.tickFormat = function(_) {
    return arguments.length ? (tickFormat = _, axis) : tickFormat;
  };
 
  axis.tickSize = function(_) {
    return arguments.length ? (tickSizeInner = tickSizeOuter = +_, axis) : tickSizeInner;
  };
 
  axis.tickSizeInner = function(_) {
    return arguments.length ? (tickSizeInner = +_, axis) : tickSizeInner;
  };
 
  axis.tickSizeOuter = function(_) {
    return arguments.length ? (tickSizeOuter = +_, axis) : tickSizeOuter;
  };
 
  axis.tickPadding = function(_) {
    return arguments.length ? (tickPadding = +_, axis) : tickPadding;
  };
 
  return axis;
}
 
function axisTop(scale) {
  return axis(top, scale);
}
 
function axisRight(scale) {
  return axis(right, scale);
}
 
function axisBottom(scale) {
  return axis(bottom, scale);
}
 
function axisLeft(scale) {
  return axis(left, scale);
}
 
 
/***/ }),
/* 1146 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return slice; });
var slice = Array.prototype.slice;
 
 
/***/ }),
/* 1147 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony default export */ __webpack_exports__["a"] = (function(x) {
  return x;
});
 
 
/***/ }),
/* 1148 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__brush_js__ = __webpack_require__(1149);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_0__brush_js__["d"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return __WEBPACK_IMPORTED_MODULE_0__brush_js__["b"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return __WEBPACK_IMPORTED_MODULE_0__brush_js__["c"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return __WEBPACK_IMPORTED_MODULE_0__brush_js__["a"]; });
 
 
 
/***/ }),
/* 1149 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = brushSelection;
/* harmony export (immutable) */ __webpack_exports__["b"] = brushX;
/* harmony export (immutable) */ __webpack_exports__["c"] = brushY;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_d3_dispatch__ = __webpack_require__(149);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_d3_drag__ = __webpack_require__(336);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_d3_interpolate__ = __webpack_require__(83);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_d3_selection__ = __webpack_require__(45);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_d3_transition__ = __webpack_require__(348);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__constant_js__ = __webpack_require__(1238);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__event_js__ = __webpack_require__(1239);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__noevent_js__ = __webpack_require__(1240);
 
 
 
 
 
 
 
 
 
var MODE_DRAG = {name: "drag"},
    MODE_SPACE = {name: "space"},
    MODE_HANDLE = {name: "handle"},
    MODE_CENTER = {name: "center"};
 
function number1(e) {
  return [+e[0], +e[1]];
}
 
function number2(e) {
  return [number1(e[0]), number1(e[1])];
}
 
function toucher(identifier) {
  return function(target) {
    return Object(__WEBPACK_IMPORTED_MODULE_3_d3_selection__["q" /* touch */])(target, __WEBPACK_IMPORTED_MODULE_3_d3_selection__["e" /* event */].touches, identifier);
  };
}
 
var X = {
  name: "x",
  handles: ["w", "e"].map(type),
  input: function(x, e) { return x == null ? null : [[+x[0], e[0][1]], [+x[1], e[1][1]]]; },
  output: function(xy) { return xy && [xy[0][0], xy[1][0]]; }
};
 
var Y = {
  name: "y",
  handles: ["n", "s"].map(type),
  input: function(y, e) { return y == null ? null : [[e[0][0], +y[0]], [e[1][0], +y[1]]]; },
  output: function(xy) { return xy && [xy[0][1], xy[1][1]]; }
};
 
var XY = {
  name: "xy",
  handles: ["n", "w", "e", "s", "nw", "ne", "sw", "se"].map(type),
  input: function(xy) { return xy == null ? null : number2(xy); },
  output: function(xy) { return xy; }
};
 
var cursors = {
  overlay: "crosshair",
  selection: "move",
  n: "ns-resize",
  e: "ew-resize",
  s: "ns-resize",
  w: "ew-resize",
  nw: "nwse-resize",
  ne: "nesw-resize",
  se: "nwse-resize",
  sw: "nesw-resize"
};
 
var flipX = {
  e: "w",
  w: "e",
  nw: "ne",
  ne: "nw",
  se: "sw",
  sw: "se"
};
 
var flipY = {
  n: "s",
  s: "n",
  nw: "sw",
  ne: "se",
  se: "ne",
  sw: "nw"
};
 
var signsX = {
  overlay: +1,
  selection: +1,
  n: null,
  e: +1,
  s: null,
  w: -1,
  nw: -1,
  ne: +1,
  se: +1,
  sw: -1
};
 
var signsY = {
  overlay: +1,
  selection: +1,
  n: -1,
  e: null,
  s: +1,
  w: null,
  nw: -1,
  ne: -1,
  se: +1,
  sw: +1
};
 
function type(t) {
  return {type: t};
}
 
// Ignore right-click, since that should open the context menu.
function defaultFilter() {
  return !__WEBPACK_IMPORTED_MODULE_3_d3_selection__["e" /* event */].ctrlKey && !__WEBPACK_IMPORTED_MODULE_3_d3_selection__["e" /* event */].button;
}
 
function defaultExtent() {
  var svg = this.ownerSVGElement || this;
  if (svg.hasAttribute("viewBox")) {
    svg = svg.viewBox.baseVal;
    return [[svg.x, svg.y], [svg.x + svg.width, svg.y + svg.height]];
  }
  return [[0, 0], [svg.width.baseVal.value, svg.height.baseVal.value]];
}
 
function defaultTouchable() {
  return navigator.maxTouchPoints || ("ontouchstart" in this);
}
 
// Like d3.local, but with the name “__brush” rather than auto-generated.
function local(node) {
  while (!node.__brush) if (!(node = node.parentNode)) return;
  return node.__brush;
}
 
function empty(extent) {
  return extent[0][0] === extent[1][0]
      || extent[0][1] === extent[1][1];
}
 
function brushSelection(node) {
  var state = node.__brush;
  return state ? state.dim.output(state.selection) : null;
}
 
function brushX() {
  return brush(X);
}
 
function brushY() {
  return brush(Y);
}
 
/* harmony default export */ __webpack_exports__["d"] = (function() {
  return brush(XY);
});
 
function brush(dim) {
  var extent = defaultExtent,
      filter = defaultFilter,
      touchable = defaultTouchable,
      keys = true,
      listeners = Object(__WEBPACK_IMPORTED_MODULE_0_d3_dispatch__["a" /* dispatch */])("start", "brush", "end"),
      handleSize = 6,
      touchending;
 
  function brush(group) {
    var overlay = group
        .property("__brush", initialize)
      .selectAll(".overlay")
      .data([type("overlay")]);
 
    overlay.enter().append("rect")
        .attr("class", "overlay")
        .attr("pointer-events", "all")
        .attr("cursor", cursors.overlay)
      .merge(overlay)
        .each(function() {
          var extent = local(this).extent;
          Object(__WEBPACK_IMPORTED_MODULE_3_d3_selection__["k" /* select */])(this)
              .attr("x", extent[0][0])
              .attr("y", extent[0][1])
              .attr("width", extent[1][0] - extent[0][0])
              .attr("height", extent[1][1] - extent[0][1]);
        });
 
    group.selectAll(".selection")
      .data([type("selection")])
      .enter().append("rect")
        .attr("class", "selection")
        .attr("cursor", cursors.selection)
        .attr("fill", "#777")
        .attr("fill-opacity", 0.3)
        .attr("stroke", "#fff")
        .attr("shape-rendering", "crispEdges");
 
    var handle = group.selectAll(".handle")
      .data(dim.handles, function(d) { return d.type; });
 
    handle.exit().remove();
 
    handle.enter().append("rect")
        .attr("class", function(d) { return "handle handle--" + d.type; })
        .attr("cursor", function(d) { return cursors[d.type]; });
 
    group
        .each(redraw)
        .attr("fill", "none")
        .attr("pointer-events", "all")
        .on("mousedown.brush", started)
      .filter(touchable)
        .on("touchstart.brush", started)
        .on("touchmove.brush", touchmoved)
        .on("touchend.brush touchcancel.brush", touchended)
        .style("touch-action", "none")
        .style("-webkit-tap-highlight-color", "rgba(0,0,0,0)");
  }
 
  brush.move = function(group, selection) {
    if (group.selection) {
      group
          .on("start.brush", function() { emitter(this, arguments).beforestart().start(); })
          .on("interrupt.brush end.brush", function() { emitter(this, arguments).end(); })
          .tween("brush", function() {
            var that = this,
                state = that.__brush,
                emit = emitter(that, arguments),
                selection0 = state.selection,
                selection1 = dim.input(typeof selection === "function" ? selection.apply(this, arguments) : selection, state.extent),
                i = Object(__WEBPACK_IMPORTED_MODULE_2_d3_interpolate__["a" /* interpolate */])(selection0, selection1);
 
            function tween(t) {
              state.selection = t === 1 && selection1 === null ? null : i(t);
              redraw.call(that);
              emit.brush();
            }
 
            return selection0 !== null && selection1 !== null ? tween : tween(1);
          });
    } else {
      group
          .each(function() {
            var that = this,
                args = arguments,
                state = that.__brush,
                selection1 = dim.input(typeof selection === "function" ? selection.apply(that, args) : selection, state.extent),
                emit = emitter(that, args).beforestart();
 
            Object(__WEBPACK_IMPORTED_MODULE_4_d3_transition__["b" /* interrupt */])(that);
            state.selection = selection1 === null ? null : selection1;
            redraw.call(that);
            emit.start().brush().end();
          });
    }
  };
 
  brush.clear = function(group) {
    brush.move(group, null);
  };
 
  function redraw() {
    var group = Object(__WEBPACK_IMPORTED_MODULE_3_d3_selection__["k" /* select */])(this),
        selection = local(this).selection;
 
    if (selection) {
      group.selectAll(".selection")
          .style("display", null)
          .attr("x", selection[0][0])
          .attr("y", selection[0][1])
          .attr("width", selection[1][0] - selection[0][0])
          .attr("height", selection[1][1] - selection[0][1]);
 
      group.selectAll(".handle")
          .style("display", null)
          .attr("x", function(d) { return d.type[d.type.length - 1] === "e" ? selection[1][0] - handleSize / 2 : selection[0][0] - handleSize / 2; })
          .attr("y", function(d) { return d.type[0] === "s" ? selection[1][1] - handleSize / 2 : selection[0][1] - handleSize / 2; })
          .attr("width", function(d) { return d.type === "n" || d.type === "s" ? selection[1][0] - selection[0][0] + handleSize : handleSize; })
          .attr("height", function(d) { return d.type === "e" || d.type === "w" ? selection[1][1] - selection[0][1] + handleSize : handleSize; });
    }
 
    else {
      group.selectAll(".selection,.handle")
          .style("display", "none")
          .attr("x", null)
          .attr("y", null)
          .attr("width", null)
          .attr("height", null);
    }
  }
 
  function emitter(that, args, clean) {
    var emit = that.__brush.emitter;
    return emit && (!clean || !emit.clean) ? emit : new Emitter(that, args, clean);
  }
 
  function Emitter(that, args, clean) {
    this.that = that;
    this.args = args;
    this.state = that.__brush;
    this.active = 0;
    this.clean = clean;
  }
 
  Emitter.prototype = {
    beforestart: function() {
      if (++this.active === 1) this.state.emitter = this, this.starting = true;
      return this;
    },
    start: function() {
      if (this.starting) this.starting = false, this.emit("start");
      else this.emit("brush");
      return this;
    },
    brush: function() {
      this.emit("brush");
      return this;
    },
    end: function() {
      if (--this.active === 0) delete this.state.emitter, this.emit("end");
      return this;
    },
    emit: function(type) {
      Object(__WEBPACK_IMPORTED_MODULE_3_d3_selection__["d" /* customEvent */])(new __WEBPACK_IMPORTED_MODULE_6__event_js__["a" /* default */](brush, type, dim.output(this.state.selection)), listeners.apply, listeners, [type, this.that, this.args]);
    }
  };
 
  function started() {
    if (touchending && !__WEBPACK_IMPORTED_MODULE_3_d3_selection__["e" /* event */].touches) return;
    if (!filter.apply(this, arguments)) return;
 
    var that = this,
        type = __WEBPACK_IMPORTED_MODULE_3_d3_selection__["e" /* event */].target.__data__.type,
        mode = (keys && __WEBPACK_IMPORTED_MODULE_3_d3_selection__["e" /* event */].metaKey ? type = "overlay" : type) === "selection" ? MODE_DRAG : (keys && __WEBPACK_IMPORTED_MODULE_3_d3_selection__["e" /* event */].altKey ? MODE_CENTER : MODE_HANDLE),
        signX = dim === Y ? null : signsX[type],
        signY = dim === X ? null : signsY[type],
        state = local(that),
        extent = state.extent,
        selection = state.selection,
        W = extent[0][0], w0, w1,
        N = extent[0][1], n0, n1,
        E = extent[1][0], e0, e1,
        S = extent[1][1], s0, s1,
        dx = 0,
        dy = 0,
        moving,
        shifting = signX && signY && keys && __WEBPACK_IMPORTED_MODULE_3_d3_selection__["e" /* event */].shiftKey,
        lockX,
        lockY,
        pointer = __WEBPACK_IMPORTED_MODULE_3_d3_selection__["e" /* event */].touches ? toucher(__WEBPACK_IMPORTED_MODULE_3_d3_selection__["e" /* event */].changedTouches[0].identifier) : __WEBPACK_IMPORTED_MODULE_3_d3_selection__["h" /* mouse */],
        point0 = pointer(that),
        point = point0,
        emit = emitter(that, arguments, true).beforestart();
 
    if (type === "overlay") {
      if (selection) moving = true;
      state.selection = selection = [
        [w0 = dim === Y ? W : point0[0], n0 = dim === X ? N : point0[1]],
        [e0 = dim === Y ? E : w0, s0 = dim === X ? S : n0]
      ];
    } else {
      w0 = selection[0][0];
      n0 = selection[0][1];
      e0 = selection[1][0];
      s0 = selection[1][1];
    }
 
    w1 = w0;
    n1 = n0;
    e1 = e0;
    s1 = s0;
 
    var group = Object(__WEBPACK_IMPORTED_MODULE_3_d3_selection__["k" /* select */])(that)
        .attr("pointer-events", "none");
 
    var overlay = group.selectAll(".overlay")
        .attr("cursor", cursors[type]);
 
    if (__WEBPACK_IMPORTED_MODULE_3_d3_selection__["e" /* event */].touches) {
      emit.moved = moved;
      emit.ended = ended;
    } else {
      var view = Object(__WEBPACK_IMPORTED_MODULE_3_d3_selection__["k" /* select */])(__WEBPACK_IMPORTED_MODULE_3_d3_selection__["e" /* event */].view)
          .on("mousemove.brush", moved, true)
          .on("mouseup.brush", ended, true);
      if (keys) view
          .on("keydown.brush", keydowned, true)
          .on("keyup.brush", keyupped, true)
 
      Object(__WEBPACK_IMPORTED_MODULE_1_d3_drag__["b" /* dragDisable */])(__WEBPACK_IMPORTED_MODULE_3_d3_selection__["e" /* event */].view);
    }
 
    Object(__WEBPACK_IMPORTED_MODULE_7__noevent_js__["b" /* nopropagation */])();
    Object(__WEBPACK_IMPORTED_MODULE_4_d3_transition__["b" /* interrupt */])(that);
    redraw.call(that);
    emit.start();
 
    function moved() {
      var point1 = pointer(that);
      if (shifting && !lockX && !lockY) {
        if (Math.abs(point1[0] - point[0]) > Math.abs(point1[1] - point[1])) lockY = true;
        else lockX = true;
      }
      point = point1;
      moving = true;
      Object(__WEBPACK_IMPORTED_MODULE_7__noevent_js__["a" /* default */])();
      move();
    }
 
    function move() {
      var t;
 
      dx = point[0] - point0[0];
      dy = point[1] - point0[1];
 
      switch (mode) {
        case MODE_SPACE:
        case MODE_DRAG: {
          if (signX) dx = Math.max(W - w0, Math.min(E - e0, dx)), w1 = w0 + dx, e1 = e0 + dx;
          if (signY) dy = Math.max(N - n0, Math.min(S - s0, dy)), n1 = n0 + dy, s1 = s0 + dy;
          break;
        }
        case MODE_HANDLE: {
          if (signX < 0) dx = Math.max(W - w0, Math.min(E - w0, dx)), w1 = w0 + dx, e1 = e0;
          else if (signX > 0) dx = Math.max(W - e0, Math.min(E - e0, dx)), w1 = w0, e1 = e0 + dx;
          if (signY < 0) dy = Math.max(N - n0, Math.min(S - n0, dy)), n1 = n0 + dy, s1 = s0;
          else if (signY > 0) dy = Math.max(N - s0, Math.min(S - s0, dy)), n1 = n0, s1 = s0 + dy;
          break;
        }
        case MODE_CENTER: {
          if (signX) w1 = Math.max(W, Math.min(E, w0 - dx * signX)), e1 = Math.max(W, Math.min(E, e0 + dx * signX));
          if (signY) n1 = Math.max(N, Math.min(S, n0 - dy * signY)), s1 = Math.max(N, Math.min(S, s0 + dy * signY));
          break;
        }
      }
 
      if (e1 < w1) {
        signX *= -1;
        t = w0, w0 = e0, e0 = t;
        t = w1, w1 = e1, e1 = t;
        if (type in flipX) overlay.attr("cursor", cursors[type = flipX[type]]);
      }
 
      if (s1 < n1) {
        signY *= -1;
        t = n0, n0 = s0, s0 = t;
        t = n1, n1 = s1, s1 = t;
        if (type in flipY) overlay.attr("cursor", cursors[type = flipY[type]]);
      }
 
      if (state.selection) selection = state.selection; // May be set by brush.move!
      if (lockX) w1 = selection[0][0], e1 = selection[1][0];
      if (lockY) n1 = selection[0][1], s1 = selection[1][1];
 
      if (selection[0][0] !== w1
          || selection[0][1] !== n1
          || selection[1][0] !== e1
          || selection[1][1] !== s1) {
        state.selection = [[w1, n1], [e1, s1]];
        redraw.call(that);
        emit.brush();
      }
    }
 
    function ended() {
      Object(__WEBPACK_IMPORTED_MODULE_7__noevent_js__["b" /* nopropagation */])();
      if (__WEBPACK_IMPORTED_MODULE_3_d3_selection__["e" /* event */].touches) {
        if (__WEBPACK_IMPORTED_MODULE_3_d3_selection__["e" /* event */].touches.length) return;
        if (touchending) clearTimeout(touchending);
        touchending = setTimeout(function() { touchending = null; }, 500); // Ghost clicks are delayed!
      } else {
        Object(__WEBPACK_IMPORTED_MODULE_1_d3_drag__["c" /* dragEnable */])(__WEBPACK_IMPORTED_MODULE_3_d3_selection__["e" /* event */].view, moving);
        view.on("keydown.brush keyup.brush mousemove.brush mouseup.brush", null);
      }
      group.attr("pointer-events", "all");
      overlay.attr("cursor", cursors.overlay);
      if (state.selection) selection = state.selection; // May be set by brush.move (on start)!
      if (empty(selection)) state.selection = null, redraw.call(that);
      emit.end();
    }
 
    function keydowned() {
      switch (__WEBPACK_IMPORTED_MODULE_3_d3_selection__["e" /* event */].keyCode) {
        case 16: { // SHIFT
          shifting = signX && signY;
          break;
        }
        case 18: { // ALT
          if (mode === MODE_HANDLE) {
            if (signX) e0 = e1 - dx * signX, w0 = w1 + dx * signX;
            if (signY) s0 = s1 - dy * signY, n0 = n1 + dy * signY;
            mode = MODE_CENTER;
            move();
          }
          break;
        }
        case 32: { // SPACE; takes priority over ALT
          if (mode === MODE_HANDLE || mode === MODE_CENTER) {
            if (signX < 0) e0 = e1 - dx; else if (signX > 0) w0 = w1 - dx;
            if (signY < 0) s0 = s1 - dy; else if (signY > 0) n0 = n1 - dy;
            mode = MODE_SPACE;
            overlay.attr("cursor", cursors.selection);
            move();
          }
          break;
        }
        default: return;
      }
      Object(__WEBPACK_IMPORTED_MODULE_7__noevent_js__["a" /* default */])();
    }
 
    function keyupped() {
      switch (__WEBPACK_IMPORTED_MODULE_3_d3_selection__["e" /* event */].keyCode) {
        case 16: { // SHIFT
          if (shifting) {
            lockX = lockY = shifting = false;
            move();
          }
          break;
        }
        case 18: { // ALT
          if (mode === MODE_CENTER) {
            if (signX < 0) e0 = e1; else if (signX > 0) w0 = w1;
            if (signY < 0) s0 = s1; else if (signY > 0) n0 = n1;
            mode = MODE_HANDLE;
            move();
          }
          break;
        }
        case 32: { // SPACE
          if (mode === MODE_SPACE) {
            if (__WEBPACK_IMPORTED_MODULE_3_d3_selection__["e" /* event */].altKey) {
              if (signX) e0 = e1 - dx * signX, w0 = w1 + dx * signX;
              if (signY) s0 = s1 - dy * signY, n0 = n1 + dy * signY;
              mode = MODE_CENTER;
            } else {
              if (signX < 0) e0 = e1; else if (signX > 0) w0 = w1;
              if (signY < 0) s0 = s1; else if (signY > 0) n0 = n1;
              mode = MODE_HANDLE;
            }
            overlay.attr("cursor", cursors[type]);
            move();
          }
          break;
        }
        default: return;
      }
      Object(__WEBPACK_IMPORTED_MODULE_7__noevent_js__["a" /* default */])();
    }
  }
 
  function touchmoved() {
    emitter(this, arguments).moved();
  }
 
  function touchended() {
    emitter(this, arguments).ended();
  }
 
  function initialize() {
    var state = this.__brush || {selection: null};
    state.extent = number2(extent.apply(this, arguments));
    state.dim = dim;
    return state;
  }
 
  brush.extent = function(_) {
    return arguments.length ? (extent = typeof _ === "function" ? _ : Object(__WEBPACK_IMPORTED_MODULE_5__constant_js__["a" /* default */])(number2(_)), brush) : extent;
  };
 
  brush.filter = function(_) {
    return arguments.length ? (filter = typeof _ === "function" ? _ : Object(__WEBPACK_IMPORTED_MODULE_5__constant_js__["a" /* default */])(!!_), brush) : filter;
  };
 
  brush.touchable = function(_) {
    return arguments.length ? (touchable = typeof _ === "function" ? _ : Object(__WEBPACK_IMPORTED_MODULE_5__constant_js__["a" /* default */])(!!_), brush) : touchable;
  };
 
  brush.handleSize = function(_) {
    return arguments.length ? (handleSize = +_, brush) : handleSize;
  };
 
  brush.keyModifiers = function(_) {
    return arguments.length ? (keys = !!_, brush) : keys;
  };
 
  brush.on = function() {
    var value = listeners.on.apply(listeners, arguments);
    return value === listeners ? brush : value;
  };
 
  return brush;
}
 
 
/***/ }),
/* 1150 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
var noop = {value: function() {}};
 
function dispatch() {
  for (var i = 0, n = arguments.length, _ = {}, t; i < n; ++i) {
    Iif (!(t = arguments[i] + "") || (t in _) || /[\s.]/.test(t)) throw new Error("illegal type: " + t);
    _[t] = [];
  }
  return new Dispatch(_);
}
 
function Dispatch(_) {
  this._ = _;
}
 
function parseTypenames(typenames, types) {
  return typenames.trim().split(/^|\s+/).map(function(t) {
    var name = "", i = t.indexOf(".");
    if (i >= 0) name = t.slice(i + 1), t = t.slice(0, i);
    if (t && !types.hasOwnProperty(t)) throw new Error("unknown type: " + t);
    return {type: t, name: name};
  });
}
 
Dispatch.prototype = dispatch.prototype = {
  constructor: Dispatch,
  on: function(typename, callback) {
    var _ = this._,
        T = parseTypenames(typename + "", _),
        t,
        i = -1,
        n = T.length;
 
    // If no callback was specified, return the callback of the given type and name.
    if (arguments.length < 2) {
      while (++i < n) if ((t = (typename = T[i]).type) && (t = get(_[t], typename.name))) return t;
      return;
    }
 
    // If a type was specified, set the callback for the given type and name.
    // Otherwise, if a null callback was specified, remove callbacks of the given name.
    if (callback != null && typeof callback !== "function") throw new Error("invalid callback: " + callback);
    while (++i < n) {
      if (t = (typename = T[i]).type) _[t] = set(_[t], typename.name, callback);
      else if (callback == null) for (t in _) _[t] = set(_[t], typename.name, null);
    }
 
    return this;
  },
  copy: function() {
    var copy = {}, _ = this._;
    for (var t in _) copy[t] = _[t].slice();
    return new Dispatch(copy);
  },
  call: function(type, that) {
    if ((n = arguments.length - 2) > 0) for (var args = new Array(n), i = 0, n, t; i < n; ++i) args[i] = arguments[i + 2];
    if (!this._.hasOwnProperty(type)) throw new Error("unknown type: " + type);
    for (t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args);
  },
  apply: function(type, that, args) {
    if (!this._.hasOwnProperty(type)) throw new Error("unknown type: " + type);
    for (var t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args);
  }
};
 
function get(type, name) {
  for (var i = 0, n = type.length, c; i < n; ++i) {
    if ((c = type[i]).name === name) {
      return c.value;
    }
  }
}
 
function set(type, name, callback) {
  for (var i = 0, n = type.length; i < n; ++i) {
    if (type[i].name === name) {
      type[i] = noop, type = type.slice(0, i).concat(type.slice(i + 1));
      break;
    }
  }
  if (callback != null) type.push({name: name, value: callback});
  return type;
}
 
/* harmony default export */ __webpack_exports__["a"] = (dispatch);
 
 
/***/ }),
/* 1151 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_d3_dispatch__ = __webpack_require__(149);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_d3_selection__ = __webpack_require__(45);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__nodrag_js__ = __webpack_require__(715);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__noevent_js__ = __webpack_require__(716);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__constant_js__ = __webpack_require__(1187);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__event_js__ = __webpack_require__(1188);
 
 
 
 
 
 
 
// Ignore right-click, since that should open the context menu.
function defaultFilter() {
  return !__WEBPACK_IMPORTED_MODULE_1_d3_selection__["e" /* event */].ctrlKey && !__WEBPACK_IMPORTED_MODULE_1_d3_selection__["e" /* event */].button;
}
 
function defaultContainer() {
  return this.parentNode;
}
 
function defaultSubject(d) {
  return d == null ? {x: __WEBPACK_IMPORTED_MODULE_1_d3_selection__["e" /* event */].x, y: __WEBPACK_IMPORTED_MODULE_1_d3_selection__["e" /* event */].y} : d;
}
 
function defaultTouchable() {
  return navigator.maxTouchPoints || ("ontouchstart" in this);
}
 
/* harmony default export */ __webpack_exports__["a"] = (function() {
  var filter = defaultFilter,
      container = defaultContainer,
      subject = defaultSubject,
      touchable = defaultTouchable,
      gestures = {},
      listeners = Object(__WEBPACK_IMPORTED_MODULE_0_d3_dispatch__["a" /* dispatch */])("start", "drag", "end"),
      active = 0,
      mousedownx,
      mousedowny,
      mousemoving,
      touchending,
      clickDistance2 = 0;
 
  function drag(selection) {
    selection
        .on("mousedown.drag", mousedowned)
      .filter(touchable)
        .on("touchstart.drag", touchstarted)
        .on("touchmove.drag", touchmoved)
        .on("touchend.drag touchcancel.drag", touchended)
        .style("touch-action", "none")
        .style("-webkit-tap-highlight-color", "rgba(0,0,0,0)");
  }
 
  function mousedowned() {
    if (touchending || !filter.apply(this, arguments)) return;
    var gesture = beforestart("mouse", container.apply(this, arguments), __WEBPACK_IMPORTED_MODULE_1_d3_selection__["h" /* mouse */], this, arguments);
    if (!gesture) return;
    Object(__WEBPACK_IMPORTED_MODULE_1_d3_selection__["k" /* select */])(__WEBPACK_IMPORTED_MODULE_1_d3_selection__["e" /* event */].view).on("mousemove.drag", mousemoved, true).on("mouseup.drag", mouseupped, true);
    Object(__WEBPACK_IMPORTED_MODULE_2__nodrag_js__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1_d3_selection__["e" /* event */].view);
    Object(__WEBPACK_IMPORTED_MODULE_3__noevent_js__["b" /* nopropagation */])();
    mousemoving = false;
    mousedownx = __WEBPACK_IMPORTED_MODULE_1_d3_selection__["e" /* event */].clientX;
    mousedowny = __WEBPACK_IMPORTED_MODULE_1_d3_selection__["e" /* event */].clientY;
    gesture("start");
  }
 
  function mousemoved() {
    Object(__WEBPACK_IMPORTED_MODULE_3__noevent_js__["a" /* default */])();
    if (!mousemoving) {
      var dx = __WEBPACK_IMPORTED_MODULE_1_d3_selection__["e" /* event */].clientX - mousedownx, dy = __WEBPACK_IMPORTED_MODULE_1_d3_selection__["e" /* event */].clientY - mousedowny;
      mousemoving = dx * dx + dy * dy > clickDistance2;
    }
    gestures.mouse("drag");
  }
 
  function mouseupped() {
    Object(__WEBPACK_IMPORTED_MODULE_1_d3_selection__["k" /* select */])(__WEBPACK_IMPORTED_MODULE_1_d3_selection__["e" /* event */].view).on("mousemove.drag mouseup.drag", null);
    Object(__WEBPACK_IMPORTED_MODULE_2__nodrag_js__["b" /* yesdrag */])(__WEBPACK_IMPORTED_MODULE_1_d3_selection__["e" /* event */].view, mousemoving);
    Object(__WEBPACK_IMPORTED_MODULE_3__noevent_js__["a" /* default */])();
    gestures.mouse("end");
  }
 
  function touchstarted() {
    if (!filter.apply(this, arguments)) return;
    var touches = __WEBPACK_IMPORTED_MODULE_1_d3_selection__["e" /* event */].changedTouches,
        c = container.apply(this, arguments),
        n = touches.length, i, gesture;
 
    for (i = 0; i < n; ++i) {
      if (gesture = beforestart(touches[i].identifier, c, __WEBPACK_IMPORTED_MODULE_1_d3_selection__["q" /* touch */], this, arguments)) {
        Object(__WEBPACK_IMPORTED_MODULE_3__noevent_js__["b" /* nopropagation */])();
        gesture("start");
      }
    }
  }
 
  function touchmoved() {
    var touches = __WEBPACK_IMPORTED_MODULE_1_d3_selection__["e" /* event */].changedTouches,
        n = touches.length, i, gesture;
 
    for (i = 0; i < n; ++i) {
      if (gesture = gestures[touches[i].identifier]) {
        Object(__WEBPACK_IMPORTED_MODULE_3__noevent_js__["a" /* default */])();
        gesture("drag");
      }
    }
  }
 
  function touchended() {
    var touches = __WEBPACK_IMPORTED_MODULE_1_d3_selection__["e" /* event */].changedTouches,
        n = touches.length, i, gesture;
 
    if (touchending) clearTimeout(touchending);
    touchending = setTimeout(function() { touchending = null; }, 500); // Ghost clicks are delayed!
    for (i = 0; i < n; ++i) {
      if (gesture = gestures[touches[i].identifier]) {
        Object(__WEBPACK_IMPORTED_MODULE_3__noevent_js__["b" /* nopropagation */])();
        gesture("end");
      }
    }
  }
 
  function beforestart(id, container, point, that, args) {
    var p = point(container, id), s, dx, dy,
        sublisteners = listeners.copy();
 
    if (!Object(__WEBPACK_IMPORTED_MODULE_1_d3_selection__["d" /* customEvent */])(new __WEBPACK_IMPORTED_MODULE_5__event_js__["a" /* default */](drag, "beforestart", s, id, active, p[0], p[1], 0, 0, sublisteners), function() {
      if ((__WEBPACK_IMPORTED_MODULE_1_d3_selection__["e" /* event */].subject = s = subject.apply(that, args)) == null) return false;
      dx = s.x - p[0] || 0;
      dy = s.y - p[1] || 0;
      return true;
    })) return;
 
    return function gesture(type) {
      var p0 = p, n;
      switch (type) {
        case "start": gestures[id] = gesture, n = active++; break;
        case "end": delete gestures[id], --active; // nobreak
        case "drag": p = point(container, id), n = active; break;
      }
      Object(__WEBPACK_IMPORTED_MODULE_1_d3_selection__["d" /* customEvent */])(new __WEBPACK_IMPORTED_MODULE_5__event_js__["a" /* default */](drag, type, s, id, n, p[0] + dx, p[1] + dy, p[0] - p0[0], p[1] - p0[1], sublisteners), sublisteners.apply, sublisteners, [type, that, args]);
    };
  }
 
  drag.filter = function(_) {
    return arguments.length ? (filter = typeof _ === "function" ? _ : Object(__WEBPACK_IMPORTED_MODULE_4__constant_js__["a" /* default */])(!!_), drag) : filter;
  };
 
  drag.container = function(_) {
    return arguments.length ? (container = typeof _ === "function" ? _ : Object(__WEBPACK_IMPORTED_MODULE_4__constant_js__["a" /* default */])(_), drag) : container;
  };
 
  drag.subject = function(_) {
    return arguments.length ? (subject = typeof _ === "function" ? _ : Object(__WEBPACK_IMPORTED_MODULE_4__constant_js__["a" /* default */])(_), drag) : subject;
  };
 
  drag.touchable = function(_) {
    return arguments.length ? (touchable = typeof _ === "function" ? _ : Object(__WEBPACK_IMPORTED_MODULE_4__constant_js__["a" /* default */])(!!_), drag) : touchable;
  };
 
  drag.on = function() {
    var value = listeners.on.apply(listeners, arguments);
    return value === listeners ? drag : value;
  };
 
  drag.clickDistance = function(_) {
    return arguments.length ? (clickDistance2 = (_ = +_) * _, drag) : Math.sqrt(clickDistance2);
  };
 
  return drag;
});
 
 
/***/ }),
/* 1152 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__creator__ = __webpack_require__(244);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__select__ = __webpack_require__(709);
 
 
 
/* harmony default export */ __webpack_exports__["a"] = (function(name) {
  return Object(__WEBPACK_IMPORTED_MODULE_1__select__["a" /* default */])(Object(__WEBPACK_IMPORTED_MODULE_0__creator__["a" /* default */])(name).call(document.documentElement));
});
 
 
/***/ }),
/* 1153 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__index__ = __webpack_require__(73);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__selector__ = __webpack_require__(339);
 
 
 
/* harmony default export */ __webpack_exports__["a"] = (function(select) {
  Iif (typeof select !== "function") select = Object(__WEBPACK_IMPORTED_MODULE_1__selector__["a" /* default */])(select);
 
  for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {
    for (var group = groups[j], n = group.length, subgroup = subgroups[j] = new Array(n), node, subnode, i = 0; i < n; ++i) {
      Eif ((node = group[i]) && (subnode = select.call(node, node.__data__, i, group))) {
        if ("__data__" in node) subnode.__data__ = node.__data__;
        subgroup[i] = subnode;
      }
    }
  }
 
  return new __WEBPACK_IMPORTED_MODULE_0__index__["a" /* Selection */](subgroups, this._parents);
});
 
 
/***/ }),
/* 1154 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__index__ = __webpack_require__(73);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__selectorAll__ = __webpack_require__(710);
 
 
 
/* harmony default export */ __webpack_exports__["a"] = (function(select) {
  Eif (typeof select !== "function") select = Object(__WEBPACK_IMPORTED_MODULE_1__selectorAll__["a" /* default */])(select);
 
  for (var groups = this._groups, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++j) {
    for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {
      Eif (node = group[i]) {
        subgroups.push(select.call(node, node.__data__, i, group));
        parents.push(node);
      }
    }
  }
 
  return new __WEBPACK_IMPORTED_MODULE_0__index__["a" /* Selection */](subgroups, parents);
});
 
 
/***/ }),
/* 1155 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__index__ = __webpack_require__(73);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__matcher__ = __webpack_require__(711);
 
 
 
/* harmony default export */ __webpack_exports__["a"] = (function(match) {
  if (typeof match !== "function") match = Object(__WEBPACK_IMPORTED_MODULE_1__matcher__["a" /* default */])(match);
 
  for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {
    for (var group = groups[j], n = group.length, subgroup = subgroups[j] = [], node, i = 0; i < n; ++i) {
      if ((node = group[i]) && match.call(node, node.__data__, i, group)) {
        subgroup.push(node);
      }
    }
  }
 
  return new __WEBPACK_IMPORTED_MODULE_0__index__["a" /* Selection */](subgroups, this._parents);
});
 
 
/***/ }),
/* 1156 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__index__ = __webpack_require__(73);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__enter__ = __webpack_require__(712);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__constant__ = __webpack_require__(1157);
 
 
 
 
var keyPrefix = "$"; // Protect against keys like “__proto__”.
 
function bindIndex(parent, group, enter, update, exit, data) {
  var i = 0,
      node,
      groupLength = group.length,
      dataLength = data.length;
 
  // Put any non-null nodes that fit into update.
  // Put any null nodes into enter.
  // Put any remaining data into enter.
  for (; i < dataLength; ++i) {
    Iif (node = group[i]) {
      node.__data__ = data[i];
      update[i] = node;
    } else {
      enter[i] = new __WEBPACK_IMPORTED_MODULE_1__enter__["a" /* EnterNode */](parent, data[i]);
    }
  }
 
  // Put any non-null nodes that don’t fit into exit.
  for (; i < groupLength; ++i) {
    if (node = group[i]) {
      exit[i] = node;
    }
  }
}
 
function bindKey(parent, group, enter, update, exit, data, key) {
  var i,
      node,
      nodeByKeyValue = {},
      groupLength = group.length,
      dataLength = data.length,
      keyValues = new Array(groupLength),
      keyValue;
 
  // Compute the key for each node.
  // If multiple nodes have the same key, the duplicates are added to exit.
  for (i = 0; i < groupLength; ++i) {
    if (node = group[i]) {
      keyValues[i] = keyValue = keyPrefix + key.call(node, node.__data__, i, group);
      if (keyValue in nodeByKeyValue) {
        exit[i] = node;
      } else {
        nodeByKeyValue[keyValue] = node;
      }
    }
  }
 
  // Compute the key for each datum.
  // If there a node associated with this key, join and add it to update.
  // If there is not (or the key is a duplicate), add it to enter.
  for (i = 0; i < dataLength; ++i) {
    keyValue = keyPrefix + key.call(parent, data[i], i, data);
    if (node = nodeByKeyValue[keyValue]) {
      update[i] = node;
      node.__data__ = data[i];
      nodeByKeyValue[keyValue] = null;
    } else {
      enter[i] = new __WEBPACK_IMPORTED_MODULE_1__enter__["a" /* EnterNode */](parent, data[i]);
    }
  }
 
  // Add any remaining nodes that were not bound to data to exit.
  for (i = 0; i < groupLength; ++i) {
    if ((node = group[i]) && (nodeByKeyValue[keyValues[i]] === node)) {
      exit[i] = node;
    }
  }
}
 
/* harmony default export */ __webpack_exports__["a"] = (function(value, key) {
  Iif (!value) {
    data = new Array(this.size()), j = -1;
    this.each(function(d) { data[++j] = d; });
    return data;
  }
 
  var bind = key ? bindKey : bindIndex,
      parents = this._parents,
      groups = this._groups;
 
  Eif (typeof value !== "function") value = Object(__WEBPACK_IMPORTED_MODULE_2__constant__["a" /* default */])(value);
 
  for (var m = groups.length, update = new Array(m), enter = new Array(m), exit = new Array(m), j = 0; j < m; ++j) {
    var parent = parents[j],
        group = groups[j],
        groupLength = group.length,
        data = value.call(parent, parent && parent.__data__, j, parents),
        dataLength = data.length,
        enterGroup = enter[j] = new Array(dataLength),
        updateGroup = update[j] = new Array(dataLength),
        exitGroup = exit[j] = new Array(groupLength);
 
    bind(parent, group, enterGroup, updateGroup, exitGroup, data, key);
 
    // Now connect the enter nodes to their following update node, such that
    // appendChild can insert the materialized enter node before this node,
    // rather than at the end of the parent node.
    for (var i0 = 0, i1 = 0, previous, next; i0 < dataLength; ++i0) {
      Eif (previous = enterGroup[i0]) {
        if (i0 >= i1) i1 = i0 + 1;
        while (!(next = updateGroup[i1]) && ++i1 < dataLength);
        previous._next = next || null;
      }
    }
  }
 
  update = new __WEBPACK_IMPORTED_MODULE_0__index__["a" /* Selection */](update, parents);
  update._enter = enter;
  update._exit = exit;
  return update;
});
 
 
/***/ }),
/* 1157 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony default export */ __webpack_exports__["a"] = (function(x) {
  return function() {
    return x;
  };
});
 
 
/***/ }),
/* 1158 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__sparse__ = __webpack_require__(713);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__index__ = __webpack_require__(73);
 
 
 
/* harmony default export */ __webpack_exports__["a"] = (function() {
  return new __WEBPACK_IMPORTED_MODULE_1__index__["a" /* Selection */](this._exit || this._groups.map(__WEBPACK_IMPORTED_MODULE_0__sparse__["a" /* default */]), this._parents);
});
 
 
/***/ }),
/* 1159 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony default export */ __webpack_exports__["a"] = (function(onenter, onupdate, onexit) {
  var enter = this.enter(), update = this, exit = this.exit();
  enter = typeof onenter === "function" ? onenter(enter) : enter.append(onenter + "");
  if (onupdate != null) update = onupdate(update);
  if (onexit == null) exit.remove(); else onexit(exit);
  return enter && update ? enter.merge(update).order() : update;
});
 
 
/***/ }),
/* 1160 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__index__ = __webpack_require__(73);
 
 
/* harmony default export */ __webpack_exports__["a"] = (function(selection) {
 
  for (var groups0 = this._groups, groups1 = selection._groups, m0 = groups0.length, m1 = groups1.length, m = Math.min(m0, m1), merges = new Array(m0), j = 0; j < m; ++j) {
    for (var group0 = groups0[j], group1 = groups1[j], n = group0.length, merge = merges[j] = new Array(n), node, i = 0; i < n; ++i) {
      if (node = group0[i] || group1[i]) {
        merge[i] = node;
      }
    }
  }
 
  for (; j < m0; ++j) {
    merges[j] = groups0[j];
  }
 
  return new __WEBPACK_IMPORTED_MODULE_0__index__["a" /* Selection */](merges, this._parents);
});
 
 
/***/ }),
/* 1161 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony default export */ __webpack_exports__["a"] = (function() {
 
  for (var groups = this._groups, j = -1, m = groups.length; ++j < m;) {
    for (var group = groups[j], i = group.length - 1, next = group[i], node; --i >= 0;) {
      if (node = group[i]) {
        if (next && node.compareDocumentPosition(next) ^ 4) next.parentNode.insertBefore(node, next);
        next = node;
      }
    }
  }
 
  return this;
});
 
 
/***/ }),
/* 1162 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__index__ = __webpack_require__(73);
 
 
/* harmony default export */ __webpack_exports__["a"] = (function(compare) {
  if (!compare) compare = ascending;
 
  function compareNode(a, b) {
    return a && b ? compare(a.__data__, b.__data__) : !a - !b;
  }
 
  for (var groups = this._groups, m = groups.length, sortgroups = new Array(m), j = 0; j < m; ++j) {
    for (var group = groups[j], n = group.length, sortgroup = sortgroups[j] = new Array(n), node, i = 0; i < n; ++i) {
      if (node = group[i]) {
        sortgroup[i] = node;
      }
    }
    sortgroup.sort(compareNode);
  }
 
  return new __WEBPACK_IMPORTED_MODULE_0__index__["a" /* Selection */](sortgroups, this._parents).order();
});
 
function ascending(a, b) {
  return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN;
}
 
 
/***/ }),
/* 1163 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony default export */ __webpack_exports__["a"] = (function() {
  var callback = arguments[0];
  arguments[0] = this;
  callback.apply(null, arguments);
  return this;
});
 
 
/***/ }),
/* 1164 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony default export */ __webpack_exports__["a"] = (function() {
  var nodes = new Array(this.size()), i = -1;
  this.each(function() { nodes[++i] = this; });
  return nodes;
});
 
 
/***/ }),
/* 1165 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony default export */ __webpack_exports__["a"] = (function() {
 
  for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {
    for (var group = groups[j], i = 0, n = group.length; i < n; ++i) {
      var node = group[i];
      if (node) return node;
    }
  }
 
  return null;
});
 
 
/***/ }),
/* 1166 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony default export */ __webpack_exports__["a"] = (function() {
  var size = 0;
  this.each(function() { ++size; });
  return size;
});
 
 
/***/ }),
/* 1167 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony default export */ __webpack_exports__["a"] = (function() {
  return !this.node();
});
 
 
/***/ }),
/* 1168 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony default export */ __webpack_exports__["a"] = (function(callback) {
 
  for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {
    for (var group = groups[j], i = 0, n = group.length, node; i < n; ++i) {
      if (node = group[i]) callback.call(node, node.__data__, i, group);
    }
  }
 
  return this;
});
 
 
/***/ }),
/* 1169 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__namespace__ = __webpack_require__(337);
 
 
function attrRemove(name) {
  return function() {
    this.removeAttribute(name);
  };
}
 
function attrRemoveNS(fullname) {
  return function() {
    this.removeAttributeNS(fullname.space, fullname.local);
  };
}
 
function attrConstant(name, value) {
  return function() {
    this.setAttribute(name, value);
  };
}
 
function attrConstantNS(fullname, value) {
  return function() {
    this.setAttributeNS(fullname.space, fullname.local, value);
  };
}
 
function attrFunction(name, value) {
  return function() {
    var v = value.apply(this, arguments);
    Iif (v == null) this.removeAttribute(name);
    else this.setAttribute(name, v);
  };
}
 
function attrFunctionNS(fullname, value) {
  return function() {
    var v = value.apply(this, arguments);
    if (v == null) this.removeAttributeNS(fullname.space, fullname.local);
    else this.setAttributeNS(fullname.space, fullname.local, v);
  };
}
 
/* harmony default export */ __webpack_exports__["a"] = (function(name, value) {
  var fullname = Object(__WEBPACK_IMPORTED_MODULE_0__namespace__["a" /* default */])(name);
 
  Iif (arguments.length < 2) {
    var node = this.node();
    return fullname.local
        ? node.getAttributeNS(fullname.space, fullname.local)
        : node.getAttribute(fullname);
  }
 
  return this.each((value == null
      ? (fullname.local ? attrRemoveNS : attrRemove) : (typeof value === "function"
      ? (fullname.local ? attrFunctionNS : attrFunction)
      : (fullname.local ? attrConstantNS : attrConstant)))(fullname, value));
});
 
 
/***/ }),
/* 1170 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
function propertyRemove(name) {
  return function() {
    delete this[name];
  };
}
 
function propertyConstant(name, value) {
  return function() {
    this[name] = value;
  };
}
 
function propertyFunction(name, value) {
  return function() {
    var v = value.apply(this, arguments);
    if (v == null) delete this[name];
    else this[name] = v;
  };
}
 
/* harmony default export */ __webpack_exports__["a"] = (function(name, value) {
  return arguments.length > 1
      ? this.each((value == null
          ? propertyRemove : typeof value === "function"
          ? propertyFunction
          : propertyConstant)(name, value))
      : this.node()[name];
});
 
 
/***/ }),
/* 1171 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
function classArray(string) {
  return string.trim().split(/^|\s+/);
}
 
function classList(node) {
  return node.classList || new ClassList(node);
}
 
function ClassList(node) {
  this._node = node;
  this._names = classArray(node.getAttribute("class") || "");
}
 
ClassList.prototype = {
  add: function(name) {
    var i = this._names.indexOf(name);
    if (i < 0) {
      this._names.push(name);
      this._node.setAttribute("class", this._names.join(" "));
    }
  },
  remove: function(name) {
    var i = this._names.indexOf(name);
    if (i >= 0) {
      this._names.splice(i, 1);
      this._node.setAttribute("class", this._names.join(" "));
    }
  },
  contains: function(name) {
    return this._names.indexOf(name) >= 0;
  }
};
 
function classedAdd(node, names) {
  var list = classList(node), i = -1, n = names.length;
  while (++i < n) list.add(names[i]);
}
 
function classedRemove(node, names) {
  var list = classList(node), i = -1, n = names.length;
  while (++i < n) list.remove(names[i]);
}
 
function classedTrue(names) {
  return function() {
    classedAdd(this, names);
  };
}
 
function classedFalse(names) {
  return function() {
    classedRemove(this, names);
  };
}
 
function classedFunction(names, value) {
  return function() {
    (value.apply(this, arguments) ? classedAdd : classedRemove)(this, names);
  };
}
 
/* harmony default export */ __webpack_exports__["a"] = (function(name, value) {
  var names = classArray(name + "");
 
  if (arguments.length < 2) {
    var list = classList(this.node()), i = -1, n = names.length;
    while (++i < n) if (!list.contains(names[i])) return false;
    return true;
  }
 
  return this.each((typeof value === "function"
      ? classedFunction : value
      ? classedTrue
      : classedFalse)(names, value));
});
 
 
/***/ }),
/* 1172 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
function textRemove() {
  this.textContent = "";
}
 
function textConstant(value) {
  return function() {
    this.textContent = value;
  };
}
 
function textFunction(value) {
  return function() {
    var v = value.apply(this, arguments);
    this.textContent = v == null ? "" : v;
  };
}
 
/* harmony default export */ __webpack_exports__["a"] = (function(value) {
  return arguments.length
      ? this.each(value == null
          ? textRemove : (typeof value === "function"
          ? textFunction
          : textConstant)(value))
      : this.node().textContent;
});
 
 
/***/ }),
/* 1173 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
function htmlRemove() {
  this.innerHTML = "";
}
 
function htmlConstant(value) {
  return function() {
    this.innerHTML = value;
  };
}
 
function htmlFunction(value) {
  return function() {
    var v = value.apply(this, arguments);
    this.innerHTML = v == null ? "" : v;
  };
}
 
/* harmony default export */ __webpack_exports__["a"] = (function(value) {
  return arguments.length
      ? this.each(value == null
          ? htmlRemove : (typeof value === "function"
          ? htmlFunction
          : htmlConstant)(value))
      : this.node().innerHTML;
});
 
 
/***/ }),
/* 1174 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
function raise() {
  if (this.nextSibling) this.parentNode.appendChild(this);
}
 
/* harmony default export */ __webpack_exports__["a"] = (function() {
  return this.each(raise);
});
 
 
/***/ }),
/* 1175 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
function lower() {
  if (this.previousSibling) this.parentNode.insertBefore(this, this.parentNode.firstChild);
}
 
/* harmony default export */ __webpack_exports__["a"] = (function() {
  return this.each(lower);
});
 
 
/***/ }),
/* 1176 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__creator__ = __webpack_require__(244);
 
 
/* harmony default export */ __webpack_exports__["a"] = (function(name) {
  var create = typeof name === "function" ? name : Object(__WEBPACK_IMPORTED_MODULE_0__creator__["a" /* default */])(name);
  return this.select(function() {
    return this.appendChild(create.apply(this, arguments));
  });
});
 
 
/***/ }),
/* 1177 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__creator__ = __webpack_require__(244);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__selector__ = __webpack_require__(339);
 
 
 
function constantNull() {
  return null;
}
 
/* harmony default export */ __webpack_exports__["a"] = (function(name, before) {
  var create = typeof name === "function" ? name : Object(__WEBPACK_IMPORTED_MODULE_0__creator__["a" /* default */])(name),
      select = before == null ? constantNull : typeof before === "function" ? before : Object(__WEBPACK_IMPORTED_MODULE_1__selector__["a" /* default */])(before);
  return this.select(function() {
    return this.insertBefore(create.apply(this, arguments), select.apply(this, arguments) || null);
  });
});
 
 
/***/ }),
/* 1178 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
function remove() {
  var parent = this.parentNode;
  if (parent) parent.removeChild(this);
}
 
/* harmony default export */ __webpack_exports__["a"] = (function() {
  return this.each(remove);
});
 
 
/***/ }),
/* 1179 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
function selection_cloneShallow() {
  var clone = this.cloneNode(false), parent = this.parentNode;
  return parent ? parent.insertBefore(clone, this.nextSibling) : clone;
}
 
function selection_cloneDeep() {
  var clone = this.cloneNode(true), parent = this.parentNode;
  return parent ? parent.insertBefore(clone, this.nextSibling) : clone;
}
 
/* harmony default export */ __webpack_exports__["a"] = (function(deep) {
  return this.select(deep ? selection_cloneDeep : selection_cloneShallow);
});
 
 
/***/ }),
/* 1180 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony default export */ __webpack_exports__["a"] = (function(value) {
  return arguments.length
      ? this.property("__data__", value)
      : this.node().__data__;
});
 
 
/***/ }),
/* 1181 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__window__ = __webpack_require__(340);
 
 
function dispatchEvent(node, type, params) {
  var window = Object(__WEBPACK_IMPORTED_MODULE_0__window__["a" /* default */])(node),
      event = window.CustomEvent;
 
  if (typeof event === "function") {
    event = new event(type, params);
  } else {
    event = window.document.createEvent("Event");
    if (params) event.initEvent(type, params.bubbles, params.cancelable), event.detail = params.detail;
    else event.initEvent(type, false, false);
  }
 
  node.dispatchEvent(event);
}
 
function dispatchConstant(type, params) {
  return function() {
    return dispatchEvent(this, type, params);
  };
}
 
function dispatchFunction(type, params) {
  return function() {
    return dispatchEvent(this, type, params.apply(this, arguments));
  };
}
 
/* harmony default export */ __webpack_exports__["a"] = (function(type, params) {
  return this.each((typeof params === "function"
      ? dispatchFunction
      : dispatchConstant)(type, params));
});
 
 
/***/ }),
/* 1182 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = local;
var nextId = 0;
 
function local() {
  return new Local;
}
 
function Local() {
  this._ = "@" + (++nextId).toString(36);
}
 
Local.prototype = local.prototype = {
  constructor: Local,
  get: function(node) {
    var id = this._;
    while (!(id in node)) if (!(node = node.parentNode)) return;
    return node[id];
  },
  set: function(node, value) {
    return node[this._] = value;
  },
  remove: function(node) {
    return this._ in node && delete node[this._];
  },
  toString: function() {
    return this._;
  }
};
 
 
/***/ }),
/* 1183 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__sourceEvent__ = __webpack_require__(342);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__point__ = __webpack_require__(245);
 
 
 
/* harmony default export */ __webpack_exports__["a"] = (function(node) {
  var event = Object(__WEBPACK_IMPORTED_MODULE_0__sourceEvent__["a" /* default */])();
  if (event.changedTouches) event = event.changedTouches[0];
  return Object(__WEBPACK_IMPORTED_MODULE_1__point__["a" /* default */])(node, event);
});
 
 
/***/ }),
/* 1184 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__selection_index__ = __webpack_require__(73);
 
 
/* harmony default export */ __webpack_exports__["a"] = (function(selector) {
  return typeof selector === "string"
      ? new __WEBPACK_IMPORTED_MODULE_0__selection_index__["a" /* Selection */]([document.querySelectorAll(selector)], [document.documentElement])
      : new __WEBPACK_IMPORTED_MODULE_0__selection_index__["a" /* Selection */]([selector == null ? [] : selector], __WEBPACK_IMPORTED_MODULE_0__selection_index__["c" /* root */]);
});
 
 
/***/ }),
/* 1185 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__sourceEvent__ = __webpack_require__(342);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__point__ = __webpack_require__(245);
 
 
 
/* harmony default export */ __webpack_exports__["a"] = (function(node, touches, identifier) {
  if (arguments.length < 3) identifier = touches, touches = Object(__WEBPACK_IMPORTED_MODULE_0__sourceEvent__["a" /* default */])().changedTouches;
 
  for (var i = 0, n = touches ? touches.length : 0, touch; i < n; ++i) {
    if ((touch = touches[i]).identifier === identifier) {
      return Object(__WEBPACK_IMPORTED_MODULE_1__point__["a" /* default */])(node, touch);
    }
  }
 
  return null;
});
 
 
/***/ }),
/* 1186 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__sourceEvent__ = __webpack_require__(342);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__point__ = __webpack_require__(245);
 
 
 
/* harmony default export */ __webpack_exports__["a"] = (function(node, touches) {
  if (touches == null) touches = Object(__WEBPACK_IMPORTED_MODULE_0__sourceEvent__["a" /* default */])().touches;
 
  for (var i = 0, n = touches ? touches.length : 0, points = new Array(n); i < n; ++i) {
    points[i] = Object(__WEBPACK_IMPORTED_MODULE_1__point__["a" /* default */])(node, touches[i]);
  }
 
  return points;
});
 
 
/***/ }),
/* 1187 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony default export */ __webpack_exports__["a"] = (function(x) {
  return function() {
    return x;
  };
});
 
 
/***/ }),
/* 1188 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = DragEvent;
function DragEvent(target, type, subject, id, active, x, y, dx, dy, dispatch) {
  this.target = target;
  this.type = type;
  this.subject = subject;
  this.identifier = id;
  this.active = active;
  this.x = x;
  this.y = y;
  this.dx = dx;
  this.dy = dy;
  this._ = dispatch;
}
 
DragEvent.prototype.on = function() {
  var value = this._.on.apply(this._, arguments);
  return value === this._ ? this : value;
};
 
 
/***/ }),
/* 1189 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["b"] = gray;
/* harmony export (immutable) */ __webpack_exports__["a"] = lab;
/* unused harmony export Lab */
/* harmony export (immutable) */ __webpack_exports__["d"] = lch;
/* harmony export (immutable) */ __webpack_exports__["c"] = hcl;
/* unused harmony export Hcl */
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__define_js__ = __webpack_require__(345);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__color_js__ = __webpack_require__(344);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__math_js__ = __webpack_require__(717);
 
 
 
 
// https://observablehq.com/@mbostock/lab-and-rgb
const K = 18,
    Xn = 0.96422,
    Yn = 1,
    Zn = 0.82521,
    t0 = 4 / 29,
    t1 = 6 / 29,
    t2 = 3 * t1 * t1,
    t3 = t1 * t1 * t1;
 
function labConvert(o) {
  if (o instanceof Lab) return new Lab(o.l, o.a, o.b, o.opacity);
  if (o instanceof Hcl) return hcl2lab(o);
  if (!(o instanceof __WEBPACK_IMPORTED_MODULE_1__color_js__["b" /* Rgb */])) o = Object(__WEBPACK_IMPORTED_MODULE_1__color_js__["h" /* rgbConvert */])(o);
  var r = rgb2lrgb(o.r),
      g = rgb2lrgb(o.g),
      b = rgb2lrgb(o.b),
      y = xyz2lab((0.2225045 * r + 0.7168786 * g + 0.0606169 * b) / Yn), x, z;
  if (r === g && g === b) x = z = y; else {
    x = xyz2lab((0.4360747 * r + 0.3850649 * g + 0.1430804 * b) / Xn);
    z = xyz2lab((0.0139322 * r + 0.0971045 * g + 0.7141733 * b) / Zn);
  }
  return new Lab(116 * y - 16, 500 * (x - y), 200 * (y - z), o.opacity);
}
 
function gray(l, opacity) {
  return new Lab(l, 0, 0, opacity == null ? 1 : opacity);
}
 
function lab(l, a, b, opacity) {
  return arguments.length === 1 ? labConvert(l) : new Lab(l, a, b, opacity == null ? 1 : opacity);
}
 
function Lab(l, a, b, opacity) {
  this.l = +l;
  this.a = +a;
  this.b = +b;
  this.opacity = +opacity;
}
 
Object(__WEBPACK_IMPORTED_MODULE_0__define_js__["a" /* default */])(Lab, lab, Object(__WEBPACK_IMPORTED_MODULE_0__define_js__["b" /* extend */])(__WEBPACK_IMPORTED_MODULE_1__color_js__["a" /* Color */], {
  brighter: function(k) {
    return new Lab(this.l + K * (k == null ? 1 : k), this.a, this.b, this.opacity);
  },
  darker: function(k) {
    return new Lab(this.l - K * (k == null ? 1 : k), this.a, this.b, this.opacity);
  },
  rgb: function() {
    var y = (this.l + 16) / 116,
        x = isNaN(this.a) ? y : y + this.a / 500,
        z = isNaN(this.b) ? y : y - this.b / 200;
    x = Xn * lab2xyz(x);
    y = Yn * lab2xyz(y);
    z = Zn * lab2xyz(z);
    return new __WEBPACK_IMPORTED_MODULE_1__color_js__["b" /* Rgb */](
      lrgb2rgb( 3.1338561 * x - 1.6168667 * y - 0.4906146 * z),
      lrgb2rgb(-0.9787684 * x + 1.9161415 * y + 0.0334540 * z),
      lrgb2rgb( 0.0719453 * x - 0.2289914 * y + 1.4052427 * z),
      this.opacity
    );
  }
}));
 
function xyz2lab(t) {
  return t > t3 ? Math.pow(t, 1 / 3) : t / t2 + t0;
}
 
function lab2xyz(t) {
  return t > t1 ? t * t * t : t2 * (t - t0);
}
 
function lrgb2rgb(x) {
  return 255 * (x <= 0.0031308 ? 12.92 * x : 1.055 * Math.pow(x, 1 / 2.4) - 0.055);
}
 
function rgb2lrgb(x) {
  return (x /= 255) <= 0.04045 ? x / 12.92 : Math.pow((x + 0.055) / 1.055, 2.4);
}
 
function hclConvert(o) {
  if (o instanceof Hcl) return new Hcl(o.h, o.c, o.l, o.opacity);
  if (!(o instanceof Lab)) o = labConvert(o);
  if (o.a === 0 && o.b === 0) return new Hcl(NaN, 0 < o.l && o.l < 100 ? 0 : NaN, o.l, o.opacity);
  var h = Math.atan2(o.b, o.a) * __WEBPACK_IMPORTED_MODULE_2__math_js__["a" /* degrees */];
  return new Hcl(h < 0 ? h + 360 : h, Math.sqrt(o.a * o.a + o.b * o.b), o.l, o.opacity);
}
 
function lch(l, c, h, opacity) {
  return arguments.length === 1 ? hclConvert(l) : new Hcl(h, c, l, opacity == null ? 1 : opacity);
}
 
function hcl(h, c, l, opacity) {
  return arguments.length === 1 ? hclConvert(h) : new Hcl(h, c, l, opacity == null ? 1 : opacity);
}
 
function Hcl(h, c, l, opacity) {
  this.h = +h;
  this.c = +c;
  this.l = +l;
  this.opacity = +opacity;
}
 
function hcl2lab(o) {
  if (isNaN(o.h)) return new Lab(o.l, 0, 0, o.opacity);
  var h = o.h * __WEBPACK_IMPORTED_MODULE_2__math_js__["b" /* radians */];
  return new Lab(o.l, Math.cos(h) * o.c, Math.sin(h) * o.c, o.opacity);
}
 
Object(__WEBPACK_IMPORTED_MODULE_0__define_js__["a" /* default */])(Hcl, hcl, Object(__WEBPACK_IMPORTED_MODULE_0__define_js__["b" /* extend */])(__WEBPACK_IMPORTED_MODULE_1__color_js__["a" /* Color */], {
  brighter: function(k) {
    return new Hcl(this.h, this.c, this.l + K * (k == null ? 1 : k), this.opacity);
  },
  darker: function(k) {
    return new Hcl(this.h, this.c, this.l - K * (k == null ? 1 : k), this.opacity);
  },
  rgb: function() {
    return hcl2lab(this).rgb();
  }
}));
 
 
/***/ }),
/* 1190 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = cubehelix;
/* unused harmony export Cubehelix */
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__define_js__ = __webpack_require__(345);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__color_js__ = __webpack_require__(344);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__math_js__ = __webpack_require__(717);
 
 
 
 
var A = -0.14861,
    B = +1.78277,
    C = -0.29227,
    D = -0.90649,
    E = +1.97294,
    ED = E * D,
    EB = E * B,
    BC_DA = B * C - D * A;
 
function cubehelixConvert(o) {
  Eif (o instanceof Cubehelix) return new Cubehelix(o.h, o.s, o.l, o.opacity);
  if (!(o instanceof __WEBPACK_IMPORTED_MODULE_1__color_js__["b" /* Rgb */])) o = Object(__WEBPACK_IMPORTED_MODULE_1__color_js__["h" /* rgbConvert */])(o);
  var r = o.r / 255,
      g = o.g / 255,
      b = o.b / 255,
      l = (BC_DA * b + ED * r - EB * g) / (BC_DA + ED - EB),
      bl = b - l,
      k = (E * (g - l) - C * bl) / D,
      s = Math.sqrt(k * k + bl * bl) / (E * l * (1 - l)), // NaN if l=0 or l=1
      h = s ? Math.atan2(k, bl) * __WEBPACK_IMPORTED_MODULE_2__math_js__["a" /* degrees */] - 120 : NaN;
  return new Cubehelix(h < 0 ? h + 360 : h, s, l, o.opacity);
}
 
function cubehelix(h, s, l, opacity) {
  return arguments.length === 1 ? cubehelixConvert(h) : new Cubehelix(h, s, l, opacity == null ? 1 : opacity);
}
 
function Cubehelix(h, s, l, opacity) {
  this.h = +h;
  this.s = +s;
  this.l = +l;
  this.opacity = +opacity;
}
 
Object(__WEBPACK_IMPORTED_MODULE_0__define_js__["a" /* default */])(Cubehelix, cubehelix, Object(__WEBPACK_IMPORTED_MODULE_0__define_js__["b" /* extend */])(__WEBPACK_IMPORTED_MODULE_1__color_js__["a" /* Color */], {
  brighter: function(k) {
    k = k == null ? __WEBPACK_IMPORTED_MODULE_1__color_js__["c" /* brighter */] : Math.pow(__WEBPACK_IMPORTED_MODULE_1__color_js__["c" /* brighter */], k);
    return new Cubehelix(this.h, this.s, this.l * k, this.opacity);
  },
  darker: function(k) {
    k = k == null ? __WEBPACK_IMPORTED_MODULE_1__color_js__["d" /* darker */] : Math.pow(__WEBPACK_IMPORTED_MODULE_1__color_js__["d" /* darker */], k);
    return new Cubehelix(this.h, this.s, this.l * k, this.opacity);
  },
  rgb: function() {
    var h = isNaN(this.h) ? 0 : (this.h + 120) * __WEBPACK_IMPORTED_MODULE_2__math_js__["b" /* radians */],
        l = +this.l,
        a = isNaN(this.s) ? 0 : this.s * l * (1 - l),
        cosh = Math.cos(h),
        sinh = Math.sin(h);
    return new __WEBPACK_IMPORTED_MODULE_1__color_js__["b" /* Rgb */](
      255 * (l + a * (A * cosh + B * sinh)),
      255 * (l + a * (C * cosh + D * sinh)),
      255 * (l + a * (E * cosh)),
      this.opacity
    );
  }
}));
 
 
/***/ }),
/* 1191 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony default export */ __webpack_exports__["a"] = (function(range) {
  var n = range.length;
  return function(t) {
    return range[Math.max(0, Math.min(n - 1, Math.floor(t * n)))];
  };
});
 
 
/***/ }),
/* 1192 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__color_js__ = __webpack_require__(150);
 
 
/* harmony default export */ __webpack_exports__["a"] = (function(a, b) {
  var i = Object(__WEBPACK_IMPORTED_MODULE_0__color_js__["c" /* hue */])(+a, +b);
  return function(t) {
    var x = i(t);
    return x - 360 * Math.floor(x / 360);
  };
});
 
 
/***/ }),
/* 1193 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony default export */ __webpack_exports__["a"] = (function(a, b) {
  return a = +a, b = +b, function(t) {
    return Math.round(a * (1 - t) + b * t);
  };
});
 
 
/***/ }),
/* 1194 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return interpolateTransformCss; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return interpolateTransformSvg; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__number_js__ = __webpack_require__(246);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__parse_js__ = __webpack_require__(1195);
 
 
 
function interpolateTransform(parse, pxComma, pxParen, degParen) {
 
  function pop(s) {
    return s.length ? s.pop() + " " : "";
  }
 
  function translate(xa, ya, xb, yb, s, q) {
    if (xa !== xb || ya !== yb) {
      var i = s.push("translate(", null, pxComma, null, pxParen);
      q.push({i: i - 4, x: Object(__WEBPACK_IMPORTED_MODULE_0__number_js__["a" /* default */])(xa, xb)}, {i: i - 2, x: Object(__WEBPACK_IMPORTED_MODULE_0__number_js__["a" /* default */])(ya, yb)});
    } else if (xb || yb) {
      s.push("translate(" + xb + pxComma + yb + pxParen);
    }
  }
 
  function rotate(a, b, s, q) {
    if (a !== b) {
      if (a - b > 180) b += 360; else if (b - a > 180) a += 360; // shortest path
      q.push({i: s.push(pop(s) + "rotate(", null, degParen) - 2, x: Object(__WEBPACK_IMPORTED_MODULE_0__number_js__["a" /* default */])(a, b)});
    } else if (b) {
      s.push(pop(s) + "rotate(" + b + degParen);
    }
  }
 
  function skewX(a, b, s, q) {
    if (a !== b) {
      q.push({i: s.push(pop(s) + "skewX(", null, degParen) - 2, x: Object(__WEBPACK_IMPORTED_MODULE_0__number_js__["a" /* default */])(a, b)});
    } else if (b) {
      s.push(pop(s) + "skewX(" + b + degParen);
    }
  }
 
  function scale(xa, ya, xb, yb, s, q) {
    if (xa !== xb || ya !== yb) {
      var i = s.push(pop(s) + "scale(", null, ",", null, ")");
      q.push({i: i - 4, x: Object(__WEBPACK_IMPORTED_MODULE_0__number_js__["a" /* default */])(xa, xb)}, {i: i - 2, x: Object(__WEBPACK_IMPORTED_MODULE_0__number_js__["a" /* default */])(ya, yb)});
    } else if (xb !== 1 || yb !== 1) {
      s.push(pop(s) + "scale(" + xb + "," + yb + ")");
    }
  }
 
  return function(a, b) {
    var s = [], // string constants and placeholders
        q = []; // number interpolators
    a = parse(a), b = parse(b);
    translate(a.translateX, a.translateY, b.translateX, b.translateY, s, q);
    rotate(a.rotate, b.rotate, s, q);
    skewX(a.skewX, b.skewX, s, q);
    scale(a.scaleX, a.scaleY, b.scaleX, b.scaleY, s, q);
    a = b = null; // gc
    return function(t) {
      var i = -1, n = q.length, o;
      while (++i < n) s[(o = q[i]).i] = o.x(t);
      return s.join("");
    };
  };
}
 
var interpolateTransformCss = interpolateTransform(__WEBPACK_IMPORTED_MODULE_1__parse_js__["a" /* parseCss */], "px, ", "px)", "deg)");
var interpolateTransformSvg = interpolateTransform(__WEBPACK_IMPORTED_MODULE_1__parse_js__["b" /* parseSvg */], ", ", ")", ")");
 
 
/***/ }),
/* 1195 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = parseCss;
/* harmony export (immutable) */ __webpack_exports__["b"] = parseSvg;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__decompose_js__ = __webpack_require__(1196);
 
 
var cssNode,
    cssRoot,
    cssView,
    svgNode;
 
function parseCss(value) {
  if (value === "none") return __WEBPACK_IMPORTED_MODULE_0__decompose_js__["b" /* identity */];
  if (!cssNode) cssNode = document.createElement("DIV"), cssRoot = document.documentElement, cssView = document.defaultView;
  cssNode.style.transform = value;
  value = cssView.getComputedStyle(cssRoot.appendChild(cssNode), null).getPropertyValue("transform");
  cssRoot.removeChild(cssNode);
  value = value.slice(7, -1).split(",");
  return Object(__WEBPACK_IMPORTED_MODULE_0__decompose_js__["a" /* default */])(+value[0], +value[1], +value[2], +value[3], +value[4], +value[5]);
}
 
function parseSvg(value) {
  if (value == null) return __WEBPACK_IMPORTED_MODULE_0__decompose_js__["b" /* identity */];
  if (!svgNode) svgNode = document.createElementNS("http://www.w3.org/2000/svg", "g");
  svgNode.setAttribute("transform", value);
  if (!(value = svgNode.transform.baseVal.consolidate())) return __WEBPACK_IMPORTED_MODULE_0__decompose_js__["b" /* identity */];
  value = value.matrix;
  return Object(__WEBPACK_IMPORTED_MODULE_0__decompose_js__["a" /* default */])(value.a, value.b, value.c, value.d, value.e, value.f);
}
 
 
/***/ }),
/* 1196 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return identity; });
var degrees = 180 / Math.PI;
 
var identity = {
  translateX: 0,
  translateY: 0,
  rotate: 0,
  skewX: 0,
  scaleX: 1,
  scaleY: 1
};
 
/* harmony default export */ __webpack_exports__["a"] = (function(a, b, c, d, e, f) {
  var scaleX, scaleY, skewX;
  if (scaleX = Math.sqrt(a * a + b * b)) a /= scaleX, b /= scaleX;
  if (skewX = a * c + b * d) c -= a * skewX, d -= b * skewX;
  if (scaleY = Math.sqrt(c * c + d * d)) c /= scaleY, d /= scaleY, skewX /= scaleY;
  if (a * d < b * c) a = -a, b = -b, skewX = -skewX, scaleX = -scaleX;
  return {
    translateX: e,
    translateY: f,
    rotate: Math.atan2(b, a) * degrees,
    skewX: Math.atan(skewX) * degrees,
    scaleX: scaleX,
    scaleY: scaleY
  };
});
 
 
/***/ }),
/* 1197 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
var rho = Math.SQRT2,
    rho2 = 2,
    rho4 = 4,
    epsilon2 = 1e-12;
 
function cosh(x) {
  return ((x = Math.exp(x)) + 1 / x) / 2;
}
 
function sinh(x) {
  return ((x = Math.exp(x)) - 1 / x) / 2;
}
 
function tanh(x) {
  return ((x = Math.exp(2 * x)) - 1) / (x + 1);
}
 
// p0 = [ux0, uy0, w0]
// p1 = [ux1, uy1, w1]
/* harmony default export */ __webpack_exports__["a"] = (function(p0, p1) {
  var ux0 = p0[0], uy0 = p0[1], w0 = p0[2],
      ux1 = p1[0], uy1 = p1[1], w1 = p1[2],
      dx = ux1 - ux0,
      dy = uy1 - uy0,
      d2 = dx * dx + dy * dy,
      i,
      S;
 
  // Special case for u0 ≅ u1.
  if (d2 < epsilon2) {
    S = Math.log(w1 / w0) / rho;
    i = function(t) {
      return [
        ux0 + t * dx,
        uy0 + t * dy,
        w0 * Math.exp(rho * t * S)
      ];
    }
  }
 
  // General case.
  else {
    var d1 = Math.sqrt(d2),
        b0 = (w1 * w1 - w0 * w0 + rho4 * d2) / (2 * w0 * rho2 * d1),
        b1 = (w1 * w1 - w0 * w0 - rho4 * d2) / (2 * w1 * rho2 * d1),
        r0 = Math.log(Math.sqrt(b0 * b0 + 1) - b0),
        r1 = Math.log(Math.sqrt(b1 * b1 + 1) - b1);
    S = (r1 - r0) / rho;
    i = function(t) {
      var s = t * S,
          coshr0 = cosh(r0),
          u = w0 / (rho2 * d1) * (coshr0 * tanh(rho * s + r0) - sinh(r0));
      return [
        ux0 + u * dx,
        uy0 + u * dy,
        w0 * coshr0 / cosh(rho * s + r0)
      ];
    }
  }
 
  i.duration = S * 1000;
 
  return i;
});
 
 
/***/ }),
/* 1198 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return hslLong; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_d3_color__ = __webpack_require__(74);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__color_js__ = __webpack_require__(150);
 
 
 
function hsl(hue) {
  return function(start, end) {
    var h = hue((start = Object(__WEBPACK_IMPORTED_MODULE_0_d3_color__["e" /* hsl */])(start)).h, (end = Object(__WEBPACK_IMPORTED_MODULE_0_d3_color__["e" /* hsl */])(end)).h),
        s = Object(__WEBPACK_IMPORTED_MODULE_1__color_js__["a" /* default */])(start.s, end.s),
        l = Object(__WEBPACK_IMPORTED_MODULE_1__color_js__["a" /* default */])(start.l, end.l),
        opacity = Object(__WEBPACK_IMPORTED_MODULE_1__color_js__["a" /* default */])(start.opacity, end.opacity);
    return function(t) {
      start.h = h(t);
      start.s = s(t);
      start.l = l(t);
      start.opacity = opacity(t);
      return start + "";
    };
  }
}
 
/* harmony default export */ __webpack_exports__["a"] = (hsl(__WEBPACK_IMPORTED_MODULE_1__color_js__["c" /* hue */]));
var hslLong = hsl(__WEBPACK_IMPORTED_MODULE_1__color_js__["a" /* default */]);
 
 
/***/ }),
/* 1199 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = lab;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_d3_color__ = __webpack_require__(74);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__color_js__ = __webpack_require__(150);
 
 
 
function lab(start, end) {
  var l = Object(__WEBPACK_IMPORTED_MODULE_1__color_js__["a" /* default */])((start = Object(__WEBPACK_IMPORTED_MODULE_0_d3_color__["f" /* lab */])(start)).l, (end = Object(__WEBPACK_IMPORTED_MODULE_0_d3_color__["f" /* lab */])(end)).l),
      a = Object(__WEBPACK_IMPORTED_MODULE_1__color_js__["a" /* default */])(start.a, end.a),
      b = Object(__WEBPACK_IMPORTED_MODULE_1__color_js__["a" /* default */])(start.b, end.b),
      opacity = Object(__WEBPACK_IMPORTED_MODULE_1__color_js__["a" /* default */])(start.opacity, end.opacity);
  return function(t) {
    start.l = l(t);
    start.a = a(t);
    start.b = b(t);
    start.opacity = opacity(t);
    return start + "";
  };
}
 
 
/***/ }),
/* 1200 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return hclLong; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_d3_color__ = __webpack_require__(74);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__color_js__ = __webpack_require__(150);
 
 
 
function hcl(hue) {
  return function(start, end) {
    var h = hue((start = Object(__WEBPACK_IMPORTED_MODULE_0_d3_color__["d" /* hcl */])(start)).h, (end = Object(__WEBPACK_IMPORTED_MODULE_0_d3_color__["d" /* hcl */])(end)).h),
        c = Object(__WEBPACK_IMPORTED_MODULE_1__color_js__["a" /* default */])(start.c, end.c),
        l = Object(__WEBPACK_IMPORTED_MODULE_1__color_js__["a" /* default */])(start.l, end.l),
        opacity = Object(__WEBPACK_IMPORTED_MODULE_1__color_js__["a" /* default */])(start.opacity, end.opacity);
    return function(t) {
      start.h = h(t);
      start.c = c(t);
      start.l = l(t);
      start.opacity = opacity(t);
      return start + "";
    };
  }
}
 
/* harmony default export */ __webpack_exports__["a"] = (hcl(__WEBPACK_IMPORTED_MODULE_1__color_js__["c" /* hue */]));
var hclLong = hcl(__WEBPACK_IMPORTED_MODULE_1__color_js__["a" /* default */]);
 
 
/***/ }),
/* 1201 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return cubehelixLong; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_d3_color__ = __webpack_require__(74);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__color_js__ = __webpack_require__(150);
 
 
 
function cubehelix(hue) {
  return (function cubehelixGamma(y) {
    y = +y;
 
    function cubehelix(start, end) {
      var h = hue((start = Object(__WEBPACK_IMPORTED_MODULE_0_d3_color__["b" /* cubehelix */])(start)).h, (end = Object(__WEBPACK_IMPORTED_MODULE_0_d3_color__["b" /* cubehelix */])(end)).h),
          s = Object(__WEBPACK_IMPORTED_MODULE_1__color_js__["a" /* default */])(start.s, end.s),
          l = Object(__WEBPACK_IMPORTED_MODULE_1__color_js__["a" /* default */])(start.l, end.l),
          opacity = Object(__WEBPACK_IMPORTED_MODULE_1__color_js__["a" /* default */])(start.opacity, end.opacity);
      return function(t) {
        start.h = h(t);
        start.s = s(t);
        start.l = l(Math.pow(t, y));
        start.opacity = opacity(t);
        return start + "";
      };
    }
 
    cubehelix.gamma = cubehelixGamma;
 
    return cubehelix;
  })(1);
}
 
/* harmony default export */ __webpack_exports__["b"] = (cubehelix(__WEBPACK_IMPORTED_MODULE_1__color_js__["c" /* hue */]));
var cubehelixLong = cubehelix(__WEBPACK_IMPORTED_MODULE_1__color_js__["a" /* default */]);
 
 
/***/ }),
/* 1202 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = piecewise;
function piecewise(interpolate, values) {
  var i = 0, n = values.length - 1, v = values[0], I = new Array(n < 0 ? 0 : n);
  while (i < n) I[i] = interpolate(v, v = values[++i]);
  return function(t) {
    var i = Math.max(0, Math.min(n - 1, Math.floor(t *= n)));
    return I[i](t - i);
  };
}
 
 
/***/ }),
/* 1203 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony default export */ __webpack_exports__["a"] = (function(interpolator, n) {
  var samples = new Array(n);
  for (var i = 0; i < n; ++i) samples[i] = interpolator(i / (n - 1));
  return samples;
});
 
 
/***/ }),
/* 1204 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_d3_selection__ = __webpack_require__(45);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__interrupt_js__ = __webpack_require__(1205);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__transition_js__ = __webpack_require__(1208);
 
 
 
 
__WEBPACK_IMPORTED_MODULE_0_d3_selection__["m" /* selection */].prototype.interrupt = __WEBPACK_IMPORTED_MODULE_1__interrupt_js__["a" /* default */];
__WEBPACK_IMPORTED_MODULE_0_d3_selection__["m" /* selection */].prototype.transition = __WEBPACK_IMPORTED_MODULE_2__transition_js__["a" /* default */];
 
 
/***/ }),
/* 1205 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__interrupt_js__ = __webpack_require__(725);
 
 
/* harmony default export */ __webpack_exports__["a"] = (function(name) {
  return this.each(function() {
    Object(__WEBPACK_IMPORTED_MODULE_0__interrupt_js__["a" /* default */])(this, name);
  });
});
 
 
/***/ }),
/* 1206 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__timer_js__ = __webpack_require__(349);
 
 
/* harmony default export */ __webpack_exports__["a"] = (function(callback, delay, time) {
  var t = new __WEBPACK_IMPORTED_MODULE_0__timer_js__["a" /* Timer */];
  delay = delay == null ? 0 : +delay;
  t.restart(function(elapsed) {
    t.stop();
    callback(elapsed + delay);
  }, delay, time);
  return t;
});
 
 
/***/ }),
/* 1207 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__timer_js__ = __webpack_require__(349);
 
 
/* harmony default export */ __webpack_exports__["a"] = (function(callback, delay, time) {
  var t = new __WEBPACK_IMPORTED_MODULE_0__timer_js__["a" /* Timer */], total = delay;
  if (delay == null) return t.restart(callback, delay, time), t;
  delay = +delay, time = time == null ? Object(__WEBPACK_IMPORTED_MODULE_0__timer_js__["b" /* now */])() : +time;
  t.restart(function tick(elapsed) {
    elapsed += total;
    t.restart(tick, total += delay, time);
    callback(elapsed);
  }, delay, time);
  return t;
});
 
 
/***/ }),
/* 1208 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__transition_index_js__ = __webpack_require__(101);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__transition_schedule_js__ = __webpack_require__(63);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_d3_ease__ = __webpack_require__(727);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_d3_timer__ = __webpack_require__(247);
 
 
 
 
 
var defaultTiming = {
  time: null, // Set on use.
  delay: 0,
  duration: 250,
  ease: __WEBPACK_IMPORTED_MODULE_2_d3_ease__["o" /* easeCubicInOut */]
};
 
function inherit(node, id) {
  var timing;
  while (!(timing = node.__transition) || !(timing = timing[id])) {
    if (!(node = node.parentNode)) {
      return defaultTiming.time = Object(__WEBPACK_IMPORTED_MODULE_3_d3_timer__["b" /* now */])(), defaultTiming;
    }
  }
  return timing;
}
 
/* harmony default export */ __webpack_exports__["a"] = (function(name) {
  var id,
      timing;
 
  Iif (name instanceof __WEBPACK_IMPORTED_MODULE_0__transition_index_js__["a" /* Transition */]) {
    id = name._id, name = name._name;
  } else {
    id = Object(__WEBPACK_IMPORTED_MODULE_0__transition_index_js__["c" /* newId */])(), (timing = defaultTiming).time = Object(__WEBPACK_IMPORTED_MODULE_3_d3_timer__["b" /* now */])(), name = name == null ? null : name + "";
  }
 
  for (var groups = this._groups, m = groups.length, j = 0; j < m; ++j) {
    for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {
      Iif (node = group[i]) {
        Object(__WEBPACK_IMPORTED_MODULE_1__transition_schedule_js__["e" /* default */])(node, name, id, i, group, timing || inherit(node, id));
      }
    }
  }
 
  return new __WEBPACK_IMPORTED_MODULE_0__transition_index_js__["a" /* Transition */](groups, this._parents, name, id);
});
 
 
/***/ }),
/* 1209 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_d3_interpolate__ = __webpack_require__(83);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_d3_selection__ = __webpack_require__(45);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__tween_js__ = __webpack_require__(248);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__interpolate_js__ = __webpack_require__(726);
 
 
 
 
 
function attrRemove(name) {
  return function() {
    this.removeAttribute(name);
  };
}
 
function attrRemoveNS(fullname) {
  return function() {
    this.removeAttributeNS(fullname.space, fullname.local);
  };
}
 
function attrConstant(name, interpolate, value1) {
  var string00,
      string1 = value1 + "",
      interpolate0;
  return function() {
    var string0 = this.getAttribute(name);
    return string0 === string1 ? null
        : string0 === string00 ? interpolate0
        : interpolate0 = interpolate(string00 = string0, value1);
  };
}
 
function attrConstantNS(fullname, interpolate, value1) {
  var string00,
      string1 = value1 + "",
      interpolate0;
  return function() {
    var string0 = this.getAttributeNS(fullname.space, fullname.local);
    return string0 === string1 ? null
        : string0 === string00 ? interpolate0
        : interpolate0 = interpolate(string00 = string0, value1);
  };
}
 
function attrFunction(name, interpolate, value) {
  var string00,
      string10,
      interpolate0;
  return function() {
    var string0, value1 = value(this), string1;
    if (value1 == null) return void this.removeAttribute(name);
    string0 = this.getAttribute(name);
    string1 = value1 + "";
    return string0 === string1 ? null
        : string0 === string00 && string1 === string10 ? interpolate0
        : (string10 = string1, interpolate0 = interpolate(string00 = string0, value1));
  };
}
 
function attrFunctionNS(fullname, interpolate, value) {
  var string00,
      string10,
      interpolate0;
  return function() {
    var string0, value1 = value(this), string1;
    if (value1 == null) return void this.removeAttributeNS(fullname.space, fullname.local);
    string0 = this.getAttributeNS(fullname.space, fullname.local);
    string1 = value1 + "";
    return string0 === string1 ? null
        : string0 === string00 && string1 === string10 ? interpolate0
        : (string10 = string1, interpolate0 = interpolate(string00 = string0, value1));
  };
}
 
/* harmony default export */ __webpack_exports__["a"] = (function(name, value) {
  var fullname = Object(__WEBPACK_IMPORTED_MODULE_1_d3_selection__["i" /* namespace */])(name), i = fullname === "transform" ? __WEBPACK_IMPORTED_MODULE_0_d3_interpolate__["x" /* interpolateTransformSvg */] : __WEBPACK_IMPORTED_MODULE_3__interpolate_js__["a" /* default */];
  return this.attrTween(name, typeof value === "function"
      ? (fullname.local ? attrFunctionNS : attrFunction)(fullname, i, Object(__WEBPACK_IMPORTED_MODULE_2__tween_js__["b" /* tweenValue */])(this, "attr." + name, value))
      : value == null ? (fullname.local ? attrRemoveNS : attrRemove)(fullname)
      : (fullname.local ? attrConstantNS : attrConstant)(fullname, i, value));
});
 
 
/***/ }),
/* 1210 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_d3_selection__ = __webpack_require__(45);
 
 
function attrInterpolate(name, i) {
  return function(t) {
    this.setAttribute(name, i.call(this, t));
  };
}
 
function attrInterpolateNS(fullname, i) {
  return function(t) {
    this.setAttributeNS(fullname.space, fullname.local, i.call(this, t));
  };
}
 
function attrTweenNS(fullname, value) {
  var t0, i0;
  function tween() {
    var i = value.apply(this, arguments);
    if (i !== i0) t0 = (i0 = i) && attrInterpolateNS(fullname, i);
    return t0;
  }
  tween._value = value;
  return tween;
}
 
function attrTween(name, value) {
  var t0, i0;
  function tween() {
    var i = value.apply(this, arguments);
    if (i !== i0) t0 = (i0 = i) && attrInterpolate(name, i);
    return t0;
  }
  tween._value = value;
  return tween;
}
 
/* harmony default export */ __webpack_exports__["a"] = (function(name, value) {
  var key = "attr." + name;
  Iif (arguments.length < 2) return (key = this.tween(key)) && key._value;
  Iif (value == null) return this.tween(key, null);
  Iif (typeof value !== "function") throw new Error;
  var fullname = Object(__WEBPACK_IMPORTED_MODULE_0_d3_selection__["i" /* namespace */])(name);
  return this.tween(key, (fullname.local ? attrTweenNS : attrTween)(fullname, value));
});
 
 
/***/ }),
/* 1211 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__schedule_js__ = __webpack_require__(63);
 
 
function delayFunction(id, value) {
  return function() {
    Object(__WEBPACK_IMPORTED_MODULE_0__schedule_js__["g" /* init */])(this, id).delay = +value.apply(this, arguments);
  };
}
 
function delayConstant(id, value) {
  return value = +value, function() {
    Object(__WEBPACK_IMPORTED_MODULE_0__schedule_js__["g" /* init */])(this, id).delay = value;
  };
}
 
/* harmony default export */ __webpack_exports__["a"] = (function(value) {
  var id = this._id;
 
  return arguments.length
      ? this.each((typeof value === "function"
          ? delayFunction
          : delayConstant)(id, value))
      : Object(__WEBPACK_IMPORTED_MODULE_0__schedule_js__["f" /* get */])(this.node(), id).delay;
});
 
 
/***/ }),
/* 1212 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__schedule_js__ = __webpack_require__(63);
 
 
function durationFunction(id, value) {
  return function() {
    Object(__WEBPACK_IMPORTED_MODULE_0__schedule_js__["h" /* set */])(this, id).duration = +value.apply(this, arguments);
  };
}
 
function durationConstant(id, value) {
  return value = +value, function() {
    Object(__WEBPACK_IMPORTED_MODULE_0__schedule_js__["h" /* set */])(this, id).duration = value;
  };
}
 
/* harmony default export */ __webpack_exports__["a"] = (function(value) {
  var id = this._id;
 
  return arguments.length
      ? this.each((typeof value === "function"
          ? durationFunction
          : durationConstant)(id, value))
      : Object(__WEBPACK_IMPORTED_MODULE_0__schedule_js__["f" /* get */])(this.node(), id).duration;
});
 
 
/***/ }),
/* 1213 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__schedule_js__ = __webpack_require__(63);
 
 
function easeConstant(id, value) {
  if (typeof value !== "function") throw new Error;
  return function() {
    Object(__WEBPACK_IMPORTED_MODULE_0__schedule_js__["h" /* set */])(this, id).ease = value;
  };
}
 
/* harmony default export */ __webpack_exports__["a"] = (function(value) {
  var id = this._id;
 
  return arguments.length
      ? this.each(easeConstant(id, value))
      : Object(__WEBPACK_IMPORTED_MODULE_0__schedule_js__["f" /* get */])(this.node(), id).ease;
});
 
 
/***/ }),
/* 1214 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_d3_selection__ = __webpack_require__(45);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__index_js__ = __webpack_require__(101);
 
 
 
/* harmony default export */ __webpack_exports__["a"] = (function(match) {
  if (typeof match !== "function") match = Object(__WEBPACK_IMPORTED_MODULE_0_d3_selection__["g" /* matcher */])(match);
 
  for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {
    for (var group = groups[j], n = group.length, subgroup = subgroups[j] = [], node, i = 0; i < n; ++i) {
      if ((node = group[i]) && match.call(node, node.__data__, i, group)) {
        subgroup.push(node);
      }
    }
  }
 
  return new __WEBPACK_IMPORTED_MODULE_1__index_js__["a" /* Transition */](subgroups, this._parents, this._name, this._id);
});
 
 
/***/ }),
/* 1215 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__index_js__ = __webpack_require__(101);
 
 
/* harmony default export */ __webpack_exports__["a"] = (function(transition) {
  if (transition._id !== this._id) throw new Error;
 
  for (var groups0 = this._groups, groups1 = transition._groups, m0 = groups0.length, m1 = groups1.length, m = Math.min(m0, m1), merges = new Array(m0), j = 0; j < m; ++j) {
    for (var group0 = groups0[j], group1 = groups1[j], n = group0.length, merge = merges[j] = new Array(n), node, i = 0; i < n; ++i) {
      if (node = group0[i] || group1[i]) {
        merge[i] = node;
      }
    }
  }
 
  for (; j < m0; ++j) {
    merges[j] = groups0[j];
  }
 
  return new __WEBPACK_IMPORTED_MODULE_0__index_js__["a" /* Transition */](merges, this._parents, this._name, this._id);
});
 
 
/***/ }),
/* 1216 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__schedule_js__ = __webpack_require__(63);
 
 
function start(name) {
  return (name + "").trim().split(/^|\s+/).every(function(t) {
    var i = t.indexOf(".");
    if (i >= 0) t = t.slice(0, i);
    return !t || t === "start";
  });
}
 
function onFunction(id, name, listener) {
  var on0, on1, sit = start(name) ? __WEBPACK_IMPORTED_MODULE_0__schedule_js__["g" /* init */] : __WEBPACK_IMPORTED_MODULE_0__schedule_js__["h" /* set */];
  return function() {
    var schedule = sit(this, id),
        on = schedule.on;
 
    // If this node shared a dispatch with the previous node,
    // just assign the updated shared dispatch and we’re done!
    // Otherwise, copy-on-write.
    if (on !== on0) (on1 = (on0 = on).copy()).on(name, listener);
 
    schedule.on = on1;
  };
}
 
/* harmony default export */ __webpack_exports__["a"] = (function(name, listener) {
  var id = this._id;
 
  return arguments.length < 2
      ? Object(__WEBPACK_IMPORTED_MODULE_0__schedule_js__["f" /* get */])(this.node(), id).on.on(name)
      : this.each(onFunction(id, name, listener));
});
 
 
/***/ }),
/* 1217 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
function removeFunction(id) {
  return function() {
    var parent = this.parentNode;
    for (var i in this.__transition) if (+i !== id) return;
    if (parent) parent.removeChild(this);
  };
}
 
/* harmony default export */ __webpack_exports__["a"] = (function() {
  return this.on("end.remove", removeFunction(this._id));
});
 
 
/***/ }),
/* 1218 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_d3_selection__ = __webpack_require__(45);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__index_js__ = __webpack_require__(101);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__schedule_js__ = __webpack_require__(63);
 
 
 
 
/* harmony default export */ __webpack_exports__["a"] = (function(select) {
  var name = this._name,
      id = this._id;
 
  if (typeof select !== "function") select = Object(__WEBPACK_IMPORTED_MODULE_0_d3_selection__["n" /* selector */])(select);
 
  for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {
    for (var group = groups[j], n = group.length, subgroup = subgroups[j] = new Array(n), node, subnode, i = 0; i < n; ++i) {
      if ((node = group[i]) && (subnode = select.call(node, node.__data__, i, group))) {
        if ("__data__" in node) subnode.__data__ = node.__data__;
        subgroup[i] = subnode;
        Object(__WEBPACK_IMPORTED_MODULE_2__schedule_js__["e" /* default */])(subgroup[i], name, id, i, subgroup, Object(__WEBPACK_IMPORTED_MODULE_2__schedule_js__["f" /* get */])(node, id));
      }
    }
  }
 
  return new __WEBPACK_IMPORTED_MODULE_1__index_js__["a" /* Transition */](subgroups, this._parents, name, id);
});
 
 
/***/ }),
/* 1219 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_d3_selection__ = __webpack_require__(45);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__index_js__ = __webpack_require__(101);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__schedule_js__ = __webpack_require__(63);
 
 
 
 
/* harmony default export */ __webpack_exports__["a"] = (function(select) {
  var name = this._name,
      id = this._id;
 
  if (typeof select !== "function") select = Object(__WEBPACK_IMPORTED_MODULE_0_d3_selection__["o" /* selectorAll */])(select);
 
  for (var groups = this._groups, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++j) {
    for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {
      if (node = group[i]) {
        for (var children = select.call(node, node.__data__, i, group), child, inherit = Object(__WEBPACK_IMPORTED_MODULE_2__schedule_js__["f" /* get */])(node, id), k = 0, l = children.length; k < l; ++k) {
          if (child = children[k]) {
            Object(__WEBPACK_IMPORTED_MODULE_2__schedule_js__["e" /* default */])(child, name, id, k, children, inherit);
          }
        }
        subgroups.push(children);
        parents.push(node);
      }
    }
  }
 
  return new __WEBPACK_IMPORTED_MODULE_1__index_js__["a" /* Transition */](subgroups, parents, name, id);
});
 
 
/***/ }),
/* 1220 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_d3_selection__ = __webpack_require__(45);
 
 
var Selection = __WEBPACK_IMPORTED_MODULE_0_d3_selection__["m" /* selection */].prototype.constructor;
 
/* harmony default export */ __webpack_exports__["a"] = (function() {
  return new Selection(this._groups, this._parents);
});
 
 
/***/ }),
/* 1221 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_d3_interpolate__ = __webpack_require__(83);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_d3_selection__ = __webpack_require__(45);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__schedule_js__ = __webpack_require__(63);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__tween_js__ = __webpack_require__(248);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__interpolate_js__ = __webpack_require__(726);
 
 
 
 
 
 
function styleNull(name, interpolate) {
  var string00,
      string10,
      interpolate0;
  return function() {
    var string0 = Object(__WEBPACK_IMPORTED_MODULE_1_d3_selection__["p" /* style */])(this, name),
        string1 = (this.style.removeProperty(name), Object(__WEBPACK_IMPORTED_MODULE_1_d3_selection__["p" /* style */])(this, name));
    return string0 === string1 ? null
        : string0 === string00 && string1 === string10 ? interpolate0
        : interpolate0 = interpolate(string00 = string0, string10 = string1);
  };
}
 
function styleRemove(name) {
  return function() {
    this.style.removeProperty(name);
  };
}
 
function styleConstant(name, interpolate, value1) {
  var string00,
      string1 = value1 + "",
      interpolate0;
  return function() {
    var string0 = Object(__WEBPACK_IMPORTED_MODULE_1_d3_selection__["p" /* style */])(this, name);
    return string0 === string1 ? null
        : string0 === string00 ? interpolate0
        : interpolate0 = interpolate(string00 = string0, value1);
  };
}
 
function styleFunction(name, interpolate, value) {
  var string00,
      string10,
      interpolate0;
  return function() {
    var string0 = Object(__WEBPACK_IMPORTED_MODULE_1_d3_selection__["p" /* style */])(this, name),
        value1 = value(this),
        string1 = value1 + "";
    if (value1 == null) string1 = value1 = (this.style.removeProperty(name), Object(__WEBPACK_IMPORTED_MODULE_1_d3_selection__["p" /* style */])(this, name));
    return string0 === string1 ? null
        : string0 === string00 && string1 === string10 ? interpolate0
        : (string10 = string1, interpolate0 = interpolate(string00 = string0, value1));
  };
}
 
function styleMaybeRemove(id, name) {
  var on0, on1, listener0, key = "style." + name, event = "end." + key, remove;
  return function() {
    var schedule = Object(__WEBPACK_IMPORTED_MODULE_2__schedule_js__["h" /* set */])(this, id),
        on = schedule.on,
        listener = schedule.value[key] == null ? remove || (remove = styleRemove(name)) : undefined;
 
    // If this node shared a dispatch with the previous node,
    // just assign the updated shared dispatch and we’re done!
    // Otherwise, copy-on-write.
    if (on !== on0 || listener0 !== listener) (on1 = (on0 = on).copy()).on(event, listener0 = listener);
 
    schedule.on = on1;
  };
}
 
/* harmony default export */ __webpack_exports__["a"] = (function(name, value, priority) {
  var i = (name += "") === "transform" ? __WEBPACK_IMPORTED_MODULE_0_d3_interpolate__["w" /* interpolateTransformCss */] : __WEBPACK_IMPORTED_MODULE_4__interpolate_js__["a" /* default */];
  return value == null ? this
      .styleTween(name, styleNull(name, i))
      .on("end.style." + name, styleRemove(name))
    : typeof value === "function" ? this
      .styleTween(name, styleFunction(name, i, Object(__WEBPACK_IMPORTED_MODULE_3__tween_js__["b" /* tweenValue */])(this, "style." + name, value)))
      .each(styleMaybeRemove(this._id, name))
    : this
      .styleTween(name, styleConstant(name, i, value), priority)
      .on("end.style." + name, null);
});
 
 
/***/ }),
/* 1222 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
function styleInterpolate(name, i, priority) {
  return function(t) {
    this.style.setProperty(name, i.call(this, t), priority);
  };
}
 
function styleTween(name, value, priority) {
  var t, i0;
  function tween() {
    var i = value.apply(this, arguments);
    if (i !== i0) t = (i0 = i) && styleInterpolate(name, i, priority);
    return t;
  }
  tween._value = value;
  return tween;
}
 
/* harmony default export */ __webpack_exports__["a"] = (function(name, value, priority) {
  var key = "style." + (name += "");
  if (arguments.length < 2) return (key = this.tween(key)) && key._value;
  if (value == null) return this.tween(key, null);
  if (typeof value !== "function") throw new Error;
  return this.tween(key, styleTween(name, value, priority == null ? "" : priority));
});
 
 
/***/ }),
/* 1223 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__tween_js__ = __webpack_require__(248);
 
 
function textConstant(value) {
  return function() {
    this.textContent = value;
  };
}
 
function textFunction(value) {
  return function() {
    var value1 = value(this);
    this.textContent = value1 == null ? "" : value1;
  };
}
 
/* harmony default export */ __webpack_exports__["a"] = (function(value) {
  return this.tween("text", typeof value === "function"
      ? textFunction(Object(__WEBPACK_IMPORTED_MODULE_0__tween_js__["b" /* tweenValue */])(this, "text", value))
      : textConstant(value == null ? "" : value + ""));
});
 
 
/***/ }),
/* 1224 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
function textInterpolate(i) {
  return function(t) {
    this.textContent = i.call(this, t);
  };
}
 
function textTween(value) {
  var t0, i0;
  function tween() {
    var i = value.apply(this, arguments);
    if (i !== i0) t0 = (i0 = i) && textInterpolate(i);
    return t0;
  }
  tween._value = value;
  return tween;
}
 
/* harmony default export */ __webpack_exports__["a"] = (function(value) {
  var key = "text";
  if (arguments.length < 1) return (key = this.tween(key)) && key._value;
  if (value == null) return this.tween(key, null);
  if (typeof value !== "function") throw new Error;
  return this.tween(key, textTween(value));
});
 
 
/***/ }),
/* 1225 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__index_js__ = __webpack_require__(101);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__schedule_js__ = __webpack_require__(63);
 
 
 
/* harmony default export */ __webpack_exports__["a"] = (function() {
  var name = this._name,
      id0 = this._id,
      id1 = Object(__WEBPACK_IMPORTED_MODULE_0__index_js__["c" /* newId */])();
 
  for (var groups = this._groups, m = groups.length, j = 0; j < m; ++j) {
    for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {
      Iif (node = group[i]) {
        var inherit = Object(__WEBPACK_IMPORTED_MODULE_1__schedule_js__["f" /* get */])(node, id0);
        Object(__WEBPACK_IMPORTED_MODULE_1__schedule_js__["e" /* default */])(node, name, id1, i, group, {
          time: inherit.time + inherit.delay + inherit.duration,
          delay: 0,
          duration: inherit.duration,
          ease: inherit.ease
        });
      }
    }
  }
 
  return new __WEBPACK_IMPORTED_MODULE_0__index_js__["a" /* Transition */](groups, this._parents, name, id1);
});
 
 
/***/ }),
/* 1226 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__schedule_js__ = __webpack_require__(63);
 
 
/* harmony default export */ __webpack_exports__["a"] = (function() {
  var on0, on1, that = this, id = that._id, size = that.size();
  return new Promise(function(resolve, reject) {
    var cancel = {value: reject},
        end = {value: function() { if (--size === 0) resolve(); }};
 
    that.each(function() {
      var schedule = Object(__WEBPACK_IMPORTED_MODULE_0__schedule_js__["h" /* set */])(this, id),
          on = schedule.on;
 
      // If this node shared a dispatch with the previous node,
      // just assign the updated shared dispatch and we’re done!
      // Otherwise, copy-on-write.
      if (on !== on0) {
        on1 = (on0 = on).copy();
        on1._.cancel.push(cancel);
        on1._.interrupt.push(cancel);
        on1._.end.push(end);
      }
 
      schedule.on = on1;
    });
  });
});
 
 
/***/ }),
/* 1227 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = linear;
function linear(t) {
  return +t;
}
 
 
/***/ }),
/* 1228 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = quadIn;
/* harmony export (immutable) */ __webpack_exports__["c"] = quadOut;
/* harmony export (immutable) */ __webpack_exports__["b"] = quadInOut;
function quadIn(t) {
  return t * t;
}
 
function quadOut(t) {
  return t * (2 - t);
}
 
function quadInOut(t) {
  return ((t *= 2) <= 1 ? t * t : --t * (2 - t) + 1) / 2;
}
 
 
/***/ }),
/* 1229 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = cubicIn;
/* harmony export (immutable) */ __webpack_exports__["c"] = cubicOut;
/* harmony export (immutable) */ __webpack_exports__["b"] = cubicInOut;
function cubicIn(t) {
  return t * t * t;
}
 
function cubicOut(t) {
  return --t * t * t + 1;
}
 
function cubicInOut(t) {
  return ((t *= 2) <= 1 ? t * t * t : (t -= 2) * t * t + 2) / 2;
}
 
 
/***/ }),
/* 1230 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return polyIn; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return polyOut; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return polyInOut; });
var exponent = 3;
 
var polyIn = (function custom(e) {
  e = +e;
 
  function polyIn(t) {
    return Math.pow(t, e);
  }
 
  polyIn.exponent = custom;
 
  return polyIn;
})(exponent);
 
var polyOut = (function custom(e) {
  e = +e;
 
  function polyOut(t) {
    return 1 - Math.pow(1 - t, e);
  }
 
  polyOut.exponent = custom;
 
  return polyOut;
})(exponent);
 
var polyInOut = (function custom(e) {
  e = +e;
 
  function polyInOut(t) {
    return ((t *= 2) <= 1 ? Math.pow(t, e) : 2 - Math.pow(2 - t, e)) / 2;
  }
 
  polyInOut.exponent = custom;
 
  return polyInOut;
})(exponent);
 
 
/***/ }),
/* 1231 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = sinIn;
/* harmony export (immutable) */ __webpack_exports__["c"] = sinOut;
/* harmony export (immutable) */ __webpack_exports__["b"] = sinInOut;
var pi = Math.PI,
    halfPi = pi / 2;
 
function sinIn(t) {
  return (+t === 1) ? 1 : 1 - Math.cos(t * halfPi);
}
 
function sinOut(t) {
  return Math.sin(t * halfPi);
}
 
function sinInOut(t) {
  return (1 - Math.cos(pi * t)) / 2;
}
 
 
/***/ }),
/* 1232 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = expIn;
/* harmony export (immutable) */ __webpack_exports__["c"] = expOut;
/* harmony export (immutable) */ __webpack_exports__["b"] = expInOut;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__math_js__ = __webpack_require__(728);
 
 
function expIn(t) {
  return Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["a" /* tpmt */])(1 - +t);
}
 
function expOut(t) {
  return 1 - Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["a" /* tpmt */])(t);
}
 
function expInOut(t) {
  return ((t *= 2) <= 1 ? Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["a" /* tpmt */])(1 - t) : 2 - Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["a" /* tpmt */])(t - 1)) / 2;
}
 
 
/***/ }),
/* 1233 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = circleIn;
/* harmony export (immutable) */ __webpack_exports__["c"] = circleOut;
/* harmony export (immutable) */ __webpack_exports__["b"] = circleInOut;
function circleIn(t) {
  return 1 - Math.sqrt(1 - t * t);
}
 
function circleOut(t) {
  return Math.sqrt(1 - --t * t);
}
 
function circleInOut(t) {
  return ((t *= 2) <= 1 ? 1 - Math.sqrt(1 - t * t) : Math.sqrt(1 - (t -= 2) * t) + 1) / 2;
}
 
 
/***/ }),
/* 1234 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = bounceIn;
/* harmony export (immutable) */ __webpack_exports__["c"] = bounceOut;
/* harmony export (immutable) */ __webpack_exports__["b"] = bounceInOut;
var b1 = 4 / 11,
    b2 = 6 / 11,
    b3 = 8 / 11,
    b4 = 3 / 4,
    b5 = 9 / 11,
    b6 = 10 / 11,
    b7 = 15 / 16,
    b8 = 21 / 22,
    b9 = 63 / 64,
    b0 = 1 / b1 / b1;
 
function bounceIn(t) {
  return 1 - bounceOut(1 - t);
}
 
function bounceOut(t) {
  return (t = +t) < b1 ? b0 * t * t : t < b3 ? b0 * (t -= b2) * t + b4 : t < b6 ? b0 * (t -= b5) * t + b7 : b0 * (t -= b8) * t + b9;
}
 
function bounceInOut(t) {
  return ((t *= 2) <= 1 ? 1 - bounceOut(1 - t) : bounceOut(t - 1) + 1) / 2;
}
 
 
/***/ }),
/* 1235 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return backIn; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return backOut; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return backInOut; });
var overshoot = 1.70158;
 
var backIn = (function custom(s) {
  s = +s;
 
  function backIn(t) {
    return (t = +t) * t * (s * (t - 1) + t);
  }
 
  backIn.overshoot = custom;
 
  return backIn;
})(overshoot);
 
var backOut = (function custom(s) {
  s = +s;
 
  function backOut(t) {
    return --t * t * ((t + 1) * s + t) + 1;
  }
 
  backOut.overshoot = custom;
 
  return backOut;
})(overshoot);
 
var backInOut = (function custom(s) {
  s = +s;
 
  function backInOut(t) {
    return ((t *= 2) < 1 ? t * t * ((s + 1) * t - s) : (t -= 2) * t * ((s + 1) * t + s) + 2) / 2;
  }
 
  backInOut.overshoot = custom;
 
  return backInOut;
})(overshoot);
 
 
/***/ }),
/* 1236 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return elasticIn; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return elasticOut; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return elasticInOut; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__math_js__ = __webpack_require__(728);
 
 
var tau = 2 * Math.PI,
    amplitude = 1,
    period = 0.3;
 
var elasticIn = (function custom(a, p) {
  var s = Math.asin(1 / (a = Math.max(1, a))) * (p /= tau);
 
  function elasticIn(t) {
    return a * Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["a" /* tpmt */])(-(--t)) * Math.sin((s - t) / p);
  }
 
  elasticIn.amplitude = function(a) { return custom(a, p * tau); };
  elasticIn.period = function(p) { return custom(a, p); };
 
  return elasticIn;
})(amplitude, period);
 
var elasticOut = (function custom(a, p) {
  var s = Math.asin(1 / (a = Math.max(1, a))) * (p /= tau);
 
  function elasticOut(t) {
    return 1 - a * Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["a" /* tpmt */])(t = +t) * Math.sin((t + s) / p);
  }
 
  elasticOut.amplitude = function(a) { return custom(a, p * tau); };
  elasticOut.period = function(p) { return custom(a, p); };
 
  return elasticOut;
})(amplitude, period);
 
var elasticInOut = (function custom(a, p) {
  var s = Math.asin(1 / (a = Math.max(1, a))) * (p /= tau);
 
  function elasticInOut(t) {
    return ((t = t * 2 - 1) < 0
        ? a * Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["a" /* tpmt */])(-t) * Math.sin((s - t) / p)
        : 2 - a * Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["a" /* tpmt */])(t) * Math.sin((s + t) / p)) / 2;
  }
 
  elasticInOut.amplitude = function(a) { return custom(a, p * tau); };
  elasticInOut.period = function(p) { return custom(a, p); };
 
  return elasticInOut;
})(amplitude, period);
 
 
/***/ }),
/* 1237 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__transition_index_js__ = __webpack_require__(101);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__transition_schedule_js__ = __webpack_require__(63);
 
 
 
var root = [null];
 
/* harmony default export */ __webpack_exports__["a"] = (function(node, name) {
  var schedules = node.__transition,
      schedule,
      i;
 
  if (schedules) {
    name = name == null ? null : name + "";
    for (i in schedules) {
      if ((schedule = schedules[i]).state > __WEBPACK_IMPORTED_MODULE_1__transition_schedule_js__["c" /* SCHEDULED */] && schedule.name === name) {
        return new __WEBPACK_IMPORTED_MODULE_0__transition_index_js__["a" /* Transition */]([[node]], root, name, +i);
      }
    }
  }
 
  return null;
});
 
 
/***/ }),
/* 1238 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony default export */ __webpack_exports__["a"] = (function(x) {
  return function() {
    return x;
  };
});
 
 
/***/ }),
/* 1239 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony default export */ __webpack_exports__["a"] = (function(target, type, selection) {
  this.target = target;
  this.type = type;
  this.selection = selection;
});
 
 
/***/ }),
/* 1240 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["b"] = nopropagation;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_d3_selection__ = __webpack_require__(45);
 
 
function nopropagation() {
  __WEBPACK_IMPORTED_MODULE_0_d3_selection__["e" /* event */].stopImmediatePropagation();
}
 
/* harmony default export */ __webpack_exports__["a"] = (function() {
  __WEBPACK_IMPORTED_MODULE_0_d3_selection__["e" /* event */].preventDefault();
  __WEBPACK_IMPORTED_MODULE_0_d3_selection__["e" /* event */].stopImmediatePropagation();
});
 
 
/***/ }),
/* 1241 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__chord__ = __webpack_require__(1242);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_0__chord__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__ribbon__ = __webpack_require__(1243);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return __WEBPACK_IMPORTED_MODULE_1__ribbon__["a"]; });
 
 
 
 
/***/ }),
/* 1242 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_d3_array__ = __webpack_require__(44);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__math__ = __webpack_require__(729);
 
 
 
function compareValue(compare) {
  return function(a, b) {
    return compare(
      a.source.value + a.target.value,
      b.source.value + b.target.value
    );
  };
}
 
/* harmony default export */ __webpack_exports__["a"] = (function() {
  var padAngle = 0,
      sortGroups = null,
      sortSubgroups = null,
      sortChords = null;
 
  function chord(matrix) {
    var n = matrix.length,
        groupSums = [],
        groupIndex = Object(__WEBPACK_IMPORTED_MODULE_0_d3_array__["s" /* range */])(n),
        subgroupIndex = [],
        chords = [],
        groups = chords.groups = new Array(n),
        subgroups = new Array(n * n),
        k,
        x,
        x0,
        dx,
        i,
        j;
 
    // Compute the sum.
    k = 0, i = -1; while (++i < n) {
      x = 0, j = -1; while (++j < n) {
        x += matrix[i][j];
      }
      groupSums.push(x);
      subgroupIndex.push(Object(__WEBPACK_IMPORTED_MODULE_0_d3_array__["s" /* range */])(n));
      k += x;
    }
 
    // Sort groups…
    if (sortGroups) groupIndex.sort(function(a, b) {
      return sortGroups(groupSums[a], groupSums[b]);
    });
 
    // Sort subgroups…
    if (sortSubgroups) subgroupIndex.forEach(function(d, i) {
      d.sort(function(a, b) {
        return sortSubgroups(matrix[i][a], matrix[i][b]);
      });
    });
 
    // Convert the sum to scaling factor for [0, 2pi].
    // TODO Allow start and end angle to be specified?
    // TODO Allow padding to be specified as percentage?
    k = Object(__WEBPACK_IMPORTED_MODULE_1__math__["c" /* max */])(0, __WEBPACK_IMPORTED_MODULE_1__math__["e" /* tau */] - padAngle * n) / k;
    dx = k ? padAngle : __WEBPACK_IMPORTED_MODULE_1__math__["e" /* tau */] / n;
 
    // Compute the start and end angle for each group and subgroup.
    // Note: Opera has a bug reordering object literal properties!
    x = 0, i = -1; while (++i < n) {
      x0 = x, j = -1; while (++j < n) {
        var di = groupIndex[i],
            dj = subgroupIndex[di][j],
            v = matrix[di][dj],
            a0 = x,
            a1 = x += v * k;
        subgroups[dj * n + di] = {
          index: di,
          subindex: dj,
          startAngle: a0,
          endAngle: a1,
          value: v
        };
      }
      groups[di] = {
        index: di,
        startAngle: x0,
        endAngle: x,
        value: groupSums[di]
      };
      x += dx;
    }
 
    // Generate chords for each (non-empty) subgroup-subgroup link.
    i = -1; while (++i < n) {
      j = i - 1; while (++j < n) {
        var source = subgroups[j * n + i],
            target = subgroups[i * n + j];
        if (source.value || target.value) {
          chords.push(source.value < target.value
              ? {source: target, target: source}
              : {source: source, target: target});
        }
      }
    }
 
    return sortChords ? chords.sort(sortChords) : chords;
  }
 
  chord.padAngle = function(_) {
    return arguments.length ? (padAngle = Object(__WEBPACK_IMPORTED_MODULE_1__math__["c" /* max */])(0, _), chord) : padAngle;
  };
 
  chord.sortGroups = function(_) {
    return arguments.length ? (sortGroups = _, chord) : sortGroups;
  };
 
  chord.sortSubgroups = function(_) {
    return arguments.length ? (sortSubgroups = _, chord) : sortSubgroups;
  };
 
  chord.sortChords = function(_) {
    return arguments.length ? (_ == null ? sortChords = null : (sortChords = compareValue(_))._ = _, chord) : sortChords && sortChords._;
  };
 
  return chord;
});
 
 
/***/ }),
/* 1243 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__array__ = __webpack_require__(1244);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__constant__ = __webpack_require__(1245);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__math__ = __webpack_require__(729);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_d3_path__ = __webpack_require__(120);
 
 
 
 
 
function defaultSource(d) {
  return d.source;
}
 
function defaultTarget(d) {
  return d.target;
}
 
function defaultRadius(d) {
  return d.radius;
}
 
function defaultStartAngle(d) {
  return d.startAngle;
}
 
function defaultEndAngle(d) {
  return d.endAngle;
}
 
/* harmony default export */ __webpack_exports__["a"] = (function() {
  var source = defaultSource,
      target = defaultTarget,
      radius = defaultRadius,
      startAngle = defaultStartAngle,
      endAngle = defaultEndAngle,
      context = null;
 
  function ribbon() {
    var buffer,
        argv = __WEBPACK_IMPORTED_MODULE_0__array__["a" /* slice */].call(arguments),
        s = source.apply(this, argv),
        t = target.apply(this, argv),
        sr = +radius.apply(this, (argv[0] = s, argv)),
        sa0 = startAngle.apply(this, argv) - __WEBPACK_IMPORTED_MODULE_2__math__["b" /* halfPi */],
        sa1 = endAngle.apply(this, argv) - __WEBPACK_IMPORTED_MODULE_2__math__["b" /* halfPi */],
        sx0 = sr * Object(__WEBPACK_IMPORTED_MODULE_2__math__["a" /* cos */])(sa0),
        sy0 = sr * Object(__WEBPACK_IMPORTED_MODULE_2__math__["d" /* sin */])(sa0),
        tr = +radius.apply(this, (argv[0] = t, argv)),
        ta0 = startAngle.apply(this, argv) - __WEBPACK_IMPORTED_MODULE_2__math__["b" /* halfPi */],
        ta1 = endAngle.apply(this, argv) - __WEBPACK_IMPORTED_MODULE_2__math__["b" /* halfPi */];
 
    if (!context) context = buffer = Object(__WEBPACK_IMPORTED_MODULE_3_d3_path__["a" /* path */])();
 
    context.moveTo(sx0, sy0);
    context.arc(0, 0, sr, sa0, sa1);
    if (sa0 !== ta0 || sa1 !== ta1) { // TODO sr !== tr?
      context.quadraticCurveTo(0, 0, tr * Object(__WEBPACK_IMPORTED_MODULE_2__math__["a" /* cos */])(ta0), tr * Object(__WEBPACK_IMPORTED_MODULE_2__math__["d" /* sin */])(ta0));
      context.arc(0, 0, tr, ta0, ta1);
    }
    context.quadraticCurveTo(0, 0, sx0, sy0);
    context.closePath();
 
    if (buffer) return context = null, buffer + "" || null;
  }
 
  ribbon.radius = function(_) {
    return arguments.length ? (radius = typeof _ === "function" ? _ : Object(__WEBPACK_IMPORTED_MODULE_1__constant__["a" /* default */])(+_), ribbon) : radius;
  };
 
  ribbon.startAngle = function(_) {
    return arguments.length ? (startAngle = typeof _ === "function" ? _ : Object(__WEBPACK_IMPORTED_MODULE_1__constant__["a" /* default */])(+_), ribbon) : startAngle;
  };
 
  ribbon.endAngle = function(_) {
    return arguments.length ? (endAngle = typeof _ === "function" ? _ : Object(__WEBPACK_IMPORTED_MODULE_1__constant__["a" /* default */])(+_), ribbon) : endAngle;
  };
 
  ribbon.source = function(_) {
    return arguments.length ? (source = _, ribbon) : source;
  };
 
  ribbon.target = function(_) {
    return arguments.length ? (target = _, ribbon) : target;
  };
 
  ribbon.context = function(_) {
    return arguments.length ? ((context = _ == null ? null : _), ribbon) : context;
  };
 
  return ribbon;
});
 
 
/***/ }),
/* 1244 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return slice; });
var slice = Array.prototype.slice;
 
 
/***/ }),
/* 1245 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony default export */ __webpack_exports__["a"] = (function(x) {
  return function() {
    return x;
  };
});
 
 
/***/ }),
/* 1246 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
var pi = Math.PI,
    tau = 2 * pi,
    epsilon = 1e-6,
    tauEpsilon = tau - epsilon;
 
function Path() {
  this._x0 = this._y0 = // start of current subpath
  this._x1 = this._y1 = null; // end of current subpath
  this._ = "";
}
 
function path() {
  return new Path;
}
 
Path.prototype = path.prototype = {
  constructor: Path,
  moveTo: function(x, y) {
    this._ += "M" + (this._x0 = this._x1 = +x) + "," + (this._y0 = this._y1 = +y);
  },
  closePath: function() {
    if (this._x1 !== null) {
      this._x1 = this._x0, this._y1 = this._y0;
      this._ += "Z";
    }
  },
  lineTo: function(x, y) {
    this._ += "L" + (this._x1 = +x) + "," + (this._y1 = +y);
  },
  quadraticCurveTo: function(x1, y1, x, y) {
    this._ += "Q" + (+x1) + "," + (+y1) + "," + (this._x1 = +x) + "," + (this._y1 = +y);
  },
  bezierCurveTo: function(x1, y1, x2, y2, x, y) {
    this._ += "C" + (+x1) + "," + (+y1) + "," + (+x2) + "," + (+y2) + "," + (this._x1 = +x) + "," + (this._y1 = +y);
  },
  arcTo: function(x1, y1, x2, y2, r) {
    x1 = +x1, y1 = +y1, x2 = +x2, y2 = +y2, r = +r;
    var x0 = this._x1,
        y0 = this._y1,
        x21 = x2 - x1,
        y21 = y2 - y1,
        x01 = x0 - x1,
        y01 = y0 - y1,
        l01_2 = x01 * x01 + y01 * y01;
 
    // Is the radius negative? Error.
    if (r < 0) throw new Error("negative radius: " + r);
 
    // Is this path empty? Move to (x1,y1).
    if (this._x1 === null) {
      this._ += "M" + (this._x1 = x1) + "," + (this._y1 = y1);
    }
 
    // Or, is (x1,y1) coincident with (x0,y0)? Do nothing.
    else if (!(l01_2 > epsilon));
 
    // Or, are (x0,y0), (x1,y1) and (x2,y2) collinear?
    // Equivalently, is (x1,y1) coincident with (x2,y2)?
    // Or, is the radius zero? Line to (x1,y1).
    else if (!(Math.abs(y01 * x21 - y21 * x01) > epsilon) || !r) {
      this._ += "L" + (this._x1 = x1) + "," + (this._y1 = y1);
    }
 
    // Otherwise, draw an arc!
    else {
      var x20 = x2 - x0,
          y20 = y2 - y0,
          l21_2 = x21 * x21 + y21 * y21,
          l20_2 = x20 * x20 + y20 * y20,
          l21 = Math.sqrt(l21_2),
          l01 = Math.sqrt(l01_2),
          l = r * Math.tan((pi - Math.acos((l21_2 + l01_2 - l20_2) / (2 * l21 * l01))) / 2),
          t01 = l / l01,
          t21 = l / l21;
 
      // If the start tangent is not coincident with (x0,y0), line to.
      if (Math.abs(t01 - 1) > epsilon) {
        this._ += "L" + (x1 + t01 * x01) + "," + (y1 + t01 * y01);
      }
 
      this._ += "A" + r + "," + r + ",0,0," + (+(y01 * x20 > x01 * y20)) + "," + (this._x1 = x1 + t21 * x21) + "," + (this._y1 = y1 + t21 * y21);
    }
  },
  arc: function(x, y, r, a0, a1, ccw) {
    x = +x, y = +y, r = +r, ccw = !!ccw;
    var dx = r * Math.cos(a0),
        dy = r * Math.sin(a0),
        x0 = x + dx,
        y0 = y + dy,
        cw = 1 ^ ccw,
        da = ccw ? a0 - a1 : a1 - a0;
 
    // Is the radius negative? Error.
    if (r < 0) throw new Error("negative radius: " + r);
 
    // Is this path empty? Move to (x0,y0).
    if (this._x1 === null) {
      this._ += "M" + x0 + "," + y0;
    }
 
    // Or, is (x0,y0) not coincident with the previous point? Line to (x0,y0).
    else if (Math.abs(this._x1 - x0) > epsilon || Math.abs(this._y1 - y0) > epsilon) {
      this._ += "L" + x0 + "," + y0;
    }
 
    // Is this arc empty? We’re done.
    if (!r) return;
 
    // Does the angle go the wrong way? Flip the direction.
    if (da < 0) da = da % tau + tau;
 
    // Is this a complete circle? Draw two arcs to complete the circle.
    if (da > tauEpsilon) {
      this._ += "A" + r + "," + r + ",0,1," + cw + "," + (x - dx) + "," + (y - dy) + "A" + r + "," + r + ",0,1," + cw + "," + (this._x1 = x0) + "," + (this._y1 = y0);
    }
 
    // Is this arc non-empty? Draw an arc!
    else if (da > epsilon) {
      this._ += "A" + r + "," + r + ",0," + (+(da >= pi)) + "," + cw + "," + (this._x1 = x + r * Math.cos(a1)) + "," + (this._y1 = y + r * Math.sin(a1));
    }
  },
  rect: function(x, y, w, h) {
    this._ += "M" + (this._x0 = this._x1 = +x) + "," + (this._y0 = this._y1 = +y) + "h" + (+w) + "v" + (+h) + "h" + (-w) + "Z";
  },
  toString: function() {
    return this._;
  }
};
 
/* harmony default export */ __webpack_exports__["a"] = (path);
 
 
/***/ }),
/* 1247 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__map__ = __webpack_require__(350);
 
 
/* harmony default export */ __webpack_exports__["a"] = (function() {
  var keys = [],
      sortKeys = [],
      sortValues,
      rollup,
      nest;
 
  function apply(array, depth, createResult, setResult) {
    if (depth >= keys.length) {
      if (sortValues != null) array.sort(sortValues);
      return rollup != null ? rollup(array) : array;
    }
 
    var i = -1,
        n = array.length,
        key = keys[depth++],
        keyValue,
        value,
        valuesByKey = Object(__WEBPACK_IMPORTED_MODULE_0__map__["a" /* default */])(),
        values,
        result = createResult();
 
    while (++i < n) {
      if (values = valuesByKey.get(keyValue = key(value = array[i]) + "")) {
        values.push(value);
      } else {
        valuesByKey.set(keyValue, [value]);
      }
    }
 
    valuesByKey.each(function(values, key) {
      setResult(result, key, apply(values, depth, createResult, setResult));
    });
 
    return result;
  }
 
  function entries(map, depth) {
    if (++depth > keys.length) return map;
    var array, sortKey = sortKeys[depth - 1];
    if (rollup != null && depth >= keys.length) array = map.entries();
    else array = [], map.each(function(v, k) { array.push({key: k, values: entries(v, depth)}); });
    return sortKey != null ? array.sort(function(a, b) { return sortKey(a.key, b.key); }) : array;
  }
 
  return nest = {
    object: function(array) { return apply(array, 0, createObject, setObject); },
    map: function(array) { return apply(array, 0, createMap, setMap); },
    entries: function(array) { return entries(apply(array, 0, createMap, setMap), 0); },
    key: function(d) { keys.push(d); return nest; },
    sortKeys: function(order) { sortKeys[keys.length - 1] = order; return nest; },
    sortValues: function(order) { sortValues = order; return nest; },
    rollup: function(f) { rollup = f; return nest; }
  };
});
 
function createObject() {
  return {};
}
 
function setObject(object, key, value) {
  object[key] = value;
}
 
function createMap() {
  return Object(__WEBPACK_IMPORTED_MODULE_0__map__["a" /* default */])();
}
 
function setMap(map, key, value) {
  map.set(key, value);
}
 
 
/***/ }),
/* 1248 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__map__ = __webpack_require__(350);
 
 
function Set() {}
 
var proto = __WEBPACK_IMPORTED_MODULE_0__map__["a" /* default */].prototype;
 
Set.prototype = set.prototype = {
  constructor: Set,
  has: proto.has,
  add: function(value) {
    value += "";
    this[__WEBPACK_IMPORTED_MODULE_0__map__["b" /* prefix */] + value] = value;
    return this;
  },
  remove: proto.remove,
  clear: proto.clear,
  values: proto.keys,
  size: proto.size,
  empty: proto.empty,
  each: proto.each
};
 
function set(object, f) {
  var set = new Set;
 
  // Copy constructor.
  if (object instanceof Set) object.each(function(value) { set.add(value); });
 
  // Otherwise, assume it’s an array.
  else if (object) {
    var i = -1, n = object.length;
    if (f == null) while (++i < n) set.add(object[i]);
    else while (++i < n) set.add(f(object[i], i, object));
  }
 
  return set;
}
 
/* harmony default export */ __webpack_exports__["a"] = (set);
 
 
/***/ }),
/* 1249 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony default export */ __webpack_exports__["a"] = (function(map) {
  var keys = [];
  for (var key in map) keys.push(key);
  return keys;
});
 
 
/***/ }),
/* 1250 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony default export */ __webpack_exports__["a"] = (function(map) {
  var values = [];
  for (var key in map) values.push(map[key]);
  return values;
});
 
 
/***/ }),
/* 1251 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony default export */ __webpack_exports__["a"] = (function(map) {
  var entries = [];
  for (var key in map) entries.push({key: key, value: map[key]});
  return entries;
});
 
 
/***/ }),
/* 1252 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__contours__ = __webpack_require__(730);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return __WEBPACK_IMPORTED_MODULE_0__contours__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__density__ = __webpack_require__(1257);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_1__density__["a"]; });
 
 
 
 
/***/ }),
/* 1253 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony default export */ __webpack_exports__["a"] = (function(a, b) {
  return a - b;
});
 
 
/***/ }),
/* 1254 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony default export */ __webpack_exports__["a"] = (function(ring) {
  var i = 0, n = ring.length, area = ring[n - 1][1] * ring[0][0] - ring[n - 1][0] * ring[0][1];
  while (++i < n) area += ring[i - 1][1] * ring[i][0] - ring[i - 1][0] * ring[i][1];
  return area;
});
 
 
/***/ }),
/* 1255 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony default export */ __webpack_exports__["a"] = (function(ring, hole) {
  var i = -1, n = hole.length, c;
  while (++i < n) if (c = ringContains(ring, hole[i])) return c;
  return 0;
});
 
function ringContains(ring, point) {
  var x = point[0], y = point[1], contains = -1;
  for (var i = 0, n = ring.length, j = n - 1; i < n; j = i++) {
    var pi = ring[i], xi = pi[0], yi = pi[1], pj = ring[j], xj = pj[0], yj = pj[1];
    if (segmentContains(pi, pj, point)) return 0;
    if (((yi > y) !== (yj > y)) && ((x < (xj - xi) * (y - yi) / (yj - yi) + xi))) contains = -contains;
  }
  return contains;
}
 
function segmentContains(a, b, c) {
  var i; return collinear(a, b, c) && within(a[i = +(a[0] === b[0])], c[i], b[i]);
}
 
function collinear(a, b, c) {
  return (b[0] - a[0]) * (c[1] - a[1]) === (c[0] - a[0]) * (b[1] - a[1]);
}
 
function within(p, q, r) {
  return p <= q && q <= r || r <= q && q <= p;
}
 
 
/***/ }),
/* 1256 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony default export */ __webpack_exports__["a"] = (function() {});
 
 
/***/ }),
/* 1257 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_d3_array__ = __webpack_require__(44);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__array__ = __webpack_require__(731);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__blur__ = __webpack_require__(1258);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__constant__ = __webpack_require__(732);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__contours__ = __webpack_require__(730);
 
 
 
 
 
 
function defaultX(d) {
  return d[0];
}
 
function defaultY(d) {
  return d[1];
}
 
function defaultWeight() {
  return 1;
}
 
/* harmony default export */ __webpack_exports__["a"] = (function() {
  var x = defaultX,
      y = defaultY,
      weight = defaultWeight,
      dx = 960,
      dy = 500,
      r = 20, // blur radius
      k = 2, // log2(grid cell size)
      o = r * 3, // grid offset, to pad for blur
      n = (dx + o * 2) >> k, // grid width
      m = (dy + o * 2) >> k, // grid height
      threshold = Object(__WEBPACK_IMPORTED_MODULE_3__constant__["a" /* default */])(20);
 
  function density(data) {
    var values0 = new Float32Array(n * m),
        values1 = new Float32Array(n * m);
 
    data.forEach(function(d, i, data) {
      var xi = (+x(d, i, data) + o) >> k,
          yi = (+y(d, i, data) + o) >> k,
          wi = +weight(d, i, data);
      if (xi >= 0 && xi < n && yi >= 0 && yi < m) {
        values0[xi + yi * n] += wi;
      }
    });
 
    // TODO Optimize.
    Object(__WEBPACK_IMPORTED_MODULE_2__blur__["a" /* blurX */])({width: n, height: m, data: values0}, {width: n, height: m, data: values1}, r >> k);
    Object(__WEBPACK_IMPORTED_MODULE_2__blur__["b" /* blurY */])({width: n, height: m, data: values1}, {width: n, height: m, data: values0}, r >> k);
    Object(__WEBPACK_IMPORTED_MODULE_2__blur__["a" /* blurX */])({width: n, height: m, data: values0}, {width: n, height: m, data: values1}, r >> k);
    Object(__WEBPACK_IMPORTED_MODULE_2__blur__["b" /* blurY */])({width: n, height: m, data: values1}, {width: n, height: m, data: values0}, r >> k);
    Object(__WEBPACK_IMPORTED_MODULE_2__blur__["a" /* blurX */])({width: n, height: m, data: values0}, {width: n, height: m, data: values1}, r >> k);
    Object(__WEBPACK_IMPORTED_MODULE_2__blur__["b" /* blurY */])({width: n, height: m, data: values1}, {width: n, height: m, data: values0}, r >> k);
 
    var tz = threshold(values0);
 
    // Convert number of thresholds into uniform thresholds.
    if (!Array.isArray(tz)) {
      var stop = Object(__WEBPACK_IMPORTED_MODULE_0_d3_array__["k" /* max */])(values0);
      tz = Object(__WEBPACK_IMPORTED_MODULE_0_d3_array__["A" /* tickStep */])(0, stop, tz);
      tz = Object(__WEBPACK_IMPORTED_MODULE_0_d3_array__["s" /* range */])(0, Math.floor(stop / tz) * tz, tz);
      tz.shift();
    }
 
    return Object(__WEBPACK_IMPORTED_MODULE_4__contours__["a" /* default */])()
        .thresholds(tz)
        .size([n, m])
      (values0)
        .map(transform);
  }
 
  function transform(geometry) {
    geometry.value *= Math.pow(2, -2 * k); // Density in points per square pixel.
    geometry.coordinates.forEach(transformPolygon);
    return geometry;
  }
 
  function transformPolygon(coordinates) {
    coordinates.forEach(transformRing);
  }
 
  function transformRing(coordinates) {
    coordinates.forEach(transformPoint);
  }
 
  // TODO Optimize.
  function transformPoint(coordinates) {
    coordinates[0] = coordinates[0] * Math.pow(2, k) - o;
    coordinates[1] = coordinates[1] * Math.pow(2, k) - o;
  }
 
  function resize() {
    o = r * 3;
    n = (dx + o * 2) >> k;
    m = (dy + o * 2) >> k;
    return density;
  }
 
  density.x = function(_) {
    return arguments.length ? (x = typeof _ === "function" ? _ : Object(__WEBPACK_IMPORTED_MODULE_3__constant__["a" /* default */])(+_), density) : x;
  };
 
  density.y = function(_) {
    return arguments.length ? (y = typeof _ === "function" ? _ : Object(__WEBPACK_IMPORTED_MODULE_3__constant__["a" /* default */])(+_), density) : y;
  };
 
  density.weight = function(_) {
    return arguments.length ? (weight = typeof _ === "function" ? _ : Object(__WEBPACK_IMPORTED_MODULE_3__constant__["a" /* default */])(+_), density) : weight;
  };
 
  density.size = function(_) {
    if (!arguments.length) return [dx, dy];
    var _0 = Math.ceil(_[0]), _1 = Math.ceil(_[1]);
    if (!(_0 >= 0) && !(_0 >= 0)) throw new Error("invalid size");
    return dx = _0, dy = _1, resize();
  };
 
  density.cellSize = function(_) {
    if (!arguments.length) return 1 << k;
    if (!((_ = +_) >= 1)) throw new Error("invalid cell size");
    return k = Math.floor(Math.log(_) / Math.LN2), resize();
  };
 
  density.thresholds = function(_) {
    return arguments.length ? (threshold = typeof _ === "function" ? _ : Array.isArray(_) ? Object(__WEBPACK_IMPORTED_MODULE_3__constant__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__array__["a" /* slice */].call(_)) : Object(__WEBPACK_IMPORTED_MODULE_3__constant__["a" /* default */])(_), density) : threshold;
  };
 
  density.bandwidth = function(_) {
    if (!arguments.length) return Math.sqrt(r * (r + 1));
    if (!((_ = +_) >= 0)) throw new Error("invalid bandwidth");
    return r = Math.round((Math.sqrt(4 * _ * _ + 1) - 1) / 2), resize();
  };
 
  return density;
});
 
 
/***/ }),
/* 1258 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = blurX;
/* harmony export (immutable) */ __webpack_exports__["b"] = blurY;
// TODO Optimize edge cases.
// TODO Optimize index calculation.
// TODO Optimize arguments.
function blurX(source, target, r) {
  var n = source.width,
      m = source.height,
      w = (r << 1) + 1;
  for (var j = 0; j < m; ++j) {
    for (var i = 0, sr = 0; i < n + r; ++i) {
      if (i < n) {
        sr += source.data[i + j * n];
      }
      if (i >= r) {
        if (i >= w) {
          sr -= source.data[i - w + j * n];
        }
        target.data[i - r + j * n] = sr / Math.min(i + 1, n - 1 + w - i, w);
      }
    }
  }
}
 
// TODO Optimize edge cases.
// TODO Optimize index calculation.
// TODO Optimize arguments.
function blurY(source, target, r) {
  var n = source.width,
      m = source.height,
      w = (r << 1) + 1;
  for (var i = 0; i < n; ++i) {
    for (var j = 0, sr = 0; j < m + r; ++j) {
      if (j < m) {
        sr += source.data[i + j * n];
      }
      if (j >= r) {
        if (j >= w) {
          sr -= source.data[i + (j - w) * n];
        }
        target.data[i + (j - r) * n] = sr / Math.min(j + 1, m - 1 + w - j, w);
      }
    }
  }
}
 
 
/***/ }),
/* 1259 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return csvParse; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return csvParseRows; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return csvFormat; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return csvFormatBody; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return csvFormatRows; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return csvFormatRow; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return csvFormatValue; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__dsv_js__ = __webpack_require__(351);
 
 
var csv = Object(__WEBPACK_IMPORTED_MODULE_0__dsv_js__["a" /* default */])(",");
 
var csvParse = csv.parse;
var csvParseRows = csv.parseRows;
var csvFormat = csv.format;
var csvFormatBody = csv.formatBody;
var csvFormatRows = csv.formatRows;
var csvFormatRow = csv.formatRow;
var csvFormatValue = csv.formatValue;
 
 
/***/ }),
/* 1260 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return tsvParse; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return tsvParseRows; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return tsvFormat; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return tsvFormatBody; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return tsvFormatRows; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return tsvFormatRow; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return tsvFormatValue; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__dsv_js__ = __webpack_require__(351);
 
 
var tsv = Object(__WEBPACK_IMPORTED_MODULE_0__dsv_js__["a" /* default */])("\t");
 
var tsvParse = tsv.parse;
var tsvParseRows = tsv.parseRows;
var tsvFormat = tsv.format;
var tsvFormatBody = tsv.formatBody;
var tsvFormatRows = tsv.formatRows;
var tsvFormatRow = tsv.formatRow;
var tsvFormatValue = tsv.formatValue;
 
 
/***/ }),
/* 1261 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = autoType;
function autoType(object) {
  for (var key in object) {
    var value = object[key].trim(), number, m;
    if (!value) value = null;
    else if (value === "true") value = true;
    else if (value === "false") value = false;
    else if (value === "NaN") value = NaN;
    else if (!isNaN(number = +value)) value = number;
    else if (m = value.match(/^([-+]\d{2})?\d{4}(-\d{2}(-\d{2})?)?(T\d{2}:\d{2}(:\d{2}(\.\d{3})?)?(Z|[-+]\d{2}:\d{2})?)?$/)) {
      if (fixtz && !!m[4] && !m[7]) value = value.replace(/-/g, "/").replace(/T/, " ");
      value = new Date(value);
    }
    else continue;
    object[key] = value;
  }
  return object;
}
 
// https://github.com/d3/d3-dsv/issues/45
var fixtz = new Date("2019-01-01T00:00").getHours() || new Date("2019-07-01T00:00").getHours();
 
/***/ }),
/* 1262 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__blob_js__ = __webpack_require__(1263);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_0__blob_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__buffer_js__ = __webpack_require__(1264);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return __WEBPACK_IMPORTED_MODULE_1__buffer_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__dsv_js__ = __webpack_require__(1265);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return __WEBPACK_IMPORTED_MODULE_2__dsv_js__["b"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return __WEBPACK_IMPORTED_MODULE_2__dsv_js__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return __WEBPACK_IMPORTED_MODULE_2__dsv_js__["c"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__image_js__ = __webpack_require__(1266);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return __WEBPACK_IMPORTED_MODULE_3__image_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__json_js__ = __webpack_require__(1267);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return __WEBPACK_IMPORTED_MODULE_4__json_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__text_js__ = __webpack_require__(352);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return __WEBPACK_IMPORTED_MODULE_5__text_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__xml_js__ = __webpack_require__(1268);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "k", function() { return __WEBPACK_IMPORTED_MODULE_6__xml_js__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return __WEBPACK_IMPORTED_MODULE_6__xml_js__["b"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return __WEBPACK_IMPORTED_MODULE_6__xml_js__["c"]; });
 
 
 
 
 
 
 
 
 
/***/ }),
/* 1263 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
function responseBlob(response) {
  if (!response.ok) throw new Error(response.status + " " + response.statusText);
  return response.blob();
}
 
/* harmony default export */ __webpack_exports__["a"] = (function(input, init) {
  return fetch(input, init).then(responseBlob);
});
 
 
/***/ }),
/* 1264 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
function responseArrayBuffer(response) {
  if (!response.ok) throw new Error(response.status + " " + response.statusText);
  return response.arrayBuffer();
}
 
/* harmony default export */ __webpack_exports__["a"] = (function(input, init) {
  return fetch(input, init).then(responseArrayBuffer);
});
 
 
/***/ }),
/* 1265 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["b"] = dsv;
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return csv; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return tsv; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_d3_dsv__ = __webpack_require__(733);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__text_js__ = __webpack_require__(352);
 
 
 
function dsvParse(parse) {
  return function(input, init, row) {
    if (arguments.length === 2 && typeof init === "function") row = init, init = undefined;
    return Object(__WEBPACK_IMPORTED_MODULE_1__text_js__["a" /* default */])(input, init).then(function(response) {
      return parse(response, row);
    });
  };
}
 
function dsv(delimiter, input, init, row) {
  if (arguments.length === 3 && typeof init === "function") row = init, init = undefined;
  var format = Object(__WEBPACK_IMPORTED_MODULE_0_d3_dsv__["i" /* dsvFormat */])(delimiter);
  return Object(__WEBPACK_IMPORTED_MODULE_1__text_js__["a" /* default */])(input, init).then(function(response) {
    return format.parse(response, row);
  });
}
 
var csv = dsvParse(__WEBPACK_IMPORTED_MODULE_0_d3_dsv__["g" /* csvParse */]);
var tsv = dsvParse(__WEBPACK_IMPORTED_MODULE_0_d3_dsv__["o" /* tsvParse */]);
 
 
/***/ }),
/* 1266 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony default export */ __webpack_exports__["a"] = (function(input, init) {
  return new Promise(function(resolve, reject) {
    var image = new Image;
    for (var key in init) image[key] = init[key];
    image.onerror = reject;
    image.onload = function() { resolve(image); };
    image.src = input;
  });
});
 
 
/***/ }),
/* 1267 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
function responseJson(response) {
  if (!response.ok) throw new Error(response.status + " " + response.statusText);
  if (response.status === 204 || response.status === 205) return;
  return response.json();
}
 
/* harmony default export */ __webpack_exports__["a"] = (function(input, init) {
  return fetch(input, init).then(responseJson);
});
 
 
/***/ }),
/* 1268 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return html; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return svg; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__text_js__ = __webpack_require__(352);
 
 
function parser(type) {
  return function(input, init)  {
    return Object(__WEBPACK_IMPORTED_MODULE_0__text_js__["a" /* default */])(input, init).then(function(text) {
      return (new DOMParser).parseFromString(text, type);
    });
  };
}
 
/* harmony default export */ __webpack_exports__["a"] = (parser("application/xml"));
 
var html = parser("text/html");
 
var svg = parser("image/svg+xml");
 
 
/***/ }),
/* 1269 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__center__ = __webpack_require__(1270);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_0__center__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__collide__ = __webpack_require__(1271);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return __WEBPACK_IMPORTED_MODULE_1__collide__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__link__ = __webpack_require__(1285);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return __WEBPACK_IMPORTED_MODULE_2__link__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__manyBody__ = __webpack_require__(1286);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return __WEBPACK_IMPORTED_MODULE_3__manyBody__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__radial__ = __webpack_require__(1287);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return __WEBPACK_IMPORTED_MODULE_4__radial__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__simulation__ = __webpack_require__(734);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return __WEBPACK_IMPORTED_MODULE_5__simulation__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__x__ = __webpack_require__(1288);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return __WEBPACK_IMPORTED_MODULE_6__x__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__y__ = __webpack_require__(1289);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return __WEBPACK_IMPORTED_MODULE_7__y__["a"]; });
 
 
 
 
 
 
 
 
 
 
/***/ }),
/* 1270 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony default export */ __webpack_exports__["a"] = (function(x, y) {
  var nodes;
 
  if (x == null) x = 0;
  if (y == null) y = 0;
 
  function force() {
    var i,
        n = nodes.length,
        node,
        sx = 0,
        sy = 0;
 
    for (i = 0; i < n; ++i) {
      node = nodes[i], sx += node.x, sy += node.y;
    }
 
    for (sx = sx / n - x, sy = sy / n - y, i = 0; i < n; ++i) {
      node = nodes[i], node.x -= sx, node.y -= sy;
    }
  }
 
  force.initialize = function(_) {
    nodes = _;
  };
 
  force.x = function(_) {
    return arguments.length ? (x = +_, force) : x;
  };
 
  force.y = function(_) {
    return arguments.length ? (y = +_, force) : y;
  };
 
  return force;
});
 
 
/***/ }),
/* 1271 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__constant__ = __webpack_require__(151);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__jiggle__ = __webpack_require__(353);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_d3_quadtree__ = __webpack_require__(354);
 
 
 
 
function x(d) {
  return d.x + d.vx;
}
 
function y(d) {
  return d.y + d.vy;
}
 
/* harmony default export */ __webpack_exports__["a"] = (function(radius) {
  var nodes,
      radii,
      strength = 1,
      iterations = 1;
 
  if (typeof radius !== "function") radius = Object(__WEBPACK_IMPORTED_MODULE_0__constant__["a" /* default */])(radius == null ? 1 : +radius);
 
  function force() {
    var i, n = nodes.length,
        tree,
        node,
        xi,
        yi,
        ri,
        ri2;
 
    for (var k = 0; k < iterations; ++k) {
      tree = Object(__WEBPACK_IMPORTED_MODULE_2_d3_quadtree__["a" /* quadtree */])(nodes, x, y).visitAfter(prepare);
      for (i = 0; i < n; ++i) {
        node = nodes[i];
        ri = radii[node.index], ri2 = ri * ri;
        xi = node.x + node.vx;
        yi = node.y + node.vy;
        tree.visit(apply);
      }
    }
 
    function apply(quad, x0, y0, x1, y1) {
      var data = quad.data, rj = quad.r, r = ri + rj;
      if (data) {
        if (data.index > node.index) {
          var x = xi - data.x - data.vx,
              y = yi - data.y - data.vy,
              l = x * x + y * y;
          if (l < r * r) {
            if (x === 0) x = Object(__WEBPACK_IMPORTED_MODULE_1__jiggle__["a" /* default */])(), l += x * x;
            if (y === 0) y = Object(__WEBPACK_IMPORTED_MODULE_1__jiggle__["a" /* default */])(), l += y * y;
            l = (r - (l = Math.sqrt(l))) / l * strength;
            node.vx += (x *= l) * (r = (rj *= rj) / (ri2 + rj));
            node.vy += (y *= l) * r;
            data.vx -= x * (r = 1 - r);
            data.vy -= y * r;
          }
        }
        return;
      }
      return x0 > xi + r || x1 < xi - r || y0 > yi + r || y1 < yi - r;
    }
  }
 
  function prepare(quad) {
    if (quad.data) return quad.r = radii[quad.data.index];
    for (var i = quad.r = 0; i < 4; ++i) {
      if (quad[i] && quad[i].r > quad.r) {
        quad.r = quad[i].r;
      }
    }
  }
 
  function initialize() {
    if (!nodes) return;
    var i, n = nodes.length, node;
    radii = new Array(n);
    for (i = 0; i < n; ++i) node = nodes[i], radii[node.index] = +radius(node, i, nodes);
  }
 
  force.initialize = function(_) {
    nodes = _;
    initialize();
  };
 
  force.iterations = function(_) {
    return arguments.length ? (iterations = +_, force) : iterations;
  };
 
  force.strength = function(_) {
    return arguments.length ? (strength = +_, force) : strength;
  };
 
  force.radius = function(_) {
    return arguments.length ? (radius = typeof _ === "function" ? _ : Object(__WEBPACK_IMPORTED_MODULE_0__constant__["a" /* default */])(+_), initialize(), force) : radius;
  };
 
  return force;
});
 
 
/***/ }),
/* 1272 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = quadtree;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__add_js__ = __webpack_require__(1273);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__cover_js__ = __webpack_require__(1274);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__data_js__ = __webpack_require__(1275);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__extent_js__ = __webpack_require__(1276);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__find_js__ = __webpack_require__(1277);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__remove_js__ = __webpack_require__(1278);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__root_js__ = __webpack_require__(1279);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__size_js__ = __webpack_require__(1280);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__visit_js__ = __webpack_require__(1281);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__visitAfter_js__ = __webpack_require__(1282);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__x_js__ = __webpack_require__(1283);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__y_js__ = __webpack_require__(1284);
 
 
 
 
 
 
 
 
 
 
 
 
 
function quadtree(nodes, x, y) {
  var tree = new Quadtree(x == null ? __WEBPACK_IMPORTED_MODULE_10__x_js__["b" /* defaultX */] : x, y == null ? __WEBPACK_IMPORTED_MODULE_11__y_js__["b" /* defaultY */] : y, NaN, NaN, NaN, NaN);
  return nodes == null ? tree : tree.addAll(nodes);
}
 
function Quadtree(x, y, x0, y0, x1, y1) {
  this._x = x;
  this._y = y;
  this._x0 = x0;
  this._y0 = y0;
  this._x1 = x1;
  this._y1 = y1;
  this._root = undefined;
}
 
function leaf_copy(leaf) {
  var copy = {data: leaf.data}, next = copy;
  while (leaf = leaf.next) next = next.next = {data: leaf.data};
  return copy;
}
 
var treeProto = quadtree.prototype = Quadtree.prototype;
 
treeProto.copy = function() {
  var copy = new Quadtree(this._x, this._y, this._x0, this._y0, this._x1, this._y1),
      node = this._root,
      nodes,
      child;
 
  if (!node) return copy;
 
  if (!node.length) return copy._root = leaf_copy(node), copy;
 
  nodes = [{source: node, target: copy._root = new Array(4)}];
  while (node = nodes.pop()) {
    for (var i = 0; i < 4; ++i) {
      if (child = node.source[i]) {
        if (child.length) nodes.push({source: child, target: node.target[i] = new Array(4)});
        else node.target[i] = leaf_copy(child);
      }
    }
  }
 
  return copy;
};
 
treeProto.add = __WEBPACK_IMPORTED_MODULE_0__add_js__["b" /* default */];
treeProto.addAll = __WEBPACK_IMPORTED_MODULE_0__add_js__["a" /* addAll */];
treeProto.cover = __WEBPACK_IMPORTED_MODULE_1__cover_js__["a" /* default */];
treeProto.data = __WEBPACK_IMPORTED_MODULE_2__data_js__["a" /* default */];
treeProto.extent = __WEBPACK_IMPORTED_MODULE_3__extent_js__["a" /* default */];
treeProto.find = __WEBPACK_IMPORTED_MODULE_4__find_js__["a" /* default */];
treeProto.remove = __WEBPACK_IMPORTED_MODULE_5__remove_js__["a" /* default */];
treeProto.removeAll = __WEBPACK_IMPORTED_MODULE_5__remove_js__["b" /* removeAll */];
treeProto.root = __WEBPACK_IMPORTED_MODULE_6__root_js__["a" /* default */];
treeProto.size = __WEBPACK_IMPORTED_MODULE_7__size_js__["a" /* default */];
treeProto.visit = __WEBPACK_IMPORTED_MODULE_8__visit_js__["a" /* default */];
treeProto.visitAfter = __WEBPACK_IMPORTED_MODULE_9__visitAfter_js__["a" /* default */];
treeProto.x = __WEBPACK_IMPORTED_MODULE_10__x_js__["a" /* default */];
treeProto.y = __WEBPACK_IMPORTED_MODULE_11__y_js__["a" /* default */];
 
 
/***/ }),
/* 1273 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = addAll;
/* harmony default export */ __webpack_exports__["b"] = (function(d) {
  var x = +this._x.call(null, d),
      y = +this._y.call(null, d);
  return add(this.cover(x, y), x, y, d);
});
 
function add(tree, x, y, d) {
  if (isNaN(x) || isNaN(y)) return tree; // ignore invalid points
 
  var parent,
      node = tree._root,
      leaf = {data: d},
      x0 = tree._x0,
      y0 = tree._y0,
      x1 = tree._x1,
      y1 = tree._y1,
      xm,
      ym,
      xp,
      yp,
      right,
      bottom,
      i,
      j;
 
  // If the tree is empty, initialize the root as a leaf.
  if (!node) return tree._root = leaf, tree;
 
  // Find the existing leaf for the new point, or add it.
  while (node.length) {
    if (right = x >= (xm = (x0 + x1) / 2)) x0 = xm; else x1 = xm;
    if (bottom = y >= (ym = (y0 + y1) / 2)) y0 = ym; else y1 = ym;
    if (parent = node, !(node = node[i = bottom << 1 | right])) return parent[i] = leaf, tree;
  }
 
  // Is the new point is exactly coincident with the existing point?
  xp = +tree._x.call(null, node.data);
  yp = +tree._y.call(null, node.data);
  if (x === xp && y === yp) return leaf.next = node, parent ? parent[i] = leaf : tree._root = leaf, tree;
 
  // Otherwise, split the leaf node until the old and new point are separated.
  do {
    parent = parent ? parent[i] = new Array(4) : tree._root = new Array(4);
    if (right = x >= (xm = (x0 + x1) / 2)) x0 = xm; else x1 = xm;
    if (bottom = y >= (ym = (y0 + y1) / 2)) y0 = ym; else y1 = ym;
  } while ((i = bottom << 1 | right) === (j = (yp >= ym) << 1 | (xp >= xm)));
  return parent[j] = node, parent[i] = leaf, tree;
}
 
function addAll(data) {
  var d, i, n = data.length,
      x,
      y,
      xz = new Array(n),
      yz = new Array(n),
      x0 = Infinity,
      y0 = Infinity,
      x1 = -Infinity,
      y1 = -Infinity;
 
  // Compute the points and their extent.
  for (i = 0; i < n; ++i) {
    if (isNaN(x = +this._x.call(null, d = data[i])) || isNaN(y = +this._y.call(null, d))) continue;
    xz[i] = x;
    yz[i] = y;
    if (x < x0) x0 = x;
    if (x > x1) x1 = x;
    if (y < y0) y0 = y;
    if (y > y1) y1 = y;
  }
 
  // If there were no (valid) points, abort.
  if (x0 > x1 || y0 > y1) return this;
 
  // Expand the tree to cover the new points.
  this.cover(x0, y0).cover(x1, y1);
 
  // Add the new points.
  for (i = 0; i < n; ++i) {
    add(this, xz[i], yz[i], data[i]);
  }
 
  return this;
}
 
 
/***/ }),
/* 1274 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony default export */ __webpack_exports__["a"] = (function(x, y) {
  if (isNaN(x = +x) || isNaN(y = +y)) return this; // ignore invalid points
 
  var x0 = this._x0,
      y0 = this._y0,
      x1 = this._x1,
      y1 = this._y1;
 
  // If the quadtree has no extent, initialize them.
  // Integer extent are necessary so that if we later double the extent,
  // the existing quadrant boundaries don’t change due to floating point error!
  if (isNaN(x0)) {
    x1 = (x0 = Math.floor(x)) + 1;
    y1 = (y0 = Math.floor(y)) + 1;
  }
 
  // Otherwise, double repeatedly to cover.
  else {
    var z = x1 - x0,
        node = this._root,
        parent,
        i;
 
    while (x0 > x || x >= x1 || y0 > y || y >= y1) {
      i = (y < y0) << 1 | (x < x0);
      parent = new Array(4), parent[i] = node, node = parent, z *= 2;
      switch (i) {
        case 0: x1 = x0 + z, y1 = y0 + z; break;
        case 1: x0 = x1 - z, y1 = y0 + z; break;
        case 2: x1 = x0 + z, y0 = y1 - z; break;
        case 3: x0 = x1 - z, y0 = y1 - z; break;
      }
    }
 
    if (this._root && this._root.length) this._root = node;
  }
 
  this._x0 = x0;
  this._y0 = y0;
  this._x1 = x1;
  this._y1 = y1;
  return this;
});
 
 
/***/ }),
/* 1275 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony default export */ __webpack_exports__["a"] = (function() {
  var data = [];
  this.visit(function(node) {
    if (!node.length) do data.push(node.data); while (node = node.next)
  });
  return data;
});
 
 
/***/ }),
/* 1276 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony default export */ __webpack_exports__["a"] = (function(_) {
  return arguments.length
      ? this.cover(+_[0][0], +_[0][1]).cover(+_[1][0], +_[1][1])
      : isNaN(this._x0) ? undefined : [[this._x0, this._y0], [this._x1, this._y1]];
});
 
 
/***/ }),
/* 1277 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__quad_js__ = __webpack_require__(355);
 
 
/* harmony default export */ __webpack_exports__["a"] = (function(x, y, radius) {
  var data,
      x0 = this._x0,
      y0 = this._y0,
      x1,
      y1,
      x2,
      y2,
      x3 = this._x1,
      y3 = this._y1,
      quads = [],
      node = this._root,
      q,
      i;
 
  if (node) quads.push(new __WEBPACK_IMPORTED_MODULE_0__quad_js__["a" /* default */](node, x0, y0, x3, y3));
  if (radius == null) radius = Infinity;
  else {
    x0 = x - radius, y0 = y - radius;
    x3 = x + radius, y3 = y + radius;
    radius *= radius;
  }
 
  while (q = quads.pop()) {
 
    // Stop searching if this quadrant can’t contain a closer node.
    if (!(node = q.node)
        || (x1 = q.x0) > x3
        || (y1 = q.y0) > y3
        || (x2 = q.x1) < x0
        || (y2 = q.y1) < y0) continue;
 
    // Bisect the current quadrant.
    if (node.length) {
      var xm = (x1 + x2) / 2,
          ym = (y1 + y2) / 2;
 
      quads.push(
        new __WEBPACK_IMPORTED_MODULE_0__quad_js__["a" /* default */](node[3], xm, ym, x2, y2),
        new __WEBPACK_IMPORTED_MODULE_0__quad_js__["a" /* default */](node[2], x1, ym, xm, y2),
        new __WEBPACK_IMPORTED_MODULE_0__quad_js__["a" /* default */](node[1], xm, y1, x2, ym),
        new __WEBPACK_IMPORTED_MODULE_0__quad_js__["a" /* default */](node[0], x1, y1, xm, ym)
      );
 
      // Visit the closest quadrant first.
      if (i = (y >= ym) << 1 | (x >= xm)) {
        q = quads[quads.length - 1];
        quads[quads.length - 1] = quads[quads.length - 1 - i];
        quads[quads.length - 1 - i] = q;
      }
    }
 
    // Visit this point. (Visiting coincident points isn’t necessary!)
    else {
      var dx = x - +this._x.call(null, node.data),
          dy = y - +this._y.call(null, node.data),
          d2 = dx * dx + dy * dy;
      if (d2 < radius) {
        var d = Math.sqrt(radius = d2);
        x0 = x - d, y0 = y - d;
        x3 = x + d, y3 = y + d;
        data = node.data;
      }
    }
  }
 
  return data;
});
 
 
/***/ }),
/* 1278 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["b"] = removeAll;
/* harmony default export */ __webpack_exports__["a"] = (function(d) {
  if (isNaN(x = +this._x.call(null, d)) || isNaN(y = +this._y.call(null, d))) return this; // ignore invalid points
 
  var parent,
      node = this._root,
      retainer,
      previous,
      next,
      x0 = this._x0,
      y0 = this._y0,
      x1 = this._x1,
      y1 = this._y1,
      x,
      y,
      xm,
      ym,
      right,
      bottom,
      i,
      j;
 
  // If the tree is empty, initialize the root as a leaf.
  if (!node) return this;
 
  // Find the leaf node for the point.
  // While descending, also retain the deepest parent with a non-removed sibling.
  if (node.length) while (true) {
    if (right = x >= (xm = (x0 + x1) / 2)) x0 = xm; else x1 = xm;
    if (bottom = y >= (ym = (y0 + y1) / 2)) y0 = ym; else y1 = ym;
    if (!(parent = node, node = node[i = bottom << 1 | right])) return this;
    if (!node.length) break;
    if (parent[(i + 1) & 3] || parent[(i + 2) & 3] || parent[(i + 3) & 3]) retainer = parent, j = i;
  }
 
  // Find the point to remove.
  while (node.data !== d) if (!(previous = node, node = node.next)) return this;
  if (next = node.next) delete node.next;
 
  // If there are multiple coincident points, remove just the point.
  if (previous) return (next ? previous.next = next : delete previous.next), this;
 
  // If this is the root point, remove it.
  if (!parent) return this._root = next, this;
 
  // Remove this leaf.
  next ? parent[i] = next : delete parent[i];
 
  // If the parent now contains exactly one leaf, collapse superfluous parents.
  if ((node = parent[0] || parent[1] || parent[2] || parent[3])
      && node === (parent[3] || parent[2] || parent[1] || parent[0])
      && !node.length) {
    if (retainer) retainer[j] = node;
    else this._root = node;
  }
 
  return this;
});
 
function removeAll(data) {
  for (var i = 0, n = data.length; i < n; ++i) this.remove(data[i]);
  return this;
}
 
 
/***/ }),
/* 1279 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony default export */ __webpack_exports__["a"] = (function() {
  return this._root;
});
 
 
/***/ }),
/* 1280 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony default export */ __webpack_exports__["a"] = (function() {
  var size = 0;
  this.visit(function(node) {
    if (!node.length) do ++size; while (node = node.next)
  });
  return size;
});
 
 
/***/ }),
/* 1281 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__quad_js__ = __webpack_require__(355);
 
 
/* harmony default export */ __webpack_exports__["a"] = (function(callback) {
  var quads = [], q, node = this._root, child, x0, y0, x1, y1;
  if (node) quads.push(new __WEBPACK_IMPORTED_MODULE_0__quad_js__["a" /* default */](node, this._x0, this._y0, this._x1, this._y1));
  while (q = quads.pop()) {
    if (!callback(node = q.node, x0 = q.x0, y0 = q.y0, x1 = q.x1, y1 = q.y1) && node.length) {
      var xm = (x0 + x1) / 2, ym = (y0 + y1) / 2;
      if (child = node[3]) quads.push(new __WEBPACK_IMPORTED_MODULE_0__quad_js__["a" /* default */](child, xm, ym, x1, y1));
      if (child = node[2]) quads.push(new __WEBPACK_IMPORTED_MODULE_0__quad_js__["a" /* default */](child, x0, ym, xm, y1));
      if (child = node[1]) quads.push(new __WEBPACK_IMPORTED_MODULE_0__quad_js__["a" /* default */](child, xm, y0, x1, ym));
      if (child = node[0]) quads.push(new __WEBPACK_IMPORTED_MODULE_0__quad_js__["a" /* default */](child, x0, y0, xm, ym));
    }
  }
  return this;
});
 
 
/***/ }),
/* 1282 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__quad_js__ = __webpack_require__(355);
 
 
/* harmony default export */ __webpack_exports__["a"] = (function(callback) {
  var quads = [], next = [], q;
  if (this._root) quads.push(new __WEBPACK_IMPORTED_MODULE_0__quad_js__["a" /* default */](this._root, this._x0, this._y0, this._x1, this._y1));
  while (q = quads.pop()) {
    var node = q.node;
    if (node.length) {
      var child, x0 = q.x0, y0 = q.y0, x1 = q.x1, y1 = q.y1, xm = (x0 + x1) / 2, ym = (y0 + y1) / 2;
      if (child = node[0]) quads.push(new __WEBPACK_IMPORTED_MODULE_0__quad_js__["a" /* default */](child, x0, y0, xm, ym));
      if (child = node[1]) quads.push(new __WEBPACK_IMPORTED_MODULE_0__quad_js__["a" /* default */](child, xm, y0, x1, ym));
      if (child = node[2]) quads.push(new __WEBPACK_IMPORTED_MODULE_0__quad_js__["a" /* default */](child, x0, ym, xm, y1));
      if (child = node[3]) quads.push(new __WEBPACK_IMPORTED_MODULE_0__quad_js__["a" /* default */](child, xm, ym, x1, y1));
    }
    next.push(q);
  }
  while (q = next.pop()) {
    callback(q.node, q.x0, q.y0, q.x1, q.y1);
  }
  return this;
});
 
 
/***/ }),
/* 1283 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["b"] = defaultX;
function defaultX(d) {
  return d[0];
}
 
/* harmony default export */ __webpack_exports__["a"] = (function(_) {
  return arguments.length ? (this._x = _, this) : this._x;
});
 
 
/***/ }),
/* 1284 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["b"] = defaultY;
function defaultY(d) {
  return d[1];
}
 
/* harmony default export */ __webpack_exports__["a"] = (function(_) {
  return arguments.length ? (this._y = _, this) : this._y;
});
 
 
/***/ }),
/* 1285 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__constant__ = __webpack_require__(151);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__jiggle__ = __webpack_require__(353);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_d3_collection__ = __webpack_require__(249);
 
 
 
 
function index(d) {
  return d.index;
}
 
function find(nodeById, nodeId) {
  var node = nodeById.get(nodeId);
  if (!node) throw new Error("missing: " + nodeId);
  return node;
}
 
/* harmony default export */ __webpack_exports__["a"] = (function(links) {
  var id = index,
      strength = defaultStrength,
      strengths,
      distance = Object(__WEBPACK_IMPORTED_MODULE_0__constant__["a" /* default */])(30),
      distances,
      nodes,
      count,
      bias,
      iterations = 1;
 
  if (links == null) links = [];
 
  function defaultStrength(link) {
    return 1 / Math.min(count[link.source.index], count[link.target.index]);
  }
 
  function force(alpha) {
    for (var k = 0, n = links.length; k < iterations; ++k) {
      for (var i = 0, link, source, target, x, y, l, b; i < n; ++i) {
        link = links[i], source = link.source, target = link.target;
        x = target.x + target.vx - source.x - source.vx || Object(__WEBPACK_IMPORTED_MODULE_1__jiggle__["a" /* default */])();
        y = target.y + target.vy - source.y - source.vy || Object(__WEBPACK_IMPORTED_MODULE_1__jiggle__["a" /* default */])();
        l = Math.sqrt(x * x + y * y);
        l = (l - distances[i]) / l * alpha * strengths[i];
        x *= l, y *= l;
        target.vx -= x * (b = bias[i]);
        target.vy -= y * b;
        source.vx += x * (b = 1 - b);
        source.vy += y * b;
      }
    }
  }
 
  function initialize() {
    if (!nodes) return;
 
    var i,
        n = nodes.length,
        m = links.length,
        nodeById = Object(__WEBPACK_IMPORTED_MODULE_2_d3_collection__["c" /* map */])(nodes, id),
        link;
 
    for (i = 0, count = new Array(n); i < m; ++i) {
      link = links[i], link.index = i;
      if (typeof link.source !== "object") link.source = find(nodeById, link.source);
      if (typeof link.target !== "object") link.target = find(nodeById, link.target);
      count[link.source.index] = (count[link.source.index] || 0) + 1;
      count[link.target.index] = (count[link.target.index] || 0) + 1;
    }
 
    for (i = 0, bias = new Array(m); i < m; ++i) {
      link = links[i], bias[i] = count[link.source.index] / (count[link.source.index] + count[link.target.index]);
    }
 
    strengths = new Array(m), initializeStrength();
    distances = new Array(m), initializeDistance();
  }
 
  function initializeStrength() {
    if (!nodes) return;
 
    for (var i = 0, n = links.length; i < n; ++i) {
      strengths[i] = +strength(links[i], i, links);
    }
  }
 
  function initializeDistance() {
    if (!nodes) return;
 
    for (var i = 0, n = links.length; i < n; ++i) {
      distances[i] = +distance(links[i], i, links);
    }
  }
 
  force.initialize = function(_) {
    nodes = _;
    initialize();
  };
 
  force.links = function(_) {
    return arguments.length ? (links = _, initialize(), force) : links;
  };
 
  force.id = function(_) {
    return arguments.length ? (id = _, force) : id;
  };
 
  force.iterations = function(_) {
    return arguments.length ? (iterations = +_, force) : iterations;
  };
 
  force.strength = function(_) {
    return arguments.length ? (strength = typeof _ === "function" ? _ : Object(__WEBPACK_IMPORTED_MODULE_0__constant__["a" /* default */])(+_), initializeStrength(), force) : strength;
  };
 
  force.distance = function(_) {
    return arguments.length ? (distance = typeof _ === "function" ? _ : Object(__WEBPACK_IMPORTED_MODULE_0__constant__["a" /* default */])(+_), initializeDistance(), force) : distance;
  };
 
  return force;
});
 
 
/***/ }),
/* 1286 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__constant__ = __webpack_require__(151);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__jiggle__ = __webpack_require__(353);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_d3_quadtree__ = __webpack_require__(354);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__simulation__ = __webpack_require__(734);
 
 
 
 
 
/* harmony default export */ __webpack_exports__["a"] = (function() {
  var nodes,
      node,
      alpha,
      strength = Object(__WEBPACK_IMPORTED_MODULE_0__constant__["a" /* default */])(-30),
      strengths,
      distanceMin2 = 1,
      distanceMax2 = Infinity,
      theta2 = 0.81;
 
  function force(_) {
    var i, n = nodes.length, tree = Object(__WEBPACK_IMPORTED_MODULE_2_d3_quadtree__["a" /* quadtree */])(nodes, __WEBPACK_IMPORTED_MODULE_3__simulation__["b" /* x */], __WEBPACK_IMPORTED_MODULE_3__simulation__["c" /* y */]).visitAfter(accumulate);
    for (alpha = _, i = 0; i < n; ++i) node = nodes[i], tree.visit(apply);
  }
 
  function initialize() {
    if (!nodes) return;
    var i, n = nodes.length, node;
    strengths = new Array(n);
    for (i = 0; i < n; ++i) node = nodes[i], strengths[node.index] = +strength(node, i, nodes);
  }
 
  function accumulate(quad) {
    var strength = 0, q, c, weight = 0, x, y, i;
 
    // For internal nodes, accumulate forces from child quadrants.
    if (quad.length) {
      for (x = y = i = 0; i < 4; ++i) {
        if ((q = quad[i]) && (c = Math.abs(q.value))) {
          strength += q.value, weight += c, x += c * q.x, y += c * q.y;
        }
      }
      quad.x = x / weight;
      quad.y = y / weight;
    }
 
    // For leaf nodes, accumulate forces from coincident quadrants.
    else {
      q = quad;
      q.x = q.data.x;
      q.y = q.data.y;
      do strength += strengths[q.data.index];
      while (q = q.next);
    }
 
    quad.value = strength;
  }
 
  function apply(quad, x1, _, x2) {
    if (!quad.value) return true;
 
    var x = quad.x - node.x,
        y = quad.y - node.y,
        w = x2 - x1,
        l = x * x + y * y;
 
    // Apply the Barnes-Hut approximation if possible.
    // Limit forces for very close nodes; randomize direction if coincident.
    if (w * w / theta2 < l) {
      if (l < distanceMax2) {
        if (x === 0) x = Object(__WEBPACK_IMPORTED_MODULE_1__jiggle__["a" /* default */])(), l += x * x;
        if (y === 0) y = Object(__WEBPACK_IMPORTED_MODULE_1__jiggle__["a" /* default */])(), l += y * y;
        if (l < distanceMin2) l = Math.sqrt(distanceMin2 * l);
        node.vx += x * quad.value * alpha / l;
        node.vy += y * quad.value * alpha / l;
      }
      return true;
    }
 
    // Otherwise, process points directly.
    else if (quad.length || l >= distanceMax2) return;
 
    // Limit forces for very close nodes; randomize direction if coincident.
    if (quad.data !== node || quad.next) {
      if (x === 0) x = Object(__WEBPACK_IMPORTED_MODULE_1__jiggle__["a" /* default */])(), l += x * x;
      if (y === 0) y = Object(__WEBPACK_IMPORTED_MODULE_1__jiggle__["a" /* default */])(), l += y * y;
      if (l < distanceMin2) l = Math.sqrt(distanceMin2 * l);
    }
 
    do if (quad.data !== node) {
      w = strengths[quad.data.index] * alpha / l;
      node.vx += x * w;
      node.vy += y * w;
    } while (quad = quad.next);
  }
 
  force.initialize = function(_) {
    nodes = _;
    initialize();
  };
 
  force.strength = function(_) {
    return arguments.length ? (strength = typeof _ === "function" ? _ : Object(__WEBPACK_IMPORTED_MODULE_0__constant__["a" /* default */])(+_), initialize(), force) : strength;
  };
 
  force.distanceMin = function(_) {
    return arguments.length ? (distanceMin2 = _ * _, force) : Math.sqrt(distanceMin2);
  };
 
  force.distanceMax = function(_) {
    return arguments.length ? (distanceMax2 = _ * _, force) : Math.sqrt(distanceMax2);
  };
 
  force.theta = function(_) {
    return arguments.length ? (theta2 = _ * _, force) : Math.sqrt(theta2);
  };
 
  return force;
});
 
 
/***/ }),
/* 1287 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__constant__ = __webpack_require__(151);
 
 
/* harmony default export */ __webpack_exports__["a"] = (function(radius, x, y) {
  var nodes,
      strength = Object(__WEBPACK_IMPORTED_MODULE_0__constant__["a" /* default */])(0.1),
      strengths,
      radiuses;
 
  if (typeof radius !== "function") radius = Object(__WEBPACK_IMPORTED_MODULE_0__constant__["a" /* default */])(+radius);
  if (x == null) x = 0;
  if (y == null) y = 0;
 
  function force(alpha) {
    for (var i = 0, n = nodes.length; i < n; ++i) {
      var node = nodes[i],
          dx = node.x - x || 1e-6,
          dy = node.y - y || 1e-6,
          r = Math.sqrt(dx * dx + dy * dy),
          k = (radiuses[i] - r) * strengths[i] * alpha / r;
      node.vx += dx * k;
      node.vy += dy * k;
    }
  }
 
  function initialize() {
    if (!nodes) return;
    var i, n = nodes.length;
    strengths = new Array(n);
    radiuses = new Array(n);
    for (i = 0; i < n; ++i) {
      radiuses[i] = +radius(nodes[i], i, nodes);
      strengths[i] = isNaN(radiuses[i]) ? 0 : +strength(nodes[i], i, nodes);
    }
  }
 
  force.initialize = function(_) {
    nodes = _, initialize();
  };
 
  force.strength = function(_) {
    return arguments.length ? (strength = typeof _ === "function" ? _ : Object(__WEBPACK_IMPORTED_MODULE_0__constant__["a" /* default */])(+_), initialize(), force) : strength;
  };
 
  force.radius = function(_) {
    return arguments.length ? (radius = typeof _ === "function" ? _ : Object(__WEBPACK_IMPORTED_MODULE_0__constant__["a" /* default */])(+_), initialize(), force) : radius;
  };
 
  force.x = function(_) {
    return arguments.length ? (x = +_, force) : x;
  };
 
  force.y = function(_) {
    return arguments.length ? (y = +_, force) : y;
  };
 
  return force;
});
 
 
/***/ }),
/* 1288 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__constant__ = __webpack_require__(151);
 
 
/* harmony default export */ __webpack_exports__["a"] = (function(x) {
  var strength = Object(__WEBPACK_IMPORTED_MODULE_0__constant__["a" /* default */])(0.1),
      nodes,
      strengths,
      xz;
 
  if (typeof x !== "function") x = Object(__WEBPACK_IMPORTED_MODULE_0__constant__["a" /* default */])(x == null ? 0 : +x);
 
  function force(alpha) {
    for (var i = 0, n = nodes.length, node; i < n; ++i) {
      node = nodes[i], node.vx += (xz[i] - node.x) * strengths[i] * alpha;
    }
  }
 
  function initialize() {
    if (!nodes) return;
    var i, n = nodes.length;
    strengths = new Array(n);
    xz = new Array(n);
    for (i = 0; i < n; ++i) {
      strengths[i] = isNaN(xz[i] = +x(nodes[i], i, nodes)) ? 0 : +strength(nodes[i], i, nodes);
    }
  }
 
  force.initialize = function(_) {
    nodes = _;
    initialize();
  };
 
  force.strength = function(_) {
    return arguments.length ? (strength = typeof _ === "function" ? _ : Object(__WEBPACK_IMPORTED_MODULE_0__constant__["a" /* default */])(+_), initialize(), force) : strength;
  };
 
  force.x = function(_) {
    return arguments.length ? (x = typeof _ === "function" ? _ : Object(__WEBPACK_IMPORTED_MODULE_0__constant__["a" /* default */])(+_), initialize(), force) : x;
  };
 
  return force;
});
 
 
/***/ }),
/* 1289 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__constant__ = __webpack_require__(151);
 
 
/* harmony default export */ __webpack_exports__["a"] = (function(y) {
  var strength = Object(__WEBPACK_IMPORTED_MODULE_0__constant__["a" /* default */])(0.1),
      nodes,
      strengths,
      yz;
 
  if (typeof y !== "function") y = Object(__WEBPACK_IMPORTED_MODULE_0__constant__["a" /* default */])(y == null ? 0 : +y);
 
  function force(alpha) {
    for (var i = 0, n = nodes.length, node; i < n; ++i) {
      node = nodes[i], node.vy += (yz[i] - node.y) * strengths[i] * alpha;
    }
  }
 
  function initialize() {
    if (!nodes) return;
    var i, n = nodes.length;
    strengths = new Array(n);
    yz = new Array(n);
    for (i = 0; i < n; ++i) {
      strengths[i] = isNaN(yz[i] = +y(nodes[i], i, nodes)) ? 0 : +strength(nodes[i], i, nodes);
    }
  }
 
  force.initialize = function(_) {
    nodes = _;
    initialize();
  };
 
  force.strength = function(_) {
    return arguments.length ? (strength = typeof _ === "function" ? _ : Object(__WEBPACK_IMPORTED_MODULE_0__constant__["a" /* default */])(+_), initialize(), force) : strength;
  };
 
  force.y = function(_) {
    return arguments.length ? (y = typeof _ === "function" ? _ : Object(__WEBPACK_IMPORTED_MODULE_0__constant__["a" /* default */])(+_), initialize(), force) : y;
  };
 
  return force;
});
 
 
/***/ }),
/* 1290 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return format; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return formatPrefix; });
/* harmony export (immutable) */ __webpack_exports__["a"] = defaultLocale;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__locale_js__ = __webpack_require__(735);
 
 
var locale;
var format;
var formatPrefix;
 
defaultLocale({
  decimal: ".",
  thousands: ",",
  grouping: [3],
  currency: ["$", ""],
  minus: "-"
});
 
function defaultLocale(definition) {
  locale = Object(__WEBPACK_IMPORTED_MODULE_0__locale_js__["a" /* default */])(definition);
  format = locale.format;
  formatPrefix = locale.formatPrefix;
  return locale;
}
 
 
/***/ }),
/* 1291 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony default export */ __webpack_exports__["a"] = (function(grouping, thousands) {
  return function(value, width) {
    var i = value.length,
        t = [],
        j = 0,
        g = grouping[0],
        length = 0;
 
    while (i > 0 && g > 0) {
      if (length + g + 1 > width) g = Math.max(1, width - length);
      t.push(value.substring(i -= g, i + g));
      if ((length += g + 1) > width) break;
      g = grouping[j = (j + 1) % grouping.length];
    }
 
    return t.reverse().join(thousands);
  };
});
 
 
/***/ }),
/* 1292 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony default export */ __webpack_exports__["a"] = (function(numerals) {
  return function(value) {
    return value.replace(/[0-9]/g, function(i) {
      return numerals[+i];
    });
  };
});
 
 
/***/ }),
/* 1293 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
// Trims insignificant zeros, e.g., replaces 1.2000k with 1.2k.
/* harmony default export */ __webpack_exports__["a"] = (function(s) {
  out: for (var n = s.length, i = 1, i0 = -1, i1; i < n; ++i) {
    switch (s[i]) {
      case ".": i0 = i1 = i; break;
      case "0": if (i0 === 0) i0 = i; i1 = i; break;
      default: if (!+s[i]) break out; if (i0 > 0) i0 = 0; break;
    }
  }
  return i0 > 0 ? s.slice(0, i0) + s.slice(i1 + 1) : s;
});
 
 
/***/ }),
/* 1294 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__formatDecimal_js__ = __webpack_require__(251);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__formatPrefixAuto_js__ = __webpack_require__(737);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__formatRounded_js__ = __webpack_require__(1295);
 
 
 
 
/* harmony default export */ __webpack_exports__["a"] = ({
  "%": function(x, p) { return (x * 100).toFixed(p); },
  "b": function(x) { return Math.round(x).toString(2); },
  "c": function(x) { return x + ""; },
  "d": __WEBPACK_IMPORTED_MODULE_0__formatDecimal_js__["a" /* default */],
  "e": function(x, p) { return x.toExponential(p); },
  "f": function(x, p) { return x.toFixed(p); },
  "g": function(x, p) { return x.toPrecision(p); },
  "o": function(x) { return Math.round(x).toString(8); },
  "p": function(x, p) { return Object(__WEBPACK_IMPORTED_MODULE_2__formatRounded_js__["a" /* default */])(x * 100, p); },
  "r": __WEBPACK_IMPORTED_MODULE_2__formatRounded_js__["a" /* default */],
  "s": __WEBPACK_IMPORTED_MODULE_1__formatPrefixAuto_js__["a" /* default */],
  "X": function(x) { return Math.round(x).toString(16).toUpperCase(); },
  "x": function(x) { return Math.round(x).toString(16); }
});
 
 
/***/ }),
/* 1295 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__formatDecimal_js__ = __webpack_require__(251);
 
 
/* harmony default export */ __webpack_exports__["a"] = (function(x, p) {
  var d = Object(__WEBPACK_IMPORTED_MODULE_0__formatDecimal_js__["b" /* formatDecimalParts */])(x, p);
  if (!d) return x + "";
  var coefficient = d[0],
      exponent = d[1];
  return exponent < 0 ? "0." + new Array(-exponent).join("0") + coefficient
      : coefficient.length > exponent + 1 ? coefficient.slice(0, exponent + 1) + "." + coefficient.slice(exponent + 1)
      : coefficient + new Array(exponent - coefficient.length + 2).join("0");
});
 
 
/***/ }),
/* 1296 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony default export */ __webpack_exports__["a"] = (function(x) {
  return x;
});
 
 
/***/ }),
/* 1297 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__exponent_js__ = __webpack_require__(250);
 
 
/* harmony default export */ __webpack_exports__["a"] = (function(step) {
  return Math.max(0, -Object(__WEBPACK_IMPORTED_MODULE_0__exponent_js__["a" /* default */])(Math.abs(step)));
});
 
 
/***/ }),
/* 1298 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__exponent_js__ = __webpack_require__(250);
 
 
/* harmony default export */ __webpack_exports__["a"] = (function(step, value) {
  return Math.max(0, Math.max(-8, Math.min(8, Math.floor(Object(__WEBPACK_IMPORTED_MODULE_0__exponent_js__["a" /* default */])(value) / 3))) * 3 - Object(__WEBPACK_IMPORTED_MODULE_0__exponent_js__["a" /* default */])(Math.abs(step)));
});
 
 
/***/ }),
/* 1299 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__exponent_js__ = __webpack_require__(250);
 
 
/* harmony default export */ __webpack_exports__["a"] = (function(step, max) {
  step = Math.abs(step), max = Math.abs(max) - step;
  return Math.max(0, Object(__WEBPACK_IMPORTED_MODULE_0__exponent_js__["a" /* default */])(max) - Object(__WEBPACK_IMPORTED_MODULE_0__exponent_js__["a" /* default */])(step)) + 1;
});
 
 
/***/ }),
/* 1300 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__area_js__ = __webpack_require__(738);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return __WEBPACK_IMPORTED_MODULE_0__area_js__["c"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__bounds_js__ = __webpack_require__(1301);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return __WEBPACK_IMPORTED_MODULE_1__bounds_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__centroid_js__ = __webpack_require__(1302);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return __WEBPACK_IMPORTED_MODULE_2__centroid_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__circle_js__ = __webpack_require__(739);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return __WEBPACK_IMPORTED_MODULE_3__circle_js__["b"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__clip_antimeridian_js__ = __webpack_require__(741);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "k", function() { return __WEBPACK_IMPORTED_MODULE_4__clip_antimeridian_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__clip_circle_js__ = __webpack_require__(747);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "l", function() { return __WEBPACK_IMPORTED_MODULE_5__clip_circle_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__clip_extent_js__ = __webpack_require__(1304);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "m", function() { return __WEBPACK_IMPORTED_MODULE_6__clip_extent_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__clip_rectangle_js__ = __webpack_require__(253);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "n", function() { return __WEBPACK_IMPORTED_MODULE_7__clip_rectangle_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__contains_js__ = __webpack_require__(1306);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "u", function() { return __WEBPACK_IMPORTED_MODULE_8__contains_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__distance_js__ = __webpack_require__(748);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "v", function() { return __WEBPACK_IMPORTED_MODULE_9__distance_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__graticule_js__ = __webpack_require__(1307);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "C", function() { return __WEBPACK_IMPORTED_MODULE_10__graticule_js__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "D", function() { return __WEBPACK_IMPORTED_MODULE_10__graticule_js__["b"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__interpolate_js__ = __webpack_require__(1308);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "F", function() { return __WEBPACK_IMPORTED_MODULE_11__interpolate_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__length_js__ = __webpack_require__(749);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "G", function() { return __WEBPACK_IMPORTED_MODULE_12__length_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__path_index_js__ = __webpack_require__(1309);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "N", function() { return __WEBPACK_IMPORTED_MODULE_13__path_index_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__projection_albers_js__ = __webpack_require__(751);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_14__projection_albers_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__projection_albersUsa_js__ = __webpack_require__(1317);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return __WEBPACK_IMPORTED_MODULE_15__projection_albersUsa_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__projection_azimuthalEqualArea_js__ = __webpack_require__(1318);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return __WEBPACK_IMPORTED_MODULE_16__projection_azimuthalEqualArea_js__["b"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return __WEBPACK_IMPORTED_MODULE_16__projection_azimuthalEqualArea_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_17__projection_azimuthalEquidistant_js__ = __webpack_require__(1319);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return __WEBPACK_IMPORTED_MODULE_17__projection_azimuthalEquidistant_js__["b"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return __WEBPACK_IMPORTED_MODULE_17__projection_azimuthalEquidistant_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_18__projection_conicConformal_js__ = __webpack_require__(1320);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "o", function() { return __WEBPACK_IMPORTED_MODULE_18__projection_conicConformal_js__["b"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "p", function() { return __WEBPACK_IMPORTED_MODULE_18__projection_conicConformal_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_19__projection_conicEqualArea_js__ = __webpack_require__(358);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "q", function() { return __WEBPACK_IMPORTED_MODULE_19__projection_conicEqualArea_js__["b"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "r", function() { return __WEBPACK_IMPORTED_MODULE_19__projection_conicEqualArea_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_20__projection_conicEquidistant_js__ = __webpack_require__(1321);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "s", function() { return __WEBPACK_IMPORTED_MODULE_20__projection_conicEquidistant_js__["b"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "t", function() { return __WEBPACK_IMPORTED_MODULE_20__projection_conicEquidistant_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_21__projection_equalEarth_js__ = __webpack_require__(1322);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "w", function() { return __WEBPACK_IMPORTED_MODULE_21__projection_equalEarth_js__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "x", function() { return __WEBPACK_IMPORTED_MODULE_21__projection_equalEarth_js__["b"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_22__projection_equirectangular_js__ = __webpack_require__(752);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "y", function() { return __WEBPACK_IMPORTED_MODULE_22__projection_equirectangular_js__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "z", function() { return __WEBPACK_IMPORTED_MODULE_22__projection_equirectangular_js__["b"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_23__projection_gnomonic_js__ = __webpack_require__(1323);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "A", function() { return __WEBPACK_IMPORTED_MODULE_23__projection_gnomonic_js__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "B", function() { return __WEBPACK_IMPORTED_MODULE_23__projection_gnomonic_js__["b"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_24__projection_identity_js__ = __webpack_require__(1324);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "E", function() { return __WEBPACK_IMPORTED_MODULE_24__projection_identity_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_25__projection_index_js__ = __webpack_require__(75);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "O", function() { return __WEBPACK_IMPORTED_MODULE_25__projection_index_js__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "P", function() { return __WEBPACK_IMPORTED_MODULE_25__projection_index_js__["b"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_26__projection_mercator_js__ = __webpack_require__(361);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "H", function() { return __WEBPACK_IMPORTED_MODULE_26__projection_mercator_js__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "I", function() { return __WEBPACK_IMPORTED_MODULE_26__projection_mercator_js__["c"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_27__projection_naturalEarth1_js__ = __webpack_require__(1325);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "J", function() { return __WEBPACK_IMPORTED_MODULE_27__projection_naturalEarth1_js__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "K", function() { return __WEBPACK_IMPORTED_MODULE_27__projection_naturalEarth1_js__["b"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_28__projection_orthographic_js__ = __webpack_require__(1326);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "L", function() { return __WEBPACK_IMPORTED_MODULE_28__projection_orthographic_js__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "M", function() { return __WEBPACK_IMPORTED_MODULE_28__projection_orthographic_js__["b"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_29__projection_stereographic_js__ = __webpack_require__(1327);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "R", function() { return __WEBPACK_IMPORTED_MODULE_29__projection_stereographic_js__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "S", function() { return __WEBPACK_IMPORTED_MODULE_29__projection_stereographic_js__["b"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_30__projection_transverseMercator_js__ = __webpack_require__(1328);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "V", function() { return __WEBPACK_IMPORTED_MODULE_30__projection_transverseMercator_js__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "W", function() { return __WEBPACK_IMPORTED_MODULE_30__projection_transverseMercator_js__["b"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_31__rotation_js__ = __webpack_require__(252);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Q", function() { return __WEBPACK_IMPORTED_MODULE_31__rotation_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_32__stream_js__ = __webpack_require__(121);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "T", function() { return __WEBPACK_IMPORTED_MODULE_32__stream_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_33__transform_js__ = __webpack_require__(254);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "U", function() { return __WEBPACK_IMPORTED_MODULE_33__transform_js__["a"]; });
 
 
 
 
 
 
 // DEPRECATED! Use d3.geoIdentity().clipExtent(…).
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
/***/ }),
/* 1301 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__adder_js__ = __webpack_require__(152);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__area_js__ = __webpack_require__(738);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__cartesian_js__ = __webpack_require__(188);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__math_js__ = __webpack_require__(19);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__stream_js__ = __webpack_require__(121);
 
 
 
 
 
 
var lambda0, phi0, lambda1, phi1, // bounds
    lambda2, // previous lambda-coordinate
    lambda00, phi00, // first point
    p0, // previous 3D point
    deltaSum = Object(__WEBPACK_IMPORTED_MODULE_0__adder_js__["a" /* default */])(),
    ranges,
    range;
 
var boundsStream = {
  point: boundsPoint,
  lineStart: boundsLineStart,
  lineEnd: boundsLineEnd,
  polygonStart: function() {
    boundsStream.point = boundsRingPoint;
    boundsStream.lineStart = boundsRingStart;
    boundsStream.lineEnd = boundsRingEnd;
    deltaSum.reset();
    __WEBPACK_IMPORTED_MODULE_1__area_js__["b" /* areaStream */].polygonStart();
  },
  polygonEnd: function() {
    __WEBPACK_IMPORTED_MODULE_1__area_js__["b" /* areaStream */].polygonEnd();
    boundsStream.point = boundsPoint;
    boundsStream.lineStart = boundsLineStart;
    boundsStream.lineEnd = boundsLineEnd;
    if (__WEBPACK_IMPORTED_MODULE_1__area_js__["a" /* areaRingSum */] < 0) lambda0 = -(lambda1 = 180), phi0 = -(phi1 = 90);
    else if (deltaSum > __WEBPACK_IMPORTED_MODULE_3__math_js__["i" /* epsilon */]) phi1 = 90;
    else if (deltaSum < -__WEBPACK_IMPORTED_MODULE_3__math_js__["i" /* epsilon */]) phi0 = -90;
    range[0] = lambda0, range[1] = lambda1;
  },
  sphere: function() {
    lambda0 = -(lambda1 = 180), phi0 = -(phi1 = 90);
  }
};
 
function boundsPoint(lambda, phi) {
  ranges.push(range = [lambda0 = lambda, lambda1 = lambda]);
  if (phi < phi0) phi0 = phi;
  if (phi > phi1) phi1 = phi;
}
 
function linePoint(lambda, phi) {
  var p = Object(__WEBPACK_IMPORTED_MODULE_2__cartesian_js__["a" /* cartesian */])([lambda * __WEBPACK_IMPORTED_MODULE_3__math_js__["r" /* radians */], phi * __WEBPACK_IMPORTED_MODULE_3__math_js__["r" /* radians */]]);
  if (p0) {
    var normal = Object(__WEBPACK_IMPORTED_MODULE_2__cartesian_js__["c" /* cartesianCross */])(p0, p),
        equatorial = [normal[1], -normal[0], 0],
        inflection = Object(__WEBPACK_IMPORTED_MODULE_2__cartesian_js__["c" /* cartesianCross */])(equatorial, normal);
    Object(__WEBPACK_IMPORTED_MODULE_2__cartesian_js__["e" /* cartesianNormalizeInPlace */])(inflection);
    inflection = Object(__WEBPACK_IMPORTED_MODULE_2__cartesian_js__["g" /* spherical */])(inflection);
    var delta = lambda - lambda2,
        sign = delta > 0 ? 1 : -1,
        lambdai = inflection[0] * __WEBPACK_IMPORTED_MODULE_3__math_js__["h" /* degrees */] * sign,
        phii,
        antimeridian = Object(__WEBPACK_IMPORTED_MODULE_3__math_js__["a" /* abs */])(delta) > 180;
    if (antimeridian ^ (sign * lambda2 < lambdai && lambdai < sign * lambda)) {
      phii = inflection[1] * __WEBPACK_IMPORTED_MODULE_3__math_js__["h" /* degrees */];
      if (phii > phi1) phi1 = phii;
    } else if (lambdai = (lambdai + 360) % 360 - 180, antimeridian ^ (sign * lambda2 < lambdai && lambdai < sign * lambda)) {
      phii = -inflection[1] * __WEBPACK_IMPORTED_MODULE_3__math_js__["h" /* degrees */];
      if (phii < phi0) phi0 = phii;
    } else {
      if (phi < phi0) phi0 = phi;
      if (phi > phi1) phi1 = phi;
    }
    if (antimeridian) {
      if (lambda < lambda2) {
        if (angle(lambda0, lambda) > angle(lambda0, lambda1)) lambda1 = lambda;
      } else {
        if (angle(lambda, lambda1) > angle(lambda0, lambda1)) lambda0 = lambda;
      }
    } else {
      if (lambda1 >= lambda0) {
        if (lambda < lambda0) lambda0 = lambda;
        if (lambda > lambda1) lambda1 = lambda;
      } else {
        if (lambda > lambda2) {
          if (angle(lambda0, lambda) > angle(lambda0, lambda1)) lambda1 = lambda;
        } else {
          if (angle(lambda, lambda1) > angle(lambda0, lambda1)) lambda0 = lambda;
        }
      }
    }
  } else {
    ranges.push(range = [lambda0 = lambda, lambda1 = lambda]);
  }
  if (phi < phi0) phi0 = phi;
  if (phi > phi1) phi1 = phi;
  p0 = p, lambda2 = lambda;
}
 
function boundsLineStart() {
  boundsStream.point = linePoint;
}
 
function boundsLineEnd() {
  range[0] = lambda0, range[1] = lambda1;
  boundsStream.point = boundsPoint;
  p0 = null;
}
 
function boundsRingPoint(lambda, phi) {
  if (p0) {
    var delta = lambda - lambda2;
    deltaSum.add(Object(__WEBPACK_IMPORTED_MODULE_3__math_js__["a" /* abs */])(delta) > 180 ? delta + (delta > 0 ? 360 : -360) : delta);
  } else {
    lambda00 = lambda, phi00 = phi;
  }
  __WEBPACK_IMPORTED_MODULE_1__area_js__["b" /* areaStream */].point(lambda, phi);
  linePoint(lambda, phi);
}
 
function boundsRingStart() {
  __WEBPACK_IMPORTED_MODULE_1__area_js__["b" /* areaStream */].lineStart();
}
 
function boundsRingEnd() {
  boundsRingPoint(lambda00, phi00);
  __WEBPACK_IMPORTED_MODULE_1__area_js__["b" /* areaStream */].lineEnd();
  if (Object(__WEBPACK_IMPORTED_MODULE_3__math_js__["a" /* abs */])(deltaSum) > __WEBPACK_IMPORTED_MODULE_3__math_js__["i" /* epsilon */]) lambda0 = -(lambda1 = 180);
  range[0] = lambda0, range[1] = lambda1;
  p0 = null;
}
 
// Finds the left-right distance between two longitudes.
// This is almost the same as (lambda1 - lambda0 + 360°) % 360°, except that we want
// the distance between ±180° to be 360°.
function angle(lambda0, lambda1) {
  return (lambda1 -= lambda0) < 0 ? lambda1 + 360 : lambda1;
}
 
function rangeCompare(a, b) {
  return a[0] - b[0];
}
 
function rangeContains(range, x) {
  return range[0] <= range[1] ? range[0] <= x && x <= range[1] : x < range[0] || range[1] < x;
}
 
/* harmony default export */ __webpack_exports__["a"] = (function(feature) {
  var i, n, a, b, merged, deltaMax, delta;
 
  phi1 = lambda1 = -(lambda0 = phi0 = Infinity);
  ranges = [];
  Object(__WEBPACK_IMPORTED_MODULE_4__stream_js__["a" /* default */])(feature, boundsStream);
 
  // First, sort ranges by their minimum longitudes.
  if (n = ranges.length) {
    ranges.sort(rangeCompare);
 
    // Then, merge any ranges that overlap.
    for (i = 1, a = ranges[0], merged = [a]; i < n; ++i) {
      b = ranges[i];
      if (rangeContains(a, b[0]) || rangeContains(a, b[1])) {
        if (angle(a[0], b[1]) > angle(a[0], a[1])) a[1] = b[1];
        if (angle(b[0], a[1]) > angle(a[0], a[1])) a[0] = b[0];
      } else {
        merged.push(a = b);
      }
    }
 
    // Finally, find the largest gap between the merged ranges.
    // The final bounding box will be the inverse of this gap.
    for (deltaMax = -Infinity, n = merged.length - 1, i = 0, a = merged[n]; i <= n; a = b, ++i) {
      b = merged[i];
      if ((delta = angle(a[1], b[0])) > deltaMax) deltaMax = delta, lambda0 = b[0], lambda1 = a[1];
    }
  }
 
  ranges = range = null;
 
  return lambda0 === Infinity || phi0 === Infinity
      ? [[NaN, NaN], [NaN, NaN]]
      : [[lambda0, phi0], [lambda1, phi1]];
});
 
 
/***/ }),
/* 1302 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__math_js__ = __webpack_require__(19);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__noop_js__ = __webpack_require__(102);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__stream_js__ = __webpack_require__(121);
 
 
 
 
var W0, W1,
    X0, Y0, Z0,
    X1, Y1, Z1,
    X2, Y2, Z2,
    lambda00, phi00, // first point
    x0, y0, z0; // previous point
 
var centroidStream = {
  sphere: __WEBPACK_IMPORTED_MODULE_1__noop_js__["a" /* default */],
  point: centroidPoint,
  lineStart: centroidLineStart,
  lineEnd: centroidLineEnd,
  polygonStart: function() {
    centroidStream.lineStart = centroidRingStart;
    centroidStream.lineEnd = centroidRingEnd;
  },
  polygonEnd: function() {
    centroidStream.lineStart = centroidLineStart;
    centroidStream.lineEnd = centroidLineEnd;
  }
};
 
// Arithmetic mean of Cartesian vectors.
function centroidPoint(lambda, phi) {
  lambda *= __WEBPACK_IMPORTED_MODULE_0__math_js__["r" /* radians */], phi *= __WEBPACK_IMPORTED_MODULE_0__math_js__["r" /* radians */];
  var cosPhi = Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["g" /* cos */])(phi);
  centroidPointCartesian(cosPhi * Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["g" /* cos */])(lambda), cosPhi * Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["t" /* sin */])(lambda), Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["t" /* sin */])(phi));
}
 
function centroidPointCartesian(x, y, z) {
  ++W0;
  X0 += (x - X0) / W0;
  Y0 += (y - Y0) / W0;
  Z0 += (z - Z0) / W0;
}
 
function centroidLineStart() {
  centroidStream.point = centroidLinePointFirst;
}
 
function centroidLinePointFirst(lambda, phi) {
  lambda *= __WEBPACK_IMPORTED_MODULE_0__math_js__["r" /* radians */], phi *= __WEBPACK_IMPORTED_MODULE_0__math_js__["r" /* radians */];
  var cosPhi = Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["g" /* cos */])(phi);
  x0 = cosPhi * Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["g" /* cos */])(lambda);
  y0 = cosPhi * Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["t" /* sin */])(lambda);
  z0 = Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["t" /* sin */])(phi);
  centroidStream.point = centroidLinePoint;
  centroidPointCartesian(x0, y0, z0);
}
 
function centroidLinePoint(lambda, phi) {
  lambda *= __WEBPACK_IMPORTED_MODULE_0__math_js__["r" /* radians */], phi *= __WEBPACK_IMPORTED_MODULE_0__math_js__["r" /* radians */];
  var cosPhi = Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["g" /* cos */])(phi),
      x = cosPhi * Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["g" /* cos */])(lambda),
      y = cosPhi * Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["t" /* sin */])(lambda),
      z = Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["t" /* sin */])(phi),
      w = Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["e" /* atan2 */])(Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["u" /* sqrt */])((w = y0 * z - z0 * y) * w + (w = z0 * x - x0 * z) * w + (w = x0 * y - y0 * x) * w), x0 * x + y0 * y + z0 * z);
  W1 += w;
  X1 += w * (x0 + (x0 = x));
  Y1 += w * (y0 + (y0 = y));
  Z1 += w * (z0 + (z0 = z));
  centroidPointCartesian(x0, y0, z0);
}
 
function centroidLineEnd() {
  centroidStream.point = centroidPoint;
}
 
// See J. E. Brock, The Inertia Tensor for a Spherical Triangle,
// J. Applied Mechanics 42, 239 (1975).
function centroidRingStart() {
  centroidStream.point = centroidRingPointFirst;
}
 
function centroidRingEnd() {
  centroidRingPoint(lambda00, phi00);
  centroidStream.point = centroidPoint;
}
 
function centroidRingPointFirst(lambda, phi) {
  lambda00 = lambda, phi00 = phi;
  lambda *= __WEBPACK_IMPORTED_MODULE_0__math_js__["r" /* radians */], phi *= __WEBPACK_IMPORTED_MODULE_0__math_js__["r" /* radians */];
  centroidStream.point = centroidRingPoint;
  var cosPhi = Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["g" /* cos */])(phi);
  x0 = cosPhi * Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["g" /* cos */])(lambda);
  y0 = cosPhi * Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["t" /* sin */])(lambda);
  z0 = Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["t" /* sin */])(phi);
  centroidPointCartesian(x0, y0, z0);
}
 
function centroidRingPoint(lambda, phi) {
  lambda *= __WEBPACK_IMPORTED_MODULE_0__math_js__["r" /* radians */], phi *= __WEBPACK_IMPORTED_MODULE_0__math_js__["r" /* radians */];
  var cosPhi = Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["g" /* cos */])(phi),
      x = cosPhi * Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["g" /* cos */])(lambda),
      y = cosPhi * Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["t" /* sin */])(lambda),
      z = Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["t" /* sin */])(phi),
      cx = y0 * z - z0 * y,
      cy = z0 * x - x0 * z,
      cz = x0 * y - y0 * x,
      m = Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["u" /* sqrt */])(cx * cx + cy * cy + cz * cz),
      w = Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["c" /* asin */])(m), // line weight = angle
      v = m && -w / m; // area weight multiplier
  X2 += v * cx;
  Y2 += v * cy;
  Z2 += v * cz;
  W1 += w;
  X1 += w * (x0 + (x0 = x));
  Y1 += w * (y0 + (y0 = y));
  Z1 += w * (z0 + (z0 = z));
  centroidPointCartesian(x0, y0, z0);
}
 
/* harmony default export */ __webpack_exports__["a"] = (function(object) {
  W0 = W1 =
  X0 = Y0 = Z0 =
  X1 = Y1 = Z1 =
  X2 = Y2 = Z2 = 0;
  Object(__WEBPACK_IMPORTED_MODULE_2__stream_js__["a" /* default */])(object, centroidStream);
 
  var x = X2,
      y = Y2,
      z = Z2,
      m = x * x + y * y + z * z;
 
  // If the area-weighted ccentroid is undefined, fall back to length-weighted ccentroid.
  if (m < __WEBPACK_IMPORTED_MODULE_0__math_js__["j" /* epsilon2 */]) {
    x = X1, y = Y1, z = Z1;
    // If the feature has zero length, fall back to arithmetic mean of point vectors.
    if (W1 < __WEBPACK_IMPORTED_MODULE_0__math_js__["i" /* epsilon */]) x = X0, y = Y0, z = Z0;
    m = x * x + y * y + z * z;
    // If the feature still has an undefined ccentroid, then return.
    if (m < __WEBPACK_IMPORTED_MODULE_0__math_js__["j" /* epsilon2 */]) return [NaN, NaN];
  }
 
  return [Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["e" /* atan2 */])(y, x) * __WEBPACK_IMPORTED_MODULE_0__math_js__["h" /* degrees */], Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["c" /* asin */])(z / Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["u" /* sqrt */])(m)) * __WEBPACK_IMPORTED_MODULE_0__math_js__["h" /* degrees */]];
});
 
 
/***/ }),
/* 1303 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony default export */ __webpack_exports__["a"] = (function(x) {
  return function() {
    return x;
  };
});
 
 
/***/ }),
/* 1304 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__rectangle_js__ = __webpack_require__(253);
 
 
/* harmony default export */ __webpack_exports__["a"] = (function() {
  var x0 = 0,
      y0 = 0,
      x1 = 960,
      y1 = 500,
      cache,
      cacheStream,
      clip;
 
  return clip = {
    stream: function(stream) {
      return cache && cacheStream === stream ? cache : cache = Object(__WEBPACK_IMPORTED_MODULE_0__rectangle_js__["a" /* default */])(x0, y0, x1, y1)(cacheStream = stream);
    },
    extent: function(_) {
      return arguments.length ? (x0 = +_[0][0], y0 = +_[0][1], x1 = +_[1][0], y1 = +_[1][1], cache = cacheStream = null, clip) : [[x0, y0], [x1, y1]];
    }
  };
});
 
 
/***/ }),
/* 1305 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony default export */ __webpack_exports__["a"] = (function(a, b, x0, y0, x1, y1) {
  var ax = a[0],
      ay = a[1],
      bx = b[0],
      by = b[1],
      t0 = 0,
      t1 = 1,
      dx = bx - ax,
      dy = by - ay,
      r;
 
  r = x0 - ax;
  if (!dx && r > 0) return;
  r /= dx;
  if (dx < 0) {
    if (r < t0) return;
    if (r < t1) t1 = r;
  } else if (dx > 0) {
    if (r > t1) return;
    if (r > t0) t0 = r;
  }
 
  r = x1 - ax;
  if (!dx && r < 0) return;
  r /= dx;
  if (dx < 0) {
    if (r > t1) return;
    if (r > t0) t0 = r;
  } else if (dx > 0) {
    if (r < t0) return;
    if (r < t1) t1 = r;
  }
 
  r = y0 - ay;
  if (!dy && r > 0) return;
  r /= dy;
  if (dy < 0) {
    if (r < t0) return;
    if (r < t1) t1 = r;
  } else if (dy > 0) {
    if (r > t1) return;
    if (r > t0) t0 = r;
  }
 
  r = y1 - ay;
  if (!dy && r < 0) return;
  r /= dy;
  if (dy < 0) {
    if (r > t1) return;
    if (r > t0) t0 = r;
  } else if (dy > 0) {
    if (r < t0) return;
    if (r < t1) t1 = r;
  }
 
  if (t0 > 0) a[0] = ax + t0 * dx, a[1] = ay + t0 * dy;
  if (t1 < 1) b[0] = ax + t1 * dx, b[1] = ay + t1 * dy;
  return true;
});
 
 
/***/ }),
/* 1306 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__polygonContains_js__ = __webpack_require__(746);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__distance_js__ = __webpack_require__(748);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__math_js__ = __webpack_require__(19);
 
 
 
 
var containsObjectType = {
  Feature: function(object, point) {
    return containsGeometry(object.geometry, point);
  },
  FeatureCollection: function(object, point) {
    var features = object.features, i = -1, n = features.length;
    while (++i < n) if (containsGeometry(features[i].geometry, point)) return true;
    return false;
  }
};
 
var containsGeometryType = {
  Sphere: function() {
    return true;
  },
  Point: function(object, point) {
    return containsPoint(object.coordinates, point);
  },
  MultiPoint: function(object, point) {
    var coordinates = object.coordinates, i = -1, n = coordinates.length;
    while (++i < n) if (containsPoint(coordinates[i], point)) return true;
    return false;
  },
  LineString: function(object, point) {
    return containsLine(object.coordinates, point);
  },
  MultiLineString: function(object, point) {
    var coordinates = object.coordinates, i = -1, n = coordinates.length;
    while (++i < n) if (containsLine(coordinates[i], point)) return true;
    return false;
  },
  Polygon: function(object, point) {
    return containsPolygon(object.coordinates, point);
  },
  MultiPolygon: function(object, point) {
    var coordinates = object.coordinates, i = -1, n = coordinates.length;
    while (++i < n) if (containsPolygon(coordinates[i], point)) return true;
    return false;
  },
  GeometryCollection: function(object, point) {
    var geometries = object.geometries, i = -1, n = geometries.length;
    while (++i < n) if (containsGeometry(geometries[i], point)) return true;
    return false;
  }
};
 
function containsGeometry(geometry, point) {
  return geometry && containsGeometryType.hasOwnProperty(geometry.type)
      ? containsGeometryType[geometry.type](geometry, point)
      : false;
}
 
function containsPoint(coordinates, point) {
  return Object(__WEBPACK_IMPORTED_MODULE_1__distance_js__["a" /* default */])(coordinates, point) === 0;
}
 
function containsLine(coordinates, point) {
  var ao, bo, ab;
  for (var i = 0, n = coordinates.length; i < n; i++) {
    bo = Object(__WEBPACK_IMPORTED_MODULE_1__distance_js__["a" /* default */])(coordinates[i], point);
    if (bo === 0) return true;
    if (i > 0) {
      ab = Object(__WEBPACK_IMPORTED_MODULE_1__distance_js__["a" /* default */])(coordinates[i], coordinates[i - 1]);
      if (
        ab > 0 &&
        ao <= ab &&
        bo <= ab &&
        (ao + bo - ab) * (1 - Math.pow((ao - bo) / ab, 2)) < __WEBPACK_IMPORTED_MODULE_2__math_js__["j" /* epsilon2 */] * ab
      )
        return true;
    }
    ao = bo;
  }
  return false;
}
 
function containsPolygon(coordinates, point) {
  return !!Object(__WEBPACK_IMPORTED_MODULE_0__polygonContains_js__["a" /* default */])(coordinates.map(ringRadians), pointRadians(point));
}
 
function ringRadians(ring) {
  return ring = ring.map(pointRadians), ring.pop(), ring;
}
 
function pointRadians(point) {
  return [point[0] * __WEBPACK_IMPORTED_MODULE_2__math_js__["r" /* radians */], point[1] * __WEBPACK_IMPORTED_MODULE_2__math_js__["r" /* radians */]];
}
 
/* harmony default export */ __webpack_exports__["a"] = (function(object, point) {
  return (object && containsObjectType.hasOwnProperty(object.type)
      ? containsObjectType[object.type]
      : containsGeometry)(object, point);
});
 
 
/***/ }),
/* 1307 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = graticule;
/* harmony export (immutable) */ __webpack_exports__["b"] = graticule10;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_d3_array__ = __webpack_require__(44);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__math_js__ = __webpack_require__(19);
 
 
 
function graticuleX(y0, y1, dy) {
  var y = Object(__WEBPACK_IMPORTED_MODULE_0_d3_array__["s" /* range */])(y0, y1 - __WEBPACK_IMPORTED_MODULE_1__math_js__["i" /* epsilon */], dy).concat(y1);
  return function(x) { return y.map(function(y) { return [x, y]; }); };
}
 
function graticuleY(x0, x1, dx) {
  var x = Object(__WEBPACK_IMPORTED_MODULE_0_d3_array__["s" /* range */])(x0, x1 - __WEBPACK_IMPORTED_MODULE_1__math_js__["i" /* epsilon */], dx).concat(x1);
  return function(y) { return x.map(function(x) { return [x, y]; }); };
}
 
function graticule() {
  var x1, x0, X1, X0,
      y1, y0, Y1, Y0,
      dx = 10, dy = dx, DX = 90, DY = 360,
      x, y, X, Y,
      precision = 2.5;
 
  function graticule() {
    return {type: "MultiLineString", coordinates: lines()};
  }
 
  function lines() {
    return Object(__WEBPACK_IMPORTED_MODULE_0_d3_array__["s" /* range */])(Object(__WEBPACK_IMPORTED_MODULE_1__math_js__["f" /* ceil */])(X0 / DX) * DX, X1, DX).map(X)
        .concat(Object(__WEBPACK_IMPORTED_MODULE_0_d3_array__["s" /* range */])(Object(__WEBPACK_IMPORTED_MODULE_1__math_js__["f" /* ceil */])(Y0 / DY) * DY, Y1, DY).map(Y))
        .concat(Object(__WEBPACK_IMPORTED_MODULE_0_d3_array__["s" /* range */])(Object(__WEBPACK_IMPORTED_MODULE_1__math_js__["f" /* ceil */])(x0 / dx) * dx, x1, dx).filter(function(x) { return Object(__WEBPACK_IMPORTED_MODULE_1__math_js__["a" /* abs */])(x % DX) > __WEBPACK_IMPORTED_MODULE_1__math_js__["i" /* epsilon */]; }).map(x))
        .concat(Object(__WEBPACK_IMPORTED_MODULE_0_d3_array__["s" /* range */])(Object(__WEBPACK_IMPORTED_MODULE_1__math_js__["f" /* ceil */])(y0 / dy) * dy, y1, dy).filter(function(y) { return Object(__WEBPACK_IMPORTED_MODULE_1__math_js__["a" /* abs */])(y % DY) > __WEBPACK_IMPORTED_MODULE_1__math_js__["i" /* epsilon */]; }).map(y));
  }
 
  graticule.lines = function() {
    return lines().map(function(coordinates) { return {type: "LineString", coordinates: coordinates}; });
  };
 
  graticule.outline = function() {
    return {
      type: "Polygon",
      coordinates: [
        X(X0).concat(
        Y(Y1).slice(1),
        X(X1).reverse().slice(1),
        Y(Y0).reverse().slice(1))
      ]
    };
  };
 
  graticule.extent = function(_) {
    if (!arguments.length) return graticule.extentMinor();
    return graticule.extentMajor(_).extentMinor(_);
  };
 
  graticule.extentMajor = function(_) {
    if (!arguments.length) return [[X0, Y0], [X1, Y1]];
    X0 = +_[0][0], X1 = +_[1][0];
    Y0 = +_[0][1], Y1 = +_[1][1];
    if (X0 > X1) _ = X0, X0 = X1, X1 = _;
    if (Y0 > Y1) _ = Y0, Y0 = Y1, Y1 = _;
    return graticule.precision(precision);
  };
 
  graticule.extentMinor = function(_) {
    if (!arguments.length) return [[x0, y0], [x1, y1]];
    x0 = +_[0][0], x1 = +_[1][0];
    y0 = +_[0][1], y1 = +_[1][1];
    if (x0 > x1) _ = x0, x0 = x1, x1 = _;
    if (y0 > y1) _ = y0, y0 = y1, y1 = _;
    return graticule.precision(precision);
  };
 
  graticule.step = function(_) {
    if (!arguments.length) return graticule.stepMinor();
    return graticule.stepMajor(_).stepMinor(_);
  };
 
  graticule.stepMajor = function(_) {
    if (!arguments.length) return [DX, DY];
    DX = +_[0], DY = +_[1];
    return graticule;
  };
 
  graticule.stepMinor = function(_) {
    if (!arguments.length) return [dx, dy];
    dx = +_[0], dy = +_[1];
    return graticule;
  };
 
  graticule.precision = function(_) {
    if (!arguments.length) return precision;
    precision = +_;
    x = graticuleX(y0, y1, 90);
    y = graticuleY(x0, x1, precision);
    X = graticuleX(Y0, Y1, 90);
    Y = graticuleY(X0, X1, precision);
    return graticule;
  };
 
  return graticule
      .extentMajor([[-180, -90 + __WEBPACK_IMPORTED_MODULE_1__math_js__["i" /* epsilon */]], [180, 90 - __WEBPACK_IMPORTED_MODULE_1__math_js__["i" /* epsilon */]]])
      .extentMinor([[-180, -80 - __WEBPACK_IMPORTED_MODULE_1__math_js__["i" /* epsilon */]], [180, 80 + __WEBPACK_IMPORTED_MODULE_1__math_js__["i" /* epsilon */]]]);
}
 
function graticule10() {
  return graticule()();
}
 
 
/***/ }),
/* 1308 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__math_js__ = __webpack_require__(19);
 
 
/* harmony default export */ __webpack_exports__["a"] = (function(a, b) {
  var x0 = a[0] * __WEBPACK_IMPORTED_MODULE_0__math_js__["r" /* radians */],
      y0 = a[1] * __WEBPACK_IMPORTED_MODULE_0__math_js__["r" /* radians */],
      x1 = b[0] * __WEBPACK_IMPORTED_MODULE_0__math_js__["r" /* radians */],
      y1 = b[1] * __WEBPACK_IMPORTED_MODULE_0__math_js__["r" /* radians */],
      cy0 = Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["g" /* cos */])(y0),
      sy0 = Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["t" /* sin */])(y0),
      cy1 = Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["g" /* cos */])(y1),
      sy1 = Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["t" /* sin */])(y1),
      kx0 = cy0 * Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["g" /* cos */])(x0),
      ky0 = cy0 * Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["t" /* sin */])(x0),
      kx1 = cy1 * Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["g" /* cos */])(x1),
      ky1 = cy1 * Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["t" /* sin */])(x1),
      d = 2 * Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["c" /* asin */])(Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["u" /* sqrt */])(Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["m" /* haversin */])(y1 - y0) + cy0 * cy1 * Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["m" /* haversin */])(x1 - x0))),
      k = Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["t" /* sin */])(d);
 
  var interpolate = d ? function(t) {
    var B = Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["t" /* sin */])(t *= d) / k,
        A = Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["t" /* sin */])(d - t) / k,
        x = A * kx0 + B * kx1,
        y = A * ky0 + B * ky1,
        z = A * sy0 + B * sy1;
    return [
      Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["e" /* atan2 */])(y, x) * __WEBPACK_IMPORTED_MODULE_0__math_js__["h" /* degrees */],
      Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["e" /* atan2 */])(z, Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["u" /* sqrt */])(x * x + y * y)) * __WEBPACK_IMPORTED_MODULE_0__math_js__["h" /* degrees */]
    ];
  } : function() {
    return [x0 * __WEBPACK_IMPORTED_MODULE_0__math_js__["h" /* degrees */], y0 * __WEBPACK_IMPORTED_MODULE_0__math_js__["h" /* degrees */]];
  };
 
  interpolate.distance = d;
 
  return interpolate;
});
 
 
/***/ }),
/* 1309 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__identity_js__ = __webpack_require__(357);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__stream_js__ = __webpack_require__(121);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__area_js__ = __webpack_require__(1310);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__bounds_js__ = __webpack_require__(750);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__centroid_js__ = __webpack_require__(1311);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__context_js__ = __webpack_require__(1312);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__measure_js__ = __webpack_require__(1313);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__string_js__ = __webpack_require__(1314);
 
 
 
 
 
 
 
 
 
/* harmony default export */ __webpack_exports__["a"] = (function(projection, context) {
  var pointRadius = 4.5,
      projectionStream,
      contextStream;
 
  function path(object) {
    if (object) {
      if (typeof pointRadius === "function") contextStream.pointRadius(+pointRadius.apply(this, arguments));
      Object(__WEBPACK_IMPORTED_MODULE_1__stream_js__["a" /* default */])(object, projectionStream(contextStream));
    }
    return contextStream.result();
  }
 
  path.area = function(object) {
    Object(__WEBPACK_IMPORTED_MODULE_1__stream_js__["a" /* default */])(object, projectionStream(__WEBPACK_IMPORTED_MODULE_2__area_js__["a" /* default */]));
    return __WEBPACK_IMPORTED_MODULE_2__area_js__["a" /* default */].result();
  };
 
  path.measure = function(object) {
    Object(__WEBPACK_IMPORTED_MODULE_1__stream_js__["a" /* default */])(object, projectionStream(__WEBPACK_IMPORTED_MODULE_6__measure_js__["a" /* default */]));
    return __WEBPACK_IMPORTED_MODULE_6__measure_js__["a" /* default */].result();
  };
 
  path.bounds = function(object) {
    Object(__WEBPACK_IMPORTED_MODULE_1__stream_js__["a" /* default */])(object, projectionStream(__WEBPACK_IMPORTED_MODULE_3__bounds_js__["a" /* default */]));
    return __WEBPACK_IMPORTED_MODULE_3__bounds_js__["a" /* default */].result();
  };
 
  path.centroid = function(object) {
    Object(__WEBPACK_IMPORTED_MODULE_1__stream_js__["a" /* default */])(object, projectionStream(__WEBPACK_IMPORTED_MODULE_4__centroid_js__["a" /* default */]));
    return __WEBPACK_IMPORTED_MODULE_4__centroid_js__["a" /* default */].result();
  };
 
  path.projection = function(_) {
    return arguments.length ? (projectionStream = _ == null ? (projection = null, __WEBPACK_IMPORTED_MODULE_0__identity_js__["a" /* default */]) : (projection = _).stream, path) : projection;
  };
 
  path.context = function(_) {
    if (!arguments.length) return context;
    contextStream = _ == null ? (context = null, new __WEBPACK_IMPORTED_MODULE_7__string_js__["a" /* default */]) : new __WEBPACK_IMPORTED_MODULE_5__context_js__["a" /* default */](context = _);
    if (typeof pointRadius !== "function") contextStream.pointRadius(pointRadius);
    return path;
  };
 
  path.pointRadius = function(_) {
    if (!arguments.length) return pointRadius;
    pointRadius = typeof _ === "function" ? _ : (contextStream.pointRadius(+_), +_);
    return path;
  };
 
  return path.projection(projection).context(context);
});
 
 
/***/ }),
/* 1310 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__adder_js__ = __webpack_require__(152);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__math_js__ = __webpack_require__(19);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__noop_js__ = __webpack_require__(102);
 
 
 
 
var areaSum = Object(__WEBPACK_IMPORTED_MODULE_0__adder_js__["a" /* default */])(),
    areaRingSum = Object(__WEBPACK_IMPORTED_MODULE_0__adder_js__["a" /* default */])(),
    x00,
    y00,
    x0,
    y0;
 
var areaStream = {
  point: __WEBPACK_IMPORTED_MODULE_2__noop_js__["a" /* default */],
  lineStart: __WEBPACK_IMPORTED_MODULE_2__noop_js__["a" /* default */],
  lineEnd: __WEBPACK_IMPORTED_MODULE_2__noop_js__["a" /* default */],
  polygonStart: function() {
    areaStream.lineStart = areaRingStart;
    areaStream.lineEnd = areaRingEnd;
  },
  polygonEnd: function() {
    areaStream.lineStart = areaStream.lineEnd = areaStream.point = __WEBPACK_IMPORTED_MODULE_2__noop_js__["a" /* default */];
    areaSum.add(Object(__WEBPACK_IMPORTED_MODULE_1__math_js__["a" /* abs */])(areaRingSum));
    areaRingSum.reset();
  },
  result: function() {
    var area = areaSum / 2;
    areaSum.reset();
    return area;
  }
};
 
function areaRingStart() {
  areaStream.point = areaPointFirst;
}
 
function areaPointFirst(x, y) {
  areaStream.point = areaPoint;
  x00 = x0 = x, y00 = y0 = y;
}
 
function areaPoint(x, y) {
  areaRingSum.add(y0 * x - x0 * y);
  x0 = x, y0 = y;
}
 
function areaRingEnd() {
  areaPoint(x00, y00);
}
 
/* harmony default export */ __webpack_exports__["a"] = (areaStream);
 
 
/***/ }),
/* 1311 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__math_js__ = __webpack_require__(19);
 
 
// TODO Enforce positive area for exterior, negative area for interior?
 
var X0 = 0,
    Y0 = 0,
    Z0 = 0,
    X1 = 0,
    Y1 = 0,
    Z1 = 0,
    X2 = 0,
    Y2 = 0,
    Z2 = 0,
    x00,
    y00,
    x0,
    y0;
 
var centroidStream = {
  point: centroidPoint,
  lineStart: centroidLineStart,
  lineEnd: centroidLineEnd,
  polygonStart: function() {
    centroidStream.lineStart = centroidRingStart;
    centroidStream.lineEnd = centroidRingEnd;
  },
  polygonEnd: function() {
    centroidStream.point = centroidPoint;
    centroidStream.lineStart = centroidLineStart;
    centroidStream.lineEnd = centroidLineEnd;
  },
  result: function() {
    var centroid = Z2 ? [X2 / Z2, Y2 / Z2]
        : Z1 ? [X1 / Z1, Y1 / Z1]
        : Z0 ? [X0 / Z0, Y0 / Z0]
        : [NaN, NaN];
    X0 = Y0 = Z0 =
    X1 = Y1 = Z1 =
    X2 = Y2 = Z2 = 0;
    return centroid;
  }
};
 
function centroidPoint(x, y) {
  X0 += x;
  Y0 += y;
  ++Z0;
}
 
function centroidLineStart() {
  centroidStream.point = centroidPointFirstLine;
}
 
function centroidPointFirstLine(x, y) {
  centroidStream.point = centroidPointLine;
  centroidPoint(x0 = x, y0 = y);
}
 
function centroidPointLine(x, y) {
  var dx = x - x0, dy = y - y0, z = Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["u" /* sqrt */])(dx * dx + dy * dy);
  X1 += z * (x0 + x) / 2;
  Y1 += z * (y0 + y) / 2;
  Z1 += z;
  centroidPoint(x0 = x, y0 = y);
}
 
function centroidLineEnd() {
  centroidStream.point = centroidPoint;
}
 
function centroidRingStart() {
  centroidStream.point = centroidPointFirstRing;
}
 
function centroidRingEnd() {
  centroidPointRing(x00, y00);
}
 
function centroidPointFirstRing(x, y) {
  centroidStream.point = centroidPointRing;
  centroidPoint(x00 = x0 = x, y00 = y0 = y);
}
 
function centroidPointRing(x, y) {
  var dx = x - x0,
      dy = y - y0,
      z = Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["u" /* sqrt */])(dx * dx + dy * dy);
 
  X1 += z * (x0 + x) / 2;
  Y1 += z * (y0 + y) / 2;
  Z1 += z;
 
  z = y0 * x - x0 * y;
  X2 += z * (x0 + x);
  Y2 += z * (y0 + y);
  Z2 += z * 3;
  centroidPoint(x0 = x, y0 = y);
}
 
/* harmony default export */ __webpack_exports__["a"] = (centroidStream);
 
 
/***/ }),
/* 1312 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = PathContext;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__math_js__ = __webpack_require__(19);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__noop_js__ = __webpack_require__(102);
 
 
 
function PathContext(context) {
  this._context = context;
}
 
PathContext.prototype = {
  _radius: 4.5,
  pointRadius: function(_) {
    return this._radius = _, this;
  },
  polygonStart: function() {
    this._line = 0;
  },
  polygonEnd: function() {
    this._line = NaN;
  },
  lineStart: function() {
    this._point = 0;
  },
  lineEnd: function() {
    if (this._line === 0) this._context.closePath();
    this._point = NaN;
  },
  point: function(x, y) {
    switch (this._point) {
      case 0: {
        this._context.moveTo(x, y);
        this._point = 1;
        break;
      }
      case 1: {
        this._context.lineTo(x, y);
        break;
      }
      default: {
        this._context.moveTo(x + this._radius, y);
        this._context.arc(x, y, this._radius, 0, __WEBPACK_IMPORTED_MODULE_0__math_js__["w" /* tau */]);
        break;
      }
    }
  },
  result: __WEBPACK_IMPORTED_MODULE_1__noop_js__["a" /* default */]
};
 
 
/***/ }),
/* 1313 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__adder_js__ = __webpack_require__(152);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__math_js__ = __webpack_require__(19);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__noop_js__ = __webpack_require__(102);
 
 
 
 
var lengthSum = Object(__WEBPACK_IMPORTED_MODULE_0__adder_js__["a" /* default */])(),
    lengthRing,
    x00,
    y00,
    x0,
    y0;
 
var lengthStream = {
  point: __WEBPACK_IMPORTED_MODULE_2__noop_js__["a" /* default */],
  lineStart: function() {
    lengthStream.point = lengthPointFirst;
  },
  lineEnd: function() {
    if (lengthRing) lengthPoint(x00, y00);
    lengthStream.point = __WEBPACK_IMPORTED_MODULE_2__noop_js__["a" /* default */];
  },
  polygonStart: function() {
    lengthRing = true;
  },
  polygonEnd: function() {
    lengthRing = null;
  },
  result: function() {
    var length = +lengthSum;
    lengthSum.reset();
    return length;
  }
};
 
function lengthPointFirst(x, y) {
  lengthStream.point = lengthPoint;
  x00 = x0 = x, y00 = y0 = y;
}
 
function lengthPoint(x, y) {
  x0 -= x, y0 -= y;
  lengthSum.add(Object(__WEBPACK_IMPORTED_MODULE_1__math_js__["u" /* sqrt */])(x0 * x0 + y0 * y0));
  x0 = x, y0 = y;
}
 
/* harmony default export */ __webpack_exports__["a"] = (lengthStream);
 
 
/***/ }),
/* 1314 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = PathString;
function PathString() {
  this._string = [];
}
 
PathString.prototype = {
  _radius: 4.5,
  _circle: circle(4.5),
  pointRadius: function(_) {
    if ((_ = +_) !== this._radius) this._radius = _, this._circle = null;
    return this;
  },
  polygonStart: function() {
    this._line = 0;
  },
  polygonEnd: function() {
    this._line = NaN;
  },
  lineStart: function() {
    this._point = 0;
  },
  lineEnd: function() {
    if (this._line === 0) this._string.push("Z");
    this._point = NaN;
  },
  point: function(x, y) {
    switch (this._point) {
      case 0: {
        this._string.push("M", x, ",", y);
        this._point = 1;
        break;
      }
      case 1: {
        this._string.push("L", x, ",", y);
        break;
      }
      default: {
        if (this._circle == null) this._circle = circle(this._radius);
        this._string.push("M", x, ",", y, this._circle);
        break;
      }
    }
  },
  result: function() {
    if (this._string.length) {
      var result = this._string.join("");
      this._string = [];
      return result;
    } else {
      return null;
    }
  }
};
 
function circle(radius) {
  return "m0," + radius
      + "a" + radius + "," + radius + " 0 1,1 0," + -2 * radius
      + "a" + radius + "," + radius + " 0 1,1 0," + 2 * radius
      + "z";
}
 
 
/***/ }),
/* 1315 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__cartesian_js__ = __webpack_require__(188);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__math_js__ = __webpack_require__(19);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__transform_js__ = __webpack_require__(254);
 
 
 
 
var maxDepth = 16, // maximum depth of subdivision
    cosMinDistance = Object(__WEBPACK_IMPORTED_MODULE_1__math_js__["g" /* cos */])(30 * __WEBPACK_IMPORTED_MODULE_1__math_js__["r" /* radians */]); // cos(minimum angular distance)
 
/* harmony default export */ __webpack_exports__["a"] = (function(project, delta2) {
  return +delta2 ? resample(project, delta2) : resampleNone(project);
});
 
function resampleNone(project) {
  return Object(__WEBPACK_IMPORTED_MODULE_2__transform_js__["b" /* transformer */])({
    point: function(x, y) {
      x = project(x, y);
      this.stream.point(x[0], x[1]);
    }
  });
}
 
function resample(project, delta2) {
 
  function resampleLineTo(x0, y0, lambda0, a0, b0, c0, x1, y1, lambda1, a1, b1, c1, depth, stream) {
    var dx = x1 - x0,
        dy = y1 - y0,
        d2 = dx * dx + dy * dy;
    if (d2 > 4 * delta2 && depth--) {
      var a = a0 + a1,
          b = b0 + b1,
          c = c0 + c1,
          m = Object(__WEBPACK_IMPORTED_MODULE_1__math_js__["u" /* sqrt */])(a * a + b * b + c * c),
          phi2 = Object(__WEBPACK_IMPORTED_MODULE_1__math_js__["c" /* asin */])(c /= m),
          lambda2 = Object(__WEBPACK_IMPORTED_MODULE_1__math_js__["a" /* abs */])(Object(__WEBPACK_IMPORTED_MODULE_1__math_js__["a" /* abs */])(c) - 1) < __WEBPACK_IMPORTED_MODULE_1__math_js__["i" /* epsilon */] || Object(__WEBPACK_IMPORTED_MODULE_1__math_js__["a" /* abs */])(lambda0 - lambda1) < __WEBPACK_IMPORTED_MODULE_1__math_js__["i" /* epsilon */] ? (lambda0 + lambda1) / 2 : Object(__WEBPACK_IMPORTED_MODULE_1__math_js__["e" /* atan2 */])(b, a),
          p = project(lambda2, phi2),
          x2 = p[0],
          y2 = p[1],
          dx2 = x2 - x0,
          dy2 = y2 - y0,
          dz = dy * dx2 - dx * dy2;
      if (dz * dz / d2 > delta2 // perpendicular projected distance
          || Object(__WEBPACK_IMPORTED_MODULE_1__math_js__["a" /* abs */])((dx * dx2 + dy * dy2) / d2 - 0.5) > 0.3 // midpoint close to an end
          || a0 * a1 + b0 * b1 + c0 * c1 < cosMinDistance) { // angular distance
        resampleLineTo(x0, y0, lambda0, a0, b0, c0, x2, y2, lambda2, a /= m, b /= m, c, depth, stream);
        stream.point(x2, y2);
        resampleLineTo(x2, y2, lambda2, a, b, c, x1, y1, lambda1, a1, b1, c1, depth, stream);
      }
    }
  }
  return function(stream) {
    var lambda00, x00, y00, a00, b00, c00, // first point
        lambda0, x0, y0, a0, b0, c0; // previous point
 
    var resampleStream = {
      point: point,
      lineStart: lineStart,
      lineEnd: lineEnd,
      polygonStart: function() { stream.polygonStart(); resampleStream.lineStart = ringStart; },
      polygonEnd: function() { stream.polygonEnd(); resampleStream.lineStart = lineStart; }
    };
 
    function point(x, y) {
      x = project(x, y);
      stream.point(x[0], x[1]);
    }
 
    function lineStart() {
      x0 = NaN;
      resampleStream.point = linePoint;
      stream.lineStart();
    }
 
    function linePoint(lambda, phi) {
      var c = Object(__WEBPACK_IMPORTED_MODULE_0__cartesian_js__["a" /* cartesian */])([lambda, phi]), p = project(lambda, phi);
      resampleLineTo(x0, y0, lambda0, a0, b0, c0, x0 = p[0], y0 = p[1], lambda0 = lambda, a0 = c[0], b0 = c[1], c0 = c[2], maxDepth, stream);
      stream.point(x0, y0);
    }
 
    function lineEnd() {
      resampleStream.point = point;
      stream.lineEnd();
    }
 
    function ringStart() {
      lineStart();
      resampleStream.point = ringPoint;
      resampleStream.lineEnd = ringEnd;
    }
 
    function ringPoint(lambda, phi) {
      linePoint(lambda00 = lambda, phi), x00 = x0, y00 = y0, a00 = a0, b00 = b0, c00 = c0;
      resampleStream.point = linePoint;
    }
 
    function ringEnd() {
      resampleLineTo(x0, y0, lambda0, a0, b0, c0, x00, y00, lambda00, a00, b00, c00, maxDepth, stream);
      resampleStream.lineEnd = lineEnd;
      lineEnd();
    }
 
    return resampleStream;
  };
}
 
 
/***/ }),
/* 1316 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = cylindricalEqualAreaRaw;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__math_js__ = __webpack_require__(19);
 
 
function cylindricalEqualAreaRaw(phi0) {
  var cosPhi0 = Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["g" /* cos */])(phi0);
 
  function forward(lambda, phi) {
    return [lambda * cosPhi0, Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["t" /* sin */])(phi) / cosPhi0];
  }
 
  forward.invert = function(x, y) {
    return [x / cosPhi0, Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["c" /* asin */])(y * cosPhi0)];
  };
 
  return forward;
}
 
 
/***/ }),
/* 1317 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__math_js__ = __webpack_require__(19);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__albers_js__ = __webpack_require__(751);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__conicEqualArea_js__ = __webpack_require__(358);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__fit_js__ = __webpack_require__(360);
 
 
 
 
 
// The projections must have mutually exclusive clip regions on the sphere,
// as this will avoid emitting interleaving lines and polygons.
function multiplex(streams) {
  var n = streams.length;
  return {
    point: function(x, y) { var i = -1; while (++i < n) streams[i].point(x, y); },
    sphere: function() { var i = -1; while (++i < n) streams[i].sphere(); },
    lineStart: function() { var i = -1; while (++i < n) streams[i].lineStart(); },
    lineEnd: function() { var i = -1; while (++i < n) streams[i].lineEnd(); },
    polygonStart: function() { var i = -1; while (++i < n) streams[i].polygonStart(); },
    polygonEnd: function() { var i = -1; while (++i < n) streams[i].polygonEnd(); }
  };
}
 
// A composite projection for the United States, configured by default for
// 960×500. The projection also works quite well at 960×600 if you change the
// scale to 1285 and adjust the translate accordingly. The set of standard
// parallels for each region comes from USGS, which is published here:
// http://egsc.usgs.gov/isb/pubs/MapProjections/projections.html#albers
/* harmony default export */ __webpack_exports__["a"] = (function() {
  var cache,
      cacheStream,
      lower48 = Object(__WEBPACK_IMPORTED_MODULE_1__albers_js__["a" /* default */])(), lower48Point,
      alaska = Object(__WEBPACK_IMPORTED_MODULE_2__conicEqualArea_js__["b" /* default */])().rotate([154, 0]).center([-2, 58.5]).parallels([55, 65]), alaskaPoint, // EPSG:3338
      hawaii = Object(__WEBPACK_IMPORTED_MODULE_2__conicEqualArea_js__["b" /* default */])().rotate([157, 0]).center([-3, 19.9]).parallels([8, 18]), hawaiiPoint, // ESRI:102007
      point, pointStream = {point: function(x, y) { point = [x, y]; }};
 
  function albersUsa(coordinates) {
    var x = coordinates[0], y = coordinates[1];
    return point = null,
        (lower48Point.point(x, y), point)
        || (alaskaPoint.point(x, y), point)
        || (hawaiiPoint.point(x, y), point);
  }
 
  albersUsa.invert = function(coordinates) {
    var k = lower48.scale(),
        t = lower48.translate(),
        x = (coordinates[0] - t[0]) / k,
        y = (coordinates[1] - t[1]) / k;
    return (y >= 0.120 && y < 0.234 && x >= -0.425 && x < -0.214 ? alaska
        : y >= 0.166 && y < 0.234 && x >= -0.214 && x < -0.115 ? hawaii
        : lower48).invert(coordinates);
  };
 
  albersUsa.stream = function(stream) {
    return cache && cacheStream === stream ? cache : cache = multiplex([lower48.stream(cacheStream = stream), alaska.stream(stream), hawaii.stream(stream)]);
  };
 
  albersUsa.precision = function(_) {
    if (!arguments.length) return lower48.precision();
    lower48.precision(_), alaska.precision(_), hawaii.precision(_);
    return reset();
  };
 
  albersUsa.scale = function(_) {
    if (!arguments.length) return lower48.scale();
    lower48.scale(_), alaska.scale(_ * 0.35), hawaii.scale(_);
    return albersUsa.translate(lower48.translate());
  };
 
  albersUsa.translate = function(_) {
    if (!arguments.length) return lower48.translate();
    var k = lower48.scale(), x = +_[0], y = +_[1];
 
    lower48Point = lower48
        .translate(_)
        .clipExtent([[x - 0.455 * k, y - 0.238 * k], [x + 0.455 * k, y + 0.238 * k]])
        .stream(pointStream);
 
    alaskaPoint = alaska
        .translate([x - 0.307 * k, y + 0.201 * k])
        .clipExtent([[x - 0.425 * k + __WEBPACK_IMPORTED_MODULE_0__math_js__["i" /* epsilon */], y + 0.120 * k + __WEBPACK_IMPORTED_MODULE_0__math_js__["i" /* epsilon */]], [x - 0.214 * k - __WEBPACK_IMPORTED_MODULE_0__math_js__["i" /* epsilon */], y + 0.234 * k - __WEBPACK_IMPORTED_MODULE_0__math_js__["i" /* epsilon */]]])
        .stream(pointStream);
 
    hawaiiPoint = hawaii
        .translate([x - 0.205 * k, y + 0.212 * k])
        .clipExtent([[x - 0.214 * k + __WEBPACK_IMPORTED_MODULE_0__math_js__["i" /* epsilon */], y + 0.166 * k + __WEBPACK_IMPORTED_MODULE_0__math_js__["i" /* epsilon */]], [x - 0.115 * k - __WEBPACK_IMPORTED_MODULE_0__math_js__["i" /* epsilon */], y + 0.234 * k - __WEBPACK_IMPORTED_MODULE_0__math_js__["i" /* epsilon */]]])
        .stream(pointStream);
 
    return reset();
  };
 
  albersUsa.fitExtent = function(extent, object) {
    return Object(__WEBPACK_IMPORTED_MODULE_3__fit_js__["a" /* fitExtent */])(albersUsa, extent, object);
  };
 
  albersUsa.fitSize = function(size, object) {
    return Object(__WEBPACK_IMPORTED_MODULE_3__fit_js__["c" /* fitSize */])(albersUsa, size, object);
  };
 
  albersUsa.fitWidth = function(width, object) {
    return Object(__WEBPACK_IMPORTED_MODULE_3__fit_js__["d" /* fitWidth */])(albersUsa, width, object);
  };
 
  albersUsa.fitHeight = function(height, object) {
    return Object(__WEBPACK_IMPORTED_MODULE_3__fit_js__["b" /* fitHeight */])(albersUsa, height, object);
  };
 
  function reset() {
    cache = cacheStream = null;
    return albersUsa;
  }
 
  return albersUsa.scale(1070);
});
 
 
/***/ }),
/* 1318 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return azimuthalEqualAreaRaw; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__math_js__ = __webpack_require__(19);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__azimuthal_js__ = __webpack_require__(189);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__index_js__ = __webpack_require__(75);
 
 
 
 
var azimuthalEqualAreaRaw = Object(__WEBPACK_IMPORTED_MODULE_1__azimuthal_js__["b" /* azimuthalRaw */])(function(cxcy) {
  return Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["u" /* sqrt */])(2 / (1 + cxcy));
});
 
azimuthalEqualAreaRaw.invert = Object(__WEBPACK_IMPORTED_MODULE_1__azimuthal_js__["a" /* azimuthalInvert */])(function(z) {
  return 2 * Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["c" /* asin */])(z / 2);
});
 
/* harmony default export */ __webpack_exports__["b"] = (function() {
  return Object(__WEBPACK_IMPORTED_MODULE_2__index_js__["a" /* default */])(azimuthalEqualAreaRaw)
      .scale(124.75)
      .clipAngle(180 - 1e-3);
});
 
 
/***/ }),
/* 1319 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return azimuthalEquidistantRaw; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__math_js__ = __webpack_require__(19);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__azimuthal_js__ = __webpack_require__(189);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__index_js__ = __webpack_require__(75);
 
 
 
 
var azimuthalEquidistantRaw = Object(__WEBPACK_IMPORTED_MODULE_1__azimuthal_js__["b" /* azimuthalRaw */])(function(c) {
  return (c = Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["b" /* acos */])(c)) && c / Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["t" /* sin */])(c);
});
 
azimuthalEquidistantRaw.invert = Object(__WEBPACK_IMPORTED_MODULE_1__azimuthal_js__["a" /* azimuthalInvert */])(function(z) {
  return z;
});
 
/* harmony default export */ __webpack_exports__["b"] = (function() {
  return Object(__WEBPACK_IMPORTED_MODULE_2__index_js__["a" /* default */])(azimuthalEquidistantRaw)
      .scale(79.4188)
      .clipAngle(180 - 1e-3);
});
 
 
/***/ }),
/* 1320 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = conicConformalRaw;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__math_js__ = __webpack_require__(19);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__conic_js__ = __webpack_require__(359);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__mercator_js__ = __webpack_require__(361);
 
 
 
 
function tany(y) {
  return Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["v" /* tan */])((__WEBPACK_IMPORTED_MODULE_0__math_js__["l" /* halfPi */] + y) / 2);
}
 
function conicConformalRaw(y0, y1) {
  var cy0 = Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["g" /* cos */])(y0),
      n = y0 === y1 ? Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["t" /* sin */])(y0) : Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["n" /* log */])(cy0 / Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["g" /* cos */])(y1)) / Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["n" /* log */])(tany(y1) / tany(y0)),
      f = cy0 * Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["p" /* pow */])(tany(y0), n) / n;
 
  if (!n) return __WEBPACK_IMPORTED_MODULE_2__mercator_js__["c" /* mercatorRaw */];
 
  function project(x, y) {
    if (f > 0) { if (y < -__WEBPACK_IMPORTED_MODULE_0__math_js__["l" /* halfPi */] + __WEBPACK_IMPORTED_MODULE_0__math_js__["i" /* epsilon */]) y = -__WEBPACK_IMPORTED_MODULE_0__math_js__["l" /* halfPi */] + __WEBPACK_IMPORTED_MODULE_0__math_js__["i" /* epsilon */]; }
    else { if (y > __WEBPACK_IMPORTED_MODULE_0__math_js__["l" /* halfPi */] - __WEBPACK_IMPORTED_MODULE_0__math_js__["i" /* epsilon */]) y = __WEBPACK_IMPORTED_MODULE_0__math_js__["l" /* halfPi */] - __WEBPACK_IMPORTED_MODULE_0__math_js__["i" /* epsilon */]; }
    var r = f / Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["p" /* pow */])(tany(y), n);
    return [r * Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["t" /* sin */])(n * x), f - r * Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["g" /* cos */])(n * x)];
  }
 
  project.invert = function(x, y) {
    var fy = f - y, r = Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["s" /* sign */])(n) * Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["u" /* sqrt */])(x * x + fy * fy),
      l = Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["e" /* atan2 */])(x, Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["a" /* abs */])(fy)) * Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["s" /* sign */])(fy);
    if (fy * n < 0)
      l -= __WEBPACK_IMPORTED_MODULE_0__math_js__["o" /* pi */] * Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["s" /* sign */])(x) * Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["s" /* sign */])(fy);
    return [l / n, 2 * Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["d" /* atan */])(Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["p" /* pow */])(f / r, 1 / n)) - __WEBPACK_IMPORTED_MODULE_0__math_js__["l" /* halfPi */]];
  };
 
  return project;
}
 
/* harmony default export */ __webpack_exports__["b"] = (function() {
  return Object(__WEBPACK_IMPORTED_MODULE_1__conic_js__["a" /* conicProjection */])(conicConformalRaw)
      .scale(109.5)
      .parallels([30, 30]);
});
 
 
/***/ }),
/* 1321 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = conicEquidistantRaw;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__math_js__ = __webpack_require__(19);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__conic_js__ = __webpack_require__(359);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__equirectangular_js__ = __webpack_require__(752);
 
 
 
 
function conicEquidistantRaw(y0, y1) {
  var cy0 = Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["g" /* cos */])(y0),
      n = y0 === y1 ? Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["t" /* sin */])(y0) : (cy0 - Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["g" /* cos */])(y1)) / (y1 - y0),
      g = cy0 / n + y0;
 
  if (Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["a" /* abs */])(n) < __WEBPACK_IMPORTED_MODULE_0__math_js__["i" /* epsilon */]) return __WEBPACK_IMPORTED_MODULE_2__equirectangular_js__["b" /* equirectangularRaw */];
 
  function project(x, y) {
    var gy = g - y, nx = n * x;
    return [gy * Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["t" /* sin */])(nx), g - gy * Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["g" /* cos */])(nx)];
  }
 
  project.invert = function(x, y) {
    var gy = g - y,
        l = Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["e" /* atan2 */])(x, Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["a" /* abs */])(gy)) * Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["s" /* sign */])(gy);
    if (gy * n < 0)
      l -= __WEBPACK_IMPORTED_MODULE_0__math_js__["o" /* pi */] * Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["s" /* sign */])(x) * Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["s" /* sign */])(gy);
    return [l / n, g - Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["s" /* sign */])(n) * Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["u" /* sqrt */])(x * x + gy * gy)];
  };
 
  return project;
}
 
/* harmony default export */ __webpack_exports__["b"] = (function() {
  return Object(__WEBPACK_IMPORTED_MODULE_1__conic_js__["a" /* conicProjection */])(conicEquidistantRaw)
      .scale(131.154)
      .center([0, 13.9389]);
});
 
 
/***/ }),
/* 1322 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["b"] = equalEarthRaw;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__index_js__ = __webpack_require__(75);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__math_js__ = __webpack_require__(19);
 
 
 
var A1 = 1.340264,
    A2 = -0.081106,
    A3 = 0.000893,
    A4 = 0.003796,
    M = Object(__WEBPACK_IMPORTED_MODULE_1__math_js__["u" /* sqrt */])(3) / 2,
    iterations = 12;
 
function equalEarthRaw(lambda, phi) {
  var l = Object(__WEBPACK_IMPORTED_MODULE_1__math_js__["c" /* asin */])(M * Object(__WEBPACK_IMPORTED_MODULE_1__math_js__["t" /* sin */])(phi)), l2 = l * l, l6 = l2 * l2 * l2;
  return [
    lambda * Object(__WEBPACK_IMPORTED_MODULE_1__math_js__["g" /* cos */])(l) / (M * (A1 + 3 * A2 * l2 + l6 * (7 * A3 + 9 * A4 * l2))),
    l * (A1 + A2 * l2 + l6 * (A3 + A4 * l2))
  ];
}
 
equalEarthRaw.invert = function(x, y) {
  var l = y, l2 = l * l, l6 = l2 * l2 * l2;
  for (var i = 0, delta, fy, fpy; i < iterations; ++i) {
    fy = l * (A1 + A2 * l2 + l6 * (A3 + A4 * l2)) - y;
    fpy = A1 + 3 * A2 * l2 + l6 * (7 * A3 + 9 * A4 * l2);
    l -= delta = fy / fpy, l2 = l * l, l6 = l2 * l2 * l2;
    if (Object(__WEBPACK_IMPORTED_MODULE_1__math_js__["a" /* abs */])(delta) < __WEBPACK_IMPORTED_MODULE_1__math_js__["j" /* epsilon2 */]) break;
  }
  return [
    M * x * (A1 + 3 * A2 * l2 + l6 * (7 * A3 + 9 * A4 * l2)) / Object(__WEBPACK_IMPORTED_MODULE_1__math_js__["g" /* cos */])(l),
    Object(__WEBPACK_IMPORTED_MODULE_1__math_js__["c" /* asin */])(Object(__WEBPACK_IMPORTED_MODULE_1__math_js__["t" /* sin */])(l) / M)
  ];
};
 
/* harmony default export */ __webpack_exports__["a"] = (function() {
  return Object(__WEBPACK_IMPORTED_MODULE_0__index_js__["a" /* default */])(equalEarthRaw)
      .scale(177.158);
});
 
 
/***/ }),
/* 1323 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["b"] = gnomonicRaw;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__math_js__ = __webpack_require__(19);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__azimuthal_js__ = __webpack_require__(189);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__index_js__ = __webpack_require__(75);
 
 
 
 
function gnomonicRaw(x, y) {
  var cy = Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["g" /* cos */])(y), k = Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["g" /* cos */])(x) * cy;
  return [cy * Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["t" /* sin */])(x) / k, Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["t" /* sin */])(y) / k];
}
 
gnomonicRaw.invert = Object(__WEBPACK_IMPORTED_MODULE_1__azimuthal_js__["a" /* azimuthalInvert */])(__WEBPACK_IMPORTED_MODULE_0__math_js__["d" /* atan */]);
 
/* harmony default export */ __webpack_exports__["a"] = (function() {
  return Object(__WEBPACK_IMPORTED_MODULE_2__index_js__["a" /* default */])(gnomonicRaw)
      .scale(144.049)
      .clipAngle(60);
});
 
 
/***/ }),
/* 1324 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__clip_rectangle_js__ = __webpack_require__(253);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__identity_js__ = __webpack_require__(357);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__transform_js__ = __webpack_require__(254);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__fit_js__ = __webpack_require__(360);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__math_js__ = __webpack_require__(19);
 
 
 
 
 
 
/* harmony default export */ __webpack_exports__["a"] = (function() {
  var k = 1, tx = 0, ty = 0, sx = 1, sy = 1, // scale, translate and reflect
      alpha = 0, ca, sa, // angle
      x0 = null, y0, x1, y1, // clip extent
      kx = 1, ky = 1,
      transform = Object(__WEBPACK_IMPORTED_MODULE_2__transform_js__["b" /* transformer */])({
        point: function(x, y) {
          var p = projection([x, y])
          this.stream.point(p[0], p[1]);
        }
      }),
      postclip = __WEBPACK_IMPORTED_MODULE_1__identity_js__["a" /* default */],
      cache,
      cacheStream;
 
  function reset() {
    kx = k * sx;
    ky = k * sy;
    cache = cacheStream = null;
    return projection;
  }
 
  function projection (p) {
    var x = p[0] * kx, y = p[1] * ky;
    if (alpha) {
      var t = y * ca - x * sa;
      x = x * ca + y * sa;
      y = t;
    }    
    return [x + tx, y + ty];
  }
  projection.invert = function(p) {
    var x = p[0] - tx, y = p[1] - ty;
    if (alpha) {
      var t = y * ca + x * sa;
      x = x * ca - y * sa;
      y = t;
    }
    return [x / kx, y / ky];
  };
  projection.stream = function(stream) {
    return cache && cacheStream === stream ? cache : cache = transform(postclip(cacheStream = stream));
  };
  projection.postclip = function(_) {
    return arguments.length ? (postclip = _, x0 = y0 = x1 = y1 = null, reset()) : postclip;
  };
  projection.clipExtent = function(_) {
    return arguments.length ? (postclip = _ == null ? (x0 = y0 = x1 = y1 = null, __WEBPACK_IMPORTED_MODULE_1__identity_js__["a" /* default */]) : Object(__WEBPACK_IMPORTED_MODULE_0__clip_rectangle_js__["a" /* default */])(x0 = +_[0][0], y0 = +_[0][1], x1 = +_[1][0], y1 = +_[1][1]), reset()) : x0 == null ? null : [[x0, y0], [x1, y1]];
  };
  projection.scale = function(_) {
    return arguments.length ? (k = +_, reset()) : k;
  };
  projection.translate = function(_) {
    return arguments.length ? (tx = +_[0], ty = +_[1], reset()) : [tx, ty];
  }
  projection.angle = function(_) {
    return arguments.length ? (alpha = _ % 360 * __WEBPACK_IMPORTED_MODULE_4__math_js__["r" /* radians */], sa = Object(__WEBPACK_IMPORTED_MODULE_4__math_js__["t" /* sin */])(alpha), ca = Object(__WEBPACK_IMPORTED_MODULE_4__math_js__["g" /* cos */])(alpha), reset()) : alpha * __WEBPACK_IMPORTED_MODULE_4__math_js__["h" /* degrees */];
  };
  projection.reflectX = function(_) {
    return arguments.length ? (sx = _ ? -1 : 1, reset()) : sx < 0;
  };
  projection.reflectY = function(_) {
    return arguments.length ? (sy = _ ? -1 : 1, reset()) : sy < 0;
  };
  projection.fitExtent = function(extent, object) {
    return Object(__WEBPACK_IMPORTED_MODULE_3__fit_js__["a" /* fitExtent */])(projection, extent, object);
  };
  projection.fitSize = function(size, object) {
    return Object(__WEBPACK_IMPORTED_MODULE_3__fit_js__["c" /* fitSize */])(projection, size, object);
  };
  projection.fitWidth = function(width, object) {
    return Object(__WEBPACK_IMPORTED_MODULE_3__fit_js__["d" /* fitWidth */])(projection, width, object);
  };
  projection.fitHeight = function(height, object) {
    return Object(__WEBPACK_IMPORTED_MODULE_3__fit_js__["b" /* fitHeight */])(projection, height, object);
  };
 
  return projection;
});
 
 
/***/ }),
/* 1325 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["b"] = naturalEarth1Raw;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__index_js__ = __webpack_require__(75);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__math_js__ = __webpack_require__(19);
 
 
 
function naturalEarth1Raw(lambda, phi) {
  var phi2 = phi * phi, phi4 = phi2 * phi2;
  return [
    lambda * (0.8707 - 0.131979 * phi2 + phi4 * (-0.013791 + phi4 * (0.003971 * phi2 - 0.001529 * phi4))),
    phi * (1.007226 + phi2 * (0.015085 + phi4 * (-0.044475 + 0.028874 * phi2 - 0.005916 * phi4)))
  ];
}
 
naturalEarth1Raw.invert = function(x, y) {
  var phi = y, i = 25, delta;
  do {
    var phi2 = phi * phi, phi4 = phi2 * phi2;
    phi -= delta = (phi * (1.007226 + phi2 * (0.015085 + phi4 * (-0.044475 + 0.028874 * phi2 - 0.005916 * phi4))) - y) /
        (1.007226 + phi2 * (0.015085 * 3 + phi4 * (-0.044475 * 7 + 0.028874 * 9 * phi2 - 0.005916 * 11 * phi4)));
  } while (Object(__WEBPACK_IMPORTED_MODULE_1__math_js__["a" /* abs */])(delta) > __WEBPACK_IMPORTED_MODULE_1__math_js__["i" /* epsilon */] && --i > 0);
  return [
    x / (0.8707 + (phi2 = phi * phi) * (-0.131979 + phi2 * (-0.013791 + phi2 * phi2 * phi2 * (0.003971 - 0.001529 * phi2)))),
    phi
  ];
};
 
/* harmony default export */ __webpack_exports__["a"] = (function() {
  return Object(__WEBPACK_IMPORTED_MODULE_0__index_js__["a" /* default */])(naturalEarth1Raw)
      .scale(175.295);
});
 
 
/***/ }),
/* 1326 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["b"] = orthographicRaw;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__math_js__ = __webpack_require__(19);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__azimuthal_js__ = __webpack_require__(189);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__index_js__ = __webpack_require__(75);
 
 
 
 
function orthographicRaw(x, y) {
  return [Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["g" /* cos */])(y) * Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["t" /* sin */])(x), Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["t" /* sin */])(y)];
}
 
orthographicRaw.invert = Object(__WEBPACK_IMPORTED_MODULE_1__azimuthal_js__["a" /* azimuthalInvert */])(__WEBPACK_IMPORTED_MODULE_0__math_js__["c" /* asin */]);
 
/* harmony default export */ __webpack_exports__["a"] = (function() {
  return Object(__WEBPACK_IMPORTED_MODULE_2__index_js__["a" /* default */])(orthographicRaw)
      .scale(249.5)
      .clipAngle(90 + __WEBPACK_IMPORTED_MODULE_0__math_js__["i" /* epsilon */]);
});
 
 
/***/ }),
/* 1327 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["b"] = stereographicRaw;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__math_js__ = __webpack_require__(19);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__azimuthal_js__ = __webpack_require__(189);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__index_js__ = __webpack_require__(75);
 
 
 
 
function stereographicRaw(x, y) {
  var cy = Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["g" /* cos */])(y), k = 1 + Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["g" /* cos */])(x) * cy;
  return [cy * Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["t" /* sin */])(x) / k, Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["t" /* sin */])(y) / k];
}
 
stereographicRaw.invert = Object(__WEBPACK_IMPORTED_MODULE_1__azimuthal_js__["a" /* azimuthalInvert */])(function(z) {
  return 2 * Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["d" /* atan */])(z);
});
 
/* harmony default export */ __webpack_exports__["a"] = (function() {
  return Object(__WEBPACK_IMPORTED_MODULE_2__index_js__["a" /* default */])(stereographicRaw)
      .scale(250)
      .clipAngle(142);
});
 
 
/***/ }),
/* 1328 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["b"] = transverseMercatorRaw;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__math_js__ = __webpack_require__(19);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__mercator_js__ = __webpack_require__(361);
 
 
 
function transverseMercatorRaw(lambda, phi) {
  return [Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["n" /* log */])(Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["v" /* tan */])((__WEBPACK_IMPORTED_MODULE_0__math_js__["l" /* halfPi */] + phi) / 2)), -lambda];
}
 
transverseMercatorRaw.invert = function(x, y) {
  return [-y, 2 * Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["d" /* atan */])(Object(__WEBPACK_IMPORTED_MODULE_0__math_js__["k" /* exp */])(x)) - __WEBPACK_IMPORTED_MODULE_0__math_js__["l" /* halfPi */]];
};
 
/* harmony default export */ __webpack_exports__["a"] = (function() {
  var m = Object(__WEBPACK_IMPORTED_MODULE_1__mercator_js__["b" /* mercatorProjection */])(transverseMercatorRaw),
      center = m.center,
      rotate = m.rotate;
 
  m.center = function(_) {
    return arguments.length ? center([-_[1], _[0]]) : (_ = center(), [_[1], -_[0]]);
  };
 
  m.rotate = function(_) {
    return arguments.length ? rotate([_[0], _[1], _.length > 2 ? _[2] + 90 : 90]) : (_ = rotate(), [_[0], _[1], _[2] - 90]);
  };
 
  return rotate([0, 0, 90])
      .scale(159.155);
});
 
 
/***/ }),
/* 1329 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__cluster_js__ = __webpack_require__(1330);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_0__cluster_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__hierarchy_index_js__ = __webpack_require__(362);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return __WEBPACK_IMPORTED_MODULE_1__hierarchy_index_js__["c"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__pack_index_js__ = __webpack_require__(1342);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return __WEBPACK_IMPORTED_MODULE_2__pack_index_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__pack_siblings_js__ = __webpack_require__(753);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return __WEBPACK_IMPORTED_MODULE_3__pack_siblings_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__pack_enclose_js__ = __webpack_require__(754);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return __WEBPACK_IMPORTED_MODULE_4__pack_enclose_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__partition_js__ = __webpack_require__(1344);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return __WEBPACK_IMPORTED_MODULE_5__partition_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__stratify_js__ = __webpack_require__(1345);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return __WEBPACK_IMPORTED_MODULE_6__stratify_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__tree_js__ = __webpack_require__(1346);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return __WEBPACK_IMPORTED_MODULE_7__tree_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__treemap_index_js__ = __webpack_require__(1347);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return __WEBPACK_IMPORTED_MODULE_8__treemap_index_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__treemap_binary_js__ = __webpack_require__(1348);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return __WEBPACK_IMPORTED_MODULE_9__treemap_binary_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__treemap_dice_js__ = __webpack_require__(190);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "k", function() { return __WEBPACK_IMPORTED_MODULE_10__treemap_dice_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__treemap_slice_js__ = __webpack_require__(255);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "m", function() { return __WEBPACK_IMPORTED_MODULE_11__treemap_slice_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__treemap_sliceDice_js__ = __webpack_require__(1349);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "n", function() { return __WEBPACK_IMPORTED_MODULE_12__treemap_sliceDice_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__treemap_squarify_js__ = __webpack_require__(364);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "o", function() { return __WEBPACK_IMPORTED_MODULE_13__treemap_squarify_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__treemap_resquarify_js__ = __webpack_require__(1350);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "l", function() { return __WEBPACK_IMPORTED_MODULE_14__treemap_resquarify_js__["a"]; });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
/***/ }),
/* 1330 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
function defaultSeparation(a, b) {
  return a.parent === b.parent ? 1 : 2;
}
 
function meanX(children) {
  return children.reduce(meanXReduce, 0) / children.length;
}
 
function meanXReduce(x, c) {
  return x + c.x;
}
 
function maxY(children) {
  return 1 + children.reduce(maxYReduce, 0);
}
 
function maxYReduce(y, c) {
  return Math.max(y, c.y);
}
 
function leafLeft(node) {
  var children;
  while (children = node.children) node = children[0];
  return node;
}
 
function leafRight(node) {
  var children;
  while (children = node.children) node = children[children.length - 1];
  return node;
}
 
/* harmony default export */ __webpack_exports__["a"] = (function() {
  var separation = defaultSeparation,
      dx = 1,
      dy = 1,
      nodeSize = false;
 
  function cluster(root) {
    var previousNode,
        x = 0;
 
    // First walk, computing the initial x & y values.
    root.eachAfter(function(node) {
      var children = node.children;
      if (children) {
        node.x = meanX(children);
        node.y = maxY(children);
      } else {
        node.x = previousNode ? x += separation(node, previousNode) : 0;
        node.y = 0;
        previousNode = node;
      }
    });
 
    var left = leafLeft(root),
        right = leafRight(root),
        x0 = left.x - separation(left, right) / 2,
        x1 = right.x + separation(right, left) / 2;
 
    // Second walk, normalizing x & y to the desired size.
    return root.eachAfter(nodeSize ? function(node) {
      node.x = (node.x - root.x) * dx;
      node.y = (root.y - node.y) * dy;
    } : function(node) {
      node.x = (node.x - x0) / (x1 - x0) * dx;
      node.y = (1 - (root.y ? node.y / root.y : 1)) * dy;
    });
  }
 
  cluster.separation = function(x) {
    return arguments.length ? (separation = x, cluster) : separation;
  };
 
  cluster.size = function(x) {
    return arguments.length ? (nodeSize = false, dx = +x[0], dy = +x[1], cluster) : (nodeSize ? null : [dx, dy]);
  };
 
  cluster.nodeSize = function(x) {
    return arguments.length ? (nodeSize = true, dx = +x[0], dy = +x[1], cluster) : (nodeSize ? [dx, dy] : null);
  };
 
  return cluster;
});
 
 
/***/ }),
/* 1331 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
function count(node) {
  var sum = 0,
      children = node.children,
      i = children && children.length;
  if (!i) sum = 1;
  else while (--i >= 0) sum += children[i].value;
  node.value = sum;
}
 
/* harmony default export */ __webpack_exports__["a"] = (function() {
  return this.eachAfter(count);
});
 
 
/***/ }),
/* 1332 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony default export */ __webpack_exports__["a"] = (function(callback) {
  var node = this, current, next = [node], children, i, n;
  do {
    current = next.reverse(), next = [];
    while (node = current.pop()) {
      callback(node), children = node.children;
      if (children) for (i = 0, n = children.length; i < n; ++i) {
        next.push(children[i]);
      }
    }
  } while (next.length);
  return this;
});
 
 
/***/ }),
/* 1333 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony default export */ __webpack_exports__["a"] = (function(callback) {
  var node = this, nodes = [node], children, i;
  while (node = nodes.pop()) {
    callback(node), children = node.children;
    if (children) for (i = children.length - 1; i >= 0; --i) {
      nodes.push(children[i]);
    }
  }
  return this;
});
 
 
/***/ }),
/* 1334 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony default export */ __webpack_exports__["a"] = (function(callback) {
  var node = this, nodes = [node], next = [], children, i, n;
  while (node = nodes.pop()) {
    next.push(node), children = node.children;
    if (children) for (i = 0, n = children.length; i < n; ++i) {
      nodes.push(children[i]);
    }
  }
  while (node = next.pop()) {
    callback(node);
  }
  return this;
});
 
 
/***/ }),
/* 1335 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony default export */ __webpack_exports__["a"] = (function(value) {
  return this.eachAfter(function(node) {
    var sum = +value(node.data) || 0,
        children = node.children,
        i = children && children.length;
    while (--i >= 0) sum += children[i].value;
    node.value = sum;
  });
});
 
 
/***/ }),
/* 1336 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony default export */ __webpack_exports__["a"] = (function(compare) {
  return this.eachBefore(function(node) {
    if (node.children) {
      node.children.sort(compare);
    }
  });
});
 
 
/***/ }),
/* 1337 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony default export */ __webpack_exports__["a"] = (function(end) {
  var start = this,
      ancestor = leastCommonAncestor(start, end),
      nodes = [start];
  while (start !== ancestor) {
    start = start.parent;
    nodes.push(start);
  }
  var k = nodes.length;
  while (end !== ancestor) {
    nodes.splice(k, 0, end);
    end = end.parent;
  }
  return nodes;
});
 
function leastCommonAncestor(a, b) {
  if (a === b) return a;
  var aNodes = a.ancestors(),
      bNodes = b.ancestors(),
      c = null;
  a = aNodes.pop();
  b = bNodes.pop();
  while (a === b) {
    c = a;
    a = aNodes.pop();
    b = bNodes.pop();
  }
  return c;
}
 
 
/***/ }),
/* 1338 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony default export */ __webpack_exports__["a"] = (function() {
  var node = this, nodes = [node];
  while (node = node.parent) {
    nodes.push(node);
  }
  return nodes;
});
 
 
/***/ }),
/* 1339 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony default export */ __webpack_exports__["a"] = (function() {
  var nodes = [];
  this.each(function(node) {
    nodes.push(node);
  });
  return nodes;
});
 
 
/***/ }),
/* 1340 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony default export */ __webpack_exports__["a"] = (function() {
  var leaves = [];
  this.eachBefore(function(node) {
    if (!node.children) {
      leaves.push(node);
    }
  });
  return leaves;
});
 
 
/***/ }),
/* 1341 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony default export */ __webpack_exports__["a"] = (function() {
  var root = this, links = [];
  root.each(function(node) {
    if (node !== root) { // Don’t include the root’s parent, if any.
      links.push({source: node.parent, target: node});
    }
  });
  return links;
});
 
 
/***/ }),
/* 1342 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__siblings_js__ = __webpack_require__(753);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__accessors_js__ = __webpack_require__(363);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__constant_js__ = __webpack_require__(755);
 
 
 
 
function defaultRadius(d) {
  return Math.sqrt(d.value);
}
 
/* harmony default export */ __webpack_exports__["a"] = (function() {
  var radius = null,
      dx = 1,
      dy = 1,
      padding = __WEBPACK_IMPORTED_MODULE_2__constant_js__["a" /* constantZero */];
 
  function pack(root) {
    root.x = dx / 2, root.y = dy / 2;
    if (radius) {
      root.eachBefore(radiusLeaf(radius))
          .eachAfter(packChildren(padding, 0.5))
          .eachBefore(translateChild(1));
    } else {
      root.eachBefore(radiusLeaf(defaultRadius))
          .eachAfter(packChildren(__WEBPACK_IMPORTED_MODULE_2__constant_js__["a" /* constantZero */], 1))
          .eachAfter(packChildren(padding, root.r / Math.min(dx, dy)))
          .eachBefore(translateChild(Math.min(dx, dy) / (2 * root.r)));
    }
    return root;
  }
 
  pack.radius = function(x) {
    return arguments.length ? (radius = Object(__WEBPACK_IMPORTED_MODULE_1__accessors_js__["a" /* optional */])(x), pack) : radius;
  };
 
  pack.size = function(x) {
    return arguments.length ? (dx = +x[0], dy = +x[1], pack) : [dx, dy];
  };
 
  pack.padding = function(x) {
    return arguments.length ? (padding = typeof x === "function" ? x : Object(__WEBPACK_IMPORTED_MODULE_2__constant_js__["b" /* default */])(+x), pack) : padding;
  };
 
  return pack;
});
 
function radiusLeaf(radius) {
  return function(node) {
    if (!node.children) {
      node.r = Math.max(0, +radius(node) || 0);
    }
  };
}
 
function packChildren(padding, k) {
  return function(node) {
    if (children = node.children) {
      var children,
          i,
          n = children.length,
          r = padding(node) * k || 0,
          e;
 
      if (r) for (i = 0; i < n; ++i) children[i].r += r;
      e = Object(__WEBPACK_IMPORTED_MODULE_0__siblings_js__["b" /* packEnclose */])(children);
      if (r) for (i = 0; i < n; ++i) children[i].r -= r;
      node.r = e + r;
    }
  };
}
 
function translateChild(k) {
  return function(node) {
    var parent = node.parent;
    node.r *= k;
    if (parent) {
      node.x = parent.x + k * node.x;
      node.y = parent.y + k * node.y;
    }
  };
}
 
 
/***/ }),
/* 1343 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return slice; });
/* harmony export (immutable) */ __webpack_exports__["a"] = shuffle;
var slice = Array.prototype.slice;
 
function shuffle(array) {
  var m = array.length,
      t,
      i;
 
  while (m) {
    i = Math.random() * m-- | 0;
    t = array[m];
    array[m] = array[i];
    array[i] = t;
  }
 
  return array;
}
 
 
/***/ }),
/* 1344 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__treemap_round_js__ = __webpack_require__(756);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__treemap_dice_js__ = __webpack_require__(190);
 
 
 
/* harmony default export */ __webpack_exports__["a"] = (function() {
  var dx = 1,
      dy = 1,
      padding = 0,
      round = false;
 
  function partition(root) {
    var n = root.height + 1;
    root.x0 =
    root.y0 = padding;
    root.x1 = dx;
    root.y1 = dy / n;
    root.eachBefore(positionNode(dy, n));
    if (round) root.eachBefore(__WEBPACK_IMPORTED_MODULE_0__treemap_round_js__["a" /* default */]);
    return root;
  }
 
  function positionNode(dy, n) {
    return function(node) {
      if (node.children) {
        Object(__WEBPACK_IMPORTED_MODULE_1__treemap_dice_js__["a" /* default */])(node, node.x0, dy * (node.depth + 1) / n, node.x1, dy * (node.depth + 2) / n);
      }
      var x0 = node.x0,
          y0 = node.y0,
          x1 = node.x1 - padding,
          y1 = node.y1 - padding;
      if (x1 < x0) x0 = x1 = (x0 + x1) / 2;
      if (y1 < y0) y0 = y1 = (y0 + y1) / 2;
      node.x0 = x0;
      node.y0 = y0;
      node.x1 = x1;
      node.y1 = y1;
    };
  }
 
  partition.round = function(x) {
    return arguments.length ? (round = !!x, partition) : round;
  };
 
  partition.size = function(x) {
    return arguments.length ? (dx = +x[0], dy = +x[1], partition) : [dx, dy];
  };
 
  partition.padding = function(x) {
    return arguments.length ? (padding = +x, partition) : padding;
  };
 
  return partition;
});
 
 
/***/ }),
/* 1345 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__accessors_js__ = __webpack_require__(363);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__hierarchy_index_js__ = __webpack_require__(362);
 
 
 
var keyPrefix = "$", // Protect against keys like “__proto__”.
    preroot = {depth: -1},
    ambiguous = {};
 
function defaultId(d) {
  return d.id;
}
 
function defaultParentId(d) {
  return d.parentId;
}
 
/* harmony default export */ __webpack_exports__["a"] = (function() {
  var id = defaultId,
      parentId = defaultParentId;
 
  function stratify(data) {
    var d,
        i,
        n = data.length,
        root,
        parent,
        node,
        nodes = new Array(n),
        nodeId,
        nodeKey,
        nodeByKey = {};
 
    for (i = 0; i < n; ++i) {
      d = data[i], node = nodes[i] = new __WEBPACK_IMPORTED_MODULE_1__hierarchy_index_js__["a" /* Node */](d);
      if ((nodeId = id(d, i, data)) != null && (nodeId += "")) {
        nodeKey = keyPrefix + (node.id = nodeId);
        nodeByKey[nodeKey] = nodeKey in nodeByKey ? ambiguous : node;
      }
    }
 
    for (i = 0; i < n; ++i) {
      node = nodes[i], nodeId = parentId(data[i], i, data);
      if (nodeId == null || !(nodeId += "")) {
        if (root) throw new Error("multiple roots");
        root = node;
      } else {
        parent = nodeByKey[keyPrefix + nodeId];
        if (!parent) throw new Error("missing: " + nodeId);
        if (parent === ambiguous) throw new Error("ambiguous: " + nodeId);
        if (parent.children) parent.children.push(node);
        else parent.children = [node];
        node.parent = parent;
      }
    }
 
    if (!root) throw new Error("no root");
    root.parent = preroot;
    root.eachBefore(function(node) { node.depth = node.parent.depth + 1; --n; }).eachBefore(__WEBPACK_IMPORTED_MODULE_1__hierarchy_index_js__["b" /* computeHeight */]);
    root.parent = null;
    if (n > 0) throw new Error("cycle");
 
    return root;
  }
 
  stratify.id = function(x) {
    return arguments.length ? (id = Object(__WEBPACK_IMPORTED_MODULE_0__accessors_js__["b" /* required */])(x), stratify) : id;
  };
 
  stratify.parentId = function(x) {
    return arguments.length ? (parentId = Object(__WEBPACK_IMPORTED_MODULE_0__accessors_js__["b" /* required */])(x), stratify) : parentId;
  };
 
  return stratify;
});
 
 
/***/ }),
/* 1346 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__hierarchy_index_js__ = __webpack_require__(362);
 
 
function defaultSeparation(a, b) {
  return a.parent === b.parent ? 1 : 2;
}
 
// function radialSeparation(a, b) {
//   return (a.parent === b.parent ? 1 : 2) / a.depth;
// }
 
// This function is used to traverse the left contour of a subtree (or
// subforest). It returns the successor of v on this contour. This successor is
// either given by the leftmost child of v or by the thread of v. The function
// returns null if and only if v is on the highest level of its subtree.
function nextLeft(v) {
  var children = v.children;
  return children ? children[0] : v.t;
}
 
// This function works analogously to nextLeft.
function nextRight(v) {
  var children = v.children;
  return children ? children[children.length - 1] : v.t;
}
 
// Shifts the current subtree rooted at w+. This is done by increasing
// prelim(w+) and mod(w+) by shift.
function moveSubtree(wm, wp, shift) {
  var change = shift / (wp.i - wm.i);
  wp.c -= change;
  wp.s += shift;
  wm.c += change;
  wp.z += shift;
  wp.m += shift;
}
 
// All other shifts, applied to the smaller subtrees between w- and w+, are
// performed by this function. To prepare the shifts, we have to adjust
// change(w+), shift(w+), and change(w-).
function executeShifts(v) {
  var shift = 0,
      change = 0,
      children = v.children,
      i = children.length,
      w;
  while (--i >= 0) {
    w = children[i];
    w.z += shift;
    w.m += shift;
    shift += w.s + (change += w.c);
  }
}
 
// If vi-’s ancestor is a sibling of v, returns vi-’s ancestor. Otherwise,
// returns the specified (default) ancestor.
function nextAncestor(vim, v, ancestor) {
  return vim.a.parent === v.parent ? vim.a : ancestor;
}
 
function TreeNode(node, i) {
  this._ = node;
  this.parent = null;
  this.children = null;
  this.A = null; // default ancestor
  this.a = this; // ancestor
  this.z = 0; // prelim
  this.m = 0; // mod
  this.c = 0; // change
  this.s = 0; // shift
  this.t = null; // thread
  this.i = i; // number
}
 
TreeNode.prototype = Object.create(__WEBPACK_IMPORTED_MODULE_0__hierarchy_index_js__["a" /* Node */].prototype);
 
function treeRoot(root) {
  var tree = new TreeNode(root, 0),
      node,
      nodes = [tree],
      child,
      children,
      i,
      n;
 
  while (node = nodes.pop()) {
    if (children = node._.children) {
      node.children = new Array(n = children.length);
      for (i = n - 1; i >= 0; --i) {
        nodes.push(child = node.children[i] = new TreeNode(children[i], i));
        child.parent = node;
      }
    }
  }
 
  (tree.parent = new TreeNode(null, 0)).children = [tree];
  return tree;
}
 
// Node-link tree diagram using the Reingold-Tilford "tidy" algorithm
/* harmony default export */ __webpack_exports__["a"] = (function() {
  var separation = defaultSeparation,
      dx = 1,
      dy = 1,
      nodeSize = null;
 
  function tree(root) {
    var t = treeRoot(root);
 
    // Compute the layout using Buchheim et al.’s algorithm.
    t.eachAfter(firstWalk), t.parent.m = -t.z;
    t.eachBefore(secondWalk);
 
    // If a fixed node size is specified, scale x and y.
    if (nodeSize) root.eachBefore(sizeNode);
 
    // If a fixed tree size is specified, scale x and y based on the extent.
    // Compute the left-most, right-most, and depth-most nodes for extents.
    else {
      var left = root,
          right = root,
          bottom = root;
      root.eachBefore(function(node) {
        if (node.x < left.x) left = node;
        if (node.x > right.x) right = node;
        if (node.depth > bottom.depth) bottom = node;
      });
      var s = left === right ? 1 : separation(left, right) / 2,
          tx = s - left.x,
          kx = dx / (right.x + s + tx),
          ky = dy / (bottom.depth || 1);
      root.eachBefore(function(node) {
        node.x = (node.x + tx) * kx;
        node.y = node.depth * ky;
      });
    }
 
    return root;
  }
 
  // Computes a preliminary x-coordinate for v. Before that, FIRST WALK is
  // applied recursively to the children of v, as well as the function
  // APPORTION. After spacing out the children by calling EXECUTE SHIFTS, the
  // node v is placed to the midpoint of its outermost children.
  function firstWalk(v) {
    var children = v.children,
        siblings = v.parent.children,
        w = v.i ? siblings[v.i - 1] : null;
    if (children) {
      executeShifts(v);
      var midpoint = (children[0].z + children[children.length - 1].z) / 2;
      if (w) {
        v.z = w.z + separation(v._, w._);
        v.m = v.z - midpoint;
      } else {
        v.z = midpoint;
      }
    } else if (w) {
      v.z = w.z + separation(v._, w._);
    }
    v.parent.A = apportion(v, w, v.parent.A || siblings[0]);
  }
 
  // Computes all real x-coordinates by summing up the modifiers recursively.
  function secondWalk(v) {
    v._.x = v.z + v.parent.m;
    v.m += v.parent.m;
  }
 
  // The core of the algorithm. Here, a new subtree is combined with the
  // previous subtrees. Threads are used to traverse the inside and outside
  // contours of the left and right subtree up to the highest common level. The
  // vertices used for the traversals are vi+, vi-, vo-, and vo+, where the
  // superscript o means outside and i means inside, the subscript - means left
  // subtree and + means right subtree. For summing up the modifiers along the
  // contour, we use respective variables si+, si-, so-, and so+. Whenever two
  // nodes of the inside contours conflict, we compute the left one of the
  // greatest uncommon ancestors using the function ANCESTOR and call MOVE
  // SUBTREE to shift the subtree and prepare the shifts of smaller subtrees.
  // Finally, we add a new thread (if necessary).
  function apportion(v, w, ancestor) {
    if (w) {
      var vip = v,
          vop = v,
          vim = w,
          vom = vip.parent.children[0],
          sip = vip.m,
          sop = vop.m,
          sim = vim.m,
          som = vom.m,
          shift;
      while (vim = nextRight(vim), vip = nextLeft(vip), vim && vip) {
        vom = nextLeft(vom);
        vop = nextRight(vop);
        vop.a = v;
        shift = vim.z + sim - vip.z - sip + separation(vim._, vip._);
        if (shift > 0) {
          moveSubtree(nextAncestor(vim, v, ancestor), v, shift);
          sip += shift;
          sop += shift;
        }
        sim += vim.m;
        sip += vip.m;
        som += vom.m;
        sop += vop.m;
      }
      if (vim && !nextRight(vop)) {
        vop.t = vim;
        vop.m += sim - sop;
      }
      if (vip && !nextLeft(vom)) {
        vom.t = vip;
        vom.m += sip - som;
        ancestor = v;
      }
    }
    return ancestor;
  }
 
  function sizeNode(node) {
    node.x *= dx;
    node.y = node.depth * dy;
  }
 
  tree.separation = function(x) {
    return arguments.length ? (separation = x, tree) : separation;
  };
 
  tree.size = function(x) {
    return arguments.length ? (nodeSize = false, dx = +x[0], dy = +x[1], tree) : (nodeSize ? null : [dx, dy]);
  };
 
  tree.nodeSize = function(x) {
    return arguments.length ? (nodeSize = true, dx = +x[0], dy = +x[1], tree) : (nodeSize ? [dx, dy] : null);
  };
 
  return tree;
});
 
 
/***/ }),
/* 1347 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__round_js__ = __webpack_require__(756);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__squarify_js__ = __webpack_require__(364);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__accessors_js__ = __webpack_require__(363);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__constant_js__ = __webpack_require__(755);
 
 
 
 
 
/* harmony default export */ __webpack_exports__["a"] = (function() {
  var tile = __WEBPACK_IMPORTED_MODULE_1__squarify_js__["a" /* default */],
      round = false,
      dx = 1,
      dy = 1,
      paddingStack = [0],
      paddingInner = __WEBPACK_IMPORTED_MODULE_3__constant_js__["a" /* constantZero */],
      paddingTop = __WEBPACK_IMPORTED_MODULE_3__constant_js__["a" /* constantZero */],
      paddingRight = __WEBPACK_IMPORTED_MODULE_3__constant_js__["a" /* constantZero */],
      paddingBottom = __WEBPACK_IMPORTED_MODULE_3__constant_js__["a" /* constantZero */],
      paddingLeft = __WEBPACK_IMPORTED_MODULE_3__constant_js__["a" /* constantZero */];
 
  function treemap(root) {
    root.x0 =
    root.y0 = 0;
    root.x1 = dx;
    root.y1 = dy;
    root.eachBefore(positionNode);
    paddingStack = [0];
    if (round) root.eachBefore(__WEBPACK_IMPORTED_MODULE_0__round_js__["a" /* default */]);
    return root;
  }
 
  function positionNode(node) {
    var p = paddingStack[node.depth],
        x0 = node.x0 + p,
        y0 = node.y0 + p,
        x1 = node.x1 - p,
        y1 = node.y1 - p;
    if (x1 < x0) x0 = x1 = (x0 + x1) / 2;
    if (y1 < y0) y0 = y1 = (y0 + y1) / 2;
    node.x0 = x0;
    node.y0 = y0;
    node.x1 = x1;
    node.y1 = y1;
    if (node.children) {
      p = paddingStack[node.depth + 1] = paddingInner(node) / 2;
      x0 += paddingLeft(node) - p;
      y0 += paddingTop(node) - p;
      x1 -= paddingRight(node) - p;
      y1 -= paddingBottom(node) - p;
      if (x1 < x0) x0 = x1 = (x0 + x1) / 2;
      if (y1 < y0) y0 = y1 = (y0 + y1) / 2;
      tile(node, x0, y0, x1, y1);
    }
  }
 
  treemap.round = function(x) {
    return arguments.length ? (round = !!x, treemap) : round;
  };
 
  treemap.size = function(x) {
    return arguments.length ? (dx = +x[0], dy = +x[1], treemap) : [dx, dy];
  };
 
  treemap.tile = function(x) {
    return arguments.length ? (tile = Object(__WEBPACK_IMPORTED_MODULE_2__accessors_js__["b" /* required */])(x), treemap) : tile;
  };
 
  treemap.padding = function(x) {
    return arguments.length ? treemap.paddingInner(x).paddingOuter(x) : treemap.paddingInner();
  };
 
  treemap.paddingInner = function(x) {
    return arguments.length ? (paddingInner = typeof x === "function" ? x : Object(__WEBPACK_IMPORTED_MODULE_3__constant_js__["b" /* default */])(+x), treemap) : paddingInner;
  };
 
  treemap.paddingOuter = function(x) {
    return arguments.length ? treemap.paddingTop(x).paddingRight(x).paddingBottom(x).paddingLeft(x) : treemap.paddingTop();
  };
 
  treemap.paddingTop = function(x) {
    return arguments.length ? (paddingTop = typeof x === "function" ? x : Object(__WEBPACK_IMPORTED_MODULE_3__constant_js__["b" /* default */])(+x), treemap) : paddingTop;
  };
 
  treemap.paddingRight = function(x) {
    return arguments.length ? (paddingRight = typeof x === "function" ? x : Object(__WEBPACK_IMPORTED_MODULE_3__constant_js__["b" /* default */])(+x), treemap) : paddingRight;
  };
 
  treemap.paddingBottom = function(x) {
    return arguments.length ? (paddingBottom = typeof x === "function" ? x : Object(__WEBPACK_IMPORTED_MODULE_3__constant_js__["b" /* default */])(+x), treemap) : paddingBottom;
  };
 
  treemap.paddingLeft = function(x) {
    return arguments.length ? (paddingLeft = typeof x === "function" ? x : Object(__WEBPACK_IMPORTED_MODULE_3__constant_js__["b" /* default */])(+x), treemap) : paddingLeft;
  };
 
  return treemap;
});
 
 
/***/ }),
/* 1348 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony default export */ __webpack_exports__["a"] = (function(parent, x0, y0, x1, y1) {
  var nodes = parent.children,
      i, n = nodes.length,
      sum, sums = new Array(n + 1);
 
  for (sums[0] = sum = i = 0; i < n; ++i) {
    sums[i + 1] = sum += nodes[i].value;
  }
 
  partition(0, n, parent.value, x0, y0, x1, y1);
 
  function partition(i, j, value, x0, y0, x1, y1) {
    if (i >= j - 1) {
      var node = nodes[i];
      node.x0 = x0, node.y0 = y0;
      node.x1 = x1, node.y1 = y1;
      return;
    }
 
    var valueOffset = sums[i],
        valueTarget = (value / 2) + valueOffset,
        k = i + 1,
        hi = j - 1;
 
    while (k < hi) {
      var mid = k + hi >>> 1;
      if (sums[mid] < valueTarget) k = mid + 1;
      else hi = mid;
    }
 
    if ((valueTarget - sums[k - 1]) < (sums[k] - valueTarget) && i + 1 < k) --k;
 
    var valueLeft = sums[k] - valueOffset,
        valueRight = value - valueLeft;
 
    if ((x1 - x0) > (y1 - y0)) {
      var xk = (x0 * valueRight + x1 * valueLeft) / value;
      partition(i, k, valueLeft, x0, y0, xk, y1);
      partition(k, j, valueRight, xk, y0, x1, y1);
    } else {
      var yk = (y0 * valueRight + y1 * valueLeft) / value;
      partition(i, k, valueLeft, x0, y0, x1, yk);
      partition(k, j, valueRight, x0, yk, x1, y1);
    }
  }
});
 
 
/***/ }),
/* 1349 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__dice_js__ = __webpack_require__(190);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__slice_js__ = __webpack_require__(255);
 
 
 
/* harmony default export */ __webpack_exports__["a"] = (function(parent, x0, y0, x1, y1) {
  (parent.depth & 1 ? __WEBPACK_IMPORTED_MODULE_1__slice_js__["a" /* default */] : __WEBPACK_IMPORTED_MODULE_0__dice_js__["a" /* default */])(parent, x0, y0, x1, y1);
});
 
 
/***/ }),
/* 1350 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__dice_js__ = __webpack_require__(190);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__slice_js__ = __webpack_require__(255);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__squarify_js__ = __webpack_require__(364);
 
 
 
 
/* harmony default export */ __webpack_exports__["a"] = ((function custom(ratio) {
 
  function resquarify(parent, x0, y0, x1, y1) {
    if ((rows = parent._squarify) && (rows.ratio === ratio)) {
      var rows,
          row,
          nodes,
          i,
          j = -1,
          n,
          m = rows.length,
          value = parent.value;
 
      while (++j < m) {
        row = rows[j], nodes = row.children;
        for (i = row.value = 0, n = nodes.length; i < n; ++i) row.value += nodes[i].value;
        if (row.dice) Object(__WEBPACK_IMPORTED_MODULE_0__dice_js__["a" /* default */])(row, x0, y0, x1, y0 += (y1 - y0) * row.value / value);
        else Object(__WEBPACK_IMPORTED_MODULE_1__slice_js__["a" /* default */])(row, x0, y0, x0 += (x1 - x0) * row.value / value, y1);
        value -= row.value;
      }
    } else {
      parent._squarify = rows = Object(__WEBPACK_IMPORTED_MODULE_2__squarify_js__["c" /* squarifyRatio */])(ratio, parent, x0, y0, x1, y1);
      rows.ratio = ratio;
    }
  }
 
  resquarify.ratio = function(x) {
    return custom((x = +x) > 1 ? x : 1);
  };
 
  return resquarify;
})(__WEBPACK_IMPORTED_MODULE_2__squarify_js__["b" /* phi */]));
 
 
/***/ }),
/* 1351 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__area_js__ = __webpack_require__(1352);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_0__area_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__centroid_js__ = __webpack_require__(1353);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return __WEBPACK_IMPORTED_MODULE_1__centroid_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__hull_js__ = __webpack_require__(1354);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return __WEBPACK_IMPORTED_MODULE_2__hull_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__contains_js__ = __webpack_require__(1356);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return __WEBPACK_IMPORTED_MODULE_3__contains_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__length_js__ = __webpack_require__(1357);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return __WEBPACK_IMPORTED_MODULE_4__length_js__["a"]; });
 
 
 
 
 
 
 
/***/ }),
/* 1352 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony default export */ __webpack_exports__["a"] = (function(polygon) {
  var i = -1,
      n = polygon.length,
      a,
      b = polygon[n - 1],
      area = 0;
 
  while (++i < n) {
    a = b;
    b = polygon[i];
    area += a[1] * b[0] - a[0] * b[1];
  }
 
  return area / 2;
});
 
 
/***/ }),
/* 1353 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony default export */ __webpack_exports__["a"] = (function(polygon) {
  var i = -1,
      n = polygon.length,
      x = 0,
      y = 0,
      a,
      b = polygon[n - 1],
      c,
      k = 0;
 
  while (++i < n) {
    a = b;
    b = polygon[i];
    k += c = a[0] * b[1] - b[0] * a[1];
    x += (a[0] + b[0]) * c;
    y += (a[1] + b[1]) * c;
  }
 
  return k *= 3, [x / k, y / k];
});
 
 
/***/ }),
/* 1354 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__cross_js__ = __webpack_require__(1355);
 
 
function lexicographicOrder(a, b) {
  return a[0] - b[0] || a[1] - b[1];
}
 
// Computes the upper convex hull per the monotone chain algorithm.
// Assumes points.length >= 3, is sorted by x, unique in y.
// Returns an array of indices into points in left-to-right order.
function computeUpperHullIndexes(points) {
  var n = points.length,
      indexes = [0, 1],
      size = 2;
 
  for (var i = 2; i < n; ++i) {
    while (size > 1 && Object(__WEBPACK_IMPORTED_MODULE_0__cross_js__["a" /* default */])(points[indexes[size - 2]], points[indexes[size - 1]], points[i]) <= 0) --size;
    indexes[size++] = i;
  }
 
  return indexes.slice(0, size); // remove popped points
}
 
/* harmony default export */ __webpack_exports__["a"] = (function(points) {
  if ((n = points.length) < 3) return null;
 
  var i,
      n,
      sortedPoints = new Array(n),
      flippedPoints = new Array(n);
 
  for (i = 0; i < n; ++i) sortedPoints[i] = [+points[i][0], +points[i][1], i];
  sortedPoints.sort(lexicographicOrder);
  for (i = 0; i < n; ++i) flippedPoints[i] = [sortedPoints[i][0], -sortedPoints[i][1]];
 
  var upperIndexes = computeUpperHullIndexes(sortedPoints),
      lowerIndexes = computeUpperHullIndexes(flippedPoints);
 
  // Construct the hull polygon, removing possible duplicate endpoints.
  var skipLeft = lowerIndexes[0] === upperIndexes[0],
      skipRight = lowerIndexes[lowerIndexes.length - 1] === upperIndexes[upperIndexes.length - 1],
      hull = [];
 
  // Add upper hull in right-to-l order.
  // Then add lower hull in left-to-right order.
  for (i = upperIndexes.length - 1; i >= 0; --i) hull.push(points[sortedPoints[upperIndexes[i]][2]]);
  for (i = +skipLeft; i < lowerIndexes.length - skipRight; ++i) hull.push(points[sortedPoints[lowerIndexes[i]][2]]);
 
  return hull;
});
 
 
/***/ }),
/* 1355 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
// Returns the 2D cross product of AB and AC vectors, i.e., the z-component of
// the 3D cross product in a quadrant I Cartesian coordinate system (+x is
// right, +y is up). Returns a positive value if ABC is counter-clockwise,
// negative if clockwise, and zero if the points are collinear.
/* harmony default export */ __webpack_exports__["a"] = (function(a, b, c) {
  return (b[0] - a[0]) * (c[1] - a[1]) - (b[1] - a[1]) * (c[0] - a[0]);
});
 
 
/***/ }),
/* 1356 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony default export */ __webpack_exports__["a"] = (function(polygon, point) {
  var n = polygon.length,
      p = polygon[n - 1],
      x = point[0], y = point[1],
      x0 = p[0], y0 = p[1],
      x1, y1,
      inside = false;
 
  for (var i = 0; i < n; ++i) {
    p = polygon[i], x1 = p[0], y1 = p[1];
    if (((y1 > y) !== (y0 > y)) && (x < (x0 - x1) * (y - y1) / (y0 - y1) + x1)) inside = !inside;
    x0 = x1, y0 = y1;
  }
 
  return inside;
});
 
 
/***/ }),
/* 1357 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony default export */ __webpack_exports__["a"] = (function(polygon) {
  var i = -1,
      n = polygon.length,
      b = polygon[n - 1],
      xa,
      ya,
      xb = b[0],
      yb = b[1],
      perimeter = 0;
 
  while (++i < n) {
    xa = xb;
    ya = yb;
    b = polygon[i];
    xb = b[0];
    yb = b[1];
    xa -= xb;
    ya -= yb;
    perimeter += Math.sqrt(xa * xa + ya * ya);
  }
 
  return perimeter;
});
 
 
/***/ }),
/* 1358 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__uniform__ = __webpack_require__(1359);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return __WEBPACK_IMPORTED_MODULE_0__uniform__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__normal__ = __webpack_require__(757);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return __WEBPACK_IMPORTED_MODULE_1__normal__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__logNormal__ = __webpack_require__(1360);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return __WEBPACK_IMPORTED_MODULE_2__logNormal__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__bates__ = __webpack_require__(1361);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_3__bates__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__irwinHall__ = __webpack_require__(758);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return __WEBPACK_IMPORTED_MODULE_4__irwinHall__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__exponential__ = __webpack_require__(1362);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return __WEBPACK_IMPORTED_MODULE_5__exponential__["a"]; });
 
 
 
 
 
 
 
 
/***/ }),
/* 1359 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__defaultSource__ = __webpack_require__(153);
 
 
/* harmony default export */ __webpack_exports__["a"] = ((function sourceRandomUniform(source) {
  function randomUniform(min, max) {
    min = min == null ? 0 : +min;
    max = max == null ? 1 : +max;
    if (arguments.length === 1) max = min, min = 0;
    else max -= min;
    return function() {
      return source() * max + min;
    };
  }
 
  randomUniform.source = sourceRandomUniform;
 
  return randomUniform;
})(__WEBPACK_IMPORTED_MODULE_0__defaultSource__["a" /* default */]));
 
 
/***/ }),
/* 1360 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__defaultSource__ = __webpack_require__(153);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__normal__ = __webpack_require__(757);
 
 
 
/* harmony default export */ __webpack_exports__["a"] = ((function sourceRandomLogNormal(source) {
  function randomLogNormal() {
    var randomNormal = __WEBPACK_IMPORTED_MODULE_1__normal__["a" /* default */].source(source).apply(this, arguments);
    return function() {
      return Math.exp(randomNormal());
    };
  }
 
  randomLogNormal.source = sourceRandomLogNormal;
 
  return randomLogNormal;
})(__WEBPACK_IMPORTED_MODULE_0__defaultSource__["a" /* default */]));
 
 
/***/ }),
/* 1361 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__defaultSource__ = __webpack_require__(153);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__irwinHall__ = __webpack_require__(758);
 
 
 
/* harmony default export */ __webpack_exports__["a"] = ((function sourceRandomBates(source) {
  function randomBates(n) {
    var randomIrwinHall = __WEBPACK_IMPORTED_MODULE_1__irwinHall__["a" /* default */].source(source)(n);
    return function() {
      return randomIrwinHall() / n;
    };
  }
 
  randomBates.source = sourceRandomBates;
 
  return randomBates;
})(__WEBPACK_IMPORTED_MODULE_0__defaultSource__["a" /* default */]));
 
 
/***/ }),
/* 1362 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__defaultSource__ = __webpack_require__(153);
 
 
/* harmony default export */ __webpack_exports__["a"] = ((function sourceRandomExponential(source) {
  function randomExponential(lambda) {
    return function() {
      return -Math.log(1 - source()) / lambda;
    };
  }
 
  randomExponential.source = sourceRandomExponential;
 
  return randomExponential;
})(__WEBPACK_IMPORTED_MODULE_0__defaultSource__["a" /* default */]));
 
 
/***/ }),
/* 1363 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = band;
/* harmony export (immutable) */ __webpack_exports__["b"] = point;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_d3_array__ = __webpack_require__(44);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__init__ = __webpack_require__(57);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__ordinal__ = __webpack_require__(760);
 
 
 
 
function band() {
  var scale = Object(__WEBPACK_IMPORTED_MODULE_2__ordinal__["a" /* default */])().unknown(undefined),
      domain = scale.domain,
      ordinalRange = scale.range,
      range = [0, 1],
      step,
      bandwidth,
      round = false,
      paddingInner = 0,
      paddingOuter = 0,
      align = 0.5;
 
  delete scale.unknown;
 
  function rescale() {
    var n = domain().length,
        reverse = range[1] < range[0],
        start = range[reverse - 0],
        stop = range[1 - reverse];
    step = (stop - start) / Math.max(1, n - paddingInner + paddingOuter * 2);
    Iif (round) step = Math.floor(step);
    start += (stop - start - step * (n - paddingInner)) * align;
    bandwidth = step * (1 - paddingInner);
    Iif (round) start = Math.round(start), bandwidth = Math.round(bandwidth);
    var values = Object(__WEBPACK_IMPORTED_MODULE_0_d3_array__["s" /* range */])(n).map(function(i) { return start + step * i; });
    return ordinalRange(reverse ? values.reverse() : values);
  }
 
  scale.domain = function(_) {
    return arguments.length ? (domain(_), rescale()) : domain();
  };
 
  scale.range = function(_) {
    return arguments.length ? (range = [+_[0], +_[1]], rescale()) : range.slice();
  };
 
  scale.rangeRound = function(_) {
    return range = [+_[0], +_[1]], round = true, rescale();
  };
 
  scale.bandwidth = function() {
    return bandwidth;
  };
 
  scale.step = function() {
    return step;
  };
 
  scale.round = function(_) {
    return arguments.length ? (round = !!_, rescale()) : round;
  };
 
  scale.padding = function(_) {
    return arguments.length ? (paddingInner = Math.min(1, paddingOuter = +_), rescale()) : paddingInner;
  };
 
  scale.paddingInner = function(_) {
    return arguments.length ? (paddingInner = Math.min(1, _), rescale()) : paddingInner;
  };
 
  scale.paddingOuter = function(_) {
    return arguments.length ? (paddingOuter = +_, rescale()) : paddingOuter;
  };
 
  scale.align = function(_) {
    return arguments.length ? (align = Math.max(0, Math.min(1, _)), rescale()) : align;
  };
 
  scale.copy = function() {
    return band(domain(), range)
        .round(round)
        .paddingInner(paddingInner)
        .paddingOuter(paddingOuter)
        .align(align);
  };
 
  return __WEBPACK_IMPORTED_MODULE_1__init__["b" /* initRange */].apply(rescale(), arguments);
}
 
function pointish(scale) {
  var copy = scale.copy;
 
  scale.padding = scale.paddingOuter;
  delete scale.paddingInner;
  delete scale.paddingOuter;
 
  scale.copy = function() {
    return pointish(copy());
  };
 
  return scale;
}
 
function point() {
  return pointish(band.apply(null, arguments).paddingInner(1));
}
 
 
/***/ }),
/* 1364 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = identity;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__array__ = __webpack_require__(122);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__linear__ = __webpack_require__(123);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__number__ = __webpack_require__(761);
 
 
 
 
function identity(domain) {
  var unknown;
 
  function scale(x) {
    return isNaN(x = +x) ? unknown : x;
  }
 
  scale.invert = scale;
 
  scale.domain = scale.range = function(_) {
    return arguments.length ? (domain = __WEBPACK_IMPORTED_MODULE_0__array__["a" /* map */].call(_, __WEBPACK_IMPORTED_MODULE_2__number__["a" /* default */]), scale) : domain.slice();
  };
 
  scale.unknown = function(_) {
    return arguments.length ? (unknown = _, scale) : unknown;
  };
 
  scale.copy = function() {
    return identity(domain).unknown(unknown);
  };
 
  domain = arguments.length ? __WEBPACK_IMPORTED_MODULE_0__array__["a" /* map */].call(domain, __WEBPACK_IMPORTED_MODULE_2__number__["a" /* default */]) : [0, 1];
 
  return Object(__WEBPACK_IMPORTED_MODULE_1__linear__["b" /* linearish */])(scale);
}
 
 
/***/ }),
/* 1365 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony default export */ __webpack_exports__["a"] = (function(x) {
  return function() {
    return x;
  };
});
 
 
/***/ }),
/* 1366 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = quantile;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_d3_array__ = __webpack_require__(44);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__array__ = __webpack_require__(122);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__init__ = __webpack_require__(57);
 
 
 
 
function quantile() {
  var domain = [],
      range = [],
      thresholds = [],
      unknown;
 
  function rescale() {
    var i = 0, n = Math.max(1, range.length);
    thresholds = new Array(n - 1);
    while (++i < n) thresholds[i - 1] = Object(__WEBPACK_IMPORTED_MODULE_0_d3_array__["r" /* quantile */])(domain, i / n);
    return scale;
  }
 
  function scale(x) {
    return isNaN(x = +x) ? unknown : range[Object(__WEBPACK_IMPORTED_MODULE_0_d3_array__["b" /* bisect */])(thresholds, x)];
  }
 
  scale.invertExtent = function(y) {
    var i = range.indexOf(y);
    return i < 0 ? [NaN, NaN] : [
      i > 0 ? thresholds[i - 1] : domain[0],
      i < thresholds.length ? thresholds[i] : domain[domain.length - 1]
    ];
  };
 
  scale.domain = function(_) {
    if (!arguments.length) return domain.slice();
    domain = [];
    for (var i = 0, n = _.length, d; i < n; ++i) if (d = _[i], d != null && !isNaN(d = +d)) domain.push(d);
    domain.sort(__WEBPACK_IMPORTED_MODULE_0_d3_array__["a" /* ascending */]);
    return rescale();
  };
 
  scale.range = function(_) {
    return arguments.length ? (range = __WEBPACK_IMPORTED_MODULE_1__array__["b" /* slice */].call(_), rescale()) : range.slice();
  };
 
  scale.unknown = function(_) {
    return arguments.length ? (unknown = _, scale) : unknown;
  };
 
  scale.quantiles = function() {
    return thresholds.slice();
  };
 
  scale.copy = function() {
    return quantile()
        .domain(domain)
        .range(range)
        .unknown(unknown);
  };
 
  return __WEBPACK_IMPORTED_MODULE_2__init__["b" /* initRange */].apply(scale, arguments);
}
 
 
/***/ }),
/* 1367 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = quantize;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_d3_array__ = __webpack_require__(44);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__array__ = __webpack_require__(122);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__linear__ = __webpack_require__(123);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__init__ = __webpack_require__(57);
 
 
 
 
 
function quantize() {
  var x0 = 0,
      x1 = 1,
      n = 1,
      domain = [0.5],
      range = [0, 1],
      unknown;
 
  function scale(x) {
    return x <= x ? range[Object(__WEBPACK_IMPORTED_MODULE_0_d3_array__["b" /* bisect */])(domain, x, 0, n)] : unknown;
  }
 
  function rescale() {
    var i = -1;
    domain = new Array(n);
    while (++i < n) domain[i] = ((i + 1) * x1 - (i - n) * x0) / (n + 1);
    return scale;
  }
 
  scale.domain = function(_) {
    return arguments.length ? (x0 = +_[0], x1 = +_[1], rescale()) : [x0, x1];
  };
 
  scale.range = function(_) {
    return arguments.length ? (n = (range = __WEBPACK_IMPORTED_MODULE_1__array__["b" /* slice */].call(_)).length - 1, rescale()) : range.slice();
  };
 
  scale.invertExtent = function(y) {
    var i = range.indexOf(y);
    return i < 0 ? [NaN, NaN]
        : i < 1 ? [x0, domain[0]]
        : i >= n ? [domain[n - 1], x1]
        : [domain[i - 1], domain[i]];
  };
 
  scale.unknown = function(_) {
    return arguments.length ? (unknown = _, scale) : scale;
  };
 
  scale.thresholds = function() {
    return domain.slice();
  };
 
  scale.copy = function() {
    return quantize()
        .domain([x0, x1])
        .range(range)
        .unknown(unknown);
  };
 
  return __WEBPACK_IMPORTED_MODULE_3__init__["b" /* initRange */].apply(Object(__WEBPACK_IMPORTED_MODULE_2__linear__["b" /* linearish */])(scale), arguments);
}
 
 
/***/ }),
/* 1368 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = threshold;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_d3_array__ = __webpack_require__(44);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__array__ = __webpack_require__(122);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__init__ = __webpack_require__(57);
 
 
 
 
function threshold() {
  var domain = [0.5],
      range = [0, 1],
      unknown,
      n = 1;
 
  function scale(x) {
    return x <= x ? range[Object(__WEBPACK_IMPORTED_MODULE_0_d3_array__["b" /* bisect */])(domain, x, 0, n)] : unknown;
  }
 
  scale.domain = function(_) {
    return arguments.length ? (domain = __WEBPACK_IMPORTED_MODULE_1__array__["b" /* slice */].call(_), n = Math.min(domain.length, range.length - 1), scale) : domain.slice();
  };
 
  scale.range = function(_) {
    return arguments.length ? (range = __WEBPACK_IMPORTED_MODULE_1__array__["b" /* slice */].call(_), n = Math.min(domain.length, range.length - 1), scale) : range.slice();
  };
 
  scale.invertExtent = function(y) {
    var i = range.indexOf(y);
    return [domain[i - 1], domain[i]];
  };
 
  scale.unknown = function(_) {
    return arguments.length ? (unknown = _, scale) : unknown;
  };
 
  scale.copy = function() {
    return threshold()
        .domain(domain)
        .range(range)
        .unknown(unknown);
  };
 
  return __WEBPACK_IMPORTED_MODULE_2__init__["b" /* initRange */].apply(scale, arguments);
}
 
 
/***/ }),
/* 1369 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return milliseconds; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__interval_js__ = __webpack_require__(52);
 
 
var millisecond = Object(__WEBPACK_IMPORTED_MODULE_0__interval_js__["a" /* default */])(function() {
  // noop
}, function(date, step) {
  date.setTime(+date + step);
}, function(start, end) {
  return end - start;
});
 
// An optimized implementation for this simple case.
millisecond.every = function(k) {
  k = Math.floor(k);
  if (!isFinite(k) || !(k > 0)) return null;
  if (!(k > 1)) return millisecond;
  return Object(__WEBPACK_IMPORTED_MODULE_0__interval_js__["a" /* default */])(function(date) {
    date.setTime(Math.floor(date / k) * k);
  }, function(date, step) {
    date.setTime(+date + step * k);
  }, function(start, end) {
    return (end - start) / k;
  });
};
 
/* harmony default export */ __webpack_exports__["a"] = (millisecond);
var milliseconds = millisecond.range;
 
 
/***/ }),
/* 1370 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return seconds; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__interval_js__ = __webpack_require__(52);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__duration_js__ = __webpack_require__(94);
 
 
 
var second = Object(__WEBPACK_IMPORTED_MODULE_0__interval_js__["a" /* default */])(function(date) {
  date.setTime(date - date.getMilliseconds());
}, function(date, step) {
  date.setTime(+date + step * __WEBPACK_IMPORTED_MODULE_1__duration_js__["d" /* durationSecond */]);
}, function(start, end) {
  return (end - start) / __WEBPACK_IMPORTED_MODULE_1__duration_js__["d" /* durationSecond */];
}, function(date) {
  return date.getUTCSeconds();
});
 
/* harmony default export */ __webpack_exports__["a"] = (second);
var seconds = second.range;
 
 
/***/ }),
/* 1371 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return minutes; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__interval_js__ = __webpack_require__(52);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__duration_js__ = __webpack_require__(94);
 
 
 
var minute = Object(__WEBPACK_IMPORTED_MODULE_0__interval_js__["a" /* default */])(function(date) {
  date.setTime(date - date.getMilliseconds() - date.getSeconds() * __WEBPACK_IMPORTED_MODULE_1__duration_js__["d" /* durationSecond */]);
}, function(date, step) {
  date.setTime(+date + step * __WEBPACK_IMPORTED_MODULE_1__duration_js__["c" /* durationMinute */]);
}, function(start, end) {
  return (end - start) / __WEBPACK_IMPORTED_MODULE_1__duration_js__["c" /* durationMinute */];
}, function(date) {
  return date.getMinutes();
});
 
/* harmony default export */ __webpack_exports__["a"] = (minute);
var minutes = minute.range;
 
 
/***/ }),
/* 1372 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return hours; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__interval_js__ = __webpack_require__(52);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__duration_js__ = __webpack_require__(94);
 
 
 
var hour = Object(__WEBPACK_IMPORTED_MODULE_0__interval_js__["a" /* default */])(function(date) {
  date.setTime(date - date.getMilliseconds() - date.getSeconds() * __WEBPACK_IMPORTED_MODULE_1__duration_js__["d" /* durationSecond */] - date.getMinutes() * __WEBPACK_IMPORTED_MODULE_1__duration_js__["c" /* durationMinute */]);
}, function(date, step) {
  date.setTime(+date + step * __WEBPACK_IMPORTED_MODULE_1__duration_js__["b" /* durationHour */]);
}, function(start, end) {
  return (end - start) / __WEBPACK_IMPORTED_MODULE_1__duration_js__["b" /* durationHour */];
}, function(date) {
  return date.getHours();
});
 
/* harmony default export */ __webpack_exports__["a"] = (hour);
var hours = hour.range;
 
 
/***/ }),
/* 1373 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return days; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__interval_js__ = __webpack_require__(52);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__duration_js__ = __webpack_require__(94);
 
 
 
var day = Object(__WEBPACK_IMPORTED_MODULE_0__interval_js__["a" /* default */])(function(date) {
  date.setHours(0, 0, 0, 0);
}, function(date, step) {
  date.setDate(date.getDate() + step);
}, function(start, end) {
  return (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * __WEBPACK_IMPORTED_MODULE_1__duration_js__["c" /* durationMinute */]) / __WEBPACK_IMPORTED_MODULE_1__duration_js__["a" /* durationDay */];
}, function(date) {
  return date.getDate() - 1;
});
 
/* harmony default export */ __webpack_exports__["b"] = (day);
var days = day.range;
 
 
/***/ }),
/* 1374 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return sunday; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return monday; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "k", function() { return tuesday; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "m", function() { return wednesday; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return thursday; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return friday; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return saturday; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return sundays; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return mondays; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "l", function() { return tuesdays; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "n", function() { return wednesdays; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return thursdays; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return fridays; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return saturdays; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__interval_js__ = __webpack_require__(52);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__duration_js__ = __webpack_require__(94);
 
 
 
function weekday(i) {
  return Object(__WEBPACK_IMPORTED_MODULE_0__interval_js__["a" /* default */])(function(date) {
    date.setDate(date.getDate() - (date.getDay() + 7 - i) % 7);
    date.setHours(0, 0, 0, 0);
  }, function(date, step) {
    date.setDate(date.getDate() + step * 7);
  }, function(start, end) {
    return (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * __WEBPACK_IMPORTED_MODULE_1__duration_js__["c" /* durationMinute */]) / __WEBPACK_IMPORTED_MODULE_1__duration_js__["e" /* durationWeek */];
  });
}
 
var sunday = weekday(0);
var monday = weekday(1);
var tuesday = weekday(2);
var wednesday = weekday(3);
var thursday = weekday(4);
var friday = weekday(5);
var saturday = weekday(6);
 
var sundays = sunday.range;
var mondays = monday.range;
var tuesdays = tuesday.range;
var wednesdays = wednesday.range;
var thursdays = thursday.range;
var fridays = friday.range;
var saturdays = saturday.range;
 
 
/***/ }),
/* 1375 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return months; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__interval_js__ = __webpack_require__(52);
 
 
var month = Object(__WEBPACK_IMPORTED_MODULE_0__interval_js__["a" /* default */])(function(date) {
  date.setDate(1);
  date.setHours(0, 0, 0, 0);
}, function(date, step) {
  date.setMonth(date.getMonth() + step);
}, function(start, end) {
  return end.getMonth() - start.getMonth() + (end.getFullYear() - start.getFullYear()) * 12;
}, function(date) {
  return date.getMonth();
});
 
/* harmony default export */ __webpack_exports__["a"] = (month);
var months = month.range;
 
 
/***/ }),
/* 1376 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return years; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__interval_js__ = __webpack_require__(52);
 
 
var year = Object(__WEBPACK_IMPORTED_MODULE_0__interval_js__["a" /* default */])(function(date) {
  date.setMonth(0, 1);
  date.setHours(0, 0, 0, 0);
}, function(date, step) {
  date.setFullYear(date.getFullYear() + step);
}, function(start, end) {
  return end.getFullYear() - start.getFullYear();
}, function(date) {
  return date.getFullYear();
});
 
// An optimized implementation for this simple case.
year.every = function(k) {
  return !isFinite(k = Math.floor(k)) || !(k > 0) ? null : Object(__WEBPACK_IMPORTED_MODULE_0__interval_js__["a" /* default */])(function(date) {
    date.setFullYear(Math.floor(date.getFullYear() / k) * k);
    date.setMonth(0, 1);
    date.setHours(0, 0, 0, 0);
  }, function(date, step) {
    date.setFullYear(date.getFullYear() + step * k);
  });
};
 
/* harmony default export */ __webpack_exports__["a"] = (year);
var years = year.range;
 
 
/***/ }),
/* 1377 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return utcMinutes; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__interval_js__ = __webpack_require__(52);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__duration_js__ = __webpack_require__(94);
 
 
 
var utcMinute = Object(__WEBPACK_IMPORTED_MODULE_0__interval_js__["a" /* default */])(function(date) {
  date.setUTCSeconds(0, 0);
}, function(date, step) {
  date.setTime(+date + step * __WEBPACK_IMPORTED_MODULE_1__duration_js__["c" /* durationMinute */]);
}, function(start, end) {
  return (end - start) / __WEBPACK_IMPORTED_MODULE_1__duration_js__["c" /* durationMinute */];
}, function(date) {
  return date.getUTCMinutes();
});
 
/* harmony default export */ __webpack_exports__["a"] = (utcMinute);
var utcMinutes = utcMinute.range;
 
 
/***/ }),
/* 1378 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return utcHours; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__interval_js__ = __webpack_require__(52);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__duration_js__ = __webpack_require__(94);
 
 
 
var utcHour = Object(__WEBPACK_IMPORTED_MODULE_0__interval_js__["a" /* default */])(function(date) {
  date.setUTCMinutes(0, 0, 0);
}, function(date, step) {
  date.setTime(+date + step * __WEBPACK_IMPORTED_MODULE_1__duration_js__["b" /* durationHour */]);
}, function(start, end) {
  return (end - start) / __WEBPACK_IMPORTED_MODULE_1__duration_js__["b" /* durationHour */];
}, function(date) {
  return date.getUTCHours();
});
 
/* harmony default export */ __webpack_exports__["a"] = (utcHour);
var utcHours = utcHour.range;
 
 
/***/ }),
/* 1379 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return utcDays; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__interval_js__ = __webpack_require__(52);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__duration_js__ = __webpack_require__(94);
 
 
 
var utcDay = Object(__WEBPACK_IMPORTED_MODULE_0__interval_js__["a" /* default */])(function(date) {
  date.setUTCHours(0, 0, 0, 0);
}, function(date, step) {
  date.setUTCDate(date.getUTCDate() + step);
}, function(start, end) {
  return (end - start) / __WEBPACK_IMPORTED_MODULE_1__duration_js__["a" /* durationDay */];
}, function(date) {
  return date.getUTCDate() - 1;
});
 
/* harmony default export */ __webpack_exports__["a"] = (utcDay);
var utcDays = utcDay.range;
 
 
/***/ }),
/* 1380 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return utcSunday; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return utcMonday; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "k", function() { return utcTuesday; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "m", function() { return utcWednesday; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return utcThursday; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return utcFriday; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return utcSaturday; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return utcSundays; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return utcMondays; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "l", function() { return utcTuesdays; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "n", function() { return utcWednesdays; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return utcThursdays; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return utcFridays; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return utcSaturdays; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__interval_js__ = __webpack_require__(52);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__duration_js__ = __webpack_require__(94);
 
 
 
function utcWeekday(i) {
  return Object(__WEBPACK_IMPORTED_MODULE_0__interval_js__["a" /* default */])(function(date) {
    date.setUTCDate(date.getUTCDate() - (date.getUTCDay() + 7 - i) % 7);
    date.setUTCHours(0, 0, 0, 0);
  }, function(date, step) {
    date.setUTCDate(date.getUTCDate() + step * 7);
  }, function(start, end) {
    return (end - start) / __WEBPACK_IMPORTED_MODULE_1__duration_js__["e" /* durationWeek */];
  });
}
 
var utcSunday = utcWeekday(0);
var utcMonday = utcWeekday(1);
var utcTuesday = utcWeekday(2);
var utcWednesday = utcWeekday(3);
var utcThursday = utcWeekday(4);
var utcFriday = utcWeekday(5);
var utcSaturday = utcWeekday(6);
 
var utcSundays = utcSunday.range;
var utcMondays = utcMonday.range;
var utcTuesdays = utcTuesday.range;
var utcWednesdays = utcWednesday.range;
var utcThursdays = utcThursday.range;
var utcFridays = utcFriday.range;
var utcSaturdays = utcSaturday.range;
 
 
/***/ }),
/* 1381 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return utcMonths; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__interval_js__ = __webpack_require__(52);
 
 
var utcMonth = Object(__WEBPACK_IMPORTED_MODULE_0__interval_js__["a" /* default */])(function(date) {
  date.setUTCDate(1);
  date.setUTCHours(0, 0, 0, 0);
}, function(date, step) {
  date.setUTCMonth(date.getUTCMonth() + step);
}, function(start, end) {
  return end.getUTCMonth() - start.getUTCMonth() + (end.getUTCFullYear() - start.getUTCFullYear()) * 12;
}, function(date) {
  return date.getUTCMonth();
});
 
/* harmony default export */ __webpack_exports__["a"] = (utcMonth);
var utcMonths = utcMonth.range;
 
 
/***/ }),
/* 1382 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return utcYears; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__interval_js__ = __webpack_require__(52);
 
 
var utcYear = Object(__WEBPACK_IMPORTED_MODULE_0__interval_js__["a" /* default */])(function(date) {
  date.setUTCMonth(0, 1);
  date.setUTCHours(0, 0, 0, 0);
}, function(date, step) {
  date.setUTCFullYear(date.getUTCFullYear() + step);
}, function(start, end) {
  return end.getUTCFullYear() - start.getUTCFullYear();
}, function(date) {
  return date.getUTCFullYear();
});
 
// An optimized implementation for this simple case.
utcYear.every = function(k) {
  return !isFinite(k = Math.floor(k)) || !(k > 0) ? null : Object(__WEBPACK_IMPORTED_MODULE_0__interval_js__["a" /* default */])(function(date) {
    date.setUTCFullYear(Math.floor(date.getUTCFullYear() / k) * k);
    date.setUTCMonth(0, 1);
    date.setUTCHours(0, 0, 0, 0);
  }, function(date, step) {
    date.setUTCFullYear(date.getUTCFullYear() + step * k);
  });
};
 
/* harmony default export */ __webpack_exports__["a"] = (utcYear);
var utcYears = utcYear.range;
 
 
/***/ }),
/* 1383 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isoFormat_js__ = __webpack_require__(766);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__defaultLocale_js__ = __webpack_require__(369);
 
 
 
function parseIsoNative(string) {
  var date = new Date(string);
  return isNaN(date) ? null : date;
}
 
var parseIso = +new Date("2000-01-01T00:00:00.000Z")
    ? parseIsoNative
    : Object(__WEBPACK_IMPORTED_MODULE_1__defaultLocale_js__["e" /* utcParse */])(__WEBPACK_IMPORTED_MODULE_0__isoFormat_js__["b" /* isoSpecifier */]);
 
/* harmony default export */ __webpack_exports__["a"] = (parseIso);
 
 
/***/ }),
/* 1384 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__time__ = __webpack_require__(764);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_d3_time_format__ = __webpack_require__(368);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_d3_time__ = __webpack_require__(256);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__init__ = __webpack_require__(57);
 
 
 
 
 
/* harmony default export */ __webpack_exports__["a"] = (function() {
  return __WEBPACK_IMPORTED_MODULE_3__init__["b" /* initRange */].apply(Object(__WEBPACK_IMPORTED_MODULE_0__time__["a" /* calendar */])(__WEBPACK_IMPORTED_MODULE_2_d3_time__["_7" /* utcYear */], __WEBPACK_IMPORTED_MODULE_2_d3_time__["R" /* utcMonth */], __WEBPACK_IMPORTED_MODULE_2_d3_time__["_5" /* utcWeek */], __WEBPACK_IMPORTED_MODULE_2_d3_time__["F" /* utcDay */], __WEBPACK_IMPORTED_MODULE_2_d3_time__["J" /* utcHour */], __WEBPACK_IMPORTED_MODULE_2_d3_time__["N" /* utcMinute */], __WEBPACK_IMPORTED_MODULE_2_d3_time__["V" /* utcSecond */], __WEBPACK_IMPORTED_MODULE_2_d3_time__["L" /* utcMillisecond */], __WEBPACK_IMPORTED_MODULE_1_d3_time_format__["g" /* utcFormat */]).domain([Date.UTC(2000, 0, 1), Date.UTC(2000, 0, 2)]), arguments);
});
 
 
/***/ }),
/* 1385 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = sequentialQuantile;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_d3_array__ = __webpack_require__(44);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__continuous__ = __webpack_require__(103);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__init__ = __webpack_require__(57);
 
 
 
 
function sequentialQuantile() {
  var domain = [],
      interpolator = __WEBPACK_IMPORTED_MODULE_1__continuous__["c" /* identity */];
 
  function scale(x) {
    if (!isNaN(x = +x)) return interpolator((Object(__WEBPACK_IMPORTED_MODULE_0_d3_array__["b" /* bisect */])(domain, x) - 1) / (domain.length - 1));
  }
 
  scale.domain = function(_) {
    if (!arguments.length) return domain.slice();
    domain = [];
    for (var i = 0, n = _.length, d; i < n; ++i) if (d = _[i], d != null && !isNaN(d = +d)) domain.push(d);
    domain.sort(__WEBPACK_IMPORTED_MODULE_0_d3_array__["a" /* ascending */]);
    return scale;
  };
 
  scale.interpolator = function(_) {
    return arguments.length ? (interpolator = _, scale) : interpolator;
  };
 
  scale.copy = function() {
    return sequentialQuantile(interpolator).domain(domain);
  };
 
  return __WEBPACK_IMPORTED_MODULE_2__init__["a" /* initInterpolator */].apply(scale, arguments);
}
 
 
/***/ }),
/* 1386 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = diverging;
/* harmony export (immutable) */ __webpack_exports__["b"] = divergingLog;
/* harmony export (immutable) */ __webpack_exports__["e"] = divergingSymlog;
/* harmony export (immutable) */ __webpack_exports__["c"] = divergingPow;
/* harmony export (immutable) */ __webpack_exports__["d"] = divergingSqrt;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__continuous__ = __webpack_require__(103);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__init__ = __webpack_require__(57);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__linear__ = __webpack_require__(123);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__log__ = __webpack_require__(365);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__sequential__ = __webpack_require__(767);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__symlog__ = __webpack_require__(366);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__pow__ = __webpack_require__(367);
 
 
 
 
 
 
 
 
function transformer() {
  var x0 = 0,
      x1 = 0.5,
      x2 = 1,
      t0,
      t1,
      t2,
      k10,
      k21,
      interpolator = __WEBPACK_IMPORTED_MODULE_0__continuous__["c" /* identity */],
      transform,
      clamp = false,
      unknown;
 
  function scale(x) {
    return isNaN(x = +x) ? unknown : (x = 0.5 + ((x = +transform(x)) - t1) * (x < t1 ? k10 : k21), interpolator(clamp ? Math.max(0, Math.min(1, x)) : x));
  }
 
  scale.domain = function(_) {
    return arguments.length ? (t0 = transform(x0 = +_[0]), t1 = transform(x1 = +_[1]), t2 = transform(x2 = +_[2]), k10 = t0 === t1 ? 0 : 0.5 / (t1 - t0), k21 = t1 === t2 ? 0 : 0.5 / (t2 - t1), scale) : [x0, x1, x2];
  };
 
  scale.clamp = function(_) {
    return arguments.length ? (clamp = !!_, scale) : clamp;
  };
 
  scale.interpolator = function(_) {
    return arguments.length ? (interpolator = _, scale) : interpolator;
  };
 
  scale.unknown = function(_) {
    return arguments.length ? (unknown = _, scale) : unknown;
  };
 
  return function(t) {
    transform = t, t0 = t(x0), t1 = t(x1), t2 = t(x2), k10 = t0 === t1 ? 0 : 0.5 / (t1 - t0), k21 = t1 === t2 ? 0 : 0.5 / (t2 - t1);
    return scale;
  };
}
 
function diverging() {
  var scale = Object(__WEBPACK_IMPORTED_MODULE_2__linear__["b" /* linearish */])(transformer()(__WEBPACK_IMPORTED_MODULE_0__continuous__["c" /* identity */]));
 
  scale.copy = function() {
    return Object(__WEBPACK_IMPORTED_MODULE_4__sequential__["a" /* copy */])(scale, diverging());
  };
 
  return __WEBPACK_IMPORTED_MODULE_1__init__["a" /* initInterpolator */].apply(scale, arguments);
}
 
function divergingLog() {
  var scale = Object(__WEBPACK_IMPORTED_MODULE_3__log__["b" /* loggish */])(transformer()).domain([0.1, 1, 10]);
 
  scale.copy = function() {
    return Object(__WEBPACK_IMPORTED_MODULE_4__sequential__["a" /* copy */])(scale, divergingLog()).base(scale.base());
  };
 
  return __WEBPACK_IMPORTED_MODULE_1__init__["a" /* initInterpolator */].apply(scale, arguments);
}
 
function divergingSymlog() {
  var scale = Object(__WEBPACK_IMPORTED_MODULE_5__symlog__["b" /* symlogish */])(transformer());
 
  scale.copy = function() {
    return Object(__WEBPACK_IMPORTED_MODULE_4__sequential__["a" /* copy */])(scale, divergingSymlog()).constant(scale.constant());
  };
 
  return __WEBPACK_IMPORTED_MODULE_1__init__["a" /* initInterpolator */].apply(scale, arguments);
}
 
function divergingPow() {
  var scale = Object(__WEBPACK_IMPORTED_MODULE_6__pow__["b" /* powish */])(transformer());
 
  scale.copy = function() {
    return Object(__WEBPACK_IMPORTED_MODULE_4__sequential__["a" /* copy */])(scale, divergingPow()).exponent(scale.exponent());
  };
 
  return __WEBPACK_IMPORTED_MODULE_1__init__["a" /* initInterpolator */].apply(scale, arguments);
}
 
function divergingSqrt() {
  return divergingPow.apply(null, arguments).exponent(0.5);
}
 
 
/***/ }),
/* 1387 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__categorical_category10_js__ = __webpack_require__(1388);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "R", function() { return __WEBPACK_IMPORTED_MODULE_0__categorical_category10_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__categorical_Accent_js__ = __webpack_require__(1389);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "M", function() { return __WEBPACK_IMPORTED_MODULE_1__categorical_Accent_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__categorical_Dark2_js__ = __webpack_require__(1390);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "S", function() { return __WEBPACK_IMPORTED_MODULE_2__categorical_Dark2_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__categorical_Paired_js__ = __webpack_require__(1391);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Z", function() { return __WEBPACK_IMPORTED_MODULE_3__categorical_Paired_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__categorical_Pastel1_js__ = __webpack_require__(1392);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "_0", function() { return __WEBPACK_IMPORTED_MODULE_4__categorical_Pastel1_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__categorical_Pastel2_js__ = __webpack_require__(1393);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "_1", function() { return __WEBPACK_IMPORTED_MODULE_5__categorical_Pastel2_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__categorical_Set1_js__ = __webpack_require__(1394);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "_14", function() { return __WEBPACK_IMPORTED_MODULE_6__categorical_Set1_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__categorical_Set2_js__ = __webpack_require__(1395);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "_15", function() { return __WEBPACK_IMPORTED_MODULE_7__categorical_Set2_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__categorical_Set3_js__ = __webpack_require__(1396);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "_16", function() { return __WEBPACK_IMPORTED_MODULE_8__categorical_Set3_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__categorical_Tableau10_js__ = __webpack_require__(1397);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "_18", function() { return __WEBPACK_IMPORTED_MODULE_9__categorical_Tableau10_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__diverging_BrBG_js__ = __webpack_require__(1398);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return __WEBPACK_IMPORTED_MODULE_10__diverging_BrBG_js__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "O", function() { return __WEBPACK_IMPORTED_MODULE_10__diverging_BrBG_js__["b"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__diverging_PRGn_js__ = __webpack_require__(1399);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "o", function() { return __WEBPACK_IMPORTED_MODULE_11__diverging_PRGn_js__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Y", function() { return __WEBPACK_IMPORTED_MODULE_11__diverging_PRGn_js__["b"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__diverging_PiYG_js__ = __webpack_require__(1400);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "p", function() { return __WEBPACK_IMPORTED_MODULE_12__diverging_PiYG_js__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "_2", function() { return __WEBPACK_IMPORTED_MODULE_12__diverging_PiYG_js__["b"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__diverging_PuOr_js__ = __webpack_require__(1401);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "t", function() { return __WEBPACK_IMPORTED_MODULE_13__diverging_PuOr_js__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "_5", function() { return __WEBPACK_IMPORTED_MODULE_13__diverging_PuOr_js__["b"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__diverging_RdBu_js__ = __webpack_require__(1402);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "x", function() { return __WEBPACK_IMPORTED_MODULE_14__diverging_RdBu_js__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "_8", function() { return __WEBPACK_IMPORTED_MODULE_14__diverging_RdBu_js__["b"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__diverging_RdGy_js__ = __webpack_require__(1403);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "y", function() { return __WEBPACK_IMPORTED_MODULE_15__diverging_RdGy_js__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "_9", function() { return __WEBPACK_IMPORTED_MODULE_15__diverging_RdGy_js__["b"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__diverging_RdYlBu_js__ = __webpack_require__(1404);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "A", function() { return __WEBPACK_IMPORTED_MODULE_16__diverging_RdYlBu_js__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "_11", function() { return __WEBPACK_IMPORTED_MODULE_16__diverging_RdYlBu_js__["b"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_17__diverging_RdYlGn_js__ = __webpack_require__(1405);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "B", function() { return __WEBPACK_IMPORTED_MODULE_17__diverging_RdYlGn_js__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "_12", function() { return __WEBPACK_IMPORTED_MODULE_17__diverging_RdYlGn_js__["b"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_18__diverging_Spectral_js__ = __webpack_require__(1406);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "E", function() { return __WEBPACK_IMPORTED_MODULE_18__diverging_Spectral_js__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "_17", function() { return __WEBPACK_IMPORTED_MODULE_18__diverging_Spectral_js__["b"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_19__sequential_multi_BuGn_js__ = __webpack_require__(1407);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return __WEBPACK_IMPORTED_MODULE_19__sequential_multi_BuGn_js__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "P", function() { return __WEBPACK_IMPORTED_MODULE_19__sequential_multi_BuGn_js__["b"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_20__sequential_multi_BuPu_js__ = __webpack_require__(1408);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return __WEBPACK_IMPORTED_MODULE_20__sequential_multi_BuPu_js__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Q", function() { return __WEBPACK_IMPORTED_MODULE_20__sequential_multi_BuPu_js__["b"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_21__sequential_multi_GnBu_js__ = __webpack_require__(1409);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return __WEBPACK_IMPORTED_MODULE_21__sequential_multi_GnBu_js__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "T", function() { return __WEBPACK_IMPORTED_MODULE_21__sequential_multi_GnBu_js__["b"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_22__sequential_multi_OrRd_js__ = __webpack_require__(1410);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "m", function() { return __WEBPACK_IMPORTED_MODULE_22__sequential_multi_OrRd_js__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "W", function() { return __WEBPACK_IMPORTED_MODULE_22__sequential_multi_OrRd_js__["b"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_23__sequential_multi_PuBuGn_js__ = __webpack_require__(1411);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "s", function() { return __WEBPACK_IMPORTED_MODULE_23__sequential_multi_PuBuGn_js__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "_4", function() { return __WEBPACK_IMPORTED_MODULE_23__sequential_multi_PuBuGn_js__["b"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_24__sequential_multi_PuBu_js__ = __webpack_require__(1412);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "r", function() { return __WEBPACK_IMPORTED_MODULE_24__sequential_multi_PuBu_js__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "_3", function() { return __WEBPACK_IMPORTED_MODULE_24__sequential_multi_PuBu_js__["b"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_25__sequential_multi_PuRd_js__ = __webpack_require__(1413);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "u", function() { return __WEBPACK_IMPORTED_MODULE_25__sequential_multi_PuRd_js__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "_6", function() { return __WEBPACK_IMPORTED_MODULE_25__sequential_multi_PuRd_js__["b"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_26__sequential_multi_RdPu_js__ = __webpack_require__(1414);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "z", function() { return __WEBPACK_IMPORTED_MODULE_26__sequential_multi_RdPu_js__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "_10", function() { return __WEBPACK_IMPORTED_MODULE_26__sequential_multi_RdPu_js__["b"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_27__sequential_multi_YlGnBu_js__ = __webpack_require__(1415);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "J", function() { return __WEBPACK_IMPORTED_MODULE_27__sequential_multi_YlGnBu_js__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "_20", function() { return __WEBPACK_IMPORTED_MODULE_27__sequential_multi_YlGnBu_js__["b"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_28__sequential_multi_YlGn_js__ = __webpack_require__(1416);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "I", function() { return __WEBPACK_IMPORTED_MODULE_28__sequential_multi_YlGn_js__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "_19", function() { return __WEBPACK_IMPORTED_MODULE_28__sequential_multi_YlGn_js__["b"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_29__sequential_multi_YlOrBr_js__ = __webpack_require__(1417);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "K", function() { return __WEBPACK_IMPORTED_MODULE_29__sequential_multi_YlOrBr_js__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "_21", function() { return __WEBPACK_IMPORTED_MODULE_29__sequential_multi_YlOrBr_js__["b"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_30__sequential_multi_YlOrRd_js__ = __webpack_require__(1418);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "L", function() { return __WEBPACK_IMPORTED_MODULE_30__sequential_multi_YlOrRd_js__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "_22", function() { return __WEBPACK_IMPORTED_MODULE_30__sequential_multi_YlOrRd_js__["b"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_31__sequential_single_Blues_js__ = __webpack_require__(1419);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_31__sequential_single_Blues_js__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "N", function() { return __WEBPACK_IMPORTED_MODULE_31__sequential_single_Blues_js__["b"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_32__sequential_single_Greens_js__ = __webpack_require__(1420);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return __WEBPACK_IMPORTED_MODULE_32__sequential_single_Greens_js__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "U", function() { return __WEBPACK_IMPORTED_MODULE_32__sequential_single_Greens_js__["b"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_33__sequential_single_Greys_js__ = __webpack_require__(1421);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return __WEBPACK_IMPORTED_MODULE_33__sequential_single_Greys_js__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "V", function() { return __WEBPACK_IMPORTED_MODULE_33__sequential_single_Greys_js__["b"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_34__sequential_single_Purples_js__ = __webpack_require__(1422);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "v", function() { return __WEBPACK_IMPORTED_MODULE_34__sequential_single_Purples_js__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "_7", function() { return __WEBPACK_IMPORTED_MODULE_34__sequential_single_Purples_js__["b"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_35__sequential_single_Reds_js__ = __webpack_require__(1423);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "C", function() { return __WEBPACK_IMPORTED_MODULE_35__sequential_single_Reds_js__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "_13", function() { return __WEBPACK_IMPORTED_MODULE_35__sequential_single_Reds_js__["b"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_36__sequential_single_Oranges_js__ = __webpack_require__(1424);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "n", function() { return __WEBPACK_IMPORTED_MODULE_36__sequential_single_Oranges_js__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "X", function() { return __WEBPACK_IMPORTED_MODULE_36__sequential_single_Oranges_js__["b"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_37__sequential_multi_cividis_js__ = __webpack_require__(1425);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return __WEBPACK_IMPORTED_MODULE_37__sequential_multi_cividis_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_38__sequential_multi_cubehelix_js__ = __webpack_require__(1426);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return __WEBPACK_IMPORTED_MODULE_38__sequential_multi_cubehelix_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_39__sequential_multi_rainbow_js__ = __webpack_require__(1427);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "w", function() { return __WEBPACK_IMPORTED_MODULE_39__sequential_multi_rainbow_js__["b"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "H", function() { return __WEBPACK_IMPORTED_MODULE_39__sequential_multi_rainbow_js__["c"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return __WEBPACK_IMPORTED_MODULE_39__sequential_multi_rainbow_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_40__sequential_multi_sinebow_js__ = __webpack_require__(1428);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "D", function() { return __WEBPACK_IMPORTED_MODULE_40__sequential_multi_sinebow_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_41__sequential_multi_turbo_js__ = __webpack_require__(1429);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "F", function() { return __WEBPACK_IMPORTED_MODULE_41__sequential_multi_turbo_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_42__sequential_multi_viridis_js__ = __webpack_require__(1430);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "G", function() { return __WEBPACK_IMPORTED_MODULE_42__sequential_multi_viridis_js__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "l", function() { return __WEBPACK_IMPORTED_MODULE_42__sequential_multi_viridis_js__["c"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "k", function() { return __WEBPACK_IMPORTED_MODULE_42__sequential_multi_viridis_js__["b"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "q", function() { return __WEBPACK_IMPORTED_MODULE_42__sequential_multi_viridis_js__["d"]; });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
/***/ }),
/* 1388 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__colors_js__ = __webpack_require__(21);
 
 
/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__colors_js__["a" /* default */])("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"));
 
 
/***/ }),
/* 1389 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__colors_js__ = __webpack_require__(21);
 
 
/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__colors_js__["a" /* default */])("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"));
 
 
/***/ }),
/* 1390 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__colors_js__ = __webpack_require__(21);
 
 
/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__colors_js__["a" /* default */])("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"));
 
 
/***/ }),
/* 1391 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__colors_js__ = __webpack_require__(21);
 
 
/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__colors_js__["a" /* default */])("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"));
 
 
/***/ }),
/* 1392 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__colors_js__ = __webpack_require__(21);
 
 
/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__colors_js__["a" /* default */])("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"));
 
 
/***/ }),
/* 1393 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__colors_js__ = __webpack_require__(21);
 
 
/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__colors_js__["a" /* default */])("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc"));
 
 
/***/ }),
/* 1394 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__colors_js__ = __webpack_require__(21);
 
 
/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__colors_js__["a" /* default */])("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"));
 
 
/***/ }),
/* 1395 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__colors_js__ = __webpack_require__(21);
 
 
/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__colors_js__["a" /* default */])("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"));
 
 
/***/ }),
/* 1396 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__colors_js__ = __webpack_require__(21);
 
 
/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__colors_js__["a" /* default */])("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"));
 
 
/***/ }),
/* 1397 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__colors_js__ = __webpack_require__(21);
 
 
/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__colors_js__["a" /* default */])("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab"));
 
 
/***/ }),
/* 1398 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return scheme; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__colors_js__ = __webpack_require__(21);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__ramp_js__ = __webpack_require__(27);
 
 
 
var scheme = new Array(3).concat(
  "d8b365f5f5f55ab4ac",
  "a6611adfc27d80cdc1018571",
  "a6611adfc27df5f5f580cdc1018571",
  "8c510ad8b365f6e8c3c7eae55ab4ac01665e",
  "8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e",
  "8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e",
  "8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e",
  "5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30",
  "5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30"
).map(__WEBPACK_IMPORTED_MODULE_0__colors_js__["a" /* default */]);
 
/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_1__ramp_js__["a" /* default */])(scheme));
 
 
/***/ }),
/* 1399 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return scheme; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__colors_js__ = __webpack_require__(21);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__ramp_js__ = __webpack_require__(27);
 
 
 
var scheme = new Array(3).concat(
  "af8dc3f7f7f77fbf7b",
  "7b3294c2a5cfa6dba0008837",
  "7b3294c2a5cff7f7f7a6dba0008837",
  "762a83af8dc3e7d4e8d9f0d37fbf7b1b7837",
  "762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837",
  "762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837",
  "762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837",
  "40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b",
  "40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b"
).map(__WEBPACK_IMPORTED_MODULE_0__colors_js__["a" /* default */]);
 
/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_1__ramp_js__["a" /* default */])(scheme));
 
 
/***/ }),
/* 1400 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return scheme; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__colors_js__ = __webpack_require__(21);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__ramp_js__ = __webpack_require__(27);
 
 
 
var scheme = new Array(3).concat(
  "e9a3c9f7f7f7a1d76a",
  "d01c8bf1b6dab8e1864dac26",
  "d01c8bf1b6daf7f7f7b8e1864dac26",
  "c51b7de9a3c9fde0efe6f5d0a1d76a4d9221",
  "c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221",
  "c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221",
  "c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221",
  "8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419",
  "8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419"
).map(__WEBPACK_IMPORTED_MODULE_0__colors_js__["a" /* default */]);
 
/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_1__ramp_js__["a" /* default */])(scheme));
 
 
/***/ }),
/* 1401 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return scheme; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__colors_js__ = __webpack_require__(21);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__ramp_js__ = __webpack_require__(27);
 
 
 
var scheme = new Array(3).concat(
  "998ec3f7f7f7f1a340",
  "5e3c99b2abd2fdb863e66101",
  "5e3c99b2abd2f7f7f7fdb863e66101",
  "542788998ec3d8daebfee0b6f1a340b35806",
  "542788998ec3d8daebf7f7f7fee0b6f1a340b35806",
  "5427888073acb2abd2d8daebfee0b6fdb863e08214b35806",
  "5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806",
  "2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08",
  "2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08"
).map(__WEBPACK_IMPORTED_MODULE_0__colors_js__["a" /* default */]);
 
/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_1__ramp_js__["a" /* default */])(scheme));
 
 
/***/ }),
/* 1402 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return scheme; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__colors_js__ = __webpack_require__(21);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__ramp_js__ = __webpack_require__(27);
 
 
 
var scheme = new Array(3).concat(
  "ef8a62f7f7f767a9cf",
  "ca0020f4a58292c5de0571b0",
  "ca0020f4a582f7f7f792c5de0571b0",
  "b2182bef8a62fddbc7d1e5f067a9cf2166ac",
  "b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac",
  "b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac",
  "b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac",
  "67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061",
  "67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061"
).map(__WEBPACK_IMPORTED_MODULE_0__colors_js__["a" /* default */]);
 
/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_1__ramp_js__["a" /* default */])(scheme));
 
 
/***/ }),
/* 1403 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return scheme; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__colors_js__ = __webpack_require__(21);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__ramp_js__ = __webpack_require__(27);
 
 
 
var scheme = new Array(3).concat(
  "ef8a62ffffff999999",
  "ca0020f4a582bababa404040",
  "ca0020f4a582ffffffbababa404040",
  "b2182bef8a62fddbc7e0e0e09999994d4d4d",
  "b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d",
  "b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d",
  "b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d",
  "67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a",
  "67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a"
).map(__WEBPACK_IMPORTED_MODULE_0__colors_js__["a" /* default */]);
 
/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_1__ramp_js__["a" /* default */])(scheme));
 
 
/***/ }),
/* 1404 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return scheme; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__colors_js__ = __webpack_require__(21);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__ramp_js__ = __webpack_require__(27);
 
 
 
var scheme = new Array(3).concat(
  "fc8d59ffffbf91bfdb",
  "d7191cfdae61abd9e92c7bb6",
  "d7191cfdae61ffffbfabd9e92c7bb6",
  "d73027fc8d59fee090e0f3f891bfdb4575b4",
  "d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4",
  "d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4",
  "d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4",
  "a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695",
  "a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695"
).map(__WEBPACK_IMPORTED_MODULE_0__colors_js__["a" /* default */]);
 
/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_1__ramp_js__["a" /* default */])(scheme));
 
 
/***/ }),
/* 1405 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return scheme; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__colors_js__ = __webpack_require__(21);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__ramp_js__ = __webpack_require__(27);
 
 
 
var scheme = new Array(3).concat(
  "fc8d59ffffbf91cf60",
  "d7191cfdae61a6d96a1a9641",
  "d7191cfdae61ffffbfa6d96a1a9641",
  "d73027fc8d59fee08bd9ef8b91cf601a9850",
  "d73027fc8d59fee08bffffbfd9ef8b91cf601a9850",
  "d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850",
  "d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850",
  "a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837",
  "a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837"
).map(__WEBPACK_IMPORTED_MODULE_0__colors_js__["a" /* default */]);
 
/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_1__ramp_js__["a" /* default */])(scheme));
 
 
/***/ }),
/* 1406 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return scheme; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__colors_js__ = __webpack_require__(21);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__ramp_js__ = __webpack_require__(27);
 
 
 
var scheme = new Array(3).concat(
  "fc8d59ffffbf99d594",
  "d7191cfdae61abdda42b83ba",
  "d7191cfdae61ffffbfabdda42b83ba",
  "d53e4ffc8d59fee08be6f59899d5943288bd",
  "d53e4ffc8d59fee08bffffbfe6f59899d5943288bd",
  "d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd",
  "d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd",
  "9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2",
  "9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2"
).map(__WEBPACK_IMPORTED_MODULE_0__colors_js__["a" /* default */]);
 
/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_1__ramp_js__["a" /* default */])(scheme));
 
 
/***/ }),
/* 1407 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return scheme; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__colors_js__ = __webpack_require__(21);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__ramp_js__ = __webpack_require__(27);
 
 
 
var scheme = new Array(3).concat(
  "e5f5f999d8c92ca25f",
  "edf8fbb2e2e266c2a4238b45",
  "edf8fbb2e2e266c2a42ca25f006d2c",
  "edf8fbccece699d8c966c2a42ca25f006d2c",
  "edf8fbccece699d8c966c2a441ae76238b45005824",
  "f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824",
  "f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b"
).map(__WEBPACK_IMPORTED_MODULE_0__colors_js__["a" /* default */]);
 
/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_1__ramp_js__["a" /* default */])(scheme));
 
 
/***/ }),
/* 1408 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return scheme; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__colors_js__ = __webpack_require__(21);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__ramp_js__ = __webpack_require__(27);
 
 
 
var scheme = new Array(3).concat(
  "e0ecf49ebcda8856a7",
  "edf8fbb3cde38c96c688419d",
  "edf8fbb3cde38c96c68856a7810f7c",
  "edf8fbbfd3e69ebcda8c96c68856a7810f7c",
  "edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b",
  "f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b",
  "f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b"
).map(__WEBPACK_IMPORTED_MODULE_0__colors_js__["a" /* default */]);
 
/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_1__ramp_js__["a" /* default */])(scheme));
 
 
/***/ }),
/* 1409 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return scheme; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__colors_js__ = __webpack_require__(21);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__ramp_js__ = __webpack_require__(27);
 
 
 
var scheme = new Array(3).concat(
  "e0f3dba8ddb543a2ca",
  "f0f9e8bae4bc7bccc42b8cbe",
  "f0f9e8bae4bc7bccc443a2ca0868ac",
  "f0f9e8ccebc5a8ddb57bccc443a2ca0868ac",
  "f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e",
  "f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e",
  "f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081"
).map(__WEBPACK_IMPORTED_MODULE_0__colors_js__["a" /* default */]);
 
/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_1__ramp_js__["a" /* default */])(scheme));
 
 
/***/ }),
/* 1410 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return scheme; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__colors_js__ = __webpack_require__(21);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__ramp_js__ = __webpack_require__(27);
 
 
 
var scheme = new Array(3).concat(
  "fee8c8fdbb84e34a33",
  "fef0d9fdcc8afc8d59d7301f",
  "fef0d9fdcc8afc8d59e34a33b30000",
  "fef0d9fdd49efdbb84fc8d59e34a33b30000",
  "fef0d9fdd49efdbb84fc8d59ef6548d7301f990000",
  "fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000",
  "fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000"
).map(__WEBPACK_IMPORTED_MODULE_0__colors_js__["a" /* default */]);
 
/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_1__ramp_js__["a" /* default */])(scheme));
 
 
/***/ }),
/* 1411 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return scheme; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__colors_js__ = __webpack_require__(21);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__ramp_js__ = __webpack_require__(27);
 
 
 
var scheme = new Array(3).concat(
  "ece2f0a6bddb1c9099",
  "f6eff7bdc9e167a9cf02818a",
  "f6eff7bdc9e167a9cf1c9099016c59",
  "f6eff7d0d1e6a6bddb67a9cf1c9099016c59",
  "f6eff7d0d1e6a6bddb67a9cf3690c002818a016450",
  "fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450",
  "fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636"
).map(__WEBPACK_IMPORTED_MODULE_0__colors_js__["a" /* default */]);
 
/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_1__ramp_js__["a" /* default */])(scheme));
 
 
/***/ }),
/* 1412 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return scheme; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__colors_js__ = __webpack_require__(21);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__ramp_js__ = __webpack_require__(27);
 
 
 
var scheme = new Array(3).concat(
  "ece7f2a6bddb2b8cbe",
  "f1eef6bdc9e174a9cf0570b0",
  "f1eef6bdc9e174a9cf2b8cbe045a8d",
  "f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d",
  "f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b",
  "fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b",
  "fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858"
).map(__WEBPACK_IMPORTED_MODULE_0__colors_js__["a" /* default */]);
 
/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_1__ramp_js__["a" /* default */])(scheme));
 
 
/***/ }),
/* 1413 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return scheme; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__colors_js__ = __webpack_require__(21);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__ramp_js__ = __webpack_require__(27);
 
 
 
var scheme = new Array(3).concat(
  "e7e1efc994c7dd1c77",
  "f1eef6d7b5d8df65b0ce1256",
  "f1eef6d7b5d8df65b0dd1c77980043",
  "f1eef6d4b9dac994c7df65b0dd1c77980043",
  "f1eef6d4b9dac994c7df65b0e7298ace125691003f",
  "f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f",
  "f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f"
).map(__WEBPACK_IMPORTED_MODULE_0__colors_js__["a" /* default */]);
 
/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_1__ramp_js__["a" /* default */])(scheme));
 
 
/***/ }),
/* 1414 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return scheme; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__colors_js__ = __webpack_require__(21);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__ramp_js__ = __webpack_require__(27);
 
 
 
var scheme = new Array(3).concat(
  "fde0ddfa9fb5c51b8a",
  "feebe2fbb4b9f768a1ae017e",
  "feebe2fbb4b9f768a1c51b8a7a0177",
  "feebe2fcc5c0fa9fb5f768a1c51b8a7a0177",
  "feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177",
  "fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177",
  "fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a"
).map(__WEBPACK_IMPORTED_MODULE_0__colors_js__["a" /* default */]);
 
/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_1__ramp_js__["a" /* default */])(scheme));
 
 
/***/ }),
/* 1415 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return scheme; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__colors_js__ = __webpack_require__(21);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__ramp_js__ = __webpack_require__(27);
 
 
 
var scheme = new Array(3).concat(
  "edf8b17fcdbb2c7fb8",
  "ffffcca1dab441b6c4225ea8",
  "ffffcca1dab441b6c42c7fb8253494",
  "ffffccc7e9b47fcdbb41b6c42c7fb8253494",
  "ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84",
  "ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84",
  "ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58"
).map(__WEBPACK_IMPORTED_MODULE_0__colors_js__["a" /* default */]);
 
/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_1__ramp_js__["a" /* default */])(scheme));
 
 
/***/ }),
/* 1416 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return scheme; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__colors_js__ = __webpack_require__(21);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__ramp_js__ = __webpack_require__(27);
 
 
 
var scheme = new Array(3).concat(
  "f7fcb9addd8e31a354",
  "ffffccc2e69978c679238443",
  "ffffccc2e69978c67931a354006837",
  "ffffccd9f0a3addd8e78c67931a354006837",
  "ffffccd9f0a3addd8e78c67941ab5d238443005a32",
  "ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32",
  "ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529"
).map(__WEBPACK_IMPORTED_MODULE_0__colors_js__["a" /* default */]);
 
/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_1__ramp_js__["a" /* default */])(scheme));
 
 
/***/ }),
/* 1417 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return scheme; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__colors_js__ = __webpack_require__(21);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__ramp_js__ = __webpack_require__(27);
 
 
 
var scheme = new Array(3).concat(
  "fff7bcfec44fd95f0e",
  "ffffd4fed98efe9929cc4c02",
  "ffffd4fed98efe9929d95f0e993404",
  "ffffd4fee391fec44ffe9929d95f0e993404",
  "ffffd4fee391fec44ffe9929ec7014cc4c028c2d04",
  "ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04",
  "ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506"
).map(__WEBPACK_IMPORTED_MODULE_0__colors_js__["a" /* default */]);
 
/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_1__ramp_js__["a" /* default */])(scheme));
 
 
/***/ }),
/* 1418 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return scheme; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__colors_js__ = __webpack_require__(21);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__ramp_js__ = __webpack_require__(27);
 
 
 
var scheme = new Array(3).concat(
  "ffeda0feb24cf03b20",
  "ffffb2fecc5cfd8d3ce31a1c",
  "ffffb2fecc5cfd8d3cf03b20bd0026",
  "ffffb2fed976feb24cfd8d3cf03b20bd0026",
  "ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026",
  "ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026",
  "ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026"
).map(__WEBPACK_IMPORTED_MODULE_0__colors_js__["a" /* default */]);
 
/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_1__ramp_js__["a" /* default */])(scheme));
 
 
/***/ }),
/* 1419 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return scheme; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__colors_js__ = __webpack_require__(21);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__ramp_js__ = __webpack_require__(27);
 
 
 
var scheme = new Array(3).concat(
  "deebf79ecae13182bd",
  "eff3ffbdd7e76baed62171b5",
  "eff3ffbdd7e76baed63182bd08519c",
  "eff3ffc6dbef9ecae16baed63182bd08519c",
  "eff3ffc6dbef9ecae16baed64292c62171b5084594",
  "f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594",
  "f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b"
).map(__WEBPACK_IMPORTED_MODULE_0__colors_js__["a" /* default */]);
 
/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_1__ramp_js__["a" /* default */])(scheme));
 
 
/***/ }),
/* 1420 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return scheme; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__colors_js__ = __webpack_require__(21);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__ramp_js__ = __webpack_require__(27);
 
 
 
var scheme = new Array(3).concat(
  "e5f5e0a1d99b31a354",
  "edf8e9bae4b374c476238b45",
  "edf8e9bae4b374c47631a354006d2c",
  "edf8e9c7e9c0a1d99b74c47631a354006d2c",
  "edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32",
  "f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32",
  "f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b"
).map(__WEBPACK_IMPORTED_MODULE_0__colors_js__["a" /* default */]);
 
/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_1__ramp_js__["a" /* default */])(scheme));
 
 
/***/ }),
/* 1421 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return scheme; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__colors_js__ = __webpack_require__(21);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__ramp_js__ = __webpack_require__(27);
 
 
 
var scheme = new Array(3).concat(
  "f0f0f0bdbdbd636363",
  "f7f7f7cccccc969696525252",
  "f7f7f7cccccc969696636363252525",
  "f7f7f7d9d9d9bdbdbd969696636363252525",
  "f7f7f7d9d9d9bdbdbd969696737373525252252525",
  "fffffff0f0f0d9d9d9bdbdbd969696737373525252252525",
  "fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000"
).map(__WEBPACK_IMPORTED_MODULE_0__colors_js__["a" /* default */]);
 
/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_1__ramp_js__["a" /* default */])(scheme));
 
 
/***/ }),
/* 1422 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return scheme; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__colors_js__ = __webpack_require__(21);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__ramp_js__ = __webpack_require__(27);
 
 
 
var scheme = new Array(3).concat(
  "efedf5bcbddc756bb1",
  "f2f0f7cbc9e29e9ac86a51a3",
  "f2f0f7cbc9e29e9ac8756bb154278f",
  "f2f0f7dadaebbcbddc9e9ac8756bb154278f",
  "f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486",
  "fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486",
  "fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d"
).map(__WEBPACK_IMPORTED_MODULE_0__colors_js__["a" /* default */]);
 
/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_1__ramp_js__["a" /* default */])(scheme));
 
 
/***/ }),
/* 1423 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return scheme; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__colors_js__ = __webpack_require__(21);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__ramp_js__ = __webpack_require__(27);
 
 
 
var scheme = new Array(3).concat(
  "fee0d2fc9272de2d26",
  "fee5d9fcae91fb6a4acb181d",
  "fee5d9fcae91fb6a4ade2d26a50f15",
  "fee5d9fcbba1fc9272fb6a4ade2d26a50f15",
  "fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d",
  "fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d",
  "fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d"
).map(__WEBPACK_IMPORTED_MODULE_0__colors_js__["a" /* default */]);
 
/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_1__ramp_js__["a" /* default */])(scheme));
 
 
/***/ }),
/* 1424 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return scheme; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__colors_js__ = __webpack_require__(21);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__ramp_js__ = __webpack_require__(27);
 
 
 
var scheme = new Array(3).concat(
  "fee6cefdae6be6550d",
  "feeddefdbe85fd8d3cd94701",
  "feeddefdbe85fd8d3ce6550da63603",
  "feeddefdd0a2fdae6bfd8d3ce6550da63603",
  "feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04",
  "fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04",
  "fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704"
).map(__WEBPACK_IMPORTED_MODULE_0__colors_js__["a" /* default */]);
 
/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_1__ramp_js__["a" /* default */])(scheme));
 
 
/***/ }),
/* 1425 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony default export */ __webpack_exports__["a"] = (function(t) {
  t = Math.max(0, Math.min(1, t));
  return "rgb("
      + Math.max(0, Math.min(255, Math.round(-4.54 - t * (35.34 - t * (2381.73 - t * (6402.7 - t * (7024.72 - t * 2710.57))))))) + ", "
      + Math.max(0, Math.min(255, Math.round(32.49 + t * (170.73 + t * (52.82 - t * (131.46 - t * (176.58 - t * 67.37))))))) + ", "
      + Math.max(0, Math.min(255, Math.round(81.24 + t * (442.36 - t * (2482.43 - t * (6167.24 - t * (6614.94 - t * 2475.67)))))))
      + ")";
});
 
 
/***/ }),
/* 1426 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_d3_color__ = __webpack_require__(74);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_d3_interpolate__ = __webpack_require__(83);
 
 
 
/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_1_d3_interpolate__["f" /* interpolateCubehelixLong */])(Object(__WEBPACK_IMPORTED_MODULE_0_d3_color__["b" /* cubehelix */])(300, 0.5, 0.0), Object(__WEBPACK_IMPORTED_MODULE_0_d3_color__["b" /* cubehelix */])(-240, 0.5, 1.0)));
 
 
/***/ }),
/* 1427 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return warm; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return cool; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_d3_color__ = __webpack_require__(74);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_d3_interpolate__ = __webpack_require__(83);
 
 
 
var warm = Object(__WEBPACK_IMPORTED_MODULE_1_d3_interpolate__["f" /* interpolateCubehelixLong */])(Object(__WEBPACK_IMPORTED_MODULE_0_d3_color__["b" /* cubehelix */])(-100, 0.75, 0.35), Object(__WEBPACK_IMPORTED_MODULE_0_d3_color__["b" /* cubehelix */])(80, 1.50, 0.8));
 
var cool = Object(__WEBPACK_IMPORTED_MODULE_1_d3_interpolate__["f" /* interpolateCubehelixLong */])(Object(__WEBPACK_IMPORTED_MODULE_0_d3_color__["b" /* cubehelix */])(260, 0.75, 0.35), Object(__WEBPACK_IMPORTED_MODULE_0_d3_color__["b" /* cubehelix */])(80, 1.50, 0.8));
 
var c = Object(__WEBPACK_IMPORTED_MODULE_0_d3_color__["b" /* cubehelix */])();
 
/* harmony default export */ __webpack_exports__["b"] = (function(t) {
  if (t < 0 || t > 1) t -= Math.floor(t);
  var ts = Math.abs(t - 0.5);
  c.h = 360 * t - 100;
  c.s = 1.5 - 1.5 * ts;
  c.l = 0.8 - 0.9 * ts;
  return c + "";
});
 
 
/***/ }),
/* 1428 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_d3_color__ = __webpack_require__(74);
 
 
var c = Object(__WEBPACK_IMPORTED_MODULE_0_d3_color__["h" /* rgb */])(),
    pi_1_3 = Math.PI / 3,
    pi_2_3 = Math.PI * 2 / 3;
 
/* harmony default export */ __webpack_exports__["a"] = (function(t) {
  var x;
  t = (0.5 - t) * Math.PI;
  c.r = 255 * (x = Math.sin(t)) * x;
  c.g = 255 * (x = Math.sin(t + pi_1_3)) * x;
  c.b = 255 * (x = Math.sin(t + pi_2_3)) * x;
  return c + "";
});
 
 
/***/ }),
/* 1429 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony default export */ __webpack_exports__["a"] = (function(t) {
  t = Math.max(0, Math.min(1, t));
  return "rgb("
      + Math.max(0, Math.min(255, Math.round(34.61 + t * (1172.33 - t * (10793.56 - t * (33300.12 - t * (38394.49 - t * 14825.05))))))) + ", "
      + Math.max(0, Math.min(255, Math.round(23.31 + t * (557.33 + t * (1225.33 - t * (3574.96 - t * (1073.77 + t * 707.56))))))) + ", "
      + Math.max(0, Math.min(255, Math.round(27.2 + t * (3211.1 - t * (15327.97 - t * (27814 - t * (22569.18 - t * 6838.66)))))))
      + ")";
});
 
 
/***/ }),
/* 1430 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return magma; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return inferno; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return plasma; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__colors_js__ = __webpack_require__(21);
 
 
function ramp(range) {
  var n = range.length;
  return function(t) {
    return range[Math.max(0, Math.min(n - 1, Math.floor(t * n)))];
  };
}
 
/* harmony default export */ __webpack_exports__["a"] = (ramp(Object(__WEBPACK_IMPORTED_MODULE_0__colors_js__["a" /* default */])("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725")));
 
var magma = ramp(Object(__WEBPACK_IMPORTED_MODULE_0__colors_js__["a" /* default */])("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf"));
 
var inferno = ramp(Object(__WEBPACK_IMPORTED_MODULE_0__colors_js__["a" /* default */])("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4"));
 
var plasma = ramp(Object(__WEBPACK_IMPORTED_MODULE_0__colors_js__["a" /* default */])("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));
 
 
/***/ }),
/* 1431 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__arc_js__ = __webpack_require__(1432);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_0__arc_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__area_js__ = __webpack_require__(768);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return __WEBPACK_IMPORTED_MODULE_1__area_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__line_js__ = __webpack_require__(370);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "v", function() { return __WEBPACK_IMPORTED_MODULE_2__line_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__pie_js__ = __webpack_require__(1433);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "A", function() { return __WEBPACK_IMPORTED_MODULE_3__pie_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__areaRadial_js__ = __webpack_require__(1436);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return __WEBPACK_IMPORTED_MODULE_4__areaRadial_js__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "C", function() { return __WEBPACK_IMPORTED_MODULE_4__areaRadial_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__lineRadial_js__ = __webpack_require__(770);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "w", function() { return __WEBPACK_IMPORTED_MODULE_5__lineRadial_js__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "D", function() { return __WEBPACK_IMPORTED_MODULE_5__lineRadial_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__pointRadial_js__ = __webpack_require__(771);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "B", function() { return __WEBPACK_IMPORTED_MODULE_6__pointRadial_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__link_index_js__ = __webpack_require__(1437);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "x", function() { return __WEBPACK_IMPORTED_MODULE_7__link_index_js__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "z", function() { return __WEBPACK_IMPORTED_MODULE_7__link_index_js__["c"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "y", function() { return __WEBPACK_IMPORTED_MODULE_7__link_index_js__["b"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__symbol_js__ = __webpack_require__(1438);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Q", function() { return __WEBPACK_IMPORTED_MODULE_8__symbol_js__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Y", function() { return __WEBPACK_IMPORTED_MODULE_8__symbol_js__["b"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__symbol_circle_js__ = __webpack_require__(773);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "R", function() { return __WEBPACK_IMPORTED_MODULE_9__symbol_circle_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__symbol_cross_js__ = __webpack_require__(774);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "S", function() { return __WEBPACK_IMPORTED_MODULE_10__symbol_cross_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__symbol_diamond_js__ = __webpack_require__(775);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "T", function() { return __WEBPACK_IMPORTED_MODULE_11__symbol_diamond_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__symbol_square_js__ = __webpack_require__(777);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "U", function() { return __WEBPACK_IMPORTED_MODULE_12__symbol_square_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__symbol_star_js__ = __webpack_require__(776);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "V", function() { return __WEBPACK_IMPORTED_MODULE_13__symbol_star_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__symbol_triangle_js__ = __webpack_require__(778);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "W", function() { return __WEBPACK_IMPORTED_MODULE_14__symbol_triangle_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__symbol_wye_js__ = __webpack_require__(779);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "X", function() { return __WEBPACK_IMPORTED_MODULE_15__symbol_wye_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__curve_basisClosed_js__ = __webpack_require__(1439);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return __WEBPACK_IMPORTED_MODULE_16__curve_basisClosed_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_17__curve_basisOpen_js__ = __webpack_require__(1440);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return __WEBPACK_IMPORTED_MODULE_17__curve_basisOpen_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_18__curve_basis_js__ = __webpack_require__(259);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return __WEBPACK_IMPORTED_MODULE_18__curve_basis_js__["b"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_19__curve_bundle_js__ = __webpack_require__(1441);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return __WEBPACK_IMPORTED_MODULE_19__curve_bundle_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_20__curve_cardinalClosed_js__ = __webpack_require__(780);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return __WEBPACK_IMPORTED_MODULE_20__curve_cardinalClosed_js__["b"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_21__curve_cardinalOpen_js__ = __webpack_require__(781);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return __WEBPACK_IMPORTED_MODULE_21__curve_cardinalOpen_js__["b"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_22__curve_cardinal_js__ = __webpack_require__(260);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return __WEBPACK_IMPORTED_MODULE_22__curve_cardinal_js__["b"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_23__curve_catmullRomClosed_js__ = __webpack_require__(1442);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "l", function() { return __WEBPACK_IMPORTED_MODULE_23__curve_catmullRomClosed_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_24__curve_catmullRomOpen_js__ = __webpack_require__(1443);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "m", function() { return __WEBPACK_IMPORTED_MODULE_24__curve_catmullRomOpen_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_25__curve_catmullRom_js__ = __webpack_require__(372);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "k", function() { return __WEBPACK_IMPORTED_MODULE_25__curve_catmullRom_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_26__curve_linearClosed_js__ = __webpack_require__(1444);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "o", function() { return __WEBPACK_IMPORTED_MODULE_26__curve_linearClosed_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_27__curve_linear_js__ = __webpack_require__(257);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "n", function() { return __WEBPACK_IMPORTED_MODULE_27__curve_linear_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_28__curve_monotone_js__ = __webpack_require__(1445);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "p", function() { return __WEBPACK_IMPORTED_MODULE_28__curve_monotone_js__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "q", function() { return __WEBPACK_IMPORTED_MODULE_28__curve_monotone_js__["b"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_29__curve_natural_js__ = __webpack_require__(1446);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "r", function() { return __WEBPACK_IMPORTED_MODULE_29__curve_natural_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_30__curve_step_js__ = __webpack_require__(1447);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "s", function() { return __WEBPACK_IMPORTED_MODULE_30__curve_step_js__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "t", function() { return __WEBPACK_IMPORTED_MODULE_30__curve_step_js__["b"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "u", function() { return __WEBPACK_IMPORTED_MODULE_30__curve_step_js__["c"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_31__stack_js__ = __webpack_require__(1448);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "E", function() { return __WEBPACK_IMPORTED_MODULE_31__stack_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_32__offset_expand_js__ = __webpack_require__(1449);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "G", function() { return __WEBPACK_IMPORTED_MODULE_32__offset_expand_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_33__offset_diverging_js__ = __webpack_require__(1450);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "F", function() { return __WEBPACK_IMPORTED_MODULE_33__offset_diverging_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_34__offset_none_js__ = __webpack_require__(192);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "H", function() { return __WEBPACK_IMPORTED_MODULE_34__offset_none_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_35__offset_silhouette_js__ = __webpack_require__(1451);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "I", function() { return __WEBPACK_IMPORTED_MODULE_35__offset_silhouette_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_36__offset_wiggle_js__ = __webpack_require__(1452);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "J", function() { return __WEBPACK_IMPORTED_MODULE_36__offset_wiggle_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_37__order_appearance_js__ = __webpack_require__(782);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "K", function() { return __WEBPACK_IMPORTED_MODULE_37__order_appearance_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_38__order_ascending_js__ = __webpack_require__(373);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "L", function() { return __WEBPACK_IMPORTED_MODULE_38__order_ascending_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_39__order_descending_js__ = __webpack_require__(1453);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "M", function() { return __WEBPACK_IMPORTED_MODULE_39__order_descending_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_40__order_insideOut_js__ = __webpack_require__(1454);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "N", function() { return __WEBPACK_IMPORTED_MODULE_40__order_insideOut_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_41__order_none_js__ = __webpack_require__(193);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "O", function() { return __WEBPACK_IMPORTED_MODULE_41__order_none_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_42__order_reverse_js__ = __webpack_require__(1455);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "P", function() { return __WEBPACK_IMPORTED_MODULE_42__order_reverse_js__["a"]; });
 
 
 
 
 // Note: radialArea is deprecated!
 // Note: radialLine is deprecated!
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
/***/ }),
/* 1432 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_d3_path__ = __webpack_require__(120);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__constant_js__ = __webpack_require__(124);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__math_js__ = __webpack_require__(191);
 
 
 
 
function arcInnerRadius(d) {
  return d.innerRadius;
}
 
function arcOuterRadius(d) {
  return d.outerRadius;
}
 
function arcStartAngle(d) {
  return d.startAngle;
}
 
function arcEndAngle(d) {
  return d.endAngle;
}
 
function arcPadAngle(d) {
  return d && d.padAngle; // Note: optional!
}
 
function intersect(x0, y0, x1, y1, x2, y2, x3, y3) {
  var x10 = x1 - x0, y10 = y1 - y0,
      x32 = x3 - x2, y32 = y3 - y2,
      t = y32 * x10 - x32 * y10;
  if (t * t < __WEBPACK_IMPORTED_MODULE_2__math_js__["f" /* epsilon */]) return;
  t = (x32 * (y0 - y2) - y32 * (x0 - x2)) / t;
  return [x0 + t * x10, y0 + t * y10];
}
 
// Compute perpendicular offset line of length rc.
// http://mathworld.wolfram.com/Circle-LineIntersection.html
function cornerTangents(x0, y0, x1, y1, r1, rc, cw) {
  var x01 = x0 - x1,
      y01 = y0 - y1,
      lo = (cw ? rc : -rc) / Object(__WEBPACK_IMPORTED_MODULE_2__math_js__["l" /* sqrt */])(x01 * x01 + y01 * y01),
      ox = lo * y01,
      oy = -lo * x01,
      x11 = x0 + ox,
      y11 = y0 + oy,
      x10 = x1 + ox,
      y10 = y1 + oy,
      x00 = (x11 + x10) / 2,
      y00 = (y11 + y10) / 2,
      dx = x10 - x11,
      dy = y10 - y11,
      d2 = dx * dx + dy * dy,
      r = r1 - rc,
      D = x11 * y10 - x10 * y11,
      d = (dy < 0 ? -1 : 1) * Object(__WEBPACK_IMPORTED_MODULE_2__math_js__["l" /* sqrt */])(Object(__WEBPACK_IMPORTED_MODULE_2__math_js__["h" /* max */])(0, r * r * d2 - D * D)),
      cx0 = (D * dy - dx * d) / d2,
      cy0 = (-D * dx - dy * d) / d2,
      cx1 = (D * dy + dx * d) / d2,
      cy1 = (-D * dx + dy * d) / d2,
      dx0 = cx0 - x00,
      dy0 = cy0 - y00,
      dx1 = cx1 - x00,
      dy1 = cy1 - y00;
 
  // Pick the closer of the two intersection points.
  // TODO Is there a faster way to determine which intersection to use?
  if (dx0 * dx0 + dy0 * dy0 > dx1 * dx1 + dy1 * dy1) cx0 = cx1, cy0 = cy1;
 
  return {
    cx: cx0,
    cy: cy0,
    x01: -ox,
    y01: -oy,
    x11: cx0 * (r1 / r - 1),
    y11: cy0 * (r1 / r - 1)
  };
}
 
/* harmony default export */ __webpack_exports__["a"] = (function() {
  var innerRadius = arcInnerRadius,
      outerRadius = arcOuterRadius,
      cornerRadius = Object(__WEBPACK_IMPORTED_MODULE_1__constant_js__["a" /* default */])(0),
      padRadius = null,
      startAngle = arcStartAngle,
      endAngle = arcEndAngle,
      padAngle = arcPadAngle,
      context = null;
 
  function arc() {
    var buffer,
        r,
        r0 = +innerRadius.apply(this, arguments),
        r1 = +outerRadius.apply(this, arguments),
        a0 = startAngle.apply(this, arguments) - __WEBPACK_IMPORTED_MODULE_2__math_js__["g" /* halfPi */],
        a1 = endAngle.apply(this, arguments) - __WEBPACK_IMPORTED_MODULE_2__math_js__["g" /* halfPi */],
        da = Object(__WEBPACK_IMPORTED_MODULE_2__math_js__["a" /* abs */])(a1 - a0),
        cw = a1 > a0;
 
    if (!context) context = buffer = Object(__WEBPACK_IMPORTED_MODULE_0_d3_path__["a" /* path */])();
 
    // Ensure that the outer radius is always larger than the inner radius.
    if (r1 < r0) r = r1, r1 = r0, r0 = r;
 
    // Is it a point?
    if (!(r1 > __WEBPACK_IMPORTED_MODULE_2__math_js__["f" /* epsilon */])) context.moveTo(0, 0);
 
    // Or is it a circle or annulus?
    else if (da > __WEBPACK_IMPORTED_MODULE_2__math_js__["m" /* tau */] - __WEBPACK_IMPORTED_MODULE_2__math_js__["f" /* epsilon */]) {
      context.moveTo(r1 * Object(__WEBPACK_IMPORTED_MODULE_2__math_js__["e" /* cos */])(a0), r1 * Object(__WEBPACK_IMPORTED_MODULE_2__math_js__["k" /* sin */])(a0));
      context.arc(0, 0, r1, a0, a1, !cw);
      if (r0 > __WEBPACK_IMPORTED_MODULE_2__math_js__["f" /* epsilon */]) {
        context.moveTo(r0 * Object(__WEBPACK_IMPORTED_MODULE_2__math_js__["e" /* cos */])(a1), r0 * Object(__WEBPACK_IMPORTED_MODULE_2__math_js__["k" /* sin */])(a1));
        context.arc(0, 0, r0, a1, a0, cw);
      }
    }
 
    // Or is it a circular or annular sector?
    else {
      var a01 = a0,
          a11 = a1,
          a00 = a0,
          a10 = a1,
          da0 = da,
          da1 = da,
          ap = padAngle.apply(this, arguments) / 2,
          rp = (ap > __WEBPACK_IMPORTED_MODULE_2__math_js__["f" /* epsilon */]) && (padRadius ? +padRadius.apply(this, arguments) : Object(__WEBPACK_IMPORTED_MODULE_2__math_js__["l" /* sqrt */])(r0 * r0 + r1 * r1)),
          rc = Object(__WEBPACK_IMPORTED_MODULE_2__math_js__["i" /* min */])(Object(__WEBPACK_IMPORTED_MODULE_2__math_js__["a" /* abs */])(r1 - r0) / 2, +cornerRadius.apply(this, arguments)),
          rc0 = rc,
          rc1 = rc,
          t0,
          t1;
 
      // Apply padding? Note that since r1 ≥ r0, da1 ≥ da0.
      if (rp > __WEBPACK_IMPORTED_MODULE_2__math_js__["f" /* epsilon */]) {
        var p0 = Object(__WEBPACK_IMPORTED_MODULE_2__math_js__["c" /* asin */])(rp / r0 * Object(__WEBPACK_IMPORTED_MODULE_2__math_js__["k" /* sin */])(ap)),
            p1 = Object(__WEBPACK_IMPORTED_MODULE_2__math_js__["c" /* asin */])(rp / r1 * Object(__WEBPACK_IMPORTED_MODULE_2__math_js__["k" /* sin */])(ap));
        if ((da0 -= p0 * 2) > __WEBPACK_IMPORTED_MODULE_2__math_js__["f" /* epsilon */]) p0 *= (cw ? 1 : -1), a00 += p0, a10 -= p0;
        else da0 = 0, a00 = a10 = (a0 + a1) / 2;
        if ((da1 -= p1 * 2) > __WEBPACK_IMPORTED_MODULE_2__math_js__["f" /* epsilon */]) p1 *= (cw ? 1 : -1), a01 += p1, a11 -= p1;
        else da1 = 0, a01 = a11 = (a0 + a1) / 2;
      }
 
      var x01 = r1 * Object(__WEBPACK_IMPORTED_MODULE_2__math_js__["e" /* cos */])(a01),
          y01 = r1 * Object(__WEBPACK_IMPORTED_MODULE_2__math_js__["k" /* sin */])(a01),
          x10 = r0 * Object(__WEBPACK_IMPORTED_MODULE_2__math_js__["e" /* cos */])(a10),
          y10 = r0 * Object(__WEBPACK_IMPORTED_MODULE_2__math_js__["k" /* sin */])(a10);
 
      // Apply rounded corners?
      if (rc > __WEBPACK_IMPORTED_MODULE_2__math_js__["f" /* epsilon */]) {
        var x11 = r1 * Object(__WEBPACK_IMPORTED_MODULE_2__math_js__["e" /* cos */])(a11),
            y11 = r1 * Object(__WEBPACK_IMPORTED_MODULE_2__math_js__["k" /* sin */])(a11),
            x00 = r0 * Object(__WEBPACK_IMPORTED_MODULE_2__math_js__["e" /* cos */])(a00),
            y00 = r0 * Object(__WEBPACK_IMPORTED_MODULE_2__math_js__["k" /* sin */])(a00),
            oc;
 
        // Restrict the corner radius according to the sector angle.
        if (da < __WEBPACK_IMPORTED_MODULE_2__math_js__["j" /* pi */] && (oc = intersect(x01, y01, x00, y00, x11, y11, x10, y10))) {
          var ax = x01 - oc[0],
              ay = y01 - oc[1],
              bx = x11 - oc[0],
              by = y11 - oc[1],
              kc = 1 / Object(__WEBPACK_IMPORTED_MODULE_2__math_js__["k" /* sin */])(Object(__WEBPACK_IMPORTED_MODULE_2__math_js__["b" /* acos */])((ax * bx + ay * by) / (Object(__WEBPACK_IMPORTED_MODULE_2__math_js__["l" /* sqrt */])(ax * ax + ay * ay) * Object(__WEBPACK_IMPORTED_MODULE_2__math_js__["l" /* sqrt */])(bx * bx + by * by))) / 2),
              lc = Object(__WEBPACK_IMPORTED_MODULE_2__math_js__["l" /* sqrt */])(oc[0] * oc[0] + oc[1] * oc[1]);
          rc0 = Object(__WEBPACK_IMPORTED_MODULE_2__math_js__["i" /* min */])(rc, (r0 - lc) / (kc - 1));
          rc1 = Object(__WEBPACK_IMPORTED_MODULE_2__math_js__["i" /* min */])(rc, (r1 - lc) / (kc + 1));
        }
      }
 
      // Is the sector collapsed to a line?
      if (!(da1 > __WEBPACK_IMPORTED_MODULE_2__math_js__["f" /* epsilon */])) context.moveTo(x01, y01);
 
      // Does the sector’s outer ring have rounded corners?
      else if (rc1 > __WEBPACK_IMPORTED_MODULE_2__math_js__["f" /* epsilon */]) {
        t0 = cornerTangents(x00, y00, x01, y01, r1, rc1, cw);
        t1 = cornerTangents(x11, y11, x10, y10, r1, rc1, cw);
 
        context.moveTo(t0.cx + t0.x01, t0.cy + t0.y01);
 
        // Have the corners merged?
        if (rc1 < rc) context.arc(t0.cx, t0.cy, rc1, Object(__WEBPACK_IMPORTED_MODULE_2__math_js__["d" /* atan2 */])(t0.y01, t0.x01), Object(__WEBPACK_IMPORTED_MODULE_2__math_js__["d" /* atan2 */])(t1.y01, t1.x01), !cw);
 
        // Otherwise, draw the two corners and the ring.
        else {
          context.arc(t0.cx, t0.cy, rc1, Object(__WEBPACK_IMPORTED_MODULE_2__math_js__["d" /* atan2 */])(t0.y01, t0.x01), Object(__WEBPACK_IMPORTED_MODULE_2__math_js__["d" /* atan2 */])(t0.y11, t0.x11), !cw);
          context.arc(0, 0, r1, Object(__WEBPACK_IMPORTED_MODULE_2__math_js__["d" /* atan2 */])(t0.cy + t0.y11, t0.cx + t0.x11), Object(__WEBPACK_IMPORTED_MODULE_2__math_js__["d" /* atan2 */])(t1.cy + t1.y11, t1.cx + t1.x11), !cw);
          context.arc(t1.cx, t1.cy, rc1, Object(__WEBPACK_IMPORTED_MODULE_2__math_js__["d" /* atan2 */])(t1.y11, t1.x11), Object(__WEBPACK_IMPORTED_MODULE_2__math_js__["d" /* atan2 */])(t1.y01, t1.x01), !cw);
        }
      }
 
      // Or is the outer ring just a circular arc?
      else context.moveTo(x01, y01), context.arc(0, 0, r1, a01, a11, !cw);
 
      // Is there no inner ring, and it’s a circular sector?
      // Or perhaps it’s an annular sector collapsed due to padding?
      if (!(r0 > __WEBPACK_IMPORTED_MODULE_2__math_js__["f" /* epsilon */]) || !(da0 > __WEBPACK_IMPORTED_MODULE_2__math_js__["f" /* epsilon */])) context.lineTo(x10, y10);
 
      // Does the sector’s inner ring (or point) have rounded corners?
      else if (rc0 > __WEBPACK_IMPORTED_MODULE_2__math_js__["f" /* epsilon */]) {
        t0 = cornerTangents(x10, y10, x11, y11, r0, -rc0, cw);
        t1 = cornerTangents(x01, y01, x00, y00, r0, -rc0, cw);
 
        context.lineTo(t0.cx + t0.x01, t0.cy + t0.y01);
 
        // Have the corners merged?
        if (rc0 < rc) context.arc(t0.cx, t0.cy, rc0, Object(__WEBPACK_IMPORTED_MODULE_2__math_js__["d" /* atan2 */])(t0.y01, t0.x01), Object(__WEBPACK_IMPORTED_MODULE_2__math_js__["d" /* atan2 */])(t1.y01, t1.x01), !cw);
 
        // Otherwise, draw the two corners and the ring.
        else {
          context.arc(t0.cx, t0.cy, rc0, Object(__WEBPACK_IMPORTED_MODULE_2__math_js__["d" /* atan2 */])(t0.y01, t0.x01), Object(__WEBPACK_IMPORTED_MODULE_2__math_js__["d" /* atan2 */])(t0.y11, t0.x11), !cw);
          context.arc(0, 0, r0, Object(__WEBPACK_IMPORTED_MODULE_2__math_js__["d" /* atan2 */])(t0.cy + t0.y11, t0.cx + t0.x11), Object(__WEBPACK_IMPORTED_MODULE_2__math_js__["d" /* atan2 */])(t1.cy + t1.y11, t1.cx + t1.x11), cw);
          context.arc(t1.cx, t1.cy, rc0, Object(__WEBPACK_IMPORTED_MODULE_2__math_js__["d" /* atan2 */])(t1.y11, t1.x11), Object(__WEBPACK_IMPORTED_MODULE_2__math_js__["d" /* atan2 */])(t1.y01, t1.x01), !cw);
        }
      }
 
      // Or is the inner ring just a circular arc?
      else context.arc(0, 0, r0, a10, a00, cw);
    }
 
    context.closePath();
 
    if (buffer) return context = null, buffer + "" || null;
  }
 
  arc.centroid = function() {
    var r = (+innerRadius.apply(this, arguments) + +outerRadius.apply(this, arguments)) / 2,
        a = (+startAngle.apply(this, arguments) + +endAngle.apply(this, arguments)) / 2 - __WEBPACK_IMPORTED_MODULE_2__math_js__["j" /* pi */] / 2;
    return [Object(__WEBPACK_IMPORTED_MODULE_2__math_js__["e" /* cos */])(a) * r, Object(__WEBPACK_IMPORTED_MODULE_2__math_js__["k" /* sin */])(a) * r];
  };
 
  arc.innerRadius = function(_) {
    return arguments.length ? (innerRadius = typeof _ === "function" ? _ : Object(__WEBPACK_IMPORTED_MODULE_1__constant_js__["a" /* default */])(+_), arc) : innerRadius;
  };
 
  arc.outerRadius = function(_) {
    return arguments.length ? (outerRadius = typeof _ === "function" ? _ : Object(__WEBPACK_IMPORTED_MODULE_1__constant_js__["a" /* default */])(+_), arc) : outerRadius;
  };
 
  arc.cornerRadius = function(_) {
    return arguments.length ? (cornerRadius = typeof _ === "function" ? _ : Object(__WEBPACK_IMPORTED_MODULE_1__constant_js__["a" /* default */])(+_), arc) : cornerRadius;
  };
 
  arc.padRadius = function(_) {
    return arguments.length ? (padRadius = _ == null ? null : typeof _ === "function" ? _ : Object(__WEBPACK_IMPORTED_MODULE_1__constant_js__["a" /* default */])(+_), arc) : padRadius;
  };
 
  arc.startAngle = function(_) {
    return arguments.length ? (startAngle = typeof _ === "function" ? _ : Object(__WEBPACK_IMPORTED_MODULE_1__constant_js__["a" /* default */])(+_), arc) : startAngle;
  };
 
  arc.endAngle = function(_) {
    return arguments.length ? (endAngle = typeof _ === "function" ? _ : Object(__WEBPACK_IMPORTED_MODULE_1__constant_js__["a" /* default */])(+_), arc) : endAngle;
  };
 
  arc.padAngle = function(_) {
    return arguments.length ? (padAngle = typeof _ === "function" ? _ : Object(__WEBPACK_IMPORTED_MODULE_1__constant_js__["a" /* default */])(+_), arc) : padAngle;
  };
 
  arc.context = function(_) {
    return arguments.length ? ((context = _ == null ? null : _), arc) : context;
  };
 
  return arc;
});
 
 
/***/ }),
/* 1433 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__constant_js__ = __webpack_require__(124);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__descending_js__ = __webpack_require__(1434);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__identity_js__ = __webpack_require__(1435);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__math_js__ = __webpack_require__(191);
 
 
 
 
 
/* harmony default export */ __webpack_exports__["a"] = (function() {
  var value = __WEBPACK_IMPORTED_MODULE_2__identity_js__["a" /* default */],
      sortValues = __WEBPACK_IMPORTED_MODULE_1__descending_js__["a" /* default */],
      sort = null,
      startAngle = Object(__WEBPACK_IMPORTED_MODULE_0__constant_js__["a" /* default */])(0),
      endAngle = Object(__WEBPACK_IMPORTED_MODULE_0__constant_js__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_3__math_js__["m" /* tau */]),
      padAngle = Object(__WEBPACK_IMPORTED_MODULE_0__constant_js__["a" /* default */])(0);
 
  function pie(data) {
    var i,
        n = data.length,
        j,
        k,
        sum = 0,
        index = new Array(n),
        arcs = new Array(n),
        a0 = +startAngle.apply(this, arguments),
        da = Math.min(__WEBPACK_IMPORTED_MODULE_3__math_js__["m" /* tau */], Math.max(-__WEBPACK_IMPORTED_MODULE_3__math_js__["m" /* tau */], endAngle.apply(this, arguments) - a0)),
        a1,
        p = Math.min(Math.abs(da) / n, padAngle.apply(this, arguments)),
        pa = p * (da < 0 ? -1 : 1),
        v;
 
    for (i = 0; i < n; ++i) {
      if ((v = arcs[index[i] = i] = +value(data[i], i, data)) > 0) {
        sum += v;
      }
    }
 
    // Optionally sort the arcs by previously-computed values or by data.
    if (sortValues != null) index.sort(function(i, j) { return sortValues(arcs[i], arcs[j]); });
    else if (sort != null) index.sort(function(i, j) { return sort(data[i], data[j]); });
 
    // Compute the arcs! They are stored in the original data's order.
    for (i = 0, k = sum ? (da - n * pa) / sum : 0; i < n; ++i, a0 = a1) {
      j = index[i], v = arcs[j], a1 = a0 + (v > 0 ? v * k : 0) + pa, arcs[j] = {
        data: data[j],
        index: i,
        value: v,
        startAngle: a0,
        endAngle: a1,
        padAngle: p
      };
    }
 
    return arcs;
  }
 
  pie.value = function(_) {
    return arguments.length ? (value = typeof _ === "function" ? _ : Object(__WEBPACK_IMPORTED_MODULE_0__constant_js__["a" /* default */])(+_), pie) : value;
  };
 
  pie.sortValues = function(_) {
    return arguments.length ? (sortValues = _, sort = null, pie) : sortValues;
  };
 
  pie.sort = function(_) {
    return arguments.length ? (sort = _, sortValues = null, pie) : sort;
  };
 
  pie.startAngle = function(_) {
    return arguments.length ? (startAngle = typeof _ === "function" ? _ : Object(__WEBPACK_IMPORTED_MODULE_0__constant_js__["a" /* default */])(+_), pie) : startAngle;
  };
 
  pie.endAngle = function(_) {
    return arguments.length ? (endAngle = typeof _ === "function" ? _ : Object(__WEBPACK_IMPORTED_MODULE_0__constant_js__["a" /* default */])(+_), pie) : endAngle;
  };
 
  pie.padAngle = function(_) {
    return arguments.length ? (padAngle = typeof _ === "function" ? _ : Object(__WEBPACK_IMPORTED_MODULE_0__constant_js__["a" /* default */])(+_), pie) : padAngle;
  };
 
  return pie;
});
 
 
/***/ }),
/* 1434 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony default export */ __webpack_exports__["a"] = (function(a, b) {
  return b < a ? -1 : b > a ? 1 : b >= a ? 0 : NaN;
});
 
 
/***/ }),
/* 1435 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony default export */ __webpack_exports__["a"] = (function(d) {
  return d;
});
 
 
/***/ }),
/* 1436 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__curve_radial_js__ = __webpack_require__(769);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__area_js__ = __webpack_require__(768);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__lineRadial_js__ = __webpack_require__(770);
 
 
 
 
/* harmony default export */ __webpack_exports__["a"] = (function() {
  var a = Object(__WEBPACK_IMPORTED_MODULE_1__area_js__["a" /* default */])().curve(__WEBPACK_IMPORTED_MODULE_0__curve_radial_js__["a" /* curveRadialLinear */]),
      c = a.curve,
      x0 = a.lineX0,
      x1 = a.lineX1,
      y0 = a.lineY0,
      y1 = a.lineY1;
 
  a.angle = a.x, delete a.x;
  a.startAngle = a.x0, delete a.x0;
  a.endAngle = a.x1, delete a.x1;
  a.radius = a.y, delete a.y;
  a.innerRadius = a.y0, delete a.y0;
  a.outerRadius = a.y1, delete a.y1;
  a.lineStartAngle = function() { return Object(__WEBPACK_IMPORTED_MODULE_2__lineRadial_js__["b" /* lineRadial */])(x0()); }, delete a.lineX0;
  a.lineEndAngle = function() { return Object(__WEBPACK_IMPORTED_MODULE_2__lineRadial_js__["b" /* lineRadial */])(x1()); }, delete a.lineX1;
  a.lineInnerRadius = function() { return Object(__WEBPACK_IMPORTED_MODULE_2__lineRadial_js__["b" /* lineRadial */])(y0()); }, delete a.lineY0;
  a.lineOuterRadius = function() { return Object(__WEBPACK_IMPORTED_MODULE_2__lineRadial_js__["b" /* lineRadial */])(y1()); }, delete a.lineY1;
 
  a.curve = function(_) {
    return arguments.length ? c(Object(__WEBPACK_IMPORTED_MODULE_0__curve_radial_js__["b" /* default */])(_)) : c()._curve;
  };
 
  return a;
});
 
 
/***/ }),
/* 1437 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = linkHorizontal;
/* harmony export (immutable) */ __webpack_exports__["c"] = linkVertical;
/* harmony export (immutable) */ __webpack_exports__["b"] = linkRadial;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_d3_path__ = __webpack_require__(120);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__array_js__ = __webpack_require__(772);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__constant_js__ = __webpack_require__(124);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__point_js__ = __webpack_require__(371);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__pointRadial_js__ = __webpack_require__(771);
 
 
 
 
 
 
function linkSource(d) {
  return d.source;
}
 
function linkTarget(d) {
  return d.target;
}
 
function link(curve) {
  var source = linkSource,
      target = linkTarget,
      x = __WEBPACK_IMPORTED_MODULE_3__point_js__["a" /* x */],
      y = __WEBPACK_IMPORTED_MODULE_3__point_js__["b" /* y */],
      context = null;
 
  function link() {
    var buffer, argv = __WEBPACK_IMPORTED_MODULE_1__array_js__["a" /* slice */].call(arguments), s = source.apply(this, argv), t = target.apply(this, argv);
    if (!context) context = buffer = Object(__WEBPACK_IMPORTED_MODULE_0_d3_path__["a" /* path */])();
    curve(context, +x.apply(this, (argv[0] = s, argv)), +y.apply(this, argv), +x.apply(this, (argv[0] = t, argv)), +y.apply(this, argv));
    if (buffer) return context = null, buffer + "" || null;
  }
 
  link.source = function(_) {
    return arguments.length ? (source = _, link) : source;
  };
 
  link.target = function(_) {
    return arguments.length ? (target = _, link) : target;
  };
 
  link.x = function(_) {
    return arguments.length ? (x = typeof _ === "function" ? _ : Object(__WEBPACK_IMPORTED_MODULE_2__constant_js__["a" /* default */])(+_), link) : x;
  };
 
  link.y = function(_) {
    return arguments.length ? (y = typeof _ === "function" ? _ : Object(__WEBPACK_IMPORTED_MODULE_2__constant_js__["a" /* default */])(+_), link) : y;
  };
 
  link.context = function(_) {
    return arguments.length ? ((context = _ == null ? null : _), link) : context;
  };
 
  return link;
}
 
function curveHorizontal(context, x0, y0, x1, y1) {
  context.moveTo(x0, y0);
  context.bezierCurveTo(x0 = (x0 + x1) / 2, y0, x0, y1, x1, y1);
}
 
function curveVertical(context, x0, y0, x1, y1) {
  context.moveTo(x0, y0);
  context.bezierCurveTo(x0, y0 = (y0 + y1) / 2, x1, y0, x1, y1);
}
 
function curveRadial(context, x0, y0, x1, y1) {
  var p0 = Object(__WEBPACK_IMPORTED_MODULE_4__pointRadial_js__["a" /* default */])(x0, y0),
      p1 = Object(__WEBPACK_IMPORTED_MODULE_4__pointRadial_js__["a" /* default */])(x0, y0 = (y0 + y1) / 2),
      p2 = Object(__WEBPACK_IMPORTED_MODULE_4__pointRadial_js__["a" /* default */])(x1, y0),
      p3 = Object(__WEBPACK_IMPORTED_MODULE_4__pointRadial_js__["a" /* default */])(x1, y1);
  context.moveTo(p0[0], p0[1]);
  context.bezierCurveTo(p1[0], p1[1], p2[0], p2[1], p3[0], p3[1]);
}
 
function linkHorizontal() {
  return link(curveHorizontal);
}
 
function linkVertical() {
  return link(curveVertical);
}
 
function linkRadial() {
  var l = link(curveRadial);
  l.angle = l.x, delete l.x;
  l.radius = l.y, delete l.y;
  return l;
}
 
 
/***/ }),
/* 1438 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return symbols; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_d3_path__ = __webpack_require__(120);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__symbol_circle_js__ = __webpack_require__(773);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__symbol_cross_js__ = __webpack_require__(774);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__symbol_diamond_js__ = __webpack_require__(775);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__symbol_star_js__ = __webpack_require__(776);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__symbol_square_js__ = __webpack_require__(777);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__symbol_triangle_js__ = __webpack_require__(778);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__symbol_wye_js__ = __webpack_require__(779);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__constant_js__ = __webpack_require__(124);
 
 
 
 
 
 
 
 
 
 
var symbols = [
  __WEBPACK_IMPORTED_MODULE_1__symbol_circle_js__["a" /* default */],
  __WEBPACK_IMPORTED_MODULE_2__symbol_cross_js__["a" /* default */],
  __WEBPACK_IMPORTED_MODULE_3__symbol_diamond_js__["a" /* default */],
  __WEBPACK_IMPORTED_MODULE_5__symbol_square_js__["a" /* default */],
  __WEBPACK_IMPORTED_MODULE_4__symbol_star_js__["a" /* default */],
  __WEBPACK_IMPORTED_MODULE_6__symbol_triangle_js__["a" /* default */],
  __WEBPACK_IMPORTED_MODULE_7__symbol_wye_js__["a" /* default */]
];
 
/* harmony default export */ __webpack_exports__["a"] = (function() {
  var type = Object(__WEBPACK_IMPORTED_MODULE_8__constant_js__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__symbol_circle_js__["a" /* default */]),
      size = Object(__WEBPACK_IMPORTED_MODULE_8__constant_js__["a" /* default */])(64),
      context = null;
 
  function symbol() {
    var buffer;
    if (!context) context = buffer = Object(__WEBPACK_IMPORTED_MODULE_0_d3_path__["a" /* path */])();
    type.apply(this, arguments).draw(context, +size.apply(this, arguments));
    if (buffer) return context = null, buffer + "" || null;
  }
 
  symbol.type = function(_) {
    return arguments.length ? (type = typeof _ === "function" ? _ : Object(__WEBPACK_IMPORTED_MODULE_8__constant_js__["a" /* default */])(_), symbol) : type;
  };
 
  symbol.size = function(_) {
    return arguments.length ? (size = typeof _ === "function" ? _ : Object(__WEBPACK_IMPORTED_MODULE_8__constant_js__["a" /* default */])(+_), symbol) : size;
  };
 
  symbol.context = function(_) {
    return arguments.length ? (context = _ == null ? null : _, symbol) : context;
  };
 
  return symbol;
});
 
 
/***/ }),
/* 1439 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__noop_js__ = __webpack_require__(258);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__basis_js__ = __webpack_require__(259);
 
 
 
function BasisClosed(context) {
  this._context = context;
}
 
BasisClosed.prototype = {
  areaStart: __WEBPACK_IMPORTED_MODULE_0__noop_js__["a" /* default */],
  areaEnd: __WEBPACK_IMPORTED_MODULE_0__noop_js__["a" /* default */],
  lineStart: function() {
    this._x0 = this._x1 = this._x2 = this._x3 = this._x4 =
    this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = NaN;
    this._point = 0;
  },
  lineEnd: function() {
    switch (this._point) {
      case 1: {
        this._context.moveTo(this._x2, this._y2);
        this._context.closePath();
        break;
      }
      case 2: {
        this._context.moveTo((this._x2 + 2 * this._x3) / 3, (this._y2 + 2 * this._y3) / 3);
        this._context.lineTo((this._x3 + 2 * this._x2) / 3, (this._y3 + 2 * this._y2) / 3);
        this._context.closePath();
        break;
      }
      case 3: {
        this.point(this._x2, this._y2);
        this.point(this._x3, this._y3);
        this.point(this._x4, this._y4);
        break;
      }
    }
  },
  point: function(x, y) {
    x = +x, y = +y;
    switch (this._point) {
      case 0: this._point = 1; this._x2 = x, this._y2 = y; break;
      case 1: this._point = 2; this._x3 = x, this._y3 = y; break;
      case 2: this._point = 3; this._x4 = x, this._y4 = y; this._context.moveTo((this._x0 + 4 * this._x1 + x) / 6, (this._y0 + 4 * this._y1 + y) / 6); break;
      default: Object(__WEBPACK_IMPORTED_MODULE_1__basis_js__["c" /* point */])(this, x, y); break;
    }
    this._x0 = this._x1, this._x1 = x;
    this._y0 = this._y1, this._y1 = y;
  }
};
 
/* harmony default export */ __webpack_exports__["a"] = (function(context) {
  return new BasisClosed(context);
});
 
 
/***/ }),
/* 1440 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__basis_js__ = __webpack_require__(259);
 
 
function BasisOpen(context) {
  this._context = context;
}
 
BasisOpen.prototype = {
  areaStart: function() {
    this._line = 0;
  },
  areaEnd: function() {
    this._line = NaN;
  },
  lineStart: function() {
    this._x0 = this._x1 =
    this._y0 = this._y1 = NaN;
    this._point = 0;
  },
  lineEnd: function() {
    if (this._line || (this._line !== 0 && this._point === 3)) this._context.closePath();
    this._line = 1 - this._line;
  },
  point: function(x, y) {
    x = +x, y = +y;
    switch (this._point) {
      case 0: this._point = 1; break;
      case 1: this._point = 2; break;
      case 2: this._point = 3; var x0 = (this._x0 + 4 * this._x1 + x) / 6, y0 = (this._y0 + 4 * this._y1 + y) / 6; this._line ? this._context.lineTo(x0, y0) : this._context.moveTo(x0, y0); break;
      case 3: this._point = 4; // proceed
      default: Object(__WEBPACK_IMPORTED_MODULE_0__basis_js__["c" /* point */])(this, x, y); break;
    }
    this._x0 = this._x1, this._x1 = x;
    this._y0 = this._y1, this._y1 = y;
  }
};
 
/* harmony default export */ __webpack_exports__["a"] = (function(context) {
  return new BasisOpen(context);
});
 
 
/***/ }),
/* 1441 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__basis_js__ = __webpack_require__(259);
 
 
function Bundle(context, beta) {
  this._basis = new __WEBPACK_IMPORTED_MODULE_0__basis_js__["a" /* Basis */](context);
  this._beta = beta;
}
 
Bundle.prototype = {
  lineStart: function() {
    this._x = [];
    this._y = [];
    this._basis.lineStart();
  },
  lineEnd: function() {
    var x = this._x,
        y = this._y,
        j = x.length - 1;
 
    if (j > 0) {
      var x0 = x[0],
          y0 = y[0],
          dx = x[j] - x0,
          dy = y[j] - y0,
          i = -1,
          t;
 
      while (++i <= j) {
        t = i / j;
        this._basis.point(
          this._beta * x[i] + (1 - this._beta) * (x0 + t * dx),
          this._beta * y[i] + (1 - this._beta) * (y0 + t * dy)
        );
      }
    }
 
    this._x = this._y = null;
    this._basis.lineEnd();
  },
  point: function(x, y) {
    this._x.push(+x);
    this._y.push(+y);
  }
};
 
/* harmony default export */ __webpack_exports__["a"] = ((function custom(beta) {
 
  function bundle(context) {
    return beta === 1 ? new __WEBPACK_IMPORTED_MODULE_0__basis_js__["a" /* Basis */](context) : new Bundle(context, beta);
  }
 
  bundle.beta = function(beta) {
    return custom(+beta);
  };
 
  return bundle;
})(0.85));
 
 
/***/ }),
/* 1442 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__cardinalClosed_js__ = __webpack_require__(780);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__noop_js__ = __webpack_require__(258);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__catmullRom_js__ = __webpack_require__(372);
 
 
 
 
function CatmullRomClosed(context, alpha) {
  this._context = context;
  this._alpha = alpha;
}
 
CatmullRomClosed.prototype = {
  areaStart: __WEBPACK_IMPORTED_MODULE_1__noop_js__["a" /* default */],
  areaEnd: __WEBPACK_IMPORTED_MODULE_1__noop_js__["a" /* default */],
  lineStart: function() {
    this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._x5 =
    this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = this._y5 = NaN;
    this._l01_a = this._l12_a = this._l23_a =
    this._l01_2a = this._l12_2a = this._l23_2a =
    this._point = 0;
  },
  lineEnd: function() {
    switch (this._point) {
      case 1: {
        this._context.moveTo(this._x3, this._y3);
        this._context.closePath();
        break;
      }
      case 2: {
        this._context.lineTo(this._x3, this._y3);
        this._context.closePath();
        break;
      }
      case 3: {
        this.point(this._x3, this._y3);
        this.point(this._x4, this._y4);
        this.point(this._x5, this._y5);
        break;
      }
    }
  },
  point: function(x, y) {
    x = +x, y = +y;
 
    if (this._point) {
      var x23 = this._x2 - x,
          y23 = this._y2 - y;
      this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, this._alpha));
    }
 
    switch (this._point) {
      case 0: this._point = 1; this._x3 = x, this._y3 = y; break;
      case 1: this._point = 2; this._context.moveTo(this._x4 = x, this._y4 = y); break;
      case 2: this._point = 3; this._x5 = x, this._y5 = y; break;
      default: Object(__WEBPACK_IMPORTED_MODULE_2__catmullRom_js__["b" /* point */])(this, x, y); break;
    }
 
    this._l01_a = this._l12_a, this._l12_a = this._l23_a;
    this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a;
    this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;
    this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;
  }
};
 
/* harmony default export */ __webpack_exports__["a"] = ((function custom(alpha) {
 
  function catmullRom(context) {
    return alpha ? new CatmullRomClosed(context, alpha) : new __WEBPACK_IMPORTED_MODULE_0__cardinalClosed_js__["a" /* CardinalClosed */](context, 0);
  }
 
  catmullRom.alpha = function(alpha) {
    return custom(+alpha);
  };
 
  return catmullRom;
})(0.5));
 
 
/***/ }),
/* 1443 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__cardinalOpen_js__ = __webpack_require__(781);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__catmullRom_js__ = __webpack_require__(372);
 
 
 
function CatmullRomOpen(context, alpha) {
  this._context = context;
  this._alpha = alpha;
}
 
CatmullRomOpen.prototype = {
  areaStart: function() {
    this._line = 0;
  },
  areaEnd: function() {
    this._line = NaN;
  },
  lineStart: function() {
    this._x0 = this._x1 = this._x2 =
    this._y0 = this._y1 = this._y2 = NaN;
    this._l01_a = this._l12_a = this._l23_a =
    this._l01_2a = this._l12_2a = this._l23_2a =
    this._point = 0;
  },
  lineEnd: function() {
    if (this._line || (this._line !== 0 && this._point === 3)) this._context.closePath();
    this._line = 1 - this._line;
  },
  point: function(x, y) {
    x = +x, y = +y;
 
    if (this._point) {
      var x23 = this._x2 - x,
          y23 = this._y2 - y;
      this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, this._alpha));
    }
 
    switch (this._point) {
      case 0: this._point = 1; break;
      case 1: this._point = 2; break;
      case 2: this._point = 3; this._line ? this._context.lineTo(this._x2, this._y2) : this._context.moveTo(this._x2, this._y2); break;
      case 3: this._point = 4; // proceed
      default: Object(__WEBPACK_IMPORTED_MODULE_1__catmullRom_js__["b" /* point */])(this, x, y); break;
    }
 
    this._l01_a = this._l12_a, this._l12_a = this._l23_a;
    this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a;
    this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;
    this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;
  }
};
 
/* harmony default export */ __webpack_exports__["a"] = ((function custom(alpha) {
 
  function catmullRom(context) {
    return alpha ? new CatmullRomOpen(context, alpha) : new __WEBPACK_IMPORTED_MODULE_0__cardinalOpen_js__["a" /* CardinalOpen */](context, 0);
  }
 
  catmullRom.alpha = function(alpha) {
    return custom(+alpha);
  };
 
  return catmullRom;
})(0.5));
 
 
/***/ }),
/* 1444 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__noop_js__ = __webpack_require__(258);
 
 
function LinearClosed(context) {
  this._context = context;
}
 
LinearClosed.prototype = {
  areaStart: __WEBPACK_IMPORTED_MODULE_0__noop_js__["a" /* default */],
  areaEnd: __WEBPACK_IMPORTED_MODULE_0__noop_js__["a" /* default */],
  lineStart: function() {
    this._point = 0;
  },
  lineEnd: function() {
    if (this._point) this._context.closePath();
  },
  point: function(x, y) {
    x = +x, y = +y;
    if (this._point) this._context.lineTo(x, y);
    else this._point = 1, this._context.moveTo(x, y);
  }
};
 
/* harmony default export */ __webpack_exports__["a"] = (function(context) {
  return new LinearClosed(context);
});
 
 
/***/ }),
/* 1445 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = monotoneX;
/* harmony export (immutable) */ __webpack_exports__["b"] = monotoneY;
function sign(x) {
  return x < 0 ? -1 : 1;
}
 
// Calculate the slopes of the tangents (Hermite-type interpolation) based on
// the following paper: Steffen, M. 1990. A Simple Method for Monotonic
// Interpolation in One Dimension. Astronomy and Astrophysics, Vol. 239, NO.
// NOV(II), P. 443, 1990.
function slope3(that, x2, y2) {
  var h0 = that._x1 - that._x0,
      h1 = x2 - that._x1,
      s0 = (that._y1 - that._y0) / (h0 || h1 < 0 && -0),
      s1 = (y2 - that._y1) / (h1 || h0 < 0 && -0),
      p = (s0 * h1 + s1 * h0) / (h0 + h1);
  return (sign(s0) + sign(s1)) * Math.min(Math.abs(s0), Math.abs(s1), 0.5 * Math.abs(p)) || 0;
}
 
// Calculate a one-sided slope.
function slope2(that, t) {
  var h = that._x1 - that._x0;
  return h ? (3 * (that._y1 - that._y0) / h - t) / 2 : t;
}
 
// According to https://en.wikipedia.org/wiki/Cubic_Hermite_spline#Representations
// "you can express cubic Hermite interpolation in terms of cubic Bézier curves
// with respect to the four values p0, p0 + m0 / 3, p1 - m1 / 3, p1".
function point(that, t0, t1) {
  var x0 = that._x0,
      y0 = that._y0,
      x1 = that._x1,
      y1 = that._y1,
      dx = (x1 - x0) / 3;
  that._context.bezierCurveTo(x0 + dx, y0 + dx * t0, x1 - dx, y1 - dx * t1, x1, y1);
}
 
function MonotoneX(context) {
  this._context = context;
}
 
MonotoneX.prototype = {
  areaStart: function() {
    this._line = 0;
  },
  areaEnd: function() {
    this._line = NaN;
  },
  lineStart: function() {
    this._x0 = this._x1 =
    this._y0 = this._y1 =
    this._t0 = NaN;
    this._point = 0;
  },
  lineEnd: function() {
    switch (this._point) {
      case 2: this._context.lineTo(this._x1, this._y1); break;
      case 3: point(this, this._t0, slope2(this, this._t0)); break;
    }
    if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();
    this._line = 1 - this._line;
  },
  point: function(x, y) {
    var t1 = NaN;
 
    x = +x, y = +y;
    if (x === this._x1 && y === this._y1) return; // Ignore coincident points.
    switch (this._point) {
      case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;
      case 1: this._point = 2; break;
      case 2: this._point = 3; point(this, slope2(this, t1 = slope3(this, x, y)), t1); break;
      default: point(this, this._t0, t1 = slope3(this, x, y)); break;
    }
 
    this._x0 = this._x1, this._x1 = x;
    this._y0 = this._y1, this._y1 = y;
    this._t0 = t1;
  }
}
 
function MonotoneY(context) {
  this._context = new ReflectContext(context);
}
 
(MonotoneY.prototype = Object.create(MonotoneX.prototype)).point = function(x, y) {
  MonotoneX.prototype.point.call(this, y, x);
};
 
function ReflectContext(context) {
  this._context = context;
}
 
ReflectContext.prototype = {
  moveTo: function(x, y) { this._context.moveTo(y, x); },
  closePath: function() { this._context.closePath(); },
  lineTo: function(x, y) { this._context.lineTo(y, x); },
  bezierCurveTo: function(x1, y1, x2, y2, x, y) { this._context.bezierCurveTo(y1, x1, y2, x2, y, x); }
};
 
function monotoneX(context) {
  return new MonotoneX(context);
}
 
function monotoneY(context) {
  return new MonotoneY(context);
}
 
 
/***/ }),
/* 1446 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
function Natural(context) {
  this._context = context;
}
 
Natural.prototype = {
  areaStart: function() {
    this._line = 0;
  },
  areaEnd: function() {
    this._line = NaN;
  },
  lineStart: function() {
    this._x = [];
    this._y = [];
  },
  lineEnd: function() {
    var x = this._x,
        y = this._y,
        n = x.length;
 
    if (n) {
      this._line ? this._context.lineTo(x[0], y[0]) : this._context.moveTo(x[0], y[0]);
      if (n === 2) {
        this._context.lineTo(x[1], y[1]);
      } else {
        var px = controlPoints(x),
            py = controlPoints(y);
        for (var i0 = 0, i1 = 1; i1 < n; ++i0, ++i1) {
          this._context.bezierCurveTo(px[0][i0], py[0][i0], px[1][i0], py[1][i0], x[i1], y[i1]);
        }
      }
    }
 
    if (this._line || (this._line !== 0 && n === 1)) this._context.closePath();
    this._line = 1 - this._line;
    this._x = this._y = null;
  },
  point: function(x, y) {
    this._x.push(+x);
    this._y.push(+y);
  }
};
 
// See https://www.particleincell.com/2012/bezier-splines/ for derivation.
function controlPoints(x) {
  var i,
      n = x.length - 1,
      m,
      a = new Array(n),
      b = new Array(n),
      r = new Array(n);
  a[0] = 0, b[0] = 2, r[0] = x[0] + 2 * x[1];
  for (i = 1; i < n - 1; ++i) a[i] = 1, b[i] = 4, r[i] = 4 * x[i] + 2 * x[i + 1];
  a[n - 1] = 2, b[n - 1] = 7, r[n - 1] = 8 * x[n - 1] + x[n];
  for (i = 1; i < n; ++i) m = a[i] / b[i - 1], b[i] -= m, r[i] -= m * r[i - 1];
  a[n - 1] = r[n - 1] / b[n - 1];
  for (i = n - 2; i >= 0; --i) a[i] = (r[i] - a[i + 1]) / b[i];
  b[n - 1] = (x[n] + a[n - 1]) / 2;
  for (i = 0; i < n - 1; ++i) b[i] = 2 * x[i + 1] - a[i + 1];
  return [a, b];
}
 
/* harmony default export */ __webpack_exports__["a"] = (function(context) {
  return new Natural(context);
});
 
 
/***/ }),
/* 1447 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["c"] = stepBefore;
/* harmony export (immutable) */ __webpack_exports__["b"] = stepAfter;
function Step(context, t) {
  this._context = context;
  this._t = t;
}
 
Step.prototype = {
  areaStart: function() {
    this._line = 0;
  },
  areaEnd: function() {
    this._line = NaN;
  },
  lineStart: function() {
    this._x = this._y = NaN;
    this._point = 0;
  },
  lineEnd: function() {
    if (0 < this._t && this._t < 1 && this._point === 2) this._context.lineTo(this._x, this._y);
    if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();
    if (this._line >= 0) this._t = 1 - this._t, this._line = 1 - this._line;
  },
  point: function(x, y) {
    x = +x, y = +y;
    switch (this._point) {
      case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;
      case 1: this._point = 2; // proceed
      default: {
        if (this._t <= 0) {
          this._context.lineTo(this._x, y);
          this._context.lineTo(x, y);
        } else {
          var x1 = this._x * (1 - this._t) + x * this._t;
          this._context.lineTo(x1, this._y);
          this._context.lineTo(x1, y);
        }
        break;
      }
    }
    this._x = x, this._y = y;
  }
};
 
/* harmony default export */ __webpack_exports__["a"] = (function(context) {
  return new Step(context, 0.5);
});
 
function stepBefore(context) {
  return new Step(context, 0);
}
 
function stepAfter(context) {
  return new Step(context, 1);
}
 
 
/***/ }),
/* 1448 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__array_js__ = __webpack_require__(772);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__constant_js__ = __webpack_require__(124);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__offset_none_js__ = __webpack_require__(192);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__order_none_js__ = __webpack_require__(193);
 
 
 
 
 
function stackValue(d, key) {
  return d[key];
}
 
/* harmony default export */ __webpack_exports__["a"] = (function() {
  var keys = Object(__WEBPACK_IMPORTED_MODULE_1__constant_js__["a" /* default */])([]),
      order = __WEBPACK_IMPORTED_MODULE_3__order_none_js__["a" /* default */],
      offset = __WEBPACK_IMPORTED_MODULE_2__offset_none_js__["a" /* default */],
      value = stackValue;
 
  function stack(data) {
    var kz = keys.apply(this, arguments),
        i,
        m = data.length,
        n = kz.length,
        sz = new Array(n),
        oz;
 
    for (i = 0; i < n; ++i) {
      for (var ki = kz[i], si = sz[i] = new Array(m), j = 0, sij; j < m; ++j) {
        si[j] = sij = [0, +value(data[j], ki, j, data)];
        sij.data = data[j];
      }
      si.key = ki;
    }
 
    for (i = 0, oz = order(sz); i < n; ++i) {
      sz[oz[i]].index = i;
    }
 
    offset(sz, oz);
    return sz;
  }
 
  stack.keys = function(_) {
    return arguments.length ? (keys = typeof _ === "function" ? _ : Object(__WEBPACK_IMPORTED_MODULE_1__constant_js__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_0__array_js__["a" /* slice */].call(_)), stack) : keys;
  };
 
  stack.value = function(_) {
    return arguments.length ? (value = typeof _ === "function" ? _ : Object(__WEBPACK_IMPORTED_MODULE_1__constant_js__["a" /* default */])(+_), stack) : value;
  };
 
  stack.order = function(_) {
    return arguments.length ? (order = _ == null ? __WEBPACK_IMPORTED_MODULE_3__order_none_js__["a" /* default */] : typeof _ === "function" ? _ : Object(__WEBPACK_IMPORTED_MODULE_1__constant_js__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_0__array_js__["a" /* slice */].call(_)), stack) : order;
  };
 
  stack.offset = function(_) {
    return arguments.length ? (offset = _ == null ? __WEBPACK_IMPORTED_MODULE_2__offset_none_js__["a" /* default */] : _, stack) : offset;
  };
 
  return stack;
});
 
 
/***/ }),
/* 1449 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__none_js__ = __webpack_require__(192);
 
 
/* harmony default export */ __webpack_exports__["a"] = (function(series, order) {
  if (!((n = series.length) > 0)) return;
  for (var i, n, j = 0, m = series[0].length, y; j < m; ++j) {
    for (y = i = 0; i < n; ++i) y += series[i][j][1] || 0;
    if (y) for (i = 0; i < n; ++i) series[i][j][1] /= y;
  }
  Object(__WEBPACK_IMPORTED_MODULE_0__none_js__["a" /* default */])(series, order);
});
 
 
/***/ }),
/* 1450 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony default export */ __webpack_exports__["a"] = (function(series, order) {
  if (!((n = series.length) > 0)) return;
  for (var i, j = 0, d, dy, yp, yn, n, m = series[order[0]].length; j < m; ++j) {
    for (yp = yn = 0, i = 0; i < n; ++i) {
      if ((dy = (d = series[order[i]][j])[1] - d[0]) > 0) {
        d[0] = yp, d[1] = yp += dy;
      } else if (dy < 0) {
        d[1] = yn, d[0] = yn += dy;
      } else {
        d[0] = 0, d[1] = dy;
      }
    }
  }
});
 
 
/***/ }),
/* 1451 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__none_js__ = __webpack_require__(192);
 
 
/* harmony default export */ __webpack_exports__["a"] = (function(series, order) {
  if (!((n = series.length) > 0)) return;
  for (var j = 0, s0 = series[order[0]], n, m = s0.length; j < m; ++j) {
    for (var i = 0, y = 0; i < n; ++i) y += series[i][j][1] || 0;
    s0[j][1] += s0[j][0] = -y / 2;
  }
  Object(__WEBPACK_IMPORTED_MODULE_0__none_js__["a" /* default */])(series, order);
});
 
 
/***/ }),
/* 1452 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__none_js__ = __webpack_require__(192);
 
 
/* harmony default export */ __webpack_exports__["a"] = (function(series, order) {
  if (!((n = series.length) > 0) || !((m = (s0 = series[order[0]]).length) > 0)) return;
  for (var y = 0, j = 1, s0, m, n; j < m; ++j) {
    for (var i = 0, s1 = 0, s2 = 0; i < n; ++i) {
      var si = series[order[i]],
          sij0 = si[j][1] || 0,
          sij1 = si[j - 1][1] || 0,
          s3 = (sij0 - sij1) / 2;
      for (var k = 0; k < i; ++k) {
        var sk = series[order[k]],
            skj0 = sk[j][1] || 0,
            skj1 = sk[j - 1][1] || 0;
        s3 += skj0 - skj1;
      }
      s1 += sij0, s2 += s3 * sij0;
    }
    s0[j - 1][1] += s0[j - 1][0] = y;
    if (s1) y -= s2 / s1;
  }
  s0[j - 1][1] += s0[j - 1][0] = y;
  Object(__WEBPACK_IMPORTED_MODULE_0__none_js__["a" /* default */])(series, order);
});
 
 
/***/ }),
/* 1453 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__ascending_js__ = __webpack_require__(373);
 
 
/* harmony default export */ __webpack_exports__["a"] = (function(series) {
  return Object(__WEBPACK_IMPORTED_MODULE_0__ascending_js__["a" /* default */])(series).reverse();
});
 
 
/***/ }),
/* 1454 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__appearance_js__ = __webpack_require__(782);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__ascending_js__ = __webpack_require__(373);
 
 
 
/* harmony default export */ __webpack_exports__["a"] = (function(series) {
  var n = series.length,
      i,
      j,
      sums = series.map(__WEBPACK_IMPORTED_MODULE_1__ascending_js__["b" /* sum */]),
      order = Object(__WEBPACK_IMPORTED_MODULE_0__appearance_js__["a" /* default */])(series),
      top = 0,
      bottom = 0,
      tops = [],
      bottoms = [];
 
  for (i = 0; i < n; ++i) {
    j = order[i];
    if (top < bottom) {
      top += sums[j];
      tops.push(j);
    } else {
      bottom += sums[j];
      bottoms.push(j);
    }
  }
 
  return bottoms.reverse().concat(tops);
});
 
 
/***/ }),
/* 1455 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__none_js__ = __webpack_require__(193);
 
 
/* harmony default export */ __webpack_exports__["a"] = (function(series) {
  return Object(__WEBPACK_IMPORTED_MODULE_0__none_js__["a" /* default */])(series).reverse();
});
 
 
/***/ }),
/* 1456 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__voronoi__ = __webpack_require__(1457);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_0__voronoi__["a"]; });
 
 
 
/***/ }),
/* 1457 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__constant__ = __webpack_require__(1458);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__point__ = __webpack_require__(1459);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Diagram__ = __webpack_require__(194);
 
 
 
 
/* harmony default export */ __webpack_exports__["a"] = (function() {
  var x = __WEBPACK_IMPORTED_MODULE_1__point__["a" /* x */],
      y = __WEBPACK_IMPORTED_MODULE_1__point__["b" /* y */],
      extent = null;
 
  function voronoi(data) {
    return new __WEBPACK_IMPORTED_MODULE_2__Diagram__["d" /* default */](data.map(function(d, i) {
      var s = [Math.round(x(d, i, data) / __WEBPACK_IMPORTED_MODULE_2__Diagram__["f" /* epsilon */]) * __WEBPACK_IMPORTED_MODULE_2__Diagram__["f" /* epsilon */], Math.round(y(d, i, data) / __WEBPACK_IMPORTED_MODULE_2__Diagram__["f" /* epsilon */]) * __WEBPACK_IMPORTED_MODULE_2__Diagram__["f" /* epsilon */]];
      s.index = i;
      s.data = d;
      return s;
    }), extent);
  }
 
  voronoi.polygons = function(data) {
    return voronoi(data).polygons();
  };
 
  voronoi.links = function(data) {
    return voronoi(data).links();
  };
 
  voronoi.triangles = function(data) {
    return voronoi(data).triangles();
  };
 
  voronoi.x = function(_) {
    return arguments.length ? (x = typeof _ === "function" ? _ : Object(__WEBPACK_IMPORTED_MODULE_0__constant__["a" /* default */])(+_), voronoi) : x;
  };
 
  voronoi.y = function(_) {
    return arguments.length ? (y = typeof _ === "function" ? _ : Object(__WEBPACK_IMPORTED_MODULE_0__constant__["a" /* default */])(+_), voronoi) : y;
  };
 
  voronoi.extent = function(_) {
    return arguments.length ? (extent = _ == null ? null : [[+_[0][0], +_[0][1]], [+_[1][0], +_[1][1]]], voronoi) : extent && [[extent[0][0], extent[0][1]], [extent[1][0], extent[1][1]]];
  };
 
  voronoi.size = function(_) {
    return arguments.length ? (extent = _ == null ? null : [[0, 0], [+_[0], +_[1]]], voronoi) : extent && [extent[1][0] - extent[0][0], extent[1][1] - extent[0][1]];
  };
 
  return voronoi;
});
 
 
/***/ }),
/* 1458 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony default export */ __webpack_exports__["a"] = (function(x) {
  return function() {
    return x;
  };
});
 
 
/***/ }),
/* 1459 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = x;
/* harmony export (immutable) */ __webpack_exports__["b"] = y;
function x(d) {
  return d[0];
}
 
function y(d) {
  return d[1];
}
 
 
/***/ }),
/* 1460 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["b"] = removeBeach;
/* harmony export (immutable) */ __webpack_exports__["a"] = addBeach;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__RedBlackTree__ = __webpack_require__(374);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Cell__ = __webpack_require__(783);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Circle__ = __webpack_require__(784);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Edge__ = __webpack_require__(375);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__Diagram__ = __webpack_require__(194);
 
 
 
 
 
 
var beachPool = [];
 
function Beach() {
  Object(__WEBPACK_IMPORTED_MODULE_0__RedBlackTree__["a" /* RedBlackNode */])(this);
  this.edge =
  this.site =
  this.circle = null;
}
 
function createBeach(site) {
  var beach = beachPool.pop() || new Beach;
  beach.site = site;
  return beach;
}
 
function detachBeach(beach) {
  Object(__WEBPACK_IMPORTED_MODULE_2__Circle__["b" /* detachCircle */])(beach);
  __WEBPACK_IMPORTED_MODULE_4__Diagram__["a" /* beaches */].remove(beach);
  beachPool.push(beach);
  Object(__WEBPACK_IMPORTED_MODULE_0__RedBlackTree__["a" /* RedBlackNode */])(beach);
}
 
function removeBeach(beach) {
  var circle = beach.circle,
      x = circle.x,
      y = circle.cy,
      vertex = [x, y],
      previous = beach.P,
      next = beach.N,
      disappearing = [beach];
 
  detachBeach(beach);
 
  var lArc = previous;
  while (lArc.circle
      && Math.abs(x - lArc.circle.x) < __WEBPACK_IMPORTED_MODULE_4__Diagram__["f" /* epsilon */]
      && Math.abs(y - lArc.circle.cy) < __WEBPACK_IMPORTED_MODULE_4__Diagram__["f" /* epsilon */]) {
    previous = lArc.P;
    disappearing.unshift(lArc);
    detachBeach(lArc);
    lArc = previous;
  }
 
  disappearing.unshift(lArc);
  Object(__WEBPACK_IMPORTED_MODULE_2__Circle__["b" /* detachCircle */])(lArc);
 
  var rArc = next;
  while (rArc.circle
      && Math.abs(x - rArc.circle.x) < __WEBPACK_IMPORTED_MODULE_4__Diagram__["f" /* epsilon */]
      && Math.abs(y - rArc.circle.cy) < __WEBPACK_IMPORTED_MODULE_4__Diagram__["f" /* epsilon */]) {
    next = rArc.N;
    disappearing.push(rArc);
    detachBeach(rArc);
    rArc = next;
  }
 
  disappearing.push(rArc);
  Object(__WEBPACK_IMPORTED_MODULE_2__Circle__["b" /* detachCircle */])(rArc);
 
  var nArcs = disappearing.length,
      iArc;
  for (iArc = 1; iArc < nArcs; ++iArc) {
    rArc = disappearing[iArc];
    lArc = disappearing[iArc - 1];
    Object(__WEBPACK_IMPORTED_MODULE_3__Edge__["d" /* setEdgeEnd */])(rArc.edge, lArc.site, rArc.site, vertex);
  }
 
  lArc = disappearing[0];
  rArc = disappearing[nArcs - 1];
  rArc.edge = Object(__WEBPACK_IMPORTED_MODULE_3__Edge__["c" /* createEdge */])(lArc.site, rArc.site, null, vertex);
 
  Object(__WEBPACK_IMPORTED_MODULE_2__Circle__["a" /* attachCircle */])(lArc);
  Object(__WEBPACK_IMPORTED_MODULE_2__Circle__["a" /* attachCircle */])(rArc);
}
 
function addBeach(site) {
  var x = site[0],
      directrix = site[1],
      lArc,
      rArc,
      dxl,
      dxr,
      node = __WEBPACK_IMPORTED_MODULE_4__Diagram__["a" /* beaches */]._;
 
  while (node) {
    dxl = leftBreakPoint(node, directrix) - x;
    if (dxl > __WEBPACK_IMPORTED_MODULE_4__Diagram__["f" /* epsilon */]) node = node.L; else {
      dxr = x - rightBreakPoint(node, directrix);
      if (dxr > __WEBPACK_IMPORTED_MODULE_4__Diagram__["f" /* epsilon */]) {
        if (!node.R) {
          lArc = node;
          break;
        }
        node = node.R;
      } else {
        if (dxl > -__WEBPACK_IMPORTED_MODULE_4__Diagram__["f" /* epsilon */]) {
          lArc = node.P;
          rArc = node;
        } else if (dxr > -__WEBPACK_IMPORTED_MODULE_4__Diagram__["f" /* epsilon */]) {
          lArc = node;
          rArc = node.N;
        } else {
          lArc = rArc = node;
        }
        break;
      }
    }
  }
 
  Object(__WEBPACK_IMPORTED_MODULE_1__Cell__["c" /* createCell */])(site);
  var newArc = createBeach(site);
  __WEBPACK_IMPORTED_MODULE_4__Diagram__["a" /* beaches */].insert(lArc, newArc);
 
  if (!lArc && !rArc) return;
 
  if (lArc === rArc) {
    Object(__WEBPACK_IMPORTED_MODULE_2__Circle__["b" /* detachCircle */])(lArc);
    rArc = createBeach(lArc.site);
    __WEBPACK_IMPORTED_MODULE_4__Diagram__["a" /* beaches */].insert(newArc, rArc);
    newArc.edge = rArc.edge = Object(__WEBPACK_IMPORTED_MODULE_3__Edge__["c" /* createEdge */])(lArc.site, newArc.site);
    Object(__WEBPACK_IMPORTED_MODULE_2__Circle__["a" /* attachCircle */])(lArc);
    Object(__WEBPACK_IMPORTED_MODULE_2__Circle__["a" /* attachCircle */])(rArc);
    return;
  }
 
  if (!rArc) { // && lArc
    newArc.edge = Object(__WEBPACK_IMPORTED_MODULE_3__Edge__["c" /* createEdge */])(lArc.site, newArc.site);
    return;
  }
 
  // else lArc !== rArc
  Object(__WEBPACK_IMPORTED_MODULE_2__Circle__["b" /* detachCircle */])(lArc);
  Object(__WEBPACK_IMPORTED_MODULE_2__Circle__["b" /* detachCircle */])(rArc);
 
  var lSite = lArc.site,
      ax = lSite[0],
      ay = lSite[1],
      bx = site[0] - ax,
      by = site[1] - ay,
      rSite = rArc.site,
      cx = rSite[0] - ax,
      cy = rSite[1] - ay,
      d = 2 * (bx * cy - by * cx),
      hb = bx * bx + by * by,
      hc = cx * cx + cy * cy,
      vertex = [(cy * hb - by * hc) / d + ax, (bx * hc - cx * hb) / d + ay];
 
  Object(__WEBPACK_IMPORTED_MODULE_3__Edge__["d" /* setEdgeEnd */])(rArc.edge, lSite, rSite, vertex);
  newArc.edge = Object(__WEBPACK_IMPORTED_MODULE_3__Edge__["c" /* createEdge */])(lSite, site, null, vertex);
  rArc.edge = Object(__WEBPACK_IMPORTED_MODULE_3__Edge__["c" /* createEdge */])(site, rSite, null, vertex);
  Object(__WEBPACK_IMPORTED_MODULE_2__Circle__["a" /* attachCircle */])(lArc);
  Object(__WEBPACK_IMPORTED_MODULE_2__Circle__["a" /* attachCircle */])(rArc);
}
 
function leftBreakPoint(arc, directrix) {
  var site = arc.site,
      rfocx = site[0],
      rfocy = site[1],
      pby2 = rfocy - directrix;
 
  if (!pby2) return rfocx;
 
  var lArc = arc.P;
  if (!lArc) return -Infinity;
 
  site = lArc.site;
  var lfocx = site[0],
      lfocy = site[1],
      plby2 = lfocy - directrix;
 
  if (!plby2) return lfocx;
 
  var hl = lfocx - rfocx,
      aby2 = 1 / pby2 - 1 / plby2,
      b = hl / plby2;
 
  if (aby2) return (-b + Math.sqrt(b * b - 2 * aby2 * (hl * hl / (-2 * plby2) - lfocy + plby2 / 2 + rfocy - pby2 / 2))) / aby2 + rfocx;
 
  return (rfocx + lfocx) / 2;
}
 
function rightBreakPoint(arc, directrix) {
  var rArc = arc.N;
  if (rArc) return leftBreakPoint(rArc, directrix);
  var site = arc.site;
  return site[1] === directrix ? site[0] : Infinity;
}
 
 
/***/ }),
/* 1461 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__zoom_js__ = __webpack_require__(1462);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_0__zoom_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__transform_js__ = __webpack_require__(785);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return __WEBPACK_IMPORTED_MODULE_1__transform_js__["b"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return __WEBPACK_IMPORTED_MODULE_1__transform_js__["c"]; });
 
 
 
 
/***/ }),
/* 1462 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_d3_dispatch__ = __webpack_require__(149);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_d3_drag__ = __webpack_require__(336);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_d3_interpolate__ = __webpack_require__(83);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_d3_selection__ = __webpack_require__(45);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_d3_transition__ = __webpack_require__(348);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__constant_js__ = __webpack_require__(1463);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__event_js__ = __webpack_require__(1464);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__transform_js__ = __webpack_require__(785);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__noevent_js__ = __webpack_require__(1465);
 
 
 
 
 
 
 
 
 
 
// Ignore right-click, since that should open the context menu.
function defaultFilter() {
  return !__WEBPACK_IMPORTED_MODULE_3_d3_selection__["e" /* event */].ctrlKey && !__WEBPACK_IMPORTED_MODULE_3_d3_selection__["e" /* event */].button;
}
 
function defaultExtent() {
  var e = this;
  if (e instanceof SVGElement) {
    e = e.ownerSVGElement || e;
    if (e.hasAttribute("viewBox")) {
      e = e.viewBox.baseVal;
      return [[e.x, e.y], [e.x + e.width, e.y + e.height]];
    }
    return [[0, 0], [e.width.baseVal.value, e.height.baseVal.value]];
  }
  return [[0, 0], [e.clientWidth, e.clientHeight]];
}
 
function defaultTransform() {
  return this.__zoom || __WEBPACK_IMPORTED_MODULE_7__transform_js__["c" /* identity */];
}
 
function defaultWheelDelta() {
  return -__WEBPACK_IMPORTED_MODULE_3_d3_selection__["e" /* event */].deltaY * (__WEBPACK_IMPORTED_MODULE_3_d3_selection__["e" /* event */].deltaMode === 1 ? 0.05 : __WEBPACK_IMPORTED_MODULE_3_d3_selection__["e" /* event */].deltaMode ? 1 : 0.002);
}
 
function defaultTouchable() {
  return navigator.maxTouchPoints || ("ontouchstart" in this);
}
 
function defaultConstrain(transform, extent, translateExtent) {
  var dx0 = transform.invertX(extent[0][0]) - translateExtent[0][0],
      dx1 = transform.invertX(extent[1][0]) - translateExtent[1][0],
      dy0 = transform.invertY(extent[0][1]) - translateExtent[0][1],
      dy1 = transform.invertY(extent[1][1]) - translateExtent[1][1];
  return transform.translate(
    dx1 > dx0 ? (dx0 + dx1) / 2 : Math.min(0, dx0) || Math.max(0, dx1),
    dy1 > dy0 ? (dy0 + dy1) / 2 : Math.min(0, dy0) || Math.max(0, dy1)
  );
}
 
/* harmony default export */ __webpack_exports__["a"] = (function() {
  var filter = defaultFilter,
      extent = defaultExtent,
      constrain = defaultConstrain,
      wheelDelta = defaultWheelDelta,
      touchable = defaultTouchable,
      scaleExtent = [0, Infinity],
      translateExtent = [[-Infinity, -Infinity], [Infinity, Infinity]],
      duration = 250,
      interpolate = __WEBPACK_IMPORTED_MODULE_2_d3_interpolate__["y" /* interpolateZoom */],
      listeners = Object(__WEBPACK_IMPORTED_MODULE_0_d3_dispatch__["a" /* dispatch */])("start", "zoom", "end"),
      touchstarting,
      touchending,
      touchDelay = 500,
      wheelDelay = 150,
      clickDistance2 = 0;
 
  function zoom(selection) {
    selection
        .property("__zoom", defaultTransform)
        .on("wheel.zoom", wheeled)
        .on("mousedown.zoom", mousedowned)
        .on("dblclick.zoom", dblclicked)
      .filter(touchable)
        .on("touchstart.zoom", touchstarted)
        .on("touchmove.zoom", touchmoved)
        .on("touchend.zoom touchcancel.zoom", touchended)
        .style("touch-action", "none")
        .style("-webkit-tap-highlight-color", "rgba(0,0,0,0)");
  }
 
  zoom.transform = function(collection, transform, point) {
    var selection = collection.selection ? collection.selection() : collection;
    selection.property("__zoom", defaultTransform);
    if (collection !== selection) {
      schedule(collection, transform, point);
    } else {
      selection.interrupt().each(function() {
        gesture(this, arguments)
            .start()
            .zoom(null, typeof transform === "function" ? transform.apply(this, arguments) : transform)
            .end();
      });
    }
  };
 
  zoom.scaleBy = function(selection, k, p) {
    zoom.scaleTo(selection, function() {
      var k0 = this.__zoom.k,
          k1 = typeof k === "function" ? k.apply(this, arguments) : k;
      return k0 * k1;
    }, p);
  };
 
  zoom.scaleTo = function(selection, k, p) {
    zoom.transform(selection, function() {
      var e = extent.apply(this, arguments),
          t0 = this.__zoom,
          p0 = p == null ? centroid(e) : typeof p === "function" ? p.apply(this, arguments) : p,
          p1 = t0.invert(p0),
          k1 = typeof k === "function" ? k.apply(this, arguments) : k;
      return constrain(translate(scale(t0, k1), p0, p1), e, translateExtent);
    }, p);
  };
 
  zoom.translateBy = function(selection, x, y) {
    zoom.transform(selection, function() {
      return constrain(this.__zoom.translate(
        typeof x === "function" ? x.apply(this, arguments) : x,
        typeof y === "function" ? y.apply(this, arguments) : y
      ), extent.apply(this, arguments), translateExtent);
    });
  };
 
  zoom.translateTo = function(selection, x, y, p) {
    zoom.transform(selection, function() {
      var e = extent.apply(this, arguments),
          t = this.__zoom,
          p0 = p == null ? centroid(e) : typeof p === "function" ? p.apply(this, arguments) : p;
      return constrain(__WEBPACK_IMPORTED_MODULE_7__transform_js__["c" /* identity */].translate(p0[0], p0[1]).scale(t.k).translate(
        typeof x === "function" ? -x.apply(this, arguments) : -x,
        typeof y === "function" ? -y.apply(this, arguments) : -y
      ), e, translateExtent);
    }, p);
  };
 
  function scale(transform, k) {
    k = Math.max(scaleExtent[0], Math.min(scaleExtent[1], k));
    return k === transform.k ? transform : new __WEBPACK_IMPORTED_MODULE_7__transform_js__["a" /* Transform */](k, transform.x, transform.y);
  }
 
  function translate(transform, p0, p1) {
    var x = p0[0] - p1[0] * transform.k, y = p0[1] - p1[1] * transform.k;
    return x === transform.x && y === transform.y ? transform : new __WEBPACK_IMPORTED_MODULE_7__transform_js__["a" /* Transform */](transform.k, x, y);
  }
 
  function centroid(extent) {
    return [(+extent[0][0] + +extent[1][0]) / 2, (+extent[0][1] + +extent[1][1]) / 2];
  }
 
  function schedule(transition, transform, point) {
    transition
        .on("start.zoom", function() { gesture(this, arguments).start(); })
        .on("interrupt.zoom end.zoom", function() { gesture(this, arguments).end(); })
        .tween("zoom", function() {
          var that = this,
              args = arguments,
              g = gesture(that, args),
              e = extent.apply(that, args),
              p = point == null ? centroid(e) : typeof point === "function" ? point.apply(that, args) : point,
              w = Math.max(e[1][0] - e[0][0], e[1][1] - e[0][1]),
              a = that.__zoom,
              b = typeof transform === "function" ? transform.apply(that, args) : transform,
              i = interpolate(a.invert(p).concat(w / a.k), b.invert(p).concat(w / b.k));
          return function(t) {
            if (t === 1) t = b; // Avoid rounding error on end.
            else { var l = i(t), k = w / l[2]; t = new __WEBPACK_IMPORTED_MODULE_7__transform_js__["a" /* Transform */](k, p[0] - l[0] * k, p[1] - l[1] * k); }
            g.zoom(null, t);
          };
        });
  }
 
  function gesture(that, args, clean) {
    return (!clean && that.__zooming) || new Gesture(that, args);
  }
 
  function Gesture(that, args) {
    this.that = that;
    this.args = args;
    this.active = 0;
    this.extent = extent.apply(that, args);
    this.taps = 0;
  }
 
  Gesture.prototype = {
    start: function() {
      if (++this.active === 1) {
        this.that.__zooming = this;
        this.emit("start");
      }
      return this;
    },
    zoom: function(key, transform) {
      if (this.mouse && key !== "mouse") this.mouse[1] = transform.invert(this.mouse[0]);
      if (this.touch0 && key !== "touch") this.touch0[1] = transform.invert(this.touch0[0]);
      if (this.touch1 && key !== "touch") this.touch1[1] = transform.invert(this.touch1[0]);
      this.that.__zoom = transform;
      this.emit("zoom");
      return this;
    },
    end: function() {
      if (--this.active === 0) {
        delete this.that.__zooming;
        this.emit("end");
      }
      return this;
    },
    emit: function(type) {
      Object(__WEBPACK_IMPORTED_MODULE_3_d3_selection__["d" /* customEvent */])(new __WEBPACK_IMPORTED_MODULE_6__event_js__["a" /* default */](zoom, type, this.that.__zoom), listeners.apply, listeners, [type, this.that, this.args]);
    }
  };
 
  function wheeled() {
    if (!filter.apply(this, arguments)) return;
    var g = gesture(this, arguments),
        t = this.__zoom,
        k = Math.max(scaleExtent[0], Math.min(scaleExtent[1], t.k * Math.pow(2, wheelDelta.apply(this, arguments)))),
        p = Object(__WEBPACK_IMPORTED_MODULE_3_d3_selection__["h" /* mouse */])(this);
 
    // If the mouse is in the same location as before, reuse it.
    // If there were recent wheel events, reset the wheel idle timeout.
    if (g.wheel) {
      if (g.mouse[0][0] !== p[0] || g.mouse[0][1] !== p[1]) {
        g.mouse[1] = t.invert(g.mouse[0] = p);
      }
      clearTimeout(g.wheel);
    }
 
    // If this wheel event won’t trigger a transform change, ignore it.
    else if (t.k === k) return;
 
    // Otherwise, capture the mouse point and location at the start.
    else {
      g.mouse = [p, t.invert(p)];
      Object(__WEBPACK_IMPORTED_MODULE_4_d3_transition__["b" /* interrupt */])(this);
      g.start();
    }
 
    Object(__WEBPACK_IMPORTED_MODULE_8__noevent_js__["a" /* default */])();
    g.wheel = setTimeout(wheelidled, wheelDelay);
    g.zoom("mouse", constrain(translate(scale(t, k), g.mouse[0], g.mouse[1]), g.extent, translateExtent));
 
    function wheelidled() {
      g.wheel = null;
      g.end();
    }
  }
 
  function mousedowned() {
    if (touchending || !filter.apply(this, arguments)) return;
    var g = gesture(this, arguments, true),
        v = Object(__WEBPACK_IMPORTED_MODULE_3_d3_selection__["k" /* select */])(__WEBPACK_IMPORTED_MODULE_3_d3_selection__["e" /* event */].view).on("mousemove.zoom", mousemoved, true).on("mouseup.zoom", mouseupped, true),
        p = Object(__WEBPACK_IMPORTED_MODULE_3_d3_selection__["h" /* mouse */])(this),
        x0 = __WEBPACK_IMPORTED_MODULE_3_d3_selection__["e" /* event */].clientX,
        y0 = __WEBPACK_IMPORTED_MODULE_3_d3_selection__["e" /* event */].clientY;
 
    Object(__WEBPACK_IMPORTED_MODULE_1_d3_drag__["b" /* dragDisable */])(__WEBPACK_IMPORTED_MODULE_3_d3_selection__["e" /* event */].view);
    Object(__WEBPACK_IMPORTED_MODULE_8__noevent_js__["b" /* nopropagation */])();
    g.mouse = [p, this.__zoom.invert(p)];
    Object(__WEBPACK_IMPORTED_MODULE_4_d3_transition__["b" /* interrupt */])(this);
    g.start();
 
    function mousemoved() {
      Object(__WEBPACK_IMPORTED_MODULE_8__noevent_js__["a" /* default */])();
      if (!g.moved) {
        var dx = __WEBPACK_IMPORTED_MODULE_3_d3_selection__["e" /* event */].clientX - x0, dy = __WEBPACK_IMPORTED_MODULE_3_d3_selection__["e" /* event */].clientY - y0;
        g.moved = dx * dx + dy * dy > clickDistance2;
      }
      g.zoom("mouse", constrain(translate(g.that.__zoom, g.mouse[0] = Object(__WEBPACK_IMPORTED_MODULE_3_d3_selection__["h" /* mouse */])(g.that), g.mouse[1]), g.extent, translateExtent));
    }
 
    function mouseupped() {
      v.on("mousemove.zoom mouseup.zoom", null);
      Object(__WEBPACK_IMPORTED_MODULE_1_d3_drag__["c" /* dragEnable */])(__WEBPACK_IMPORTED_MODULE_3_d3_selection__["e" /* event */].view, g.moved);
      Object(__WEBPACK_IMPORTED_MODULE_8__noevent_js__["a" /* default */])();
      g.end();
    }
  }
 
  function dblclicked() {
    if (!filter.apply(this, arguments)) return;
    var t0 = this.__zoom,
        p0 = Object(__WEBPACK_IMPORTED_MODULE_3_d3_selection__["h" /* mouse */])(this),
        p1 = t0.invert(p0),
        k1 = t0.k * (__WEBPACK_IMPORTED_MODULE_3_d3_selection__["e" /* event */].shiftKey ? 0.5 : 2),
        t1 = constrain(translate(scale(t0, k1), p0, p1), extent.apply(this, arguments), translateExtent);
 
    Object(__WEBPACK_IMPORTED_MODULE_8__noevent_js__["a" /* default */])();
    if (duration > 0) Object(__WEBPACK_IMPORTED_MODULE_3_d3_selection__["k" /* select */])(this).transition().duration(duration).call(schedule, t1, p0);
    else Object(__WEBPACK_IMPORTED_MODULE_3_d3_selection__["k" /* select */])(this).call(zoom.transform, t1);
  }
 
  function touchstarted() {
    if (!filter.apply(this, arguments)) return;
    var touches = __WEBPACK_IMPORTED_MODULE_3_d3_selection__["e" /* event */].touches,
        n = touches.length,
        g = gesture(this, arguments, __WEBPACK_IMPORTED_MODULE_3_d3_selection__["e" /* event */].changedTouches.length === n),
        started, i, t, p;
 
    Object(__WEBPACK_IMPORTED_MODULE_8__noevent_js__["b" /* nopropagation */])();
    for (i = 0; i < n; ++i) {
      t = touches[i], p = Object(__WEBPACK_IMPORTED_MODULE_3_d3_selection__["q" /* touch */])(this, touches, t.identifier);
      p = [p, this.__zoom.invert(p), t.identifier];
      if (!g.touch0) g.touch0 = p, started = true, g.taps = 1 + !!touchstarting;
      else if (!g.touch1 && g.touch0[2] !== p[2]) g.touch1 = p, g.taps = 0;
    }
 
    if (touchstarting) touchstarting = clearTimeout(touchstarting);
 
    if (started) {
      if (g.taps < 2) touchstarting = setTimeout(function() { touchstarting = null; }, touchDelay);
      Object(__WEBPACK_IMPORTED_MODULE_4_d3_transition__["b" /* interrupt */])(this);
      g.start();
    }
  }
 
  function touchmoved() {
    if (!this.__zooming) return;
    var g = gesture(this, arguments),
        touches = __WEBPACK_IMPORTED_MODULE_3_d3_selection__["e" /* event */].changedTouches,
        n = touches.length, i, t, p, l;
 
    Object(__WEBPACK_IMPORTED_MODULE_8__noevent_js__["a" /* default */])();
    if (touchstarting) touchstarting = clearTimeout(touchstarting);
    g.taps = 0;
    for (i = 0; i < n; ++i) {
      t = touches[i], p = Object(__WEBPACK_IMPORTED_MODULE_3_d3_selection__["q" /* touch */])(this, touches, t.identifier);
      if (g.touch0 && g.touch0[2] === t.identifier) g.touch0[0] = p;
      else if (g.touch1 && g.touch1[2] === t.identifier) g.touch1[0] = p;
    }
    t = g.that.__zoom;
    if (g.touch1) {
      var p0 = g.touch0[0], l0 = g.touch0[1],
          p1 = g.touch1[0], l1 = g.touch1[1],
          dp = (dp = p1[0] - p0[0]) * dp + (dp = p1[1] - p0[1]) * dp,
          dl = (dl = l1[0] - l0[0]) * dl + (dl = l1[1] - l0[1]) * dl;
      t = scale(t, Math.sqrt(dp / dl));
      p = [(p0[0] + p1[0]) / 2, (p0[1] + p1[1]) / 2];
      l = [(l0[0] + l1[0]) / 2, (l0[1] + l1[1]) / 2];
    }
    else if (g.touch0) p = g.touch0[0], l = g.touch0[1];
    else return;
    g.zoom("touch", constrain(translate(t, p, l), g.extent, translateExtent));
  }
 
  function touchended() {
    if (!this.__zooming) return;
    var g = gesture(this, arguments),
        touches = __WEBPACK_IMPORTED_MODULE_3_d3_selection__["e" /* event */].changedTouches,
        n = touches.length, i, t;
 
    Object(__WEBPACK_IMPORTED_MODULE_8__noevent_js__["b" /* nopropagation */])();
    if (touchending) clearTimeout(touchending);
    touchending = setTimeout(function() { touchending = null; }, touchDelay);
    for (i = 0; i < n; ++i) {
      t = touches[i];
      if (g.touch0 && g.touch0[2] === t.identifier) delete g.touch0;
      else if (g.touch1 && g.touch1[2] === t.identifier) delete g.touch1;
    }
    if (g.touch1 && !g.touch0) g.touch0 = g.touch1, delete g.touch1;
    if (g.touch0) g.touch0[1] = this.__zoom.invert(g.touch0[0]);
    else {
      g.end();
      // If this was a dbltap, reroute to the (optional) dblclick.zoom handler.
      if (g.taps === 2) {
        var p = Object(__WEBPACK_IMPORTED_MODULE_3_d3_selection__["k" /* select */])(this).on("dblclick.zoom");
        if (p) p.apply(this, arguments);
      }
    }
  }
 
  zoom.wheelDelta = function(_) {
    return arguments.length ? (wheelDelta = typeof _ === "function" ? _ : Object(__WEBPACK_IMPORTED_MODULE_5__constant_js__["a" /* default */])(+_), zoom) : wheelDelta;
  };
 
  zoom.filter = function(_) {
    return arguments.length ? (filter = typeof _ === "function" ? _ : Object(__WEBPACK_IMPORTED_MODULE_5__constant_js__["a" /* default */])(!!_), zoom) : filter;
  };
 
  zoom.touchable = function(_) {
    return arguments.length ? (touchable = typeof _ === "function" ? _ : Object(__WEBPACK_IMPORTED_MODULE_5__constant_js__["a" /* default */])(!!_), zoom) : touchable;
  };
 
  zoom.extent = function(_) {
    return arguments.length ? (extent = typeof _ === "function" ? _ : Object(__WEBPACK_IMPORTED_MODULE_5__constant_js__["a" /* default */])([[+_[0][0], +_[0][1]], [+_[1][0], +_[1][1]]]), zoom) : extent;
  };
 
  zoom.scaleExtent = function(_) {
    return arguments.length ? (scaleExtent[0] = +_[0], scaleExtent[1] = +_[1], zoom) : [scaleExtent[0], scaleExtent[1]];
  };
 
  zoom.translateExtent = function(_) {
    return arguments.length ? (translateExtent[0][0] = +_[0][0], translateExtent[1][0] = +_[1][0], translateExtent[0][1] = +_[0][1], translateExtent[1][1] = +_[1][1], zoom) : [[translateExtent[0][0], translateExtent[0][1]], [translateExtent[1][0], translateExtent[1][1]]];
  };
 
  zoom.constrain = function(_) {
    return arguments.length ? (constrain = _, zoom) : constrain;
  };
 
  zoom.duration = function(_) {
    return arguments.length ? (duration = +_, zoom) : duration;
  };
 
  zoom.interpolate = function(_) {
    return arguments.length ? (interpolate = _, zoom) : interpolate;
  };
 
  zoom.on = function() {
    var value = listeners.on.apply(listeners, arguments);
    return value === listeners ? zoom : value;
  };
 
  zoom.clickDistance = function(_) {
    return arguments.length ? (clickDistance2 = (_ = +_) * _, zoom) : Math.sqrt(clickDistance2);
  };
 
  return zoom;
});
 
 
/***/ }),
/* 1463 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony default export */ __webpack_exports__["a"] = (function(x) {
  return function() {
    return x;
  };
});
 
 
/***/ }),
/* 1464 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = ZoomEvent;
function ZoomEvent(target, type, transform) {
  this.target = target;
  this.type = type;
  this.transform = transform;
}
 
 
/***/ }),
/* 1465 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["b"] = nopropagation;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_d3_selection__ = __webpack_require__(45);
 
 
function nopropagation() {
  __WEBPACK_IMPORTED_MODULE_0_d3_selection__["e" /* event */].stopImmediatePropagation();
}
 
/* harmony default export */ __webpack_exports__["a"] = (function() {
  __WEBPACK_IMPORTED_MODULE_0_d3_selection__["e" /* event */].preventDefault();
  __WEBPACK_IMPORTED_MODULE_0_d3_selection__["e" /* event */].stopImmediatePropagation();
});
 
 
/***/ }),
/* 1466 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
var ResponsiveFacetColumn_1 = __webpack_require__(234);
var FacetSlider_1 = __webpack_require__(243);
var _ = __webpack_require__(1);
var ResponsiveFacetSlider = /** @class */ (function (_super) {
    __extends(ResponsiveFacetSlider, _super);
    function ResponsiveFacetSlider(coveoRoot, ID, options, responsiveDropdown) {
        var _this = _super.call(this, coveoRoot, ID, options, responsiveDropdown) || this;
        _this.coveoRoot = coveoRoot;
        _this.ID = ID;
        _this.facetSliders = [];
        _this.registerOnOpenHandler();
        return _this;
    }
    ResponsiveFacetSlider.init = function (root, component, options) {
        ResponsiveFacetColumn_1.ResponsiveFacetColumn.init(ResponsiveFacetSlider, root, component, options, FacetSlider_1.FacetSlider.ID);
    };
    ResponsiveFacetSlider.prototype.registerComponent = function (accept) {
        _super.prototype.registerComponent.call(this, accept);
        if (accept instanceof FacetSlider_1.FacetSlider) {
            this.facetSliders.push(accept);
            return true;
        }
        return false;
    };
    ResponsiveFacetSlider.prototype.registerOnOpenHandler = function () {
        this.dropdown.registerOnOpenHandler(this.drawFacetSliderGraphs, this);
    };
    ResponsiveFacetSlider.prototype.drawFacetSliderGraphs = function () {
        _.each(this.facetSliders, function (facetSlider) { return facetSlider.drawDelayedGraphData(); });
    };
    return ResponsiveFacetSlider;
}(ResponsiveFacetColumn_1.ResponsiveFacetColumn));
exports.ResponsiveFacetSlider = ResponsiveFacetSlider;
 
 
/***/ }),
/* 1467 */
/***/ (function(module, exports) {
 
// empty (null-loader)
 
/***/ }),
/* 1468 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
var GlobalExports_1 = __webpack_require__(10);
var Initialization_1 = __webpack_require__(8);
var Folding_1 = __webpack_require__(377);
/**
 * The `FoldingForThread` component inherits from the [`Folding`]{@link Folding} component. It offers the
 * same configuration options.
 *
 * Folding conversations and threads requires different processing. When you need to fold all child items (including
 * their attachments) on the same level under a common ancestor item, use this component rather than the `Folding`
 * component.
 *
 * This component works well with Chatter and Lithium.
 *
 * **Note:**
 * > There can only be one `FoldingForThread` component per [`Tab`]{@link Tab} component.
 *
 * See [Folding Results](https://docs.coveo.com/en/428/).
 */
var FoldingForThread = /** @class */ (function (_super) {
    __extends(FoldingForThread, _super);
    /**
     * Creates a new `FoldingForThread` component
     * @param element The HTMLElement on which to instantiate the component.
     * @param options The options for the `FoldingForThread` component.
     * @param bindings The bindings that the component requires to function normally. If not set, these will be
     * automatically resolved (with a slower execution time).
     */
    function FoldingForThread(element, options, bindings) {
        var _this = _super.call(this, element, options, bindings) || this;
        _this.element = element;
        _this.options = options;
        _this.options.getMoreResults = function (results) {
            return Folding_1.Folding.foldWithParent(results)[0].attachments;
        };
        _this.options.getResult = function (result) {
            var defaultResult = Folding_1.Folding.defaultGetResult(result);
            defaultResult.childResults = defaultResult.attachments;
            defaultResult.attachments = [];
            return defaultResult;
        };
        return _this;
    }
    FoldingForThread.ID = 'FoldingForThread';
    FoldingForThread.doExport = function () {
        GlobalExports_1.exportGlobally({
            FoldingForThread: FoldingForThread
        });
    };
    return FoldingForThread;
}(Folding_1.Folding));
exports.FoldingForThread = FoldingForThread;
Initialization_1.Initialization.registerAutoCreateComponent(FoldingForThread);
 
 
/***/ }),
/* 1469 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Initialization_1 = __webpack_require__(8);
var fields = ['urihash'];
function registerFields() {
    Initialization_1.Initialization.registerComponentFields('FollowItem', fields);
}
exports.registerFields = registerFields;
 
 
/***/ }),
/* 1470 */
/***/ (function(module, exports) {
 
// empty (null-loader)
 
/***/ }),
/* 1471 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
/// <reference path="HierarchicalFacet.ts" />
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
var FacetValuesList_1 = __webpack_require__(692);
var _ = __webpack_require__(1);
var HierarchicalFacetValuesList = /** @class */ (function (_super) {
    __extends(HierarchicalFacetValuesList, _super);
    function HierarchicalFacetValuesList(facet, facetValueElementKlass) {
        var _this = _super.call(this, facet, facetValueElementKlass) || this;
        _this.facet = facet;
        _this.facetValueElementKlass = facetValueElementKlass;
        return _this;
    }
    HierarchicalFacetValuesList.prototype.sortFacetValues = function (hierarchyFacetValues) {
        var _this = this;
        if (hierarchyFacetValues === void 0) { hierarchyFacetValues = this.hierarchyFacetValues; }
        Eif (!this.facet.shouldReshuffleFacetValuesClientSide) {
            var sortArray = _.map(hierarchyFacetValues, function (hierarchy, idx) {
                return {
                    hierarchy: hierarchy,
                    idx: idx
                };
            });
            // If we exclude the top level, the alpha order is not respected (since it is done by the index, and the first level is omitted by client side code).
            // Do the ordering client side, in the precise case where its alpha ordering and the starting level is not 0;
            Iif (this.facet.options.levelStart != 0 &&
                this.facet.options.sortCriteria &&
                this.facet.options.sortCriteria.toLowerCase().indexOf('alpha') != -1) {
                var reversed_1 = this.facet.options.sortCriteria.toLowerCase().indexOf('descending') != -1;
                sortArray = sortArray.sort(function (first, second) {
                    var firstInTopLevel = _.find(_this.facet.topLevelHierarchy, function (hierarchy) {
                        return hierarchy.facetValue.value.toLowerCase() == first.hierarchy.value.toLowerCase();
                    }) != null;
                    var secondInTopLevel = _.find(_this.facet.topLevelHierarchy, function (hierarchy) {
                        return hierarchy.facetValue.value.toLowerCase() == first.hierarchy.value.toLowerCase();
                    }) != null;
                    if (firstInTopLevel && secondInTopLevel) {
                        var firstValue = _this.facet.getValueCaption(first.hierarchy);
                        var secondValue = _this.facet.getValueCaption(second.hierarchy);
                        var compared = firstValue.localeCompare(secondValue);
                        return reversed_1 ? -1 * compared : compared;
                    }
                    return first.idx - second.idx;
                });
            }
            // Normally facet values are sorted by selected first, then inactive, then excluded values.
            // For hierarchical, we want selected first, then those that have childs selected, then normal sorting.
            sortArray = sortArray.sort(function (first, second) {
                if (first.hierarchy.selected === second.hierarchy.selected) {
                    var firstFromHierarchy = _this.facet.getValueFromHierarchy(first.hierarchy);
                    var secondFromHierarchy = _this.facet.getValueFromHierarchy(second.hierarchy);
                    if (firstFromHierarchy.hasChildSelected === secondFromHierarchy.hasChildSelected) {
                        return first.idx - second.idx;
                    }
                    else {
                        return firstFromHierarchy.hasChildSelected ? -1 : 1;
                    }
                }
                else {
                    return first.hierarchy.selected ? -1 : 1;
                }
            });
            return _.pluck(sortArray, 'hierarchy');
        }
        return hierarchyFacetValues;
    };
    HierarchicalFacetValuesList.prototype.getValuesToBuildWith = function () {
        Iif (this.facet.shouldReshuffleFacetValuesClientSide) {
            return this.hierarchyFacetValues;
        }
        else {
            return this.sortFacetValues();
        }
    };
    return HierarchicalFacetValuesList;
}(FacetValuesList_1.FacetValuesList));
exports.HierarchicalFacetValuesList = HierarchicalFacetValuesList;
 
 
/***/ }),
/* 1472 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
/// <reference path="../ui/HierarchicalFacet/HierarchicalFacet.ts" />
/// <reference path="./FacetQueryController.ts" />
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
var FacetQueryController_1 = __webpack_require__(184);
var FacetUtils_1 = __webpack_require__(49);
var _ = __webpack_require__(1);
var HierarchicalFacetQueryController = /** @class */ (function (_super) {
    __extends(HierarchicalFacetQueryController, _super);
    function HierarchicalFacetQueryController(facet) {
        var _this = _super.call(this, facet) || this;
        _this.facet = facet;
        return _this;
    }
    HierarchicalFacetQueryController.prototype.search = function (params, oldLength) {
        var _this = this;
        if (oldLength === void 0) { oldLength = params.nbResults; }
        // Do a client side search, since HierarchicalFacet should normally have all value client side
        var regex = FacetUtils_1.FacetUtils.getRegexToUseForFacetSearch(this.facet.facetSearch.getValueInInputForFacetSearch(), this.facet.options.facetSearchIgnoreAccents);
        return new Promise(function (resolve) {
            var match = _.chain(_this.facet.getAllValueHierarchy())
                .toArray()
                .filter(function (v) {
                return (_this.facet.getValueCaption(v.facetValue).match(regex) != null &&
                    !_.contains(_.map(params.alwaysExclude, function (toExclude) { return toExclude.toLowerCase(); }), v.facetValue.value.toLowerCase()));
            })
                .first(_this.facet.options.numberOfValuesInFacetSearch)
                .value();
            var facetValues = _.map(match, function (v) {
                return v.facetValue;
            });
            resolve(facetValues);
        });
    };
    HierarchicalFacetQueryController.prototype.getAllowedValuesFromSelected = function () {
        return [];
    };
    return HierarchicalFacetQueryController;
}(FacetQueryController_1.FacetQueryController));
exports.HierarchicalFacetQueryController = HierarchicalFacetQueryController;
 
 
/***/ }),
/* 1473 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
/// <reference path="../Facet/Facet.ts" />
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
var FacetSearchValuesList_1 = __webpack_require__(240);
var HierarchicalFacetSearchValueElement_1 = __webpack_require__(1474);
var HierarchicalFacetSearchValuesList = /** @class */ (function (_super) {
    __extends(HierarchicalFacetSearchValuesList, _super);
    function HierarchicalFacetSearchValuesList(facet) {
        var _this = _super.call(this, facet, HierarchicalFacetSearchValueElement_1.HierarchicalFacetSearchValueElement) || this;
        _this.facet = facet;
        return _this;
    }
    return HierarchicalFacetSearchValuesList;
}(FacetSearchValuesList_1.FacetSearchValuesList));
exports.HierarchicalFacetSearchValuesList = HierarchicalFacetSearchValuesList;
 
 
/***/ }),
/* 1474 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
var FacetValueElement_1 = __webpack_require__(186);
var HierarchicalFacetSearchValueElement = /** @class */ (function (_super) {
    __extends(HierarchicalFacetSearchValueElement, _super);
    function HierarchicalFacetSearchValueElement(facet, facetValue, keepDisplayedValueNextTime) {
        var _this = _super.call(this, facet, facetValue, keepDisplayedValueNextTime) || this;
        _this.facet = facet;
        _this.facetValue = facetValue;
        _this.keepDisplayedValueNextTime = keepDisplayedValueNextTime;
        return _this;
    }
    HierarchicalFacetSearchValueElement.prototype._handleSelectValue = function (eventBindings) {
        this.facet.open(this.facetValue);
        _super.prototype.handleSelectValue.call(this, eventBindings);
    };
    HierarchicalFacetSearchValueElement.prototype._handleExcludeClick = function (eventBindings) {
        this.facet.open(this.facetValue);
        _super.prototype.handleExcludeClick.call(this, eventBindings);
    };
    return HierarchicalFacetSearchValueElement;
}(FacetValueElement_1.FacetValueElement));
exports.HierarchicalFacetSearchValueElement = HierarchicalFacetSearchValueElement;
 
 
/***/ }),
/* 1475 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
/// <reference path="HierarchicalFacet.ts" />
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
var FacetSearch_1 = __webpack_require__(147);
var FacetSearchParameters_1 = __webpack_require__(119);
var FacetValue_1 = __webpack_require__(51);
var Utils_1 = __webpack_require__(5);
var ExternalModulesShim_1 = __webpack_require__(39);
var _ = __webpack_require__(1);
var HierarchicalFacetSearch = /** @class */ (function (_super) {
    __extends(HierarchicalFacetSearch, _super);
    function HierarchicalFacetSearch(facet, facetSearchValuesListKlass, root) {
        var _this = _super.call(this, facet, facetSearchValuesListKlass, root) || this;
        _this.facet = facet;
        _this.facetSearchValuesListKlass = facetSearchValuesListKlass;
        return _this;
    }
    HierarchicalFacetSearch.prototype.buildParamsForExcludingCurrentlyDisplayedValues = function () {
        var params = _super.prototype.buildParamsForExcludingCurrentlyDisplayedValues.call(this);
        params.alwaysExclude = this.facet.getDisplayedValues();
        if (this.facet.facetSearch.currentlyDisplayedResults) {
            params.alwaysExclude = params.alwaysExclude.concat(this.facet.facetSearch.currentlyDisplayedResults);
        }
        return params;
    };
    HierarchicalFacetSearch.prototype.selectAllValuesMatchingSearch = function () {
        var _this = this;
        this.facet.showWaitingAnimation();
        var searchParameters = new FacetSearchParameters_1.FacetSearchParameters(this.facet);
        searchParameters.nbResults = this.facet.numberOfValues;
        searchParameters.alwaysInclude = this.facet.getDisplayedValues();
        searchParameters.setValueToSearch(this.getValueInInputForFacetSearch());
        this.facet.facetQueryController.search(searchParameters).then(function (fieldValues) {
            _this.dismissSearchResults();
            ExternalModulesShim_1.ModalBox.close(true);
            var facetValues = _this.getFacetValues(fieldValues);
            _this.facet.processFacetSearchAllResultsSelected(facetValues);
        });
        this.dismissSearchResults();
    };
    HierarchicalFacetSearch.prototype.getFacetValues = function (fieldValues) {
        var _this = this;
        var values = [];
        _.each(fieldValues, function (fieldValue) {
            var hierarchy = _this.facet.getValueFromHierarchy(fieldValue.value);
            values.push(_this.createFacetValuesFromHierarchy(hierarchy));
        });
        return _.flatten(values);
    };
    HierarchicalFacetSearch.prototype.createFacetValuesFromHierarchy = function (hierarchy) {
        var _this = this;
        var values = [];
        var fieldValue = hierarchy.facetValue.value;
        var facetValue = this.facet.values.get(fieldValue);
        if (!Utils_1.Utils.exists(facetValue)) {
            facetValue = FacetValue_1.FacetValue.create(fieldValue);
        }
        facetValue.selected = true;
        facetValue.excluded = false;
        values.push(facetValue);
        var childs = hierarchy.childs;
        _.each(childs, function (child) {
            var childHierarchy = _this.facet.getValueFromHierarchy(child.facetValue.value);
            values.push(_this.createFacetValuesFromHierarchy(childHierarchy));
        });
        return values;
    };
    return HierarchicalFacetSearch;
}(FacetSearch_1.FacetSearch));
exports.HierarchicalFacetSearch = HierarchicalFacetSearch;
 
 
/***/ }),
/* 1476 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
/// <reference path="HierarchicalFacet.ts" />
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
var BreadcrumbValuesList_1 = __webpack_require__(328);
var HierarchicalBreadcrumbValueElement_1 = __webpack_require__(1477);
var Dom_1 = __webpack_require__(0);
var _ = __webpack_require__(1);
var HierarchicalBreadcrumbValuesList = /** @class */ (function (_super) {
    __extends(HierarchicalBreadcrumbValuesList, _super);
    function HierarchicalBreadcrumbValuesList(facet, facetValues, valueHierarchy, options) {
        var _this = _super.call(this, facet, facetValues, HierarchicalBreadcrumbValueElement_1.HierarchicalBreadcrumbValueElement, options) || this;
        _this.facet = facet;
        _this.facetValues = facetValues;
        _this.valueHierarchy = valueHierarchy;
        return _this;
    }
    HierarchicalBreadcrumbValuesList.prototype.buildAsString = function () {
        this.build();
        if (this.elem) {
            var joined = this.facet.options.title + ": " +
                _.map(Dom_1.$$(this.elem).findAll('.coveo-facet-breadcrumb-value'), function (value) {
                    _.each(Dom_1.$$(value).findAll('.coveo-hierarchical-breadcrumb-separator'), function (separator) {
                        // small right black triangle
                        Dom_1.$$(separator).text('\u25B8');
                    });
                    return Dom_1.$$(value).text();
                }).join(', ');
            return joined;
        }
        return '';
    };
    return HierarchicalBreadcrumbValuesList;
}(BreadcrumbValuesList_1.BreadcrumbValueList));
exports.HierarchicalBreadcrumbValuesList = HierarchicalBreadcrumbValuesList;
 
 
/***/ }),
/* 1477 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
var BreadcrumbValueElement_1 = __webpack_require__(327);
var _ = __webpack_require__(1);
var HierarchicalBreadcrumbValueElement = /** @class */ (function (_super) {
    __extends(HierarchicalBreadcrumbValueElement, _super);
    function HierarchicalBreadcrumbValueElement(facet, facetValue) {
        var _this = _super.call(this, facet, facetValue) || this;
        _this.facet = facet;
        _this.facetValue = facetValue;
        return _this;
    }
    HierarchicalBreadcrumbValueElement.prototype.build = function () {
        var build = _super.prototype.build.call(this);
        build.addClass('coveo-hierarchical-facet-value');
        var caption = build.find('.coveo-facet-breadcrumb-caption');
        var values = this.facetValue.value.split(this.facet.options.delimitingCharacter);
        values = _.map(values, function (v) {
            return _.escape(v);
        });
        caption.innerHTML = values.join("<span class='coveo-hierarchical-breadcrumb-separator'></span>");
        return build;
    };
    return HierarchicalBreadcrumbValueElement;
}(BreadcrumbValueElement_1.BreadcrumbValueElement));
exports.HierarchicalBreadcrumbValueElement = HierarchicalBreadcrumbValueElement;
 
 
/***/ }),
/* 1478 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
/// <reference path="../HierarchicalFacet/HierarchicalFacet.ts" />
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
var OmniboxValuesList_1 = __webpack_require__(694);
var OmniboxHierarchicalValueElement_1 = __webpack_require__(1479);
var OmniboxHierarchicalValuesList = /** @class */ (function (_super) {
    __extends(OmniboxHierarchicalValuesList, _super);
    function OmniboxHierarchicalValuesList(facet, facetValues, omniboxObject) {
        var _this = _super.call(this, facet, facetValues, omniboxObject, OmniboxHierarchicalValueElement_1.OmniboxHierarchicalValueElement) || this;
        _this.facet = facet;
        _this.facetValues = facetValues;
        _this.omniboxObject = omniboxObject;
        return _this;
    }
    return OmniboxHierarchicalValuesList;
}(OmniboxValuesList_1.OmniboxValuesList));
exports.OmniboxHierarchicalValuesList = OmniboxHierarchicalValuesList;
 
 
/***/ }),
/* 1479 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
/// <reference path="HierarchicalFacet.ts" />
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
var OmniboxValueElement_1 = __webpack_require__(693);
var OmniboxHierarchicalValueElement = /** @class */ (function (_super) {
    __extends(OmniboxHierarchicalValueElement, _super);
    function OmniboxHierarchicalValueElement(facet, facetValue, eventArg) {
        var _this = _super.call(this, facet, facetValue, eventArg) || this;
        _this.facet = facet;
        _this.facetValue = facetValue;
        _this.eventArg = eventArg;
        return _this;
    }
    OmniboxHierarchicalValueElement.prototype._handleSelectValue = function (eventBindings) {
        this.facet.open(this.facetValue);
        _super.prototype.handleSelectValue.call(this, eventBindings);
    };
    OmniboxHierarchicalValueElement.prototype._handleExcludeClick = function (eventBindings) {
        this.facet.open(this.facetValue);
        _super.prototype.handleExcludeClick.call(this, eventBindings);
    };
    return OmniboxHierarchicalValueElement;
}(OmniboxValueElement_1.OmniboxValueElement));
exports.OmniboxHierarchicalValueElement = OmniboxHierarchicalValueElement;
 
 
/***/ }),
/* 1480 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
/// <reference path="HierarchicalFacet.ts" />
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
var FacetValueElement_1 = __webpack_require__(186);
var HierarchicalFacetValueElement = /** @class */ (function (_super) {
    __extends(HierarchicalFacetValueElement, _super);
    function HierarchicalFacetValueElement(facet, facetValue, keepDisplayedValueNextTime) {
        var _this = _super.call(this, facet, facetValue, keepDisplayedValueNextTime) || this;
        _this.facet = facet;
        _this.facetValue = facetValue;
        _this.keepDisplayedValueNextTime = keepDisplayedValueNextTime;
        return _this;
    }
    return HierarchicalFacetValueElement;
}(FacetValueElement_1.FacetValueElement));
exports.HierarchicalFacetValueElement = HierarchicalFacetValueElement;
 
 
/***/ }),
/* 1481 */
/***/ (function(module, exports) {
 
// empty (null-loader)
 
/***/ }),
/* 1482 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Initialization_1 = __webpack_require__(8);
var fields = ['objecttype', 'filetype'];
function registerFields() {
    Initialization_1.Initialization.registerComponentFields('Icon', fields);
}
exports.registerFields = registerFields;
 
 
/***/ }),
/* 1483 */
/***/ (function(module, exports) {
 
// empty (null-loader)
 
/***/ }),
/* 1484 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Dom_1 = __webpack_require__(0);
var _ = __webpack_require__(1);
/**
 * Represent a single cell of data in the {@link Matrix} component.
 */
var Cell = /** @class */ (function () {
    function Cell(value, el) {
        Iif (value === void 0) { value = 0; }
        this.previewActive = false;
        this.element = el;
        this.value = value;
    }
    /**
     * Return the value of the cell.
     * @returns {any}
     */
    Cell.prototype.getValue = function () {
        return this.value;
    };
    /**
     * Return the `HTMLElement` for the cell.
     * @returns {HTMLElement}
     */
    Cell.prototype.getHTML = function () {
        return this.element;
    };
    /**
     * Set the value if the cell.
     * @param value
     */
    Cell.prototype.setValue = function (value) {
        this.value = value;
    };
    /**
     * Set the `HTMLElement` for the cell.
     * @param html
     */
    Cell.prototype.setHTML = function (html) {
        this.element = html;
    };
    /**
     * Show the preview of the cell.
     * @param minWidth css minWidth property : eg 100px
     * @param maxWidth css maxWidth property : eg 100px
     */
    Cell.prototype.addPreview = function (minWidth, maxWidth) {
        this.previewActive = true;
        var previewContainer = Dom_1.$$('div', {
            className: 'matrix-results-preview-container'
        });
        previewContainer.el.style.minWidth = minWidth;
        previewContainer.el.style.maxWidth = maxWidth;
        previewContainer.on('click', function (e) {
            e.stopPropagation();
        });
        this.element.appendChild(previewContainer.el);
        var container = Dom_1.$$(this.element).findAll('.matrix-results-preview-container');
        _.each(container, function (c) {
            Dom_1.$$(c).hide();
        });
    };
    /**
     * Remove the preview of the cell
     */
    Cell.prototype.removePreview = function () {
        this.previewActive = false;
        var container = Dom_1.$$(this.element).find('.matrix-results-preview-container');
        if (container) {
            Dom_1.$$(container).detach();
        }
    };
    /**
     * Update the preview with a new template
     * @param template
     */
    Cell.prototype.updatePreview = function (template) {
        if (this.previewActive) {
            var preview = Dom_1.$$(this.element).find('.matrix-results-preview-container');
            preview.innerHTML += template;
            Dom_1.$$(preview).show();
        }
    };
    return Cell;
}());
exports.Cell = Cell;
 
 
/***/ }),
/* 1485 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
var Template_1 = __webpack_require__(29);
var Dom_1 = __webpack_require__(0);
var Globalize = __webpack_require__(28);
var DefaultMatrixResultPreviewTemplate = /** @class */ (function (_super) {
    __extends(DefaultMatrixResultPreviewTemplate, _super);
    function DefaultMatrixResultPreviewTemplate(computedField, format) {
        var _this = _super.call(this) || this;
        _this.computedField = computedField;
        _this.format = format;
        return _this;
    }
    DefaultMatrixResultPreviewTemplate.prototype.instantiateToString = function (object, instantiateOptions) {
        var preview = "<div class='coveo-result-frame'>" +
            "<div class='coveo-result-row'>" +
            "<div class='coveo-result-cell' style='width: 40px; padding-right:5px;vertical-align: middle'>" +
            "<a class='CoveoIcon' data-small='true'></a>" +
            '</div>' +
            "<div class='coveo-result-cell' style='font-size:13px;vertical-align: middle'>" +
            "<a class='CoveoResultLink'></a>" +
            '</div>' +
            "<div class='coveo-result-cell' style='width:80px; text-align:right; font-size:13px; padding-right: 5px;vertical-align: middle'>" +
            Globalize.format(parseInt(object.raw[this.computedField.slice(1)]), this.format) +
            '</div>' +
            '</div>' +
            '</div>';
        return preview;
    };
    DefaultMatrixResultPreviewTemplate.prototype.instantiateToElement = function (object, instantiateOptions) {
        var _this = this;
        return new Promise(function (resolve, reject) {
            return Dom_1.$$('div', undefined, _this.instantiateToString(object)).el;
        });
    };
    return DefaultMatrixResultPreviewTemplate;
}(Template_1.Template));
exports.DefaultMatrixResultPreviewTemplate = DefaultMatrixResultPreviewTemplate;
 
 
/***/ }),
/* 1486 */
/***/ (function(module, exports) {
 
// empty (null-loader)
 
/***/ }),
/* 1487 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var GlobalExports_1 = __webpack_require__(10);
var ExpressionConstant_1 = __webpack_require__(263);
var ExpressionEndOfInput_1 = __webpack_require__(379);
var ExpressionFunction_1 = __webpack_require__(797);
var ExpressionList_1 = __webpack_require__(382);
var ExpressionOptions_1 = __webpack_require__(380);
var ExpressionRef_1 = __webpack_require__(378);
var ExpressionRegExp_1 = __webpack_require__(381);
var Grammar_1 = __webpack_require__(154);
var Grammars_1 = __webpack_require__(804);
var InputManager_1 = __webpack_require__(384);
var MagicBox_1 = __webpack_require__(264);
var MagicBoxUtils_1 = __webpack_require__(385);
var OptionResult_1 = __webpack_require__(796);
var RefResult_1 = __webpack_require__(795);
var Result_1 = __webpack_require__(76);
var SuggestionsManager_1 = __webpack_require__(265);
exports.GrammarsImportedLocally = Grammars_1.Grammars;
function doMagicBoxExport() {
    GlobalExports_1.exportGlobally({
        MagicBox: {
            EndOfInputResult: Result_1.EndOfInputResult,
            ExpressionConstant: ExpressionConstant_1.ExpressionConstant,
            ExpressionEndOfInput: ExpressionEndOfInput_1.ExpressionEndOfInput,
            ExpressionFunction: ExpressionFunction_1.ExpressionFunction,
            ExpressionList: ExpressionList_1.ExpressionList,
            ExpressionOptions: ExpressionOptions_1.ExpressionOptions,
            ExpressionRef: ExpressionRef_1.ExpressionRef,
            ExpressionRegExp: ExpressionRegExp_1.ExpressionRegExp,
            Grammar: Grammar_1.Grammar,
            Grammars: Grammars_1.Grammars,
            InputManager: InputManager_1.InputManager,
            Instance: MagicBox_1.MagicBoxInstance,
            OptionResult: OptionResult_1.OptionResult,
            RefResult: RefResult_1.RefResult,
            Result: Result_1.Result,
            SuggestionsManager: SuggestionsManager_1.SuggestionsManager,
            Utils: MagicBoxUtils_1.MagicBoxUtils,
            create: MagicBox_1.createMagicBox,
            requestAnimationFrame: MagicBox_1.requestAnimationFrame
        }
    });
}
exports.doMagicBoxExport = doMagicBoxExport;
 
 
/***/ }),
/* 1488 */
/***/ (function(module, exports) {
 
// empty (null-loader)
 
/***/ }),
/* 1489 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var OmniboxEvents_1 = __webpack_require__(47);
var _ = __webpack_require__(1);
var MagicBoxUtils_1 = __webpack_require__(385);
var FieldAddon = /** @class */ (function () {
    function FieldAddon(omnibox) {
        var _this = this;
        this.omnibox = omnibox;
        this.cache = {};
        this.omnibox.bind.on(this.omnibox.element, OmniboxEvents_1.OmniboxEvents.populateOmniboxSuggestions, function (args) {
            args.suggestions.push(_this.getSuggestion());
        });
    }
    FieldAddon.prototype.getSuggestion = function () {
        var _this = this;
        var hash = this.getHash();
        if (hash == null) {
            return null;
        }
        var hashString = this.hashToString(hash);
        Iif (this.cache[hashString] != null) {
            return this.hashValueToSuggestion(hash, this.cache[hashString]);
        }
        var values;
        if (hash.type == 'FieldName') {
            values = this.fieldNames(hash.current);
        }
        if (hash.type == 'FieldValue') {
            values = this.fieldValues(hash.field, hash.current);
        }
        Iif (hash.type == 'SimpleFieldName') {
            values = this.simpleFieldNames(hash.current);
        }
        this.cache[hashString] = values;
        values.catch(function () {
            delete _this.cache[hashString];
        });
        return this.hashValueToSuggestion(hash, values);
    };
    FieldAddon.prototype.getHash = function () {
        var fieldName = _.last(this.omnibox.resultAtCursor('FieldName'));
        if (fieldName != null) {
            fieldName = fieldName.findParent('Field') || fieldName;
            var currentField = fieldName.toString();
            var before = fieldName.before();
            var after = fieldName.after();
            return { type: 'FieldName', current: currentField, before: before, after: after };
        }
        var fieldValue = _.last(this.omnibox.resultAtCursor('FieldValue'));
        if (fieldValue) {
            var fieldQuery = fieldValue.findParent('FieldQuery') || (this.omnibox.options.enableSimpleFieldAddon && fieldValue.findParent('FieldSimpleQuery'));
            Eif (fieldQuery) {
                var field = fieldQuery.find('FieldName').toString();
                Iif (this.omnibox.options.fieldAlias) {
                    if (field in this.omnibox.options.fieldAlias) {
                        field = this.omnibox.options.fieldAlias[field];
                    }
                }
                var value = fieldValue.toString();
                var before = fieldValue.before();
                var after = fieldValue.after();
                return { type: 'FieldValue', field: field, current: value, before: before, after: after };
            }
        }
        Iif (this.omnibox.options.enableSimpleFieldAddon) {
            var word = _.last(this.omnibox.resultAtCursor('Word'));
            if (word != null) {
                var current = word.toString();
                var before = word.before();
                var after = word.after();
                return { type: 'SimpleFieldName', current: current, before: before, after: after };
            }
        }
    };
    FieldAddon.prototype.hashToString = function (hash) {
        Iif (hash == null) {
            return null;
        }
        return hash.type + hash.current + (hash.field || '');
    };
    FieldAddon.prototype.hashValueToSuggestion = function (hash, promise) {
        return promise.then(function (values) {
            var suggestions = _.map(values, function (value, i) {
                var suggestion = {
                    text: hash.before +
                        (hash.current.toLowerCase().indexOf(value.toLowerCase()) == 0 ? hash.current + value.substr(hash.current.length) : value) +
                        hash.after,
                    html: MagicBoxUtils_1.MagicBoxUtils.highlightText(value, hash.current, true),
                    index: FieldAddon.INDEX - i / values.length
                };
                return suggestion;
            });
            return suggestions;
        });
    };
    FieldAddon.prototype.getFields = function () {
        var _this = this;
        Eif (this.fields == null) {
            this.fields = new Promise(function (resolve, reject) {
                if (_this.omnibox.options.listOfFields != null) {
                    resolve(_this.omnibox.options.listOfFields);
                }
                else {
                    var promise = _this.omnibox.queryController.getEndpoint().listFields();
                    promise
                        .then(function (fieldDescriptions) {
                        var fieldNames = _.chain(fieldDescriptions)
                            .filter(function (fieldDescription) { return fieldDescription.includeInQuery && fieldDescription.groupByField; })
                            .map(function (fieldDescription) { return fieldDescription.name.substr(1); })
                            .value();
                        resolve(fieldNames);
                    })
                        .catch(function () {
                        reject();
                    });
                }
            });
        }
        return this.fields;
    };
    FieldAddon.prototype.fieldNames = function (current) {
        var withAt = current.length > 0 && current[0] == '@';
        var fieldName = withAt ? current.substr(1) : current;
        var fieldNameLC = fieldName.toLowerCase();
        return this.getFields().then(function (fields) {
            var matchFields = _.chain(fields)
                .map(function (fieldName) {
                var fieldNameBeginsWithAt = fieldName.length > 0 && fieldName[0] == '@';
                return {
                    index: fieldName.toLowerCase().indexOf(fieldNameLC),
                    field: fieldNameBeginsWithAt ? fieldName : '@' + fieldName
                };
            })
                .filter(function (field) {
                return field.index != -1 && field.field.length > current.length;
            })
                .sortBy('index')
                .map(function (field) { return field.field; })
                .value();
            matchFields = _.first(matchFields, 5);
            return matchFields;
        });
    };
    FieldAddon.prototype.fieldValues = function (field, current) {
        return this.omnibox.queryController
            .getEndpoint()
            .listFieldValues({
            pattern: '.*' + current + '.*',
            patternType: 'RegularExpression',
            sortCriteria: 'occurrences',
            field: '@' + field,
            maximumNumberOfValues: 5
        })
            .then(function (values) {
            return _.chain(values)
                .map(function (value) {
                return {
                    index: value.value.toLowerCase().indexOf(current),
                    value: value.value
                };
            })
                .filter(function (value) {
                return value.value.length > current.length;
            })
                .sortBy('index')
                .map(function (value) {
                return value.value.replace(/ /g, '\u00A0');
            })
                .value();
        });
    };
    FieldAddon.prototype.simpleFieldNames = function (current) {
        var fieldName = current;
        var fieldNameLC = fieldName.toLowerCase();
        return this.getFields().then(function (fields) {
            var matchFields = _.chain(fields)
                .map(function (field) {
                return {
                    index: field.toLowerCase().indexOf(fieldNameLC),
                    field: field + ':'
                };
            })
                .filter(function (field) {
                return field.index != -1 && field.field.length > current.length;
            })
                .sortBy('index')
                .map(function (field) { return field.field; })
                .value();
            matchFields = _.first(matchFields, 5);
            return matchFields;
        });
    };
    FieldAddon.INDEX = 64;
    return FieldAddon;
}());
exports.FieldAddon = FieldAddon;
 
 
/***/ }),
/* 1490 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var OmniboxEvents_1 = __webpack_require__(47);
var Dom_1 = __webpack_require__(0);
var Utils_1 = __webpack_require__(5);
var _ = __webpack_require__(1);
var OldOmniboxAddon = /** @class */ (function () {
    function OldOmniboxAddon(omnibox) {
        var _this = this;
        this.omnibox = omnibox;
        this.omnibox.bind.on(this.omnibox.element, OmniboxEvents_1.OmniboxEvents.populateOmniboxSuggestions, function (args) {
            _.each(_this.getSuggestion(), function (suggestion) {
                args.suggestions.push(suggestion);
            });
        });
    }
    OldOmniboxAddon.prototype.getSuggestion = function () {
        var text = this.omnibox.magicBox.getText();
        if (text.length == 0) {
            return null;
        }
        var eventArgs = this.buildPopulateOmniboxEventArgs();
        Dom_1.$$(this.omnibox.root).trigger(OmniboxEvents_1.OmniboxEvents.populateOmnibox, eventArgs);
        return this.rowsToSuggestions(eventArgs.rows);
    };
    OldOmniboxAddon.prototype.getCurrentQueryExpression = function () {
        var cursorPos = this.omnibox.getCursor();
        var value = this.omnibox.getText();
        var length = value.length;
        var start = cursorPos;
        var end = cursorPos;
        Iif (value[start] == ' ') {
            start--;
        }
        while (start > 0 && value[start] != ' ') {
            start--;
        }
        while (end < length && value[end] != ' ') {
            end++;
        }
        return value.substring(start, end);
    };
    OldOmniboxAddon.prototype.getRegexToSearch = function (strValue) {
        if (strValue == null) {
            strValue = this.omnibox.getText();
        }
        return new RegExp(Utils_1.Utils.escapeRegexCharacter(strValue), 'i');
    };
    OldOmniboxAddon.prototype.getQueryExpressionBreakDown = function () {
        var _this = this;
        var ret = [];
        var queryWords = this.omnibox.getText().split(' ');
        _.each(queryWords, function (word) {
            ret.push({
                word: word,
                regex: _this.getRegexToSearch(word)
            });
        });
        return ret;
    };
    OldOmniboxAddon.prototype.replace = function (searchValue, newValue) {
        this.omnibox.setText(this.omnibox.getText().replace(searchValue, newValue));
    };
    OldOmniboxAddon.prototype.clearCurrentExpression = function () {
        this.replace(this.getCurrentQueryExpression(), '');
    };
    OldOmniboxAddon.prototype.insertAt = function (at, toInsert) {
        var oldValue = this.omnibox.getText();
        var newValue = [oldValue.slice(0, at), toInsert, oldValue.slice(at)].join('');
        this.omnibox.setText(newValue);
    };
    OldOmniboxAddon.prototype.replaceCurrentExpression = function (newValue) {
        this.replace(this.getCurrentQueryExpression(), newValue);
    };
    OldOmniboxAddon.prototype.buildPopulateOmniboxEventArgs = function () {
        var _this = this;
        var currentQueryExpression = this.getCurrentQueryExpression();
        var ret = {
            rows: [],
            completeQueryExpression: {
                word: this.omnibox.getText(),
                regex: this.getRegexToSearch()
            },
            currentQueryExpression: {
                word: currentQueryExpression,
                regex: this.getRegexToSearch(currentQueryExpression)
            },
            allQueryExpressions: this.getQueryExpressionBreakDown(),
            cursorPosition: this.omnibox.getCursor(),
            clear: function () {
                _this.omnibox.clear();
            },
            clearCurrentExpression: function () {
                _this.clearCurrentExpression();
            },
            replace: function (searchValue, newValue) {
                _this.replace(searchValue, newValue);
            },
            replaceCurrentExpression: function (newValue) {
                _this.replaceCurrentExpression(newValue);
            },
            insertAt: function (at, toInsert) {
                _this.insertAt(at, toInsert);
            },
            closeOmnibox: function () {
                _this.omnibox.magicBox.blur();
            }
        };
        return ret;
    };
    OldOmniboxAddon.prototype.rowsToSuggestions = function (rows) {
        return _.map(rows, function (row) {
            if (!Utils_1.Utils.isNullOrUndefined(row.element)) {
                return new Promise(function (resolve) {
                    resolve([
                        {
                            dom: row.element,
                            index: row.zIndex
                        }
                    ]);
                });
            }
            else if (!Utils_1.Utils.isNullOrUndefined(row.deferred)) {
                return new Promise(function (resolve) {
                    row.deferred.then(function (row) {
                        if (row.element != null) {
                            resolve([
                                {
                                    dom: row.element,
                                    index: row.zIndex
                                }
                            ]);
                        }
                        else {
                            resolve(null);
                        }
                    });
                });
            }
            return null;
        });
    };
    return OldOmniboxAddon;
}());
exports.OldOmniboxAddon = OldOmniboxAddon;
 
 
/***/ }),
/* 1491 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
///<reference path='Omnibox.ts'/>
var OmniboxEvents_1 = __webpack_require__(47);
var _ = __webpack_require__(1);
var MagicBoxUtils_1 = __webpack_require__(385);
var QueryExtensionAddon = /** @class */ (function () {
    function QueryExtensionAddon(omnibox) {
        var _this = this;
        this.omnibox = omnibox;
        this.cache = {};
        this.omnibox.bind.on(this.omnibox.element, OmniboxEvents_1.OmniboxEvents.populateOmniboxSuggestions, function (args) {
            args.suggestions.push(_this.getSuggestion());
        });
    }
    QueryExtensionAddon.prototype.getSuggestion = function () {
        var _this = this;
        var hash = this.getHash(this.omnibox.magicBox);
        Iif (hash == null) {
            return null;
        }
        var hashString = this.hashToString(hash);
        Iif (this.cache[hashString] != null) {
            return this.hashValueToSuggestion(hash, this.cache[hashString]);
        }
        var values = hash.type == 'QueryExtensionName' ? this.names(hash.current) : this.attributeNames(hash.name, hash.current, hash.used);
        this.cache[hashString] = values;
        values.catch(function () {
            delete _this.cache[hashString];
        });
        return this.hashValueToSuggestion(hash, values);
    };
    QueryExtensionAddon.prototype.getHash = function (magicBox) {
        var queryExtension = _.last(magicBox.resultAtCursor('QueryExtension'));
        Eif (queryExtension != null) {
            var queryExtensionArgumentResults = queryExtension.findAll('QueryExtensionArgument');
            var current = _.last(magicBox.resultAtCursor('QueryExtensionName'));
            Eif (current != null) {
                return {
                    type: 'QueryExtensionName',
                    current: current.toString(),
                    before: current.before(),
                    after: current.after()
                };
            }
            current = _.last(magicBox.resultAtCursor('QueryExtensionArgumentName'));
            if (current != null) {
                var used = _.chain(queryExtensionArgumentResults)
                    .map(function (result) {
                    var name = result.find('QueryExtensionArgumentName');
                    return name && name.toString();
                })
                    .compact()
                    .value();
                var name = queryExtension.find('QueryExtensionName').toString();
                return {
                    type: 'QueryExtensionArgumentName',
                    current: current.toString(),
                    before: current.before(),
                    after: current.after(),
                    name: name,
                    used: used
                };
            }
        }
        return null;
    };
    QueryExtensionAddon.prototype.hashToString = function (hash) {
        Iif (hash == null) {
            return null;
        }
        return [hash.type, hash.current, hash.name || '', hash.used ? hash.used.join() : ''].join();
    };
    QueryExtensionAddon.prototype.hashValueToSuggestion = function (hash, promise) {
        return promise.then(function (values) {
            var suggestions = _.map(values, function (value, i) {
                return {
                    html: MagicBoxUtils_1.MagicBoxUtils.highlightText(value, hash.current, true),
                    text: hash.before + value + hash.after,
                    index: QueryExtensionAddon.INDEX - i / values.length
                };
            });
            return suggestions;
        });
    };
    QueryExtensionAddon.prototype.getExtensions = function () {
        Eif (this.extensions == null) {
            this.extensions = this.omnibox.queryController.getEndpoint().extensions();
        }
        return this.extensions;
    };
    QueryExtensionAddon.prototype.names = function (current) {
        var extensionName = current.toLowerCase();
        return this.getExtensions().then(function (extensions) {
            var matchExtensions = _.chain(extensions)
                .map(function (extension) {
                return {
                    index: extension.name.toLowerCase().indexOf(extensionName),
                    extension: extension.name
                };
            })
                .filter(function (extension) {
                return extension.index != -1 && extension.extension.length > extensionName.length;
            })
                .sortBy('index')
                .pluck('extension')
                .value();
            matchExtensions = _.first(matchExtensions, 5);
            return matchExtensions;
        });
    };
    QueryExtensionAddon.prototype.attributeNames = function (name, current, used) {
        return this.getExtensions().then(function (extensions) {
            var extension = _.find(extensions, function (extension) { return extension.name == name; });
            if (extension == null) {
                return [];
            }
            else {
                return _.filter(_.difference(extension.argumentNames, used), function (argumentName) { return argumentName.indexOf(current) == 0; });
            }
        });
    };
    QueryExtensionAddon.prototype.hash = function () {
        return;
    };
    QueryExtensionAddon.INDEX = 62;
    return QueryExtensionAddon;
}());
exports.QueryExtensionAddon = QueryExtensionAddon;
 
 
/***/ }),
/* 1492 */
/***/ (function(module, exports) {
 
// empty (null-loader)
 
/***/ }),
/* 1493 */
/***/ (function(module, exports) {
 
// empty (null-loader)
 
/***/ }),
/* 1494 */
/***/ (function(module, exports) {
 
// empty (null-loader)
 
/***/ }),
/* 1495 */
/***/ (function(module, exports) {
 
// empty (null-loader)
 
/***/ }),
/* 1496 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Initialization_1 = __webpack_require__(8);
var fields = ['parents'];
function registerFields() {
    Initialization_1.Initialization.registerComponentFields('PrintableUri', fields);
}
exports.registerFields = registerFields;
 
 
/***/ }),
/* 1497 */
/***/ (function(module, exports) {
 
// empty (null-loader)
 
/***/ }),
/* 1498 */
/***/ (function(module, exports) {
 
// empty (null-loader)
 
/***/ }),
/* 1499 */
/***/ (function(module, exports) {
 
// empty (null-loader)
 
/***/ }),
/* 1500 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
var Template_1 = __webpack_require__(29);
var DefaultQuickviewTemplate = /** @class */ (function (_super) {
    __extends(DefaultQuickviewTemplate, _super);
    function DefaultQuickviewTemplate() {
        return _super.call(this) || this;
    }
    DefaultQuickviewTemplate.prototype.instantiateToString = function (queryResult) {
        return '<div class="coveo-quick-view-full-height"><div class="CoveoQuickviewDocument"></div></div>';
    };
    return DefaultQuickviewTemplate;
}(Template_1.Template));
exports.DefaultQuickviewTemplate = DefaultQuickviewTemplate;
 
 
/***/ }),
/* 1501 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Initialization_1 = __webpack_require__(8);
var fields = [
    'urihash',
    'collection',
    'source',
    'author',
    'date' // used in header of the quickview
];
function registerFields() {
    Initialization_1.Initialization.registerComponentFields('Quickview', fields);
}
exports.registerFields = registerFields;
 
 
/***/ }),
/* 1502 */
/***/ (function(module, exports) {
 
// empty (null-loader)
 
/***/ }),
/* 1503 */
/***/ (function(module, exports) {
 
// empty (null-loader)
 
/***/ }),
/* 1504 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
var Template_1 = __webpack_require__(29);
var DefaultResultAttachmentTemplate = /** @class */ (function (_super) {
    __extends(DefaultResultAttachmentTemplate, _super);
    function DefaultResultAttachmentTemplate() {
        return _super.call(this) || this;
    }
    DefaultResultAttachmentTemplate.prototype.instantiateToString = function (queryResult) {
        return '<div><span class="CoveoIcon"></span> <a class="CoveoResultLink"></a> <span class="CoveoQuickview"></span></div>';
    };
    return DefaultResultAttachmentTemplate;
}(Template_1.Template));
exports.DefaultResultAttachmentTemplate = DefaultResultAttachmentTemplate;
 
 
/***/ }),
/* 1505 */
/***/ (function(module, exports) {
 
// empty (null-loader)
 
/***/ }),
/* 1506 */
/***/ (function(module, exports) {
 
// empty (null-loader)
 
/***/ }),
/* 1507 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
var Template_1 = __webpack_require__(29);
var DefaultFoldingTemplate = /** @class */ (function (_super) {
    __extends(DefaultFoldingTemplate, _super);
    function DefaultFoldingTemplate() {
        return _super.call(this) || this;
    }
    DefaultFoldingTemplate.prototype.instantiateToString = function (queryResult) {
        return '<div class="coveo-child-result"><span class="CoveoIcon" data-small="true"></span> <a class="CoveoResultLink"></a> <span class="CoveoQuickview"></span></div>';
    };
    DefaultFoldingTemplate.prototype.getType = function () {
        return 'DefaultFoldingTemplate';
    };
    return DefaultFoldingTemplate;
}(Template_1.Template));
exports.DefaultFoldingTemplate = DefaultFoldingTemplate;
 
 
/***/ }),
/* 1508 */
/***/ (function(module, exports) {
 
// empty (null-loader)
 
/***/ }),
/* 1509 */
/***/ (function(module, exports) {
 
// empty (null-loader)
 
/***/ }),
/* 1510 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var underscore_1 = __webpack_require__(1);
var Logger_1 = __webpack_require__(18);
var Dom_1 = __webpack_require__(0);
var Component_1 = __webpack_require__(6);
var ResultLayoutSelector_1 = __webpack_require__(200);
var SearchInterface_1 = __webpack_require__(25);
var ResponsiveComponentsManager_1 = __webpack_require__(70);
var ResponsiveResultLayout = /** @class */ (function () {
    function ResponsiveResultLayout(coveoRoot, ID, options, responsiveDropdown) {
        var _this = this;
        this.coveoRoot = coveoRoot;
        this.ID = ID;
        this.searchInterface = Component_1.Component.get(this.coveoRoot.el, SearchInterface_1.SearchInterface, false);
        coveoRoot.on('state:change:t', function () {
            _this.handleResizeEvent();
        });
    }
    ResponsiveResultLayout.init = function (root, component, options) {
        if (!Dom_1.$$(root).find("." + Component_1.Component.computeCssClassName(ResultLayoutSelector_1.ResultLayoutSelector))) {
            var logger = new Logger_1.Logger('ResponsiveResultLayout');
            logger.trace('No ResultLayout component found : Cannot instantiate ResponsiveResultLayout');
            return;
        }
        ResponsiveComponentsManager_1.ResponsiveComponentsManager.register(ResponsiveResultLayout, Dom_1.$$(root), ResultLayoutSelector_1.ResultLayoutSelector.ID, component, options);
    };
    ResponsiveResultLayout.prototype.registerComponent = function (accept) {
        if (accept instanceof ResultLayoutSelector_1.ResultLayoutSelector) {
            this.resultLayout = accept;
            return true;
        }
        return false;
    };
    ResponsiveResultLayout.prototype.handleResizeEvent = function () {
        if (this.needSmallMode()) {
            this.enableAndDisableLayouts(this.resultLayout.options.mobileLayouts);
        }
        else if (this.needMediumMode()) {
            this.enableAndDisableLayouts(this.resultLayout.options.tabletLayouts);
        }
        else {
            this.enableAndDisableLayouts(this.resultLayout.options.desktopLayouts);
        }
    };
    ResponsiveResultLayout.prototype.enableAndDisableLayouts = function (validLayouts) {
        var layoutsToDisable = underscore_1.difference(ResultLayoutSelector_1.ResultLayoutSelector.validLayouts, validLayouts);
        var layoutsToEnable = underscore_1.intersection(ResultLayoutSelector_1.ResultLayoutSelector.validLayouts, validLayouts);
        this.resultLayout.disableLayouts(layoutsToDisable);
        this.resultLayout.enableLayouts(layoutsToEnable);
    };
    ResponsiveResultLayout.prototype.needSmallMode = function () {
        switch (this.searchInterface.responsiveComponents.getResponsiveMode()) {
            case 'small':
                return true;
            case 'auto':
                return this.coveoRoot.width() <= this.searchInterface.responsiveComponents.getSmallScreenWidth();
            default:
                return false;
        }
    };
    ResponsiveResultLayout.prototype.needMediumMode = function () {
        switch (this.searchInterface.responsiveComponents.getResponsiveMode()) {
            case 'medium':
                return true;
            case 'auto':
                return this.coveoRoot.width() <= this.searchInterface.responsiveComponents.getMediumScreenWidth();
            default:
                return false;
        }
    };
    return ResponsiveResultLayout;
}());
exports.ResponsiveResultLayout = ResponsiveResultLayout;
 
 
/***/ }),
/* 1511 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Initialization_1 = __webpack_require__(8);
exports.fields = [
    'outlookformacuri',
    'outlookuri',
    'connectortype',
    'urihash',
    'collection',
    'source',
    'author' // analytics
];
function registerFields() {
    Initialization_1.Initialization.registerComponentFields('ResultLink', exports.fields);
}
exports.registerFields = registerFields;
 
 
/***/ }),
/* 1512 */
/***/ (function(module, exports) {
 
// empty (null-loader)
 
/***/ }),
/* 1513 */
/***/ (function(module, exports) {
 
// empty (null-loader)
 
/***/ }),
/* 1514 */
/***/ (function(module, exports) {
 
// empty (null-loader)
 
/***/ }),
/* 1515 */
/***/ (function(module, exports) {
 
// empty (null-loader)
 
/***/ }),
/* 1516 */
/***/ (function(module, exports) {
 
// empty (null-loader)
 
/***/ }),
/* 1517 */
/***/ (function(module, exports) {
 
// empty (null-loader)
 
/***/ }),
/* 1518 */
/***/ (function(module, exports) {
 
// empty (null-loader)
 
/***/ }),
/* 1519 */
/***/ (function(module, exports) {
 
// empty (null-loader)
 
/***/ }),
/* 1520 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Dom_1 = __webpack_require__(0);
var SearchBoxResize = /** @class */ (function () {
    function SearchBoxResize() {
    }
    SearchBoxResize.resize = function (element, size) {
        var _this = this;
        var searchbox = this.getSearchbox(element);
        var elementToResize = this.getElementsToResize(element);
        var magicboxInput = this.getInput(element);
        var searchboxStyle = "height: " + size + "px; line-height: " + size + "px;";
        var inputChangeStyle = "height: " + size + "px";
        //This need to be a little bit smaller because when the height become smaller than 38px or to big, the bottom border of the Searchbox dissapear
        var magicboxInputStyle = "height: " + (size - 2) + "px;";
        this.applyStyle(searchbox, searchboxStyle);
        this.applyStyle(magicboxInput, magicboxInputStyle);
        elementToResize.forEach(function (HtmlElement) {
            _this.applyStyle(HtmlElement, inputChangeStyle);
        });
    };
    SearchBoxResize.applyStyle = function (element, style) {
        element.style.cssText += style;
    };
    SearchBoxResize.getSearchbox = function (element) {
        return Dom_1.$$(element).find('.CoveoOmnibox') || Dom_1.$$(element).find('.CoveoQuerybox');
    };
    SearchBoxResize.getElementsToResize = function (element) {
        return [
            Dom_1.$$(element).find('.CoveoSearchButton'),
            Dom_1.$$(Dom_1.$$(element).find('.magic-box-input')).find('input'),
            Dom_1.$$(element).find('.magic-box-icon'),
            Dom_1.$$(element).find('.magic-box-clear'),
            Dom_1.$$(element).find('.magic-box-underlay')
        ];
    };
    SearchBoxResize.getInput = function (element) {
        return Dom_1.$$(element).find('.magic-box-input');
    };
    return SearchBoxResize;
}());
exports.SearchBoxResize = SearchBoxResize;
 
 
/***/ }),
/* 1521 */
/***/ (function(module, exports) {
 
// empty (null-loader)
 
/***/ }),
/* 1522 */
/***/ (function(module, exports) {
 
// empty (null-loader)
 
/***/ }),
/* 1523 */
/***/ (function(module, exports) {
 
// empty (null-loader)
 
/***/ }),
/* 1524 */
/***/ (function(module, exports) {
 
// empty (null-loader)
 
/***/ }),
/* 1525 */
/***/ (function(module, exports) {
 
// empty (null-loader)
 
/***/ }),
/* 1526 */
/***/ (function(module, exports) {
 
// empty (null-loader)
 
/***/ }),
/* 1527 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
__webpack_require__(1528);
var GlobalExports_1 = __webpack_require__(10);
var Dom_1 = __webpack_require__(0);
var Component_1 = __webpack_require__(6);
var ComponentOptions_1 = __webpack_require__(13);
var Initialization_1 = __webpack_require__(8);
/**
 * The Text component embeds itself in a result template to output a simple text value.
 *
 * The only purpose of this component is to make it possible to easily add different text values to result templates
 * when using the Coveo JavaScript Search Interface Editor (see
 * [Interface Editor](https://docs.coveo.com/en/1852/)).
 *
 * If you are not designing a search interface using the Coveo JavaScript Search Interface Editor, using this component
 * is unnecessary.
 *
 * This component is a result template component (see [Result Templates](https://docs.coveo.com/en/413/)).
 */
var Text = /** @class */ (function (_super) {
    __extends(Text, _super);
    /**
     * Creates a new Text component.
     * @param element The HTMLElement on which to instantiate the component.
     * @param options The options for the Text component.
     * @param bindings The bindings that the component requires to function normally. If not set, these will be
     * automatically resolved (with a slower execution time).
     */
    function Text(element, options, bindings) {
        var _this = _super.call(this, element, Text.ID, bindings) || this;
        _this.element = element;
        _this.options = options;
        _this.options = ComponentOptions_1.ComponentOptions.initComponentOptions(element, Text, options);
        Dom_1.$$(_this.element).text(_this.options.value);
        _this.element.style.fontSize = _this.options.size;
        _this.element.style.fontStyle = _this.options.style;
        _this.element.style.color = _this.options.color;
        _this.element.style.fontWeight = _this.options.weight;
        _this.element.style.textAlign = _this.options.textAlign;
        _this.element.style.marginTop = _this.options.marginTop;
        _this.element.style.marginBottom = _this.options.marginBottom;
        _this.element.style.marginRight = _this.options.marginRight;
        _this.element.style.marginLeft = _this.options.marginLeft;
        _this.element.style.paddingTop = _this.options.paddingTop;
        _this.element.style.paddingBottom = _this.options.paddingBottom;
        _this.element.style.paddingLeft = _this.options.paddingLeft;
        _this.element.style.paddingRight = _this.options.paddingRight;
        return _this;
    }
    Text.ID = 'Text';
    Text.doExport = function () {
        GlobalExports_1.exportGlobally({
            Text: Text
        });
    };
    /**
     * @componentOptions
     */
    Text.options = {
        /**
         * Specifies the localized string value that the component should render.
         */
        value: ComponentOptions_1.ComponentOptions.buildLocalizedStringOption(),
        /**
         * Specifies the size of the text (set as the `font-size` CSS property).
         */
        size: ComponentOptions_1.ComponentOptions.buildStringOption(),
        /**
         * Specifies the style of the text (set as the `font-style` CSS property).
         */
        style: ComponentOptions_1.ComponentOptions.buildStringOption(),
        /**
         * Specifies the color of the text (set as the `color` CSS property).
         */
        color: ComponentOptions_1.ComponentOptions.buildStringOption(),
        /**
         * Specifies the weight of the text (set as the `font-weight` CSS property).
         */
        weight: ComponentOptions_1.ComponentOptions.buildStringOption(),
        /**
         * Specifies the alignment of the text (set as the `text-align` CSS property).
         */
        textAlign: ComponentOptions_1.ComponentOptions.buildStringOption(),
        /**
         * Specifies the top margin of the text (set as the `margin-top` CSS property).
         */
        marginTop: ComponentOptions_1.ComponentOptions.buildStringOption(),
        /**
         * Specifies the bottom margin of the text (set as the `margin-bottom` CSS property).
         */
        marginBottom: ComponentOptions_1.ComponentOptions.buildStringOption(),
        /**
         * Specifies the left margin of the text (set as the `margin-left` CSS property).
         */
        marginLeft: ComponentOptions_1.ComponentOptions.buildStringOption(),
        /**
         * Specifies the right margin of the text (set as the `margin-right` CSS property).
         */
        marginRight: ComponentOptions_1.ComponentOptions.buildStringOption(),
        /**
         * Specifies the top padding of the text (set as the `padding-top` CSS property).
         */
        paddingTop: ComponentOptions_1.ComponentOptions.buildStringOption(),
        /**
         * Specifies the bottom padding of the text (set as the `padding-bottom` CSS property).
         */
        paddingBottom: ComponentOptions_1.ComponentOptions.buildStringOption(),
        /**
         * Specifies the left padding of the text (set as the `padding-left` CSS property).
         */
        paddingLeft: ComponentOptions_1.ComponentOptions.buildStringOption(),
        /**
         * Specifies the right padding of the text (set as the `padding-right` CSS property).
         */
        paddingRight: ComponentOptions_1.ComponentOptions.buildStringOption()
    };
    return Text;
}(Component_1.Component));
exports.Text = Text;
Initialization_1.Initialization.registerAutoCreateComponent(Text);
 
 
/***/ }),
/* 1528 */
/***/ (function(module, exports) {
 
// empty (null-loader)
 
/***/ }),
/* 1529 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Initialization_1 = __webpack_require__(8);
var fields = [
    'outlookformacuri',
    'outlookuri',
    'connectortype',
    'urihash',
    'collection',
    'source' //        ⎭
];
function registerFields() {
    Initialization_1.Initialization.registerComponentFields('Thumbnail', fields);
}
exports.registerFields = registerFields;
 
 
/***/ }),
/* 1530 */
/***/ (function(module, exports) {
 
// empty (null-loader)
 
/***/ }),
/* 1531 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Initialization_1 = __webpack_require__(8);
exports.fields = ['ytthumbnailurl'];
function registerFields() {
    Initialization_1.Initialization.registerComponentFields('YouTubeThumbnail', exports.fields);
}
exports.registerFields = registerFields;
 
 
/***/ }),
/* 1532 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
__webpack_require__(836);
var _ = __webpack_require__(1);
var SimpleFilterValues = /** @class */ (function () {
    function SimpleFilterValues(simpleFilter, options) {
        this.simpleFilter = simpleFilter;
        this.options = options;
        this.groupByRequestValues = [];
    }
    SimpleFilterValues.prototype.getValuesFromGroupBy = function () {
        return this.groupByRequestValues;
    };
    SimpleFilterValues.prototype.groupBy = function (data) {
        var _this = this;
        this.groupByRequestValues = [];
        var groupByResult = data.results.groupByResults;
        if (groupByResult.length > 0 && this.position != undefined) {
            _.each(groupByResult[this.position].values, function (value) {
                Eif (_this.groupByRequestValues.indexOf(value.lookupValue) < 0) {
                    _this.groupByRequestValues.push(value.lookupValue);
                }
            });
        }
    };
    SimpleFilterValues.prototype.handleDoneBuildingQuery = function (data) {
        var queryBuilder = data.queryBuilder;
        this.putGroupByIntoQueryBuilder(queryBuilder);
    };
    SimpleFilterValues.prototype.putGroupByIntoQueryBuilder = function (queryBuilder) {
        var groupByRequest = this.createBasicGroupByRequest();
        queryBuilder.groupByRequests.push(groupByRequest);
        this.position = queryBuilder.groupByRequests.length - 1;
    };
    SimpleFilterValues.prototype.createBasicGroupByRequest = function () {
        var groupByRequest = {
            field: this.options.field,
            maximumNumberOfValues: this.options.maximumNumberOfValues,
            injectionDepth: 1000,
            sortCriteria: this.simpleFilter.options.sortCriteria
        };
        return groupByRequest;
    };
    return SimpleFilterValues;
}());
exports.SimpleFilterValues = SimpleFilterValues;
 
 
/***/ }),
/* 1533 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
var ResponsiveFacetColumn_1 = __webpack_require__(234);
var DynamicFacet_1 = __webpack_require__(272);
var ResponsiveDynamicFacets = /** @class */ (function (_super) {
    __extends(ResponsiveDynamicFacets, _super);
    function ResponsiveDynamicFacets() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    ResponsiveDynamicFacets.init = function (root, component, options) {
        ResponsiveFacetColumn_1.ResponsiveFacetColumn.init(ResponsiveDynamicFacets, root, component, options, DynamicFacet_1.DynamicFacet.ID);
    };
    return ResponsiveDynamicFacets;
}(ResponsiveFacetColumn_1.ResponsiveFacetColumn));
exports.ResponsiveDynamicFacets = ResponsiveDynamicFacets;
 
 
/***/ }),
/* 1534 */
/***/ (function(module, exports) {
 
// empty (null-loader)
 
/***/ }),
/* 1535 */
/***/ (function(module, exports) {
 
// empty (null-loader)
 
/***/ }),
/* 1536 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Combobox_1 = __webpack_require__(204);
var Strings_1 = __webpack_require__(4);
var FacetSearchController_1 = __webpack_require__(843);
var DynamicFacetValue_1 = __webpack_require__(126);
var FacetValueState_1 = __webpack_require__(36);
var DynamicFacetSearchValueRenderer_1 = __webpack_require__(844);
__webpack_require__(845);
var FacetUtils_1 = __webpack_require__(49);
var DynamicFacetSearch = /** @class */ (function () {
    function DynamicFacetSearch(facet) {
        var _this = this;
        this.facet = facet;
        this.facetSearchController = new FacetSearchController_1.FacetSearchController(this.facet);
        this.combobox = new Combobox_1.Combobox({
            label: Strings_1.l('SearchFacetResults', this.facet.options.title),
            ariaLive: this.facet.searchInterface.ariaLive,
            requestValues: function (terms) { return _this.facetSearchController.search(terms); },
            createValuesFromResponse: function (response) { return _this.createValuesFromResponse(response); },
            onSelectValue: this.onSelectValue,
            placeholderText: Strings_1.l('Search'),
            wrapperClassName: 'coveo-dynamic-facet-search',
            clearOnBlur: true,
            scrollable: {
                requestMoreValues: function () { return _this.facetSearchController.fetchMoreResults(); },
                areMoreValuesAvailable: function () { return _this.facetSearchController.moreValuesAvailable; },
                maxDropdownHeight: 250
            },
            highlightValueClassName: 'coveo-checkbox-span-label'
        });
        this.element = this.combobox.element;
    }
    DynamicFacetSearch.prototype.getDisplayValue = function (value) {
        return FacetUtils_1.FacetUtils.getDisplayValueFromValueCaption(value, this.facet.options.field, this.facet.options.valueCaption);
    };
    DynamicFacetSearch.prototype.createValuesFromResponse = function (response) {
        var _this = this;
        return response.values.map(function (value, index) {
            var facetValue = new DynamicFacetValue_1.DynamicFacetValue({
                value: value.rawValue,
                // TODO: remove when https://coveord.atlassian.net/browse/SEARCHAPI-4958 is fixed
                displayValue: _this.getDisplayValue(value.displayValue),
                numberOfResults: value.count,
                state: FacetValueState_1.FacetValueState.idle,
                position: index + 1
            }, _this.facet, DynamicFacetSearchValueRenderer_1.DynamicFacetSearchValueRenderer);
            return {
                value: facetValue,
                element: facetValue.renderedElement
            };
        });
    };
    DynamicFacetSearch.prototype.onSelectValue = function (_a) {
        var value = _a.value;
        value.renderer.selectAction();
    };
    return DynamicFacetSearch;
}());
exports.DynamicFacetSearch = DynamicFacetSearch;
 
 
/***/ }),
/* 1537 */
/***/ (function(module, exports) {
 
// empty (null-loader)
 
/***/ }),
/* 1538 */
/***/ (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';
}
 
/***/ }),
/* 1539 */
/***/ (function(module, exports) {
 
Eif (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
  }
}
 
 
/***/ }),
/* 1540 */
/***/ (function(module, exports) {
 
// empty (null-loader)
 
/***/ }),
/* 1541 */
/***/ (function(module, exports) {
 
// empty (null-loader)
 
/***/ }),
/* 1542 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var HierarchicalFacetSearchController_1 = __webpack_require__(854);
var Combobox_1 = __webpack_require__(204);
var Strings_1 = __webpack_require__(4);
var DynamicHierarchicalFacetSearchValue_1 = __webpack_require__(856);
__webpack_require__(845);
__webpack_require__(1543);
var DynamicHierarchicalFacetSearch = /** @class */ (function () {
    function DynamicHierarchicalFacetSearch(facet) {
        this.facet = facet;
        this.hierarchicalFacetSearchController = new HierarchicalFacetSearchController_1.HierarchicalFacetSearchController(facet);
        this.element = this.build();
    }
    DynamicHierarchicalFacetSearch.prototype.build = function () {
        var _this = this;
        this.combobox = new Combobox_1.Combobox({
            label: Strings_1.l('SearchFacetResults', this.facet.options.title),
            ariaLive: this.facet.searchInterface.ariaLive,
            requestValues: function (terms) { return _this.hierarchicalFacetSearchController.search(terms); },
            createValuesFromResponse: function (response) { return _this.createValuesFromResponse(response); },
            onSelectValue: this.onSelectValue,
            placeholderText: Strings_1.l('Search'),
            wrapperClassName: 'coveo-dynamic-facet-search',
            clearOnBlur: true,
            scrollable: {
                requestMoreValues: function () { return _this.hierarchicalFacetSearchController.fetchMoreResults(); },
                areMoreValuesAvailable: function () { return _this.hierarchicalFacetSearchController.moreValuesAvailable; },
                maxDropdownHeight: 250
            },
            highlightValueClassName: 'coveo-dynamic-hierarchical-facet-search-value-label'
        });
        return this.combobox.element;
    };
    DynamicHierarchicalFacetSearch.prototype.getDisplayValue = function (value) {
        return this.facet.options.valueCaption[value] || value;
    };
    DynamicHierarchicalFacetSearch.prototype.createValuesFromResponse = function (response) {
        var _this = this;
        return response.values.map(function (value) {
            var facetValue = new DynamicHierarchicalFacetSearchValue_1.DynamicHierarchicalFacetSearchValue({
                fullPath: value.path.concat([value.rawValue]),
                // TODO: remove when https://coveord.atlassian.net/browse/SEARCHAPI-4958 is fixed
                displayValue: _this.getDisplayValue(value.displayValue),
                numberOfResults: value.count
            }, _this.facet);
            return {
                value: facetValue,
                element: facetValue.renderedElement
            };
        });
    };
    DynamicHierarchicalFacetSearch.prototype.onSelectValue = function (_a) {
        var value = _a.value;
        value.renderer.selectAction();
    };
    return DynamicHierarchicalFacetSearch;
}());
exports.DynamicHierarchicalFacetSearch = DynamicHierarchicalFacetSearch;
 
 
/***/ }),
/* 1543 */
/***/ (function(module, exports) {
 
// empty (null-loader)
 
/***/ }),
/* 1544 */
/***/ (function(module, exports) {
 
// empty (null-loader)
 
/***/ }),
/* 1545 */
/***/ (function(module, exports) {
 
// empty (null-loader)
 
/***/ }),
/* 1546 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var _ = __webpack_require__(1);
// Webpack output a library target with a temporary name.
// It does not take care of merging the namespace if the global variable already exists.
// If another piece of code in the page use the Coveo namespace (eg: extension), then they get overwritten
// This code swap the current module to the "real" Coveo variable, without overwriting the whole global var.
function swapVar(scope) {
    Iif (window['Coveo'] == undefined) {
        window['Coveo'] = scope;
    }
    else {
        _.each(_.keys(scope), function (k) {
            window['Coveo'][k] = scope[k];
        });
    }
    Iif (window['__extends'] == undefined) {
        var __extends = function (d, b) {
            for (var p in b) {
                if (b.hasOwnProperty(p)) {
                    d[p] = b[p];
                }
            }
            function __() {
                this.constructor = d;
            }
            d.prototype = b === null ? Object.create(b) : ((__.prototype = b.prototype), new __());
        };
        window['__extends'] = __extends;
    }
}
exports.swapVar = swapVar;
 
 
/***/ }),
/* 1547 */
/***/ (function(module, exports) {
 
// empty (null-loader)
 
/***/ }),
/* 1548 */
/***/ (function(module, exports) {
 
// empty (null-loader)
 
/***/ }),
/* 1549 */
/***/ (function(module, exports) {
 
// empty (null-loader)
 
/***/ }),
/* 1550 */
/***/ (function(module, exports) {
 
// empty (null-loader)
 
/***/ }),
/* 1551 */
/***/ (function(module, exports, __webpack_require__) {
 
/*! @license DOMPurify 2.4.0 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.4.0/LICENSE */
 
(function (global, factory) {
   true ? module.exports = factory() :
  typeof define === 'function' && define.amd ? define(factory) :
  (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.DOMPurify = factory());
})(this, (function () { 'use strict';
 
  function _typeof(obj) {
    "@babel/helpers - typeof";
 
    return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
      return typeof obj;
    } : function (obj) {
      return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
    }, _typeof(obj);
  }
 
  function _setPrototypeOf(o, p) {
    _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
      o.__proto__ = p;
      return o;
    };
 
    return _setPrototypeOf(o, p);
  }
 
  function _isNativeReflectConstruct() {
    if (typeof Reflect === "undefined" || !Reflect.construct) return false;
    if (Reflect.construct.sham) return false;
    if (typeof Proxy === "function") return true;
 
    try {
      Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
      return true;
    } catch (e) {
      return false;
    }
  }
 
  function _construct(Parent, args, Class) {
    if (_isNativeReflectConstruct()) {
      _construct = Reflect.construct;
    } else {
      _construct = function _construct(Parent, args, Class) {
        var a = [null];
        a.push.apply(a, args);
        var Constructor = Function.bind.apply(Parent, a);
        var instance = new Constructor();
        if (Class) _setPrototypeOf(instance, Class.prototype);
        return instance;
      };
    }
 
    return _construct.apply(null, arguments);
  }
 
  function _toConsumableArray(arr) {
    return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
  }
 
  function _arrayWithoutHoles(arr) {
    Eif (Array.isArray(arr)) return _arrayLikeToArray(arr);
  }
 
  function _iterableToArray(iter) {
    if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
  }
 
  function _unsupportedIterableToArray(o, minLen) {
    if (!o) return;
    if (typeof o === "string") return _arrayLikeToArray(o, minLen);
    var n = Object.prototype.toString.call(o).slice(8, -1);
    if (n === "Object" && o.constructor) n = o.constructor.name;
    if (n === "Map" || n === "Set") return Array.from(o);
    if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
  }
 
  function _arrayLikeToArray(arr, len) {
    Eif (len == null || len > arr.length) len = arr.length;
 
    for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
 
    return arr2;
  }
 
  function _nonIterableSpread() {
    throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
  }
 
  var hasOwnProperty = Object.hasOwnProperty,
      setPrototypeOf = Object.setPrototypeOf,
      isFrozen = Object.isFrozen,
      getPrototypeOf = Object.getPrototypeOf,
      getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
  var freeze = Object.freeze,
      seal = Object.seal,
      create = Object.create; // eslint-disable-line import/no-mutable-exports
 
  var _ref = typeof Reflect !== 'undefined' && Reflect,
      apply = _ref.apply,
      construct = _ref.construct;
 
  Iif (!apply) {
    apply = function apply(fun, thisValue, args) {
      return fun.apply(thisValue, args);
    };
  }
 
  Iif (!freeze) {
    freeze = function freeze(x) {
      return x;
    };
  }
 
  Iif (!seal) {
    seal = function seal(x) {
      return x;
    };
  }
 
  Iif (!construct) {
    construct = function construct(Func, args) {
      return _construct(Func, _toConsumableArray(args));
    };
  }
 
  var arrayForEach = unapply(Array.prototype.forEach);
  var arrayPop = unapply(Array.prototype.pop);
  var arrayPush = unapply(Array.prototype.push);
  var stringToLowerCase = unapply(String.prototype.toLowerCase);
  var stringMatch = unapply(String.prototype.match);
  var stringReplace = unapply(String.prototype.replace);
  var stringIndexOf = unapply(String.prototype.indexOf);
  var stringTrim = unapply(String.prototype.trim);
  var regExpTest = unapply(RegExp.prototype.test);
  var typeErrorCreate = unconstruct(TypeError);
  function unapply(func) {
    return function (thisArg) {
      for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
        args[_key - 1] = arguments[_key];
      }
 
      return apply(func, thisArg, args);
    };
  }
  function unconstruct(func) {
    return function () {
      for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
        args[_key2] = arguments[_key2];
      }
 
      return construct(func, args);
    };
  }
  /* Add properties to a lookup table */
 
  function addToSet(set, array, transformCaseFunc) {
    transformCaseFunc = transformCaseFunc ? transformCaseFunc : stringToLowerCase;
 
    Eif (setPrototypeOf) {
      // Make 'in' and truthy checks like Boolean(set.constructor)
      // independent of any properties defined on Object.prototype.
      // Prevent prototype setters from intercepting set as a this value.
      setPrototypeOf(set, null);
    }
 
    var l = array.length;
 
    while (l--) {
      var element = array[l];
 
      Eif (typeof element === 'string') {
        var lcElement = transformCaseFunc(element);
 
        if (lcElement !== element) {
          // Config presets (e.g. tags.js, attrs.js) are immutable.
          if (!isFrozen(array)) {
            array[l] = lcElement;
          }
 
          element = lcElement;
        }
      }
 
      set[element] = true;
    }
 
    return set;
  }
  /* Shallow clone an object */
 
  function clone(object) {
    var newObject = create(null);
    var property;
 
    for (property in object) {
      if (apply(hasOwnProperty, object, [property])) {
        newObject[property] = object[property];
      }
    }
 
    return newObject;
  }
  /* IE10 doesn't support __lookupGetter__ so lets'
   * simulate it. It also automatically checks
   * if the prop is function or getter and behaves
   * accordingly. */
 
  function lookupGetter(object, prop) {
    while (object !== null) {
      var desc = getOwnPropertyDescriptor(object, prop);
 
      if (desc) {
        if (desc.get) {
          return unapply(desc.get);
        }
 
        Eif (typeof desc.value === 'function') {
          return unapply(desc.value);
        }
      }
 
      object = getPrototypeOf(object);
    }
 
    function fallbackValue(element) {
      console.warn('fallback value for', element);
      return null;
    }
 
    return fallbackValue;
  }
 
  var html$1 = freeze(['a', 'abbr', 'acronym', 'address', 'area', 'article', 'aside', 'audio', 'b', 'bdi', 'bdo', 'big', 'blink', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'center', 'cite', 'code', 'col', 'colgroup', 'content', 'data', 'datalist', 'dd', 'decorator', 'del', 'details', 'dfn', 'dialog', 'dir', 'div', 'dl', 'dt', 'element', 'em', 'fieldset', 'figcaption', 'figure', 'font', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'img', 'input', 'ins', 'kbd', 'label', 'legend', 'li', 'main', 'map', 'mark', 'marquee', 'menu', 'menuitem', 'meter', 'nav', 'nobr', 'ol', 'optgroup', 'option', 'output', 'p', 'picture', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'section', 'select', 'shadow', 'small', 'source', 'spacer', 'span', 'strike', 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'template', 'textarea', 'tfoot', 'th', 'thead', 'time', 'tr', 'track', 'tt', 'u', 'ul', 'var', 'video', 'wbr']); // SVG
 
  var svg$1 = freeze(['svg', 'a', 'altglyph', 'altglyphdef', 'altglyphitem', 'animatecolor', 'animatemotion', 'animatetransform', 'circle', 'clippath', 'defs', 'desc', 'ellipse', 'filter', 'font', 'g', 'glyph', 'glyphref', 'hkern', 'image', 'line', 'lineargradient', 'marker', 'mask', 'metadata', 'mpath', 'path', 'pattern', 'polygon', 'polyline', 'radialgradient', 'rect', 'stop', 'style', 'switch', 'symbol', 'text', 'textpath', 'title', 'tref', 'tspan', 'view', 'vkern']);
  var svgFilters = freeze(['feBlend', 'feColorMatrix', 'feComponentTransfer', 'feComposite', 'feConvolveMatrix', 'feDiffuseLighting', 'feDisplacementMap', 'feDistantLight', 'feFlood', 'feFuncA', 'feFuncB', 'feFuncG', 'feFuncR', 'feGaussianBlur', 'feImage', 'feMerge', 'feMergeNode', 'feMorphology', 'feOffset', 'fePointLight', 'feSpecularLighting', 'feSpotLight', 'feTile', 'feTurbulence']); // List of SVG elements that are disallowed by default.
  // We still need to know them so that we can do namespace
  // checks properly in case one wants to add them to
  // allow-list.
 
  var svgDisallowed = freeze(['animate', 'color-profile', 'cursor', 'discard', 'fedropshadow', 'font-face', 'font-face-format', 'font-face-name', 'font-face-src', 'font-face-uri', 'foreignobject', 'hatch', 'hatchpath', 'mesh', 'meshgradient', 'meshpatch', 'meshrow', 'missing-glyph', 'script', 'set', 'solidcolor', 'unknown', 'use']);
  var mathMl$1 = freeze(['math', 'menclose', 'merror', 'mfenced', 'mfrac', 'mglyph', 'mi', 'mlabeledtr', 'mmultiscripts', 'mn', 'mo', 'mover', 'mpadded', 'mphantom', 'mroot', 'mrow', 'ms', 'mspace', 'msqrt', 'mstyle', 'msub', 'msup', 'msubsup', 'mtable', 'mtd', 'mtext', 'mtr', 'munder', 'munderover']); // Similarly to SVG, we want to know all MathML elements,
  // even those that we disallow by default.
 
  var mathMlDisallowed = freeze(['maction', 'maligngroup', 'malignmark', 'mlongdiv', 'mscarries', 'mscarry', 'msgroup', 'mstack', 'msline', 'msrow', 'semantics', 'annotation', 'annotation-xml', 'mprescripts', 'none']);
  var text = freeze(['#text']);
 
  var html = freeze(['accept', 'action', 'align', 'alt', 'autocapitalize', 'autocomplete', 'autopictureinpicture', 'autoplay', 'background', 'bgcolor', 'border', 'capture', 'cellpadding', 'cellspacing', 'checked', 'cite', 'class', 'clear', 'color', 'cols', 'colspan', 'controls', 'controlslist', 'coords', 'crossorigin', 'datetime', 'decoding', 'default', 'dir', 'disabled', 'disablepictureinpicture', 'disableremoteplayback', 'download', 'draggable', 'enctype', 'enterkeyhint', 'face', 'for', 'headers', 'height', 'hidden', 'high', 'href', 'hreflang', 'id', 'inputmode', 'integrity', 'ismap', 'kind', 'label', 'lang', 'list', 'loading', 'loop', 'low', 'max', 'maxlength', 'media', 'method', 'min', 'minlength', 'multiple', 'muted', 'name', 'nonce', 'noshade', 'novalidate', 'nowrap', 'open', 'optimum', 'pattern', 'placeholder', 'playsinline', 'poster', 'preload', 'pubdate', 'radiogroup', 'readonly', 'rel', 'required', 'rev', 'reversed', 'role', 'rows', 'rowspan', 'spellcheck', 'scope', 'selected', 'shape', 'size', 'sizes', 'span', 'srclang', 'start', 'src', 'srcset', 'step', 'style', 'summary', 'tabindex', 'title', 'translate', 'type', 'usemap', 'valign', 'value', 'width', 'xmlns', 'slot']);
  var svg = freeze(['accent-height', 'accumulate', 'additive', 'alignment-baseline', 'ascent', 'attributename', 'attributetype', 'azimuth', 'basefrequency', 'baseline-shift', 'begin', 'bias', 'by', 'class', 'clip', 'clippathunits', 'clip-path', 'clip-rule', 'color', 'color-interpolation', 'color-interpolation-filters', 'color-profile', 'color-rendering', 'cx', 'cy', 'd', 'dx', 'dy', 'diffuseconstant', 'direction', 'display', 'divisor', 'dur', 'edgemode', 'elevation', 'end', 'fill', 'fill-opacity', 'fill-rule', 'filter', 'filterunits', 'flood-color', 'flood-opacity', 'font-family', 'font-size', 'font-size-adjust', 'font-stretch', 'font-style', 'font-variant', 'font-weight', 'fx', 'fy', 'g1', 'g2', 'glyph-name', 'glyphref', 'gradientunits', 'gradienttransform', 'height', 'href', 'id', 'image-rendering', 'in', 'in2', 'k', 'k1', 'k2', 'k3', 'k4', 'kerning', 'keypoints', 'keysplines', 'keytimes', 'lang', 'lengthadjust', 'letter-spacing', 'kernelmatrix', 'kernelunitlength', 'lighting-color', 'local', 'marker-end', 'marker-mid', 'marker-start', 'markerheight', 'markerunits', 'markerwidth', 'maskcontentunits', 'maskunits', 'max', 'mask', 'media', 'method', 'mode', 'min', 'name', 'numoctaves', 'offset', 'operator', 'opacity', 'order', 'orient', 'orientation', 'origin', 'overflow', 'paint-order', 'path', 'pathlength', 'patterncontentunits', 'patterntransform', 'patternunits', 'points', 'preservealpha', 'preserveaspectratio', 'primitiveunits', 'r', 'rx', 'ry', 'radius', 'refx', 'refy', 'repeatcount', 'repeatdur', 'restart', 'result', 'rotate', 'scale', 'seed', 'shape-rendering', 'specularconstant', 'specularexponent', 'spreadmethod', 'startoffset', 'stddeviation', 'stitchtiles', 'stop-color', 'stop-opacity', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-linecap', 'stroke-linejoin', 'stroke-miterlimit', 'stroke-opacity', 'stroke', 'stroke-width', 'style', 'surfacescale', 'systemlanguage', 'tabindex', 'targetx', 'targety', 'transform', 'transform-origin', 'text-anchor', 'text-decoration', 'text-rendering', 'textlength', 'type', 'u1', 'u2', 'unicode', 'values', 'viewbox', 'visibility', 'version', 'vert-adv-y', 'vert-origin-x', 'vert-origin-y', 'width', 'word-spacing', 'wrap', 'writing-mode', 'xchannelselector', 'ychannelselector', 'x', 'x1', 'x2', 'xmlns', 'y', 'y1', 'y2', 'z', 'zoomandpan']);
  var mathMl = freeze(['accent', 'accentunder', 'align', 'bevelled', 'close', 'columnsalign', 'columnlines', 'columnspan', 'denomalign', 'depth', 'dir', 'display', 'displaystyle', 'encoding', 'fence', 'frame', 'height', 'href', 'id', 'largeop', 'length', 'linethickness', 'lspace', 'lquote', 'mathbackground', 'mathcolor', 'mathsize', 'mathvariant', 'maxsize', 'minsize', 'movablelimits', 'notation', 'numalign', 'open', 'rowalign', 'rowlines', 'rowspacing', 'rowspan', 'rspace', 'rquote', 'scriptlevel', 'scriptminsize', 'scriptsizemultiplier', 'selection', 'separator', 'separators', 'stretchy', 'subscriptshift', 'supscriptshift', 'symmetric', 'voffset', 'width', 'xmlns']);
  var xml = freeze(['xlink:href', 'xml:id', 'xlink:title', 'xml:space', 'xmlns:xlink']);
 
  var MUSTACHE_EXPR = seal(/\{\{[\w\W]*|[\w\W]*\}\}/gm); // Specify template detection regex for SAFE_FOR_TEMPLATES mode
 
  var ERB_EXPR = seal(/<%[\w\W]*|[\w\W]*%>/gm);
  var DATA_ATTR = seal(/^data-[\-\w.\u00B7-\uFFFF]/); // eslint-disable-line no-useless-escape
 
  var ARIA_ATTR = seal(/^aria-[\-\w]+$/); // eslint-disable-line no-useless-escape
 
  var IS_ALLOWED_URI = seal(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i // eslint-disable-line no-useless-escape
  );
  var IS_SCRIPT_OR_DATA = seal(/^(?:\w+script|data):/i);
  var ATTR_WHITESPACE = seal(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g // eslint-disable-line no-control-regex
  );
  var DOCTYPE_NAME = seal(/^html$/i);
 
  var getGlobal = function getGlobal() {
    return typeof window === 'undefined' ? null : window;
  };
  /**
   * Creates a no-op policy for internal use only.
   * Don't export this function outside this module!
   * @param {?TrustedTypePolicyFactory} trustedTypes The policy factory.
   * @param {Document} document The document object (to determine policy name suffix)
   * @return {?TrustedTypePolicy} The policy created (or null, if Trusted Types
   * are not supported).
   */
 
 
  var _createTrustedTypesPolicy = function _createTrustedTypesPolicy(trustedTypes, document) {
    Eif (_typeof(trustedTypes) !== 'object' || typeof trustedTypes.createPolicy !== 'function') {
      return null;
    } // Allow the callers to control the unique policy name
    // by adding a data-tt-policy-suffix to the script element with the DOMPurify.
    // Policy creation with duplicate names throws in Trusted Types.
 
 
    var suffix = null;
    var ATTR_NAME = 'data-tt-policy-suffix';
 
    if (document.currentScript && document.currentScript.hasAttribute(ATTR_NAME)) {
      suffix = document.currentScript.getAttribute(ATTR_NAME);
    }
 
    var policyName = 'dompurify' + (suffix ? '#' + suffix : '');
 
    try {
      return trustedTypes.createPolicy(policyName, {
        createHTML: function createHTML(html) {
          return html;
        },
        createScriptURL: function createScriptURL(scriptUrl) {
          return scriptUrl;
        }
      });
    } catch (_) {
      // Policy creation failed (most likely another DOMPurify script has
      // already run). Skip creating the policy, as this will only cause errors
      // if TT are enforced.
      console.warn('TrustedTypes policy ' + policyName + ' could not be created.');
      return null;
    }
  };
 
  function createDOMPurify() {
    var window = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getGlobal();
 
    var DOMPurify = function DOMPurify(root) {
      return createDOMPurify(root);
    };
    /**
     * Version label, exposed for easier checks
     * if DOMPurify is up to date or not
     */
 
 
    DOMPurify.version = '2.4.0';
    /**
     * Array of elements that DOMPurify removed during sanitation.
     * Empty if nothing was removed.
     */
 
    DOMPurify.removed = [];
 
    Iif (!window || !window.document || window.document.nodeType !== 9) {
      // Not running in a browser, provide a factory function
      // so that you can pass your own Window
      DOMPurify.isSupported = false;
      return DOMPurify;
    }
 
    var originalDocument = window.document;
    var document = window.document;
    var DocumentFragment = window.DocumentFragment,
        HTMLTemplateElement = window.HTMLTemplateElement,
        Node = window.Node,
        Element = window.Element,
        NodeFilter = window.NodeFilter,
        _window$NamedNodeMap = window.NamedNodeMap,
        NamedNodeMap = _window$NamedNodeMap === void 0 ? window.NamedNodeMap || window.MozNamedAttrMap : _window$NamedNodeMap,
        HTMLFormElement = window.HTMLFormElement,
        DOMParser = window.DOMParser,
        trustedTypes = window.trustedTypes;
    var ElementPrototype = Element.prototype;
    var cloneNode = lookupGetter(ElementPrototype, 'cloneNode');
    var getNextSibling = lookupGetter(ElementPrototype, 'nextSibling');
    var getChildNodes = lookupGetter(ElementPrototype, 'childNodes');
    var getParentNode = lookupGetter(ElementPrototype, 'parentNode'); // As per issue #47, the web-components registry is inherited by a
    // new document created via createHTMLDocument. As per the spec
    // (http://w3c.github.io/webcomponents/spec/custom/#creating-and-passing-registries)
    // a new empty registry is used when creating a template contents owner
    // document, so we use that as our parent document to ensure nothing
    // is inherited.
 
    Eif (typeof HTMLTemplateElement === 'function') {
      var template = document.createElement('template');
 
      Eif (template.content && template.content.ownerDocument) {
        document = template.content.ownerDocument;
      }
    }
 
    var trustedTypesPolicy = _createTrustedTypesPolicy(trustedTypes, originalDocument);
 
    var emptyHTML = trustedTypesPolicy ? trustedTypesPolicy.createHTML('') : '';
    var _document = document,
        implementation = _document.implementation,
        createNodeIterator = _document.createNodeIterator,
        createDocumentFragment = _document.createDocumentFragment,
        getElementsByTagName = _document.getElementsByTagName;
    var importNode = originalDocument.importNode;
    var documentMode = {};
 
    try {
      documentMode = clone(document).documentMode ? document.documentMode : {};
    } catch (_) {}
 
    var hooks = {};
    /**
     * Expose whether this browser supports running the full DOMPurify.
     */
 
    DOMPurify.isSupported = typeof getParentNode === 'function' && implementation && typeof implementation.createHTMLDocument !== 'undefined' && documentMode !== 9;
    var MUSTACHE_EXPR$1 = MUSTACHE_EXPR,
        ERB_EXPR$1 = ERB_EXPR,
        DATA_ATTR$1 = DATA_ATTR,
        ARIA_ATTR$1 = ARIA_ATTR,
        IS_SCRIPT_OR_DATA$1 = IS_SCRIPT_OR_DATA,
        ATTR_WHITESPACE$1 = ATTR_WHITESPACE;
    var IS_ALLOWED_URI$1 = IS_ALLOWED_URI;
    /**
     * We consider the elements and attributes below to be safe. Ideally
     * don't add any new ones but feel free to remove unwanted ones.
     */
 
    /* allowed element names */
 
    var ALLOWED_TAGS = null;
    var DEFAULT_ALLOWED_TAGS = addToSet({}, [].concat(_toConsumableArray(html$1), _toConsumableArray(svg$1), _toConsumableArray(svgFilters), _toConsumableArray(mathMl$1), _toConsumableArray(text)));
    /* Allowed attribute names */
 
    var ALLOWED_ATTR = null;
    var DEFAULT_ALLOWED_ATTR = addToSet({}, [].concat(_toConsumableArray(html), _toConsumableArray(svg), _toConsumableArray(mathMl), _toConsumableArray(xml)));
    /*
     * Configure how DOMPUrify should handle custom elements and their attributes as well as customized built-in elements.
     * @property {RegExp|Function|null} tagNameCheck one of [null, regexPattern, predicate]. Default: `null` (disallow any custom elements)
     * @property {RegExp|Function|null} attributeNameCheck one of [null, regexPattern, predicate]. Default: `null` (disallow any attributes not on the allow list)
     * @property {boolean} allowCustomizedBuiltInElements allow custom elements derived from built-ins if they pass CUSTOM_ELEMENT_HANDLING.tagNameCheck. Default: `false`.
     */
 
    var CUSTOM_ELEMENT_HANDLING = Object.seal(Object.create(null, {
      tagNameCheck: {
        writable: true,
        configurable: false,
        enumerable: true,
        value: null
      },
      attributeNameCheck: {
        writable: true,
        configurable: false,
        enumerable: true,
        value: null
      },
      allowCustomizedBuiltInElements: {
        writable: true,
        configurable: false,
        enumerable: true,
        value: false
      }
    }));
    /* Explicitly forbidden tags (overrides ALLOWED_TAGS/ADD_TAGS) */
 
    var FORBID_TAGS = null;
    /* Explicitly forbidden attributes (overrides ALLOWED_ATTR/ADD_ATTR) */
 
    var FORBID_ATTR = null;
    /* Decide if ARIA attributes are okay */
 
    var ALLOW_ARIA_ATTR = true;
    /* Decide if custom data attributes are okay */
 
    var ALLOW_DATA_ATTR = true;
    /* Decide if unknown protocols are okay */
 
    var ALLOW_UNKNOWN_PROTOCOLS = false;
    /* Output should be safe for common template engines.
     * This means, DOMPurify removes data attributes, mustaches and ERB
     */
 
    var SAFE_FOR_TEMPLATES = false;
    /* Decide if document with <html>... should be returned */
 
    var WHOLE_DOCUMENT = false;
    /* Track whether config is already set on this instance of DOMPurify. */
 
    var SET_CONFIG = false;
    /* Decide if all elements (e.g. style, script) must be children of
     * document.body. By default, browsers might move them to document.head */
 
    var FORCE_BODY = false;
    /* Decide if a DOM `HTMLBodyElement` should be returned, instead of a html
     * string (or a TrustedHTML object if Trusted Types are supported).
     * If `WHOLE_DOCUMENT` is enabled a `HTMLHtmlElement` will be returned instead
     */
 
    var RETURN_DOM = false;
    /* Decide if a DOM `DocumentFragment` should be returned, instead of a html
     * string  (or a TrustedHTML object if Trusted Types are supported) */
 
    var RETURN_DOM_FRAGMENT = false;
    /* Try to return a Trusted Type object instead of a string, return a string in
     * case Trusted Types are not supported  */
 
    var RETURN_TRUSTED_TYPE = false;
    /* Output should be free from DOM clobbering attacks?
     * This sanitizes markups named with colliding, clobberable built-in DOM APIs.
     */
 
    var SANITIZE_DOM = true;
    /* Achieve full DOM Clobbering protection by isolating the namespace of named
     * properties and JS variables, mitigating attacks that abuse the HTML/DOM spec rules.
     *
     * HTML/DOM spec rules that enable DOM Clobbering:
     *   - Named Access on Window (§7.3.3)
     *   - DOM Tree Accessors (§3.1.5)
     *   - Form Element Parent-Child Relations (§4.10.3)
     *   - Iframe srcdoc / Nested WindowProxies (§4.8.5)
     *   - HTMLCollection (§4.2.10.2)
     *
     * Namespace isolation is implemented by prefixing `id` and `name` attributes
     * with a constant string, i.e., `user-content-`
     */
 
    var SANITIZE_NAMED_PROPS = false;
    var SANITIZE_NAMED_PROPS_PREFIX = 'user-content-';
    /* Keep element content when removing element? */
 
    var KEEP_CONTENT = true;
    /* If a `Node` is passed to sanitize(), then performs sanitization in-place instead
     * of importing it into a new Document and returning a sanitized copy */
 
    var IN_PLACE = false;
    /* Allow usage of profiles like html, svg and mathMl */
 
    var USE_PROFILES = {};
    /* Tags to ignore content of when KEEP_CONTENT is true */
 
    var FORBID_CONTENTS = null;
    var DEFAULT_FORBID_CONTENTS = addToSet({}, ['annotation-xml', 'audio', 'colgroup', 'desc', 'foreignobject', 'head', 'iframe', 'math', 'mi', 'mn', 'mo', 'ms', 'mtext', 'noembed', 'noframes', 'noscript', 'plaintext', 'script', 'style', 'svg', 'template', 'thead', 'title', 'video', 'xmp']);
    /* Tags that are safe for data: URIs */
 
    var DATA_URI_TAGS = null;
    var DEFAULT_DATA_URI_TAGS = addToSet({}, ['audio', 'video', 'img', 'source', 'image', 'track']);
    /* Attributes safe for values like "javascript:" */
 
    var URI_SAFE_ATTRIBUTES = null;
    var DEFAULT_URI_SAFE_ATTRIBUTES = addToSet({}, ['alt', 'class', 'for', 'id', 'label', 'name', 'pattern', 'placeholder', 'role', 'summary', 'title', 'value', 'style', 'xmlns']);
    var MATHML_NAMESPACE = 'http://www.w3.org/1998/Math/MathML';
    var SVG_NAMESPACE = 'http://www.w3.org/2000/svg';
    var HTML_NAMESPACE = 'http://www.w3.org/1999/xhtml';
    /* Document namespace */
 
    var NAMESPACE = HTML_NAMESPACE;
    var IS_EMPTY_INPUT = false;
    /* Parsing of strict XHTML documents */
 
    var PARSER_MEDIA_TYPE;
    var SUPPORTED_PARSER_MEDIA_TYPES = ['application/xhtml+xml', 'text/html'];
    var DEFAULT_PARSER_MEDIA_TYPE = 'text/html';
    var transformCaseFunc;
    /* Keep a reference to config to pass to hooks */
 
    var CONFIG = null;
    /* Ideally, do not touch anything below this line */
 
    /* ______________________________________________ */
 
    var formElement = document.createElement('form');
 
    var isRegexOrFunction = function isRegexOrFunction(testValue) {
      return testValue instanceof RegExp || testValue instanceof Function;
    };
    /**
     * _parseConfig
     *
     * @param  {Object} cfg optional config literal
     */
    // eslint-disable-next-line complexity
 
 
    var _parseConfig = function _parseConfig(cfg) {
      Iif (CONFIG && CONFIG === cfg) {
        return;
      }
      /* Shield configuration object from tampering */
 
 
      Iif (!cfg || _typeof(cfg) !== 'object') {
        cfg = {};
      }
      /* Shield configuration object from prototype pollution */
 
 
      cfg = clone(cfg);
      PARSER_MEDIA_TYPE = // eslint-disable-next-line unicorn/prefer-includes
      SUPPORTED_PARSER_MEDIA_TYPES.indexOf(cfg.PARSER_MEDIA_TYPE) === -1 ? PARSER_MEDIA_TYPE = DEFAULT_PARSER_MEDIA_TYPE : PARSER_MEDIA_TYPE = cfg.PARSER_MEDIA_TYPE; // HTML tags and attributes are not case-sensitive, converting to lowercase. Keeping XHTML as is.
 
      transformCaseFunc = PARSER_MEDIA_TYPE === 'application/xhtml+xml' ? function (x) {
        return x;
      } : stringToLowerCase;
      /* Set configuration parameters */
 
      ALLOWED_TAGS = 'ALLOWED_TAGS' in cfg ? addToSet({}, cfg.ALLOWED_TAGS, transformCaseFunc) : DEFAULT_ALLOWED_TAGS;
      ALLOWED_ATTR = 'ALLOWED_ATTR' in cfg ? addToSet({}, cfg.ALLOWED_ATTR, transformCaseFunc) : DEFAULT_ALLOWED_ATTR;
      URI_SAFE_ATTRIBUTES = 'ADD_URI_SAFE_ATTR' in cfg ? addToSet(clone(DEFAULT_URI_SAFE_ATTRIBUTES), // eslint-disable-line indent
      cfg.ADD_URI_SAFE_ATTR, // eslint-disable-line indent
      transformCaseFunc // eslint-disable-line indent
      ) // eslint-disable-line indent
      : DEFAULT_URI_SAFE_ATTRIBUTES;
      DATA_URI_TAGS = 'ADD_DATA_URI_TAGS' in cfg ? addToSet(clone(DEFAULT_DATA_URI_TAGS), // eslint-disable-line indent
      cfg.ADD_DATA_URI_TAGS, // eslint-disable-line indent
      transformCaseFunc // eslint-disable-line indent
      ) // eslint-disable-line indent
      : DEFAULT_DATA_URI_TAGS;
      FORBID_CONTENTS = 'FORBID_CONTENTS' in cfg ? addToSet({}, cfg.FORBID_CONTENTS, transformCaseFunc) : DEFAULT_FORBID_CONTENTS;
      FORBID_TAGS = 'FORBID_TAGS' in cfg ? addToSet({}, cfg.FORBID_TAGS, transformCaseFunc) : {};
      FORBID_ATTR = 'FORBID_ATTR' in cfg ? addToSet({}, cfg.FORBID_ATTR, transformCaseFunc) : {};
      USE_PROFILES = 'USE_PROFILES' in cfg ? cfg.USE_PROFILES : false;
      ALLOW_ARIA_ATTR = cfg.ALLOW_ARIA_ATTR !== false; // Default true
 
      ALLOW_DATA_ATTR = cfg.ALLOW_DATA_ATTR !== false; // Default true
 
      ALLOW_UNKNOWN_PROTOCOLS = cfg.ALLOW_UNKNOWN_PROTOCOLS || false; // Default false
 
      SAFE_FOR_TEMPLATES = cfg.SAFE_FOR_TEMPLATES || false; // Default false
 
      WHOLE_DOCUMENT = cfg.WHOLE_DOCUMENT || false; // Default false
 
      RETURN_DOM = cfg.RETURN_DOM || false; // Default false
 
      RETURN_DOM_FRAGMENT = cfg.RETURN_DOM_FRAGMENT || false; // Default false
 
      RETURN_TRUSTED_TYPE = cfg.RETURN_TRUSTED_TYPE || false; // Default false
 
      FORCE_BODY = cfg.FORCE_BODY || false; // Default false
 
      SANITIZE_DOM = cfg.SANITIZE_DOM !== false; // Default true
 
      SANITIZE_NAMED_PROPS = cfg.SANITIZE_NAMED_PROPS || false; // Default false
 
      KEEP_CONTENT = cfg.KEEP_CONTENT !== false; // Default true
 
      IN_PLACE = cfg.IN_PLACE || false; // Default false
 
      IS_ALLOWED_URI$1 = cfg.ALLOWED_URI_REGEXP || IS_ALLOWED_URI$1;
      NAMESPACE = cfg.NAMESPACE || HTML_NAMESPACE;
 
      Iif (cfg.CUSTOM_ELEMENT_HANDLING && isRegexOrFunction(cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck)) {
        CUSTOM_ELEMENT_HANDLING.tagNameCheck = cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck;
      }
 
      Iif (cfg.CUSTOM_ELEMENT_HANDLING && isRegexOrFunction(cfg.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)) {
        CUSTOM_ELEMENT_HANDLING.attributeNameCheck = cfg.CUSTOM_ELEMENT_HANDLING.attributeNameCheck;
      }
 
      Iif (cfg.CUSTOM_ELEMENT_HANDLING && typeof cfg.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements === 'boolean') {
        CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements = cfg.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements;
      }
 
      Iif (SAFE_FOR_TEMPLATES) {
        ALLOW_DATA_ATTR = false;
      }
 
      Iif (RETURN_DOM_FRAGMENT) {
        RETURN_DOM = true;
      }
      /* Parse profile info */
 
 
      Eif (USE_PROFILES) {
        ALLOWED_TAGS = addToSet({}, _toConsumableArray(text));
        ALLOWED_ATTR = [];
 
        Eif (USE_PROFILES.html === true) {
          addToSet(ALLOWED_TAGS, html$1);
          addToSet(ALLOWED_ATTR, html);
        }
 
        Iif (USE_PROFILES.svg === true) {
          addToSet(ALLOWED_TAGS, svg$1);
          addToSet(ALLOWED_ATTR, svg);
          addToSet(ALLOWED_ATTR, xml);
        }
 
        Iif (USE_PROFILES.svgFilters === true) {
          addToSet(ALLOWED_TAGS, svgFilters);
          addToSet(ALLOWED_ATTR, svg);
          addToSet(ALLOWED_ATTR, xml);
        }
 
        Iif (USE_PROFILES.mathMl === true) {
          addToSet(ALLOWED_TAGS, mathMl$1);
          addToSet(ALLOWED_ATTR, mathMl);
          addToSet(ALLOWED_ATTR, xml);
        }
      }
      /* Merge configuration parameters */
 
 
      Iif (cfg.ADD_TAGS) {
        if (ALLOWED_TAGS === DEFAULT_ALLOWED_TAGS) {
          ALLOWED_TAGS = clone(ALLOWED_TAGS);
        }
 
        addToSet(ALLOWED_TAGS, cfg.ADD_TAGS, transformCaseFunc);
      }
 
      Iif (cfg.ADD_ATTR) {
        if (ALLOWED_ATTR === DEFAULT_ALLOWED_ATTR) {
          ALLOWED_ATTR = clone(ALLOWED_ATTR);
        }
 
        addToSet(ALLOWED_ATTR, cfg.ADD_ATTR, transformCaseFunc);
      }
 
      Iif (cfg.ADD_URI_SAFE_ATTR) {
        addToSet(URI_SAFE_ATTRIBUTES, cfg.ADD_URI_SAFE_ATTR, transformCaseFunc);
      }
 
      Iif (cfg.FORBID_CONTENTS) {
        if (FORBID_CONTENTS === DEFAULT_FORBID_CONTENTS) {
          FORBID_CONTENTS = clone(FORBID_CONTENTS);
        }
 
        addToSet(FORBID_CONTENTS, cfg.FORBID_CONTENTS, transformCaseFunc);
      }
      /* Add #text in case KEEP_CONTENT is set to true */
 
 
      Eif (KEEP_CONTENT) {
        ALLOWED_TAGS['#text'] = true;
      }
      /* Add html, head and body to ALLOWED_TAGS in case WHOLE_DOCUMENT is true */
 
 
      Iif (WHOLE_DOCUMENT) {
        addToSet(ALLOWED_TAGS, ['html', 'head', 'body']);
      }
      /* Add tbody to ALLOWED_TAGS in case tables are permitted, see #286, #365 */
 
 
      Eif (ALLOWED_TAGS.table) {
        addToSet(ALLOWED_TAGS, ['tbody']);
        delete FORBID_TAGS.tbody;
      } // Prevent further manipulation of configuration.
      // Not available in IE8, Safari 5, etc.
 
 
      Eif (freeze) {
        freeze(cfg);
      }
 
      CONFIG = cfg;
    };
 
    var MATHML_TEXT_INTEGRATION_POINTS = addToSet({}, ['mi', 'mo', 'mn', 'ms', 'mtext']);
    var HTML_INTEGRATION_POINTS = addToSet({}, ['foreignobject', 'desc', 'title', 'annotation-xml']); // Certain elements are allowed in both SVG and HTML
    // namespace. We need to specify them explicitly
    // so that they don't get erroneously deleted from
    // HTML namespace.
 
    var COMMON_SVG_AND_HTML_ELEMENTS = addToSet({}, ['title', 'style', 'font', 'a', 'script']);
    /* Keep track of all possible SVG and MathML tags
     * so that we can perform the namespace checks
     * correctly. */
 
    var ALL_SVG_TAGS = addToSet({}, svg$1);
    addToSet(ALL_SVG_TAGS, svgFilters);
    addToSet(ALL_SVG_TAGS, svgDisallowed);
    var ALL_MATHML_TAGS = addToSet({}, mathMl$1);
    addToSet(ALL_MATHML_TAGS, mathMlDisallowed);
    /**
     *
     *
     * @param  {Element} element a DOM element whose namespace is being checked
     * @returns {boolean} Return false if the element has a
     *  namespace that a spec-compliant parser would never
     *  return. Return true otherwise.
     */
 
    var _checkValidNamespace = function _checkValidNamespace(element) {
      var parent = getParentNode(element); // In JSDOM, if we're inside shadow DOM, then parentNode
      // can be null. We just simulate parent in this case.
 
      Iif (!parent || !parent.tagName) {
        parent = {
          namespaceURI: HTML_NAMESPACE,
          tagName: 'template'
        };
      }
 
      var tagName = stringToLowerCase(element.tagName);
      var parentTagName = stringToLowerCase(parent.tagName);
 
      Iif (element.namespaceURI === SVG_NAMESPACE) {
        // The only way to switch from HTML namespace to SVG
        // is via <svg>. If it happens via any other tag, then
        // it should be killed.
        if (parent.namespaceURI === HTML_NAMESPACE) {
          return tagName === 'svg';
        } // The only way to switch from MathML to SVG is via
        // svg if parent is either <annotation-xml> or MathML
        // text integration points.
 
 
        if (parent.namespaceURI === MATHML_NAMESPACE) {
          return tagName === 'svg' && (parentTagName === 'annotation-xml' || MATHML_TEXT_INTEGRATION_POINTS[parentTagName]);
        } // We only allow elements that are defined in SVG
        // spec. All others are disallowed in SVG namespace.
 
 
        return Boolean(ALL_SVG_TAGS[tagName]);
      }
 
      Iif (element.namespaceURI === MATHML_NAMESPACE) {
        // The only way to switch from HTML namespace to MathML
        // is via <math>. If it happens via any other tag, then
        // it should be killed.
        if (parent.namespaceURI === HTML_NAMESPACE) {
          return tagName === 'math';
        } // The only way to switch from SVG to MathML is via
        // <math> and HTML integration points
 
 
        if (parent.namespaceURI === SVG_NAMESPACE) {
          return tagName === 'math' && HTML_INTEGRATION_POINTS[parentTagName];
        } // We only allow elements that are defined in MathML
        // spec. All others are disallowed in MathML namespace.
 
 
        return Boolean(ALL_MATHML_TAGS[tagName]);
      }
 
      Eif (element.namespaceURI === HTML_NAMESPACE) {
        // The only way to switch from SVG to HTML is via
        // HTML integration points, and from MathML to HTML
        // is via MathML text integration points
        Iif (parent.namespaceURI === SVG_NAMESPACE && !HTML_INTEGRATION_POINTS[parentTagName]) {
          return false;
        }
 
        Iif (parent.namespaceURI === MATHML_NAMESPACE && !MATHML_TEXT_INTEGRATION_POINTS[parentTagName]) {
          return false;
        } // We disallow tags that are specific for MathML
        // or SVG and should never appear in HTML namespace
 
 
        return !ALL_MATHML_TAGS[tagName] && (COMMON_SVG_AND_HTML_ELEMENTS[tagName] || !ALL_SVG_TAGS[tagName]);
      } // The code should never reach this place (this means
      // that the element somehow got namespace that is not
      // HTML, SVG or MathML). Return false just in case.
 
 
      return false;
    };
    /**
     * _forceRemove
     *
     * @param  {Node} node a DOM node
     */
 
 
    var _forceRemove = function _forceRemove(node) {
      arrayPush(DOMPurify.removed, {
        element: node
      });
 
      try {
        // eslint-disable-next-line unicorn/prefer-dom-node-remove
        node.parentNode.removeChild(node);
      } catch (_) {
        try {
          node.outerHTML = emptyHTML;
        } catch (_) {
          node.remove();
        }
      }
    };
    /**
     * _removeAttribute
     *
     * @param  {String} name an Attribute name
     * @param  {Node} node a DOM node
     */
 
 
    var _removeAttribute = function _removeAttribute(name, node) {
      try {
        arrayPush(DOMPurify.removed, {
          attribute: node.getAttributeNode(name),
          from: node
        });
      } catch (_) {
        arrayPush(DOMPurify.removed, {
          attribute: null,
          from: node
        });
      }
 
      node.removeAttribute(name); // We void attribute values for unremovable "is"" attributes
 
      Iif (name === 'is' && !ALLOWED_ATTR[name]) {
        if (RETURN_DOM || RETURN_DOM_FRAGMENT) {
          try {
            _forceRemove(node);
          } catch (_) {}
        } else {
          try {
            node.setAttribute(name, '');
          } catch (_) {}
        }
      }
    };
    /**
     * _initDocument
     *
     * @param  {String} dirty a string of dirty markup
     * @return {Document} a DOM, filled with the dirty markup
     */
 
 
    var _initDocument = function _initDocument(dirty) {
      /* Create a HTML document */
      var doc;
      var leadingWhitespace;
 
      Iif (FORCE_BODY) {
        dirty = '<remove></remove>' + dirty;
      } else {
        /* If FORCE_BODY isn't used, leading whitespace needs to be preserved manually */
        var matches = stringMatch(dirty, /^[\r\n\t ]+/);
        leadingWhitespace = matches && matches[0];
      }
 
      Iif (PARSER_MEDIA_TYPE === 'application/xhtml+xml') {
        // Root of XHTML doc must contain xmlns declaration (see https://www.w3.org/TR/xhtml1/normative.html#strict)
        dirty = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + dirty + '</body></html>';
      }
 
      var dirtyPayload = trustedTypesPolicy ? trustedTypesPolicy.createHTML(dirty) : dirty;
      /*
       * Use the DOMParser API by default, fallback later if needs be
       * DOMParser not work for svg when has multiple root element.
       */
 
      Eif (NAMESPACE === HTML_NAMESPACE) {
        try {
          doc = new DOMParser().parseFromString(dirtyPayload, PARSER_MEDIA_TYPE);
        } catch (_) {}
      }
      /* Use createHTMLDocument in case DOMParser is not available */
 
 
      Iif (!doc || !doc.documentElement) {
        doc = implementation.createDocument(NAMESPACE, 'template', null);
 
        try {
          doc.documentElement.innerHTML = IS_EMPTY_INPUT ? '' : dirtyPayload;
        } catch (_) {// Syntax error if dirtyPayload is invalid xml
        }
      }
 
      var body = doc.body || doc.documentElement;
 
      if (dirty && leadingWhitespace) {
        body.insertBefore(document.createTextNode(leadingWhitespace), body.childNodes[0] || null);
      }
      /* Work on whole document or just its body */
 
 
      Eif (NAMESPACE === HTML_NAMESPACE) {
        return getElementsByTagName.call(doc, WHOLE_DOCUMENT ? 'html' : 'body')[0];
      }
 
      return WHOLE_DOCUMENT ? doc.documentElement : body;
    };
    /**
     * _createIterator
     *
     * @param  {Document} root document/fragment to create iterator for
     * @return {Iterator} iterator instance
     */
 
 
    var _createIterator = function _createIterator(root) {
      return createNodeIterator.call(root.ownerDocument || root, root, // eslint-disable-next-line no-bitwise
      NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_COMMENT | NodeFilter.SHOW_TEXT, null, false);
    };
    /**
     * _isClobbered
     *
     * @param  {Node} elm element to check for clobbering attacks
     * @return {Boolean} true if clobbered, false if safe
     */
 
 
    var _isClobbered = function _isClobbered(elm) {
      return elm instanceof HTMLFormElement && (typeof elm.nodeName !== 'string' || typeof elm.textContent !== 'string' || typeof elm.removeChild !== 'function' || !(elm.attributes instanceof NamedNodeMap) || typeof elm.removeAttribute !== 'function' || typeof elm.setAttribute !== 'function' || typeof elm.namespaceURI !== 'string' || typeof elm.insertBefore !== 'function');
    };
    /**
     * _isNode
     *
     * @param  {Node} obj object to check whether it's a DOM node
     * @return {Boolean} true is object is a DOM node
     */
 
 
    var _isNode = function _isNode(object) {
      return _typeof(Node) === 'object' ? object instanceof Node : object && _typeof(object) === 'object' && typeof object.nodeType === 'number' && typeof object.nodeName === 'string';
    };
    /**
     * _executeHook
     * Execute user configurable hooks
     *
     * @param  {String} entryPoint  Name of the hook's entry point
     * @param  {Node} currentNode node to work on with the hook
     * @param  {Object} data additional hook parameters
     */
 
 
    var _executeHook = function _executeHook(entryPoint, currentNode, data) {
      Eif (!hooks[entryPoint]) {
        return;
      }
 
      arrayForEach(hooks[entryPoint], function (hook) {
        hook.call(DOMPurify, currentNode, data, CONFIG);
      });
    };
    /**
     * _sanitizeElements
     *
     * @protect nodeName
     * @protect textContent
     * @protect removeChild
     *
     * @param   {Node} currentNode to check for permission to exist
     * @return  {Boolean} true if node was killed, false if left alive
     */
 
 
    var _sanitizeElements = function _sanitizeElements(currentNode) {
      var content;
      /* Execute a hook if present */
 
      _executeHook('beforeSanitizeElements', currentNode, null);
      /* Check if element is clobbered or can clobber */
 
 
      Iif (_isClobbered(currentNode)) {
        _forceRemove(currentNode);
 
        return true;
      }
      /* Check if tagname contains Unicode */
 
 
      Iif (regExpTest(/[\u0080-\uFFFF]/, currentNode.nodeName)) {
        _forceRemove(currentNode);
 
        return true;
      }
      /* Now let's check the element's type and name */
 
 
      var tagName = transformCaseFunc(currentNode.nodeName);
      /* Execute a hook if present */
 
      _executeHook('uponSanitizeElement', currentNode, {
        tagName: tagName,
        allowedTags: ALLOWED_TAGS
      });
      /* Detect mXSS attempts abusing namespace confusion */
 
 
      Iif (currentNode.hasChildNodes() && !_isNode(currentNode.firstElementChild) && (!_isNode(currentNode.content) || !_isNode(currentNode.content.firstElementChild)) && regExpTest(/<[/\w]/g, currentNode.innerHTML) && regExpTest(/<[/\w]/g, currentNode.textContent)) {
        _forceRemove(currentNode);
 
        return true;
      }
      /* Mitigate a problem with templates inside select */
 
 
      Iif (tagName === 'select' && regExpTest(/<template/i, currentNode.innerHTML)) {
        _forceRemove(currentNode);
 
        return true;
      }
      /* Remove element if anything forbids its presence */
 
 
      Iif (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) {
        /* Check if we have a custom element to handle */
        if (!FORBID_TAGS[tagName] && _basicCustomElementTest(tagName)) {
          if (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, tagName)) return false;
          if (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(tagName)) return false;
        }
        /* Keep content except for bad-listed elements */
 
 
        if (KEEP_CONTENT && !FORBID_CONTENTS[tagName]) {
          var parentNode = getParentNode(currentNode) || currentNode.parentNode;
          var childNodes = getChildNodes(currentNode) || currentNode.childNodes;
 
          if (childNodes && parentNode) {
            var childCount = childNodes.length;
 
            for (var i = childCount - 1; i >= 0; --i) {
              parentNode.insertBefore(cloneNode(childNodes[i], true), getNextSibling(currentNode));
            }
          }
        }
 
        _forceRemove(currentNode);
 
        return true;
      }
      /* Check whether element has a valid namespace */
 
 
      Iif (currentNode instanceof Element && !_checkValidNamespace(currentNode)) {
        _forceRemove(currentNode);
 
        return true;
      }
 
      Iif ((tagName === 'noscript' || tagName === 'noembed') && regExpTest(/<\/no(script|embed)/i, currentNode.innerHTML)) {
        _forceRemove(currentNode);
 
        return true;
      }
      /* Sanitize element content to be template-safe */
 
 
      Iif (SAFE_FOR_TEMPLATES && currentNode.nodeType === 3) {
        /* Get the element's text content */
        content = currentNode.textContent;
        content = stringReplace(content, MUSTACHE_EXPR$1, ' ');
        content = stringReplace(content, ERB_EXPR$1, ' ');
 
        if (currentNode.textContent !== content) {
          arrayPush(DOMPurify.removed, {
            element: currentNode.cloneNode()
          });
          currentNode.textContent = content;
        }
      }
      /* Execute a hook if present */
 
 
      _executeHook('afterSanitizeElements', currentNode, null);
 
      return false;
    };
    /**
     * _isValidAttribute
     *
     * @param  {string} lcTag Lowercase tag name of containing element.
     * @param  {string} lcName Lowercase attribute name.
     * @param  {string} value Attribute value.
     * @return {Boolean} Returns true if `value` is valid, otherwise false.
     */
    // eslint-disable-next-line complexity
 
 
    var _isValidAttribute = function _isValidAttribute(lcTag, lcName, value) {
      /* Make sure attribute cannot clobber */
      Iif (SANITIZE_DOM && (lcName === 'id' || lcName === 'name') && (value in document || value in formElement)) {
        return false;
      }
      /* Allow valid data-* attributes: At least one character after "-"
          (https://html.spec.whatwg.org/multipage/dom.html#embedding-custom-non-visible-data-with-the-data-*-attributes)
          XML-compatible (https://html.spec.whatwg.org/multipage/infrastructure.html#xml-compatible and http://www.w3.org/TR/xml/#d0e804)
          We don't need to check the value; it's always URI safe. */
 
 
      Iif (ALLOW_DATA_ATTR && !FORBID_ATTR[lcName] && regExpTest(DATA_ATTR$1, lcName)) ; else Iif (ALLOW_ARIA_ATTR && regExpTest(ARIA_ATTR$1, lcName)) ; else if (!ALLOWED_ATTR[lcName] || FORBID_ATTR[lcName]) {
        Iif ( // First condition does a very basic check if a) it's basically a valid custom element tagname AND
        // b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
        // and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck
        _basicCustomElementTest(lcTag) && (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, lcTag) || CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(lcTag)) && (CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.attributeNameCheck, lcName) || CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.attributeNameCheck(lcName)) || // Alternative, second condition checks if it's an `is`-attribute, AND
        // the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
        lcName === 'is' && CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements && (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, value) || CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(value))) ; else {
          return false;
        }
        /* Check value is safe. First, is attr inert? If so, is safe */
 
      } else Iif (URI_SAFE_ATTRIBUTES[lcName]) ; else Eif (regExpTest(IS_ALLOWED_URI$1, stringReplace(value, ATTR_WHITESPACE$1, ''))) ; else if ((lcName === 'src' || lcName === 'xlink:href' || lcName === 'href') && lcTag !== 'script' && stringIndexOf(value, 'data:') === 0 && DATA_URI_TAGS[lcTag]) ; else if (ALLOW_UNKNOWN_PROTOCOLS && !regExpTest(IS_SCRIPT_OR_DATA$1, stringReplace(value, ATTR_WHITESPACE$1, ''))) ; else if (!value) ; else {
        return false;
      }
 
      return true;
    };
    /**
     * _basicCustomElementCheck
     * checks if at least one dash is included in tagName, and it's not the first char
     * for more sophisticated checking see https://github.com/sindresorhus/validate-element-name
     * @param {string} tagName name of the tag of the node to sanitize
     */
 
 
    var _basicCustomElementTest = function _basicCustomElementTest(tagName) {
      return tagName.indexOf('-') > 0;
    };
    /**
     * _sanitizeAttributes
     *
     * @protect attributes
     * @protect nodeName
     * @protect removeAttribute
     * @protect setAttribute
     *
     * @param  {Node} currentNode to sanitize
     */
 
 
    var _sanitizeAttributes = function _sanitizeAttributes(currentNode) {
      var attr;
      var value;
      var lcName;
      var l;
      /* Execute a hook if present */
 
      _executeHook('beforeSanitizeAttributes', currentNode, null);
 
      var attributes = currentNode.attributes;
      /* Check if we have attributes; if not we might have a text node */
 
      if (!attributes) {
        return;
      }
 
      var hookEvent = {
        attrName: '',
        attrValue: '',
        keepAttr: true,
        allowedAttributes: ALLOWED_ATTR
      };
      l = attributes.length;
      /* Go backwards over all attributes; safely remove bad ones */
 
      while (l--) {
        attr = attributes[l];
        var _attr = attr,
            name = _attr.name,
            namespaceURI = _attr.namespaceURI;
        value = name === 'value' ? attr.value : stringTrim(attr.value);
        lcName = transformCaseFunc(name);
        /* Execute a hook if present */
 
        hookEvent.attrName = lcName;
        hookEvent.attrValue = value;
        hookEvent.keepAttr = true;
        hookEvent.forceKeepAttr = undefined; // Allows developers to see this is a property they can set
 
        _executeHook('uponSanitizeAttribute', currentNode, hookEvent);
 
        value = hookEvent.attrValue;
        /* Did the hooks approve of the attribute? */
 
        Iif (hookEvent.forceKeepAttr) {
          continue;
        }
        /* Remove attribute */
 
 
        _removeAttribute(name, currentNode);
        /* Did the hooks approve of the attribute? */
 
 
        Iif (!hookEvent.keepAttr) {
          continue;
        }
        /* Work around a security issue in jQuery 3.0 */
 
 
        Iif (regExpTest(/\/>/i, value)) {
          _removeAttribute(name, currentNode);
 
          continue;
        }
        /* Sanitize attribute content to be template-safe */
 
 
        Iif (SAFE_FOR_TEMPLATES) {
          value = stringReplace(value, MUSTACHE_EXPR$1, ' ');
          value = stringReplace(value, ERB_EXPR$1, ' ');
        }
        /* Is `value` valid for this attribute? */
 
 
        var lcTag = transformCaseFunc(currentNode.nodeName);
 
        if (!_isValidAttribute(lcTag, lcName, value)) {
          continue;
        }
        /* Full DOM Clobbering protection via namespace isolation,
         * Prefix id and name attributes with `user-content-`
         */
 
 
        Iif (SANITIZE_NAMED_PROPS && (lcName === 'id' || lcName === 'name')) {
          // Remove the attribute with this value
          _removeAttribute(name, currentNode); // Prefix the value and later re-create the attribute with the sanitized value
 
 
          value = SANITIZE_NAMED_PROPS_PREFIX + value;
        }
        /* Handle attributes that require Trusted Types */
 
 
        Iif (trustedTypesPolicy && _typeof(trustedTypes) === 'object' && typeof trustedTypes.getAttributeType === 'function') {
          if (namespaceURI) ; else {
            switch (trustedTypes.getAttributeType(lcTag, lcName)) {
              case 'TrustedHTML':
                value = trustedTypesPolicy.createHTML(value);
                break;
 
              case 'TrustedScriptURL':
                value = trustedTypesPolicy.createScriptURL(value);
                break;
            }
          }
        }
        /* Handle invalid data-* attribute set by try-catching it */
 
 
        try {
          Iif (namespaceURI) {
            currentNode.setAttributeNS(namespaceURI, name, value);
          } else {
            /* Fallback to setAttribute() for browser-unrecognized namespaces e.g. "x-schema". */
            currentNode.setAttribute(name, value);
          }
 
          arrayPop(DOMPurify.removed);
        } catch (_) {}
      }
      /* Execute a hook if present */
 
 
      _executeHook('afterSanitizeAttributes', currentNode, null);
    };
    /**
     * _sanitizeShadowDOM
     *
     * @param  {DocumentFragment} fragment to iterate over recursively
     */
 
 
    var _sanitizeShadowDOM = function _sanitizeShadowDOM(fragment) {
      var shadowNode;
 
      var shadowIterator = _createIterator(fragment);
      /* Execute a hook if present */
 
 
      _executeHook('beforeSanitizeShadowDOM', fragment, null);
 
      while (shadowNode = shadowIterator.nextNode()) {
        /* Execute a hook if present */
        _executeHook('uponSanitizeShadowNode', shadowNode, null);
        /* Sanitize tags and elements */
 
 
        if (_sanitizeElements(shadowNode)) {
          continue;
        }
        /* Deep shadow DOM detected */
 
 
        if (shadowNode.content instanceof DocumentFragment) {
          _sanitizeShadowDOM(shadowNode.content);
        }
        /* Check attributes, sanitize if necessary */
 
 
        _sanitizeAttributes(shadowNode);
      }
      /* Execute a hook if present */
 
 
      _executeHook('afterSanitizeShadowDOM', fragment, null);
    };
    /**
     * Sanitize
     * Public method providing core sanitation functionality
     *
     * @param {String|Node} dirty string or DOM node
     * @param {Object} configuration object
     */
    // eslint-disable-next-line complexity
 
 
    DOMPurify.sanitize = function (dirty) {
      var cfg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
      var body;
      var importedNode;
      var currentNode;
      var oldNode;
      var returnNode;
      /* Make sure we have a string to sanitize.
        DO NOT return early, as this will return the wrong type if
        the user has requested a DOM object rather than a string */
 
      IS_EMPTY_INPUT = !dirty;
 
      Iif (IS_EMPTY_INPUT) {
        dirty = '<!-->';
      }
      /* Stringify, in case dirty is an object */
 
 
      Iif (typeof dirty !== 'string' && !_isNode(dirty)) {
        // eslint-disable-next-line no-negated-condition
        if (typeof dirty.toString !== 'function') {
          throw typeErrorCreate('toString is not a function');
        } else {
          dirty = dirty.toString();
 
          if (typeof dirty !== 'string') {
            throw typeErrorCreate('dirty is not a string, aborting');
          }
        }
      }
      /* Check we can run. Otherwise fall back or ignore */
 
 
      Iif (!DOMPurify.isSupported) {
        if (_typeof(window.toStaticHTML) === 'object' || typeof window.toStaticHTML === 'function') {
          if (typeof dirty === 'string') {
            return window.toStaticHTML(dirty);
          }
 
          if (_isNode(dirty)) {
            return window.toStaticHTML(dirty.outerHTML);
          }
        }
 
        return dirty;
      }
      /* Assign config vars */
 
 
      Eif (!SET_CONFIG) {
        _parseConfig(cfg);
      }
      /* Clean up removed elements */
 
 
      DOMPurify.removed = [];
      /* Check if dirty is correctly typed for IN_PLACE */
 
      Eif (typeof dirty === 'string') {
        IN_PLACE = false;
      }
 
      Iif (IN_PLACE) {
        /* Do some early pre-sanitization to avoid unsafe root nodes */
        if (dirty.nodeName) {
          var tagName = transformCaseFunc(dirty.nodeName);
 
          if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) {
            throw typeErrorCreate('root node is forbidden and cannot be sanitized in-place');
          }
        }
      } else Iif (dirty instanceof Node) {
        /* If dirty is a DOM element, append to an empty document to avoid
           elements being stripped by the parser */
        body = _initDocument('<!---->');
        importedNode = body.ownerDocument.importNode(dirty, true);
 
        if (importedNode.nodeType === 1 && importedNode.nodeName === 'BODY') {
          /* Node is already a body, use as is */
          body = importedNode;
        } else if (importedNode.nodeName === 'HTML') {
          body = importedNode;
        } else {
          // eslint-disable-next-line unicorn/prefer-dom-node-append
          body.appendChild(importedNode);
        }
      } else {
        /* Exit directly if we have nothing to do */
        if (!RETURN_DOM && !SAFE_FOR_TEMPLATES && !WHOLE_DOCUMENT && // eslint-disable-next-line unicorn/prefer-includes
        dirty.indexOf('<') === -1) {
          return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? trustedTypesPolicy.createHTML(dirty) : dirty;
        }
        /* Initialize the document to work on */
 
 
        body = _initDocument(dirty);
        /* Check we have a DOM node from the data */
 
        Iif (!body) {
          return RETURN_DOM ? null : RETURN_TRUSTED_TYPE ? emptyHTML : '';
        }
      }
      /* Remove first element node (ours) if FORCE_BODY is set */
 
 
      Iif (body && FORCE_BODY) {
        _forceRemove(body.firstChild);
      }
      /* Get node iterator */
 
 
      var nodeIterator = _createIterator(IN_PLACE ? dirty : body);
      /* Now start iterating over the created document */
 
 
      while (currentNode = nodeIterator.nextNode()) {
        /* Fix IE's strange behavior with manipulated textNodes #89 */
        Iif (currentNode.nodeType === 3 && currentNode === oldNode) {
          continue;
        }
        /* Sanitize tags and elements */
 
 
        Iif (_sanitizeElements(currentNode)) {
          continue;
        }
        /* Shadow DOM detected, sanitize it */
 
 
        Iif (currentNode.content instanceof DocumentFragment) {
          _sanitizeShadowDOM(currentNode.content);
        }
        /* Check attributes, sanitize if necessary */
 
 
        _sanitizeAttributes(currentNode);
 
        oldNode = currentNode;
      }
 
      oldNode = null;
      /* If we sanitized `dirty` in-place, return it. */
 
      Iif (IN_PLACE) {
        return dirty;
      }
      /* Return sanitized string or DOM */
 
 
      Iif (RETURN_DOM) {
        if (RETURN_DOM_FRAGMENT) {
          returnNode = createDocumentFragment.call(body.ownerDocument);
 
          while (body.firstChild) {
            // eslint-disable-next-line unicorn/prefer-dom-node-append
            returnNode.appendChild(body.firstChild);
          }
        } else {
          returnNode = body;
        }
 
        if (ALLOWED_ATTR.shadowroot) {
          /*
            AdoptNode() is not used because internal state is not reset
            (e.g. the past names map of a HTMLFormElement), this is safe
            in theory but we would rather not risk another attack vector.
            The state that is cloned by importNode() is explicitly defined
            by the specs.
          */
          returnNode = importNode.call(originalDocument, returnNode, true);
        }
 
        return returnNode;
      }
 
      var serializedHTML = WHOLE_DOCUMENT ? body.outerHTML : body.innerHTML;
      /* Serialize doctype if allowed */
 
      Iif (WHOLE_DOCUMENT && ALLOWED_TAGS['!doctype'] && body.ownerDocument && body.ownerDocument.doctype && body.ownerDocument.doctype.name && regExpTest(DOCTYPE_NAME, body.ownerDocument.doctype.name)) {
        serializedHTML = '<!DOCTYPE ' + body.ownerDocument.doctype.name + '>\n' + serializedHTML;
      }
      /* Sanitize final string template-safe */
 
 
      Iif (SAFE_FOR_TEMPLATES) {
        serializedHTML = stringReplace(serializedHTML, MUSTACHE_EXPR$1, ' ');
        serializedHTML = stringReplace(serializedHTML, ERB_EXPR$1, ' ');
      }
 
      return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? trustedTypesPolicy.createHTML(serializedHTML) : serializedHTML;
    };
    /**
     * Public method to set the configuration once
     * setConfig
     *
     * @param {Object} cfg configuration object
     */
 
 
    DOMPurify.setConfig = function (cfg) {
      _parseConfig(cfg);
 
      SET_CONFIG = true;
    };
    /**
     * Public method to remove the configuration
     * clearConfig
     *
     */
 
 
    DOMPurify.clearConfig = function () {
      CONFIG = null;
      SET_CONFIG = false;
    };
    /**
     * Public method to check if an attribute value is valid.
     * Uses last set config, if any. Otherwise, uses config defaults.
     * isValidAttribute
     *
     * @param  {string} tag Tag name of containing element.
     * @param  {string} attr Attribute name.
     * @param  {string} value Attribute value.
     * @return {Boolean} Returns true if `value` is valid. Otherwise, returns false.
     */
 
 
    DOMPurify.isValidAttribute = function (tag, attr, value) {
      /* Initialize shared config vars if necessary. */
      if (!CONFIG) {
        _parseConfig({});
      }
 
      var lcTag = transformCaseFunc(tag);
      var lcName = transformCaseFunc(attr);
      return _isValidAttribute(lcTag, lcName, value);
    };
    /**
     * AddHook
     * Public method to add DOMPurify hooks
     *
     * @param {String} entryPoint entry point for the hook to add
     * @param {Function} hookFunction function to execute
     */
 
 
    DOMPurify.addHook = function (entryPoint, hookFunction) {
      if (typeof hookFunction !== 'function') {
        return;
      }
 
      hooks[entryPoint] = hooks[entryPoint] || [];
      arrayPush(hooks[entryPoint], hookFunction);
    };
    /**
     * RemoveHook
     * Public method to remove a DOMPurify hook at a given entryPoint
     * (pops it from the stack of hooks if more are present)
     *
     * @param {String} entryPoint entry point for the hook to remove
     * @return {Function} removed(popped) hook
     */
 
 
    DOMPurify.removeHook = function (entryPoint) {
      if (hooks[entryPoint]) {
        return arrayPop(hooks[entryPoint]);
      }
    };
    /**
     * RemoveHooks
     * Public method to remove all DOMPurify hooks at a given entryPoint
     *
     * @param  {String} entryPoint entry point for the hooks to remove
     */
 
 
    DOMPurify.removeHooks = function (entryPoint) {
      if (hooks[entryPoint]) {
        hooks[entryPoint] = [];
      }
    };
    /**
     * RemoveAllHooks
     * Public method to remove all DOMPurify hooks
     *
     */
 
 
    DOMPurify.removeAllHooks = function () {
      hooks = {};
    };
 
    return DOMPurify;
  }
 
  var purify = createDOMPurify();
 
  return purify;
 
}));
//# sourceMappingURL=purify.js.map
 
 
/***/ }),
/* 1552 */
/***/ (function(module, exports) {
 
// empty (null-loader)
 
/***/ }),
/* 1553 */
/***/ (function(module, exports, __webpack_require__) {
 
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
 * Created by olamothe on 2016-05-16.
 */
/*! jQuery v1.9.1 | (c) 2005, 2012 jQuery Foundation, Inc. | jquery.org/license
 
 */ (function(e, t) {
  var n,
    r,
    i = typeof t,
    o = e.document,
    a = e.location,
    s = e.jQuery,
    u = e.$,
    l = {},
    c = [],
    p = '1.9.1',
    f = c.concat,
    d = c.push,
    h = c.slice,
    g = c.indexOf,
    m = l.toString,
    y = l.hasOwnProperty,
    v = p.trim,
    b = function(e, t) {
      return new b.fn.init(e, t, r);
    },
    x = /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,
    w = /\S+/g,
    T = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,
    N = /^(?:(<[\w\W]+>)[^>]*|#([\w-]*))$/,
    C = /^<(\w+)\s*\/?>(?:<\/\1>|)$/,
    k = /^[\],:{}\s]*$/,
    E = /(?:^|:|,)(?:\s*\[)+/g,
    S = /\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,
    A = /"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,
    j = /^-ms-/,
    D = /-([\da-z])/gi,
    L = function(e, t) {
      return t.toUpperCase();
    },
    H = function(e) {
      (o.addEventListener || 'load' === e.type || 'complete' === o.readyState) && (q(), b.ready());
    },
    q = function() {
      o.addEventListener
        ? (o.removeEventListener('DOMContentLoaded', H, !1), e.removeEventListener('load', H, !1))
        : (o.off('onreadystatechange', H), e.detachEvent('onload', H));
    };
  (b.fn = b.prototype = {
    jquery: p,
    constructor: b,
    init: function(e, n, r) {
      var i, a;
      Iif (!e) return this;
      if ('string' == typeof e) {
        Iif (
          ((i = '<' === e.charAt(0) && '>' === e.charAt(e.length - 1) && e.length >= 3 ? [null, e, null] : N.exec(e)), !i || (!i[1] && n))
        )
          return !n || n.jquery ? (n || r).find(e) : this.constructor(n).find(e);
        Eif (i[1]) {
          Iif (
            ((n = n instanceof b ? n[0] : n),
            b.merge(this, b.parseHTML(i[1], n && n.nodeType ? n.ownerDocument || n : o, !0)),
            C.test(i[1]) && b.isPlainObject(n))
          )
            for (i in n) b.isFunction(this[i]) ? this[i](n[i]) : this.attr(i, n[i]);
          return this;
        }
        if (((a = o.getElementById(i[2])), a && a.parentNode)) {
          if (a.id !== i[2]) return r.find(e);
          (this.length = 1), (this[0] = a);
        }
        return (this.context = o), (this.selector = e), this;
      }
      return e.nodeType
        ? ((this.context = this[0] = e), (this.length = 1), this)
        : b.isFunction(e)
          ? r.ready(e)
          : (e.selector !== t && ((this.selector = e.selector), (this.context = e.context)), b.makeArray(e, this));
    },
    selector: '',
    length: 0,
    size: function() {
      return this.length;
    },
    toArray: function() {
      return h.call(this);
    },
    get: function(e) {
      return null == e ? this.toArray() : 0 > e ? this[this.length + e] : this[e];
    },
    pushStack: function(e) {
      var t = b.merge(this.constructor(), e);
      return (t.prevObject = this), (t.context = this.context), t;
    },
    each: function(e, t) {
      return b.each(this, e, t);
    },
    ready: function(e) {
      return b.ready.promise().done(e), this;
    },
    slice: function() {
      return this.pushStack(h.apply(this, arguments));
    },
    first: function() {
      return this.eq(0);
    },
    last: function() {
      return this.eq(-1);
    },
    eq: function(e) {
      var t = this.length,
        n = +e + (0 > e ? t : 0);
      return this.pushStack(n >= 0 && t > n ? [this[n]] : []);
    },
    map: function(e) {
      return this.pushStack(
        b.map(this, function(t, n) {
          return e.call(t, n, t);
        })
      );
    },
    end: function() {
      return this.prevObject || this.constructor(null);
    },
    push: d,
    sort: [].sort,
    splice: [].splice
  }),
    (b.fn.init.prototype = b.fn),
    (b.extend = b.fn.extend = function() {
      var e,
        n,
        r,
        i,
        o,
        a,
        s = arguments[0] || {},
        u = 1,
        l = arguments.length,
        c = !1;
      for (
        'boolean' == typeof s && ((c = s), (s = arguments[1] || {}), (u = 2)),
          'object' == typeof s || b.isFunction(s) || (s = {}),
          l === u && ((s = this), --u);
        l > u;
        u++
      )
        if (null != (o = arguments[u]))
          for (i in o)
            (e = s[i]),
              (r = o[i]),
              s !== r &&
                (c && r && (b.isPlainObject(r) || (n = b.isArray(r)))
                  ? (n ? ((n = !1), (a = e && b.isArray(e) ? e : [])) : (a = e && b.isPlainObject(e) ? e : {}), (s[i] = b.extend(c, a, r)))
                  : r !== t && (s[i] = r));
      return s;
    }),
    b.extend({
      noConflict: function(t) {
        return e.$ === b && (e.$ = u), t && e.jQuery === b && (e.jQuery = s), b;
      },
      isReady: !1,
      readyWait: 1,
      holdReady: function(e) {
        e ? b.readyWait++ : b.ready(!0);
      },
      ready: function(e) {
        Eif (e === !0 ? !--b.readyWait : !b.isReady) {
          Iif (!o.body) return setTimeout(b.ready);
          (b.isReady = !0),
            (e !== !0 && --b.readyWait > 0) ||
              (n.resolveWith(o, [b]),
              b.fn.trigger &&
                b(o)
                  .trigger('ready')
                  .off('ready'));
        }
      },
      isFunction: function(e) {
        return 'function' === b.type(e);
      },
      isArray:
        Array.isArray ||
        function(e) {
          return 'array' === b.type(e);
        },
      isWindow: function(e) {
        return null != e && e == e.window;
      },
      isNumeric: function(e) {
        return !isNaN(parseFloat(e)) && isFinite(e);
      },
      type: function(e) {
        return null == e ? e + '' : 'object' == typeof e || 'function' == typeof e ? l[m.call(e)] || 'object' : typeof e;
      },
      isPlainObject: function(e) {
        if (!e || 'object' !== b.type(e) || e.nodeType || b.isWindow(e)) return !1;
        try {
          Iif (e.constructor && !y.call(e, 'constructor') && !y.call(e.constructor.prototype, 'isPrototypeOf')) return !1;
        } catch (n) {
          return !1;
        }
        var r;
        for (r in e);
        return r === t || y.call(e, r);
      },
      isEmptyObject: function(e) {
        var t;
        for (t in e) return !1;
        return !0;
      },
      error: function(e) {
        throw Error(e);
      },
      parseHTML: function(e, t, n) {
        Iif (!e || 'string' != typeof e) return null;
        'boolean' == typeof t && ((n = t), (t = !1)), (t = t || o);
        var r = C.exec(e),
          i = !n && [];
        return r ? [t.createElement(r[1])] : ((r = b.buildFragment([e], t, i)), i && b(i).remove(), b.merge([], r.childNodes));
      },
      parseJSON: function(n) {
        return e.JSON && e.JSON.parse
          ? e.JSON.parse(n)
          : null === n
            ? n
            : 'string' == typeof n &&
              ((n = b.trim(n)),
              n &&
                k.test(
                  n
                    .replace(S, '@')
                    .replace(A, ']')
                    .replace(E, '')
                ))
              ? Function('return ' + n)()
              : (b.error('Invalid JSON: ' + n), t);
      },
      parseXML: function(n) {
        var r, i;
        if (!n || 'string' != typeof n) return null;
        try {
          e.DOMParser
            ? ((i = new DOMParser()), (r = i.parseFromString(n, 'text/xml')))
            : ((r = new ActiveXObject('Microsoft.XMLDOM')), (r.async = 'false'), r.loadXML(n));
        } catch (o) {
          r = t;
        }
        return (r && r.documentElement && !r.getElementsByTagName('parsererror').length) || b.error('Invalid XML: ' + n), r;
      },
      noop: function() {},
      globalEval: function(t) {
        t &&
          b.trim(t) &&
          (e.execScript ||
            function(t) {
              e.eval.call(e, t);
            })(t);
      },
      camelCase: function(e) {
        return e.replace(j, 'ms-').replace(D, L);
      },
      nodeName: function(e, t) {
        return e.nodeName && e.nodeName.toLowerCase() === t.toLowerCase();
      },
      each: function(e, t, n) {
        var r,
          i = 0,
          o = e.length,
          a = M(e);
        Iif (n) {
          if (a) {
            for (; o > i; i++) if (((r = t.apply(e[i], n)), r === !1)) break;
          } else for (i in e) if (((r = t.apply(e[i], n)), r === !1)) break;
        } else if (a) {
          for (; o > i; i++) Iif (((r = t.call(e[i], i, e[i])), r === !1)) break;
        } else for (i in e) Iif (((r = t.call(e[i], i, e[i])), r === !1)) break;
        return e;
      },
      trim:
        v && !v.call('\ufeff\u00a0')
          ? function(e) {
              return null == e ? '' : v.call(e);
            }
          : function(e) {
              return null == e ? '' : (e + '').replace(T, '');
            },
      makeArray: function(e, t) {
        var n = t || [];
        return null != e && (M(Object(e)) ? b.merge(n, 'string' == typeof e ? [e] : e) : d.call(n, e)), n;
      },
      inArray: function(e, t, n) {
        var r;
        if (t) {
          if (g) return g.call(t, e, n);
          for (r = t.length, n = n ? (0 > n ? Math.max(0, r + n) : n) : 0; r > n; n++) if (n in t && t[n] === e) return n;
        }
        return -1;
      },
      merge: function(e, n) {
        var r = n.length,
          i = e.length,
          o = 0;
        Eif ('number' == typeof r) for (; r > o; o++) e[i++] = n[o];
        else while (n[o] !== t) e[i++] = n[o++];
        return (e.length = i), e;
      },
      grep: function(e, t, n) {
        var r,
          i = [],
          o = 0,
          a = e.length;
        for (n = !!n; a > o; o++) (r = !!t(e[o], o)), n !== r && i.push(e[o]);
        return i;
      },
      map: function(e, t, n) {
        var r,
          i = 0,
          o = e.length,
          a = M(e),
          s = [];
        if (a) for (; o > i; i++) (r = t(e[i], i, n)), null != r && (s[s.length] = r);
        else for (i in e) (r = t(e[i], i, n)), null != r && (s[s.length] = r);
        return f.apply([], s);
      },
      guid: 1,
      proxy: function(e, n) {
        var r, i, o;
        return (
          'string' == typeof n && ((o = e[n]), (n = e), (e = o)),
          b.isFunction(e)
            ? ((r = h.call(arguments, 2)),
              (i = function() {
                return e.apply(n || this, r.concat(h.call(arguments)));
              }),
              (i.guid = e.guid = e.guid || b.guid++),
              i)
            : t
        );
      },
      access: function(e, n, r, i, o, a, s) {
        var u = 0,
          l = e.length,
          c = null == r;
        if ('object' === b.type(r)) {
          o = !0;
          for (u in r) b.access(e, n, u, r[u], !0, a, s);
        } else if (
          i !== t &&
          ((o = !0),
          b.isFunction(i) || (s = !0),
          c &&
            (s
              ? (n.call(e, i), (n = null))
              : ((c = n),
                (n = function(e, t, n) {
                  return c.call(b(e), n);
                }))),
          n)
        )
          for (; l > u; u++) n(e[u], r, s ? i : i.call(e[u], u, n(e[u], r)));
        return o ? e : c ? n.call(e) : l ? n(e[0], r) : a;
      },
      now: function() {
        return new Date().getTime();
      }
    }),
    (b.ready.promise = function(t) {
      if (!n)
        Iif (((n = b.Deferred()), 'complete' === o.readyState)) setTimeout(b.ready);
        else Eif (o.addEventListener) o.addEventListener('DOMContentLoaded', H, !1), e.addEventListener('load', H, !1);
        else {
          o.on('onreadystatechange', H), e.attachEvent('onload', H);
          var r = !1;
          try {
            r = null == e.frameElement && o.documentElement;
          } catch (i) {}
          r &&
            r.doScroll &&
            (function a() {
              if (!b.isReady) {
                try {
                  r.doScroll('left');
                } catch (e) {
                  return setTimeout(a, 50);
                }
                q(), b.ready();
              }
            })();
        }
      return n.promise(t);
    }),
    b.each('Boolean Number String Function Array Date RegExp Object Error'.split(' '), function(e, t) {
      l['[object ' + t + ']'] = t.toLowerCase();
    });
  function M(e) {
    var t = e.length,
      n = b.type(e);
    return b.isWindow(e)
      ? !1
      : 1 === e.nodeType && t ? !0 : 'array' === n || ('function' !== n && (0 === t || ('number' == typeof t && t > 0 && t - 1 in e)));
  }
  r = b(o);
  var _ = {};
  function F(e) {
    var t = (_[e] = {});
    return (
      b.each(e.match(w) || [], function(e, n) {
        t[n] = !0;
      }),
      t
    );
  }
  (b.Callbacks = function(e) {
    e = 'string' == typeof e ? _[e] || F(e) : b.extend({}, e);
    var n,
      r,
      i,
      o,
      a,
      s,
      u = [],
      l = !e.once && [],
      c = function(t) {
        for (r = e.memory && t, i = !0, a = s || 0, s = 0, o = u.length, n = !0; u && o > a; a++)
          Iif (u[a].apply(t[0], t[1]) === !1 && e.stopOnFalse) {
            r = !1;
            break;
          }
        (n = !1), u && (l ? l.length && c(l.shift()) : r ? (u = []) : p.disable());
      },
      p = {
        add: function() {
          Eif (u) {
            var t = u.length;
            (function i(t) {
              b.each(t, function(t, n) {
                var r = b.type(n);
                'function' === r ? (e.unique && p.has(n)) || u.push(n) : n && n.length && 'string' !== r && i(n);
              });
            })(arguments),
              n ? (o = u.length) : r && ((s = t), c(r));
          }
          return this;
        },
        remove: function() {
          return (
            u &&
              b.each(arguments, function(e, t) {
                var r;
                while ((r = b.inArray(t, u, r)) > -1) u.splice(r, 1), n && (o >= r && o--, a >= r && a--);
              }),
            this
          );
        },
        has: function(e) {
          return e ? b.inArray(e, u) > -1 : !(!u || !u.length);
        },
        empty: function() {
          return (u = []), this;
        },
        disable: function() {
          return (u = l = r = t), this;
        },
        disabled: function() {
          return !u;
        },
        lock: function() {
          return (l = t), r || p.disable(), this;
        },
        locked: function() {
          return !l;
        },
        fireWith: function(e, t) {
          return (t = t || []), (t = [e, t.slice ? t.slice() : t]), !u || (i && !l) || (n ? l.push(t) : c(t)), this;
        },
        fire: function() {
          return p.fireWith(this, arguments), this;
        },
        fired: function() {
          return !!i;
        }
      };
    return p;
  }),
    b.extend({
      Deferred: function(e) {
        var t = [
            ['resolve', 'done', b.Callbacks('once memory'), 'resolved'],
            ['reject', 'fail', b.Callbacks('once memory'), 'rejected'],
            ['notify', 'progress', b.Callbacks('memory')]
          ],
          n = 'pending',
          r = {
            state: function() {
              return n;
            },
            always: function() {
              return i.done(arguments).fail(arguments), this;
            },
            then: function() {
              var e = arguments;
              return b
                .Deferred(function(n) {
                  b.each(t, function(t, o) {
                    var a = o[0],
                      s = b.isFunction(e[t]) && e[t];
                    i[o[1]](function() {
                      var e = s && s.apply(this, arguments);
                      e && b.isFunction(e.promise)
                        ? e
                            .promise()
                            .done(n.resolve)
                            .fail(n.reject)
                            .progress(n.notify)
                        : n[a + 'With'](this === r ? n.promise() : this, s ? [e] : arguments);
                    });
                  }),
                    (e = null);
                })
                .promise();
            },
            promise: function(e) {
              return null != e ? b.extend(e, r) : r;
            }
          },
          i = {};
        return (
          (r.pipe = r.then),
          b.each(t, function(e, o) {
            var a = o[2],
              s = o[3];
            (r[o[1]] = a.add),
              s &&
                a.add(
                  function() {
                    n = s;
                  },
                  t[1 ^ e][2].disable,
                  t[2][2].lock
                ),
              (i[o[0]] = function() {
                return i[o[0] + 'With'](this === i ? r : this, arguments), this;
              }),
              (i[o[0] + 'With'] = a.fireWith);
          }),
          r.promise(i),
          e && e.call(i, i),
          i
        );
      },
      when: function(e) {
        var t = 0,
          n = h.call(arguments),
          r = n.length,
          i = 1 !== r || (e && b.isFunction(e.promise)) ? r : 0,
          o = 1 === i ? e : b.Deferred(),
          a = function(e, t, n) {
            return function(r) {
              (t[e] = this),
                (n[e] = arguments.length > 1 ? h.call(arguments) : r),
                n === s ? o.notifyWith(t, n) : --i || o.resolveWith(t, n);
            };
          },
          s,
          u,
          l;
        if (r > 1)
          for (s = Array(r), u = Array(r), l = Array(r); r > t; t++)
            n[t] && b.isFunction(n[t].promise)
              ? n[t]
                  .promise()
                  .done(a(t, l, n))
                  .fail(o.reject)
                  .progress(a(t, u, s))
              : --i;
        return i || o.resolveWith(l, n), o.promise();
      }
    }),
    (b.support = (function() {
      var t,
        n,
        r,
        a,
        s,
        u,
        l,
        c,
        p,
        f,
        d = o.createElement('div');
      Iif (
        (d.setAttribute('className', 't'),
        (d.innerHTML = "  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>"),
        (n = d.getElementsByTagName('*')),
        (r = d.getElementsByTagName('a')[0]),
        !n || !r || !n.length)
      )
        return {};
      (s = o.createElement('select')),
        (l = s.appendChild(o.createElement('option'))),
        (a = d.getElementsByTagName('input')[0]),
        (r.style.cssText = 'top:1px;float:left;opacity:.5'),
        (t = {
          getSetAttribute: 't' !== d.className,
          leadingWhitespace: 3 === d.firstChild.nodeType,
          tbody: !d.getElementsByTagName('tbody').length,
          htmlSerialize: !!d.getElementsByTagName('link').length,
          style: /top/.test(r.getAttribute('style')),
          hrefNormalized: '/a' === r.getAttribute('href'),
          opacity: /^0.5/.test(r.style.opacity),
          cssFloat: !!r.style.cssFloat,
          checkOn: !!a.value,
          optSelected: l.selected,
          enctype: !!o.createElement('form').enctype,
          html5Clone: '<:nav></:nav>' !== o.createElement('nav').cloneNode(!0).outerHTML,
          boxModel: 'CSS1Compat' === o.compatMode,
          deleteExpando: !0,
          noCloneEvent: !0,
          inlineBlockNeedsLayout: !1,
          shrinkWrapBlocks: !1,
          reliableMarginRight: !0,
          boxSizingReliable: !0,
          pixelPosition: !1
        }),
        (a.checked = !0),
        (t.noCloneChecked = a.cloneNode(!0).checked),
        (s.disabled = !0),
        (t.optDisabled = !l.disabled);
      try {
        delete d.test;
      } catch (h) {
        t.deleteExpando = !1;
      }
      (a = o.createElement('input')),
        a.setAttribute('value', ''),
        (t.input = '' === a.getAttribute('value')),
        (a.value = 't'),
        a.setAttribute('type', 'radio'),
        (t.radioValue = 't' === a.value),
        a.setAttribute('checked', 't'),
        a.setAttribute('name', 't'),
        (u = o.createDocumentFragment()),
        u.appendChild(a),
        (t.appendChecked = a.checked),
        (t.checkClone = u.cloneNode(!0).cloneNode(!0).lastChild.checked),
        d.on &&
          (d.on('onclick', function() {
            t.noCloneEvent = !1;
          }),
          d.cloneNode(!0).click());
      for (f in { submit: !0, change: !0, focusin: !0 })
        d.setAttribute((c = 'on' + f), 't'), (t[f + 'Bubbles'] = c in e || d.attributes[c].expando === !1);
      return (
        (d.style.backgroundClip = 'content-box'),
        (d.cloneNode(!0).style.backgroundClip = ''),
        (t.clearCloneStyle = 'content-box' === d.style.backgroundClip),
        b(function() {
          var n,
            r,
            a,
            s =
              'padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;',
            u = o.getElementsByTagName('body')[0];
          u &&
            ((n = o.createElement('div')),
            (n.style.cssText = 'border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px'),
            u.appendChild(n).appendChild(d),
            (d.innerHTML = '<table><tr><td></td><td>t</td></tr></table>'),
            (a = d.getElementsByTagName('td')),
            (a[0].style.cssText = 'padding:0;margin:0;border:0;display:none'),
            (p = 0 === a[0].offsetHeight),
            (a[0].style.display = ''),
            (a[1].style.display = 'none'),
            (t.reliableHiddenOffsets = p && 0 === a[0].offsetHeight),
            (d.innerHTML = ''),
            (d.style.cssText =
              'box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;'),
            (t.boxSizing = 4 === d.offsetWidth),
            (t.doesNotIncludeMarginInBodyOffset = 1 !== u.offsetTop),
            e.getComputedStyle &&
              ((t.pixelPosition = '1%' !== (e.getComputedStyle(d, null) || {}).top),
              (t.boxSizingReliable = '4px' === (e.getComputedStyle(d, null) || { width: '4px' }).width),
              (r = d.appendChild(o.createElement('div'))),
              (r.style.cssText = d.style.cssText = s),
              (r.style.marginRight = r.style.width = '0'),
              (d.style.width = '1px'),
              (t.reliableMarginRight = !parseFloat((e.getComputedStyle(r, null) || {}).marginRight))),
            typeof d.style.zoom !== i &&
              ((d.innerHTML = ''),
              (d.style.cssText = s + 'width:1px;padding:1px;display:inline;zoom:1'),
              (t.inlineBlockNeedsLayout = 3 === d.offsetWidth),
              (d.style.display = 'block'),
              (d.innerHTML = '<div></div>'),
              (d.firstChild.style.width = '5px'),
              (t.shrinkWrapBlocks = 3 !== d.offsetWidth),
              t.inlineBlockNeedsLayout && (u.style.zoom = 1)),
            u.removeChild(n),
            (n = d = a = r = null));
        }),
        (n = s = u = l = r = a = null),
        t
      );
    })());
  var O = /(?:\{[\s\S]*\}|\[[\s\S]*\])$/,
    B = /([A-Z])/g;
  function P(e, n, r, i) {
    Eif (b.acceptData(e)) {
      var o,
        a,
        s = b.expando,
        u = 'string' == typeof n,
        l = e.nodeType,
        p = l ? b.cache : e,
        f = l ? e[s] : e[s] && s;
      if ((f && p[f] && (i || p[f].data)) || !u || r !== t)
        return (
          f || (l ? (e[s] = f = c.pop() || b.guid++) : (f = s)),
          p[f] || ((p[f] = {}), l || (p[f].toJSON = b.noop)),
          ('object' == typeof n || 'function' == typeof n) && (i ? (p[f] = b.extend(p[f], n)) : (p[f].data = b.extend(p[f].data, n))),
          (o = p[f]),
          i || (o.data || (o.data = {}), (o = o.data)),
          r !== t && (o[b.camelCase(n)] = r),
          u ? ((a = o[n]), null == a && (a = o[b.camelCase(n)])) : (a = o),
          a
        );
    }
  }
  function R(e, t, n) {
    Eif (b.acceptData(e)) {
      var r,
        i,
        o,
        a = e.nodeType,
        s = a ? b.cache : e,
        u = a ? e[b.expando] : b.expando;
      Eif (s[u]) {
        Eif (t && (o = n ? s[u] : s[u].data)) {
          b.isArray(t)
            ? (t = t.concat(b.map(t, b.camelCase)))
            : t in o ? (t = [t]) : ((t = b.camelCase(t)), (t = t in o ? [t] : t.split(' ')));
          for (r = 0, i = t.length; i > r; r++) delete o[t[r]];
          Iif (!(n ? $ : b.isEmptyObject)(o)) return;
        }
        (n || (delete s[u].data, $(s[u]))) &&
          (a ? b.cleanData([e], !0) : b.support.deleteExpando || s != s.window ? delete s[u] : (s[u] = null));
      }
    }
  }
  b.extend({
    cache: {},
    expando: 'jQuery' + (p + Math.random()).replace(/\D/g, ''),
    noData: { embed: !0, object: 'clsid:D27CDB6E-AE6D-11cf-96B8-444553540000', applet: !0 },
    hasData: function(e) {
      return (e = e.nodeType ? b.cache[e[b.expando]] : e[b.expando]), !!e && !$(e);
    },
    data: function(e, t, n) {
      return P(e, t, n);
    },
    removeData: function(e, t) {
      return R(e, t);
    },
    _data: function(e, t, n) {
      return P(e, t, n, !0);
    },
    _removeData: function(e, t) {
      return R(e, t, !0);
    },
    acceptData: function(e) {
      Iif (e.nodeType && 1 !== e.nodeType && 9 !== e.nodeType) return !1;
      var t = e.nodeName && b.noData[e.nodeName.toLowerCase()];
      return !t || (t !== !0 && e.getAttribute('classid') === t);
    }
  }),
    b.fn.extend({
      data: function(e, n) {
        var r,
          i,
          o = this[0],
          a = 0,
          s = null;
        if (e === t) {
          Eif (this.length && ((s = b.data(o)), 1 === o.nodeType && !b._data(o, 'parsedAttrs'))) {
            for (r = o.attributes; r.length > a; a++) (i = r[a].name), i.indexOf('data-') || ((i = b.camelCase(i.slice(5))), W(o, i, s[i]));
            b._data(o, 'parsedAttrs', !0);
          }
          return s;
        }
        return 'object' == typeof e
          ? this.each(function() {
              b.data(this, e);
            })
          : b.access(
              this,
              function(n) {
                return n === t
                  ? o ? W(o, e, b.data(o, e)) : null
                  : (this.each(function() {
                      b.data(this, e, n);
                    }),
                    t);
              },
              null,
              n,
              arguments.length > 1,
              null,
              !0
            );
      },
      removeData: function(e) {
        return this.each(function() {
          b.removeData(this, e);
        });
      }
    });
  function W(e, n, r) {
    if (r === t && 1 === e.nodeType) {
      var i = 'data-' + n.replace(B, '-$1').toLowerCase();
      if (((r = e.getAttribute(i)), 'string' == typeof r)) {
        try {
          r = 'true' === r ? !0 : 'false' === r ? !1 : 'null' === r ? null : +r + '' === r ? +r : O.test(r) ? b.parseJSON(r) : r;
        } catch (o) {}
        b.data(e, n, r);
      } else r = t;
    }
    return r;
  }
  function $(e) {
    var t;
    for (t in e) Eif (('data' !== t || !b.isEmptyObject(e[t])) && 'toJSON' !== t) return !1;
    return !0;
  }
  b.extend({
    queue: function(e, n, r) {
      var i;
      return e
        ? ((n = (n || 'fx') + 'queue'),
          (i = b._data(e, n)),
          r && (!i || b.isArray(r) ? (i = b._data(e, n, b.makeArray(r))) : i.push(r)),
          i || [])
        : t;
    },
    dequeue: function(e, t) {
      t = t || 'fx';
      var n = b.queue(e, t),
        r = n.length,
        i = n.shift(),
        o = b._queueHooks(e, t),
        a = function() {
          b.dequeue(e, t);
        };
      'inprogress' === i && ((i = n.shift()), r--),
        (o.cur = i),
        i && ('fx' === t && n.unshift('inprogress'), delete o.stop, i.call(e, a, o)),
        !r && o && o.empty.fire();
    },
    _queueHooks: function(e, t) {
      var n = t + 'queueHooks';
      return (
        b._data(e, n) ||
        b._data(e, n, {
          empty: b.Callbacks('once memory').add(function() {
            b._removeData(e, t + 'queue'), b._removeData(e, n);
          })
        })
      );
    }
  }),
    b.fn.extend({
      queue: function(e, n) {
        var r = 2;
        return (
          'string' != typeof e && ((n = e), (e = 'fx'), r--),
          r > arguments.length
            ? b.queue(this[0], e)
            : n === t
              ? this
              : this.each(function() {
                  var t = b.queue(this, e, n);
                  b._queueHooks(this, e), 'fx' === e && 'inprogress' !== t[0] && b.dequeue(this, e);
                })
        );
      },
      dequeue: function(e) {
        return this.each(function() {
          b.dequeue(this, e);
        });
      },
      delay: function(e, t) {
        return (
          (e = b.fx ? b.fx.speeds[e] || e : e),
          (t = t || 'fx'),
          this.queue(t, function(t, n) {
            var r = setTimeout(t, e);
            n.stop = function() {
              clearTimeout(r);
            };
          })
        );
      },
      clearQueue: function(e) {
        return this.queue(e || 'fx', []);
      },
      promise: function(e, n) {
        var r,
          i = 1,
          o = b.Deferred(),
          a = this,
          s = this.length,
          u = function() {
            --i || o.resolveWith(a, [a]);
          };
        'string' != typeof e && ((n = e), (e = t)), (e = e || 'fx');
        while (s--) (r = b._data(a[s], e + 'queueHooks')), r && r.empty && (i++, r.empty.add(u));
        return u(), o.promise(n);
      }
    });
  var I,
    z,
    X = /[\t\r\n]/g,
    U = /\r/g,
    V = /^(?:input|select|textarea|button|object)$/i,
    Y = /^(?:a|area)$/i,
    J = /^(?:checked|selected|autofocus|autoplay|async|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped)$/i,
    G = /^(?:checked|selected)$/i,
    Q = b.support.getSetAttribute,
    K = b.support.input;
  b.fn.extend({
    attr: function(e, t) {
      return b.access(this, b.attr, e, t, arguments.length > 1);
    },
    removeAttr: function(e) {
      return this.each(function() {
        b.removeAttr(this, e);
      });
    },
    prop: function(e, t) {
      return b.access(this, b.prop, e, t, arguments.length > 1);
    },
    removeProp: function(e) {
      return (
        (e = b.propFix[e] || e),
        this.each(function() {
          try {
            (this[e] = t), delete this[e];
          } catch (n) {}
        })
      );
    },
    addClass: function(e) {
      var t,
        n,
        r,
        i,
        o,
        a = 0,
        s = this.length,
        u = 'string' == typeof e && e;
      if (b.isFunction(e))
        return this.each(function(t) {
          b(this).addClass(e.call(this, t, this.className));
        });
      if (u)
        for (t = (e || '').match(w) || []; s > a; a++)
          if (((n = this[a]), (r = 1 === n.nodeType && (n.className ? (' ' + n.className + ' ').replace(X, ' ') : ' ')))) {
            o = 0;
            while ((i = t[o++])) 0 > r.indexOf(' ' + i + ' ') && (r += i + ' ');
            n.className = b.trim(r);
          }
      return this;
    },
    removeClass: function(e) {
      var t,
        n,
        r,
        i,
        o,
        a = 0,
        s = this.length,
        u = 0 === arguments.length || ('string' == typeof e && e);
      if (b.isFunction(e))
        return this.each(function(t) {
          b(this).removeClass(e.call(this, t, this.className));
        });
      if (u)
        for (t = (e || '').match(w) || []; s > a; a++)
          if (((n = this[a]), (r = 1 === n.nodeType && (n.className ? (' ' + n.className + ' ').replace(X, ' ') : '')))) {
            o = 0;
            while ((i = t[o++])) while (r.indexOf(' ' + i + ' ') >= 0) r = r.replace(' ' + i + ' ', ' ');
            n.className = e ? b.trim(r) : '';
          }
      return this;
    },
    toggleClass: function(e, t) {
      var n = typeof e,
        r = 'boolean' == typeof t;
      return b.isFunction(e)
        ? this.each(function(n) {
            b(this).toggleClass(e.call(this, n, this.className, t), t);
          })
        : this.each(function() {
            if ('string' === n) {
              var o,
                a = 0,
                s = b(this),
                u = t,
                l = e.match(w) || [];
              while ((o = l[a++])) (u = r ? u : !s.hasClass(o)), s[u ? 'addClass' : 'removeClass'](o);
            } else (n === i || 'boolean' === n) && (this.className && b._data(this, '__className__', this.className), (this.className = this.className || e === !1 ? '' : b._data(this, '__className__') || ''));
          });
    },
    hasClass: function(e) {
      var t = ' ' + e + ' ',
        n = 0,
        r = this.length;
      for (; r > n; n++) if (1 === this[n].nodeType && (' ' + this[n].className + ' ').replace(X, ' ').indexOf(t) >= 0) return !0;
      return !1;
    },
    val: function(e) {
      var n,
        r,
        i,
        o = this[0];
      {
        if (arguments.length)
          return (
            (i = b.isFunction(e)),
            this.each(function(n) {
              var o,
                a = b(this);
              1 === this.nodeType &&
                ((o = i ? e.call(this, n, a.val()) : e),
                null == o
                  ? (o = '')
                  : 'number' == typeof o
                    ? (o += '')
                    : b.isArray(o) &&
                      (o = b.map(o, function(e) {
                        return null == e ? '' : e + '';
                      })),
                (r = b.valHooks[this.type] || b.valHooks[this.nodeName.toLowerCase()]),
                (r && 'set' in r && r.set(this, o, 'value') !== t) || (this.value = o));
            })
          );
        if (o)
          return (
            (r = b.valHooks[o.type] || b.valHooks[o.nodeName.toLowerCase()]),
            r && 'get' in r && (n = r.get(o, 'value')) !== t
              ? n
              : ((n = o.value), 'string' == typeof n ? n.replace(U, '') : null == n ? '' : n)
          );
      }
    }
  }),
    b.extend({
      valHooks: {
        option: {
          get: function(e) {
            var t = e.attributes.value;
            return !t || t.specified ? e.value : e.text;
          }
        },
        select: {
          get: function(e) {
            var t,
              n,
              r = e.options,
              i = e.selectedIndex,
              o = 'select-one' === e.type || 0 > i,
              a = o ? null : [],
              s = o ? i + 1 : r.length,
              u = 0 > i ? s : o ? i : 0;
            for (; s > u; u++)
              if (
                ((n = r[u]),
                !(
                  (!n.selected && u !== i) ||
                  (b.support.optDisabled ? n.disabled : null !== n.getAttribute('disabled')) ||
                  (n.parentNode.disabled && b.nodeName(n.parentNode, 'optgroup'))
                ))
              ) {
                if (((t = b(n).val()), o)) return t;
                a.push(t);
              }
            return a;
          },
          set: function(e, t) {
            var n = b.makeArray(t);
            return (
              b(e)
                .find('option')
                .each(function() {
                  this.selected = b.inArray(b(this).val(), n) >= 0;
                }),
              n.length || (e.selectedIndex = -1),
              n
            );
          }
        }
      },
      attr: function(e, n, r) {
        var o,
          a,
          s,
          u = e.nodeType;
        if (e && 3 !== u && 8 !== u && 2 !== u)
          return typeof e.getAttribute === i
            ? b.prop(e, n, r)
            : ((a = 1 !== u || !b.isXMLDoc(e)),
              a && ((n = n.toLowerCase()), (o = b.attrHooks[n] || (J.test(n) ? z : I))),
              r === t
                ? o && a && 'get' in o && null !== (s = o.get(e, n))
                  ? s
                  : (typeof e.getAttribute !== i && (s = e.getAttribute(n)), null == s ? t : s)
                : null !== r
                  ? o && a && 'set' in o && (s = o.set(e, r, n)) !== t ? s : (e.setAttribute(n, r + ''), r)
                  : (b.removeAttr(e, n), t));
      },
      removeAttr: function(e, t) {
        var n,
          r,
          i = 0,
          o = t && t.match(w);
        if (o && 1 === e.nodeType)
          while ((n = o[i++]))
            (r = b.propFix[n] || n),
              J.test(n) ? (!Q && G.test(n) ? (e[b.camelCase('default-' + n)] = e[r] = !1) : (e[r] = !1)) : b.attr(e, n, ''),
              e.removeAttribute(Q ? n : r);
      },
      attrHooks: {
        type: {
          set: function(e, t) {
            if (!b.support.radioValue && 'radio' === t && b.nodeName(e, 'input')) {
              var n = e.value;
              return e.setAttribute('type', t), n && (e.value = n), t;
            }
          }
        }
      },
      propFix: {
        tabindex: 'tabIndex',
        readonly: 'readOnly',
        for: 'htmlFor',
        class: 'className',
        maxlength: 'maxLength',
        cellspacing: 'cellSpacing',
        cellpadding: 'cellPadding',
        rowspan: 'rowSpan',
        colspan: 'colSpan',
        usemap: 'useMap',
        frameborder: 'frameBorder',
        contenteditable: 'contentEditable'
      },
      prop: function(e, n, r) {
        var i,
          o,
          a,
          s = e.nodeType;
        if (e && 3 !== s && 8 !== s && 2 !== s)
          return (
            (a = 1 !== s || !b.isXMLDoc(e)),
            a && ((n = b.propFix[n] || n), (o = b.propHooks[n])),
            r !== t
              ? o && 'set' in o && (i = o.set(e, r, n)) !== t ? i : (e[n] = r)
              : o && 'get' in o && null !== (i = o.get(e, n)) ? i : e[n]
          );
      },
      propHooks: {
        tabIndex: {
          get: function(e) {
            var n = e.getAttributeNode('tabindex');
            return n && n.specified ? parseInt(n.value, 10) : V.test(e.nodeName) || (Y.test(e.nodeName) && e.href) ? 0 : t;
          }
        }
      }
    }),
    (z = {
      get: function(e, n) {
        var r = b.prop(e, n),
          i = 'boolean' == typeof r && e.getAttribute(n),
          o = 'boolean' == typeof r ? (K && Q ? null != i : G.test(n) ? e[b.camelCase('default-' + n)] : !!i) : e.getAttributeNode(n);
        return o && o.value !== !1 ? n.toLowerCase() : t;
      },
      set: function(e, t, n) {
        return (
          t === !1
            ? b.removeAttr(e, n)
            : (K && Q) || !G.test(n) ? e.setAttribute((!Q && b.propFix[n]) || n, n) : (e[b.camelCase('default-' + n)] = e[n] = !0),
          n
        );
      }
    }),
    (K && Q) ||
      (b.attrHooks.value = {
        get: function(e, n) {
          var r = e.getAttributeNode(n);
          return b.nodeName(e, 'input') ? e.defaultValue : r && r.specified ? r.value : t;
        },
        set: function(e, n, r) {
          return b.nodeName(e, 'input') ? ((e.defaultValue = n), t) : I && I.set(e, n, r);
        }
      }),
    Q ||
      ((I = b.valHooks.button = {
        get: function(e, n) {
          var r = e.getAttributeNode(n);
          return r && ('id' === n || 'name' === n || 'coords' === n ? '' !== r.value : r.specified) ? r.value : t;
        },
        set: function(e, n, r) {
          var i = e.getAttributeNode(r);
          return (
            i || e.setAttributeNode((i = e.ownerDocument.createAttribute(r))),
            (i.value = n += ''),
            'value' === r || n === e.getAttribute(r) ? n : t
          );
        }
      }),
      (b.attrHooks.contenteditable = {
        get: I.get,
        set: function(e, t, n) {
          I.set(e, '' === t ? !1 : t, n);
        }
      }),
      b.each(['width', 'height'], function(e, n) {
        b.attrHooks[n] = b.extend(b.attrHooks[n], {
          set: function(e, r) {
            return '' === r ? (e.setAttribute(n, 'auto'), r) : t;
          }
        });
      })),
    b.support.hrefNormalized ||
      (b.each(['href', 'src', 'width', 'height'], function(e, n) {
        b.attrHooks[n] = b.extend(b.attrHooks[n], {
          get: function(e) {
            var r = e.getAttribute(n, 2);
            return null == r ? t : r;
          }
        });
      }),
      b.each(['href', 'src'], function(e, t) {
        b.propHooks[t] = {
          get: function(e) {
            return e.getAttribute(t, 4);
          }
        };
      })),
    b.support.style ||
      (b.attrHooks.style = {
        get: function(e) {
          return e.style.cssText || t;
        },
        set: function(e, t) {
          return (e.style.cssText = t + '');
        }
      }),
    b.support.optSelected ||
      (b.propHooks.selected = b.extend(b.propHooks.selected, {
        get: function(e) {
          var t = e.parentNode;
          return t && (t.selectedIndex, t.parentNode && t.parentNode.selectedIndex), null;
        }
      })),
    b.support.enctype || (b.propFix.enctype = 'encoding'),
    b.support.checkOn ||
      b.each(['radio', 'checkbox'], function() {
        b.valHooks[this] = {
          get: function(e) {
            return null === e.getAttribute('value') ? 'on' : e.value;
          }
        };
      }),
    b.each(['radio', 'checkbox'], function() {
      b.valHooks[this] = b.extend(b.valHooks[this], {
        set: function(e, n) {
          return b.isArray(n) ? (e.checked = b.inArray(b(e).val(), n) >= 0) : t;
        }
      });
    });
  var Z = /^(?:input|select|textarea)$/i,
    et = /^key/,
    tt = /^(?:mouse|contextmenu)|click/,
    nt = /^(?:focusinfocus|focusoutblur)$/,
    rt = /^([^.]*)(?:\.(.+)|)$/;
  function it() {
    return !0;
  }
  function ot() {
    return !1;
  }
  (b.event = {
    global: {},
    add: function(e, n, r, o, a) {
      var s,
        u,
        l,
        c,
        p,
        f,
        d,
        h,
        g,
        m,
        y,
        v = b._data(e);
      Eif (v) {
        r.handler && ((c = r), (r = c.handler), (a = c.selector)),
          r.guid || (r.guid = b.guid++),
          (u = v.events) || (u = v.events = {}),
          (f = v.handle) ||
            ((f = v.handle = function(e) {
              return typeof b === i || (e && b.event.triggered === e.type) ? t : b.event.dispatch.apply(f.elem, arguments);
            }),
            (f.elem = e)),
          (n = (n || '').match(w) || ['']),
          (l = n.length);
        while (l--)
          (s = rt.exec(n[l]) || []),
            (g = y = s[1]),
            (m = (s[2] || '').split('.').sort()),
            (p = b.event.special[g] || {}),
            (g = (a ? p.delegateType : p.bindType) || g),
            (p = b.event.special[g] || {}),
            (d = b.extend(
              {
                type: g,
                origType: y,
                data: o,
                handler: r,
                guid: r.guid,
                selector: a,
                needsContext: a && b.expr.match.needsContext.test(a),
                namespace: m.join('.')
              },
              c
            )),
            (h = u[g]) ||
              ((h = u[g] = []),
              (h.delegateCount = 0),
              (p.setup && p.setup.call(e, o, m, f) !== !1) ||
                (e.addEventListener ? e.addEventListener(g, f, !1) : e.on && e.on('on' + g, f))),
            p.add && (p.add.call(e, d), d.handler.guid || (d.handler.guid = r.guid)),
            a ? h.splice(h.delegateCount++, 0, d) : h.push(d),
            (b.event.global[g] = !0);
        e = null;
      }
    },
    remove: function(e, t, n, r, i) {
      var o,
        a,
        s,
        u,
        l,
        c,
        p,
        f,
        d,
        h,
        g,
        m = b.hasData(e) && b._data(e);
      if (m && (c = m.events)) {
        (t = (t || '').match(w) || ['']), (l = t.length);
        while (l--)
          Eif (((s = rt.exec(t[l]) || []), (d = g = s[1]), (h = (s[2] || '').split('.').sort()), d)) {
            (p = b.event.special[d] || {}),
              (d = (r ? p.delegateType : p.bindType) || d),
              (f = c[d] || []),
              (s = s[2] && RegExp('(^|\\.)' + h.join('\\.(?:.*\\.|)') + '(\\.|$)')),
              (u = o = f.length);
            while (o--)
              (a = f[o]),
                (!i && g !== a.origType) ||
                  (n && n.guid !== a.guid) ||
                  (s && !s.test(a.namespace)) ||
                  (r && r !== a.selector && ('**' !== r || !a.selector)) ||
                  (f.splice(o, 1), a.selector && f.delegateCount--, p.remove && p.remove.call(e, a));
            u && !f.length && ((p.teardown && p.teardown.call(e, h, m.handle) !== !1) || b.removeEvent(e, d, m.handle), delete c[d]);
          } else for (d in c) b.event.remove(e, d + t[l], n, r, !0);
        b.isEmptyObject(c) && (delete m.handle, b._removeData(e, 'events'));
      }
    },
    trigger: function(n, r, i, a) {
      var s,
        u,
        l,
        c,
        p,
        f,
        d,
        h = [i || o],
        g = y.call(n, 'type') ? n.type : n,
        m = y.call(n, 'namespace') ? n.namespace.split('.') : [];
      Eif (
        ((l = f = i = i || o),
        3 !== i.nodeType &&
          8 !== i.nodeType &&
          !nt.test(g + b.event.triggered) &&
          (g.indexOf('.') >= 0 && ((m = g.split('.')), (g = m.shift()), m.sort()),
          (u = 0 > g.indexOf(':') && 'on' + g),
          (n = n[b.expando] ? n : new b.Event(g, 'object' == typeof n && n)),
          (n.isTrigger = !0),
          (n.namespace = m.join('.')),
          (n.namespace_re = n.namespace ? RegExp('(^|\\.)' + m.join('\\.(?:.*\\.|)') + '(\\.|$)') : null),
          (n.result = t),
          n.target || (n.target = i),
          (r = null == r ? [n] : b.makeArray(r, [n])),
          (p = b.event.special[g] || {}),
          a || !p.trigger || p.trigger.apply(i, r) !== !1))
      ) {
        Eif (!a && !p.noBubble && !b.isWindow(i)) {
          for (c = p.delegateType || g, nt.test(c + g) || (l = l.parentNode); l; l = l.parentNode) h.push(l), (f = l);
          f === (i.ownerDocument || o) && h.push(f.defaultView || f.parentWindow || e);
        }
        d = 0;
        while ((l = h[d++]) && !n.isPropagationStopped())
          (n.type = d > 1 ? c : p.bindType || g),
            (s = (b._data(l, 'events') || {})[n.type] && b._data(l, 'handle')),
            s && s.apply(l, r),
            (s = u && l[u]),
            s && b.acceptData(l) && s.apply && s.apply(l, r) === !1 && n.preventDefault();
        if (
          ((n.type = g),
          !(
            a ||
            n.isDefaultPrevented() ||
            (p._default && p._default.apply(i.ownerDocument, r) !== !1) ||
            ('click' === g && b.nodeName(i, 'a')) ||
            !b.acceptData(i) ||
            !u ||
            !i[g] ||
            b.isWindow(i)
          ))
        ) {
          (f = i[u]), f && (i[u] = null), (b.event.triggered = g);
          try {
            i[g]();
          } catch (v) {}
          (b.event.triggered = t), f && (i[u] = f);
        }
        return n.result;
      }
    },
    dispatch: function(e) {
      e = b.event.fix(e);
      var n,
        r,
        i,
        o,
        a,
        s = [],
        u = h.call(arguments),
        l = (b._data(this, 'events') || {})[e.type] || [],
        c = b.event.special[e.type] || {};
      Eif (((u[0] = e), (e.delegateTarget = this), !c.preDispatch || c.preDispatch.call(this, e) !== !1)) {
        (s = b.event.handlers.call(this, e, l)), (n = 0);
        while ((o = s[n++]) && !e.isPropagationStopped()) {
          (e.currentTarget = o.elem), (a = 0);
          while ((i = o.handlers[a++]) && !e.isImmediatePropagationStopped())
            (!e.namespace_re || e.namespace_re.test(i.namespace)) &&
              ((e.handleObj = i),
              (e.data = i.data),
              (r = ((b.event.special[i.origType] || {}).handle || i.handler).apply(o.elem, u)),
              r !== t && (e.result = r) === !1 && (e.preventDefault(), e.stopPropagation()));
        }
        return c.postDispatch && c.postDispatch.call(this, e), e.result;
      }
    },
    handlers: function(e, n) {
      var r,
        i,
        o,
        a,
        s = [],
        u = n.delegateCount,
        l = e.target;
      Iif (u && l.nodeType && (!e.button || 'click' !== e.type))
        for (; l != this; l = l.parentNode || this)
          if (1 === l.nodeType && (l.disabled !== !0 || 'click' !== e.type)) {
            for (o = [], a = 0; u > a; a++)
              (i = n[a]),
                (r = i.selector + ' '),
                o[r] === t && (o[r] = i.needsContext ? b(r, this).index(l) >= 0 : b.find(r, this, null, [l]).length),
                o[r] && o.push(i);
            o.length && s.push({ elem: l, handlers: o });
          }
      return n.length > u && s.push({ elem: this, handlers: n.slice(u) }), s;
    },
    fix: function(e) {
      if (e[b.expando]) return e;
      var t,
        n,
        r,
        i = e.type,
        a = e,
        s = this.fixHooks[i];
      s || (this.fixHooks[i] = s = tt.test(i) ? this.mouseHooks : et.test(i) ? this.keyHooks : {}),
        (r = s.props ? this.props.concat(s.props) : this.props),
        (e = new b.Event(a)),
        (t = r.length);
      while (t--) (n = r[t]), (e[n] = a[n]);
      return (
        e.target || (e.target = a.srcElement || o),
        3 === e.target.nodeType && (e.target = e.target.parentNode),
        (e.metaKey = !!e.metaKey),
        s.filter ? s.filter(e, a) : e
      );
    },
    props: 'altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which'.split(
      ' '
    ),
    fixHooks: {},
    keyHooks: {
      props: 'char charCode key keyCode'.split(' '),
      filter: function(e, t) {
        return null == e.which && (e.which = null != t.charCode ? t.charCode : t.keyCode), e;
      }
    },
    mouseHooks: {
      props: 'button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement'.split(' '),
      filter: function(e, n) {
        var r,
          i,
          a,
          s = n.button,
          u = n.fromElement;
        return (
          null == e.pageX &&
            null != n.clientX &&
            ((i = e.target.ownerDocument || o),
            (a = i.documentElement),
            (r = i.body),
            (e.pageX = n.clientX + ((a && a.scrollLeft) || (r && r.scrollLeft) || 0) - ((a && a.clientLeft) || (r && r.clientLeft) || 0)),
            (e.pageY = n.clientY + ((a && a.scrollTop) || (r && r.scrollTop) || 0) - ((a && a.clientTop) || (r && r.clientTop) || 0))),
          !e.relatedTarget && u && (e.relatedTarget = u === e.target ? n.toElement : u),
          e.which || s === t || (e.which = 1 & s ? 1 : 2 & s ? 3 : 4 & s ? 2 : 0),
          e
        );
      }
    },
    special: {
      load: { noBubble: !0 },
      click: {
        trigger: function() {
          return b.nodeName(this, 'input') && 'checkbox' === this.type && this.click ? (this.click(), !1) : t;
        }
      },
      focus: {
        trigger: function() {
          if (this !== o.activeElement && this.focus)
            try {
              return this.focus(), !1;
            } catch (e) {}
        },
        delegateType: 'focusin'
      },
      blur: {
        trigger: function() {
          return this === o.activeElement && this.blur ? (this.blur(), !1) : t;
        },
        delegateType: 'focusout'
      },
      beforeunload: {
        postDispatch: function(e) {
          e.result !== t && (e.originalEvent.returnValue = e.result);
        }
      }
    },
    simulate: function(e, t, n, r) {
      var i = b.extend(new b.Event(), n, { type: e, isSimulated: !0, originalEvent: {} });
      r ? b.event.trigger(i, null, t) : b.event.dispatch.call(t, i), i.isDefaultPrevented() && n.preventDefault();
    }
  }),
    (b.removeEvent = o.removeEventListener
      ? function(e, t, n) {
          e.removeEventListener && e.removeEventListener(t, n, !1);
        }
      : function(e, t, n) {
          var r = 'on' + t;
          e.off && (typeof e[r] === i && (e[r] = null), e.off(r, n));
        }),
    (b.Event = function(e, n) {
      return this instanceof b.Event
        ? (e && e.type
            ? ((this.originalEvent = e),
              (this.type = e.type),
              (this.isDefaultPrevented =
                e.defaultPrevented || e.returnValue === !1 || (e.getPreventDefault && e.getPreventDefault()) ? it : ot))
            : (this.type = e),
          n && b.extend(this, n),
          (this.timeStamp = (e && e.timeStamp) || b.now()),
          (this[b.expando] = !0),
          t)
        : new b.Event(e, n);
    }),
    (b.Event.prototype = {
      isDefaultPrevented: ot,
      isPropagationStopped: ot,
      isImmediatePropagationStopped: ot,
      preventDefault: function() {
        var e = this.originalEvent;
        (this.isDefaultPrevented = it), e && (e.preventDefault ? e.preventDefault() : (e.returnValue = !1));
      },
      stopPropagation: function() {
        var e = this.originalEvent;
        (this.isPropagationStopped = it), e && (e.stopPropagation && e.stopPropagation(), (e.cancelBubble = !0));
      },
      stopImmediatePropagation: function() {
        (this.isImmediatePropagationStopped = it), this.stopPropagation();
      }
    }),
    b.each({ mouseenter: 'mouseover', mouseleave: 'mouseout' }, function(e, t) {
      b.event.special[e] = {
        delegateType: t,
        bindType: t,
        handle: function(e) {
          var n,
            r = this,
            i = e.relatedTarget,
            o = e.handleObj;
          return (!i || (i !== r && !b.contains(r, i))) && ((e.type = o.origType), (n = o.handler.apply(this, arguments)), (e.type = t)), n;
        }
      };
    }),
    b.support.submitBubbles ||
      (b.event.special.submit = {
        setup: function() {
          return b.nodeName(this, 'form')
            ? !1
            : (b.event.add(this, 'click._submit keypress._submit', function(e) {
                var n = e.target,
                  r = b.nodeName(n, 'input') || b.nodeName(n, 'button') ? n.form : t;
                r &&
                  !b._data(r, 'submitBubbles') &&
                  (b.event.add(r, 'submit._submit', function(e) {
                    e._submit_bubble = !0;
                  }),
                  b._data(r, 'submitBubbles', !0));
              }),
              t);
        },
        postDispatch: function(e) {
          e._submit_bubble &&
            (delete e._submit_bubble, this.parentNode && !e.isTrigger && b.event.simulate('submit', this.parentNode, e, !0));
        },
        teardown: function() {
          return b.nodeName(this, 'form') ? !1 : (b.event.remove(this, '._submit'), t);
        }
      }),
    b.support.changeBubbles ||
      (b.event.special.change = {
        setup: function() {
          return Z.test(this.nodeName)
            ? (('checkbox' === this.type || 'radio' === this.type) &&
                (b.event.add(this, 'propertychange._change', function(e) {
                  'checked' === e.originalEvent.propertyName && (this._just_changed = !0);
                }),
                b.event.add(this, 'click._change', function(e) {
                  this._just_changed && !e.isTrigger && (this._just_changed = !1), b.event.simulate('change', this, e, !0);
                })),
              !1)
            : (b.event.add(this, 'beforeactivate._change', function(e) {
                var t = e.target;
                Z.test(t.nodeName) &&
                  !b._data(t, 'changeBubbles') &&
                  (b.event.add(t, 'change._change', function(e) {
                    !this.parentNode || e.isSimulated || e.isTrigger || b.event.simulate('change', this.parentNode, e, !0);
                  }),
                  b._data(t, 'changeBubbles', !0));
              }),
              t);
        },
        handle: function(e) {
          var n = e.target;
          return this !== n || e.isSimulated || e.isTrigger || ('radio' !== n.type && 'checkbox' !== n.type)
            ? e.handleObj.handler.apply(this, arguments)
            : t;
        },
        teardown: function() {
          return b.event.remove(this, '._change'), !Z.test(this.nodeName);
        }
      }),
    b.support.focusinBubbles ||
      b.each({ focus: 'focusin', blur: 'focusout' }, function(e, t) {
        var n = 0,
          r = function(e) {
            b.event.simulate(t, e.target, b.event.fix(e), !0);
          };
        b.event.special[t] = {
          setup: function() {
            0 === n++ && o.addEventListener(e, r, !0);
          },
          teardown: function() {
            0 === --n && o.removeEventListener(e, r, !0);
          }
        };
      }),
    b.fn.extend({
      on: function(e, n, r, i, o) {
        var a, s;
        Iif ('object' == typeof e) {
          'string' != typeof n && ((r = r || n), (n = t));
          for (a in e) this.on(a, n, r, e[a], o);
          return this;
        }
        Iif (
          (null == r && null == i
            ? ((i = n), (r = n = t))
            : null == i && ('string' == typeof n ? ((i = r), (r = t)) : ((i = r), (r = n), (n = t))),
          i === !1)
        )
          i = ot;
        else Iif (!i) return this;
        return (
          1 === o &&
            ((s = i),
            (i = function(e) {
              return b().off(e), s.apply(this, arguments);
            }),
            (i.guid = s.guid || (s.guid = b.guid++))),
          this.each(function() {
            b.event.add(this, e, i, r, n);
          })
        );
      },
      one: function(e, t, n, r) {
        return this.on(e, t, n, r, 1);
      },
      off: function(e, n, r) {
        var i, o;
        Iif (e && e.preventDefault && e.handleObj)
          return (
            (i = e.handleObj),
            b(e.delegateTarget).off(i.namespace ? i.origType + '.' + i.namespace : i.origType, i.selector, i.handler),
            this
          );
        Iif ('object' == typeof e) {
          for (o in e) this.off(o, n, e[o]);
          return this;
        }
        return (
          (n === !1 || 'function' == typeof n) && ((r = n), (n = t)),
          r === !1 && (r = ot),
          this.each(function() {
            b.event.remove(this, e, r, n);
          })
        );
      },
      bind: function(e, t, n) {
        return this.on(e, null, t, n);
      },
      unbind: function(e, t) {
        return this.off(e, null, t);
      },
      delegate: function(e, t, n, r) {
        return this.on(t, e, n, r);
      },
      undelegate: function(e, t, n) {
        return 1 === arguments.length ? this.off(e, '**') : this.off(t, e || '**', n);
      },
      trigger: function(e, t) {
        return this.each(function() {
          b.event.trigger(e, t, this);
        });
      },
      triggerHandler: function(e, n) {
        var r = this[0];
        return r ? b.event.trigger(e, n, r, !0) : t;
      }
    }),
    (function(e, t) {
      var n,
        r,
        i,
        o,
        a,
        s,
        u,
        l,
        c,
        p,
        f,
        d,
        h,
        g,
        m,
        y,
        v,
        x = 'sizzle' + -new Date(),
        w = e.document,
        T = {},
        N = 0,
        C = 0,
        k = it(),
        E = it(),
        S = it(),
        A = typeof t,
        j = 1 << 31,
        D = [],
        L = D.pop,
        H = D.push,
        q = D.slice,
        M =
          D.indexOf ||
          function(e) {
            var t = 0,
              n = this.length;
            for (; n > t; t++) if (this[t] === e) return t;
            return -1;
          },
        _ = '[\\x20\\t\\r\\n\\f]',
        F = '(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+',
        O = F.replace('w', 'w#'),
        B = '([*^$|!~]?=)',
        P = '\\[' + _ + '*(' + F + ')' + _ + '*(?:' + B + _ + '*(?:([\'"])((?:\\\\.|[^\\\\])*?)\\3|(' + O + ')|)|)' + _ + '*\\]',
        R = ':(' + F + ')(?:\\((([\'"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|' + P.replace(3, 8) + ')*)|.*)\\)|)',
        W = RegExp('^' + _ + '+|((?:^|[^\\\\])(?:\\\\.)*)' + _ + '+$', 'g'),
        $ = RegExp('^' + _ + '*,' + _ + '*'),
        I = RegExp('^' + _ + '*([\\x20\\t\\r\\n\\f>+~])' + _ + '*'),
        z = RegExp(R),
        X = RegExp('^' + O + '$'),
        U = {
          ID: RegExp('^#(' + F + ')'),
          CLASS: RegExp('^\\.(' + F + ')'),
          NAME: RegExp('^\\[name=[\'"]?(' + F + ')[\'"]?\\]'),
          TAG: RegExp('^(' + F.replace('w', 'w*') + ')'),
          ATTR: RegExp('^' + P),
          PSEUDO: RegExp('^' + R),
          CHILD: RegExp(
            '^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(' +
              _ +
              '*(even|odd|(([+-]|)(\\d*)n|)' +
              _ +
              '*(?:([+-]|)' +
              _ +
              '*(\\d+)|))' +
              _ +
              '*\\)|)',
            'i'
          ),
          needsContext: RegExp(
            '^' + _ + '*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(' + _ + '*((?:-\\d)?\\d*)' + _ + '*\\)|)(?=[^-]|$)',
            'i'
          )
        },
        V = /[\x20\t\r\n\f]*[+~]/,
        Y = /^[^{]+\{\s*\[native code/,
        J = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,
        G = /^(?:input|select|textarea|button)$/i,
        Q = /^h\d$/i,
        K = /'|\\/g,
        Z = /\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,
        et = /\\([\da-fA-F]{1,6}[\x20\t\r\n\f]?|.)/g,
        tt = function(e, t) {
          var n = '0x' + t - 65536;
          return n !== n ? t : 0 > n ? String.fromCharCode(n + 65536) : String.fromCharCode(55296 | (n >> 10), 56320 | (1023 & n));
        };
      try {
        q.call(w.documentElement.childNodes, 0)[0].nodeType;
      } catch (nt) {
        q = function(e) {
          var t,
            n = [];
          while ((t = this[e++])) n.push(t);
          return n;
        };
      }
      function rt(e) {
        return Y.test(e + '');
      }
      function it() {
        var e,
          t = [];
        return (e = function(n, r) {
          return t.push((n += ' ')) > i.cacheLength && delete e[t.shift()], (e[n] = r);
        });
      }
      function ot(e) {
        return (e[x] = !0), e;
      }
      function at(e) {
        var t = p.createElement('div');
        try {
          return e(t);
        } catch (n) {
          return !1;
        } finally {
          t = null;
        }
      }
      function st(e, t, n, r) {
        var i, o, a, s, u, l, f, g, m, v;
        if (((t ? t.ownerDocument || t : w) !== p && c(t), (t = t || p), (n = n || []), !e || 'string' != typeof e)) return n;
        if (1 !== (s = t.nodeType) && 9 !== s) return [];
        if (!d && !r) {
          if ((i = J.exec(e)))
            if ((a = i[1])) {
              if (9 === s) {
                if (((o = t.getElementById(a)), !o || !o.parentNode)) return n;
                if (o.id === a) return n.push(o), n;
              } else if (t.ownerDocument && (o = t.ownerDocument.getElementById(a)) && y(t, o) && o.id === a) return n.push(o), n;
            } else {
              if (i[2]) return H.apply(n, q.call(t.getElementsByTagName(e), 0)), n;
              if ((a = i[3]) && T.getByClassName && t.getElementsByClassName) return H.apply(n, q.call(t.getElementsByClassName(a), 0)), n;
            }
          if (T.qsa && !h.test(e)) {
            if (((f = !0), (g = x), (m = t), (v = 9 === s && e), 1 === s && 'object' !== t.nodeName.toLowerCase())) {
              (l = ft(e)),
                (f = t.getAttribute('id')) ? (g = f.replace(K, '\\$&')) : t.setAttribute('id', g),
                (g = "[id='" + g + "'] "),
                (u = l.length);
              while (u--) l[u] = g + dt(l[u]);
              (m = (V.test(e) && t.parentNode) || t), (v = l.join(','));
            }
            if (v)
              try {
                return H.apply(n, q.call(m.querySelectorAll(v), 0)), n;
              } catch (b) {
              } finally {
                f || t.removeAttribute('id');
              }
          }
        }
        return wt(e.replace(W, '$1'), t, n, r);
      }
      (a = st.isXML = function(e) {
        var t = e && (e.ownerDocument || e).documentElement;
        return t ? 'HTML' !== t.nodeName : !1;
      }),
        (c = st.setDocument = function(e) {
          var n = e ? e.ownerDocument || e : w;
          return n !== p && 9 === n.nodeType && n.documentElement
            ? ((p = n),
              (f = n.documentElement),
              (d = a(n)),
              (T.tagNameNoComments = at(function(e) {
                return e.appendChild(n.createComment('')), !e.getElementsByTagName('*').length;
              })),
              (T.attributes = at(function(e) {
                e.innerHTML = '<select></select>';
                var t = typeof e.lastChild.getAttribute('multiple');
                return 'boolean' !== t && 'string' !== t;
              })),
              (T.getByClassName = at(function(e) {
                return (
                  (e.innerHTML = "<div class='hidden e'></div><div class='hidden'></div>"),
                  e.getElementsByClassName && e.getElementsByClassName('e').length
                    ? ((e.lastChild.className = 'e'), 2 === e.getElementsByClassName('e').length)
                    : !1
                );
              })),
              (T.getByName = at(function(e) {
                (e.id = x + 0), (e.innerHTML = "<a name='" + x + "'></a><div name='" + x + "'></div>"), f.insertBefore(e, f.firstChild);
                var t = n.getElementsByName && n.getElementsByName(x).length === 2 + n.getElementsByName(x + 0).length;
                return (T.getIdNotName = !n.getElementById(x)), f.removeChild(e), t;
              })),
              (i.attrHandle = at(function(e) {
                return (
                  (e.innerHTML = "<a href='#'></a>"),
                  e.firstChild && typeof e.firstChild.getAttribute !== A && '#' === e.firstChild.getAttribute('href')
                );
              })
                ? {}
                : {
                    href: function(e) {
                      return e.getAttribute('href', 2);
                    },
                    type: function(e) {
                      return e.getAttribute('type');
                    }
                  }),
              T.getIdNotName
                ? ((i.find.ID = function(e, t) {
                    if (typeof t.getElementById !== A && !d) {
                      var n = t.getElementById(e);
                      return n && n.parentNode ? [n] : [];
                    }
                  }),
                  (i.filter.ID = function(e) {
                    var t = e.replace(et, tt);
                    return function(e) {
                      return e.getAttribute('id') === t;
                    };
                  }))
                : ((i.find.ID = function(e, n) {
                    if (typeof n.getElementById !== A && !d) {
                      var r = n.getElementById(e);
                      return r ? (r.id === e || (typeof r.getAttributeNode !== A && r.getAttributeNode('id').value === e) ? [r] : t) : [];
                    }
                  }),
                  (i.filter.ID = function(e) {
                    var t = e.replace(et, tt);
                    return function(e) {
                      var n = typeof e.getAttributeNode !== A && e.getAttributeNode('id');
                      return n && n.value === t;
                    };
                  })),
              (i.find.TAG = T.tagNameNoComments
                ? function(e, n) {
                    return typeof n.getElementsByTagName !== A ? n.getElementsByTagName(e) : t;
                  }
                : function(e, t) {
                    var n,
                      r = [],
                      i = 0,
                      o = t.getElementsByTagName(e);
                    if ('*' === e) {
                      while ((n = o[i++])) 1 === n.nodeType && r.push(n);
                      return r;
                    }
                    return o;
                  }),
              (i.find.NAME =
                T.getByName &&
                function(e, n) {
                  return typeof n.getElementsByName !== A ? n.getElementsByName(name) : t;
                }),
              (i.find.CLASS =
                T.getByClassName &&
                function(e, n) {
                  return typeof n.getElementsByClassName === A || d ? t : n.getElementsByClassName(e);
                }),
              (g = []),
              (h = [':focus']),
              (T.qsa = rt(n.querySelectorAll)) &&
                (at(function(e) {
                  (e.innerHTML = "<select><option selected=''></option></select>"),
                    e.querySelectorAll('[selected]').length ||
                      h.push('\\[' + _ + '*(?:checked|disabled|ismap|multiple|readonly|selected|value)'),
                    e.querySelectorAll(':checked').length || h.push(':checked');
                }),
                at(function(e) {
                  (e.innerHTML = "<input type='hidden' i=''/>"),
                    e.querySelectorAll("[i^='']").length && h.push('[*^$]=' + _ + '*(?:""|\'\')'),
                    e.querySelectorAll(':enabled').length || h.push(':enabled', ':disabled'),
                    e.querySelectorAll('*,:x'),
                    h.push(',.*:');
                })),
              (T.matchesSelector = rt(
                (m = f.matchesSelector || f.mozMatchesSelector || f.webkitMatchesSelector || f.oMatchesSelector || f.msMatchesSelector)
              )) &&
                at(function(e) {
                  (T.disconnectedMatch = m.call(e, 'div')), m.call(e, "[s!='']:x"), g.push('!=', R);
                }),
              (h = RegExp(h.join('|'))),
              (g = RegExp(g.join('|'))),
              (y =
                rt(f.contains) || f.compareDocumentPosition
                  ? function(e, t) {
                      var n = 9 === e.nodeType ? e.documentElement : e,
                        r = t && t.parentNode;
                      return (
                        e === r ||
                        !(
                          !r ||
                          1 !== r.nodeType ||
                          !(n.contains ? n.contains(r) : e.compareDocumentPosition && 16 & e.compareDocumentPosition(r))
                        )
                      );
                    }
                  : function(e, t) {
                      if (t) while ((t = t.parentNode)) if (t === e) return !0;
                      return !1;
                    }),
              (v = f.compareDocumentPosition
                ? function(e, t) {
                    var r;
                    return e === t
                      ? ((u = !0), 0)
                      : (r = t.compareDocumentPosition && e.compareDocumentPosition && e.compareDocumentPosition(t))
                        ? 1 & r || (e.parentNode && 11 === e.parentNode.nodeType)
                          ? e === n || y(w, e) ? -1 : t === n || y(w, t) ? 1 : 0
                          : 4 & r ? -1 : 1
                        : e.compareDocumentPosition ? -1 : 1;
                  }
                : function(e, t) {
                    var r,
                      i = 0,
                      o = e.parentNode,
                      a = t.parentNode,
                      s = [e],
                      l = [t];
                    if (e === t) return (u = !0), 0;
                    if (!o || !a) return e === n ? -1 : t === n ? 1 : o ? -1 : a ? 1 : 0;
                    if (o === a) return ut(e, t);
                    r = e;
                    while ((r = r.parentNode)) s.unshift(r);
                    r = t;
                    while ((r = r.parentNode)) l.unshift(r);
                    while (s[i] === l[i]) i++;
                    return i ? ut(s[i], l[i]) : s[i] === w ? -1 : l[i] === w ? 1 : 0;
                  }),
              (u = !1),
              [0, 0].sort(v),
              (T.detectDuplicates = u),
              p)
            : p;
        }),
        (st.matches = function(e, t) {
          return st(e, null, null, t);
        }),
        (st.matchesSelector = function(e, t) {
          if (
            ((e.ownerDocument || e) !== p && c(e),
            (t = t.replace(Z, "='$1']")),
            !(!T.matchesSelector || d || (g && g.test(t)) || h.test(t)))
          )
            try {
              var n = m.call(e, t);
              if (n || T.disconnectedMatch || (e.document && 11 !== e.document.nodeType)) return n;
            } catch (r) {}
          return st(t, p, null, [e]).length > 0;
        }),
        (st.contains = function(e, t) {
          return (e.ownerDocument || e) !== p && c(e), y(e, t);
        }),
        (st.attr = function(e, t) {
          var n;
          return (
            (e.ownerDocument || e) !== p && c(e),
            d || (t = t.toLowerCase()),
            (n = i.attrHandle[t])
              ? n(e)
              : d || T.attributes
                ? e.getAttribute(t)
                : ((n = e.getAttributeNode(t)) || e.getAttribute(t)) && e[t] === !0 ? t : n && n.specified ? n.value : null
          );
        }),
        (st.error = function(e) {
          throw Error('Syntax error, unrecognized expression: ' + e);
        }),
        (st.uniqueSort = function(e) {
          var t,
            n = [],
            r = 1,
            i = 0;
          if (((u = !T.detectDuplicates), e.sort(v), u)) {
            for (; (t = e[r]); r++) t === e[r - 1] && (i = n.push(r));
            while (i--) e.splice(n[i], 1);
          }
          return e;
        });
      function ut(e, t) {
        var n = t && e,
          r = n && (~t.sourceIndex || j) - (~e.sourceIndex || j);
        if (r) return r;
        if (n) while ((n = n.nextSibling)) if (n === t) return -1;
        return e ? 1 : -1;
      }
      function lt(e) {
        return function(t) {
          var n = t.nodeName.toLowerCase();
          return 'input' === n && t.type === e;
        };
      }
      function ct(e) {
        return function(t) {
          var n = t.nodeName.toLowerCase();
          return ('input' === n || 'button' === n) && t.type === e;
        };
      }
      function pt(e) {
        return ot(function(t) {
          return (
            (t = +t),
            ot(function(n, r) {
              var i,
                o = e([], n.length, t),
                a = o.length;
              while (a--) n[(i = o[a])] && (n[i] = !(r[i] = n[i]));
            })
          );
        });
      }
      (o = st.getText = function(e) {
        var t,
          n = '',
          r = 0,
          i = e.nodeType;
        if (i) {
          if (1 === i || 9 === i || 11 === i) {
            if ('string' == typeof e.textContent) return e.textContent;
            for (e = e.firstChild; e; e = e.nextSibling) n += o(e);
          } else if (3 === i || 4 === i) return e.nodeValue;
        } else for (; (t = e[r]); r++) n += o(t);
        return n;
      }),
        (i = st.selectors = {
          cacheLength: 50,
          createPseudo: ot,
          match: U,
          find: {},
          relative: {
            '>': { dir: 'parentNode', first: !0 },
            ' ': { dir: 'parentNode' },
            '+': { dir: 'previousSibling', first: !0 },
            '~': { dir: 'previousSibling' }
          },
          preFilter: {
            ATTR: function(e) {
              return (
                (e[1] = e[1].replace(et, tt)),
                (e[3] = (e[4] || e[5] || '').replace(et, tt)),
                '~=' === e[2] && (e[3] = ' ' + e[3] + ' '),
                e.slice(0, 4)
              );
            },
            CHILD: function(e) {
              return (
                (e[1] = e[1].toLowerCase()),
                'nth' === e[1].slice(0, 3)
                  ? (e[3] || st.error(e[0]),
                    (e[4] = +(e[4] ? e[5] + (e[6] || 1) : 2 * ('even' === e[3] || 'odd' === e[3]))),
                    (e[5] = +(e[7] + e[8] || 'odd' === e[3])))
                  : e[3] && st.error(e[0]),
                e
              );
            },
            PSEUDO: function(e) {
              var t,
                n = !e[5] && e[2];
              return U.CHILD.test(e[0])
                ? null
                : (e[4]
                    ? (e[2] = e[4])
                    : n &&
                      z.test(n) &&
                      (t = ft(n, !0)) &&
                      (t = n.indexOf(')', n.length - t) - n.length) &&
                      ((e[0] = e[0].slice(0, t)), (e[2] = n.slice(0, t))),
                  e.slice(0, 3));
            }
          },
          filter: {
            TAG: function(e) {
              return '*' === e
                ? function() {
                    return !0;
                  }
                : ((e = e.replace(et, tt).toLowerCase()),
                  function(t) {
                    return t.nodeName && t.nodeName.toLowerCase() === e;
                  });
            },
            CLASS: function(e) {
              var t = k[e + ' '];
              return (
                t ||
                ((t = RegExp('(^|' + _ + ')' + e + '(' + _ + '|$)')) &&
                  k(e, function(e) {
                    return t.test(e.className || (typeof e.getAttribute !== A && e.getAttribute('class')) || '');
                  }))
              );
            },
            ATTR: function(e, t, n) {
              return function(r) {
                var i = st.attr(r, e);
                return null == i
                  ? '!=' === t
                  : t
                    ? ((i += ''),
                      '=' === t
                        ? i === n
                        : '!=' === t
                          ? i !== n
                          : '^=' === t
                            ? n && 0 === i.indexOf(n)
                            : '*=' === t
                              ? n && i.indexOf(n) > -1
                              : '$=' === t
                                ? n && i.slice(-n.length) === n
                                : '~=' === t
                                  ? (' ' + i + ' ').indexOf(n) > -1
                                  : '|=' === t ? i === n || i.slice(0, n.length + 1) === n + '-' : !1)
                    : !0;
              };
            },
            CHILD: function(e, t, n, r, i) {
              var o = 'nth' !== e.slice(0, 3),
                a = 'last' !== e.slice(-4),
                s = 'of-type' === t;
              return 1 === r && 0 === i
                ? function(e) {
                    return !!e.parentNode;
                  }
                : function(t, n, u) {
                    var l,
                      c,
                      p,
                      f,
                      d,
                      h,
                      g = o !== a ? 'nextSibling' : 'previousSibling',
                      m = t.parentNode,
                      y = s && t.nodeName.toLowerCase(),
                      v = !u && !s;
                    if (m) {
                      if (o) {
                        while (g) {
                          p = t;
                          while ((p = p[g])) if (s ? p.nodeName.toLowerCase() === y : 1 === p.nodeType) return !1;
                          h = g = 'only' === e && !h && 'nextSibling';
                        }
                        return !0;
                      }
                      if (((h = [a ? m.firstChild : m.lastChild]), a && v)) {
                        (c = m[x] || (m[x] = {})),
                          (l = c[e] || []),
                          (d = l[0] === N && l[1]),
                          (f = l[0] === N && l[2]),
                          (p = d && m.childNodes[d]);
                        while ((p = (++d && p && p[g]) || (f = d = 0) || h.pop()))
                          if (1 === p.nodeType && ++f && p === t) {
                            c[e] = [N, d, f];
                            break;
                          }
                      } else if (v && (l = (t[x] || (t[x] = {}))[e]) && l[0] === N) f = l[1];
                      else
                        while ((p = (++d && p && p[g]) || (f = d = 0) || h.pop()))
                          if (
                            (s ? p.nodeName.toLowerCase() === y : 1 === p.nodeType) &&
                            ++f &&
                            (v && ((p[x] || (p[x] = {}))[e] = [N, f]), p === t)
                          )
                            break;
                      return (f -= i), f === r || (0 === f % r && f / r >= 0);
                    }
                  };
            },
            PSEUDO: function(e, t) {
              var n,
                r = i.pseudos[e] || i.setFilters[e.toLowerCase()] || st.error('unsupported pseudo: ' + e);
              return r[x]
                ? r(t)
                : r.length > 1
                  ? ((n = [e, e, '', t]),
                    i.setFilters.hasOwnProperty(e.toLowerCase())
                      ? ot(function(e, n) {
                          var i,
                            o = r(e, t),
                            a = o.length;
                          while (a--) (i = M.call(e, o[a])), (e[i] = !(n[i] = o[a]));
                        })
                      : function(e) {
                          return r(e, 0, n);
                        })
                  : r;
            }
          },
          pseudos: {
            not: ot(function(e) {
              var t = [],
                n = [],
                r = s(e.replace(W, '$1'));
              return r[x]
                ? ot(function(e, t, n, i) {
                    var o,
                      a = r(e, null, i, []),
                      s = e.length;
                    while (s--) (o = a[s]) && (e[s] = !(t[s] = o));
                  })
                : function(e, i, o) {
                    return (t[0] = e), r(t, null, o, n), !n.pop();
                  };
            }),
            has: ot(function(e) {
              return function(t) {
                return st(e, t).length > 0;
              };
            }),
            contains: ot(function(e) {
              return function(t) {
                return (t.textContent || t.innerText || o(t)).indexOf(e) > -1;
              };
            }),
            lang: ot(function(e) {
              return (
                X.test(e || '') || st.error('unsupported lang: ' + e),
                (e = e.replace(et, tt).toLowerCase()),
                function(t) {
                  var n;
                  do
                    if ((n = d ? t.getAttribute('xml:lang') || t.getAttribute('lang') : t.lang))
                      return (n = n.toLowerCase()), n === e || 0 === n.indexOf(e + '-');
                  while ((t = t.parentNode) && 1 === t.nodeType);
                  return !1;
                }
              );
            }),
            target: function(t) {
              var n = e.location && e.location.hash;
              return n && n.slice(1) === t.id;
            },
            root: function(e) {
              return e === f;
            },
            focus: function(e) {
              return e === p.activeElement && (!p.hasFocus || p.hasFocus()) && !!(e.type || e.href || ~e.tabIndex);
            },
            enabled: function(e) {
              return e.disabled === !1;
            },
            disabled: function(e) {
              return e.disabled === !0;
            },
            checked: function(e) {
              var t = e.nodeName.toLowerCase();
              return ('input' === t && !!e.checked) || ('option' === t && !!e.selected);
            },
            selected: function(e) {
              return e.parentNode && e.parentNode.selectedIndex, e.selected === !0;
            },
            empty: function(e) {
              for (e = e.firstChild; e; e = e.nextSibling) if (e.nodeName > '@' || 3 === e.nodeType || 4 === e.nodeType) return !1;
              return !0;
            },
            parent: function(e) {
              return !i.pseudos.empty(e);
            },
            header: function(e) {
              return Q.test(e.nodeName);
            },
            input: function(e) {
              return G.test(e.nodeName);
            },
            button: function(e) {
              var t = e.nodeName.toLowerCase();
              return ('input' === t && 'button' === e.type) || 'button' === t;
            },
            text: function(e) {
              var t;
              return (
                'input' === e.nodeName.toLowerCase() &&
                'text' === e.type &&
                (null == (t = e.getAttribute('type')) || t.toLowerCase() === e.type)
              );
            },
            first: pt(function() {
              return [0];
            }),
            last: pt(function(e, t) {
              return [t - 1];
            }),
            eq: pt(function(e, t, n) {
              return [0 > n ? n + t : n];
            }),
            even: pt(function(e, t) {
              var n = 0;
              for (; t > n; n += 2) e.push(n);
              return e;
            }),
            odd: pt(function(e, t) {
              var n = 1;
              for (; t > n; n += 2) e.push(n);
              return e;
            }),
            lt: pt(function(e, t, n) {
              var r = 0 > n ? n + t : n;
              for (; --r >= 0; ) e.push(r);
              return e;
            }),
            gt: pt(function(e, t, n) {
              var r = 0 > n ? n + t : n;
              for (; t > ++r; ) e.push(r);
              return e;
            })
          }
        });
      for (n in { radio: !0, checkbox: !0, file: !0, password: !0, image: !0 }) i.pseudos[n] = lt(n);
      for (n in { submit: !0, reset: !0 }) i.pseudos[n] = ct(n);
      function ft(e, t) {
        var n,
          r,
          o,
          a,
          s,
          u,
          l,
          c = E[e + ' '];
        if (c) return t ? 0 : c.slice(0);
        (s = e), (u = []), (l = i.preFilter);
        while (s) {
          (!n || (r = $.exec(s))) && (r && (s = s.slice(r[0].length) || s), u.push((o = []))),
            (n = !1),
            (r = I.exec(s)) && ((n = r.shift()), o.push({ value: n, type: r[0].replace(W, ' ') }), (s = s.slice(n.length)));
          for (a in i.filter)
            !(r = U[a].exec(s)) ||
              (l[a] && !(r = l[a](r))) ||
              ((n = r.shift()), o.push({ value: n, type: a, matches: r }), (s = s.slice(n.length)));
          if (!n) break;
        }
        return t ? s.length : s ? st.error(e) : E(e, u).slice(0);
      }
      function dt(e) {
        var t = 0,
          n = e.length,
          r = '';
        for (; n > t; t++) r += e[t].value;
        return r;
      }
      function ht(e, t, n) {
        var i = t.dir,
          o = n && 'parentNode' === i,
          a = C++;
        return t.first
          ? function(t, n, r) {
              while ((t = t[i])) if (1 === t.nodeType || o) return e(t, n, r);
            }
          : function(t, n, s) {
              var u,
                l,
                c,
                p = N + ' ' + a;
              if (s) {
                while ((t = t[i])) if ((1 === t.nodeType || o) && e(t, n, s)) return !0;
              } else
                while ((t = t[i]))
                  if (1 === t.nodeType || o)
                    if (((c = t[x] || (t[x] = {})), (l = c[i]) && l[0] === p)) {
                      if ((u = l[1]) === !0 || u === r) return u === !0;
                    } else if (((l = c[i] = [p]), (l[1] = e(t, n, s) || r), l[1] === !0)) return !0;
            };
      }
      function gt(e) {
        return e.length > 1
          ? function(t, n, r) {
              var i = e.length;
              while (i--) if (!e[i](t, n, r)) return !1;
              return !0;
            }
          : e[0];
      }
      function mt(e, t, n, r, i) {
        var o,
          a = [],
          s = 0,
          u = e.length,
          l = null != t;
        for (; u > s; s++) (o = e[s]) && (!n || n(o, r, i)) && (a.push(o), l && t.push(s));
        return a;
      }
      function yt(e, t, n, r, i, o) {
        return (
          r && !r[x] && (r = yt(r)),
          i && !i[x] && (i = yt(i, o)),
          ot(function(o, a, s, u) {
            var l,
              c,
              p,
              f = [],
              d = [],
              h = a.length,
              g = o || xt(t || '*', s.nodeType ? [s] : s, []),
              m = !e || (!o && t) ? g : mt(g, f, e, s, u),
              y = n ? (i || (o ? e : h || r) ? [] : a) : m;
            if ((n && n(m, y, s, u), r)) {
              (l = mt(y, d)), r(l, [], s, u), (c = l.length);
              while (c--) (p = l[c]) && (y[d[c]] = !(m[d[c]] = p));
            }
            if (o) {
              if (i || e) {
                if (i) {
                  (l = []), (c = y.length);
                  while (c--) (p = y[c]) && l.push((m[c] = p));
                  i(null, (y = []), l, u);
                }
                c = y.length;
                while (c--) (p = y[c]) && (l = i ? M.call(o, p) : f[c]) > -1 && (o[l] = !(a[l] = p));
              }
            } else (y = mt(y === a ? y.splice(h, y.length) : y)), i ? i(null, a, y, u) : H.apply(a, y);
          })
        );
      }
      function vt(e) {
        var t,
          n,
          r,
          o = e.length,
          a = i.relative[e[0].type],
          s = a || i.relative[' '],
          u = a ? 1 : 0,
          c = ht(
            function(e) {
              return e === t;
            },
            s,
            !0
          ),
          p = ht(
            function(e) {
              return M.call(t, e) > -1;
            },
            s,
            !0
          ),
          f = [
            function(e, n, r) {
              return (!a && (r || n !== l)) || ((t = n).nodeType ? c(e, n, r) : p(e, n, r));
            }
          ];
        for (; o > u; u++)
          if ((n = i.relative[e[u].type])) f = [ht(gt(f), n)];
          else {
            if (((n = i.filter[e[u].type].apply(null, e[u].matches)), n[x])) {
              for (r = ++u; o > r; r++) if (i.relative[e[r].type]) break;
              return yt(
                u > 1 && gt(f),
                u > 1 && dt(e.slice(0, u - 1)).replace(W, '$1'),
                n,
                r > u && vt(e.slice(u, r)),
                o > r && vt((e = e.slice(r))),
                o > r && dt(e)
              );
            }
            f.push(n);
          }
        return gt(f);
      }
      function bt(e, t) {
        var n = 0,
          o = t.length > 0,
          a = e.length > 0,
          s = function(s, u, c, f, d) {
            var h,
              g,
              m,
              y = [],
              v = 0,
              b = '0',
              x = s && [],
              w = null != d,
              T = l,
              C = s || (a && i.find.TAG('*', (d && u.parentNode) || u)),
              k = (N += null == T ? 1 : Math.random() || 0.1);
            for (w && ((l = u !== p && u), (r = n)); null != (h = C[b]); b++) {
              if (a && h) {
                g = 0;
                while ((m = e[g++]))
                  if (m(h, u, c)) {
                    f.push(h);
                    break;
                  }
                w && ((N = k), (r = ++n));
              }
              o && ((h = !m && h) && v--, s && x.push(h));
            }
            if (((v += b), o && b !== v)) {
              g = 0;
              while ((m = t[g++])) m(x, y, u, c);
              if (s) {
                if (v > 0) while (b--) x[b] || y[b] || (y[b] = L.call(f));
                y = mt(y);
              }
              H.apply(f, y), w && !s && y.length > 0 && v + t.length > 1 && st.uniqueSort(f);
            }
            return w && ((N = k), (l = T)), x;
          };
        return o ? ot(s) : s;
      }
      s = st.compile = function(e, t) {
        var n,
          r = [],
          i = [],
          o = S[e + ' '];
        if (!o) {
          t || (t = ft(e)), (n = t.length);
          while (n--) (o = vt(t[n])), o[x] ? r.push(o) : i.push(o);
          o = S(e, bt(i, r));
        }
        return o;
      };
      function xt(e, t, n) {
        var r = 0,
          i = t.length;
        for (; i > r; r++) st(e, t[r], n);
        return n;
      }
      function wt(e, t, n, r) {
        var o,
          a,
          u,
          l,
          c,
          p = ft(e);
        if (!r && 1 === p.length) {
          if (((a = p[0] = p[0].slice(0)), a.length > 2 && 'ID' === (u = a[0]).type && 9 === t.nodeType && !d && i.relative[a[1].type])) {
            if (((t = i.find.ID(u.matches[0].replace(et, tt), t)[0]), !t)) return n;
            e = e.slice(a.shift().value.length);
          }
          o = U.needsContext.test(e) ? 0 : a.length;
          while (o--) {
            if (((u = a[o]), i.relative[(l = u.type)])) break;
            if ((c = i.find[l]) && (r = c(u.matches[0].replace(et, tt), (V.test(a[0].type) && t.parentNode) || t))) {
              if ((a.splice(o, 1), (e = r.length && dt(a)), !e)) return H.apply(n, q.call(r, 0)), n;
              break;
            }
          }
        }
        return s(e, p)(r, t, d, n, V.test(e)), n;
      }
      i.pseudos.nth = i.pseudos.eq;
      function Tt() {}
      (i.filters = Tt.prototype = i.pseudos),
        (i.setFilters = new Tt()),
        c(),
        (st.attr = b.attr),
        (b.find = st),
        (b.expr = st.selectors),
        (b.expr[':'] = b.expr.pseudos),
        (b.unique = st.uniqueSort),
        (b.text = st.getText),
        (b.isXMLDoc = st.isXML),
        (b.contains = st.contains);
    })(e);
  var at = /Until$/,
    st = /^(?:parents|prev(?:Until|All))/,
    ut = /^.[^:#\[\.,]*$/,
    lt = b.expr.match.needsContext,
    ct = { children: !0, contents: !0, next: !0, prev: !0 };
  b.fn.extend({
    find: function(e) {
      var t,
        n,
        r,
        i = this.length;
      if ('string' != typeof e)
        return (
          (r = this),
          this.pushStack(
            b(e).filter(function() {
              for (t = 0; i > t; t++) if (b.contains(r[t], this)) return !0;
            })
          )
        );
      for (n = [], t = 0; i > t; t++) b.find(e, this[t], n);
      return (n = this.pushStack(i > 1 ? b.unique(n) : n)), (n.selector = (this.selector ? this.selector + ' ' : '') + e), n;
    },
    has: function(e) {
      var t,
        n = b(e, this),
        r = n.length;
      return this.filter(function() {
        for (t = 0; r > t; t++) if (b.contains(this, n[t])) return !0;
      });
    },
    not: function(e) {
      return this.pushStack(ft(this, e, !1));
    },
    filter: function(e) {
      return this.pushStack(ft(this, e, !0));
    },
    is: function(e) {
      return (
        !!e &&
        ('string' == typeof e
          ? lt.test(e) ? b(e, this.context).index(this[0]) >= 0 : b.filter(e, this).length > 0
          : this.filter(e).length > 0)
      );
    },
    closest: function(e, t) {
      var n,
        r = 0,
        i = this.length,
        o = [],
        a = lt.test(e) || 'string' != typeof e ? b(e, t || this.context) : 0;
      for (; i > r; r++) {
        n = this[r];
        while (n && n.ownerDocument && n !== t && 11 !== n.nodeType) {
          if (a ? a.index(n) > -1 : b.find.matchesSelector(n, e)) {
            o.push(n);
            break;
          }
          n = n.parentNode;
        }
      }
      return this.pushStack(o.length > 1 ? b.unique(o) : o);
    },
    index: function(e) {
      return e
        ? 'string' == typeof e ? b.inArray(this[0], b(e)) : b.inArray(e.jquery ? e[0] : e, this)
        : this[0] && this[0].parentNode ? this.first().prevAll().length : -1;
    },
    add: function(e, t) {
      var n = 'string' == typeof e ? b(e, t) : b.makeArray(e && e.nodeType ? [e] : e),
        r = b.merge(this.get(), n);
      return this.pushStack(b.unique(r));
    },
    addBack: function(e) {
      return this.add(null == e ? this.prevObject : this.prevObject.filter(e));
    }
  }),
    (b.fn.andSelf = b.fn.addBack);
  function pt(e, t) {
    do e = e[t];
    while (e && 1 !== e.nodeType);
    return e;
  }
  b.each(
    {
      parent: function(e) {
        var t = e.parentNode;
        return t && 11 !== t.nodeType ? t : null;
      },
      parents: function(e) {
        return b.dir(e, 'parentNode');
      },
      parentsUntil: function(e, t, n) {
        return b.dir(e, 'parentNode', n);
      },
      next: function(e) {
        return pt(e, 'nextSibling');
      },
      prev: function(e) {
        return pt(e, 'previousSibling');
      },
      nextAll: function(e) {
        return b.dir(e, 'nextSibling');
      },
      prevAll: function(e) {
        return b.dir(e, 'previousSibling');
      },
      nextUntil: function(e, t, n) {
        return b.dir(e, 'nextSibling', n);
      },
      prevUntil: function(e, t, n) {
        return b.dir(e, 'previousSibling', n);
      },
      siblings: function(e) {
        return b.sibling((e.parentNode || {}).firstChild, e);
      },
      children: function(e) {
        return b.sibling(e.firstChild);
      },
      contents: function(e) {
        return b.nodeName(e, 'iframe') ? e.contentDocument || e.contentWindow.document : b.merge([], e.childNodes);
      }
    },
    function(e, t) {
      b.fn[e] = function(n, r) {
        var i = b.map(this, t, n);
        return (
          at.test(e) || (r = n),
          r && 'string' == typeof r && (i = b.filter(r, i)),
          (i = this.length > 1 && !ct[e] ? b.unique(i) : i),
          this.length > 1 && st.test(e) && (i = i.reverse()),
          this.pushStack(i)
        );
      };
    }
  ),
    b.extend({
      filter: function(e, t, n) {
        return n && (e = ':not(' + e + ')'), 1 === t.length ? (b.find.matchesSelector(t[0], e) ? [t[0]] : []) : b.find.matches(e, t);
      },
      dir: function(e, n, r) {
        var i = [],
          o = e[n];
        while (o && 9 !== o.nodeType && (r === t || 1 !== o.nodeType || !b(o).is(r))) 1 === o.nodeType && i.push(o), (o = o[n]);
        return i;
      },
      sibling: function(e, t) {
        var n = [];
        for (; e; e = e.nextSibling) 1 === e.nodeType && e !== t && n.push(e);
        return n;
      }
    });
  function ft(e, t, n) {
    if (((t = t || 0), b.isFunction(t)))
      return b.grep(e, function(e, r) {
        var i = !!t.call(e, r, e);
        return i === n;
      });
    if (t.nodeType)
      return b.grep(e, function(e) {
        return (e === t) === n;
      });
    if ('string' == typeof t) {
      var r = b.grep(e, function(e) {
        return 1 === e.nodeType;
      });
      if (ut.test(t)) return b.filter(t, r, !n);
      t = b.filter(t, r);
    }
    return b.grep(e, function(e) {
      return b.inArray(e, t) >= 0 === n;
    });
  }
  function dt(e) {
    var t = ht.split('|'),
      n = e.createDocumentFragment();
    Iif (n.createElement) while (t.length) n.createElement(t.pop());
    return n;
  }
  var ht =
      'abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video',
    gt = / jQuery\d+="(?:null|\d+)"/g,
    mt = RegExp('<(?:' + ht + ')[\\s/>]', 'i'),
    yt = /^\s+/,
    vt = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,
    bt = /<([\w:]+)/,
    xt = /<tbody/i,
    wt = /<|&#?\w+;/,
    Tt = /<(?:script|style|link)/i,
    Nt = /^(?:checkbox|radio)$/i,
    Ct = /checked\s*(?:[^=]|=\s*.checked.)/i,
    kt = /^$|\/(?:java|ecma)script/i,
    Et = /^true\/(.*)/,
    St = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,
    At = {
      option: [1, "<select multiple='multiple'>", '</select>'],
      legend: [1, '<fieldset>', '</fieldset>'],
      area: [1, '<map>', '</map>'],
      param: [1, '<object>', '</object>'],
      thead: [1, '<table>', '</table>'],
      tr: [2, '<table><tbody>', '</tbody></table>'],
      col: [2, '<table><tbody></tbody><colgroup>', '</colgroup></table>'],
      td: [3, '<table><tbody><tr>', '</tr></tbody></table>'],
      _default: b.support.htmlSerialize ? [0, '', ''] : [1, 'X<div>', '</div>']
    },
    jt = dt(o),
    Dt = jt.appendChild(o.createElement('div'));
  (At.optgroup = At.option),
    (At.tbody = At.tfoot = At.colgroup = At.caption = At.thead),
    (At.th = At.td),
    b.fn.extend({
      text: function(e) {
        return b.access(
          this,
          function(e) {
            return e === t ? b.text(this) : this.empty().append(((this[0] && this[0].ownerDocument) || o).createTextNode(e));
          },
          null,
          e,
          arguments.length
        );
      },
      wrapAll: function(e) {
        if (b.isFunction(e))
          return this.each(function(t) {
            b(this).wrapAll(e.call(this, t));
          });
        if (this[0]) {
          var t = b(e, this[0].ownerDocument)
            .eq(0)
            .clone(!0);
          this[0].parentNode && t.insertBefore(this[0]),
            t
              .map(function() {
                var e = this;
                while (e.firstChild && 1 === e.firstChild.nodeType) e = e.firstChild;
                return e;
              })
              .append(this);
        }
        return this;
      },
      wrapInner: function(e) {
        return b.isFunction(e)
          ? this.each(function(t) {
              b(this).wrapInner(e.call(this, t));
            })
          : this.each(function() {
              var t = b(this),
                n = t.contents();
              n.length ? n.wrapAll(e) : t.append(e);
            });
      },
      wrap: function(e) {
        var t = b.isFunction(e);
        return this.each(function(n) {
          b(this).wrapAll(t ? e.call(this, n) : e);
        });
      },
      unwrap: function() {
        return this.parent()
          .each(function() {
            b.nodeName(this, 'body') || b(this).replaceWith(this.childNodes);
          })
          .end();
      },
      append: function() {
        return this.domManip(arguments, !0, function(e) {
          (1 === this.nodeType || 11 === this.nodeType || 9 === this.nodeType) && this.appendChild(e);
        });
      },
      prepend: function() {
        return this.domManip(arguments, !0, function(e) {
          (1 === this.nodeType || 11 === this.nodeType || 9 === this.nodeType) && this.insertBefore(e, this.firstChild);
        });
      },
      before: function() {
        return this.domManip(arguments, !1, function(e) {
          this.parentNode && this.parentNode.insertBefore(e, this);
        });
      },
      after: function() {
        return this.domManip(arguments, !1, function(e) {
          this.parentNode && this.parentNode.insertBefore(e, this.nextSibling);
        });
      },
      remove: function(e, t) {
        var n,
          r = 0;
        for (; null != (n = this[r]); r++)
          (!e || b.filter(e, [n]).length > 0) &&
            (t || 1 !== n.nodeType || b.cleanData(Ot(n)),
            n.parentNode && (t && b.contains(n.ownerDocument, n) && Mt(Ot(n, 'script')), n.parentNode.removeChild(n)));
        return this;
      },
      empty: function() {
        var e,
          t = 0;
        for (; null != (e = this[t]); t++) {
          1 === e.nodeType && b.cleanData(Ot(e, !1));
          while (e.firstChild) e.removeChild(e.firstChild);
          e.options && b.nodeName(e, 'select') && (e.options.length = 0);
        }
        return this;
      },
      clone: function(e, t) {
        return (
          (e = null == e ? !1 : e),
          (t = null == t ? e : t),
          this.map(function() {
            return b.clone(this, e, t);
          })
        );
      },
      html: function(e) {
        return b.access(
          this,
          function(e) {
            var n = this[0] || {},
              r = 0,
              i = this.length;
            if (e === t) return 1 === n.nodeType ? n.innerHTML.replace(gt, '') : t;
            if (
              !(
                'string' != typeof e ||
                Tt.test(e) ||
                (!b.support.htmlSerialize && mt.test(e)) ||
                (!b.support.leadingWhitespace && yt.test(e)) ||
                At[(bt.exec(e) || ['', ''])[1].toLowerCase()]
              )
            ) {
              e = e.replace(vt, '<$1></$2>');
              try {
                for (; i > r; r++) (n = this[r] || {}), 1 === n.nodeType && (b.cleanData(Ot(n, !1)), (n.innerHTML = e));
                n = 0;
              } catch (o) {}
            }
            n && this.empty().append(e);
          },
          null,
          e,
          arguments.length
        );
      },
      replaceWith: function(e) {
        var t = b.isFunction(e);
        return (
          t ||
            'string' == typeof e ||
            (e = b(e)
              .not(this)
              .detach()),
          this.domManip([e], !0, function(e) {
            var t = this.nextSibling,
              n = this.parentNode;
            n && (b(this).remove(), n.insertBefore(e, t));
          })
        );
      },
      detach: function(e) {
        return this.remove(e, !0);
      },
      domManip: function(e, n, r) {
        e = f.apply([], e);
        var i,
          o,
          a,
          s,
          u,
          l,
          c = 0,
          p = this.length,
          d = this,
          h = p - 1,
          g = e[0],
          m = b.isFunction(g);
        if (m || (!(1 >= p || 'string' != typeof g || b.support.checkClone) && Ct.test(g)))
          return this.each(function(i) {
            var o = d.eq(i);
            m && (e[0] = g.call(this, i, n ? o.html() : t)), o.domManip(e, n, r);
          });
        if (p && ((l = b.buildFragment(e, this[0].ownerDocument, !1, this)), (i = l.firstChild), 1 === l.childNodes.length && (l = i), i)) {
          for (n = n && b.nodeName(i, 'tr'), s = b.map(Ot(l, 'script'), Ht), a = s.length; p > c; c++)
            (o = l),
              c !== h && ((o = b.clone(o, !0, !0)), a && b.merge(s, Ot(o, 'script'))),
              r.call(n && b.nodeName(this[c], 'table') ? Lt(this[c], 'tbody') : this[c], o, c);
          if (a)
            for (u = s[s.length - 1].ownerDocument, b.map(s, qt), c = 0; a > c; c++)
              (o = s[c]),
                kt.test(o.type || '') &&
                  !b._data(o, 'globalEval') &&
                  b.contains(u, o) &&
                  (o.src
                    ? b.ajax({ url: o.src, type: 'GET', dataType: 'script', async: !1, global: !1, throws: !0 })
                    : b.globalEval((o.text || o.textContent || o.innerHTML || '').replace(St, '')));
          l = i = null;
        }
        return this;
      }
    });
  function Lt(e, t) {
    return e.getElementsByTagName(t)[0] || e.appendChild(e.ownerDocument.createElement(t));
  }
  function Ht(e) {
    var t = e.getAttributeNode('type');
    return (e.type = (t && t.specified) + '/' + e.type), e;
  }
  function qt(e) {
    var t = Et.exec(e.type);
    return t ? (e.type = t[1]) : e.removeAttribute('type'), e;
  }
  function Mt(e, t) {
    var n,
      r = 0;
    for (; null != (n = e[r]); r++) b._data(n, 'globalEval', !t || b._data(t[r], 'globalEval'));
  }
  function _t(e, t) {
    if (1 === t.nodeType && b.hasData(e)) {
      var n,
        r,
        i,
        o = b._data(e),
        a = b._data(t, o),
        s = o.events;
      if (s) {
        delete a.handle, (a.events = {});
        for (n in s) for (r = 0, i = s[n].length; i > r; r++) b.event.add(t, n, s[n][r]);
      }
      a.data && (a.data = b.extend({}, a.data));
    }
  }
  function Ft(e, t) {
    var n, r, i;
    if (1 === t.nodeType) {
      if (((n = t.nodeName.toLowerCase()), !b.support.noCloneEvent && t[b.expando])) {
        i = b._data(t);
        for (r in i.events) b.removeEvent(t, r, i.handle);
        t.removeAttribute(b.expando);
      }
      'script' === n && t.text !== e.text
        ? ((Ht(t).text = e.text), qt(t))
        : 'object' === n
          ? (t.parentNode && (t.outerHTML = e.outerHTML),
            b.support.html5Clone && e.innerHTML && !b.trim(t.innerHTML) && (t.innerHTML = e.innerHTML))
          : 'input' === n && Nt.test(e.type)
            ? ((t.defaultChecked = t.checked = e.checked), t.value !== e.value && (t.value = e.value))
            : 'option' === n
              ? (t.defaultSelected = t.selected = e.defaultSelected)
              : ('input' === n || 'textarea' === n) && (t.defaultValue = e.defaultValue);
    }
  }
  b.each({ appendTo: 'append', prependTo: 'prepend', insertBefore: 'before', insertAfter: 'after', replaceAll: 'replaceWith' }, function(
    e,
    t
  ) {
    b.fn[e] = function(e) {
      var n,
        r = 0,
        i = [],
        o = b(e),
        a = o.length - 1;
      for (; a >= r; r++) (n = r === a ? this : this.clone(!0)), b(o[r])[t](n), d.apply(i, n.get());
      return this.pushStack(i);
    };
  });
  function Ot(e, n) {
    var r,
      o,
      a = 0,
      s =
        typeof e.getElementsByTagName !== i
          ? e.getElementsByTagName(n || '*')
          : typeof e.querySelectorAll !== i ? e.querySelectorAll(n || '*') : t;
    Iif (!s) for (s = [], r = e.childNodes || e; null != (o = r[a]); a++) !n || b.nodeName(o, n) ? s.push(o) : b.merge(s, Ot(o, n));
    return n === t || (n && b.nodeName(e, n)) ? b.merge([e], s) : s;
  }
  function Bt(e) {
    Nt.test(e.type) && (e.defaultChecked = e.checked);
  }
  b.extend({
    clone: function(e, t, n) {
      var r,
        i,
        o,
        a,
        s,
        u = b.contains(e.ownerDocument, e);
      if (
        (b.support.html5Clone || b.isXMLDoc(e) || !mt.test('<' + e.nodeName + '>')
          ? (o = e.cloneNode(!0))
          : ((Dt.innerHTML = e.outerHTML), Dt.removeChild((o = Dt.firstChild))),
        !((b.support.noCloneEvent && b.support.noCloneChecked) || (1 !== e.nodeType && 11 !== e.nodeType) || b.isXMLDoc(e)))
      )
        for (r = Ot(o), s = Ot(e), a = 0; null != (i = s[a]); ++a) r[a] && Ft(i, r[a]);
      if (t)
        if (n) for (s = s || Ot(e), r = r || Ot(o), a = 0; null != (i = s[a]); a++) _t(i, r[a]);
        else _t(e, o);
      return (r = Ot(o, 'script')), r.length > 0 && Mt(r, !u && Ot(e, 'script')), (r = s = i = null), o;
    },
    buildFragment: function(e, t, n, r) {
      var i,
        o,
        a,
        s,
        u,
        l,
        c,
        p = e.length,
        f = dt(t),
        d = [],
        h = 0;
      for (; p > h; h++)
        Eif (((o = e[h]), o || 0 === o))
          Iif ('object' === b.type(o)) b.merge(d, o.nodeType ? [o] : o);
          else Eif (wt.test(o)) {
            (s = s || f.appendChild(t.createElement('div'))),
              (u = (bt.exec(o) || ['', ''])[1].toLowerCase()),
              (c = At[u] || At._default),
              (s.innerHTML = c[1] + o.replace(vt, '<$1></$2>') + c[2]),
              (i = c[0]);
            while (i--) s = s.lastChild;
            Iif ((!b.support.leadingWhitespace && yt.test(o) && d.push(t.createTextNode(yt.exec(o)[0])), !b.support.tbody)) {
              (o = 'table' !== u || xt.test(o) ? ('<table>' !== c[1] || xt.test(o) ? 0 : s) : s.firstChild), (i = o && o.childNodes.length);
              while (i--) b.nodeName((l = o.childNodes[i]), 'tbody') && !l.childNodes.length && o.removeChild(l);
            }
            b.merge(d, s.childNodes), (s.textContent = '');
            while (s.firstChild) s.removeChild(s.firstChild);
            s = f.lastChild;
          } else d.push(t.createTextNode(o));
      s && f.removeChild(s), b.support.appendChecked || b.grep(Ot(d, 'input'), Bt), (h = 0);
      while ((o = d[h++]))
        Iif ((!r || -1 === b.inArray(o, r)) && ((a = b.contains(o.ownerDocument, o)), (s = Ot(f.appendChild(o), 'script')), a && Mt(s), n)) {
          i = 0;
          while ((o = s[i++])) kt.test(o.type || '') && n.push(o);
        }
      return (s = null), f;
    },
    cleanData: function(e, t) {
      var n,
        r,
        o,
        a,
        s = 0,
        u = b.expando,
        l = b.cache,
        p = b.support.deleteExpando,
        f = b.event.special;
      for (; null != (n = e[s]); s++)
        Eif ((t || b.acceptData(n)) && ((o = n[u]), (a = o && l[o]))) {
          Iif (a.events) for (r in a.events) f[r] ? b.event.remove(n, r) : b.removeEvent(n, r, a.handle);
          l[o] && (delete l[o], p ? delete n[u] : typeof n.removeAttribute !== i ? n.removeAttribute(u) : (n[u] = null), c.push(o));
        }
    }
  });
  var Pt,
    Rt,
    Wt,
    $t = /alpha\([^)]*\)/i,
    It = /opacity\s*=\s*([^)]*)/,
    zt = /^(top|right|bottom|left)$/,
    Xt = /^(none|table(?!-c[ea]).+)/,
    Ut = /^margin/,
    Vt = RegExp('^(' + x + ')(.*)$', 'i'),
    Yt = RegExp('^(' + x + ')(?!px)[a-z%]+$', 'i'),
    Jt = RegExp('^([+-])=(' + x + ')', 'i'),
    Gt = { BODY: 'block' },
    Qt = { position: 'absolute', visibility: 'hidden', display: 'block' },
    Kt = { letterSpacing: 0, fontWeight: 400 },
    Zt = ['Top', 'Right', 'Bottom', 'Left'],
    en = ['Webkit', 'O', 'Moz', 'ms'];
  function tn(e, t) {
    if (t in e) return t;
    var n = t.charAt(0).toUpperCase() + t.slice(1),
      r = t,
      i = en.length;
    while (i--) if (((t = en[i] + n), t in e)) return t;
    return r;
  }
  function nn(e, t) {
    return (e = t || e), 'none' === b.css(e, 'display') || !b.contains(e.ownerDocument, e);
  }
  function rn(e, t) {
    var n,
      r,
      i,
      o = [],
      a = 0,
      s = e.length;
    for (; s > a; a++)
      (r = e[a]),
        r.style &&
          ((o[a] = b._data(r, 'olddisplay')),
          (n = r.style.display),
          t
            ? (o[a] || 'none' !== n || (r.style.display = ''),
              '' === r.style.display && nn(r) && (o[a] = b._data(r, 'olddisplay', un(r.nodeName))))
            : o[a] || ((i = nn(r)), ((n && 'none' !== n) || !i) && b._data(r, 'olddisplay', i ? n : b.css(r, 'display'))));
    for (a = 0; s > a; a++)
      (r = e[a]), r.style && ((t && 'none' !== r.style.display && '' !== r.style.display) || (r.style.display = t ? o[a] || '' : 'none'));
    return e;
  }
  b.fn.extend({
    css: function(e, n) {
      return b.access(
        this,
        function(e, n, r) {
          var i,
            o,
            a = {},
            s = 0;
          if (b.isArray(n)) {
            for (o = Rt(e), i = n.length; i > s; s++) a[n[s]] = b.css(e, n[s], !1, o);
            return a;
          }
          return r !== t ? b.style(e, n, r) : b.css(e, n);
        },
        e,
        n,
        arguments.length > 1
      );
    },
    show: function() {
      return rn(this, !0);
    },
    hide: function() {
      return rn(this);
    },
    toggle: function(e) {
      var t = 'boolean' == typeof e;
      return this.each(function() {
        (t ? e : nn(this)) ? b(this).show() : b(this).hide();
      });
    }
  }),
    b.extend({
      cssHooks: {
        opacity: {
          get: function(e, t) {
            if (t) {
              var n = Wt(e, 'opacity');
              return '' === n ? '1' : n;
            }
          }
        }
      },
      cssNumber: {
        columnCount: !0,
        fillOpacity: !0,
        fontWeight: !0,
        lineHeight: !0,
        opacity: !0,
        orphans: !0,
        widows: !0,
        zIndex: !0,
        zoom: !0
      },
      cssProps: { float: b.support.cssFloat ? 'cssFloat' : 'styleFloat' },
      style: function(e, n, r, i) {
        if (e && 3 !== e.nodeType && 8 !== e.nodeType && e.style) {
          var o,
            a,
            s,
            u = b.camelCase(n),
            l = e.style;
          if (((n = b.cssProps[u] || (b.cssProps[u] = tn(l, u))), (s = b.cssHooks[n] || b.cssHooks[u]), r === t))
            return s && 'get' in s && (o = s.get(e, !1, i)) !== t ? o : l[n];
          if (
            ((a = typeof r),
            'string' === a && (o = Jt.exec(r)) && ((r = (o[1] + 1) * o[2] + parseFloat(b.css(e, n))), (a = 'number')),
            !(
              null == r ||
              ('number' === a && isNaN(r)) ||
              ('number' !== a || b.cssNumber[u] || (r += 'px'),
              b.support.clearCloneStyle || '' !== r || 0 !== n.indexOf('background') || (l[n] = 'inherit'),
              s && 'set' in s && (r = s.set(e, r, i)) === t)
            ))
          )
            try {
              l[n] = r;
            } catch (c) {}
        }
      },
      css: function(e, n, r, i) {
        var o,
          a,
          s,
          u = b.camelCase(n);
        return (
          (n = b.cssProps[u] || (b.cssProps[u] = tn(e.style, u))),
          (s = b.cssHooks[n] || b.cssHooks[u]),
          s && 'get' in s && (a = s.get(e, !0, r)),
          a === t && (a = Wt(e, n, i)),
          'normal' === a && n in Kt && (a = Kt[n]),
          '' === r || r ? ((o = parseFloat(a)), r === !0 || b.isNumeric(o) ? o || 0 : a) : a
        );
      },
      swap: function(e, t, n, r) {
        var i,
          o,
          a = {};
        for (o in t) (a[o] = e.style[o]), (e.style[o] = t[o]);
        i = n.apply(e, r || []);
        for (o in t) e.style[o] = a[o];
        return i;
      }
    }),
    e.getComputedStyle
      ? ((Rt = function(t) {
          return e.getComputedStyle(t, null);
        }),
        (Wt = function(e, n, r) {
          var i,
            o,
            a,
            s = r || Rt(e),
            u = s ? s.getPropertyValue(n) || s[n] : t,
            l = e.style;
          return (
            s &&
              ('' !== u || b.contains(e.ownerDocument, e) || (u = b.style(e, n)),
              Yt.test(u) &&
                Ut.test(n) &&
                ((i = l.width),
                (o = l.minWidth),
                (a = l.maxWidth),
                (l.minWidth = l.maxWidth = l.width = u),
                (u = s.width),
                (l.width = i),
                (l.minWidth = o),
                (l.maxWidth = a))),
            u
          );
        }))
      : o.documentElement.currentStyle &&
        ((Rt = function(e) {
          return e.currentStyle;
        }),
        (Wt = function(e, n, r) {
          var i,
            o,
            a,
            s = r || Rt(e),
            u = s ? s[n] : t,
            l = e.style;
          return (
            null == u && l && l[n] && (u = l[n]),
            Yt.test(u) &&
              !zt.test(n) &&
              ((i = l.left),
              (o = e.runtimeStyle),
              (a = o && o.left),
              a && (o.left = e.currentStyle.left),
              (l.left = 'fontSize' === n ? '1em' : u),
              (u = l.pixelLeft + 'px'),
              (l.left = i),
              a && (o.left = a)),
            '' === u ? 'auto' : u
          );
        }));
  function on(e, t, n) {
    var r = Vt.exec(t);
    return r ? Math.max(0, r[1] - (n || 0)) + (r[2] || 'px') : t;
  }
  function an(e, t, n, r, i) {
    var o = n === (r ? 'border' : 'content') ? 4 : 'width' === t ? 1 : 0,
      a = 0;
    for (; 4 > o; o += 2)
      'margin' === n && (a += b.css(e, n + Zt[o], !0, i)),
        r
          ? ('content' === n && (a -= b.css(e, 'padding' + Zt[o], !0, i)),
            'margin' !== n && (a -= b.css(e, 'border' + Zt[o] + 'Width', !0, i)))
          : ((a += b.css(e, 'padding' + Zt[o], !0, i)), 'padding' !== n && (a += b.css(e, 'border' + Zt[o] + 'Width', !0, i)));
    return a;
  }
  function sn(e, t, n) {
    var r = !0,
      i = 'width' === t ? e.offsetWidth : e.offsetHeight,
      o = Rt(e),
      a = b.support.boxSizing && 'border-box' === b.css(e, 'boxSizing', !1, o);
    if (0 >= i || null == i) {
      if (((i = Wt(e, t, o)), (0 > i || null == i) && (i = e.style[t]), Yt.test(i))) return i;
      (r = a && (b.support.boxSizingReliable || i === e.style[t])), (i = parseFloat(i) || 0);
    }
    return i + an(e, t, n || (a ? 'border' : 'content'), r, o) + 'px';
  }
  function un(e) {
    var t = o,
      n = Gt[e];
    return (
      n ||
        ((n = ln(e, t)),
        ('none' !== n && n) ||
          ((Pt = (Pt || b("<iframe frameborder='0' width='0' height='0'/>").css('cssText', 'display:block !important')).appendTo(
            t.documentElement
          )),
          (t = (Pt[0].contentWindow || Pt[0].contentDocument).document),
          t.write('<!doctype html><html><body>'),
          t.close(),
          (n = ln(e, t)),
          Pt.detach()),
        (Gt[e] = n)),
      n
    );
  }
  function ln(e, t) {
    var n = b(t.createElement(e)).appendTo(t.body),
      r = b.css(n[0], 'display');
    return n.remove(), r;
  }
  b.each(['height', 'width'], function(e, n) {
    b.cssHooks[n] = {
      get: function(e, r, i) {
        return r
          ? 0 === e.offsetWidth && Xt.test(b.css(e, 'display'))
            ? b.swap(e, Qt, function() {
                return sn(e, n, i);
              })
            : sn(e, n, i)
          : t;
      },
      set: function(e, t, r) {
        var i = r && Rt(e);
        return on(e, t, r ? an(e, n, r, b.support.boxSizing && 'border-box' === b.css(e, 'boxSizing', !1, i), i) : 0);
      }
    };
  }),
    b.support.opacity ||
      (b.cssHooks.opacity = {
        get: function(e, t) {
          return It.test((t && e.currentStyle ? e.currentStyle.filter : e.style.filter) || '')
            ? 0.01 * parseFloat(RegExp.$1) + ''
            : t ? '1' : '';
        },
        set: function(e, t) {
          var n = e.style,
            r = e.currentStyle,
            i = b.isNumeric(t) ? 'alpha(opacity=' + 100 * t + ')' : '',
            o = (r && r.filter) || n.filter || '';
          (n.zoom = 1),
            ((t >= 1 || '' === t) &&
              '' === b.trim(o.replace($t, '')) &&
              n.removeAttribute &&
              (n.removeAttribute('filter'), '' === t || (r && !r.filter))) ||
              (n.filter = $t.test(o) ? o.replace($t, i) : o + ' ' + i);
        }
      }),
    b(function() {
      b.support.reliableMarginRight ||
        (b.cssHooks.marginRight = {
          get: function(e, n) {
            return n ? b.swap(e, { display: 'inline-block' }, Wt, [e, 'marginRight']) : t;
          }
        }),
        !b.support.pixelPosition &&
          b.fn.position &&
          b.each(['top', 'left'], function(e, n) {
            b.cssHooks[n] = {
              get: function(e, r) {
                return r ? ((r = Wt(e, n)), Yt.test(r) ? b(e).position()[n] + 'px' : r) : t;
              }
            };
          });
    }),
    b.expr &&
      b.expr.filters &&
      ((b.expr.filters.hidden = function(e) {
        return (
          (0 >= e.offsetWidth && 0 >= e.offsetHeight) ||
          (!b.support.reliableHiddenOffsets && 'none' === ((e.style && e.style.display) || b.css(e, 'display')))
        );
      }),
      (b.expr.filters.visible = function(e) {
        return !b.expr.filters.hidden(e);
      })),
    b.each({ margin: '', padding: '', border: 'Width' }, function(e, t) {
      (b.cssHooks[e + t] = {
        expand: function(n) {
          var r = 0,
            i = {},
            o = 'string' == typeof n ? n.split(' ') : [n];
          for (; 4 > r; r++) i[e + Zt[r] + t] = o[r] || o[r - 2] || o[0];
          return i;
        }
      }),
        Ut.test(e) || (b.cssHooks[e + t].set = on);
    });
  var cn = /%20/g,
    pn = /\[\]$/,
    fn = /\r?\n/g,
    dn = /^(?:submit|button|image|reset|file)$/i,
    hn = /^(?:input|select|textarea|keygen)/i;
  b.fn.extend({
    serialize: function() {
      return b.param(this.serializeArray());
    },
    serializeArray: function() {
      return this.map(function() {
        var e = b.prop(this, 'elements');
        return e ? b.makeArray(e) : this;
      })
        .filter(function() {
          var e = this.type;
          return this.name && !b(this).is(':disabled') && hn.test(this.nodeName) && !dn.test(e) && (this.checked || !Nt.test(e));
        })
        .map(function(e, t) {
          var n = b(this).val();
          return null == n
            ? null
            : b.isArray(n)
              ? b.map(n, function(e) {
                  return { name: t.name, value: e.replace(fn, '\r\n') };
                })
              : { name: t.name, value: n.replace(fn, '\r\n') };
        })
        .get();
    }
  }),
    (b.param = function(e, n) {
      var r,
        i = [],
        o = function(e, t) {
          (t = b.isFunction(t) ? t() : null == t ? '' : t), (i[i.length] = encodeURIComponent(e) + '=' + encodeURIComponent(t));
        };
      if ((n === t && (n = b.ajaxSettings && b.ajaxSettings.traditional), b.isArray(e) || (e.jquery && !b.isPlainObject(e))))
        b.each(e, function() {
          o(this.name, this.value);
        });
      else for (r in e) gn(r, e[r], n, o);
      return i.join('&').replace(cn, '+');
    });
  function gn(e, t, n, r) {
    var i;
    if (b.isArray(t))
      b.each(t, function(t, i) {
        n || pn.test(e) ? r(e, i) : gn(e + '[' + ('object' == typeof i ? t : '') + ']', i, n, r);
      });
    else if (n || 'object' !== b.type(t)) r(e, t);
    else for (i in t) gn(e + '[' + i + ']', t[i], n, r);
  }
  b.each(
    'blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu'.split(
      ' '
    ),
    function(e, t) {
      b.fn[t] = function(e, n) {
        return arguments.length > 0 ? this.on(t, null, e, n) : this.trigger(t);
      };
    }
  ),
    (b.fn.hover = function(e, t) {
      return this.mouseenter(e).mouseleave(t || e);
    });
  var mn,
    yn,
    vn = b.now(),
    bn = /\?/,
    xn = /#.*$/,
    wn = /([?&])_=[^&]*/,
    Tn = /^(.*?):[ \t]*([^\r\n]*)\r?$/gm,
    Nn = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/,
    Cn = /^(?:GET|HEAD)$/,
    kn = /^\/\//,
    En = /^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,
    Sn = b.fn.load,
    An = {},
    jn = {},
    Dn = '*/'.concat('*');
  try {
    yn = a.href;
  } catch (Ln) {
    (yn = o.createElement('a')), (yn.href = ''), (yn = yn.href);
  }
  mn = En.exec(yn.toLowerCase()) || [];
  function Hn(e) {
    return function(t, n) {
      'string' != typeof t && ((n = t), (t = '*'));
      var r,
        i = 0,
        o = t.toLowerCase().match(w) || [];
      Eif (b.isFunction(n))
        while ((r = o[i++])) '+' === r[0] ? ((r = r.slice(1) || '*'), (e[r] = e[r] || []).unshift(n)) : (e[r] = e[r] || []).push(n);
    };
  }
  function qn(e, n, r, i) {
    var o = {},
      a = e === jn;
    function s(u) {
      var l;
      return (
        (o[u] = !0),
        b.each(e[u] || [], function(e, u) {
          var c = u(n, r, i);
          return 'string' != typeof c || a || o[c] ? (a ? !(l = c) : t) : (n.dataTypes.unshift(c), s(c), !1);
        }),
        l
      );
    }
    return s(n.dataTypes[0]) || (!o['*'] && s('*'));
  }
  function Mn(e, n) {
    var r,
      i,
      o = b.ajaxSettings.flatOptions || {};
    for (i in n) n[i] !== t && ((o[i] ? e : r || (r = {}))[i] = n[i]);
    return r && b.extend(!0, e, r), e;
  }
  (b.fn.load = function(e, n, r) {
    if ('string' != typeof e && Sn) return Sn.apply(this, arguments);
    var i,
      o,
      a,
      s = this,
      u = e.indexOf(' ');
    return (
      u >= 0 && ((i = e.slice(u, e.length)), (e = e.slice(0, u))),
      b.isFunction(n) ? ((r = n), (n = t)) : n && 'object' == typeof n && (a = 'POST'),
      s.length > 0 &&
        b
          .ajax({ url: e, type: a, dataType: 'html', data: n })
          .done(function(e) {
            (o = arguments),
              s.html(
                i
                  ? b('<div>')
                      .append(b.parseHTML(e))
                      .find(i)
                  : e
              );
          })
          .complete(
            r &&
              function(e, t) {
                s.each(r, o || [e.responseText, t, e]);
              }
          ),
      this
    );
  }),
    b.each(['ajaxStart', 'ajaxStop', 'ajaxComplete', 'ajaxError', 'ajaxSuccess', 'ajaxSend'], function(e, t) {
      b.fn[t] = function(e) {
        return this.on(t, e);
      };
    }),
    b.each(['get', 'post'], function(e, n) {
      b[n] = function(e, r, i, o) {
        return b.isFunction(r) && ((o = o || i), (i = r), (r = t)), b.ajax({ url: e, type: n, dataType: o, data: r, success: i });
      };
    }),
    b.extend({
      active: 0,
      lastModified: {},
      etag: {},
      ajaxSettings: {
        url: yn,
        type: 'GET',
        isLocal: Nn.test(mn[1]),
        global: !0,
        processData: !0,
        async: !0,
        contentType: 'application/x-www-form-urlencoded; charset=UTF-8',
        accepts: {
          '*': Dn,
          text: 'text/plain',
          html: 'text/html',
          xml: 'application/xml, text/xml',
          json: 'application/json, text/javascript'
        },
        contents: { xml: /xml/, html: /html/, json: /json/ },
        responseFields: { xml: 'responseXML', text: 'responseText' },
        converters: { '* text': e.String, 'text html': !0, 'text json': b.parseJSON, 'text xml': b.parseXML },
        flatOptions: { url: !0, context: !0 }
      },
      ajaxSetup: function(e, t) {
        return t ? Mn(Mn(e, b.ajaxSettings), t) : Mn(b.ajaxSettings, e);
      },
      ajaxPrefilter: Hn(An),
      ajaxTransport: Hn(jn),
      ajax: function(e, n) {
        'object' == typeof e && ((n = e), (e = t)), (n = n || {});
        var r,
          i,
          o,
          a,
          s,
          u,
          l,
          c,
          p = b.ajaxSetup({}, n),
          f = p.context || p,
          d = p.context && (f.nodeType || f.jquery) ? b(f) : b.event,
          h = b.Deferred(),
          g = b.Callbacks('once memory'),
          m = p.statusCode || {},
          y = {},
          v = {},
          x = 0,
          T = 'canceled',
          N = {
            readyState: 0,
            getResponseHeader: function(e) {
              var t;
              if (2 === x) {
                if (!c) {
                  c = {};
                  while ((t = Tn.exec(a))) c[t[1].toLowerCase()] = t[2];
                }
                t = c[e.toLowerCase()];
              }
              return null == t ? null : t;
            },
            getAllResponseHeaders: function() {
              return 2 === x ? a : null;
            },
            setRequestHeader: function(e, t) {
              var n = e.toLowerCase();
              return x || ((e = v[n] = v[n] || e), (y[e] = t)), this;
            },
            overrideMimeType: function(e) {
              return x || (p.mimeType = e), this;
            },
            statusCode: function(e) {
              var t;
              if (e)
                if (2 > x) for (t in e) m[t] = [m[t], e[t]];
                else N.always(e[N.status]);
              return this;
            },
            abort: function(e) {
              var t = e || T;
              return l && l.abort(t), k(0, t), this;
            }
          };
        if (
          ((h.promise(N).complete = g.add),
          (N.success = N.done),
          (N.error = N.fail),
          (p.url = ((e || p.url || yn) + '').replace(xn, '').replace(kn, mn[1] + '//')),
          (p.type = n.method || n.type || p.method || p.type),
          (p.dataTypes = b
            .trim(p.dataType || '*')
            .toLowerCase()
            .match(w) || ['']),
          null == p.crossDomain &&
            ((r = En.exec(p.url.toLowerCase())),
            (p.crossDomain = !(
              !r ||
              (r[1] === mn[1] && r[2] === mn[2] && (r[3] || ('http:' === r[1] ? 80 : 443)) == (mn[3] || ('http:' === mn[1] ? 80 : 443)))
            ))),
          p.data && p.processData && 'string' != typeof p.data && (p.data = b.param(p.data, p.traditional)),
          qn(An, p, n, N),
          2 === x)
        )
          return N;
        (u = p.global),
          u && 0 === b.active++ && b.event.trigger('ajaxStart'),
          (p.type = p.type.toUpperCase()),
          (p.hasContent = !Cn.test(p.type)),
          (o = p.url),
          p.hasContent ||
            (p.data && ((o = p.url += (bn.test(o) ? '&' : '?') + p.data), delete p.data),
            p.cache === !1 && (p.url = wn.test(o) ? o.replace(wn, '$1_=' + vn++) : o + (bn.test(o) ? '&' : '?') + '_=' + vn++)),
          p.ifModified &&
            (b.lastModified[o] && N.setRequestHeader('If-Modified-Since', b.lastModified[o]),
            b.etag[o] && N.setRequestHeader('If-None-Match', b.etag[o])),
          ((p.data && p.hasContent && p.contentType !== !1) || n.contentType) && N.setRequestHeader('Content-Type', p.contentType),
          N.setRequestHeader(
            'Accept',
            p.dataTypes[0] && p.accepts[p.dataTypes[0]]
              ? p.accepts[p.dataTypes[0]] + ('*' !== p.dataTypes[0] ? ', ' + Dn + '; q=0.01' : '')
              : p.accepts['*']
          );
        for (i in p.headers) N.setRequestHeader(i, p.headers[i]);
        if (p.beforeSend && (p.beforeSend.call(f, N, p) === !1 || 2 === x)) return N.abort();
        T = 'abort';
        for (i in { success: 1, error: 1, complete: 1 }) N[i](p[i]);
        if ((l = qn(jn, p, n, N))) {
          (N.readyState = 1),
            u && d.trigger('ajaxSend', [N, p]),
            p.async &&
              p.timeout > 0 &&
              (s = setTimeout(function() {
                N.abort('timeout');
              }, p.timeout));
          try {
            (x = 1), l.send(y, k);
          } catch (C) {
            if (!(2 > x)) throw C;
            k(-1, C);
          }
        } else k(-1, 'No Transport');
        function k(e, n, r, i) {
          var c,
            y,
            v,
            w,
            T,
            C = n;
          2 !== x &&
            ((x = 2),
            s && clearTimeout(s),
            (l = t),
            (a = i || ''),
            (N.readyState = e > 0 ? 4 : 0),
            r && (w = _n(p, N, r)),
            (e >= 200 && 300 > e) || 304 === e
              ? (p.ifModified &&
                  ((T = N.getResponseHeader('Last-Modified')),
                  T && (b.lastModified[o] = T),
                  (T = N.getResponseHeader('etag')),
                  T && (b.etag[o] = T)),
                204 === e
                  ? ((c = !0), (C = 'nocontent'))
                  : 304 === e ? ((c = !0), (C = 'notmodified')) : ((c = Fn(p, w)), (C = c.state), (y = c.data), (v = c.error), (c = !v)))
              : ((v = C), (e || !C) && ((C = 'error'), 0 > e && (e = 0))),
            (N.status = e),
            (N.statusText = (n || C) + ''),
            c ? h.resolveWith(f, [y, C, N]) : h.rejectWith(f, [N, C, v]),
            N.statusCode(m),
            (m = t),
            u && d.trigger(c ? 'ajaxSuccess' : 'ajaxError', [N, p, c ? y : v]),
            g.fireWith(f, [N, C]),
            u && (d.trigger('ajaxComplete', [N, p]), --b.active || b.event.trigger('ajaxStop')));
        }
        return N;
      },
      getScript: function(e, n) {
        return b.get(e, t, n, 'script');
      },
      getJSON: function(e, t, n) {
        return b.get(e, t, n, 'json');
      }
    });
  function _n(e, n, r) {
    var i,
      o,
      a,
      s,
      u = e.contents,
      l = e.dataTypes,
      c = e.responseFields;
    for (s in c) s in r && (n[c[s]] = r[s]);
    while ('*' === l[0]) l.shift(), o === t && (o = e.mimeType || n.getResponseHeader('Content-Type'));
    if (o)
      for (s in u)
        if (u[s] && u[s].test(o)) {
          l.unshift(s);
          break;
        }
    if (l[0] in r) a = l[0];
    else {
      for (s in r) {
        if (!l[0] || e.converters[s + ' ' + l[0]]) {
          a = s;
          break;
        }
        i || (i = s);
      }
      a = a || i;
    }
    return a ? (a !== l[0] && l.unshift(a), r[a]) : t;
  }
  function Fn(e, t) {
    var n,
      r,
      i,
      o,
      a = {},
      s = 0,
      u = e.dataTypes.slice(),
      l = u[0];
    if ((e.dataFilter && (t = e.dataFilter(t, e.dataType)), u[1])) for (i in e.converters) a[i.toLowerCase()] = e.converters[i];
    for (; (r = u[++s]); )
      if ('*' !== r) {
        if ('*' !== l && l !== r) {
          if (((i = a[l + ' ' + r] || a['* ' + r]), !i))
            for (n in a)
              if (((o = n.split(' ')), o[1] === r && (i = a[l + ' ' + o[0]] || a['* ' + o[0]]))) {
                i === !0 ? (i = a[n]) : a[n] !== !0 && ((r = o[0]), u.splice(s--, 0, r));
                break;
              }
          if (i !== !0)
            if (i && e['throws']) t = i(t);
            else
              try {
                t = i(t);
              } catch (c) {
                return { state: 'parsererror', error: i ? c : 'No conversion from ' + l + ' to ' + r };
              }
        }
        l = r;
      }
    return { state: 'success', data: t };
  }
  b.ajaxSetup({
    accepts: { script: 'text/javascript, application/javascript, application/ecmascript, application/x-ecmascript' },
    contents: { script: /(?:java|ecma)script/ },
    converters: {
      'text script': function(e) {
        return b.globalEval(e), e;
      }
    }
  }),
    b.ajaxPrefilter('script', function(e) {
      e.cache === t && (e.cache = !1), e.crossDomain && ((e.type = 'GET'), (e.global = !1));
    }),
    b.ajaxTransport('script', function(e) {
      if (e.crossDomain) {
        var n,
          r = o.head || b('head')[0] || o.documentElement;
        return {
          send: function(t, i) {
            (n = o.createElement('script')),
              (n.async = !0),
              e.scriptCharset && (n.charset = e.scriptCharset),
              (n.src = e.url),
              (n.onload = n.onreadystatechange = function(e, t) {
                (t || !n.readyState || /loaded|complete/.test(n.readyState)) &&
                  ((n.onload = n.onreadystatechange = null),
                  n.parentNode && n.parentNode.removeChild(n),
                  (n = null),
                  t || i(200, 'success'));
              }),
              r.insertBefore(n, r.firstChild);
          },
          abort: function() {
            n && n.onload(t, !0);
          }
        };
      }
    });
  var On = [],
    Bn = /(=)\?(?=&|$)|\?\?/;
  b.ajaxSetup({
    jsonp: 'callback',
    jsonpCallback: function() {
      var e = On.pop() || b.expando + '_' + vn++;
      return (this[e] = !0), e;
    }
  }),
    b.ajaxPrefilter('json jsonp', function(n, r, i) {
      var o,
        a,
        s,
        u =
          n.jsonp !== !1 &&
          (Bn.test(n.url)
            ? 'url'
            : 'string' == typeof n.data &&
              !(n.contentType || '').indexOf('application/x-www-form-urlencoded') &&
              Bn.test(n.data) &&
              'data');
      return u || 'jsonp' === n.dataTypes[0]
        ? ((o = n.jsonpCallback = b.isFunction(n.jsonpCallback) ? n.jsonpCallback() : n.jsonpCallback),
          u ? (n[u] = n[u].replace(Bn, '$1' + o)) : n.jsonp !== !1 && (n.url += (bn.test(n.url) ? '&' : '?') + n.jsonp + '=' + o),
          (n.converters['script json'] = function() {
            return s || b.error(o + ' was not called'), s[0];
          }),
          (n.dataTypes[0] = 'json'),
          (a = e[o]),
          (e[o] = function() {
            s = arguments;
          }),
          i.always(function() {
            (e[o] = a), n[o] && ((n.jsonpCallback = r.jsonpCallback), On.push(o)), s && b.isFunction(a) && a(s[0]), (s = a = t);
          }),
          'script')
        : t;
    });
  var Pn,
    Rn,
    Wn = 0,
    $n =
      e.ActiveXObject &&
      function() {
        var e;
        for (e in Pn) Pn[e](t, !0);
      };
  function In() {
    try {
      return new e.XMLHttpRequest();
    } catch (t) {}
  }
  function zn() {
    try {
      return new e.ActiveXObject('Microsoft.XMLHTTP');
    } catch (t) {}
  }
  (b.ajaxSettings.xhr = e.ActiveXObject
    ? function() {
        return (!this.isLocal && In()) || zn();
      }
    : In),
    (Rn = b.ajaxSettings.xhr()),
    (b.support.cors = !!Rn && 'withCredentials' in Rn),
    (Rn = b.support.ajax = !!Rn),
    Rn &&
      b.ajaxTransport(function(n) {
        if (!n.crossDomain || b.support.cors) {
          var r;
          return {
            send: function(i, o) {
              var a,
                s,
                u = n.xhr();
              if ((n.username ? u.open(n.type, n.url, n.async, n.username, n.password) : u.open(n.type, n.url, n.async), n.xhrFields))
                for (s in n.xhrFields) u[s] = n.xhrFields[s];
              n.mimeType && u.overrideMimeType && u.overrideMimeType(n.mimeType),
                n.crossDomain || i['X-Requested-With'] || (i['X-Requested-With'] = 'XMLHttpRequest');
              try {
                for (s in i) u.setRequestHeader(s, i[s]);
              } catch (l) {}
              u.send((n.hasContent && n.data) || null),
                (r = function(e, i) {
                  var s, l, c, p;
                  try {
                    if (r && (i || 4 === u.readyState))
                      if (((r = t), a && ((u.onreadystatechange = b.noop), $n && delete Pn[a]), i)) 4 !== u.readyState && u.abort();
                      else {
                        (p = {}),
                          (s = u.status),
                          (l = u.getAllResponseHeaders()),
                          'string' == typeof u.responseText && (p.text = u.responseText);
                        try {
                          c = u.statusText;
                        } catch (f) {
                          c = '';
                        }
                        s || !n.isLocal || n.crossDomain ? 1223 === s && (s = 204) : (s = p.text ? 200 : 404);
                      }
                  } catch (d) {
                    i || o(-1, d);
                  }
                  p && o(s, c, p, l);
                }),
                n.async
                  ? 4 === u.readyState
                    ? setTimeout(r)
                    : ((a = ++Wn), $n && (Pn || ((Pn = {}), b(e).unload($n)), (Pn[a] = r)), (u.onreadystatechange = r))
                  : r();
            },
            abort: function() {
              r && r(t, !0);
            }
          };
        }
      });
  var Xn,
    Un,
    Vn = /^(?:toggle|show|hide)$/,
    Yn = RegExp('^(?:([+-])=|)(' + x + ')([a-z%]*)$', 'i'),
    Jn = /queueHooks$/,
    Gn = [nr],
    Qn = {
      '*': [
        function(e, t) {
          var n,
            r,
            i = this.createTween(e, t),
            o = Yn.exec(t),
            a = i.cur(),
            s = +a || 0,
            u = 1,
            l = 20;
          if (o) {
            if (((n = +o[2]), (r = o[3] || (b.cssNumber[e] ? '' : 'px')), 'px' !== r && s)) {
              s = b.css(i.elem, e, !0) || n || 1;
              do (u = u || '.5'), (s /= u), b.style(i.elem, e, s + r);
              while (u !== (u = i.cur() / a) && 1 !== u && --l);
            }
            (i.unit = r), (i.start = s), (i.end = o[1] ? s + (o[1] + 1) * n : n);
          }
          return i;
        }
      ]
    };
  function Kn() {
    return (
      setTimeout(function() {
        Xn = t;
      }),
      (Xn = b.now())
    );
  }
  function Zn(e, t) {
    b.each(t, function(t, n) {
      var r = (Qn[t] || []).concat(Qn['*']),
        i = 0,
        o = r.length;
      for (; o > i; i++) if (r[i].call(e, t, n)) return;
    });
  }
  function er(e, t, n) {
    var r,
      i,
      o = 0,
      a = Gn.length,
      s = b.Deferred().always(function() {
        delete u.elem;
      }),
      u = function() {
        if (i) return !1;
        var t = Xn || Kn(),
          n = Math.max(0, l.startTime + l.duration - t),
          r = n / l.duration || 0,
          o = 1 - r,
          a = 0,
          u = l.tweens.length;
        for (; u > a; a++) l.tweens[a].run(o);
        return s.notifyWith(e, [l, o, n]), 1 > o && u ? n : (s.resolveWith(e, [l]), !1);
      },
      l = s.promise({
        elem: e,
        props: b.extend({}, t),
        opts: b.extend(!0, { specialEasing: {} }, n),
        originalProperties: t,
        originalOptions: n,
        startTime: Xn || Kn(),
        duration: n.duration,
        tweens: [],
        createTween: function(t, n) {
          var r = b.Tween(e, l.opts, t, n, l.opts.specialEasing[t] || l.opts.easing);
          return l.tweens.push(r), r;
        },
        stop: function(t) {
          var n = 0,
            r = t ? l.tweens.length : 0;
          if (i) return this;
          for (i = !0; r > n; n++) l.tweens[n].run(1);
          return t ? s.resolveWith(e, [l, t]) : s.rejectWith(e, [l, t]), this;
        }
      }),
      c = l.props;
    for (tr(c, l.opts.specialEasing); a > o; o++) if ((r = Gn[o].call(l, e, c, l.opts))) return r;
    return (
      Zn(l, c),
      b.isFunction(l.opts.start) && l.opts.start.call(e, l),
      b.fx.timer(b.extend(u, { elem: e, anim: l, queue: l.opts.queue })),
      l
        .progress(l.opts.progress)
        .done(l.opts.done, l.opts.complete)
        .fail(l.opts.fail)
        .always(l.opts.always)
    );
  }
  function tr(e, t) {
    var n, r, i, o, a;
    for (i in e)
      if (
        ((r = b.camelCase(i)),
        (o = t[r]),
        (n = e[i]),
        b.isArray(n) && ((o = n[1]), (n = e[i] = n[0])),
        i !== r && ((e[r] = n), delete e[i]),
        (a = b.cssHooks[r]),
        a && 'expand' in a)
      ) {
        (n = a.expand(n)), delete e[r];
        for (i in n) i in e || ((e[i] = n[i]), (t[i] = o));
      } else t[r] = o;
  }
  b.Animation = b.extend(er, {
    tweener: function(e, t) {
      b.isFunction(e) ? ((t = e), (e = ['*'])) : (e = e.split(' '));
      var n,
        r = 0,
        i = e.length;
      for (; i > r; r++) (n = e[r]), (Qn[n] = Qn[n] || []), Qn[n].unshift(t);
    },
    prefilter: function(e, t) {
      t ? Gn.unshift(e) : Gn.push(e);
    }
  });
  function nr(e, t, n) {
    var r,
      i,
      o,
      a,
      s,
      u,
      l,
      c,
      p,
      f = this,
      d = e.style,
      h = {},
      g = [],
      m = e.nodeType && nn(e);
    n.queue ||
      ((c = b._queueHooks(e, 'fx')),
      null == c.unqueued &&
        ((c.unqueued = 0),
        (p = c.empty.fire),
        (c.empty.fire = function() {
          c.unqueued || p();
        })),
      c.unqueued++,
      f.always(function() {
        f.always(function() {
          c.unqueued--, b.queue(e, 'fx').length || c.empty.fire();
        });
      })),
      1 === e.nodeType &&
        ('height' in t || 'width' in t) &&
        ((n.overflow = [d.overflow, d.overflowX, d.overflowY]),
        'inline' === b.css(e, 'display') &&
          'none' === b.css(e, 'float') &&
          (b.support.inlineBlockNeedsLayout && 'inline' !== un(e.nodeName) ? (d.zoom = 1) : (d.display = 'inline-block'))),
      n.overflow &&
        ((d.overflow = 'hidden'),
        b.support.shrinkWrapBlocks ||
          f.always(function() {
            (d.overflow = n.overflow[0]), (d.overflowX = n.overflow[1]), (d.overflowY = n.overflow[2]);
          }));
    for (i in t)
      if (((a = t[i]), Vn.exec(a))) {
        if ((delete t[i], (u = u || 'toggle' === a), a === (m ? 'hide' : 'show'))) continue;
        g.push(i);
      }
    if ((o = g.length)) {
      (s = b._data(e, 'fxshow') || b._data(e, 'fxshow', {})),
        'hidden' in s && (m = s.hidden),
        u && (s.hidden = !m),
        m
          ? b(e).show()
          : f.done(function() {
              b(e).hide();
            }),
        f.done(function() {
          var t;
          b._removeData(e, 'fxshow');
          for (t in h) b.style(e, t, h[t]);
        });
      for (i = 0; o > i; i++)
        (r = g[i]),
          (l = f.createTween(r, m ? s[r] : 0)),
          (h[r] = s[r] || b.style(e, r)),
          r in s || ((s[r] = l.start), m && ((l.end = l.start), (l.start = 'width' === r || 'height' === r ? 1 : 0)));
    }
  }
  function rr(e, t, n, r, i) {
    return new rr.prototype.init(e, t, n, r, i);
  }
  (b.Tween = rr),
    (rr.prototype = {
      constructor: rr,
      init: function(e, t, n, r, i, o) {
        (this.elem = e),
          (this.prop = n),
          (this.easing = i || 'swing'),
          (this.options = t),
          (this.start = this.now = this.cur()),
          (this.end = r),
          (this.unit = o || (b.cssNumber[n] ? '' : 'px'));
      },
      cur: function() {
        var e = rr.propHooks[this.prop];
        return e && e.get ? e.get(this) : rr.propHooks._default.get(this);
      },
      run: function(e) {
        var t,
          n = rr.propHooks[this.prop];
        return (
          (this.pos = t = this.options.duration ? b.easing[this.easing](e, this.options.duration * e, 0, 1, this.options.duration) : e),
          (this.now = (this.end - this.start) * t + this.start),
          this.options.step && this.options.step.call(this.elem, this.now, this),
          n && n.set ? n.set(this) : rr.propHooks._default.set(this),
          this
        );
      }
    }),
    (rr.prototype.init.prototype = rr.prototype),
    (rr.propHooks = {
      _default: {
        get: function(e) {
          var t;
          return null == e.elem[e.prop] || (e.elem.style && null != e.elem.style[e.prop])
            ? ((t = b.css(e.elem, e.prop, '')), t && 'auto' !== t ? t : 0)
            : e.elem[e.prop];
        },
        set: function(e) {
          b.fx.step[e.prop]
            ? b.fx.step[e.prop](e)
            : e.elem.style && (null != e.elem.style[b.cssProps[e.prop]] || b.cssHooks[e.prop])
              ? b.style(e.elem, e.prop, e.now + e.unit)
              : (e.elem[e.prop] = e.now);
        }
      }
    }),
    (rr.propHooks.scrollTop = rr.propHooks.scrollLeft = {
      set: function(e) {
        e.elem.nodeType && e.elem.parentNode && (e.elem[e.prop] = e.now);
      }
    }),
    b.each(['toggle', 'show', 'hide'], function(e, t) {
      var n = b.fn[t];
      b.fn[t] = function(e, r, i) {
        return null == e || 'boolean' == typeof e ? n.apply(this, arguments) : this.animate(ir(t, !0), e, r, i);
      };
    }),
    b.fn.extend({
      fadeTo: function(e, t, n, r) {
        return this.filter(nn)
          .css('opacity', 0)
          .show()
          .end()
          .animate({ opacity: t }, e, n, r);
      },
      animate: function(e, t, n, r) {
        var i = b.isEmptyObject(e),
          o = b.speed(t, n, r),
          a = function() {
            var t = er(this, b.extend({}, e), o);
            (a.finish = function() {
              t.stop(!0);
            }),
              (i || b._data(this, 'finish')) && t.stop(!0);
          };
        return (a.finish = a), i || o.queue === !1 ? this.each(a) : this.queue(o.queue, a);
      },
      stop: function(e, n, r) {
        var i = function(e) {
          var t = e.stop;
          delete e.stop, t(r);
        };
        return (
          'string' != typeof e && ((r = n), (n = e), (e = t)),
          n && e !== !1 && this.queue(e || 'fx', []),
          this.each(function() {
            var t = !0,
              n = null != e && e + 'queueHooks',
              o = b.timers,
              a = b._data(this);
            if (n) a[n] && a[n].stop && i(a[n]);
            else for (n in a) a[n] && a[n].stop && Jn.test(n) && i(a[n]);
            for (n = o.length; n--; )
              o[n].elem !== this || (null != e && o[n].queue !== e) || (o[n].anim.stop(r), (t = !1), o.splice(n, 1));
            (t || !r) && b.dequeue(this, e);
          })
        );
      },
      finish: function(e) {
        return (
          e !== !1 && (e = e || 'fx'),
          this.each(function() {
            var t,
              n = b._data(this),
              r = n[e + 'queue'],
              i = n[e + 'queueHooks'],
              o = b.timers,
              a = r ? r.length : 0;
            for (n.finish = !0, b.queue(this, e, []), i && i.cur && i.cur.finish && i.cur.finish.call(this), t = o.length; t--; )
              o[t].elem === this && o[t].queue === e && (o[t].anim.stop(!0), o.splice(t, 1));
            for (t = 0; a > t; t++) r[t] && r[t].finish && r[t].finish.call(this);
            delete n.finish;
          })
        );
      }
    });
  function ir(e, t) {
    var n,
      r = { height: e },
      i = 0;
    for (t = t ? 1 : 0; 4 > i; i += 2 - t) (n = Zt[i]), (r['margin' + n] = r['padding' + n] = e);
    return t && (r.opacity = r.width = e), r;
  }
  b.each(
    {
      slideDown: ir('show'),
      slideUp: ir('hide'),
      slideToggle: ir('toggle'),
      fadeIn: { opacity: 'show' },
      fadeOut: { opacity: 'hide' },
      fadeToggle: { opacity: 'toggle' }
    },
    function(e, t) {
      b.fn[e] = function(e, n, r) {
        return this.animate(t, e, n, r);
      };
    }
  ),
    (b.speed = function(e, t, n) {
      var r =
        e && 'object' == typeof e
          ? b.extend({}, e)
          : { complete: n || (!n && t) || (b.isFunction(e) && e), duration: e, easing: (n && t) || (t && !b.isFunction(t) && t) };
      return (
        (r.duration = b.fx.off
          ? 0
          : 'number' == typeof r.duration ? r.duration : r.duration in b.fx.speeds ? b.fx.speeds[r.duration] : b.fx.speeds._default),
        (null == r.queue || r.queue === !0) && (r.queue = 'fx'),
        (r.old = r.complete),
        (r.complete = function() {
          b.isFunction(r.old) && r.old.call(this), r.queue && b.dequeue(this, r.queue);
        }),
        r
      );
    }),
    (b.easing = {
      linear: function(e) {
        return e;
      },
      swing: function(e) {
        return 0.5 - Math.cos(e * Math.PI) / 2;
      }
    }),
    (b.timers = []),
    (b.fx = rr.prototype.init),
    (b.fx.tick = function() {
      var e,
        n = b.timers,
        r = 0;
      for (Xn = b.now(); n.length > r; r++) (e = n[r]), e() || n[r] !== e || n.splice(r--, 1);
      n.length || b.fx.stop(), (Xn = t);
    }),
    (b.fx.timer = function(e) {
      e() && b.timers.push(e) && b.fx.start();
    }),
    (b.fx.interval = 13),
    (b.fx.start = function() {
      Un || (Un = setInterval(b.fx.tick, b.fx.interval));
    }),
    (b.fx.stop = function() {
      clearInterval(Un), (Un = null);
    }),
    (b.fx.speeds = { slow: 600, fast: 200, _default: 400 }),
    (b.fx.step = {}),
    b.expr &&
      b.expr.filters &&
      (b.expr.filters.animated = function(e) {
        return b.grep(b.timers, function(t) {
          return e === t.elem;
        }).length;
      }),
    (b.fn.offset = function(e) {
      if (arguments.length)
        return e === t
          ? this
          : this.each(function(t) {
              b.offset.setOffset(this, e, t);
            });
      var n,
        r,
        o = { top: 0, left: 0 },
        a = this[0],
        s = a && a.ownerDocument;
      if (s)
        return (
          (n = s.documentElement),
          b.contains(n, a)
            ? (typeof a.getBoundingClientRect !== i && (o = a.getBoundingClientRect()),
              (r = or(s)),
              {
                top: o.top + (r.pageYOffset || n.scrollTop) - (n.clientTop || 0),
                left: o.left + (r.pageXOffset || n.scrollLeft) - (n.clientLeft || 0)
              })
            : o
        );
    }),
    (b.offset = {
      setOffset: function(e, t, n) {
        var r = b.css(e, 'position');
        'static' === r && (e.style.position = 'relative');
        var i = b(e),
          o = i.offset(),
          a = b.css(e, 'top'),
          s = b.css(e, 'left'),
          u = ('absolute' === r || 'fixed' === r) && b.inArray('auto', [a, s]) > -1,
          l = {},
          c = {},
          p,
          f;
        u ? ((c = i.position()), (p = c.top), (f = c.left)) : ((p = parseFloat(a) || 0), (f = parseFloat(s) || 0)),
          b.isFunction(t) && (t = t.call(e, n, o)),
          null != t.top && (l.top = t.top - o.top + p),
          null != t.left && (l.left = t.left - o.left + f),
          'using' in t ? t.using.call(e, l) : i.css(l);
      }
    }),
    b.fn.extend({
      position: function() {
        if (this[0]) {
          var e,
            t,
            n = { top: 0, left: 0 },
            r = this[0];
          return (
            'fixed' === b.css(r, 'position')
              ? (t = r.getBoundingClientRect())
              : ((e = this.offsetParent()),
                (t = this.offset()),
                b.nodeName(e[0], 'html') || (n = e.offset()),
                (n.top += b.css(e[0], 'borderTopWidth', !0)),
                (n.left += b.css(e[0], 'borderLeftWidth', !0))),
            { top: t.top - n.top - b.css(r, 'marginTop', !0), left: t.left - n.left - b.css(r, 'marginLeft', !0) }
          );
        }
      },
      offsetParent: function() {
        return this.map(function() {
          var e = this.offsetParent || o.documentElement;
          while (e && !b.nodeName(e, 'html') && 'static' === b.css(e, 'position')) e = e.offsetParent;
          return e || o.documentElement;
        });
      }
    }),
    b.each({ scrollLeft: 'pageXOffset', scrollTop: 'pageYOffset' }, function(e, n) {
      var r = /Y/.test(n);
      b.fn[e] = function(i) {
        return b.access(
          this,
          function(e, i, o) {
            var a = or(e);
            return o === t
              ? a ? (n in a ? a[n] : a.document.documentElement[i]) : e[i]
              : (a ? a.scrollTo(r ? b(a).scrollLeft() : o, r ? o : b(a).scrollTop()) : (e[i] = o), t);
          },
          e,
          i,
          arguments.length,
          null
        );
      };
    });
  function or(e) {
    return b.isWindow(e) ? e : 9 === e.nodeType ? e.defaultView || e.parentWindow : !1;
  }
  b.each({ Height: 'height', Width: 'width' }, function(e, n) {
    b.each({ padding: 'inner' + e, content: n, '': 'outer' + e }, function(r, i) {
      b.fn[i] = function(i, o) {
        var a = arguments.length && (r || 'boolean' != typeof i),
          s = r || (i === !0 || o === !0 ? 'margin' : 'border');
        return b.access(
          this,
          function(n, r, i) {
            var o;
            return b.isWindow(n)
              ? n.document.documentElement['client' + e]
              : 9 === n.nodeType
                ? ((o = n.documentElement),
                  Math.max(n.body['scroll' + e], o['scroll' + e], n.body['offset' + e], o['offset' + e], o['client' + e]))
                : i === t ? b.css(n, r, s) : b.style(n, r, i, s);
          },
          n,
          a ? i : t,
          a,
          null
        );
      };
    });
  }),
    (e.jQuery = e.$ = b),
    'function' == "function" &&
      __webpack_require__(300) &&
      __webpack_require__(300).jQuery &&
      !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function() {
        return b;
      }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),
				__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
})(window);
 
 
/*** EXPORTS FROM exports-loader ***/
module.exports = window.$;
 
/***/ }),
/* 1554 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
function mapToObject(list, predicate) {
    var obj = {};
    list.forEach(function (listMember) {
        var _a = predicate(listMember), key = _a[0], value = _a[1];
        obj[key] = value;
    });
    return obj;
}
var cookiesDescriptor = Object.getOwnPropertyDescriptor(Document.prototype, 'cookie') || Object.getOwnPropertyDescriptor(HTMLDocument.prototype, 'cookie');
var MockCookie = /** @class */ (function () {
    function MockCookie() {
        this.cookiesDict = {};
    }
    MockCookie.mockBrowserCookies = function () {
        Iif (!cookiesDescriptor || !cookiesDescriptor.configurable) {
            return false;
        }
        var mockCookie = new MockCookie();
        Object.defineProperty(document, 'cookie', {
            get: function () { return mockCookie.cookie; },
            set: function (value) { return (mockCookie.cookie = value); }
        });
        return true;
    };
    MockCookie.unmockBrowserCookies = function () {
        if (!cookiesDescriptor || !cookiesDescriptor.configurable) {
            return false;
        }
        Object.defineProperty(document, 'cookie', cookiesDescriptor);
        return true;
    };
    Object.defineProperty(MockCookie.prototype, "cookie", {
        get: function () {
            var _this = this;
            return Object.keys(this.cookiesDict)
                .map(function (key) { return key + "=" + _this.cookiesDict[key]; })
                .join('; ');
        },
        set: function (cookie) {
            var assignments = cookie.split(';').map(function (cookie) { return cookie.trim(); });
            var _a = assignments[0].split('='), cookieName = _a[0], cookieValue = _a[1];
            var properties = mapToObject(assignments.slice(1), function (assignment) { return assignment.split('='); });
            Iif ('expiration' in properties && parseInt(properties.expiration, 10) < Date.now()) {
                delete properties.expiration;
            }
            else {
                this.cookiesDict[cookieName] = cookieValue;
            }
        },
        enumerable: true,
        configurable: true
    });
    return MockCookie;
}());
exports.MockCookie = MockCookie;
 
 
/***/ }),
/* 1555 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __assign = (this && this.__assign) || Object.assign || function(t) {
    for (var s, i = 1, n = arguments.length; i < n; i++) {
        s = arguments[i];
        for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
            t[p] = s[p];
    }
    return t;
};
Object.defineProperty(exports, "__esModule", { value: true });
var SearchEndpoint_1 = __webpack_require__(61);
var Fake_1 = __webpack_require__(11);
var QueryBuilder_1 = __webpack_require__(24);
var _ = __webpack_require__(1);
var Utils_1 = __webpack_require__(5);
var HistoryStore_1 = __webpack_require__(84);
var AnalyticsInformation_1 = __webpack_require__(85);
function SearchEndpointTest() {
    describe('SearchEndpoint', function () {
        var clientId = 'some random uuid';
        var pageId = 'some pretty home page';
        function fakeHistoryStore() {
            var store = HistoryStore_1.buildHistoryStore();
            store.clear();
            store.addElement({ time: new Date().toTimeString(), internalTime: Date.now(), name: 'PageView', value: pageId });
            store.addElement({ time: new Date().toTimeString(), internalTime: Date.now(), name: 'PageVieww', value: 'abc' });
        }
        function fakeAnalyticsInformation() {
            var info = new AnalyticsInformation_1.AnalyticsInformation();
            info.clientId = clientId;
        }
        function fakeClientInformation() {
            fakeHistoryStore();
            fakeAnalyticsInformation();
        }
        var expectedAnalytics = {
            visitorId: clientId,
            clientId: clientId,
            documentReferrer: document.referrer,
            documentLocation: document.location.href,
            pageId: pageId
        };
        var expectedAnalyticsForSearch = __assign({}, expectedAnalytics, { actionCause: 'foo', customData: {
                bar: 'buzz'
            }, userDisplayName: 'bob', originContext: 'context' });
        function getLastSentAnalyticsFromURI() {
            var lastParams = jasmine.Ajax.requests.mostRecent().params;
            var analyticsMatch = /analytics=([^&]*)&/.exec(lastParams);
            var visitorIdMatch = /visitorId=([^&]*)&/.exec(lastParams);
            return __assign({}, JSON.parse(decodeURIComponent(analyticsMatch[1])), { visitorId: decodeURIComponent(visitorIdMatch[1]) });
        }
        function getLastSentAnalyticsFromJSON() {
            var lastParams = JSON.parse(jasmine.Ajax.requests.mostRecent().params);
            return __assign({}, lastParams.analytics, { visitorId: lastParams.visitorId });
        }
        beforeEach(function () {
            SearchEndpoint_1.SearchEndpoint.endpoints = {};
            fakeClientInformation();
        });
        afterEach(function () {
            SearchEndpoint_1.SearchEndpoint.endpoints = {};
        });
        it('allow to setup easily a search endpoint to point to a sample endpoint', function () {
            SearchEndpoint_1.SearchEndpoint.configureSampleEndpoint();
            var ep = SearchEndpoint_1.SearchEndpoint.endpoints['default'];
            expect(ep).toBeDefined();
            expect(ep.options.accessToken).toBeDefined();
            expect(ep.options.restUri).toBeDefined();
        });
        it('allows to get the default endpoint if there is only one endpoint set to default', function () {
            SearchEndpoint_1.SearchEndpoint.configureSampleEndpointV2();
            expect(SearchEndpoint_1.SearchEndpoint.endpoints['default']).toBe(SearchEndpoint_1.SearchEndpoint.defaultEndpoint);
        });
        it('allows to get the default endpoint if there is only one endpoint set to something else than default', function () {
            SearchEndpoint_1.SearchEndpoint.endpoints['foo'] = new SearchEndpoint_1.SearchEndpoint({
                restUri: 'https://platform-eu.cloud.coveo.com/rest/search'
            });
            expect(SearchEndpoint_1.SearchEndpoint.endpoints['foo']).toBe(SearchEndpoint_1.SearchEndpoint.defaultEndpoint);
        });
        it('allows to get the default endpoint if there is multiple endpoint set with at least one set to default', function () {
            SearchEndpoint_1.SearchEndpoint.endpoints['foo'] = new SearchEndpoint_1.SearchEndpoint({
                restUri: 'https://platform-eu.cloud.coveo.com/rest/search'
            });
            SearchEndpoint_1.SearchEndpoint.endpoints['default'] = new SearchEndpoint_1.SearchEndpoint({
                restUri: 'https://platform.cloud.coveo.com/rest/search'
            });
            expect(SearchEndpoint_1.SearchEndpoint.endpoints['default']).toBe(SearchEndpoint_1.SearchEndpoint.defaultEndpoint);
        });
        it('allows to get the default endpoint if there is multiple endpoint set with none of them being default', function () {
            SearchEndpoint_1.SearchEndpoint.endpoints['foo'] = new SearchEndpoint_1.SearchEndpoint({
                restUri: 'https://platform-eu.cloud.coveo.com/rest/search'
            });
            SearchEndpoint_1.SearchEndpoint.endpoints['bar'] = new SearchEndpoint_1.SearchEndpoint({
                restUri: 'https://platform.cloud.coveo.com/rest/search'
            });
            expect(SearchEndpoint_1.SearchEndpoint.defaultEndpoint).toBeDefined();
        });
        it('allow to setup easily a cloud endpoint', function () {
            SearchEndpoint_1.SearchEndpoint.configureCloudEndpoint('foo', 'bar');
            var ep = SearchEndpoint_1.SearchEndpoint.endpoints['default'];
            expect(ep).toBeDefined();
            expect(ep.options.accessToken).toBe('bar');
            expect(ep.options.queryStringArguments['organizationId']).toBe('foo');
        });
        it('allow to setup easily a on prem endpoint', function () {
            SearchEndpoint_1.SearchEndpoint.configureOnPremiseEndpoint('foo.com');
            var ep = SearchEndpoint_1.SearchEndpoint.endpoints['default'];
            expect(ep).toBeDefined();
            expect(ep.options.restUri).toBe('foo.com');
        });
        describe('with a workgroup argument', function () {
            var ep;
            beforeEach(function () {
                ep = new SearchEndpoint_1.SearchEndpoint({
                    restUri: 'foo/rest/search',
                    queryStringArguments: {
                        workgroup: 'myOrgId'
                    }
                });
            });
            afterEach(function () {
                ep = null;
            });
            it('should not map it to organizationId', function () {
                var fakeResult = Fake_1.FakeResults.createFakeResult();
                var viewAsHtmlUri = ep.getViewAsHtmlUri(fakeResult.uniqueId);
                expect(viewAsHtmlUri).toContain(ep.getBaseUri());
                expect(viewAsHtmlUri).toContain('/html');
                expect(viewAsHtmlUri).toContain('workgroup=myOrgId');
                expect(viewAsHtmlUri).toContain("uniqueId=" + fakeResult.uniqueId);
            });
        });
        describe('with an orgaganizationId argument', function () {
            var ep;
            beforeEach(function () {
                ep = new SearchEndpoint_1.SearchEndpoint({
                    restUri: 'foo/rest/search',
                    queryStringArguments: {
                        organizationId: 'myOrgId'
                    }
                });
            });
            afterEach(function () {
                ep = null;
            });
            it('should not map it to workgroup', function () {
                var fakeResult = Fake_1.FakeResults.createFakeResult();
                var viewAsHtmlUri = ep.getViewAsHtmlUri(fakeResult.uniqueId);
                expect(viewAsHtmlUri).toContain(ep.getBaseUri());
                expect(viewAsHtmlUri).toContain('/html');
                expect(viewAsHtmlUri).toContain('organizationId=myOrgId');
                expect(viewAsHtmlUri).toContain("uniqueId=" + fakeResult.uniqueId);
            });
        });
        describe('with a search token argument', function () {
            var ep;
            beforeEach(function () {
                ep = new SearchEndpoint_1.SearchEndpoint({
                    restUri: 'foo/rest/search',
                    accessToken: 'token'
                });
            });
            afterEach(function () {
                ep = null;
            });
            it('will add it in the query string', function () {
                var fakeResult = Fake_1.FakeResults.createFakeResult();
                var viewAsHtmlUri = ep.getViewAsHtmlUri(fakeResult.uniqueId);
                expect(viewAsHtmlUri).toContain(ep.getBaseUri());
                expect(viewAsHtmlUri).toContain('access_token=token');
            });
        });
        describe('with a basic setup', function () {
            var ep;
            beforeEach(function () {
                ep = new SearchEndpoint_1.SearchEndpoint({
                    restUri: 'foo/rest/search',
                    accessToken: 'token',
                    queryStringArguments: {
                        organizationId: 'myOrgId',
                        potatoe: 'mashed'
                    }
                });
            });
            afterEach(function () {
                ep = null;
            });
            it('allow to get the base uri', function () {
                expect(ep.getBaseUri()).toBe('foo/rest/search/v2');
            });
            it('allow to get the auth provider uri', function () {
                expect(ep.getAuthenticationProviderUri('ad')).toContain(ep.getBaseUri() + '/login/ad?');
                expect(ep.getAuthenticationProviderUri('ad')).toContain('organizationId=myOrgId');
                expect(ep.getAuthenticationProviderUri('ad')).toContain('potatoe=mashed');
                expect(ep.getAuthenticationProviderUri('email', 'myreturnurl')).toContain(ep.getBaseUri() + '/login/email?');
                expect(ep.getAuthenticationProviderUri('email', 'myreturnurl')).toContain('organizationId=myOrgId');
                expect(ep.getAuthenticationProviderUri('email', 'myreturnurl')).toContain('potatoe=mashed');
                expect(ep.getAuthenticationProviderUri('email', 'myreturnurl')).toContain('redirectUri=myreturnurl');
                expect(ep.getAuthenticationProviderUri('troll', undefined, 'msg')).toContain(ep.getBaseUri() + '/login/troll?');
                expect(ep.getAuthenticationProviderUri('troll', undefined, 'msg')).toContain('organizationId=myOrgId');
                expect(ep.getAuthenticationProviderUri('troll', undefined, 'msg')).toContain('potatoe=mashed');
                expect(ep.getAuthenticationProviderUri('troll', undefined, 'msg')).toContain('message=msg');
            });
            it('allow to check if endpoint is jsonp', function () {
                expect(ep.isJsonp()).toBe(false);
            });
            it('allow to get an export to excel link', function () {
                var qbuilder = new QueryBuilder_1.QueryBuilder();
                qbuilder.expression.add('batman');
                qbuilder.fieldsToInclude = ['@source'];
                expect(ep.getExportToExcelLink(qbuilder.build(), 56)).toContain(ep.getBaseUri() + '?');
                expect(ep.getExportToExcelLink(qbuilder.build(), 56)).toContain('organizationId=myOrgId');
                expect(ep.getExportToExcelLink(qbuilder.build(), 56)).toContain('potatoe=mashed');
                expect(ep.getExportToExcelLink(qbuilder.build(), 56)).toContain('q=batman');
                expect(ep.getExportToExcelLink(qbuilder.build(), 56)).toContain('numberOfResults=56');
                expect(ep.getExportToExcelLink(qbuilder.build(), 56)).toContain('format=xlsx');
                expect(ep.getExportToExcelLink(qbuilder.build(), 56)).toContain("fieldsToInclude=" + Utils_1.Utils.safeEncodeURIComponent('["source"]'));
            });
            it("when the query contains a timezone, when calling #getExportToExcelLink,\n      it places the timezone in the link", function () {
                // JSUI-2341 https://coveord.atlassian.net/browse/JSUI-2341
                // If the timezone field is missing, then not all documents for a query using @date=<start date>..<end date>
                // will be in the Excel document.
                var qbuilder = new QueryBuilder_1.QueryBuilder();
                var timezone = 'EST';
                qbuilder.timezone = timezone;
                expect(ep.getExportToExcelLink(qbuilder.build(), 1)).toContain("timezone=" + timezone);
            });
            it('allow to get an export to excel link with a context', function () {
                var qbuilder = new QueryBuilder_1.QueryBuilder();
                qbuilder.addContext({
                    foo: 'bar'
                });
                expect(ep.getExportToExcelLink(qbuilder.build(), 56)).toContain('context[foo]=bar');
            });
            it('allow to get an export to excel link with context encoded', function () {
                var qbuilder = new QueryBuilder_1.QueryBuilder();
                qbuilder.addContext({
                    'foo bar': 'buzz bazz'
                });
                expect(ep.getExportToExcelLink(qbuilder.build(), 56)).toContain("context[foo" + encodeURIComponent(' ') + "bar]=buzz" + encodeURIComponent(' ') + "bazz");
            });
            it('allow to get an export to excel link with a context array', function () {
                var qbuilder = new QueryBuilder_1.QueryBuilder();
                qbuilder.addContext({
                    foo: ['buzz', 'bazz']
                });
                expect(ep.getExportToExcelLink(qbuilder.build(), 56)).toContain("context[foo]=buzz" + encodeURIComponent(',') + "bazz");
            });
            it('allow to get an export to excel link with a context with multiple values', function () {
                var qbuilder = new QueryBuilder_1.QueryBuilder();
                qbuilder.addContext({
                    foo: 'bar',
                    bazz: 'buzz'
                });
                expect(ep.getExportToExcelLink(qbuilder.build(), 56)).toContain('context[foo]=bar');
                expect(ep.getExportToExcelLink(qbuilder.build(), 56)).toContain('context[bazz]=buzz');
            });
            it('allow to get an uri to view as datastream', function () {
                var fakeResult = Fake_1.FakeResults.createFakeResult();
                expect(ep.getViewAsDatastreamUri(fakeResult.uniqueId, '$Thumbnail')).toContain(ep.getBaseUri() + '/datastream?');
                expect(ep.getViewAsDatastreamUri(fakeResult.uniqueId, '$Thumbnail')).toContain('organizationId=myOrgId');
                expect(ep.getViewAsDatastreamUri(fakeResult.uniqueId, '$Thumbnail')).toContain('potatoe=mashed');
                expect(ep.getViewAsDatastreamUri(fakeResult.uniqueId, '$Thumbnail')).toContain('uniqueId=' + fakeResult.uniqueId);
                expect(ep.getViewAsDatastreamUri(fakeResult.uniqueId, '$Thumbnail')).toContain('dataStream=' + encodeURIComponent('$Thumbnail'));
            });
            it('allow to get an uri to view as html', function () {
                var fakeResult = Fake_1.FakeResults.createFakeResult();
                expect(ep.getViewAsHtmlUri(fakeResult.uniqueId)).toContain(ep.getBaseUri() + '/html?');
                expect(ep.getViewAsHtmlUri(fakeResult.uniqueId)).toContain('organizationId=myOrgId');
                expect(ep.getViewAsHtmlUri(fakeResult.uniqueId)).toContain('potatoe=mashed');
                expect(ep.getViewAsHtmlUri(fakeResult.uniqueId)).toContain('uniqueId=' + fakeResult.uniqueId);
            });
            describe('with a uniqueID that contains already encoded characters', function () {
                var fakeResult;
                beforeEach(function () {
                    fakeResult = Fake_1.FakeResults.createFakeResult();
                    fakeResult.uniqueId = '123.456$https://somwehere.on.the.internet.com?thisparameter=containsencodedstuff%20';
                });
                it('allow to get an uri to view as html', function () {
                    expect(ep.getViewAsHtmlUri(fakeResult.uniqueId)).toContain('uniqueId=' + encodeURIComponent(fakeResult.uniqueId));
                });
                it('allow to get an uri to view as datastream', function () {
                    expect(ep.getViewAsDatastreamUri(fakeResult.uniqueId, '$Thumbnail')).toContain('uniqueId=' + encodeURIComponent(fakeResult.uniqueId));
                });
            });
            describe('will execute requests on the search api', function () {
                beforeEach(function () {
                    jasmine.Ajax.install();
                });
                afterEach(function () {
                    jasmine.Ajax.uninstall();
                    ep.reset();
                });
                it('for search', function (done) {
                    var qbuilder = new QueryBuilder_1.QueryBuilder();
                    var analyticsInformation = new AnalyticsInformation_1.AnalyticsInformation();
                    analyticsInformation.pendingSearchEvent = {
                        getEventCause: function () { return 'foo'; },
                        getEventMeta: function () { return ({ bar: 'buzz' }); }
                    };
                    analyticsInformation.originContext = 'context';
                    analyticsInformation.userDisplayName = 'bob';
                    qbuilder.expression.add('batman');
                    qbuilder.numberOfResults = 153;
                    qbuilder.enableCollaborativeRating = true;
                    var promiseSuccess = ep.search(qbuilder.build(), { analyticsInformation: analyticsInformation });
                    expect(jasmine.Ajax.requests.mostRecent().url).toContain(ep.getBaseUri() + '?');
                    expect(jasmine.Ajax.requests.mostRecent().url).toContain('organizationId=myOrgId');
                    expect(jasmine.Ajax.requests.mostRecent().url).toContain('potatoe=mashed');
                    expect(jasmine.Ajax.requests.mostRecent().params).toContain('q=batman');
                    expect(jasmine.Ajax.requests.mostRecent().params).toContain('numberOfResults=153');
                    expect(jasmine.Ajax.requests.mostRecent().params).toContain('enableCollaborativeRating=true');
                    expect(jasmine.Ajax.requests.mostRecent().params).toContain('actionsHistory=');
                    var analytics = getLastSentAnalyticsFromURI();
                    expect(analytics).toEqual(expectedAnalyticsForSearch);
                    expect(jasmine.Ajax.requests.mostRecent().params);
                    expect(jasmine.Ajax.requests.mostRecent().method).toBe('POST');
                    promiseSuccess.then(function (data) {
                        expect(data.results.length).toBe(10);
                    });
                    jasmine.Ajax.requests.mostRecent().respondWith({
                        status: 200,
                        responseText: JSON.stringify(Fake_1.FakeResults.createFakeResults())
                    });
                    var promiseFail = ep.search(qbuilder.build());
                    promiseFail
                        .catch(function (e) {
                        expect(e).toBeDefined();
                        expect(e.status).toBe(500);
                    })
                        .catch(function (e) {
                        fail(e);
                        return e;
                    })
                        .then(function () { return done(); });
                    jasmine.Ajax.requests.mostRecent().respondWith({
                        status: 500
                    });
                });
                describe('for /plan', function () {
                    var qbuilder;
                    var promise;
                    beforeEach(function () {
                        qbuilder = new QueryBuilder_1.QueryBuilder();
                        qbuilder.expression.add('batman');
                        qbuilder.numberOfResults = 153;
                        qbuilder.enableCollaborativeRating = true;
                        promise = ep.plan(qbuilder.build());
                    });
                    function mockResponse(done) {
                        promise.then(function () { return done(); });
                        jasmine.Ajax.requests.mostRecent().respondWith({
                            status: 200,
                            responseText: JSON.stringify({})
                        });
                    }
                    it('calls the right endpoint', function (done) {
                        expect(jasmine.Ajax.requests.mostRecent().url).toContain(ep.getBaseUri() + '/plan?');
                        mockResponse(done);
                    });
                    it('calls the right HTTP method', function (done) {
                        expect(jasmine.Ajax.requests.mostRecent().method).toBe('POST');
                        mockResponse(done);
                    });
                    it('contains the right url parameters', function (done) {
                        expect(jasmine.Ajax.requests.mostRecent().url).toContain('organizationId=myOrgId');
                        expect(jasmine.Ajax.requests.mostRecent().url).toContain('potatoe=mashed');
                        mockResponse(done);
                    });
                    it('contains the right request headers', function (done) {
                        expect(jasmine.Ajax.requests.mostRecent().requestHeaders).toEqual(jasmine.objectContaining({
                            'Content-Type': 'application/json; charset=UTF-8'
                        }));
                        mockResponse(done);
                    });
                    it('contains the right params', function (done) {
                        expect(JSON.parse(jasmine.Ajax.requests.mostRecent().params)).toEqual(jasmine.objectContaining({
                            q: 'batman',
                            numberOfResults: 153,
                            enableCollaborativeRating: true,
                            actionsHistory: HistoryStore_1.buildHistoryStore().getHistory()
                        }));
                        var analytics = getLastSentAnalyticsFromJSON();
                        expect(analytics).toEqual(expectedAnalytics);
                        mockResponse(done);
                    });
                });
                it('should not override actions history if specified manually on a search call', function () {
                    var qbuilder = new QueryBuilder_1.QueryBuilder();
                    var historyAsString = JSON.stringify([{ name: 'foo', value: 'bar' }]);
                    qbuilder.actionsHistory = historyAsString;
                    ep.search(qbuilder.build());
                    expect(jasmine.Ajax.requests.mostRecent().params).toContain("actionsHistory=" + encodeURIComponent(historyAsString));
                });
                it('for getRawDataStream', function (done) {
                    var fakeResult = Fake_1.FakeResults.createFakeResult();
                    var promiseSuccess = ep.getRawDataStream(fakeResult.uniqueId, '$Thumbnail');
                    expect(jasmine.Ajax.requests.mostRecent().url).toContain(ep.getBaseUri() + '/datastream?');
                    expect(jasmine.Ajax.requests.mostRecent().url).toContain('uniqueId=' + fakeResult.uniqueId);
                    expect(jasmine.Ajax.requests.mostRecent().url).toContain("dataStream=" + Utils_1.Utils.safeEncodeURIComponent('$Thumbnail'));
                    expect(jasmine.Ajax.requests.mostRecent().url).toContain('organizationId=myOrgId');
                    expect(jasmine.Ajax.requests.mostRecent().url).toContain('potatoe=mashed');
                    expect(jasmine.Ajax.requests.mostRecent().method).toBe('GET');
                    promiseSuccess
                        .then(function (data) {
                        expect(data).toBeDefined();
                        expect(data.byteLength).toBe(123);
                    })
                        .catch(function (e) {
                        fail(e);
                        return e;
                    })
                        .then(function () { return done(); });
                    jasmine.Ajax.requests.mostRecent().respondWith({
                        status: 200,
                        response: new ArrayBuffer(123)
                    });
                });
                it('for getDocument', function (done) {
                    var fakeResult = Fake_1.FakeResults.createFakeResult();
                    var promiseSuccess = ep.getDocument(fakeResult.uniqueId);
                    expect(jasmine.Ajax.requests.mostRecent().url).toContain(ep.getBaseUri() + '/document?');
                    expect(jasmine.Ajax.requests.mostRecent().url).toContain('uniqueId=' + fakeResult.uniqueId);
                    expect(jasmine.Ajax.requests.mostRecent().url).toContain('organizationId=myOrgId');
                    expect(jasmine.Ajax.requests.mostRecent().url).toContain('potatoe=mashed');
                    expect(jasmine.Ajax.requests.mostRecent().method).toBe('GET');
                    promiseSuccess
                        .then(function (data) {
                        expect(data.uniqueId).toBe(fakeResult.uniqueId);
                        expect(data.title).toBe(fakeResult.title);
                        expect(jasmine.Ajax.requests.mostRecent().responseType).toBe('text');
                    })
                        .catch(function (e) {
                        fail(e);
                        return e;
                    })
                        .then(function () { return done(); });
                    jasmine.Ajax.requests.mostRecent().respondWith({
                        status: 200,
                        responseText: JSON.stringify(fakeResult),
                        responseType: 'text'
                    });
                });
                it('for getDocumentText', function (done) {
                    var fakeResult = Fake_1.FakeResults.createFakeResult();
                    var promiseSuccess = ep.getDocumentText(fakeResult.uniqueId);
                    expect(jasmine.Ajax.requests.mostRecent().url).toContain(ep.getBaseUri() + '/text?');
                    expect(jasmine.Ajax.requests.mostRecent().url).toContain('uniqueId=' + fakeResult.uniqueId);
                    expect(jasmine.Ajax.requests.mostRecent().url).toContain('organizationId=myOrgId');
                    expect(jasmine.Ajax.requests.mostRecent().url).toContain('potatoe=mashed');
                    expect(jasmine.Ajax.requests.mostRecent().method).toBe('GET');
                    promiseSuccess
                        .then(function (data) {
                        expect(data).toBe(fakeResult.excerpt);
                        expect(jasmine.Ajax.requests.mostRecent().responseType).toBe('text');
                    })
                        .catch(function (e) {
                        fail(e);
                        return e;
                    })
                        .then(function () { return done(); });
                    jasmine.Ajax.requests.mostRecent().respondWith({
                        status: 200,
                        responseText: JSON.stringify({ content: fakeResult.excerpt }),
                        responseType: 'text'
                    });
                });
                it('for getDocumentHtml', function (done) {
                    var fakeResult = Fake_1.FakeResults.createFakeResult();
                    var fakeDocument = document.implementation.createHTMLDocument(fakeResult.title);
                    var promiseSuccess = ep.getDocumentHtml(fakeResult.uniqueId);
                    expect(jasmine.Ajax.requests.mostRecent().url).toContain(ep.getBaseUri() + '/html?');
                    expect(jasmine.Ajax.requests.mostRecent().url).toContain('uniqueId=' + fakeResult.uniqueId);
                    expect(jasmine.Ajax.requests.mostRecent().url).toContain('organizationId=myOrgId');
                    expect(jasmine.Ajax.requests.mostRecent().url).toContain('potatoe=mashed');
                    expect(jasmine.Ajax.requests.mostRecent().method).toBe('POST');
                    promiseSuccess
                        .then(function (data) {
                        expect(data.title).toBe(fakeResult.title);
                        expect(jasmine.Ajax.requests.mostRecent().responseType).toBe('document');
                    })
                        .catch(function (e) {
                        fail(e);
                        return e;
                    })
                        .then(function () { return done(); });
                    jasmine.Ajax.requests.mostRecent().respondWith({
                        status: 200,
                        response: fakeDocument,
                        responseType: 'document'
                    });
                });
                it('for listFieldValues', function (done) {
                    var request = {
                        field: '@field',
                        maximumNumberOfValues: 153,
                        pattern: '.*$',
                        patternType: 'regex'
                    };
                    var promisesSuccess = ep.listFieldValues(request);
                    expect(jasmine.Ajax.requests.mostRecent().url).toContain(ep.getBaseUri() + '/values?');
                    expect(jasmine.Ajax.requests.mostRecent().url).toContain('organizationId=myOrgId');
                    expect(jasmine.Ajax.requests.mostRecent().url).toContain('potatoe=mashed');
                    expect(jasmine.Ajax.requests.mostRecent().method).toBe('POST');
                    expect(jasmine.Ajax.requests.mostRecent().params).toContain('field=' + encodeURIComponent('@field'));
                    expect(jasmine.Ajax.requests.mostRecent().params).toContain('maximumNumberOfValues=153');
                    expect(jasmine.Ajax.requests.mostRecent().params).toContain('pattern=' + encodeURIComponent('.*$'));
                    expect(jasmine.Ajax.requests.mostRecent().params).toContain('patternType=regex');
                    promisesSuccess
                        .then(function (values) {
                        expect(values.length).toBe(10);
                        expect(jasmine.Ajax.requests.mostRecent().responseType).toBe('text');
                    })
                        .catch(function (e) {
                        fail(e);
                        return e;
                    })
                        .then(function () { return done(); });
                    jasmine.Ajax.requests.mostRecent().respondWith({
                        status: 200,
                        responseText: JSON.stringify({ values: Fake_1.FakeResults.createFakeFieldValues('foo', 10) }),
                        responseType: 'text'
                    });
                });
                it('for listFields', function (done) {
                    var promiseSuccess = ep.listFields();
                    expect(jasmine.Ajax.requests.mostRecent().url).toContain(ep.getBaseUri() + '/fields?');
                    expect(jasmine.Ajax.requests.mostRecent().url).toContain('organizationId=myOrgId');
                    expect(jasmine.Ajax.requests.mostRecent().url).toContain('potatoe=mashed');
                    expect(jasmine.Ajax.requests.mostRecent().method).toBe('GET');
                    promiseSuccess
                        .then(function (fields) {
                        expect(fields.length).toBe(10);
                        expect(jasmine.Ajax.requests.mostRecent().responseType).toBe('text');
                    })
                        .catch(function (e) {
                        fail(e);
                        return e;
                    })
                        .then(function () { return done(); });
                    // Not real field description, but will suffice for test purpose
                    jasmine.Ajax.requests.mostRecent().respondWith({
                        status: 200,
                        responseText: JSON.stringify({ fields: _.range(10) }),
                        responseType: 'text'
                    });
                });
                it('for extensions', function (done) {
                    var promiseSuccess = ep.extensions();
                    expect(jasmine.Ajax.requests.mostRecent().url).toContain(ep.getBaseUri() + '/extensions?');
                    expect(jasmine.Ajax.requests.mostRecent().url).toContain('organizationId=myOrgId');
                    expect(jasmine.Ajax.requests.mostRecent().url).toContain('potatoe=mashed');
                    expect(jasmine.Ajax.requests.mostRecent().method).toBe('GET');
                    promiseSuccess
                        .then(function (extensions) {
                        expect(extensions.length).toBe(10);
                        expect(jasmine.Ajax.requests.mostRecent().responseType).toBe('text');
                    })
                        .catch(function (e) {
                        fail(e);
                        return e;
                    })
                        .then(function () { return done(); });
                    // Not real extensions, but will suffice for test purpose
                    jasmine.Ajax.requests.mostRecent().respondWith({
                        status: 200,
                        responseText: JSON.stringify(_.range(10)),
                        responseType: 'text'
                    });
                });
                it('for rateDocument', function (done) {
                    var fakeResult = Fake_1.FakeResults.createFakeResult();
                    var promiseSuccess = ep.rateDocument({
                        rating: 'Best',
                        uniqueId: fakeResult.uniqueId
                    });
                    expect(jasmine.Ajax.requests.mostRecent().url).toContain(ep.getBaseUri() + '/rating?');
                    expect(jasmine.Ajax.requests.mostRecent().url).toContain('organizationId=myOrgId');
                    expect(jasmine.Ajax.requests.mostRecent().url).toContain('potatoe=mashed');
                    expect(jasmine.Ajax.requests.mostRecent().method).toBe('POST');
                    expect(jasmine.Ajax.requests.mostRecent().params).toContain('rating=Best');
                    expect(jasmine.Ajax.requests.mostRecent().params).toContain('uniqueId=' + fakeResult.uniqueId);
                    promiseSuccess
                        .then(function (response) {
                        expect(response).toBe(true);
                        expect(jasmine.Ajax.requests.mostRecent().responseType).toBe('text');
                    })
                        .catch(function (e) {
                        fail(e);
                        return e;
                    })
                        .then(function () { return done(); });
                    jasmine.Ajax.requests.mostRecent().respondWith({
                        status: 200,
                        responseType: 'text'
                    });
                });
                it('for tagDocument', function (done) {
                    var fakeResult = Fake_1.FakeResults.createFakeResult();
                    var promiseSuccess = ep.tagDocument({
                        uniqueId: fakeResult.uniqueId,
                        doAdd: true,
                        fieldName: '@field',
                        fieldValue: 'foobar'
                    });
                    expect(jasmine.Ajax.requests.mostRecent().url).toContain(ep.getBaseUri() + '/tag?');
                    expect(jasmine.Ajax.requests.mostRecent().url).toContain('organizationId=myOrgId');
                    expect(jasmine.Ajax.requests.mostRecent().url).toContain('potatoe=mashed');
                    expect(jasmine.Ajax.requests.mostRecent().method).toBe('POST');
                    expect(jasmine.Ajax.requests.mostRecent().params).toContain('fieldName=' + encodeURIComponent('@field'));
                    expect(jasmine.Ajax.requests.mostRecent().params).toContain('fieldValue=foobar');
                    expect(jasmine.Ajax.requests.mostRecent().params).toContain('doAdd=true');
                    expect(jasmine.Ajax.requests.mostRecent().params).toContain('uniqueId=' + encodeURIComponent(fakeResult.uniqueId));
                    promiseSuccess
                        .then(function (response) {
                        expect(response).toBe(true);
                        expect(jasmine.Ajax.requests.mostRecent().responseType).toBe('text');
                    })
                        .catch(function (e) {
                        fail(e);
                        return e;
                    })
                        .then(function () { return done(); });
                    jasmine.Ajax.requests.mostRecent().respondWith({
                        status: 200,
                        responseType: 'text'
                    });
                });
                it('for getQuerySuggest', function (done) {
                    var promiseSuccess = ep.getQuerySuggest({
                        q: 'foobar',
                        count: 10
                    });
                    expect(jasmine.Ajax.requests.mostRecent().url).toContain(ep.getBaseUri() + '/querySuggest?');
                    expect(jasmine.Ajax.requests.mostRecent().url).toContain('organizationId=myOrgId');
                    expect(jasmine.Ajax.requests.mostRecent().url).toContain('potatoe=mashed');
                    expect(jasmine.Ajax.requests.mostRecent().params).toContain('q=foobar');
                    expect(jasmine.Ajax.requests.mostRecent().params).toContain('count=10');
                    expect(jasmine.Ajax.requests.mostRecent().params).toContain('actionsHistory=');
                    expect(jasmine.Ajax.requests.mostRecent().method).toBe('POST');
                    var analytics = getLastSentAnalyticsFromURI();
                    expect(analytics).toEqual(expectedAnalytics);
                    // Not real extensions, but will suffice for test purpose
                    promiseSuccess
                        .then(function (response) {
                        expect(response.completions.length).toBe(10);
                    })
                        .catch(function (e) {
                        fail(e);
                        return e;
                    })
                        .then(function () { return done(); });
                    // Not real completions, but will suffice for test purpose
                    jasmine.Ajax.requests.mostRecent().respondWith({
                        status: 200,
                        responseText: JSON.stringify({ completions: _.range(10) })
                    });
                });
                it('for backward compatible query suggest call', function (done) {
                    var promiseSuccess = ep.getRevealQuerySuggest({
                        q: 'foobar',
                        count: 10
                    });
                    expect(jasmine.Ajax.requests.mostRecent().url).toContain(ep.getBaseUri() + '/querySuggest?');
                    expect(jasmine.Ajax.requests.mostRecent().params).toContain('q=foobar');
                    // Not real extensions, but will suffice for test purpose
                    promiseSuccess
                        .then(function (response) {
                        expect(response.completions.length).toBe(10);
                    })
                        .catch(function (e) {
                        fail(e);
                        return e;
                    })
                        .then(function () { return done(); });
                    // Not real completions, but will suffice for test purpose
                    jasmine.Ajax.requests.mostRecent().respondWith({
                        status: 200,
                        responseText: JSON.stringify({ completions: _.range(10) })
                    });
                });
                it('for facetSearch', function (done) {
                    var promiseSuccess = ep.facetSearch({
                        field: 'test',
                        filterFacetCount: true
                    });
                    expect(jasmine.Ajax.requests.mostRecent().url).toContain(ep.getBaseUri() + '/facet?');
                    expect(jasmine.Ajax.requests.mostRecent().url).toContain('organizationId=myOrgId');
                    expect(jasmine.Ajax.requests.mostRecent().url).toContain('potatoe=mashed');
                    expect(jasmine.Ajax.requests.mostRecent().method).toBe('POST');
                    expect(JSON.parse(jasmine.Ajax.requests.mostRecent().params)).toEqual(jasmine.objectContaining({ field: 'test' }));
                    var analytics = getLastSentAnalyticsFromJSON();
                    expect(analytics).toEqual(expectedAnalytics);
                    // Not real extensions, but will suffice for test purpose
                    promiseSuccess
                        .then(function (response) {
                        expect(response.values.length).toBe(8);
                    })
                        .catch(function (e) {
                        fail(e);
                        return e;
                    })
                        .then(function () { return done(); });
                    // Not real completions, but will suffice for test purpose
                    jasmine.Ajax.requests.mostRecent().respondWith({
                        status: 200,
                        responseText: JSON.stringify({ values: _.range(8) })
                    });
                });
                it('for follow', function (done) {
                    var qbuilder = new QueryBuilder_1.QueryBuilder();
                    qbuilder.expression.add('batman');
                    var promiseSuccess = ep.follow({
                        frequency: 'weekly',
                        type: 'query',
                        typeConfig: {
                            query: qbuilder.build()
                        },
                        name: 'asdasd'
                    });
                    promiseSuccess
                        .then(function (sub) {
                        expect(sub.id).toBeDefined();
                    })
                        .catch(function (e) {
                        fail(e);
                        return e;
                    })
                        .then(function () { return done(); });
                    expect(jasmine.Ajax.requests.mostRecent().url).toContain(ep.getBaseAlertsUri() + '/subscriptions?');
                    expect(jasmine.Ajax.requests.mostRecent().url).toContain('organizationId=myOrgId');
                    expect(jasmine.Ajax.requests.mostRecent().url).toContain('potatoe=mashed');
                    expect(jasmine.Ajax.requests.mostRecent().url).toContain('accessToken=token');
                    expect(jasmine.Ajax.requests.mostRecent().method).toBe('POST');
                    expect(JSON.parse(jasmine.Ajax.requests.mostRecent().params).frequency).toBe('weekly');
                    expect(JSON.parse(jasmine.Ajax.requests.mostRecent().params).name).toBe('asdasd');
                    jasmine.Ajax.requests.mostRecent().respondWith({
                        status: 200,
                        responseText: JSON.stringify({
                            id: 'foobar',
                            type: 'query',
                            typeConfig: {
                                query: qbuilder.build()
                            }
                        })
                    });
                });
                it('for listSubscriptions', function (done) {
                    var promiseSuccess = ep.listSubscriptions(15);
                    promiseSuccess
                        .then(function (subs) {
                        expect(subs.length).toBe(44);
                    })
                        .catch(function (e) {
                        fail(e);
                        return e;
                    })
                        .then(function () { return done(); });
                    // Should return the same promise, since it's not resolved yet
                    var promiseSuccess2 = ep.listSubscriptions(15);
                    expect(promiseSuccess).toBe(promiseSuccess2);
                    expect(jasmine.Ajax.requests.mostRecent().url).toContain(ep.getBaseAlertsUri() + '/subscriptions?');
                    expect(jasmine.Ajax.requests.mostRecent().url).toContain('page=15');
                    expect(jasmine.Ajax.requests.mostRecent().url).toContain('organizationId=myOrgId');
                    expect(jasmine.Ajax.requests.mostRecent().url).toContain('potatoe=mashed');
                    expect(jasmine.Ajax.requests.mostRecent().url).toContain('accessToken=token');
                    expect(jasmine.Ajax.requests.mostRecent().method).toBe('GET');
                    jasmine.Ajax.requests.mostRecent().respondWith({
                        status: 200,
                        responseText: JSON.stringify(_.range(44))
                    });
                });
                it('for updateSubscription', function (done) {
                    var promiseSuccess = ep.updateSubscription(getSubscriptionPromiseSuccess());
                    promiseSuccess
                        .then(function (sub) {
                        expect(sub.id).toBe('foobar');
                    })
                        .catch(function (e) {
                        fail(e);
                        return e;
                    })
                        .then(function () { return done(); });
                    expect(jasmine.Ajax.requests.mostRecent().url).toContain(ep.getBaseAlertsUri() + '/subscriptions/foobar?');
                    expect(jasmine.Ajax.requests.mostRecent().url).toContain('organizationId=myOrgId');
                    expect(jasmine.Ajax.requests.mostRecent().url).toContain('potatoe=mashed');
                    expect(jasmine.Ajax.requests.mostRecent().url).toContain('accessToken=token');
                    expect(jasmine.Ajax.requests.mostRecent().method).toBe('PUT');
                    expect(JSON.parse(jasmine.Ajax.requests.mostRecent().params).type).toBe('query');
                    jasmine.Ajax.requests.mostRecent().respondWith({
                        status: 200,
                        responseText: JSON.stringify({ id: 'foobar' })
                    });
                });
                it('for deleteSubscription', function (done) {
                    var promiseSuccess = ep.deleteSubscription(getSubscriptionPromiseSuccess());
                    promiseSuccess
                        .then(function (sub) {
                        expect(sub.id).toBe('foobar');
                    })
                        .catch(function (e) {
                        fail(e);
                        return e;
                    })
                        .then(function () { return done(); });
                    expect(jasmine.Ajax.requests.mostRecent().url).toContain(ep.getBaseAlertsUri() + '/subscriptions/foobar?');
                    expect(jasmine.Ajax.requests.mostRecent().url).toContain('organizationId=myOrgId');
                    expect(jasmine.Ajax.requests.mostRecent().url).toContain('potatoe=mashed');
                    expect(jasmine.Ajax.requests.mostRecent().url).toContain('accessToken=token');
                    expect(jasmine.Ajax.requests.mostRecent().method).toBe('DELETE');
                    expect(jasmine.Ajax.requests.mostRecent().params).toBe('{}');
                    jasmine.Ajax.requests.mostRecent().respondWith({
                        status: 200,
                        responseText: JSON.stringify({ id: 'foobar' })
                    });
                });
                it('request can be modified', function () {
                    ep.setRequestModifier(function (requestInfo) {
                        requestInfo.headers['Potato'] = 'OmgPotatoes';
                        return requestInfo;
                    });
                    ep.search(new QueryBuilder_1.QueryBuilder().build());
                    expect(jasmine.Ajax.requests.mostRecent().requestHeaders).toEqual(jasmine.objectContaining({
                        Potato: 'OmgPotatoes'
                    }));
                });
            });
        });
    });
    function getSubscriptionPromiseSuccess() {
        var qbuilder = new QueryBuilder_1.QueryBuilder();
        qbuilder.expression.add('batman');
        return {
            id: 'foobar',
            type: 'query',
            typeConfig: {
                query: qbuilder.build()
            },
            user: {
                manageToken: '1',
                email: '42@coveo.com'
            },
            name: 'asdasd'
        };
    }
}
exports.SearchEndpointTest = SearchEndpointTest;
 
 
/***/ }),
/* 1556 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var BackOffRequest_1 = __webpack_require__(470);
function BackOffRequestTest() {
    describe('BackOffRequest', function () {
        var mockSuccessResponse = { success: true };
        beforeAll(function () { return stubBackOffDependency(); });
        afterAll(function () { return restoreBackOffDependency(); });
        function stubBackOffDependency() {
            BackOffRequest_1.setBackOffModule(function (request) { return request(); });
        }
        function restoreBackOffDependency() {
            BackOffRequest_1.setBackOffModule();
        }
        function timeUnitsToResolveIn(num) {
            var oneTimeUnit = 10;
            return new Promise(function (resolve) { return setTimeout(function () { return resolve(mockSuccessResponse); }, num * oneTimeUnit); });
        }
        it("when calling #enqueue with a request that resolves successfully,\n    it returns the successful response", function (done) {
            var request = BackOffRequest_1.BackOffRequest.enqueue({ fn: function () { return Promise.resolve(mockSuccessResponse); } });
            request.then(function (response) {
                expect(response).toBe(mockSuccessResponse);
                done();
            });
        });
        it("when calling #enqueue with two requests that resolve in one time unit each,\n    it processes the requests in series", function (done) {
            var firstRequestEnded = false;
            var firstRequest = BackOffRequest_1.BackOffRequest.enqueue({ fn: function () { return timeUnitsToResolveIn(2); } });
            var secondRequest = BackOffRequest_1.BackOffRequest.enqueue({ fn: function () { return timeUnitsToResolveIn(1); } });
            firstRequest.then(function () { return (firstRequestEnded = true); });
            secondRequest.then(function () {
                expect(firstRequestEnded).toBe(true);
                done();
            });
        });
        it("when calling #enqueue with a request that returns an error,\n    it returns a rejected promise with the error", function (done) {
            var error = { error: true };
            var request = BackOffRequest_1.BackOffRequest.enqueue({ fn: function () { return Promise.reject(error); } });
            request.catch(function (e) {
                expect(e).toBe(error);
                done();
            });
        });
    });
}
exports.BackOffRequestTest = BackOffRequestTest;
 
 
/***/ }),
/* 1557 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var FacetSortCriteria_1 = __webpack_require__(156);
function FacetSortCriteriaTest() {
    describe('isFacetSortCriteria', function () {
        it('should return false for a value that is not a facet sort criteria', function () {
            expect(FacetSortCriteria_1.isFacetSortCriteria('test')).toBe(false);
        });
        it('should return true for values that are facet sort criterias', function () {
            expect(FacetSortCriteria_1.isFacetSortCriteria(FacetSortCriteria_1.FacetSortCriteria.score)).toBe(true);
            expect(FacetSortCriteria_1.isFacetSortCriteria(FacetSortCriteria_1.FacetSortCriteria.occurrences)).toBe(true);
        });
    });
}
exports.FacetSortCriteriaTest = FacetSortCriteriaTest;
 
 
/***/ }),
/* 1558 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var FacetRangeSortOrder_1 = __webpack_require__(275);
function FacetRangeSortOrderTest() {
    describe('isFacetRangeSortOrder', function () {
        it('should return false for a value that is not a facet range sort order', function () {
            expect(FacetRangeSortOrder_1.isFacetRangeSortOrder('test')).toBe(false);
        });
        it('should return true for values that are facet range sort orders', function () {
            expect(FacetRangeSortOrder_1.isFacetRangeSortOrder(FacetRangeSortOrder_1.FacetRangeSortOrder.ascending)).toBe(true);
            expect(FacetRangeSortOrder_1.isFacetRangeSortOrder(FacetRangeSortOrder_1.FacetRangeSortOrder.descending)).toBe(true);
        });
    });
}
exports.FacetRangeSortOrderTest = FacetRangeSortOrderTest;
 
 
/***/ }),
/* 1559 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Plan_1 = __webpack_require__(214);
var Fake_1 = __webpack_require__(11);
function PlanTest() {
    describe('Plan', function () {
        var planResponse = Fake_1.FakeResults.createFakePlanResponse();
        var plan;
        beforeEach(function () {
            plan = new Plan_1.ExecutionPlan(planResponse);
        });
        it('should extract basicExpression', function () {
            expect(plan.basicExpression).toBe(planResponse.parsedInput.basicExpression);
        });
        it('should extract largeExpression', function () {
            expect(plan.largeExpression).toBe(planResponse.parsedInput.largeExpression);
        });
        it('should extract the first redirect trigger for the redirectionURL', function () {
            planResponse.preprocessingOutput.triggers.unshift({ type: 'redirect', content: 'thisisaurl.com' });
            planResponse.preprocessingOutput.triggers.unshift({ type: 'redirect', content: 'thisisanotherurl.com' });
            expect(new Plan_1.ExecutionPlan(planResponse).redirectionURL).toBe('thisisanotherurl.com');
        });
    });
}
exports.PlanTest = PlanTest;
 
 
/***/ }),
/* 1560 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var CookieUtils_1 = __webpack_require__(168);
var Simulate_1 = __webpack_require__(15);
function CookieUtilsTest() {
    describe('CookieUtils', function () {
        it('sets a cookie accordingly', function () {
            CookieUtils_1.Cookie.set('foo', 'bar');
            expect(document.cookie.indexOf('foo=bar')).not.toBe(-1);
        });
        it('gets the right cookie when cookie exists', function () {
            CookieUtils_1.Cookie.set('dude', 'dudevalue');
            expect(CookieUtils_1.Cookie.get('dude')).toBe('dudevalue');
        });
        it("returns null if cookie doesn't exist", function () {
            expect(CookieUtils_1.Cookie.get('foobar2000')).toBe(null);
        });
        it('erases cookie accordingly', function () {
            // Phantom doesn't handle document.cookie
            Iif (Simulate_1.Simulate.isPhantomJs()) {
                expect(true).toBe(true);
            }
            else {
                document.cookie = 'coveo_patate=frite';
                CookieUtils_1.Cookie.erase('patate');
                expect(document.cookie.replace(' ', '').indexOf('coveo_patate=frite')).toBe(-1);
            }
        });
    });
}
exports.CookieUtilsTest = CookieUtilsTest;
 
 
/***/ }),
/* 1561 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var ColorUtils_1 = __webpack_require__(226);
function ColorUtilsTest() {
    describe('ColorUtils', function () {
        it('should create the correct value from hsv to rgb', function () {
            expect(ColorUtils_1.ColorUtils.hsvToRgb(1, 1, 1)).toEqual([255, 0, 0]);
        });
        it('should create the correct value from rgb to hsv', function () {
            expect(ColorUtils_1.ColorUtils.rgbToHsv(255, 0, 0)).toEqual([0, 1, 1]);
        });
    });
}
exports.ColorUtilsTest = ColorUtilsTest;
 
 
/***/ }),
/* 1562 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var AnalyticsActionListMeta_1 = __webpack_require__(7);
var AnalyticsUtils_1 = __webpack_require__(321);
function AnalyticsUtilsTest() {
    describe('utilities methods', function () {
        it('can add new actionCause to actionCauseList', function () {
            var testActionCause = {
                name: 'testActionCause',
                type: 'test'
            };
            AnalyticsUtils_1.AnalyticsUtils.addActionCauseToList(testActionCause);
            expect(AnalyticsActionListMeta_1.analyticsActionCauseList[testActionCause.name]).toBe(testActionCause);
        });
        it('can remove actionCause from actionCauseList', function () {
            AnalyticsActionListMeta_1.analyticsActionCauseList['testActionCause'] = {
                name: 'testActionCause',
                type: 'test'
            };
            AnalyticsUtils_1.AnalyticsUtils.removeActionCauseFromList('testActionCause');
            expect(AnalyticsActionListMeta_1.analyticsActionCauseList['testActionCause']).toBe(undefined);
        });
    });
}
exports.AnalyticsUtilsTest = AnalyticsUtilsTest;
 
 
/***/ }),
/* 1563 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
/// <reference path="../../lib/jasmine/index.d.ts" />
var Dom_1 = __webpack_require__(0);
var CustomMatchers_1 = __webpack_require__(104);
var Simulate_1 = __webpack_require__(15);
function DomTests() {
    describe('Dom', function () {
        var el;
        beforeEach(function () {
            el = document.createElement('div');
            CustomMatchers_1.registerCustomMatcher();
        });
        afterEach(function () {
            el = undefined;
        });
        describe('without jquery', function () {
            beforeEach(function () {
                // we want to test the basic event, not jquery one
                Simulate_1.Simulate.removeJQuery();
            });
            afterEach(function () {
                Simulate_1.Simulate.removeJQuery();
            });
            it('should detect supported event', function () {
                expect(Dom_1.$$(el).canHandleEvent('scroll')).toBe(true);
                expect(Dom_1.$$(el).canHandleEvent('click')).toBe(true);
            });
            it('should detect unsupported event', function () {
                expect(Dom_1.$$(el).canHandleEvent('touchstart')).toBe(false);
                expect(Dom_1.$$(el).canHandleEvent('touchend')).toBe(false);
                expect(Dom_1.$$(el).canHandleEvent('foo')).toBe(false);
            });
            describe('when calling #isValidElement', function () {
                it('should respond true when a valid element is given', function () {
                    var NORMAL_ELEMENT = document.createElement('div');
                    expect(Dom_1.$$(NORMAL_ELEMENT).isValid()).toBeTruthy();
                });
                it('should respond false when a invalid element is given', function () {
                    var NOT_AN_ELEMENT = new Event('resize');
                    expect(Dom_1.$$(NOT_AN_ELEMENT).isValid()).toBeFalsy();
                });
                it('should respond false when a locked element is given such as in a LockerService context', function () {
                    var LOCKED_LOCKER_SERVICE_ELEMENT = {};
                    expect(Dom_1.$$(LOCKED_LOCKER_SERVICE_ELEMENT).isValid()).toBeFalsy();
                });
            });
            describe('without custom event (IE11)', function () {
                var customEvent;
                beforeAll(function () {
                    customEvent = CustomEvent;
                    delete window['CustomEvent'];
                });
                afterAll(function () {
                    window['CustomEvent'] = customEvent;
                });
                it('using trigger should work properly', function () {
                    CustomMatchers_1.registerCustomMatcher();
                    var spy = jasmine.createSpy('spy');
                    new Dom_1.Dom(el).on('click', spy);
                    new Dom_1.Dom(el).trigger('click');
                    expect(spy).toHaveBeenCalled();
                    var spy2 = jasmine.createSpy('spy2');
                    new Dom_1.Dom(el).on('foo', spy2);
                    new Dom_1.Dom(el).trigger('foo', { bar: 'baz' });
                    expect(spy2).eventHandlerToHaveBeenCalledWith({ bar: 'baz' });
                });
                it('using "trigger" with a non alpha numeric character should work properly', function () {
                    var spy = jasmine.createSpy('spy');
                    el.addEventListener('thiscontainsspace', spy);
                    new Dom_1.Dom(el).trigger('this contains space');
                    expect(spy).toHaveBeenCalledTimes(1);
                });
            });
            it('insert after should work properly', function () {
                var parent = document.createElement('div');
                var sibling = document.createElement('div');
                parent.appendChild(sibling);
                expect(sibling.nextSibling).toBeNull();
                new Dom_1.Dom(el).insertAfter(sibling);
                expect(sibling.nextSibling).toBe(el);
                expect(sibling.previousSibling).toBeNull();
                var anotherSibling = document.createElement('div');
                parent.appendChild(anotherSibling);
                expect(el.nextSibling).toBe(anotherSibling);
                new Dom_1.Dom(el).insertAfter(anotherSibling);
                expect(el.nextSibling).toBeNull();
                expect(el.previousSibling).toBe(anotherSibling);
            });
            it('insert before should work properly', function () {
                var parent = document.createElement('div');
                var sibling = document.createElement('div');
                parent.appendChild(sibling);
                expect(sibling.nextSibling).toBeNull();
                new Dom_1.Dom(el).insertBefore(sibling);
                expect(sibling.nextSibling).toBeNull();
                expect(sibling.previousSibling).toBe(el);
                var anotherSibling = document.createElement('div');
                parent.appendChild(anotherSibling);
                expect(anotherSibling.nextSibling).toBeNull();
                expect(anotherSibling.previousSibling).toBe(sibling);
                new Dom_1.Dom(el).insertBefore(anotherSibling);
                expect(el.nextSibling).toBe(anotherSibling);
                expect(el.previousSibling).toBe(sibling);
            });
            it('replace should work properly', function () {
                var other = document.createElement('div');
                var sibling = document.createElement('div');
                var otherSibling = document.createElement('div');
                var parent = document.createElement('div');
                parent.appendChild(sibling);
                parent.appendChild(el);
                parent.appendChild(otherSibling);
                expect(el.parentNode).toBe(parent);
                expect(other.parentNode).toBeNull();
                expect(el.previousSibling).toBe(sibling);
                expect(el.nextSibling).toBe(otherSibling);
                new Dom_1.Dom(el).replaceWith(other);
                expect(el.parentNode).toBeNull();
                expect(other.parentNode).toBe(parent);
                expect(other.previousSibling).toBe(sibling);
                expect(other.nextSibling).toBe(otherSibling);
            });
            describe("when calling #show", function () {
                var div;
                beforeEach(function () {
                    div = document.createElement('div');
                    Dom_1.$$(div).show();
                });
                it('sets display to an empty string', function () {
                    expect(div.style.display).toBe('block');
                });
                it("sets the aria-hidden attribute to 'false'", function () {
                    expect(div.getAttribute('aria-hidden')).toBe('false');
                });
            });
            describe("when calling #hide", function () {
                var div;
                beforeEach(function () {
                    div = document.createElement('div');
                    Dom_1.$$(div).hide();
                });
                it("sets display to 'none'", function () {
                    expect(div.style.display).toBe('none');
                });
                it("sets the aria-hidden attribute to 'true'", function () {
                    expect(div.getAttribute('aria-hidden')).toBe('true');
                });
            });
            describe("when calling #unhide", function () {
                var div;
                beforeEach(function () {
                    div = document.createElement('div');
                    Dom_1.$$(div).unhide();
                });
                it('sets display to an empty string', function () {
                    expect(div.style.display).toBe('');
                });
                it("sets the aria-hidden attribute to 'false'", function () {
                    expect(div.getAttribute('aria-hidden')).toBe('false');
                });
            });
            describe('prepend', function () {
                it('should work properly', function () {
                    var firstChild = document.createElement('div');
                    el.appendChild(firstChild);
                    expect(el.firstChild).toBe(firstChild);
                    var toPrepend = document.createElement('div');
                    new Dom_1.Dom(el).prepend(toPrepend);
                    expect(el.firstChild).toBe(toPrepend);
                    expect(toPrepend.nextSibling).toBe(firstChild);
                });
                it('should work even if there if parent element is empty', function () {
                    var parent = Dom_1.$$('div');
                    var toPrepend = Dom_1.$$('span', { className: 'foo' }).el;
                    parent.prepend(toPrepend);
                    expect(parent.el.firstChild).toBe(toPrepend);
                });
                it('should work even if parent element contains text', function () {
                    var parent = Dom_1.$$('div', {}, 'thisissometext');
                    var toPrepend = Dom_1.$$('span', { className: 'foo' }).el;
                    parent.prepend(toPrepend);
                    expect(parent.el.firstChild).toBe(toPrepend);
                });
            });
            it('should give the correct text content', function () {
                el.innerHTML = '<div>this is the content</div>';
                expect(new Dom_1.Dom(el).text()).toEqual('this is the content');
                el = document.createElement('div');
                el.innerHTML = '<div>this <span>is</span> the <div><span>content</span></div></div>';
                expect(new Dom_1.Dom(el).text()).toEqual('this is the content');
            });
            it('should allow to set the text content', function () {
                new Dom_1.Dom(el).text('this is the content');
                expect(el.innerHTML).toEqual('this is the content');
                /// Setting HTML content as text should still work
                el = document.createElement('div');
                new Dom_1.Dom(el).text('<div>this is the content</div>');
                expect(el.childNodes[0].nodeValue).toEqual('<div>this is the content</div>');
            });
            describe('createElement', function () {
                it('should properly create a single HTMLElement', function () {
                    var elem = Dom_1.Dom.createElement('div', {
                        id: 'heidi',
                        className: 'kloss',
                        'data-my-attr': 'baz'
                    }, 'foobar2000');
                    expect(elem.tagName).toEqual('DIV');
                    expect(elem.id).toEqual('heidi');
                    expect(elem.className).toEqual('kloss');
                    expect(elem.dataset['myAttr']).toEqual('baz');
                    expect(elem.innerHTML).toEqual('foobar2000');
                });
                it("should properly create nested HTMLElement's", function () {
                    var elem = Dom_1.Dom.createElement('header', undefined, Dom_1.Dom.createElement('div', undefined, Dom_1.Dom.createElement('span', undefined, 'foo')));
                    expect(elem.tagName).toEqual('HEADER');
                    expect(elem.firstChild.nodeName).toEqual('DIV');
                    expect(elem.firstChild.firstChild.nodeName).toEqual('SPAN');
                    expect(elem.firstChild.firstChild['innerHTML']).toEqual('foo');
                });
            });
            it('should find a child using a query selector', function () {
                var toFind = document.createElement('div');
                toFind.className = 'qwerty';
                el.appendChild(toFind);
                expect(new Dom_1.Dom(el).find('.qwerty')).toBe(toFind);
                el = document.createElement('div');
                toFind = document.createElement('div');
                toFind.className = 'qwerty notqwerty';
                el.appendChild(toFind);
                expect(new Dom_1.Dom(el).find('.qwerty')).toBe(toFind);
                el = document.createElement('div');
                toFind = document.createElement('div');
                toFind.id = 'qwerty';
                el.appendChild(toFind);
                expect(new Dom_1.Dom(el).find('#qwerty')).toBe(toFind);
                el = document.createElement('div');
                var inner = document.createElement('div');
                toFind = document.createElement('div');
                toFind.id = 'qwerty';
                inner.appendChild(toFind);
                el.appendChild(inner);
                expect(new Dom_1.Dom(el).find('#qwerty')).toBe(toFind);
            });
            it('should find all child using a query selector', function () {
                var toFind = document.createElement('div');
                toFind.className = 'qwerty';
                var toFind2 = document.createElement('div');
                toFind2.className = 'qwerty notqwerty';
                el.appendChild(toFind);
                el.appendChild(toFind2);
                expect(new Dom_1.Dom(el).findAll('.qwerty')).toContain(toFind);
                expect(new Dom_1.Dom(el).findAll('.qwerty')).toContain(toFind2);
            });
            it('using findClass should find the child element', function () {
                var toFind = document.createElement('div');
                toFind.className = 'qwerty';
                var toFind2 = document.createElement('div');
                toFind2.className = 'qwerty notqwerty';
                toFind2.id = 'shouldNotBeFound';
                el.appendChild(toFind);
                el.appendChild(toFind2);
                expect(new Dom_1.Dom(el).findClass('qwerty')).toContain(toFind);
                expect(new Dom_1.Dom(el).findClass('qwerty')).toContain(toFind2);
                expect(new Dom_1.Dom(el).findClass('shouldNotBeFound').length).toBe(0);
            });
            it('using isVisible should work if the element is display:none', function () {
                el.style.display = 'none';
                expect(new Dom_1.Dom(el).isVisible()).toBeFalsy();
            });
            it('using isVisible should work if the element is visibility:hidden', function () {
                el.style.display = 'none';
                expect(new Dom_1.Dom(el).isVisible()).toBeFalsy();
            });
            it("using isVisible should work if the element has 'coveo-tab-disabled' added by tab(s)", function () {
                el.className = 'coveo-tab-disabled';
                expect(new Dom_1.Dom(el).isVisible()).toBeFalsy();
            });
            it('using isVisible should work if the element is not display:none', function () {
                el.style.display = 'block';
                expect(new Dom_1.Dom(el).isVisible()).toBeTruthy();
            });
            it('using isVisible should work if the element is not visibility hidden', function () {
                el.style.visibility = 'visible';
                expect(new Dom_1.Dom(el).isVisible()).toBeTruthy();
            });
            it('using isVisible should work if the element does not have a specific css class added by tab(s)', function () {
                el.className = 'totally-not-coveo-tab-disabled';
                expect(new Dom_1.Dom(el).isVisible()).toBeTruthy();
            });
            it('using addClass should work properly', function () {
                el.className = 'qwerty';
                new Dom_1.Dom(el).addClass('notqwerty');
                expect(el.className).toBe('qwerty notqwerty');
                el = document.createElement('div');
                el.className = 'qwerty';
                new Dom_1.Dom(el).addClass('qwerty');
                expect(el.className).toBe('qwerty');
                el = document.createElement('div');
                new Dom_1.Dom(el).addClass('qwerty');
                expect(el.className).toBe('qwerty');
                el = document.createElement('div');
                new Dom_1.Dom(el).addClass(['a', 'b', 'c']);
                expect(el.className).toBe('a b c');
            });
            it('using removeClass should work properly', function () {
                el.className = 'qwerty';
                new Dom_1.Dom(el).removeClass('qwerty');
                expect(el.className).toBe('');
                el = document.createElement('div');
                el.className = 'qwerty notqwerty';
                new Dom_1.Dom(el).removeClass('qwerty');
                expect(el.className).toBe('notqwerty');
                el = document.createElement('div');
                el.className = 'qwerty notqwerty';
                new Dom_1.Dom(el).removeClass('notqwerty');
                expect(el.className).toBe('qwerty');
                el = document.createElement('div');
                new Dom_1.Dom(el).removeClass('qwerty');
                expect(el.className).toBe('');
                el = document.createElement('div');
                el.className = 'popoqwerty qwerty notqwerty';
                new Dom_1.Dom(el).removeClass('qwerty');
                expect(el.className).toBe('popoqwerty notqwerty');
            });
            it('using removeClass should work properly if we are removing part of a an existing class name', function () {
                el.className = 'a-b-c';
                new Dom_1.Dom(el).removeClass('a');
                expect(el.className).toBe('a-b-c');
                new Dom_1.Dom(el).removeClass('-b-');
                expect(el.className).toBe('a-b-c');
                new Dom_1.Dom(el).removeClass('a-b-');
                expect(el.className).toBe('a-b-c');
                new Dom_1.Dom(el).removeClass('a-b-c');
                expect(el.className).toBe('');
            });
            it('using getClass should return the correct array with all classes', function () {
                el.className = 'qwerty';
                expect(new Dom_1.Dom(el).getClass()).toContain('qwerty');
                el = document.createElement('div');
                el.className = 'qwerty notqwerty';
                expect(new Dom_1.Dom(el).getClass()).toContain('qwerty');
                expect(new Dom_1.Dom(el).getClass()).toContain('notqwerty');
            });
            it('using hasClass should return properly', function () {
                el.className = 'qwerty';
                expect(new Dom_1.Dom(el).hasClass('qwerty')).toBe(true);
                el = document.createElement('div');
                el.className = 'qwerty notqwerty qwerty';
                expect(new Dom_1.Dom(el).hasClass('qwerty')).toBe(true);
                el = document.createElement('div');
                el.className = 'qwerty notqwerty qwerty';
                expect(new Dom_1.Dom(el).hasClass(' ')).toBe(false);
                el = document.createElement('div');
                el.className = 'qwerty notqwerty qwerty';
                expect(new Dom_1.Dom(el).hasClass('')).toBe(false);
                el = document.createElement('div');
                el.className = 'qwerty';
                expect(new Dom_1.Dom(el).hasClass('notqwerty')).toBe(false);
                el = document.createElement('div');
                expect(new Dom_1.Dom(el).hasClass('')).toBe(false);
                el = document.createElement('div');
                expect(new Dom_1.Dom(el).hasClass('qwerty')).toBe(false);
            });
            it('using toggleClass without switch should work properly', function () {
                el.className = 'qwerty';
                var domEl = new Dom_1.Dom(el);
                domEl.toggleClass('qwerty');
                expect(domEl.hasClass('qwerty')).toBe(false);
                el = document.createElement('div');
                domEl = new Dom_1.Dom(el);
                domEl.toggleClass('foobar2000');
                expect(domEl.hasClass('foobar2000')).toBe(true);
            });
            it('using toggleClass with switch should work properly', function () {
                var domEl = new Dom_1.Dom(el);
                domEl.toggleClass('qwerty', false);
                expect(domEl.hasClass('qwerty')).toBe(false);
                domEl = new Dom_1.Dom(document.createElement('div'));
                domEl.addClass('foobar2000');
                domEl.toggleClass('foobar2000', true);
                expect(domEl.hasClass('foobar2000')).toBe(true);
            });
            it('using detach should work properly', function () {
                var parent = document.createElement('div');
                parent.appendChild(el);
                expect(parent.children).toContain(el);
                new Dom_1.Dom(el).detach();
                expect(parent.children).not.toContain(el);
            });
            it('using on should work properly', function () {
                var spy = jasmine.createSpy('spy');
                new Dom_1.Dom(el).on('click', spy);
                el.click();
                expect(spy).toHaveBeenCalled();
                var spy2 = jasmine.createSpy('spy2');
                new Dom_1.Dom(el).on('foo', spy2);
                var event = new CustomEvent('foo', {
                    detail: {
                        lorem: 'ipsum'
                    }
                });
                el.dispatchEvent(event);
                expect(spy2).toHaveBeenCalledWith(event, event.detail);
                var spy3 = jasmine.createSpy('spy3');
                new Dom_1.Dom(el).on(['1', '2', '3'], spy3);
                var events = ['1', '2', '3'].map(function (evt) {
                    return new CustomEvent(evt);
                });
                events.forEach(function (evt) {
                    el.dispatchEvent(evt);
                });
                expect(spy3).toHaveBeenCalledTimes(3);
            });
            it('using one should work properly', function () {
                var spy = jasmine.createSpy('spy');
                new Dom_1.Dom(el).one('click', spy);
                el.click();
                el.click();
                el.click();
                expect(spy).toHaveBeenCalledTimes(1);
            });
            it('after calling off the event handler should not be called', function () {
                var spy = jasmine.createSpy('spy');
                new Dom_1.Dom(el).on('click', spy);
                new Dom_1.Dom(el).off('click', spy);
                el.click();
                expect(spy).not.toHaveBeenCalled();
                var spy2 = jasmine.createSpy('spy2');
                new Dom_1.Dom(el).on(['1', '2', '3'], spy2);
                var events = ['1', '2', '3'].map(function (evt) {
                    return new CustomEvent(evt);
                });
                new Dom_1.Dom(el).off(['1', '2', '3'], spy2);
                events.forEach(function (evt) {
                    el.dispatchEvent(evt);
                });
                expect(spy).not.toHaveBeenCalled();
            });
            it('using trigger should work properly', function () {
                CustomMatchers_1.registerCustomMatcher();
                var spy = jasmine.createSpy('spy');
                new Dom_1.Dom(el).on('click', spy);
                new Dom_1.Dom(el).trigger('click');
                expect(spy).toHaveBeenCalled();
                var spy2 = jasmine.createSpy('spy2');
                new Dom_1.Dom(el).on('foo', spy2);
                new Dom_1.Dom(el).trigger('foo', { bar: 'baz' });
                expect(spy2).eventHandlerToHaveBeenCalledWith({ bar: 'baz' });
            });
            it('using "on" with a non alpha numeric character should work properly', function () {
                var spy = jasmine.createSpy('spy');
                new Dom_1.Dom(el).on('this contains space', spy);
                var event = new CustomEvent('thiscontainsspace');
                el.dispatchEvent(event);
                expect(spy).toHaveBeenCalledTimes(1);
            });
            it('using "on" with multiple non alpha numeric character events should work properly', function () {
                var spy = jasmine.createSpy('spy');
                new Dom_1.Dom(el).on(['this contains space', 'this:contains space too'], spy);
                var event = new CustomEvent('thiscontainsspace');
                var event2 = new CustomEvent('this:containsspacetoo');
                el.dispatchEvent(event);
                el.dispatchEvent(event2);
                expect(spy).toHaveBeenCalledTimes(2);
            });
            it('using "one" with a non alpha numeric character should work properly', function () {
                var spy = jasmine.createSpy('spy');
                new Dom_1.Dom(el).one('this contains space', spy);
                var event = new CustomEvent('thiscontainsspace');
                el.dispatchEvent(event);
                el.dispatchEvent(event);
                el.dispatchEvent(event);
                expect(spy).toHaveBeenCalledTimes(1);
            });
            it('using "trigger" with a non alpha numeric character should work properly', function () {
                var spy = jasmine.createSpy('spy');
                el.addEventListener('thiscontainsspace', spy);
                new Dom_1.Dom(el).trigger('this contains space');
                expect(spy).toHaveBeenCalledTimes(1);
            });
            it('using isEmpty should work properly', function () {
                expect(new Dom_1.Dom(el).isEmpty()).toBe(true);
                el.appendChild(document.createElement('div'));
                expect(new Dom_1.Dom(el).isEmpty()).toBe(false);
                el = document.createElement('div');
                el.innerHTML = '        ';
                expect(new Dom_1.Dom(el).isEmpty()).toBe(true);
            });
            it('should find ancestor element using closest', function () {
                var root = document.createElement('div');
                root.className = 'findme';
                root.appendChild(el);
                expect(new Dom_1.Dom(el).closest('findme')).toBe(root);
            });
            it('should find the first ancestor element using parent', function () {
                var root = document.createElement('div');
                var parentOne = Dom_1.$$('div', { className: 'foo' });
                var parentTwo = Dom_1.$$('div', { className: 'foo' });
                var parentThree = Dom_1.$$('div', { className: 'foo' });
                var child = Dom_1.$$('div');
                root.appendChild(parentOne.el);
                parentOne.append(parentTwo.el);
                parentTwo.append(parentThree.el);
                parentThree.append(child.el);
                expect(child.parent('foo')).toEqual(parentThree.el);
            });
            it('should not throw if there are no parent element using parent', function () {
                var root = Dom_1.$$('div');
                expect(function () { return root.parent('bar'); }).not.toThrow();
            });
            it('should return undefined if there is no match using parent', function () {
                var root = document.createElement('div');
                var parentOne = Dom_1.$$('div', { className: 'foo' });
                var parentTwo = Dom_1.$$('div', { className: 'foo' });
                var parentThree = Dom_1.$$('div', { className: 'foo' });
                var child = Dom_1.$$('div');
                root.appendChild(parentOne.el);
                parentOne.append(parentTwo.el);
                parentTwo.append(parentThree.el);
                parentThree.append(child.el);
                expect(child.parent('bar')).toBeUndefined();
            });
            it('should find all ancestor elements using parents', function () {
                var root = document.createElement('div');
                var parentOne = Dom_1.$$('div', { className: 'foo' });
                var parentTwo = Dom_1.$$('div', { className: 'foo' });
                var parentThree = Dom_1.$$('div', { className: 'foo' });
                var child = Dom_1.$$('div');
                root.appendChild(parentOne.el);
                parentOne.append(parentTwo.el);
                parentTwo.append(parentThree.el);
                parentThree.append(child.el);
                expect(child.parents('foo')).toEqual([parentThree.el, parentTwo.el, parentOne.el]);
            });
            it('should return empty array if there is no match using parents', function () {
                var root = document.createElement('div');
                var parentOne = Dom_1.$$('div', { className: 'foo' });
                var parentTwo = Dom_1.$$('div', { className: 'foo' });
                var parentThree = Dom_1.$$('div', { className: 'foo' });
                var child = Dom_1.$$('div');
                root.appendChild(parentOne.el);
                parentOne.append(parentTwo.el);
                parentTwo.append(parentThree.el);
                parentThree.append(child.el);
                expect(child.parents('bar')).toEqual([]);
            });
            it('should not fail if there is no parent element using parents', function () {
                var root = Dom_1.$$('div');
                expect(function () { return root.parents('bar'); }).not.toThrow();
            });
            it('should be able to tell if an element matches a selector', function () {
                el = document.createElement('div');
                el.className = 'foo bar foobar';
                el.setAttribute('id', 'batman');
                expect(new Dom_1.Dom(el).is('div')).toBe(true);
                expect(new Dom_1.Dom(el).is('.foo')).toBe(true);
                expect(new Dom_1.Dom(el).is('.foobar')).toBe(true);
                expect(new Dom_1.Dom(el).is('#batman')).toBe(true);
                // no leading point for class
                expect(new Dom_1.Dom(el).is('foo')).toBe(false);
                // no leading # for id
                expect(new Dom_1.Dom(el).is('batman')).toBe(false);
                // class does not exists
                expect(new Dom_1.Dom(el).is('nope')).toBe(false);
                // not the correct tag
                expect(new Dom_1.Dom(el).is('input')).toBe(false);
            });
            it('should be able to empty an element', function () {
                var append1 = document.createElement('div');
                var append2 = document.createElement('div');
                el.appendChild(append1);
                el.appendChild(append2);
                expect(append1.parentElement).toBe(el);
                expect(append2.parentElement).toBe(el);
                new Dom_1.Dom(el).empty();
                expect(append1.parentElement).toBeNull();
                expect(append2.parentElement).toBeNull();
            });
            it('should be able to remove a child', function () {
                var append1 = document.createElement('div');
                var append2 = document.createElement('div');
                el.appendChild(append1);
                el.appendChild(append2);
                expect(append1.parentElement).toBe(el);
                expect(append2.parentElement).toBe(el);
                new Dom_1.Dom(el).removeChild(append1);
                expect(append1.parentElement).toBeNull();
                expect(append2.parentElement).toBe(el);
            });
            it('should throw an error when trying to remove a child from the wrong parent', function () {
                var append1 = document.createElement('div');
                var append2 = document.createElement('div');
                el.appendChild(append1);
                append1.appendChild(append2);
                expect(function () { return new Dom_1.Dom(el).removeChild(append2); }).toThrowError();
            });
        });
        describe('with jquery', function () {
            beforeEach(function () {
                // we want to test the basic event, not jquery one
                Simulate_1.Simulate.addJQuery();
            });
            afterEach(function () {
                Simulate_1.Simulate.removeJQuery();
            });
            describe('with native set to true', function () {
                beforeEach(function () {
                    Dom_1.Dom.useNativeJavaScriptEvents = true;
                });
                afterEach(function () {
                    Dom_1.Dom.useNativeJavaScriptEvents = false;
                });
                it('when using "on" to bind a click event, when triggering a click, it calls the click handler', function () {
                    var spy = jasmine.createSpy('spy');
                    new Dom_1.Dom(el).on('click', spy);
                    el.click();
                    expect(spy).toHaveBeenCalled();
                });
                it('when using "on" to bind a custom event, when triggering the custom event with a payload, it calls the handler with the payload', function () {
                    var spy2 = jasmine.createSpy('spy2');
                    var test = { detail: { lorem: 'ipsum' } };
                    new Dom_1.Dom(el).on('foo', spy2);
                    new Dom_1.Dom(el).trigger('foo', test);
                    expect(spy2).toHaveBeenCalledWith(jasmine.any(Event), jasmine.objectContaining(test));
                });
                it('when using "on" to bind three different events having the same handler, when triggering the three events, it calls the handler three times', function () {
                    var spy3 = jasmine.createSpy('spy3');
                    var eventNames = ['1', '2', '3'];
                    new Dom_1.Dom(el).on(eventNames, spy3);
                    eventNames.map(function (evt) { return new CustomEvent(evt); }).forEach(function (evt) { return el.dispatchEvent(evt); });
                    expect(spy3).toHaveBeenCalledTimes(3);
                });
                it('using "on" with non alpha numeric character should work properly', function () {
                    var spy = jasmine.createSpy('spy');
                    new Dom_1.Dom(el).on('this contains space', spy);
                    new Dom_1.Dom(el).trigger('thiscontainsspace');
                    expect(spy).toHaveBeenCalledTimes(1);
                });
                it('using "one" should work properly', function () {
                    var spy = jasmine.createSpy('spy');
                    new Dom_1.Dom(el).one('click', spy);
                    el.click();
                    el.click();
                    el.click();
                    expect(spy).toHaveBeenCalled();
                    expect(spy).toHaveBeenCalledTimes(1);
                });
                it('using "one" with non alpha numeric character should work properly', function () {
                    var spy = jasmine.createSpy('spy');
                    new Dom_1.Dom(el).one('this contains space', spy);
                    new Dom_1.Dom(el).trigger('thiscontainsspace');
                    new Dom_1.Dom(el).trigger('thiscontainsspace');
                    new Dom_1.Dom(el).trigger('thiscontainsspace');
                    expect(spy).toHaveBeenCalledTimes(1);
                });
                it('using "off" should work properly', function () {
                    var spy = jasmine.createSpy('spy');
                    new Dom_1.Dom(el).on('test', spy);
                    new Dom_1.Dom(el).off('test', spy);
                    el.dispatchEvent(new CustomEvent('test'));
                    expect(spy).not.toHaveBeenCalled();
                });
                it('using "trigger" should work properly', function () {
                    var spy = jasmine.createSpy('spy');
                    new Dom_1.Dom(el).on('click', spy);
                    new Dom_1.Dom(el).trigger('click');
                    expect(spy).toHaveBeenCalled();
                    var spy2 = jasmine.createSpy('spy2');
                    new Dom_1.Dom(el).on('foo', spy2);
                    new Dom_1.Dom(el).trigger('foo', { bar: 'baz' });
                    expect(spy2).toHaveBeenCalledWith(jasmine.any(Event), { bar: 'baz' });
                });
                it('using "trigger" with non alpha numeric character should work properly', function () {
                    var spy = jasmine.createSpy('spy');
                    new Dom_1.Dom(el).on('thiscontainsspace', spy);
                    new Dom_1.Dom(el).trigger('this contains space');
                    expect(spy).toHaveBeenCalledTimes(1);
                });
            });
            it('using "on" should work properly', function () {
                var spy = jasmine.createSpy('spy');
                new Dom_1.Dom(el).on('click', spy);
                el.click();
                expect(spy).toHaveBeenCalled();
                var spy2 = jasmine.createSpy('spy2');
                new Dom_1.Dom(el).on('foo', spy2);
                new Dom_1.Dom(el).trigger('foo', {
                    detail: {
                        lorem: 'ipsum'
                    }
                });
                expect(spy2).toHaveBeenCalledWith(jasmine.any(jQuery.Event), jasmine.objectContaining({
                    detail: {
                        lorem: 'ipsum'
                    }
                }));
                var spy3 = jasmine.createSpy('spy3');
                new Dom_1.Dom(el).on(['1', '2', '3'], spy3);
                var events = ['1', '2', '3'].map(function (evt) {
                    return new CustomEvent(evt);
                });
                events.forEach(function (evt) {
                    el.dispatchEvent(evt);
                });
                expect(spy3).toHaveBeenCalledTimes(3);
            });
            it('using "on" with non alpha numeric character should work properly', function () {
                var spy = jasmine.createSpy('spy');
                new Dom_1.Dom(el).on('this contains space', spy);
                window['Coveo']['$'](el).trigger('thiscontainsspace');
                expect(spy).toHaveBeenCalledTimes(1);
            });
            it('using "one" should work properly', function () {
                var spy = jasmine.createSpy('spy');
                new Dom_1.Dom(el).one('click', spy);
                el.click();
                el.click();
                el.click();
                expect(spy).toHaveBeenCalledTimes(1);
            });
            it('using "one" with non alpha numeric character should work properly', function () {
                var spy = jasmine.createSpy('spy');
                new Dom_1.Dom(el).one('this contains space', spy);
                window['Coveo']['$'](el).trigger('thiscontainsspace');
                window['Coveo']['$'](el).trigger('thiscontainsspace');
                window['Coveo']['$'](el).trigger('thiscontainsspace');
                expect(spy).toHaveBeenCalledTimes(1);
            });
            it('using "off" should work properly', function () {
                var spy = jasmine.createSpy('spy');
                new Dom_1.Dom(el).on('click', spy);
                new Dom_1.Dom(el).off('click', spy);
                el.click();
                expect(spy).not.toHaveBeenCalled();
                var spy2 = jasmine.createSpy('spy2');
                new Dom_1.Dom(el).on(['1', '2', '3'], spy2);
                new Dom_1.Dom(el).off(['1', '2', '3'], spy2);
                ['1', '2', '3'].forEach(function (evt) {
                    new Dom_1.Dom(el).trigger(evt);
                });
                expect(spy).not.toHaveBeenCalled();
            });
            it('using "trigger" should work properly', function () {
                var spy = jasmine.createSpy('spy');
                new Dom_1.Dom(el).on('click', spy);
                new Dom_1.Dom(el).trigger('click');
                expect(spy).toHaveBeenCalled();
                var spy2 = jasmine.createSpy('spy2');
                new Dom_1.Dom(el).on('foo', spy2);
                new Dom_1.Dom(el).trigger('foo', { bar: 'baz' });
                expect(spy2).toHaveBeenCalledWith(jasmine.any(jQuery.Event), { bar: 'baz' });
            });
            it('using "trigger" with non alpha numeric character should work properly', function () {
                var spy = jasmine.createSpy('spy');
                window['Coveo']['$'](el).on('thiscontainsspace', spy);
                new Dom_1.Dom(el).trigger('this contains space');
                expect(spy).toHaveBeenCalledTimes(1);
            });
        });
    });
}
exports.DomTests = DomTests;
 
 
/***/ }),
/* 1564 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var HighlightUtils_1 = __webpack_require__(82);
var HighlightUtils_2 = __webpack_require__(82);
function HighlightUtilsTest() {
    describe('HighlightUtils', function () {
        var lorem = 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut';
        var uri = 'http://onlinehelp.coveo.com/en/CES/7.0/Administrator/Moving_the_Index_to_a_Different_Drive.htm';
        var netPath = '\\\\Programmes\\Ces\\config\\sources\\salesforce';
        var localPath = 'C:\\Programmes\\Ces\\config\\sources\\salesforce';
        describe('highlightString', function () {
            it('should wrap the passed highlights with tags using the specified class name', function () {
                var highlights = [
                    { offset: 3, length: 5 },
                    { offset: 10, length: 4 },
                    { offset: 18, length: 15 },
                    { offset: 45, length: 10 }
                ];
                var expectedHighlight = 'Lor<span class="coveo-highlight">em ip</span>su<span class="coveo-highlight">m do</span>lor <span class="coveo-highlight">sit amet, conse</span>ctetur adipi<span class="coveo-highlight">sicing eli</span>t, sed do eiusmod tempor incididunt ut';
                expect(HighlightUtils_1.HighlightUtils.highlightString(lorem, highlights, null, 'coveo-highlight')).toBe(expectedHighlight);
            });
            it("should ignore highlights that are out of a shortened string's bounds", function () {
                var shortenedString = HighlightUtils_2.StringAndHoles.shortenString(lorem, 35, '...');
                var highlights = [
                    { offset: 3, length: 5 },
                    { offset: 10, length: 4 },
                    { offset: 18, length: 15 },
                    { offset: 45, length: 10 }
                ];
                var expectedHighlight = 'Lor<span class="coveo-highlight">em ip</span>su<span class="coveo-highlight">m do</span>lor <span class="coveo-highlight">sit amet,</span>...';
                var highlightedString = HighlightUtils_1.HighlightUtils.highlightString(shortenedString.value, highlights, shortenedString.holes, 'coveo-highlight');
                expect(highlightedString).toBe(expectedHighlight);
            });
            it("should ignore highlights that are out of a shortened local path's bounds", function () {
                var shortenedString = HighlightUtils_2.StringAndHoles.shortenPath(localPath, 15);
                var highlights = [
                    { offset: 3, length: 5 },
                    { offset: 10, length: 4 },
                    { offset: 18, length: 15 },
                    { offset: 45, length: 10 }
                ];
                var expectedHighlight = 'C:\\...<span class="coveo-highlight">ces\\</span>sa...';
                var highlightedString = HighlightUtils_1.HighlightUtils.highlightString(shortenedString.value, highlights, shortenedString.holes, 'coveo-highlight');
                expect(highlightedString).toBe(expectedHighlight);
                shortenedString = HighlightUtils_2.StringAndHoles.shortenPath(localPath, 30);
                expectedHighlight = 'C:\\...<span class="coveo-highlight">fig\\sources\\</span>salesforce';
                highlightedString = HighlightUtils_1.HighlightUtils.highlightString(shortenedString.value, highlights, shortenedString.holes, 'coveo-highlight');
                expect(highlightedString).toBe(expectedHighlight);
            });
            it("should ignore highlights that are out of a shortened network path's bounds", function () {
                var shortenedString = HighlightUtils_2.StringAndHoles.shortenPath(netPath, 30);
                var highlights = [
                    { offset: 3, length: 5 },
                    { offset: 10, length: 4 },
                    { offset: 16, length: 15 },
                    { offset: 45, length: 10 }
                ];
                var expectedHighlight = '\\\\...<span class="coveo-highlight">ig\\sources\\</span>salesforce';
                var highlightedString = HighlightUtils_1.HighlightUtils.highlightString(shortenedString.value, highlights, shortenedString.holes, 'coveo-highlight');
                expect(highlightedString).toBe(expectedHighlight);
            });
            it("should ignore highlights that are out of a shortened uri's bounds", function () {
                var shortenedString = HighlightUtils_2.StringAndHoles.shortenUri(uri, 60);
                var highlights = [
                    { offset: 12, length: 4 },
                    { offset: 18, length: 15 },
                    { offset: 45, length: 10 }
                ];
                var expectedHighlight = 'http://onlin<span class="coveo-highlight">ehel</span>p.<span class="coveo-highlight">coveo.com/</span>...<span class="coveo-highlight">/Mo</span>ving_the_Index_to_a_Dif...';
                var highlightedString = HighlightUtils_1.HighlightUtils.highlightString(shortenedString.value, highlights, shortenedString.holes, 'coveo-highlight');
                expect(highlightedString).toBe(expectedHighlight);
            });
        });
        describe('shortenString', function () {
            it('should shorten the string to the specified number of characters and append the specified value', function () {
                var shortenedString = HighlightUtils_2.StringAndHoles.shortenString(lorem, 60, '...');
                expect(shortenedString).toEqual(jasmine.objectContaining({
                    value: 'Lorem ipsum dolor sit amet, consectetur adipisicing elit,...',
                    holes: [{ begin: 57, size: 36, replacementSize: 3 }]
                }));
            });
            it('should not shorten string that is shorter than the specified value', function () {
                var shortenedString = HighlightUtils_2.StringAndHoles.shortenString(lorem, 9000, '...');
                expect(shortenedString.value).toBe(lorem);
                expect(shortenedString.holes).toBeUndefined();
            });
        });
        describe('shortenPath', function () {
            it('should shorten local path properly', function () {
                var shortenedPath = HighlightUtils_2.StringAndHoles.shortenPath(localPath, 30);
                expect(shortenedPath).toEqual(jasmine.objectContaining({
                    value: 'C:\\...fig\\sources\\salesforce',
                    holes: [{ begin: 3, size: 18, replacementSize: 3 }]
                }));
            });
            it('should shorten network path properly', function () {
                var shortenedNetPath = HighlightUtils_2.StringAndHoles.shortenPath(netPath, 30);
                expect(shortenedNetPath).toEqual(jasmine.objectContaining({
                    value: '\\\\...ig\\sources\\salesforce',
                    holes: [{ begin: 2, size: 18, replacementSize: 3 }]
                }));
            });
            it('should shorten network path to an absurd amount', function () {
                var shortenedNetPath = HighlightUtils_2.StringAndHoles.shortenPath(netPath, 15);
                expect(shortenedNetPath).toEqual(jasmine.objectContaining({
                    value: '\\\\...es\\sale...',
                    holes: [
                        { begin: 2, size: 26, replacementSize: 3 },
                        { begin: 12, size: 6, replacementSize: 3 }
                    ]
                }));
            });
        });
        describe('shortenUri', function () {
            it('should shorten an uri properly', function () {
                var shortenedUri = HighlightUtils_2.StringAndHoles.shortenUri(uri, 60);
                expect(shortenedUri).toEqual(jasmine.objectContaining({
                    value: 'http://onlinehelp.coveo.com/.../Moving_the_Index_to_a_Dif...',
                    holes: [
                        { begin: 28, size: 24, replacementSize: 3 },
                        { begin: 57, size: 16, replacementSize: 3 }
                    ]
                }));
            });
            it('should shorten an uri to an absurd amount', function () {
                var shortenedUri = HighlightUtils_2.StringAndHoles.shortenUri(uri, 15);
                expect(shortenedUri).toEqual(jasmine.objectContaining({
                    value: 'http://onlin...',
                    holes: [
                        { begin: 28, size: 24, replacementSize: 3 },
                        { begin: 12, size: 61, replacementSize: 3 }
                    ]
                }));
            });
            it('should not strip end characters if there is enough room for them', function () {
                var shortenedUri = HighlightUtils_2.StringAndHoles.shortenUri(uri, 80);
                expect(shortenedUri).toEqual(jasmine.objectContaining({
                    value: 'http://onlinehelp.coveo.com/.../Moving_the_Index_to_a_Different_Drive.htm',
                    holes: [{ begin: 28, size: 24, replacementSize: 3 }]
                }));
            });
        });
        describe('highlight', function () {
            var highlightClass = 'coveo-highlight';
            it('text is empty string, it returns an empty array', function () {
                var result = HighlightUtils_1.HighlightUtils.highlight('', '', highlightClass);
                expect(result.length).toBe(0);
            });
            it('text, match is an empty string, it returns the text in one not highlighted node', function () {
                var result = HighlightUtils_1.HighlightUtils.highlight('a', '', highlightClass);
                expect(result.length).toBe(1);
                expect(result[0].textContent).toBe('a');
                expect(result[0].className).toBe('');
            });
            it('text contains the match, it returns the text in one highlighted node', function () {
                var result = HighlightUtils_1.HighlightUtils.highlight('a', 'a', highlightClass);
                expect(result.length).toBe(1);
                expect(result[0].textContent).toBe('a');
                expect(result[0].className).toBe(highlightClass);
            });
            it('text contains the match but in a different case, it returns the text in one highlighted node', function () {
                var result = HighlightUtils_1.HighlightUtils.highlight('a', 'A', highlightClass);
                expect(result.length).toBe(1);
                expect(result[0].textContent).toBe('a');
                expect(result[0].className).toBe(highlightClass);
            });
            it('text contains a multi-character match, it returns the text in one highlighted node', function () {
                var result = HighlightUtils_1.HighlightUtils.highlight('ab', 'Ab', highlightClass);
                expect(result.length).toBe(1);
                expect(result[0].textContent).toBe('ab');
                expect(result[0].className).toBe(highlightClass);
            });
            it('text contains a multi-character match not at start, it returns the expected nodes', function () {
                var result = HighlightUtils_1.HighlightUtils.highlight('abc', 'bc', highlightClass);
                expect(result.length).toBe(2);
                expect(result[0].textContent).toBe('a');
                expect(result[0].className).toBe('');
                expect(result[1].textContent).toBe('bc');
                expect(result[1].className).toBe(highlightClass);
            });
            it('text contains match not at the start, it returns one not highlighted and one higlighted node', function () {
                var result = HighlightUtils_1.HighlightUtils.highlight('ab', 'b', highlightClass);
                expect(result.length).toBe(2);
                expect(result[0].textContent).toBe('a');
                expect(result[0].className).toBe('');
                expect(result[1].textContent).toBe('b');
                expect(result[1].className).toBe(highlightClass);
            });
            it('text contains the match twice separated by a non-match, it returns the expected nodes', function () {
                var result = HighlightUtils_1.HighlightUtils.highlight('aba', 'a', highlightClass);
                expect(result.length).toBe(3);
                expect(result[0].textContent).toBe('a');
                expect(result[0].className).toBe(highlightClass);
                expect(result[1].textContent).toBe('b');
                expect(result[1].className).toBe('');
                expect(result[2].textContent).toBe('a');
                expect(result[2].className).toBe(highlightClass);
            });
            it('when the text contains valid html, it treats it as text', function () {
                var text = '<script>hax</script>';
                var result = HighlightUtils_1.HighlightUtils.highlight(text, 'hax', highlightClass);
                expect(result.length).toBe(3);
                expect(result[0].textContent).toBe('<script>');
                expect(result[0].className).toBe('');
                expect(result[1].textContent).toBe('hax');
                expect(result[1].className).toBe(highlightClass);
                expect(result[2].textContent).toBe('</script>');
                expect(result[2].className).toBe('');
            });
            it('when the match contains valid html, it treats it as text', function () {
                var text = '<script>hax</script>';
                var result = HighlightUtils_1.HighlightUtils.highlight(text, text, highlightClass);
                expect(result.length).toBe(1);
                expect(result[0].textContent).toBe(text);
                expect(result[0].className).toBe(highlightClass);
            });
        });
    });
}
exports.HighlightUtilsTest = HighlightUtilsTest;
 
 
/***/ }),
/* 1565 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var L10N_1 = __webpack_require__(295);
function L10NTest() {
    describe('L10N', function () {
        beforeEach(function () {
            String.toLocaleString({
                en: {
                    Foo: 'Bar',
                    TwoNumbers: '{0} and {1}',
                    baby: '{0} bab<sn>y</sn><pl>ies</pl>'
                },
                fr: {
                    Foo: 'Barre',
                    TwoNumbers: '{0} et {1}',
                    baby: '{0} bébé<pl>s</pl>'
                }
            });
        });
        afterEach(function () {
            String.toLocaleString({
                en: {
                    Foo: 'Foo'
                },
                fr: {
                    Foo: 'Foo'
                }
            });
        });
        it('should work for simple localizations', function () {
            String.locale = 'fr';
            expect(L10N_1.L10N.format('Foo')).toBe('Barre');
            String.locale = 'en';
            expect(L10N_1.L10N.format('Foo')).toBe('Bar');
        });
        it('should put parameters in the outputted string properly', function () {
            String.locale = 'fr';
            expect(L10N_1.L10N.format('TwoNumbers', '37', '42')).toBe('37 et 42');
            String.locale = 'en';
            expect(L10N_1.L10N.format('TwoNumbers', '37', '42')).toBe('37 and 42');
        });
        it('should automatically pluralize values higher than one', function () {
            String.locale = 'fr';
            expect(L10N_1.L10N.format('baby', 0, 0)).toBe('0 bébé');
            expect(L10N_1.L10N.format('baby', 0.42, 0.42)).toBe('0.42 bébé');
            expect(L10N_1.L10N.format('baby', 1, 1)).toBe('1 bébé');
            expect(L10N_1.L10N.format('baby', 1.37, 1.37)).toBe('1.37 bébés');
            expect(L10N_1.L10N.format('baby', 42, 42)).toBe('42 bébés');
            String.locale = 'en';
            expect(L10N_1.L10N.format('baby', 0, 0)).toBe('0 baby');
            expect(L10N_1.L10N.format('baby', 0.42, 0.42)).toBe('0.42 baby');
            expect(L10N_1.L10N.format('baby', 1, 1)).toBe('1 baby');
            expect(L10N_1.L10N.format('baby', 1.37, 1.37)).toBe('1.37 babies');
            expect(L10N_1.L10N.format('baby', 42, 42)).toBe('42 babies');
        });
        it('should force pluralization or singularization when last argument is boolean', function () {
            String.locale = 'fr';
            expect(L10N_1.L10N.format('baby', 1, true)).toBe('1 bébés');
            expect(L10N_1.L10N.format('baby', 37, false)).toBe('37 bébé');
            String.locale = 'en';
            expect(L10N_1.L10N.format('baby', 1, true)).toBe('1 babies');
            expect(L10N_1.L10N.format('baby', 37, false)).toBe('37 baby');
        });
        it('should try to find a soft match between strings', function () {
            String.locale = 'fr';
            expect(L10N_1.L10N.format('foo')).toBe('Barre');
            expect(L10N_1.L10N.format('FOO')).toBe('Barre');
            String.locale = 'en';
        });
        it('should try to remove parameters in the translated string if no parameters are passed', function () {
            expect(L10N_1.L10N.format('baby')).toBe('baby');
        });
    });
}
exports.L10NTest = L10NTest;
 
 
/***/ }),
/* 1566 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Simulate_1 = __webpack_require__(15);
function PromisesShimTest() {
    describe('PromisesShim', function () {
        it('should shim finally', function (done) {
            new Promise(function (resolve, reject) {
                resolve(true);
            }).finally(function () {
                // dummy check, what we really need to see is that done was called
                expect(true).toBe(true);
                done();
            });
        });
        it('should shim done', function (done) {
            // In a normal browser, this would require
            // to import es6-promises.
            // Testing for phantom js is good enough
            Iif (Simulate_1.Simulate.isPhantomJs()) {
                var p = new Promise(function (resolve, reject) {
                    resolve(true);
                });
                p.done(function (value) {
                    expect(value).toBe(true);
                    done();
                });
            }
            else {
                expect(true).toBe(true);
                done();
            }
        });
        it('should shim fail', function (done) {
            // In a normal browser, this would require
            // to import es6-promises.
            // Testing for phantom js is good enough
            Iif (Simulate_1.Simulate.isPhantomJs()) {
                var p = new Promise(function (resolve, reject) {
                    reject(false);
                });
                p.fail(function (value) {
                    expect(value).toBe(false);
                    done();
                });
            }
            else {
                expect(true).toBe(true);
                done();
            }
        });
    });
}
exports.PromisesShimTest = PromisesShimTest;
 
 
/***/ }),
/* 1567 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var underscore = __webpack_require__(1);
function EnvironmentTest() {
    describe('Environment', function () {
        it("the '_' global variable holds underscore (note: importing lodash will overwrite the global)", function () {
            var globalUnderscore = _;
            expect(globalUnderscore).toEqual(underscore);
        });
    });
}
exports.EnvironmentTest = EnvironmentTest;
 
 
/***/ }),
/* 1568 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Model_1 = __webpack_require__(26);
var Mock = __webpack_require__(2);
var CustomMatchers_1 = __webpack_require__(104);
var Dom_1 = __webpack_require__(0);
function ModelTest() {
    describe('Model', function () {
        var model;
        var div;
        beforeEach(function () {
            div = document.createElement('div');
            new Mock.MockEnvironmentBuilder().withRoot(div).build();
            CustomMatchers_1.registerCustomMatcher();
        });
        afterEach(function () {
            div = null;
            model = null;
        });
        describe('with basic setup', function () {
            var spy;
            beforeEach(function () {
                model = new Model_1.Model(div, 'test', {
                    foo: 'bar'
                });
                spy = jasmine.createSpy('spy');
            });
            it('can be built with attributes', function () {
                expect(model.attributes).toEqual({
                    foo: 'bar'
                });
            });
            it('will trigger event on changeOne', function () {
                Dom_1.$$(div).on('test:change:foo', spy);
                model.set('foo', 'new value');
                model.set('foo', 'new value');
                expect(spy).toHaveBeenCalledTimes(1);
            });
            it('will trigger event on change any', function () {
                Dom_1.$$(div).on('test:change', spy);
                model.registerNewAttribute('newAttr', 'something');
                model.set('foo', 'bar2');
                model.set('foo', 'bar3');
                model.set('newAttr', 'something else');
                model.set('newAttr', 'something else');
                expect(spy).toHaveBeenCalledTimes(3);
            });
            it('will trigger event on reset', function () {
                Dom_1.$$(div).on('test:reset', spy);
                model.reset();
                expect(spy).toHaveBeenCalledTimes(1);
            });
            it('will trigger event on all', function () {
                Dom_1.$$(div).on('test:all', spy);
                model.set('foo', 'bar2');
                model.reset();
                model.registerNewAttribute('newAttr', 'something');
                model.set('newAttr', 'booo');
                model.reset();
                expect(spy).toHaveBeenCalledTimes(4);
            });
            it('will not throw on type mismatch', function () {
                expect(function () { return model.set('foo', 1); }).not.toThrow();
                expect(function () { return model.set('foo', {}); }).not.toThrow();
                expect(function () { return model.set('foo', true); }).not.toThrow();
                expect(function () { return model.set('foo', false); }).not.toThrow();
            });
            it('can setMultiple', function () {
                model.registerNewAttribute('newAttr', 'newValue');
                model.setMultiple({
                    foo: 'new stuff',
                    newAttr: 'new stuff too'
                });
                expect(model.get('foo')).toBe('new stuff');
                expect(model.get('newAttr')).toBe('new stuff too');
            });
            it('can return all attributes that are not at their default state', function () {
                model.registerNewAttribute('newAttr', 'newValue');
                model.set('foo', 'new stuff');
                expect(model.getAttributes()).toEqual({
                    foo: 'new stuff'
                });
            });
            it('keeps setting values after seeing a value with the wrong type', function () {
                model = new Model_1.Model(div, 'test', {
                    first: 'first',
                    second: 'second',
                    third: 'third'
                });
                var toSet = {
                    first: [1],
                    second: '2',
                    third: '3'
                };
                model.setMultiple(toSet);
                expect(model.get('second')).toBe('2');
                expect(model.get('third')).toBe('3');
            });
            it('keeps the original value if the type is not correct', function () {
                var toSet = { foo: 1 };
                model.setMultiple(toSet);
                expect(model.get('foo')).toBe('bar');
            });
        });
    });
}
exports.ModelTest = ModelTest;
 
 
/***/ }),
/* 1569 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
/// <reference path="../../lib/jasmine/index.d.ts" />
var QueryStateModel_1 = __webpack_require__(17);
var Mock = __webpack_require__(2);
function QueryStateModelTest() {
    describe('QueryStateModel', function () {
        var queryState;
        var div;
        beforeEach(function () {
            div = document.createElement('div');
            new Mock.MockEnvironmentBuilder().withRoot(div).build();
            queryState = new QueryStateModel_1.QueryStateModel(div, undefined);
        });
        afterEach(function () {
            div = null;
            queryState = null;
        });
        it('can determine if a facet is active if one facet has selected values', function () {
            queryState.registerNewAttribute('f:@foobar', ['foo', 'bar']);
            queryState.set('f:@foobar', ['not', 'default', 'value']);
            expect(queryState.atLeastOneFacetIsActive()).toBe(true);
        });
        it('can determine if a facet is active if more than one facet has selected values', function () {
            queryState.registerNewAttribute('f:@foobar', ['foo', 'bar']);
            queryState.registerNewAttribute('f:@foobar2', ['foo2']);
            queryState.set('f:@foobar', ['not', 'default']);
            queryState.set('f:@foobar2', ['not', 'default', 'for', 'facet', '2']);
            expect(queryState.atLeastOneFacetIsActive()).toBe(true);
        });
        it('can determine if a facet is active if one facet has excluded values', function () {
            queryState.registerNewAttribute('f:@foobar:not', ['foo', 'bar']);
            queryState.set('f:@foobar:not', ['not', 'default']);
            expect(queryState.atLeastOneFacetIsActive()).toBe(true);
        });
        it('can determine if no facet is active if nothing is selected', function () {
            queryState.registerNewAttribute('f:@foobar', []);
            expect(queryState.atLeastOneFacetIsActive()).toBe(false);
        });
        it('can determine that no facet is active if the default value is the one selected', function () {
            queryState.registerNewAttribute('f:@foobar', ['foo', 'bar']);
            queryState.set('f:@foobar', ['foo', 'bar']);
            expect(queryState.atLeastOneFacetIsActive()).toBe(false);
        });
        it('can validate on the first attribute', function () {
            expect(function () { return queryState.set('first', -1); }).toThrow();
            expect(function () { return queryState.set('first', 'haha'); }).toThrow();
            expect(function () { return queryState.set('first', {}); }).toThrow();
            expect(function () { return queryState.set('first', false); }).toThrow();
        });
    });
}
exports.QueryStateModelTest = QueryStateModelTest;
 
 
/***/ }),
/* 1570 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
var EndpointCaller_1 = __webpack_require__(165);
var Fake_1 = __webpack_require__(11);
function EndpointCallerTest() {
    describe('EndpointCaller', function () {
        describe('using generic call', function () {
            beforeEach(function () {
                jasmine.Ajax.install();
            });
            afterEach(function () {
                jasmine.Ajax.uninstall();
            });
            var basicCallParams = {
                method: 'POST',
                requestData: {},
                url: 'this is an XMLHTTPRequest',
                queryString: [],
                responseType: 'text',
                errorsAsSuccess: false
            };
            it('should use XMLHTTPRequest by default', function () {
                var endpointCaller = new EndpointCaller_1.EndpointCaller();
                endpointCaller.call(basicCallParams);
                expect(jasmine.Ajax.requests.mostRecent().url).toBe('this is an XMLHTTPRequest');
            });
            it('should use the provided XMLHTTPRequest', function () {
                var CustomXMLHttpRequest = /** @class */ (function (_super) {
                    __extends(CustomXMLHttpRequest, _super);
                    function CustomXMLHttpRequest() {
                        return _super !== null && _super.apply(this, arguments) || this;
                    }
                    return CustomXMLHttpRequest;
                }(XMLHttpRequest));
                var endpointCaller = new EndpointCaller_1.EndpointCaller({ xmlHttpRequest: CustomXMLHttpRequest });
                endpointCaller.call(basicCallParams);
                expect(jasmine.Ajax.requests.mostRecent() instanceof CustomXMLHttpRequest).toBe(true);
            });
            it('should set withCredentials to "true" by default', function () {
                var endpointCaller = new EndpointCaller_1.EndpointCaller();
                endpointCaller.call(basicCallParams);
                expect(jasmine.Ajax.requests.mostRecent().withCredentials).toBe(true);
            });
            it('should set withCredentials to "true" when anonymous is "false"', function () {
                var endpointCaller = new EndpointCaller_1.EndpointCaller({ anonymous: false });
                endpointCaller.call(basicCallParams);
                expect(jasmine.Ajax.requests.mostRecent().withCredentials).toBe(true);
            });
            it('should set withCredentials to "false" when anonymous is "true"', function () {
                var endpointCaller = new EndpointCaller_1.EndpointCaller({ anonymous: true });
                endpointCaller.call(basicCallParams);
                expect(jasmine.Ajax.requests.mostRecent().withCredentials).toBe(false);
            });
            it('should set the auth if provided', function () {
                var endpointCaller = new EndpointCaller_1.EndpointCaller({
                    accessToken: 'myToken'
                });
                endpointCaller.call(basicCallParams);
                expect(jasmine.Ajax.requests.mostRecent().requestHeaders['Authorization']).toBe('Bearer myToken');
                endpointCaller = new EndpointCaller_1.EndpointCaller({
                    username: 'john@doe.com',
                    password: 'hunter123'
                });
                endpointCaller.call(basicCallParams);
                expect(jasmine.Ajax.requests.mostRecent().requestHeaders['Authorization']).toBe('Basic ' + btoa('john@doe.com:hunter123'));
            });
        });
        describe('using XMLHTTPRequest', function () {
            beforeEach(function () {
                jasmine.Ajax.install();
            });
            afterEach(function () {
                jasmine.Ajax.uninstall();
            });
            it('should set the correct requested params on the XMLHTTPRequest', function () {
                var endpointCaller = new EndpointCaller_1.EndpointCaller();
                endpointCaller.call({
                    method: 'POST',
                    requestData: {
                        foo: 'bar',
                        bar: 'foo',
                        bahh: 'bohh'
                    },
                    url: 'foo.bar.com',
                    queryString: [],
                    responseType: 'text',
                    errorsAsSuccess: false
                });
                var fakeRequest = jasmine.Ajax.requests.mostRecent();
                expect(fakeRequest.method).toBe('POST');
                expect(fakeRequest.params).toBe('foo=bar&bar=foo&bahh=bohh');
                expect(fakeRequest.url).toBe('foo.bar.com');
                expect(fakeRequest.requestHeaders['Content-Type']).toBe('application/x-www-form-urlencoded; charset=UTF-8');
                endpointCaller.call({
                    method: 'GET',
                    requestData: {},
                    url: 'foo.bar.com',
                    queryString: ['a=b', 'c=d'],
                    responseType: 'arraybuffer',
                    errorsAsSuccess: false
                });
                fakeRequest = jasmine.Ajax.requests.mostRecent();
                expect(fakeRequest.method).toBe('GET');
                expect(fakeRequest.params).toBeUndefined();
                expect(fakeRequest.url).toBe('foo.bar.com?a=b&c=d');
                expect(Object.keys(fakeRequest.requestHeaders).length).toBe(0);
                endpointCaller.call({
                    method: 'GET',
                    requestData: {
                        e: 'f',
                        g: 'h'
                    },
                    url: 'foo.bar.com',
                    queryString: ['a=b', 'c=d'],
                    responseType: 'json',
                    errorsAsSuccess: false
                });
                fakeRequest = jasmine.Ajax.requests.mostRecent();
                expect(fakeRequest.method).toBe('GET');
                expect(fakeRequest.params).toBeUndefined();
                expect(fakeRequest.url).toBe('foo.bar.com?a=b&c=d&e=f&g=h');
                expect(Object.keys(fakeRequest.requestHeaders).length).toBe(0);
            });
            describe('using response type text', function () {
                beforeEach(function () {
                    this.endpointCaller = new EndpointCaller_1.EndpointCaller();
                    this.promise = this.endpointCaller.call({
                        method: 'POST',
                        requestData: {
                            foo: 'bar',
                            bar: 'foo',
                            bahh: 'bohh'
                        },
                        url: 'foo.bar.com',
                        queryString: [],
                        responseType: 'text',
                        errorsAsSuccess: false
                    });
                });
                afterEach(function () {
                    this.endpointCaller = undefined;
                    this.promise = undefined;
                });
                it('should work if responseContentType is text', function (done) {
                    this.promise
                        .then(function (response) {
                        expect(response.data.results.length).toBe(10);
                        expect(response.duration).toBeDefined();
                    })
                        .then(function () {
                        done();
                    });
                    jasmine.Ajax.requests.mostRecent().respondWith({
                        status: 200,
                        contentType: 'text',
                        responseText: Fake_1.FakeResults.createFakeResults()
                    });
                });
                it('should work if responseContentType is application/json', function (done) {
                    this.promise
                        .then(function (response) {
                        expect(response.data.results.length).toBe(10);
                        expect(response.duration).toBeDefined();
                    })
                        .then(function () {
                        done();
                    });
                    var fakeRequest = jasmine.Ajax.requests.mostRecent();
                    fakeRequest.respondWith({
                        status: 200,
                        contentType: 'application/json',
                        responseText: JSON.stringify(Fake_1.FakeResults.createFakeResults())
                    });
                });
                it('should behave properly if there is an error', function (done) {
                    this.promise
                        .then(function (response) {
                        // This should never execute, and always go to the catch statement
                        expect(false).toBe(true);
                    })
                        .catch(function (error) {
                        expect(error.statusCode).toBe(500);
                        return error.statusCode;
                    })
                        .then(function () {
                        done();
                    });
                    jasmine.Ajax.requests.mostRecent().respondWith({
                        status: 500
                    });
                });
                it('should behave properly if there is an error in the body', function (done) {
                    this.promise
                        .then(function (response) {
                        // This should never execute, and always go to the catch statement
                        expect(false).toBe(true);
                    })
                        .catch(function (error) {
                        expect(error.statusCode).toBe(404);
                        return error.statusCode;
                    })
                        .then(function () {
                        done();
                    });
                    jasmine.Ajax.requests.mostRecent().respondWith({
                        status: 200,
                        responseText: {
                            statusCode: 404
                        },
                        contentType: 'text'
                    });
                });
            });
            describe('using response type json', function () {
                beforeEach(function () {
                    this.endpointCaller = new EndpointCaller_1.EndpointCaller();
                    this.promise = this.endpointCaller.call({
                        method: 'POST',
                        requestData: {
                            foo: 'bar',
                            bar: 'foo',
                            bahh: 'bohh'
                        },
                        url: 'foo.bar.com',
                        queryString: [],
                        responseType: 'json',
                        errorsAsSuccess: false
                    });
                });
                afterEach(function () {
                    this.endpointCaller = undefined;
                    this.promise = undefined;
                });
                it('should work if responseContentType is text', function (done) {
                    this.promise
                        .then(function (response) {
                        expect(response.data.results.length).toBe(10);
                        expect(response.duration).toBeDefined();
                        return response.duration;
                    })
                        .then(function () {
                        done();
                    });
                    jasmine.Ajax.requests.mostRecent().respondWith({
                        status: 200,
                        contentType: 'text',
                        response: Fake_1.FakeResults.createFakeResults()
                    });
                });
                it('should work if responseContentType is application/json', function (done) {
                    this.promise
                        .then(function (response) {
                        expect(response.data.results.length).toBe(10);
                        expect(response.duration).toBeDefined();
                        return response.duration;
                    })
                        .then(function () {
                        done();
                    });
                    var fakeRequest = jasmine.Ajax.requests.mostRecent();
                    fakeRequest.respondWith({
                        status: 200,
                        contentType: 'application/json',
                        response: Fake_1.FakeResults.createFakeResults()
                    });
                });
                it('should allow to modify the request with an option', function () {
                    var endpointCaller = new EndpointCaller_1.EndpointCaller({
                        accessToken: 'myToken',
                        requestModifier: function (requestInfo) {
                            requestInfo.method = 'GET';
                            return requestInfo;
                        }
                    });
                    endpointCaller.call({
                        method: 'POST',
                        requestData: {},
                        url: 'this is an XMLHTTPRequest',
                        queryString: [],
                        responseType: 'text',
                        errorsAsSuccess: false
                    });
                    expect(jasmine.Ajax.requests.mostRecent().method).toBe('GET');
                });
            });
        });
    });
}
exports.EndpointCallerTest = EndpointCallerTest;
 
 
/***/ }),
/* 1571 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var AnalyticsEndpointCaller_1 = __webpack_require__(473);
var Core_1 = __webpack_require__(9);
exports.AnalyticsEndpointCallerTest = function () {
    describe('AnalyticsEndpointCaller', function () {
        var analyticsCaller;
        var buildRequest = function (url) {
            return {
                url: url,
                method: 'POST',
                requestData: {},
                queryString: [],
                responseType: 'text',
                errorsAsSuccess: false
            };
        };
        beforeEach(function () {
            analyticsCaller = new AnalyticsEndpointCaller_1.AnalyticsEndpointCaller();
            jasmine.Ajax.install();
        });
        afterEach(function () {
            jasmine.Ajax.uninstall();
        });
        it('should not use sendBeacon for search event', function () {
            analyticsCaller.call(buildRequest('https://blah.analytics.com/searches'));
            expect(jasmine.Ajax.requests.mostRecent().url).toBe('https://blah.analytics.com/searches');
        });
        it('should not use sendBeacon for custom event', function () {
            analyticsCaller.call(buildRequest('https://blah.analytics.com/custom'));
            expect(jasmine.Ajax.requests.mostRecent().url).toBe('https://blah.analytics.com/custom');
        });
        it('should use sendBeacon for click event', function () {
            analyticsCaller.call(buildRequest('https://blah.analytics.com/click'));
            expect(jasmine.Ajax.requests.mostRecent()).toBeUndefined();
        });
        it('should not use sendBeacon for click event if the API is not usable', function () {
            var origSendBeacon = navigator.sendBeacon;
            navigator.sendBeacon = { oh: 'boy' };
            analyticsCaller.call(buildRequest('https://blah.analytics.com/click'));
            expect(jasmine.Ajax.requests.mostRecent().url).toBe('https://blah.analytics.com/click');
            navigator.sendBeacon = origSendBeacon;
        });
        describe('when navigator.sendBeacon is mocked', function () {
            var spyBeacon;
            var spyBlob;
            var origSendBeacon;
            var origBlob;
            beforeEach(function () {
                origSendBeacon = navigator.sendBeacon;
                origBlob = window.Blob;
                spyBlob = jasmine.createSpy('blob', Blob);
                spyBeacon = jasmine.createSpy('sendBeacon', navigator.sendBeacon);
                navigator.sendBeacon = spyBeacon;
                window.Blob = spyBlob;
            });
            afterEach(function () {
                navigator.sendBeacon = origSendBeacon;
                window.Blob = origBlob;
            });
            it('should properly send the request type as application/x-www-form-urlencoded', function () {
                analyticsCaller.call(buildRequest('https://blah.analytics.com/click'));
                expect(spyBlob).toHaveBeenCalledWith(jasmine.anything(), jasmine.objectContaining({ type: 'application/x-www-form-urlencoded' }));
            });
            it('should properly send the access token as a query string parameter', function () {
                analyticsCaller.options.accessToken = 'foo';
                analyticsCaller.call(buildRequest('https://blah.analytics.com/click'));
                expect(spyBeacon).toHaveBeenCalledWith('https://blah.analytics.com/click?access_token=foo', jasmine.anything());
            });
            it('when the access token is undefined, it should not send it as a query string parameter', function () {
                analyticsCaller.options.accessToken = undefined;
                analyticsCaller.call(buildRequest('https://blah.analytics.com/click'));
                expect(spyBeacon).toHaveBeenCalledWith('https://blah.analytics.com/click', jasmine.anything());
            });
            it('should properly encode the payload', function () {
                var payload = {
                    actionCause: 'something',
                    customData: {
                        foo: 'bar'
                    }
                };
                analyticsCaller.call({
                    url: 'https://blah.analytics.com/click',
                    method: 'POST',
                    requestData: payload,
                    queryString: [],
                    responseType: 'text',
                    errorsAsSuccess: false
                });
                expect(spyBlob).toHaveBeenCalledWith(jasmine.arrayContaining([Core_1.EndpointCaller.convertJsonToFormBody({ clickEvent: payload })]), jasmine.anything());
            });
        });
    });
};
 
 
/***/ }),
/* 1572 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Mock = __webpack_require__(2);
var Facet_1 = __webpack_require__(32);
var FacetQueryController_1 = __webpack_require__(184);
var FacetValues_1 = __webpack_require__(334);
var FacetValue_1 = __webpack_require__(51);
var ExpressionBuilder_1 = __webpack_require__(87);
var QueryBuilder_1 = __webpack_require__(24);
var FacetSearchParameters_1 = __webpack_require__(119);
var Fake_1 = __webpack_require__(11);
var _ = __webpack_require__(1);
function FacetQueryControllerTest() {
    describe('FacetQueryController', function () {
        var mockFacet;
        var facetQueryController;
        beforeEach(function () {
            mockFacet = Mock.mock(Facet_1.Facet);
            mockFacet.options = {};
            mockFacet.options.field = '@field';
            var values = Mock.mock(FacetValues_1.FacetValues);
            mockFacet.values = values;
            mockFacet.values.hasSelectedOrExcludedValues.and.returnValue(true);
            facetQueryController = new FacetQueryController_1.FacetQueryController(mockFacet);
        });
        afterEach(function () {
            mockFacet = null;
            facetQueryController = null;
        });
        it('should compute a filter expression', function () {
            mockFacet.values.getSelected.and.returnValue([FacetValue_1.FacetValue.create('foo'), FacetValue_1.FacetValue.create('bar')]);
            mockFacet.values.getExcluded.and.returnValue([]);
            var expectedBuilder = new ExpressionBuilder_1.ExpressionBuilder();
            expectedBuilder.addFieldExpression('@field', '==', ['foo', 'bar'], true);
            expect(facetQueryController.computeOurFilterExpression()).toBe(expectedBuilder.build());
            mockFacet.values.getExcluded.and.returnValue([FacetValue_1.FacetValue.create('exclude1'), FacetValue_1.FacetValue.create('exclude2')]);
            expectedBuilder.addFieldNotEqualExpression('@field', ['exclude1', 'exclude2'], true);
            expect(facetQueryController.computeOurFilterExpression()).toBe(expectedBuilder.build());
        });
        describe('when handling query overrides', function () {
            var queryBuilder;
            beforeEach(function () {
                queryBuilder = new QueryBuilder_1.QueryBuilder();
                mockFacet.numberOfValues = 5;
            });
            describe('if no values are selected or excluded in the facet', function () {
                beforeEach(function () {
                    mockFacet.values.hasSelectedOrExcludedValues.and.returnValue(false);
                    mockFacet.values.getSelected.and.returnValue([]);
                    mockFacet.values.getExcluded.and.returnValue([]);
                });
                it('should not add a query override by default', function () {
                    facetQueryController.putGroupByIntoQueryBuilder(queryBuilder);
                    var groupByRequest = queryBuilder.build().groupBy[0];
                    expect(groupByRequest.queryOverride).toBeUndefined();
                    expect(groupByRequest.constantQueryOverride).toBeUndefined();
                    expect(groupByRequest.advancedQueryOverride).toBeUndefined();
                });
                it('should not add a query override if the facet is using "and"', function () {
                    mockFacet.options.useAnd = true;
                    facetQueryController.putGroupByIntoQueryBuilder(queryBuilder);
                    var groupByRequest = queryBuilder.build().groupBy[0];
                    expect(groupByRequest.queryOverride).toBeUndefined();
                    expect(groupByRequest.constantQueryOverride).toBeUndefined();
                    expect(groupByRequest.advancedQueryOverride).toBeUndefined();
                });
                it('should add a query override if the facet is configured with an additional filter', function () {
                    mockFacet.options.additionalFilter = 'an additional filter';
                    facetQueryController.putGroupByIntoQueryBuilder(queryBuilder);
                    var groupByRequest = queryBuilder.build().groupBy[0];
                    expect(groupByRequest.queryOverride).toBeUndefined();
                    expect(groupByRequest.constantQueryOverride).toBe('an additional filter');
                    expect(groupByRequest.advancedQueryOverride).toBeUndefined();
                });
                it("when the facet is configured with an additional filter and there's a basic expression in the query\n          it should add a basic query override", function () {
                    mockFacet.options.additionalFilter = 'an additional filter';
                    queryBuilder.expression.add('foo');
                    facetQueryController.putGroupByIntoQueryBuilder(queryBuilder);
                    var groupByRequest = queryBuilder.build().groupBy[0];
                    expect(groupByRequest.queryOverride).toBe('foo');
                    expect(groupByRequest.constantQueryOverride).toBe('an additional filter');
                });
                it("when the facet is not configured with an additional filter and there's a basic expression in the query\n          it should not add a basic query override", function () {
                    queryBuilder.expression.add('foo');
                    facetQueryController.putGroupByIntoQueryBuilder(queryBuilder);
                    var groupByRequest = queryBuilder.build().groupBy[0];
                    expect(groupByRequest.queryOverride).toBeUndefined();
                });
                it("when the facet is configured with an additional filter and there's an advanced expression in the query\n          it should add an advanced query override", function () {
                    mockFacet.options.additionalFilter = 'an additional filter';
                    queryBuilder.advancedExpression.add('advanced expression');
                    facetQueryController.putGroupByIntoQueryBuilder(queryBuilder);
                    var groupByRequest = queryBuilder.build().groupBy[0];
                    expect(groupByRequest.queryOverride).toBeUndefined();
                    expect(groupByRequest.constantQueryOverride).toBe('an additional filter');
                    expect(groupByRequest.advancedQueryOverride).toBe('advanced expression');
                });
                it("when the facet is configured with an additional filter and there's a constant expression in the query\n          it should add the existing constant query override", function () {
                    mockFacet.options.additionalFilter = 'an additional filter';
                    queryBuilder.constantExpression.add('foo');
                    facetQueryController.putGroupByIntoQueryBuilder(queryBuilder);
                    var groupByRequest = queryBuilder.build().groupBy[0];
                    expect(groupByRequest.queryOverride).toBeUndefined();
                    expect(groupByRequest.constantQueryOverride).toBe('foo an additional filter');
                });
            });
            describe('when at least one value is selected', function () {
                beforeEach(function () {
                    mockFacet.values.hasSelectedOrExcludedValues.and.returnValue(true);
                    mockFacet.values.getSelected.and.returnValue([FacetValue_1.FacetValue.create('foo'), FacetValue_1.FacetValue.create('bar')]);
                    mockFacet.values.getExcluded.and.returnValue([]);
                });
                it('should add a query override by default', function () {
                    facetQueryController.putGroupByIntoQueryBuilder(queryBuilder);
                    var groupByRequest = queryBuilder.build().groupBy[0];
                    expect(groupByRequest.queryOverride).toBeUndefined();
                    expect(groupByRequest.constantQueryOverride).toBeUndefined();
                    expect(groupByRequest.advancedQueryOverride).toBe('@uri');
                });
                it('should not add a query override if the facet is using "and"', function () {
                    mockFacet.options.useAnd = true;
                    facetQueryController.putGroupByIntoQueryBuilder(queryBuilder);
                    var groupByRequest = queryBuilder.build().groupBy[0];
                    expect(groupByRequest.queryOverride).toBeUndefined();
                    expect(groupByRequest.constantQueryOverride).toBeUndefined();
                    expect(groupByRequest.advancedQueryOverride).toBeUndefined();
                });
                it('should add a query override if the facet is configured with an additional filter', function () {
                    mockFacet.options.additionalFilter = 'an additional filter';
                    facetQueryController.putGroupByIntoQueryBuilder(queryBuilder);
                    var groupByRequest = queryBuilder.build().groupBy[0];
                    expect(groupByRequest.queryOverride).toBeUndefined();
                    expect(groupByRequest.constantQueryOverride).toBe('an additional filter');
                    expect(groupByRequest.advancedQueryOverride).toBe('@uri');
                });
                it("when the facet is configured with an additional filter and there's a basic expression in the query\n          should add a basic query override", function () {
                    mockFacet.options.additionalFilter = 'an additional filter';
                    queryBuilder.expression.add('foo');
                    facetQueryController.putGroupByIntoQueryBuilder(queryBuilder);
                    var groupByRequest = queryBuilder.build().groupBy[0];
                    expect(groupByRequest.queryOverride).toBe('foo');
                    expect(groupByRequest.constantQueryOverride).toBe('an additional filter');
                    expect(groupByRequest.advancedQueryOverride).toBeUndefined();
                });
                it("when the facet is configured with an additional filter and there's a constant expression in the query\n          it should add a constant query override", function () {
                    mockFacet.options.additionalFilter = 'an additional filter';
                    queryBuilder.constantExpression.add('foo');
                    facetQueryController.putGroupByIntoQueryBuilder(queryBuilder);
                    var groupByRequest = queryBuilder.build().groupBy[0];
                    expect(groupByRequest.queryOverride).toBeUndefined();
                    expect(groupByRequest.constantQueryOverride).toBe('foo an additional filter');
                    expect(groupByRequest.advancedQueryOverride).toBeUndefined();
                });
                it("when the facet is configured with an additional filter and there's an advanced expression in the query that does not match the current facet's filter expression,\n          it should add an advanced query override", function () {
                    mockFacet.options.additionalFilter = 'an additional filter';
                    queryBuilder.advancedExpression.add('advanced expression');
                    facetQueryController.putGroupByIntoQueryBuilder(queryBuilder);
                    var groupByRequest = queryBuilder.build().groupBy[0];
                    expect(groupByRequest.queryOverride).toBeUndefined();
                    expect(groupByRequest.constantQueryOverride).toBe('an additional filter');
                    expect(groupByRequest.advancedQueryOverride).toBe('advanced expression');
                });
                it("when the facet is configured with an additional filter and the advanced expression matches the current facet's filter expression,\n        and there is a query expression,\n        it should not add an advanced query override", function () {
                    mockFacet.options.additionalFilter = '@additionalFilterField';
                    var advancedExpressionForOurFacet = facetQueryController.computeOurFilterExpression();
                    queryBuilder.advancedExpression.add(advancedExpressionForOurFacet);
                    queryBuilder.expression.add('some query');
                    facetQueryController.putGroupByIntoQueryBuilder(queryBuilder);
                    var groupByRequest = queryBuilder.build().groupBy[0];
                    expect(groupByRequest.advancedQueryOverride).toBeUndefined();
                });
            });
            describe('when at least one value is excluded', function () {
                beforeEach(function () {
                    mockFacet.values.hasSelectedOrExcludedValues.and.returnValue(true);
                    mockFacet.values.getSelected.and.returnValue([]);
                    mockFacet.values.getExcluded.and.returnValue([FacetValue_1.FacetValue.create('foo'), FacetValue_1.FacetValue.create('bar')]);
                });
                it('should add a query override by default', function () {
                    facetQueryController.putGroupByIntoQueryBuilder(queryBuilder);
                    var groupByRequest = queryBuilder.build().groupBy[0];
                    expect(groupByRequest.queryOverride).toBeUndefined();
                    expect(groupByRequest.constantQueryOverride).toBeUndefined();
                    expect(groupByRequest.advancedQueryOverride).toBe('@uri');
                });
                it('should not add a query override if the facet is using "and"', function () {
                    mockFacet.options.useAnd = true;
                    facetQueryController.putGroupByIntoQueryBuilder(queryBuilder);
                    var groupByRequest = queryBuilder.build().groupBy[0];
                    expect(groupByRequest.queryOverride).toBeUndefined();
                    expect(groupByRequest.constantQueryOverride).toBeUndefined();
                    expect(groupByRequest.advancedQueryOverride).toBeUndefined();
                });
                it('should add a query override if the facet is configured with an additional filter', function () {
                    mockFacet.options.additionalFilter = 'an additional filter';
                    facetQueryController.putGroupByIntoQueryBuilder(queryBuilder);
                    var groupByRequest = queryBuilder.build().groupBy[0];
                    expect(groupByRequest.queryOverride).toBeUndefined();
                    expect(groupByRequest.constantQueryOverride).toBe('an additional filter');
                    expect(groupByRequest.advancedQueryOverride).toBe('@uri');
                });
                it("should add a basic query override if the facet is configured with an additional filter and there's a basic expression in the query", function () {
                    mockFacet.options.additionalFilter = 'an additional filter';
                    queryBuilder.expression.add('foo');
                    facetQueryController.putGroupByIntoQueryBuilder(queryBuilder);
                    var groupByRequest = queryBuilder.build().groupBy[0];
                    expect(groupByRequest.queryOverride).toBe('foo');
                    expect(groupByRequest.constantQueryOverride).toBe('an additional filter');
                    expect(groupByRequest.advancedQueryOverride).toBeUndefined();
                });
                it("should add a constant query override if the facet is configured with an additional filter and there's a constant expression in the query", function () {
                    mockFacet.options.additionalFilter = 'an additional filter';
                    queryBuilder.constantExpression.add('foo');
                    facetQueryController.putGroupByIntoQueryBuilder(queryBuilder);
                    var groupByRequest = queryBuilder.build().groupBy[0];
                    expect(groupByRequest.queryOverride).toBeUndefined();
                    expect(groupByRequest.constantQueryOverride).toBe('foo an additional filter');
                    expect(groupByRequest.advancedQueryOverride).toBeUndefined();
                });
            });
        });
        describe('should push a group by into a query builder', function () {
            var queryBuilder;
            beforeEach(function () {
                mockFacet.values.getSelected.and.returnValue([FacetValue_1.FacetValue.create('foo'), FacetValue_1.FacetValue.create('bar')]);
                mockFacet.values.getExcluded.and.returnValue([]);
                mockFacet.numberOfValues = 5;
                queryBuilder = new QueryBuilder_1.QueryBuilder();
            });
            it('should put a group by into a query builder', function () {
                mockFacet.numberOfValues = 23;
                facetQueryController.putGroupByIntoQueryBuilder(queryBuilder);
                var groupByRequest = queryBuilder.build().groupBy[0];
                expect(groupByRequest.allowedValues).toEqual(jasmine.arrayContaining(['foo', 'bar']));
                expect(groupByRequest.field).toBe('@field');
                expect(groupByRequest.maximumNumberOfValues).toBe(23);
            });
            it('should request 1 more value if more / less is enabled', function () {
                mockFacet.options.enableMoreLess = true;
                facetQueryController.putGroupByIntoQueryBuilder(queryBuilder);
                var groupByRequest = queryBuilder.build().groupBy[0];
                expect(groupByRequest.maximumNumberOfValues).toBe(6);
            });
            it('should request only allowed values if set on the facet', function () {
                mockFacet.options.allowedValues = ['a', 'b', 'c'];
                facetQueryController.putGroupByIntoQueryBuilder(queryBuilder);
                var groupByRequest = queryBuilder.build().groupBy[0];
                expect(groupByRequest.allowedValues).toEqual(jasmine.arrayContaining(['a', 'b', 'c']));
                expect(groupByRequest.allowedValues).not.toEqual(jasmine.arrayContaining(['foo', 'bar']));
            });
            it('should use lookupfield if set on facet', function () {
                mockFacet.options.lookupField = '@lookupfield';
                facetQueryController.putGroupByIntoQueryBuilder(queryBuilder);
                var groupByRequest = queryBuilder.build().groupBy[0];
                expect(groupByRequest.lookupField).toBe('@lookupfield');
            });
            it('should use computed field if set on facet', function () {
                mockFacet.options.computedField = '@computedfield';
                mockFacet.options.computedFieldOperation = 'sum';
                facetQueryController.putGroupByIntoQueryBuilder(queryBuilder);
                var groupByRequest = queryBuilder.build().groupBy[0];
                expect(groupByRequest.computedFields[0]).toEqual(jasmine.objectContaining({
                    field: '@computedfield',
                    operation: 'sum'
                }));
            });
            it('should use the additional filter if set on facet', function () {
                mockFacet.options.additionalFilter = '@additionalfilter';
                facetQueryController.putGroupByIntoQueryBuilder(queryBuilder);
                var groupByRequest = queryBuilder.build().groupBy[0];
                expect(groupByRequest.constantQueryOverride).toBe('@additionalfilter');
            });
            it('should keep the expression to use for facet search after building a group by', function () {
                queryBuilder.expression.add('something');
                queryBuilder.advancedExpression.add('advanced expression');
                queryBuilder.constantExpression.add('something constant');
                facetQueryController.putGroupByIntoQueryBuilder(queryBuilder);
                expect(facetQueryController.expressionToUseForFacetSearch).toBe('(something) (advanced expression)');
                expect(facetQueryController.basicExpressionToUseForFacetSearch).toBe('something');
                expect(facetQueryController.advancedExpressionToUseForFacetSearch).toBe('advanced expression');
                expect(facetQueryController.constantExpressionToUseForFacetSearch).toBe('something constant');
            });
            it('should clear the expressions used for facet search when calling prepareForNewQuery', function () {
                queryBuilder.expression.add('something');
                queryBuilder.constantExpression.add('something constant');
                facetQueryController.putGroupByIntoQueryBuilder(queryBuilder);
                facetQueryController.prepareForNewQuery();
                expect(facetQueryController.expressionToUseForFacetSearch).toBeUndefined();
                expect(facetQueryController.constantExpressionToUseForFacetSearch).toBeUndefined();
            });
        });
        describe('should perform search', function () {
            var mockEndpoint;
            var mockQueryController;
            beforeEach(function () {
                mockEndpoint = Mock.mockSearchEndpoint();
                mockQueryController = Mock.mockQueryController();
                mockFacet.searchInterface = {};
                mockFacet.queryController = mockQueryController;
                mockFacet.facetQueryController = facetQueryController;
                mockFacet.getEndpoint = jasmine.createSpy('endpoint');
                mockFacet.getEndpoint.and.returnValue(mockEndpoint);
                mockFacet.queryController.getLastQuery.and.returnValue(new QueryBuilder_1.QueryBuilder().build());
            });
            afterEach(function () {
                mockEndpoint = null;
                mockQueryController = null;
            });
            it('with params', function () {
                var params = new FacetSearchParameters_1.FacetSearchParameters(mockFacet);
                facetQueryController.search(params);
                expect(facetQueryController.facet.getEndpoint().search).toHaveBeenCalled();
                params.alwaysInclude = ['foo', 'bar'];
                facetQueryController.search(params);
                expect(facetQueryController.facet.getEndpoint().search).toHaveBeenCalledWith(jasmine.objectContaining({
                    groupBy: jasmine.arrayContaining([
                        jasmine.objectContaining({
                            allowedValues: jasmine.arrayContaining(['foo', 'bar'])
                        })
                    ])
                }));
                params.setValueToSearch('test');
                facetQueryController.search(params);
                expect(facetQueryController.facet.getEndpoint().search).toHaveBeenCalledWith(jasmine.objectContaining({
                    groupBy: jasmine.arrayContaining([
                        jasmine.objectContaining({
                            allowedValues: jasmine.arrayContaining(['*test*'])
                        })
                    ])
                }));
            });
            it('by copying last query', function () {
                var lastQueryBuilder = new QueryBuilder_1.QueryBuilder();
                lastQueryBuilder.pipeline = 'pipeline';
                lastQueryBuilder.enableWildcards = true;
                mockFacet.queryController.getLastQuery.and.returnValue(lastQueryBuilder.build());
                facetQueryController.search(new FacetSearchParameters_1.FacetSearchParameters(mockFacet));
                expect(facetQueryController.facet.getEndpoint().search).toHaveBeenCalledWith(jasmine.objectContaining({
                    wildcards: true,
                    pipeline: 'pipeline'
                }));
            });
            describe('with allowed values options on the facet', function () {
                var facetSearchParams;
                var searchPromise;
                beforeEach(function () {
                    searchPromise = new Promise(function (resolve, reject) {
                        var results = Fake_1.FakeResults.createFakeResults();
                        var singleGroupBy = Fake_1.FakeResults.createFakeGroupByResult('@foo', 'a', 10);
                        results.groupByResults[0] = singleGroupBy;
                        resolve(results);
                    });
                    mockEndpoint.search.and.returnValue(searchPromise);
                    facetSearchParams = new FacetSearchParameters_1.FacetSearchParameters(mockFacet);
                    facetSearchParams.nbResults = 10;
                });
                afterEach(function () {
                    facetSearchParams = null;
                    searchPromise = null;
                });
                var generateMatcher = function (values) {
                    var generated = _.map(values, function (value) {
                        return jasmine.objectContaining({ value: value });
                    });
                    return jasmine.arrayContaining(generated);
                };
                it('should resolve with allowed values only', function (done) {
                    mockFacet.options.allowedValues = ['a0', 'a5', 'a8'];
                    facetQueryController.search(facetSearchParams).then(function (values) {
                        expect(values).toEqual(generateMatcher(['a0', 'a5', 'a8']));
                        expect(values).not.toEqual(generateMatcher(['a2', 'a1']));
                        done();
                    });
                });
                it('when performing fetch more with allowed values option', function (done) {
                    mockFacet.options.allowedValues = ['a0', 'a5', 'a8'];
                    facetQueryController.fetchMore(10).then(function (data) {
                        expect(data.groupByResults[0].values).toEqual(generateMatcher(['a0', 'a5', 'a8']));
                        expect(data.groupByResults[0].values).not.toEqual(generateMatcher(['a2', 'a1']));
                        done();
                    });
                });
                describe('with regex characters', function () {
                    var regexCharacters = 'a (test) -/.+^${123} ["abc"]';
                    beforeEach(function () {
                        searchPromise = new Promise(function (resolve, reject) {
                            var results = Fake_1.FakeResults.createFakeResults();
                            var groupByWithAToken = Fake_1.FakeResults.createFakeGroupByResult('@foo', regexCharacters, 2);
                            results.groupByResults[0] = groupByWithAToken;
                            resolve(results);
                        });
                        mockEndpoint.search.and.returnValue(searchPromise);
                    });
                    it('should resolve search correctly with ? character', function (done) {
                        mockFacet.options.allowedValues = [regexCharacters + "0"];
                        facetQueryController.search(facetSearchParams).then(function (values) {
                            expect(values).toEqual(generateMatcher(mockFacet.options.allowedValues.slice()));
                            done();
                        });
                    });
                    it('should resolve search correctly with ? character', function (done) {
                        mockFacet.options.allowedValues = [regexCharacters + "?"];
                        facetQueryController.search(facetSearchParams).then(function (values) {
                            expect(values).toEqual(generateMatcher([regexCharacters + "0", regexCharacters + "1"]));
                            done();
                        });
                    });
                    it('should resolve search correctly with * character', function (done) {
                        mockFacet.options.allowedValues = ['a (test)*'];
                        facetQueryController.search(facetSearchParams).then(function (values) {
                            expect(values).toEqual(generateMatcher([regexCharacters + "0", regexCharacters + "1"]));
                            done();
                        });
                    });
                });
                describe('with a wildcard', function () {
                    beforeEach(function () {
                        searchPromise = new Promise(function (resolve, reject) {
                            var results = Fake_1.FakeResults.createFakeResults();
                            var groupByWithAToken = Fake_1.FakeResults.createFakeGroupByResult('@foo', 'a', 5);
                            var groupByWithBToken = Fake_1.FakeResults.createFakeGroupByResult('@foo', 'b', 5);
                            groupByWithAToken.values = groupByWithAToken.values.concat(groupByWithBToken.values);
                            results.groupByResults[0] = groupByWithAToken;
                            resolve(results);
                        });
                        mockEndpoint.search.and.returnValue(searchPromise);
                        mockFacet.options.allowedValues = ['a*'];
                    });
                    it('should resolve search correctly', function (done) {
                        facetQueryController.search(facetSearchParams).then(function (values) {
                            expect(values).toEqual(generateMatcher(['a0', 'a1', 'a2', 'a3', 'a4']));
                            expect(values).not.toEqual(generateMatcher(['b0', 'b1', 'b2', 'b3', 'b4']));
                            done();
                        });
                    });
                    it('should resolve search correctly with ? character', function (done) {
                        mockFacet.options.allowedValues = ['b?'];
                        facetQueryController.search(facetSearchParams).then(function (values) {
                            expect(values).not.toEqual(generateMatcher(['a0', 'a1', 'a2', 'a3', 'a4']));
                            expect(values).toEqual(generateMatcher(['b0', 'b1', 'b2', 'b3', 'b4']));
                            done();
                        });
                    });
                    it('should resolve fetch more correctly', function (done) {
                        searchPromise = new Promise(function (resolve, reject) {
                            var results = Fake_1.FakeResults.createFakeResults();
                            var groupByWithAToken = Fake_1.FakeResults.createFakeGroupByResult('@foo', 'a', 5);
                            var groupByWithBToken = Fake_1.FakeResults.createFakeGroupByResult('@foo', 'b', 5);
                            groupByWithAToken.values = groupByWithAToken.values.concat(groupByWithBToken.values);
                            results.groupByResults[0] = groupByWithAToken;
                            resolve(results);
                        });
                        mockFacet.options.allowedValues = ['a*'];
                        facetQueryController.fetchMore(10).then(function (data) {
                            expect(data.groupByResults[0].values).toEqual(generateMatcher(['a0', 'a1', 'a2', 'a3', 'a4']));
                            expect(data.groupByResults[0].values).not.toEqual(generateMatcher(['b0', 'b1', 'b2', 'b3', 'b4']));
                            done();
                        });
                    });
                });
            });
        });
    });
}
exports.FacetQueryControllerTest = FacetQueryControllerTest;
 
 
/***/ }),
/* 1573 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var HistoryController_1 = __webpack_require__(216);
var InitializationEvents_1 = __webpack_require__(22);
var Mock = __webpack_require__(2);
var Dom_1 = __webpack_require__(0);
var Defer_1 = __webpack_require__(31);
var _ = __webpack_require__(1);
var AnalyticsActionListMeta_1 = __webpack_require__(7);
var Core_1 = __webpack_require__(9);
function HistoryControllerTest() {
    describe('HistoryController', function () {
        var historyController;
        var env;
        function triggerRestoreHistoryEvent() {
            Dom_1.$$(historyController.element).trigger(InitializationEvents_1.InitializationEvents.restoreHistoryState);
        }
        function triggerFirstQuery() {
            Dom_1.$$(historyController.element).trigger(Core_1.QueryEvents.querySuccess);
        }
        beforeEach(function () {
            env = new Mock.MockEnvironmentBuilder().withLiveQueryStateModel().build();
            historyController = new HistoryController_1.HistoryController(env.root, Mock.mockWindow(), env.queryStateModel, env.queryController);
            spyOn(historyController, 'usageAnalytics').and.returnValue(env.usageAnalytics);
        });
        afterEach(function () {
            historyController = null;
            env = null;
        });
        it('should set the query state model representation on all event in the hash', function () {
            env.queryStateModel.attributes = {
                a: 'a',
                b: 'b',
                c: 'notDefault',
                d: [1, 2, 3]
            };
            env.queryStateModel.defaultAttributes = {
                a: 'a',
                b: 'b',
                c: 'c',
                d: [2, 3, 4]
            };
            triggerFirstQuery();
            Dom_1.$$(historyController.element).trigger('state:all');
            Defer_1.Defer.flush();
            expect(historyController.window.history.pushState).toHaveBeenCalledWith('', '', '#c=notDefault&d=[1,2,3]');
        });
        it('should listen to hashchange event', function () {
            expect(historyController.window.addEventListener).toHaveBeenCalledWith('hashchange', jasmine.any(Function));
        });
        it("given at least one value in the hash, when calling #setHashValues with an empty object,\n    it updates the url without including a hash to prevent the page from scrolling to the top", function () {
            historyController.window.location.hash = '#f:@author=[TED]';
            triggerFirstQuery();
            historyController.setHashValues({});
            expect(historyController.window.history.pushState).toHaveBeenCalledWith('', '', '');
        });
        it("when calling #setHashValues to update the hash,\n    it includes the current location.pathname and location.search in the new url", function () {
            var location = historyController.window.location;
            location.pathname = '/sports';
            location.search = '?type=basketball';
            triggerFirstQuery();
            historyController.setHashValues({ q: 'shoes' });
            var expectedUrl = "" + location.pathname + location.search + "#q=shoes";
            expect(historyController.window.history.pushState).toHaveBeenCalledWith('', '', expectedUrl);
        });
        it('should not throw when history controller does not have an analytics client and there is a hash change', function () {
            historyController = new HistoryController_1.HistoryController(env.root, Mock.mockWindow(), env.queryStateModel, env.queryController);
            historyController.setHashValues({ q: 'test' });
            expect(historyController.handleHashChange.bind(historyController)).not.toThrow();
        });
        it('should not set the hash when it has not changed on the first hash change', function () {
            triggerRestoreHistoryEvent();
            triggerFirstQuery();
            expect(historyController.window.location.replace).not.toHaveBeenCalled();
        });
        it('After the first query, when calling #setHashUtils, it pushes a new history entry instead of replacing state', function () {
            triggerFirstQuery();
            historyController.setHashValues({ q: 'hello' });
            expect(historyController.window.location.replace).not.toHaveBeenCalled();
            expect(historyController.window.history.pushState).toHaveBeenCalledWith('', '', '#q=hello');
        });
        it('should not update the model when simply replacing the state from an old value', function () {
            historyController = new HistoryController_1.HistoryController(env.root, Mock.mockWindow(), env.queryStateModel, env.queryController);
            spyOn(env.queryStateModel, 'setMultiple');
            historyController.replaceState({ q: 'bar' });
            expect(env.queryStateModel.setMultiple).not.toHaveBeenCalled();
        });
        describe('with a fake HashUtilsModule', function () {
            var fakeHashUtils;
            beforeEach(function () {
                fakeHashUtils = {};
                fakeHashUtils.getValue = jasmine.createSpy('getValue');
                fakeHashUtils.getHash = jasmine.createSpy('getHash').and.callFake(function () { return Mock.mockWindow().location.hash; });
                fakeHashUtils.encodeValues = jasmine.createSpy('encodeValues');
                historyController.hashUtils = fakeHashUtils;
            });
            function simulateHashModule(key, value) {
                historyController.hashUtils.getValue = jasmine.createSpy('getValue').and.callFake(function (valueNeeded) {
                    if (valueNeeded == key) {
                        return value;
                    }
                    return undefined;
                });
            }
            it("when comparing a hash and a query state model's non-string value\n      when the value is different\n      should execute a query", function () {
                simulateHashModule('debug', 'false');
                historyController.queryStateModel.set('debug', true);
                historyController.handleHashChange();
                expect(historyController.queryController.executeQuery).toHaveBeenCalled();
            });
            it("when comparing a hash and a query state model's non-string value\n      when the value is identical but of different types (e.g., string vs boolean)\n      should not execute a query", function () {
                simulateHashModule('debug', 'true');
                historyController.queryStateModel.set('debug', true);
                historyController.handleHashChange();
                expect(historyController.queryController.executeQuery).not.toHaveBeenCalled();
            });
            it('keeps parsing hash values after one fails to parse', function () {
                var threwError = false;
                env.queryStateModel.attributes = {
                    a: 1,
                    b: 2,
                    c: 3
                };
                var throwsAnError = function () {
                    if (!threwError) {
                        threwError = true;
                        throw new Error();
                    }
                };
                historyController.hashUtils.getValue = jasmine.createSpy('getValue').and.callFake(throwsAnError);
                triggerRestoreHistoryEvent();
                expect(historyController.hashUtils.getValue).toHaveBeenCalledTimes(_.size(env.queryStateModel.attributes));
            });
            describe('when logging analytics event', function () {
                beforeEach(function () {
                    historyController = new HistoryController_1.HistoryController(env.root, window, env.queryStateModel, env.queryController);
                    historyController.hashUtils = fakeHashUtils;
                    triggerRestoreHistoryEvent();
                });
                afterEach(function () {
                    window.location.hash = '';
                });
                var assertFacetAnalyticsCall = function (cause) {
                    expect(historyController.usageAnalytics.logSearchEvent).toHaveBeenCalledWith(cause, {
                        facetId: '@foo',
                        facetField: '@foo',
                        facetTitle: '@foo',
                        facetValue: 'bar'
                    });
                };
                it('should log an analytics event when q changes', function () {
                    simulateHashModule('q', 'foo');
                    window.dispatchEvent(new Event('hashchange'));
                    expect(historyController.usageAnalytics.logSearchEvent).toHaveBeenCalledWith(AnalyticsActionListMeta_1.analyticsActionCauseList.searchboxSubmit, {});
                });
                it('should log an analytics event when sort changes', function () {
                    simulateHashModule('sort', 'date ascending');
                    window.dispatchEvent(new Event('hashchange'));
                    expect(historyController.usageAnalytics.logSearchEvent).toHaveBeenCalledWith(AnalyticsActionListMeta_1.analyticsActionCauseList.resultsSort, {
                        resultsSortBy: 'date ascending'
                    });
                });
                it('should log an analytics event when a facet changes to select a value', function () {
                    historyController.queryStateModel.registerNewAttribute('f:@foo', []);
                    simulateHashModule('f:@foo', ['bar']);
                    window.dispatchEvent(new Event('hashchange'));
                    assertFacetAnalyticsCall(AnalyticsActionListMeta_1.analyticsActionCauseList.facetSelect);
                });
                it('should log an analytics event when a facet changes to deselect a value', function () {
                    historyController.queryStateModel.registerNewAttribute('f:@foo', []);
                    simulateHashModule('f:@foo', ['bar']);
                    window.dispatchEvent(new Event('hashchange'));
                    simulateHashModule('f:@foo', []);
                    window.dispatchEvent(new Event('hashchange'));
                    assertFacetAnalyticsCall(AnalyticsActionListMeta_1.analyticsActionCauseList.facetDeselect);
                });
                it('should log an analytics event when a facet changes to exclude a value', function () {
                    historyController.queryStateModel.registerNewAttribute('f:@foo:not', []);
                    simulateHashModule('f:@foo:not', ['bar']);
                    window.dispatchEvent(new Event('hashchange'));
                    assertFacetAnalyticsCall(AnalyticsActionListMeta_1.analyticsActionCauseList.facetExclude);
                });
                it('should log an analytics event when a facet changes to unexclude a value', function () {
                    historyController.queryStateModel.registerNewAttribute('f:@foo:not', []);
                    simulateHashModule('f:@foo:not', ['bar']);
                    window.dispatchEvent(new Event('hashchange'));
                    simulateHashModule('f:@foo:not', []);
                    window.dispatchEvent(new Event('hashchange'));
                    assertFacetAnalyticsCall(AnalyticsActionListMeta_1.analyticsActionCauseList.facetUnexclude);
                });
            });
        });
    });
}
exports.HistoryControllerTest = HistoryControllerTest;
 
 
/***/ }),
/* 1574 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Mock = __webpack_require__(2);
var Core_1 = __webpack_require__(9);
function LocalStorageHistoryControllerTest() {
    describe('LocalStorageHistoryController', function () {
        var localStorageHistoryController;
        var env;
        var mockWindow;
        function emitAllEvent() {
            var allEvent = env.queryStateModel.getEventName(Core_1.Model.eventTypes.all);
            Core_1.$$(env.root).trigger(allEvent);
        }
        beforeEach(function () {
            mockWindow = Mock.mockWindow();
            env = new Mock.MockEnvironmentBuilder().withLiveQueryStateModel().build();
            localStorageHistoryController = new Core_1.LocalStorageHistoryController(env.root, mockWindow, env.queryStateModel, env.queryController);
        });
        describe("with state in localstorage, when triggering the " + Core_1.InitializationEvents.restoreHistoryState + " event", function () {
            var modelInLocalStorage = { q: 'hello' };
            function emitRestoreHistoryStateEvent() {
                Core_1.$$(env.root).trigger(Core_1.InitializationEvents.restoreHistoryState);
            }
            beforeEach(function () {
                spyOn(localStorageHistoryController.storage, 'load').and.returnValue(modelInLocalStorage);
            });
            it("initializes the model with the values in localstorage", function () {
                spyOn(env.queryStateModel, 'setMultiple');
                emitRestoreHistoryStateEvent();
                expect(env.queryStateModel.setMultiple).toHaveBeenCalledWith(jasmine.objectContaining({ q: modelInLocalStorage.q }));
            });
            it('if localstorage does not have a value defined, it uses the default value', function () {
                var key = 'layout';
                expect(modelInLocalStorage[key]).toBeUndefined();
                spyOn(env.queryStateModel, 'setMultiple');
                emitRestoreHistoryStateEvent();
                expect(env.queryStateModel.setMultiple).toHaveBeenCalledWith(jasmine.objectContaining((_a = {}, _a[key] = Core_1.QueryStateModel.defaultAttributes.layout, _a)));
                var _a;
            });
        });
        it('calling #setState saves the passed values in localstorage', function () {
            var newState = { q: 'hello world' };
            spyOn(localStorageHistoryController.storage, 'save');
            localStorageHistoryController.setState(newState);
            expect(localStorageHistoryController.storage.save).toHaveBeenCalledWith(newState);
        });
        it('calling #replaceState saves the passed values in localstorage', function () {
            var newState = { q: 'hello world' };
            spyOn(localStorageHistoryController.storage, 'save');
            localStorageHistoryController.replaceState(newState);
            expect(localStorageHistoryController.storage.save).toHaveBeenCalledWith(newState);
        });
        describe('with a model containing a defined attribute', function () {
            var queryAttributeKey = 'q';
            beforeEach(function () { return env.queryStateModel.set(queryAttributeKey, 'hello'); });
            it('when triggering the #all event, it calls #setState with the model attributes', function () {
                spyOn(localStorageHistoryController, 'setState');
                emitAllEvent();
                expect(localStorageHistoryController.setState).toHaveBeenCalledWith(env.queryStateModel.getAttributes());
            });
            it("when calling #withThoseAttribute with a defined attribute key,\n      when triggering the #all event, it calls #setState with the model attributes less the omitted keys", function () {
                localStorageHistoryController.withoutThoseAttribute([queryAttributeKey]);
                spyOn(localStorageHistoryController, 'setState');
                emitAllEvent();
                var expectedState = {};
                expect(localStorageHistoryController.setState).toHaveBeenCalledWith(expectedState);
                expect(env.queryStateModel.getAttributes()).not.toEqual(expectedState);
            });
        });
    });
}
exports.LocalStorageHistoryControllerTest = LocalStorageHistoryControllerTest;
 
 
/***/ }),
/* 1575 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __assign = (this && this.__assign) || Object.assign || function(t) {
    for (var s, i = 1, n = arguments.length; i < n; i++) {
        s = arguments[i];
        for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
            t[p] = s[p];
    }
    return t;
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { Iif (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        Iif (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            Iif (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
            Iif (y = 0, t) op = [0, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    Eif (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        Iif (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
Object.defineProperty(exports, "__esModule", { value: true });
var QueryController_1 = __webpack_require__(78);
var QueryEvents_1 = __webpack_require__(14);
var QueryBuilder_1 = __webpack_require__(24);
var Dom_1 = __webpack_require__(0);
var Fake_1 = __webpack_require__(11);
var Mock = __webpack_require__(2);
var Plan_1 = __webpack_require__(214);
var HistoryStore = __webpack_require__(84);
var AnalyticsInformation_1 = __webpack_require__(85);
var QueryboxQueryParameters_1 = __webpack_require__(171);
function QueryControllerTest() {
    var _this = this;
    describe('QueryController', function () {
        var test;
        var searchInterface;
        function initQueryController() {
            test = {};
            test.env = new Mock.MockEnvironmentBuilder().build();
            test.cmp = new QueryController_1.QueryController(test.env.root, {}, test.env.usageAnalytics, searchInterface);
            test.cmp.setEndpoint(test.env.searchEndpoint);
            test.cmp.element = test.env.root;
        }
        beforeEach(function () {
            var env = new Mock.MockEnvironmentBuilder().build();
            searchInterface = env.searchInterface;
            searchInterface.options = { enableHistory: true };
            initQueryController();
        });
        afterEach(function () {
            test = null;
        });
        function defaultOptions() {
            return {
                searchAsYouType: false,
                beforeExecuteQuery: function () { },
                cancel: false,
                logInActionsHistory: false,
                shouldRedirectStandaloneSearchbox: true
            };
        }
        it('should correctly raise errors from the endpoint', function (done) {
            var spy = test.env.searchEndpoint.search;
            var error = {
                statusCode: 401,
                data: {
                    message: 'the message',
                    type: 'the type',
                    queryExecutionReport: {}
                }
            };
            spy.and.returnValue(new Promise(function (resolve, reject) {
                reject(error);
            }));
            test.env.searchEndpoint.search = spy;
            expect(test.cmp.executeQuery().catch(function (data) {
                expect(data).toEqual(error);
                done();
            }));
        });
        it('should allow to fetchMore', function () {
            test.cmp.fetchMore(50);
            expect(test.env.searchEndpoint.search).toHaveBeenCalledWith(jasmine.objectContaining({
                firstResult: 10,
                numberOfResults: 50
            }), jasmine.any(Object));
        });
        it('should pass in an AnalyticsInformation instance to search endpoint', function () {
            test.cmp.executeQuery();
            expect(test.env.searchEndpoint.search).toHaveBeenCalledWith(jasmine.any(Object), jasmine.objectContaining({ analyticsInformation: jasmine.any(AnalyticsInformation_1.AnalyticsInformation) }));
        });
        it('should not throw when the analytics instance set on query controller incorrectly implement the interface', function () {
            test.cmp.searchInterface.usageAnalytics = __assign({}, test.cmp.usageAnalytics, { getOriginContext: null, getUserDisplayName: null });
            expect(function () { return test.cmp.executeQuery(); }).not.toThrow();
        });
        it('should allow to get the last query', function (done) {
            Dom_1.$$(test.cmp.element).on(QueryEvents_1.QueryEvents.buildingQuery, function (e, args) {
                args.queryBuilder.expression.add('mamamia');
            });
            var search = test.env.searchEndpoint.search;
            var results = Fake_1.FakeResults.createFakeResults();
            search.and.returnValue(new Promise(function (resolve, reject) {
                resolve(results);
            }));
            test.cmp.executeQuery();
            setTimeout(function () {
                expect(test.cmp.getLastQuery().q).toContain('mamamia');
                done();
            }, 10);
        });
        it('should not return undefined or null when getLastQuery is called and there is no last query', function (done) {
            var lastQuery = test.cmp.getLastQuery();
            expect(lastQuery).not.toBeNull();
            expect(lastQuery).not.toBeUndefined();
            done();
        });
        it('should allow to get the last query results', function (done) {
            var search = test.env.searchEndpoint.search;
            var results = Fake_1.FakeResults.createFakeResults();
            search.and.returnValue(new Promise(function (resolve, reject) {
                resolve(results);
            }));
            test.cmp.executeQuery();
            setTimeout(function () {
                expect(test.cmp.getLastResults()).toEqual(results);
                done();
            }, 10);
        });
        describe('closeModalBox', function () {
            it('should close the modal if the closeModalBox is set to true in the executeQuery options', function () {
                var spy = jasmine.createSpy('spy');
                test.cmp.modalBox = { close: spy };
                test.cmp.executeQuery({ closeModalBox: true });
                expect(spy).toHaveBeenCalled();
            });
            it('should not close the modal if the closeModalBox is set to false in the executeQuery options', function () {
                var spy = jasmine.createSpy('spy');
                test.cmp.modalBox = { close: spy };
                test.cmp.executeQuery({ closeModalBox: false });
                expect(spy).not.toHaveBeenCalled();
            });
            it('should close the modal if the closeModalBox is set to true on the QueryController', function () {
                var spy = jasmine.createSpy('spy');
                test.cmp.modalBox = { close: spy };
                test.cmp.closeModalBox = true;
                test.cmp.executeQuery();
                expect(spy).toHaveBeenCalled();
            });
            it('should not close the modal if the closeModalBox is set to false on the QueryController', function () {
                var spy = jasmine.createSpy('spy');
                test.cmp.modalBox = { close: spy };
                test.cmp.closeModalBox = false;
                test.cmp.executeQuery();
                expect(spy).not.toHaveBeenCalled();
            });
            it('should priorize executeQuery options', function () {
                var spy = jasmine.createSpy('spy');
                test.cmp.modalBox = { close: spy };
                test.cmp.closeModalBox = false;
                test.cmp.executeQuery({ closeModalBox: true });
                expect(spy).toHaveBeenCalled();
                var spy2 = jasmine.createSpy('spy2');
                test.cmp.modalBox = { close: spy2 };
                test.cmp.closeModalBox = true;
                test.cmp.executeQuery({ closeModalBox: false });
                expect(spy2).not.toHaveBeenCalled();
            });
            it('should close the modals by default', function () {
                var spy = jasmine.createSpy('spy');
                test.cmp.modalBox = { close: spy };
                test.cmp.executeQuery();
                expect(spy).toHaveBeenCalled();
            });
        });
        describe('trigger query events', function () {
            it('executeQuery should call createQueryBuilder', function () {
                spyOn(test.cmp, 'createQueryBuilder').and.callThrough();
                test.cmp.executeQuery();
                expect(test.cmp.createQueryBuilder).toHaveBeenCalled();
            });
            it('executeQuery should trigger newQuery', function (done) {
                var spy = jasmine.createSpy('spy');
                Dom_1.$$(test.env.root).on('newQuery', spy);
                var search = test.env.searchEndpoint.search;
                search.and.returnValue(new Promise(function (resolve, reject) {
                    resolve(Fake_1.FakeResults.createFakeResults());
                }));
                test.cmp.executeQuery();
                setTimeout(function () {
                    expect(spy).toHaveBeenCalledWith(jasmine.any(Object), jasmine.objectContaining({
                        searchAsYouType: false,
                        cancel: false,
                        origin: undefined
                    }));
                    done();
                }, 10);
            });
            it('createQueryBuilder should trigger buildingQuery', function (done) {
                var spy = jasmine.createSpy('spy');
                Dom_1.$$(test.env.root).on('buildingQuery', spy);
                var search = test.env.searchEndpoint.search;
                search.and.returnValue(new Promise(function (resolve, reject) {
                    resolve(Fake_1.FakeResults.createFakeResults());
                }));
                test.cmp.createQueryBuilder(defaultOptions());
                setTimeout(function () {
                    expect(spy).toHaveBeenCalledWith(jasmine.any(Object), jasmine.objectContaining({
                        queryBuilder: jasmine.any(QueryBuilder_1.QueryBuilder),
                        searchAsYouType: false,
                        cancel: false
                    }));
                    done();
                }, 10);
            });
            it('createQueryBuilder should trigger doneBuildingQuery', function (done) {
                var spy = jasmine.createSpy('spy');
                Dom_1.$$(test.env.root).on('doneBuildingQuery', spy);
                var search = test.env.searchEndpoint.search;
                search.and.returnValue(new Promise(function (resolve, reject) {
                    resolve(Fake_1.FakeResults.createFakeResults());
                }));
                test.cmp.createQueryBuilder(defaultOptions());
                setTimeout(function () {
                    expect(spy).toHaveBeenCalledWith(jasmine.any(Object), jasmine.objectContaining({
                        queryBuilder: jasmine.any(QueryBuilder_1.QueryBuilder),
                        searchAsYouType: false,
                        cancel: false
                    }));
                    done();
                }, 10);
            });
            it('executeQuery should trigger querySuccess', function (done) {
                var spy = jasmine.createSpy('spy');
                Dom_1.$$(test.env.root).on('querySuccess', spy);
                var search = test.env.searchEndpoint.search;
                search.and.returnValue(new Promise(function (resolve, reject) {
                    resolve(Fake_1.FakeResults.createFakeResults());
                }));
                test.cmp.executeQuery();
                setTimeout(function () {
                    expect(spy).toHaveBeenCalledWith(jasmine.any(Object), jasmine.objectContaining({
                        queryBuilder: jasmine.any(QueryBuilder_1.QueryBuilder),
                        query: jasmine.any(Object),
                        results: jasmine.any(Object),
                        searchAsYouType: false
                    }));
                    done();
                }, 10);
            });
            it('should respect the keepLastSearchUid option set to true', function (done) { return __awaiter(_this, void 0, void 0, function () {
                var response;
                return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0:
                            test.cmp['lastSearchUid'] = 'foo';
                            test.env.searchEndpoint.search.and.returnValue(Promise.resolve(Fake_1.FakeResults.createFakeResults()));
                            return [4 /*yield*/, test.cmp.executeQuery({ keepLastSearchUid: true })];
                        case 1:
                            response = _a.sent();
                            response.results.forEach(function (res) { return expect(res.queryUid).toBe('foo'); });
                            done();
                            return [2 /*return*/];
                    }
                });
            }); });
            it('should respect the keepLastSearchUid option set to false', function (done) { return __awaiter(_this, void 0, void 0, function () {
                var response;
                return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0:
                            test.cmp['lastSearchUid'] = 'foo';
                            test.env.searchEndpoint.search.and.returnValue(Promise.resolve(Fake_1.FakeResults.createFakeResults()));
                            return [4 /*yield*/, test.cmp.executeQuery({ keepLastSearchUid: false })];
                        case 1:
                            response = _a.sent();
                            response.results.forEach(function (res) { return expect(res.queryUid).not.toBe('foo'); });
                            done();
                            return [2 /*return*/];
                    }
                });
            }); });
            it('executeQuery should trigger preprocessResults', function (done) {
                var spy = jasmine.createSpy('spy');
                Dom_1.$$(test.env.root).on('preprocessResults', spy);
                var search = test.env.searchEndpoint.search;
                var results = Fake_1.FakeResults.createFakeResults();
                search.and.returnValue(new Promise(function (resolve, reject) {
                    resolve(results);
                }));
                test.cmp.executeQuery();
                setTimeout(function () {
                    expect(spy).toHaveBeenCalledWith(jasmine.any(Object), jasmine.objectContaining({
                        queryBuilder: jasmine.any(QueryBuilder_1.QueryBuilder),
                        query: jasmine.any(Object),
                        results: results,
                        searchAsYouType: false
                    }));
                    done();
                }, 10);
            });
            it('executeQuery should trigger noResults', function (done) {
                var spy = jasmine.createSpy('spy');
                Dom_1.$$(test.env.root).on('noResults', spy);
                var search = test.env.searchEndpoint.search;
                var results = Fake_1.FakeResults.createFakeResults(0);
                search.and.returnValue(new Promise(function (resolve, reject) {
                    resolve(results);
                }));
                test.cmp.executeQuery();
                setTimeout(function () {
                    expect(spy).toHaveBeenCalledWith(jasmine.any(Object), jasmine.objectContaining({
                        queryBuilder: jasmine.any(QueryBuilder_1.QueryBuilder),
                        query: jasmine.any(Object),
                        results: results,
                        searchAsYouType: false,
                        retryTheQuery: false
                    }));
                    done();
                }, 10);
            });
            it('executeQuery should cancel the query if set during an event', function () {
                Dom_1.$$(test.env.root).on('newQuery', function (e, args) {
                    args.cancel = true;
                });
                test.cmp.executeQuery();
                expect(test.env.searchEndpoint.search).not.toHaveBeenCalled();
            });
        });
        describe('when calling fetchQueryExecutionPlan', function () {
            it('should call createQueryBuilder', function (done) { return __awaiter(_this, void 0, void 0, function () {
                return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0:
                            spyOn(test.cmp, 'createQueryBuilder').and.callThrough();
                            return [4 /*yield*/, test.cmp.fetchQueryExecutionPlan()];
                        case 1:
                            _a.sent();
                            expect(test.cmp.createQueryBuilder).toHaveBeenCalled();
                            done();
                            return [2 /*return*/];
                    }
                });
            }); });
            it('should call plan on the endpoint', function (done) { return __awaiter(_this, void 0, void 0, function () {
                return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0: return [4 /*yield*/, test.cmp.fetchQueryExecutionPlan()];
                        case 1:
                            _a.sent();
                            expect(test.env.searchEndpoint.plan).toHaveBeenCalled();
                            done();
                            return [2 /*return*/];
                    }
                });
            }); });
            it("when successful\n        shoud return an ExecutionPlan", function (done) { return __awaiter(_this, void 0, void 0, function () {
                var planSpy, fakeExecutionPlan, newPlan;
                return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0:
                            planSpy = test.env.searchEndpoint.plan;
                            fakeExecutionPlan = new Plan_1.ExecutionPlan(Fake_1.FakeResults.createFakePlanResponse());
                            planSpy.and.returnValue(new Promise(function (resolve, reject) {
                                resolve(fakeExecutionPlan);
                            }));
                            return [4 /*yield*/, test.cmp.fetchQueryExecutionPlan()];
                        case 1:
                            newPlan = _a.sent();
                            expect(newPlan).toBe(fakeExecutionPlan);
                            done();
                            return [2 /*return*/];
                    }
                });
            }); });
            it("when unsuccessful\n        shoud return null", function (done) { return __awaiter(_this, void 0, void 0, function () {
                var planSpy, newPlan;
                return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0:
                            planSpy = test.env.searchEndpoint.plan;
                            planSpy.and.returnValue(new Promise(function (resolve, reject) {
                                reject(new Error('no'));
                            }));
                            return [4 /*yield*/, test.cmp.fetchQueryExecutionPlan()];
                        case 1:
                            newPlan = _a.sent();
                            expect(newPlan).toBeNull();
                            done();
                            return [2 /*return*/];
                    }
                });
            }); });
        });
        describe('coveoanalytics', function () {
            var key = '__coveo.analytics.history';
            describe('when enabled', function () {
                beforeEach(function () {
                    localStorage.clear();
                    searchInterface.usageAnalytics.isActivated = function () { return true; };
                    initQueryController();
                });
                it('initializes the historyStore by calling buildHistoryStore', function () {
                    var spy = spyOn(HistoryStore, 'buildHistoryStore');
                    initQueryController();
                    expect(spy).toHaveBeenCalledTimes(1);
                });
                it("setting action history stores the value in localStorage", function () {
                    test.cmp.historyStore.setHistory(['a']);
                    expect(localStorage.getItem(key)).toBeTruthy();
                });
                it('should not log the query in history if not specified', function () {
                    test.cmp.executeQuery({ logInActionsHistory: false });
                    expect(localStorage.getItem(key)).toBeFalsy();
                });
                it('should log the query in history if specified', function () {
                    test.cmp.executeQuery({ logInActionsHistory: true });
                    expect(localStorage.getItem(key)).toBeTruthy();
                });
            });
            describe('when disabled', function () {
                it('initializes the historyStore by calling buildNullHistoryStore', function () {
                    var spy = spyOn(HistoryStore, 'buildNullHistoryStore');
                    initQueryController();
                    expect(spy).toHaveBeenCalledTimes(1);
                });
                it("it clears the action history", function () {
                    localStorage.setItem(key, 'a');
                    initQueryController();
                    expect(localStorage.getItem(key)).toBeFalsy();
                });
                it("setting action history does not store anything in localStorage", function () {
                    localStorage.clear();
                    initQueryController();
                    test.cmp.historyStore.setHistory(['a']);
                    expect(localStorage.getItem(key)).toBeFalsy();
                });
            });
        });
        describe('coveo-lastQueryHash local storage', function () {
            var key = 'coveo-lastQueryHash';
            var fakeResults = function () { return (__assign({}, Fake_1.FakeResults.createFakeResults(), { pipeline: 'commerce', searchUid: '123' })); };
            var expireTime = function () { return new Date().getTime() + 1000 * 60 * 30; };
            beforeEach(function () {
                localStorage.clear();
                test.env.searchEndpoint.search.and.returnValue(Promise.resolve(fakeResults()));
            });
            it("with no local storage value\n      after a query has been executed\n      calling saveLastQuery should save the last query hash to the local storage", function (done) { return __awaiter(_this, void 0, void 0, function () {
                var queryHash;
                return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0: return [4 /*yield*/, test.cmp.executeQuery()];
                        case 1:
                            _a.sent();
                            test.cmp.saveLastQuery();
                            queryHash = JSON.parse(localStorage.getItem(key));
                            expect(queryHash).toEqual(jasmine.objectContaining({
                                expire: jasmine.any(Number),
                                uid: '123'
                            }));
                            expect(JSON.parse(queryHash.hash)).toEqual({ pipeline: 'commerce', sortCriteria: 'relevancy' });
                            done();
                            return [2 /*return*/];
                    }
                });
            }); });
            it("with a local storage value\n      after a query has been executed using the same parameters\n      the local storage item should be loaded \n      and \"original\" search uid should be reused", function (done) { return __awaiter(_this, void 0, void 0, function () {
                var hash, value, results;
                return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0:
                            hash = JSON.stringify({ pipeline: 'commerce', sortCriteria: 'relevancy' });
                            value = JSON.stringify({ expire: expireTime(), uid: '456', hash: hash });
                            localStorage.setItem(key, value);
                            return [4 /*yield*/, test.cmp.executeQuery()];
                        case 1:
                            results = _a.sent();
                            expect(results.searchUid).toBe('456');
                            expect(results._reusedSearchUid).toBe(true);
                            expect(localStorage.getItem(key)).toBeFalsy();
                            done();
                            return [2 /*return*/];
                    }
                });
            }); });
            it("with a local storage value\n      after a query has been executed using different parameters\n      the local storage item should be loaded \n      but the \"new\" search uid should be used", function (done) { return __awaiter(_this, void 0, void 0, function () {
                var hash, value, results;
                return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0:
                            hash = JSON.stringify({ pipeline: 'commerce', sortCriteria: 'relevancy', q: 'Look at me, I am different' });
                            value = JSON.stringify({ expire: expireTime(), uid: '456', hash: hash });
                            localStorage.setItem(key, value);
                            return [4 /*yield*/, test.cmp.executeQuery()];
                        case 1:
                            results = _a.sent();
                            expect(results.searchUid).toBe('123');
                            expect(results._reusedSearchUid).toBeUndefined();
                            expect(localStorage.getItem(key)).toBeFalsy();
                            done();
                            return [2 /*return*/];
                    }
                });
            }); });
        });
        it('should allow adding new query box expression when creating a new query builder', function () {
            var searchBoxOptions = {};
            var firstBuilder = test.cmp.createQueryBuilder(searchBoxOptions);
            var secondBuilder = test.cmp.createQueryBuilder(searchBoxOptions);
            // Trying to add two expressions in the same call stack without a new builder being created in between should be blocked
            new QueryboxQueryParameters_1.QueryboxQueryParameters(searchBoxOptions).addParameters(firstBuilder, 'the initial expression');
            new QueryboxQueryParameters_1.QueryboxQueryParameters(searchBoxOptions).addParameters(secondBuilder, 'this should not be added to the query');
            expect(firstBuilder.expression.build()).toEqual('the initial expression');
            expect(secondBuilder.expression.build()).toBeUndefined();
            // Creating this builder should unblock the QueryboxQueryParameters.addParameters function
            var thirdBuilder = test.cmp.createQueryBuilder(searchBoxOptions);
            new QueryboxQueryParameters_1.QueryboxQueryParameters(searchBoxOptions).addParameters(thirdBuilder, 'this should be added to the query');
            expect(thirdBuilder.expression.build()).toEqual('this should be added to the query');
        });
    });
}
exports.QueryControllerTest = QueryControllerTest;
 
 
/***/ }),
/* 1576 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var AdvancedSearch_1 = __webpack_require__(652);
var AdvancedSearchEvents_1 = __webpack_require__(110);
var Simulate_1 = __webpack_require__(15);
var Dom_1 = __webpack_require__(0);
var Strings_1 = __webpack_require__(4);
var Mock = __webpack_require__(2);
var TextInput_1 = __webpack_require__(80);
var NumericSpinner_1 = __webpack_require__(143);
var DatePicker_1 = __webpack_require__(140);
var MockEnvironment_1 = __webpack_require__(2);
var AnalyticsActionListMeta_1 = __webpack_require__(7);
var _ = __webpack_require__(1);
var BreadcrumbEvents_1 = __webpack_require__(33);
function AdvancedSearchTest() {
    describe('AdvancedSearch', function () {
        var test;
        beforeEach(function () {
            test = Mock.basicComponentSetupWithModalBox(AdvancedSearch_1.AdvancedSearch);
        });
        afterEach(function () {
            test = null;
        });
        it('shoud allow to customize inputs', function () {
            var root = Dom_1.$$('div').el;
            var textInput = new TextInput_1.TextInput(function () { }, 'MyTextInput');
            var numericInput = new NumericSpinner_1.NumericSpinner(function () { }, 0, 10);
            var dpicker = new DatePicker_1.DatePicker(function () { });
            var sectionElement = Dom_1.$$('div');
            sectionElement.append(textInput.build());
            sectionElement.append(numericInput.build());
            sectionElement.append(dpicker.build());
            Dom_1.$$(root).on(AdvancedSearchEvents_1.AdvancedSearchEvents.buildingAdvancedSearch, function (e, args) {
                expect(args.executeQuery).toBeDefined();
                args.sections.push({
                    content: sectionElement.el,
                    name: 'My section',
                    updateQuery: function (inputs, queryBuilder) {
                        expect(inputs).toEqual(jasmine.arrayContaining([textInput, numericInput, dpicker]));
                        expect(queryBuilder).toBeDefined();
                    },
                    inputs: [textInput, numericInput, dpicker]
                });
            });
            test = Mock.advancedComponentSetupWithModalBox(AdvancedSearch_1.AdvancedSearch, new MockEnvironment_1.AdvancedComponentSetupOptions(undefined, undefined, function (builder) {
                builder.root = root;
                return builder;
            }));
            Simulate_1.Simulate.query(test.env);
        });
        it('should open the modal box on open', function () {
            test.cmp.open();
            expect(test.modalBox.open).toHaveBeenCalled();
        });
        it('should close the modal box on close', function () {
            test.cmp.open();
            test.cmp.close();
            expect(test.modalBox.close).toHaveBeenCalled();
        });
        describe('exposes includeKeywords', function () {
            it('should include the keywords section by default', function () {
                expect(getSection(Strings_1.l('Keywords'))).not.toBeUndefined();
            });
            it('should not include the keywords section if false', function () {
                test = Mock.optionsComponentSetupWithModalBox(AdvancedSearch_1.AdvancedSearch, { includeKeywords: false });
                expect(getSection(Strings_1.l('Keywords'))).toBeUndefined();
            });
        });
        describe('exposes includeDate', function () {
            it('should include the date section by default', function () {
                expect(getSection(Strings_1.l('Date'))).not.toBeUndefined();
            });
            it('should not include the date section if false', function () {
                test = Mock.optionsComponentSetupWithModalBox(AdvancedSearch_1.AdvancedSearch, { includeDate: false });
                expect(getSection(Strings_1.l('Date'))).toBeUndefined();
            });
        });
        describe('exposes includeDocument', function () {
            it('should include the document section by default', function () {
                expect(getSection(Strings_1.l('Document'))).not.toBeUndefined();
            });
            it('should not include the document section if false', function () {
                test = Mock.optionsComponentSetupWithModalBox(AdvancedSearch_1.AdvancedSearch, { includeDocument: false });
                expect(getSection(Strings_1.l('Document'))).toBeUndefined();
            });
        });
        describe('executeAdvancedSearch', function () {
            beforeEach(function () {
                test.cmp.inputs = [jasmine.createSpyObj('input', ['build', 'updateQueryState'])];
            });
            it('should execute a query', function () {
                test.cmp.executeAdvancedSearch();
                expect(test.cmp.queryController.executeQuery).toHaveBeenCalled();
            });
            it('should log an analytics event', function () {
                test.cmp.executeAdvancedSearch();
                expect(test.env.usageAnalytics.logSearchEvent).toHaveBeenCalledWith(AnalyticsActionListMeta_1.analyticsActionCauseList.advancedSearch, jasmine.objectContaining({}));
            });
            describe('on a new query event', function () {
                var updateQuerySpy;
                var resetSpy;
                beforeEach(function () {
                    updateQuerySpy = jasmine.createSpy('updateQuery');
                    resetSpy = jasmine.createSpy('reset');
                    updateQuerySpy.and.callFake(function (queryBuilder) {
                        queryBuilder.advancedExpression.add('foo');
                    });
                    test.cmp.inputs[0].updateQuery = updateQuerySpy;
                    test.cmp.inputs[0].reset = resetSpy;
                });
                afterEach(function () {
                    updateQuerySpy = null;
                    resetSpy = null;
                });
                it('should call updateQuery on each input', function () {
                    var simulation = Simulate_1.Simulate.query(test.env);
                    expect(updateQuerySpy).toHaveBeenCalled();
                    expect(simulation.queryBuilder.build().aq).toEqual('foo');
                });
                it('should populate breadcrumb if the query is modified by any input', function (done) {
                    Dom_1.$$(test.env.root).on(BreadcrumbEvents_1.BreadcrumbEvents.populateBreadcrumb, function (e, args) {
                        expect(args.breadcrumbs.length).toEqual(1);
                        done();
                    });
                    Simulate_1.Simulate.query(test.env);
                    expect(updateQuerySpy).toHaveBeenCalled();
                    Simulate_1.Simulate.breadcrumb(test.env);
                });
                it('should not populate breadcrumb if the query is not modified by any input', function (done) {
                    Dom_1.$$(test.env.root).on(BreadcrumbEvents_1.BreadcrumbEvents.populateBreadcrumb, function (e, args) {
                        expect(args.breadcrumbs.length).toEqual(0);
                        done();
                    });
                    updateQuerySpy.and.callFake(function (queryBuilder) {
                        // do nothing
                    });
                    Simulate_1.Simulate.query(test.env);
                    expect(updateQuerySpy).toHaveBeenCalled();
                    Simulate_1.Simulate.breadcrumb(test.env);
                });
                it('should call reset on each inputs when the breadcrumb is cleared', function () {
                    Simulate_1.Simulate.query(test.env);
                    Dom_1.$$(test.env.root).trigger(BreadcrumbEvents_1.BreadcrumbEvents.clearBreadcrumb);
                    expect(resetSpy).toHaveBeenCalled();
                });
                it('should call reset on each inputs when only this part of the breadcrumb is cleared', function (done) {
                    Dom_1.$$(test.env.root).on(BreadcrumbEvents_1.BreadcrumbEvents.populateBreadcrumb, function (e, args) {
                        expect(args.breadcrumbs.length).toEqual(1);
                        var clear = Dom_1.$$(args.breadcrumbs[0].element).find('.coveo-advanced-search-breadcrumb-clear');
                        Dom_1.$$(clear).trigger('click');
                        expect(test.env.queryController.executeQuery).toHaveBeenCalled();
                        expect(test.env.usageAnalytics.logSearchEvent).toHaveBeenCalledWith(AnalyticsActionListMeta_1.analyticsActionCauseList.breadcrumbAdvancedSearch, jasmine.any(Object));
                        done();
                    });
                    Simulate_1.Simulate.query(test.env);
                    Simulate_1.Simulate.breadcrumb(test.env);
                });
            });
        });
        function getSection(section) {
            var sectionsTitle = Dom_1.$$(test.cmp.content).findAll('.coveo-advanced-search-section-title');
            var title = _.find(sectionsTitle, function (title) {
                return title.innerText == section;
            });
            return title ? title.parentElement : undefined;
        }
    });
}
exports.AdvancedSearchTest = AdvancedSearchTest;
 
 
/***/ }),
/* 1577 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var TextInput_1 = __webpack_require__(80);
var Dom_1 = __webpack_require__(0);
var Simulate_1 = __webpack_require__(15);
var Core_1 = __webpack_require__(9);
function TextInputTest() {
    describe('TextInput', function () {
        var textInput;
        var spy;
        beforeEach(function () {
            spy = jasmine.createSpy('spy');
            initializeComponentWithOptions('hello');
        });
        afterEach(function () {
            textInput = null;
            spy = null;
        });
        function initializeComponentWithOptions(name, options) {
            textInput = new TextInput_1.TextInput(spy, name, options);
        }
        function getElement() {
            return textInput.getElement();
        }
        function getInput() {
            return Dom_1.$$(getElement()).find('input');
        }
        function simulateEnter() {
            getInput().setAttribute('value', 'new value');
            Simulate_1.Simulate.keyDown(getInput(), Core_1.KEYBOARD.ENTER);
        }
        function simulateKeyUp() {
            getInput().setAttribute('value', 'new value');
            Simulate_1.Simulate.keyUp(getInput(), Core_1.KEYBOARD.CTRL);
        }
        function simulateBlur() {
            getInput().setAttribute('value', 'new value');
            Dom_1.$$(getInput()).trigger('blur');
        }
        it('should contain a required input element', function () {
            var input = getInput();
            expect(input.required).toBe(true);
        });
        it('should contain a label if specified', function () {
            var label = 'Label';
            initializeComponentWithOptions(label);
            var labelHTML = Dom_1.$$(getElement()).find('label');
            expect(Dom_1.$$(labelHTML).text()).toEqual(label);
        });
        it('should not contain a label if not specified', function () {
            initializeComponentWithOptions();
            var labelHTML = Dom_1.$$(getElement()).find('label');
            expect(labelHTML).toBeNull();
        });
        it('should contain an icon if specified', function () {
            initializeComponentWithOptions(undefined, { icon: 'arrowDown' });
            expect(getElement().querySelector('svg')).not.toBeNull();
        });
        it('should not contain an icon if not specified', function () {
            initializeComponentWithOptions();
            expect(getElement().querySelector('svg')).toBeNull();
        });
        it("when name is specified and the options \"usePlaceholder\" is true\n    should contain a placeholder instead of a label", function () {
            var placeholder = 'A Placeholder';
            initializeComponentWithOptions(placeholder, { usePlaceholder: true });
            var input = getInput();
            var labelHTML = Dom_1.$$(getElement()).find('label');
            expect(labelHTML).toBeNull();
            expect(input.placeholder).toEqual(placeholder);
        });
        describe('setValue', function () {
            it('should modify the input value', function () {
                var value = 'test';
                textInput.setValue(value);
                expect(textInput.getValue()).toEqual(value);
            });
            it('should call the onchange', function () {
                textInput.setValue('test');
                expect(spy).toHaveBeenCalledWith(textInput);
            });
            it('should not call the onchange multiple time', function () {
                textInput.setValue('test');
                textInput.setValue('test');
                textInput.setValue('test');
                expect(spy).toHaveBeenCalledTimes(1);
            });
            it('should call on change with different values multiple time', function () {
                textInput.setValue('test 1');
                textInput.setValue('test 2');
                textInput.setValue('test 3');
                expect(spy).toHaveBeenCalledTimes(3);
            });
            it('should call on change with empty value', function () {
                textInput.setValue('test');
                textInput.setValue('');
                expect(spy).toHaveBeenCalledTimes(2);
            });
        });
        it('should call on change on reset', function () {
            textInput.setValue('test');
            textInput.reset();
            expect(spy).toHaveBeenCalledTimes(2);
        });
        it('should call on change after reset with the same original value', function () {
            textInput.setValue('test');
            textInput.reset();
            textInput.setValue('test');
            expect(spy).toHaveBeenCalledTimes(3);
        });
        it('should call on change after changing values back to the same original value', function () {
            textInput.setValue('test');
            textInput.setValue('');
            textInput.setValue('test');
            expect(spy).toHaveBeenCalledTimes(3);
        });
        it('should not call on change on reset multiple time', function () {
            textInput.setValue('test');
            textInput.reset();
            textInput.reset();
            expect(spy).toHaveBeenCalledTimes(2);
        });
        it('should have coveo-input as the default class name', function () {
            expect(Dom_1.$$(getElement()).getClass()[0]).toBe('coveo-input');
        });
        it('should allow to set a custom class with the option "className"', function () {
            var customClass = 'coveo-custom-class';
            initializeComponentWithOptions('hello', { className: customClass });
            expect(Dom_1.$$(getElement()).getClass()[0]).toBe(customClass);
        });
        describe('when option "triggerOnChangeAsYouType" is false (default)', function () {
            it('should trigger "onChange" when input is blurred', function () {
                simulateBlur();
                expect(spy).toHaveBeenCalledTimes(1);
            });
            it('should trigger "onChange" when the Enter key is pressed on the keyboard', function () {
                simulateEnter();
                expect(spy).toHaveBeenCalledTimes(1);
            });
            it('should not trigger "onChange" on key up', function () {
                simulateKeyUp();
                expect(spy).not.toHaveBeenCalled();
            });
        });
        describe('when option "triggerOnChangeAsYouType" is true', function () {
            beforeEach(function () {
                initializeComponentWithOptions('hello', { triggerOnChangeAsYouType: true });
            });
            it('should not trigger "onChange" when input is blurred', function () {
                simulateBlur();
                expect(spy).not.toHaveBeenCalled();
            });
            it('should not trigger "onChange" when the Enter key is pressed on the keyboard', function () {
                simulateEnter();
                expect(spy).not.toHaveBeenCalled();
            });
            it('should trigger "onChange" on key up', function () {
                simulateKeyUp();
                expect(spy).toHaveBeenCalledTimes(1);
            });
        });
        it("should have the \"autocomplete\" attribute set to \"off\"", function () {
            expect(getInput().getAttribute('autocomplete')).toBe('off');
        });
        it("when the \"ariaLabel\" option is not defined (default)\n    should not add the \"aria-label\" attribute", function () {
            expect(getInput().hasAttribute('aria-label')).toBe(false);
        });
        it("when the \"ariaLabel\" option is defined\n    should add the \"aria-label\" attribute on the input with the right value", function () {
            var ariaLabel = 'An arial label;';
            initializeComponentWithOptions('Hello', { ariaLabel: ariaLabel });
            expect(getInput().getAttribute('aria-label')).toEqual(ariaLabel);
        });
        it("when the \"isRequired\" option is true\n    should set the \"required\" attribute on the input to true", function () {
            initializeComponentWithOptions('Hello', { isRequired: true });
            expect(getInput().getAttribute('required')).toBe('true');
        });
        it("when the \"isRequired\" option is false\n    should set the \"required\" attribute on the input to false", function () {
            initializeComponentWithOptions('Hello', { isRequired: false });
            expect(getInput().getAttribute('required')).toBeFalsy();
        });
    });
}
exports.TextInputTest = TextInputTest;
 
 
/***/ }),
/* 1578 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var NumericSpinner_1 = __webpack_require__(143);
var Dom_1 = __webpack_require__(0);
function NumericSpinnerTest() {
    describe('NumericSpinner', function () {
        var spinner;
        beforeEach(function () {
            spinner = new NumericSpinner_1.NumericSpinner();
            spinner.setValue(5);
        });
        afterEach(function () {
            spinner = null;
        });
        it('should increment on click on spinner-up', function () {
            var initialValue = spinner.getIntValue();
            var element = spinner.getElement();
            var up = Dom_1.$$(element).find('.coveo-spinner-up');
            Dom_1.$$(up).trigger('click');
            expect(spinner.getIntValue()).toEqual(initialValue + 1);
        });
        it('should decrement on click on spinner-down', function () {
            var initialValue = spinner.getIntValue();
            var element = spinner.getElement();
            var down = Dom_1.$$(element).find('.coveo-spinner-down');
            Dom_1.$$(down).trigger('click');
            expect(spinner.getIntValue()).toEqual(initialValue - 1);
        });
        describe('setValue', function () {
            it('should set the spinner value', function () {
                var value = 8;
                spinner.setValue(value);
                expect(spinner.getIntValue()).toEqual(value);
            });
            it('should set the value to min if below min', function () {
                var min = 5;
                spinner = new NumericSpinner_1.NumericSpinner();
                spinner.min = min;
                spinner.setValue(min - 1);
                expect(spinner.getIntValue()).toEqual(min);
            });
            it('should set the value to max if over max', function () {
                var max = 5;
                spinner = new NumericSpinner_1.NumericSpinner();
                spinner.max = max;
                spinner.setValue(max + 1);
                expect(spinner.getIntValue()).toEqual(max);
            });
        });
    });
}
exports.NumericSpinnerTest = NumericSpinnerTest;
 
 
/***/ }),
/* 1579 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Dropdown_1 = __webpack_require__(92);
function DropdownTest() {
    describe('Dropdown', function () {
        var dropdown;
        var values;
        var changeSpy;
        beforeEach(function () {
            values = ['one', 'two', 'three'];
            changeSpy = jasmine.createSpy('changeSpy');
            dropdown = new Dropdown_1.Dropdown(changeSpy, values);
        });
        afterEach(function () {
            values = null;
            dropdown = null;
            changeSpy = null;
        });
        it('should select the first element by default', function () {
            expect(dropdown.getValue()).toEqual(values[0]);
        });
        it('should call the on change function when the option is changed', function () {
            dropdown.select(1);
            expect(changeSpy).toHaveBeenCalled();
        });
        it('should not call the on change function if not wanted', function () {
            dropdown.select(1, false);
            expect(changeSpy).not.toHaveBeenCalled();
        });
        describe('select', function () {
            it('should select option at specified index', function () {
                dropdown.select(1);
                expect(dropdown.getValue()).toEqual(values[1]);
            });
            it('should execute the onchange function by default when a selection is made', function () {
                var onchangeSpy = jasmine.createSpy('onchange');
                dropdown.onChange = onchangeSpy;
                dropdown.select(1);
                expect(onchangeSpy).toHaveBeenCalled();
            });
            it('should not execute the onchange function if specified', function () {
                var onchangeSpy = jasmine.createSpy('onchange');
                dropdown.onChange = onchangeSpy;
                dropdown.select(1, false);
                expect(onchangeSpy).not.toHaveBeenCalled();
            });
        });
        describe('selectValue', function () {
            it('should select option with specified value', function () {
                dropdown.setValue('three');
                expect(dropdown.getValue()).toEqual('three');
            });
            it("should not change selection if the value doesn't exist", function () {
                dropdown.setValue('random');
                expect(dropdown.getValue()).toEqual(values[0]);
            });
        });
    });
}
exports.DropdownTest = DropdownTest;
 
 
/***/ }),
/* 1580 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var DatePicker_1 = __webpack_require__(140);
var DateUtils_1 = __webpack_require__(43);
function DatePickerTest() {
    describe('DatePicker', function () {
        var picker;
        var spy;
        beforeEach(function () {
            spy = jasmine.createSpy('spy');
            picker = new DatePicker_1.DatePicker(spy);
        });
        afterEach(function () {
            picker = null;
        });
        it('should be a readonly input', function () {
            var element = picker.getElement();
            expect(element.tagName.toLowerCase()).toEqual('input');
            expect(element.readOnly).toBe(true);
        });
        it('should return an empty string for getValue if it was not set before', function () {
            expect(picker.getValue()).toEqual('');
        });
        it('should return null for getDateValue if it was not set before', function () {
            expect(picker.getDateValue()).toBeNull();
        });
        describe('set value', function () {
            it('should allow to set the date and get it as a string', function () {
                var date = new Date();
                picker.setValue(date);
                expect(picker.getValue()).toEqual(DateUtils_1.DateUtils.dateForQuery(date));
            });
            it('should allow to set the date and get it as a date', function () {
                var date = new Date();
                picker.setValue(date);
                expect(picker.getDateValue() instanceof Date).toBe(true);
            });
            it('should call on change when the date is set', function () {
                var date = new Date();
                picker.setValue(date);
                expect(spy).toHaveBeenCalledWith(picker);
            });
        });
        describe('reset', function () {
            it('should allow to reset', function () {
                var date = new Date();
                picker.setValue(date);
                picker.reset();
                expect(picker.getValue()).toEqual('');
                expect(picker.getDateValue()).toBeNull();
            });
            it('should call on change with reset', function () {
                var date = new Date();
                picker.setValue(date);
                picker.reset();
                expect(spy).toHaveBeenCalledTimes(2);
                expect(spy).toHaveBeenCalledWith(picker);
            });
        });
        describe('build', function () {
            it('should return the element on which the date picker is bound.', function () {
                expect(picker.build()).toEqual(picker.getElement());
            });
        });
        describe('getElement', function () {
            it('should return the element on which the date picker is bound.', function () {
                expect(picker.getElement()).toEqual(picker['element']);
            });
        });
    });
}
exports.DatePickerTest = DatePickerTest;
 
 
/***/ }),
/* 1581 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var RadioButton_1 = __webpack_require__(142);
function RadioButtonTest() {
    describe('RadioButton', function () {
        var radioButton;
        var onChange;
        beforeEach(function () {
            onChange = jasmine.createSpy('onchange');
            radioButton = new RadioButton_1.RadioButton(onChange, 'Hello world', 'same-name');
        });
        afterEach(function () {
            onChange = null;
            radioButton = null;
        });
        it('should return the element', function () {
            expect(radioButton.getElement()).not.toBe(null);
        });
        it('should return the value', function () {
            expect(radioButton.getValue()).toEqual('Hello world');
        });
        it('should return the label element', function () {
            expect(radioButton.getLabel().tagName.toLowerCase()).toEqual('label');
        });
        it('should return the input element', function () {
            expect(radioButton.getRadio().tagName.toLowerCase()).toEqual('input');
        });
        describe('select', function () {
            it('should return is selected correctly', function () {
                radioButton.select();
                expect(radioButton.isSelected()).toBe(true);
            });
            it('should call the on change option', function () {
                radioButton.select();
                expect(onChange).toHaveBeenCalledWith(radioButton);
            });
            it('should not call the on change option when already selected', function () {
                radioButton.select();
                radioButton.select();
                expect(onChange).toHaveBeenCalledTimes(1);
            });
        });
        describe('reset', function () {
            it('should allow to reset selection', function () {
                radioButton.select();
                expect(radioButton.isSelected()).toBe(true);
                radioButton.reset();
                expect(radioButton.isSelected()).toBe(false);
            });
            it('should call on change', function () {
                radioButton.select();
                radioButton.reset();
                expect(onChange).toHaveBeenCalledTimes(2);
            });
            it('should not call on change multiple time on reset', function () {
                radioButton.select();
                radioButton.reset();
                radioButton.reset();
                expect(onChange).toHaveBeenCalledTimes(2);
            });
        });
    });
}
exports.RadioButtonTest = RadioButtonTest;
 
 
/***/ }),
/* 1582 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var KeywordsInput_1 = __webpack_require__(182);
var QueryBuilder_1 = __webpack_require__(24);
var ExpressionBuilder_1 = __webpack_require__(87);
var Dom_1 = __webpack_require__(0);
var Mock = __webpack_require__(2);
function KeywordsInputTest() {
    describe('KeywordsInput', function () {
        var input;
        beforeEach(function () {
            input = new KeywordsInput_1.KeywordsInput('test', Dom_1.$$('div').el);
            input.build();
        });
        afterEach(function () {
            input = null;
        });
        describe('updateQuery', function () {
            it('should add the value in the query builder', function () {
                var value = 'test';
                var queryBuilder = Mock.mock(QueryBuilder_1.QueryBuilder);
                queryBuilder.advancedExpression = Mock.mock(ExpressionBuilder_1.ExpressionBuilder);
                input.setValue(value);
                input.updateQuery(queryBuilder);
                expect(queryBuilder.advancedExpression.add).toHaveBeenCalledWith(value);
            });
        });
    });
}
exports.KeywordsInputTest = KeywordsInputTest;
 
 
/***/ }),
/* 1583 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var AnyKeywordsInput_1 = __webpack_require__(654);
var Dom_1 = __webpack_require__(0);
function AnyKeywordsInputTest() {
    describe('AnyKeywordsInput', function () {
        var input;
        beforeEach(function () {
            input = new AnyKeywordsInput_1.AnyKeywordsInput(Dom_1.$$('div').el);
            input.build();
        });
        afterEach(function () {
            input = null;
        });
        describe('getValue', function () {
            it('should return the values separated by OR', function () {
                var value = 'starcraft starwars startrek';
                input.setValue(value);
                expect(input.getValue()).toEqual('"<@-starcraft-@>" OR "<@-starwars-@>" OR "<@-startrek-@>"');
            });
        });
    });
}
exports.AnyKeywordsInputTest = AnyKeywordsInputTest;
 
 
/***/ }),
/* 1584 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var ExactKeywordsInput_1 = __webpack_require__(653);
var Dom_1 = __webpack_require__(0);
function ExactKeywordsInputTest() {
    describe('ExactKeywordsInput', function () {
        var input;
        beforeEach(function () {
            input = new ExactKeywordsInput_1.ExactKeywordsInput(Dom_1.$$('div').el);
            input.build();
        });
        afterEach(function () {
            input = null;
        });
        describe('getValue', function () {
            it('should return the values in quotes', function () {
                var value = 'starcraft starwars startrek';
                input.setValue(value);
                expect(input.getValue()).toEqual('"<@-starcraft starwars startrek-@>"');
            });
        });
    });
}
exports.ExactKeywordsInputTest = ExactKeywordsInputTest;
 
 
/***/ }),
/* 1585 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var NoneKeywordsInput_1 = __webpack_require__(655);
var Dom_1 = __webpack_require__(0);
function NoneKeywordsInputTest() {
    describe('NoneKeywordsInput', function () {
        var input;
        beforeEach(function () {
            input = new NoneKeywordsInput_1.NoneKeywordsInput(Dom_1.$$('div').el);
            input.build();
        });
        afterEach(function () {
            input = null;
        });
        describe('getValue', function () {
            it('should add NOT before each value', function () {
                var value = 'starcraft starwars startrek';
                input.setValue(value);
                expect(input.getValue()).toEqual('NOT "<@-starcraft-@>" NOT "<@-starwars-@>" NOT "<@-startrek-@>"');
            });
        });
    });
}
exports.NoneKeywordsInputTest = NoneKeywordsInputTest;
 
 
/***/ }),
/* 1586 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var BetweenDateInput_1 = __webpack_require__(657);
var Dom_1 = __webpack_require__(0);
var Test_1 = __webpack_require__(40);
function BetweenDateInputTest() {
    describe('BetweenDateInput', function () {
        var input;
        beforeEach(function () {
            input = new BetweenDateInput_1.BetweenDateInput(Dom_1.$$('div').el);
            input.build();
            Dom_1.$$(input.getElement()).find('input').checked = true;
        });
        afterEach(function () {
            input = null;
        });
        it('should allow to reset', function () {
            input.firstDatePicker.setValue(new Date(2016, 8, 1));
            input.secondDatePicker.setValue(new Date(2016, 8, 4));
            expect(input.getValue()).toEqual('(@date>=2016/09/01)(@date<=2016/09/04)');
            input.reset();
            expect(input.getValue()).toEqual('');
        });
        it('should allow to update the query', function () {
            input.firstDatePicker.setValue(new Date(2016, 8, 1));
            input.secondDatePicker.setValue(new Date(2016, 8, 4));
            var queryBuilder = new Test_1.QueryBuilder();
            input.updateQuery(queryBuilder);
            expect(queryBuilder.build().aq).toEqual('(@date>=2016/09/01)(@date<=2016/09/04)');
        });
        it('should show an error message when updating the query with an invalid range', function () {
            input.firstDatePicker.setValue(new Date(2016, 8, 4));
            input.secondDatePicker.setValue(new Date(2016, 8, 1));
            var queryBuilder = new Test_1.QueryBuilder();
            input.updateQuery(queryBuilder);
            expect(queryBuilder.build().aq).toBeUndefined();
            expect(Dom_1.$$(input.getElement()).find('.coveo-error-date-input')).not.toBeNull();
        });
        it('should hide the error message when updating the query with a valid range', function () {
            input.firstDatePicker.setValue(new Date(2016, 8, 4));
            input.secondDatePicker.setValue(new Date(2016, 8, 1));
            var queryBuilder = new Test_1.QueryBuilder();
            input.updateQuery(queryBuilder);
            input.firstDatePicker.setValue(new Date(2016, 8, 1));
            input.secondDatePicker.setValue(new Date(2016, 8, 4));
            input.updateQuery(queryBuilder);
            expect(queryBuilder.build().aq).not.toBeUndefined();
            expect(Dom_1.$$(input.getElement()).find('.coveo-error-date-input')).toBeNull();
        });
        it('should return the selected dates with get values', function () {
            input.firstDatePicker.setValue(new Date(2016, 8, 1));
            input.secondDatePicker.setValue(new Date(2016, 8, 4));
            expect(input.getValue()).toEqual('(@date>=2016/09/01)(@date<=2016/09/04)');
        });
        it('should throw on get value if the values are invalid (ie: second date < first date)', function () {
            input.firstDatePicker.setValue(new Date(2016, 8, 4));
            input.secondDatePicker.setValue(new Date(2016, 8, 1));
            expect(function () { return input.getValue(); }).toThrow();
        });
    });
}
exports.BetweenDateInputTest = BetweenDateInputTest;
 
 
/***/ }),
/* 1587 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var InTheLastDateInput_1 = __webpack_require__(656);
var Dom_1 = __webpack_require__(0);
var DateUtils_1 = __webpack_require__(43);
function InTheLastDateInputTest() {
    describe('InTheLastDateInput', function () {
        var input;
        beforeEach(function () {
            input = new InTheLastDateInput_1.InTheLastDateInput(Dom_1.$$('div').el);
            input.build();
            Dom_1.$$(input.getElement()).find('input').checked = true;
        });
        afterEach(function () {
            input = null;
        });
        describe('getValue', function () {
            it('should return the date >= specified date', function () {
                input.dropdown.setValue('Months');
                input.spinner.setValue(13);
                var currentDate = new Date();
                currentDate.setMonth(currentDate.getMonth() - 13);
                expect(input.getValue()).toEqual('@date>=' + DateUtils_1.DateUtils.dateForQuery(currentDate));
            });
        });
    });
}
exports.InTheLastDateInputTest = InTheLastDateInputTest;
 
 
/***/ }),
/* 1588 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var DocumentInput_1 = __webpack_require__(232);
var QueryBuilder_1 = __webpack_require__(24);
var ExpressionBuilder_1 = __webpack_require__(87);
var Mock = __webpack_require__(2);
var Dom_1 = __webpack_require__(0);
function DocumentInputTest() {
    describe('DocumentInput', function () {
        var input;
        beforeEach(function () {
            input = new DocumentInput_1.DocumentInput('test', Dom_1.$$('div').el);
            input.build();
        });
        afterEach(function () {
            input = null;
        });
        describe('updateQuery', function () {
            it('should add the value in the advanced query', function () {
                var value = 'test';
                spyOn(input, 'getValue').and.returnValue(value);
                var queryBuilder = Mock.mock(QueryBuilder_1.QueryBuilder);
                var advancedExpression = Mock.mock(ExpressionBuilder_1.ExpressionBuilder);
                queryBuilder.advancedExpression = advancedExpression;
                input.updateQuery(queryBuilder);
                expect(advancedExpression.add).toHaveBeenCalledWith(value);
            });
        });
    });
}
exports.DocumentInputTest = DocumentInputTest;
 
 
/***/ }),
/* 1589 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var SimpleFieldInput_1 = __webpack_require__(658);
var SearchEndpoint_1 = __webpack_require__(61);
var Mock = __webpack_require__(2);
var Dom_1 = __webpack_require__(0);
function SimpleFieldInputTest() {
    describe('SimpleFieldInput', function () {
        var input;
        var endpoint;
        beforeEach(function () {
            endpoint = Mock.mock(SearchEndpoint_1.SearchEndpoint);
            mockListFieldValues();
            input = new SimpleFieldInput_1.SimpleFieldInput('test', '@test', endpoint, Dom_1.$$('div').el);
            input.build();
        });
        afterEach(function () {
            input = null;
            endpoint = null;
        });
        describe('getValue', function () {
            it('should return fieldName == the value', function () {
                input.dropDown.setValue('what');
                expect(input.getValue()).toEqual('@test==what');
            });
        });
        function mockListFieldValues() {
            endpoint.listFieldValues.and.callFake(function () {
                return {
                    then: function (callback) {
                        callback([{ value: 'what', numberOfResults: 100 }, { value: 'how', numberOfResults: 50 }]);
                        return {
                            then: function (callback) {
                                callback();
                            }
                        };
                    }
                };
            });
        }
    });
}
exports.SimpleFieldInputTest = SimpleFieldInputTest;
 
 
/***/ }),
/* 1590 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var AdvancedFieldInput_1 = __webpack_require__(659);
var Dom_1 = __webpack_require__(0);
function AdvancedFieldInputTest() {
    describe('AdvancedFieldInput', function () {
        var input;
        var fieldName;
        var value;
        beforeEach(function () {
            value = 'what';
            fieldName = '@test';
            input = new AdvancedFieldInput_1.AdvancedFieldInput('test', fieldName, Dom_1.$$('div').el);
            input.build();
            input.input.setValue(value);
        });
        afterEach(function () {
            input = null;
            fieldName = null;
            value = null;
        });
        describe('getValue', function () {
            it('if contains, should return fieldName = value', function () {
                input.mode.setValue('Contains');
                expect(input.getValue()).toEqual(fieldName + "=" + value);
            });
            it('if does not contains, should return fieldName <> value', function () {
                input.mode.setValue('DoesNotContain');
                expect(input.getValue()).toEqual(fieldName + "<>" + value);
            });
            it('if matches, should return fieldName == "value"', function () {
                input.mode.setValue('Matches');
                expect(input.getValue()).toEqual(fieldName + "==" + value);
            });
        });
    });
}
exports.AdvancedFieldInputTest = AdvancedFieldInputTest;
 
 
/***/ }),
/* 1591 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var SizeInput_1 = __webpack_require__(660);
var Dom_1 = __webpack_require__(0);
function SizeInputTest() {
    describe('SizeInput', function () {
        var input;
        beforeEach(function () {
            input = new SizeInput_1.SizeInput(Dom_1.$$('div').el);
            input.build();
        });
        afterEach(function () {
            input = null;
        });
        describe('getValue', function () {
            it('AtLeast should return @date>=', function () {
                input.modeSelect.setValue('AtLeast');
                input.sizeInput.setValue(5);
                input.sizeSelect.setValue('KB');
                expect(input.getValue()).toContain('@size>=');
            });
            it('AtMost should return @date<=', function () {
                input.modeSelect.setValue('AtMost');
                input.sizeInput.setValue(5);
                input.sizeSelect.setValue('KB');
                expect(input.getValue()).toContain('@size<=');
            });
            it('if size is KB should return size * 1024', function () {
                var size = 5;
                input.modeSelect.setValue('AtLeast');
                input.sizeInput.setValue(size);
                input.sizeSelect.setValue('KB');
                expect(input.getValue()).toContain((size * 1024).toString());
            });
            it('if size is MB should return size * 1024^2', function () {
                var size = 5;
                input.modeSelect.setValue('AtLeast');
                input.sizeInput.setValue(size);
                input.sizeSelect.setValue('MB');
                expect(input.getValue()).toContain((size * Math.pow(1024, 2)).toString());
            });
            it('if size is Bytes should return size', function () {
                var size = 5;
                input.modeSelect.setValue('AtLeast');
                input.sizeInput.setValue(size);
                input.sizeSelect.setValue('Bytes');
                expect(input.getValue()).toContain(size.toString());
            });
        });
    });
}
exports.SizeInputTest = SizeInputTest;
 
 
/***/ }),
/* 1592 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Aggregate_1 = __webpack_require__(662);
var Mock = __webpack_require__(2);
var Fake_1 = __webpack_require__(11);
var Dom_1 = __webpack_require__(0);
var Simulate_1 = __webpack_require__(15);
var Globalize = __webpack_require__(28);
function AggregateTest() {
    describe('Aggregate', function () {
        var test;
        afterEach(function () {
            test = null;
        });
        describe('exposes options', function () {
            it('field allows to set a field in the group by request', function () {
                test = Mock.optionsComponentSetup(Aggregate_1.Aggregate, {
                    field: '@foobar'
                });
                var simulation = Simulate_1.Simulate.query(test.env);
                expect(simulation.queryBuilder.build().groupBy).toEqual(jasmine.arrayContaining([
                    jasmine.objectContaining({
                        field: '@foobar'
                    })
                ]));
            });
            it('operation allows to set an operation in the group by request', function () {
                test = Mock.optionsComponentSetup(Aggregate_1.Aggregate, {
                    field: '@foobar',
                    operation: 'something'
                });
                var simulation = Simulate_1.Simulate.query(test.env);
                expect(simulation.queryBuilder.build().groupBy).toEqual(jasmine.arrayContaining([
                    jasmine.objectContaining({
                        computedFields: jasmine.arrayContaining([
                            jasmine.objectContaining({
                                operation: 'something',
                                field: '@foobar'
                            })
                        ])
                    })
                ]));
            });
            it('format should allow to render the result using the provided format', function () {
                test = Mock.optionsComponentSetup(Aggregate_1.Aggregate, {
                    field: '@foobar',
                    format: 'n0'
                });
                var results = Fake_1.FakeResults.createFakeResults(0);
                results.groupByResults = [Fake_1.FakeResults.createFakeGroupByResult('@foobar', 'foo', 10)];
                results.groupByResults[0].globalComputedFieldResults = [12345];
                Simulate_1.Simulate.query(test.env, {
                    results: results
                });
                expect(Dom_1.$$(test.cmp.element).text()).toEqual(Globalize.format(12345, 'n0'));
            });
        });
    });
}
exports.AggregateTest = AggregateTest;
 
 
/***/ }),
/* 1593 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var AccessToken_1 = __webpack_require__(167);
var AnalyticsEndpoint_1 = __webpack_require__(169);
var Fake_1 = __webpack_require__(11);
var Core_1 = __webpack_require__(9);
function AnalyticsEndpointTest() {
    function buildUrl(endpoint, path) {
        return endpoint.options.serviceUrl + '/' + AnalyticsEndpoint_1.AnalyticsEndpoint.DEFAULT_ANALYTICS_VERSION + path;
    }
    describe('AnalyticsEndpoint', function () {
        var endpoint;
        beforeEach(function () {
            endpoint = new AnalyticsEndpoint_1.AnalyticsEndpoint({
                serviceUrl: 'foo.com',
                accessToken: new AccessToken_1.AccessToken('token'),
                organization: 'organization'
            });
            jasmine.Ajax.install();
        });
        afterEach(function () {
            endpoint = null;
            AnalyticsEndpoint_1.AnalyticsEndpoint.pendingRequest = null;
            jasmine.Ajax.uninstall();
        });
        it('exposes a method to resolve URL', function () {
            var expectations = [
                {
                    in: 'https://platformdev.cloud.coveo.com/rest/search',
                    out: 'https://analyticsdev.cloud.coveo.com/rest/ua'
                },
                {
                    in: 'https://platformqa.cloud.coveo.com/rest/search',
                    out: 'https://analyticsqa.cloud.coveo.com/rest/ua'
                },
                {
                    in: 'https://platform.cloud.coveo.com/rest/search',
                    out: 'https://analytics.cloud.coveo.com/rest/ua'
                },
                {
                    in: 'https://platformhipaa.cloud.coveo.com/rest/search',
                    out: 'https://analyticshipaa.cloud.coveo.com/rest/ua'
                },
                {
                    in: 'https://platform-eu.cloud.coveo.com/rest/search',
                    out: 'https://analytics-eu.cloud.coveo.com/rest/ua'
                },
                {
                    in: 'https://platform-au.cloud.coveo.com/rest/search',
                    out: 'https://analytics-au.cloud.coveo.com/rest/ua'
                }
            ];
            expectations.forEach(function (expectation) {
                var searchEndpoint = new Core_1.SearchEndpoint({
                    restUri: expectation.in
                });
                expect(AnalyticsEndpoint_1.AnalyticsEndpoint.getURLFromSearchEndpoint(searchEndpoint)).toBe(expectation.out);
            });
        });
        it('exposes a method to resolve URL from an invalid SearchEndpoint', function () {
            var searchEndpoint = new Core_1.SearchEndpoint({
                restUri: 'this-is-not-valid'
            });
            expect(AnalyticsEndpoint_1.AnalyticsEndpoint.getURLFromSearchEndpoint(searchEndpoint)).toBe('this-is-not-valid/rest/ua');
        });
        it('exposes a method to resolve URL from an SearchEndpoint with multiple /rest path', function () {
            var searchEndpoint = new Core_1.SearchEndpoint({
                restUri: 'https://platform-eu.cloud.coveo.com/rest/search/rest/v2/rest/foo'
            });
            expect(AnalyticsEndpoint_1.AnalyticsEndpoint.getURLFromSearchEndpoint(searchEndpoint)).toBe('https://analytics-eu.cloud.coveo.com/rest/ua');
        });
        it('exposes a method to resolve URL if the search endpoint is undefined', function () {
            expect(AnalyticsEndpoint_1.AnalyticsEndpoint.getURLFromSearchEndpoint(undefined)).toBe('https://analytics.cloud.coveo.com/rest/ua');
        });
        it('allow to get the current visit id', function (done) {
            endpoint
                .getCurrentVisitIdPromise()
                .then(function (res) {
                expect(res).toBe('visitid');
                // Here, the current visit id is already set, so it should return immediately.
                expect(endpoint.getCurrentVisitId()).toBe('visitid');
            })
                .catch(function (e) {
                fail(e);
                return e;
            })
                .then(function () { return done(); });
            expect(jasmine.Ajax.requests.mostRecent().url).toBe(buildUrl(endpoint, '/analytics/visit?org=organization&access_token=token'));
            expect(jasmine.Ajax.requests.mostRecent().method).toBe('GET');
            jasmine.Ajax.requests.mostRecent().respondWith({
                status: '200',
                response: { id: 'visitid' }
            });
        });
        it('allow to sendSearchEvents', function (done) {
            var fakeSearchEvent = Fake_1.FakeResults.createFakeSearchEvent();
            endpoint
                .sendSearchEvents([fakeSearchEvent])
                .then(function (res) {
                expect(res.searchEventResponses[0].visitId).toBe('visitid');
                // Here, the current visit id is already set, so it should return immediately.
                expect(endpoint.getCurrentVisitId()).toBe('visitid');
            })
                .catch(function (e) {
                fail(e);
                return e;
            })
                .then(function () { return done(); });
            // Here, the current visit id should be undefined
            expect(endpoint.getCurrentVisitId()).toBeUndefined();
            expect(jasmine.Ajax.requests.mostRecent().method).toBe('POST');
            expect(jasmine.Ajax.requests.mostRecent().requestHeaders['Authorization']).toBe('Bearer token');
            expect(jasmine.Ajax.requests.mostRecent().requestHeaders['Content-Type']).toBe('application/json; charset=UTF-8');
            expect(JSON.parse(jasmine.Ajax.requests.mostRecent().params)[0]['actionCause']).toBe(fakeSearchEvent.actionCause);
            expect(JSON.parse(jasmine.Ajax.requests.mostRecent().params)[0]['queryPipeline']).toBe(fakeSearchEvent.queryPipeline);
            jasmine.Ajax.requests.mostRecent().respondWith({
                status: 200,
                responseText: JSON.stringify({ searchEventResponses: [{ visitId: 'visitid' }] })
            });
        });
        it('sends organization as parameter when sending a search event', function () {
            var fakeSearchEvent = Fake_1.FakeResults.createFakeSearchEvent();
            endpoint.sendSearchEvents([fakeSearchEvent]);
            expect(jasmine.Ajax.requests.mostRecent().url.indexOf('org=organization') != -1).toBe(true);
        });
        it('allow to getTopQueries', function (done) {
            endpoint
                .getTopQueries({ pageSize: 10, queryText: 'foobar' })
                .then(function (res) {
                expect(res.length).toBe(3);
                expect(res[0]).toBe('foo');
            })
                .catch(function (e) {
                fail(e);
                return e;
            })
                .then(function () { return done(); });
            var mostRecentRequest = jasmine.Ajax.requests.mostRecent();
            var mostRecentUrl = mostRecentRequest.url;
            expect(mostRecentUrl).toContain('/topQueries');
            expect(mostRecentUrl).toContain('org=organization');
            expect(mostRecentUrl).toContain('access_token=token');
            expect(mostRecentUrl).toContain('pageSize=10');
            expect(mostRecentUrl).toContain('queryText=foobar');
            expect(mostRecentRequest.method).toBe('GET');
            mostRecentRequest.respondWith({
                status: 200,
                response: ['foo', 'bar', 'foobar']
            });
        });
        it('should renew the token when the response is a 400 with the "InvalidToken" type', function (done) {
            var newToken = 'new token';
            spyOn(endpoint.options.accessToken, 'doRenew').and.callFake(function () {
                endpoint.endpointCaller.options.accessToken = newToken;
                return true;
            });
            spyOn(endpoint.endpointCaller, 'call').and.callFake(function () {
                if (endpoint.endpointCaller.options.accessToken === newToken) {
                    return Promise.resolve({
                        statusCode: 200,
                        data: { searchEventResponses: [{ visitId: 'visitid' }] }
                    });
                }
                return Promise.reject({
                    statusCode: 400,
                    data: { type: 'InvalidToken' }
                });
            });
            var fakeSearchEvent = Fake_1.FakeResults.createFakeSearchEvent();
            endpoint
                .sendSearchEvents([fakeSearchEvent])
                .then(function () {
                expect(endpoint.endpointCaller.call).toHaveBeenCalledTimes(2);
                expect(endpoint.endpointCaller.options.accessToken).toBe(newToken);
            })
                .then(function () { return done(); });
        });
    });
}
exports.AnalyticsEndpointTest = AnalyticsEndpointTest;
 
 
/***/ }),
/* 1594 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Mock = __webpack_require__(2);
var AnalyticsSuggestions_1 = __webpack_require__(663);
var Simulate_1 = __webpack_require__(15);
var Dom_1 = __webpack_require__(0);
var AnalyticsActionListMeta_1 = __webpack_require__(7);
var _ = __webpack_require__(1);
function AnalyticsSuggestionsTest() {
    describe('AnalyticsSuggestions', function () {
        var test;
        beforeEach(function () {
            // In phantom js there is a bug with CustomEvent('click'), which is needed to for those tests.
            // So, use jquery for event in phantom js
            Iif (Simulate_1.Simulate.isPhantomJs()) {
                Simulate_1.Simulate.addJQuery();
            }
            test = Mock.basicComponentSetup(AnalyticsSuggestions_1.AnalyticsSuggestions);
        });
        afterEach(function () {
            test = null;
            Simulate_1.Simulate.removeJQuery();
        });
        it('should trigger a call to get top query from the analytics', function () {
            Simulate_1.Simulate.populateOmnibox(test.env);
            expect(test.env.usageAnalytics.getTopQueries).toHaveBeenCalled();
        });
        it('should populate omnibox with returned data from analytics', function (done) {
            test.env.usageAnalytics.getTopQueries = jasmine.createSpy('topQuery');
            test.env.usageAnalytics.getTopQueries.and.returnValue(new Promise(function (resolve) {
                resolve(['foo', 'bar', 'baz']);
            }));
            var simulation = Simulate_1.Simulate.populateOmnibox(test.env);
            simulation.rows[0].deferred.then(function (elementResolved) {
                expect(simulation.rows.length).toBe(1);
                expect(Dom_1.$$(elementResolved.element).text()).toEqual(jasmine.stringMatching('foo'));
                expect(Dom_1.$$(elementResolved.element).text()).toEqual(jasmine.stringMatching('bar'));
                expect(Dom_1.$$(elementResolved.element).text()).toEqual(jasmine.stringMatching('baz'));
                done();
            });
        });
        it('should log analytics event when selecting a suggestion', function (done) {
            test.env.usageAnalytics.getTopQueries = jasmine.createSpy('topQuery');
            test.env.usageAnalytics.getTopQueries.and.returnValue(new Promise(function (resolve) {
                resolve(['foo', 'bar', 'baz']);
            }));
            var simulation = Simulate_1.Simulate.populateOmnibox(test.env);
            simulation.rows[0].deferred.then(function (elementResolved) {
                test.cmp.selectSuggestion(0);
                expect(test.env.usageAnalytics.logSearchEvent).toHaveBeenCalledWith(AnalyticsActionListMeta_1.analyticsActionCauseList.omniboxAnalytics, jasmine.objectContaining({ suggestionRanking: 0 }));
                test.cmp.selectSuggestion('baz');
                expect(test.env.usageAnalytics.logSearchEvent).toHaveBeenCalledWith(AnalyticsActionListMeta_1.analyticsActionCauseList.omniboxAnalytics, jasmine.objectContaining({ suggestionRanking: 2 }));
                done();
            });
        });
        it('should log partial queries in analytics', function (done) {
            test.env.usageAnalytics.getTopQueries = jasmine.createSpy('topQuery');
            test.env.usageAnalytics.getTopQueries.and.returnValue(new Promise(function (resolve) {
                resolve(['foo', 'bar', 'baz']);
            }));
            Simulate_1.Simulate.populateOmnibox(test.env, {
                completeQueryExpression: {
                    word: 't',
                    regex: /t/
                }
            });
            Simulate_1.Simulate.populateOmnibox(test.env, {
                completeQueryExpression: {
                    word: 'tes',
                    regex: /tes/
                }
            });
            var simulation = Simulate_1.Simulate.populateOmnibox(test.env, {
                completeQueryExpression: {
                    word: 'test',
                    regex: /test/
                }
            });
            simulation.rows[0].deferred.then(function (elementResolved) {
                test.cmp.selectSuggestion(0);
                expect(test.env.usageAnalytics.logSearchEvent).toHaveBeenCalledWith(AnalyticsActionListMeta_1.analyticsActionCauseList.omniboxAnalytics, jasmine.objectContaining({ partialQueries: 't;tes;test' }));
                done();
            });
        });
        it('should skip similar consecutive partial queries', function (done) {
            test.env.usageAnalytics.getTopQueries = jasmine.createSpy('topQuery');
            test.env.usageAnalytics.getTopQueries.and.returnValue(new Promise(function (resolve) {
                resolve(['foo', 'bar', 'baz']);
            }));
            Simulate_1.Simulate.populateOmnibox(test.env, {
                completeQueryExpression: {
                    word: 't',
                    regex: /t/
                }
            });
            Simulate_1.Simulate.populateOmnibox(test.env, {
                completeQueryExpression: {
                    word: 't',
                    regex: /t/
                }
            });
            var simulation = Simulate_1.Simulate.populateOmnibox(test.env, {
                completeQueryExpression: {
                    word: 't',
                    regex: /t/
                }
            });
            simulation.rows[0].deferred.then(function (elementResolved) {
                test.cmp.selectSuggestion(0);
                expect(test.env.usageAnalytics.logSearchEvent).toHaveBeenCalledWith(AnalyticsActionListMeta_1.analyticsActionCauseList.omniboxAnalytics, jasmine.objectContaining({ partialQueries: 't' }));
                done();
            });
        });
        it('should clean the ; char in partial queries', function (done) {
            test.env.usageAnalytics.getTopQueries = jasmine.createSpy('topQuery');
            test.env.usageAnalytics.getTopQueries.and.returnValue(new Promise(function (resolve) {
                resolve(['foo', 'bar', 'baz']);
            }));
            var simulation = Simulate_1.Simulate.populateOmnibox(test.env, {
                completeQueryExpression: {
                    word: 't;',
                    regex: /t;/
                }
            });
            simulation.rows[0].deferred.then(function (elementResolved) {
                test.cmp.selectSuggestion(0);
                expect(test.env.usageAnalytics.logSearchEvent).toHaveBeenCalledWith(AnalyticsActionListMeta_1.analyticsActionCauseList.omniboxAnalytics, jasmine.objectContaining({ partialQueries: 't' }));
                done();
            });
        });
        it('should strip very long partial queries to stay under 256 char', function (done) {
            test.env.usageAnalytics.getTopQueries = jasmine.createSpy('topQuery');
            test.env.usageAnalytics.getTopQueries.and.returnValue(new Promise(function (resolve) {
                resolve(['foo', 'bar', 'baz']);
            }));
            var simulation = Simulate_1.Simulate.populateOmnibox(test.env, {
                completeQueryExpression: {
                    word: _.range(0, 500).join(''),
                    regex: /t;/
                }
            });
            simulation.rows[0].deferred.then(function (elementResolved) {
                test.cmp.selectSuggestion(0);
                expect(test.env.usageAnalytics.logSearchEvent).toHaveBeenCalledWith(AnalyticsActionListMeta_1.analyticsActionCauseList.omniboxAnalytics, jasmine.anything());
                done();
            });
        });
        describe('exposes options', function () {
            it('omniboxZIndex should be taken into account', function (done) {
                test = Mock.optionsComponentSetup(AnalyticsSuggestions_1.AnalyticsSuggestions, {
                    omniboxZIndex: 333
                });
                test.env.usageAnalytics.getTopQueries = jasmine.createSpy('topQuery');
                test.env.usageAnalytics.getTopQueries.and.returnValue(new Promise(function (resolve) {
                    resolve(['foo', 'bar', 'baz']);
                }));
                var simulation = Simulate_1.Simulate.populateOmnibox(test.env, {
                    completeQueryExpression: {
                        word: _.range(0, 500).join(''),
                        regex: /t;/
                    }
                });
                simulation.rows[0].deferred.then(function (elementResolved) {
                    expect(elementResolved.zIndex).toBe(333);
                    done();
                });
            });
            it('numberOfSuggestions should be taken into account', function () {
                test = Mock.optionsComponentSetup(AnalyticsSuggestions_1.AnalyticsSuggestions, {
                    numberOfSuggestions: 333
                });
                Simulate_1.Simulate.populateOmnibox(test.env);
                expect(test.env.usageAnalytics.getTopQueries).toHaveBeenCalledWith(jasmine.objectContaining({ pageSize: 333 }));
            });
        });
    });
}
exports.AnalyticsSuggestionsTest = AnalyticsSuggestionsTest;
 
 
/***/ }),
/* 1595 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        Iif (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            Iif (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
            Iif (y = 0, t) op = [0, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    Eif (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        Iif (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
Object.defineProperty(exports, "__esModule", { value: true });
var Mock = __webpack_require__(2);
var Analytics_1 = __webpack_require__(178);
var SearchEndpoint_1 = __webpack_require__(61);
var Simulate_1 = __webpack_require__(15);
var AnalyticsActionListMeta_1 = __webpack_require__(7);
var NoopAnalyticsClient_1 = __webpack_require__(114);
var LiveAnalyticsClient_1 = __webpack_require__(229);
var MultiAnalyticsClient_1 = __webpack_require__(649);
var Core_1 = __webpack_require__(9);
function AnalyticsTest() {
    var _this = this;
    describe('Analytics', function () {
        var options = {};
        var test;
        function initAnalytics() {
            test = Mock.optionsComponentSetup(Analytics_1.Analytics, options);
        }
        beforeEach(function () {
            options = {};
            SearchEndpoint_1.SearchEndpoint.endpoints['default'] = new SearchEndpoint_1.SearchEndpoint({
                accessToken: 'some token',
                queryStringArguments: { organizationId: 'organization' },
                restUri: 'some/uri'
            });
        });
        afterEach(function () {
            SearchEndpoint_1.SearchEndpoint.endpoints['default'] = null;
            test = null;
        });
        describe('with an endpoint configured directly on the search interface', function () {
            beforeEach(function () {
                test = Mock.advancedComponentSetup(Analytics_1.Analytics, new Mock.AdvancedComponentSetupOptions(null, null, function (env) {
                    env.searchInterface.options.endpoint = new SearchEndpoint_1.SearchEndpoint({
                        accessToken: 'another token',
                        queryStringArguments: { organizationId: 'another organization' },
                        restUri: 'another/uri'
                    });
                    return env;
                }));
            });
            it('uses access token from the endpoint set on the search interface', function () {
                expect(test.cmp.options.token).toBe('another token');
            });
            it('uses organization from the endpoint set on the search interface', function () {
                expect(test.cmp.options.organization).toBe('another organization');
            });
        });
        describe('with default setup', function () {
            beforeEach(function () {
                SearchEndpoint_1.SearchEndpoint.endpoints['default'] = new SearchEndpoint_1.SearchEndpoint({
                    accessToken: 'some token',
                    queryStringArguments: { organizationId: 'organization' },
                    restUri: 'some/uri',
                    renewAccessToken: function () { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
                        return [2 /*return*/, 'a renewed token'];
                    }); }); }
                });
                test = Mock.basicComponentSetup(Analytics_1.Analytics);
            });
            afterEach(function () {
                test = null;
            });
            it('disable if navigator.doNotTrack is used', function () {
                test = Mock.basicComponentSetup(Analytics_1.Analytics);
                Simulate_1.Simulate.doNoTrack = '1';
                Simulate_1.Simulate.initialization(test.env);
                expect(test.cmp.client instanceof NoopAnalyticsClient_1.NoopAnalyticsClient).toBe(true);
                expect(test.cmp.disabled).toBe(true);
                Simulate_1.Simulate.doNoTrack = undefined;
            });
            it('use URL from default endpoint if not specified', function () {
                expect(test.cmp.options.endpoint).toBe(SearchEndpoint_1.SearchEndpoint.endpoints['default'].options.restUri + '/rest/ua');
            });
            it('use access token from default endpoint if not specified', function () {
                expect(test.cmp.options.token).toBe('some token');
                expect(test.cmp.client.endpoint.endpointCaller.options.accessToken).toBe('some token');
            });
            it('renews the token correctly', function (done) {
                SearchEndpoint_1.SearchEndpoint.endpoints['default'].accessToken.doRenew().then(function () {
                    expect(test.cmp.options.token).toBe('a renewed token');
                    expect(test.cmp.client.endpoint.endpointCaller.options.accessToken).toBe('a renewed token');
                    done();
                });
            });
            it('uses organization from default endpoint if not specified', function () {
                expect(test.cmp.options.organization).toBe('organization');
            });
            it('uses organization from options when specified', function () {
                options.organization = 'orgFromOptions';
                initAnalytics();
                expect(test.cmp.options.organization).toBe('orgFromOptions');
            });
            it('log an event on query error', function () {
                spyOn(test.cmp.client, 'logCustomEvent');
                Simulate_1.Simulate.query(test.env, {
                    error: {
                        message: 'oops',
                        type: 'pretty bad',
                        name: 'oops pretty bad'
                    }
                });
                expect(test.cmp.client.logCustomEvent).toHaveBeenCalledWith(AnalyticsActionListMeta_1.analyticsActionCauseList.queryError, jasmine.any(Object), jasmine.any(HTMLElement));
            });
            describe('using the static create call', function () {
                var env;
                var analytics;
                beforeEach(function () {
                    env = new Mock.MockEnvironmentBuilder().build();
                    env.usageAnalytics = null;
                    analytics = document.createElement('div');
                    analytics.className = 'CoveoAnalytics';
                });
                afterEach(function () {
                    env = null;
                    analytics = null;
                });
                it('should be Noop if not present in the interface', function () {
                    expect(Analytics_1.Analytics.create(env.root, undefined, env) instanceof NoopAnalyticsClient_1.NoopAnalyticsClient).toBe(true);
                });
                it('should be a LiveAnalyticsClient if present inside the interface', function () {
                    env.root.appendChild(analytics);
                    expect(Analytics_1.Analytics.create(env.root, undefined, env) instanceof LiveAnalyticsClient_1.LiveAnalyticsClient).toBe(true);
                });
                it('should be a LiveAnalyticsClient if present outside the interface', function () {
                    analytics.appendChild(env.root);
                    expect(Analytics_1.Analytics.create(env.root, undefined, env) instanceof LiveAnalyticsClient_1.LiveAnalyticsClient).toBe(true);
                });
                it('should be a MultiAnalyticsClient if present inside the interface multiple time', function () {
                    var analytics2 = document.createElement('div');
                    analytics2.className = 'CoveoAnalytics';
                    env.root.appendChild(analytics);
                    env.root.appendChild(analytics2);
                    expect(Analytics_1.Analytics.create(env.root, undefined, env) instanceof MultiAnalyticsClient_1.MultiAnalyticsClient).toBe(true);
                });
                it('should be a MultiAnalyticsClient if present both inside and outside', function () {
                    var analytics2 = document.createElement('div');
                    analytics2.className = 'CoveoAnalytics';
                    env.root.appendChild(analytics2);
                    analytics.appendChild(env.root);
                    expect(Analytics_1.Analytics.create(env.root, undefined, env) instanceof MultiAnalyticsClient_1.MultiAnalyticsClient).toBe(true);
                });
                it('should be a LiveAnalyticsClient if present outside the interface, shared between multiple interface', function () {
                    var env2 = new Mock.MockEnvironmentBuilder().build();
                    analytics.appendChild(env.root);
                    analytics.appendChild(env2.root);
                    var client = Analytics_1.Analytics.create(env.root, undefined, env);
                    var client2 = Analytics_1.Analytics.create(env2.root, undefined, env);
                    expect(client instanceof LiveAnalyticsClient_1.LiveAnalyticsClient).toBe(true);
                    expect(client2 instanceof LiveAnalyticsClient_1.LiveAnalyticsClient).toBe(true);
                    expect(client).toBe(client2);
                });
                it('should be LiveAnalyticsClient if present inside the interface, and NoopAnalyticsClient for another interface with no analytics', function () {
                    var env2 = new Mock.MockEnvironmentBuilder().build();
                    env.root.appendChild(analytics);
                    expect(Analytics_1.Analytics.create(env.root, undefined, env) instanceof LiveAnalyticsClient_1.LiveAnalyticsClient).toBe(true);
                    expect(Analytics_1.Analytics.create(env2.root, undefined, env2) instanceof NoopAnalyticsClient_1.NoopAnalyticsClient).toBe(true);
                });
            });
            describe('with data layer in page', function () {
                var defaultDataLayerName = 'dataLayer';
                var customDataLayerName = 'myDataLayer';
                var data = {
                    event: 'CoveoCustomEvent',
                    coveoAnalyticsEventData: {
                        language: 'en',
                        device: 'test device',
                        searchInterface: 'test interface',
                        searchHub: 'test searchHub',
                        responseTime: 100,
                        actionType: 'testActionType',
                        actionCause: 'testActionCause',
                        customMetadatas: { testKey: 'testValue' }
                    }
                };
                beforeEach(function () {
                    window[defaultDataLayerName] = [];
                    window[customDataLayerName] = [];
                });
                afterEach(function () {
                    delete window[customDataLayerName];
                    delete window[defaultDataLayerName];
                });
                it('should not automatically attempt to push to data layer if autoPushToGtmDataLayer is false', function () {
                    test = Mock.basicComponentSetup(Analytics_1.Analytics);
                    spyOn(test.cmp, 'pushToGtmDataLayer');
                    Core_1.$$(test.env.root).trigger(Core_1.AnalyticsEvents.analyticsEventReady, data);
                    expect(test.cmp.pushToGtmDataLayer).not.toHaveBeenCalled();
                });
                it('should not automatically attempt to push to data layer if autoPushToGtmDataLayer is true and gtmDataLayerName is the empty string', function () {
                    options = {
                        autoPushToGtmDataLayer: true,
                        gtmDataLayerName: ''
                    };
                    initAnalytics();
                    spyOn(test.cmp, 'pushToGtmDataLayer');
                    Core_1.$$(test.env.root).trigger(Core_1.AnalyticsEvents.analyticsEventReady, data);
                    expect(test.cmp.pushToGtmDataLayer).not.toHaveBeenCalled();
                });
                it('should not automatically attempt to push to data layer if autoPushToGtmDataLayer is true and data layer is undefined', function () {
                    options = {
                        autoPushToGtmDataLayer: true,
                        gtmDataLayerName: 'myImaginaryDataLayer'
                    };
                    initAnalytics();
                    spyOn(test.cmp, 'pushToGtmDataLayer');
                    Core_1.$$(test.env.root).trigger(Core_1.AnalyticsEvents.analyticsEventReady, data);
                    expect(test.cmp.pushToGtmDataLayer).not.toHaveBeenCalled();
                });
                it('should automatically attempt to push to data layer if autoPushToGtmDataLayer is true and gtmDataLayerName is unspecified', function () {
                    options = { autoPushToGtmDataLayer: true };
                    initAnalytics();
                    spyOn(test.cmp, 'pushToGtmDataLayer');
                    Core_1.$$(test.env.root).trigger(Core_1.AnalyticsEvents.analyticsEventReady, data);
                    expect(test.cmp.pushToGtmDataLayer).toHaveBeenCalledWith(data);
                });
                it('should automatically attempt to push to data layer if autoPushToGtmDataLayer is true and gtmDataLayerName is specified', function () {
                    options = {
                        autoPushToGtmDataLayer: true,
                        gtmDataLayerName: customDataLayerName
                    };
                    initAnalytics();
                    spyOn(test.cmp, 'pushToGtmDataLayer');
                    Core_1.$$(test.env.root).trigger(Core_1.AnalyticsEvents.analyticsEventReady, data);
                    expect(test.cmp.pushToGtmDataLayer).toHaveBeenCalledWith(data);
                });
                it('can push to valid default gtmDataLayerName, even if autoPushToGtmDataLayer is false', function () {
                    options = { autoPushToGtmDataLayer: false };
                    initAnalytics();
                    test.cmp.pushToGtmDataLayer.call(test.cmp, data);
                    expect(window[defaultDataLayerName][0]).toBe(data);
                });
                it('can push to valid specified gtmDataLayerName, even if autoPushToGtmDataLayer is false', function () {
                    options = {
                        autoPushToGtmDataLayer: false,
                        gtmDataLayerName: customDataLayerName
                    };
                    initAnalytics();
                    test.cmp.pushToGtmDataLayer.call(test.cmp, data);
                    expect(window[customDataLayerName][0]).toBe(data);
                });
                it('should catch error when pushing to invalid data layer', function () {
                    options = {
                        autoPushToGtmDataLayer: false,
                        gtmDataLayerName: 'myImaginaryDataLayer'
                    };
                    initAnalytics();
                    test.cmp.pushToGtmDataLayer.call(test.cmp, data);
                    expect(function () {
                        test.cmp.pushToGtmDataLayer.call(test.cmp, data);
                    }).not.toThrow();
                });
            });
            describe('exposes options', function () {
                function analyticsClient() {
                    return test.cmp.client;
                }
                it('user can be specified', function () {
                    options = { user: 'foobar' };
                    initAnalytics();
                    expect(analyticsClient().userId).toBe('foobar');
                });
                it('userdisplayname can be specified', function () {
                    options = { userDisplayName: 'foobar' };
                    initAnalytics();
                    expect(analyticsClient().userDisplayName).toBe('foobar');
                });
                it('token can be specified', function () {
                    options = { token: 'qwerty123' };
                    initAnalytics();
                    expect(analyticsClient().endpoint.endpointCaller.options.accessToken).toBe('qwerty123');
                });
                it("when a legacy usage analytics endpoint is defined that does not end with /rest,\n        it ensures the endpoint ends with /rest", function () {
                    var endpoint = 'https://usageanalyticshipaa.cloud.coveo.com';
                    options = { endpoint: endpoint };
                    initAnalytics();
                    expect(test.cmp.options.endpoint).toBe(endpoint + "/rest");
                });
                it("when a non-legacy endpoint is defined (i.e. not usageanalytics), it is not modified", function () {
                    var endpoint = 'https://platformhipaa.cloud.coveo.com/rest/ua';
                    options = { endpoint: endpoint };
                    initAnalytics();
                    expect(test.cmp.options.endpoint).toBe(endpoint);
                });
                it("when an endpoint is defined that ends with /rest,\n        it does not append a second /rest", function () {
                    var endpoint = 'somewhere.com/rest';
                    options = { endpoint: endpoint };
                    initAnalytics();
                    expect(test.cmp.options.endpoint).toBe(endpoint);
                });
                it('anonymous can be specified', function () {
                    options = { anonymous: true };
                    initAnalytics();
                    expect(analyticsClient().anonymous).toBe(true);
                });
                it('searchHub can be specified', function () {
                    options = { searchHub: 'foobar' };
                    initAnalytics();
                    expect(analyticsClient().originLevel1).toBe('foobar');
                });
                it('searchhub will be put in the query params', function () {
                    options = { searchHub: 'yoo' };
                    initAnalytics();
                    var simulation = Simulate_1.Simulate.query(test.env);
                    expect(simulation.queryBuilder.build().searchHub).toBe('yoo');
                });
                it('searchhub will be put in the query params even when Analytics are disabled', function () {
                    options = { searchHub: 'still here' };
                    initAnalytics();
                    test.cmp.disable();
                    var simulation = Simulate_1.Simulate.query(test.env);
                    expect(simulation.queryBuilder.build().searchHub).toBe('still here');
                });
                it("searchhub should be put in the component options model for other component to see it's value", function () {
                    options = { searchHub: 'mama mia' };
                    initAnalytics();
                    expect(test.env.componentOptionsModel.set).toHaveBeenCalledWith('searchHub', 'mama mia');
                });
                it('splitTestRunName can be specified', function () {
                    options = { splitTestRunName: 'foobar' };
                    initAnalytics();
                    expect(analyticsClient().splitTestRunName).toBe('foobar');
                });
                it('splitTestRunVersion can be specified', function () {
                    options = { splitTestRunVersion: 'foobar' };
                    initAnalytics();
                    expect(analyticsClient().splitTestRunVersion).toBe('foobar');
                });
            });
        });
    });
}
exports.AnalyticsTest = AnalyticsTest;
 
 
/***/ }),
/* 1596 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { Iif (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        Iif (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            Iif (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
            Iif (y = 0, t) op = [0, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    Eif (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        Iif (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
Object.defineProperty(exports, "__esModule", { value: true });
var Mock = __webpack_require__(2);
var AuthenticationProvider_1 = __webpack_require__(665);
var ExternalModulesShim_1 = __webpack_require__(39);
var QueryEvents_1 = __webpack_require__(14);
var SettingsEvents_1 = __webpack_require__(66);
var Strings_1 = __webpack_require__(4);
var Dom_1 = __webpack_require__(0);
var MissingAuthenticationError_1 = __webpack_require__(466);
var _ = __webpack_require__(1);
var BaseModules_1 = __webpack_require__(464);
var EventsModules_1 = __webpack_require__(109);
var QueryStateModel_1 = __webpack_require__(17);
var UtilsModules_1 = __webpack_require__(67);
function AuthenticationProviderTest() {
    describe('AuthenticationProvider', function () {
        var _this = this;
        var organizationId = 'testorganization';
        var accessTokenStorageKey = "coveo-auth-provider-access-token-" + organizationId;
        var initializationArgs;
        var options;
        var test;
        function initAuthenticationProvider() {
            test = Mock.optionsComponentSetup(AuthenticationProvider_1.AuthenticationProvider, options);
        }
        function setDataTab(el, tab) {
            Dom_1.$$(el).setAttribute('data-tab', tab);
        }
        function triggerAfterComponentsInitialization() {
            Dom_1.$$(test.env.root).trigger(EventsModules_1.InitializationEvents.afterComponentsInitialization, initializationArgs);
        }
        function setupEndpoint() {
            var endpoint = new BaseModules_1.SearchEndpoint({
                restUri: 'https://platform.cloud.coveo.com/rest/search',
                queryStringArguments: { organizationId: organizationId }
            });
            test.env.queryController.getEndpoint = function () { return endpoint; };
        }
        beforeEach(function () {
            window.location.hash = '';
            localStorage.clear();
            initializationArgs = {
                defer: []
            };
            options = {
                name: 'foo',
                caption: 'foobar',
                useIFrame: true
            };
            spyOn(ExternalModulesShim_1.ModalBox, 'open').and.callFake(function () { });
            spyOn(ExternalModulesShim_1.ModalBox, 'close').and.callFake(function () { });
            initAuthenticationProvider();
        });
        afterEach(function () {
            test = null;
        });
        it("local storage contains an access token,\n    when components have initialized, it updates the endpoint to use the access token", function () {
            var accessToken = 'access-token';
            localStorage.setItem(accessTokenStorageKey, accessToken);
            initAuthenticationProvider();
            setupEndpoint();
            var spy = spyOn(test.cmp.queryController.getEndpoint().accessToken, 'updateToken');
            triggerAfterComponentsInitialization();
            expect(spy).toHaveBeenCalledWith(accessToken);
        });
        it("local storage contains an access token,\n    auth provider has a data-tab configured,\n    when components have initialized,\n    it updates the endpoint to use the access token", function () {
            var accessToken = 'access-token';
            localStorage.setItem(accessTokenStorageKey, accessToken);
            initAuthenticationProvider();
            setDataTab(test.cmp.element, 'a');
            setupEndpoint();
            var spy = spyOn(test.cmp.queryController.getEndpoint().accessToken, 'updateToken');
            triggerAfterComponentsInitialization();
            expect(spy).toHaveBeenCalledWith(accessToken);
        });
        describe("url hash contains a handshake token, when components have initialized", function () {
            var handshakeToken = '04212242-fd27-4825-be27-53844ed83ac9';
            var accessToken = 'access-token';
            var exchangeTokenSpy;
            beforeEach(function () {
                window.location.hash = "handshake_token=" + handshakeToken;
                AuthenticationProvider_1.AuthenticationProvider.handshakeInProgress = false;
                initAuthenticationProvider();
                setupEndpoint();
                exchangeTokenSpy = spyOn(test.cmp.queryController.getEndpoint(), 'exchangeHandshakeToken');
                exchangeTokenSpy.and.returnValue(Promise.resolve(accessToken));
            });
            it('sets the handshake-in-progress flag to true', function () {
                triggerAfterComponentsInitialization();
                expect(AuthenticationProvider_1.AuthenticationProvider.handshakeInProgress).toBe(true);
            });
            it('exchanges the token', function () {
                triggerAfterComponentsInitialization();
                expect(exchangeTokenSpy).toHaveBeenCalledWith({ handshakeToken: handshakeToken });
            });
            it("when an accessToken is found in localstorage,\n      it sends both the accessToken and handshake token", function () {
                var accessToken = 'access-token';
                localStorage.setItem(accessTokenStorageKey, accessToken);
                triggerAfterComponentsInitialization();
                expect(exchangeTokenSpy).toHaveBeenCalledWith({ handshakeToken: handshakeToken, accessToken: accessToken });
            });
            it("url hash starts with / followed by #handshake_token param,\n      it exchanges the token", function () {
                // Angular by default adds a / between the hash and the hash parameters.
                window.location.hash = "/handshake_token=" + handshakeToken;
                triggerAfterComponentsInitialization();
                expect(exchangeTokenSpy).toHaveBeenCalledWith({ handshakeToken: handshakeToken });
            });
            it("url hash contains multiple params including an #handshake_token param,\n      it exchanges the token", function () {
                window.location.hash = "a=b&handshake_token=" + handshakeToken;
                triggerAfterComponentsInitialization();
                expect(exchangeTokenSpy).toHaveBeenCalledWith({ handshakeToken: handshakeToken });
            });
            describe("url hash contains an active tab and a handshake token param,\n      auth provider data-tab does not match the active tab", function () {
                beforeEach(function () {
                    window.location.hash = QueryStateModel_1.QUERY_STATE_ATTRIBUTES.T + "=a&handshake_token=" + handshakeToken;
                    setDataTab(test.cmp.element, 'b');
                });
                it("does not exchange the handshake token", function () {
                    triggerAfterComponentsInitialization();
                    expect(exchangeTokenSpy).not.toHaveBeenCalled();
                });
                it('does not load an existing access token', function () {
                    // Ensures that the AuthenticationProvider that is performing the exchange is using the
                    // initially configured API key, not an access token loaded by a different instance.
                    localStorage.setItem(accessTokenStorageKey, 'access-token');
                    var spy = spyOn(test.cmp.queryController.getEndpoint().accessToken, 'updateToken');
                    triggerAfterComponentsInitialization();
                    expect(spy).not.toHaveBeenCalled();
                });
            });
            it("url hash contains an active tab and a handshake token param,\n      auth provider data-tab does not match the active tab,\n      it does not exchange the token", function () {
                window.location.hash = QueryStateModel_1.QUERY_STATE_ATTRIBUTES.T + "=a&handshake_token=" + handshakeToken;
                setDataTab(test.cmp.element, 'b');
                triggerAfterComponentsInitialization();
                expect(exchangeTokenSpy).not.toHaveBeenCalled();
            });
            it("url hash contains an active tab and a handshake token param,\n      auth provider data-tab matches the active tab,\n      it exchanges the token", function () {
                window.location.hash = QueryStateModel_1.QUERY_STATE_ATTRIBUTES.T + "=a&handshake_token=" + handshakeToken;
                setDataTab(test.cmp.element, 'a');
                Dom_1.$$(test.cmp.element).setAttribute('data-tab', 'a');
                triggerAfterComponentsInitialization();
                expect(exchangeTokenSpy).toHaveBeenCalledWith({ handshakeToken: handshakeToken });
            });
            it("url hash contains an #handshake_token with encoded characters,\n      it decodes the token before exchanging it", function () {
                var token = 'test%3Etoken';
                window.location.hash = "handshake_token=" + token;
                triggerAfterComponentsInitialization();
                expect(exchangeTokenSpy).toHaveBeenCalledWith({ handshakeToken: 'test>token' });
            });
            it('adds an entry to the initialization args #defer array', function () {
                triggerAfterComponentsInitialization();
                expect(initializationArgs.defer.length).toBe(1);
            });
            it('adds the access token to local storage', function (done) { return __awaiter(_this, void 0, void 0, function () {
                var token;
                return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0:
                            triggerAfterComponentsInitialization();
                            return [4 /*yield*/, UtilsModules_1.Utils.resolveAfter(0)];
                        case 1:
                            _a.sent();
                            token = localStorage.getItem(accessTokenStorageKey);
                            expect(token).toBe(accessToken);
                            done();
                            return [2 /*return*/];
                    }
                });
            }); });
            it('sets the handshake-in-progress flag to false', function (done) { return __awaiter(_this, void 0, void 0, function () {
                return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0:
                            triggerAfterComponentsInitialization();
                            return [4 /*yield*/, UtilsModules_1.Utils.resolveAfter(0)];
                        case 1:
                            _a.sent();
                            expect(AuthenticationProvider_1.AuthenticationProvider.handshakeInProgress).toBe(false);
                            done();
                            return [2 /*return*/];
                    }
                });
            }); });
            it('it removes the handshake token from the url', function (done) { return __awaiter(_this, void 0, void 0, function () {
                return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0:
                            window.location.hash = "a=b&handshake_token=" + handshakeToken;
                            triggerAfterComponentsInitialization();
                            return [4 /*yield*/, UtilsModules_1.Utils.resolveAfter(0)];
                        case 1:
                            _a.sent();
                            expect(window.location.hash).toBe("#a=b");
                            done();
                            return [2 /*return*/];
                    }
                });
            }); });
            it('when the hash starts with a /, it removes the handshake token from the url but keeps the slash', function (done) { return __awaiter(_this, void 0, void 0, function () {
                return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0:
                            window.location.hash = "/handshake_token=" + handshakeToken;
                            triggerAfterComponentsInitialization();
                            return [4 /*yield*/, UtilsModules_1.Utils.resolveAfter(0)];
                        case 1:
                            _a.sent();
                            expect(window.location.hash).toBe("#/");
                            done();
                            return [2 /*return*/];
                    }
                });
            }); });
            it('when the handshake token is between two parameters, it removes the handshake token correctly', function (done) { return __awaiter(_this, void 0, void 0, function () {
                return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0:
                            window.location.hash = "/a=b&handshake_token=" + handshakeToken + "&c=d";
                            triggerAfterComponentsInitialization();
                            return [4 /*yield*/, UtilsModules_1.Utils.resolveAfter(0)];
                        case 1:
                            _a.sent();
                            expect(window.location.hash).toBe("#/a=b&c=d");
                            done();
                            return [2 /*return*/];
                    }
                });
            }); });
            it('when the hash starts with a /, it removes the handshake token from the url but keeps the slash', function (done) { return __awaiter(_this, void 0, void 0, function () {
                return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0:
                            window.location.hash = "/a=b&handshake_token=" + handshakeToken;
                            triggerAfterComponentsInitialization();
                            return [4 /*yield*/, UtilsModules_1.Utils.resolveAfter(0)];
                        case 1:
                            _a.sent();
                            expect(window.location.hash).toBe("#/a=b");
                            done();
                            return [2 /*return*/];
                    }
                });
            }); });
            it('updates the endpoint to use the access token', function (done) { return __awaiter(_this, void 0, void 0, function () {
                var spy;
                return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0:
                            spy = spyOn(test.cmp.queryController.getEndpoint().accessToken, 'updateToken');
                            triggerAfterComponentsInitialization();
                            return [4 /*yield*/, UtilsModules_1.Utils.resolveAfter(0)];
                        case 1:
                            _a.sent();
                            expect(spy).toHaveBeenCalledWith(accessToken);
                            done();
                            return [2 /*return*/];
                    }
                });
            }); });
        });
        describe('url hash contains a handshake token, when the exchange throws an error', function () {
            var errorMessage = 'unable to exchange token';
            var exchangeTokenSpy;
            beforeEach(function () {
                window.location.hash = "handshake_token=token";
                initAuthenticationProvider();
                setupEndpoint();
                exchangeTokenSpy = spyOn(test.cmp.queryController.getEndpoint(), 'exchangeHandshakeToken');
                exchangeTokenSpy.and.returnValue(Promise.reject(errorMessage));
            });
            it("it logs an error", function (done) { return __awaiter(_this, void 0, void 0, function () {
                var logggerSpy;
                return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0:
                            logggerSpy = spyOn(test.cmp.logger, 'error');
                            triggerAfterComponentsInitialization();
                            return [4 /*yield*/, UtilsModules_1.Utils.resolveAfter(0)];
                        case 1:
                            _a.sent();
                            expect(logggerSpy).toHaveBeenCalledWith(errorMessage);
                            done();
                            return [2 /*return*/];
                    }
                });
            }); });
            it('sets the handshake-in-progress flag to false', function (done) { return __awaiter(_this, void 0, void 0, function () {
                return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0:
                            triggerAfterComponentsInitialization();
                            return [4 /*yield*/, UtilsModules_1.Utils.resolveAfter(0)];
                        case 1:
                            _a.sent();
                            expect(AuthenticationProvider_1.AuthenticationProvider.handshakeInProgress).toBe(false);
                            done();
                            return [2 /*return*/];
                    }
                });
            }); });
        });
        describe("a handshake is in progress", function () {
            var accessToken = 'access-token';
            beforeEach(function () {
                AuthenticationProvider_1.AuthenticationProvider.handshakeInProgress = true;
                initAuthenticationProvider();
                setupEndpoint();
            });
            it('when the handshake completes, it loads the access token', function (done) { return __awaiter(_this, void 0, void 0, function () {
                var spy;
                return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0:
                            jasmine.clock().install();
                            spy = spyOn(test.cmp.queryController.getEndpoint().accessToken, 'updateToken');
                            triggerAfterComponentsInitialization();
                            jasmine.clock().tick(500);
                            localStorage.setItem(accessTokenStorageKey, accessToken);
                            AuthenticationProvider_1.AuthenticationProvider.handshakeInProgress = false;
                            jasmine.clock().tick(100);
                            jasmine.clock().uninstall();
                            return [4 /*yield*/, UtilsModules_1.Utils.resolveAfter(0)];
                        case 1:
                            _a.sent();
                            expect(spy).toHaveBeenCalledWith(accessToken);
                            done();
                            return [2 /*return*/];
                    }
                });
            }); });
            it('adds an entry to the initialization args #defer array', function () {
                triggerAfterComponentsInitialization();
                expect(initializationArgs.defer.length).toBe(1);
            });
        });
        describe('when encountering an invalid token error', function () {
            var fakeWindow;
            function triggerInvalidTokenError() {
                var error = { name: 'InvalidTokenException' };
                Dom_1.$$(test.env.root).trigger(QueryEvents_1.QueryEvents.queryError, { error: error });
            }
            function triggerExpiredTokenError() {
                var error = { name: 'ExpiredTokenException' };
                Dom_1.$$(test.env.root).trigger(QueryEvents_1.QueryEvents.queryError, { error: error });
            }
            function triggerInvalidAuthenticationProviderError() {
                var error = { name: 'InvalidAuthenticationProviderException' };
                Dom_1.$$(test.env.root).trigger(QueryEvents_1.QueryEvents.queryError, { error: error });
            }
            beforeEach(function () {
                fakeWindow = Mock.mockWindow();
                test.cmp._window = fakeWindow;
                setupEndpoint();
            });
            describe('if there is an invalid access token in storage', function () {
                beforeEach(function () {
                    localStorage.setItem(accessTokenStorageKey, 'invalid token');
                    triggerInvalidTokenError();
                });
                it('clears the access token from localstorage', function () {
                    expect(localStorage.getItem(accessTokenStorageKey)).toBe(null);
                });
                it('reloads the page', function () {
                    expect(fakeWindow.location.reload).toHaveBeenCalledTimes(1);
                });
            });
            it('if there is no access token in storage, it does not reload the page', function () {
                triggerInvalidTokenError();
                expect(fakeWindow.location.reload).not.toHaveBeenCalled();
            });
            it('if there is an expired access token is in storage, it clears the token', function () {
                localStorage.setItem(accessTokenStorageKey, 'expired token');
                triggerExpiredTokenError();
                expect(localStorage.getItem(accessTokenStorageKey)).toBe(null);
            });
            it('if there is a token with an invalid authentication provider in storage, it clears the token', function () {
                localStorage.setItem(accessTokenStorageKey, 'token with invalid auth provider');
                triggerInvalidAuthenticationProviderError();
                expect(localStorage.getItem(accessTokenStorageKey)).toBe(null);
            });
        });
        describe('exposes options', function () {
            it('name should push name in buildingCallOptions', function () {
                options = { name: 'testpatate' };
                initAuthenticationProvider();
                var eventArgs = {
                    options: {
                        authentication: []
                    }
                };
                Dom_1.$$(test.cmp.root).trigger(QueryEvents_1.QueryEvents.buildingCallOptions, eventArgs);
                expect(eventArgs.options.authentication).toEqual(jasmine.arrayContaining(['testpatate']));
            });
            describe('caption', function () {
                it('should set itself in the menu', function () {
                    var populateMenuArgs = {
                        settings: null,
                        menuData: []
                    };
                    Dom_1.$$(test.cmp.root).trigger(SettingsEvents_1.SettingsEvents.settingsPopulateMenu, populateMenuArgs);
                    expect(populateMenuArgs.menuData).toEqual(jasmine.arrayContaining([
                        jasmine.objectContaining({
                            text: Strings_1.l('Reauthenticate', 'foobar'),
                            className: 'coveo-authentication-provider',
                            onOpen: jasmine.any(Function)
                        })
                    ]));
                });
                it('should be the title of the modal box when iFrame is enabled', function () {
                    Dom_1.$$(test.cmp.root).trigger(QueryEvents_1.QueryEvents.queryError, { error: new MissingAuthenticationError_1.MissingAuthenticationError('foo') });
                    expect(ExternalModulesShim_1.ModalBox.open).toHaveBeenCalledWith(jasmine.anything(), jasmine.objectContaining({
                        title: Strings_1.l('Authenticating', 'foobar')
                    }));
                });
            });
            it('useIFrame set to false should redirect to auth provider URL', function () {
                options = {
                    name: 'foo',
                    caption: 'foobar',
                    useIFrame: false
                };
                initAuthenticationProvider();
                var fakeWindow = Mock.mockWindow();
                test.cmp._window = fakeWindow;
                test.env.searchEndpoint.getAuthenticationProviderUri = function () { return 'coveo.com'; };
                Dom_1.$$(test.env.root).trigger(QueryEvents_1.QueryEvents.queryError, { error: new MissingAuthenticationError_1.MissingAuthenticationError('foo') });
                expect(fakeWindow.location.href).toBe('coveo.com');
            });
            it('useIFrame and showIFrame set to true should display a ModalBox containing iframe', function () {
                options = {
                    name: 'foo',
                    caption: 'foobar',
                    useIFrame: true,
                    showIFrame: true
                };
                initAuthenticationProvider();
                test.env.searchEndpoint.getAuthenticationProviderUri = function () { return 'http://coveo.com/'; };
                Dom_1.$$(test.env.root).trigger(QueryEvents_1.QueryEvents.queryError, { error: new MissingAuthenticationError_1.MissingAuthenticationError('foo') });
                expect(ExternalModulesShim_1.ModalBox.open['calls'].mostRecent().args[0].children[0].src).toBe('http://coveo.com/');
            });
            it('showIFrame set to false should show a waiting popup not containing the iframe', function () {
                options = {
                    name: 'foo',
                    caption: 'foobar',
                    useIFrame: true,
                    showIFrame: false
                };
                initAuthenticationProvider();
                Dom_1.$$(test.env.root).trigger(QueryEvents_1.QueryEvents.queryError, { error: new MissingAuthenticationError_1.MissingAuthenticationError('foo') });
                expect(ExternalModulesShim_1.ModalBox.open).toHaveBeenCalledWith(jasmine.objectContaining({
                    className: 'coveo-waiting-for-authentication-popup'
                }), jasmine.anything());
            });
        });
        it('should stop a redirect loop after 3 redirects', function () {
            spyOn(test.cmp.logger, 'error').and.returnValue(null);
            _.times(3, function () { return Dom_1.$$(test.env.root).trigger(QueryEvents_1.QueryEvents.queryError, { error: { provider: 'foo' } }); });
            Dom_1.$$(test.env.root).trigger(QueryEvents_1.QueryEvents.queryError, { error: new MissingAuthenticationError_1.MissingAuthenticationError('foo') });
            expect(test.cmp.logger.error).toHaveBeenCalledWith('The AuthenticationProvider is in a redirect loop. This may be due to a back-end configuration problem.');
        });
    });
}
exports.AuthenticationProviderTest = AuthenticationProviderTest;
 
 
/***/ }),
/* 1597 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Mock = __webpack_require__(2);
var Badge_1 = __webpack_require__(667);
var Fake_1 = __webpack_require__(11);
var Dom_1 = __webpack_require__(0);
function BadgeTest() {
    describe('Badge', function () {
        var test;
        beforeEach(function () {
            test = Mock.optionsResultComponentSetup(Badge_1.Badge, {
                colors: {
                    icon: '#123',
                    text: '#123456',
                    values: {
                        foo: {
                            icon: 'pink',
                            text: 'black'
                        },
                        bar: {
                            icon: 'blue',
                            text: 'green'
                        }
                    }
                }
            }, Fake_1.FakeResults.createFakeResult());
        });
        afterEach(function () {
            test = null;
        });
        describe('exposes options', function () {
            describe('colors', function () {
                it('should throw an error when trying to initialize with an invalid color format', function () {
                    expect(function () {
                        Mock.advancedResultComponentSetup(Badge_1.Badge, Fake_1.FakeResults.createFakeResult(), {
                            element: Dom_1.$$('span', { 'data-colors': 'I am quite invalid.' }).el
                        });
                    }).toThrow();
                });
                it('should parse the colors using the old format properly', function () {
                    test = Mock.advancedResultComponentSetup(Badge_1.Badge, Fake_1.FakeResults.createFakeResult(), {
                        element: Dom_1.$$('span', { 'data-colors': 'red; foo: green; bar: #123456; foobar: #911' }).el
                    });
                    expect(test.cmp.options.colors.icon).toBe('red');
                    expect(test.cmp.options.colors.values['foo'].icon).toBe('green');
                    expect(test.cmp.options.colors.values['bar'].icon).toBe('#123456');
                    expect(test.cmp.options.colors.values['foobar'].icon).toBe('#911');
                });
                it('should parse the colors using the new JSON format properly', function () {
                    var jsonColors = {
                        icon: 'blue',
                        text: '#c0ffee',
                        values: {
                            foo: {
                                icon: '#facade',
                                text: 'de1e7e'
                            },
                            bar: {
                                icon: '#f00ba2',
                                text: '#123'
                            }
                        }
                    };
                    test = Mock.advancedResultComponentSetup(Badge_1.Badge, Fake_1.FakeResults.createFakeResult(), {
                        element: Dom_1.$$('span', { 'data-colors': JSON.stringify(jsonColors) }).el
                    });
                    expect(test.cmp.options.colors).toEqual(jsonColors);
                });
            });
        });
        it('getColor should return the appropriate color corresponding to the passed field value', function () {
            expect(test.cmp.getColor()).toEqual({ icon: '#123', text: '#123456' });
            expect(test.cmp.getColor('foo')).toEqual({ icon: 'pink', text: 'black' });
            expect(test.cmp.getColor('bar')).toEqual({ icon: 'blue', text: 'green' });
            expect(test.cmp.getColor('I do not exist.')).toEqual({ icon: '#123', text: '#123456' });
        });
        describe('renderOneValue', function () {
            it('should render the proper colors', function () {
                test = Mock.optionsResultComponentSetup(Badge_1.Badge, {
                    colors: {
                        icon: 'white',
                        text: 'black',
                        values: {
                            foo: {
                                icon: '#000000',
                                text: '#FFFFFF'
                            }
                        }
                    }
                }, Fake_1.FakeResults.createFakeResult());
                var defaultValue = test.cmp.renderOneValue('');
                expect(Dom_1.$$(defaultValue).find('span.coveo-badge-icon').style.color).toBe('white');
                expect(Dom_1.$$(defaultValue).find('span.coveo-badge-label').style.color).toBe('black');
                var fooVal = test.cmp.renderOneValue('foo');
                expect(Dom_1.$$(fooVal).find('span.coveo-badge-icon').style.color).toBe('rgb(0, 0, 0)');
                expect(Dom_1.$$(fooVal).find('span.coveo-badge-label').style.color).toBe('rgb(255, 255, 255)');
            });
        });
    });
}
exports.BadgeTest = BadgeTest;
 
 
/***/ }),
/* 1598 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Mock = __webpack_require__(2);
var Breadcrumb_1 = __webpack_require__(668);
var Dom_1 = __webpack_require__(0);
var BreadcrumbEvents_1 = __webpack_require__(33);
var AnalyticsActionListMeta_1 = __webpack_require__(7);
var InitializationEvents_1 = __webpack_require__(22);
var Simulate_1 = __webpack_require__(15);
var Strings_1 = __webpack_require__(4);
function BreadcrumbTest() {
    describe('Breadcrumb', function () {
        var test;
        function initBreadcrumb(props) {
            if (props === void 0) { props = {}; }
            test = Mock.advancedComponentSetup(Breadcrumb_1.Breadcrumb, {
                element: Dom_1.$$('div', props).el,
                cmpOptions: {},
                modifyBuilder: function (env) { return env; },
                merge: function (options) { return options; }
            });
        }
        beforeEach(function () {
            initBreadcrumb();
        });
        afterEach(function () {
            test = null;
        });
        it('is hidden by default', function () {
            expect(test.cmp.element.style.display).toBe('none');
        });
        it('is hidden if there is no breadcrumb items', function () {
            test.cmp.drawBreadcrumb([]);
            expect(test.cmp.element.style.display).toBe('none');
        });
        it('is displayed if there is at least one breadcrumb item', function () {
            test.cmp.drawBreadcrumb([{ element: document.createElement('div') }]);
            expect(test.cmp.element.style.display).not.toBe('none');
            expect(Dom_1.$$(test.cmp.element).findAll('.coveo-breadcrumb-item').length).toBe(1);
        });
        it('should trigger clear all event', function () {
            var onClear = jasmine.createSpy('onPopulate');
            Dom_1.$$(test.env.root).on(BreadcrumbEvents_1.BreadcrumbEvents.clearBreadcrumb, onClear);
            test.cmp.clearBreadcrumbs();
            expect(onClear).toHaveBeenCalledWith(jasmine.any(Object), jasmine.objectContaining({}));
        });
        it('should trigger populate breadcrumb when getting breadcrumb', function () {
            var onPopulate = jasmine.createSpy('onPopulate');
            Dom_1.$$(test.env.root).on(BreadcrumbEvents_1.BreadcrumbEvents.populateBreadcrumb, onPopulate);
            test.cmp.getBreadcrumbs();
            expect(onPopulate).toHaveBeenCalledWith(jasmine.any(Object), jasmine.objectContaining({ breadcrumbs: [] }));
        });
        it('should execute a query after clear', function () {
            test.cmp.clearBreadcrumbs();
            expect(test.env.queryController.executeQuery).toHaveBeenCalled();
        });
        it('should log analytics event after clear', function () {
            test.cmp.clearBreadcrumbs();
            expect(test.env.usageAnalytics.logSearchEvent).toHaveBeenCalledWith(AnalyticsActionListMeta_1.analyticsActionCauseList.breadcrumbResetAll, {});
        });
        it('should have the navigation role by default', function () {
            expect(test.cmp.element.getAttribute('role')).toEqual('navigation');
        });
        it('should have a label by default', function () {
            expect(test.cmp.element.getAttribute('aria-label')).toEqual(Strings_1.l('Breadcrumb'));
        });
        it('should not overwrite a custom role', function () {
            initBreadcrumb({ role: 'test' });
            expect(test.cmp.element.getAttribute('role')).toEqual('test');
            expect(test.cmp.element.getAttribute('aria-label')).toEqual(Strings_1.l('Breadcrumb'));
        });
        it('should not overwrite a custom label', function () {
            initBreadcrumb({ ariaLabel: 'test' });
            expect(test.cmp.element.getAttribute('role')).toEqual('navigation');
            expect(test.cmp.element.getAttribute('aria-label')).toEqual('test');
        });
        describe('when there is a query', function () {
            beforeEach(function () {
                // breadcrumb component is bound after init so as to pass after all other component
                Dom_1.$$(test.env.root).trigger(InitializationEvents_1.InitializationEvents.afterInitialization);
            });
            it('should trigger populate breadcrumb', function () {
                var onPopulate = jasmine.createSpy('onPopulate');
                Dom_1.$$(test.env.root).on(BreadcrumbEvents_1.BreadcrumbEvents.populateBreadcrumb, onPopulate);
                Simulate_1.Simulate.query(test.env);
                expect(onPopulate).toHaveBeenCalledWith(jasmine.any(Object), jasmine.objectContaining({ breadcrumbs: [] }));
            });
            it('should trigger populate breadcrumb on an error', function () {
                var onPopulate = jasmine.createSpy('onPopulate');
                Dom_1.$$(test.env.root).on(BreadcrumbEvents_1.BreadcrumbEvents.populateBreadcrumb, onPopulate);
                Simulate_1.Simulate.queryError(test.env);
                expect(onPopulate).toHaveBeenCalledWith(jasmine.any(Object), jasmine.objectContaining({ breadcrumbs: [] }));
            });
        });
    });
}
exports.BreadcrumbTest = BreadcrumbTest;
 
 
/***/ }),
/* 1599 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Mock = __webpack_require__(2);
var ChatterLikedBy_1 = __webpack_require__(672);
var Fake_1 = __webpack_require__(11);
var ChatterUtils_1 = __webpack_require__(145);
var Dom_1 = __webpack_require__(0);
var Strings_1 = __webpack_require__(4);
function ChatterLikedByTest() {
    describe('ChatterLikedBy', function () {
        var test;
        beforeEach(function () {
            test = null;
        });
        afterEach(function () {
            test = null;
        });
        it('should behave correctly with no data', function () {
            test = Mock.basicResultComponentSetup(ChatterLikedBy_1.ChatterLikedBy);
            expect(test.cmp.element.innerHTML).toBe('');
        });
        it('should behave correctly with a single like', function () {
            var result = Fake_1.FakeResults.createFakeFeedItemResult('token', 1);
            test = Mock.optionsResultComponentSetup(ChatterLikedBy_1.ChatterLikedBy, {}, result);
            expect(Dom_1.$$(test.cmp.element)
                .find('a')
                .getAttribute('href')).toEqual(ChatterUtils_1.ChatterUtils.buildURI(result.clickUri, result.raw.sffeeditemid, result.raw.sflikedbyid));
            expect(Dom_1.$$(Dom_1.$$(test.cmp.element).find('a')).text()).toEqual(result.raw.sflikedby);
        });
        it('should behave correctly with multiple likes', function () {
            var result = Fake_1.FakeResults.createFakeFeedItemResult('token', 2);
            test = Mock.optionsResultComponentSetup(ChatterLikedBy_1.ChatterLikedBy, {}, result);
            expect(Dom_1.$$(test.cmp.element)
                .find('a')
                .getAttribute('href')).toEqual(ChatterUtils_1.ChatterUtils.buildURI(result.clickUri, result.raw.sffeeditemid, 'LikeId1'));
            expect(Dom_1.$$(Dom_1.$$(test.cmp.element).find('a')).text()).toEqual('LikeName1');
            expect(Dom_1.$$(Dom_1.$$(test.cmp.element).find('span')).text()).toContain("LikeName1 " + Strings_1.l('And').toLowerCase() + " LikeName2");
            expect(Dom_1.$$(test.cmp.element)
                .findAll('a')[1]
                .getAttribute('href')).toEqual(ChatterUtils_1.ChatterUtils.buildURI(result.clickUri, result.raw.sffeeditemid, 'LikeId2'));
            expect(Dom_1.$$(Dom_1.$$(test.cmp.element).findAll('a')[1]).text()).toEqual('LikeName2');
        });
        it('should behave correctly with number of likes greater than max like to show', function () {
            var result = Fake_1.FakeResults.createFakeFeedItemResult('token', 3);
            test = Mock.optionsResultComponentSetup(ChatterLikedBy_1.ChatterLikedBy, { nbLikesToRender: 2 }, result);
            expect(Dom_1.$$(Dom_1.$$(test.cmp.element).findAll('a')[2]).text()).toContain("" + Strings_1.l('Others', (result.raw.sflikecount - 2).toString(), result.raw.sflikecount - 2));
        });
        it('Test behaviour when nbLikeToRender is set to 0 with multiple likes', function () {
            var result = Fake_1.FakeResults.createFakeFeedItemResult('token', 3);
            test = Mock.optionsResultComponentSetup(ChatterLikedBy_1.ChatterLikedBy, { nbLikesToRender: 0 }, result);
            expect(Dom_1.$$(test.cmp.element)
                .findAll('a')[0]
                .getAttribute('href')).toEqual(ChatterUtils_1.ChatterUtils.buildURI(result.clickUri, result.raw.sffeeditemid, 'LikeId1'));
            expect(Dom_1.$$(Dom_1.$$(test.cmp.element).findAll('a')[0]).text()).toEqual('LikeName1');
            expect(Dom_1.$$(Dom_1.$$(test.cmp.element).findAll('span')[1]).text()).toContain(', ');
            expect(Dom_1.$$(test.cmp.element)
                .findAll('a')[1]
                .getAttribute('href')).toContain(ChatterUtils_1.ChatterUtils.buildURI(result.clickUri, result.raw.sffeeditemid, 'LikeId2'));
            expect(Dom_1.$$(Dom_1.$$(test.cmp.element).findAll('a')[1]).text()).toContain('LikeName2');
            expect(Dom_1.$$(Dom_1.$$(test.cmp.element).findAll('span')[2]).text()).toContain(" " + Strings_1.l('And').toLowerCase() + " ");
            expect(Dom_1.$$(test.cmp.element)
                .findAll('a')[2]
                .getAttribute('href')).toContain(ChatterUtils_1.ChatterUtils.buildURI(result.clickUri, result.raw.sffeeditemid, 'LikeId3'));
            expect(Dom_1.$$(Dom_1.$$(test.cmp.element).findAll('a')[2]).text()).toContain('LikeName3');
        });
    });
}
exports.ChatterLikedByTest = ChatterLikedByTest;
 
 
/***/ }),
/* 1600 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Mock = __webpack_require__(2);
var ChatterPostAttachment_1 = __webpack_require__(673);
var Fake_1 = __webpack_require__(11);
var ChatterUtils_1 = __webpack_require__(145);
var Dom_1 = __webpack_require__(0);
var Strings_1 = __webpack_require__(4);
function ChatterPostAttachmentTest() {
    describe('ChatterPostAttachment', function () {
        var test;
        var result;
        var generateResult = function (sfcontentfilename, sftitle, sf_title) {
            result = Fake_1.FakeResults.createFakeFeedItemResult('token', 0, 0, true);
            result.raw.sfcontentfilename = sfcontentfilename;
            result.raw.sftitle = sftitle;
            result.raw.sf_title = sf_title;
            test = Mock.optionsResultComponentSetup(ChatterPostAttachment_1.ChatterPostAttachment, {}, result);
        };
        it('should behave correctly with no data', function () {
            result = Fake_1.FakeResults.createFakeFeedItemResult('token', 0, 0, true);
            test = Mock.optionsResultComponentSetup(ChatterPostAttachment_1.ChatterPostAttachment, {}, result);
            expect(Dom_1.$$(Dom_1.$$(test.cmp.element).find('a')).text()).toContain(result.raw.sfcontentfilename);
            expect(Dom_1.$$(test.cmp.element)
                .find('a')
                .getAttribute('href')).toContain(ChatterUtils_1.ChatterUtils.buildURI(result.clickUri, result.raw.sffeeditemid, result.raw.sfcontentversionid));
        });
        it('should use sfcontentfilename if present', function () {
            generateResult('foo', 'bar', 'baz');
            expect(Dom_1.$$(Dom_1.$$(test.cmp.element).find('a')).text()).toContain(result.raw.sfcontentfilename);
        });
        it('should use sftitle if sfcontentfilename is not present', function () {
            generateResult(undefined, 'bar', 'baz');
            expect(Dom_1.$$(Dom_1.$$(test.cmp.element).find('a')).text()).toContain(result.raw.sftitle);
        });
        it('should use sf_title if sftitle and sfcontentfilename are not present', function () {
            generateResult(undefined, undefined, 'baz');
            expect(Dom_1.$$(Dom_1.$$(test.cmp.element).find('a')).text()).toContain(result.raw.sf_title);
        });
        it('should behave correctly with no filename but with a contentversionid', function () {
            generateResult(undefined, undefined, undefined);
            expect(Dom_1.$$(Dom_1.$$(test.cmp.element).find('a')).text()).toContain(Strings_1.l('ShowAttachment'));
        });
    });
}
exports.ChatterPostAttachmentTest = ChatterPostAttachmentTest;
 
 
/***/ }),
/* 1601 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Mock = __webpack_require__(2);
var ChatterPostedBy_1 = __webpack_require__(674);
var Fake_1 = __webpack_require__(11);
var Strings_1 = __webpack_require__(4);
var ChatterUtils_1 = __webpack_require__(145);
var Dom_1 = __webpack_require__(0);
function ChatterPostedByTest() {
    describe('ChatterPostedBy', function () {
        var test;
        it('should behave correctly with no parameters', function () {
            var result = Fake_1.FakeResults.createFakeFeedItemResult('token');
            result.raw.sfparentid = undefined;
            result.raw.sfparentname = undefined;
            test = Mock.optionsResultComponentSetup(ChatterPostedBy_1.ChatterPostedBy, {}, result);
            expect(Dom_1.$$(Dom_1.$$(test.cmp.element).find('span')).text()).toContain(Strings_1.l('PostedBy') + " ");
            expect(Dom_1.$$(test.cmp.element)
                .find('a')
                .getAttribute('href')).toContain(ChatterUtils_1.ChatterUtils.buildURI(result.clickUri, result.raw.sffeeditemid, result.raw.sfcreatedbyid));
            expect(Dom_1.$$(Dom_1.$$(test.cmp.element).find('a')).text()).toContain(result.raw.sfcreatedby);
        });
        it('should behave correctly with no parameters but with a parent relationship', function () {
            var result = Fake_1.FakeResults.createFakeFeedItemResult('token');
            test = Mock.optionsResultComponentSetup(ChatterPostedBy_1.ChatterPostedBy, {}, result);
            expect(Dom_1.$$(Dom_1.$$(test.cmp.element).findAll('span')[1]).text()).toContain(" " + Strings_1.l('On').toLowerCase() + " ");
            expect(Dom_1.$$(test.cmp.element)
                .findAll('a')[1]
                .getAttribute('href')).toContain(ChatterUtils_1.ChatterUtils.buildURI(result.clickUri, result.raw.sffeeditemid, result.raw.sfparentid));
            expect(Dom_1.$$(Dom_1.$$(test.cmp.element).findAll('a')[1]).text()).toContain(result.raw.sfparentname);
        });
        it('should behave correctly with the enablePostedOn parameter with parent relationship', function () {
            var result = Fake_1.FakeResults.createFakeFeedItemResult('token');
            test = Mock.optionsResultComponentSetup(ChatterPostedBy_1.ChatterPostedBy, { enablePostedOn: false }, result);
            expect(Dom_1.$$(test.cmp.element).findAll('span')[0]).toBeDefined();
            expect(Dom_1.$$(test.cmp.element).findAll('a')[1]).toBeUndefined();
        });
    });
}
exports.ChatterPostedByTest = ChatterPostedByTest;
 
 
/***/ }),
/* 1602 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Mock = __webpack_require__(2);
var NoopComponent_1 = __webpack_require__(207);
var CustomMatchers_1 = __webpack_require__(104);
var Dom_1 = __webpack_require__(0);
var JQueryModule_1 = __webpack_require__(865);
function ComponentEventsTest() {
    describe('ComponentEvent', function () {
        var test;
        var spy;
        beforeEach(function () {
            CustomMatchers_1.registerCustomMatcher();
            test = Mock.basicComponentSetup(NoopComponent_1.NoopComponent);
            spy = jasmine.createSpy('spy');
        });
        afterEach(function () {
            test = null;
            spy = null;
        });
        it('should execute handler if the component is enabled', function () {
            test.cmp.enable();
            test.cmp.bind.onRootElement('foo', spy);
            Dom_1.$$(test.env.root).trigger('foo');
            expect(spy).toHaveBeenCalled();
            Dom_1.$$(test.env.root).trigger('foo', { bar: 'baz' });
            expect(spy).toHaveBeenCalledWith({ bar: 'baz' });
        });
        describe('when jQuery is loaded into the page', function () {
            beforeAll(function () {
                window['Coveo']['$'] = JQueryModule_1.JQuery;
            });
            beforeEach(function () {
                test.cmp.enable();
                test.cmp.bind.on(test.env.root, 'click', spy);
            });
            afterAll(function () {
                window['Coveo']['$'] = undefined;
            });
            it('when triggering a native click without params, it calls the spy with native event as the only parameter', function () {
                test.env.root.click();
                expect(spy).toHaveBeenCalledTimes(1);
                expect(spy.calls.argsFor(0)[0] instanceof MouseEvent).toBeTruthy();
                expect(spy.calls.argsFor(0)[0].type).toBe('click');
            });
            it('when triggering a JQuery click event without params, it calls the spy without any params', function () {
                JQueryModule_1.JQuery(test.env.root).click();
                expect(spy).toHaveBeenCalledTimes(1);
                expect(spy.calls.argsFor(0).length).toBe(0);
            });
            it('when triggering a JQuery click event with a param object, it calls the spy passing the param object', function () {
                JQueryModule_1.JQuery(test.env.root).trigger('click', { bar: 'baz' });
                expect(spy).toHaveBeenCalledTimes(1);
                expect(spy).toHaveBeenCalledWith({ bar: 'baz' });
            });
            describe('when useNativeJavaScriptEvents is set to true', function () {
                beforeEach(function () {
                    Dom_1.Dom.useNativeJavaScriptEvents = true;
                });
                afterEach(function () {
                    Dom_1.Dom.useNativeJavaScriptEvents = null;
                });
                it('handle native events', function () {
                    test.env.root.click();
                    expect(spy).toHaveBeenCalledTimes(1);
                });
                it('handle jQuery events', function () {
                    JQueryModule_1.JQuery(test.env.root).click();
                    expect(spy).toHaveBeenCalled();
                });
                it('allow to trigger event', function () {
                    test.cmp.bind.trigger(test.env.element, 'click');
                    expect(spy).toHaveBeenCalled();
                });
            });
        });
        it('should execute handler only once if the component is enabled', function () {
            test.cmp.enable();
            var spyOnce = jasmine.createSpy('spyOnce');
            test.cmp.bind.onRootElement('foo', spy);
            test.cmp.bind.oneRootElement('foo', spyOnce);
            Dom_1.$$(test.env.root).trigger('foo');
            Dom_1.$$(test.env.root).trigger('foo');
            Dom_1.$$(test.env.root).trigger('foo');
            expect(spy).toHaveBeenCalledTimes(3);
            expect(spyOnce).toHaveBeenCalledTimes(1);
        });
        it('should not execute handler if the component is disabled', function () {
            test.cmp.disable();
            test.cmp.bind.onRootElement('foo', spy);
            Dom_1.$$(test.env.root).trigger('foo');
            expect(spy).not.toHaveBeenCalled();
            Dom_1.$$(test.env.root).trigger('foo', { bar: 'baz' });
            expect(spy).not.toHaveBeenCalledWith({ bar: 'baz' });
        });
        it('should not execute handler only once if the component is disabled', function () {
            test.cmp.disable();
            test.cmp.bind.oneRootElement('foo', spy);
            Dom_1.$$(test.env.root).trigger('foo');
            Dom_1.$$(test.env.root).trigger('foo');
            Dom_1.$$(test.env.root).trigger('foo');
            expect(spy).not.toHaveBeenCalled();
        });
        it('should trigger if the component is enabled', function () {
            test.cmp.enable();
            test.cmp.bind.onRootElement('foo', spy);
            test.cmp.bind.trigger(test.env.root, 'foo');
            expect(spy).toHaveBeenCalled();
            test.cmp.bind.trigger(test.env.root, 'foo', { bar: 'baz' });
            expect(spy).toHaveBeenCalledWith({ bar: 'baz' });
        });
        it('should not trigger if the component is disabled', function () {
            test.cmp.disable();
            Dom_1.$$(test.env.root).on('foo', spy);
            test.cmp.bind.trigger(test.env.root, 'foo');
            expect(spy).not.toHaveBeenCalled();
            test.cmp.bind.trigger(test.env.root, 'foo', { bar: 'baz' });
            expect(spy).not.eventHandlerToHaveBeenCalledWith({ bar: 'baz' });
        });
    });
}
exports.ComponentEventsTest = ComponentEventsTest;
 
 
/***/ }),
/* 1603 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var ComponentOptions_1 = __webpack_require__(13);
var IComponentOptions_1 = __webpack_require__(115);
var TemplateComponentOptions_1 = __webpack_require__(89);
var TemplateCache_1 = __webpack_require__(79);
var Dom_1 = __webpack_require__(0);
function ComponentOptionsTest() {
    describe('ComponentOptions', function () {
        describe('can build', function () {
            it('a boolean option', function () {
                var option = ComponentOptions_1.ComponentOptions.buildBooleanOption();
                expect(option.type).toBe(IComponentOptions_1.ComponentOptionsType.BOOLEAN);
            });
            it('a number option', function () {
                var option = ComponentOptions_1.ComponentOptions.buildNumberOption();
                expect(option.type).toBe(IComponentOptions_1.ComponentOptionsType.NUMBER);
            });
            it('a string option', function () {
                var option = ComponentOptions_1.ComponentOptions.buildStringOption();
                expect(option.type).toBe(IComponentOptions_1.ComponentOptionsType.STRING);
            });
            it('an icon option', function () {
                var option = ComponentOptions_1.ComponentOptions.buildIconOption();
                expect(option.type).toBe(IComponentOptions_1.ComponentOptionsType.ICON);
            });
            it('a helper option', function () {
                var option = ComponentOptions_1.ComponentOptions.buildHelperOption();
                expect(option.type).toBe(IComponentOptions_1.ComponentOptionsType.HELPER);
            });
            it('a json option', function () {
                var option = ComponentOptions_1.ComponentOptions.buildJsonOption();
                expect(option.type).toBe(IComponentOptions_1.ComponentOptionsType.JSON);
            });
            it('a localized string option', function () {
                var option = ComponentOptions_1.ComponentOptions.buildLocalizedStringOption();
                expect(option.type).toBe(IComponentOptions_1.ComponentOptionsType.LOCALIZED_STRING);
            });
            it('a field option', function () {
                var option = ComponentOptions_1.ComponentOptions.buildFieldOption();
                expect(option.type).toBe(IComponentOptions_1.ComponentOptionsType.FIELD);
            });
            it('a fields option', function () {
                var option = ComponentOptions_1.ComponentOptions.buildFieldsOption();
                expect(option.type).toBe(IComponentOptions_1.ComponentOptionsType.FIELDS);
            });
            it('a query expression option', function () {
                var option = ComponentOptions_1.ComponentOptions.buildQueryExpressionOption();
                expect(option.type).toBe(IComponentOptions_1.ComponentOptionsType.QUERY_EXPRESSION);
            });
            it('a list option', function () {
                var option = ComponentOptions_1.ComponentOptions.buildListOption();
                expect(option.type).toBe(IComponentOptions_1.ComponentOptionsType.LIST);
            });
            it('a selector option', function () {
                var option = ComponentOptions_1.ComponentOptions.buildSelectorOption();
                expect(option.type).toBe(IComponentOptions_1.ComponentOptionsType.SELECTOR);
            });
            it('a child html element option', function () {
                var option = ComponentOptions_1.ComponentOptions.buildChildHtmlElementOption();
                expect(option.type).toBe(IComponentOptions_1.ComponentOptionsType.CHILD_HTML_ELEMENT);
            });
            it('a template option', function () {
                var option = TemplateComponentOptions_1.TemplateComponentOptions.buildTemplateOption();
                expect(option.type).toBe(IComponentOptions_1.ComponentOptionsType.TEMPLATE);
            });
            it('a custom string option', function () {
                var option = ComponentOptions_1.ComponentOptions.buildCustomOption(function (value) {
                    return value;
                });
                expect(option.type).toBe(IComponentOptions_1.ComponentOptionsType.STRING);
            });
            it('a custom string list option', function () {
                var option = ComponentOptions_1.ComponentOptions.buildCustomListOption(function (value) {
                    return value.join(', ');
                });
                expect(option.type).toBe(IComponentOptions_1.ComponentOptionsType.LIST);
            });
            it('an object option', function () {
                var option = ComponentOptions_1.ComponentOptions.buildObjectOption();
                expect(option.type).toBe(IComponentOptions_1.ComponentOptionsType.OBJECT);
            });
            it('a JSON object option', function () {
                var option = ComponentOptions_1.ComponentOptions.buildJsonObjectOption();
                expect(option.type).toBe(IComponentOptions_1.ComponentOptionsType.JSON);
            });
            it('an option', function () {
                var option = ComponentOptions_1.ComponentOptions.buildOption(IComponentOptions_1.ComponentOptionsType.BOOLEAN, ComponentOptions_1.ComponentOptions.loadBooleanOption);
                expect(option.type).toBe(IComponentOptions_1.ComponentOptionsType.BOOLEAN);
            });
        });
        describe('exposes method', function () {
            describe('attrNameFromName', function () {
                it('which returns the attribute name from the given name', function () {
                    var name = ComponentOptions_1.ComponentOptions.attrNameFromName('fooBar');
                    expect(name).toBe('data-foo-bar');
                });
                it('which returns the attribute name from the options', function () {
                    var name = ComponentOptions_1.ComponentOptions.attrNameFromName('fooBar', { attrName: 'data-foo-brak' });
                    expect(name).toBe('data-foo-brak');
                });
            });
            describe('camelCaseToHyphen', function () {
                it('which transforms an hyphen string corresponding to the given camel case string', function () {
                    var name = ComponentOptions_1.ComponentOptions.camelCaseToHyphen('fooBar');
                    expect(name).toBe('foo-bar');
                });
            });
            describe('mergeCamelCase', function () {
                it('which merges 2 camel case strings into one', function () {
                    var name = ComponentOptions_1.ComponentOptions.mergeCamelCase('fooBar', 'johnDoe');
                    expect(name).toBe('fooBarJohnDoe');
                });
            });
        });
        describe('exposes method', function () {
            var scrollElem;
            var elem;
            var childElem;
            var childElem2;
            var doc;
            var testDiv;
            var testTemplate;
            beforeEach(function () {
                scrollElem = Dom_1.Dom.createElement('div', { id: 'scrollable', class: 'coveoScrollable' });
                scrollElem.style.overflowY = 'scroll';
                elem = Dom_1.Dom.createElement('div', {
                    id: 'heidi',
                    className: 'kloss',
                    'data-my-attr': 'baz',
                    'data-my-bool': 'true',
                    'data-my-field': '@foobar',
                    'data-my-fields': '@foobar,@foobrak',
                    'data-my-localized': 'en: FiltersInYourPreferences',
                    'data-my-number': '44',
                    'data-my-float-number': '4.4',
                    'data-my-list': 'foo&bar&brak',
                    'data-my-test-enum': 'bar',
                    'data-my-test-json-object': '{"foo":"bar"}',
                    'data-my-test-json-array': '[{"foo":"bar"}]',
                    'data-my-selector': '#CoveoSearchbox',
                    'data-my-child-selector': '#CoveoSearchboxChild',
                    'data-my-template-selector': '#CoveoTemplate',
                    'data-my-template-id': 'CoveoTemplateId'
                });
                scrollElem.appendChild(elem);
                childElem = Dom_1.Dom.createElement('div', {
                    id: 'CoveoSearchboxChild',
                    className: 'childKloss coveo-child',
                    type: 'text/html'
                });
                elem.appendChild(childElem);
                childElem2 = Dom_1.Dom.createElement('div', {
                    id: 'CoveoSearchboxChild2',
                    className: 'childKloss coveo-child',
                    type: 'text/html'
                });
                elem.appendChild(childElem2);
                doc = document.implementation.createHTMLDocument('');
                testDiv = doc.createElement('div');
                testDiv.id = 'CoveoSearchbox';
                doc.body.insertAdjacentElement('beforeend', testDiv);
                testTemplate = doc.createElement('div');
                testTemplate.id = 'CoveoTemplate';
                testTemplate.setAttribute('type', 'text/html');
                testTemplate.setAttribute('data-condition', 'testcondition');
                doc.body.insertAdjacentElement('beforeend', testTemplate);
            });
            afterEach(function () {
                scrollElem = null;
                elem = null;
                childElem = null;
                childElem2 = null;
                doc = null;
                testDiv = null;
                testTemplate = null;
            });
            describe('initComponentOptions', function () {
                it('which initializes the options of a component', function () {
                    var options = {
                        myAttr: ComponentOptions_1.ComponentOptions.buildStringOption(),
                        myBool: ComponentOptions_1.ComponentOptions.buildBooleanOption(),
                        myLocalized: ComponentOptions_1.ComponentOptions.buildLocalizedStringOption()
                    };
                    var initOptions = ComponentOptions_1.ComponentOptions.initComponentOptions(elem, { options: options, ID: 'fooID' });
                    expect(initOptions).toEqual({ myAttr: 'baz', myBool: true, myLocalized: 'Filters in your preferences' });
                });
                it('which initializes the options of a component as JSON', function () {
                    var options = {
                        myJsonStuff: ComponentOptions_1.ComponentOptions.buildJsonOption()
                    };
                    elem.setAttribute('data-my-json-stuff', '{"abc":"def"}');
                    var initOptions = ComponentOptions_1.ComponentOptions.initComponentOptions(elem, { options: options, ID: 'fooID' });
                    expect(initOptions.myJsonStuff).toEqual(jasmine.objectContaining({
                        abc: 'def'
                    }));
                });
                it('which initializes invalid JSON with no error', function () {
                    var options = {
                        myJsonStuff: ComponentOptions_1.ComponentOptions.buildJsonOption()
                    };
                    // Single quote == invalid JSON
                    elem.setAttribute('data-my-json-stuff', "{'abc':'def'}");
                    expect(function () { return ComponentOptions_1.ComponentOptions.initComponentOptions(elem, { options: options, ID: 'fooID' }); }).not.toThrow();
                    var initOptions = ComponentOptions_1.ComponentOptions.initComponentOptions(elem, { options: options, ID: 'fooID' });
                    expect(initOptions.myJsonStuff).toBeUndefined();
                });
                it('which uses JSONobject as an alias for JSON option', function () {
                    var options = {
                        myJsonStuff: ComponentOptions_1.ComponentOptions.buildJsonObjectOption()
                    };
                    elem.setAttribute('data-my-json-stuff', '{"abc":"def"}');
                    var initOptions = ComponentOptions_1.ComponentOptions.initComponentOptions(elem, { options: options, ID: 'fooID' });
                    expect(initOptions.myJsonStuff).toEqual(jasmine.objectContaining({
                        abc: 'def'
                    }));
                });
                it('which initializes the options of a component with default values', function () {
                    var options = {
                        testString: ComponentOptions_1.ComponentOptions.buildStringOption({ defaultValue: 'fooBrak' }),
                        testList: ComponentOptions_1.ComponentOptions.buildListOption({ defaultValue: ['fooBrak', 'fooBar'] }),
                        testObject: ComponentOptions_1.ComponentOptions.buildObjectOption({ subOptions: {}, defaultValue: { john: 'doe' } })
                    };
                    var initOptions = ComponentOptions_1.ComponentOptions.initComponentOptions(elem, { options: options, ID: 'fooID' });
                    expect(initOptions).toEqual({ testString: 'fooBrak', testList: ['fooBrak', 'fooBar'], testObject: { john: 'doe' } });
                });
                it('which initializes the options of a component with default function', function () {
                    var options = {
                        testString: ComponentOptions_1.ComponentOptions.buildStringOption({
                            defaultFunction: function (elem) {
                                return 'fooBrak';
                            }
                        }),
                        testList: ComponentOptions_1.ComponentOptions.buildListOption({
                            defaultFunction: function (elem) {
                                return ['fooBrak', 'fooBar'];
                            }
                        }),
                        testObject: ComponentOptions_1.ComponentOptions.buildObjectOption({
                            subOptions: {},
                            defaultFunction: function (elem) {
                                return { john: 'doe' };
                            }
                        })
                    };
                    var initOptions = ComponentOptions_1.ComponentOptions.initComponentOptions(elem, { options: options, ID: 'fooID' });
                    expect(initOptions).toEqual({ testString: 'fooBrak', testList: ['fooBrak', 'fooBar'], testObject: { john: 'doe' } });
                });
                it("which initializes a component's undefined required option", function () {
                    var options = {
                        testRequired: ComponentOptions_1.ComponentOptions.buildStringOption({
                            required: true
                        })
                    };
                    expect(function () {
                        ComponentOptions_1.ComponentOptions.initComponentOptions(elem, { options: options, ID: 'fooID' });
                    }).not.toThrow();
                });
                it('which initializes the options of a component with postProcessing', function () {
                    var options = {
                        myAttr: ComponentOptions_1.ComponentOptions.buildStringOption({
                            postProcessing: function (value, options) {
                                return value + ' foo';
                            }
                        })
                    };
                    var initOptions = ComponentOptions_1.ComponentOptions.initComponentOptions(elem, { options: options, ID: 'fooID' });
                    expect(initOptions).toEqual({ myAttr: 'baz foo' });
                });
                it('which initializes the options of a component with attrName', function () {
                    var options = {
                        myAttr: ComponentOptions_1.ComponentOptions.buildStringOption({
                            postProcessing: function (value, options) {
                                return value + ' foo';
                            }
                        })
                    };
                    var initOptions = ComponentOptions_1.ComponentOptions.initComponentOptions(elem, { options: options, ID: 'fooID' });
                    expect(initOptions).toEqual({ myAttr: 'baz foo' });
                });
                it('which validates a component option with the specified validator', function () {
                    var options = {
                        testString: ComponentOptions_1.ComponentOptions.buildStringOption({
                            defaultFunction: function (elem) {
                                return 'fooBrak';
                            },
                            validator: function (value) {
                                return value === 'fooBrak';
                            }
                        }),
                        myAttr: ComponentOptions_1.ComponentOptions.buildStringOption({
                            validator: function (value) {
                                return value === '';
                            }
                        }),
                        testList: ComponentOptions_1.ComponentOptions.buildListOption({
                            defaultValue: ['fooBrak', 'fooBar'],
                            validator: function (value) {
                                return value[0] === 'fooBrak';
                            }
                        }),
                        testParam: ComponentOptions_1.ComponentOptions.buildListOption({
                            validator: function (value) {
                                return value[0] === 'fooBrak';
                            }
                        })
                    };
                    var initOptions = ComponentOptions_1.ComponentOptions.initComponentOptions(elem, { options: options, ID: 'fooID' }, { testParam: [] });
                    expect(initOptions).toEqual({ testString: 'fooBrak', testList: ['fooBrak', 'fooBar'] });
                });
                it('which validates a required component option with the specified validator', function () {
                    var options = {
                        myAttr: ComponentOptions_1.ComponentOptions.buildStringOption({
                            validator: function (value) {
                                return value === '';
                            },
                            required: true
                        })
                    };
                    var initOptions = ComponentOptions_1.ComponentOptions.initComponentOptions(elem, { options: options, ID: 'fooID' });
                    expect(initOptions.myAttr).toBeUndefined();
                });
            });
            describe('initOptions', function () {
                it('which initializes the options of a component', function () {
                    var initOptions = ComponentOptions_1.ComponentOptions.initOptions(elem, {
                        myAttr: ComponentOptions_1.ComponentOptions.buildStringOption(),
                        myBool: ComponentOptions_1.ComponentOptions.buildBooleanOption()
                    }, {}, 'fooID');
                    expect(initOptions).toEqual({ myAttr: 'baz', myBool: true });
                });
            });
            describe('loadStringOption', function () {
                it('which loads a string option', function () {
                    var option = ComponentOptions_1.ComponentOptions.loadStringOption(elem, 'myAttr', {});
                    expect(option).toBe('baz');
                });
                it("which loads a string option from the IComponentOptions's option attrName", function () {
                    var option = ComponentOptions_1.ComponentOptions.loadStringOption(elem, 'myAttr', { attrName: 'data-my-bool' });
                    expect(option).toBe('true');
                });
                it("which loads a string option from the IComponentOptions's option alias", function () {
                    var option = ComponentOptions_1.ComponentOptions.loadStringOption(elem, null, { alias: 'myAttr' });
                    expect(option).toBe('baz');
                });
                it('which loads a string option from the IComponentOptions option alias as an array', function () {
                    var option = ComponentOptions_1.ComponentOptions.loadStringOption(elem, null, { alias: ['myAttr', 'myAttr2'] });
                    expect(option).toBe('baz');
                    option = ComponentOptions_1.ComponentOptions.loadStringOption(elem, null, { alias: ['myAttr2', 'myAttr'] });
                    expect(option).toBe('baz');
                });
            });
            describe('loadFieldOption', function () {
                it('which loads a field option', function () {
                    var option = ComponentOptions_1.ComponentOptions.loadFieldOption(elem, 'myField', {});
                    expect(option).toBe('@foobar');
                });
            });
            describe('loadFieldsOption', function () {
                it('which loads a field options', function () {
                    var option = ComponentOptions_1.ComponentOptions.loadFieldsOption(elem, 'myFields', {});
                    expect(option).toEqual(['@foobar', '@foobrak']);
                });
            });
            describe('loadLocalizedStringOption', function () {
                it('which loads a localized string option', function () {
                    var option = ComponentOptions_1.ComponentOptions.loadLocalizedStringOption(elem, 'myLocalized', {});
                    expect(option).toBe('FiltersInYourPreferences');
                });
            });
            describe('loadNumberOption', function () {
                it('which loads a number option', function () {
                    var option = ComponentOptions_1.ComponentOptions.loadNumberOption(elem, 'myNumber', {});
                    expect(option).toBe(44);
                });
                it('which loads a number option greater than the set maximum', function () {
                    var option = ComponentOptions_1.ComponentOptions.loadNumberOption(elem, 'myNumber', { max: 25 });
                    expect(option).toBe(25);
                });
                it('which loads a number option lesser than the set minimum', function () {
                    var option = ComponentOptions_1.ComponentOptions.loadNumberOption(elem, 'myNumber', { min: 55 });
                    expect(option).toBe(55);
                });
                it('which loads a floating point number option', function () {
                    var option = ComponentOptions_1.ComponentOptions.loadNumberOption(elem, 'myFloatNumber', { float: true });
                    expect(option).toBe(4.4);
                });
            });
            describe('loadBooleanOption', function () {
                it('which loads a boolean option', function () {
                    var option = ComponentOptions_1.ComponentOptions.loadBooleanOption(elem, 'myBool', {});
                    expect(option).toBe(true);
                });
            });
            describe('loadListOption', function () {
                it('which loads a list option', function () {
                    var option = ComponentOptions_1.ComponentOptions.loadListOption(elem, 'myFields', {});
                    expect(option).toEqual(['@foobar', '@foobrak']);
                });
                it('which loads a list option using a custom separator', function () {
                    var separator = new RegExp('s*&s*');
                    var option = ComponentOptions_1.ComponentOptions.loadListOption(elem, 'myList', { separator: separator });
                    expect(option).toEqual(['foo', 'bar', 'brak']);
                });
            });
            describe('loadEnumOption', function () {
                it('which loads an enum option', function () {
                    var testEnum;
                    (function (testEnum) {
                        testEnum[testEnum["foo"] = 1] = "foo";
                        testEnum[testEnum["bar"] = 2] = "bar";
                        testEnum[testEnum["brak"] = 3] = "brak";
                    })(testEnum || (testEnum = {}));
                    var option = ComponentOptions_1.ComponentOptions.loadEnumOption(elem, 'myTestEnum', {}, testEnum);
                    expect(option).toBe(2);
                });
            });
            describe('loadJsonOption', function () {
                it('which loads a JSON object option', function () {
                    var option = ComponentOptions_1.ComponentOptions.loadJsonObjectOption(elem, 'myTestJsonObject', {});
                    expect(option.foo).not.toBeUndefined();
                    expect(option.foo).toBe('bar');
                });
                it('which loads a JSON array option', function () {
                    var option = ComponentOptions_1.ComponentOptions.loadJsonObjectOption(elem, 'myTestJsonArray', {});
                    expect(option.length).toBe(1);
                    expect(option[0].foo);
                });
                it('which disables an invalid JSON option', function () {
                    var option = ComponentOptions_1.ComponentOptions.loadJsonObjectOption(elem, 'myFields', {});
                    expect(option).toBe(null);
                });
            });
            describe('loadSelectorOption', function () {
                it('which loads a selector option', function () {
                    var option = ComponentOptions_1.ComponentOptions.loadSelectorOption(elem, 'mySelector', {}, doc);
                    expect(option).toBe(testDiv);
                });
            });
            describe('loadChildHtmlElementOption', function () {
                it('which loads an html element option', function () {
                    var option = ComponentOptions_1.ComponentOptions.loadChildHtmlElementOption(elem, 'my', {}, doc);
                    expect(option).toBe(testDiv);
                });
                it("which loads an html element option from the IComponentOptionsChildHtmlElementOption's option selectorAttr", function () {
                    var option = ComponentOptions_1.ComponentOptions.loadChildHtmlElementOption(elem, '', { selectorAttr: 'data-my-selector' }, doc);
                    expect(option).toBe(testDiv);
                });
                it("which loads a child html element option from the IComponentOptionsChildHtmlElementOption's option childSelector", function () {
                    var option = ComponentOptions_1.ComponentOptions.loadChildHtmlElementOption(elem, '', { childSelector: '#CoveoSearchboxChild' }, doc);
                    expect(option).toBe(childElem);
                });
                it('which loads a child html element option from the provided name as a class selector', function () {
                    var option = ComponentOptions_1.ComponentOptions.loadChildHtmlElementOption(elem, 'childKloss', {}, doc);
                    expect(option).toBe(childElem);
                });
            });
            describe('loadChildHtmlElementFromSelector', function () {
                it('which loads a child html element corresponding to the selector', function () {
                    var option = ComponentOptions_1.ComponentOptions.loadChildHtmlElementFromSelector(elem, '.childKloss');
                    expect(option).toBe(childElem);
                });
                it('which directly loads the parent html element if it corresponds to the selector', function () {
                    var option = ComponentOptions_1.ComponentOptions.loadChildHtmlElementFromSelector(elem, '#heidi');
                    expect(option).toBe(elem);
                });
            });
            describe('loadChildrenHtmlElementFromSelector', function () {
                it('which loads all children html elements corresponding to the selector', function () {
                    var option = ComponentOptions_1.ComponentOptions.loadChildrenHtmlElementFromSelector(elem, '.childKloss');
                    expect(option).toEqual([childElem, childElem2]);
                });
            });
            describe('loadTemplateOption', function () {
                it('which loads an html template from the document matching the selector in the html element option', function () {
                    var option = TemplateComponentOptions_1.TemplateComponentOptions.loadTemplateOption(elem, '', { selectorAttr: 'data-my-template-selector' }, doc);
                    var template = TemplateComponentOptions_1.TemplateComponentOptions.createResultTemplateFromElement(testTemplate);
                    expect(option.toHtmlElement()).toEqual(template.toHtmlElement());
                });
                it('which loads an html template from the cache matching the id in the html element option', function () {
                    var template = TemplateComponentOptions_1.TemplateComponentOptions.createResultTemplateFromElement(testTemplate);
                    TemplateCache_1.TemplateCache.registerTemplate('CoveoTemplateId', template);
                    var option = TemplateComponentOptions_1.TemplateComponentOptions.loadTemplateOption(elem, '', { idAttr: 'data-my-template-id' }, doc);
                    expect(option.toHtmlElement()).toEqual(template.toHtmlElement());
                    TemplateCache_1.TemplateCache.unregisterTemplate('CoveoTemplateId');
                });
                it('which loads html templates from the html elements matching the child selector in the html element option', function () {
                    var option = TemplateComponentOptions_1.TemplateComponentOptions.loadTemplateOption(elem, '', { childSelector: '.coveo-child' }, doc);
                    expect(option.getType()).toBe('TemplateList');
                });
                it('which loads an html template from the html element matching the name in the html element option', function () {
                    var option = TemplateComponentOptions_1.TemplateComponentOptions.loadTemplateOption(elem, 'coveoChild', {}, doc);
                    expect(option.getType()).toBe('TemplateList');
                });
            });
            describe('loadResultTemplateFromId', function () {
                it('which loads an html template from the cache matching the id', function () {
                    var template = TemplateComponentOptions_1.TemplateComponentOptions.createResultTemplateFromElement(testTemplate);
                    TemplateCache_1.TemplateCache.registerTemplate('CoveoTemplateId', template);
                    var option = TemplateComponentOptions_1.TemplateComponentOptions.loadResultTemplateFromId('CoveoTemplateId');
                    expect(option.toHtmlElement()).toEqual(template.toHtmlElement());
                    TemplateCache_1.TemplateCache.unregisterTemplate('CoveoTemplateId');
                });
            });
            describe('loadChildrenResultTemplateFromSelector', function () {
                it('which loads html templates from the html elements matching the selector', function () {
                    var option = TemplateComponentOptions_1.TemplateComponentOptions.loadChildrenResultTemplateFromSelector(elem, '.coveo-child');
                    expect(option.getType()).toBe('TemplateList');
                });
            });
            describe('findParentScrolling', function () {
                it('returns the window if the element is null', function () {
                    expect(ComponentOptions_1.ComponentOptions.findParentScrolling(null, doc)).toEqual(window);
                });
                describe('on an element without a parent document', function () {
                    it('will return its parent if it has overflow scroll', function () {
                        scrollElem.style.overflowY = 'scroll';
                        var option = ComponentOptions_1.ComponentOptions.findParentScrolling(elem, doc);
                        expect(option).toBe(scrollElem);
                    });
                    it('will return its parent if it has overflow auto', function () {
                        scrollElem.style.overflowY = 'auto';
                        var option = ComponentOptions_1.ComponentOptions.findParentScrolling(elem, doc);
                        expect(option).toBe(scrollElem);
                    });
                    it('will return the window if its parent has overflow visible', function () {
                        scrollElem.style.overflowY = 'visible';
                        var option = ComponentOptions_1.ComponentOptions.findParentScrolling(elem, doc);
                        expect(option).toBe(window);
                    });
                    it('will return the window if its parent has overflow inherit', function () {
                        scrollElem.style.overflowY = 'inherit';
                        var option = ComponentOptions_1.ComponentOptions.findParentScrolling(elem, doc);
                        expect(option).toBe(window);
                    });
                });
                describe('on an element with a parent document', function () {
                    beforeEach(function () {
                        doc.body.appendChild(scrollElem);
                    });
                    it('will return its parent if it has overflow scroll', function () {
                        scrollElem.style.overflowY = 'scroll';
                        var option = ComponentOptions_1.ComponentOptions.findParentScrolling(elem, doc);
                        expect(option).toBe(scrollElem);
                    });
                    it('will return its parent if it has overflow auto', function () {
                        scrollElem.style.overflowY = 'auto';
                        var option = ComponentOptions_1.ComponentOptions.findParentScrolling(elem, doc);
                        expect(option).toBe(scrollElem);
                    });
                    it('will return the window if its parent has overflow visible', function () {
                        scrollElem.style.overflowY = 'visible';
                        var option = ComponentOptions_1.ComponentOptions.findParentScrolling(elem, doc);
                        expect(option).toBe(window);
                    });
                    it('will return the window if its parent has overflow inherit', function () {
                        scrollElem.style.overflowY = 'inherit';
                        var option = ComponentOptions_1.ComponentOptions.findParentScrolling(elem, doc);
                        expect(option).toBe(window);
                    });
                });
            });
            describe('findParentScrollLockable', function () {
                it('returns the body if the element is null', function () {
                    expect(ComponentOptions_1.ComponentOptions.findParentScrollLockable(null, doc)).toEqual(doc.body);
                });
                describe('on an element with its highest ancestor being an unparent root element', function () {
                    var root;
                    beforeEach(function () {
                        root = Dom_1.$$('div', {}, scrollElem).el;
                        root.style.overflowY = 'visible';
                    });
                    it('will return its parent if it has overflow scroll', function () {
                        scrollElem.style.overflowY = 'scroll';
                        var option = ComponentOptions_1.ComponentOptions.findParentScrollLockable(elem, doc);
                        expect(option).toBe(scrollElem);
                    });
                    it('will return its parent if it has overflow auto', function () {
                        scrollElem.style.overflowY = 'auto';
                        var option = ComponentOptions_1.ComponentOptions.findParentScrollLockable(elem, doc);
                        expect(option).toBe(scrollElem);
                    });
                    it('will return the highest ancestor if its parent has overflow visible', function () {
                        scrollElem.style.overflowY = 'visible';
                        var option = ComponentOptions_1.ComponentOptions.findParentScrollLockable(elem, doc);
                        expect(option).toBe(root);
                    });
                    it('will return the highest ancestor if its parent has overflow inherit', function () {
                        scrollElem.style.overflowY = 'inherit';
                        var option = ComponentOptions_1.ComponentOptions.findParentScrollLockable(elem, doc);
                        expect(option).toBe(root);
                    });
                });
                describe('on an element with a parent document', function () {
                    beforeEach(function () {
                        doc.body.appendChild(scrollElem);
                    });
                    it('will return its parent if it has overflow scroll', function () {
                        scrollElem.style.overflowY = 'scroll';
                        var option = ComponentOptions_1.ComponentOptions.findParentScrollLockable(elem, doc);
                        expect(option).toBe(scrollElem);
                    });
                    it('will return its parent if it has overflow auto', function () {
                        scrollElem.style.overflowY = 'auto';
                        var option = ComponentOptions_1.ComponentOptions.findParentScrollLockable(elem, doc);
                        expect(option).toBe(scrollElem);
                    });
                    it('will return the body if its parent has overflow visible', function () {
                        scrollElem.style.overflowY = 'visible';
                        var option = ComponentOptions_1.ComponentOptions.findParentScrollLockable(elem, doc);
                        expect(option).toBe(doc.body);
                    });
                    it('will return the body if its parent has overflow inherit', function () {
                        scrollElem.style.overflowY = 'inherit';
                        var option = ComponentOptions_1.ComponentOptions.findParentScrollLockable(elem, doc);
                        expect(option).toBe(doc.body);
                    });
                });
            });
            describe('getAttributeFromAlias', function () {
                it('which gets an attribute of the html element matching the alias', function () {
                    var option = ComponentOptions_1.ComponentOptions.getAttributeFromAlias(elem, { alias: 'myAttr' });
                    expect(option).toBe('baz');
                });
                it('which gets an attribute of the html element matching the alias as an array', function () {
                    var option = ComponentOptions_1.ComponentOptions.getAttributeFromAlias(elem, { alias: ['myAttr', 'myAttr2'] });
                    expect(option).toBe('baz');
                    option = ComponentOptions_1.ComponentOptions.getAttributeFromAlias(elem, { alias: ['myAttr2', 'myAttr'] });
                    expect(option).toBe('baz');
                });
            });
            describe('createResultTemplateFromElement', function () {
                it('which creates a result template from the given html element', function () {
                    var option = TemplateComponentOptions_1.TemplateComponentOptions.createResultTemplateFromElement(testTemplate);
                    expect(option.getType()).toBe('HtmlTemplate');
                });
            });
        });
    });
}
exports.ComponentOptionsTest = ComponentOptionsTest;
 
 
/***/ }),
/* 1604 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var ComponentOptionsLoader_1 = __webpack_require__(479);
var Core_1 = __webpack_require__(9);
function ComponentOptionLoaderTest() {
    describe('ComponentOptionLoader', function () {
        it('should be able to load from the element attribute', function () {
            var elem = Core_1.$$('div', { 'data-foo': 'bar' }).el;
            var valueLoaded = new ComponentOptionsLoader_1.ComponentOptionLoader(elem, {}, 'foo', { load: Core_1.ComponentOptions.loadStringOption }).load();
            expect(valueLoaded).toBe('bar');
        });
        it('should be able to load from dictionnary value', function () {
            var elem = Core_1.$$('div').el;
            var valueLoaded = new ComponentOptionsLoader_1.ComponentOptionLoader(elem, { abc: 'def' }, 'abc', {}).load();
            expect(valueLoaded).toBe('def');
        });
        describe('should be able to load default value from option definition', function () {
            var elem;
            beforeEach(function () {
                elem = Core_1.$$('div').el;
            });
            it('when it is a string', function () {
                var valueLoaded = new ComponentOptionsLoader_1.ComponentOptionLoader(elem, {}, 'foo', {
                    type: Core_1.ComponentOptionsType.STRING,
                    defaultValue: 'qwerty'
                }).load();
                expect(valueLoaded).toBe('qwerty');
            });
            it('when it is a list', function () {
                var valueLoaded = new ComponentOptionsLoader_1.ComponentOptionLoader(elem, {}, 'foo', {
                    type: Core_1.ComponentOptionsType.LIST,
                    defaultValue: ['q', 'w', 'e', 'r', 't', 'y']
                }).load();
                expect(valueLoaded).toEqual(['q', 'w', 'e', 'r', 't', 'y']);
            });
            it('when it is an object', function () {
                var valueLoaded = new ComponentOptionsLoader_1.ComponentOptionLoader(elem, {}, 'foo', {
                    type: Core_1.ComponentOptionsType.OBJECT,
                    defaultValue: { bar: 'buzz' }
                }).load();
                expect(valueLoaded).toEqual({ bar: 'buzz' });
            });
            it('when it is a localized string', function () {
                var valueLoaded = new ComponentOptionsLoader_1.ComponentOptionLoader(elem, {}, 'foo', {
                    type: Core_1.ComponentOptionsType.LOCALIZED_STRING,
                    localizedString: function () { return Core_1.l('Title'); }
                }).load();
                expect(valueLoaded).toEqual(Core_1.l('Title'));
            });
            it('when it is a localized string with defaultValue, it will return the default value with a warning', function () {
                var valueLoaded = new ComponentOptionsLoader_1.ComponentOptionLoader(elem, {}, 'foo', {
                    type: Core_1.ComponentOptionsType.LOCALIZED_STRING,
                    defaultValue: Core_1.l('Title')
                }).load();
                expect(valueLoaded).toEqual(Core_1.l('Title'));
            });
        });
    });
}
exports.ComponentOptionLoaderTest = ComponentOptionLoaderTest;
 
 
/***/ }),
/* 1605 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var ComponentOptionsMerger_1 = __webpack_require__(480);
var Core_1 = __webpack_require__(9);
function ComponentOptionsMergerTest() {
    describe('ComponentOptionMerger', function () {
        it('should not merge null values', function () {
            var out = {};
            new ComponentOptionsMerger_1.ComponentOptionsMerger({ type: Core_1.ComponentOptionsType.STRING }, { value: null, name: 'bar' }, out).merge();
            expect(out.bar).not.toBeDefined();
        });
        it('should not merge undefined values', function () {
            var out = {};
            new ComponentOptionsMerger_1.ComponentOptionsMerger({ type: Core_1.ComponentOptionsType.STRING }, { value: undefined, name: 'bar' }, out).merge();
            expect(out.bar).not.toBeDefined();
        });
        it('should merge simple string value', function () {
            var out = {};
            new ComponentOptionsMerger_1.ComponentOptionsMerger({ type: Core_1.ComponentOptionsType.STRING }, { value: 'foo', name: 'bar' }, out).merge();
            expect(out.bar).toEqual('foo');
        });
        it('should merge empty string', function () {
            var out = {};
            new ComponentOptionsMerger_1.ComponentOptionsMerger({ type: Core_1.ComponentOptionsType.STRING }, { value: '', name: 'bar' }, out).merge();
            expect(out.bar).toEqual('');
        });
        it('should merge simple number values', function () {
            var out = {};
            new ComponentOptionsMerger_1.ComponentOptionsMerger({ type: Core_1.ComponentOptionsType.NUMBER }, { value: 123, name: 'bar' }, out).merge();
            expect(out.bar).toEqual(123);
        });
        it('should merge simple falsy number values', function () {
            var out = {};
            new ComponentOptionsMerger_1.ComponentOptionsMerger({ type: Core_1.ComponentOptionsType.NUMBER }, { value: 0, name: 'bar' }, out).merge();
            expect(out.bar).toEqual(0);
        });
        it('should merge simple object values', function () {
            var out = {};
            new ComponentOptionsMerger_1.ComponentOptionsMerger({ type: Core_1.ComponentOptionsType.OBJECT }, { value: { buzz: 'bazz' }, name: 'bar' }, out).merge();
            expect(out.bar).toEqual({ buzz: 'bazz' });
        });
        it('should override existing values in dictionnary', function () {
            var out = { bar: 999 };
            new ComponentOptionsMerger_1.ComponentOptionsMerger({ type: Core_1.ComponentOptionsType.NUMBER }, { value: 123, name: 'bar' }, out).merge();
            expect(out.bar).toEqual(123);
        });
        it('should override merge existing values in dictionnary as object', function () {
            var out = { bar: { buzz: 'bazz' } };
            new ComponentOptionsMerger_1.ComponentOptionsMerger({ type: Core_1.ComponentOptionsType.OBJECT }, { value: { hello: 'world' }, name: 'bar' }, out).merge();
            expect(out.bar).toEqual({ buzz: 'bazz', hello: 'world' });
        });
        it('should merge simple localized string values', function () {
            var out = {};
            new ComponentOptionsMerger_1.ComponentOptionsMerger({ type: Core_1.ComponentOptionsType.LOCALIZED_STRING }, { value: 'Title', name: 'bar' }, out).merge();
            expect(out.bar).toEqual(Core_1.l('Title'));
        });
    });
}
exports.ComponentOptionsMergerTest = ComponentOptionsMergerTest;
 
 
/***/ }),
/* 1606 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var ComponentOptionsValidator_1 = __webpack_require__(482);
function ComponentOptionsValidatorTest() {
    describe('ComponentOptionsValidator', function () {
        it('should not modify the dictionary if the option has no validator', function () {
            var out = { foo: 'bar' };
            new ComponentOptionsValidator_1.ComponentOptionsValidator({}, { componentID: 'id', name: 'foo', value: 'bar' }, out).validate();
            expect(out.foo).toBe('bar');
        });
        it('should modify the dictionary if the option has an invalid validator', function () {
            var out = { foo: 'bar' };
            new ComponentOptionsValidator_1.ComponentOptionsValidator({ validator: function (v) { return false; } }, { componentID: 'id', name: 'foo', value: 'bar' }, out).validate();
            expect(out.foo).not.toBeDefined();
        });
        it('should not modify the dictionary if the option has a valid validator', function () {
            var out = { foo: 'bar' };
            new ComponentOptionsValidator_1.ComponentOptionsValidator({ validator: function (v) { return true; } }, { componentID: 'id', name: 'foo', value: 'bar' }, out).validate();
            expect(out.foo).toBe('bar');
        });
    });
}
exports.ComponentOptionsValidatorTest = ComponentOptionsValidatorTest;
 
 
/***/ }),
/* 1607 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var ComponentOptionsPostProcessor_1 = __webpack_require__(481);
function ComponentOptionsPostProcessorTest() {
    describe('ComponentOptionsPostProcessor', function () {
        it('call the post process function on the option definition', function () {
            var spy = jasmine.createSpy('foo');
            new ComponentOptionsPostProcessor_1.ComponentOptionsPostProcessor({ foo: { postProcessing: spy } }, { foo: 'bar' }, 'qwerty').postProcess();
            expect(spy).toHaveBeenCalled();
        });
        it('check the required property on the option definition', function () {
            var spy = jasmine.createSpy('spy');
            spy.and.returnValue(true);
            var optionDefinition = Object.defineProperties({}, {
                required: {
                    get: spy
                }
            });
            new ComponentOptionsPostProcessor_1.ComponentOptionsPostProcessor({ foo: optionDefinition }, { foo: 'bar' }, 'qwerty').postProcess();
            expect(spy).toHaveBeenCalled();
        });
    });
}
exports.ComponentOptionsPostProcessorTest = ComponentOptionsPostProcessorTest;
 
 
/***/ }),
/* 1608 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Mock = __webpack_require__(2);
var Component_1 = __webpack_require__(6);
var SearchInterface_1 = __webpack_require__(25);
var Dom_1 = __webpack_require__(0);
var Fake_1 = __webpack_require__(11);
function ComponentTest() {
    describe('Component', function () {
        var env;
        var cmp;
        beforeEach(function () {
            env = new Mock.MockEnvironmentBuilder().build();
            var el = document.createElement('div');
            env.root.appendChild(el);
            cmp = new Component_1.Component(el, 'Test');
        });
        afterEach(function () {
            env = null;
            cmp = null;
        });
        it('will resolve all environment variables if not provided', function () {
            expect(cmp.queryController).toBe(env.queryController);
            expect(cmp.componentOptionsModel).toBe(env.componentOptionsModel);
            expect(cmp.usageAnalytics).toBeDefined();
            expect(cmp.componentStateModel).toBe(env.componentStateModel);
            expect(cmp.queryStateModel).toBe(env.queryStateModel);
        });
        it('should return a binding object', function () {
            expect(cmp.getBindings()).toBeDefined();
        });
        it('should return a debug info object', function () {
            expect(cmp.debugInfo()).toBeDefined();
        });
        it('should be possible to disable', function () {
            cmp.disable();
            expect(cmp.disabled).toBe(true);
        });
        it('should be possible to enable', function () {
            cmp.enable();
            expect(cmp.disabled).toBe(false);
        });
        it('should be enabled by default', function () {
            expect(cmp.disabled).toBe(false);
        });
        it('should add the correct class on the component', function () {
            expect(Dom_1.$$(cmp.element).hasClass('CoveoTest')).toBe(true);
        });
        it('should bind the component to the element', function () {
            expect(cmp.element['CoveoTest']).toBe(cmp);
        });
        it('should be able to resolve if the element is directly on the root of the interface', function () {
            var resolveDirectly = new Component_1.Component(env.root, 'test');
            expect(resolveDirectly.queryController).toBe(env.queryController);
            expect(resolveDirectly.searchInterface).toBe(env.searchInterface);
        });
        describe('should allow to point form element to a dummy form', function () {
            var elementToDummyOut;
            var elementThatShouldNotBeDummiedOut;
            beforeEach(function () {
                elementToDummyOut = document.createElement('input');
                elementToDummyOut.setAttribute('type', 'text');
                elementThatShouldNotBeDummiedOut = document.createElement('div');
                elementThatShouldNotBeDummiedOut.appendChild(elementToDummyOut);
            });
            afterEach(function () {
                elementToDummyOut = null;
                elementThatShouldNotBeDummiedOut = null;
            });
            it('directly on an input', function () {
                Component_1.Component.pointElementsToDummyForm(elementToDummyOut);
                expect(elementToDummyOut.getAttribute('form')).toBe('coveo-dummy-form');
            });
            it('but not on non-input tag', function () {
                var elementThatShouldNotBeDummiedOut = document.createElement('div');
                Component_1.Component.pointElementsToDummyForm(elementThatShouldNotBeDummiedOut);
                expect(elementThatShouldNotBeDummiedOut.getAttribute('form')).toBe(null);
            });
            it('on child input', function () {
                Component_1.Component.pointElementsToDummyForm(elementThatShouldNotBeDummiedOut);
                expect(elementToDummyOut.getAttribute('form')).toBe('coveo-dummy-form');
            });
            it('on multiple child input', function () {
                var elementToDummyOut2 = document.createElement('input');
                elementToDummyOut2.setAttribute('type', 'text');
                elementThatShouldNotBeDummiedOut.appendChild(elementToDummyOut2);
                Component_1.Component.pointElementsToDummyForm(elementThatShouldNotBeDummiedOut);
                expect(elementToDummyOut.getAttribute('form')).toBe('coveo-dummy-form');
                expect(elementToDummyOut2.getAttribute('form')).toBe('coveo-dummy-form');
            });
        });
        describe('resolving results', function () {
            var result;
            beforeEach(function () {
                result = Fake_1.FakeResults.createFakeResult();
            });
            afterEach(function () {
                result = null;
            });
            it('should allow to bind a result to an element', function () {
                Component_1.Component.bindResultToElement(cmp.element, result);
                expect(Component_1.Component.getResult(cmp.element)).toBe(result);
            });
            it('should allow to retrive a result from a child element', function () {
                Component_1.Component.bindResultToElement(env.root, result);
                expect(Component_1.Component.getResult(cmp.element)).toBe(result);
            });
        });
        describe('the static get method', function () {
            it('should return the component', function () {
                expect(Component_1.Component.get(cmp.element)).toBe(cmp);
                expect(Component_1.Component.get(cmp.element, { ID: 'Test' })).toBe(cmp);
                expect(Component_1.Component.get(cmp.element, 'Test')).toBe(cmp);
            });
            it('should return the component if there is more than one component bound', function () {
                var cmp2 = new Component_1.Component(cmp.element, 'Test2');
                expect(function () { return Component_1.Component.get(cmp.element); }).toThrow();
                expect(function () { return Component_1.Component.get(cmp.element, undefined, true); }).not.toThrow();
                expect(Component_1.Component.get(cmp.element, { ID: 'Test' })).toBe(cmp);
                expect(Component_1.Component.get(cmp.element, 'Test')).toBe(cmp);
                expect(Component_1.Component.get(cmp.element, { ID: 'Test2' })).toBe(cmp2);
                expect(Component_1.Component.get(cmp.element, 'Test2')).toBe(cmp2);
            });
            it('should return undefined and not throw if no component is bound', function () {
                var notAComponentElement = document.createElement('div');
                expect(function () { return Component_1.Component.get(notAComponentElement); }).not.toThrow();
                expect(Component_1.Component.get(notAComponentElement)).toBeUndefined();
            });
        });
        describe('the static resolveRoot method', function () {
            it('resolves the root when called on the root', function () {
                var searchInterface = Component_1.Component.resolveRoot(env.root);
                expect(searchInterface).toEqual(env.root);
            });
            it('resolves the root when called on a descendant element of the root', function () {
                var childElement = document.createElement('div');
                env.root.appendChild(childElement);
                var descendantElement = document.createElement('div');
                childElement.appendChild(descendantElement);
                var searchInterface = Component_1.Component.resolveRoot(descendantElement);
                expect(searchInterface).toEqual(env.root);
            });
            it('resolves the root when called on a descendant element of an external component', function () {
                var element = document.createElement('div');
                var component = new Component_1.Component(element, 'test', cmp.getBindings());
                var childElement = document.createElement('div');
                element.appendChild(childElement);
                var descendantElement = document.createElement('div');
                childElement.appendChild(descendantElement);
                var searchInterface = Component_1.Component.resolveRoot(descendantElement);
                expect(searchInterface).toEqual(env.root);
                expect(component.element.parentElement).toBeNull();
            });
        });
        describe('the static resolveBinding method', function () {
            it('when the specified element holds the target class, it resolves the target class', function () {
                var searchInterface = Component_1.Component.resolveBinding(env.root, SearchInterface_1.SearchInterface);
                expect(searchInterface).toBeTruthy();
            });
            it('when the specified element is the parent of the element that holds the target class, it resolves the target class', function () {
                var newParent = document.createElement('div');
                newParent.appendChild(env.root);
                var searchInterface = Component_1.Component.resolveBinding(newParent, SearchInterface_1.SearchInterface);
                expect(searchInterface).toBeTruthy();
            });
            it('when the specified element is the child of the element that holds the target class, it resolves the target class', function () {
                var newChild = document.createElement('div');
                env.root.appendChild(newChild);
                var searchInterface = Component_1.Component.resolveBinding(newChild, SearchInterface_1.SearchInterface);
                expect(searchInterface).toBeTruthy();
            });
        });
    });
}
exports.ComponentTest = ComponentTest;
 
 
/***/ }),
/* 1609 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Mock = __webpack_require__(2);
var DidYouMean_1 = __webpack_require__(675);
var Simulate_1 = __webpack_require__(15);
var Fake_1 = __webpack_require__(11);
var AnalyticsActionListMeta_1 = __webpack_require__(7);
var QueryStateModel_1 = __webpack_require__(17);
var Dom_1 = __webpack_require__(0);
function DidYouMeanTest() {
    describe('DidYouMean', function () {
        var test;
        var fakeQueryCorrection;
        function getCorrectedWord() {
            return Dom_1.$$(test.cmp.element).find('.coveo-did-you-mean-suggestion button');
        }
        beforeEach(function () {
            test = Mock.basicComponentSetup(DidYouMean_1.DidYouMean);
            fakeQueryCorrection = {
                correctedQuery: 'this is the corrected query',
                wordCorrections: [
                    {
                        offset: 12,
                        length: 9,
                        originalWord: 'corected',
                        correctedWord: 'corrected'
                    }
                ]
            };
            test.env.queryStateModel.get = function () { return 'originalquery'; };
        });
        it('should be hidden before making a query', function () {
            expect(test.cmp.element.style.display).toBe('none');
        });
        it('should be shown when there are both query corrections and results', function () {
            Simulate_1.Simulate.query(test.env, {
                results: Fake_1.FakeResults.createFakeResults(2),
                queryCorrections: [fakeQueryCorrection]
            });
            expect(test.cmp.element.style.display).not.toBe('none');
        });
        it('should be hidden when there are no query corrections', function () {
            Simulate_1.Simulate.query(test.env, {
                results: Fake_1.FakeResults.createFakeResults(0),
                queryCorrections: []
            });
            expect(test.cmp.element.style.display).toBe('none');
        });
        it('should send an analytics event when doQueryWithCorrectedTerm is called', function () {
            var analyticsSpy = jasmine.createSpy('analyticsSpy');
            test.env.usageAnalytics.logSearchEvent = analyticsSpy;
            Simulate_1.Simulate.query(test.env, {
                queryCorrections: [fakeQueryCorrection]
            });
            test.env.queryController.deferExecuteQuery = function (arg) {
                arg.beforeExecuteQuery();
            };
            test.cmp.doQueryWithCorrectedTerm();
            expect(analyticsSpy).toHaveBeenCalledWith(AnalyticsActionListMeta_1.analyticsActionCauseList.didyoumeanClick, {});
        });
        it("when there is a successful query returning results and query corrections,\n    when clicking the corrected word,\n    it calls doQueryWithCorrectedTerm", function () {
            Simulate_1.Simulate.query(test.env, { results: Fake_1.FakeResults.createFakeResults(1), queryCorrections: [fakeQueryCorrection] });
            spyOn(test.cmp, 'doQueryWithCorrectedTerm');
            getCorrectedWord().click();
            expect(test.cmp.doQueryWithCorrectedTerm).toHaveBeenCalledTimes(1);
        });
        describe('exposes options', function () {
            describe('enableAutoCorrection', function () {
                describe('set to true', function () {
                    beforeEach(function () {
                        test = Mock.optionsComponentSetup(DidYouMean_1.DidYouMean, {
                            enableAutoCorrection: true
                        });
                        test.env.queryStateModel.get = function () { return 'foobar'; };
                    });
                    it('should autocorrect the query when no results are found', function () {
                        var spy = jasmine.createSpy('queryStateModelSpy');
                        test.env.queryStateModel.set = spy;
                        Simulate_1.Simulate.query(test.env, {
                            results: Fake_1.FakeResults.createFakeResults(0),
                            queryCorrections: [fakeQueryCorrection]
                        });
                        expect(spy).toHaveBeenCalledWith(QueryStateModel_1.QueryStateModel.attributesEnum.q, 'this is the corrected query');
                    });
                    it('should only autocorrect the query once when receiving 2 responses with corrections and no results', function () {
                        var spy = jasmine.createSpy('queryStateModelSpy');
                        test.env.queryStateModel.set = spy;
                        Simulate_1.Simulate.query(test.env, {
                            results: Fake_1.FakeResults.createFakeResults(0),
                            queryCorrections: [fakeQueryCorrection]
                        });
                        Simulate_1.Simulate.query(test.env, {
                            results: Fake_1.FakeResults.createFakeResults(0),
                            queryCorrections: [fakeQueryCorrection]
                        });
                        expect(spy).toHaveBeenCalledTimes(1);
                    });
                    it('should allow to autocorrect more than once when receiving at least 1 request with results', function () {
                        var spy = jasmine.createSpy('queryStateModelSpy');
                        test.env.queryStateModel.set = spy;
                        Simulate_1.Simulate.query(test.env, {
                            results: Fake_1.FakeResults.createFakeResults(0),
                            queryCorrections: [fakeQueryCorrection]
                        });
                        Simulate_1.Simulate.query(test.env, {
                            results: Fake_1.FakeResults.createFakeResults(1)
                        });
                        Simulate_1.Simulate.query(test.env, {
                            results: Fake_1.FakeResults.createFakeResults(0),
                            queryCorrections: [fakeQueryCorrection]
                        });
                        expect(spy).toHaveBeenCalledTimes(2);
                    });
                    it('should send an analytics event when query is autocorrected', function () {
                        var analyticsSpy = jasmine.createSpy('analyticsSpy');
                        test.cmp.usageAnalytics.logSearchEvent = analyticsSpy;
                        Simulate_1.Simulate.query(test.env, {
                            results: Fake_1.FakeResults.createFakeResults(0),
                            queryCorrections: [fakeQueryCorrection]
                        });
                        expect(analyticsSpy).toHaveBeenCalledWith(AnalyticsActionListMeta_1.analyticsActionCauseList.didyoumeanAutomatic, {});
                        expect(analyticsSpy).toHaveBeenCalledTimes(1);
                    });
                    it('should replace the state in history manager when query is autocorrected', function () {
                        spyOn(test.env.searchInterface.historyManager, 'replaceState');
                        Simulate_1.Simulate.query(test.env, {
                            results: Fake_1.FakeResults.createFakeResults(0),
                            queryCorrections: [fakeQueryCorrection]
                        });
                        expect(test.env.searchInterface.historyManager.replaceState).toHaveBeenCalledTimes(1);
                    });
                });
                describe('set to false', function () {
                    beforeEach(function () {
                        test = Mock.optionsComponentSetup(DidYouMean_1.DidYouMean, {
                            enableAutoCorrection: false
                        });
                    });
                    it('should not autocorrect the query when no results are found', function () {
                        test.env.queryStateModel.get = function () { return 'foobar'; };
                        var spy = jasmine.createSpy('queryStateModelSpy');
                        test.env.queryStateModel.set = spy;
                        Simulate_1.Simulate.query(test.env, {
                            results: Fake_1.FakeResults.createFakeResults(0),
                            queryCorrections: [fakeQueryCorrection]
                        });
                        expect(spy).not.toHaveBeenCalled();
                    });
                    it('should not replace the state in history manager', function () {
                        spyOn(test.env.searchInterface.historyManager, 'replaceState');
                        Simulate_1.Simulate.query(test.env, {
                            results: Fake_1.FakeResults.createFakeResults(0),
                            queryCorrections: [fakeQueryCorrection]
                        });
                        expect(test.env.searchInterface.historyManager.replaceState).not.toHaveBeenCalled();
                    });
                });
            });
        });
        it('should not autocorrect search-as-you-type queries', function () {
            var spy = jasmine.createSpy('queryStateModelSpy');
            test.env.queryStateModel.set = spy;
            Simulate_1.Simulate.query(test.env, {
                results: Fake_1.FakeResults.createFakeResults(0),
                searchAsYouType: true,
                queryCorrections: [fakeQueryCorrection]
            });
            expect(spy).not.toHaveBeenCalled();
        });
        it('correctedTerm should be null before a query', function () {
            expect(test.cmp.correctedTerm).toBeNull();
        });
        it('correctedTerm should be initialized properly from the queryCorrections', function () {
            Simulate_1.Simulate.query(test.env, {
                queryCorrections: [fakeQueryCorrection]
            });
            expect(test.cmp.correctedTerm).toBe(fakeQueryCorrection.correctedQuery);
        });
        describe('doQueryWithCorrectedTerm', function () {
            it('should throw an exception if no query was made', function () {
                expect(function () { return test.cmp.doQueryWithCorrectedTerm(); }).toThrow();
            });
            it('should throw an exception if no corrections were available', function () {
                Simulate_1.Simulate.query(test.env, {
                    queryCorrections: []
                });
                expect(function () { return test.cmp.doQueryWithCorrectedTerm(); }).toThrow();
            });
            it('should execute a query when corrections were available', function () {
                Simulate_1.Simulate.query(test.env, {
                    queryCorrections: [fakeQueryCorrection]
                });
                var spy = jasmine.createSpy('queryStateModelSpy');
                test.env.queryStateModel.set = spy;
                test.cmp.doQueryWithCorrectedTerm();
                expect(spy).toHaveBeenCalledWith(QueryStateModel_1.QueryStateModel.attributesEnum.q, fakeQueryCorrection.correctedQuery);
                expect(spy.calls.count()).toBe(1);
            });
        });
        describe('escape the HTML against XSS', function () {
            beforeEach(function () { });
            it('when there are results', function () {
                Simulate_1.Simulate.query(test.env, {
                    queryCorrections: [
                        {
                            correctedQuery: '<script>alert("hack the internet")</script>'
                        }
                    ]
                });
                expect(getCorrectedWord().innerHTML).toBe('&lt;script&gt;alert("hack the internet")&lt;/script&gt;');
            });
            it('when query is autocorrected', function () {
                Simulate_1.Simulate.query(test.env, {
                    results: Fake_1.FakeResults.createFakeResults(10),
                    queryCorrections: [
                        {
                            correctedQuery: '<script>alert("thou shalt surely die")</script>'
                        }
                    ]
                });
                expect(getCorrectedWord().innerHTML).toBe('&lt;script&gt;alert("thou shalt surely die")&lt;/script&gt;');
            });
        });
    });
}
exports.DidYouMeanTest = DidYouMeanTest;
 
 
/***/ }),
/* 1610 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Facet_1 = __webpack_require__(32);
var QueryBuilder_1 = __webpack_require__(24);
var Mock = __webpack_require__(2);
var DistanceResources_1 = __webpack_require__(676);
var Dom_1 = __webpack_require__(0);
var DistanceEvents_1 = __webpack_require__(297);
var EventsModules_1 = __webpack_require__(109);
var QueryEvents_1 = __webpack_require__(14);
var AnalyticsActionListMeta_1 = __webpack_require__(7);
function DistanceResourcesTest() {
    describe('DistanceResources', function () {
        var latitudeForANicePlace = 46.768005;
        var longitudeForANicePlace = -71.309405;
        var distanceField = 'distance';
        var latitudeField = 'latitude';
        var longitudeField = 'longitude';
        var defaultUnitConversionFactor = 1000;
        var disabledComponentsClass = 'bloupbloup';
        var aNicePlace = { latitude: latitudeForANicePlace, longitude: longitudeForANicePlace };
        var expectedQueryFunctionForANicePlace = {
            function: "dist(" + latitudeField + ", " + longitudeField + ", " + latitudeForANicePlace + ", " + longitudeForANicePlace + ")/" + defaultUnitConversionFactor,
            fieldName: distanceField
        };
        var aValidPositionProvider = {
            getPosition: function () { return Promise.resolve(aNicePlace); }
        };
        var badPositionProvider = {
            getPosition: function () { return Promise.reject("Wow I'm so bad"); }
        };
        function triggerOnBuildingQuery() {
            Dom_1.$$(test.env.root).trigger(QueryEvents_1.QueryEvents.buildingQuery, buildingQueryArgs);
            test.env.queryController.firstQuery = false;
        }
        function triggerAfterComponentsInitialization() {
            Dom_1.$$(test.env.root).trigger(EventsModules_1.InitializationEvents.afterComponentsInitialization, afterComponentsInitialization);
        }
        var buildingQueryArgs;
        var afterComponentsInitialization;
        var defaultMockOptions;
        var test;
        beforeEach(function () {
            buildingQueryArgs = {
                cancel: false,
                queryBuilder: new QueryBuilder_1.QueryBuilder(),
                searchAsYouType: false
            };
            afterComponentsInitialization = {
                defer: []
            };
            defaultMockOptions = {
                distanceField: distanceField,
                latitudeField: latitudeField,
                longitudeField: longitudeField,
                unitConversionFactor: defaultUnitConversionFactor,
                disabledDistanceCssClass: disabledComponentsClass,
                googleApiKey: '',
                latitudeValue: 0,
                longitudeValue: 0,
                useNavigator: false,
                triggerNewQueryOnNewPosition: false,
                cancelQueryUntilPositionResolved: false
            };
            test = Mock.optionsComponentSetup(DistanceResources_1.DistanceResources, defaultMockOptions);
        });
        afterEach(function () {
            test = null;
        });
        describe('when the cancelQuery option is set', function () {
            beforeEach(function () {
                defaultMockOptions.cancelQueryUntilPositionResolved = true;
                test = Mock.optionsComponentSetup(DistanceResources_1.DistanceResources, defaultMockOptions);
            });
            it('should register an afterComponentsInitialization defer', function () {
                triggerAfterComponentsInitialization();
                expect(afterComponentsInitialization.defer.length).toBe(1);
            });
            it('should add a new query function with the given position after the position is set', function () {
                test.cmp.setPosition(latitudeForANicePlace, longitudeForANicePlace);
                triggerOnBuildingQuery();
                expect(buildingQueryArgs.queryBuilder.queryFunctions).toContain(expectedQueryFunctionForANicePlace);
            });
        });
        describe('when the triggerNewQuery option is set', function () {
            beforeEach(function () {
                defaultMockOptions.triggerNewQueryOnNewPosition = true;
                test = Mock.optionsComponentSetup(DistanceResources_1.DistanceResources, defaultMockOptions);
            });
            it('should trigger one query per setPosition', function () {
                test.cmp.setPosition(latitudeForANicePlace, longitudeForANicePlace);
                expect(test.env.queryController.executeQuery).toHaveBeenCalled();
                test.cmp.setPosition(latitudeForANicePlace, longitudeForANicePlace);
                expect(test.env.queryController.executeQuery).toHaveBeenCalledTimes(2);
            });
            it('should send an analytics search event with "positionSet" as the cause', function () {
                test.cmp.setPosition(latitudeForANicePlace, longitudeForANicePlace);
                triggerOnBuildingQuery();
                expect(test.env.usageAnalytics.logSearchEvent).toHaveBeenCalledWith(AnalyticsActionListMeta_1.analyticsActionCauseList.positionSet, jasmine.any(Object));
            });
        });
        it('should trigger onPositionResolved event with the new position when setting a position', function () {
            var spy = jasmine.createSpy('spy');
            Dom_1.$$(test.env.element).on(DistanceEvents_1.DistanceEvents.onPositionResolved, spy);
            test.cmp.setPosition(latitudeForANicePlace, longitudeForANicePlace);
            expect(spy).toHaveBeenCalledWith(jasmine.any(Object), {
                position: aNicePlace
            });
        });
        it('should add a new query function with the given position', function () {
            test.cmp.setPosition(latitudeForANicePlace, longitudeForANicePlace);
            triggerOnBuildingQuery();
            expect(buildingQueryArgs.queryBuilder.queryFunctions).toContain(expectedQueryFunctionForANicePlace);
        });
        it('should reactivate disabled distance components', function () {
            var hiddenComponent = document.createElement('div');
            hiddenComponent.classList.add(disabledComponentsClass);
            test.env.root.appendChild(hiddenComponent);
            test.cmp.setPosition(latitudeForANicePlace, longitudeForANicePlace);
            triggerOnBuildingQuery();
            expect(hiddenComponent.classList.contains(disabledComponentsClass)).toBe(false);
        });
        it('should reactivate disabled distance Coveo components', function () {
            var hiddenFacet = Mock.basicComponentSetup(Facet_1.Facet);
            hiddenFacet.cmp.element.classList.add(disabledComponentsClass);
            hiddenFacet.cmp.disable();
            expect(hiddenFacet.cmp.disabled).toBe(true);
            test.env.root.appendChild(hiddenFacet.cmp.element);
            test.cmp.setPosition(latitudeForANicePlace, longitudeForANicePlace);
            triggerOnBuildingQuery();
            expect(hiddenFacet.cmp.element.classList.contains(disabledComponentsClass)).toBe(false);
            expect(hiddenFacet.cmp.disabled).toBe(false);
        });
        describe('when a position provider is registered', function () {
            beforeEach(function () {
                Dom_1.$$(test.env.element).on(DistanceEvents_1.DistanceEvents.onResolvingPosition, function (event, args) {
                    args.providers.push(aValidPositionProvider);
                });
            });
            it('should trigger onPositionResolved event with the resolved position', function (done) {
                var spy = jasmine.createSpy('onPositionResolved');
                Dom_1.$$(test.env.element).on(DistanceEvents_1.DistanceEvents.onPositionResolved, spy);
                triggerAfterComponentsInitialization();
                test.cmp.getLastPositionRequest().then(function () {
                    expect(spy).toHaveBeenCalledWith(jasmine.any(Object), {
                        position: aNicePlace
                    });
                    done();
                });
            });
        });
        describe('when two position providers are registered', function () {
            var anotherProviderThatShouldNotBeUsed = {
                getPosition: function () { return Promise.resolve({ latitude: 0, longitude: 0 }); }
            };
            beforeEach(function () {
                Dom_1.$$(test.env.element).on(DistanceEvents_1.DistanceEvents.onResolvingPosition, function (event, args) {
                    args.providers.push(aValidPositionProvider);
                    args.providers.push(anotherProviderThatShouldNotBeUsed);
                });
            });
            it('should use the position from the first provider', function (done) {
                var spy = jasmine.createSpy('onPositionResolved');
                Dom_1.$$(test.env.element).on(DistanceEvents_1.DistanceEvents.onPositionResolved, spy);
                triggerAfterComponentsInitialization();
                test.cmp.getLastPositionRequest().then(function () {
                    expect(spy).toHaveBeenCalledWith(jasmine.any(Object), {
                        position: aNicePlace
                    });
                    done();
                });
            });
        });
        describe('when a bad position provider is registered', function () {
            beforeEach(function () {
                Dom_1.$$(test.env.element).on(DistanceEvents_1.DistanceEvents.onResolvingPosition, function (event, args) {
                    args.providers.push(badPositionProvider);
                });
            });
            it('should trigger onPositionNotResolved event', function (done) {
                var spy = jasmine.createSpy('onPositionNotResolved');
                Dom_1.$$(test.env.element).on(DistanceEvents_1.DistanceEvents.onPositionNotResolved, spy);
                triggerAfterComponentsInitialization();
                test.cmp.getLastPositionRequest().then(function () {
                    expect(spy).toHaveBeenCalled();
                    done();
                });
            });
            it('should disable the component when no position resolves', function (done) {
                test.cmp.options.cancelQueryUntilPositionResolved = true;
                triggerAfterComponentsInitialization();
                triggerOnBuildingQuery();
                test.cmp.getLastPositionRequest().then(function () {
                    expect(test.cmp.disabled).toBe(true);
                    done();
                });
            });
        });
        it('should trigger onPositionNotResolved event when no position provided', function (done) {
            var spy = jasmine.createSpy('onPositionNotResolved');
            Dom_1.$$(test.env.element).on(DistanceEvents_1.DistanceEvents.onPositionNotResolved, spy);
            triggerAfterComponentsInitialization();
            test.cmp.getLastPositionRequest().then(function () {
                expect(spy).toHaveBeenCalled();
                done();
            });
        });
    });
}
exports.DistanceResourcesTest = DistanceResourcesTest;
 
 
/***/ }),
/* 1611 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Mock = __webpack_require__(2);
var ErrorReport_1 = __webpack_require__(677);
var Simulate_1 = __webpack_require__(15);
var QueryError_1 = __webpack_require__(213);
var Dom_1 = __webpack_require__(0);
var AnalyticsActionListMeta_1 = __webpack_require__(7);
var Strings_1 = __webpack_require__(4);
function ErrorReportTest() {
    describe('ErrorReport', function () {
        var test;
        beforeEach(function () {
            test = Mock.basicComponentSetup(ErrorReport_1.ErrorReport);
        });
        afterEach(function () {
            test = null;
        });
        describe('exposes options', function () {
            it('showDetailedError allow to show the json of the error', function () {
                test = Mock.optionsComponentSetup(ErrorReport_1.ErrorReport, {
                    showDetailedError: false
                });
                Simulate_1.Simulate.query(test.env, {
                    error: new QueryError_1.QueryError({
                        statusCode: 401,
                        data: {
                            message: 'the message',
                            type: 'the type'
                        }
                    })
                });
                expect(Dom_1.$$(test.cmp.element).find('.coveo-error-report-message')).toBe(null);
                test = Mock.optionsComponentSetup(ErrorReport_1.ErrorReport, {
                    showDetailedError: true
                });
                Simulate_1.Simulate.query(test.env, {
                    error: new QueryError_1.QueryError({
                        statusCode: 401,
                        data: {
                            message: 'the message',
                            type: 'the type'
                        }
                    })
                });
                expect(Dom_1.$$(test.cmp.element).find('.coveo-error-report-message')).not.toBe(null);
            });
        });
        it('should hide by default', function () {
            expect(test.cmp.element.style.display).toBe('none');
        });
        it('should show on query error', function () {
            Simulate_1.Simulate.query(test.env, {
                error: new QueryError_1.QueryError({
                    statusCode: 401,
                    data: {
                        message: 'the message',
                        type: 'the type'
                    }
                })
            });
            expect(test.cmp.element.style.display).toBe('block');
        });
        it('should send analytics event on retry', function () {
            Simulate_1.Simulate.query(test.env, {
                error: new QueryError_1.QueryError({
                    statusCode: 401,
                    data: {
                        message: 'the message',
                        type: 'the type'
                    }
                })
            });
            test.cmp.retry();
            expect(test.cmp.usageAnalytics.logSearchEvent).toHaveBeenCalledWith(AnalyticsActionListMeta_1.analyticsActionCauseList.errorRetry, {});
        });
        it('should send analytics event on reset', function () {
            Simulate_1.Simulate.query(test.env, {
                error: new QueryError_1.QueryError({
                    statusCode: 401,
                    data: {
                        message: 'the message',
                        type: 'the type'
                    }
                })
            });
            test.cmp.reset();
            expect(test.cmp.usageAnalytics.logSearchEvent).toHaveBeenCalledWith(AnalyticsActionListMeta_1.analyticsActionCauseList.errorClearQuery, {});
        });
        it('should display a different error message if the error is a NoEndpointsException', function () {
            Simulate_1.Simulate.query(test.env, {
                error: new QueryError_1.QueryError({
                    statusCode: 408,
                    data: {
                        message: 'the message',
                        type: 'NoEndpointsException',
                        name: 'NoEndpointsException'
                    }
                })
            });
            expect(Dom_1.$$(Dom_1.$$(test.cmp.root).find('.coveo-error-report-title')).text()).toEqual(Strings_1.l('NoEndpoints', 'foobar') + Strings_1.l('AddSources'));
        });
        it('should display a different error message is cause by an invalid token', function () {
            Simulate_1.Simulate.query(test.env, {
                error: new QueryError_1.QueryError({
                    statusCode: 408,
                    data: {
                        message: 'the message',
                        type: 'InvalidTokenException',
                        name: 'InvalidTokenException'
                    }
                })
            });
            expect(Dom_1.$$(Dom_1.$$(test.cmp.root).find('.coveo-error-report-title')).text()).toEqual(Strings_1.l('CannotAccess', 'foobar') + Strings_1.l('InvalidToken'));
        });
        it('should display a different error message is cause by the usage of both Facet and DynamicFacet components', function () {
            Simulate_1.Simulate.query(test.env, {
                error: new QueryError_1.QueryError({
                    statusCode: 400,
                    data: {
                        message: 'the message',
                        type: 'GroupByAndFacetBothExistingException',
                        name: 'GroupByAndFacetBothExistingException'
                    }
                })
            });
            expect(Dom_1.$$(Dom_1.$$(test.cmp.root).find('.coveo-error-report-title')).text()).toEqual(Strings_1.l('OopsError') + Strings_1.l('GroupByAndFacetRequestsCannotCoexist'));
        });
        it('should display a different error message when the organization is paused', function () {
            Simulate_1.Simulate.query(test.env, {
                error: new QueryError_1.QueryError({
                    statusCode: 400,
                    data: {
                        message: 'the message',
                        type: 'OrganizationIsPausedException',
                        name: 'OrganizationIsPausedException'
                    }
                })
            });
            expect(Dom_1.$$(Dom_1.$$(test.cmp.root).find('.coveo-error-report-title')).text()).toEqual(Strings_1.l('OrganizationWillResume') + Strings_1.l('OrganizationIsPaused'));
        });
        it('should display error report options with possible actions', function () {
            Simulate_1.Simulate.query(test.env, {
                error: new QueryError_1.QueryError({
                    statusCode: 401,
                    data: {
                        message: 'the message',
                        type: 'the type'
                    }
                })
            });
            expect(Dom_1.$$(test.cmp.element).find('.coveo-error-report-options')).not.toBeNull();
        });
        it('should display only 1 error report options with multiple successive query errors', function () {
            Simulate_1.Simulate.query(test.env, {
                error: new QueryError_1.QueryError({
                    statusCode: 401,
                    data: {
                        message: 'the message',
                        type: 'the type'
                    }
                })
            });
            expect(Dom_1.$$(test.cmp.element).findAll('.coveo-error-report-options').length).toBe(1);
            Simulate_1.Simulate.query(test.env, {
                error: new QueryError_1.QueryError({
                    statusCode: 401,
                    data: {
                        message: 'the message',
                        type: 'the type'
                    }
                })
            });
            expect(Dom_1.$$(test.cmp.element).findAll('.coveo-error-report-options').length).toBe(1);
        });
    });
}
exports.ErrorReportTest = ErrorReportTest;
 
 
/***/ }),
/* 1612 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Mock = __webpack_require__(2);
var Excerpt_1 = __webpack_require__(678);
var Fake_1 = __webpack_require__(11);
var HighlightUtils_1 = __webpack_require__(82);
function ExcerptTest() {
    describe('Excerpt', function () {
        var test;
        var fakeResult;
        beforeEach(function () {
            fakeResult = Fake_1.FakeResults.createFakeResult();
            fakeResult.excerpt = 'This is the excerpt';
            fakeResult.excerptHighlights = [
                {
                    offset: 12,
                    length: 7
                }
            ];
            test = Mock.advancedResultComponentSetup(Excerpt_1.Excerpt, fakeResult, undefined);
        });
        afterEach(function () {
            test = null;
            fakeResult = null;
        });
        it('should highlight the keywords', function () {
            var expectedExcerpt = HighlightUtils_1.HighlightUtils.highlightString(fakeResult.excerpt, fakeResult.excerptHighlights, null, 'coveo-highlight');
            expect(test.cmp.element.innerHTML).toEqual(expectedExcerpt);
        });
    });
}
exports.ExcerptTest = ExcerptTest;
 
 
/***/ }),
/* 1613 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { Iif (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        Iif (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            Iif (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
            Iif (y = 0, t) op = [0, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    Eif (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        Iif (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
Object.defineProperty(exports, "__esModule", { value: true });
var Mock = __webpack_require__(2);
var ExportToExcel_1 = __webpack_require__(679);
var AnalyticsActionListMeta_1 = __webpack_require__(7);
var Core_1 = __webpack_require__(9);
function ExportToExcelTest() {
    describe('ExportToExcel', function () {
        var _this = this;
        var options = {};
        var test;
        function initExportToExcel() {
            test = Mock.optionsComponentSetup(ExportToExcel_1.ExportToExcel, options);
            test.cmp._window = Mock.mockWindow();
        }
        function buildAnchorWithClickSpy() {
            var a = document.createElement('a');
            spyOn(a, 'click');
            return a;
        }
        beforeEach(function () {
            options = {};
            ExportToExcel_1.setCreateAnchor(function () { return buildAnchorWithClickSpy(); });
            initExportToExcel();
        });
        describe('calling #download', function () {
            it("calls fetchBinary with format set to 'xlsx'", function () {
                test.cmp.download();
                expect(test.env.searchEndpoint.fetchBinary).toHaveBeenCalledWith(jasmine.objectContaining({ format: 'xlsx' }));
            });
            it('calls fetchBinary with the default number of results', function () {
                test.cmp.download();
                expect(test.env.searchEndpoint.fetchBinary).toHaveBeenCalledWith(jasmine.objectContaining({ numberOfResults: 100 }));
            });
            it('should call exportToExcel event if query was made', function () {
                var excelSpy = jasmine.createSpy('excelSpy');
                test.env.usageAnalytics.logCustomEvent = excelSpy;
                test.cmp.download();
                expect(excelSpy).toHaveBeenCalledWith(AnalyticsActionListMeta_1.analyticsActionCauseList.exportToExcel, {}, test.env.element);
            });
            it('sets on an achor element href attribute the blob url', function (done) { return __awaiter(_this, void 0, void 0, function () {
                var a;
                return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0:
                            a = buildAnchorWithClickSpy();
                            ExportToExcel_1.setCreateAnchor(function () { return a; });
                            test.cmp.download();
                            return [4 /*yield*/, Promise.resolve({})];
                        case 1:
                            _a.sent();
                            expect(a.href).toContain('blob:http://localhost');
                            done();
                            return [2 /*return*/];
                    }
                });
            }); });
            it('sets on an achor element the download attribute', function (done) { return __awaiter(_this, void 0, void 0, function () {
                var a;
                return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0:
                            a = buildAnchorWithClickSpy();
                            ExportToExcel_1.setCreateAnchor(function () { return a; });
                            test.cmp.download();
                            return [4 /*yield*/, Promise.resolve({})];
                        case 1:
                            _a.sent();
                            expect(a.download).toBeTruthy();
                            done();
                            return [2 /*return*/];
                    }
                });
            }); });
            it('clicks the anchor element', function (done) { return __awaiter(_this, void 0, void 0, function () {
                var a;
                return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0:
                            a = buildAnchorWithClickSpy();
                            ExportToExcel_1.setCreateAnchor(function () { return a; });
                            test.cmp.download();
                            return [4 /*yield*/, Promise.resolve({})];
                        case 1:
                            _a.sent();
                            expect(a.click).toHaveBeenCalledTimes(1);
                            done();
                            return [2 /*return*/];
                    }
                });
            }); });
            describe('on IE11', function () {
                var createAnchorSpy;
                var msSaveOrOpenBlobSpy;
                beforeEach(function (done) { return __awaiter(_this, void 0, void 0, function () {
                    return __generator(this, function (_a) {
                        switch (_a.label) {
                            case 0:
                                ExportToExcel_1.setCreateAnchor((createAnchorSpy = jasmine.createSpy('createAnchor')));
                                window.navigator.msSaveOrOpenBlob = msSaveOrOpenBlobSpy = jasmine.createSpy('msSaveOrOpenBlob');
                                test.cmp.download();
                                return [4 /*yield*/, Core_1.Utils.resolveAfter(0)];
                            case 1:
                                _a.sent();
                                done();
                                return [2 /*return*/];
                        }
                    });
                }); });
                afterEach(function () {
                    delete window.navigator.msSaveOrOpenBlob;
                });
                it("doesn't create an anchor element", function () {
                    expect(createAnchorSpy).not.toHaveBeenCalled();
                });
                it('calls msSaveOrOpenBlob', function () {
                    expect(msSaveOrOpenBlobSpy).toHaveBeenCalledTimes(1);
                });
                it('downloads the right blob', function () {
                    expect(URL.createObjectURL(msSaveOrOpenBlobSpy.calls.mostRecent().args[0])).toContain('blob:http://localhost');
                });
            });
            it('revokes the blob object url', function (done) { return __awaiter(_this, void 0, void 0, function () {
                var spy;
                return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0:
                            spy = jasmine.createSpy('revokeObjectUrl');
                            window.URL.revokeObjectURL = spy;
                            test.cmp.download();
                            return [4 /*yield*/, Promise.resolve({})];
                        case 1:
                            _a.sent();
                            expect(spy).toHaveBeenCalledTimes(1);
                            done();
                            return [2 /*return*/];
                    }
                });
            }); });
        });
        describe('exposes options', function () {
            it('numberOfResults calls search endpoint with appropriate number of results', function () {
                options.numberOfResults = 200;
                initExportToExcel();
                test.cmp.download();
                expect(test.env.searchEndpoint.fetchBinary).toHaveBeenCalledWith(jasmine.objectContaining({ numberOfResults: 200 }));
            });
            it('fieldsToInclude allows to specify the needed fields to download', function () {
                options.fieldsToInclude = ['@foo', '@bar'];
                initExportToExcel();
                test.cmp.download();
                expect(test.env.searchEndpoint.fetchBinary).toHaveBeenCalledWith(jasmine.objectContaining({
                    fieldsToInclude: jasmine.arrayContaining(['@foo', '@bar'])
                }));
            });
            it('fieldsToInclude not being specified means the fields to include will be "null" in the query', function () {
                options.fieldsToInclude = null;
                initExportToExcel();
                test.cmp.download();
                expect(test.env.searchEndpoint.fetchBinary).not.toHaveBeenCalledWith(jasmine.objectContaining({
                    fieldsToInclude: jasmine.anything()
                }));
            });
        });
    });
}
exports.ExportToExcelTest = ExportToExcelTest;
 
 
/***/ }),
/* 1614 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var ExpressionBuilder_1 = __webpack_require__(87);
function ExpressionBuilderTest() {
    describe('ExpressionBuilder', function () {
        var expressionBuilder;
        beforeEach(function () {
            expressionBuilder = new ExpressionBuilder_1.ExpressionBuilder();
        });
        afterEach(function () {
            expressionBuilder = null;
        });
        it('can add an expression', function () {
            expressionBuilder.add('foo');
            expressionBuilder.add('bar');
            expect(expressionBuilder.build()).toBe('(foo) (bar)');
        });
        it('can add a fieldExpression', function () {
            expressionBuilder.addFieldExpression('@foo', '==', ['bar1', 'bar2', 'bar3']);
            expect(expressionBuilder.build()).toBe('@foo==(bar1,bar2,bar3)');
            expressionBuilder.addFieldExpression('@foo2', '<>', ['bar 1', 'bar 2', 'bar 3']);
            expect(expressionBuilder.build()).toBe('(@foo==(bar1,bar2,bar3)) (@foo2<>("bar 1","bar 2","bar 3"))');
        });
        it('can add a field not equal expression', function () {
            expressionBuilder.addFieldNotEqualExpression('@foo', ['bar 1', 'bar2', 'bar3']);
            expect(expressionBuilder.build()).toBe('(NOT @foo==("bar 1",bar2,bar3))');
        });
        it('can be built while empty, and return undefined', function () {
            expect(expressionBuilder.build()).toBeUndefined();
        });
        it('can be merged with another expression builder', function () {
            var expressionBuilder2 = new ExpressionBuilder_1.ExpressionBuilder();
            expressionBuilder.add('1');
            expressionBuilder2.add('2');
            expect(ExpressionBuilder_1.ExpressionBuilder.merge(expressionBuilder, expressionBuilder2).build()).toBe('(1) (2)');
        });
        it('can merge using OR', function () {
            var builder1 = new ExpressionBuilder_1.ExpressionBuilder();
            var builder2 = new ExpressionBuilder_1.ExpressionBuilder();
            var builder3 = new ExpressionBuilder_1.ExpressionBuilder();
            builder1.add('foo');
            builder1.add('bar');
            builder2.add('spam');
            var merged = ExpressionBuilder_1.ExpressionBuilder.mergeUsingOr(builder1, builder2, builder3);
            expect(merged.build()).toBe('((foo) (bar)) OR (spam)');
            merged = ExpressionBuilder_1.ExpressionBuilder.mergeUsingOr(builder1);
            expect(merged.build()).toBe('(foo) (bar)');
            merged = ExpressionBuilder_1.ExpressionBuilder.mergeUsingOr(builder1, builder3);
            expect(merged.build()).toBe('(foo) (bar)');
            merged = ExpressionBuilder_1.ExpressionBuilder.mergeUsingOr(builder3);
            expect(merged.build()).toBeUndefined();
        });
        it("can tell if it's empty", function () {
            expect(expressionBuilder.isEmpty()).toBe(true);
            expressionBuilder.add('foo');
            expect(expressionBuilder.isEmpty()).toBe(false);
        });
        it('can remove an expression', function () {
            expressionBuilder.add('foo');
            expressionBuilder.add('bar');
            expressionBuilder.addFieldNotEqualExpression('@field', ['a', 'b', 'c']);
            expressionBuilder.remove('bar');
            expect(expressionBuilder.build()).toBe('(foo) ((NOT @field==(a,b,c)))');
            expressionBuilder.remove('(NOT @field==(a,b,c))');
            expect(expressionBuilder.build()).toBe('foo');
        });
    });
}
exports.ExpressionBuilderTest = ExpressionBuilderTest;
 
 
/***/ }),
/* 1615 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var FacetHeader_1 = __webpack_require__(235);
var Dom_1 = __webpack_require__(0);
var Facet_1 = __webpack_require__(32);
var CustomMatchers_1 = __webpack_require__(104);
var Mock = __webpack_require__(2);
var FacetSettings_1 = __webpack_require__(241);
var Simulate_1 = __webpack_require__(15);
var Core_1 = __webpack_require__(9);
function FacetHeaderTest() {
    describe('FacetHeader', function () {
        var facetHeader;
        var baseOptions;
        function initFacetHeader() {
            facetHeader = new FacetHeader_1.FacetHeader(baseOptions);
            facetHeader.build();
        }
        beforeEach(function () {
            baseOptions = {
                facetElement: document.createElement('div'),
                title: 'foo',
                field: '@field',
                enableClearElement: true,
                enableCollapseElement: true
            };
        });
        afterEach(function () {
            baseOptions = null;
            facetHeader = null;
        });
        it('should build a title', function () {
            baseOptions.title = 'this is a title';
            initFacetHeader();
            var title = Dom_1.$$(facetHeader.element).find('.coveo-facet-header-title');
            expect(Dom_1.$$(title).text()).toBe('this is a title');
        });
        it('the title should be accessible', function () {
            baseOptions.title = 'this is a title';
            initFacetHeader();
            var title = Dom_1.$$(facetHeader.element).find('.coveo-facet-header-title');
            expect(Dom_1.$$(title).getAttribute('role')).toBe('heading');
            expect(Dom_1.$$(title).getAttribute('aria-level')).toBe('2');
            expect(Dom_1.$$(title).getAttribute('aria-label')).toBeTruthy();
        });
        it('should build an icon if specified', function () {
            baseOptions.icon = 'this-is-an-icon';
            initFacetHeader();
            var icon = Dom_1.$$(facetHeader.element).find('.coveo-icon-custom.this-is-an-icon');
            expect(icon).not.toBeNull();
        });
        describe('with a facet', function () {
            beforeEach(function () {
                baseOptions.facet = Mock.optionsComponentSetup(Facet_1.Facet, {
                    field: '@field'
                }).cmp;
                CustomMatchers_1.registerCustomMatcher();
            });
            it('toggle operator should be available if the facet has the option', function () {
                baseOptions.facet.options.enableTogglingOperator = true;
                initFacetHeader();
                expect(facetHeader.operatorElement.style.display).toEqual('block');
                baseOptions.facet.options.enableTogglingOperator = false;
                initFacetHeader();
                expect(facetHeader.operatorElement.style.display).toEqual('none');
            });
            it('allow to collapse and expand a facet', function () {
                baseOptions.settingsKlass = FacetSettings_1.FacetSettings;
                initFacetHeader();
                facetHeader.collapseFacet();
                expect(Dom_1.$$(facetHeader.options.facetElement).hasClass('coveo-facet-collapsed')).toBe(true);
                facetHeader.expandFacet();
                expect(Dom_1.$$(facetHeader.options.facetElement).hasClass('coveo-facet-collapsed')).not.toBe(true);
            });
            it('allow to switch or and and', function () {
                var facet = baseOptions.facet;
                facet.options.enableTogglingOperator = true;
                facet.getSelectedValues = jasmine.createSpy('spy');
                facet.getSelectedValues.and.returnValue(['a', 'b']);
                baseOptions.settingsKlass = FacetSettings_1.FacetSettings;
                initFacetHeader();
                facetHeader.switchToOr();
                expect(facet.queryStateModel.set).toHaveBeenCalledWith(facet.operatorAttributeId, 'or');
                facetHeader.switchToAnd();
                expect(facet.queryStateModel.set).toHaveBeenCalledWith(facet.operatorAttributeId, 'and');
                facetHeader.operatorElement.click();
                facetHeader.operatorElement.click();
                expect(facet.queryController.executeQuery).toHaveBeenCalledTimes(2);
            });
            describe('when the facet has one selected value', function () {
                beforeEach(function () {
                    baseOptions.facet.selectValue('foobar');
                    initFacetHeader();
                });
                it('when clicking the eraser, it resets the facet', function () {
                    facetHeader.eraserElement.click();
                    expect(baseOptions.facet.getSelectedValues().length).toBe(0);
                });
                it('when pressing Enter key on the eraser, it resets the facet', function () {
                    Simulate_1.Simulate.keyUp(facetHeader.eraserElement, Core_1.KEYBOARD.ENTER);
                    expect(baseOptions.facet.getSelectedValues().length).toBe(0);
                });
            });
        });
    });
}
exports.FacetHeaderTest = FacetHeaderTest;
 
 
/***/ }),
/* 1616 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Facet_1 = __webpack_require__(32);
var Mock = __webpack_require__(2);
var FacetSearchParameters_1 = __webpack_require__(119);
var FacetValue_1 = __webpack_require__(51);
var Dom_1 = __webpack_require__(0);
var QueryBuilder_1 = __webpack_require__(24);
var AllowedValuesPatternType_1 = __webpack_require__(233);
function FacetSearchParametersTest() {
    describe('FacetSearchParameters', function () {
        var mockFacet;
        beforeEach(function () {
            mockFacet = Mock.mock(Facet_1.Facet);
            mockFacet.options = {};
            mockFacet.options.numberOfValuesInFacetSearch = 10;
            mockFacet.options.facetSearchIgnoreAccents = false;
            mockFacet.searchInterface = {};
        });
        afterEach(function () {
            mockFacet = null;
        });
        it('should allow to set value to search and expand it with different captions', function () {
            var params = new FacetSearchParameters_1.FacetSearchParameters(mockFacet);
            params.setValueToSearch('test');
            expect(params.alwaysInclude).toContain('test');
            mockFacet.options.valueCaption = {
                foo: 'test',
                bar: 'testing'
            };
            params = new FacetSearchParameters_1.FacetSearchParameters(mockFacet);
            params.setValueToSearch('test');
            expect(params.alwaysInclude).toContain('test');
            expect(params.alwaysInclude).toContain('foo');
            expect(params.alwaysInclude).toContain('bar');
        });
        it('should allow to build a group by request', function () {
            var params = new FacetSearchParameters_1.FacetSearchParameters(mockFacet);
            params.setValueToSearch('testing');
            var req = params.getGroupByRequest();
            expect(req.allowedValues).toContain('*testing*');
            expect(req.maximumNumberOfValues).toBe(mockFacet.options.numberOfValuesInFacetSearch);
            expect(req.field).toBe(mockFacet.options.field);
            expect(req.sortCriteria).toBe(params.sortCriteria);
            mockFacet.options.computedField = '@computefield';
            mockFacet.options.computedFieldOperation = 'sum';
            req = params.getGroupByRequest();
            expect(req.computedFields[0].field).toBe('@computefield');
            expect(req.computedFields[0].operation).toBe('sum');
        });
        describe('with facet having displayed values', function () {
            var elem;
            beforeEach(function () {
                mockFacet.options.valueCaption = {
                    foo: 'test',
                    bar: 'testing'
                };
                var spy = mockFacet.getDisplayedFacetValues;
                spy.and.returnValue([FacetValue_1.FacetValue.createFromValue('a'), FacetValue_1.FacetValue.createFromValue('b'), FacetValue_1.FacetValue.createFromValue('c')]);
                elem = document.createElement('div');
                var oneValue = document.createElement('div');
                var twoValue = document.createElement('div');
                Dom_1.$$(oneValue).text('test');
                Dom_1.$$(twoValue).text('qwerty');
                oneValue.className = 'coveo-facet-value-caption';
                twoValue.className = 'coveo-facet-value-caption';
                elem.appendChild(oneValue);
                elem.appendChild(twoValue);
            });
            afterEach(function () {
                elem = null;
            });
            it('allows to exclude currently displayed values in search', function () {
                var params = new FacetSearchParameters_1.FacetSearchParameters(mockFacet);
                params.excludeCurrentlyDisplayedValuesInSearch(elem);
                expect(params.alwaysExclude.length).toBe(7);
                expect(params.alwaysExclude).toContain('test');
                expect(params.alwaysExclude).toContain('foo');
                expect(params.alwaysExclude).toContain('bar');
                expect(params.alwaysExclude).toContain('qwerty');
                expect(params.alwaysExclude).toContain('a');
                expect(params.alwaysExclude).toContain('b');
                expect(params.alwaysExclude).toContain('c');
            });
            it('allows to create a group by', function () {
                var params = new FacetSearchParameters_1.FacetSearchParameters(mockFacet);
                params.setValueToSearch('qwerty');
                var groupBy = params.getGroupByRequest();
                expect(groupBy.allowedValues).toContain('*qwerty*');
                expect(groupBy.allowedValues).not.toContain('test');
                expect(groupBy.allowedValues).not.toContain('c');
                params.excludeCurrentlyDisplayedValuesInSearch(elem);
                groupBy = params.getGroupByRequest();
                expect(groupBy.allowedValues).toContain('*qwerty*');
                expect(groupBy.allowedValues).toContain('test');
                expect(groupBy.allowedValues).toContain('c');
            });
            it('uses legacy as allowedValuesPatternType by default', function () {
                var params = new FacetSearchParameters_1.FacetSearchParameters(mockFacet);
                var groupBy = params.getGroupByRequest();
                expect(groupBy.allowedValuesPatternType).toBe(AllowedValuesPatternType_1.AllowedValuesPatternType.Legacy);
            });
            it('uses wildcards as allowedValuesPatternType when the useWildcardsInFacetSearch option on the facet is set to true', function () {
                mockFacet.options.useWildcardsInFacetSearch = true;
                var params = new FacetSearchParameters_1.FacetSearchParameters(mockFacet);
                var groupBy = params.getGroupByRequest();
                expect(groupBy.allowedValuesPatternType).toBe(AllowedValuesPatternType_1.AllowedValuesPatternType.Wildcards);
            });
            describe('should duplicate query', function () {
                var spy;
                var builder;
                beforeEach(function () {
                    spy = jasmine.createSpy('spy');
                    builder = new QueryBuilder_1.QueryBuilder();
                    mockFacet.queryController = {};
                    mockFacet.queryController.getLastQuery = spy;
                    mockFacet.facetQueryController = {};
                    mockFacet.facetQueryController.basicExpressionToUseForFacetSearch = '@basic';
                    mockFacet.facetQueryController.advancedExpressionToUseForFacetSearch = '@advanced';
                    mockFacet.facetQueryController.constantExpressionToUseForFacetSearch = '@constant';
                });
                afterEach(function () {
                    spy = null;
                    builder = null;
                });
                it('should contain the same parameters as last one', function () {
                    builder.enablePartialMatch = true;
                    builder.enableQuerySyntax = true;
                    spy.and.returnValue(builder.build());
                    var params = new FacetSearchParameters_1.FacetSearchParameters(mockFacet);
                    expect(params.getQuery().partialMatch).toBe(true);
                    expect(params.getQuery().q).toBe('@basic');
                    expect(params.getQuery().aq).toBe('@advanced');
                    expect(params.getQuery().cq).toBe('@constant');
                });
                it('should force the duplicated query to enable query syntax, with @uri in basic expression', function () {
                    builder.enableQuerySyntax = false;
                    mockFacet.facetQueryController.basicExpressionToUseForFacetSearch = '@uri';
                    spy.and.returnValue(builder.build());
                    var params = new FacetSearchParameters_1.FacetSearchParameters(mockFacet);
                    expect(params.getQuery().enableQuerySyntax).toBe(true);
                    expect(params.getQuery().q).toBe('<@- @uri -@>');
                    expect(params.getQuery().aq).toBe('@advanced');
                    expect(params.getQuery().cq).toBe('@constant');
                });
                it('should force the duplicated query to enable query syntax, with a field expression in basic expression', function () {
                    builder.enableQuerySyntax = false;
                    mockFacet.facetQueryController.basicExpressionToUseForFacetSearch = '@test=a';
                    spy.and.returnValue(builder.build());
                    var params = new FacetSearchParameters_1.FacetSearchParameters(mockFacet);
                    expect(params.getQuery().enableQuerySyntax).toBe(true);
                    expect(params.getQuery().q).toBe('<@- @test=a -@>');
                    expect(params.getQuery().aq).toBe('@advanced');
                    expect(params.getQuery().cq).toBe('@constant');
                });
                it('should not modify the basic expression if query syntax was originally enabled', function () {
                    builder.enableQuerySyntax = true;
                    mockFacet.facetQueryController.basicExpressionToUseForFacetSearch = '@test=a';
                    spy.and.returnValue(builder.build());
                    var params = new FacetSearchParameters_1.FacetSearchParameters(mockFacet);
                    expect(params.getQuery().enableQuerySyntax).toBe(true);
                    expect(params.getQuery().q).toBe('@test=a');
                    expect(params.getQuery().aq).toBe('@advanced');
                    expect(params.getQuery().cq).toBe('@constant');
                });
                it('should not modify the basic expression with @uri if query syntax was originally enabled', function () {
                    builder.enableQuerySyntax = true;
                    mockFacet.facetQueryController.basicExpressionToUseForFacetSearch = '@uri';
                    spy.and.returnValue(builder.build());
                    var params = new FacetSearchParameters_1.FacetSearchParameters(mockFacet);
                    expect(params.getQuery().enableQuerySyntax).toBe(true);
                    expect(params.getQuery().q).toBe('@uri');
                    expect(params.getQuery().aq).toBe('@advanced');
                    expect(params.getQuery().cq).toBe('@constant');
                });
                it('should use the same group by parameters as the facet', function () {
                    mockFacet.options.sortCriteria = 'alphaascending';
                    spy.and.returnValue(builder.build());
                    var params = new FacetSearchParameters_1.FacetSearchParameters(mockFacet);
                    expect(params.getQuery().groupBy[0].sortCriteria).toBe('alphaascending');
                    mockFacet.options.sortCriteria = 'occurences';
                    expect(params.getQuery().groupBy[0].sortCriteria).toBe('occurences');
                });
            });
        });
    });
}
exports.FacetSearchParametersTest = FacetSearchParametersTest;
 
 
/***/ }),
/* 1617 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { Iif (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        Iif (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            Iif (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
            Iif (y = 0, t) op = [0, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    Eif (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        Iif (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
Object.defineProperty(exports, "__esModule", { value: true });
var Mock = __webpack_require__(2);
var Facet_1 = __webpack_require__(32);
var FacetSearch_1 = __webpack_require__(147);
var FacetSearchValuesList_1 = __webpack_require__(240);
var Dom_1 = __webpack_require__(0);
var FacetQueryController_1 = __webpack_require__(184);
var Fake_1 = __webpack_require__(11);
var FacetSearchParameters_1 = __webpack_require__(119);
var Simulate_1 = __webpack_require__(15);
var KeyboardUtils_1 = __webpack_require__(35);
var Strings_1 = __webpack_require__(4);
function FacetSearchTest() {
    var _this = this;
    describe('FacetSearch', function () {
        var mockFacet;
        var facetSearch;
        function allSearchResults() {
            return Dom_1.$$(facetSearch.searchResults).findAll('li');
        }
        function getSearchResult(index) {
            var listItem = allSearchResults()[index];
            return Dom_1.$$(listItem);
        }
        function searchWithValues(values) {
            var promise = Promise.resolve(values);
            mockFacet.facetQueryController.search.and.returnValue(promise);
            return promise;
        }
        function searchWithError(error) {
            var promise = Promise.reject(error);
            mockFacet.facetQueryController.search.and.returnValue(promise);
            return promise;
        }
        beforeEach(function () {
            var options = {
                field: '@field'
            };
            Simulate_1.Simulate.removeJQuery();
            mockFacet = Mock.basicComponentSetup(Facet_1.Facet, options).cmp;
            facetSearch = new FacetSearch_1.FacetSearch(mockFacet, FacetSearchValuesList_1.FacetSearchValuesList, mockFacet.root);
        });
        afterEach(function () {
            mockFacet = null;
            facetSearch = null;
        });
        it('input should have correct attributes', function () {
            var built = facetSearch.build();
            expect(Dom_1.$$(built).find('input').getAttribute('autocapitalize')).toBe('off');
            expect(Dom_1.$$(built).find('input').getAttribute('autocorrect')).toBe('off');
            expect(Dom_1.$$(built).find('input').getAttribute('form')).toBe('coveo-dummy-form');
        });
        describe('perform search on the index', function () {
            beforeEach(function () {
                mockFacet.facetQueryController = Mock.mock(FacetQueryController_1.FacetQueryController);
                facetSearch.build();
            });
            afterEach(function () {
                mockFacet = null;
                facetSearch = null;
            });
            it('should display facet search results', function (done) {
                var pr = searchWithValues(Fake_1.FakeResults.createFakeFieldValues('foo', 10));
                var params = new FacetSearchParameters_1.FacetSearchParameters(mockFacet);
                expect(allSearchResults().length).toBe(0);
                expect(facetSearch.currentlyDisplayedResults).toBeUndefined();
                facetSearch.triggerNewFacetSearch(params);
                pr.then(function () {
                    expect(allSearchResults().length).toBe(10);
                    expect(facetSearch.currentlyDisplayedResults.length).toBe(10);
                    done();
                });
            });
            describe('when calling focus', function () {
                var setExpandedFacetSearchAccessibilityAttributes;
                var facetSearchId;
                beforeEach(function () {
                    setExpandedFacetSearchAccessibilityAttributes = spyOn(facetSearch, 'setExpandedFacetSearchAccessibilityAttributes');
                    facetSearchId = facetSearch.facetSearchElement['facetSearchId'];
                    facetSearch.focus();
                });
                it("should update the accessible element's accessibility properties", function () {
                    expect(setExpandedFacetSearchAccessibilityAttributes).toHaveBeenCalledTimes(1);
                    expect(setExpandedFacetSearchAccessibilityAttributes).toHaveBeenCalledWith(facetSearch.facetSearchElement['searchResults']);
                });
                it('should give the "combobox" role to the combobox', function () {
                    expect(facetSearch.facetSearchElement.combobox.getAttribute('role')).toEqual('combobox');
                });
                it('should give the combobox the aria-owns attribute', function () {
                    expect(facetSearch.facetSearchElement.combobox.getAttribute('aria-owns')).toEqual(facetSearchId);
                });
                it('should give the input the aria-controls attribute', function () {
                    expect(facetSearch.facetSearchElement.input.getAttribute('aria-controls')).toEqual(facetSearchId);
                });
                it("should set aria-expanded to true on the input's element", function () {
                    expect(facetSearch.facetSearchElement.input.getAttribute('aria-expanded')).toEqual('true');
                });
            });
            describe('when triggering a query', function () {
                beforeEach(function (done) { return __awaiter(_this, void 0, void 0, function () {
                    var pr, params;
                    return __generator(this, function (_a) {
                        switch (_a.label) {
                            case 0:
                                pr = searchWithValues(Fake_1.FakeResults.createFakeFieldValues('foo', 10));
                                Dom_1.$$('div').append(facetSearch.search);
                                params = new FacetSearchParameters_1.FacetSearchParameters(mockFacet);
                                expect(allSearchResults().length).toBe(0);
                                expect(facetSearch.currentlyDisplayedResults).toBeUndefined();
                                facetSearch.triggerNewFacetSearch(params);
                                return [4 /*yield*/, pr];
                            case 1:
                                _a.sent();
                                done();
                                return [2 /*return*/];
                        }
                    });
                }); });
                it('should have displayed results', function () {
                    expect(allSearchResults().length).toBe(10);
                    expect(facetSearch.currentlyDisplayedResults.length).toBe(10);
                });
                it('should append search results immediately after the search box', function () {
                    var _a = facetSearch.facetSearchElement, search = _a.search, searchResults = _a.searchResults;
                    expect(search.nextSibling).toBe(searchResults);
                });
                describe('and calling dismissSearchResults', function () {
                    var setCollapsedFacetSearchAccessibilityAttributes;
                    beforeEach(function () {
                        setCollapsedFacetSearchAccessibilityAttributes = spyOn(facetSearch, 'setCollapsedFacetSearchAccessibilityAttributes');
                        facetSearch.dismissSearchResults();
                    });
                    it('should hide facet search results', function (done) {
                        expect(allSearchResults().length).toBe(0);
                        expect(facetSearch.currentlyDisplayedResults).toBeUndefined();
                        done();
                    });
                    it("should update the accessible element's accessibility properties", function () {
                        expect(setCollapsedFacetSearchAccessibilityAttributes).toHaveBeenCalledTimes(1);
                    });
                    it("should remove the combobox's aria-owns attribute", function () {
                        expect(facetSearch.facetSearchElement.combobox.getAttribute('aria-owns')).toBeNull();
                    });
                    it("should remove the input's aria-controls attribute", function () {
                        expect(facetSearch.facetSearchElement.input.getAttribute('aria-controls')).toBeNull();
                    });
                    it("should set aria-expanded to false on the input's element", function () {
                        expect(facetSearch.facetSearchElement.input.getAttribute('aria-expanded')).toEqual('false');
                    });
                });
            });
            describe('when triggering a query with no results', function () {
                beforeEach(function (done) { return __awaiter(_this, void 0, void 0, function () {
                    var pr, params;
                    return __generator(this, function (_a) {
                        switch (_a.label) {
                            case 0:
                                pr = searchWithValues([]);
                                Dom_1.$$('div').append(facetSearch.search);
                                params = new FacetSearchParameters_1.FacetSearchParameters(mockFacet);
                                expect(allSearchResults().length).toBe(0);
                                expect(facetSearch.currentlyDisplayedResults).toBeUndefined();
                                facetSearch.triggerNewFacetSearch(params);
                                return [4 /*yield*/, pr];
                            case 1:
                                _a.sent();
                                done();
                                return [2 /*return*/];
                        }
                    });
                }); });
                it("should set aria-expanded to true on the input's element", function () {
                    expect(facetSearch.facetSearchElement.input.getAttribute('aria-expanded')).toEqual('true');
                });
                it('should contain only a "no values found" element', function () {
                    expect(Dom_1.$$(facetSearch.searchResults)
                        .children()
                        .map(function (result) { return result.innerText; })).toEqual([Strings_1.l('NoValuesFound')]);
                });
            });
            it('should handle error', function (done) {
                var pr = searchWithError(new Error('woops !'));
                var params = new FacetSearchParameters_1.FacetSearchParameters(mockFacet);
                facetSearch.triggerNewFacetSearch(params);
                expect(facetSearch.currentlyDisplayedResults).toBeUndefined();
                pr.catch(function () {
                    expect(facetSearch.currentlyDisplayedResults).toBeUndefined();
                    done();
                });
            });
            // KeyboardEvent simulation does not work well in phantom js
            // The KeyboardEvent constructor is not even defined ...
            Eif (!Simulate_1.Simulate.isPhantomJs()) {
                describe('hook user events', function () {
                    var searchPromise;
                    var built;
                    function spyOnAndReturnFirstCheckbox() {
                        var checkbox = Dom_1.$$(facetSearch.searchResults).find('input[type="checkbox"]');
                        spyOn(checkbox, 'onchange');
                        return checkbox;
                    }
                    function spyOnAndReturnFirstExcludeIcon() {
                        var excludeIcon = Dom_1.$$(facetSearch.searchResults).find('.coveo-facet-value-exclude');
                        spyOn(excludeIcon, 'click');
                        return excludeIcon;
                    }
                    function triggerKeyboardEnter() {
                        var enterKeyPress = new KeyboardEvent('keypress');
                        facetSearch.keyboardNavigationEnterPressed(enterKeyPress);
                    }
                    beforeEach(function (done) { return __awaiter(_this, void 0, void 0, function () {
                        var params;
                        return __generator(this, function (_a) {
                            switch (_a.label) {
                                case 0:
                                    Simulate_1.Simulate.removeJQuery();
                                    mockFacet.options.facetSearchDelay = 50;
                                    searchPromise = new Promise(function (resolve, reject) {
                                        var results = Fake_1.FakeResults.createFakeFieldValues('foo', 10);
                                        resolve(results);
                                    });
                                    mockFacet.facetQueryController.search.and.returnValue(searchPromise);
                                    built = facetSearch.build();
                                    params = new FacetSearchParameters_1.FacetSearchParameters(mockFacet);
                                    facetSearch.triggerNewFacetSearch(params);
                                    return [4 /*yield*/, searchPromise];
                                case 1:
                                    _a.sent();
                                    done();
                                    return [2 /*return*/];
                            }
                        });
                    }); });
                    afterEach(function () { return (searchPromise = null); });
                    it('by default, the first result is set as the current result', function () {
                        expect(getSearchResult(0).hasClass('coveo-facet-search-current-result')).toBe(true);
                        expect(getSearchResult(0).hasClass('coveo-facet-value-will-exclude')).toBe(false);
                    });
                    it('pressing the down arrow once primes the result to be excluded', function () {
                        Simulate_1.Simulate.keyUp(Dom_1.$$(built).find('input'), KeyboardUtils_1.KEYBOARD.DOWN_ARROW);
                        expect(getSearchResult(0).hasClass('coveo-facet-search-current-result')).toBe(true);
                        expect(getSearchResult(0).hasClass('coveo-facet-value-will-exclude')).toBe(true);
                    });
                    it('pressing the up arrow once loops around and primes the last result to be selected', function () {
                        Simulate_1.Simulate.keyUp(Dom_1.$$(built).find('input'), KeyboardUtils_1.KEYBOARD.UP_ARROW);
                        expect(getSearchResult(9).hasClass('coveo-facet-search-current-result')).toBe(true);
                        expect(getSearchResult(9).hasClass('coveo-facet-value-will-exclude')).toBe(false);
                    });
                    describe('pressing the down arrow once twice', function () {
                        beforeEach(function () {
                            Simulate_1.Simulate.keyUp(Dom_1.$$(built).find('input'), KeyboardUtils_1.KEYBOARD.DOWN_ARROW);
                            Simulate_1.Simulate.keyUp(Dom_1.$$(built).find('input'), KeyboardUtils_1.KEYBOARD.DOWN_ARROW);
                        });
                        it('it sets the second result as the current result', function () {
                            expect(getSearchResult(1).hasClass('coveo-facet-search-current-result')).toBe(true);
                            expect(getSearchResult(1).hasClass('coveo-facet-value-will-exclude')).toBe(false);
                        });
                        it('when pressing the up arrow once, it primes the first result to be selected', function () {
                            Simulate_1.Simulate.keyUp(Dom_1.$$(built).find('input'), KeyboardUtils_1.KEYBOARD.UP_ARROW);
                            expect(getSearchResult(0).hasClass('coveo-facet-search-current-result')).toBe(true);
                            expect(getSearchResult(0).hasClass('coveo-facet-value-will-exclude')).toBe(false);
                        });
                    });
                    it("when the first result is currently selected,\n          when triggering the enter key,\n          it triggers the checkbox #onChange handler", function () {
                        var checkbox = spyOnAndReturnFirstCheckbox();
                        var excludeIcon = spyOnAndReturnFirstExcludeIcon();
                        triggerKeyboardEnter();
                        expect(checkbox.onchange).toHaveBeenCalledTimes(1);
                        expect(excludeIcon.click).not.toHaveBeenCalled();
                    });
                    it("when the first result is currently selected,\n          when the first result is primed to be excluded (i.e. it has the class coveo-facet-value-will-exclude)\n          when triggering the enter key,\n          it triggers the excludeIcon #click handler", function () {
                        getSearchResult(0).addClass('coveo-facet-value-will-exclude');
                        var checkbox = spyOnAndReturnFirstCheckbox();
                        var excludeIcon = spyOnAndReturnFirstExcludeIcon();
                        triggerKeyboardEnter();
                        expect(checkbox.onchange).not.toHaveBeenCalled();
                        expect(excludeIcon.click).toHaveBeenCalledTimes(1);
                    });
                    it('escape close results', function () {
                        expect(facetSearch.currentlyDisplayedResults.length).toBe(10);
                        Simulate_1.Simulate.keyUp(Dom_1.$$(built).find('input'), KeyboardUtils_1.KEYBOARD.ESCAPE);
                        expect(facetSearch.currentlyDisplayedResults).toBeUndefined();
                    });
                    it('other key should start a search', function () {
                        Simulate_1.Simulate.keyUp(Dom_1.$$(built).find('input'), KeyboardUtils_1.KEYBOARD.CTRL);
                        expect(facetSearch.facet.facetQueryController.search).toHaveBeenCalled();
                    });
                });
            }
        });
    });
}
exports.FacetSearchTest = FacetSearchTest;
 
 
/***/ }),
/* 1618 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { Iif (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        Iif (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            Iif (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
            Iif (y = 0, t) op = [0, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    Eif (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        Iif (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
Object.defineProperty(exports, "__esModule", { value: true });
var Core_1 = __webpack_require__(9);
var Facet_1 = __webpack_require__(32);
var FacetSettings_1 = __webpack_require__(241);
var Dom_1 = __webpack_require__(0);
var Strings_1 = __webpack_require__(4);
var CustomMatchers_1 = __webpack_require__(104);
var Mock = __webpack_require__(2);
var Simulate_1 = __webpack_require__(15);
var FacetHeader_1 = __webpack_require__(235);
function FacetSettingsTest() {
    var _this = this;
    describe('FacetSettings', function () {
        var test;
        var facet;
        var facetSettings;
        var sorts;
        function initFacetSettings() {
            facetSettings = new FacetSettings_1.FacetSettings(sorts, facet);
            facetSettings.build();
        }
        var waitForPopperJS = function () {
            return Promise.resolve(function (resolve) { return setTimeout(function () { return resolve(true); }, 100); });
        };
        function fakeFacet() {
            facet.element = Dom_1.$$('div').el;
            facet.facetHeader = Mock.mock(FacetHeader_1.FacetHeader);
            facet.facetHeader.collapseFacet = function () { return facet.element.classList.add('coveo-facet-collapsed'); };
            facet.facetHeader.expandFacet = function () { return facet.element.classList.remove('coveo-facet-collapsed'); };
        }
        beforeEach(function () {
            test = Mock.optionsComponentSetup(Facet_1.Facet, {
                field: '@field'
            });
            facet = test.cmp;
            fakeFacet();
            sorts = ['foo', 'bar'];
            var container = document.createElement('div');
            container.appendChild(facet.element);
            facet.root.appendChild(container);
            CustomMatchers_1.registerCustomMatcher();
        });
        afterEach(function () {
            facet = null;
            facetSettings = null;
        });
        it('when opened, focuses on the collapse section', function () {
            initFacetSettings();
            var focusSpy = spyOn(facetSettings['hideSection'], 'focus');
            facetSettings.open();
            expect(focusSpy).toHaveBeenCalledTimes(1);
        });
        it('allows to save state', function () {
            // settings not enabled : no call to query state
            initFacetSettings();
            facetSettings.saveState();
            expect(facet.queryStateModel.get).not.toHaveBeenCalled();
            // settings enabled : 3 calls to query state
            facet.options.enableSettingsFacetState = true;
            initFacetSettings();
            facetSettings.saveState();
            expect(facet.queryStateModel.get).toHaveBeenCalledTimes(3);
        });
        it('allows to load state', function () {
            // settings not enabled : no call to query state
            initFacetSettings();
            facetSettings.loadSavedState();
            expect(facet.queryStateModel.setMultiple).not.toHaveBeenCalled();
            // settings enabled : 1 call to set multiple
            facet.options.enableSettingsFacetState = true;
            initFacetSettings();
            facetSettings.loadSavedState();
            expect(facet.queryStateModel.setMultiple).toHaveBeenCalled();
        });
        describe('given the FacetSettings is initialized and appended to a facet', function () {
            function settingsPopup() {
                return Dom_1.$$(facetSettings.facet.root).find('.coveo-facet-settings-popup');
            }
            beforeEach(function () {
                sorts = ['alphaascending', 'alphadescending'];
                initFacetSettings();
                facet.root.appendChild(facetSettings.settingsButton);
                expect(settingsPopup()).toBeNull();
            });
            it('allow to open and close the popup using the #open and #close methods', function () {
                facetSettings.open();
                expect(settingsPopup()).not.toBeNull();
                facetSettings.close();
                expect(settingsPopup()).toBeNull();
            });
            it('focuses on the first sort item', function () {
                var focusSpy = spyOn(facetSettings['sortSection'].sortItems[0], 'focus');
                facetSettings.open();
                expect(focusSpy).toHaveBeenCalledTimes(1);
            });
            it('allows open and closing the popup by clicking the facetSetting button', function () {
                facetSettings.settingsButton.click();
                expect(settingsPopup()).not.toBeNull();
                facetSettings.settingsButton.click();
                expect(settingsPopup()).toBeNull();
            });
            describe('when the settings popup is visible', function () {
                beforeEach(function () { return facetSettings.settingsButton.click(); });
                it("when triggering an escape event on the settings button,\n        it closes the settings popup", function () {
                    Simulate_1.Simulate.keyUp(facetSettings.settingsButton, Core_1.KEYBOARD.ESCAPE);
                    expect(settingsPopup()).toBeNull();
                });
                it("when triggering an escape event on the settings popup,\n        it closes the settings popup", function () {
                    Simulate_1.Simulate.keyUp(settingsPopup(), Core_1.KEYBOARD.ESCAPE);
                    expect(settingsPopup()).toBeNull();
                });
                it("when triggering an escape event on the settings popup,\n        it focuses the settings button element", function () {
                    spyOn(facetSettings.settingsButton, 'focus');
                    Simulate_1.Simulate.keyUp(settingsPopup(), Core_1.KEYBOARD.ESCAPE);
                    expect(facetSettings.settingsButton.focus).toHaveBeenCalledTimes(1);
                });
            });
            it('allows open and closing the popup by pressing enter on the facetSetting button', function () {
                Simulate_1.Simulate.keyUp(facetSettings.settingsButton, Core_1.KEYBOARD.ENTER);
                expect(settingsPopup()).not.toBeNull();
                Simulate_1.Simulate.keyUp(facetSettings.settingsButton, Core_1.KEYBOARD.ENTER);
                expect(settingsPopup()).toBeNull();
            });
            it('closes the popup when losing focus', function () {
                Simulate_1.Simulate.keyUp(facetSettings.settingsButton, Core_1.KEYBOARD.ENTER);
                Dom_1.$$(settingsPopup()).trigger('focusout');
                expect(settingsPopup()).toBeNull();
            });
            it('appends the settings popup after the button', function () {
                Simulate_1.Simulate.keyUp(facetSettings.settingsButton, Core_1.KEYBOARD.ENTER);
                expect(settingsPopup().previousSibling).toEqual(facetSettings.settingsButton);
            });
        });
        it('should show collapse/expand section if it is not disabled from the facet', function (done) { return __awaiter(_this, void 0, void 0, function () {
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        facet.options.enableCollapse = true;
                        initFacetSettings();
                        facet.root.appendChild(facetSettings.settingsButton);
                        facetSettings.open();
                        return [4 /*yield*/, waitForPopperJS()];
                    case 1:
                        _a.sent();
                        expect(Dom_1.$$(facetSettings.facet.root).find('.coveo-facet-settings-section-hide')).not.toBeNull();
                        expect(Dom_1.$$(facetSettings.facet.root).find('.coveo-facet-settings-section-show')).not.toBeNull();
                        facet.collapse();
                        facetSettings.open();
                        return [4 /*yield*/, waitForPopperJS()];
                    case 2:
                        _a.sent();
                        expect(Dom_1.$$(facetSettings.facet.root).find('.coveo-facet-settings-section-hide')).not.toBeNull();
                        done();
                        return [2 /*return*/];
                }
            });
        }); });
        it('should not show collapse/expand section if it is disabled from the facet', function () {
            facet.options.enableCollapse = false;
            initFacetSettings();
            facetSettings.open();
            facet.root.appendChild(facetSettings.settingsButton);
            expect(Dom_1.$$(facetSettings.facet.root).find('.coveo-facet-settings-section-hide')).toBeNull();
            expect(Dom_1.$$(facetSettings.facet.root).find('.coveo-facet-settings-section-show')).toBeNull();
            facet.collapse();
            facetSettings.open();
            expect(Dom_1.$$(facetSettings.facet.root).find('.coveo-facet-settings-section-hide')).toBeNull();
            expect(Dom_1.$$(facetSettings.facet.root).find('.coveo-facet-settings-section-show')).toBeNull();
        });
        it("should show direction section if there's two linked parameters that require changing direction", function () {
            sorts = ['alphaascending', 'alphadescending'];
            initFacetSettings();
            facetSettings.open();
            expect(Dom_1.$$(facetSettings.settingsPopup).find('.coveo-facet-settings-section-direction-ascending')).not.toBeNull();
            expect(Dom_1.$$(facetSettings.settingsPopup).find('.coveo-facet-settings-section-direction-descending')).not.toBeNull();
        });
        it("should not show direction section if there's a single ascending or descending parameter", function () {
            sorts = ['alphaascending'];
            initFacetSettings();
            facetSettings.open();
            expect(Dom_1.$$(facetSettings.settingsPopup).find('.coveo-facet-settings-section-direction-ascending')).toBeNull();
            expect(Dom_1.$$(facetSettings.settingsPopup).find('.coveo-facet-settings-section-direction-descending')).toBeNull();
        });
        it("should not show direction section if there's two parameters allowing changing direction, but both parameters are not linked", function () {
            sorts = ['alphaascending', 'computedfieldascending'];
            initFacetSettings();
            facetSettings.open();
            expect(Dom_1.$$(facetSettings.settingsPopup).find('.coveo-facet-settings-section-direction-ascending')).toBeNull();
            expect(Dom_1.$$(facetSettings.settingsPopup).find('.coveo-facet-settings-section-direction-descending')).toBeNull();
        });
        it('should activate direction section when selecting a sort item with a possible direction', function () {
            sorts = ['score', 'alphaascending', 'alphadescending'];
            initFacetSettings();
            facetSettings.open();
            var ascendingSection = Dom_1.$$(facetSettings.settingsPopup).find('.coveo-facet-settings-item[data-direction="ascending"]');
            expect(Dom_1.$$(ascendingSection).hasClass('coveo-selected')).toBe(false);
            Dom_1.$$(facetSettings.getSortItem('alphaascending')).trigger('click');
            expect(Dom_1.$$(ascendingSection).hasClass('coveo-selected')).toBe(true);
        });
        it('should de-activate direction section when selecting a sort item with no possible direction', function () {
            sorts = ['alphaascending', 'alphadescending', 'score'];
            initFacetSettings();
            facetSettings.open();
            var ascendingSection = Dom_1.$$(facetSettings.settingsPopup).find('.coveo-facet-settings-item[data-direction="ascending"]');
            expect(Dom_1.$$(ascendingSection).hasClass('coveo-selected')).toBe(true);
            Dom_1.$$(facetSettings.getSortItem('score')).trigger('click');
            expect(Dom_1.$$(ascendingSection).hasClass('coveo-selected')).toBe(false);
        });
        describe('when closing the popup', function () {
            beforeEach(function () {
                jasmine.clock().install();
                initFacetSettings();
                spyOn(facetSettings, 'close');
                facetSettings.open();
            });
            afterEach(function () {
                jasmine.clock().uninstall();
            });
            it('should close the after a delay on mouseleave', function () {
                Dom_1.$$(facetSettings.button).trigger('mouseleave');
                jasmine.clock().tick(400);
                expect(facetSettings.close).toHaveBeenCalled();
            });
            it('should not close if there is a mouseenter following a mouseleave', function () {
                Dom_1.$$(facetSettings.button).trigger('mouseleave');
                jasmine.clock().tick(50);
                Dom_1.$$(facetSettings.button).trigger('mouseenter');
                jasmine.clock().tick(400);
                expect(facetSettings.close).not.toHaveBeenCalled();
            });
        });
        describe('with all sections', function () {
            var sections = {
                sort: 'coveo-facet-settings-section-sort',
                ascending: 'coveo-facet-settings-section-direction-ascending',
                descending: 'coveo-facet-settings-section-direction-descending',
                save: 'coveo-facet-settings-section-save-state',
                clear: 'coveo-facet-settings-section-clear-state',
                hide: 'coveo-facet-settings-section-hide',
                show: 'coveo-facet-settings-section-show'
            };
            var sectionClassesInOrder = [
                sections.sort,
                sections.ascending,
                sections.descending,
                sections.save,
                sections.clear,
                sections.hide,
                sections.show
            ];
            function getSection(className) {
                return Dom_1.$$(facetSettings.settingsPopup).findClass(className)[0];
            }
            function getItems(className) {
                return Dom_1.$$(getSection(className)).findAll('.coveo-facet-settings-item');
            }
            beforeEach(function () {
                sorts = ['occurrences', 'score', 'alphaascending', 'alphadescending'];
                facet.options.enableCollapse = true;
                facet.options.enableSettingsFacetState = true;
                initFacetSettings();
                facet.root.appendChild(facetSettings.settingsButton);
                facetSettings.open();
                document.body.appendChild(test.env.root);
            });
            afterEach(function () {
                test.env.root.remove();
            });
            it('should render the sections: sort, ascending, descending, save, clear, hide and show', function () {
                var renderedSections = Dom_1.$$(facetSettings.settingsPopup).children();
                expect(renderedSections.length).toEqual(sectionClassesInOrder.length);
                sectionClassesInOrder.forEach(function (expectedSectionClass, index) {
                    return expect(renderedSections[index]).toBe(getSection(expectedSectionClass));
                });
            });
            it("doesn't make the sort section a button", function () {
                expect(getSection(sections.sort).getAttribute('role')).not.toEqual('button');
            });
            it('renders the sort items', function () {
                expect(getItems(sections.sort).map(function (item) { return item.innerText; })).toEqual([Strings_1.l('Occurrences'), Strings_1.l('Score'), Strings_1.l('Label')]);
            });
            it('should make the sort items toggleable buttons', function () {
                var selectedIndex = 0;
                getItems(sections.sort).forEach(function (sortItem, index) {
                    expect(sortItem.getAttribute('role')).toEqual('button');
                    expect(sortItem.getAttribute('aria-pressed')).toEqual((index === selectedIndex).toString());
                });
            });
            it("doesn't make the ascending section a button", function () {
                expect(getSection(sections.ascending).getAttribute('role')).not.toEqual('button');
            });
            it("doesn't make the descending section a button", function () {
                expect(getSection(sections.descending).getAttribute('role')).not.toEqual('button');
            });
            it('renders a single item in the ascending section', function () {
                expect(getItems(sections.ascending).length).toEqual(1);
            });
            it('renders a single item in the descending section', function () {
                expect(getItems(sections.descending).length).toEqual(1);
            });
            it('makes the ascending item a toggled off button', function () {
                var item = getItems(sections.ascending)[0];
                expect(item.getAttribute('role')).toEqual('button');
                expect(item.getAttribute('aria-pressed')).toEqual('false');
            });
            it('makes the descending item a toggled off button', function () {
                var item = getItems(sections.descending)[0];
                expect(item.getAttribute('role')).toEqual('button');
                expect(item.getAttribute('aria-pressed')).toEqual('false');
            });
            it('makes the save section a non-toggleable button', function () {
                var section = getSection(sections.save);
                expect(section.getAttribute('role')).toEqual('button');
                expect(section.getAttribute('aria-pressed')).toBeNull();
            });
            it('makes the clear section a non-toggleable button', function () {
                var section = getSection(sections.clear);
                expect(section.getAttribute('role')).toEqual('button');
                expect(section.getAttribute('aria-pressed')).toBeNull();
            });
            it('renders a single item in the save section', function () {
                expect(getItems(sections.save).length).toEqual(1);
            });
            it('renders a single item in the clear section', function () {
                expect(getItems(sections.clear).length).toEqual(1);
            });
            it("doesn't make the save item a button", function () {
                expect(getItems(sections.save)[0].getAttribute('role')).not.toEqual('button');
            });
            it("doesn't make the clear item a button", function () {
                expect(getItems(sections.clear)[0].getAttribute('role')).not.toEqual('button');
            });
            it('makes the hide section a non-toggleable button', function () {
                var section = getSection(sections.hide);
                expect(section.getAttribute('role')).toEqual('button');
                expect(section.getAttribute('aria-pressed')).toBeNull();
            });
            it('makes the show section a non-toggleable button', function () {
                var section = getSection(sections.show);
                expect(section.getAttribute('role')).toEqual('button');
                expect(section.getAttribute('aria-pressed')).toBeNull();
            });
            it('renders a single item in the hide section', function () {
                expect(getItems(sections.hide).length).toEqual(1);
            });
            it('renders a single item in the show section', function () {
                expect(getItems(sections.show).length).toEqual(1);
            });
            it("doesn't make the hide item a button", function () {
                expect(getItems(sections.hide)[0].getAttribute('role')).not.toEqual('button');
            });
            it("doesn't make the show item a button", function () {
                expect(getItems(sections.show)[0].getAttribute('role')).not.toEqual('button');
            });
            it('hides the show button and shows the hide button', function () {
                var showButton = getSection(sections.show);
                var hideButton = getSection(sections.hide);
                expect(showButton.getAttribute('aria-hidden')).toEqual('true');
                expect(window.getComputedStyle(showButton).display).toEqual('none');
                expect(hideButton.getAttribute('aria-hidden')).not.toEqual('true');
                expect(window.getComputedStyle(hideButton).display).not.toEqual('none');
            });
            it('after pressing the hide button, shows the show button and hides the hide button', function () {
                var showButton = getSection(sections.show);
                var hideButton = getSection(sections.hide);
                hideButton.click();
                facetSettings.open();
                expect(showButton.getAttribute('aria-hidden')).not.toEqual('true');
                expect(window.getComputedStyle(showButton).display).not.toEqual('none');
                expect(hideButton.getAttribute('aria-hidden')).toEqual('true');
                expect(window.getComputedStyle(hideButton).display).toEqual('none');
            });
            it('disables the ascending button', function () {
                expect(getItems(sections.ascending)[0].getAttribute('aria-disabled')).toEqual('true');
            });
            it('disables the descending button', function () {
                expect(getItems(sections.descending)[0].getAttribute('aria-disabled')).toEqual('true');
            });
            describe('after selecting a sort with directions', function () {
                var selectedIndex = 2;
                beforeEach(function () {
                    getItems(sections.sort)[selectedIndex].click();
                });
                it('should toggle the old and new pressed sort buttons', function () {
                    getItems(sections.sort).forEach(function (sortItem, index) {
                        return expect(sortItem.getAttribute('aria-pressed')).toEqual((index === selectedIndex).toString());
                    });
                });
                it('enables the ascending button', function () {
                    expect(getItems(sections.ascending)[0].getAttribute('aria-disabled')).toEqual('false');
                });
                it('enables the descending button', function () {
                    expect(getItems(sections.descending)[0].getAttribute('aria-disabled')).toEqual('false');
                });
                it('represents the current sort direction', function () {
                    expect([getItems(sections.ascending)[0], getItems(sections.descending)[0]].map(function (item) { return item.getAttribute('aria-pressed'); })).toEqual(['true', 'false']);
                });
                describe('then selecting another direction', function () {
                    beforeEach(function () {
                        getItems(sections.descending)[0].click();
                    });
                    it('represents the current sort direction', function () {
                        expect([getItems(sections.ascending)[0], getItems(sections.descending)[0]].map(function (item) { return item.getAttribute('aria-pressed'); })).toEqual(['false', 'true']);
                    });
                });
                describe('then selecting a sort without directions', function () {
                    beforeEach(function () {
                        getItems(sections.sort)[0].click();
                    });
                    it('disables the ascending button', function () {
                        expect(getItems(sections.ascending)[0].getAttribute('aria-disabled')).toEqual('true');
                    });
                    it('disables the descending button', function () {
                        expect(getItems(sections.descending)[0].getAttribute('aria-disabled')).toEqual('true');
                    });
                });
            });
        });
    });
}
exports.FacetSettingsTest = FacetSettingsTest;
 
 
/***/ }),
/* 1619 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var BreadcrumbEvents_1 = __webpack_require__(33);
var QueryEvents_1 = __webpack_require__(14);
var Defer_1 = __webpack_require__(31);
var FacetSlider_1 = __webpack_require__(243);
var Dom_1 = __webpack_require__(0);
var Fake_1 = __webpack_require__(11);
var Mock = __webpack_require__(2);
var Simulate_1 = __webpack_require__(15);
function FacetSliderTest() {
    describe('FacetSlider', function () {
        var test;
        var facetSliderOptions;
        beforeEach(function () {
            Simulate_1.Simulate.removeJQuery();
            facetSliderOptions = { start: 0, end: 100, field: '@foo' };
            test = Mock.optionsComponentSetup(FacetSlider_1.FacetSlider, facetSliderOptions);
            test.env.queryStateModel.get.and.returnValue([0, 100]);
            test.env.queryStateModel.getDefault.and.returnValue([0, 100]);
        });
        afterEach(function () {
            test = null;
        });
        it('should be currentlyDisplayed by default', function () {
            expect(test.cmp.isCurrentlyDisplayed()).toBeTruthy();
        });
        it('should not be currentlyDisplayed if display:none', function () {
            test.cmp.element.style.display = 'none';
            expect(test.cmp.isCurrentlyDisplayed()).toBeFalsy();
        });
        it('should not be currentlyDisplayed if visibility:hidden', function () {
            test.cmp.element.style.visibility = 'hidden';
            expect(test.cmp.isCurrentlyDisplayed()).toBeFalsy();
        });
        it('should not be currentlyDisplayed if disabled by a tab', function () {
            test.cmp.element.className = 'coveo-tab-disabled';
            expect(test.cmp.isCurrentlyDisplayed()).toBeFalsy();
        });
        it('should not be currentlyDisplayed if it is empty', function () {
            test.cmp.element.className = 'coveo-disabled-empty';
            expect(test.cmp.isCurrentlyDisplayed()).toBeFalsy();
        });
        it("should not add a query expression if the slider is in it's default state", function () {
            test.cmp.setSelectedValues([0, 100]);
            var simulation = Simulate_1.Simulate.query(test.env);
            expect(simulation.queryBuilder.build().aq).toBeUndefined();
        });
        it("should add a query expression if the slider is not in it's default state", function () {
            test.cmp.setSelectedValues([5, 25]);
            var simulation = Simulate_1.Simulate.query(test.env);
            expect(simulation.queryBuilder.build().aq).toBe('@foo==5..25');
        });
        it('should request a group by', function () {
            var simulation = Simulate_1.Simulate.query(test.env);
            expect(simulation.queryBuilder.build().groupBy).toEqual(jasmine.arrayContaining([
                jasmine.objectContaining({
                    field: '@foo',
                    generateAutomaticRanges: false
                })
            ]));
        });
        describe('when deciding if the facet is empty', function () {
            var isConsideredEmpty = function () {
                return Dom_1.$$(test.cmp.element).hasClass('coveo-disabled-empty');
            };
            it('should not be considered empty if a single value is returned with a count different than 0', function () {
                var groupByResults = [
                    {
                        field: '@foo',
                        values: [Fake_1.FakeResults.createFakeGroupByRangeValue(0, 10, 'foo', 1)]
                    }
                ];
                Simulate_1.Simulate.query(test.env, {
                    groupByResults: groupByResults
                });
                expect(isConsideredEmpty()).toBe(false);
            });
            it('should be considered empty if there is no group by results', function () {
                var groupByResults = [];
                Simulate_1.Simulate.query(test.env, {
                    groupByResults: groupByResults
                });
                expect(isConsideredEmpty()).toBe(true);
            });
            it('should be considered empty if a single value is returned with a count of 0', function () {
                var groupByResults = [
                    {
                        field: '@foo',
                        values: [Fake_1.FakeResults.createFakeGroupByRangeValue(0, 10, 'foo', 0)]
                    }
                ];
                Simulate_1.Simulate.query(test.env, {
                    groupByResults: groupByResults
                });
                expect(isConsideredEmpty()).toBe(true);
            });
            it('should be considered empty if a multiple values have a count of 0', function () {
                var groupByResults = [
                    {
                        field: '@foo',
                        values: [
                            Fake_1.FakeResults.createFakeGroupByRangeValue(0, 10, 'foo', 0),
                            Fake_1.FakeResults.createFakeGroupByRangeValue(10, 20, 'foo2', 0),
                            Fake_1.FakeResults.createFakeGroupByRangeValue(30, 40, 'foo3', 0)
                        ]
                    }
                ];
                Simulate_1.Simulate.query(test.env, {
                    groupByResults: groupByResults
                });
                expect(isConsideredEmpty()).toBe(true);
            });
            it('should not be considered empty if at least one value out of multiple has a count different than 0', function () {
                var groupByResults = [
                    {
                        field: '@foo',
                        values: [
                            Fake_1.FakeResults.createFakeGroupByRangeValue(0, 10, 'foo', 0),
                            Fake_1.FakeResults.createFakeGroupByRangeValue(10, 20, 'foo2', 0),
                            Fake_1.FakeResults.createFakeGroupByRangeValue(30, 40, 'foo3', 1)
                        ]
                    }
                ];
                Simulate_1.Simulate.query(test.env, {
                    groupByResults: groupByResults
                });
                expect(isConsideredEmpty()).toBe(false);
            });
        });
        it("should return the correct selected values after a query, which is it's options", function () {
            Simulate_1.Simulate.query(test.env);
            expect(test.cmp.getSelectedValues()).toEqual(jasmine.arrayContaining([0, 100]));
        });
        it('should return undefined values if there has not been a query yet', function () {
            expect(test.cmp.getSelectedValues()).toEqual(jasmine.arrayContaining([undefined, undefined]));
        });
        it('should return selected values from the query state if available', function () {
            var spy = jasmine.createSpy('rangeState');
            spy.and.returnValue([60, 75]);
            test.env.queryStateModel.get = spy;
            Simulate_1.Simulate.query(test.env);
            expect(test.cmp.getSelectedValues()).toEqual(jasmine.arrayContaining([60, 75]));
        });
        it('should populate breadcrumb only if not in default state', function () {
            var breadcrumbs = [];
            Dom_1.$$(test.env.root).trigger(BreadcrumbEvents_1.BreadcrumbEvents.populateBreadcrumb, { breadcrumbs: breadcrumbs });
            expect(breadcrumbs.length).toBe(0);
            breadcrumbs = [];
            test.cmp.setSelectedValues([50, 60]);
            Dom_1.$$(test.env.root).trigger(BreadcrumbEvents_1.BreadcrumbEvents.populateBreadcrumb, { breadcrumbs: breadcrumbs });
            expect(breadcrumbs.length).toBe(1);
        });
        it('should be disabled if the query results is not a range response', function () {
            var disableSpy = jasmine.createSpy('spy');
            test.cmp.disable = disableSpy;
            var correctGroupByValue = Fake_1.FakeResults.createFakeGroupByRangeValue(0, 100, 'foo', 5);
            var correctGroupBy = Fake_1.FakeResults.createFakeGroupByResult('@foo', 'foo', 10);
            correctGroupBy.values = [correctGroupByValue];
            Simulate_1.Simulate.query(test.env, {
                groupByResults: [correctGroupBy]
            });
            expect(test.cmp.disable).not.toHaveBeenCalled();
            var badGroupByValue = Fake_1.FakeResults.createFakeGroupByValue('foo', 5);
            var badGroupBy = Fake_1.FakeResults.createFakeGroupByResult('@foo', 'foo', 10);
            badGroupBy.values = [badGroupByValue];
            Simulate_1.Simulate.query(test.env, {
                groupByResults: [badGroupBy]
            });
            expect(test.cmp.disable).toHaveBeenCalled();
        });
        describe('draws the graph', function () {
            var slider;
            var mockEnvironmentBuilder;
            var env;
            var facetSlider;
            beforeEach(function () {
                slider = jasmine.createSpyObj('slider', ['drawGraph', 'onMoving']);
                mockEnvironmentBuilder = new Mock.MockEnvironmentBuilder();
                env = mockEnvironmentBuilder.build();
            });
            describe('on resize', function () {
                beforeEach(function () {
                    facetSlider = new FacetSlider_1.FacetSlider(env.element, facetSliderOptions, mockEnvironmentBuilder.getBindings(), slider);
                });
                it('should draw the graph on resize when there are results', function (done) {
                    facetSlider.onResize(new Event('resize'));
                    setTimeout(function () {
                        expect(slider.drawGraph).toHaveBeenCalled();
                        done();
                    }, FacetSlider_1.FacetSlider.DEBOUNCED_RESIZE_DELAY);
                });
                it('should execute the onMoving function of the slider on resize', function (done) {
                    facetSlider.onResize(new Event('resize'));
                    setTimeout(function () {
                        expect(slider.onMoving).toHaveBeenCalled();
                        done();
                    }, FacetSlider_1.FacetSlider.DEBOUNCED_RESIZE_DELAY);
                });
                it('should not execute the onMoving function of the slider if it is not instantiated', function (done) {
                    facetSlider['slider'] = null;
                    facetSlider.onResize(new Event('resize'));
                    setTimeout(function () {
                        expect(slider.onMoving).not.toHaveBeenCalled();
                        done();
                    }, FacetSlider_1.FacetSlider.DEBOUNCED_RESIZE_DELAY);
                });
                it('should not draw the graph on resize when there are no results', function (done) {
                    Dom_1.$$(env.root).trigger(QueryEvents_1.QueryEvents.noResults);
                    facetSlider.onResize(new Event('resize'));
                    setTimeout(function () {
                        expect(slider.drawGraph).not.toHaveBeenCalled();
                        done();
                    }, FacetSlider_1.FacetSlider.DEBOUNCED_RESIZE_DELAY);
                });
            });
            it('should draw the graph when draw delayed graph data is called', function (done) {
                var fakeResults = createFacetSliderGraphGroupByResults();
                Dom_1.$$(env.element).addClass('coveo-facet-column');
                facetSliderOptions = { start: 0, end: 100, field: '@bar', graph: { steps: 4 } };
                facetSlider = new FacetSlider_1.FacetSlider(env.element, facetSliderOptions, mockEnvironmentBuilder.getBindings(), slider);
                hideFacetColumn(env);
                // wait until delayed graph data has been saved
                Dom_1.$$(env.root).on(QueryEvents_1.QueryEvents.deferredQuerySuccess, function () {
                    showFacetColumn(env);
                    facetSlider.drawDelayedGraphData();
                    expect(slider.drawGraph).toHaveBeenCalled();
                    done();
                });
                Simulate_1.Simulate.query(env, { results: fakeResults });
            });
            it('should not draw the graph when draw delayed graph data is called and there is no results', function (done) {
                var fakeResults = createFacetSliderGraphGroupByResults();
                Dom_1.$$(env.element).addClass('coveo-facet-column');
                facetSliderOptions = { start: 0, end: 100, field: '@bar', graph: { steps: 4 } };
                facetSlider = new FacetSlider_1.FacetSlider(env.element, facetSliderOptions, mockEnvironmentBuilder.getBindings(), slider);
                hideFacetColumn(env);
                Simulate_1.Simulate.query(env, { results: fakeResults });
                // wait until delayed graph data has been saved and no results event has been fired
                Dom_1.$$(env.root).on(QueryEvents_1.QueryEvents.noResults, function () {
                    showFacetColumn(env);
                    facetSlider.drawDelayedGraphData();
                    expect(slider.drawGraph).not.toHaveBeenCalled();
                    done();
                });
                Dom_1.$$(env.root).trigger(QueryEvents_1.QueryEvents.noResults);
            });
            it('should draw the graph when a popup is opened', function (done) {
                Dom_1.$$(env.element).addClass('coveo-facet-column');
                new FacetSlider_1.FacetSlider(env.element, facetSliderOptions, mockEnvironmentBuilder.getBindings(), slider);
                showFacetColumn(env);
                Dom_1.$$(env.root).trigger('onPopupOpen');
                setTimeout(function () {
                    expect(slider.drawGraph).toHaveBeenCalled();
                    done();
                }, FacetSlider_1.FacetSlider.DEBOUNCED_RESIZE_DELAY + 1);
            });
            it('should draw the graph when there are no group by results returned', function (done) {
                var fakeResults = createFacetSliderGraphGroupByResults();
                // Remove group by results
                fakeResults.groupByResults[0].values = [];
                facetSliderOptions = { start: 0, end: 100, field: '@bar', graph: { steps: 4 } };
                new FacetSlider_1.FacetSlider(env.element, facetSliderOptions, mockEnvironmentBuilder.getBindings(), slider);
                Dom_1.$$(env.root).on(QueryEvents_1.QueryEvents.deferredQuerySuccess, function () {
                    Defer_1.Defer.defer(function () {
                        expect(slider.drawGraph).toHaveBeenCalled();
                        done();
                    });
                });
                Simulate_1.Simulate.query(env, { results: fakeResults });
            });
            function hideFacetColumn(env) {
                env.element.style.display = 'none';
            }
            function showFacetColumn(env) {
                env.element.style.display = 'block';
            }
            function createFacetSliderGraphGroupByResults() {
                var fakeGroupByResult = Fake_1.FakeResults.createFakeRangeGroupByResult('@bar', 1, 100, 25);
                var fakeResults = Fake_1.FakeResults.createFakeResults();
                fakeResults.groupByResults = [fakeGroupByResult, fakeGroupByResult]; // need two because the graph is enabled.
                return fakeResults;
            }
        });
        describe('exposes options', function () {
            it('dateField should change the query expression to a correct date expression', function () {
                test = Mock.optionsComponentSetup(FacetSlider_1.FacetSlider, {
                    start: '2000/01/01',
                    end: '3000/01/01',
                    field: '@foo',
                    dateField: true
                });
                var startSelected = new Date(Date.UTC(2100, 0, 1));
                var endSelected = new Date(Date.UTC(2200, 0, 1));
                test.cmp.setSelectedValues([startSelected.getTime(), endSelected.getTime()]);
                var simulation = Simulate_1.Simulate.query(test.env);
                expect(simulation.queryBuilder.build().aq).toBe('@foo==2100/01/01@00:00:00..2200/01/01@00:00:00');
            });
            it('queryOverride should output a query override in the group by request', function () {
                test = Mock.optionsComponentSetup(FacetSlider_1.FacetSlider, {
                    start: 0,
                    end: 100,
                    field: '@foo',
                    queryOverride: '@foo>50'
                });
                test.env.queryStateModel.get.and.returnValue([0, 100]);
                test.env.queryStateModel.getDefault.and.returnValue([0, 100]);
                var simulation = Simulate_1.Simulate.query(test.env);
                expect(simulation.queryBuilder.build().groupBy).toEqual(jasmine.arrayContaining([
                    jasmine.objectContaining({
                        advancedQueryOverride: '@foo>50',
                        field: '@foo'
                    })
                ]));
            });
            it('title should modify the header', function () {
                test = Mock.optionsComponentSetup(FacetSlider_1.FacetSlider, {
                    start: 0,
                    end: 100,
                    field: '@foo',
                    title: 'nice title'
                });
                test.cmp.ensureDom();
                expect(Dom_1.$$(Dom_1.$$(test.cmp.facetHeader.build()).find('.coveo-facet-header-title')).text()).toBe('nice title');
            });
            it('should have a "simpleSliderConfig" attribute if the start and end attribute is specified', function () {
                test = Mock.optionsComponentSetup(FacetSlider_1.FacetSlider, {
                    start: 0,
                    end: 100,
                    field: '@foo',
                    title: 'nice title'
                });
                expect(test.cmp.isSimpleSliderConfig).toBeTruthy();
            });
            it('should not have a "simpleSliderConfig" attribute if the start and end attribute is not specified', function () {
                test = Mock.optionsComponentSetup(FacetSlider_1.FacetSlider, {
                    field: '@foo',
                    title: 'nice title'
                });
                expect(test.cmp.isSimpleSliderConfig).toBeFalsy();
            });
        });
        describe('when setuping slider with no predetermined range', function () {
            beforeEach(function () {
                facetSliderOptions = { field: '@foo' };
                test = Mock.optionsComponentSetup(FacetSlider_1.FacetSlider, facetSliderOptions);
            });
            var simulateStateRange = function (start, end) {
                test.env.queryStateModel.get.and.returnValue([start, end]);
                test.env.queryStateModel.getDefault.and.returnValue([start, end]);
            };
            var simulateGroupBy = function (start, end) {
                var groupByResults = [
                    {
                        field: '@foo',
                        values: [Fake_1.FakeResults.createFakeGroupByRangeValue(start, end, 'foo', 1)]
                    }
                ];
                Simulate_1.Simulate.query(test.env, {
                    groupByResults: groupByResults,
                    callbackDuringQuery: function () { return (test.cmp.facetQueryController.lastGroupByRequestForFullRangeIndex = 0); }
                });
            };
            it('should use smallest value from state versus group by to determine start of range', function () {
                simulateStateRange(1, 3);
                simulateGroupBy(2, 3);
                expect(test.cmp.initialStartOfSlider).toBe(1);
            });
            it('should use smallest value from group by versus state to determine start of range', function () {
                simulateStateRange(2, 3);
                simulateGroupBy(1, 3);
                expect(test.cmp.initialStartOfSlider).toBe(1);
            });
            it('should use the largest value from state versus group by to determine end of range', function () {
                simulateStateRange(1, 3);
                simulateGroupBy(1, 2);
                expect(test.cmp.initialEndOfSlider).toBe(3);
            });
            it('should use the largest value from group by versus state by to determine end of range', function () {
                simulateStateRange(1, 2);
                simulateGroupBy(1, 3);
                expect(test.cmp.initialEndOfSlider).toBe(3);
            });
        });
    });
}
exports.FacetSliderTest = FacetSliderTest;
 
 
/***/ }),
/* 1620 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { Iif (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        Iif (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            Iif (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
            Iif (y = 0, t) op = [0, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    Eif (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        Iif (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
Object.defineProperty(exports, "__esModule", { value: true });
/// <reference path="../../lib/jasmine/index.d.ts" />
var Mock = __webpack_require__(2);
var Facet_1 = __webpack_require__(32);
var Dom_1 = __webpack_require__(0);
var FacetValue_1 = __webpack_require__(51);
var Simulate_1 = __webpack_require__(15);
var Fake_1 = __webpack_require__(11);
var OmniboxEvents_1 = __webpack_require__(47);
var BreadcrumbEvents_1 = __webpack_require__(33);
var AnalyticsActionListMeta_1 = __webpack_require__(7);
var Core_1 = __webpack_require__(9);
function FacetTest() {
    var _this = this;
    describe('Facet', function () {
        var test;
        var foobarFacetValue;
        beforeEach(function () {
            foobarFacetValue = new FacetValue_1.FacetValue();
            foobarFacetValue.value = 'foobar';
            initializeComponent();
        });
        function initializeComponent() {
            test = Mock.optionsComponentSetup(Facet_1.Facet, {
                field: '@field'
            });
        }
        function initializeComponentWithQSM() {
            test = Mock.advancedComponentSetup(Facet_1.Facet, {
                modifyBuilder: function (builder) {
                    return builder.withLiveQueryStateModel();
                },
                cmpOptions: {
                    field: '@field'
                }
            });
            test.env.queryStateModel.registerNewAttribute('f:@field', []);
            test.env.queryStateModel.registerNewAttribute('f:@field:not', []);
            test.env.queryStateModel.registerNewAttribute('f:@field:operator', 'or');
        }
        function simulateQueryWithResults(numberOfValues) {
            if (numberOfValues === void 0) { numberOfValues = 10; }
            var results = Fake_1.FakeResults.createFakeResults();
            results.groupByResults = [Fake_1.FakeResults.createFakeGroupByResult('@field', 'foo', numberOfValues)];
            Simulate_1.Simulate.query(test.env, {
                results: results
            });
        }
        afterEach(function () {
            test = null;
        });
        it('should be currentlyDisplayed by default', function () {
            expect(test.cmp.isCurrentlyDisplayed()).toBeTruthy();
        });
        it('should not be currentlyDisplayed if display:none', function () {
            test.cmp.element.style.display = 'none';
            expect(test.cmp.isCurrentlyDisplayed()).toBeFalsy();
        });
        it('should not be currently displayed if visibility:hidden', function () {
            test.cmp.element.style.visibility = 'hidden';
            expect(test.cmp.isCurrentlyDisplayed()).toBeFalsy();
        });
        it('should not be currently displayed if disabled by a tab', function () {
            test.cmp.element.className = 'coveo-tab-disabled';
            expect(test.cmp.isCurrentlyDisplayed()).toBeFalsy();
        });
        it('should not be currently displayed if empty', function () {
            test.cmp.element.className = 'coveo-facet-empty';
            expect(test.cmp.isCurrentlyDisplayed()).toBeFalsy();
        });
        it('allows to select a value', function () {
            expect(test.cmp.getDisplayedFacetValues()).not.toContain(foobarFacetValue);
            test.cmp.selectValue('foobar');
            expect(test.cmp.getDisplayedValues()).toContain('foobar');
            expect(test.cmp.values.get('foobar').selected).toBe(true);
        });
        it('allows to select multiple value', function () {
            expect(test.cmp.getDisplayedFacetValues()).not.toEqual(jasmine.arrayContaining(['foo', 'bar', 'baz']));
            test.cmp.selectMultipleValues(['foo', 'bar', 'baz']);
            expect(test.cmp.getDisplayedValues()).toEqual(jasmine.arrayContaining(['foo', 'bar', 'baz']));
            expect(test.cmp.values.get('foo').selected).toBe(true);
        });
        it('allows to deselect a value', function () {
            expect(test.cmp.getDisplayedFacetValues()).not.toContain(foobarFacetValue);
            test.cmp.selectValue('foobar');
            expect(test.cmp.getDisplayedValues()).toContain('foobar');
            expect(test.cmp.values.get('foobar').selected).toBe(true);
            test.cmp.deselectValue('foobar');
            expect(test.cmp.getDisplayedFacetValues()).not.toContain(foobarFacetValue);
            expect(test.cmp.values.get('foobar').selected).not.toBe(true);
        });
        it('allows to deselect multiple values', function () {
            expect(test.cmp.getDisplayedFacetValues()).not.toEqual(jasmine.arrayContaining(['foo', 'bar', 'baz']));
            test.cmp.selectMultipleValues(['foo', 'bar', 'baz']);
            expect(test.cmp.getDisplayedValues()).toEqual(jasmine.arrayContaining(['foo', 'bar', 'baz']));
            expect(test.cmp.values.get('foo').selected).toBe(true);
            test.cmp.deselectMultipleValues(['foo', 'bar', 'baz']);
            expect(test.cmp.getDisplayedFacetValues()).not.toEqual(jasmine.arrayContaining(['foo', 'bar', 'baz']));
            expect(test.cmp.values.get('foo').selected).not.toBe(true);
        });
        it('allows to exclude a value', function () {
            expect(test.cmp.getDisplayedFacetValues()).not.toContain(foobarFacetValue);
            test.cmp.excludeValue('foobar');
            expect(test.cmp.getDisplayedValues()).toContain('foobar');
            expect(test.cmp.values.get('foobar').excluded).toBe(true);
        });
        it('allows to exclude multiple value', function () {
            expect(test.cmp.getDisplayedFacetValues()).not.toEqual(jasmine.arrayContaining(['foo', 'bar', 'baz']));
            test.cmp.excludeMultipleValues(['foo', 'bar', 'baz']);
            expect(test.cmp.getDisplayedValues()).toEqual(jasmine.arrayContaining(['foo', 'bar', 'baz']));
            expect(test.cmp.values.get('foo').excluded).toBe(true);
        });
        it('allows to unexclude a value', function () {
            expect(test.cmp.getDisplayedFacetValues()).not.toContain(foobarFacetValue);
            test.cmp.excludeValue('foobar');
            expect(test.cmp.getDisplayedValues()).toContain('foobar');
            expect(test.cmp.values.get('foobar').excluded).toBe(true);
            test.cmp.unexcludeValue('foobar');
            expect(test.cmp.getDisplayedFacetValues()).not.toContain(foobarFacetValue);
            expect(test.cmp.values.get('foobar').excluded).not.toBe(true);
        });
        it('allows to unexclude multiple values', function () {
            expect(test.cmp.getDisplayedFacetValues()).not.toEqual(jasmine.arrayContaining(['foo', 'bar', 'baz']));
            test.cmp.excludeMultipleValues(['foo', 'bar', 'baz']);
            expect(test.cmp.getDisplayedValues()).toEqual(jasmine.arrayContaining(['foo', 'bar', 'baz']));
            expect(test.cmp.values.get('foo').excluded).toBe(true);
            test.cmp.unexcludeMultipleValues(['foo', 'bar', 'baz']);
            expect(test.cmp.getDisplayedFacetValues()).not.toEqual(jasmine.arrayContaining(['foo', 'bar', 'baz']));
            expect(test.cmp.values.get('foo').excluded).not.toBe(true);
        });
        it('allows to toggleSelectValue', function () {
            expect(test.cmp.getDisplayedFacetValues()).not.toContain(foobarFacetValue);
            test.cmp.toggleSelectValue('foobar');
            expect(test.cmp.getDisplayedValues()).toContain('foobar');
            expect(test.cmp.values.get('foobar').selected).toBe(true);
            test.cmp.toggleSelectValue('foobar');
            expect(test.cmp.values.get('foobar').selected).toBe(false);
        });
        it('allows to toggleExcludeValue', function () {
            expect(test.cmp.getDisplayedFacetValues()).not.toContain(foobarFacetValue);
            test.cmp.toggleExcludeValue('foobar');
            expect(test.cmp.getDisplayedValues()).toContain('foobar');
            expect(test.cmp.values.get('foobar').excluded).toBe(true);
            test.cmp.toggleExcludeValue('foobar');
            expect(test.cmp.values.get('foobar').excluded).toBe(false);
        });
        it('allows to getSelectedValues', function () {
            expect(test.cmp.getSelectedValues()).not.toEqual(jasmine.arrayContaining(['foo', 'bar']));
            test.cmp.selectMultipleValues(['foo', 'bar']);
            expect(test.cmp.getSelectedValues()).toEqual(jasmine.arrayContaining(['foo', 'bar']));
        });
        it('allows to getExcludedValues', function () {
            expect(test.cmp.getExcludedValues()).not.toEqual(jasmine.arrayContaining(['foo', 'bar']));
            test.cmp.excludeMultipleValues(['foo', 'bar']);
            expect(test.cmp.getExcludedValues()).toEqual(jasmine.arrayContaining(['foo', 'bar']));
        });
        it('allows to reset', function () {
            test.cmp.selectMultipleValues(['foo', 'bar']);
            test.cmp.excludeMultipleValues(['a', 'b']);
            expect(test.cmp.getSelectedValues()).toEqual(jasmine.arrayContaining(['foo', 'bar']));
            expect(test.cmp.getExcludedValues()).toEqual(jasmine.arrayContaining(['a', 'b']));
            test.cmp.reset();
            expect(test.cmp.getSelectedValues()).not.toEqual(jasmine.arrayContaining(['foo', 'bar']));
            expect(test.cmp.getExcludedValues()).not.toEqual(jasmine.arrayContaining(['a', 'b']));
        });
        it('allows to update sort', function () {
            expect(test.cmp.options.sortCriteria).not.toBe('score');
            test.cmp.updateSort('score');
            expect(test.cmp.options.sortCriteria).toBe('score');
            expect(test.env.queryController.executeQuery).toHaveBeenCalled();
        });
        it('should log an analytics event when updating sort', function () {
            test.cmp.updateSort('score');
            var expectedMetadata = jasmine.objectContaining({
                facetId: test.cmp.options.id,
                facetField: test.cmp.options.field.toString(),
                facetTitle: test.cmp.options.title
            });
            expect(test.env.usageAnalytics.logCustomEvent).toHaveBeenCalledWith(AnalyticsActionListMeta_1.analyticsActionCauseList.facetUpdateSort, expectedMetadata, test.cmp.element);
        });
        it('should log an analytics event when showing more results', function (done) { return __awaiter(_this, void 0, void 0, function () {
            var results, validation, spyFacetQueryController, expectedMetadata;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        results = Fake_1.FakeResults.createFakeResults(test.cmp.options.pageSize + 5);
                        validation = Promise.resolve(results.results);
                        spyFacetQueryController = jasmine.createSpy('spyFacetQueryController').and.returnValue(validation);
                        expectedMetadata = jasmine.objectContaining({
                            facetId: test.cmp.options.id,
                            facetField: test.cmp.options.field.toString(),
                            facetTitle: test.cmp.options.title
                        });
                        test.cmp.facetQueryController.fetchMore = spyFacetQueryController;
                        test.cmp.showMore();
                        return [4 /*yield*/, validation];
                    case 1:
                        _a.sent();
                        expect(test.env.usageAnalytics.logCustomEvent).toHaveBeenCalledWith(AnalyticsActionListMeta_1.analyticsActionCauseList.facetShowMore, expectedMetadata, test.cmp.element);
                        done();
                        return [2 /*return*/];
                }
            });
        }); });
        it('should log an analytics event when showing less results', function () {
            var expectedMetadata = jasmine.objectContaining({
                facetId: test.cmp.options.id,
                facetField: test.cmp.options.field.toString(),
                facetTitle: test.cmp.options.title
            });
            test.cmp.showMore();
            test.cmp.showLess();
            expect(test.env.usageAnalytics.logCustomEvent).toHaveBeenCalledWith(AnalyticsActionListMeta_1.analyticsActionCauseList.facetShowLess, expectedMetadata, test.cmp.element);
        });
        it('allows to collapse', function () {
            var spy = jasmine.createSpy('collapse');
            test.cmp.ensureDom();
            test.cmp.facetHeader.collapseFacet = spy;
            test.cmp.collapse();
            expect(spy).toHaveBeenCalled();
        });
        it('allows to expand', function () {
            var spy = jasmine.createSpy('expand');
            test.cmp.ensureDom();
            test.cmp.facetHeader.expandFacet = spy;
            test.cmp.expand();
            expect(spy).toHaveBeenCalled();
        });
        it('allows to showWaitingAnimation and hideWaitingAnimation', function () {
            test.cmp.showWaitingAnimation();
            expect(Dom_1.$$(test.cmp.element).find('.coveo-facet-header-wait-animation').style.visibility).toBe('visible');
            test.cmp.hideWaitingAnimation();
            expect(Dom_1.$$(test.cmp.element).find('.coveo-facet-header-wait-animation').style.visibility).toBe('hidden');
        });
        it('allows to getValueCaption', function () {
            test.cmp.options.field = '@filetype';
            expect(test.cmp.getValueCaption(FacetValue_1.FacetValue.createFromValue('foo'))).toBe('foo');
            expect(test.cmp.getValueCaption(FacetValue_1.FacetValue.createFromValue('txt'))).toBe('Text');
        });
        it('allows to getCaptionForStringValue', function () {
            test.cmp.options.field = '@filetype';
            test.cmp.options.valueCaption = {
                abc: 'Pancakes',
                def: 'Waffles'
            };
            test.cmp.createDom();
            expect(test.cmp.getCaptionForStringValue('abc')).toBe('Pancakes');
            expect(test.cmp.getCaptionForStringValue('def')).toBe('Waffles');
            expect(test.cmp.getCaptionForStringValue('ghi')).toBe('ghi');
        });
        it("when the valueCaption option is a function, when calling getValueCaption,\n    it gets the value from the list using the passed FacetValue object", function () {
            test.cmp.options.valueCaption = function () { return ''; };
            test.cmp.createDom();
            var facetValue = FacetValue_1.FacetValue.createFromValue('foo');
            var spy = spyOn(test.cmp.facetValuesList, 'get').and.returnValue({ facetValue: facetValue });
            test.cmp.getValueCaption(facetValue);
            expect(spy).toHaveBeenCalledWith(facetValue);
        });
        it("when the valueCaption option is a function, when calling getCaptionForStringValue,\n    it gets the value from the list using the passed FacetValue object", function () {
            test.cmp.options.valueCaption = function () { return ''; };
            test.cmp.createDom();
            var facetValue = FacetValue_1.FacetValue.createFromValue('foo');
            var spy = spyOn(test.cmp.facetValuesList, 'get').and.returnValue({ facetValue: facetValue });
            test.cmp.getCaptionForStringValue('foo');
            expect(spy).toHaveBeenCalledWith(facetValue);
        });
        it('calling #showMore increases the currentPage by 1', function () {
            expect(test.cmp.currentPage).toBe(0);
            test.cmp.showMore();
            expect(test.cmp.currentPage).toBe(1);
        });
        describe('calling #processFacetSearchAllResultsSelected', function () {
            beforeEach(function () {
                test.cmp.options.numberOfValues = 1;
                test.cmp.options.pageSize = 1;
                expect(test.cmp.currentPage).toBe(0);
                var values = ['a', 'b'].map(function (v) {
                    var value = FacetValue_1.FacetValue.createFromValue(v);
                    value.selected = true;
                    return value;
                });
                test.cmp.processFacetSearchAllResultsSelected(values);
            });
            it('does not change the current page', function () {
                expect(test.cmp.currentPage).toBe(0);
            });
            it("calling #showMore increases the page enough to show the next results", function () {
                test.cmp.showMore();
                expect(test.cmp.currentPage).toBe(2);
            });
        });
        describe('with a live query state model', function () {
            beforeEach(function () {
                initializeComponentWithQSM();
            });
            it('should select the needed values', function () {
                test.env.queryStateModel.set('f:@field', ['a', 'b', 'c']);
                expect(test.cmp.getSelectedValues()).toEqual(['a', 'b', 'c']);
            });
            it('should exclude the needed values', function () {
                test.env.queryStateModel.set('f:@field:not', ['a', 'b', 'c']);
                expect(test.cmp.getExcludedValues()).toEqual(['a', 'b', 'c']);
            });
            it('should update the operator', function () {
                test.env.queryStateModel.set('f:@field:operator', 'and');
                expect(test.cmp.options.useAnd).toBeTruthy();
                test.env.queryStateModel.set('f:@field:operator', 'or');
                expect(test.cmp.options.useAnd).toBeFalsy();
            });
            it('should trim values from the query state model for selected values', function () {
                test.env.queryStateModel.set('f:@field', ['a     ', '     b', '    c    ']);
                expect(test.cmp.getSelectedValues()).toEqual(['a', 'b', 'c']);
            });
            it('should trim values from the query state model for excluded values', function () {
                test.env.queryStateModel.set('f:@field:not', ['a     ', '     b', '    c    ']);
                expect(test.cmp.getExcludedValues()).toEqual(['a', 'b', 'c']);
            });
        });
        describe('on a query error', function () {
            it('should hide the waiting animation', function () {
                spyOn(test.cmp, 'hideWaitingAnimation');
                Simulate_1.Simulate.queryError(test.env);
                expect(test.cmp.hideWaitingAnimation).toHaveBeenCalledTimes(1);
            });
            it('should update the appearance based on the new empty values', function () {
                Simulate_1.Simulate.queryError(test.env);
                expect(Dom_1.$$(test.cmp.element).hasClass('coveo-facet-empty')).toBeTruthy();
                expect(test.cmp.getDisplayedFacetValues().length).toBe(0);
            });
        });
        describe('exposes options', function () {
            it('title should set the title', function () {
                test = Mock.optionsComponentSetup(Facet_1.Facet, {
                    field: '@field',
                    title: 'My cool facet'
                });
                test.cmp.ensureDom();
                expect(test.cmp.facetHeader.options.title).toBe('My cool facet');
            });
            it('field should set the field in the query', function () {
                test = Mock.optionsComponentSetup(Facet_1.Facet, {
                    field: '@myfield'
                });
                var simulation = Simulate_1.Simulate.query(test.env);
                expect(simulation.queryBuilder.groupByRequests).toEqual(jasmine.arrayContaining([
                    jasmine.objectContaining({
                        field: '@myfield'
                    })
                ]));
            });
            it('headerIcon should allow to set an icon in the header', function () {
                test = Mock.optionsComponentSetup(Facet_1.Facet, {
                    field: '@field',
                    headerIcon: 'my cool icon'
                });
                test.cmp.ensureDom();
                expect(test.cmp.facetHeader.options.icon).toBe('my cool icon');
            });
            it('id should be the field by default, or specified manually', function () {
                test = Mock.optionsComponentSetup(Facet_1.Facet, {
                    field: '@mycoolfield'
                });
                expect(test.cmp.options.id).toBe('@mycoolfield');
                test = Mock.optionsComponentSetup(Facet_1.Facet, {
                    field: '@mycoolfield2',
                    id: 'somethingelse'
                });
                expect(test.cmp.options.id).toBe('somethingelse');
            });
            it('id should trim all spaces', function () {
                test = Mock.optionsComponentSetup(Facet_1.Facet, {
                    field: '@mycoolfield2',
                    id: ' another random value '
                });
                expect(test.cmp.options.id).toBe('anotherrandomvalue');
            });
            it("id should trim all non alpha-numeric characters except - @ $ _ . + ! * ' ( ) , , ", function () {
                test = Mock.optionsComponentSetup(Facet_1.Facet, {
                    field: '@mycoolfield2',
                    id: "&@!#$%^&*(')._qwerty,,/\\=+-12345"
                });
                expect(test.cmp.options.id).toBe("@!$*(')._qwerty,,+-12345");
            });
            it('id should fallback to the facet field if it contains only characters that need to be encoded in the URL', function () {
                test = Mock.optionsComponentSetup(Facet_1.Facet, {
                    field: '@mycoolfield2',
                    id: ';/?:=& "<>#%{}|^~[]`'
                });
                expect(test.cmp.options.id).toBe('@mycoolfield2');
            });
            it('isMultiValueField should trigger another query to update delta', function () {
                test = Mock.optionsComponentSetup(Facet_1.Facet, {
                    field: '@field',
                    isMultiValueField: false
                });
                test.cmp.selectValue('foo1');
                simulateQueryWithResults();
                expect(test.cmp.getEndpoint().search).not.toHaveBeenCalled();
                test = Mock.optionsComponentSetup(Facet_1.Facet, {
                    field: '@field',
                    isMultiValueField: true
                });
                test.cmp.selectValue('foo1');
                simulateQueryWithResults();
                expect(test.cmp.getEndpoint().search).toHaveBeenCalled();
            });
            it('numberOfValues should specify the number of value requested in the query', function () {
                test = Mock.optionsComponentSetup(Facet_1.Facet, {
                    field: '@field',
                    numberOfValues: 13
                });
                var simulation = Simulate_1.Simulate.query(test.env);
                expect(simulation.queryBuilder.build().groupBy).toEqual(jasmine.arrayContaining([
                    jasmine.objectContaining({
                        maximumNumberOfValues: 13 + 1 // one more for the more less function
                    })
                ]));
            });
            it('when numberOfValues is 0, it does not hide the facet', function () {
                test = Mock.optionsComponentSetup(Facet_1.Facet, {
                    field: '@field',
                    numberOfValues: 0
                });
                Simulate_1.Simulate.query(test.env);
                expect(Dom_1.$$(test.cmp.element).hasClass('coveo-hidden')).toBe(false);
            });
            it("when a query is successful and \"keepDisplayedValuesNextTime\" is false\n      the number of value should update", function () {
                test.cmp.numberOfValues = 13;
                test.cmp.keepDisplayedValuesNextTime = false;
                simulateQueryWithResults(test.cmp.options.numberOfValues);
                expect(test.cmp.numberOfValues).toBe(test.cmp.options.numberOfValues);
            });
            it("when a query is successful and \"keepDisplayedValuesNextTime\" is true\n      the number of value should not change", function () {
                test.cmp.numberOfValues = 13;
                test.cmp.keepDisplayedValuesNextTime = true;
                simulateQueryWithResults(test.cmp.options.numberOfValues);
                expect(test.cmp.numberOfValues).toBe(13);
            });
            it('pageSize should specify the number of values for the more option', function () {
                test = Mock.optionsComponentSetup(Facet_1.Facet, {
                    field: '@field',
                    pageSize: 13
                });
                test.cmp.showMore();
                expect(test.cmp.getEndpoint().search).toHaveBeenCalledWith(jasmine.objectContaining({
                    groupBy: jasmine.arrayContaining([
                        jasmine.objectContaining({
                            maximumNumberOfValues: 13 + test.cmp.options.numberOfValues + 1 // 13 + already displayed at start + 1 more for next more
                        })
                    ])
                }));
            });
            it('lookupField should specify the lookupfield to use in the query', function () {
                test = Mock.optionsComponentSetup(Facet_1.Facet, {
                    field: '@field',
                    lookupField: '@lookupfield'
                });
                var simulation = Simulate_1.Simulate.query(test.env);
                expect(simulation.queryBuilder.build().groupBy).toEqual(jasmine.arrayContaining([
                    jasmine.objectContaining({
                        lookupField: '@lookupfield'
                    })
                ]));
            });
            it('enableSettings should specify if the setting component is initialized', function () {
                test = Mock.optionsComponentSetup(Facet_1.Facet, {
                    field: '@field',
                    enableSettings: false
                });
                test.cmp.ensureDom();
                expect(test.cmp.facetSettings).toBeUndefined();
                test = Mock.optionsComponentSetup(Facet_1.Facet, {
                    field: '@field',
                    enableSettings: true
                });
                test.cmp.ensureDom();
                expect(test.cmp.facetSettings).toBeDefined();
            });
            it('enableSettingsFacetState should specify if the option is passed to the setting component', function () {
                test = Mock.optionsComponentSetup(Facet_1.Facet, {
                    field: '@field',
                    enableSettingsFacetState: false
                });
                test.cmp.ensureDom();
                expect(Dom_1.$$(test.cmp.facetSettings.build()).find('.coveo-facet-settings-section-save-state')).toBeNull();
                test = Mock.optionsComponentSetup(Facet_1.Facet, {
                    field: '@field',
                    enableSettingsFacetState: true
                });
                test.cmp.ensureDom();
                expect(Dom_1.$$(test.cmp.facetSettings.build()).find('.coveo-facet-settings-section-save-state')).toBeDefined();
            });
            it('availableSorts should specify the available criteria in the setting component', function () {
                test = Mock.optionsComponentSetup(Facet_1.Facet, {
                    field: '@field',
                    availableSorts: ['ChiSquare', 'NoSort']
                });
                test.cmp.ensureDom();
                expect(test.cmp.facetSettings.sorts).toEqual(jasmine.arrayContaining(['ChiSquare', 'NoSort']));
            });
            it('sortCriteria should specify the first available sort if not specified', function () {
                test = Mock.optionsComponentSetup(Facet_1.Facet, {
                    field: '@field',
                    availableSorts: ['ChiSquare', 'NoSort']
                });
                test.cmp.ensureDom();
                expect(test.cmp.facetSort.activeSort.name.toLowerCase()).toBe('chisquare');
            });
            it('available sort with only no sorts should still work', function () {
                test = Mock.optionsComponentSetup(Facet_1.Facet, {
                    field: '@field',
                    availableSorts: ['nosort']
                });
                test.cmp.ensureDom();
                expect(test.cmp.facetSort.activeSort.name.toLowerCase()).toBe('nosort');
            });
            it('sortCriteria should specify the sort group by request', function () {
                test = Mock.optionsComponentSetup(Facet_1.Facet, {
                    field: '@field',
                    sortCriteria: 'score'
                });
                var simulation = Simulate_1.Simulate.query(test.env);
                expect(simulation.queryBuilder.build().groupBy).toEqual(jasmine.arrayContaining([
                    jasmine.objectContaining({
                        sortCriteria: 'score'
                    })
                ]));
            });
            it('customSort should specify the sort of values when rendered', function () {
                test = Mock.optionsComponentSetup(Facet_1.Facet, {
                    field: '@field',
                    customSort: ['foo3', 'foo1']
                });
                simulateQueryWithResults();
                expect(test.cmp.getDisplayedFacetValues()[0].value).toBe('foo3');
                expect(test.cmp.getDisplayedFacetValues()[1].value).toBe('foo1');
                expect(test.cmp.getDisplayedFacetValues()[2].value).toBe('foo0');
            });
            it('customSort should request the correct number of values in the group by', function () {
                test = Mock.optionsComponentSetup(Facet_1.Facet, {
                    field: '@field',
                    customSort: ['foo1', 'foo2', 'foo3', 'foo4', 'foo5', 'foo6', 'foo7', 'foo8']
                });
                test.cmp.selectValue('foo9');
                var simulation = Simulate_1.Simulate.query(test.env);
                // expect to be custom sort + selection + 1 for "more values"
                expect(simulation.queryBuilder.build().groupBy[0].maximumNumberOfValues).toBe(10);
                test.cmp.excludeValue('foo10');
                simulation = Simulate_1.Simulate.query(test.env);
                // expect to be custom sort + selection + exclude + 1 for "more values"
                expect(simulation.queryBuilder.build().groupBy[0].maximumNumberOfValues).toBe(11);
                test.cmp.selectValue('foo1');
                simulation = Simulate_1.Simulate.query(test.env);
                // expect to be custom sort + selection + exclude + 1 for "more values"
                // and foo1 is not duplicated since it's already in the custom value
                expect(simulation.queryBuilder.build().groupBy[0].maximumNumberOfValues).toBe(11);
            });
            it("custom sort should not request more values then the default if it's not needed", function () {
                test = Mock.optionsComponentSetup(Facet_1.Facet, {
                    field: '@field',
                    customSort: ['foo1', 'foo2']
                });
                test.cmp.selectValue('foo3');
                var simulation = Simulate_1.Simulate.query(test.env);
                // expect to be 5 (default number of values in facet) + 1 for "more values"
                expect(simulation.queryBuilder.build().groupBy[0].maximumNumberOfValues).toBe(6);
            });
            it('injectionDepth should specify the injection depth in a group by', function () {
                test = Mock.optionsComponentSetup(Facet_1.Facet, {
                    field: '@field',
                    injectionDepth: 9999
                });
                var simulation = Simulate_1.Simulate.query(test.env);
                expect(simulation.queryBuilder.build().groupBy).toEqual(jasmine.arrayContaining([
                    jasmine.objectContaining({
                        injectionDepth: 9999
                    })
                ]));
            });
            it('useAnd should specify the filter generated by a facet', function () {
                test = Mock.optionsComponentSetup(Facet_1.Facet, {
                    field: '@field',
                    useAnd: true
                });
                test.cmp.selectMultipleValues(['foo', 'bar']);
                var simulation = Simulate_1.Simulate.query(test.env);
                expect(simulation.queryBuilder.build().aq).toBe('(@field=="foo") (@field=="bar")');
                test = Mock.optionsComponentSetup(Facet_1.Facet, {
                    field: '@field',
                    useAnd: false
                });
                test.cmp.selectMultipleValues(['foo', 'bar']);
                simulation = Simulate_1.Simulate.query(test.env);
                expect(simulation.queryBuilder.build().aq).toBe('@field==("foo","bar")');
            });
            it('allowTogglingOperator should specify if the toggle is rendered in header ', function () {
                test = Mock.optionsComponentSetup(Facet_1.Facet, {
                    field: '@field',
                    enableTogglingOperator: true
                });
                test.cmp.ensureDom();
                expect(test.cmp.facetHeader.operatorElement.style.display).not.toBe('none');
                test = Mock.optionsComponentSetup(Facet_1.Facet, {
                    field: '@field',
                    enableTogglingOperator: false
                });
                test.cmp.ensureDom();
                expect(test.cmp.facetHeader.operatorElement.style.display).toBe('none');
            });
            it('enableFacetSearch should specify if the facet search is rendered', function () {
                test = Mock.optionsComponentSetup(Facet_1.Facet, {
                    field: '@field',
                    enableFacetSearch: true
                });
                test.cmp.ensureDom();
                expect(test.cmp.facetSearch).toBeDefined();
                test = Mock.optionsComponentSetup(Facet_1.Facet, {
                    field: '@field',
                    enableFacetSearch: false
                });
                test.cmp.ensureDom();
                expect(test.cmp.facetSearch).toBeUndefined();
            });
            describe('with more results than displayed', function () {
                var oneMoreThanNumberOfDisplayedValues = 6;
                beforeEach(function () {
                    var options = { field: '@field', enableFacetSearch: true };
                    test = Mock.optionsComponentSetup(Facet_1.Facet, options);
                    test.cmp['nbAvailableValues'] = oneMoreThanNumberOfDisplayedValues;
                    test.cmp.reset();
                });
                describe('when setting accessibility', function () {
                    var accessibleElement;
                    beforeEach(function () {
                        accessibleElement = test.cmp.searchContainer.accessibleElement;
                    });
                    describe('expanded', function () {
                        var searchResultsElement = Dom_1.$$('div', { id: 'abcdef' }).el;
                        beforeEach(function () {
                            test.cmp.setCollapsedFacetSearchAccessibilityAttributes();
                            test.cmp.setExpandedFacetSearchAccessibilityAttributes(searchResultsElement);
                        });
                        it('should set aria-expanded to true', function () {
                            expect(accessibleElement.getAttribute('aria-expanded')).toEqual(true.toString());
                        });
                    });
                    describe('collapsed', function () {
                        beforeEach(function () {
                            test.cmp.setExpandedFacetSearchAccessibilityAttributes(Dom_1.$$('div', { id: 'abcdef' }).el);
                            test.cmp.setCollapsedFacetSearchAccessibilityAttributes();
                        });
                        it('should set aria-expanded to false', function () {
                            expect(accessibleElement.getAttribute('aria-expanded')).toEqual(false.toString());
                        });
                    });
                });
                describe("given enableFacetSearch is set to 'true',\n        given that searching is not active", function () {
                    var searchingCssClass = 'coveo-facet-searching';
                    function triggerChangeOnCheckbox() {
                        var changeEvent = new Event('change');
                        test.cmp.searchContainer.checkbox.dispatchEvent(changeEvent);
                    }
                    beforeEach(function () {
                        expect(test.cmp.element.className).not.toContain(searchingCssClass);
                    });
                    it("when triggering a 'change' event on the searchContainer checkbox,\n          it actives searching", function () {
                        triggerChangeOnCheckbox();
                        expect(test.cmp.element.className).toContain(searchingCssClass);
                    });
                    describe("when triggering an 'Enter' keyup event on the searchContainer listItem", function () {
                        function triggerEnterKeyOnAccessibleElement() {
                            Simulate_1.Simulate.keyUp(test.cmp.searchContainer.accessibleElement, Core_1.KEYBOARD.ENTER);
                        }
                        beforeEach(triggerEnterKeyOnAccessibleElement);
                        it('activates searching', function () {
                            expect(test.cmp.element.className).toContain(searchingCssClass);
                        });
                        it("sets the checkbox 'checked' attribute", function () {
                            var checkbox = test.cmp.searchContainer.checkbox;
                            var checkedAttribute = checkbox.getAttribute('checked');
                            expect(checkedAttribute).toBeTruthy();
                        });
                        it("when triggering a second 'Enter' keyup event,\n            it removes the checkbox 'checked' attribute", function () {
                            triggerEnterKeyOnAccessibleElement();
                            var checkbox = test.cmp.searchContainer.checkbox;
                            var checkedAttribute = checkbox.getAttribute('checked');
                            expect(checkedAttribute).toBeFalsy();
                        });
                    });
                });
            });
            it('facetSearchDelay should be passed to the facet search component', function (done) {
                test = Mock.optionsComponentSetup(Facet_1.Facet, {
                    field: '@field',
                    facetSearchDelay: 5
                });
                test.cmp.ensureDom();
                test.cmp.facetSearch.focus();
                setTimeout(function () {
                    expect(test.cmp.getEndpoint().search).toHaveBeenCalled();
                    done();
                }, 6); // one more ms then facetSearchDelay
            });
            it('numberOfValuesInFacetSearch should be passed to the facet search component', function (done) {
                test = Mock.optionsComponentSetup(Facet_1.Facet, {
                    field: '@field',
                    numberOfValuesInFacetSearch: 13
                });
                test.cmp.ensureDom();
                test.cmp.facetSearch.focus();
                setTimeout(function () {
                    expect(test.cmp.getEndpoint().search).toHaveBeenCalledWith(jasmine.objectContaining({
                        groupBy: jasmine.arrayContaining([
                            jasmine.objectContaining({
                                maximumNumberOfValues: 13
                            })
                        ])
                    }));
                    done();
                }, test.cmp.options.facetSearchDelay + 10);
            });
            it('includeInBreadcrumb should specify if the facet listen to breadcrumb events', function () {
                test = Mock.optionsComponentSetup(Facet_1.Facet, {
                    field: '@field',
                    includeInBreadcrumb: true
                });
                test.cmp.selectValue('foo');
                var args = {
                    breadcrumbs: []
                };
                Dom_1.$$(test.env.root).trigger(BreadcrumbEvents_1.BreadcrumbEvents.populateBreadcrumb, args);
                expect(args.breadcrumbs.length).toBe(1);
                test = Mock.optionsComponentSetup(Facet_1.Facet, {
                    field: '@field',
                    includeInBreadcrumb: false
                });
                test.cmp.selectValue('foo');
                args = {
                    breadcrumbs: []
                };
                Dom_1.$$(test.env.root).trigger(BreadcrumbEvents_1.BreadcrumbEvents.populateBreadcrumb, args);
                expect(args.breadcrumbs.length).toBe(0);
            });
            it('includeInOmnibox should specify if the facet listen to omnibox events', function () {
                test = Mock.optionsComponentSetup(Facet_1.Facet, {
                    field: '@field',
                    includeInOmnibox: false
                });
                Simulate_1.Simulate.query(test.env);
                var args = Fake_1.FakeResults.createPopulateOmniboxEventArgs('foo', 1);
                Dom_1.$$(test.env.root).trigger(OmniboxEvents_1.OmniboxEvents.populateOmnibox, args);
                expect(args.rows.length).toBe(0);
                test = Mock.optionsComponentSetup(Facet_1.Facet, {
                    field: '@field',
                    includeInOmnibox: true
                });
                Simulate_1.Simulate.query(test.env);
                args = Fake_1.FakeResults.createPopulateOmniboxEventArgs('foo', 1);
                Dom_1.$$(test.env.root).trigger(OmniboxEvents_1.OmniboxEvents.populateOmnibox, args);
                expect(args.rows.length).toBe(1);
            });
            it('computedField should specify the computed field to use in the query', function () {
                test = Mock.optionsComponentSetup(Facet_1.Facet, {
                    field: '@field',
                    computedField: '@computedField'
                });
                var simulation = Simulate_1.Simulate.query(test.env);
                expect(simulation.queryBuilder.build().groupBy).toEqual(jasmine.arrayContaining([
                    jasmine.objectContaining({
                        computedFields: jasmine.arrayContaining([
                            jasmine.objectContaining({
                                field: '@computedField'
                            })
                        ])
                    })
                ]));
            });
            it('computedFieldOperation should specify the computed field to use in the query', function () {
                test = Mock.optionsComponentSetup(Facet_1.Facet, {
                    field: '@field',
                    computedField: '@computedField',
                    computedFieldOperation: 'qwerty'
                });
                var simulation = Simulate_1.Simulate.query(test.env);
                expect(simulation.queryBuilder.build().groupBy).toEqual(jasmine.arrayContaining([
                    jasmine.objectContaining({
                        computedFields: jasmine.arrayContaining([
                            jasmine.objectContaining({
                                operation: 'qwerty'
                            })
                        ])
                    })
                ]));
            });
            it('enableMoreLess should specify that the moreLess element should be rendered', function () {
                test = Mock.optionsComponentSetup(Facet_1.Facet, {
                    field: '@field',
                    enableMoreLess: true
                });
                simulateQueryWithResults(15);
                var more = Dom_1.$$(test.cmp.element).find('.coveo-facet-more');
                var less = Dom_1.$$(test.cmp.element).find('.coveo-facet-less');
                expect(more).toBeDefined();
                expect(less).toBeDefined();
                test = Mock.optionsComponentSetup(Facet_1.Facet, {
                    field: '@field',
                    enableMoreLess: false
                });
                more = Dom_1.$$(test.cmp.element).find('.coveo-facet-more');
                less = Dom_1.$$(test.cmp.element).find('.coveo-facet-less');
                expect(more).toBeNull();
                expect(less).toBeNull();
            });
            it('allowedValues should specify the value in the group by request', function () {
                test = Mock.optionsComponentSetup(Facet_1.Facet, {
                    field: '@field',
                    allowedValues: ['a', 'b', 'c']
                });
                var simulation = Simulate_1.Simulate.query(test.env);
                expect(simulation.queryBuilder.build().groupBy).toEqual(jasmine.arrayContaining([
                    jasmine.objectContaining({
                        allowedValues: jasmine.arrayContaining(['a', 'b', 'c'])
                    })
                ]));
            });
            it('additionalFilter should specify a query override in the group by request', function () {
                test = Mock.optionsComponentSetup(Facet_1.Facet, {
                    field: '@field',
                    additionalFilter: '@qwerty==foobar'
                });
                var simulation = Simulate_1.Simulate.query(test.env);
                expect(simulation.queryBuilder.build().groupBy).toEqual(jasmine.arrayContaining([
                    jasmine.objectContaining({
                        constantQueryOverride: '@qwerty==foobar'
                    })
                ]));
            });
            it('padding container should default to coveo-facet-column', function () {
                var facetColumn = Dom_1.$$('div', { className: 'coveo-facet-column' });
                var dummyDivParent = Dom_1.$$('div');
                test = Mock.advancedComponentSetup(Facet_1.Facet, new Mock.AdvancedComponentSetupOptions(undefined, {}, function (builder) {
                    facetColumn.append(builder.element);
                    dummyDivParent.append(builder.element);
                    facetColumn.append(dummyDivParent.el);
                    return builder;
                }));
                expect(test.cmp.options.paddingContainer).toBe(facetColumn.el);
            });
            it('padding container should default to the parent container if there is no coveo-facet-column', function () {
                var dummyDivParent = Dom_1.$$('div');
                test = Mock.advancedComponentSetup(Facet_1.Facet, new Mock.AdvancedComponentSetupOptions(undefined, {}, function (builder) {
                    dummyDivParent.append(builder.element);
                    return builder;
                }));
                expect(test.cmp.options.paddingContainer).toBe(dummyDivParent.el);
            });
        });
        describe('testing the DependsOnManager', function () {
            var dependentFacet;
            beforeEach(function () {
                initializeComponentWithQSM();
                dependentFacet = Mock.advancedComponentSetup(Facet_1.Facet, new Mock.AdvancedComponentSetupOptions(undefined, {
                    field: '@anotherField',
                    dependsOn: test.cmp.options.id
                }, function (builder) {
                    builder.withQueryStateModel(test.env.queryStateModel);
                    builder.withRoot(test.env.root);
                    builder.withSearchInterface(test.env.searchInterface);
                    return builder;
                })).cmp;
                Dom_1.$$(dependentFacet.root).trigger(Core_1.InitializationEvents.afterComponentsInitialization);
                spyOn(dependentFacet, 'reset');
            });
            it('should initialize the dependsOnManager', function () {
                expect(test.cmp.dependsOnManager).toBeTruthy();
            });
            it("when query state changes so that parent has selected values (default condition fulfilled)\n      should not call \"reset\" on the dependent facet", function () {
                test.cmp.selectValue('test');
                expect(dependentFacet.reset).not.toHaveBeenCalled();
            });
            it("when query state changes so that parent has no selected values (default condition not fulfilled)\n      should call \"reset\" on the dependent facet", function () {
                test.cmp.selectValue('test');
                test.cmp.deselectValue('test');
                expect(dependentFacet.reset).toHaveBeenCalledTimes(1);
            });
        });
    });
}
exports.FacetTest = FacetTest;
 
 
/***/ }),
/* 1621 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var BreadcrumbValuesList_1 = __webpack_require__(328);
var Mock = __webpack_require__(2);
var Facet_1 = __webpack_require__(32);
var FacetValue_1 = __webpack_require__(51);
var BreadcrumbValueElement_1 = __webpack_require__(327);
var _ = __webpack_require__(1);
var Dom_1 = __webpack_require__(0);
var Fake_1 = __webpack_require__(11);
function BreadcrumbValueListTest() {
    describe('BreadcrumbValuesListTest', function () {
        var facet;
        var facetValues;
        beforeEach(function () {
            facet = Mock.mock(Facet_1.Facet);
            facet.options = {};
            facet.options.numberOfValuesInBreadcrumb = 5;
            facet.getValueCaption = jasmine.createSpy('getValueCaption').and.callFake(function (facetValue) { return facetValue.value; });
            facetValues = _.map(Fake_1.FakeResults.createFakeFieldValues('foo', 3), function (fieldValue) {
                var created = FacetValue_1.FacetValue.createFromFieldValue(fieldValue);
                created.selected = true;
                return created;
            });
        });
        it('should support rendering as a simple string and not an HTML element', function () {
            facet.options.title = 'My facet title';
            var builtAsString = new BreadcrumbValuesList_1.BreadcrumbValueList(facet, facetValues, BreadcrumbValueElement_1.BreadcrumbValueElement).buildAsString();
            expect(_.isString(builtAsString)).toBe(true);
            expect(builtAsString).toContain('My facet title');
            expect(builtAsString).toContain('foo0');
            expect(builtAsString).toContain('foo1');
            expect(builtAsString).toContain('foo2');
        });
        it('should output the title with the facet title option', function () {
            facet.options.title = 'My facet title';
            var built = new BreadcrumbValuesList_1.BreadcrumbValueList(facet, facetValues, BreadcrumbValueElement_1.BreadcrumbValueElement).build();
            var title = Dom_1.$$(built).find('.coveo-facet-breadcrumb-title');
            expect(Dom_1.$$(title).text()).toContain('My facet title');
        });
        it('should display a label with the right attributes for each selected values', function () {
            var built = new BreadcrumbValuesList_1.BreadcrumbValueList(facet, facetValues, BreadcrumbValueElement_1.BreadcrumbValueElement).build();
            var values = Dom_1.$$(built).findAll('.coveo-facet-breadcrumb-value');
            expect(values.length).toBe(3);
            expect(Dom_1.$$(values[0]).getAttribute('aria-label')).toBe('Remove inclusion filter on foo0');
            expect(Dom_1.$$(values[0]).getAttribute('role')).toBe('button');
            expect(Dom_1.$$(values[0]).getAttribute('tabindex')).toBe('0');
        });
        it('should display a caption for each selected values', function () {
            var built = new BreadcrumbValuesList_1.BreadcrumbValueList(facet, facetValues, BreadcrumbValueElement_1.BreadcrumbValueElement).build();
            var captions = Dom_1.$$(built).findAll('.coveo-facet-breadcrumb-caption');
            expect(Dom_1.$$(captions[0]).text()).toContain('foo0');
            expect(Dom_1.$$(captions[1]).text()).toContain('foo1');
            expect(Dom_1.$$(captions[2]).text()).toContain('foo2');
        });
        it('should display a clear button for each selected values', function () {
            var built = new BreadcrumbValuesList_1.BreadcrumbValueList(facet, facetValues, BreadcrumbValueElement_1.BreadcrumbValueElement).build();
            var clear = Dom_1.$$(built).findAll('.coveo-facet-breadcrumb-clear');
            expect(clear.length).toBe(3);
        });
        it('should respect the facet option for the number of values in breadcrumb', function () {
            facet.options.numberOfValuesInBreadcrumb = 2;
            var built = new BreadcrumbValuesList_1.BreadcrumbValueList(facet, facetValues, BreadcrumbValueElement_1.BreadcrumbValueElement).build();
            var andShowMore = Dom_1.$$(built).findAll('.coveo-facet-breadcrumb-multi-count');
            expect(andShowMore.length).toBe(1);
            expect(Dom_1.$$(andShowMore[0]).text()).toContain('1 more...');
        });
        describe('when some values are excluded', function () {
            beforeEach(function () {
                facetValues[2].excluded = true;
                facetValues[2].selected = false;
            });
            it('should display excluded values differently', function () {
                var built = new BreadcrumbValuesList_1.BreadcrumbValueList(facet, facetValues, BreadcrumbValueElement_1.BreadcrumbValueElement).build();
                var excluded = Dom_1.$$(built).findAll('.coveo-facet-breadcrumb-value.coveo-excluded');
                expect(excluded.length).toBe(1);
            });
            it('should add the excluded and selected values together when it exceeds the number of values in breadcrumb', function () {
                facet.options.numberOfValuesInBreadcrumb = 1;
                var built = new BreadcrumbValuesList_1.BreadcrumbValueList(facet, facetValues, BreadcrumbValueElement_1.BreadcrumbValueElement).build();
                var andShowMore = Dom_1.$$(built).findAll('.coveo-facet-breadcrumb-multi-count');
                expect(andShowMore.length).toBe(1);
                expect(Dom_1.$$(andShowMore[0]).text()).toContain('2 more...');
            });
            it('should display the hidden values correctly when every values are excluded', function () {
                facetValues = _.map(facetValues, function (facetValue) {
                    facetValue.excluded = true;
                    facetValue.selected = false;
                    return facetValue;
                });
                facet.options.numberOfValuesInBreadcrumb = 1;
                var built = new BreadcrumbValuesList_1.BreadcrumbValueList(facet, facetValues, BreadcrumbValueElement_1.BreadcrumbValueElement).build();
                var andShowMore = Dom_1.$$(built).findAll('.coveo-facet-breadcrumb-multi-count');
                expect(andShowMore.length).toBe(1);
                expect(Dom_1.$$(andShowMore[0]).text()).toContain('2 more...');
            });
            it('should display the hidden values correctly when every values are included', function () {
                facetValues = _.map(facetValues, function (facetValue) {
                    facetValue.excluded = false;
                    facetValue.selected = true;
                    return facetValue;
                });
                facet.options.numberOfValuesInBreadcrumb = 1;
                var built = new BreadcrumbValuesList_1.BreadcrumbValueList(facet, facetValues, BreadcrumbValueElement_1.BreadcrumbValueElement).build();
                var andShowMore = Dom_1.$$(built).findAll('.coveo-facet-breadcrumb-multi-count');
                expect(andShowMore.length).toBe(1);
                expect(Dom_1.$$(andShowMore[0]).text()).toContain('2 more...');
            });
            it('should show hidden values on clicking show more', function () {
                facet.options.numberOfValuesInBreadcrumb = 1;
                var built = new BreadcrumbValuesList_1.BreadcrumbValueList(facet, facetValues, BreadcrumbValueElement_1.BreadcrumbValueElement).build();
                var andShowMore = Dom_1.$$(built).find('.coveo-facet-breadcrumb-multi-count');
                Dom_1.$$(andShowMore).trigger('click');
                var captions = Dom_1.$$(built).findAll('.coveo-facet-breadcrumb-caption');
                expect(Dom_1.$$(captions[0]).text()).toContain('foo0');
                expect(Dom_1.$$(captions[1]).text()).toContain('foo1');
                expect(Dom_1.$$(captions[2]).text()).toContain('foo2');
            });
            it('should display a label with the right accessibility attributes for each excluded values', function () {
                var built = new BreadcrumbValuesList_1.BreadcrumbValueList(facet, facetValues, BreadcrumbValueElement_1.BreadcrumbValueElement).build();
                var values = Dom_1.$$(built).findAll('.coveo-facet-breadcrumb-value')[2];
                expect(Dom_1.$$(values).getAttribute('aria-label')).toBe('Remove exclusion filter on foo2');
                expect(Dom_1.$$(values).getAttribute('role')).toBe('button');
                expect(Dom_1.$$(values).getAttribute('tabindex')).toBe('0');
            });
        });
    });
}
exports.BreadcrumbValueListTest = BreadcrumbValueListTest;
 
 
/***/ }),
/* 1622 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Mock = __webpack_require__(2);
var FieldSuggestions_1 = __webpack_require__(786);
var Simulate_1 = __webpack_require__(15);
var AnalyticsActionListMeta_1 = __webpack_require__(7);
var Dom_1 = __webpack_require__(0);
var Fake_1 = __webpack_require__(11);
var Core_1 = __webpack_require__(9);
function FieldSuggestionsTest() {
    describe('FieldSuggestions', function () {
        var test;
        beforeEach(function () {
            // In phantom js there is a bug with CustomEvent('click'), which is needed to for those tests.
            // So, use jquery for event in phantom js
            Iif (Simulate_1.Simulate.isPhantomJs()) {
                Simulate_1.Simulate.addJQuery();
            }
            test = Mock.optionsComponentSetup(FieldSuggestions_1.FieldSuggestions, {
                field: '@foobar'
            });
        });
        afterEach(function () {
            test = null;
            Simulate_1.Simulate.removeJQuery();
        });
        it('should do a request on the endpoint', function () {
            Simulate_1.Simulate.populateOmnibox(test.env);
            expect(test.env.searchEndpoint.listFieldValues).toHaveBeenCalledWith(jasmine.objectContaining({
                field: '@foobar'
            }));
        });
        it('should throw when there is no field', function () {
            expect(function () {
                test = Mock.optionsComponentSetup(FieldSuggestions_1.FieldSuggestions, {
                    field: undefined
                });
            }).toThrow();
        });
        it('should trigger an analytics event on suggestion', function (done) {
            test.env.searchEndpoint.listFieldValues = jasmine.createSpy('search');
            test.env.searchEndpoint.listFieldValues.and.returnValue(new Promise(function (resolve) {
                resolve([{ value: 'foo' }, { value: 'bar' }, { value: 'baz' }]);
            }));
            var simulation = Simulate_1.Simulate.populateOmnibox(test.env);
            test.cmp.selectSuggestion(0);
            simulation.rows[0].deferred.then(function (elementResolved) {
                test.cmp.selectSuggestion(0);
                expect(test.env.usageAnalytics.logSearchEvent).toHaveBeenCalledWith(AnalyticsActionListMeta_1.analyticsActionCauseList.omniboxField, {});
                done();
            });
        });
        describe("when calling the onSelect option", function () {
            var value = 'value';
            var args;
            beforeEach(function () {
                args = buildPopulateOmniboxEventArgs();
                test.cmp.options.onSelect.call(test.cmp, value, args);
            });
            function buildPopulateOmniboxEventArgs() {
                var args = Fake_1.FakeResults.createPopulateOmniboxEventArgs('foo', 1);
                spyOn(args, 'clear');
                spyOn(args, 'closeOmnibox');
                return args;
            }
            it('does not call the args #clear method', function () {
                // https://coveord.atlassian.net/browse/JSUI-2748
                expect(args.clear).not.toHaveBeenCalled();
            });
            it('calls the args #closeOmnibox method', function () {
                expect(args.closeOmnibox).toHaveBeenCalledTimes(1);
            });
            it('sets the QueryStateModel query to the value', function () {
                expect(test.cmp.queryStateModel.set).toHaveBeenCalledWith(Core_1.QueryStateModel.attributesEnum.q, value);
            });
            it('logs a search event to analytics with the correct cause', function () {
                expect(test.cmp.usageAnalytics.logSearchEvent).toHaveBeenCalledWith(AnalyticsActionListMeta_1.analyticsActionCauseList.omniboxField, {});
            });
            it('calls executeQuery', function () {
                expect(test.cmp.queryController.executeQuery).toHaveBeenCalledTimes(1);
            });
        });
        describe('exposes options', function () {
            it('queryOverride should be passed in the list field value', function () {
                test = Mock.optionsComponentSetup(FieldSuggestions_1.FieldSuggestions, {
                    field: '@foobar',
                    queryOverride: 'some override'
                });
                Simulate_1.Simulate.populateOmnibox(test.env);
                expect(test.env.searchEndpoint.listFieldValues).toHaveBeenCalledWith(jasmine.objectContaining({
                    field: '@foobar',
                    queryOverride: 'some override'
                }));
            });
            it('omniboxZIndex should be taken into account', function (done) {
                test = Mock.optionsComponentSetup(FieldSuggestions_1.FieldSuggestions, {
                    field: '@foobar',
                    omniboxZIndex: 333
                });
                test.env.searchEndpoint.listFieldValues = jasmine.createSpy('search');
                test.env.searchEndpoint.listFieldValues.and.returnValue(new Promise(function (resolve) {
                    resolve([{ value: 'foo' }, { value: 'bar' }, { value: 'baz' }]);
                }));
                var simulation = Simulate_1.Simulate.populateOmnibox(test.env);
                test.cmp.selectSuggestion(0);
                simulation.rows[0].deferred.then(function (elementResolved) {
                    expect(elementResolved.zIndex).toBe(333);
                    done();
                });
            });
            it('numberOfSuggestions should be passed in the list field value', function () {
                test = Mock.optionsComponentSetup(FieldSuggestions_1.FieldSuggestions, {
                    field: '@foobar',
                    numberOfSuggestions: 333
                });
                Simulate_1.Simulate.populateOmnibox(test.env);
                expect(test.env.searchEndpoint.listFieldValues).toHaveBeenCalledWith(jasmine.objectContaining({
                    field: '@foobar',
                    maximumNumberOfValues: 333
                }));
            });
            describe('when data is returned for a field', function () {
                var fakeListField;
                beforeEach(function () {
                    fakeListField = Promise.resolve([{ value: 'foo' }, { value: 'bar' }, { value: 'baz' }]);
                });
                it('should not provide a header if not configured as an option', function (done) {
                    test = Mock.optionsComponentSetup(FieldSuggestions_1.FieldSuggestions, {
                        field: '@foobar'
                    });
                    test.env.searchEndpoint.listFieldValues.and.returnValue(fakeListField);
                    var simulation = Simulate_1.Simulate.populateOmnibox(test.env);
                    simulation.rows[0].deferred.then(function (elementResolved) {
                        expect(Dom_1.$$(elementResolved.element).find('.coveo-top-field-suggestion-header')).toBeNull();
                        done();
                    });
                });
                it('should provide a header if configured as an option', function (done) {
                    test = Mock.optionsComponentSetup(FieldSuggestions_1.FieldSuggestions, {
                        field: '@foobar',
                        headerTitle: 'my suggestion'
                    });
                    test.env.searchEndpoint.listFieldValues.and.returnValue(fakeListField);
                    var simulation = Simulate_1.Simulate.populateOmnibox(test.env);
                    simulation.rows[0].deferred.then(function (elementResolved) {
                        var header = Dom_1.$$(elementResolved.element).find('.coveo-top-field-suggestion-header');
                        expect(header).not.toBeNull();
                        expect(Dom_1.$$(header).text()).toBe('my suggestion');
                        done();
                    });
                });
            });
        });
    });
}
exports.FieldSuggestionsTest = FieldSuggestionsTest;
 
 
/***/ }),
/* 1623 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Mock = __webpack_require__(2);
var FieldTable_1 = __webpack_require__(376);
var Dom_1 = __webpack_require__(0);
var Fake_1 = __webpack_require__(11);
var Strings_1 = __webpack_require__(4);
function FieldTableTest() {
    describe('FieldTable', function () {
        var test;
        var element;
        var createElement = function () {
            element = Dom_1.$$('table', { className: 'CoveoFieldTable' }).el;
            element.appendChild(Dom_1.$$('tr', { 'data-field': '@author', 'data-caption': 'Author' }).el);
        };
        function findToggleButton() {
            return Dom_1.$$(test.env.root).find('.coveo-field-table-toggle');
        }
        function findToggleCaption() {
            return Dom_1.$$(test.env.root).find('.coveo-field-table-toggle-caption');
        }
        function findToggleContainer() {
            return Dom_1.$$(test.env.root).find('.coveo-field-table-toggle-container');
        }
        beforeEach(function () {
            test = Mock.advancedResultComponentSetup(FieldTable_1.FieldTable, Fake_1.FakeResults.createFakeResult(), {
                element: element
            });
        });
        afterEach(function () {
            test = null;
            element = null;
        });
        describe('exposes options', function () {
            describe('allowMinimization set to false', function () {
                beforeEach(function () {
                    test = Mock.optionsResultComponentSetup(FieldTable_1.FieldTable, {
                        allowMinimization: false
                    }, Fake_1.FakeResults.createFakeResult());
                });
                it('should not show a toggle link', function () {
                    expect(Dom_1.$$(test.env.element).find('.coveo-field-table-toggle')).toBeNull();
                });
                it('should not wrap table in a toggle container', function () {
                    expect(findToggleContainer()).toBeNull();
                });
                it('should be expanded', function () {
                    expect(test.cmp.isExpanded).toBe(true);
                });
                it('should disable toggling, expanding and minimizing', function () {
                    test.cmp.toggle();
                    expect(test.cmp.isExpanded).toBe(true);
                    test.cmp.minimize();
                    expect(test.cmp.isExpanded).toBe(true);
                    test.cmp.expand();
                    expect(test.cmp.isExpanded).toBe(true);
                });
            });
            describe('allowMinimization set to true', function () {
                function setToggleContainerScrollHeight(height) {
                    Object.defineProperty(findToggleContainer(), 'scrollHeight', { value: height, writable: true });
                }
                beforeEach(function () {
                    createElement();
                    test = Mock.advancedResultComponentSetup(FieldTable_1.FieldTable, Fake_1.FakeResults.createFakeResult(), {
                        element: element,
                        cmpOptions: {
                            allowMinimization: true
                        }
                    });
                });
                it('should show a toggle link', function () {
                    expect(findToggleButton()).not.toBeNull();
                });
                it('shows a toggle caption set to the minimizedTitle', function (done) {
                    requestAnimationFrame(function () {
                        expect(findToggleCaption().textContent).toBe(test.cmp.options.minimizedTitle);
                        done();
                    });
                });
                it('should put the tabindex to 0 on the toggle caption', function () {
                    expect(findToggleButton().getAttribute('tabindex')).toBe('0');
                });
                it('should wrap the table in a toggle container', function () {
                    expect(Dom_1.$$(test.env.element.parentElement).hasClass('coveo-field-table-toggle-container')).toBe(true);
                });
                it('expandedTitle should be the text of the toggle link only when table is expanded', function () {
                    createElement();
                    test = Mock.advancedResultComponentSetup(FieldTable_1.FieldTable, Fake_1.FakeResults.createFakeResult(), {
                        element: element,
                        cmpOptions: {
                            expandedTitle: 'foobar2000'
                        }
                    });
                    var toggle = findToggleCaption();
                    test.cmp.expand();
                    expect(toggle.textContent).toBe('foobar2000');
                    test.cmp.minimize();
                    expect(toggle.textContent).not.toBe('foobar2000');
                });
                it('expandedTitle should be the localized version of "Details" by default', function () {
                    test.cmp.expand();
                    var toggle = findToggleCaption();
                    expect(toggle.textContent).toBe('Details'.toLocaleString());
                });
                it('minimizedTitle should be the text of the toggle link only when table is minimized', function () {
                    createElement();
                    test = Mock.advancedResultComponentSetup(FieldTable_1.FieldTable, Fake_1.FakeResults.createFakeResult(), {
                        element: element,
                        cmpOptions: {
                            minimizedTitle: 'foobar2000'
                        }
                    });
                    var toggle = findToggleCaption();
                    test.cmp.minimize();
                    expect(toggle.textContent).toBe('foobar2000');
                    test.cmp.expand();
                    expect(toggle.textContent).not.toBe('foobar2000');
                });
                it('minimizedTitle should be the localized version of "Details" by default', function () {
                    test.cmp.minimize();
                    var toggle = findToggleCaption();
                    expect(toggle.textContent).toBe('Details'.toLocaleString());
                });
                it("given a toggle container with a zero scrollHeight,\n        when calling #expand after the container has a non-zero scrollHeight,\n        it sets the height of the container to the new value", function () {
                    var container = findToggleContainer();
                    expect(container.scrollHeight).toBe(0);
                    var newScrollHeight = 100;
                    setToggleContainerScrollHeight(newScrollHeight);
                    test.cmp.expand();
                    expect(findToggleContainer().style.height).toBe(newScrollHeight + "px");
                });
                it("given a toggle container with a non-zero scrollHeight,\n        when the container scrollHeight changes,\n        when calling #expand, it keeps the height of the container equal to the initial value", function () {
                    // When retreiving the scrollHeight on every expand, I saw an animation lag when
                    // expanding and minimizing quickly. So we use memoization, and only update the value if it is falsy.
                    var scrollHeight1 = 100;
                    var container = findToggleContainer();
                    setToggleContainerScrollHeight(scrollHeight1);
                    test.cmp.updateToggleHeight();
                    expect(scrollHeight1).not.toBe(0);
                    expect(container.scrollHeight).toBe(scrollHeight1);
                    var scrollHeight2 = scrollHeight1 + 1;
                    setToggleContainerScrollHeight(scrollHeight2);
                    test.cmp.expand();
                    expect(findToggleContainer().style.height).toBe(scrollHeight1 + "px");
                });
                it('minimizedByDefault set to true should initialize the table in a minimized state', function () {
                    test = Mock.optionsResultComponentSetup(FieldTable_1.FieldTable, {
                        minimizedByDefault: true
                    }, Fake_1.FakeResults.createFakeResult());
                    expect(test.cmp.isExpanded).toBe(false);
                });
                it('minimizedByDefault set to false should initialize the table in an expanded state', function () {
                    test = Mock.optionsResultComponentSetup(FieldTable_1.FieldTable, {
                        minimizedByDefault: false
                    }, Fake_1.FakeResults.createFakeResult());
                    expect(test.cmp.isExpanded).toBe(true);
                });
                it('toggle should set aria-expanded to its expanded state', function () {
                    test.cmp.minimize();
                    test.cmp.toggle();
                    expect(findToggleButton().getAttribute('aria-expanded')).toBe('true');
                    test.cmp.toggle();
                    expect(findToggleButton().getAttribute('aria-expanded')).toBe('false');
                });
                it('should give the toggleable container a unique id', function () {
                    expect(findToggleContainer().id.match(/[0-9]$/)).not.toBeNull();
                });
                it('should give the toggle button an aria-controls attribute', function () {
                    expect(findToggleButton().getAttribute('aria-controls')).toEqual(findToggleContainer().id);
                });
                it('should gibe the toggle button an appropriate label', function () {
                    expect(findToggleButton().getAttribute('aria-label')).toEqual(Strings_1.l('Details'));
                });
            });
        });
        it('toggle should toggle between expanded and minimized states', function () {
            test.cmp.minimize();
            test.cmp.toggle();
            expect(test.cmp.isExpanded).toBe(true);
            test.cmp.toggle();
            expect(test.cmp.isExpanded).toBe(false);
        });
    });
}
exports.FieldTableTest = FieldTableTest;
 
 
/***/ }),
/* 1624 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Mock = __webpack_require__(2);
var FieldValue_1 = __webpack_require__(183);
var Fake_1 = __webpack_require__(11);
var Dom_1 = __webpack_require__(0);
var TemplateHelpers_1 = __webpack_require__(141);
var Facet_1 = __webpack_require__(32);
var DateUtils_1 = __webpack_require__(43);
var _ = __webpack_require__(1);
var Core_1 = __webpack_require__(9);
function FieldValueTest() {
    describe('FieldValue', function () {
        var test;
        var getText = function () {
            return Dom_1.$$(test.cmp.element).find('span').textContent;
        };
        var getTitle = function () {
            return Dom_1.$$(test.cmp.element).find('span').getAttribute('title');
        };
        beforeEach(function () {
            initializeFieldValueComponent({ field: '@string' });
        });
        function initializeFieldValueComponent(options, result) {
            if (result === void 0) { result = Fake_1.FakeResults.createFakeResult(); }
            var facets = [];
            for (var _i = 2; _i < arguments.length; _i++) {
                facets[_i - 2] = arguments[_i];
            }
            result.raw.filetype = 'unknown';
            test = Mock.advancedResultComponentSetup(FieldValue_1.FieldValue, result, {
                element: Dom_1.$$('span').el,
                cmpOptions: options,
                modifyBuilder: function (builder) {
                    if (facets.length) {
                        builder.componentStateModel.get = function () { return facets; };
                        builder.queryStateModel.get = function () { return []; };
                        facets.forEach(function (facet) { return builder.searchInterface.attachComponent(facet.constructor.ID, facet); });
                    }
                    return builder;
                }
            });
        }
        function initializeFacet(options) {
            var newFacet = Mock.mockComponent(Facet_1.Facet);
            newFacet.isFieldValueCompatible = true;
            newFacet.isFieldValueHierarchical = false;
            newFacet.constructor['ID'] = Facet_1.Facet.ID;
            newFacet.hasSelectedValue = function () { return true; };
            newFacet.options = options;
            return newFacet;
        }
        describe('exposes options', function () {
            it('field not specified should default to @field', function () {
                initializeFieldValueComponent({});
                expect(test.cmp.options.field).toBe('@field');
            });
            it('facet should use the field value by default', function () {
                initializeFieldValueComponent({ field: '@foobarde' });
                expect(test.cmp.options.facet).toBe('@foobarde');
            });
            it("htmlValue set to true should set the element's innerHTML value properly", function () {
                initializeFieldValueComponent({ field: '@foobarde', htmlValue: true });
                expect(test.cmp.renderOneValue('<em>patatefrietz</em>').innerHTML).toBe('<em>patatefrietz</em>');
            });
            it('htmlValue set to false should set the value in text node', function () {
                initializeFieldValueComponent({ field: '@foobarde', htmlValue: false });
                expect(test.cmp.renderOneValue('<em>patatefrietz</em>').textContent).toBe('<em>patatefrietz</em>');
            });
            it('splitValues should display the array of values separated by commas when the input values are semi-colon separated', function () {
                var result = Fake_1.FakeResults.createFakeResult();
                result.raw.foobarde = 'this;is;sparta';
                initializeFieldValueComponent({
                    field: '@foobarde',
                    splitValues: true,
                    separator: ';'
                }, result);
                expect(test.cmp.element.textContent).toBe('this, is, sparta');
            });
            it('displaySeparator should modify the string displayed between values of a multi-value field', function () {
                var result = Fake_1.FakeResults.createFakeResult();
                result.raw.foobarde = 'this;is;sparta';
                initializeFieldValueComponent({
                    field: '@foobarde',
                    splitValues: true,
                    separator: ';',
                    displaySeparator: '<->'
                }, result);
                expect(test.cmp.element.textContent).toBe('this<->is<->sparta');
            });
            it('separator should specify the string used to split a multi-value field from the index', function () {
                var result = Fake_1.FakeResults.createFakeResult();
                result.raw.foobarde = 'this,is,sparta';
                initializeFieldValueComponent({
                    field: '@foobarde',
                    splitValues: true,
                    separator: ','
                }, result);
                expect(test.cmp.element.textContent).toBe('this, is, sparta');
            });
            it('separator default value must be ;', function () {
                var result = Fake_1.FakeResults.createFakeResult();
                result.raw.foobarde = 'this;is;sparta';
                initializeFieldValueComponent({
                    field: '@foobarde',
                    splitValues: true
                }, result);
                expect(test.cmp.element.textContent).toBe('this, is, sparta');
            });
            it('splitValues should display the array of values separated by commas when the input values are in an array', function () {
                var result = Fake_1.FakeResults.createFakeResult();
                result.raw.foobarde = ['this', 'is', 'sparta'];
                initializeFieldValueComponent({
                    field: '@foobarde',
                    splitValues: true
                }, result);
                expect(test.cmp.element.textContent).toBe('this, is, sparta');
            });
            it('helper should render using the specified helper', function () {
                initializeFieldValueComponent({
                    field: '@foobarde',
                    helper: 'hamburgerHelper'
                });
                TemplateHelpers_1.TemplateHelpers.registerFieldHelper('hamburgerHelper', function (value) { return 'ham' + value + 'burger'; });
                expect(test.cmp.renderOneValue('1337').textContent).toEqual('ham1337burger');
            });
            it('helper should eliminate helperOptions that do not match the current helper', function () {
                initializeFieldValueComponent({
                    field: '@author',
                    helper: 'anchor',
                    htmlValue: true
                });
                var anchor = Dom_1.$$(test.cmp.element).find('a');
                expect(anchor.outerHTML).toEqual('<a href="o.o">o.o</a>');
            });
            it('helper should try and execute a version 2 of the helper if found', function () {
                initializeFieldValueComponent({
                    field: '@foo',
                    helper: 'somehelper'
                });
                TemplateHelpers_1.TemplateHelpers.registerFieldHelper('somehelper', function (value) { return 'version1'; });
                TemplateHelpers_1.TemplateHelpers.registerFieldHelper('somehelperv2', function (value) { return 'version2'; });
                expect(test.cmp.renderOneValue('somevalue').textContent).toEqual('version2');
            });
            it('should not crash and render the default value if the helper does not exist', function () {
                initializeFieldValueComponent({
                    field: '@foo',
                    helper: 'somehelperwhichdoesnotexist'
                });
                expect(test.cmp.renderOneValue('somevalue').textContent).toEqual('somevalue');
            });
            it('should support shorten helper', function () {
                initializeFieldValueComponent({
                    field: '@longfieldvalue',
                    helper: 'shorten'
                });
                expect(test.cmp.renderOneValue(_.range(0, 1000).join('-')).textContent.length).toBe(200);
            });
            it('textCaption should render a text value', function () {
                initializeFieldValueComponent({
                    field: '@title',
                    textCaption: '<script>alert("Potatoes")</script>'
                });
                expect(Dom_1.$$(test.cmp.element).text()).toContain('<script>alert("Potatoes")</script>');
            });
            it('textCaption should render in front of the fieldValue', function () {
                initializeFieldValueComponent({
                    field: '@title',
                    textCaption: 'this is a test'
                });
                expect(Dom_1.$$(Dom_1.$$(test.cmp.element).children()[0]).hasClass('coveo-field-caption')).toBe(true);
            });
            it('textCaption option should add the class coveo-with-label to the CoveoFieldValue', function () {
                initializeFieldValueComponent({
                    field: '@title',
                    textCaption: 'this is a test'
                });
                expect(Dom_1.$$(test.cmp.element).hasClass('coveo-with-label')).toBe(true);
            });
            it('matching condition should let the component render within its parent', function () {
                initializeFieldValueComponent({
                    field: '@title',
                    conditions: [{ field: 'filetype', values: ['unknown'] }]
                });
                expect(test.cmp.element.parentElement).toBeDefined();
            });
            it('not matching condition should detach the component from its parent', function () {
                initializeFieldValueComponent({
                    field: '@title',
                    conditions: [{ field: 'filetype', values: ['abc'] }]
                });
                expect(test.cmp.element.parentElement).toBeNull();
            });
            it('not matching reversed condition should let the component render within its parent', function () {
                initializeFieldValueComponent({
                    field: '@title',
                    conditions: [{ field: 'filetype', values: ['abc'], reverseCondition: true }]
                });
                expect(test.cmp.element.parentElement).toBeDefined();
            });
            it('matching reversed condition should detach the component from its parent', function () {
                initializeFieldValueComponent({
                    field: '@title',
                    conditions: [{ field: 'filetype', values: ['unknown'], reverseCondition: true }]
                });
                expect(test.cmp.element.parentElement).toBeNull();
            });
        });
        it('should display the proper field value', function () {
            expect(getText()).toBe('string value');
        });
        describe('with a related facet', function () {
            var facet;
            beforeEach(function () {
                facet = initializeFacet({ field: '@string' });
            });
            describe('when translating standard field values', function () {
                beforeEach(function () {
                    var fakeResult = Fake_1.FakeResults.createFakeResult();
                    fakeResult.raw['objecttype'] = 'opportunityproduct';
                    facet = initializeFacet({ field: '@objecttype' });
                    initializeFieldValueComponent({ field: '@objecttype' }, fakeResult, facet);
                });
                it('should use the translated value', function () {
                    expect(getText()).toBe(Core_1.l('opportunityproduct'));
                });
                it('should use the translated value for the title', function () {
                    expect(getTitle()).toContain(Core_1.l('opportunityproduct'));
                });
            });
            describe('with a caption', function () {
                var caption = 'blah';
                beforeEach(function () {
                    var fakeResult = Fake_1.FakeResults.createFakeResult();
                    fakeResult.raw['objecttype'] = 'opportunityproduct';
                    facet = initializeFacet({ field: '@objecttype' });
                    facet.getCaptionForStringValue = function () { return caption; };
                    initializeFieldValueComponent({ field: '@objecttype' }, fakeResult, facet);
                });
                it('with a caption, should use the caption', function () {
                    expect(getText()).toEqual(caption);
                    expect(getTitle()).toContain(caption);
                });
            });
            it('should display the field value as clickable when its facet is enabled', function () {
                facet.disabled = false;
                initializeFieldValueComponent({ field: '@string' }, Fake_1.FakeResults.createFakeResult(), facet);
                expect(test.cmp.element.querySelector('.coveo-clickable')).not.toBeNull();
            });
            it('should not display the field value as clickable when its facet is disabled', function () {
                facet.disabled = true;
                initializeFieldValueComponent({ field: '@string' }, Fake_1.FakeResults.createFakeResult(), facet);
                expect(test.cmp.element.querySelector('.coveo-clickable')).toBeNull();
            });
            it('should not display the field value as clickable when its facet has a different field', function () {
                facet.disabled = false;
                initializeFieldValueComponent({ field: '@objecttype' }, Fake_1.FakeResults.createFakeResult(), facet);
                expect(test.cmp.element.querySelector('.coveo-clickable')).toBeNull();
            });
        });
        describe('with a related hierarchical facet', function () {
            var facet;
            var hasSelectedValueSpy;
            function initializeHierarchicalFacetWithValueComponent(isFullPathSelected) {
                facet.hasSelectedValue = hasSelectedValueSpy = jasmine.createSpy('hasSelectedValue', function () { return isFullPathSelected; }).and.callThrough();
                var fakeResult = Fake_1.FakeResults.createFakeResult();
                fakeResult.raw['category'] = ['Electronics', 'Electronics>Printers', 'Electronics>Printers>3D Printers'];
                initializeFieldValueComponent({ field: '@category' }, fakeResult, facet);
            }
            beforeEach(function () {
                facet = initializeFacet({ field: '@category' });
                facet.isFieldValueHierarchical = true;
                facet.getCaptionForStringValue = function (value) { return value.split('>').slice(-1)[0]; };
            });
            describe('when the full path is selected in the facet', function () {
                beforeEach(function () {
                    initializeHierarchicalFacetWithValueComponent(true);
                });
                it('should display only the last leaf', function () {
                    expect(Dom_1.Dom.nodeListToArray(test.cmp.element.querySelectorAll('.coveo-clickable')).map(function (el) { return el.textContent; })).toEqual([
                        '3D Printers'
                    ]);
                });
                it('should call hasSelectedValue with the full path', function () {
                    expect(hasSelectedValueSpy).toHaveBeenCalledTimes(1);
                    expect(hasSelectedValueSpy.calls.mostRecent().args).toEqual(['Electronics>Printers>3D Printers']);
                });
                it('should display the leaf as selected', function () {
                    expect(test.cmp.element.querySelector('.coveo-clickable').classList.contains('coveo-selected')).toBeTruthy();
                });
            });
            describe('when only part of the path is selected', function () {
                beforeEach(function () {
                    initializeHierarchicalFacetWithValueComponent(false);
                });
                it('should display only the last leaf', function () {
                    expect(Dom_1.Dom.nodeListToArray(test.cmp.element.querySelectorAll('.coveo-clickable')).map(function (el) { return el.textContent; })).toEqual([
                        '3D Printers'
                    ]);
                });
                it('should display the leaf as selected', function () {
                    expect(test.cmp.element.querySelector('.coveo-clickable').classList.contains('coveo-selected')).toBeFalsy();
                });
            });
        });
        it('should show a full date tooltip when it has a date, dateTime or emailDateTime helper', function () {
            var fakeResult = Fake_1.FakeResults.createFakeResult();
            var options = {
                field: '@date',
                helper: 'date'
            };
            var fullDateOptions = {
                useLongDateFormat: true,
                useTodayYesterdayAndTomorrow: false,
                useWeekdayIfThisWeek: false,
                omitYearIfCurrentOne: false
            };
            var dateString = DateUtils_1.DateUtils.dateToString(new Date(parseInt(fakeResult.raw.date)), fullDateOptions);
            var dateTimeString = DateUtils_1.DateUtils.dateTimeToString(new Date(parseInt(fakeResult.raw.date)), fullDateOptions);
            initializeFieldValueComponent(options, fakeResult);
            expect(Dom_1.$$(test.cmp.element).find('span').getAttribute('title')).toEqual(dateString);
            options.helper = 'dateTime';
            initializeFieldValueComponent(options, fakeResult);
            expect(Dom_1.$$(test.cmp.element).find('span').getAttribute('title')).toEqual(dateTimeString);
            options.helper = 'emailDateTime';
            initializeFieldValueComponent(options, fakeResult);
            expect(Dom_1.$$(test.cmp.element).find('span').getAttribute('title')).toEqual(dateTimeString);
        });
        it("should not show a full date tooltip if it doesn't have the helper is not a date", function () {
            initializeFieldValueComponent({ field: '@string' });
            expect(Dom_1.$$(test.cmp.element).find('span').hasAttribute('title')).toBe(false);
        });
        it('should display a value if it is a falsy value', function () {
            [0, -0, 'false', 'null', 'undefined', false].forEach(function (falsy) {
                var fakeResult = Fake_1.FakeResults.createFakeResult();
                fakeResult.raw['thefield'] = falsy;
                initializeFieldValueComponent({ field: 'thefield' }, fakeResult);
                expect(Dom_1.$$(test.cmp.element).text()).toEqual(falsy.toString());
            });
        });
    });
}
exports.FieldValueTest = FieldValueTest;
 
 
/***/ }),
/* 1625 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { Iif (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        Iif (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            Iif (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
            Iif (y = 0, t) op = [0, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    Eif (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        Iif (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
Object.defineProperty(exports, "__esModule", { value: true });
var QueryBuilder_1 = __webpack_require__(24);
var Folding_1 = __webpack_require__(377);
var SortCriteria_1 = __webpack_require__(195);
var Dom_1 = __webpack_require__(0);
var Fake_1 = __webpack_require__(11);
var Mock = __webpack_require__(2);
var Simulate_1 = __webpack_require__(15);
var _ = __webpack_require__(1);
var Core_1 = __webpack_require__(9);
function FoldingTest() {
    var _this = this;
    describe('Folding', function () {
        var test;
        var fakeResults;
        beforeEach(function () {
            test = Mock.optionsComponentSetup(Folding_1.Folding, {
                field: '@fieldname',
                child: '@foldingchild',
                parent: '@foldingparent',
                enableExpand: true,
                expandExpression: 'expandExpr',
                range: 2
            });
            fakeResults = Fake_1.FakeResults.createFakeResults(1);
            fakeResults.results[0].totalNumberOfChildResults = 3;
            fakeResults.results[0].childResults = [];
            fakeResults.results[0].raw.fieldname = 'fieldvalue';
        });
        afterEach(function () {
            test = null;
            fakeResults = null;
        });
        describe('exposes options', function () {
            describe('field', function () {
                it('should send the correct field to the outgoing query', function () {
                    test = Mock.optionsComponentSetup(Folding_1.Folding, {
                        field: '@myfield'
                    });
                    var data = Simulate_1.Simulate.query(test.env);
                    expect(data.queryBuilder.filterField).toBe('@myfield');
                });
                it('should set a default value for filter field', function () {
                    test = Mock.basicComponentSetup(Folding_1.Folding);
                    var data = Simulate_1.Simulate.query(test.env);
                    expect(data.queryBuilder.filterField).toBe('@foldingcollection');
                });
                // Connectors configures the folding fields with default value, which are the *opposite* of what the index expects.
                // These UT should ensure that the switch is intentional and desired.
                describe('swapping child and parent options', function () {
                    it('should set a default value for parent, which is used in the opposite query parameter', function () {
                        test = Mock.basicComponentSetup(Folding_1.Folding);
                        var data = Simulate_1.Simulate.query(test.env);
                        expect(data.queryBuilder.childField).toBe('@foldingparent');
                    });
                    it('should set a default value for child, which is used in the opposite query parameter', function () {
                        test = Mock.basicComponentSetup(Folding_1.Folding);
                        var data = Simulate_1.Simulate.query(test.env);
                        expect(data.queryBuilder.parentField).toBe('@foldingchild');
                    });
                    it('should swap the parentField option to child', function () {
                        test = Mock.optionsComponentSetup(Folding_1.Folding, {
                            parentField: '@usingDeprecatedOption'
                        });
                        var data = Simulate_1.Simulate.query(test.env);
                        expect(test.cmp.options.child).toBe('@usingDeprecatedOption');
                        expect(data.queryBuilder.parentField).toBe('@usingDeprecatedOption');
                    });
                    it('should swap the childField option to parent', function () {
                        test = Mock.optionsComponentSetup(Folding_1.Folding, {
                            childField: '@usingDeprecatedOption'
                        });
                        var data = Simulate_1.Simulate.query(test.env);
                        expect(test.cmp.options.parent).toBe('@usingDeprecatedOption');
                        expect(data.queryBuilder.childField).toBe('@usingDeprecatedOption');
                    });
                });
            });
            it('range should set the proper range to the outgoing query', function () {
                test = Mock.optionsComponentSetup(Folding_1.Folding, {
                    field: '@fieldname',
                    range: 42
                });
                var data = Simulate_1.Simulate.query(test.env);
                expect(data.queryBuilder.filterFieldRange).toBe(42);
            });
            it('expandExpression should include the custom expand expression to the expand query', function () {
                test = Mock.optionsComponentSetup(Folding_1.Folding, {
                    field: '@fieldname',
                    expandExpression: 'myExpandExpression'
                });
                var data = Simulate_1.Simulate.query(test.env, { results: fakeResults });
                data.results.results[0].moreResults();
                expect(test.env.queryController.getEndpoint().search).toHaveBeenCalledWith(jasmine.objectContaining({
                    cq: 'myExpandExpression'
                }));
            });
            it('maximumExpandedResults should set the number of results properly to the expand query', function () {
                test = Mock.optionsComponentSetup(Folding_1.Folding, {
                    field: '@fieldname',
                    maximumExpandedResults: 42
                });
                var data = Simulate_1.Simulate.query(test.env, { results: fakeResults });
                test.env.queryController.getEndpoint().search = function (query) {
                    expect(query.numberOfResults).toBe(42);
                    return new Promise(function (resolve, reject) { return null; });
                };
                data.results.results[0].moreResults();
            });
            it('enableExpand set to true should provide an expand function', function () {
                test = Mock.optionsComponentSetup(Folding_1.Folding, {
                    field: '@fieldname',
                    enableExpand: true
                });
                var data = Simulate_1.Simulate.query(test.env, { results: fakeResults });
                expect(data.results.results[0].moreResults).toEqual(jasmine.any(Function));
            });
            it('enableExpand set to false should not provide an expand function', function () {
                test = Mock.optionsComponentSetup(Folding_1.Folding, {
                    field: '@fieldname',
                    enableExpand: false
                });
                var data = Simulate_1.Simulate.query(test.env, { results: fakeResults });
                expect(data.results.results[0].moreResults).toBeUndefined();
            });
        });
        describe('should re-arrange child results client side when preprocessing results', function () {
            beforeEach(function () {
                fakeResults = Fake_1.FakeResults.createFakeResultsWithChildResults(10, 5, 10);
                fakeResults.results.forEach(function (fakeResult) {
                    var i = 0;
                    fakeResult.childResults.forEach(function (childResult) {
                        childResult.raw.numericalField = i;
                        i++;
                    });
                });
            });
            var verifyChildOrder = function (firstExpectedValue, lastExpectedValue) {
                expect(fakeResults.results[0].childResults[0].raw.numericalField).toBe(firstExpectedValue);
                expect(fakeResults.results[0].childResults[4].raw.numericalField).toBe(lastExpectedValue);
                expect(fakeResults.results[9].childResults[0].raw.numericalField).toBe(firstExpectedValue);
                expect(fakeResults.results[9].childResults[4].raw.numericalField).toBe(lastExpectedValue);
            };
            it('by field ascending', function () {
                test = Mock.optionsComponentSetup(Folding_1.Folding, {
                    rearrange: SortCriteria_1.SortCriteria.parse('@numericalField ascending')
                });
                Dom_1.$$(test.env.root).trigger('preprocessResults', {
                    results: fakeResults
                });
                verifyChildOrder(0, 4);
            });
            it('by field descending', function () {
                test = Mock.optionsComponentSetup(Folding_1.Folding, {
                    rearrange: SortCriteria_1.SortCriteria.parse('@numericalField descending')
                });
                Dom_1.$$(test.env.root).trigger('preprocessResults', {
                    results: fakeResults
                });
                verifyChildOrder(4, 0);
            });
            it('by non-existing field', function () {
                test = Mock.optionsComponentSetup(Folding_1.Folding, {
                    rearrange: SortCriteria_1.SortCriteria.parse('@doesNotExist descending')
                });
                Dom_1.$$(test.env.root).trigger('preprocessResults', {
                    results: fakeResults
                });
                verifyChildOrder(0, 4);
            });
        });
        describe('expand', function () {
            var queryData;
            beforeEach(function () {
                test = Mock.optionsComponentSetup(Folding_1.Folding, {
                    field: '@fieldname',
                    maximumExpandedResults: 7
                });
                queryData = Simulate_1.Simulate.query(test.env, { query: { q: 'foo bar' }, results: fakeResults });
            });
            afterEach(function () {
                test = null;
                queryData = null;
            });
            it('should trap the error if a query error happens when getting more results', function () {
                test.env.searchEndpoint.search.and.returnValue(Promise.reject("That's a bad query"));
                expect(function () { return queryData.results.results[0].moreResults(); }).not.toThrowError();
            });
            it('should return an empty array if a query error happens when getting more results', function (done) { return __awaiter(_this, void 0, void 0, function () {
                var results;
                return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0:
                            test.env.searchEndpoint.search.and.returnValue(Promise.reject("That's a bad query"));
                            return [4 /*yield*/, queryData.results.results[0].moreResults()];
                        case 1:
                            results = _a.sent();
                            expect(Core_1.Utils.isEmptyArray(results)).toBe(true);
                            done();
                            return [2 /*return*/];
                    }
                });
            }); });
            describe('should clone the original query', function () {
                var query;
                beforeEach(function () {
                    query = new QueryBuilder_1.QueryBuilder();
                    query.fieldsToInclude = ['should', 'be', 'included'];
                    query.expression.add('should be there');
                    query.advancedExpression.add('should not be there');
                    query.firstResult = 9999;
                    query.facetRequests = [{ facetId: 'facet', field: '@facet' }];
                    query.categoryFacets = [{ field: '@category' }];
                    query.facetOptions = { freezeFacetOrder: true };
                    fakeResults._folded = null;
                    queryData = Simulate_1.Simulate.query(test.env, {
                        query: query.build(),
                        results: fakeResults
                    });
                    queryData.results.results[0].moreResults();
                });
                it('and modify q', function () {
                    expect(test.env.queryController.getEndpoint().search).toHaveBeenCalledWith(jasmine.objectContaining({
                        aq: '@fieldname=fieldvalue',
                        fieldsToInclude: jasmine.arrayContaining(['should', 'be', 'included']),
                        filterField: null,
                        filterFieldRange: null,
                        q: '( <@- should be there -@> ) OR @uri'
                    }));
                });
                it('and modify firstResult', function () {
                    expect(test.env.queryController.getEndpoint().search).toHaveBeenCalledWith(jasmine.objectContaining({
                        firstResult: 0
                    }));
                });
                it('and modify aq', function () {
                    expect(test.env.queryController.getEndpoint().search).toHaveBeenCalledWith(jasmine.objectContaining({
                        aq: '@fieldname=fieldvalue'
                    }));
                });
                it('and clear facets', function () {
                    expect(test.env.queryController.getEndpoint().search).toHaveBeenCalledWith(jasmine.objectContaining({
                        facets: []
                    }));
                });
                it('and clear categoryFacets', function () {
                    expect(test.env.queryController.getEndpoint().search).toHaveBeenCalledWith(jasmine.objectContaining({
                        categoryFacets: []
                    }));
                });
                it('and clear facetOptions', function () {
                    expect(test.env.queryController.getEndpoint().search).toHaveBeenCalledWith(jasmine.objectContaining({
                        facetOptions: {}
                    }));
                });
                it('and modify fieldsToInclude', function () {
                    expect(test.env.queryController.getEndpoint().search).toHaveBeenCalledWith(jasmine.objectContaining({
                        fieldsToInclude: jasmine.arrayContaining(['should', 'be', 'included'])
                    }));
                });
                it('and modify filterFieldRange', function () {
                    expect(test.env.queryController.getEndpoint().search).toHaveBeenCalledWith(jasmine.objectContaining({
                        filterFieldRange: null
                    }));
                });
                it('and modify query syntax', function () {
                    expect(test.env.queryController.getEndpoint().search).toHaveBeenCalledWith(jasmine.objectContaining({
                        enableQuerySyntax: true
                    }));
                });
            });
            it('should perform query with expected expression when moreResults is called', function () {
                queryData.results.results[0].moreResults();
                expect(test.env.queryController.getEndpoint().search).toHaveBeenCalledWith(jasmine.objectContaining({
                    aq: '@fieldname=fieldvalue'
                }));
            });
            it('should include query keywords for highlighting', function () {
                queryData.results.results[0].moreResults();
                expect(test.env.queryController.getEndpoint().search).toHaveBeenCalledWith(jasmine.objectContaining({
                    q: '( <@- foo bar -@> ) OR @uri'
                }));
            });
            it('should use the specified maximum number of results', function () {
                queryData.results.results[0].moreResults();
                expect(test.env.queryController.getEndpoint().search).toHaveBeenCalledWith(jasmine.objectContaining({
                    numberOfResults: 7
                }));
            });
        });
        it('should rearrange a result that is an attachment if it has a parentResult', function () {
            test = Mock.optionsComponentSetup(Folding_1.Folding, {
                field: '@fieldname',
                childField: '@childfield',
                parentField: '@parentfield'
            });
            var parent = Fake_1.FakeResults.createFakeResult('ParentResult');
            parent.flags = 'ContainsAttachment';
            parent.raw.parentfield = 'abc';
            fakeResults.results[0].flags = 'IsAttachment';
            fakeResults.results[0].parentResult = parent;
            fakeResults.results[0].raw.childfield = 'abc';
            var data = Simulate_1.Simulate.query(test.env, { results: fakeResults });
            expect(data.results.results[0].title).toBe('TitleParentResult');
        });
        it('should set the proper childResults and attachments in multiple folded results', function () {
            var results = [];
            _.times(7, function (n) { return results.push(Fake_1.FakeResults.createFakeResult(n.toString())); });
            // 0 - 1
            //   - 2 - 3
            // 4 - 5
            // 6
            results[1].parentResult = results[0];
            results[2].parentResult = results[0];
            results[3].parentResult = results[2];
            results[5].parentResult = results[4];
            var topResult = results.shift();
            topResult.childResults = results;
            topResult = Folding_1.Folding.defaultGetResult(topResult);
            expect(topResult).toEqual(jasmine.objectContaining({
                uniqueId: 'uniqueId0',
                attachments: [
                    jasmine.objectContaining({
                        uniqueId: 'uniqueId1',
                        attachments: []
                    }),
                    jasmine.objectContaining({
                        uniqueId: 'uniqueId2',
                        attachments: [
                            jasmine.objectContaining({
                                uniqueId: 'uniqueId3',
                                attachments: []
                            })
                        ]
                    })
                ],
                childResults: [
                    jasmine.objectContaining({
                        uniqueId: 'uniqueId4',
                        attachments: [
                            jasmine.objectContaining({
                                uniqueId: 'uniqueId5'
                            })
                        ]
                    }),
                    jasmine.objectContaining({
                        uniqueId: 'uniqueId6',
                        attachments: []
                    })
                ]
            }));
        });
        it('should sort by the original position', function () {
            var results = [];
            _.times(7, function (n) { return results.push(Fake_1.FakeResults.createFakeResult(n.toString())); });
            // Priority is : 6, 3, 5, 4, 1, 2, 0
            // Give :
            // 6
            // 0 - 2 - 3
            //   - 1
            // 4 - 5
            results[1].parentResult = results[0];
            results[2].parentResult = results[0];
            results[3].parentResult = results[2];
            results[5].parentResult = results[4];
            var topResult = results[6];
            topResult.childResults = [results[3], results[5], results[4], results[1], results[2], results[0]];
            topResult = Folding_1.Folding.defaultGetResult(topResult);
            expect(topResult).toEqual(jasmine.objectContaining({
                uniqueId: 'uniqueId6',
                attachments: [],
                childResults: [
                    jasmine.objectContaining({
                        uniqueId: 'uniqueId0',
                        attachments: [
                            jasmine.objectContaining({
                                uniqueId: 'uniqueId2',
                                attachments: [
                                    jasmine.objectContaining({
                                        uniqueId: 'uniqueId3'
                                    })
                                ]
                            }),
                            jasmine.objectContaining({
                                uniqueId: 'uniqueId1',
                                attachments: []
                            })
                        ]
                    }),
                    jasmine.objectContaining({
                        uniqueId: 'uniqueId4',
                        attachments: [
                            jasmine.objectContaining({
                                uniqueId: 'uniqueId5',
                                attachments: []
                            })
                        ]
                    })
                ]
            }));
        });
        it('should remove duplicate from the result set if one is loaded through the parentResult field', function () {
            var results = [];
            _.times(7, function (n) { return results.push(Fake_1.FakeResults.createFakeResult(n.toString())); });
            // 0 - 1
            //   - 2 - 3
            // 4 - 5
            // 6
            results[1].parentResult = results[0];
            results[2].parentResult = results[0];
            results[3].parentResult = results[2];
            results[5].parentResult = results[4];
            results.push(results[0], results[2], results[3], results[5], results[6]);
            var topResult = results.shift();
            topResult.childResults = results;
            topResult = Folding_1.Folding.defaultGetResult(topResult);
            expect(topResult).toEqual(jasmine.objectContaining({
                uniqueId: 'uniqueId0',
                attachments: [
                    jasmine.objectContaining({
                        uniqueId: 'uniqueId1',
                        attachments: []
                    }),
                    jasmine.objectContaining({
                        uniqueId: 'uniqueId2',
                        attachments: [
                            jasmine.objectContaining({
                                uniqueId: 'uniqueId3'
                            })
                        ]
                    })
                ],
                childResults: [
                    jasmine.objectContaining({
                        uniqueId: 'uniqueId4',
                        attachments: [
                            jasmine.objectContaining({
                                uniqueId: 'uniqueId5'
                            })
                        ]
                    }),
                    jasmine.objectContaining({
                        uniqueId: 'uniqueId6',
                        attachments: []
                    })
                ]
            }));
        });
    });
}
exports.FoldingTest = FoldingTest;
 
 
/***/ }),
/* 1626 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var FollowItem_1 = __webpack_require__(790);
var Mock = __webpack_require__(2);
var Fake_1 = __webpack_require__(11);
var Dom_1 = __webpack_require__(0);
var AnalyticsActionListMeta_1 = __webpack_require__(7);
var QueryUtils_1 = __webpack_require__(37);
var Simulate_1 = __webpack_require__(15);
var KeyboardUtils_1 = __webpack_require__(35);
var SearchAlertEvents_1 = __webpack_require__(86);
function FollowItemTest() {
    describe('FollowItem', function () {
        var test;
        var endpointMock;
        var result;
        beforeEach(function () {
            result = Fake_1.FakeResults.createFakeResult();
            endpointMock = Mock.mockSearchEndpoint();
            endpointMock.listSubscriptions.and.returnValue(Promise.resolve([]));
            test = Mock.advancedResultComponentSetup(FollowItem_1.FollowItem, result, new Mock.AdvancedComponentSetupOptions(null, null, function (env) {
                return env.withEndpoint(endpointMock);
            }));
        });
        afterEach(function () {
            test = null;
            endpointMock = null;
            result = null;
        });
        it('should set the item as followed if it is followed', function (done) {
            endpointMock.listSubscriptions.and.returnValue(Promise.resolve([{ typeConfig: { id: result.raw.urihash } }]));
            test = Mock.advancedResultComponentSetup(FollowItem_1.FollowItem, result, new Mock.AdvancedComponentSetupOptions(null, null, function (env) {
                return env.withEndpoint(endpointMock);
            }));
            Promise.resolve().then(function () {
                expect(Dom_1.$$(test.cmp.element).hasClass('coveo-follow-item-followed')).toBe(true);
                done();
            });
        });
        it('should set the item as not followed if it is not followed', function (done) {
            Promise.resolve().then(function () {
                expect(Dom_1.$$(test.cmp.element).hasClass('coveo-follow-item-followed')).toBe(false);
                done();
            });
        });
        it('should remove the component if the search alerts service is unavailable', function (done) {
            endpointMock.listSubscriptions.and.returnValue(Promise.resolve('Error'));
            var root = Dom_1.$$('div').el;
            spyOn(root, 'removeChild');
            test = Mock.advancedResultComponentSetup(FollowItem_1.FollowItem, result, new Mock.AdvancedComponentSetupOptions(null, null, function (env) {
                return env.withEndpoint(endpointMock).withRoot(root);
            }));
            Promise.resolve({}).then(function () {
                expect(root.removeChild).toHaveBeenCalled();
                done();
            });
        });
        describe('toggleFollow', function () {
            it('should delete the subscription if the document is followed', function (done) {
                endpointMock.listSubscriptions.and.returnValue(Promise.resolve([{ id: '123', typeConfig: { id: result.raw.urihash } }]));
                endpointMock.deleteSubscription.and.returnValue(Promise.resolve());
                test = Mock.advancedResultComponentSetup(FollowItem_1.FollowItem, result, new Mock.AdvancedComponentSetupOptions(null, null, function (env) {
                    return env.withEndpoint(endpointMock);
                }));
                Promise.resolve().then(function () {
                    test.cmp.toggleFollow();
                    expect(endpointMock.deleteSubscription).toHaveBeenCalled();
                    done();
                });
            });
            it('should create a subscription if the document is not followed', function (done) {
                endpointMock.follow.and.returnValue(Promise.resolve());
                test = Mock.advancedResultComponentSetup(FollowItem_1.FollowItem, result, new Mock.AdvancedComponentSetupOptions(null, null, function (env) {
                    return env.withEndpoint(endpointMock);
                }));
                Promise.resolve().then(function () {
                    test.cmp.toggleFollow();
                    expect(endpointMock.follow).toHaveBeenCalled();
                    done();
                });
            });
            it('should follow the document on click', function (done) {
                endpointMock.follow.and.returnValue(Promise.resolve());
                test = Mock.advancedResultComponentSetup(FollowItem_1.FollowItem, result, new Mock.AdvancedComponentSetupOptions(null, null, function (env) {
                    return env.withEndpoint(endpointMock);
                }));
                Promise.resolve().then(function () {
                    Dom_1.$$(test.cmp.element).trigger('click');
                    expect(endpointMock.follow).toHaveBeenCalled();
                    done();
                });
            });
            it('should follow the document when pressing enter', function (done) {
                Iif (Simulate_1.Simulate.isPhantomJs()) {
                    // Keypress simulation doesn't work well in phantom js
                    expect(true).toBe(true);
                    done();
                }
                else {
                    endpointMock.follow.and.returnValue(Promise.resolve());
                    test = Mock.advancedResultComponentSetup(FollowItem_1.FollowItem, result, new Mock.AdvancedComponentSetupOptions(null, null, function (env) {
                        return env.withEndpoint(endpointMock);
                    }));
                    Promise.resolve().then(function () {
                        Simulate_1.Simulate.keyUp(test.cmp.element, KeyboardUtils_1.KEYBOARD.ENTER);
                        expect(endpointMock.follow).toHaveBeenCalled();
                        done();
                    });
                }
            });
            it('should log an analytics event if the document is followed', function (done) {
                var fake = Fake_1.FakeResults.createFakeResult();
                endpointMock.follow.and.returnValue(Promise.resolve());
                test = Mock.advancedResultComponentSetup(FollowItem_1.FollowItem, result, new Mock.AdvancedComponentSetupOptions(null, null, function (env) {
                    return env.withEndpoint(endpointMock);
                }));
                Promise.resolve().then(function () {
                    test.cmp.toggleFollow();
                    expect(test.cmp.usageAnalytics.logCustomEvent).toHaveBeenCalledWith(AnalyticsActionListMeta_1.analyticsActionCauseList.searchAlertsFollowDocument, jasmine.objectContaining({
                        author: QueryUtils_1.QueryUtils.getAuthor(fake),
                        documentLanguage: QueryUtils_1.QueryUtils.getLanguage(fake),
                        documentSource: QueryUtils_1.QueryUtils.getSource(fake),
                        documentTitle: fake.title,
                        contentIDKey: QueryUtils_1.QueryUtils.getPermanentId(fake).fieldUsed,
                        contentIDValue: jasmine.any(String)
                    }), test.cmp.element);
                    done();
                });
            });
            it('should log an analytics event if the document is unfollowed', function (done) {
                var fake = Fake_1.FakeResults.createFakeResult();
                endpointMock.listSubscriptions.and.returnValue(Promise.resolve([{ id: '123', typeConfig: { id: result.raw.urihash } }]));
                endpointMock.deleteSubscription.and.returnValue(Promise.resolve());
                test = Mock.advancedResultComponentSetup(FollowItem_1.FollowItem, result, new Mock.AdvancedComponentSetupOptions(null, null, function (env) {
                    return env.withEndpoint(endpointMock);
                }));
                Promise.resolve().then(function () {
                    test.cmp.toggleFollow();
                    expect(test.cmp.usageAnalytics.logCustomEvent).toHaveBeenCalledWith(AnalyticsActionListMeta_1.analyticsActionCauseList.searchAlertsUnfollowDocument, jasmine.objectContaining({
                        author: QueryUtils_1.QueryUtils.getAuthor(fake),
                        documentLanguage: QueryUtils_1.QueryUtils.getLanguage(fake),
                        documentSource: QueryUtils_1.QueryUtils.getSource(fake),
                        documentTitle: fake.title
                    }), test.cmp.element);
                    done();
                });
            });
            it('should not throw if delete subscription fails from the endpoint', function (done) {
                endpointMock.listSubscriptions.and.returnValue(Promise.resolve([
                    {
                        id: '123',
                        typeConfig: { id: result.raw.urihash }
                    }
                ]));
                endpointMock.deleteSubscription.and.returnValue(Promise.reject('oh no it fails'));
                test = Mock.advancedResultComponentSetup(FollowItem_1.FollowItem, result, new Mock.AdvancedComponentSetupOptions(null, null, function (env) {
                    return env.withEndpoint(endpointMock);
                }));
                Promise.resolve().then(function () {
                    expect(function () {
                        test.cmp.toggleFollow();
                    }).not.toThrow();
                    done();
                });
            });
            it('should not throw if follow subscription fails from the endpoint', function (done) {
                endpointMock.follow.and.returnValue(Promise.reject('oh no it fails'));
                test = Mock.advancedResultComponentSetup(FollowItem_1.FollowItem, result, new Mock.AdvancedComponentSetupOptions(null, null, function (env) {
                    return env.withEndpoint(endpointMock);
                }));
                Promise.resolve().then(function () {
                    expect(function () {
                        test.cmp.toggleFollow();
                    }).not.toThrow();
                    done();
                });
            });
        });
        it('should handle subscription delete and follow from an event', function () {
            var subscription = {
                subscription: {
                    id: 'an id',
                    user: 'an user',
                    type: 'followDocument',
                    typeConfig: { id: result.raw['urihash'] }
                }
            };
            Dom_1.$$(test.env.root).trigger(SearchAlertEvents_1.SearchAlertsEvents.searchAlertsCreated, subscription);
            expect(Dom_1.$$(test.cmp.element).hasClass('coveo-follow-item-followed')).toBe(true);
            Dom_1.$$(test.env.root).trigger(SearchAlertEvents_1.SearchAlertsEvents.searchAlertsDeleted, subscription);
            expect(Dom_1.$$(test.cmp.element).hasClass('coveo-follow-item-followed')).not.toBe(true);
        });
    });
}
exports.FollowItemTest = FollowItemTest;
 
 
/***/ }),
/* 1627 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var HiddenQuery_1 = __webpack_require__(791);
var Mock = __webpack_require__(2);
var Dom_1 = __webpack_require__(0);
var BreadcrumbEvents_1 = __webpack_require__(33);
var Simulate_1 = __webpack_require__(15);
var _ = __webpack_require__(1);
function HiddenQueryTest() {
    describe('HiddenQuery', function () {
        var test;
        beforeEach(function () {
            test = Mock.advancedComponentSetup(HiddenQuery_1.HiddenQuery, new Mock.AdvancedComponentSetupOptions(undefined, undefined, function (env) {
                return env.withLiveQueryStateModel();
            }));
        });
        afterEach(function () {
            test = null;
        });
        it('should populate breadcrumb if hd and hq is set', function () {
            var breadcrumbMatcher = jasmine.arrayContaining([jasmine.objectContaining({ element: jasmine.any(HTMLElement) })]);
            var matcher = jasmine.objectContaining({ breadcrumbs: breadcrumbMatcher });
            var spy = jasmine.createSpy('onPopulate');
            Dom_1.$$(test.env.root).on(BreadcrumbEvents_1.BreadcrumbEvents.populateBreadcrumb, spy);
            // hd hq not set : no breadcrumbs
            Dom_1.$$(test.env.root).trigger(BreadcrumbEvents_1.BreadcrumbEvents.populateBreadcrumb, { breadcrumbs: [] });
            expect(spy).not.toHaveBeenCalledWith(jasmine.anything(), matcher);
            // only hd set : no breadcrumbs
            test.env.queryStateModel.set('hd', 'test');
            test.env.queryStateModel.set('hq', '');
            Dom_1.$$(test.env.root).trigger(BreadcrumbEvents_1.BreadcrumbEvents.populateBreadcrumb, { breadcrumbs: [] });
            expect(spy).not.toHaveBeenCalledWith(jasmine.anything(), matcher);
            // only hq set : breadcrumbs populated
            test.env.queryStateModel.set('hd', '');
            test.env.queryStateModel.set('hq', 'test');
            Dom_1.$$(test.env.root).trigger(BreadcrumbEvents_1.BreadcrumbEvents.populateBreadcrumb, { breadcrumbs: [] });
            expect(spy).toHaveBeenCalledWith(jasmine.anything(), matcher);
            // hq and hd are set : breadcrumb populated
            test.env.queryStateModel.set('hd', 'test');
            test.env.queryStateModel.set('hq', 'test');
            Dom_1.$$(test.env.root).trigger(BreadcrumbEvents_1.BreadcrumbEvents.populateBreadcrumb, { breadcrumbs: [] });
            expect(spy).toHaveBeenCalledWith(jasmine.anything(), matcher);
        });
        it('should populate breadcrumb with escaped content from hd', function () {
            var unEscaped = "<script>1+1</script>";
            test.env.queryStateModel.set('hd', unEscaped);
            test.env.queryStateModel.set('hq', unEscaped);
            var breadcrumb = Simulate_1.Simulate.breadcrumb(test.env);
            expect(Dom_1.$$(breadcrumb[0].element).find('.coveo-hidden-query-breadcrumb-value').innerHTML).toContain(_.escape(unEscaped));
        });
        it('should push hq in the query if it is set', function () {
            test.env.queryStateModel.set('hq', 'test');
            var simulation = Simulate_1.Simulate.query(test.env);
            expect(simulation.queryBuilder.build().aq).toBe('test');
        });
        it('should not push hq in the query if not set', function () {
            test.env.queryStateModel.set('hq', '');
            var simulation = Simulate_1.Simulate.query(test.env);
            expect(simulation.queryBuilder.build().aq).toBe(undefined);
        });
        it('clear should clear the query state', function () {
            test.env.queryStateModel.set('hq', 'test');
            test.env.queryStateModel.set('hd', 'test');
            test.cmp.clear();
            expect(test.env.queryStateModel.get('hq')).toBe('');
            expect(test.env.queryStateModel.get('hd')).toBe('');
        });
        describe('exposes options', function () {
            it('maximumDescriptionLength should splice the description in the breadcrumb', function () {
                test = Mock.advancedComponentSetup(HiddenQuery_1.HiddenQuery, new Mock.AdvancedComponentSetupOptions(undefined, {
                    maximumDescriptionLength: 56
                }, function (env) {
                    return env.withLiveQueryStateModel();
                }));
                test.env.queryStateModel.set('hq', 'test');
                test.env.queryStateModel.set('hd', _.range(200).toString());
                Dom_1.$$(test.env.root).on(BreadcrumbEvents_1.BreadcrumbEvents.populateBreadcrumb, function (e, args) {
                    // Not an exact comparison, because there's comma, and (...) at the end.
                    // We don't need exact number, just that it's way less than 200 that was generated
                    expect(Dom_1.$$(args.breadcrumbs[0].element).text().length).toBeLessThan(100);
                });
                Dom_1.$$(test.env.root).trigger(BreadcrumbEvents_1.BreadcrumbEvents.populateBreadcrumb, { breadcrumbs: [] });
            });
            it('title allows to specify a breadcrumb title', function () {
                test = Mock.advancedComponentSetup(HiddenQuery_1.HiddenQuery, new Mock.AdvancedComponentSetupOptions(undefined, {
                    title: 'foobar'
                }, function (env) {
                    return env.withLiveQueryStateModel();
                }));
                test.env.queryStateModel.set('hq', 'test');
                test.env.queryStateModel.set('hd', 'test');
                Dom_1.$$(test.env.root).on(BreadcrumbEvents_1.BreadcrumbEvents.populateBreadcrumb, function (e, args) {
                    expect(Dom_1.$$(args.breadcrumbs[0].element.firstChild).text()).toBe('foobar');
                });
                Dom_1.$$(test.env.root).trigger(BreadcrumbEvents_1.BreadcrumbEvents.populateBreadcrumb, { breadcrumbs: [] });
            });
        });
    });
}
exports.HiddenQueryTest = HiddenQueryTest;
 
 
/***/ }),
/* 1628 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Mock = __webpack_require__(2);
var HierarchicalFacet_1 = __webpack_require__(792);
var Fake_1 = __webpack_require__(11);
var Dom_1 = __webpack_require__(0);
var Simulate_1 = __webpack_require__(15);
var _ = __webpack_require__(1);
function HierarchicalFacetTest() {
    describe('HierarchicalFacet', function () {
        var test;
        var results;
        beforeEach(function () {
            test = Mock.optionsComponentSetup(HierarchicalFacet_1.HierarchicalFacet, {
                field: '@foobar'
            });
            results = Fake_1.FakeResults.createFakeHierarchicalGroupByResult('@foobar', 'foo', 4, 3, '|', false, true);
        });
        afterEach(function () {
            test = null;
            results = null;
        });
        function getFacetValueElement(facetValue) {
            return _.first(getAllFacetValueElement(facetValue));
        }
        function getAllFacetValueElement(facetValue) {
            return _.chain(Dom_1.$$(test.cmp.element).findAll('.coveo-facet-value'))
                .filter(function (value) {
                return (Dom_1.$$(Dom_1.$$(value).find('.coveo-facet-value-caption'))
                    .text()
                    .toLowerCase() == facetValue.toLowerCase());
            })
                .value();
        }
        function doQuery() {
            Simulate_1.Simulate.query(test.env, {
                groupByResults: [results]
            });
        }
        it('should flag the parent value when a child value is selected or deselected', function () {
            doQuery();
            expect(test.cmp.values.get(Fake_1.FakeResults.createFakeHierarchicalValue('foo0', 0)).selected).toBe(false);
            expect(test.cmp.values.get(Fake_1.FakeResults.createFakeHierarchicalValue('foo0', 1)).selected).toBe(false);
            test.cmp.selectValue('level:0--value:foo0|level:1--value:foo0');
            doQuery();
            expect(test.cmp.values.get(Fake_1.FakeResults.createFakeHierarchicalValue('foo0', 1)).selected).toBe(true);
            expect(Dom_1.$$(getFacetValueElement('level:0--value:foo0')).hasClass('coveo-has-childs-selected')).toBe(true);
            test.cmp.deselectValue('level:0--value:foo0|level:1--value:foo0');
            doQuery();
            expect(test.cmp.values.get(Fake_1.FakeResults.createFakeHierarchicalValue('foo0', 1)).selected).toBe(false);
            expect(Dom_1.$$(getFacetValueElement('level:0--value:foo0')).hasClass('coveo-has-childs-selected')).toBe(false);
        });
        it('should hide child value by default', function () {
            doQuery();
            expect(Dom_1.$$(getFacetValueElement('level:1--value:foo0')).hasClass('coveo-inactive')).toBe(true);
        });
        it('should show and hide the children if you open/close the parent', function () {
            doQuery();
            test.cmp.open('level:0--value:foo0');
            expect(Dom_1.$$(getFacetValueElement('level:1--value:foo0')).hasClass('coveo-inactive')).toBe(false);
            test.cmp.close('level:0--value:foo0');
            expect(Dom_1.$$(getFacetValueElement('level:1--value:foo0')).hasClass('coveo-inactive')).toBe(true);
        });
        it('should keep a value opened after a query', function () {
            doQuery();
            test.cmp.open('level:0--value:foo0');
            expect(Dom_1.$$(getFacetValueElement('level:1--value:foo0')).hasClass('coveo-inactive')).toBe(false);
            doQuery();
            expect(Dom_1.$$(getFacetValueElement('level:1--value:foo0')).hasClass('coveo-inactive')).toBe(false);
        });
        it('should reset correctly (selection)', function () {
            doQuery();
            test.cmp.selectValue('level:0--value:foo0');
            var simulation = Simulate_1.Simulate.query(test.env, {
                groupByResults: [results]
            });
            expect(simulation.queryBuilder.build().aq).toEqual(jasmine.stringMatching('@foobar'));
            test.cmp.reset();
            simulation = Simulate_1.Simulate.query(test.env, {
                groupByResults: [results]
            });
            expect(simulation.queryBuilder.build().aq).not.toEqual(jasmine.stringMatching('@foobar'));
        });
        it('should set the correct css class for a value with childs', function () {
            doQuery();
            expect(Dom_1.$$(getFacetValueElement('level:0--value:foo0')).hasClass('coveo-has-childs')).toBe(true);
        });
        it('should set the correct css class for a value with childs selected', function () {
            doQuery();
            test.cmp.selectValue('level:0--value:foo0|level:1--value:foo0');
            doQuery();
            expect(Dom_1.$$(getFacetValueElement('level:0--value:foo0')).hasClass('coveo-has-childs-selected')).toBe(true);
            test.cmp.deselectValue('level:0--value:foo0|level:1--value:foo0');
            doQuery();
            expect(Dom_1.$$(getFacetValueElement('level:0--value:foo0')).hasClass('coveo-has-childs-selected')).toBe(false);
        });
        it('should set the correct css class for a value with multiple child selected', function () {
            doQuery();
            test.cmp.selectValue('level:0--value:foo0|level:1--value:foo0');
            test.cmp.selectValue('level:0--value:foo0|level:1--value:foo1');
            doQuery();
            expect(Dom_1.$$(getFacetValueElement('level:0--value:foo0')).hasClass('coveo-has-childs-selected')).toBe(true);
            test.cmp.deselectValue('level:0--value:foo0|level:1--value:foo0');
            doQuery();
            expect(Dom_1.$$(getFacetValueElement('level:0--value:foo0')).hasClass('coveo-has-childs-selected')).toBe(true);
            test.cmp.deselectValue('level:0--value:foo0|level:1--value:foo1');
            doQuery();
            expect(Dom_1.$$(getFacetValueElement('level:0--value:foo0')).hasClass('coveo-has-childs-selected')).toBe(false);
        });
        it('should set the correct css class for a value with no child', function () {
            doQuery();
            expect(Dom_1.$$(getFacetValueElement('level:3--value:foo0')).hasClass('coveo-no-childs')).toBe(true);
        });
        it('should request 10000 values but displays only as much as requested', function () {
            expect(test.cmp.numberOfValues).toBe(10000);
            expect(test.cmp.numberOfValuesToShow).toBe(5);
            Fake_1.FakeResults.createFakeHierarchicalGroupByResult('@foo', 'foo', 50);
            var simulation = Simulate_1.Simulate.query(test.env, {
                groupByResults: [results]
            });
            expect(simulation.queryBuilder.build().groupBy).toEqual(jasmine.arrayContaining([
                jasmine.objectContaining({
                    maximumNumberOfValues: 10000 + 1 // +1 for more functionnality
                })
            ]));
        });
        it('should treat orphan values accordingly', function () {
            doQuery();
            // open the paren, the child should not be inactive
            test.cmp.open('level:0--value:foo0');
            expect(Dom_1.$$(getFacetValueElement('level:1--value:foo0')).hasClass('coveo-inactive')).toBe(false);
            results = Fake_1.FakeResults.createFakeHierarchicalGroupByResult('@foobar', 'foo', 2, 3, '|', false, true);
            // values[0] is foo0 : a parent
            results.values[0] = undefined;
            results.values = _.compact(results.values);
            doQuery();
            // foo0-0 is a child of the value we just deleted
            // it should be hidden
            test.cmp.open('level:0-value:foo0');
            expect(Dom_1.$$(getFacetValueElement('level:1--value:foo0')).hasClass('coveo-inactive')).toBe(true);
        });
        it('should treat orphan values accordingly when level start is not 0', function () {
            test.cmp.options.levelStart = 1;
            doQuery();
            // open the paren, the child should not be inactive
            test.cmp.open('level:0--value:foo0|level:1--value:foo0');
            expect(Dom_1.$$(getFacetValueElement('level:2--value:foo0')).hasClass('coveo-inactive')).toBe(false);
            results = Fake_1.FakeResults.createFakeHierarchicalGroupByResult('@foobar', 'foo', 3, 3, '|', false, true);
            // values[3] is level:1-value:foo1 : a parent
            results.values[3] = undefined;
            results.values = _.compact(results.values);
            doQuery();
            // level:2--value:foo1 is a child of the value we just deleted
            // it should be hidden
            test.cmp.open('level:0--value:foo0|level:1--value:foo0');
            expect(Dom_1.$$(getFacetValueElement('level:2--value:foo0')).hasClass('coveo-inactive')).toBe(true);
        });
        it('should populate breadcrumb', function () {
            doQuery();
            test.cmp.selectValue('foo0|foo0-0');
            var breadcrumb = Simulate_1.Simulate.breadcrumb(test.env);
            expect(breadcrumb[0].element.innerText).toContain('foo0');
        });
        it('should not exec script in breadcrumb', function () {
            doQuery();
            test.cmp.selectValue("<script>alert('foo')</script>");
            var breadcrumb = Simulate_1.Simulate.breadcrumb(test.env);
            expect(breadcrumb[0].element.innerHTML).toContain('&lt;script&gt;');
        });
        it('should be able to collapse', function () {
            doQuery();
            var facetValues = Dom_1.$$(test.cmp.element).findAll('.coveo-facet-value');
            expect(facetValues[0].style.display).toEqual('');
            expect(Dom_1.$$(facetValues[0]).hasClass('coveo-inactive')).toBe(false);
            expect(facetValues[1].style.display).toEqual('');
            expect(Dom_1.$$(facetValues[1]).hasClass('coveo-inactive')).toBe(true);
        });
        it('should show the correct number of results', function () {
            test.cmp.numberOfValuesToShow = 1;
            doQuery();
            var facetValues = Dom_1.$$(test.cmp.element).findAll('.coveo-facet-value');
            expect(Dom_1.$$(facetValues[0]).hasClass('coveo-inactive')).toBe(false);
            expect(Dom_1.$$(facetValues[1]).hasClass('coveo-inactive')).toBe(true);
            expect(Dom_1.$$(facetValues[4]).hasClass('coveo-has-childs')).toBe(true);
            expect(Dom_1.$$(facetValues[4]).hasClass('coveo-inactive')).toBe(true);
            expect(Dom_1.$$(facetValues[5]).hasClass('coveo-inactive')).toBe(true);
        });
    });
}
exports.HierarchicalFacetTest = HierarchicalFacetTest;
 
 
/***/ }),
/* 1629 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __assign = (this && this.__assign) || Object.assign || function(t) {
    for (var s, i = 1, n = arguments.length; i < n; i++) {
        s = arguments[i];
        for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
            t[p] = s[p];
    }
    return t;
};
Object.defineProperty(exports, "__esModule", { value: true });
var HierarchicalFacetSearchController_1 = __webpack_require__(854);
var DynamicHierarchicalFacetTestUtils_1 = __webpack_require__(128);
var FacetSearchRequest_1 = __webpack_require__(855);
var underscore_1 = __webpack_require__(1);
function HierarchicalFacetSearchControllerTest() {
    describe('HierarchicalFacetSearchController', function () {
        var facet;
        var facetSearchController;
        var facetSearchSpy;
        var facetValuesMultiplier = 2;
        beforeEach(function () {
            initializeComponents();
        });
        function initializeComponents(options) {
            if (options === void 0) { options = {}; }
            facet = DynamicHierarchicalFacetTestUtils_1.DynamicHierarchicalFacetTestUtils.createAdvancedFakeFacet(__assign({ field: 'field', delimitingCharacter: '-', basePath: ['test', 'hello'] }, options)).cmp;
            facet.values.createFromResponse(DynamicHierarchicalFacetTestUtils_1.DynamicHierarchicalFacetTestUtils.getCompleteFacetResponse(facet));
            facetSearchController = new HierarchicalFacetSearchController_1.HierarchicalFacetSearchController(facet);
            facetSearchSpy = facet.queryController.getEndpoint().facetSearch;
        }
        it('should trigger a facet search request with the right parameters', function () {
            var query = 'my query';
            facetSearchController.search(query);
            var expectedRequest = {
                field: facet.fieldName,
                filterFacetCount: true,
                type: FacetSearchRequest_1.FacetSearchType.hierarchical,
                numberOfValues: facet.options.numberOfValues * facetValuesMultiplier,
                ignorePaths: [underscore_1.flatten(facet.values.selectedPath, true)],
                basePath: facet.options.basePath,
                captions: {},
                searchContext: facet.queryController.getLastQuery(),
                delimitingCharacter: facet.options.delimitingCharacter,
                query: "*" + query + "*"
            };
            expect(facetSearchSpy).toHaveBeenCalledWith(expectedRequest);
        });
        it("when facet option #filterFacetCount is false,\n    the facet search request #filterFacetCount is also false", function () {
            initializeComponents({ filterFacetCount: false });
            facetSearchController.search('');
            expect(facetSearchSpy.calls.mostRecent().args[0].filterFacetCount).toBe(false);
        });
        it("when calling fetchMoreResults\n    should search with the same terms but bump the number of values", function () {
            var query = 'my query';
            var page = 2;
            facetSearchController.search(query);
            facetSearchController.fetchMoreResults();
            expect(facetSearchSpy.calls.mostRecent().args[0]).toEqual(jasmine.objectContaining({
                numberOfValues: facet.options.numberOfValues * facetValuesMultiplier * page,
                query: "*" + query + "*"
            }));
        });
        it("when calling search after fetchMoreResults\n    should reset the number of values and update the query", function () {
            var query = 'second query';
            var page = 1;
            facetSearchController.search('first query');
            facetSearchController.fetchMoreResults();
            facetSearchController.search(query);
            expect(facetSearchSpy.calls.mostRecent().args[0]).toEqual(jasmine.objectContaining({
                numberOfValues: facet.options.numberOfValues * facetValuesMultiplier * page,
                query: "*" + query + "*"
            }));
        });
    });
}
exports.HierarchicalFacetSearchControllerTest = HierarchicalFacetSearchControllerTest;
 
 
/***/ }),
/* 1630 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Mock = __webpack_require__(2);
var Icon_1 = __webpack_require__(262);
var Fake_1 = __webpack_require__(11);
var Dom_1 = __webpack_require__(0);
function IconTest() {
    describe('Icon', function () {
        var test;
        var result;
        beforeEach(function () {
            result = Fake_1.FakeResults.createFakeResult('foobar');
            result.raw.filetype = 'unknown';
            test = Mock.optionsResultComponentSetup(Icon_1.Icon, undefined, result);
        });
        afterEach(function () {
            test = null;
            result = null;
        });
        it('should render an icon for a few known filetype', function () {
            expect(Dom_1.$$(test.cmp.element).hasClass('coveo-icon')).toBe(true);
            expect(Dom_1.$$(test.cmp.element).hasClass('filetype')).toBe(true);
            expect(Dom_1.$$(test.cmp.element).hasClass('unknown')).toBe(true);
        });
        describe('with an objecttype', function () {
            it('objecttype should have priority over filetype', function () {
                result.raw.objecttype = 'user';
                test = Mock.optionsResultComponentSetup(Icon_1.Icon, undefined, result);
                expect(Dom_1.$$(test.cmp.element).hasClass('coveo-icon')).toBe(true);
                expect(Dom_1.$$(test.cmp.element).hasClass('filetype')).toBe(false);
                expect(Dom_1.$$(test.cmp.element).hasClass('objecttype')).toBe(true);
                expect(Dom_1.$$(test.cmp.element).hasClass('user')).toBe(true);
            });
            it('should fallback on filetype when objecttype is "Document"', function () {
                result.raw.objecttype = 'Document';
                test = Mock.optionsResultComponentSetup(Icon_1.Icon, undefined, result);
                expect(Dom_1.$$(test.cmp.element).hasClass('coveo-icon')).toBe(true);
                expect(Dom_1.$$(test.cmp.element).hasClass('objecttype')).toBe(false);
                expect(Dom_1.$$(test.cmp.element).hasClass('filetype')).toBe(true);
                expect(Dom_1.$$(test.cmp.element).hasClass('unknown')).toBe(true);
            });
            it('should fallback on filetype when objecttype is "File"', function () {
                result.raw.objecttype = 'File';
                test = Mock.optionsResultComponentSetup(Icon_1.Icon, undefined, result);
                expect(Dom_1.$$(test.cmp.element).hasClass('coveo-icon')).toBe(true);
                expect(Dom_1.$$(test.cmp.element).hasClass('objecttype')).toBe(false);
                expect(Dom_1.$$(test.cmp.element).hasClass('filetype')).toBe(true);
                expect(Dom_1.$$(test.cmp.element).hasClass('unknown')).toBe(true);
            });
            it('should fallback on filetype when objecttype is "contentversion" case insensitive', function () {
                result.raw.objecttype = 'contentversion';
                test = Mock.optionsResultComponentSetup(Icon_1.Icon, undefined, result);
                expect(Dom_1.$$(test.cmp.element).hasClass('coveo-icon')).toBe(true);
                expect(Dom_1.$$(test.cmp.element).hasClass('objecttype')).toBe(false);
                expect(Dom_1.$$(test.cmp.element).hasClass('filetype')).toBe(true);
                expect(Dom_1.$$(test.cmp.element).hasClass('unknown')).toBe(true);
            });
        });
        describe('with a quickview inside', function () {
            beforeEach(function () {
                test = Mock.advancedResultComponentSetup(Icon_1.Icon, result, new Mock.AdvancedComponentSetupOptions(Dom_1.$$('div', undefined, Dom_1.$$('div', { className: 'CoveoQuickview' }).el).el, undefined, undefined));
            });
            it('should render properly', function () {
                expect(Dom_1.$$(test.cmp.element).hasClass('coveo-icon')).toBe(true);
                expect(Dom_1.$$(test.cmp.element).hasClass('filetype')).toBe(true);
                expect(Dom_1.$$(test.cmp.element).hasClass('unknown')).toBe(true);
            });
        });
        describe('exposes options', function () {
            it('value allows to set the generated css', function () {
                test = Mock.optionsResultComponentSetup(Icon_1.Icon, {
                    value: 'trololo'
                }, result);
                expect(Dom_1.$$(test.cmp.element).hasClass('trololo')).toBe(true);
            });
            it('small should ouput the correct css class', function () {
                test = Mock.optionsResultComponentSetup(Icon_1.Icon, {
                    small: false
                }, result);
                expect(Dom_1.$$(test.cmp.element).hasClass('coveo-small')).toBe(false);
                test = Mock.optionsResultComponentSetup(Icon_1.Icon, {
                    small: true
                }, result);
                expect(Dom_1.$$(test.cmp.element).hasClass('coveo-small')).toBe(true);
            });
            it('withLabel should output the correct css class', function () {
                test = Mock.optionsResultComponentSetup(Icon_1.Icon, {
                    withLabel: true
                }, result);
                expect(Dom_1.$$(test.cmp.element).hasClass('coveo-icon-with-caption-overlay')).toBe(true);
                test = Mock.optionsResultComponentSetup(Icon_1.Icon, {
                    withLabel: false
                }, result);
                expect(Dom_1.$$(test.cmp.element).hasClass('coveo-icon-with-caption-overlay')).toBe(false);
            });
            it('labelValue should allow to set the caption', function () {
                test = Mock.optionsResultComponentSetup(Icon_1.Icon, {
                    labelValue: 'troll'
                }, result);
                expect(Dom_1.$$(Dom_1.$$(test.cmp.element).find('.coveo-icon-caption-overlay')).text()).toBe('troll');
            });
            it('not matching condition should detach the component from its parent', function () {
                test = Mock.optionsResultComponentSetup(Icon_1.Icon, {
                    labelValue: 'troll',
                    conditions: [{ field: 'filetype', values: ['abc'] }]
                }, result);
                expect(test.cmp.element.parentElement).toBeNull();
            });
            it('not matching reversed condition should display the component', function () {
                test = Mock.optionsResultComponentSetup(Icon_1.Icon, {
                    labelValue: 'troll',
                    conditions: [{ field: 'filetype', values: ['abc'], reverseCondition: true }]
                }, result);
                expect(test.cmp.element.parentElement).toBeDefined();
            });
            it('matching condition should display the component', function () {
                test = Mock.optionsResultComponentSetup(Icon_1.Icon, {
                    labelValue: 'troll',
                    conditions: [{ field: 'filetype', values: ['unknown'] }]
                }, result);
                expect(test.cmp.element.parentElement).toBeDefined();
            });
            it('matching reversed condition should detach the component from its parent', function () {
                test = Mock.optionsResultComponentSetup(Icon_1.Icon, {
                    labelValue: 'troll',
                    conditions: [{ field: 'filetype', values: ['unknown'], reverseCondition: true }]
                }, result);
                expect(test.cmp.element.parentElement).toBeNull();
            });
        });
    });
}
exports.IconTest = IconTest;
 
 
/***/ }),
/* 1631 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { Iif (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        Iif (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            Iif (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
            Iif (y = 0, t) op = [0, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    Eif (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        Iif (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
Object.defineProperty(exports, "__esModule", { value: true });
var Mock = __webpack_require__(2);
var Dom_1 = __webpack_require__(0);
var Querybox_1 = __webpack_require__(125);
var Component_1 = __webpack_require__(6);
var Initialization_1 = __webpack_require__(8);
var Facet_1 = __webpack_require__(32);
var Pager_1 = __webpack_require__(388);
var ResultList_1 = __webpack_require__(68);
var Simulate_1 = __webpack_require__(15);
var InitializationEvents_1 = __webpack_require__(22);
var RegisteredNamedMethods_1 = __webpack_require__(38);
var NoopComponent_1 = __webpack_require__(207);
var RegisteredNamedMethods_2 = __webpack_require__(38);
var UIBaseModules_1 = __webpack_require__(477);
var QueryController_1 = __webpack_require__(78);
var Fake_1 = __webpack_require__(11);
var ResultLink_1 = __webpack_require__(56);
function InitializationTest() {
    var _this = this;
    describe('Initialization', function () {
        var root;
        var endpoint;
        var searchInterfaceOptions;
        var queryBox;
        beforeEach(function () {
            Simulate_1.Simulate.doNoTrack = undefined;
            root = document.createElement('div');
            Dom_1.$$(root).addClass('CoveoSearchInterface');
            endpoint = Mock.mockSearchEndpoint();
            endpoint.options = {};
            searchInterfaceOptions = { SearchInterface: { endpoint: endpoint } };
            queryBox = document.createElement('div');
            Dom_1.$$(queryBox).addClass('CoveoQuerybox');
            root.appendChild(queryBox);
        });
        afterEach(function () {
            root = null;
            endpoint = null;
            searchInterfaceOptions = null;
            queryBox = null;
        });
        it('should allow to registerComponentFields', function () {
            Initialization_1.Initialization.registerComponentFields('MyComponent', ['myfirstfield', 'mysecondfield']);
            expect(Initialization_1.Initialization.getRegisteredFieldsForQuery()).toEqual(jasmine.arrayContaining(['myfirstfield', 'mysecondfield']));
            expect(Initialization_1.Initialization.getRegisteredFieldsComponentForQuery('MyComponent')).toEqual(jasmine.arrayContaining(['myfirstfield', 'mysecondfield']));
        });
        it('should allow to register componentsFields with duplicate without complaining', function () {
            Initialization_1.Initialization.registerComponentFields('AComponent', ['afield', 'anotherfield']);
            Initialization_1.Initialization.registerComponentFields('ANewComponent', ['afield', 'anotherfield']);
            Initialization_1.Initialization.registerComponentFields('AComponent', ['afield', 'yetanotherfield']);
            expect(Initialization_1.Initialization.getRegisteredFieldsForQuery()).toEqual(jasmine.arrayContaining(['afield', 'anotherfield', 'yetanotherfield']));
            expect(Initialization_1.Initialization.getRegisteredFieldsComponentForQuery('AComponent')).toEqual(jasmine.arrayContaining(['afield', 'anotherfield', 'yetanotherfield']));
            expect(Initialization_1.Initialization.getRegisteredFieldsComponentForQuery('ANewComponent')).toEqual(jasmine.arrayContaining(['afield', 'anotherfield']));
        });
        it('should allow to register components fields with the standard and special coveo id and it should be interchangeable', function () {
            Initialization_1.Initialization.registerComponentFields('MyStandardId', ['1', '2']);
            Initialization_1.Initialization.registerComponentFields('CoveoMyStandardId', ['3', '4']);
            expect(Initialization_1.Initialization.getRegisteredFieldsForQuery()).toEqual(jasmine.arrayContaining(['1', '2', '3', '4']));
            expect(Initialization_1.Initialization.getRegisteredFieldsComponentForQuery('MyStandardId')).toEqual(jasmine.arrayContaining(['1', '2', '3', '4']));
            expect(Initialization_1.Initialization.getRegisteredFieldsComponentForQuery('CoveoMyStandardId')).toEqual(jasmine.arrayContaining(['1', '2', '3', '4']));
        });
        it('should allow to return the list of eagerly loaded components', function () {
            expect(Initialization_1.Initialization.getListOfLoadedComponents()).toEqual(jasmine.arrayContaining(['Searchbox']));
        });
        it('should wait before resolving lazy init function to continue the framework initialization', function (done) {
            var spy = jasmine.createSpy('spy');
            Dom_1.$$(root).on(InitializationEvents_1.InitializationEvents.afterInitialization, spy);
            var promiseToResolve = new Promise(function (resolve, reject) {
                setTimeout(function () {
                    resolve(true);
                }, 500);
            });
            Initialization_1.Initialization.initializeFramework(root, searchInterfaceOptions, function () {
                return {
                    isLazyInit: true,
                    initResult: promiseToResolve
                };
            });
            expect(spy).not.toHaveBeenCalled();
            promiseToResolve.then(function () {
                setTimeout(function () {
                    expect(spy).toHaveBeenCalled();
                    done();
                }, 0);
            });
        });
        it('can initialize search interface and component', function (done) {
            expect(Component_1.Component.get(queryBox) instanceof Querybox_1.Querybox).toBe(false);
            Initialization_1.Initialization.initializeFramework(root, searchInterfaceOptions, function () {
                return Initialization_1.Initialization.initSearchInterface(root, searchInterfaceOptions);
            }).then(function () {
                expect(Component_1.Component.get(queryBox) instanceof Querybox_1.Querybox).toBe(true);
                done();
            });
        });
        it('should not initialize a search interface twice', function (done) {
            expect(Component_1.Component.get(queryBox) instanceof Querybox_1.Querybox).toBe(false);
            // First initialization
            Initialization_1.Initialization.initializeFramework(root, searchInterfaceOptions, function () {
                return Initialization_1.Initialization.initSearchInterface(root, searchInterfaceOptions);
            }).then(function () {
                expect(Component_1.Component.get(queryBox) instanceof Querybox_1.Querybox).toBe(true);
                var newQueryBox = document.createElement('div');
                Dom_1.$$(newQueryBox).addClass('CoveoQuerybox');
                root.appendChild(newQueryBox);
                expect(Component_1.Component.get(newQueryBox) instanceof Querybox_1.Querybox).toBe(false);
                // Second initialization
                Initialization_1.Initialization.initializeFramework(root, searchInterfaceOptions, function () {
                    return Initialization_1.Initialization.initSearchInterface(root, searchInterfaceOptions);
                }).then(function () {
                    expect(Component_1.Component.get(newQueryBox) instanceof Querybox_1.Querybox).toBe(false);
                    done();
                });
            });
        });
        it('allows to register default options ahead of init call, and merge them', function () {
            Initialization_1.Initialization.registerDefaultOptions(root, {
                Querybox: {
                    enableSearchAsYouType: true
                }
            });
            Initialization_1.Initialization.registerDefaultOptions(root, {
                Querybox: {
                    enablePartialMatch: true
                }
            });
            expect(Component_1.Component.get(queryBox) instanceof Querybox_1.Querybox).toBe(false);
            Initialization_1.Initialization.initializeFramework(root, searchInterfaceOptions, function () {
                return Initialization_1.Initialization.initSearchInterface(root, searchInterfaceOptions);
            });
            expect(Component_1.Component.get(queryBox) instanceof Querybox_1.Querybox).toBe(true);
            var sBox = Component_1.Component.get(queryBox);
            expect(sBox.options.enableSearchAsYouType).toBe(true);
            expect(sBox.options.enablePartialMatch).toBe(true);
        });
        it('allows to registerAutoCreateComponent', function () {
            var dummyCmp = jasmine.createSpy('foobar');
            dummyCmp.ID = 'FooBar';
            var dummyElem = document.createElement('div');
            Dom_1.$$(dummyElem).addClass('CoveoFooBar');
            root.appendChild(dummyElem);
            Initialization_1.Initialization.registerAutoCreateComponent(dummyCmp);
            Initialization_1.Initialization.initializeFramework(root, searchInterfaceOptions, function () {
                return Initialization_1.Initialization.initSearchInterface(root, searchInterfaceOptions);
            });
            expect(dummyCmp).toHaveBeenCalled();
        });
        it('allows to registerAutoCreateComponent with aliases', function () {
            var aliasedComponent = jasmine.createSpy('aliasedComponent');
            aliasedComponent.ID = 'OriginalId';
            aliasedComponent.aliases = ['AliasedId'];
            var dummyElem = Dom_1.$$('div', { className: 'CoveoAliasedId' });
            Dom_1.$$(root).append(dummyElem.el);
            Initialization_1.Initialization.registerAutoCreateComponent(aliasedComponent);
            Initialization_1.Initialization.initializeFramework(root, searchInterfaceOptions, function () {
                return Initialization_1.Initialization.initSearchInterface(root, searchInterfaceOptions);
            });
            expect(aliasedComponent).toHaveBeenCalled();
        });
        it('allows to check if isComponentClassIdRegistered', function () {
            var dummyCmp = function () { };
            dummyCmp.ID = 'CheckRegistration';
            Initialization_1.Initialization.registerAutoCreateComponent(dummyCmp);
            expect(Initialization_1.Initialization.isComponentClassIdRegistered('CheckRegistration')).toBe(true);
        });
        it('allow to getListOfRegisteredComponents', function () {
            expect(Initialization_1.Initialization.getListOfRegisteredComponents()).toEqual(jasmine.arrayContaining(['Facet', 'Pager']));
        });
        it('allow to getRegisteredComponent', function () {
            expect(Initialization_1.Initialization.getRegisteredComponent('Facet')).toBe(Facet_1.Facet);
        });
        it('allow to automaticallyCreateComponentsInside', function () {
            var env = new Mock.MockEnvironmentBuilder().build();
            expect(Component_1.Component.get(queryBox) instanceof Querybox_1.Querybox).toBe(false);
            Initialization_1.Initialization.automaticallyCreateComponentsInside(root, {
                options: {},
                bindings: env
            });
            expect(Component_1.Component.get(queryBox) instanceof Querybox_1.Querybox).toBe(true);
        });
        it('allow to automaticallyCreateComponentInside, as well as childs components', function () {
            var env = new Mock.MockEnvironmentBuilder().build();
            var resultList = Dom_1.$$('div', { className: Component_1.Component.computeCssClassNameForType(ResultList_1.ResultList.ID) });
            Dom_1.$$(queryBox).append(resultList.el);
            expect(Component_1.Component.get(resultList.el) instanceof ResultList_1.ResultList).toBe(false);
            Initialization_1.Initialization.automaticallyCreateComponentsInside(root, {
                options: {},
                bindings: env
            });
            expect(Component_1.Component.get(resultList.el) instanceof ResultList_1.ResultList).toBe(true);
        });
        it('allow to automaticallyCreateComponentsInside and can ignore some components', function () {
            var env = new Mock.MockEnvironmentBuilder().build();
            expect(Component_1.Component.get(queryBox) instanceof Querybox_1.Querybox).toBe(false);
            Initialization_1.Initialization.automaticallyCreateComponentsInside(root, {
                options: {},
                bindings: env
            }, [Querybox_1.Querybox.ID]);
            expect(Component_1.Component.get(queryBox) instanceof Querybox_1.Querybox).toBe(false);
        });
        it('allow to automaticallyCreateComponentsInside and can ignore multiple repetitive components', function () {
            var env = new Mock.MockEnvironmentBuilder().build();
            var queryBox2 = Dom_1.$$('div', { className: 'CoveoQuerybox' }).el;
            env.root.appendChild(queryBox2);
            expect(Component_1.Component.get(queryBox) instanceof Querybox_1.Querybox).toBe(false);
            expect(Component_1.Component.get(queryBox2) instanceof Querybox_1.Querybox).toBe(false);
            Initialization_1.Initialization.automaticallyCreateComponentsInside(root, {
                options: {},
                bindings: env
            }, [Querybox_1.Querybox.ID]);
            expect(Component_1.Component.get(queryBox) instanceof Querybox_1.Querybox).toBe(false);
            expect(Component_1.Component.get(queryBox2) instanceof Querybox_1.Querybox).toBe(false);
        });
        it('allow to automaticallyCreateComponentInside can ignore child components', function () {
            var env = new Mock.MockEnvironmentBuilder().build();
            var resultList = Dom_1.$$('div', { className: Component_1.Component.computeCssClassNameForType(ResultList_1.ResultList.ID) });
            Dom_1.$$(queryBox).append(resultList.el);
            expect(Component_1.Component.get(resultList.el) instanceof ResultList_1.ResultList).toBe(false);
            Initialization_1.Initialization.automaticallyCreateComponentsInside(root, {
                options: {},
                bindings: env
            }, [Querybox_1.Querybox.ID]);
            expect(Component_1.Component.get(resultList.el) instanceof ResultList_1.ResultList).toBe(false);
        });
        it('allow to automaticallyCreateComponentInside and will ignore elements that are already components', function () {
            var env = new Mock.MockEnvironmentBuilder().build();
            expect(Component_1.Component.get(queryBox) instanceof Querybox_1.Querybox).toBe(false);
            Initialization_1.Initialization.automaticallyCreateComponentsInside(root, {
                options: {},
                bindings: env
            });
            expect(Component_1.Component.get(queryBox) instanceof Querybox_1.Querybox).toBe(true);
            queryBox.className = 'CoveoResultList';
            Initialization_1.Initialization.automaticallyCreateComponentsInside(root, {
                options: {},
                bindings: env
            });
            expect(Component_1.Component.get(queryBox) instanceof Querybox_1.Querybox).toBe(true);
            expect(Component_1.Component.get(queryBox) instanceof ResultList_1.ResultList).toBe(false);
        });
        describe('when inside a result element', function () {
            var result;
            var resultLink;
            beforeEach(function () {
                result = Fake_1.FakeResults.createFakeResult();
                result.searchInterface = new Mock.MockEnvironmentBuilder().build().searchInterface;
                resultLink = Dom_1.$$('a', { className: 'CoveoResultLink' }).el;
            });
            it('allow to automaticallyCreateComponentInsideResult', function () {
                expect(Component_1.Component.get(resultLink) instanceof ResultLink_1.ResultLink).toBe(false);
                Initialization_1.Initialization.automaticallyCreateComponentsInsideResult(resultLink, result);
                expect(Component_1.Component.get(resultLink) instanceof ResultLink_1.ResultLink).toBe(true);
            });
            it('allows to automaticallyCreateComponentInsideResult with additional options', function () {
                Initialization_1.Initialization.automaticallyCreateComponentsInsideResult(resultLink, result, {
                    ResultLink: { alwaysOpenInNewWindow: true }
                });
                var resultLinkComponent = Component_1.Component.get(resultLink);
                expect(resultLinkComponent.options.alwaysOpenInNewWindow).toBeTruthy();
            });
        });
        it('allow to monkeyPatchComponentMethod', function () {
            Initialization_1.Initialization.initializeFramework(root, searchInterfaceOptions, function () {
                return Initialization_1.Initialization.initSearchInterface(root, searchInterfaceOptions);
            });
            var patch = jasmine.createSpy('patch');
            Initialization_1.Initialization.monkeyPatchComponentMethod('submit', queryBox, patch);
            Component_1.Component.get(queryBox).submit();
            expect(patch).toHaveBeenCalled();
        });
        it('allow to monkeyPatchComponentMethod with the component name', function () {
            Initialization_1.Initialization.initializeFramework(root, searchInterfaceOptions, function () {
                return Initialization_1.Initialization.initSearchInterface(root, searchInterfaceOptions);
            });
            var patch = jasmine.createSpy('patch');
            Initialization_1.Initialization.monkeyPatchComponentMethod('Querybox.submit', queryBox, patch);
            Component_1.Component.get(queryBox).submit();
            expect(patch).toHaveBeenCalled();
        });
        it('allows to determine if a top level method is already registed', function () {
            expect(Initialization_1.Initialization.isNamedMethodRegistered('get')).toBe(true);
            expect(Initialization_1.Initialization.isNamedMethodRegistered('executeQuery')).toBe(true);
            expect(Initialization_1.Initialization.isNamedMethodRegistered('does not exist')).toBe(false);
        });
        it("should allow to init a box interface (and throw because it's only used in salesforce)", function (done) {
            var init = Initialization_1.Initialization.initBoxInterface(root, searchInterfaceOptions);
            expect(init.isLazyInit).toBe(false);
            init.initResult.catch(function (success) {
                expect(success).not.toBeNull();
                done();
            });
        });
        it('should allow to dispatch a named method call', function () {
            RegisteredNamedMethods_1.init(root, searchInterfaceOptions);
            Initialization_1.Initialization.dispatchNamedMethodCall('executeQuery', root, []);
            expect(endpoint.search).toHaveBeenCalled();
        });
        it('should throw when calling a named method that does not exist', function () {
            RegisteredNamedMethods_1.init(root, searchInterfaceOptions);
            expect(function () { return Initialization_1.Initialization.dispatchNamedMethodCall('nope', root, []); }).toThrow();
        });
        it('should allow to dispatchNamedMethodCallOrComponentCreation', function () {
            RegisteredNamedMethods_1.init(root, searchInterfaceOptions);
            Initialization_1.Initialization.dispatchNamedMethodCallOrComponentCreation('executeQuery', root, []);
            expect(endpoint.search).toHaveBeenCalled();
            Initialization_1.Initialization.dispatchNamedMethodCallOrComponentCreation('submit', queryBox, []);
            expect(endpoint.search).toHaveBeenCalled();
        });
        it('should throw when dispatchNamedMethodCallOrComponentCreation is called with something that does not exist', function () {
            RegisteredNamedMethods_1.init(root, searchInterfaceOptions);
            expect(function () { return Initialization_1.Initialization.dispatchNamedMethodCallOrComponentCreation('nope', root, []); }).toThrow();
        });
        it('can initialize external components', function () {
            var external = Dom_1.$$('div', {
                className: 'CoveoPager'
            }).el;
            searchInterfaceOptions['externalComponents'] = [external];
            searchInterfaceOptions['SearchInterface'].autoTriggerQuery = false;
            Initialization_1.Initialization.initializeFramework(root, searchInterfaceOptions, function () {
                return Initialization_1.Initialization.initSearchInterface(root, searchInterfaceOptions);
            });
            expect(Component_1.Component.get(external) instanceof Pager_1.Pager).toBe(true);
        });
        it('can initialize external components passed in as a jquery instance', function () {
            Simulate_1.Simulate.addJQuery();
            var external = $('<div class="CoveoPager"></div>');
            searchInterfaceOptions['externalComponents'] = [external];
            searchInterfaceOptions['SearchInterface'].autoTriggerQuery = false;
            Initialization_1.Initialization.initializeFramework(root, searchInterfaceOptions, function () {
                return Initialization_1.Initialization.initSearchInterface(root, searchInterfaceOptions);
            });
            expect(Component_1.Component.get(external.get(0)) instanceof Pager_1.Pager).toBe(true);
            Simulate_1.Simulate.removeJQuery();
        });
        describe('when initializing a Search Interface', function () {
            var spyAfterComponentsInitialized;
            var doInit = function () {
                return Initialization_1.Initialization.initializeFramework(root, searchInterfaceOptions, function () {
                    return Initialization_1.Initialization.initSearchInterface(root, searchInterfaceOptions);
                });
            };
            beforeEach(function () {
                spyAfterComponentsInitialized = jasmine.createSpy('afterComponentsInitialized');
                Dom_1.$$(root).on(InitializationEvents_1.InitializationEvents.afterComponentsInitialization, spyAfterComponentsInitialized);
            });
            it('will trigger the afterComponentsInitialized event handler', function (done) { return __awaiter(_this, void 0, void 0, function () {
                return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0: return [4 /*yield*/, doInit()];
                        case 1:
                            _a.sent();
                            expect(spyAfterComponentsInitialized).toHaveBeenCalled();
                            done();
                            return [2 /*return*/];
                    }
                });
            }); });
            describe('when afterComponentsInitialized is deferred by a component', function () {
                var deferSpy;
                var afterDeferInitializationSpy;
                beforeEach(function () {
                    deferSpy = jasmine.createSpy('initializationSpy');
                    Dom_1.$$(root).on(InitializationEvents_1.InitializationEvents.afterComponentsInitialization, function (event, data) {
                        data.defer.push(new Promise(function (resolve) {
                            deferSpy();
                            resolve();
                        }));
                    });
                    afterDeferInitializationSpy = jasmine.createSpy('afterInitializationSpy');
                    Dom_1.$$(root).on(InitializationEvents_1.InitializationEvents.afterInitialization, afterDeferInitializationSpy);
                });
                it('will trigger the deferred promise', function (done) { return __awaiter(_this, void 0, void 0, function () {
                    return __generator(this, function (_a) {
                        switch (_a.label) {
                            case 0: return [4 /*yield*/, doInit()];
                            case 1:
                                _a.sent();
                                expect(deferSpy).toHaveBeenCalled();
                                done();
                                return [2 /*return*/];
                        }
                    });
                }); });
                it('will execute the rest of the pipeline after the promises', function (done) { return __awaiter(_this, void 0, void 0, function () {
                    return __generator(this, function (_a) {
                        switch (_a.label) {
                            case 0: return [4 /*yield*/, doInit()];
                            case 1:
                                _a.sent();
                                expect(deferSpy).toHaveBeenCalledBefore(afterDeferInitializationSpy);
                                done();
                                return [2 /*return*/];
                        }
                    });
                }); });
            });
            describe('when afterComponentsInitialized is deferred by multiple components', function () {
                var deferSpy;
                var afterDeferInitializationSpy;
                beforeEach(function () {
                    deferSpy = jasmine.createSpy('initializationSpy');
                    Dom_1.$$(root).on(InitializationEvents_1.InitializationEvents.afterComponentsInitialization, function (event, data) {
                        data.defer.push(Promise.resolve());
                        data.defer.push(new Promise(function (resolve) {
                            deferSpy();
                            resolve();
                        }));
                    });
                    afterDeferInitializationSpy = jasmine.createSpy('afterInitializationSpy');
                    Dom_1.$$(root).on(InitializationEvents_1.InitializationEvents.afterInitialization, afterDeferInitializationSpy);
                });
                it('will wait for all the promises before executing the rest of the pipeline after the promises', function (done) { return __awaiter(_this, void 0, void 0, function () {
                    return __generator(this, function (_a) {
                        switch (_a.label) {
                            case 0: return [4 /*yield*/, doInit()];
                            case 1:
                                _a.sent();
                                expect(deferSpy).toHaveBeenCalledBefore(afterDeferInitializationSpy);
                                done();
                                return [2 /*return*/];
                        }
                    });
                }); });
            });
            describe('when afterComponentsInitialized is deferred by a failing promise', function () {
                var deferSpy;
                var afterDeferInitializationSpy;
                beforeEach(function () {
                    deferSpy = jasmine.createSpy('initializationSpy');
                    Dom_1.$$(root).on(InitializationEvents_1.InitializationEvents.afterComponentsInitialization, function (event, data) {
                        data.defer.push(Promise.reject('It failed badly!'));
                        data.defer.push(new Promise(function (resolve) {
                            deferSpy();
                            resolve();
                        }));
                    });
                    afterDeferInitializationSpy = jasmine.createSpy('afterInitializationSpy');
                    Dom_1.$$(root).on(InitializationEvents_1.InitializationEvents.afterInitialization, afterDeferInitializationSpy);
                });
                it('will skip the rejected promise and wait for the working one', function (done) { return __awaiter(_this, void 0, void 0, function () {
                    return __generator(this, function (_a) {
                        switch (_a.label) {
                            case 0: return [4 /*yield*/, doInit()];
                            case 1:
                                _a.sent();
                                expect(deferSpy).toHaveBeenCalled();
                                done();
                                return [2 /*return*/];
                        }
                    });
                }); });
                it('will execute the rest of the pipeline after the promises', function (done) { return __awaiter(_this, void 0, void 0, function () {
                    return __generator(this, function (_a) {
                        switch (_a.label) {
                            case 0: return [4 /*yield*/, doInit()];
                            case 1:
                                _a.sent();
                                expect(deferSpy).toHaveBeenCalledBefore(afterDeferInitializationSpy);
                                done();
                                return [2 /*return*/];
                        }
                    });
                }); });
            });
            describe('when afterComponentsInitialized is deferred by an invalid promise that triggers a fatal error', function () {
                var afterComponentsInitializationSpy;
                beforeEach(function () {
                    afterComponentsInitializationSpy = jasmine.createSpy('initializationSpy');
                    Dom_1.$$(root).on(InitializationEvents_1.InitializationEvents.afterComponentsInitialization, function (event, data) {
                        data.defer.push(null);
                    });
                    Dom_1.$$(root).on(InitializationEvents_1.InitializationEvents.afterComponentsInitialization, afterComponentsInitializationSpy);
                });
                it('will continue the execution of the pipeline without crashing', function (done) { return __awaiter(_this, void 0, void 0, function () {
                    return __generator(this, function (_a) {
                        switch (_a.label) {
                            case 0: return [4 /*yield*/, doInit()];
                            case 1:
                                _a.sent();
                                expect(afterComponentsInitializationSpy).toHaveBeenCalled();
                                done();
                                return [2 /*return*/];
                        }
                    });
                }); });
            });
        });
        describe('with automatic first query', function () {
            var spyOnQuery;
            var doInit = function () {
                return Initialization_1.Initialization.initializeFramework(root, searchInterfaceOptions, function () {
                    var initResult = Initialization_1.Initialization.initSearchInterface(root, searchInterfaceOptions);
                    spyOnQuery = spyOn(UIBaseModules_1.get(root, QueryController_1.QueryController), 'executeQuery');
                    return initResult;
                });
            };
            beforeEach(function () {
                searchInterfaceOptions['SearchInterface'].autoTriggerQuery = true;
            });
            it('will trigger a query automatically by default', function (done) {
                doInit().then(function () {
                    expect(spyOnQuery).toHaveBeenCalled();
                    done();
                });
            });
            it('will not trigger a query automatically if specified', function (done) {
                searchInterfaceOptions['SearchInterface'].autoTriggerQuery = false;
                doInit().then(function () {
                    expect(spyOnQuery).not.toHaveBeenCalled();
                    done();
                });
            });
            describe('when query with no keywords are not allowed', function () {
                beforeEach(function () {
                    searchInterfaceOptions['SearchInterface'].allowQueriesWithoutKeywords = false;
                });
                it('will trigger a query automatically if the interface contains keywords', function (done) {
                    Dom_1.$$(root).on(InitializationEvents_1.InitializationEvents.afterInitialization, function () {
                        RegisteredNamedMethods_2.state(root, 'q', 'foo');
                    });
                    doInit().then(function () {
                        expect(spyOnQuery).toHaveBeenCalled();
                        done();
                    });
                });
                it('will not trigger a query automatically if the interface contains no keywords', function (done) {
                    Dom_1.$$(root).on(InitializationEvents_1.InitializationEvents.afterInitialization, function () {
                        RegisteredNamedMethods_2.state(root, 'q', '');
                    });
                    doInit().then(function () {
                        expect(spyOnQuery).not.toHaveBeenCalled();
                        done();
                    });
                });
            });
        });
        describe('when initializing recommendation interface', function () {
            var options;
            beforeEach(function () {
                options = {
                    Recommendation: {
                        endpoint: endpoint,
                        mainSearchInterface: root,
                        userContext: {}
                    },
                    SearchInterface: {}
                };
            });
            afterEach(function () {
                options = null;
            });
            it('should be able to generate to components', function () {
                expect(Component_1.Component.get(queryBox) instanceof Querybox_1.Querybox).toBe(false);
                Initialization_1.Initialization.initRecommendationInterface(root, options);
                expect(Component_1.Component.get(queryBox) instanceof Querybox_1.Querybox).toBe(true);
            });
            it('should not send action history on automatic query', function () {
                localStorage.removeItem('__coveo.analytics.history');
                expect(localStorage.getItem('__coveo.analytics.history')).toBeNull();
                Initialization_1.Initialization.initRecommendationInterface(root, options);
                var actionHistory = localStorage.getItem('__coveo.analytics.history');
                expect(actionHistory).toBeNull();
            });
        });
        it("should fallback on lazy registered component if it's only registered as lazy", function (done) {
            var lazyCustomStuff = jasmine.createSpy('customstuff').and.callFake(function () {
                return new Promise(function (resolve, reject) {
                    resolve(NoopComponent_1.NoopComponent);
                });
            });
            // We register the component only as "lazy", but then do an initialization "eager" style.
            // Normally, the fallback should kick in and the component should still be initialized
            root.appendChild(Dom_1.$$('div', { className: 'CoveoMyCustomStuff' }).el);
            Initialization_1.LazyInitialization.registerLazyComponent('MyCustomStuff', lazyCustomStuff);
            Initialization_1.Initialization.initializeFramework(root, searchInterfaceOptions, function () {
                return Initialization_1.Initialization.initSearchInterface(root, searchInterfaceOptions);
            }).then(function () {
                expect(lazyCustomStuff).toHaveBeenCalled();
                done();
            });
        });
    });
}
exports.InitializationTest = InitializationTest;
 
 
/***/ }),
/* 1632 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Initialization_1 = __webpack_require__(8);
var Querybox_1 = __webpack_require__(125);
var Dom_1 = __webpack_require__(0);
var MockEnvironment_1 = __webpack_require__(2);
var RegisteredNamedMethods_1 = __webpack_require__(38);
function LazyInitializationTest() {
    describe('LazyInitialization', function () {
        var initParameters;
        beforeEach(function () {
            initParameters = {
                bindings: new MockEnvironment_1.MockEnvironmentBuilder().build(),
                options: undefined,
                result: undefined
            };
        });
        afterEach(function () {
            initParameters = null;
        });
        it('should allow to register a lazy component', function () {
            var loadPromise = new Promise(function (resolve, reject) { return resolve(Querybox_1.Querybox); });
            var myStuff = function () { return loadPromise; };
            Initialization_1.LazyInitialization.registerLazyComponent('MyStuff', myStuff);
            expect(Initialization_1.LazyInitialization.getLazyRegisteredComponent('MyStuff')).toEqual(loadPromise);
        });
        it('should allow to create a component with a factory', function (done) {
            var myStuff = function () { return new Promise(function (resolve, reject) { return resolve(Querybox_1.Querybox); }); };
            Initialization_1.LazyInitialization.registerLazyComponent('MyStuff', myStuff);
            var elementOne = Dom_1.$$('div', { className: 'CoveoMyStuff' });
            var elementTwo = Dom_1.$$('div', { className: 'CoveoMyStuff' });
            var resultOfFactory = Initialization_1.LazyInitialization.componentsFactory([elementOne.el, elementTwo.el], 'MyStuff', initParameters);
            expect(resultOfFactory.isLazyInit).toBe(true);
            Promise.all(resultOfFactory.factory()).then(function () {
                expect(RegisteredNamedMethods_1.get(elementOne.el) instanceof Querybox_1.Querybox).toBe(true);
                expect(RegisteredNamedMethods_1.get(elementTwo.el) instanceof Querybox_1.Querybox).toBe(true);
                done();
            });
        });
    });
}
exports.LazyInitializationTest = LazyInitializationTest;
 
 
/***/ }),
/* 1633 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Mock = __webpack_require__(2);
var LiveAnalyticsClient_1 = __webpack_require__(229);
var Fake_1 = __webpack_require__(11);
var AnalyticsActionListMeta_1 = __webpack_require__(7);
var PendingSearchAsYouTypeSearchEvent_1 = __webpack_require__(179);
var PendingSearchEvent_1 = __webpack_require__(230);
var Simulate_1 = __webpack_require__(15);
var Dom_1 = __webpack_require__(0);
var AnalyticsEvents_1 = __webpack_require__(111);
var Defer_1 = __webpack_require__(31);
var _ = __webpack_require__(1);
function LiveAnalyticsClientTest() {
    describe('LiveAnalyticsClient', function () {
        var endpoint;
        var env;
        var client;
        var results;
        var promise;
        beforeEach(function () {
            // Thanks phantom js for bad native event support
            Iif (Simulate_1.Simulate.isPhantomJs()) {
                Simulate_1.Simulate.addJQuery();
            }
            env = new Mock.MockEnvironmentBuilder().build();
            endpoint = Mock.mockAnalyticsEndpoint();
            client = new LiveAnalyticsClient_1.LiveAnalyticsClient(endpoint, env.root, 'foo', 'foo display', false, 'foo run name', 'foo run version', 'default', true, { searchInterface: env.searchInterface });
            promise = new Promise(function (resolve, reject) {
                resolve((results = Fake_1.FakeResults.createFakeResults(3)));
            });
        });
        afterEach(function () {
            env = null;
            endpoint = null;
            client = null;
            promise = null;
            Simulate_1.Simulate.removeJQuery();
        });
        it('should return pending event', function () {
            client.logSearchEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.searchboxSubmit, {});
            expect(client.getPendingSearchEvent() instanceof PendingSearchEvent_1.PendingSearchEvent).toBe(true);
            client.cancelAllPendingEvents();
            client.logSearchAsYouType(AnalyticsActionListMeta_1.analyticsActionCauseList.searchboxSubmit, {});
            expect(client.getPendingSearchEvent() instanceof PendingSearchAsYouTypeSearchEvent_1.PendingSearchAsYouTypeSearchEvent).toBe(true);
        });
        it('originContext can be specified', function () {
            client.setOriginContext('context');
            client.logSearchEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.searchboxSubmit, {});
            expect(client.getPendingSearchEvent().templateSearchEvent.originContext).toBe('context');
        });
        it('should send proper information on logSearchEvent', function (done) {
            client.logSearchEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.searchboxSubmit, {});
            var query = {
                q: 'the query',
                aq: 'the advanced query',
                firstResult: 20,
                numberOfResults: 10,
                enableDidYouMean: true,
                context: { key1: 'value1', key2: 'value2' }
            };
            Simulate_1.Simulate.query(env, {
                query: query,
                promise: promise
            });
            _.defer(function () {
                var jasmineMatcher = jasmine.arrayContaining([
                    jasmine.objectContaining({
                        queryText: 'the query',
                        advancedQuery: 'the advanced query',
                        didYouMean: true,
                        numberOfResults: 4,
                        resultsPerPage: 10,
                        pageNumber: 2,
                        username: 'foo',
                        userDisplayName: 'foo display',
                        splitTestRunName: 'foo run name',
                        splitTestRunVersion: 'foo run version',
                        customData: jasmine.objectContaining({
                            context_key1: 'value1',
                            context_key2: 'value2'
                        })
                    })
                ]);
                expect(endpoint.sendSearchEvents).toHaveBeenCalledWith(jasmineMatcher);
                done();
            });
        });
        it('should give precedence to query from the query state model instead of the one sent to the search api', function (done) {
            client.logSearchEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.searchboxSubmit, {});
            var query = {
                q: 'the query',
                aq: 'the advanced query',
                firstResult: 20,
                numberOfResults: 10,
                enableDidYouMean: true
            };
            env.queryStateModel.get = function () {
                return 'another query';
            };
            Simulate_1.Simulate.query(env, {
                query: query,
                promise: promise
            });
            _.defer(function () {
                var jasmineMatcher = jasmine.arrayContaining([
                    jasmine.objectContaining({
                        queryText: 'another query',
                        advancedQuery: 'the advanced query',
                        didYouMean: true,
                        numberOfResults: 4,
                        resultsPerPage: 10,
                        pageNumber: 2,
                        username: 'foo',
                        userDisplayName: 'foo display',
                        splitTestRunName: 'foo run name',
                        splitTestRunVersion: 'foo run version'
                    })
                ]);
                expect(endpoint.sendSearchEvents).toHaveBeenCalledWith(jasmineMatcher);
                done();
            });
        });
        describe('with multiple (3) search events', function () {
            var root;
            var env2;
            var env3;
            beforeEach(function () {
                root = document.createElement('div');
                env2 = new Mock.MockEnvironmentBuilder().build();
                env3 = new Mock.MockEnvironmentBuilder().build();
                root.appendChild(env.root);
                root.appendChild(env2.root);
                root.appendChild(env3.root);
                client = new LiveAnalyticsClient_1.LiveAnalyticsClient(endpoint, root, 'foo', 'foo display', false, 'foo run name', 'foo run version', 'default', true, {
                    searchInterface: env.searchInterface
                });
            });
            afterEach(function () {
                env = null;
                env2 = null;
                env3 = null;
                client = null;
                root = null;
            });
            it('should support when 3 analytics search events are triggered together, 3 events are pushed to the endpoint at the same time', function (done) {
                client.logSearchEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.searchboxSubmit, {});
                Simulate_1.Simulate.query(env, {
                    promise: promise,
                    query: {
                        q: 'the query 1'
                    },
                    deferSuccess: true
                });
                Simulate_1.Simulate.query(env2, {
                    promise: promise,
                    query: {
                        q: 'the query 2'
                    },
                    deferSuccess: true
                });
                Simulate_1.Simulate.query(env3, {
                    promise: promise,
                    query: {
                        q: 'the query 3'
                    },
                    deferSuccess: true
                });
                _.defer(function () {
                    var jasmineMatcher = jasmine.arrayContaining([
                        jasmine.objectContaining({
                            queryText: 'the query 1'
                        }),
                        jasmine.objectContaining({
                            queryText: 'the query 2'
                        }),
                        jasmine.objectContaining({
                            queryText: 'the query 3'
                        })
                    ]);
                    expect(endpoint.sendSearchEvents).toHaveBeenCalledWith(jasmineMatcher);
                    done();
                });
            });
            it('should send only the new batch when search events are triggered together multiple times', function (done) {
                client.logSearchEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.searchboxSubmit, {});
                Simulate_1.Simulate.query(env, {
                    promise: promise,
                    query: {
                        q: 'the query 1'
                    },
                    deferSuccess: true
                });
                Simulate_1.Simulate.query(env2, {
                    promise: promise,
                    query: {
                        q: 'the query 2'
                    },
                    deferSuccess: true
                });
                Simulate_1.Simulate.query(env3, {
                    promise: promise,
                    query: {
                        q: 'the query 3'
                    },
                    deferSuccess: true
                });
                _.defer(function () {
                    var jasmineMatcher = jasmine.arrayContaining([
                        jasmine.objectContaining({
                            queryText: 'the query 1'
                        }),
                        jasmine.objectContaining({
                            queryText: 'the query 2'
                        }),
                        jasmine.objectContaining({
                            queryText: 'the query 3'
                        })
                    ]);
                    expect(endpoint.sendSearchEvents).toHaveBeenCalledWith(jasmineMatcher);
                });
                Simulate_1.Simulate.query(env, {
                    promise: promise,
                    query: {
                        q: 'the query 3'
                    },
                    deferSuccess: true
                });
                Simulate_1.Simulate.query(env2, {
                    promise: promise,
                    query: {
                        q: 'the query 4'
                    },
                    deferSuccess: true
                });
                Simulate_1.Simulate.query(env3, {
                    promise: promise,
                    query: {
                        q: 'the query 5'
                    },
                    deferSuccess: true
                });
                _.defer(function () {
                    var jasmineMatcher = jasmine.arrayContaining([
                        jasmine.objectContaining({
                            queryText: 'the query 3'
                        }),
                        jasmine.objectContaining({
                            queryText: 'the query 4'
                        }),
                        jasmine.objectContaining({
                            queryText: 'the query 5'
                        })
                    ]);
                    expect(endpoint.sendSearchEvents).toHaveBeenCalledWith(jasmineMatcher);
                    done();
                });
            });
            it('should not break if a search event is followed by 0 during query', function (done) {
                client.logSearchEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.searchboxSubmit, {});
                Defer_1.Defer.flush();
                client.logSearchEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.searchboxSubmit, {});
                Simulate_1.Simulate.query(env, {
                    promise: promise,
                    query: {
                        q: 'the query 1'
                    },
                    deferSuccess: true
                });
                Simulate_1.Simulate.query(env2, {
                    promise: promise,
                    query: {
                        q: 'the query 2'
                    },
                    deferSuccess: true
                });
                Simulate_1.Simulate.query(env3, {
                    promise: promise,
                    query: {
                        q: 'the query 3'
                    },
                    deferSuccess: true
                });
                _.defer(function () {
                    var jasmineMatcher = jasmine.arrayContaining([
                        jasmine.objectContaining({
                            queryText: 'the query 1'
                        }),
                        jasmine.objectContaining({
                            queryText: 'the query 2'
                        }),
                        jasmine.objectContaining({
                            queryText: 'the query 3'
                        })
                    ]);
                    expect(endpoint.sendSearchEvents).toHaveBeenCalledWith(jasmineMatcher);
                    done();
                });
            });
            it('should only send success events to the endpoint', function (done) {
                client.logSearchEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.searchboxSubmit, {});
                var promise2 = new Promise(function (resolve, reject) {
                    reject();
                });
                promise2.catch(function () { });
                Simulate_1.Simulate.query(env, {
                    promise: promise,
                    query: {
                        q: 'the query 1'
                    },
                    deferSuccess: true
                });
                Simulate_1.Simulate.query(env2, {
                    promise: promise2,
                    query: {
                        q: 'the query 2'
                    },
                    deferSuccess: true
                });
                Simulate_1.Simulate.query(env3, {
                    promise: promise,
                    query: {
                        q: 'the query 3'
                    },
                    deferSuccess: true
                });
                _.defer(function () {
                    var jasmineMatcher = jasmine.arrayContaining([
                        jasmine.objectContaining({
                            queryText: 'the query 1'
                        }),
                        jasmine.objectContaining({
                            queryText: 'the query 3'
                        })
                    ]);
                    var jasmineMatcherNot = jasmine.arrayContaining([
                        jasmine.objectContaining({
                            queryText: 'the query 2'
                        })
                    ]);
                    expect(endpoint.sendSearchEvents).toHaveBeenCalledWith(jasmineMatcher);
                    expect(endpoint.sendSearchEvents).not.toHaveBeenCalledWith(jasmineMatcherNot);
                    done();
                });
            });
            it('should include searchQueryUid', function (done) {
                client.logSearchEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.searchboxSubmit, {});
                Simulate_1.Simulate.query(env, { promise: promise });
                _.defer(function () {
                    expect(endpoint.sendSearchEvents).toHaveBeenCalledWith(jasmine.arrayContaining([
                        jasmine.objectContaining({
                            searchQueryUid: results.searchUid
                        })
                    ]));
                    done();
                });
            });
        });
        it('should trigger an analytics event on document view', function () {
            var spy = jasmine.createSpy('spy');
            Dom_1.$$(env.root).on(AnalyticsEvents_1.AnalyticsEvents.documentViewEvent, spy);
            client.logClickEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.documentOpen, {}, Fake_1.FakeResults.createFakeResult('foo'), document.createElement('div'));
            Defer_1.Defer.flush();
            expect(spy).toHaveBeenCalled();
        });
        it('should trigger an analytics ready event on document view', function () {
            var spy = jasmine.createSpy('spy');
            Dom_1.$$(env.root).on(AnalyticsEvents_1.AnalyticsEvents.analyticsEventReady, spy);
            client.logClickEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.documentOpen, {}, Fake_1.FakeResults.createFakeResult('foo'), document.createElement('div'));
            Defer_1.Defer.flush();
            expect(spy).toHaveBeenCalled();
        });
        it('should trigger an analytics event on search event', function (done) {
            var spy = jasmine.createSpy('spy');
            Dom_1.$$(env.root).on(AnalyticsEvents_1.AnalyticsEvents.searchEvent, spy);
            client.logSearchEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.searchboxSubmit, {});
            Simulate_1.Simulate.query(env, {
                query: {
                    q: 'the query 1'
                },
                promise: new Promise(function (resolve, reject) {
                    resolve(Fake_1.FakeResults.createFakeResults(3));
                })
            });
            _.defer(function () {
                expect(spy).toHaveBeenCalled();
                done();
            });
        });
        it('should trigger an analytics ready event on search event', function (done) {
            var spy = jasmine.createSpy('spy');
            Dom_1.$$(env.root).on(AnalyticsEvents_1.AnalyticsEvents.analyticsEventReady, spy);
            client.logSearchEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.searchboxSubmit, {});
            Simulate_1.Simulate.query(env, {
                query: {
                    q: 'the query 1'
                },
                promise: new Promise(function (resolve, reject) {
                    resolve(Fake_1.FakeResults.createFakeResults(3));
                })
            });
            _.defer(function () {
                expect(spy).toHaveBeenCalled();
                done();
            });
        });
        describe('with custom event', function () {
            var customEventSpy;
            var analyticsEventReadySpy;
            beforeEach(function () {
                customEventSpy = jasmine.createSpy('customEventSpy');
                analyticsEventReadySpy = jasmine.createSpy('analyticsEventReadySpy');
                Dom_1.$$(env.root).on(AnalyticsEvents_1.AnalyticsEvents.customEvent, customEventSpy);
                Dom_1.$$(env.root).on(AnalyticsEvents_1.AnalyticsEvents.analyticsEventReady, analyticsEventReadySpy);
            });
            it('should trigger an analytics event on custom event', function () {
                client.logCustomEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.documentOpen, {}, document.createElement('div'));
                Defer_1.Defer.flush();
                expect(customEventSpy).toHaveBeenCalled();
            });
            it('should trigger an analytics ready event on custom event', function () {
                client.logCustomEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.documentOpen, {}, document.createElement('div'));
                Defer_1.Defer.flush();
                expect(analyticsEventReadySpy).toHaveBeenCalled();
            });
            it('should include searchQueryUid', function (done) {
                Simulate_1.Simulate.query(env, { promise: promise });
                env.queryController.getLastResults = function () { return results; };
                _.defer(function () {
                    client.logCustomEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.documentOpen, {}, document.createElement('div'));
                    expect(endpoint.sendCustomEvent).toHaveBeenCalledWith(jasmine.objectContaining({
                        searchQueryUid: results.searchUid
                    }));
                    done();
                });
            });
        });
        it('should trigger change analytics metadata event', function () {
            var spy = jasmine.createSpy('spy');
            Dom_1.$$(env.root).on(AnalyticsEvents_1.AnalyticsEvents.changeAnalyticsCustomData, spy);
            client.logCustomEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.documentOpen, {}, document.createElement('div'));
            Defer_1.Defer.flush();
            expect(spy).toHaveBeenCalledWith(jasmine.any(Object), jasmine.objectContaining({
                originLevel1: 'default',
                originLevel2: 'default',
                originLevel3: jasmine.any(String),
                language: String['locale'],
                type: 'CustomEvent',
                metaObject: jasmine.any(Object)
            }));
        });
        it("when calling #logCustomEvent without the result argument,\n    it does not add contentIDKey and contentIDValue to the metadata object", function () {
            var spy = jasmine.createSpy('spy');
            Dom_1.$$(env.root).on(AnalyticsEvents_1.AnalyticsEvents.changeAnalyticsCustomData, spy);
            client.logCustomEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.documentOpen, {}, document.createElement('div'));
            var metaData = spy.calls.mostRecent().args[1].metaObject;
            var metaDataKeys = Object.keys(metaData);
            expect(metaDataKeys).not.toContain('contentIDKey');
            expect(metaDataKeys).not.toContain('contentIDValue');
        });
        it("when specifying a result having a #permanentid as an argument for #logCustomEvent,\n    it adds contentIDKey and contentIDValue properties to the metadata object", function () {
            var spy = jasmine.createSpy('spy');
            Dom_1.$$(env.root).on(AnalyticsEvents_1.AnalyticsEvents.changeAnalyticsCustomData, spy);
            var id = {
                key: 'permanentid',
                value: '123'
            };
            var result = Fake_1.FakeResults.createFakeResult();
            result[id.key] = id.value;
            client.logCustomEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.documentOpen, {}, document.createElement('div'), result);
            var metaData = spy.calls.mostRecent().args[1].metaObject;
            expect(metaData.contentIDKey).toBe(id.key);
            expect(metaData.contentIDValue).toBe(id.value);
        });
        it("when specifying contentIDKey and contentIDValue for #logCustomEvent, it should keep them in the metadata object", function () {
            var spy = jasmine.createSpy('spy');
            Dom_1.$$(env.root).on(AnalyticsEvents_1.AnalyticsEvents.changeAnalyticsCustomData, spy);
            var customData = {
                contentIDKey: 'groupid',
                contentIDValue: 'my-id-abc-123'
            };
            var result = Fake_1.FakeResults.createFakeResult();
            client.logCustomEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.documentOpen, customData, document.createElement('div'), result);
            var metaData = spy.calls.mostRecent().args[1].metaObject;
            expect(metaData.contentIDKey).toBe('groupid');
            expect(metaData.contentIDValue).toBe('my-id-abc-123');
        });
        it("when specifying contentIDKey only for #logCustomEvent, it should update with urihash in the metadata object", function () {
            var spy = jasmine.createSpy('spy');
            Dom_1.$$(env.root).on(AnalyticsEvents_1.AnalyticsEvents.changeAnalyticsCustomData, spy);
            var customData = {
                contentIDKey: 'groupid'
            };
            var result = Fake_1.FakeResults.createFakeResult();
            client.logCustomEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.documentOpen, customData, document.createElement('div'), result);
            var metaData = spy.calls.mostRecent().args[1].metaObject;
            expect(metaData.contentIDKey).toBe('urihash');
            expect(metaData.contentIDValue).toBe(result.raw.urihash);
        });
        it("when specifying contentIDValue only for #logCustomEvent, it should update with urihash in the metadata object", function () {
            var spy = jasmine.createSpy('spy');
            Dom_1.$$(env.root).on(AnalyticsEvents_1.AnalyticsEvents.changeAnalyticsCustomData, spy);
            var customData = {
                contentIDValue: 'my-id-abc-123'
            };
            var result = Fake_1.FakeResults.createFakeResult();
            client.logCustomEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.documentOpen, customData, document.createElement('div'), result);
            var metaData = spy.calls.mostRecent().args[1].metaObject;
            expect(metaData.contentIDKey).toBe('urihash');
            expect(metaData.contentIDValue).toBe(result.raw.urihash);
        });
        describe('with click event', function () {
            var spy;
            var fakeResult;
            beforeEach(function () {
                spy = jasmine.createSpy('spy');
                Dom_1.$$(env.root).on(AnalyticsEvents_1.AnalyticsEvents.changeAnalyticsCustomData, spy);
                fakeResult = Fake_1.FakeResults.createFakeResult();
            });
            afterEach(function () {
                spy = null;
                fakeResult = null;
            });
            it('should send the result data on click event', function () {
                client.logClickEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.documentQuickview, {}, fakeResult, document.createElement('div'));
                Defer_1.Defer.flush();
                expect(spy).toHaveBeenCalledWith(jasmine.any(Object), jasmine.objectContaining({
                    originLevel1: 'default',
                    originLevel2: 'default',
                    originLevel3: jasmine.any(String),
                    language: String['locale'],
                    type: 'ClickEvent',
                    metaObject: jasmine.any(Object),
                    resultData: fakeResult
                }));
            });
            it('should send the urihash in metadata on click event', function () {
                fakeResult.raw['urihash'] = '1234567890';
                client.logClickEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.documentQuickview, {}, fakeResult, document.createElement('div'));
                Defer_1.Defer.flush();
                expect(spy).toHaveBeenCalledWith(jasmine.any(Object), jasmine.objectContaining({
                    metaObject: jasmine.objectContaining({ contentIDKey: 'urihash', contentIDValue: '1234567890' })
                }));
            });
            it('should send the permanentid in metadata on click event, with a precedence over the uri hash', function () {
                fakeResult.raw['urihash'] = '1234567890';
                fakeResult.raw['permanentid'] = '0987654321';
                client.logClickEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.documentQuickview, {}, fakeResult, document.createElement('div'));
                Defer_1.Defer.flush();
                expect(spy).toHaveBeenCalledWith(jasmine.any(Object), jasmine.objectContaining({
                    metaObject: jasmine.objectContaining({ contentIDKey: 'permanentid', contentIDValue: '0987654321' })
                }));
            });
            it('should include searchQueryUid', function (done) {
                client.logClickEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.documentQuickview, {}, fakeResult, document.createElement('div'));
                _.defer(function () {
                    expect(endpoint.sendDocumentViewEvent).toHaveBeenCalledWith(jasmine.objectContaining({
                        searchQueryUid: fakeResult.queryUid
                    }));
                    done();
                });
            });
        });
        describe('search as you type', function () {
            beforeEach(function () {
                jasmine.clock().install();
            });
            afterEach(function () {
                jasmine.clock().uninstall();
            });
            it('should log after 5 seconds have passed since the last duringQueryEvent', function () {
                client.logSearchAsYouType(AnalyticsActionListMeta_1.analyticsActionCauseList.searchboxSubmit, {});
                Simulate_1.Simulate.query(env, {
                    query: {
                        q: 'the query 1'
                    },
                    promise: promise
                });
                jasmine.clock().tick(5);
                expect(client['pendingSearchAsYouTypeSearchEvent']['searchPromises'].length).toBe(0);
                jasmine.clock().tick(5000);
                expect(client['pendingSearchAsYouTypeSearchEvent']['searchPromises'].length).toBe(1);
            });
            it("should not log after 5 seconds have passed since the last duringQueryEvent if another event is pushed and it's a search box", function () {
                client.logSearchAsYouType(AnalyticsActionListMeta_1.analyticsActionCauseList.searchboxSubmit, {});
                Simulate_1.Simulate.query(env, {
                    query: {
                        q: 'the query 1'
                    },
                    promise: promise
                });
                jasmine.clock().tick(5);
                expect(client['pendingSearchAsYouTypeSearchEvent']).toBeDefined();
                client.logSearchEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.searchboxSubmit, {});
                Simulate_1.Simulate.query(env, {
                    query: {
                        q: 'the query 1'
                    },
                    promise: promise
                });
                expect(client['pendingSearchAsYouTypeSearchEvent']).toBeUndefined();
            });
            it("should log after 5 seconds have passed since the last duringQueryEvent if another event is pushed and it's not a search box", function () {
                client.logSearchAsYouType(AnalyticsActionListMeta_1.analyticsActionCauseList.searchboxSubmit, {});
                Simulate_1.Simulate.query(env, {
                    query: {
                        q: 'the query 1'
                    },
                    promise: promise
                });
                jasmine.clock().tick(5);
                expect(client['pendingSearchAsYouTypeSearchEvent']).toBeDefined();
                client.logSearchEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.facetClearAll, {});
                Simulate_1.Simulate.query(env, {
                    query: {
                        q: 'the query 1'
                    },
                    promise: promise
                });
                expect(client['pendingSearchAsYouTypeSearchEvent']).toBeDefined();
            });
        });
    });
}
exports.LiveAnalyticsClientTest = LiveAnalyticsClientTest;
 
 
/***/ }),
/* 1634 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Mock = __webpack_require__(2);
var Matrix_1 = __webpack_require__(794);
var Fake_1 = __webpack_require__(11);
var Simulate_1 = __webpack_require__(15);
var Dom_1 = __webpack_require__(0);
var Globalize = __webpack_require__(28);
var _ = __webpack_require__(1);
function MatrixTest() {
    describe('Matrix', function () {
        var test;
        beforeEach(function () {
            test = Mock.optionsComponentSetup(Matrix_1.Matrix, {
                rowField: '@foo',
                columnField: '@bar',
                computedField: '@compute',
                columnFieldValues: _.map(_.range(9), function (n) {
                    return n.toString();
                }),
                maximumNumberOfRows: 10
            });
        });
        afterEach(function () {
            test = null;
        });
        describe('when fully rendered', function () {
            var fakeResults;
            beforeEach(function () {
                fakeResults = Fake_1.FakeResults.createFakeResults(1);
                fakeResults.groupByResults = _.map(_.range(10), function (n) {
                    return Fake_1.FakeResults.createFakeGroupByResult('@foo', 'row', 10, true);
                });
                Simulate_1.Simulate.query(test.env, {
                    results: fakeResults
                });
                test.env.queryStateModel.attributes = {
                    'f:@bar': []
                };
            });
            afterEach(function () {
                fakeResults = null;
            });
            it('should trigger the correct query on cell selection', function () {
                test.cmp.selectCell(5, 5);
                var simulation = Simulate_1.Simulate.query(test.env);
                expect(simulation.queryBuilder.build().aq).toEqual(jasmine.stringMatching('@foo=row5'));
                expect(simulation.queryBuilder.build().aq).toEqual(jasmine.stringMatching('@bar=4'));
            });
            it('should allow to get the cell html element', function () {
                var elem = test.cmp.getCellElement(5, 5);
                expect(Dom_1.$$(elem).text()).toBe(Globalize.format(fakeResults.groupByResults[0].values[5].computedFieldResults[0], 'c0'));
            });
            it('should allow to get the cell value', function () {
                var value = test.cmp.getCellValue(5, 5);
                expect(value).toBe(Globalize.format(fakeResults.groupByResults[0].values[5].computedFieldResults[0], 'c0'));
            });
        });
        describe('exposes options', function () {
            it('title will display a title on top of matrix', function () {
                test = Mock.optionsComponentSetup(Matrix_1.Matrix, {
                    title: 'nice title',
                    rowField: '@foo',
                    columnField: '@bar',
                    computedField: '@compute'
                });
                var title = Dom_1.$$(test.cmp.element).find('.coveo-matrix-title');
                expect(Dom_1.$$(title).text()).toBe('nice title');
            });
            it('rowField should output a group by request', function () {
                test = Mock.optionsComponentSetup(Matrix_1.Matrix, {
                    rowField: '@foo',
                    columnField: '@bar',
                    computedField: '@compute'
                });
                var simulation = Simulate_1.Simulate.query(test.env);
                expect(simulation.queryBuilder.build().groupBy).toEqual(jasmine.arrayContaining([
                    jasmine.objectContaining({
                        field: '@foo'
                    })
                ]));
            });
            it('columnField and columnFieldValues operate together to output a group by request', function () {
                test = Mock.optionsComponentSetup(Matrix_1.Matrix, {
                    rowField: '@foo',
                    columnField: '@bar',
                    columnFieldValues: ['a', 'b', 'c'],
                    computedField: '@compute'
                });
                var simulation = Simulate_1.Simulate.query(test.env);
                expect(simulation.queryBuilder.build().groupBy).toEqual(jasmine.arrayContaining([
                    jasmine.objectContaining({
                        field: '@foo',
                        queryOverride: jasmine.stringMatching("@bar='a'")
                    }),
                    jasmine.objectContaining({
                        field: '@foo',
                        queryOverride: jasmine.stringMatching("@bar='b'")
                    }),
                    jasmine.objectContaining({
                        field: '@foo',
                        queryOverride: jasmine.stringMatching("@bar='c'")
                    })
                ]));
            });
            it('columnLabels should allow to set the column titles', function () {
                test = Mock.optionsComponentSetup(Matrix_1.Matrix, {
                    rowField: '@foo',
                    columnField: '@bar',
                    computedField: '@compute',
                    columnLabels: ['qwerty', 'asdfg', 'zxcvb'],
                    columnFieldValues: ['a', 'b', 'c']
                });
                Simulate_1.Simulate.query(test.env);
                var cellsValue = _.map(test.cmp.data[0], function (c) {
                    return c.getValue();
                });
                expect(cellsValue).toEqual(jasmine.arrayContaining(['qwerty', 'asdfg', 'zxcvb']));
            });
            it('columnLabels will fallback on columnFieldValues if there is inconsistency (not same length for example)', function () {
                test = Mock.optionsComponentSetup(Matrix_1.Matrix, {
                    rowField: '@foo',
                    columnField: '@bar',
                    computedField: '@compute',
                    columnLabels: ['qwerty'],
                    columnFieldValues: ['a', 'b', 'c']
                });
                Simulate_1.Simulate.query(test.env);
                var cellsValues = _.map(test.cmp.data[0], function (c) {
                    return c.getValue();
                });
                expect(cellsValues).toEqual(jasmine.arrayContaining(['a', 'b', 'c']));
            });
            it('columnHeader allow to specify the first column header', function () {
                test = Mock.optionsComponentSetup(Matrix_1.Matrix, {
                    rowField: '@foo',
                    columnField: '@bar',
                    computedField: '@compute',
                    columnHeader: 'this is a nice header'
                });
                Simulate_1.Simulate.query(test.env);
                expect(test.cmp.getCellValue(0, 0)).toBe('this is a nice header');
            });
            it('maximumNumberOfValuesInGroupBy should allow to specify the number of value in the group by', function () {
                test = Mock.optionsComponentSetup(Matrix_1.Matrix, {
                    rowField: '@foo',
                    columnField: '@bar',
                    computedField: '@compute',
                    columnFieldValues: ['a', 'b', 'c'],
                    maximumNumberOfValuesInGroupBy: 123
                });
                var simulation = Simulate_1.Simulate.query(test.env);
                expect(simulation.queryBuilder.build().groupBy).toEqual(jasmine.arrayContaining([
                    jasmine.objectContaining({
                        maximumNumberOfValues: 123
                    })
                ]));
            });
            it('enableColumnTotals should allow to specify if a column should contal the total', function () {
                test = Mock.optionsComponentSetup(Matrix_1.Matrix, {
                    rowField: '@foo',
                    columnField: '@bar',
                    computedField: '@compute',
                    enableColumnTotals: false
                });
                Simulate_1.Simulate.query(test.env);
                expect(test.cmp.getCellValue(test.cmp.data.length - 1, 0)).not.toBe('Total');
                test = Mock.optionsComponentSetup(Matrix_1.Matrix, {
                    rowField: '@foo',
                    columnField: '@bar',
                    computedField: '@compute',
                    enableColumnTotals: true
                });
                Simulate_1.Simulate.query(test.env);
                expect(test.cmp.getCellValue(test.cmp.data.length - 1, 0)).toBe('Total');
            });
            it('computedField should allow to specify the computed field in the group by', function () {
                test = Mock.optionsComponentSetup(Matrix_1.Matrix, {
                    rowField: '@foo',
                    columnField: '@bar',
                    computedField: '@compute'
                });
                var simulation = Simulate_1.Simulate.query(test.env);
                expect(simulation.queryBuilder.build().groupBy).toEqual(jasmine.arrayContaining([
                    jasmine.objectContaining({
                        computedFields: jasmine.arrayContaining([
                            jasmine.objectContaining({
                                field: '@compute'
                            })
                        ])
                    })
                ]));
            });
            it('computedFieldOperation should allow to specify the computed field operation', function () {
                test = Mock.optionsComponentSetup(Matrix_1.Matrix, {
                    rowField: '@foo',
                    columnField: '@bar',
                    computedField: '@compute',
                    computedFieldOperation: 'qwerty'
                });
                var simulation = Simulate_1.Simulate.query(test.env);
                expect(simulation.queryBuilder.build().groupBy).toEqual(jasmine.arrayContaining([
                    jasmine.objectContaining({
                        computedFields: jasmine.arrayContaining([
                            jasmine.objectContaining({
                                operation: 'qwerty'
                            })
                        ])
                    })
                ]));
            });
        });
    });
}
exports.MatrixTest = MatrixTest;
 
 
/***/ }),
/* 1635 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { Iif (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        Iif (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            Iif (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
            Iif (y = 0, t) op = [0, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    Eif (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        Iif (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
Object.defineProperty(exports, "__esModule", { value: true });
var Core_1 = __webpack_require__(9);
var InitializationEvents_1 = __webpack_require__(22);
var Strings_1 = __webpack_require__(4);
var AnalyticsActionListMeta_1 = __webpack_require__(7);
var Omnibox_1 = __webpack_require__(196);
var Dom_1 = __webpack_require__(0);
var Mock = __webpack_require__(2);
var Simulate_1 = __webpack_require__(15);
var QuerySuggestPreviewTest_1 = __webpack_require__(866);
function OmniboxTest() {
    var _this = this;
    describe('Omnibox', function () {
        var test;
        var testEnv;
        var omniboxAnalytics;
        beforeEach(function () {
            // Thanks phantom js for bad native event support
            Iif (Simulate_1.Simulate.isPhantomJs()) {
                Simulate_1.Simulate.addJQuery();
            }
            setupEnv();
            test = Mock.advancedComponentSetup(Omnibox_1.Omnibox, new Mock.AdvancedComponentSetupOptions(null, {}, function (env) { return testEnv; }));
            Dom_1.$$(test.env.root).trigger(InitializationEvents_1.InitializationEvents.afterComponentsInitialization);
        });
        afterEach(function () {
            test = null;
            Simulate_1.Simulate.removeJQuery();
        });
        function setupEnv() {
            testEnv = new Mock.MockEnvironmentBuilder();
            omniboxAnalytics = QuerySuggestPreviewTest_1.initOmniboxAnalyticsMock(omniboxAnalytics);
            testEnv.searchInterface.getOmniboxAnalytics = jasmine.createSpy('omniboxAnalytics').and.returnValue(omniboxAnalytics);
        }
        function initOmnibox(options) {
            setupEnv();
            test = Mock.advancedComponentSetup(Omnibox_1.Omnibox, new Mock.AdvancedComponentSetupOptions(Dom_1.$$('div').el, options, function (env) {
                return testEnv;
            }));
        }
        describe('when the omnibox launches populateOmniboxSuggestions events', function () {
            it('it triggers the event from the component element as well as root element if the omnibox is not a descendant of its root', function (done) { return __awaiter(_this, void 0, void 0, function () {
                var fakeRoot, spy;
                return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0:
                            fakeRoot = document.createElement('div');
                            test.cmp.root = fakeRoot;
                            spy = jasmine.createSpy('spy');
                            Dom_1.$$(fakeRoot).on(Core_1.OmniboxEvents.populateOmniboxSuggestions, spy);
                            Dom_1.$$(test.cmp.element).on(Core_1.OmniboxEvents.populateOmniboxSuggestions, spy);
                            return [4 /*yield*/, test.cmp.magicBox.getSuggestions()];
                        case 1:
                            _a.sent();
                            expect(spy).toHaveBeenCalledTimes(2);
                            done();
                            return [2 /*return*/];
                    }
                });
            }); });
            it('it triggers the event only once if the element is a descendant of its root', function (done) { return __awaiter(_this, void 0, void 0, function () {
                var fakeRoot, spy;
                return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0:
                            fakeRoot = document.createElement('div');
                            test.cmp.root = fakeRoot;
                            fakeRoot.appendChild(test.cmp.element);
                            spy = jasmine.createSpy('spy');
                            Dom_1.$$(fakeRoot).on(Core_1.OmniboxEvents.populateOmniboxSuggestions, spy);
                            return [4 /*yield*/, test.cmp.magicBox.getSuggestions()];
                        case 1:
                            _a.sent();
                            expect(spy).toHaveBeenCalledTimes(1);
                            done();
                            return [2 /*return*/];
                    }
                });
            }); });
        });
        describe('when the omnibox launches omniboxPreprocessResultForQuery events', function () {
            it('it triggers the event from the component element as well as root element if the omnibox is not a descendant of its root', function () {
                var fakeRoot = document.createElement('div');
                test.cmp.root = fakeRoot;
                var spy = jasmine.createSpy('spy');
                Dom_1.$$(fakeRoot).on(Core_1.OmniboxEvents.omniboxPreprocessResultForQuery, spy);
                Dom_1.$$(test.cmp.element).on(Core_1.OmniboxEvents.omniboxPreprocessResultForQuery, spy);
                Simulate_1.Simulate.query(test.env);
                expect(spy).toHaveBeenCalledTimes(2);
            });
            it('it triggers the event only once if the element is a descendant of its root', function () {
                var fakeRoot = document.createElement('div');
                test.cmp.root = fakeRoot;
                fakeRoot.appendChild(test.cmp.element);
                var spy = jasmine.createSpy('spy');
                Dom_1.$$(fakeRoot).on(Core_1.OmniboxEvents.omniboxPreprocessResultForQuery, spy);
                Simulate_1.Simulate.query(test.env);
                expect(spy).toHaveBeenCalledTimes(1);
            });
        });
        describe('on submit', function () {
            beforeEach(function () { return test.cmp.submit(); });
            it('should trigger a query', function () {
                expect(test.env.queryController.executeQuery).toHaveBeenCalled();
            });
            it("the query #cancel arg is set to 'false'", function () {
                expect(test.env.queryController.executeQuery).toHaveBeenCalledWith(jasmine.objectContaining({ cancel: false }));
            });
            it('should log analytics event', function () {
                expect(test.env.usageAnalytics.logSearchEvent).toHaveBeenCalledWith(AnalyticsActionListMeta_1.analyticsActionCauseList.searchboxSubmit, {});
            });
        });
        describe("when the magicbox text is equal to the #lastQuery property,\n    when calling #submit a second time", function () {
            beforeEach(function () {
                test.cmp.submit();
                test.cmp.submit();
            });
            it('triggers a query', function () {
                expect(test.env.queryController.executeQuery).toHaveBeenCalledTimes(2);
            });
            it('should not log a second analytics event', function () {
                expect(test.env.usageAnalytics.logSearchEvent).toHaveBeenCalledTimes(1);
            });
            it("the query #cancel arg is set to 'true'", function () {
                var executeQuery = test.env.queryController.executeQuery;
                var lastQuery = executeQuery.calls.mostRecent().args[0];
                expect(lastQuery.cancel).toBe(true);
            });
        });
        describe('exposes options', function () {
            it('inline should be passed down to magic box', function () {
                initOmnibox({
                    inline: true
                });
                expect(test.cmp.magicBox.options.inline).toBe(true);
                initOmnibox({
                    inline: false
                });
                expect(test.cmp.magicBox.options.inline).toBe(false);
            });
            it('enableSearchAsYouType should allow to to trigger a query after a delay', function (done) {
                initOmnibox({
                    enableSearchAsYouType: true,
                    enableQuerySuggestAddon: false
                });
                expect(test.cmp.magicBox.onchange).toBeDefined();
                test.cmp.setText('foobar');
                test.cmp.magicBox.onchange();
                setTimeout(function () {
                    expect(test.env.queryController.executeQuery).toHaveBeenCalled();
                    done();
                }, test.cmp.options.searchAsYouTypeDelay);
            });
            it('enableQuerySyntax to false should add the correct class on the element', function () {
                initOmnibox({
                    enableQuerySyntax: false
                });
                expect(Dom_1.$$(test.cmp.element).hasClass('coveo-query-syntax-disabled')).toBeTruthy();
            });
            it('enableQuerySyntax should modify the enableQuerySyntax parameter', function () {
                initOmnibox({
                    enableQuerySyntax: false
                });
                test.cmp.setText('@field==Batman');
                var simulation = Simulate_1.Simulate.query(test.env);
                expect(simulation.queryBuilder.enableQuerySyntax).toBe(false);
                initOmnibox({
                    enableQuerySyntax: true
                });
                test.cmp.setText('@field==Batman');
                simulation = Simulate_1.Simulate.query(test.env);
                expect(simulation.queryBuilder.enableQuerySyntax).toBe(true);
            });
            it('enablePartialMatch should modify the enablePartialMatch parameters', function () {
                initOmnibox({
                    enablePartialMatch: false
                });
                test.cmp.setText('@field==Batman');
                var simulation = Simulate_1.Simulate.query(test.env);
                expect(simulation.queryBuilder.enablePartialMatch).toBeFalsy();
                initOmnibox({
                    enablePartialMatch: true
                });
                test.cmp.setText('@field==Batman');
                simulation = Simulate_1.Simulate.query(test.env);
                expect(simulation.queryBuilder.enablePartialMatch).toBe(true);
            });
            it('partialMatchKeywords should modify the query builder', function () {
                initOmnibox({
                    partialMatchKeywords: 123,
                    enablePartialMatch: true
                });
                test.cmp.setText('@field==Batman');
                var simulation = Simulate_1.Simulate.query(test.env);
                expect(simulation.queryBuilder.partialMatchKeywords).toBe(123);
            });
            it('partialMatchThreshold should modify the query builder', function () {
                initOmnibox({
                    partialMatchThreshold: '14%',
                    enablePartialMatch: true
                });
                test.cmp.setText('@field==Batman');
                var simulation = Simulate_1.Simulate.query(test.env);
                expect(simulation.queryBuilder.partialMatchThreshold).toBe('14%');
            });
            it('enableWildcards should modify the query builder', function () {
                initOmnibox({
                    enableWildcards: true
                });
                test.cmp.setText('@field==Batman');
                var simulation = Simulate_1.Simulate.query(test.env);
                expect(simulation.queryBuilder.enableWildcards).toBe(true);
            });
            it('enableQuestionMarks should modify the query builder', function () {
                initOmnibox({
                    enableQuestionMarks: true
                });
                test.cmp.setText('@field==Batman');
                var simulation = Simulate_1.Simulate.query(test.env);
                expect(simulation.queryBuilder.enableQuestionMarks).toBe(true);
            });
            it('enableQuestionMarks should modify the query builder', function () {
                initOmnibox({
                    enableLowercaseOperators: true
                });
                test.cmp.setText('@field==Batman');
                var simulation = Simulate_1.Simulate.query(test.env);
                expect(simulation.queryBuilder.enableLowercaseOperators).toBe(true);
            });
            it('enableFieldAddon should create an addon component', function () {
                initOmnibox({
                    enableFieldAddon: true
                });
                test.cmp.setText('this is not a field');
                test.cmp.magicBox.getSuggestions();
                expect(test.env.searchEndpoint.listFields).not.toHaveBeenCalled();
                test.cmp.setText('@thisisafield');
                test.cmp.magicBox.getSuggestions();
                expect(test.env.searchEndpoint.listFields).toHaveBeenCalled();
                test.cmp.setText('@thisisafield=');
                test.cmp.magicBox.getSuggestions();
                expect(test.env.searchEndpoint.listFieldValues).toHaveBeenCalled();
            });
            it('minCharForSuggestions should be set', function () {
                initOmnibox({
                    querySuggestCharacterThreshold: 5
                });
                expect(test.cmp.options.querySuggestCharacterThreshold).toBe(5);
            });
            describe('with field returned by the API', function () {
                var buildFieldDescription = function (fields) {
                    var fieldsDescription = [];
                    fields.forEach(function (field) {
                        fieldsDescription.push({
                            name: field,
                            includeInQuery: true,
                            groupByField: true
                        });
                    });
                    return fieldsDescription;
                };
                it('enableFieldAddon should filter fields suggestions with the listOfFields option', function (done) { return __awaiter(_this, void 0, void 0, function () {
                    var fieldsDescription, suggestions, fieldAddonSuggestion;
                    return __generator(this, function (_a) {
                        switch (_a.label) {
                            case 0:
                                initOmnibox({
                                    enableFieldAddon: true,
                                    listOfFields: ['@secondFieldName']
                                });
                                test.cmp.setText('@');
                                fieldsDescription = buildFieldDescription(['@firstFieldName', '@secondFieldName']);
                                test.env.searchEndpoint.listFields = function () { return Promise.resolve(fieldsDescription); };
                                return [4 /*yield*/, test.cmp.magicBox.getSuggestions()];
                            case 1:
                                suggestions = _a.sent();
                                return [4 /*yield*/, suggestions[1]];
                            case 2:
                                fieldAddonSuggestion = _a.sent();
                                expect(fieldAddonSuggestion.length).toEqual(1);
                                expect(fieldAddonSuggestion[0].text).toEqual('@secondFieldName');
                                done();
                                return [2 /*return*/];
                        }
                    });
                }); });
                it('enableFieldAddon should always provide suggestions with field leading with @', function (done) { return __awaiter(_this, void 0, void 0, function () {
                    var fieldsDescription, suggestions, fieldAddonSuggestion;
                    return __generator(this, function (_a) {
                        switch (_a.label) {
                            case 0:
                                initOmnibox({
                                    enableFieldAddon: true
                                });
                                test.cmp.setText('@');
                                fieldsDescription = buildFieldDescription(['@firstFieldName', '@secondFieldName']);
                                test.env.searchEndpoint.listFields = function () { return Promise.resolve(fieldsDescription); };
                                return [4 /*yield*/, test.cmp.magicBox.getSuggestions()];
                            case 1:
                                suggestions = _a.sent();
                                return [4 /*yield*/, suggestions[1]];
                            case 2:
                                fieldAddonSuggestion = _a.sent();
                                expect(fieldAddonSuggestion.length).toEqual(2);
                                expect(fieldAddonSuggestion[0].text).toEqual('@firstFieldName');
                                expect(fieldAddonSuggestion[1].text).toEqual('@secondFieldName');
                                done();
                                return [2 /*return*/];
                        }
                    });
                }); });
            });
            it('listOfFields should show specified fields when field addon is enabled', function (done) {
                initOmnibox({
                    enableFieldAddon: true,
                    listOfFields: ['@field', '@another_field']
                });
                test.cmp.setText('@');
                var fieldSuggestion = test.cmp.magicBox.getSuggestions()[1];
                fieldSuggestion.then(function (fields) {
                    expect(fields[0].text).toEqual('@field');
                    expect(fields[1].text).toEqual('@another_field');
                    done();
                });
            });
            it('enableTopQueryAddon should get suggestion', function () {
                var element = Dom_1.$$('div');
                element.addClass('CoveoOmnibox');
                element.setAttribute('data-enable-top-query-addon', 'true');
                test = Mock.advancedComponentSetup(Omnibox_1.Omnibox, new Mock.AdvancedComponentSetupOptions(element.el, null, function (env) {
                    return testEnv;
                }));
                test.cmp.setText('foobar');
                test.cmp.magicBox.getSuggestions();
                expect(test.env.searchEndpoint.getQuerySuggest).toHaveBeenCalled();
            });
            it('enableQuerySuggestAddon should create an addon component', function () {
                initOmnibox({
                    enableQuerySuggestAddon: true
                });
                test.cmp.setText('foobar');
                test.cmp.magicBox.getSuggestions();
                expect(test.env.searchEndpoint.getQuerySuggest).toHaveBeenCalled();
            });
            it('enableQueryExtensionAddon should create an addon component', function () {
                initOmnibox({
                    enableQueryExtensionAddon: true
                });
                test.cmp.setText('$');
                test.cmp.magicBox.getSuggestions();
                expect(test.env.searchEndpoint.extensions).toHaveBeenCalled();
            });
            it('placeholder allow to set a placeholder in the input', function () {
                initOmnibox({
                    placeholder: 'trololo'
                });
                expect(test.cmp.getInput().placeholder).toBe('trololo');
            });
            it('placeholder should use translated version', function () {
                initOmnibox({
                    placeholder: 'SearchFor'
                });
                expect(test.cmp.getInput().placeholder).toBe(Strings_1.l('SearchFor'));
            });
            it('enableSearchAsYouType + enableQuerySuggestAddon should send correct analytics events', function () {
                initOmnibox({
                    enableQuerySuggestAddon: true,
                    enableSearchAsYouType: true
                });
                var spy = jasmine.createSpy('spy');
                test.env.searchEndpoint.getQuerySuggest = spy;
                spy.and.returnValue({
                    completions: [
                        {
                            expression: 'a'
                        },
                        {
                            expression: 'b'
                        },
                        {
                            expression: 'c'
                        },
                        {
                            expression: 'd'
                        },
                        {
                            expression: 'e'
                        }
                    ]
                });
                test.cmp.setText('foobar');
                expect(test.cmp.magicBox.onchange).toBeDefined();
                test.cmp.magicBox.onchange();
                test.cmp.magicBox.onselect(['a']);
                expect(test.env.usageAnalytics.logSearchEvent).toHaveBeenCalledWith(AnalyticsActionListMeta_1.analyticsActionCauseList.omniboxAnalytics, jasmine.objectContaining({
                    partialQuery: undefined,
                    suggestionRanking: jasmine.any(Number),
                    partialQueries: ''
                }));
            });
            it('triggerQueryOnClear should trigger a query on clear', function () {
                initOmnibox({
                    triggerQueryOnClear: true
                });
                test.cmp.magicBox.clear();
                expect(test.cmp.queryController.executeQuery).toHaveBeenCalled();
            });
            it('triggerQueryOnClear should not trigger a query on clear if false', function () {
                initOmnibox({
                    triggerQueryOnClear: false
                });
                test.cmp.magicBox.clear();
                expect(test.cmp.queryController.executeQuery).not.toHaveBeenCalled();
            });
            it('triggerQueryOnClear should be forced to false if the search interface is configured to not allowQueriesWithoutKeywords', function () {
                var advancedSetup = new Mock.AdvancedComponentSetupOptions(null, {
                    triggerQueryOnClear: true
                }, function (env) {
                    testEnv.searchInterface.options.allowQueriesWithoutKeywords = false;
                    return testEnv;
                });
                test = Mock.advancedComponentSetup(Omnibox_1.Omnibox, advancedSetup);
                expect(test.cmp.options.triggerQueryOnClear).toBe(false);
            });
            it('triggerQueryOnClear should be forced to true if configured with search as you type and the search interface allows queries without keywords', function () {
                var advancedSetup = new Mock.AdvancedComponentSetupOptions(null, {
                    triggerQueryOnClear: false,
                    enableSearchAsYouType: true
                }, function (env) {
                    testEnv.searchInterface.options.allowQueriesWithoutKeywords = true;
                    return testEnv;
                });
                test = Mock.advancedComponentSetup(Omnibox_1.Omnibox, advancedSetup);
                expect(test.cmp.options.triggerQueryOnClear).toBe(true);
            });
        });
        it('should execute query automatically when confidence level is > 0.8 on suggestion', function (done) {
            initOmnibox({
                enableSearchAsYouType: true,
                enableQuerySuggestAddon: true
            });
            test.cmp.setText('foobar');
            expect(test.cmp.magicBox.onSuggestions).toBeDefined();
            test.cmp.magicBox.onSuggestions([
                {
                    executableConfidence: 1,
                    text: 'foobar'
                }
            ]);
            setTimeout(function () {
                expect(test.cmp.queryController.executeQuery).toHaveBeenCalled();
                done();
            }, test.cmp.options.searchAsYouTypeDelay);
        });
        it('should execute query automatically when confidence level is = 0.8 on suggestion', function (done) {
            initOmnibox({
                enableSearchAsYouType: true,
                enableQuerySuggestAddon: true
            });
            test.cmp.setText('foobar');
            expect(test.cmp.magicBox.onSuggestions).toBeDefined();
            test.cmp.magicBox.onSuggestions([
                {
                    executableConfidence: 0.8,
                    text: 'foobar'
                }
            ]);
            setTimeout(function () {
                expect(test.cmp.queryController.executeQuery).toHaveBeenCalled();
                done();
            }, test.cmp.options.searchAsYouTypeDelay);
        });
        it('should not execute query automatically when confidence level is < 0.8 on suggestion', function (done) {
            initOmnibox({
                enableSearchAsYouType: true,
                enableQuerySuggestAddon: true
            });
            test.cmp.setText('foobar');
            expect(test.cmp.magicBox.onSuggestions).toBeDefined();
            test.cmp.magicBox.onSuggestions([
                {
                    executableConfidence: 0.7,
                    text: 'foobar'
                }
            ]);
            setTimeout(function () {
                expect(test.cmp.queryController.executeQuery).not.toHaveBeenCalled();
                done();
            }, test.cmp.options.searchAsYouTypeDelay);
        });
        it('should execute query automatically when confidence level is not provided and the suggestion does not match the typed text', function (done) {
            initOmnibox({
                enableSearchAsYouType: true,
                enableQuerySuggestAddon: true
            });
            test.cmp.setText('baz');
            expect(test.cmp.magicBox.onSuggestions).toBeDefined();
            test.cmp.magicBox.onSuggestions([
                {
                    text: 'foobar'
                }
            ]);
            setTimeout(function () {
                expect(test.cmp.queryController.executeQuery).not.toHaveBeenCalled();
                done();
            }, test.cmp.options.searchAsYouTypeDelay);
        });
        it('should not execute query automatically when confidence level is not provided but the suggestion match the typed text', function (done) {
            initOmnibox({
                enableSearchAsYouType: true,
                enableQuerySuggestAddon: true
            });
            test.cmp.setText('foo');
            expect(test.cmp.magicBox.onSuggestions).toBeDefined();
            test.cmp.magicBox.onSuggestions([
                {
                    text: 'foobar'
                }
            ]);
            setTimeout(function () {
                expect(test.cmp.queryController.executeQuery).toHaveBeenCalled();
                done();
            }, test.cmp.options.searchAsYouTypeDelay);
        });
        describe('with live query state model', function () {
            beforeEach(function () {
                test = Mock.advancedComponentSetup(Omnibox_1.Omnibox, new Mock.AdvancedComponentSetupOptions(undefined, undefined, function (builder) {
                    return testEnv.withLiveQueryStateModel();
                }));
            });
            afterEach(function () {
                test = null;
            });
            it('should update the state on building query', function () {
                test.cmp.setText('foobar');
                Simulate_1.Simulate.query(test.env);
                expect(test.env.queryStateModel.get('q')).toBe('foobar');
            });
            it('should update the content on state change', function () {
                test.env.queryStateModel.set('q', 'trololo');
                expect(test.cmp.getText()).toEqual('trololo');
            });
            it('should execute tabpress on keydown', function () {
                spyOn(test.cmp.magicBox, 'ontabpress');
                Simulate_1.Simulate.keyDown(test.cmp.getInput(), Core_1.KEYBOARD.TAB);
                expect(test.cmp.magicBox.ontabpress).toHaveBeenCalled();
            });
            it('should not execute tabpress on keyup', function () {
                spyOn(test.cmp.magicBox, 'ontabpress');
                Simulate_1.Simulate.keyUp(test.cmp.getInput(), Core_1.KEYBOARD.TAB);
                expect(test.cmp.magicBox.ontabpress).not.toHaveBeenCalled();
            });
        });
        describe('when the querySuggestCharacterThreshold option is set to a value', function () {
            var querySuggestSuccessSpy;
            beforeEach(function () {
                test.cmp.options.querySuggestCharacterThreshold = 3;
                querySuggestSuccessSpy = jasmine.createSpy('querySuggestSuccesSpy');
                Dom_1.$$(test.env.root).on(Core_1.OmniboxEvents.populateOmniboxSuggestions, function () { return querySuggestSuccessSpy(); });
            });
            it('inferior to the text in the magic box, we should not trigger the event to populate suggestion', function (done) { return __awaiter(_this, void 0, void 0, function () {
                return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0:
                            test.cmp.setText('f');
                            return [4 /*yield*/, test.cmp.magicBox.getSuggestions()];
                        case 1:
                            _a.sent();
                            expect(querySuggestSuccessSpy).not.toHaveBeenCalled();
                            done();
                            return [2 /*return*/];
                    }
                });
            }); });
            it('equal to the text in the magic box, we should trigger the event to populate suggestion', function (done) { return __awaiter(_this, void 0, void 0, function () {
                return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0:
                            test.cmp.setText('foo');
                            return [4 /*yield*/, test.cmp.magicBox.getSuggestions()];
                        case 1:
                            _a.sent();
                            expect(querySuggestSuccessSpy).toHaveBeenCalled();
                            done();
                            return [2 /*return*/];
                    }
                });
            }); });
            it('superior to the text in the magic box, we should trigger the event to populate suggestion', function (done) { return __awaiter(_this, void 0, void 0, function () {
                return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0:
                            test.cmp.setText('foobar');
                            return [4 /*yield*/, test.cmp.magicBox.getSuggestions()];
                        case 1:
                            _a.sent();
                            expect(querySuggestSuccessSpy).toHaveBeenCalled();
                            done();
                            return [2 /*return*/];
                    }
                });
            }); });
        });
        describe('when handling "newQuery" event', function () {
            var breadcrumbClearSpy;
            beforeEach(function () {
                breadcrumbClearSpy = jasmine.createSpy('clearBreadcrumb');
                Dom_1.$$(test.env.root).on(Core_1.BreadcrumbEvents.clearBreadcrumb, breadcrumbClearSpy);
                setupForClearingFiltersOnNewQuery();
            });
            function setupForClearingFiltersOnNewQuery() {
                test.cmp.options.clearFiltersOnNewQuery = true;
                test.cmp.queryController.firstQuery = false;
                test.cmp.queryController.getLastQuery = function () { return ({ q: 'old query' }); };
                test.cmp.setText('new query');
            }
            describe("when clearFiltersOnNewQuery is true\n        when it is not the first query\n        when the new query is different from the previous one", function () {
                it("when the origin is a valid component (Omnibox)\n          should clear breadcrumbs", function () {
                    Dom_1.$$(test.env.root).trigger(Core_1.QueryEvents.newQuery, { origin: test.cmp });
                    expect(breadcrumbClearSpy).toHaveBeenCalled();
                });
                it("when the origin is a valid component (SearchButton)\n          should clear breadcrumbs", function () {
                    Dom_1.$$(test.env.root).trigger(Core_1.QueryEvents.newQuery, { origin: { type: 'SearchButton' } });
                    expect(breadcrumbClearSpy).toHaveBeenCalled();
                });
                it("when the origin is not a valid component (Facet)\n          should not clear breadcrumbs", function () {
                    Dom_1.$$(test.env.root).trigger(Core_1.QueryEvents.newQuery, { origin: { type: 'Facet' } });
                    expect(breadcrumbClearSpy).not.toHaveBeenCalled();
                });
                it("when the origin is not defined\n          should not clear breadcrumbs", function () {
                    Dom_1.$$(test.env.root).trigger(Core_1.QueryEvents.newQuery);
                    expect(breadcrumbClearSpy).not.toHaveBeenCalled();
                });
            });
            it("when clearFiltersOnNewQuery is false\n        should not clear breadcrumbs", function () {
                test.cmp.options.clearFiltersOnNewQuery = false;
                Dom_1.$$(test.env.root).trigger(Core_1.QueryEvents.newQuery, { origin: test.cmp });
                expect(breadcrumbClearSpy).not.toHaveBeenCalled();
            });
            it("when clearFiltersOnNewQuery is true\n        when it is the first query\n        should not clear breadcrumbs", function () {
                test.cmp.queryController.firstQuery = true;
                Dom_1.$$(test.env.root).trigger(Core_1.QueryEvents.newQuery, { origin: test.cmp });
                expect(breadcrumbClearSpy).not.toHaveBeenCalled();
            });
            it("when clearFiltersOnNewQuery is true\n        when it is not the first query\n        when the origin is a valid component (SearchButton)\n        when the new query is the same as the previous one\n        should not clear breadcrumbs", function () {
                var sameQuery = 'same here';
                test.cmp.queryController.getLastQuery = function () { return ({ q: sameQuery }); };
                test.cmp.setText(sameQuery);
                Dom_1.$$(test.env.root).trigger(Core_1.QueryEvents.newQuery, { origin: test.cmp });
                expect(breadcrumbClearSpy).not.toHaveBeenCalled();
            });
        });
    });
}
exports.OmniboxTest = OmniboxTest;
 
 
/***/ }),
/* 1636 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { Iif (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        Iif (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            Iif (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
            Iif (y = 0, t) op = [0, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    Eif (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        Iif (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
Object.defineProperty(exports, "__esModule", { value: true });
var Mock = __webpack_require__(2);
var OmniboxResultList_1 = __webpack_require__(808);
var Fake_1 = __webpack_require__(11);
var Dom_1 = __webpack_require__(0);
var Simulate_1 = __webpack_require__(15);
var Template_1 = __webpack_require__(29);
var RegisteredNamedMethods_1 = __webpack_require__(38);
var EventsModules_1 = __webpack_require__(109);
function OmniboxResultListTest() {
    var _this = this;
    describe('OmniboxResultListTest', function () {
        var test;
        var results;
        beforeEach(function () {
            test = Mock.basicComponentSetup(OmniboxResultList_1.OmniboxResultList);
            results = Fake_1.FakeResults.createFakeResults();
        });
        it("HTMLElement, doesn't have a DOMChild", function () {
            expect(test.cmp.element.childElementCount).toBe(0);
        });
        it('should support building results', function (done) { return __awaiter(_this, void 0, void 0, function () {
            var built;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0: return [4 /*yield*/, test.cmp.buildResults(results)];
                    case 1:
                        built = _a.sent();
                        expect(built.length).toEqual(results.results.length);
                        done();
                        return [2 /*return*/];
                }
            });
        }); });
        it('should make all results selectable by the omnibox', function (done) { return __awaiter(_this, void 0, void 0, function () {
            var built;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0: return [4 /*yield*/, test.cmp.buildResults(results)];
                    case 1:
                        built = _a.sent();
                        built.forEach(function (element) {
                            expect(Dom_1.$$(element).hasClass('coveo-omnibox-selectable')).toBe(true);
                        });
                        done();
                        return [2 /*return*/];
                }
            });
        }); });
        it('should set the no-text-suggestion property on each result for the magicbox', function (done) { return __awaiter(_this, void 0, void 0, function () {
            var built;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0: return [4 /*yield*/, test.cmp.buildResults(results)];
                    case 1:
                        built = _a.sent();
                        built.forEach(function (element) {
                            expect(element['no-text-suggestion']).toBeTruthy();
                        });
                        done();
                        return [2 /*return*/];
                }
            });
        }); });
        it('should not disable itself on changing layout', function () {
            test.cmp.options.layout = 'list';
            Dom_1.$$(test.cmp.element).trigger(EventsModules_1.ResultListEvents.changeLayout, {
                layout: 'list'
            });
            expect(test.cmp.disabled).toBeFalsy();
        });
        it('should execute a search as you type query on populateOmnibox', function () {
            Simulate_1.Simulate.populateOmnibox(test.env);
            expect(test.env.queryController.executeQuery).toHaveBeenCalledWith(jasmine.objectContaining({
                searchAsYouType: true
            }));
        });
        describe('when selecting an element', function () {
            var spyOnSelect;
            beforeEach(function () {
                spyOnSelect = jasmine.createSpy('onClick');
                test.cmp.options.onSelect = spyOnSelect;
                Simulate_1.Simulate.populateOmnibox(test.env);
            });
            it('should call the onSelect option when clicking on each element of the result list', function (done) { return __awaiter(_this, void 0, void 0, function () {
                var built;
                return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0: return [4 /*yield*/, test.cmp.buildResults(results)];
                        case 1:
                            built = _a.sent();
                            built.forEach(function (element) {
                                Dom_1.$$(element).trigger('click');
                            });
                            expect(spyOnSelect).toHaveBeenCalledTimes(results.results.length);
                            done();
                            return [2 /*return*/];
                    }
                });
            }); });
            it('should call the onSelect option when doing keyboard selection on each element of the result list', function (done) { return __awaiter(_this, void 0, void 0, function () {
                var built;
                return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0: return [4 /*yield*/, test.cmp.buildResults(results)];
                        case 1:
                            built = _a.sent();
                            built.forEach(function (element) {
                                Dom_1.$$(element).trigger('keyboardSelect');
                            });
                            expect(spyOnSelect).toHaveBeenCalledTimes(results.results.length);
                            done();
                            return [2 /*return*/];
                    }
                });
            }); });
            describe('with a custom result template', function () {
                var setupCustomTemplate = function (templateContent) {
                    var tmpl = new Template_1.Template(function () { return templateContent; });
                    tmpl.condition = function () { return true; };
                    test.cmp.options.resultTemplate = tmpl;
                };
                it('should not trigger select event on a quickview', function (done) { return __awaiter(_this, void 0, void 0, function () {
                    var spyOnQuickviewOpen, built;
                    return __generator(this, function (_a) {
                        switch (_a.label) {
                            case 0:
                                spyOnQuickviewOpen = jasmine.createSpy('openQuickview');
                                setupCustomTemplate("\n          <div>\n          <span class='random-stuff'></span>\n          <div class='CoveoQuickview'></div>\n          </div>\n          ");
                                return [4 /*yield*/, test.cmp.buildResults(results)];
                            case 1:
                                built = _a.sent();
                                built.forEach(function (element) {
                                    var quickview = Dom_1.$$(element).find('.CoveoQuickview');
                                    RegisteredNamedMethods_1.get(quickview).open = spyOnQuickviewOpen;
                                    Dom_1.$$(quickview).trigger('click');
                                });
                                expect(spyOnSelect).not.toHaveBeenCalled();
                                expect(spyOnQuickviewOpen).toHaveBeenCalledTimes(results.results.length);
                                done();
                                return [2 /*return*/];
                        }
                    });
                }); });
                it('should not trigger select event on a result link', function (done) { return __awaiter(_this, void 0, void 0, function () {
                    var spyOnResultLinkOpen, built;
                    return __generator(this, function (_a) {
                        switch (_a.label) {
                            case 0:
                                spyOnResultLinkOpen = jasmine.createSpy('openResultLink');
                                setupCustomTemplate("\n          <div>\n          <span class='random-stuff'></span>\n          <div class='CoveoResultLink'></div>\n          </div>\n          ");
                                return [4 /*yield*/, test.cmp.buildResults(results)];
                            case 1:
                                built = _a.sent();
                                built.forEach(function (element) {
                                    var resultLink = Dom_1.$$(element).find('.CoveoResultLink');
                                    RegisteredNamedMethods_1.get(resultLink).openLink = spyOnResultLinkOpen;
                                    Dom_1.$$(resultLink).trigger('click');
                                });
                                expect(spyOnSelect).not.toHaveBeenCalled();
                                expect(spyOnResultLinkOpen).toHaveBeenCalledTimes(results.results.length);
                                done();
                                return [2 /*return*/];
                        }
                    });
                }); });
                it('should trigger the standard on select event on a random element', function (done) { return __awaiter(_this, void 0, void 0, function () {
                    var built;
                    return __generator(this, function (_a) {
                        switch (_a.label) {
                            case 0:
                                setupCustomTemplate("\n          <div>\n          <span class='random-stuff'></span>\n          <div class='CoveoResultLink'></div>\n          </div>\n          ");
                                return [4 /*yield*/, test.cmp.buildResults(results)];
                            case 1:
                                built = _a.sent();
                                built.forEach(function (element) {
                                    var randomStuff = Dom_1.$$(element).find('.random-stuff');
                                    Dom_1.$$(randomStuff).trigger('click');
                                });
                                expect(spyOnSelect).toHaveBeenCalledTimes(results.results.length);
                                done();
                                return [2 /*return*/];
                        }
                    });
                }); });
            });
        });
        describe('exposes options', function () {
            it('layout should be forced to list', function () {
                test = Mock.optionsComponentSetup(OmniboxResultList_1.OmniboxResultList, {
                    layout: 'card'
                });
                expect(test.cmp.options.layout).toEqual('list');
            });
            describe("when the headerTitle option is specified,\n      when simulating a populate omnibox event", function () {
                beforeEach(function () {
                    test = Mock.optionsComponentSetup(OmniboxResultList_1.OmniboxResultList, {
                        headerTitle: 'My title'
                    });
                    Simulate_1.Simulate.populateOmnibox(test.env);
                });
                it('when results is a populated array, it appends a title to the result container', function (done) { return __awaiter(_this, void 0, void 0, function () {
                    var built, header;
                    return __generator(this, function (_a) {
                        switch (_a.label) {
                            case 0: return [4 /*yield*/, test.cmp.buildResults(results)];
                            case 1:
                                built = _a.sent();
                                return [4 /*yield*/, test.cmp.renderResults(built)];
                            case 2:
                                _a.sent();
                                header = Dom_1.$$(test.cmp.options.resultsContainer).find('.coveo-omnibox-result-list-header');
                                expect(Dom_1.$$(header).text()).toEqual('My title');
                                done();
                                return [2 /*return*/];
                        }
                    });
                }); });
                it("when results is an empty array, it does not append a title to the result container", function (done) { return __awaiter(_this, void 0, void 0, function () {
                    var header;
                    return __generator(this, function (_a) {
                        switch (_a.label) {
                            case 0: return [4 /*yield*/, test.cmp.renderResults([])];
                            case 1:
                                _a.sent();
                                header = Dom_1.$$(test.cmp.options.resultsContainer).find('.coveo-omnibox-result-list-header');
                                expect(header).toBe(null);
                                done();
                                return [2 /*return*/];
                        }
                    });
                }); });
            });
        });
    });
}
exports.OmniboxResultListTest = OmniboxResultListTest;
 
 
/***/ }),
/* 1637 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var QueryEvents_1 = __webpack_require__(14);
var Defer_1 = __webpack_require__(31);
var AnalyticsActionListMeta_1 = __webpack_require__(7);
var QueryBuilder_1 = __webpack_require__(24);
var Pager_1 = __webpack_require__(388);
var Dom_1 = __webpack_require__(0);
var CustomMatchers_1 = __webpack_require__(104);
var Fake_1 = __webpack_require__(11);
var Mock = __webpack_require__(2);
var Simulate_1 = __webpack_require__(15);
var Strings_1 = __webpack_require__(4);
var underscore_1 = __webpack_require__(1);
function PagerTest() {
    describe('Pager', function () {
        var test;
        function simulatePageCount(pageCount, currentPage) {
            if (currentPage === void 0) { currentPage = 1; }
            var builder = new QueryBuilder_1.QueryBuilder();
            builder.firstResult = (currentPage - 1) * 10;
            Simulate_1.Simulate.query(test.env, {
                query: builder.build(),
                results: Fake_1.FakeResults.createFakeResults(pageCount * 10)
            });
        }
        function getRenderedButtonLabels() {
            return Dom_1.$$(test.cmp.element)
                .findAll('span.coveo-pager-list-item-text')
                .map(function (item) { return item.innerText; });
        }
        beforeEach(function () {
            CustomMatchers_1.registerCustomMatcher();
            test = Mock.basicComponentSetup(Pager_1.Pager);
        });
        afterEach(function () {
            test = null;
        });
        it('should set the correct result number when changing page', function () {
            var currentPage = 1;
            Dom_1.$$(test.env.root).on('buildingQuery', function (e, args) {
                expect(args.queryBuilder.build().firstResult).toBe(currentPage * 10);
            });
            test.cmp.setPage(++currentPage);
            test.cmp.setPage(++currentPage);
            currentPage--;
            test.cmp.previousPage();
            currentPage++;
            test.cmp.nextPage();
            expect(test.env.queryController.executeQuery).toHaveBeenCalledTimes(4);
        });
        it('should not be possible to set current page to an invalid value', function () {
            test.cmp.setPage('a');
            expect(test.cmp.currentPage).toBe(1);
            test.cmp.setPage('1');
            expect(test.cmp.currentPage).toBe(1);
            test.cmp.setPage(2);
            expect(test.cmp.currentPage).toBe(2);
            test.cmp.setPage(1.7);
            expect(test.cmp.currentPage).toBe(1);
            test.cmp.setPage(1.5);
            expect(test.cmp.currentPage).toBe(1);
            test.cmp.setPage(1.499999);
            expect(test.cmp.currentPage).toBe(1);
            test.cmp.setPage('1.599999');
            expect(test.cmp.currentPage).toBe(1);
            test.cmp.setPage('2.00000');
            expect(test.cmp.currentPage).toBe(2);
            test.cmp.setPage({});
            expect(test.cmp.currentPage).toBe(1);
            test.cmp.setPage(true);
            expect(test.cmp.currentPage).toBe(1);
            test.cmp.setPage(false);
            expect(test.cmp.currentPage).toBe(1);
            test.cmp.setPage(0);
            expect(test.cmp.currentPage).toBe(1);
        });
        it('should update the state when changing page', function () {
            var currentPage = 1;
            test.cmp.setPage(++currentPage);
            expect(test.env.queryStateModel.set).toHaveBeenCalledWith('first', (currentPage - 1) * 10);
            test.cmp.setPage(++currentPage);
            expect(test.env.queryStateModel.set).toHaveBeenCalledWith('first', (currentPage - 1) * 10);
            currentPage--;
            test.cmp.previousPage();
            expect(test.env.queryStateModel.set).toHaveBeenCalledWith('first', (currentPage - 1) * 10);
            currentPage++;
            test.cmp.nextPage();
            expect(test.env.queryStateModel.set).toHaveBeenCalledWith('first', (currentPage - 1) * 10);
        });
        describe('when query state model is updated', function () {
            beforeEach(function () {
                test = Mock.advancedComponentSetup(Pager_1.Pager, new Mock.AdvancedComponentSetupOptions(undefined, undefined, function (env) {
                    return env.withLiveQueryStateModel();
                }));
            });
            it('should update current page when first result is changed', function () {
                test.env.queryStateModel.set('first', 30);
                expect(test.cmp.currentPage).toBe(4);
            });
            it('should update current page when number of results per page is changed', function () {
                test.env.queryStateModel.set('numberOfResults', 10);
                test.env.queryStateModel.set('first', 49);
                expect(test.cmp.currentPage).toBe(5);
                test.env.queryStateModel.set('numberOfResults', 50);
                expect(test.cmp.currentPage).toBe(1);
            });
        });
        it('should not render anything if only one page of result is returned', function () {
            Simulate_1.Simulate.query(test.env, { results: Fake_1.FakeResults.createFakeResults(5) });
            expect(test.cmp.element.querySelectorAll('li').length).toBe(0);
        });
        it('should render the pager boundary correctly', function () {
            simulatePageCount(100, 8);
            var anchors = Dom_1.$$(test.cmp.element).findAll('span.coveo-pager-list-item-text');
            expect(Dom_1.$$(anchors[0]).text()).toBe('6');
            expect(anchors[0].getAttribute('tabindex')).toBe('0');
            expect(Dom_1.$$(anchors[anchors.length - 1]).text()).toBe('10');
        });
        it('should always respect an uneven numberOfPages when enough pages exist', function () {
            test.cmp.options.numberOfPages = 5;
            simulatePageCount(7);
            expect(getRenderedButtonLabels()).toEqual(['1', '2', '3', '4', '5']);
            simulatePageCount(7, 4);
            expect(getRenderedButtonLabels()).toEqual(['2', '3', '4', '5', '6']);
            simulatePageCount(7, 7);
            expect(getRenderedButtonLabels()).toEqual(['3', '4', '5', '6', '7']);
        });
        it('should always respect an even numberOfPages when enough pages exist', function () {
            test.cmp.options.numberOfPages = 4;
            simulatePageCount(7);
            expect(getRenderedButtonLabels()).toEqual(['1', '2', '3', '4']);
            simulatePageCount(7, 4);
            expect(getRenderedButtonLabels()).toEqual(['2', '3', '4', '5']);
            simulatePageCount(7, 7);
            expect(getRenderedButtonLabels()).toEqual(['4', '5', '6', '7']);
        });
        it('should render buttons for every page when the amount is lower than numberOfPages', function () {
            test.cmp.options.numberOfPages = 5;
            simulatePageCount(3);
            expect(getRenderedButtonLabels()).toEqual(['1', '2', '3']);
            simulatePageCount(3, 2);
            expect(getRenderedButtonLabels()).toEqual(['1', '2', '3']);
            simulatePageCount(3, 3);
            expect(getRenderedButtonLabels()).toEqual(['1', '2', '3']);
        });
        it('should render buttons for every page when the amount is equal to numberOfPages', function () {
            test.cmp.options.numberOfPages = 5;
            simulatePageCount(5);
            expect(getRenderedButtonLabels()).toEqual(['1', '2', '3', '4', '5']);
            simulatePageCount(5, 3);
            expect(getRenderedButtonLabels()).toEqual(['1', '2', '3', '4', '5']);
            simulatePageCount(5, 5);
            expect(getRenderedButtonLabels()).toEqual(['1', '2', '3', '4', '5']);
        });
        describe('with 100 fake results', function () {
            var buttons;
            beforeEach(function () {
                var builder = new QueryBuilder_1.QueryBuilder();
                builder.firstResult = 50;
                Simulate_1.Simulate.query(test.env, {
                    query: builder.build(),
                    results: Fake_1.FakeResults.createFakeResults(100)
                });
                buttons = Dom_1.$$(test.cmp.element).findAll('[role="button"]');
            });
            it('should set the aria-label on the navigation element', function () {
                expect(test.cmp.element.getAttribute('aria-label')).toEqual(Strings_1.l('Pagination'));
            });
            it('should set the role on the navigation element', function () {
                expect(test.cmp.element.getAttribute('role')).toEqual('navigation');
            });
            it('should set the aria-label on elements correctly', function () {
                buttons.forEach(function (listItem, index) {
                    if (index !== 0 && index !== buttons.length - 1) {
                        var pageNumber = parseInt(Dom_1.$$(listItem).text());
                        expect(listItem.getAttribute('aria-label')).toEqual(Strings_1.l('PageNumber', pageNumber.toString()));
                    }
                });
            });
            it('should set the role on elements', function () {
                buttons.forEach(function (listItem) { return expect(listItem.getAttribute('role')).toEqual('button'); });
            });
            it('should not make the next arrow a toggle', function () {
                expect(test.cmp.element.querySelector('.coveo-pager-next').getAttribute('aria-pressed')).toBeNull();
            });
            it('should not make the previous arrow a toggle', function () {
                expect(test.cmp.element.querySelector('.coveo-pager-previous').getAttribute('aria-pressed')).toBeNull();
            });
            it('should set aria-pressed to true on the active page element', function () {
                var activeElement = underscore_1.find(buttons, function (listItem) { return Dom_1.$$(listItem).text() === test.cmp.currentPage.toString(); });
                expect(activeElement.getAttribute('aria-pressed')).toEqual(true.toString());
            });
            it('should set aria-pressed to false on every inactive page element', function () {
                buttons.forEach(function (listItem, index) {
                    if (index !== 0 && index !== buttons.length - 1) {
                        if (Dom_1.$$(listItem).text() !== test.cmp.currentPage.toString()) {
                            expect(listItem.getAttribute('aria-pressed')).toEqual(false.toString());
                        }
                    }
                });
            });
            it('should set tabindex to 0 on every button element', function () {
                buttons.forEach(function (button) { return expect(button.getAttribute('tabindex')).toEqual('0'); });
            });
        });
        it('should not reset page number on a new query if the origin is a pager', function () {
            test.cmp.setPage(6);
            expect(test.cmp.currentPage).toBe(6);
            Dom_1.$$(test.env.root).trigger(QueryEvents_1.QueryEvents.newQuery, {
                origin: test.cmp
            });
            expect(test.cmp.currentPage).toBe(6);
        });
        it('should not reset page number on a new query if the origin is a debug panel', function () {
            test.cmp.setPage(10);
            expect(test.cmp.currentPage).toBe(10);
            Dom_1.$$(test.env.root).trigger(QueryEvents_1.QueryEvents.newQuery, {
                origin: { type: 'Debug' }
            });
            expect(test.cmp.currentPage).toBe(10);
        });
        it('should reset the page number on a new query if the origin is not set', function () {
            test.cmp.setPage(5);
            expect(test.cmp.currentPage).toBe(5);
            Dom_1.$$(test.env.root).trigger(QueryEvents_1.QueryEvents.newQuery, {});
            expect(test.cmp.currentPage).toBe(1);
        });
        it('should reset the page number on a new query if the origin is something not recognized', function () {
            test.cmp.setPage(10);
            expect(test.cmp.currentPage).toBe(10);
            Dom_1.$$(test.env.root).trigger(QueryEvents_1.QueryEvents.newQuery, {
                origin: 'nope not the pager'
            });
            expect(test.cmp.currentPage).toBe(1);
        });
        describe('when queries are performed', function () {
            var execQuery = function (test, resultsPerPage, firstResult, numberOfResults, origin) {
                test.env.searchInterface.resultsPerPage = resultsPerPage;
                var queryBuilder = new QueryBuilder_1.QueryBuilder();
                queryBuilder.numberOfResults = resultsPerPage;
                queryBuilder.firstResult = firstResult;
                var simulation = Simulate_1.Simulate.query(test.env, {
                    query: queryBuilder.build(),
                    queryBuilder: queryBuilder,
                    results: Fake_1.FakeResults.createFakeResults(numberOfResults),
                    origin: origin
                });
                return {
                    test: test,
                    simulation: simulation
                };
            };
            it('should adapt itself to the number of results on each new query', function () {
                // 10 results per page : show full pager
                // Page 1 to 5
                execQuery(test, 10, 0, 1000);
                var anchors = Dom_1.$$(test.cmp.element).findAll('span.coveo-pager-list-item-text');
                expect(Dom_1.$$(anchors[0]).text()).toBe('1');
                expect(Dom_1.$$(anchors[anchors.length - 1]).text()).toBe('5');
                // 500 results per page : only 2 page available
                // Page 1 to 2
                execQuery(test, 500, 0, 1000);
                anchors = Dom_1.$$(test.cmp.element).findAll('span.coveo-pager-list-item-text');
                expect(Dom_1.$$(anchors[0]).text()).toBe('1');
                expect(Dom_1.$$(anchors[anchors.length - 1]).text()).toBe('2');
            });
            it('should return to the last valid page when there is no results and the numberOfResults per page is no standard', function () {
                Dom_1.$$(test.env.root).on(QueryEvents_1.QueryEvents.noResults, function (e, args) {
                    expect(args.retryTheQuery).toBe(true);
                });
                test.cmp.currentPage = 11;
                execQuery(test, 100, 1000, 0, test.cmp);
                expect(test.cmp.currentPage).toBe(10);
            });
            it('should return to the last valid page when there are less results than expected', function (done) {
                var simulation = execQuery(test, 10, 30, 0, test.cmp).simulation;
                simulation.results.totalCountFiltered = 29;
                simulation.results.totalCount = 29;
                Simulate_1.Simulate.query(test.env, {
                    query: simulation.query,
                    queryBuilder: simulation.queryBuilder,
                    results: simulation.results,
                    origin: test.cmp
                });
                Defer_1.Defer.defer(function () {
                    // started at page 4
                    // expected to receive more than 30 results in total but received only 29
                    // Should go back to last valid page, which is page 3
                    expect(test.cmp.currentPage).toBe(3);
                    done();
                });
            });
            it("when having a resultPerPage that is not a divider of maximumNumberOfResultsFromIndex \n      should prevent requesting more result than the maximumNumberOfResultsFromIndex option", function () {
                var resultsPerPage = 12;
                var pageNumber = Math.ceil(test.cmp.options.maximumNumberOfResultsFromIndex / resultsPerPage);
                var firstResult = (pageNumber - 1) * resultsPerPage;
                test.cmp.setPage(pageNumber);
                var simulation = execQuery(test, resultsPerPage, firstResult, 0, test.cmp).simulation;
                expect(simulation.queryBuilder.numberOfResults).toBe(test.cmp.options.maximumNumberOfResultsFromIndex - firstResult);
            });
        });
        describe('analytics', function () {
            it('should log the proper event when selecting a page directly', function () {
                test.cmp.setPage(15);
                expect(test.env.usageAnalytics.logCustomEvent).toHaveBeenCalledWith(AnalyticsActionListMeta_1.analyticsActionCauseList.pagerNumber, { pagerNumber: 15 }, test.cmp.element);
            });
            it('should log the proper event when hitting next page', function () {
                test.cmp.nextPage();
                expect(test.env.usageAnalytics.logCustomEvent).toHaveBeenCalledWith(AnalyticsActionListMeta_1.analyticsActionCauseList.pagerNext, { pagerNumber: 2 }, test.cmp.element);
            });
            it('should log the proper event when hitting previous page', function () {
                test.cmp.setPage(3);
                test.cmp.previousPage();
                expect(test.env.usageAnalytics.logCustomEvent).toHaveBeenCalledWith(AnalyticsActionListMeta_1.analyticsActionCauseList.pagerPrevious, { pagerNumber: 2 }, test.cmp.element);
            });
        });
        describe('exposes options', function () {
            it('numberOfPages allow to specify the number of pages to render', function () {
                test = Mock.optionsComponentSetup(Pager_1.Pager, {
                    numberOfPages: 22
                });
                Simulate_1.Simulate.query(test.env, {
                    results: Fake_1.FakeResults.createFakeResults(1000)
                });
                expect(Dom_1.$$(test.cmp.element).findAll('span.coveo-pager-list-item-text').length).toBe(22);
            });
            it('enableNavigationButton can enable or disable nav buttons', function () {
                test = Mock.optionsComponentSetup(Pager_1.Pager, {
                    enableNavigationButton: true
                });
                var builder = new QueryBuilder_1.QueryBuilder();
                builder.firstResult = 70;
                Simulate_1.Simulate.query(test.env, {
                    query: builder.build(),
                    results: Fake_1.FakeResults.createFakeResults(1000)
                });
                expect(Dom_1.$$(test.cmp.element).findAll('.coveo-pager-previous').length).toBe(1);
                expect(Dom_1.$$(test.cmp.element).findAll('.coveo-pager-next').length).toBe(1);
                test = Mock.optionsComponentSetup(Pager_1.Pager, {
                    enableNavigationButton: false
                });
                Simulate_1.Simulate.query(test.env, {
                    query: builder.build(),
                    results: Fake_1.FakeResults.createFakeResults(1000)
                });
                expect(Dom_1.$$(test.cmp.element).findAll('.coveo-pager-previous').length).toBe(0);
                expect(Dom_1.$$(test.cmp.element).findAll('.coveo-pager-next').length).toBe(0);
            });
            it('maximumNumberOfResultsFromIndex allow to specify the maximum last possible result from the index', function () {
                test = Mock.optionsComponentSetup(Pager_1.Pager, {
                    maximumNumberOfResultsFromIndex: 31
                });
                var builder = new QueryBuilder_1.QueryBuilder();
                builder.firstResult = 30;
                Simulate_1.Simulate.query(test.env, {
                    query: builder.build(),
                    results: Fake_1.FakeResults.createFakeResults(1000) // return much more results than 31, but the option should still work properly
                });
                var anchors = Dom_1.$$(test.cmp.element).findAll('span.coveo-pager-list-item-text');
                // 31 results max from the index
                // divided by 10 results per page
                // means 4 pages
                expect(Dom_1.$$(anchors[anchors.length - 1]).text()).toBe('4');
            });
        });
    });
}
exports.PagerTest = PagerTest;
 
 
/***/ }),
/* 1638 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var PendingSearchAsYouTypeSearchEvent_1 = __webpack_require__(179);
var AnalyticsEndpoint_1 = __webpack_require__(169);
var Fake_1 = __webpack_require__(11);
var AnalyticsActionListMeta_1 = __webpack_require__(7);
var SearchInterface_1 = __webpack_require__(25);
var QueryEvents_1 = __webpack_require__(14);
var Dom_1 = __webpack_require__(0);
var QueryBuilder_1 = __webpack_require__(24);
var MiscModules_1 = __webpack_require__(97);
var AccessToken_1 = __webpack_require__(167);
function PendingSearchAsYouTypeSearchEventTest() {
    describe('PendingSearchAsYouTypeSearchEvent', function () {
        var pendingEvent;
        var root;
        var endpoint;
        var searchInterface;
        beforeEach(function () {
            root = document.createElement('div');
            searchInterface = new SearchInterface_1.SearchInterface(root);
            endpoint = new AnalyticsEndpoint_1.AnalyticsEndpoint({
                accessToken: new AccessToken_1.AccessToken('token'),
                serviceUrl: 'serviceUrl',
                organization: 'organization'
            });
        });
        afterEach(function () {
            root = null;
            pendingEvent = null;
            endpoint = null;
        });
        it('should allow to modify cause', function () {
            pendingEvent = new PendingSearchAsYouTypeSearchEvent_1.PendingSearchAsYouTypeSearchEvent(root, endpoint, Fake_1.FakeResults.createFakeSearchEvent(), true);
            pendingEvent.modifyEventCause(AnalyticsActionListMeta_1.analyticsActionCauseList.documentTag);
            expect(pendingEvent.getEventCause()).toBe(AnalyticsActionListMeta_1.analyticsActionCauseList.documentTag.name);
        });
        it('should allow to modify custom data', function () {
            pendingEvent = new PendingSearchAsYouTypeSearchEvent_1.PendingSearchAsYouTypeSearchEvent(root, endpoint, Fake_1.FakeResults.createFakeSearchEvent(), true);
            pendingEvent.modifyCustomData('foo', 'bar');
            expect(pendingEvent.getEventMeta()).toEqual(jasmine.objectContaining({ foo: 'bar' }));
        });
        it('should keep the original value for "q" before sending the event', function (done) {
            endpoint['sendSearchEvents'] = jasmine.createSpy('sendSearchEvents');
            pendingEvent = new PendingSearchAsYouTypeSearchEvent_1.PendingSearchAsYouTypeSearchEvent(root, endpoint, Fake_1.FakeResults.createFakeSearchEvent(), true);
            var duringQueryPromise = Promise.resolve(Fake_1.FakeResults.createFakeResults());
            // Set initial value for search box
            searchInterface.queryStateModel.set('q', 'foo');
            // arm the pending search event
            var duringQueryEventArgs = {
                promise: duringQueryPromise,
                query: new QueryBuilder_1.QueryBuilder().build()
            };
            Dom_1.$$(root).trigger(QueryEvents_1.QueryEvents.duringQuery, duringQueryEventArgs);
            // change the content of the "search box"
            searchInterface.queryStateModel.set('q', 'bar');
            // send the event
            pendingEvent.sendRightNow();
            setTimeout(function () {
                // check that the original query is preserved
                expect(endpoint.sendSearchEvents).toHaveBeenCalledWith(jasmine.arrayContaining([
                    jasmine.objectContaining({
                        queryText: 'foo'
                    })
                ]));
                done();
            }, 100);
            MiscModules_1.Defer.flush();
        });
    });
}
exports.PendingSearchAsYouTypeSearchEventTest = PendingSearchAsYouTypeSearchEventTest;
 
 
/***/ }),
/* 1639 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Mock = __webpack_require__(2);
var PreferencesPanel_1 = __webpack_require__(266);
var Dom_1 = __webpack_require__(0);
var PreferencesPanelEvents_1 = __webpack_require__(112);
function PreferencesPanelTest() {
    describe('PreferencesPanel', function () {
        var test;
        beforeEach(function () {
            test = Mock.basicComponentSetupWithModalBox(PreferencesPanel_1.PreferencesPanel);
        });
        it("shouldn't be active by default", function () {
            expect(Dom_1.$$(test.env.element).hasClass('coveo-active')).toBe(false);
        });
        it("should activate when 'open' is called", function () {
            test.cmp.open();
            expect(test.modalBox.open).toHaveBeenCalled();
        });
        it("should deactivate when 'close' is called", function () {
            test.cmp.open();
            test.cmp.close();
            expect(test.modalBox.close).toHaveBeenCalled();
        });
        it("should trigger a savePreferences event when 'save' is called", function () {
            var saveSpy = jasmine.createSpy('saveSpy');
            Dom_1.$$(test.env.element).on(PreferencesPanelEvents_1.PreferencesPanelEvents.savePreferences, saveSpy);
            test.cmp.save();
            expect(saveSpy).toHaveBeenCalled();
        });
        it("should trigger a query when 'save' is called", function () {
            var querySpy = jasmine.createSpy('querySpy');
            test.env.queryController.executeQuery = querySpy;
            test.cmp.save();
            expect(querySpy).toHaveBeenCalled();
        });
        it("should trigger exitPreferencesWithoutSave when 'close' is called", function () {
            var closeSpy = jasmine.createSpy('closeSpy');
            Dom_1.$$(test.cmp.element).on(PreferencesPanelEvents_1.PreferencesPanelEvents.exitPreferencesWithoutSave, closeSpy);
            test.cmp.open();
            test.cmp.close();
            expect(closeSpy).toHaveBeenCalled();
        });
    });
}
exports.PreferencesPanelTest = PreferencesPanelTest;
 
 
/***/ }),
/* 1640 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var QueryBuilder_1 = __webpack_require__(24);
var QueryboxQueryParameters_1 = __webpack_require__(171);
function QueryboxQueryParametersTest() {
    describe('QueryBoxQueryParameters', function () {
        var builder;
        beforeEach(function () {
            builder = new QueryBuilder_1.QueryBuilder();
        });
        afterEach(function () {
            builder = null;
            QueryboxQueryParameters_1.QueryboxQueryParameters.allowDuplicateQuery();
        });
        it('should add enableLowercaseOperators to builder', function () {
            new QueryboxQueryParameters_1.QueryboxQueryParameters({
                enableLowercaseOperators: true
            }).addParameters(builder, 'foobar');
            expect(builder.enableLowercaseOperators).toBe(true);
        });
        it('should add enableQuestionMarks to builder', function () {
            new QueryboxQueryParameters_1.QueryboxQueryParameters({
                enableQuestionMarks: true
            }).addParameters(builder, 'foobar');
            expect(builder.enableQuestionMarks).toBe(true);
        });
        it('should add enableWildcards to builder', function () {
            new QueryboxQueryParameters_1.QueryboxQueryParameters({
                enableWildcards: true
            }).addParameters(builder, 'foobar');
            expect(builder.enableWildcards).toBe(true);
        });
        it('should add enableQuerySyntax to builder', function () {
            new QueryboxQueryParameters_1.QueryboxQueryParameters({
                enableQuerySyntax: true
            }).addParameters(builder, 'foobar');
            expect(builder.enableQuerySyntax).toBe(true);
            QueryboxQueryParameters_1.QueryboxQueryParameters.allowDuplicateQuery();
            new QueryboxQueryParameters_1.QueryboxQueryParameters({
                enableQuerySyntax: false
            }).addParameters(builder, 'foobar');
            expect(builder.enableQuerySyntax).toBe(false);
        });
        it('should add enablePartialMatch to builder', function () {
            new QueryboxQueryParameters_1.QueryboxQueryParameters({
                enablePartialMatch: true,
                partialMatchKeywords: 123,
                partialMatchThreshold: '12%'
            }).addParameters(builder, 'foobar');
            expect(builder.enablePartialMatch).toBe(true);
            expect(builder.partialMatchKeywords).toBe(123);
            expect(builder.partialMatchThreshold).toBe('12%');
        });
        it('should block duplicate execution of the query parameters', function () {
            var param1 = new QueryboxQueryParameters_1.QueryboxQueryParameters({
                enableQuerySyntax: false
            });
            var param2 = new QueryboxQueryParameters_1.QueryboxQueryParameters({
                enableQuerySyntax: true
            });
            param1.addParameters(builder, 'foobar');
            // param2 should be blocked, since it's the same call stack
            param2.addParameters(builder, 'foobar2');
            expect(builder.enableQuerySyntax).toBe(false);
            expect(builder.build().q).toBe('foobar');
        });
    });
}
exports.QueryboxQueryParametersTest = QueryboxQueryParametersTest;
 
 
/***/ }),
/* 1641 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Mock = __webpack_require__(2);
var Querybox_1 = __webpack_require__(125);
var CustomMatchers_1 = __webpack_require__(104);
var AnalyticsActionListMeta_1 = __webpack_require__(7);
var Simulate_1 = __webpack_require__(15);
var Dom_1 = __webpack_require__(0);
var StandaloneSearchInterfaceEvents_1 = __webpack_require__(170);
function QueryboxTest() {
    describe('Querybox', function () {
        var test;
        beforeEach(function () {
            test = Mock.basicComponentSetup(Querybox_1.Querybox);
            this.input = test.env.element.querySelector('input');
            CustomMatchers_1.registerCustomMatcher();
        });
        afterEach(function () {
            test = null;
        });
        it('will trigger a query on submit', function () {
            test.cmp.submit();
            expect(test.env.queryController.executeQuery).toHaveBeenCalled();
        });
        it('will log the proper analytics event on submit', function () {
            test.cmp.submit();
            expect(test.env.usageAnalytics.logSearchEvent).toHaveBeenCalledWith(AnalyticsActionListMeta_1.analyticsActionCauseList.searchboxSubmit, {});
        });
        it('will not trigger a query on submit if the content has not changed', function () {
            test.cmp.submit();
            test.cmp.submit();
            test.cmp.submit();
            test.cmp.submit();
            expect(test.env.queryController.executeQuery).toHaveBeenCalledTimes(1);
        });
        it('will trigger a new query if the content change', function () {
            test.cmp.submit();
            test.cmp.submit();
            test.cmp.setText('Batman');
            test.cmp.submit();
            test.cmp.submit();
            test.cmp.setText('Spiderman');
            test.cmp.submit();
            test.cmp.submit();
            expect(test.env.queryController.executeQuery).toHaveBeenCalledTimes(3);
        });
        it('will set the content of the input in the query', function () {
            test.cmp.setText('Batman');
            var simulation = Simulate_1.Simulate.query(test.env);
            expect(simulation.queryBuilder.build().q).toEqual('Batman');
        });
        it('will change the state on building query', function () {
            test.cmp.setText('Batman');
            Simulate_1.Simulate.query(test.env);
            expect(test.env.queryStateModel.set).toHaveBeenCalledWith('q', 'Batman');
        });
        it('will change the state when the content change on blur', function () {
            test.cmp.setText('Batman');
            test.cmp.magicBox.onblur();
            expect(test.env.queryStateModel.set).toHaveBeenCalledWith('q', 'Batman');
        });
        it('will change the state if the content is cleared', function () {
            test.cmp.setText('Batman');
            expect(test.env.queryStateModel.set).toHaveBeenCalledWith('q', 'Batman');
            test.cmp.setText('');
            expect(test.env.queryStateModel.set).toHaveBeenCalledWith('q', '');
            test.cmp.setText('Batman');
            expect(test.env.queryStateModel.set).toHaveBeenCalledWith('q', 'Batman');
            test.cmp.magicBox.clear();
            expect(test.env.queryStateModel.set).toHaveBeenCalledWith('q', '');
        });
        it('will return correctly on getResult', function () {
            test.cmp.setText('Batman');
            expect(test.cmp.getResult().input).toBe('Batman');
        });
        it('will return correctly on getDisplayedResult', function () {
            test.cmp.setText('Batman');
            expect(test.cmp.getDisplayedResult().input).toBe('Batman');
        });
        it('will return correctly on getCursor', function () {
            test.cmp.setText('Batman');
            expect(test.cmp.getCursor()).toBe(6);
            test.cmp.setText('');
            expect(test.cmp.getCursor()).toBe(0);
        });
        it('will return correctly on resultAtCursor', function () {
            test.cmp.setText('Batman');
            expect(test.cmp.resultAtCursor().length).toBe(1);
            expect(test.cmp.resultAtCursor()[0].input).toBe('Batman');
        });
        it('will update state before redirecting', function () {
            test.cmp.setText('Batman');
            Dom_1.$$(test.env.root).trigger(StandaloneSearchInterfaceEvents_1.StandaloneSearchInterfaceEvents.beforeRedirect);
            expect(test.env.queryStateModel.set).toHaveBeenCalledWith('q', 'Batman');
        });
        describe('using a live query state model', function () {
            beforeEach(function () {
                test = Mock.advancedComponentSetup(Querybox_1.Querybox, new Mock.AdvancedComponentSetupOptions(undefined, undefined, function (env) {
                    return env.withLiveQueryStateModel();
                }));
            });
            it('will change the content of the search box if the model change', function () {
                expect(test.cmp.getText()).toBe('');
                test.env.queryStateModel.set('q', 'Batman is better then Spiderman');
                expect(test.cmp.getText()).toBe('Batman is better then Spiderman');
            });
        });
        describe('exposes options', function () {
            it('enableSearchAsYouType will trigger a query after a delay', function (done) {
                test = Mock.optionsComponentSetup(Querybox_1.Querybox, {
                    enableSearchAsYouType: true
                });
                expect(test.cmp.magicBox.onchange).toBeDefined();
                test.cmp.magicBox.onchange();
                setTimeout(function () {
                    expect(test.env.queryController.executeQuery).toHaveBeenCalled();
                    done();
                }, test.cmp.options.searchAsYouTypeDelay);
            });
            it('enableSearchAsYouType to false will not trigger a query after a delay', function () {
                test = Mock.optionsComponentSetup(Querybox_1.Querybox, {
                    enableSearchAsYouType: false
                });
                expect(test.cmp.magicBox.onchange).not.toBeDefined();
            });
            it('enableSearchAsYouType will log the proper analytics event', function (done) {
                test = Mock.optionsComponentSetup(Querybox_1.Querybox, {
                    enableSearchAsYouType: true
                });
                expect(test.cmp.magicBox.onchange).toBeDefined();
                test.cmp.magicBox.onchange();
                setTimeout(function () {
                    expect(test.env.usageAnalytics.logSearchAsYouType).toHaveBeenCalledWith(AnalyticsActionListMeta_1.analyticsActionCauseList.searchboxAsYouType, {});
                    done();
                }, test.cmp.options.searchAsYouTypeDelay);
            });
            it('enableSearchAsYouTypeDelay influences the delay before a query', function (done) {
                test = Mock.optionsComponentSetup(Querybox_1.Querybox, {
                    enableSearchAsYouType: true,
                    searchAsYouTypeDelay: 5
                });
                expect(test.cmp.magicBox.onchange).toBeDefined();
                test.cmp.magicBox.onchange();
                setTimeout(function () {
                    expect(test.env.queryController.executeQuery).not.toHaveBeenCalled();
                }, 1);
                setTimeout(function () {
                    expect(test.env.queryController.executeQuery).toHaveBeenCalled();
                    done();
                }, 10);
            });
            it('enableQuerySyntax should modify the enableQuerySyntax parameter', function () {
                test = Mock.optionsComponentSetup(Querybox_1.Querybox, {
                    enableQuerySyntax: false
                });
                test.cmp.setText('@field==Batman');
                var simulation = Simulate_1.Simulate.query(test.env);
                expect(simulation.queryBuilder.enableQuerySyntax).toBe(false);
                test = Mock.optionsComponentSetup(Querybox_1.Querybox, {
                    enableQuerySyntax: true
                });
                test.cmp.setText('@field==Batman');
                simulation = Simulate_1.Simulate.query(test.env);
                expect(simulation.queryBuilder.enableQuerySyntax).toBe(true);
            });
            it('enableWildcards shoud modify the query builder', function () {
                test = Mock.optionsComponentSetup(Querybox_1.Querybox, {
                    enableWildcards: false
                });
                var simulation = Simulate_1.Simulate.query(test.env);
                expect(simulation.queryBuilder.build().wildcards).toBeFalsy();
                test = Mock.optionsComponentSetup(Querybox_1.Querybox, {
                    enableWildcards: true
                });
                simulation = Simulate_1.Simulate.query(test.env);
                expect(simulation.queryBuilder.build().wildcards).toBe(true);
            });
            it('enableQuestionMarks should modify the query builder', function () {
                test = Mock.optionsComponentSetup(Querybox_1.Querybox, {
                    enableQuestionMarks: false
                });
                var simulation = Simulate_1.Simulate.query(test.env);
                expect(simulation.queryBuilder.build().questionMark).toBeFalsy();
                test = Mock.optionsComponentSetup(Querybox_1.Querybox, {
                    enableQuestionMarks: true
                });
                simulation = Simulate_1.Simulate.query(test.env);
                expect(simulation.queryBuilder.build().questionMark).toBe(true);
            });
            it('enableLowercaseOperators should modify the query builder', function () {
                test = Mock.optionsComponentSetup(Querybox_1.Querybox, {
                    enableLowercaseOperators: false
                });
                var simulation = Simulate_1.Simulate.query(test.env);
                expect(simulation.queryBuilder.build().lowercaseOperators).toBeFalsy();
                test = Mock.optionsComponentSetup(Querybox_1.Querybox, {
                    enableLowercaseOperators: true
                });
                simulation = Simulate_1.Simulate.query(test.env);
                expect(simulation.queryBuilder.build().lowercaseOperators).toBe(true);
            });
            it('enablePartialMatch should modify the query builder', function () {
                test = Mock.optionsComponentSetup(Querybox_1.Querybox, {
                    enablePartialMatch: false
                });
                test.cmp.setText('Batman');
                var simulation = Simulate_1.Simulate.query(test.env);
                expect(simulation.queryBuilder.build().partialMatch).toBeFalsy();
                test = Mock.optionsComponentSetup(Querybox_1.Querybox, {
                    enablePartialMatch: true
                });
                test.cmp.setText('Batman');
                simulation = Simulate_1.Simulate.query(test.env);
                expect(simulation.queryBuilder.build().partialMatch).toBe(true);
            });
            it('enablePartialMatch should not modify the query builder if there is no content in the input', function () {
                test = Mock.optionsComponentSetup(Querybox_1.Querybox, {
                    enablePartialMatch: true
                });
                test.cmp.setText('');
                var simulation = Simulate_1.Simulate.query(test.env);
                expect(simulation.queryBuilder.build().partialMatch).toBeUndefined();
            });
            it('partialMatchKeywords should modify the query builder', function () {
                test = Mock.optionsComponentSetup(Querybox_1.Querybox, {
                    partialMatchKeywords: 999,
                    enablePartialMatch: true
                });
                test.cmp.setText('Batman');
                var simulation = Simulate_1.Simulate.query(test.env);
                expect(simulation.queryBuilder.build().partialMatchKeywords).toBe(999);
            });
            it('partialMatchKeywords should not modify the query builder if there is no content in the input', function () {
                test = Mock.optionsComponentSetup(Querybox_1.Querybox, {
                    partialMatchKeywords: 999,
                    enablePartialMatch: true
                });
                test.cmp.setText('');
                var simulation = Simulate_1.Simulate.query(test.env);
                expect(simulation.queryBuilder.build().partialMatchKeywords).toBeUndefined();
            });
            it('partialMatchKeywords should not modify the query builder if enablePartialMatch is disabled', function () {
                test = Mock.optionsComponentSetup(Querybox_1.Querybox, {
                    partialMatchKeywords: 999,
                    enablePartialMatch: false
                });
                test.cmp.setText('Batman');
                var simulation = Simulate_1.Simulate.query(test.env);
                expect(simulation.queryBuilder.build().partialMatchKeywords).toBeUndefined();
            });
            it('triggerQueryOnClear should trigger a query on clear', function () {
                test = Mock.optionsComponentSetup(Querybox_1.Querybox, {
                    triggerQueryOnClear: true
                });
                test.cmp.magicBox.clear();
                expect(test.cmp.queryController.executeQuery).toHaveBeenCalled();
            });
            it('triggerQueryOnClear should not trigger a query on clear if false', function () {
                test = Mock.optionsComponentSetup(Querybox_1.Querybox, {
                    triggerQueryOnClear: false
                });
                test.cmp.magicBox.clear();
                expect(test.cmp.queryController.executeQuery).not.toHaveBeenCalled();
            });
            it('triggerQueryOnClear should be forced to false if the search interface is configured to not allowQueriesWithoutKeywords', function () {
                var advancedSetup = new Mock.AdvancedComponentSetupOptions(null, {
                    triggerQueryOnClear: true
                }, function (env) {
                    env.searchInterface.options.allowQueriesWithoutKeywords = false;
                    return env;
                });
                test = Mock.advancedComponentSetup(Querybox_1.Querybox, advancedSetup);
                expect(test.cmp.options.triggerQueryOnClear).toBe(false);
            });
            it('triggerQueryOnClear should be forced to true if configured with search as you type and allowQueriesWithoutKeywords is true', function () {
                var advancedSetup = new Mock.AdvancedComponentSetupOptions(null, {
                    triggerQueryOnClear: false,
                    enableSearchAsYouType: true
                }, function (env) {
                    env.searchInterface.options.allowQueriesWithoutKeywords = true;
                    return env;
                });
                test = Mock.advancedComponentSetup(Querybox_1.Querybox, advancedSetup);
                expect(test.cmp.options.triggerQueryOnClear).toBe(true);
            });
        });
    });
}
exports.QueryboxTest = QueryboxTest;
 
 
/***/ }),
/* 1642 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var QueryBuilder_1 = __webpack_require__(24);
function QueryBuilderTest() {
    describe('QueryBuilder', function () {
        var queryBuilder;
        beforeEach(function () {
            queryBuilder = new QueryBuilder_1.QueryBuilder();
        });
        afterEach(function () {
            queryBuilder = null;
        });
        it('can addContextValue and addContext', function () {
            queryBuilder.addContextValue('foo', 'bar');
            expect(queryBuilder.build().context['foo']).toBe('bar');
            queryBuilder.addContext({ a: 'b', c: 'd' });
            expect(queryBuilder.build().context['foo']).toBe('bar');
            expect(queryBuilder.build().context['a']).toBe('b');
        });
        it('can addFieldsToInclude', function () {
            queryBuilder.addFieldsToInclude(['foo', 'bar', 'yo']);
            expect(queryBuilder.build().fieldsToInclude).toEqual(['foo', 'bar', 'yo']);
        });
        it('can addFieldsToExclude', function () {
            expect(queryBuilder.build().fieldsToExclude).toBeUndefined();
            queryBuilder.addFieldsToExclude(['a', 'b', 'c']);
            expect(queryBuilder.build().fieldsToExclude).toEqual(['a', 'b', 'c']);
        });
        it('can addRequiredFields', function () {
            queryBuilder.addRequiredFields(['foo', 'bar', 'yo']);
            // Should not be added, as there is not fieldsToInclude
            expect(queryBuilder.build().fieldsToInclude).toBeNull();
            queryBuilder.addFieldsToInclude(['a', 'b', 'c']);
            // Now everything should be there, as fieldsToInclude were added
            expect(queryBuilder.build().fieldsToInclude).toEqual(['foo', 'bar', 'yo', 'a', 'b', 'c']);
        });
        describe('can compute expression', function () {
            beforeEach(function () {
                queryBuilder.expression.add('basic');
                queryBuilder.advancedExpression.add('advanced');
                queryBuilder.constantExpression.add('constant');
                queryBuilder.disjunctionExpression.add('disjunction');
                queryBuilder.longQueryExpression.add('long');
            });
            it('and computeCompleteExpression', function () {
                expect(queryBuilder.computeCompleteExpression()).toBe('((basic) (advanced) (constant)) OR (disjunction)');
            });
            it('and computeCompleteExpressionParts', function () {
                expect(queryBuilder.computeCompleteExpressionParts().constant).toBe('constant');
                expect(queryBuilder.computeCompleteExpressionParts().withoutConstant).toBe('(basic) (advanced)');
                expect(queryBuilder.computeCompleteExpressionParts().full).toBe('((basic) (advanced) (constant)) OR (disjunction)');
            });
            it('and computeCompleteExpressionExcept', function () {
                expect(queryBuilder.computeCompleteExpressionExcept('advanced')).toBe('((basic) (constant)) OR (disjunction)');
                expect(queryBuilder.computeCompleteExpressionExcept('basic')).toBe('((advanced) (constant)) OR (disjunction)');
                expect(queryBuilder.computeCompleteExpressionExcept('disjunction')).toBe('(basic) (advanced) (constant)');
            });
            it('and computeCompleteExpressionPartsExcept', function () {
                expect(queryBuilder.computeCompleteExpressionPartsExcept('advanced').constant).toBe('constant');
                expect(queryBuilder.computeCompleteExpressionPartsExcept('advanced').withoutConstant).toBe('basic');
                expect(queryBuilder.computeCompleteExpressionPartsExcept('advanced').full).toBe('((basic) (constant)) OR (disjunction)');
            });
        });
        it('can add properties to query', function () {
            queryBuilder.pipeline = 'pipeline';
            queryBuilder.timezone = 'timezone';
            queryBuilder.searchHub = 'searchHub';
            queryBuilder.tab = 'tab';
            queryBuilder.maximumAge = 123;
            queryBuilder.enableWildcards = true;
            queryBuilder.enableQuestionMarks = true;
            queryBuilder.enableLowercaseOperators = true;
            queryBuilder.enablePartialMatch = true;
            queryBuilder.partialMatchKeywords = 123;
            queryBuilder.partialMatchThreshold = '50%';
            queryBuilder.firstResult = 123;
            queryBuilder.numberOfResults = 123;
            queryBuilder.excerptLength = 123;
            queryBuilder.filterField = 'filterField';
            queryBuilder.filterFieldRange = 123;
            queryBuilder.parentField = 'parentField';
            queryBuilder.childField = 'childField';
            queryBuilder.enableDidYouMean = true;
            queryBuilder.enableDebug = true;
            queryBuilder.enableCollaborativeRating = true;
            queryBuilder.sortCriteria = 'sortCriteria';
            queryBuilder.queryFunctions = [
                {
                    function: 'function',
                    fieldName: 'fieldName'
                }
            ];
            queryBuilder.rankingFunctions = [
                {
                    expression: 'expression',
                    normalizeWeight: true
                }
            ];
            queryBuilder.groupByRequests = [
                {
                    field: 'field'
                }
            ];
            queryBuilder.enableDuplicateFiltering = true;
            queryBuilder.context = {
                foo: 'bar'
            };
            queryBuilder.commerce = {
                catalogId: '14476bd7-0f84-4e05-b554-fb3ac03c0e76',
                filter: '@storeid==1001',
                operation: 'excludeCatalogObjects'
            };
            expect(queryBuilder.build().pipeline).toBe('pipeline');
            expect(queryBuilder.build().timezone).toBe('timezone');
            expect(queryBuilder.build().searchHub).toBe('searchHub');
            expect(queryBuilder.build().tab).toBe('tab');
            expect(queryBuilder.build().maximumAge).toBe(123);
            expect(queryBuilder.build().wildcards).toBe(true);
            expect(queryBuilder.build().questionMark).toBe(true);
            expect(queryBuilder.build().lowercaseOperators).toBe(true);
            expect(queryBuilder.build().partialMatch).toBe(true);
            expect(queryBuilder.build().partialMatchKeywords).toBe(123);
            expect(queryBuilder.build().partialMatchThreshold).toBe('50%');
            expect(queryBuilder.build().firstResult).toBe(123);
            expect(queryBuilder.build().numberOfResults).toBe(123);
            expect(queryBuilder.build().excerptLength).toBe(123);
            expect(queryBuilder.build().filterField).toBe('filterField');
            expect(queryBuilder.build().filterFieldRange).toBe(123);
            expect(queryBuilder.build().parentField).toBe('parentField');
            expect(queryBuilder.build().childField).toBe('childField');
            expect(queryBuilder.build().enableDidYouMean).toBe(true);
            expect(queryBuilder.build().debug).toBe(true);
            expect(queryBuilder.build().enableCollaborativeRating).toBe(true);
            expect(queryBuilder.build().sortCriteria).toBe('sortCriteria');
            expect(queryBuilder.build().queryFunctions).toEqual([
                {
                    function: 'function',
                    fieldName: 'fieldName'
                }
            ]);
            expect(queryBuilder.build().rankingFunctions).toEqual([
                {
                    expression: 'expression',
                    normalizeWeight: true
                }
            ]);
            expect(queryBuilder.build().groupBy).toEqual([
                {
                    field: 'field'
                }
            ]);
            expect(queryBuilder.build().enableDuplicateFiltering).toBe(true);
            expect(queryBuilder.build().context).toEqual({
                foo: 'bar'
            });
            expect(queryBuilder.build().commerce).toEqual({
                catalogId: '14476bd7-0f84-4e05-b554-fb3ac03c0e76',
                filter: '@storeid==1001',
                operation: 'excludeCatalogObjects'
            });
        });
        it('should be able to detect end user keywords in the basic expression', function () {
            queryBuilder.expression.add('foo');
            expect(queryBuilder.containsEndUserKeywords()).toBeTruthy();
        });
        it('should be able to detect end user keywords in the long query expression', function () {
            queryBuilder.longQueryExpression.add('foo');
            expect(queryBuilder.containsEndUserKeywords()).toBeTruthy();
        });
        it('should be able to detect if no end user keywords exist in either the basic or long expression', function () {
            expect(queryBuilder.containsEndUserKeywords()).toBeFalsy();
        });
        it('should have facets undefined if none have been added', function () {
            expect(queryBuilder.build().facets).toBeUndefined();
        });
        it('should have facetOptions defined as an empty object', function () {
            expect(queryBuilder.build().facetOptions).toEqual({});
        });
        it("if groupByRequests is empty\n      should set groupBy to undefined", function () {
            expect(queryBuilder.groupByRequests.length).toBe(0);
            expect(queryBuilder.build().groupBy).toBeUndefined();
        });
        it("if groupByRequests is not empty\n      should set groupBy to groupByRequests", function () {
            var groupByRequest = { field: '@allo' };
            queryBuilder.groupByRequests.push(groupByRequest);
            expect(queryBuilder.build().groupBy).toEqual([groupByRequest]);
        });
        describe('when adding a facet request', function () {
            var facetRequest = { facetId: 'test', field: '@test' };
            beforeEach(function () {
                queryBuilder.facetRequests.push(facetRequest);
            });
            it('should add the facets parameter correctly', function () {
                expect(queryBuilder.build().facets).toEqual([facetRequest]);
            });
        });
    });
}
exports.QueryBuilderTest = QueryBuilderTest;
 
 
/***/ }),
/* 1643 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Mock = __webpack_require__(2);
var QueryDuration_1 = __webpack_require__(810);
var Fake_1 = __webpack_require__(11);
var Simulate_1 = __webpack_require__(15);
var MiscModules_1 = __webpack_require__(97);
function QueryDurationTest() {
    describe('QueryDuration', function () {
        var test;
        var results = Fake_1.FakeResults.createFakeResults(10);
        beforeEach(function () {
            test = Mock.basicComponentSetup(QueryDuration_1.QueryDuration);
            results = Fake_1.FakeResults.createFakeResults(10);
        });
        afterEach(function () {
            test = null;
            results = null;
        });
        it('should be show with suitable value when duration is zero', function () {
            results.duration = 0;
            results.searchAPIDuration = 0;
            Simulate_1.Simulate.query(test.env, { results: results });
            expect(test.cmp.element.textContent).toBe('in 0.01 seconds');
        });
        it('should show the query duration with proper formatting when it is under 1 second', function () {
            results.duration = 123;
            results.searchAPIDuration = 1234;
            Simulate_1.Simulate.query(test.env, { results: results });
            expect(test.cmp.element.textContent).toBe('in 0.12 seconds');
        });
        it('should show the query duration with proper formatting when it is above 1 second', function () {
            results.duration = 1234;
            results.searchAPIDuration = 123;
            Simulate_1.Simulate.query(test.env, { results: results });
            expect(test.cmp.element.textContent).toBe('in 1.23 seconds');
        });
        it('should show a tooltip with the indexDuration', function () {
            results.indexDuration = 500;
            Simulate_1.Simulate.query(test.env, { results: results });
            expect(test.cmp.element.getAttribute('title')).toContain(MiscModules_1.l('IndexDuration', 'in 0.50 seconds'));
        });
        it('should show a tooltip with the searchAPIDuration', function () {
            results.searchAPIDuration = 500;
            Simulate_1.Simulate.query(test.env, { results: results });
            expect(test.cmp.element.getAttribute('title')).toContain(MiscModules_1.l('SearchAPIDuration', 'in 0.50 seconds'));
        });
        it('should show a tooltip with the duration', function () {
            results.duration = 500;
            Simulate_1.Simulate.query(test.env, { results: results });
            expect(test.cmp.element.getAttribute('title')).toContain(MiscModules_1.l('Duration', 'in 0.50 seconds'));
        });
    });
}
exports.QueryDurationTest = QueryDurationTest;
 
 
/***/ }),
/* 1644 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Mock = __webpack_require__(2);
var QuerySummary_1 = __webpack_require__(811);
var Fake_1 = __webpack_require__(11);
var Simulate_1 = __webpack_require__(15);
var Dom_1 = __webpack_require__(0);
var QueryBuilder_1 = __webpack_require__(24);
var ResultList_1 = __webpack_require__(68);
var underscore_1 = __webpack_require__(1);
var queryTag = '${query}';
function QuerySummaryTest() {
    describe('QuerySummary', function () {
        var test;
        beforeEach(function () {
            test = Mock.basicComponentSetup(QuerySummary_1.QuerySummary);
        });
        it('should not display tips when there are results', function () {
            var results = Fake_1.FakeResults.createFakeResults(10);
            Simulate_1.Simulate.query(test.env, {
                results: results
            });
            expect(Dom_1.$$(test.cmp.element).find('.coveo-query-summary-search-tips-info')).toBeNull();
            results = Fake_1.FakeResults.createFakeResults(0);
            Simulate_1.Simulate.query(test.env, {
                results: results
            });
            expect(Dom_1.$$(test.cmp.element).find('.coveo-query-summary-search-tips-info')).not.toBeNull();
        });
        it('should display result range when there are results', function () {
            var results = Fake_1.FakeResults.createFakeResults(10);
            Simulate_1.Simulate.query(test.env, {
                results: results
            });
            expect(Dom_1.$$(test.cmp.element).text()).toEqual(jasmine.stringMatching(/^Results 1-10 of 10/));
            results = Fake_1.FakeResults.createFakeResults(0);
            Simulate_1.Simulate.query(test.env, {
                results: results
            });
            expect(Dom_1.$$(test.cmp.element).text()).not.toEqual(jasmine.stringMatching(/^Results.*of.*/));
        });
        it('should not display query recall if there is no query', function () {
            var results = Fake_1.FakeResults.createFakeResults(10);
            Simulate_1.Simulate.query(test.env, {
                results: results
            });
            expect(Dom_1.$$(test.cmp.element).text()).not.toEqual(jasmine.stringMatching(/for/));
        });
        it('should display query recall if there is a query', function () {
            var queryBuilder = new QueryBuilder_1.QueryBuilder();
            queryBuilder.expression.add('foo');
            var results = Fake_1.FakeResults.createFakeResults(10);
            Simulate_1.Simulate.query(test.env, {
                results: results,
                query: queryBuilder.build()
            });
            expect(Dom_1.$$(test.cmp.element).text()).toEqual(jasmine.stringMatching(/for foo/));
        });
        it('should display query recall with spaces properly if there is a query', function () {
            var queryBuilder = new QueryBuilder_1.QueryBuilder();
            queryBuilder.expression.add('foo bar');
            var results = Fake_1.FakeResults.createFakeResults(10);
            Simulate_1.Simulate.query(test.env, {
                results: results,
                query: queryBuilder.build()
            });
            expect(Dom_1.$$(test.cmp.element).text()).toEqual(jasmine.stringMatching(/for foo bar/));
        });
        describe('when there are result lists in the page', function () {
            var resultListOne;
            var resultListTwo;
            beforeEach(function () {
                resultListOne = new ResultList_1.ResultList(Dom_1.$$('div', { className: 'CoveoResultList' }).el, null, test.env);
                resultListTwo = new ResultList_1.ResultList(Dom_1.$$('div', { className: 'CoveoResultList' }).el, null, test.env);
                test.cmp.root.appendChild(resultListOne.element);
                test.cmp.root.appendChild(resultListTwo.element);
            });
            it('should not display the results range if there is exactly one result list with infinite scroll enabled', function () {
                resultListOne.options.enableInfiniteScroll = true;
                Dom_1.$$(resultListTwo.element).remove();
                Simulate_1.Simulate.query(test.env);
                expect(Dom_1.$$(test.cmp.element).text()).not.toEqual(jasmine.stringMatching(/^Results 1-10/));
            });
            it('should display the results range if there is exactly one result list with infinite scroll disabled', function () {
                resultListOne.options.enableInfiniteScroll = false;
                Dom_1.$$(resultListTwo.element).remove();
                Simulate_1.Simulate.query(test.env);
                expect(Dom_1.$$(test.cmp.element).text()).toEqual(jasmine.stringMatching(/^Results 1-10/));
            });
            it('should not display the results range if there is at least one result list with infinite scroll enabled', function () {
                resultListOne.options.enableInfiniteScroll = true;
                resultListTwo.options.enableInfiniteScroll = false;
                Simulate_1.Simulate.query(test.env);
                expect(Dom_1.$$(test.cmp.element).text()).not.toEqual(jasmine.stringMatching(/^Results 1-10/));
            });
            it('should display query recall if possible, but not the results range if there is a result list with infinite scroll', function () {
                var queryBuilder = new QueryBuilder_1.QueryBuilder();
                queryBuilder.expression.add('foo');
                resultListOne.options.enableInfiniteScroll = true;
                Simulate_1.Simulate.query(test.env, {
                    query: queryBuilder.build()
                });
                expect(Dom_1.$$(test.cmp.element).text()).toEqual(jasmine.stringMatching(/for foo/));
                expect(Dom_1.$$(test.cmp.element).text()).not.toEqual(jasmine.stringMatching(/^Results 1-10/));
            });
        });
        describe('exposes options', function () {
            it("when enableSearchTips is set to true,\n          it should display the search tips on no results", function () {
                test = Mock.optionsComponentSetup(QuerySummary_1.QuerySummary, {
                    enableSearchTips: true
                });
                Simulate_1.Simulate.query(test.env, { results: Fake_1.FakeResults.createFakeResults(0) });
                expect(Dom_1.$$(test.cmp.element).find('.coveo-query-summary-search-tips-info')).not.toBeNull();
            });
            it("when enableSearchTips is set to false,\n          it should not display the search tips on no results", function () {
                test = Mock.optionsComponentSetup(QuerySummary_1.QuerySummary, {
                    enableSearchTips: false
                });
                Simulate_1.Simulate.query(test.env, { results: Fake_1.FakeResults.createFakeResults(0) });
                expect(Dom_1.$$(test.cmp.element).find('.coveo-query-summary-search-tips-info')).toBeNull();
            });
            it("when enableNoResultsFoundMessage is set to true,\n          it should display the no results found message on no results", function () {
                test = Mock.optionsComponentSetup(QuerySummary_1.QuerySummary, {
                    enableNoResultsFoundMessage: true
                });
                Simulate_1.Simulate.query(test.env, { results: Fake_1.FakeResults.createFakeResults(0) });
                expect(Dom_1.$$(test.cmp.element).find('.coveo-query-summary-no-results-string')).not.toBeNull();
            });
            it("when enableNoResultsFoundMessage is set to false,\n          it should not display the no results found message on no results", function () {
                test = Mock.optionsComponentSetup(QuerySummary_1.QuerySummary, {
                    enableNoResultsFoundMessage: false
                });
                Simulate_1.Simulate.query(test.env, { results: Fake_1.FakeResults.createFakeResults(0) });
                expect(Dom_1.$$(test.cmp.element).find('.coveo-query-summary-no-results-string')).toBeNull();
            });
            describe('when enableCancelLastAction is set to true, on no results', function () {
                function getCancelLastActionLink() {
                    return Dom_1.$$(test.cmp.element).find('.coveo-query-summary-cancel-last');
                }
                beforeEach(function () {
                    test = Mock.optionsComponentSetup(QuerySummary_1.QuerySummary, {
                        enableCancelLastAction: true
                    });
                    Simulate_1.Simulate.query(test.env, { results: Fake_1.FakeResults.createFakeResults(0) });
                });
                it('should display the cancel last action link', function () {
                    expect(getCancelLastActionLink()).not.toBeNull();
                });
                it('should give a tabindex to the cancel last action link', function () {
                    expect(getCancelLastActionLink().getAttribute('tabindex')).toEqual('0');
                });
                it('should give a role to the cancel last action link', function () {
                    expect(getCancelLastActionLink().getAttribute('role')).toEqual('button');
                });
            });
            it("when enableCancelLastAction is set to false,\n          it should not display the cancel last action link on no results", function () {
                test = Mock.optionsComponentSetup(QuerySummary_1.QuerySummary, {
                    enableCancelLastAction: false
                });
                Simulate_1.Simulate.query(test.env, { results: Fake_1.FakeResults.createFakeResults(0) });
                expect(Dom_1.$$(test.cmp.element).find('.coveo-query-summary-cancel-last')).toBeNull();
            });
            it("when onlyDisplaySearchTips is set to true,\n          it should not display the results range when there are results", function () {
                test = Mock.optionsComponentSetup(QuerySummary_1.QuerySummary, {
                    onlyDisplaySearchTips: true
                });
                Simulate_1.Simulate.query(test.env, { results: Fake_1.FakeResults.createFakeResults(10) });
                expect(Dom_1.$$(test.cmp.element).text()).not.toEqual(jasmine.stringMatching(/^Results.*of.*/));
            });
            it("when onlyDisplaySearchTips is set to false,\n          it should display the results range when there are results", function () {
                test = Mock.optionsComponentSetup(QuerySummary_1.QuerySummary, {
                    onlyDisplaySearchTips: false
                });
                Simulate_1.Simulate.query(test.env, { results: Fake_1.FakeResults.createFakeResults(10) });
                expect(Dom_1.$$(test.cmp.element).text()).toEqual(jasmine.stringMatching(/^Results.*of.*/));
            });
        });
        describe('when the option enableNoResultsFoundMessage is set to true', function () {
            function getCustomMessageElement() {
                return Dom_1.$$(test.cmp.element).find('.coveo-query-summary-no-results-string');
            }
            it("when there is no query tag in the noResultsFoundMessage,\n          it should not change the initial message", function () {
                test = Mock.optionsComponentSetup(QuerySummary_1.QuerySummary, {
                    enableNoResultsFoundMessage: true,
                    noResultsFoundMessage: 'customMessage'
                });
                test.env.queryStateModel.get = function () { return 'querySearched'; };
                Simulate_1.Simulate.query(test.env, { results: Fake_1.FakeResults.createFakeResults(0) });
                expect(getCustomMessageElement().textContent).toBe('customMessage');
            });
            it("when there is one query tag in the noResultsFoundMessage,\n          it should replace the query tag with the query searched", function () {
                test = Mock.optionsComponentSetup(QuerySummary_1.QuerySummary, {
                    enableNoResultsFoundMessage: true,
                    noResultsFoundMessage: "customMessage " + queryTag
                });
                test.env.queryStateModel.get = function () { return 'querySearched'; };
                Simulate_1.Simulate.query(test.env, { results: Fake_1.FakeResults.createFakeResults(0) });
                expect(getCustomMessageElement().textContent).toBe('customMessage querySearched');
            });
            it("when there is multiple query tags in the noResultsFoundMessage,\n          it should replace all the query tags with the query searched", function () {
                test = Mock.optionsComponentSetup(QuerySummary_1.QuerySummary, {
                    enableNoResultsFoundMessage: true,
                    noResultsFoundMessage: "custom " + queryTag + " Message " + queryTag
                });
                test.env.queryStateModel.get = function () { return 'querySearched'; };
                Simulate_1.Simulate.query(test.env, { results: Fake_1.FakeResults.createFakeResults(0) });
                expect(getCustomMessageElement().textContent).toBe('custom querySearched Message querySearched');
            });
            it("when mutiple no results page are triggered consecutively with different querySearched,\n          it should update the query tags with the new query searched", function () {
                test = Mock.optionsComponentSetup(QuerySummary_1.QuerySummary, {
                    enableNoResultsFoundMessage: true,
                    noResultsFoundMessage: "" + queryTag
                });
                test.env.queryStateModel.get = function () { return 'firstQuerySearched'; };
                Simulate_1.Simulate.query(test.env, { results: Fake_1.FakeResults.createFakeResults(0) });
                test.env.queryStateModel.get = function () { return 'SecondQuerySearched'; };
                Simulate_1.Simulate.query(test.env, { results: Fake_1.FakeResults.createFakeResults(0) });
                expect(getCustomMessageElement().textContent).toBe('SecondQuerySearched');
            });
            it("when the queryTag is in the attributes of an element,\n          it should replace this queryTag by the querySearched while escaping the tags", function () {
                var customMessage = "<div><a href=\"" + queryTag + "\"></a></div>";
                test = Mock.optionsComponentSetup(QuerySummary_1.QuerySummary, {
                    enableNoResultsFoundMessage: true,
                    noResultsFoundMessage: customMessage
                });
                test.env.queryStateModel.get = function () { return 'querySearched'; };
                Simulate_1.Simulate.query(test.env, { results: Fake_1.FakeResults.createFakeResults(0) });
                var highlightedText = '<span class="coveo-highlight">querySearched</span>';
                var parsedCustomMessage = underscore_1.escape('<div><a href=') + "\"" + highlightedText + "\"" + underscore_1.escape('></a></div>');
                expect(getCustomMessageElement().innerHTML).toBe(parsedCustomMessage);
            });
            it("when the query searched is an empty string,\n          it should put the string NoResult instead", function () {
                test = Mock.optionsComponentSetup(QuerySummary_1.QuerySummary, {
                    enableNoResultsFoundMessage: true,
                    noResultsFoundMessage: "customMessage " + queryTag
                });
                test.env.queryStateModel.get = function () { return ''; };
                Simulate_1.Simulate.query(test.env, { results: Fake_1.FakeResults.createFakeResults(0) });
                expect(getCustomMessageElement().textContent).toBe('No results');
            });
            it("when the query searched is the same as the queryTag,\n          it should replace the query tag with the query searched", function () {
                test = Mock.optionsComponentSetup(QuerySummary_1.QuerySummary, {
                    enableNoResultsFoundMessage: true,
                    noResultsFoundMessage: "" + queryTag
                });
                test.env.queryStateModel.get = function () { return "" + queryTag; };
                Simulate_1.Simulate.query(test.env, { results: Fake_1.FakeResults.createFakeResults(0) });
                expect(getCustomMessageElement().textContent).toBe("" + queryTag);
            });
            it("when a query tag is replaced,\n          it should escape the HTML against XSS", function () {
                test = Mock.optionsComponentSetup(QuerySummary_1.QuerySummary, {
                    enableNoResultsFoundMessage: true,
                    noResultsFoundMessage: "" + queryTag
                });
                test.env.queryStateModel.get = function () { return '<script>alert("XSS")</script>'; };
                Simulate_1.Simulate.query(test.env, { results: Fake_1.FakeResults.createFakeResults(0) });
                expect(getCustomMessageElement().innerHTML).toBe("<span class=\"coveo-highlight\">&lt;script&gt;alert(\"XSS\")&lt;/script&gt;</span>");
            });
        });
        describe('when a custom no results page is added inside the QuerySummary component', function () {
            function getcustomNoResultsPageElement() {
                return Dom_1.$$(test.cmp.element).find("." + QuerySummary_1.noResultsCssClass);
            }
            it("when there are results,\n          it should not display the custom no results page", function () {
                test.cmp.element.innerHTML = "<div class=\"" + QuerySummary_1.noResultsCssClass + "\">Custom No Results Page</div>";
                Simulate_1.Simulate.query(test.env, { results: Fake_1.FakeResults.createFakeResults(10) });
                expect(Dom_1.$$(test.cmp.element).find('.coveo-no-results')).toBeNull();
            });
            it("when there are no results,\n          it should display the custom no results page", function () {
                test.cmp.element.innerHTML = "<div class=\"" + QuerySummary_1.noResultsCssClass + "\">Custom No Results Page</div>";
                Simulate_1.Simulate.query(test.env, { results: Fake_1.FakeResults.createFakeResults(0) });
                expect(Dom_1.$$(test.cmp.element).find('.coveo-no-results')).not.toBeNull();
            });
            it("when a query tag is added in the custom no results page,\n          it should replace the query tag with the query searched", function () {
                test.cmp.element.innerHTML = "<div class=\"" + QuerySummary_1.noResultsCssClass + "\">" + queryTag + "</div>";
                test.env.queryStateModel.get = function () { return 'querySearched'; };
                Simulate_1.Simulate.query(test.env, { results: Fake_1.FakeResults.createFakeResults(0) });
                expect(getcustomNoResultsPageElement().textContent).toBe('querySearched');
            });
            it("when mutiple query tags are added in the custom no results page,\n          it should replace all the query tags with the query searched", function () {
                test.cmp.element.innerHTML = "<div class=\"" + QuerySummary_1.noResultsCssClass + "\">" + queryTag + " " + queryTag + "</div>";
                test.env.queryStateModel.get = function () { return 'querySearched'; };
                Simulate_1.Simulate.query(test.env, { results: Fake_1.FakeResults.createFakeResults(0) });
                expect(getcustomNoResultsPageElement().textContent).toBe('querySearched querySearched');
            });
            it("when mutiple no results page are triggered consecutively with different querySearched,\n          it should update the query tags with the new query searched", function () {
                test.cmp.element.innerHTML = "<div class=\"" + QuerySummary_1.noResultsCssClass + "\">" + queryTag + "</div>";
                test.env.queryStateModel.get = function () { return 'firstQuerySearched'; };
                Simulate_1.Simulate.query(test.env, { results: Fake_1.FakeResults.createFakeResults(0) });
                test.env.queryStateModel.get = function () { return 'SecondQuerySearched'; };
                Simulate_1.Simulate.query(test.env, { results: Fake_1.FakeResults.createFakeResults(0) });
                expect(getcustomNoResultsPageElement().textContent).toBe('SecondQuerySearched');
            });
            it("when the queryTag is in the attributes of an element,\n          it should replace this queryTag by the querySearched", function () {
                var customNoResultsPage = "<div><a href=\"" + queryTag + "\"></a></div>";
                test.cmp.element.innerHTML = "<div class=\"" + QuerySummary_1.noResultsCssClass + "\">" + customNoResultsPage + "</div>";
                test.env.queryStateModel.get = function () { return 'querySearched'; };
                Simulate_1.Simulate.query(test.env, { results: Fake_1.FakeResults.createFakeResults(0) });
                var parsedCustomNoResultsPage = '<div><a href="<span class=" coveo-highlight"="">querySearched"&gt;</a></div>';
                expect(getcustomNoResultsPageElement().innerHTML).toBe(parsedCustomNoResultsPage);
            });
            it("when the query searched is an empty string,\n        it should replace the query tag with the query searched", function () {
                test.env.queryStateModel.get = function () { return ''; };
                test.cmp.element.innerHTML = "<div class=\"" + QuerySummary_1.noResultsCssClass + "\">" + queryTag + "</div>";
                Simulate_1.Simulate.query(test.env, { results: Fake_1.FakeResults.createFakeResults(0) });
                expect(getcustomNoResultsPageElement().textContent).toBe('');
            });
            it("when the query searched is the same as the queryTag,\n          it should replace the query tag with the query searched", function () {
                test.env.queryStateModel.get = function () { return "" + queryTag; };
                test.cmp.element.innerHTML = "<div class=\"" + QuerySummary_1.noResultsCssClass + "\">" + queryTag + "</div>";
                Simulate_1.Simulate.query(test.env, { results: Fake_1.FakeResults.createFakeResults(0) });
                expect(getcustomNoResultsPageElement().textContent).toBe("" + queryTag);
            });
            it("when a query tag is replaced,\n          it should escape the HTML against XSS", function () {
                test.env.queryStateModel.get = function () { return '<script>alert("XSS")</script>'; };
                test.cmp.element.innerHTML = "<div class=\"" + QuerySummary_1.noResultsCssClass + "\">" + queryTag + "</div>";
                Simulate_1.Simulate.query(test.env, { results: Fake_1.FakeResults.createFakeResults(0) });
                expect(getcustomNoResultsPageElement().innerHTML).toBe("<span class=\"coveo-highlight\">&lt;script&gt;alert(\"XSS\")&lt;/script&gt;</span>");
            });
        });
    });
}
exports.QuerySummaryTest = QuerySummaryTest;
 
 
/***/ }),
/* 1645 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Mock = __webpack_require__(2);
var RecommendationAnalyticsClient_1 = __webpack_require__(320);
var Recommendation_1 = __webpack_require__(199);
var SearchInterface_1 = __webpack_require__(25);
var AnalyticsActionListMeta_1 = __webpack_require__(7);
var Fake_1 = __webpack_require__(11);
function RecommendationAnalyticsClientTest() {
    describe('RecommendationAnalyticsClient', function () {
        var client;
        var recommendation;
        var mainSearchInterface;
        var endpoint;
        var clickElement;
        beforeEach(function () {
            endpoint = Mock.mockAnalyticsEndpoint();
            mainSearchInterface = Mock.basicSearchInterfaceSetup(SearchInterface_1.SearchInterface);
            recommendation = Mock.optionsSearchInterfaceSetup(Recommendation_1.Recommendation, {
                mainSearchInterface: mainSearchInterface.env.root
            });
            client = new RecommendationAnalyticsClient_1.RecommendationAnalyticsClient(endpoint, recommendation.env.root, 'foo', 'foo display', false, 'foo run name', 'foo run version', 'default', true, recommendation.cmp.getBindings());
            clickElement = document.createElement('div');
        });
        afterEach(function () {
            endpoint = null;
            mainSearchInterface = null;
            recommendation = null;
            client = null;
            clickElement = null;
        });
        it('should change an interfaceLoad event to recommendationInterfaceLoad', function () {
            spyOn(client, 'pushSearchEvent');
            client.logSearchEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.interfaceLoad, {});
            expect(client.pushSearchEvent).toHaveBeenCalledWith(AnalyticsActionListMeta_1.analyticsActionCauseList.recommendationInterfaceLoad, jasmine.any(Object));
        });
        it('should change a documentOpen event to recommendationOpen', function () {
            spyOn(client, 'pushClickEvent');
            client.logClickEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.documentOpen, {}, Fake_1.FakeResults.createFakeResult('foo'), clickElement);
            expect(client.pushClickEvent).toHaveBeenCalledWith(AnalyticsActionListMeta_1.analyticsActionCauseList.recommendationOpen, jasmine.any(Object), jasmine.any(Object), clickElement);
        });
        it('should log a second click on the main interface', function () {
            recommendation.cmp.mainQuerySearchUID = '123';
            recommendation.cmp.mainQueryPipeline = 'main pipeline';
            client.logClickEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.documentOpen, {}, Fake_1.FakeResults.createFakeResult('foo'), clickElement);
            expect(mainSearchInterface.cmp.usageAnalytics.logClickEvent).toHaveBeenCalledWith(AnalyticsActionListMeta_1.analyticsActionCauseList.recommendationOpen, jasmine.any(Object), jasmine.objectContaining({
                pipeline: 'main pipeline',
                queryUid: '123'
            }), clickElement);
        });
        it('should not log a second click on the main interface if there were no main interface query', function () {
            client.logClickEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.documentOpen, {}, Fake_1.FakeResults.createFakeResult('foo'), clickElement);
            expect(mainSearchInterface.cmp.usageAnalytics.logClickEvent).not.toHaveBeenCalledWith(AnalyticsActionListMeta_1.analyticsActionCauseList.recommendationOpen, jasmine.any(Object), jasmine.any(Object), clickElement);
        });
    });
}
exports.RecommendationAnalyticsClientTest = RecommendationAnalyticsClientTest;
 
 
/***/ }),
/* 1646 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Mock = __webpack_require__(2);
var Dom_1 = __webpack_require__(0);
var RecommendationQuery_1 = __webpack_require__(820);
var Simulate_1 = __webpack_require__(15);
function RecommendationQueryTest() {
    describe('RecommendationQuery', function () {
        it('should be able to modify the advanced query based on its content', function () {
            var script = Dom_1.$$('script');
            script.text('@sysfiletype="youtube"');
            var test = Mock.advancedComponentSetup(RecommendationQuery_1.RecommendationQuery, new Mock.AdvancedComponentSetupOptions(script.el));
            var simulation = Simulate_1.Simulate.query(test.env);
            expect(simulation.queryBuilder.advancedExpression.build()).toBe("@sysfiletype=\"youtube\"");
        });
        it('should not modify the query if it is not a script', function () {
            var div = Dom_1.$$('div');
            div.text('@sysfiletype="youtube"');
            var test = Mock.advancedComponentSetup(RecommendationQuery_1.RecommendationQuery, new Mock.AdvancedComponentSetupOptions(div.el));
            var simulation = Simulate_1.Simulate.query(test.env);
            expect(simulation.queryBuilder.advancedExpression.build()).not.toBe("@sysfiletype=\"youtube\"");
        });
    });
}
exports.RecommendationQueryTest = RecommendationQueryTest;
 
 
/***/ }),
/* 1647 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
/// <reference path="../../lib/jasmine/index.d.ts" />
var Mock = __webpack_require__(2);
var SearchInterface_1 = __webpack_require__(25);
var Recommendation_1 = __webpack_require__(199);
var Simulate_1 = __webpack_require__(15);
var QueryBuilder_1 = __webpack_require__(24);
var Fake_1 = __webpack_require__(11);
var _ = __webpack_require__(1);
var Model_1 = __webpack_require__(26);
var QueryStateModel_1 = __webpack_require__(17);
var Dom_1 = __webpack_require__(0);
function RecommendationTest() {
    describe('Recommendation', function () {
        var mainSearchInterface;
        var test;
        var options;
        var userId = '123';
        var isHidden = function (test) {
            return Dom_1.$$(test.cmp.element).hasClass('coveo-hidden');
        };
        beforeEach(function () {
            mainSearchInterface = Mock.basicSearchInterfaceSetup(SearchInterface_1.SearchInterface);
            options = {
                mainSearchInterface: mainSearchInterface.env.root,
                userContext: {
                    user_id: userId
                }
            };
            test = Mock.optionsSearchInterfaceSetup(Recommendation_1.Recommendation, options);
        });
        afterEach(function () {
            mainSearchInterface = null;
            options = null;
            test = null;
            window['coveoanalytics'] = undefined;
        });
        it('should work if mainInterface is not specified', function () {
            var optionsWithNoMainInterface = {
                mainSearchInterface: null
            };
            expect(function () {
                new Recommendation_1.Recommendation(document.createElement('div'), optionsWithNoMainInterface);
            }).not.toThrow();
        });
        it('should not modify the query if it was not triggered by the mainInterface', function () {
            var queryBuilder = new QueryBuilder_1.QueryBuilder();
            var query = 'test';
            queryBuilder.expression.add(query);
            var simulation = Simulate_1.Simulate.query(test.env, {
                queryBuilder: queryBuilder
            });
            expect(simulation.queryBuilder.expression.build()).toEqual('test');
        });
        it('should generate a different id by default for each recommendation component', function () {
            var secondRecommendation = Mock.basicSearchInterfaceSetup(Recommendation_1.Recommendation);
            expect(test.cmp.options.id).not.toEqual(secondRecommendation.cmp.options.id);
        });
        it('should copy component options model when bound to a main search interface', function () {
            expect(mainSearchInterface.cmp.componentOptionsModel.getAttributes).toHaveBeenCalled();
            mainSearchInterface.cmp.componentOptionsModel.setMultiple({ resultLink: { alwaysOpenInNewWindow: true } });
            expect(mainSearchInterface.cmp.componentOptionsModel.getAttributes).toHaveBeenCalled();
        });
        describe('when propaging events', function () {
            var recommendation;
            beforeEach(function () {
                mainSearchInterface.cmp.element.appendChild(test.cmp.element);
                var div = Dom_1.$$('div').el;
                new Mock.MockEnvironmentBuilder().withRoot(div);
                recommendation = new Recommendation_1.Recommendation(div, options);
            });
            function addListenEventSpy(attributeName) {
                var spy = jasmine.createSpy('spy');
                var eventName = recommendation.getBindings().queryStateModel.getEventName(Model_1.Model.eventTypes.change + attributeName);
                var mainSearchInterfaceContainer = Dom_1.$$('div');
                mainSearchInterfaceContainer.on(eventName, function () {
                    spy();
                });
                return { spy: spy, eventName: eventName };
            }
            it('should prevent model events with atttributes from bubbling', function () {
                var attributeName = QueryStateModel_1.QUERY_STATE_ATTRIBUTES.Q;
                var _a = addListenEventSpy(attributeName), spy = _a.spy, eventName = _a.eventName;
                Dom_1.$$(test.cmp.element).trigger(eventName);
                expect(spy).not.toHaveBeenCalled();
            });
            it('should prevent model events without attributes from bubbling', function () {
                var _a = addListenEventSpy(''), spy = _a.spy, eventName = _a.eventName;
                Dom_1.$$(test.cmp.element).trigger(eventName);
                expect(spy).not.toHaveBeenCalled();
            });
        });
        describe('when the mainInterface triggered a query', function () {
            it('should trigger a query', function () {
                Simulate_1.Simulate.query(mainSearchInterface.env);
                expect(test.cmp.queryController.executeQuery).toHaveBeenCalled();
            });
            it('should send the recommendation id', function () {
                test.cmp.options.id = 'test';
                var simulation = Simulate_1.Simulate.query(test.env);
                expect(simulation.queryBuilder.recommendation).toEqual('test');
            });
            it('should not send the recommendation id if disabled', function () {
                test.cmp.options.id = 'test';
                test.cmp.disable();
                var simulation = Simulate_1.Simulate.query(test.env);
                expect(simulation.queryBuilder.recommendation).not.toEqual('test');
            });
            it('should only copy the optionsToUse', function () {
                _.extend(options, { optionsToUse: ['expression'] });
                test = Mock.optionsSearchInterfaceSetup(Recommendation_1.Recommendation, options);
                var queryBuilder = new QueryBuilder_1.QueryBuilder();
                var query = 'test';
                var advandcedQuery = '@field=test';
                queryBuilder.expression.add(query);
                queryBuilder.advancedExpression.add(advandcedQuery);
                Simulate_1.Simulate.query(mainSearchInterface.env, {
                    queryBuilder: queryBuilder
                });
                var simulation = Simulate_1.Simulate.query(test.env);
                expect(simulation.queryBuilder.expression).toEqual(queryBuilder.expression);
                expect(simulation.queryBuilder.advancedExpression).not.toEqual(queryBuilder.advancedExpression);
            });
            it('should add the userContext in the triggered query', function () {
                var simulation = Simulate_1.Simulate.query(test.env);
                expect(simulation.queryBuilder.context['user_id']).toEqual(userId);
            });
            it('should not add the userContext in the triggered query if disabled', function () {
                test.cmp.disable();
                var simulation = Simulate_1.Simulate.query(test.env);
                expect(simulation.queryBuilder.context).toBeUndefined();
            });
            it('should not add the userContext in the triggered query if userContext was not specified', function () {
                options = {
                    mainSearchInterface: mainSearchInterface.env.root
                };
                test = Mock.optionsSearchInterfaceSetup(Recommendation_1.Recommendation, options);
                var simulation = Simulate_1.Simulate.query(test.env);
                expect(simulation.queryBuilder.context).toBeUndefined();
            });
            it('should hide if the main interface has a query error', function () {
                Simulate_1.Simulate.queryError(mainSearchInterface.env);
                expect(isHidden(test)).toBeTruthy();
            });
            it('should hide if the main interface has no results', function () {
                Simulate_1.Simulate.query(mainSearchInterface.env, {
                    results: Fake_1.FakeResults.createFakeResults(0)
                });
                expect(isHidden(test)).toBeTruthy();
            });
            describe('exposes option hideIfNoResults', function () {
                it('should hide the interface if there are no recommendations and the option is true', function () {
                    options.hideIfNoResults = true;
                    test = Mock.optionsSearchInterfaceSetup(Recommendation_1.Recommendation, options);
                    Simulate_1.Simulate.query(test.env, { results: Fake_1.FakeResults.createFakeResults(0) });
                    expect(isHidden(test)).toBeTruthy();
                });
                it('should not hide the interface if there are no recommendations and the option is false', function () {
                    options.hideIfNoResults = false;
                    test = Mock.optionsSearchInterfaceSetup(Recommendation_1.Recommendation, options);
                    Simulate_1.Simulate.query(test.env, { results: Fake_1.FakeResults.createFakeResults(0) });
                    expect(isHidden(test)).toBeFalsy();
                });
                it('should show the interface if there are recommendations', function () {
                    Simulate_1.Simulate.query(test.env);
                    expect(test.cmp.element.style.display).not.toEqual('none');
                });
            });
            it('exposes option autoTriggerQuery that should be set to false if there is a main search interface', function () {
                expect(options.mainSearchInterface).toBeDefined();
                options.autoTriggerQuery = true;
                test = Mock.optionsSearchInterfaceSetup(Recommendation_1.Recommendation, options);
                expect(test.cmp.options.autoTriggerQuery).toBe(false);
            });
            it('exposes options autoTriggerQuery that should be left as it is if there is no main search interface', function () {
                options.mainSearchInterface = null;
                options.autoTriggerQuery = true;
                test = Mock.optionsSearchInterfaceSetup(Recommendation_1.Recommendation, options);
                expect(test.cmp.options.autoTriggerQuery).toBe(true);
            });
            it('should hide on query error', function () {
                Simulate_1.Simulate.query(test.env, { error: { message: 'oh noes', type: 'bad', name: 'foobar' } });
                expect(isHidden(test)).toBeTruthy();
            });
            it('should not be stuck in hide mode if hide is called multiple time', function () {
                test.cmp.hide();
                test.cmp.hide();
                expect(isHidden(test)).toBeTruthy();
                test.cmp.show();
                expect(isHidden(test)).toBeFalsy();
            });
            it('should not be stuck in visible mode if show is called multiple time', function () {
                test.cmp.show();
                test.cmp.show();
                expect(isHidden(test)).toBeFalsy();
                test.cmp.hide();
                expect(isHidden(test)).toBeTruthy();
            });
            it('should hide on being disabled', function () {
                test.cmp.show();
                expect(isHidden(test)).toBeFalsy();
                test.cmp.disable();
                expect(isHidden(test)).toBeTruthy();
            });
            it('should show on being enabled', function () {
                test.cmp.hide();
                expect(isHidden(test)).toBeTruthy();
                test.cmp.enable();
                expect(isHidden(test)).toBeFalsy();
            });
        });
    });
}
exports.RecommendationTest = RecommendationTest;
 
 
/***/ }),
/* 1648 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Mock = __webpack_require__(2);
var ResultAttachments_1 = __webpack_require__(821);
var UnderscoreTemplate_1 = __webpack_require__(90);
var Fake_1 = __webpack_require__(11);
var Dom_1 = __webpack_require__(0);
var Defer_1 = __webpack_require__(31);
function ResultAttachmentsTest() {
    describe('ResultAttachments', function () {
        var test;
        beforeEach(function () {
            test = Mock.basicResultComponentSetup(ResultAttachments_1.ResultAttachments);
        });
        afterEach(function () {
            test = null;
        });
        describe('exposes options', function () {
            it('resultTemplate should render the top-level attachments using the specified template', function (done) {
                var template = UnderscoreTemplate_1.UnderscoreTemplate.fromString('foo', {});
                test = Mock.optionsResultComponentSetup(ResultAttachments_1.ResultAttachments, {
                    resultTemplate: template
                }, Fake_1.FakeResults.createFakeResultWithAttachments('test', 1));
                Defer_1.Defer.defer(function () {
                    expect(Dom_1.$$(test.cmp.element).find('.coveo-result-attachments-container').innerHTML).toEqual(template.instantiateToString({}));
                    done();
                });
            });
            it('subResultTemplate should render the sub-attachments using the specified template', function (done) {
                var subTemplate = UnderscoreTemplate_1.UnderscoreTemplate.fromString('foobar', {});
                test = Mock.optionsResultComponentSetup(ResultAttachments_1.ResultAttachments, {
                    subResultTemplate: subTemplate
                }, Fake_1.FakeResults.createFakeResultWithAttachments('t', 1, undefined, undefined, undefined, true));
                Defer_1.Defer.defer(function () {
                    var subAttachments = Dom_1.$$(test.cmp.element).find('.coveo-result-attachments-container > .CoveoResultAttachments');
                    expect(subAttachments.children.length).toBe(3);
                    expect(subAttachments.firstChild.innerHTML).toEqual(subTemplate.instantiateToString({}));
                    done();
                });
            });
            it('maximumAttachmentLevel should render sub-attachments up until the specified level', function (done) {
                var fakeResult = Fake_1.FakeResults.createFakeResultWithAttachments('t', 1, undefined, undefined, undefined, true);
                fakeResult.attachments[0] = Fake_1.FakeResults.createFakeResultWithAttachments('t', 1, undefined, undefined, undefined, true);
                fakeResult.attachments[0].attachments[0] = Fake_1.FakeResults.createFakeResultWithAttachments('t', 1, undefined, undefined, undefined, true);
                test = Mock.optionsResultComponentSetup(ResultAttachments_1.ResultAttachments, {
                    maximumAttachmentLevel: 1
                }, fakeResult);
                Defer_1.Defer.defer(function () {
                    var levelOneSubAttachments = Dom_1.$$(test.cmp.element).find('.CoveoResultAttachments');
                    expect(levelOneSubAttachments).not.toBeNull();
                    var levelTwoSubAttachments = Dom_1.$$(levelOneSubAttachments).find('.CoveoResultAttachments');
                    expect(levelTwoSubAttachments).toBeNull();
                    done();
                });
            });
        });
        it('should be an empty div when there are no attachments', function (done) {
            Defer_1.Defer.defer(function () {
                expect(test.cmp.element.children.length).toBe(0);
                done();
            });
        });
        it('should not be an empty div when there are attachments', function (done) {
            test = Mock.advancedResultComponentSetup(ResultAttachments_1.ResultAttachments, Fake_1.FakeResults.createFakeResultWithAttachments('t', 3), undefined);
            Defer_1.Defer.defer(function () {
                expect(test.cmp.element.children.length).toBe(3);
                done();
            });
        });
    });
}
exports.ResultAttachmentsTest = ResultAttachmentsTest;
 
 
/***/ }),
/* 1649 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Mock = __webpack_require__(2);
var ResultFolding_1 = __webpack_require__(823);
var Fake_1 = __webpack_require__(11);
var Dom_1 = __webpack_require__(0);
var UnderscoreTemplate_1 = __webpack_require__(90);
var TemplateCache_1 = __webpack_require__(79);
var Template_1 = __webpack_require__(29);
var CardOverlayEvents_1 = __webpack_require__(671);
var underscore_1 = __webpack_require__(1);
var RegisteredNamedMethods_1 = __webpack_require__(38);
var Defer_1 = __webpack_require__(31);
var AnalyticsActionListMeta_1 = __webpack_require__(7);
function ResultFoldingTest() {
    describe('ResultFolding', function () {
        var test;
        afterEach(function () {
            test = null;
        });
        describe('after calling showMoreResults', function () {
            var test;
            var fakeResult;
            var afterMoreResults;
            beforeEach(function () {
                fakeResult = Fake_1.FakeResults.createFakeResultWithChildResult('rezzult', 4);
                fakeResult.moreResults = function () { return Promise.resolve(fakeResult.childResults); };
                test = Mock.optionsResultComponentSetup(ResultFolding_1.ResultFolding, undefined, fakeResult);
                afterMoreResults = test.cmp.showMoreResults();
            });
            afterEach(function () {
                afterMoreResults = null;
            });
            it('should get the appropriate child results', function (done) {
                afterMoreResults.then(function () {
                    expect(test.cmp.childResults).toBe(fakeResult.childResults);
                    done();
                });
            });
            it('should display the appropriate child results', function (done) {
                afterMoreResults.then(function () {
                    var displayedChildResults = Dom_1.$$(test.cmp.element).findAll('.coveo-result-folding-child-result');
                    expect(displayedChildResults.length).toBe(4);
                    var expectedTitles = underscore_1.pluck(fakeResult.childResults, 'title');
                    var actualTitles = underscore_1.map(displayedChildResults, function (res) { return Dom_1.$$(res).find('a.CoveoResultLink').innerHTML; });
                    expect(actualTitles).toEqual(expectedTitles);
                    done();
                });
            });
            it("should put an 'expanded' CSS class on the expanded results", function (done) {
                setTimeout(function () {
                    underscore_1.each(Dom_1.$$(test.cmp.element).findAll('.coveo-result-folding-child-result'), function (res) {
                        expect(Dom_1.$$(res).hasClass('coveo-expanded-child-result')).toBe(true);
                    });
                    done();
                });
            });
            it('should display the original results when showLessResults is called', function (done) {
                var tempChildResults = fakeResult.childResults;
                fakeResult.childResults = [];
                fakeResult.moreResults = function () { return Promise.resolve(tempChildResults); };
                test = Mock.optionsResultComponentSetup(ResultFolding_1.ResultFolding, undefined, fakeResult);
                test.cmp.showMoreResults();
                setTimeout(function () {
                    test.cmp.showLessResults();
                    setTimeout(function () {
                        expect(Dom_1.$$(Dom_1.$$(test.cmp.element).find('.coveo-folding-results')).isEmpty()).toBe(true);
                        done();
                    });
                });
            });
            it('should remove loading animation if the result template throws an error ', function (done) {
                var tempChildResults = fakeResult.childResults;
                fakeResult.childResults = [];
                fakeResult.moreResults = function () { return Promise.resolve(tempChildResults); };
                test = Mock.optionsResultComponentSetup(ResultFolding_1.ResultFolding, undefined, fakeResult);
                test.cmp.options.resultTemplate = new Template_1.Template(function () {
                    throw 'Oh, the Humanity!';
                });
                test.cmp.showMoreResults();
                expect(Dom_1.$$(test.cmp.element).find('.coveo-loading-spinner')).toBeTruthy();
                setTimeout(function () {
                    expect(Dom_1.$$(test.cmp.element).find('.coveo-loading-spinner')).toBeNull();
                    done();
                });
            });
        });
        describe('exposes options', function () {
            it('resultTemplate should use the default result template when not defined', function () {
                test = Mock.optionsResultComponentSetup(ResultFolding_1.ResultFolding, {
                    resultTemplate: undefined
                }, undefined);
                expect(test.cmp.options.resultTemplate.constructor.name).toBe('DefaultFoldingTemplate');
            });
            it('normalCaption should be set properly when not expanded and expanded caption is defined', function () {
                test = Mock.optionsResultComponentSetup(ResultFolding_1.ResultFolding, {
                    normalCaption: 'foobar',
                    expandedCaption: 'obligatory'
                }, Fake_1.FakeResults.createFakeResultWithChildResult('heyo', 3));
                expect(Dom_1.$$(test.cmp.element).find('.coveo-folding-normal-caption').innerHTML).toContain('foobar');
            });
            it('expandedCaption should be set properly when expanded and normal caption is defined', function () {
                test = Mock.optionsResultComponentSetup(ResultFolding_1.ResultFolding, {
                    expandedCaption: 'foobar',
                    normalCaption: 'obligatory'
                }, Fake_1.FakeResults.createFakeResultWithChildResult('heyo', 3));
                test.cmp.result.moreResults = function () { return Promise.resolve(null); };
                test.cmp.showMoreResults();
                expect(Dom_1.$$(test.cmp.element).find('.coveo-folding-expanded-caption').innerHTML).toContain('foobar');
            });
            it('normalCaption and extendedCaption should not be shown if one or the other is not defined', function () {
                test = Mock.optionsResultComponentSetup(ResultFolding_1.ResultFolding, {
                    expandedCaption: 'foobar',
                    normalCaption: undefined
                }, Fake_1.FakeResults.createFakeResultWithChildResult('heyo', 3));
                test.cmp.result.moreResults = function () { return Promise.resolve(null); };
                test.cmp.showMoreResults();
                expect(Dom_1.$$(test.cmp.element).find('.coveo-folding-expanded-caption')).toBeNull();
                test = Mock.optionsResultComponentSetup(ResultFolding_1.ResultFolding, {
                    normalCaption: 'foobar',
                    expandedCaption: undefined
                }, Fake_1.FakeResults.createFakeResultWithChildResult('heyo', 3));
                expect(Dom_1.$$(test.cmp.element).find('.coveo-folding-normal-caption')).toBeNull();
            });
            it('moreCaption should set the appropriate caption on the expand link', function () {
                var fakeResult = Fake_1.FakeResults.createFakeResult();
                fakeResult.moreResults = function () { return Promise.resolve([]); };
                test = Mock.optionsResultComponentSetup(ResultFolding_1.ResultFolding, {
                    moreCaption: 'foobar'
                }, fakeResult);
                expect(Dom_1.$$(test.cmp.element.parentElement).find('.coveo-folding-show-more').innerHTML).toBe('foobar');
            });
            it('lessCaption should set the appropriate caption on the unexpand link', function () {
                var fakeResult = Fake_1.FakeResults.createFakeResult();
                fakeResult.moreResults = function () { return Promise.resolve([]); };
                test = Mock.optionsResultComponentSetup(ResultFolding_1.ResultFolding, {
                    lessCaption: 'foobar'
                }, fakeResult);
                expect(Dom_1.$$(test.cmp.element.parentElement).find('.coveo-folding-show-less').innerHTML).toBe('foobar');
            });
            it('oneResultCaption should set the appropriate caption when there is only one result', function () {
                test = Mock.optionsResultComponentSetup(ResultFolding_1.ResultFolding, {
                    oneResultCaption: 'foobar'
                }, Fake_1.FakeResults.createFakeResult());
                expect(Dom_1.$$(test.cmp.element).find('.coveo-folding-oneresult-caption').innerHTML).toBe('foobar');
            });
        });
        it("should not display the 'more' link when moreResults handler is not available", function (done) {
            test = Mock.basicResultComponentSetup(ResultFolding_1.ResultFolding);
            Defer_1.Defer.defer(function () {
                expect(Dom_1.$$(test.cmp.element).find('.coveo-folding-show-more')).toBeNull();
                done();
            });
        });
        it('should not display any header caption when there are no child results', function (done) {
            var fakeResult = Fake_1.FakeResults.createFakeResult();
            fakeResult.childResults = [];
            test = Mock.optionsResultComponentSetup(ResultFolding_1.ResultFolding, {
                normalCaption: 'normal',
                expandedCaption: 'expanded'
            }, fakeResult);
            Defer_1.Defer.defer(function () {
                expect(Dom_1.$$(test.cmp.element).find('.coveo-folding-normal-caption').style.display).toBe('none');
                expect(Dom_1.$$(test.cmp.element).find('.coveo-folding-expanded-caption').style.display).toBe('none');
                done();
            });
        });
        it("should put a 'normal' caption on unexpanded search results", function (done) {
            test = Mock.optionsResultComponentSetup(ResultFolding_1.ResultFolding, undefined, Fake_1.FakeResults.createFakeResultWithChildResult('rez', 10));
            Defer_1.Defer.defer(function () {
                underscore_1.each(Dom_1.$$(test.cmp.element).findAll('.coveo-result-folding-child-result'), function (res) {
                    expect(Dom_1.$$(res).hasClass('coveo-normal-child-result')).toBe(true);
                    done();
                });
            });
        });
        it('should load template properly', function (done) {
            test = Mock.optionsResultComponentSetup(ResultFolding_1.ResultFolding, {
                resultTemplate: UnderscoreTemplate_1.UnderscoreTemplate.fromString('Foo', {})
            }, Fake_1.FakeResults.createFakeResultWithChildResult('razzza', 2));
            Defer_1.Defer.defer(function () {
                underscore_1.each(Dom_1.$$(test.cmp.element).findAll('.coveo-result-folding-child-result'), function (result) {
                    expect(result.innerHTML).toBe('Foo');
                });
                done();
            });
        });
        it("should automatically initialize components in child results' templates", function (done) {
            var fakeResult = Fake_1.FakeResults.createFakeResultWithChildResult('test', 3);
            test = Mock.optionsResultComponentSetup(ResultFolding_1.ResultFolding, {
                resultTemplate: UnderscoreTemplate_1.UnderscoreTemplate.fromString('<a class="CoveoResultLink" />', {})
            }, fakeResult);
            Defer_1.Defer.defer(function () {
                underscore_1.each(Dom_1.$$(test.cmp.element).findAll('.coveo-result-folding-child-result'), function (result, i) {
                    expect(result.getAttribute('href')).toBe(fakeResult.childResults[i].clickUri);
                });
                done();
            });
        });
        it('can load an external template from an id', function (done) {
            TemplateCache_1.TemplateCache.registerTemplate('Foo', UnderscoreTemplate_1.UnderscoreTemplate.fromString('foubarre', {}));
            test = Mock.advancedResultComponentSetup(ResultFolding_1.ResultFolding, Fake_1.FakeResults.createFakeResult(), {
                element: Dom_1.$$('div', { 'data-result-template-id': 'Foo' }).el
            });
            test.cmp.options.resultTemplate.instantiateToElement({}).then(function (elem) {
                expect(elem.innerHTML).toBe('foubarre');
                done();
            });
        });
        it('should automatically use the template inside its element', function (done) {
            test = Mock.advancedResultComponentSetup(ResultFolding_1.ResultFolding, Fake_1.FakeResults.createFakeResult(), {
                element: Dom_1.$$('div', {}, Dom_1.$$('script', { className: 'result-template', type: 'text/underscore' }, 'heyo')).el
            });
            test.cmp.options.resultTemplate.instantiateToElement({}).then(function (elem) {
                expect(elem.innerHTML).toBe('heyo');
                done();
            });
        });
        it('should show or hide elements with special classes when expanding or unexpanding', function (done) {
            var templateStr = '<div class="coveo-show-if-normal"></div><div class="coveo-show-if-expanded"></div>';
            var result = Fake_1.FakeResults.createFakeResultWithChildResult('foo', 3);
            result.moreResults = function () { return Promise.resolve(result.childResults); };
            test = Mock.optionsResultComponentSetup(ResultFolding_1.ResultFolding, {
                resultTemplate: UnderscoreTemplate_1.UnderscoreTemplate.fromString(templateStr, {})
            }, result);
            Defer_1.Defer.defer(function () {
                expect(Dom_1.$$(test.cmp.element).find('.coveo-show-if-normal').style.display).not.toBe('none');
                expect(Dom_1.$$(test.cmp.element).find('.coveo-show-if-expanded').style.display).toBe('none');
                test.cmp.showMoreResults().then(function () {
                    expect(Dom_1.$$(test.cmp.element).find('.coveo-show-if-normal').style.display).toBe('none');
                    expect(Dom_1.$$(test.cmp.element).find('.coveo-show-if-expanded').style.display).not.toBe('none');
                    done();
                });
            });
        });
        it('should call usage analytics when showing more results', function (done) {
            var result = Fake_1.FakeResults.createFakeResultWithChildResult('foo', 3);
            test = Mock.optionsResultComponentSetup(ResultFolding_1.ResultFolding, {}, result);
            result.moreResults = function () { return Promise.resolve(result.childResults); };
            test.cmp.showMoreResults().then(function () {
                expect(test.env.usageAnalytics.logClickEvent).toHaveBeenCalledWith(AnalyticsActionListMeta_1.analyticsActionCauseList.foldingShowMore, jasmine.objectContaining({
                    documentURL: result.clickUri,
                    documentTitle: result.title,
                    author: result.raw['author']
                }), result, test.cmp.element);
                done();
            });
        });
        it('should call usage analytics when showing less results', function () {
            var result = Fake_1.FakeResults.createFakeResultWithChildResult('foo', 3);
            test = Mock.optionsResultComponentSetup(ResultFolding_1.ResultFolding, {}, result);
            result.moreResults = function () { return Promise.resolve(result.childResults); };
            test.cmp.showLessResults();
            expect(test.env.usageAnalytics.logCustomEvent).toHaveBeenCalledWith(AnalyticsActionListMeta_1.analyticsActionCauseList.foldingShowLess, jasmine.objectContaining({
                documentURL: result.clickUri,
                documentTitle: result.title,
                author: result.raw['author']
            }), test.cmp.element);
        });
        it('should call showMoreResults when its parent CardOverlay *first* triggers openCardOverlay', function (done) {
            var parentCardOverlay = Dom_1.$$('div', { className: 'CoveoCardOverlay' }, Dom_1.$$('div')).el;
            var result = Fake_1.FakeResults.createFakeResult();
            result.moreResults = function () { return undefined; }; // moreResults needs to exist
            test = Mock.advancedResultComponentSetup(ResultFolding_1.ResultFolding, result, {
                element: parentCardOverlay.firstChild
            });
            Defer_1.Defer.defer(function () {
                spyOn(test.cmp, 'showMoreResults');
                Dom_1.$$(parentCardOverlay).trigger(CardOverlayEvents_1.CardOverlayEvents.openCardOverlay);
                Dom_1.$$(parentCardOverlay).trigger(CardOverlayEvents_1.CardOverlayEvents.openCardOverlay);
                expect(test.cmp.showMoreResults).toHaveBeenCalledTimes(1);
                done();
            });
        });
        it('should call showMoreResults when clicking on the showMore button', function (done) {
            var result = Fake_1.FakeResults.createFakeResult();
            result.moreResults = function () { return undefined; }; // moreResults needs to exist
            test = Mock.advancedResultComponentSetup(ResultFolding_1.ResultFolding, result);
            Defer_1.Defer.defer(function () {
                spyOn(test.cmp, 'showMoreResults');
                var showMoreElement = Dom_1.$$(test.cmp.element.parentElement).find('.coveo-folding-footer-section-for-less');
                Dom_1.$$(showMoreElement).trigger('click');
                expect(test.cmp.showMoreResults).toHaveBeenCalledTimes(1);
                done();
            });
        });
        it('should call showLessResults when clicking on the showLess button', function (done) {
            var result = Fake_1.FakeResults.createFakeResult();
            result.moreResults = function () { return undefined; };
            test = Mock.advancedResultComponentSetup(ResultFolding_1.ResultFolding, result);
            Defer_1.Defer.defer(function () {
                spyOn(test.cmp, 'showLessResults');
                var showLessElement = Dom_1.$$(test.cmp.element.parentElement).find('.coveo-folding-footer-section-for-more');
                Dom_1.$$(showLessElement).trigger('click');
                expect(test.cmp.showLessResults).toHaveBeenCalledTimes(1);
                done();
            });
        });
        it('should call Quickview open when ResultLink has openQuickview option', function (done) {
            var result = Fake_1.FakeResults.createFakeResultWithChildResult('foo', 1);
            result.childResults[0].flags = 'HasHtmlVersion';
            test = Mock.optionsResultComponentSetup(ResultFolding_1.ResultFolding, {
                resultTemplate: UnderscoreTemplate_1.UnderscoreTemplate.fromString('<div class="CoveoQuickview"></div><a class="CoveoResultLink" data-open-quickview="true"/>', {})
            }, result);
            Defer_1.Defer.defer(function () {
                var quickview = Dom_1.$$(test.cmp.element).find('.CoveoQuickview');
                var resultLink = Dom_1.$$(test.cmp.element).find('.CoveoResultLink');
                var spyOnQuickviewOpen = jasmine.createSpy('openQuickview');
                RegisteredNamedMethods_1.get(quickview).open = spyOnQuickviewOpen;
                resultLink.click();
                expect(spyOnQuickviewOpen).toHaveBeenCalled();
                done();
            });
        });
    });
}
exports.ResultFoldingTest = ResultFoldingTest;
 
 
/***/ }),
/* 1650 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Mock = __webpack_require__(2);
var ResultLink_1 = __webpack_require__(56);
var HighlightUtils_1 = __webpack_require__(82);
var Dom_1 = __webpack_require__(0);
var AnalyticsActionListMeta_1 = __webpack_require__(7);
var OSUtils_1 = __webpack_require__(317);
var Fake_1 = __webpack_require__(11);
var Core_1 = __webpack_require__(9);
function ResultLinkTest() {
    describe('ResultLink', function () {
        var test;
        var fakeResult;
        function buildFakeResult() {
            var fakeResult = Fake_1.FakeResults.createFakeResult();
            fakeResult.title = 'A test title';
            fakeResult.titleHighlights = [{ offset: 2, length: 4 }];
            fakeResult.clickUri = 'http://www.coveo.com';
            return fakeResult;
        }
        function initResultLink(options) {
            test = Mock.advancedResultComponentSetup(ResultLink_1.ResultLink, fakeResult, options);
        }
        function htmlContainingXSS() {
            return '<IMG SRC=/ onerror="alert(String.fromCharCode(88,83,83))"></img>';
        }
        describe('with a tabindex', function () {
            beforeEach(function () {
                fakeResult = buildFakeResult();
                initResultLink(new Mock.AdvancedComponentSetupOptions(Dom_1.$$('a', { className: 'CoveoResultList', tabindex: '1337' }).el));
            });
            it('does not replace the tabindex', function () {
                expect(test.cmp.element.getAttribute('tabindex')).toBe('1337');
            });
        });
        describe('with default parameters', function () {
            beforeEach(function () {
                fakeResult = buildFakeResult();
                initResultLink();
                spyOn(test.cmp, 'openLink');
                spyOn(window, 'open');
            });
            afterEach(function () {
                test = null;
                fakeResult = null;
            });
            it('should have its tabindex value set to 0', function () {
                expect(test.cmp.element.getAttribute('tabindex')).toBe('0');
            });
            it('should have an aria-label to prevent screen readers from reading the #title attribute', function () {
                expect(test.cmp.element.getAttribute('aria-label')).toBe(test.cmp.element.title);
            });
            describe('with global result link options', function () {
                function createEnvWithGlobalResultLinkOptions() {
                    var searchInterface = test.env.searchInterface;
                    searchInterface.options.originalOptionsObject = (_a = {},
                        _a[ResultLink_1.ResultLink.ID] = {
                            alwaysOpenInNewWindow: true
                        },
                        _a);
                    return new Mock.MockEnvironmentBuilder().withResult(fakeResult).withSearchInterface(searchInterface);
                    var _a;
                }
                it('the global options are used', function () {
                    var env = createEnvWithGlobalResultLinkOptions();
                    var cmp = new ResultLink_1.ResultLink(env.getBindings().element, {}, env.getBindings(), env.result, env.os);
                    expect(cmp.options.alwaysOpenInNewWindow).toBe(true);
                });
                it("when options are defined on the result link component,\n        the local options override the global options", function () {
                    var env = createEnvWithGlobalResultLinkOptions();
                    var cmp = new ResultLink_1.ResultLink(env.getBindings().element, { alwaysOpenInNewWindow: false }, env.getBindings(), env.result, env.os);
                    expect(cmp.options.alwaysOpenInNewWindow).toBe(false);
                });
            });
            describe("when the template contains two " + ResultLink_1.ResultLink.ID + " elements", function () {
                var template;
                function buildResultWithTwoResultLinks() {
                    var result = Dom_1.$$('div', { className: 'CoveoResult' }).el;
                    Dom_1.$$(result).append(buildResultLink());
                    Dom_1.$$(result).append(buildResultLink());
                    return result;
                }
                function buildResultLink() {
                    return Dom_1.$$('div', { className: 'CoveoResultLink' }).el;
                }
                beforeEach(function () {
                    template = buildResultWithTwoResultLinks();
                    var result = Fake_1.FakeResults.createFakeResult();
                    Core_1.Initialization.automaticallyCreateComponentsInsideResult(template, result);
                });
            });
            it('should hightlight the result title', function () {
                expect(test.cmp.element.innerHTML).toEqual(HighlightUtils_1.HighlightUtils.highlightString(fakeResult.title, fakeResult.titleHighlights, null, 'coveo-highlight'));
            });
            it("when the title contains a html element, it does not render the element to prevent XSS", function () {
                fakeResult.title = htmlContainingXSS();
                initResultLink();
                expect(test.cmp.element.innerHTML).toBe('&lt;I<span class="coveo-highlight">MG S</span>RC=/ onerror="alert(String.fromCharCode(88,83,83))"&gt;&lt;/img&gt;');
            });
            it('should set the title attribute to the result title when no options are provided', function () {
                expect(test.cmp.element.title).toEqual(fakeResult.title);
            });
            it('should contain the clickUri if the result has no title', function () {
                fakeResult.title = undefined;
                fakeResult.clickUri = 'https://www.google.com?q=hello&geo=world';
                initResultLink();
                var encodedUri = fakeResult.clickUri.replace('&', '&amp;');
                expect(test.cmp.element.innerHTML).toEqual(encodedUri);
            });
            it("when the title is empty and the clickuri contains a html element,\n      it does not render the element to prevent XSS", function () {
                fakeResult.title = '';
                fakeResult.clickUri = htmlContainingXSS();
                initResultLink();
                expect(test.cmp.element.children.length).toBe(0);
                expect(test.cmp.element.innerHTML).toBe('&lt;IMG SRC=/ onerror="alert(String.fromCharCode(88,83,83))"&gt;&lt;/img&gt;');
            });
            it('can receive an onClick option to execute', function (done) {
                test = Mock.advancedResultComponentSetup(ResultLink_1.ResultLink, fakeResult, new Mock.AdvancedComponentSetupOptions(Dom_1.$$('div').el, {
                    onClick: function () {
                        expect(true).toBe(true);
                        done();
                    }
                }));
                Dom_1.$$(test.cmp.element).trigger('click');
            });
            it('sends an analytic event on click', function () {
                Dom_1.$$(test.cmp.element).trigger('click');
                expect(test.cmp.usageAnalytics.logClickEvent).toHaveBeenCalledTimes(1);
            });
            describe('exposes hrefTemplate', function () {
                it('when the href starts with a protocol that enables XSS, it returns an empty string', function () {
                    var hrefTemplate = 'javascript:alert(1)';
                    test = Mock.optionsResultComponentSetup(ResultLink_1.ResultLink, { hrefTemplate: hrefTemplate }, fakeResult);
                    test.cmp.openLinkInNewWindow();
                    expect(window.open).toHaveBeenCalledWith('', jasmine.anything());
                });
                it('should not modify the href template if there are no field specified', function () {
                    var hrefTemplate = 'http://test';
                    test = Mock.optionsResultComponentSetup(ResultLink_1.ResultLink, { hrefTemplate: hrefTemplate }, fakeResult);
                    test.cmp.openLinkInNewWindow();
                    expect(window.open).toHaveBeenCalledWith(hrefTemplate, jasmine.anything());
                });
                it('should replace fields in the href template by the results equivalent', function () {
                    var hrefTemplate = 'http://${title}';
                    test = Mock.optionsResultComponentSetup(ResultLink_1.ResultLink, { hrefTemplate: hrefTemplate }, fakeResult);
                    test.cmp.openLinkInNewWindow();
                    expect(window.open).toHaveBeenCalledWith("http://" + fakeResult.title, jasmine.anything());
                });
                it('should support nested values in result', function () {
                    var hrefTemplate = 'http://${raw.number}';
                    test = Mock.optionsResultComponentSetup(ResultLink_1.ResultLink, { hrefTemplate: hrefTemplate }, fakeResult);
                    test.cmp.openLinkInNewWindow();
                    expect(window.open).toHaveBeenCalledWith("http://" + fakeResult.raw['number'].toString(), jasmine.anything());
                });
                it('should not parse standalone accolades', function () {
                    var hrefTemplate = 'http://${raw.number}{test}';
                    test = Mock.optionsResultComponentSetup(ResultLink_1.ResultLink, { hrefTemplate: hrefTemplate }, fakeResult);
                    test.cmp.openLinkInNewWindow();
                    expect(window.open).toHaveBeenCalledWith("http://" + fakeResult.raw['number'] + "{test}", jasmine.anything());
                });
                it('should support external fields', function () {
                    window['Coveo']['test'] = 'testExternal';
                    var hrefTemplate = 'http://${Coveo.test}';
                    test = Mock.optionsResultComponentSetup(ResultLink_1.ResultLink, { hrefTemplate: hrefTemplate }, fakeResult);
                    test.cmp.openLinkInNewWindow();
                    expect(window.open).toHaveBeenCalledWith('http://testExternal', jasmine.anything());
                    window['Coveo']['test'] = undefined;
                });
                it('should support nested external fields with more than 2 keys', function () {
                    window['Coveo']['test'] = { key: 'testExternal' };
                    var hrefTemplate = 'http://${Coveo.test.key}';
                    test = Mock.optionsResultComponentSetup(ResultLink_1.ResultLink, { hrefTemplate: hrefTemplate }, fakeResult);
                    test.cmp.openLinkInNewWindow();
                    expect(window.open).toHaveBeenCalledWith('http://testExternal', jasmine.anything());
                    window['Coveo']['test'] = undefined;
                });
            });
            describe('exposes the titleTemplate', function () {
                var titleTemplate = '';
                afterEach(function () {
                    titleTemplate = '';
                });
                function initResultLinkWithTitleTemplate() {
                    test = Mock.optionsResultComponentSetup(ResultLink_1.ResultLink, { titleTemplate: titleTemplate }, fakeResult);
                }
                it('should set the title attribute to the text version of the displayed title', function () {
                    titleTemplate = 'foo ${clickUri}';
                    initResultLinkWithTitleTemplate();
                    expect(test.cmp.element.title).toEqual("foo " + fakeResult.clickUri);
                });
                it('should replaces fields in the title template by the results equivalent', function () {
                    titleTemplate = '${clickUri}';
                    initResultLinkWithTitleTemplate();
                    expect(Dom_1.$$(test.cmp.element).text()).toEqual(fakeResult.clickUri);
                });
                it("when the field referenced in the title template contains XSS html,\n        it escapes the html to prevent XSS", function () {
                    titleTemplate = '${clickUri}';
                    fakeResult.clickUri = htmlContainingXSS();
                    initResultLinkWithTitleTemplate();
                    expect(test.cmp.element.innerHTML).toEqual('&lt;IMG SRC=/ onerror="alert(String.fromCharCode(88,83,83))"&gt;&lt;/img&gt;');
                });
                it('should support nested values in result', function () {
                    titleTemplate = '${raw.number}';
                    initResultLinkWithTitleTemplate();
                    expect(test.cmp.element.innerHTML).toEqual(fakeResult.raw['number'].toString());
                });
                it('should not parse standalone accolades', function () {
                    titleTemplate = '${raw.number}{test}';
                    initResultLinkWithTitleTemplate();
                    expect(test.cmp.element.innerHTML).toEqual(fakeResult.raw['number'].toString() + '{test}');
                });
                it('should support external fields', function () {
                    window['Coveo']['test'] = 'testExternal';
                    titleTemplate = '${Coveo.test}';
                    initResultLinkWithTitleTemplate();
                    expect(test.cmp.element.innerHTML).toEqual('testExternal');
                    window['Coveo']['test'] = undefined;
                });
                it('should support external fields with more than 2 keys', function () {
                    window['Coveo']['test'] = { key: 'testExternal' };
                    titleTemplate = '${Coveo.test.key}';
                    initResultLinkWithTitleTemplate();
                    expect(test.cmp.element.innerHTML).toEqual('testExternal');
                    window['Coveo']['test'] = undefined;
                });
                it('should print the title if the option is set but the template is empty', function () {
                    titleTemplate = '';
                    initResultLinkWithTitleTemplate();
                    expect(Dom_1.$$(test.cmp.element).text()).toEqual(fakeResult.title);
                });
                it('should print the template if the key used in the template is undefined', function () {
                    titleTemplate = '${doesNotExist}';
                    initResultLinkWithTitleTemplate();
                    expect(Dom_1.$$(test.cmp.element).text()).toEqual('${doesNotExist}');
                });
            });
            it('sends an analytics event on context menu', function () {
                Dom_1.$$(test.cmp.element).trigger('contextmenu');
                expect(test.cmp.usageAnalytics.logClickEvent).toHaveBeenCalledTimes(1);
            });
            it('sends an analytics event on mouseup', function () {
                Dom_1.$$(test.cmp.element).trigger('mouseup');
                expect(test.cmp.usageAnalytics.logClickEvent).toHaveBeenCalledTimes(1);
            });
            it('sends an analytics event on mousedown', function () {
                Dom_1.$$(test.cmp.element).trigger('mousedown');
                expect(test.cmp.usageAnalytics.logClickEvent).toHaveBeenCalledTimes(1);
            });
            it('does not send multiple analytics events with multiple mouse events', function () {
                Dom_1.$$(test.cmp.element).trigger('mousedown');
                Dom_1.$$(test.cmp.element).trigger('click');
                Dom_1.$$(test.cmp.element).trigger('mouseup');
                expect(test.cmp.usageAnalytics.logClickEvent).toHaveBeenCalledTimes(1);
            });
            it('sends an event 1s after a long press on mobile', function (done) {
                Dom_1.$$(test.cmp.element).trigger('touchstart');
                expect(test.cmp.usageAnalytics.logClickEvent).not.toHaveBeenCalled();
                setTimeout(function () {
                    expect(test.cmp.usageAnalytics.logClickEvent).toHaveBeenCalledTimes(1);
                    done();
                }, 1100);
            });
            it('does not send an event if a touchend event occurs before a 1s delay', function (done) {
                Dom_1.$$(test.cmp.element).trigger('touchstart');
                setTimeout(function () {
                    Dom_1.$$(test.cmp.element).trigger('touchend');
                }, 300);
                setTimeout(function () {
                    expect(test.cmp.usageAnalytics.logClickEvent).not.toHaveBeenCalled();
                    done();
                }, 1100);
            });
            describe('when logging the analytic event', function () {
                it('should use the href if set', function () {
                    var element = Dom_1.$$('a');
                    var href = 'javascript:void(0)';
                    element.setAttribute('href', href);
                    test = Mock.advancedResultComponentSetup(ResultLink_1.ResultLink, fakeResult, new Mock.AdvancedComponentSetupOptions(element.el));
                    spyOn(test.cmp, 'openLink');
                    Dom_1.$$(test.cmp.element).trigger('click');
                    expect(test.cmp.usageAnalytics.logClickEvent).toHaveBeenCalledWith(AnalyticsActionListMeta_1.analyticsActionCauseList.documentOpen, jasmine.objectContaining({ documentURL: href }), fakeResult, test.cmp.root);
                });
                it('should not log analytics when logAnalytics is set', function () {
                    var element = Dom_1.$$('a');
                    test = Mock.advancedResultComponentSetup(ResultLink_1.ResultLink, fakeResult, new Mock.AdvancedComponentSetupOptions(element.el, { logAnalytics: function () { } }));
                    spyOn(test.cmp, 'openLink');
                    Dom_1.$$(test.cmp.element).trigger('click');
                    expect(test.cmp.usageAnalytics.logClickEvent).not.toHaveBeenCalled();
                });
                it("should call logAnalytics when it's set", function () {
                    var element = Dom_1.$$('a');
                    var logAnalyticsSpy = jasmine.createSpy('logAnalytics');
                    test = Mock.advancedResultComponentSetup(ResultLink_1.ResultLink, fakeResult, new Mock.AdvancedComponentSetupOptions(element.el, { logAnalytics: logAnalyticsSpy }));
                    spyOn(test.cmp, 'openLink');
                    Dom_1.$$(test.cmp.element).trigger('click');
                    expect(logAnalyticsSpy).toHaveBeenCalledTimes(1);
                });
                it('should use the clickUri if the href is empty', function () {
                    Dom_1.$$(test.cmp.element).trigger('click');
                    expect(test.cmp.usageAnalytics.logClickEvent).toHaveBeenCalledWith(AnalyticsActionListMeta_1.analyticsActionCauseList.documentOpen, jasmine.objectContaining({ documentURL: fakeResult.clickUri }), fakeResult, test.cmp.root);
                });
            });
            describe('when the element is a hyperlink', function () {
                function initHyperLink(options) {
                    test = Mock.advancedResultComponentSetup(ResultLink_1.ResultLink, fakeResult, new Mock.AdvancedComponentSetupOptions(Dom_1.$$('a').el, options));
                }
                beforeEach(function () {
                    initHyperLink();
                });
                it('should set the href to the result click uri', function () {
                    expect(test.cmp.element.getAttribute('href')).toEqual(fakeResult.clickUri);
                });
                it("when the href contains \"&\" characters,\n          should set the href the unescaped the result click uri", function () {
                    fakeResult.clickUri =
                        'https://testing.com/supportcenter/portal?DataSource=Solutions&eventSubmit_doNavigate=&PageNumber=Prev&tab=Solutions&ts=6';
                    initHyperLink();
                    expect(test.cmp.element.getAttribute('href')).toEqual(fakeResult.clickUri);
                });
                it('when the clickUri is a relative url with a slash, it sets the href to the uri', function () {
                    fakeResult.clickUri = '/casemgmt/sc_KnowledgeArticle?sfdcid=ka32C0000009t9CQAQ&type=Solution';
                    initHyperLink();
                    expect(test.cmp.element.getAttribute('href')).toEqual(fakeResult.clickUri);
                });
                it('when the uri is a relative url with a period, it sets the href to the uri', function () {
                    fakeResult.clickUri = './articles/ka32C0000009t9CQAQ';
                    initHyperLink();
                    expect(test.cmp.element.getAttribute('href')).toEqual(fakeResult.clickUri);
                });
                it('when the uri is a relative url with two periods, it sets the href to the uri', function () {
                    fakeResult.clickUri = '../articles/ka32C0000009t9CQAQ';
                    initHyperLink();
                    expect(test.cmp.element.getAttribute('href')).toEqual(fakeResult.clickUri);
                });
                it('when the clickUri is a string containing but not starting with a slash, it sets the href to an empty string', function () {
                    fakeResult.clickUri = 'casemgmt/sc_KnowledgeArticle';
                    initHyperLink();
                    expect(test.cmp.element.getAttribute('href')).toEqual('');
                });
                it("when the uri (clickUri) defined in the results contains the javascript protocol,\n          it clears the value to prevent XSS", function () {
                    fakeResult.clickUri = 'JavaScript:void(0)';
                    initHyperLink();
                    expect(test.cmp.element.getAttribute('href')).toEqual('');
                });
                it("when the field option is defined and the field contains the javascript protocol,\n          it clears the value to prevent XSS", function () {
                    fakeResult.raw['test'] = 'javascript:void(0)';
                    initHyperLink({ field: '@test' });
                    expect(test.cmp.element.getAttribute('href')).toEqual('');
                });
                it("when the uri uses the javascript protocol and contains a relative uri with a slash,\n          it clears the value to prevent XSS", function () {
                    fakeResult.clickUri = 'javascript:"/casemgmt/sc_KnowledgeArticle"';
                    initHyperLink();
                    expect(test.cmp.element.getAttribute('href')).toEqual('');
                });
                it("when the uri uses the javascript protocol and contains a relative uri with a period,\n          it clears the value to prevent XSS", function () {
                    fakeResult.clickUri = 'javascript:"./articles/ka32C0000009t9CQAQ"';
                    initHyperLink();
                    expect(test.cmp.element.getAttribute('href')).toEqual('');
                });
                it("when the uri uses the javascript protocol and contains a relative uri with two periods,\n          it clears the value to prevent XSS", function () {
                    fakeResult.clickUri = 'javascript:"../articles/ka32C0000009t9CQAQ"';
                    initHyperLink();
                    expect(test.cmp.element.getAttribute('href')).toEqual('');
                });
                it('should not override the href if it is set before the initialization', function () {
                    var element = Dom_1.$$('a');
                    var href = 'javascript:void(0)';
                    element.setAttribute('href', href);
                    test = Mock.advancedResultComponentSetup(ResultLink_1.ResultLink, fakeResult, new Mock.AdvancedComponentSetupOptions(element.el));
                    expect(test.cmp.element.getAttribute('href')).toEqual(href);
                });
                describe('and the result has the outlookfield', function () {
                    beforeEach(function () {
                        fakeResult.raw['outlookuri'] = 'mailto:test@coveo.comm';
                        fakeResult.raw['outlookformacuri'] = 'mailto:test.mac@coveo.comm';
                    });
                    it('should generate the correct href if the os is windows and the option is openInOutlook', function () {
                        test = Mock.advancedResultComponentSetup(ResultLink_1.ResultLink, fakeResult, new Mock.AdvancedComponentSetupOptions(Dom_1.$$('a').el, { openInOutlook: true }, function (env) {
                            return env.withOs(OSUtils_1.OS_NAME.WINDOWS);
                        }));
                        expect(test.cmp.element.getAttribute('href')).toEqual(fakeResult.raw['outlookuri']);
                    });
                    it('should generate the correct href if the os is windows and the option is not openInOutlook', function () {
                        test = Mock.advancedResultComponentSetup(ResultLink_1.ResultLink, fakeResult, new Mock.AdvancedComponentSetupOptions(Dom_1.$$('a').el, { openInOutlook: false }, function (env) {
                            return env.withOs(OSUtils_1.OS_NAME.WINDOWS);
                        }));
                        expect(test.cmp.element.getAttribute('href')).not.toEqual(fakeResult.raw['outlookuri']);
                    });
                    it('should generate the correct href if the os is mac and the option is openInOutlook', function () {
                        test = Mock.advancedResultComponentSetup(ResultLink_1.ResultLink, fakeResult, new Mock.AdvancedComponentSetupOptions(Dom_1.$$('a').el, { openInOutlook: true }, function (env) {
                            return env.withOs(OSUtils_1.OS_NAME.MACOSX);
                        }));
                        expect(test.cmp.element.getAttribute('href')).toEqual(fakeResult.raw['outlookformacuri']);
                    });
                    it('should generate the correct href if the os is mac and the option is not openInOutlook', function () {
                        test = Mock.advancedResultComponentSetup(ResultLink_1.ResultLink, fakeResult, new Mock.AdvancedComponentSetupOptions(Dom_1.$$('a').el, { openInOutlook: false }, function (env) {
                            return env.withOs(OSUtils_1.OS_NAME.MACOSX);
                        }));
                        expect(test.cmp.element.getAttribute('href')).not.toEqual(fakeResult.raw['outlookformacuri']);
                    });
                });
            });
        });
    });
}
exports.ResultLinkTest = ResultLinkTest;
 
 
/***/ }),
/* 1651 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
/// <reference path="../../lib/jasmine/index.d.ts" />
var Mock = __webpack_require__(2);
var PrintableUri_1 = __webpack_require__(809);
var Dom_1 = __webpack_require__(0);
var AnalyticsActionListMeta_1 = __webpack_require__(7);
var Fake_1 = __webpack_require__(11);
var underscore_1 = __webpack_require__(1);
var DeviceUtils_1 = __webpack_require__(42);
function generateParentsXMLFromList(parents) {
    return "<?xml version=\"1.0\" encoding=\"utf-16\"?><parents>" + parents
        .map(function (parent) { return "<parent name=\"" + parent.name + "\" uri=\"" + parent.uri + "\"/>"; })
        .join('') + "</parents>";
}
var parents = [
    { name: 'All resources', uri: 'somewebsiteroot.com' },
    { name: 'Media', uri: 'somewebsiteroot.com/media' },
    { name: 'Videos', uri: 'somewebsiteroot.com/media-videos' },
    { name: 'Donut videos', uri: 'somewebsiteroot.com/donuts' }
];
var parentsXml = generateParentsXMLFromList(parents);
var longParentsCount = 11;
var longParents = underscore_1.range(longParentsCount).map(function (index) { return ({ name: index.toString(), uri: "somewebsiteroot.com/" + index }); });
var longParentsXml = generateParentsXMLFromList(longParents);
function PrintableUriTest() {
    describe('PrintableUri', function () {
        var test;
        var fakeResult;
        var getFirstResultLinkElement = function (cmp) {
            return Dom_1.$$(cmp.element).find('.CoveoResultLink');
        };
        var getURIParts = function () { return Dom_1.$$(test.cmp.element).findAll('.coveo-printable-uri-part'); };
        var getURIPartsNames = function () { return getURIParts().map(function (part) { return part.innerText; }); };
        var getEllipsis = function () { return Dom_1.$$(test.cmp.element).findAll('.coveo-printable-uri-ellipsis'); };
        beforeEach(function () {
            fakeResult = initFakeResult();
            test = Mock.advancedResultComponentSetup(PrintableUri_1.PrintableUri, fakeResult, undefined);
            spyOn(test.cmp, 'openLink');
            spyOn(window, 'open');
        });
        afterEach(function () {
            test = null;
            fakeResult = null;
        });
        describe('with a non-null parents field', function () {
            beforeEach(function () {
                fakeResult.raw.parents =
                    '<?xml version="1.0" encoding="utf-16"?><parents><parent name="My Drive" uri="https://drive.google.com/#my-drive" /></parents>';
                test = Mock.advancedResultComponentSetup(PrintableUri_1.PrintableUri, fakeResult, undefined);
            });
            it('should display the XML correctly', function () {
                expect(Dom_1.$$(test.cmp.element).find('.CoveoResultLink').innerText).toEqual('My Drive');
            });
            it('should not display an ellipsis', function () {
                expect(getEllipsis().length).toEqual(0);
            });
        });
        describe('with a very long parents field', function () {
            beforeEach(function () {
                fakeResult.raw.parents = longParentsXml;
                test = Mock.advancedResultComponentSetup(PrintableUri_1.PrintableUri, fakeResult, undefined);
            });
            it('should display the first 4 parents and the last parent', function () {
                expect(getURIPartsNames()).toEqual(underscore_1.range(4).concat([longParentsCount - 1]).map(function (index) { return index.toString(); }));
            });
            it('should display an ellipsis', function () {
                expect(getEllipsis().length).toEqual(1);
            });
            describe('after clicking on the ellipsis', function () {
                beforeEach(function () {
                    var ellipsis = getEllipsis()[0];
                    ellipsis.firstChild.click();
                });
                it('should display the next 4 parents and the last parent', function () {
                    expect(getURIPartsNames()).toEqual(underscore_1.range(4, 8).concat([longParentsCount - 1]).map(function (index) { return index.toString(); }));
                });
                it('should display two ellipsis', function () {
                    expect(getEllipsis().length).toEqual(2);
                });
                describe('after clicking on the last ellipsis', function () {
                    beforeEach(function () {
                        var _a = getEllipsis(), ellipsis = _a[1];
                        ellipsis.firstChild.click();
                    });
                    it('should display the last 5 parents', function () {
                        expect(getURIPartsNames()).toEqual(underscore_1.range(longParentsCount - 5, longParentsCount).map(function (index) { return index.toString(); }));
                    });
                    it('should display an ellipsis', function () {
                        expect(getEllipsis().length).toEqual(1);
                    });
                });
            });
        });
        describe('on mobile', function () {
            var originalFunction;
            beforeEach(function () {
                originalFunction = DeviceUtils_1.DeviceUtils.isMobileDevice;
                spyOn(DeviceUtils_1.DeviceUtils, 'isMobileDevice').and.returnValue(true);
            });
            afterEach(function () {
                DeviceUtils_1.DeviceUtils.isMobileDevice = originalFunction;
            });
            describe('with a very long parents field', function () {
                beforeEach(function () {
                    fakeResult.raw.parents = longParentsXml;
                    test = Mock.advancedResultComponentSetup(PrintableUri_1.PrintableUri, fakeResult, undefined);
                });
                it('should display the first 2 parents and the last parent', function () {
                    expect(getURIPartsNames()).toEqual(underscore_1.range(2).concat([longParentsCount - 1]).map(function (index) { return index.toString(); }));
                });
                it('should display an ellipsis', function () {
                    expect(getEllipsis().length).toEqual(1);
                });
                describe('after clicking on the ellipsis', function () {
                    beforeEach(function () {
                        var ellipsis = getEllipsis()[0];
                        ellipsis.firstChild.click();
                    });
                    it('should display the next 2 parents and the last parent', function () {
                        expect(getURIPartsNames()).toEqual(underscore_1.range(2, 4).concat([longParentsCount - 1]).map(function (index) { return index.toString(); }));
                    });
                    it('should display two ellipsis', function () {
                        expect(getEllipsis().length).toEqual(2);
                    });
                });
            });
        });
        it('should add the list role to its element', function () {
            test = Mock.advancedResultComponentSetup(PrintableUri_1.PrintableUri, fakeResult, undefined);
            expect(test.cmp.element.getAttribute('role')).toEqual('list');
        });
        it('should seperate every parent element with a separator', function () {
            fakeResult.raw.parents = parentsXml;
            test = Mock.advancedResultComponentSetup(PrintableUri_1.PrintableUri, fakeResult, undefined);
            var elements = Dom_1.$$(test.cmp.element).children();
            for (var i = 0; i < parents.length * 2 - 1; i++) {
                expect(elements[i].className.split(' ')).toEqual(i % 2 === 0 ? ['coveo-printable-uri-part'] : ['coveo-printable-uri-separator']);
            }
        });
        it('should give the listitem role to every parent', function () {
            fakeResult.raw.parents = parentsXml;
            test = Mock.advancedResultComponentSetup(PrintableUri_1.PrintableUri, fakeResult, undefined);
            var elements = Dom_1.$$(test.cmp.element).findAll('.coveo-printable-uri-part');
            elements.forEach(function (element) { return expect(element.getAttribute('role')).toEqual('listitem'); });
        });
        it('should give the separator role to every separator', function () {
            fakeResult.raw.parents = parentsXml;
            test = Mock.advancedResultComponentSetup(PrintableUri_1.PrintableUri, fakeResult, undefined);
            var elements = Dom_1.$$(test.cmp.element).findAll('.coveo-printable-uri-separator');
            elements.forEach(function (element) { return expect(element.getAttribute('role')).toEqual('separator'); });
        });
        it('should shorten the printable uri correctly if the title is not a uri', function () {
            fakeResult.printableUri = 'This is not a Uri';
            test = Mock.advancedResultComponentSetup(PrintableUri_1.PrintableUri, fakeResult, undefined);
            expect(getFirstResultLinkElement(test.cmp).innerText).toEqual('This is not a ...');
        });
        it('should shorten the printable uri correctly if the title is a single character', function () {
            fakeResult.printableUri = 'z';
            test = Mock.advancedResultComponentSetup(PrintableUri_1.PrintableUri, fakeResult, undefined);
            expect(getFirstResultLinkElement(test.cmp).innerText).toEqual('...');
        });
        it('should shorten the printable uri correctly', function () {
            fakeResult.printableUri = 'http://a.very.very.very.very.very.very.very.very.very.very.long.printable.uri';
            test = Mock.advancedResultComponentSetup(PrintableUri_1.PrintableUri, fakeResult, undefined);
            expect(getFirstResultLinkElement(test.cmp).innerText).toEqual('http://a.very.very.very.very.very.very.very.very.very.very.long.printable....');
        });
        it('should shorten the printable uri correctly if title template is an empty string', function () {
            test.cmp.options.titleTemplate = '';
            fakeResult.printableUri = 'http://a.very.very.very.very.very.very.very.very.very.very.long.printable.uri';
            test = Mock.advancedResultComponentSetup(PrintableUri_1.PrintableUri, fakeResult, undefined);
            expect(getFirstResultLinkElement(test.cmp).innerText).toEqual('http://a.very.very.very.very.very.very.very.very.very.very.long.printable....');
        });
        it('can receive an onClick option to execute', function (done) {
            test = Mock.advancedResultComponentSetup(PrintableUri_1.PrintableUri, fakeResult, new Mock.AdvancedComponentSetupOptions(Dom_1.$$('div').el, {
                onClick: function () {
                    expect(true).toBe(true);
                    done();
                }
            }));
            Dom_1.$$(getFirstResultLinkElement(test.cmp)).trigger('click');
        });
        it('sends an analytic event on click', function () {
            Dom_1.$$(getFirstResultLinkElement(test.cmp)).trigger('click');
            expect(test.cmp.usageAnalytics.logClickEvent).toHaveBeenCalledTimes(1);
        });
        describe('exposes hrefTemplate', function () {
            it('should not modify the href template if there are no field specified', function () {
                var hrefTemplate = 'http://test';
                test = Mock.optionsResultComponentSetup(PrintableUri_1.PrintableUri, { hrefTemplate: hrefTemplate }, fakeResult);
                test.cmp.openLinkInNewWindow();
                expect(window.open).toHaveBeenCalledWith(hrefTemplate, jasmine.anything());
            });
            it('should replace fields in the href template by the results equivalent', function () {
                var hrefTemplate = 'http://${summary}';
                test = Mock.optionsResultComponentSetup(PrintableUri_1.PrintableUri, { hrefTemplate: hrefTemplate }, fakeResult);
                test.cmp.openLinkInNewWindow();
                expect(window.open).toHaveBeenCalledWith("http://" + fakeResult.summary, jasmine.anything());
            });
            it('should support nested values in result', function () {
                var hrefTemplate = 'http://${raw.number}';
                test = Mock.optionsResultComponentSetup(PrintableUri_1.PrintableUri, { hrefTemplate: hrefTemplate }, fakeResult);
                test.cmp.openLinkInNewWindow();
                expect(window.open).toHaveBeenCalledWith("http://" + fakeResult.raw['number'].toString(), jasmine.anything());
            });
            it('should not parse standalone accolades', function () {
                var hrefTemplate = 'http://${raw.number}{test}';
                test = Mock.optionsResultComponentSetup(PrintableUri_1.PrintableUri, { hrefTemplate: hrefTemplate }, fakeResult);
                test.cmp.openLinkInNewWindow();
                expect(window.open).toHaveBeenCalledWith("http://" + fakeResult.raw['number'] + "{test}", jasmine.anything());
            });
            it('should support external fields', function () {
                window['Coveo']['test'] = 'testExternal';
                var hrefTemplate = 'http://${Coveo.test}';
                test = Mock.optionsResultComponentSetup(PrintableUri_1.PrintableUri, { hrefTemplate: hrefTemplate }, fakeResult);
                test.cmp.openLinkInNewWindow();
                expect(window.open).toHaveBeenCalledWith('http://testExternal', jasmine.anything());
                window['Coveo']['test'] = undefined;
            });
            it('should support nested external fields with more than 2 keys', function () {
                window['Coveo']['test'] = { key: 'testExternal' };
                var hrefTemplate = 'http://${Coveo.test.key}';
                test = Mock.optionsResultComponentSetup(PrintableUri_1.PrintableUri, { hrefTemplate: hrefTemplate }, fakeResult);
                test.cmp.openLinkInNewWindow();
                expect(window.open).toHaveBeenCalledWith('http://testExternal', jasmine.anything());
                window['Coveo']['test'] = undefined;
            });
        });
        describe('exposes the titleTemplate', function () {
            it('should replace fields in the title template by the results equivalent', function () {
                var titleTemplate = '${clickUri}';
                test = Mock.optionsResultComponentSetup(PrintableUri_1.PrintableUri, { titleTemplate: titleTemplate }, fakeResult);
                expect(Dom_1.$$(test.cmp.element).text()).toEqual(fakeResult.clickUri);
            });
            it('should support nested values in result', function () {
                var titleTemplate = '${raw.number}';
                test = Mock.optionsResultComponentSetup(PrintableUri_1.PrintableUri, { titleTemplate: titleTemplate }, fakeResult);
                expect(getFirstResultLinkElement(test.cmp).innerHTML).toEqual(fakeResult.raw['number'].toString());
            });
            it('should not parse standalone accolades', function () {
                var titleTemplate = '${raw.number}{test}';
                test = Mock.optionsResultComponentSetup(PrintableUri_1.PrintableUri, { titleTemplate: titleTemplate }, fakeResult);
                expect(getFirstResultLinkElement(test.cmp).innerHTML).toEqual(fakeResult.raw['number'].toString() + '{test}');
            });
            it('should support external fields', function () {
                window['Coveo']['test'] = 'testExternal';
                var titleTemplate = '${Coveo.test}';
                test = Mock.optionsResultComponentSetup(PrintableUri_1.PrintableUri, { titleTemplate: titleTemplate }, fakeResult);
                expect(getFirstResultLinkElement(test.cmp).innerHTML).toEqual('testExternal');
                window['Coveo']['test'] = undefined;
            });
            it('should support external fields with more than 2 keys', function () {
                window['Coveo']['test'] = { key: 'testExternal' };
                var titleTemplate = '${Coveo.test.key}';
                test = Mock.optionsResultComponentSetup(PrintableUri_1.PrintableUri, { titleTemplate: titleTemplate }, fakeResult);
                expect(getFirstResultLinkElement(test.cmp).innerHTML).toEqual('testExternal');
                window['Coveo']['test'] = undefined;
            });
            it('should print the template if the key used in the template is undefined', function () {
                var titleTemplate = '${doesNotExist}';
                test = Mock.optionsResultComponentSetup(PrintableUri_1.PrintableUri, { titleTemplate: titleTemplate }, fakeResult);
                expect(Dom_1.$$(getFirstResultLinkElement(test.cmp)).text()).toEqual('${doesNotExist}');
            });
        });
        it('sends an analytics event on context menu', function () {
            Dom_1.$$(getFirstResultLinkElement(test.cmp)).trigger('contextmenu');
            expect(test.cmp.usageAnalytics.logClickEvent).toHaveBeenCalledTimes(1);
        });
        describe('when logging the analytic event', function () {
            it('should use the clickUri if the href is empty', function () {
                Dom_1.$$(getFirstResultLinkElement(test.cmp)).trigger('click');
                expect(test.cmp.usageAnalytics.logClickEvent).toHaveBeenCalledWith(AnalyticsActionListMeta_1.analyticsActionCauseList.documentOpen, jasmine.objectContaining({ documentURL: fakeResult.clickUri }), jasmine.objectContaining({
                    uniqueId: fakeResult.uniqueId
                }), test.cmp.root);
            });
        });
    });
    function initFakeResult() {
        var fakeResult = Fake_1.FakeResults.createFakeResult();
        return fakeResult;
    }
}
exports.PrintableUriTest = PrintableUriTest;
 
 
/***/ }),
/* 1652 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __assign = (this && this.__assign) || Object.assign || function(t) {
    for (var s, i = 1, n = arguments.length; i < n; i++) {
        s = arguments[i];
        for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
            t[p] = s[p];
    }
    return t;
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { Iif (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        Iif (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            Iif (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
            Iif (y = 0, t) op = [0, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    Eif (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        Iif (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
Object.defineProperty(exports, "__esModule", { value: true });
var Mock = __webpack_require__(2);
var ResultList_1 = __webpack_require__(68);
var CustomMatchers_1 = __webpack_require__(104);
var Fake_1 = __webpack_require__(11);
var Simulate_1 = __webpack_require__(15);
var Dom_1 = __webpack_require__(0);
var ResultListEvents_1 = __webpack_require__(48);
var UnderscoreTemplate_1 = __webpack_require__(90);
var ResultLayoutEvents_1 = __webpack_require__(132);
var MockEnvironment_1 = __webpack_require__(2);
var TemplateList_1 = __webpack_require__(135);
var QueryBuilder_1 = __webpack_require__(24);
var AnalyticsActionListMeta_1 = __webpack_require__(7);
var Defer_1 = __webpack_require__(31);
var ResultLayoutSelector_1 = __webpack_require__(200);
var ResultListUtils_1 = __webpack_require__(72);
var QueryStateModel_1 = __webpack_require__(17);
function ResultListTest() {
    var _this = this;
    describe('ResultList', function () {
        var test;
        beforeEach(function () {
            test = Mock.basicComponentSetup(ResultList_1.ResultList);
            CustomMatchers_1.registerCustomMatcher();
        });
        afterEach(function () {
            test = null;
        });
        describe('displayMoreResults', function () {
            beforeEach(function () {
                // Fill the result list one time first, so we can have more results.
                Simulate_1.Simulate.query(test.env);
            });
            describe('when returning less than 10 results', function () {
                var promiseResults;
                beforeEach(function () {
                    promiseResults = new Promise(function (resolve) {
                        resolve(Fake_1.FakeResults.createFakeResults(5));
                    });
                    test.env.queryController.fetchMore.and.returnValue(promiseResults);
                });
                it('should stop asking for more results if consecutive calls are queued', function (done) {
                    Defer_1.Defer.defer(function () {
                        test.cmp.displayMoreResults(10);
                        test.cmp.displayMoreResults(10);
                        test.cmp.displayMoreResults(10);
                        expect(test.env.queryController.fetchMore).toHaveBeenCalledTimes(1);
                        done();
                    });
                });
                it('should stop asking for more results if less results than requested are returned', function (done) {
                    Defer_1.Defer.defer(function () {
                        test.cmp.displayMoreResults(10);
                        promiseResults.then(function () {
                            test.cmp.displayMoreResults(10);
                            expect(test.env.queryController.fetchMore).toHaveBeenCalledTimes(1);
                            done();
                        });
                    });
                });
            });
            describe('when returning 10 or more results', function () {
                var promiseResults;
                beforeEach(function () {
                    promiseResults = new Promise(function (resolve) {
                        resolve(Fake_1.FakeResults.createFakeResults(10));
                    });
                    test.env.queryController.fetchMore.and.returnValue(promiseResults);
                });
                afterEach(function () {
                    promiseResults = null;
                });
                it('should trigger 10 new result displayed event when fetching more results', function (done) {
                    var newResultSpy = jasmine.createSpy('newresultspy');
                    Dom_1.$$(test.cmp.element).on(ResultListEvents_1.ResultListEvents.newResultDisplayed, newResultSpy);
                    Defer_1.Defer.defer(function () {
                        test.cmp.displayMoreResults(10).then(function () {
                            expect(newResultSpy).toHaveBeenCalledTimes(10);
                            done();
                        });
                    });
                });
                it('should trigger a single new results displayed event when fetching more results', function (done) {
                    var newResultsSpy = jasmine.createSpy('newresultsspy');
                    Dom_1.$$(test.cmp.element).on(ResultListEvents_1.ResultListEvents.newResultsDisplayed, newResultsSpy);
                    Defer_1.Defer.defer(function () {
                        test.cmp.displayMoreResults(10).then(function () {
                            expect(newResultsSpy).toHaveBeenCalledTimes(1);
                            done();
                        });
                    });
                });
                it('should log an analytics event when more results are returned', function (done) {
                    Defer_1.Defer.defer(function () {
                        test.cmp.displayMoreResults(10).then(function () {
                            expect(test.env.usageAnalytics.logCustomEvent).toHaveBeenCalledWith(AnalyticsActionListMeta_1.analyticsActionCauseList.pagerScrolling, jasmine.any(Object), test.cmp.element);
                            done();
                        });
                    });
                });
                it('should queue up another scroll when it receives results to fill up the container, if infinite scrolling is enabled', function (done) {
                    test.cmp.options.enableInfiniteScroll = true;
                    Defer_1.Defer.defer(function () {
                        test.cmp.displayMoreResults(10);
                        promiseResults.then(function () {
                            setTimeout(function () {
                                expect(test.env.queryController.fetchMore).toHaveBeenCalled();
                                done();
                            }, 1000);
                        });
                    });
                });
                it('should not queue up infinite amount of request if it is trying to fill up the scrolling container', function (done) {
                    test.cmp.options.enableInfiniteScroll = true;
                    test.cmp.displayMoreResults(10);
                    promiseResults.then(function () {
                        setTimeout(function () {
                            // Once at the initial request, + 5 (ResultList.MAX_AMOUNT_OF_SUCESSIVE_REQUESTS)
                            expect(test.env.queryController.fetchMore).toHaveBeenCalledTimes(6);
                            done();
                        }, 1000);
                    });
                });
            });
        });
        it('should tell if there are more results to display after a successful query', function (done) {
            var queryBuilder = new QueryBuilder_1.QueryBuilder();
            queryBuilder.numberOfResults = 10;
            Simulate_1.Simulate.query(test.env, {
                results: Fake_1.FakeResults.createFakeResults(10),
                query: queryBuilder.build()
            });
            Defer_1.Defer.defer(function () {
                expect(test.cmp.hasPotentiallyMoreResultsToDisplay()).toBeTruthy();
                done();
            });
        });
        it('should tell if there are no more results to display after a successful query with a limited amount of results returned', function (done) {
            var results = Fake_1.FakeResults.createFakeResults(5);
            var queryBuilder = new QueryBuilder_1.QueryBuilder();
            queryBuilder.numberOfResults = 10;
            Simulate_1.Simulate.query(test.env, {
                results: results,
                query: queryBuilder.build()
            });
            Defer_1.Defer.defer(function () {
                expect(test.cmp.hasPotentiallyMoreResultsToDisplay()).toBeFalsy();
                done();
            });
        });
        it('should allow to return the currently displayed result', function () {
            expect(ResultList_1.ResultList.resultCurrentlyBeingRendered).toBeNull();
            var data = Fake_1.FakeResults.createFakeResult();
            test.cmp.buildResult(data);
            expect(ResultList_1.ResultList.resultCurrentlyBeingRendered).toBe(data);
        });
        it('should set currently displayed result to undefined when they are all rendered', function (done) {
            var data = Fake_1.FakeResults.createFakeResults(13);
            test.cmp.buildResults(data).then(function () {
                expect(ResultList_1.ResultList.resultCurrentlyBeingRendered).toBeNull();
                done();
            });
        });
        it('should update the currentlyDisplayedResults when building a single result', function (done) {
            var data = Fake_1.FakeResults.createFakeResult();
            expect(test.cmp.getDisplayedResults().length).toEqual(0);
            test.cmp.buildResult(data).then(function () {
                expect(test.cmp.getDisplayedResults().length).toEqual(1);
                expect(test.cmp.getDisplayedResults()[0]).toEqual(data);
                done();
            });
        });
        it('should update the currentlyDisplayedResults when building multiple results', function (done) {
            var data = Fake_1.FakeResults.createFakeResults(5);
            expect(test.cmp.getDisplayedResults().length).toEqual(0);
            test.cmp.buildResults(data).then(function () {
                expect(test.cmp.getDisplayedResults().length).toEqual(5);
                expect(test.cmp.getDisplayedResults()[0]).toEqual(data.results[0]);
                expect(test.cmp.getDisplayedResults()[4]).toEqual(data.results[4]);
                done();
            });
        });
        it('should reset currently displayed on new query', function (done) {
            var data = Fake_1.FakeResults.createFakeResult();
            test.cmp.buildResult(data).then(function () {
                expect(ResultList_1.ResultList.resultCurrentlyBeingRendered).toBe(data);
                Simulate_1.Simulate.query(test.env);
                Defer_1.Defer.defer(function () {
                    expect(ResultList_1.ResultList.resultCurrentlyBeingRendered).toBeNull();
                    done();
                });
            });
        });
        it('should allow to build a single result element', function (done) {
            var data = Fake_1.FakeResults.createFakeResult();
            test.cmp.buildResult(data).then(function (built) {
                expect(built).toBeDefined();
                var rs = Dom_1.$$(built).find('.CoveoResultLink');
                expect(Dom_1.$$(rs).text()).toBe(data.title);
                done();
            });
        });
        it('should allow to build multiple results element', function (done) {
            var data = Fake_1.FakeResults.createFakeResults(13);
            test.cmp.buildResults(data).then(function (built) {
                expect(built.length).toBe(13);
                var rs = Dom_1.$$(built[0]).find('.CoveoResultLink');
                expect(Dom_1.$$(rs).text()).toBe(data.results[0].title);
                rs = Dom_1.$$(built[12]).find('.CoveoResultLink');
                expect(Dom_1.$$(rs).text()).toBe(data.results[12].title);
                done();
            });
        });
        it('should bind result on the HTMLElement', function (done) {
            var data = Fake_1.FakeResults.createFakeResults(13);
            test.cmp.buildResults(data).then(function (built) {
                expect(built[0]['CoveoResult']).toEqual(jasmine.objectContaining({ title: 'Title0' }));
                var jQuery = Simulate_1.Simulate.addJQuery();
                test.cmp.buildResults(data).then(function (built2) {
                    expect(jQuery(built2[3]).data()).toEqual(jasmine.objectContaining({ title: 'Title3' }));
                    Simulate_1.Simulate.removeJQuery();
                    done();
                });
            });
        });
        it('should allow to render results inside the result list', function (done) {
            var data = Fake_1.FakeResults.createFakeResults(13);
            test.cmp
                .buildResults(data)
                .then(function (elem) { return test.cmp.renderResults(elem); })
                .then(function () {
                expect(Dom_1.$$(test.cmp.element).findAll('.CoveoResult').length).toBe(13);
                done();
            });
        });
        it('should allow to render results and append them', function (done) {
            var data = Fake_1.FakeResults.createFakeResults(13);
            test.cmp
                .buildResults(data)
                .then(function (elem) { return test.cmp.renderResults(elem); })
                .then(function () { return test.cmp.buildResults(data); })
                .then(function (elem) { return test.cmp.renderResults(elem, true); })
                .then(function () {
                expect(Dom_1.$$(test.cmp.element).findAll('.CoveoResult').length).toBe(26);
                done();
            });
        });
        it('should allow to render results and not append them', function (done) {
            var data = Fake_1.FakeResults.createFakeResults(13);
            test.cmp
                .buildResults(data)
                .then(function (elem) { return test.cmp.renderResults(elem); })
                .then(function () { return test.cmp.buildResults(data); })
                .then(function (elem) { return test.cmp.renderResults(elem, false); })
                .then(function () {
                expect(Dom_1.$$(test.cmp.element).findAll('.CoveoResult').length).toBe(13);
                done();
            });
        });
        it('should trigger result displayed event when rendering', function (done) {
            var data = Fake_1.FakeResults.createFakeResults(6);
            var spyResult = jasmine.createSpy('spyResult');
            var spyResults = jasmine.createSpy('spyResults');
            Dom_1.$$(test.cmp.element).on(ResultListEvents_1.ResultListEvents.newResultDisplayed, spyResult);
            Dom_1.$$(test.cmp.element).on(ResultListEvents_1.ResultListEvents.newResultsDisplayed, spyResults);
            test.cmp
                .buildResults(data)
                .then(function (elem) { return test.cmp.renderResults(elem); })
                .then(function () {
                expect(spyResult).toHaveBeenCalledTimes(6);
                expect(spyResults).toHaveBeenCalledTimes(1);
                expect(spyResults).toHaveBeenCalledWith(jasmine.any(CustomEvent), jasmine.objectContaining({
                    isInfiniteScrollEnabled: false
                }));
                done();
            });
        });
        it('should trigger results displayed event with isInfiniteScrollEnabled set to true if enableInfiniteScroll is true', function (done) { return __awaiter(_this, void 0, void 0, function () {
            var data, spyResults, results;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        data = Fake_1.FakeResults.createFakeResults(6);
                        spyResults = jasmine.createSpy('spyResults');
                        test.cmp.options.enableInfiniteScroll = true;
                        Dom_1.$$(test.cmp.element).on(ResultListEvents_1.ResultListEvents.newResultsDisplayed, spyResults);
                        return [4 /*yield*/, test.cmp.buildResults(data)];
                    case 1:
                        results = _a.sent();
                        return [4 /*yield*/, test.cmp.renderResults(results)];
                    case 2:
                        _a.sent();
                        expect(spyResults).toHaveBeenCalledWith(jasmine.any(CustomEvent), jasmine.objectContaining({
                            isInfiniteScrollEnabled: true
                        }));
                        done();
                        return [2 /*return*/];
                }
            });
        }); });
        it('should render itself correctly after a full query', function (done) {
            var spyResult = jasmine.createSpy('spyResult');
            var spyResults = jasmine.createSpy('spyResults');
            Dom_1.$$(test.cmp.element).on(ResultListEvents_1.ResultListEvents.newResultDisplayed, spyResult);
            Dom_1.$$(test.cmp.element).on(ResultListEvents_1.ResultListEvents.newResultsDisplayed, spyResults);
            Simulate_1.Simulate.query(test.env);
            Defer_1.Defer.defer(function () {
                expect(test.cmp.getDisplayedResults().length).toBe(10);
                expect(test.cmp.getDisplayedResultsElements().length).toBe(10);
                expect(spyResult).toHaveBeenCalledTimes(10);
                expect(spyResults).toHaveBeenCalledTimes(1);
                done();
            });
        });
        it('should clear itself on query error', function (done) {
            Simulate_1.Simulate.query(test.env);
            Defer_1.Defer.defer(function () {
                expect(test.cmp.getDisplayedResults().length).toBe(10);
                expect(test.cmp.getDisplayedResultsElements().length).toBe(10);
                Simulate_1.Simulate.query(test.env, {
                    error: {
                        message: 'oh noes',
                        type: 'very bad',
                        name: 'oh noes very bad'
                    }
                });
                Defer_1.Defer.defer(function () {
                    expect(test.cmp.getDisplayedResults().length).toBe(0);
                    expect(test.cmp.getDisplayedResultsElements().length).toBe(0);
                    done();
                });
            });
        });
        it('should add and remove a hidden css class on enable/disable', function () {
            test.cmp.disable();
            expect(Dom_1.$$(test.cmp.element).hasClass('coveo-hidden')).toBe(true);
            test.cmp.enable();
            expect(Dom_1.$$(test.cmp.element).hasClass('coveo-hidden')).toBe(false);
        });
        it('enableScrollBackTop should be set', function () {
            test = Mock.optionsComponentSetup(ResultList_1.ResultList, {
                enableScrollToTop: false
            });
            expect(test.cmp.options.enableScrollToTop).toBe(false);
        });
        describe("when triggering a layout change event with one result", function () {
            var layout = 'list';
            var showIfQuery = Dom_1.$$('div', { className: 'coveo-show-if-query' });
            var showIfNoQuery = Dom_1.$$('div', { className: 'coveo-show-if-no-query' });
            var showIfResults = Dom_1.$$('div', { className: 'coveo-show-if-results' });
            var showIfNoResults = Dom_1.$$('div', { className: 'coveo-show-if-no-results' });
            function triggerLayoutChange() {
                var changeLayoutArgs = { layout: layout, results: Fake_1.FakeResults.createFakeResults(1) };
                Dom_1.$$(test.env.root).trigger(ResultListEvents_1.ResultListEvents.changeLayout, changeLayoutArgs);
            }
            beforeEach(function () {
                test.cmp.options.layout = layout;
                var nodes = [showIfQuery, showIfNoQuery, showIfResults, showIfNoResults];
                nodes.forEach(function (node) { return test.cmp.element.appendChild(node.el); });
                triggerLayoutChange();
            });
            it("should add \"display: block\" style to the showIfQuery element", function (done) {
                Defer_1.Defer.defer(function () {
                    expect(showIfQuery.el.style.display).toBe('block');
                    done();
                });
            });
            it("should add \"display: none\" style to the showIfNoQuery element", function (done) {
                Defer_1.Defer.defer(function () {
                    expect(showIfNoQuery.el.style.display).toBe('none');
                    done();
                });
            });
            it("should add \"display: block\" style to the showIfResults element", function (done) {
                Defer_1.Defer.defer(function () {
                    expect(showIfResults.el.style.display).toBe('block');
                    done();
                });
            });
            it("should add \"display: none\" style to the showIfNoResults element", function (done) {
                Defer_1.Defer.defer(function () {
                    expect(showIfNoResults.el.style.display).toBe('none');
                    done();
                });
            });
        });
        it("when triggering a query,\n    it should hide and show specific css class correctly", function (done) {
            var showIfQuery = Dom_1.$$('div', {
                className: 'coveo-show-if-query'
            });
            var showIfNoQuery = Dom_1.$$('div', {
                className: 'coveo-show-if-no-query'
            });
            var showIfResults = Dom_1.$$('div', {
                className: 'coveo-show-if-results'
            });
            var showIfNoResults = Dom_1.$$('div', {
                className: 'coveo-show-if-no-results'
            });
            test.cmp.element.appendChild(showIfQuery.el);
            test.cmp.element.appendChild(showIfNoQuery.el);
            test.cmp.element.appendChild(showIfResults.el);
            test.cmp.element.appendChild(showIfNoResults.el);
            var withAQuery = new QueryBuilder_1.QueryBuilder();
            withAQuery.expression.add('foo');
            Simulate_1.Simulate.query(test.env, {
                query: withAQuery.build()
            });
            Defer_1.Defer.defer(function () {
                expect(showIfQuery.el.style.display).toBe('block');
                expect(showIfNoQuery.el.style.display).toBe('none');
                Simulate_1.Simulate.query(test.env, {
                    results: Fake_1.FakeResults.createFakeResults(0)
                });
                Defer_1.Defer.defer(function () {
                    expect(showIfResults.el.style.display).toBe('none');
                    expect(showIfNoResults.el.style.display).toBe('block');
                    Simulate_1.Simulate.query(test.env, {
                        results: Fake_1.FakeResults.createFakeResults(10)
                    });
                    Defer_1.Defer.defer(function () {
                        expect(showIfResults.el.style.display).toBe('block');
                        expect(showIfNoResults.el.style.display).toBe('none');
                        done();
                    });
                });
            });
        });
        it('should not ask for more data when infiniteScrolling is enable and the container is not a window', function () {
            var infiniteScrollContainer = Dom_1.$$('div');
            infiniteScrollContainer.setAttribute('style', 'height: 400px;');
            var option = {
                enableInfiniteScroll: true,
                infiniteScrollContainer: infiniteScrollContainer.el
            };
            test = Mock.basicComponentSetup(ResultList_1.ResultList, option);
            spyOn(test.cmp, 'displayMoreResults');
            Simulate_1.Simulate.query(test.env);
            expect(test.cmp.displayMoreResults).not.toHaveBeenCalled();
        });
        describe('exposes options', function () {
            it('resultContainer allow to specify where to render results', function (done) {
                var aNewContainer = document.createElement('div');
                expect(aNewContainer.children.length).toBe(0);
                test = Mock.optionsComponentSetup(ResultList_1.ResultList, {
                    resultsContainer: aNewContainer
                });
                Simulate_1.Simulate.query(test.env);
                Defer_1.Defer.defer(function () {
                    expect(aNewContainer.children.length).toBe(10);
                    done();
                });
            });
            it("when \"data-result-container-selector\" attribute is set,\n      it appends the result list to the element with the selector", function (done) {
                var selector = 'mycontainer';
                var root = document.createElement('div');
                var target = Dom_1.$$('div', { id: selector });
                var resultList = Dom_1.$$('div', {
                    className: 'CoveoResultList',
                    'data-result-container-selector': "#" + selector
                });
                root.appendChild(target.el);
                root.appendChild(resultList.el);
                document.body.appendChild(root);
                test = Mock.advancedComponentSetup(ResultList_1.ResultList, { element: resultList.el });
                document.body.removeChild(root);
                Simulate_1.Simulate.query(test.env);
                setTimeout(function () {
                    expect(target.el.children.length).toBe(10);
                    done();
                }, 0);
            });
            it('should get the minimal amount of fields to include when the option is true', function () {
                test = Mock.optionsComponentSetup(ResultList_1.ResultList, {
                    autoSelectFieldsToInclude: true
                });
                var simulation = Simulate_1.Simulate.query(test.env);
                expect(simulation.queryBuilder.build().fieldsToInclude).toEqual(jasmine.arrayContaining(['author', 'language', 'urihash', 'objecttype', 'collection', 'source', 'language', 'permanentid']));
            });
            it('should allow to get the auto select fields to include', function () {
                expect(test.cmp.getAutoSelectedFieldsToInclude()).toEqual(jasmine.arrayContaining(['author', 'language', 'urihash', 'objecttype', 'collection', 'source', 'language', 'permanentid']));
            });
            it('should call auto select fields to include on other result list', function () {
                test = Mock.optionsComponentSetup(ResultList_1.ResultList, {
                    autoSelectFieldsToInclude: true
                });
                var otherResultList = Mock.mockComponent(ResultList_1.ResultList);
                test.env.searchInterface.getComponents.and.returnValue([otherResultList]);
                Simulate_1.Simulate.query(test.env);
                expect(otherResultList.getAutoSelectedFieldsToInclude).toHaveBeenCalled();
            });
            it('should not throw when finding auto select fields to include on another result list that is not initialized ', function () {
                test = Mock.optionsComponentSetup(ResultList_1.ResultList, {
                    autoSelectFieldsToInclude: true
                });
                var otherResultList = Mock.mockComponent(ResultList_1.ResultList);
                otherResultList.element = document.createElement('div');
                Dom_1.$$(otherResultList.element).addClass('CoveoResultList');
                Dom_1.$$(test.env.root).append(otherResultList.element);
                expect(function () { return Simulate_1.Simulate.query(test.env); }).not.toThrow();
            });
            it('resultTemplate allow to specify a template manually', function (done) {
                var tmpl = Mock.mock(UnderscoreTemplate_1.UnderscoreTemplate);
                var asSpy = tmpl;
                asSpy.instantiateToElement.and.returnValue(new Promise(function (resolve) { return resolve(document.createElement('div')); }));
                test = Mock.optionsComponentSetup(ResultList_1.ResultList, {
                    resultTemplate: tmpl
                });
                Simulate_1.Simulate.query(test.env);
                Defer_1.Defer.defer(function () {
                    expect(tmpl.instantiateToElement).toHaveBeenCalledTimes(10);
                    done();
                });
            });
            it('waitAnimation allow to specify a different animation such as spin or fade', function () {
                test = Mock.optionsComponentSetup(ResultList_1.ResultList, {
                    waitAnimation: 'fade'
                });
                Simulate_1.Simulate.query(test.env, {
                    callbackDuringQuery: function () {
                        expect(Dom_1.$$(test.cmp.options.waitAnimationContainer).hasClass('coveo-fade-out')).toBe(true);
                    },
                    callbackAfterQuery: function () {
                        expect(Dom_1.$$(test.cmp.options.waitAnimationContainer).hasClass('coveo-fade-out')).not.toBe(true);
                    }
                });
                test = Mock.optionsComponentSetup(ResultList_1.ResultList, {
                    waitAnimation: 'spinner'
                });
                Simulate_1.Simulate.query(test.env, {
                    callbackDuringQuery: function () {
                        expect(Dom_1.$$(test.cmp.options.waitAnimationContainer).find('.coveo-loading-spinner')).toBeDefined();
                    },
                    callbackAfterQuery: function () {
                        expect(Dom_1.$$(test.cmp.options.waitAnimationContainer).find('.coveo-loading-spinner')).toBeNull();
                    }
                });
            });
            it('waitAnimationContainer allow to specify where to display the animation', function () {
                var aNewContainer = document.createElement('div');
                test = Mock.optionsComponentSetup(ResultList_1.ResultList, {
                    waitAnimation: 'fade',
                    waitAnimationContainer: aNewContainer
                });
                Simulate_1.Simulate.query(test.env, {
                    callbackDuringQuery: function () {
                        expect(Dom_1.$$(aNewContainer).hasClass('coveo-fade-out')).toBe(true);
                    }
                });
            });
            it('enableInfiniteScroll allow to enable infinite scrolling', function (done) {
                test = Mock.optionsComponentSetup(ResultList_1.ResultList, {
                    enableInfiniteScroll: false
                });
                Simulate_1.Simulate.query(test.env);
                Defer_1.Defer.defer(function () {
                    expect(test.env.queryController.fetchMore).not.toHaveBeenCalled();
                    test = Mock.optionsComponentSetup(ResultList_1.ResultList, {
                        enableInfiniteScroll: true
                    });
                    Simulate_1.Simulate.query(test.env);
                    Defer_1.Defer.defer(function () {
                        expect(test.env.queryController.fetchMore).toHaveBeenCalled();
                        done();
                    });
                });
            });
            it('infiniteScrollPageSize allow to specify the number of result to fetch when scrolling', function (done) {
                test = Mock.optionsComponentSetup(ResultList_1.ResultList, {
                    enableInfiniteScroll: true,
                    infiniteScrollPageSize: 26
                });
                Simulate_1.Simulate.query(test.env);
                Defer_1.Defer.defer(function () {
                    expect(test.env.queryController.fetchMore).toHaveBeenCalledWith(26);
                    done();
                });
            });
            it('fieldsToInclude allow to specify an array of fields to include in the query', function () {
                test = Mock.optionsComponentSetup(ResultList_1.ResultList, {
                    fieldsToInclude: ['@field1', '@field2', '@field3']
                });
                var simulation = Simulate_1.Simulate.query(test.env);
                expect(simulation.queryBuilder.fieldsToInclude).toContain('field1');
                expect(simulation.queryBuilder.fieldsToInclude).toContain('field2');
                expect(simulation.queryBuilder.fieldsToInclude).toContain('field3');
            });
            describe('layout', function () {
                it('should correctly listen to populateResultLayout', function () {
                    test = Mock.optionsComponentSetup(ResultList_1.ResultList, {
                        layout: 'card'
                    });
                    var layoutsPopulated = [];
                    Dom_1.$$(test.env.root).trigger(ResultLayoutEvents_1.ResultLayoutEvents.populateResultLayout, { layouts: layoutsPopulated });
                    expect(layoutsPopulated).toEqual(jasmine.arrayContaining(['card']));
                });
                it('should set the correct layout on each child template if it contains a TemplateList', function () {
                    var elem = Dom_1.$$('div', {
                        className: 'CoveoResultList'
                    });
                    var scriptOne = Dom_1.$$('script', {
                        className: 'result-template',
                        type: 'text/html'
                    });
                    var scriptTwo = Dom_1.$$('script', {
                        className: 'result-template',
                        type: 'text/html'
                    });
                    elem.append(scriptOne.el);
                    elem.append(scriptTwo.el);
                    test = Mock.advancedComponentSetup(ResultList_1.ResultList, new MockEnvironment_1.AdvancedComponentSetupOptions(elem.el, {
                        layout: 'card'
                    }));
                    expect(test.cmp.options.resultTemplate instanceof TemplateList_1.TemplateList).toBe(true);
                    expect(test.cmp.options.resultTemplate.templates[0].layout).toBe('card');
                    expect(test.cmp.options.resultTemplate.templates[1].layout).toBe('card');
                });
                it("should add 3 empty div at the end of the results when it's a card template and infinite scroll is not enabled", function (done) {
                    test = Mock.optionsComponentSetup(ResultList_1.ResultList, {
                        layout: 'card',
                        enableInfiniteScroll: false
                    });
                    Simulate_1.Simulate.query(test.env);
                    Defer_1.Defer.defer(function () {
                        var container = test.cmp.options.resultsContainer;
                        expect(container.children.item(container.children.length - 1).innerHTML).toBe('');
                        expect(container.children.item(container.children.length - 2).innerHTML).toBe('');
                        expect(container.children.item(container.children.length - 3).innerHTML).toBe('');
                        expect(container.children.item(container.children.length - 4).innerHTML).not.toBe('');
                        done();
                    });
                });
                it('should react to change layout event', function () {
                    test = Mock.optionsComponentSetup(ResultList_1.ResultList, {
                        layout: 'card'
                    });
                    Dom_1.$$(test.env.root).trigger(ResultListEvents_1.ResultListEvents.changeLayout, {
                        layout: 'list',
                        results: Fake_1.FakeResults.createFakeResults()
                    });
                    expect(Dom_1.$$(test.cmp.element).hasClass('coveo-hidden')).toBe(true);
                    Dom_1.$$(test.env.root).trigger(ResultListEvents_1.ResultListEvents.changeLayout, {
                        layout: 'card',
                        results: Fake_1.FakeResults.createFakeResults()
                    });
                    expect(Dom_1.$$(test.cmp.element).hasClass('coveo-hidden')).toBe(false);
                });
                describe('when it is disabled', function () {
                    var mockResultLayoutSelector;
                    beforeEach(function () {
                        test = Mock.optionsComponentSetup(ResultList_1.ResultList, {
                            layout: 'card'
                        });
                        mockResultLayoutSelector = Mock.mock(ResultLayoutSelector_1.ResultLayoutSelector);
                    });
                    var addAnotherResultListInTheInterface = function (layout) {
                        var mockOtherResultList = Mock.mock(ResultList_1.ResultList);
                        mockOtherResultList.options = { layout: layout };
                        return mockOtherResultList;
                    };
                    it('should disable the layout in the layout selector', function () {
                        test.env.searchInterface.getComponents.and.callFake(function (cmp) {
                            if (cmp == 'ResultLayoutSelector') {
                                return [mockResultLayoutSelector];
                            }
                            return [];
                        });
                        test.cmp.disable();
                        expect(mockResultLayoutSelector.disableLayouts).toHaveBeenCalledWith(['card']);
                    });
                    it('should not disable the layout selector if there are other result list using the same layout', function () {
                        test.env.searchInterface.getComponents.and.callFake(function (cmp) {
                            Iif (cmp == 'ResultLayoutSelector') {
                                return [mockResultLayoutSelector];
                            }
                            else Eif (cmp == 'ResultList') {
                                return [test.cmp, addAnotherResultListInTheInterface('card')];
                            }
                            return [];
                        });
                        test.cmp.disable();
                        expect(mockResultLayoutSelector.disableLayouts).not.toHaveBeenCalled();
                    });
                    it('should disable the layout selector if there are other result list using different layout', function () {
                        test.env.searchInterface.getComponents.and.callFake(function (cmp) {
                            if (cmp == 'ResultLayoutSelector') {
                                return [mockResultLayoutSelector];
                            }
                            else Eif (cmp == 'ResultList') {
                                return [test.cmp, addAnotherResultListInTheInterface('list')];
                            }
                            return [];
                        });
                        test.cmp.disable();
                        expect(mockResultLayoutSelector.disableLayouts).toHaveBeenCalledWith(['card']);
                    });
                    it('should not disable the layout when the end user is simply switching layouts', function () {
                        test.env.searchInterface.getComponents.and.callFake(function (cmp) {
                            Iif (cmp == 'ResultLayoutSelector') {
                                return [mockResultLayoutSelector];
                            }
                            else Eif (cmp == 'ResultList') {
                                return [test.cmp, addAnotherResultListInTheInterface('list')];
                            }
                            return [];
                        });
                        Dom_1.$$(test.env.root).trigger(ResultListEvents_1.ResultListEvents.changeLayout, {
                            layout: 'list',
                            results: Fake_1.FakeResults.createFakeResults()
                        });
                        expect(mockResultLayoutSelector.disableLayouts).not.toHaveBeenCalled();
                    });
                });
                describe('when it is enabled', function () {
                    var mockResultLayoutSelector;
                    var setCurrentActiveLayouts = function (layout) {
                        mockResultLayoutSelector.activeLayouts = layout;
                    };
                    beforeEach(function () {
                        test = Mock.optionsComponentSetup(ResultList_1.ResultList, {
                            layout: 'card'
                        });
                        mockResultLayoutSelector = Mock.mock(ResultLayoutSelector_1.ResultLayoutSelector);
                        test.env.searchInterface.getComponents.and.callFake(function (requested) {
                            if (requested === ResultLayoutSelector_1.ResultLayoutSelector.ID) {
                                return [mockResultLayoutSelector];
                            }
                            return [];
                        });
                    });
                    it('should enable the layout in the layout selector', function () {
                        setCurrentActiveLayouts({ card: {} });
                        test.cmp.options.layout = 'card';
                        test.cmp.enable();
                        expect(mockResultLayoutSelector.enableLayouts).toHaveBeenCalledWith(['card']);
                    });
                    it('should not be enabled when it does not fit current layout', function () {
                        setCurrentActiveLayouts({ card: {} });
                        test.cmp.options.layout = 'table';
                        test.cmp.disable();
                        expect(test.cmp.disabled).toBe(true);
                        test.cmp.enable();
                        expect(test.cmp.disabled).toBe(true);
                    });
                });
                describe('scroll to top feature', function () {
                    var scrollToTopSpy;
                    var setupResultList = function (options) {
                        Iif (options === void 0) { options = {}; }
                        var test = Mock.advancedComponentSetup(ResultList_1.ResultList, {
                            cmpOptions: __assign({ infiniteScrollContainer: document.createElement('div') }, options),
                            modifyBuilder: function (builder) {
                                return builder.withLiveQueryStateModel();
                            }
                        });
                        return test;
                    };
                    beforeEach(function () {
                        jasmine.clock().install();
                        scrollToTopSpy = spyOn(ResultListUtils_1.ResultListUtils, 'scrollToTop');
                    });
                    afterEach(function () {
                        jasmine.clock().uninstall();
                    });
                    it("when enableScrollToTop is true and enableInfiniteScroll is false\n          should scroll to top ONCE when page changes and a query is executed", function (done) {
                        test = setupResultList({ enableScrollToTop: true, enableInfiniteScroll: false });
                        test.cmp.queryStateModel.set(QueryStateModel_1.QUERY_STATE_ATTRIBUTES.FIRST, 11);
                        Simulate_1.Simulate.query(test.env);
                        jasmine.clock().tick(0);
                        Simulate_1.Simulate.query(test.env);
                        jasmine.clock().tick(0);
                        expect(scrollToTopSpy).toHaveBeenCalledTimes(1);
                        done();
                    });
                    it("when enableScrollToTop is true and enableInfiniteScroll is true\n          should scroll to top on every query success", function (done) {
                        test = setupResultList({ enableScrollToTop: true, enableInfiniteScroll: true });
                        Simulate_1.Simulate.query(test.env);
                        jasmine.clock().tick(0);
                        Simulate_1.Simulate.query(test.env);
                        jasmine.clock().tick(0);
                        expect(scrollToTopSpy).toHaveBeenCalledTimes(2);
                        done();
                    });
                    it("when enableScrollToTop is false and enableInfiniteScroll is false\n          should not scroll to top after a query and a page change is executed", function (done) {
                        test = setupResultList({ enableScrollToTop: false, enableInfiniteScroll: false });
                        test.cmp.queryStateModel.set(QueryStateModel_1.QUERY_STATE_ATTRIBUTES.FIRST, 11);
                        Simulate_1.Simulate.query(test.env);
                        jasmine.clock().tick(0);
                        expect(scrollToTopSpy).not.toHaveBeenCalled();
                        done();
                    });
                });
            });
        });
    });
}
exports.ResultListTest = ResultListTest;
 
 
/***/ }),
/* 1653 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var ResultListTableRenderer_1 = __webpack_require__(689);
var Template_1 = __webpack_require__(29);
var TableTemplate_1 = __webpack_require__(239);
var Dom_1 = __webpack_require__(0);
function ResultListTableRendererTest() {
    describe('ResultListTableRenderer', function () {
        var renderer;
        var resultsContainer;
        beforeEach(function () {
            resultsContainer = Dom_1.$$('table').el;
            renderer = new ResultListTableRenderer_1.ResultListTableRenderer({ resultsContainer: resultsContainer }, function () { return null; });
        });
        afterEach(function () {
            renderer = null;
        });
        it('should only instantiate table-header by default', function (done) {
            var fakeTemplateList = new TableTemplate_1.TableTemplate([]);
            renderer = new ResultListTableRenderer_1.ResultListTableRenderer({ resultTemplate: fakeTemplateList, resultsContainer: resultsContainer }, function () { return null; });
            renderer.renderResults([Dom_1.$$('div', { className: 'CoveoResult' }).el], false, function () { return null; }).then(function () {
                expect(Dom_1.$$(resultsContainer).find('.coveo-result-list-table-header')).not.toBeNull();
                done();
            });
        });
        it('should render a table footer if one is present in an embedded TemplateList', function (done) {
            var fakeTemplateList = new TableTemplate_1.TableTemplate([]);
            spyOn(fakeTemplateList, 'hasTemplateWithRole').and.callFake(function (a) {
                Eif (a == 'table-footer') {
                    return true;
                }
            });
            renderer = new ResultListTableRenderer_1.ResultListTableRenderer({ resultTemplate: fakeTemplateList, resultsContainer: resultsContainer }, function () { return null; });
            renderer.renderResults([Dom_1.$$('div', { className: 'CoveoResult' }).el], false, function () { return null; }).then(function () {
                expect(Dom_1.$$(resultsContainer).find('.coveo-result-list-table-footer')).not.toBeNull();
                done();
            });
        });
        it('should not render a table header if custom templates are specified but no header template', function () {
            var fakeTemplateList = new TableTemplate_1.TableTemplate([new Template_1.Template()]);
            spyOn(fakeTemplateList, 'hasTemplateWithRole').and.callFake(function (a) {
                if (a == 'table-header') {
                    return false;
                }
            });
            renderer = new ResultListTableRenderer_1.ResultListTableRenderer({ resultTemplate: fakeTemplateList, resultsContainer: resultsContainer }, function () { return null; });
            renderer.renderResults([Dom_1.$$('div', { className: 'CoveoResult' }).el], false, function () { return null; });
            expect(Dom_1.$$(resultsContainer).find('.coveo-result-list-table-header')).toBeNull();
        });
        it('should not render a header or a footer when passed append set to true', function () {
            var fakeTemplateList = new TableTemplate_1.TableTemplate([new Template_1.Template()]);
            spyOn(fakeTemplateList, 'hasTemplateWithRole').and.callFake(function (a) {
                if (a == 'table-header') {
                    return false;
                }
            });
            renderer = new ResultListTableRenderer_1.ResultListTableRenderer({ resultTemplate: fakeTemplateList, resultsContainer: resultsContainer }, function () { return null; });
            renderer.renderResults([Dom_1.$$('div', { className: 'CoveoResult' }).el], true, function () { return null; });
            expect(Dom_1.$$(resultsContainer).find('.coveo-result-list-table-header')).toBeNull();
            expect(Dom_1.$$(resultsContainer).find('.coveo-result-list-table-footer')).toBeNull();
        });
    });
}
exports.ResultListTableRendererTest = ResultListTableRendererTest;
 
 
/***/ }),
/* 1654 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Mock = __webpack_require__(2);
var ResultRating_1 = __webpack_require__(391);
var Fake_1 = __webpack_require__(11);
var ResultRating_2 = __webpack_require__(391);
var Dom_1 = __webpack_require__(0);
var Simulate_1 = __webpack_require__(15);
function ResultRatingTest() {
    describe('ResultRating', function () {
        var activeStarClass = 'coveo-result-rating-star-active';
        var test;
        var averageFakeResult;
        var fakeResultWithNoStars;
        beforeEach(function () {
            Simulate_1.Simulate.removeJQuery();
            averageFakeResult = Fake_1.FakeResults.createFakeResult();
            averageFakeResult.rating = ResultRating_2.RatingValues.Average;
            fakeResultWithNoStars = Fake_1.FakeResults.createFakeResult();
            fakeResultWithNoStars.rating = ResultRating_2.RatingValues.Undefined;
            test = Mock.advancedResultComponentSetup(ResultRating_1.ResultRating, averageFakeResult, undefined);
        });
        var numberOActivatedStarsIs = function (n) {
            var resultRatings = Dom_1.$$(test.env.element).findAll('a');
            var numberOfActivatedStars = 0;
            for (var i = 0; i < resultRatings.length; i++) {
                if (Dom_1.$$(resultRatings[i]).hasClass(activeStarClass)) {
                    numberOfActivatedStars++;
                }
                else {
                    break;
                }
            }
            return numberOfActivatedStars == n;
        };
        it("should have empty result rating element when there's no rating ", function () {
            var fakeResultWithNoResultRating = Fake_1.FakeResults.createFakeResult();
            fakeResultWithNoResultRating.rating = undefined;
            test = Mock.advancedResultComponentSetup(ResultRating_1.ResultRating, fakeResultWithNoResultRating, undefined);
            expect(Dom_1.$$(test.env.element).isEmpty()).toBe(true);
        });
        it('should load active stars', function () {
            test = Mock.basicResultComponentSetup(ResultRating_1.ResultRating);
            var star = Dom_1.$$(test.env.element).find('a');
            expect(Dom_1.$$(star).hasClass(activeStarClass)).toBe(true);
        });
        it('should load placeholder stars', function () {
            test = Mock.advancedResultComponentSetup(ResultRating_1.ResultRating, fakeResultWithNoStars, undefined);
            var star = Dom_1.$$(test.env.element).find('a');
            expect(Dom_1.$$(star).hasClass('coveo-result-rating-star')).toBe(true);
        });
        it('should call query controller when rating a document', function () {
            var expectedRequest = {
                rating: ResultRating_2.RatingValues[ResultRating_2.RatingValues.Undefined],
                uniqueId: averageFakeResult.uniqueId
            };
            var spy = test.env.searchEndpoint.rateDocument;
            spy.and.returnValue(new Promise(function (resolve, reject) {
                resolve();
            }));
            test.cmp.rateDocument(ResultRating_2.RatingValues.Undefined);
            expect(spy).toHaveBeenCalledWith(expectedRequest);
        });
        it('should activate zero stars with undefined rating', function () {
            var fakeResult = Fake_1.FakeResults.createFakeResult();
            fakeResult.rating = ResultRating_2.RatingValues.Undefined;
            test = Mock.advancedResultComponentSetup(ResultRating_1.ResultRating, fakeResult, undefined);
            expect(numberOActivatedStarsIs(0)).toBe(true);
        });
        it('should activate one star with lowest rating', function () {
            var fakeResult = Fake_1.FakeResults.createFakeResult();
            fakeResult.rating = ResultRating_2.RatingValues.Lowest;
            test = Mock.advancedResultComponentSetup(ResultRating_1.ResultRating, fakeResult, undefined);
            expect(numberOActivatedStarsIs(1)).toBe(true);
        });
        it('should activate two stars with low rating', function () {
            var fakeResult = Fake_1.FakeResults.createFakeResult();
            fakeResult.rating = ResultRating_2.RatingValues.Low;
            test = Mock.advancedResultComponentSetup(ResultRating_1.ResultRating, fakeResult, undefined);
            expect(numberOActivatedStarsIs(2)).toBe(true);
        });
        it('should activate three stars with average rating', function () {
            var fakeResult = Fake_1.FakeResults.createFakeResult();
            fakeResult.rating = ResultRating_2.RatingValues.Average;
            test = Mock.advancedResultComponentSetup(ResultRating_1.ResultRating, fakeResult, undefined);
            expect(numberOActivatedStarsIs(3)).toBe(true);
        });
        it('should activate fours stars with good rating', function () {
            var fakeResult = Fake_1.FakeResults.createFakeResult();
            fakeResult.rating = ResultRating_2.RatingValues.Good;
            test = Mock.advancedResultComponentSetup(ResultRating_1.ResultRating, fakeResult, undefined);
            expect(numberOActivatedStarsIs(4)).toBe(true);
        });
        it('should activate five stars with best rating', function () {
            var fakeResult = Fake_1.FakeResults.createFakeResult();
            fakeResult.rating = ResultRating_2.RatingValues.Best;
            test = Mock.advancedResultComponentSetup(ResultRating_1.ResultRating, fakeResult, undefined);
            expect(numberOActivatedStarsIs(5)).toBe(true);
        });
        it('should activate star on mouseover with collaborative rating and placeholder star', function () {
            test = Mock.advancedResultComponentSetup(ResultRating_1.ResultRating, fakeResultWithNoStars, new Mock.AdvancedComponentSetupOptions(undefined, undefined, function (builder) {
                return builder.withCollaborativeRating();
            }));
            var firstStar = Dom_1.$$(Dom_1.$$(test.env.element).find('a'));
            firstStar.trigger('mouseover');
            expect(numberOActivatedStarsIs(1)).toBe(true);
        });
        it('should activate one star on mouseover with collaborative rating and average rating', function () {
            test = Mock.advancedResultComponentSetup(ResultRating_1.ResultRating, averageFakeResult, new Mock.AdvancedComponentSetupOptions(undefined, undefined, function (builder) {
                return builder.withCollaborativeRating();
            }));
            var firstStar = Dom_1.$$(Dom_1.$$(test.env.element).find('a'));
            firstStar.trigger('mouseover');
            expect(numberOActivatedStarsIs(1)).toBe(true);
        });
        it('should show three activated stars on mouseleave after mouseover with collaborative rating and average rating', function () {
            test = Mock.advancedResultComponentSetup(ResultRating_1.ResultRating, averageFakeResult, new Mock.AdvancedComponentSetupOptions(undefined, undefined, function (builder) {
                return builder.withCollaborativeRating();
            }));
            var firstStar = Dom_1.$$(Dom_1.$$(test.env.element).find('a'));
            firstStar.trigger('mouseover');
            firstStar.trigger('mouseout');
            expect(numberOActivatedStarsIs(3)).toBe(true);
        });
        it('should deactivate star on mouseleave after mouseover with collaborative rating and placeholder star', function () {
            test = Mock.advancedResultComponentSetup(ResultRating_1.ResultRating, fakeResultWithNoStars, new Mock.AdvancedComponentSetupOptions(undefined, undefined, function (builder) {
                return builder.withCollaborativeRating();
            }));
            var firstStar = Dom_1.$$(Dom_1.$$(test.env.element).find('a'));
            firstStar.trigger('mouseover');
            firstStar.trigger('mouseout');
            expect(numberOActivatedStarsIs(0)).toBe(true);
        });
        it('should not activate star on mouseover with no collaborative rating', function () {
            test = Mock.advancedResultComponentSetup(ResultRating_1.ResultRating, fakeResultWithNoStars, undefined);
            var firstStar = Dom_1.$$(Dom_1.$$(test.env.element).find('a'));
            firstStar.trigger('mouseover');
            expect(numberOActivatedStarsIs(0)).toBe(true);
        });
    });
}
exports.ResultRatingTest = ResultRatingTest;
 
 
/***/ }),
/* 1655 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Mock = __webpack_require__(2);
var ResultsPreferences_1 = __webpack_require__(826);
var Dom_1 = __webpack_require__(0);
var Component_1 = __webpack_require__(6);
var PreferencesPanel_1 = __webpack_require__(266);
var Strings_1 = __webpack_require__(4);
var PreferencesPanelEvents_1 = __webpack_require__(112);
var Defer_1 = __webpack_require__(31);
var AnalyticsActionListMeta_1 = __webpack_require__(7);
function ResultsPreferencesTest() {
    describe('ResultsPreferences', function () {
        var test;
        var element;
        beforeEach(function () {
            element = Dom_1.$$('div');
            element.addClass(Component_1.Component.computeCssClassName(PreferencesPanel_1.PreferencesPanel));
        });
        afterEach(function () {
            element = null;
            localStorage.removeItem('coveo-ResultsPreferences');
        });
        describe('with incoherent configuration', function () {
            it('will adjust the preferences for outlook correctly', function (done) {
                localStorage.setItem('coveo-ResultsPreferences', JSON.stringify({ openInOutlook: true }));
                expect(function () {
                    return (test = Mock.advancedComponentSetup(ResultsPreferences_1.ResultsPreferences, new Mock.AdvancedComponentSetupOptions(element.el, { enableOpenInOutlook: false })));
                }).not.toThrow();
                Defer_1.Defer.defer(function () {
                    expect(JSON.parse(localStorage.getItem('coveo-ResultsPreferences')).openInOutlook).toBeUndefined();
                    done();
                });
            });
            it('will adjust the preferences for open in new window correctly', function (done) {
                localStorage.setItem('coveo-ResultsPreferences', JSON.stringify({ alwaysOpenInNewWindow: true }));
                expect(function () {
                    return (test = Mock.advancedComponentSetup(ResultsPreferences_1.ResultsPreferences, new Mock.AdvancedComponentSetupOptions(element.el, { enableOpenInNewWindow: false })));
                }).not.toThrow();
                Defer_1.Defer.defer(function () {
                    expect(JSON.parse(localStorage.getItem('coveo-ResultsPreferences')).alwaysOpenInNewWindow).toBeUndefined();
                    done();
                });
            });
            it('will adjust the preferences for enable query syntax correctly', function (done) {
                localStorage.setItem('coveo-ResultsPreferences', JSON.stringify({ enableQuerySyntax: true }));
                expect(function () {
                    return (test = Mock.advancedComponentSetup(ResultsPreferences_1.ResultsPreferences, new Mock.AdvancedComponentSetupOptions(element.el, { enableQuerySyntax: false })));
                }).not.toThrow();
                Defer_1.Defer.defer(function () {
                    expect(JSON.parse(localStorage.getItem('coveo-ResultsPreferences')).enableQuerySyntax).toBeUndefined();
                    done();
                });
            });
        });
        describe('when an input changes', function () {
            var input;
            beforeEach(function () {
                test = Mock.advancedComponentSetup(ResultsPreferences_1.ResultsPreferences, new Mock.AdvancedComponentSetupOptions(element.el, { enableOpenInNewWindow: true }));
                input = Dom_1.$$(test.cmp.element).find("input[value='" + Strings_1.l('AlwaysOpenInNewWindow') + "']");
            });
            afterEach(function () {
                input = null;
            });
            it('will log an analytics custom event', function () {
                Dom_1.$$(input).trigger('change');
                expect(test.env.usageAnalytics.logCustomEvent).toHaveBeenCalledWith(AnalyticsActionListMeta_1.analyticsActionCauseList.preferencesChange, jasmine.objectContaining({
                    preferenceName: jasmine.any(String)
                }), test.cmp.element);
            });
            it('will log an analytics search event', function () {
                Dom_1.$$(input).trigger('change');
                expect(test.env.usageAnalytics.logSearchEvent).toHaveBeenCalledWith(AnalyticsActionListMeta_1.analyticsActionCauseList.preferencesChange, jasmine.objectContaining({
                    preferenceName: jasmine.any(String)
                }));
            });
            it('will trigger a query when the input is changed', function () {
                Dom_1.$$(input).trigger('change');
                expect(test.env.queryController.executeQuery).toHaveBeenCalled();
            });
        });
        describe('exposes enableOpenInOutlook', function () {
            it('will build a open in outlook option', function () {
                test = Mock.advancedComponentSetup(ResultsPreferences_1.ResultsPreferences, new Mock.AdvancedComponentSetupOptions(element.el, { enableOpenInOutlook: true }));
                expect(Dom_1.$$(test.cmp.element).find("input[value='" + Strings_1.l('OpenInOutlookWhenPossible') + "']")).not.toBeNull();
            });
            it('will not build a open in outlook option if false', function () {
                test = Mock.advancedComponentSetup(ResultsPreferences_1.ResultsPreferences, new Mock.AdvancedComponentSetupOptions(element.el, { enableOpenInOutlook: false }));
                expect(Dom_1.$$(test.cmp.element).find("input[value='" + Strings_1.l('OpenInOutlookWhenPossible') + "']")).toBeNull();
            });
        });
        describe('exposes enableQuerySyntax', function () {
            it('will build a enable query syntax option', function () {
                test = Mock.advancedComponentSetup(ResultsPreferences_1.ResultsPreferences, new Mock.AdvancedComponentSetupOptions(element.el, { enableQuerySyntax: true }));
                expect(Dom_1.$$(test.cmp.element).find("input[name=\"coveo-results-preferences-query-syntax\"]")).not.toBeNull();
            });
            it('will not build a enable query syntax option if false', function () {
                test = Mock.advancedComponentSetup(ResultsPreferences_1.ResultsPreferences, new Mock.AdvancedComponentSetupOptions(element.el, { enableQuerySyntax: false }));
                expect(Dom_1.$$(test.cmp.element).find("input[name=\"coveo-results-preferences-query-syntax\"]")).toBeNull();
            });
        });
        describe('exposes enableOpenInNewWindow', function () {
            it('will build a open in new window option', function () {
                test = Mock.advancedComponentSetup(ResultsPreferences_1.ResultsPreferences, new Mock.AdvancedComponentSetupOptions(element.el, { enableOpenInNewWindow: true }));
                expect(Dom_1.$$(test.cmp.element).find("input[value='" + Strings_1.l('AlwaysOpenInNewWindow') + "']")).not.toBeNull();
            });
            it('will not build a open in new window option if false', function () {
                test = Mock.advancedComponentSetup(ResultsPreferences_1.ResultsPreferences, new Mock.AdvancedComponentSetupOptions(element.el, { enableOpenInNewWindow: false }));
                expect(Dom_1.$$(test.cmp.element).find("input[value='" + Strings_1.l('AlwaysOpenInNewWindow') + "']")).toBeNull();
            });
        });
        describe('when it receives the save event', function () {
            it('will save the current preference in the model', function () {
                test = Mock.advancedComponentSetup(ResultsPreferences_1.ResultsPreferences, new Mock.AdvancedComponentSetupOptions(element.el));
                Dom_1.$$(test.env.root).trigger(PreferencesPanelEvents_1.PreferencesPanelEvents.savePreferences);
                expect(test.env.componentOptionsModel.set).toHaveBeenCalled();
            });
        });
    });
}
exports.ResultsPreferencesTest = ResultsPreferencesTest;
 
 
/***/ }),
/* 1656 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Mock = __webpack_require__(2);
var SearchAlertsMessage_1 = __webpack_require__(829);
var PopupUtils_1 = __webpack_require__(227);
var Dom_1 = __webpack_require__(0);
var SearchAlertEvents_1 = __webpack_require__(86);
function SearchAlertsMessageTest() {
    describe('SearchAlertsMessage', function () {
        var test;
        beforeEach(function () {
            test = Mock.basicComponentSetup(SearchAlertsMessage_1.SearchAlertsMessage);
            spyOn(PopupUtils_1.PopupUtils, 'positionPopup');
            spyOn(test.cmp, 'startCloseDelay');
            spyOn(test.cmp, 'stopCloseDelay');
        });
        afterEach(function () {
            test = null;
        });
        it('should show a message when a subscription is created', function () {
            var subscription = {
                type: 'followQuery',
                typeConfig: {
                    query: {
                        q: 'test'
                    }
                }
            };
            Dom_1.$$(test.env.root).trigger(SearchAlertEvents_1.SearchAlertsEvents.searchAlertsCreated, { dom: Dom_1.$$('div'), subscription: subscription });
            expect(PopupUtils_1.PopupUtils.positionPopup).toHaveBeenCalled();
        });
        it('should show a message on error', function () {
            Dom_1.$$(test.env.root).trigger(SearchAlertEvents_1.SearchAlertsEvents.searchAlertsFail, { dom: Dom_1.$$('div').el });
            expect(PopupUtils_1.PopupUtils.positionPopup).toHaveBeenCalled();
        });
        describe('showMessage', function () {
            it('should display the message', function () {
                var div = Dom_1.$$('div');
                var message = 'Test';
                test.cmp.showMessage(div, message, false);
                expect(Dom_1.$$(PopupUtils_1.PopupUtils.positionPopup.calls.argsFor(0)[0]).find('.coveo-subscriptions-messages-content').innerText).toEqual(message);
            });
            it('should display an error if specified', function () {
                var div = Dom_1.$$('div');
                var message = 'Test';
                test.cmp.showMessage(div, message, true);
                expect(Dom_1.$$(PopupUtils_1.PopupUtils.positionPopup.calls.argsFor(0)[0]).hasClass('coveo-subscriptions-messages-error')).toBe(true);
            });
        });
    });
}
exports.SearchAlertsMessageTest = SearchAlertsMessageTest;
 
 
/***/ }),
/* 1657 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Mock = __webpack_require__(2);
var SearchAlerts_1 = __webpack_require__(828);
var Settings_1 = __webpack_require__(395);
var Dom_1 = __webpack_require__(0);
var SettingsEvents_1 = __webpack_require__(66);
var Simulate_1 = __webpack_require__(15);
var QueryBuilder_1 = __webpack_require__(24);
var SearchAlertEvents_1 = __webpack_require__(86);
var AnalyticsActionListMeta_1 = __webpack_require__(7);
var MockEnvironment_1 = __webpack_require__(2);
var Subscription_1 = __webpack_require__(261);
var _ = __webpack_require__(1);
function SearchAlertsTest() {
    describe('SearchAlerts', function () {
        var test;
        var settingsData;
        var listSubscription;
        var updateSubscription;
        var deleteSubscription;
        var followSubscription;
        var getRootElementOpenedInModalBox = function (test) {
            return test.modalBox.open.calls.argsFor(0)[0];
        };
        beforeEach(function () {
            listSubscription = jasmine.createSpy('listSub');
            listSubscription.and.returnValue(new Promise(function (resolve, reject) { }));
            updateSubscription = jasmine.createSpy('update');
            updateSubscription.and.returnValue(new Promise(function (resolve, reject) { }));
            deleteSubscription = jasmine.createSpy('delete');
            deleteSubscription.and.returnValue(new Promise(function (resolve, reject) { }));
            followSubscription = jasmine.createSpy('follow');
            followSubscription.and.returnValue(followSubscription);
            test = Mock.basicComponentSetupWithModalBox(SearchAlerts_1.SearchAlerts);
            settingsData = {
                settings: Mock.basicComponentSetup(Settings_1.Settings).cmp,
                menuData: []
            };
            test.env.searchEndpoint.listSubscriptions = listSubscription;
            test.env.searchEndpoint.updateSubscription = updateSubscription;
            test.env.searchEndpoint.deleteSubscription = deleteSubscription;
            test.env.searchEndpoint.follow = followSubscription;
            test.env.searchEndpoint.options.isGuestUser = false;
        });
        afterEach(function () {
            test = null;
            settingsData = null;
            listSubscription = null;
            updateSubscription = null;
            deleteSubscription = null;
            followSubscription = null;
        });
        describe('exposes enableMessage option', function () {
            it('should be able to send message', function () {
                expect(test.cmp.message).toBeDefined();
            });
            it('should not be able to send message if false', function () {
                test = Mock.optionsComponentSetupWithModalBox(SearchAlerts_1.SearchAlerts, { enableMessage: false });
                expect(test.cmp.message).toBeUndefined();
            });
        });
        describe('exposes enableManagePanel option', function () {
            it('should add the option in the settings menu if the user is not anonymous', function () {
                test = Mock.advancedComponentSetupWithModalBox(SearchAlerts_1.SearchAlerts, new MockEnvironment_1.AdvancedComponentSetupOptions(null, {
                    enableManagePanel: true
                }, function (env) {
                    env.searchEndpoint.options.isGuestUser = false;
                    return env;
                }));
                Dom_1.$$(test.env.root).trigger(SettingsEvents_1.SettingsEvents.settingsPopulateMenu, settingsData);
                expect(settingsData.menuData).toContain(jasmine.objectContaining({ className: 'coveo-subscriptions-panel' }));
            });
            it('should not add the option in the setting menu if the user is anonymous', function () {
                test = Mock.advancedComponentSetupWithModalBox(SearchAlerts_1.SearchAlerts, new MockEnvironment_1.AdvancedComponentSetupOptions(null, {
                    enableManagePanel: true
                }, function (env) {
                    env.searchEndpoint.options.isGuestUser = true;
                    return env;
                }));
                Dom_1.$$(test.env.root).trigger(SettingsEvents_1.SettingsEvents.settingsPopulateMenu, settingsData);
                expect(settingsData.menuData).not.toContain(jasmine.objectContaining({ className: 'coveo-subscriptions-panel' }));
            });
            it('should not add option in the settings menu if false', function () {
                test = Mock.optionsComponentSetupWithModalBox(SearchAlerts_1.SearchAlerts, {
                    enableManagePanel: false
                });
                Dom_1.$$(test.env.root).trigger(SettingsEvents_1.SettingsEvents.settingsPopulateMenu, settingsData);
                expect(settingsData.menuData).not.toContain(jasmine.objectContaining({ className: 'coveo-subscriptions-panel' }));
            });
        });
        describe('exposes enableFollowQuery options', function () {
            it('should add the option in the settings menu after the first query success', function (done) {
                var promise = Promise.resolve();
                listSubscription.and.returnValue(promise);
                Simulate_1.Simulate.query(test.env);
                promise.then(function () {
                    Dom_1.$$(test.env.root).trigger(SettingsEvents_1.SettingsEvents.settingsPopulateMenu, settingsData);
                    expect(settingsData.menuData).toContain(jasmine.objectContaining({ className: 'coveo-follow-query' }));
                    done();
                });
            });
            it('should not add the option in the settings menu after the first query success if the service is disabled', function (done) {
                var promise = Promise.reject('oh noes');
                listSubscription.and.returnValue(promise);
                Simulate_1.Simulate.query(test.env);
                promise.catch(function () {
                    Dom_1.$$(test.env.root).trigger(SettingsEvents_1.SettingsEvents.settingsPopulateMenu, settingsData);
                    expect(settingsData.menuData).not.toContain(jasmine.objectContaining({ className: 'coveo-follow-query' }));
                    done();
                });
            });
        });
        describe('open panel', function () {
            it('should open a modal box', function (done) {
                listSubscription.and.returnValue(Promise.resolve());
                test.cmp.openPanel().then(function () {
                    expect(test.modalBox.open).toHaveBeenCalledWith(jasmine.anything(), jasmine.objectContaining({ className: 'coveo-subscriptions-panel' }));
                    done();
                });
            });
            it('should show an error message if there was an error', function (done) {
                listSubscription.and.returnValue(Promise.reject({}));
                test.cmp.openPanel().then(function () {
                    var elementOpened = getRootElementOpenedInModalBox(test);
                    expect(Dom_1.$$(elementOpened).find('.coveo-subscriptions-panel-content')).toBeNull();
                    expect(Dom_1.$$(elementOpened).find('.coveo-subscriptions-panel-fail')).not.toBeNull();
                    done();
                });
            });
            describe('with a query being followed', function () {
                var request;
                beforeEach(function () {
                    var queryBuilder = new QueryBuilder_1.QueryBuilder();
                    queryBuilder.expression.add('my query');
                    request = {
                        id: 'qwerty',
                        frequency: 'daily',
                        name: 'my subscription',
                        type: Subscription_1.SUBSCRIPTION_TYPE.followQuery,
                        typeConfig: {
                            modifiedDateField: '@date',
                            query: queryBuilder.build()
                        }
                    };
                });
                afterEach(function () {
                    request = null;
                });
                it('should display subscription with a name', function (done) {
                    var promise = Promise.resolve([request]);
                    listSubscription.and.returnValue(promise);
                    test.cmp.openPanel().then(function () {
                        var elementOpened = getRootElementOpenedInModalBox(test);
                        expect(Dom_1.$$(elementOpened).find('tr.coveo-subscriptions-panel-subscription')).not.toBeNull();
                        expect(Dom_1.$$(elementOpened).find('td.coveo-subscriptions-panel-context')).not.toBeNull();
                        expect(Dom_1.$$(Dom_1.$$(elementOpened).find('td.coveo-subscriptions-panel-context')).text()).toBe('my subscription');
                        done();
                    });
                });
                it('should display subscription query if there is no name', function (done) {
                    request.name = null;
                    var promise = Promise.resolve([request]);
                    listSubscription.and.returnValue(promise);
                    test.cmp.openPanel().then(function () {
                        var elementOpened = getRootElementOpenedInModalBox(test);
                        expect(Dom_1.$$(elementOpened).find('tr.coveo-subscriptions-panel-subscription')).not.toBeNull();
                        expect(Dom_1.$$(elementOpened).find('td.coveo-subscriptions-panel-context')).not.toBeNull();
                        expect(Dom_1.$$(Dom_1.$$(elementOpened).find('td.coveo-subscriptions-panel-context')).text()).toBe('my query');
                        done();
                    });
                });
                it('should display and escape subscription query if there is no name', function (done) {
                    request.name = null;
                    var queryBuilder = new QueryBuilder_1.QueryBuilder();
                    queryBuilder.expression.add('<script>1+1</script>');
                    request.typeConfig.query = queryBuilder.build();
                    var promise = Promise.resolve([request]);
                    listSubscription.and.returnValue(promise);
                    test.cmp.openPanel().then(function () {
                        var elementOpened = getRootElementOpenedInModalBox(test);
                        expect(Dom_1.$$(elementOpened).find('tr.coveo-subscriptions-panel-subscription')).not.toBeNull();
                        expect(Dom_1.$$(elementOpened).find('td.coveo-subscriptions-panel-context')).not.toBeNull();
                        expect(Dom_1.$$(elementOpened).find('td.coveo-subscriptions-panel-context').innerHTML).toEqual(_.escape('<script>1+1</script>'));
                        done();
                    });
                });
            });
            describe('with a follow item', function () {
                var request;
                beforeEach(function () {
                    request = {
                        id: 'qwerty',
                        frequency: 'daily',
                        name: null,
                        type: Subscription_1.SUBSCRIPTION_TYPE.followDocument,
                        typeConfig: {
                            modifiedDateField: '@date',
                            title: 'my title'
                        }
                    };
                });
                afterEach(function () {
                    request = null;
                });
                it('should use the type config title', function (done) {
                    var promise = Promise.resolve([request]);
                    listSubscription.and.returnValue(promise);
                    test.cmp.openPanel().then(function () {
                        var elementOpened = getRootElementOpenedInModalBox(test);
                        expect(Dom_1.$$(elementOpened).find('tr.coveo-subscriptions-panel-subscription')).not.toBeNull();
                        expect(Dom_1.$$(elementOpened).find('td.coveo-subscriptions-panel-context')).not.toBeNull();
                        expect(Dom_1.$$(Dom_1.$$(elementOpened).find('td.coveo-subscriptions-panel-context')).text()).toEqual('my title');
                        done();
                    });
                });
                it('should set the correct frequency in the dropdown', function (done) {
                    request.frequency = 'sunday';
                    var promise = Promise.resolve([request]);
                    listSubscription.and.returnValue(promise);
                    test.cmp.openPanel().then(function () {
                        var elementOpened = getRootElementOpenedInModalBox(test);
                        expect(Dom_1.$$(elementOpened).find('.coveo-dropdown').value).toBe('sunday');
                        done();
                    });
                });
                it('should call usage analytics when the dropdown for frequency is changed', function (done) {
                    request.frequency = 'sunday';
                    request.typeConfig.title = 'my title';
                    var promise = Promise.resolve([request]);
                    listSubscription.and.returnValue(promise);
                    test.cmp.openPanel().then(function () {
                        var elementOpened = getRootElementOpenedInModalBox(test);
                        var dropdown = Dom_1.$$(elementOpened).find('.coveo-dropdown');
                        Dom_1.$$(dropdown).trigger('change');
                        expect(test.env.usageAnalytics.logCustomEvent).toHaveBeenCalledWith(AnalyticsActionListMeta_1.analyticsActionCauseList.searchAlertsUpdateSubscription, jasmine.objectContaining({
                            subscription: 'my title',
                            frequency: 'sunday'
                        }), test.cmp.element);
                        done();
                    });
                });
                it('should call the search alert service when the dropdown for frequency is changed', function (done) {
                    request.frequency = 'monday';
                    request.typeConfig.title = 'some nice title';
                    var promise = Promise.resolve([request]);
                    listSubscription.and.returnValue(promise);
                    test.cmp.openPanel().then(function () {
                        var elementOpened = getRootElementOpenedInModalBox(test);
                        var dropdown = Dom_1.$$(elementOpened).find('.coveo-dropdown');
                        var option = Dom_1.$$(dropdown).find('option[value="sunday"');
                        option.selected = true;
                        Dom_1.$$(dropdown).trigger('change');
                        expect(updateSubscription).toHaveBeenCalledWith(jasmine.objectContaining({
                            frequency: 'sunday',
                            typeConfig: jasmine.objectContaining({
                                title: 'some nice title'
                            })
                        }));
                        done();
                    });
                });
                it('should call the search alert service when an item is unfollowed', function (done) {
                    request.frequency = 'friday';
                    request.typeConfig.title = "it's friday friday, gotta get down on friday";
                    var promise = Promise.resolve([request]);
                    listSubscription.and.returnValue(promise);
                    test.cmp.openPanel().then(function () {
                        var elementOpened = getRootElementOpenedInModalBox(test);
                        var unfollow = Dom_1.$$(elementOpened).find('.coveo-subscriptions-panel-action-unfollow');
                        Dom_1.$$(unfollow).trigger('click');
                        expect(deleteSubscription).toHaveBeenCalledWith(jasmine.objectContaining({
                            frequency: 'friday',
                            typeConfig: jasmine.objectContaining({
                                title: "it's friday friday, gotta get down on friday"
                            })
                        }));
                        done();
                    });
                });
                it('should call the analytics service when an item is unfollowed', function (done) {
                    request.name = 'my sub';
                    var promise = Promise.resolve([request]);
                    listSubscription.and.returnValue(promise);
                    test.cmp.openPanel().then(function () {
                        var deletePromise = Promise.resolve();
                        deleteSubscription.and.returnValue(deletePromise);
                        var elementOpened = getRootElementOpenedInModalBox(test);
                        var unfollow = Dom_1.$$(elementOpened).find('.coveo-subscriptions-panel-action-unfollow');
                        Dom_1.$$(unfollow).trigger('click');
                        deletePromise.finally(function () {
                            expect(test.env.usageAnalytics.logCustomEvent).toHaveBeenCalledWith(AnalyticsActionListMeta_1.analyticsActionCauseList.searchAlertsUnfollowDocument, jasmine.objectContaining({
                                subscription: 'my sub'
                            }), test.cmp.element);
                            done();
                        });
                    });
                });
                it('should call the search alert service when an item is followed', function (done) {
                    var promise = Promise.resolve([request]);
                    listSubscription.and.returnValue(promise);
                    test.cmp.openPanel().then(function () {
                        var followPromise = Promise.resolve();
                        followSubscription.and.returnValue(followPromise);
                        var elementOpened = getRootElementOpenedInModalBox(test);
                        var follow = Dom_1.$$(elementOpened).find('.coveo-subscriptions-panel-action-follow');
                        Dom_1.$$(follow).trigger('click');
                        followPromise.finally(function () {
                            expect(followSubscription).toHaveBeenCalledWith(jasmine.objectContaining({
                                frequency: 'daily',
                                typeConfig: jasmine.objectContaining({
                                    title: 'my title'
                                })
                            }));
                            done();
                        });
                    });
                });
                it('should call the analytics service when an item is followed', function (done) {
                    request.name = 'my document';
                    var promise = Promise.resolve([request]);
                    listSubscription.and.returnValue(promise);
                    test.cmp.openPanel().then(function () {
                        var followPromise = Promise.resolve();
                        followSubscription.and.returnValue(followPromise);
                        var elementOpened = getRootElementOpenedInModalBox(test);
                        var follow = Dom_1.$$(elementOpened).find('.coveo-subscriptions-panel-action-follow');
                        Dom_1.$$(follow).trigger('click');
                        followPromise.finally(function () {
                            expect(test.env.usageAnalytics.logCustomEvent).toHaveBeenCalledWith(AnalyticsActionListMeta_1.analyticsActionCauseList.searchAlertsFollowDocument, jasmine.objectContaining({
                                subscription: 'my document'
                            }), test.cmp.element);
                            done();
                        });
                    });
                });
            });
        });
        describe('follow query', function () {
            var followMock;
            beforeEach(function () {
                test.cmp.queryController.createQueryBuilder.and.returnValue(new QueryBuilder_1.QueryBuilder());
                followMock = jasmine.createSpy('follow');
                followMock.and.returnValue(Promise.resolve({}));
                spyOn(test.cmp.queryController, 'getEndpoint').and.returnValue({ follow: followMock });
            });
            afterEach(function () {
                followMock = null;
            });
            it('should call the endpoint', function () {
                test.cmp.followQuery();
                expect(followMock).toHaveBeenCalled();
            });
            it('should log an analytics event', function () {
                test.cmp.followQuery();
                expect(test.cmp.usageAnalytics.logCustomEvent).toHaveBeenCalledWith(AnalyticsActionListMeta_1.analyticsActionCauseList.searchAlertsFollowQuery, {
                    subscription: '<empty>'
                }, test.cmp.element);
            });
            it('should trigger a search alert created event', function (done) {
                Dom_1.$$(test.env.root).on(SearchAlertEvents_1.SearchAlertsEvents.searchAlertsCreated, function () {
                    expect(true).toBe(true);
                    done();
                });
                test.cmp.followQuery();
            });
            it('should send the query property on follow query', function () {
                var builder = new QueryBuilder_1.QueryBuilder();
                builder.expression.add('yololo');
                test.cmp.queryController.createQueryBuilder.and.returnValue(builder);
                test.cmp.followQuery();
                expect(followMock).toHaveBeenCalledWith(jasmine.objectContaining({
                    typeConfig: jasmine.objectContaining({
                        query: jasmine.objectContaining({
                            q: jasmine.stringMatching('yololo')
                        })
                    })
                }));
            });
            it('should send the name property on follow query', function () {
                var builder = new QueryBuilder_1.QueryBuilder();
                builder.expression.add('yololo');
                test.cmp.queryController.createQueryBuilder.and.returnValue(builder);
                Dom_1.$$(test.env.root).on(SearchAlertEvents_1.SearchAlertsEvents.searchAlertsPopulateMessage, function (e, args) {
                    args.text.push('Something');
                    args.text.push('Another thing');
                });
                test.cmp.followQuery();
                expect(followMock).toHaveBeenCalledWith(jasmine.objectContaining({
                    name: 'yololo (Something) (Another thing)'
                }));
            });
            it('should trigger a search alert failed event if there was a problem', function (done) {
                followMock.and.returnValue(Promise.resolve());
                Dom_1.$$(test.env.root).on(SearchAlertEvents_1.SearchAlertsEvents.searchAlertsFail, function () {
                    expect(true).toBe(true);
                    done();
                });
                test.cmp.followQuery();
            });
        });
    });
}
exports.SearchAlertsTest = SearchAlertsTest;
 
 
/***/ }),
/* 1658 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Mock = __webpack_require__(2);
var SearchButton_1 = __webpack_require__(394);
var AnalyticsActionListMeta_1 = __webpack_require__(7);
var Core_1 = __webpack_require__(9);
function SearchButtonTest() {
    describe('SearchButton', function () {
        var test;
        beforeEach(function () {
            test = Mock.basicComponentSetup(SearchButton_1.SearchButton);
        });
        afterEach(function () {
            test = null;
        });
        it('can be initialized', function () {
            expect(test.cmp).toBeDefined();
        });
        it('will trigger a query on click', function () {
            test.cmp.click();
            expect(test.env.queryController.executeQuery).toHaveBeenCalledWith(jasmine.objectContaining({ logInActionsHistory: true }));
        });
        it('will log an analytics event', function () {
            test.cmp.click();
            expect(test.env.usageAnalytics.logSearchEvent).toHaveBeenCalledWith(AnalyticsActionListMeta_1.analyticsActionCauseList.searchboxSubmit, {});
        });
        it("when the #options.searchbox is defined, when clicking the button,\n    it calls QueryStateModel #set to update the query", function () {
            var options = {
                searchbox: { getText: function () { return 'some query'; } }
            };
            test = Mock.basicComponentSetup(SearchButton_1.SearchButton, options);
            test.cmp.click();
            expect(test.env.queryStateModel.set).toHaveBeenCalledWith(Core_1.QueryStateModel.attributesEnum.q, options.searchbox.getText());
        });
        it("when the #options is null, when clicking the button, it does not throw an error", function () {
            test = Mock.basicComponentSetup(SearchButton_1.SearchButton, null);
            expect(function () { return test.cmp.click(); }).not.toThrow();
        });
    });
}
exports.SearchButtonTest = SearchButtonTest;
 
 
/***/ }),
/* 1659 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Facet_1 = __webpack_require__(32);
var FacetValueStateHandler_1 = __webpack_require__(498);
var Mock = __webpack_require__(2);
function FacetValueStateHandlerTest() {
    describe('FacetValueStateHandler', function () {
        var test;
        var facetMatchingFvState;
        var facetId = 'somefield';
        var fieldIdWithoutFacet = 'bloup';
        var someFacetValue = 'fishfishfish';
        var getFacetValueStateWithField = function (key) {
            return _a = {},
                _a[key] = [someFacetValue],
                _a;
            var _a;
        };
        beforeEach(function () {
            facetMatchingFvState = Mock.optionsComponentSetup(Facet_1.Facet, {
                id: facetId,
                field: facetId
            });
            test = new FacetValueStateHandler_1.FacetValueStateHandler(facetMatchingFvState.env.searchInterface);
            test.searchInterface.getComponents.and.returnValue([facetMatchingFvState.cmp]);
        });
        afterEach(function () {
            test = null;
            facetMatchingFvState = null;
        });
        describe('with a facet matching the facet value state', function () {
            var state;
            beforeEach(function () {
                state = {
                    fv: getFacetValueStateWithField(facetId)
                };
            });
            afterEach(function () {
                state = null;
            });
            it('should remove the facet value state', function () {
                test.handleFacetValueState(state);
                expect(Object.keys(state.fv)).not.toContain(facetId);
            });
            it('should set the facet state with the original fv value', function () {
                test.handleFacetValueState(state);
                var facetField = "f:" + facetId;
                expect(Object.keys(state)).toContain(facetField);
                expect(state[facetField]).toContain(someFacetValue);
            });
        });
        describe('without facets matching the facet value state', function () {
            var state;
            beforeEach(function () {
                state = {
                    fv: getFacetValueStateWithField(fieldIdWithoutFacet)
                };
            });
            afterEach(function () {
                state = null;
            });
            it('should remove the facet value state', function () {
                test.handleFacetValueState(state);
                expect(Object.keys(state.fv)).not.toContain(fieldIdWithoutFacet);
            });
            it('should set and hidden query expression with the value', function () {
                test.handleFacetValueState(state);
                expect(Object.keys(state)).toContain("hq");
                expect(state.hq).toBe(fieldIdWithoutFacet + "==\"" + someFacetValue + "\"");
            });
        });
    });
}
exports.FacetValueStateHandlerTest = FacetValueStateHandlerTest;
 
 
/***/ }),
/* 1660 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __assign = (this && this.__assign) || Object.assign || function(t) {
    for (var s, i = 1, n = arguments.length; i < n; i++) {
        s = arguments[i];
        for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
            t[p] = s[p];
    }
    return t;
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { Iif (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        Iif (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            Iif (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
            Iif (y = 0, t) op = [0, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    Eif (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        Iif (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
Object.defineProperty(exports, "__esModule", { value: true });
var underscore_1 = __webpack_require__(1);
var HistoryController_1 = __webpack_require__(216);
var LocalStorageHistoryController_1 = __webpack_require__(299);
var QueryController_1 = __webpack_require__(78);
var Core_1 = __webpack_require__(9);
var QueryEvents_1 = __webpack_require__(14);
var ComponentOptionsModel_1 = __webpack_require__(55);
var ComponentStateModel_1 = __webpack_require__(134);
var QueryStateModel_1 = __webpack_require__(17);
var Component_1 = __webpack_require__(6);
var QueryBuilder_1 = __webpack_require__(24);
var Debug_1 = __webpack_require__(219);
var PipelineContext_1 = __webpack_require__(389);
var Querybox_1 = __webpack_require__(125);
var Quickview_1 = __webpack_require__(390);
var ResponsiveComponents_1 = __webpack_require__(54);
var SearchInterface_1 = __webpack_require__(25);
var Dom_1 = __webpack_require__(0);
var Fake_1 = __webpack_require__(11);
var Mock = __webpack_require__(2);
var Simulate_1 = __webpack_require__(15);
var Test_1 = __webpack_require__(40);
var NoopHistoryController_1 = __webpack_require__(301);
var MockEnvironment_1 = __webpack_require__(2);
function SearchInterfaceTest() {
    var _this = this;
    describe('SearchInterface', function () {
        var cmp;
        beforeEach(function () {
            cmp = new SearchInterface_1.SearchInterface(document.createElement('div'));
        });
        afterEach(function () {
            cmp = null;
        });
        it('should create an analytics client', function () {
            expect(cmp.usageAnalytics instanceof Coveo['NoopAnalyticsClient']).toBe(true);
        });
        it('should create a query controller', function () {
            expect(cmp.queryController instanceof QueryController_1.QueryController).toBe(true);
        });
        it('should create a query state model', function () {
            expect(cmp.queryStateModel instanceof QueryStateModel_1.QueryStateModel).toBe(true);
        });
        it('should create a component options model', function () {
            expect(cmp.componentOptionsModel instanceof ComponentOptionsModel_1.ComponentOptionsModel).toBe(true, 'Not a component options model');
        });
        it('should create a component state model', function () {
            expect(cmp.componentStateModel instanceof ComponentStateModel_1.ComponentStateModel).toBe(true, 'Not a component state model');
        });
        it('should create a search interface', function () {
            expect(cmp instanceof SearchInterface_1.SearchInterface).toBe(true);
        });
        it('should set the root as itself', function () {
            expect(cmp.root).toBe(cmp.element, 'Not an element');
        });
        it('should allow to attach and detach component', function () {
            var cmpToAttach = Mock.mockComponent(Querybox_1.Querybox);
            cmp.attachComponent('Querybox', cmpToAttach);
            expect(cmp.getComponents('Querybox')).toContain(cmpToAttach);
            cmp.detachComponent('Querybox', cmpToAttach);
            expect(cmp.getComponents('Querybox')).not.toContain(cmpToAttach);
        });
        describe('detachComponentsInside', function () {
            var querybox;
            var quickview;
            beforeEach(function () {
                querybox = Mock.mockComponent(Querybox_1.Querybox);
                quickview = Mock.mockComponent(Quickview_1.Quickview);
                querybox.element = Dom_1.$$('div').el;
                quickview.element = Dom_1.$$('div').el;
                cmp.attachComponent('Querybox', querybox);
                cmp.attachComponent('Quickview', quickview);
            });
            it('should detach every component inside a given element', function () {
                var container = Dom_1.$$('div', {}, querybox.element, quickview.element);
                cmp.detachComponentsInside(container.el);
                expect(cmp.getComponents('Querybox')).not.toContain(querybox);
                expect(cmp.getComponents('Quickview')).not.toContain(quickview);
            });
            it('should not detach components outside the given element', function () {
                var container = Dom_1.$$('div', {}, quickview.element);
                cmp.detachComponentsInside(container.el);
                expect(cmp.getComponents('Querybox')).toContain(querybox);
                expect(cmp.getComponents('Quickview')).not.toContain(quickview);
            });
        });
        describe('usage analytics', function () {
            var searchInterfaceDiv;
            var analyticsDiv;
            beforeEach(function () {
                searchInterfaceDiv = Dom_1.$$('div').el;
                analyticsDiv = Dom_1.$$('div', {
                    className: 'CoveoAnalytics',
                    'data-token': 'el-tokeno'
                }).el;
                searchInterfaceDiv.appendChild(analyticsDiv);
            });
            afterEach(function () {
                searchInterfaceDiv = null;
                analyticsDiv = null;
            });
            it('should initialize if found inside the root', function () {
                var searchInterface = new SearchInterface_1.SearchInterface(searchInterfaceDiv);
                expect(searchInterface.usageAnalytics instanceof Coveo['LiveAnalyticsClient']).toBe(true);
            });
        });
        it('should set the correct css class on facet section, if available', function () {
            var facetSection = Dom_1.$$('div', { className: 'coveo-facet-column' });
            cmp.element.appendChild(facetSection.el);
            cmp.queryController.options.endpoint = Mock.mockSearchEndpoint();
            var env = new MockEnvironment_1.MockEnvironmentBuilder().withRoot(cmp.element).build();
            Simulate_1.Simulate.query(env, { results: Fake_1.FakeResults.createFakeResults(0) });
            expect(facetSection.hasClass('coveo-no-results')).toBe(true);
            Simulate_1.Simulate.query(env, { results: Fake_1.FakeResults.createFakeResults(10) });
            expect(facetSection.hasClass('coveo-no-results')).toBe(false);
            Simulate_1.Simulate.queryError(env);
            expect(facetSection.hasClass('coveo-no-results')).toBe(true);
            Simulate_1.Simulate.query(env, { results: Fake_1.FakeResults.createFakeResults(10) });
            expect(facetSection.hasClass('coveo-no-results')).toBe(false);
        });
        it('should set the correct css class on result section, if available', function () {
            var resultsSection = Dom_1.$$('div', { className: 'coveo-results-column' });
            cmp.element.appendChild(resultsSection.el);
            cmp.queryController.options.endpoint = Mock.mockSearchEndpoint();
            var env = new MockEnvironment_1.MockEnvironmentBuilder().withRoot(cmp.element).build();
            Simulate_1.Simulate.query(env, { results: Fake_1.FakeResults.createFakeResults(0) });
            expect(resultsSection.hasClass('coveo-no-results')).toBe(true);
            Simulate_1.Simulate.query(env, { results: Fake_1.FakeResults.createFakeResults(10) });
            expect(resultsSection.hasClass('coveo-no-results')).toBe(false);
            Simulate_1.Simulate.queryError(env);
            expect(resultsSection.hasClass('coveo-no-results')).toBe(true);
            Simulate_1.Simulate.query(env, { results: Fake_1.FakeResults.createFakeResults(10) });
            expect(resultsSection.hasClass('coveo-no-results')).toBe(false);
        });
        it('should set the correct css class on recommendation section, if available', function () {
            var recommendationSection = Dom_1.$$('div', { className: 'coveo-recommendation-main-section' });
            cmp.element.appendChild(recommendationSection.el);
            cmp.queryController.options.endpoint = Mock.mockSearchEndpoint();
            var env = new MockEnvironment_1.MockEnvironmentBuilder().withRoot(cmp.element).build();
            Simulate_1.Simulate.query(env, { results: Fake_1.FakeResults.createFakeResults(0) });
            expect(recommendationSection.hasClass('coveo-no-results')).toBe(true);
            Simulate_1.Simulate.query(env, { results: Fake_1.FakeResults.createFakeResults(10) });
            expect(recommendationSection.hasClass('coveo-no-results')).toBe(false);
            Simulate_1.Simulate.queryError(env);
            expect(recommendationSection.hasClass('coveo-no-results')).toBe(true);
            Simulate_1.Simulate.query(env, { results: Fake_1.FakeResults.createFakeResults(10) });
            expect(recommendationSection.hasClass('coveo-no-results')).toBe(false);
        });
        describe('with an environment', function () {
            var div;
            var mockWindow;
            var env;
            beforeEach(function () {
                div = document.createElement('div');
                env = new Mock.MockEnvironmentBuilder()
                    .withRoot(div)
                    .withEndpoint(new Test_1.SearchEndpoint({
                    restUri: 'foo/rest/search'
                }))
                    .withLiveQueryStateModel()
                    .build();
                env.queryController.setEndpoint(env.searchEndpoint);
                env.queryController.getEndpoint = function () { return env.searchEndpoint; };
                mockWindow = Mock.mockWindow();
            });
            var setupSearchInterface = function (options, analyticsOptions) {
                cmp = new SearchInterface_1.SearchInterface(div, options, analyticsOptions, mockWindow);
                cmp.queryController = env.queryController;
                cmp.queryStateModel = env.queryStateModel;
                cmp.usageAnalytics = env.usageAnalytics;
                return cmp;
            };
            afterEach(function () {
                div = null;
                env = null;
                mockWindow = null;
            });
            describe('when modifying results per page', function () {
                var searchInterface;
                beforeEach(function () {
                    Simulate_1.Simulate.removeJQuery();
                    searchInterface = new SearchInterface_1.SearchInterface(div, undefined, undefined, mockWindow);
                    searchInterface.queryController.setEndpoint(Mock.mockSearchEndpoint());
                });
                it('should adapt the query controller options', function () {
                    searchInterface.resultsPerPage = 1235;
                    expect(searchInterface.queryController.options.resultsPerPage).toBe(1235);
                });
                it('should tell correctly when the parameter has been overwritten by a query pipeline', function () {
                    // Component is configured to request 15 results, but receives only 7, meaning the setting was overwritten by the backend
                    searchInterface.resultsPerPage = 15;
                    var fakeResults = Fake_1.FakeResults.createFakeResults(7);
                    fakeResults.totalCountFiltered = fakeResults.totalCount = 999;
                    var builder = new QueryBuilder_1.QueryBuilder();
                    builder.numberOfResults = 15;
                    Simulate_1.Simulate.query(__assign({ element: searchInterface.root, result: null, searchEndpoint: null }, searchInterface.getBindings()), {
                        results: fakeResults,
                        query: builder.build()
                    });
                    expect(searchInterface.isResultsPerPageModifiedByPipeline).toBeTruthy();
                    // Component is configured to request 15 results, and exactly 15 results are returned
                    searchInterface.resultsPerPage = 15;
                    fakeResults = Fake_1.FakeResults.createFakeResults(15);
                    fakeResults.totalCountFiltered = fakeResults.totalCount = 999;
                    builder = new QueryBuilder_1.QueryBuilder();
                    builder.numberOfResults = 15;
                    Simulate_1.Simulate.query(__assign({ element: searchInterface.root, result: null, searchEndpoint: null }, searchInterface.getBindings()), {
                        results: fakeResults,
                        query: builder.build()
                    });
                    expect(searchInterface.isResultsPerPageModifiedByPipeline).toBeFalsy();
                });
                it("when the actual number of results is less than requested due to being on the last page,\n        it should mark #isResultsPerPageModifiedByPipeline as false", function () {
                    var totalNumberOfResults = 13;
                    var resultsPerPage = 10;
                    var numOfResultsToReturn = totalNumberOfResults - resultsPerPage;
                    var fakeResults = Fake_1.FakeResults.createFakeResults(numOfResultsToReturn);
                    fakeResults.totalCountFiltered = fakeResults.totalCount = totalNumberOfResults;
                    searchInterface.resultsPerPage = resultsPerPage;
                    var builder = new QueryBuilder_1.QueryBuilder();
                    builder.numberOfResults = resultsPerPage;
                    builder.firstResult = resultsPerPage;
                    Simulate_1.Simulate.query(__assign({ element: searchInterface.root, result: null, searchEndpoint: null }, searchInterface.getBindings()), {
                        results: fakeResults,
                        query: builder.build()
                    });
                    expect(searchInterface.isResultsPerPageModifiedByPipeline).toBeFalsy();
                });
            });
            it('should return undefined if no query context exists', function () {
                setupSearchInterface();
                expect(cmp.getQueryContext()).toBeUndefined();
            });
            it('should allow to retrieve the context after a query', function () {
                setupSearchInterface();
                var queryBuilder = new QueryBuilder_1.QueryBuilder();
                queryBuilder.addContextValue('123', '456');
                cmp.queryController.getLastQuery = function () { return queryBuilder.build(); };
                Simulate_1.Simulate.query(env, {
                    query: queryBuilder.build()
                });
                expect(cmp.getQueryContext()).toEqual({ '123': '456' });
            });
            it('should allow to retrieve the context from a PipelineContext if present', function () {
                setupSearchInterface();
                var pipeline = new PipelineContext_1.PipelineContext(Dom_1.$$('script').el, {}, cmp.getBindings());
                pipeline.setContext({
                    foo: 'bar'
                });
                expect(cmp.getQueryContext()).toEqual({ foo: 'bar' });
            });
            it('should allow to retrieve the context from multiple PipelineContext if present', function () {
                var pipeline1 = new PipelineContext_1.PipelineContext(Dom_1.$$('script').el, {}, cmp.getBindings());
                pipeline1.setContext({
                    foo: 'bar'
                });
                var pipeline2 = new PipelineContext_1.PipelineContext(Dom_1.$$('script').el, {}, cmp.getBindings());
                pipeline2.setContext({
                    buzz: 'bazz'
                });
                expect(cmp.getQueryContext()).toEqual({ foo: 'bar', buzz: 'bazz' });
            });
            it('should allow to retrieve the context from the multiple PipelineContext if they have conflicting context', function () {
                var pipeline1 = new PipelineContext_1.PipelineContext(Dom_1.$$('script').el, {}, cmp.getBindings());
                pipeline1.setContext({
                    foo: 'bar'
                });
                var pipeline2 = new PipelineContext_1.PipelineContext(Dom_1.$$('script').el, {}, cmp.getBindings());
                pipeline2.setContext({
                    foo: 'not bar'
                });
                expect(cmp.getQueryContext()).toEqual({ foo: 'not bar' });
            });
            describe('exposes options', function () {
                it('enableHistory allow to enable history in the url', function () {
                    setupSearchInterface({
                        enableHistory: true
                    });
                    expect(Component_1.Component.resolveBinding(cmp.element, HistoryController_1.HistoryController)).toBeDefined();
                });
                it("enableHistory uses a full fledge HistoryController by default as it's manager", function () {
                    var searchInterface = setupSearchInterface({
                        enableHistory: true
                    });
                    expect(searchInterface.historyManager instanceof HistoryController_1.HistoryController).toBe(true);
                });
                it("enableHistory can be disabled and won't save history in the url", function () {
                    setupSearchInterface({
                        enableHistory: false
                    });
                    expect(Component_1.Component.resolveBinding(cmp.element, HistoryController_1.HistoryController)).toBeUndefined();
                });
                it('enableHistory can be disabled and there will still be an history manager to access', function () {
                    var searchInterface = setupSearchInterface({
                        enableHistory: false
                    });
                    expect(searchInterface.historyManager instanceof NoopHistoryController_1.NoopHistoryController).toBe(true);
                });
                it('useLocalStorageForHistory allow to use local storage for history', function () {
                    setupSearchInterface({
                        enableHistory: true,
                        useLocalStorageForHistory: true
                    });
                    expect(Component_1.Component.resolveBinding(cmp.element, HistoryController_1.HistoryController)).toBeUndefined();
                    expect(Component_1.Component.resolveBinding(cmp.element, LocalStorageHistoryController_1.LocalStorageHistoryController)).toBeDefined();
                });
                it("useLocalStorageForHistory uses a LocalStorageHistoryController as it's manager", function () {
                    var searchInterface = setupSearchInterface({
                        enableHistory: true,
                        useLocalStorageForHistory: true
                    });
                    expect(searchInterface.historyManager instanceof LocalStorageHistoryController_1.LocalStorageHistoryController).toBe(true);
                });
                it('useLocalStorageForHistory allow to use local storage for history, but not if history is disabled', function () {
                    setupSearchInterface({
                        enableHistory: false,
                        useLocalStorageForHistory: true
                    });
                    expect(Component_1.Component.resolveBinding(cmp.element, HistoryController_1.HistoryController)).toBeUndefined();
                    expect(Component_1.Component.resolveBinding(cmp.element, LocalStorageHistoryController_1.LocalStorageHistoryController)).toBeUndefined();
                });
                it('resultsPerPage allow to specify the number of results in query', function () {
                    setupSearchInterface({ resultsPerPage: 123 });
                    var simulation = Simulate_1.Simulate.query(env);
                    expect(simulation.queryBuilder.numberOfResults).toBe(123);
                });
                it('resultsPerPage should be 10 by default', function () {
                    setupSearchInterface();
                    var simulation = Simulate_1.Simulate.query(env);
                    expect(simulation.queryBuilder.numberOfResults).toBe(10);
                });
                it('excerptLength allow to specify the excerpt length of results in a query', function () {
                    setupSearchInterface({ excerptLength: 123 });
                    var simulation = Simulate_1.Simulate.query(env);
                    expect(simulation.queryBuilder.excerptLength).toBe(123);
                });
                it('excerptLength should be 200 by default', function () {
                    setupSearchInterface();
                    var simulation = Simulate_1.Simulate.query(env);
                    expect(simulation.queryBuilder.excerptLength).toBe(200);
                });
                it('expression allow to specify and advanced expression to add to the query', function () {
                    setupSearchInterface({ expression: 'foobar' });
                    var simulation = Simulate_1.Simulate.query(env);
                    expect(simulation.queryBuilder.constantExpression.build()).toBe('foobar');
                });
                it('expression should not be added if empty', function () {
                    setupSearchInterface({ expression: '' });
                    var simulation = Simulate_1.Simulate.query(env);
                    expect(simulation.queryBuilder.constantExpression.build()).toBeUndefined();
                });
                it('expression should be empty by default', function () {
                    setupSearchInterface();
                    var simulation = Simulate_1.Simulate.query(env);
                    expect(simulation.queryBuilder.constantExpression.build()).toBeUndefined();
                });
                it('filterField allow to specify a filtering field', function () {
                    setupSearchInterface({ filterField: '@foobar' });
                    var simulation = Simulate_1.Simulate.query(env);
                    expect(simulation.queryBuilder.filterField).toBe('@foobar');
                });
                it('filterField should be empty by default', function () {
                    setupSearchInterface();
                    var simulation = Simulate_1.Simulate.query(env);
                    expect(simulation.queryBuilder.filterField).toBeUndefined();
                });
                it('timezone allow to specify a timezone in the query', function () {
                    setupSearchInterface({ timezone: 'aa-bb' });
                    var simulation = Simulate_1.Simulate.query(env);
                    expect(simulation.queryBuilder.timezone).toBe('aa-bb');
                });
                it('enableDebugInfo should create a debug component', function (done) {
                    var cmp = new SearchInterface_1.SearchInterface(div, {
                        enableDebugInfo: true
                    }, undefined, mockWindow);
                    underscore_1.defer(function () {
                        expect(Component_1.Component.resolveBinding(cmp.element, Debug_1.Debug)).toBeDefined();
                        done();
                    });
                });
                it('enableDebugInfo disabled should not create a debug component', function (done) {
                    var cmp = new SearchInterface_1.SearchInterface(div, {
                        enableDebugInfo: false
                    }, undefined, mockWindow);
                    underscore_1.defer(function () {
                        expect(Component_1.Component.resolveBinding(cmp.element, Debug_1.Debug)).toBeUndefined();
                        done();
                    });
                });
                it('enableCollaborativeRating allow to specify the collaborative rating in the query', function () {
                    setupSearchInterface({ enableCollaborativeRating: true });
                    var simulation = Simulate_1.Simulate.query(env);
                    expect(simulation.queryBuilder.enableCollaborativeRating).toBe(true);
                });
                it('enableCollaborativeRating to false allow to disable the collaborative rating in the query', function () {
                    setupSearchInterface({ enableCollaborativeRating: false });
                    var simulation = Simulate_1.Simulate.query(env);
                    expect(simulation.queryBuilder.enableCollaborativeRating).toBe(false);
                });
                it('enableDuplicateFiltering allow to filter duplicate in the query', function () {
                    setupSearchInterface({ enableDuplicateFiltering: true });
                    var simulation = Simulate_1.Simulate.query(env);
                    expect(simulation.queryBuilder.enableDuplicateFiltering).toBe(true);
                });
                it('enableDuplicateFiltering to false allow to disable the filter duplicate in the query', function () {
                    setupSearchInterface({ enableDuplicateFiltering: false });
                    var simulation = Simulate_1.Simulate.query(env);
                    expect(simulation.queryBuilder.enableDuplicateFiltering).toBe(false);
                });
                it('pipeline allow to specify the pipeline to use in a query', function () {
                    setupSearchInterface({ pipeline: 'foobar' });
                    var simulation = Simulate_1.Simulate.query(env);
                    expect(simulation.queryBuilder.pipeline).toBe('foobar');
                });
                it('maximumAge allow to specify the duration of the cache in a query', function () {
                    setupSearchInterface({ maximumAge: 123 });
                    var simulation = Simulate_1.Simulate.query(env);
                    expect(simulation.queryBuilder.maximumAge).toBe(123);
                });
                it('responsiveMediumBreakpoint will set the value properly in the underlying ResponsiveComponent', function () {
                    var searchInterface = setupSearchInterface({ responsiveMediumBreakpoint: 12345 });
                    expect(searchInterface.responsiveComponents.getMediumScreenWidth()).toBe(12345);
                });
                it('responsiveMediumBreakpoint will default to a proper value', function () {
                    var searchInterface = setupSearchInterface({});
                    expect(searchInterface.responsiveComponents.getMediumScreenWidth()).toBe(ResponsiveComponents_1.MEDIUM_SCREEN_WIDTH);
                });
                it('responsiveSmallBreakpoint will set the value properly in the underlying ResponsiveComponent', function () {
                    var searchInterface = setupSearchInterface({ responsiveSmallBreakpoint: 123 });
                    expect(searchInterface.responsiveComponents.getSmallScreenWidth()).toBe(123);
                });
                it('responsiveSmallBreakpoint will default to a proper value', function () {
                    var searchInterface = setupSearchInterface({});
                    expect(searchInterface.responsiveComponents.getSmallScreenWidth()).toBe(ResponsiveComponents_1.SMALL_SCREEN_WIDTH);
                });
                it('enableScrollRestoration should create a scroll restoration instance if true', function () {
                    setupSearchInterface({
                        enableScrollRestoration: true
                    });
                    expect(cmp.scrollRestorer).toBeDefined();
                });
                it('enableScrollRestoration should not create a scroll restoration instance if false', function () {
                    setupSearchInterface({
                        enableScrollRestoration: false
                    });
                    expect(cmp.scrollRestorer).toBeUndefined();
                });
            });
            describe('when allowQueriesWithoutKeywords if true', function () {
                beforeEach(function () {
                    setupSearchInterface({ allowQueriesWithoutKeywords: true });
                });
                it('it does not cancel the query if there are no keywords', function (done) {
                    Dom_1.$$(div).on(QueryEvents_1.QueryEvents.doneBuildingQuery, function (e, args) {
                        expect(args.cancel).toBe(false);
                        done();
                    });
                    Simulate_1.Simulate.query(env);
                });
                it('allowQueriesWithoutKeywords to true should be sent as a flag in the query', function () {
                    var simulation = Simulate_1.Simulate.query(env);
                    expect(simulation.queryBuilder.build().allowQueriesWithoutKeywords).toBe(true);
                });
            });
            describe('when allowQueriesWithoutKeywords is false', function () {
                var searchInterface;
                beforeEach(function () {
                    searchInterface = setupSearchInterface({ allowQueriesWithoutKeywords: false });
                });
                it('it does cancel the query if there are no keywords', function (done) {
                    Dom_1.$$(div).on(QueryEvents_1.QueryEvents.doneBuildingQuery, function (e, args) {
                        expect(args.cancel).toBe(true);
                        done();
                    });
                    Simulate_1.Simulate.query(env);
                });
                it('it does not cancel the query if there are keywords', function (done) {
                    var queryBuilder = new QueryBuilder_1.QueryBuilder();
                    queryBuilder.expression.add('foo');
                    Dom_1.$$(div).on(QueryEvents_1.QueryEvents.doneBuildingQuery, function (e, args) {
                        expect(args.cancel).toBe(false);
                        done();
                    });
                    Simulate_1.Simulate.query(env, {
                        queryBuilder: queryBuilder
                    });
                });
                it('it should set a flag in the query', function () {
                    var simulation = Simulate_1.Simulate.query(env);
                    expect(simulation.queryBuilder.build().allowQueriesWithoutKeywords).toBe(false);
                });
                it('should not cancel the query if there is no keyword currently, but there is a previous query available which contains keyword', function (done) {
                    searchInterface.queryController.getLastQuery = function () {
                        var queryBuilder = new QueryBuilder_1.QueryBuilder();
                        queryBuilder.expression.add('foo');
                        return queryBuilder.build();
                    };
                    Dom_1.$$(div).on(QueryEvents_1.QueryEvents.doneBuildingQuery, function (e, args) {
                        expect(args.cancel).toBe(false);
                        expect(args.queryBuilder.build().q).toBe('foo');
                        done();
                    });
                    var currentlyEmptyQueryBuilder = new QueryBuilder_1.QueryBuilder();
                    Simulate_1.Simulate.query(env, {
                        queryBuilder: currentlyEmptyQueryBuilder
                    });
                });
                describe('using css classes', function () {
                    var isInWaitingForQueryModeInitially = function () {
                        Dom_1.$$(cmp.element).trigger(Core_1.InitializationEvents.restoreHistoryState);
                        return Dom_1.$$(cmp.element).hasClass('coveo-waiting-for-query');
                    };
                    var isInWaitingForQueryModeAfterQuery = function (query) {
                        return new Promise(function (resolve) {
                            Dom_1.$$(div).one(QueryEvents_1.QueryEvents.deferredQuerySuccess, function (e, args) {
                                resolve(Dom_1.$$(cmp.element).hasClass('coveo-waiting-for-query'));
                            });
                            Dom_1.$$(div).one(QueryEvents_1.QueryEvents.doneBuildingQuery, function (e, args) {
                                if (args.cancel) {
                                    resolve(Dom_1.$$(cmp.element).hasClass('coveo-waiting-for-query'));
                                }
                            });
                            var queryBuilder = new QueryBuilder_1.QueryBuilder();
                            if (query) {
                                queryBuilder.expression.add(query);
                            }
                            Simulate_1.Simulate.query(env, {
                                queryBuilder: queryBuilder
                            });
                        });
                    };
                    it('should put the interface in waiting for first query mode during initialization', function () {
                        expect(isInWaitingForQueryModeInitially()).toBe(true);
                    });
                    it('should put the interface in standard mode after the first non empty query is performed', function (done) { return __awaiter(_this, void 0, void 0, function () {
                        var _a;
                        return __generator(this, function (_b) {
                            switch (_b.label) {
                                case 0:
                                    _a = expect;
                                    return [4 /*yield*/, isInWaitingForQueryModeAfterQuery('foo')];
                                case 1:
                                    _a.apply(void 0, [_b.sent()]).toBe(false);
                                    done();
                                    return [2 /*return*/];
                            }
                        });
                    }); });
                    it('should not put the interface in standard mode after the first empty query is performed', function (done) { return __awaiter(_this, void 0, void 0, function () {
                        var _a;
                        return __generator(this, function (_b) {
                            switch (_b.label) {
                                case 0:
                                    _a = expect;
                                    return [4 /*yield*/, isInWaitingForQueryModeAfterQuery('')];
                                case 1:
                                    _a.apply(void 0, [_b.sent()]).toBe(true);
                                    done();
                                    return [2 /*return*/];
                            }
                        });
                    }); });
                    it('should allow to switch back to a waiting mode if a new empty query is performed', function (done) { return __awaiter(_this, void 0, void 0, function () {
                        var _a;
                        return __generator(this, function (_b) {
                            switch (_b.label) {
                                case 0: return [4 /*yield*/, isInWaitingForQueryModeAfterQuery('foo')];
                                case 1:
                                    _b.sent();
                                    _a = expect;
                                    return [4 /*yield*/, isInWaitingForQueryModeAfterQuery('')];
                                case 2:
                                    _a.apply(void 0, [_b.sent()]).toBe(true);
                                    done();
                                    return [2 /*return*/];
                            }
                        });
                    }); });
                    it('should allow to switch back to standard mode after an empty query is performed', function (done) { return __awaiter(_this, void 0, void 0, function () {
                        var _a;
                        return __generator(this, function (_b) {
                            switch (_b.label) {
                                case 0: return [4 /*yield*/, isInWaitingForQueryModeAfterQuery('foo')];
                                case 1:
                                    _b.sent();
                                    return [4 /*yield*/, isInWaitingForQueryModeAfterQuery('')];
                                case 2:
                                    _b.sent();
                                    _a = expect;
                                    return [4 /*yield*/, isInWaitingForQueryModeAfterQuery('bar')];
                                case 3:
                                    _a.apply(void 0, [_b.sent()]).toBe(false);
                                    done();
                                    return [2 /*return*/];
                            }
                        });
                    }); });
                });
            });
        });
    });
}
exports.SearchInterfaceTest = SearchInterfaceTest;
 
 
/***/ }),
/* 1661 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Mock = __webpack_require__(2);
var Settings_1 = __webpack_require__(395);
var Dom_1 = __webpack_require__(0);
var InitializationEvents_1 = __webpack_require__(22);
var Simulate_1 = __webpack_require__(15);
function SettingsTest() {
    describe('Settings', function () {
        var test;
        beforeEach(function () {
            Simulate_1.Simulate.removeJQuery();
            test = Mock.basicComponentSetup(Settings_1.Settings);
            Dom_1.$$(test.env.root).trigger(InitializationEvents_1.InitializationEvents.afterInitialization);
        });
        it('should be rendered', function () {
            expect(Dom_1.$$(test.env.element).find('span.coveo-settings-squares')).not.toBeNull();
        });
        it('should render a popup when opened', function () {
            test.cmp.open();
            expect(Dom_1.$$(test.env.root).find('.coveo-settings-advanced-menu')).not.toBeNull();
        });
        it('should remove the popup when closed', function () {
            test.cmp.open();
            test.cmp.close();
            expect(Dom_1.$$(test.env.root).find('.coveo-settings-advanced-menu')).toBeNull();
        });
        it('should be able to execute open 2 times, then close one time', function () {
            test.cmp.open();
            test.cmp.open();
            test.cmp.close();
            expect(Dom_1.$$(test.env.root).find('.coveo-settings-advanced-menu')).toBeNull();
        });
        it('should be able to execute close 2 times, then open one time', function () {
            test.cmp.close();
            test.cmp.close();
            test.cmp.open();
            expect(Dom_1.$$(test.env.root).find('.coveo-settings-advanced-menu')).not.toBeNull();
        });
        describe('exposes options', function () {
            describe('menuDelay', function () {
                it("should wait the duration of 'menuDelay' before closing the popup on mouseleave", function (done) {
                    test = Mock.optionsComponentSetup(Settings_1.Settings, {
                        menuDelay: 999999
                    });
                    test.cmp.open();
                    Dom_1.$$(test.cmp.element).trigger('mouseleave');
                    setTimeout(function () {
                        expect(Dom_1.$$(test.env.root).find('.coveo-settings-advanced-menu')).not.toBeNull();
                        done();
                    }, 0);
                });
            });
        });
    });
}
exports.SettingsTest = SettingsTest;
 
 
/***/ }),
/* 1662 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Mock = __webpack_require__(2);
var ShareQuery_1 = __webpack_require__(830);
var Strings_1 = __webpack_require__(4);
var SettingsEvents_1 = __webpack_require__(66);
var Dom_1 = __webpack_require__(0);
function ShareQueryTest() {
    describe('ShareQuery', function () {
        var test;
        beforeEach(function () {
            test = Mock.basicComponentSetupWithModalBox(ShareQuery_1.ShareQuery);
        });
        it('should open', function () {
            test.cmp.open();
            expect(test.modalBox.open).toHaveBeenCalledWith(test.cmp.dialogBoxContent, {
                title: Strings_1.l('Share Query'),
                className: 'coveo-share-query-opened',
                body: undefined
            });
        });
        it('should populate setting menu', function () {
            var menus = { menuData: [] };
            Dom_1.$$(test.env.root).trigger(SettingsEvents_1.SettingsEvents.settingsPopulateMenu, menus);
            expect(menus.menuData[0].className).toEqual('coveo-share-query');
        });
        it('should close', function () {
            test.cmp.open();
            test.cmp.close();
            expect(test.modalBox.close).toHaveBeenCalled();
        });
        it('should update according to result', function () {
            test.env.queryController.getLastQuery = function () {
                return {
                    firstResult: 0,
                    q: 'query',
                    aq: 'advanced query',
                    cq: 'constant query'
                };
            };
            expect(test.cmp.getCompleteQuery()).toBe('(query) (advanced query) (constant query)');
        });
        it('should allow to get/set complete query', function () {
            test.cmp.setCompleteQuery('foo bar');
            expect(test.cmp.getCompleteQuery()).toEqual('foo bar');
        });
        it('should allow to get/set link to this query', function () {
            test.cmp.setLinkToThisQuery('foo bar');
            expect(test.cmp.getLinkToThisQuery()).toEqual('foo bar');
        });
    });
}
exports.ShareQueryTest = ShareQueryTest;
 
 
/***/ }),
/* 1663 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Slider_1 = __webpack_require__(696);
var Dom_1 = __webpack_require__(0);
var SearchInterface_1 = __webpack_require__(25);
var Globalize = __webpack_require__(28);
var _ = __webpack_require__(1);
function SliderTest() {
    describe('Slider', function () {
        var slider;
        var el;
        var root;
        function getSliderButton(sliderElement) {
            return Dom_1.$$(sliderElement).findAll('.coveo-slider-button');
        }
        function getSliderCaption(sliderElement) {
            return Dom_1.$$(sliderElement).find('.coveo-slider-caption');
        }
        function getSliderGraph(sliderElement) {
            return Dom_1.$$(sliderElement).find('svg');
        }
        function buildGraphData() {
            var graphData = _.map(_.range(0, 10, 1), function (range) {
                return {
                    start: range * 10,
                    end: (range + 1) * 10,
                    y: Math.random()
                };
            });
            return graphData;
        }
        beforeEach(function () {
            el = document.createElement('div');
            el.style.width = '100px';
            root = document.createElement('div');
        });
        afterEach(function () {
            el = null;
            slider = null;
            root = null;
        });
        describe('with position calculation', function () {
            // Unfortunately, in a UT context, many of this component methods relies heavily on width calculation inside the browser
            // Since it's all simulated, those test cannot give the correct position value.
            // Instead for those methods, we simply test that it does not throw, at least ...
            beforeEach(function () {
                slider = new Slider_1.Slider(el, {
                    start: 0,
                    end: 100,
                    rangeSlider: true
                }, root);
                slider.element.style.width = '100px';
                slider.element.style.height = '100px';
            });
            it('should not throw on moving', function () {
                expect(function () { return slider.onMoving(); }).not.toThrow();
            });
            it('should give position on initializing state', function () {
                expect(function () { return slider.initializeState([25, 75]); }).not.toThrow();
                expect(function () { return slider.getPosition(); }).not.toThrow();
                expect(function () { return slider.getPercentPosition(); }).not.toThrow();
                expect(function () { return slider.getValues(); }).not.toThrow();
                expect(slider.getValues()).toEqual([25, 75]);
            });
            it('should give position when initializing state with no value', function () {
                expect(function () { return slider.initializeState(); }).not.toThrow();
                expect(function () { return slider.getPosition(); }).not.toThrow();
                expect(function () { return slider.getPercentPosition(); }).not.toThrow();
                expect(function () { return slider.getValues(); }).not.toThrow();
                expect(slider.getValues()).toEqual([0, 100]);
            });
            it('should give the caption from the requested values', function () {
                expect(slider.getCaptionFromValue([50, 70])).toEqual('50  - 70 ');
            });
            it('should allow to set values', function () {
                slider.setValues([10, 24]);
                expect(slider.getValues()).toEqual([10, 24]);
            });
        });
        describe('exposes options', function () {
            it('rangeSlider allows to have one or two button', function () {
                slider = new Slider_1.Slider(el, {
                    start: 0,
                    end: 100,
                    rangeSlider: false
                }, root);
                expect(getSliderButton(slider.element).length).toBe(1);
                slider = new Slider_1.Slider(document.createElement('div'), {
                    start: 0,
                    end: 100,
                    rangeSlider: true
                }, root);
                expect(getSliderButton(slider.element).length).toBe(2);
            });
            it('start and end allow to set the max values', function () {
                slider = new Slider_1.Slider(el, {
                    start: 10,
                    end: 156
                }, root);
                slider.initializeState();
                expect(slider.currentValues).toEqual(jasmine.arrayContaining([10, 156]));
                slider.setValues([0, 1000]);
                expect(slider.currentValues).toEqual(jasmine.arrayContaining([10, 156]));
                slider.setValues([0, 100]);
                expect(slider.currentValues).toEqual(jasmine.arrayContaining([10, 100]));
                slider.setValues([50, 51]);
                expect(slider.currentValues).toEqual(jasmine.arrayContaining([50, 51]));
            });
            it('step allows to divide the range by a number of steps', function () {
                slider = new Slider_1.Slider(el, {
                    start: 0,
                    end: 100,
                    steps: 2
                }, root);
                expect(slider.steps).toEqual(jasmine.arrayContaining([0, 50, 100]));
                slider = new Slider_1.Slider(el, {
                    start: 0,
                    end: 100,
                    steps: 25
                }, root);
                expect(slider.steps).toEqual(jasmine.arrayContaining(_.range(0, 104, 4)));
            });
            it('step should not go above 100 for performance reason', function () {
                slider = new Slider_1.Slider(el, {
                    start: 0,
                    end: 1000,
                    steps: 1000
                }, root);
                expect(slider.steps).toEqual(jasmine.arrayContaining(_.range(0, 1000, 10)));
            });
            it('getSteps allow to provide a function to generate steps', function () {
                var getStep = jasmine.createSpy('getStep');
                slider = new Slider_1.Slider(el, {
                    start: 0,
                    end: 100,
                    getSteps: getStep
                }, root);
                expect(getStep).toHaveBeenCalledWith(0, 100);
            });
            it('displayAsValue allows to modify the caption', function () {
                slider = new Slider_1.Slider(el, {
                    start: 0,
                    end: 100,
                    displayAsValue: {
                        unitSign: 'GIGAFLOPETABYTE',
                        separator: '!!',
                        enable: true
                    }
                }, root);
                slider.initializeState();
                expect(Dom_1.$$(getSliderCaption(slider.element)).text()).toBe('0 GIGAFLOPETABYTE !! 100 GIGAFLOPETABYTE');
            });
            it('valueCaption allow to provide a function to generate captions', function () {
                var valueCaption = jasmine.createSpy('valueCaption');
                slider = new Slider_1.Slider(el, {
                    start: 0,
                    end: 100,
                    valueCaption: valueCaption
                }, root);
                slider.initializeState();
                expect(valueCaption).toHaveBeenCalledWith(jasmine.arrayContaining([0, 100]));
            });
            it('dateField and dateFormat allow to render the values as date', function () {
                var start = new Date(1, 1, 1), end = new Date(2, 2, 2);
                slider = new Slider_1.Slider(el, {
                    start: start,
                    end: end,
                    dateField: true,
                    dateFormat: 'm/d/yyyy'
                }, root);
                slider.initializeState();
                expect(Dom_1.$$(getSliderCaption(slider.element)).text()).toBe(Globalize.format(start, 'm/d/yyyy') + '  - ' + Globalize.format(end, 'm/d/yyyy') + ' ');
            });
            describe('with graph data', function () {
                var graphData;
                beforeEach(function () {
                    slider = new Slider_1.Slider(el, {
                        start: 0,
                        end: 100,
                        graph: {
                            steps: 10,
                            margin: {
                                left: 0,
                                right: 0,
                                top: 0,
                                bottom: 0
                            }
                        }
                    }, root);
                    new SearchInterface_1.SearchInterface(root);
                    slider.element.style.width = '100px';
                    slider.element.style.height = '100px';
                    graphData = buildGraphData();
                });
                afterEach(function () {
                    graphData = null;
                });
                it('should not throw on moving', function () {
                    expect(function () { return slider.onMoving(); }).not.toThrow();
                });
                it('graph steps allow draw graph data', function () {
                    slider.drawGraph(graphData);
                    expect(Dom_1.$$(getSliderGraph(slider.element)).findAll('rect').length).toBe(10);
                });
                it('graph data where the start equals the end should be modified to something logical', function () {
                    graphData[0] = { start: 5, end: 5, y: 1, isDate: false };
                    slider.drawGraph(graphData);
                    expect(graphData[0].start).toEqual(0);
                    expect(graphData[0].end).toEqual(10);
                });
                it('graph data that does not match the total range of the slider should be padded at the beginning', function () {
                    // remove 2 from the beginning of the data
                    graphData = graphData.slice(2);
                    expect(graphData.length).toEqual(8);
                    slider.drawGraph(graphData);
                    // draw 10 rect, even if there's only 8 values to render
                    expect(Dom_1.$$(getSliderGraph(slider.element)).findAll('rect').length).toBe(10);
                });
                it('graph data that does not match the total range of the slider should be padded at the end', function () {
                    // remove 2 from the end of the data
                    graphData = graphData.slice(0, graphData.length - 2);
                    expect(graphData.length).toEqual(8);
                    slider.drawGraph(graphData);
                    // draw 10 rect, even if there's only 8 values to render
                    expect(Dom_1.$$(getSliderGraph(slider.element)).findAll('rect').length).toBe(10);
                });
                it("when the slider data #starts and #ends properties are equal,\n        it should not cause an infinite loop", function () {
                    slider = new Slider_1.Slider(el, {
                        start: 0,
                        end: 0,
                        graph: {
                            steps: 10,
                            margin: {
                                left: 0,
                                right: 0,
                                top: 0,
                                bottom: 0
                            }
                        }
                    }, root);
                    new SearchInterface_1.SearchInterface(root);
                    graphData = [
                        {
                            start: 1,
                            end: 1,
                            y: Math.random()
                        }
                    ];
                    slider.drawGraph(graphData);
                    // draw 0 rect, and not cause any loops issues
                    expect(Dom_1.$$(getSliderGraph(slider.element)).findAll('rect').length).toBe(0);
                });
            });
        });
    });
}
exports.SliderTest = SliderTest;
 
 
/***/ }),
/* 1664 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var QueryBuilder_1 = __webpack_require__(24);
var SortCriteria_1 = __webpack_require__(195);
var Mock = __webpack_require__(2);
function SortCriteriaTest() {
    describe('SortCriteria', function () {
        it('should construct properly without a direction', function () {
            var crit = new SortCriteria_1.SortCriteria('relevancy');
            expect(crit.sort).toEqual('relevancy');
            expect(crit.direction).toEqual('');
        });
        it('should construct properly with a direction', function () {
            var crit = new SortCriteria_1.SortCriteria('date ascending');
            expect(crit.sort).toEqual('date');
            expect(crit.direction).toEqual('ascending');
        });
        it('should throw an error when passed an invalid criteria', function () {
            expect(function () { return new SortCriteria_1.SortCriteria('fdsaf ascending'); }).toThrow();
            expect(function () { return new SortCriteria_1.SortCriteria(''); }).toThrow();
        });
        it('should throw an error when passed an invalid direction', function () {
            expect(function () { return new SortCriteria_1.SortCriteria('date invaliddirection'); }).toThrow();
        });
        it('should throw an error when not passed a direction to a criteria that needs one', function () {
            expect(function () { return new SortCriteria_1.SortCriteria('date'); }).toThrow();
        });
        it("should throw an error when passing a direction to a criteria that doesn't need one", function () {
            expect(function () { return new SortCriteria_1.SortCriteria('relevancy ascending'); }).toThrow();
        });
        it('should parse a sort criteira string without a direction properly', function () {
            var crit = SortCriteria_1.SortCriteria.parse('relevancy');
            expect(crit.sort).toEqual('relevancy');
            expect(crit.direction).toEqual('');
        });
        it('should parse a sort criteria string with a direction properly', function () {
            var crit = SortCriteria_1.SortCriteria.parse('date ascending');
            expect(crit.sort).toEqual('date');
            expect(crit.direction).toEqual('ascending');
        });
        it('should properly parse multiple criteria for direction', function () {
            var crit = new SortCriteria_1.SortCriteria('@ytviewcount ascending; date descending');
            expect(crit.direction).toBe(SortCriteria_1.VALID_DIRECTION.ASCENDING);
        });
        it('should properly parse multiple criteria for sort', function () {
            var crit = new SortCriteria_1.SortCriteria('@ytviewcount ascending; date descending');
            expect(crit.sort).toBe('@ytviewcount');
        });
        describe('putInQueryBuilder', function () {
            var qb;
            beforeEach(function () {
                qb = Mock.mock(QueryBuilder_1.QueryBuilder);
            });
            afterEach(function () {
                qb = null;
            });
            it('should update the queryBuilder without a direction', function () {
                new SortCriteria_1.SortCriteria('relevancy').putInQueryBuilder(qb);
                expect(qb.sortCriteria).toEqual('relevancy');
            });
            it('should update the queryBuilder with a direction', function () {
                new SortCriteria_1.SortCriteria('date ascending').putInQueryBuilder(qb);
                expect(qb.sortCriteria).toEqual('date ascending');
            });
            it('should update the queryBuilder with a field', function () {
                new SortCriteria_1.SortCriteria('@fillde ascending').putInQueryBuilder(qb);
                expect(qb.sortCriteria).toEqual('@fillde ascending');
            });
            it('should update the queryBuilder with multiple criteria', function () {
                new SortCriteria_1.SortCriteria('@field ascending;date descending').putInQueryBuilder(qb);
                expect(qb.sortCriteria).toEqual('@field ascending,date descending');
            });
            it('should throw an error if the queryBuilder is null or undefined', function () {
                qb = null;
                expect(function () { return new SortCriteria_1.SortCriteria('date ascending').putInQueryBuilder(qb); }).toThrow();
                qb = undefined;
                expect(function () { return new SortCriteria_1.SortCriteria('date descending').putInQueryBuilder(qb); }).toThrow();
            });
        });
        describe('toString', function () {
            it('with direction should return correct string', function () {
                expect(new SortCriteria_1.SortCriteria('date ascending').toString()).toEqual('date ascending');
            });
            it('without direction should return correct string', function () {
                expect(new SortCriteria_1.SortCriteria('relevancy').toString()).toEqual('relevancy');
            });
            it('with multiple criteria should return correct string', function () {
                expect(new SortCriteria_1.SortCriteria('@ytviewcount ascending;date descending').toString()).toBe('@ytviewcount ascending;date descending');
            });
        });
        it('equals should return true if criterias are equal', function () {
            expect(new SortCriteria_1.SortCriteria('date ascending').equals(new SortCriteria_1.SortCriteria('date ascending'))).toBe(true);
        });
        it('equals should return true if multiple criterias are equals in the same order', function () {
            expect(new SortCriteria_1.SortCriteria('date ascending;@ytviewcount ascending').equals(new SortCriteria_1.SortCriteria('date ascending  ;   @ytviewcount ascending'))).toBe(true);
        });
        it('equals should return false if criterias are not equal', function () {
            expect(new SortCriteria_1.SortCriteria('@field descending').equals(new SortCriteria_1.SortCriteria('relevancy'))).toBe(false);
        });
        it('equals should return false if multiple criterias are not equals', function () {
            expect(new SortCriteria_1.SortCriteria('@field descending;date descending').equals(new SortCriteria_1.SortCriteria('@secondfield ascending; @thirdfield descending'))).toBe(false);
        });
        it('equals should return false if multiple criterias equals but not in the same order', function () {
            expect(new SortCriteria_1.SortCriteria('@field descending;date descending').equals(new SortCriteria_1.SortCriteria('date descending;@field descending'))).toBe(false);
        });
    });
}
exports.SortCriteriaTest = SortCriteriaTest;
 
 
/***/ }),
/* 1665 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var QueryEvents_1 = __webpack_require__(14);
var QueryStateModel_1 = __webpack_require__(17);
var QueryBuilder_1 = __webpack_require__(24);
var Sort_1 = __webpack_require__(271);
var SortCriteria_1 = __webpack_require__(195);
var Dom_1 = __webpack_require__(0);
var Mock = __webpack_require__(2);
var Strings_1 = __webpack_require__(4);
var Simulate_1 = __webpack_require__(15);
var KeyboardUtils_1 = __webpack_require__(35);
function SortTest() {
    describe('Sort', function () {
        var test;
        var caption = 'foobarde';
        function buildSort(sortCriteria, queryStateModelValues, modifyBuilder) {
            var elem = document.createElement('div');
            elem.dataset['sortCriteria'] = sortCriteria;
            elem = Dom_1.Dom.createElement('div', {
                'data-sort-criteria': sortCriteria
            });
            return Mock.advancedComponentSetup(Sort_1.Sort, {
                element: elem,
                cmpOptions: { caption: caption },
                modifyBuilder: function (builder) {
                    if (queryStateModelValues) {
                        builder.queryStateModel.get.and.callFake(function (attribute) { return queryStateModelValues[attribute]; });
                    }
                    return modifyBuilder ? modifyBuilder(builder) : builder;
                }
            });
        }
        beforeEach(function () {
            test = buildSort('date ascending');
        });
        afterEach(function () {
            test = null;
        });
        it('should build the correct criteria from its attribute', function () {
            expect(test.cmp.options.sortCriteria[0].sort).toEqual('date');
            expect(test.cmp.options.sortCriteria[0].direction).toEqual('ascending');
        });
        it('should build the correct field value from its attribute', function () {
            test = buildSort('@somefield ascending');
            expect(test.cmp.options.sortCriteria[0].toString()).toEqual('@somefield ascending');
        });
        it("should trigger 'select' on click", function () {
            test = buildSort('relevancy');
            spyOn(test.cmp, 'select');
            test.env.element.click();
            expect(test.cmp.select).toHaveBeenCalled();
        });
        it("should trigger 'selectAndExecuteQuery' on click", function () {
            test = buildSort('relevancy');
            spyOn(test.cmp, 'selectAndExecuteQuery');
            test.env.element.click();
            expect(test.cmp.selectAndExecuteQuery).toHaveBeenCalled();
        });
        it("should set a 'hidden' CSS class when the results from a querySuccess are empty", function () {
            Dom_1.$$(test.env.root).trigger(QueryEvents_1.QueryEvents.querySuccess, {
                results: {
                    results: []
                }
            });
            expect(Dom_1.$$(test.cmp.element).hasClass('coveo-sort-hidden')).toBe(true);
        });
        it("should not set a 'hidden' CSS class when the results from a querySuccess are not empty", function () {
            Dom_1.$$(test.env.root).trigger(QueryEvents_1.QueryEvents.querySuccess, {
                results: {
                    results: [{}, {}]
                }
            });
            expect(Dom_1.$$(test.cmp.element).hasClass('coveo-sort-hidden')).toBe(false);
        });
        it("should set a 'hidden' CSS class when there is a query error", function () {
            Dom_1.$$(test.env.root).trigger(QueryEvents_1.QueryEvents.queryError);
            expect(Dom_1.$$(test.cmp.element).hasClass('coveo-sort-hidden')).toBe(true);
        });
        it('should be a radiogroup', function () {
            expect(test.cmp.element.getAttribute('role')).toEqual('radiogroup');
        });
        it('if an ancestor is a radiogroup, should not be a radiogroup', function () {
            test = buildSort('date ascending', {}, function (builder) {
                builder.root.setAttribute('role', 'radiogroup');
                return builder;
            });
            expect(test.cmp.element.getAttribute('role')).toBeNull();
        });
        it('should contain a single radio button', function () {
            expect(test.cmp.element.querySelectorAll('[role="radio"]').length).toEqual(1);
        });
        it('should give a label to its radio button', function () {
            expect(test.cmp.element.querySelector('[role="radio"]').getAttribute('aria-label')).toEqual(Strings_1.l('SortResultsBy', caption));
        });
        it('should not check its radio button', function () {
            expect(test.cmp.element.querySelector('[role="radio"]').getAttribute('aria-checked')).toEqual('false');
        });
        it('should check its radio button when active', function () {
            test = buildSort('date ascending', { sort: 'date ascending' });
            expect(test.cmp.element.querySelector('[role="radio"]').getAttribute('aria-checked')).toEqual('true');
        });
        describe('with a toggle', function () {
            beforeEach(function () {
                test = buildSort('date ascending,date descending');
            });
            it('should build the correct criteria on toggle from its attribute', function () {
                expect(test.cmp.options.sortCriteria[0].equals(new SortCriteria_1.SortCriteria('date ascending'))).toBe(true);
                expect(test.cmp.options.sortCriteria[1].equals(new SortCriteria_1.SortCriteria('date descending'))).toBe(true);
            });
            it('should toggle between its criterias when selected', function () {
                test.cmp.select();
                expect(test.cmp.getCurrentCriteria().toString()).toEqual('date ascending');
                test.cmp.select();
                expect(test.cmp.getCurrentCriteria().toString()).toEqual('date descending');
            });
            it('should set direction without toggling when selected with explicit direction', function () {
                test.cmp.select('descending');
                expect(test.cmp.getCurrentCriteria().direction).toEqual('descending');
            });
            it('should display an icon', function () {
                var icon = Dom_1.$$(test.env.element).find('.coveo-icon');
                expect(icon).toBeDefined();
            });
            describe('with a live queryStateModel', function () {
                function buildSort(sortCriteria) {
                    var elem = document.createElement('div');
                    elem.dataset['sortCriteria'] = sortCriteria;
                    return Mock.advancedComponentSetup(Sort_1.Sort, new Mock.AdvancedComponentSetupOptions(elem, { caption: caption }, function (builder) {
                        return builder.withLiveQueryStateModel();
                    }));
                }
                function fireBuildingQuery(elem, queryBuilder) {
                    queryBuilder = queryBuilder || new QueryBuilder_1.QueryBuilder();
                    Dom_1.$$(elem).trigger(QueryEvents_1.QueryEvents.buildingQuery, {
                        queryBuilder: queryBuilder
                    });
                    Dom_1.$$(elem).trigger(QueryEvents_1.QueryEvents.doneBuildingQuery, {
                        queryBuilder: queryBuilder
                    });
                    return queryBuilder;
                }
                beforeEach(function () {
                    test = buildSort('date ascending,date descending');
                });
                it('should set itself as selected on the queryStateModel when selected', function () {
                    test.cmp.select();
                    expect(test.env.queryStateModel.get(QueryStateModel_1.QueryStateModel.attributesEnum.sort)).toBe('date ascending');
                });
                it('should add the correct relevancy sorting expression to the query', function () {
                    test = buildSort('relevancy');
                    test.cmp.select();
                    var queryBuilder = fireBuildingQuery(test.env.root);
                    expect(queryBuilder.sortCriteria).toEqual('relevancy');
                });
                it('should add the correct date sorting expression to the query', function () {
                    test = buildSort('date ascending');
                    test.cmp.select();
                    var queryBuilder = fireBuildingQuery(test.env.root);
                    expect(queryBuilder.sortCriteria).toEqual('date ascending');
                    test = buildSort('date descending');
                    test.cmp.select();
                    queryBuilder = fireBuildingQuery(test.env.root);
                    expect(queryBuilder.sortCriteria).toEqual('date descending');
                });
                it('should add the correct qre sorting expression to the query', function () {
                    test = buildSort('qre');
                    test.cmp.select();
                    var queryBuilder = fireBuildingQuery(test.env.root);
                    expect(queryBuilder.sortCriteria).toEqual('qre');
                });
                it('should add the correct field sorting expression to the query', function () {
                    test = buildSort('@field ascending');
                    test.cmp.select();
                    var queryBuilder = fireBuildingQuery(test.env.root);
                    expect(queryBuilder.sortCriteria).toEqual('@field ascending');
                    test = buildSort('@field descending');
                    test.cmp.select();
                    queryBuilder = fireBuildingQuery(test.env.root);
                    expect(queryBuilder.sortCriteria).toEqual('@field descending');
                });
                describe('with radio buttons', function () {
                    var radioButtons;
                    function getRadioButtonsState(attribute) {
                        if (attribute === void 0) { attribute = 'aria-checked'; }
                        return radioButtons.map(function (radio) { return radio.getAttribute(attribute); });
                    }
                    function updateRadioButtons() {
                        radioButtons = Dom_1.$$(test.cmp.element).findAll('[role="radio"]');
                    }
                    beforeEach(function () {
                        updateRadioButtons();
                    });
                    it('should contain two radio buttons', function () {
                        expect(radioButtons.length).toEqual(2);
                    });
                    it('should set as aria-controls the list of result list components ids', function () {
                        test.cmp.searchInterface.getComponents.and.callFake(function (cmp) {
                            Eif (cmp === 'ResultList') {
                                return [{ element: Dom_1.$$('div', { id: 'id1' }).el }, { element: Dom_1.$$('div', { id: 'id2' }).el }];
                            }
                            return [];
                        });
                        test.cmp.createDom();
                        updateRadioButtons();
                        expect(getRadioButtonsState('aria-controls')).toEqual(['id1 id2', 'id1 id2']);
                    });
                    it('should give labels to its radio buttons', function () {
                        expect(getRadioButtonsState('aria-label')).toEqual([
                            Strings_1.l('SortResultsByAscending', caption),
                            Strings_1.l('SortResultsByDescending', caption)
                        ]);
                    });
                    it('should not change the labels of radio buttons when selecting them', function () {
                        test.cmp.select();
                        expect(getRadioButtonsState('aria-label')).toEqual([
                            Strings_1.l('SortResultsByAscending', caption),
                            Strings_1.l('SortResultsByDescending', caption)
                        ]);
                        test.cmp.select();
                        expect(getRadioButtonsState('aria-label')).toEqual([
                            Strings_1.l('SortResultsByAscending', caption),
                            Strings_1.l('SortResultsByDescending', caption)
                        ]);
                    });
                    it('should not check its radio buttons', function () {
                        expect(getRadioButtonsState()).toEqual(['false', 'false']);
                    });
                    it('should check only the first radio button if the first criteria is used', function () {
                        test.cmp.select('ascending');
                        expect(getRadioButtonsState()).toEqual(['true', 'false']);
                    });
                    it('should check only the second radio button if the second criteria is used', function () {
                        test.cmp.select('descending');
                        expect(getRadioButtonsState()).toEqual(['false', 'true']);
                    });
                    it('should only check the first radio button when clicking it', function () {
                        radioButtons[0].click();
                        expect(getRadioButtonsState()).toEqual(['true', 'false']);
                    });
                    it('should only check the second radio button when clicking it', function () {
                        radioButtons[1].click();
                        expect(getRadioButtonsState()).toEqual(['false', 'true']);
                    });
                    it('should set the sort criteria to the first criteria when clicking the first radio button', function () {
                        radioButtons[0].click();
                        var queryBuilder = fireBuildingQuery(test.env.root);
                        expect(queryBuilder.sortCriteria).toEqual('date ascending');
                    });
                    it('should set the sort criteria to the second criteria when clicking the second radio button', function () {
                        radioButtons[1].click();
                        var queryBuilder = fireBuildingQuery(test.env.root);
                        expect(queryBuilder.sortCriteria).toEqual('date descending');
                    });
                    it('should select the first radio button when pressing the right arrow key', function () {
                        Simulate_1.Simulate.keyUp(radioButtons[0], KeyboardUtils_1.KEYBOARD.RIGHT_ARROW);
                        expect(getRadioButtonsState()).toEqual(['true', 'false']);
                    });
                    it('should select the first radio button when pressing the down arrow key', function () {
                        Simulate_1.Simulate.keyUp(radioButtons[0], KeyboardUtils_1.KEYBOARD.DOWN_ARROW);
                        expect(getRadioButtonsState()).toEqual(['true', 'false']);
                    });
                    it('should select the first radio button when pressing the left arrow key twice', function () {
                        Simulate_1.Simulate.keyUp(radioButtons[0], KeyboardUtils_1.KEYBOARD.LEFT_ARROW);
                        Simulate_1.Simulate.keyUp(radioButtons[0], KeyboardUtils_1.KEYBOARD.LEFT_ARROW);
                        expect(getRadioButtonsState()).toEqual(['true', 'false']);
                    });
                    it('should select the first radio button when pressing the up arrow key twice', function () {
                        Simulate_1.Simulate.keyUp(radioButtons[0], KeyboardUtils_1.KEYBOARD.UP_ARROW);
                        Simulate_1.Simulate.keyUp(radioButtons[0], KeyboardUtils_1.KEYBOARD.UP_ARROW);
                        expect(getRadioButtonsState()).toEqual(['true', 'false']);
                    });
                    it('should select the last radio button when pressing the left arrow key', function () {
                        Simulate_1.Simulate.keyUp(radioButtons[0], KeyboardUtils_1.KEYBOARD.LEFT_ARROW);
                        expect(getRadioButtonsState()).toEqual(['false', 'true']);
                    });
                    it('should select the last radio button when pressing the up arrow key', function () {
                        Simulate_1.Simulate.keyUp(radioButtons[0], KeyboardUtils_1.KEYBOARD.UP_ARROW);
                        expect(getRadioButtonsState()).toEqual(['false', 'true']);
                    });
                    it('should select the last radio button when pressing the right arrow key twice', function () {
                        Simulate_1.Simulate.keyUp(radioButtons[0], KeyboardUtils_1.KEYBOARD.RIGHT_ARROW);
                        Simulate_1.Simulate.keyUp(radioButtons[0], KeyboardUtils_1.KEYBOARD.RIGHT_ARROW);
                        expect(getRadioButtonsState()).toEqual(['false', 'true']);
                    });
                    it('should select the last radio button when pressing the down arrow key twice', function () {
                        Simulate_1.Simulate.keyUp(radioButtons[0], KeyboardUtils_1.KEYBOARD.DOWN_ARROW);
                        Simulate_1.Simulate.keyUp(radioButtons[0], KeyboardUtils_1.KEYBOARD.DOWN_ARROW);
                        expect(getRadioButtonsState()).toEqual(['false', 'true']);
                    });
                    it("shouldn't change the labels of the radio buttons when selecting the first select button", function () {
                        Simulate_1.Simulate.keyUp(radioButtons[0], KeyboardUtils_1.KEYBOARD.UP_ARROW);
                        Simulate_1.Simulate.keyUp(radioButtons[0], KeyboardUtils_1.KEYBOARD.UP_ARROW);
                        expect(getRadioButtonsState('aria-label')).toEqual([
                            Strings_1.l('SortResultsByAscending', caption),
                            Strings_1.l('SortResultsByDescending', caption)
                        ]);
                    });
                    it("shouldn't change the labels of the radio buttons when selecting the last select button", function () {
                        Simulate_1.Simulate.keyUp(radioButtons[0], KeyboardUtils_1.KEYBOARD.DOWN_ARROW);
                        Simulate_1.Simulate.keyUp(radioButtons[0], KeyboardUtils_1.KEYBOARD.DOWN_ARROW);
                        expect(getRadioButtonsState('aria-label')).toEqual([
                            Strings_1.l('SortResultsByAscending', caption),
                            Strings_1.l('SortResultsByDescending', caption)
                        ]);
                    });
                    it('should focus the first radio button when selecting the first radio button', function () {
                        var focus = spyOn(radioButtons[0], 'focus');
                        Simulate_1.Simulate.keyUp(radioButtons[0], KeyboardUtils_1.KEYBOARD.UP_ARROW);
                        expect(focus).not.toHaveBeenCalled();
                        Simulate_1.Simulate.keyUp(radioButtons[0], KeyboardUtils_1.KEYBOARD.UP_ARROW);
                        expect(focus).toHaveBeenCalledTimes(1);
                    });
                    it('should focus the last radio button when selecting the last radio button', function () {
                        var focus = spyOn(radioButtons[1], 'focus');
                        Simulate_1.Simulate.keyUp(radioButtons[0], KeyboardUtils_1.KEYBOARD.DOWN_ARROW);
                        expect(focus).not.toHaveBeenCalled();
                        Simulate_1.Simulate.keyUp(radioButtons[0], KeyboardUtils_1.KEYBOARD.DOWN_ARROW);
                        expect(focus).toHaveBeenCalledTimes(1);
                    });
                    it('should set the sort criteria to the first criteria when selecting the first radio button', function () {
                        Simulate_1.Simulate.keyUp(radioButtons[0], KeyboardUtils_1.KEYBOARD.UP_ARROW);
                        Simulate_1.Simulate.keyUp(radioButtons[0], KeyboardUtils_1.KEYBOARD.UP_ARROW);
                        var queryBuilder = fireBuildingQuery(test.env.root);
                        expect(queryBuilder.sortCriteria).toEqual('date ascending');
                    });
                    it('should set the sort criteria to the second criteria when selecting the second radio button', function () {
                        Simulate_1.Simulate.keyUp(radioButtons[0], KeyboardUtils_1.KEYBOARD.DOWN_ARROW);
                        Simulate_1.Simulate.keyUp(radioButtons[0], KeyboardUtils_1.KEYBOARD.DOWN_ARROW);
                        var queryBuilder = fireBuildingQuery(test.env.root);
                        expect(queryBuilder.sortCriteria).toEqual('date descending');
                    });
                    it('should set the sort criteria to the first criteria when pressing space on the first radio button', function () {
                        Simulate_1.Simulate.keyUp(radioButtons[0], KeyboardUtils_1.KEYBOARD.SPACEBAR);
                        var queryBuilder = fireBuildingQuery(test.env.root);
                        expect(queryBuilder.sortCriteria).toEqual('date ascending');
                    });
                    it('should set the sort criteria to the second criteria when pressing space on the second radio button', function () {
                        Simulate_1.Simulate.keyUp(radioButtons[1], KeyboardUtils_1.KEYBOARD.SPACEBAR);
                        var queryBuilder = fireBuildingQuery(test.env.root);
                        expect(queryBuilder.sortCriteria).toEqual('date descending');
                    });
                    describe('in the DOM', function () {
                        beforeEach(function () {
                            document.body.appendChild(test.env.root);
                        });
                        afterEach(function () {
                            test.env.root.remove();
                        });
                        it("shouldn't set the sort criteria when focusing on the first radio button", function () {
                            radioButtons[0].focus();
                            var queryBuilder = fireBuildingQuery(test.env.root);
                            expect(queryBuilder.sortCriteria).toEqual('relevancy');
                        });
                        it("shouldn't set the sort criteria when focusing on the second radio button", function () {
                            radioButtons[1].focus();
                            var queryBuilder = fireBuildingQuery(test.env.root);
                            expect(queryBuilder.sortCriteria).toEqual('relevancy');
                        });
                    });
                });
            });
        });
        it('should only accept a valid sort criteria', function () {
            expect(function () { return buildSort('invalidname'); }).toThrow();
            expect(function () { return buildSort('relevancy,failingmiserably'); }).toThrow();
        });
        it('should only accept a valid sort direction', function () {
            expect(function () { return buildSort('date in-order-of-failure'); }).toThrow();
        });
        it('should require at least one sort criteria to properly initialize', function () {
            expect(function () { return new Sort_1.Sort(document.createElement('div')); }).toThrow();
        });
        it('should validate if a direction is present when sorting a date or a field', function () {
            expect(function () { return buildSort('date'); }).toThrow();
            expect(function () { return buildSort('@field-of-failure'); }).toThrow();
        });
        it("should validate that there is no direction on any other criteria than 'date' or a field", function () {
            expect(function () { return buildSort('bogus-criteria ascending'); }).toThrow();
            expect(function () { return buildSort('relevancy ascending'); }).toThrow();
            expect(function () { return buildSort('date ascending'); }).not.toThrow();
            expect(function () { return buildSort('@field descending'); }).not.toThrow();
        });
        it('should use data-caption as a body if no body is specified', function () {
            test = Mock.advancedComponentSetup(Sort_1.Sort, {
                element: Dom_1.$$('div', {
                    'data-sort-criteria': 'relevancy',
                    'data-caption': 'foo'
                }).el
            });
            expect(test.env.element.innerText).toEqual('foo');
        });
        it('should override the body with data-caption if both are defined', function () {
            test = Mock.advancedComponentSetup(Sort_1.Sort, {
                element: Dom_1.Dom.createElement('div', {
                    'data-sort-criteria': 'relevancy',
                    'data-caption': 'overrider'
                }, 'gettingreplaced')
            });
            expect(test.env.element.innerText).toEqual('overrider');
        });
        it('should use the body if the data-caption is not defined', function () {
            test = Mock.advancedComponentSetup(Sort_1.Sort, {
                element: Dom_1.Dom.createElement('div', {
                    'data-sort-criteria': 'relevancy'
                }, 'notgettingreplaced')
            });
            expect(test.env.element.innerText).toEqual('notgettingreplaced');
        });
        it('should remove unnecessary spaces between sort and direction', function () {
            test = buildSort('date            ascending');
            expect(test.cmp.options.sortCriteria[0].toString()).toEqual('date ascending');
        });
        it('should remove unnecessary spaces before sort criteria', function () {
            test = buildSort('           date descending');
            expect(test.cmp.options.sortCriteria[0].toString()).toEqual('date descending');
        });
        it('should remove unnecessary spaces after sort criteria', function () {
            test = buildSort('date ascending             ');
            expect(test.cmp.options.sortCriteria[0].toString()).toEqual('date ascending');
        });
        it('should remove unnecessary spaces between multiple sort criterias', function () {
            test = buildSort('date descending   ,    date ascending');
            expect(test.cmp.options.sortCriteria[0].toString()).toEqual('date descending');
            expect(test.cmp.options.sortCriteria[1].toString()).toEqual('date ascending');
        });
        it('should update when enabled', function () {
            test = buildSort('date descending, date ascending');
            test.env.queryStateModel.get.and.returnValue('date descending');
            test.cmp.select('ascending');
            expect(test.cmp.getCurrentCriteria().toString()).toEqual('date ascending');
            test.cmp.enable();
            expect(test.cmp.getCurrentCriteria().toString()).toEqual('date descending');
        });
        it('should update on first creation', function () {
            var elem = Dom_1.$$('div', { 'data-sort-criteria': 'date descending, date ascending' }).el;
            test = Mock.advancedComponentSetup(Sort_1.Sort, {
                element: elem,
                modifyBuilder: function (builder) {
                    builder.queryStateModel.get.and.returnValue('date ascending');
                    return builder;
                }
            });
            expect(test.cmp.getCurrentCriteria().toString()).toEqual('date ascending');
        });
    });
}
exports.SortTest = SortTest;
 
 
/***/ }),
/* 1666 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Mock = __webpack_require__(2);
var Tab_1 = __webpack_require__(201);
var Simulate_1 = __webpack_require__(15);
var Dom_1 = __webpack_require__(0);
var SearchEndpoint_1 = __webpack_require__(61);
var NoopComponent_1 = __webpack_require__(207);
var AnalyticsActionListMeta_1 = __webpack_require__(7);
var InitializationEvents_1 = __webpack_require__(22);
function TabTest() {
    describe('Tab', function () {
        var test;
        beforeEach(function () {
            test = Mock.optionsComponentSetup(Tab_1.Tab, {
                id: 'testingtabid',
                caption: 'caption test tab'
            });
        });
        afterEach(function () {
            test = null;
        });
        describe('exposes options', function () {
            it('tab id can be set, and is sent in the query, only if selected', function () {
                test = Mock.advancedComponentSetup(Tab_1.Tab, new Mock.AdvancedComponentSetupOptions(undefined, {
                    id: 'niceid',
                    caption: 'foobarde'
                }, function (env) {
                    return env.withLiveQueryStateModel();
                }));
                var simulation = Simulate_1.Simulate.query(test.env);
                expect(simulation.queryBuilder.build().tab).toBeUndefined();
                test.cmp.select();
                simulation = Simulate_1.Simulate.query(test.env);
                expect(simulation.queryBuilder.build().tab).toBe('niceid');
            });
            it('expression is set on the constant part of the query, only if selected', function () {
                test = Mock.advancedComponentSetup(Tab_1.Tab, new Mock.AdvancedComponentSetupOptions(undefined, {
                    id: 'niceid',
                    expression: '@foo==bar',
                    caption: 'foobarde'
                }, function (env) {
                    return env.withLiveQueryStateModel();
                }));
                var simulation = Simulate_1.Simulate.query(test.env);
                expect(simulation.queryBuilder.build().cq).toBeUndefined();
                test.cmp.select();
                simulation = Simulate_1.Simulate.query(test.env);
                expect(simulation.queryBuilder.build().cq).toBe('@foo==bar');
            });
            it('expression is set on the advanced part of the query, only if selected and constant is false', function () {
                test = Mock.advancedComponentSetup(Tab_1.Tab, new Mock.AdvancedComponentSetupOptions(undefined, {
                    id: 'niceid',
                    expression: '@foo==bar',
                    constant: false,
                    caption: 'foobarde'
                }, function (env) {
                    return env.withLiveQueryStateModel();
                }));
                var simulation = Simulate_1.Simulate.query(test.env);
                expect(simulation.queryBuilder.build().aq).toBeUndefined();
                test.cmp.select();
                simulation = Simulate_1.Simulate.query(test.env);
                expect(simulation.queryBuilder.build().aq).toBe('@foo==bar');
            });
            it('caption can specify the caption for the element', function () {
                test = Mock.optionsComponentSetup(Tab_1.Tab, {
                    caption: 'yo man',
                    id: 'foobarde'
                });
                expect(Dom_1.$$(test.cmp.element).text()).toBe('yo man');
            });
            it('icon can be added on a tab', function () {
                test = Mock.optionsComponentSetup(Tab_1.Tab, {
                    icon: 'yoman',
                    caption: 'foobarde',
                    id: 'foobarde'
                });
                var icn = Dom_1.$$(test.cmp.element).find('.coveo-icon');
                expect(Dom_1.$$(icn).hasClass('yoman')).toBe(true);
            });
            it('endpoint can be set on a tab, or take default otherwise', function () {
                var ep = new SearchEndpoint_1.SearchEndpoint({ restUri: 'test' });
                SearchEndpoint_1.SearchEndpoint.endpoints['testing'] = ep;
                test = Mock.optionsComponentSetup(Tab_1.Tab, {
                    endpoint: ep,
                    caption: 'foobarde',
                    id: 'foobarde'
                });
                expect(test.cmp.options.endpoint).toBe(ep);
                SearchEndpoint_1.SearchEndpoint.endpoints['testing'] = null;
            });
            it('enableDuplicateFiltering will be set on the query, only if selected', function () {
                test = Mock.advancedComponentSetup(Tab_1.Tab, new Mock.AdvancedComponentSetupOptions(undefined, {
                    id: 'niceid',
                    enableDuplicateFiltering: true,
                    caption: 'foobarde'
                }, function (env) {
                    return env.withLiveQueryStateModel();
                }));
                var simulation = Simulate_1.Simulate.query(test.env);
                expect(simulation.queryBuilder.build().enableDuplicateFiltering).toBe(false);
                test.cmp.select();
                simulation = Simulate_1.Simulate.query(test.env);
                expect(simulation.queryBuilder.build().enableDuplicateFiltering).toBe(true);
            });
            it('pipeline will be set on the query, only if selected', function () {
                test = Mock.advancedComponentSetup(Tab_1.Tab, new Mock.AdvancedComponentSetupOptions(undefined, {
                    id: 'niceid',
                    pipeline: 'foobar',
                    caption: 'foobarde'
                }, function (env) {
                    return env.withLiveQueryStateModel();
                }));
                var simulation = Simulate_1.Simulate.query(test.env);
                expect(simulation.queryBuilder.build().pipeline).toBeUndefined();
                test.cmp.select();
                simulation = Simulate_1.Simulate.query(test.env);
                expect(simulation.queryBuilder.build().pipeline).toBe('foobar');
            });
            it('maximumAge will be set on the query, only if selected', function () {
                test = Mock.advancedComponentSetup(Tab_1.Tab, new Mock.AdvancedComponentSetupOptions(undefined, {
                    id: 'niceid',
                    maximumAge: 321,
                    caption: 'foobarde'
                }, function (env) {
                    return env.withLiveQueryStateModel();
                }));
                var simulation = Simulate_1.Simulate.query(test.env);
                expect(simulation.queryBuilder.build().maximumAge).toBeUndefined();
                test.cmp.select();
                simulation = Simulate_1.Simulate.query(test.env);
                expect(simulation.queryBuilder.build().maximumAge).toBe(321);
            });
            it('layout will change on initialization if the tab is selected', function () {
                test = Mock.advancedComponentSetup(Tab_1.Tab, new Mock.AdvancedComponentSetupOptions(undefined, {
                    layout: 'card',
                    caption: 'caption',
                    id: 'id'
                }, function (env) {
                    return env.withLiveQueryStateModel();
                }));
                test.env.queryStateModel.set('t', 'id');
                Dom_1.$$(test.env.root).trigger(InitializationEvents_1.InitializationEvents.afterInitialization);
                expect(test.env.queryStateModel.get('layout')).toEqual('card');
            });
            it('layout will not change on initialization if the tab is not selected', function () {
                test = Mock.advancedComponentSetup(Tab_1.Tab, new Mock.AdvancedComponentSetupOptions(undefined, {
                    layout: 'card',
                    caption: 'caption',
                    id: 'id'
                }, function (env) {
                    return env.withLiveQueryStateModel();
                }));
                test.env.queryStateModel.set('t', 'notid');
                Dom_1.$$(test.env.root).trigger(InitializationEvents_1.InitializationEvents.afterInitialization);
                expect(test.env.queryStateModel.get('layout')).not.toEqual('card');
            });
            it('layout will change on selection', function () {
                test = Mock.advancedComponentSetup(Tab_1.Tab, new Mock.AdvancedComponentSetupOptions(undefined, {
                    layout: 'card',
                    caption: 'caption',
                    id: 'id'
                }, function (env) {
                    return env.withLiveQueryStateModel();
                }));
                test.env.queryStateModel.set('t', 'id');
                Dom_1.$$(test.env.root).trigger(InitializationEvents_1.InitializationEvents.afterInitialization);
                expect(test.env.queryStateModel.get('layout')).toEqual('card');
                test.env.queryStateModel.set('layout', 'list');
                test.cmp.select();
                expect(test.env.queryStateModel.get('layout')).toEqual('card');
            });
            it('layout will not change on selection if the layout option is not specified', function () {
                test = Mock.optionsComponentSetup(Tab_1.Tab, {
                    caption: 'caption',
                    id: 'id'
                });
                Dom_1.$$(test.env.root).trigger(InitializationEvents_1.InitializationEvents.afterInitialization);
                test.cmp.select();
                expect(test.env.queryStateModel.set).not.toHaveBeenCalled();
            });
        });
        describe('can control inclusion of other elements', function () {
            var test2;
            var dummyCmp;
            var dummyCmp2;
            var elem;
            var elem2;
            beforeEach(function () {
                test = Mock.advancedComponentSetup(Tab_1.Tab, new Mock.AdvancedComponentSetupOptions(undefined, {
                    id: 'testingtabid',
                    caption: 'caption test tab'
                }, function (env) {
                    return env.withLiveQueryStateModel();
                }));
                test2 = Mock.advancedComponentSetup(Tab_1.Tab, new Mock.AdvancedComponentSetupOptions(undefined, {
                    id: 'testingtabid2',
                    caption: 'caption test tab 2'
                }, function (env) {
                    return env.withRoot(test.env.root).withLiveQueryStateModel();
                }));
                elem = document.createElement('div');
                test.env.root.appendChild(elem);
                elem2 = document.createElement('div');
                test.env.root.appendChild(elem2);
                elem.setAttribute('data-tab', 'testingtabid');
                elem2.setAttribute('data-tab', 'testingtabid2');
                dummyCmp = Mock.advancedComponentSetup(NoopComponent_1.NoopComponent, new Mock.AdvancedComponentSetupOptions(undefined, undefined, function (env) {
                    return env.withRoot(test.env.root);
                }));
                dummyCmp2 = Mock.advancedComponentSetup(NoopComponent_1.NoopComponent, new Mock.AdvancedComponentSetupOptions(undefined, undefined, function (env) {
                    return env.withRoot(test.env.root);
                }));
                dummyCmp.cmp.element.setAttribute('data-tab', 'testingtabid');
                dummyCmp2.cmp.element.setAttribute('data-tab', 'testingtabid2');
            });
            afterEach(function () {
                test2 = null;
                dummyCmp = null;
                dummyCmp2 = null;
                elem = null;
                elem2 = null;
            });
            it('should hide and show elements if selected', function () {
                test.cmp.select();
                Simulate_1.Simulate.query(test.env);
                expect(Dom_1.$$(elem2).hasClass('coveo-tab-disabled')).toBe(true);
                expect(Dom_1.$$(dummyCmp2.cmp.element).hasClass('coveo-tab-disabled')).toBe(true);
                expect(Dom_1.$$(dummyCmp.cmp.element).hasClass('coveo-tab-disabled')).toBe(false);
                expect(Dom_1.$$(elem).hasClass('coveo-tab-disabled')).toBe(false);
                test2.cmp.select();
                Simulate_1.Simulate.query(test.env);
                expect(Dom_1.$$(elem2).hasClass('coveo-tab-disabled')).toBe(false);
                expect(Dom_1.$$(dummyCmp2.cmp.element).hasClass('coveo-tab-disabled')).toBe(false);
                expect(Dom_1.$$(dummyCmp.cmp.element).hasClass('coveo-tab-disabled')).toBe(true);
                expect(Dom_1.$$(elem).hasClass('coveo-tab-disabled')).toBe(true);
            });
            it('should disable or enable component if selected', function () {
                test.cmp.select();
                Simulate_1.Simulate.query(test.env);
                expect(dummyCmp.cmp.disabled).toBe(false);
                expect(dummyCmp2.cmp.disabled).toBe(true);
                test2.cmp.select();
                Simulate_1.Simulate.query(test.env);
                expect(dummyCmp.cmp.disabled).toBe(true);
                expect(dummyCmp2.cmp.disabled).toBe(false);
            });
            it('should disable or enable component if created under a div with data-tab', function () {
                // remove the attribute directly on the component, and put them under another div which has the attribute data-tab
                dummyCmp.cmp.element.removeAttribute('data-tab');
                dummyCmp2.cmp.element.removeAttribute('data-tab');
                elem.appendChild(dummyCmp.cmp.element);
                elem2.appendChild(dummyCmp2.cmp.element);
                test.cmp.select();
                Simulate_1.Simulate.query(test.env);
                expect(dummyCmp.cmp.disabled).toBe(false);
                expect(dummyCmp2.cmp.disabled).toBe(true);
                test2.cmp.select();
                Simulate_1.Simulate.query(test.env);
                expect(dummyCmp.cmp.disabled).toBe(true);
                expect(dummyCmp2.cmp.disabled).toBe(false);
            });
            it('can specify multiple tab for one component', function () {
                dummyCmp.cmp.element.setAttribute('data-tab', 'testingtabid,testingtabid2');
                test.cmp.select();
                Simulate_1.Simulate.query(test.env);
                expect(dummyCmp.cmp.disabled).toBe(false);
                test2.cmp.select();
                Simulate_1.Simulate.query(test.env);
                expect(dummyCmp.cmp.disabled).toBe(false);
            });
            it('can specify not to be included in a tab for one component', function () {
                dummyCmp.cmp.element.removeAttribute('data-tab');
                dummyCmp.cmp.element.setAttribute('data-tab-not', 'testingtabid');
                test.cmp.select();
                Simulate_1.Simulate.query(test.env);
                expect(dummyCmp.cmp.disabled).toBe(true);
                test2.cmp.select();
                Simulate_1.Simulate.query(test.env);
                expect(dummyCmp.cmp.disabled).toBe(false);
            });
            it('can specify not to be included in multiple tabs for one component', function () {
                dummyCmp.cmp.element.removeAttribute('data-tab');
                dummyCmp.cmp.element.setAttribute('data-tab-not', 'testingtabid,testingtabid2');
                test.cmp.select();
                Simulate_1.Simulate.query(test.env);
                expect(dummyCmp.cmp.disabled).toBe(true);
                test2.cmp.select();
                Simulate_1.Simulate.query(test.env);
                expect(dummyCmp.cmp.disabled).toBe(true);
            });
        });
        it('should trigger a query on selection', function () {
            test.cmp.select();
            expect(test.env.queryController.executeQuery).toHaveBeenCalled();
        });
        it('should trigger an analytics event on selection', function () {
            test.cmp.select();
            expect(test.env.usageAnalytics.logSearchEvent).toHaveBeenCalledWith(AnalyticsActionListMeta_1.analyticsActionCauseList.interfaceChange, {
                interfaceChangeTo: 'testingtabid'
            });
        });
    });
}
exports.TabTest = TabTest;
 
 
/***/ }),
/* 1667 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Template_1 = __webpack_require__(29);
var TableTemplate_1 = __webpack_require__(239);
function TableTemplateTest() {
    describe('TableTemplate', function () {
        var tableTemplate;
        beforeEach(function () {
            tableTemplate = new TableTemplate_1.TableTemplate([new Template_1.Template(function () { return 'test'; })]);
        });
        afterEach(function () {
            tableTemplate = null;
        });
        it('instantiateRoleToString should render a roled template to string', function () {
            var roledTemplate = new Template_1.Template(function () { return 'header'; });
            roledTemplate.role = 'table-header';
            tableTemplate = new TableTemplate_1.TableTemplate([roledTemplate]);
            var instantiatedString = tableTemplate.instantiateRoleToString('table-header');
            expect(instantiatedString).toBe('header');
        });
        it("instantiateRoleToString should render a default roled template if it doesn't have one available", function () {
            var instantiatedString = tableTemplate.instantiateRoleToString('table-header');
            expect(instantiatedString).not.toBeFalsy();
        });
        it('instantiateRoleToElement should render a roled template to element', function (done) {
            var roledTemplate = new Template_1.Template(function () { return 'header'; });
            roledTemplate.role = 'table-header';
            tableTemplate = new TableTemplate_1.TableTemplate([roledTemplate]);
            tableTemplate.instantiateRoleToElement('table-header').then(function (instantiatedElement) {
                expect(instantiatedElement.innerHTML).toBe('header');
                done();
            });
        });
        it("instantiateRoleToElement should render a default roled template if it doesn't have one available", function (done) {
            tableTemplate.instantiateRoleToElement('table-header').then(function (instantiatedElement) {
                expect(instantiatedElement.childElementCount).toBe(3);
                done();
            });
        });
    });
}
exports.TableTemplateTest = TableTemplateTest;
 
 
/***/ }),
/* 1668 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Mock = __webpack_require__(2);
var Template_1 = __webpack_require__(29);
var TemplateCache_1 = __webpack_require__(79);
var TemplateLoader_1 = __webpack_require__(832);
var Dom_1 = __webpack_require__(0);
function TemplateLoaderTest() {
    describe('TemplateLoder', function () {
        it('should not load a template into itself for template-ception', function () {
            var badTemplateId = 'badTemplate';
            var badTemplate = new Template_1.Template(function () {
                return "<div class='CoveoTemplateLoader' data-template-id='" + badTemplateId + "'></div>";
            });
            TemplateCache_1.TemplateCache.registerTemplate(badTemplateId, badTemplate);
            expect(function () {
                Mock.advancedComponentSetup(TemplateLoader_1.TemplateLoader, new Mock.AdvancedComponentSetupOptions(Dom_1.$$('div', {
                    'data-template-id': badTemplateId
                }).el));
            }).toThrow();
            TemplateCache_1.TemplateCache.unregisterTemplate(badTemplateId);
        });
    });
}
exports.TemplateLoaderTest = TemplateLoaderTest;
 
 
/***/ }),
/* 1669 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { Iif (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        Iif (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            Iif (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
            Iif (y = 0, t) op = [0, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    Eif (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        Iif (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
Object.defineProperty(exports, "__esModule", { value: true });
var Mock = __webpack_require__(2);
var Thumbnail_1 = __webpack_require__(833);
var Dom_1 = __webpack_require__(0);
var FieldTable_1 = __webpack_require__(376);
var RegisteredNamedMethods_1 = __webpack_require__(38);
var ResultLink_1 = __webpack_require__(56);
var Component_1 = __webpack_require__(6);
var MockEnvironment_1 = __webpack_require__(2);
var Defer_1 = __webpack_require__(31);
var Icon_1 = __webpack_require__(262);
var Fake_1 = __webpack_require__(11);
function ThumbnailTest() {
    describe('Thumbnail', function () {
        var _this = this;
        var thumbnailEl;
        var test;
        var endpoint;
        var getRawDataStreamPromise;
        function buildFieldTable() {
            var result = Fake_1.FakeResults.createFakeResult();
            var element = Dom_1.$$('table', { className: 'CoveoFieldTable' }).el;
            var options = new Mock.AdvancedComponentSetupOptions(element);
            return Mock.advancedResultComponentSetup(FieldTable_1.FieldTable, result, options).cmp;
        }
        function buildThumbnailEl() {
            return Dom_1.$$('img').el;
        }
        function initThumbnail() {
            test = Mock.advancedResultComponentSetup(Thumbnail_1.Thumbnail, undefined, {
                modifyBuilder: function (builder) {
                    return builder
                        .withElement(thumbnailEl)
                        .withResult()
                        .withEndpoint(endpoint);
                }
            });
        }
        beforeEach(function () {
            thumbnailEl = buildThumbnailEl();
            endpoint = Mock.mockSearchEndpoint();
            getRawDataStreamPromise = new Promise(function (resolve, reject) { });
            endpoint.getRawDataStream = function () { return getRawDataStreamPromise; };
            initThumbnail();
        });
        describe('without JSONP', function () {
            beforeEach(function () {
                endpoint.isJsonp = function () { return false; };
                endpoint.getRawDataStream = function () { return new Promise(function (resolve) { return resolve(new ArrayBuffer(0)); }); };
                initThumbnail();
            });
            it('should use async call by default', function (done) { return __awaiter(_this, void 0, void 0, function () {
                return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0: return [4 /*yield*/, Promise.resolve()];
                        case 1:
                            _a.sent();
                            expect(test.cmp.element.getAttribute('src')).toBe('data:image/png;base64, ');
                            done();
                            return [2 /*return*/];
                    }
                });
            }); });
            it("should try to resize the FieldTable if it's contained in one", function (done) { return __awaiter(_this, void 0, void 0, function () {
                var fieldTable, spy;
                return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0:
                            fieldTable = buildFieldTable();
                            spy = spyOn(fieldTable, 'updateToggleHeight');
                            fieldTable.element.appendChild(test.cmp.element);
                            return [4 /*yield*/, Promise.resolve()];
                        case 1:
                            _a.sent();
                            expect(spy).toHaveBeenCalledTimes(1);
                            done();
                            return [2 /*return*/];
                    }
                });
            }); });
        });
        describe('with JSONP', function () {
            beforeEach(function () {
                endpoint.isJsonp = function () { return true; };
                initThumbnail();
            });
            it('should use direct url', function () {
                expect(test.cmp.element.getAttribute('src')).toEqual('http://datastream.uri');
            });
            it("should try to resize the FieldTable if it's contained in one", function () {
                var fieldTable = buildFieldTable();
                var spy = spyOn(fieldTable, 'updateToggleHeight');
                thumbnailEl = buildThumbnailEl();
                fieldTable.element.appendChild(thumbnailEl);
                initThumbnail();
                expect(spy).toHaveBeenCalledTimes(1);
            });
        });
        it('should instanciate an icon when no thumnail is available', function () {
            var result = Fake_1.FakeResults.createFakeResult('foobar');
            result.raw.filetype = 'unknown';
            result.flags = '';
            var envBuilder = new MockEnvironment_1.MockEnvironmentBuilder().withResult(result);
            new Thumbnail_1.Thumbnail(test.env.element, {}, test.cmp.bindings, envBuilder.result);
            expect(RegisteredNamedMethods_1.get(Dom_1.$$(test.cmp.root).find('.CoveoIcon'), Icon_1.Icon) instanceof Icon_1.Icon).toBe(true);
        });
        describe('exposes options', function () {
            it('noThumbnailClass should set the appropriate CSS class when no thumbnail is available', function (done) {
                endpoint.getRawDataStream = function () { return new Promise(function (resolve, reject) { return reject(); }); };
                test = Mock.advancedResultComponentSetup(Thumbnail_1.Thumbnail, undefined, {
                    cmpOptions: { noThumbnailClass: 'coveo-heyo-there-is-no-class' },
                    modifyBuilder: function (builder) { return builder.withEndpoint(endpoint); }
                });
                Defer_1.Defer.defer(function () {
                    expect(Dom_1.$$(test.cmp.img).hasClass('coveo-heyo-there-is-no-class')).toBe(true);
                    expect(Dom_1.$$(test.cmp.img).hasClass('coveo-no-thumbnail')).toBe(false);
                    done();
                });
            });
            it('should create a result link if the element is not an image', function () {
                test = Mock.advancedResultComponentSetup(Thumbnail_1.Thumbnail, undefined, new Mock.AdvancedComponentSetupOptions(Dom_1.$$('div').el, {
                    clickable: true
                }, function (builder) { return builder.withResult().withEndpoint(endpoint); }));
                expect(RegisteredNamedMethods_1.get(test.cmp.element, ResultLink_1.ResultLink) instanceof ResultLink_1.ResultLink).toBe(true);
            });
            it('should create a result link if the element is an image', function () {
                test = Mock.advancedResultComponentSetup(Thumbnail_1.Thumbnail, undefined, new Mock.AdvancedComponentSetupOptions(Dom_1.$$('img').el, {
                    clickable: true
                }, function (builder) { return builder.withResult().withEndpoint(endpoint); }));
                expect(RegisteredNamedMethods_1.get(test.cmp.element, ResultLink_1.ResultLink) instanceof ResultLink_1.ResultLink).toBe(false);
                expect(RegisteredNamedMethods_1.get(Dom_1.$$(test.env.root).find("." + Component_1.Component.computeCssClassName(ResultLink_1.ResultLink))) instanceof ResultLink_1.ResultLink).toBe(true);
            });
            it('should accept resultlink option, and pass them correctly', function () {
                test = Mock.advancedResultComponentSetup(Thumbnail_1.Thumbnail, undefined, new Mock.AdvancedComponentSetupOptions(Dom_1.$$('div').el, {
                    clickable: true,
                    hrefTemplate: 'foo'
                }, function (builder) { return builder.withResult().withEndpoint(endpoint); }));
                var resultLink = RegisteredNamedMethods_1.get(test.cmp.element, ResultLink_1.ResultLink);
                expect(resultLink instanceof ResultLink_1.ResultLink).toBe(true);
                expect(resultLink.options.hrefTemplate).toBe('foo');
            });
        });
        it('should put in an empty image while loading', function () {
            expect(test.cmp.img.getAttribute('src')).toEqual('data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==');
        });
    });
}
exports.ThumbnailTest = ThumbnailTest;
 
 
/***/ }),
/* 1670 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Mock = __webpack_require__(2);
var Triggers_1 = __webpack_require__(834);
var Fake_1 = __webpack_require__(11);
var Simulate_1 = __webpack_require__(15);
var Dom_1 = __webpack_require__(0);
var QueryStateModel_1 = __webpack_require__(17);
var AnalyticsActionListMeta_1 = __webpack_require__(7);
function TriggersTest() {
    describe('Triggers', function () {
        var test;
        var results;
        beforeEach(function () {
            test = Mock.basicComponentSetup(Triggers_1.Triggers);
            test.cmp._window = Mock.mockWindow();
            results = Fake_1.FakeResults.createFakeResults(0);
        });
        it('should do nothing if triggers are not present in the response', function () {
            results.triggers = null;
            Simulate_1.Simulate.query(test.env, { results: results });
            expect(Dom_1.$$(test.cmp.element).hasClass('coveo-visible')).toBe(false);
            expect(test.cmp.element.innerHTML).toBe('');
        });
        it("should set a notification properly when a 'notify' trigger is present", function () {
            results.triggers = [{ type: 'notify', content: 'quite warm' }];
            Simulate_1.Simulate.query(test.env, { results: results });
            expect(test.cmp.notifications).toEqual(['quite warm']);
        });
        it('should reset the notifications with each request', function () {
            results.triggers = [{ type: 'notify', content: 'quite warm' }];
            Simulate_1.Simulate.query(test.env, { results: results });
            expect(test.cmp.notifications).toEqual(['quite warm']);
            results.triggers = [{ type: 'notify', content: 'a tad cold' }];
            Simulate_1.Simulate.query(test.env, { results: results });
            expect(test.cmp.notifications).toEqual(['a tad cold']);
            results.triggers = [];
            Simulate_1.Simulate.query(test.env, { results: results });
            expect(test.cmp.notifications).toEqual([]);
        });
        it("renders the content in the 'notify' trigger as html, and does not escape it (XSS is possible)", function () {
            // Escaping the content breaks the 'notify' feature which clients are using to
            // send HTML, and possibly javascript, from the AdminUI.
            var htmlContent = "<div/>";
            results.triggers = [{ type: 'notify', content: htmlContent }];
            Simulate_1.Simulate.query(test.env, { results: results });
            expect(test.cmp.element.textContent).toBe('');
        });
        it("should handle multiple 'notify's properly", function () {
            results.triggers = [
                { type: 'notify', content: 'foo' },
                { type: 'notify', content: 'bar' },
                { type: 'notify', content: '2000' }
            ];
            Simulate_1.Simulate.query(test.env, { results: results });
            expect(test.cmp.notifications).toEqual(['foo', 'bar', '2000']);
        });
        it("should execute an 'execute' trigger", function () {
            var funcSpy = jasmine.createSpy('customFunc');
            test.cmp._window['customFunc'] = funcSpy;
            var errorSpy = jasmine.createSpy('error');
            test.cmp.logger.error = errorSpy;
            results.triggers = [{ type: 'execute', content: { name: 'customFunc', params: [123, 'foo', false] } }];
            Simulate_1.Simulate.query(test.env, { results: results });
            expect(funcSpy).toHaveBeenCalledWith({
                param1: 123,
                param2: 'foo',
                param3: false,
                element: test.env.element
            });
            expect(funcSpy.calls.count()).toBe(1);
            expect(errorSpy).not.toHaveBeenCalled();
        });
        it("should handle an 'execute' trigger when function doesn't exist", function () {
            var errSpy = jasmine.createSpy('errSpy');
            test.cmp.logger.error = errSpy;
            results.triggers = [{ type: 'execute', content: { name: 'foobarFunc', params: ['foobarde', 123] } }];
            Simulate_1.Simulate.query(test.env, { results: results });
            expect(errSpy.calls.count()).toBe(1);
        });
        it("should handle an 'execute' trigger when function throws exception", function () {
            var errorSpy = jasmine.createSpy('error');
            test.cmp._window['bombFunc'] = function (params) {
                throw '💣';
            };
            test.cmp.logger.error = errorSpy;
            results.triggers = [{ type: 'execute', content: { name: 'bombFunc', params: [] } }];
            Simulate_1.Simulate.query(test.env, { results: results });
            expect(errorSpy.calls.count()).toBe(1);
        });
        it("should handle a 'redirect' trigger properly", function () {
            results.triggers = [{ type: 'redirect', content: 'http://www.coveo.com' }];
            Simulate_1.Simulate.query(test.env, { results: results });
            expect(test.cmp._window.location.href).toBe('http://www.coveo.com');
        });
        it("should handle a 'query' trigger properly", function () {
            var qsmSpy = jasmine.createSpy('qsm');
            var qcSpy = jasmine.createSpy('qc');
            test.cmp.queryStateModel.set = qsmSpy;
            test.cmp.queryController.executeQuery = qcSpy;
            results.triggers = [{ type: 'query', content: '@name=foobar2000' }];
            Simulate_1.Simulate.query(test.env, { results: results });
            expect(qsmSpy).toHaveBeenCalledWith(QueryStateModel_1.QueryStateModel.attributesEnum.q, '@name=foobar2000');
            expect(qcSpy.calls.count()).toBe(1);
        });
        describe('should log a custom analytics event', function () {
            var analyticsSpy;
            beforeEach(function () {
                analyticsSpy = jasmine.createSpy('analytics');
                test.cmp.usageAnalytics.logCustomEvent = analyticsSpy;
            });
            it("for a 'redirect' trigger", function () {
                results.triggers = [{ type: 'redirect', content: 'http://www.coveo.com' }];
                Simulate_1.Simulate.query(test.env, { results: results });
                expect(analyticsSpy).toHaveBeenCalledWith(AnalyticsActionListMeta_1.analyticsActionCauseList.triggerRedirect, {
                    redirectedTo: 'http://www.coveo.com'
                }, test.cmp.element);
            });
            it("for an 'execute' trigger", function () {
                test.cmp._window['doSomething'] = function () { return null; };
                results.triggers = [
                    { type: 'execute', content: { name: 'doSomething', params: [true, 3, 'hello'] } },
                    { type: 'execute', content: { name: 'doSomethingElse', params: ['test'] } }
                ];
                Simulate_1.Simulate.query(test.env, { results: results });
                expect(analyticsSpy).toHaveBeenCalledWith(AnalyticsActionListMeta_1.analyticsActionCauseList.triggerExecute, {
                    executions: [{ functionName: 'doSomething', params: [true, 3, 'hello'] }]
                }, test.cmp.element);
            });
            it("for a 'notify' trigger", function () {
                results.triggers = [
                    { type: 'notify', content: 'hello there' },
                    { type: 'notify', content: 'goodbye!' }
                ];
                Simulate_1.Simulate.query(test.env, { results: results });
                expect(analyticsSpy).toHaveBeenCalledWith(AnalyticsActionListMeta_1.analyticsActionCauseList.triggerNotify, {
                    notifications: ['hello there', 'goodbye!']
                }, test.cmp.element);
            });
            it("for a 'query' trigger", function () {
                results.triggers = [{ type: 'query', content: '@title=foo' }];
                test.cmp.queryController.executeQuery = function (arg) {
                    arg.beforeExecuteQuery();
                    return new Promise(function () { });
                };
                Simulate_1.Simulate.query(test.env, { results: results });
                expect(analyticsSpy).toHaveBeenCalledWith(AnalyticsActionListMeta_1.analyticsActionCauseList.triggerQuery, {
                    query: '@title=foo'
                }, test.cmp.element);
            });
        });
    });
}
exports.TriggersTest = TriggersTest;
 
 
/***/ }),
/* 1671 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Mock = __webpack_require__(2);
var Facet_1 = __webpack_require__(32);
var ValueElementRenderer_1 = __webpack_require__(236);
var FacetValue_1 = __webpack_require__(51);
var Fake_1 = __webpack_require__(11);
var Dom_1 = __webpack_require__(0);
var underscore_1 = __webpack_require__(1);
function ValueElementRendererTest() {
    describe('ValueElementRenderer', function () {
        var facet;
        var valueRenderer;
        beforeEach(function () {
            facet = Mock.optionsComponentSetup(Facet_1.Facet, {
                field: '@field'
            }).cmp;
        });
        afterEach(function () {
            facet = null;
            valueRenderer = null;
        });
        it('should build a list element', function () {
            valueRenderer = new ValueElementRenderer_1.ValueElementRenderer(facet, FacetValue_1.FacetValue.createFromFieldValue(Fake_1.FakeResults.createFakeFieldValue('foo', 1234)));
            expect(valueRenderer.build().listItem).toBeDefined();
            expect(valueRenderer.build().listItem.getAttribute('data-value')).toBe('foo');
        });
        it('should give the label the "group" role to avoid overriding child labels', function () {
            valueRenderer = new ValueElementRenderer_1.ValueElementRenderer(facet, FacetValue_1.FacetValue.createFromFieldValue(Fake_1.FakeResults.createFakeFieldValue('foo', 1234)));
            expect(valueRenderer.build().label.getAttribute('role')).toEqual('group');
        });
        it('should add a hover class for the list element', function () {
            valueRenderer = new ValueElementRenderer_1.ValueElementRenderer(facet, FacetValue_1.FacetValue.createFromFieldValue(Fake_1.FakeResults.createFakeFieldValue('foo', 1234)));
            expect(Dom_1.$$(valueRenderer.build().listItem).hasClass('coveo-with-hover')).toBe(true);
        });
        it('should build a label', function () {
            valueRenderer = new ValueElementRenderer_1.ValueElementRenderer(facet, FacetValue_1.FacetValue.createFromFieldValue(Fake_1.FakeResults.createFakeFieldValue('foo', 123)));
            expect(valueRenderer.build().label).toBeDefined();
        });
        it('should build a checkbox', function () {
            valueRenderer = new ValueElementRenderer_1.ValueElementRenderer(facet, FacetValue_1.FacetValue.createFromFieldValue(Fake_1.FakeResults.createFakeFieldValue('foo', 123)));
            valueRenderer.facetValue.selected = true;
            valueRenderer.facetValue.excluded = false;
            expect(valueRenderer.build().checkbox.getAttribute('checked')).toBe('checked');
            expect(valueRenderer.build().checkbox.getAttribute('disabled')).toBeNull();
            valueRenderer.facetValue.selected = false;
            valueRenderer.facetValue.excluded = true;
            expect(valueRenderer.build().checkbox.getAttribute('checked')).toBeNull();
            expect(valueRenderer.build().checkbox.getAttribute('disabled')).toBe('disabled');
        });
        it('the checkbox has an aria-hidden equal to true', function () {
            valueRenderer = new ValueElementRenderer_1.ValueElementRenderer(facet, FacetValue_1.FacetValue.createFromFieldValue(Fake_1.FakeResults.createFakeFieldValue('foo', 123)));
            valueRenderer.build();
            expect(valueRenderer.checkbox.getAttribute('aria-hidden')).toBe('true');
        });
        it('the checkbox has an aria-label', function () {
            valueRenderer = new ValueElementRenderer_1.ValueElementRenderer(facet, FacetValue_1.FacetValue.createFromFieldValue(Fake_1.FakeResults.createFakeFieldValue('foo', 123)));
            valueRenderer.build();
            expect(valueRenderer.checkbox.getAttribute('aria-label')).toBeTruthy();
        });
        it('the list item has an aria-label', function () {
            valueRenderer = new ValueElementRenderer_1.ValueElementRenderer(facet, FacetValue_1.FacetValue.createFromFieldValue(Fake_1.FakeResults.createFakeFieldValue('foo', 123)));
            valueRenderer.build();
            expect(valueRenderer.listItem.getAttribute('aria-label')).toBeTruthy();
        });
        it('should put the tabindex attribute to 0 on a stylish checkbox', function () {
            valueRenderer = new ValueElementRenderer_1.ValueElementRenderer(facet, FacetValue_1.FacetValue.createFromFieldValue(Fake_1.FakeResults.createFakeFieldValue('foo', 123)));
            expect(valueRenderer.build().stylishCheckbox.getAttribute('tabindex')).toBe('0');
        });
        it('should build a stylish checkbox', function () {
            valueRenderer = new ValueElementRenderer_1.ValueElementRenderer(facet, FacetValue_1.FacetValue.createFromFieldValue(Fake_1.FakeResults.createFakeFieldValue('foo', 123)));
            expect(valueRenderer.build().stylishCheckbox).toBeDefined();
        });
        describe('when the facetValue is not selected', function () {
            beforeEach(function () {
                var facetValue = FacetValue_1.FacetValue.createFromFieldValue(Fake_1.FakeResults.createFakeFieldValue('foo', 123));
                facetValue.selected = false;
                valueRenderer = new ValueElementRenderer_1.ValueElementRenderer(facet, facetValue).build();
            });
            it("the aria-label attribute starts with the word 'Inclusion'", function () {
                var ariaLabel = valueRenderer.accessibleElement.getAttribute('aria-label');
                expect(ariaLabel.indexOf('Inclusion')).toEqual(0);
            });
            it('the aria-pressed attribute of the checkbox is false', function () {
                var ariaPressed = valueRenderer.accessibleElement.getAttribute('aria-pressed');
                expect(ariaPressed).toEqual('false');
            });
            it('the aria-pressed attribute of the exclude button is false', function () {
                var ariaPressed = valueRenderer.excludeIcon.getAttribute('aria-pressed');
                expect(ariaPressed).toEqual('false');
            });
        });
        describe('when the facetValue is selected', function () {
            beforeEach(function () {
                var facetValue = FacetValue_1.FacetValue.createFromFieldValue(Fake_1.FakeResults.createFakeFieldValue('foo', 123));
                facetValue.selected = true;
                valueRenderer = new ValueElementRenderer_1.ValueElementRenderer(facet, facetValue).build();
            });
            it("the aria-label attribute starts with the word 'Inclusion'", function () {
                var ariaLabel = valueRenderer.accessibleElement.getAttribute('aria-label');
                expect(ariaLabel.indexOf('Inclusion')).toEqual(0);
            });
            it('the aria-pressed attribute of the checkbox is true', function () {
                var ariaPressed = valueRenderer.accessibleElement.getAttribute('aria-pressed');
                expect(ariaPressed).toEqual('true');
            });
            it('the aria-pressed attribute of the exclude button is false', function () {
                var ariaPressed = valueRenderer.excludeIcon.getAttribute('aria-pressed');
                expect(ariaPressed).toEqual('false');
            });
        });
        describe('when the facetValue is excluded', function () {
            beforeEach(function () {
                var facetValue = FacetValue_1.FacetValue.createFromFieldValue(Fake_1.FakeResults.createFakeFieldValue('foo', 123));
                facetValue.excluded = true;
                valueRenderer = new ValueElementRenderer_1.ValueElementRenderer(facet, facetValue).build();
            });
            it("the aria-label attribute starts with the word 'Inclusion'", function () {
                var ariaLabel = valueRenderer.accessibleElement.getAttribute('aria-label');
                expect(ariaLabel.indexOf('Inclusion')).toEqual(0);
            });
            it('the aria-pressed attribute of the checkbox is mixed', function () {
                var ariaPressed = valueRenderer.accessibleElement.getAttribute('aria-pressed');
                expect(ariaPressed).toEqual('mixed');
            });
            it('the aria-pressed attribute of the exclude button is true', function () {
                var ariaPressed = valueRenderer.excludeIcon.getAttribute('aria-pressed');
                expect(ariaPressed).toEqual('true');
            });
        });
        it('should build a caption', function () {
            valueRenderer = new ValueElementRenderer_1.ValueElementRenderer(facet, FacetValue_1.FacetValue.createFromFieldValue(Fake_1.FakeResults.createFakeFieldValue('this is a nice value', 123)));
            expect(valueRenderer.build().valueCaption).toBeDefined();
            expect(Dom_1.$$(valueRenderer.build().valueCaption).text()).toBe('this is a nice value');
        });
        it('should build a value count', function () {
            valueRenderer = new ValueElementRenderer_1.ValueElementRenderer(facet, FacetValue_1.FacetValue.createFromFieldValue(Fake_1.FakeResults.createFakeFieldValue('foo', 1)));
            expect(valueRenderer.build().valueCount).toBeDefined();
            expect(Dom_1.$$(valueRenderer.build().valueCount).text()).toBe('1');
            // Should format big number
            valueRenderer.facetValue.occurrences = 31416;
            expect(Dom_1.$$(valueRenderer.build().valueCount).text()).toBe('31,416');
        });
        it('should build either checkbox, the caption then the count in that order', function () {
            valueRenderer = new ValueElementRenderer_1.ValueElementRenderer(facet, FacetValue_1.FacetValue.createFromFieldValue(Fake_1.FakeResults.createFakeFieldValue('foo', 1)));
            var buildResult = valueRenderer.build();
            var wrapper = buildResult['facetValueLabelWrapper'];
            var wrapperChildren = Dom_1.$$(wrapper).children();
            var lastCheckboxIndex = underscore_1.findLastIndex(wrapperChildren, function (child) { return [buildResult.stylishCheckbox, buildResult.checkbox].indexOf(child) !== -1; });
            expect(wrapperChildren.slice(lastCheckboxIndex + 1, lastCheckboxIndex + 3)).toEqual([
                buildResult.valueCaption,
                buildResult.valueCount
            ]);
        });
        it('should build an exclude icon', function () {
            valueRenderer = new ValueElementRenderer_1.ValueElementRenderer(facet, FacetValue_1.FacetValue.createFromFieldValue(Fake_1.FakeResults.createFakeFieldValue('foo', 123)));
            expect(valueRenderer.build().excludeIcon).toBeDefined();
        });
        it('should build an exclude icon', function () {
            valueRenderer = new ValueElementRenderer_1.ValueElementRenderer(facet, FacetValue_1.FacetValue.createFromFieldValue(Fake_1.FakeResults.createFakeFieldValue('foo', 123)));
            expect(valueRenderer.build().excludeIcon).toBeDefined();
        });
        it('should put the tabindex attribute to 0 on an exclude icon', function () {
            valueRenderer = new ValueElementRenderer_1.ValueElementRenderer(facet, FacetValue_1.FacetValue.createFromFieldValue(Fake_1.FakeResults.createFakeFieldValue('foo', 123)));
            expect(valueRenderer.build().excludeIcon.getAttribute('tabindex')).toBe('0');
        });
        it('should render computed field only if needed', function () {
            valueRenderer = new ValueElementRenderer_1.ValueElementRenderer(facet, FacetValue_1.FacetValue.createFromFieldValue(Fake_1.FakeResults.createFakeFieldValue('foo', 123)));
            expect(valueRenderer.build().computedField).toBeUndefined();
            valueRenderer.facet.options.computedField = '@computedField';
            valueRenderer.facet.options.computedFieldOperation = 'sum';
            valueRenderer.facet.options.computedFieldFormat = 'c0';
            valueRenderer.facetValue.computedField = 9999;
            expect(valueRenderer.build().computedField).toBeDefined();
            expect(Dom_1.$$(valueRenderer.build().computedField).text()).toBe('$9,999');
        });
        it('should allow to remove element from the dom post build', function () {
            valueRenderer = new ValueElementRenderer_1.ValueElementRenderer(facet, FacetValue_1.FacetValue.createFromFieldValue(Fake_1.FakeResults.createFakeFieldValue('foo', 1)));
            var count = valueRenderer.build().valueCount;
            expect(count.parentNode).toBeDefined();
            valueRenderer.build().withNo(count);
            expect(count.parentNode).toBeNull();
        });
    });
}
exports.ValueElementRendererTest = ValueElementRendererTest;
 
 
/***/ }),
/* 1672 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Mock = __webpack_require__(2);
var ResultActionsMenu_1 = __webpack_require__(822);
var Dom_1 = __webpack_require__(0);
function ResultActionsMenuTest() {
    describe('ResultActionsMenu', function () {
        var test;
        beforeEach(function () {
            test = Mock.basicResultComponentSetup(ResultActionsMenu_1.ResultActionsMenu);
        });
        afterEach(function () {
            test = null;
        });
        function componentHasShowClass() {
            var component = Dom_1.$$(test.cmp.element);
            return component.hasClass(ResultActionsMenu_1.ResultActionsMenu.SHOW_CLASS);
        }
        it('should not remove show class on concecutive clicks', function () {
            var component = Dom_1.$$(test.cmp.element);
            component.trigger('click');
            expect(componentHasShowClass()).toBe(true);
            component.trigger('click');
            expect(componentHasShowClass()).toBe(true);
        });
        it('should add show class on mouseenter when openOnMouseOver option is true', function () {
            test = Mock.basicResultComponentSetup(ResultActionsMenu_1.ResultActionsMenu, { openOnMouseOver: true });
            var component = Dom_1.$$(test.cmp.element);
            component.trigger('mouseenter');
            expect(componentHasShowClass()).toBe(true);
        });
        it('should remove show class on mouseleave', function () {
            var component = Dom_1.$$(test.cmp.element);
            component.trigger('click');
            expect(componentHasShowClass()).toBe(true);
            component.trigger('mouseleave');
            expect(componentHasShowClass()).toBe(false);
        });
        it('should not add show class on mouseenter when openOnMouseOver option is false', function () {
            test = Mock.basicResultComponentSetup(ResultActionsMenu_1.ResultActionsMenu, { openOnMouseOver: false });
            var component = Dom_1.$$(test.cmp.element);
            component.trigger('mouseenter');
            expect(componentHasShowClass()).toBe(false);
        });
        it('when set inside a folded result, it resolves the parent correctly', function () {
            test = Mock.basicFoldedResultComponentSetup(ResultActionsMenu_1.ResultActionsMenu);
            expect(test.cmp.parentResult).toBeDefined();
        });
    });
}
exports.ResultActionsMenuTest = ResultActionsMenuTest;
 
 
/***/ }),
/* 1673 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Mock = __webpack_require__(2);
var ResultsPerPage_1 = __webpack_require__(825);
var AnalyticsActionListMeta_1 = __webpack_require__(7);
var Simulate_1 = __webpack_require__(15);
var Fake_1 = __webpack_require__(11);
var Dom_1 = __webpack_require__(0);
var Core_1 = __webpack_require__(9);
var QueryStateModel_1 = __webpack_require__(17);
function ResultsPerPageTest() {
    describe('ResultsPerPage', function () {
        var test;
        function buildResultsPerPage() {
            var cmp = Mock.basicComponentSetup(ResultsPerPage_1.ResultsPerPage);
            cmp.env.queryController.options = {};
            cmp.env.queryController.options.resultsPerPage = 10;
            return cmp;
        }
        beforeEach(function () { return (test = buildResultsPerPage()); });
        afterEach(function () { return (test = null); });
        it('should be accessible', function () {
            var label = test.cmp['span'];
            var list = test.cmp['list'];
            expect(label.id).toBeTruthy();
            expect(list.getAttribute('aria-labelledby')).toEqual(label.id);
        });
        describe('when calling #setResultsPerPage', function () {
            var numOfResults = 50;
            beforeEach(function () { return test.cmp.setResultsPerPage(numOfResults); });
            it('updates the resultsPerPage option in the SearchInterface', function () {
                expect(test.cmp.searchInterface.resultsPerPage).toBe(numOfResults);
            });
            it('sets number if results in the QueryStateModel', function () {
                expect(test.cmp.queryStateModel.set).toHaveBeenCalledWith(Core_1.QueryStateModel.attributesEnum.numberOfResults, numOfResults);
            });
            it('should trigger a query', function () {
                expect(test.env.queryController.executeQuery).toHaveBeenCalled();
            });
            it('should log the proper analytics event', function () {
                expect(test.env.usageAnalytics.logCustomEvent).toHaveBeenCalledWith(AnalyticsActionListMeta_1.analyticsActionCauseList.pagerResize, { currentResultsPerPage: numOfResults }, test.cmp.element);
            });
        });
        describe('when modifying the query state model', function () {
            var setQueryStateModelValue = function (value) {
                test.env.queryStateModel.set(QueryStateModel_1.QUERY_STATE_ATTRIBUTES.NUMBER_OF_RESULTS, value);
            };
            var verifyStateForNumberOfResults = function (value) {
                expect(test.cmp.resultsPerPage).toBe(value);
                expect(test.env.queryStateModel.get(QueryStateModel_1.QUERY_STATE_ATTRIBUTES.NUMBER_OF_RESULTS)).toBe(value);
            };
            beforeEach(function () {
                var advancedOptions = {
                    choicesDisplayed: [10, 25, 50, 100],
                    initialChoice: 25
                };
                var advancedSetup = new Mock.AdvancedComponentSetupOptions(null, advancedOptions, function (builder) {
                    return builder.withLiveQueryStateModel();
                });
                test = Mock.advancedComponentSetup(ResultsPerPage_1.ResultsPerPage, advancedSetup);
                Simulate_1.Simulate.initialization(test.env);
                verifyStateForNumberOfResults(25);
            });
            it('should accept setting the value to the original default 10', function () {
                setQueryStateModelValue(10);
                verifyStateForNumberOfResults(10);
            });
            it('should accept setting the value to the a different value than the original', function () {
                setQueryStateModelValue(50);
                verifyStateForNumberOfResults(50);
            });
            it('should revert to the initial state when setting an invalid value', function () {
                setQueryStateModelValue(123);
                verifyStateForNumberOfResults(25);
            });
            it('should revert to the initial state when setting a NaN', function () {
                setQueryStateModelValue('foo');
                verifyStateForNumberOfResults(25);
            });
        });
        it("when there are two ResultsPerPage components,\n    when calling #setResultsPerPage on one,\n    it updates the second component to the same number of results", function () {
            var numOfResults = 50;
            var bindings = new Mock.MockEnvironmentBuilder().withLiveQueryStateModel().getBindings();
            var firstResultsPerPage = new ResultsPerPage_1.ResultsPerPage(Dom_1.$$('div').el, {}, bindings);
            var secondResultsPerPage = new ResultsPerPage_1.ResultsPerPage(Dom_1.$$('div').el, {}, bindings);
            expect(secondResultsPerPage.resultsPerPage).not.toBe(numOfResults);
            firstResultsPerPage.setResultsPerPage(numOfResults);
            expect(secondResultsPerPage.resultsPerPage).toBe(secondResultsPerPage.resultsPerPage);
        });
        describe('should be able to activate and deactivate', function () {
            var isActivated = function (test) {
                return Dom_1.$$(test.cmp.element).find('.coveo-results-per-page-no-results') == null;
            };
            it('if the results per page parameter is overwritten in the backend (query pipeline)', function () {
                test.env.searchInterface.isResultsPerPageModifiedByPipeline = false;
                Simulate_1.Simulate.query(test.env);
                expect(isActivated(test)).toBeTruthy();
                test.env.searchInterface.isResultsPerPageModifiedByPipeline = true;
                Simulate_1.Simulate.query(test.env);
                expect(isActivated(test)).toBeFalsy();
            });
            it('on query success and query error', function () {
                Simulate_1.Simulate.query(test.env);
                expect(isActivated(test)).toBeTruthy();
                Simulate_1.Simulate.queryError(test.env);
                expect(isActivated(test)).toBeFalsy();
            });
            it('when there are results and when there are no results', function () {
                var results = Fake_1.FakeResults.createFakeResults(10);
                Simulate_1.Simulate.query(test.env, {
                    results: results
                });
                expect(isActivated(test)).toBeTruthy();
                results = Fake_1.FakeResults.createFakeResults(0);
                Simulate_1.Simulate.query(test.env, {
                    results: results
                });
                expect(isActivated(test)).toBeFalsy();
            });
        });
        describe('exposes options', function () {
            it('choicesDisplayed allows to choose the number of results per page options', function () {
                test = Mock.optionsComponentSetup(ResultsPerPage_1.ResultsPerPage, {
                    choicesDisplayed: [15, 25, 35, 75]
                });
                Simulate_1.Simulate.initialization(test.env);
                Simulate_1.Simulate.query(test.env, {
                    results: Fake_1.FakeResults.createFakeResults(100)
                });
                expect(Dom_1.$$(test.cmp.element).findAll('span.coveo-results-per-page-list-item-text').length).toBe(4);
                expect(test.env.queryController.options.resultsPerPage).toBe(15);
            });
            it('choicesDisplayed buttons display the right aria-label', function () {
                test = Mock.optionsComponentSetup(ResultsPerPage_1.ResultsPerPage, {
                    choicesDisplayed: [10, 25, 50]
                });
                Simulate_1.Simulate.query(test.env, {
                    results: Fake_1.FakeResults.createFakeResults(100)
                });
                var buttons = Dom_1.$$(test.cmp.element).findAll('[role="button"]');
                expect(Dom_1.$$(buttons[0]).text()).toBe('10');
                expect(buttons[0].getAttribute('aria-label')).toBe('Display 10 results per page');
            });
            it('initialChoice allows to choose the first choice of the number of results per page options', function () {
                test = Mock.optionsComponentSetup(ResultsPerPage_1.ResultsPerPage, {
                    initialChoice: 13,
                    choicesDisplayed: [3, 5, 7, 13]
                });
                Simulate_1.Simulate.initialization(test.env);
                Simulate_1.Simulate.query(test.env, {
                    results: Fake_1.FakeResults.createFakeResults(100)
                });
                expect(test.env.queryController.options.resultsPerPage).toBe(13);
            });
            it('initialChoice allows to be undefined to set the first of the choicesDisplayed as default', function () {
                var firstChoice = 3;
                test = Mock.optionsComponentSetup(ResultsPerPage_1.ResultsPerPage, {
                    initialChoice: undefined,
                    choicesDisplayed: [firstChoice, 5, 7, 13]
                });
                Simulate_1.Simulate.initialization(test.env);
                Simulate_1.Simulate.query(test.env, {
                    results: Fake_1.FakeResults.createFakeResults(100)
                });
                expect(test.env.queryController.options.resultsPerPage).toBe(firstChoice);
            });
            it('initialChoice set as a choice not displayed uses the first choice instead', function () {
                var aChoiceNotDisplayed = 15;
                var firstChoice = 3;
                test = Mock.optionsComponentSetup(ResultsPerPage_1.ResultsPerPage, {
                    initialChoice: aChoiceNotDisplayed,
                    choicesDisplayed: [firstChoice, 5, 7, 13]
                });
                Simulate_1.Simulate.initialization(test.env);
                Simulate_1.Simulate.query(test.env, {
                    results: Fake_1.FakeResults.createFakeResults(100)
                });
                expect(test.env.queryController.options.resultsPerPage).toBe(firstChoice);
            });
            it("when the QSM numberOfResults is equal to the default QSM number of results,\n      when the initialChoice option is not equal to the default QSM numberOfResults,\n      it sets the resultsPerPage to the initialChoice", function () {
                var initialChoice = 5;
                test = Mock.optionsComponentSetup(ResultsPerPage_1.ResultsPerPage, {
                    initialChoice: initialChoice,
                    choicesDisplayed: [initialChoice, 10, 15, 20]
                });
                Simulate_1.Simulate.initialization(test.env);
                Simulate_1.Simulate.query(test.env, {
                    results: Fake_1.FakeResults.createFakeResults(100)
                });
                expect(test.env.queryController.options.resultsPerPage).toBe(initialChoice);
            });
            describe('with choices displayed 5, 10, 15 and 20', function () {
                var initialChoice = 10;
                var choicesDisplayed = [5, initialChoice, 15, 20];
                var buttons;
                beforeEach(function () {
                    test = Mock.optionsComponentSetup(ResultsPerPage_1.ResultsPerPage, {
                        initialChoice: initialChoice,
                        choicesDisplayed: choicesDisplayed
                    });
                    Simulate_1.Simulate.initialization(test.env);
                    Simulate_1.Simulate.query(test.env, {
                        results: Fake_1.FakeResults.createFakeResults(100)
                    });
                    buttons = Dom_1.$$(test.cmp.element).findAll('[role="button"]');
                });
                it('gives the button role to the choices', function () {
                    buttons.forEach(function (choiceElement) { return expect(choiceElement.getAttribute('role')).toEqual('button'); });
                });
                it('sets the aria-pressed attribute on choice elements', function () {
                    buttons.forEach(function (choiceElement, index) {
                        expect(choiceElement.getAttribute('aria-pressed')).toEqual((index === 1).toString());
                    });
                });
                it('sets tabindex to 0 on every button element', function () {
                    buttons.forEach(function (choiceElement) {
                        expect(choiceElement.getAttribute('tabindex')).toEqual('0');
                    });
                });
            });
        });
    });
}
exports.ResultsPerPageTest = ResultsPerPageTest;
 
 
/***/ }),
/* 1674 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Mock = __webpack_require__(2);
var ResultLayoutSelector_1 = __webpack_require__(200);
var ResultLayoutEvents_1 = __webpack_require__(132);
var QueryEvents_1 = __webpack_require__(14);
var InitializationEvents_1 = __webpack_require__(22);
var Fake_1 = __webpack_require__(11);
var QueryStateModel_1 = __webpack_require__(17);
var Dom_1 = __webpack_require__(0);
var ResultList_1 = __webpack_require__(68);
function ResultLayoutTest() {
    describe('ResultLayout', function () {
        var test;
        beforeEach(function () {
            test = Mock.basicComponentSetup(ResultLayoutSelector_1.ResultLayoutSelector);
        });
        afterEach(function () {
            test = null;
        });
        describe('with duplicate result layouts', function () {
            var addResultLayouts = function (layouts) {
                var root = Dom_1.$$('div');
                root.on(ResultLayoutEvents_1.ResultLayoutEvents.populateResultLayout, function (e, args) { return (args.layouts = layouts); });
                test = Mock.advancedComponentSetup(ResultLayoutSelector_1.ResultLayoutSelector, {
                    modifyBuilder: function (builder) {
                        builder.withRoot(root.el);
                        return builder;
                    }
                });
            };
            it('removes duplicates having the same case', function () {
                addResultLayouts(['list', 'list']);
                Dom_1.$$(test.env.root).trigger(InitializationEvents_1.InitializationEvents.afterComponentsInitialization);
                var activeLayouts = test.cmp.activeLayouts;
                var noOfActiveLayouts = Object.keys(activeLayouts).length;
                expect(noOfActiveLayouts).toEqual(1);
            });
            it('removes duplicates having different cases', function () {
                addResultLayouts(['table', 'Table']);
                Dom_1.$$(test.env.root).trigger(InitializationEvents_1.InitializationEvents.afterComponentsInitialization);
                var activeLayouts = test.cmp.activeLayouts;
                var noOfActiveLayouts = Object.keys(activeLayouts).length;
                expect(noOfActiveLayouts).toEqual(1);
            });
        });
        describe('with "card" and "list" layouts available', function () {
            beforeEach(function () {
                test = Mock.advancedComponentSetup(ResultLayoutSelector_1.ResultLayoutSelector, {
                    modifyBuilder: function (builder) {
                        Dom_1.$$(builder.root).on(ResultLayoutEvents_1.ResultLayoutEvents.populateResultLayout, function (e, args) {
                            args.layouts.push('card');
                            args.layouts.push('list');
                        });
                        return builder;
                    }
                });
                Dom_1.$$(test.env.root).trigger(InitializationEvents_1.InitializationEvents.afterComponentsInitialization);
            });
            it('hides on querySuccess when there are 0 results and the page is resized', function () {
                var root = Dom_1.$$(test.cmp.root);
                var spy = jasmine.createSpy('hideSpy');
                test.cmp['hide'] = spy;
                root.width = function () { return 400; };
                Dom_1.$$(test.env.root).trigger(QueryEvents_1.QueryEvents.querySuccess, {
                    results: Fake_1.FakeResults.createFakeResults(0)
                });
                expect(spy).toHaveBeenCalled();
            });
            it('changeLayout should switch the layout when entering a valid and available layout', function () {
                test.cmp.changeLayout('card');
                expect(test.cmp.getCurrentLayout()).toBe('card');
            });
            it('changeLayout should execute a new query', function () {
                test.cmp.changeLayout('card');
                expect(test.env.queryController.executeQuery).toHaveBeenCalled();
            });
            it('changeLayout should not execute a query if it is the first query', function () {
                test.env.queryController.firstQuery = true;
                test.cmp.changeLayout('card');
                expect(test.env.queryController.executeQuery).not.toHaveBeenCalled();
            });
            it('changeLayout should throw an error when switching to a valid but unavailable layout', function () {
                expect(function () { return test.cmp.changeLayout('table'); }).toThrow();
            });
            it('should put tabindex=0 on each of the layout buttons', function () {
                var children = test.cmp.element.children;
                for (var i = 0; i < children.length; ++i) {
                    expect(children[i].getAttribute('tabindex')).toBe('0');
                }
            });
            it('hides on querySuccess when there are 0 results', function () {
                var spy = jasmine.createSpy('hideSpy');
                test.cmp['hide'] = spy;
                Dom_1.$$(test.env.root).trigger(QueryEvents_1.QueryEvents.querySuccess, {
                    results: Fake_1.FakeResults.createFakeResults(0)
                });
                expect(spy).toHaveBeenCalled();
            });
            it('show after it has been hidden when there are more than 0 results', function () {
                var spyShow = jasmine.createSpy('showSpy');
                var spyHide = jasmine.createSpy('hideSpy');
                test.cmp['hide'] = spyHide;
                test.cmp['show'] = spyShow;
                Dom_1.$$(test.env.root).trigger(QueryEvents_1.QueryEvents.querySuccess, {
                    results: Fake_1.FakeResults.createFakeResults(0)
                });
                expect(spyHide).toHaveBeenCalled();
                Dom_1.$$(test.env.root).trigger(QueryEvents_1.QueryEvents.querySuccess, {
                    results: Fake_1.FakeResults.createFakeResults(10)
                });
                expect(spyShow).toHaveBeenCalled();
            });
            it('shows on querySuccess when there are results', function () {
                var spy = jasmine.createSpy('showSpy');
                test.cmp['show'] = spy;
                Dom_1.$$(test.env.root).trigger(QueryEvents_1.QueryEvents.querySuccess, {
                    results: Fake_1.FakeResults.createFakeResults(3)
                });
                expect(spy).toHaveBeenCalled();
            });
            describe('when enablingLayouts', function () {
                var resultListCard;
                var resultListList;
                var spy;
                beforeEach(function () {
                    resultListCard = Mock.mockComponent(ResultList_1.ResultList);
                    resultListCard.options = {
                        layout: 'card'
                    };
                    resultListList = Mock.mockComponent(ResultList_1.ResultList);
                    resultListList.options = {
                        layout: 'list'
                    };
                    test.cmp.disableLayouts(['card']);
                    spy = jasmine.createSpy('spy');
                    test.env.searchInterface.getComponents = spy;
                });
                var getBtns = function () {
                    return Dom_1.$$(test.cmp.element).findAll('.coveo-result-layout-selector');
                };
                var getBtnsCaption = function () {
                    return Dom_1.$$(test.cmp.element).findAll('.coveo-result-layout-selector-caption');
                };
                it('should not allow to enable layouts for which there is no result list available', function () {
                    spy.and.returnValue([resultListList]);
                    test.cmp.enableLayouts(['card']);
                    var btns = getBtns();
                    var btnsCaption = getBtnsCaption();
                    expect(btnsCaption[0].textContent).toBe('Card');
                    expect(Dom_1.$$(btns[0]).hasClass('coveo-hidden')).toBeTruthy();
                });
                it('should allow to enable layouts for which there is a disabled resulst list', function () {
                    spy.and.returnValue([resultListList, resultListCard]);
                    resultListCard.disabled = true;
                    test.cmp.enableLayouts(['card']);
                    var btns = getBtns();
                    var btnsCaption = getBtnsCaption();
                    expect(btnsCaption[0].textContent).toBe('Card');
                    expect(Dom_1.$$(btns[0]).hasClass('coveo-hidden')).toBeFalsy();
                });
                it('should allow to enable layouts for which there is a result list available', function () {
                    spy.and.returnValue([resultListList, resultListCard]);
                    test.cmp.enableLayouts(['card']);
                    var btns = getBtns();
                    var btnsCaption = getBtnsCaption();
                    expect(btnsCaption[0].textContent).toBe('Card');
                    expect(Dom_1.$$(btns[0]).hasClass('coveo-hidden')).toBeFalsy();
                });
            });
            describe('with live queryStateModel', function () {
                beforeEach(function () {
                    test = Mock.advancedComponentSetup(ResultLayoutSelector_1.ResultLayoutSelector, {
                        modifyBuilder: function (builder) {
                            builder.withLiveQueryStateModel();
                            Dom_1.$$(builder.root).on(ResultLayoutEvents_1.ResultLayoutEvents.populateResultLayout, function (e, args) {
                                args.layouts.push('list');
                                args.layouts.push('card');
                            });
                            return builder;
                        }
                    });
                    Dom_1.$$(test.env.root).trigger(InitializationEvents_1.InitializationEvents.afterComponentsInitialization);
                });
                it('calls changeLayout with the new value on queryStateChanged if it is available', function () {
                    test.env.queryStateModel.set(QueryStateModel_1.QueryStateModel.attributesEnum.layout, 'card');
                    expect(test.cmp.getCurrentLayout()).toBe('card');
                });
                it('calls changeLayout with its first layout if no value is provided', function () {
                    test.env.queryStateModel.set(QueryStateModel_1.QueryStateModel.attributesEnum.layout, 'list');
                    test.env.queryStateModel.set(QueryStateModel_1.QueryStateModel.attributesEnum.layout, '');
                    expect(test.cmp.getCurrentLayout()).toBe('list');
                });
                it('calls changeLayout with its first layout if an invalid value is provided', function () {
                    test.env.queryStateModel.set(QueryStateModel_1.QueryStateModel.attributesEnum.layout, 'list');
                    test.env.queryStateModel.set(QueryStateModel_1.QueryStateModel.attributesEnum.layout, 'Emacs <3');
                    expect(test.cmp.getCurrentLayout()).toBe('list');
                });
            });
        });
        it('changeLayout should not throw an error when having only one layout and switching to it', function () {
            test = Mock.advancedComponentSetup(ResultLayoutSelector_1.ResultLayoutSelector, {
                modifyBuilder: function (builder) {
                    Dom_1.$$(builder.root).on(ResultLayoutEvents_1.ResultLayoutEvents.populateResultLayout, function (e, args) {
                        args.layouts.push('table');
                    });
                    return builder;
                }
            });
            Dom_1.$$(test.env.root).trigger(InitializationEvents_1.InitializationEvents.afterComponentsInitialization);
            expect(function () { return test.cmp.changeLayout('table'); }).not.toThrow();
        });
        it('should throw an error when being populated with invalid result layout names', function () {
            test = Mock.advancedComponentSetup(ResultLayoutSelector_1.ResultLayoutSelector, {
                modifyBuilder: function (builder) {
                    Dom_1.$$(builder.root).on(ResultLayoutEvents_1.ResultLayoutEvents.populateResultLayout, function (e, args) {
                        args.layouts.push('star-shaped');
                    });
                    return builder;
                }
            });
            expect(function () { return test.cmp['populate'](); }).toThrowError(/Invalid layout/);
        });
        it('changeLayout should throw an error at runtime when entering an invalid layout', function () {
            expect(function () { return test.cmp.changeLayout.call(test.cmp, 'pony-shaped'); }).toThrow();
        });
        it('hides when there are less than 2 layouts available', function () {
            test = Mock.advancedComponentSetup(ResultLayoutSelector_1.ResultLayoutSelector, {
                modifyBuilder: function (builder) {
                    Dom_1.$$(builder.root).on(ResultLayoutEvents_1.ResultLayoutEvents.populateResultLayout, function (e, args) {
                        args.layouts.push('list');
                    });
                    return builder;
                }
            });
            Dom_1.$$(test.env.root).trigger(InitializationEvents_1.InitializationEvents.afterComponentsInitialization);
            expect(test.cmp.element.classList).toContain('coveo-result-layout-hidden');
        });
        it('does not hide when there are 2 layouts or more available', function () {
            test = Mock.advancedComponentSetup(ResultLayoutSelector_1.ResultLayoutSelector, {
                modifyBuilder: function (builder) {
                    Dom_1.$$(builder.root).on(ResultLayoutEvents_1.ResultLayoutEvents.populateResultLayout, function (e, args) {
                        args.layouts.push('list');
                        args.layouts.push('card');
                        args.layouts.push('table');
                    });
                    return builder;
                }
            });
            Dom_1.$$(test.env.root).trigger(InitializationEvents_1.InitializationEvents.afterComponentsInitialization);
            expect(test.cmp.element.classList).not.toContain('coveo-result-layout-hidden');
        });
        it('hides its parent `result-layout-section` instead of itself if it is present', function () {
            var parentSection = Dom_1.$$('div', { className: 'coveo-result-layout-section' });
            test = Mock.advancedComponentSetup(ResultLayoutSelector_1.ResultLayoutSelector, {
                modifyBuilder: function (builder) {
                    Dom_1.$$(builder.root).on(ResultLayoutEvents_1.ResultLayoutEvents.populateResultLayout, function (e, args) {
                        args.layouts.push('list');
                    });
                    parentSection.append(builder.element);
                    return builder;
                }
            });
            Dom_1.$$(test.env.root).trigger(InitializationEvents_1.InitializationEvents.afterComponentsInitialization);
            expect(parentSection.el.classList).toContain('coveo-result-layout-hidden');
            expect(test.cmp.element.classList).not.toContain('coveo-result-layout-hidden');
        });
        it('hides on queryError', function () {
            var hideSpy = jasmine.createSpy('hideSpy');
            test.cmp['hide'] = hideSpy;
            Dom_1.$$(test.env.root).trigger(QueryEvents_1.QueryEvents.queryError, {});
            expect(hideSpy).toHaveBeenCalled();
        });
    });
}
exports.ResultLayoutTest = ResultLayoutTest;
 
 
/***/ }),
/* 1675 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Logo_1 = __webpack_require__(793);
var Dom_1 = __webpack_require__(0);
var Mock = __webpack_require__(2);
var Simulate_1 = __webpack_require__(15);
function LogoTest() {
    describe('Logo', function () {
        var test;
        beforeEach(function () {
            test = Mock.basicComponentSetup(Logo_1.Logo);
        });
        afterEach(function () {
            test = null;
        });
        var logoIsHidden = function () {
            return Dom_1.$$(test.cmp.element).hasClass('coveo-hidden');
        };
        var getLink = function () {
            return Dom_1.$$(test.cmp.element).find('a');
        };
        it('Should be an image link to coveo website', function () {
            var link = getLink();
            expect(link.href).toBe('https://www.coveo.com/');
            expect(Dom_1.$$(link).getClass()).toEqual(jasmine.arrayContaining(['coveo-powered-by', 'coveo-footer-logo']));
        });
        it('should be hidden on no results', function () {
            Simulate_1.Simulate.noResults(test.env);
            expect(logoIsHidden()).toBe(true);
        });
        it('should be hidden on query error', function () {
            Simulate_1.Simulate.queryError(test.env);
            expect(logoIsHidden()).toBe(true);
        });
        it('should be visible on successful query', function () {
            Simulate_1.Simulate.query(test.env);
            expect(logoIsHidden()).toBe(false);
        });
        it('should be visible on successful query after no results', function () {
            Simulate_1.Simulate.noResults(test.env);
            Simulate_1.Simulate.query(test.env);
            expect(logoIsHidden()).toBe(false);
        });
        it('should be visible on successful query after query error', function () {
            Simulate_1.Simulate.queryError(test.env);
            Simulate_1.Simulate.query(test.env);
            expect(logoIsHidden()).toBe(false);
        });
        describe('exposes options', function () {
            it('target allows to specify the target attribute on the link', function () {
                test = Mock.optionsComponentSetup(Logo_1.Logo, {
                    target: '_blank'
                });
                expect(getLink().target).toBe('_blank');
            });
            it('target left undefined should not output any target attribute on the link', function () {
                test = Mock.optionsComponentSetup(Logo_1.Logo, {
                    target: undefined
                });
                expect(getLink().target).toBe('');
            });
        });
    });
}
exports.LogoTest = LogoTest;
 
 
/***/ }),
/* 1676 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var RegisteredNamedMethod = __webpack_require__(38);
var MockEnvironment_1 = __webpack_require__(2);
var Dom_1 = __webpack_require__(0);
var Component_1 = __webpack_require__(6);
var Searchbox_1 = __webpack_require__(393);
var Fake_1 = __webpack_require__(11);
var MockEnvironment_2 = __webpack_require__(2);
var Initialization_1 = __webpack_require__(8);
var NoopComponent_1 = __webpack_require__(207);
var Defer_1 = __webpack_require__(31);
var SearchInterface_1 = __webpack_require__(25);
var Analytics_1 = __webpack_require__(178);
var SharedAnalyticsCalls = __webpack_require__(172);
var NoopAnalyticsClient_1 = __webpack_require__(114);
var SearchEndpoint_1 = __webpack_require__(61);
function RegisteredNamedMethodsTest() {
    describe('RegisteredNamedMethods', function () {
        var env;
        var searchbox;
        var root;
        beforeEach(function () {
            env = new MockEnvironment_1.MockEnvironmentBuilder().build();
            searchbox = Dom_1.$$('div', {
                className: 'CoveoSearchbox'
            }).el;
            root = Dom_1.$$('div').el;
            root.appendChild(searchbox);
        });
        afterEach(function () {
            env = null;
            searchbox = null;
        });
        it('should allow to load an arbitrary module', function () {
            var fooModule = jasmine.createSpy('foo').and.callFake(function () { return new Promise(function (resolve, reject) { }); });
            Initialization_1.LazyInitialization.registerLazyModule('foo', fooModule);
            RegisteredNamedMethod.load('foo');
            expect(fooModule).toHaveBeenCalled();
        });
        it('should allow to load an arbitrary component', function () {
            var barComponent = jasmine.createSpy('bar').and.callFake(function () {
                return new Promise(function (resolve, reject) {
                    resolve(NoopComponent_1.NoopComponent);
                });
            });
            Initialization_1.LazyInitialization.registerLazyComponent('bar', barComponent);
            RegisteredNamedMethod.load('bar');
            expect(barComponent).toHaveBeenCalled();
        });
        it('promise should throw when loading something that does not exist', function (done) {
            RegisteredNamedMethod.load('does not exist').catch(function () {
                expect(true).toBe(true);
                done();
            });
        });
        it('should allow to call state correctly', function () {
            RegisteredNamedMethod.state(env.root, 'q', 'foobar');
            expect(env.queryStateModel.set).toHaveBeenCalledWith('q', 'foobar', jasmine.any(Object));
            RegisteredNamedMethod.state(env.root, 'q');
            expect(env.queryStateModel.get).toHaveBeenCalledWith('q');
        });
        it('should allow to call init correctly', function () {
            expect(function () {
                return RegisteredNamedMethod.init(root, {
                    Searchbox: { addSearchButton: false },
                    SearchInterface: { autoTriggerQuery: false }
                });
            }).not.toThrow();
            expect(Component_1.Component.get(searchbox).options.addSearchButton).toBe(false);
        });
        it('should allow to call initSearchbox correctly', function () {
            expect(function () {
                return RegisteredNamedMethod.initSearchbox(root, '/search', {
                    Searchbox: { addSearchButton: false },
                    SearchInterface: { autoTriggerQuery: false }
                });
            }).not.toThrow();
            expect(Component_1.Component.get(searchbox).options.addSearchButton).toBe(false);
            expect(Component_1.Component.get(searchbox).options.triggerQueryOnClear).toBe(false);
        });
        it('should allow to call initSearchbox if the searchbox is on the root of the element', function () {
            expect(function () {
                return RegisteredNamedMethod.initSearchbox(searchbox, '/search', {
                    Searchbox: { addSearchButton: false },
                    SearchInterface: { autoTriggerQuery: false }
                });
            }).not.toThrow();
            expect(Component_1.Component.get(searchbox, Searchbox_1.Searchbox) instanceof Searchbox_1.Searchbox).toBe(true);
            expect(Component_1.Component.get(searchbox, SearchInterface_1.SearchInterface) instanceof SearchInterface_1.SearchInterface).toBe(true);
        });
        it('should allow to call init recommendation correctly', function (done) {
            expect(function () {
                return RegisteredNamedMethod.initRecommendation(root, undefined, undefined, {
                    Searchbox: { addSearchButton: false },
                    SearchInterface: { autoTriggerQuery: false }
                });
            }).not.toThrow();
            Defer_1.Defer.defer(function () {
                expect(Component_1.Component.get(searchbox).options.addSearchButton).toBe(false);
                done();
            });
        });
        it('should allow to call execute query', function () {
            RegisteredNamedMethod.executeQuery(env.root);
            expect(env.queryController.executeQuery).toHaveBeenCalled();
        });
        it('should allow to call get', function () {
            RegisteredNamedMethod.init(root, {
                Searchbox: { addSearchButton: false },
                SearchInterface: { autoTriggerQuery: false }
            });
            expect(RegisteredNamedMethod.get(searchbox) instanceof Searchbox_1.Searchbox).toBe(true);
        });
        it('should allow to call result', function () {
            var fakeResult = Fake_1.FakeResults.createFakeResult();
            var resultElement = Dom_1.$$('div', {
                className: 'CoveoResult'
            });
            resultElement.el['CoveoResult'] = fakeResult;
            root.appendChild(resultElement.el);
            resultElement.el.appendChild(searchbox);
            RegisteredNamedMethod.init(root, {
                Searchbox: { addSearchButton: false },
                SearchInterface: { autoTriggerQuery: false }
            });
            expect(RegisteredNamedMethod.result(searchbox)).toBe(fakeResult);
        });
        it('should allow to pass options ahead of init', function () {
            RegisteredNamedMethod.options(root, { Searchbox: { enableOmnibox: true } });
            RegisteredNamedMethod.init(root, {
                Searchbox: { addSearchButton: false },
                SearchInterface: { autoTriggerQuery: false }
            });
            expect(Component_1.Component.get(searchbox).options.enableOmnibox).toBe(true);
        });
        it('should allow to patch', function () {
            RegisteredNamedMethod.init(root, {
                Searchbox: { addSearchButton: false },
                SearchInterface: { autoTriggerQuery: false }
            });
            var spy = jasmine.createSpy('submit');
            RegisteredNamedMethod.patch(searchbox, 'disable', spy);
            Component_1.Component.get(searchbox).disable();
            expect(spy).toHaveBeenCalled();
        });
        describe('with spy analytics', function () {
            var analyticsElement;
            var analytics;
            beforeEach(function () {
                var analyticsClassName = Component_1.Component.computeCssClassName(Analytics_1.Analytics);
                analyticsElement = Dom_1.$$('div', {
                    className: analyticsClassName
                }).el;
                analytics = { client: MockEnvironment_2.mockUsageAnalytics() };
                analyticsElement[analyticsClassName] = analytics;
                analyticsElement['CoveoBoundComponents'] = [analytics];
                env.root.appendChild(analyticsElement);
            });
            afterEach(function () {
                analyticsElement = null;
                analytics = null;
            });
            it('should allow to log search event', function () {
                RegisteredNamedMethod.logSearchEvent(env.root, { name: 'foo', type: 'bar' }, {});
                expect(analytics['client'].logSearchEvent).toHaveBeenCalledWith(jasmine.objectContaining({
                    name: 'foo',
                    type: 'bar'
                }), jasmine.any(Object));
            });
            it('should allow to log a custom event', function () {
                RegisteredNamedMethod.logCustomEvent(env.root, { name: 'foo', type: 'bar' }, {});
                expect(analytics['client'].logCustomEvent).toHaveBeenCalledWith(jasmine.objectContaining({
                    name: 'foo',
                    type: 'bar'
                }), jasmine.any(Object), env.root, undefined);
            });
            it('should allow to log a custom event with a related query result', function () {
                var fakeResult = Fake_1.FakeResults.createFakeResult();
                RegisteredNamedMethod.logCustomEvent(env.root, { name: 'foo', type: 'bar' }, {}, fakeResult);
                expect(analytics['client'].logCustomEvent).toHaveBeenCalledWith(jasmine.objectContaining({
                    name: 'foo',
                    type: 'bar'
                }), jasmine.any(Object), env.root, fakeResult);
            });
            it('should allow to log a search as you type event', function () {
                RegisteredNamedMethod.logSearchAsYouTypeEvent(env.root, { name: 'foo', type: 'bar' }, {});
                expect(analytics['client'].logSearchAsYouType).toHaveBeenCalledWith(jasmine.objectContaining({
                    name: 'foo',
                    type: 'bar'
                }), jasmine.any(Object));
            });
            it('should allow to log a click event', function () {
                var fakeResult = Fake_1.FakeResults.createFakeResult();
                RegisteredNamedMethod.logClickEvent(env.root, { name: 'foo', type: 'bar' }, {}, fakeResult);
                expect(analytics['client'].logClickEvent).toHaveBeenCalledWith(jasmine.objectContaining({
                    name: 'foo',
                    type: 'bar'
                }), jasmine.any(Object), fakeResult, env.root);
            });
        });
        describe('with mock analytics', function () {
            var setup;
            beforeEach(function () {
                setup = MockEnvironment_1.advancedComponentSetup(Analytics_1.Analytics, new MockEnvironment_1.AdvancedComponentSetupOptions(null, null, function (env) {
                    env.searchInterface.options.endpoint = new SearchEndpoint_1.SearchEndpoint({
                        accessToken: 'another token',
                        queryStringArguments: { organizationId: 'another organization' },
                        restUri: 'another/uri'
                    });
                    env.queryController.disableHistory();
                    return env;
                }));
            });
            afterEach(function () {
                SearchEndpoint_1.SearchEndpoint.endpoints['default'] = null;
                setup = null;
            });
            it('should not be noop by default', function () {
                expect(setup.cmp.client instanceof NoopAnalyticsClient_1.NoopAnalyticsClient).not.toBeTruthy();
            });
            it('should become noop and update the search interface analytics client after being disabled', function () {
                expect(setup.cmp.client instanceof NoopAnalyticsClient_1.NoopAnalyticsClient).not.toBeTruthy();
                RegisteredNamedMethod.disableAnalytics(setup.env.root);
                expect(setup.cmp.client instanceof NoopAnalyticsClient_1.NoopAnalyticsClient).toBeTruthy();
                expect(setup.cmp.client).toBe(setup.env.searchInterface.usageAnalytics);
            });
            it('should not be noop and should update the search interface analytics client after being re-enabled', function () {
                expect(setup.cmp.client instanceof NoopAnalyticsClient_1.NoopAnalyticsClient).not.toBeTruthy();
                RegisteredNamedMethod.disableAnalytics(setup.env.root);
                expect(setup.cmp.client instanceof NoopAnalyticsClient_1.NoopAnalyticsClient).toBeTruthy();
                RegisteredNamedMethod.enableAnalytics(setup.env.root);
                expect(setup.cmp.client instanceof NoopAnalyticsClient_1.NoopAnalyticsClient).not.toBeTruthy();
                expect(setup.cmp.client).toBe(setup.env.searchInterface.usageAnalytics);
            });
            it('should cancel pending events when disabling analytics', function () {
                var cancelAllPendingEventsSpy = spyOn(setup.cmp.client, 'cancelAllPendingEvents');
                RegisteredNamedMethod.disableAnalytics(setup.env.root);
                expect(cancelAllPendingEventsSpy).toHaveBeenCalled();
            });
            it('should clear actions history when disabling analytics', function () {
                RegisteredNamedMethod.disableAnalytics(setup.env.root);
                expect(setup.env.queryController.resetHistory).toHaveBeenCalled();
            });
            it('should call clear local data on analytics when disabling analytics', function () {
                var clearLocalDataSpy = (setup.cmp['clearLocalData'] = jasmine.createSpy('clearLocalData'));
                RegisteredNamedMethod.disableAnalytics(setup.env.root);
                expect(clearLocalDataSpy).toHaveBeenCalled();
            });
            it('should clear actions history when clearing local data', function () {
                RegisteredNamedMethod.clearLocalData(setup.env.root);
                expect(setup.env.queryController.resetHistory).toHaveBeenCalled();
            });
            it('should call clear local data on analytics when clearing local data', function () {
                var clearLocalDataSpy = (setup.cmp['clearLocalData'] = jasmine.createSpy('clearLocalData'));
                RegisteredNamedMethod.clearLocalData(setup.env.root);
                expect(clearLocalDataSpy).toHaveBeenCalled();
            });
            describe('with an Analytics component and a Searchbox component', function () {
                var searchboxComponent;
                var analyticsSubmitCall;
                beforeEach(function () {
                    var analytics = Dom_1.$$('div', {
                        className: 'CoveoAnalytics'
                    }).el;
                    root.appendChild(analytics);
                    RegisteredNamedMethod.init(root, {
                        Searchbox: { addSearchButton: false },
                        SearchInterface: {
                            autoTriggerQuery: false,
                            endpoint: new SearchEndpoint_1.SearchEndpoint({
                                accessToken: 'another token',
                                queryStringArguments: { organizationId: 'another organization' },
                                restUri: 'another/uri'
                            })
                        }
                    });
                    searchboxComponent = Component_1.Component.get(searchbox);
                    analyticsSubmitCall = spyOn(SharedAnalyticsCalls, 'logSearchBoxSubmitEvent').and.callThrough();
                });
                it('when analytics is enabled, "submit" calls an activated client', function () {
                    searchboxComponent.searchbox.submit();
                    var liveAnalyticsClient = analyticsSubmitCall.calls.mostRecent().args[0];
                    expect(liveAnalyticsClient.isActivated()).toBe(true);
                });
                it('when analytics is disabled, "submit" calls an unactivated client', function () {
                    RegisteredNamedMethod.disableAnalytics(root);
                    searchboxComponent.searchbox.submit();
                    var noopAnalyticsClient = analyticsSubmitCall.calls.mostRecent().args[0];
                    expect(noopAnalyticsClient.isActivated()).toBe(false);
                });
                it('when analytics is re-enabled, "submit" calls an activated client', function () {
                    RegisteredNamedMethod.disableAnalytics(root);
                    RegisteredNamedMethod.enableAnalytics(root);
                    searchboxComponent.searchbox.submit();
                    var liveAnalyticsClient = analyticsSubmitCall.calls.mostRecent().args[0];
                    expect(liveAnalyticsClient.isActivated()).toBe(true);
                });
            });
        });
    });
}
exports.RegisteredNamedMethodsTest = RegisteredNamedMethodsTest;
 
 
/***/ }),
/* 1677 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var FacetValuesOrder_1 = __webpack_require__(237);
var Facet_1 = __webpack_require__(32);
var FacetSort_1 = __webpack_require__(333);
var Mock = __webpack_require__(2);
var FacetValue_1 = __webpack_require__(51);
var _ = __webpack_require__(1);
function FacetValuesOrderTest() {
    describe('FacetValuesOrder', function () {
        var test;
        var mockFacet;
        var mockFacetSort;
        var expectEqualOrder = function (ordered, expecteds) {
            _.each(expecteds, function (expected, i) {
                expect(ordered[i]).toEqual(jasmine.objectContaining({ value: expected }));
            });
        };
        beforeEach(function () {
            mockFacet = Mock.mock(Facet_1.Facet);
            mockFacet.options = {};
            mockFacetSort = Mock.mock(FacetSort_1.FacetSort);
            mockFacetSort.activeSort = {};
            test = new FacetValuesOrder_1.FacetValuesOrder(mockFacet, mockFacetSort);
        });
        afterEach(function () {
            test = null;
            mockFacet = null;
            mockFacetSort = null;
        });
        it('should allow to sort facet values correctly with custom sort', function () {
            mockFacetSort.activeSort.name = 'custom';
            mockFacetSort.customSortDirection = 'ascending';
            mockFacet.options.customSort = ['c', 'a', 'b'];
            var original = ['a', 'b', 'c'].map(FacetValue_1.FacetValue.create);
            var reordered = test.reorderValues(original);
            expectEqualOrder(reordered, ['c', 'a', 'b']);
            mockFacetSort.customSortDirection = 'descending';
            reordered = test.reorderValues(original);
            expectEqualOrder(reordered, ['b', 'a', 'c']);
        });
        it('should allow to sort facet values correctly with alpha sort and a value caption', function () {
            mockFacetSort.activeSort.name = 'alphaascending';
            mockFacet.options.valueCaption = {
                a: 'z',
                c: 'w'
            };
            mockFacet.getValueCaption = function (facetValue) {
                return mockFacet.options.valueCaption[facetValue.value] || facetValue.value;
            };
            var original = ['a', 'b', 'c'].map(FacetValue_1.FacetValue.create);
            var reordered = test.reorderValues(original);
            expectEqualOrder(reordered, ['b', 'c', 'a']);
            mockFacetSort.activeSort.name = 'alphadescending';
            reordered = test.reorderValues(original);
            expectEqualOrder(reordered, ['a', 'c', 'b']);
        });
        it('should allow to sort facet values correctly with alpha sort using locale compare', function () {
            var originalLocale = String['locale'];
            String['locale'] = 'fr';
            mockFacetSort.activeSort.name = 'alphaascending';
            mockFacet.options.valueCaption = {
                one: 'e',
                two: 'z',
                three: 'é'
            };
            mockFacet.getValueCaption = function (facetValue) {
                return mockFacet.options.valueCaption[facetValue.value] || facetValue.value;
            };
            var original = ['one', 'two', 'three'].map(FacetValue_1.FacetValue.create);
            var reordered = test.reorderValues(original);
            expectEqualOrder(reordered, ['one', 'three', 'two']);
            mockFacetSort.activeSort.name = 'alphadescending';
            reordered = test.reorderValues(original);
            expectEqualOrder(reordered, ['two', 'three', 'one']);
            String['locale'] = originalLocale;
        });
        it("when the activeSort name is 'custom' and the customSort facet option is defined,\n    reorderValuesIfUsingCustomSort changes the order", function () {
            mockFacetSort.activeSort.name = 'custom';
            mockFacetSort.customSortDirection = 'ascending';
            mockFacet.options.customSort = ['b'];
            var original = ['a', 'b'].map(FacetValue_1.FacetValue.create);
            var reordered = test.reorderValuesIfUsingCustomSort(original);
            expectEqualOrder(reordered, ['b', 'a']);
        });
        it("when the activeSort name is 'custom' and the customSort facet option is undefined,\n    reorderValuesIfUsingCustomSort does not change the order", function () {
            mockFacetSort.activeSort.name = 'custom';
            var original = ['a', 'b'];
            var values = original.map(FacetValue_1.FacetValue.create);
            var reordered = test.reorderValuesIfUsingCustomSort(values);
            expectEqualOrder(reordered, original);
        });
        it("when the activeSort name is not 'custom' and the customSort facet option is defined,\n    reorderValuesIfUsingCustomSort does not change the order", function () {
            mockFacetSort.activeSort.name = 'occurences';
            mockFacet.options.customSort = ['b'];
            var original = ['a', 'b'];
            var values = original.map(FacetValue_1.FacetValue.create);
            var reordered = test.reorderValuesIfUsingCustomSort(values);
            expectEqualOrder(reordered, original);
        });
        it("when the activeSort name contains 'alpha',\n    reorderValuesIfUsingAlphabeticalSort changes the order", function () {
            mockFacetSort.activeSort.name = 'alphaascending';
            mockFacet.getValueCaption = function (fv) { return fv.value; };
            var original = ['b', 'a'];
            var values = original.map(FacetValue_1.FacetValue.create);
            var reordered = test.reorderValuesIfUsingAlphabeticalSort(values);
            expectEqualOrder(reordered, ['a', 'b']);
        });
        it("when the activeSort name does not contain 'alpha',\n    reorderValuesIfUsingAlphabeticalSort does not change the order", function () {
            mockFacetSort.activeSort.name = 'ascending';
            var original = ['b', 'a'];
            var values = original.map(FacetValue_1.FacetValue.create);
            var reordered = test.reorderValuesIfUsingAlphabeticalSort(values);
            expectEqualOrder(reordered, original);
        });
    });
}
exports.FacetValuesOrderTest = FacetValuesOrderTest;
 
 
/***/ }),
/* 1678 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Debug_1 = __webpack_require__(219);
var Dom_1 = __webpack_require__(0);
var Mock = __webpack_require__(2);
function DebugTest() {
    describe('Debug', function () {
        var test;
        beforeEach(function () {
            test = Mock.basicComponentSetupWithModalBox(Debug_1.Debug);
        });
        afterEach(function () {
            test = null;
        });
        it('should allow to open the debug panel after a delay', function (done) {
            test.cmp.showDebugPanel();
            setTimeout(function () {
                expect(test.modalBox.open).toHaveBeenCalled();
                done();
            }, 200);
        });
        it('should open the debug panel after a delay in the Interface root', function (done) {
            test.cmp.bindings.root = Dom_1.$$('div').el;
            test.cmp.showDebugPanel();
            setTimeout(function () {
                expect(test.modalBox.open).toHaveBeenCalledWith(jasmine.any(Object), jasmine.objectContaining({ body: test.cmp.bindings.root }));
                done();
            }, 200);
        });
        it('should allow to add additional info of content HTML and they should render correctly', function (done) {
            var headerDiv = Dom_1.$$('div', { className: 'some-header' }, 'the content of the header').el;
            test.cmp.addInfoToDebugPanel({
                Header: headerDiv
            });
            test.cmp.showDebugPanel();
            setTimeout(function () {
                var modalOpened = test.modalBox.open.calls.argsFor(0)[0];
                expect(Dom_1.$$(modalOpened).find('.some-header')).not.toBeNull();
                expect(Dom_1.$$(Dom_1.$$(modalOpened).find('.some-header')).text()).toBe('the content of the header');
                done();
            }, 200);
        });
        it('should allow to add additional info of as a function and they should render correctly', function (done) {
            var func = jasmine.createSpy('func');
            func.and.returnValue(Dom_1.$$('div', {
                className: 'my-function'
            }, 'my-function-content').el);
            test.cmp.addInfoToDebugPanel({
                HeaderFunc: func
            });
            test.cmp.showDebugPanel();
            setTimeout(function () {
                var modalOpened = test.modalBox.open.calls.argsFor(0)[0];
                expect(Dom_1.$$(modalOpened).find('.my-function')).not.toBeNull();
                expect(Dom_1.$$(Dom_1.$$(modalOpened).find('.my-function')).text()).toBe('my-function-content');
                expect(func).toHaveBeenCalled();
                done();
            }, 200);
        });
        it('shoud allow to add additional info as a JSON and it should render correctly', function (done) {
            test.cmp.addInfoToDebugPanel({
                HeaderJSON: {
                    foo: 'bar',
                    sup: 'hello',
                    baz: {
                        buzz: 'bizz'
                    },
                    date: new Date(),
                    number: 1,
                    boolean: true,
                    nothing: null
                }
            });
            test.cmp.showDebugPanel();
            setTimeout(function () {
                var modalOpened = test.modalBox.open.calls.argsFor(0)[0];
                expect(Dom_1.$$(modalOpened).find('.coveo-property-object')).not.toBeNull();
                expect(Dom_1.$$(modalOpened).find('.coveo-property-basic')).not.toBeNull();
                expect(Dom_1.$$(modalOpened).find('.coveo-property-value-boolean')).not.toBeNull();
                expect(Dom_1.$$(modalOpened).find('.coveo-property-value-date')).not.toBeNull();
                expect(Dom_1.$$(modalOpened).find('.coveo-property-value-string')).not.toBeNull();
                expect(Dom_1.$$(modalOpened).find('.coveo-property-value-number')).not.toBeNull();
                expect(Dom_1.$$(modalOpened).find('.coveo-property-value-null')).not.toBeNull();
                done();
            }, 200);
        });
        it('should allow to search', function () {
            var headerDiv = Dom_1.$$('div', { className: 'some-header' }, 'the content of the header').el;
            test.cmp.addInfoToDebugPanel({
                Header: headerDiv
            });
            test.cmp.showDebugPanel();
        });
    });
}
exports.DebugTest = DebugTest;
 
 
/***/ }),
/* 1679 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var StreamHighlightUtils_1 = __webpack_require__(139);
function StreamHighlightUtilsTest() {
    describe('StreamHighlightUtils', function () {
        function getHighlightResultForTerm(term, group, groupTerm, cssClass) {
            if (cssClass === void 0) { cssClass = 'coveo-highlight'; }
            return "<span class=\"" + cssClass + "\" data-highlight-group=\"" + group + "\" data-highlight-group-term=\"" + groupTerm + "\">" + term + "</span>";
        }
        function getHighlightResultForTermEscaped(term, group, groupTerm, cssClass) {
            Eif (cssClass === void 0) { cssClass = 'coveo-highlight'; }
            return "<span class=\"" + cssClass + "\" data-highlight-group=\"" + group + "\" data-highlight-group-term=\"" + groupTerm + "\">" + term + "</span>";
        }
        it('should work with basics', function () {
            var toHighlight = 'a b';
            var terms = { a: [], b: [] };
            expect(StreamHighlightUtils_1.StreamHighlightUtils.highlightStreamText(toHighlight, terms, {})).toEqual(getHighlightResultForTerm('a', 1, 'a') + " " + getHighlightResultForTerm('b', 2, 'b'));
        });
        it('should allow to highlight html', function () {
            var toHighlight = '<div>a b</div>';
            var terms = { a: [], b: [] };
            expect(StreamHighlightUtils_1.StreamHighlightUtils.highlightStreamHTML(toHighlight, terms, {})).toEqual("<div>" + getHighlightResultForTerm('a', 1, 'a') + " " + getHighlightResultForTerm('b', 2, 'b') + "</div>");
        });
        it('should allow to highlight html even if there is no html', function () {
            var toHighlight = 'a b';
            var terms = { a: [], b: [] };
            expect(StreamHighlightUtils_1.StreamHighlightUtils.highlightStreamHTML(toHighlight, terms, {})).toEqual(getHighlightResultForTerm('a', 1, 'a') + " " + getHighlightResultForTerm('b', 2, 'b'));
        });
        it('should work with special char', function () {
            var toHighlight = ';a;';
            var terms = { a: [], b: [] };
            expect(StreamHighlightUtils_1.StreamHighlightUtils.highlightStreamText(toHighlight, terms, {})).toEqual(";" + getHighlightResultForTerm('a', 1, 'a') + ";");
            toHighlight = '___a__';
            terms = { a: [], b: [] };
            expect(StreamHighlightUtils_1.StreamHighlightUtils.highlightStreamText(toHighlight, terms, {})).toEqual("___" + getHighlightResultForTerm('a', 1, 'a') + "__");
        });
        it('should work globally in the string', function () {
            var toHighlight = 'hahaha a a a';
            var terms = { a: [], b: [] };
            expect(StreamHighlightUtils_1.StreamHighlightUtils.highlightStreamText(toHighlight, terms, {})).toEqual("hahaha " + getHighlightResultForTerm('a', 1, 'a') + " " + (getHighlightResultForTerm('a', 1, 'a') +
                ' ' +
                getHighlightResultForTerm('a', 1, 'a')));
        });
        it('should works correctly when terms are similar (eg: plurals)', function () {
            var toHighlight = 'tree trees';
            var terms = { tree: ['trees'] };
            expect(StreamHighlightUtils_1.StreamHighlightUtils.highlightStreamText(toHighlight, terms, {})).toEqual(getHighlightResultForTerm('tree', 1, 'tree') + " " + getHighlightResultForTerm('trees', 1, 'tree'));
            toHighlight = 'tree trees tree trees_ ;tree; .trees';
            terms = { tree: ['trees'] };
            var singular = getHighlightResultForTerm('tree', 1, 'tree');
            var plural = getHighlightResultForTerm('trees', 1, 'tree');
            expect(StreamHighlightUtils_1.StreamHighlightUtils.highlightStreamText(toHighlight, terms, {})).toEqual(singular + " " + plural + " " + singular + " " + plural + "_ ;" + singular + "; ." + plural);
            toHighlight = 'this is my friend';
            var terms2 = { friends: [] };
            expect(StreamHighlightUtils_1.StreamHighlightUtils.highlightStreamText(toHighlight, terms2, {})).toEqual('this is my friend');
        });
        it('should be case insensitive by default', function () {
            var toHighlight = 'this is my FRIEND';
            var terms = { friend: [] };
            expect(StreamHighlightUtils_1.StreamHighlightUtils.highlightStreamText(toHighlight, terms, {})).toEqual("this is my " + getHighlightResultForTerm('FRIEND', 1, 'friend'));
            toHighlight = 'this is my FRIEND friend Friend';
            terms = { friend: [] };
            expect(StreamHighlightUtils_1.StreamHighlightUtils.highlightStreamText(toHighlight, terms, {})).toEqual("this is my " + getHighlightResultForTerm('FRIEND', 1, 'friend') + " " + getHighlightResultForTerm('friend', 1, 'friend') + " " + getHighlightResultForTerm('Friend', 1, 'friend'));
        });
        it('should allow to choose the highlight css class with an option', function () {
            var toHighlight = 'this is my friend';
            var terms = { friend: [] };
            expect(StreamHighlightUtils_1.StreamHighlightUtils.highlightStreamText(toHighlight, terms, undefined, { cssClass: 'hello-world' })).toEqual("this is my " + getHighlightResultForTerm('friend', 1, 'friend', 'hello-world'));
        });
        it('should allow to change the regex flags', function () {
            var toHighlight = 'this is my Friend';
            var terms = { friend: [] };
            expect(StreamHighlightUtils_1.StreamHighlightUtils.highlightStreamText(toHighlight, terms, undefined, { regexFlags: '' })).toEqual("this is my Friend");
            toHighlight = 'this is my Friend friend Friend';
            terms = { friend: [] };
            expect(StreamHighlightUtils_1.StreamHighlightUtils.highlightStreamText(toHighlight, terms, undefined, { regexFlags: 'i' })).toEqual("this is my " + getHighlightResultForTerm('Friend', 1, 'friend') + " friend Friend");
        });
        it('should work with html basics', function () {
            var toHighlight = '<div>a b</div>';
            var terms = { a: [], b: [] };
            expect(StreamHighlightUtils_1.StreamHighlightUtils.highlightStreamHTML(toHighlight, terms, undefined)).toEqual("<div>" + getHighlightResultForTermEscaped('a', 1, 'a') + " " + getHighlightResultForTermEscaped('b', 2, 'b') + "</div>");
        });
        it('should work with html and special char', function () {
            var toHighlight = '<div>;a;</div>';
            var terms = { a: [], b: [] };
            expect(StreamHighlightUtils_1.StreamHighlightUtils.highlightStreamHTML(toHighlight, terms, undefined)).toEqual("<div>;" + getHighlightResultForTermEscaped('a', 1, 'a') + ";</div>");
            toHighlight = '<div>___a__</div>';
            terms = { a: [], b: [] };
            expect(StreamHighlightUtils_1.StreamHighlightUtils.highlightStreamHTML(toHighlight, terms, undefined)).toEqual("<div>___" + getHighlightResultForTermEscaped('a', 1, 'a') + "__</div>");
        });
        it('should highlight html globally in the string', function () {
            var toHighlight = '<div>hahaha</div> <div>a</div> <div>a</div> <div>a</div>';
            var terms = { a: [], b: [] };
            expect(StreamHighlightUtils_1.StreamHighlightUtils.highlightStreamHTML(toHighlight, terms, undefined)).toEqual("<div>hahaha</div> <div>" + getHighlightResultForTermEscaped('a', 1, 'a') + "</div> <div>" + getHighlightResultForTermEscaped('a', 1, 'a') + "</div> <div>" + getHighlightResultForTermEscaped('a', 1, 'a') + "</div>");
        });
        it('should work with html when terms are similar (eg: plurals)', function () {
            var toHighlight = '<div>tree trees</div>';
            var terms = { tree: ['trees'] };
            expect(StreamHighlightUtils_1.StreamHighlightUtils.highlightStreamHTML(toHighlight, terms, undefined)).toEqual("<div>" + getHighlightResultForTermEscaped('tree', 1, 'tree') + " " + getHighlightResultForTermEscaped('trees', 1, 'tree') + "</div>");
            toHighlight = '<div><div>tree trees tree</div> trees_ ;tree;<span> .trees</span></div>';
            terms = { tree: ['trees'] };
            expect(StreamHighlightUtils_1.StreamHighlightUtils.highlightStreamHTML(toHighlight, terms, undefined)).toEqual("<div>" + getHighlightResultForTermEscaped('tree', 1, 'tree') + " " + getHighlightResultForTermEscaped('trees', 1, 'tree') + " " + getHighlightResultForTermEscaped('tree', 1, 'tree') + " " + getHighlightResultForTermEscaped('trees', 1, 'tree') + "_ ;" + getHighlightResultForTermEscaped('tree', 1, 'tree') + "; ." + getHighlightResultForTermEscaped('trees', 1, 'tree') + "</div>");
            toHighlight = '<div>this is my friend</div>';
            var terms2 = { friends: [] };
            expect(StreamHighlightUtils_1.StreamHighlightUtils.highlightStreamHTML(toHighlight, terms2, undefined)).toEqual("<div>this is my friend</div>");
        });
        it('should work with multiple terms with multiple expansions', function () {
            var toHighlight = 'tree trees treetop';
            var terms = { tree: ['trees', 'treetop'] };
            expect(StreamHighlightUtils_1.StreamHighlightUtils.highlightStreamText(toHighlight, terms, undefined)).toEqual(getHighlightResultForTerm('tree', 1, 'tree') + " " + getHighlightResultForTerm('trees', 1, 'tree') + " " + getHighlightResultForTerm('treetop', 1, 'tree'));
        });
        it('should work with terms and phrases', function () {
            var toHighlight = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit';
            var terms = { lorem: [] };
            var phrases = {
                'ipsum dolor sit amet': {
                    ipsum: [],
                    dolor: [],
                    sit: [],
                    amet: []
                }
            };
            expect(StreamHighlightUtils_1.StreamHighlightUtils.highlightStreamText(toHighlight, terms, phrases)).toEqual(getHighlightResultForTerm('Lorem', 1, 'lorem') + " " + getHighlightResultForTerm('ipsum dolor sit amet', 2, 'ipsum dolor sit amet') + ", consectetur adipiscing elit");
        });
        it('should work with number and point', function () {
            var phrases = { '9 1 1': { '9': [], '1': [] } };
            var toHighlight = 'Lorem ipsum 9.1.1 dolor sit amet';
            var terms = { lorem: [] };
            expect(StreamHighlightUtils_1.StreamHighlightUtils.highlightStreamText(toHighlight, terms, phrases)).toEqual(getHighlightResultForTerm('Lorem', 1, 'lorem') + " ipsum " + getHighlightResultForTerm('9.1.1', 2, '9 1 1') + " dolor sit amet");
            toHighlight = 'abc.qwerty';
            terms = { abc: [], qwerty: [], b: [] };
            expect(StreamHighlightUtils_1.StreamHighlightUtils.highlightStreamText(toHighlight, terms, {})).toEqual(getHighlightResultForTerm('abc', 1, 'abc') + "." + getHighlightResultForTerm('qwerty', 2, 'qwerty'));
            toHighlight = 'abc. qwerty';
            terms = { abc: [], qwerty: [], b: [] };
            expect(StreamHighlightUtils_1.StreamHighlightUtils.highlightStreamText(toHighlight, terms, {})).toEqual(getHighlightResultForTerm('abc', 1, 'abc') + ". " + getHighlightResultForTerm('qwerty', 2, 'qwerty'));
        });
        it('should work with regex sensitive character', function () {
            var toHighlight = 'Lorem ipsum 9.1.1 dolor *amet*';
            var terms = { '*amet*': [] };
            var phrases = {};
            expect(StreamHighlightUtils_1.StreamHighlightUtils.highlightStreamText(toHighlight, terms, phrases)).toEqual("Lorem ipsum 9.1.1 dolor " + getHighlightResultForTerm('*amet*', 1, '*amet*'));
        });
        it('should work with number and dash', function () {
            var phrases = { '9 1 1': { '9': [], '1': [] } };
            var toHighlight = 'Lorem ipsum 9-1-1 dolor sit amet';
            var terms = { lorem: [] };
            expect(StreamHighlightUtils_1.StreamHighlightUtils.highlightStreamText(toHighlight, terms, phrases)).toEqual(getHighlightResultForTerm('Lorem', 1, 'lorem') + " ipsum " + getHighlightResultForTerm('9-1-1', 2, '9 1 1') + " dolor sit amet");
            toHighlight = 'abc-qwerty';
            terms = { abc: [], qwerty: [], b: [] };
            expect(StreamHighlightUtils_1.StreamHighlightUtils.highlightStreamText(toHighlight, terms, {})).toEqual(getHighlightResultForTerm('abc', 1, 'abc') + "-" + getHighlightResultForTerm('qwerty', 2, 'qwerty'));
            toHighlight = 'abc- qwerty';
            terms = { abc: [], qwerty: [], b: [] };
            expect(StreamHighlightUtils_1.StreamHighlightUtils.highlightStreamText(toHighlight, terms, {})).toEqual(getHighlightResultForTerm('abc', 1, 'abc') + "- " + getHighlightResultForTerm('qwerty', 2, 'qwerty'));
            toHighlight = 'abc- qwerty. qwerty';
            terms = { abc: [], qwerty: [], b: [] };
            expect(StreamHighlightUtils_1.StreamHighlightUtils.highlightStreamText(toHighlight, terms, {})).toEqual(getHighlightResultForTerm('abc', 1, 'abc') + "- " + getHighlightResultForTerm('qwerty', 2, 'qwerty') + ". " + getHighlightResultForTerm('qwerty', 2, 'qwerty'));
            toHighlight = 'abc- qwerty- qwerty';
            terms = { abc: [], qwerty: [], b: [] };
            expect(StreamHighlightUtils_1.StreamHighlightUtils.highlightStreamText(toHighlight, terms, {})).toEqual(getHighlightResultForTerm('abc', 1, 'abc') + "- " + getHighlightResultForTerm('qwerty', 2, 'qwerty') + "- " + getHighlightResultForTerm('qwerty', 2, 'qwerty'));
        });
        it('should work with parenthesis', function () {
            var toHighlight = 'Lorem (ipsum 9-1-1 dolor sit amet';
            var phrases = {
                'lorem ipsum': {
                    lorem: [],
                    ipsum: []
                }
            };
            expect(StreamHighlightUtils_1.StreamHighlightUtils.highlightStreamText(toHighlight, {}, phrases)).toEqual(getHighlightResultForTerm('Lorem (ipsum', 1, 'lorem ipsum') + " 9-1-1 dolor sit amet");
        });
        it('should work with :', function () {
            var toHighlight = 'Lorem :ipsum 9-1-1 dolor sit amet';
            var phrases = {
                'lorem ipsum': {
                    lorem: [],
                    ipsum: []
                }
            };
            expect(StreamHighlightUtils_1.StreamHighlightUtils.highlightStreamText(toHighlight, {}, phrases)).toEqual(getHighlightResultForTerm('Lorem :ipsum', 1, 'lorem ipsum') + " 9-1-1 dolor sit amet");
        });
        it('should work with ~', function () {
            var phrases = {
                'lorem ipsum': {
                    lorem: [],
                    ipsum: []
                }
            };
            var toHighlight = 'Lorem ~ipsum 9-1-1 dolor sit amet';
            expect(StreamHighlightUtils_1.StreamHighlightUtils.highlightStreamText(toHighlight, {}, phrases)).toEqual(getHighlightResultForTerm('Lorem ~ipsum', 1, 'lorem ipsum') + " 9-1-1 dolor sit amet");
            toHighlight = 'Lorem~ipsum 9-1-1 dolor sit amet';
            expect(StreamHighlightUtils_1.StreamHighlightUtils.highlightStreamText(toHighlight, {}, phrases)).toEqual(getHighlightResultForTerm('Lorem~ipsum', 1, 'lorem ipsum') + " 9-1-1 dolor sit amet");
        });
        it('should work with `', function () {
            var toHighlight = 'Lorem `ipsum 9-1-1 dolor sit amet';
            var phrases = {
                'lorem ipsum': {
                    lorem: [],
                    ipsum: []
                }
            };
            expect(StreamHighlightUtils_1.StreamHighlightUtils.highlightStreamText(toHighlight, {}, phrases)).toEqual(getHighlightResultForTerm('Lorem &#x60;ipsum', 1, 'lorem ipsum') + " 9-1-1 dolor sit amet");
        });
        it('should work with ?', function () {
            var toHighlight = 'Lorem ipsum 9-1-1 dolor sit amet?';
            var phrases = {
                'sit amet': {
                    sit: [],
                    amet: []
                }
            };
            expect(StreamHighlightUtils_1.StreamHighlightUtils.highlightStreamText(toHighlight, {}, phrases)).toEqual("Lorem ipsum 9-1-1 dolor " + getHighlightResultForTerm('sit amet', 1, 'sit amet') + "?");
        });
        it('should work with !', function () {
            var toHighlight = 'Lorem ipsum 9-1-1 dolor sit amet!';
            var phrases = {
                'sit amet': {
                    sit: [],
                    amet: []
                }
            };
            expect(StreamHighlightUtils_1.StreamHighlightUtils.highlightStreamText(toHighlight, {}, phrases)).toEqual("Lorem ipsum 9-1-1 dolor " + getHighlightResultForTerm('sit amet', 1, 'sit amet') + "!");
        });
        it('should work with &', function () {
            var toHighlight = 'Lorem ipsum 9-1-1 dolor sit&amet';
            var phrases = {
                'sit amet': {
                    sit: [],
                    amet: []
                }
            };
            expect(StreamHighlightUtils_1.StreamHighlightUtils.highlightStreamText(toHighlight, {}, phrases)).toEqual("Lorem ipsum 9-1-1 dolor " + getHighlightResultForTerm('sit&amp;amet', 1, 'sit amet'));
        });
        it('should work with +', function () {
            var toHighlight = 'Lorem ipsum 9-1-1 dolor sit+amet';
            var phrases = {
                'sit amet': {
                    sit: [],
                    amet: []
                }
            };
            expect(StreamHighlightUtils_1.StreamHighlightUtils.highlightStreamText(toHighlight, {}, phrases)).toEqual("Lorem ipsum 9-1-1 dolor " + getHighlightResultForTerm('sit+amet', 1, 'sit amet'));
        });
    });
}
exports.StreamHighlightUtilsTest = StreamHighlightUtilsTest;
 
 
/***/ }),
/* 1680 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Mock = __webpack_require__(2);
var Fake_1 = __webpack_require__(11);
var Backdrop_1 = __webpack_require__(666);
var Dom_1 = __webpack_require__(0);
var Simulate_1 = __webpack_require__(15);
function BackdropTest() {
    describe('Backdrop', function () {
        var test;
        var fakeResult;
        beforeEach(function () {
            fakeResult = Fake_1.FakeResults.createFakeResult();
            fakeResult.raw.thumbnailurl = 'http://lorempixel.com/200/200';
            test = Mock.optionsResultComponentSetup(Backdrop_1.Backdrop, {
                imageField: 'thumbnailurl'
            }, fakeResult);
        });
        afterEach(function () {
            test = null;
            fakeResult = null;
        });
        describe('exposes options', function () {
            it('imageField sets the background image url accordingly', function () {
                var fakeResult = Fake_1.FakeResults.createFakeResult();
                fakeResult.raw.clubpenguinthumbnailurl = 'https://epicurl/';
                test = Mock.optionsResultComponentSetup(Backdrop_1.Backdrop, {
                    imageField: 'clubpenguinthumbnailurl'
                }, fakeResult);
                expect(test.cmp.element.style.background).toMatch(new RegExp("url\\((\"|')?" + fakeResult.raw.clubpenguinthumbnailurl + "(\"|')?\\)"));
            });
            it('imageUrl sets the background image url accordingly', function () {
                test = Mock.optionsResultComponentSetup(Backdrop_1.Backdrop, {
                    imageUrl: 'https://foo.com/bar.png'
                }, fakeResult);
                expect(test.cmp.element.style.background).toMatch(new RegExp("url\\((\"|')?https://foo.com/bar.png(\"|')?\\)"));
            });
            it('imageUrl overrides imageField', function () {
                var fakeResult = Fake_1.FakeResults.createFakeResult();
                fakeResult.raw.clubpenguinthumbnailurl = 'https://epicurl/';
                test = Mock.optionsResultComponentSetup(Backdrop_1.Backdrop, {
                    imageField: 'clubpenguinthumbnailurl',
                    imageUrl: 'https://foo.com/baz.png'
                }, fakeResult);
                expect(test.cmp.element.style.background).toMatch(new RegExp("url\\((\"|')?https://foo.com/baz.png(\"|')?\\)"));
            });
            it('overlayColor should add an overlay color before image', function () {
                test = Mock.optionsResultComponentSetup(Backdrop_1.Backdrop, {
                    imageField: 'thumbnailurl',
                    overlayColor: 'rgba(1, 2, 3, 0.6)'
                }, fakeResult);
                expect(test.cmp.element.style.background).toContain('rgba(1, 2, 3, 0.6)');
            });
            it('overlayGradient sets the second value of the gradient to rgba(0,0,0,0)', function () {
                test = Mock.optionsResultComponentSetup(Backdrop_1.Backdrop, {
                    imageField: 'thumbnailurl',
                    overlayColor: 'rgba(1, 2, 3, 0.8)',
                    overlayGradient: true
                }, Fake_1.FakeResults.createFakeResult());
                expect(test.cmp.element.style.background).toContain('linear-gradient(rgba(1, 2, 3, 0.8), rgba(0, 0, 0, 0))');
            });
        });
        describe('for a youtube result', function () {
            var fakeModalBox;
            beforeEach(function () {
                fakeResult.raw['ytthumbnailurl'] = 'someurl';
                fakeModalBox = Simulate_1.Simulate.modalBoxModule();
                test.cmp = new Backdrop_1.Backdrop(test.env.root, { imageField: 'thumbnailurl' }, test.cmp.getBindings(), fakeResult, null, fakeModalBox);
            });
            it('should open the youtubethumbnail in a modalbox', function () {
                Dom_1.$$(test.cmp.element).trigger('click');
                expect(fakeModalBox.open).toHaveBeenCalled();
            });
            it('should have an aria-label', function () {
                expect(test.cmp.element.getAttribute('aria-label')).toEqual(fakeResult.title);
            });
            it('should have a tabindex', function () {
                expect(test.cmp.element.getAttribute('tabindex')).toEqual('0');
            });
            it('should have the button role', function () {
                expect(test.cmp.element.getAttribute('role')).toEqual('button');
            });
        });
    });
}
exports.BackdropTest = BackdropTest;
 
 
/***/ }),
/* 1681 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Mock = __webpack_require__(2);
var CardActionBar_1 = __webpack_require__(669);
var Dom_1 = __webpack_require__(0);
function CardActionBarTest() {
    describe('CardActionBar', function () {
        var test;
        var parentResult;
        beforeEach(function () {
            test = Mock.advancedComponentSetup(CardActionBar_1.CardActionBar, {
                modifyBuilder: function (b) {
                    parentResult = Dom_1.$$('div', { className: 'CoveoResult' }, Dom_1.$$('div')).el;
                    return b.withElement(parentResult.firstChild);
                }
            });
        });
        afterEach(function () { return (parentResult = null); });
        describe('exposes option', function () {
            describe('hidden set to true', function () {
                beforeEach(function () {
                    test = Mock.advancedComponentSetup(CardActionBar_1.CardActionBar, {
                        modifyBuilder: function (b) {
                            parentResult = Dom_1.$$('div', { className: 'CoveoResult' }, Dom_1.$$('div')).el;
                            return b.withElement(parentResult.firstChild);
                        },
                        cmpOptions: {
                            hidden: true
                        }
                    });
                });
                it('should show when parent result is clicked', function () {
                    spyOn(test.cmp, 'show');
                    Dom_1.$$(parentResult).trigger('click');
                    expect(test.cmp.show).toHaveBeenCalledTimes(1);
                });
                it('should hide when mouse leaves parent result', function () {
                    spyOn(test.cmp, 'hide');
                    Dom_1.$$(parentResult).trigger('mouseleave');
                    expect(test.cmp.hide).toHaveBeenCalledTimes(1);
                });
                it('should display an arrow indicator in its parent CoveoResult', function () {
                    expect(Dom_1.$$(parentResult).find('.coveo-card-action-bar-arrow-container')).not.toBeNull();
                });
                it('should show when action bar is focused in', function () {
                    spyOn(test.cmp, 'show');
                    Dom_1.$$(test.cmp.element).trigger('focusin');
                    expect(test.cmp.show).toHaveBeenCalledTimes(1);
                });
                it('should hide when action bar is focused out', function () {
                    spyOn(test.cmp, 'hide');
                    Dom_1.$$(test.cmp.element).trigger('focusout');
                    expect(test.cmp.hide).toHaveBeenCalledTimes(1);
                });
            });
            describe('hidden set to false', function () {
                beforeEach(function () {
                    test = Mock.advancedComponentSetup(CardActionBar_1.CardActionBar, {
                        modifyBuilder: function (b) {
                            parentResult = Dom_1.$$('div', { className: 'CoveoResult' }, Dom_1.$$('div')).el;
                            return b.withElement(parentResult.firstChild);
                        },
                        cmpOptions: {
                            hidden: false
                        }
                    });
                });
                it('should always be shown', function () {
                    spyOn(test.cmp, 'show');
                    Dom_1.$$(parentResult).trigger('click');
                    expect(test.cmp.show).not.toHaveBeenCalled();
                });
                it('should not display an arrow indicator in its parent CoveoResult', function () {
                    expect(Dom_1.$$(parentResult).find('.coveo-card-action-bar-arrow-container')).toBeNull();
                });
            });
            it('openOnMouseOver set to true should call open when mouseentering the arrow container', function () {
                test = Mock.advancedComponentSetup(CardActionBar_1.CardActionBar, {
                    modifyBuilder: function (b) {
                        parentResult = Dom_1.$$('div', { className: 'CoveoResult' }, Dom_1.$$('div')).el;
                        return b.withElement(parentResult.firstChild);
                    },
                    cmpOptions: {
                        openOnMouseOver: true
                    }
                });
                spyOn(test.cmp, 'show');
                var arrowContainer = Dom_1.$$(parentResult).find('.coveo-card-action-bar-arrow-container');
                Dom_1.$$(arrowContainer).trigger('mouseenter');
                expect(test.cmp.show).toHaveBeenCalledTimes(1);
            });
            it('openOnMouseOver set to false should not call open when mouseentering the arrow container', function () {
                test = Mock.advancedComponentSetup(CardActionBar_1.CardActionBar, {
                    modifyBuilder: function (b) {
                        parentResult = Dom_1.$$('div', { className: 'CoveoResult' }, Dom_1.$$('div')).el;
                        return b.withElement(parentResult.firstChild);
                    },
                    cmpOptions: {
                        openOnMouseOver: false
                    }
                });
                spyOn(test.cmp, 'show');
                var arrowContainer = Dom_1.$$(parentResult).find('.coveo-card-action-bar-arrow-container');
                Dom_1.$$(arrowContainer).trigger('mouseenter');
                expect(test.cmp.show).not.toHaveBeenCalled();
            });
        });
        it('show should add coveo-opened class', function () {
            test.cmp.show();
            expect(Dom_1.$$(test.cmp.element).hasClass('coveo-opened')).toBe(true);
        });
        it('hide should remove coveo-opened class', function () {
            test.cmp.show();
            test.cmp.hide();
            expect(Dom_1.$$(test.cmp.element).hasClass('coveo-opened')).toBe(false);
        });
    });
}
exports.CardActionBarTest = CardActionBarTest;
 
 
/***/ }),
/* 1682 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __assign = (this && this.__assign) || Object.assign || function(t) {
    for (var s, i = 1, n = arguments.length; i < n; i++) {
        s = arguments[i];
        for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
            t[p] = s[p];
    }
    return t;
};
Object.defineProperty(exports, "__esModule", { value: true });
var Mock = __webpack_require__(2);
var Quickview_1 = __webpack_require__(390);
var Fake_1 = __webpack_require__(11);
var Template_1 = __webpack_require__(29);
var ResultListEvents_1 = __webpack_require__(48);
var StringUtils_1 = __webpack_require__(34);
var Simulate_1 = __webpack_require__(15);
var Defer_1 = __webpack_require__(31);
var AnalyticsActionListMeta_1 = __webpack_require__(7);
var Utils_1 = __webpack_require__(5);
var Dom_1 = __webpack_require__(0);
var QueryStateModel_1 = __webpack_require__(17);
function QuickviewTest() {
    describe('Quickview', function () {
        var result;
        var quickview;
        var env;
        var modalBox;
        beforeEach(function () {
            quickview = buildQuickview();
        });
        afterEach(function () {
            quickview = null;
            env = null;
            modalBox = null;
        });
        var buildQuickview = function (template, layout, options) {
            if (template === void 0) { template = simpleTestTemplate(); }
            if (layout === void 0) { layout = 'list'; }
            var mockBuilder = new Mock.MockEnvironmentBuilder().withLiveQueryStateModel();
            var bindings = __assign({}, mockBuilder.getBindings(), { resultElement: Dom_1.$$('div').el });
            env = mockBuilder.build();
            env.queryStateModel.set(QueryStateModel_1.QueryStateModel.attributesEnum.layout, layout);
            result = Fake_1.FakeResults.createFakeResult();
            modalBox = Simulate_1.Simulate.modalBoxModule();
            return new Quickview_1.Quickview(env.element, __assign({ contentTemplate: template }, options), bindings, result, modalBox);
        };
        var simpleTestTemplate = function () {
            var template = new Template_1.Template(function () { return '<div class="coveo-quick-view-full-height"></div>'; });
            return template;
        };
        it('should render button correctly', function (done) {
            expect(Dom_1.$$(quickview.element).hasClass('coveo-accessible-button')).toBe(true);
            expect(Dom_1.$$(quickview.element).find('.coveo-icon-for-quickview')).toBeTruthy();
            expect(Dom_1.$$(quickview.element).find('.coveo-caption-for-icon')).toBeTruthy();
            done();
        });
        it('should not give the caption a tabindex', function () {
            expect(quickview.element.querySelector('.coveo-caption-for-icon').getAttribute('tabindex')).toBeNull();
        });
        it('when the layout is list, the caption should be positioned (i.e. appear as a tooltip)', function (done) {
            expect(Dom_1.$$(quickview.element)
                .find('.coveo-caption-for-icon')
                .hasAttribute('x-placement')).toBe(true);
            done();
        });
        it('when the layout is card, the caption should not be positioned (i.e. be inline)', function (done) {
            quickview = buildQuickview(undefined, 'card');
            expect(Dom_1.$$(quickview.element)
                .find('.coveo-caption-for-icon')
                .hasAttribute('x-placement')).toBe(false);
            done();
        });
        it('when the tooltipPlacement option is set, the tooltip has to be positionned accordingly', function (done) {
            var placements = ['left', 'top-end', 'right-start', 'bottom'];
            for (var _i = 0, placements_1 = placements; _i < placements_1.length; _i++) {
                var placement = placements_1[_i];
                quickview = buildQuickview(undefined, undefined, { tooltipPlacement: placement });
                expect(Dom_1.$$(quickview.element)
                    .find('.coveo-caption-for-icon')
                    .getAttribute('x-placement')).toBe(placement);
            }
            done();
        });
        it('creates a modal box on open', function (done) {
            quickview.open();
            Defer_1.Defer.defer(function () {
                expect(modalBox.open).toHaveBeenCalled();
                done();
            });
        });
        it('closes the modal box on close', function (done) {
            quickview.open();
            Defer_1.Defer.defer(function () {
                quickview.close();
                expect(modalBox.close).toHaveBeenCalled();
                done();
            });
        });
        it('logs an analytics event on open', function (done) {
            quickview.open();
            Defer_1.Defer.defer(function () {
                expect(quickview.usageAnalytics.logClickEvent).toHaveBeenCalledWith(AnalyticsActionListMeta_1.analyticsActionCauseList.documentQuickview, {
                    author: Utils_1.Utils.getFieldValue(result, 'author'),
                    documentURL: result.clickUri,
                    documentTitle: result.title
                }, result, quickview.element);
                done();
            });
        });
        it('computes the hash id', function () {
            var hash = quickview.getHashId();
            expect(hash).toBe(result.queryUid + '.' + result.index + '.' + StringUtils_1.StringUtils.hashCode(result.uniqueId));
        });
        it('calls event.stopPropagation on openQuickview', function () {
            var stopPropagation = jasmine.createSpy('stopPropagation');
            Dom_1.$$(quickview.bindings.resultElement).trigger(ResultListEvents_1.ResultListEvents.openQuickview, {
                stopPropagation: stopPropagation
            });
            expect(stopPropagation).toHaveBeenCalled();
        });
        describe('when instantiating invalid templates', function () {
            var verifyThatOpeningQuickViewDoesNotThrow = function (quickview, done) {
                spyOn(quickview.logger, 'warn');
                quickview
                    .open()
                    .then(function () {
                    expect(quickview.logger.warn).toHaveBeenCalled();
                    done();
                })
                    .catch(function (e) {
                    fail(e);
                    done();
                });
            };
            it('should not throw an error when opening a template that throws an error', function (done) {
                var badTemplate = new Template_1.Template(function () {
                    throw 'Oh, the Humanity!';
                });
                quickview = buildQuickview(badTemplate);
                verifyThatOpeningQuickViewDoesNotThrow(quickview, done);
            });
            it('should not throw an error when opening a template that returns null', function (done) {
                var badTemplate = new Template_1.Template(function () { return null; });
                quickview = buildQuickview(badTemplate);
                verifyThatOpeningQuickViewDoesNotThrow(quickview, done);
            });
            it('should not throw an error when opening a template that returns undefined', function (done) {
                var badTemplate = new Template_1.Template(function () { return undefined; });
                quickview = buildQuickview(badTemplate);
                verifyThatOpeningQuickViewDoesNotThrow(quickview, done);
            });
        });
    });
}
exports.QuickviewTest = QuickviewTest;
 
 
/***/ }),
/* 1683 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Mock = __webpack_require__(2);
var CardOverlay_1 = __webpack_require__(670);
var Dom_1 = __webpack_require__(0);
function CardOverlayTest() {
    describe('CardOverlay', function () {
        var test;
        var parentResult;
        beforeEach(function () {
            test = Mock.advancedComponentSetup(CardOverlay_1.CardOverlay, {
                modifyBuilder: function (b) {
                    parentResult = Dom_1.$$('div', { className: 'CoveoResult' }, Dom_1.$$('div')).el;
                    return b.withElement(parentResult.firstChild);
                }
            });
        });
        afterEach(function () {
            test = null;
        });
        describe('exposes options', function () {
            it('title should put the title in the button and the overlay header', function () {
                test = Mock.advancedComponentSetup(CardOverlay_1.CardOverlay, {
                    modifyBuilder: function (b) {
                        parentResult = Dom_1.$$('div', { className: 'CoveoResult' }, Dom_1.$$('div')).el;
                        return b.withElement(parentResult.firstChild);
                    },
                    cmpOptions: {
                        title: 'foobar'
                    }
                });
                var label = Dom_1.$$(test.cmp.element).find('.coveo-label');
                var overlay = Dom_1.$$(Dom_1.$$(parentResult).find('.coveo-card-overlay')).find('.coveo-label');
                expect(label.textContent).toBe('foobar');
                expect(overlay.textContent).toBe('foobar');
            });
            it('icon should put an icon in the button and the overlay header', function () {
                test = Mock.advancedComponentSetup(CardOverlay_1.CardOverlay, {
                    modifyBuilder: function (b) {
                        parentResult = Dom_1.$$('div', { className: 'CoveoResult' }, Dom_1.$$('div')).el;
                        return b.withElement(parentResult.firstChild);
                    },
                    cmpOptions: {
                        icon: 'search'
                    }
                });
                expect(Dom_1.$$(test.cmp.element).find('.coveo-search-svg')).not.toBeNull();
                expect(Dom_1.$$(Dom_1.$$(parentResult).find('.coveo-card-overlay')).find('.coveo-search-svg')).not.toBeNull();
            });
        });
        it('should create an overlay on closest .CoveoResult', function () {
            expect(Dom_1.$$(parentResult).find('.coveo-card-overlay')).not.toBeUndefined();
        });
        it('toggle should toggle between opening and closing the overlay', function () {
            var overlay = Dom_1.$$(parentResult).find('.coveo-card-overlay');
            expect(Dom_1.$$(overlay).hasClass('coveo-opened')).not.toBe(true);
            test.cmp.toggleOverlay();
            expect(Dom_1.$$(overlay).hasClass('coveo-opened')).toBe(true);
            test.cmp.toggleOverlay();
            expect(Dom_1.$$(overlay).hasClass('coveo-opened')).not.toBe(true);
        });
        it('should transfer DOM elements from its body to the overlay', function () {
            test = Mock.advancedComponentSetup(CardOverlay_1.CardOverlay, {
                modifyBuilder: function (b) {
                    parentResult = Dom_1.$$('div', { className: 'CoveoResult' }).el;
                    parentResult.innerHTML = "<div><span class=\"innerElement\"></span></div>";
                    return b.withElement(parentResult.firstChild);
                }
            });
            var overlay = Dom_1.$$(parentResult).find('.coveo-card-overlay');
            expect(Dom_1.$$(test.cmp.element).find('.innerElement')).toBeNull();
            expect(Dom_1.$$(overlay).find('.innerElement')).not.toBeNull();
        });
        it('clicking the overlay button should call toggleOverlay', function () {
            spyOn(test.cmp, 'toggleOverlay');
            Dom_1.$$(test.cmp.element).trigger('click');
            expect(test.cmp.toggleOverlay).toHaveBeenCalledTimes(1);
        });
        it('clicking the overlay header should call toggleOverlay', function () {
            spyOn(test.cmp, 'toggleOverlay');
            var overlayHeader = Dom_1.$$(parentResult).find('.coveo-card-overlay-header');
            Dom_1.$$(overlayHeader).trigger('click');
            expect(test.cmp.toggleOverlay).toHaveBeenCalledTimes(1);
        });
        it('clicking the overlay footer should call toggleOverlay', function () {
            spyOn(test.cmp, 'toggleOverlay');
            var overlayFooter = Dom_1.$$(parentResult).find('.coveo-card-overlay-footer');
            Dom_1.$$(overlayFooter).trigger('click');
            expect(test.cmp.toggleOverlay).toHaveBeenCalledTimes(1);
        });
    });
}
exports.CardOverlayTest = CardOverlayTest;
 
 
/***/ }),
/* 1684 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var ResponsiveDropdown_1 = __webpack_require__(180);
var Dom_1 = __webpack_require__(0);
var Simulate_1 = __webpack_require__(15);
var Core_1 = __webpack_require__(9);
function ResponsiveDropdownTest() {
    var _this = this;
    describe('ResponsiveDropdown', function () {
        var responsiveDropdownContent;
        var responsiveDropdownHeader;
        var responsiveDropdown;
        var root;
        beforeEach(function () {
            root = Dom_1.$$('div');
            responsiveDropdownContent = jasmine.createSpyObj('responsiveDropdownContent', ['positionDropdown', 'hideDropdown', 'cleanUp']);
            responsiveDropdownHeader = jasmine.createSpyObj('responsiveDropdownHeader', ['open', 'close', 'cleanUp']);
            responsiveDropdownHeader.element = responsiveDropdownContent.element = Dom_1.$$('div');
            root.append(responsiveDropdownHeader.element.el);
            root.append(responsiveDropdownContent.element.el);
            responsiveDropdown = new ResponsiveDropdown_1.ResponsiveDropdown(responsiveDropdownContent, responsiveDropdownHeader, root);
        });
        it('should open the dropdown header when open is called', function () {
            responsiveDropdown.open();
            expect(responsiveDropdownHeader.open).toHaveBeenCalled();
        });
        it('should position the dropdown content when open is called', function () {
            responsiveDropdown.open();
            expect(responsiveDropdownContent.positionDropdown).toHaveBeenCalled();
        });
        it('should call the on open handler when open is called', function () {
            var handler = jasmine.createSpy('handler');
            responsiveDropdown.registerOnOpenHandler(handler, _this);
            responsiveDropdown.open();
            expect(handler).toHaveBeenCalled();
        });
        it('should append a background when open is called', function () {
            responsiveDropdown.open();
            expect(root.find("." + ResponsiveDropdown_1.ResponsiveDropdown.DROPDOWN_BACKGROUND_ACTIVE_CSS_CLASS_NAME)).not.toBeNull();
        });
        it('should not append a background when it is disabled and open is called', function () {
            responsiveDropdown.disablePopupBackground();
            responsiveDropdown.open();
            expect(root.find("." + ResponsiveDropdown_1.ResponsiveDropdown.DROPDOWN_BACKGROUND_CSS_CLASS_NAME)).toBeNull();
        });
        it('should hide the background when close is called', function () {
            responsiveDropdown.open();
            responsiveDropdown.close();
            expect(root.find("." + ResponsiveDropdown_1.ResponsiveDropdown.DROPDOWN_BACKGROUND_ACTIVE_CSS_CLASS_NAME)).toBeNull();
        });
        describe('with scroll locking enabled', function () {
            var lockedContainer;
            beforeEach(function () {
                responsiveDropdown.enableScrollLocking((lockedContainer = Dom_1.$$('div').el));
            });
            it('should lock scrolling when open is called', function () {
                responsiveDropdown.open();
                expect(lockedContainer.style.overflow).toEqual('hidden');
            });
            it('should unlock scrolling when close is called', function () {
                responsiveDropdown.open();
                responsiveDropdown.close();
                expect(lockedContainer.style.overflow).toBeFalsy();
            });
        });
        it('should not lock scrolling on the body when open is called', function () {
            responsiveDropdown.open();
            expect(document.body.style.overflow).toBeFalsy();
        });
        it('should close the dropdown header when close is called', function () {
            responsiveDropdown.close();
            expect(responsiveDropdownHeader.close).toHaveBeenCalled();
        });
        it('should hide the dropdown when close is called', function () {
            responsiveDropdown.close();
            expect(responsiveDropdownContent.hideDropdown).toHaveBeenCalled();
        });
        it('should call the on close handler when close is called', function () {
            var handler = jasmine.createSpy('handler');
            responsiveDropdown.registerOnCloseHandler(handler, _this);
            responsiveDropdown.close();
            expect(handler).toHaveBeenCalled();
        });
        it('should call close when the dropdown is opened and the escape key is pressed', function () {
            responsiveDropdown.close = jasmine.createSpy('close');
            responsiveDropdown.open();
            Simulate_1.Simulate.keyUp(document.documentElement, Core_1.KEYBOARD.ESCAPE);
            expect(responsiveDropdown.close).toHaveBeenCalled();
        });
    });
}
exports.ResponsiveDropdownTest = ResponsiveDropdownTest;
 
 
/***/ }),
/* 1685 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { Iif (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        Iif (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            Iif (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
            Iif (y = 0, t) op = [0, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    Eif (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        Iif (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
Object.defineProperty(exports, "__esModule", { value: true });
var Mock = __webpack_require__(2);
var SearchInterface_1 = __webpack_require__(25);
var Core_1 = __webpack_require__(9);
var Plan_1 = __webpack_require__(214);
var Fake_1 = __webpack_require__(11);
var AnalyticsActionListMeta_1 = __webpack_require__(7);
function StandaloneSearchInterfaceTest() {
    var _this = this;
    describe('StandaloneSearchInterface', function () {
        var cmp;
        var options;
        var windoh = window;
        beforeEach(function () {
            windoh = Mock.mockWindow();
            options = {
                searchPageUri: 'https://connect.coveo.com/s/global-search/'
            };
            initializeComponent();
        });
        function initializeComponent() {
            cmp = new SearchInterface_1.StandaloneSearchInterface(document.createElement('div'), options, {}, windoh);
        }
        it("on a newQuery event\n    should call handleRedirect", function () {
            spyOn(cmp, 'handleRedirect');
            Core_1.$$(cmp.root).trigger(Core_1.QueryEvents.newQuery);
            expect(cmp.handleRedirect).toHaveBeenCalledTimes(1);
        });
        describe('calling handleRedirect', function () {
            var newQueryArgs;
            beforeEach(function () {
                newQueryArgs = {
                    cancel: false,
                    searchAsYouType: false,
                    shouldRedirectStandaloneSearchbox: true
                };
            });
            function handleRedirect() {
                cmp.handleRedirect(new Event(''), newQueryArgs);
            }
            it("when shouldRedirectStandaloneSearchbox is false\n      should not trigger the StandaloneSearchInterfaceEvents.beforeRedirect event", function () {
                var spy = jasmine.createSpy('spy');
                Core_1.$$(cmp.root).on(Core_1.StandaloneSearchInterfaceEvents.beforeRedirect, spy);
                newQueryArgs.shouldRedirectStandaloneSearchbox = false;
                handleRedirect();
                expect(spy).not.toHaveBeenCalledTimes(1);
            });
            describe("when shouldRedirectStandaloneSearchbox is true (default)", function () {
                it("should trigger the StandaloneSearchInterfaceEvents.beforeRedirect event", function () {
                    spyOn(cmp.queryController, 'fetchQueryExecutionPlan');
                    var spy = jasmine.createSpy('spy');
                    Core_1.$$(cmp.root).on(Core_1.StandaloneSearchInterfaceEvents.beforeRedirect, spy);
                    handleRedirect();
                    expect(spy).toHaveBeenCalledWith(jasmine.objectContaining({}), jasmine.objectContaining({
                        searchPageUri: options.searchPageUri,
                        cancel: false
                    }));
                });
                it("calls fetchQueryExecutionPlan", function () {
                    spyOn(cmp.queryController, 'fetchQueryExecutionPlan');
                    handleRedirect();
                    expect(cmp.queryController.fetchQueryExecutionPlan).toHaveBeenCalledTimes(1);
                });
                it("when fetchQueryExecutionPlan returns an execution plan with a redirectionURL\n        should call redirectToURL", function (done) { return __awaiter(_this, void 0, void 0, function () {
                    var plan, promise;
                    return __generator(this, function (_a) {
                        switch (_a.label) {
                            case 0:
                                plan = new Plan_1.ExecutionPlan(Fake_1.FakeResults.createFakePlanResponse());
                                promise = Promise.resolve(plan);
                                spyOn(cmp.queryController, 'fetchQueryExecutionPlan').and.returnValue(promise);
                                spyOn(cmp, 'redirectToURL');
                                handleRedirect();
                                return [4 /*yield*/, promise];
                            case 1:
                                _a.sent();
                                expect(cmp.redirectToURL).toHaveBeenCalledWith(plan.redirectionURL);
                                done();
                                return [2 /*return*/];
                        }
                    });
                }); });
                it("when fetchQueryExecutionPlan returns an execution plan without a redirectionURL\n        should call redirectToSearchPage", function (done) { return __awaiter(_this, void 0, void 0, function () {
                    var planResponse, plan, promise;
                    return __generator(this, function (_a) {
                        switch (_a.label) {
                            case 0:
                                planResponse = Fake_1.FakeResults.createFakePlanResponse();
                                planResponse.preprocessingOutput.triggers = [];
                                plan = new Plan_1.ExecutionPlan(planResponse);
                                promise = Promise.resolve(plan);
                                spyOn(cmp.queryController, 'fetchQueryExecutionPlan').and.returnValue(promise);
                                spyOn(cmp, 'redirectToSearchPage');
                                handleRedirect();
                                return [4 /*yield*/, promise];
                            case 1:
                                _a.sent();
                                expect(cmp.redirectToSearchPage).toHaveBeenCalledWith(options.searchPageUri, '');
                                done();
                                return [2 /*return*/];
                        }
                    });
                }); });
                it("when fetchQueryExecutionPlan returns no execution plan\n        should call redirectToSearchPage", function (done) { return __awaiter(_this, void 0, void 0, function () {
                    var promise;
                    return __generator(this, function (_a) {
                        switch (_a.label) {
                            case 0:
                                promise = Promise.resolve(null);
                                spyOn(cmp.queryController, 'fetchQueryExecutionPlan').and.returnValue(promise);
                                spyOn(cmp, 'redirectToSearchPage');
                                handleRedirect();
                                return [4 /*yield*/, promise];
                            case 1:
                                _a.sent();
                                expect(cmp.redirectToSearchPage).toHaveBeenCalledWith(options.searchPageUri, '');
                                done();
                                return [2 /*return*/];
                        }
                    });
                }); });
                it("where there is an analytics event prior to performing a redirection,\n        when the execution plan does not return a url (but cancels pending search events),\n        the redirection url contains the original analytics event cause", function (done) { return __awaiter(_this, void 0, void 0, function () {
                    var cause, promise;
                    return __generator(this, function (_a) {
                        switch (_a.label) {
                            case 0:
                                cause = AnalyticsActionListMeta_1.analyticsActionCauseList.omniboxFromLink;
                                cmp.usageAnalytics.logSearchEvent(cause, {});
                                promise = Promise.resolve(null);
                                spyOn(cmp.queryController, 'fetchQueryExecutionPlan').and.returnValue(promise);
                                handleRedirect();
                                cmp.usageAnalytics.cancelAllPendingEvents();
                                return [4 /*yield*/, promise];
                            case 1:
                                _a.sent();
                                setTimeout(function () {
                                    expect(windoh.location.href).toContain('#firstQueryCause=omniboxFromLink');
                                    done();
                                }, 0);
                                return [2 /*return*/];
                        }
                    });
                }); });
            });
        });
        describe('calling redirectToURL', function () {
            var redirectionURL = 'https://www.coveo.com/fr/solutions/commerce';
            it('should modify the window location', function () {
                expect(windoh.location.href).not.toContain(redirectionURL);
                cmp.redirectToURL(redirectionURL);
                expect(windoh.location.href).toContain(redirectionURL);
            });
            it('should call the right analytics event', function () {
                spyOn(cmp.usageAnalytics, 'logCustomEvent');
                spyOn(cmp.queryStateModel, 'get').and.returnValue('query');
                cmp.redirectToURL(redirectionURL);
                expect(cmp.usageAnalytics.logCustomEvent).toHaveBeenCalledWith(AnalyticsActionListMeta_1.analyticsActionCauseList.triggerRedirect, {
                    redirectedTo: redirectionURL,
                    query: 'query'
                }, cmp.element);
            });
        });
        describe('calling redirectToSearchPage with a complex search page uri', function () {
            it('should merge the url fragments with the state', function (done) {
                expect(windoh.location.href).not.toContain('key=value');
                expect(windoh.location.href).not.toContain('t=MyTab');
                var spy = jasmine.createSpy('foo');
                spy.and.returnValue({
                    key: 'value'
                });
                cmp.queryStateModel.getAttributes = spy;
                cmp.redirectToSearchPage('/mypage#t=MyTab');
                setTimeout(function () {
                    expect(spy).toHaveBeenCalled();
                    expect(windoh.location.href).toContain('#t=MyTab&key=value');
                    done();
                }, 0);
            });
            it('should merge the url query string correctly', function (done) {
                expect(windoh.location.href).not.toContain('debug=true');
                var spy = jasmine.createSpy('foo');
                spy.and.returnValue({
                    key: 'value'
                });
                cmp.queryStateModel.getAttributes = spy;
                cmp.redirectToSearchPage('/mypage?debug=true');
                setTimeout(function () {
                    expect(spy).toHaveBeenCalled();
                    expect(windoh.location.href).toContain('?debug=true#key=value');
                    done();
                }, 0);
            });
            it('should merge the fragment and query string parameter correctly', function (done) {
                expect(windoh.location.href).not.toContain('debug=true');
                var spy = jasmine.createSpy('foo');
                spy.and.returnValue({
                    key: 'value'
                });
                cmp.queryStateModel.getAttributes = spy;
                cmp.redirectToSearchPage('/mypage?debug=true#t=MyTab');
                setTimeout(function () {
                    expect(spy).toHaveBeenCalled();
                    expect(windoh.location.href).toContain('?debug=true#t=MyTab&key=value');
                    done();
                }, 0);
            });
        });
        describe('calling redirectToSearchPage with a standard search page uri', function () {
            var searchPageUri = 'foo';
            it('should redirect on new query', function (done) {
                expect(windoh.location.href).not.toContain('foo');
                cmp.redirectToSearchPage('foo');
                setTimeout(function () {
                    expect(windoh.location.href).toContain('foo');
                    done();
                }, 0);
            });
            it('should set the state in the new location', function (done) {
                expect(windoh.location.href).not.toContain('key=value');
                var spy = jasmine.createSpy('foo');
                spy.and.returnValue({
                    key: 'value'
                });
                cmp.queryStateModel.getAttributes = spy;
                cmp.redirectToSearchPage(searchPageUri);
                setTimeout(function () {
                    expect(spy).toHaveBeenCalled();
                    expect(windoh.location.href).toContain('key=value');
                    done();
                }, 0);
            });
            it('should get the meta from the analytics client', function (done) {
                cmp.usageAnalytics.logSearchEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.omniboxAnalytics, { foo: 'bar' });
                cmp.redirectToSearchPage(searchPageUri);
                setTimeout(function () {
                    expect(windoh.location.href).toContain('firstQueryMeta={"foo":"bar"}');
                    done();
                }, 0);
            });
            it('should get the cause from the analytics client', function (done) {
                cmp.usageAnalytics.logSearchEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.omniboxAnalytics, { foo: 'bar' });
                cmp.redirectToSearchPage(searchPageUri);
                setTimeout(function () {
                    expect(windoh.location.href).toContain('firstQueryCause=omniboxAnalytics');
                    done();
                }, 0);
            });
            it('should transform search box submit to search from link', function (done) {
                // for legacy reason, searchbox submit were always logged a search from link in an external search box.
                cmp.usageAnalytics.logSearchEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.searchboxSubmit, { foo: 'bar' });
                cmp.redirectToSearchPage(searchPageUri);
                setTimeout(function () {
                    expect(windoh.location.href).toContain('firstQueryCause=searchFromLink');
                    done();
                }, 0);
            });
        });
        describe("when the StandaloneSearchInterface is using localstorage for history, when calling redirectToSearchPage", function () {
            beforeEach(function () {
                options.enableHistory = true;
                options.useLocalStorageForHistory = true;
                initializeComponent();
            });
            it('does not include the state in the url hash', function (done) {
                var spy = jasmine.createSpy('foo');
                spy.and.returnValue({ key: 'value' });
                cmp.queryStateModel.getAttributes = spy;
                cmp.redirectToSearchPage(options.searchPageUri);
                setTimeout(function () {
                    expect(windoh.location.href).not.toContain('key=value');
                    done();
                }, 0);
            });
            it('includes the #firstQueryCause and #firstQueryMeta when a search event is logged', function (done) {
                var cause = AnalyticsActionListMeta_1.analyticsActionCauseList.omniboxAnalytics;
                var metadata = { foo: 'bar' };
                cmp.usageAnalytics.logSearchEvent(cause, metadata);
                cmp.redirectToSearchPage(options.searchPageUri);
                setTimeout(function () {
                    var href = windoh.location.href;
                    expect(href).toContain("firstQueryCause=" + cause.name);
                    expect(href).toContain("firstQueryMeta=" + JSON.stringify(metadata));
                    done();
                }, 0);
            });
        });
    });
}
exports.StandaloneSearchInterfaceTest = StandaloneSearchInterfaceTest;
 
 
/***/ }),
/* 1686 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var ResponsiveComponentsManager_1 = __webpack_require__(70);
var ResponsiveComponentsUtils_1 = __webpack_require__(93);
var ResponsiveFacets_1 = __webpack_require__(146);
var Dom_1 = __webpack_require__(0);
var Facet_1 = __webpack_require__(32);
var FacetSearch_1 = __webpack_require__(147);
var FacetSearchValuesList_1 = __webpack_require__(240);
var Mock = __webpack_require__(2);
var QueryEvents_1 = __webpack_require__(14);
var Fake_1 = __webpack_require__(11);
var ResponsiveComponents_1 = __webpack_require__(54);
var SearchInterface_1 = __webpack_require__(25);
function ResponsiveFacetsTest() {
    describe('ResponsiveFacets', function () {
        var largeWidth = new ResponsiveComponents_1.ResponsiveComponents().getMediumScreenWidth() + 1;
        var smallWidth = new ResponsiveComponents_1.ResponsiveComponents().getMediumScreenWidth() - 1;
        var dropdownHeaderClassName = 'dropdown-header';
        var root;
        var responsiveDropdown;
        var responsiveDropdownHeader;
        var responsiveDropdownModalContent;
        var responsiveFacets;
        var facet;
        var envBuilder;
        function registerFacet(preservePosition) {
            if (preservePosition === void 0) { preservePosition = true; }
            envBuilder = new Mock.MockEnvironmentBuilder();
            envBuilder.withRoot(root.el);
            facet = new Facet_1.Facet(envBuilder.getBindings().element, {}, envBuilder.getBindings());
            facet.facetSearch = new FacetSearch_1.FacetSearch(facet, FacetSearchValuesList_1.FacetSearchValuesList, root.el);
            facet.facetSearch.build();
            facet.facetSearch.currentlyDisplayedResults = ['result'];
            facet.options.preservePosition = preservePosition;
            responsiveFacets.registerComponent(facet);
        }
        function shouldSwitchToSmallMode() {
            var spy = jasmine.createSpy('width').and.returnValue(smallWidth);
            root.width = spy;
        }
        function shouldSwitchToLargeMode() {
            var spy = jasmine.createSpy('width').and.returnValue(largeWidth);
            root.width = spy;
        }
        beforeEach(function () {
            root = Dom_1.$$('div');
            root.append(Dom_1.$$('div', { className: 'coveo-facet-column' }).el);
            root.append(Dom_1.$$('div', { className: ResponsiveComponentsManager_1.ResponsiveComponentsManager.DROPDOWN_HEADER_WRAPPER_CSS_CLASS }).el);
            responsiveDropdown = jasmine.createSpyObj('responsiveDropdown', [
                'registerOnOpenHandler',
                'registerOnCloseHandler',
                'cleanUp',
                'open',
                'close',
                'disablePopupBackground',
                'enableScrollLocking'
            ]);
            responsiveDropdownModalContent = jasmine.createSpyObj('responsiveDropdownModalContent', [
                'positionDropdown',
                'hideDropdown',
                'cleanUp',
                'element'
            ]);
            responsiveDropdownModalContent.element = Dom_1.$$('div');
            responsiveDropdownHeader = jasmine.createSpyObj('responsiveDropdownHeader', ['open', 'close', 'cleanUp', 'show', 'hide']);
            responsiveDropdownHeader.element = Dom_1.$$('div', { className: dropdownHeaderClassName });
            responsiveDropdown.dropdownContent = responsiveDropdownModalContent;
            responsiveDropdown.dropdownHeader = responsiveDropdownHeader;
            responsiveFacets = new ResponsiveFacets_1.ResponsiveFacets(root, '', {}, responsiveDropdown);
            registerFacet();
        });
        it('when a facet is registered then position search results is called on scroll', function (done) {
            spyOn(facet.facetSearch, 'positionSearchResults');
            Dom_1.$$(responsiveDropdownModalContent.element).trigger('scroll');
            setTimeout(function () {
                expect(facet.facetSearch.positionSearchResults).toHaveBeenCalled();
                done();
            }, ResponsiveFacets_1.ResponsiveFacets.DEBOUNCE_SCROLL_WAIT + 10);
        });
        it('registers dismissFacetSearches an on close handler on the responsive dropdown', function () {
            expect(responsiveDropdown.registerOnCloseHandler).toHaveBeenCalledWith(responsiveFacets.dismissFacetSearches, responsiveFacets);
        });
        it('calls position dropdown when handleResizeEvent is called if the dropdown is opened', function () {
            responsiveDropdown.isOpened = true;
            responsiveFacets.handleResizeEvent();
            expect(responsiveDropdownModalContent.positionDropdown).toHaveBeenCalled();
        });
        describe('when it should switch to small mode', function () {
            it('returns true when needDropdownWrapper is called', function () {
                shouldSwitchToSmallMode();
                expect(responsiveFacets.needDropdownWrapper()).toBe(true);
            });
            it('closes dropdown when handleResizeEvent is called', function () {
                shouldSwitchToSmallMode();
                responsiveFacets.handleResizeEvent();
                expect(responsiveDropdown.close).toHaveBeenCalled();
            });
            it('disables facet preserve position when handleResizeEvent is called', function () {
                shouldSwitchToSmallMode();
                responsiveFacets.handleResizeEvent();
                expect(facet.options.preservePosition).toBe(false);
            });
            it('appends the dropdown header when handleResizeEvent is called', function () {
                shouldSwitchToSmallMode();
                responsiveFacets.handleResizeEvent();
                expect(root.find("." + dropdownHeaderClassName)).not.toBeNull();
            });
            it('activates the small facets when handleResizeEvent is called', function () {
                spyOn(ResponsiveComponentsUtils_1.ResponsiveComponentsUtils, 'activateSmallFacet');
                shouldSwitchToSmallMode();
                responsiveFacets.handleResizeEvent();
                expect(ResponsiveComponentsUtils_1.ResponsiveComponentsUtils.activateSmallFacet).toHaveBeenCalled();
            });
            it('should hide on query error', function () {
                facet.createDom();
                root.trigger(QueryEvents_1.QueryEvents.queryError);
                expect(responsiveDropdownHeader.hide).toHaveBeenCalled();
            });
            it('should hide on query success with 0 results', function () {
                root.trigger(QueryEvents_1.QueryEvents.querySuccess, { results: Fake_1.FakeResults.createFakeResults(0) });
                expect(responsiveDropdownHeader.hide).toHaveBeenCalled();
            });
            it('should show on query success with more than 0 results', function () {
                root.trigger(QueryEvents_1.QueryEvents.querySuccess, { results: Fake_1.FakeResults.createFakeResults() });
                expect(responsiveDropdownHeader.show).toHaveBeenCalled();
            });
            it('should hide on no results', function () {
                root.trigger(QueryEvents_1.QueryEvents.noResults, { results: Fake_1.FakeResults.createFakeResults() });
                expect(responsiveDropdownHeader.hide).toHaveBeenCalled();
            });
        });
        describe('when it should switch to large mode', function () {
            it('returns false when needDropdownWrapper is called', function () {
                shouldSwitchToLargeMode();
                ResponsiveComponentsUtils_1.ResponsiveComponentsUtils.activateSmallFacet(root);
                expect(responsiveFacets.needDropdownWrapper()).toBe(false);
            });
            it('restores preserve position to true if it was originally true when handleResizeEvent is called', function () {
                shouldSwitchToSmallMode();
                responsiveFacets.handleResizeEvent();
                shouldSwitchToLargeMode();
                ResponsiveComponentsUtils_1.ResponsiveComponentsUtils.activateSmallFacet(root);
                responsiveFacets.handleResizeEvent();
                expect(facet.options.preservePosition).toBe(true);
            });
            it('restores preserve position to false if it was originally false when handleResizeEvent is called', function () {
                registerFacet(false);
                shouldSwitchToSmallMode();
                responsiveFacets.handleResizeEvent();
                shouldSwitchToLargeMode();
                ResponsiveComponentsUtils_1.ResponsiveComponentsUtils.activateSmallFacet(root);
                responsiveFacets.handleResizeEvent();
                expect(facet.options.preservePosition).toBe(false);
            });
            it('cleans up the dropdown when handleResizeEvent is called', function () {
                shouldSwitchToLargeMode();
                ResponsiveComponentsUtils_1.ResponsiveComponentsUtils.activateSmallFacet(root);
                responsiveFacets.handleResizeEvent();
                expect(responsiveDropdown.cleanUp).toHaveBeenCalled();
            });
            it('deactivates the small facets when handleResizeEvent is called', function () {
                spyOn(ResponsiveComponentsUtils_1.ResponsiveComponentsUtils, 'deactivateSmallFacet');
                shouldSwitchToLargeMode();
                ResponsiveComponentsUtils_1.ResponsiveComponentsUtils.activateSmallFacet(root);
                responsiveFacets.handleResizeEvent();
                expect(ResponsiveComponentsUtils_1.ResponsiveComponentsUtils.deactivateSmallFacet).toHaveBeenCalled();
            });
        });
        it('calls dismissSearchResults on the registered facet when dismissFacetSearches is called', function () {
            spyOn(facet.facetSearch, 'dismissSearchResults');
            responsiveFacets.dismissFacetSearches();
            expect(facet.facetSearch.dismissSearchResults).toHaveBeenCalled();
        });
        it('should need the dropdown wrapper when the width is under the breakpoint specified', function () {
            var customResponsiveBreakpoint = 200;
            responsiveFacets = new ResponsiveFacets_1.ResponsiveFacets(root, '', { responsiveBreakpoint: customResponsiveBreakpoint }, responsiveDropdown);
            var spy = jasmine.createSpy('width').and.returnValue(customResponsiveBreakpoint - 1);
            root.width = spy;
            expect(responsiveFacets.needDropdownWrapper()).toBe(true);
        });
        it('should not need the dropdown wrapper when the width is over the breakpoint specified', function () {
            var customResponsiveBreakpoint = 200;
            responsiveFacets = new ResponsiveFacets_1.ResponsiveFacets(root, '', { responsiveBreakpoint: customResponsiveBreakpoint }, responsiveDropdown);
            var spy = jasmine.createSpy('width').and.returnValue(customResponsiveBreakpoint + 1);
            root.width = spy;
            expect(responsiveFacets.needDropdownWrapper()).toBe(false);
        });
        it('should need the dropdown wrapper when the responsiveMode of the search interface is small even if the screen is large', function () {
            var mediumBreakpoint = 481;
            new SearchInterface_1.SearchInterface(root.el, {
                responsiveMediumBreakpoint: mediumBreakpoint,
                responsiveMode: 'small'
            });
            responsiveFacets = new ResponsiveFacets_1.ResponsiveFacets(root, '', {});
            root.width = jasmine.createSpy('width').and.returnValue(mediumBreakpoint + 1);
            expect(responsiveFacets.needDropdownWrapper()).toBe(true);
        });
        it('should need the dropdown wrapper when the responsiveMode of the search interface is medium even if the screen is small', function () {
            var smallBreakpoint = 481;
            new SearchInterface_1.SearchInterface(root.el, {
                responsiveSmallBreakpoint: smallBreakpoint,
                responsiveMode: 'medium'
            });
            responsiveFacets = new ResponsiveFacets_1.ResponsiveFacets(root, '', {});
            root.width = jasmine.createSpy('width').and.returnValue(smallBreakpoint - 1);
            expect(responsiveFacets.needDropdownWrapper()).toBe(true);
        });
        it('should use the breakpoint set from the search interface if not specified explicitely', function () {
            new SearchInterface_1.SearchInterface(root.el, {
                responsiveMediumBreakpoint: 1234567
            });
            responsiveFacets = new ResponsiveFacets_1.ResponsiveFacets(root, '', {});
            root.width = jasmine.createSpy('width').and.returnValue(1234567 - 1);
            expect(responsiveFacets.needDropdownWrapper()).toBe(true);
        });
        it('should not override values set locally on the facet', function () {
            new SearchInterface_1.SearchInterface(root.el, {
                responsiveMediumBreakpoint: 1234567
            });
            responsiveFacets = new ResponsiveFacets_1.ResponsiveFacets(root, '', { responsiveBreakpoint: 7654321 });
            root.width = jasmine.createSpy('width').and.returnValue(1234567 - 1);
            expect(responsiveFacets.needDropdownWrapper()).toBe(true);
        });
    });
}
exports.ResponsiveFacetsTest = ResponsiveFacetsTest;
 
 
/***/ }),
/* 1687 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var ResponsiveRecommendation_1 = __webpack_require__(818);
var Component_1 = __webpack_require__(6);
var Recommendation_1 = __webpack_require__(199);
var ResponsiveComponentsUtils_1 = __webpack_require__(93);
var ResponsiveComponentsManager_1 = __webpack_require__(70);
var Dom_1 = __webpack_require__(0);
var QueryEvents_1 = __webpack_require__(14);
var MockEnvironment_1 = __webpack_require__(2);
var Fake_1 = __webpack_require__(11);
var SearchInterface_1 = __webpack_require__(25);
function ResponsiveRecommendationTest() {
    describe('ResponsiveRecommendation', function () {
        var dropdownHeaderClassName = 'dropdown-header';
        var smallWidth;
        var largeWidth;
        var root;
        var responsiveRecommendation;
        var responsiveDropdown;
        var responsiveDropdownHeader;
        var responsiveDropdownContent;
        var recommendation;
        function shouldSwitchToSmallMode() {
            var spy = jasmine.createSpy('width').and.returnValue(smallWidth);
            root.width = spy;
        }
        function shouldSwitchToLargeMode() {
            var spy = jasmine.createSpy('width').and.returnValue(largeWidth);
            root.width = spy;
        }
        beforeEach(function () {
            root = Dom_1.$$('div');
            root.append(Dom_1.$$('div', { className: Component_1.Component.computeCssClassName(Recommendation_1.Recommendation) }).el);
            root.append(Dom_1.$$('div', { className: ResponsiveComponentsManager_1.ResponsiveComponentsManager.DROPDOWN_HEADER_WRAPPER_CSS_CLASS }).el);
            recommendation = MockEnvironment_1.mockComponent(Recommendation_1.Recommendation);
            recommendation.options = { hideIfNoResults: true };
            root.find("." + Component_1.Component.computeCssClassName(Recommendation_1.Recommendation))['CoveoSearchInterface'] = recommendation;
            responsiveDropdown = jasmine.createSpyObj('responsiveDropdown', [
                'registerOnOpenHandler',
                'registerOnCloseHandler',
                'cleanUp',
                'open',
                'close',
                'disablePopupBackground'
            ]);
            responsiveDropdownContent = jasmine.createSpyObj('responsiveDropdownContent', [
                'positionDropdown',
                'hideDropdown',
                'cleanUp',
                'element'
            ]);
            responsiveDropdownContent.element = Dom_1.$$('div');
            responsiveDropdownHeader = jasmine.createSpyObj('responsiveDropdownHeader', ['open', 'close', 'cleanUp', 'show', 'hide']);
            responsiveDropdownHeader.element = Dom_1.$$('div', { className: dropdownHeaderClassName });
            responsiveDropdown.dropdownContent = responsiveDropdownContent;
            responsiveDropdown.dropdownHeader = responsiveDropdownHeader;
            smallWidth = ResponsiveRecommendation_1.ResponsiveRecommendation.RESPONSIVE_BREAKPOINT - 1;
            largeWidth = ResponsiveRecommendation_1.ResponsiveRecommendation.RESPONSIVE_BREAKPOINT + 1;
            responsiveRecommendation = new ResponsiveRecommendation_1.ResponsiveRecommendation(root, '', { dropdownHeaderLabel: 'label' }, responsiveDropdown);
        });
        it('calls position dropdown when handleResizeEvent is called if the dropdown is opened', function () {
            responsiveDropdown.isOpened = true;
            responsiveRecommendation.handleResizeEvent();
            expect(responsiveDropdownContent.positionDropdown).toHaveBeenCalled();
        });
        describe('when it should switch to small mode but the responsiveMode is on medium (or large)', function () {
            it('returns false when needDropdownWrapper is called', function () {
                new SearchInterface_1.SearchInterface(root.el, { responsiveMode: 'medium' });
                responsiveRecommendation = new ResponsiveRecommendation_1.ResponsiveRecommendation(root, '', { dropdownHeaderLabel: 'label' }, responsiveDropdown);
                shouldSwitchToSmallMode();
                expect(responsiveRecommendation.needDropdownWrapper()).toBe(false);
            });
        });
        describe('when it should switch to small mode but the responsiveMode is on small', function () {
            it('returns false when needDropdownWrapper is called', function () {
                new SearchInterface_1.SearchInterface(root.el, { responsiveMode: 'medium' });
                responsiveRecommendation = new ResponsiveRecommendation_1.ResponsiveRecommendation(root, '', { dropdownHeaderLabel: 'label' }, responsiveDropdown);
                shouldSwitchToLargeMode();
                ResponsiveComponentsUtils_1.ResponsiveComponentsUtils.activateSmallRecommendation(root);
                expect(responsiveRecommendation.needDropdownWrapper()).toBe(false);
            });
        });
        describe('when it should switch to small mode', function () {
            it('returns true when needDropdownWrapper is called', function () {
                shouldSwitchToSmallMode();
                expect(responsiveRecommendation.needDropdownWrapper()).toBe(true);
            });
            it('closes dropdown when handleResizeEvent is called', function () {
                shouldSwitchToSmallMode();
                responsiveRecommendation.handleResizeEvent();
                expect(responsiveDropdown.close).toHaveBeenCalled();
            });
            it('appends the dropdown header when handleResizeEvent is called', function () {
                shouldSwitchToSmallMode();
                responsiveRecommendation.handleResizeEvent();
                expect(root.find("." + dropdownHeaderClassName)).not.toBeNull();
            });
            it('activates small recommendation when handleResizeEvent is called', function () {
                spyOn(ResponsiveComponentsUtils_1.ResponsiveComponentsUtils, 'activateSmallRecommendation');
                responsiveRecommendation.coveoRoot.removeClass('coveo-small-recommendation');
                shouldSwitchToSmallMode();
                responsiveRecommendation.handleResizeEvent();
                expect(ResponsiveComponentsUtils_1.ResponsiveComponentsUtils.activateSmallRecommendation).toHaveBeenCalledTimes(2);
            });
            it('should hide on query error', function () {
                root.trigger(QueryEvents_1.QueryEvents.queryError);
                expect(responsiveDropdownHeader.hide).toHaveBeenCalled();
            });
            it('should show on query success with 1 or more results', function () {
                root.trigger(QueryEvents_1.QueryEvents.querySuccess, { results: Fake_1.FakeResults.createFakeResults() });
                expect(responsiveDropdownHeader.show).toHaveBeenCalled();
            });
            it('should hide on query success with 0 results', function () {
                root.trigger(QueryEvents_1.QueryEvents.querySuccess, { results: Fake_1.FakeResults.createFakeResults(0) });
                expect(responsiveDropdownHeader.hide).toHaveBeenCalled();
            });
            it('should hide on no results', function () {
                root.trigger(QueryEvents_1.QueryEvents.noResults);
                expect(responsiveDropdownHeader.hide).toHaveBeenCalled();
            });
        });
        describe('when it should switch to large mode', function () {
            it('return false when neeDropdownWrapper is called', function () {
                shouldSwitchToLargeMode();
                ResponsiveComponentsUtils_1.ResponsiveComponentsUtils.activateSmallRecommendation(root);
                expect(responsiveRecommendation.needDropdownWrapper()).toBe(false);
            });
            it('cleans up the dropdown when handleResizeEvent is called', function () {
                shouldSwitchToLargeMode();
                ResponsiveComponentsUtils_1.ResponsiveComponentsUtils.activateSmallRecommendation(root);
                responsiveRecommendation.handleResizeEvent();
                expect(responsiveDropdown.cleanUp).toHaveBeenCalled();
            });
            it('deactivates small recommendation when handleResizeEvent is called', function () {
                spyOn(ResponsiveComponentsUtils_1.ResponsiveComponentsUtils, 'deactivateSmallRecommendation');
                shouldSwitchToLargeMode();
                ResponsiveComponentsUtils_1.ResponsiveComponentsUtils.activateSmallRecommendation(root);
                responsiveRecommendation.handleResizeEvent();
                expect(ResponsiveComponentsUtils_1.ResponsiveComponentsUtils.deactivateSmallRecommendation).toHaveBeenCalledTimes(2);
            });
        });
    });
}
exports.ResponsiveRecommendationTest = ResponsiveRecommendationTest;
 
 
/***/ }),
/* 1688 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var underscore_1 = __webpack_require__(1);
var Core_1 = __webpack_require__(9);
var ResponsiveComponents_1 = __webpack_require__(54);
var ResponsiveComponentsUtils_1 = __webpack_require__(93);
var ResponsiveTabs_1 = __webpack_require__(396);
var Tab_1 = __webpack_require__(201);
var Dom_1 = __webpack_require__(0);
var SearchInterface_1 = __webpack_require__(25);
var Simulate_1 = __webpack_require__(15);
function ResponsiveTabsTest() {
    var root;
    var responsiveTabs;
    var tabSection;
    var navigableSection;
    var tabs;
    describe('ResponsiveTabs', function () {
        beforeEach(function () {
            root = Dom_1.$$('div');
            tabSection = Dom_1.$$('div', { className: 'coveo-tab-section' });
            root.append(tabSection.el);
            navigableSection = Dom_1.$$('div', { tabIndex: 20 });
            root.append(navigableSection.el);
            tabs = [];
            underscore_1.range(0, 5).forEach(function (tabNumber) {
                var tab = Dom_1.$$('div', {
                    className: Core_1.Component.computeCssClassName(Tab_1.Tab),
                    'data-caption': tabNumber,
                    'data-id': tabNumber
                });
                tabs.push(tab);
            });
            tabs.forEach(function (tab) { return tabSection.append(tab.el); });
            responsiveTabs = new ResponsiveTabs_1.ResponsiveTabs(root, Tab_1.Tab.ID);
        });
        it('activates small tabs when it should switch to small mode', function () {
            spyOn(ResponsiveComponentsUtils_1.ResponsiveComponentsUtils, 'activateSmallTabs');
            spyOn(root, 'width').and.returnValue(new ResponsiveComponents_1.ResponsiveComponents().getMediumScreenWidth() - 1);
            responsiveTabs.handleResizeEvent();
            expect(ResponsiveComponentsUtils_1.ResponsiveComponentsUtils.activateSmallTabs).toHaveBeenCalled();
        });
        it('does activates small tabs when the screen is narrow and the responsiveMode is medium (or large)', function () {
            var mediumBreakpoint = 800;
            new SearchInterface_1.SearchInterface(root.el, { responsiveMode: 'medium', responsiveMediumBreakpoint: mediumBreakpoint });
            responsiveTabs = new ResponsiveTabs_1.ResponsiveTabs(root, Tab_1.Tab.ID);
            spyOn(ResponsiveComponentsUtils_1.ResponsiveComponentsUtils, 'activateSmallTabs');
            spyOn(root, 'width').and.returnValue(mediumBreakpoint - 1);
            responsiveTabs.handleResizeEvent();
            expect(ResponsiveComponentsUtils_1.ResponsiveComponentsUtils.activateSmallTabs).toHaveBeenCalled();
        });
        it('deactivates small tabs when it should switch to large mode', function () {
            spyOn(ResponsiveComponentsUtils_1.ResponsiveComponentsUtils, 'deactivateSmallTabs');
            spyOn(root, 'width').and.returnValue(new ResponsiveComponents_1.ResponsiveComponents().getMediumScreenWidth() + 1);
            ResponsiveComponentsUtils_1.ResponsiveComponentsUtils.activateSmallTabs(root);
            responsiveTabs.handleResizeEvent();
            expect(ResponsiveComponentsUtils_1.ResponsiveComponentsUtils.deactivateSmallTabs).toHaveBeenCalled();
        });
        it("doesn't deactivates small tabs when the screen is wide and the responsiveMode is small", function () {
            var mediumBreakpoint = 800;
            new SearchInterface_1.SearchInterface(root.el, { responsiveMode: 'small', responsiveMediumBreakpoint: mediumBreakpoint });
            responsiveTabs = new ResponsiveTabs_1.ResponsiveTabs(root, Tab_1.Tab.ID);
            spyOn(ResponsiveComponentsUtils_1.ResponsiveComponentsUtils, 'deactivateSmallTabs');
            spyOn(root, 'width').and.returnValue(mediumBreakpoint + 1);
            ResponsiveComponentsUtils_1.ResponsiveComponentsUtils.activateSmallTabs(root);
            responsiveTabs.handleResizeEvent();
            expect(ResponsiveComponentsUtils_1.ResponsiveComponentsUtils.deactivateSmallTabs).not.toHaveBeenCalled();
        });
        describe('when moving tabs to different section', function () {
            var simulateOverflowing = function () {
                Object.defineProperty(tabSection.el, 'clientWidth', {
                    value: 100,
                    writable: false
                });
                // This will simulate each tab being added progressively to the dropdown (25px each tab)
                // reducing the element scroll width
                var numberOfTimesCalled = -1;
                Object.defineProperty(tabSection.el, 'scrollWidth', {
                    get: function () {
                        numberOfTimesCalled++;
                        return 125 - 25 * numberOfTimesCalled;
                    },
                    configurable: true
                });
            };
            var simulateNotOverflowing = function () {
                Object.defineProperty(tabSection.el, 'clientWidth', {
                    value: 100,
                    writable: false
                });
                Object.defineProperty(tabSection.el, 'scrollWidth', {
                    get: function () { return 50; }
                });
            };
            var simulateZeroWidth = function () {
                Object.defineProperty(tabSection.el, 'clientWidth', {
                    value: 0,
                    writable: false
                });
                Object.defineProperty(tabSection.el, 'scrollWidth', {
                    get: function () { return 0; }
                });
            };
            var openTabContainer = function () {
                Dom_1.$$(root.find('.coveo-dropdown-header')).trigger('click');
                return Dom_1.$$(root.find('.coveo-tab-list-container'));
            };
            describe('when the tab section is overflowing', function () {
                beforeEach(function () {
                    simulateOverflowing();
                    spyOn(root, 'width').and.returnValue(new ResponsiveComponents_1.ResponsiveComponents().getMediumScreenWidth() - 1);
                });
                it('it creates a dropdown header', function () {
                    responsiveTabs.handleResizeEvent();
                    expect(root.find('.coveo-dropdown-header')).not.toBeNull();
                });
                it('places tabs in the correct order inside and outside the dropdown', function () {
                    responsiveTabs.handleResizeEvent();
                    var container = openTabContainer();
                    var lastTabInDropdown = container.find("div[data-id=\"4\"]");
                    expect(lastTabInDropdown).not.toBeNull();
                    underscore_1.range(0, 4).forEach(function (tabOutsideDropdownId) {
                        var tabInIncorrectPosition = container.find("div[data-id=\"" + tabOutsideDropdownId + "\"]");
                        expect(tabInIncorrectPosition).toBeNull();
                    });
                });
                it('should not place a selected tab inside the dropdown', function () {
                    var lastTab = underscore_1.last(tabs);
                    lastTab.addClass('coveo-selected');
                    var lastId = lastTab.getAttribute('data-id');
                    responsiveTabs.handleResizeEvent();
                    var container = openTabContainer();
                    var selectedTabInDropdown = container.find("div[data-id=\"" + lastId + "\"]");
                    expect(selectedTabInDropdown).toBeNull();
                });
            });
            describe('when the tab section is overflowing, then resized to larger size', function () {
                beforeEach(function () {
                    spyOn(root, 'width').and.returnValue(new ResponsiveComponents_1.ResponsiveComponents().getMediumScreenWidth() - 1);
                });
                it('replaces the tabs in the correct order in the original section', function () {
                    simulateOverflowing();
                    responsiveTabs.handleResizeEvent();
                    simulateNotOverflowing();
                    responsiveTabs.handleResizeEvent();
                    underscore_1.range(0, 5).forEach(function (tabThatShouldBeInStandardSection) {
                        expect(tabSection.find("div[data-id=\"" + tabThatShouldBeInStandardSection + "\"]")).not.toBeNull();
                    });
                });
                it('should remove the dropdown header', function () {
                    simulateOverflowing();
                    responsiveTabs.handleResizeEvent();
                    expect(root.find('.coveo-dropdown-header')).not.toBeNull();
                    simulateNotOverflowing();
                    responsiveTabs.handleResizeEvent();
                    expect(root.find('.coveo-dropdown-header')).toBeNull();
                });
                it('replaces the tabs in the correct order in the original section when there was a selection', function () {
                    underscore_1.last(tabs).addClass('coveo-selected');
                    simulateOverflowing();
                    responsiveTabs.handleResizeEvent();
                    simulateNotOverflowing();
                    responsiveTabs.handleResizeEvent();
                    var allTabsReplacedInTheirOriginalSection = tabSection.findAll("." + Core_1.Component.computeCssClassName(Tab_1.Tab));
                    underscore_1.range(0, 5).forEach(function (tabId) {
                        var tab = allTabsReplacedInTheirOriginalSection[tabId];
                        expect(tab.getAttribute('data-id')).toEqual(tabId.toString());
                    });
                });
            });
            describe('when the tab section has zero client width', function () {
                beforeEach(function () {
                    new SearchInterface_1.SearchInterface(root.el, { responsiveMode: 'small' });
                    responsiveTabs = new ResponsiveTabs_1.ResponsiveTabs(root, Tab_1.Tab.ID);
                    simulateZeroWidth();
                    spyOn(root, 'width').and.returnValue(new ResponsiveComponents_1.ResponsiveComponents().getMediumScreenWidth() - 1);
                });
                it('should creates a dropdown header', function () {
                    responsiveTabs.handleResizeEvent();
                    expect(root.find('.coveo-dropdown-header')).not.toBeNull();
                });
                it('should places tabs in the correct order inside and outside the dropdown', function () {
                    responsiveTabs.handleResizeEvent();
                    var container = openTabContainer();
                    var lastTabInDropdown = container.find("div[data-id=\"4\"]");
                    expect(lastTabInDropdown).not.toBeNull();
                    underscore_1.range(0, 4).forEach(function (tabOutsideDropdownId) {
                        var tabInIncorrectPosition = container.find("div[data-id=\"" + tabOutsideDropdownId + "\"]");
                        expect(tabInIncorrectPosition).toBeNull();
                    });
                });
                it('should not place a selected tab inside the dropdown', function () {
                    var lastTab = underscore_1.last(tabs);
                    lastTab.addClass('coveo-selected');
                    var lastId = lastTab.getAttribute('data-id');
                    responsiveTabs.handleResizeEvent();
                    var container = openTabContainer();
                    var selectedTabInDropdown = container.find("div[data-id=\"" + lastId + "\"]");
                    expect(selectedTabInDropdown).toBeNull();
                });
            });
        });
        describe('When tabs are overflowing', function () {
            describe('When the dropdown header is clicked', function () {
                beforeEach(function () {
                    responsiveTabs.handleResizeEvent();
                    Dom_1.$$(root.find('.coveo-dropdown-header')).trigger('click');
                });
                it('should open the dropdown content', function () {
                    expect(root.find('.coveo-tab-list-container')).not.toBeNull();
                });
                it('should close the dropdown content when the dropdown header is clicked again', function () {
                    Dom_1.$$(root.find('.coveo-dropdown-header')).trigger('click');
                    expect(root.find('.coveo-tab-list-container')).toBeNull();
                });
            });
            describe('When the dropdown header is focused with keyboard navigation', function () {
                beforeEach(function () {
                    responsiveTabs.handleResizeEvent();
                    Dom_1.$$(root.find('.coveo-dropdown-header')).trigger('focus');
                    Simulate_1.Simulate.keyUp(root.find('.coveo-dropdown-header'), Core_1.KEYBOARD.ENTER);
                });
                it('should open the dropdown content', function () {
                    expect(root.find('.coveo-tab-list-container')).not.toBeNull();
                });
            });
        });
    });
}
exports.ResponsiveTabsTest = ResponsiveTabsTest;
 
 
/***/ }),
/* 1689 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var ResponsiveDropdownContent_1 = __webpack_require__(99);
var ResponsiveComponentsManager_1 = __webpack_require__(70);
var Dom_1 = __webpack_require__(0);
function ResponsiveDropdownContentTest() {
    describe('ResponsiveDropdownContent', function () {
        var minWidth = 50;
        var widthRatio = 0.5;
        var componentName = 'name';
        var responsiveDropdownContent;
        var element;
        var root;
        beforeEach(function () {
            element = Dom_1.$$('div');
            root = Dom_1.$$('div');
            root.append(element.el);
            root.append(Dom_1.$$('div', { className: ResponsiveComponentsManager_1.ResponsiveComponentsManager.DROPDOWN_HEADER_WRAPPER_CSS_CLASS }).el);
            responsiveDropdownContent = new ResponsiveDropdownContent_1.ResponsiveDropdownContent(componentName, element, root, minWidth, widthRatio);
        });
        it('displays the dropdown when position dropdown is called', function () {
            responsiveDropdownContent.positionDropdown();
            expect(Dom_1.$$(responsiveDropdownContent.element).css('display')).not.toBe('none');
        });
        it('hides the dropdown when hideDropdown is called', function () {
            responsiveDropdownContent.hideDropdown();
            expect(Dom_1.$$(responsiveDropdownContent.element).css('display')).toBe('none');
        });
        it('has a minimal width', function () {
            spyOn(root, 'width').and.returnValue(1);
            responsiveDropdownContent.positionDropdown();
            expect(Dom_1.$$(responsiveDropdownContent.element).css('width')).toBe(minWidth.toString() + 'px');
        });
        it('uses a width ratio if it respect the minimal width', function () {
            var rootWidth = minWidth * 2;
            var expectedWidth = rootWidth * widthRatio;
            spyOn(root, 'width').and.returnValue(rootWidth);
            responsiveDropdownContent.positionDropdown();
            expect(Dom_1.$$(responsiveDropdownContent.element).css('width')).toBe(expectedWidth.toString() + 'px');
        });
        it('removes inline styling on clean up', function () {
            responsiveDropdownContent.hideDropdown();
            responsiveDropdownContent.cleanUp();
            expect(responsiveDropdownContent.element.el.style.display).toBe('');
        });
        it('adds custom css class when position dropdown is called', function () {
            responsiveDropdownContent.positionDropdown();
            var expectedClass = "coveo-" + componentName + "-dropdown-content";
            expect(responsiveDropdownContent.element.hasClass(expectedClass)).toBe(true);
        });
        it('adds default css class when position dropdown is called', function () {
            responsiveDropdownContent.positionDropdown();
            var expectedClass = ResponsiveDropdownContent_1.ResponsiveDropdownContent.DEFAULT_CSS_CLASS_NAME;
            expect(responsiveDropdownContent.element.hasClass(expectedClass)).toBe(true);
        });
        it('removes custom css class when hide dropdown is called', function () {
            responsiveDropdownContent.positionDropdown();
            var expectedToBeRemovedClass = "coveo-" + componentName + "-dropdown-content";
            responsiveDropdownContent.hideDropdown();
            expect(responsiveDropdownContent.element.hasClass(expectedToBeRemovedClass)).toBe(false);
        });
        it('removes default css class when hide dropdown is called', function () {
            responsiveDropdownContent.positionDropdown();
            var expectedToBeRemovedClass = ResponsiveDropdownContent_1.ResponsiveDropdownContent.DEFAULT_CSS_CLASS_NAME;
            responsiveDropdownContent.hideDropdown();
            expect(responsiveDropdownContent.element.hasClass(expectedToBeRemovedClass)).toBe(false);
        });
        it('should be able to tell when a target element is contained inside an opened dropdown content', function () {
            var target = Dom_1.$$('div');
            responsiveDropdownContent.element.append(target.el);
            responsiveDropdownContent.positionDropdown();
            expect(ResponsiveDropdownContent_1.ResponsiveDropdownContent.isTargetInsideOpenedDropdown(target)).toBeTruthy();
        });
        it('should be able to tell when a target element is contained inside a closed dropdown content', function () {
            var target = Dom_1.$$('div');
            responsiveDropdownContent.element.append(target.el);
            responsiveDropdownContent.positionDropdown();
            responsiveDropdownContent.hideDropdown();
            expect(ResponsiveDropdownContent_1.ResponsiveDropdownContent.isTargetInsideOpenedDropdown(target)).toBeFalsy();
        });
        it('should be able to tell when a target element is not contained inside an opened dropdown content', function () {
            var target = Dom_1.$$('div');
            root.append(target.el);
            responsiveDropdownContent.positionDropdown();
            expect(ResponsiveDropdownContent_1.ResponsiveDropdownContent.isTargetInsideOpenedDropdown(target)).toBeFalsy();
        });
    });
}
exports.ResponsiveDropdownContentTest = ResponsiveDropdownContentTest;
 
 
/***/ }),
/* 1690 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var RecommendationDropdownContent_1 = __webpack_require__(819);
var ResponsiveDropdownContent_1 = __webpack_require__(99);
var Dom_1 = __webpack_require__(0);
function RecommendationDropdownContentTest() {
    describe('RecommendationDropdownContent', function () {
        var componentName = 'name';
        var recommendationDropdownContent;
        var root;
        var element;
        beforeEach(function () {
            element = Dom_1.$$('div');
            root = Dom_1.$$('div');
            root.append(element.el);
            root.append(Dom_1.$$('div', { className: 'coveo-results-column' }).el);
            recommendationDropdownContent = new RecommendationDropdownContent_1.RecommendationDropdownContent(componentName, element, root);
        });
        it('adds custom css class when position dropdown is called', function () {
            recommendationDropdownContent.positionDropdown();
            var expectedClass = "coveo-" + componentName + "-dropdown-content";
            expect(recommendationDropdownContent.element.hasClass(expectedClass)).toBe(true);
        });
        it('adds default css class when position dropdown is called', function () {
            recommendationDropdownContent.positionDropdown();
            var expectedClass = ResponsiveDropdownContent_1.ResponsiveDropdownContent.DEFAULT_CSS_CLASS_NAME;
            expect(recommendationDropdownContent.element.hasClass(expectedClass)).toBe(true);
        });
        it('adds opened css class when position dropdown is called', function () {
            recommendationDropdownContent.positionDropdown();
            var expectedClass = RecommendationDropdownContent_1.RecommendationDropdownContent.OPENED_DROPDOWN_CSS_CLASS_NAME;
            expect(recommendationDropdownContent.element.hasClass(expectedClass)).toBe(true);
        });
        it('adds custom css class when hide dropdown is called', function () {
            recommendationDropdownContent.positionDropdown();
            var expectedClass = "coveo-" + componentName + "-dropdown-content";
            recommendationDropdownContent.hideDropdown();
            expect(recommendationDropdownContent.element.hasClass(expectedClass)).toBe(true);
        });
        it('adds default css class when hide dropdown is called', function () {
            recommendationDropdownContent.positionDropdown();
            var expectedClass = ResponsiveDropdownContent_1.ResponsiveDropdownContent.DEFAULT_CSS_CLASS_NAME;
            recommendationDropdownContent.hideDropdown();
            expect(recommendationDropdownContent.element.hasClass(expectedClass)).toBe(true);
        });
        it('removes opened css class when hide dropdown is called', function () {
            recommendationDropdownContent.positionDropdown();
            var expectedToBeRemovedClass = RecommendationDropdownContent_1.RecommendationDropdownContent.OPENED_DROPDOWN_CSS_CLASS_NAME;
            recommendationDropdownContent.hideDropdown();
            expect(recommendationDropdownContent.element.hasClass(expectedToBeRemovedClass)).toBe(false);
        });
        it('removes default css class when clean up is called', function () {
            recommendationDropdownContent.positionDropdown();
            var expectedToBeRemovedClass = ResponsiveDropdownContent_1.ResponsiveDropdownContent.DEFAULT_CSS_CLASS_NAME;
            recommendationDropdownContent.cleanUp();
            expect(recommendationDropdownContent.element.hasClass(expectedToBeRemovedClass)).toBe(false);
        });
        it('removes custom css class when clean up is called', function () {
            recommendationDropdownContent.positionDropdown();
            var expectedToBeRemovedClass = "coveo-" + componentName + "-dropdown-content";
            recommendationDropdownContent.cleanUp();
            expect(recommendationDropdownContent.element.hasClass(expectedToBeRemovedClass)).toBe(false);
        });
    });
}
exports.RecommendationDropdownContentTest = RecommendationDropdownContentTest;
 
 
/***/ }),
/* 1691 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var ResponsiveDropdownHeader_1 = __webpack_require__(231);
var Dom_1 = __webpack_require__(0);
function ResponsiveDropdownHeaderTest() {
    describe('ResponsiveDropdownHeader', function () {
        var componentName = 'name';
        var responsiveDropdownHeader;
        var element;
        beforeEach(function () {
            element = Dom_1.$$('div');
            responsiveDropdownHeader = new ResponsiveDropdownHeader_1.ResponsiveDropdownHeader(componentName, element);
        });
        it('adds active css class when open is called', function () {
            responsiveDropdownHeader.open();
            var expectedClass = ResponsiveDropdownHeader_1.ResponsiveDropdownHeader.ACTIVE_HEADER_CSS_CLASS_NAME;
            expect(responsiveDropdownHeader.element.hasClass(expectedClass)).toBe(true);
        });
        it('removes active css class when close is called', function () {
            responsiveDropdownHeader.open();
            var expectedToBeRemovedClass = ResponsiveDropdownHeader_1.ResponsiveDropdownHeader.ACTIVE_HEADER_CSS_CLASS_NAME;
            responsiveDropdownHeader.close();
            expect(responsiveDropdownHeader.element.hasClass(expectedToBeRemovedClass)).toBe(false);
        });
        it('adds hide css class when hide is called', function () {
            responsiveDropdownHeader.show();
            responsiveDropdownHeader.hide();
            expect(responsiveDropdownHeader.element.hasClass('coveo-hidden')).toBe(true);
        });
        it('removes active css class when show is called', function () {
            responsiveDropdownHeader.hide();
            responsiveDropdownHeader.show();
            expect(responsiveDropdownHeader.element.hasClass('coveo-hidden')).toBe(false);
        });
        it('detaches the element when clean up is called', function () {
            spyOn(responsiveDropdownHeader.element, 'detach');
            responsiveDropdownHeader.cleanUp();
            expect(responsiveDropdownHeader.element.detach).toHaveBeenCalled();
        });
    });
}
exports.ResponsiveDropdownHeaderTest = ResponsiveDropdownHeaderTest;
 
 
/***/ }),
/* 1692 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var KeyboardUtils_1 = __webpack_require__(35);
function KeyboardUtilsTests() {
    describe('KeyboardUtils', function () {
        it('should detect correct keys for omnibox events', function () {
            expect(KeyboardUtils_1.KeyboardUtils.isAllowedKeyForOmnibox({ keyCode: KeyboardUtils_1.KEYBOARD.DELETE })).toBe(true);
            expect(KeyboardUtils_1.KeyboardUtils.isAllowedKeyForOmnibox({ keyCode: KeyboardUtils_1.KEYBOARD.CTRL })).toBe(false);
            expect(KeyboardUtils_1.KeyboardUtils.isAllowedKeyForOmnibox({ keyCode: KeyboardUtils_1.KEYBOARD.INSERT })).toBe(false);
            expect(KeyboardUtils_1.KeyboardUtils.isAllowedKeyForOmnibox({ keyCode: 99 })).toBe(true);
        });
        it('should detect correct keys for search as you type', function () {
            expect(KeyboardUtils_1.KeyboardUtils.isAllowedKeyForSearchAsYouType({ keyCode: KeyboardUtils_1.KEYBOARD.DELETE })).toBe(true);
            expect(KeyboardUtils_1.KeyboardUtils.isAllowedKeyForSearchAsYouType({ keyCode: KeyboardUtils_1.KEYBOARD.CTRL })).toBe(false);
            expect(KeyboardUtils_1.KeyboardUtils.isAllowedKeyForSearchAsYouType({ keyCode: KeyboardUtils_1.KEYBOARD.INSERT })).toBe(false);
            expect(KeyboardUtils_1.KeyboardUtils.isAllowedKeyForSearchAsYouType({ keyCode: 99 })).toBe(true);
            expect(KeyboardUtils_1.KeyboardUtils.isAllowedKeyForSearchAsYouType({ keyCode: KeyboardUtils_1.KEYBOARD.DOWN_ARROW })).toBe(false);
        });
        it('should detect backspace correctly', function () {
            expect(KeyboardUtils_1.KeyboardUtils.isDeleteOrBackspace({ keyCode: KeyboardUtils_1.KEYBOARD.DELETE })).toBe(true);
            expect(KeyboardUtils_1.KeyboardUtils.isDeleteOrBackspace({ keyCode: KeyboardUtils_1.KEYBOARD.BACKSPACE })).toBe(true);
            expect(KeyboardUtils_1.KeyboardUtils.isDeleteOrBackspace({ keyCode: KeyboardUtils_1.KEYBOARD.INSERT })).toBe(false);
        });
        it('should detect arrow key correctly', function () {
            expect(KeyboardUtils_1.KeyboardUtils.isArrowKeyPushed(KeyboardUtils_1.KEYBOARD.DOWN_ARROW)).toBe(true);
            expect(KeyboardUtils_1.KeyboardUtils.isArrowKeyPushed(KeyboardUtils_1.KEYBOARD.UP_ARROW)).toBe(true);
            expect(KeyboardUtils_1.KeyboardUtils.isArrowKeyPushed(KeyboardUtils_1.KEYBOARD.DELETE)).toBe(false);
        });
        it('should detect number key correctly', function () {
            expect(KeyboardUtils_1.KeyboardUtils.isNumberKeyPushed(KeyboardUtils_1.KEYBOARD.UP_ARROW)).toBe(false);
            expect(KeyboardUtils_1.KeyboardUtils.isNumberKeyPushed(50)).toBe(true);
        });
        it('should detect letter key correctly', function () {
            expect(KeyboardUtils_1.KeyboardUtils.isLetterKeyPushed(KeyboardUtils_1.KEYBOARD.DELETE)).toBe(false);
            expect(KeyboardUtils_1.KeyboardUtils.isLetterKeyPushed(70)).toBe(true);
        });
        it('should execute the function correctly with keypressAction', function () {
            var spy = jasmine.createSpy('spy');
            var func = KeyboardUtils_1.KeyboardUtils.keypressAction(KeyboardUtils_1.KEYBOARD.ENTER, spy);
            func({ keyCode: KeyboardUtils_1.KEYBOARD.DELETE });
            expect(spy).not.toHaveBeenCalled();
            func({ keyCode: KeyboardUtils_1.KEYBOARD.ENTER });
            expect(spy).toHaveBeenCalled();
        });
    });
}
exports.KeyboardUtilsTests = KeyboardUtilsTests;
 
 
/***/ }),
/* 1693 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var HashUtils_1 = __webpack_require__(88);
function HashUtilsTest() {
    describe('HashUtils', function () {
        it('parses the q parameter as a string when the value looks like an array', function () {
            var toParse = '#q=[test]';
            var value = HashUtils_1.HashUtils.getValue('q', toParse);
            expect(typeof value == 'string').toBe(true);
        });
        it('parses the t parameter as a string when the value has two characters', function () {
            var toParse = '#t=ab';
            var value = HashUtils_1.HashUtils.getValue('t', toParse);
            expect(typeof value == 'string').toBe(true);
        });
        it('parses the q parameter as a string when the value looks like an object', function () {
            var toParse = '#q={"test": 1}';
            var value = HashUtils_1.HashUtils.getValue('q', toParse);
            expect(typeof value == 'string').toBe(true);
        });
        it('parses objects correctly', function () {
            var toParse = '#a={"test": 1}';
            var expectedValue = { test: 1 };
            var value = HashUtils_1.HashUtils.getValue('a', toParse);
            expect(value).toEqual(expectedValue);
        });
        it('parses object which contains array correctly', function () {
            var toParse = '#a={"test":[Foo,Bar]}';
            var expectedValue = { test: ['Foo', 'Bar'] };
            var value = HashUtils_1.HashUtils.getValue('a', toParse);
            expect(value).toEqual(expectedValue);
        });
        it('parses unencoded arrays correctly', function () {
            var toParse = '#a=[1]';
            var expectedValue = ['1'];
            var value = HashUtils_1.HashUtils.getValue('a', toParse);
            expect(value).toEqual(expectedValue);
        });
        it('parses encoded arrays correctly', function () {
            var encodedLeftBracket = '%5B';
            var encodedRightBracket = '%5D';
            var toParse = "#a=" + encodedLeftBracket + "1" + encodedRightBracket;
            var expectedValue = ['1'];
            var value = HashUtils_1.HashUtils.getValue('a', toParse);
            expect(value).toEqual(expectedValue);
        });
        it('parses arrays with only a left bracket correctly', function () {
            var value = 'value';
            var toParse = "#f=[" + value;
            var expectedValue = [value];
            var result = HashUtils_1.HashUtils.getValue('f', toParse);
            expect(result).toEqual(expectedValue);
        });
        it('parses arrays with only a right bracket correctly', function () {
            var value = 'value';
            var toParse = "#f=" + value + "]";
            var expectedValue = [value];
            var result = HashUtils_1.HashUtils.getValue('f', toParse);
            expect(result).toEqual(expectedValue);
        });
        it('parses strings correctly', function () {
            var toParse = '#a=test';
            var expectedValue = 'test';
            var value = HashUtils_1.HashUtils.getValue('a', toParse);
            expect(value).toEqual(expectedValue);
        });
        it('encodes objects correctly', function () {
            var toEncode = { test: 1 };
            var expectedEncodedValue = 'a={"test":1}';
            var encodedValue = HashUtils_1.HashUtils.encodeValues({ a: toEncode });
            expect(encodedValue).toEqual(expectedEncodedValue);
        });
        it('encodes complex objects correctly', function () {
            var toEncode = { test: { subTest: ['1', '2'] } };
            var expectedEncodedValue = 'a={"test":{"subTest":["1","2"]}}';
            var encodedValue = HashUtils_1.HashUtils.encodeValues({ a: toEncode });
            expect(encodedValue).toEqual(expectedEncodedValue);
        });
        it('encodes arrays correctly', function () {
            var toEncode = [1];
            var expectEncodedValue = 'a=[1]';
            var encodedValue = HashUtils_1.HashUtils.encodeValues({ a: toEncode });
            expect(encodedValue).toEqual(expectEncodedValue);
        });
        it('encodes strings correctly', function () {
            var toEncode = 'test';
            var expectedEncodedValue = 'a=test';
            var encodedValue = HashUtils_1.HashUtils.encodeValues({ a: toEncode });
            expect(encodedValue).toEqual(expectedEncodedValue);
        });
        it('should not throw when encoding null or undefined values', function () {
            var toEncode = null;
            var expectedEncodedValue = '';
            var encodedValue = HashUtils_1.HashUtils.encodeValues({ a: toEncode });
            expect(function () { return HashUtils_1.HashUtils.encodeValues({ a: toEncode }); }).not.toThrowError();
            expect(encodedValue).toEqual(expectedEncodedValue);
        });
        it('joins values correctly', function () {
            var firstValue = 'test';
            var secondValue = [1];
            var expectedEncodedValues = 'a=test&b=[1]';
            var encodedValues = HashUtils_1.HashUtils.encodeValues({ a: firstValue, b: secondValue });
            expect(encodedValues).toEqual(expectedEncodedValues);
        });
    });
}
exports.HashUtilsTest = HashUtilsTest;
 
 
/***/ }),
/* 1694 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var StringUtils_1 = __webpack_require__(34);
var Fake_1 = __webpack_require__(11);
function StringUtilsTests() {
    describe('StringUtils', function () {
        it('should latinize string correctly', function () {
            expect(StringUtils_1.StringUtils.latinize('ćäñadå')).toBe('canada');
        });
        it('should html encode correctly', function () {
            expect(StringUtils_1.StringUtils.htmlEncode('<div></div>')).toBe('&lt;div&gt;&lt;/div&gt;');
        });
        it('should splice correctly', function () {
            expect(StringUtils_1.StringUtils.splice('foobar', 3, 0, 'baz')).toBe('foobazbar');
            expect(StringUtils_1.StringUtils.splice('foobar', 0, 6, 'baz')).toBe('baz');
            expect(StringUtils_1.StringUtils.splice('foobar', 6, 0, 'baz')).toBe('foobarbaz');
        });
        it('should removeMiddle correctly', function () {
            expect(StringUtils_1.StringUtils.removeMiddle('foobar', 3, '...')).toBe('f...ar');
        });
        it('should regex encode correctly', function () {
            expect(StringUtils_1.StringUtils.regexEncode('{foo}bar')).toBe('\\{foo\\}bar');
        });
        it('should string to regex correctly', function () {
            expect(StringUtils_1.StringUtils.stringToRegex('{foo}bar')).toBe('\\{foo\\}bar');
        });
        it('should wildcard to regex correctly', function () {
            expect(StringUtils_1.StringUtils.wildcardsToRegex('*.*')).toBe('.*\\.\\*');
        });
        it('should encodeCarriageReturn correctly', function () {
            expect(StringUtils_1.StringUtils.encodeCarriageReturn('\n')).toBe('<br/>');
        });
        it('should equalsCaseInsensitive correctly', function () {
            expect(StringUtils_1.StringUtils.equalsCaseInsensitive('A', 'a')).toBe(true);
            expect(StringUtils_1.StringUtils.equalsCaseInsensitive('A', 'B')).toBe(false);
        });
        it('should create string templates', function () {
            var result = Fake_1.FakeResults.createFakeResult('bar');
            expect(StringUtils_1.StringUtils.buildStringTemplateFromResult('abc', result)).toBe('abc');
            expect(StringUtils_1.StringUtils.buildStringTemplateFromResult('${title}', result)).toBe('Titlebar');
            expect(StringUtils_1.StringUtils.buildStringTemplateFromResult('${raw.source}', result)).toBe('the source');
            expect(StringUtils_1.StringUtils.buildStringTemplateFromResult('${uri}/abc', result)).toBe('http://uri.bar.com/abc');
        });
    });
}
exports.StringUtilsTests = StringUtilsTests;
 
 
/***/ }),
/* 1695 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __assign = (this && this.__assign) || Object.assign || function(t) {
    for (var s, i = 1, n = arguments.length; i < n; i++) {
        s = arguments[i];
        for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
            t[p] = s[p];
    }
    return t;
};
Object.defineProperty(exports, "__esModule", { value: true });
var TemplateHelpers_1 = __webpack_require__(141);
var Fake_1 = __webpack_require__(11);
var SearchEndpoint_1 = __webpack_require__(61);
var MockEnvironment_1 = __webpack_require__(2);
var Core_1 = __webpack_require__(9);
var _ = __webpack_require__(1);
function CoreHelperTest() {
    describe('CoreHelpers', function () {
        it('shorten should work correctly', function () {
            expect(TemplateHelpers_1.TemplateHelpers.getHelper('shorten')('a string that is too long', 20)).toEqual('a string that is...');
        });
        it('shorten should work correctly with higlights', function () {
            var highlights = [
                {
                    offset: 2,
                    length: 6
                }
            ];
            expect(TemplateHelpers_1.TemplateHelpers.getHelper('shorten')('a string that is too long', 20, highlights)).toEqual('a <span class="highlight">string</span> that is...');
        });
        it('shortenv2 should work correctly', function () {
            expect(TemplateHelpers_1.TemplateHelpers.getHelper('shortenv2')('a string that is too long', {
                length: 20
            })).toEqual('a string that is...');
        });
        it('javascriptencode should work correctly', function () {
            expect(TemplateHelpers_1.TemplateHelpers.getHelper('javascriptencode')('"yo"')).toEqual('\\"yo\\"');
        });
        it('shortenPath should work correctly', function () {
            expect(TemplateHelpers_1.TemplateHelpers.getHelper('shortenPath')('/Users/Me/Desktop/MyFiles/MyDocument.txt', 20)).toEqual('/Users/Me/Desktop...');
        });
        it('shortenPath v2 should work correctly', function () {
            expect(TemplateHelpers_1.TemplateHelpers.getHelper('shortenPathv2')('/Users/Me/Desktop/MyFiles/MyDocument.txt', {
                length: 20
            })).toEqual('/Users/Me/Desktop...');
        });
        it('shortenUri should work correctly', function () {
            expect(TemplateHelpers_1.TemplateHelpers.getHelper('shortenUri')('http://mywebsite.com/mypage/myarticle', 20)).toEqual('http://mywebsite....');
        });
        it('shortenUriv2 should work correctly', function () {
            expect(TemplateHelpers_1.TemplateHelpers.getHelper('shortenUriv2')('http://mywebsite.com/mypage/myarticle', {
                length: 20
            })).toEqual('http://mywebsite....');
        });
        it('highlight should work correctly', function () {
            var highlights = [
                {
                    offset: 2,
                    length: 6
                }
            ];
            expect(TemplateHelpers_1.TemplateHelpers.getHelper('highlight')('a string that is too long', highlights)).toEqual('a <span class="highlight">string</span> that is too long');
        });
        it('highlightv2 should work correctly', function () {
            var highlights = [
                {
                    offset: 2,
                    length: 6
                }
            ];
            expect(TemplateHelpers_1.TemplateHelpers.getHelper('highlightv2')('a string that is too long', { highlights: highlights })).toEqual('a <span class="highlight">string</span> that is too long');
        });
        it('highlightStreamText should work correctly', function () {
            var toHighlight = 'a b';
            var terms = { a: [], b: [] };
            expect(TemplateHelpers_1.TemplateHelpers.getHelper('highlightStreamText')(toHighlight, terms, {})).toEqual('<span class="coveo-highlight" data-highlight-group="1" data-highlight-group-term="a">a</span> <span class="coveo-highlight" data-highlight-group="2" data-highlight-group-term="b">b</span>');
        });
        it('highlightStreamText should not hang in case of duplicate terms on a text that starts with a word delimiter', function () {
            // A "bad text" is any text that starts with a "word delimiter".
            var toHighlight = "'This is a bad text";
            // The only "term" needs to be in both the "terms" and the "phrases".
            var terms = { aTerm: [] };
            var phrases = { aTerm: terms };
            expect(TemplateHelpers_1.TemplateHelpers.getHelper('highlightStreamText')(toHighlight, terms, phrases)).toEqual(_.escape(toHighlight));
        });
        it('highlightStreamTextv2 should work correctly', function () {
            var toHighlight = 'a b';
            var termsToHighlight = { a: [], b: [] };
            expect(TemplateHelpers_1.TemplateHelpers.getHelper('highlightStreamTextv2')(toHighlight, {
                termsToHighlight: termsToHighlight,
                phrasesToHighlight: {}
            })).toEqual('<span class="coveo-highlight" data-highlight-group="1" data-highlight-group-term="a">a</span> <span class="coveo-highlight" data-highlight-group="2" data-highlight-group-term="b">b</span>');
        });
        it("when the termsToHighlight contains words that are part of phrasesToHighlight,\n      highlightStreamTextv2 should only highlight a phrase's term once", function () {
            var toHighlight = 'e-file';
            var termsToHighlight = {
                efile: [],
                file: []
            };
            var phrasesToHighlight = {
                'e file': {
                    e: [],
                    file: []
                }
            };
            var highlightedText = TemplateHelpers_1.TemplateHelpers.getHelper('highlightStreamTextv2')(toHighlight, {
                termsToHighlight: termsToHighlight,
                phrasesToHighlight: phrasesToHighlight
            });
            expect(highlightedText).toEqual('<span class="coveo-highlight" data-highlight-group="3" data-highlight-group-term="e file">e-file</span>');
        });
        it("when the termsToHighlight \"synonyms\" contains words that are part of phrasesToHighlight,\n      highlightStreamTextv2 should only highlight a phrase's term once", function () {
            var toHighlight = 'e-file';
            var termsToHighlight = {
                efile: [],
                filing: ['file']
            };
            var phrasesToHighlight = {
                'e file': {
                    e: [],
                    file: []
                }
            };
            var highlightedText = TemplateHelpers_1.TemplateHelpers.getHelper('highlightStreamTextv2')(toHighlight, {
                termsToHighlight: termsToHighlight,
                phrasesToHighlight: phrasesToHighlight
            });
            expect(highlightedText).toEqual('<span class="coveo-highlight" data-highlight-group="3" data-highlight-group-term="e file">e-file</span>');
        });
        it('highlightStreamHTML should work correctly', function () {
            var toHighlight = '<div>a b</div>';
            var terms = { a: [], b: [] };
            expect(TemplateHelpers_1.TemplateHelpers.getHelper('highlightStreamHTML')(toHighlight, terms, {})).toEqual('<div><span class="coveo-highlight" data-highlight-group="1" data-highlight-group-term="a">a</span> <span class="coveo-highlight" data-highlight-group="2" data-highlight-group-term="b">b</span></div>');
        });
        describe('highlightStreamHTMLv2', function () {
            var termsToHighlight = { a: [], b: [] };
            var phrasesToHighlight = {};
            var expectedOutput = '<div><span class="coveo-highlight" data-highlight-group="1" data-highlight-group-term="a">a</span> <span class="coveo-highlight" data-highlight-group="2" data-highlight-group-term="b">b</span></div>';
            var toHighlight = '<div>a b</div>';
            afterEach(function () {
                Core_1.Component.getComponentRef('ResultList').resultCurrentlyBeingRendered = null;
            });
            it('should work correctly when options are passed explicitely', function () {
                expect(TemplateHelpers_1.TemplateHelpers.getHelper('highlightStreamHTMLv2')(toHighlight, {
                    termsToHighlight: termsToHighlight,
                    phrasesToHighlight: phrasesToHighlight
                })).toEqual(expectedOutput);
            });
            it('should work correctly when it "resolves" options automatically through the result list', function () {
                Core_1.Component.getComponentRef('ResultList').resultCurrentlyBeingRendered = __assign({}, Fake_1.FakeResults.createFakeResult(), { termsToHighlight: termsToHighlight,
                    phrasesToHighlight: phrasesToHighlight });
                expect(TemplateHelpers_1.TemplateHelpers.getHelper('highlightStreamHTMLv2')(toHighlight)).toEqual(expectedOutput);
            });
        });
        describe('number', function () {
            it("when the format passed as a string\n      should return the number formatted", function () {
                expect(TemplateHelpers_1.TemplateHelpers.getHelper('number')(1.3993, 'n2')).toEqual('1.40');
            });
            it("when the format inside an object\n      should return the number formatted", function () {
                expect(TemplateHelpers_1.TemplateHelpers.getHelper('number')(1.3993, { format: 'n2' })).toEqual('1.40');
            });
            it("when no option is passed\n      should return the number not formatted", function () {
                expect(TemplateHelpers_1.TemplateHelpers.getHelper('number')('345')).toEqual('345');
            });
            it("when an empty object is passed as an option\n      should return the number not formatted", function () {
                expect(TemplateHelpers_1.TemplateHelpers.getHelper('number')('345', {})).toEqual('345');
            });
        });
        describe('with date and time related helpers', function () {
            var options;
            beforeEach(function () {
                options = {
                    now: new Date(1980, 2, 11)
                };
            });
            afterEach(function () {
                options = null;
            });
            describe('date', function () {
                it('should work correctly with useTodayYesterdayAndTomorrow', function () {
                    options.useTodayYesterdayAndTomorrow = true;
                    expect(TemplateHelpers_1.TemplateHelpers.getHelper('date')(new Date(1980, 2, 11), options)).toEqual('Today');
                    expect(TemplateHelpers_1.TemplateHelpers.getHelper('date')(new Date(1980, 2, 10), options)).toEqual('Yesterday');
                    expect(TemplateHelpers_1.TemplateHelpers.getHelper('date')(new Date(1980, 2, 12), options)).toEqual('Tomorrow');
                });
                it('should work correctly with useWeekdayIfThisWeek', function () {
                    options.useWeekdayIfThisWeek = true;
                    expect(TemplateHelpers_1.TemplateHelpers.getHelper('date')(new Date(1980, 2, 9), options)).toEqual('Last Sunday');
                    expect(TemplateHelpers_1.TemplateHelpers.getHelper('date')(new Date(1980, 2, 13), options)).toEqual('Next Thursday');
                });
                it('should work correctly with omitYearIfCurrentOne', function () {
                    options.omitYearIfCurrentOne = true;
                    expect(TemplateHelpers_1.TemplateHelpers.getHelper('date')(new Date(1980, 6, 11), options)).toEqual('July 11');
                    expect(TemplateHelpers_1.TemplateHelpers.getHelper('date')(new Date(1981, 3, 11), options)).toEqual('4/11/1981');
                });
                it('should work correctly with useLongDateFormat', function () {
                    options.useLongDateFormat = true;
                    expect(TemplateHelpers_1.TemplateHelpers.getHelper('date')(new Date(1981, 3, 11), options)).toEqual('Saturday, April 11, 1981');
                });
                it('should work correctly with correct default options ', function () {
                    expect(TemplateHelpers_1.TemplateHelpers.getHelper('date')(new Date(1981, 3, 11), options)).toEqual('4/11/1981');
                });
            });
            describe('time', function () {
                it('should work with default options', function () {
                    expect(TemplateHelpers_1.TemplateHelpers.getHelper('time')(new Date(1981, 3, 11, 7, 13))).toEqual('7:13 AM');
                });
                it('should return empty string for an undefined value', function () {
                    expect(TemplateHelpers_1.TemplateHelpers.getHelper('time')(undefined, options)).toEqual('');
                });
            });
            describe('dateTime', function () {
                it('should work with includeTimeIfToday', function () {
                    options.includeTimeIfToday = true;
                    expect(TemplateHelpers_1.TemplateHelpers.getHelper('dateTime')(new Date(1980, 2, 11, 7, 13), options)).toEqual('Today, 7:13 AM');
                });
                it('should work with includeTimeIfThisWeek', function () {
                    options.includeTimeIfThisWeek = true;
                    options.useWeekdayIfThisWeek = false;
                    expect(TemplateHelpers_1.TemplateHelpers.getHelper('dateTime')(new Date(1980, 2, 4, 7, 13), options)).toEqual('March 04, 7:13 AM');
                    expect(TemplateHelpers_1.TemplateHelpers.getHelper('dateTime')(new Date(1980, 2, 13, 7, 13), options)).toEqual('March 13, 7:13 AM');
                    expect(TemplateHelpers_1.TemplateHelpers.getHelper('dateTime')(new Date(1980, 2, 3, 7, 13), options)).toEqual('March 03');
                });
                it('should work with alwaysIncludeTime', function () {
                    options.alwaysIncludeTime = true;
                    expect(TemplateHelpers_1.TemplateHelpers.getHelper('dateTime')(new Date(1981, 3, 4, 7, 13), options)).toEqual('4/4/1981, 7:13 AM');
                });
                it('should return empty string for an undefined value', function () {
                    expect(TemplateHelpers_1.TemplateHelpers.getHelper('dateTime')(undefined, options)).toEqual('');
                });
            });
            describe('emailDateTime', function () {
                it('should includeTimeIfThisWeek automatically', function () {
                    expect(TemplateHelpers_1.TemplateHelpers.getHelper('emailDateTime')(new Date(1980, 2, 13, 7, 13), options)).toEqual('Next Thursday, 7:13 AM');
                });
            });
        });
        describe('currency', function () {
            it('should work correctly with default options', function () {
                expect(TemplateHelpers_1.TemplateHelpers.getHelper('currency')(123)).toEqual('$123');
                expect(TemplateHelpers_1.TemplateHelpers.getHelper('currency')(123.4)).toEqual('$123');
                expect(TemplateHelpers_1.TemplateHelpers.getHelper('currency')(1234.56)).toEqual('$1,235');
                expect(TemplateHelpers_1.TemplateHelpers.getHelper('currency')(-123)).toEqual('($123)');
            });
            it('should work correctly with decimal digit options', function () {
                expect(TemplateHelpers_1.TemplateHelpers.getHelper('currency')(123, { decimals: 0 })).toEqual('$123');
                expect(TemplateHelpers_1.TemplateHelpers.getHelper('currency')(123, { decimals: 1 })).toEqual('$123.0');
                expect(TemplateHelpers_1.TemplateHelpers.getHelper('currency')(123, { decimals: 2 })).toEqual('$123.00');
            });
            it('should work correctly with symbol options', function () {
                expect(TemplateHelpers_1.TemplateHelpers.getHelper('currency')(123, { symbol: 'F' })).toEqual('F123');
            });
            it('should work correctly with an undefined value returning an empty string', function () {
                expect(TemplateHelpers_1.TemplateHelpers.getHelper('currency')(undefined)).toEqual('');
            });
        });
        describe('timeSpan', function () {
            it('should work with milliseconds', function () {
                expect(TemplateHelpers_1.TemplateHelpers.getHelper('timeSpan')(1000, { isMilliseconds: true })).toEqual('00:01');
                expect(TemplateHelpers_1.TemplateHelpers.getHelper('timeSpan')(10000, { isMilliseconds: true })).toEqual('00:10');
                expect(TemplateHelpers_1.TemplateHelpers.getHelper('timeSpan')(60000, { isMilliseconds: true })).toEqual('01:00');
                expect(TemplateHelpers_1.TemplateHelpers.getHelper('timeSpan')(600000, { isMilliseconds: true })).toEqual('10:00');
            });
            it('should work with seconds', function () {
                expect(TemplateHelpers_1.TemplateHelpers.getHelper('timeSpan')(1, { isMilliseconds: false })).toEqual('00:01');
                expect(TemplateHelpers_1.TemplateHelpers.getHelper('timeSpan')(10, { isMilliseconds: false })).toEqual('00:10');
                expect(TemplateHelpers_1.TemplateHelpers.getHelper('timeSpan')(60, { isMilliseconds: false })).toEqual('01:00');
                expect(TemplateHelpers_1.TemplateHelpers.getHelper('timeSpan')(600, { isMilliseconds: false })).toEqual('10:00');
            });
        });
        describe('email', function () {
            it('should work with name and address', function () {
                expect(TemplateHelpers_1.TemplateHelpers.getHelper('email')('Foo Bar <foo@bar.com>')).toEqual('<a title="Foo Bar <foo@bar.com>" href="mailto:foo@bar.com">Foo Bar</a>');
            });
            it('should work if the value is an array', function () {
                expect(TemplateHelpers_1.TemplateHelpers.getHelper('email')(['Foo Bar <foo@bar.com>', 'Foo Baz <foo@baz.com>'])).toEqual('<a title="Foo Bar <foo@bar.com>" href="mailto:foo@bar.com">Foo Bar</a>, <a title="Foo Baz <foo@baz.com>" href="mailto:foo@baz.com">Foo Baz</a>');
            });
            it('should work when we specify a length limit', function () {
                expect(TemplateHelpers_1.TemplateHelpers.getHelper('email')(['Foo Bar <foo@bar.com>', 'Foo Baz <foo@baz.com>'], {
                    lengthLimit: 1
                })).toContain('coveo-emails-excess-collapsed');
            });
            it('should work with address only', function () {
                expect(TemplateHelpers_1.TemplateHelpers.getHelper('email')('foo@bar.com')).toEqual('<a title="foo@bar.com" href="mailto:foo@bar.com">foo@bar.com</a>');
            });
            it('should work with company domain and "me"', function () {
                expect(TemplateHelpers_1.TemplateHelpers.getHelper('email')('Foo Bar <foo@bar.com>', {
                    me: 'foo@bar.com',
                    companyDomain: 'bar.com'
                })).toEqual('<a title="Foo Bar <foo@bar.com>" href="mailto:foo@bar.com">Me</a>');
            });
            it('should work with list of email address separated by semi-colon', function () {
                expect(TemplateHelpers_1.TemplateHelpers.getHelper('email')('Foo Bar <foo@bar.com>; spam@stuff.com')).toEqual('<a title="Foo Bar <foo@bar.com>" href="mailto:foo@bar.com">Foo Bar</a>, <a title="spam@stuff.com" href="mailto:spam@stuff.com">spam@stuff.com</a>');
            });
        });
        describe('anchor', function () {
            it('should create a valid anchor', function () {
                expect(TemplateHelpers_1.TemplateHelpers.getHelper('anchor')('foo bar')).toEqual("<a href='foo bar' >foo bar</a>");
            });
            it('should accept target option', function () {
                expect(TemplateHelpers_1.TemplateHelpers.getHelper('anchor')('foo bar', {
                    target: '_top'
                })).toEqual("<a href='foo bar' target=\"_top\">foo bar</a>");
            });
            it('should accept text option', function () {
                expect(TemplateHelpers_1.TemplateHelpers.getHelper('anchor')('foo bar', {
                    text: 'baz'
                })).toEqual("<a href='foo bar' >baz</a>");
            });
        });
        describe('image', function () {
            it('should render a valid image', function () {
                expect(TemplateHelpers_1.TemplateHelpers.getHelper('image')('foo bar')).toEqual("<img src='foo bar' />");
            });
            it('should allow to specify an alt option', function () {
                expect(TemplateHelpers_1.TemplateHelpers.getHelper('image')('foo bar', {
                    alt: 'hello'
                })).toEqual('<img src=\'foo bar\' alt="hello"/>');
            });
            it('should allow to specify height', function () {
                expect(TemplateHelpers_1.TemplateHelpers.getHelper('image')('foo bar', {
                    height: '100px'
                })).toEqual('<img src=\'foo bar\' height="100px"/>');
            });
            it('should allow to specify width', function () {
                expect(TemplateHelpers_1.TemplateHelpers.getHelper('image')('foo bar', {
                    width: '100px'
                })).toEqual('<img src=\'foo bar\' width="100px"/>');
            });
            it('should allow to specify a srcTemplate', function () {
                var result = Fake_1.FakeResults.createFakeResult('bar');
                expect(TemplateHelpers_1.TemplateHelpers.getHelper('image')('foo bar', {
                    srcTemplate: 'http://test${title}'
                }, result)).toEqual("<img src='http://testTitlebar' />");
            });
        });
        describe('thumbnail', function () {
            var endpoint;
            var result;
            beforeEach(function () {
                endpoint = MockEnvironment_1.mockSearchEndpoint();
                result = Fake_1.FakeResults.createFakeResult();
                var spy = jasmine.createSpy('getRawDataStream');
                spy.and.returnValue(new Promise(function () { }));
                endpoint.getRawDataStream = spy;
                SearchEndpoint_1.SearchEndpoint.endpoints['default'] = endpoint;
            });
            afterEach(function () {
                SearchEndpoint_1.SearchEndpoint.endpoints['default'] = null;
                endpoint = null;
            });
            it('should call the endpoint', function () {
                TemplateHelpers_1.TemplateHelpers.getHelper('thumbnail')(result);
                expect(endpoint.getRawDataStream).toHaveBeenCalled();
            });
            it('should return a valid img', function () {
                expect(TemplateHelpers_1.TemplateHelpers.getHelper('thumbnail')(result)).toEqual("<img data-coveo-uri-hash=\"" + result.raw.urihash + "\"/>");
            });
        });
        describe('fromFileTypeToIcon', function () {
            var result;
            var options;
            beforeEach(function () {
                result = Fake_1.FakeResults.createFakeResult();
                result.searchInterface.getBindings = function () { return new MockEnvironment_1.MockEnvironmentBuilder().getBindings(); };
                options = {};
            });
            afterEach(function () {
                result = null;
                options = null;
            });
            it('should return a valid icon image', function () {
                expect(TemplateHelpers_1.TemplateHelpers.getHelper('fromFileTypeToIcon')(result)).toContain('<div class="coveo-icon filetype');
            });
            it('should be small if specified', function () {
                options.small = true;
                expect(TemplateHelpers_1.TemplateHelpers.getHelper('fromFileTypeToIcon')(result, options)).toContain('<div class="coveo-small coveo-icon filetype');
            });
            it('should use the specified value', function () {
                options.value = 'coveo-sprites-foo';
                expect(TemplateHelpers_1.TemplateHelpers.getHelper('fromFileTypeToIcon')(result, options)).toContain('<div class="coveo-icon coveo-sprites-foo');
            });
            it('should use the label if specified', function () {
                options.withLabel = true;
                options.labelValue = 'foo';
                expect(TemplateHelpers_1.TemplateHelpers.getHelper('fromFileTypeToIcon')(result, options)).toContain('coveo-icon-with-caption-overlay');
                expect(TemplateHelpers_1.TemplateHelpers.getHelper('fromFileTypeToIcon')(result, options)).toContain('<span class="coveo-icon-caption-overlay">foo</span>');
            });
            it('should not use the label if not specified', function () {
                options.withLabel = false;
                options.labelValue = 'foo';
                expect(TemplateHelpers_1.TemplateHelpers.getHelper('fromFileTypeToIcon')(result, options)).not.toContain('coveo-icon-with-caption-overlay');
                expect(TemplateHelpers_1.TemplateHelpers.getHelper('fromFileTypeToIcon')(result, options)).not.toContain('<span class="coveo-icon-caption-overlay">foo</span>');
            });
        });
        describe('size', function () {
            it('should format filesize correctly', function () {
                expect(TemplateHelpers_1.TemplateHelpers.getHelper('size')(1024)).toEqual('1024 B');
                expect(TemplateHelpers_1.TemplateHelpers.getHelper('size')(1025)).toEqual('1 KB');
                expect(TemplateHelpers_1.TemplateHelpers.getHelper('size')(10240)).toEqual('10 KB');
                expect(TemplateHelpers_1.TemplateHelpers.getHelper('size')(102400)).toEqual('100 KB');
                expect(TemplateHelpers_1.TemplateHelpers.getHelper('size')(1024000)).toEqual('1000 KB');
            });
        });
        describe('translatedCaption', function () {
            it('should try to get the translated caption for a given filetype', function () {
                expect(TemplateHelpers_1.TemplateHelpers.getHelper('translatedCaption')('html')).toEqual('HTML File');
                expect(TemplateHelpers_1.TemplateHelpers.getHelper('translatedCaption')('doc')).toEqual('Document');
            });
        });
        describe('encodeCarriageReturn', function () {
            it('should replace carriage return with a &lt;br /&gt; tag', function () {
                expect(TemplateHelpers_1.TemplateHelpers.getHelper('encodeCarriageReturn')('this contains a carriage \n return')).toEqual('this contains a carriage <br/> return');
            });
        });
        describe('isMobileDevice', function () {
            it('should return information about the device', function () {
                expect(TemplateHelpers_1.TemplateHelpers.getHelper('isMobileDevice')()).toBeNull();
            });
        });
        describe('pluralReplyHelper', function () {
            var options = { singular: 'reply', plural: 'replies' };
            var testCases = [
                {
                    repliesCount: 1,
                    expected: 'reply'
                },
                {
                    repliesCount: 5,
                    expected: 'replies'
                }
            ];
            testCases.forEach(function (test) {
                it("should return " + test.expected + " when number of replies is " + test.repliesCount, function () {
                    expect(TemplateHelpers_1.TemplateHelpers.getHelper('pluralHelper')(test.repliesCount, options)).toEqual(test.expected);
                });
            });
        });
    });
}
exports.CoreHelperTest = CoreHelperTest;
 
 
/***/ }),
/* 1696 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var TemplateConditionEvaluator_1 = __webpack_require__(303);
var Fake_1 = __webpack_require__(11);
var ResponsiveComponents_1 = __webpack_require__(54);
var Utils_1 = __webpack_require__(5);
function TemplateConditionEvaluatorTest() {
    describe('TemplateConditionEvaluator', function () {
        it('should be able to find a field in the format @FIELDNAME', function () {
            expect(Utils_1.Utils.arrayEqual(TemplateConditionEvaluator_1.TemplateConditionEvaluator.getFieldFromString('@first_field second@third @fourth'), ['first_field', 'third', 'fourth'], false)).toBeTruthy();
        });
        it('should be able to find a field in the format raw.FIELDNAME', function () {
            expect(Utils_1.Utils.arrayEqual(TemplateConditionEvaluator_1.TemplateConditionEvaluator.getFieldFromString('raw.first_field raw.second raw.third'), ['first_field', 'second', 'third'], false)).toBeTruthy();
        });
        it("should be able to find a field in the format raw['FIELDNAME']", function () {
            expect(Utils_1.Utils.arrayEqual(TemplateConditionEvaluator_1.TemplateConditionEvaluator.getFieldFromString("raw['first_field'] raw['second'] raw['third']"), ['first_field', 'second', 'third'], false)).toBeTruthy();
        });
        it('should be able to find a field in the format raw["FIELDNAME"]', function () {
            expect(Utils_1.Utils.arrayEqual(TemplateConditionEvaluator_1.TemplateConditionEvaluator.getFieldFromString("raw[\"first_field\"] raw[\"second\"] raw[\"third\"]"), ['first_field', 'second', 'third'], false)).toBeTruthy();
        });
        it('should be able to find a field in the format data-condition-field-FIELDNAME', function () {
            expect(Utils_1.Utils.arrayEqual(TemplateConditionEvaluator_1.TemplateConditionEvaluator.getFieldFromString("<div data-condition-field-first_field=\"abc\" data-condition-field-second=\"bcd\">"), ['first_field', 'second'], false)).toBeTruthy();
        });
        it('should be able to find a field in the format data-condition-field-not-FIELDNAME', function () {
            expect(Utils_1.Utils.arrayEqual(TemplateConditionEvaluator_1.TemplateConditionEvaluator.getFieldFromString("<div data-condition-field-not-first_field=\"abc\" data-condition-field-not-second=\"bcd\">"), ['first_field', 'second'], false)).toBeTruthy();
        });
        it('should not consider lone words to be fields', function () {
            expect(TemplateConditionEvaluator_1.TemplateConditionEvaluator.getFieldFromString("My name is John Doe").length).toBe(0);
        });
        it('should not match an empty field name', function () {
            expect(TemplateConditionEvaluator_1.TemplateConditionEvaluator.getFieldFromString("@").length).toBe(0);
            expect(TemplateConditionEvaluator_1.TemplateConditionEvaluator.getFieldFromString("raw.").length).toBe(0);
            expect(TemplateConditionEvaluator_1.TemplateConditionEvaluator.getFieldFromString("raw['']").length).toBe(0);
            expect(TemplateConditionEvaluator_1.TemplateConditionEvaluator.getFieldFromString("raw[\"\"]").length).toBe(0);
        });
        it('should not accept anything other than the @ symbol, "raw" and a period, or brackets before a field name', function () {
            expect(TemplateConditionEvaluator_1.TemplateConditionEvaluator.getFieldFromString("aw.foo").length).toBe(0);
            expect(TemplateConditionEvaluator_1.TemplateConditionEvaluator.getFieldFromString("aw[\"foo\"]").length).toBe(0);
            expect(TemplateConditionEvaluator_1.TemplateConditionEvaluator.getFieldFromString("craw.foo").length).toBe(0);
            expect(TemplateConditionEvaluator_1.TemplateConditionEvaluator.getFieldFromString("craw[\"foo\"]").length).toBe(0);
            expect(TemplateConditionEvaluator_1.TemplateConditionEvaluator.getFieldFromString("<foo").length).toBe(0);
        });
        it("should not allow symbols within a field's name", function () {
            expect(Utils_1.Utils.arrayEqual(TemplateConditionEvaluator_1.TemplateConditionEvaluator.getFieldFromString("@foo#bar raw.hello#world raw['brown#fox']"), ['foo', 'hello', 'brown'], false)).toBeTruthy();
        });
        it('should not be able to find a field if the format is raw["FIELDNAME"] and one of the quotes doesn\'t match the other', function () {
            expect(TemplateConditionEvaluator_1.TemplateConditionEvaluator.getFieldFromString("raw[\"foo']").length).toBe(0);
            expect(TemplateConditionEvaluator_1.TemplateConditionEvaluator.getFieldFromString("raw['foo\"]").length).toBe(0);
        });
        it('should not be able to find a field if the format is raw["FIELDNAME"] and the quotes aren\'t valid', function () {
            expect(TemplateConditionEvaluator_1.TemplateConditionEvaluator.getFieldFromString("raw[#foo#]").length).toBe(0);
        });
        describe('should be able to evaluate a basic boolean condition', function () {
            var fakeResults;
            beforeEach(function () {
                fakeResults = Fake_1.FakeResults.createFakeResult();
                fakeResults.raw['foo'] = 'bar';
            });
            afterEach(function () {
                fakeResults = null;
            });
            it('if it matches', function () {
                expect(TemplateConditionEvaluator_1.TemplateConditionEvaluator.evaluateCondition('raw.foo == "bar"', fakeResults)).toBe(true);
            });
            it('if it does not match', function () {
                expect(TemplateConditionEvaluator_1.TemplateConditionEvaluator.evaluateCondition('raw.foo == "baz"', fakeResults)).toBe(false);
            });
            it('if the values need to be not null', function () {
                expect(TemplateConditionEvaluator_1.TemplateConditionEvaluator.evaluateCondition('raw.foo != null', fakeResults)).toBe(true);
            });
            describe('if it depends on the size of the device', function () {
                var responsiveComponents;
                beforeEach(function () {
                    responsiveComponents = new ResponsiveComponents_1.ResponsiveComponents();
                });
                afterEach(function () {
                    responsiveComponents = null;
                });
                it('if it needs a small device and the device is small', function () {
                    responsiveComponents.isSmallScreenWidth = function () { return true; };
                    expect(TemplateConditionEvaluator_1.TemplateConditionEvaluator.evaluateCondition('Coveo.DeviceUtils.isSmallScreenWidth()', fakeResults, responsiveComponents)).toBe(true);
                });
                it('if it needs a small device and the device is not small', function () {
                    responsiveComponents.isSmallScreenWidth = function () { return false; };
                    expect(TemplateConditionEvaluator_1.TemplateConditionEvaluator.evaluateCondition('Coveo.DeviceUtils.isSmallScreenWidth()', fakeResults, responsiveComponents)).toBe(false);
                });
                it('if it needs a small device, but the field is matching', function () {
                    responsiveComponents.isSmallScreenWidth = function () { return false; };
                    expect(TemplateConditionEvaluator_1.TemplateConditionEvaluator.evaluateCondition('raw.foo == "bar" && Coveo.DeviceUtils.isSmallScreenWidth()', fakeResults, responsiveComponents)).toBe(false);
                });
                it('if it needs a small device, but the field is not matching', function () {
                    responsiveComponents.isSmallScreenWidth = function () { return true; };
                    expect(TemplateConditionEvaluator_1.TemplateConditionEvaluator.evaluateCondition('raw.foo == "baz" && Coveo.DeviceUtils.isSmallScreenWidth()', fakeResults, responsiveComponents)).toBe(false);
                });
            });
        });
    });
}
exports.TemplateConditionEvaluatorTest = TemplateConditionEvaluatorTest;
 
 
/***/ }),
/* 1697 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Mock = __webpack_require__(2);
var PipelineContext_1 = __webpack_require__(389);
var Dom_1 = __webpack_require__(0);
var Simulate_1 = __webpack_require__(15);
var Utils_1 = __webpack_require__(5);
function PipelineContextText() {
    describe('PipelineContext', function () {
        var test;
        afterEach(function () {
            test = null;
        });
        describe('when it is a script tag', function () {
            var scriptTag;
            beforeEach(function () {
                scriptTag = document.createElement('script');
            });
            afterEach(function () {
                scriptTag = null;
            });
            describe('when it contains valid JSON context', function () {
                var context = {
                    qwerty: 'azerty',
                    'a key': 'a value',
                    'another key': ['multiple', 'values', 'in', 'array']
                };
                beforeEach(function () {
                    Dom_1.$$(scriptTag).text(JSON.stringify(context));
                    test = Mock.advancedComponentSetup(PipelineContext_1.PipelineContext, new Mock.AdvancedComponentSetupOptions(scriptTag));
                });
                it('should add the JSON content in the query', function () {
                    var simulation = Simulate_1.Simulate.query(test.env);
                    expect(simulation.queryBuilder.build().context).toEqual(jasmine.objectContaining({
                        qwerty: 'azerty',
                        'a key': 'a value',
                        'another key': ['multiple', 'values', 'in', 'array']
                    }));
                });
                it('should return the context keys', function () {
                    expect(test.cmp.getContextKeys()).toEqual(jasmine.arrayContaining(['qwerty', 'a key']));
                });
                it('should return the context value', function () {
                    expect(test.cmp.getContextValue('qwerty')).toBe('azerty');
                });
                it('should support setting a new context', function () {
                    test.cmp.setContext({ abc: 'def', hij: ['klm', 'nop'] });
                    expect(test.cmp.getContextKeys()).toEqual(jasmine.arrayContaining(['abc', 'hij']));
                });
                it('should support setting a single context value', function () {
                    test.cmp.setContextValue('popo', 'qwerty');
                    expect(test.cmp.getContextValue('popo')).toEqual('qwerty');
                });
                it('should support setting a single context value as an array', function () {
                    test.cmp.setContextValue('123', ['456', '789']);
                    expect(test.cmp.getContextValue('123')).toEqual(['456', '789']);
                });
                describe('with a global Coveo.context variable', function () {
                    beforeEach(function () {
                        Coveo['context'] = {};
                        Coveo['context']['productName'] = 'ACME 2000 ULTIMATE EDITION';
                        Coveo['context']['userRole'] = 'SYS ADMIN';
                    });
                    afterEach(function () {
                        Coveo['context'] = null;
                    });
                    it('should support transforming context values', function () {
                        test.cmp.setContextValue('someKey', '{!productName}');
                        expect(test.cmp.getContextValue('someKey')).toEqual('ACME 2000 ULTIMATE EDITION');
                    });
                    it('should support transforming context values and trim if needed', function () {
                        test.cmp.setContextValue('someKey', '{!  productName   }');
                        expect(test.cmp.getContextValue('someKey')).toEqual('ACME 2000 ULTIMATE EDITION');
                    });
                    it("should support transforming context values when it's from an array", function () {
                        test.cmp.setContextValue('someKey', ['foo', '{!productName}', '{!userRole}']);
                        expect(test.cmp.getContextValue('someKey')).toEqual(['foo', 'ACME 2000 ULTIMATE EDITION', 'SYS ADMIN']);
                    });
                    it('should transform the whole context when requesting the context as a whole object', function () {
                        test.cmp.setContext({
                            someKey: '{!productName}',
                            anotherKey: ['{!userRole}', 'foo', 'bar']
                        });
                        expect(test.cmp.getContext()).toEqual(jasmine.objectContaining({
                            someKey: 'ACME 2000 ULTIMATE EDITION',
                            anotherKey: ['SYS ADMIN', 'foo', 'bar']
                        }));
                    });
                    it('should support passing a special context syntax without a global variable value, and returns an empty string', function () {
                        test.cmp.setContextValue('someKey', '{!doesNothing}');
                        expect(test.cmp.getContextValue('someKey')).toEqual('');
                    });
                });
            });
            it('should add JSON content in the query if it HTML encoded', function () {
                var context = {
                    qwerty: 'azerty'
                };
                var encoded = Utils_1.Utils.encodeHTMLEntities(JSON.stringify(context));
                Dom_1.$$(scriptTag).text(encoded);
                test = Mock.advancedComponentSetup(PipelineContext_1.PipelineContext, new Mock.AdvancedComponentSetupOptions(scriptTag));
                var simulation = Simulate_1.Simulate.query(test.env);
                expect(simulation.queryBuilder.build().context).toEqual(jasmine.objectContaining({
                    qwerty: 'azerty'
                }));
            });
            it('should not throw an error if the context is malformed', function () {
                Dom_1.$$(scriptTag).text('this is not JSON');
                expect(function () {
                    return Mock.advancedComponentSetup(PipelineContext_1.PipelineContext, new Mock.AdvancedComponentSetupOptions(scriptTag));
                }).not.toThrowError();
            });
        });
        it('should not throw an error if the context is not a script tag', function () {
            expect(function () { return (test = Mock.basicComponentSetup(PipelineContext_1.PipelineContext)); }).not.toThrowError();
        });
    });
}
exports.PipelineContextText = PipelineContextText;
 
 
/***/ }),
/* 1698 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __assign = (this && this.__assign) || Object.assign || function(t) {
    for (var s, i = 1, n = arguments.length; i < n; i++) {
        s = arguments[i];
        for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
            t[p] = s[p];
    }
    return t;
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { Iif (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        Iif (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            Iif (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
            Iif (y = 0, t) op = [0, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    Eif (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        Iif (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
Object.defineProperty(exports, "__esModule", { value: true });
var Omnibox_1 = __webpack_require__(196);
var Mock = __webpack_require__(2);
var QuerySuggestAddon_1 = __webpack_require__(387);
var QueryStateModel_1 = __webpack_require__(17);
var Core_1 = __webpack_require__(9);
var HistoryStore_1 = __webpack_require__(84);
function QuerySuggestAddonTest() {
    var _this = this;
    describe('QuerySuggest', function () {
        var omnibox;
        var querySuggest;
        var simulateFakeSuggestions = function (suggestions) {
            omnibox.env.searchEndpoint.getQuerySuggest.and.returnValue(suggestions);
        };
        beforeEach(function () {
            omnibox = Mock.basicComponentSetup(Omnibox_1.Omnibox);
        });
        afterEach(function () {
            omnibox = null;
        });
        describe('should call the query suggest service', function () {
            beforeEach(function () {
                simulateFakeSuggestions({ completions: [{ executableConfidence: 1, expression: 'foo', highlighted: 'foo', score: 1 }] });
            });
            var spyShouldHaveBeenCalledWith = function (paramName, paramValue) {
                expect(omnibox.env.searchEndpoint.getQuerySuggest).toHaveBeenCalledWith(jasmine.objectContaining((_a = {}, _a[paramName] = paramValue, _a)));
                var _a;
            };
            it('with the locale', function (done) { return __awaiter(_this, void 0, void 0, function () {
                return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0:
                            querySuggest = new QuerySuggestAddon_1.QuerySuggestAddon(omnibox.cmp);
                            return [4 /*yield*/, querySuggest.getSuggestion()];
                        case 1:
                            _a.sent();
                            spyShouldHaveBeenCalledWith('locale', jasmine.any(String));
                            done();
                            return [2 /*return*/];
                    }
                });
            }); });
            it('with the search hub', function (done) { return __awaiter(_this, void 0, void 0, function () {
                return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0:
                            omnibox.env.componentOptionsModel.get.and.returnValue('a search hub');
                            querySuggest = new QuerySuggestAddon_1.QuerySuggestAddon(omnibox.cmp);
                            return [4 /*yield*/, querySuggest.getSuggestion()];
                        case 1:
                            _a.sent();
                            spyShouldHaveBeenCalledWith('searchHub', 'a search hub');
                            done();
                            return [2 /*return*/];
                    }
                });
            }); });
            it('with the pipeline', function (done) { return __awaiter(_this, void 0, void 0, function () {
                return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0:
                            omnibox.env.searchInterface.options.pipeline = 'a pipeline';
                            querySuggest = new QuerySuggestAddon_1.QuerySuggestAddon(omnibox.cmp);
                            return [4 /*yield*/, querySuggest.getSuggestion()];
                        case 1:
                            _a.sent();
                            spyShouldHaveBeenCalledWith('pipeline', 'a pipeline');
                            done();
                            return [2 /*return*/];
                    }
                });
            }); });
            it('with the context', function (done) { return __awaiter(_this, void 0, void 0, function () {
                var fakeContext;
                return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0:
                            fakeContext = { 'context key': 'context value' };
                            omnibox.env.searchInterface.getQueryContext.and.returnValue(fakeContext);
                            querySuggest = new QuerySuggestAddon_1.QuerySuggestAddon(omnibox.cmp);
                            return [4 /*yield*/, querySuggest.getSuggestion()];
                        case 1:
                            _a.sent();
                            spyShouldHaveBeenCalledWith('context', fakeContext);
                            done();
                            return [2 /*return*/];
                    }
                });
            }); });
            it('with the tab', function (done) { return __awaiter(_this, void 0, void 0, function () {
                return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0:
                            omnibox.env.queryStateModel.get.and.callFake(function (param) {
                                return param == QueryStateModel_1.QUERY_STATE_ATTRIBUTES.T ? 'a tab' : 'something else';
                            });
                            querySuggest = new QuerySuggestAddon_1.QuerySuggestAddon(omnibox.cmp);
                            return [4 /*yield*/, querySuggest.getSuggestion()];
                        case 1:
                            _a.sent();
                            spyShouldHaveBeenCalledWith('tab', 'a tab');
                            done();
                            return [2 /*return*/];
                    }
                });
            }); });
            it("without the tab if it's empty", function (done) { return __awaiter(_this, void 0, void 0, function () {
                return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0:
                            omnibox.env.queryStateModel.get.and.callFake(function (param) {
                                return param == QueryStateModel_1.QUERY_STATE_ATTRIBUTES.T ? '' : 'something else';
                            });
                            querySuggest = new QuerySuggestAddon_1.QuerySuggestAddon(omnibox.cmp);
                            return [4 /*yield*/, querySuggest.getSuggestion()];
                        case 1:
                            _a.sent();
                            spyShouldHaveBeenCalledWith('tab', undefined);
                            done();
                            return [2 /*return*/];
                    }
                });
            }); });
            it('with enableWordCompletion', function (done) { return __awaiter(_this, void 0, void 0, function () {
                return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0:
                            omnibox.cmp.options.enableSearchAsYouType = true;
                            querySuggest = new QuerySuggestAddon_1.QuerySuggestAddon(omnibox.cmp);
                            return [4 /*yield*/, querySuggest.getSuggestion()];
                        case 1:
                            _a.sent();
                            spyShouldHaveBeenCalledWith('enableWordCompletion', true);
                            done();
                            return [2 /*return*/];
                    }
                });
            }); });
            it('with count', function (done) { return __awaiter(_this, void 0, void 0, function () {
                return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0:
                            omnibox.cmp.options.numberOfSuggestions = 123;
                            querySuggest = new QuerySuggestAddon_1.QuerySuggestAddon(omnibox.cmp);
                            return [4 /*yield*/, querySuggest.getSuggestion()];
                        case 1:
                            _a.sent();
                            spyShouldHaveBeenCalledWith('count', 123);
                            done();
                            return [2 /*return*/];
                    }
                });
            }); });
            it('with actionsHistory', function (done) { return __awaiter(_this, void 0, void 0, function () {
                var fakeStoreEntry, store;
                return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0:
                            fakeStoreEntry = { name: 'foo', value: 'foo', time: new Date().toString() };
                            store = HistoryStore_1.buildHistoryStore();
                            store.addElement(__assign({}, fakeStoreEntry));
                            querySuggest = new QuerySuggestAddon_1.QuerySuggestAddon(omnibox.cmp);
                            return [4 /*yield*/, querySuggest.getSuggestion()];
                        case 1:
                            _a.sent();
                            spyShouldHaveBeenCalledWith('actionsHistory', jasmine.arrayContaining([fakeStoreEntry]));
                            store.clear();
                            done();
                            return [2 /*return*/];
                    }
                });
            }); });
            it('with timezone', function (done) { return __awaiter(_this, void 0, void 0, function () {
                return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0:
                            omnibox.env.searchInterface.options.timezone = 'foo';
                            querySuggest = new QuerySuggestAddon_1.QuerySuggestAddon(omnibox.cmp);
                            return [4 /*yield*/, querySuggest.getSuggestion()];
                        case 1:
                            _a.sent();
                            spyShouldHaveBeenCalledWith('timezone', 'foo');
                            done();
                            return [2 /*return*/];
                    }
                });
            }); });
            it('with isGuestUser', function (done) { return __awaiter(_this, void 0, void 0, function () {
                return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0:
                            omnibox.env.searchEndpoint.options.isGuestUser = true;
                            querySuggest = new QuerySuggestAddon_1.QuerySuggestAddon(omnibox.cmp);
                            return [4 /*yield*/, querySuggest.getSuggestion()];
                        case 1:
                            _a.sent();
                            spyShouldHaveBeenCalledWith('isGuestUser', true);
                            done();
                            return [2 /*return*/];
                    }
                });
            }); });
            it('with referrer', function (done) { return __awaiter(_this, void 0, void 0, function () {
                return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0:
                            querySuggest = new QuerySuggestAddon_1.QuerySuggestAddon(omnibox.cmp);
                            return [4 /*yield*/, querySuggest.getSuggestion()];
                        case 1:
                            _a.sent();
                            spyShouldHaveBeenCalledWith('referrer', document.referrer);
                            done();
                            return [2 /*return*/];
                    }
                });
            }); });
            it('should trigger an event before sending the payload', function (done) { return __awaiter(_this, void 0, void 0, function () {
                var spyOnEvent;
                return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0:
                            spyOnEvent = jasmine.createSpy('spyOnEvent');
                            Core_1.$$(omnibox.env.root).on(Core_1.OmniboxEvents.buildingQuerySuggest, function () { return spyOnEvent(); });
                            querySuggest = new QuerySuggestAddon_1.QuerySuggestAddon(omnibox.cmp);
                            return [4 /*yield*/, querySuggest.getSuggestion()];
                        case 1:
                            _a.sent();
                            expect(spyOnEvent).toHaveBeenCalled();
                            done();
                            return [2 /*return*/];
                    }
                });
            }); });
            it('should trigger an event after suggestions are returned', function (done) { return __awaiter(_this, void 0, void 0, function () {
                var spyOnEvent;
                return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0:
                            spyOnEvent = jasmine.createSpy('spyOnEvent');
                            Core_1.$$(omnibox.env.root).on(Core_1.OmniboxEvents.querySuggestSuccess, function () { return spyOnEvent(); });
                            querySuggest = new QuerySuggestAddon_1.QuerySuggestAddon(omnibox.cmp);
                            return [4 /*yield*/, querySuggest.getSuggestion()];
                        case 1:
                            _a.sent();
                            expect(spyOnEvent).toHaveBeenCalled();
                            done();
                            return [2 /*return*/];
                    }
                });
            }); });
            it('should allow to modify the query suggestion payload', function (done) { return __awaiter(_this, void 0, void 0, function () {
                return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0:
                            Core_1.$$(omnibox.env.root).on(Core_1.OmniboxEvents.buildingQuerySuggest, function (e, args) {
                                args.payload.timezone = 'bababa';
                                args.payload.locale = 'gegegege';
                            });
                            querySuggest = new QuerySuggestAddon_1.QuerySuggestAddon(omnibox.cmp);
                            return [4 /*yield*/, querySuggest.getSuggestion()];
                        case 1:
                            _a.sent();
                            spyShouldHaveBeenCalledWith('timezone', 'bababa');
                            spyShouldHaveBeenCalledWith('locale', 'gegegege');
                            done();
                            return [2 /*return*/];
                    }
                });
            }); });
            it('should allow to modify query suggestions when they return', function (done) { return __awaiter(_this, void 0, void 0, function () {
                var suggestions;
                return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0:
                            Core_1.$$(omnibox.env.root).on(Core_1.OmniboxEvents.querySuggestSuccess, function (e, args) {
                                args.completions[0].expression = 'something different';
                                args.completions[0].executableConfidence = 999;
                            });
                            querySuggest = new QuerySuggestAddon_1.QuerySuggestAddon(omnibox.cmp);
                            return [4 /*yield*/, querySuggest.getSuggestion()];
                        case 1:
                            suggestions = _a.sent();
                            expect(suggestions[0].text).toBe('something different');
                            expect(suggestions[0].executableConfidence).toBe(999);
                            done();
                            return [2 /*return*/];
                    }
                });
            }); });
            it('should contain the HTML version of the suggestions', function (done) { return __awaiter(_this, void 0, void 0, function () {
                var suggestions;
                return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0:
                            querySuggest = new QuerySuggestAddon_1.QuerySuggestAddon(omnibox.cmp);
                            return [4 /*yield*/, querySuggest.getSuggestion()];
                        case 1:
                            suggestions = _a.sent();
                            expect(suggestions[0].html).toBeDefined();
                            done();
                            return [2 /*return*/];
                    }
                });
            }); });
        });
        describe('when the querySuggestCharacterThreshold option is set to a value', function () {
            var magicBoxText;
            var querySuggestSuccessSpy;
            beforeEach(function () {
                simulateFakeSuggestions({ completions: [{ executableConfidence: 1, expression: 'foo', highlighted: 'foo', score: 1 }] });
                magicBoxText = jasmine.createSpy('magicBoxText');
                querySuggestSuccessSpy = jasmine.createSpy('querySuggestSuccessSpy');
                omnibox.cmp.options.querySuggestCharacterThreshold = 3;
                omnibox.cmp.magicBox.getText = magicBoxText;
                Core_1.$$(omnibox.env.root).on(Core_1.OmniboxEvents.querySuggestSuccess, function () { return querySuggestSuccessSpy(); });
            });
            it('when the magic box text length is equal to the querySuggestCharacterThreshold option should trigger query suggestion', function (done) { return __awaiter(_this, void 0, void 0, function () {
                var suggestionReturned;
                return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0:
                            magicBoxText.and.returnValue('foo');
                            querySuggest = new QuerySuggestAddon_1.QuerySuggestAddon(omnibox.cmp);
                            return [4 /*yield*/, querySuggest.getSuggestion()];
                        case 1:
                            suggestionReturned = _a.sent();
                            expect(suggestionReturned.length).toBe(1);
                            done();
                            return [2 /*return*/];
                    }
                });
            }); });
            it('when the magic box text length is greater than the querySuggestCharacterThreshold option should trigger query suggestion', function (done) { return __awaiter(_this, void 0, void 0, function () {
                var suggestionReturned;
                return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0:
                            magicBoxText.and.returnValue('fooo');
                            querySuggest = new QuerySuggestAddon_1.QuerySuggestAddon(omnibox.cmp);
                            return [4 /*yield*/, querySuggest.getSuggestion()];
                        case 1:
                            suggestionReturned = _a.sent();
                            expect(suggestionReturned.length).toBe(1);
                            done();
                            return [2 /*return*/];
                    }
                });
            }); });
            it('when the magic box text length is less than the querySuggestCharacterThreshold option should not trigger query suggestion', function (done) { return __awaiter(_this, void 0, void 0, function () {
                var suggestionReturned;
                return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0:
                            magicBoxText.and.returnValue('');
                            querySuggest = new QuerySuggestAddon_1.QuerySuggestAddon(omnibox.cmp);
                            return [4 /*yield*/, querySuggest.getSuggestion()];
                        case 1:
                            suggestionReturned = _a.sent();
                            expect(suggestionReturned.length).toBe(0);
                            done();
                            return [2 /*return*/];
                    }
                });
            }); });
        });
    });
}
exports.QuerySuggestAddonTest = QuerySuggestAddonTest;
 
 
/***/ }),
/* 1699 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var TemplateFieldsEvaluator_1 = __webpack_require__(218);
var Fake_1 = __webpack_require__(11);
function TemplateFieldsEvaluatorTest() {
    describe('TemplateFieldsEvaluatorTest', function () {
        var result;
        var fieldsToMatch;
        var field = 'foo';
        var fieldValue = 'bar';
        beforeEach(function () {
            result = Fake_1.FakeResults.createFakeResult();
            result.raw[field] = fieldValue;
        });
        afterEach(function () {
            result = null;
            fieldsToMatch = null;
        });
        it('should evaluate an undefined array', function () {
            fieldsToMatch = undefined;
            expect(TemplateFieldsEvaluator_1.TemplateFieldsEvaluator.evaluateFieldsToMatch(fieldsToMatch, result)).toBe(true);
        });
        it('should be able to evaluate fields to match', function () {
            fieldsToMatch = [{ field: field, values: [fieldValue, 'baz'] }];
            expect(TemplateFieldsEvaluator_1.TemplateFieldsEvaluator.evaluateFieldsToMatch(fieldsToMatch, result)).toBe(true);
        });
        it('should not throw an error for a result with no value for a given field', function () {
            fieldsToMatch = [{ field: 'doesNotExists', values: ['does not matter'] }];
            expect(function () { return TemplateFieldsEvaluator_1.TemplateFieldsEvaluator.evaluateFieldsToMatch(fieldsToMatch, result); }).not.toThrow();
        });
        it('should be able to evaluate fields that do not match', function () {
            fieldsToMatch = [{ field: 'foo', values: ['brak'] }];
            expect(TemplateFieldsEvaluator_1.TemplateFieldsEvaluator.evaluateFieldsToMatch(fieldsToMatch, result)).toBe(false);
        });
        it('should be able to evaluate fields that are not null', function () {
            fieldsToMatch = [{ field: field }];
            expect(TemplateFieldsEvaluator_1.TemplateFieldsEvaluator.evaluateFieldsToMatch(fieldsToMatch, result)).toBe(true);
        });
        it('should be able to evaluate fields that are null', function () {
            fieldsToMatch = [{ field: 'bar' }];
            expect(TemplateFieldsEvaluator_1.TemplateFieldsEvaluator.evaluateFieldsToMatch(fieldsToMatch, result)).toBe(false);
        });
        it("when the fieldsToMatch #values is an array containing the field value as uppercase,\n    it returns true", function () {
            fieldsToMatch = [{ field: field, values: [fieldValue.toUpperCase()] }];
            expect(TemplateFieldsEvaluator_1.TemplateFieldsEvaluator.evaluateFieldsToMatch(fieldsToMatch, result)).toBe(true);
        });
        it("given the result raw field has an uppercase value,\n    when the fieldsToMatch #values is an array containing the field value as lowercase,\n    it returns true", function () {
            result.raw[field] = fieldValue.toUpperCase();
            fieldsToMatch = [{ field: field, values: [fieldValue.toLowerCase()] }];
            expect(TemplateFieldsEvaluator_1.TemplateFieldsEvaluator.evaluateFieldsToMatch(fieldsToMatch, result)).toBe(true);
        });
        describe("when the result raw has a field that has an array of values (e.g. a multi-value field)", function () {
            var multiValueField = 'language';
            var multiValueFieldValues = ['francais'];
            beforeEach(function () {
                result.raw[multiValueField] = multiValueFieldValues;
            });
            it("when the fieldsToMatch #field is the multi-value field, it returns true", function () {
                fieldsToMatch = [{ field: multiValueField }];
                expect(TemplateFieldsEvaluator_1.TemplateFieldsEvaluator.evaluateFieldsToMatch(fieldsToMatch, result)).toBe(true);
            });
            it("when the fieldsToMatch #field is the multi-value field\n      and the #values is an empty array, it returns false", function () {
                fieldsToMatch = [{ field: multiValueField, values: [] }];
                expect(TemplateFieldsEvaluator_1.TemplateFieldsEvaluator.evaluateFieldsToMatch(fieldsToMatch, result)).toBe(false);
            });
            it("when the fieldsToMatch #field is the multi-value field\n      and the #values is an array containing the multi-value field value,\n      it returns true", function () {
                fieldsToMatch = [{ field: multiValueField, values: multiValueFieldValues.slice() }];
                expect(TemplateFieldsEvaluator_1.TemplateFieldsEvaluator.evaluateFieldsToMatch(fieldsToMatch, result)).toBe(true);
            });
            it("when the fieldsToMatch #field is the multi-value field\n      and the #values is a populated array not containing the multi-value field value,\n      it returns false", function () {
                fieldsToMatch = [{ field: multiValueField, values: ['english'] }];
                expect(TemplateFieldsEvaluator_1.TemplateFieldsEvaluator.evaluateFieldsToMatch(fieldsToMatch, result)).toBe(false);
            });
            it("when the result multi-value field has more than one value,\n      when the fieldsToMatch #field is the multi-value field\n      and the #values is a populated array containing the last result field value,\n      it returns 'true'", function () {
                result.raw[multiValueField] = ['francais', 'espanol', 'english'];
                fieldsToMatch = [{ field: multiValueField, values: ['english'] }];
                expect(TemplateFieldsEvaluator_1.TemplateFieldsEvaluator.evaluateFieldsToMatch(fieldsToMatch, result)).toBe(true);
            });
        });
    });
}
exports.TemplateFieldsEvaluatorTest = TemplateFieldsEvaluatorTest;
 
 
/***/ }),
/* 1700 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var DefaultRecommendationTemplate_1 = __webpack_require__(331);
var Dom_1 = __webpack_require__(0);
var ResultLink_1 = __webpack_require__(56);
var Component_1 = __webpack_require__(6);
function DefaultRecommendationTemplateTest() {
    describe('DefaultRecommendationTemplate', function () {
        it('should not crash on instantiate to string', function () {
            expect(function () { return new DefaultRecommendationTemplate_1.DefaultRecommendationTemplate().instantiateToString(); }).not.toThrowError();
        });
        it('should create an element with at least a result link', function (done) {
            new DefaultRecommendationTemplate_1.DefaultRecommendationTemplate().instantiateToElement().then(function (created) {
                expect(Dom_1.$$(created).find("." + Component_1.Component.computeCssClassName(ResultLink_1.ResultLink))).not.toBeNull();
                done();
            });
        });
    });
}
exports.DefaultRecommendationTemplateTest = DefaultRecommendationTemplateTest;
 
 
/***/ }),
/* 1701 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var DefaultResultTemplate_1 = __webpack_require__(173);
var Fake_1 = __webpack_require__(11);
var TemplateCache_1 = __webpack_require__(79);
var Template_1 = __webpack_require__(29);
var Simulate_1 = __webpack_require__(15);
var Dom_1 = __webpack_require__(0);
function DefaultResultTemplateTest() {
    describe('DefaultResultTemplate', function () {
        var result;
        beforeEach(function () {
            result = Fake_1.FakeResults.createFakeResult();
        });
        afterEach(function () {
            result = null;
        });
        it('should be able to return the correct type', function () {
            expect(new DefaultResultTemplate_1.DefaultResultTemplate().getType()).toEqual('DefaultResultTemplate');
        });
        describe('if the template cache is empty', function () {
            it('should be able to instantiate to string', function () {
                expect(function () { return new DefaultResultTemplate_1.DefaultResultTemplate().instantiateToString(result); }).not.toThrowError();
            });
            it('should be able to instantiate to fallback template', function () {
                var created = new DefaultResultTemplate_1.DefaultResultTemplate().instantiateToString(result);
                expect(created).toEqual(new DefaultResultTemplate_1.DefaultResultTemplate().getFallbackTemplate());
            });
        });
        // Once again, PhantomJS is not properly setting a static module (TemplateCache) correctly on each test.
        // Works perfectly in a normal browser.
        Eif (!Simulate_1.Simulate.isPhantomJs()) {
            describe('if the template cache is not empty', function () {
                var template;
                var dataToString = function (result) { return "<div class=\"CoveoResultLink\"></div>"; };
                beforeEach(function () {
                    template = new Template_1.Template(dataToString);
                    TemplateCache_1.TemplateCache.registerTemplate('dummy', template, true, true);
                });
                afterEach(function () {
                    TemplateCache_1.TemplateCache.unregisterTemplate('dummy');
                    template = null;
                });
                it('should be able to instantiate to string if there is something in the cache', function () {
                    var created = new DefaultResultTemplate_1.DefaultResultTemplate().instantiateToString(result);
                    expect(created).toEqual(dataToString(result));
                });
                it('should add accessibility attributes to the fallback template', function () {
                    var fallbackTemplateHTML = new DefaultResultTemplate_1.DefaultResultTemplate().getFallbackTemplate();
                    var fallbackTemplateElement = Dom_1.$$('div').el;
                    fallbackTemplateElement.innerHTML = fallbackTemplateHTML;
                    var fallbackTemplateTitleElement = fallbackTemplateElement.querySelector('.coveo-title');
                    expect(fallbackTemplateTitleElement.getAttribute('role')).toEqual('heading');
                    expect(fallbackTemplateTitleElement.getAttribute('aria-level')).toEqual('2');
                });
                describe("if there's template with conditions", function () {
                    var templateWithCondition;
                    beforeEach(function () {
                        templateWithCondition = new Template_1.Template(function () { return "Hello world"; });
                    });
                    afterEach(function () {
                        templateWithCondition = null;
                    });
                    it('should order templates with conditions first', function () {
                        // Test that the Hello world template is rendered before the fallback template
                        templateWithCondition.condition = function () { return true; };
                        TemplateCache_1.TemplateCache.registerTemplate('dummy2', templateWithCondition, true, true);
                        var created = new DefaultResultTemplate_1.DefaultResultTemplate().instantiateToString(result);
                        expect(created).toEqual("Hello world");
                        TemplateCache_1.TemplateCache.unregisterTemplate('dummy2');
                    });
                    it('should order template with fields to match first', function () {
                        // Test that the Hello world template is rendered before the fallback template
                        result.raw['foo'] = 'bar';
                        templateWithCondition.fieldsToMatch = [{ field: 'foo', values: ['bar'] }];
                        TemplateCache_1.TemplateCache.registerTemplate('dummy2', templateWithCondition, true, true);
                        var created = new DefaultResultTemplate_1.DefaultResultTemplate().instantiateToString(result);
                        expect(created).toEqual("Hello world");
                        TemplateCache_1.TemplateCache.unregisterTemplate('dummy2');
                    });
                    it('should still fallback on default template if condition does not match', function () {
                        templateWithCondition.condition = function () { return false; };
                        TemplateCache_1.TemplateCache.registerTemplate('dummy2', templateWithCondition, true, true);
                        var created = new DefaultResultTemplate_1.DefaultResultTemplate().instantiateToString(result);
                        expect(created).toEqual(dataToString(result));
                        TemplateCache_1.TemplateCache.unregisterTemplate('dummy2');
                    });
                    it('should still fallback on default template if fields to match does not match', function () {
                        result.raw['foo'] = 'nomatch';
                        templateWithCondition.fieldsToMatch = [{ field: 'foo', values: ['bar'] }];
                        TemplateCache_1.TemplateCache.registerTemplate('dummy2', templateWithCondition, true, true);
                        var created = new DefaultResultTemplate_1.DefaultResultTemplate().instantiateToString(result);
                        expect(created).toEqual(dataToString(result));
                        TemplateCache_1.TemplateCache.unregisterTemplate('dummy2');
                    });
                });
            });
        }
    });
}
exports.DefaultResultTemplateTest = DefaultResultTemplateTest;
 
 
/***/ }),
/* 1702 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var TemplateCache_1 = __webpack_require__(79);
var Template_1 = __webpack_require__(29);
function TemplateCacheTest() {
    describe('TemplateCache', function () {
        it('should allow to register a default template', function () {
            var tmpl = new Template_1.Template();
            TemplateCache_1.TemplateCache.registerTemplate('a template', tmpl, true, true);
            expect(TemplateCache_1.TemplateCache.getDefaultTemplates()).toEqual(jasmine.arrayContaining(['a template']));
            expect(TemplateCache_1.TemplateCache.getDefaultTemplate('a template')).toEqual(tmpl);
            TemplateCache_1.TemplateCache.unregisterTemplate('a template');
        });
        it('should allow to register a default template with a function', function () {
            TemplateCache_1.TemplateCache.registerTemplate('a template', function () { return "Hello World"; }, true, true);
            expect(TemplateCache_1.TemplateCache.getDefaultTemplate('a template').dataToString()).toEqual("Hello World");
            TemplateCache_1.TemplateCache.unregisterTemplate('a template');
        });
        it('should throw when trying to get a non existing template', function () {
            expect(function () { return TemplateCache_1.TemplateCache.getTemplate('a template'); }).toThrowError();
        });
        it('should try to rescan templates when trying to get a non existing template', function () {
            TemplateCache_1.TemplateCache.scanAndRegisterTemplates = jasmine.createSpy('spy');
            expect(function () { return TemplateCache_1.TemplateCache.getTemplate('a template'); }).toThrowError();
            expect(TemplateCache_1.TemplateCache.scanAndRegisterTemplates).toHaveBeenCalled();
        });
        it('should allow to register a non default template', function () {
            var tmpl = new Template_1.Template();
            TemplateCache_1.TemplateCache.registerTemplate('a template', tmpl, true, false);
            expect(TemplateCache_1.TemplateCache.getDefaultTemplates()).toEqual(jasmine.arrayContaining([]));
            expect(TemplateCache_1.TemplateCache.getTemplates()).toEqual(jasmine.objectContaining({ 'a template': tmpl }));
            expect(TemplateCache_1.TemplateCache.getTemplateNames()).toEqual(jasmine.arrayContaining(['a template']));
        });
    });
}
exports.TemplateCacheTest = TemplateCacheTest;
 
 
/***/ }),
/* 1703 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Template_1 = __webpack_require__(29);
var Fake_1 = __webpack_require__(11);
var ResponsiveComponents_1 = __webpack_require__(54);
var Dom_1 = __webpack_require__(0);
function TemplateTest() {
    describe('Template', function () {
        var result;
        var tmpl;
        beforeEach(function () {
            result = Fake_1.FakeResults.createFakeResult();
            tmpl = new Template_1.Template(function () { return "Hello World"; });
        });
        afterEach(function () {
            result = null;
            tmpl = null;
        });
        describe('with minimal configuration', function () {
            it('should instantiate to string', function () {
                expect(tmpl.instantiateToString(result)).toEqual("Hello World");
            });
        });
        describe('with extensive configuration', function () {
            it('should not instantiate to string with false condition check', function () {
                tmpl.condition = function () { return false; };
                expect(tmpl.instantiateToString(result)).toBeNull();
            });
            it('should instantiate to string with a true condition check', function () {
                tmpl.condition = function () { return true; };
                expect(tmpl.instantiateToString(result)).toBe("Hello World");
            });
            it('should skip condition check if specified', function () {
                tmpl.condition = function () { return false; };
                expect(tmpl.instantiateToString(result, { checkCondition: false })).toBe("Hello World");
            });
            it('should use conditionToParse if possible, and instantiate if true', function () {
                result.raw['foo'] = 'bar';
                tmpl.conditionToParse = 'raw.foo == "bar"';
                expect(tmpl.instantiateToString(result)).toBe("Hello World");
            });
            it('should use conditionToParse if possible, and not instantiate if false', function () {
                result.raw['foo'] = 'nomatch';
                tmpl.conditionToParse = 'raw.foo == "bar"';
                expect(tmpl.instantiateToString(result)).toBeNull();
            });
            it('should use fieldsToMatch if possible, and instantiate if true', function () {
                result.raw['foo'] = 'bar';
                tmpl.fieldsToMatch = [{ field: 'foo', values: ['bar'] }];
                expect(tmpl.instantiateToString(result)).toBe("Hello World");
            });
            it('should use fieldsToMatch if possible, and not instantiate if false', function () {
                result.raw['foo'] = 'nomatch';
                tmpl.fieldsToMatch = [{ field: 'foo', values: ['bar'] }];
                expect(tmpl.instantiateToString(result)).toBeNull();
            });
            it('should instantiate to element', function (done) {
                tmpl.instantiateToElement(result).then(function (created) {
                    expect(Dom_1.$$(created).text()).toBe("Hello World");
                    done();
                });
            });
            it('should return null when calling instantiate to element with a false condition', function () {
                tmpl.condition = function () { return false; };
                expect(tmpl.instantiateToElement(result)).toBeNull();
            });
            it('should correctly return the root HTMLElement when not wrapping in a div', function (done) {
                tmpl = new Template_1.Template(function () { return '<div class="my-stuff"></div>'; });
                tmpl.instantiateToElement(result, { wrapInDiv: false }).then(function (created) {
                    expect(Dom_1.$$(created).hasClass('my-stuff')).toBe(true);
                    done();
                });
            });
            it('should correctly return the root HTMLElement when not wrapping in a div even if there is a leading whitespace in the content', function (done) {
                tmpl = new Template_1.Template(function () { return '     <div class="my-stuff"></div>'; });
                tmpl.instantiateToElement(result, { wrapInDiv: false }).then(function (created) {
                    expect(Dom_1.$$(created).hasClass('my-stuff')).toBe(true);
                    done();
                });
            });
            it('should add the correct layout class', function (done) {
                tmpl.layout = 'card';
                tmpl.instantiateToElement(result).then(function (created) {
                    expect(Dom_1.$$(created).hasClass('coveo-card-layout')).toBe(true);
                    done();
                });
            });
            it('should add the correct layout class when specified in instantiateOptions', function (done) {
                tmpl.instantiateToElement(result, { currentLayout: 'table' }).then(function (created) {
                    expect(Dom_1.$$(created).hasClass('coveo-table-layout')).toBe(true);
                    done();
                });
            });
            it('should return the correct type', function () {
                expect(tmpl.getType()).toBe('Template');
            });
            describe('when checking for screen size', function () {
                var responsiveComponents;
                beforeEach(function () {
                    responsiveComponents = new ResponsiveComponents_1.ResponsiveComponents();
                });
                afterEach(function () {
                    responsiveComponents = null;
                });
                describe('if explicitly set for mobile', function () {
                    beforeEach(function () {
                        tmpl.mobile = true;
                    });
                    it("should not accept a template if it's not small screen width", function () {
                        responsiveComponents.isSmallScreenWidth = function () { return false; };
                        expect(tmpl.instantiateToString(result, { responsiveComponents: responsiveComponents })).toBeNull();
                    });
                    it("should accept a template if it's small screen width", function () {
                        responsiveComponents.isSmallScreenWidth = function () { return true; };
                        expect(tmpl.instantiateToString(result, { responsiveComponents: responsiveComponents })).toBe("Hello World");
                    });
                });
                describe('if explicitly set not for mobile', function () {
                    beforeEach(function () {
                        tmpl.mobile = false;
                    });
                    it("should accept a template if it's not small screen width", function () {
                        responsiveComponents.isSmallScreenWidth = function () { return false; };
                        expect(tmpl.instantiateToString(result, { responsiveComponents: responsiveComponents })).toBe("Hello World");
                    });
                    it("should not accept a template if it's small screen width", function () {
                        responsiveComponents.isSmallScreenWidth = function () { return true; };
                        expect(tmpl.instantiateToString(result, { responsiveComponents: responsiveComponents })).toBeNull();
                    });
                });
                describe('if explicitly set for tablet', function () {
                    beforeEach(function () {
                        tmpl.tablet = true;
                    });
                    it("should not accept a template if it's not medium screen width", function () {
                        responsiveComponents.isMediumScreenWidth = function () { return false; };
                        expect(tmpl.instantiateToString(result, { responsiveComponents: responsiveComponents })).toBeNull();
                    });
                    it("should accept a template if it's medium screen width", function () {
                        responsiveComponents.isMediumScreenWidth = function () { return true; };
                        expect(tmpl.instantiateToString(result, { responsiveComponents: responsiveComponents })).toBe("Hello World");
                    });
                });
                describe('if explicitly set not for tablet', function () {
                    beforeEach(function () {
                        tmpl.tablet = false;
                    });
                    it("should accept a template if it's not medium screen width", function () {
                        responsiveComponents.isMediumScreenWidth = function () { return false; };
                        expect(tmpl.instantiateToString(result, { responsiveComponents: responsiveComponents })).toBe("Hello World");
                    });
                    it("should not accept a template if it's medium screen width", function () {
                        responsiveComponents.isMediumScreenWidth = function () { return true; };
                        expect(tmpl.instantiateToString(result, { responsiveComponents: responsiveComponents })).toBeNull();
                    });
                });
                describe('if explicitly set for desktop', function () {
                    beforeEach(function () {
                        tmpl.desktop = true;
                    });
                    it("should not accept a template if it's not large screen width", function () {
                        responsiveComponents.isLargeScreenWidth = function () { return false; };
                        expect(tmpl.instantiateToString(result, { responsiveComponents: responsiveComponents })).toBeNull();
                    });
                    it("should accept a template if it's large screen width", function () {
                        responsiveComponents.isLargeScreenWidth = function () { return true; };
                        expect(tmpl.instantiateToString(result, { responsiveComponents: responsiveComponents })).toBe("Hello World");
                    });
                });
                describe('if explicitly set not for desktop', function () {
                    beforeEach(function () {
                        tmpl.desktop = false;
                    });
                    it("should accept a template if it's not large screen width", function () {
                        responsiveComponents.isLargeScreenWidth = function () { return false; };
                        expect(tmpl.instantiateToString(result, { responsiveComponents: responsiveComponents })).toBe("Hello World");
                    });
                    it("should not accept a template if it's large screen width", function () {
                        responsiveComponents.isLargeScreenWidth = function () { return true; };
                        expect(tmpl.instantiateToString(result, { responsiveComponents: responsiveComponents })).toBeNull();
                    });
                });
            });
            describe('when checking for layout', function () {
                it('should not check for layout if not set', function () {
                    tmpl.layout = null;
                    expect(tmpl.instantiateToString(result, { currentLayout: 'card' })).toBe("Hello World");
                });
                it('should check for layout if set', function () {
                    tmpl.layout = 'list';
                    expect(tmpl.instantiateToString(result, { currentLayout: 'card' })).toBeNull();
                });
                it('should not check for layout if not set in the instantiate options', function () {
                    tmpl.layout = 'list';
                    expect(tmpl.instantiateToString(result)).toBe("Hello World");
                });
            });
        });
    });
}
exports.TemplateTest = TemplateTest;
 
 
/***/ }),
/* 1704 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Template_1 = __webpack_require__(29);
function DefaultInstantiateTemplateOptionsTest() {
    describe('DefaultInstantiateTemplateOptions', function () {
        var saneDefaults;
        beforeEach(function () {
            saneDefaults = {
                checkCondition: true,
                currentLayout: null,
                wrapInDiv: true
            };
        });
        it('should have sane default', function () {
            var defaults = new Template_1.DefaultInstantiateTemplateOptions();
            expect(defaults.checkCondition).toBe(saneDefaults.checkCondition);
            expect(defaults.currentLayout).toBe(saneDefaults.currentLayout);
            expect(defaults.wrapInDiv).toBe(saneDefaults.wrapInDiv);
            expect(defaults.responsiveComponents).toBeDefined();
        });
        it('should allow to get sane defaults', function () {
            var defaults = new Template_1.DefaultInstantiateTemplateOptions();
            expect(defaults.get()).toEqual(jasmine.objectContaining(saneDefaults));
        });
        it('should allow to merge with another IInstantiateTemplateOptions', function () {
            var merged = new Template_1.DefaultInstantiateTemplateOptions().merge({
                checkCondition: false
            });
            expect(merged.checkCondition).toBe(false);
        });
        it('should not fail when merging with undefined', function () {
            expect(function () { return new Template_1.DefaultInstantiateTemplateOptions().merge(null); }).not.toThrowError();
            var merged = new Template_1.DefaultInstantiateTemplateOptions().merge(null);
            expect(merged.checkCondition).toBe(true);
        });
    });
}
exports.DefaultInstantiateTemplateOptionsTest = DefaultInstantiateTemplateOptionsTest;
 
 
/***/ }),
/* 1705 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var HtmlTemplate_1 = __webpack_require__(217);
function HtmlTemplateTest() {
    describe('HtmlTemplate', function () {
        it('should instantiate from a script element', function () {
            var element = document.createElement('script');
            element.setAttribute('data-layout', 'card');
            var createdTemplate = HtmlTemplate_1.HtmlTemplate.create(element);
            expect(createdTemplate.layout).toEqual('card');
            expect(createdTemplate.mobile).not.toBeDefined();
            expect(createdTemplate.getFields()).toEqual(jasmine.arrayContaining([]));
        });
        it('should instantiate from a string', function () {
            var createdTemplate = HtmlTemplate_1.HtmlTemplate.fromString("<div class=\"CoveoResultLink\" data-field=\"@foo\"></div>", {
                mobile: true
            });
            expect(createdTemplate.getFields()).toEqual(jasmine.arrayContaining(['foo', 'author', 'source']));
            expect(createdTemplate.layout).toEqual('list');
            expect(createdTemplate.mobile).toBe(true);
        });
        it('created element should have no attribute type', function () {
            var element = document.createElement('script');
            var createdTemplate = HtmlTemplate_1.HtmlTemplate.create(element);
            var createdHtmlElement = createdTemplate.toHtmlElement();
            expect(createdHtmlElement.getAttribute('type')).toEqual(null);
        });
        it('created element from string should have no attribute type', function () {
            var createdTemplate = HtmlTemplate_1.HtmlTemplate.fromString("<div class=\"CoveoResultLink\" data-field=\"@foo\"></div>", {});
            expect(createdTemplate.element.getAttribute('type')).toEqual(null);
        });
    });
}
exports.HtmlTemplateTest = HtmlTemplateTest;
 
 
/***/ }),
/* 1706 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var TemplateFromAScriptTag_1 = __webpack_require__(304);
var Template_1 = __webpack_require__(29);
var Dom_1 = __webpack_require__(0);
function TemplateFromAScriptTagTest() {
    describe('TemplateFromAScriptTag', function () {
        var tmpl;
        beforeEach(function () {
            tmpl = new Template_1.Template(function () { return 'Hello World'; });
        });
        afterEach(function () {
            tmpl = null;
        });
        it('should be able to instantiate from a script tag', function () {
            var scriptTag = document.createElement('script');
            expect(function () { return new TemplateFromAScriptTag_1.TemplateFromAScriptTag(tmpl, scriptTag); }).not.toThrowError();
        });
        it('should be able to pickup fields on the script element', function () {
            var scriptTag = document.createElement('script');
            scriptTag.setAttribute('data-fields', '@foo,@bar');
            var created = new TemplateFromAScriptTag_1.TemplateFromAScriptTag(tmpl, scriptTag);
            expect(created.template.getFields()).toEqual(jasmine.arrayContaining(['foo', 'bar']));
        });
        describe('when there are fields to match directly on the the HTMLElement', function () {
            var createMatcher = function (field, values) {
                return jasmine.arrayContaining([
                    jasmine.objectContaining({
                        field: field,
                        values: values
                    })
                ]);
            };
            it('should extract fields to match from the HTMLScript element', function () {
                var scriptTag = Dom_1.$$('script', {
                    'data-field-foo': 'bar'
                }).el;
                var created = new TemplateFromAScriptTag_1.TemplateFromAScriptTag(tmpl, scriptTag);
                expect(created.template.fieldsToMatch).toEqual(createMatcher('foo', ['bar']));
            });
            it('should extract fields to match with underscore', function () {
                var scriptTag = Dom_1.$$('script', {
                    'data-field-foo___something_bar': 'baz'
                }).el;
                var created = new TemplateFromAScriptTag_1.TemplateFromAScriptTag(tmpl, scriptTag);
                expect(created.template.fieldsToMatch).toEqual(createMatcher('foo___something_bar', ['baz']));
            });
            it('should trim field values', function () {
                var scriptTag = Dom_1.$$('script', {
                    'data-field-foo': '1, 2 ,  3,4  ,5'
                }).el;
                var created = new TemplateFromAScriptTag_1.TemplateFromAScriptTag(tmpl, scriptTag);
                expect(created.template.fieldsToMatch).toEqual(createMatcher('foo', ['1', '2', '3', '4', '5']));
            });
            it('should extract fields to match with dots', function () {
                var scriptTag = Dom_1.$$('script', {
                    'data-field-foo.bar.baz': 'hello'
                }).el;
                var created = new TemplateFromAScriptTag_1.TemplateFromAScriptTag(tmpl, scriptTag);
                expect(created.template.fieldsToMatch).toEqual(createMatcher('foo.bar.baz', ['hello']));
            });
        });
        describe('instantiated from a string', function () {
            var tmplString;
            beforeEach(function () {
                tmplString = "<div class=\"CoveoResultLink\"></div>";
            });
            afterEach(function () {
                tmplString = null;
            });
            it('should work with a condition', function () {
                var createdScriptElement = TemplateFromAScriptTag_1.TemplateFromAScriptTag.fromString(tmplString, {
                    condition: "raw.foo != null"
                });
                var created = new TemplateFromAScriptTag_1.TemplateFromAScriptTag(tmpl, createdScriptElement);
                expect(created.template.condition).toEqual(jasmine.any(Function));
            });
            it('should work with a layout', function () {
                var createdScriptElement = TemplateFromAScriptTag_1.TemplateFromAScriptTag.fromString(tmplString, {
                    layout: 'list'
                });
                var created = new TemplateFromAScriptTag_1.TemplateFromAScriptTag(tmpl, createdScriptElement);
                expect(created.template.layout).toBe('list');
            });
            it('should work with mobile option', function () {
                var createdScriptElement = TemplateFromAScriptTag_1.TemplateFromAScriptTag.fromString(tmplString, {
                    mobile: true
                });
                var created = new TemplateFromAScriptTag_1.TemplateFromAScriptTag(tmpl, createdScriptElement);
                expect(created.template.mobile).toBe(true);
            });
            it('should work with tablet option', function () {
                var createdScriptElement = TemplateFromAScriptTag_1.TemplateFromAScriptTag.fromString(tmplString, {
                    tablet: true
                });
                var created = new TemplateFromAScriptTag_1.TemplateFromAScriptTag(tmpl, createdScriptElement);
                expect(created.template.tablet).toBe(true);
            });
            it('should work with desktop option', function () {
                var createdScriptElement = TemplateFromAScriptTag_1.TemplateFromAScriptTag.fromString(tmplString, {
                    desktop: true
                });
                var created = new TemplateFromAScriptTag_1.TemplateFromAScriptTag(tmpl, createdScriptElement);
                expect(created.template.desktop).toBe(true);
            });
            it('should work with fields to match', function () {
                var createdScriptElement = TemplateFromAScriptTag_1.TemplateFromAScriptTag.fromString(tmplString, {
                    fieldsToMatch: [
                        {
                            field: 'foo',
                            values: ['bar', 'baz']
                        }
                    ]
                });
                var created = new TemplateFromAScriptTag_1.TemplateFromAScriptTag(tmpl, createdScriptElement);
                expect(created.template.fieldsToMatch).toEqual(jasmine.arrayContaining([
                    jasmine.objectContaining({
                        field: 'foo',
                        values: ['bar', 'baz']
                    })
                ]));
            });
            it('should work with fields to match with no values', function () {
                var createdScriptElement = TemplateFromAScriptTag_1.TemplateFromAScriptTag.fromString(tmplString, {
                    fieldsToMatch: [
                        {
                            field: 'foo'
                        }
                    ]
                });
                var created = new TemplateFromAScriptTag_1.TemplateFromAScriptTag(tmpl, createdScriptElement);
                expect(created.template.fieldsToMatch).toEqual(jasmine.arrayContaining([
                    jasmine.objectContaining({
                        field: 'foo',
                        values: undefined
                    })
                ]));
            });
        });
    });
}
exports.TemplateFromAScriptTagTest = TemplateFromAScriptTagTest;
 
 
/***/ }),
/* 1707 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { Iif (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        Iif (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            Iif (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
            Iif (y = 0, t) op = [0, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    Eif (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        Iif (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
Object.defineProperty(exports, "__esModule", { value: true });
var TemplateList_1 = __webpack_require__(135);
var Fake_1 = __webpack_require__(11);
var DefaultResultTemplate_1 = __webpack_require__(173);
var Template_1 = __webpack_require__(29);
function TemplateListTest() {
    var _this = this;
    describe('TemplateList', function () {
        var result;
        beforeEach(function () {
            result = Fake_1.FakeResults.createFakeResult();
        });
        afterEach(function () {
            result = null;
        });
        it('should throw when passing null or undefined in constructor', function () {
            expect(function () { return new TemplateList_1.TemplateList(null); }).toThrow();
            expect(function () { return new TemplateList_1.TemplateList(undefined); }).toThrow();
        });
        describe('when there are no templates', function () {
            it('should return a default result template when instantiating to element', function (done) { return __awaiter(_this, void 0, void 0, function () {
                var templateList, element;
                return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0:
                            templateList = new TemplateList_1.TemplateList([]);
                            return [4 /*yield*/, templateList.instantiateToElement(result)];
                        case 1:
                            element = _a.sent();
                            expect(element.innerHTML).toEqual(new DefaultResultTemplate_1.DefaultResultTemplate().instantiateToString(result));
                            done();
                            return [2 /*return*/];
                    }
                });
            }); });
            it('should return a default result template when instantiating to string', function () {
                var templateList = new TemplateList_1.TemplateList([]);
                var stringCreated = templateList.instantiateToString(result);
                expect(stringCreated).toEqual(new DefaultResultTemplate_1.DefaultResultTemplate().instantiateToString(result));
            });
        });
        describe('when there are templates', function () {
            var templates;
            beforeEach(function () {
                templates = [];
                templates[0] = new Template_1.Template(function () { return "Template 1"; });
                templates[1] = new Template_1.Template(function () { return "Template 2"; });
            });
            afterEach(function () {
                templates = null;
            });
            it('should evaluate the first one first', function () {
                var templateList = new TemplateList_1.TemplateList(templates);
                expect(templateList.instantiateToString(result)).toEqual("Template 1");
            });
            it('should skip the first one if condition does not match', function () {
                templates[0].condition = function (result) { return result.raw['foo'] == 'baz'; };
                var templateList = new TemplateList_1.TemplateList(templates);
                expect(templateList.instantiateToString(result)).toEqual("Template 2");
            });
            it('should skip the first one if the conditionToParse does not match', function () {
                templates[0].conditionToParse = "raw.foo == \"baz\"";
                var templateList = new TemplateList_1.TemplateList(templates);
                expect(templateList.instantiateToString(result)).toEqual("Template 2");
            });
            it('should skip the first one if the fieldsToMatch does not match', function () {
                templates[0].fieldsToMatch = [
                    {
                        field: 'foo',
                        values: ['bar', 'baz']
                    }
                ];
                var templateList = new TemplateList_1.TemplateList(templates);
                expect(templateList.instantiateToString(result)).toEqual("Template 2");
            });
            it('should return a default template if all condition does not match', function () {
                templates[0].condition = function () { return false; };
                templates[1].condition = function () { return false; };
                var templateList = new TemplateList_1.TemplateList(templates);
                expect(templateList.instantiateToString(result)).toEqual(new DefaultResultTemplate_1.DefaultResultTemplate().instantiateToString(result));
            });
            it('should be able to return fields', function () {
                templates[0].fields = ['a', 'b'];
                templates[1].fields = ['b', 'c'];
                var templateList = new TemplateList_1.TemplateList(templates);
                expect(templateList.getFields()).toEqual(jasmine.arrayContaining(['a', 'b', 'c']));
            });
        });
    });
}
exports.TemplateListTest = TemplateListTest;
 
 
/***/ }),
/* 1708 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var UnderscoreTemplate_1 = __webpack_require__(90);
var Fake_1 = __webpack_require__(11);
function UnderscoreTemplateTest() {
    describe('UnderscoreTemplate', function () {
        var element;
        var result;
        beforeEach(function () {
            element = document.createElement('script');
            element.innerHTML = '<div><%= clickUri %><div class="CoveoResultLink" data-field="@foo"></div></div>';
            result = Fake_1.FakeResults.createFakeResult();
        });
        it('should be able to create an HTMLElement', function () {
            var scriptCreated = new UnderscoreTemplate_1.UnderscoreTemplate(element).toHtmlElement();
            expect(scriptCreated.getAttribute('type')).toEqual('text/underscore');
        });
        it('should be able to return a valid UnderscoreTemplate from string', function () {
            var template = UnderscoreTemplate_1.UnderscoreTemplate.fromString(element.innerHTML, {});
            expect(template.instantiateToString(result).indexOf(result.clickUri)).toBeGreaterThan(0);
        });
        it('should be able to return the type', function () {
            var template = UnderscoreTemplate_1.UnderscoreTemplate.create(element);
            expect(template.getType()).toEqual('UnderscoreTemplate');
        });
        it('should be able to get the fields', function () {
            var template = UnderscoreTemplate_1.UnderscoreTemplate.create(element);
            expect(template.getFields()).toEqual(jasmine.arrayContaining(['foo']));
        });
    });
}
exports.UnderscoreTemplateTest = UnderscoreTemplateTest;
 
 
/***/ }),
/* 1709 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var ResponsiveComponents_1 = __webpack_require__(54);
var Mock = __webpack_require__(2);
function ResponsiveComponentsTest() {
    describe('ResponsiveComponents', function () {
        var responsiveComponent;
        var windoh;
        beforeEach(function () {
            windoh = Mock.mockWindow();
            responsiveComponent = new ResponsiveComponents_1.ResponsiveComponents(windoh);
        });
        afterEach(function () {
            responsiveComponent = null;
            windoh = null;
        });
        it('should return something for small screen width, even if not set beforehand', function () {
            expect(responsiveComponent.getSmallScreenWidth()).toBeDefined();
        });
        it('should return the size that we set for small screen width', function () {
            responsiveComponent.setSmallScreenWidth(1);
            expect(responsiveComponent.getSmallScreenWidth()).toEqual(1);
        });
        it('should return something for medium screen width, even if not set beforehand', function () {
            expect(responsiveComponent.getMediumScreenWidth()).toBeDefined();
        });
        it('should return the size that we set for medium screen width', function () {
            responsiveComponent.setMediumScreenWidth(1234);
            expect(responsiveComponent.getMediumScreenWidth()).toEqual(1234);
        });
        it('should throw if setting an invalid smallScreenWidth', function () {
            expect(function () { return responsiveComponent.setSmallScreenWidth(99999); }).toThrowError();
        });
        it('should throw if setting an invalid mediumScreenWidth', function () {
            expect(function () { return responsiveComponent.setMediumScreenWidth(10); }).toThrowError();
        });
        it('should return auto for responsive mode, if not set beforehand', function () {
            expect(responsiveComponent.getResponsiveMode()).toBe('auto');
        });
        it('should return the responsive mode setted', function () {
            responsiveComponent.setResponsiveMode('small');
            expect(responsiveComponent.getResponsiveMode()).toBe('small');
        });
        it('should throw if setting any breakpoints while responsive mode is not auto', function () {
            // Work with auto.
            responsiveComponent.setResponsiveMode('auto');
            expect(function () { return responsiveComponent.setSmallScreenWidth(1); }).not.toThrowError();
            expect(function () { return responsiveComponent.setMediumScreenWidth(2); }).not.toThrowError();
            // Fail with not auto.
            responsiveComponent.setResponsiveMode('small');
            expect(function () { return responsiveComponent.setSmallScreenWidth(1); }).toThrowError();
            expect(function () { return responsiveComponent.setMediumScreenWidth(2); }).toThrowError();
        });
        describe('with a small screen width and auto responsive mode', function () {
            beforeEach(function () {
                windoh['clientWidth'] = ResponsiveComponents_1.SMALL_SCREEN_WIDTH;
                responsiveComponent = new ResponsiveComponents_1.ResponsiveComponents(windoh);
                responsiveComponent.setResponsiveMode('auto');
            });
            it('isSmallScreenWidth should return true', function () {
                expect(responsiveComponent.isSmallScreenWidth()).toBe(true);
            });
            it('isMediumScreenWidth should return false', function () {
                expect(responsiveComponent.isMediumScreenWidth()).toBe(false);
            });
            it('isLargeScreenWidth should return false', function () {
                expect(responsiveComponent.isLargeScreenWidth()).toBe(false);
            });
        });
        describe('with a medium screen width and auto responsive mode', function () {
            beforeEach(function () {
                windoh['clientWidth'] = ResponsiveComponents_1.MEDIUM_SCREEN_WIDTH;
                responsiveComponent = new ResponsiveComponents_1.ResponsiveComponents(windoh);
                responsiveComponent.setResponsiveMode('auto');
            });
            it('isSmallScreenWidth should return false', function () {
                expect(responsiveComponent.isSmallScreenWidth()).toBe(false);
            });
            it('isMediumScreenWidth should return true', function () {
                expect(responsiveComponent.isMediumScreenWidth()).toBe(true);
            });
            it('isLargeScreenWidth should return false', function () {
                expect(responsiveComponent.isLargeScreenWidth()).toBe(false);
            });
        });
        describe('with a large screen width and auto responsive mode', function () {
            beforeEach(function () {
                windoh['clientWidth'] = ResponsiveComponents_1.MEDIUM_SCREEN_WIDTH + 1;
                responsiveComponent = new ResponsiveComponents_1.ResponsiveComponents(windoh);
                responsiveComponent.setResponsiveMode('auto');
            });
            it('isSmallScreenWidth should return false', function () {
                expect(responsiveComponent.isSmallScreenWidth()).toBe(false);
            });
            it('isMediumScreenWidth should return false', function () {
                expect(responsiveComponent.isMediumScreenWidth()).toBe(false);
            });
            it('isLargeScreenWidth should return true', function () {
                expect(responsiveComponent.isLargeScreenWidth()).toBe(true);
            });
        });
        describe('with a small responsiveMode and a screen width outside the small range', function () {
            beforeEach(function () {
                windoh['clientWidth'] = ResponsiveComponents_1.MEDIUM_SCREEN_WIDTH;
                responsiveComponent = new ResponsiveComponents_1.ResponsiveComponents(windoh);
                responsiveComponent.setResponsiveMode('small');
            });
            it('should return positive infinity for small breakpoint', function () {
                expect(responsiveComponent.getSmallScreenWidth()).toBe(Number.POSITIVE_INFINITY);
            });
            it('should return 0 for medium breakpoint', function () {
                expect(responsiveComponent.getMediumScreenWidth()).toBe(0);
            });
            it('isSmallScreenWidth should return true', function () {
                expect(responsiveComponent.isSmallScreenWidth()).toBe(true);
            });
            it('isMediumScreenWidth should return false', function () {
                expect(responsiveComponent.isMediumScreenWidth()).toBe(false);
            });
            it('isLargeScreenWidth should return false', function () {
                expect(responsiveComponent.isLargeScreenWidth()).toBe(false);
            });
        });
        describe('with a medium responsiveMode and a screen width outside the medium range', function () {
            beforeEach(function () {
                windoh['clientWidth'] = ResponsiveComponents_1.SMALL_SCREEN_WIDTH;
                responsiveComponent = new ResponsiveComponents_1.ResponsiveComponents(windoh);
                responsiveComponent.setResponsiveMode('medium');
            });
            it('should return 0 for small breakpoint', function () {
                expect(responsiveComponent.getSmallScreenWidth()).toBe(0);
            });
            it('should return positive infinity for medium breakpoint', function () {
                expect(responsiveComponent.getMediumScreenWidth()).toBe(Number.POSITIVE_INFINITY);
            });
            it('isSmallScreenWidth should return false', function () {
                expect(responsiveComponent.isSmallScreenWidth()).toBe(false);
            });
            it('isMediumScreenWdith should return true', function () {
                expect(responsiveComponent.isMediumScreenWidth()).toBe(true);
            });
            it('isLargeScreenWidth should return false', function () {
                expect(responsiveComponent.isLargeScreenWidth()).toBe(false);
            });
        });
        describe('with a large responsiveMode and a screen width outside the large range', function () {
            beforeEach(function () {
                windoh['clientWidth'] = ResponsiveComponents_1.SMALL_SCREEN_WIDTH;
                responsiveComponent = new ResponsiveComponents_1.ResponsiveComponents(windoh);
                responsiveComponent.setResponsiveMode('large');
            });
            it('isSmallScreenWidth should return false', function () {
                expect(responsiveComponent.isSmallScreenWidth()).toBe(false);
            });
            it('isMediumScreenWidth should return false', function () {
                expect(responsiveComponent.isMediumScreenWidth()).toBe(false);
            });
            it('isLargeScreenWidth should return true', function () {
                expect(responsiveComponent.isLargeScreenWidth()).toBe(true);
            });
        });
    });
}
exports.ResponsiveComponentsTest = ResponsiveComponentsTest;
 
 
/***/ }),
/* 1710 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Dom_1 = __webpack_require__(0);
var ResponsiveComponentsManager_1 = __webpack_require__(70);
var Mock = __webpack_require__(2);
var SearchInterface_1 = __webpack_require__(25);
var Component_1 = __webpack_require__(6);
var ResponsiveTabs_1 = __webpack_require__(396);
var Tab_1 = __webpack_require__(201);
var Core_1 = __webpack_require__(9);
var ResponsiveFacets_1 = __webpack_require__(146);
var Facet_1 = __webpack_require__(32);
var Simulate_1 = __webpack_require__(15);
function ResponsiveComponentsManagerTest() {
    var SMALL_RESPONSIVE_MODE = 'small';
    var root;
    var handleResizeEvent;
    var registerComponent;
    var responsiveComponentsManager;
    var responsiveComponent;
    var component;
    var setResponsiveMode = function (mode) {
        Component_1.Component.get(root.el, SearchInterface_1.SearchInterface).options.responsiveMode = mode;
    };
    describe('ResponsiveComponentsManager', function () {
        beforeEach(function () {
            var searchInterfaceMock = Mock.optionsSearchInterfaceSetup(SearchInterface_1.SearchInterface, {
                enableAutomaticResponsiveMode: true
            });
            root = Dom_1.$$(searchInterfaceMock.cmp.root);
            handleResizeEvent = jasmine.createSpy('handleResizeEvent');
            registerComponent = jasmine.createSpy('registerComponent');
            responsiveComponent = function () {
                this.needDrodpownWrapper = function () { };
                this.handleResizeEvent = handleResizeEvent;
                this.registerComponent = registerComponent;
                this.ID = 'id';
            };
            component = {};
            responsiveComponentsManager = new ResponsiveComponentsManager_1.ResponsiveComponentsManager(root);
        });
        it("when registering a tab with #enableResponsiveMode false and a responsive facet,\n    when triggering the #afterInitialization event,\n    it calls the #register instance method to make the facet responsive", function () {
            ResponsiveComponentsManager_1.ResponsiveComponentsManager['remainingComponentInitializations'] = 0;
            var tabOptions = { enableResponsiveMode: false };
            var tab = Mock.optionsComponentSetup(Tab_1.Tab, tabOptions);
            ResponsiveComponentsManager_1.ResponsiveComponentsManager.register(ResponsiveTabs_1.ResponsiveTabs, root, Tab_1.Tab.ID, tab.cmp, tabOptions);
            var facetOptions = {};
            var facet = Mock.optionsComponentSetup(Facet_1.Facet, facetOptions);
            ResponsiveComponentsManager_1.ResponsiveComponentsManager.register(ResponsiveFacets_1.ResponsiveFacets, root, Facet_1.Facet.ID, facet.cmp, facetOptions);
            var spy = spyOn(responsiveComponentsManager, 'register');
            root.trigger(Core_1.InitializationEvents.afterInitialization);
            expect(spy).toHaveBeenCalledTimes(1);
        });
        describe('when the search interface responsive mode is set to *auto*', function () {
            beforeEach(function () {
                setResponsiveMode('auto');
            });
            it('should calls handle resize event when resize listener is called', function (done) {
                root.width = function () { return 400; };
                responsiveComponentsManager.register(responsiveComponent, root, 'id', component, {});
                responsiveComponentsManager.resizeListener();
                setTimeout(function () {
                    expect(handleResizeEvent).toHaveBeenCalled();
                    done();
                }, 250);
            });
            it('should call resize listener of all ResponsiveComponentManager when resizeAllComponentsManager is called', function (done) {
                root.width = function () { return 400; };
                responsiveComponentsManager.register(responsiveComponent, root, 'id', component, {});
                ResponsiveComponentsManager_1.ResponsiveComponentsManager.resizeAllComponentsManager();
                setTimeout(function () {
                    expect(handleResizeEvent).toHaveBeenCalled();
                    done();
                }, 250);
            });
            describe('and the root element width is zero', function () {
                beforeEach(function () {
                    root.width = function () { return 0; };
                });
                it('should  not call handle resize event when resize listener is called', function (done) {
                    responsiveComponentsManager.register(responsiveComponent, root, 'id', component, {});
                    responsiveComponentsManager.resizeListener();
                    setTimeout(function () {
                        expect(handleResizeEvent).not.toHaveBeenCalled();
                        done();
                    }, 250);
                });
                it('should  not calls handle resize event when it registers component', function () {
                    responsiveComponentsManager.register(responsiveComponent, root, 'id', component, {});
                    expect(handleResizeEvent).not.toHaveBeenCalled();
                });
            });
        });
        describe('when the search interface responsive mode is not set to *auto*', function () {
            beforeEach(function () {
                setResponsiveMode(SMALL_RESPONSIVE_MODE);
            });
            describe('and the root element width is zero', function () {
                beforeEach(function () {
                    root.width = function () { return 0; };
                });
                it('should calls handle resize event when resize listener is called', function (done) {
                    responsiveComponentsManager.register(responsiveComponent, root, 'id', component, {});
                    responsiveComponentsManager.resizeListener();
                    setTimeout(function () {
                        expect(handleResizeEvent).toHaveBeenCalled();
                        done();
                    }, 250);
                });
            });
        });
        it('registers component even when the corresponding responsive class has already been instanciated', function () {
            responsiveComponentsManager.register(responsiveComponent, root, 'id', component, {});
            responsiveComponentsManager.register(responsiveComponent, root, 'id', component, {});
            expect(registerComponent).toHaveBeenCalledTimes(2);
        });
        it('should trigger a resize event once on the initial query success to account for page layout changes', function () {
            spyOn(ResponsiveComponentsManager_1.ResponsiveComponentsManager, 'resizeAllComponentsManager').and.callThrough();
            ResponsiveComponentsManager_1.ResponsiveComponentsManager.register(responsiveComponent, root, 'id', component, {});
            var env = new Mock.MockEnvironmentBuilder().withRoot(root.el).build();
            Simulate_1.Simulate.query(env);
            Simulate_1.Simulate.query(env);
            Simulate_1.Simulate.query(env);
            expect(ResponsiveComponentsManager_1.ResponsiveComponentsManager.resizeAllComponentsManager).toHaveBeenCalledTimes(1);
        });
    });
}
exports.ResponsiveComponentsManagerTest = ResponsiveComponentsManagerTest;
 
 
/***/ }),
/* 1711 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Mock = __webpack_require__(2);
var YouTubeThumbnail_1 = __webpack_require__(324);
var Dom_1 = __webpack_require__(0);
var RegisteredNamedMethods_1 = __webpack_require__(38);
var ResultLink_1 = __webpack_require__(56);
var Fake_1 = __webpack_require__(11);
var Simulate_1 = __webpack_require__(15);
function YouTubeThumbnailTest() {
    describe('YouTubeThumbnail', function () {
        var test;
        var result;
        beforeEach(function () {
            result = Fake_1.FakeResults.createFakeResult();
            result.raw['ytthumbnailurl'] = 'someurl';
            test = Mock.optionsResultComponentSetup(YouTubeThumbnail_1.YouTubeThumbnail, {}, result);
        });
        afterEach(function () {
            test = null;
            result = null;
        });
        it('should create a result link inside that can be opened', function () {
            var linkElement = Dom_1.$$(test.cmp.element).find('.CoveoResultLink');
            expect(linkElement).not.toBe(null);
            expect(RegisteredNamedMethods_1.get(linkElement) instanceof ResultLink_1.ResultLink).toBe(true);
        });
        it('should create an image inside', function () {
            var img = Dom_1.$$(test.cmp.element).find('img');
            expect(img).not.toBe(null);
            expect(img.getAttribute('src')).toBe('someurl');
        });
        it('should replace the image on a fail load', function (done) {
            var img = Dom_1.$$(test.cmp.element).find('img');
            var defaultErroHandler = img.onerror;
            img.onerror = function () {
                defaultErroHandler.apply(test.cmp);
                var svg = Dom_1.$$(test.cmp.element).find('svg');
                expect(svg).toBeDefined();
                expect(svg.style.width).toEqual(test.cmp.options.width);
                done();
            };
        });
        describe('exposes options', function () {
            it('width should allow to specify the width on the image', function () {
                test = Mock.optionsResultComponentSetup(YouTubeThumbnail_1.YouTubeThumbnail, { width: '123px' }, result);
                var img = Dom_1.$$(test.cmp.element).find('img');
                expect(Dom_1.$$(img).css('width')).toBe('123px');
            });
            it('height should allow to specify the height on the image', function () {
                test = Mock.optionsResultComponentSetup(YouTubeThumbnail_1.YouTubeThumbnail, { height: '123px' }, result);
                var img = Dom_1.$$(test.cmp.element).find('img');
                expect(Dom_1.$$(img).css('height')).toBe('123px');
            });
        });
        describe('with a fake modal box module', function () {
            var modalBox;
            beforeEach(function () {
                modalBox = Simulate_1.Simulate.modalBoxModule();
            });
            afterEach(function () {
                modalBox = null;
            });
            it('should not open the modal box if embed is set to false', function () {
                test = Mock.optionsResultComponentSetup(YouTubeThumbnail_1.YouTubeThumbnail, { embed: false }, result);
                test.cmp['modalbox']['modalboxModule'] = modalBox;
                test.cmp.openResultLink();
                expect(modalBox.open).not.toHaveBeenCalled();
            });
            it('should open the modal box if embed is set to true', function () {
                test = Mock.optionsResultComponentSetup(YouTubeThumbnail_1.YouTubeThumbnail, { embed: true }, result);
                test.cmp['modalbox']['modalboxModule'] = modalBox;
                test.cmp.openResultLink();
                expect(modalBox.open).toHaveBeenCalled();
            });
            it('should open an accessible modal', function () {
                test = Mock.optionsResultComponentSetup(YouTubeThumbnail_1.YouTubeThumbnail, { embed: true }, result);
                test.cmp['modalbox']['modalboxModule'] = modalBox;
                test.cmp.openResultLink();
                expect(test.cmp['modalbox'].isOpen).toEqual(true);
            });
            it("should pass the query result's title to the iframe", function () {
                test = Mock.optionsResultComponentSetup(YouTubeThumbnail_1.YouTubeThumbnail, { embed: true }, result);
                test.cmp['modalbox']['modalboxModule'] = modalBox;
                test.cmp.openResultLink();
                var modalContent = modalBox.open.calls.mostRecent().args[0];
                expect(modalContent.querySelector('iframe').title).toEqual(result.title);
            });
        });
        it('should call whatever method is associated on the result link when we try to open it', function (done) {
            var fakeResultLink = new ResultLink_1.ResultLink(Dom_1.$$('div').el, {
                onClick: function () {
                    expect(true).toBe(true);
                    done();
                }
            }, test.cmp.getBindings(), result);
            test.cmp.resultLink = Dom_1.$$(fakeResultLink.element);
            test.cmp.openResultLink();
        });
    });
}
exports.YouTubeThumbnailTest = YouTubeThumbnailTest;
 
 
/***/ }),
/* 1712 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Mock = __webpack_require__(2);
var ResultTagging_1 = __webpack_require__(827);
var Fake_1 = __webpack_require__(11);
var Dom_1 = __webpack_require__(0);
function ResultTaggingTest() {
    describe('ResultTagging', function () {
        var test;
        var result;
        beforeEach(function () {
            result = Fake_1.FakeResults.createFakeResult();
            result.raw['foo'] = 'value1;value2;value3';
            test = Mock.optionsResultComponentSetup(ResultTagging_1.ResultTagging, {
                field: '@foo'
            }, result);
        });
        afterEach(function () {
            result = null;
            test = null;
        });
        it('should display the current tags values', function () {
            var tags = Dom_1.$$(test.cmp.element).findAll('.coveo-result-tagging-coveo-tag a');
            expect(tags.length).toBe(3);
            expect(Dom_1.$$(tags[0]).text()).toBe('value1');
            expect(Dom_1.$$(tags[1]).text()).toBe('value2');
            expect(Dom_1.$$(tags[2]).text()).toBe('value3');
        });
    });
}
exports.ResultTaggingTest = ResultTaggingTest;
 
 
/***/ }),
/* 1713 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Mock = __webpack_require__(2);
var ResultsFiltersPreferences_1 = __webpack_require__(824);
var Dom_1 = __webpack_require__(0);
var PreferencesPanel_1 = __webpack_require__(266);
var Simulate_1 = __webpack_require__(15);
var BreadcrumbEvents_1 = __webpack_require__(33);
function ResultsFiltersPreferencesTest() {
    describe('ResultsFiltersPreferences', function () {
        var test;
        var testPreferencesPanel;
        beforeEach(function () {
            testPreferencesPanel = Mock.basicComponentSetup(PreferencesPanel_1.PreferencesPanel);
            test = Mock.advancedComponentSetup(ResultsFiltersPreferences_1.ResultsFiltersPreferences, new Mock.AdvancedComponentSetupOptions(undefined, undefined, function (env) {
                return env.withElement(testPreferencesPanel.cmp.element);
            }));
        });
        afterEach(function () {
            test = null;
        });
        it('should allow to createDom', function () {
            test.cmp.createDom();
            expect(test.cmp.container).not.toBeNull();
        });
        it('should allow to save', function () {
            test.cmp.createDom();
            expect(function () { return test.cmp.save(); }).not.toThrow();
        });
        describe('with a predetermined filter', function () {
            var testCaption = "Test my friend's' filter";
            beforeEach(function () {
                test = Mock.advancedComponentSetup(ResultsFiltersPreferences_1.ResultsFiltersPreferences, new Mock.AdvancedComponentSetupOptions(undefined, {
                    filters: (_a = {}, _a[testCaption] = { expression: 'test expression' }, _a)
                }, function (env) {
                    return env.withElement(testPreferencesPanel.cmp.element);
                }));
                var _a;
            });
            it('should allow to create the filter', function () {
                expect(function () { return test.cmp.createDom(); }).not.toThrow();
            });
            it('should log an analytics event when a filter is selected', function () {
                test.cmp.createDom();
                var choiceInput = Dom_1.$$(test.cmp.element).find('input');
                Dom_1.$$(choiceInput).trigger('change');
                expect(test.env.usageAnalytics.logSearchEvent).toHaveBeenCalled();
            });
            it('should trigger a query when a filter is selected', function () {
                test.cmp.createDom();
                var choiceInput = Dom_1.$$(test.cmp.element).find('input');
                Dom_1.$$(choiceInput).trigger('change');
                expect(test.env.queryController.executeQuery).toHaveBeenCalled();
            });
            it('should add the needed filter when the query is executed', function () {
                test.cmp.createDom();
                var choiceInput = Dom_1.$$(test.cmp.element).find('input');
                choiceInput.checked = true;
                Dom_1.$$(choiceInput).trigger('change');
                var simulation = Simulate_1.Simulate.query(test.env);
                expect(simulation.queryBuilder.build().aq).toBe('test expression');
            });
            it('should populate breadcrumb when a filter is active', function () {
                test.cmp.createDom();
                var choiceInput = Dom_1.$$(test.cmp.element).find('input');
                choiceInput.checked = true;
                Dom_1.$$(choiceInput).trigger('change');
                var breadcrumbItems = [];
                Dom_1.$$(test.env.root).trigger(BreadcrumbEvents_1.BreadcrumbEvents.populateBreadcrumb, { breadcrumbs: breadcrumbItems });
                expect(Dom_1.$$(breadcrumbItems[0].element).text()).toContain(testCaption);
            });
            it('breadcrumb element should have the right accessibility attributes', function () {
                test.cmp.createDom();
                var breadcrumbItems = [];
                Dom_1.$$(test.env.root).trigger(BreadcrumbEvents_1.BreadcrumbEvents.populateBreadcrumb, { breadcrumbs: breadcrumbItems });
                var breadcrumbValue = Dom_1.$$(breadcrumbItems[0].element).find('.coveo-value');
                expect(breadcrumbValue.getAttribute('aria-label')).toBe('Remove inclusion filter on ' + testCaption);
                expect(breadcrumbValue.getAttribute('role')).toBe('button');
                expect(breadcrumbValue.getAttribute('tabindex')).toBe('0');
            });
            it('should validate and save on form submit', function () {
                test.cmp.createDom();
                var form = Dom_1.$$(test.cmp.element).find('form');
                expect(function () { return Dom_1.$$(form).trigger('submit'); }).not.toThrow();
            });
            it('should not trigger a query when a full breadcrumb clear is triggered', function () {
                test.env.queryController.firstQuery = true;
                test.cmp.createDom();
                test.env.queryController.firstQuery = false;
                Dom_1.$$(test.env.root).trigger(BreadcrumbEvents_1.BreadcrumbEvents.clearBreadcrumb);
                expect(test.env.queryController.executeQuery).not.toHaveBeenCalled();
            });
            it('should not trigger a query when a filter is selected and it is the first query in the interface', function () {
                test.cmp.createDom();
                test.env.queryController.firstQuery = true;
                var choiceInput = Dom_1.$$(test.cmp.element).find('input');
                Dom_1.$$(choiceInput).trigger('change');
                expect(test.env.queryController.executeQuery).not.toHaveBeenCalled();
            });
        });
    });
}
exports.ResultsFiltersPreferencesTest = ResultsFiltersPreferencesTest;
 
 
/***/ }),
/* 1714 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Mock = __webpack_require__(2);
var FacetRange_1 = __webpack_require__(242);
var FacetValue_1 = __webpack_require__(51);
var Simulate_1 = __webpack_require__(15);
function FacetRangeTest() {
    describe('FacetRange', function () {
        var test;
        beforeEach(function () {
            test = Mock.optionsComponentSetup(FacetRange_1.FacetRange, { field: '@foo' });
        });
        afterEach(function () {
            test = null;
        });
        it('should allow to get a value caption for a facet value', function () {
            test = Mock.optionsComponentSetup(FacetRange_1.FacetRange, {
                field: '@foo',
                valueCaption: { hello: 'goodbye' }
            });
            var facetValue = FacetValue_1.FacetValue.create('hello');
            expect(test.cmp.getValueCaption(facetValue)).toEqual('goodbye');
        });
        it('should add a group by query', function () {
            var simulation = Simulate_1.Simulate.query(test.env);
            expect(simulation.queryBuilder.groupByRequests).toEqual(jasmine.arrayContaining([
                jasmine.objectContaining({
                    field: '@foo'
                })
            ]));
        });
        describe('with a date', function () {
            beforeEach(function () {
                test = Mock.optionsComponentSetup(FacetRange_1.FacetRange, {
                    field: '@foo',
                    dateField: true
                });
            });
            it('should allow to get a formatted value caption', function () {
                var facetValue = FacetValue_1.FacetValue.create('2015/01/01..2016/01/01');
                expect(test.cmp.getValueCaption(facetValue)).toEqual('1/1/2015 - 1/1/2016');
            });
        });
        it("when the facetValue's lookupValue is defined & identical to a range's label\n    should display the lookupValue (originally the label) instead of the formatted value", function () {
            test.cmp.options.ranges = [{ label: 'All dates' }];
            var facetValue = FacetValue_1.FacetValue.create('1900/01/31@18:38:50..2020/06/25@18:30:00');
            facetValue.lookupValue = 'All dates';
            expect(test.cmp.getValueCaption(facetValue)).toEqual('All dates');
        });
        it("when the facetValue's lookupValue is identical as the value\n    should display the formatted value", function () {
            var facetValue = FacetValue_1.FacetValue.create('1900/01/31@18:38:50..2020/06/25@18:30:00');
            facetValue.lookupValue = '1900/01/31@18:38:50..2020/06/25@18:30:00';
            expect(test.cmp.getValueCaption(facetValue)).toEqual('1/31/1900 - 6/25/2020');
        });
        it("when the facetValue's lookupValue is undefined\n    should display the formatted value", function () {
            var facetValue = FacetValue_1.FacetValue.create('1900/01/31@18:38:50..2020/06/25@18:30:00');
            expect(test.cmp.getValueCaption(facetValue)).toEqual('1/31/1900 - 6/25/2020');
        });
        describe('with a value format', function () {
            it('should allow to get a formatted value with a number ', function () {
                test = Mock.optionsComponentSetup(FacetRange_1.FacetRange, {
                    field: '@foo',
                    valueFormat: 'c0'
                });
                var facetValue = FacetValue_1.FacetValue.create('0.00000..9.999999');
                expect(test.cmp.getValueCaption(facetValue)).toEqual('$0 - $10');
            });
            it('should not work when the value caption option is defined', function () {
                test = Mock.optionsComponentSetup(FacetRange_1.FacetRange, {
                    field: '@foo',
                    valueFormat: 'c0',
                    valueCaption: {}
                });
                var facetValue = FacetValue_1.FacetValue.create('0.00000..9.999999');
                expect(test.cmp.getValueCaption(facetValue)).toEqual('0.00000..9.999999');
            });
            it("when a value is a date\n        should ignore the value format option and format the date", function () {
                test = Mock.optionsComponentSetup(FacetRange_1.FacetRange, {
                    field: '@foo',
                    valueFormat: 'c0'
                });
                var facetValue = FacetValue_1.FacetValue.create('2015/01/01..2016/01/01');
                expect(test.cmp.getValueCaption(facetValue)).toEqual('1/1/2015 - 1/1/2016');
            });
        });
        describe('with a group by results', function () {
            var getGroupByResultsForDateValues = function () {
                return [
                    {
                        field: '@foo',
                        values: [
                            {
                                value: '2017/01/01..2018/01/01',
                                numberOfResults: 10,
                                score: 10
                            },
                            {
                                value: '2015/01/01..2016/01/01',
                                numberOfResults: 10,
                                score: 10
                            }
                        ]
                    }
                ];
            };
            var getGroupByResultsForStandardValues = function () {
                return [
                    {
                        field: '@foo',
                        values: [
                            {
                                value: '3',
                                numberOfResults: 10,
                                score: 10
                            },
                            {
                                value: '1',
                                numberOfResults: 10,
                                score: 10
                            },
                            {
                                value: '2',
                                numberOfResults: 10,
                                score: 10
                            }
                        ]
                    }
                ];
            };
            it("should sort values if the range option is not specified, and it's a date", function () {
                test = Mock.optionsComponentSetup(FacetRange_1.FacetRange, {
                    field: '@foo',
                    dateField: true
                });
                var simulation = Simulate_1.Simulate.query(test.env, {
                    groupByResults: getGroupByResultsForDateValues()
                });
                expect(simulation.groupByResults[0].values[0].value).toEqual('2015/01/01..2016/01/01');
            });
            it("should sort values if the range option is not specified and it' a number", function () {
                test = Mock.optionsComponentSetup(FacetRange_1.FacetRange, {
                    field: '@foo',
                    dateField: false
                });
                var simulation = Simulate_1.Simulate.query(test.env, {
                    groupByResults: getGroupByResultsForStandardValues()
                });
                expect(simulation.groupByResults[0].values[0].value).toEqual('1');
            });
        });
    });
}
exports.FacetRangeTest = FacetRangeTest;
 
 
/***/ }),
/* 1715 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Dom_1 = __webpack_require__(0);
var InitializationPlaceholder_1 = __webpack_require__(305);
var InitializationEvents_1 = __webpack_require__(22);
var QueryEvents_1 = __webpack_require__(14);
var ResultListEvents_1 = __webpack_require__(48);
function InitializationPlaceholderTest() {
    describe('InitializationPlaceholder', function () {
        var root;
        beforeEach(function () {
            root = Dom_1.$$('div');
        });
        afterEach(function () {
            root = null;
        });
        describe('with full initialization styling', function () {
            beforeEach(function () {
                new InitializationPlaceholder_1.InitializationPlaceholder(root.el).withFullInitializationStyling();
            });
            it('should add the needed class', function () {
                expect(root.hasClass(InitializationPlaceholder_1.InitializationPlaceholder.INITIALIZATION_CLASS)).toBe(true);
            });
            it('should remove the needed class after components initialization', function () {
                Dom_1.$$(root).trigger(InitializationEvents_1.InitializationEvents.afterComponentsInitialization);
                expect(root.hasClass(InitializationPlaceholder_1.InitializationPlaceholder.INITIALIZATION_CLASS)).toBe(false);
            });
        });
        describe('for facets', function () {
            it('should add correct css class for facets', function () {
                var oneFacet = Dom_1.$$('div', { className: 'CoveoFacet' });
                root.append(oneFacet.el);
                new InitializationPlaceholder_1.InitializationPlaceholder(root.el).withPlaceholderForFacets();
                expect(oneFacet.hasClass(InitializationPlaceholder_1.InitializationPlaceholder.INITIALIZATION_CLASS)).toBe(true);
            });
            it('should add correct css class for facets range', function () {
                var oneFacet = Dom_1.$$('div', { className: 'CoveoFacetRange' });
                root.append(oneFacet.el);
                new InitializationPlaceholder_1.InitializationPlaceholder(root.el).withPlaceholderForFacets();
                expect(oneFacet.hasClass(InitializationPlaceholder_1.InitializationPlaceholder.INITIALIZATION_CLASS)).toBe(true);
            });
            it('should add correct css class for facets slider', function () {
                var oneFacet = Dom_1.$$('div', { className: 'CoveoFacetSlider' });
                root.append(oneFacet.el);
                new InitializationPlaceholder_1.InitializationPlaceholder(root.el).withPlaceholderForFacets();
                expect(oneFacet.hasClass(InitializationPlaceholder_1.InitializationPlaceholder.INITIALIZATION_CLASS)).toBe(true);
            });
            it('should add correct css class for hierarchical facet', function () {
                var oneFacet = Dom_1.$$('div', { className: 'CoveoHierarchicalFacet' });
                root.append(oneFacet.el);
                new InitializationPlaceholder_1.InitializationPlaceholder(root.el).withPlaceholderForFacets();
                expect(oneFacet.hasClass(InitializationPlaceholder_1.InitializationPlaceholder.INITIALIZATION_CLASS)).toBe(true);
            });
            it('should add correct css class for category facet', function () {
                var oneFacet = Dom_1.$$('div', { className: 'CoveoCategoryFacet' });
                root.append(oneFacet.el);
                new InitializationPlaceholder_1.InitializationPlaceholder(root.el).withPlaceholderForFacets();
                expect(oneFacet.hasClass(InitializationPlaceholder_1.InitializationPlaceholder.INITIALIZATION_CLASS)).toBe(true);
            });
            it('should transform the first 3 facets as a placeholder', function () {
                var oneFacet = Dom_1.$$('div', { className: 'CoveoFacet' });
                var twoFacet = Dom_1.$$('div', { className: 'CoveoFacet' });
                var threeFacet = Dom_1.$$('div', { className: 'CoveoFacet' });
                var fourFacet = Dom_1.$$('div', { className: 'CoveoFacet' });
                root.append(oneFacet.el);
                root.append(twoFacet.el);
                root.append(threeFacet.el);
                root.append(fourFacet.el);
                new InitializationPlaceholder_1.InitializationPlaceholder(root.el).withPlaceholderForFacets();
                expect(oneFacet.hasClass('coveo-with-placeholder')).toBe(true);
                expect(twoFacet.hasClass('coveo-with-placeholder')).toBe(true);
                expect(threeFacet.hasClass('coveo-with-placeholder')).toBe(true);
                expect(fourFacet.hasClass('coveo-with-placeholder')).toBe(false);
            });
            it('should remove placeholder for facet after components are initialized and after the first deferredQuerySucess', function () {
                var oneFacet = Dom_1.$$('div', { className: 'CoveoFacet' });
                root.append(oneFacet.el);
                new InitializationPlaceholder_1.InitializationPlaceholder(root.el).withPlaceholderForFacets();
                expect(oneFacet.hasClass(InitializationPlaceholder_1.InitializationPlaceholder.INITIALIZATION_CLASS)).toBe(true);
                expect(oneFacet.hasClass('coveo-with-placeholder')).toBe(true);
                Dom_1.$$(root).trigger(InitializationEvents_1.InitializationEvents.afterComponentsInitialization);
                Dom_1.$$(root).trigger(QueryEvents_1.QueryEvents.deferredQuerySuccess);
                expect(oneFacet.hasClass(InitializationPlaceholder_1.InitializationPlaceholder.INITIALIZATION_CLASS)).toBe(false);
                expect(oneFacet.hasClass('coveo-with-placeholder')).toBe(false);
            });
            it('should remove placeholder for facet after components are initialized and after the first query error', function () {
                var oneFacet = Dom_1.$$('div', { className: 'CoveoFacet' });
                root.append(oneFacet.el);
                new InitializationPlaceholder_1.InitializationPlaceholder(root.el).withPlaceholderForFacets();
                Dom_1.$$(root).trigger(InitializationEvents_1.InitializationEvents.afterComponentsInitialization);
                Dom_1.$$(root).trigger(QueryEvents_1.QueryEvents.queryError);
                expect(oneFacet.hasClass(InitializationPlaceholder_1.InitializationPlaceholder.INITIALIZATION_CLASS)).toBe(false);
                expect(oneFacet.hasClass('coveo-with-placeholder')).toBe(false);
            });
            it('should allow to modify the events on which facets placeholder will listen to remove the placeholder', function () {
                var oneFacet = Dom_1.$$('div', { className: 'CoveoFacet' });
                root.append(oneFacet.el);
                new InitializationPlaceholder_1.InitializationPlaceholder(root.el).withEventToRemovePlaceholder(QueryEvents_1.QueryEvents.doneBuildingQuery).withPlaceholderForFacets();
                Dom_1.$$(root).trigger(QueryEvents_1.QueryEvents.doneBuildingQuery);
                Dom_1.$$(root).trigger(QueryEvents_1.QueryEvents.deferredQuerySuccess);
                expect(oneFacet.hasClass(InitializationPlaceholder_1.InitializationPlaceholder.INITIALIZATION_CLASS)).toBe(false);
                expect(oneFacet.hasClass('coveo-with-placeholder')).toBe(false);
            });
        });
        describe('for searchbox', function () {
            var searchbox;
            beforeEach(function () {
                searchbox = Dom_1.$$('div', { className: 'CoveoSearchbox' });
                root.append(searchbox.el);
                new InitializationPlaceholder_1.InitializationPlaceholder(root.el).withPlaceholderSearchbox();
            });
            afterEach(function () {
                searchbox = null;
            });
            it('should add the needed css class on the searchbox', function () {
                expect(searchbox.hasClass(InitializationPlaceholder_1.InitializationPlaceholder.INITIALIZATION_CLASS)).toBe(true);
            });
            it('should remove the needed css class after components initialization', function () {
                Dom_1.$$(root).trigger(InitializationEvents_1.InitializationEvents.afterComponentsInitialization);
                expect(searchbox.hasClass(InitializationPlaceholder_1.InitializationPlaceholder.INITIALIZATION_CLASS)).toBe(false);
            });
        });
        describe('for result list', function () {
            var resultList;
            beforeEach(function () {
                resultList = Dom_1.$$('div', { className: 'CoveoResultList' });
                root.append(resultList.el);
                new InitializationPlaceholder_1.InitializationPlaceholder(root.el).withPlaceholderForResultList();
            });
            afterEach(function () {
                resultList = null;
            });
            it('should add the needed css class on the result list', function () {
                expect(resultList.hasClass(InitializationPlaceholder_1.InitializationPlaceholder.INITIALIZATION_CLASS)).toBe(true);
                expect(resultList.hasClass('coveo-with-placeholder')).toBe(true);
            });
            it('should remove the needed css class when a new result is displayed', function () {
                Dom_1.$$(root).trigger(ResultListEvents_1.ResultListEvents.newResultDisplayed);
                expect(resultList.hasClass(InitializationPlaceholder_1.InitializationPlaceholder.INITIALIZATION_CLASS)).toBe(false);
            });
            it('should take the first result list of type "list" and transform it to a placeholder', function () {
                var secondResultList = Dom_1.$$('div', { className: 'CoveoResultList', 'data-layout': 'card' });
                Dom_1.$$(root).prepend(secondResultList.el);
                new InitializationPlaceholder_1.InitializationPlaceholder(root.el).withPlaceholderForResultList();
                expect(Dom_1.$$(resultList.el).hasClass(InitializationPlaceholder_1.InitializationPlaceholder.INITIALIZATION_CLASS)).toBe(true);
                expect(Dom_1.$$(secondResultList.el).hasClass(InitializationPlaceholder_1.InitializationPlaceholder.INITIALIZATION_CLASS)).toBe(true);
                expect(Dom_1.$$(resultList.el).hasClass('coveo-with-placeholder')).toBe(true);
                expect(Dom_1.$$(secondResultList.el).hasClass('coveo-with-placeholder')).toBe(false);
            });
        });
        describe('with waiting for first query mode', function () {
            beforeEach(function () {
                new InitializationPlaceholder_1.InitializationPlaceholder(root.el).withWaitingForFirstQueryMode();
            });
            it('should add the needed css class on the root element', function () {
                expect(Dom_1.$$(root.el).hasClass('coveo-waiting-for-query')).toBe(true);
            });
            it('should quit waiting for first query when the first query is launched', function () {
                Dom_1.$$(root.el).trigger(QueryEvents_1.QueryEvents.duringQuery);
                expect(Dom_1.$$(root.el).hasClass('coveo-waiting-for-query')).toBe(false);
            });
        });
        it('should allow to hide the root element', function () {
            new InitializationPlaceholder_1.InitializationPlaceholder(root.el).withHiddenRootElement();
            expect(Dom_1.$$(root.el).hasClass('coveo-hidden')).toBe(true);
        });
        it('should allow to show the root element', function () {
            new InitializationPlaceholder_1.InitializationPlaceholder(root.el).withHiddenRootElement().withVisibleRootElement();
            expect(Dom_1.$$(root.el).hasClass('coveo-hidden')).toBe(false);
        });
    });
}
exports.InitializationPlaceholderTest = InitializationPlaceholderTest;
 
 
/***/ }),
/* 1716 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Facet_1 = __webpack_require__(32);
var Mock = __webpack_require__(2);
var FacetValue_1 = __webpack_require__(51);
var ValueElement_1 = __webpack_require__(329);
var AnalyticsActionListMeta_1 = __webpack_require__(7);
var ValueElementRenderer_1 = __webpack_require__(236);
var Core_1 = __webpack_require__(9);
var underscore_1 = __webpack_require__(1);
var MockElement_1 = __webpack_require__(1717);
var FacetSearch_1 = __webpack_require__(147);
function countValues(dictionaryToCount) {
    return underscore_1.mapObject(dictionaryToCount, function (listeners) { return listeners.length; });
}
function ValueElementTest() {
    describe('ValueElementTest', function () {
        var facet;
        var facetValue;
        var valueElementRenderer;
        var valueElement;
        var mockLabel;
        var mockStylishCheckbox;
        var mockExcludeIcon;
        var mockCheckbox;
        function mockRenderer() {
            var renderer = Mock.mock(ValueElementRenderer_1.ValueElementRenderer);
            renderer.label = (mockLabel = new MockElement_1.MockHTMLElement()).element;
            renderer.stylishCheckbox = (mockStylishCheckbox = new MockElement_1.MockHTMLElement()).element;
            renderer.excludeIcon = (mockExcludeIcon = new MockElement_1.MockHTMLElement()).element;
            renderer.checkbox = (mockCheckbox = new MockElement_1.MockHTMLElement()).element;
            return renderer;
        }
        function bindEvents() {
            valueElement.bindEvent({ displayNextTime: true, pinFacet: true });
        }
        beforeEach(function () {
            Core_1.Dom.useNativeJavaScriptEvents = true;
            facet = Mock.optionsComponentSetup(Facet_1.Facet, {
                field: '@field'
            }).cmp;
            facet.ensureDom();
            facet.facetSearch = Mock.mock(FacetSearch_1.FacetSearch);
            facetValue = Mock.mock(FacetValue_1.FacetValue);
            facetValue.excluded = false;
            facetValue.selected = false;
            valueElement = new ValueElement_1.ValueElement(facet, facetValue);
            valueElement.renderer = valueElementRenderer = mockRenderer();
        });
        it('should send one exclude UA event when excluding a facet value', function () {
            facetValue.excluded = false;
            facet.queryController.executeQuery = function (options) {
                options.beforeExecuteQuery();
                return Promise.resolve();
            };
            valueElement.toggleExcludeWithUA();
            expect(facet.usageAnalytics.logSearchEvent).toHaveBeenCalledTimes(1);
            expect(facet.usageAnalytics.logSearchEvent).toHaveBeenCalledWith(AnalyticsActionListMeta_1.analyticsActionCauseList.facetExclude, jasmine.any(Object));
        });
        it('should select facet value when select is called', function () {
            valueElement.select();
            expect(facetValue.selected).toBe(true);
            expect(facetValue.excluded).toBe(false);
            expect(valueElementRenderer.setCssClassOnListValueElement).toHaveBeenCalled();
        });
        it('should unselect facet value when unselect is called', function () {
            valueElement.unselect();
            expect(facetValue.selected).toBe(false);
            expect(facetValue.excluded).toBe(false);
            expect(valueElementRenderer.setCssClassOnListValueElement).toHaveBeenCalled();
        });
        it('should exclude facet value when exclude is called', function () {
            valueElement.exclude();
            expect(facetValue.selected).toBe(false);
            expect(facetValue.excluded).toBe(true);
            expect(valueElementRenderer.setCssClassOnListValueElement).toHaveBeenCalled();
        });
        it('should unexclude facet value element when unexclude is called', function () {
            valueElement.unexclude();
            expect(facetValue.selected).toBe(false);
            expect(facetValue.excluded).toBe(false);
            expect(valueElementRenderer.setCssClassOnListValueElement).toHaveBeenCalled();
        });
        describe('unselected and not excluded', function () {
            beforeEach(function () {
                bindEvents();
            });
            it('binds a click event to the label', function () {
                expect(countValues(mockLabel.eventListeners)).toEqual({ click: 1 });
            });
            it('binds a keydown event to the stylishCheckbox', function () {
                expect(countValues(mockStylishCheckbox.eventListeners)).toEqual({ keydown: 1 });
            });
            it('binds a click and a keydown event to the excludeIcon', function () {
                expect(countValues(mockExcludeIcon.eventListeners)).toEqual({ click: 1, keydown: 1 });
            });
            it('binds a change event to the checkbox', function () {
                expect(countValues(mockCheckbox.eventListeners)).toEqual({ change: 1 });
            });
            it('when the click event on the label is triggered, triggers the change event on the checkbox', function () {
                expect(mockCheckbox.manualEventTriggers).toEqual({});
                mockLabel.element.click();
                expect(countValues(mockCheckbox.manualEventTriggers)).toEqual({ change: 1 });
            });
            it('when the click event on the label is triggered, dismisses search results', function () {
                var dismissSearchResults = facet.facetSearch.dismissSearchResults;
                expect(dismissSearchResults).not.toHaveBeenCalled();
                mockLabel.element.click();
                expect(dismissSearchResults).toHaveBeenCalledTimes(1);
            });
            it('when the click event on the exclude icon is triggered, dismisses search results', function () {
                var dismissSearchResults = facet.facetSearch.dismissSearchResults;
                expect(dismissSearchResults).not.toHaveBeenCalled();
                mockExcludeIcon.element.click();
                expect(dismissSearchResults).toHaveBeenCalledTimes(1);
            });
        });
        describe('selected and unexcluded', function () {
            beforeEach(function () {
                valueElement.select();
                bindEvents();
            });
            it('when the click event on the label is triggered, dismisses search results', function () {
                var dismissSearchResults = facet.facetSearch.dismissSearchResults;
                expect(dismissSearchResults).not.toHaveBeenCalled();
                mockLabel.element.click();
                expect(dismissSearchResults).toHaveBeenCalledTimes(1);
            });
            it('when the click event on the exclude icon is triggered, dismisses search results', function () {
                var dismissSearchResults = facet.facetSearch.dismissSearchResults;
                expect(dismissSearchResults).not.toHaveBeenCalled();
                mockExcludeIcon.element.click();
                expect(dismissSearchResults).toHaveBeenCalledTimes(1);
            });
        });
        describe('unselected and excluded', function () {
            beforeEach(function () {
                valueElement.exclude();
                bindEvents();
            });
            it('binds a click event to the label', function () {
                expect(countValues(mockLabel.eventListeners)).toEqual({ click: 1 });
            });
            it('binds a keydown event to the stylishCheckbox', function () {
                expect(countValues(mockStylishCheckbox.eventListeners)).toEqual({ keydown: 1 });
            });
            it('binds a click and a keydown event to the excludeIcon', function () {
                expect(countValues(mockExcludeIcon.eventListeners)).toEqual({ click: 1, keydown: 1 });
            });
            it('binds a change event to the checkbox', function () {
                expect(countValues(mockCheckbox.eventListeners)).toEqual({ change: 1 });
            });
            it('when the click event on the label is triggered, does not trigger the change event on the checkbox', function () {
                mockLabel.element.click();
                expect(mockCheckbox.manualEventTriggers).toEqual({});
            });
            it('when the click event on the label is triggered, dismisses search results', function () {
                var dismissSearchResults = facet.facetSearch.dismissSearchResults;
                expect(dismissSearchResults).not.toHaveBeenCalled();
                mockLabel.element.click();
                expect(dismissSearchResults).toHaveBeenCalledTimes(1);
            });
            it('when the click event on the exclude icon is triggered, dismisses search results', function () {
                var dismissSearchResults = facet.facetSearch.dismissSearchResults;
                expect(dismissSearchResults).not.toHaveBeenCalled();
                mockExcludeIcon.element.click();
                expect(dismissSearchResults).toHaveBeenCalledTimes(1);
            });
        });
    });
}
exports.ValueElementTest = ValueElementTest;
 
 
/***/ }),
/* 1717 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
var MockEnvironment_1 = __webpack_require__(2);
var MockElement = /** @class */ (function () {
    function MockElement(constructorFunc) {
        var _this = this;
        this.eventListeners = {};
        this.manualEventTriggers = {};
        this.element = MockEnvironment_1.mock(constructorFunc);
        this.element.addEventListener.and.callFake(function (name, listener) {
            return _this.addEventListener(name, listener);
        });
        this.element.dispatchEvent.and.callFake(function (event) { return _this.dispatchEvent(event); });
        this.element['click'] = function () { return _this.dispatchEvent(new Event('click')); };
    }
    MockElement.prototype.addEventListener = function (name, listener) {
        this.eventListeners[name] = this.eventListeners[name] || [];
        this.eventListeners[name].push(listener);
    };
    MockElement.prototype.dispatchEvent = function (event) {
        var name = event.type;
        this.manualEventTriggers[name] = this.manualEventTriggers[name] || [];
        this.manualEventTriggers[name].push(event);
        Eif (this.eventListeners[name]) {
            this.eventListeners[name].forEach(function (listener) { return listener(event); });
        }
    };
    return MockElement;
}());
exports.MockElement = MockElement;
var MockHTMLElement = /** @class */ (function (_super) {
    __extends(MockHTMLElement, _super);
    function MockHTMLElement() {
        return _super.call(this, HTMLElement) || this;
    }
    return MockHTMLElement;
}(MockElement));
exports.MockHTMLElement = MockHTMLElement;
 
 
/***/ }),
/* 1718 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var PublicPathUtils_1 = __webpack_require__(647);
function PublicPathUtilsTest() {
    describe('PublicPathUtils', function () {
        var getCurrentScript;
        var getCoveoScript;
        var detectedPath = 'some/path/';
        var configuredPath = 'path';
        var fakeScript = { src: detectedPath + "script.js", tagName: 'SCRIPT' };
        beforeEach(function () {
            getCurrentScript = PublicPathUtils_1.PublicPathUtils.getCurrentScript;
            getCoveoScript = PublicPathUtils_1.PublicPathUtils.getCoveoScript;
            PublicPathUtils_1.PublicPathUtils.getCoveoScript = function () { return fakeScript; };
            PublicPathUtils_1.PublicPathUtils.reset();
        });
        afterEach(function () {
            PublicPathUtils_1.PublicPathUtils.getCurrentScript = getCurrentScript;
            PublicPathUtils_1.PublicPathUtils.getCoveoScript = getCoveoScript;
        });
        it('should set webpack public path when configuring resource root', function () {
            PublicPathUtils_1.PublicPathUtils.configureResourceRoot(configuredPath);
            expect(__webpack_require__.p).toBe(configuredPath);
        });
        describe('when document.currentScript is available', function () {
            beforeEach(function () {
                PublicPathUtils_1.PublicPathUtils.getCurrentScript = function () { return fakeScript; };
            });
            it('should get the resource root', function () {
                var result = PublicPathUtils_1.PublicPathUtils.getDynamicPublicPath();
                expect(result).toBe(detectedPath);
            });
            it('should get the resource root with a hash value', function () {
                var fakeScriptWithHashValue = { src: detectedPath + "script.js#some=value&other=value" };
                PublicPathUtils_1.PublicPathUtils.getCurrentScript = function () { return fakeScriptWithHashValue; };
                var result = PublicPathUtils_1.PublicPathUtils.getDynamicPublicPath();
                expect(result).toBe(detectedPath);
            });
            it('should get the public path from the resource root with a url parameter', function () {
                var fakeScriptWithUrlParam = { src: detectedPath + "script.js?someParam=1&otherParam=2" };
                PublicPathUtils_1.PublicPathUtils.getCurrentScript = function () { return fakeScriptWithUrlParam; };
                var result = PublicPathUtils_1.PublicPathUtils.getDynamicPublicPath();
                expect(result).toBe(detectedPath);
            });
            it('should set webpack public path to the detected resource root', function () {
                PublicPathUtils_1.PublicPathUtils.detectPublicPath();
                expect(__webpack_require__.p).toBe(detectedPath);
            });
            it('should detect the script after reseting the configured state', function () {
                PublicPathUtils_1.PublicPathUtils.configureResourceRoot(configuredPath);
                PublicPathUtils_1.PublicPathUtils.reset();
                PublicPathUtils_1.PublicPathUtils.detectPublicPath();
                expect(__webpack_require__.p).toBe(detectedPath);
            });
        });
        describe('when currentScript is undefined and getCoveoScript is available', function () {
            beforeEach(function () {
                PublicPathUtils_1.PublicPathUtils.getCurrentScript = function () { return undefined; };
                PublicPathUtils_1.PublicPathUtils.getCoveoScript = function () { return fakeScript; };
            });
            it('should get the resource root using the script that has coveo-script as its class', function () {
                var result = PublicPathUtils_1.PublicPathUtils.getDynamicPublicPath();
                expect(result).toBe(detectedPath);
            });
        });
        describe('when currentScript is undefined and getCoveoScript is not available', function () {
            var getElementsByTagName;
            beforeEach(function () {
                PublicPathUtils_1.PublicPathUtils.getCurrentScript = function () { return undefined; };
                PublicPathUtils_1.PublicPathUtils.getCoveoScript = function () { return undefined; };
                getElementsByTagName = document.getElementsByTagName;
                spyOn(document, 'getElementsByTagName').and.returnValue([fakeScript]);
            });
            afterEach(function () {
                document.getElementsByClassName = getElementsByTagName;
            });
            it('should get the resource root using the last available script', function () {
                var result = PublicPathUtils_1.PublicPathUtils.getDynamicPublicPath();
                expect(result).toBe(detectedPath);
            });
        });
        it('should use the manually configured path even after detecting the path', function () {
            PublicPathUtils_1.PublicPathUtils.configureResourceRoot(configuredPath);
            PublicPathUtils_1.PublicPathUtils.detectPublicPath();
            expect(__webpack_require__.p).toBe(configuredPath);
        });
    });
}
exports.PublicPathUtilsTest = PublicPathUtilsTest;
 
 
/***/ }),
/* 1719 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { Iif (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        Iif (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            Iif (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
            Iif (y = 0, t) op = [0, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    Eif (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        Iif (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
Object.defineProperty(exports, "__esModule", { value: true });
var DomUtils_1 = __webpack_require__(137);
var Fake_1 = __webpack_require__(11);
var MockEnvironment_1 = __webpack_require__(2);
var Test_1 = __webpack_require__(40);
var Initialization_1 = __webpack_require__(8);
var Dom_1 = __webpack_require__(0);
function DomUtilsTest() {
    var _this = this;
    describe('DomUtils', function () {
        var fakeResult;
        var env;
        beforeEach(function () {
            fakeResult = Fake_1.FakeResults.createFakeResult();
            env = new MockEnvironment_1.MockEnvironmentBuilder().withResult(fakeResult);
        });
        describe('getQuickviewHeader', function () {
            it('should support creating a quickview header with the passed in title', function (done) { return __awaiter(_this, void 0, void 0, function () {
                var header, link;
                return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0:
                            header = DomUtils_1.DomUtils.getQuickviewHeader(fakeResult, { title: 'foo', showDate: true }, env.build());
                            return [4 /*yield*/, Test_1.load('ResultLink')];
                        case 1:
                            _a.sent();
                            link = Dom_1.$$(header).find('.CoveoResultLink');
                            expect(Dom_1.$$(Test_1.get(link).element).text()).toEqual('foo');
                            done();
                            return [2 /*return*/];
                    }
                });
            }); });
            it('should use the result title as the quickview title when no title is passed', function (done) { return __awaiter(_this, void 0, void 0, function () {
                var header, link;
                return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0:
                            header = DomUtils_1.DomUtils.getQuickviewHeader(fakeResult, { title: undefined, showDate: true }, env.build());
                            return [4 /*yield*/, Test_1.load('ResultLink')];
                        case 1:
                            _a.sent();
                            link = Dom_1.$$(header).find('.CoveoResultLink');
                            expect(Dom_1.$$(Test_1.get(link).element).text()).toEqual(fakeResult.title);
                            done();
                            return [2 /*return*/];
                    }
                });
            }); });
            it('should display a date if requested', function () {
                var header = DomUtils_1.DomUtils.getQuickviewHeader(fakeResult, { title: 'title', showDate: true }, env.build());
                var time = Dom_1.$$(header).find('.coveo-quickview-time');
                expect(Dom_1.$$(time).text()).not.toBe('');
            });
            it('should not display a date if not requested', function () {
                var header = DomUtils_1.DomUtils.getQuickviewHeader(fakeResult, { title: 'title', showDate: false }, env.build());
                var time = Dom_1.$$(header).find('.coveo-quickview-time');
                expect(Dom_1.$$(time).text()).toBe('');
            });
            it('should not display a date if none is available', function () {
                fakeResult.raw.date = null;
                var header = DomUtils_1.DomUtils.getQuickviewHeader(fakeResult, { title: 'title', showDate: true }, env.build());
                var time = Dom_1.$$(header).find('.coveo-quickview-time');
                expect(Dom_1.$$(time).text()).toBe('');
            });
            describe('with a salesforce namespace', function () {
                var spy;
                beforeEach(function () {
                    Coveo.Salesforce = {};
                    spy = jasmine.createSpy('SalesforceResultLink');
                    Coveo.SalesforceResultLink = spy;
                    Initialization_1.LazyInitialization.registerLazyComponent('SalesforceResultLink', function () { return Promise.resolve(spy); });
                });
                afterEach(function () {
                    delete Coveo.Salesforce;
                    delete Coveo.SalesforceResultLink;
                });
                it('should try to load a salesforce result link', function (done) { return __awaiter(_this, void 0, void 0, function () {
                    return __generator(this, function (_a) {
                        switch (_a.label) {
                            case 0:
                                DomUtils_1.DomUtils.getQuickviewHeader(fakeResult, { title: 'foo', showDate: true }, env.build());
                                return [4 /*yield*/, Test_1.load('SalesforceResultLink')];
                            case 1:
                                _a.sent();
                                setTimeout(function () {
                                    expect(spy).toHaveBeenCalled();
                                    done();
                                }, 0);
                                return [2 /*return*/];
                        }
                    });
                }); });
            });
        });
        describe('highlight', function () {
            var content = 'This is some text content';
            it('should highlight the entire content with coveo-highlight by default', function () {
                expect(DomUtils_1.DomUtils.highlight(content)).toBe("<span class='coveo-highlight'>" + content + "</span>");
            });
            it('should highlight the entire content with whatever parameter is given', function () {
                var classToApply = 'my-odd-class';
                expect(DomUtils_1.DomUtils.highlight(content, classToApply)).toBe("<span class='" + classToApply + "'>" + content + "</span>");
            });
            var parseStringToHTMLElement = function (str) {
                var parent = document.createElement('div');
                parent.innerHTML = str;
                return parent.children[0];
            };
            it('should still return valid HTML if the class or content are empty', function () {
                expect(parseStringToHTMLElement(DomUtils_1.DomUtils.highlight('', '')) instanceof HTMLSpanElement).toBe(true, 'an instance of HTMLSpanElement');
                expect(parseStringToHTMLElement(DomUtils_1.DomUtils.highlight('', '', false)) instanceof HTMLSpanElement).toBe(true, 'an instance of HTMLSpanElement');
            });
            it('should not escape spaces in classToApply', function () {
                var classes = ['hello', 'world'];
                var resultingElementClassList = parseStringToHTMLElement(DomUtils_1.DomUtils.highlight(content, classes[0] + " " + classes[1])).classList;
                expect(resultingElementClassList.length).toBe(2);
                classes.forEach(function (className) { return expect(resultingElementClassList.contains(className)).toBe(true, "in the element's class list"); });
            });
            it('should throw an exception when the content is null', function () {
                expect(function () { return DomUtils_1.DomUtils.highlight(null, 'hello'); }).toThrow();
            });
            it('should return an element with no class when the classToApply is null', function () {
                expect(parseStringToHTMLElement(DomUtils_1.DomUtils.highlight('hello', null)).classList.length).toBe(0);
            });
            it('should ignore trailing spaces in classToApply', function () {
                expect(parseStringToHTMLElement(DomUtils_1.DomUtils.highlight('hello', '   hello world   ')).classList.length).toBe(2);
                expect(parseStringToHTMLElement(DomUtils_1.DomUtils.highlight('hello', '   ')).classList.length).toBe(0);
            });
            var contentWithSymbols = "-`!@#$%^&*()=[]{}<>\u201C\u2018.,~:;'\"|\\?\uD83D\uDCC0";
            it('should throw an exception when the classToApply contains symbols', function () {
                var prefix = 'hello';
                var suffix = 'world';
                contentWithSymbols
                    .split('')
                    .slice(1)
                    .forEach(function (char) { return expect(function () { return DomUtils_1.DomUtils.highlight(content, prefix + char + suffix); }).toThrow(); });
            });
            it('should still return valid HTML if the content contains symbols and is HTML encoded', function () {
                var element = parseStringToHTMLElement(DomUtils_1.DomUtils.highlight(contentWithSymbols));
                expect(element instanceof HTMLSpanElement).toBe(true, 'an instance of HTMLSpanElement');
                expect(element.children.length).toBe(0);
                expect(element.textContent).toBe(contentWithSymbols);
            });
            var testHighlightedElementText = '<input type="text"/>';
            it('should HTML encode the string content by default', function () {
                var element = parseStringToHTMLElement(DomUtils_1.DomUtils.highlight(testHighlightedElementText));
                expect(element.children.length).toBe(0);
                expect(element.textContent).toBe(testHighlightedElementText);
            });
            it('should not HTML encode the string content when asked not to', function () {
                var element = parseStringToHTMLElement(DomUtils_1.DomUtils.highlight(testHighlightedElementText, undefined, false));
                expect(element.children.length).toBe(1);
                expect(element.children[0] instanceof HTMLInputElement).toBe(true, 'expected to contain an instance of HTMLInputElement');
            });
        });
        describe('hightlightElement', function () {
            var startDelimiter = 'start-';
            var endDelimiter = '-end';
            var elementToHighlight = 'element';
            it('should highlight the string with the value to search', function () {
                var hightlighed = DomUtils_1.DomUtils.highlightElement("" + startDelimiter + elementToHighlight + endDelimiter, elementToHighlight);
                expect(hightlighed).toBe(startDelimiter + "<span class='coveo-highlight'>" + elementToHighlight + "</span>" + endDelimiter);
            });
            it('should return the initial string when the value to search is not found', function () {
                var hightlighed = DomUtils_1.DomUtils.highlightElement("" + startDelimiter + elementToHighlight + endDelimiter, 'somethingelse');
                expect(hightlighed).toBe("" + startDelimiter + elementToHighlight + endDelimiter);
            });
            it('should HTML encode the highlighted HTML values', function () {
                var elementWithHTMLValues = "<" + elementToHighlight + ">";
                var hightlighed = DomUtils_1.DomUtils.highlightElement("" + startDelimiter + elementWithHTMLValues + endDelimiter, elementWithHTMLValues);
                expect(hightlighed).toBe(startDelimiter + "<span class='coveo-highlight'>&lt;" + elementToHighlight + "&gt;</span>" + endDelimiter);
            });
            it('should be case insensitive', function () {
                var elementInAllCaps = elementToHighlight.toUpperCase();
                var hightlighed = DomUtils_1.DomUtils.highlightElement("" + startDelimiter + elementInAllCaps + endDelimiter, elementToHighlight);
                expect(hightlighed).toBe(startDelimiter + "<span class='coveo-highlight'>" + elementInAllCaps + "</span>" + endDelimiter);
            });
            it('should set the class given in parameter', function () {
                var classToApply = "bloup";
                var hightlighed = DomUtils_1.DomUtils.highlightElement("" + startDelimiter + elementToHighlight + endDelimiter, elementToHighlight, classToApply);
                expect(hightlighed).toBe(startDelimiter + "<span class='" + classToApply + "'>" + elementToHighlight + "</span>" + endDelimiter);
            });
        });
    });
}
exports.DomUtilsTest = DomUtilsTest;
 
 
/***/ }),
/* 1720 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Utils_1 = __webpack_require__(5);
function UtilsTest() {
    describe('Utils', function () {
        describe('safeEncodeURIComponent', function () {
            it('should support null values', function () {
                expect(Utils_1.Utils.safeEncodeURIComponent(null)).toEqual(encodeURIComponent('null'));
            });
            it('should return the standard value for standard string', function () {
                expect(Utils_1.Utils.safeEncodeURIComponent('The quick brown fox over the lazy dog')).toEqual(encodeURIComponent('The quick brown fox over the lazy dog'));
            });
            it('should not throw when encoding weird unicode strings as opposed to the standard function', function () {
                expect(function () { return encodeURIComponent('\uD800'); }).toThrow();
                expect(function () { return Utils_1.Utils.safeEncodeURIComponent('\uD800'); }).not.toThrow();
            });
        });
        describe('extendDeep', function () {
            var nonExistingValue = 'value1';
            var existingValue = 'value2';
            it('should add new key in target', function () {
                var result = Utils_1.Utils.extendDeep({ existingValue: existingValue }, { nonExistingValue: nonExistingValue });
                expect(result).toEqual({
                    nonExistingValue: nonExistingValue,
                    existingValue: existingValue
                });
            });
            it('should override the value of an existing key in target', function () {
                var newValue = 'bloup';
                var result = Utils_1.Utils.extendDeep({ existingValue: existingValue }, { existingValue: newValue });
                expect(result).toEqual({
                    existingValue: newValue
                });
            });
            it('should merge two arrays with simple values', function () {
                var result = Utils_1.Utils.extendDeep({ existingValue: [nonExistingValue] }, { existingValue: [existingValue] });
                expect(result).toEqual({
                    existingValue: [nonExistingValue, existingValue]
                });
            });
            it('should merge two arrays with HTML element values', function () {
                var existingElement = document.createElement('div');
                var nonExistingElement = document.createElement('div');
                var result = Utils_1.Utils.extendDeep({ existingValue: [existingElement] }, { existingValue: [nonExistingElement] });
                expect(result).toEqual({
                    existingValue: [existingElement, nonExistingElement]
                });
            });
        });
        it('reorderValuesByKeys returns the sorted values followed by the unsorted values in their original order', function () {
            var objectsToSort = [{ name: '4' }, { name: '3' }, { name: '2' }, { name: '1' }];
            expect(Utils_1.Utils.reorderValuesByKeys(objectsToSort, ['2', '3'], function (obj) { return obj.name; })).toEqual([
                objectsToSort[2],
                objectsToSort[1],
                objectsToSort[0],
                objectsToSort[3]
            ]);
        });
        describe('stringStartsWith', function () {
            it('returns true when string starts with value', function () {
                expect(Utils_1.Utils.stringStartsWith('valid value', 'valid')).toBe(true);
            });
            it('returns true when string starts with value', function () {
                expect(Utils_1.Utils.stringStartsWith('invalid value', 'valid')).toBe(false);
            });
        });
        describe('stringEndsWith', function () {
            it('returns true when string ends with value', function () {
                expect(Utils_1.Utils.stringEndsWith('value is good', 'good')).toBe(true);
            });
            it('returns false when string ends with value', function () {
                expect(Utils_1.Utils.stringEndsWith('value is bad', 'good')).toBe(false);
            });
        });
    });
}
exports.UtilsTest = UtilsTest;
 
 
/***/ }),
/* 1721 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Checkbox_1 = __webpack_require__(98);
var Dom_1 = __webpack_require__(0);
function CheckboxTest() {
    describe('Checkbox', function () {
        var spyChange;
        var checkbox;
        var label = 'hello';
        var ariaLabel = 'goodbye';
        var button;
        beforeEach(function () {
            spyChange = jasmine.createSpy('change');
            checkbox = new Checkbox_1.Checkbox(spyChange, label, ariaLabel);
            button = checkbox.getElement().querySelector('button');
        });
        afterEach(function () {
            spyChange = null;
            checkbox = null;
        });
        it('should allow to build', function () {
            expect(checkbox.build()).not.toBeNull();
        });
        it('should allow to get the element', function () {
            expect(checkbox.getElement()).not.toBeNull();
        });
        it('should allow to get the label value', function () {
            expect(checkbox.getValue()).toEqual('hello');
        });
        it('should not allow to create a checkbox with stored XSS', function () {
            checkbox = new Checkbox_1.Checkbox(spyChange, '<svg/onload=alert(document.domain)>');
            expect(checkbox.getLabel().textContent).toBe('<svg/onload=alert(document.domain)>');
        });
        it('the checkbox input has an aria-hidden equal to true', function () {
            expect(Dom_1.$$(checkbox.getElement()).find('input').getAttribute('aria-hidden')).toBe('true');
        });
        it('the checkbox input has an aria-label', function () {
            expect(Dom_1.$$(checkbox.getElement()).find('input').getAttribute('aria-label')).toEqual(ariaLabel);
        });
        it("the button's aria-label is its ariaLabel parameter", function () {
            expect(button.getAttribute('aria-label')).toEqual(ariaLabel);
        });
        it("the button's aria-checked should be false", function () {
            expect(button.getAttribute('aria-checked')).toEqual('false');
        });
        describe('after being selected', function () {
            beforeEach(function () {
                checkbox.select();
            });
            it('isSelected should return true', function () {
                expect(checkbox.isSelected()).toBe(true);
            });
            it('should call on change', function () {
                expect(spyChange).toHaveBeenCalledWith(checkbox);
            });
            it('should call on change only once', function () {
                checkbox.select();
                expect(spyChange).toHaveBeenCalledTimes(1);
            });
            it("the button's aria-checked should be true", function () {
                expect(button.getAttribute('aria-checked')).toEqual('true');
            });
            describe('then toggled', function () {
                beforeEach(function () {
                    checkbox.toggle();
                });
                it('isSelected should return false', function () {
                    expect(checkbox.isSelected()).toBe(false);
                });
                it("the button's aria-checked should be false", function () {
                    expect(button.getAttribute('aria-checked')).toEqual('false');
                });
            });
        });
        describe('after being selected with triggerChange false', function () {
            beforeEach(function () {
                checkbox.select(false);
            });
            it('should not call on change', function () {
                expect(spyChange).not.toHaveBeenCalled();
            });
            it("the button's aria-checked should be true", function () {
                expect(button.getAttribute('aria-checked')).toEqual('true');
            });
        });
        describe('reset', function () {
            it('should allow to reset', function () {
                checkbox.select();
                expect(checkbox.isSelected()).toBe(true);
                checkbox.reset();
                expect(checkbox.isSelected()).toBe(false);
            });
            it('should call on change', function () {
                checkbox.select();
                expect(checkbox.isSelected()).toBe(true);
                checkbox.reset();
                expect(spyChange).toHaveBeenCalledTimes(2);
                expect(spyChange).toHaveBeenCalledWith(checkbox);
            });
            it('should call on change only once', function () {
                checkbox.select();
                checkbox.reset();
                checkbox.reset();
                expect(spyChange).toHaveBeenCalledTimes(2);
            });
        });
    });
}
exports.CheckboxTest = CheckboxTest;
 
 
/***/ }),
/* 1722 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var FormGroup_1 = __webpack_require__(270);
var Checkbox_1 = __webpack_require__(98);
function FormGroupTest() {
    describe('FormGroup', function () {
        it('should allow to contain multiple form elements', function () {
            expect(new FormGroup_1.FormGroup([new Checkbox_1.Checkbox(function () { }, '1'), new Checkbox_1.Checkbox(function () { }, '2')], 'Form group').build().tagName.toLowerCase()).toEqual('fieldset');
        });
        it('should not allow to create a form group with stored XSS', function () {
            var group = new FormGroup_1.FormGroup([new Checkbox_1.Checkbox(function () { }, '1'), new Checkbox_1.Checkbox(function () { }, '2')], '<svg/onload=alert(document.domain)>');
            expect(group.labelElement.text()).toBe('<svg/onload=alert(document.domain)>');
        });
    });
}
exports.FormGroupTest = FormGroupTest;
 
 
/***/ }),
/* 1723 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var MultiSelect_1 = __webpack_require__(392);
function MultiSelectTest() {
    describe('MultiSelect', function () {
        var multiSelect;
        var onchange;
        beforeEach(function () {
            onchange = jasmine.createSpy('onchange');
            multiSelect = new MultiSelect_1.MultiSelect(onchange, ['1', '2', '3'], 'hello');
        });
        it('should allow to build and get the element', function () {
            expect(multiSelect.build()).not.toBeNull();
            expect(multiSelect.getElement()).not.toBeNull();
        });
        it('should allow to set the currently selected values', function () {
            multiSelect.setValue(['2', '3']);
            expect(multiSelect.getValue()).toEqual(['2', '3']);
        });
        it('should allow to get the values not currently selected', function () {
            multiSelect.setValue(['2', '3']);
            expect(multiSelect.getUnselectedValues()).toEqual(['1']);
        });
        it('should trigger on change when setting values', function () {
            multiSelect.setValue(['1']);
            expect(onchange).toHaveBeenCalledWith(multiSelect);
        });
        it('should not trigger on change when setting the same values', function () {
            multiSelect.setValue(['1']);
            multiSelect.setValue(['1']);
            expect(onchange).toHaveBeenCalledTimes(1);
        });
        it('should trigger on change when resetting', function () {
            multiSelect.setValue(['1']);
            multiSelect.reset();
            expect(onchange).toHaveBeenCalledTimes(2);
        });
        it('should not trigger on change when resetting multiple time', function () {
            multiSelect.setValue(['1']);
            multiSelect.reset();
            multiSelect.reset();
            expect(onchange).toHaveBeenCalledTimes(2);
        });
    });
}
exports.MultiSelectTest = MultiSelectTest;
 
 
/***/ }),
/* 1724 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var FacetSliderQueryController_1 = __webpack_require__(695);
var QueryBuilder_1 = __webpack_require__(24);
var FacetSlider_1 = __webpack_require__(243);
var Mock = __webpack_require__(2);
function FacetSliderQueryControllerTest() {
    describe('FacetSliderQueryController', function () {
        var facet;
        var controller;
        beforeEach(function () {
            facet = Mock.mockComponent(FacetSlider_1.FacetSlider);
            facet.options = {};
            facet.bind = {};
            facet.bind.onRootElement = jasmine.createSpy('root');
            facet.options.field = '@foo';
            facet.options.start = 0;
            facet.options.end = 100;
            controller = new FacetSliderQueryController_1.FacetSliderQueryController(facet);
        });
        afterEach(function () {
            facet = null;
            controller = null;
        });
        it('should allow to compute a filter expression', function () {
            var filter = controller.computeOurFilterExpression([5, 99]);
            expect(filter).toEqual('@foo==5..99');
        });
        it('should allow to compute a filter expression when the facet is inactive', function () {
            var filter = controller.computeOurFilterExpression([0, 100]);
            expect(filter).toBeUndefined();
        });
        it('should allow to compute a filter expression with outer bounds excluded at the end of the range', function () {
            facet.options.excludeOuterBounds = true;
            var filter = controller.computeOurFilterExpression([0, 99]);
            expect(filter).toEqual('@foo<=99');
        });
        it('should allow to compute a filter expression with outer bounds excluded at the start of the range', function () {
            facet.options.excludeOuterBounds = true;
            var filter = controller.computeOurFilterExpression([1, 100]);
            expect(filter).toEqual('@foo>=1');
        });
        it('should allow to compute a filter expression with outer bounds excluded, when both end are active', function () {
            facet.options.excludeOuterBounds = true;
            var filter = controller.computeOurFilterExpression([1, 99]);
            expect(filter).toEqual('@foo==1..99');
        });
        it('should allow to compute a filter expression with outher bounds excluded as a date', function () {
            facet.options.dateField = true;
            facet.options.excludeOuterBounds = true;
            var filter = controller.computeOurFilterExpression([1, 100]);
            expect(filter).toContain("@foo>=\"1970");
        });
        describe('when cloning the request to determine the full range in the index', function () {
            var requestForFullRange;
            var builder;
            beforeEach(function () {
                builder = new QueryBuilder_1.QueryBuilder();
                controller.facet.getSliderBoundaryForQuery.and.returnValue([25, 50]);
            });
            describe('with an empty query to clone', function () {
                beforeEach(function () {
                    controller.putGroupByIntoQueryBuilder(builder);
                    requestForFullRange = builder.groupByRequests[controller.lastGroupByRequestForFullRangeIndex];
                });
                it('should use nosort', function () {
                    expect(requestForFullRange.sortCriteria).toBe('nosort');
                });
                it('should use the same field', function () {
                    expect(requestForFullRange.field).toBe(facet.options.field);
                });
                it('should request only one value', function () {
                    expect(requestForFullRange.maximumNumberOfValues).toBe(1);
                });
                it('should not use any query override', function () {
                    expect(requestForFullRange.queryOverride).toBeUndefined();
                });
                it('should not use any constant query override', function () {
                    expect(requestForFullRange.constantQueryOverride).toBeUndefined();
                });
                it('should use @uri for advanced query override', function () {
                    expect(requestForFullRange.advancedQueryOverride).toBe('@uri');
                });
            });
            describe('with a query containing a constant expression', function () {
                beforeEach(function () {
                    builder.constantExpression.add('foo');
                    controller.putGroupByIntoQueryBuilder(builder);
                    requestForFullRange = builder.groupByRequests[controller.lastGroupByRequestForFullRangeIndex];
                });
                it('should have a constant query override copied from the main request', function () {
                    expect(requestForFullRange.constantQueryOverride).toBe('foo');
                });
                it('should not use any advanced query override', function () {
                    expect(requestForFullRange.advancedQueryOverride).toBeUndefined();
                });
            });
            it('should use the advanced query override passed in as an option on the component', function () {
                controller.facet.options.queryOverride = 'an override';
                controller.putGroupByIntoQueryBuilder(builder);
                requestForFullRange = builder.groupByRequests[controller.lastGroupByRequestForFullRangeIndex];
                expect(requestForFullRange.advancedQueryOverride).toContain('an override');
            });
            it('should add the constant query override from the existing query', function () {
                builder.constantExpression.add('a constant expression');
                controller.putGroupByIntoQueryBuilder(builder);
                requestForFullRange = builder.groupByRequests[controller.lastGroupByRequestForFullRangeIndex];
                expect(requestForFullRange.constantQueryOverride).toContain('a constant expression');
            });
            it('should contain a special expression to filter out invalid document if the field is a date', function () {
                controller.facet.options.dateField = true;
                controller.putGroupByIntoQueryBuilder(builder);
                requestForFullRange = builder.groupByRequests[controller.lastGroupByRequestForFullRangeIndex];
                expect(requestForFullRange.constantQueryOverride).toContain('@foo>1970');
            });
            it('should contain a special expression to filter out invalid document if the field is a date for the graph request', function () {
                controller.facet.options.dateField = true;
                controller.facet.options.graph = { steps: 10 };
                builder.expression.add('something');
                controller.putGroupByIntoQueryBuilder(builder);
                var requestForGraph = builder.groupByRequests[controller.graphGroupByQueriesIndex];
                expect(requestForGraph.constantQueryOverride).toContain('@foo>1970');
                expect(requestForGraph.queryOverride).toContain('something');
            });
        });
        it('should allow to put the group by into a query builder with simple slider config', function () {
            facet.isSimpleSliderConfig = true;
            var builder = new QueryBuilder_1.QueryBuilder();
            controller.putGroupByIntoQueryBuilder(builder);
            expect(builder.groupByRequests).toEqual(jasmine.arrayContaining([
                jasmine.objectContaining({
                    field: '@foo',
                    generateAutomaticRanges: false,
                    maximumNumberOfValues: 1,
                    rangeValues: jasmine.arrayContaining([
                        jasmine.objectContaining({
                            start: 0,
                            end: 100,
                            endInclusive: false
                        })
                    ])
                })
            ]));
        });
        it("should add a group by for graph if needed if it's not a simple slider config", function () {
            facet.isSimpleSliderConfig = false;
            facet.options.graph = {};
            facet.options.graph.steps = 10;
            facet.getSliderBoundaryForQuery = function () { return [5, 99]; };
            var builder = new QueryBuilder_1.QueryBuilder();
            controller.putGroupByIntoQueryBuilder(builder);
            expect(builder.groupByRequests[0]).toEqual(jasmine.objectContaining({
                field: '@foo',
                generateAutomaticRanges: true,
                maximumNumberOfValues: 10,
                advancedQueryOverride: '@uri',
                sortCriteria: 'nosort'
            }));
        });
        it('should add a group by for graph using the query override if specified', function () {
            facet.isSimpleSliderConfig = false;
            facet.options.graph = {};
            facet.options.graph.steps = 10;
            facet.options.queryOverride = 'my query override';
            facet.getSliderBoundaryForQuery = function () { return [5, 99]; };
            var builder = new QueryBuilder_1.QueryBuilder();
            controller.putGroupByIntoQueryBuilder(builder);
            expect(builder.groupByRequests[0]).toEqual(jasmine.objectContaining({
                field: '@foo',
                generateAutomaticRanges: true,
                maximumNumberOfValues: 10,
                advancedQueryOverride: 'my query override',
                sortCriteria: 'nosort'
            }));
        });
        it('should add a range request if needed for graph', function () {
            facet.isSimpleSliderConfig = true;
            facet.options.graph = {};
            facet.options.graph.steps = 10;
            facet.options.start = 0;
            facet.options.end = 100;
            facet.getSliderBoundaryForQuery = function () { return [5, 99]; };
            var builder = new QueryBuilder_1.QueryBuilder();
            controller.putGroupByIntoQueryBuilder(builder);
            expect(builder.groupByRequests[0]).toEqual(jasmine.objectContaining({
                rangeValues: jasmine.arrayContaining([
                    jasmine.objectContaining({
                        start: 0,
                        end: 10,
                        endInclusive: true
                    }),
                    jasmine.objectContaining({
                        start: 10,
                        end: 20,
                        endInclusive: true
                    })
                ])
            }));
        });
        describe('when requesting a graph for a date', function () {
            var groupByRequest;
            beforeEach(function () {
                facet.isSimpleSliderConfig = true;
                facet.options.graph = {};
                facet.options.graph.steps = 10;
                facet.options.start = 1;
                facet.options.end = 100;
                facet.getSliderBoundaryForQuery = function () { return [5, 99]; };
                facet.options.dateField = true;
                var builder = new QueryBuilder_1.QueryBuilder();
                controller.putGroupByIntoQueryBuilder(builder);
                groupByRequest = builder.groupByRequests[0];
            });
            it('should contain the basic group by data', function () {
                expect(groupByRequest).toEqual(jasmine.objectContaining({
                    field: '@foo',
                    maximumNumberOfValues: 10,
                    sortCriteria: 'nosort',
                    generateAutomaticRanges: false,
                    rangeValues: jasmine.arrayContaining([
                        jasmine.objectContaining({
                            start: jasmine.stringMatching('1970'),
                            end: jasmine.stringMatching('1970'),
                            endInclusive: true
                        })
                    ])
                }));
            });
            it('should contain a filter for invalid document dates', function () {
                expect(groupByRequest.constantQueryOverride).toContain('@foo>1970');
            });
        });
    });
}
exports.FacetSliderQueryControllerTest = FacetSliderQueryControllerTest;
 
 
/***/ }),
/* 1725 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var DateUtils_1 = __webpack_require__(43);
var moment = __webpack_require__(3);
var Strings_1 = __webpack_require__(4);
function DateUtilsTest() {
    describe('DateUtils', function () {
        var options;
        var containsTime = function (result) {
            return /am/i.test(result) || /pm/i.test(result);
        };
        function testDate() {
            return DateUtils_1.DateUtils.convertToStandardDate('1980-02-11');
        }
        beforeEach(function () {
            options = {
                now: moment('1980-02-11').toDate(),
                predefinedFormat: undefined
            };
            String['locale'] = 'en';
            DateUtils_1.DateUtils.setLocale();
        });
        it('should use the correct locale if the locale is `no`', function () {
            String['locale'] = 'no';
            DateUtils_1.DateUtils.setLocale();
            expect(DateUtils_1.DateUtils.dateToString(testDate(), options)).toEqual(Strings_1.l('Today'));
        });
        it('should use the correct locale if the locale is `id`', function () {
            String['locale'] = 'id';
            DateUtils_1.DateUtils.setLocale();
            expect(DateUtils_1.DateUtils.dateToString(testDate(), options)).toEqual(Strings_1.l('Today'));
        });
        it('should use the correct locale if the locale is `es-ES`', function () {
            String['locale'] = 'es-ES';
            DateUtils_1.DateUtils.setLocale();
            expect(DateUtils_1.DateUtils.dateToString(testDate(), options)).toEqual(Strings_1.l('Today'));
        });
        it('should use the correct locale if the locale is `zh-cn`', function () {
            String['locale'] = 'zh-tw';
            DateUtils_1.DateUtils.setLocale();
            expect(DateUtils_1.DateUtils.dateToString(testDate(), options)).toEqual(Strings_1.l('Today'));
        });
        it('should default to `en` if the locale is invalid', function () {
            String['locale'] = 'foobar';
            DateUtils_1.DateUtils.setLocale();
            expect(DateUtils_1.DateUtils.dateToString(testDate(), options)).toEqual(Strings_1.l('Today'));
        });
        it('should return an empty string if the date entry is null or undefined', function () {
            expect(DateUtils_1.DateUtils.dateToString(DateUtils_1.DateUtils.convertToStandardDate(null), options)).toEqual(Strings_1.l(''));
        });
        it('should expose an alias for convertFromJsonDateIfNeeded for legacy reasons', function () {
            options.predefinedFormat = 'MM/DD/YYYY';
            expect(DateUtils_1.DateUtils.dateToString(DateUtils_1.DateUtils.convertFromJsonDateIfNeeded('2017/03/23'), options)).toEqual('03/23/2017');
        });
        it('should display the weekday if the date is this week when useTodayYesterdayAndTomorrow is set to false', function () {
            options.useTodayYesterdayAndTomorrow = false;
            expect(DateUtils_1.DateUtils.dateToString(DateUtils_1.DateUtils.convertToStandardDate('1980/02/11'), options)).toEqual('Monday');
        });
        it('should display the correct predefinedFormat if the YYYY is lowercase', function () {
            options.predefinedFormat = 'MM/DD/yyyy';
            expect(DateUtils_1.DateUtils.dateToString(testDate(), options)).toEqual(Strings_1.l('02/11/1980'));
        });
        it("when the #useLongDateFormat option is true, when calling #dateToString,\n    it returns a date with the correct form", function () {
            options.useTodayYesterdayAndTomorrow = false;
            options.useWeekdayIfThisWeek = false;
            options.omitYearIfCurrentOne = false;
            options.useLongDateFormat = true;
            var date = DateUtils_1.DateUtils.dateToString(testDate(), options);
            expect(date).toBe('Monday, February 11, 1980');
        });
        it('should return `Invalid Date` if the date input is incorrect', function () {
            expect(DateUtils_1.DateUtils.dateToString(DateUtils_1.DateUtils.convertToStandardDate('foobar'), options)).toEqual(Strings_1.l('Invalid date'));
        });
        it('should return `Invalid Date` timestamp is incorrect', function () {
            expect(DateUtils_1.DateUtils.dateToString(DateUtils_1.DateUtils.convertToStandardDate('1980-02-11 32:11:54'), options)).toEqual(Strings_1.l('Invalid date'));
        });
        it('should display the name of the month correctly using `monthToString`', function () {
            expect(DateUtils_1.DateUtils.monthToString(1)).toEqual(Strings_1.l('February'));
        });
        it('should display the right amount of time between two dates using `timeBetween`', function () {
            expect(DateUtils_1.DateUtils.timeBetween(new Date('2017-03-07T16:17:43'), new Date('2017-03-07T16:45:45'))).toEqual(Strings_1.l('00:28:02'));
        });
        it('dateTimeToString should respect the option to includeTime if set to true', function () {
            var now = new Date();
            var result = DateUtils_1.DateUtils.dateTimeToString(now, { includeTimeIfToday: true, includeTimeIfThisWeek: true });
            expect(containsTime(result)).toBe(true);
        });
        it('dateTimeToString should respect the option to includeTime if set to false', function () {
            var now = moment(new Date()).toDate();
            var result = DateUtils_1.DateUtils.dateTimeToString(now, { includeTimeIfToday: false, includeTimeIfThisWeek: false });
            expect(containsTime(result)).toBe(false);
        });
        it('dateTimeToString should respect includeTimeIfToday if the date is not today', function () {
            var notToday = moment(new Date()).subtract(2, 'days').toDate();
            var result = DateUtils_1.DateUtils.dateTimeToString(notToday, { includeTimeIfToday: true, includeTimeIfThisWeek: false });
            expect(containsTime(result)).toBe(false);
        });
        it('dateTimeToString should respect includeTimeIfThisWeek if the date is not this week', function () {
            var notThisWeek = moment(new Date()).subtract(2, 'week').toDate();
            var result = DateUtils_1.DateUtils.dateTimeToString(notThisWeek, { includeTimeIfToday: false, includeTimeIfThisWeek: true });
            expect(containsTime(result)).toBe(false);
        });
        it('dateTimeToString should respect the predefinedFormat without stripping minutes', function () {
            var oneAmInTheMorning = new Date(1512021600000);
            var result = DateUtils_1.DateUtils.dateTimeToString(oneAmInTheMorning, { predefinedFormat: 'MMMM DD, YYYY [at] h:mm' });
            expect(result).toContain(':00');
        });
        it("when the #predefinedFormat is 'yy', it displays the last two digits of the year", function () {
            options.predefinedFormat = 'yy';
            expect(DateUtils_1.DateUtils.dateTimeToString(testDate(), options)).toBe('80');
        });
        it("when the #predefinedFormat is 'yyy', it displays the four digits of the year", function () {
            options.predefinedFormat = 'yyy';
            expect(DateUtils_1.DateUtils.dateTimeToString(testDate(), options)).toBe('1980');
        });
        it("when the #predefinedFormat is 'yyyy', it displays the four digits of the year", function () {
            options.predefinedFormat = 'yyyy';
            expect(DateUtils_1.DateUtils.dateTimeToString(testDate(), options)).toBe('1980');
        });
        it("when the #predefinedFormat is 'yy yy', it displays the last two digits of the year twice", function () {
            options.predefinedFormat = 'yy yy';
            expect(DateUtils_1.DateUtils.dateTimeToString(testDate(), options)).toBe('80 80');
        });
        it('dateTimeToString should work with the predefinedFormat YYYY (uppercase)', function () {
            var now = moment(new Date()).toDate();
            var result = DateUtils_1.DateUtils.dateTimeToString(now, { predefinedFormat: 'YYYY' });
            expect(result).toBe(moment(now).format('YYYY'));
        });
        it("when the #predefined format is 'MMMN', it displays the full month name", function () {
            var date = DateUtils_1.DateUtils.convertToStandardDate('2019-01-09');
            options.predefinedFormat = 'MMMM';
            expect(DateUtils_1.DateUtils.dateTimeToString(date, options)).toBe('January');
        });
        it("when the #predefined format is 'MMM', it displays a shortened month name", function () {
            var date = DateUtils_1.DateUtils.convertToStandardDate('2019-01-09');
            options.predefinedFormat = 'MMM';
            expect(DateUtils_1.DateUtils.dateTimeToString(date, options)).toBe('Jan');
        });
        it("when the #predefined format is 'MM', it displays a double-digit month number", function () {
            var date = DateUtils_1.DateUtils.convertToStandardDate('2019-01-09');
            options.predefinedFormat = 'MM';
            expect(DateUtils_1.DateUtils.dateTimeToString(date, options)).toBe('01');
        });
        it("when the #predefined format is 'M', it displays a single-digit month number", function () {
            var date = DateUtils_1.DateUtils.convertToStandardDate('2019-01-09');
            options.predefinedFormat = 'M';
            expect(DateUtils_1.DateUtils.dateTimeToString(date, options)).toBe('1');
        });
        it("when the #predefined format is 'dddd', it displays the full day name", function () {
            var date = DateUtils_1.DateUtils.convertToStandardDate('2019-01-09');
            options.predefinedFormat = 'dddd';
            expect(DateUtils_1.DateUtils.dateTimeToString(date, options)).toBe('Wednesday');
        });
        it("when the #predefined format is 'ddd', it displays a shortened day name", function () {
            var date = DateUtils_1.DateUtils.convertToStandardDate('2019-01-09');
            options.predefinedFormat = 'ddd';
            expect(DateUtils_1.DateUtils.dateTimeToString(date, options)).toBe('Wed');
        });
        it("when the #predefined format is 'dd', it displays a double digit number for the day of month", function () {
            var date = DateUtils_1.DateUtils.convertToStandardDate('2019-01-09');
            options.predefinedFormat = 'dd';
            expect(DateUtils_1.DateUtils.dateTimeToString(date, options)).toBe('09');
        });
        it("when the #predefined format is 'd', it displays a single digit number for the day of month", function () {
            var dateNotInFirstWeek = DateUtils_1.DateUtils.convertToStandardDate('2019-01-09');
            options.predefinedFormat = 'd';
            expect(DateUtils_1.DateUtils.dateTimeToString(dateNotInFirstWeek, options)).toBe('9');
        });
        it("when the #predefined format is 'hh', it displays the hour using a 24-hour format", function () {
            var date = moment('2019-01-01 14:00').toDate();
            options.predefinedFormat = 'hh';
            expect(DateUtils_1.DateUtils.dateTimeToString(date, options)).toBe('14');
        });
        it("when the #predefined format is 'h', it displays the hour using a single-digit 12-hour format", function () {
            var date = moment('2019-01-01 14:00').toDate();
            options.predefinedFormat = 'h';
            expect(DateUtils_1.DateUtils.dateTimeToString(date, options)).toBe('2');
        });
        it("when the #predefined format is 'mm', it displays the minutes", function () {
            var date = moment('2019-01-01 14:35').toDate();
            options.predefinedFormat = 'mm';
            expect(DateUtils_1.DateUtils.dateTimeToString(date, options)).toBe('35');
        });
        it("when the #predefined format is 'ss', it displays the seconds", function () {
            var date = moment('2019-01-01 14:35:26').toDate();
            options.predefinedFormat = 'ss';
            expect(DateUtils_1.DateUtils.dateTimeToString(date, options)).toBe('26');
        });
        it('dateTimeToString should properly return an empty string when the date is null', function () {
            var result = DateUtils_1.DateUtils.dateTimeToString(null);
            expect(result).toBe('');
        });
        it('dateTimeToString should properly return an empty string when the date is undefined', function () {
            var result = DateUtils_1.DateUtils.dateTimeToString(undefined);
            expect(result).toBe('');
        });
        it('dateTimeToString should properly return an empty string when passing in an invalid date', function () {
            var result = DateUtils_1.DateUtils.dateTimeToString(new Date('totally not a date'));
            expect(result).toBe('');
        });
    });
}
exports.DateUtilsTest = DateUtilsTest;
 
 
/***/ }),
/* 1726 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var NumberUtils_1 = __webpack_require__(848);
function NumberUtilsTest() {
    describe('NumberUtils', function () {
        it('should return 0 if there is no decimal number', function () {
            expect(NumberUtils_1.NumberUtils.countDecimals(1)).toBe(0);
        });
        it('should return 0 if there is the decimal numbers are composed of 0s', function () {
            expect(NumberUtils_1.NumberUtils.countDecimals(1.0)).toBe(0);
        });
        it('should return 2 if there is 2 decimal number', function () {
            expect(NumberUtils_1.NumberUtils.countDecimals(1.29)).toBe(2);
        });
        it('should return 10 if there is 10 decimal number', function () {
            expect(NumberUtils_1.NumberUtils.countDecimals(1.0123456789)).toBe(10);
        });
    });
}
exports.NumberUtilsTest = NumberUtilsTest;
 
 
/***/ }),
/* 1727 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var DebugForResult_1 = __webpack_require__(484);
var MockEnvironment_1 = __webpack_require__(2);
var Fake_1 = __webpack_require__(11);
function DebugForResultTest() {
    describe('DebugForResult', function () {
        var debugForResult;
        var env;
        var result;
        beforeEach(function () {
            env = new MockEnvironment_1.MockEnvironmentBuilder().build();
            debugForResult = new DebugForResult_1.DebugForResult(env);
            result = Fake_1.FakeResults.createFakeResult();
        });
        it('should not crash while parsing ranking info, whatever the format is', function () {
            result.rankingInfo = 'this should not crash';
            expect(function () { return debugForResult.generateDebugInfoForResult(result); }).not.toThrow();
            expect(debugForResult.generateDebugInfoForResult(result).rankingInfo()).toEqual(jasmine.objectContaining({}));
        });
        it('should return the ranking info if it can parse it properly with no terms', function () {
            var info = "Document weights:\n      Title: 0; Quality: 180; Date: 405; Adjacency: 0; Source: 500; Custom: 400; Collaborative rating: 0; QRE: 890; Ranking functions: 0; \n      QRE:\n      Expression: \"@systitle==\"Source @ Coveo \u2014 A technical blog by the fine people at Coveo\"\" Score: 0\n      Expression: \"@sysfiletype==\"pdf\" @sysisattachment @systitle=\"Coveo for Sitecore\" @systitle=\"Documentation.pdf\" '\" Score: 0\n      Expression: \"@spacekey=JsSearch\" Score: 0\n      Expression: \"@spacekey=Salesforce\" Score: 0\n      Expression: \"@spacekey=SitecoreV3\" Score: 0\n      Expression: \"@syssource=answers\" Score: 0\n      Expression: \"@syssource==(apices70,apices65,\"Web Scraper - apisitecore30\")\" Score: 0\n      Expression: \"@sysuri==\"https://docs.coveo.com/en/1547/\"\" Score: 0\n      Expression: \"@sysuri==\"https://docs.coveo.com/en/2660/\"\" Score: 0\n      Expression: \"@sysuri==\"https://docs.coveo.com/en/1783/\"\" Score: 0\n      Expression: \"@sysuri==\"https://docs.coveo.com/en/2661/\"\" Score: 0\n      Expression: \"@sysuri==\"https://docs.coveo.com/en/1547/\"\" Score: 0\n      Expression: \"@sysurihash=\"Fp5jjQ c8VBdA2bV\"\" Score: 0\n      Expression: \"@sysurihash=\"H94tpRkO9JaivGmu\"\" Score: 890\n      Expression: \"@sysurihash=\"aBtg0qhgVOsKsLDP\"\" Score: 0\n      Expression: \"@sysurihash=\"yoipvH6AAPrZeaAc\"\" Score: 0\n      Expression: \"@sysurihash=\"QWYK3u9KwIYfFSVg\"\" Score: 0\n      \n      Total weight: 2375";
            result.rankingInfo = info;
            expect(function () { return debugForResult.generateDebugInfoForResult(result); }).not.toThrow();
            expect(debugForResult.generateDebugInfoForResult(result).rankingInfo()).toEqual(jasmine.objectContaining({
                'Document weights': jasmine.objectContaining({
                    Title: 0,
                    Quality: 180,
                    Date: 405,
                    Adjacency: 0,
                    Source: 500,
                    Custom: 400,
                    'Collaborative rating': 0,
                    QRE: 890,
                    'Ranking functions': 0
                }),
                'Total weight': 2375
            }));
        });
        it('should return the ranking info if it can parse it properly with no QRE', function () {
            var info = "Document weights:\n      Title: 0; Quality: 180; Date: 405; Adjacency: 0; Source: 500; Custom: 400; Collaborative rating: 0; QRE: 890; Ranking functions: 0; \n      \n      Total weight: 2375";
            result.rankingInfo = info;
            expect(function () { return debugForResult.generateDebugInfoForResult(result); }).not.toThrow();
            expect(debugForResult.generateDebugInfoForResult(result).rankingInfo()).toEqual(jasmine.objectContaining({
                'Document weights': jasmine.objectContaining({
                    Title: 0,
                    Quality: 180,
                    Date: 405,
                    Adjacency: 0,
                    Source: 500,
                    Custom: 400,
                    'Collaborative rating': 0,
                    QRE: 890,
                    'Ranking functions': 0
                }),
                'Total weight': 2375
            }));
        });
        it('should return the ranking info if it can parse it properly with no QRE', function () {
            var info = "Document weights:\n      Title: 303; Quality: 180; Date: 255; Adjacency: 1350; Source: 500; Custom: 400; Collaborative rating: 0; QRE: 0; Ranking functions: 0; \n       \n      Terms weights:\n      event: 100, 29; events: 70, 33; \n      Title: 429; Concept: 0; Summary: 160; URI: 0; Formatted: 107; Casing: 0; Relation: 107; Frequency: 1271; \n      \n      standard: 100, 18; \n      Title: 0; Concept: 0; Summary: 139; URI: 0; Formatted: 0; Casing: 0; Relation: 92; Frequency: 637; \n      \n      Total weight: 5930";
            result.rankingInfo = info;
            expect(function () { return debugForResult.generateDebugInfoForResult(result); }).not.toThrow();
            expect(debugForResult.generateDebugInfoForResult(result).rankingInfo()).toEqual(jasmine.objectContaining({
                'Document weights': jasmine.objectContaining({
                    Title: 303,
                    Quality: 180,
                    Date: 255,
                    Adjacency: 1350,
                    Source: 500,
                    Custom: 400,
                    'Collaborative rating': 0,
                    QRE: 0,
                    'Ranking functions': 0
                }),
                'Total weight': 5930
            }));
        });
        it('should contain a reference to the original result', function () {
            expect(debugForResult.generateDebugInfoForResult(result).result).toEqual(result);
        });
        it('should call list fields to build the fields section', function () {
            debugForResult.generateDebugInfoForResult(result).fields();
            expect(env.searchEndpoint.listFields).toHaveBeenCalled();
        });
        it('should return a correct field description for field of date type', function (done) {
            result.raw.date = 1;
            env.searchEndpoint.listFields.and.returnValue(Promise.resolve([
                {
                    fieldType: 'Date',
                    name: '@date'
                }
            ]));
            expect(debugForResult
                .generateDebugInfoForResult(result)
                .fields()
                .then(function (formattedField) {
                expect(formattedField['@date'].getTime()).toEqual(1);
                done();
            }));
        });
        it('should return a correct field description for a split group by', function (done) {
            result.raw.split = 'a;b;c';
            env.searchEndpoint.listFields.and.returnValue(Promise.resolve([
                {
                    splitGroupByField: true,
                    name: '@split'
                }
            ]));
            expect(debugForResult
                .generateDebugInfoForResult(result)
                .fields()
                .then(function (formattedField) {
                expect(formattedField['@split']).toEqual(jasmine.arrayContaining(['a', 'b', 'c']));
                done();
            }));
        });
    });
}
exports.DebugForResultTest = DebugForResultTest;
 
 
/***/ }),
/* 1728 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var DebugHeader_1 = __webpack_require__(483);
var MockEnvironment_1 = __webpack_require__(2);
var Dom_1 = __webpack_require__(0);
var Simulate_1 = __webpack_require__(15);
var InitializationEvents_1 = __webpack_require__(22);
var ResultListEvents_1 = __webpack_require__(48);
var QueryBuilder_1 = __webpack_require__(24);
var Debug_1 = __webpack_require__(219);
function DebugHeaderTest() {
    describe('DebugHeader', function () {
        var env;
        var elem;
        var searchSpy;
        var debug;
        var debugHeader;
        beforeEach(function () {
            env = new MockEnvironment_1.MockEnvironmentBuilder().build();
            elem = Dom_1.$$('div');
            searchSpy = jasmine.createSpy('search');
            debug = new Debug_1.Debug(env.root, env, null, null);
            debugHeader = new DebugHeader_1.DebugHeader(debug, elem.el, searchSpy, {
                foo: 'bar'
            });
        });
        var getDebugCheckbox = function (elem) {
            return Dom_1.$$(elem).find('input[value="Enable query debug"]');
        };
        var getQuerySyntaxCheckbox = function (elem) {
            return Dom_1.$$(elem).find('input[value="Enable query syntax in search box"]');
        };
        var getHighlightCheckbox = function (elem) {
            return Dom_1.$$(elem).find('input[value="Highlight recommendation"]');
        };
        var getRequestFieldCheckbox = function (elem) {
            return Dom_1.$$(elem).find('input[value="Request all fields available"]');
        };
        var getSearchInput = function (elem) {
            return Dom_1.$$(elem).find('input[type="text"]');
        };
        it('should create a debug checkbox', function () {
            expect(getDebugCheckbox(elem.el)).not.toBeNull();
        });
        it('should create a query syntax checkbox', function () {
            expect(getQuerySyntaxCheckbox(elem.el)).not.toBeNull();
        });
        it('should create an highlight checkbox', function () {
            expect(getHighlightCheckbox(elem.el)).not.toBeNull();
        });
        it('should create a search box', function () {
            expect(getSearchInput(elem.el)).not.toBeNull();
        });
        it('should create a request field checkbox', function () {
            expect(getRequestFieldCheckbox(elem.el)).not.toBeNull();
        });
        it('should reset search input when changing search function', function () {
            getSearchInput(elem.el).value = 'foo';
            debugHeader.setSearch(function (value) { });
            expect(getSearchInput(elem.el).value).toBe('');
        });
        it('should add debug if enabled', function () {
            getDebugCheckbox(elem.el).setAttribute('checked', 'checked');
            Dom_1.$$(getDebugCheckbox(elem.el)).trigger('change');
            var simulation = Simulate_1.Simulate.query(env);
            expect(simulation.queryBuilder.enableDebug).toBe(true);
        });
        it('should add the proper origin when executing a query with debug enabled', function () {
            getDebugCheckbox(elem.el).setAttribute('checked', 'checked');
            Dom_1.$$(getDebugCheckbox(elem.el)).trigger('change');
            Simulate_1.Simulate.query(env);
            expect(env.queryController.executeQuery).toHaveBeenCalledWith(jasmine.objectContaining({ origin: debug }));
        });
        it('should modify the fieldsToInclude if enabled', function () {
            getRequestFieldCheckbox(elem.el).setAttribute('checked', 'checked');
            Dom_1.$$(getRequestFieldCheckbox(elem.el)).trigger('change');
            var builder = new QueryBuilder_1.QueryBuilder();
            builder.includeRequiredFields = true;
            var simulation = Simulate_1.Simulate.query(env, {
                queryBuilder: builder
            });
            expect(simulation.queryBuilder.includeRequiredFields).toBe(false);
        });
        it('should not modify fields to include if not enabled', function () {
            var builder = new QueryBuilder_1.QueryBuilder();
            builder.includeRequiredFields = true;
            var simulation = Simulate_1.Simulate.query(env, {
                queryBuilder: builder
            });
            expect(simulation.queryBuilder.includeRequiredFields).toBe(true);
        });
        it('should add highlight if enabled', function () {
            Dom_1.$$(env.root).trigger(InitializationEvents_1.InitializationEvents.afterInitialization);
            getHighlightCheckbox(elem.el).setAttribute('checked', 'checked');
            Dom_1.$$(getHighlightCheckbox(elem.el)).trigger('change');
            var fakeResultElement = {
                item: Dom_1.$$('div').el,
                result: {
                    isRecommendation: true
                }
            };
            Dom_1.$$(env.root).trigger(ResultListEvents_1.ResultListEvents.newResultDisplayed, fakeResultElement);
            expect(Dom_1.$$(fakeResultElement.item).hasClass('coveo-is-recommendation')).toBe(true);
        });
        it('should add query syntax if enabled', function () {
            var querySyntax = getQuerySyntaxCheckbox(elem.el);
            querySyntax.setAttribute('checked', 'checked');
            Dom_1.$$(querySyntax).trigger('change');
            expect(env.componentOptionsModel.set).toHaveBeenCalledWith('searchBox', jasmine.objectContaining({
                enableQuerySyntax: true
            }));
        });
    });
}
exports.DebugHeaderTest = DebugHeaderTest;
 
 
/***/ }),
/* 1729 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var FacetValues_1 = __webpack_require__(334);
var Fake_1 = __webpack_require__(11);
var FacetValue_1 = __webpack_require__(51);
var FacetValuesOrder_1 = __webpack_require__(237);
var MockEnvironment_1 = __webpack_require__(2);
function FacetValuesTest() {
    describe('FacetValues', function () {
        function buildFacetValuesOrder() {
            var facetValuesOrder = MockEnvironment_1.mock(FacetValuesOrder_1.FacetValuesOrder);
            facetValuesOrder.reorderValuesIfUsingAlphabeticalSort = function (values) { return values; };
            facetValuesOrder.reorderValuesIfUsingCustomSort = function (values) { return values; };
            return facetValuesOrder;
        }
        it('should allow to updateCountsFromNewValues', function () {
            var oldValues = new FacetValues_1.FacetValues(Fake_1.FakeResults.createFakeGroupByResult('@field', '@token', 10));
            expect(oldValues.get('@token0').occurrences).toEqual(1);
            var newValues = new FacetValues_1.FacetValues(Fake_1.FakeResults.createFakeGroupByResult('@field', '@token', 10));
            newValues.get('@token0').occurrences = 123;
            oldValues.updateCountsFromNewValues(newValues);
            expect(oldValues.get('@token0').occurrences).toEqual(123);
        });
        it('should not touch old values if they do not exist in new values', function () {
            var oldValues = new FacetValues_1.FacetValues(Fake_1.FakeResults.createFakeGroupByResult('@field', '@token', 10));
            expect(oldValues.get('@token9').occurrences).toEqual(10);
            var newValues = new FacetValues_1.FacetValues(Fake_1.FakeResults.createFakeGroupByResult('@field', '@token', 1));
            oldValues.updateCountsFromNewValues(newValues);
            expect(oldValues.get('@token9').occurrences).toEqual(10);
        });
        it('should set occurrences to 0 in old values if a new value does not exist in old values', function () {
            var oldValues = new FacetValues_1.FacetValues(Fake_1.FakeResults.createFakeGroupByResult('@field', '@token', 10));
            delete oldValues.get('@token9').occurrences;
            expect(oldValues.get('@token9').occurrences).toBeUndefined();
            var newValues = new FacetValues_1.FacetValues(Fake_1.FakeResults.createFakeGroupByResult('@field', '@token', 3));
            oldValues.updateCountsFromNewValues(newValues);
            expect(oldValues.get('@token9').occurrences).toEqual(0);
        });
        it('should set the occurences to in new values if importing from another active list', function () {
            var oldValues = new FacetValues_1.FacetValues(Fake_1.FakeResults.createFakeGroupByResult('@field', '@token', 10));
            oldValues.getAll().forEach(function (oldValue) { return (oldValue.selected = true); });
            oldValues.get('@token9').occurrences = 999;
            var newValues = new FacetValues_1.FacetValues(Fake_1.FakeResults.createFakeGroupByResult('@field', '@token', 9));
            expect(newValues.get('@token9')).toBeUndefined();
            newValues.importActiveValuesFromOtherList(oldValues);
            expect(newValues.get('@token9')).toBeDefined();
            expect(newValues.get('@token9').occurrences).toBe(0);
        });
        it("given two inactive values, when calling sortValuesDependingOnStatus,\n    the values are in the same order", function () {
            var list = new FacetValues_1.FacetValues();
            var values = ['a', 'b'].map(FacetValue_1.FacetValue.create);
            values.forEach(function (val) { return list.add(val); });
            list.sortValuesDependingOnStatus(values.length);
            expect(list.getAll()).toEqual(values);
        });
        it("given two values where the second is selected, when calling sortValuesDependingOnStatus,\n    the selected value is placed first", function () {
            var list = new FacetValues_1.FacetValues();
            var valueA = FacetValue_1.FacetValue.create('a');
            var valueB = FacetValue_1.FacetValue.create('b');
            valueB.selected = true;
            var values = [valueA, valueB];
            values.forEach(function (val) { return list.add(val); });
            list.sortValuesDependingOnStatus(values.length);
            expect(list.getAll()).toEqual([valueB, valueA]);
        });
        it("given two values where the first is excluded, when calling sortValuesDependingOnStatus,\n    the excluded value is placed second", function () {
            var list = new FacetValues_1.FacetValues();
            var valueA = FacetValue_1.FacetValue.create('a');
            var valueB = FacetValue_1.FacetValue.create('b');
            valueA.excluded = true;
            var values = [valueA, valueB];
            values.forEach(function (val) { return list.add(val); });
            list.sortValuesDependingOnStatus(values.length);
            expect(list.getAll()).toEqual([valueB, valueA]);
        });
        it("given an excluded value, when the number of displayed values is fewer than the number of available values,\n    when calling sortValuesDependingOnStatus,\n    the excluded value is placed at the bottom of the viewable list", function () {
            var list = new FacetValues_1.FacetValues();
            var valueA = FacetValue_1.FacetValue.create('a');
            var valueB = FacetValue_1.FacetValue.create('b');
            var valueC = FacetValue_1.FacetValue.create('c');
            valueC.excluded = true;
            var values = [valueA, valueB, valueC];
            values.forEach(function (val) { return list.add(val); });
            list.sortValuesDependingOnStatus(values.length - 1);
            expect(list.getAll()).toEqual([valueA, valueC, valueB]);
        });
        it("when FacetValuesOrder is configured to sort alphabetically,\n    calling sort returns the values in alphabetical order", function () {
            var list = new FacetValues_1.FacetValues();
            var valueA = FacetValue_1.FacetValue.create('a');
            var valueB = FacetValue_1.FacetValue.create('b');
            var values = [valueB, valueA];
            values.forEach(function (val) { return list.add(val); });
            var facetValuesOrder = buildFacetValuesOrder();
            facetValuesOrder.reorderValuesIfUsingAlphabeticalSort = function () { return values.reverse(); };
            var options = { facetValuesOrder: facetValuesOrder, numberOfValues: values.length };
            list.sort(options);
            expect(list.getAll()).toEqual([valueA, valueB]);
        });
        it("when FacetValuesOrder is configured to sort alphabetically, when the first value is selected,\n    calling sort returns the values with the selected first and the rest in alphabetical order", function () {
            var list = new FacetValues_1.FacetValues();
            var valueA = FacetValue_1.FacetValue.create('a');
            var valueB = FacetValue_1.FacetValue.create('b');
            var valueC = FacetValue_1.FacetValue.create('c');
            valueC.selected = true;
            var values = [valueC, valueB, valueA];
            values.forEach(function (val) { return list.add(val); });
            var facetValuesOrder = buildFacetValuesOrder();
            facetValuesOrder.reorderValuesIfUsingAlphabeticalSort = function () { return values.reverse(); };
            var options = { facetValuesOrder: facetValuesOrder, numberOfValues: values.length };
            list.sort(options);
            expect(list.getAll()).toEqual([valueC, valueA, valueB]);
        });
        it("when FacetValuesOrder is configured to sort custom,\n    calling sort returns the values according to the custom order", function () {
            var list = new FacetValues_1.FacetValues();
            var valueA = FacetValue_1.FacetValue.create('a');
            var valueB = FacetValue_1.FacetValue.create('b');
            var values = [valueA, valueB];
            values.forEach(function (val) { return list.add(val); });
            var customOrder = [valueB, valueA];
            var facetValuesOrder = buildFacetValuesOrder();
            facetValuesOrder.reorderValuesIfUsingCustomSort = function () { return customOrder; };
            var options = { facetValuesOrder: facetValuesOrder, numberOfValues: values.length };
            list.sort(options);
            expect(list.getAll()).toEqual(customOrder);
        });
    });
}
exports.FacetValuesTest = FacetValuesTest;
 
 
/***/ }),
/* 1730 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __assign = (this && this.__assign) || Object.assign || function(t) {
    for (var s, i = 1, n = arguments.length; i < n; i++) {
        s = arguments[i];
        for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
            t[p] = s[p];
    }
    return t;
};
Object.defineProperty(exports, "__esModule", { value: true });
var Mock = __webpack_require__(2);
var SimpleFilter_1 = __webpack_require__(835);
var Simulate_1 = __webpack_require__(15);
var Dom_1 = __webpack_require__(0);
var BreadcrumbEvents_1 = __webpack_require__(33);
var Fake_1 = __webpack_require__(11);
var AnalyticsActionListMeta_1 = __webpack_require__(7);
function SimpleFilterTest() {
    describe('SimpleFilter', function () {
        var aSimpleFilter;
        beforeEach(function () {
            aSimpleFilter = Mock.optionsComponentSetup(SimpleFilter_1.SimpleFilter, {
                field: '@field',
                maximumNumberOfValues: 5,
                title: 'FooTitleBar',
                values: ['foo', 'bar'],
                availableSorts: ['score'],
                sortCriteria: 'score',
                valueCaption: {
                    bar: 'baz',
                    gmailmessage: 'Gmail Message',
                    lithiummessage: 'Lithium Message',
                    youtubevideo: 'Youtube Video',
                    message: 'Message'
                }
            });
            aSimpleFilter.cmp.toggleContainer();
        });
        afterEach(function () {
            aSimpleFilter = null;
        });
        it('should set the title correctly', function () {
            expect(aSimpleFilter.cmp.options.title).toBe('FooTitleBar');
        });
        it('should set the field correctly', function () {
            expect(aSimpleFilter.cmp.options.field).toBe('@field');
        });
        it('should allow to getValueCaption', function () {
            aSimpleFilter.cmp.options.field = '@filetype';
            expect(aSimpleFilter.cmp.getValueCaption('bar')).toBe('baz');
        });
        it('should set the values correctly', function () {
            expect(aSimpleFilter.cmp.options.values).toEqual(['foo', 'bar']);
        });
        it('should set the sortCriteria correctly', function () {
            expect(aSimpleFilter.cmp.options.sortCriteria).toBe('score');
        });
        it('should expand the component correctly', function () {
            aSimpleFilter.cmp.openContainer();
            expect(Dom_1.$$(aSimpleFilter.cmp.getValueContainer()).hasClass('coveo-simplefilter-value-container-expanded')).toBe(true);
        });
        it('should collapse the component correctly', function () {
            aSimpleFilter.cmp.closeContainer();
            expect(Dom_1.$$(aSimpleFilter.cmp.getValueContainer()).hasClass('coveo-simplefilter-value-container-expanded')).toBe(false);
        });
        it('should use the correct selected values', function () {
            aSimpleFilter.cmp.selectValue('foo');
            expect(aSimpleFilter.cmp.getSelectedCaptions()).toEqual(['foo']);
        });
        it('should trigger a query when a checkbox is checked', function () {
            aSimpleFilter.cmp.toggleValue('foo');
            expect(aSimpleFilter.env.queryController.executeQuery).toHaveBeenCalled();
        });
        it('should log an analytics event when a checkbox is checked', function () {
            aSimpleFilter.cmp.toggleValue('foo');
            var eventDefinition = AnalyticsActionListMeta_1.analyticsActionCauseList.simpleFilterSelectValue;
            expect(aSimpleFilter.env.usageAnalytics.logSearchEvent).toHaveBeenCalledWith(jasmine.objectContaining({
                name: eventDefinition.name,
                type: eventDefinition.type
            }), jasmine.objectContaining({
                simpleFilterTitle: aSimpleFilter.cmp.options.title,
                simpleFilterSelectedValue: 'foo'
            }));
        });
        it('should log an analytics event when a checkbox is unselected', function () {
            aSimpleFilter.cmp.toggleValue('foo');
            aSimpleFilter.env.usageAnalytics.logSearchEvent.calls.reset();
            aSimpleFilter.cmp.toggleValue('foo');
            expect(aSimpleFilter.env.usageAnalytics.logSearchEvent).toHaveBeenCalledWith(jasmine.objectContaining({
                name: 'deselectValue'
            }), jasmine.objectContaining({
                simpleFilterTitle: aSimpleFilter.cmp.options.title
            }));
        });
        it('should set the field in the query', function () {
            aSimpleFilter.cmp.options.values = undefined;
            var simulation = Simulate_1.Simulate.query(aSimpleFilter.env);
            expect(simulation.queryBuilder.groupByRequests).toEqual(jasmine.arrayContaining([
                jasmine.objectContaining({
                    field: '@field'
                })
            ]));
        });
        it('should set the sortCriteria in the query', function () {
            aSimpleFilter.cmp.options.values = undefined;
            var simulation = Simulate_1.Simulate.query(aSimpleFilter.env);
            expect(simulation.queryBuilder.groupByRequests).toEqual(jasmine.arrayContaining([
                jasmine.objectContaining({
                    sortCriteria: 'score'
                })
            ]));
        });
        it('should set the selected values in the query', function () {
            aSimpleFilter.cmp.selectValue('foo');
            var simulation = Simulate_1.Simulate.query(aSimpleFilter.env);
            expect(simulation.queryBuilder.advancedExpression.build()).toEqual('@field==foo');
        });
        it('should set the right title depending on values selected', function () {
            aSimpleFilter.cmp.selectValue('foo');
            expect(Dom_1.$$(Dom_1.$$(aSimpleFilter.cmp.root).find('.coveo-simplefilter-selecttext')).text()).toEqual('foo');
            aSimpleFilter.cmp.selectValue('bar');
            expect(Dom_1.$$(Dom_1.$$(aSimpleFilter.cmp.root).find('.coveo-simplefilter-selecttext')).text()).toEqual('FooTitleBar');
        });
        it('should handle the backdrop correctly', function () {
            expect(Dom_1.$$(aSimpleFilter.cmp.root).find('.coveo-dropdown-background')).not.toBe(undefined);
            aSimpleFilter.cmp.openContainer();
            expect(Dom_1.$$(Dom_1.$$(aSimpleFilter.cmp.root).find('.coveo-dropdown-background')).hasClass('coveo-dropdown-background-active')).toBe(true);
            aSimpleFilter.cmp.closeContainer();
            expect(Dom_1.$$(Dom_1.$$(aSimpleFilter.cmp.root).find('.coveo-dropdown-background')).hasClass('coveo-dropdown-background-active')).toBe(false);
        });
        it('should populate the breadcrumb when values are selected', function () {
            aSimpleFilter.cmp.selectValue('bar');
            var args = {
                breadcrumbs: []
            };
            Dom_1.$$(aSimpleFilter.env.root).trigger(BreadcrumbEvents_1.BreadcrumbEvents.populateBreadcrumb, args);
            expect(args.breadcrumbs.length).toBe(1);
        });
        it('should reset checkboxes when clearBreadcrumb is triggered', function () {
            aSimpleFilter.cmp.selectValue('foo');
            aSimpleFilter.cmp.selectValue('bar');
            var args = {
                breadcrumbs: []
            };
            Dom_1.$$(aSimpleFilter.env.root).trigger(BreadcrumbEvents_1.BreadcrumbEvents.populateBreadcrumb, args);
            Dom_1.$$(aSimpleFilter.env.root).trigger(BreadcrumbEvents_1.BreadcrumbEvents.clearBreadcrumb, args);
            expect(aSimpleFilter.cmp.getSelectedCaptions().length).toEqual(0);
        });
        it('should not trigger a query when clearBreadcumb is triggered', function () {
            Dom_1.$$(aSimpleFilter.env.root).trigger(BreadcrumbEvents_1.BreadcrumbEvents.clearBreadcrumb);
            expect(aSimpleFilter.env.queryController.executeQuery).not.toHaveBeenCalled();
        });
        it('should not log an analytics event when clearBreadcrumb is triggered', function () {
            Dom_1.$$(aSimpleFilter.env.root).trigger(BreadcrumbEvents_1.BreadcrumbEvents.clearBreadcrumb);
            expect(aSimpleFilter.env.usageAnalytics.logSearchEvent).not.toHaveBeenCalled();
        });
        it('should redraw checkbox containers with the previously selected Values if they are present', function () {
            aSimpleFilter.cmp.options.values = undefined;
            aSimpleFilter.cmp.closeContainer();
            var results = Fake_1.FakeResults.createFakeResults();
            results.groupByResults = [Fake_1.FakeResults.createFakeGroupByResult('@field', 'foo', 5)];
            Simulate_1.Simulate.query(aSimpleFilter.env, {
                results: results
            });
            aSimpleFilter.cmp.selectValue('foo1');
            Simulate_1.Simulate.query(aSimpleFilter.env);
            expect(aSimpleFilter.cmp.getSelectedCaptions()[0]).toEqual('foo1');
        });
        it('should not render a clear button if enableClearButton is falsy', function () {
            expect(Dom_1.$$(aSimpleFilter.cmp.element).findAll('.coveo-simplefilter-eraser').length).toBe(0);
        });
        describe('with more than one instance', function () {
            var anotherSimpleFilter;
            beforeEach(function () {
                anotherSimpleFilter = Mock.advancedComponentSetup(SimpleFilter_1.SimpleFilter, new Mock.AdvancedComponentSetupOptions(null, aSimpleFilter.cmp.options, function (builder) {
                    return builder.withRoot(aSimpleFilter.env.root);
                }));
                anotherSimpleFilter.cmp.options.field = '@field';
            });
            it('should put all simple filters in the same wrapper if there is more than one', function () {
                expect(aSimpleFilter.cmp.element.parentElement).toEqual(anotherSimpleFilter.cmp.element.parentElement);
            });
            it('should not create more than one wrapper for the simple filters', function () {
                expect(Dom_1.$$(aSimpleFilter.cmp.root).findAll('.coveo-simplefilter-header-wrapper').length).toEqual(1);
            });
            it('should link every simple filter to the same backdrop', function () {
                expect(Dom_1.$$(aSimpleFilter.cmp.root).findAll('.coveo-dropdown-background').length).toEqual(1);
            });
            it('should not create more than one backdrop for the simple filters', function () {
                expect(Dom_1.$$(aSimpleFilter.cmp.root).findAll('.coveo-dropdown-background').length).toEqual(1);
            });
        });
        describe('with clear button functionality', function () {
            var simpleFilterWithEraser;
            function clickOnClearButton() {
                getClearButton().trigger('click');
            }
            function selectSomeValues() {
                simpleFilterWithEraser.cmp.selectValue('foo');
                simpleFilterWithEraser.cmp.selectValue('bar');
            }
            function getClearButton() {
                return Dom_1.$$(Dom_1.$$(simpleFilterWithEraser.cmp.element).find('.coveo-simplefilter-eraser'));
            }
            beforeEach(function () {
                simpleFilterWithEraser = Mock.optionsComponentSetup(SimpleFilter_1.SimpleFilter, __assign({}, aSimpleFilter.cmp.options, { enableClearButton: true }));
                simpleFilterWithEraser.cmp.toggleContainer();
            });
            it('should create a clear button if enableClearButton is true', function () {
                expect(getClearButton()).toBeDefined();
            });
            it('should display the clear button if there are selected values', function () {
                selectSomeValues();
                expect(getClearButton().isVisible()).toBe(true);
            });
            it('should hide the clear button after deselecting all values', function () {
                selectSomeValues();
                simpleFilterWithEraser.cmp.deselectValue('foo');
                simpleFilterWithEraser.cmp.deselectValue('bar');
                expect(getClearButton().isVisible()).toBe(false);
            });
            it('should deselect all values after clicking on the clear button', function () {
                selectSomeValues();
                clickOnClearButton();
                expect(simpleFilterWithEraser.cmp.getSelectedValues().length).toBe(0);
            });
            it('should execute only one query after clicking on the clear button', function () {
                selectSomeValues();
                simpleFilterWithEraser.cmp.queryController.executeQuery.calls.reset();
                clickOnClearButton();
                expect(simpleFilterWithEraser.cmp.queryController.executeQuery).toHaveBeenCalledTimes(1);
            });
            it('should log search event when a clear button is clicked', function () {
                selectSomeValues();
                simpleFilterWithEraser.env.usageAnalytics.logSearchEvent.calls.reset();
                clickOnClearButton();
                expect(simpleFilterWithEraser.env.usageAnalytics.logSearchEvent).toHaveBeenCalledWith(jasmine.objectContaining({
                    name: 'clearAll',
                    type: 'simpleFilter'
                }), jasmine.objectContaining({
                    simpleFilterTitle: simpleFilterWithEraser.cmp.options.title,
                    simpleFilterField: simpleFilterWithEraser.cmp.options.field
                }));
            });
            it('should log only one search event after clicking on clear button', function () {
                selectSomeValues();
                simpleFilterWithEraser.env.usageAnalytics.logSearchEvent.calls.reset();
                clickOnClearButton();
                expect(simpleFilterWithEraser.env.usageAnalytics.logSearchEvent).toHaveBeenCalledTimes(1);
            });
        });
    });
}
exports.SimpleFilterTest = SimpleFilterTest;
 
 
/***/ }),
/* 1731 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var DeviceUtils_1 = __webpack_require__(42);
function DeviceUtilsTest() {
    describe('DeviceUtils', function () {
        it('should detect Edge', function () {
            expect(DeviceUtils_1.DeviceUtils.getDeviceName('Mozilla/5.0 (Windows NT 10.0; <64-bit tags>) AppleWebKit/<WebKit Rev> (KHTML, like Gecko) Chrome/<Chrome Rev> Safari/<WebKit Rev> Edge/<EdgeHTML Rev>.<Windows Build>')).toEqual('Edge');
        });
        it('should detect Chrome', function () {
            expect(DeviceUtils_1.DeviceUtils.getDeviceName('Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.104 Safari/537.36')).toEqual('Chrome');
        });
        it('should detect Firefox', function () {
            expect(DeviceUtils_1.DeviceUtils.getDeviceName('Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:53.0) Gecko/20100101 Firefox/53.0"')).toEqual('Firefox');
        });
        it('should detect Android', function () {
            expect(DeviceUtils_1.DeviceUtils.getDeviceName('Mozilla/5.0 (Linux; <Android Version>; <Build Tag etc.>) AppleWebKit/<WebKit Rev> (KHTML, like Gecko) Chrome/<Chrome Rev> Mobile Safari/<WebKit Rev>')).toEqual('Android');
        });
        it('should detect BlackBerry', function () {
            expect(DeviceUtils_1.DeviceUtils.getDeviceName('Mozilla/5.0 (BlackBerry; U; BlackBerry 9900; en) AppleWebKit/534.11+ (KHTML, like Gecko) Version/7.1.0.346 Mobile Safari/534.11+')).toEqual('BlackBerry');
        });
        it('should detect iPhone', function () {
            expect(DeviceUtils_1.DeviceUtils.getDeviceName('Mozilla/5.0 (iPhone; CPU iPhone OS 6_0 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) Version/6.0 Mobile/10A5376e Safari/8536.25')).toEqual('iPhone');
        });
        it('should detect iPad', function () {
            expect(DeviceUtils_1.DeviceUtils.getDeviceName('Mozilla/5.0 (iPad; CPU OS 6_0 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) Version/6.0 Mobile/10A5376e Safari/8536.25')).toEqual('iPad');
        });
        it('should detect iPad, when using Safari', function () {
            var maxTouchPoints = window.navigator.maxTouchPoints;
            window.navigator['__defineGetter__']('maxTouchPoints', function () {
                return 5;
            });
            expect(DeviceUtils_1.DeviceUtils.getDeviceName('Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36')).toEqual('iPad');
            window.navigator['__defineGetter__']('maxTouchPoints', function () {
                return maxTouchPoints;
            });
        });
        it('should detect Opera Mini', function () {
            expect(DeviceUtils_1.DeviceUtils.getDeviceName('User-Agent: Opera/9.80 (Android; Opera Mini/8.0.1807/36.1609; U; en) Presto/2.12.423 Version/12.16')).toEqual('Opera Mini');
        });
        it('should detect IE', function () {
            expect(DeviceUtils_1.DeviceUtils.getDeviceName('User-Agent: Mozilla/5.0 (Windows NT 6.3; Trident/7.0; rv:11.0) like Gecko')).toEqual('IE');
        });
        it('should detect Opera', function () {
            expect(DeviceUtils_1.DeviceUtils.getDeviceName('Opera/9.80 (X11; Linux i686; Ubuntu/14.10) Presto/2.12.388 Version/12.16')).toEqual('Opera');
        });
        it('should detect Firefox', function () {
            expect(DeviceUtils_1.DeviceUtils.getDeviceName('Mozilla/5.0 (Macintosh; Intel Mac OS X x.y; rv:10.0) Gecko/20100101 Firefox/10.0')).toEqual('Firefox');
        });
        it('should detect Safari', function () {
            expect(DeviceUtils_1.DeviceUtils.getDeviceName('Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_3) AppleWebKit/537.75.14 (KHTML, like Gecko) Version/7.0.3 Safari/7046A194A')).toEqual('Safari');
        });
        it('should fallback on "other" when it does not find anything', function () {
            expect(DeviceUtils_1.DeviceUtils.getDeviceName('weird stuff')).toEqual('Others');
        });
    });
}
exports.DeviceUtilsTest = DeviceUtilsTest;
 
 
/***/ }),
/* 1732 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Mock = __webpack_require__(2);
var TimespanFacet_1 = __webpack_require__(837);
var FacetRange_1 = __webpack_require__(242);
function TimespanFacetTest() {
    describe('TimespanFacet', function () {
        var test;
        beforeEach(function () {
            test = Mock.basicComponentSetup(TimespanFacet_1.TimespanFacet);
        });
        it('should output a working FacetRange', function () {
            expect(test.cmp.facet instanceof FacetRange_1.FacetRange).toBeTruthy();
        });
        it('should contains prebuilt ranges', function () {
            expect(test.cmp.ranges).toEqual(jasmine.arrayContaining([
                {
                    start: jasmine.any(Date),
                    end: jasmine.any(Date),
                    label: jasmine.any(String),
                    endInclusive: false
                }
            ]));
        });
        it('should pass prebuilt ranges to the underlying facet', function () {
            expect(test.cmp.ranges).toEqual(test.cmp.facet.options.ranges);
        });
        it('should allow to change the ranges programmatically, and pass them to the underlying facet', function () {
            var matcher = jasmine.arrayContaining([
                jasmine.objectContaining({
                    label: 'foo'
                })
            ]);
            expect(test.cmp.facet.options.ranges).not.toEqual(matcher);
            test.cmp.ranges = [
                {
                    label: 'foo',
                    start: new Date(),
                    end: new Date(),
                    endInclusive: false
                }
            ];
            expect(test.cmp.facet.options.ranges).toEqual(matcher);
        });
        describe('exposes options', function () {
            it('title should pass the correct title option to the underlying facet', function () {
                test = Mock.optionsComponentSetup(TimespanFacet_1.TimespanFacet, {
                    title: 'A new title'
                });
                expect(test.cmp.facet.options.title).toBe('A new title');
            });
            it('field should pass the correct field option to the underlying facet', function () {
                test = Mock.optionsComponentSetup(TimespanFacet_1.TimespanFacet, {
                    field: '@anotherField'
                });
                expect(test.cmp.facet.options.field).toBe('@anotherField');
            });
            it('id should pass the correct id option to the underlying facet', function () {
                test = Mock.optionsComponentSetup(TimespanFacet_1.TimespanFacet, {
                    id: 'Anewid'
                });
                expect(test.cmp.facet.options.id).toBe('Anewid');
            });
            it('id with spaces should get properly trimmed by the underlying facet', function () {
                test = Mock.optionsComponentSetup(TimespanFacet_1.TimespanFacet, {
                    id: 'A new id'
                });
                expect(test.cmp.facet.options.id).toBe('Anewid');
            });
            it('id should default to the field of the facet', function () {
                test = Mock.optionsComponentSetup(TimespanFacet_1.TimespanFacet, {
                    field: '@afield'
                });
                expect(test.cmp.facet.options.id).toBe('@afield');
            });
            it('should be currentlyDisplayed by default', function () {
                expect(test.cmp.isCurrentlyDisplayed()).toBeTruthy();
            });
            it('should not be currentlyDisplayed if disabled', function () {
                test.cmp.disable();
                expect(test.cmp.isCurrentlyDisplayed()).toBeFalsy();
            });
            it('should not be currentlyDisplayed if the element is set to display:none', function () {
                test.cmp.element.style.display = 'none';
                expect(test.cmp.isCurrentlyDisplayed()).toBeFalsy();
            });
            it('should not be currentlyDisplayed if the element is set to visibility:hidden', function () {
                test.cmp.element.style.visibility = 'hidden';
                expect(test.cmp.isCurrentlyDisplayed()).toBeFalsy();
            });
            it('should not be currentlyDisplayed if the element has a specific css class set by tab(s)', function () {
                test.cmp.element.className = 'coveo-tab-disabled';
                expect(test.cmp.isCurrentlyDisplayed()).toBeFalsy();
            });
        });
    });
}
exports.TimespanFacetTest = TimespanFacetTest;
 
 
/***/ }),
/* 1733 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var UrlUtils_1 = __webpack_require__(108);
var Test_1 = __webpack_require__(40);
function UrlUtilsTest() {
    describe('UrlUtils', function () {
        it('should support combining multiple paths with trailing slash', function () {
            var url = UrlUtils_1.UrlUtils.normalizeAsString({
                paths: ['https://a.com/', 'b/', 'c//', 'd///']
            });
            expect(url).toBe('https://a.com/b/c/d');
        });
        it('should support combining multiple paths with leading slash', function () {
            var url = UrlUtils_1.UrlUtils.normalizeAsString({
                paths: ['https://a.com/', '/b', '//c', '///d']
            });
            expect(url).toBe('https://a.com/b/c/d');
        });
        it('should support relative urls with leading slash', function () {
            var url = UrlUtils_1.UrlUtils.normalizeAsString({
                paths: ['/a', '/b', '//c', '///d']
            });
            expect(url).toBe('/a/b/c/d');
        });
        it('should support relative urls with double leading slash', function () {
            var url = UrlUtils_1.UrlUtils.normalizeAsString({
                paths: ['//a', '/b', '//c', '///d']
            });
            expect(url).toBe('//a/b/c/d');
        });
        it('should support relative url with ..', function () {
            var url = UrlUtils_1.UrlUtils.normalizeAsString({
                paths: ['../a', '/b', '//c', '///d']
            });
            expect(url).toBe('../a/b/c/d');
        });
        it('should support relative url with .', function () {
            var url = UrlUtils_1.UrlUtils.normalizeAsString({
                paths: ['./a', '/b', '//c', '///d']
            });
            expect(url).toBe('./a/b/c/d');
        });
        it('should support passing in query string as an array of strings', function () {
            var url = UrlUtils_1.UrlUtils.normalizeAsString({
                paths: ['https://a.com/'],
                queryAsString: ['123=4', '456=7']
            });
            expect(url).toBe('https://a.com?123=4&456=7');
        });
        it('should support passing in query string as a dictionary', function () {
            var url = UrlUtils_1.UrlUtils.normalizeAsString({
                paths: ['https://a.com/'],
                query: {
                    123: 4,
                    456: 7
                }
            });
            expect(url).toBe('https://a.com?123=4&456=7');
        });
        it('should support passing in query string 0 as a dictionary', function () {
            var url = UrlUtils_1.UrlUtils.normalizeAsString({
                paths: ['https://a.com/'],
                query: {
                    123: 0
                }
            });
            expect(url).toBe('https://a.com?123=0');
        });
        it('should support passing in query string false as a dictionary', function () {
            var url = UrlUtils_1.UrlUtils.normalizeAsString({
                paths: ['https://a.com/'],
                query: {
                    123: false
                }
            });
            expect(url).toBe('https://a.com?123=false');
        });
        it('should use both query string as an array of strings and a dictionary', function () {
            var url = UrlUtils_1.UrlUtils.normalizeAsString({
                paths: ['https://a.com/'],
                queryAsString: ['123=4', '456=7'],
                query: {
                    abc: 'd',
                    efg: 'h'
                }
            });
            expect(url).toBe('https://a.com?123=4&456=7&abc=d&efg=h');
        });
        it('should remove duplicates query string parameters', function () {
            var url = UrlUtils_1.UrlUtils.normalizeAsString({
                paths: ['https://a.com/'],
                queryAsString: ['123=4', '456=7', '123=4'],
                query: {
                    abc: 'd',
                    efg: 'h',
                    123: 4
                }
            });
            expect(url).toBe('https://a.com?123=4&456=7&abc=d&efg=h');
        });
        it('should url encode query string parameters', function () {
            var url = UrlUtils_1.UrlUtils.normalizeAsString({
                paths: ['https://a.com/'],
                queryAsString: ['123=4 56'],
                query: {
                    abc: '&def'
                }
            });
            expect(url).toBe("https://a.com?123=4" + Test_1.Utils.safeEncodeURIComponent(' ') + "56&abc=" + Test_1.Utils.safeEncodeURIComponent('&') + "def");
        });
        it('should not double url encode query string parameters', function () {
            var url = UrlUtils_1.UrlUtils.normalizeAsString({
                paths: ['https://a.com/'],
                queryAsString: ["123=4" + Test_1.Utils.safeEncodeURIComponent(' ') + "56"],
                query: {
                    abc: Test_1.Utils.safeEncodeURIComponent('&') + "def"
                }
            });
            expect(url).toBe("https://a.com?123=4" + Test_1.Utils.safeEncodeURIComponent(' ') + "56&abc=" + Test_1.Utils.safeEncodeURIComponent('&') + "def");
        });
        it("when a query record value contains both encoded and unencoded characters,\n    it encodes all characters once", function () {
            var url = UrlUtils_1.UrlUtils.normalizeAsString({
                paths: ['https://a.com/'],
                query: { redirectUri: 'https://b.com/#q=hello%20world' }
            });
            expect(url).toBe("https://a.com?redirectUri=https%3A%2F%2Fb.com%2F%23q%3Dhello%20world");
        });
        it("when a query string parameter contains both encoded and unencoded characters,\n    it encodes all characters once", function () {
            var url = UrlUtils_1.UrlUtils.normalizeAsString({
                paths: ['https://a.com/'],
                queryAsString: ['q=/hello%20world']
            });
            expect(url).toBe('https://a.com?q=%2Fhello%20world');
        });
        it('should remove query string parameter that are an empty string', function () {
            var url = UrlUtils_1.UrlUtils.normalizeAsString({
                paths: ['https://a.com/'],
                queryAsString: ["123=456"],
                query: {
                    abc: ''
                }
            });
            expect(url).toBe("https://a.com?123=456");
        });
        it('should nremove query string parameter that are null', function () {
            var url = UrlUtils_1.UrlUtils.normalizeAsString({
                paths: ['https://a.com/'],
                queryAsString: ["123=456"],
                query: {
                    abc: null
                }
            });
            expect(url).toBe("https://a.com?123=456");
        });
        it('should remove query string parameter that are undefined', function () {
            var url = UrlUtils_1.UrlUtils.normalizeAsString({
                paths: ['https://a.com/'],
                queryAsString: ["123=456"],
                query: {
                    abc: undefined
                }
            });
            expect(url).toBe("https://a.com?123=456");
        });
        it('should not remove query string parameter that are 0', function () {
            var url = UrlUtils_1.UrlUtils.normalizeAsString({
                paths: ['https://a.com/'],
                queryAsString: ["123=0"],
                query: {
                    abc: 0
                }
            });
            expect(url).toBe("https://a.com?123=0&abc=0");
        });
        it('should not remove query string parameter that are "null" as string', function () {
            var url = UrlUtils_1.UrlUtils.normalizeAsString({
                paths: ['https://a.com/'],
                queryAsString: ["123=null"],
                query: {
                    abc: 'null'
                }
            });
            expect(url).toBe("https://a.com?123=null&abc=null");
        });
        it('should not remove query string parameter that are "undefined" as string', function () {
            var url = UrlUtils_1.UrlUtils.normalizeAsString({
                paths: ['https://a.com/'],
                queryAsString: ["123=undefined"],
                query: {
                    abc: 'undefined'
                }
            });
            expect(url).toBe("https://a.com?123=undefined&abc=undefined");
        });
        it('should not remove query string parameter that are "false" as string', function () {
            var url = UrlUtils_1.UrlUtils.normalizeAsString({
                paths: ['https://a.com/'],
                queryAsString: ["123=false"],
                query: {
                    abc: 'false'
                }
            });
            expect(url).toBe("https://a.com?123=false&abc=false");
        });
        it('should not remove query string parameter that are "true" as string', function () {
            var url = UrlUtils_1.UrlUtils.normalizeAsString({
                paths: ['https://a.com/'],
                queryAsString: ["123=true"],
                query: {
                    abc: 'true'
                }
            });
            expect(url).toBe("https://a.com?123=true&abc=true");
        });
        it('should not remove pipeline query string parameter that is empty', function () {
            var url = UrlUtils_1.UrlUtils.normalizeAsString({
                paths: ['https://a.com/'],
                queryAsString: ["123=true"],
                query: {
                    pipeline: ''
                }
            });
            expect(url).toBe("https://a.com?123=true&pipeline=");
        });
        it('should not remove pipeline query string parameter that is empty', function () {
            var url = UrlUtils_1.UrlUtils.normalizeAsString({
                paths: ['https://a.com/'],
                queryAsString: ["pipeline="],
                query: {
                    abc: '',
                    def: 'hij'
                }
            });
            expect(url).toBe("https://a.com?pipeline&def=hij");
        });
        it('should remove incoherent "?" character', function () {
            var url = UrlUtils_1.UrlUtils.normalizeAsString({
                paths: ['https://a.com/?'],
                queryAsString: ['?123=4', '456?=7', '123=4'],
                query: {
                    'abc?': 'd',
                    '?efg': 'h?',
                    123: 4
                }
            });
            expect(url).toBe("https://a.com?123=4&456=7&abc=d&efg=h" + Test_1.Utils.safeEncodeURIComponent('?'));
        });
        it('should remove incoherent "=" character', function () {
            var url = UrlUtils_1.UrlUtils.normalizeAsString({
                paths: ['https://a.com'],
                queryAsString: ['=123=4'],
                query: {
                    '=abc': 'd',
                    'efg=': 'h'
                }
            });
            expect(url).toBe("https://a.com?123=4&abc=d&efg=h");
        });
    });
}
exports.UrlUtilsTest = UrlUtilsTest;
 
 
/***/ }),
/* 1734 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { Iif (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        Iif (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            Iif (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
            Iif (y = 0, t) op = [0, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    Eif (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        Iif (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
Object.defineProperty(exports, "__esModule", { value: true });
var AccessToken_1 = __webpack_require__(167);
var underscore_1 = __webpack_require__(1);
function AccessTokenTest() {
    var _this = this;
    describe('AccessToken', function () {
        var token;
        beforeEach(function () {
            token = new AccessToken_1.AccessToken('el accesso tokeno');
        });
        it('should properly return that the renew was not successful if there is no renew function', function (done) { return __awaiter(_this, void 0, void 0, function () {
            var renewSuccessful;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0: return [4 /*yield*/, token.doRenew()];
                    case 1:
                        renewSuccessful = _a.sent();
                        expect(renewSuccessful).toBeFalsy();
                        done();
                        return [2 /*return*/];
                }
            });
        }); });
        describe('with a valid renew function', function () {
            var renew;
            beforeEach(function () {
                renew = jasmine.createSpy('spy').and.returnValue(Promise.resolve('nuevo tokeno'));
                token = new AccessToken_1.AccessToken('el accesso tokeno', renew);
            });
            it('should return a success on renew', function (done) { return __awaiter(_this, void 0, void 0, function () {
                var renewSuccessful;
                return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0: return [4 /*yield*/, token.doRenew()];
                        case 1:
                            renewSuccessful = _a.sent();
                            expect(renew).toHaveBeenCalled();
                            expect(renewSuccessful).toBeTruthy();
                            done();
                            return [2 /*return*/];
                    }
                });
            }); });
            it('should call subscribers', function (done) { return __awaiter(_this, void 0, void 0, function () {
                var subscriber;
                return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0:
                            subscriber = jasmine.createSpy('subscriber');
                            token.subscribeToRenewal(subscriber);
                            return [4 /*yield*/, token.doRenew()];
                        case 1:
                            _a.sent();
                            expect(subscriber).toHaveBeenCalledWith('nuevo tokeno');
                            done();
                            return [2 /*return*/];
                    }
                });
            }); });
        });
        describe('with an error callback on renew', function () {
            var errCallback;
            beforeEach(function () {
                errCallback = jasmine.createSpy('onError');
            });
            it('should be called if there is no renew function', function (done) { return __awaiter(_this, void 0, void 0, function () {
                return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0: return [4 /*yield*/, token.doRenew(errCallback)];
                        case 1:
                            _a.sent();
                            expect(errCallback).toHaveBeenCalled();
                            done();
                            return [2 /*return*/];
                    }
                });
            }); });
            describe('with a renew function that throws an error', function () {
                var renew;
                beforeEach(function () {
                    renew = jasmine.createSpy('throw error').and.throwError('oh no');
                    token = new AccessToken_1.AccessToken('el accesso tokeno', renew);
                });
                it('should call the error callback if the renew function throws an error', function (done) { return __awaiter(_this, void 0, void 0, function () {
                    return __generator(this, function (_a) {
                        switch (_a.label) {
                            case 0: return [4 /*yield*/, token.doRenew(errCallback)];
                            case 1:
                                _a.sent();
                                expect(errCallback).toHaveBeenCalled();
                                done();
                                return [2 /*return*/];
                        }
                    });
                }); });
                it('should stop trying to renew if it fails rapidly in succession', function (done) { return __awaiter(_this, void 0, void 0, function () {
                    var _this = this;
                    return __generator(this, function (_a) {
                        switch (_a.label) {
                            case 0: return [4 /*yield*/, underscore_1.times(10, function () { return __awaiter(_this, void 0, void 0, function () {
                                    return __generator(this, function (_a) {
                                        return [2 /*return*/, token.doRenew()];
                                    });
                                }); })];
                            case 1:
                                _a.sent();
                                expect(renew).toHaveBeenCalledTimes(4);
                                done();
                                return [2 /*return*/];
                        }
                    });
                }); });
            });
        });
    });
}
exports.AccessTokenTest = AccessTokenTest;
 
 
/***/ }),
/* 1735 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __assign = (this && this.__assign) || Object.assign || function(t) {
    for (var s, i = 1, n = arguments.length; i < n; i++) {
        s = arguments[i];
        for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
            t[p] = s[p];
    }
    return t;
};
Object.defineProperty(exports, "__esModule", { value: true });
var CategoryFacetValuesTree_1 = __webpack_require__(691);
function buildCategoryFacetValue(config) {
    Iif (config === void 0) { config = {}; }
    return __assign({ numberOfResults: 0, value: '' }, config);
}
function buildCategoryFacetResult(config) {
    Iif (config === void 0) { config = {}; }
    return __assign({ field: '', notImplemented: false, parentValues: [], values: [] }, config);
}
function CategoryFacetValuesTreeTest() {
    describe('CategoryFacetValuesTree', function () {
        var klass;
        beforeEach(function () { return (klass = new CategoryFacetValuesTree_1.CategoryFacetValuesTree()); });
        describe("when the category facet result has no parents but has values, calling #storeNewValues", function () {
            var value1 = buildCategoryFacetValue({ value: 'hello' });
            var value2 = buildCategoryFacetValue({ value: 'world' });
            var result = buildCategoryFacetResult({ parentValues: [], values: [value1, value2] });
            beforeEach(function () { return klass.storeNewValues(result); });
            it("adds the values to base level of #seenValues", function () {
                var _a = klass.seenValues, firstSeenValue = _a[0], secondSeenValue = _a[1];
                expect(firstSeenValue.result).toEqual(value1);
                expect(secondSeenValue.result).toEqual(value2);
            });
            it("calling #storeNewValues a second time with the same values does not add the values again", function () {
                klass.storeNewValues(result);
                expect(klass.seenValues.length).toBe(result.values.length);
            });
        });
        describe("when the category facet result has a parent value and no values, calling #storeNewValues", function () {
            var parentValue = buildCategoryFacetValue({ value: 'parent' });
            var result = buildCategoryFacetResult({ parentValues: [parentValue], values: [] });
            beforeEach(function () { return klass.storeNewValues(result); });
            it("adds the parent value to base level of #seenValues", function () {
                var firstSeenValue = klass.seenValues[0];
                expect(firstSeenValue.result).toEqual(parentValue);
            });
            it("calling #storeNewValues a second time with the same parent value does not add the parent value again", function () {
                klass.storeNewValues(result);
                expect(klass.seenValues.length).toBe(result.parentValues.length);
            });
        });
        it("when the category facet result has two parent values and no values,\n    calling #storeNewValues adds the first parent value to base level of #seenValues,\n    and the second parent value as a child of the first parent value", function () {
            var parentValue1 = buildCategoryFacetValue({ value: 'parent1' });
            var parentValue2 = buildCategoryFacetValue({ value: 'parent2' });
            var result = buildCategoryFacetResult({ parentValues: [parentValue1, parentValue2], values: [] });
            klass.storeNewValues(result);
            var firstSeenValue = klass.seenValues[0];
            expect(firstSeenValue.result).toEqual(parentValue1);
            expect(firstSeenValue.children[0].result).toEqual(parentValue2);
        });
        it("when the category facet result has one parent value and one value,\n    calling #storeNewValues adds the value as a child of the parent value", function () {
            var parentValue = buildCategoryFacetValue({ value: 'parent' });
            var childValue = buildCategoryFacetValue({ value: 'child' });
            var result = buildCategoryFacetResult({ parentValues: [parentValue], values: [childValue] });
            klass.storeNewValues(result);
            var firstSeenValue = klass.seenValues[0];
            expect(firstSeenValue.result).toEqual(parentValue);
            expect(firstSeenValue.children[0].result).toEqual(childValue);
        });
        it("when calling #getValueForLastPartInPath with an empty array,\n    it returns a an object with #value that is an empty string", function () {
            var result = klass.getValueForLastPartInPath([]);
            expect(result.value).toBe('');
        });
        it("when calling #getValueForLastPartInPath with an array with a value that has not been seen,\n    it returns an object with #value that is an empty string", function () {
            var result = klass.getValueForLastPartInPath(['newValue']);
            expect(result.value).toBe('');
        });
        describe("when calling #storeNewValues with two parent values", function () {
            var parent1 = buildCategoryFacetValue({ value: 'parent1' });
            var parent2 = buildCategoryFacetValue({ value: 'parent2' });
            beforeEach(function () {
                var result = buildCategoryFacetResult({ parentValues: [parent1, parent2] });
                klass.storeNewValues(result);
            });
            it("when calling #getValueForLastPartInPath with the names of the parent values in the correct order,\n      it returns the second parent", function () {
                var path = [parent1.value, parent2.value];
                var lastParent = klass.getValueForLastPartInPath(path);
                expect(lastParent.value).toBe(parent2.value);
            });
            it("when calling #getValueForLastPartInPath with the names of the parent values in reverse order,\n      it returns an object with #value that is an empty string", function () {
                var path = [parent2.value, parent1.value];
                var lastParent = klass.getValueForLastPartInPath(path);
                expect(lastParent.value).toBe('');
            });
        });
    });
}
exports.CategoryFacetValuesTreeTest = CategoryFacetValuesTreeTest;
 
 
/***/ }),
/* 1736 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Mock = __webpack_require__(2);
var DynamicHierarchicalFacetTestUtils_1 = __webpack_require__(128);
var DynamicFacetTestUtils_1 = __webpack_require__(77);
var FacetRequest_1 = __webpack_require__(127);
var BreadcrumbEvents_1 = __webpack_require__(33);
var Core_1 = __webpack_require__(9);
var Fake_1 = __webpack_require__(11);
var Simulate_1 = __webpack_require__(15);
var FacetValueState_1 = __webpack_require__(36);
var ResultListUtils_1 = __webpack_require__(72);
var DynamicFacetManager_1 = __webpack_require__(276);
var AnalyticsActionListMeta_1 = __webpack_require__(7);
var FacetSortCriteria_1 = __webpack_require__(156);
function DynamicHierarchicalFacetTest() {
    describe('DynamicHierarchicalFacet', function () {
        var test;
        var options;
        var mockFacetValues;
        var triggerNewQuerySpy;
        beforeEach(function () {
            options = { field: '@dummy' };
            initializeComponent();
        });
        function initializeComponent() {
            test = DynamicHierarchicalFacetTestUtils_1.DynamicHierarchicalFacetTestUtils.createAdvancedFakeFacet(options);
            mockFacetValues = DynamicHierarchicalFacetTestUtils_1.DynamicHierarchicalFacetTestUtils.createFakeFacetResponseValues(3, 5);
            test.cmp.values.createFromResponse(DynamicHierarchicalFacetTestUtils_1.DynamicHierarchicalFacetTestUtils.getCompleteFacetResponse(test.cmp, {
                values: mockFacetValues
            }));
            spyOn(test.cmp, 'selectPath').and.callThrough();
            spyOn(test.cmp, 'logAnalyticsEvent').and.callThrough();
            spyOn(test.cmp, 'scrollToTop').and.callThrough();
            spyOn(test.cmp, 'ensureDom').and.callThrough();
            spyOn(test.cmp, 'triggerNewIsolatedQuery').and.callThrough();
            spyOn(test.cmp, 'reset').and.callThrough();
            spyOn(test.cmp, 'putStateIntoQueryBuilder').and.callThrough();
            spyOn(test.cmp, 'putStateIntoAnalytics').and.callThrough();
            spyOn(test.cmp, 'handleQueryResults').and.callThrough();
            spyOn(test.cmp, 'enablePreventAutoSelectionFlag').and.callThrough();
            spyOn(test.cmp.logger, 'warn').and.callThrough();
            spyOn(test.cmp.values, 'createFromResponse').and.callThrough();
            spyOn(test.cmp.values, 'render').and.callThrough();
            spyOn(test.cmp.values, 'selectPath').and.callThrough();
            spyOn(test.cmp.values, 'resetValues').and.callThrough();
            spyOn(test.cmp.values, 'clearPath').and.callThrough();
            triggerNewQuerySpy = spyOn(test.cmp, 'triggerNewQuery').and.callThrough();
            triggerNewQuerySpy.and.callThrough();
        }
        function triggerPopulateBreadcrumbs() {
            var args = { breadcrumbs: [] };
            Core_1.$$(test.env.root).trigger(BreadcrumbEvents_1.BreadcrumbEvents.populateBreadcrumb, args);
            return args.breadcrumbs;
        }
        function searchFeatureActive() {
            return !!Core_1.$$(test.cmp.element).find('.coveo-dynamic-facet-search');
        }
        function searchFeatureDisplayed() {
            return Core_1.$$(Core_1.$$(test.cmp.element).find('.coveo-dynamic-facet-search')).isVisible();
        }
        function testQueryStateModelValues(path) {
            var QueryStateModelValues = test.env.queryStateModel.attributes["f:" + test.cmp.options.id];
            expect(QueryStateModelValues).toEqual(path);
        }
        function validateExpandCollapse(shouldBeCollapsed) {
            expect(Core_1.$$(test.cmp.element).hasClass('coveo-dynamic-hierarchical-facet-collapsed')).toBe(shouldBeCollapsed);
        }
        function fakeResultsWithFacets() {
            var fakeResultsWithFacets = Fake_1.FakeResults.createFakeResults();
            fakeResultsWithFacets.facets = [
                DynamicFacetTestUtils_1.DynamicFacetTestUtils.getCompleteFacetResponse(DynamicFacetTestUtils_1.DynamicFacetTestUtils.createAdvancedFakeFacet({ field: '@anotherfield' }).cmp),
                DynamicHierarchicalFacetTestUtils_1.DynamicHierarchicalFacetTestUtils.getCompleteFacetResponse(test.cmp, {
                    values: mockFacetValues
                })
            ];
            return fakeResultsWithFacets;
        }
        function fakeResultsWithNoFacets() {
            var fakeResultsWithFacets = Fake_1.FakeResults.createFakeResults();
            fakeResultsWithFacets.facets = [];
            return fakeResultsWithFacets;
        }
        function getFirstFacetRequest() {
            return Simulate_1.Simulate.query(test.env).queryBuilder.build().facets[0];
        }
        it('fieldName should return the field without @', function () {
            expect(test.cmp.fieldName).toBe('dummy');
        });
        it('facetType should be hierarchical', function () {
            expect(test.cmp.facetType).toBe(FacetRequest_1.FacetType.hierarchical);
        });
        it("when not setting a sortCriteria option\n      should set it to undefined in the query", function () {
            expect(getFirstFacetRequest().sortCriteria).toBeUndefined();
        });
        it("when setting an invalid sortCriteria option\n      should set it to undefined in the query", function () {
            options.sortCriteria = FacetSortCriteria_1.FacetSortCriteria.score;
            initializeComponent();
            expect(getFirstFacetRequest().sortCriteria).toBeUndefined();
        });
        it("when setting a valid sortCriteria option\n      should pass it down to the query", function () {
            options.sortCriteria = FacetSortCriteria_1.FacetSortCriteria.alphanumeric;
            initializeComponent();
            expect(getFirstFacetRequest().sortCriteria).toBe(FacetSortCriteria_1.FacetSortCriteria.alphanumeric);
        });
        it('should populate breadcrumbs by default', function () {
            test.cmp.selectPath(['foo']);
            var breadcrumbs = triggerPopulateBreadcrumbs();
            expect(breadcrumbs.length).toBe(1);
        });
        it('should not populate breadcrumbs if the option includeInBreadcrumb is set to "false"', function () {
            options.includeInBreadcrumb = false;
            initializeComponent();
            test.cmp.selectPath(['foo']);
            var breadcrumbs = triggerPopulateBreadcrumbs();
            expect(breadcrumbs.length).toBe(0);
        });
        it("when updating the QueryStateModel\n    should change the values correctly", function () {
            test.env.queryStateModel.registerNewAttribute("f:" + test.cmp.options.id, []);
            test.env.queryStateModel.set("f:" + test.cmp.options.id, ['a', 'b', 'c']);
            testQueryStateModelValues(['a', 'b', 'c']);
        });
        it("when a previously idle value is returned selected by the API (autoselection)\n    should update the QueryStateModel correctly", function () {
            mockFacetValues[0].children = [];
            mockFacetValues[0].state = FacetValueState_1.FacetValueState.selected;
            var results = fakeResultsWithFacets();
            Simulate_1.Simulate.query(test.env, { results: results });
            testQueryStateModelValues([results.facets[1].values[0].value]);
        });
        it('should call selectPath when selecting a path through the QueryStateModel', function () {
            test.env.queryStateModel.set("f:" + test.cmp.options.id, ['a', 'b', 'c']);
            expect(test.cmp.selectPath).toHaveBeenCalledWith(['a', 'b', 'c']);
        });
        it('should not call selectPath when selecting a identical path through the QueryStateModel', function () {
            test.env.queryStateModel.set("f:" + test.cmp.options.id, ['a', 'b', 'c']);
            test.env.queryStateModel.set("f:" + test.cmp.options.id, ['a', 'b', 'c']);
            expect(test.cmp.selectPath).toHaveBeenCalledTimes(1);
        });
        it('should call reset when clearing the path through the QueryStateModel', function () {
            test.env.queryStateModel.set("f:" + test.cmp.options.id, ['test']);
            test.env.queryStateModel.set("f:" + test.cmp.options.id, []);
            expect(test.cmp.reset).toHaveBeenCalledTimes(1);
        });
        it('should not call reset when clearing an empty path through the QueryStateModel', function () {
            test.env.queryStateModel.set("f:" + test.cmp.options.id, []);
            expect(test.cmp.reset).not.toHaveBeenCalled();
        });
        describe('testing collapse/expand', function () {
            it("when enableCollapse & collapsedByDefault options are true\n        facet should be collapsed", function () {
                options.enableCollapse = true;
                options.collapsedByDefault = true;
                initializeComponent();
                test.cmp.ensureDom();
                validateExpandCollapse(true);
            });
            it("when enableCollapse is false & collapsedByDefault options is true\n        facet should not be collapsed", function () {
                options.enableCollapse = false;
                options.collapsedByDefault = true;
                initializeComponent();
                test.cmp.ensureDom();
                validateExpandCollapse(false);
            });
            it("allows to collapse when enableCollapse is true", function () {
                test.cmp.ensureDom();
                test.cmp.collapse();
                validateExpandCollapse(true);
            });
            it("allows to expand when enableCollapse is true", function () {
                test.cmp.ensureDom();
                test.cmp.collapse();
                test.cmp.expand();
                validateExpandCollapse(false);
            });
            it("does not allow to expand if the enableCollapse is false", function () {
                options.enableCollapse = false;
                initializeComponent();
                test.cmp.ensureDom();
                test.cmp.collapse();
                expect(test.cmp.logger.warn).toHaveBeenCalled();
            });
            it("does not allow to collapse if the enableCollapse is false", function () {
                options.enableCollapse = false;
                initializeComponent();
                test.cmp.ensureDom();
                test.cmp.expand();
                expect(test.cmp.logger.warn).toHaveBeenCalled();
            });
            it("allows to toggle between expand/collapse", function () {
                test.cmp.ensureDom();
                test.cmp.toggleCollapse();
                validateExpandCollapse(true);
                test.cmp.toggleCollapse();
                validateExpandCollapse(false);
            });
        });
        it('calling "scrollToTop" should call "scrollToTop" on the ResultListUtils', function () {
            spyOn(ResultListUtils_1.ResultListUtils, 'scrollToTop');
            test.cmp.scrollToTop();
            expect(ResultListUtils_1.ResultListUtils.scrollToTop).toHaveBeenCalledWith(test.cmp.root);
        });
        it("when the enableScrollToTop option is \"false\"\n    calling \"scrollToTop\" should not call \"scrollToTop\" on the ResultListUtils", function () {
            options.enableScrollToTop = false;
            initializeComponent();
            spyOn(ResultListUtils_1.ResultListUtils, 'scrollToTop');
            test.cmp.scrollToTop();
            expect(ResultListUtils_1.ResultListUtils.scrollToTop).not.toHaveBeenCalledWith(test.cmp.root);
        });
        it('allows to trigger a new query', function () {
            test.cmp.ensureDom();
            test.cmp.triggerNewQuery();
            expect(test.cmp.queryController.executeQuery).toHaveBeenCalled();
        });
        it('allows to trigger a new isolated query', function () {
            spyOn(test.cmp.dynamicHierarchicalFacetQueryController, 'getQueryResults');
            var beforeExecuteQuery = jasmine.createSpy('beforeExecuteQuery', function () { });
            test.cmp.ensureDom();
            test.cmp.triggerNewIsolatedQuery(beforeExecuteQuery);
            expect(test.cmp.dynamicHierarchicalFacetQueryController.getQueryResults).toHaveBeenCalled();
            expect(beforeExecuteQuery).toHaveBeenCalled();
        });
        it('triggering a new isolated query updates the values', function () {
            test.cmp.ensureDom();
            test.cmp.triggerNewIsolatedQuery();
            expect(test.cmp.values.render).toHaveBeenCalled();
        });
        describe('when "enableFacetSearch" option is false', function () {
            beforeEach(function () {
                options.enableFacetSearch = false;
                initializeComponent();
                test.cmp.ensureDom();
            });
            it("it should not render the search element", function () {
                expect(searchFeatureActive()).toBe(false);
            });
            it("it should not throw when collapsing", function () {
                expect(function () { return test.cmp.collapse(); }).not.toThrow();
            });
        });
        describe('when "enableFacetSearch" option is true', function () {
            beforeEach(function () {
                options.enableFacetSearch = true;
                initializeComponent();
                test.cmp.ensureDom();
            });
            it("it should show the search element", function () {
                expect(searchFeatureDisplayed()).toBe(true);
            });
            it("when collapsing the facet\n      it should hide the search element", function () {
                test.cmp.collapse();
                expect(searchFeatureDisplayed()).toBe(false);
            });
            it("when expanding a collapsed facet\n      it should show the search element", function () {
                test.cmp.collapse();
                test.cmp.expand();
                expect(searchFeatureDisplayed()).toBe(true);
            });
        });
        describe('testing showMoreValues/showLessValues', function () {
            it('showMoreValues adds by the numberOfValues option by default', function () {
                var additionalNumberOfValues = test.cmp.options.numberOfValues;
                test.cmp.showMoreValues();
                expect(getFirstFacetRequest().numberOfValues).toBe(test.cmp.options.numberOfValues + additionalNumberOfValues);
            });
            it('allows to showMoreValues with a custom amount of values', function () {
                var additionalNumberOfValues = 38;
                test.cmp.showMoreValues(additionalNumberOfValues);
                expect(test.cmp.triggerNewIsolatedQuery).toHaveBeenCalled();
                expect(getFirstFacetRequest().numberOfValues).toBe(test.cmp.options.numberOfValues + additionalNumberOfValues);
            });
            it('showMoreValues triggers a query', function () {
                test.cmp.showMoreValues();
                expect(test.cmp.triggerNewIsolatedQuery).toHaveBeenCalled();
            });
            it('showLessValues resets the amount of values to the numberOfValues option', function () {
                var additionalNumberOfValues = 38;
                test.cmp.showMoreValues(additionalNumberOfValues);
                test.cmp.showLessValues();
                expect(getFirstFacetRequest().numberOfValues).toBe(test.cmp.options.numberOfValues);
            });
            it('showLessValues triggers a query', function () {
                test.cmp.showLessValues();
                expect(test.cmp.triggerNewIsolatedQuery).toHaveBeenCalled();
            });
        });
        it('calling enableFreezeFacetOrderFlag should call it in the dynamicHierarchicalFacetQueryController', function () {
            spyOn(test.cmp.dynamicHierarchicalFacetQueryController, 'enableFreezeFacetOrderFlag').and.callThrough();
            test.cmp.enableFreezeFacetOrderFlag();
            expect(test.cmp.dynamicHierarchicalFacetQueryController.enableFreezeFacetOrderFlag).toHaveBeenCalled();
        });
        describe('when calling reset', function () {
            beforeEach(function () {
                test.cmp.values.selectPath(['hey']);
                test.cmp.reset();
            });
            it('should call clearPath on the values', function () {
                expect(test.cmp.values.clearPath).toHaveBeenCalled();
            });
            it('should update queryStateModel with an empty array', function () {
                testQueryStateModelValues([]);
            });
            it('should prevent autoselection', function () {
                expect(test.cmp.enablePreventAutoSelectionFlag).toHaveBeenCalled();
            });
        });
        describe('when calling selectPath', function () {
            var path = ['new', 'original', 'path'];
            beforeEach(function () {
                test.cmp.selectPath(path);
            });
            it('should call ensureDom', function () {
                expect(test.cmp.ensureDom).toHaveBeenCalled();
            });
            it('should update queryStateModel with the path', function () {
                testQueryStateModelValues(path);
            });
            it('should call selectPath on the values', function () {
                expect(test.cmp.values.selectPath).toHaveBeenCalledWith(path);
            });
        });
        it('getCaption should return the caption for a value', function () {
            options.valueCaption = { test: 'this is a test' };
            initializeComponent();
            expect(test.cmp.getCaption('test')).toBe('this is a test');
        });
        describe('Testing the header', function () {
            beforeEach(function () {
                test.cmp.selectPath([mockFacetValues[0].value]);
                test.cmp.ensureDom();
                spyOn(test.cmp.header, 'showLoading').and.callThrough();
                spyOn(test.cmp.header, 'hideLoading').and.callThrough();
                spyOn(test.cmp.header, 'toggleCollapse').and.callThrough();
            });
            it("when triggering the header \"clear\" method\n      should perform the correct action on the facet", function () {
                test.cmp.header.options.clear();
                expect(test.cmp.reset).toHaveBeenCalledTimes(1);
                expect(test.cmp.triggerNewQuery).toHaveBeenCalledTimes(1);
            });
            it("when triggering the header \"clear\" method\n      should log an analytics event", function () {
                triggerNewQuerySpy.and.callFake(function (beforeCb) {
                    Iif (beforeCb === void 0) { beforeCb = function () { }; }
                    return beforeCb();
                });
                test.cmp.header.options.clear();
                expect(test.cmp.logAnalyticsEvent).toHaveBeenCalledWith(AnalyticsActionListMeta_1.analyticsActionCauseList.dynamicFacetClearAll);
            });
            it("when triggering a query\n      should call \"showLoading\" on the header", function () {
                test.cmp.triggerNewQuery();
                expect(test.cmp.header.showLoading).toHaveBeenCalledTimes(1);
            });
            it("when calling handleQueryResults\n        should call \"hideLoading\" on the header", function () {
                test.cmp.handleQueryResults(fakeResultsWithFacets());
                expect(test.cmp.header.hideLoading).toHaveBeenCalledTimes(1);
            });
            it('should call "toggleCollapse" when calling collapse', function () {
                test.cmp.collapse();
                expect(test.cmp.header.toggleCollapse).toHaveBeenCalled();
            });
        });
        describe('testing the DependsOnManager', function () {
            var dependentFacet;
            beforeEach(function () {
                dependentFacet = DynamicHierarchicalFacetTestUtils_1.DynamicHierarchicalFacetTestUtils.createAdvancedFakeFacet({ field: '@dependentField', dependsOn: test.cmp.options.id }, test.env).cmp;
                Core_1.$$(dependentFacet.root).trigger(Core_1.InitializationEvents.afterComponentsInitialization);
                spyOn(dependentFacet, 'reset');
            });
            it('should initialize the dependsOnManager', function () {
                expect(dependentFacet.dependsOnManager).toBeTruthy();
            });
            it("when query state changes so that parent has selected values (default condition fulfilled)\n      should not call \"reset\" on the dependent facet", function () {
                test.cmp.selectPath(['test']);
                expect(dependentFacet.reset).not.toHaveBeenCalled();
            });
            it("when query state changes so that parent has no selected values (default condition not fulfilled)\n      should call \"reset\" on the dependent facet", function () {
                test.cmp.selectPath(['test']);
                test.cmp.reset();
                expect(dependentFacet.reset).toHaveBeenCalledTimes(1);
            });
        });
        describe('testing putStateIntoQueryBuilder', function () {
            it("when calling putStateIntoQueryBuilder\n      should call putFacetIntoQueryBuilder on the dynamicHierarchicalFacetQueryController", function () {
                spyOn(test.cmp.dynamicHierarchicalFacetQueryController, 'putFacetIntoQueryBuilder');
                var queryBuilder = new Core_1.QueryBuilder();
                test.cmp.putStateIntoQueryBuilder(queryBuilder);
                expect(test.cmp.dynamicHierarchicalFacetQueryController.putFacetIntoQueryBuilder).toHaveBeenCalledWith(queryBuilder);
            });
            it("when triggering doneBuildingQuery\n      should call putStateIntoQueryBuilder on the facet", function () {
                var queryBuilder = new Core_1.QueryBuilder();
                Core_1.$$(test.cmp.root).trigger(Core_1.QueryEvents.doneBuildingQuery, { queryBuilder: queryBuilder });
                expect(test.cmp.putStateIntoQueryBuilder).toHaveBeenCalledWith(queryBuilder);
            });
            it("when facet as a dynamicFacetManager\n      when triggering doneBuildingQuery\n      should not call putStateIntoQueryBuilder on the facet", function () {
                test.cmp.dynamicFacetManager = Mock.mockComponent(DynamicFacetManager_1.DynamicFacetManager);
                Core_1.$$(test.cmp.root).trigger(Core_1.QueryEvents.doneBuildingQuery, { queryBuilder: new Core_1.QueryBuilder() });
                expect(test.cmp.putStateIntoQueryBuilder).not.toHaveBeenCalled();
            });
        });
        describe('testing putStateIntoAnalytics', function () {
            it("when calling \"putStateIntoAnalytics\" \n        should call \"getPendingSearchEvent\" on the \"usageAnalytics\" object", function () {
                test.cmp.putStateIntoAnalytics();
                expect(test.cmp.usageAnalytics.getPendingSearchEvent).toHaveBeenCalled();
            });
            it("when calling \"putStateIntoAnalytics\" \n        should call \"addFacetState\" on the \"PendingSearchEvent\" with the correct state", function () {
                var fakePendingSearchEvent = {
                    addFacetState: jasmine.createSpy('addFacetState')
                };
                test.cmp.usageAnalytics.getPendingSearchEvent = jasmine
                    .createSpy('getPendingSearchEvent')
                    .and.callFake(function () { return fakePendingSearchEvent; });
                test.cmp.putStateIntoAnalytics();
                expect(fakePendingSearchEvent.addFacetState).toHaveBeenCalledWith(test.cmp.analyticsFacetState);
            });
            it("when facet as a dynamicFacetManager\n      when triggering doneBuildingQuery\n      should not call putStateIntoAnalytics on the facet", function () {
                test.cmp.dynamicFacetManager = Mock.mockComponent(DynamicFacetManager_1.DynamicFacetManager);
                Core_1.$$(test.cmp.root).trigger(Core_1.QueryEvents.doneBuildingQuery, { queryBuilder: new Core_1.QueryBuilder() });
                expect(test.cmp.putStateIntoAnalytics).not.toHaveBeenCalled();
            });
        });
        it('logs an analytics search event when logAnalyticsEvent is called', function () {
            test.cmp.logAnalyticsEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.dynamicFacetSelect);
            expect(test.cmp.usageAnalytics.logSearchEvent).toHaveBeenCalledWith(AnalyticsActionListMeta_1.analyticsActionCauseList.dynamicFacetSelect, test.cmp.analyticsFacetMeta);
        });
        it('should log an analytics event when showing more results', function () {
            test.cmp.showMoreValues();
            expect(test.cmp.usageAnalytics.logCustomEvent).toHaveBeenCalledWith(AnalyticsActionListMeta_1.analyticsActionCauseList.dynamicFacetShowMore, test.cmp.analyticsFacetMeta, test.cmp.element);
        });
        it('should log an analytics event when showing less results', function () {
            test.cmp.showLessValues();
            expect(test.cmp.usageAnalytics.logCustomEvent).toHaveBeenCalledWith(AnalyticsActionListMeta_1.analyticsActionCauseList.dynamicFacetShowLess, test.cmp.analyticsFacetMeta, test.cmp.element);
        });
        function analyticsValue() {
            return test.cmp.values.selectedPath.join(test.cmp.options.delimitingCharacter);
        }
        it("when a value is not selected\n    returns an empty analyticsFacetState", function () {
            expect(test.cmp.analyticsFacetState).toEqual([]);
        });
        it("when a value is selected\n    returns the correct analyticsFacetState", function () {
            test.cmp.selectPath(['foo', 'bar']);
            expect(test.cmp.analyticsFacetState).toEqual([
                {
                    field: test.cmp.options.field.toString(),
                    id: test.cmp.options.id,
                    title: test.cmp.options.title,
                    facetType: test.cmp.facetType,
                    facetPosition: test.cmp.position,
                    value: analyticsValue(),
                    displayValue: analyticsValue(),
                    state: FacetValueState_1.FacetValueState.selected,
                    valuePosition: 1
                }
            ]);
        });
        it('returns the correct analyticsFacetMeta', function () {
            test.cmp.selectPath(['foo', 'bar']);
            expect(test.cmp.analyticsFacetMeta).toEqual({
                facetField: test.cmp.options.field.toString(),
                facetId: test.cmp.options.id,
                facetTitle: test.cmp.options.title,
                facetValue: analyticsValue()
            });
        });
        describe('testing deferredQuerySuccess', function () {
            beforeEach(function () {
                test.cmp.ensureDom();
            });
            it("when facet as a dynamicFacetManager\n        should call handleQueryResults on the facet", function () {
                Core_1.$$(test.env.root).trigger(Core_1.QueryEvents.deferredQuerySuccess, { results: fakeResultsWithFacets() });
                expect(test.cmp.handleQueryResults).toHaveBeenCalled();
            });
            it("when facet as a dynamicFacetManager\n        should not call handleQueryResults on the facet", function () {
                test.cmp.dynamicFacetManager = Mock.mockComponent(DynamicFacetManager_1.DynamicFacetManager);
                Core_1.$$(test.env.root).trigger(Core_1.QueryEvents.deferredQuerySuccess, { results: fakeResultsWithFacets() });
                expect(test.cmp.handleQueryResults).not.toHaveBeenCalled();
            });
        });
        describe('testing handleQueryResults', function () {
            beforeEach(function () {
                test.cmp.ensureDom();
            });
            describe('when facet is in the results', function () {
                beforeEach(function () {
                    test.cmp.handleQueryResults(fakeResultsWithFacets());
                });
                it("facet position should be correct", function () {
                    expect(test.cmp.position).toBe(2);
                });
                it("\"createFromResponse\" should be called on the values", function () {
                    expect(test.cmp.values.createFromResponse).toHaveBeenCalledTimes(1);
                });
                it("\"render\" should be called on the values", function () {
                    expect(test.cmp.values.render).toHaveBeenCalledTimes(2);
                });
            });
            describe('when facet is not in the results', function () {
                beforeEach(function () {
                    test.cmp.handleQueryResults(fakeResultsWithNoFacets());
                });
                it("facet position should be \"undefined\"", function () {
                    expect(test.cmp.position).toBeUndefined();
                });
                it("\"resetValues\" should be called on the values", function () {
                    expect(test.cmp.values.resetValues).toHaveBeenCalledTimes(1);
                });
                it("\"render\" should be called on the values", function () {
                    expect(test.cmp.values.render).toHaveBeenCalledTimes(2);
                });
            });
        });
    });
}
exports.DynamicHierarchicalFacetTest = DynamicHierarchicalFacetTest;
 
 
/***/ }),
/* 1737 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Globalize = __webpack_require__(28);
var DynamicHierarchicalFacetValue_1 = __webpack_require__(407);
var DynamicHierarchicalFacetTestUtils_1 = __webpack_require__(128);
var Core_1 = __webpack_require__(9);
var AnalyticsActionListMeta_1 = __webpack_require__(7);
function DynamicHierarchicalFacetValueTest() {
    describe('DynamicHierarchicalFacetValue', function () {
        var facet;
        var facetValue;
        var fakeFacetValue;
        beforeEach(function () {
            facet = DynamicHierarchicalFacetTestUtils_1.DynamicHierarchicalFacetTestUtils.createFakeFacet();
            fakeFacetValue = DynamicHierarchicalFacetTestUtils_1.DynamicHierarchicalFacetTestUtils.createFakeFacetValue();
            facetValue = new DynamicHierarchicalFacetValue_1.DynamicHierarchicalFacetValue(fakeFacetValue, facet);
        });
        it('should be idle by default', function () {
            expect(facetValue.isIdle).toBe(true);
        });
        it('should select correctly', function () {
            facetValue.select();
            expect(facetValue.isSelected).toBe(true);
        });
        it('should log the right analytics action', function () {
            facetValue.logSelectActionToAnalytics();
            expect(facet.logAnalyticsEvent).toHaveBeenCalledWith(AnalyticsActionListMeta_1.analyticsActionCauseList.dynamicFacetSelect);
        });
        it("when getting formattedCount\n      it should return a string in the Globalize format", function () {
            expect(facetValue.formattedCount).toBe(Globalize.format(facetValue.numberOfResults, 'n0'));
        });
        it('should return the correct aria-label', function () {
            var expectedAriaLabel = facetValue.value + " " + facetValue.formattedCount + " results";
            expect(facetValue.selectAriaLabel).toBe(expectedAriaLabel);
        });
        it("should render without error", function () {
            expect(function () { return facetValue.render(new DocumentFragment()); }).not.toThrow();
        });
        it('retrieveCount should be equal to the numberOfValues options', function () {
            expect(facetValue.retrieveCount).toBe(facet.options.numberOfValues);
        });
        it("when the facet value has more children than the numberOfValues options\n      it should use it's length as the retrieveCount", function () {
            fakeFacetValue.children = [null, null, null, null, null, null, null, null, null];
            facetValue = new DynamicHierarchicalFacetValue_1.DynamicHierarchicalFacetValue(fakeFacetValue, facet);
            expect(facetValue.retrieveCount).toBe(facetValue.children.length);
        });
        describe('testing render', function () {
            var fragment;
            function addChildrenToValue(numberOfChildren) {
                for (var index = 0; index < numberOfChildren; index++) {
                    facetValue.children.push(new DynamicHierarchicalFacetValue_1.DynamicHierarchicalFacetValue(DynamicHierarchicalFacetTestUtils_1.DynamicHierarchicalFacetTestUtils.createFakeFacetValue(), facet));
                }
            }
            function renderElement() {
                fragment = new DocumentFragment();
                facetValue.render(fragment);
            }
            function getSeeMore() {
                return fragment.querySelector('.coveo-dynamic-hierarchical-facet-show-more');
            }
            function getSeeLess() {
                return fragment.querySelector('.coveo-dynamic-hierarchical-facet-show-less');
            }
            it("when the facet value has children\n      should render and append in the frament", function () {
                addChildrenToValue(facet.options.numberOfValues);
                renderElement();
                expect(fragment.children.length).toBe(facetValue.children.length + 1);
            });
            it("when moreValuesAvailable is false\n      should not render the \"See more\"", function () {
                renderElement();
                expect(getSeeMore()).toBeFalsy();
            });
            it("when there are less or equal children than the numberOfValues option\n      should not render the \"See more\"", function () {
                renderElement();
                expect(getSeeLess()).toBeFalsy();
            });
            describe('when moreValuesAvailable is true', function () {
                beforeEach(function () {
                    fakeFacetValue.moreValuesAvailable = true;
                    facetValue = new DynamicHierarchicalFacetValue_1.DynamicHierarchicalFacetValue(fakeFacetValue, facet);
                    renderElement();
                });
                it('should render the "See more" button', function () {
                    expect(getSeeMore()).toBeTruthy();
                });
                it("when clicking on the \"See more\" button\n        should bump the retrieveCount according to the defined options", function () {
                    Core_1.$$(getSeeMore()).trigger('click');
                    expect(facetValue.retrieveCount).toBe(facet.options.numberOfValues * 2);
                });
                it("when clicking on the \"See more\" button\n        should call the right methods", function () {
                    Core_1.$$(getSeeMore()).trigger('click');
                    expect(facet.enableFreezeFacetOrderFlag).toHaveBeenCalled();
                    expect(facet.triggerNewIsolatedQuery).toHaveBeenCalled();
                });
            });
            describe('when there are more children than the numberOfValues option', function () {
                beforeEach(function () {
                    var newNumberOfValues = facet.options.numberOfValues * 2;
                    facetValue.retrieveCount = newNumberOfValues;
                    addChildrenToValue(newNumberOfValues);
                    renderElement();
                });
                it('should render the "See less" button', function () {
                    expect(getSeeLess()).toBeTruthy();
                });
                it("when clicking on the \"See less\" button\n        should reduce the retrieveCount according to the defined options", function () {
                    Core_1.$$(getSeeLess()).trigger('click');
                    expect(facetValue.retrieveCount).toBe(facet.options.numberOfValues);
                });
                it("when clicking on the \"See less\" button\n        should call the right methods", function () {
                    Core_1.$$(getSeeLess()).trigger('click');
                    expect(facet.enableFreezeFacetOrderFlag).toHaveBeenCalled();
                    expect(facet.triggerNewIsolatedQuery).toHaveBeenCalled();
                });
            });
        });
    });
}
exports.DynamicHierarchicalFacetValueTest = DynamicHierarchicalFacetValueTest;
 
 
/***/ }),
/* 1738 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var DynamicHierarchicalFacetValue_1 = __webpack_require__(407);
var DynamicHierarchicalFacetValueRenderer_1 = __webpack_require__(853);
var DynamicHierarchicalFacetTestUtils_1 = __webpack_require__(128);
var Core_1 = __webpack_require__(9);
function DynamicHierarchicalFacetValueRendererTest() {
    describe('DynamicHierarchicalFacetValueRenderer', function () {
        var facetValue;
        var facetValueRenderer;
        var facet;
        var element;
        beforeEach(function () {
            facet = DynamicHierarchicalFacetTestUtils_1.DynamicHierarchicalFacetTestUtils.createFakeFacet();
            initFacetValue(DynamicHierarchicalFacetTestUtils_1.DynamicHierarchicalFacetTestUtils.createFakeFacetValue());
        });
        function initFacetValue(value) {
            facetValue = new DynamicHierarchicalFacetValue_1.DynamicHierarchicalFacetValue(value, facet);
            facetValueRenderer = new DynamicHierarchicalFacetValueRenderer_1.DynamicHierarchicalFacetValueRenderer(facetValue, facet);
            render();
        }
        function initMultiLevelValues() {
            var grandChildValue = DynamicHierarchicalFacetTestUtils_1.DynamicHierarchicalFacetTestUtils.createFakeFacetValue();
            grandChildValue.value = 'more';
            grandChildValue.path = ['one', 'two', 'three'];
            var childValue = DynamicHierarchicalFacetTestUtils_1.DynamicHierarchicalFacetTestUtils.createFakeFacetValue();
            childValue.value = 'two';
            childValue.path = ['one', 'two'];
            childValue.children = [new DynamicHierarchicalFacetValue_1.DynamicHierarchicalFacetValue(grandChildValue, facet)];
            var parentValue = DynamicHierarchicalFacetTestUtils_1.DynamicHierarchicalFacetTestUtils.createFakeFacetValue();
            parentValue.value = 'one';
            parentValue.path = ['one'];
            parentValue.children = [new DynamicHierarchicalFacetValue_1.DynamicHierarchicalFacetValue(grandChildValue, facet)];
            initFacetValue(childValue);
        }
        function selectValue() {
            facetValue.select();
            render();
        }
        function render() {
            element = facetValueRenderer.render();
        }
        function getLabel() {
            return Core_1.$$(element).find('.coveo-dynamic-hierarchical-facet-value-label');
        }
        function getButton() {
            return Core_1.$$(element).find('button');
        }
        function getCount() {
            return Core_1.$$(element).find('.coveo-dynamic-hierarchical-facet-value-count');
        }
        it('should render without errors', function () {
            expect(function () { return facetValueRenderer.render(); }).not.toThrow();
        });
        it('should not render XSS in the displayValue', function () {
            var fakeFacetValueWithXSS = DynamicHierarchicalFacetTestUtils_1.DynamicHierarchicalFacetTestUtils.createFakeFacetValue();
            fakeFacetValueWithXSS.displayValue = '<script>alert("Hehe goodbye")</script>';
            initFacetValue(fakeFacetValueWithXSS);
            expect(getLabel().innerHTML).toBe('&lt;script&gt;alert("Hehe goodbye")&lt;/script&gt;');
        });
        it('should assign the value to data-value', function () {
            expect(element.getAttribute('data-value')).toBe(facetValue.value);
        });
        it('should append the correct formatted count', function () {
            expect(getCount().textContent).toBe("(" + facetValue.formattedCount + ")");
        });
        it('button should have an aria-label', function () {
            expect(getButton().getAttribute('aria-label')).toBe(facetValue.selectAriaLabel);
        });
        it('button should not have the class "coveo-selected"', function () {
            expect(Core_1.$$(getButton()).hasClass('coveo-selected')).toBe(false);
        });
        it('button should not be disabled', function () {
            expect(getButton().getAttribute('disabled')).toBeFalsy();
        });
        it("when clicking on the button\n    should trigger the right actions", function () {
            Core_1.$$(getButton()).trigger('click');
            expect(facet.selectPath).toHaveBeenCalledWith(facetValue.path);
            expect(facet.enableFreezeFacetOrderFlag).toHaveBeenCalled();
            expect(facet.scrollToTop).toHaveBeenCalled();
            expect(facet.triggerNewQuery).toHaveBeenCalled();
        });
        it("when value is selected\n    button should have the class \"coveo-selected\"", function () {
            selectValue();
            expect(Core_1.$$(getButton()).hasClass('coveo-selected')).toBe(true);
        });
        it("when value is selected\n    button should be disabled", function () {
            selectValue();
            expect(getButton().getAttribute('disabled')).toBeTruthy();
        });
        describe("testing the margin (\"coveo-with-space\")", function () {
            function hasMargin() {
                return Core_1.$$(getButton()).hasClass('coveo-with-space');
            }
            it('button should not have the class "coveo-with-space"', function () {
                expect(hasMargin()).toBe(false);
            });
            it("when value is not at the first level but has children\n        button should not have the class \"coveo-with-space\"", function () {
                initMultiLevelValues();
                expect(hasMargin()).toBe(false);
            });
            it("when value is not at the first level and has no children\n        button should have the class \"coveo-with-space\"", function () {
                initMultiLevelValues();
                facetValue.children = [];
                render();
                expect(hasMargin()).toBe(true);
            });
            it("when value is not at the first level and has no children, but is selected\n        button should not have the class \"coveo-with-space\"", function () {
                initMultiLevelValues();
                facetValue.children = [];
                selectValue();
                expect(hasMargin()).toBe(false);
            });
        });
        describe("testing the back arrow", function () {
            function getBackArrow() {
                return !!Core_1.$$(element).find('.coveo-dynamic-hierarchical-facet-value-arrow-left');
            }
            it('should not prepend an arrow by default', function () {
                expect(getBackArrow()).toBe(false);
            });
            it("when a value is selected\n      should not prepend an arrow", function () {
                selectValue();
                expect(getBackArrow()).toBe(false);
            });
            describe('when value is not at the first level and has children', function () {
                beforeEach(function () {
                    initMultiLevelValues();
                });
                it("when facet has no selected value\n          should not prepend an arrow", function () {
                    expect(getBackArrow()).toBe(false);
                });
                it("when facet has a selected value\n          should prepend an arrow", function () {
                    facet.values.selectPath(['random value']);
                    element = facetValueRenderer.render();
                    expect(getBackArrow()).toBe(true);
                });
            });
        });
        describe("testing the forward arrow", function () {
            function getForwardArrow() {
                return !!Core_1.$$(element).find('.coveo-dynamic-hierarchical-facet-value-arrow-right');
            }
            it("when isLeafValue is false\n      should append an arrow", function () {
                expect(getForwardArrow()).toBe(true);
            });
            it("when isLeafValue is true\n      should not append an arrow ", function () {
                var value = DynamicHierarchicalFacetTestUtils_1.DynamicHierarchicalFacetTestUtils.createFakeFacetValue();
                value.isLeafValue = true;
                initFacetValue(value);
                expect(getForwardArrow()).toBe(false);
            });
            it("when a value has children\n      should not append an arrow", function () {
                facetValue.children = [new DynamicHierarchicalFacetValue_1.DynamicHierarchicalFacetValue(DynamicHierarchicalFacetTestUtils_1.DynamicHierarchicalFacetTestUtils.createFakeFacetValue(), facet)];
                render();
                expect(getForwardArrow()).toBe(false);
            });
            it("when value is selected\n      should not append an arrow", function () {
                selectValue();
                expect(getForwardArrow()).toBe(false);
            });
        });
        describe("testing the collapsed feature", function () {
            function displayedWhenCollapsed() {
                return Core_1.$$(getButton()).hasClass('coveo-show-when-collapsed');
            }
            function selectChildrenValue() {
                initMultiLevelValues();
                var children = facetValue.children[0];
                children.select();
                facet.values.selectPath(children.path);
            }
            it('should not display the value when collapsed by default', function () {
                expect(displayedWhenCollapsed()).toBe(false);
            });
            it("when value is selected\n      should display the value when collapsed", function () {
                selectValue();
                expect(displayedWhenCollapsed()).toBe(true);
            });
            it("when value is the parent of the selected value\n      should display the value when collapsed", function () {
                selectChildrenValue();
                render();
                expect(displayedWhenCollapsed()).toBe(true);
            });
            it("when value is the grandparent of the selected value\n      should not display the value when collapsed", function () {
                selectChildrenValue();
                initFacetValue(facet.values.allFacetValues[0]);
                expect(displayedWhenCollapsed()).toBe(false);
            });
        });
    });
}
exports.DynamicHierarchicalFacetValueRendererTest = DynamicHierarchicalFacetValueRendererTest;
 
 
/***/ }),
/* 1739 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var DynamicHierarchicalFacetValues_1 = __webpack_require__(406);
var DynamicHierarchicalFacetTestUtils_1 = __webpack_require__(128);
var FacetValueState_1 = __webpack_require__(36);
var Core_1 = __webpack_require__(9);
function DynamicHierarchicalFacetValuesTest() {
    describe('DynamicHierarchicalFacetValues', function () {
        var facet;
        beforeEach(function () {
            facet = DynamicHierarchicalFacetTestUtils_1.DynamicHierarchicalFacetTestUtils.createAdvancedFakeFacet({ field: '@test', clearLabel: 'Clear all test' }).cmp;
            facet.values = new DynamicHierarchicalFacetValues_1.DynamicHierarchicalFacetValues(facet);
        });
        function facetValueList() {
            return facet.values.render();
        }
        function moreButton() {
            var element = facet.values.render();
            return Core_1.$$(element).find('.coveo-dynamic-hierarchical-facet-show-more');
        }
        function lessButton() {
            var element = facet.values.render();
            return Core_1.$$(element).find('.coveo-dynamic-hierarchical-facet-show-less');
        }
        it('the facet value list element has an aria-labelledby', function () {
            var list = facetValueList();
            expect(Core_1.$$(list).getAttribute('aria-labelledby')).toBe(facet.options.id + "-facet-heading");
        });
        describe('testing createFromResponse', function () {
            var response;
            describe('when response has 1 level deep of facet values', function () {
                var testValue;
                var responseValue;
                beforeEach(function () {
                    response = DynamicHierarchicalFacetTestUtils_1.DynamicHierarchicalFacetTestUtils.getCompleteFacetResponse(facet);
                    facet.values.createFromResponse(response);
                    testValue = facet.values.allFacetValues[2];
                    responseValue = response.values[2];
                });
                it('should have the correct number of values', function () {
                    expect(facet.values.allFacetValues.length).toBe(response.values.length);
                });
                it('values should be initialized correctly', function () {
                    expect(testValue.value).toBe(responseValue.value);
                    expect(testValue.displayValue).toBe(responseValue.value);
                    expect(testValue.state).toBe(responseValue.state);
                    expect(testValue.numberOfResults).toBe(responseValue.numberOfResults);
                    expect(testValue.moreValuesAvailable).toBe(responseValue.moreValuesAvailable);
                });
                it('path should contain the first value', function () {
                    expect(testValue.path).toEqual([responseValue.value]);
                });
                it('children should be empty', function () {
                    expect(testValue.children).toEqual([]);
                });
            });
            describe('when response has multiple levels deep of facet values', function () {
                var testValue;
                var childTestValue;
                var responseValue;
                var responseChildValue;
                beforeEach(function () {
                    response = DynamicHierarchicalFacetTestUtils_1.DynamicHierarchicalFacetTestUtils.getCompleteFacetResponse(facet, {
                        values: DynamicHierarchicalFacetTestUtils_1.DynamicHierarchicalFacetTestUtils.createFakeFacetResponseValues(2)
                    });
                    facet.values.createFromResponse(response);
                    testValue = facet.values.allFacetValues[1];
                    childTestValue = facet.values.allFacetValues[1].children[3];
                    responseValue = response.values[1];
                    responseChildValue = response.values[1].children[3];
                });
                it('should have the correct number of children values', function () {
                    expect(testValue.children.length).toBe(responseValue.children.length);
                });
                it('child values should be initialized correctly', function () {
                    expect(childTestValue.value).toBe(responseChildValue.value);
                    expect(childTestValue.displayValue).toBe(responseChildValue.value);
                    expect(childTestValue.state).toBe(responseChildValue.state);
                    expect(childTestValue.numberOfResults).toBe(responseChildValue.numberOfResults);
                    expect(childTestValue.moreValuesAvailable).toBe(responseChildValue.moreValuesAvailable);
                });
                it('children path should contain the parent and child value', function () {
                    expect(childTestValue.path).toEqual([responseValue.value, responseChildValue.value]);
                });
                it("children's children should be empty", function () {
                    expect(childTestValue.children).toEqual([]);
                });
            });
            describe('when response has a selected response value (e.g. autoselection)', function () {
                var responseValue;
                beforeEach(function () {
                    responseValue = DynamicHierarchicalFacetTestUtils_1.DynamicHierarchicalFacetTestUtils.createFakeSelectedFacetResponseValue();
                    response = DynamicHierarchicalFacetTestUtils_1.DynamicHierarchicalFacetTestUtils.getCompleteFacetResponse(facet, {
                        values: [responseValue]
                    });
                    facet.values.createFromResponse(response);
                });
                it('should have a single selected value at the root', function () {
                    expect(facet.values.allFacetValues.length).toBe(1);
                    expect(facet.values.allFacetValues[0].state).toBe(FacetValueState_1.FacetValueState.selected);
                });
                it('should have the right number of children', function () {
                    expect(facet.values.allFacetValues[0].children.length).toBe(responseValue.children.length);
                });
                it('should have the right selectedPath', function () {
                    expect(facet.values.selectedPath).toEqual(facet.values.allFacetValues[0].path);
                });
                it('should clear the path if a query with no selected value is returned', function () {
                    response.values = [];
                    facet.values.createFromResponse(response);
                    expect(facet.values.selectedPath).toEqual([]);
                });
            });
        });
        it('resetValues should empty the values and clear the path', function () {
            var response = DynamicHierarchicalFacetTestUtils_1.DynamicHierarchicalFacetTestUtils.getCompleteFacetResponse(facet);
            facet.values.createFromResponse(response);
            facet.values.selectPath([response.values[0].value]);
            facet.values.resetValues();
            expect(facet.values.allFacetValues.length).toBe(0);
            expect(facet.values.selectedPath).toEqual([]);
        });
        it('clearPath should clear the path', function () {
            var response = DynamicHierarchicalFacetTestUtils_1.DynamicHierarchicalFacetTestUtils.getCompleteFacetResponse(facet);
            facet.values.createFromResponse(response);
            facet.values.selectPath([response.values[0].value]);
            facet.values.clearPath();
            expect(facet.values.allFacetValues.length).not.toBe(0);
            expect(facet.values.selectedPath).toEqual([]);
        });
        describe('testing render', function () {
            var listElement;
            beforeEach(function () {
                facet.values.createFromResponse(DynamicHierarchicalFacetTestUtils_1.DynamicHierarchicalFacetTestUtils.getCompleteFacetResponse(facet, {
                    values: DynamicHierarchicalFacetTestUtils_1.DynamicHierarchicalFacetTestUtils.createFakeFacetResponseValues(3, 3)
                }));
                listElement = facet.values.render();
            });
            it('should render the correct number of children', function () {
                expect(listElement.children.length).toBe(39);
            });
            it('should render the children in the correct order', function () {
                var documentFragment = new DocumentFragment();
                expect(listElement.children[0]).toEqual(facet.values.allFacetValues[0].render(documentFragment));
                expect(listElement.children[1]).toEqual(facet.values.allFacetValues[0].children[0].render(documentFragment));
                expect(listElement.children[listElement.children.length - 1]).toEqual(facet.values.allFacetValues[2].children[2].children[2].render(documentFragment));
            });
            function getAllCategoriesElement() {
                return Core_1.$$(listElement).find('.coveo-dynamic-hierarchical-facet-all');
            }
            describe('when there is no value selected', function () {
                it('list should not have the class "coveo-with-space"', function () {
                    expect(Core_1.$$(listElement).hasClass('coveo-with-space')).toBe(false);
                });
                it('list does not append the "All Categories" element', function () {
                    expect(getAllCategoriesElement()).toBeFalsy();
                });
            });
            describe('when there is a value selected (single level)', function () {
                beforeEach(function () {
                    facet.values.selectPath(facet.values.allFacetValues[0].path);
                    listElement = facet.values.render();
                });
                it('list should not have the class "coveo-with-space"', function () {
                    expect(Core_1.$$(listElement).hasClass('coveo-with-space')).toBe(true);
                });
                it('list does append the "All Categories" button', function () {
                    expect(getAllCategoriesElement()).toBeTruthy();
                });
                it('clicking on the "All Categories" button should call "clear" on the facet header', function () {
                    facet.ensureDom();
                    spyOn(facet.header.options, 'clear');
                    Core_1.$$(getAllCategoriesElement()).trigger('click');
                    expect(facet.header.options.clear).toHaveBeenCalled();
                });
                it('the "All Categories" button should  have the class "coveo-with-space"', function () {
                    expect(Core_1.$$(getAllCategoriesElement()).hasClass('coveo-show-when-collapsed')).toBe(true);
                });
                it('the "All Categories" button should be defined by the "clearLabel" facet option', function () {
                    expect(getAllCategoriesElement().childNodes[1].nodeValue).toBe(facet.options.clearLabel);
                });
            });
            it("when there is a value selected (multiple level)\n      the \"All Categories\" button should have the class \"coveo-with-space\"", function () {
                facet.values.selectPath(['hello', 'goodbye']);
                listElement = facet.values.render();
                expect(Core_1.$$(getAllCategoriesElement()).hasClass('coveo-show-when-collapsed')).toBe(false);
            });
        });
        describe('testing selectPath', function () {
            describe('when values are at a single level', function () {
                var testFacetValue;
                beforeEach(function () {
                    facet.values.createFromResponse(DynamicHierarchicalFacetTestUtils_1.DynamicHierarchicalFacetTestUtils.getCompleteFacetResponse(facet, {
                        values: DynamicHierarchicalFacetTestUtils_1.DynamicHierarchicalFacetTestUtils.createFakeFacetResponseValues(1, 3)
                    }));
                });
                describe('when path already exists', function () {
                    beforeEach(function () {
                        testFacetValue = facet.values.allFacetValues[1];
                        facet.values.selectPath([testFacetValue.value]);
                    });
                    it('value should be selected', function () {
                        expect(testFacetValue.state).toBe(FacetValueState_1.FacetValueState.selected);
                    });
                    it('should remove all the others values at first level', function () {
                        expect(facet.values.allFacetValues.length).toBe(1);
                    });
                    it('should have the right selectedPath', function () {
                        expect(facet.values.selectedPath).toEqual([testFacetValue.value]);
                    });
                });
                describe('when path does not exist', function () {
                    var newValue = 'a new value!!';
                    beforeEach(function () {
                        facet.values.selectPath([newValue]);
                        testFacetValue = facet.values.allFacetValues[0];
                    });
                    it('new value should have the right attributes', function () {
                        expect(testFacetValue.value).toBe(newValue);
                        expect(testFacetValue.children).toEqual([]);
                        expect(testFacetValue.path).toEqual([newValue]);
                        expect(testFacetValue.state).toBe(FacetValueState_1.FacetValueState.selected);
                    });
                    it('should remove all the others values at first level', function () {
                        expect(facet.values.allFacetValues.length).toBe(1);
                    });
                    it('should have the right selectedPath', function () {
                        expect(facet.values.selectedPath).toEqual([newValue]);
                    });
                });
            });
            describe('when values are at multiple levels', function () {
                var rootLevelFacetChildren;
                var firstLevelFacetValue;
                var secondLevelFacetValue;
                var thirdLevelFacetValue;
                var thirdLevelFacetChildren;
                var order;
                beforeEach(function () {
                    facet.values.createFromResponse(DynamicHierarchicalFacetTestUtils_1.DynamicHierarchicalFacetTestUtils.getCompleteFacetResponse(facet, {
                        values: DynamicHierarchicalFacetTestUtils_1.DynamicHierarchicalFacetTestUtils.createFakeFacetResponseValues(4, 4)
                    }));
                    rootLevelFacetChildren = facet.values.allFacetValues.slice();
                    firstLevelFacetValue = facet.values.allFacetValues[1];
                    secondLevelFacetValue = facet.values.allFacetValues[1].children[0];
                    thirdLevelFacetValue = facet.values.allFacetValues[1].children[0].children[2];
                    thirdLevelFacetChildren = thirdLevelFacetValue.children.slice();
                    order = [
                        rootLevelFacetChildren[3].path,
                        rootLevelFacetChildren[1].path,
                        rootLevelFacetChildren[2].path,
                        firstLevelFacetValue.children[1].path,
                        firstLevelFacetValue.children[3].path,
                        thirdLevelFacetChildren[2].path,
                        thirdLevelFacetChildren[3].path
                    ];
                });
                it("when there's no selection, should be able to reorder the root level", function () {
                    facet.values.reorderValues(order);
                    expect(facet.values.allFacetValues.map(function (facetValue) { return facetValue.path; })).toEqual([
                        rootLevelFacetChildren[3].path,
                        rootLevelFacetChildren[1].path,
                        rootLevelFacetChildren[2].path,
                        rootLevelFacetChildren[0].path
                    ]);
                });
                describe('when path already entirely exists', function () {
                    beforeEach(function () {
                        facet.values.selectPath([firstLevelFacetValue.value, secondLevelFacetValue.value, thirdLevelFacetValue.value]);
                    });
                    it('last level should be selected', function () {
                        expect(thirdLevelFacetValue.state).toBe(FacetValueState_1.FacetValueState.selected);
                    });
                    it('higher than last level values should be idle', function () {
                        expect(firstLevelFacetValue.state).toBe(FacetValueState_1.FacetValueState.idle);
                        expect(secondLevelFacetValue.state).toBe(FacetValueState_1.FacetValueState.idle);
                    });
                    it('should remove all the others values at each level', function () {
                        expect(facet.values.allFacetValues).toEqual([firstLevelFacetValue]);
                        expect(facet.values.allFacetValues[0].children).toEqual([secondLevelFacetValue]);
                        expect(facet.values.allFacetValues[0].children[0].children).toEqual([thirdLevelFacetValue]);
                    });
                    it('should have the right selectedPath', function () {
                        expect(facet.values.selectedPath).toEqual(thirdLevelFacetValue.path);
                    });
                    it('should be able to reorder the third level', function () {
                        thirdLevelFacetValue.children = thirdLevelFacetChildren;
                        facet.values.reorderValues(order);
                        expect(thirdLevelFacetValue.children.map(function (facetValue) { return facetValue.path; })).toEqual([
                            thirdLevelFacetChildren[2].path,
                            thirdLevelFacetChildren[3].path,
                            thirdLevelFacetChildren[0].path,
                            thirdLevelFacetChildren[1].path
                        ]);
                    });
                });
                describe('when path only partially exist', function () {
                    var newValue = 'a new value!!';
                    beforeEach(function () {
                        facet.values.selectPath([firstLevelFacetValue.value, secondLevelFacetValue.value, newValue]);
                        thirdLevelFacetValue = facet.values.allFacetValues[0].children[0].children[0];
                    });
                    it('third level value should be selected', function () {
                        expect(thirdLevelFacetValue.state).toBe(FacetValueState_1.FacetValueState.selected);
                    });
                    it('third level value should have the right value/path', function () {
                        expect(thirdLevelFacetValue.value).toBe(newValue);
                        expect(thirdLevelFacetValue.path).toEqual([firstLevelFacetValue.value, secondLevelFacetValue.value, newValue]);
                    });
                    it('higher than last level values should be idle', function () {
                        expect(firstLevelFacetValue.state).toBe(FacetValueState_1.FacetValueState.idle);
                        expect(secondLevelFacetValue.state).toBe(FacetValueState_1.FacetValueState.idle);
                    });
                    it('should remove all the others values at each level', function () {
                        expect(facet.values.allFacetValues).toEqual([firstLevelFacetValue]);
                        expect(facet.values.allFacetValues[0].children).toEqual([secondLevelFacetValue]);
                        expect(facet.values.allFacetValues[0].children[0].children).toEqual([thirdLevelFacetValue]);
                    });
                    it('should have the right selectedPath', function () {
                        expect(facet.values.selectedPath).toEqual(thirdLevelFacetValue.path);
                    });
                });
                describe('when path does not exist', function () {
                    var newPath = ['hello', 'this is', 'a brand new path'];
                    beforeEach(function () {
                        facet.values.selectPath(newPath.slice());
                        firstLevelFacetValue = facet.values.allFacetValues[0];
                        secondLevelFacetValue = facet.values.allFacetValues[0].children[0];
                        thirdLevelFacetValue = facet.values.allFacetValues[0].children[0].children[0];
                    });
                    it('third level should be selected', function () {
                        expect(thirdLevelFacetValue.state).toBe(FacetValueState_1.FacetValueState.selected);
                    });
                    it('third level value should have the right value/path', function () {
                        expect(thirdLevelFacetValue.value).toBe(newPath[2]);
                        expect(thirdLevelFacetValue.path).toEqual(newPath);
                    });
                    it('higher than last level values should be idle', function () {
                        expect(firstLevelFacetValue.state).toBe(FacetValueState_1.FacetValueState.idle);
                        expect(secondLevelFacetValue.state).toBe(FacetValueState_1.FacetValueState.idle);
                    });
                    it('higher than last level values have the right value/path', function () {
                        expect(firstLevelFacetValue.value).toBe(newPath[0]);
                        expect(firstLevelFacetValue.path).toEqual(newPath.slice(0, -2));
                        expect(secondLevelFacetValue.value).toBe(newPath[1]);
                        expect(secondLevelFacetValue.path).toEqual(newPath.slice(0, -1));
                    });
                    it('should remove all the others values at each level', function () {
                        expect(facet.values.allFacetValues).toEqual([firstLevelFacetValue]);
                        expect(facet.values.allFacetValues[0].children).toEqual([secondLevelFacetValue]);
                        expect(facet.values.allFacetValues[0].children[0].children).toEqual([thirdLevelFacetValue]);
                    });
                    it('should have the right selectedPath', function () {
                        expect(facet.values.selectedPath).toEqual(thirdLevelFacetValue.path);
                    });
                });
            });
        });
        describe('testing show more/less values', function () {
            describe('when moreValuesAvailable is true', function () {
                beforeEach(function () {
                    facet.moreValuesAvailable = true;
                });
                it("should render the \"Show more\" button", function () {
                    expect(moreButton()).toBeTruthy();
                });
                it("when clicking on the \"Show more\" button\n          should perform the correct actions on the facet", function () {
                    spyOn(facet, 'showMoreValues');
                    spyOn(facet, 'enableFreezeFacetOrderFlag');
                    Core_1.$$(moreButton()).trigger('click');
                    expect(facet.enableFreezeFacetOrderFlag).toHaveBeenCalledTimes(1);
                    expect(facet.showMoreValues).toHaveBeenCalledTimes(1);
                });
                it("when the facet option enableMoreLess is false\n          should not should render the \"Show more\" button", function () {
                    facet.options.enableMoreLess = false;
                    expect(moreButton()).toBeFalsy();
                });
            });
            describe('when there are more values than the numberOfValues option', function () {
                beforeEach(function () {
                    var response = DynamicHierarchicalFacetTestUtils_1.DynamicHierarchicalFacetTestUtils.getCompleteFacetResponse(facet, {
                        values: DynamicHierarchicalFacetTestUtils_1.DynamicHierarchicalFacetTestUtils.createFakeFacetResponseValues(1, 20)
                    });
                    facet.values.createFromResponse(response);
                });
                it("should render the \"Show less\" button", function () {
                    expect(lessButton()).toBeTruthy();
                });
                it("when clicking on the \"Show less\" button\n          should perform the correct actions on the facet", function () {
                    spyOn(facet, 'enableFreezeFacetOrderFlag');
                    spyOn(facet, 'showLessValues');
                    Core_1.$$(lessButton()).trigger('click');
                    expect(facet.enableFreezeFacetOrderFlag).toHaveBeenCalledTimes(1);
                    expect(facet.showLessValues).toHaveBeenCalledTimes(1);
                });
                it("when the facet option enableMoreLess is false\n          should not should render the \"Show less\" button", function () {
                    facet.options.enableMoreLess = false;
                    expect(lessButton()).toBeFalsy();
                });
            });
        });
    });
}
exports.DynamicHierarchicalFacetValuesTest = DynamicHierarchicalFacetValuesTest;
 
 
/***/ }),
/* 1740 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { Iif (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        Iif (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            Iif (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
            Iif (y = 0, t) op = [0, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    Eif (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        Iif (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
Object.defineProperty(exports, "__esModule", { value: true });
var FacetValueSuggestions_1 = __webpack_require__(788);
var Omnibox_1 = __webpack_require__(196);
var QuerySuggestAddon_1 = __webpack_require__(387);
var Mock = __webpack_require__(2);
var Test_1 = __webpack_require__(40);
function FacetValueSuggestionsTest() {
    var _this = this;
    describe('FacetValueSuggestions', function () {
        var test;
        var facetValueSuggestionsProvider;
        var omniboxInstance;
        var aKeyword = {
            text: 'bloup',
            html: "<span class='coveo-omnibox-hightlight'>bloup</span>"
        };
        var someSuggestionValue = 'wowow';
        var anOmniboxSuggestionKeyword = {
            text: 'fish',
            html: "<span class='coveo-omnibox-hightlight'>fish</span>"
        };
        var getSuggestionValue = function () {
            return {
                keyword: aKeyword,
                numberOfResults: 10,
                score: {
                    distanceFromTotalForField: 100
                },
                value: someSuggestionValue,
                field: someField
            };
        };
        var getOmniboxSuggestionValue = function (keyword) {
            return keyword || anOmniboxSuggestionKeyword;
        };
        var someField = '@bloupbloup';
        var triggerPopulateOmniboxEvent = function () { return __awaiter(_this, void 0, void 0, function () {
            var args;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        args = {
                            suggestions: [],
                            omnibox: omniboxInstance
                        };
                        Test_1.$$(test.cmp.root).trigger(Test_1.OmniboxEvents.populateOmniboxSuggestions, args);
                        return [4 /*yield*/, Promise.all(args.suggestions)];
                    case 1:
                        _a.sent();
                        return [2 /*return*/, args];
                }
            });
        }); };
        var setUpSuggestionsFromProviderToReturn = function (suggestions) {
            facetValueSuggestionsProvider.getSuggestions.and.returnValue(Promise.resolve(suggestions));
        };
        var setUpOmniboxSuggestionsToReturn = function (suggestions) {
            omniboxInstance.suggestionAddon.getSuggestion.and.returnValue(Promise.resolve(suggestions));
        };
        var firstSuggestion = function (args) {
            return args.suggestions[0];
        };
        var setUpKeywordTextInOmnibox = function (text) {
            omniboxInstance.getText = function () { return text; };
        };
        beforeEach(function () {
            facetValueSuggestionsProvider = {
                getSuggestions: jasmine.createSpy('getSuggestions')
            };
            setUpSuggestionsFromProviderToReturn([]);
            omniboxInstance = Mock.mock(Omnibox_1.Omnibox);
            omniboxInstance.suggestionAddon = Mock.mock(QuerySuggestAddon_1.QuerySuggestAddon);
            omniboxInstance.suggestionAddon.getSuggestion = jasmine.createSpy('getSuggestions');
            omniboxInstance.magicBox = {
                blur: jasmine.createSpy('blur')
            };
            setUpKeywordTextInOmnibox(aKeyword.text);
            setUpOmniboxSuggestionsToReturn([getOmniboxSuggestionValue()]);
            test = Mock.basicComponentSetup(FacetValueSuggestions_1.FacetValueSuggestions, {
                field: someField
            });
            test.cmp.facetValueSuggestionsProvider = facetValueSuggestionsProvider;
        });
        afterEach(function () {
            test = null;
        });
        it('does not populate suggestions when there are no suggestions', function (done) { return __awaiter(_this, void 0, void 0, function () {
            var resultingArgs, result;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0: return [4 /*yield*/, triggerPopulateOmniboxEvent()];
                    case 1:
                        resultingArgs = _a.sent();
                        return [4 /*yield*/, firstSuggestion(resultingArgs)];
                    case 2:
                        result = _a.sent();
                        expect(result.length).toBe(0);
                        done();
                        return [2 /*return*/];
                }
            });
        }); });
        describe('when a template helper is defined', function () {
            var suggestionTemplate;
            beforeEach(function () {
                suggestionTemplate = jasmine.createSpy('suggestionTemplate');
                suggestionTemplate.and.returnValue(someSuggestionValue);
                test.cmp.options.templateHelper = suggestionTemplate;
                setUpSuggestionsFromProviderToReturn([getSuggestionValue()]);
            });
            it('should call the template helper', function (done) { return __awaiter(_this, void 0, void 0, function () {
                var resultingArgs, result;
                return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0: return [4 /*yield*/, triggerPopulateOmniboxEvent()];
                        case 1:
                            resultingArgs = _a.sent();
                            return [4 /*yield*/, firstSuggestion(resultingArgs)];
                        case 2:
                            result = _a.sent();
                            expect(suggestionTemplate).toHaveBeenCalledTimes(1);
                            expect(result[0].html).toBe(someSuggestionValue);
                            done();
                            return [2 /*return*/];
                    }
                });
            }); });
            it('should fallback to the default template when the template helper throws', function (done) { return __awaiter(_this, void 0, void 0, function () {
                var resultingArgs, result;
                return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0:
                            suggestionTemplate.and.throwError('my template helper is very bad');
                            return [4 /*yield*/, triggerPopulateOmniboxEvent()];
                        case 1:
                            resultingArgs = _a.sent();
                            return [4 /*yield*/, firstSuggestion(resultingArgs)];
                        case 2:
                            result = _a.sent();
                            expect(suggestionTemplate).toHaveBeenCalledTimes(1);
                            expect(result[0].html).toBe(Test_1.l('KeywordInCategory', "" + aKeyword.html, "<span class='coveo-omnibox-hightlight'>" + someSuggestionValue + "</span>"));
                            done();
                            return [2 /*return*/];
                    }
                });
            }); });
        });
        describe('when the field is a category field', function () {
            beforeEach(function () {
                setUpKeywordTextInOmnibox(aKeyword.text);
                setUpOmniboxSuggestionsToReturn([getOmniboxSuggestionValue()]);
                test.cmp.options.isCategoryField = true;
            });
            describe('with standard delimiter', function () {
                beforeEach(function () {
                    setUpSuggestionsFromProviderToReturn([
                        { field: someField, keyword: aKeyword, numberOfResults: 10, score: { distanceFromTotalForField: 100 }, value: 'a|b|c|d' }
                    ]);
                });
                it('should modify the state by correctly splitting the field value', function (done) { return __awaiter(_this, void 0, void 0, function () {
                    var resultingArgs, result, _a;
                    return __generator(this, function (_b) {
                        switch (_b.label) {
                            case 0: return [4 /*yield*/, triggerPopulateOmniboxEvent()];
                            case 1:
                                resultingArgs = _b.sent();
                                return [4 /*yield*/, firstSuggestion(resultingArgs)];
                            case 2:
                                result = _b.sent();
                                result[0].onSelect();
                                expect(test.env.queryStateModel.set).toHaveBeenCalledWith(Test_1.QueryStateModel.attributesEnum.fv, (_a = {},
                                    _a[someField] = ['a', 'b', 'c', 'd'],
                                    _a));
                                done();
                                return [2 /*return*/];
                        }
                    });
                }); });
                it('should set the advanced query to check every field value', function (done) { return __awaiter(_this, void 0, void 0, function () {
                    var resultingArgs, result;
                    return __generator(this, function (_a) {
                        switch (_a.label) {
                            case 0: return [4 /*yield*/, triggerPopulateOmniboxEvent()];
                            case 1:
                                resultingArgs = _a.sent();
                                return [4 /*yield*/, firstSuggestion(resultingArgs)];
                            case 2:
                                result = _a.sent();
                                expect(result[0].advancedQuery).toEqual(someField + "==\"a\" AND " + someField + "==\"b\" AND " + someField + "==\"c\" AND " + someField + "==\"d\"");
                                done();
                                return [2 /*return*/];
                        }
                    });
                }); });
            });
            describe('with a custom delimiter', function () {
                beforeEach(function () {
                    setUpSuggestionsFromProviderToReturn([
                        { field: someField, keyword: aKeyword, numberOfResults: 10, score: { distanceFromTotalForField: 100 }, value: 'a>b>c>d' }
                    ]);
                    test.cmp.options.categoryFieldDelimitingCharacter = '>';
                });
                it('should modify the state by correctly splitting the field value', function (done) { return __awaiter(_this, void 0, void 0, function () {
                    var resultingArgs, result, _a;
                    return __generator(this, function (_b) {
                        switch (_b.label) {
                            case 0: return [4 /*yield*/, triggerPopulateOmniboxEvent()];
                            case 1:
                                resultingArgs = _b.sent();
                                return [4 /*yield*/, firstSuggestion(resultingArgs)];
                            case 2:
                                result = _b.sent();
                                result[0].onSelect();
                                expect(test.env.queryStateModel.set).toHaveBeenCalledWith(Test_1.QueryStateModel.attributesEnum.fv, (_a = {},
                                    _a[someField] = ['a', 'b', 'c', 'd'],
                                    _a));
                                done();
                                return [2 /*return*/];
                        }
                    });
                }); });
                it('should set the advanced query to check every field value', function (done) { return __awaiter(_this, void 0, void 0, function () {
                    var resultingArgs, result;
                    return __generator(this, function (_a) {
                        switch (_a.label) {
                            case 0: return [4 /*yield*/, triggerPopulateOmniboxEvent()];
                            case 1:
                                resultingArgs = _a.sent();
                                return [4 /*yield*/, firstSuggestion(resultingArgs)];
                            case 2:
                                result = _a.sent();
                                expect(result[0].advancedQuery).toEqual(someField + "==\"a\" AND " + someField + "==\"b\" AND " + someField + "==\"c\" AND " + someField + "==\"d\"");
                                done();
                                return [2 /*return*/];
                        }
                    });
                }); });
            });
        });
        describe('when no keywords are provided', function () {
            beforeEach(function () {
                setUpOmniboxSuggestionsToReturn([]);
                setUpKeywordTextInOmnibox('');
                setUpSuggestionsFromProviderToReturn([getSuggestionValue()]);
                test.cmp.options.useValueFromSearchbox = true;
                test.cmp.options.useQuerySuggestions = true;
            });
            it('should not call the suggestions provider', function (done) { return __awaiter(_this, void 0, void 0, function () {
                return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0: return [4 /*yield*/, triggerPopulateOmniboxEvent()];
                        case 1:
                            _a.sent();
                            expect(facetValueSuggestionsProvider.getSuggestions).not.toHaveBeenCalled();
                            done();
                            return [2 /*return*/];
                    }
                });
            }); });
        });
        describe('when the provider resolves suggestions', function () {
            beforeEach(function () {
                setUpSuggestionsFromProviderToReturn([getSuggestionValue(), getSuggestionValue(), getSuggestionValue()]);
            });
            it('populates suggestions', function (done) { return __awaiter(_this, void 0, void 0, function () {
                var resultingArgs, result;
                return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0: return [4 /*yield*/, triggerPopulateOmniboxEvent()];
                        case 1:
                            resultingArgs = _a.sent();
                            return [4 /*yield*/, firstSuggestion(resultingArgs)];
                        case 2:
                            result = _a.sent();
                            expect(result.length).toBe(3);
                            done();
                            return [2 /*return*/];
                    }
                });
            }); });
            it('should respect the numberOfSuggestions option when the value is less than what is returned', function (done) { return __awaiter(_this, void 0, void 0, function () {
                var resultingArgs, result;
                return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0:
                            test.cmp.options.numberOfSuggestions = 2;
                            return [4 /*yield*/, triggerPopulateOmniboxEvent()];
                        case 1:
                            resultingArgs = _a.sent();
                            return [4 /*yield*/, firstSuggestion(resultingArgs)];
                        case 2:
                            result = _a.sent();
                            expect(result.length).toBe(2);
                            done();
                            return [2 /*return*/];
                    }
                });
            }); });
            it('should respect the numberOfSuggestions option when the value is more than what is returned', function (done) { return __awaiter(_this, void 0, void 0, function () {
                var resultingArgs, result;
                return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0:
                            test.cmp.options.numberOfSuggestions = 99;
                            return [4 /*yield*/, triggerPopulateOmniboxEvent()];
                        case 1:
                            resultingArgs = _a.sent();
                            return [4 /*yield*/, firstSuggestion(resultingArgs)];
                        case 2:
                            result = _a.sent();
                            expect(result.length).toBe(3);
                            done();
                            return [2 /*return*/];
                    }
                });
            }); });
            it('should respect the numberOfSuggestions option when the value is 0', function (done) { return __awaiter(_this, void 0, void 0, function () {
                var resultingArgs, result;
                return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0:
                            test.cmp.options.numberOfSuggestions = 0;
                            return [4 /*yield*/, triggerPopulateOmniboxEvent()];
                        case 1:
                            resultingArgs = _a.sent();
                            return [4 /*yield*/, firstSuggestion(resultingArgs)];
                        case 2:
                            result = _a.sent();
                            expect(result.length).toBe(0);
                            done();
                            return [2 /*return*/];
                    }
                });
            }); });
            it('should respect the numberOfSuggestions option when the value is 1', function (done) { return __awaiter(_this, void 0, void 0, function () {
                var resultingArgs, result;
                return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0:
                            test.cmp.options.numberOfSuggestions = 1;
                            return [4 /*yield*/, triggerPopulateOmniboxEvent()];
                        case 1:
                            resultingArgs = _a.sent();
                            return [4 /*yield*/, firstSuggestion(resultingArgs)];
                        case 2:
                            result = _a.sent();
                            expect(result.length).toBe(1);
                            done();
                            return [2 /*return*/];
                    }
                });
            }); });
            it('changes the omnibox text to the suggestion keyword', function (done) { return __awaiter(_this, void 0, void 0, function () {
                var resultingArgs, result;
                return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0: return [4 /*yield*/, triggerPopulateOmniboxEvent()];
                        case 1:
                            resultingArgs = _a.sent();
                            return [4 /*yield*/, firstSuggestion(resultingArgs)];
                        case 2:
                            result = _a.sent();
                            result[0].onSelect();
                            expect(omniboxInstance.setText).toHaveBeenCalledWith(aKeyword.text);
                            done();
                            return [2 /*return*/];
                    }
                });
            }); });
            it('changes the advanced query of the suggestion', function (done) { return __awaiter(_this, void 0, void 0, function () {
                var resultingArgs, result;
                return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0: return [4 /*yield*/, triggerPopulateOmniboxEvent()];
                        case 1:
                            resultingArgs = _a.sent();
                            return [4 /*yield*/, firstSuggestion(resultingArgs)];
                        case 2:
                            result = _a.sent();
                            expect(result[0].advancedQuery).toEqual(someField + "==\"" + someSuggestionValue + "\"");
                            done();
                            return [2 /*return*/];
                    }
                });
            }); });
            it('changes the fv state when clicking on a suggestion', function (done) { return __awaiter(_this, void 0, void 0, function () {
                var resultingArgs, result, _a;
                return __generator(this, function (_b) {
                    switch (_b.label) {
                        case 0: return [4 /*yield*/, triggerPopulateOmniboxEvent()];
                        case 1:
                            resultingArgs = _b.sent();
                            return [4 /*yield*/, firstSuggestion(resultingArgs)];
                        case 2:
                            result = _b.sent();
                            result[0].onSelect();
                            expect(test.env.queryStateModel.set).toHaveBeenCalledWith(Test_1.QueryStateModel.attributesEnum.fv, (_a = {},
                                _a[someField] = [someSuggestionValue],
                                _a));
                            done();
                            return [2 /*return*/];
                    }
                });
            }); });
            it('merges the original fv state when clicking on a suggestion', function (done) { return __awaiter(_this, void 0, void 0, function () {
                var resultingArgs, result, _a;
                return __generator(this, function (_b) {
                    switch (_b.label) {
                        case 0:
                            test.env.queryStateModel.get.and.callFake(function (id) {
                                return id === 'fv' ? { wow: 'existingvalue' } : '';
                            });
                            return [4 /*yield*/, triggerPopulateOmniboxEvent()];
                        case 1:
                            resultingArgs = _b.sent();
                            return [4 /*yield*/, firstSuggestion(resultingArgs)];
                        case 2:
                            result = _b.sent();
                            result[0].onSelect();
                            expect(test.env.queryStateModel.set).toHaveBeenCalledWith(Test_1.QueryStateModel.attributesEnum.fv, (_a = {
                                    wow: 'existingvalue'
                                },
                                _a[someField] = [someSuggestionValue],
                                _a));
                            done();
                            return [2 /*return*/];
                    }
                });
            }); });
            it('executes a query and log usage analytics when clicking on a suggestion', function (done) { return __awaiter(_this, void 0, void 0, function () {
                var resultingArgs, result;
                return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0: return [4 /*yield*/, triggerPopulateOmniboxEvent()];
                        case 1:
                            resultingArgs = _a.sent();
                            return [4 /*yield*/, firstSuggestion(resultingArgs)];
                        case 2:
                            result = _a.sent();
                            result[0].onSelect();
                            expect(test.env.usageAnalytics.logSearchEvent).toHaveBeenCalled();
                            expect(test.env.queryController.executeQuery).toHaveBeenCalled();
                            done();
                            return [2 /*return*/];
                    }
                });
            }); });
        });
        it('calls suggestions without the omnibox keyword when the useValueFromSearchbox options is false', function (done) { return __awaiter(_this, void 0, void 0, function () {
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        test.cmp.options.useValueFromSearchbox = false;
                        return [4 /*yield*/, triggerPopulateOmniboxEvent()];
                    case 1:
                        _a.sent();
                        expect(facetValueSuggestionsProvider.getSuggestions).toHaveBeenCalledTimes(1);
                        expect(facetValueSuggestionsProvider.getSuggestions).not.toHaveBeenCalledWith([aKeyword]);
                        done();
                        return [2 /*return*/];
                }
            });
        }); });
        it('calls suggestions with the omnibox keyword when the useValueFromSearchbox options is true', function (done) { return __awaiter(_this, void 0, void 0, function () {
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        test.cmp.options.useValueFromSearchbox = true;
                        test.cmp.options.useQuerySuggestions = false;
                        return [4 /*yield*/, triggerPopulateOmniboxEvent()];
                    case 1:
                        _a.sent();
                        expect(facetValueSuggestionsProvider.getSuggestions).toHaveBeenCalledTimes(1);
                        expect(facetValueSuggestionsProvider.getSuggestions).toHaveBeenCalledWith([aKeyword]);
                        done();
                        return [2 /*return*/];
                }
            });
        }); });
        describe('when the omnibox has suggestions', function () {
            beforeEach(function () {
                test.cmp.options.useQuerySuggestions = true;
                setUpOmniboxSuggestionsToReturn([getOmniboxSuggestionValue()]);
            });
            it('calls suggestions with the shown omnibox suggestions keyword when the useQuerySuggestions options is true', function (done) { return __awaiter(_this, void 0, void 0, function () {
                return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0:
                            test.cmp.options.useQuerySuggestions = true;
                            return [4 /*yield*/, triggerPopulateOmniboxEvent()];
                        case 1:
                            _a.sent();
                            expect(facetValueSuggestionsProvider.getSuggestions).toHaveBeenCalledTimes(1);
                            expect(facetValueSuggestionsProvider.getSuggestions).toHaveBeenCalledWith([anOmniboxSuggestionKeyword]);
                            done();
                            return [2 /*return*/];
                    }
                });
            }); });
        });
        it('filters suggestions that are the same keywords', function (done) { return __awaiter(_this, void 0, void 0, function () {
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        setUpOmniboxSuggestionsToReturn([getOmniboxSuggestionValue(), getOmniboxSuggestionValue()]);
                        return [4 /*yield*/, triggerPopulateOmniboxEvent()];
                    case 1:
                        _a.sent();
                        expect(facetValueSuggestionsProvider.getSuggestions).toHaveBeenCalledTimes(1);
                        expect(facetValueSuggestionsProvider.getSuggestions).toHaveBeenCalledWith([anOmniboxSuggestionKeyword]);
                        done();
                        return [2 /*return*/];
                }
            });
        }); });
        it('filters values selected in a facet', function (done) { return __awaiter(_this, void 0, void 0, function () {
            var aValueToFilter, suggestionThatShouldBeFiltered, resultingArgs, result;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        aValueToFilter = 'filterthisplz';
                        suggestionThatShouldBeFiltered = {
                            keyword: aKeyword,
                            numberOfResults: 10,
                            score: {
                                distanceFromTotalForField: 100
                            },
                            value: aValueToFilter,
                            field: someField
                        };
                        setUpSuggestionsFromProviderToReturn([suggestionThatShouldBeFiltered, getSuggestionValue()]);
                        test.env.queryStateModel.get.and.callFake(function (id) { return (id === "f:" + someField ? [aValueToFilter] : []); });
                        return [4 /*yield*/, triggerPopulateOmniboxEvent()];
                    case 1:
                        resultingArgs = _a.sent();
                        return [4 /*yield*/, firstSuggestion(resultingArgs)];
                    case 2:
                        result = _a.sent();
                        expect(result.length).toBe(1);
                        done();
                        return [2 /*return*/];
                }
            });
        }); });
        describe('when only using the search box keywords', function () {
            beforeEach(function () {
                test.cmp.options.useValueFromSearchbox = true;
                test.cmp.options.useQuerySuggestions = false;
            });
            it("returns no suggestions", function (done) { return __awaiter(_this, void 0, void 0, function () {
                var resultingArgs, result;
                return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0:
                            setUpKeywordTextInOmnibox(anOmniboxSuggestionKeyword.text);
                            return [4 /*yield*/, triggerPopulateOmniboxEvent()];
                        case 1:
                            resultingArgs = _a.sent();
                            return [4 /*yield*/, firstSuggestion(resultingArgs)];
                        case 2:
                            result = _a.sent();
                            expect(result.length).toBe(0);
                            done();
                            return [2 /*return*/];
                    }
                });
            }); });
            it('still returns no suggestions if the omnibox is empty', function (done) { return __awaiter(_this, void 0, void 0, function () {
                var resultingArgs, result;
                return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0:
                            setUpKeywordTextInOmnibox('');
                            return [4 /*yield*/, triggerPopulateOmniboxEvent()];
                        case 1:
                            resultingArgs = _a.sent();
                            return [4 /*yield*/, firstSuggestion(resultingArgs)];
                        case 2:
                            result = _a.sent();
                            expect(result.length).toBe(0);
                            done();
                            return [2 /*return*/];
                    }
                });
            }); });
            it("calls the provider's getSuggestions with the omnibox's text if it isn't empty", function (done) { return __awaiter(_this, void 0, void 0, function () {
                return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0:
                            setUpKeywordTextInOmnibox(anOmniboxSuggestionKeyword.text);
                            return [4 /*yield*/, triggerPopulateOmniboxEvent()];
                        case 1:
                            _a.sent();
                            expect(facetValueSuggestionsProvider.getSuggestions).toHaveBeenCalledWith([anOmniboxSuggestionKeyword]);
                            done();
                            return [2 /*return*/];
                    }
                });
            }); });
            it("doesn't call the provider's getSuggestions if the omnibox is empty", function (done) { return __awaiter(_this, void 0, void 0, function () {
                return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0:
                            setUpKeywordTextInOmnibox('');
                            return [4 /*yield*/, triggerPopulateOmniboxEvent()];
                        case 1:
                            _a.sent();
                            expect(facetValueSuggestionsProvider.getSuggestions).not.toHaveBeenCalled();
                            done();
                            return [2 /*return*/];
                    }
                });
            }); });
        });
    });
}
exports.FacetValueSuggestionsTest = FacetValueSuggestionsTest;
 
 
/***/ }),
/* 1741 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { Iif (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        Iif (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            Iif (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
            Iif (y = 0, t) op = [0, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    Eif (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        Iif (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
Object.defineProperty(exports, "__esModule", { value: true });
var FacetValueSuggestionsProvider_1 = __webpack_require__(789);
var Mock = __webpack_require__(2);
function FacetValueSuggestionsProviderTest() {
    var _this = this;
    describe('FacetValueSuggestionsProvider', function () {
        var test;
        var environment;
        var someField = '@bloupbloup';
        var valueToSearch = {
            text: 'cowboy',
            html: "<span class='coveo-omnibox-hightlight'>cowboy</span>"
        };
        var referenceFieldNumberOfResults = 10;
        var suggestion = 'suggestion';
        var setUpLastQuery = function (aq, cq) {
            Eif (aq === void 0) { aq = ''; }
            Eif (cq === void 0) { cq = ''; }
            environment.queryController.getLastQuery.and.returnValue({
                aq: aq,
                cq: cq
            });
        };
        var setUpFieldValuesBatchResponse = function (values) {
            var valuesWithReference = [].concat(values).concat([getReferenceBatchResponse()]);
            environment.searchEndpoint.listFieldValuesBatch.and.returnValue(Promise.resolve(valuesWithReference));
        };
        var getIndexFieldValue = function (numberOfResults, value) {
            return {
                numberOfResults: numberOfResults,
                value: value
            };
        };
        var getReferenceBatchResponse = function () {
            return [getIndexFieldValue(referenceFieldNumberOfResults, suggestion)];
        };
        beforeEach(function () {
            environment = new Mock.MockEnvironmentBuilder().build();
            environment.queryController.getLastQuery = jasmine.createSpy('getLastQuery');
            setUpLastQuery();
            environment.searchEndpoint.listFieldValuesBatch = jasmine.createSpy('listFieldValuesBatch');
            setUpFieldValuesBatchResponse([]);
            test = new FacetValueSuggestionsProvider_1.FacetValueSuggestionsProvider(environment.queryController, {
                field: someField
            });
        });
        afterEach(function () {
            test = null;
            environment = null;
        });
        it('should execute listFieldValuesBatch with value to search and reference', function (done) { return __awaiter(_this, void 0, void 0, function () {
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0: return [4 /*yield*/, test.getSuggestions([valueToSearch])];
                    case 1:
                        _a.sent();
                        expect(environment.searchEndpoint.listFieldValuesBatch).toHaveBeenCalledWith({
                            batch: [
                                {
                                    field: someField,
                                    ignoreAccents: true,
                                    maximumNumberOfValues: 3,
                                    queryOverride: valueToSearch.text
                                },
                                {
                                    field: someField
                                }
                            ]
                        });
                        done();
                        return [2 /*return*/];
                }
            });
        }); });
        describe('given field request returns suggestions', function () {
            var fieldRequestNumberOfResults = 1;
            beforeEach(function () {
                setUpFieldValuesBatchResponse([
                    [
                        {
                            value: suggestion,
                            numberOfResults: fieldRequestNumberOfResults
                        }
                    ]
                ]);
            });
            it('returns suggestions for the value to search', function (done) { return __awaiter(_this, void 0, void 0, function () {
                var results;
                return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0: return [4 /*yield*/, test.getSuggestions([valueToSearch])];
                        case 1:
                            results = _a.sent();
                            expect(results.length).toBe(1);
                            expect(results[0].value).toBe(suggestion);
                            expect(results[0].score.distanceFromTotalForField).not.toBeUndefined();
                            done();
                            return [2 /*return*/];
                    }
                });
            }); });
        });
        describe('given field request returns a lot of suggestions', function () {
            beforeEach(function () {
                var response = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10].map(function (i) { return getIndexFieldValue(i, i.toString()); });
                setUpFieldValuesBatchResponse([response]);
            });
            it('should return the same number of suggestions', function (done) { return __awaiter(_this, void 0, void 0, function () {
                var results;
                return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0: return [4 /*yield*/, test.getSuggestions([valueToSearch])];
                        case 1:
                            results = _a.sent();
                            expect(results.length).toBe(10);
                            done();
                            return [2 /*return*/];
                    }
                });
            }); });
        });
        describe('with an additional expression', function () {
            var anExpression = '@foofield==barvalue';
            beforeEach(function () {
                test = new FacetValueSuggestionsProvider_1.FacetValueSuggestionsProvider(environment.queryController, {
                    field: someField,
                    expression: anExpression
                });
            });
            it("should execute listFieldValuesBatch with queryOverride containing an additional expression", function (done) { return __awaiter(_this, void 0, void 0, function () {
                return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0: return [4 /*yield*/, test.getSuggestions([valueToSearch])];
                        case 1:
                            _a.sent();
                            expect(environment.searchEndpoint.listFieldValuesBatch).toHaveBeenCalledWith({
                                batch: jasmine.arrayContaining([
                                    jasmine.objectContaining({
                                        queryOverride: jasmine.stringMatching("" + anExpression)
                                    })
                                ])
                            });
                            done();
                            return [2 /*return*/];
                    }
                });
            }); });
        });
    });
}
exports.FacetValueSuggestionsProviderTest = FacetValueSuggestionsProviderTest;
 
 
/***/ }),
/* 1742 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var FacetColumnAutoLayoutAdjustment_1 = __webpack_require__(497);
var Test_1 = __webpack_require__(40);
function FacetColumnAutoLayoutAdjustmentTest() {
    describe('FacetColumnAutoLayoutAdjustment', function () {
        var getAutoLayoutAdjustableComponent = function () {
            var spy = jasmine.createSpy('spy');
            var component = {
                isCurrentlyDisplayed: spy
            };
            return {
                component: component,
                spy: spy
            };
        };
        it('should correctly tell if an object function is autoLayoutAdjustable', function () {
            expect(FacetColumnAutoLayoutAdjustment_1.FacetColumnAutoLayoutAdjustment.isAutoLayoutAdjustable(getAutoLayoutAdjustableComponent().component)).toBeTruthy();
        });
        it('should correctly tell if an object function is not autoLayoutAdjustable', function () {
            var component = getAutoLayoutAdjustableComponent().component;
            delete component.isCurrentlyDisplayed;
            expect(FacetColumnAutoLayoutAdjustment_1.FacetColumnAutoLayoutAdjustment.isAutoLayoutAdjustable(component)).toBeFalsy();
        });
        it('should allow to register a single root element with mulitple components', function () {
            var root = Test_1.$$('div');
            var component = getAutoLayoutAdjustableComponent().component;
            var component2 = getAutoLayoutAdjustableComponent().component;
            FacetColumnAutoLayoutAdjustment_1.FacetColumnAutoLayoutAdjustment.initializeAutoLayoutAdjustment(root.el, component);
            FacetColumnAutoLayoutAdjustment_1.FacetColumnAutoLayoutAdjustment.initializeAutoLayoutAdjustment(root.el, component2);
            expect(FacetColumnAutoLayoutAdjustment_1.FacetColumnAutoLayoutAdjustment.autoLayoutAdjustmentComponent.get(root.el)).toEqual(jasmine.arrayContaining([component, component2]));
        });
        it('should allow to register multiple root element with multiple components', function () {
            var root = Test_1.$$('div');
            var root2 = Test_1.$$('div');
            var component = getAutoLayoutAdjustableComponent().component;
            var component2 = getAutoLayoutAdjustableComponent().component;
            FacetColumnAutoLayoutAdjustment_1.FacetColumnAutoLayoutAdjustment.initializeAutoLayoutAdjustment(root.el, component);
            FacetColumnAutoLayoutAdjustment_1.FacetColumnAutoLayoutAdjustment.initializeAutoLayoutAdjustment(root2.el, component);
            FacetColumnAutoLayoutAdjustment_1.FacetColumnAutoLayoutAdjustment.initializeAutoLayoutAdjustment(root.el, component2);
            FacetColumnAutoLayoutAdjustment_1.FacetColumnAutoLayoutAdjustment.initializeAutoLayoutAdjustment(root2.el, component2);
            expect(FacetColumnAutoLayoutAdjustment_1.FacetColumnAutoLayoutAdjustment.autoLayoutAdjustmentComponent.get(root.el)).toEqual(jasmine.arrayContaining([component, component2]));
            expect(FacetColumnAutoLayoutAdjustment_1.FacetColumnAutoLayoutAdjustment.autoLayoutAdjustmentComponent.get(root2.el)).toEqual(jasmine.arrayContaining([component, component2]));
        });
        describe('with a facet column', function () {
            var root;
            var column;
            var dropDownHeader;
            var isHidden = function () {
                return Test_1.$$(root).hasClass('coveo-no-visible-facet');
            };
            beforeEach(function () {
                root = Test_1.$$('div');
                column = Test_1.$$('div', { className: 'coveo-facet-column' });
                dropDownHeader = Test_1.$$('div', { className: 'coveo-facet-dropdown-header' });
                root.append(column.el);
                root.append(dropDownHeader.el);
            });
            it('should show the facet column if the component is currently displayed on a deferred query success', function () {
                var component = getAutoLayoutAdjustableComponent().component;
                component.isCurrentlyDisplayed.and.returnValue(true);
                FacetColumnAutoLayoutAdjustment_1.FacetColumnAutoLayoutAdjustment.initializeAutoLayoutAdjustment(root.el, component);
                Test_1.$$(root).trigger(Test_1.QueryEvents.deferredQuerySuccess);
                expect(component.isCurrentlyDisplayed).toHaveBeenCalled();
                expect(isHidden()).toBeFalsy();
            });
            it('should hide the facet column if the component is not currently displayed on a deferred query success', function () {
                var component = getAutoLayoutAdjustableComponent().component;
                component.isCurrentlyDisplayed.and.returnValue(false);
                FacetColumnAutoLayoutAdjustment_1.FacetColumnAutoLayoutAdjustment.initializeAutoLayoutAdjustment(root.el, component);
                Test_1.$$(root).trigger(Test_1.QueryEvents.deferredQuerySuccess);
                expect(isHidden()).toBeTruthy();
            });
            describe('with a custom element inside the facet column with an hidden component', function () {
                var customElement;
                var component;
                beforeEach(function () {
                    customElement = Test_1.$$('div');
                    column.append(customElement.el);
                    component = getAutoLayoutAdjustableComponent().component;
                    component.isCurrentlyDisplayed.and.returnValue(false);
                });
                it('should not hide the facet column', function () {
                    FacetColumnAutoLayoutAdjustment_1.FacetColumnAutoLayoutAdjustment.initializeAutoLayoutAdjustment(root.el, component);
                    Test_1.$$(root).trigger(Test_1.QueryEvents.deferredQuerySuccess);
                    expect(isHidden()).toBeFalsy();
                });
                it('should hide the facet column if the customElement is not displayed', function () {
                    customElement.el.style.display = 'none';
                    FacetColumnAutoLayoutAdjustment_1.FacetColumnAutoLayoutAdjustment.initializeAutoLayoutAdjustment(root.el, component);
                    Test_1.$$(root).trigger(Test_1.QueryEvents.deferredQuerySuccess);
                    expect(isHidden()).toBeTruthy();
                });
                it('should hide the facet column if the customElement is not visible', function () {
                    customElement.el.style.visibility = 'hidden';
                    FacetColumnAutoLayoutAdjustment_1.FacetColumnAutoLayoutAdjustment.initializeAutoLayoutAdjustment(root.el, component);
                    Test_1.$$(root).trigger(Test_1.QueryEvents.deferredQuerySuccess);
                    expect(isHidden()).toBeTruthy();
                });
                it('should hide the facet column if the customElement is disabled by a tab', function () {
                    customElement.el.className = 'coveo-tab-disabled';
                    FacetColumnAutoLayoutAdjustment_1.FacetColumnAutoLayoutAdjustment.initializeAutoLayoutAdjustment(root.el, component);
                    Test_1.$$(root).trigger(Test_1.QueryEvents.deferredQuerySuccess);
                    expect(isHidden()).toBeTruthy();
                });
            });
            describe('with non component elements inside the facet column that should be ignored', function () {
                var customElement;
                var component;
                beforeEach(function () {
                    customElement = Test_1.$$('div');
                    column.append(customElement.el);
                    component = getAutoLayoutAdjustableComponent().component;
                    component.isCurrentlyDisplayed.and.returnValue(false);
                });
                it("should hide the facet column if it contains only an element with 'coveo-facet-header-filter-by-container'", function () {
                    customElement.addClass('coveo-facet-header-filter-by-container');
                    FacetColumnAutoLayoutAdjustment_1.FacetColumnAutoLayoutAdjustment.initializeAutoLayoutAdjustment(root.el, component);
                    Test_1.$$(root).trigger(Test_1.QueryEvents.deferredQuerySuccess);
                    expect(isHidden()).toBeTruthy();
                });
                it("should hide the facet column if it contains only an element with 'coveo-topSpace'", function () {
                    customElement.addClass('coveo-topSpace');
                    FacetColumnAutoLayoutAdjustment_1.FacetColumnAutoLayoutAdjustment.initializeAutoLayoutAdjustment(root.el, component);
                    Test_1.$$(root).trigger(Test_1.QueryEvents.deferredQuerySuccess);
                    expect(isHidden()).toBeTruthy();
                });
                it("should hide the facet column if it contains only an element with 'coveo-bottomSpace'", function () {
                    customElement.addClass('coveo-bottomSpace');
                    FacetColumnAutoLayoutAdjustment_1.FacetColumnAutoLayoutAdjustment.initializeAutoLayoutAdjustment(root.el, component);
                    Test_1.$$(root).trigger(Test_1.QueryEvents.deferredQuerySuccess);
                    expect(isHidden()).toBeTruthy();
                });
            });
            it('should not hide the facet column if there is multiple component and some are currentlyDisplayed and some are not currentlyDisplayed', function () {
                var component = getAutoLayoutAdjustableComponent().component;
                component.isCurrentlyDisplayed.and.returnValue(false);
                var component2 = getAutoLayoutAdjustableComponent().component;
                component2.isCurrentlyDisplayed.and.returnValue(true);
                FacetColumnAutoLayoutAdjustment_1.FacetColumnAutoLayoutAdjustment.initializeAutoLayoutAdjustment(root.el, component);
                FacetColumnAutoLayoutAdjustment_1.FacetColumnAutoLayoutAdjustment.initializeAutoLayoutAdjustment(root.el, component2);
                Test_1.$$(root).trigger(Test_1.QueryEvents.deferredQuerySuccess);
                expect(isHidden()).toBeFalsy();
            });
            it("should hide and show if the component changes it's currently displayed property", function () {
                var component = getAutoLayoutAdjustableComponent().component;
                component.isCurrentlyDisplayed.and.returnValue(false);
                FacetColumnAutoLayoutAdjustment_1.FacetColumnAutoLayoutAdjustment.initializeAutoLayoutAdjustment(root.el, component);
                Test_1.$$(root).trigger(Test_1.QueryEvents.deferredQuerySuccess);
                expect(isHidden()).toBeTruthy();
                component.isCurrentlyDisplayed.and.returnValue(true);
                Test_1.$$(root).trigger(Test_1.QueryEvents.deferredQuerySuccess);
                expect(isHidden()).toBeFalsy();
            });
        });
    });
}
exports.FacetColumnAutoLayoutAdjustmentTest = FacetColumnAutoLayoutAdjustmentTest;
 
 
/***/ }),
/* 1743 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var AgGrid_1 = __webpack_require__(500);
var Test_1 = __webpack_require__(40);
var oldAgGridReference;
function AgGridTest() {
    describe('AgGrid', function () {
        var doc;
        beforeEach(function () {
            AgGrid_1.reset();
            Eif (window.agGrid) {
                oldAgGridReference = window.agGrid;
                delete window.agGrid;
            }
            doc = document.implementation.createHTMLDocument('testing');
        });
        afterEach(function () {
            window.agGrid = oldAgGridReference;
        });
        it('should load the script in the document', function () {
            AgGrid_1.loadAgGridLibrary(doc);
            var script = Test_1.$$(doc.head).find('script');
            expect(script.src).toContain('ag-grid');
        });
        it('should load the needed css in the document', function () {
            AgGrid_1.loadAgGridLibrary(doc);
            var styles = Test_1.$$(doc.head).findAll('link');
            expect(styles.length).toBe(2);
            styles.forEach(function (style) {
                expect(style.href).toContain('ag-grid');
            });
        });
        it('should not load ag grid multiple time while it is still loading', function () {
            AgGrid_1.loadAgGridLibrary(doc);
            var scripts = Test_1.$$(doc.head).findAll('script');
            expect(scripts.length).toBe(1);
            AgGrid_1.loadAgGridLibrary(doc);
            scripts = Test_1.$$(doc.head).findAll('script');
            expect(scripts.length).toBe(1);
        });
    });
}
exports.AgGridTest = AgGridTest;
 
 
/***/ }),
/* 1744 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var GenericValueOutput_1 = __webpack_require__(91);
function GenericValueOutputTest() {
    describe('GenericValueOutput', function () {
        var checkArrayContent = function (content) {
            expect(content).toContain('<li>1</li>');
            expect(content).toContain('<li>4</li>');
            expect(content).toContain('<li>6</li>');
        };
        var checkSimpleObjectContent = function (content) {
            expect(content).toContain('<dt>foo</dt>');
            expect(content).toContain('<dd>bar</dd>');
        };
        it('should output simple string value without modification', function () {
            expect(new GenericValueOutput_1.GenericValueOutput().output('foo')).toEqual(jasmine.objectContaining({
                content: 'foo'
            }));
        });
        it('should output a empty string value to NULL', function () {
            expect(new GenericValueOutput_1.GenericValueOutput().output('')).toEqual(jasmine.objectContaining({
                content: '-- NULL --'
            }));
        });
        it('should output null value to NULL', function () {
            expect(new GenericValueOutput_1.GenericValueOutput().output(null)).toEqual(jasmine.objectContaining({
                content: '-- NULL --'
            }));
        });
        it('should output undefined value to NULL', function () {
            expect(new GenericValueOutput_1.GenericValueOutput().output(undefined)).toEqual(jasmine.objectContaining({
                content: '-- NULL --'
            }));
        });
        it('should output number value to a simple string', function () {
            expect(new GenericValueOutput_1.GenericValueOutput().output(1)).toEqual(jasmine.objectContaining({
                content: '1'
            }));
        });
        it('should output 0 properly to a simple string', function () {
            expect(new GenericValueOutput_1.GenericValueOutput().output(0)).toEqual(jasmine.objectContaining({
                content: '0'
            }));
        });
        it('should output true value to a simple string', function () {
            expect(new GenericValueOutput_1.GenericValueOutput().output(true)).toEqual(jasmine.objectContaining({
                content: 'true'
            }));
        });
        it('should output false value to a simple string', function () {
            expect(new GenericValueOutput_1.GenericValueOutput().output(false)).toEqual(jasmine.objectContaining({
                content: 'false'
            }));
        });
        it('should output array as a list', function () {
            var contentBuilt = new GenericValueOutput_1.GenericValueOutput().output([1, 4, 6]).content;
            expect(contentBuilt).toContain('ul');
            checkArrayContent(contentBuilt);
        });
        it('should ouput empty array to NULL', function () {
            var contentBuilt = new GenericValueOutput_1.GenericValueOutput().output([]).content;
            expect(contentBuilt).toContain('-- NULL --');
        });
        it('should output array that contains object to a definition list', function () {
            var contentBuilt = new GenericValueOutput_1.GenericValueOutput().output([1, 4, 6, { foo: 'bar' }]).content;
            expect(contentBuilt).toContain('dl');
            checkArrayContent(contentBuilt);
            checkSimpleObjectContent(contentBuilt);
        });
        it('should output object to a definition list', function () {
            var contentBuilt = new GenericValueOutput_1.GenericValueOutput().output({ foo: 'bar' }).content;
            expect(contentBuilt).toContain('dl');
            checkSimpleObjectContent(contentBuilt);
        });
        it('should output object that contains array values to a definition list', function () {
            var contentBuilt = new GenericValueOutput_1.GenericValueOutput().output({ foo: [1, 4, 6] }).content;
            expect(contentBuilt).toContain('dl');
            expect(contentBuilt).toContain('<dt>foo</dt>');
            checkArrayContent(contentBuilt);
        });
        it('should output object that contains sub object properties as definition list', function () {
            var contentBuilt = new GenericValueOutput_1.GenericValueOutput().output({ baz: { foo: 'bar' } }).content;
            expect(contentBuilt).toContain('dl');
            checkSimpleObjectContent(contentBuilt);
        });
    });
}
exports.GenericValueOutputTest = GenericValueOutputTest;
 
 
/***/ }),
/* 1745 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var RankingInfoParser_1 = __webpack_require__(225);
var Fake_1 = __webpack_require__(11);
var UtilsModules_1 = __webpack_require__(67);
function RankingInfoParserTest() {
    describe('RankingInfoParser', function () {
        it('should not throw on null', function () {
            expect(function () { return RankingInfoParser_1.parseRankingInfo(null); }).not.toThrow();
        });
        it('should parse ranking info with no keywords', function () {
            var toParse = Fake_1.FakeResults.createRankingInfoNoKeywords();
            var parsed = RankingInfoParser_1.parseRankingInfo(toParse);
            expect(parsed.totalWeight).toBe(2375);
            expect(parsed.documentWeights.Adjacency).toBe(0);
            expect(parsed.documentWeights['Collaborative rating']).toBe(0);
            expect(parsed.documentWeights.Custom).toBe(400);
            expect(parsed.documentWeights.Date).toBe(405);
            expect(parsed.documentWeights.QRE).toBe(890);
            expect(parsed.documentWeights.Quality).toBe(180);
            expect(parsed.documentWeights['Ranking functions']).toBe(0);
            expect(parsed.documentWeights.Source).toBe(500);
            expect(parsed.documentWeights.Title).toBe(0);
            expect(parsed.termsWeight).toBeNull();
        });
        it('should parse ranking info properly with keywords', function () {
            var toParse = Fake_1.FakeResults.createRankingInfoWithKeywords();
            var parsed = RankingInfoParser_1.parseRankingInfo(toParse);
            var testsTermsWeights = parsed.termsWeight['test'];
            expect(testsTermsWeights.Weights.Title).toBe(800);
            expect(testsTermsWeights.Weights.Concept).toBe(0);
            expect(testsTermsWeights.Weights.Summary).toBe(300);
            expect(testsTermsWeights.Weights.URI).toBe(500);
            expect(testsTermsWeights.Weights.Formatted).toBe(0);
            expect(testsTermsWeights.Weights.Casing).toBe(0);
            expect(testsTermsWeights.Weights.Relation).toBe(200);
            expect(testsTermsWeights.Weights.Frequency).toBe(1744);
            expect(testsTermsWeights.terms.test['TF-IDF']).toBe(26);
            expect(testsTermsWeights.terms.test.Correlation).toBe(100);
        });
        it('should parse ranking info properly with QRE', function () {
            var toParse = Fake_1.FakeResults.createRankingInforWithQRE();
            var parsed = RankingInfoParser_1.parseRankingInfo(toParse);
            expect(parsed.qreWeights[0].score).toBe(2500);
            expect(parsed.qreWeights[0].expression).toBe('Expression: "@permanentid=95ad18de4cb8e17023f0224e9d44dd2f7177c6dceac6cb81b16f3659a3c3"');
            expect(parsed.qreWeights[1].score).toBe(-1000);
            expect(parsed.qreWeights[1].expression).toBe('Expression: "@permanentid=4119a14f02a63d0c2d92b51d4501dd83580831caea327179934dd1bc6645"');
            expect(parsed.qreWeights.length).toBe(2);
        });
        it('should parse ranking info properly with no QRE', function () {
            var toParse = Fake_1.FakeResults.createRankingInfoNoKeywords();
            var parsed = RankingInfoParser_1.parseRankingInfo(toParse);
            expect(parsed.qreWeights.length).toBe(0);
        });
        it('should be able to build a generic HtML list of terms', function () {
            var toParse = Fake_1.FakeResults.createRankingInfoWithKeywords();
            var parsed = RankingInfoParser_1.parseRankingInfo(toParse);
            var list = RankingInfoParser_1.buildListOfTermsElement(parsed.termsWeight.test.Weights);
            expect(UtilsModules_1.$$(list).find('dl')).toBeDefined();
            var listKeys = UtilsModules_1.$$(list).findAll('dt');
            var listValues = UtilsModules_1.$$(list).findAll('dd');
            expect(listKeys.length).toBeGreaterThan(0);
            expect(listKeys.length).toEqual(listValues.length);
            expect(listKeys[listKeys.length - 1].textContent).toBe('Total');
            expect(listValues[listValues.length - 1].textContent).toBe('3544');
        });
    });
}
exports.RankingInfoParserTest = RankingInfoParserTest;
 
 
/***/ }),
/* 1746 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var InlineRankingInfo_1 = __webpack_require__(646);
var Fake_1 = __webpack_require__(11);
var RankingInfoParser_1 = __webpack_require__(225);
var underscore_1 = __webpack_require__(1);
var UtilsModules_1 = __webpack_require__(67);
function InlineRankingInfoTest() {
    var result;
    var inlineRankingInfo;
    var parsed;
    describe('InlineRankingInfo', function () {
        describe('with ranking info with keywords', function () {
            beforeEach(function () {
                result = Fake_1.FakeResults.createFakeResult();
                result.rankingInfo = Fake_1.FakeResults.createRankingInfoWithKeywords();
                inlineRankingInfo = new InlineRankingInfo_1.InlineRankingInfo(result);
                parsed = RankingInfoParser_1.parseRankingInfo(result.rankingInfo);
            });
            it('should render a top level container', function () {
                var built = inlineRankingInfo.build();
                expect(built.find('div.coveo-relevance-inspector-inline-ranking')).toBeDefined();
            });
            it('should render a section for "Total', function () {
                var built = inlineRankingInfo.build();
                var totalHighlight = built.find('div.coveo-relevance-inspector-highlight');
                expect(totalHighlight).toBeDefined();
                expect(totalHighlight.textContent).toContain(parsed.totalWeight.toString());
            });
            it('should output a section for each relevant parsed document weights', function () {
                var built = inlineRankingInfo.build();
                var sections = built.findAll('div.coveo-relevance-inspector-inline-ranking-section');
                expect(sections.length).toEqual(10);
                var documentWeights = underscore_1.keys(parsed.documentWeights);
                underscore_1.each(documentWeights, function (documentWeight, i) {
                    expect(sections[i].textContent).toContain(documentWeight + ": " + parsed.documentWeights[documentWeight]);
                });
            });
            it('should contain a button to expand terms weights', function () {
                var built = inlineRankingInfo.build();
                var button = built.find('button.coveo-relevance-inspector-inline-ranking-button');
                expect(button).toBeDefined();
            });
            it('should contain a section for terms weight breakdown', function () {
                var built = inlineRankingInfo.build();
                var termsSection = built.find('div.coveo-relevance-inspector-inline-ranking-terms');
                expect(termsSection).toBeDefined();
            });
            it('should toggle the weight terms section with a button click', function () {
                var built = inlineRankingInfo.build();
                var button = built.find('button.coveo-relevance-inspector-inline-ranking-button');
                var termsSection = built.find('div.coveo-relevance-inspector-inline-ranking-terms');
                expect(UtilsModules_1.$$(termsSection).hasClass('coveo-active')).toBeFalsy();
                UtilsModules_1.$$(button).trigger('click');
                expect(UtilsModules_1.$$(termsSection).hasClass('coveo-active')).toBeTruthy();
            });
        });
        describe('with ranking info with QRE', function () {
            beforeEach(function () {
                result = Fake_1.FakeResults.createFakeResult();
                result.rankingInfo = Fake_1.FakeResults.createRankingInforWithQRE();
                inlineRankingInfo = new InlineRankingInfo_1.InlineRankingInfo(result);
                parsed = RankingInfoParser_1.parseRankingInfo(result.rankingInfo);
            });
            it('should contain a button to expand QRE weights', function () {
                var built = inlineRankingInfo.build();
                var button = built.find('button.coveo-relevance-inspector-inline-ranking-button');
                expect(button).toBeDefined();
            });
            it('should contain a section for QRE weight breakdown', function () {
                var built = inlineRankingInfo.build();
                var qreSection = built.find('div.coveo-relevance-inspector-inline-ranking-terms');
                expect(qreSection).toBeDefined();
            });
            it('should toggle the weight terms section with a button click', function () {
                var built = inlineRankingInfo.build();
                var button = built.find('button.coveo-relevance-inspector-inline-ranking-button');
                var qreSection = built.find('ul.coveo-relevance-inspector-inline-ranking-terms');
                expect(UtilsModules_1.$$(qreSection).hasClass('coveo-active')).toBeFalsy();
                UtilsModules_1.$$(button).trigger('click');
                expect(UtilsModules_1.$$(qreSection).hasClass('coveo-active')).toBeTruthy();
            });
        });
    });
}
exports.InlineRankingInfoTest = InlineRankingInfoTest;
 
 
/***/ }),
/* 1747 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var RelevanceInspectorTabs_1 = __webpack_require__(639);
var Test_1 = __webpack_require__(40);
function RelevanceInspectorTabsTest() {
    describe('RelevanceInspectorTabs', function () {
        it('should allow to add a navigation part', function () {
            var tabs = new RelevanceInspectorTabs_1.RelevanceInspectorTabs(function () { }).addNavigation('foo', 'bar');
            var tabNav = tabs.navigationSection.find('#bar');
            expect(tabNav).toBeDefined();
            expect(tabNav.textContent).toContain('foo');
        });
        it('should allow to add a tab content part', function () {
            var added = Test_1.$$('div');
            var tabs = new RelevanceInspectorTabs_1.RelevanceInspectorTabs(function () { }).addContent(added, 'bar');
            var tabContent = tabs.tabContentSection.find('div[data-target-tab="bar"]');
            expect(tabContent).toBeDefined();
            expect(Test_1.$$(tabContent).children()[0]).toBe(added.el);
        });
        it('should allow to add navigation and content in a single call', function () {
            var added = Test_1.$$('div');
            var tabs = new RelevanceInspectorTabs_1.RelevanceInspectorTabs(function () { }).addSection('foo', added, 'bar');
            var tabNav = tabs.navigationSection.find('#bar');
            var tabContent = tabs.tabContentSection.find('div[data-target-tab="bar"]');
            expect(tabNav).toBeDefined();
            expect(tabNav.textContent).toContain('foo');
            expect(tabContent).toBeDefined();
            expect(Test_1.$$(tabContent).children()[0]).toBe(added.el);
        });
        describe('when selecting tabs', function () {
            var spy;
            var firstSection;
            var secondSection;
            var tabs;
            beforeEach(function () {
                spy = jasmine.createSpy('onchange');
                firstSection = Test_1.$$('div');
                secondSection = Test_1.$$('div');
                tabs = new RelevanceInspectorTabs_1.RelevanceInspectorTabs(spy).addSection('one', firstSection, 'one').addSection('two', secondSection, 'two');
            });
            it("should change the content when you select a tab by it's id", function () {
                tabs.select('one');
                expect(Test_1.$$(firstSection.el.parentElement).hasClass('coveo-selected')).toBeTruthy();
                expect(Test_1.$$(secondSection.el.parentElement).hasClass('coveo-selected')).toBeFalsy();
                tabs.select('two');
                expect(Test_1.$$(firstSection.el.parentElement).hasClass('coveo-selected')).toBeFalsy();
                expect(Test_1.$$(secondSection.el.parentElement).hasClass('coveo-selected')).toBeTruthy();
            });
            it("should call the on change function when you select a tab by it's id", function () {
                tabs.select('one');
                expect(spy).toHaveBeenCalledWith('one');
                tabs.select('two');
                expect(spy).toHaveBeenCalledWith('two');
            });
        });
    });
}
exports.RelevanceInspectorTabsTest = RelevanceInspectorTabsTest;
 
 
/***/ }),
/* 1748 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { Iif (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        Iif (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            Iif (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
            Iif (y = 0, t) op = [0, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    Eif (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        Iif (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
Object.defineProperty(exports, "__esModule", { value: true });
var TableBuilder_1 = __webpack_require__(62);
var Fake_1 = __webpack_require__(11);
var MockEnvironment_1 = __webpack_require__(2);
var Core_1 = __webpack_require__(9);
function TableBuilderTest() {
    var _this = this;
    describe('TableBuilder', function () {
        describe('when building thumbnail cells', function () {
            var result;
            var env;
            var thumbnailInfo;
            beforeEach(function () {
                result = Fake_1.FakeResults.createFakeResult();
                env = new MockEnvironment_1.MockEnvironmentBuilder().build();
                thumbnailInfo = TableBuilder_1.TableBuilder.thumbnailCell(result, env);
            });
            it('content should contain the result', function () {
                expect(thumbnailInfo.Document.content.result).toBe(result);
            });
            it('content should contain the environment bindings', function () {
                expect(thumbnailInfo.Document.content.bindings).toBe(env);
            });
            it('should use a specific cell renderer class', function () {
                expect(thumbnailInfo.Document.cellRenderer).toBe(TableBuilder_1.ThumbnailHtmlRenderer);
            });
            it('should not offer quick filtering options', function () {
                expect(thumbnailInfo.Document.getQuickFilterText(null)).toBe('');
            });
        });
        describe('when build a table', function () {
            var table;
            beforeEach(function () {
                table = Core_1.$$('div');
            });
            it('should correctly build a single column and a single row', function (done) { return __awaiter(_this, void 0, void 0, function () {
                var built;
                return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0: return [4 /*yield*/, new TableBuilder_1.TableBuilder().build([
                                {
                                    Foo: {
                                        content: 'bar'
                                    }
                                }
                            ], table)];
                        case 1:
                            built = _a.sent();
                            expect(built.gridOptions.rowData.length).toBe(1);
                            expect(built.gridOptions.rowData[0].Foo).toBe('bar');
                            expect(built.gridOptions.columnDefs.length).toBe(1);
                            expect(built.gridOptions.columnDefs[0].headerName).toBe('Foo');
                            done();
                            return [2 /*return*/];
                    }
                });
            }); });
            it('should correctly build a single row with multiple columns', function (done) { return __awaiter(_this, void 0, void 0, function () {
                var built;
                return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0: return [4 /*yield*/, new TableBuilder_1.TableBuilder().build([
                                {
                                    Foo: {
                                        content: 'bar'
                                    },
                                    Bazz: {
                                        content: 'buzz'
                                    }
                                }
                            ], table)];
                        case 1:
                            built = _a.sent();
                            expect(built.gridOptions.rowData.length).toBe(1);
                            expect(built.gridOptions.rowData[0].Foo).toBe('bar');
                            expect(built.gridOptions.rowData[0].Bazz).toBe('buzz');
                            expect(built.gridOptions.columnDefs.length).toBe(2);
                            done();
                            return [2 /*return*/];
                    }
                });
            }); });
            it('should correctly build multiple row with multiple columns', function (done) { return __awaiter(_this, void 0, void 0, function () {
                var built;
                return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0: return [4 /*yield*/, new TableBuilder_1.TableBuilder().build([
                                {
                                    Foo: {
                                        content: 'bar'
                                    },
                                    Bazz: {
                                        content: 'buzz'
                                    }
                                },
                                {
                                    Foo: {
                                        content: 'bar2'
                                    },
                                    Bazz: {
                                        content: 'buzz2'
                                    }
                                }
                            ], table)];
                        case 1:
                            built = _a.sent();
                            expect(built.gridOptions.rowData.length).toBe(2);
                            expect(built.gridOptions.rowData[0].Foo).toBe('bar');
                            expect(built.gridOptions.rowData[0].Bazz).toBe('buzz');
                            expect(built.gridOptions.rowData[1].Foo).toBe('bar2');
                            expect(built.gridOptions.rowData[1].Bazz).toBe('buzz2');
                            expect(built.gridOptions.columnDefs.length).toBe(2);
                            done();
                            return [2 /*return*/];
                    }
                });
            }); });
            it('should be able to render children in a row', function (done) { return __awaiter(_this, void 0, void 0, function () {
                var built;
                return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0: return [4 /*yield*/, new TableBuilder_1.TableBuilder().build([
                                {
                                    Foo: {
                                        children: [
                                            {
                                                Bar: {
                                                    content: 'buzz'
                                                },
                                                Bazz: {
                                                    content: 'qwerty'
                                                }
                                            }
                                        ]
                                    }
                                }
                            ], table)];
                        case 1:
                            built = _a.sent();
                            expect(built.gridOptions.columnDefs.length).toBe(1);
                            expect(built.gridOptions.columnDefs[0].headerName).toBe('Foo');
                            expect(built.gridOptions.columnDefs[0]['children'].length).toBe(2);
                            expect(built.gridOptions.columnDefs[0]['children'][0].headerName).toBe('Bar');
                            expect(built.gridOptions.columnDefs[0]['children'][1].headerName).toBe('Bazz');
                            done();
                            return [2 /*return*/];
                    }
                });
            }); });
        });
    });
}
exports.TableBuilderTest = TableBuilderTest;
 
 
/***/ }),
/* 1749 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var TableBuilder_1 = __webpack_require__(62);
var Fake_1 = __webpack_require__(11);
var MockEnvironment_1 = __webpack_require__(2);
var Test_1 = __webpack_require__(40);
var ResultList_1 = __webpack_require__(68);
function ThumbnailHtmlRendererTest() {
    describe('ThumbnailHtmlRenderer', function () {
        it('should render default output if there is no element to render', function () {
            var thumbnailHtmlRenderer = new TableBuilder_1.ThumbnailHtmlRenderer();
            thumbnailHtmlRenderer.init();
            expect(function () { return thumbnailHtmlRenderer.getGui(); }).not.toThrow();
            expect(thumbnailHtmlRenderer.getGui().textContent).toBe('-- NULL --');
        });
        describe('with a result and an environment bindings', function () {
            var result;
            var bindings;
            var fakeGridAPI;
            beforeEach(function () {
                result = Fake_1.FakeResults.createFakeResult();
                bindings = new MockEnvironment_1.MockEnvironmentBuilder().build();
                fakeGridAPI = {
                    filterManager: {
                        quickFilter: ''
                    }
                };
            });
            it('should render a default result link if there is no result list available', function () {
                var thumbnailHtmlRenderer = new TableBuilder_1.ThumbnailHtmlRenderer();
                thumbnailHtmlRenderer.init({
                    value: {
                        result: result,
                        bindings: bindings
                    },
                    api: fakeGridAPI
                });
                var built = thumbnailHtmlRenderer.getGui();
                expect(Test_1.$$(built).find('.CoveoResultLink')).toBeDefined();
            });
            it('should render using the result list if available', function () {
                var resultList = new ResultList_1.ResultList(Test_1.$$('div').el, null, bindings);
                spyOn(resultList, 'buildResult').and.callThrough();
                bindings.searchInterface.getComponents = function (cmp) { return [resultList]; };
                var thumbnailHtmlRenderer = new TableBuilder_1.ThumbnailHtmlRenderer();
                thumbnailHtmlRenderer.init({
                    value: {
                        result: result,
                        bindings: bindings
                    },
                    api: fakeGridAPI
                });
                thumbnailHtmlRenderer.getGui();
                expect(resultList.buildResult).toHaveBeenCalledWith(result);
            });
            it('should highlight html built HTMLElement with the current filter', function () {
                fakeGridAPI.filterManager.quickFilter = result.title;
                var thumbnailHtmlRenderer = new TableBuilder_1.ThumbnailHtmlRenderer();
                thumbnailHtmlRenderer.init({
                    value: {
                        result: result,
                        bindings: bindings
                    },
                    api: fakeGridAPI
                });
                var built = thumbnailHtmlRenderer.getGui();
                expect(Test_1.$$(built).find('.coveo-relevance-inspector-highlight')).toBeDefined();
            });
        });
    });
}
exports.ThumbnailHtmlRendererTest = ThumbnailHtmlRendererTest;
 
 
/***/ }),
/* 1750 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var TableBuilder_1 = __webpack_require__(62);
var Test_1 = __webpack_require__(40);
function GenericHtmlRendererTest() {
    describe('GenericHtmlRenderer', function () {
        it('should render a default output when there is nothing to render', function () {
            var htmlRenderer = new TableBuilder_1.GenericHtmlRenderer();
            htmlRenderer.init();
            var built = htmlRenderer.getGui();
            expect(built.textContent).toBe('-- NULL --');
        });
        it('should render the correct output with an HTML element', function () {
            var htmlRenderer = new TableBuilder_1.GenericHtmlRenderer();
            htmlRenderer.init({
                value: Test_1.$$('div', { className: 'foo' }).el,
                api: { filterManager: { quickFilter: '' } }
            });
            var built = htmlRenderer.getGui();
            expect(Test_1.$$(built).find('.foo')).toBeDefined();
        });
        it("should highlight the HTML element if there's a filter", function () {
            var htmlRenderer = new TableBuilder_1.GenericHtmlRenderer();
            htmlRenderer.init({
                value: Test_1.$$('div', { className: 'foo' }, 'Hello World').el,
                api: { filterManager: { quickFilter: 'World' } }
            });
            var built = htmlRenderer.getGui();
            expect(Test_1.$$(built).find('.coveo-highlight')).toBeDefined();
        });
    });
}
exports.GenericHtmlRendererTest = GenericHtmlRendererTest;
 
 
/***/ }),
/* 1751 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { Iif (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        Iif (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            Iif (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
            Iif (y = 0, t) op = [0, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    Eif (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        Iif (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
Object.defineProperty(exports, "__esModule", { value: true });
var MockEnvironment_1 = __webpack_require__(2);
var AvailableFieldsTable_1 = __webpack_require__(228);
var underscore_1 = __webpack_require__(1);
function AvailableFieldsTableTest() {
    var _this = this;
    describe('AvailableFieldsTable', function () {
        var bindings;
        var spy;
        beforeEach(function () {
            bindings = new MockEnvironment_1.MockEnvironmentBuilder().build();
            var fieldsDescription = [
                {
                    name: 'foo',
                    defaultValue: null,
                    description: 'foo',
                    fieldSourceType: null,
                    fieldType: 'String',
                    groupByField: true,
                    includeInQuery: true,
                    includeInResults: true,
                    sortByField: true,
                    splitGroupByField: true,
                    type: 'String'
                },
                {
                    name: 'bar',
                    defaultValue: null,
                    description: 'bar',
                    fieldSourceType: null,
                    fieldType: 'Double',
                    groupByField: false,
                    includeInQuery: false,
                    includeInResults: false,
                    sortByField: false,
                    splitGroupByField: false,
                    type: 'Double'
                }
            ];
            spy = jasmine.createSpy('listFields');
            spy.and.returnValue(fieldsDescription);
            bindings.searchEndpoint.listFields = spy;
        });
        it('should return an element for ag-grid', function (done) { return __awaiter(_this, void 0, void 0, function () {
            var built;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0: return [4 /*yield*/, new AvailableFieldsTable_1.AvailableFieldsTable(bindings).build()];
                    case 1:
                        built = _a.sent();
                        expect(built.find('ag-theme-fresh')).toBeDefined();
                        done();
                        return [2 /*return*/];
                }
            });
        }); });
        it('should call list fields value', function (done) { return __awaiter(_this, void 0, void 0, function () {
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0: return [4 /*yield*/, new AvailableFieldsTable_1.AvailableFieldsTable(bindings).build()];
                    case 1:
                        _a.sent();
                        expect(spy).toHaveBeenCalled();
                        done();
                        return [2 /*return*/];
                }
            });
        }); });
        it('should build the proper underlying ag grid structure', function (done) { return __awaiter(_this, void 0, void 0, function () {
            var fieldTable;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        fieldTable = new AvailableFieldsTable_1.AvailableFieldsTable(bindings);
                        return [4 /*yield*/, fieldTable.build()];
                    case 1:
                        _a.sent();
                        ['Name', 'Description', 'Include In Query', 'Group By Field'].forEach(function (headerName) {
                            expect(underscore_1.findWhere(fieldTable.gridOptions.columnDefs, { headerName: headerName })).toBeDefined();
                        });
                        expect(fieldTable.gridOptions.rowData[0].Name).toBe('foo');
                        expect(fieldTable.gridOptions.rowData[1].Name).toBe('bar');
                        done();
                        return [2 /*return*/];
                }
            });
        }); });
    });
}
exports.AvailableFieldsTableTest = AvailableFieldsTableTest;
 
 
/***/ }),
/* 1752 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var AvailableFieldsTable_1 = __webpack_require__(228);
var MockEnvironment_1 = __webpack_require__(2);
var Test_1 = __webpack_require__(40);
var Fake_1 = __webpack_require__(11);
function AvailableFieldsSampleValueTest() {
    describe('AvailableFieldsSampleValue', function () {
        var container;
        var bindings;
        var description;
        var spyListFields;
        var initAvailableFieldsSampleValue = function () {
            var sampleValues = new AvailableFieldsTable_1.AvailableFieldsSampleValue();
            sampleValues.init({
                value: {
                    content: {
                        description: description,
                        bindings: bindings,
                        container: container
                    }
                }
            });
            return sampleValues;
        };
        beforeEach(function () {
            container = Test_1.$$('div');
            bindings = new MockEnvironment_1.MockEnvironmentBuilder().build();
            spyListFields = jasmine.createSpy('listFields');
            spyListFields.and.returnValue([{ value: '1' }, { value: '2' }]);
            bindings.searchEndpoint.listFieldValues = spyListFields;
            description = Fake_1.FakeResults.createFieldDescription();
        });
        it('should build a button', function () {
            var sampleValues = initAvailableFieldsSampleValue();
            expect(sampleValues.getGui().tagName.toLowerCase()).toBe('button');
        });
        it('should call on list fields on button mouse hover if the field is group by', function () {
            var sampleValues = initAvailableFieldsSampleValue();
            var btn = sampleValues.getGui();
            Test_1.$$(btn).trigger('mouseover');
            expect(spyListFields).toHaveBeenCalledWith({ field: Fake_1.FakeResults.createFieldDescription().name });
        });
        it('should call on search on button mouse hover if the field is not group by', function () {
            description.groupByField = false;
            var spySearch = jasmine.createSpy('search');
            spySearch.and.returnValue(Fake_1.FakeResults.createFakeResult);
            bindings.searchEndpoint.search = spySearch;
            var sampleValues = initAvailableFieldsSampleValue();
            var btn = sampleValues.getGui();
            Test_1.$$(btn).trigger('mouseover');
            expect(bindings.searchEndpoint.search).toHaveBeenCalled();
        });
    });
}
exports.AvailableFieldsSampleValueTest = AvailableFieldsSampleValueTest;
 
 
/***/ }),
/* 1753 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __assign = (this && this.__assign) || Object.assign || function(t) {
    for (var s, i = 1, n = arguments.length; i < n; i++) {
        s = arguments[i];
        for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
            t[p] = s[p];
    }
    return t;
};
Object.defineProperty(exports, "__esModule", { value: true });
var underscore_1 = __webpack_require__(1);
var AvailableFieldsTable_1 = __webpack_require__(228);
function AvailableFieldsDatasourceTest() {
    describe('AvailableFieldsDatasource', function () {
        var dataSource;
        var successSpy;
        var failSpy;
        var fieldsDataSource;
        var getDefaultRowsFiltering = function () {
            return {
                startRow: 0,
                endRow: 50,
                successCallback: successSpy,
                failCallback: failSpy,
                sortModel: null,
                filterModel: null,
                context: null
            };
        };
        beforeEach(function () {
            dataSource = underscore_1.range(0, 50).map(function (iterator) {
                return {
                    value: {
                        content: iterator.toString()
                    }
                };
            });
            successSpy = jasmine.createSpy('successSpy');
            failSpy = jasmine.createSpy('failSpy');
            fieldsDataSource = new AvailableFieldsTable_1.AvailableFieldsDatasource(dataSource);
        });
        it('should be able to filter rows with an end row parameter', function () {
            fieldsDataSource.getRows(__assign({}, getDefaultRowsFiltering(), { startRow: 0, endRow: 10 }));
            var args = successSpy.calls.mostRecent().args[0];
            expect(args[0]).toEqual({ value: '0' });
            expect(args[9]).toEqual({ value: '9' });
            expect(args.length).toBe(10);
        });
        it('should be able to filter rows with a start row parameter', function () {
            fieldsDataSource.getRows(__assign({}, getDefaultRowsFiltering(), { startRow: 40, endRow: 50 }));
            var args = successSpy.calls.mostRecent().args[0];
            expect(args[0]).toEqual({ value: '40' });
            expect(args[9]).toEqual({ value: '49' });
            expect(args.length).toBe(10);
        });
        it('should be able to sort', function () {
            fieldsDataSource.getRows(__assign({}, getDefaultRowsFiltering(), { sortModel: [{ colId: 'value', sort: 'desc' }] }));
            var args = successSpy.calls.mostRecent().args[0];
            expect(args[0]).toEqual({ value: '49' });
            expect(args[49]).toEqual({ value: '0' });
            expect(args.length).toBe(50);
        });
        it('should be able to filter on equals', function () {
            fieldsDataSource.getRows(__assign({}, getDefaultRowsFiltering(), { filterModel: { value: { type: 'equals', filter: '0' } } }));
            var args = successSpy.calls.mostRecent().args[0];
            expect(args[0]).toEqual({ value: '0' });
            expect(args.length).toBe(1);
        });
        it('should be able to filter on notEqual', function () {
            fieldsDataSource.getRows(__assign({}, getDefaultRowsFiltering(), { filterModel: { value: { type: 'notEqual', filter: '0' } } }));
            var args = successSpy.calls.mostRecent().args[0];
            expect(args[0]).not.toEqual({ value: '0' });
            expect(args.length).toBe(49);
        });
        it('should be able to filter on startsWith', function () {
            fieldsDataSource.getRows(__assign({}, getDefaultRowsFiltering(), { filterModel: { value: { type: 'startsWith', filter: '0' } } }));
            var args = successSpy.calls.mostRecent().args[0];
            expect(args[0]).toEqual({ value: '0' });
            expect(args.length).toBe(1);
        });
        it('should be able to filter on endsWith', function () {
            fieldsDataSource.getRows(__assign({}, getDefaultRowsFiltering(), { filterModel: { value: { type: 'endsWith', filter: '0' } } }));
            var args = successSpy.calls.mostRecent().args[0];
            expect(args[0]).toEqual({ value: '0' });
            expect(args[1]).toEqual({ value: '10' });
            expect(args[2]).toEqual({ value: '20' });
        });
        it('should be able to filter on contains', function () {
            fieldsDataSource.getRows(__assign({}, getDefaultRowsFiltering(), { filterModel: { value: { type: 'contains', filter: '0' } } }));
            var args = successSpy.calls.mostRecent().args[0];
            expect(args[0]).toEqual({ value: '0' });
            expect(args[1]).toEqual({ value: '10' });
            expect(args[2]).toEqual({ value: '20' });
        });
        it('should be able to filter on notContains', function () {
            fieldsDataSource.getRows(__assign({}, getDefaultRowsFiltering(), { filterModel: { value: { type: 'notContains', filter: '0' } } }));
            var args = successSpy.calls.mostRecent().args[0];
            expect(args[0]).not.toEqual({ value: '0' });
            expect(args[1]).toEqual({ value: '2' });
            expect(args[2]).toEqual({ value: '3' });
        });
    });
}
exports.AvailableFieldsDatasourceTest = AvailableFieldsDatasourceTest;
 
 
/***/ }),
/* 1754 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var ExecutionReportGenericSection_1 = __webpack_require__(177);
function ExecutionReportGenericSectionTest() {
    describe('ExecutionReportGenericSection', function () {
        var getExecutionReportSection = function () {
            return {
                description: 'a description',
                name: 'a name',
                duration: 123,
                result: { 'a result': 'foo' }
            };
        };
        it('should output a description section', function () {
            var Description = new ExecutionReportGenericSection_1.ExecutionReportGenericSection().build(getExecutionReportSection()).Description;
            expect(Description.content).toBe('a description');
        });
        it('should output a duration section', function () {
            var Duration = new ExecutionReportGenericSection_1.ExecutionReportGenericSection().build(getExecutionReportSection()).Duration;
            expect(Duration.content).toBe('123 ms');
        });
    });
}
exports.ExecutionReportGenericSectionTest = ExecutionReportGenericSectionTest;
 
 
/***/ }),
/* 1755 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { Iif (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        Iif (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            Iif (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
            Iif (y = 0, t) op = [0, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    Eif (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        Iif (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
Object.defineProperty(exports, "__esModule", { value: true });
var ExecutionReportEffectiveIndexQuerySection_1 = __webpack_require__(643);
var ExecutionReport_1 = __webpack_require__(50);
function ExecutionReportEffectiveIndexQueryTest() {
    var _this = this;
    describe('ExecutionReportEffectiveIndex', function () {
        var getExecutionReportSection = function () {
            return {
                duration: 999,
                children: [
                    {
                        name: 'Send Query To Index',
                        duration: 123,
                        result: {
                            in: {
                                'Step 1': 'foo',
                                'Step 2': ['bar', 'buzz'],
                                RankingOverrides: [{ override: 'one' }, { override: 'two' }],
                                Facets: [{ facet: 'one' }, { facet: 'two' }],
                                RankingExpressions: [{ expression: 'one' }, { expression: 'two' }]
                            }
                        },
                        description: ExecutionReport_1.EXECUTION_REPORT_SECTION.INDEX_QUERY
                    }
                ]
            };
        };
        it('should build the output as a table', function (done) { return __awaiter(_this, void 0, void 0, function () {
            var built;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0: return [4 /*yield*/, new ExecutionReportEffectiveIndexQuerySection_1.ExecutionReportEffectiveIndexQuerySection().build(getExecutionReportSection())];
                    case 1:
                        built = _a.sent();
                        expect(built.container.find('table')).toBeDefined();
                        done();
                        return [2 /*return*/];
                }
            });
        }); });
        it('should output different rows for each section of the index execution report', function (done) { return __awaiter(_this, void 0, void 0, function () {
            var built;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0: return [4 /*yield*/, new ExecutionReportEffectiveIndexQuerySection_1.ExecutionReportEffectiveIndexQuerySection().build(getExecutionReportSection())];
                    case 1:
                        built = _a.sent();
                        expect(built.container.findAll('tr').length).toBe(Object.keys(getExecutionReportSection().children[0].result.in).length);
                        done();
                        return [2 /*return*/];
                }
            });
        }); });
        it('should output a button that will allow to toggle collapse for specific section of the report', function (done) { return __awaiter(_this, void 0, void 0, function () {
            var built, allButtons;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0: return [4 /*yield*/, new ExecutionReportEffectiveIndexQuerySection_1.ExecutionReportEffectiveIndexQuerySection().build(getExecutionReportSection())];
                    case 1:
                        built = _a.sent();
                        allButtons = built.container.findAll('button');
                        expect(allButtons.length).toBe(3);
                        expect(allButtons[0].textContent).toBe('RankingOverrides');
                        expect(allButtons[1].textContent).toBe('Facets');
                        expect(allButtons[2].textContent).toBe('RankingExpressions');
                        done();
                        return [2 /*return*/];
                }
            });
        }); });
    });
}
exports.ExecutionReportEffectiveIndexQueryTest = ExecutionReportEffectiveIndexQueryTest;
 
 
/***/ }),
/* 1756 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { Iif (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        Iif (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            Iif (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
            Iif (y = 0, t) op = [0, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    Eif (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        Iif (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
Object.defineProperty(exports, "__esModule", { value: true });
var ExecutionReport_1 = __webpack_require__(50);
var ExecutionReportSimpleSection_1 = __webpack_require__(319);
function ExecutionReportSimpleSectionTest() {
    var _this = this;
    describe('ExecutionReportSimpleSection', function () {
        var getExecutionReportSection = function () {
            return {
                duration: 123,
                children: [
                    {
                        name: ExecutionReport_1.EXECUTION_REPORT_SECTION.PREPROCESS_QUERY_EXPRESSION,
                        duration: 456,
                        result: {},
                        description: ExecutionReport_1.EXECUTION_REPORT_SECTION.PREPROCESS_QUERY_EXPRESSION,
                        children: [
                            {
                                name: ExecutionReport_1.EXECUTION_REPORT_SECTION.THESAURUS,
                                duration: 789,
                                description: 'Thesaurus',
                                result: {},
                                applied: ['foo', 'bar', 'expand foo to bar']
                            }
                        ]
                    }
                ]
            };
        };
        it('should be able to build a simple table using the specified section of the report', function (done) { return __awaiter(_this, void 0, void 0, function () {
            var container;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0: return [4 /*yield*/, new ExecutionReportSimpleSection_1.ExecutionReportSimpleSection(ExecutionReport_1.EXECUTION_REPORT_SECTION.PREPROCESS_QUERY_EXPRESSION, ExecutionReport_1.EXECUTION_REPORT_SECTION.THESAURUS, 'Thesaurus').build(getExecutionReportSection())];
                    case 1:
                        container = (_a.sent()).container;
                        expect(container.find('ag-grid-fresh')).toBeDefined();
                        done();
                        return [2 /*return*/];
                }
            });
        }); });
        it('should be able to build the correct underlying ag grid structure using the specified section of the report', function (done) { return __awaiter(_this, void 0, void 0, function () {
            var gridOptions;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0: return [4 /*yield*/, new ExecutionReportSimpleSection_1.ExecutionReportSimpleSection(ExecutionReport_1.EXECUTION_REPORT_SECTION.PREPROCESS_QUERY_EXPRESSION, ExecutionReport_1.EXECUTION_REPORT_SECTION.THESAURUS, 'Thesaurus').build(getExecutionReportSection())];
                    case 1:
                        gridOptions = (_a.sent()).gridOptions;
                        expect(gridOptions.rowData[0].Description).toBe('Thesaurus');
                        expect(gridOptions.rowData[0].Duration).toBe('789 ms');
                        done();
                        return [2 /*return*/];
                }
            });
        }); });
        it('should be able to output a generic message if a section is not found in the report', function (done) { return __awaiter(_this, void 0, void 0, function () {
            var gridOptions;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0: return [4 /*yield*/, new ExecutionReportSimpleSection_1.ExecutionReportSimpleSection(ExecutionReport_1.EXECUTION_REPORT_SECTION.PREPROCESS_QUERY, ExecutionReport_1.EXECUTION_REPORT_SECTION.STOP_WORDS, 'Stop Words').build(getExecutionReportSection())];
                    case 1:
                        gridOptions = (_a.sent()).gridOptions;
                        expect(gridOptions.rowData[0]['Stop Words']).toContain('NO DATA AVAILABLE');
                        done();
                        return [2 /*return*/];
                }
            });
        }); });
    });
}
exports.ExecutionReportSimpleSectionTest = ExecutionReportSimpleSectionTest;
 
 
/***/ }),
/* 1757 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { Iif (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        Iif (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            Iif (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
            Iif (y = 0, t) op = [0, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    Eif (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        Iif (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
Object.defineProperty(exports, "__esModule", { value: true });
var ExecutionReport_1 = __webpack_require__(50);
var ExecutionReportResolvedPipelineSection_1 = __webpack_require__(641);
function ExecutionReportResolvedPipelineSectionTest() {
    var _this = this;
    describe('ExecutionReportResolvedPipeline', function () {
        var getExecutionReportSection = function () {
            return {
                duration: 123,
                children: [
                    {
                        name: ExecutionReport_1.EXECUTION_REPORT_SECTION.RESOLVE_PIPELINE,
                        duration: 456,
                        result: {
                            pipeline: 'A Pipeline',
                            splitTest: 'A Split Test'
                        },
                        description: 'A pipeline was resolved'
                    }
                ]
            };
        };
        it('should output an ag grid element as a container', function (done) { return __awaiter(_this, void 0, void 0, function () {
            var container;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0: return [4 /*yield*/, new ExecutionReportResolvedPipelineSection_1.ExecutionReportResolvedPipelineSection().build(getExecutionReportSection())];
                    case 1:
                        container = (_a.sent()).container;
                        expect(container.find('ag-grid-fresh')).toBeDefined();
                        done();
                        return [2 /*return*/];
                }
            });
        }); });
        it('should output a valid underlying data structure for ag grid', function (done) { return __awaiter(_this, void 0, void 0, function () {
            var gridOptions;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0: return [4 /*yield*/, new ExecutionReportResolvedPipelineSection_1.ExecutionReportResolvedPipelineSection().build(getExecutionReportSection())];
                    case 1:
                        gridOptions = (_a.sent()).gridOptions;
                        expect(gridOptions.rowData[0].Description).toBe('A pipeline was resolved');
                        expect(gridOptions.rowData[0].Duration).toBe('456 ms');
                        expect(gridOptions.rowData[0].Pipeline).toBe('A Pipeline');
                        expect(gridOptions.rowData[0]['Split Test']).toBe('A Split Test');
                        done();
                        return [2 /*return*/];
                }
            });
        }); });
    });
}
exports.ExecutionReportResolvedPipelineSectionTest = ExecutionReportResolvedPipelineSectionTest;
 
 
/***/ }),
/* 1758 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { Iif (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        Iif (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            Iif (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
            Iif (y = 0, t) op = [0, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    Eif (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        Iif (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
Object.defineProperty(exports, "__esModule", { value: true });
var ExecutionReportRankingModifiers_1 = __webpack_require__(644);
var MockEnvironment_1 = __webpack_require__(2);
var Fake_1 = __webpack_require__(11);
function ExecutionReportRankingModifiersTest() {
    var _this = this;
    describe('ExecutionReportRankingModifiers', function () {
        var results;
        var rankingExpressions;
        var bindings;
        beforeEach(function () {
            bindings = new MockEnvironment_1.MockEnvironmentBuilder().build();
            results = Fake_1.FakeResults.createFakeResults().results;
            rankingExpressions = [
                {
                    expression: '@expression1',
                    modifier: '100'
                }
            ];
        });
        it('should output an ag grid element as a container', function (done) { return __awaiter(_this, void 0, void 0, function () {
            var container;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0: return [4 /*yield*/, new ExecutionReportRankingModifiers_1.ExecutionReportRankingModifiers().build(results, rankingExpressions, bindings)];
                    case 1:
                        container = (_a.sent()).container;
                        expect(container.find('ag-grid-fresh')).toBeDefined();
                        done();
                        return [2 /*return*/];
                }
            });
        }); });
        it('should output a valid underlying ag grid data structure when the ranking expression is generic', function (done) { return __awaiter(_this, void 0, void 0, function () {
            var gridOptions;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0: return [4 /*yield*/, new ExecutionReportRankingModifiers_1.ExecutionReportRankingModifiers().build(results, rankingExpressions, bindings)];
                    case 1:
                        gridOptions = (_a.sent()).gridOptions;
                        expect(gridOptions.rowData[0].Expression).toBe('@expression1');
                        expect(gridOptions.rowData[0].Modifier).toBe('100');
                        expect(gridOptions.rowData[0].ReturnedByIndexForCurrentQuery).toBe('-- NULL --');
                        expect(gridOptions.rowData[0].IsRecommendation).toBe('-- NULL --');
                        expect(gridOptions.rowData[0].Document.result).toBeNull();
                        done();
                        return [2 /*return*/];
                }
            });
        }); });
        describe('when the ranking expression matches a machine learning automatic boost', function () {
            beforeEach(function () {
                rankingExpressions = [
                    {
                        expression: '@permanentid=qwerty',
                        modifier: '200'
                    }
                ];
            });
            it('when theres a result in the result set for that boost, it should build a valid underlying ag grid data structure', function (done) { return __awaiter(_this, void 0, void 0, function () {
                var gridOptions;
                return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0:
                            results[0].raw.permanentid = 'qwerty';
                            results[0].isRecommendation = true;
                            return [4 /*yield*/, new ExecutionReportRankingModifiers_1.ExecutionReportRankingModifiers().build(results, rankingExpressions, bindings)];
                        case 1:
                            gridOptions = (_a.sent()).gridOptions;
                            expect(gridOptions.rowData[0].Document.result).toBe(results[0]);
                            expect(gridOptions.rowData[0].ReturnedByIndexForCurrentQuery).toBe('true');
                            expect(gridOptions.rowData[0].IsRecommendation).toBe('true');
                            done();
                            return [2 /*return*/];
                    }
                });
            }); });
            it('when theres no result in the result set for that boost it should launch a query to retrieve it', function (done) { return __awaiter(_this, void 0, void 0, function () {
                var spy, fakeResults;
                return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0:
                            spy = jasmine.createSpy('searchSpy');
                            fakeResults = Fake_1.FakeResults.createFakeResults();
                            spy.and.returnValue(Promise.resolve(fakeResults));
                            bindings.searchEndpoint.search = spy;
                            return [4 /*yield*/, new ExecutionReportRankingModifiers_1.ExecutionReportRankingModifiers().build(results, rankingExpressions, bindings)];
                        case 1:
                            _a.sent();
                            expect(bindings.searchEndpoint.search).toHaveBeenCalledWith(jasmine.objectContaining({
                                aq: '@permanentid=qwerty'
                            }));
                            done();
                            return [2 /*return*/];
                    }
                });
            }); });
        });
    });
}
exports.ExecutionReportRankingModifiersTest = ExecutionReportRankingModifiersTest;
 
 
/***/ }),
/* 1759 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { Iif (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        Iif (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            Iif (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
            Iif (y = 0, t) op = [0, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    Eif (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        Iif (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
Object.defineProperty(exports, "__esModule", { value: true });
var ExecutionReportQueryOverrideSection_1 = __webpack_require__(642);
var ExecutionReport_1 = __webpack_require__(50);
function ExecutionReportQueryOverrideSectionTest() {
    var _this = this;
    describe('ExecutionReportQueryOverrideSection', function () {
        var getExecutionReportSection = function () {
            return {
                duration: 123,
                children: [
                    {
                        name: ExecutionReport_1.EXECUTION_REPORT_SECTION.QUERY_PARAM_OVERRIDE,
                        duration: 456,
                        applied: ['The first override', 'The second override'],
                        result: {},
                        description: 'A Query Override was applied'
                    }
                ]
            };
        };
        it('should output an ag grid element as a container', function (done) { return __awaiter(_this, void 0, void 0, function () {
            var container;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0: return [4 /*yield*/, new ExecutionReportQueryOverrideSection_1.ExecutionReportQueryOverrideSection().build(getExecutionReportSection())];
                    case 1:
                        container = (_a.sent()).container;
                        expect(container.find('ag-grid-fresh')).toBeDefined();
                        done();
                        return [2 /*return*/];
                }
            });
        }); });
        it('should output a valid underlying ag grid data structure', function (done) { return __awaiter(_this, void 0, void 0, function () {
            var gridOptions;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0: return [4 /*yield*/, new ExecutionReportQueryOverrideSection_1.ExecutionReportQueryOverrideSection().build(getExecutionReportSection())];
                    case 1:
                        gridOptions = (_a.sent()).gridOptions;
                        expect(gridOptions.rowData[0].Applied).toContain('The first override');
                        expect(gridOptions.rowData[0].Applied).toContain('The second override');
                        expect(gridOptions.rowData[0].Description).toBe('A Query Override was applied');
                        done();
                        return [2 /*return*/];
                }
            });
        }); });
    });
}
exports.ExecutionReportQueryOverrideSectionTest = ExecutionReportQueryOverrideSectionTest;
 
 
/***/ }),
/* 1760 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { Iif (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        Iif (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            Iif (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
            Iif (y = 0, t) op = [0, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    Eif (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        Iif (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
Object.defineProperty(exports, "__esModule", { value: true });
var ExecutionReportAuthenticationSection_1 = __webpack_require__(640);
var ExecutionReport_1 = __webpack_require__(50);
function ExecutionReportAuthenticationSectionTest() {
    var _this = this;
    var getExecutionReportSection = function () {
        return {
            duration: 123,
            children: [
                {
                    name: ExecutionReport_1.EXECUTION_REPORT_SECTION.PERFORM_AUTHENTICATION,
                    duration: 456,
                    configured: {
                        primary: 'CloudToken',
                        secondary: ['sso'],
                        mandatory: []
                    },
                    result: {
                        userIds: [
                            {
                                name: 'bob',
                                provider: 'email',
                                info: {},
                                kind: 'User'
                            }
                        ],
                        userGroups: [],
                        queryRestrictions: {
                            pipeline: 'a pipeline',
                            filter: 'a filter'
                        },
                        roles: ['queryExecutor']
                    },
                    description: 'Perform Authentication'
                }
            ]
        };
    };
    describe('ExecutionReportAuthenticationSection', function () {
        it('should output an ag grid element as a container', function (done) { return __awaiter(_this, void 0, void 0, function () {
            var container;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0: return [4 /*yield*/, new ExecutionReportAuthenticationSection_1.ExecutionReportAuthenticationSection().build(getExecutionReportSection())];
                    case 1:
                        container = (_a.sent()).container;
                        expect(container.find('ag-grid-fresh')).toBeDefined();
                        done();
                        return [2 /*return*/];
                }
            });
        }); });
        it('should ouput a valid underlying ag grid data structure for each user ids', function (done) { return __awaiter(_this, void 0, void 0, function () {
            var gridOptions, usersIdsColumn;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0: return [4 /*yield*/, new ExecutionReportAuthenticationSection_1.ExecutionReportAuthenticationSection().build(getExecutionReportSection())];
                    case 1:
                        gridOptions = (_a.sent()).gridOptions;
                        usersIdsColumn = gridOptions.columnDefs[3]['children'][0];
                        expect(usersIdsColumn.children.length).toBe(1);
                        expect(usersIdsColumn.children[0].headerName).toBe('bob');
                        expect(usersIdsColumn.children[0].children[0].headerName).toBe('Kind');
                        expect(usersIdsColumn.children[0].children[1].headerName).toBe('Provider');
                        expect(usersIdsColumn.children[0].children[2].headerName).toBe('Info');
                        done();
                        return [2 /*return*/];
                }
            });
        }); });
        it('should output a valid underlying ag grid data structure for the query restriction', function (done) { return __awaiter(_this, void 0, void 0, function () {
            var gridOptions, pipelineRestrictionColumn;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0: return [4 /*yield*/, new ExecutionReportAuthenticationSection_1.ExecutionReportAuthenticationSection().build(getExecutionReportSection())];
                    case 1:
                        gridOptions = (_a.sent()).gridOptions;
                        pipelineRestrictionColumn = gridOptions.columnDefs[3]['children'][1];
                        expect(pipelineRestrictionColumn.headerName).toBe('Query restriction');
                        expect(pipelineRestrictionColumn.children.length).toBe(2);
                        expect(pipelineRestrictionColumn.children[0].headerName).toBe('pipeline');
                        expect(pipelineRestrictionColumn.children[0].content).toBe('a pipeline');
                        expect(pipelineRestrictionColumn.children[1].headerName).toBe('filter');
                        expect(pipelineRestrictionColumn.children[1].content).toBe('a filter');
                        done();
                        return [2 /*return*/];
                }
            });
        }); });
    });
}
exports.ExecutionReportAuthenticationSectionTest = ExecutionReportAuthenticationSectionTest;
 
 
/***/ }),
/* 1761 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { Iif (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        Iif (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            Iif (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
            Iif (y = 0, t) op = [0, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    Eif (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        Iif (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
Object.defineProperty(exports, "__esModule", { value: true });
var ExecutionReport_1 = __webpack_require__(50);
var ExecutionReportITDSection_1 = __webpack_require__(645);
var Core_1 = __webpack_require__(9);
var util_1 = __webpack_require__(404);
function ExecutionReportITDSectionTest() {
    var _this = this;
    describe('ExecutionReportITDSection', function () {
        var getExecutionReportSection = function (childSection, lq) {
            return {
                duration: 123,
                children: [
                    {
                        name: ExecutionReport_1.EXECUTION_REPORT_SECTION.PREPROCESS_QUERY,
                        duration: 456,
                        result: {
                            in: {
                                lq: lq
                            }
                        },
                        description: 'Preprocess query',
                        children: util_1.isArray(childSection) ? childSection : [childSection]
                    }
                ]
            };
        };
        var getExecutionReportSectionForITD = function (refinedQueries) {
            return {
                description: 'MLExtraction',
                duration: 789,
                name: ExecutionReport_1.EXECUTION_REPORT_SECTION.TOP_CLICKS,
                result: {},
                refinedQueries: refinedQueries
            };
        };
        var getKeywordExtractedRowData = function (gridOptions) {
            return gridOptions.rowData[0]['Keyword(s) extracted'];
        };
        var getLongQueryRecall = function (gridOptions) {
            return gridOptions.rowData[0]['Original large query'];
        };
        describe('when dealing with ML keywords extraction', function () {
            it('should output an ag grid element as a container', function (done) { return __awaiter(_this, void 0, void 0, function () {
                var container;
                return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0: return [4 /*yield*/, new ExecutionReportITDSection_1.ExecutionReportITDSection().build(getExecutionReportSection(getExecutionReportSectionForITD([]), ''))];
                        case 1:
                            container = (_a.sent()).container;
                            expect(container.find('ag-grid-fresh')).toBeDefined();
                            done();
                            return [2 /*return*/];
                    }
                });
            }); });
            it('should output a fallback if the long query is empty', function (done) { return __awaiter(_this, void 0, void 0, function () {
                var container;
                return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0: return [4 /*yield*/, new ExecutionReportITDSection_1.ExecutionReportITDSection().build(getExecutionReportSection(getExecutionReportSectionForITD([]), ''))];
                        case 1:
                            container = (_a.sent()).container;
                            expect(container.text()).toContain('NO DATA AVAILABLE');
                            done();
                            return [2 /*return*/];
                    }
                });
            }); });
            it('should output a fallback if the long query is not empty but no refined query was identified by ML', function (done) { return __awaiter(_this, void 0, void 0, function () {
                var gridOptions;
                return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0: return [4 /*yield*/, new ExecutionReportITDSection_1.ExecutionReportITDSection().build(getExecutionReportSection(getExecutionReportSectionForITD([]), 'the long query is not empty'))];
                        case 1:
                            gridOptions = (_a.sent()).gridOptions;
                            expect(getKeywordExtractedRowData(gridOptions).text()).toContain('No keywords were extracted');
                            done();
                            return [2 /*return*/];
                    }
                });
            }); });
            describe('with keywords extracted', function () {
                var execReport;
                beforeEach(function () {
                    execReport = getExecutionReportSection(getExecutionReportSectionForITD([{ q: 'query', score: 0.9 }, { q: 'long', score: 0.5 }]), 'the long query is not empty');
                });
                it('should output the keywords extracted if available', function (done) { return __awaiter(_this, void 0, void 0, function () {
                    var gridOptions;
                    return __generator(this, function (_a) {
                        switch (_a.label) {
                            case 0: return [4 /*yield*/, new ExecutionReportITDSection_1.ExecutionReportITDSection().build(execReport)];
                            case 1:
                                gridOptions = (_a.sent()).gridOptions;
                                expect(getKeywordExtractedRowData(gridOptions).text()).toContain('performed using Coveo Machine Learning');
                                expect(getKeywordExtractedRowData(gridOptions).text()).toContain('Keyword: query');
                                expect(getKeywordExtractedRowData(gridOptions).text()).toContain('Score: 0.9');
                                expect(getKeywordExtractedRowData(gridOptions).text()).toContain('Keyword: long');
                                expect(getKeywordExtractedRowData(gridOptions).text()).toContain('Score: 0.5');
                                done();
                                return [2 /*return*/];
                        }
                    });
                }); });
                it('should highlight the keywords extracted if available', function (done) { return __awaiter(_this, void 0, void 0, function () {
                    var gridOptions;
                    return __generator(this, function (_a) {
                        switch (_a.label) {
                            case 0: return [4 /*yield*/, new ExecutionReportITDSection_1.ExecutionReportITDSection().build(execReport)];
                            case 1:
                                gridOptions = (_a.sent()).gridOptions;
                                expect(getLongQueryRecall(gridOptions)).toContain(Core_1.StreamHighlightUtils.highlightStreamText('the long query is not empty', { query: [], long: [] }, {}));
                                done();
                                return [2 /*return*/];
                        }
                    });
                }); });
            });
        });
        describe('when dealing with index partial match', function () {
            var getExecutionReportSectionForPartialMatch = function (partialMatchApplied) {
                return [
                    {
                        description: 'PartialMatch',
                        duration: 789,
                        name: ExecutionReport_1.EXECUTION_REPORT_SECTION.PARTIAL_MATCH,
                        result: {
                            out: partialMatchApplied
                        }
                    },
                    getExecutionReportSectionForITD([])
                ];
            };
            it('should output a fallback if the long query is empty', function (done) { return __awaiter(_this, void 0, void 0, function () {
                var execReport, container;
                return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0:
                            execReport = getExecutionReportSection(getExecutionReportSectionForPartialMatch(''), '');
                            return [4 /*yield*/, new ExecutionReportITDSection_1.ExecutionReportITDSection().build(execReport)];
                        case 1:
                            container = (_a.sent()).container;
                            expect(container.text()).toContain('NO DATA AVAILABLE');
                            done();
                            return [2 /*return*/];
                    }
                });
            }); });
            it('should output a fallback if the long query is not empty but no partial match was executed by the index', function (done) { return __awaiter(_this, void 0, void 0, function () {
                var gridOptions;
                return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0: return [4 /*yield*/, new ExecutionReportITDSection_1.ExecutionReportITDSection().build(getExecutionReportSection(getExecutionReportSectionForPartialMatch(''), 'the long query is not empty'))];
                        case 1:
                            gridOptions = (_a.sent()).gridOptions;
                            expect(getKeywordExtractedRowData(gridOptions).text()).toContain('No keywords were extracted');
                            done();
                            return [2 /*return*/];
                    }
                });
            }); });
            it('should output a fallback if the long query is not empty but partial match is not matching an actual partial match query expression', function (done) { return __awaiter(_this, void 0, void 0, function () {
                var gridOptions;
                return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0: return [4 /*yield*/, new ExecutionReportITDSection_1.ExecutionReportITDSection().build(getExecutionReportSection(getExecutionReportSectionForPartialMatch('this is not a partial match query expression'), 'the long query is not empty'))];
                        case 1:
                            gridOptions = (_a.sent()).gridOptions;
                            expect(getKeywordExtractedRowData(gridOptions).text()).toContain('No keywords were extracted');
                            done();
                            return [2 /*return*/];
                    }
                });
            }); });
            it('should output the partial match query expression performed by the index', function (done) { return __awaiter(_this, void 0, void 0, function () {
                var partialMatchQueryExpression, gridOptions;
                return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0:
                            partialMatchQueryExpression = 'PartialMatch(keywords=a couple of random keywords; match=50%; pick=Unspecified(); stopWords=; noRanking=false; noHighlight=false)';
                            return [4 /*yield*/, new ExecutionReportITDSection_1.ExecutionReportITDSection().build(getExecutionReportSection(getExecutionReportSectionForPartialMatch(partialMatchQueryExpression), 'the long query is not empty'))];
                        case 1:
                            gridOptions = (_a.sent()).gridOptions;
                            expect(getKeywordExtractedRowData(gridOptions).text()).toContain('Fallback on Coveo Index partial match feature');
                            expect(getKeywordExtractedRowData(gridOptions).text()).toContain(partialMatchQueryExpression);
                            done();
                            return [2 /*return*/];
                    }
                });
            }); });
        });
    });
}
exports.ExecutionReportITDSectionTest = ExecutionReportITDSectionTest;
 
 
/***/ }),
/* 1762 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { Iif (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        Iif (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            Iif (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
            Iif (y = 0, t) op = [0, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    Eif (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        Iif (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
Object.defineProperty(exports, "__esModule", { value: true });
var ExecutionReport_1 = __webpack_require__(50);
var MockEnvironment_1 = __webpack_require__(2);
var Fake_1 = __webpack_require__(11);
function ExecutionReportTest() {
    var _this = this;
    describe('ExecutionReport', function () {
        var bindings;
        var results;
        var getExecutionReport = function () {
            return {
                children: [],
                duration: 123
            };
        };
        beforeEach(function () {
            bindings = new MockEnvironment_1.MockEnvironmentBuilder().build();
            results = Fake_1.FakeResults.createFakeResults();
            results.executionReport = getExecutionReport();
        });
        it('should be able to build a standard section header element', function () {
            var _a = ExecutionReport_1.ExecutionReport.standardSectionHeader('foo'), agGridElement = _a.agGridElement, container = _a.container;
            expect(container.find('h4').textContent).toBe('foo');
            expect(agGridElement.hasClass('ag-theme-fresh')).toBeTruthy();
        });
        it('should build a top level container', function (done) { return __awaiter(_this, void 0, void 0, function () {
            var built;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0: return [4 /*yield*/, new ExecutionReport_1.ExecutionReport(results, bindings).build()];
                    case 1:
                        built = _a.sent();
                        expect(built.hasClass('execution-report-debug')).toBeTruthy();
                        done();
                        return [2 /*return*/];
                }
            });
        }); });
        it('should not throw if there is no execution report available on the results', function (done) {
            delete results.executionReport;
            expect(function () { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0: return [4 /*yield*/, new ExecutionReport_1.ExecutionReport(results, bindings).build()];
                    case 1: return [2 /*return*/, _a.sent()];
                }
            }); }); }).not.toThrow();
            done();
        });
        it('should expose a grid option with an API to resize all the child grids at the same time', function (done) { return __awaiter(_this, void 0, void 0, function () {
            var execReport;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        execReport = new ExecutionReport_1.ExecutionReport(results, bindings);
                        return [4 /*yield*/, execReport.build()];
                    case 1:
                        _a.sent();
                        expect(execReport.gridOptions.api).toBeDefined();
                        expect(function () { return execReport.gridOptions.api.sizeColumnsToFit(); }).not.toThrow();
                        done();
                        return [2 /*return*/];
                }
            });
        }); });
    });
}
exports.ExecutionReportTest = ExecutionReportTest;
 
 
/***/ }),
/* 1763 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { Iif (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        Iif (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            Iif (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
            Iif (y = 0, t) op = [0, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    Eif (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        Iif (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
Object.defineProperty(exports, "__esModule", { value: true });
var RelevanceInspector_1 = __webpack_require__(315);
var MockEnvironment_1 = __webpack_require__(2);
var Test_1 = __webpack_require__(40);
var Simulate_1 = __webpack_require__(15);
var Fake_1 = __webpack_require__(11);
function RelevanceInspectorTest() {
    var _this = this;
    describe('RelevanceInspector', function () {
        var bindings;
        var button;
        var inspector;
        var modalBox;
        beforeEach(function () {
            bindings = new MockEnvironment_1.MockEnvironmentBuilder().withLiveQueryStateModel().build();
            var listFields = jasmine.createSpy('listFields');
            listFields.and.returnValue(Promise.resolve([]));
            bindings.queryController.getEndpoint().listFields = listFields;
            button = Test_1.$$('button').el;
            inspector = new RelevanceInspector_1.RelevanceInspector(button, bindings);
            modalBox = Simulate_1.Simulate.modalBoxModule();
            inspector.modalBox = modalBox;
        });
        it('should set valid text on the container element', function () {
            expect(button.textContent).toBe('Relevance Inspector');
        });
        it('should open the modal box on click', function () {
            Test_1.$$(button).trigger('click');
            expect(modalBox.open).toHaveBeenCalled();
        });
        it('should be possible to hide the button', function () {
            inspector.hide();
            expect(Test_1.$$(button).hasClass('coveo-hidden')).toBeTruthy();
        });
        it('should be possible to show the button', function () {
            inspector.hide();
            inspector.show();
            expect(Test_1.$$(button).hasClass('coveo-hidden')).toBeFalsy();
        });
        it('should show the button if the state changes to debug=true', function () {
            bindings.queryStateModel.set('debug', false);
            var spy = spyOn(inspector, 'show');
            bindings.queryStateModel.set('debug', true);
            expect(spy).toHaveBeenCalled();
        });
        it('should hide the button if the state changes to debug=false', function () {
            bindings.queryStateModel.set('debug', true);
            var spy = spyOn(inspector, 'hide');
            bindings.queryStateModel.set('debug', false);
            expect(spy).toHaveBeenCalled();
        });
        it('should not be possible to open the modal box two times rapidly', function () {
            inspector.open();
            inspector.open();
            expect(modalBox.open).toHaveBeenCalledTimes(1);
        });
        describe('when there are no results returned from last query', function () {
            var spy;
            beforeEach(function () {
                spy = jasmine.createSpy('spy');
                spy.and.returnValue(Fake_1.FakeResults.createFakeResults(0));
                bindings.queryController.getLastResults = spy;
                inspector = new RelevanceInspector_1.RelevanceInspector(button, bindings);
                inspector.modalBox = modalBox;
            });
            it('should not open the modal box', function (done) { return __awaiter(_this, void 0, void 0, function () {
                return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0: return [4 /*yield*/, inspector.open()];
                        case 1:
                            _a.sent();
                            expect(spy).toHaveBeenCalled();
                            expect(modalBox.close).toHaveBeenCalled();
                            done();
                            return [2 /*return*/];
                    }
                });
            }); });
        });
        describe('when there are results returned from last query but it contains no ranking info', function () {
            var spy;
            beforeEach(function () {
                spy = jasmine.createSpy('spy');
                var results = Fake_1.FakeResults.createFakeResults(10);
                results.results[0].rankingInfo = null;
                spy.and.returnValue(results);
                bindings.queryController.getLastResults = spy;
                inspector = new RelevanceInspector_1.RelevanceInspector(button, bindings);
                inspector.modalBox = modalBox;
            });
            it('should not open the modal box', function (done) { return __awaiter(_this, void 0, void 0, function () {
                return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0: return [4 /*yield*/, inspector.open()];
                        case 1:
                            _a.sent();
                            expect(spy).toHaveBeenCalled();
                            expect(modalBox.close).toHaveBeenCalled();
                            done();
                            return [2 /*return*/];
                    }
                });
            }); });
        });
        describe('when there are results returned from the last query with ranking info', function () {
            var spy;
            var results;
            beforeEach(function () {
                spy = jasmine.createSpy('spy');
                results = Fake_1.FakeResults.createFakeResults(10);
                results.results.forEach(function (result) {
                    result.rankingInfo = Fake_1.FakeResults.createRankingInfoWithKeywords();
                });
                spy.and.returnValue(results);
                bindings.queryController.getLastResults = spy;
                inspector = new RelevanceInspector_1.RelevanceInspector(button, bindings);
                inspector.modalBox = modalBox;
            });
            it('should open the modal box', function (done) { return __awaiter(_this, void 0, void 0, function () {
                return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0: return [4 /*yield*/, inspector.open()];
                        case 1:
                            _a.sent();
                            expect(spy).toHaveBeenCalled();
                            expect(modalBox.open).toHaveBeenCalled();
                            done();
                            return [2 /*return*/];
                    }
                });
            }); });
            it("should not modify the result element on new result displayed if it's not in debug mode", function () {
                bindings.queryStateModel.set('debug', false);
                var element = Test_1.$$('div');
                Test_1.$$(bindings.root).trigger(Test_1.ResultListEvents.newResultDisplayed, {
                    item: element.el
                });
                expect(element.hasClass('coveo-with-inline-ranking-info')).toBeFalsy();
            });
            it("should not modify the result element on new result displayed if it's not in debug mode", function () {
                bindings.queryStateModel.set('debug', false);
                var element = Test_1.$$('div');
                Test_1.$$(bindings.root).trigger(Test_1.ResultListEvents.newResultDisplayed, {
                    item: element.el,
                    result: results.results[0]
                });
                expect(element.hasClass('coveo-with-inline-ranking-info')).toBeFalsy();
            });
            it("should modify the result element on new result displayed if it's in debug mode", function () {
                bindings.queryStateModel.set('debug', true);
                var element = Test_1.$$('div');
                Test_1.$$(bindings.root).trigger(Test_1.ResultListEvents.newResultDisplayed, {
                    item: element.el,
                    result: results.results[0]
                });
                expect(element.hasClass('coveo-with-inline-ranking-info')).toBeTruthy();
            });
        });
    });
}
exports.RelevanceInspectorTest = RelevanceInspectorTest;
 
 
/***/ }),
/* 1764 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __assign = (this && this.__assign) || Object.assign || function(t) {
    for (var s, i = 1, n = arguments.length; i < n; i++) {
        s = arguments[i];
        for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
            t[p] = s[p];
    }
    return t;
};
Object.defineProperty(exports, "__esModule", { value: true });
var MetaDataTable_1 = __webpack_require__(318);
var Fake_1 = __webpack_require__(11);
var Test_1 = __webpack_require__(40);
function FieldValuesRendererTest() {
    describe('FieldValuesRenderer', function () {
        var container;
        var result;
        var setRowHeightSpy;
        var renderer;
        var getInitParams = function () {
            return {
                eParentOfValue: container.el,
                node: { setRowHeight: setRowHeightSpy },
                api: { filterManager: { quickFilter: '' } },
                value: {
                    result: result,
                    fieldsDescription: [
                        {
                            name: '@date',
                            fieldType: 'Date'
                        }
                    ]
                }
            };
        };
        beforeEach(function () {
            container = Test_1.$$('div');
            result = Fake_1.FakeResults.createFakeResult();
            setRowHeightSpy = jasmine.createSpy('spy');
            renderer = new MetaDataTable_1.FieldValuesRenderer();
            renderer.init(getInitParams());
        });
        it('should be able to render a list of fields name and their values', function () {
            var built = renderer.getGui();
            var allFieldNames = Test_1.$$(built).findAll('.coveo-relevance-inspector-metadata-name');
            expect(allFieldNames.length).toBe(Object.keys(result.raw).length);
        });
        it('should format date field values', function () {
            var built = renderer.getGui();
            var allFieldNames = Test_1.$$(built).findAll('.coveo-relevance-inspector-metadata-name');
            var allFieldsValues = Test_1.$$(built).findAll('.coveo-relevance-inspector-metadata-value');
            expect(allFieldNames[1].textContent).toBe('date');
            expect(allFieldsValues[1].textContent).toContain(new Date(result.raw.date).toString());
        });
        describe("when there's a filter on a field name", function () {
            beforeEach(function () {
                renderer.init(__assign({}, getInitParams(), { api: {
                        filterManager: {
                            quickFilter: 'date'
                        }
                    } }));
            });
            it('should highlight the field name in the list', function () {
                var built = renderer.getGui();
                var highlighted = Test_1.$$(built).find('.coveo-relevance-inspector-highlight');
                expect(highlighted).toBeDefined();
                expect(highlighted.textContent).toBe('date');
            });
        });
        describe("when there's a filter on a field value", function () {
            beforeEach(function () {
                renderer.init(__assign({}, getInitParams(), { api: {
                        filterManager: {
                            quickFilter: 'value'
                        }
                    } }));
            });
            it('should highlight the field name in the list', function () {
                var built = renderer.getGui();
                var highlighted = Test_1.$$(built).find('.coveo-relevance-inspector-highlight');
                expect(highlighted).toBeDefined();
                expect(highlighted.textContent).toBe('value');
                expect(highlighted.parentElement.textContent).toBe('string value');
            });
        });
    });
}
exports.FieldValuesRendererTest = FieldValuesRendererTest;
 
 
/***/ }),
/* 1765 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { Iif (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        Iif (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            Iif (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
            Iif (y = 0, t) op = [0, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    Eif (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        Iif (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
Object.defineProperty(exports, "__esModule", { value: true });
var MetaDataTable_1 = __webpack_require__(318);
var Fake_1 = __webpack_require__(11);
var MockEnvironment_1 = __webpack_require__(2);
function MetaDataTableTest() {
    var _this = this;
    describe('MetaDataTable', function () {
        var results;
        var bindings;
        var listFieldSpy;
        beforeEach(function () {
            results = Fake_1.FakeResults.createFakeResults().results;
            bindings = new MockEnvironment_1.MockEnvironmentBuilder().build();
            listFieldSpy = jasmine.createSpy('listField');
            listFieldSpy.and.returnValue([]);
            bindings.searchEndpoint.listFields = listFieldSpy;
        });
        it('should build one ag grid element for each result', function (done) { return __awaiter(_this, void 0, void 0, function () {
            var metadataTable, built;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        metadataTable = new MetaDataTable_1.MetaDataTable(results, bindings);
                        return [4 /*yield*/, metadataTable.build()];
                    case 1:
                        built = _a.sent();
                        expect(built.findAll('.ag-theme-fresh').length).toBe(results.length);
                        done();
                        return [2 /*return*/];
                }
            });
        }); });
    });
}
exports.MetaDataTableTest = MetaDataTableTest;
 
 
/***/ }),
/* 1766 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Fake_1 = __webpack_require__(11);
var Core_1 = __webpack_require__(9);
function QueryUtilsTest() {
    describe('QueryUtils', function () {
        var result;
        beforeEach(function () {
            result = Fake_1.FakeResults.createFakeResult();
        });
        it('should return the collection on a result if available', function () {
            result.raw.collection = 'a collection';
            expect(Core_1.QueryUtils.getCollection(result)).toBe('a collection');
        });
        it('should return default collection if none is available on a result', function () {
            result.raw.collection = null;
            expect(Core_1.QueryUtils.getCollection(result)).toBe('default');
        });
        it('should allow to set property on a result', function () {
            Core_1.QueryUtils.setPropertyOnResult(result, 'foo', 'bar');
            expect(result['foo']).toBe('bar');
        });
        it('should allow to set property on childResults if available', function () {
            result = Fake_1.FakeResults.createFakeResultWithChildResult('result', 5, 10);
            Core_1.QueryUtils.setPropertyOnResult(result, 'foo', 'bar');
            result.childResults.forEach(function (child) {
                expect(child['foo']).toBe('bar');
            });
        });
        describe('when setting state', function () {
            var state;
            beforeEach(function () {
                state = {
                    q: 'foo',
                    first: 20,
                    t: 'bar'
                };
            });
            it('should be able to setState on a single result', function () {
                Core_1.QueryUtils.setStateObjectOnQueryResult(state, result);
                expect(result.state.q).toBe('foo');
                expect(result.state.first).toBe(20);
                expect(result.state.t).toBe('bar');
            });
            it('should be able to setState on multiple results', function () {
                var results = Fake_1.FakeResults.createFakeResults();
                Core_1.QueryUtils.setStateObjectOnQueryResults(state, results);
                results.results.forEach(function (r) {
                    expect(r.state.q).toBe('foo');
                    expect(r.state.first).toBe(20);
                    expect(r.state.t).toBe('bar');
                });
            });
        });
        it('should be able to tell if a result is an attachment', function () {
            result.flags = 'IsAttachment';
            expect(Core_1.QueryUtils.isAttachment(result)).toBeTruthy();
            result.flags = 'HasHtmlVersion;IsAttachment;AnotherFlag';
            expect(Core_1.QueryUtils.isAttachment(result)).toBeTruthy();
        });
        it('should be able to tell if a result is not an attachment', function () {
            result.flags = '';
            expect(Core_1.QueryUtils.isAttachment(result)).toBeFalsy();
            result.flags = 'HasHtmlVersion;AnotherFlag';
            expect(Core_1.QueryUtils.isAttachment(result)).toBeFalsy();
        });
        it('should be able to tell if a result contains attachment', function () {
            result.flags = 'ContainsAttachment';
            expect(Core_1.QueryUtils.containsAttachment(result)).toBeTruthy();
            result.flags = 'HasHtmlVersion;ContainsAttachment;AnotherFlag';
            expect(Core_1.QueryUtils.containsAttachment(result)).toBeTruthy();
        });
        it('should be able to tell if a result does not contains attachment', function () {
            result.flags = '';
            expect(Core_1.QueryUtils.containsAttachment(result)).toBeFalsy();
            result.flags = 'HasHtmlVersion;AnotherFlag';
            expect(Core_1.QueryUtils.containsAttachment(result)).toBeFalsy();
        });
        it('should return a valid UUID', function () {
            expect(Core_1.QueryUtils.generateWithCrypto()).toContain('-');
            expect(Core_1.QueryUtils.generateWithCrypto().length).toBe(36);
        });
        it('should always return a UUID version 4', function () {
            var uuid = Core_1.QueryUtils.generateWithCrypto();
            var versionBit = 14;
            expect(uuid[versionBit]).toBe('4');
        });
        it('should expose a last resort method to generate UUID for analytics events if everything else fails', function () {
            expect(Core_1.QueryUtils.generateWithRandom()).toContain('-');
            expect(Core_1.QueryUtils.generateWithRandom().length).toBe(36);
        });
    });
}
exports.QueryUtilsTest = QueryUtilsTest;
 
 
/***/ }),
/* 1767 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var QuickviewDocumentWord_1 = __webpack_require__(815);
var Fake_1 = __webpack_require__(11);
var Dom_1 = __webpack_require__(0);
function QuickviewDocumentWordTest() {
    describe('QuickviewDocumentWord', function () {
        var result;
        var quickviewWord;
        beforeEach(function () {
            result = Fake_1.FakeResults.createFakeResult();
            quickviewWord = new QuickviewDocumentWord_1.QuickviewDocumentWord(result);
        });
        describe('when adding elements', function () {
            var elem;
            beforeEach(function () {
                elem = Dom_1.$$('div').el;
            });
            it('should allow to add elements', function () {
                expect(quickviewWord.elements.length).toBe(0);
                quickviewWord.addElement(elem);
                expect(quickviewWord.elements.length).toBe(1);
                expect(quickviewWord.elements).toContain(elem);
            });
            it('should update count when adding element', function () {
                expect(quickviewWord.count).toBe(0);
                quickviewWord.addElement(elem);
                expect(quickviewWord.count).toBe(1);
            });
        });
        describe('when parsing elements as index keywords', function () {
            var elem;
            beforeEach(function () {
                elem = Dom_1.$$('div', {
                    id: 'CoveoHighlight:1.4.2'
                }).el;
            });
            it('should be able to identify the index identifier', function () {
                quickviewWord.doCompleteInitialScanForKeywordInDocument(elem);
                expect(quickviewWord.indexIdentifier).toBe('1');
            });
            it('should be able to identify the occurence in the document', function () {
                quickviewWord.doCompleteInitialScanForKeywordInDocument(elem);
                expect(quickviewWord.occurrence).toBe(4);
            });
            it('should be able to detect embedded keyword part', function () {
                quickviewWord.doCompleteInitialScanForKeywordInDocument(elem);
                expect(quickviewWord.indexTermPart).toBe(2);
            });
            describe('which contains text', function () {
                beforeEach(function () {
                    elem.textContent = 'a';
                });
                it('should return the element text content if there is not terms to highlight on the result', function () {
                    quickviewWord.result.termsToHighlight = null;
                    quickviewWord.doCompleteInitialScanForKeywordInDocument(elem);
                    expect(quickviewWord.text).toBe('a');
                });
                it('should return the text content if found in the original keys of the terms to highlight', function () {
                    quickviewWord.result.termsToHighlight = {
                        a: ['b', 'c']
                    };
                    quickviewWord.doCompleteInitialScanForKeywordInDocument(elem);
                    expect(quickviewWord.text).toBe('a');
                });
                it('should return the text content if found in the expansion values for the terms to highlight', function () {
                    quickviewWord.result.termsToHighlight = {
                        c: ['a', 'b']
                    };
                    quickviewWord.doCompleteInitialScanForKeywordInDocument(elem);
                    expect(quickviewWord.text).toBe('c');
                });
            });
        });
        describe('when navigating', function () {
            var firstElem;
            var secondElem;
            beforeEach(function () {
                firstElem = Dom_1.$$('div', {
                    id: 'CoveoHighlight:1.1.1'
                }).el;
                firstElem.style.backgroundColor = 'rgb(1, 1, 1)';
                secondElem = Dom_1.$$('div', {
                    id: 'CoveoHighlight:2.1.1'
                }).el;
                secondElem.style.backgroundColor = 'rgb(2, 2, 2)';
                quickviewWord.doCompleteInitialScanForKeywordInDocument(firstElem);
                quickviewWord.doCompleteInitialScanForKeywordInDocument(secondElem);
            });
            it('should allow to navigate forward through the elements', function () {
                var firstNavigation = quickviewWord.navigateForward();
                expect(firstNavigation).toBe(firstElem);
                var secondNavigation = quickviewWord.navigateForward();
                expect(secondNavigation).toBe(secondElem);
                var thirdNavigation = quickviewWord.navigateForward();
                expect(thirdNavigation).toBe(firstElem);
            });
            it('should allow to navigate backward through the elements', function () {
                var firstNavigation = quickviewWord.navigateBackward();
                expect(firstNavigation).toBe(secondElem);
                var secondNavigation = quickviewWord.navigateBackward();
                expect(secondNavigation).toBe(firstElem);
                var thirdNavigation = quickviewWord.navigateBackward();
                expect(thirdNavigation).toBe(secondElem);
            });
            it('should allow to navigate to a precise position', function () {
                var firstNavigation = quickviewWord.navigateTo(0);
                expect(firstNavigation).toBe(firstElem);
                var secondNavigation = quickviewWord.navigateTo(1);
                expect(secondNavigation).toBe(secondElem);
            });
            it('should navigate to a correct position if requesting to navigate to an impossible one', function () {
                var firstNavigation = quickviewWord.navigateTo(9999);
                expect(firstNavigation).toBe(firstElem);
            });
        });
    });
}
exports.QuickviewDocumentWordTest = QuickviewDocumentWordTest;
 
 
/***/ }),
/* 1768 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        Iif (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            Iif (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
            Iif (y = 0, t) op = [0, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    Iif (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    Iif (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        Iif (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
Object.defineProperty(exports, "__esModule", { value: true });
var QuickviewDocumentIframe_1 = __webpack_require__(812);
var AjaxError_1 = __webpack_require__(465);
var Dom_1 = __webpack_require__(0);
var Test_1 = __webpack_require__(40);
function QuickviewDocumentIframeTest() {
    var _this = this;
    describe('QuickviewDocumentIframe', function () {
        var title = 'abcdef';
        var quickviewIframe;
        beforeEach(function () {
            quickviewIframe = new QuickviewDocumentIframe_1.QuickviewDocumentIframe();
        });
        it('should sandbox the iframe and allow same origin', function () {
            expect(quickviewIframe.iframeHTMLElement.getAttribute('sandbox')).toContain('allow-same-origin');
        });
        it('should sandbox the iframe and allow top navigation', function () {
            expect(quickviewIframe.iframeHTMLElement.getAttribute('sandbox')).toContain('allow-top-navigation');
        });
        describe('when rendering', function () {
            beforeEach(function () {
                quickviewIframe.el.style.display = 'none';
                document.body.appendChild(quickviewIframe.el);
            });
            afterEach(function () {
                quickviewIframe.el.remove();
            });
            describe('an error', function () {
                var error;
                beforeEach(function () {
                    error = new AjaxError_1.AjaxError('oh no', 500);
                });
                it('should render a "No Quickview" message on a 400 error', function () {
                    error.status = 400;
                    quickviewIframe.renderError(error);
                    expect(Dom_1.$$(quickviewIframe.body).text()).toContain(Test_1.l('NoQuickview'));
                });
                it('should render a generic error message on a generic error', function () {
                    quickviewIframe.renderError(error);
                    expect(Dom_1.$$(quickviewIframe.body).text()).toContain(Test_1.l('OoopsError'));
                });
                it('should resolve with the iframe element when the error is done rendering', function (done) { return __awaiter(_this, void 0, void 0, function () {
                    var resolved;
                    return __generator(this, function (_a) {
                        switch (_a.label) {
                            case 0: return [4 /*yield*/, quickviewIframe.renderError(error)];
                            case 1:
                                resolved = _a.sent();
                                expect(resolved).toBe(quickviewIframe.iframeHTMLElement);
                                done();
                                return [2 /*return*/];
                        }
                    });
                }); });
                it('should not do anything if the users closes the quickview before rendering the error', function (done) { return __awaiter(_this, void 0, void 0, function () {
                    var err_1;
                    return __generator(this, function (_a) {
                        switch (_a.label) {
                            case 0:
                                quickviewIframe.el.remove();
                                _a.label = 1;
                            case 1:
                                _a.trys.push([1, 3, , 4]);
                                return [4 /*yield*/, quickviewIframe.renderError(error)];
                            case 2:
                                _a.sent();
                                return [3 /*break*/, 4];
                            case 3:
                                err_1 = _a.sent();
                                expect(err_1).toBeNull();
                                done();
                                return [3 /*break*/, 4];
                            case 4: return [2 /*return*/];
                        }
                    });
                }); });
            });
            describe('an HTML document', function () {
                var htmlDocument;
                beforeEach(function () {
                    htmlDocument = document.implementation.createHTMLDocument();
                    htmlDocument.body.textContent = 'hello world';
                });
                it('should render the content of the document', function (done) { return __awaiter(_this, void 0, void 0, function () {
                    return __generator(this, function (_a) {
                        switch (_a.label) {
                            case 0: return [4 /*yield*/, quickviewIframe.render(htmlDocument, title)];
                            case 1:
                                _a.sent();
                                expect(quickviewIframe.body.textContent).toContain('hello world');
                                done();
                                return [2 /*return*/];
                        }
                    });
                }); });
                it('should render the given title', function (done) { return __awaiter(_this, void 0, void 0, function () {
                    return __generator(this, function (_a) {
                        switch (_a.label) {
                            case 0: return [4 /*yield*/, quickviewIframe.render(htmlDocument, title)];
                            case 1:
                                _a.sent();
                                expect(quickviewIframe.iframeHTMLElement.title).toEqual(title);
                                done();
                                return [2 /*return*/];
                        }
                    });
                }); });
                it('should add additional styling in the header of the document', function (done) { return __awaiter(_this, void 0, void 0, function () {
                    return __generator(this, function (_a) {
                        switch (_a.label) {
                            case 0: return [4 /*yield*/, quickviewIframe.render(htmlDocument, title)];
                            case 1:
                                _a.sent();
                                expect(quickviewIframe.document.head.children.length).toBeGreaterThan(0);
                                done();
                                return [2 /*return*/];
                        }
                    });
                }); });
                it('should modify links in the document to allow to escape sandbox', function (done) { return __awaiter(_this, void 0, void 0, function () {
                    var link;
                    return __generator(this, function (_a) {
                        switch (_a.label) {
                            case 0:
                                link = Dom_1.$$('a', { href: 'the internets.com' }).el;
                                htmlDocument.body.appendChild(link);
                                return [4 /*yield*/, quickviewIframe.render(htmlDocument, title)];
                            case 1:
                                _a.sent();
                                expect(link.getAttribute('target')).toBe('_top');
                                done();
                                return [2 /*return*/];
                        }
                    });
                }); });
                it('should resolve with the iframe element when the document is done rendering', function (done) { return __awaiter(_this, void 0, void 0, function () {
                    var resolved;
                    return __generator(this, function (_a) {
                        switch (_a.label) {
                            case 0: return [4 /*yield*/, quickviewIframe.render(htmlDocument, title)];
                            case 1:
                                resolved = _a.sent();
                                expect(resolved).toBe(quickviewIframe.iframeHTMLElement);
                                done();
                                return [2 /*return*/];
                        }
                    });
                }); });
                it('should not do anything if the users closes the quickview before rendering the document', function (done) { return __awaiter(_this, void 0, void 0, function () {
                    var err_2;
                    return __generator(this, function (_a) {
                        switch (_a.label) {
                            case 0:
                                quickviewIframe.el.remove();
                                _a.label = 1;
                            case 1:
                                _a.trys.push([1, 3, , 4]);
                                return [4 /*yield*/, quickviewIframe.render(htmlDocument, title)];
                            case 2:
                                _a.sent();
                                return [3 /*break*/, 4];
                            case 3:
                                err_2 = _a.sent();
                                expect(err_2).toBeNull();
                                done();
                                return [3 /*break*/, 4];
                            case 4: return [2 /*return*/];
                        }
                    });
                }); });
                it('should detect old quickview document', function (done) { return __awaiter(_this, void 0, void 0, function () {
                    return __generator(this, function (_a) {
                        switch (_a.label) {
                            case 0: return [4 /*yield*/, quickviewIframe.render(htmlDocument, title)];
                            case 1:
                                _a.sent();
                                expect(quickviewIframe.isNewQuickviewDocument()).toBeFalsy();
                                done();
                                return [2 /*return*/];
                        }
                    });
                }); });
                it('should detect new quickview document by using meta available in the header of the document', function (done) { return __awaiter(_this, void 0, void 0, function () {
                    var meta;
                    return __generator(this, function (_a) {
                        switch (_a.label) {
                            case 0:
                                meta = Dom_1.$$('meta', {
                                    name: 'generator',
                                    content: 'pdf2htmlEX'
                                });
                                htmlDocument.head.appendChild(meta.el);
                                return [4 /*yield*/, quickviewIframe.render(htmlDocument, title)];
                            case 1:
                                _a.sent();
                                expect(quickviewIframe.isNewQuickviewDocument()).toBeTruthy();
                                done();
                                return [2 /*return*/];
                        }
                    });
                }); });
            });
        });
    });
}
exports.QuickviewDocumentIframeTest = QuickviewDocumentIframeTest;
 
 
/***/ }),
/* 1769 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var QuickviewDocumentWords_1 = __webpack_require__(814);
var Fake_1 = __webpack_require__(11);
var Dom_1 = __webpack_require__(0);
function QuickviewDocumentWordsTest() {
    describe('QuickviewDocumentWords', function () {
        var fakeIframe;
        var fakeResult;
        var fakeBody;
        beforeEach(function () {
            fakeBody = Dom_1.$$('body');
            fakeIframe = {
                body: fakeBody.el
            };
            fakeResult = Fake_1.FakeResults.createFakeResult();
        });
        it('should detect multiple keywords, and ignore random elements', function () {
            fakeBody.append(Dom_1.$$('div', { id: 'CoveoHighlight:1.1.1' }, 'A').el);
            fakeBody.append(Dom_1.$$('div', { id: 'randomStuff' }).el);
            fakeBody.append(Dom_1.$$('div', { id: 'CoveoHighlight:2.1.1' }, 'B').el);
            fakeBody.append(Dom_1.$$('div', { id: 'randomStuff2' }).el);
            var words = new QuickviewDocumentWords_1.QuickviewDocumentWords(fakeIframe, fakeResult);
            expect(words.words['1'].indexIdentifier).toBe('1');
            expect(words.words['1'].text).toBe('A');
            expect(words.words['2'].indexIdentifier).toBe('2');
            expect(words.words['2'].text).toBe('B');
            expect(Object.keys(words.words).length).toBe(2);
        });
        it('should detect multiple keywords in the same group', function () {
            fakeBody.append(Dom_1.$$('div', { id: 'CoveoHighlight:1.1.1' }, 'A').el);
            fakeBody.append(Dom_1.$$('div', { id: 'CoveoHighlight:1.2.1' }, 'A').el);
            fakeBody.append(Dom_1.$$('div', { id: 'CoveoHighlight:1.3.1' }, 'A').el);
            var words = new QuickviewDocumentWords_1.QuickviewDocumentWords(fakeIframe, fakeResult);
            expect(words.words['1'].indexIdentifier).toBe('1');
            expect(words.words['1'].elements.length).toBe(3);
        });
        it('should ignore highlights whose text resolves to an empty string', function () {
            var span = Dom_1.$$('span', { id: 'CoveoHighlight:1.1.1' }, Dom_1.$$('coveotaggedword', { id: 'CoveoHighlight:2.1.1' }, 'A'));
            fakeBody.append(span.el);
            var words = new QuickviewDocumentWords_1.QuickviewDocumentWords(fakeIframe, fakeResult);
            expect(words.words['1'].text).toBe('A');
            expect(words.words['2']).toBe(undefined);
        });
    });
}
exports.QuickviewDocumentWordsTest = QuickviewDocumentWordsTest;
 
 
/***/ }),
/* 1770 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var QuickviewDocumentWordColor_1 = __webpack_require__(269);
function QuickviewDocumentWordColorTest() {
    describe('QuickviewDocumentWordColor', function () {
        it('should be able to parse html RGB color', function () {
            var color = new QuickviewDocumentWordColor_1.QuickviewDocumentWordColor('rgb(1,2,3)');
            expect(color.r).toBe(1);
            expect(color.g).toBe(2);
            expect(color.b).toBe(3);
        });
        it('should allow to invert the color', function () {
            var color = new QuickviewDocumentWordColor_1.QuickviewDocumentWordColor('rgb(0,0,0)');
            expect(color.invert()).toBe('rgb(255, 255, 255)');
        });
        it('should allow to saturate the color', function () {
            var color = new QuickviewDocumentWordColor_1.QuickviewDocumentWordColor('rgb(1,100,100)');
            expect(color.saturate()).toBe('rgb(0, 100, 100)');
        });
    });
}
exports.QuickviewDocumentWordColorTest = QuickviewDocumentWordColorTest;
 
 
/***/ }),
/* 1771 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var QuickviewDocumentPreviewBar_1 = __webpack_require__(817);
var QuickviewDocumentWordColor_1 = __webpack_require__(269);
var Dom_1 = __webpack_require__(0);
function QuickviewDocumentPreviewBarTest() {
    describe('QuickviewDocumentPreviewBar', function () {
        var fakeIframe;
        var words;
        var mockWord = function (elements) {
            var word = jasmine.createSpyObj('quickviewWord', ['elements', 'color']);
            word.elements = elements;
            word.color = new QuickviewDocumentWordColor_1.QuickviewDocumentWordColor('rgb(123,123,123)');
            return word;
        };
        beforeEach(function () {
            fakeIframe = jasmine.createSpyObj('quickviewIframe', ['body']);
            fakeIframe.body = Dom_1.$$('div').el;
            fakeIframe.document = document.implementation.createHTMLDocument();
        });
        describe("when there's one keyword in the document", function () {
            beforeEach(function () {
                words = jasmine.createSpyObj('quickviewWords', ['words']);
            });
            it('should display one indicator if there is one element', function () {
                words.words = {
                    foo: mockWord([Dom_1.$$('div').el])
                };
                var previewBar = new QuickviewDocumentPreviewBar_1.QuickviewDocumentPreviewBar(fakeIframe, words);
                previewBar.wordIndicators.forEach(function (value) {
                    expect(value.indicators.length).toBe(1);
                });
            });
            it('should display multiple indicator if there are multiple elements', function () {
                words.words = {
                    foo: mockWord([Dom_1.$$('div').el, Dom_1.$$('div').el, Dom_1.$$('div').el])
                };
                var previewBar = new QuickviewDocumentPreviewBar_1.QuickviewDocumentPreviewBar(fakeIframe, words);
                previewBar.wordIndicators.forEach(function (value) {
                    expect(value.indicators.length).toBe(3);
                });
            });
            it('should handle indicators that are overlapping', function () {
                // If 2 elements are in the same position in the original document, the indicators will overlap
                var elem1 = Dom_1.$$('div').el;
                elem1.style.top = '100px';
                var elem2 = Dom_1.$$('div').el;
                elem2.style.top = '100px';
                words.words = {
                    foo: mockWord([elem1, elem2])
                };
                var allIndicators = [];
                var previewBar = new QuickviewDocumentPreviewBar_1.QuickviewDocumentPreviewBar(fakeIframe, words);
                previewBar.wordIndicators.forEach(function (value) {
                    allIndicators = allIndicators.concat(value.indicators);
                });
                expect(allIndicators[0]).toEqual(allIndicators[1]);
            });
        });
        describe('when navigating', function () {
            beforeEach(function () {
                words.words = {
                    foo: mockWord([Dom_1.$$('div').el, Dom_1.$$('div').el])
                };
            });
            it('should allow to navigate forward', function () {
                var previewBar = new QuickviewDocumentPreviewBar_1.QuickviewDocumentPreviewBar(fakeIframe, words);
                var firstNavigation = previewBar.navigateForward(words.words['foo']);
                expect(firstNavigation.style.backgroundColor).toBe(words.words['foo'].color.invert());
                var secondNavigation = previewBar.navigateForward(words.words['foo']);
                var thirdNavigation = previewBar.navigateForward(words.words['foo']);
                expect(thirdNavigation).toEqual(firstNavigation);
                var fourthNavigation = previewBar.navigateForward(words.words['foo']);
                expect(fourthNavigation).toEqual(secondNavigation);
            });
            it('should allow to navigate backward', function () {
                var previewBar = new QuickviewDocumentPreviewBar_1.QuickviewDocumentPreviewBar(fakeIframe, words);
                var firstNavigation = previewBar.navigateBackward(words.words['foo']);
                expect(firstNavigation.style.backgroundColor).toBe(words.words['foo'].color.invert());
                var secondNavigation = previewBar.navigateBackward(words.words['foo']);
                var thirdNavigation = previewBar.navigateBackward(words.words['foo']);
                expect(thirdNavigation).toEqual(firstNavigation);
                var fourthNavigation = previewBar.navigateBackward(words.words['foo']);
                expect(fourthNavigation).toEqual(secondNavigation);
            });
            it('should allow to navigate to a given position', function () {
                var previewBar = new QuickviewDocumentPreviewBar_1.QuickviewDocumentPreviewBar(fakeIframe, words);
                var firstNavigation = previewBar.navigateTo(0, words.words['foo']);
                expect(firstNavigation.style.backgroundColor).toBe(words.words['foo'].color.invert());
            });
            it('should not throw when navigating to an invalid position', function () {
                var previewBar = new QuickviewDocumentPreviewBar_1.QuickviewDocumentPreviewBar(fakeIframe, words);
                expect(function () { return previewBar.navigateTo(-1, words.words['foo']); }).not.toThrow();
                expect(function () { return previewBar.navigateTo(99, words.words['foo']); }).not.toThrow();
            });
            it('should not throw when navigating to an invalid word', function () {
                var previewBar = new QuickviewDocumentPreviewBar_1.QuickviewDocumentPreviewBar(fakeIframe, words);
                expect(function () { return previewBar.navigateForward(words.words['does not exist']); }).not.toThrow();
                expect(function () { return previewBar.navigateBackward(words.words['does not exist']); }).not.toThrow();
                expect(function () { return previewBar.navigateTo(0, words.words['does not exist']); }).not.toThrow();
            });
        });
    });
}
exports.QuickviewDocumentPreviewBarTest = QuickviewDocumentPreviewBarTest;
 
 
/***/ }),
/* 1772 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var QuickviewDocumentHeader_1 = __webpack_require__(813);
var Dom_1 = __webpack_require__(0);
function QuickviewDocumentHeaderTest() {
    describe('QuickviewDocumentHeader', function () {
        it('should build a valid header element', function () {
            expect(new QuickviewDocumentHeader_1.QuickviewDocumentHeader().el.className).toBe('coveo-quickview-header');
        });
        it('should allow to add a new button', function () {
            var header = new QuickviewDocumentHeader_1.QuickviewDocumentHeader();
            var button = jasmine.createSpyObj('quickviewWordButton', ['el']);
            button.el = Dom_1.$$('div').el;
            header.addWord(button);
            expect(header.el.firstChild).toBe(button.el);
        });
    });
}
exports.QuickviewDocumentHeaderTest = QuickviewDocumentHeaderTest;
 
 
/***/ }),
/* 1773 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var QuickviewDocumentWordButton_1 = __webpack_require__(816);
var QuickviewDocumentWordColor_1 = __webpack_require__(269);
var Dom_1 = __webpack_require__(0);
function QuickviewDocumentWordButtonTest() {
    describe('QuickviewDocumentWordButton', function () {
        var word;
        var iframe;
        var previewBar;
        var button;
        var mockIframe = function () {
            iframe = jasmine.createSpyObj('quickviewIframe', ['isNewQuickviewDocument']);
            iframe.isNewQuickviewDocument.and.returnValue(false);
        };
        var mockPreviewBar = function () {
            previewBar = jasmine.createSpyObj('previewBar', ['navigateForward', 'navigateBackward']);
        };
        var mockWord = function () {
            word = jasmine.createSpyObj('quickviewWord', ['navigateForward', 'navigateBackward']);
            word.navigateBackward.and.returnValue(Dom_1.$$('div').el);
            word.navigateForward.and.returnValue(Dom_1.$$('div').el);
            word.color = new QuickviewDocumentWordColor_1.QuickviewDocumentWordColor('rgb(125,125,125)');
            word.text = 'hello world';
            word.count = 123;
        };
        beforeEach(function () {
            mockIframe();
            mockPreviewBar();
            mockWord();
            button = new QuickviewDocumentWordButton_1.QuickviewDocumentWordButton(word, previewBar, iframe);
        });
        it('should render the correct name', function () {
            var nameElement = Dom_1.$$(button.el).find('.coveo-term-for-quickview-name');
            expect(nameElement).toBeDefined();
            expect(nameElement.textContent).toContain(word.text);
            expect(nameElement.textContent).toContain(word.count.toString());
        });
        it('should render an up arrow', function () {
            var arrowElement = Dom_1.$$(button.el).find('.coveo-term-for-quickview-up-arrow');
            expect(arrowElement).toBeDefined();
        });
        it('should navigate backward on up arrow click', function () {
            var arrowElement = Dom_1.$$(button.el).find('.coveo-term-for-quickview-up-arrow');
            Dom_1.$$(arrowElement).trigger('click');
            expect(word.navigateBackward).toHaveBeenCalled();
            expect(previewBar.navigateBackward).toHaveBeenCalled();
        });
        it('should render a down arrow', function () {
            var arrowElement = Dom_1.$$(button.el).find('.coveo-term-for-quickview-down-arrow');
            expect(arrowElement).toBeDefined();
        });
        it('should navigate forward on down arrow click', function () {
            var arrowElement = Dom_1.$$(button.el).find('.coveo-term-for-quickview-down-arrow');
            Dom_1.$$(arrowElement).trigger('click');
            expect(word.navigateForward).toHaveBeenCalled();
            expect(previewBar.navigateForward).toHaveBeenCalled();
        });
    });
}
exports.QuickviewDocumentWordButtonTest = QuickviewDocumentWordButtonTest;
 
 
/***/ }),
/* 1774 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __assign = (this && this.__assign) || Object.assign || function(t) {
    for (var s, i = 1, n = arguments.length; i < n; i++) {
        s = arguments[i];
        for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
            t[p] = s[p];
    }
    return t;
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { Iif (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        Iif (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            Iif (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
            Iif (y = 0, t) op = [0, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    Eif (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        Iif (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
Object.defineProperty(exports, "__esModule", { value: true });
var QuickviewDocument_1 = __webpack_require__(268);
var Mock = __webpack_require__(2);
var QuickviewEvents_1 = __webpack_require__(267);
var Dom_1 = __webpack_require__(0);
var Fake_1 = __webpack_require__(11);
function QuickviewDocumentTest() {
    var _this = this;
    describe('QuickviewDocument', function () {
        var title = 'foo';
        var test;
        beforeEach(function () {
            test = Mock.advancedResultComponentSetup(QuickviewDocument_1.QuickviewDocument, __assign({}, Fake_1.FakeResults.createFakeResult(), { title: title }));
        });
        it('should request the last query on the query controller when opening', function () {
            test.cmp.open();
            expect(test.env.queryController.getLastQuery).toHaveBeenCalled();
        });
        it('should trigger an openQuickview event when opening', function () {
            var openSpy = jasmine.createSpy('open');
            Dom_1.$$(test.cmp.root).on(QuickviewEvents_1.QuickviewEvents.openQuickview, openSpy);
            test.cmp.open();
            expect(openSpy).toHaveBeenCalled();
        });
        it('should properly modify the terms to highlight on the result', function () {
            Dom_1.$$(test.cmp.root).on(QuickviewEvents_1.QuickviewEvents.openQuickview, function (e, args) {
                args.termsToHighlight.push('bar');
                args.termsToHighlight.push('baz');
            });
            test.cmp.open();
            expect(test.cmp.result.termsToHighlight['bar']).toEqual(['bar']);
            expect(test.cmp.result.termsToHighlight['baz']).toEqual(['baz']);
        });
        it('should call getDocumentHtml on the endpoint', function () {
            test.cmp.open();
            expect(test.env.searchEndpoint.getDocumentHtml).toHaveBeenCalled();
        });
        describe('when rendering an HTML document', function () {
            var doc;
            beforeEach(function () {
                doc = document.implementation.createHTMLDocument();
                test.env.searchEndpoint.getDocumentHtml.and.returnValue(doc);
                document.body.appendChild(test.cmp.element);
            });
            afterEach(function () {
                test.cmp.element.remove();
            });
            it('should trigger an after load event', function (done) { return __awaiter(_this, void 0, void 0, function () {
                var loadedSpy;
                return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0:
                            loadedSpy = jasmine.createSpy('loaded');
                            Dom_1.$$(test.cmp.element).on(QuickviewEvents_1.QuickviewEvents.quickviewLoaded, loadedSpy);
                            return [4 /*yield*/, test.cmp.open()];
                        case 1:
                            _a.sent();
                            expect(loadedSpy).toHaveBeenCalled();
                            done();
                            return [2 /*return*/];
                    }
                });
            }); });
            it('should pass the value of the title option to the iframe', function (done) { return __awaiter(_this, void 0, void 0, function () {
                return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0: return [4 /*yield*/, test.cmp.open()];
                        case 1:
                            _a.sent();
                            expect(test.cmp['iframe'].iframeHTMLElement.title).toEqual(title);
                            done();
                            return [2 /*return*/];
                    }
                });
            }); });
        });
    });
}
exports.QuickviewDocumentTest = QuickviewDocumentTest;
 
 
/***/ }),
/* 1775 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var CategoryFacetDebug_1 = __webpack_require__(687);
function CategoryFacetDebugTest() {
    function generateGroupByResult(paths) {
        var groupByValues = [];
        paths.forEach(function (path) {
            groupByValues.push({
                value: path,
                numberOfResults: 1337,
                score: 31337
            });
        });
        return {
            field: '@field',
            values: groupByValues
        };
    }
    describe('CategoryFacetDebug', function () {
        it('finds orphans', function () {
            var paths = ['Car', 'Car|Sport', 'Car|Sport|Ferrari', 'Car|Eco|Yaris'];
            var groupByResult = generateGroupByResult(paths);
            var orphans = CategoryFacetDebug_1.CategoryFacetDebug.analyzeResults(groupByResult, '|');
            expect(orphans).toEqual(['Car|Eco|Yaris']);
        });
        it('finds orphans amongst many branches of values', function () {
            var paths = [
                'Car',
                'Car|Sport',
                'Car|Sport|Ferrari',
                'Plane',
                'Plane|Fast',
                'Plane|Slow',
                'Plane|Fast|F18',
                'Plane|Slow|Cesna',
                'Plane|Airline|Airbus',
                'Chopper',
                'Chopper|Military',
                'Chopper|Civilian',
                'Chopper|Military|Apache',
                'Chopper|Civilian|Airbus',
                'Chopper|Civilian|Airbus|Car|Sport|Ferrari',
                'Civilian',
                'Airbus'
            ];
            var groupByResult = generateGroupByResult(paths);
            var orphans = CategoryFacetDebug_1.CategoryFacetDebug.analyzeResults(groupByResult, '|');
            expect(orphans).toEqual(['Plane|Airline|Airbus', 'Chopper|Civilian|Airbus|Car|Sport|Ferrari']);
        });
    });
}
exports.CategoryFacetDebugTest = CategoryFacetDebugTest;
 
 
/***/ }),
/* 1776 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var CategoryFacet_1 = __webpack_require__(71);
var MockEnvironment_1 = __webpack_require__(2);
var Fake_1 = __webpack_require__(11);
var CategoryFacetSearch_1 = __webpack_require__(685);
var CategoryFacetQueryController_1 = __webpack_require__(238);
var _ = __webpack_require__(1);
var Core_1 = __webpack_require__(9);
var KeyboardUtils_1 = __webpack_require__(35);
var AnalyticsActionListMeta_1 = __webpack_require__(7);
var Globalize = __webpack_require__(28);
var Simulate_1 = __webpack_require__(15);
function CategoryFacetSearchTest() {
    describe('CategoryFacetSearch', function () {
        var facetSearchDelay = 5;
        var noResultsClass = 'coveo-no-results';
        var facetSearchNoResultsClass = 'coveo-facet-search-no-results';
        var categoryFacetTitle = 'abcdef';
        var categoryFacetMock;
        var categoryFacetSearch;
        var fakeGroupByValues;
        function getInputHandler() {
            return categoryFacetSearch.facetSearchElement.facetSearchUserInputHandler;
        }
        function getInput() {
            return categoryFacetSearch.facetSearchElement.input;
        }
        function getSearchResults() {
            return categoryFacetSearch.facetSearchElement.searchResults;
        }
        function getSearchElement() {
            return categoryFacetSearch.facetSearchElement.search;
        }
        function getFacetSearchValues() {
            return Core_1.$$(getSearchResults()).findAll('.coveo-category-facet-search-value');
        }
        function expectNoResults() {
            expect(Core_1.$$(categoryFacetMock.element).hasClass(noResultsClass)).toBe(true);
            expect(Core_1.$$(getSearchElement()).hasClass(facetSearchNoResultsClass)).toBe(true);
        }
        function expectResults() {
            expect(Core_1.$$(categoryFacetMock.element).hasClass(noResultsClass)).toBe(false);
            expect(Core_1.$$(getSearchElement()).hasClass(facetSearchNoResultsClass)).toBe(false);
        }
        function searchWithValues(values) {
            return (categoryFacetMock.categoryFacetQueryController.searchFacetValues = function () { return Promise.resolve(fakeGroupByValues); });
        }
        function searchWithNoValues() {
            categoryFacetMock.categoryFacetQueryController.searchFacetValues = function () { return Promise.resolve([]); };
        }
        beforeEach(function () {
            categoryFacetMock = MockEnvironment_1.basicComponentSetup(CategoryFacet_1.CategoryFacet, {
                field: '@field',
                title: categoryFacetTitle,
                facetSearchDelay: facetSearchDelay
            }).cmp;
            fakeGroupByValues = Fake_1.FakeResults.createFakeGroupByResult('@field', 'value', 10).values;
            categoryFacetMock.categoryFacetQueryController = MockEnvironment_1.mock(CategoryFacetQueryController_1.CategoryFacetQueryController);
            categoryFacetMock.categoryFacetQueryController.searchFacetValues = function () { return new Promise(function (resolve) { return resolve(fakeGroupByValues); }); };
            categoryFacetSearch = new CategoryFacetSearch_1.CategoryFacetSearch(categoryFacetMock);
            categoryFacetSearch.build();
        });
        it('when building returns a container', function () {
            var container = categoryFacetSearch.build();
            expect(container.hasClass('coveo-category-facet-search-container')).toBe(true);
        });
        it('builds a container with the button role', function () {
            var container = categoryFacetSearch.build();
            expect(container.getAttribute('role')).toEqual('button');
        });
        it("builds a container with the category facet's title in the label", function () {
            var container = categoryFacetSearch.build();
            expect(container.getAttribute('aria-label')).toContain(categoryFacetTitle);
        });
        it("builds an input with the category facet's title in the label", function () {
            var input = categoryFacetSearch.build().find('input');
            expect(input.getAttribute('aria-label')).toContain(categoryFacetTitle);
        });
        it('focus moves the focus to the input element', function () {
            spyOn(getInput(), 'focus');
            categoryFacetSearch.focus();
            expect(getInput().focus).toHaveBeenCalled();
        });
        it('renders values on focus', function (done) {
            categoryFacetSearch.focus();
            setTimeout(function () {
                expect(getSearchResults().innerHTML).not.toEqual('');
                done();
            }, facetSearchDelay);
        });
        it('should call updateAriaLiveWithResults', function (done) {
            spyOn(categoryFacetSearch.facetSearchElement, 'updateAriaLiveWithResults');
            categoryFacetSearch.displayNewValues();
            setTimeout(function () {
                expect(categoryFacetSearch.facetSearchElement.updateAriaLiveWithResults).toHaveBeenCalled();
                done();
            }, facetSearchDelay);
        });
        it('renders values correctly', function (done) {
            categoryFacetSearch.displayNewValues();
            setTimeout(function () {
                var searchResults = getSearchResults();
                var valueCaptions = Core_1.$$(searchResults).findAll('.coveo-category-facet-search-value-caption');
                var pathValues = Core_1.$$(searchResults).findAll('.coveo-category-facet-search-path');
                var valueCounts = Core_1.$$(searchResults).findAll('.coveo-category-facet-search-value-number');
                for (var _i = 0, _a = _.range(fakeGroupByValues.length); _i < _a.length; _i++) {
                    var i = _a[_i];
                    expect(Core_1.$$(valueCaptions[i]).text()).toEqual("value" + i);
                    expect(Core_1.$$(pathValues[i]).text()).toEqual('');
                    expect(Core_1.$$(valueCounts[i]).text()).toEqual((i + 1).toString());
                }
                done();
            }, facetSearchDelay);
        });
        it('renders the path correctly', function (done) {
            fakeGroupByValues = Fake_1.FakeResults.createFakeGroupByResult('@field', 'a|b|c', 10).values;
            searchWithValues(fakeGroupByValues);
            categoryFacetSearch.displayNewValues();
            setTimeout(function () {
                var pathCaption = Core_1.$$(getSearchResults()).find('.coveo-category-facet-search-path');
                expect(Core_1.$$(pathCaption).text()).toEqual('a/b/');
                done();
            }, facetSearchDelay);
        });
        it('sets the correct classes when there is no results', function (done) {
            searchWithNoValues();
            categoryFacetSearch.displayNewValues();
            setTimeout(function () {
                expectNoResults();
                done();
            }, facetSearchDelay);
        });
        it('removes no results classes when there are results', function (done) {
            Core_1.$$(categoryFacetMock.element).addClass(noResultsClass);
            Core_1.$$(getSearchElement()).addClass(facetSearchNoResultsClass);
            categoryFacetSearch.displayNewValues();
            setTimeout(function () {
                expectResults();
                done();
            }, facetSearchDelay);
        });
        it('selects the first results when displaying new values', function (done) {
            categoryFacetSearch.displayNewValues();
            setTimeout(function () {
                expect(Core_1.$$(getFacetSearchValues()[0]).hasClass('coveo-facet-search-current-result')).toBe(true);
                done();
            }, facetSearchDelay);
        });
        it('sends an analytics event on selection', function (done) {
            spyOn(categoryFacetMock, 'logAnalyticsEvent');
            categoryFacetSearch.displayNewValues();
            setTimeout(function () {
                Core_1.$$(getFacetSearchValues()[0]).trigger('click');
                expect(categoryFacetMock.logAnalyticsEvent).toHaveBeenCalledWith(AnalyticsActionListMeta_1.analyticsActionCauseList.categoryFacetSelect, ['value0']);
                done();
            }, facetSearchDelay);
        });
        it('it scrolls to top', function (done) {
            categoryFacetSearch.displayNewValues();
            setTimeout(function () {
                spyOn(categoryFacetMock, 'scrollToTop');
                Core_1.$$(getFacetSearchValues()[0]).trigger('click');
                expect(categoryFacetMock.scrollToTop).toHaveBeenCalled();
                done();
            }, facetSearchDelay);
        });
        describe('when expanding', function () {
            beforeEach(function (done) {
                categoryFacetSearch.displayNewValues();
                setTimeout(done, facetSearchDelay);
            });
            it('sets aria-expanded to true', function () {
                expect(categoryFacetSearch.container.getAttribute('aria-expanded')).toEqual('true');
            });
            it('has accessible labels on each value', function () {
                getFacetSearchValues().forEach(function (value) {
                    var count = parseInt(value.getElementsByClassName('coveo-category-facet-search-value-number').item(0).textContent, 10);
                    var formattedCount = Globalize.format(count, 'n0');
                    var path = value.getAttribute('data-path').split('|');
                    expect(value.getAttribute('aria-label')).toEqual(Core_1.l('IncludeValueWithResultCount', _.last(path), Core_1.l('ResultCount', formattedCount, count)));
                });
            });
            it('keeps aria-expanded true when displaying no values', function (done) {
                searchWithNoValues();
                categoryFacetSearch.displayNewValues();
                setTimeout(function () {
                    expect(categoryFacetSearch.container.getAttribute('aria-expanded')).toEqual('true');
                    done();
                });
            });
        });
        describe('when selecting with the keyboard (using ENTER)', function () {
            var keyboardEvent;
            beforeEach(function () {
                keyboardEvent = { which: KeyboardUtils_1.KEYBOARD.ENTER };
                spyOn(categoryFacetMock, 'changeActivePath');
                spyOn(categoryFacetMock, 'logAnalyticsEvent');
                spyOn(categoryFacetMock, 'scrollToTop');
                categoryFacetSearch.displayNewValues();
            });
            it('it selects the current result', function (done) {
                setTimeout(function () {
                    getInputHandler().handleKeyboardEvent(keyboardEvent);
                    expect(categoryFacetMock.changeActivePath).toHaveBeenCalledWith(['value0']);
                    done();
                }, facetSearchDelay);
            });
            it('it scrolls to top', function (done) {
                setTimeout(function () {
                    getInputHandler().handleKeyboardEvent(keyboardEvent);
                    expect(categoryFacetMock.scrollToTop).toHaveBeenCalled();
                    done();
                }, facetSearchDelay);
            });
            it('it sends an analytics event', function (done) {
                setTimeout(function () {
                    getInputHandler().handleKeyboardEvent(keyboardEvent);
                    expect(categoryFacetMock.logAnalyticsEvent).toHaveBeenCalledWith(AnalyticsActionListMeta_1.analyticsActionCauseList.categoryFacetSelect, ['value0']);
                    done();
                }, facetSearchDelay);
            });
        });
        it('pressing down arrow while on the input  moves current result down', function (done) {
            var keyboardEvent = { which: KeyboardUtils_1.KEYBOARD.DOWN_ARROW };
            categoryFacetSearch.displayNewValues();
            setTimeout(function () {
                getInputHandler().handleKeyboardEvent(keyboardEvent);
                expect(Core_1.$$(getFacetSearchValues()[1]).hasClass('coveo-facet-search-current-result')).toBe(true);
                done();
            }, facetSearchDelay);
        });
        it('pressing up arrow while on the input moves current result up', function (done) {
            var keyboardEvent = { which: KeyboardUtils_1.KEYBOARD.UP_ARROW };
            categoryFacetSearch.displayNewValues();
            setTimeout(function () {
                getInputHandler().handleKeyboardEvent(keyboardEvent);
                expect(Core_1.$$(getFacetSearchValues().slice(-1)[0]).hasClass('coveo-facet-search-current-result')).toBe(true);
                done();
            }, facetSearchDelay);
        });
        it('pressing escape while on the input closes the search input', function (done) {
            var keyboardEvent = { which: KeyboardUtils_1.KEYBOARD.ESCAPE };
            spyOn(categoryFacetSearch.facetSearchElement, 'clearSearchInput');
            categoryFacetSearch.displayNewValues();
            setTimeout(function () {
                getInputHandler().handleKeyboardEvent(keyboardEvent);
                expect(categoryFacetSearch.facetSearchElement.clearSearchInput).toHaveBeenCalled();
                done();
            });
        });
        it('pressing any other key while on the input displays new values', function (done) {
            var keyboardEvent = { which: 1337 };
            getInputHandler().handleKeyboardEvent(keyboardEvent);
            setTimeout(function () {
                expect(getSearchResults().innerHTML).not.toEqual('');
                done();
            }, facetSearchDelay);
        });
        it('pressing escape while on the results closes the search input', function (done) {
            spyOn(categoryFacetSearch.facetSearchElement, 'clearSearchInput');
            categoryFacetSearch.displayNewValues();
            setTimeout(function () {
                Simulate_1.Simulate.keyUp(getSearchResults(), KeyboardUtils_1.KEYBOARD.ESCAPE);
                expect(categoryFacetSearch.facetSearchElement.clearSearchInput).toHaveBeenCalled();
                done();
            });
        });
        describe('when displayButton is true (default', function () {
            it('container should not have the class coveo-category-facet-search-without-button', function () {
                expect(categoryFacetSearch.container.hasClass('coveo-category-facet-search-without-button')).toBe(false);
            });
            it("facetSearchElement's search should not have the class without-animation", function () {
                expect(Core_1.$$(categoryFacetSearch.facetSearchElement.search).hasClass('without-animation')).toBe(false);
            });
            it('should have a search placeholder', function () {
                expect(categoryFacetSearch.container.find('.coveo-category-facet-search-placeholder')).toBeTruthy();
            });
        });
        describe('when displayButton is false', function () {
            beforeEach(function () {
                categoryFacetSearch = new CategoryFacetSearch_1.CategoryFacetSearch(categoryFacetMock, false);
                categoryFacetSearch.build();
            });
            it('container should have the class coveo-category-facet-search-without-button', function () {
                expect(categoryFacetSearch.container.hasClass('coveo-category-facet-search-without-button')).toBe(true);
            });
            it("facetSearchElement's search should have the class without-animation", function () {
                expect(Core_1.$$(categoryFacetSearch.facetSearchElement.search).hasClass('without-animation')).toBe(true);
            });
            it('should have no search placeholder', function () {
                expect(categoryFacetSearch.container.find('.coveo-category-facet-search-placeholder')).toBeFalsy();
            });
        });
    });
}
exports.CategoryFacetSearchTest = CategoryFacetSearchTest;
 
 
/***/ }),
/* 1777 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var CategoryFacetBreadcrumb_1 = __webpack_require__(686);
var Core_1 = __webpack_require__(9);
var CategoryFacet_1 = __webpack_require__(71);
var MockEnvironment_1 = __webpack_require__(2);
function CategoryFacetBreadcrumbTest() {
    describe('CategoryFacetBreadcrumb', function () {
        var categoryFacet;
        var categoryValueDescriptor;
        var categoryFacetOptions;
        function buildCategoryFacetBreadcrumb() {
            return new CategoryFacetBreadcrumb_1.CategoryFacetBreadcrumb(categoryFacet, function () { }, categoryValueDescriptor).build();
        }
        function initCategoryFacet() {
            categoryFacet = MockEnvironment_1.optionsComponentSetup(CategoryFacet_1.CategoryFacet, categoryFacetOptions).cmp;
        }
        beforeEach(function () {
            categoryValueDescriptor = { value: 'value', count: 1, path: [] };
            categoryFacetOptions = {
                field: '@field',
                title: 'title',
                basePath: []
            };
            initCategoryFacet();
        });
        it('build a breadcrumb', function () {
            var breadcrumb = buildCategoryFacetBreadcrumb();
            expect(Core_1.$$(breadcrumb).hasClass('coveo-category-facet-breadcrumb')).toBe(true);
        });
        it('calls the given click handler on click', function () {
            var clickHandler = jasmine.createSpy('handler');
            var breadcrumb = new CategoryFacetBreadcrumb_1.CategoryFacetBreadcrumb(categoryFacet, clickHandler, categoryValueDescriptor).build();
            Core_1.$$(breadcrumb).find('.coveo-category-facet-breadcrumb-values').click();
            expect(clickHandler).toHaveBeenCalled();
        });
        describe("when the categoryValueDescriptor #path is a populated array", function () {
            beforeEach(function () { return (categoryValueDescriptor.path = ['path_one', 'path_two']); });
            it('has the right accessibility attributes', function () {
                var breadcrumb = buildCategoryFacetBreadcrumb();
                var breadcrumbValues = Core_1.$$(breadcrumb).find('.coveo-category-facet-breadcrumb-values');
                expect(breadcrumbValues.getAttribute('aria-label')).toBe('Remove inclusion filter on path_one/path_two');
                expect(breadcrumbValues.getAttribute('role')).toBe('button');
                expect(breadcrumbValues.getAttribute('tabindex')).toBe('0');
            });
            it('build a breadcrumb with the full path if there is no base path', function () {
                var breadcrumb = buildCategoryFacetBreadcrumb();
                var values = Core_1.$$(breadcrumb).find('.coveo-category-facet-breadcrumb-values');
                expect(values.childNodes[0].nodeValue).toEqual('path_one/path_two');
            });
            it('build a breadcrumb without the full path if there is a base path', function () {
                categoryFacetOptions.basePath = ['path_one'];
                var breadcrumb = buildCategoryFacetBreadcrumb();
                var values = Core_1.$$(breadcrumb).find('.coveo-category-facet-breadcrumb-values');
                expect(values.childNodes[0].nodeValue).toEqual('path_two');
            });
            it("when the categoryFacet has the valueCaption option configured,\n      it renders a path whose parts are captioned", function () {
                var firstPartOfPath = categoryValueDescriptor.path[0];
                var caption = firstPartOfPath + "_caption";
                categoryFacetOptions.valueCaption = (_a = {}, _a[firstPartOfPath] = caption, _a);
                initCategoryFacet();
                var breadcrumb = buildCategoryFacetBreadcrumb();
                var values = Core_1.$$(breadcrumb).find('.coveo-category-facet-breadcrumb-values');
                expect(values.textContent).toContain(caption);
                var _a;
            });
        });
    });
}
exports.CategoryFacetBreadcrumbTest = CategoryFacetBreadcrumbTest;
 
 
/***/ }),
/* 1778 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var MockEnvironment_1 = __webpack_require__(2);
var CategoryFacet_1 = __webpack_require__(71);
var CategoryValue_1 = __webpack_require__(684);
var CategoryFacetTemplates_1 = __webpack_require__(682);
var Core_1 = __webpack_require__(9);
var Simulate_1 = __webpack_require__(15);
function CategoryValueTest() {
    describe('CategoryValue', function () {
        var categoryValueDescriptor;
        var categoryFacet;
        var categoryFacetOptions;
        function initCategoryValueDescriptor() {
            categoryValueDescriptor = {
                value: 'value',
                count: 3,
                path: ['1', '2', '3']
            };
        }
        function initCategoryFacetOptions() {
            categoryFacetOptions = {
                field: '@field',
                maximumDepth: 3
            };
        }
        function initCategoryFacet() {
            categoryFacet = MockEnvironment_1.optionsComponentSetup(CategoryFacet_1.CategoryFacet, categoryFacetOptions).cmp;
        }
        function buildCategoryValue() {
            return new CategoryValue_1.CategoryValue(Core_1.$$('div'), categoryValueDescriptor, new CategoryFacetTemplates_1.CategoryFacetTemplates(), categoryFacet);
        }
        function categoryValueElement(categoryValue) {
            return Core_1.$$(categoryValue.element).find('.coveo-category-facet-value-label');
        }
        beforeEach(function () {
            initCategoryValueDescriptor();
            initCategoryFacetOptions();
            initCategoryFacet();
        });
        it('when at maximumDepth, it does not call changeActivePath', function () {
            var categoryValue = buildCategoryValue().makeSelectable();
            spyOn(categoryFacet, 'changeActivePath');
            Core_1.$$(categoryValueElement(categoryValue)).trigger('click');
            expect(categoryFacet.changeActivePath).not.toHaveBeenCalled();
        });
        describe('when below maximumDepth, when it is selectable', function () {
            beforeEach(function () { return (categoryValueDescriptor.path = ['1', '2']); });
            it('calls changeActivePath on click', function () {
                var categoryValue = buildCategoryValue().makeSelectable();
                spyOn(categoryFacet, 'changeActivePath');
                Core_1.$$(categoryValueElement(categoryValue)).trigger('click');
                expect(categoryFacet.changeActivePath).toHaveBeenCalled();
            });
            it('calls changeActivePath on enter keyup', function () {
                var categoryValue = buildCategoryValue().makeSelectable();
                spyOn(categoryFacet, 'changeActivePath');
                Simulate_1.Simulate.keyUp(categoryValueElement(categoryValue), Core_1.KEYBOARD.ENTER);
                expect(categoryFacet.changeActivePath).toHaveBeenCalled();
            });
            it('calls scrollToTop on click', function () {
                var categoryValue = buildCategoryValue().makeSelectable();
                spyOn(categoryFacet, 'scrollToTop');
                Core_1.$$(categoryValueElement(categoryValue)).trigger('click');
                expect(categoryFacet.scrollToTop).toHaveBeenCalled();
            });
            it('calls scrollToTop on enter keyup', function () {
                var categoryValue = buildCategoryValue().makeSelectable();
                spyOn(categoryFacet, 'scrollToTop');
                Simulate_1.Simulate.keyUp(categoryValueElement(categoryValue), Core_1.KEYBOARD.ENTER);
                expect(categoryFacet.scrollToTop).toHaveBeenCalled();
            });
        });
        it('does not call changeActivePath on click by default', function () {
            var categoryValue = buildCategoryValue();
            spyOn(categoryFacet, 'changeActivePath');
            Core_1.$$(categoryValueElement(categoryValue)).trigger('click');
            expect(categoryFacet.changeActivePath).not.toHaveBeenCalled();
        });
        it('does not call changeActivePath on enter keyup by default', function () {
            var categoryValue = buildCategoryValue();
            spyOn(categoryFacet, 'changeActivePath');
            Simulate_1.Simulate.keyUp(categoryValueElement(categoryValue), Core_1.KEYBOARD.ENTER);
            expect(categoryFacet.changeActivePath).not.toHaveBeenCalled();
        });
        it('displays the categoryValueDescriptor #value by default', function () {
            var categoryValue = buildCategoryValue();
            var facetValue = categoryValue.element.find('.coveo-category-facet-value-caption').textContent;
            expect(facetValue).toBe(categoryValueDescriptor.value);
        });
        describe("when the categoryFacet #valueCaption option has a key that matches the categoryValueDescriptor #value", function () {
            var caption = 'caption';
            beforeEach(function () {
                var valueCaption = (_a = {}, _a[categoryValueDescriptor.value] = caption, _a);
                categoryFacetOptions.valueCaption = valueCaption;
                initCategoryFacet();
                var _a;
            });
            it("displays the caption instead of the original value", function () {
                var categoryValue = buildCategoryValue();
                var facetValue = categoryValue.element.find('.coveo-category-facet-value-caption').textContent;
                expect(facetValue).toBe(caption);
            });
            describe('when the categoryValue is selectable', function () {
                var labelElement;
                beforeEach(function () {
                    var categoryValue = buildCategoryValue().makeSelectable();
                    labelElement = categoryValue.element.find('.coveo-category-facet-value-label');
                });
                it('adds a label containing the captioned value', function () {
                    var labelAttribute = labelElement.attributes['aria-label'];
                    expect(labelAttribute.value).toContain(caption);
                });
                it('adds a label containing the results count', function () {
                    var labelAttribute = labelElement.attributes['aria-label'];
                    expect(labelAttribute.value).toContain(categoryValueDescriptor.count);
                });
                it("doesn't add plural tags", function () {
                    var labelAttribute = labelElement.attributes['aria-label'];
                    expect(labelAttribute.value).not.toContain('<pl>');
                });
                it('uses the plural form of ResultCount', function () {
                    var labelAttribute = labelElement.attributes['aria-label'];
                    expect(labelAttribute.value).toMatch(/results$/);
                });
                describe('and there are no results', function () {
                    beforeEach(function () {
                        categoryValueDescriptor.count = 0;
                        var categoryValue = buildCategoryValue().makeSelectable();
                        labelElement = categoryValue.element.find('.coveo-category-facet-value-label');
                    });
                    it('uses the singular form of resultCount', function () {
                        var labelAttribute = labelElement.attributes['aria-label'];
                        expect(labelAttribute.value).toMatch(/result$/);
                    });
                });
            });
        });
    });
}
exports.CategoryValueTest = CategoryValueTest;
 
 
/***/ }),
/* 1779 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var CategoryFacetHeader_1 = __webpack_require__(688);
var CategoryFacetTest_1 = __webpack_require__(867);
var Dom_1 = __webpack_require__(0);
var CategoryFacet_1 = __webpack_require__(71);
var Mock = __webpack_require__(2);
var Simulate_1 = __webpack_require__(15);
function CategoryFacetHeaderTest() {
    describe('CategoryFacetHeader', function () {
        var categoryFacetHeader;
        var test;
        var simulateQueryData;
        var baseOptions;
        function initCategoryFacetHeader() {
            categoryFacetHeader = new CategoryFacetHeader_1.CategoryFacetHeader(baseOptions);
            categoryFacetHeader.build();
        }
        function eraserElement() {
            return Dom_1.$$(categoryFacetHeader.element).find('.coveo-category-facet-header-eraser');
        }
        function titleElement() {
            return Dom_1.$$(categoryFacetHeader.element).find('.coveo-category-facet-title');
        }
        beforeEach(function () {
            simulateQueryData = CategoryFacetTest_1.buildCategoryFacetResults();
            test = Mock.advancedComponentSetup(CategoryFacet_1.CategoryFacet, new Mock.AdvancedComponentSetupOptions(null, { field: '@field' }, function (env) { return env.withLiveQueryStateModel(); }));
            baseOptions = {
                categoryFacet: test.cmp,
                title: 'foo'
            };
            initCategoryFacetHeader();
        });
        afterEach(function () {
            baseOptions = null;
            categoryFacetHeader = null;
        });
        it('should build a title', function () {
            expect(Dom_1.$$(titleElement()).text()).toBe(baseOptions.title);
        });
        it('the title should be accessible', function () {
            expect(titleElement().getAttribute('role')).toBe('heading');
            expect(titleElement().getAttribute('aria-level')).toBe('2');
            expect(titleElement().getAttribute('aria-label')).toBeTruthy();
        });
        describe('when the facet has one selected value', function () {
            beforeEach(function () {
                Simulate_1.Simulate.query(test.env, simulateQueryData);
                baseOptions.categoryFacet.selectValue('value9');
            });
            it('value should be correctly selected', function () {
                expect(baseOptions.categoryFacet.activePath).toEqual(['value9']);
            });
            it('eraser bouton should be accessible', function () {
                expect(eraserElement().getAttribute('role')).toBe('button');
                expect(eraserElement().getAttribute('aria-label')).toBeTruthy();
            });
            it('when clicking the eraser, it should reset the value', function () {
                eraserElement().click();
                expect(baseOptions.categoryFacet.activePath).toEqual([]);
            });
            it('when clicking the eraser, it should call "scrollToTop" on the facet', function () {
                spyOn(baseOptions.categoryFacet, 'scrollToTop');
                eraserElement().click();
                expect(baseOptions.categoryFacet.scrollToTop).toHaveBeenCalled();
            });
        });
    });
}
exports.CategoryFacetHeaderTest = CategoryFacetHeaderTest;
 
 
/***/ }),
/* 1780 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var DynamicHierarchicalFacetBreadcrumb_1 = __webpack_require__(852);
var DynamicHierarchicalFacetTestUtils_1 = __webpack_require__(128);
var Core_1 = __webpack_require__(9);
var AnalyticsActionListMeta_1 = __webpack_require__(7);
function DynamicHierarchicalFacetBreadcrumbTest() {
    describe('DynamicHierarchicalFacetBreadcrumb', function () {
        var facet;
        var breadcrumbs;
        function titleElement() {
            return Core_1.$$(breadcrumbs.element).find('.coveo-dynamic-facet-breadcrumb-title');
        }
        function valueElement() {
            return Core_1.$$(breadcrumbs.element).find('.coveo-dynamic-facet-breadcrumb-value');
        }
        describe('with standard values', function () {
            beforeEach(function () {
                initializeComponent();
            });
            function initializeComponent() {
                facet = DynamicHierarchicalFacetTestUtils_1.DynamicHierarchicalFacetTestUtils.createAdvancedFakeFacet().cmp;
                facet.values.createFromResponse(DynamicHierarchicalFacetTestUtils_1.DynamicHierarchicalFacetTestUtils.getCompleteFacetResponse(facet));
                facet.selectPath(['test', 'allo']);
                breadcrumbs = new DynamicHierarchicalFacetBreadcrumb_1.DynamicHierarchicalFacetBreadcrumb(facet);
            }
            it('should create a title', function () {
                expect(titleElement().innerText).toBe(facet.options.title + ":");
            });
            it('should create a value with the right path', function () {
                expect(valueElement().childNodes[0].nodeValue).toBe('test / allo');
            });
            it("when clicking on a breadcrumb value element\n        it should clear the facet value", function () {
                spyOn(facet, 'reset');
                spyOn(facet, 'triggerNewQuery');
                Core_1.$$(valueElement()).trigger('click');
                expect(facet.reset).toHaveBeenCalled();
                expect(facet.triggerNewQuery).toHaveBeenCalled();
            });
            it("when clicking on a breadcrumb value element\n        it should trigger a new query", function () {
                spyOn(facet, 'triggerNewQuery');
                Core_1.$$(valueElement()).trigger('click');
                expect(facet.triggerNewQuery).toHaveBeenCalled();
            });
            it("when clicking on a breadcrumb value element\n        it call reset on the facet", function () {
                spyOn(facet, 'reset');
                Core_1.$$(valueElement()).trigger('click');
                expect(facet.reset).toHaveBeenCalled();
            });
            it("when clicking on a breadcrumb value element\n        it should log an analytics event", function () {
                spyOn(facet, 'logAnalyticsEvent');
                facet.triggerNewQuery = function (beforeExecuteQuery) {
                    beforeExecuteQuery();
                };
                Core_1.$$(valueElement()).trigger('click');
                expect(facet.logAnalyticsEvent).toHaveBeenCalledWith(AnalyticsActionListMeta_1.analyticsActionCauseList.breadcrumbFacet);
            });
            it('should have the correct aria-label for a selected value', function () {
                expect(valueElement().getAttribute('aria-label')).toBe('Remove inclusion filter on test / allo');
            });
        });
        describe('with malicious value', function () {
            beforeEach(function () {
                initializeComponent();
            });
            function initializeComponent() {
                facet = DynamicHierarchicalFacetTestUtils_1.DynamicHierarchicalFacetTestUtils.createAdvancedFakeFacet().cmp;
                facet.values.createFromResponse(DynamicHierarchicalFacetTestUtils_1.DynamicHierarchicalFacetTestUtils.getCompleteFacetResponse(facet));
                facet.selectPath(['<iframe>', '<img onload="">']);
                breadcrumbs = new DynamicHierarchicalFacetBreadcrumb_1.DynamicHierarchicalFacetBreadcrumb(facet);
            }
            it('should create a value with the right path', function () {
                expect(valueElement().textContent).toContain('<iframe> / <img onload="">');
            });
        });
    });
}
exports.DynamicHierarchicalFacetBreadcrumbTest = DynamicHierarchicalFacetBreadcrumbTest;
 
 
/***/ }),
/* 1781 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Grammar_1 = __webpack_require__(154);
var ExpressionConstant_1 = __webpack_require__(263);
var ExpressionRef_1 = __webpack_require__(378);
var ExpressionOptions_1 = __webpack_require__(380);
var ExpressionList_1 = __webpack_require__(382);
var ExpressionRegExp_1 = __webpack_require__(381);
var Grammars_1 = __webpack_require__(804);
function GrammarTest() {
    describe('Grammar Expression Builder build expression of type', function () {
        it('ExpressionConstant', function () {
            var exp = Grammar_1.Grammar.buildExpression('foo', 'id', null);
            expect(exp).toEqual(jasmine.any(ExpressionConstant_1.ExpressionConstant));
        });
        it('ExpressionRef', function () {
            var exp = Grammar_1.Grammar.buildExpression('[foo]', 'id', null);
            expect(exp).toEqual(jasmine.any(ExpressionRef_1.ExpressionRef));
            expect(exp.ref).toBe('foo');
            expect(exp.occurrence).toBeNull();
            exp = Grammar_1.Grammar.buildExpression('[foo?]', 'id', null);
            expect(exp).toEqual(jasmine.any(ExpressionRef_1.ExpressionRef));
            expect(exp.ref).toBe('foo');
            expect(exp.occurrence).toBe('?');
            exp = Grammar_1.Grammar.buildExpression('[foo{2}]', 'id', null);
            expect(exp).toEqual(jasmine.any(ExpressionRef_1.ExpressionRef));
            expect(exp.ref).toBe('foo');
            expect(exp.occurrence).toBe(2);
        });
        it('ExpressionOptions', function () {
            var exp = Grammar_1.Grammar.buildExpression(['foo', 'bar'], 'id', null);
            expect(exp).toEqual(jasmine.any(ExpressionOptions_1.ExpressionOptions));
            expect(exp.parts.length).toBe(2);
        });
        it('ExpressionList', function () {
            // this generate a list because at [ he do not know if it will be a ref start
            var exp1 = Grammar_1.Grammar.buildExpression('foo[bar', 'id', null);
            expect(exp1).toEqual(jasmine.any(ExpressionList_1.ExpressionList));
            var exp2 = Grammar_1.Grammar.buildExpression('foo[bar]', 'id', null);
            expect(exp2).toEqual(jasmine.any(ExpressionList_1.ExpressionList));
        });
        it('ExpressionRegExp', function () {
            var exp = Grammar_1.Grammar.buildExpression(/foo/, 'id', null);
            expect(exp).toEqual(jasmine.any(ExpressionRegExp_1.ExpressionRegExp));
        });
    });
    // http://pegjs.org/online
    /*
     A = "A" B?
     B = "B" C
     C = "C"
     */
    describe('ABC Grammar parse correctly', function () {
        var FakeGrammar = new Grammar_1.Grammar('A', {
            A: 'A[B?]',
            B: 'B[C+]',
            C: 'C'
        });
        var FakeGrammar2 = new Grammar_1.Grammar('A', {
            A: '[B][C*]',
            B: 'B',
            C: 'C[B]'
        });
        it('Empty String', function () {
            var result = FakeGrammar.parse('');
            expect(result.isSuccess()).toBeFalsy();
            expect(result.getHumanReadableExpect()).toBe('Expected "A" but end of input found.');
        });
        it('"A"', function () {
            var result = FakeGrammar.parse('A');
            expect(result.isSuccess()).toBeTruthy();
        });
        it('"AB"', function () {
            var result = FakeGrammar.parse('AB');
            expect(result.isSuccess()).toBeFalsy();
            expect(result.getHumanReadableExpect()).toBe('Expected "C" but end of input found.');
        });
        it('"ABC"', function () {
            var result = FakeGrammar.parse('ABC');
            expect(result.isSuccess()).toBeTruthy();
        });
        it('"AC"', function () {
            var result = FakeGrammar.parse('AC');
            expect(result.isSuccess()).toBeFalsy();
            expect(result.getHumanReadableExpect()).toBe('Expected "B" but "C" found.');
        });
        it('"ABBC"', function () {
            var result = FakeGrammar.parse('ABBC');
            expect(result.isSuccess()).toBeFalsy();
            expect(result.getHumanReadableExpect()).toBe('Expected "C" but "B" found.');
        });
        it('"BC"', function () {
            var result = FakeGrammar2.parse('BC');
            expect(result.isSuccess()).toBeFalsy();
            expect(result.getHumanReadableExpect()).toBe('Expected "B" but end of input found.');
        });
        it('"BCBB"', function () {
            var result = FakeGrammar2.parse('BCBB');
            expect(result.isSuccess()).toBeFalsy();
            expect(result.getHumanReadableExpect()).toBe('Expected end of input or "C" but "B" found.');
            expect(result.clean().toString()).toBe('BCBB');
        });
    });
    /*
    bcbb
    
     Expr = Product / Sum / Value
     Value = SubExpr / Number
     SubExpr = "(" Expr ")"
     Number = [0-9]+
     Product = Value "*" Value
     Sum= Value "+" Value
    
     */
    describe('Math Grammar parse correctly', function () {
        var FakeGrammar = new Grammar_1.Grammar('Expr', {
            Expr: ['Product', 'Sum', 'Value'],
            Value: ['SubExpr', 'Number'],
            SubExpr: '([Expr])',
            Number: /([1-9][0-9]*|0)(\.[0-9]+)?/,
            Product: '[Value]*[Value]',
            Sum: '[Value]+[Value]'
        });
        it('Empty String', function () {
            var result = FakeGrammar.parse('');
            expect(result.isSuccess()).toBeFalsy();
            expect(result.getHumanReadableExpect()).toBe('Expected Expr but end of input found.');
        });
        it('"1"', function () {
            var result = FakeGrammar.parse('1');
            expect(result.isSuccess()).toBeTruthy();
        });
        it('"1+"', function () {
            var result = FakeGrammar.parse('1+');
            expect(result.isSuccess()).toBeFalsy();
            expect(result.getHumanReadableExpect()).toBe('Expected Value but end of input found.');
        });
        it('"1+2"', function () {
            var result = FakeGrammar.parse('1+2');
            expect(result.isSuccess()).toBeTruthy();
        });
        it('"1+2+"', function () {
            var result = FakeGrammar.parse('1+2+');
            expect(result.isSuccess()).toBeFalsy();
            expect(result.getHumanReadableExpect()).toBe('Expected end of input but "+" found.');
        });
        it('"1+2+3"', function () {
            var result = FakeGrammar.parse('1+2+3');
            expect(result.isSuccess()).toBeFalsy();
            expect(result.getHumanReadableExpect()).toBe('Expected end of input but "+" found.');
        });
        it('"(1+2)+3"', function () {
            var result = FakeGrammar.parse('(1+2)+3');
            expect(result.isSuccess()).toBeTruthy();
        });
    });
    describe('Coveo Field Grammar parse correctly', function () {
        var completeExpressions = Grammars_1.Grammars.Expressions(Grammars_1.Grammars.Complete);
        var coveoGrammar = new Grammar_1.Grammar(completeExpressions.start, completeExpressions.expressions);
        it('Empty String', function () {
            var result = coveoGrammar.parse('');
            expect(result.isSuccess()).toBeTruthy();
        });
        it('"@fieldName"', function () {
            var result = coveoGrammar.parse('@fieldName');
            expect(result.isSuccess()).toBeTruthy();
        });
        it('"@fieldName="', function () {
            var result = coveoGrammar.parse('@fieldName=');
            expect(result.isSuccess()).toBeFalsy();
            expect(result.getHumanReadableExpect()).toBe('Expected FieldValue but end of input found.');
            console.log(result.clean());
        });
        it('"@fieldName=value"', function () {
            var result = coveoGrammar.parse('@fieldName=value');
            expect(result.isSuccess()).toBeTruthy();
        });
        it('"@fieldName=(value"', function () {
            var result = coveoGrammar.parse('@fieldName=(value');
            expect(result.isSuccess()).toBeFalsy();
            expect(result.getHumanReadableExpect()).toBe('Expected FieldValueSeparator or ")" but end of input found.');
        });
        it('"@fieldName=(value)"', function () {
            var result = coveoGrammar.parse('@fieldName=(value)');
            expect(result.isSuccess()).toBeTruthy();
        });
        it('"@fieldName=(value,)"', function () {
            var result = coveoGrammar.parse('@fieldName=(value,)');
            expect(result.isSuccess()).toBeFalsy();
            expect(result.getHumanReadableExpect()).toBe('Expected FieldValueString but ")" found.');
        });
        it('"@fieldName=(value, abc)"', function () {
            var result = coveoGrammar.parse('@fieldName=(value, abc)');
            expect(result.isSuccess()).toBeTruthy();
        });
        it('"word @fieldName=(value, abc)"', function () {
            var result = coveoGrammar.parse('word @fieldName=(value, abc)');
            expect(result.isSuccess()).toBeTruthy();
        });
        it('"word @fieldName =  (value  , abc)"', function () {
            var result = coveoGrammar.parse('word @fieldName =  (value  , abc)');
            expect(result.isSuccess()).toBeTruthy();
        });
        it('"@fieldName=value]"', function () {
            var result = coveoGrammar.parse('@fieldName=value]');
            expect(result.isSuccess()).toBeFalsy();
            expect(result.getHumanReadableExpect()).toBe('Expected Spaces or end of input but "]" found.');
        });
        it('"word (word2"', function () {
            var result = coveoGrammar.parse('word (word2');
            expect(result.isSuccess()).toBeFalsy();
            expect(result.getHumanReadableExpect()).toBe('Expected ":" or Spaces or ")" but end of input found.');
        });
        it('"word(word2)"', function () {
            var result = coveoGrammar.parse('word(word2)');
            expect(result.isSuccess()).toBeFalsy();
            expect(result.getHumanReadableExpect()).toBe('Expected ":" or Spaces or end of input but "(" found.');
        });
        it('"word (word2)"', function () {
            var result = coveoGrammar.parse('word (word2)');
            expect(result.isSuccess()).toBeTruthy();
        });
        it('"word OR (word2)"', function () {
            var result = coveoGrammar.parse('word OR (word2)');
            expect(result.isSuccess()).toBeTruthy();
        });
        it('"word OR"', function () {
            var result = coveoGrammar.parse('word OR');
            expect(result.isSuccess()).toBeTruthy();
        });
        it('"(word OR (word2))"', function () {
            var result = coveoGrammar.parse('(word OR (word2))');
            expect(result.isSuccess()).toBeTruthy();
        });
        it('"word @"', function () {
            var result = coveoGrammar.parse('word @');
            expect(result.isSuccess()).toBeFalsy();
            expect(result.getHumanReadableExpect()).toBe('Expected FieldName but end of input found.');
        });
        it('"foo ( bar foo )"', function () {
            var result = coveoGrammar.parse('foo ( bar foo )');
            expect(result.isSuccess()).toBeTruthy();
        });
        it('"foo bar"', function () {
            var result = coveoGrammar.parse('foo bar');
            expect(result.isSuccess()).toBeTruthy();
            expect(result.clean().toString()).toBe('foo bar');
        });
        it('"$extension("', function () {
            var result = coveoGrammar.parse('$extension(');
            expect(result.isSuccess()).toBeFalsy();
            expect(result.getHumanReadableExpect()).toBe('Expected QueryExtensionArgumentName but end of input found.');
        });
        it('"$extension(a"', function () {
            var result = coveoGrammar.parse('$extension(a');
            expect(result.isSuccess()).toBeFalsy();
            expect(result.getHumanReadableExpect()).toBe('Expected ":" but end of input found.');
        });
        it('"$extension(a:"', function () {
            var result = coveoGrammar.parse('$extension(a:');
            expect(result.isSuccess()).toBeFalsy();
            expect(result.getHumanReadableExpect()).toBe('Expected QueryExtensionArgumentValue but end of input found.');
        });
        it('"$extension(a:value"', function () {
            var result = coveoGrammar.parse('$extension(a:value');
            expect(result.isSuccess()).toBeFalsy();
            expect(result.getHumanReadableExpect()).toBe('Expected ":" or Spaces or "," or ")" but end of input found.');
        });
        it('"$extension(a:value)"', function () {
            var result = coveoGrammar.parse('$extension(a:value)');
            expect(result.isSuccess()).toBeTruthy();
        });
        it('"$extension(a:value,"', function () {
            var result = coveoGrammar.parse('$extension(a:value,');
            expect(result.isSuccess()).toBeFalsy();
            expect(result.getHumanReadableExpect()).toBe('Expected QueryExtensionArgumentName but end of input found.');
        });
        it('"$extension(a:value,b"', function () {
            var result = coveoGrammar.parse('$extension(a:value,b');
            expect(result.isSuccess()).toBeFalsy();
            expect(result.getHumanReadableExpect()).toBe('Expected ":" but end of input found.');
        });
        it('"$extension(a:value,b:"', function () {
            var result = coveoGrammar.parse('$extension(a:value,b:');
            expect(result.isSuccess()).toBeFalsy();
            expect(result.getHumanReadableExpect()).toBe('Expected QueryExtensionArgumentValue but end of input found.');
        });
        it('"$extension(a:value,b:\'"', function () {
            var result = coveoGrammar.parse("$extension(a:value,b:'");
            expect(result.isSuccess()).toBeFalsy();
            expect(result.getHumanReadableExpect()).toBe('Expected "\'" but end of input found.');
        });
        it('"$extension(a:value,b:\'abc\')"', function () {
            var result = coveoGrammar.parse("$extension(a:value,b:'abc')");
            expect(result.isSuccess()).toBeTruthy();
        });
        it('"["', function () {
            var result = coveoGrammar.parse('[');
            expect(result.isSuccess()).toBeFalsy();
            expect(result.getHumanReadableExpect()).toBe('Expected "[" but end of input found.');
        });
        it('"[["', function () {
            var result = coveoGrammar.parse('[[');
            expect(result.isSuccess()).toBeFalsy();
            expect(result.getHumanReadableExpect()).toBe('Expected "@" but end of input found.');
        });
        it('"[[@field"', function () {
            var result = coveoGrammar.parse('[[@field');
            expect(result.isSuccess()).toBeFalsy();
            expect(result.getHumanReadableExpect()).toBe('Expected "]" but end of input found.');
        });
        it('"[[@field]"', function () {
            var result = coveoGrammar.parse('[[@field]');
            expect(result.isSuccess()).toBeFalsy();
            expect(result.getHumanReadableExpect()).toBe('Expected Expression but end of input found.');
        });
        it('"[[@field]]"', function () {
            var result = coveoGrammar.parse('[[@field]]');
            expect(result.isSuccess()).toBeFalsy();
            expect(result.getHumanReadableExpect()).toBe('Expected Expression but "]" found.');
        });
        it('"[[@field] @sysuri"', function () {
            var result = coveoGrammar.parse('[[@field] @sysuri');
            expect(result.isSuccess()).toBeFalsy();
            expect(result.getHumanReadableExpect()).toBe('Expected FieldQueryOperation or Spaces or "]" but end of input found.');
        });
        it('"[[@field] @sysuri]"', function () {
            var result = coveoGrammar.parse('[[@field] @sysuri]');
            expect(result.isSuccess()).toBeTruthy();
        });
        it('""Not Quoted""', function () {
            var result = coveoGrammar.parse('"Not Quoted"');
            expect(result.isSuccess()).toBeTruthy();
        });
        it('" start with space"', function () {
            var result = coveoGrammar.parse(' start with space');
            expect(result.isSuccess()).toBeTruthy();
        });
        it('"end with space "', function () {
            var result = coveoGrammar.parse('end with space ');
            expect(result.isSuccess()).toBeTruthy();
        });
        it('"@fieldName<now"', function () {
            var result = coveoGrammar.parse('@fieldName<now');
            expect(result.isSuccess()).toBeTruthy();
        });
        it('"@fieldName<now-d"', function () {
            var result = coveoGrammar.parse('@fieldName<now-d');
            expect(result.isSuccess()).toBeFalsy();
            expect(result.getHumanReadableExpect()).toBe('Expected DateRelativeNegativeRef or Spaces or end of input but "-" found.');
        });
        it('"@fieldName<now-1d"', function () {
            var result = coveoGrammar.parse('@fieldName<now-1d');
            expect(result.isSuccess()).toBeTruthy();
        });
        it('"@fieldName<10..420"', function () {
            var result = coveoGrammar.parse('@fieldName<10..420');
            expect(result.isSuccess()).toBeFalsy();
            expect(result.getHumanReadableExpect()).toBe('Expected Spaces or end of input but "." found.');
        });
        it('"@fieldName=10..420"', function () {
            var result = coveoGrammar.parse('@fieldName=10..420');
            expect(result.isSuccess()).toBeTruthy();
        });
        it('"@fieldName=420"', function () {
            var result = coveoGrammar.parse('@fieldName=420');
            expect(result.isSuccess()).toBeTruthy();
        });
        it('"@fieldName<420"', function () {
            var result = coveoGrammar.parse('@fieldName<420');
            expect(result.isSuccess()).toBeTruthy();
        });
        it('"@fieldName<4.20"', function () {
            var result = coveoGrammar.parse('@fieldName<4.20');
            expect(result.isSuccess()).toBeTruthy();
        });
        it('"@fieldName<4,20"', function () {
            var result = coveoGrammar.parse('@fieldName<4,20');
            expect(result.isSuccess()).toBeFalsy();
        });
        it('"@fieldName<-4.20"', function () {
            var result = coveoGrammar.parse('@fieldName<-4.20');
            expect(result.isSuccess()).toBeTruthy();
        });
        it('"@fieldName<4.20.20"', function () {
            var result = coveoGrammar.parse('@fieldName<4.20.20');
            expect(result.isSuccess()).toBeFalsy();
        });
        it('@fieldName>=2000/01/01', function () {
            var result = coveoGrammar.parse('@fieldName>=2000/01/01');
            expect(result.isSuccess()).toBeTruthy();
        });
        it('@fieldName<=2000/01/01', function () {
            var result = coveoGrammar.parse('@fieldName<=2000/01/01');
            expect(result.isSuccess()).toBeTruthy();
        });
        it('@fieldName>2000/01/01', function () {
            var result = coveoGrammar.parse('@fieldName>2000/01/01');
            expect(result.isSuccess()).toBeTruthy();
        });
        it('@fieldName<2000/01/01', function () {
            var result = coveoGrammar.parse('@fieldName<2000/01/01');
            expect(result.isSuccess()).toBeTruthy();
        });
        it('@fieldName==2000/01/01', function () {
            var result = coveoGrammar.parse('@fieldName==2000/01/01');
            expect(result.isSuccess()).toBeTruthy();
        });
    });
}
exports.GrammarTest = GrammarTest;
 
 
/***/ }),
/* 1782 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __assign = (this && this.__assign) || Object.assign || function(t) {
    for (var s, i = 1, n = arguments.length; i < n; i++) {
        s = arguments[i];
        for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
            t[p] = s[p];
    }
    return t;
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { Iif (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        Iif (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            Iif (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
            Iif (y = 0, t) op = [0, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    Eif (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        Iif (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
Object.defineProperty(exports, "__esModule", { value: true });
var InputManager_1 = __webpack_require__(384);
var SuggestionsManager_1 = __webpack_require__(265);
var Dom_1 = __webpack_require__(0);
var Utils_1 = __webpack_require__(5);
var MockEnvironment_1 = __webpack_require__(2);
var Core_1 = __webpack_require__(9);
var underscore_1 = __webpack_require__(1);
var ResultPreviewsManagerEvents_1 = __webpack_require__(198);
function deferAsync() {
    return Promise.resolve();
}
function forEachAsync(values, callbackfn) {
    return __awaiter(this, void 0, void 0, function () {
        var accumulatedValues, i, _a, _b;
        return __generator(this, function (_c) {
            switch (_c.label) {
                case 0:
                    accumulatedValues = [];
                    i = 0;
                    _c.label = 1;
                case 1:
                    if (!(i < values.length)) return [3 /*break*/, 4];
                    _b = (_a = accumulatedValues).push;
                    return [4 /*yield*/, callbackfn(values[i], i, values)];
                case 2:
                    _b.apply(_a, [_c.sent()]);
                    _c.label = 3;
                case 3:
                    i++;
                    return [3 /*break*/, 1];
                case 4: return [2 /*return*/, accumulatedValues];
            }
        });
    });
}
function SuggestionsManagerTest() {
    var _this = this;
    describe('SuggestionsManager', function () {
        var LOCKED_LOCKER_SERVICE_ELEMENT = {};
        var suggestionClass = 'selectable';
        var selectedClass = 'selected';
        describe('with preappended suggestions', function () {
            var container;
            var suggestionContainer;
            var suggestionManager;
            var suggestion;
            var elementInsideSuggestion;
            beforeEach(function () {
                buildContainer();
                var inputManager = new InputManager_1.InputManager(document.createElement('div'), function () { }, {});
                suggestionManager = new SuggestionsManager_1.SuggestionsManager(suggestionContainer.el, document.createElement('div'), inputManager, {
                    selectedClass: selectedClass,
                    suggestionClass: suggestionClass
                });
                suggestionManager.updateSuggestions([buildSuggestion()]);
            });
            it('builds suggestions parent correctly when adding a suggestion', function () {
                suggestionManager.updateSuggestions([{}]);
                expect(suggestionManager.hasSuggestions).toBe(true);
                expect(Dom_1.$$(suggestionContainer).hasClass('magic-box-hasSuggestion')).toBe(true);
                var suggestionsElement = Dom_1.$$(suggestionContainer).find('.coveo-magicbox-suggestions');
                expect(suggestionsElement).toBeTruthy();
                expect(suggestionsElement.children.length).toBe(1);
                expect(suggestionsElement.getAttribute('role')).toBe('listbox');
                expect(suggestionsElement.getAttribute('aria-label')).toBe('Search Suggestions');
            });
            it('adds an empty option child to the suggestions parent when emptying sugggestions', function () {
                // Start by adding a suggestion so that elements are correctly created first
                suggestionManager.updateSuggestions([{}]);
                suggestionManager.updateSuggestions([]);
                expect(suggestionManager.hasSuggestions).toBe(false);
                expect(Dom_1.$$(suggestionContainer).hasClass('magic-box-hasSuggestion')).toBe(false);
                var suggestionsElement = Dom_1.$$(suggestionContainer).find('.coveo-magicbox-suggestions');
                expect(suggestionsElement.childElementCount).toBe(1);
                expect(suggestionsElement.firstChild.textContent).toBe('');
            });
            it('builds suggestion children correctly when adding a suggestion', function () {
                suggestionManager.updateSuggestions([{}]);
                var suggestionElement = Dom_1.$$(suggestionContainer).find('#magic-box-suggestion-0');
                expect(suggestionElement).toBeTruthy();
                expect(suggestionElement.getAttribute('role')).toBe('option');
            });
            it('returns the correct selected element with keyboard on move down', function () {
                suggestionManager.moveDown();
                var selectedWithKeyboard = suggestionManager.selectAndReturnKeyboardFocusedElement();
                expect(Dom_1.$$(selectedWithKeyboard).hasClass(selectedClass)).toBe(true);
                expect(Dom_1.$$(selectedWithKeyboard).getAttribute('aria-selected')).toBe('true');
                expect(selectedWithKeyboard).toBe(suggestion.el);
            });
            it('clearKeyboardFocusedElement sets the keyboard focused element to null', function () {
                suggestionManager.moveDown();
                suggestionManager.clearKeyboardFocusedElement();
                expect(suggestionManager.selectAndReturnKeyboardFocusedElement()).toBeNull();
            });
            it('returns the correct selected element with keyboard on move up', function () {
                suggestionManager.moveUp();
                var selectedWithKeyboard = suggestionManager.selectAndReturnKeyboardFocusedElement();
                expect(Dom_1.$$(selectedWithKeyboard).hasClass(selectedClass)).toBe(true);
                expect(Dom_1.$$(selectedWithKeyboard).getAttribute('aria-selected')).toBe('true');
                expect(selectedWithKeyboard).toBe(suggestion.el);
            });
            it('returns the correct selected element with keyboard on move left', function () {
                suggestionManager.moveLeft();
                var selectedWithKeyboard = suggestionManager.selectAndReturnKeyboardFocusedElement();
                expect(Dom_1.$$(selectedWithKeyboard).hasClass(selectedClass)).toBe(true);
                expect(Dom_1.$$(selectedWithKeyboard).getAttribute('aria-selected')).toBe('true');
                expect(selectedWithKeyboard).toBe(suggestion.el);
            });
            it('returns the correct selected element with keyboard on move right', function () {
                suggestionManager.moveRight();
                var selectedWithKeyboard = suggestionManager.selectAndReturnKeyboardFocusedElement();
                expect(Dom_1.$$(selectedWithKeyboard).hasClass(selectedClass)).toBe(true);
                expect(Dom_1.$$(selectedWithKeyboard).getAttribute('aria-selected')).toBe('true');
                expect(selectedWithKeyboard).toBe(suggestion.el);
            });
            it('return no selected element with successive call to selectAndReturnKeyboardFocusedElement()', function () {
                suggestionManager.moveDown();
                var selectedWithKeyboard = suggestionManager.selectAndReturnKeyboardFocusedElement();
                expect(selectedWithKeyboard).toBeDefined();
                var repeatCallToSelectedWithKeyboard = suggestionManager.selectAndReturnKeyboardFocusedElement();
                expect(repeatCallToSelectedWithKeyboard).toBeNull();
            });
            it('return no selected element with keyboard on mouse over', function () {
                suggestionManager.handleMouseOver({
                    target: suggestion.el
                });
                var selectedWithKeyboard = suggestionManager.selectAndReturnKeyboardFocusedElement();
                expect(selectedWithKeyboard).toBeNull();
            });
            it('return no selected element with keyboard on mouse over following a move down', function () {
                suggestionManager.moveDown();
                suggestionManager.handleMouseOver({
                    target: suggestion.el
                });
                var selectedWithKeyboard = suggestionManager.selectAndReturnKeyboardFocusedElement();
                expect(selectedWithKeyboard).toBeNull();
            });
            it('return no selected element with keyboard on mouse over following a move up', function () {
                suggestionManager.moveUp();
                suggestionManager.handleMouseOver({
                    target: suggestion.el
                });
                var selectedWithKeyboard = suggestionManager.selectAndReturnKeyboardFocusedElement();
                expect(selectedWithKeyboard).toBeNull();
            });
            it('adds selected class and sets aria-selected to true when moving on element that is selectable', function () {
                suggestionManager.handleMouseOver({
                    target: suggestion.el
                });
                expect(suggestion.hasClass(selectedClass)).toBe(true);
                expect(suggestion.getAttribute('aria-selected')).toBe('true');
            });
            it('adds selected class and sets aria-selected to true when moving on element that contains a selectable element and does not throw', function () {
                var suggestionWrapper = Dom_1.$$(document.createElement('div'));
                suggestionWrapper.el.appendChild(suggestion.el);
                suggestionManager.updateSuggestions([{ dom: suggestionWrapper.el }]);
                suggestionManager.handleMouseOver({
                    target: suggestion.el
                });
                expect(suggestion.hasClass(selectedClass)).toBe(true);
                expect(suggestion.getAttribute('aria-selected')).toBe('true');
            });
            it('adds selected class and sets aria-selected to true when moving on element that is inside a selectable element', function () {
                suggestionManager.handleMouseOver({
                    target: elementInsideSuggestion.el
                });
                expect(suggestion.hasClass(selectedClass)).toBe(true);
                expect(suggestion.getAttribute('aria-selected')).toBe('true');
            });
            it('removes selected class and sets aria-selected to false when moving off a selected element', function () {
                suggestion.addClass(selectedClass);
                suggestion.setAttribute('aria-selected', 'true');
                suggestionManager.handleMouseOut({
                    target: suggestion.el,
                    relatedTarget: container.el
                });
                expect(suggestion.hasClass(selectedClass)).toBe(false);
                expect(suggestion.getAttribute('aria-selected')).toBe('false');
            });
            it('removes selected class and sets aria-selected to false when moving off a selected element in LockerService', function () {
                suggestion.addClass(selectedClass);
                suggestion.setAttribute('aria-selected', 'true');
                suggestionManager.handleMouseOut({
                    target: suggestion.el,
                    relatedTarget: LOCKED_LOCKER_SERVICE_ELEMENT
                });
                expect(suggestion.hasClass(selectedClass)).toBe(false);
                expect(suggestion.getAttribute('aria-selected')).toBe('false');
            });
            it('removes selected class and sets aria-selected to false when moving off an element that is inside a selected element', function () {
                suggestion.addClass(selectedClass);
                suggestion.setAttribute('aria-selected', 'true');
                suggestionManager.handleMouseOut({
                    target: elementInsideSuggestion.el,
                    relatedTarget: container.el
                });
                expect(suggestion.hasClass(selectedClass)).toBe(false);
                expect(suggestion.getAttribute('aria-selected')).toBe('false');
            });
            it('removes selected class and sets aria-selected to false when moving off an element that is inside a selected element in LockerService', function () {
                suggestion.addClass(selectedClass);
                suggestion.setAttribute('aria-selected', 'true');
                suggestionManager.handleMouseOut({
                    target: elementInsideSuggestion.el,
                    relatedTarget: LOCKED_LOCKER_SERVICE_ELEMENT
                });
                expect(suggestion.hasClass(selectedClass)).toBe(false);
                expect(suggestion.getAttribute('aria-selected')).toBe('false');
            });
            it('removes selected class and sets aria-selected to false when moving from a selected element to off the browser window', function () {
                suggestion.addClass(selectedClass);
                suggestion.setAttribute('aria-selected', 'true');
                suggestionManager.handleMouseOut({
                    target: suggestion.el
                });
                expect(suggestion.hasClass(selectedClass)).toBe(false);
                expect(suggestion.getAttribute('aria-selected')).toBe('false');
            });
            it('removes selected class and sets aria-selected to false when moving from an element inside a selected element to off the browser window', function () {
                suggestion.addClass(selectedClass);
                suggestion.setAttribute('aria-selected', 'true');
                suggestionManager.handleMouseOut({
                    target: elementInsideSuggestion.el
                });
                expect(suggestion.hasClass(selectedClass)).toBe(false);
                expect(suggestion.getAttribute('aria-selected')).toBe('false');
            });
            it('does not remove selected class or set aria-selected to false when moving element between two element inside the suggestion', function () {
                var someDeepElement = document.createElement('div');
                elementInsideSuggestion.el.appendChild(someDeepElement);
                suggestion.addClass(selectedClass);
                suggestion.setAttribute('aria-selected', 'true');
                suggestionManager.handleMouseOut({
                    target: elementInsideSuggestion.el,
                    relatedTarget: someDeepElement
                });
                expect(suggestion.hasClass(selectedClass)).toBe(true);
                expect(suggestion.getAttribute('aria-selected')).toBe('true');
            });
            function buildContainer() {
                container = Dom_1.$$(document.createElement('div'));
                suggestionContainer = Dom_1.$$(document.createElement('div'));
                container.el.appendChild(suggestionContainer.el);
            }
            function buildSuggestion() {
                var text = 'abc';
                suggestion = Dom_1.$$('div', {
                    className: suggestionClass,
                    'aria-selected': false
                }, (elementInsideSuggestion = Dom_1.$$('div', {}, text)));
                return { dom: suggestion.el, text: text, onSelect: function () { } };
            }
        });
        describe('with mock environment', function () {
            var env;
            function buildEnvironment() {
                return (env = new MockEnvironment_1.MockEnvironmentBuilder().build());
            }
            var magicBoxContainer;
            function buildMagicBoxContainer() {
                return (magicBoxContainer = Dom_1.$$('div'));
            }
            function mockInputManager() {
                return {
                    input: Dom_1.$$('input').el,
                    blur: jasmine.createSpy('blur'),
                    expanded: null,
                    activeDescendant: null
                };
            }
            var suggestionsManager;
            var inputManager;
            var timeout = 10;
            beforeEach(function () {
                suggestionsManager = new SuggestionsManager_1.SuggestionsManager(buildEnvironment().root, buildMagicBoxContainer().el, (inputManager = mockInputManager()), {
                    selectedClass: selectedClass,
                    suggestionClass: suggestionClass,
                    timeout: timeout
                });
            });
            it('sets the accesible role of MagicBox', function () {
                expect(magicBoxContainer.getAttribute('role')).toEqual('search');
            });
            it('sets aria-haspopup of MagicBox', function () {
                expect(magicBoxContainer.getAttribute('aria-haspopup')).toEqual('listbox');
            });
            it("sets aria-owns of InputManager to the id of SuggestionManager's listbox", function () {
                expect(inputManager.input.getAttribute('aria-owns')).toEqual(suggestionsManager.suggestionsListbox.getAttribute('id'));
            });
            it("sets aria-controls of InputManager to the id of SuggestionManager's listbox", function () {
                expect(inputManager.input.getAttribute('aria-controls')).toEqual(suggestionsManager.suggestionsListbox.getAttribute('id'));
            });
            it('sets aria-expanded of InputManager to false', function () {
                expect(inputManager.expanded).toEqual(false);
            });
            it("doesn't set activeDescendant in InputManager", function () {
                expect(inputManager.activeDescendant).toBeNull();
            });
            describe('calling receiveSuggestions', function () {
                var textSuggestions = ['4', 'right'];
                var suggestionOnSelects;
                var suggestions;
                function createSuggestions() {
                    suggestionOnSelects = textSuggestions.reduce(function (obj, text) {
                        return (__assign({}, obj, (_a = {}, _a[text] = jasmine.createSpy(text), _a)));
                        var _a;
                    }, {});
                    suggestions = textSuggestions.map(function (text) { return ({ text: text, onSelect: suggestionOnSelects[text] }); });
                }
                function receiveSuggestions() {
                    return __awaiter(this, void 0, void 0, function () {
                        return __generator(this, function (_a) {
                            switch (_a.label) {
                                case 0: return [4 /*yield*/, suggestionsManager.receiveSuggestions([Promise.resolve(suggestions)])];
                                case 1:
                                    _a.sent();
                                    return [2 /*return*/];
                            }
                        });
                    });
                }
                function waitForQuerySuggestRendered() {
                    return new Promise(function (resolve) {
                        Dom_1.$$(env.root).on(Core_1.OmniboxEvents.querySuggestRendered, function () { return resolve(); });
                    });
                }
                function mouseFocusSuggestion(suggestionId) {
                    Dom_1.$$(suggestionElements[suggestionId]).trigger('mouseover');
                }
                var suggestionElements;
                function renderSuggestions() {
                    return __awaiter(this, void 0, void 0, function () {
                        return __generator(this, function (_a) {
                            switch (_a.label) {
                                case 0:
                                    receiveSuggestions();
                                    return [4 /*yield*/, waitForQuerySuggestRendered()];
                                case 1:
                                    _a.sent();
                                    suggestionElements = Dom_1.$$(env.root).findClass(suggestionClass);
                                    return [2 /*return*/];
                            }
                        });
                    });
                }
                beforeEach(function (done) { return __awaiter(_this, void 0, void 0, function () {
                    return __generator(this, function (_a) {
                        switch (_a.label) {
                            case 0:
                                createSuggestions();
                                return [4 /*yield*/, renderSuggestions()];
                            case 1:
                                _a.sent();
                                done();
                                return [2 /*return*/];
                        }
                    });
                }); });
                it("doesn't set activeDescendant in InputManager", function () {
                    expect(inputManager.activeDescendant).toBeNull();
                });
                it('sets expanded in InputManager', function () {
                    expect(inputManager.expanded).toEqual(true);
                });
                it('sets activeDescendant in InputManager after focusing a suggestion', function () {
                    mouseFocusSuggestion(1);
                    expect(inputManager.activeDescendant).toEqual(suggestionElements[1]);
                });
                it('renders suggestions', function () {
                    expect(suggestionElements.map(function (element) { return element.innerText; })).toEqual(textSuggestions);
                });
                it('sorts suggestions by descending index value', function (done) { return __awaiter(_this, void 0, void 0, function () {
                    return __generator(this, function (_a) {
                        switch (_a.label) {
                            case 0:
                                suggestions[0].index = 100;
                                suggestions[1].index = 200;
                                return [4 /*yield*/, renderSuggestions()];
                            case 1:
                                _a.sent();
                                expect(suggestionElements[0].innerText).toEqual(textSuggestions[1]);
                                done();
                                return [2 /*return*/];
                        }
                    });
                }); });
                it('sorts suggestions by descending index index even with undefined values', function (done) { return __awaiter(_this, void 0, void 0, function () {
                    return __generator(this, function (_a) {
                        switch (_a.label) {
                            case 0:
                                suggestions[0].index = undefined;
                                suggestions[1].index = 100;
                                return [4 /*yield*/, renderSuggestions()];
                            case 1:
                                _a.sent();
                                expect(suggestionElements[0].innerText).toEqual(textSuggestions[1]);
                                done();
                                return [2 /*return*/];
                        }
                    });
                }); });
                it("doesn't have a previews container after focusing a suggestion", function () {
                    mouseFocusSuggestion(0);
                    expect(Dom_1.$$(env.root).findClass('coveo-preview-container').length).toEqual(0);
                });
                it("doesn't select mouse focused suggestions", function () {
                    suggestionElements.forEach(function (_, i) {
                        mouseFocusSuggestion(i);
                        expect(suggestionsManager.selectAndReturnKeyboardFocusedElement()).toBeFalsy();
                    });
                });
                it("doesn't have a selected suggestion by default", function () {
                    expect(suggestionsManager.selectedSuggestion).toBeNull();
                });
                it('moving the focus down focuses the first suggestion', function () {
                    suggestionsManager.moveDown();
                    expect(suggestionsManager.selectedSuggestion.text).toEqual(underscore_1.first(suggestions).text);
                });
                it('moving the focus up focuses the first suggestion', function () {
                    suggestionsManager.moveUp();
                    expect(suggestionsManager.selectedSuggestion.text).toEqual(underscore_1.first(suggestions).text);
                });
                it('moving the focus up from the first suggestion focuses the last suggestion', function () {
                    suggestionsManager.moveDown();
                    suggestionsManager.moveUp();
                    expect(suggestionsManager.selectedSuggestion.text).toEqual(underscore_1.last(suggestions).text);
                });
                it('moving the focus down from the last suggestion focuses the first suggestion', function () {
                    suggestionsManager.moveDown();
                    suggestionsManager.moveUp();
                    suggestionsManager.moveDown();
                    expect(suggestionsManager.selectedSuggestion.text).toEqual(underscore_1.first(suggestions).text);
                });
                it('moving the focus down multiple times can reach every suggestion', function () {
                    suggestions.forEach(function (suggestion) {
                        suggestionsManager.moveDown();
                        expect(suggestionsManager.selectedSuggestion.text).toEqual(suggestion.text);
                    });
                });
                it('moving the focus up multiple times can reach every suggestion', function () {
                    suggestionsManager.moveDown();
                    suggestions.reverse().forEach(function (suggestion) {
                        suggestionsManager.moveUp();
                        expect(suggestionsManager.selectedSuggestion.text).toEqual(suggestion.text);
                    });
                });
                describe('with previews', function () {
                    var previewClassName = 'coveo-preview-selectable';
                    function buildPreview(text) {
                        return {
                            element: Dom_1.$$('div', {
                                className: previewClassName
                            }, text).el,
                            onSelect: jasmine.createSpy("onSelect" + text)
                        };
                    }
                    var displayAfterDuration = 150;
                    function setDisplayAfterDuration() {
                        spyOn(suggestionsManager['resultPreviewsManager'], 'getExternalOptions').and.returnValue({
                            displayAfterDuration: displayAfterDuration
                        });
                    }
                    var populateSpy;
                    var waitForPreviewsPopulateEvent;
                    function bindPopulateEvent(getPreviews) {
                        var wasCalled = false;
                        var onCall;
                        populateSpy = jasmine.createSpy('PopulateSearchResultPreviews');
                        Dom_1.$$(env.root).on(ResultPreviewsManagerEvents_1.ResultPreviewsManagerEvents.populateSearchResultPreviews, function (_, args) {
                            populateSpy(args.suggestion);
                            args.previewsQueries.push(getPreviews(textSuggestions.indexOf(args.suggestion.text)));
                            if (onCall) {
                                onCall();
                                onCall = null;
                            }
                            else {
                                wasCalled = true;
                            }
                        });
                        waitForPreviewsPopulateEvent = function () {
                            return new Promise(function (resolve) {
                                Eif (!wasCalled) {
                                    onCall = function () { return resolve(); };
                                    return;
                                }
                                wasCalled = false;
                                resolve();
                            });
                        };
                    }
                    var waitForSelectionUpdated;
                    function bindUpdateSelectedSuggestion() {
                        var calls = [];
                        var oldFunc = suggestionsManager['updateSelectedSuggestion'].bind(suggestionsManager);
                        suggestionsManager['updateSelectedSuggestion'] = function (suggestion) {
                            var call = oldFunc(suggestion);
                            calls.push(call);
                            return call;
                        };
                        waitForSelectionUpdated = function () { return calls[calls.length - 1]; };
                    }
                    beforeEach(function () {
                        jasmine.clock().install();
                        setDisplayAfterDuration();
                        bindUpdateSelectedSuggestion();
                    });
                    afterEach(function () {
                        jasmine.clock().uninstall();
                    });
                    describe('timing out', function () {
                        var resolveTime = timeout + 1;
                        function createPreviewsPromise() {
                            return Utils_1.Utils.resolveAfter(resolveTime, [buildPreview('abc')]);
                        }
                        beforeEach(function () {
                            bindPopulateEvent(createPreviewsPromise);
                        });
                        it('times out if the previews takes too long to resolve', function (done) { return __awaiter(_this, void 0, void 0, function () {
                            return __generator(this, function (_a) {
                                switch (_a.label) {
                                    case 0:
                                        mouseFocusSuggestion(0);
                                        return [4 /*yield*/, deferAsync()];
                                    case 1:
                                        _a.sent();
                                        jasmine.clock().tick(displayAfterDuration);
                                        return [4 /*yield*/, waitForPreviewsPopulateEvent()];
                                    case 2:
                                        _a.sent();
                                        jasmine.clock().tick(timeout);
                                        return [4 /*yield*/, waitForSelectionUpdated()];
                                    case 3:
                                        _a.sent();
                                        expect(Dom_1.$$(env.root).findClass(previewClassName).length).toEqual(0);
                                        done();
                                        return [2 /*return*/];
                                }
                            });
                        }); });
                    });
                    describe('within timeout delay', function () {
                        var previewsBySuggestion;
                        var textPreviews = [
                            ['4K TV', 'Set of 4 pairs of socks'],
                            ['The right spoon', '🔶', 'Right angle SATA cable']
                        ];
                        function buildPreviews() {
                            previewsBySuggestion = textPreviews.map(function (previewTextsForSuggestion) { return previewTextsForSuggestion.map(buildPreview); });
                        }
                        var previewsPromisesWaitTimes = [1, 2];
                        function createPreviewsPromise(suggestionId) {
                            return Utils_1.Utils.resolveAfter(previewsPromisesWaitTimes[suggestionId], previewsBySuggestion[suggestionId]);
                        }
                        beforeEach(function () {
                            buildPreviews();
                            bindPopulateEvent(createPreviewsPromise);
                        });
                        it("doesn't populate previews on initialization", function () {
                            expect(populateSpy).not.toHaveBeenCalled();
                        });
                        it("doesn't append any previews when they aren't resolved yet", function (done) { return __awaiter(_this, void 0, void 0, function () {
                            return __generator(this, function (_a) {
                                switch (_a.label) {
                                    case 0:
                                        mouseFocusSuggestion(0);
                                        return [4 /*yield*/, deferAsync()];
                                    case 1:
                                        _a.sent();
                                        jasmine.clock().tick(displayAfterDuration);
                                        return [4 /*yield*/, waitForPreviewsPopulateEvent()];
                                    case 2:
                                        _a.sent();
                                        expect(Dom_1.$$(env.root).findClass(previewClassName).length).toEqual(0);
                                        done();
                                        return [2 /*return*/];
                                }
                            });
                        }); });
                        it('appends previews when they are resolved', function (done) { return __awaiter(_this, void 0, void 0, function () {
                            return __generator(this, function (_a) {
                                switch (_a.label) {
                                    case 0:
                                        mouseFocusSuggestion(0);
                                        return [4 /*yield*/, deferAsync()];
                                    case 1:
                                        _a.sent();
                                        jasmine.clock().tick(displayAfterDuration);
                                        return [4 /*yield*/, waitForPreviewsPopulateEvent()];
                                    case 2:
                                        _a.sent();
                                        jasmine.clock().tick(previewsPromisesWaitTimes[0]);
                                        return [4 /*yield*/, waitForSelectionUpdated()];
                                    case 3:
                                        _a.sent();
                                        expect(Dom_1.$$(env.root).findClass(previewClassName).length).toBeGreaterThan(0);
                                        done();
                                        return [2 /*return*/];
                                }
                            });
                        }); });
                        describe('after keyboard focusing a suggestion', function () {
                            var expectedSuggestionId;
                            function moveDownToSuggestion(suggestionId) {
                                Iif (expectedSuggestionId === suggestionId) {
                                    return;
                                }
                                for (expectedSuggestionId; expectedSuggestionId < suggestionId; expectedSuggestionId++) {
                                    suggestionsManager.moveDown();
                                }
                            }
                            function moveDownToSuggestionAndWait(suggestionId) {
                                return __awaiter(this, void 0, void 0, function () {
                                    return __generator(this, function (_a) {
                                        switch (_a.label) {
                                            case 0:
                                                moveDownToSuggestion(suggestionId);
                                                jasmine.clock().tick(displayAfterDuration);
                                                return [4 /*yield*/, waitForPreviewsPopulateEvent()];
                                            case 1:
                                                _a.sent();
                                                jasmine.clock().tick(previewsPromisesWaitTimes[suggestionId]);
                                                return [4 /*yield*/, waitForSelectionUpdated()];
                                            case 2:
                                                _a.sent();
                                                return [2 /*return*/];
                                        }
                                    });
                                });
                            }
                            beforeEach(function () {
                                expectedSuggestionId = -1;
                            });
                            it('has a previews container after focusing a suggestion', function (done) { return __awaiter(_this, void 0, void 0, function () {
                                return __generator(this, function (_a) {
                                    switch (_a.label) {
                                        case 0: return [4 /*yield*/, moveDownToSuggestionAndWait(0)];
                                        case 1:
                                            _a.sent();
                                            expect(Dom_1.$$(env.root).findClass('coveo-preview-container').length).toEqual(1);
                                            done();
                                            return [2 /*return*/];
                                    }
                                });
                            }); });
                            it('queries previews after `executePreviewsQueryDelay`', function (done) { return __awaiter(_this, void 0, void 0, function () {
                                return __generator(this, function (_a) {
                                    switch (_a.label) {
                                        case 0:
                                            moveDownToSuggestion(0);
                                            jasmine.clock().tick(displayAfterDuration);
                                            return [4 /*yield*/, deferAsync()];
                                        case 1:
                                            _a.sent();
                                            expect(populateSpy).toHaveBeenCalled();
                                            done();
                                            return [2 /*return*/];
                                    }
                                });
                            }); });
                            it("doesn't query previews before `executePreviewsQueryDelay`", function (done) { return __awaiter(_this, void 0, void 0, function () {
                                return __generator(this, function (_a) {
                                    switch (_a.label) {
                                        case 0:
                                            moveDownToSuggestion(0);
                                            jasmine.clock().tick(displayAfterDuration - 1);
                                            return [4 /*yield*/, deferAsync()];
                                        case 1:
                                            _a.sent();
                                            expect(populateSpy).not.toHaveBeenCalled();
                                            done();
                                            return [2 /*return*/];
                                    }
                                });
                            }); });
                            it("doesn't query previews if another suggestion is focused before the `executePreviewsQueryDelay`", function (done) { return __awaiter(_this, void 0, void 0, function () {
                                return __generator(this, function (_a) {
                                    switch (_a.label) {
                                        case 0:
                                            moveDownToSuggestion(0);
                                            jasmine.clock().tick(displayAfterDuration - 1);
                                            moveDownToSuggestion(1);
                                            jasmine.clock().tick(1);
                                            return [4 /*yield*/, deferAsync()];
                                        case 1:
                                            _a.sent();
                                            expect(populateSpy).not.toHaveBeenCalled();
                                            done();
                                            return [2 /*return*/];
                                    }
                                });
                            }); });
                            it('only queries previews for the last focused suggestion', function (done) { return __awaiter(_this, void 0, void 0, function () {
                                return __generator(this, function (_a) {
                                    switch (_a.label) {
                                        case 0:
                                            moveDownToSuggestion(0);
                                            jasmine.clock().tick(displayAfterDuration - 1);
                                            moveDownToSuggestion(1);
                                            jasmine.clock().tick(displayAfterDuration);
                                            return [4 /*yield*/, deferAsync()];
                                        case 1:
                                            _a.sent();
                                            expect(populateSpy).toHaveBeenCalledTimes(1);
                                            expect(populateSpy.calls.mostRecent().args[0].text).toEqual(textSuggestions[1]);
                                            done();
                                            return [2 /*return*/];
                                    }
                                });
                            }); });
                            it('populates the previews container', function (done) { return __awaiter(_this, void 0, void 0, function () {
                                var _this = this;
                                return __generator(this, function (_a) {
                                    switch (_a.label) {
                                        case 0: return [4 /*yield*/, forEachAsync(textPreviews, function (previewTextsForSuggestion, id) { return __awaiter(_this, void 0, void 0, function () {
                                                return __generator(this, function (_a) {
                                                    switch (_a.label) {
                                                        case 0: return [4 /*yield*/, moveDownToSuggestionAndWait(id)];
                                                        case 1:
                                                            _a.sent();
                                                            expect(Dom_1.$$(env.root)
                                                                .findClass(previewClassName)
                                                                .map(function (element) { return element.innerText; })).toEqual(previewTextsForSuggestion);
                                                            return [2 /*return*/];
                                                    }
                                                });
                                            }); })];
                                        case 1:
                                            _a.sent();
                                            done();
                                            return [2 /*return*/];
                                    }
                                });
                            }); });
                            it('moving the focus down multiple times can reach every suggestion', function () {
                                suggestions.forEach(function (suggestion) {
                                    suggestionsManager.moveDown();
                                    expect(suggestionsManager.selectedSuggestion.text).toEqual(suggestion.text);
                                });
                            });
                            it('moving the focus up multiple times can reach every suggestion', function () {
                                suggestionsManager.moveDown();
                                suggestions.reverse().forEach(function (suggestion) {
                                    suggestionsManager.moveUp();
                                    expect(suggestionsManager.selectedSuggestion.text).toEqual(suggestion.text);
                                });
                            });
                            it("moving the focus right when there's previews blurs the suggestion", function (done) { return __awaiter(_this, void 0, void 0, function () {
                                return __generator(this, function (_a) {
                                    switch (_a.label) {
                                        case 0: return [4 /*yield*/, moveDownToSuggestionAndWait(0)];
                                        case 1:
                                            _a.sent();
                                            suggestionsManager.moveRight();
                                            expect(suggestionsManager.selectedSuggestion).toBeNull();
                                            done();
                                            return [2 /*return*/];
                                    }
                                });
                            }); });
                            it("moving the focus right when there's previews sets aria-selected on the first preview", function (done) { return __awaiter(_this, void 0, void 0, function () {
                                var selectedElements;
                                return __generator(this, function (_a) {
                                    switch (_a.label) {
                                        case 0: return [4 /*yield*/, moveDownToSuggestionAndWait(0)];
                                        case 1:
                                            _a.sent();
                                            suggestionsManager.moveRight();
                                            selectedElements = underscore_1.toArray(env.root.querySelectorAll('[aria-selected="true"]'));
                                            expect(selectedElements.length).toEqual(1);
                                            expect(selectedElements[0].innerText).toEqual(underscore_1.first(underscore_1.first(textPreviews)));
                                            done();
                                            return [2 /*return*/];
                                    }
                                });
                            }); });
                            it('can select and return the first preview by moving the focus right from the first suggestion', function (done) { return __awaiter(_this, void 0, void 0, function () {
                                return __generator(this, function (_a) {
                                    switch (_a.label) {
                                        case 0: return [4 /*yield*/, moveDownToSuggestionAndWait(0)];
                                        case 1:
                                            _a.sent();
                                            suggestionsManager.moveRight();
                                            expect(suggestionsManager.selectAndReturnKeyboardFocusedElement().innerText).toEqual(underscore_1.first(underscore_1.first(textPreviews)));
                                            done();
                                            return [2 /*return*/];
                                    }
                                });
                            }); });
                            it('moving the focus left from the first preview focuses on the first suggestion', function (done) { return __awaiter(_this, void 0, void 0, function () {
                                return __generator(this, function (_a) {
                                    switch (_a.label) {
                                        case 0: return [4 /*yield*/, moveDownToSuggestionAndWait(0)];
                                        case 1:
                                            _a.sent();
                                            suggestionsManager.moveRight();
                                            suggestionsManager.moveLeft();
                                            expect(suggestionsManager.selectedSuggestion.text).toEqual(underscore_1.first(suggestions).text);
                                            done();
                                            return [2 /*return*/];
                                    }
                                });
                            }); });
                            it('can select every preview of every suggestion', function (done) { return __awaiter(_this, void 0, void 0, function () {
                                var _this = this;
                                var blurCount;
                                return __generator(this, function (_a) {
                                    switch (_a.label) {
                                        case 0:
                                            blurCount = 0;
                                            return [4 /*yield*/, forEachAsync(previewsBySuggestion, function (previews, suggestionId) { return __awaiter(_this, void 0, void 0, function () {
                                                    return __generator(this, function (_a) {
                                                        switch (_a.label) {
                                                            case 0: return [4 /*yield*/, moveDownToSuggestionAndWait(suggestionId)];
                                                            case 1:
                                                                _a.sent();
                                                                previews.forEach(function (preview, previewId) {
                                                                    suggestionsManager.moveRight();
                                                                    expect(suggestionsManager.selectAndReturnKeyboardFocusedElement().innerText).toEqual(textPreviews[suggestionId][previewId], "Unexpected preview at suggestion #" + suggestionId + " preview #" + previewId + ".");
                                                                    expect(preview.onSelect).toHaveBeenCalledTimes(1);
                                                                    blurCount += 1;
                                                                    expect(inputManager.blur).toHaveBeenCalledTimes(blurCount);
                                                                });
                                                                previews.forEach(function () { return suggestionsManager.moveLeft(); });
                                                                return [2 /*return*/];
                                                        }
                                                    });
                                                }); })];
                                        case 1:
                                            _a.sent();
                                            done();
                                            return [2 /*return*/];
                                    }
                                });
                            }); });
                        });
                    });
                });
            });
        });
    });
}
exports.SuggestionsManagerTest = SuggestionsManagerTest;
 
 
/***/ }),
/* 1783 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { Iif (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        Iif (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            Iif (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
            Iif (y = 0, t) op = [0, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    Eif (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        Iif (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
Object.defineProperty(exports, "__esModule", { value: true });
var QueryProcessor_1 = __webpack_require__(386);
var underscore_1 = __webpack_require__(1);
function wait(ms, result) {
    return new Promise(function (resolve) { return setTimeout(function () { return resolve(result); }, ms); });
}
function tickAndResolve(promise, ms) {
    if (ms === void 0) { ms = 0; }
    return __awaiter(this, void 0, void 0, function () {
        var date, startTick, result;
        return __generator(this, function (_a) {
            switch (_a.label) {
                case 0:
                    date = new Date();
                    startTick = date.getTime();
                    jasmine.clock().tick(ms);
                    return [4 /*yield*/, promise];
                case 1:
                    result = _a.sent();
                    Iif (date.getTime() - startTick !== 0) {
                        throw "Expected promise to be resolved after ticking " + ms + "ms.";
                    }
                    return [2 /*return*/, result];
            }
        });
    });
}
function QueryProcessorTest() {
    var _this = this;
    describe('QueryProcessor', function () {
        it('does not throw an error when overriding nothing', function () {
            expect(function () { return new QueryProcessor_1.QueryProcessor().overrideIfProcessing(); }).not.toThrow();
        });
        describe('calling processQueries', function () {
            var timeBetweenQueries = 10;
            var resolveTimes = [0, timeBetweenQueries, timeBetweenQueries * 2, timeBetweenQueries * 3];
            beforeEach(function () {
                jasmine.clock().install();
            });
            afterEach(function () {
                jasmine.clock().uninstall();
            });
            describe('without values', function () {
                var queryProcessor;
                var returnedPromise;
                beforeEach(function () {
                    queryProcessor = new QueryProcessor_1.QueryProcessor();
                    returnedPromise = queryProcessor.processQueries([]);
                });
                it('resolves immediately', function (done) { return __awaiter(_this, void 0, void 0, function () {
                    var resolveProcess;
                    return __generator(this, function (_a) {
                        switch (_a.label) {
                            case 0:
                                resolveProcess = jasmine.createSpy('resolveProcess');
                                return [4 /*yield*/, tickAndResolve(returnedPromise.then(resolveProcess))];
                            case 1:
                                _a.sent();
                                expect(resolveProcess).toHaveBeenCalled();
                                done();
                                return [2 /*return*/];
                        }
                    });
                }); });
                it('resolves with Finished status', function (done) { return __awaiter(_this, void 0, void 0, function () {
                    var _a;
                    return __generator(this, function (_b) {
                        switch (_b.label) {
                            case 0:
                                _a = expect;
                                return [4 /*yield*/, tickAndResolve(returnedPromise)];
                            case 1:
                                _a.apply(void 0, [(_b.sent()).status]).toEqual(QueryProcessor_1.ProcessingStatus.Finished);
                                done();
                                return [2 /*return*/];
                        }
                    });
                }); });
                it('resolves with an empty array', function (done) { return __awaiter(_this, void 0, void 0, function () {
                    var _a;
                    return __generator(this, function (_b) {
                        switch (_b.label) {
                            case 0:
                                _a = expect;
                                return [4 /*yield*/, tickAndResolve(returnedPromise)];
                            case 1:
                                _a.apply(void 0, [(_b.sent()).results.length]).toEqual(0);
                                done();
                                return [2 /*return*/];
                        }
                    });
                }); });
            });
            describe("with values delayed by " + resolveTimes.map(function (timeout) { return timeout + 'ms'; }).join(', '), function () {
                var resolveAllTime = resolveTimes[resolveTimes.length - 1];
                var completionTimeout = resolveAllTime + timeBetweenQueries / 2;
                var stringArrays = [['abcd', 'efgh'], ['ijkl'], ['mnop', 'qrst'], ['uvwx']];
                var stringPromises;
                var queryProcessor;
                var returnedPromise;
                beforeEach(function () {
                    stringPromises = [
                        wait(resolveTimes[3], stringArrays[0]),
                        wait(resolveTimes[1], stringArrays[1]),
                        wait(resolveTimes[2], stringArrays[2]),
                        stringArrays[3]
                    ];
                });
                describe('when overriding after resolving the second promise', function () {
                    var whenToOverride = resolveTimes[1] + timeBetweenQueries / 2;
                    beforeEach(function () {
                        queryProcessor = new QueryProcessor_1.QueryProcessor({ timeout: completionTimeout });
                        returnedPromise = queryProcessor.processQueries(stringPromises);
                    });
                    describe('by calling overrideIfProcessing', function () {
                        beforeEach(function () {
                            wait(whenToOverride).then(function () { return queryProcessor.overrideIfProcessing(); });
                        });
                        it('resolves with Overriden status', function (done) { return __awaiter(_this, void 0, void 0, function () {
                            var _a;
                            return __generator(this, function (_b) {
                                switch (_b.label) {
                                    case 0:
                                        _a = expect;
                                        return [4 /*yield*/, tickAndResolve(returnedPromise, whenToOverride)];
                                    case 1:
                                        _a.apply(void 0, [(_b.sent()).status]).toEqual(QueryProcessor_1.ProcessingStatus.Overriden);
                                        done();
                                        return [2 /*return*/];
                                }
                            });
                        }); });
                        it('resolves with no items', function (done) { return __awaiter(_this, void 0, void 0, function () {
                            var _a;
                            return __generator(this, function (_b) {
                                switch (_b.label) {
                                    case 0:
                                        _a = expect;
                                        return [4 /*yield*/, tickAndResolve(returnedPromise, whenToOverride)];
                                    case 1:
                                        _a.apply(void 0, [(_b.sent()).results.length]).toEqual(0);
                                        done();
                                        return [2 /*return*/];
                                }
                            });
                        }); });
                    });
                    describe('by calling processQueries', function () {
                        var newStringArraysInResolvedOrder = [['0️⃣1️⃣'], ['2️⃣3️⃣', '4️⃣']];
                        var newStringsInResolvedOrder = underscore_1.flatten(newStringArraysInResolvedOrder);
                        var newReturnedPromise;
                        beforeEach(function () {
                            newReturnedPromise = wait(whenToOverride).then(function () {
                                return queryProcessor.processQueries([
                                    newStringArraysInResolvedOrder[0],
                                    wait(timeBetweenQueries, newStringArraysInResolvedOrder[1])
                                ]);
                            });
                        });
                        it('resolves with Overriden status', function (done) { return __awaiter(_this, void 0, void 0, function () {
                            var _a;
                            return __generator(this, function (_b) {
                                switch (_b.label) {
                                    case 0:
                                        _a = expect;
                                        return [4 /*yield*/, tickAndResolve(returnedPromise, whenToOverride)];
                                    case 1:
                                        _a.apply(void 0, [(_b.sent()).status]).toEqual(QueryProcessor_1.ProcessingStatus.Overriden);
                                        done();
                                        return [2 /*return*/];
                                }
                            });
                        }); });
                        it('resolves with no items', function (done) { return __awaiter(_this, void 0, void 0, function () {
                            var _a;
                            return __generator(this, function (_b) {
                                switch (_b.label) {
                                    case 0:
                                        _a = expect;
                                        return [4 /*yield*/, tickAndResolve(returnedPromise, whenToOverride)];
                                    case 1:
                                        _a.apply(void 0, [(_b.sent()).results.length]).toEqual(0);
                                        done();
                                        return [2 /*return*/];
                                }
                            });
                        }); });
                        it('resolves new call with Finished status', function (done) { return __awaiter(_this, void 0, void 0, function () {
                            var _a;
                            return __generator(this, function (_b) {
                                switch (_b.label) {
                                    case 0: return [4 /*yield*/, tickAndResolve(returnedPromise, whenToOverride)];
                                    case 1:
                                        _b.sent();
                                        _a = expect;
                                        return [4 /*yield*/, tickAndResolve(newReturnedPromise, timeBetweenQueries)];
                                    case 2:
                                        _a.apply(void 0, [(_b.sent()).status]).toEqual(QueryProcessor_1.ProcessingStatus.Finished);
                                        done();
                                        return [2 /*return*/];
                                }
                            });
                        }); });
                        it("resolves new call with results from the new promises", function (done) { return __awaiter(_this, void 0, void 0, function () {
                            var _a;
                            return __generator(this, function (_b) {
                                switch (_b.label) {
                                    case 0: return [4 /*yield*/, tickAndResolve(returnedPromise, whenToOverride)];
                                    case 1:
                                        _b.sent();
                                        _a = expect;
                                        return [4 /*yield*/, tickAndResolve(newReturnedPromise, timeBetweenQueries)];
                                    case 2:
                                        _a.apply(void 0, [(_b.sent()).results]).toEqual(newStringsInResolvedOrder);
                                        done();
                                        return [2 /*return*/];
                                }
                            });
                        }); });
                    });
                });
                describe('timing out after resolving the second promise', function () {
                    var timeout = resolveTimes[1] + timeBetweenQueries / 2;
                    var expectedStringsInResolvedOrder = stringArrays[1].concat(stringArrays[3]);
                    beforeEach(function () {
                        queryProcessor = new QueryProcessor_1.QueryProcessor({ timeout: timeout });
                        returnedPromise = queryProcessor.processQueries(stringPromises);
                    });
                    it('resolves with TimedOut status', function (done) { return __awaiter(_this, void 0, void 0, function () {
                        var _a;
                        return __generator(this, function (_b) {
                            switch (_b.label) {
                                case 0:
                                    _a = expect;
                                    return [4 /*yield*/, tickAndResolve(returnedPromise, timeout)];
                                case 1:
                                    _a.apply(void 0, [(_b.sent()).status]).toEqual(QueryProcessor_1.ProcessingStatus.TimedOut);
                                    done();
                                    return [2 /*return*/];
                            }
                        });
                    }); });
                    it('resolves with results from the first two promises', function (done) { return __awaiter(_this, void 0, void 0, function () {
                        var _a;
                        return __generator(this, function (_b) {
                            switch (_b.label) {
                                case 0:
                                    _a = expect;
                                    return [4 /*yield*/, tickAndResolve(returnedPromise, timeout)];
                                case 1:
                                    _a.apply(void 0, [(_b.sent()).results]).toEqual(expectedStringsInResolvedOrder);
                                    done();
                                    return [2 /*return*/];
                            }
                        });
                    }); });
                });
                describe('timing out after last promise', function () {
                    beforeEach(function () {
                        queryProcessor = new QueryProcessor_1.QueryProcessor({ timeout: completionTimeout });
                        returnedPromise = queryProcessor.processQueries(stringPromises);
                    });
                    it('resolves with Finished status', function (done) { return __awaiter(_this, void 0, void 0, function () {
                        var _a;
                        return __generator(this, function (_b) {
                            switch (_b.label) {
                                case 0:
                                    _a = expect;
                                    return [4 /*yield*/, tickAndResolve(returnedPromise, resolveAllTime)];
                                case 1:
                                    _a.apply(void 0, [(_b.sent()).status]).toEqual(QueryProcessor_1.ProcessingStatus.Finished);
                                    done();
                                    return [2 /*return*/];
                            }
                        });
                    }); });
                    it('resolves with results from every promise in the original order', function (done) { return __awaiter(_this, void 0, void 0, function () {
                        var _a;
                        return __generator(this, function (_b) {
                            switch (_b.label) {
                                case 0:
                                    _a = expect;
                                    return [4 /*yield*/, tickAndResolve(returnedPromise, resolveAllTime)];
                                case 1:
                                    _a.apply(void 0, [(_b.sent()).results]).toEqual(underscore_1.flatten(stringArrays));
                                    done();
                                    return [2 /*return*/];
                            }
                        });
                    }); });
                });
            });
        });
    });
}
exports.QueryProcessorTest = QueryProcessorTest;
 
 
/***/ }),
/* 1784 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { Iif (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        Iif (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            Iif (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
            Iif (y = 0, t) op = [0, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    Eif (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        Iif (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
var _this = this;
Object.defineProperty(exports, "__esModule", { value: true });
var MagicBox_1 = __webpack_require__(264);
var MagicBoxClear_1 = __webpack_require__(806);
var Core_1 = __webpack_require__(9);
var Grammar_1 = __webpack_require__(154);
exports.MagicBoxClearTest = function () {
    describe('MagicBoxClear', function () {
        var elem;
        var magicBox;
        var clear;
        function waitForGetSuggestions() {
            return new Promise(function (resolve) {
                magicBox.getSuggestions = function () {
                    resolve();
                    return [];
                };
            });
        }
        function passFocusThrough() {
            spyOn(magicBox['inputManager'].input, 'focus').and.callFake(function () {
                magicBox['inputManager'].input.dispatchEvent(new FocusEvent('focus'));
            });
        }
        beforeEach(function () {
            elem = Core_1.$$('div').el;
            magicBox = new MagicBox_1.MagicBoxInstance(elem, new Grammar_1.Grammar('Any', { Any: /.*/ }), {});
            magicBox.onSuggestions = function () { };
            clear = new MagicBoxClear_1.MagicBoxClear(magicBox);
            passFocusThrough();
            magicBox.setText('foo');
        });
        it('should create a container', function () {
            expect(Core_1.$$(clear.element).hasClass('magic-box-clear')).toBe(true);
        });
        it('should create an icon', function () {
            expect(Core_1.$$(clear.element).find('.magic-box-icon')).toBeDefined();
        });
        it('when the magicBox contains text, it should clear it on click', function () {
            expect(magicBox.getText()).toBe('foo');
            clear.element.trigger('click');
            expect(magicBox.getText()).toBe('');
        });
        it('should request new suggestions on click', function (done) { return __awaiter(_this, void 0, void 0, function () {
            var suggestionsRequested, suggestionsWereRequested;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        suggestionsRequested = waitForGetSuggestions();
                        clear.element.trigger('click');
                        return [4 /*yield*/, Promise.race([suggestionsRequested.then(function () { return true; }), Core_1.Utils.resolveAfter(150, false)])];
                    case 1:
                        suggestionsWereRequested = _a.sent();
                        expect(suggestionsWereRequested).toEqual(true, "Suggestions should've been requested within a 150ms timeout");
                        done();
                        return [2 /*return*/];
                }
            });
        }); });
    });
};
 
 
/***/ }),
/* 1785 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var AccessibleButton_1 = __webpack_require__(20);
var Core_1 = __webpack_require__(9);
var Simulate_1 = __webpack_require__(15);
var Component_1 = __webpack_require__(6);
var MockEnvironment_1 = __webpack_require__(2);
function dispatchFakeKeyEvent(element, eventName, props) {
    var event = new KeyboardEvent(eventName, {});
    Object.keys(props).forEach(function (propertyName) {
        Object.defineProperty(event, propertyName, {
            get: function () { return props[propertyName]; }
        });
    });
    element.dispatchEvent(event);
    Core_1.Defer.flush();
}
exports.AccessibleButtonTest = function () {
    describe('AccessibleButton', function () {
        var element;
        beforeEach(function () {
            element = Core_1.$$('div');
            Simulate_1.Simulate.removeJQuery();
        });
        it('should add the specified label as the aria-label attribute', function () {
            new AccessibleButton_1.AccessibleButton().withElement(element).withLabel('qwerty').build();
            expect(element.getAttribute('aria-label')).toBe('qwerty');
        });
        it('should add the specified title', function () {
            var title = 'title';
            new AccessibleButton_1.AccessibleButton().withElement(element).withTitle(title).build();
            expect(element.getAttribute('title')).toBe(title);
        });
        it('should just add a title if there is a title and a label specified', function () {
            var button = new AccessibleButton_1.AccessibleButton();
            button.withElement(element).withTitle('title').withLabel('label').build();
            expect(element.getAttribute('aria-label')).toBeNull();
            expect(element.getAttribute('title')).toBe('title');
        });
        it('should log an error if there no label nor title', function () {
            var button = new AccessibleButton_1.AccessibleButton();
            var logger = (button['logger'] = MockEnvironment_1.mock(Core_1.Logger));
            button.withElement(element).build();
            expect(logger.error).toHaveBeenCalled();
        });
        it('should not log an error if withoutLabelOrTitle is specified', function () {
            var button = new AccessibleButton_1.AccessibleButton();
            var logger = (button['logger'] = MockEnvironment_1.mock(Core_1.Logger));
            button.withElement(element).withoutLabelOrTitle().build();
            expect(logger.error).not.toHaveBeenCalled();
        });
        it('should not log an error if there is a title but no label', function () {
            var button = new AccessibleButton_1.AccessibleButton();
            var logger = (button['logger'] = MockEnvironment_1.mock(Core_1.Logger));
            button.withElement(element).withTitle('title').build();
            expect(logger.error).not.toHaveBeenCalled();
        });
        it('should not log an error if there is a label but no title', function () {
            var button = new AccessibleButton_1.AccessibleButton();
            var logger = (button['logger'] = MockEnvironment_1.mock(Core_1.Logger));
            button.withElement(element).withLabel('label').build();
            expect(logger.error).not.toHaveBeenCalled();
        });
        it('with no specified role, should add the button role', function () {
            new AccessibleButton_1.AccessibleButton().withElement(element).build();
            expect(element.getAttribute('role')).toBe('button');
        });
        it('with a specified role, should add the specified role', function () {
            new AccessibleButton_1.AccessibleButton().withElement(element).withRole('search').build();
            expect(element.getAttribute('role')).toBe('search');
        });
        describe('with an action', function () {
            var action;
            beforeEach(function () {
                action = jasmine.createSpy('action');
            });
            describe('configured as select', function () {
                beforeEach(function () {
                    new AccessibleButton_1.AccessibleButton().withElement(element).withSelectAction(action).build();
                });
                it('should be called on click', function () {
                    Core_1.$$(element).trigger('click');
                    expect(action).toHaveBeenCalled();
                });
                it('should be called on keyboard enter keypress', function () {
                    Simulate_1.Simulate.keyUp(element.el, Core_1.KEYBOARD.ENTER);
                    expect(action).toHaveBeenCalled();
                });
                it('should be called on keyboard spacebar keypress', function () {
                    Simulate_1.Simulate.keyUp(element.el, Core_1.KEYBOARD.SPACEBAR);
                    expect(action).toHaveBeenCalled();
                });
                describe('with a child input', function () {
                    var input;
                    beforeEach(function () {
                        element.append((input = document.createElement('input')));
                    });
                    it("shouldn't call preventDefault on spacebar keydown", function () {
                        var preventDefault = jasmine.createSpy('preventDefault');
                        dispatchFakeKeyEvent(element.el, 'keydown', { keyCode: Core_1.KEYBOARD.SPACEBAR, target: input, preventDefault: preventDefault });
                        expect(preventDefault).not.toHaveBeenCalled();
                    });
                    it("shouldn't be called on keyboard spacebar keypress", function () {
                        dispatchFakeKeyEvent(element.el, 'keyup', { keyCode: Core_1.KEYBOARD.SPACEBAR, target: input });
                        expect(action).not.toHaveBeenCalled();
                    });
                });
            });
            describe('configured as click', function () {
                beforeEach(function () {
                    new AccessibleButton_1.AccessibleButton().withElement(element).withClickAction(action).build();
                });
                it('should be called on click', function () {
                    Core_1.$$(element).trigger('click');
                    expect(action).toHaveBeenCalled();
                });
                it('should not be called on keyboard enter keypress', function () {
                    Simulate_1.Simulate.keyUp(element.el, Core_1.KEYBOARD.ENTER);
                    expect(action).not.toHaveBeenCalled();
                });
            });
            describe('configured as keyboard enter keypress', function () {
                beforeEach(function () {
                    new AccessibleButton_1.AccessibleButton().withElement(element).withEnterKeyboardAction(action).build();
                });
                it('should not be called on click', function () {
                    Core_1.$$(element).trigger('click');
                    expect(action).not.toHaveBeenCalled();
                });
                it('should be called on keyboard enter keypress', function () {
                    Simulate_1.Simulate.keyUp(element.el, Core_1.KEYBOARD.ENTER);
                    expect(action).toHaveBeenCalled();
                });
                it('should be called on keyboard spacebar keypress', function () {
                    Simulate_1.Simulate.keyUp(element.el, Core_1.KEYBOARD.SPACEBAR);
                    expect(action).toHaveBeenCalled();
                });
            });
            describe('configured as focus and mouseenter', function () {
                beforeEach(function () {
                    new AccessibleButton_1.AccessibleButton().withElement(element).withFocusAndMouseEnterAction(action).build();
                });
                it('should be called on focus', function () {
                    Core_1.$$(element).trigger('focus');
                    expect(action).toHaveBeenCalled();
                });
                it('should be called on mouseenter', function () {
                    Core_1.$$(element).trigger('mouseenter');
                    expect(action).toHaveBeenCalled();
                });
            });
            describe('configured as focus', function () {
                beforeEach(function () {
                    new AccessibleButton_1.AccessibleButton().withElement(element).withFocusAction(action).build();
                });
                it('should be called on focus', function () {
                    Core_1.$$(element).trigger('focus');
                    expect(action).toHaveBeenCalled();
                });
                it('should not be called on mouseenter', function () {
                    Core_1.$$(element).trigger('mouseenter');
                    expect(action).not.toHaveBeenCalled();
                });
            });
            describe('configured as mouseenter', function () {
                beforeEach(function () {
                    new AccessibleButton_1.AccessibleButton().withElement(element).withMouseEnterAction(action).build();
                });
                it('should not be called on focus', function () {
                    Core_1.$$(element).trigger('focus');
                    expect(action).not.toHaveBeenCalled();
                });
                it('should be called on mouseenter', function () {
                    Core_1.$$(element).trigger('mouseenter');
                    expect(action).toHaveBeenCalled();
                });
            });
            describe('configured as blur and mouseleave', function () {
                beforeEach(function () {
                    new AccessibleButton_1.AccessibleButton().withElement(element).withBlurAndMouseLeaveAction(action).build();
                });
                it('should be called on blur', function () {
                    Core_1.$$(element).trigger('blur');
                    expect(action).toHaveBeenCalled();
                });
                it('should be called on mouseleave', function () {
                    Core_1.$$(element).trigger('mouseleave');
                    expect(action).toHaveBeenCalled();
                });
            });
            describe('configured as blur', function () {
                beforeEach(function () {
                    new AccessibleButton_1.AccessibleButton().withElement(element).withBlurAction(action).build();
                });
                it('should be called on blur', function () {
                    Core_1.$$(element).trigger('blur');
                    expect(action).toHaveBeenCalled();
                });
                it('should not be called on mouseleave', function () {
                    Core_1.$$(element).trigger('mouseleave');
                    expect(action).not.toHaveBeenCalled();
                });
            });
            describe('configured as mouseleave', function () {
                beforeEach(function () {
                    new AccessibleButton_1.AccessibleButton().withElement(element).withMouseLeaveAction(action).build();
                });
                it('should not be called on blur', function () {
                    Core_1.$$(element).trigger('blur');
                    expect(action).not.toHaveBeenCalled();
                });
                it('should be called on mouseleave', function () {
                    Core_1.$$(element).trigger('mouseleave');
                    expect(action).toHaveBeenCalled();
                });
            });
            describe('configured as arrows', function () {
                function getDirection() {
                    Iif (action.calls.count() === 0) {
                        return null;
                    }
                    return action.calls.mostRecent().args[0];
                }
                beforeEach(function () {
                    new AccessibleButton_1.AccessibleButton().withElement(element).withArrowsAction(action).build();
                });
                it('should be called on keyboard up arrow keypress', function () {
                    Simulate_1.Simulate.keyUp(element.el, Core_1.KEYBOARD.UP_ARROW);
                    expect(getDirection()).toEqual(AccessibleButton_1.ArrowDirection.UP);
                });
                it('should be called on keyboard right arrow keypress', function () {
                    Simulate_1.Simulate.keyUp(element.el, Core_1.KEYBOARD.RIGHT_ARROW);
                    expect(getDirection()).toEqual(AccessibleButton_1.ArrowDirection.RIGHT);
                });
                it('should be called on keyboard down arrow keypress', function () {
                    Simulate_1.Simulate.keyUp(element.el, Core_1.KEYBOARD.DOWN_ARROW);
                    expect(getDirection()).toEqual(AccessibleButton_1.ArrowDirection.DOWN);
                });
                it('should be called on keyboard left arrow keypress', function () {
                    Simulate_1.Simulate.keyUp(element.el, Core_1.KEYBOARD.LEFT_ARROW);
                    expect(getDirection()).toEqual(AccessibleButton_1.ArrowDirection.LEFT);
                });
            });
            describe('with an event owner', function () {
                var component;
                var owner;
                beforeEach(function () {
                    component = new Core_1.Component(element.el, 'Foo');
                    owner = new Component_1.ComponentEvents(component);
                    new AccessibleButton_1.AccessibleButton().withElement(element).withOwner(owner).withSelectAction(action).build();
                });
                it('should not call the action if the component is disabled', function () {
                    component.disable();
                    Core_1.$$(element).trigger('click');
                    expect(action).not.toHaveBeenCalled();
                });
                it('should call the action if the component is enabled', function () {
                    component.enable();
                    Core_1.$$(element).trigger('click');
                    expect(action).toHaveBeenCalled();
                });
            });
        });
    });
};
 
 
/***/ }),
/* 1786 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var AriaLive_1 = __webpack_require__(478);
var QueryEvents_1 = __webpack_require__(14);
var Core_1 = __webpack_require__(9);
var Simulate_1 = __webpack_require__(15);
var MockEnvironment_1 = __webpack_require__(2);
var Fake_1 = __webpack_require__(11);
exports.AriaLiveTest = function () {
    describe('AriaLive', function () {
        var ariaLive;
        var env;
        beforeEach(function () {
            env = new MockEnvironment_1.MockEnvironmentBuilder().build();
            ariaLive = new AriaLive_1.AriaLive(env.root);
        });
        function ariaLiveEl() {
            return Core_1.$$(env.root).find('[aria-live]');
        }
        it("adds a div with attribute aria-live as a child", function () {
            expect(ariaLiveEl().getAttribute('aria-live')).toBe('polite');
        });
        it("when calling #updateText with a value,\n    it sets the ariaLive element text to the value", function () {
            var text = 'text';
            ariaLive.updateText(text);
            expect(ariaLiveEl().textContent).toBe(text);
        });
        it("when calling #updateText with the same value multiple times,\n    it should append a non-breaking space character to the value\n    so the screen reader says it again", function () {
            var text = 'text';
            ariaLive.updateText(text);
            ariaLive.updateText(text);
            expect(ariaLiveEl().textContent).toBe(text + "\u00A0");
        });
        it('During a query, it announces that results are updating', function () {
            Core_1.$$(env.root).trigger(QueryEvents_1.QueryEvents.duringQuery);
            expect(ariaLiveEl().textContent).toBe('Updating results');
        });
        it("when triggering a successful query with results,\n    it updates the text with the number of results", function () {
            Simulate_1.Simulate.query(env);
            expect(ariaLiveEl().textContent).toMatch(/^Results/);
        });
        describe("when triggering a successful query with unsafe characters and no results", function () {
            var dangerousChar = '<';
            beforeEach(function () {
                var options = {
                    query: { q: dangerousChar },
                    results: Fake_1.FakeResults.createFakeResults(0)
                };
                Simulate_1.Simulate.query(env, options);
            });
            it('updates the text to a no results message', function () { return expect(ariaLiveEl().textContent).toMatch(/^No results/); });
            it('the message contains a sanitized form of the query', function () {
                var message = ariaLiveEl().textContent;
                expect(message).not.toContain(dangerousChar);
            });
        });
        it('when triggering a query that errors, it updates the text to an error message', function () {
            Simulate_1.Simulate.queryError(env);
            var message = ariaLiveEl().textContent;
            expect(message).toContain('error');
        });
        describe('when fetching query suggestions', function () {
            describe('when there are no suggestions', function () {
                beforeEach(function () {
                    var querySuggestRenderedArgs = {
                        numberOfSuggestions: 0
                    };
                    Core_1.$$(env.root).trigger(Core_1.OmniboxEvents.querySuggestRendered, querySuggestRenderedArgs);
                });
                it('updates the text', function () {
                    expect(ariaLiveEl().textContent).toContain(' no ');
                });
            });
            describe('when there are 5 suggestions', function () {
                beforeEach(function () {
                    var querySuggestRenderedArgs = {
                        numberOfSuggestions: 5
                    };
                    Core_1.$$(env.root).trigger(Core_1.OmniboxEvents.querySuggestRendered, querySuggestRenderedArgs);
                });
                it('updates the text', function () {
                    expect(ariaLiveEl().textContent).toContain('5');
                });
            });
        });
    });
};
 
 
/***/ }),
/* 1787 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __assign = (this && this.__assign) || Object.assign || function(t) {
    for (var s, i = 1, n = arguments.length; i < n; i++) {
        s = arguments[i];
        for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
            t[p] = s[p];
    }
    return t;
};
Object.defineProperty(exports, "__esModule", { value: true });
var Mock = __webpack_require__(2);
var QuerySummaryUtils_1 = __webpack_require__(302);
var Core_1 = __webpack_require__(9);
var Fake_1 = __webpack_require__(11);
var ResultList_1 = __webpack_require__(68);
exports.QuerySummaryUtilsTest = function () {
    describe('QuerySummaryUtils', function () {
        var utils = QuerySummaryUtils_1.QuerySummaryUtils;
        var data;
        var root;
        function appendResultListToRoot(options) {
            Iif (options === void 0) { options = {}; }
            var resultList = Mock.optionsComponentSetup(ResultList_1.ResultList, options).cmp.element;
            root.appendChild(resultList);
        }
        function buildQuerySuccessData(config) {
            Iif (config === void 0) { config = {}; }
            var data = {
                query: { q: '' },
                queryBuilder: new Core_1.QueryBuilder(),
                results: Fake_1.FakeResults.createFakeResults(),
                searchAsYouType: false
            };
            return __assign({}, data, config);
        }
        function initDataWithZeroResults() {
            var results = Fake_1.FakeResults.createFakeResults(0);
            data = buildQuerySuccessData({ results: results });
        }
        function initDataWithOneResultAndFalsyQuery() {
            var query = { q: '', firstResult: 0 };
            var results = Fake_1.FakeResults.createFakeResults(1);
            data = buildQuerySuccessData({ query: query, results: results });
        }
        function initDataWithOneResultAndTruthyQuery() {
            var query = { q: 'query', firstResult: 0 };
            var results = Fake_1.FakeResults.createFakeResults(1);
            data = buildQuerySuccessData({ query: query, results: results });
        }
        beforeEach(function () { return (root = Core_1.$$('div').el); });
        it('when calling #replaceQueryTags with a template', function () {
            var template = '${query}';
            var replacement = 'replacement';
            var result = utils.replaceQueryTags(template, replacement);
            expect(result).toBe(replacement);
        });
        describe('when the result list enableInfiniteScroll is disabled', function () {
            beforeEach(function () { return appendResultListToRoot({ enableInfiniteScroll: false }); });
            describe('when the #data object does not have any results', function () {
                beforeEach(initDataWithZeroResults);
                it("when calling #message, it returns an empty string", function () {
                    var message = utils.message(root, data);
                    expect(message).toBe('');
                });
                it("when calling #htmlMessage, it returns an empty string", function () {
                    var message = utils.htmlMessage(root, data);
                    expect(message).toBe('');
                });
            });
            describe("given the #data object has one result,\n      when the query #q is falsy (e.g. an empty string)", function () {
                beforeEach(initDataWithOneResultAndFalsyQuery);
                it("when calling #message, it returns the expected message", function () {
                    var message = utils.message(root, data);
                    expect(message).toBe('Result 1 of 1');
                });
                it("when calling #htmlMessage,\n        it returns the expected message", function () {
                    var message = utils.htmlMessage(root, data);
                    var expected = 'Result <span class="coveo-highlight coveo-highlight-first">1</span> of <span class="coveo-highlight coveo-highlight-total-count">1</span>';
                    expect(message).toBe(expected);
                });
            });
            describe("given the #data object has one result,\n      when the query #q is truthy", function () {
                beforeEach(initDataWithOneResultAndTruthyQuery);
                it("when calling #message,\n        it includes the query in the message", function () {
                    var message = utils.message(root, data);
                    expect(message).toContain(data.query.q);
                });
                it("when calling #htmlMessage,\n        it includes the query in the message", function () {
                    var message = utils.htmlMessage(root, data);
                    expect(message).toContain(data.query.q);
                });
            });
        });
        describe("when the result list has enableInfiniteScroll enabled", function () {
            beforeEach(function () { return appendResultListToRoot({ enableInfiniteScroll: true }); });
            describe("given the #data object has one result,\n      when the query #q is falsy (e.g. an empty string)", function () {
                beforeEach(initDataWithOneResultAndFalsyQuery);
                it("when calling #message, it returns the expected message", function () {
                    var message = utils.message(root, data);
                    expect(message).toBe('1 result');
                });
                it("when calling #htmlMessage, it returns the expected message", function () {
                    var message = utils.htmlMessage(root, data);
                    var expected = '<span class="coveo-highlight coveo-highlight-total-count">1</span> result';
                    expect(message).toBe(expected);
                });
            });
        });
    });
};
 
 
/***/ }),
/* 1788 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { Iif (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        Iif (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            Iif (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
            Iif (y = 0, t) op = [0, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    Eif (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        Iif (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
Object.defineProperty(exports, "__esModule", { value: true });
var CategoryFacetQueryController_1 = __webpack_require__(238);
var Mock = __webpack_require__(2);
var CategoryFacet_1 = __webpack_require__(71);
var AllowedValuesPatternType_1 = __webpack_require__(233);
var Fake_1 = __webpack_require__(11);
var Core_1 = __webpack_require__(9);
function CategoryFacetQueryControllerTest() {
    var _this = this;
    describe('CategoryFacetQueryController', function () {
        var testCategoryFacet;
        var categoryFacetController;
        beforeEach(function () {
            testCategoryFacet = Mock.optionsComponentSetup(CategoryFacet_1.CategoryFacet, {
                field: '@someField',
                injectionDepth: 12345
            });
            categoryFacetController = new CategoryFacetQueryController_1.CategoryFacetQueryController(testCategoryFacet.cmp);
        });
        it('should create a valid group by request when searching', function () {
            categoryFacetController.searchFacetValues('some value', 15);
            expect(testCategoryFacet.env.searchEndpoint.search).toHaveBeenCalledWith(jasmine.objectContaining({
                groupBy: jasmine.arrayContaining([
                    jasmine.objectContaining({
                        allowedValues: ['*some value*'],
                        allowedValuesPatternType: AllowedValuesPatternType_1.AllowedValuesPatternType.Wildcards,
                        maximumNumberOfValues: 15,
                        field: testCategoryFacet.cmp.options.field,
                        sortCriteria: 'occurrences',
                        injectionDepth: testCategoryFacet.cmp.options.injectionDepth
                    })
                ])
            }));
        });
        it('should create a valid allowed value parameter when searching with a base path with a single value', function () {
            testCategoryFacet.cmp.options.basePath = ['a_base_path'];
            testCategoryFacet.cmp.options.delimitingCharacter = '/';
            categoryFacetController.searchFacetValues('some value', 15);
            expect(testCategoryFacet.env.searchEndpoint.search).toHaveBeenCalledWith(jasmine.objectContaining({
                groupBy: jasmine.arrayContaining([
                    jasmine.objectContaining({
                        allowedValues: ['a_base_path/*some value*'],
                        allowedValuesPatternType: AllowedValuesPatternType_1.AllowedValuesPatternType.Wildcards
                    })
                ])
            }));
        });
        it('should create a valid allowed value parameter when searching with a base path with multiple parts', function () {
            testCategoryFacet.cmp.options.basePath = ['a_base_path', 'another_part'];
            testCategoryFacet.cmp.options.delimitingCharacter = '|';
            categoryFacetController.searchFacetValues('some value', 15);
            expect(testCategoryFacet.env.searchEndpoint.search).toHaveBeenCalledWith(jasmine.objectContaining({
                groupBy: jasmine.arrayContaining([
                    jasmine.objectContaining({
                        allowedValues: ['a_base_path|another_part|*some value*'],
                        allowedValuesPatternType: AllowedValuesPatternType_1.AllowedValuesPatternType.Wildcards
                    })
                ])
            }));
        });
        describe('when searching and getting values back from the endpoint', function () {
            beforeEach(function () {
                var fakeResults = Fake_1.FakeResults.createFakeResults();
                var fakeGroupBy = Fake_1.FakeResults.createFakeHierarchicalGroupByResult('@someField', 'value');
                fakeGroupBy.values[0].numberOfResults = 123456;
                fakeGroupBy.values[1].numberOfResults = 123456;
                fakeGroupBy.values[0].value = 'a|much|longer|path';
                fakeGroupBy.values[1].value = 'a|shorter|path';
                fakeResults.groupByResults = [fakeGroupBy];
                testCategoryFacet.env.searchEndpoint.search.and.returnValue(fakeResults);
            });
            it('should order by the number of results', function (done) { return __awaiter(_this, void 0, void 0, function () {
                var searchResults, i;
                return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0: return [4 /*yield*/, categoryFacetController.searchFacetValues('some value', 15)];
                        case 1:
                            searchResults = _a.sent();
                            for (i = 0; i < searchResults.length - 1; i++) {
                                expect(searchResults[i].numberOfResults).not.toBeLessThan(searchResults[i + 1].numberOfResults);
                            }
                            done();
                            return [2 /*return*/];
                    }
                });
            }); });
            it('should order by shortest path first when there is an equality on the number of results', function (done) { return __awaiter(_this, void 0, void 0, function () {
                var searchResults;
                return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0: return [4 /*yield*/, categoryFacetController.searchFacetValues('some value', 15)];
                        case 1:
                            searchResults = _a.sent();
                            expect(searchResults[0].numberOfResults).toEqual(searchResults[1].numberOfResults);
                            expect(searchResults[0].value).toBe('a|shorter|path');
                            expect(searchResults[1].value).toBe('a|much|longer|path');
                            done();
                            return [2 /*return*/];
                    }
                });
            }); });
            describe('when adding the filter in the query', function () {
                var queryBuilder;
                beforeEach(function () {
                    queryBuilder = new Core_1.QueryBuilder();
                });
                it('should not put any filter in the query when there is no base path and no active path', function () {
                    testCategoryFacet.cmp.options.basePath = [];
                    categoryFacetController.putCategoryFacetInQueryBuilder(queryBuilder, [], 5);
                    expect(queryBuilder.advancedExpression.build()).toBeUndefined();
                });
                it('should put the filter in the query when there is no base path and there is an active path', function () {
                    testCategoryFacet.cmp.options.basePath = [];
                    categoryFacetController.putCategoryFacetInQueryBuilder(queryBuilder, ['active_path', 'active_path_2'], 5);
                    expect(queryBuilder.advancedExpression.build()).toEqual('@someField=="active_path|active_path_2"');
                });
                it('should put the filter in the query when there is a base path that contains the active path', function () {
                    testCategoryFacet.cmp.options.basePath = ['active_path'];
                    categoryFacetController.putCategoryFacetInQueryBuilder(queryBuilder, ['active_path', 'active_path_2'], 5);
                    expect(queryBuilder.advancedExpression.build()).toEqual('@someField=="active_path|active_path_2"');
                });
                it('should put the filter in the query when there is a base path that is different from the active path', function () {
                    testCategoryFacet.cmp.options.basePath = ['different_path', 'another_different_path'];
                    categoryFacetController.putCategoryFacetInQueryBuilder(queryBuilder, ['active_path', 'active_path_2'], 5);
                    expect(queryBuilder.advancedExpression.build()).toEqual('@someField=="active_path|active_path_2"');
                });
                it('should not put the filter in the query when there is a base path that equals the active path', function () {
                    testCategoryFacet.cmp.options.basePath = ['active_path', 'active_path_2'];
                    categoryFacetController.putCategoryFacetInQueryBuilder(queryBuilder, ['active_path', 'active_path_2'], 5);
                    expect(queryBuilder.advancedExpression.build()).toBeUndefined();
                });
            });
        });
    });
}
exports.CategoryFacetQueryControllerTest = CategoryFacetQueryControllerTest;
 
 
/***/ }),
/* 1789 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var DynamicHierarchicalFacetQueryController_1 = __webpack_require__(851);
var Core_1 = __webpack_require__(9);
var DynamicHierarchicalFacetTestUtils_1 = __webpack_require__(128);
var MockEnvironment_1 = __webpack_require__(2);
function DynamicHierarchicalFacetQueryControllerTest() {
    describe('DynamicHierarchicalFacetQueryController', function () {
        var facet;
        var facetOptions;
        var dynamicHierarchicalFacetQueryController;
        var queryBuilder;
        var mockFacetValues = DynamicHierarchicalFacetTestUtils_1.DynamicHierarchicalFacetTestUtils.createFakeFacetResponseValues(3, 3);
        beforeEach(function () {
            facetOptions = DynamicHierarchicalFacetTestUtils_1.DynamicHierarchicalFacetTestUtils.allOptions();
            initializeComponents();
        });
        function initializeComponents() {
            facet = DynamicHierarchicalFacetTestUtils_1.DynamicHierarchicalFacetTestUtils.createAdvancedFakeFacet(facetOptions).cmp;
            facet.values.createFromResponse(DynamicHierarchicalFacetTestUtils_1.DynamicHierarchicalFacetTestUtils.getCompleteFacetResponse(facet, { values: mockFacetValues }));
            queryBuilder = new Core_1.QueryBuilder();
            dynamicHierarchicalFacetQueryController = new DynamicHierarchicalFacetQueryController_1.DynamicHierarchicalFacetQueryController(facet);
        }
        function putFacetIntoQueryBuilder() {
            dynamicHierarchicalFacetQueryController.putFacetIntoQueryBuilder(queryBuilder);
        }
        function facetRequest() {
            return dynamicHierarchicalFacetQueryController.buildFacetRequest();
        }
        function queryFacetRequests() {
            return queryBuilder.build().facets;
        }
        function queryFacetOptions() {
            return queryBuilder.build().facetOptions;
        }
        it('should send the right basic facetRequest parameters', function () {
            expect(facetRequest().facetId).toBe(facet.options.id);
            expect(facetRequest().field).toBe(facet.fieldName);
            expect(facetRequest().type).toBe(facet.facetType);
            expect(facetRequest().delimitingCharacter).toBe(facet.options.delimitingCharacter);
            expect(facetRequest().injectionDepth).toBe(facet.options.injectionDepth);
            expect(facetRequest().basePath).toBe(facet.options.basePath);
            expect(facetRequest().filterByBasePath).toBe(false);
        });
        it('the facet option freezeFacetOrder should not be defined by default', function () {
            putFacetIntoQueryBuilder();
            expect(queryFacetOptions().freezeFacetOrder).toBeUndefined();
        });
        it("when enableFreezeFacetOrderFlag is called\n    the facet option freezeFacetOrder should be true", function () {
            dynamicHierarchicalFacetQueryController.enableFreezeFacetOrderFlag();
            putFacetIntoQueryBuilder();
            expect(queryFacetOptions().freezeFacetOrder).toBe(true);
        });
        it('preventAutoSelect should be false by default', function () {
            expect(facetRequest().preventAutoSelect).toBe(false);
        });
        it("when calling enablePreventAutoSelectionFlag\n      allows to enable the flag", function () {
            dynamicHierarchicalFacetQueryController.enablePreventAutoSelectionFlag();
            expect(facetRequest().preventAutoSelect).toBe(true);
        });
        it('numberOfValues should be equal to the numberOfValues option by default', function () {
            expect(facetRequest().numberOfValues).toBe(facetOptions.numberOfValues);
        });
        it("when increaseNumberOfValuesToRequest is called\n    numberOfValues should be equal to the addtion of the numberOfValues and passed parameter", function () {
            var additionalNumberOfValues = 5;
            dynamicHierarchicalFacetQueryController.increaseNumberOfValuesToRequest(additionalNumberOfValues);
            expect(facetRequest().numberOfValues).toBe(facetOptions.numberOfValues + additionalNumberOfValues);
        });
        it("when resetNumberOfValuesToRequest is called\n    numberOfValues should be equal to the numberOfValues option", function () {
            dynamicHierarchicalFacetQueryController.increaseNumberOfValuesToRequest(40);
            dynamicHierarchicalFacetQueryController.resetNumberOfValuesToRequest();
            expect(facetRequest().numberOfValues).toBe(facetOptions.numberOfValues);
        });
        it("when numberOfValues requested is lower or equal than the numberOfValues option\n    isFieldExpanded should be false", function () {
            expect(facetRequest().isFieldExpanded).toBe(false);
        });
        it("when numberOfValues requested is higher than the numberOfValues option\n    isFieldExpanded should be true", function () {
            dynamicHierarchicalFacetQueryController.increaseNumberOfValuesToRequest(1);
            expect(facetRequest().isFieldExpanded).toBe(true);
        });
        it("when putFacetIntoQueryBuilder is called\n    should add facetRequest into the queryBuilder", function () {
            putFacetIntoQueryBuilder();
            expect(queryFacetRequests()[0]).toEqual(facetRequest());
        });
        describe('testing currentValues', function () {
            it("when no value is selected\n      currentValues length should be 0", function () {
                expect(facetRequest().currentValues.length).toBe(0);
            });
            // TODO: remove when API has fixed currentValue/numberOfValues issue
            it("when numberOfValues requested is higher than the numberOfValues option\n        when no value is selected\n        currentValues should be empty", function () {
                dynamicHierarchicalFacetQueryController.increaseNumberOfValuesToRequest(1);
                expect(facetRequest().currentValues).toEqual([]);
            });
            it("when a value is selected\n        a currentValue basic properties should be built correctly", function () {
                facet.values.selectPath(facet.values.allFacetValues[0].path);
                var facetValue = facet.values.allFacetValues[0];
                var currentValue = facetRequest().currentValues[0];
                expect(currentValue.value).toBe(facetValue.value);
                expect(currentValue.state).toBe(facetValue.state);
                expect(currentValue.retrieveCount).toBe(facetValue.retrieveCount);
            });
            it("when the target value is selected\n      retrieveChildren should be true", function () {
                var facetValue = facet.values.allFacetValues[0];
                facet.values.selectPath(facetValue.path);
                var currentValue = facetRequest().currentValues[0];
                expect(currentValue.retrieveChildren).toBe(true);
            });
            it("when the target value is selected\n      children should be empty", function () {
                var facetValue = facet.values.allFacetValues[0];
                facet.values.selectPath(facetValue.path);
                var currentValue = facetRequest().currentValues[0];
                expect(currentValue.children).toEqual([]);
            });
        });
        describe('when executing a query', function () {
            var mockEndpoint;
            beforeEach(function () {
                mockEndpoint = MockEnvironment_1.mockSearchEndpoint();
                facet.queryController.getEndpoint = function () { return mockEndpoint; };
                facet.queryController.getLastQuery = function () { return queryBuilder.build(); };
            });
            it("should send a numberOfResults of 0 in order not to log the query as a full fleged query\n        and alleviate the load on the index", function () {
                dynamicHierarchicalFacetQueryController.getQueryResults();
                expect(mockEndpoint.search).toHaveBeenCalledWith(jasmine.objectContaining({
                    numberOfResults: 0
                }));
            });
            it("when there are no previous facets requests\n      should create the array of facet requests", function () {
                dynamicHierarchicalFacetQueryController.getQueryResults();
                expect(mockEndpoint.search).toHaveBeenCalledWith(jasmine.objectContaining({
                    facets: [dynamicHierarchicalFacetQueryController.buildFacetRequest()]
                }));
            });
            it("when there are only other facets in the previous request\n      should push to the array of facet requests", function () {
                var fakeFacet = DynamicHierarchicalFacetTestUtils_1.DynamicHierarchicalFacetTestUtils.createAdvancedFakeFacet({ field: '@field2' }).cmp;
                fakeFacet.putStateIntoQueryBuilder(queryBuilder);
                dynamicHierarchicalFacetQueryController.getQueryResults();
                expect(mockEndpoint.search).toHaveBeenCalledWith(jasmine.objectContaining({
                    facets: [queryFacetRequests()[0], dynamicHierarchicalFacetQueryController.buildFacetRequest()]
                }));
            });
            it("when there is the same facet in the previous result\n      should overwrite it", function () {
                putFacetIntoQueryBuilder();
                var originalFacetRequest = facetRequest();
                dynamicHierarchicalFacetQueryController.increaseNumberOfValuesToRequest(facetOptions.numberOfValues);
                dynamicHierarchicalFacetQueryController.getQueryResults();
                var newFacetRequest = facetRequest();
                expect(originalFacetRequest).not.toEqual(newFacetRequest);
                expect(mockEndpoint.search).toHaveBeenCalledWith(jasmine.objectContaining({
                    facets: [newFacetRequest]
                }));
            });
        });
    });
}
exports.DynamicHierarchicalFacetQueryControllerTest = DynamicHierarchicalFacetQueryControllerTest;
 
 
/***/ }),
/* 1790 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var ComponentsTypes_1 = __webpack_require__(69);
var Dom_1 = __webpack_require__(0);
var Core_1 = __webpack_require__(9);
var MockEnvironment_1 = __webpack_require__(2);
function ComponentsTypesTest() {
    describe('ComponentsTypes', function () {
        var expectedFacets = ['Facet', 'FacetSlider', 'FacetRange', 'TimespanFacet', 'HierarchicalFacet', 'CategoryFacet', 'DynamicFacet'];
        it('should be able to return a list of different type of facets identifier', function () {
            expectedFacets.forEach(function (expectedFacet) {
                expect(ComponentsTypes_1.ComponentsTypes.allFacetsType).toContain(expectedFacet);
            });
        });
        it('should be able to return a list of properly named facets classnames', function () {
            expectedFacets.forEach(function (expectedFacet) {
                expect(ComponentsTypes_1.ComponentsTypes.allFacetsClassname).toContain("Coveo" + expectedFacet);
            });
        });
        describe('with an HTML element containing live facets component', function () {
            var root;
            beforeEach(function () {
                root = Dom_1.$$('div');
                expectedFacets.forEach(function (expectedFacet) {
                    root.append(Dom_1.$$('div', {
                        className: "Coveo" + expectedFacet,
                        'data-field': '@a_magnificient_field'
                    }).el);
                });
                Core_1.Initialization.automaticallyCreateComponentsInside(root.el, {
                    bindings: new MockEnvironment_1.MockEnvironmentBuilder().build(),
                    options: {}
                });
            });
            it('should be able to return all top level facets element', function () {
                var allFacetsElements = ComponentsTypes_1.ComponentsTypes.getAllFacetElementsFromElement(root);
                expect(allFacetsElements.length).toBe(expectedFacets.length);
                allFacetsElements.forEach(function (element) { return expect(element instanceof HTMLDivElement).toBe(true); });
            });
            it('should be able to return all top level facets instance', function () {
                var allFacetsInstance = ComponentsTypes_1.ComponentsTypes.getAllFacetInstancesFromElement(root);
                expect(allFacetsInstance.length).toBe(expectedFacets.length);
                allFacetsInstance.forEach(function (facetInstance) { return expect(facetInstance instanceof Core_1.Component).toBe(true); });
            });
        });
    });
}
exports.ComponentsTypesTest = ComponentsTypesTest;
 
 
/***/ }),
/* 1791 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var PromotedResultsBadge_1 = __webpack_require__(850);
var Fake_1 = __webpack_require__(11);
var Dom_1 = __webpack_require__(0);
var Mock = __webpack_require__(2);
var Core_1 = __webpack_require__(9);
function PromotedResultsBadgeTest() {
    describe('PromotedResultsBadge', function () {
        var result;
        var item;
        var getPromotedBadge = function () {
            var badge = Dom_1.$$(item).find('.coveo-promoted-result-badge');
            if (!badge) {
                badge = item.parentElement ? Dom_1.$$(item.parentElement).find('.coveo-promoted-result-badge') : null;
            }
            return badge ? Dom_1.$$(badge) : null;
        };
        beforeEach(function () {
            item = Dom_1.$$('div').el;
        });
        it('should not do anything with a "standard" result', function () {
            result = Fake_1.FakeResults.createFakeResult();
            result.isTopResult = false;
            result.isRecommendation = false;
            var test = Mock.basicComponentSetup(PromotedResultsBadge_1.PromotedResultsBadge);
            Dom_1.$$(test.env.root).trigger(Core_1.ResultListEvents.newResultDisplayed, {
                result: result,
                item: item
            });
            expect(getPromotedBadge()).toBeNull();
        });
        describe('with a featured result', function () {
            beforeEach(function () {
                result = Fake_1.FakeResults.createFakeResult();
                result.isTopResult = true;
            });
            it('should output a badge by default', function () {
                var test = Mock.basicComponentSetup(PromotedResultsBadge_1.PromotedResultsBadge);
                Dom_1.$$(test.env.root).trigger(Core_1.ResultListEvents.newResultDisplayed, {
                    result: result,
                    item: item
                });
                expect(getPromotedBadge()).toBeDefined();
            });
            it('should not output a badge if the option is not activated', function () {
                var test = Mock.optionsComponentSetup(PromotedResultsBadge_1.PromotedResultsBadge, {
                    showBadgeForFeaturedResults: false
                });
                Dom_1.$$(test.env.root).trigger(Core_1.ResultListEvents.newResultDisplayed, {
                    result: result,
                    item: item
                });
                expect(getPromotedBadge()).toBeNull();
            });
            it('should use the specified caption', function () {
                var test = Mock.optionsComponentSetup(PromotedResultsBadge_1.PromotedResultsBadge, {
                    captionForFeatured: 'foo'
                });
                Dom_1.$$(test.env.root).trigger(Core_1.ResultListEvents.newResultDisplayed, {
                    result: result,
                    item: item
                });
                expect(getPromotedBadge().text()).toBe(Core_1.l('foo'));
            });
            it('should use the specified color', function () {
                var test = Mock.optionsComponentSetup(PromotedResultsBadge_1.PromotedResultsBadge, {
                    colorForFeaturedResults: 'yellow'
                });
                Dom_1.$$(test.env.root).trigger(Core_1.ResultListEvents.newResultDisplayed, {
                    result: result,
                    item: item
                });
                expect(getPromotedBadge().el.style.backgroundColor).toBe('yellow');
            });
            it('should not have an inline background color if not specified (should be controlled by CSS)', function () {
                var test = Mock.basicComponentSetup(PromotedResultsBadge_1.PromotedResultsBadge);
                Dom_1.$$(test.env.root).trigger(Core_1.ResultListEvents.newResultDisplayed, {
                    result: result,
                    item: item
                });
                expect(getPromotedBadge().el.style.backgroundColor).toBe('');
            });
            it('should not display for table layout', function () {
                Dom_1.$$(item).addClass('coveo-table-layout');
                var test = Mock.basicComponentSetup(PromotedResultsBadge_1.PromotedResultsBadge);
                Dom_1.$$(test.env.root).trigger(Core_1.ResultListEvents.newResultDisplayed, {
                    result: result,
                    item: item
                });
                expect(getPromotedBadge()).toBeNull();
            });
            describe('with a card layout', function () {
                beforeEach(function () {
                    Dom_1.$$(item).addClass('coveo-card-layout');
                });
                it('should add a container for the badge', function () {
                    var test = Mock.basicComponentSetup(PromotedResultsBadge_1.PromotedResultsBadge);
                    Dom_1.$$(test.env.root).trigger(Core_1.ResultListEvents.newResultDisplayed, {
                        result: result,
                        item: item
                    });
                    var badge = getPromotedBadge();
                    expect(Dom_1.$$(badge.el.parentElement).hasClass('coveo-promoted-result-badge-container-card-layout')).toBeTruthy();
                });
            });
        });
        describe('with a recommended result', function () {
            beforeEach(function () {
                result = Fake_1.FakeResults.createFakeResult();
                result.isRecommendation = true;
            });
            it('should not output a badge by default', function () {
                var test = Mock.basicComponentSetup(PromotedResultsBadge_1.PromotedResultsBadge);
                Dom_1.$$(test.env.root).trigger(Core_1.ResultListEvents.newResultDisplayed, {
                    result: result,
                    item: item
                });
                expect(getPromotedBadge()).toBeNull();
            });
            it('should output a badge if the option is activated', function () {
                var test = Mock.optionsComponentSetup(PromotedResultsBadge_1.PromotedResultsBadge, {
                    showBadgeForRecommendedResults: true
                });
                Dom_1.$$(test.env.root).trigger(Core_1.ResultListEvents.newResultDisplayed, {
                    result: result,
                    item: item
                });
                expect(getPromotedBadge()).toBeDefined();
            });
            it('should not consider the result a recommended result if it is also a featured result', function () {
                result.isTopResult = true;
                var test = Mock.optionsComponentSetup(PromotedResultsBadge_1.PromotedResultsBadge, {
                    showBadgeForRecommendedResults: true
                });
                Dom_1.$$(test.env.root).trigger(Core_1.ResultListEvents.newResultDisplayed, {
                    result: result,
                    item: item
                });
                expect(getPromotedBadge().text()).toBeDefined(Core_1.l('Featured'));
            });
            it('should use the specified caption', function () {
                var test = Mock.optionsComponentSetup(PromotedResultsBadge_1.PromotedResultsBadge, {
                    captionForRecommended: 'foo',
                    showBadgeForRecommendedResults: true
                });
                Dom_1.$$(test.env.root).trigger(Core_1.ResultListEvents.newResultDisplayed, {
                    result: result,
                    item: item
                });
                expect(getPromotedBadge().text()).toBe(Core_1.l('foo'));
            });
            it('should use the specified color', function () {
                var test = Mock.optionsComponentSetup(PromotedResultsBadge_1.PromotedResultsBadge, {
                    colorForRecommendedResults: 'pink',
                    showBadgeForRecommendedResults: true
                });
                Dom_1.$$(test.env.root).trigger(Core_1.ResultListEvents.newResultDisplayed, {
                    result: result,
                    item: item
                });
                expect(getPromotedBadge().el.style.backgroundColor).toBe('pink');
            });
            it('should not have an inline background color if not specified (should be controlled by CSS)', function () {
                var test = Mock.optionsComponentSetup(PromotedResultsBadge_1.PromotedResultsBadge, {
                    showBadgeForRecommendedResults: true
                });
                Dom_1.$$(test.env.root).trigger(Core_1.ResultListEvents.newResultDisplayed, {
                    result: result,
                    item: item
                });
                expect(getPromotedBadge().el.style.backgroundColor).toBe('');
            });
        });
    });
}
exports.PromotedResultsBadgeTest = PromotedResultsBadgeTest;
 
 
/***/ }),
/* 1792 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Mock = __webpack_require__(2);
var ResultListUtils_1 = __webpack_require__(72);
var ResultList_1 = __webpack_require__(68);
var Core_1 = __webpack_require__(9);
var SearchInterface_1 = __webpack_require__(25);
exports.ResultListUtilsTest = function () {
    describe('ResultListUtils', function () {
        var utils = ResultListUtils_1.ResultListUtils;
        var root;
        var cmp;
        var resultList;
        function appendResultListToRoot(options, disabled) {
            if (options === void 0) { options = {}; }
            if (disabled === void 0) { disabled = false; }
            resultList = Mock.optionsComponentSetup(ResultList_1.ResultList, options).cmp;
            resultList.disabled = disabled;
            root.element.appendChild(resultList.element);
        }
        function initSearchInterface() {
            root = Mock.basicComponentSetup(SearchInterface_1.SearchInterface).cmp;
        }
        function initComponent() {
            var div = document.createElement('div');
            cmp = new Core_1.Component(div, 'Pager', { searchInterface: root });
        }
        beforeEach(function () { return initSearchInterface(); });
        describe("when a result list with enableInfiniteScroll set to 'false' is appended to the root,\n    when initializing a component", function () {
            beforeEach(function () {
                appendResultListToRoot({ enableInfiniteScroll: false });
                initComponent();
            });
            it('when calling #hideIfInfiniteScrollEnabled, it calls #enable', function () {
                spyOn(cmp, 'enable');
                utils.hideIfInfiniteScrollEnabled(cmp);
                expect(cmp.enable).toHaveBeenCalledTimes(1);
            });
            it("when calling #hideIfInfiniteScrollEnabled,\n      it sets the css display property to an empty string", function () {
                utils.hideIfInfiniteScrollEnabled(cmp);
                expect(cmp.element.style.display).toBe('');
            });
        });
        describe("when a result list with enableInfiniteScroll set to 'true' is appended to the root,\n    when initializing a component", function () {
            beforeEach(function () {
                appendResultListToRoot({ enableInfiniteScroll: true });
                initComponent();
            });
            it('when calling #hideIfInfiniteScrollEnabled, it calls #disable', function () {
                spyOn(cmp, 'disable');
                utils.hideIfInfiniteScrollEnabled(cmp);
                expect(cmp.disable).toHaveBeenCalledTimes(1);
            });
            it("when calling #hideIfInfiniteScrollEnabled,\n      it sets the css display property to 'none'", function () {
                utils.hideIfInfiniteScrollEnabled(cmp);
                expect(cmp.element.style.display).toBe('none');
            });
        });
        it("when a result list with enableInfiniteScroll set to 'false' is appended to the root,\n    when calling #isInfiniteScrollEnabled,\n    it returns 'false'", function () {
            appendResultListToRoot({ enableInfiniteScroll: false });
            expect(utils.isInfiniteScrollEnabled(root.element)).toBe(false);
        });
        it("when a result list with enableInfiniteScroll set to 'true' is appended to the root,\n    when calling #isInfiniteScrollEnabled,\n    it returns 'true'", function () {
            appendResultListToRoot({ enableInfiniteScroll: true });
            expect(utils.isInfiniteScrollEnabled(root.element)).toBe(true);
        });
        it("when appending a result list where enableInfiniteScroll is 'true' but is disabled,\n    when calling #isInfiniteScrollEnabled,\n    it returns 'false'", function () {
            appendResultListToRoot({ enableInfiniteScroll: true }, true);
            expect(utils.isInfiniteScrollEnabled(root.element)).toBe(false);
        });
        describe("when calling #scrollToTop", function () {
            var infiniteScrollContainer;
            var scrollTopSpy;
            beforeEach(function () {
                infiniteScrollContainer = document.createElement('div');
                spyOn(window, 'scrollTo');
                spyOn(infiniteScrollContainer, 'scrollTo');
                var innerValue = 500;
                scrollTopSpy = jasmine.createSpy('scrollTop', function (v) { return (innerValue = v); });
                Object.defineProperty(infiniteScrollContainer, 'scrollTop', {
                    get: function () { return innerValue; },
                    set: scrollTopSpy
                });
            });
            it("with no active result list\n      should scroll to top on the window", function () {
                appendResultListToRoot({ infiniteScrollContainer: infiniteScrollContainer }, true);
                utils.scrollToTop(root.element);
                expect(window.scrollTo).toHaveBeenCalledWith(0, 0);
            });
            it('should filter out result lists part of CoveoRecommendation', function () {
                var top = -100;
                appendResultListToRoot();
                spyOn(resultList.searchInterface.element, 'getBoundingClientRect').and.returnValue({ top: top });
                resultList.searchInterface.element.classList.add('CoveoRecommendation');
                utils.scrollToTop(root.element);
                expect(window.scrollTo).toHaveBeenCalledWith(0, 0);
            });
            it("when the top of the searchInterface is in the view port\n      should not scroll", function () {
                appendResultListToRoot();
                spyOn(resultList.searchInterface.element, 'getBoundingClientRect').and.returnValue({ top: 100 });
                utils.scrollToTop(root.element);
                expect(window.scrollTo).not.toHaveBeenCalled();
            });
            it("when the top of the searchInterface is above the view port\n      it scrolls to the search interface", function () {
                var top = -100;
                appendResultListToRoot();
                spyOn(resultList.searchInterface.element, 'getBoundingClientRect').and.returnValue({ top: top });
                utils.scrollToTop(root.element);
                expect(window.scrollTo).toHaveBeenCalledWith(0, top);
            });
            it("when the top of the searchInterface is above the view port, and is offset from the top of the page,\n      it scrolls to the search interface", function () {
                var yOffset = 1000;
                var top = -100;
                appendResultListToRoot();
                window.pageYOffset = yOffset;
                spyOn(resultList.searchInterface.element, 'getBoundingClientRect').and.returnValue({ top: top });
                utils.scrollToTop(root.element);
                expect(window.scrollTo).toHaveBeenCalledWith(0, yOffset + top);
            });
        });
    });
};
 
 
/***/ }),
/* 1793 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var FacetUtils_1 = __webpack_require__(49);
exports.FacetUtilsTest = function () {
    describe('FacetUtils', function () {
        it('should not needlessly translate @month field for month value as a string', function () {
            var translation = FacetUtils_1.FacetUtils.tryToGetTranslatedCaption('@month', 'hello');
            expect(translation).toEqual('hello');
        });
        it('should not needlessly translate @month field for month value as an invalid month number', function () {
            var translation = FacetUtils_1.FacetUtils.tryToGetTranslatedCaption('@month', '123');
            expect(translation).toEqual('123');
        });
        it('should translate @month field for valid month value as returned by the index', function () {
            var allMonths = [
                { indexValue: '01', translation: 'January' },
                { indexValue: '02', translation: 'February' },
                { indexValue: '03', translation: 'March' },
                { indexValue: '04', translation: 'April' },
                { indexValue: '05', translation: 'May' },
                { indexValue: '06', translation: 'June' },
                { indexValue: '07', translation: 'July' },
                { indexValue: '08', translation: 'August' },
                { indexValue: '09', translation: 'September' },
                { indexValue: '10', translation: 'October' },
                { indexValue: '11', translation: 'November' },
                { indexValue: '12', translation: 'December' }
            ];
            allMonths.forEach(function (month) {
                var translation = FacetUtils_1.FacetUtils.tryToGetTranslatedCaption('@month', month.indexValue);
                expect(translation).toEqual(month.translation);
            });
        });
        describe('testing getDisplayValueFromValueCaption', function () {
            it("when there is no value caption\n        display value should be equal to the value", function () {
                var displayValue = FacetUtils_1.FacetUtils.getDisplayValueFromValueCaption('allo', '@random', {});
                expect(displayValue).toBe('allo');
            });
            it("when there is a value caption\n      display value should be equal to the caption for that value", function () {
                var displayValue = FacetUtils_1.FacetUtils.getDisplayValueFromValueCaption('allo', '@random', { allo: 'bye' });
                expect(displayValue).toBe('bye');
            });
        });
    });
};
 
 
/***/ }),
/* 1794 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __assign = (this && this.__assign) || Object.assign || function(t) {
    for (var s, i = 1, n = arguments.length; i < n; i++) {
        s = arguments[i];
        for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
            t[p] = s[p];
    }
    return t;
};
Object.defineProperty(exports, "__esModule", { value: true });
var Mock = __webpack_require__(2);
var FacetValueState_1 = __webpack_require__(36);
var DynamicFacetTestUtils_1 = __webpack_require__(77);
var Core_1 = __webpack_require__(9);
var FacetSortCriteria_1 = __webpack_require__(156);
var Simulate_1 = __webpack_require__(15);
var AnalyticsActionListMeta_1 = __webpack_require__(7);
var Fake_1 = __webpack_require__(11);
var ResultListUtils_1 = __webpack_require__(72);
var FacetRequest_1 = __webpack_require__(127);
var DynamicFacetManager_1 = __webpack_require__(276);
function DynamicFacetTest() {
    describe('DynamicFacet', function () {
        var test;
        var mockFacetValues;
        var options;
        var triggerNewQuerySpy;
        beforeEach(function () {
            options = { field: '@field' };
            mockFacetValues = DynamicFacetTestUtils_1.DynamicFacetTestUtils.createFakeFacetValues();
            initializeComponent();
        });
        function initializeComponent() {
            test = DynamicFacetTestUtils_1.DynamicFacetTestUtils.createAdvancedFakeFacet(options);
            spyOn(test.cmp.logger, 'warn');
            test.env.searchInterface.getComponents.and.returnValue([test.cmp]);
            test.cmp.values.createFromResponse(DynamicFacetTestUtils_1.DynamicFacetTestUtils.getCompleteFacetResponse(test.cmp, { values: mockFacetValues }));
            test.cmp.moreValuesAvailable = true;
            spyOn(test.cmp.values, 'clearAll').and.callThrough();
            spyOn(test.cmp.values, 'render').and.callThrough();
            spyOn(test.cmp.values, 'createFromResponse');
            spyOn(test.cmp.values, 'resetValues');
            triggerNewQuerySpy = spyOn(test.cmp, 'triggerNewQuery').and.callThrough();
            triggerNewQuerySpy.and.callThrough();
            spyOn(test.cmp, 'putStateIntoQueryBuilder').and.callThrough();
            spyOn(test.cmp, 'putStateIntoAnalytics').and.callThrough();
            spyOn(test.cmp, 'handleQueryResults').and.callThrough();
            spyOn(test.cmp, 'triggerNewIsolatedQuery').and.callThrough();
            spyOn(test.cmp, 'reset').and.callThrough();
            spyOn(test.cmp, 'enableFreezeFacetOrderFlag').and.callThrough();
            spyOn(test.cmp, 'scrollToTop').and.callThrough();
            spyOn(test.cmp, 'focusValueAfterRerender').and.callThrough();
            spyOn(test.cmp, 'logAnalyticsEvent').and.callThrough();
            spyOn(test.cmp, 'selectMultipleValues').and.callThrough();
            spyOn(test.cmp, 'deselectMultipleValues').and.callThrough();
        }
        function testQueryStateModelValues() {
            var qsmValues = test.env.queryStateModel.attributes["f:" + test.cmp.options.id];
            expect(qsmValues).toEqual(test.cmp.values.selectedValues);
        }
        function getFirstFacetRequest() {
            return Simulate_1.Simulate.query(test.env).queryBuilder.build().facets[0];
        }
        function triggerPopulateBreadcrumbs() {
            var args = { breadcrumbs: [] };
            Core_1.$$(test.env.root).trigger(Core_1.BreadcrumbEvents.populateBreadcrumb, args);
            return args.breadcrumbs;
        }
        function searchFeatureActive() {
            return !!Core_1.$$(test.cmp.element).find('.coveo-dynamic-facet-search');
        }
        function searchFeatureDisplayed() {
            return Core_1.$$(Core_1.$$(test.cmp.element).find('.coveo-dynamic-facet-search')).isVisible();
        }
        function validateExpandCollapse(shouldBeCollapsed) {
            expect(Core_1.$$(test.cmp.element).hasClass('coveo-dynamic-facet-collapsed')).toBe(shouldBeCollapsed);
            expect(searchFeatureDisplayed()).toBe(!shouldBeCollapsed);
        }
        function fakeResultsWithFacets() {
            var fakeResultsWithFacets = Fake_1.FakeResults.createFakeResults();
            fakeResultsWithFacets.facets = [
                DynamicFacetTestUtils_1.DynamicFacetTestUtils.getCompleteFacetResponse(DynamicFacetTestUtils_1.DynamicFacetTestUtils.createAdvancedFakeFacet({ field: '@anotherfield' }).cmp),
                DynamicFacetTestUtils_1.DynamicFacetTestUtils.getCompleteFacetResponse(test.cmp)
            ];
            return fakeResultsWithFacets;
        }
        function fakeResultsWithNoFacets() {
            var fakeResultsWithFacets = Fake_1.FakeResults.createFakeResults();
            fakeResultsWithFacets.facets = [];
            return fakeResultsWithFacets;
        }
        it("when facet has values but none are selected\n      should not be seen as \"active\" or as \"empty\"", function () {
            test.cmp.ensureDom();
            expect(Core_1.$$(test.cmp.element).hasClass('coveo-hidden')).toBe(false);
            expect(Core_1.$$(test.cmp.element).hasClass('coveo-active')).toBe(false);
        });
        it("when facet has selected values\n      should be seen as \"active\" & not as \"empty\"", function () {
            mockFacetValues[0].state = FacetValueState_1.FacetValueState.selected;
            initializeComponent();
            test.cmp.ensureDom();
            expect(Core_1.$$(test.cmp.element).hasClass('coveo-hidden')).toBe(false);
            expect(Core_1.$$(test.cmp.element).hasClass('coveo-active')).toBe(true);
        });
        it("when facet has no values\n      should be seen as \"empty\" & not \"active\"", function () {
            mockFacetValues = [];
            initializeComponent();
            test.cmp.ensureDom();
            expect(Core_1.$$(test.cmp.element).hasClass('coveo-hidden')).toBe(true);
            expect(Core_1.$$(test.cmp.element).hasClass('coveo-active')).toBe(false);
        });
        it("when facet has values\n      isCurrentlyDisplayed should return true", function () {
            test.cmp.ensureDom();
            expect(test.cmp.isCurrentlyDisplayed()).toBe(true);
        });
        it("when facet has no values\n      isCurrentlyDisplayed should return false", function () {
            mockFacetValues = [];
            initializeComponent();
            test.cmp.ensureDom();
            expect(test.cmp.isCurrentlyDisplayed()).toBe(false);
        });
        it('allows to select a value', function () {
            expect(test.cmp.values.get(mockFacetValues[0].value).isSelected).toBe(false);
            test.cmp.selectValue(mockFacetValues[0].value);
            expect(test.cmp.values.get(mockFacetValues[0].value).isSelected).toBe(true);
            testQueryStateModelValues();
        });
        it('does not focus on the value after selecting it with a function', function () {
            test.cmp.selectValue(mockFacetValues[0].value);
            expect(test.cmp.focusValueAfterRerender).not.toHaveBeenCalled();
        });
        it('focuses on the value after clicking it', function () {
            test.cmp.ensureDom();
            var facetValue = mockFacetValues[0].value;
            test.cmp.element.querySelector("[data-value=\"" + facetValue + "\"] button").click();
            expect(test.cmp.focusValueAfterRerender).toHaveBeenCalledWith(facetValue);
        });
        it('allows to select a value that did not previously exist', function () {
            var newFacetValue = 'this is a brand new value';
            expect(test.cmp.values.allValues).not.toContain(newFacetValue);
            test.cmp.selectValue(newFacetValue);
            expect(test.cmp.values.get(newFacetValue).isSelected).toBe(true);
            testQueryStateModelValues();
        });
        it('allows to select multiple values', function () {
            var selectedValues = [mockFacetValues[0].value, mockFacetValues[1].value, 'new value'];
            expect(test.cmp.values.selectedValues.length).toBe(0);
            test.cmp.selectMultipleValues(selectedValues);
            expect(test.cmp.values.selectedValues).toEqual(selectedValues);
            testQueryStateModelValues();
        });
        it('allows to deselect a value', function () {
            mockFacetValues[2].state = FacetValueState_1.FacetValueState.selected;
            initializeComponent();
            test.cmp.deselectValue(mockFacetValues[2].value);
            expect(test.cmp.values.get(mockFacetValues[2].value).isSelected).toBe(false);
            testQueryStateModelValues();
        });
        it('allows to deselect multiple values', function () {
            mockFacetValues[1].state = FacetValueState_1.FacetValueState.selected;
            mockFacetValues[3].state = FacetValueState_1.FacetValueState.selected;
            initializeComponent();
            test.cmp.deselectMultipleValues([mockFacetValues[1].value, mockFacetValues[3].value]);
            expect(test.cmp.values.selectedValues.length).toBe(0);
            testQueryStateModelValues();
        });
        it('allows to toggle a value', function () {
            test.cmp.toggleSelectValue(mockFacetValues[1].value);
            expect(test.cmp.values.get(mockFacetValues[1].value).isSelected).toBe(true);
            testQueryStateModelValues();
            test.cmp.toggleSelectValue(mockFacetValues[1].value);
            expect(test.cmp.values.get(mockFacetValues[1].value).isSelected).toBe(false);
            testQueryStateModelValues();
            test.cmp.toggleSelectValue(mockFacetValues[1].value);
            expect(test.cmp.values.get(mockFacetValues[1].value).isSelected).toBe(true);
            testQueryStateModelValues();
        });
        it('allows to trigger a new query', function () {
            test.cmp.ensureDom();
            test.cmp.triggerNewQuery();
            expect(test.cmp.queryController.executeQuery).toHaveBeenCalled();
        });
        it('allows to trigger a new isolated query', function () {
            spyOn(test.cmp.dynamicFacetQueryController, 'getQueryResults');
            var beforeExecuteQuery = jasmine.createSpy('beforeExecuteQuery', function () { });
            test.cmp.ensureDom();
            test.cmp.triggerNewIsolatedQuery(beforeExecuteQuery);
            expect(test.cmp.dynamicFacetQueryController.getQueryResults).toHaveBeenCalled();
            expect(beforeExecuteQuery).toHaveBeenCalled();
        });
        it('triggering a new isolated query updates the values', function () {
            test.cmp.ensureDom();
            test.cmp.triggerNewIsolatedQuery();
            expect(test.cmp.values.render).toHaveBeenCalled();
        });
        it('allows to reset', function () {
            mockFacetValues[1].state = FacetValueState_1.FacetValueState.selected;
            mockFacetValues[3].state = FacetValueState_1.FacetValueState.selected;
            initializeComponent();
            test.cmp.reset();
            expect(Core_1.$$(test.cmp.element).hasClass('coveo-active')).toBe(false);
            expect(test.cmp.values.selectedValues.length).toBe(0);
            testQueryStateModelValues();
        });
        it('allows to get a caption from a string value', function () {
            initializeComponent();
            test.cmp.options.valueCaption = {
                abc: 'Pancakes',
                def: 'Waffles'
            };
            expect(test.cmp.getCaptionForStringValue('abc')).toBe('Pancakes');
            expect(test.cmp.getCaptionForStringValue('def')).toBe('Waffles');
            expect(test.cmp.getCaptionForStringValue('ghi')).toBe('ghi');
        });
        it("when calling reset\n      when there is any active value\n      should clear and rerender values", function () {
            mockFacetValues[0].state = FacetValueState_1.FacetValueState.selected;
            initializeComponent();
            test.cmp.reset();
            expect(test.cmp.values.clearAll).toHaveBeenCalled();
            expect(test.cmp.values.render).toHaveBeenCalledTimes(2);
        });
        it("when calling reset\n      when there are no active values\n      should not clear and rerender values", function () {
            test.cmp.reset();
            expect(test.cmp.values.clearAll).not.toHaveBeenCalled();
            expect(test.cmp.values.render).toHaveBeenCalledTimes(1);
        });
        it('showMoreValues adds by the numberOfValues option by default', function () {
            var additionalNumberOfValues = test.cmp.options.numberOfValues;
            test.cmp.showMoreValues();
            expect(getFirstFacetRequest().numberOfValues).toBe(test.cmp.options.numberOfValues + additionalNumberOfValues);
        });
        it('allows to showMoreValues with a custom amount of values', function () {
            var additionalNumberOfValues = 38;
            test.cmp.showMoreValues(additionalNumberOfValues);
            expect(test.cmp.triggerNewIsolatedQuery).toHaveBeenCalled();
            expect(getFirstFacetRequest().numberOfValues).toBe(test.cmp.options.numberOfValues + additionalNumberOfValues);
        });
        it('showMoreValues triggers a query', function () {
            test.cmp.showMoreValues();
            expect(test.cmp.triggerNewIsolatedQuery).toHaveBeenCalled();
        });
        it('showLessValues resets the amount of values to the numberOfValues option', function () {
            var additionalNumberOfValues = 38;
            test.cmp.showMoreValues(additionalNumberOfValues);
            test.cmp.showLessValues();
            expect(getFirstFacetRequest().numberOfValues).toBe(test.cmp.options.numberOfValues);
        });
        it('showLessValues triggers a query', function () {
            test.cmp.showLessValues();
            expect(test.cmp.triggerNewIsolatedQuery).toHaveBeenCalled();
        });
        it("when enableCollapse & collapsedByDefault options are true\n      facet should be collapsed", function () {
            options.enableCollapse = true;
            options.collapsedByDefault = true;
            initializeComponent();
            test.cmp.ensureDom();
            validateExpandCollapse(true);
        });
        it("when enableCollapse is false & collapsedByDefault options is true\n      facet should not be collapsed", function () {
            options.enableCollapse = false;
            options.collapsedByDefault = true;
            initializeComponent();
            test.cmp.ensureDom();
            validateExpandCollapse(false);
        });
        it("allows to collapse when enableCollapse is true", function () {
            test.cmp.ensureDom();
            test.cmp.collapse();
            validateExpandCollapse(true);
        });
        it("allows to expand when enableCollapse is true", function () {
            test.cmp.ensureDom();
            test.cmp.collapse();
            test.cmp.expand();
            validateExpandCollapse(false);
        });
        it("does not allow to expand if the enableCollapse is false", function () {
            options.enableCollapse = false;
            initializeComponent();
            test.cmp.ensureDom();
            test.cmp.collapse();
            expect(test.cmp.logger.warn).toHaveBeenCalled();
        });
        it("does not allow to collapse if the enableCollapse is false", function () {
            options.enableCollapse = false;
            initializeComponent();
            test.cmp.ensureDom();
            test.cmp.expand();
            expect(test.cmp.logger.warn).toHaveBeenCalled();
        });
        it("allows to toggle between expand/collapse", function () {
            test.cmp.ensureDom();
            test.cmp.toggleCollapse();
            validateExpandCollapse(true);
            test.cmp.toggleCollapse();
            validateExpandCollapse(false);
        });
        it('should have a default title', function () {
            test.cmp.ensureDom();
            expect(Core_1.$$(test.cmp.element).find('.coveo-dynamic-facet-header-title span').innerHTML).toBe('No title');
        });
        it('title option should set the title', function () {
            options.title = 'a title';
            initializeComponent();
            test.cmp.ensureDom();
            expect(Core_1.$$(test.cmp.element).find('.coveo-dynamic-facet-header-title span').innerHTML).toBe(options.title);
        });
        it('should select the needed values using the id', function () {
            test.env.queryStateModel.set("f:" + test.cmp.options.id, ['a', 'b', 'c']);
            expect(test.cmp.values.selectedValues).toEqual(['a', 'b', 'c']);
        });
        it('should select the needed values using the id', function () {
            options.id = 'my_secret_id';
            initializeComponent();
            test.env.queryStateModel.set("f:" + options.id, ['a', 'b', 'c']);
            expect(test.cmp.values.selectedValues).toEqual(['a', 'b', 'c']);
        });
        it("when a previously idle value is returned selected by the API (autoselection)\n    should update the QSM correctly", function () {
            mockFacetValues[0].state = FacetValueState_1.FacetValueState.selected;
            var results = Fake_1.FakeResults.createFakeResults();
            results.facets = [DynamicFacetTestUtils_1.DynamicFacetTestUtils.getCompleteFacetResponse(test.cmp, { values: mockFacetValues })];
            Simulate_1.Simulate.query(test.env, { results: results });
            testQueryStateModelValues();
        });
        it('should call selectMultipleValues when selecting a value through the QSM', function () {
            test.env.queryStateModel.set("f:" + test.cmp.options.id, ['a', 'b', 'c']);
            expect(test.cmp.selectMultipleValues).toHaveBeenCalled();
        });
        it('should call deselectMultipleValues when deselecting a value through the QSM', function () {
            test.env.queryStateModel.set("f:" + test.cmp.options.id, ['a', 'b', 'c']);
            test.env.queryStateModel.set("f:" + test.cmp.options.id, []);
            expect(test.cmp.deselectMultipleValues).toHaveBeenCalled();
        });
        it('should log an analytics event when showing more results', function () {
            test.cmp.showMoreValues();
            expect(test.cmp.usageAnalytics.logCustomEvent).toHaveBeenCalledWith(AnalyticsActionListMeta_1.analyticsActionCauseList.dynamicFacetShowMore, test.cmp.basicAnalyticsFacetMeta, test.cmp.element);
        });
        it('should log an analytics event when showing less results', function () {
            test.cmp.showLessValues();
            expect(test.cmp.usageAnalytics.logCustomEvent).toHaveBeenCalledWith(AnalyticsActionListMeta_1.analyticsActionCauseList.dynamicFacetShowLess, test.cmp.basicAnalyticsFacetMeta, test.cmp.element);
        });
        it("when not setting a sortCriteria option\n      should set it to undefined in the query", function () {
            expect(getFirstFacetRequest().sortCriteria).toBeUndefined();
        });
        it("when setting a sortCriteria option\n      should pass it down to the query", function () {
            options.sortCriteria = FacetSortCriteria_1.FacetSortCriteria.score;
            initializeComponent();
            expect(getFirstFacetRequest().sortCriteria).toBe(FacetSortCriteria_1.FacetSortCriteria.score);
        });
        it("when not setting a numberOfValues option\n      should set it to 8 in the query", function () {
            expect(getFirstFacetRequest().numberOfValues).toBe(8);
        });
        it("when setting a numberOfValues option\n      should pass it down to the query", function () {
            options.numberOfValues = 100;
            initializeComponent();
            expect(getFirstFacetRequest().numberOfValues).toBe(100);
        });
        it('should populate breadcrumbs by default', function () {
            test.cmp.selectValue('foo');
            var breadcrumbs = triggerPopulateBreadcrumbs();
            expect(breadcrumbs.length).toBe(1);
        });
        it('should not populate breadcrumbs if the option includeInBreadcrumb is set to "false"', function () {
            options.includeInBreadcrumb = false;
            initializeComponent();
            test.cmp.selectValue('foo');
            var breadcrumbs = triggerPopulateBreadcrumbs();
            expect(breadcrumbs.length).toBe(0);
        });
        it('should respect the numberOfValuesInBreadcrumb option', function () {
            options.numberOfValuesInBreadcrumb = 1;
            initializeComponent();
            test.cmp.selectValue('foo');
            test.cmp.selectValue('bar');
            var breadcrumbs = triggerPopulateBreadcrumbs();
            expect(breadcrumbs.length).toBe(1);
        });
        it('logs an analytics search event when logAnalyticsEvent is called', function () {
            test.cmp.logAnalyticsEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.dynamicFacetSelect, __assign({}, test.cmp.basicAnalyticsFacetMeta, { facetValue: 'foo' }));
            expect(test.cmp.usageAnalytics.logSearchEvent).toHaveBeenCalled();
        });
        it('returns the correct basicAnalyticsFacetState', function () {
            expect(test.cmp.basicAnalyticsFacetState).toEqual({
                field: test.cmp.options.field.toString(),
                title: test.cmp.options.title,
                id: test.cmp.options.id,
                facetType: FacetRequest_1.FacetType.specific,
                facetPosition: test.cmp.position
            });
        });
        it('returns the correct basicAnalyticsFacetMeta', function () {
            expect(test.cmp.basicAnalyticsFacetMeta).toEqual({
                facetField: test.cmp.options.field.toString(),
                facetTitle: test.cmp.options.title,
                facetId: test.cmp.options.id
            });
        });
        it('returns the correct analyticsFacetState', function () {
            test.cmp.selectValue('bar');
            test.cmp.selectValue('foo');
            expect(test.cmp.analyticsFacetState).toEqual([
                test.cmp.values.get('bar').analyticsFacetState,
                test.cmp.values.get('foo').analyticsFacetState
            ]);
        });
        it('facet position should be undefined by default', function () {
            expect(test.cmp.position).toBeUndefined();
        });
        describe('when "enableFacetSearch" option is false', function () {
            beforeEach(function () {
                options.enableFacetSearch = false;
                initializeComponent();
                test.cmp.ensureDom();
            });
            it("it should not render the search element", function () {
                options.enableFacetSearch = false;
                initializeComponent();
                test.cmp.ensureDom();
                expect(searchFeatureActive()).toBe(false);
            });
            it("it should not throw when collapsing", function () {
                options.enableFacetSearch = false;
                initializeComponent();
                test.cmp.ensureDom();
                expect(function () { return test.cmp.collapse(); }).not.toThrow();
            });
        });
        describe('when "enableFacetSearch" option is true', function () {
            beforeEach(function () {
                options.enableFacetSearch = true;
                initializeComponent();
                test.cmp.ensureDom();
            });
            it("it should show the search element", function () {
                expect(searchFeatureDisplayed()).toBe(true);
            });
            it("when collapsing the facet\n      it should hide the search element", function () {
                test.cmp.collapse();
                expect(searchFeatureDisplayed()).toBe(false);
            });
            it("when expanding a collapsed facet\n      it should show the search element", function () {
                test.cmp.collapse();
                test.cmp.expand();
                expect(searchFeatureDisplayed()).toBe(true);
            });
        });
        describe('when "enableFacetSearch" option is not defined', function () {
            beforeEach(function () {
                test.cmp.ensureDom();
            });
            it("when \"moreValuesAvailable\" is \"true\"\n      it should show the search", function () {
                test.cmp.ensureDom();
                expect(searchFeatureDisplayed()).toBe(true);
            });
            it("when \"moreValuesAvailable\" is \"false\"\n      it should hide the search", function () {
                initializeComponent();
                test.cmp.moreValuesAvailable = false;
                test.cmp.ensureDom();
                expect(searchFeatureDisplayed()).toBe(false);
            });
        });
        it('calling "scrollToTop" should call "scrollToTop" on the ResultListUtils', function () {
            spyOn(ResultListUtils_1.ResultListUtils, 'scrollToTop');
            test.cmp.scrollToTop();
            expect(ResultListUtils_1.ResultListUtils.scrollToTop).toHaveBeenCalledWith(test.cmp.root);
        });
        it("when the enableScrollToTop option is \"false\"\n    calling \"scrollToTop\" should not call \"scrollToTop\" on the ResultListUtils", function () {
            options.enableScrollToTop = false;
            initializeComponent();
            spyOn(ResultListUtils_1.ResultListUtils, 'scrollToTop');
            test.cmp.scrollToTop();
            expect(ResultListUtils_1.ResultListUtils.scrollToTop).not.toHaveBeenCalledWith(test.cmp.root);
        });
        describe('Testing the header', function () {
            beforeEach(function () {
                test.cmp.selectValue(mockFacetValues[0].value);
                test.cmp.ensureDom();
                spyOn(test.cmp.header, 'showLoading').and.callThrough();
                spyOn(test.cmp.header, 'hideLoading').and.callThrough();
                spyOn(test.cmp.header, 'toggleClear').and.callThrough();
                spyOn(test.cmp.header, 'toggleCollapse').and.callThrough();
            });
            it("when triggering the header \"clear\" method\n      should perform the correct actions on the facet", function () {
                test.cmp.header.options.clear();
                expect(test.cmp.reset).toHaveBeenCalledTimes(1);
                expect(test.cmp.enableFreezeFacetOrderFlag).toHaveBeenCalledTimes(1);
                expect(test.cmp.triggerNewQuery).toHaveBeenCalledTimes(1);
                expect(test.cmp.scrollToTop).toHaveBeenCalledTimes(1);
            });
            it("when triggering a query\n      should call \"showLoading\" on the header", function () {
                test.cmp.triggerNewQuery();
                expect(test.cmp.header.showLoading).toHaveBeenCalledTimes(1);
            });
            it("when calling handleQueryResults\n        should call \"hideLoading\" on the header", function () {
                test.cmp.handleQueryResults(fakeResultsWithFacets());
                expect(test.cmp.header.hideLoading).toHaveBeenCalledTimes(1);
            });
            it("when triggering the header \"clear\" method\n      should log an analytics event", function () {
                triggerNewQuerySpy.and.callFake(function (beforeCb) {
                    Iif (beforeCb === void 0) { beforeCb = function () { }; }
                    return beforeCb();
                });
                test.cmp.header.options.clear();
                expect(test.cmp.logAnalyticsEvent).toHaveBeenCalledWith(AnalyticsActionListMeta_1.analyticsActionCauseList.dynamicFacetClearAll, test.cmp.basicAnalyticsFacetMeta);
            });
            it('should call "toggleClear" when calling reset', function () {
                test.cmp.reset();
                expect(test.cmp.header.toggleClear).toHaveBeenCalled();
            });
            it('should call "toggleCollapse" when calling collapse', function () {
                test.cmp.collapse();
                expect(test.cmp.header.toggleCollapse).toHaveBeenCalled();
            });
        });
        describe('testing putStateIntoQueryBuilder', function () {
            it("when calling putStateIntoQueryBuilder\n      should call putFacetIntoQueryBuilder on the categoryFacetQueryController", function () {
                spyOn(test.cmp.dynamicFacetQueryController, 'putFacetIntoQueryBuilder');
                var queryBuilder = new Core_1.QueryBuilder();
                test.cmp.putStateIntoQueryBuilder(queryBuilder);
                expect(test.cmp.dynamicFacetQueryController.putFacetIntoQueryBuilder).toHaveBeenCalledWith(queryBuilder);
            });
            it("when triggering doneBuildingQuery\n      should call putStateIntoQueryBuilder on the facet", function () {
                var queryBuilder = new Core_1.QueryBuilder();
                Core_1.$$(test.cmp.root).trigger(Core_1.QueryEvents.doneBuildingQuery, { queryBuilder: queryBuilder });
                expect(test.cmp.putStateIntoQueryBuilder).toHaveBeenCalledWith(queryBuilder);
            });
            it("when facet as a dynamicFacetManager\n      when triggering doneBuildingQuery\n      should not call putStateIntoQueryBuilder on the facet", function () {
                test.cmp.dynamicFacetManager = Mock.mockComponent(DynamicFacetManager_1.DynamicFacetManager);
                Core_1.$$(test.cmp.root).trigger(Core_1.QueryEvents.doneBuildingQuery, { queryBuilder: new Core_1.QueryBuilder() });
                expect(test.cmp.putStateIntoQueryBuilder).not.toHaveBeenCalled();
            });
        });
        describe('testing putStateIntoAnalytics', function () {
            it("should call \"getPendingSearchEvent\" on the \"usageAnalytics\" object", function () {
                test.cmp.putStateIntoAnalytics();
                expect(test.cmp.usageAnalytics.getPendingSearchEvent).toHaveBeenCalled();
            });
            it("should call \"addFacetState\" on the \"PendingSearchEvent\" with the correct state", function () {
                var fakePendingSearchEvent = {
                    addFacetState: jasmine.createSpy('addFacetState')
                };
                test.cmp.usageAnalytics.getPendingSearchEvent = jasmine
                    .createSpy('getPendingSearchEvent')
                    .and.callFake(function () { return fakePendingSearchEvent; });
                test.cmp.putStateIntoAnalytics();
                expect(fakePendingSearchEvent.addFacetState).toHaveBeenCalledWith(test.cmp.analyticsFacetState);
            });
            it("when facet as a dynamicFacetManager\n        should not call putStateIntoAnalytics on the facet", function () {
                test.cmp.dynamicFacetManager = Mock.mockComponent(DynamicFacetManager_1.DynamicFacetManager);
                Core_1.$$(test.cmp.root).trigger(Core_1.QueryEvents.doneBuildingQuery, { queryBuilder: new Core_1.QueryBuilder() });
                expect(test.cmp.putStateIntoAnalytics).not.toHaveBeenCalled();
            });
        });
        describe('testing deferredQuerySuccess', function () {
            beforeEach(function () {
                test.cmp.ensureDom();
            });
            it("when facet as a dynamicFacetManager\n        should call handleQueryResults on the facet", function () {
                Core_1.$$(test.env.root).trigger(Core_1.QueryEvents.deferredQuerySuccess, { results: fakeResultsWithFacets() });
                expect(test.cmp.handleQueryResults).toHaveBeenCalled();
            });
            it("when facet as a dynamicFacetManager\n        should not call handleQueryResults on the facet", function () {
                test.cmp.dynamicFacetManager = Mock.mockComponent(DynamicFacetManager_1.DynamicFacetManager);
                Core_1.$$(test.env.root).trigger(Core_1.QueryEvents.deferredQuerySuccess, { results: fakeResultsWithFacets() });
                expect(test.cmp.handleQueryResults).not.toHaveBeenCalled();
            });
        });
        describe('testing handleQueryResults', function () {
            beforeEach(function () {
                test.cmp.ensureDom();
            });
            describe('when facet is in the results', function () {
                beforeEach(function () {
                    test.cmp.handleQueryResults(fakeResultsWithFacets());
                });
                it("facet position should be correct", function () {
                    expect(test.cmp.position).toBe(2);
                });
                it("\"createFromResponse\" should be called on the values", function () {
                    expect(test.cmp.values.createFromResponse).toHaveBeenCalledTimes(1);
                });
                it("\"render\" should be called on the values", function () {
                    expect(test.cmp.values.render).toHaveBeenCalledTimes(2);
                });
                it('queryStateModel values are correct', function () {
                    testQueryStateModelValues();
                });
            });
            describe('when facet is not in the results', function () {
                beforeEach(function () {
                    test.cmp.handleQueryResults(fakeResultsWithNoFacets());
                });
                it("facet position should be \"undefined\"", function () {
                    expect(test.cmp.position).toBeUndefined();
                });
                it("\"resetValues\" should be called on the values", function () {
                    expect(test.cmp.values.resetValues).toHaveBeenCalledTimes(1);
                });
                it("\"render\" should be called on the values", function () {
                    expect(test.cmp.values.render).toHaveBeenCalledTimes(2);
                });
                it('queryStateModel values are correct', function () {
                    testQueryStateModelValues();
                });
            });
        });
        describe('testing the DependsOnManager', function () {
            var dependentFacet;
            beforeEach(function () {
                dependentFacet = DynamicFacetTestUtils_1.DynamicFacetTestUtils.createAdvancedFakeFacet({ field: '@dependentField', dependsOn: test.cmp.options.id }, test.env).cmp;
                Core_1.$$(dependentFacet.root).trigger(Core_1.InitializationEvents.afterComponentsInitialization);
                spyOn(dependentFacet, 'reset');
            });
            it('should initialize the dependsOnManager', function () {
                expect(dependentFacet.dependsOnManager).toBeTruthy();
            });
            it("when query state changes so that parent has selected values (default condition fulfilled)\n      should not call \"reset\" on the dependent facet", function () {
                test.cmp.selectValue('test');
                expect(dependentFacet.reset).not.toHaveBeenCalled();
            });
            it("when query state changes so that parent has no selected values (default condition not fulfilled)\n      should call \"reset\" on the dependent facet", function () {
                test.cmp.selectValue('test');
                test.cmp.deselectValue('test');
                expect(dependentFacet.reset).toHaveBeenCalledTimes(1);
            });
        });
    });
}
exports.DynamicFacetTest = DynamicFacetTest;
 
 
/***/ }),
/* 1795 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var DynamicFacetRangeTestUtils_1 = __webpack_require__(157);
var FacetRequest_1 = __webpack_require__(127);
var Core_1 = __webpack_require__(9);
var RangeValue_1 = __webpack_require__(403);
var FacetSortCriteria_1 = __webpack_require__(156);
var IDynamicFacetRange_1 = __webpack_require__(205);
var Simulate_1 = __webpack_require__(15);
var FacetRangeSortOrder_1 = __webpack_require__(275);
function DynamicFacetRangeTest() {
    describe('DynamicFacetRange', function () {
        var test;
        var options;
        beforeEach(function () {
            options = { field: '@field', ranges: [] };
            initializeComponent();
        });
        function initializeComponent() {
            test = DynamicFacetRangeTestUtils_1.DynamicFacetRangeTestUtils.createAdvancedFakeFacet(options);
            spyOn(test.cmp.logger, 'error');
            spyOn(test.cmp.logger, 'warn');
        }
        function getFirstFacetRequest() {
            return Simulate_1.Simulate.query(test.env).queryBuilder.build().facets[0];
        }
        it('facet search options should be disabled', function () {
            options.enableFacetSearch = true;
            options.useLeadingWildcardInFacetSearch = true;
            initializeComponent();
            expect(test.cmp.options.enableFacetSearch).toBe(false);
            expect(test.cmp.options.useLeadingWildcardInFacetSearch).toBe(false);
        });
        it('enableMoreLess option should be disabled', function () {
            options.enableMoreLess = true;
            initializeComponent();
            expect(test.cmp.options.enableMoreLess).toBe(false);
        });
        it('valueCaption option should be disabled', function () {
            options.valueCaption = { hello: 'bonjour' };
            initializeComponent();
            expect(test.cmp.options.valueCaption).toEqual({});
        });
        it('sortCriteria option should be disabled', function () {
            options.sortCriteria = FacetSortCriteria_1.FacetSortCriteria.score;
            initializeComponent();
            expect(test.cmp.options.sortCriteria).toBeUndefined();
        });
        it("when not setting a sortOrder option\n      should set it to undefined in the query", function () {
            expect(getFirstFacetRequest().sortCriteria).toBeUndefined();
        });
        it("when setting a sortOrder option\n      should pass it down to the query", function () {
            options.sortOrder = FacetRangeSortOrder_1.FacetRangeSortOrder.descending;
            initializeComponent();
            expect(getFirstFacetRequest().sortCriteria).toBe(FacetRangeSortOrder_1.FacetRangeSortOrder.descending);
        });
        it("when the ranges option is not defined\n      should not have values", function () {
            expect(test.cmp.values.hasValues).toBe(false);
        });
        it("when the ranges option is defined\n      should have the right number of values", function () {
            options.ranges = DynamicFacetRangeTestUtils_1.DynamicFacetRangeTestUtils.createFakeRanges();
            initializeComponent();
            expect(test.cmp.values.allFacetValues.length).toBe(options.ranges.length);
        });
        it("when the valueFormat is date\n      the facetType should be dateRange", function () {
            options.valueFormat = IDynamicFacetRange_1.DynamicFacetRangeValueFormat.date;
            initializeComponent();
            expect(test.cmp.facetType).toBe(FacetRequest_1.FacetType.dateRange);
        });
        it("when the valueFormat is number\n      the facetType should be numericalRange", function () {
            expect(test.cmp.facetType).toBe(FacetRequest_1.FacetType.numericalRange);
        });
        it("when the valueFormat is currency\n      the facetType should be numericalRange", function () {
            options.valueFormat = IDynamicFacetRange_1.DynamicFacetRangeValueFormat.currency;
            initializeComponent();
            expect(test.cmp.facetType).toBe(FacetRequest_1.FacetType.numericalRange);
        });
        it("when not setting a valueFormat option\n      should set it to \"number\" by default", function () {
            expect(test.cmp.options.valueFormat).toBe(IDynamicFacetRange_1.DynamicFacetRangeValueFormat.number);
        });
        it("when not setting a valueFormat option\n      and having with a field containing \"date\"\n      should set it to \"date\"", function () {
            options.field = '@cooldatefield';
            initializeComponent();
            expect(test.cmp.options.valueFormat).toBe(IDynamicFacetRange_1.DynamicFacetRangeValueFormat.date);
        });
        it("when setting an invalid valueFormat option\n      should set it to \"number\"", function () {
            options.valueFormat = 'hello';
            initializeComponent();
            expect(test.cmp.options.valueFormat).toBe(IDynamicFacetRange_1.DynamicFacetRangeValueFormat.number);
        });
        it("when calling showMoreValues\n      it should throw a warning", function () {
            test.cmp.showMoreValues();
            expect(test.cmp.logger.warn).toHaveBeenCalled();
        });
        it("when calling showLessValues\n      it should throw a warning", function () {
            test.cmp.showLessValues();
            expect(test.cmp.logger.warn).toHaveBeenCalled();
        });
        it("when calling triggerNewIsolatedQuery\n      it should throw a warning", function () {
            test.cmp.triggerNewIsolatedQuery();
            expect(test.cmp.logger.warn).toHaveBeenCalled();
        });
        function updateQSM(value) {
            var id = Core_1.QueryStateModel.getFacetId(test.cmp.options.id);
            test.cmp.queryStateModel.set(id, [value]);
        }
        describe('when updating directly the QSM', function () {
            it("when using a valid range value\n      should not throw an error", function () {
                updateQSM("1..10" + RangeValue_1.RangeEndScope.Inclusive);
                expect(test.cmp.logger.error).not.toHaveBeenCalled();
            });
            it("when not using a range value\n      should throw an error", function () {
                updateQSM('notARange');
                expect(test.cmp.logger.error).toHaveBeenCalled();
            });
            it("when using a bad start value\n      should throw an error", function () {
                updateQSM("yes..10" + RangeValue_1.RangeEndScope.Inclusive);
                expect(test.cmp.logger.error).toHaveBeenCalled();
            });
            it("when using a bad start end value\n      should throw an error", function () {
                updateQSM("1..no" + RangeValue_1.RangeEndScope.Inclusive);
                expect(test.cmp.logger.error).toHaveBeenCalled();
            });
            it("when using a bad start endInclusive value\n      should throw an error", function () {
                updateQSM("1..10out");
                expect(test.cmp.logger.error).toHaveBeenCalled();
            });
        });
    });
}
exports.DynamicFacetRangeTest = DynamicFacetRangeTest;
 
 
/***/ }),
/* 1796 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Dom_1 = __webpack_require__(0);
var DynamicFacetHeader_1 = __webpack_require__(155);
function DynamicFacetHeaderTest() {
    describe('DynamicFacetHeader', function () {
        var dynamicFacetHeader;
        var options;
        beforeEach(function () {
            options = {
                id: 'id',
                title: 'hello',
                clear: jasmine.createSpy('clear'),
                enableCollapse: true,
                toggleCollapse: jasmine.createSpy('toggleCollapse'),
                collapse: jasmine.createSpy('collapse'),
                expand: jasmine.createSpy('clear'),
                headingLevel: 2
            };
            initializeComponent();
        });
        function initializeComponent() {
            dynamicFacetHeader = new DynamicFacetHeader_1.DynamicFacetHeader(options);
        }
        function collapseElement() {
            return Dom_1.$$(dynamicFacetHeader.element).find('.coveo-dynamic-facet-header-collapse');
        }
        function expandElement() {
            return Dom_1.$$(dynamicFacetHeader.element).find('.coveo-dynamic-facet-header-expand');
        }
        function titleElement() {
            return Dom_1.$$(dynamicFacetHeader.element).find('.coveo-dynamic-facet-header-title');
        }
        function clearElement() {
            return Dom_1.$$(dynamicFacetHeader.element).find('.coveo-dynamic-facet-header-clear');
        }
        it('should create an accessible title', function () {
            expect(Dom_1.$$(titleElement()).getAttribute('aria-label')).toBeTruthy();
            expect(Dom_1.$$(titleElement()).find('span').innerHTML).toBe(options.title);
            expect(Dom_1.$$(titleElement()).getAttribute('id')).toBe(options.id + "-facet-heading");
        });
        it('should create a hidden waitAnimationElement', function () {
            var waitAnimationElement = Dom_1.$$(dynamicFacetHeader.element).find('.coveo-dynamic-facet-header-wait-animation');
            expect(Dom_1.$$(waitAnimationElement).isVisible()).toBe(false);
        });
        it("when calling showLoading\n      waitAnimationElement show be visible after the delay", function (done) {
            var waitAnimationElement = Dom_1.$$(dynamicFacetHeader.element).find('.coveo-dynamic-facet-header-wait-animation');
            dynamicFacetHeader.showLoading();
            expect(Dom_1.$$(waitAnimationElement).isVisible()).toBe(false);
            setTimeout(function () {
                expect(Dom_1.$$(waitAnimationElement).isVisible()).toBe(true);
                done();
            }, DynamicFacetHeader_1.DynamicFacetHeader.showLoadingDelay + 1);
        });
        it('should create an hidden clear button', function () {
            expect(Dom_1.$$(clearElement()).isVisible()).toBe(false);
        });
        it("when calling showClear\n      the clear button should be visible", function () {
            dynamicFacetHeader.toggleClear(true);
            expect(Dom_1.$$(clearElement()).isVisible()).toBe(true);
        });
        it("when clicking on the clear button\n      it should call the clear option", function () {
            dynamicFacetHeader.toggleClear(true);
            Dom_1.$$(clearElement()).trigger('click');
            expect(options.clear).toHaveBeenCalled();
        });
        describe('when passing the option enableCollapse as false', function () {
            beforeEach(function () {
                options.enableCollapse = false;
                initializeComponent();
            });
            it('should not create collapse & expand buttons', function () {
                expect(collapseElement()).toBeFalsy();
                expect(expandElement()).toBeFalsy();
            });
            it('should not throw an error when calling the toggleCollapse method', function () {
                expect(function () { return dynamicFacetHeader.toggleCollapse(true); }).not.toThrow();
            });
        });
        describe('when passing the option enableCollapse as true', function () {
            beforeEach(function () {
                options.enableCollapse = true;
                initializeComponent();
            });
            it('should create a collapse button', function () {
                expect(collapseElement()).toBeTruthy();
            });
            it('should add the coveo-clickable class to the title', function () {
                expect(Dom_1.$$(titleElement()).hasClass('coveo-clickable')).toBe(true);
            });
            it("when clicking on the title\n        should call the toggleCollapse method of the DynamicFacet", function () {
                Dom_1.$$(titleElement()).trigger('click');
                expect(options.toggleCollapse).toHaveBeenCalledTimes(1);
            });
        });
    });
}
exports.DynamicFacetHeaderTest = DynamicFacetHeaderTest;
 
 
/***/ }),
/* 1797 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Dom_1 = __webpack_require__(0);
var DynamicFacetHeaderButton_1 = __webpack_require__(398);
var SVGIcons_1 = __webpack_require__(16);
function DynamicFacetHeaderButtonTest() {
    describe('DynamicFacetHeaderButton', function () {
        var button;
        var buttonElement;
        var baseOptions;
        beforeEach(function () {
            baseOptions = {
                label: 'title'
            };
            initializeComponent();
        });
        function initializeComponent() {
            button = new DynamicFacetHeaderButton_1.DynamicFacetHeaderButton(baseOptions);
            buttonElement = button.element;
        }
        it('should initialize without errors', function () {
            expect(initializeComponent).not.toThrow();
        });
        it('should create without errors', function () {
            expect(function () { return new DynamicFacetHeaderButton_1.DynamicFacetHeaderButton(baseOptions); }).not.toThrow();
        });
        it("when no icon options (\"iconSVG\" & \"iconClassName\") are passed\n      should put the the \"label\" in the html directly, not in the \"title\" nor \"aria-label\"", function () {
            expect(buttonElement.innerHTML).toBe(baseOptions.label);
            expect(buttonElement.getAttribute('title')).toBeFalsy();
            expect(buttonElement.getAttribute('aria-label')).toBeFalsy();
        });
        it("when no option \"classname\" is passed\n      should at least put the base coveo-dynamic-facet-header-btn class", function () {
            expect(buttonElement.getAttribute('class')).toBe('coveo-dynamic-facet-header-btn');
        });
        it("when the option \"classname\" is passed\n      should put it in the class of the element", function () {
            var className = 'coveo-test-class';
            baseOptions.className = className;
            initializeComponent();
            expect(buttonElement.getAttribute('class')).toBe('coveo-dynamic-facet-header-btn coveo-test-class');
        });
        it("when the option \"action\" is passed\n      should be called on click", function () {
            var action = jasmine.createSpy('action');
            baseOptions.action = action;
            initializeComponent();
            buttonElement.click();
            expect(action).toHaveBeenCalled();
        });
        it("when the option \"shouldDisplay\" is set to \"undefined\" \n      element should be visible", function () {
            baseOptions.shouldDisplay = undefined;
            initializeComponent();
            expect(Dom_1.$$(buttonElement).isVisible()).toBe(true);
        });
        it("when the option \"shouldDisplay\" is set to \"true\" \n      element should be visible", function () {
            baseOptions.shouldDisplay = true;
            initializeComponent();
            expect(Dom_1.$$(buttonElement).isVisible()).toBe(true);
        });
        it("when the button is hidden then \"toggle\" is called with \"true\"\n      element should become visible", function () {
            baseOptions.shouldDisplay = false;
            initializeComponent();
            button.toggle(true);
            expect(Dom_1.$$(buttonElement).isVisible()).toBe(true);
        });
        it("when the button is visible then \"toggle\" is called with \"false\"\n      element should become hidden", function () {
            button.toggle(false);
            expect(Dom_1.$$(buttonElement).isVisible()).toBe(false);
        });
        describe('when the icon options ("iconSVG" & "iconClassName") are passed', function () {
            var svg;
            beforeEach(function () {
                baseOptions = {
                    label: 'title',
                    iconSVG: SVGIcons_1.SVGIcons.icons.facetExpand,
                    iconClassName: 'coveo-dynamic-facet-header-expand'
                };
                initializeComponent();
                svg = Dom_1.$$(buttonElement).children()[0];
            });
            it('child should the "label" as a "title" & "aria-label" attribute', function () {
                expect(buttonElement.getAttribute('title')).toBe(baseOptions.label);
                expect(buttonElement.getAttribute('aria-label')).toBe(baseOptions.label);
            });
            it('should have an "svg" as a child', function () {
                expect(svg.nodeName).toBe('svg');
            });
            it('child should have the right class', function () {
                expect(svg.getAttribute('class')).toBe(baseOptions.iconClassName);
            });
        });
    });
}
exports.DynamicFacetHeaderButtonTest = DynamicFacetHeaderButtonTest;
 
 
/***/ }),
/* 1798 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Dom_1 = __webpack_require__(0);
var DynamicFacetHeaderCollapseToggle_1 = __webpack_require__(840);
function DynamicFacetHeaderCollapseToggleTest() {
    describe('DynamicFacetHeaderCollapseToggle', function () {
        var collapseToggle;
        var options;
        beforeEach(function () {
            options = {
                id: 'id',
                title: 'hello',
                clear: jasmine.createSpy('clear'),
                enableCollapse: true,
                toggleCollapse: jasmine.createSpy('toggleCollapse'),
                collapse: jasmine.createSpy('collapse'),
                expand: jasmine.createSpy('clear'),
                headingLevel: 2
            };
            collapseToggle = new DynamicFacetHeaderCollapseToggle_1.DynamicFacetHeaderCollapseToggle(options);
        });
        function getCollapseButton() {
            return Dom_1.$$(collapseToggle.element).find('.coveo-dynamic-facet-header-collapse');
        }
        function getExpandButton() {
            return Dom_1.$$(collapseToggle.element).find('.coveo-dynamic-facet-header-expand');
        }
        function getAriaExpandedState(el) {
            return Dom_1.$$(el).getAttribute('aria-expanded');
        }
        it("should create a collapse button", function () {
            expect(getCollapseButton()).toBeTruthy();
            expect(getExpandButton()).toBeFalsy();
        });
        it("when calling toggleButtons with isCollapsed to true\n      should display the expand button and hide the collapse button", function () {
            collapseToggle.toggleButton(true);
            expect(getCollapseButton()).toBeFalsy();
            expect(getExpandButton()).toBeTruthy();
            expect(getAriaExpandedState(getExpandButton())).toEqual('false');
        });
        it("when calling toggleButtons with isCollapsed to false\n      should display the collapse button and hide the expand button", function () {
            collapseToggle.toggleButton(true);
            collapseToggle.toggleButton(false);
            expect(getCollapseButton()).toBeTruthy();
            expect(getExpandButton()).toBeFalsy();
            expect(getAriaExpandedState(getCollapseButton())).toEqual('true');
        });
        it("when clicking on the collapse button\n      should call toggleCollapse on the DynamicFacet component", function () {
            Dom_1.$$(getCollapseButton()).trigger('click');
            expect(options.toggleCollapse).toHaveBeenCalled();
        });
    });
}
exports.DynamicFacetHeaderCollapseToggleTest = DynamicFacetHeaderCollapseToggleTest;
 
 
/***/ }),
/* 1799 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var DynamicFacetValues_1 = __webpack_require__(202);
var FacetValueState_1 = __webpack_require__(36);
var DynamicFacetTestUtils_1 = __webpack_require__(77);
var Core_1 = __webpack_require__(9);
var DynamicFacetValueCreator_1 = __webpack_require__(273);
function DynamicFacetValuesTest() {
    describe('DynamicFacetValues', function () {
        var valueCount = 8;
        var dynamicFacetValues;
        var mockFacetValues;
        var facet;
        beforeEach(function () {
            facet = DynamicFacetTestUtils_1.DynamicFacetTestUtils.createFakeFacet({ numberOfValues: valueCount, enableMoreLess: true });
            mockFacetValues = DynamicFacetTestUtils_1.DynamicFacetTestUtils.createFakeFacetValues(valueCount);
            mockFacetValues[1].state = FacetValueState_1.FacetValueState.selected;
            mockFacetValues[3].state = FacetValueState_1.FacetValueState.selected;
            initializeComponent();
        });
        function initializeComponent() {
            dynamicFacetValues = new DynamicFacetValues_1.DynamicFacetValues(facet, DynamicFacetValueCreator_1.DynamicFacetValueCreator);
            createValuesFromResponse();
        }
        function createValuesFromResponse() {
            dynamicFacetValues.createFromResponse(DynamicFacetTestUtils_1.DynamicFacetTestUtils.getCompleteFacetResponse(facet, { values: mockFacetValues }));
        }
        function facetValueList() {
            return dynamicFacetValues.render();
        }
        function moreButton() {
            var element = dynamicFacetValues.render();
            return Core_1.$$(element).find('.coveo-dynamic-facet-show-more');
        }
        function lessButton() {
            var element = dynamicFacetValues.render();
            return Core_1.$$(element).find('.coveo-dynamic-facet-show-less');
        }
        function values() {
            var element = dynamicFacetValues.render();
            return Core_1.$$(element).findAll('.coveo-dynamic-facet-value');
        }
        function selectedCollapsedValues() {
            var element = dynamicFacetValues.render();
            return Core_1.$$(element).find('.coveo-dynamic-facet-collapsed-values');
        }
        it('the facet value list element has an aria-labelledby', function () {
            var list = facetValueList();
            expect(Core_1.$$(list).getAttribute('aria-labelledby')).toBe(facet.options.id + "-facet-heading");
        });
        it('should return allFacetValues correctly', function () {
            expect(dynamicFacetValues.allFacetValues.length).toBe(mockFacetValues.length);
            expect(dynamicFacetValues.allFacetValues[0].equals(mockFacetValues[0].value)).toBe(true);
        });
        it('should return allValues correctly', function () {
            expect(dynamicFacetValues.allValues.length).toBe(mockFacetValues.length);
            expect(dynamicFacetValues.allValues[0]).toBe(mockFacetValues[0].value);
        });
        it('should return selectedValues correctly', function () {
            expect(dynamicFacetValues.selectedValues[0]).toBe(mockFacetValues[1].value);
            expect(dynamicFacetValues.selectedValues[1]).toBe(mockFacetValues[3].value);
        });
        it('should return activeFacetValues correctly', function () {
            expect(dynamicFacetValues.activeValues[0].value).toBe(mockFacetValues[1].value);
            expect(dynamicFacetValues.activeValues[1].value).toBe(mockFacetValues[3].value);
        });
        it('when there are selected values, hasSelectedValues should return true', function () {
            expect(dynamicFacetValues.hasSelectedValues).toBe(true);
        });
        it('when there are selected values, hasActiveValues should return true', function () {
            expect(dynamicFacetValues.hasActiveValues).toBe(true);
        });
        it('when there are selected values, it should append an element for collapsed selected values', function () {
            expect(selectedCollapsedValues()).toBeTruthy();
            expect(selectedCollapsedValues().textContent).toBe(dynamicFacetValues.selectedValues.join(', '));
        });
        it('when a selected facet value contains XSS, it escapes the XSS value rendered in collapsed mode', function () {
            var facetValueWithXSS = DynamicFacetTestUtils_1.DynamicFacetTestUtils.createFakeFacetValue({
                value: '<img src=x onerror=alert(1)>',
                state: FacetValueState_1.FacetValueState.selected
            });
            mockFacetValues = [facetValueWithXSS];
            initializeComponent();
            expect(selectedCollapsedValues().textContent).toBe(facetValueWithXSS.value);
        });
        it('when there are no selected values, hasSelectedValues should return false', function () {
            mockFacetValues = DynamicFacetTestUtils_1.DynamicFacetTestUtils.createFakeFacetValues();
            initializeComponent();
            expect(dynamicFacetValues.hasSelectedValues).toBe(false);
        });
        it('when there are no selected values, hasActiveValues should return false', function () {
            mockFacetValues = DynamicFacetTestUtils_1.DynamicFacetTestUtils.createFakeFacetValues();
            initializeComponent();
            expect(dynamicFacetValues.hasActiveValues).toBe(false);
        });
        it('when there are selected values, it should not append an element for collapsed selected values', function () {
            mockFacetValues = DynamicFacetTestUtils_1.DynamicFacetTestUtils.createFakeFacetValues();
            initializeComponent();
            expect(selectedCollapsedValues()).toBeFalsy();
        });
        it('when there are idle values, hasIdleValues should return true', function () {
            expect(dynamicFacetValues.hasIdleValues).toBe(true);
        });
        it('when there are no idle values, hasIdleValues should return false', function () {
            mockFacetValues.forEach(function (mockFacetValue) { return (mockFacetValue.state = FacetValueState_1.FacetValueState.selected); });
            initializeComponent();
            expect(dynamicFacetValues.hasIdleValues).toBe(false);
        });
        it('when there are values (non empty or active), hasDisplayedValues should return true', function () {
            expect(dynamicFacetValues.hasDisplayedValues).toBe(true);
        });
        it('when there are only idle values with no results, hasDisplayedValues should return false', function () {
            var idleValueWithoutResult = mockFacetValues[0];
            idleValueWithoutResult.state = FacetValueState_1.FacetValueState.idle;
            idleValueWithoutResult.numberOfResults = 0;
            mockFacetValues = [idleValueWithoutResult];
            initializeComponent();
            expect(dynamicFacetValues.hasDisplayedValues).toBe(false);
        });
        it('when there are no values, hasDisplayedValues should return false', function () {
            mockFacetValues = [];
            initializeComponent();
            expect(dynamicFacetValues.hasDisplayedValues).toBe(false);
        });
        it('clearAll should set all values to selected=false', function () {
            dynamicFacetValues.clearAll();
            expect(dynamicFacetValues.hasSelectedValues).toBe(false);
        });
        it('get should return a value if it exists', function () {
            expect(dynamicFacetValues.get(mockFacetValues[2].value)).toBe(dynamicFacetValues.allFacetValues[2]);
        });
        it('get should create and return a new value if it does not exist', function () {
            var newValue = dynamicFacetValues.get('new value');
            expect(dynamicFacetValues.allFacetValues[dynamicFacetValues.allFacetValues.length - 1]).toBe(newValue);
        });
        it('renders without error', function () {
            expect(function () { return dynamicFacetValues.render(); }).not.toThrow();
        });
        it('renders the correct number of values', function () {
            expect(values().length).toBe(mockFacetValues.length);
        });
        it('does not renders values that are idle and without result', function () {
            mockFacetValues[0].numberOfResults = 0;
            initializeComponent();
            expect(values().length).toBe(mockFacetValues.length - 1);
        });
        it("when moreValuesAvailable is false\n      should not render the \"Show more\" button", function () {
            expect(moreButton()).toBeFalsy();
        });
        it("should reset the values correctly", function () {
            dynamicFacetValues.resetValues();
            expect(dynamicFacetValues.allFacetValues.length).toBe(0);
        });
        it('should reorder values correctly', function () {
            dynamicFacetValues.reorderValues([
                'does not exist',
                mockFacetValues[6].value,
                mockFacetValues[3].value,
                mockFacetValues[2].value,
                'also does not exist'
            ]);
            expect(dynamicFacetValues.allValues).toEqual([
                mockFacetValues[6].value,
                mockFacetValues[3].value,
                mockFacetValues[2].value,
                mockFacetValues[0].value,
                mockFacetValues[1].value,
                mockFacetValues[4].value,
                mockFacetValues[5].value,
                mockFacetValues[7].value
            ]);
        });
        describe('when moreValuesAvailable is true', function () {
            beforeEach(function () {
                facet.moreValuesAvailable = true;
                createValuesFromResponse();
            });
            it("should render the \"Show more\" button", function () {
                expect(moreButton()).toBeTruthy();
            });
            it("when clicking on the \"Show more\" button\n        should perform the correct actions on the facet", function () {
                Core_1.$$(moreButton()).trigger('click');
                expect(facet.enableFreezeFacetOrderFlag).toHaveBeenCalledTimes(1);
                expect(facet.showMoreValues).toHaveBeenCalledTimes(1);
            });
        });
        it("when there are less or an equal number of values as the numberOfValues option\n      should not render the \"Show less\" button", function () {
            expect(lessButton()).toBeFalsy();
        });
        describe('when there are more values than the numberOfValues option', function () {
            beforeEach(function () {
                mockFacetValues = DynamicFacetTestUtils_1.DynamicFacetTestUtils.createFakeFacetValues(10);
                createValuesFromResponse();
            });
            it("should render the \"Show less\" button", function () {
                expect(lessButton()).toBeTruthy();
            });
            it("when clicking on the \"Show more\" button\n        should perform the correct actions on the facet", function () {
                Core_1.$$(lessButton()).trigger('click');
                expect(facet.enableFreezeFacetOrderFlag).toHaveBeenCalledTimes(1);
                expect(facet.showLessValues).toHaveBeenCalledTimes(1);
            });
        });
        describe('when the facet option enableMoreLess is false', function () {
            beforeEach(function () {
                facet = DynamicFacetTestUtils_1.DynamicFacetTestUtils.createFakeFacet({ numberOfValues: 5, enableMoreLess: false });
                initializeComponent();
            });
            it("when moreValuesAvailable is true\n      should not render the \"Show less\" button", function () {
                facet.moreValuesAvailable = true;
                createValuesFromResponse();
                expect(moreButton()).toBeFalsy();
            });
            it("when there are more values than the option \"numberOfValues\"\n      should not render the \"Show less\" button", function () {
                mockFacetValues = DynamicFacetTestUtils_1.DynamicFacetTestUtils.createFakeFacetValues(facet.options.numberOfValues * 3);
                createValuesFromResponse();
                expect(lessButton()).toBeFalsy();
            });
        });
        it("when calling createValuesFromResponse\n    it should create the values correctly", function () {
            createValuesFromResponse();
            expect(dynamicFacetValues.allFacetValues.length).toBe(valueCount);
        });
    });
}
exports.DynamicFacetValuesTest = DynamicFacetValuesTest;
 
 
/***/ }),
/* 1800 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __assign = (this && this.__assign) || Object.assign || function(t) {
    for (var s, i = 1, n = arguments.length; i < n; i++) {
        s = arguments[i];
        for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
            t[p] = s[p];
    }
    return t;
};
Object.defineProperty(exports, "__esModule", { value: true });
var Globalize = __webpack_require__(28);
var DynamicFacetValue_1 = __webpack_require__(126);
var DynamicFacetTestUtils_1 = __webpack_require__(77);
var DynamicFacetRangeTestUtils_1 = __webpack_require__(157);
var FacetValueState_1 = __webpack_require__(36);
var AnalyticsActionListMeta_1 = __webpack_require__(7);
var DynamicFacetValueRenderer_1 = __webpack_require__(274);
function DynamicFacetValueTest() {
    describe('DynamicFacetValue', function () {
        var dynamicFacetValue;
        var facet;
        var options;
        beforeEach(function () {
            options = undefined;
            initializeComponent();
        });
        function initializeComponent() {
            facet = DynamicFacetTestUtils_1.DynamicFacetTestUtils.createAdvancedFakeFacet(options).cmp;
            facet.searchInterface.getComponents.and.returnValue([facet]);
            dynamicFacetValue = new DynamicFacetValue_1.DynamicFacetValue(DynamicFacetTestUtils_1.DynamicFacetTestUtils.createFakeFacetValues(1)[0], facet, DynamicFacetValueRenderer_1.DynamicFacetValueRenderer);
            spyOn(facet, 'logAnalyticsEvent');
        }
        it('should toggle selection correctly', function () {
            dynamicFacetValue.toggleSelect();
            expect(dynamicFacetValue.isSelected).toBe(true);
            dynamicFacetValue.toggleSelect();
            expect(dynamicFacetValue.isSelected).toBe(false);
        });
        it('should be idle by default', function () {
            expect(dynamicFacetValue.isIdle).toBe(true);
        });
        it('should select correctly', function () {
            dynamicFacetValue.select();
            expect(dynamicFacetValue.isSelected).toBe(true);
        });
        it('should deselect correctly', function () {
            dynamicFacetValue.state = FacetValueState_1.FacetValueState.selected;
            dynamicFacetValue.deselect();
            expect(dynamicFacetValue.isSelected).toBe(false);
        });
        it('should be idle when deselected', function () {
            dynamicFacetValue.state = FacetValueState_1.FacetValueState.selected;
            dynamicFacetValue.deselect();
            expect(dynamicFacetValue.isIdle).toBe(true);
        });
        it("when comparing with another DynamicFacetValue with a different value\n      it should not equal", function () {
            var anotherDynamicFacetValue = new DynamicFacetValue_1.DynamicFacetValue(DynamicFacetTestUtils_1.DynamicFacetTestUtils.createFakeFacetValues(2)[1], facet, DynamicFacetValueRenderer_1.DynamicFacetValueRenderer);
            expect(dynamicFacetValue.equals(anotherDynamicFacetValue)).toBe(false);
        });
        it("when comparing with another DynamicFacetValue with the same value\n      it should equal", function () {
            var anotherDynamicFacetValue = new DynamicFacetValue_1.DynamicFacetValue(DynamicFacetTestUtils_1.DynamicFacetTestUtils.createFakeFacetValues(1)[0], facet, DynamicFacetValueRenderer_1.DynamicFacetValueRenderer);
            expect(dynamicFacetValue.equals(anotherDynamicFacetValue)).toBe(true);
        });
        it("when comparing with a value that does not equal it's own value\n      it should not equal", function () {
            var value = 'a random value with no meaning';
            expect(dynamicFacetValue.equals(value)).toBe(false);
        });
        it("when comparing with a value that equals it's own value\n      it should equal", function () {
            var value = dynamicFacetValue.value;
            expect(dynamicFacetValue.equals(value)).toBe(true);
        });
        it("when comparing with a value that equals it's own value but with different casing\n      it should equal", function () {
            var value = dynamicFacetValue.value.toUpperCase();
            expect(dynamicFacetValue.equals(value)).toBe(true);
        });
        it("when getting formattedCount\n      it should return a string in the Globalize format", function () {
            expect(dynamicFacetValue.formattedCount).toBe(Globalize.format(dynamicFacetValue.numberOfResults, 'n0'));
        });
        it("should return the correct analyticsFacetMeta for a specific value", function () {
            expect(dynamicFacetValue.analyticsFacetMeta).toEqual(__assign({}, facet.basicAnalyticsFacetMeta, { facetValue: dynamicFacetValue.value }));
        });
        it("should return the correct analyticsFacetMeta for a range value", function () {
            var ranges = DynamicFacetRangeTestUtils_1.DynamicFacetRangeTestUtils.createFakeRanges();
            var rangeFacet = DynamicFacetRangeTestUtils_1.DynamicFacetRangeTestUtils.createFakeFacet({ ranges: ranges });
            dynamicFacetValue = rangeFacet.values.allFacetValues[0];
            expect(dynamicFacetValue.analyticsFacetMeta).toEqual(__assign({}, rangeFacet.basicAnalyticsFacetMeta, { facetValue: dynamicFacetValue.start + ".." + dynamicFacetValue.end, facetRangeStart: "" + dynamicFacetValue.start, facetRangeEnd: "" + dynamicFacetValue.end, facetRangeEndInclusive: dynamicFacetValue.endInclusive }));
        });
        it("should return the correct analyticsFacetState for a specific value", function () {
            expect(dynamicFacetValue.analyticsFacetState).toEqual(__assign({}, facet.basicAnalyticsFacetState, { value: dynamicFacetValue.value, valuePosition: dynamicFacetValue.position, displayValue: dynamicFacetValue.displayValue, state: dynamicFacetValue.state }));
        });
        it("should return the correct analyticsFacetState for a range value", function () {
            var ranges = DynamicFacetRangeTestUtils_1.DynamicFacetRangeTestUtils.createFakeRanges();
            var rangeFacet = DynamicFacetRangeTestUtils_1.DynamicFacetRangeTestUtils.createFakeFacet({ ranges: ranges });
            dynamicFacetValue = rangeFacet.values.allFacetValues[0];
            expect(dynamicFacetValue.analyticsFacetState).toEqual(__assign({}, rangeFacet.basicAnalyticsFacetState, { value: dynamicFacetValue.start + ".." + dynamicFacetValue.end, valuePosition: dynamicFacetValue.position, displayValue: dynamicFacetValue.displayValue, state: dynamicFacetValue.state, start: "" + dynamicFacetValue.start, end: "" + dynamicFacetValue.end, endInclusive: dynamicFacetValue.endInclusive }));
        });
        describe('when the value has the state "idle"', function () {
            it('should return the correct aria-label', function () {
                var expectedAriaLabel = dynamicFacetValue.value + " " + dynamicFacetValue.formattedCount + " results";
                expect(dynamicFacetValue.selectAriaLabel).toBe(expectedAriaLabel);
            });
            it('should log the right analytics action', function () {
                dynamicFacetValue.logSelectActionToAnalytics();
                expect(facet.logAnalyticsEvent).toHaveBeenCalledWith(AnalyticsActionListMeta_1.analyticsActionCauseList.dynamicFacetDeselect, dynamicFacetValue.analyticsFacetMeta);
            });
        });
        describe('when the value has the state "selected"', function () {
            beforeEach(function () {
                dynamicFacetValue.select();
            });
            it('should return the correct aria-label', function () {
                var expectedAriaLabel = dynamicFacetValue.value + " " + dynamicFacetValue.formattedCount + " results";
                expect(dynamicFacetValue.selectAriaLabel).toBe(expectedAriaLabel);
            });
            it('should log the right analytics action', function () {
                dynamicFacetValue.logSelectActionToAnalytics();
                expect(facet.logAnalyticsEvent).toHaveBeenCalledWith(AnalyticsActionListMeta_1.analyticsActionCauseList.dynamicFacetSelect, dynamicFacetValue.analyticsFacetMeta);
            });
        });
        it("should render without error", function () {
            expect(function () { return dynamicFacetValue.renderedElement; }).not.toThrow();
        });
    });
}
exports.DynamicFacetValueTest = DynamicFacetValueTest;
 
 
/***/ }),
/* 1801 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Dom_1 = __webpack_require__(0);
var DynamicFacetValueCheckbox_1 = __webpack_require__(401);
var DynamicFacetValue_1 = __webpack_require__(126);
var MockEnvironment_1 = __webpack_require__(2);
function DynamicFacetValueCheckboxTest() {
    describe('DynamicFacetValueCheckbox', function () {
        var dynamicFacetValueCheckbox;
        var selectAction;
        beforeEach(function () {
            selectAction = jasmine.createSpy('selectAction');
            dynamicFacetValueCheckbox = new DynamicFacetValueCheckbox_1.DynamicFacetValueCheckbox(MockEnvironment_1.mock(DynamicFacetValue_1.DynamicFacetValue), selectAction);
        });
        function checkboxButton() {
            return Dom_1.$$(dynamicFacetValueCheckbox.element).find('button');
        }
        it("when checkbox is clicked\n    should toggle the value to deselected correctly", function () {
            Dom_1.$$(checkboxButton()).trigger('click');
            expect(selectAction).toHaveBeenCalled();
        });
    });
}
exports.DynamicFacetValueCheckboxTest = DynamicFacetValueCheckboxTest;
 
 
/***/ }),
/* 1802 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Dom_1 = __webpack_require__(0);
var DynamicFacetValueRenderer_1 = __webpack_require__(274);
var DynamicFacetValue_1 = __webpack_require__(126);
var DynamicFacetTestUtils_1 = __webpack_require__(77);
function DynamicFacetValueRendererTest() {
    describe('DynamicFacetValueRenderer', function () {
        var dynamicFacetValue;
        var dynamicFacetValueRenderer;
        var facet;
        beforeEach(function () {
            initializeComponent();
        });
        function initializeComponent(options) {
            facet = DynamicFacetTestUtils_1.DynamicFacetTestUtils.createFakeFacet(options);
            dynamicFacetValue = new DynamicFacetValue_1.DynamicFacetValue(DynamicFacetTestUtils_1.DynamicFacetTestUtils.createFakeFacetValues(1)[0], facet, DynamicFacetValueRenderer_1.DynamicFacetValueRenderer);
            dynamicFacetValueRenderer = new DynamicFacetValueRenderer_1.DynamicFacetValueRenderer(dynamicFacetValue, facet);
            spyOn(dynamicFacetValue, 'logSelectActionToAnalytics');
        }
        it('should render without errors', function () {
            expect(function () { return dynamicFacetValueRenderer.render(); }).not.toThrow();
        });
        describe('when being rendered', function () {
            var element;
            var checkboxButton;
            beforeEach(function () {
                element = dynamicFacetValueRenderer.render();
                checkboxButton = Dom_1.$$(element).find('button');
            });
            it("when checkbox is focused\n        should add the coveo-focused class", function () {
                Dom_1.$$(checkboxButton).trigger('focusin');
                expect(Dom_1.$$(element).hasClass('coveo-focused')).toBe(true);
            });
            it("when checkbox is focused and blurred\n        should remove the coveo-focused class", function () {
                Dom_1.$$(checkboxButton).trigger('focusin');
                Dom_1.$$(checkboxButton).trigger('focusout');
                expect(Dom_1.$$(element).hasClass('coveo-focused')).toBe(false);
            });
            it("when checkbox is clicked\n      should trigger the right methods", function () {
                facet.triggerNewQuery = function (beforeExecuteQuery) {
                    beforeExecuteQuery();
                };
                Dom_1.$$(checkboxButton).trigger('click');
                expect(facet.toggleSelectValue).toHaveBeenCalledTimes(1);
                expect(facet.enableFreezeCurrentValuesFlag).toHaveBeenCalledTimes(1);
                expect(facet.enableFreezeFacetOrderFlag).toHaveBeenCalledTimes(1);
                expect(facet.enablePreventAutoSelectionFlag).toHaveBeenCalledTimes(1);
                expect(facet.scrollToTop).toHaveBeenCalledTimes(1);
                expect(dynamicFacetValue.logSelectActionToAnalytics).toHaveBeenCalledTimes(1);
            });
            describe('when being the facet value is not selected', function () {
                it('should not have the coveo-selected class', function () {
                    expect(Dom_1.$$(element).hasClass('coveo-selected')).toBe(false);
                });
                it("when checkbox is clicked\n        should toggle the value to selected correctly", function () {
                    // Toggling selection on value manually because the facet is only a mock
                    dynamicFacetValue.toggleSelect();
                    Dom_1.$$(checkboxButton).trigger('click');
                    expect(Dom_1.$$(element).hasClass('coveo-selected')).toBe(true);
                });
            });
            describe('when being the facet value is selected', function () {
                beforeEach(function () {
                    dynamicFacetValue.select();
                    element = dynamicFacetValueRenderer.render();
                    checkboxButton = Dom_1.$$(element).find('button');
                });
                it('should have the coveo-selected class', function () {
                    expect(Dom_1.$$(element).hasClass('coveo-selected')).toBe(true);
                });
                it("when checkbox is clicked\n        should toggle the value to deselected correctly", function () {
                    // Toggling selection on value manually because the facet is only a mock
                    dynamicFacetValue.toggleSelect();
                    Dom_1.$$(checkboxButton).trigger('click');
                    expect(Dom_1.$$(element).hasClass('coveo-selected')).toBe(false);
                });
            });
        });
    });
}
exports.DynamicFacetValueRendererTest = DynamicFacetValueRendererTest;
 
 
/***/ }),
/* 1803 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var DynamicFacetSearchValueRenderer_1 = __webpack_require__(844);
var DynamicFacetValue_1 = __webpack_require__(126);
var DynamicFacetTestUtils_1 = __webpack_require__(77);
var AnalyticsActionListMeta_1 = __webpack_require__(7);
function DynamicFacetSearchValueRendererTest() {
    describe('DynamicFacetValueRenderer', function () {
        var dynamicFacetValue;
        var dynamicFacetSearchValueRenderer;
        var facet;
        beforeEach(function () {
            initializeComponent();
        });
        function initializeComponent() {
            facet = DynamicFacetTestUtils_1.DynamicFacetTestUtils.createFakeFacet();
            dynamicFacetValue = new DynamicFacetValue_1.DynamicFacetValue(DynamicFacetTestUtils_1.DynamicFacetTestUtils.createFakeFacetValues(1)[0], facet, DynamicFacetSearchValueRenderer_1.DynamicFacetSearchValueRenderer);
            dynamicFacetSearchValueRenderer = new DynamicFacetSearchValueRenderer_1.DynamicFacetSearchValueRenderer(dynamicFacetValue, facet);
            spyOn(dynamicFacetValue, 'logSelectActionToAnalytics').and.callThrough();
        }
        it('should render without errors', function () {
            expect(function () { return dynamicFacetSearchValueRenderer.render(); }).not.toThrow();
        });
        it("when checkbox is clicked\n      should trigger the right methods", function () {
            facet.triggerNewQuery = function (beforeExecuteQuery) {
                beforeExecuteQuery();
            };
            dynamicFacetSearchValueRenderer.selectAction();
            expect(facet.toggleSelectValue).toHaveBeenCalledTimes(1);
            expect(facet.enableFreezeFacetOrderFlag).toHaveBeenCalledTimes(1);
            expect(facet.scrollToTop).toHaveBeenCalledTimes(1);
            expect(dynamicFacetValue.logSelectActionToAnalytics).toHaveBeenCalledTimes(1);
            expect(facet.logAnalyticsEvent).toHaveBeenCalledWith(AnalyticsActionListMeta_1.analyticsActionCauseList.dynamicFacetSelect, jasmine.anything());
        });
    });
}
exports.DynamicFacetSearchValueRendererTest = DynamicFacetSearchValueRendererTest;
 
 
/***/ }),
/* 1804 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var DynamicFacetBreadcrumbs_1 = __webpack_require__(838);
var Core_1 = __webpack_require__(9);
var DynamicFacetTestUtils_1 = __webpack_require__(77);
var FacetValueState_1 = __webpack_require__(36);
var AnalyticsActionListMeta_1 = __webpack_require__(7);
var _ = __webpack_require__(1);
function DynamicFacetBreadcrumbsTest() {
    describe('DynamicFacetBreadcrumbs', function () {
        var facet;
        var baseOptions;
        var dynamicFacetBreadcrumbs;
        var mockFacetValues;
        beforeEach(function () {
            mockFacetValues = DynamicFacetTestUtils_1.DynamicFacetTestUtils.createFakeFacetValues(5, FacetValueState_1.FacetValueState.selected);
            baseOptions = { title: 'a title', field: '@field', numberOfValuesInBreadcrumb: 5 };
            initializeComponent();
        });
        function initializeComponent() {
            facet = DynamicFacetTestUtils_1.DynamicFacetTestUtils.createAdvancedFakeFacet(baseOptions).cmp;
            facet.values.createFromResponse(DynamicFacetTestUtils_1.DynamicFacetTestUtils.getCompleteFacetResponse(facet, { values: mockFacetValues }));
            facet.searchInterface.getComponents.and.returnValue([facet]);
            dynamicFacetBreadcrumbs = new DynamicFacetBreadcrumbs_1.DynamicFacetBreadcrumbs(facet);
        }
        function titleElement() {
            return Core_1.$$(dynamicFacetBreadcrumbs.element).find('.coveo-dynamic-facet-breadcrumb-title');
        }
        function valueElements() {
            return Core_1.$$(dynamicFacetBreadcrumbs.element).findAll('.coveo-dynamic-facet-breadcrumb-value');
        }
        function collapseElement() {
            return Core_1.$$(dynamicFacetBreadcrumbs.element).find('.coveo-dynamic-facet-breadcrumb-collapse');
        }
        it('should create a title', function () {
            expect(titleElement().innerHTML).toBe(baseOptions.title + ":");
        });
        it('should create the right number of breadcrumb values', function () {
            expect(valueElements().length).toBe(mockFacetValues.length);
        });
        it('should escape facet values to prevent XSS', function () {
            var facetValueWithXSS = DynamicFacetTestUtils_1.DynamicFacetTestUtils.createFakeFacetValue({
                value: '<img src=x onerror=alert(1)>',
                state: FacetValueState_1.FacetValueState.selected
            });
            mockFacetValues = [facetValueWithXSS];
            initializeComponent();
            var breadcrumb = valueElements()[0];
            expect(breadcrumb.childNodes[0].textContent).toBe('<img src=x onerror=alert(1)>');
        });
        it('should not create a "collapsed breadcrumbs" element allowing to show more values', function () {
            expect(collapseElement()).toBeFalsy();
        });
        it('should have the correct aria-label for every selected value', function () {
            _.each(valueElements(), function (breadcrumb, index) {
                expect(breadcrumb.getAttribute('aria-label')).toBe("Remove inclusion filter on fake value " + index);
            });
        });
        it('should have the correct type for every selected value', function () {
            _.each(valueElements(), function (breadcrumb, index) {
                expect(breadcrumb.getAttribute('type')).toBe("button");
            });
        });
        describe('when the breadcrumb has more values than the numberOfValuesInBreadcrumb option', function () {
            beforeEach(function () {
                baseOptions.numberOfValuesInBreadcrumb = 3;
                initializeComponent();
                spyOn(facet, 'deselectValue');
                spyOn(facet, 'triggerNewQuery');
                spyOn(facet, 'enablePreventAutoSelectionFlag');
            });
            it('should create the maximum number of breadcrumb values', function () {
                expect(valueElements().length).toBe(baseOptions.numberOfValuesInBreadcrumb);
            });
            it('should create a collapsed breadcrumbs allowing to show more values', function () {
                var numberOfCollapsedValues = mockFacetValues.length - baseOptions.numberOfValuesInBreadcrumb;
                expect(collapseElement().innerHTML).toBe(numberOfCollapsedValues + " more...");
            });
            it("when clicking on the \"collapsed breadcrumbs\" element\n        it should diplay all breadcrumb values", function () {
                Core_1.$$(collapseElement()).trigger('click');
                expect(valueElements().length).toBe(mockFacetValues.length);
            });
            it("when clicking on the \"collapsed breadcrumbs\" element\n        it should remove the collapse element", function () {
                Core_1.$$(collapseElement()).trigger('click');
                expect(collapseElement()).toBeFalsy();
            });
            it("when clicking on a breadcrumb value element\n        it should deselect the facet value", function () {
                var valueIndex = 2;
                Core_1.$$(valueElements()[valueIndex]).trigger('click');
                expect(facet.deselectValue).toHaveBeenCalledWith(mockFacetValues[valueIndex].value);
            });
            it("when clicking on a breadcrumb value element\n        it should trigger a new query", function () {
                Core_1.$$(valueElements()[0]).trigger('click');
                expect(facet.triggerNewQuery).toHaveBeenCalled();
            });
            it("when clicking on a breadcrumb value element\n        it should prevent autoselection", function () {
                Core_1.$$(valueElements()[0]).trigger('click');
                expect(facet.enablePreventAutoSelectionFlag).toHaveBeenCalled();
            });
            it("when clicking on a breadcrumb value element\n        it should log an analytics event", function () {
                spyOn(facet, 'logAnalyticsEvent');
                facet.triggerNewQuery = function (beforeExecuteQuery) {
                    beforeExecuteQuery();
                };
                Core_1.$$(valueElements()[0]).trigger('click');
                expect(facet.logAnalyticsEvent).toHaveBeenCalledWith(AnalyticsActionListMeta_1.analyticsActionCauseList.breadcrumbFacet, facet.basicAnalyticsFacetMeta);
            });
        });
    });
}
exports.DynamicFacetBreadcrumbsTest = DynamicFacetBreadcrumbsTest;
 
 
/***/ }),
/* 1805 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var DynamicFacetRequestBuilder_1 = __webpack_require__(203);
function DynamicFacetRequestBuilderTest() {
    describe('DynamicFacetRequestBuilder', function () {
        var requestBuilder;
        var facetRequest = {
            facetId: 'id_facet',
            field: 'field'
        };
        function initializeRequestBuilder() {
            requestBuilder = new DynamicFacetRequestBuilder_1.DynamicFacetRequestBuilder(facetRequest);
        }
        describe('testing "filterFacetCount"', function () {
            it("when \"filterFacetCount\" is not initially defined\n      \"filterFacetCount\" should be \"true\"", function () {
                initializeRequestBuilder();
                expect(requestBuilder.buildBaseRequestForQuery().filterFacetCount).toBe(true);
            });
            it("when \"filterFacetCount\" is initially defined\n      \"filterFacetCount\" should stay the same", function () {
                facetRequest.filterFacetCount = false;
                initializeRequestBuilder();
                expect(requestBuilder.buildBaseRequestForQuery().filterFacetCount).toBe(false);
            });
        });
    });
}
exports.DynamicFacetRequestBuilderTest = DynamicFacetRequestBuilderTest;
 
 
/***/ }),
/* 1806 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var DynamicFacetQueryController_1 = __webpack_require__(400);
var DynamicFacetTestUtils_1 = __webpack_require__(77);
var Core_1 = __webpack_require__(9);
var FacetValueState_1 = __webpack_require__(36);
var MockEnvironment_1 = __webpack_require__(2);
function DynamicFacetQueryControllerTest() {
    describe('DynamicFacetQueryController', function () {
        var facet;
        var facetOptions;
        var dynamicFacetQueryController;
        var queryBuilder;
        var mockFacetValues = DynamicFacetTestUtils_1.DynamicFacetTestUtils.createFakeFacetValues(5);
        beforeEach(function () {
            facetOptions = { field: '@field', numberOfValues: 5 };
            initializeComponents();
        });
        function initializeComponents() {
            facet = DynamicFacetTestUtils_1.DynamicFacetTestUtils.createAdvancedFakeFacet(facetOptions).cmp;
            facet.values.createFromResponse(DynamicFacetTestUtils_1.DynamicFacetTestUtils.getCompleteFacetResponse(facet, { values: mockFacetValues }));
            queryBuilder = new Core_1.QueryBuilder();
            dynamicFacetQueryController = new DynamicFacetQueryController_1.DynamicFacetQueryController(facet);
        }
        function putFacetIntoQueryBuilder() {
            dynamicFacetQueryController.putFacetIntoQueryBuilder(queryBuilder);
        }
        function facetRequest() {
            return dynamicFacetQueryController.buildFacetRequest();
        }
        function queryFacetRequests() {
            return queryBuilder.build().facets;
        }
        function queryFacetOptions() {
            return queryBuilder.build().facetOptions;
        }
        it('should put one facet request in the facets request parameter', function () {
            putFacetIntoQueryBuilder();
            expect(queryFacetRequests().length).toBe(1);
        });
        it('should send the right basic facetRequest parameters', function () {
            expect(facetRequest().facetId).toBe(facet.options.id);
            expect(facetRequest().field).toBe(facet.fieldName);
            expect(facetRequest().type).toBe(facet.facetType);
            expect(facetRequest().sortCriteria).toBe(facet.options.sortCriteria);
            expect(facetRequest().injectionDepth).toBe(facet.options.injectionDepth);
        });
        it('should send the current values', function () {
            var currentValues = facetRequest().currentValues;
            expect(currentValues[0]).toEqual(jasmine.objectContaining({
                value: mockFacetValues[0].value,
                state: mockFacetValues[0].state
            }));
        });
        it('should send the correct numberOfValues, which is initially the option', function () {
            facetOptions.numberOfValues = 100;
            initializeComponents();
            expect(facetRequest().numberOfValues).toBe(100);
        });
        it("when the number of non idle values is lower than the numberOfValuesToRequest\n      it should send the latter as the numberOfValues", function () {
            var numberOfSelectedValues = 5;
            facetOptions.numberOfValues = 8;
            mockFacetValues = DynamicFacetTestUtils_1.DynamicFacetTestUtils.createFakeFacetValues(numberOfSelectedValues, FacetValueState_1.FacetValueState.selected);
            initializeComponents();
            expect(facetRequest().numberOfValues).toBe(8);
        });
        it("when the number of non idle values is greater than the numberOfValuesToRequest\n      it should send the former as the numberOfValues", function () {
            var numberOfSelectedValues = 5;
            facetOptions.numberOfValues = 3;
            mockFacetValues = DynamicFacetTestUtils_1.DynamicFacetTestUtils.createFakeFacetValues(numberOfSelectedValues, FacetValueState_1.FacetValueState.selected);
            initializeComponents();
            expect(facetRequest().numberOfValues).toBe(numberOfSelectedValues);
        });
        it("when increaseNumberOfValuesToRequest is called\n      it should increase the number of values in the request", function () {
            facetOptions.numberOfValues = 100;
            initializeComponents();
            dynamicFacetQueryController.increaseNumberOfValuesToRequest(facetOptions.numberOfValues);
            expect(facetRequest().numberOfValues).toBe(200);
        });
        it("when resetNumberOfValuesToRequest is called\n      it should reset the number of values in the request", function () {
            facetOptions.numberOfValues = 100;
            initializeComponents();
            dynamicFacetQueryController.increaseNumberOfValuesToRequest(facetOptions.numberOfValues);
            dynamicFacetQueryController.increaseNumberOfValuesToRequest(facetOptions.numberOfValues);
            dynamicFacetQueryController.resetNumberOfValuesToRequest();
            expect(facetRequest().numberOfValues).toBe(100);
        });
        it('freezeCurrentValues should be false by default', function () {
            expect(facetRequest().freezeCurrentValues).toBe(false);
        });
        it("when calling enableFreezeCurrentValuesFlag\n      allows to enable the flag", function () {
            dynamicFacetQueryController.enableFreezeCurrentValuesFlag();
            expect(facetRequest().freezeCurrentValues).toBe(true);
        });
        it('preventAutoSelect should be false by default', function () {
            expect(facetRequest().preventAutoSelect).toBe(false);
        });
        it("when calling enablePreventAutoSelectionFlag\n      allows to enable the flag", function () {
            dynamicFacetQueryController.enablePreventAutoSelectionFlag();
            expect(facetRequest().preventAutoSelect).toBe(true);
        });
        it("given a facet with dependent facets having selected values,\n      when calling enableFreezeCurrentValuesFlag\n      it sets the freezeCurrentValues flag to true", function () {
            facet.dependsOnManager = {
                hasDependentFacets: true,
                dependentFacetsHaveSelectedValues: true
            };
            dynamicFacetQueryController.enableFreezeCurrentValuesFlag();
            expect(facetRequest().freezeCurrentValues).toBe(true);
        });
        it("given a facet with dependent facets without selected values,\n    when calling enableFreezeCurrentValuesFlag\n    when values are not affected\n    it sets the freezeCurrentValues flag to true", function () {
            facet.dependsOnManager = {
                hasDependentFacets: true,
                dependentFacetsHaveSelectedValues: false
            };
            dynamicFacetQueryController.enableFreezeCurrentValuesFlag();
            expect(facetRequest().freezeCurrentValues).toBe(true);
        });
        it("given a facet with dependent facets without selected values,\n    when calling enableFreezeCurrentValuesFlag\n    when values are affected\n    it sets the freezeCurrentValues flag to true", function () {
            facet.dependsOnManager = {
                hasDependentFacets: true,
                dependentFacetsHaveSelectedValues: false
            };
            facet.values.resetValues();
            facet.values.get('allo');
            dynamicFacetQueryController.enableFreezeCurrentValuesFlag();
            expect(facetRequest().freezeCurrentValues).toBe(false);
        });
        it("when freezeCurrentValues flag is set to true\n      it should send a numberOfValues equal to the number of sent currentValues", function () {
            facetOptions.numberOfValues = 25;
            initializeComponents();
            dynamicFacetQueryController.enableFreezeCurrentValuesFlag();
            expect(facetRequest().numberOfValues).toBe(facetRequest().currentValues.length);
        });
        it('freezeFacetOrder should be undefined by default', function () {
            expect(queryFacetOptions().freezeFacetOrder).toBeUndefined();
        });
        it('allows to enableFreezeFacetOrderFlag', function () {
            dynamicFacetQueryController.enableFreezeFacetOrderFlag();
            putFacetIntoQueryBuilder();
            expect(queryFacetOptions().freezeFacetOrder).toBe(true);
        });
        it('isFieldExpanded should be false by default', function () {
            expect(facetRequest().isFieldExpanded).toBe(false);
        });
        it("when more values are requested than the numberOfValues options\n      isFieldExpanded should be true", function () {
            facetOptions.numberOfValues = 10;
            initializeComponents();
            dynamicFacetQueryController.increaseNumberOfValuesToRequest(facetOptions.numberOfValues);
            expect(facetRequest().isFieldExpanded).toBe(true);
        });
        describe('when executing a query', function () {
            var mockEndpoint;
            beforeEach(function () {
                mockEndpoint = MockEnvironment_1.mockSearchEndpoint();
                facet.queryController.getEndpoint = function () { return mockEndpoint; };
                facet.queryController.getLastQuery = function () { return queryBuilder.build(); };
            });
            it("should send a numberOfResults of 0 in order not to log the query as a full fleged query\n        and alleviate the load on the index", function () {
                dynamicFacetQueryController.getQueryResults();
                expect(mockEndpoint.search).toHaveBeenCalledWith(jasmine.objectContaining({
                    numberOfResults: 0
                }));
            });
            it("when there are no previous facets requests\n      should create the array of facet requests", function () {
                dynamicFacetQueryController.getQueryResults();
                expect(mockEndpoint.search).toHaveBeenCalledWith(jasmine.objectContaining({
                    facets: [dynamicFacetQueryController.buildFacetRequest()]
                }));
            });
            it("when there are only other facets in the previous request\n      should push to the array of facet requests", function () {
                var fakeFacet = DynamicFacetTestUtils_1.DynamicFacetTestUtils.createAdvancedFakeFacet({ field: '@field2' }).cmp;
                fakeFacet.putStateIntoQueryBuilder(queryBuilder);
                dynamicFacetQueryController.getQueryResults();
                expect(mockEndpoint.search).toHaveBeenCalledWith(jasmine.objectContaining({
                    facets: [queryFacetRequests()[0], dynamicFacetQueryController.buildFacetRequest()]
                }));
            });
            it("when there is the same facet in the previous result\n      should overwrite it", function () {
                putFacetIntoQueryBuilder();
                var originalFacetRequest = facetRequest();
                dynamicFacetQueryController.increaseNumberOfValuesToRequest(facetOptions.numberOfValues);
                dynamicFacetQueryController.getQueryResults();
                var newFacetRequest = facetRequest();
                expect(originalFacetRequest).not.toEqual(newFacetRequest);
                expect(mockEndpoint.search).toHaveBeenCalledWith(jasmine.objectContaining({
                    facets: [newFacetRequest]
                }));
            });
        });
    });
}
exports.DynamicFacetQueryControllerTest = DynamicFacetQueryControllerTest;
 
 
/***/ }),
/* 1807 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var DynamicFacetRangeQueryController_1 = __webpack_require__(849);
var DynamicFacetRangeTestUtils_1 = __webpack_require__(157);
var FacetValueState_1 = __webpack_require__(36);
var FacetRangeSortOrder_1 = __webpack_require__(275);
function DynamicFacetRangeQueryControllerTest() {
    describe('DynamicFacetRangeQueryController', function () {
        var facet;
        var facetOptions;
        var dynamicFacetRangeQueryController;
        var ranges = DynamicFacetRangeTestUtils_1.DynamicFacetRangeTestUtils.createFakeRanges();
        beforeEach(function () {
            facetOptions = { field: '@test', sortOrder: FacetRangeSortOrder_1.FacetRangeSortOrder.descending, injectionDepth: 1234, id: 'myfacetisthebestfacet' };
            initializeComponents();
        });
        function initializeComponents() {
            facet = DynamicFacetRangeTestUtils_1.DynamicFacetRangeTestUtils.createAdvancedFakeFacet(facetOptions).cmp;
            dynamicFacetRangeQueryController = new DynamicFacetRangeQueryController_1.DynamicFacetRangeQueryController(facet);
        }
        function facetRequest() {
            return dynamicFacetRangeQueryController.buildFacetRequest();
        }
        it('should send the right basic facetRequest parameters', function () {
            expect(facetRequest().facetId).toBe(facet.options.id);
            expect(facetRequest().field).toBe(facet.fieldName);
            expect(facetRequest().type).toBe(facet.facetType);
            expect(facetRequest().sortCriteria).toBe(facet.options.sortOrder);
            expect(facetRequest().injectionDepth).toBe(facet.options.injectionDepth);
        });
        it('freezeCurrentValues should be false', function () {
            expect(facetRequest().freezeCurrentValues).toBe(false);
        });
        describe('when the ranges option is defined', function () {
            beforeEach(function () {
                facetOptions = { field: '@field', ranges: ranges };
                initializeComponents();
            });
            it('numberOfValues should be equal to the number of current values', function () {
                expect(facetRequest().numberOfValues).toBe(facetRequest().currentValues.length);
            });
            it('generateAutomaticRanges should be false', function () {
                expect(facetRequest().generateAutomaticRanges).toBe(false);
            });
            it('should send the ranges values as current', function () {
                var currentValues = facetRequest().currentValues;
                var facetValue = ranges[0];
                expect(currentValues[0]).toEqual(jasmine.objectContaining({
                    start: facetValue.start,
                    end: facetValue.end,
                    endInclusive: facetValue.endInclusive,
                    state: FacetValueState_1.FacetValueState.idle
                }));
            });
        });
        describe('when the ranges option is not defined (empty ranges)', function () {
            it('numberOfValues should be equal to the numberOfValues option', function () {
                expect(facetRequest().numberOfValues).toBe(facet.options.numberOfValues);
            });
            describe('when there are no values in the facet', function () {
                it('generateAutomaticRanges should be true', function () {
                    expect(facetRequest().generateAutomaticRanges).toBe(true);
                });
                it('should send no current values', function () {
                    expect(facetRequest().currentValues).toEqual([]);
                });
            });
            describe('when there are active values in the facet', function () {
                beforeEach(function () {
                    facet.selectMultipleValues(['0..100inc', '100..200inc', '200..300inc']);
                    facet.deselectValue('0..100inc');
                });
                it('generateAutomaticRanges should be true', function () {
                    expect(facetRequest().generateAutomaticRanges).toBe(true);
                });
                it('should send current available values', function () {
                    expect(facetRequest().currentValues.length).toEqual(3);
                });
            });
            describe('when there are no active values in the facet', function () {
                beforeEach(function () {
                    facet.selectMultipleValues(['0..100inc', '100..200inc', '200..300inc']);
                    facet.deselectMultipleValues(['0..100inc', '100..200inc', '200..300inc']);
                });
                it('generateAutomaticRanges should be true', function () {
                    expect(facetRequest().generateAutomaticRanges).toBe(true);
                });
                it('should send no current values', function () {
                    expect(facetRequest().currentValues).toEqual([]);
                });
            });
        });
    });
}
exports.DynamicFacetRangeQueryControllerTest = DynamicFacetRangeQueryControllerTest;
 
 
/***/ }),
/* 1808 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __assign = (this && this.__assign) || Object.assign || function(t) {
    for (var s, i = 1, n = arguments.length; i < n; i++) {
        s = arguments[i];
        for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
            t[p] = s[p];
    }
    return t;
};
Object.defineProperty(exports, "__esModule", { value: true });
var Dom_1 = __webpack_require__(0);
var Mock = __webpack_require__(2);
var DynamicFacetManager_1 = __webpack_require__(276);
var DynamicFacetTestUtils_1 = __webpack_require__(77);
var DynamicFacetRangeTestUtils_1 = __webpack_require__(157);
var Simulate_1 = __webpack_require__(15);
var Fake_1 = __webpack_require__(11);
var underscore_1 = __webpack_require__(1);
var Core_1 = __webpack_require__(9);
var ComponentsTypes_1 = __webpack_require__(69);
var Facet_1 = __webpack_require__(32);
function DynamicFacetManagerTest() {
    describe('DynamicFacetManager', function () {
        var test;
        var options;
        var facets;
        var getAllFacetInstancesFromElement = ComponentsTypes_1.ComponentsTypes.getAllFacetInstancesFromElement;
        var getAllFacetsFromSearchInterface = ComponentsTypes_1.ComponentsTypes.getAllFacetsFromSearchInterface;
        beforeEach(function () {
            options = {};
            initializeFacets();
            initializeManager();
        });
        afterAll(function () {
            ComponentsTypes_1.ComponentsTypes.getAllFacetInstancesFromElement = getAllFacetInstancesFromElement;
            ComponentsTypes_1.ComponentsTypes.getAllFacetsFromSearchInterface = getAllFacetsFromSearchInterface;
        });
        function initializeFacets() {
            facets = [
                DynamicFacetTestUtils_1.DynamicFacetTestUtils.createAdvancedFakeFacet({ field: '@field1', numberOfValues: 10 }).cmp,
                DynamicFacetTestUtils_1.DynamicFacetTestUtils.createAdvancedFakeFacet({ field: '@field2', numberOfValues: 5 }).cmp,
                DynamicFacetRangeTestUtils_1.DynamicFacetRangeTestUtils.createAdvancedFakeFacet({
                    field: '@field3',
                    numberOfValues: 100,
                    ranges: DynamicFacetRangeTestUtils_1.DynamicFacetRangeTestUtils.createFakeRanges(100)
                }).cmp
            ];
        }
        function initializeManager() {
            test = Mock.advancedComponentSetup(DynamicFacetManager_1.DynamicFacetManager, {
                cmpOptions: options,
                modifyBuilder: function (builder) {
                    facets.forEach(function (facet) { return builder.element.appendChild(facet.element); });
                    return builder;
                }
            });
            spyOn(test.cmp.logger, 'error');
            spyOn(test.cmp.logger, 'warn');
            ComponentsTypes_1.ComponentsTypes.getAllFacetInstancesFromElement = function () { return facets; };
            ComponentsTypes_1.ComponentsTypes.getAllFacetsFromSearchInterface = function () { return facets; };
        }
        function triggerAfterComponentsInitialization() {
            facets.forEach(function (facet) {
                Simulate_1.Simulate.initialization(facet.getBindings());
            });
            Simulate_1.Simulate.initialization(test.env);
        }
        function triggerQuerySuccess(resultFacets, freezeFacetOrder) {
            if (resultFacets === void 0) { resultFacets = queryFacetsResponse(); }
            if (freezeFacetOrder === void 0) { freezeFacetOrder = false; }
            var fakeResults = Fake_1.FakeResults.createFakeResults();
            fakeResults.facets = resultFacets;
            var query = __assign({}, new Core_1.QueryBuilder().build(), { facetOptions: { freezeFacetOrder: freezeFacetOrder } });
            facets.forEach(function (facet) {
                Simulate_1.Simulate.query(facet.getBindings(), {
                    results: fakeResults,
                    query: query
                });
            });
            Simulate_1.Simulate.query(test.env, {
                results: fakeResults,
                query: query
            });
        }
        function managerContainerChildren() {
            return Dom_1.$$(test.cmp.element).find('.coveo-dynamic-facet-manager-container').children;
        }
        function queryFacetsResponse() {
            return [
                DynamicFacetTestUtils_1.DynamicFacetTestUtils.getCompleteFacetResponse(facets[1]),
                DynamicFacetRangeTestUtils_1.DynamicFacetRangeTestUtils.getCompleteFacetResponse(facets[2]),
                DynamicFacetTestUtils_1.DynamicFacetTestUtils.getCompleteFacetResponse(facets[0])
            ];
        }
        function expectFacetsToBeInQueryResponsePosition() {
            expect(managerContainerChildren()[0]).toBe(facets[1].element);
            expect(managerContainerChildren()[1]).toBe(facets[2].element);
            expect(managerContainerChildren()[2]).toBe(facets[0].element);
        }
        function expectFacetsToBeInOriginalPosition() {
            expect(managerContainerChildren()[0]).toBe(facets[0].element);
            expect(managerContainerChildren()[1]).toBe(facets[1].element);
            expect(managerContainerChildren()[2]).toBe(facets[2].element);
        }
        describe('testing after components initialization', function () {
            it("should have the facets in the original order (DOM)", function () {
                triggerAfterComponentsInitialization();
                expectFacetsToBeInOriginalPosition();
            });
            it('should disable the component if it contains no DynamicFacet child', function () {
                ComponentsTypes_1.ComponentsTypes.getAllFacetInstancesFromElement = function () { return []; };
                triggerAfterComponentsInitialization();
                expect(test.cmp.disabled).toBe(true);
            });
            it("when there are incompatible elements inside the DynamicFacetManager\n        should move them outside the container and warn the user", function () {
                var nonDynamicFacet = Mock.optionsComponentSetup(Facet_1.Facet, {
                    field: '@field'
                }).cmp;
                facets = [nonDynamicFacet];
                initializeManager();
                triggerAfterComponentsInitialization();
                expect(managerContainerChildren().length).toBe(0);
                expect(Dom_1.$$(test.cmp.element).find('.CoveoFacet')).toBeTruthy();
                expect(test.cmp.logger.warn).toHaveBeenCalled();
            });
        });
        describe('testing on building query', function () {
            var queryBuilder;
            function triggerBuildingQuery() {
                queryBuilder = new Core_1.QueryBuilder();
                Dom_1.$$(test.env.root).trigger(Core_1.QueryEvents.doneBuildingQuery, { queryBuilder: queryBuilder });
            }
            beforeEach(function () {
                spyOn(facets[2], 'putStateIntoQueryBuilder');
                spyOn(facets[2], 'putStateIntoAnalytics');
                triggerAfterComponentsInitialization();
                triggerBuildingQuery();
            });
            it("should call putStateIntoQueryBuilder on it's facets", function () {
                expect(facets[2].putStateIntoQueryBuilder).toHaveBeenCalledTimes(1);
            });
            it("should call putStateIntoAnalytics on it's facets", function () {
                expect(facets[2].putStateIntoAnalytics).toHaveBeenCalledTimes(1);
            });
            it("when a facet is disabled\n      should not be sent in the request", function () {
                var facetIndex = 0;
                facets[facetIndex].disable();
                triggerBuildingQuery();
                var facetIsInRequest = !!underscore_1.findWhere(queryBuilder.facetRequests, { facetId: facets[facetIndex].options.id });
                expect(facetIsInRequest).toBe(false);
            });
        });
        describe('testing on a successful query', function () {
            beforeEach(function () {
                triggerAfterComponentsInitialization();
            });
            it("when a query response has no \"facets\" parameter\n        should disable the component and display an error to the user", function () {
                test.cmp.enable();
                Simulate_1.Simulate.query(test.env, {
                    results: Fake_1.FakeResults.createFakeResults()
                });
                expect(test.cmp.logger.error).toHaveBeenCalled();
                expect(test.cmp.disabled).toBe(true);
            });
            it("when a query response has a \"facets\" parameter\n        should not disable the component nor display an error to the user", function () {
                triggerQuerySuccess();
                expect(test.cmp.logger.error).not.toHaveBeenCalled();
                expect(test.cmp.disabled).toBe(false);
            });
            it("should call handleQueryResults on it's facets", function () {
                triggerAfterComponentsInitialization();
                spyOn(facets[2], 'handleQueryResults').and.callThrough();
                triggerQuerySuccess();
                expect(facets[2].handleQueryResults).toHaveBeenCalledTimes(1);
            });
            it("after multiple calls\n        should not create additional facets in the DOM", function () {
                triggerQuerySuccess();
                triggerQuerySuccess();
                expect(managerContainerChildren().length).toBe(facets.length);
            });
            it('should ignore query facets results that are not children of the manager', function () {
                var externalFacet = DynamicFacetTestUtils_1.DynamicFacetTestUtils.createAdvancedFakeFacet({ field: '@anotherField', numberOfValues: 1 }).cmp;
                var additionalFacetResult = DynamicFacetTestUtils_1.DynamicFacetTestUtils.getCompleteFacetResponse(externalFacet);
                triggerQuerySuccess([additionalFacetResult].concat(queryFacetsResponse()));
                expect(managerContainerChildren().length).toBe(facets.length);
            });
            it("when the query option \"freezeFacetOrder\" option is false (default)\n        when the \"enableReorder\" option is true (default)\n        when the \"compareFacets\" option is not defined (default)\n        should reorder the facets in the DOM according to order of the query facets results", function () {
                triggerQuerySuccess();
                expectFacetsToBeInQueryResponsePosition();
            });
            it("when the query option \"freezeFacetOrder\" option is true\n        should not reorder the facets in the DOM ", function () {
                triggerQuerySuccess(queryFacetsResponse(), true);
                expectFacetsToBeInOriginalPosition();
            });
            it("when the query option \"freezeFacetOrder\" option is false (default)\n        when the \"enableReorder\" option is false\n        should not reorder the facets in the DOM", function () {
                test.cmp.options.enableReorder = false;
                triggerQuerySuccess();
                expectFacetsToBeInOriginalPosition();
            });
            it("when the query option \"freezeFacetOrder\" option is false (default)\n        when the \"enableReorder\" option is true (default)\n        when the \"compareFacets\" option is defined\n        should reorder the facets in the DOM according to the \"compareFacets\" option", function () {
                test.cmp.options.compareFacets = function (facetA, facetB) { return facetB.options.numberOfValues - facetA.options.numberOfValues; };
                triggerQuerySuccess();
                expect(managerContainerChildren()[0]).toBe(facets[2].element);
                expect(managerContainerChildren()[1]).toBe(facets[0].element);
                expect(managerContainerChildren()[2]).toBe(facets[1].element);
            });
            it("when the \"onUpdate\" option is defined\n      should call onUpdate for every child facets facets", function () {
                test.cmp.options.onUpdate = jasmine.createSpy('onUpdate');
                triggerQuerySuccess();
                expect(options.onUpdate).toHaveBeenCalledTimes(facets.length);
            });
            it("when the \"onUpdate\" option is defined\n      (even) when the query option \"freezeFacetOrder\" option is true\n      should call onUpdate for every child facets facets", function () {
                test.cmp.options.onUpdate = jasmine.createSpy('onUpdate');
                triggerQuerySuccess(queryFacetsResponse(), true);
                expect(options.onUpdate).toHaveBeenCalledTimes(facets.length);
            });
        });
        describe("testing that the \"maximumNumberOfExpandedFacets\" option \n    is respected on a successful query", function () {
            function initializeManyFacets(numberOfFacets) {
                Eif (numberOfFacets === void 0) { numberOfFacets = 10; }
                facets = [];
                for (var index = 0; index < numberOfFacets; index++) {
                    facets.push(DynamicFacetTestUtils_1.DynamicFacetTestUtils.createAdvancedFakeFacet({ field: "@field" + index }).cmp);
                }
            }
            function queryManyFacetsResponse() {
                return facets.map(function (facet) { return DynamicFacetTestUtils_1.DynamicFacetTestUtils.getCompleteFacetResponse(facet); });
            }
            function initForMaximumNumberOfExpandedFacets(max) {
                options = { maximumNumberOfExpandedFacets: max };
                initializeManager();
                triggerAfterComponentsInitialization();
                triggerQuerySuccess(queryManyFacetsResponse());
            }
            function collapsedFacets() {
                return facets.filter(function (facet) { return facet.isCollapsed; });
            }
            function expandedFacets() {
                return facets.filter(function (facet) { return !facet.isCollapsed; });
            }
            beforeEach(function () {
                initializeManyFacets();
            });
            it("when the query option \"freezeFacetOrder\" option is true\n        should collapse/expand any facets (should keep previous setting)", function () {
                initForMaximumNumberOfExpandedFacets(2);
                collapsedFacets()[0].expand();
                var updateNumberOfCollapsedFacets = collapsedFacets().length;
                triggerQuerySuccess(queryManyFacetsResponse(), true);
                expect(collapsedFacets().length).toBe(updateNumberOfCollapsedFacets);
            });
            it("when \"maximumNumberOfExpandedFacets\" is -1\n      should not collapse any facets", function () {
                initForMaximumNumberOfExpandedFacets(-1);
                expect(collapsedFacets().length).toBe(0);
            });
            it("when \"maximumNumberOfExpandedFacets\" is 0\n      should collapse all facets", function () {
                initForMaximumNumberOfExpandedFacets(0);
                expect(collapsedFacets().length).toBe(facets.length);
            });
            it("when \"maximumNumberOfExpandedFacets\" is 1\n      should only expand the first facet", function () {
                initForMaximumNumberOfExpandedFacets(1);
                expect(collapsedFacets().length).toBe(facets.length - 1);
                expect(collapsedFacets().indexOf(facets[0])).toBe(-1);
            });
            it("when there is a facet with the option \"collapsedByDefault\" set to true\n      should collapse it nevertheless and log an info to the client", function () {
                facets[3].options.collapsedByDefault = true;
                spyOn(facets[3].logger, 'info');
                initForMaximumNumberOfExpandedFacets(facets.length);
                expect(collapsedFacets().length).toBe(1);
                expect(collapsedFacets()[0]).toBe(facets[3]);
                expect(facets[3].logger.info).toHaveBeenCalled();
            });
            it("when there is a facet with the option \"enableCollapse\" set to false\n      should not collapse it", function () {
                facets[3].options.enableCollapse = false;
                initForMaximumNumberOfExpandedFacets(0);
                expect(collapsedFacets().length).toBe(facets.length - 1);
                expect(collapsedFacets().indexOf(facets[3])).toBe(-1);
            });
            it("when there is a hidden facet (e.g. without values)\n      should not be taken into consideration when expanding/collapsing", function () {
                initForMaximumNumberOfExpandedFacets(1);
                triggerQuerySuccess(queryManyFacetsResponse().slice(1));
                expect(expandedFacets().length).toBe(2);
                expect(expandedFacets()[1]).toBe(facets[1]);
            });
            it("when there is an hidden facet (e.g. depends on another facet)\n      should not be taken into consideration when expanding/collapsing", function () {
                var dependantFacet = DynamicFacetTestUtils_1.DynamicFacetTestUtils.createAdvancedFakeFacet({ field: '@dependantFacet', dependsOn: facets[0].options.id })
                    .cmp;
                facets.unshift(dependantFacet);
                initForMaximumNumberOfExpandedFacets(1);
                triggerQuerySuccess(queryManyFacetsResponse());
                expect(expandedFacets().length).toBe(2);
                expect(expandedFacets()[1]).toBe(facets[1]);
            });
        });
    });
}
exports.DynamicFacetManagerTest = DynamicFacetManagerTest;
 
 
/***/ }),
/* 1809 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var DynamicFacetValueCreator_1 = __webpack_require__(273);
var DynamicFacetTestUtils_1 = __webpack_require__(77);
var FacetValueState_1 = __webpack_require__(36);
var FacetUtils_1 = __webpack_require__(49);
function DynamicFacetValueCreatorTest() {
    describe('DynamicFacetValueCreator', function () {
        var valueCreator;
        var facetValue;
        var facet;
        beforeEach(function () {
            initializeComponent();
        });
        function initializeComponent() {
            facet = DynamicFacetTestUtils_1.DynamicFacetTestUtils.createFakeFacet({ valueCaption: { caption: 'this is a value caption' } });
            valueCreator = new DynamicFacetValueCreator_1.DynamicFacetValueCreator(facet);
        }
        describe('testing createFromResponse', function () {
            var index;
            var responseValue;
            beforeEach(function () {
                index = 0;
                responseValue = {
                    value: 'allo',
                    state: FacetValueState_1.FacetValueState.selected,
                    numberOfResults: 34
                };
                initializeValue();
            });
            function initializeValue() {
                facetValue = valueCreator.createFromResponse(responseValue, index);
            }
            it('should have the right basic properties', function () {
                expect(facetValue.value).toBe(responseValue.value);
                expect(facetValue.displayValue).toBe(responseValue.value);
                expect(facetValue.state).toBe(responseValue.state);
                expect(facetValue.position).toBe(index + 1);
                expect(facetValue.numberOfResults).toBe(responseValue.numberOfResults);
            });
            it('should call getDisplayValueFromValueCaption from FacetUtils', function () {
                spyOn(FacetUtils_1.FacetUtils, 'getDisplayValueFromValueCaption');
                initializeValue();
                expect(FacetUtils_1.FacetUtils.getDisplayValueFromValueCaption).toHaveBeenCalled();
            });
        });
        describe('testing createFromValue', function () {
            var value = 'hello friends';
            beforeEach(function () {
                initializeValue();
            });
            function initializeValue() {
                facetValue = valueCreator.createFromValue(value);
            }
            it('should have the right basic properties', function () {
                expect(facetValue.value).toBe(value);
                expect(facetValue.displayValue).toBe(value);
                expect(facetValue.state).toBe(FacetValueState_1.FacetValueState.idle);
                expect(facetValue.position).toBe(1);
                expect(facetValue.numberOfResults).toBe(0);
            });
            it('should call tryToGetTranslatedCaption from FacetUtils', function () {
                spyOn(FacetUtils_1.FacetUtils, 'tryToGetTranslatedCaption');
                initializeValue();
                expect(FacetUtils_1.FacetUtils.tryToGetTranslatedCaption).toHaveBeenCalled();
            });
        });
    });
}
exports.DynamicFacetValueCreatorTest = DynamicFacetValueCreatorTest;
 
 
/***/ }),
/* 1810 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var DynamicFacetRangeValueCreator_1 = __webpack_require__(402);
var DynamicFacetRangeTestUtils_1 = __webpack_require__(157);
var FacetValueState_1 = __webpack_require__(36);
var RangeValue_1 = __webpack_require__(403);
function DynamicFacetRangeValueCreatorTest() {
    describe('DynamicFacetRangeValueCreator', function () {
        var valueCreator;
        var facet;
        beforeEach(function () {
            initializeComponent();
        });
        function initializeComponent() {
            facet = DynamicFacetRangeTestUtils_1.DynamicFacetRangeTestUtils.createAdvancedFakeFacet().cmp;
            valueCreator = new DynamicFacetRangeValueCreator_1.DynamicFacetRangeValueCreator(facet);
        }
        describe('testing createFromResponse', function () {
            var index;
            var responseValue;
            var facetValue;
            beforeEach(function () {
                index = 0;
                responseValue = {
                    start: 10,
                    end: 20,
                    endInclusive: true,
                    state: FacetValueState_1.FacetValueState.selected,
                    numberOfResults: 34
                };
                initializeValue();
            });
            function initializeValue() {
                facetValue = valueCreator.createFromResponse(responseValue, index);
            }
            it('should have the right basic properties', function () {
                expect(facetValue.start).toBe(responseValue.start);
                expect(facetValue.endInclusive).toBe(responseValue.endInclusive);
                expect(facetValue.end).toBe(responseValue.end);
                expect(facetValue.state).toBe(responseValue.state);
                expect(facetValue.position).toBe(index + 1);
                expect(facetValue.numberOfResults).toBe(responseValue.numberOfResults);
                expect(facetValue.value).toBeTruthy();
            });
            it('should have the formated displayValue from the value by default', function () {
                expect(facetValue.displayValue).toBe(facetValue.start + " " + facet.options.valueSeparator + " " + facetValue.end);
            });
            it("when is was a previous corresponding facet value\n      should copy it's displayValue", function () {
                var displayValue = 'this is a display value';
                var correspondingFacetValue = facet.values.get(facetValue);
                correspondingFacetValue.displayValue = displayValue;
                initializeValue();
                expect(facetValue.displayValue).toBe(displayValue);
            });
        });
        it('when the facet does not have ranges, getDefaultValues returns an empty array', function () {
            expect(valueCreator.getDefaultValues().length).toEqual(0);
        });
        it('when the facet has multiple ranges configured, getDefaultValues returns an array with as many elements as configured ranges', function () {
            facet.options.ranges = DynamicFacetRangeTestUtils_1.DynamicFacetRangeTestUtils.createFakeRanges(2);
            expect(valueCreator.getDefaultValues().length).toEqual(facet.options.ranges.length);
        });
        describe('the facet has one range value, when calling getDefaultValues', function () {
            var index;
            var rangeValue;
            function firstDefaultValue() {
                return valueCreator.getDefaultValues()[0];
            }
            function setRangeOnFacet() {
                facet.options.ranges = [rangeValue];
            }
            beforeEach(function () {
                index = 0;
                rangeValue = DynamicFacetRangeTestUtils_1.DynamicFacetRangeTestUtils.createFakeRanges(1)[0];
                setRangeOnFacet();
            });
            it('the default value should have the right basic properties', function () {
                var facetValue = firstDefaultValue();
                expect(facetValue.start).toBe(rangeValue.start);
                expect(facetValue.endInclusive).toBe(rangeValue.endInclusive);
                expect(facetValue.end).toBe(rangeValue.end);
                expect(facetValue.state).toBe(FacetValueState_1.FacetValueState.idle);
                expect(facetValue.position).toBe(index + 1);
                expect(facetValue.numberOfResults).toBe(0);
                expect(facetValue.value).toBeTruthy();
            });
            it("when the range does not have a label,\n        should format the displayValue correctly", function () {
                var facetValue = firstDefaultValue();
                expect(facetValue.displayValue).toBe(facetValue.start + " " + facet.options.valueSeparator + " " + facetValue.end);
            });
            it("when the range has a label, \n        should assign it to the displayValue", function () {
                rangeValue.label = 'this is a label';
                setRangeOnFacet();
                expect(firstDefaultValue().displayValue).toBe(rangeValue.label);
            });
        });
        describe('testing createFromValue', function () {
            var value = "10..20" + RangeValue_1.RangeEndScope.Inclusive;
            var facetValue;
            beforeEach(function () {
                initializeValue();
            });
            function initializeValue() {
                facetValue = valueCreator.createFromValue(value);
            }
            it('should throw on a invalid format', function () {
                spyOn(facet.logger, 'error');
                valueCreator.createFromValue('notValid');
                expect(facet.logger.error).toHaveBeenCalled();
            });
            it('should return null on a invalid format', function () {
                expect(valueCreator.createFromValue('notvalid')).toBeNull();
            });
            it('should have the right position', function () {
                expect(facetValue.position).toBe(1);
            });
        });
    });
}
exports.DynamicFacetRangeValueCreatorTest = DynamicFacetRangeValueCreatorTest;
 
 
/***/ }),
/* 1811 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var DynamicFacetRangeValueParser_1 = __webpack_require__(847);
var DynamicFacetRangeTestUtils_1 = __webpack_require__(157);
var IDynamicFacetRange_1 = __webpack_require__(205);
function DynamicFacetRangeValueParserTest() {
    describe('DynamicFacetRangeValueParser', function () {
        var parser;
        var facetOptions;
        var facet;
        function initFacet() {
            facet = DynamicFacetRangeTestUtils_1.DynamicFacetRangeTestUtils.createAdvancedFakeFacet(facetOptions).cmp;
        }
        describe('testing with the number format & numberOfDecimals not defined', function () {
            beforeEach(function () {
                facetOptions = { valueFormat: IDynamicFacetRange_1.DynamicFacetRangeValueFormat.number, valueSeparator: 'to' };
                initFacet();
                parser = new DynamicFacetRangeValueParser_1.DynamicFacetRangeValueParser(facet);
            });
            describe('testing formatDisplayValue', function () {
                it("when the value is a integer\n          should return the format correctly", function () {
                    var value = parser.formatDisplayValue({ start: 10, end: 20 });
                    expect(value).toBe('10 to 20');
                });
                it("when the value is a big integer\n          should return the format correctly", function () {
                    var value = parser.formatDisplayValue({ start: 1000, end: 100000 });
                    expect(value).toBe('1,000 to 100,000');
                });
                it("when the value is a float\n          should return the format correctly", function () {
                    var value = parser.formatDisplayValue({ start: 0.99, end: 1.001 });
                    expect(value).toBe('0.99 to 1.001');
                });
            });
            describe('testing with the number format & numberOfDecimals defined', function () {
                beforeEach(function () {
                    facetOptions = { valueFormat: IDynamicFacetRange_1.DynamicFacetRangeValueFormat.number, valueSeparator: 'to', numberOfDecimals: 5 };
                    initFacet();
                    parser = new DynamicFacetRangeValueParser_1.DynamicFacetRangeValueParser(facet);
                });
                describe('testing formatDisplayValue', function () {
                    it("when the value is an integer\n            should return the format correctly", function () {
                        var value = parser.formatDisplayValue({ start: 10, end: 20 });
                        expect(value).toBe('10.00000 to 20.00000');
                    });
                    it("when the value is a big integer\n            should return the format correctly", function () {
                        var value = parser.formatDisplayValue({ start: 1000, end: 100000 });
                        expect(value).toBe('1,000.00000 to 100,000.00000');
                    });
                    it("when the value is a float\n            should return the format correctly", function () {
                        var value = parser.formatDisplayValue({ start: 0.995452324, end: 1.000000000001 });
                        expect(value).toBe('0.99545 to 1.00000');
                    });
                });
            });
            describe("testing validate", function () {
                it("when sending a valid range\n        should return it correctly validated", function () {
                    var validatedRange = parser.validate({
                        start: '0.1',
                        end: 10,
                        endInclusive: true
                    });
                    expect(validatedRange).toEqual({
                        start: 0.1,
                        end: 10,
                        endInclusive: true
                    });
                });
                it("when sending a invalid range\n        should return null", function () {
                    var validatedRange = parser.validate({
                        start: 'yes',
                        end: 10,
                        endInclusive: true
                    });
                    expect(validatedRange).toBeNull();
                });
            });
            it('should formatValue correctly', function () {
                var value = parser.formatValue({ start: 0.0191, end: 100000, endInclusive: true });
                expect(value).toBe('0.0191..100000inc');
            });
            describe("testing parse", function () {
                it("when sending a valid value\n        should return the range correctly", function () {
                    var range = parser.parse('0.1..10exc');
                    expect(range).toEqual({
                        start: 0.1,
                        end: 10,
                        endInclusive: false
                    });
                });
                it("when sending a value with a wrong range\n        should return null", function () {
                    var range = parser.parse('hello..10inc');
                    expect(range).toBeNull();
                });
                it("when sending a value with an unknown endInclusive value\n        should return null", function () {
                    var range = parser.parse('1..100ish');
                    expect(range).toBeNull();
                });
            });
        });
        describe('testing with the date format', function () {
            beforeEach(function () {
                facetOptions = { valueFormat: IDynamicFacetRange_1.DynamicFacetRangeValueFormat.date, valueSeparator: 'to' };
                initFacet();
                parser = new DynamicFacetRangeValueParser_1.DynamicFacetRangeValueParser(facet);
            });
            describe('testing formatDisplayValue', function () {
                it("when the value is a Date object\n          should return the format correctly", function () {
                    var value = parser.formatDisplayValue({ start: new Date('1999/04/17'), end: new Date('2016/06/23') });
                    expect(value).toBe('4/17/1999 to 6/23/2016');
                });
                it("when the value is a integer\n          should return the format correctly", function () {
                    var value = parser.formatDisplayValue({ start: 924321600000, end: 1466662921705 });
                    expect(value).toBe('4/17/1999 to 6/23/2016');
                });
                it("when the value is a string\n          should return the format correctly", function () {
                    var value = parser.formatDisplayValue({ start: '1999/04/17', end: '2016/06/23' });
                    expect(value).toBe('4/17/1999 to 6/23/2016');
                });
            });
            describe("testing validate", function () {
                it("when sending a valid range\n        should return it correctly validated", function () {
                    var validatedRange = parser.validate({
                        start: '1999/04/17',
                        end: '2016/06/23',
                        endInclusive: true
                    });
                    expect(validatedRange).toEqual({
                        start: '1999/04/17@00:00:00',
                        end: '2016/06/23@00:00:00',
                        endInclusive: true
                    });
                });
                it("when sending a invalid range\n        should return null", function () {
                    var validatedRange = parser.validate({
                        start: '1999/04/17@00:00:00',
                        end: 'no',
                        endInclusive: true
                    });
                    expect(validatedRange).toBeNull();
                });
            });
            describe("testing parse", function () {
                it("when sending a valid value\n        should return the range correctly", function () {
                    var range = parser.parse('1999/04/17@00:00:00..2016/06/23@00:00:00inc');
                    expect(range).toEqual({
                        start: '1999/04/17@00:00:00',
                        end: '2016/06/23@00:00:00',
                        endInclusive: true
                    });
                });
                it("when sending a value with a wrong range\n        should return null", function () {
                    var range = parser.parse('1999/19/17@00:00:00..2016/06/23@00:00:00inc');
                    expect(range).toBeNull();
                });
                it("when sending a value with an unknown endInclusive value\n        should return null", function () {
                    var range = parser.parse('1999/04/17@00:00:00..2016/06/23@00:00:00ish');
                    expect(range).toBeNull();
                });
            });
            it('should formatValue correctly', function () {
                var value = parser.formatValue({
                    start: '1999/04/17@00:00:00',
                    end: '2016/06/23@00:00:00',
                    endInclusive: true
                });
                expect(value).toBe('1999/04/17@00:00:00..2016/06/23@00:00:00inc');
            });
        });
        describe('testing with the currency format (formatting only)', function () {
            beforeEach(function () {
                facetOptions = {
                    valueFormat: IDynamicFacetRange_1.DynamicFacetRangeValueFormat.currency,
                    currencySymbol: '€',
                    valueSeparator: 'to'
                };
                initFacet();
                parser = new DynamicFacetRangeValueParser_1.DynamicFacetRangeValueParser(facet);
            });
            describe('testing formatDisplayValue', function () {
                it("when the value is a integer\n          should return the format correctly", function () {
                    var value = parser.formatDisplayValue({ start: 10, end: 20 });
                    expect(value).toBe('€10 to €20');
                });
                it("when the value is a big integer\n          should return the format correctly", function () {
                    var value = parser.formatDisplayValue({ start: 1000, end: 100000 });
                    expect(value).toBe('€1,000 to €100,000');
                });
                it("when the value is a float\n          should return the format correctly", function () {
                    var value = parser.formatDisplayValue({ start: 0.1, end: 1.9999 });
                    expect(value).toBe('€0.10 to €2.00');
                });
            });
        });
    });
}
exports.DynamicFacetRangeValueParserTest = DynamicFacetRangeValueParserTest;
 
 
/***/ }),
/* 1812 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var FacetSearchController_1 = __webpack_require__(843);
var DynamicFacetTestUtils_1 = __webpack_require__(77);
var FileTypes_1 = __webpack_require__(138);
function FacetSearchControllerTest() {
    describe('FacetSearchController', function () {
        var facet;
        var facetSearchController;
        var facetSearchSpy;
        var facetValuesMultiplier = 3;
        beforeEach(function () {
            initializeComponents();
        });
        function initializeComponents(options) {
            facet = DynamicFacetTestUtils_1.DynamicFacetTestUtils.createAdvancedFakeFacet(options).cmp;
            facet.values.createFromResponse(DynamicFacetTestUtils_1.DynamicFacetTestUtils.getCompleteFacetResponse(facet));
            facetSearchController = new FacetSearchController_1.FacetSearchController(facet);
            facetSearchSpy = facet.queryController.getEndpoint().facetSearch;
        }
        it('should trigger a facet search request with the right parameters', function () {
            var query = 'my query';
            facetSearchController.search(query);
            var expectedRequest = {
                field: facet.fieldName,
                filterFacetCount: true,
                numberOfValues: facet.options.numberOfValues * facetValuesMultiplier,
                ignoreValues: facet.values.activeValues.map(function (value) { return value.value; }),
                captions: {},
                searchContext: facet.queryController.getLastQuery(),
                query: "*" + query + "*"
            };
            expect(facetSearchSpy).toHaveBeenCalledWith(expectedRequest);
        });
        it("when facet option #filterFacetCount is false,\n    the facet search request #filterFacetCount is also false", function () {
            initializeComponents({ filterFacetCount: false });
            facetSearchController.search('');
            expect(facetSearchSpy.calls.mostRecent().args[0].filterFacetCount).toBe(false);
        });
        it("when calling fetchMoreResults\n    should search with the same terms but bump the number of values", function () {
            var query = 'my query';
            var page = 2;
            facetSearchController.search(query);
            facetSearchController.fetchMoreResults();
            expect(facetSearchSpy.calls.mostRecent().args[0]).toEqual(jasmine.objectContaining({
                numberOfValues: facet.options.numberOfValues * facetValuesMultiplier * page,
                query: "*" + query + "*"
            }));
        });
        it("when calling search after fetchMoreResults\n    should reset the number of values and update the query", function () {
            var query = 'second query';
            var page = 1;
            facetSearchController.search('first query');
            facetSearchController.fetchMoreResults();
            facetSearchController.search(query);
            expect(facetSearchSpy.calls.mostRecent().args[0]).toEqual(jasmine.objectContaining({
                numberOfValues: facet.options.numberOfValues * facetValuesMultiplier * page,
                query: "*" + query + "*"
            }));
        });
        function testHasTypesCaptions() {
            facetSearchController.search('q');
            var expectedPartialRequest = {
                captions: FileTypes_1.FileTypes.getFileTypeCaptions()
            };
            expect(facet.queryController.getEndpoint().facetSearch).toHaveBeenCalledWith(jasmine.objectContaining(expectedPartialRequest));
        }
        it('should add types captions if the field is @filetype', function () {
            initializeComponents({ field: '@filetype' });
            testHasTypesCaptions();
        });
        it('should add types captions if the field is @objecttype', function () {
            initializeComponents({ field: '@objecttype' });
            testHasTypesCaptions();
        });
        it('should add months captions if the field is @month', function () {
            initializeComponents({ field: '@month' });
            facetSearchController.search('q');
            var expectedPartialRequest = {
                captions: {
                    '01': 'January',
                    '02': 'February',
                    '03': 'March',
                    '04': 'April',
                    '05': 'May',
                    '06': 'June',
                    '07': 'July',
                    '08': 'August',
                    '09': 'September',
                    '10': 'October',
                    '11': 'November',
                    '12': 'December'
                }
            };
            expect(facet.queryController.getEndpoint().facetSearch).toHaveBeenCalledWith(jasmine.objectContaining(expectedPartialRequest));
        });
        it("when facet option \"optionalLeadingWildcard\" is false\n    should not prepend the query with a wildcard", function () {
            facet.options.useLeadingWildcardInFacetSearch = false;
            var query = 'my query';
            facetSearchController.search(query);
            var queryWithEndWildcardOnly = query + "*";
            expect(facet.queryController.getEndpoint().facetSearch).toHaveBeenCalledWith(jasmine.objectContaining({ query: queryWithEndWildcardOnly }));
        });
    });
}
exports.FacetSearchControllerTest = FacetSearchControllerTest;
 
 
/***/ }),
/* 1813 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Mock = __webpack_require__(2);
var MissingTerms_1 = __webpack_require__(858);
var Core_1 = __webpack_require__(9);
var Fake_1 = __webpack_require__(11);
function MissingTermsTest() {
    describe('MissingTerms', function () {
        var test;
        var fakeResult;
        var mockComponent = function (query, option) {
            if (option === void 0) { option = {}; }
            var test = Mock.advancedResultComponentSetup(MissingTerms_1.MissingTerms, fakeResult, new Mock.AdvancedComponentSetupOptions(null, option, function (env) {
                env.withLiveQueryStateModel().queryStateModel.set('q', query);
                return env;
            }));
            var analyticsElement = Core_1.$$('div', {
                className: 'CoveoAnalytics'
            }).el;
            test.env.root.appendChild(analyticsElement);
            return test;
        };
        function visibleMissingTerms() {
            return Core_1.$$(test.cmp.element)
                .findAll('.coveo-missing-term')
                .filter(function (element) {
                return element.style.display === '';
            })
                .map(function (element) { return element.innerText; });
        }
        beforeEach(function () {
            fakeResult = Fake_1.FakeResults.createFakeResult();
        });
        describe('exposes options', function () {
            describe("when the 'clickable' option is set to", function () {
                var missingTermsClickableSpy;
                var clickFirstMissingTerm = function () {
                    test.cmp.addTermForcedToAppear = missingTermsClickableSpy;
                    var missingTermElement = Core_1.$$(test.cmp.element).find('.coveo-missing-term');
                    missingTermElement.click();
                };
                beforeEach(function () {
                    missingTermsClickableSpy = jasmine.createSpy('MissingTermsClickableSpy');
                });
                it('true should allow the user to click on the missingTerm', function () {
                    var termPresent = 'my';
                    var query = 'This is my query';
                    fakeResult.absentTerms = [termPresent];
                    test = mockComponent(query, { clickable: true });
                    clickFirstMissingTerm();
                    expect(missingTermsClickableSpy).toHaveBeenCalled();
                });
                it("true,\n        it should log a addMissingTerm event when it is clicked", function () {
                    var query = 'This is my query';
                    fakeResult.absentTerms = ['This'];
                    test = mockComponent(query);
                    clickFirstMissingTerm();
                    expect(test.env.usageAnalytics.logSearchEvent).toHaveBeenCalledWith(jasmine.objectContaining({
                        name: 'addMissingTerm',
                        type: 'missingTerm'
                    }), jasmine.objectContaining({
                        missingTerm: 'This'
                    }));
                });
                it('false should not allow the user to click on the missingTerm', function () {
                    var termPresent = 'my';
                    var query = 'This is my query';
                    fakeResult.absentTerms = [termPresent];
                    test = mockComponent(query, { clickable: false });
                    clickFirstMissingTerm();
                    expect(missingTermsClickableSpy).not.toHaveBeenCalled();
                });
            });
            it('caption allows the user to change the title for the missing terms', function () {
                var termPresent = 'my';
                var query = 'This is my query';
                var caption = 'The missing term';
                fakeResult.absentTerms = [termPresent];
                test = mockComponent(query, { caption: caption });
                var missingTermsElement = Core_1.$$(test.cmp.element).find('.coveo-field-caption');
                expect(missingTermsElement.innerText).toBe(caption);
            });
            describe('numberOfTerms', function () {
                beforeEach(function () {
                    var query = 'This is my query';
                    var numberOfTerms = 1;
                    fakeResult.absentTerms = ['This', 'is'];
                    test = mockComponent(query, { numberOfTerms: numberOfTerms });
                });
                it('allows the user to set the maximum number of MissingTerm to be displayed', function () {
                    expect(visibleMissingTerms().length).toBe(1);
                });
                it('when the show more button is clicked, show all the missing terms', function () {
                    Core_1.$$(test.cmp.element).find('.coveo-missing-term-show-more').click();
                    expect(visibleMissingTerms().length).toBe(2);
                });
            });
        });
        describe('when the langage is', function () {
            var getMissingTerms = function () {
                return test.cmp.queryStateModel.get('missingTerms');
            };
            var getWordBoudaryChars = function () {
                return ["-", "'", "?", "*", "\u2019", ".", "~", "=", ",", "/", "\\", ":", "`", ";", "_", "!", "&", "(", ")"];
            };
            describe('English', function () {
                describe('when a words contains words boundary character', function () {
                    it("when the missing term is part of the words,\n          it will not be displayed as a missing term.", function () {
                        var wordBoundarysCharacter = getWordBoudaryChars();
                        wordBoundarysCharacter.forEach(function (character) {
                            var boundaryCharacter = character + "s";
                            var query = "efile\\" + boundaryCharacter + " ";
                            fakeResult.absentTerms = ["\\" + boundaryCharacter];
                            test = mockComponent(query);
                            expect(test.cmp.element.childElementCount).toEqual(0);
                            expect(test.cmp.missingTerms).toEqual(["" + boundaryCharacter]);
                        });
                    });
                });
                describe('when fetching the missing terms from a query', function () {
                    var expectedResult;
                    beforeEach(function () {
                        var query = 'This is my query';
                        test = mockComponent(query);
                        expectedResult = [];
                    });
                    it('return all the missing term present in the query', function () {
                        var termIsSubWord = 'is';
                        fakeResult.absentTerms = [termIsSubWord];
                        expectedResult.push(termIsSubWord);
                        expect(test.cmp.missingTerms.toString()).toBe(expectedResult.toString());
                    });
                    it('return only the missing term present in the query', function () {
                        var termNotInQuery = 'foo';
                        fakeResult.absentTerms = [termNotInQuery];
                        expect(test.cmp.missingTerms.toString()).toBe(expectedResult.toString());
                    });
                });
                it("when a term in the query has a different case but otherwise matches an absent term,\n        the term is displayed using the query term's case", function () {
                    var queryTerm = 'World';
                    fakeResult.absentTerms = [queryTerm.toLowerCase()];
                    test = mockComponent("Hello " + queryTerm);
                    expect(test.cmp.missingTerms).toEqual([queryTerm]);
                });
                describe('when re-injecting a term', function () {
                    var query;
                    it('and the term is present in the query, the term is added to the url', function () {
                        var termPresent = 'my';
                        query = 'This is my query';
                        fakeResult.absentTerms = [termPresent];
                        test = mockComponent(query);
                        test.cmp.queryController.executeQuery();
                        test.cmp.addTermForcedToAppear(termPresent);
                        expect(getMissingTerms()).toEqual([termPresent]);
                    });
                    it('and the term is the first word in the query, the term is added to the url', function () {
                        var firstWord = 'This';
                        query = 'This is my query';
                        fakeResult.absentTerms = [firstWord];
                        test = mockComponent(query);
                        test.cmp.addTermForcedToAppear(firstWord);
                        test.cmp.queryController.executeQuery();
                        expect(getMissingTerms()).toEqual([firstWord]);
                    });
                    it('and the term is the last word in the query, the term is added to the url', function () {
                        var lastWord = 'query';
                        query = 'This is my query';
                        fakeResult.absentTerms = [lastWord];
                        test = mockComponent(query);
                        test.cmp.addTermForcedToAppear(lastWord);
                        expect(getMissingTerms()).toEqual([lastWord]);
                    });
                    it('and the term is not present, queryStateModel.set is never called', function () {
                        var termNotInQuery = 'foo';
                        query = 'This is my query';
                        test = mockComponent(query);
                        test.cmp.queryStateModel.set = jasmine.createSpy('setSpy');
                        test.cmp.addTermForcedToAppear(termNotInQuery);
                        expect(test.cmp.queryStateModel.set).not.toHaveBeenCalled();
                    });
                    it('and the term present contains hyphens, the term is added to the url', function () {
                        var hyphensWord = 'really-really';
                        query = 'This is really-really my query';
                        fakeResult.absentTerms = [hyphensWord];
                        test = mockComponent(query);
                        test.cmp.addTermForcedToAppear(hyphensWord);
                        expect(getMissingTerms()).toEqual([hyphensWord]);
                    });
                    it('and the term present is surrounded by special character, the term is added to the url', function () {
                        var specialCharacter = 'query';
                        query = 'This is really my !!!query!!!';
                        fakeResult.absentTerms = [specialCharacter];
                        test = mockComponent(query);
                        test.cmp.addTermForcedToAppear(specialCharacter);
                        expect(getMissingTerms()).toEqual([specialCharacter]);
                    });
                });
            });
            describe('Korean', function () {
                describe('when re-injecting a term', function () {
                    it('and the term is present in the query, the term is added to the url', function () {
                        var koreanWordPresent = '쿼리가';
                        var query = '긴 쿼리가 될';
                        fakeResult.absentTerms = [koreanWordPresent];
                        test = mockComponent(query);
                        test.cmp.addTermForcedToAppear(koreanWordPresent);
                        expect(getMissingTerms()).toEqual([koreanWordPresent]);
                    });
                    it('and the term is the first word in the query, the term is added to the url', function () {
                        var koreanFirstWord = '이것은';
                        var query = '이것은 정말';
                        fakeResult.absentTerms = [koreanFirstWord];
                        test = mockComponent(query);
                        test.cmp.addTermForcedToAppear(koreanFirstWord);
                        expect(getMissingTerms()).toEqual([koreanFirstWord]);
                    });
                    it('and the term is the last word in the query, the term is added to the url', function () {
                        var KoreanlastWord = '정말';
                        var query = '이것은 정말';
                        fakeResult.absentTerms = [KoreanlastWord];
                        test = mockComponent(query);
                        test.cmp.addTermForcedToAppear(KoreanlastWord);
                        expect(getMissingTerms()).toEqual([KoreanlastWord]);
                    });
                    it('and the term is a single character surronded by other character, the term is added to the url', function () {
                        var KoreanWordPresentMultipleTimes = '것';
                        var query = '이것은 정말 정말 긴';
                        fakeResult.absentTerms = [KoreanWordPresentMultipleTimes];
                        test = mockComponent(query);
                        test.cmp.addTermForcedToAppear(KoreanWordPresentMultipleTimes);
                        expect(getMissingTerms()).toEqual([KoreanWordPresentMultipleTimes]);
                    });
                });
                describe('when a words contains words boundary character', function () {
                    it("when the missing term is part of the words,\n          it will not be displayed as a missing term.", function () {
                        var wordBoundarysCharacter = getWordBoudaryChars();
                        wordBoundarysCharacter.forEach(function (character) {
                            var boundaryCharacter = character + "\uC774\uAC83\uC740";
                            var query = "\uCFFC\uB9AC\uAC00\\" + boundaryCharacter + " ";
                            fakeResult.absentTerms = ["\\" + boundaryCharacter];
                            test = mockComponent(query);
                            expect(test.cmp.element.childElementCount).toEqual(0);
                            expect(test.cmp.missingTerms).toEqual(["" + boundaryCharacter]);
                        });
                    });
                });
            });
        });
        describe('with attachments & child results', function () {
            it('should only display missing terms that are returned both by the result & its attachments', function () {
                var attachment = Fake_1.FakeResults.createFakeResult();
                attachment.absentTerms = ['hello', 'bye'];
                fakeResult.absentTerms = ['hello', 'world'];
                fakeResult.attachments = [attachment];
                test = mockComponent('hello world bye');
                expect(test.cmp.missingTerms).toEqual(['hello']);
            });
            it('should only display missing terms that are returned both by the result & its child results', function () {
                var childResult = Fake_1.FakeResults.createFakeResult();
                childResult.absentTerms = ['hello', 'bye'];
                fakeResult.absentTerms = ['hello', 'world'];
                fakeResult.childResults = [childResult];
                test = mockComponent('hello world bye');
                expect(test.cmp.missingTerms).toEqual(['hello']);
            });
            it('should only display missing terms that are returned by the result, its attachments & its child results', function () {
                var childResult = Fake_1.FakeResults.createFakeResult();
                childResult.absentTerms = ['hello', 'world', 'forever'];
                var attachment = Fake_1.FakeResults.createFakeResult();
                attachment.absentTerms = ['hello', 'world', 'bye'];
                fakeResult.absentTerms = ['hello', 'world', 'bye'];
                fakeResult.attachments = [attachment];
                fakeResult.childResults = [childResult];
                test = mockComponent('hello world bye forever');
                expect(test.cmp.missingTerms).toEqual(['hello', 'world']);
            });
        });
        describe('with phrases', function () {
            describe('with query not containing breaking characters', function () {
                it('handles absent phrases', function () {
                    var query = 'welcome hello world';
                    fakeResult.absentTerms = ['"hello world"'];
                    test = mockComponent(query);
                    var expected = ['hello world'];
                    expect(test.cmp.missingTerms).toEqual(expected);
                    expect(visibleMissingTerms()).toEqual(expected);
                });
                it('handles absent phrases & unrelated absent terms', function () {
                    var query = 'welcome hello world friends';
                    fakeResult.absentTerms = ['friends', '"hello world"'];
                    test = mockComponent(query);
                    var expected = ['friends', 'hello world'];
                    expect(test.cmp.missingTerms).toEqual(expected);
                    expect(visibleMissingTerms()).toEqual(expected);
                });
                it("don't display phrases containing other missing terms", function () {
                    var query = 'welcome hello world friends';
                    fakeResult.absentTerms = ['hello', 'world', '"hello world"'];
                    test = mockComponent(query);
                    expect(test.cmp.missingTerms).toEqual(['hello', 'world', 'hello world']);
                    expect(visibleMissingTerms()).toEqual(['hello', 'world']);
                });
            });
            describe('with query containing breaking characters', function () {
                it('handles absent phrases', function () {
                    var query = 'welcome hello.world/all';
                    fakeResult.absentTerms = ['"hello world all"'];
                    test = mockComponent(query);
                    var expected = ['hello world all'];
                    expect(test.cmp.missingTerms).toEqual(expected);
                    expect(visibleMissingTerms()).toEqual(expected);
                });
                it('handles absent phrases & unrelated absent terms', function () {
                    var query = 'welcome hello-world friends';
                    fakeResult.absentTerms = ['friends', '"hello world"'];
                    test = mockComponent(query);
                    var expected = ['friends', 'hello world'];
                    expect(test.cmp.missingTerms).toEqual(expected);
                    expect(visibleMissingTerms()).toEqual(expected);
                });
                it('uses absent phrase as a fallback for words containing breaking characters', function () {
                    var query = 'welcome hello.world friends';
                    fakeResult.absentTerms = ['hello', 'world', '"hello world"'];
                    test = mockComponent(query);
                    expect(test.cmp.missingTerms).toEqual(['hello', 'world', 'hello world']);
                    expect(visibleMissingTerms()).toEqual(['hello world']);
                });
            });
        });
    });
}
exports.MissingTermsTest = MissingTermsTest;
 
 
/***/ }),
/* 1814 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Mock = __webpack_require__(2);
var MissingTermManager_1 = __webpack_require__(306);
var Simulate_1 = __webpack_require__(15);
var Test_1 = __webpack_require__(40);
var NoopAnalyticsClient_1 = __webpack_require__(114);
var underscore_1 = __webpack_require__(1);
function MissingTermsManagerTest() {
    describe('MissingTermManager', function () {
        var env;
        var usageAnalytics = new NoopAnalyticsClient_1.NoopAnalyticsClient();
        var getMissingTerms = function () {
            return env.queryStateModel.get('missingTerms').slice();
        };
        var setMissingTerms = function (term) {
            var missingterm = env.queryStateModel.get('missingTerms').slice();
            missingterm.push(term);
            env.queryStateModel.set('missingTerms', missingterm);
        };
        var populateBreadcrumb = function () {
            return Simulate_1.Simulate.breadcrumb(env);
        };
        beforeEach(function () {
            env = new Mock.MockEnvironmentBuilder().withLiveQueryStateModel().build();
            var MissingTermManagerArgs = {
                element: env.root,
                queryStateModel: env.queryStateModel,
                queryController: env.queryController,
                usageAnalytics: usageAnalytics
            };
            new MissingTermManager_1.MissingTermManager(MissingTermManagerArgs);
        });
        it('add missing term from the url in advance query', function () {
            var aMissingTerm = 'is';
            setMissingTerms(aMissingTerm);
            var simulation = Simulate_1.Simulate.query(env, {
                query: {
                    q: 'this is my query'
                }
            });
            expect(simulation.queryBuilder.advancedExpression.build()).toBe(aMissingTerm);
        });
        it("when the query change,\n    if the missing term is no longer in the query,\n    it is removed from the missing term", function () {
            var aMissingTerm = 'is';
            setMissingTerms(aMissingTerm);
            env.queryStateModel.set('q', 'this my query');
            expect(getMissingTerms().length).toBe(0);
        });
        it("when the query change,\n    if the missing term is still present in the query,\n    it stay in missing term", function () {
            var aMissingTerm = 'is';
            setMissingTerms(aMissingTerm);
            env.queryStateModel.set('q', 'this is my super query');
            expect(getMissingTerms().length).toBe(1);
        });
        describe('the breadcrumb', function () {
            it('should populate when the event is triggered', function () {
                var aMissingTerm = 'is';
                setMissingTerms(aMissingTerm);
                var breadcrumb = populateBreadcrumb();
                expect(breadcrumb.length).toBe(1);
                expect(Test_1.$$(breadcrumb[0].element).find('.coveo-missing-term-breadcrumb-title').innerHTML).toBe(Test_1.l('MustContain'));
                expect(Test_1.$$(breadcrumb[0].element).find('.coveo-missing-term-breadcrumb-caption').innerHTML).toBe(aMissingTerm);
            });
            it('should escape content', function () {
                var unEscaped = "<script>1+1</script>";
                setMissingTerms(unEscaped);
                var breadcrumb = populateBreadcrumb();
                expect(Test_1.$$(breadcrumb[0].element).find('.coveo-missing-term-breadcrumb-caption').innerHTML).toBe(underscore_1.escape(unEscaped));
            });
            it('should empty when the event is triggered', function () {
                var aMissingTerm = 'is';
                setMissingTerms(aMissingTerm);
                populateBreadcrumb();
                expect(getMissingTerms()).not.toEqual([]);
                Simulate_1.Simulate.clearBreadcrumb(env);
                expect(getMissingTerms()).toEqual([]);
            });
            it('should remove an element when it is clicked', function () {
                var missingTerm1 = 'is';
                var missingTerm2 = 'this';
                setMissingTerms(missingTerm1);
                setMissingTerms(missingTerm2);
                var breadcrumb = populateBreadcrumb();
                var element = Test_1.$$(breadcrumb[0].element).find('.coveo-missing-term-breadcrumb-clear');
                expect(getMissingTerms().length).toBe(2);
                element.click();
                expect(getMissingTerms().length).toBe(1);
            });
            it('should log a removeMissingTerm event when it is clicked', function () {
                spyOn(usageAnalytics, 'logSearchEvent');
                var missingTerm1 = 'is';
                var missingTerm2 = 'this';
                setMissingTerms(missingTerm1);
                setMissingTerms(missingTerm2);
                var breadcrumb = populateBreadcrumb();
                var element = Test_1.$$(breadcrumb[0].element).find('.coveo-missing-term-breadcrumb-clear');
                element.click();
                expect(usageAnalytics.logSearchEvent).toHaveBeenCalledWith(jasmine.objectContaining({
                    name: 'removeMissingTerm',
                    type: 'missingTerm'
                }), jasmine.objectContaining({
                    missingTerm: 'is'
                }));
            });
        });
    });
}
exports.MissingTermsManagerTest = MissingTermsManagerTest;
 
 
/***/ }),
/* 1815 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Mock = __webpack_require__(2);
var Searchbox_1 = __webpack_require__(393);
var Dom_1 = __webpack_require__(0);
var underscore_1 = __webpack_require__(1);
function SearchboxResizeTest() {
    describe('SearchboxResize', function () {
        var test;
        var findHtmlElement = function (element) {
            return {
                coveoOmniboxOrQuery: Dom_1.$$(element).find('.CoveoOmnibox') || Dom_1.$$(element).find('.CoveoQuerybox'),
                coveoSearchButton: Dom_1.$$(element).find('.CoveoSearchButton'),
                input: Dom_1.$$(Dom_1.$$(element).find('.magic-box-input')).find('input'),
                magicboxIcon: Dom_1.$$(element).find('.magic-box-icon'),
                magicboxClear: Dom_1.$$(element).find('.magic-box-clear'),
                magicboxInput: Dom_1.$$(element).find('.magic-box-input')
            };
        };
        describe('with an Omnibox as the Searchbox,', function () {
            describe('with the heigth option not set,', function () {
                beforeEach(function () {
                    test = Mock.optionsComponentSetup(Searchbox_1.Searchbox, {
                        enableOmnibox: true
                    });
                });
                it('the Omnibox should not be resize', function () {
                    underscore_1.each(findHtmlElement(test.cmp.element), function (element) {
                        expect(element.style.height).toBe('');
                    });
                });
            });
            describe('with the heigth set to 25.', function () {
                var structHTMLElement;
                var height = 25;
                var heightForInput = height - 2;
                beforeEach(function () {
                    test = Mock.optionsComponentSetup(Searchbox_1.Searchbox, {
                        enableOmnibox: true,
                        height: height
                    });
                });
                it('the Omnibox should resize to 25px', function () {
                    underscore_1.each(structHTMLElement, function (element) {
                        if (element === structHTMLElement.magicboxInput) {
                            expect(element.style.height).toBe(heightForInput + "px");
                        }
                        else {
                            expect(element.style.height).toBe(height + "px");
                        }
                    });
                });
            });
        });
        describe('with a Querybox as the Searchbox, ', function () {
            describe('with the height option not set, ', function () {
                beforeEach(function () {
                    test = Mock.optionsComponentSetup(Searchbox_1.Searchbox, {
                        enableOmnibox: false
                    });
                });
                it('the Querybox should not be resize', function () {
                    underscore_1.each(findHtmlElement(test.cmp.element), function (element) {
                        expect(element.style.height).toBe('');
                    });
                });
            });
            describe('with the height set to 60.', function () {
                var structHTMLElement;
                var height = 60;
                var heightForInput = height - 2;
                beforeEach(function () {
                    test = Mock.optionsComponentSetup(Searchbox_1.Searchbox, {
                        enableOmnibox: false,
                        height: height
                    });
                    structHTMLElement = findHtmlElement(test.cmp.element);
                });
                it('the Querybox should resize to 60px', function () {
                    underscore_1.each(structHTMLElement, function (element) {
                        if (element === structHTMLElement.magicboxInput) {
                            expect(element.style.height).toBe(heightForInput + "px");
                        }
                        else {
                            expect(element.style.height).toBe(height + "px");
                        }
                    });
                });
            });
        });
    });
}
exports.SearchboxResizeTest = SearchboxResizeTest;
 
 
/***/ }),
/* 1816 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Test_1 = __webpack_require__(40);
var DependsOnManager_1 = __webpack_require__(185);
var Core_1 = __webpack_require__(9);
var MockEnvironment_1 = __webpack_require__(2);
var ComponentsTypes_1 = __webpack_require__(69);
function DependsOnManagerTest() {
    describe('DependsOnManager', function () {
        var root;
        var searchInterface;
        var queryStateModel;
        var parentMock;
        var dependentMock;
        function createMock(id, dependsOn) {
            var element = document.createElement('div');
            var component = new Core_1.Component(element, ComponentsTypes_1.ComponentsTypes.allFacetsType[0], { root: root, searchInterface: searchInterface });
            component.queryStateModel = queryStateModel;
            component.options = {
                id: id,
                dependsOn: dependsOn
            };
            var facet = {
                reset: jasmine.createSpy('resetSpy'),
                ref: component
            };
            var manager = new DependsOnManager_1.DependsOnManager(facet);
            Test_1.$$(component.root).trigger(Core_1.InitializationEvents.afterComponentsInitialization);
            return {
                facet: facet,
                manager: manager
            };
        }
        function parentStateAttribute() {
            return Core_1.QueryStateModel.getFacetId(parentMock.facet.ref.options.id);
        }
        function dependentStateAttribute() {
            return Core_1.QueryStateModel.getFacetId(dependentMock.facet.ref.options.id);
        }
        function assignCustomCondition() {
            dependentMock.facet.ref.options.dependsOnCondition = function (facet) {
                var currentValues = facet.queryStateModel.get(Core_1.QueryStateModel.getFacetId(facet.options.id));
                return currentValues && currentValues.indexOf('the right value') !== -1;
            };
            queryStateModel.registerNewAttribute(parentStateAttribute(), ['some other value']);
        }
        function fulfillCustomCondition() {
            queryStateModel.set(parentStateAttribute(), ['some other value', 'the right value']);
        }
        beforeEach(function () {
            root = document.createElement('div');
            searchInterface = MockEnvironment_1.mockSearchInterface();
            searchInterface.element = root;
            queryStateModel = new Core_1.QueryStateModel(root);
            parentMock = createMock('@parent');
            dependentMock = createMock('@dependent', '@parent');
        });
        it('the dependent facet is hidden at startup', function () {
            expect(Test_1.$$(dependentMock.facet.ref.element).isVisible()).toBe(false);
        });
        it('the parent facet is visible at startup', function () {
            expect(Test_1.$$(parentMock.facet.ref.element).isVisible()).toBe(true);
        });
        describe("when a parent facet has selected value(s) (default condition fulfilled),\n    when triggering \"building query\"", function () {
            beforeEach(function () {
                queryStateModel.registerNewAttribute(parentStateAttribute(), ['a value']);
                spyOn(dependentMock.facet.ref, 'enable');
                Test_1.$$(root).trigger(Core_1.QueryEvents.buildingQuery);
            });
            it('should enable the dependent facet', function () {
                expect(dependentMock.facet.ref.enable).toHaveBeenCalledTimes(1);
            });
            it('shows the facet', function () {
                var facet = Test_1.$$(dependentMock.facet.ref.element);
                expect(facet.hasClass('coveo-hidden-dependant-facet')).toBe(false);
            });
        });
        describe("when a parent facet has selected value(s) and is disabled (default condition not fulfilled),\n    when triggering \"building query\"", function () {
            beforeEach(function () {
                queryStateModel.registerNewAttribute(parentStateAttribute(), ['a value']);
                parentMock.facet.ref.disabled = true;
                Test_1.$$(root).trigger(Core_1.QueryEvents.buildingQuery);
            });
            it('should disable the dependent facet', function () {
                spyOn(dependentMock.facet.ref, 'disable');
                Test_1.$$(root).trigger(Core_1.QueryEvents.buildingQuery);
                expect(dependentMock.facet.ref.disable).toHaveBeenCalledTimes(1);
            });
            it('hides the facet', function () {
                var facet = Test_1.$$(dependentMock.facet.ref.element);
                facet.removeClass('coveo-hidden-dependant-facet');
                Test_1.$$(root).trigger(Core_1.QueryEvents.buildingQuery);
                expect(facet.hasClass('coveo-hidden-dependant-facet')).toBe(true);
            });
        });
        describe("when a parent facet has no selected value (default condition not fulfilled),\n    when triggering \"building query\"", function () {
            it('should disable the dependent facet', function () {
                spyOn(dependentMock.facet.ref, 'disable');
                Test_1.$$(root).trigger(Core_1.QueryEvents.buildingQuery);
                expect(dependentMock.facet.ref.disable).toHaveBeenCalledTimes(1);
            });
            it('hides the facet', function () {
                var facet = Test_1.$$(dependentMock.facet.ref.element);
                facet.removeClass('coveo-hidden-dependant-facet');
                Test_1.$$(root).trigger(Core_1.QueryEvents.buildingQuery);
                expect(facet.hasClass('coveo-hidden-dependant-facet')).toBe(true);
            });
        });
        describe("when two parent facets have no selected value (default conditions not fulfilled),\n    when triggering \"building query\"", function () {
            var dependent2Mock;
            beforeEach(function () {
                dependent2Mock = createMock('@dependent2', '@dependent');
            });
            it('should disable the first dependent facet', function () {
                spyOn(dependentMock.facet.ref, 'disable');
                Test_1.$$(root).trigger(Core_1.QueryEvents.buildingQuery);
                expect(dependentMock.facet.ref.disable).toHaveBeenCalledTimes(1);
            });
            it('should disable the second dependent facet', function () {
                spyOn(dependent2Mock.facet.ref, 'disable');
                Test_1.$$(root).trigger(Core_1.QueryEvents.buildingQuery);
                expect(dependent2Mock.facet.ref.disable).toHaveBeenCalledTimes(1);
            });
            it('should hide the first facet', function () {
                var facet = Test_1.$$(dependentMock.facet.ref.element);
                facet.removeClass('coveo-hidden-dependant-facet');
                Test_1.$$(root).trigger(Core_1.QueryEvents.buildingQuery);
                expect(facet.hasClass('coveo-hidden-dependant-facet')).toBe(true);
            });
            it('should hide the second facet', function () {
                var facet = Test_1.$$(dependent2Mock.facet.ref.element);
                facet.removeClass('coveo-hidden-dependant-facet');
                Test_1.$$(root).trigger(Core_1.QueryEvents.buildingQuery);
                expect(facet.hasClass('coveo-hidden-dependant-facet')).toBe(true);
            });
        });
        describe("when one parent facet has selected value(s) (default condition fulfilled)\n    and the second parent facet has no selected value (default conditions not fulfilled),\n    when triggering \"building query\"", function () {
            var dependent2Mock;
            beforeEach(function () {
                queryStateModel.registerNewAttribute(parentStateAttribute(), ['a value']);
                dependent2Mock = createMock('@dependent2', '@dependent');
            });
            it('should enable the first dependent facet', function () {
                spyOn(dependentMock.facet.ref, 'enable');
                Test_1.$$(root).trigger(Core_1.QueryEvents.buildingQuery);
                expect(dependentMock.facet.ref.enable).toHaveBeenCalledTimes(1);
            });
            it('should disable the second dependent facet', function () {
                spyOn(dependent2Mock.facet.ref, 'disable');
                Test_1.$$(root).trigger(Core_1.QueryEvents.buildingQuery);
                expect(dependent2Mock.facet.ref.disable).toHaveBeenCalledTimes(1);
            });
            it('should show the first facet', function () {
                var facet = Test_1.$$(dependentMock.facet.ref.element);
                facet.addClass('coveo-hidden-dependant-facet');
                Test_1.$$(root).trigger(Core_1.QueryEvents.buildingQuery);
                expect(facet.hasClass('coveo-hidden-dependant-facet')).toBe(false);
            });
            it('should hide the second facet', function () {
                var facet = Test_1.$$(dependent2Mock.facet.ref.element);
                facet.removeClass('coveo-hidden-dependant-facet');
                Test_1.$$(root).trigger(Core_1.QueryEvents.buildingQuery);
                expect(facet.hasClass('coveo-hidden-dependant-facet')).toBe(true);
            });
        });
        describe("when two parent facets have selected value(s) (default conditions fulfilled),\n    when triggering \"building query\"", function () {
            var dependent2Mock;
            beforeEach(function () {
                queryStateModel.registerNewAttribute(parentStateAttribute(), ['a value']);
                queryStateModel.registerNewAttribute(dependentStateAttribute(), ['a value']);
                dependent2Mock = createMock('@dependent2', '@dependent');
            });
            it('should enable the first dependent facet', function () {
                spyOn(dependentMock.facet.ref, 'enable');
                Test_1.$$(root).trigger(Core_1.QueryEvents.buildingQuery);
                expect(dependentMock.facet.ref.enable).toHaveBeenCalledTimes(1);
            });
            it('should enable the second dependent facet', function () {
                spyOn(dependent2Mock.facet.ref, 'enable');
                Test_1.$$(root).trigger(Core_1.QueryEvents.buildingQuery);
                expect(dependent2Mock.facet.ref.enable).toHaveBeenCalledTimes(1);
            });
            it('should show the first facet', function () {
                var facet = Test_1.$$(dependentMock.facet.ref.element);
                facet.addClass('coveo-hidden-dependant-facet');
                Test_1.$$(root).trigger(Core_1.QueryEvents.buildingQuery);
                expect(facet.hasClass('coveo-hidden-dependant-facet')).toBe(false);
            });
            it('should show the second facet', function () {
                var facet = Test_1.$$(dependent2Mock.facet.ref.element);
                facet.addClass('coveo-hidden-dependant-facet');
                Test_1.$$(root).trigger(Core_1.QueryEvents.buildingQuery);
                expect(facet.hasClass('coveo-hidden-dependant-facet')).toBe(false);
            });
        });
        it("when a parent facet fulfills the custom condition\n      when triggering \"building query\"\n      should enable the dependent facet", function () {
            assignCustomCondition();
            fulfillCustomCondition();
            spyOn(dependentMock.facet.ref, 'enable');
            Test_1.$$(root).trigger(Core_1.QueryEvents.buildingQuery);
            expect(dependentMock.facet.ref.enable).toHaveBeenCalledTimes(1);
        });
        it("when a parent facet does not fulfill the custom condition\n      when triggering \"building query\"\n      should disable the dependent facet", function () {
            assignCustomCondition();
            spyOn(dependentMock.facet.ref, 'disable');
            Test_1.$$(root).trigger(Core_1.QueryEvents.buildingQuery);
            expect(dependentMock.facet.ref.disable).toHaveBeenCalledTimes(1);
        });
        describe('when query state changes', function () {
            beforeEach(function () {
                queryStateModel.registerNewAttribute(parentStateAttribute(), []);
            });
            it("should not reset if parent has selected values (default condition fulfilled)", function () {
                queryStateModel.set(parentStateAttribute(), ['any value']);
                Test_1.$$(root).trigger('state:change');
                expect(dependentMock.facet.reset).not.toHaveBeenCalled();
            });
            it("should reset if parent has no selected values (default condition not fulfilled)", function () {
                Test_1.$$(root).trigger('state:change');
                expect(dependentMock.facet.reset).toHaveBeenCalled();
            });
            it("should not reset if fulfills the custom condition", function () {
                assignCustomCondition();
                fulfillCustomCondition();
                Test_1.$$(root).trigger('state:change');
                expect(dependentMock.facet.reset).not.toHaveBeenCalled();
            });
            it("should reset if parent does not fulfill the custom condition", function () {
                assignCustomCondition();
                Test_1.$$(root).trigger('state:change');
                expect(dependentMock.facet.reset).toHaveBeenCalled();
            });
        });
        it('calling "hasDependentFacets" on a parent facet should return true', function () {
            expect(parentMock.manager.hasDependentFacets).toBe(true);
        });
        it('calling "hasDependentFacets" on a dependent facet should return false', function () {
            expect(dependentMock.manager.hasDependentFacets).toBe(false);
        });
        it("when a parent facet has dependent facets without selected values\n      calling \"dependentFacetsHaveSelectedValues\" should return false", function () {
            expect(parentMock.manager.dependentFacetsHaveSelectedValues).toBe(false);
        });
        it("when a parent facet has dependent facets with selected values\n      calling \"dependentFacetsHaveSelectedValues\" should return true", function () {
            queryStateModel.registerNewAttribute(dependentStateAttribute(), ['a value']);
            expect(parentMock.manager.dependentFacetsHaveSelectedValues).toBe(true);
        });
    });
}
exports.DependsOnManagerTest = DependsOnManagerTest;
 
 
/***/ }),
/* 1817 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Core_1 = __webpack_require__(9);
var Combobox_1 = __webpack_require__(204);
var ComboboxInput_1 = __webpack_require__(841);
var Simulate_1 = __webpack_require__(15);
var ComboboxTest_1 = __webpack_require__(413);
function ComboboxInputTest() {
    describe('ComboboxInput', function () {
        var combobox;
        var comboboxInput;
        beforeEach(function () {
            initializeComponent();
        });
        function initializeComponent() {
            combobox = new Combobox_1.Combobox(ComboboxTest_1.comboboxDefaultOptions());
            spyOn(combobox, 'onInputBlur');
            spyOn(combobox, 'onInputChange');
            comboboxInput = new ComboboxInput_1.ComboboxInput(combobox);
        }
        function getInput() {
            return Core_1.$$(comboboxInput.element).find('input');
        }
        function simulateInputChange(value) {
            getInput().setAttribute('value', value);
            Simulate_1.Simulate.keyUp(getInput(), Core_1.KEYBOARD.CTRL);
        }
        it('should render the input', function () {
            expect(getInput()).toBeTruthy();
        });
        it('value getter should return the input value', function () {
            simulateInputChange('hello');
            expect(comboboxInput.value).toBe('hello');
        });
        it("when triggering change on the input\n    should call the \"onInputChange\" method of the combobox", function () {
            var value = 'test';
            simulateInputChange(value);
            expect(combobox.onInputChange).toHaveBeenCalledWith(value);
        });
        it("when triggering focus on the input,\n    when the \"clearOnBlur\" option if \"false\" (default)\n    should call the \"onInputChange\" method of the combobox", function () {
            getInput().dispatchEvent(new Event('focus'));
            expect(combobox.onInputChange).toHaveBeenCalled();
        });
        it("when triggering blur on the input\n    when relatedTarget is outside the combobox\n    should call the \"onInputBlur\" method of the combobox", function () {
            var relatedTarget = document.body;
            combobox.element.dispatchEvent(new FocusEvent('focusout', { relatedTarget: relatedTarget }));
            expect(combobox.onInputBlur).toHaveBeenCalled();
        });
        it("when triggering blur on the input\n    when relatedTarget is inside the combobox\n    should not call the \"onInputBlur\" method of the combobox", function () {
            var relatedTarget = combobox.values.element;
            combobox.element.dispatchEvent(new FocusEvent('focusout', { relatedTarget: relatedTarget }));
            expect(combobox.onInputBlur).not.toHaveBeenCalled();
        });
        it("when pressing the down arrow on the keyboard\n    should call the \"focusNextValue\" method of the combobox values", function () {
            spyOn(combobox.values, 'focusNextValue');
            Simulate_1.Simulate.keyDown(combobox.element, Core_1.KEYBOARD.DOWN_ARROW);
            expect(combobox.values.focusNextValue).toHaveBeenCalled();
        });
        it("when pressing the up arrow on the keyboard\n    should call the \"focusPreviousValue\" method of the combobox values", function () {
            spyOn(combobox.values, 'focusPreviousValue');
            Simulate_1.Simulate.keyDown(combobox.element, Core_1.KEYBOARD.UP_ARROW);
            expect(combobox.values.focusPreviousValue).toHaveBeenCalled();
        });
        it("when pressing the home button on the keyboard\n    should call the \"focusFirstValue\" method of the combobox values", function () {
            spyOn(combobox.values, 'focusFirstValue');
            Simulate_1.Simulate.keyDown(combobox.element, Core_1.KEYBOARD.HOME);
            expect(combobox.values.focusFirstValue).toHaveBeenCalled();
        });
        it("when pressing the end button on the keyboard\n    should call the \"focusLastValue\" method of the combobox values", function () {
            spyOn(combobox.values, 'focusLastValue');
            Simulate_1.Simulate.keyDown(combobox.element, Core_1.KEYBOARD.END);
            expect(combobox.values.focusLastValue).toHaveBeenCalled();
        });
        it("when pressing enter button of the keyboard\n    should call the \"selectActiveValue\" method of the combobox values", function () {
            spyOn(combobox.values, 'selectActiveValue');
            Simulate_1.Simulate.keyUp(combobox.element, Core_1.KEYBOARD.ENTER);
            expect(combobox.values.selectActiveValue).toHaveBeenCalled();
        });
        it("when pressing escape button of the keyboard\n    should call the \"clearAll\" method of the combobox", function () {
            spyOn(combobox, 'clearAll');
            Simulate_1.Simulate.keyUp(combobox.element, Core_1.KEYBOARD.ESCAPE);
            expect(combobox.clearAll).toHaveBeenCalled();
        });
        it('should add the correct accessibility attributes', function () {
            var id = combobox.id + "-input";
            var listboxId = combobox.id + "-listbox";
            expect(getInput().getAttribute('role')).toBe('combobox');
            expect(getInput().getAttribute('aria-owns')).toBe(listboxId);
            expect(getInput().getAttribute('aria-haspopup')).toBe('listbox');
            expect(getInput().getAttribute('aria-expanded')).toBe('false');
            expect(getInput().getAttribute('aria-autocomplete')).toBe('list');
            expect(getInput().getAttribute('id')).toBe(id);
            expect(getInput().getAttribute('aria-activeDescendant')).toBeFalsy();
        });
        it("When calling \"updateAccessibilityAttributes\"\n    should modify the correct accessibility attributes", function () {
            var activeDescendant = 'test';
            comboboxInput.updateAccessibilityAttributes({
                activeDescendant: activeDescendant,
                expanded: true
            });
            expect(getInput().getAttribute('aria-expanded')).toBe('true');
            expect(getInput().getAttribute('aria-activeDescendant')).toBe(activeDescendant);
        });
        it("When calling \"clearInput\"\n    should reset the input correctly", function () {
            getInput().setAttribute('value', 'test');
            comboboxInput.clearInput();
            expect(combobox.onInputChange).toHaveBeenCalledWith('');
        });
    });
}
exports.ComboboxInputTest = ComboboxInputTest;
 
 
/***/ }),
/* 1818 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __assign = (this && this.__assign) || Object.assign || function(t) {
    for (var s, i = 1, n = arguments.length; i < n; i++) {
        s = arguments[i];
        for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
            t[p] = s[p];
    }
    return t;
};
Object.defineProperty(exports, "__esModule", { value: true });
var Combobox_1 = __webpack_require__(204);
var ComboboxTest_1 = __webpack_require__(413);
var ComboboxValues_1 = __webpack_require__(842);
var Core_1 = __webpack_require__(9);
function createValuesFromResponse(response) {
    return response.map(function (value) {
        return {
            value: value,
            element: Core_1.$$('li', { class: 'coveo-checkbox-span-label' }, value).el
        };
    });
}
function ComboboxValuesTest() {
    describe('ComboboxValues', function () {
        var combobox;
        var comboboxValues;
        var response;
        beforeEach(function () {
            initializeComponent({ highlightValueClassName: 'coveo-checkbox-span-label' });
        });
        function mockComboboxValuesFocusFunction() {
            comboboxValues['values'].forEach(function (value) {
                spyOn(value.element, 'focus').and.callFake(function () { return comboboxValues['setKeyboardActiveValue'](value); });
            });
        }
        function triggerRenderFromResponse(newResponse) {
            response = newResponse;
            comboboxValues.renderFromResponse(response);
            mockComboboxValuesFocusFunction();
        }
        function initializeComponent(additionalOptions) {
            combobox = new Combobox_1.Combobox(__assign({}, ComboboxTest_1.comboboxDefaultOptions(), { createValuesFromResponse: createValuesFromResponse }, additionalOptions));
            spyOn(combobox, 'clearAll');
            comboboxValues = new ComboboxValues_1.ComboboxValues(combobox);
        }
        function getChildren() {
            return Core_1.$$(comboboxValues.element).children();
        }
        function isChildrenActiveAtIndex(index) {
            return Core_1.$$(getChildren()[index]).hasClass('coveo-focused');
        }
        function getFocusCountAtIndex(index) {
            return getChildren()[index].focus.calls.count();
        }
        describe('when being initialized', function () {
            it('should hide the list', function () {
                expect(Core_1.$$(comboboxValues.element).isVisible()).toBe(false);
            });
            it('should possess the correct accessibility attributes', function () {
                expect(comboboxValues.element.getAttribute('id')).toBe(combobox.id + "-listbox");
                expect(comboboxValues.element.getAttribute('aria-labelledby')).toBe(combobox.id + "-input");
                expect(comboboxValues.element.getAttribute('role')).toBe('listbox');
            });
            it('"mouseIsOverValue" should be false', function () {
                expect(comboboxValues.mouseIsOverValue).toBe(false);
            });
        });
        describe('when calling "renderFromResponse" with values', function () {
            beforeEach(function () {
                spyOn(combobox, 'updateAccessibilityAttributes');
                triggerRenderFromResponse(['hi', 'hello', 'goodbye']);
            });
            it('hasValues should return true', function () {
                expect(comboboxValues.hasValues()).toBe(true);
            });
            it('numberOfValues getter should return the correct number of values ', function () {
                expect(comboboxValues.numberOfValues).toBe(3);
            });
            it('should show the list', function () {
                expect(Core_1.$$(comboboxValues.element).isVisible()).toBe(true);
            });
            it('should render the values in the list', function () {
                expect(getChildren().length).toBe(response.length);
            });
            it('should call "updateAccessibilityAttributes" twice', function () {
                expect(combobox.updateAccessibilityAttributes).toHaveBeenCalledTimes(2);
            });
            it("when entering a value with the mouse\n      \"mouseIsOverValue\" should be true", function () {
                var valueElement = getChildren()[0];
                Core_1.$$(valueElement).trigger('mouseenter');
                expect(comboboxValues.mouseIsOverValue).toBe(true);
            });
            it("when entering then leaving a value with the mouse\n      \"mouseIsOverValue\" should be false", function () {
                var valueElement = getChildren()[1];
                Core_1.$$(valueElement).trigger('mouseenter');
                Core_1.$$(valueElement).trigger('mouseleave');
                expect(comboboxValues.mouseIsOverValue).toBe(false);
            });
            it('should add a tabindex to every value', function () {
                getChildren().forEach(function (valueElement) { return expect(valueElement.tabIndex).toEqual(0); });
            });
            it('should highlight text that matches the input value when the parent has the right class', function () {
                combobox.element.querySelector('input').value = 'e';
                triggerRenderFromResponse(['hello']);
                var element = Core_1.$$(comboboxValues.element).findAll('.coveo-checkbox-span-label')[0];
                expect(element.innerHTML).toBe('<span>h</span><span class="coveo-highlight">e</span><span>llo</span>');
            });
            it('should highlight text that matches the input value when a child has the right class', function () {
                var createValuesFromResponseWithWrapper = function (response) {
                    return response.map(function (value) {
                        return {
                            value: value,
                            element: Core_1.$$('div', {}, Core_1.$$('li', { class: 'coveo-checkbox-span-label' }, value).el).el
                        };
                    });
                };
                initializeComponent({
                    highlightValueClassName: 'coveo-checkbox-span-label',
                    createValuesFromResponse: createValuesFromResponseWithWrapper
                });
                combobox.element.querySelector('input').value = 'e';
                triggerRenderFromResponse(['hello']);
                var element = Core_1.$$(comboboxValues.element).findAll('.coveo-checkbox-span-label')[0];
                expect(element.innerHTML).toBe('<span>h</span><span class="coveo-highlight">e</span><span>llo</span>');
            });
            it('does not escape & character', function () {
                triggerRenderFromResponse(['&']);
                var element = Core_1.$$(comboboxValues.element).findAll('.coveo-checkbox-span-label')[0];
                expect(element.textContent).toBe('&');
            });
            describe('when a value is clicked', function () {
                beforeEach(function () {
                    var valueElement = getChildren()[1];
                    Core_1.$$(valueElement).trigger('click');
                });
                it('should call the option "onSelectValue" with the correct argument', function () {
                    expect(combobox.options.onSelectValue).toHaveBeenCalledWith({
                        value: response[1],
                        element: getChildren()[1]
                    });
                });
                it('should call "clearAll"', function () {
                    expect(combobox.clearAll).toHaveBeenCalled();
                });
            });
        });
        describe('when calling "renderFromResponse" with no values', function () {
            beforeEach(function () {
                initializeComponent();
                spyOn(combobox, 'updateAriaLive');
                spyOn(combobox, 'updateAccessibilityAttributes');
                triggerRenderFromResponse([]);
            });
            it('hasValues should return false', function () {
                expect(comboboxValues.hasValues()).toBe(false);
            });
            it('numberOfValues getter should return the correct number of values ', function () {
                expect(comboboxValues.numberOfValues).toBe(0);
            });
            it('should show the "no values found" element', function () {
                var noValuesFound = getChildren()[0];
                expect(Core_1.$$(noValuesFound).hasClass('coveo-combobox-value-not-found')).toBe(true);
            });
            it('should call "updateAccessibilityAttributes" with the right attributes', function () {
                var expected = {
                    expanded: false,
                    activeDescendant: ''
                };
                expect(combobox.updateAccessibilityAttributes).toHaveBeenCalledWith(expected);
            });
        });
        describe('when calling "clearValues"', function () {
            beforeEach(function () {
                triggerRenderFromResponse(['hi', 'hello', 'goodbye']);
                spyOn(combobox, 'updateAccessibilityAttributes');
                comboboxValues.clearValues();
            });
            it('should hide the list', function () {
                expect(Core_1.$$(comboboxValues.element).isVisible()).toBe(false);
            });
            it('should empty the list', function () {
                expect(getChildren().length).toBe(0);
            });
            it('should call "updateAccessibilityAttributes" with the right attributes', function () {
                var expected = {
                    expanded: false,
                    activeDescendant: ''
                };
                expect(combobox.updateAccessibilityAttributes).toHaveBeenCalledWith(expected);
            });
        });
        describe('when calling "focusNextValue"', function () {
            beforeEach(function () {
                triggerRenderFromResponse(['hi', 'hello']);
            });
            it("when no value is active\n      should activate the first value", function () {
                comboboxValues.focusNextValue();
                expect(isChildrenActiveAtIndex(0)).toBe(true);
            });
            it("when no value is active\n      should focus the first value", function () {
                comboboxValues.focusNextValue();
                expect(getFocusCountAtIndex(0)).toEqual(1);
            });
            it("when a value is active\n      should activate the next value", function () {
                comboboxValues.focusNextValue();
                comboboxValues.focusNextValue();
                expect(isChildrenActiveAtIndex(0)).toBe(false);
                expect(isChildrenActiveAtIndex(1)).toBe(true);
            });
            it("when a value is active\n      should focus the next value", function () {
                comboboxValues.focusNextValue();
                comboboxValues.focusNextValue();
                expect(getFocusCountAtIndex(0)).toEqual(1);
                expect(getFocusCountAtIndex(1)).toEqual(1);
            });
            it("when the last value is active\n      should activate the first value", function () {
                comboboxValues.focusNextValue();
                comboboxValues.focusNextValue();
                comboboxValues.focusNextValue();
                expect(isChildrenActiveAtIndex(1)).toBe(false);
                expect(isChildrenActiveAtIndex(0)).toBe(true);
            });
            it("when the last is active\n      should focus the first value", function () {
                comboboxValues.focusNextValue();
                comboboxValues.focusNextValue();
                comboboxValues.focusNextValue();
                expect(getFocusCountAtIndex(0)).toEqual(2);
                expect(getFocusCountAtIndex(1)).toEqual(1);
            });
            it('should call "updateAccessibilityAttributes" with the right attributes', function () {
                spyOn(combobox, 'updateAccessibilityAttributes');
                comboboxValues.focusNextValue();
                var expected = {
                    expanded: true,
                    activeDescendant: getChildren()[0].getAttribute('id')
                };
                expect(combobox.updateAccessibilityAttributes).toHaveBeenCalledWith(expected);
            });
        });
        describe('when calling "focusPreviousValue"', function () {
            beforeEach(function () {
                triggerRenderFromResponse(['hi', 'hello']);
            });
            it("when no value is active\n      should activate the last value", function () {
                comboboxValues.focusPreviousValue();
                expect(isChildrenActiveAtIndex(1)).toBe(true);
            });
            it("when no value is active\n      should focus the last value", function () {
                comboboxValues.focusPreviousValue();
                expect(getFocusCountAtIndex(1)).toEqual(1);
            });
            it("when a value is active\n      should activate the previous value", function () {
                comboboxValues.focusPreviousValue();
                comboboxValues.focusPreviousValue();
                expect(isChildrenActiveAtIndex(1)).toBe(false);
                expect(isChildrenActiveAtIndex(0)).toBe(true);
            });
            it("when a value is active\n      should focus the previous value", function () {
                comboboxValues.focusPreviousValue();
                comboboxValues.focusPreviousValue();
                expect(getFocusCountAtIndex(1)).toEqual(1);
                expect(getFocusCountAtIndex(0)).toEqual(1);
            });
            it("when the last value is active\n      should activate the last value", function () {
                comboboxValues.focusPreviousValue();
                comboboxValues.focusPreviousValue();
                comboboxValues.focusPreviousValue();
                expect(isChildrenActiveAtIndex(0)).toBe(false);
                expect(isChildrenActiveAtIndex(1)).toBe(true);
            });
            it("when the last value is active\n      should focus the last value", function () {
                comboboxValues.focusPreviousValue();
                comboboxValues.focusPreviousValue();
                comboboxValues.focusPreviousValue();
                expect(getFocusCountAtIndex(0)).toEqual(1);
                expect(getFocusCountAtIndex(1)).toEqual(2);
            });
            it('should call "updateAccessibilityAttributes" with the right attributes', function () {
                spyOn(combobox, 'updateAccessibilityAttributes');
                comboboxValues.focusPreviousValue();
                expect(combobox.updateAccessibilityAttributes).toHaveBeenCalledWith({
                    expanded: true,
                    activeDescendant: getChildren()[1].getAttribute('id')
                });
            });
        });
        describe('when calling "focusFirstValue"', function () {
            beforeEach(function () {
                triggerRenderFromResponse(['hi', 'hello', 'bye']);
            });
            it("when no value is active\n      should activate the first value", function () {
                comboboxValues.focusFirstValue();
                expect(isChildrenActiveAtIndex(0)).toBe(true);
            });
            it("when no value is active\n      should focus the first value", function () {
                comboboxValues.focusFirstValue();
                expect(getFocusCountAtIndex(0)).toEqual(1);
            });
            it("when a value is active\n      should activate the first value", function () {
                comboboxValues.focusNextValue();
                comboboxValues.focusNextValue();
                comboboxValues.focusFirstValue();
                expect(isChildrenActiveAtIndex(1)).toBe(false);
                expect(isChildrenActiveAtIndex(0)).toBe(true);
            });
            it("when a value is active\n      should focus the first value", function () {
                comboboxValues.focusNextValue();
                comboboxValues.focusNextValue();
                comboboxValues.focusFirstValue();
                expect(getFocusCountAtIndex(0)).toEqual(2);
                expect(getFocusCountAtIndex(1)).toEqual(1);
            });
            it('should call "updateAccessibilityAttributes" with the right attributes', function () {
                spyOn(combobox, 'updateAccessibilityAttributes');
                comboboxValues.focusFirstValue();
                var expected = {
                    expanded: true,
                    activeDescendant: getChildren()[0].getAttribute('id')
                };
                expect(combobox.updateAccessibilityAttributes).toHaveBeenCalledWith(expected);
            });
        });
        describe('when calling "focusLastValue"', function () {
            beforeEach(function () {
                triggerRenderFromResponse(['hi', 'hello', 'bye']);
            });
            it("when no value is active\n      should activate the last value", function () {
                comboboxValues.focusLastValue();
                expect(isChildrenActiveAtIndex(2)).toBe(true);
            });
            it("when no value is active\n      should focus the last value", function () {
                comboboxValues.focusLastValue();
                expect(getFocusCountAtIndex(2)).toEqual(1);
            });
            it("when a value is active\n      should activate the last value", function () {
                comboboxValues.focusNextValue();
                comboboxValues.focusLastValue();
                expect(isChildrenActiveAtIndex(2)).toBe(true);
                expect(isChildrenActiveAtIndex(0)).toBe(false);
            });
            it("when a value is active\n      should focus the last value", function () {
                comboboxValues.focusNextValue();
                comboboxValues.focusLastValue();
                expect(getFocusCountAtIndex(2)).toEqual(1);
                expect(getFocusCountAtIndex(0)).toEqual(1);
            });
            it('should call "updateAccessibilityAttributes" with the right attributes', function () {
                spyOn(combobox, 'updateAccessibilityAttributes');
                comboboxValues.focusLastValue();
                var expected = {
                    expanded: true,
                    activeDescendant: getChildren()[2].getAttribute('id')
                };
                expect(combobox.updateAccessibilityAttributes).toHaveBeenCalledWith(expected);
            });
        });
        describe('when calling "selectActiveValue"', function () {
            beforeEach(function () {
                triggerRenderFromResponse(['hi']);
            });
            it("when no value is active\n      should not trigger a select and clear", function () {
                comboboxValues.selectActiveValue();
                expect(combobox.clearAll).not.toHaveBeenCalled();
                expect(combobox.options.onSelectValue).not.toHaveBeenCalled();
            });
            it("when a value is active\n      should trigger a select and clear", function () {
                comboboxValues.focusNextValue();
                comboboxValues.selectActiveValue();
                expect(combobox.clearAll).toHaveBeenCalled();
                expect(combobox.options.onSelectValue).toHaveBeenCalledWith({
                    value: response[0],
                    element: getChildren()[0]
                });
            });
        });
        describe('when scrolling in the values', function () {
            beforeEach(function () {
                spyOn(combobox, 'onScrollEndReached');
            });
            it("if areMoreValuesAvailable return true and the scroll end is reached\n      it should call the onScrollEndReached on the combobox", function () {
                comboboxValues.element.dispatchEvent(new CustomEvent('scroll'));
                expect(combobox.onScrollEndReached).toHaveBeenCalled();
            });
            it("if areMoreValuesAvailable return false and the scroll end is reached\n      it should not call the onScrollEndReached on the combobox", function () {
                combobox.options.scrollable.areMoreValuesAvailable = function () { return false; };
                comboboxValues.element.dispatchEvent(new CustomEvent('scroll'));
                expect(combobox.onScrollEndReached).not.toHaveBeenCalled();
            });
        });
        describe('when calling "resetScroll"', function () {
            it('should set the maxHeight value to the maxDropdownHeight option', function () {
                comboboxValues.resetScroll();
                expect(comboboxValues.element.style.maxHeight).toBe('100px');
            });
            it('should reset the scrollTop value to 0', function () {
                comboboxValues.element.scrollTop = 300;
                comboboxValues.resetScroll();
                expect(comboboxValues.element.scrollTop).toBe(0);
            });
        });
        it('should "saveFocusedValue" & "restoreFocusedValue" correctly', function () {
            triggerRenderFromResponse(['hi', 'hello']);
            comboboxValues.focusLastValue();
            comboboxValues.saveFocusedValue();
            triggerRenderFromResponse(['hi', 'hello', 'goodbye']);
            comboboxValues.restoreFocusedValue();
            expect(isChildrenActiveAtIndex(1)).toBe(true);
        });
    });
}
exports.ComboboxValuesTest = ComboboxValuesTest;
 
 
/***/ }),
/* 1819 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __assign = (this && this.__assign) || Object.assign || function(t) {
    for (var s, i = 1, n = arguments.length; i < n; i++) {
        s = arguments[i];
        for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
            t[p] = s[p];
    }
    return t;
};
Object.defineProperty(exports, "__esModule", { value: true });
var Mock = __webpack_require__(2);
var ImageFieldValue_1 = __webpack_require__(408);
var Core_1 = __webpack_require__(9);
var Fake_1 = __webpack_require__(11);
function FieldImageTest() {
    describe('ImageFieldValue', function () {
        var test;
        var imgPath = 'img/1';
        function initializeFieldValueComponent(options, result) {
            if (result === void 0) { result = Fake_1.FakeResults.createFakeResult(); }
            result.raw['ccimage'] = imgPath;
            test = Mock.advancedResultComponentSetup(ImageFieldValue_1.ImageFieldValue, result, {
                element: Core_1.$$('div').el,
                cmpOptions: options
            });
        }
        describe('exposes options', function () {
            it('field should get set by the option', function () {
                var field = '@field';
                initializeFieldValueComponent({ field: field });
                expect(test.cmp.options.field).toBe(field);
            });
            it('width should be applied to the img tag', function () {
                var width = 50;
                initializeFieldValueComponent({
                    field: '@ccimage',
                    width: width
                });
                var img = Core_1.$$(test.cmp.element).find('img');
                expect(img.getAttribute('width')).toBe(width.toString());
            });
            it('height should be applied to the img tag', function () {
                var height = 50;
                initializeFieldValueComponent({
                    field: '@ccimage',
                    height: height
                });
                var img = Core_1.$$(test.cmp.element).find('img');
                expect(img.getAttribute('height')).toBe(height.toString());
            });
            it('srcTemplate should be resolved and applied to the img tag', function () {
                initializeFieldValueComponent({
                    field: '@ccimage',
                    srcTemplate: 'https://somewebsite.com/${raw.image}.webp'
                }, __assign({}, Fake_1.FakeResults.createFakeResult(), { raw: { image: 'abc' } }));
                var img = Core_1.$$(test.cmp.element).find('img');
                expect(img.getAttribute('src')).toBe('https://somewebsite.com/abc.webp');
            });
        });
    });
}
exports.FieldImageTest = FieldImageTest;
 
 
/***/ }),
/* 1820 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var OmniboxAnalytics_1 = __webpack_require__(496);
function OmniboxAnalyticsTest() {
    var omniboxAnalytics;
    describe('omniboxAnalyticsTest', function () {
        beforeEach(function () {
            omniboxAnalytics = new OmniboxAnalytics_1.OmniboxAnalytics();
        });
        function random256Array(array) {
            while (array.join('').length <= 256) {
                array.push(Math.random()
                    .toString(36)
                    .substring(2));
            }
        }
        it('return IAnalyticsOmniboxSuggestionMeta when nothing has change since initialisation', function () {
            expect(omniboxAnalytics.buildCustomDataForPartialQueries()).toEqual(jasmine.objectContaining({
                partialQueries: '',
                suggestionRanking: undefined,
                suggestions: '',
                partialQuery: undefined
            }));
        });
        it('suggestionRanking should get set with the right value', function () {
            omniboxAnalytics.suggestionRanking = 3;
            expect(omniboxAnalytics.buildCustomDataForPartialQueries()).toEqual(jasmine.objectContaining({
                partialQueries: '',
                partialQuery: undefined,
                suggestionRanking: 3,
                suggestions: ''
            }));
        });
        it('partialQueries and suggestions values get separated by a semicolon', function () {
            omniboxAnalytics.partialQueries = ['foo', 'foo2'];
            omniboxAnalytics.suggestions = ['bar', 'bar2'];
            expect(omniboxAnalytics.buildCustomDataForPartialQueries()).toEqual(jasmine.objectContaining({
                partialQueries: 'foo;foo2',
                partialQuery: 'foo2',
                suggestionRanking: undefined,
                suggestions: 'bar;bar2'
            }));
        });
        it('partialQueries and suggestions consecutive values get reduce to 1', function () {
            omniboxAnalytics.partialQueries = ['foo', 'foo', 'foo'];
            omniboxAnalytics.suggestions = ['bar', 'bar', 'bar'];
            expect(omniboxAnalytics.buildCustomDataForPartialQueries()).toEqual(jasmine.objectContaining({
                partialQueries: 'foo',
                partialQuery: 'foo',
                suggestionRanking: undefined,
                suggestions: 'bar'
            }));
        });
        it('partialQueries length should get rezise be a max of 256 character', function () {
            random256Array(omniboxAnalytics.partialQueries);
            expect(omniboxAnalytics.partialQueries.join('').length).toBeGreaterThan(256);
            var metadata = omniboxAnalytics.buildCustomDataForPartialQueries();
            expect(metadata.partialQueries.length).toBeLessThan(256);
        });
        it('suggestions length should get rezise be a max of 256 character', function () {
            random256Array(omniboxAnalytics.suggestions);
            expect(omniboxAnalytics.suggestions.join('').length).toBeGreaterThan(256);
            var metadata = omniboxAnalytics.buildCustomDataForPartialQueries();
            expect(metadata.suggestions.length).toBeLessThan(256);
        });
    });
}
exports.OmniboxAnalyticsTest = OmniboxAnalyticsTest;
 
 
/***/ }),
/* 1821 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Core_1 = __webpack_require__(9);
var Fake_1 = __webpack_require__(11);
var Dom_1 = __webpack_require__(0);
var Mock = __webpack_require__(2);
var StarRating_1 = __webpack_require__(831);
var CONTAINER_CSS_CLASS = 'CoveoStarRating';
var STAR_CSS_CLASS = 'coveo-star-rating-star';
var ACTIVE_STAR_CSS_CLASS = 'coveo-star-rating-star-active';
var STAR_LABEL_CSS_CLASS = 'coveo-star-rating-label';
var getActiveStars = function (starRatingElement) {
    return {
        numStars: starRatingElement.querySelectorAll("." + STAR_CSS_CLASS).length,
        numActiveStars: starRatingElement.querySelectorAll("." + ACTIVE_STAR_CSS_CLASS).length
    };
};
function StarRatingTest() {
    var test;
    function initStarRatingComponent(ratingValue, numRatingsValue, ratingScale) {
        var options = { ratingField: '@rating', numberOfRatingsField: '@numberOfRatings', ratingScale: ratingScale };
        var result = Fake_1.FakeResults.createFakeResult();
        result.raw.rating = ratingValue;
        result.raw.numberOfRatings = numRatingsValue;
        test = Mock.advancedResultComponentSetup(StarRating_1.StarRating, result, {
            element: Dom_1.$$('div').el,
            cmpOptions: options,
            modifyBuilder: function (builder) {
                return builder;
            }
        });
    }
    describe('StarRating', function () {
        it('should have correct class type', function () {
            initStarRatingComponent('0', '0');
            expect(test.cmp.element.classList.contains(CONTAINER_CSS_CLASS)).toBe(true);
        });
        it('should have a tabindex of 0', function () {
            initStarRatingComponent('0', '0');
            expect(test.cmp.element.tabIndex).toEqual(0);
        });
        describe('The star elements', function () {
            it('should display five stars with a number of active stars equal to rating given', function () {
                for (var i = 0; i <= 5; i++) {
                    initStarRatingComponent(i.toString());
                    var starData = getActiveStars(test.cmp.element);
                    expect(starData.numStars).toBe(5);
                    expect(starData.numActiveStars).toBe(i);
                }
            });
            it('should display no active stars when the rating provided is negative', function () {
                var testRating = -Number.MAX_VALUE;
                initStarRatingComponent(testRating.toString());
                var starData = getActiveStars(test.cmp.element);
                expect(starData.numStars).toBe(5);
                expect(starData.numActiveStars).toBe(0);
            });
            it('should be safe and render a 0 star rating if the rating field contains JS or HTML', function () {
                var xss = '<svg/onload=alert(document.domain)>';
                initStarRatingComponent(xss);
                var starData = getActiveStars(test.cmp.element);
                expect(starData.numStars).toBe(5);
                expect(starData.numActiveStars).toBe(0);
            });
        });
        describe('The label showing number of ratings', function () {
            it('should not display when no value is provided for number of ratings', function () {
                initStarRatingComponent((0).toString());
                var children = Dom_1.$$(test.cmp.element).findAll("." + STAR_LABEL_CSS_CLASS);
                expect(children.length).toBe(0);
            });
            it('should display a label with "No Ratings" shown when zero given', function () {
                var testNumRatings = 0;
                initStarRatingComponent((0).toString(), testNumRatings.toString());
                var testLabel = Dom_1.$$(test.cmp.element).find("." + STAR_LABEL_CSS_CLASS);
                expect(testLabel).toBeDefined();
                expect(testLabel.textContent).toEqual(Core_1.l('NoRatings'));
            });
            it('should display a label with "No Ratings" shown when a negative number is given', function () {
                var testNumRatings = -Number.MAX_VALUE;
                initStarRatingComponent((0).toString(), testNumRatings.toString());
                var testLabel = Dom_1.$$(test.cmp.element).find("." + STAR_LABEL_CSS_CLASS);
                expect(testLabel).toBeDefined();
                expect(testLabel.textContent).toEqual(Core_1.l('NoRatings'));
            });
            it('should display the number when they are provided', function () {
                var testNumRatings = Number.MAX_VALUE;
                initStarRatingComponent((0).toString(), testNumRatings.toString());
                var testLabel = Dom_1.$$(test.cmp.element).find("." + STAR_LABEL_CSS_CLASS);
                expect(testLabel).toBeDefined();
                expect(testLabel.textContent).toEqual("(" + testNumRatings + ")");
            });
            it('should be safe and render a "No Ratings" label if the number of rating field contains JS or HTML', function () {
                var xss = '<svg/onload=alert(document.domain)>';
                initStarRatingComponent('0', xss);
                var testLabel = Dom_1.$$(test.cmp.element).find("." + STAR_LABEL_CSS_CLASS);
                expect(testLabel).toBeDefined();
                expect(testLabel.textContent).toEqual(Core_1.l('NoRatings'));
            });
        });
        describe('the accessibility label', function () {
            var rating = 3;
            var scale = 5;
            function getLabel() {
                return test.cmp.element.getAttribute('aria-label');
            }
            describe('without a number of ratings', function () {
                beforeEach(function () {
                    initStarRatingComponent(rating.toString(), undefined, scale);
                });
                it('should have a label', function () {
                    expect(getLabel()).toBeTruthy();
                });
                it('should describe the rating and rating scale', function () {
                    expect(getLabel()).toContain(rating.toString());
                    expect(getLabel()).toContain(scale.toString());
                });
            });
            describe('with a number of ratings', function () {
                describe('above 0', function () {
                    var numberOfRatings = 9;
                    beforeEach(function () {
                        initStarRatingComponent(rating.toString(), numberOfRatings.toString(), scale);
                    });
                    it('should have a label', function () {
                        expect(getLabel()).toBeTruthy();
                    });
                    it('should describe the rating, rating scale and number of ratings', function () {
                        expect(getLabel()).toContain(rating.toString());
                        expect(getLabel()).toContain(scale.toString());
                        expect(getLabel()).toContain(numberOfRatings.toString());
                    });
                });
                describe('equal to 0', function () {
                    beforeEach(function () {
                        initStarRatingComponent(rating.toString(), '0', scale);
                    });
                    it('should have a label', function () {
                        expect(getLabel()).toBeTruthy();
                    });
                    it('should describe that there are no ratings', function () {
                        expect(getLabel()).not.toContain(rating.toString());
                        expect(getLabel()).not.toContain(scale.toString());
                    });
                });
            });
        });
        describe('When a different scale is provided', function () {
            it('should display five stars with a number of active stars equal to new proportions', function () {
                var newScale = 10;
                for (var i = 0; i <= newScale; i++) {
                    initStarRatingComponent(i.toString(), undefined, newScale);
                    var starData = getActiveStars(test.cmp.element);
                    expect(starData.numStars).toBe(5);
                    expect(starData.numActiveStars).toBe(Math.round(i / 2));
                }
            });
            it('should not display the component if the scale is smaller than the rating', function () {
                var newScale = 7;
                var rating = '10';
                initStarRatingComponent(rating, undefined, newScale);
                expect(test.cmp.element.children.length).toBe(0);
            });
            it('should not display the component if the scale is equal to zero', function () {
                var newScale = 0;
                var rating = '4';
                initStarRatingComponent(rating, undefined, newScale);
                expect(test.cmp.element.children.length).toBe(0);
            });
            it('should not display the component if the scale is smaller than zero', function () {
                var newScale = -Number.MAX_VALUE;
                var rating = '4';
                initStarRatingComponent(rating, undefined, newScale);
                expect(test.cmp.element.children.length).toBe(0);
            });
        });
    });
}
exports.StarRatingTest = StarRatingTest;
 
 
/***/ }),
/* 1822 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { Iif (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        Iif (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            Iif (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
            Iif (y = 0, t) op = [0, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    Eif (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        Iif (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
Object.defineProperty(exports, "__esModule", { value: true });
var ResultPreviewsManager_1 = __webpack_require__(805);
var MockEnvironment_1 = __webpack_require__(2);
var Dom_1 = __webpack_require__(0);
var ResultPreviewsManagerEvents_1 = __webpack_require__(198);
var underscore_1 = __webpack_require__(1);
function ResultPreviewsManagerTest() {
    describe('ResultPreviewsManager', function () {
        var _this = this;
        var previewClass = 'this-is-fine';
        var suggestionText = 'DVD';
        var previewsTexts = ['Fabric DVD pouch', '15 Blank CDs', 'CD/DVD drive'];
        var env;
        var resultPreviewsManager;
        function buildEnvironment() {
            return (env = new MockEnvironment_1.MockEnvironmentBuilder().build());
        }
        function buildSuggestionsListbox() {
            return env.element.appendChild(Dom_1.$$('div', { id: 'some-witty-joke', className: 'coveo-magicbox-suggestions' }).el);
        }
        function buildResultPreviewsManager() {
            buildEnvironment();
            resultPreviewsManager = new ResultPreviewsManager_1.ResultPreviewsManager(env.element, { previewClass: previewClass });
            buildSuggestionsListbox();
        }
        function createTestSuggestion() {
            return { dom: Dom_1.$$('div', {}, suggestionText).el, text: suggestionText };
        }
        function createPreviews() {
            return previewsTexts.map(function (text) {
                return ({
                    element: Dom_1.$$('div', {
                        className: previewClass
                    }, Dom_1.$$('div', {
                        className: 'CoveoResultLink'
                    }, text)).el
                });
            });
        }
        function bindPopulateEvent() {
            Dom_1.$$(env.root).on(ResultPreviewsManagerEvents_1.ResultPreviewsManagerEvents.populateSearchResultPreviews, function (_, args) {
                args.previewsQueries.push(Promise.resolve(createPreviews()));
            });
        }
        function displayPreviews() {
            return resultPreviewsManager.displaySearchResultPreviewsForSuggestion(createTestSuggestion());
        }
        function getAppendedPreviews() {
            return underscore_1.toArray(env.element.querySelectorAll("." + previewClass));
        }
        beforeEach(function (done) { return __awaiter(_this, void 0, void 0, function () {
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        buildResultPreviewsManager();
                        bindPopulateEvent();
                        return [4 /*yield*/, displayPreviews()];
                    case 1:
                        _a.sent();
                        done();
                        return [2 /*return*/];
                }
            });
        }); });
        it('appends previews received from the populate event', function (done) { return __awaiter(_this, void 0, void 0, function () {
            var appendedPreviews;
            return __generator(this, function (_a) {
                appendedPreviews = getAppendedPreviews();
                expect(appendedPreviews.length).toEqual(previewsTexts.length);
                done();
                return [2 /*return*/];
            });
        }); });
        describe('with accessibility', function () {
            it('builds the preview container with the appropriate roles', function (done) { return __awaiter(_this, void 0, void 0, function () {
                var previewResults;
                return __generator(this, function (_a) {
                    previewResults = env.element.querySelector('.coveo-preview-results');
                    expect(previewResults.getAttribute('role')).toEqual('listbox');
                    done();
                    return [2 /*return*/];
                });
            }); });
            it('sets the role of previews to "option"', function (done) { return __awaiter(_this, void 0, void 0, function () {
                var appendedPreviews;
                return __generator(this, function (_a) {
                    appendedPreviews = getAppendedPreviews();
                    appendedPreviews.forEach(function (preview) { return expect(preview.getAttribute('role')).toEqual('option'); });
                    done();
                    return [2 /*return*/];
                });
            }); });
            it('makes previews selectable', function (done) { return __awaiter(_this, void 0, void 0, function () {
                var appendedPreviews;
                return __generator(this, function (_a) {
                    appendedPreviews = getAppendedPreviews();
                    appendedPreviews.forEach(function (preview) { return expect(!!preview.getAttribute('aria-selected')).toBeTruthy(); });
                    done();
                    return [2 /*return*/];
                });
            }); });
            it('gives each preview a unique id', function (done) { return __awaiter(_this, void 0, void 0, function () {
                var appendedPreviews;
                return __generator(this, function (_a) {
                    appendedPreviews = getAppendedPreviews();
                    appendedPreviews.forEach(function (preview) {
                        expect(!!preview.id).toBeTruthy();
                        expect(env.root.querySelectorAll("#" + preview.id).length).toEqual(1);
                    });
                    done();
                    return [2 /*return*/];
                });
            }); });
        });
    });
}
exports.ResultPreviewsManagerTest = ResultPreviewsManagerTest;
 
 
/***/ }),
/* 1823 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __assign = (this && this.__assign) || Object.assign || function(t) {
    for (var s, i = 1, n = arguments.length; i < n; i++) {
        s = arguments[i];
        for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
            t[p] = s[p];
    }
    return t;
};
Object.defineProperty(exports, "__esModule", { value: true });
var CommerceQuery_1 = __webpack_require__(860);
var Mock = __webpack_require__(2);
var Simulate_1 = __webpack_require__(15);
var Core_1 = __webpack_require__(9);
var AnalyticsActionListMeta_1 = __webpack_require__(7);
function CommerceQueryTest() {
    describe('CommerceQuery', function () {
        var test;
        describe('with a listing value', function () {
            beforeEach(function () {
                test = Mock.optionsComponentSetup(CommerceQuery_1.CommerceQuery, {
                    listing: 'foobar'
                });
            });
            it('should update tab in query builder to the listing option', function () {
                var simulation = Simulate_1.Simulate.query(test.env);
                expect(simulation.queryBuilder.build().tab).toBe(test.cmp.options.listing);
            });
            it('should add a context value with the listing option', function () {
                var simulation = Simulate_1.Simulate.query(test.env);
                expect(simulation.queryBuilder.build().context['listing']).toEqual(test.cmp.options.listing);
            });
            it('should update the tab in query suggest to the listing option', function () {
                var simulation = Simulate_1.Simulate.querySuggest(test.env, 'abc');
                expect(simulation.buildingQuerySuggestArgs.payload.tab).toEqual(test.cmp.options.listing);
            });
            it('should add a context value to query suggest with the listing option', function () {
                var simulation = Simulate_1.Simulate.querySuggest(test.env, 'abc');
                expect(simulation.buildingQuerySuggestArgs.payload.context['listing']).toEqual(test.cmp.options.listing);
            });
            it('should unset tab after resetting the listing value', function () {
                test.cmp.options.listing = null;
                var simulation = Simulate_1.Simulate.query(test.env);
                expect(simulation.queryBuilder.build().tab).toBeFalsy();
            });
            it('should unset the context after reset listing to null', function () {
                test.cmp.options.listing = null;
                var simulation = Simulate_1.Simulate.query(test.env);
                expect(simulation.queryBuilder.build().context).toBeFalsy();
            });
            describe('analytics behaviour', function () {
                var originalAnalyticsDataObject = {
                    language: 'en',
                    originLevel1: 'default',
                    originLevel2: 'All',
                    originLevel3: 'localhost:8080',
                    metaObject: {}
                };
                function buildEventArgs() {
                    return __assign({ type: 'SearchEvent', actionType: AnalyticsActionListMeta_1.analyticsActionCauseList.interfaceLoad.type, actionCause: AnalyticsActionListMeta_1.analyticsActionCauseList.interfaceLoad.name }, originalAnalyticsDataObject);
                }
                it('should update analytics originlevel2 to the listing value', function () {
                    var args = buildEventArgs();
                    Core_1.$$(test.env.root).trigger(Core_1.AnalyticsEvents.changeAnalyticsCustomData, args);
                    expect(args['originLevel2']).toBe(test.cmp.options.listing);
                });
                it('should leave originlevel2 untouched after reset listing to null', function () {
                    var args = buildEventArgs();
                    test.cmp.options.listing = null;
                    Core_1.$$(test.env.root).trigger(Core_1.AnalyticsEvents.changeAnalyticsCustomData, args);
                    expect(args['originLevel2']).toBe(originalAnalyticsDataObject.originLevel2);
                });
            });
        });
    });
}
exports.CommerceQueryTest = CommerceQueryTest;
 
 
/***/ }),
/* 1824 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { Iif (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        Iif (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            Iif (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
            Iif (y = 0, t) op = [0, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    Eif (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        Iif (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
Object.defineProperty(exports, "__esModule", { value: true });
var Dom_1 = __webpack_require__(0);
var FocusTrap_1 = __webpack_require__(325);
var Core_1 = __webpack_require__(9);
function FocusTrapTest() {
    var _this = this;
    describe('FocusTrap', function () {
        function mockFocusInEvent(oldElement, newElement) {
            return {
                type: 'focusin',
                target: newElement,
                relatedTarget: oldElement
            };
        }
        function mockFocusOutEvent(oldElement, newElement) {
            return {
                type: 'focusout',
                target: oldElement,
                relatedTarget: newElement
            };
        }
        function addSpy(element) {
            spyOn(element.el, 'focus').and.callFake(function () {
                focusTrap['onFocusIn'](mockFocusInEvent(currentlyActiveElement, element.el));
                if (currentlyActiveElement) {
                    focusTrap['onFocusOut'](mockFocusOutEvent(currentlyActiveElement, element.el));
                }
                currentlyActiveElement = element.el;
            });
        }
        function buildTabIndexDiv(id) {
            var element = Dom_1.$$('div', { id: id });
            element.el.tabIndex = 0;
            addSpy(element);
            return element;
        }
        function buildButton(id) {
            var element = Dom_1.$$('button', { id: id });
            addSpy(element);
            return element;
        }
        function buildEnvironment() {
            rootContainer = Dom_1.$$('div', {}, (firstOuterFocusableElement = buildButton('out-first')), (trapContainer = Dom_1.$$.apply(void 0, ['div',
                {}].concat((trappedFocusableElements = [buildTabIndexDiv('in-first'), buildButton('in-second'), buildTabIndexDiv('in-third')])))), (lastOuterFocusableElement = buildTabIndexDiv('out-last')));
        }
        function expectSelection(actual) {
            return new Promise(function (resolve) {
                Core_1.Defer.defer(function () {
                    var actualElement = actual instanceof Dom_1.Dom ? actual.el : actual;
                    expect(actualElement.focus).toHaveBeenCalledTimes(1);
                    expect(currentlyActiveElement.id).toBe(actualElement.id);
                    resolve();
                });
            });
        }
        var rootContainer;
        var firstOuterFocusableElement;
        var lastOuterFocusableElement;
        var trapContainer;
        var trappedFocusableElements;
        var focusTrap;
        var currentlyActiveElement;
        beforeEach(function () {
            buildEnvironment();
            document.body.appendChild(rootContainer.el);
            focusTrap = new FocusTrap_1.FocusTrap(trapContainer.el);
            currentlyActiveElement = null;
        });
        afterEach(function () {
            rootContainer.remove();
            focusTrap.disable();
        });
        it('sets aria-hidden on every sibling', function () {
            expect(rootContainer.findAll('[aria-hidden="true"]')).toEqual([firstOuterFocusableElement.el, lastOuterFocusableElement.el]);
        });
        describe('when initially focusing an element outside the container', function () {
            it('selects the first element in the trapped container if the focused element is before the trapped container', function (done) { return __awaiter(_this, void 0, void 0, function () {
                return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0:
                            firstOuterFocusableElement.el.focus();
                            return [4 /*yield*/, expectSelection(trappedFocusableElements[0])];
                        case 1:
                            _a.sent();
                            done();
                            return [2 /*return*/];
                    }
                });
            }); });
            it('selects the first element in the trapped container if the focused element is after the trapped container', function (done) { return __awaiter(_this, void 0, void 0, function () {
                return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0:
                            lastOuterFocusableElement.el.focus();
                            return [4 /*yield*/, expectSelection(trappedFocusableElements[0])];
                        case 1:
                            _a.sent();
                            done();
                            return [2 /*return*/];
                    }
                });
            }); });
        });
        describe('when initially focusing the first element', function () {
            beforeEach(function () {
                trappedFocusableElements[0].el.focus();
            });
            it('allows the next element to be focused', function (done) { return __awaiter(_this, void 0, void 0, function () {
                return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0:
                            trappedFocusableElements[1].el.focus();
                            return [4 /*yield*/, expectSelection(trappedFocusableElements[1])];
                        case 1:
                            _a.sent();
                            done();
                            return [2 /*return*/];
                    }
                });
            }); });
            it('focuses the next element if an element after the trapped container is focused', function (done) { return __awaiter(_this, void 0, void 0, function () {
                return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0:
                            lastOuterFocusableElement.el.focus();
                            return [4 /*yield*/, expectSelection(trappedFocusableElements[1])];
                        case 1:
                            _a.sent();
                            done();
                            return [2 /*return*/];
                    }
                });
            }); });
            it('wraps the selection if an element before the trapped container is focused', function (done) { return __awaiter(_this, void 0, void 0, function () {
                return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0:
                            firstOuterFocusableElement.el.focus();
                            return [4 /*yield*/, expectSelection(trappedFocusableElements[2])];
                        case 1:
                            _a.sent();
                            done();
                            return [2 /*return*/];
                    }
                });
            }); });
        });
        describe('when initially focusing the last element', function () {
            beforeEach(function () {
                trappedFocusableElements[2].el.focus();
            });
            it('allows the previous element to be focused', function (done) { return __awaiter(_this, void 0, void 0, function () {
                return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0:
                            trappedFocusableElements[1].el.focus();
                            return [4 /*yield*/, expectSelection(trappedFocusableElements[1])];
                        case 1:
                            _a.sent();
                            done();
                            return [2 /*return*/];
                    }
                });
            }); });
            it('focuses the previous element if an element before the trapped container is focused', function (done) { return __awaiter(_this, void 0, void 0, function () {
                return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0:
                            firstOuterFocusableElement.el.focus();
                            return [4 /*yield*/, expectSelection(trappedFocusableElements[1])];
                        case 1:
                            _a.sent();
                            done();
                            return [2 /*return*/];
                    }
                });
            }); });
            it('wraps the selection if an element after the trapped container is focused', function (done) { return __awaiter(_this, void 0, void 0, function () {
                return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0:
                            lastOuterFocusableElement.el.focus();
                            return [4 /*yield*/, expectSelection(trappedFocusableElements[0])];
                        case 1:
                            _a.sent();
                            done();
                            return [2 /*return*/];
                    }
                });
            }); });
        });
        describe('when disabled', function () {
            beforeEach(function () {
                focusTrap.disable();
            });
            it('should not prevent selection outside the trapped container', function (done) { return __awaiter(_this, void 0, void 0, function () {
                return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0:
                            firstOuterFocusableElement.el.focus();
                            return [4 /*yield*/, expectSelection(firstOuterFocusableElement)];
                        case 1:
                            _a.sent();
                            lastOuterFocusableElement.el.focus();
                            return [4 /*yield*/, expectSelection(lastOuterFocusableElement)];
                        case 2:
                            _a.sent();
                            done();
                            return [2 /*return*/];
                    }
                });
            }); });
            it('removes aria-hidden from every element', function () {
                expect(rootContainer.findAll('[aria-hidden]').length).toEqual(0);
            });
        });
    });
}
exports.FocusTrapTest = FocusTrapTest;
 
 
/***/ }),
/* 1825 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var AccessibleModal_1 = __webpack_require__(144);
var Dom_1 = __webpack_require__(0);
var Simulate_1 = __webpack_require__(15);
var KeyboardUtils_1 = __webpack_require__(35);
function AccessibleModalTest() {
    describe('AccessibleModal', function () {
        var bodyElement;
        var titleElement;
        var contentElement;
        var modalBoxMock;
        var accessibleModal;
        var validationSpy;
        var modalClass = 'notice-me';
        function createBody() {
            return (bodyElement = Dom_1.$$('div').el);
        }
        function createAccessibleModal(options) {
            if (options === void 0) { options = {}; }
            return (accessibleModal = new AccessibleModal_1.AccessibleModal(modalClass, createBody(), (modalBoxMock = Simulate_1.Simulate.modalBoxModule()), options));
        }
        function createTitle() {
            return (titleElement = Dom_1.$$('div').el);
        }
        function createContent() {
            return (contentElement = Dom_1.$$('div').el);
        }
        function createValidationSpy() {
            (validationSpy = jasmine.createSpy('validation')).and.returnValue(true);
            return validationSpy;
        }
        describe('when calling open', function () {
            var focusTrap;
            var container;
            var closeButton;
            var closeButtonClickSpy;
            var origin;
            function createOrigin() {
                origin = Dom_1.$$('button', {}, 'test').el;
                spyOn(origin, 'focus');
                document.body.appendChild(origin);
                return origin;
            }
            beforeEach(function () {
                createAccessibleModal();
                accessibleModal.open({
                    title: createTitle(),
                    content: createContent(),
                    validation: createValidationSpy(),
                    origin: createOrigin()
                });
                focusTrap = accessibleModal['focusTrap'];
                container = accessibleModal.element;
                closeButton = container.querySelector('.coveo-small-close');
                closeButtonClickSpy = spyOn(closeButton, 'click');
            });
            afterEach(function () {
                origin.remove();
            });
            it('has an element', function () {
                expect(accessibleModal.element).toBeTruthy();
            });
            it('has a wrapper', function () {
                expect(accessibleModal.wrapper).toBeTruthy();
            });
            it('has content', function () {
                expect(accessibleModal.content).toBeTruthy();
            });
            it("calls ModalBox's open", function () {
                expect(modalBoxMock.open).toHaveBeenCalledTimes(1);
            });
            it("doesn't call the validation function", function () {
                expect(validationSpy).not.toHaveBeenCalled();
            });
            it('creates a focus trap', function () {
                expect(focusTrap).not.toBeNull();
            });
            it("doesn't disable its focus trap", function () {
                expect(focusTrap['enabled']).toEqual(true);
            });
            it('sets aria-modal to true on the modal element', function () {
                expect(container.getAttribute('aria-modal')).toEqual('true');
            });
            it('gives the close button a label', function () {
                expect(closeButton.getAttribute('aria-label')).toBeTruthy();
            });
            it('gives the close button a role', function () {
                expect(closeButton.getAttribute('role')).toEqual('button');
            });
            it('gives the close button a tabindex', function () {
                expect(closeButton.tabIndex).toEqual(0);
            });
            it('focuses on the close button', function () {
                expect(closeButton.focus).toHaveBeenCalledTimes(1);
            });
            it('clicks on the close button when enter is pressed', function () {
                Simulate_1.Simulate.keyUp(closeButton, KeyboardUtils_1.KEYBOARD.ENTER);
                expect(closeButtonClickSpy).toHaveBeenCalledTimes(1);
            });
            describe('then calling close', function () {
                beforeEach(function () {
                    accessibleModal.close();
                });
                it('resets the focus to its origin', function () {
                    expect(origin.focus).toHaveBeenCalledTimes(1);
                });
                it("doesn't have an element", function () {
                    expect(accessibleModal.element).toBeNull();
                });
                it("doesn't have a wrapper", function () {
                    expect(accessibleModal.wrapper).toBeNull();
                });
                it("doesn't have content", function () {
                    expect(accessibleModal.content).toBeNull();
                });
                it("calls ModalBox's close", function () {
                    expect(modalBoxMock.close).toHaveBeenCalledTimes(1);
                });
                it('calls the validation function', function () {
                    expect(validationSpy).toHaveBeenCalledTimes(1);
                });
                it('disables the focus trap', function () {
                    expect(focusTrap['enabled']).toEqual(false);
                });
            });
        });
        it("when defining the focusOnOpen option & opening the modal\n    it should not focus on the close button but on the defined element", function () {
            var focusTarget = document.createElement('div');
            spyOn(focusTarget, 'focus');
            createAccessibleModal({ focusOnOpen: function () { return focusTarget; } });
            accessibleModal.open({
                title: createTitle(),
                content: createContent(),
                validation: createValidationSpy(),
                origin: document.createElement('div')
            });
            var closeButton = accessibleModal.element.querySelector('.coveo-small-close');
            expect(closeButton.focus).not.toHaveBeenCalled();
            expect(focusTarget.focus).toHaveBeenCalledTimes(1);
        });
    });
}
exports.AccessibleModalTest = AccessibleModalTest;
 
 
/***/ }),
/* 1826 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var QueryEvents_1 = __webpack_require__(14);
var QueryStateModel_1 = __webpack_require__(17);
var SortDropdown_1 = __webpack_require__(861);
var Sort_1 = __webpack_require__(271);
var Dom_1 = __webpack_require__(0);
var Mock = __webpack_require__(2);
var Simulate_1 = __webpack_require__(15);
function SortDropdownTest() {
    describe('SortDropdown', function () {
        var sorts;
        var test;
        function createFakeSort(sortCriteria, caption) {
            var container = Dom_1.$$('div', {
                'data-sort-criteria': sortCriteria,
                'data-caption': caption
            });
            return Mock.advancedComponentSetup(Sort_1.Sort, {
                element: container.el
            });
        }
        function initializeSorts() {
            sorts = [createFakeSort('date ascending', 'Newest').cmp, createFakeSort('relevancy', 'Relevancy').cmp];
        }
        function initializeSortDropdown() {
            test = Mock.advancedComponentSetup(SortDropdown_1.SortDropdown, {
                cmpOptions: {},
                modifyBuilder: function (builder) {
                    sorts.forEach(function (sort) { return builder.element.appendChild(sort.element); });
                    return builder.withLiveQueryStateModel();
                }
            });
        }
        function triggerAfterComponentsInitialization() {
            sorts.forEach(function (sort) {
                Simulate_1.Simulate.initialization(sort.getBindings());
            });
            Simulate_1.Simulate.initialization(test.env);
        }
        function triggerQuerySuccessWithResults(results) {
            Dom_1.$$(test.env.root).trigger(QueryEvents_1.QueryEvents.querySuccess, {
                results: {
                    results: results
                }
            });
        }
        function findSelect() {
            return Dom_1.$$(test.cmp.element).find('select');
        }
        beforeEach(function () {
            initializeSorts();
            initializeSortDropdown();
            triggerAfterComponentsInitialization();
        });
        afterEach(function () {
            test = null;
            sorts = [];
        });
        it('should create a select element after initialization', function () {
            expect(Dom_1.$$(test.cmp.element).find('select')).toBeTruthy();
        });
        it('should create same number of select options when all sort components are valid, ', function () {
            expect(Dom_1.$$(test.cmp.element).findAll('select > option').length).toEqual(sorts.length);
        });
        it('should not create an option if the sort criteria is a toggle and warn the user', function () {
            sorts.push(createFakeSort('@date ascending,@date descending', 'foobar').cmp);
            initializeSortDropdown();
            spyOn(test.cmp.logger, 'warn');
            triggerAfterComponentsInitialization();
            expect(Dom_1.$$(test.cmp.element).findAll('select > option').length).toEqual(sorts.length - 1);
            expect(test.cmp.logger.warn).toHaveBeenCalled();
        });
        it('should be visible when there are results', function () {
            triggerQuerySuccessWithResults([{}, {}]);
            expect(Dom_1.$$(test.cmp.element).isVisible()).toBe(true);
        });
        it('should not be visible when there are no results', function () {
            triggerQuerySuccessWithResults([]);
            expect(Dom_1.$$(test.cmp.element).isVisible()).toBe(false);
        });
        it('should not be visible when there is a query error', function () {
            Dom_1.$$(test.env.root).trigger(QueryEvents_1.QueryEvents.queryError);
            expect(Dom_1.$$(test.cmp.element).isVisible()).toBe(false);
        });
        it('should update the select element when the query state changes', function () {
            var selectElement = findSelect();
            test.env.queryStateModel.set(QueryStateModel_1.QUERY_STATE_ATTRIBUTES.SORT, 'relevancy');
            expect(selectElement.value).toEqual('relevancy');
            test.env.queryStateModel.set(QueryStateModel_1.QUERY_STATE_ATTRIBUTES.SORT, 'date ascending');
            expect(selectElement.value).toEqual('date ascending');
        });
        it('should add a selected class if an option is active', function () {
            test.env.queryStateModel.set(QueryStateModel_1.QUERY_STATE_ATTRIBUTES.SORT, 'relevancy');
            expect(Dom_1.$$(findSelect()).hasClass('coveo-selected')).toBe(true);
        });
        it('should not add a selected class if an option does not exist', function () {
            test.env.queryStateModel.set(QueryStateModel_1.QUERY_STATE_ATTRIBUTES.SORT, '@fieldy');
            expect(Dom_1.$$(findSelect()).hasClass('coveo-selected')).toBe(false);
        });
        it('should change the value of the element on select', function () {
            var selectElement = findSelect();
            test.cmp.select('relevancy', true);
            expect(selectElement.value).toBe('relevancy');
        });
        it('should not change the value of the element if an option doesnt exist select', function () {
            var selectElement = findSelect();
            var prevValue = selectElement.value;
            test.cmp.select('@aField', true);
            expect(selectElement.value).toBe(prevValue);
        });
        it("when adding tab attributes\n    should remove them", function () {
            test = Mock.advancedComponentSetup(SortDropdown_1.SortDropdown, {
                cmpOptions: {},
                modifyBuilder: function (builder) {
                    builder.element.setAttribute('data-tab', 'allo');
                    builder.element.setAttribute('data-tab-not', 'bye');
                    return builder.withLiveQueryStateModel();
                }
            });
            expect(test.cmp.element.hasAttribute('data-tab')).toBe(false);
            expect(test.cmp.element.hasAttribute('data-tab-not')).toBe(false);
        });
        it("when disabling a Sort component\n      should hide it's corresponding option", function () {
            sorts[0].disable();
            triggerQuerySuccessWithResults([{}, {}]);
            var disabledSort = Dom_1.$$(test.cmp.element).find("option[value=\"" + sorts[0].options.sortCriteria + "\"]");
            expect(disabledSort).toBeFalsy();
        });
        it("when re-enabling a Sort component\n      should show it's corresponding option", function () {
            sorts[0].disable();
            sorts[0].enable();
            triggerQuerySuccessWithResults([{}, {}]);
            var enabledSort = Dom_1.$$(test.cmp.element).find("option[value=\"" + sorts[0].options.sortCriteria + "\"]");
            expect(enabledSort).toBeTruthy();
        });
        it("when all children Sort components are disabled\n      should hide the parent SortDropdown", function () {
            sorts.forEach(function (sort) { return sort.disable(); });
            triggerQuerySuccessWithResults([{}, {}]);
            expect(Dom_1.$$(test.cmp.element).isVisible()).toBe(false);
        });
        it("when all children Sort components are disabled then enabled\n      should show the parent SortDropdown", function () {
            sorts.forEach(function (sort) { return sort.disable(); });
            triggerQuerySuccessWithResults([{}, {}]);
            sorts[0].enable();
            triggerQuerySuccessWithResults([{}, {}]);
            expect(Dom_1.$$(test.cmp.element).isVisible()).toBe(true);
        });
    });
}
exports.SortDropdownTest = SortDropdownTest;
 
 
/***/ }),
/* 1827 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var ResultLayoutSelector_1 = __webpack_require__(200);
var Mock = __webpack_require__(2);
var Dom_1 = __webpack_require__(0);
var ResultLayoutEvents_1 = __webpack_require__(132);
var InitializationEvents_1 = __webpack_require__(22);
function ResultLayoutSelectorTest() {
    describe('ResultLayoutSelector', function () {
        var test;
        function handleLayoutsPopulation(rootElement) {
            Dom_1.$$(rootElement).on(ResultLayoutEvents_1.ResultLayoutEvents.populateResultLayout, function (e, args) {
                (_a = args.layouts).push.apply(_a, ResultLayoutSelector_1.ResultLayoutSelector.validLayouts);
                var _a;
            });
        }
        function triggerRootEvent(event) {
            Dom_1.$$(test.env.root).trigger(event);
        }
        function buildResultLayoutSelector(activeLayout, options) {
            if (options === void 0) { options = {}; }
            test = Mock.advancedComponentSetup(ResultLayoutSelector_1.ResultLayoutSelector, {
                modifyBuilder: function (builder) {
                    handleLayoutsPopulation(builder.root);
                    builder.queryStateModel.get.and.returnValue(activeLayout);
                    return builder;
                },
                cmpOptions: options
            });
            triggerRootEvent(InitializationEvents_1.InitializationEvents.afterComponentsInitialization);
            triggerRootEvent(InitializationEvents_1.InitializationEvents.afterInitialization);
        }
        function getLayoutButton(layout) {
            return test.cmp['currentActiveLayouts'][layout].button.el;
        }
        it('when the screen is large, activeLayouts returns the desktop layouts', function () {
            buildResultLayoutSelector('list', { desktopLayouts: ['table'] });
            test.cmp.searchInterface.responsiveComponents.isSmallScreenWidth = function () { return false; };
            test.cmp.searchInterface.responsiveComponents.isMediumScreenWidth = function () { return false; };
            test.cmp.searchInterface.responsiveComponents.isLargeScreenWidth = function () { return true; };
            var layouts = Object.keys(test.cmp.activeLayouts);
            expect(layouts.length).toBe(1);
            expect(layouts[0]).toBe('table');
        });
        it('when the screen is medium, activeLayouts returns the tablets layouts', function () {
            buildResultLayoutSelector('list', { tabletLayouts: ['table'] });
            test.cmp.searchInterface.responsiveComponents.isSmallScreenWidth = function () { return false; };
            test.cmp.searchInterface.responsiveComponents.isMediumScreenWidth = function () { return true; };
            test.cmp.searchInterface.responsiveComponents.isLargeScreenWidth = function () { return false; };
            var layouts = Object.keys(test.cmp.activeLayouts);
            expect(layouts.length).toBe(1);
            expect(layouts[0]).toBe('table');
        });
        it('when the screen is small, activeLayouts returns the mobile layouts', function () {
            buildResultLayoutSelector('list', { mobileLayouts: ['table'] });
            test.cmp.searchInterface.responsiveComponents.isSmallScreenWidth = function () { return true; };
            test.cmp.searchInterface.responsiveComponents.isMediumScreenWidth = function () { return false; };
            test.cmp.searchInterface.responsiveComponents.isLargeScreenWidth = function () { return false; };
            var layouts = Object.keys(test.cmp.activeLayouts);
            expect(layouts.length).toBe(1);
            expect(layouts[0]).toBe('table');
        });
        it('if the list layout is selected, should give the pressed state to the list button', function () {
            buildResultLayoutSelector('list');
            expect(getLayoutButton('list').getAttribute('aria-pressed')).toEqual('true');
        });
        it("if the card layout is selected, shouldn't give the pressed state to the list button", function () {
            buildResultLayoutSelector('card');
            expect(getLayoutButton('list').getAttribute('aria-pressed')).toEqual('false');
        });
        it("when the current layout is disabled and then renabled (e.g. due to resizing the screen smaller then larger),\n    the original layout is restored", function () {
            buildResultLayoutSelector('list');
            test.cmp.disableLayouts(['list']);
            test.cmp.enableLayouts(['list']);
            expect(test.cmp.currentLayout).toBe('list');
        });
        it("when the current layout is disabled, changed, and then renabled, the original layout is not restored", function () {
            buildResultLayoutSelector('list');
            test.cmp.disableLayouts(['list']);
            test.cmp.changeLayout('card');
            test.cmp.enableLayouts(['list']);
            expect(test.cmp.currentLayout).toBe('card');
        });
    });
}
exports.ResultLayoutSelectorTest = ResultLayoutSelectorTest;
 
 
/***/ }),
/* 1828 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var DynamicHierarchicalFacet_1 = __webpack_require__(405);
var MockEnvironment_1 = __webpack_require__(2);
var DynamicHierarchicalFacetSearchValueRenderer_1 = __webpack_require__(857);
var DynamicHierarchicalFacetSearchValue_1 = __webpack_require__(856);
var Strings_1 = __webpack_require__(4);
var Dom_1 = __webpack_require__(0);
var TestUtils_1 = __webpack_require__(158);
function setProperties(obj, properties) {
    Object.keys(properties).forEach(function (key) { return (obj[key] = properties[key]); });
    return obj;
}
function DynamicHierarchicalFacetSearchValueRendererTest() {
    describe('DynamicHierarchicalFacetSearchValueRenderer', function () {
        var facetValue;
        var facet;
        var renderer;
        function initializeFacet() {
            facet = MockEnvironment_1.mockComponent(DynamicHierarchicalFacet_1.DynamicHierarchicalFacet);
            facet.options = {
                field: '@title',
                clearLabel: 'begone'
            };
            return facet;
        }
        function initializeFacetValue(parents) {
            Iif (parents === void 0) { parents = []; }
            return setProperties((facetValue = MockEnvironment_1.mock(DynamicHierarchicalFacetSearchValue_1.DynamicHierarchicalFacetSearchValue)), {
                displayValue: 'A B C',
                numberOfResults: 1337,
                fullPath: parents.concat(['abc'])
            });
        }
        function initializeRenderer(parents) {
            if (parents === void 0) { parents = []; }
            return (renderer = new DynamicHierarchicalFacetSearchValueRenderer_1.DynamicHierarchicalFacetSearchValueRenderer(initializeFacetValue(parents), initializeFacet()));
        }
        function getFacetValueLabel() {
            var resultCount = Strings_1.l('ResultCount', facetValue.numberOfResults, facetValue.numberOfResults);
            return facetValue.displayValue + " " + resultCount;
        }
        describe('without any parent', function () {
            beforeEach(function () {
                initializeRenderer();
            });
            describe('when selected', function () {
                beforeEach(function () {
                    renderer.selectAction();
                });
                it('calls facet.selectPath with the full path', function () {
                    expect(facet.selectPath).toHaveBeenCalledTimes(1);
                    expect(facet.selectPath).toHaveBeenCalledWith(facetValue.fullPath);
                });
                it('calls facet.enableFreezeFacetOrderFlag', function () {
                    expect(facet.enableFreezeFacetOrderFlag).toHaveBeenCalledTimes(1);
                });
                it('calls facet.enablePreventAutoSelectionFlag', function () {
                    expect(facet.enablePreventAutoSelectionFlag).toHaveBeenCalledTimes(1);
                });
                it('calls facet.scrollToTop', function () {
                    expect(facet.scrollToTop).toHaveBeenCalledTimes(1);
                });
                it('calls facet.triggerNewQuery with a function that calls facetValue.logSelectActionToAnalytics', function () {
                    expect(facet.triggerNewQuery).toHaveBeenCalledTimes(1);
                    var logAnalytics = facet.triggerNewQuery.calls.mostRecent().args[0];
                    expect(logAnalytics).toBeTruthy();
                    expect(facetValue.logSelectActionToAnalytics).not.toHaveBeenCalled();
                    logAnalytics();
                    expect(facetValue.logSelectActionToAnalytics).toHaveBeenCalledTimes(1);
                });
            });
            describe('when rendered', function () {
                var render;
                beforeEach(function () {
                    render = renderer.render();
                });
                it('should have an accessible label', function () {
                    var expectedLabel = Strings_1.l('HierarchicalFacetValueIndentedUnder', getFacetValueLabel(), Strings_1.l('AllCategories'));
                    expect(render.getAttribute('aria-label')).toEqual(expectedLabel);
                });
                it('should render a value containing a header and a path', function () {
                    expect(render.classList).toContain(DynamicHierarchicalFacetSearchValueRenderer_1.DynamicHierarchicalFacetSearchValueRendererClassNames.VALUE_CLASSNAME);
                    TestUtils_1.expectChildren(render, [DynamicHierarchicalFacetSearchValueRenderer_1.DynamicHierarchicalFacetSearchValueRendererClassNames.HEADER_CLASSNAME, DynamicHierarchicalFacetSearchValueRenderer_1.DynamicHierarchicalFacetSearchValueRendererClassNames.PATH_CLASSNAME]);
                });
                it('should render a header containing a label and a count', function () {
                    var header = Dom_1.$$(render).findClass(DynamicHierarchicalFacetSearchValueRenderer_1.DynamicHierarchicalFacetSearchValueRendererClassNames.HEADER_CLASSNAME)[0];
                    expect(header.tagName).toEqual('HEADER');
                    expect(header.getAttribute('aria-hidden')).toEqual('true');
                    TestUtils_1.expectChildren(header, [DynamicHierarchicalFacetSearchValueRenderer_1.DynamicHierarchicalFacetSearchValueRendererClassNames.LABEL_CLASSNAME, DynamicHierarchicalFacetSearchValueRenderer_1.DynamicHierarchicalFacetSearchValueRendererClassNames.COUNT_CLASSNAME]);
                });
                it('should render the displayValue', function () {
                    var label = Dom_1.$$(render).findClass(DynamicHierarchicalFacetSearchValueRenderer_1.DynamicHierarchicalFacetSearchValueRendererClassNames.LABEL_CLASSNAME)[0];
                    expect(label.innerText).toEqual(facetValue.displayValue);
                });
                it('should render the right count', function () {
                    var count = Dom_1.$$(render).findClass(DynamicHierarchicalFacetSearchValueRenderer_1.DynamicHierarchicalFacetSearchValueRendererClassNames.COUNT_CLASSNAME)[0];
                    expect(count.innerText).toEqual("(" + facetValue.numberOfResults + ")");
                });
                it('should render a path containing only the prefix and the clearLabel', function () {
                    var path = Dom_1.$$(render).findClass(DynamicHierarchicalFacetSearchValueRenderer_1.DynamicHierarchicalFacetSearchValueRendererClassNames.PATH_CLASSNAME)[0];
                    expect(path.getAttribute('aria-hidden')).toEqual('true');
                    var _a = TestUtils_1.expectChildren(path, [DynamicHierarchicalFacetSearchValueRenderer_1.DynamicHierarchicalFacetSearchValueRendererClassNames.PATH_PREFIX_CLASSNAME, DynamicHierarchicalFacetSearchValueRenderer_1.DynamicHierarchicalFacetSearchValueRendererClassNames.PATH_PART_CLASSNAME]), part = _a[1];
                    expect(part.innerText).toEqual(Strings_1.l('AllCategories'));
                });
            });
        });
        describe('rendered with one parent', function () {
            var render;
            var parentValue = 'stuff';
            beforeEach(function () {
                initializeRenderer([parentValue]);
                render = renderer.render();
            });
            it('should show the parent value in the label', function () {
                var expectedLabel = Strings_1.l('HierarchicalFacetValueIndentedUnder', getFacetValueLabel(), parentValue);
                expect(render.getAttribute('aria-label')).toEqual(expectedLabel);
            });
            it('should render a path containing only the prefix and the parent', function () {
                var path = Dom_1.$$(render).findClass(DynamicHierarchicalFacetSearchValueRenderer_1.DynamicHierarchicalFacetSearchValueRendererClassNames.PATH_CLASSNAME)[0];
                var _a = TestUtils_1.expectChildren(path, [DynamicHierarchicalFacetSearchValueRenderer_1.DynamicHierarchicalFacetSearchValueRendererClassNames.PATH_PREFIX_CLASSNAME, DynamicHierarchicalFacetSearchValueRenderer_1.DynamicHierarchicalFacetSearchValueRendererClassNames.PATH_PART_CLASSNAME]), part = _a[1];
                expect(part.innerText).toEqual(parentValue);
            });
        });
        describe('rendered with three parents', function () {
            var render;
            var parentValues = ['i', 'like', 'trains'];
            beforeEach(function () {
                initializeRenderer(parentValues);
                render = renderer.render();
            });
            it('should show every parent value in the label', function () {
                var expectedLabel = Strings_1.l('HierarchicalFacetValueIndentedUnder', getFacetValueLabel(), parentValues.join(', '));
                expect(render.getAttribute('aria-label')).toEqual(expectedLabel);
            });
            it('should render a path containing three parents, two separators and no ellipse', function () {
                var path = Dom_1.$$(render).findClass(DynamicHierarchicalFacetSearchValueRenderer_1.DynamicHierarchicalFacetSearchValueRendererClassNames.PATH_CLASSNAME)[0];
                var _a = TestUtils_1.expectChildren(path, [
                    DynamicHierarchicalFacetSearchValueRenderer_1.DynamicHierarchicalFacetSearchValueRendererClassNames.PATH_PREFIX_CLASSNAME,
                    DynamicHierarchicalFacetSearchValueRenderer_1.DynamicHierarchicalFacetSearchValueRendererClassNames.PATH_PART_CLASSNAME,
                    DynamicHierarchicalFacetSearchValueRenderer_1.DynamicHierarchicalFacetSearchValueRendererClassNames.PATH_SEPARATOR_CLASSNAME,
                    DynamicHierarchicalFacetSearchValueRenderer_1.DynamicHierarchicalFacetSearchValueRendererClassNames.PATH_PART_CLASSNAME,
                    DynamicHierarchicalFacetSearchValueRenderer_1.DynamicHierarchicalFacetSearchValueRendererClassNames.PATH_SEPARATOR_CLASSNAME,
                    DynamicHierarchicalFacetSearchValueRenderer_1.DynamicHierarchicalFacetSearchValueRendererClassNames.PATH_PART_CLASSNAME
                ]), parent0 = _a[1] /* separator */, parent1 = _a[3] /* separator */, parent2 = _a[5];
                expect(parent0.innerText).toEqual(parentValues[0]);
                expect(parent1.innerText).toEqual(parentValues[1]);
                expect(parent2.innerText).toEqual(parentValues[2]);
            });
            it('should give separators the separator role', function () {
                var path = Dom_1.$$(render).findClass(DynamicHierarchicalFacetSearchValueRenderer_1.DynamicHierarchicalFacetSearchValueRendererClassNames.PATH_CLASSNAME)[0];
                var _a = TestUtils_1.expectChildren(path, [
                    DynamicHierarchicalFacetSearchValueRenderer_1.DynamicHierarchicalFacetSearchValueRendererClassNames.PATH_PREFIX_CLASSNAME,
                    DynamicHierarchicalFacetSearchValueRenderer_1.DynamicHierarchicalFacetSearchValueRendererClassNames.PATH_PART_CLASSNAME,
                    DynamicHierarchicalFacetSearchValueRenderer_1.DynamicHierarchicalFacetSearchValueRendererClassNames.PATH_SEPARATOR_CLASSNAME,
                    DynamicHierarchicalFacetSearchValueRenderer_1.DynamicHierarchicalFacetSearchValueRendererClassNames.PATH_PART_CLASSNAME,
                    DynamicHierarchicalFacetSearchValueRenderer_1.DynamicHierarchicalFacetSearchValueRendererClassNames.PATH_SEPARATOR_CLASSNAME,
                    DynamicHierarchicalFacetSearchValueRenderer_1.DynamicHierarchicalFacetSearchValueRendererClassNames.PATH_PART_CLASSNAME
                ]), /* parent */ firstSeparator = _a[2];
                expect(firstSeparator.getAttribute('role')).toEqual('separator');
            });
        });
        describe('rendered with four parents', function () {
            var render;
            var parentValues = ['i', "don't", 'like', 'onions'];
            beforeEach(function () {
                initializeRenderer(parentValues);
                render = renderer.render();
            });
            it('should only show the first and last two values in the label', function () {
                var expectedLabel = Strings_1.l('HierarchicalFacetValueIndentedUnder', getFacetValueLabel(), [parentValues[0], parentValues[2], parentValues[3]].join(', '));
                expect(render.getAttribute('aria-label')).toEqual(expectedLabel);
            });
            it('should render a path containing the first and the last two parents', function () {
                var path = Dom_1.$$(render).findClass(DynamicHierarchicalFacetSearchValueRenderer_1.DynamicHierarchicalFacetSearchValueRendererClassNames.PATH_CLASSNAME)[0];
                var _a = TestUtils_1.expectChildren(path, [
                    DynamicHierarchicalFacetSearchValueRenderer_1.DynamicHierarchicalFacetSearchValueRendererClassNames.PATH_PREFIX_CLASSNAME,
                    DynamicHierarchicalFacetSearchValueRenderer_1.DynamicHierarchicalFacetSearchValueRendererClassNames.PATH_PART_CLASSNAME,
                    DynamicHierarchicalFacetSearchValueRenderer_1.DynamicHierarchicalFacetSearchValueRendererClassNames.PATH_SEPARATOR_CLASSNAME,
                    DynamicHierarchicalFacetSearchValueRenderer_1.DynamicHierarchicalFacetSearchValueRendererClassNames.PATH_ELLIPSIS_CLASSNAME,
                    DynamicHierarchicalFacetSearchValueRenderer_1.DynamicHierarchicalFacetSearchValueRendererClassNames.PATH_SEPARATOR_CLASSNAME,
                    DynamicHierarchicalFacetSearchValueRenderer_1.DynamicHierarchicalFacetSearchValueRendererClassNames.PATH_PART_CLASSNAME,
                    DynamicHierarchicalFacetSearchValueRenderer_1.DynamicHierarchicalFacetSearchValueRendererClassNames.PATH_SEPARATOR_CLASSNAME,
                    DynamicHierarchicalFacetSearchValueRenderer_1.DynamicHierarchicalFacetSearchValueRendererClassNames.PATH_PART_CLASSNAME
                ]), parent0 = _a[1] /* separator */ /* ellipsis */ /* separator */, parent2 = _a[5] /* separator */, parent3 = _a[7];
                expect(parent0.innerText).toEqual(parentValues[0]);
                expect(parent2.innerText).toEqual(parentValues[2]);
                expect(parent3.innerText).toEqual(parentValues[3]);
            });
        });
    });
}
exports.DynamicHierarchicalFacetSearchValueRendererTest = DynamicHierarchicalFacetSearchValueRendererTest;
 
 
/***/ }),
/* 1829 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var MockEnvironment_1 = __webpack_require__(2);
var SearchInterface_1 = __webpack_require__(25);
var ResponsiveFacetColumn_1 = __webpack_require__(234);
var Dom_1 = __webpack_require__(0);
var FacetsMobileMode_1 = __webpack_require__(176);
var ResponsiveDropdownContent_1 = __webpack_require__(99);
var ResponsiveDropdownModalContent_1 = __webpack_require__(326);
var ResponsiveComponents_1 = __webpack_require__(54);
var Core_1 = __webpack_require__(9);
var ResponsiveComponentsUtils_1 = __webpack_require__(93);
var FacetsMobileModeEvents_1 = __webpack_require__(680);
var TEST_SCREEN_WIDTH_MOBILE = ResponsiveComponents_1.MEDIUM_SCREEN_WIDTH;
var TEST_SCREEN_WIDTH_DESKTOP = ResponsiveComponents_1.MEDIUM_SCREEN_WIDTH + 1;
function ResponsiveFacetColumnTest() {
    var test;
    var root;
    var column;
    var dropdown;
    var eventRoot;
    function createResponsiveComponents() {
        test.cmp.responsiveComponents = MockEnvironment_1.mock(ResponsiveComponents_1.ResponsiveComponents);
        test.cmp.responsiveComponents.getResponsiveMode = function () { return 'auto'; };
        test.cmp.responsiveComponents.getMediumScreenWidth = function () { return TEST_SCREEN_WIDTH_MOBILE; };
    }
    function appendFacetColumnElement() {
        root.append(Dom_1.$$('div', { className: 'coveo-facet-column' }).el);
    }
    function appendHeaderWrapper() {
        root.append(Dom_1.$$('div', { className: Core_1.ResponsiveComponentsManager.DROPDOWN_HEADER_WRAPPER_CSS_CLASS }).el);
    }
    function setScreenWidth(width) {
        root.width = function () { return width; };
    }
    function mockSearchInterface() {
        test = MockEnvironment_1.basicSearchInterfaceSetup(SearchInterface_1.SearchInterface);
        root = Dom_1.$$(test.cmp.root);
        createResponsiveComponents();
        appendFacetColumnElement();
        appendHeaderWrapper();
        setScreenWidth(TEST_SCREEN_WIDTH_MOBILE);
    }
    function createResponsiveFacetColumn() {
        column = new ResponsiveFacetColumn_1.ResponsiveFacetColumn(root, 'bogus', {});
        dropdown = column['dropdown'];
    }
    function createFacetsMobileMode(options) {
        root.append((eventRoot = Dom_1.$$('div')).el);
        return new FacetsMobileMode_1.FacetsMobileMode(eventRoot.el, options);
    }
    function prepareTestWithMobileMode(facetsMobileModeOptions) {
        mockSearchInterface();
        test.cmp.attachComponent(FacetsMobileMode_1.FacetsMobileMode.ID, createFacetsMobileMode(facetsMobileModeOptions));
        createResponsiveFacetColumn();
    }
    function prepareTestWithoutMobileMode() {
        spyOn(ResponsiveFacetColumn_1.ResponsiveFacetColumn['logger'], 'warn');
        mockSearchInterface();
        createResponsiveFacetColumn();
    }
    describe('ResponsiveFacetColumn', function () {
        describe('without a FacetsMobileMode component', function () {
            beforeEach(function () {
                prepareTestWithoutMobileMode();
            });
            it('should log a warning', function () {
                expect(ResponsiveFacetColumn_1.ResponsiveFacetColumn['logger'].warn).toHaveBeenCalled();
            });
            it('should instantiate a normal dropdown', function () {
                expect(dropdown.dropdownContent instanceof ResponsiveDropdownContent_1.ResponsiveDropdownContent).toBeTruthy();
            });
            it('should show the background', function () {
                expect(dropdown['popupBackgroundIsEnabled']).toBeTruthy();
            });
            describe('when opened', function () {
                beforeEach(function () {
                    column.handleResizeEvent();
                    dropdown.open();
                });
                it('should allow scrolling on the body', function () {
                    expect(root.el.style.overflow).toBeFalsy();
                });
            });
        });
        describe('with a FacetsMobileMode component', function () {
            describe('with a breakpoint', function () {
                it('is in small mode if the breakpoint is equal to the screen width', function () {
                    prepareTestWithMobileMode({ breakpoint: TEST_SCREEN_WIDTH_MOBILE });
                    column.handleResizeEvent();
                    expect(ResponsiveComponentsUtils_1.ResponsiveComponentsUtils.isSmallFacetActivated(root)).toBeTruthy();
                });
                it("isn't in small mode if the breakpoint is under the screen width", function () {
                    prepareTestWithMobileMode({ breakpoint: TEST_SCREEN_WIDTH_MOBILE - 1 });
                    column.handleResizeEvent();
                    expect(ResponsiveComponentsUtils_1.ResponsiveComponentsUtils.isSmallFacetActivated(root)).toBeFalsy();
                });
            });
            describe('with isModal enabled', function () {
                beforeEach(function () {
                    prepareTestWithMobileMode({ isModal: true });
                });
                it('should instantiate a modal dropdown', function () {
                    expect(dropdown.dropdownContent instanceof ResponsiveDropdownModalContent_1.ResponsiveDropdownModalContent).toBeTruthy();
                });
                it("shouldn't show the background", function () {
                    expect(dropdown['popupBackgroundIsEnabled']).toBeFalsy();
                });
            });
            describe('with isModal disabled', function () {
                beforeEach(function () {
                    prepareTestWithMobileMode({ isModal: false });
                });
                it('should instantiate a normal dropdown', function () {
                    expect(dropdown.dropdownContent instanceof ResponsiveDropdownContent_1.ResponsiveDropdownContent).toBeTruthy();
                });
                it('should show the background', function () {
                    expect(dropdown['popupBackgroundIsEnabled']).toBeTruthy();
                });
            });
            describe('with displayOverlayWhileOpen disabled', function () {
                beforeEach(function () {
                    prepareTestWithMobileMode({ displayOverlayWhileOpen: false });
                });
                it("shouldn't show the background", function () {
                    expect(dropdown['popupBackgroundIsEnabled']).toBeFalsy();
                });
            });
            describe('with preventScrolling enabled', function () {
                describe('without a scroll container', function () {
                    beforeEach(function () {
                        prepareTestWithMobileMode({ preventScrolling: true });
                    });
                    describe('when opened', function () {
                        beforeEach(function () {
                            column.handleResizeEvent();
                            dropdown.open();
                        });
                        it("shouldn't allow scrolling on the body", function () {
                            expect(root.el.style.overflow).toEqual('hidden');
                        });
                        describe('then closed', function () {
                            beforeEach(function () {
                                dropdown.close();
                            });
                            it('should re-allow scrolling on the body', function () {
                                expect(root.el.style.overflow).toBeFalsy();
                            });
                        });
                    });
                });
                describe('with a scroll container', function () {
                    var container;
                    beforeEach(function () {
                        container = Dom_1.$$('div').el;
                        prepareTestWithMobileMode({ preventScrolling: true, scrollContainer: container });
                    });
                    describe('when opened', function () {
                        beforeEach(function () {
                            column.handleResizeEvent();
                            dropdown.open();
                        });
                        it("shouldn't allow scrolling on the container", function () {
                            expect(container.style.overflow).toEqual('hidden');
                        });
                        describe('then closed', function () {
                            beforeEach(function () {
                                dropdown.close();
                            });
                            it('should re-allow scrolling on the container', function () {
                                expect(container.style.overflow).toBeFalsy();
                            });
                        });
                    });
                });
            });
            describe('with bound events', function () {
                var popupOpened;
                var popupClosed;
                beforeEach(function () {
                    prepareTestWithMobileMode();
                    eventRoot.on(FacetsMobileModeEvents_1.FacetsMobileModeEvents.popupOpened, (popupOpened = jasmine.createSpy(FacetsMobileModeEvents_1.FacetsMobileModeEvents.popupOpened)));
                    eventRoot.on(FacetsMobileModeEvents_1.FacetsMobileModeEvents.popupClosed, (popupClosed = jasmine.createSpy(FacetsMobileModeEvents_1.FacetsMobileModeEvents.popupClosed)));
                });
                it('should trigger the closed event when small mode is activated', function () {
                    expect(popupOpened).not.toHaveBeenCalled();
                    expect(popupClosed).not.toHaveBeenCalled();
                    column.handleResizeEvent();
                    expect(popupOpened).not.toHaveBeenCalled();
                    expect(popupClosed).toHaveBeenCalledTimes(1);
                });
                describe('after small mode is activated', function () {
                    beforeEach(function () {
                        column.handleResizeEvent();
                        popupClosed.calls.reset();
                    });
                    it('should trigger the opened event when opening the popup', function () {
                        dropdown.open();
                        expect(popupOpened).toHaveBeenCalledTimes(1);
                        expect(popupClosed).not.toHaveBeenCalled();
                    });
                    describe('after being opened', function () {
                        beforeEach(function () {
                            dropdown.open();
                            popupOpened.calls.reset();
                        });
                        it('should trigger the closed event when closing the popup', function () {
                            dropdown.close();
                            expect(popupOpened).not.toHaveBeenCalled();
                            expect(popupClosed).toHaveBeenCalledTimes(1);
                        });
                        it('should trigger the closed event when large mode is activated', function () {
                            setScreenWidth(TEST_SCREEN_WIDTH_DESKTOP);
                            column.handleResizeEvent();
                            expect(popupOpened).not.toHaveBeenCalled();
                            expect(popupClosed).toHaveBeenCalledTimes(1);
                        });
                    });
                });
            });
        });
    });
}
exports.ResponsiveFacetColumnTest = ResponsiveFacetColumnTest;
 
 
/***/ }),
/* 1830 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var ResponsiveDropdownModalContent_1 = __webpack_require__(326);
var Dom_1 = __webpack_require__(0);
function ResponsiveDropdownModalContentTest() {
    describe('ResponsiveDropdownModalContent', function () {
        var closeButtonLabel = 'hello';
        var modal;
        var modalElement;
        var sibling;
        var closeSpy;
        function createCloseSpy() {
            return (closeSpy = jasmine.createSpy('close'));
        }
        function buildModalContainer() {
            return Dom_1.$$('div', {}, (modalElement = Dom_1.$$('div')), (sibling = Dom_1.$$('div')));
        }
        function buildModal() {
            buildModalContainer();
            return (modal = new ResponsiveDropdownModalContent_1.ResponsiveDropdownModalContent('abc', modalElement, closeButtonLabel, createCloseSpy()));
        }
        beforeEach(function () {
            buildModal();
        });
        describe('once initialized', function () {
            var isHidden = function () { return modalElement.hasClass('coveo-hidden'); };
            var getCloseButton = function () { return modalElement.findClass('coveo-facet-modal-close-button')[0] || null; };
            beforeEach(function () {
                modal.positionDropdown();
                modal.hideDropdown();
            });
            it('hides the element', function () {
                expect(isHidden()).toBeTruthy();
            });
            it("doesn't have a close button", function () {
                expect(getCloseButton()).toBeNull();
            });
            it("doesn't prevent accessible focus from leaving", function () {
                expect(sibling.getAttribute('aria-hidden')).toBeNull();
            });
            describe('when positionned', function () {
                beforeEach(function () {
                    modal.positionDropdown();
                });
                it('shows the element', function () {
                    expect(isHidden()).toBeFalsy();
                });
                it('adds a close button', function () {
                    expect(getCloseButton()).not.toBeNull();
                    expect(getCloseButton().getAttribute('aria-label')).toEqual(closeButtonLabel);
                });
                it('calls close when pressing on the close button', function () {
                    expect(closeSpy).not.toHaveBeenCalled();
                    getCloseButton().click();
                    expect(closeSpy).toHaveBeenCalled();
                });
                it('prevents accessible focus from leaving', function () {
                    expect(sibling.getAttribute('aria-hidden')).toEqual('true');
                });
                describe('twice', function () {
                    beforeEach(function () {
                        modal.positionDropdown();
                    });
                    it("doesn't add more close buttons", function () {
                        expect(modalElement.findClass('coveo-facet-modal-close-button').length).toEqual(1);
                    });
                });
            });
            describe('when cleaned up', function () {
                beforeEach(function () {
                    modal.cleanUp();
                });
                it('shows the element', function () {
                    expect(isHidden()).toBeFalsy();
                });
            });
        });
    });
}
exports.ResponsiveDropdownModalContentTest = ResponsiveDropdownModalContentTest;
 
 
/***/ }),
/* 1831 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var FileTypes_1 = __webpack_require__(138);
var underscore_1 = __webpack_require__(1);
function FileTypesTest() {
    describe('FileTypes', function () {
        it('safelyBuildFileTypeInfo should prevent XSS attacks by espacing inputs', function () {
            var unsafeInput = 'Foo><img src=y onerror=alert(document.cookie)>';
            var info = FileTypes_1.FileTypes.safelyBuildFileTypeInfo('objecttype', unsafeInput, unsafeInput);
            expect(info.icon).toEqual("coveo-icon objecttype " + underscore_1.escape(unsafeInput.replace(' ', '-')));
            expect(info.caption).toBe(underscore_1.escape(unsafeInput));
        });
    });
}
exports.FileTypesTest = FileTypesTest;
 
 
/***/ }),
/* 1832 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __assign = (this && this.__assign) || Object.assign || function(t) {
    for (var s, i = 1, n = arguments.length; i < n; i++) {
        s = arguments[i];
        for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
            t[p] = s[p];
    }
    return t;
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { Iif (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        Iif (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            Iif (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
            Iif (y = 0, t) op = [0, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    Eif (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        Iif (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
Object.defineProperty(exports, "__esModule", { value: true });
var Dom_1 = __webpack_require__(0);
var QueryEvents_1 = __webpack_require__(14);
var SmartSnippet_1 = __webpack_require__(862);
var TestUtils_1 = __webpack_require__(158);
var UserFeedbackBanner_1 = __webpack_require__(409);
var MockEnvironment_1 = __webpack_require__(2);
var HeightLimiter_1 = __webpack_require__(410);
var Core_1 = __webpack_require__(9);
var SmartSnippetCommon_1 = __webpack_require__(206);
var ExplanationModal_1 = __webpack_require__(411);
var underscore_1 = __webpack_require__(1);
function SmartSnippetTest() {
    var _this = this;
    var sourceTitle = 'Google!';
    var sourceUrl = 'https://www.google.com/';
    var sourceId = {
        contentIdKey: 'unique-identifier',
        contentIdValue: 'identifier-of-the-first-result'
    };
    var sourceAlt = 'https://some-fake-website.com';
    var style = "\n    .abc {\n      color: red;\n    }\n\n    #hello-world {\n      cursor: url('some-ugly-animated-gif-cursor.gif');\n    }\n  ".replace(' ', '');
    function mockResult() {
        return {
            title: sourceTitle,
            titleHighlights: [],
            clickUri: sourceUrl,
            raw: (_a = {
                    alt: sourceAlt
                },
                _a[sourceId.contentIdKey] = sourceId.contentIdValue,
                _a)
        };
        var _a;
    }
    function mockSnippet() {
        return Dom_1.$$('div', {}, "\n        <ol>\n          <li>On the <a href=\"https://platform.cloud.coveo.com/admin/#/orgid/search/in-app-widgets/\">In-Product Experiences</a> page, click Add <b>In-Product Experience</b>.</li>\n          <li>In the Configuration tab, fill the Basic settings section.</li>\n          <li>(Optional) Use the Design and Content access tabs to <a href=\"https://docs.coveo.com/en/3160/#customizing-an-ipx-interface\">customize your <b>IPX</b> interface</a>.</li>\n          <li>Click Save.</li>\n          <li>In the Loader snippet panel that appears, you may click Copy to save the loader snippet for your <b>IPX</b> interface to your clipboard, and then click Save.  You can Always retrieve the loader snippet later.</li>\n        </ol>\n        \n        <p>\n          You're now ready to <a href=\"https://docs.coveo.com/en/3160/build-a-search-ui/manage-coveo-in-product-experiences-ipx#embed-your-ipx-interface-in-sites-and-applications\">embed your IPX interface</a>. However, we recommend that you <a href=\"https://docs.coveo.com/en/3160/build-a-search-ui/manage-coveo-in-product-experiences-ipx#configuring-query-pipelines-for-an-ipx-interface-recommended\">configure query pipelines for your IPX interface</a> before.\n        </p>\n      ").el;
    }
    function mockStyling(content) {
        return Dom_1.$$('script', { type: 'text/css' }, content).el;
    }
    function mockQuestionAnswer() {
        return {
            question: 'abc',
            answerSnippet: mockSnippet().innerHTML,
            documentId: sourceId
        };
    }
    describe('SmartSnippet', function () {
        var test;
        function instantiateSmartSnippet(styling, options) {
            if (options === void 0) { options = {}; }
            test = MockEnvironment_1.advancedComponentSetup(SmartSnippet_1.SmartSnippet, new MockEnvironment_1.AdvancedComponentSetupOptions(Dom_1.$$.apply(void 0, ['div', {}].concat((Core_1.Utils.isNullOrUndefined(styling) ? [] : [mockStyling(styling)]))).el, options));
        }
        function triggerQuerySuccess(args) {
            return __awaiter(this, void 0, void 0, function () {
                return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0:
                            test.env.queryController.getLastResults.and.returnValue(args.results);
                            Dom_1.$$(test.env.root).trigger(QueryEvents_1.QueryEvents.deferredQuerySuccess, args);
                            return [4 /*yield*/, test.cmp.loading];
                        case 1:
                            _a.sent();
                            return [2 /*return*/];
                    }
                });
            });
        }
        function triggerQuestionAnswerQuery(withSource, results) {
            if (results === void 0) { results = withSource ? [mockResult()] : []; }
            return __awaiter(this, void 0, void 0, function () {
                return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0: return [4 /*yield*/, triggerQuerySuccess({
                                results: {
                                    results: results,
                                    questionAnswer: mockQuestionAnswer()
                                }
                            })];
                        case 1:
                            _a.sent();
                            return [2 /*return*/];
                    }
                });
            });
        }
        function getFirstChild(className) {
            return test.cmp.element.getElementsByClassName(className)[0] || null;
        }
        function getShadowRoot() {
            return getFirstChild(SmartSnippet_1.SmartSnippetClassNames.SHADOW_CLASSNAME).shadowRoot;
        }
        describe('when resolving result to build result link', function () {
            var expectedHref = 'https://a-good-uri.com/';
            beforeEach(function () {
                instantiateSmartSnippet(null);
                document.body.appendChild(test.env.root);
            });
            function expectValidHref() {
                expect(getFirstChild(SmartSnippet_1.SmartSnippetClassNames.SOURCE_URL_CLASSNAME).href).toEqual(expectedHref);
                expect(getFirstChild(SmartSnippet_1.SmartSnippetClassNames.SOURCE_URL_CLASSNAME).innerText).toEqual(expectedHref);
                expect(getFirstChild(SmartSnippet_1.SmartSnippetClassNames.SOURCE_TITLE_CLASSNAME).href).toEqual(expectedHref);
                test.env.root.remove();
            }
            it('resolve from top results', function (done) { return __awaiter(_this, void 0, void 0, function () {
                var mockResults;
                return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0:
                            mockResults = [mockResult(), mockResult(), mockResult()];
                            mockResults[0].raw[sourceId.contentIdKey] = 'nope';
                            mockResults[1].raw[sourceId.contentIdKey] = 'not good';
                            mockResults[2].clickUri = expectedHref;
                            return [4 /*yield*/, triggerQuestionAnswerQuery(true, mockResults)];
                        case 1:
                            _a.sent();
                            expectValidHref();
                            done();
                            return [2 /*return*/];
                    }
                });
            }); });
            it('resolve from child results', function (done) { return __awaiter(_this, void 0, void 0, function () {
                var childResult, mockResults;
                return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0:
                            childResult = mockResult();
                            childResult.clickUri = expectedHref;
                            mockResults = [mockResult()];
                            mockResults[0].raw[sourceId.contentIdKey] = 'nope';
                            mockResults[0].childResults = [childResult];
                            return [4 /*yield*/, triggerQuestionAnswerQuery(true, mockResults)];
                        case 1:
                            _a.sent();
                            expectValidHref();
                            done();
                            return [2 /*return*/];
                    }
                });
            }); });
            it('resolve from attachment', function (done) { return __awaiter(_this, void 0, void 0, function () {
                var attachment, mockResults;
                return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0:
                            attachment = mockResult();
                            attachment.clickUri = expectedHref;
                            mockResults = [mockResult()];
                            mockResults[0].raw[sourceId.contentIdKey] = 'nope';
                            mockResults[0].attachments = [attachment];
                            return [4 /*yield*/, triggerQuestionAnswerQuery(true, mockResults)];
                        case 1:
                            _a.sent();
                            expectValidHref();
                            done();
                            return [2 /*return*/];
                    }
                });
            }); });
        });
        it('instantiates the heightLimiter using the maximumSnippetHeight option', function () {
            var maximumSnippetHeight = 123;
            instantiateSmartSnippet(null, { maximumSnippetHeight: maximumSnippetHeight });
            test.cmp.ensureDom();
            expect(test.cmp['heightLimiter']['heightLimit']).toEqual(maximumSnippetHeight);
            maximumSnippetHeight = 321;
            instantiateSmartSnippet(null, { maximumSnippetHeight: maximumSnippetHeight });
            test.cmp.ensureDom();
            expect(test.cmp['heightLimiter']['heightLimit']).toEqual(maximumSnippetHeight);
        });
        it('displays the specified titleField', function (done) { return __awaiter(_this, void 0, void 0, function () {
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        instantiateSmartSnippet(null, { titleField: '@alt' });
                        document.body.appendChild(test.env.root);
                        return [4 /*yield*/, triggerQuestionAnswerQuery(true)];
                    case 1:
                        _a.sent();
                        expect(getFirstChild(SmartSnippet_1.SmartSnippetClassNames.SOURCE_TITLE_CLASSNAME).innerText).toEqual(sourceAlt);
                        expect(getFirstChild(SmartSnippet_1.SmartSnippetClassNames.SOURCE_URL_CLASSNAME).innerText).toEqual(sourceUrl);
                        test.env.root.remove();
                        done();
                        return [2 /*return*/];
                }
            });
        }); });
        it('uses and displays the specified hrefTemplate', function (done) { return __awaiter(_this, void 0, void 0, function () {
            var expectedHref;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        instantiateSmartSnippet(null, { hrefTemplate: '${raw.alt}/?abcd=1' });
                        document.body.appendChild(test.env.root);
                        return [4 /*yield*/, triggerQuestionAnswerQuery(true)];
                    case 1:
                        _a.sent();
                        expectedHref = sourceAlt + "/?abcd=1";
                        expect(getFirstChild(SmartSnippet_1.SmartSnippetClassNames.SOURCE_URL_CLASSNAME).href).toEqual(expectedHref);
                        expect(getFirstChild(SmartSnippet_1.SmartSnippetClassNames.SOURCE_URL_CLASSNAME).innerText).toEqual(expectedHref);
                        expect(getFirstChild(SmartSnippet_1.SmartSnippetClassNames.SOURCE_TITLE_CLASSNAME).href).toEqual(expectedHref);
                        test.env.root.remove();
                        done();
                        return [2 /*return*/];
                }
            });
        }); });
        it('displays resolved relative URLs when specified in the hrefTemplate', function (done) { return __awaiter(_this, void 0, void 0, function () {
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        instantiateSmartSnippet(null, { hrefTemplate: '../${raw.alt}' });
                        document.body.appendChild(test.env.root);
                        return [4 /*yield*/, triggerQuestionAnswerQuery(true)];
                    case 1:
                        _a.sent();
                        expect(getFirstChild(SmartSnippet_1.SmartSnippetClassNames.SOURCE_URL_CLASSNAME).innerText.indexOf(window.location.protocol)).toEqual(0);
                        test.env.root.remove();
                        done();
                        return [2 /*return*/];
                }
            });
        }); });
        it('resists XSS injections in hrefTemplate (1)', function (done) { return __awaiter(_this, void 0, void 0, function () {
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        instantiateSmartSnippet(null, { hrefTemplate: 'https://test.com?q=<img src="abcd.png" onerror="window.XSSInjected = true;">' });
                        document.body.appendChild(test.env.root);
                        return [4 /*yield*/, triggerQuestionAnswerQuery(true)];
                    case 1:
                        _a.sent();
                        return [4 /*yield*/, Promise.resolve()];
                    case 2:
                        _a.sent();
                        expect('XSSInjected' in window).toBeFalsy();
                        delete window['XSSInjected'];
                        test.env.root.remove();
                        done();
                        return [2 /*return*/];
                }
            });
        }); });
        it('resists XSS injections in hrefTemplate (2)', function (done) { return __awaiter(_this, void 0, void 0, function () {
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        instantiateSmartSnippet(null, {
                            hrefTemplate: 'https://test.com?q="/><img src="abcd.png" onerror="window.XSSInjected = true;"><span title="'
                        });
                        document.body.appendChild(test.env.root);
                        return [4 /*yield*/, triggerQuestionAnswerQuery(true)];
                    case 1:
                        _a.sent();
                        return [4 /*yield*/, Promise.resolve()];
                    case 2:
                        _a.sent();
                        expect('XSSInjected' in window).toBeFalsy();
                        delete window['XSSInjected'];
                        test.env.root.remove();
                        done();
                        return [2 /*return*/];
                }
            });
        }); });
        it('resists XSS injections in content', function (done) { return __awaiter(_this, void 0, void 0, function () {
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        instantiateSmartSnippet(null, { useIFrame: false });
                        document.body.appendChild(test.env.root);
                        return [4 /*yield*/, triggerQuerySuccess({
                                results: {
                                    results: [mockResult()],
                                    questionAnswer: __assign({}, mockQuestionAnswer(), { answerSnippet: '<img src="abcd.png" onerror="window.XSSInjected = true;">' })
                                }
                            })];
                    case 1:
                        _a.sent();
                        return [4 /*yield*/, Core_1.Utils.resolveAfter(100)];
                    case 2:
                        _a.sent();
                        expect('XSSInjected' in window).toBeFalsy();
                        delete window['XSSInjected'];
                        test.env.root.remove();
                        done();
                        return [2 /*return*/];
                }
            });
        }); });
        it("doesn't set the target of the source when alwaysOpenInNewWindow is unset", function (done) { return __awaiter(_this, void 0, void 0, function () {
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        instantiateSmartSnippet(null);
                        document.body.appendChild(test.env.root);
                        return [4 /*yield*/, triggerQuestionAnswerQuery(true)];
                    case 1:
                        _a.sent();
                        expect(getFirstChild(SmartSnippet_1.SmartSnippetClassNames.SOURCE_URL_CLASSNAME).target).toEqual('');
                        expect(getFirstChild(SmartSnippet_1.SmartSnippetClassNames.SOURCE_TITLE_CLASSNAME).target).toEqual('');
                        test.env.root.remove();
                        done();
                        return [2 /*return*/];
                }
            });
        }); });
        it('sets the target of the links to _top when alwaysOpenInNewWindow is false/unset', function (done) { return __awaiter(_this, void 0, void 0, function () {
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        instantiateSmartSnippet(null, { useIFrame: false });
                        document.body.appendChild(test.env.root);
                        return [4 /*yield*/, triggerQuestionAnswerQuery(true)];
                    case 1:
                        _a.sent();
                        underscore_1.toArray(getFirstChild(SmartSnippet_1.SmartSnippetClassNames.CONTENT_CLASSNAME).querySelectorAll('a')).forEach(function (link) {
                            return expect(link.target).toEqual('_top');
                        });
                        test.env.root.remove();
                        done();
                        return [2 /*return*/];
                }
            });
        }); });
        it('sets the target of the source when alwaysOpenInNewWindow is set', function (done) { return __awaiter(_this, void 0, void 0, function () {
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        instantiateSmartSnippet(null, { alwaysOpenInNewWindow: true });
                        document.body.appendChild(test.env.root);
                        return [4 /*yield*/, triggerQuestionAnswerQuery(true)];
                    case 1:
                        _a.sent();
                        expect(getFirstChild(SmartSnippet_1.SmartSnippetClassNames.SOURCE_URL_CLASSNAME).target).toEqual('_blank');
                        expect(getFirstChild(SmartSnippet_1.SmartSnippetClassNames.SOURCE_TITLE_CLASSNAME).target).toEqual('_blank');
                        test.env.root.remove();
                        done();
                        return [2 /*return*/];
                }
            });
        }); });
        it('sets the target of the links to _blank when alwaysOpenInNewWindow is set', function (done) { return __awaiter(_this, void 0, void 0, function () {
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        instantiateSmartSnippet(null, { alwaysOpenInNewWindow: true, useIFrame: false });
                        document.body.appendChild(test.env.root);
                        return [4 /*yield*/, triggerQuestionAnswerQuery(true)];
                    case 1:
                        _a.sent();
                        underscore_1.toArray(getFirstChild(SmartSnippet_1.SmartSnippetClassNames.CONTENT_CLASSNAME).querySelectorAll('a')).forEach(function (link) {
                            return expect(link.target).toEqual('_blank');
                        });
                        test.env.root.remove();
                        done();
                        return [2 /*return*/];
                }
            });
        }); });
        it('creates an iframe if the option withIFrame is omitted', function (done) { return __awaiter(_this, void 0, void 0, function () {
            var IFRAME_CLASSNAME;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        IFRAME_CLASSNAME = 'coveo-shadow-iframe';
                        instantiateSmartSnippet(null);
                        document.body.appendChild(test.env.root);
                        return [4 /*yield*/, triggerQuestionAnswerQuery(true)];
                    case 1:
                        _a.sent();
                        expect(getFirstChild(IFRAME_CLASSNAME).nodeName).toEqual('IFRAME');
                        test.env.root.remove();
                        done();
                        return [2 /*return*/];
                }
            });
        }); });
        it("doesn't create an iframe if the option useIFrame is false", function (done) { return __awaiter(_this, void 0, void 0, function () {
            var IFRAME_CLASSNAME;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        IFRAME_CLASSNAME = 'coveo-shadow-iframe';
                        instantiateSmartSnippet(null, {
                            useIFrame: false
                        });
                        document.body.appendChild(test.env.root);
                        return [4 /*yield*/, triggerQuestionAnswerQuery(true)];
                    case 1:
                        _a.sent();
                        expect(getFirstChild(IFRAME_CLASSNAME).nodeName).toEqual('DIV');
                        test.env.root.remove();
                        done();
                        return [2 /*return*/];
                }
            });
        }); });
        describe('with styling without a source', function () {
            beforeEach(function (done) { return __awaiter(_this, void 0, void 0, function () {
                return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0:
                            instantiateSmartSnippet(style);
                            document.body.appendChild(test.env.root);
                            return [4 /*yield*/, triggerQuestionAnswerQuery(false)];
                        case 1:
                            _a.sent();
                            done();
                            return [2 /*return*/];
                    }
                });
            }); });
            afterEach(function () {
                test.env.root.remove();
            });
            it('should render the style', function () {
                var styleElement = getShadowRoot().querySelector('style');
                expect(styleElement.innerHTML).toEqual(style);
            });
        });
        describe('with default styling', function () {
            beforeEach(function () {
                instantiateSmartSnippet(null);
                document.body.appendChild(test.env.root);
            });
            afterEach(function () {
                test.env.root.remove();
            });
            it("doesn't have the has-answer class", function () {
                expect(test.cmp.element.classList.contains(SmartSnippet_1.SmartSnippetClassNames.HAS_ANSWER_CLASSNAME)).toBeFalsy();
            });
            it("doesn't render anything in the SmartSnippet element", function () {
                expect(test.cmp.element.children.length).toEqual(0);
            });
            it('with only related questions, does not render', function (done) { return __awaiter(_this, void 0, void 0, function () {
                return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0: return [4 /*yield*/, triggerQuerySuccess({ results: { questionAnswer: { relatedQuestions: [mockQuestionAnswer()] } } })];
                        case 1:
                            _a.sent();
                            expect(test.cmp.element.classList.contains(SmartSnippet_1.SmartSnippetClassNames.HAS_ANSWER_CLASSNAME)).toBeFalsy();
                            done();
                            return [2 /*return*/];
                    }
                });
            }); });
            it('with an empty question, does not render', function (done) { return __awaiter(_this, void 0, void 0, function () {
                return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0: return [4 /*yield*/, triggerQuerySuccess({
                                results: { questionAnswer: { answerSnippet: 'abc', relatedQuestions: [mockQuestionAnswer()] } }
                            })];
                        case 1:
                            _a.sent();
                            expect(test.cmp.element.classList.contains(SmartSnippet_1.SmartSnippetClassNames.HAS_ANSWER_CLASSNAME)).toBeFalsy();
                            done();
                            return [2 /*return*/];
                    }
                });
            }); });
            it('with an empty answer, does not render', function (done) { return __awaiter(_this, void 0, void 0, function () {
                return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0: return [4 /*yield*/, triggerQuerySuccess({
                                results: { questionAnswer: { question: 'abc', relatedQuestions: [mockQuestionAnswer()] } }
                            })];
                        case 1:
                            _a.sent();
                            expect(test.cmp.element.classList.contains(SmartSnippet_1.SmartSnippetClassNames.HAS_ANSWER_CLASSNAME)).toBeFalsy();
                            done();
                            return [2 /*return*/];
                    }
                });
            }); });
            it('with a question and an answer but no questions, renders', function (done) { return __awaiter(_this, void 0, void 0, function () {
                return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0: return [4 /*yield*/, triggerQuerySuccess({
                                results: { questionAnswer: { question: 'abc', answerSnippet: 'def', relatedQuestions: [] } }
                            })];
                        case 1:
                            _a.sent();
                            expect(test.cmp.element.classList.contains(SmartSnippet_1.SmartSnippetClassNames.HAS_ANSWER_CLASSNAME)).toBeTruthy();
                            done();
                            return [2 /*return*/];
                    }
                });
            }); });
            describe('with a source', function () {
                beforeEach(function (done) { return __awaiter(_this, void 0, void 0, function () {
                    return __generator(this, function (_a) {
                        switch (_a.label) {
                            case 0: return [4 /*yield*/, triggerQuestionAnswerQuery(true)];
                            case 1:
                                _a.sent();
                                done();
                                return [2 /*return*/];
                        }
                    });
                }); });
                it('has the has-answer class', function () {
                    expect(test.cmp.element.classList.contains(SmartSnippet_1.SmartSnippetClassNames.HAS_ANSWER_CLASSNAME)).toBeTruthy();
                });
                it('should render the source with its url first then its title', function () {
                    var _a = TestUtils_1.expectChildren(getFirstChild(SmartSnippet_1.SmartSnippetClassNames.SOURCE_CLASSNAME), [
                        SmartSnippet_1.SmartSnippetClassNames.SOURCE_URL_CLASSNAME,
                        SmartSnippet_1.SmartSnippetClassNames.SOURCE_TITLE_CLASSNAME
                    ]), url = _a[0], title = _a[1];
                    expect(url.href).toEqual(sourceUrl);
                    expect(url.innerText).toEqual(sourceUrl);
                    expect(title.href).toEqual(sourceUrl);
                    expect(title.innerText).toEqual(sourceTitle);
                });
            });
            describe('without a source', function () {
                beforeEach(function (done) { return __awaiter(_this, void 0, void 0, function () {
                    return __generator(this, function (_a) {
                        switch (_a.label) {
                            case 0: return [4 /*yield*/, triggerQuestionAnswerQuery(false)];
                            case 1:
                                _a.sent();
                                done();
                                return [2 /*return*/];
                        }
                    });
                }); });
                it('should render the answer container followed by the feedback banner', function () {
                    TestUtils_1.expectChildren(test.cmp.element, [SmartSnippet_1.SmartSnippetClassNames.ANSWER_CONTAINER_CLASSNAME, UserFeedbackBanner_1.UserFeedbackBannerClassNames.ROOT_CLASSNAME]);
                });
                it('the thank you banner should not be active', function () {
                    expect(getFirstChild(UserFeedbackBanner_1.UserFeedbackBannerClassNames.THANK_YOU_BANNER_ACTIVE_CLASSNAME)).toBeNull();
                });
                describe('after clicking no', function () {
                    beforeEach(function () {
                        getFirstChild(UserFeedbackBanner_1.UserFeedbackBannerClassNames.NO_BUTTON_CLASSNAME).click();
                    });
                    it('the thank you banner should be active', function () {
                        expect(getFirstChild(UserFeedbackBanner_1.UserFeedbackBannerClassNames.THANK_YOU_BANNER_ACTIVE_CLASSNAME)).not.toBeNull();
                    });
                    it('after receiving a new answer, the thank you banner should not be active', function (done) { return __awaiter(_this, void 0, void 0, function () {
                        return __generator(this, function (_a) {
                            switch (_a.label) {
                                case 0: return [4 /*yield*/, triggerQuestionAnswerQuery(false)];
                                case 1:
                                    _a.sent();
                                    expect(getFirstChild(UserFeedbackBanner_1.UserFeedbackBannerClassNames.THANK_YOU_BANNER_ACTIVE_CLASSNAME)).toBeNull();
                                    done();
                                    return [2 /*return*/];
                            }
                        });
                    }); });
                    it('after receiving a new answer, it should still be possible to give the same answer', function (done) { return __awaiter(_this, void 0, void 0, function () {
                        return __generator(this, function (_a) {
                            switch (_a.label) {
                                case 0: return [4 /*yield*/, triggerQuestionAnswerQuery(false)];
                                case 1:
                                    _a.sent();
                                    getFirstChild(UserFeedbackBanner_1.UserFeedbackBannerClassNames.NO_BUTTON_CLASSNAME).click();
                                    expect(getFirstChild(UserFeedbackBanner_1.UserFeedbackBannerClassNames.THANK_YOU_BANNER_ACTIVE_CLASSNAME)).not.toBeNull();
                                    done();
                                    return [2 /*return*/];
                            }
                        });
                    }); });
                    describe('after pressing explain why', function () {
                        beforeEach(function () {
                            getFirstChild(UserFeedbackBanner_1.UserFeedbackBannerClassNames.EXPLAIN_WHY_CLASSNAME).click();
                        });
                        afterEach(function () {
                            document.querySelector("." + ExplanationModal_1.ExplanationModalClassNames.CANCEL_BUTTON_CLASSNAME).click();
                        });
                        it('should open a modal', function () {
                            expect(document.querySelector("." + ExplanationModal_1.ExplanationModalClassNames.ROOT_CLASSNAME)).toBeTruthy();
                        });
                    });
                });
                it('should render the snippet followed by the source in the answer container', function () {
                    TestUtils_1.expectChildren(getFirstChild(SmartSnippet_1.SmartSnippetClassNames.ANSWER_CONTAINER_CLASSNAME), [
                        SmartSnippet_1.SmartSnippetClassNames.QUESTION_CLASSNAME,
                        SmartSnippet_1.SmartSnippetClassNames.SHADOW_CLASSNAME,
                        HeightLimiter_1.HeightLimiterClassNames.BUTTON_CLASSNAME,
                        SmartSnippet_1.SmartSnippetClassNames.SOURCE_CLASSNAME
                    ]);
                });
                it('should wrap the snippet in a container in a shadow DOM', function () {
                    var shadowContainer = TestUtils_1.expectChildren(getShadowRoot(), [SmartSnippet_1.SmartSnippetClassNames.CONTENT_CLASSNAME, null])[0];
                    TestUtils_1.expectEquivalentDOM(shadowContainer, mockSnippet(), { ignoreRoot: true, ignoreAttributes: ['target'] });
                });
                it('should render the default style', function () {
                    var _a = TestUtils_1.expectChildren(getShadowRoot(), [SmartSnippet_1.SmartSnippetClassNames.CONTENT_CLASSNAME, null]), styleElement = _a[1];
                    expect(styleElement.innerHTML).toEqual(SmartSnippetCommon_1.getDefaultSnippetStyle(SmartSnippet_1.SmartSnippetClassNames.CONTENT_CLASSNAME));
                });
                it('should not render any source', function () {
                    expect(getFirstChild(SmartSnippet_1.SmartSnippetClassNames.SOURCE_CLASSNAME).children.length).toEqual(0);
                });
            });
        });
        describe('with no styling, without a source', function () {
            beforeEach(function (done) { return __awaiter(_this, void 0, void 0, function () {
                return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0:
                            instantiateSmartSnippet('');
                            document.body.appendChild(test.env.root);
                            return [4 /*yield*/, triggerQuestionAnswerQuery(false)];
                        case 1:
                            _a.sent();
                            done();
                            return [2 /*return*/];
                    }
                });
            }); });
            afterEach(function () {
                test.env.root.remove();
            });
            it('should render an empty style', function () {
                var _a = TestUtils_1.expectChildren(getShadowRoot(), [SmartSnippet_1.SmartSnippetClassNames.CONTENT_CLASSNAME, null]), styleElement = _a[1];
                expect(styleElement.innerHTML).toEqual('');
            });
        });
    });
}
exports.SmartSnippetTest = SmartSnippetTest;
 
 
/***/ }),
/* 1833 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Dom_1 = __webpack_require__(0);
var HeightLimiter_1 = __webpack_require__(410);
var SVGIcons_1 = __webpack_require__(16);
var Strings_1 = __webpack_require__(4);
var TestUtils_1 = __webpack_require__(158);
var heightLimit = 2;
function HeightLimiterTest() {
    var heightLimiter;
    var container;
    var content;
    var onToggleSpy;
    var contentHeight;
    function createContainer() {
        return (container = Dom_1.$$('div').el);
    }
    function createContent(height) {
        contentHeight = height;
        content = Dom_1.$$('div').el;
        Object.defineProperty(content, 'clientHeight', { get: function () { return contentHeight; } });
        return content;
    }
    function initializeHeightLimiter(initialHeight) {
        heightLimiter = new HeightLimiter_1.HeightLimiter(createContainer(), createContent(initialHeight), heightLimit, (onToggleSpy = jasmine.createSpy('onToggle')));
    }
    function resizeContainer(newHeight) {
        contentHeight = newHeight;
        heightLimiter.onContentHeightChanged();
    }
    function getElementsState() {
        return {
            containerActive: container.classList.contains(HeightLimiter_1.HeightLimiterClassNames.CONTAINER_ACTIVE_CLASSNAME),
            buttonActive: heightLimiter.toggleButton.classList.contains(HeightLimiter_1.HeightLimiterClassNames.BUTTON_ACTIVE_CLASSNAME),
            containerExpanded: container.classList.contains(HeightLimiter_1.HeightLimiterClassNames.CONTAINER_EXPANDED_CLASSNAME)
        };
    }
    function getButtonText() {
        return heightLimiter.toggleButton.querySelector("." + HeightLimiter_1.HeightLimiterClassNames.BUTTON_LABEL_CLASSNAME).textContent;
    }
    function getButtonIcon() {
        return heightLimiter.toggleButton.querySelector("." + HeightLimiter_1.HeightLimiterClassNames.BUTTON_ICON_CLASSNAME).innerHTML;
    }
    describe('HeightLimiter', function () {
        describe('initialized at the height limit', function () {
            beforeEach(function () {
                initializeHeightLimiter(heightLimit);
            });
            it('should have an inactive container, inactive button and collapsed container', function () {
                expect(getElementsState()).toEqual({ containerActive: false, buttonActive: false, containerExpanded: false });
            });
            it('should not force a height on the container', function () {
                expect(container.style.height).toEqual('');
            });
            it("doesn't call onToggle", function () {
                expect(onToggleSpy).not.toHaveBeenCalled();
            });
            describe('then resized beyond the height limit', function () {
                beforeEach(function () {
                    resizeContainer(heightLimit + 1);
                });
                it('makes the container and button active', function () {
                    expect(getElementsState()).toEqual({ containerActive: true, buttonActive: true, containerExpanded: false });
                });
                it('should force a height on the container', function () {
                    expect(container.style.height).toEqual(heightLimit + "px");
                });
                it('should render the toggle button with its label and icon inside', function () {
                    TestUtils_1.expectChildren(heightLimiter.toggleButton, [HeightLimiter_1.HeightLimiterClassNames.BUTTON_LABEL_CLASSNAME, HeightLimiter_1.HeightLimiterClassNames.BUTTON_ICON_CLASSNAME]);
                });
                it('should have the show more label on the toggle button', function () {
                    expect(getButtonText()).toEqual(Strings_1.l('ShowMore'));
                });
                it('should have a down arrow on the toggle button', function () {
                    expect(getButtonIcon()).toEqual(SVGIcons_1.SVGIcons.icons.arrowDown);
                });
                it("doesn't call onToggle", function () {
                    expect(onToggleSpy).not.toHaveBeenCalled();
                });
            });
        });
        describe('initialized beyond the height limit', function () {
            beforeEach(function () {
                initializeHeightLimiter(heightLimit + 1);
            });
            it('should have an active container, active button and collapsed container', function () {
                expect(getElementsState()).toEqual({ containerActive: true, buttonActive: true, containerExpanded: false });
            });
            it('should force a height on the container', function () {
                expect(container.style.height).toEqual(heightLimit + "px");
            });
            it('should have the show more label on the toggle button', function () {
                expect(getButtonText()).toEqual(Strings_1.l('ShowMore'));
            });
            it('should have a down arrow on the toggle button', function () {
                expect(getButtonIcon()).toEqual(SVGIcons_1.SVGIcons.icons.arrowDown);
            });
            it("doesn't call onToggle", function () {
                expect(onToggleSpy).not.toHaveBeenCalled();
            });
            describe('then resized to the height limit', function () {
                beforeEach(function () {
                    resizeContainer(heightLimit);
                });
                it('makes the container and button inactive', function () {
                    expect(getElementsState()).toEqual({ containerActive: false, buttonActive: false, containerExpanded: false });
                });
                it('should not force a height on the container', function () {
                    expect(container.style.height).toEqual('');
                });
                it("doesn't call onToggle", function () {
                    expect(onToggleSpy).not.toHaveBeenCalled();
                });
            });
            describe('then pressing the toggle button', function () {
                beforeEach(function () {
                    heightLimiter.toggleButton.click();
                });
                it('should expand the container', function () {
                    expect(getElementsState()).toEqual({ containerActive: true, buttonActive: true, containerExpanded: true });
                });
                it('should force the scrollHeight on the container', function () {
                    expect(container.style.height).toEqual(contentHeight + "px");
                });
                it('should have the show less label on the toggle button', function () {
                    expect(getButtonText()).toEqual(Strings_1.l('ShowLess'));
                });
                it('should have an up arrow on the toggle button', function () {
                    expect(getButtonIcon()).toEqual(SVGIcons_1.SVGIcons.icons.arrowUp);
                });
                it('then resized to the height limit, should make the container and button inactive, then collapse the container', function () {
                    resizeContainer(heightLimit);
                    expect(getElementsState()).toEqual({ containerActive: false, buttonActive: false, containerExpanded: false });
                });
                it('calls onToggle', function () {
                    expect(onToggleSpy).toHaveBeenCalledTimes(1);
                    expect(onToggleSpy).toHaveBeenCalledWith(true);
                });
                describe('then pressing the toggle button', function () {
                    beforeEach(function () {
                        onToggleSpy.calls.reset();
                        heightLimiter.toggleButton.click();
                    });
                    it('should collapse the container', function () {
                        expect(getElementsState()).toEqual({ containerActive: true, buttonActive: true, containerExpanded: false });
                    });
                    it('should force the height limit on the container', function () {
                        expect(container.style.height).toEqual(heightLimit + "px");
                    });
                    it('should have the show more label on the toggle button', function () {
                        expect(getButtonText()).toEqual(Strings_1.l('ShowMore'));
                    });
                    it('should have a down arrow on the toggle button', function () {
                        expect(getButtonIcon()).toEqual(SVGIcons_1.SVGIcons.icons.arrowDown);
                    });
                    it('calls onToggle', function () {
                        expect(onToggleSpy).toHaveBeenCalledTimes(1);
                        expect(onToggleSpy).toHaveBeenCalledWith(false);
                    });
                });
            });
        });
    });
}
exports.HeightLimiterTest = HeightLimiterTest;
 
 
/***/ }),
/* 1834 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var UserFeedbackBanner_1 = __webpack_require__(409);
var TestUtils_1 = __webpack_require__(158);
var Strings_1 = __webpack_require__(4);
var SVGIcons_1 = __webpack_require__(16);
function UserFeedbackBannerTest() {
    describe('UserFeedbackBanner', function () {
        var rootElement;
        var sendUsefulnessAnalyticsSpy;
        var onExplainWhyPressedSpy;
        function getFirstChild(className) {
            return rootElement.getElementsByClassName(className)[0];
        }
        beforeEach(function () {
            rootElement = new UserFeedbackBanner_1.UserFeedbackBanner((sendUsefulnessAnalyticsSpy = jasmine.createSpy('sendUsefulnessAnalytics')), (onExplainWhyPressedSpy = jasmine.createSpy('onExplainWhyPressed'))).build();
        });
        it('builds a root element with the root classname', function () {
            expect(rootElement.classList.contains(UserFeedbackBanner_1.UserFeedbackBannerClassNames.ROOT_CLASSNAME)).toBeTruthy();
        });
        it('builds a root element with the top container and bottom thank you banner', function () {
            var _a = TestUtils_1.expectChildren(rootElement, [UserFeedbackBanner_1.UserFeedbackBannerClassNames.CONTAINER_CLASSNAME, UserFeedbackBanner_1.UserFeedbackBannerClassNames.THANK_YOU_BANNER_CLASSNAME]), banner = _a[1];
            expect(banner.classList.contains(UserFeedbackBanner_1.UserFeedbackBannerClassNames.THANK_YOU_BANNER_ACTIVE_CLASSNAME)).toBeFalsy();
        });
        it('builds the top container with a label and buttons', function () {
            var label = TestUtils_1.expectChildren(getFirstChild(UserFeedbackBanner_1.UserFeedbackBannerClassNames.CONTAINER_CLASSNAME), [
                UserFeedbackBanner_1.UserFeedbackBannerClassNames.LABEL_CLASSNAME,
                UserFeedbackBanner_1.UserFeedbackBannerClassNames.BUTTONS_CONTAINER_CLASSNAME
            ])[0];
            expect(label.innerText).toEqual(Strings_1.l('UsefulnessFeedbackRequest'));
        });
        it('builds the buttons container with both buttons', function () {
            var _a = TestUtils_1.expectChildren(getFirstChild(UserFeedbackBanner_1.UserFeedbackBannerClassNames.BUTTONS_CONTAINER_CLASSNAME), [
                UserFeedbackBanner_1.UserFeedbackBannerClassNames.YES_BUTTON_CLASSNAME,
                UserFeedbackBanner_1.UserFeedbackBannerClassNames.NO_BUTTON_CLASSNAME
            ]), yesButton = _a[0], noButton = _a[1];
            expect(yesButton.classList.contains(UserFeedbackBanner_1.UserFeedbackBannerClassNames.BUTTON_ACTIVE_CLASSNAME)).toBeFalsy();
            expect(noButton.classList.contains(UserFeedbackBanner_1.UserFeedbackBannerClassNames.BUTTON_ACTIVE_CLASSNAME)).toBeFalsy();
        });
        it('builds the yes button with an icon and text', function () {
            var _a = TestUtils_1.expectChildren(getFirstChild(UserFeedbackBanner_1.UserFeedbackBannerClassNames.YES_BUTTON_CLASSNAME), [UserFeedbackBanner_1.UserFeedbackBannerClassNames.ICON_CLASSNAME, null]), icon = _a[0], label = _a[1];
            expect(icon.innerHTML).toEqual(SVGIcons_1.SVGIcons.icons.checkYes);
            expect(label.innerText).toEqual(Strings_1.l('Yes'));
        });
        it('builds the no button with an icon and text', function () {
            var _a = TestUtils_1.expectChildren(getFirstChild(UserFeedbackBanner_1.UserFeedbackBannerClassNames.NO_BUTTON_CLASSNAME), [UserFeedbackBanner_1.UserFeedbackBannerClassNames.ICON_CLASSNAME, null]), icon = _a[0], label = _a[1];
            expect(icon.innerHTML).toEqual(SVGIcons_1.SVGIcons.icons.clearSmall);
            expect(label.innerText).toEqual(Strings_1.l('No'));
        });
        it('builds the thank you banner with a label and a button', function () {
            var _a = TestUtils_1.expectChildren(getFirstChild(UserFeedbackBanner_1.UserFeedbackBannerClassNames.THANK_YOU_BANNER_CLASSNAME), [
                null,
                UserFeedbackBanner_1.UserFeedbackBannerClassNames.EXPLAIN_WHY_CLASSNAME
            ]), label = _a[0], button = _a[1];
            expect(label.innerText).toEqual(Strings_1.l('UsefulnessFeedbackThankYou'));
            expect(button.innerHTML).toEqual(Strings_1.l('UsefulnessFeedbackExplainWhy'));
            expect(button.classList.contains(UserFeedbackBanner_1.UserFeedbackBannerClassNames.EXPLAIN_WHY_ACTIVE_CLASSNAME)).toBeFalsy();
        });
        describe('after clicking on the yes button', function () {
            var button;
            beforeEach(function () {
                button = getFirstChild(UserFeedbackBanner_1.UserFeedbackBannerClassNames.YES_BUTTON_CLASSNAME);
                button.click();
            });
            it('gives the active class to the button', function () {
                expect(button.classList.contains(UserFeedbackBanner_1.UserFeedbackBannerClassNames.BUTTON_ACTIVE_CLASSNAME)).toBeTruthy();
            });
            it('gives the active class to the thank you banner', function () {
                expect(getFirstChild(UserFeedbackBanner_1.UserFeedbackBannerClassNames.THANK_YOU_BANNER_CLASSNAME).classList.contains(UserFeedbackBanner_1.UserFeedbackBannerClassNames.THANK_YOU_BANNER_ACTIVE_CLASSNAME)).toBeTruthy();
            });
            it("doesn't give the active class to the explain why button", function () {
                expect(getFirstChild(UserFeedbackBanner_1.UserFeedbackBannerClassNames.EXPLAIN_WHY_CLASSNAME).classList.contains(UserFeedbackBanner_1.UserFeedbackBannerClassNames.EXPLAIN_WHY_ACTIVE_CLASSNAME)).toBeFalsy();
            });
            it('sends analytics', function () {
                expect(sendUsefulnessAnalyticsSpy).toHaveBeenCalledWith(true);
            });
            describe('then clicking on the no button', function () {
                var nextButton;
                beforeEach(function () {
                    sendUsefulnessAnalyticsSpy.calls.reset();
                    nextButton = getFirstChild(UserFeedbackBanner_1.UserFeedbackBannerClassNames.NO_BUTTON_CLASSNAME);
                    nextButton.click();
                });
                it('removes the active class from the yes button', function () {
                    expect(button.classList.contains(UserFeedbackBanner_1.UserFeedbackBannerClassNames.BUTTON_ACTIVE_CLASSNAME)).toBeFalsy();
                });
                it('gives the active class to the no button', function () {
                    expect(nextButton.classList.contains(UserFeedbackBanner_1.UserFeedbackBannerClassNames.BUTTON_ACTIVE_CLASSNAME)).toBeTruthy();
                });
                it('gives the active class to the thank you banner', function () {
                    expect(getFirstChild(UserFeedbackBanner_1.UserFeedbackBannerClassNames.THANK_YOU_BANNER_CLASSNAME).classList.contains(UserFeedbackBanner_1.UserFeedbackBannerClassNames.THANK_YOU_BANNER_ACTIVE_CLASSNAME)).toBeTruthy();
                });
                it('gives the active class to the explain why button', function () {
                    expect(getFirstChild(UserFeedbackBanner_1.UserFeedbackBannerClassNames.EXPLAIN_WHY_CLASSNAME).classList.contains(UserFeedbackBanner_1.UserFeedbackBannerClassNames.EXPLAIN_WHY_ACTIVE_CLASSNAME)).toBeTruthy();
                });
                it('sends analytics', function () {
                    expect(sendUsefulnessAnalyticsSpy).toHaveBeenCalledWith(false);
                });
            });
            describe('then clicking on the yes button again', function () {
                beforeEach(function () {
                    sendUsefulnessAnalyticsSpy.calls.reset();
                    button.click();
                });
                it('keeps the active class on the button', function () {
                    expect(button.classList.contains(UserFeedbackBanner_1.UserFeedbackBannerClassNames.BUTTON_ACTIVE_CLASSNAME)).toBeTruthy();
                });
                it('keeps the active class on the thank you banner', function () {
                    expect(getFirstChild(UserFeedbackBanner_1.UserFeedbackBannerClassNames.THANK_YOU_BANNER_CLASSNAME).classList.contains(UserFeedbackBanner_1.UserFeedbackBannerClassNames.THANK_YOU_BANNER_ACTIVE_CLASSNAME)).toBeTruthy();
                });
                it("doesn't give the active class to the explain why button", function () {
                    expect(getFirstChild(UserFeedbackBanner_1.UserFeedbackBannerClassNames.EXPLAIN_WHY_CLASSNAME).classList.contains(UserFeedbackBanner_1.UserFeedbackBannerClassNames.EXPLAIN_WHY_ACTIVE_CLASSNAME)).toBeFalsy();
                });
                it("doesn't send analytics", function () {
                    expect(sendUsefulnessAnalyticsSpy).not.toHaveBeenCalled();
                });
            });
        });
        describe('after clicking on the no button', function () {
            var button;
            beforeEach(function () {
                button = getFirstChild(UserFeedbackBanner_1.UserFeedbackBannerClassNames.NO_BUTTON_CLASSNAME);
                button.click();
            });
            it('gives the active class to the button', function () {
                expect(button.classList.contains(UserFeedbackBanner_1.UserFeedbackBannerClassNames.BUTTON_ACTIVE_CLASSNAME)).toBeTruthy();
            });
            it('gives the active class to the thank you banner', function () {
                expect(getFirstChild(UserFeedbackBanner_1.UserFeedbackBannerClassNames.THANK_YOU_BANNER_CLASSNAME).classList.contains(UserFeedbackBanner_1.UserFeedbackBannerClassNames.THANK_YOU_BANNER_ACTIVE_CLASSNAME)).toBeTruthy();
            });
            it('gives the active class to the explain why button', function () {
                expect(getFirstChild(UserFeedbackBanner_1.UserFeedbackBannerClassNames.EXPLAIN_WHY_CLASSNAME).classList.contains(UserFeedbackBanner_1.UserFeedbackBannerClassNames.EXPLAIN_WHY_ACTIVE_CLASSNAME)).toBeTruthy();
            });
            it('sends analytics', function () {
                expect(sendUsefulnessAnalyticsSpy).toHaveBeenCalledWith(false);
            });
            it('then pressing on explain why, sends analytics', function () {
                getFirstChild(UserFeedbackBanner_1.UserFeedbackBannerClassNames.EXPLAIN_WHY_CLASSNAME).click();
                expect(onExplainWhyPressedSpy).toHaveBeenCalledTimes(1);
            });
            describe('then clicking on the yes button', function () {
                var nextButton;
                beforeEach(function () {
                    sendUsefulnessAnalyticsSpy.calls.reset();
                    nextButton = getFirstChild(UserFeedbackBanner_1.UserFeedbackBannerClassNames.YES_BUTTON_CLASSNAME);
                    nextButton.click();
                });
                it('removes the active class from the no button', function () {
                    expect(button.classList.contains(UserFeedbackBanner_1.UserFeedbackBannerClassNames.BUTTON_ACTIVE_CLASSNAME)).toBeFalsy();
                });
                it('gives the active class to the yes button', function () {
                    expect(nextButton.classList.contains(UserFeedbackBanner_1.UserFeedbackBannerClassNames.BUTTON_ACTIVE_CLASSNAME)).toBeTruthy();
                });
                it('gives the active class to the thank you banner', function () {
                    expect(getFirstChild(UserFeedbackBanner_1.UserFeedbackBannerClassNames.THANK_YOU_BANNER_CLASSNAME).classList.contains(UserFeedbackBanner_1.UserFeedbackBannerClassNames.THANK_YOU_BANNER_ACTIVE_CLASSNAME)).toBeTruthy();
                });
                it("doesn't give the active class to the explain why button", function () {
                    expect(getFirstChild(UserFeedbackBanner_1.UserFeedbackBannerClassNames.EXPLAIN_WHY_CLASSNAME).classList.contains(UserFeedbackBanner_1.UserFeedbackBannerClassNames.EXPLAIN_WHY_ACTIVE_CLASSNAME)).toBeFalsy();
                });
                it('sends analytics', function () {
                    expect(sendUsefulnessAnalyticsSpy).toHaveBeenCalledWith(true);
                });
            });
            describe('then clicking on the no button again', function () {
                beforeEach(function () {
                    sendUsefulnessAnalyticsSpy.calls.reset();
                    button.click();
                });
                it('keeps the active class on the button', function () {
                    expect(button.classList.contains(UserFeedbackBanner_1.UserFeedbackBannerClassNames.BUTTON_ACTIVE_CLASSNAME)).toBeTruthy();
                });
                it('keeps the active class on the thank you banner', function () {
                    expect(getFirstChild(UserFeedbackBanner_1.UserFeedbackBannerClassNames.THANK_YOU_BANNER_CLASSNAME).classList.contains(UserFeedbackBanner_1.UserFeedbackBannerClassNames.THANK_YOU_BANNER_ACTIVE_CLASSNAME)).toBeTruthy();
                });
                it('keeps the active class on the explain why button', function () {
                    expect(getFirstChild(UserFeedbackBanner_1.UserFeedbackBannerClassNames.EXPLAIN_WHY_CLASSNAME).classList.contains(UserFeedbackBanner_1.UserFeedbackBannerClassNames.EXPLAIN_WHY_ACTIVE_CLASSNAME)).toBeTruthy();
                });
                it("doesn't send analytics", function () {
                    expect(sendUsefulnessAnalyticsSpy).not.toHaveBeenCalled();
                });
            });
        });
    });
}
exports.UserFeedbackBannerTest = UserFeedbackBannerTest;
 
 
/***/ }),
/* 1835 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var ExplanationModal_1 = __webpack_require__(411);
var Dom_1 = __webpack_require__(0);
var Simulate_1 = __webpack_require__(15);
var MockEnvironment_1 = __webpack_require__(2);
var AccessibleModal_1 = __webpack_require__(144);
var Strings_1 = __webpack_require__(4);
var TestUtils_1 = __webpack_require__(158);
function ExplanationModalTest() {
    var details = 'Hello, World!';
    var reasons;
    var onClosed;
    var ownerElement;
    var explanationModal;
    var accessibleModal;
    var origin;
    var content;
    function createReason(firstReasonHasDetails) {
        return [
            {
                label: 'Explanation selected by default',
                id: 'selected-by-default',
                onSelect: jasmine.createSpy('onSelect1'),
                hasDetails: firstReasonHasDetails
            },
            {
                label: 'Second reason implicitly without details',
                id: 'implicitly-has-no-details',
                onSelect: jasmine.createSpy('onSelect2')
            },
            {
                label: 'Third reason explicitly without details',
                id: 'explicitly-without-details',
                onSelect: jasmine.createSpy('onSelect3'),
                hasDetails: false
            }
        ];
    }
    function initializeModal(firstReasonHasDetails) {
        if (firstReasonHasDetails === void 0) { firstReasonHasDetails = true; }
        explanationModal = new ExplanationModal_1.ExplanationModal({
            reasons: reasons = createReason(firstReasonHasDetails),
            onClosed: onClosed = jasmine.createSpy('onClosed'),
            ownerElement: ownerElement = Dom_1.$$('div').el,
            modalBoxModule: Simulate_1.Simulate.modalBoxModule()
        });
        explanationModal['modal'] = accessibleModal = MockEnvironment_1.mock(AccessibleModal_1.AccessibleModal);
        accessibleModal.close.and.callFake(function () { return getAccessibleModalOpenParameters().validation(); });
    }
    function getAccessibleModalOpenParameters() {
        return accessibleModal.open.calls.mostRecent().args[0];
    }
    function openModal() {
        explanationModal.open((origin = Dom_1.$$('div').el));
        content = getAccessibleModalOpenParameters().content;
    }
    function getFirstChild(className) {
        return content.getElementsByClassName(className)[0];
    }
    function pressSendButton() {
        getFirstChild(ExplanationModal_1.ExplanationModalClassNames.SEND_BUTTON_CLASSNAME).click();
    }
    function pressCancelButton() {
        getFirstChild(ExplanationModal_1.ExplanationModalClassNames.CANCEL_BUTTON_CLASSNAME).click();
    }
    function writeDetails() {
        getFirstChild(ExplanationModal_1.ExplanationModalClassNames.DETAILS_TEXTAREA_CLASSNAME).value = details;
    }
    function selectReason(index) {
        explanationModal['reasons'][index].select();
    }
    describe('ExplanationModal', function () {
        describe('with a first reason that has details', function () {
            beforeEach(function () {
                initializeModal();
                openModal();
            });
            it('should open the modal with the given origin', function () {
                expect(getAccessibleModalOpenParameters().origin).toEqual(origin);
            });
            it('should give the modal the right title', function () {
                expect(getAccessibleModalOpenParameters().title.innerText).toEqual(Strings_1.l('UsefulnessFeedbackExplainWhyImperative'));
            });
            it('should give the root the right class', function () {
                expect(content.classList.contains(ExplanationModal_1.ExplanationModalClassNames.CONTENT_CLASSNAME)).toBeTruthy();
            });
            it('builds the root with the explanations section and the buttons section', function () {
                TestUtils_1.expectChildren(content, [ExplanationModal_1.ExplanationModalClassNames.EXPLANATION_SECTION_CLASSNAME, ExplanationModal_1.ExplanationModalClassNames.BUTTONS_SECTION_CLASSNAME]);
            });
            it('builds the explanations section with the reasons list and the details section', function () {
                TestUtils_1.expectChildren(getFirstChild(ExplanationModal_1.ExplanationModalClassNames.EXPLANATION_SECTION_CLASSNAME), [
                    ExplanationModal_1.ExplanationModalClassNames.REASONS_CLASSNAME,
                    ExplanationModal_1.ExplanationModalClassNames.DETAILS_SECTION_CLASSNAME
                ]);
            });
            it('builds the buttons section with the send button and the cancel button', function () {
                TestUtils_1.expectChildren(getFirstChild(ExplanationModal_1.ExplanationModalClassNames.BUTTONS_SECTION_CLASSNAME), [
                    ExplanationModal_1.ExplanationModalClassNames.SEND_BUTTON_CLASSNAME,
                    ExplanationModal_1.ExplanationModalClassNames.CANCEL_BUTTON_CLASSNAME
                ]);
            });
            it('builds a radio button for each reason', function () {
                var inputs = Dom_1.$$(content).findAll('input');
                expect(inputs.length).toEqual(reasons.length, 'Expected as many inputs as reasons.');
                var labels = inputs.map(function (input) { return Dom_1.$$(content).find("label[for=\"" + input.id + "\"]"); });
                expect(labels.length).toEqual(reasons.length, 'Expected a label for each reason');
                labels.forEach(function (label, index) { return expect(label.innerText).toEqual(reasons[index].label); });
            });
            it('builds a details section with a label and a textarea', function () {
                TestUtils_1.expectChildren(getFirstChild(ExplanationModal_1.ExplanationModalClassNames.DETAILS_SECTION_CLASSNAME), [
                    ExplanationModal_1.ExplanationModalClassNames.DETAILS_LABEL_CLASSNAME,
                    ExplanationModal_1.ExplanationModalClassNames.DETAILS_TEXTAREA_CLASSNAME
                ]);
            });
            it("doesn't disable the textarea", function () {
                expect(getFirstChild(ExplanationModal_1.ExplanationModalClassNames.DETAILS_TEXTAREA_CLASSNAME).disabled).toBeFalsy();
            });
            it("doesn't disable the details section", function () {
                expect(getFirstChild(ExplanationModal_1.ExplanationModalClassNames.DETAILS_SECTION_CLASSNAME).classList.contains('coveo-hidden')).toBeFalsy();
            });
            it('builds a send button with the right text', function () {
                expect(getFirstChild(ExplanationModal_1.ExplanationModalClassNames.SEND_BUTTON_CLASSNAME).innerText).toEqual('Send');
            });
            describe('after selecting the second reason', function () {
                beforeEach(function () {
                    selectReason(1);
                });
                it('should disable the details textarea', function () {
                    expect(getFirstChild(ExplanationModal_1.ExplanationModalClassNames.DETAILS_TEXTAREA_CLASSNAME).disabled).toBeTruthy();
                });
                it('should disable the details section', function () {
                    expect(getFirstChild(ExplanationModal_1.ExplanationModalClassNames.DETAILS_SECTION_CLASSNAME).classList.contains('coveo-hidden')).toBeTruthy();
                });
                describe('then pressing the send button', function () {
                    beforeEach(function () {
                        pressSendButton();
                    });
                    it('calls onSelect on the second reason', function () {
                        expect(reasons[1].onSelect).toHaveBeenCalledTimes(1);
                    });
                    it("doesn't provide details from the textarea", function () {
                        writeDetails();
                        expect(explanationModal.details).toBeNull();
                    });
                });
            });
            describe('after selecting the third reason', function () {
                beforeEach(function () {
                    selectReason(2);
                });
                it('should disable the details textarea', function () {
                    expect(getFirstChild(ExplanationModal_1.ExplanationModalClassNames.DETAILS_TEXTAREA_CLASSNAME).disabled).toBeTruthy();
                });
                it('should disable the details section', function () {
                    expect(getFirstChild(ExplanationModal_1.ExplanationModalClassNames.DETAILS_SECTION_CLASSNAME).classList.contains('coveo-hidden')).toBeTruthy();
                });
                describe('then pressing the send button', function () {
                    beforeEach(function () {
                        pressSendButton();
                    });
                    it('calls onSelect on the third reason', function () {
                        expect(reasons[2].onSelect).toHaveBeenCalledTimes(1);
                    });
                    it("doesn't provide details from the textarea", function () {
                        writeDetails();
                        expect(explanationModal.details).toBeNull();
                    });
                });
            });
            describe('after pressing the send button', function () {
                beforeEach(function () {
                    pressSendButton();
                });
                it('calls onSelect on the first reason', function () {
                    expect(reasons[0].onSelect).toHaveBeenCalledTimes(1);
                });
                it('provides details from the textarea', function () {
                    writeDetails();
                    expect(explanationModal.details).toEqual(details);
                });
                it('closes the modal', function () {
                    expect(accessibleModal.close).toHaveBeenCalledTimes(1);
                });
                it("doesn't call onClosed", function () {
                    expect(onClosed).not.toHaveBeenCalled();
                });
            });
            describe('after pressing the cancel button', function () {
                beforeEach(function () {
                    pressCancelButton();
                });
                it('closes the modal', function () {
                    expect(accessibleModal.close).toHaveBeenCalledTimes(1);
                });
                it('calls onClosed', function () {
                    expect(onClosed).toHaveBeenCalledTimes(1);
                });
            });
        });
        describe("with a first reason that doesn't have details", function () {
            beforeEach(function () {
                initializeModal(false);
                openModal();
            });
            it('disables the textarea', function () {
                expect(getFirstChild(ExplanationModal_1.ExplanationModalClassNames.DETAILS_TEXTAREA_CLASSNAME).disabled).toBeTruthy();
            });
            it('disables the details section', function () {
                expect(getFirstChild(ExplanationModal_1.ExplanationModalClassNames.DETAILS_SECTION_CLASSNAME).classList.contains('coveo-hidden')).toBeTruthy();
            });
        });
    });
}
exports.ExplanationModalTest = ExplanationModalTest;
 
 
/***/ }),
/* 1836 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __assign = (this && this.__assign) || Object.assign || function(t) {
    for (var s, i = 1, n = arguments.length; i < n; i++) {
        s = arguments[i];
        for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
            t[p] = s[p];
    }
    return t;
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { Iif (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        Iif (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            Iif (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
            Iif (y = 0, t) op = [0, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    Eif (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        Iif (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
Object.defineProperty(exports, "__esModule", { value: true });
var QueryEvents_1 = __webpack_require__(14);
var SmartSnippetSuggestions_1 = __webpack_require__(863);
var MockEnvironment_1 = __webpack_require__(2);
var SmartSnippetCollapsibleSuggestion_1 = __webpack_require__(864);
var Dom_1 = __webpack_require__(0);
var TestUtils_1 = __webpack_require__(158);
var AnalyticsActionListMeta_1 = __webpack_require__(7);
var Core_1 = __webpack_require__(9);
var SmartSnippetCommon_1 = __webpack_require__(206);
var underscore_1 = __webpack_require__(1);
var ClassNames = __assign({}, SmartSnippetSuggestions_1.SmartSnippetSuggestionsClassNames, SmartSnippetCollapsibleSuggestion_1.SmartSnippetCollapsibleSuggestionClassNames);
function SmartSnippetSuggestionsTest() {
    var _this = this;
    var sources = [
        {
            title: 'First title',
            url: 'https://www.google.com/1',
            alt: 'http://127.0.0.1/1',
            id: {
                contentIdKey: 'unique-identifier-a',
                contentIdValue: 'identifier-of-the-first-result'
            }
        },
        {
            title: 'Second title',
            url: 'https://www.google.com/2',
            alt: 'http://127.0.0.1/2',
            id: {
                contentIdKey: 'unique-identifier-b',
                contentIdValue: 'identifier-of-the-second-result'
            }
        },
        {
            title: 'Third title',
            url: 'https://www.google.com/3',
            alt: 'http://127.0.0.1/3',
            id: {
                contentIdKey: 'unique-identifier-c',
                contentIdValue: 'identifier-of-the-third-result'
            }
        }
    ];
    var questions = ['Question A', 'Question B', 'Question C'];
    var style = "\n  .abc {\n    color: red;\n  }\n\n  #hello-world {\n    cursor: url('some-ugly-animated-gif-cursor.gif');\n  }\n".replace(' ', '');
    function mockResults() {
        return sources.map(function (source) {
            return ({
                title: source.title,
                titleHighlights: [],
                clickUri: source.url,
                raw: (_a = {
                        alt: source.alt
                    },
                    _a[source.id.contentIdKey] = source.id.contentIdValue,
                    _a)
            });
            var _a;
        });
    }
    function mockSnippet(id) {
        return Dom_1.$$('div', {}, "\n    <span>I am snippet #" + id + "!</span>\n\n    <ol>\n      <li>On the <a href=\"https://platform.cloud.coveo.com/admin/#/orgid/search/in-app-widgets/\">In-Product Experiences</a> page, click Add <b>In-Product Experience</b>.</li>\n      <li>In the Configuration tab, fill the Basic settings section.</li>\n      <li>(Optional) Use the Design and Content access tabs to <a href=\"https://docs.coveo.com/en/3160/#customizing-an-ipx-interface\">customize your <b>IPX</b> interface</a>.</li>\n      <li>Click Save.</li>\n      <li>In the Loader snippet panel that appears, you may click Copy to save the loader snippet for your <b>IPX</b> interface to your clipboard, and then click Save.  You can Always retrieve the loader snippet later.</li>\n    </ol>\n    \n    <p>\n      You're now ready to <a href=\"https://docs.coveo.com/en/3160/build-a-search-ui/manage-coveo-in-product-experiences-ipx#embed-your-ipx-interface-in-sites-and-applications\">embed your IPX interface</a>. However, we recommend that you <a href=\"https://docs.coveo.com/en/3160/build-a-search-ui/manage-coveo-in-product-experiences-ipx#configuring-query-pipelines-for-an-ipx-interface-recommended\">configure query pipelines for your IPX interface</a> before.\n    </p>\n  ").el;
    }
    function mockStyling(content) {
        return Dom_1.$$('script', { type: 'text/css' }, content).el;
    }
    function mockRelatedQuestions() {
        return sources.map(function (source, i) {
            return ({
                question: questions[i],
                answerSnippet: mockSnippet(i).innerHTML,
                documentId: source.id,
                score: 0
            });
        });
    }
    function mockQuestionAnswer() {
        return {
            relatedQuestions: mockRelatedQuestions()
        };
    }
    describe('SmartSnippetSuggestions', function () {
        var test;
        var searchUid;
        function instantiateSmartSnippetSuggestions(styling, options) {
            if (options === void 0) { options = {}; }
            test = MockEnvironment_1.advancedComponentSetup(SmartSnippetSuggestions_1.SmartSnippetSuggestions, new MockEnvironment_1.AdvancedComponentSetupOptions(Dom_1.$$.apply(void 0, ['div', {}].concat((Core_1.Utils.isNullOrUndefined(styling) ? [] : [mockStyling(styling)]))).el, options));
        }
        function waitForCollapsibleSuggestions() {
            return __awaiter(this, void 0, void 0, function () {
                return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0: return [4 /*yield*/, test.cmp['contentLoaded']];
                        case 1:
                            _a.sent();
                            return [2 /*return*/];
                    }
                });
            });
        }
        function triggerQuerySuccess(args) {
            return __awaiter(this, void 0, void 0, function () {
                return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0:
                            test.env.queryController.getLastResults.and.returnValue(args.results);
                            Dom_1.$$(test.env.root).trigger(QueryEvents_1.QueryEvents.deferredQuerySuccess, args);
                            return [4 /*yield*/, test.cmp.loading];
                        case 1:
                            _a.sent();
                            return [2 /*return*/];
                    }
                });
            });
        }
        function triggerQuestionAnswerQuery(withSource) {
            return __awaiter(this, void 0, void 0, function () {
                var results;
                return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0:
                            results = withSource ? mockResults() : [];
                            return [4 /*yield*/, triggerQuerySuccess({
                                    results: {
                                        results: results,
                                        questionAnswer: mockQuestionAnswer(),
                                        searchUid: searchUid = Math.random().toString().substr(2)
                                    }
                                })];
                        case 1:
                            _a.sent();
                            return [4 /*yield*/, waitForCollapsibleSuggestions()];
                        case 2:
                            _a.sent();
                            return [2 /*return*/];
                    }
                });
            });
        }
        function findClass(className) {
            return Dom_1.$$(test.cmp.element).findClass(className);
        }
        function getShadowRoots() {
            return findClass(ClassNames.SHADOW_CLASSNAME).map(function (shadowContainer) { return shadowContainer.shadowRoot.childNodes.item(0); });
        }
        function resetAnalyticsSpyHistory() {
            test.cmp.usageAnalytics.logCustomEvent.calls.reset();
        }
        describe('with styling without a source', function () {
            beforeEach(function (done) { return __awaiter(_this, void 0, void 0, function () {
                return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0:
                            instantiateSmartSnippetSuggestions(style);
                            document.body.appendChild(test.env.root);
                            return [4 /*yield*/, triggerQuestionAnswerQuery(false)];
                        case 1:
                            _a.sent();
                            done();
                            return [2 /*return*/];
                    }
                });
            }); });
            afterEach(function () {
                test.env.root.remove();
            });
            it('should render the style', function () {
                var renderedStyles = getShadowRoots().map(function (shadowRoot) { return shadowRoot.querySelector('style').innerHTML; });
                expect(renderedStyles).toEqual([style, style, style]);
            });
            it('renders only a shadow container in snippet containers', function () {
                findClass(ClassNames.QUESTION_SNIPPET_CONTAINER_CLASSNAME).forEach(function (snippet) {
                    return TestUtils_1.expectChildren(snippet, [ClassNames.SHADOW_CLASSNAME]);
                });
            });
        });
        describe('with default styling', function () {
            beforeEach(function () {
                instantiateSmartSnippetSuggestions(null);
                document.body.appendChild(test.env.root);
            });
            afterEach(function () {
                test.env.root.remove();
            });
            it("doesn't have the has-question class", function () {
                expect(test.cmp.element.classList.contains(ClassNames.HAS_QUESTIONS_CLASSNAME)).toBeFalsy();
            });
            it("doesn't render anything in the SmartSnippetSuggestions element", function () {
                expect(test.cmp.element.children.length).toEqual(0);
            });
            it('with only a question answer, does not render', function (done) { return __awaiter(_this, void 0, void 0, function () {
                return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0: return [4 /*yield*/, triggerQuerySuccess({
                                results: {
                                    questionAnswer: { question: 'abc', answerSnippet: 'def', relatedQuestions: [], documentId: sources[0].id, score: 0 }
                                }
                            })];
                        case 1:
                            _a.sent();
                            expect(test.cmp.element.classList.contains(ClassNames.HAS_QUESTIONS_CLASSNAME)).toBeFalsy();
                            done();
                            return [2 /*return*/];
                    }
                });
            }); });
            it('with only related questions, renders', function (done) { return __awaiter(_this, void 0, void 0, function () {
                return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0: return [4 /*yield*/, triggerQuerySuccess({
                                results: { questionAnswer: { relatedQuestions: mockRelatedQuestions() } }
                            })];
                        case 1:
                            _a.sent();
                            expect(test.cmp.element.classList.contains(ClassNames.HAS_QUESTIONS_CLASSNAME)).toBeTruthy();
                            done();
                            return [2 /*return*/];
                    }
                });
            }); });
            it('with both a question answer and related questions, renders', function (done) { return __awaiter(_this, void 0, void 0, function () {
                return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0: return [4 /*yield*/, triggerQuerySuccess({
                                results: { questionAnswer: { question: 'abc', answerSnippet: 'def', relatedQuestions: mockRelatedQuestions() } }
                            })];
                        case 1:
                            _a.sent();
                            expect(test.cmp.element.classList.contains(ClassNames.HAS_QUESTIONS_CLASSNAME)).toBeTruthy();
                            done();
                            return [2 /*return*/];
                    }
                });
            }); });
            describe('with a source', function () {
                beforeEach(function (done) { return __awaiter(_this, void 0, void 0, function () {
                    return __generator(this, function (_a) {
                        switch (_a.label) {
                            case 0: return [4 /*yield*/, triggerQuestionAnswerQuery(true)];
                            case 1:
                                _a.sent();
                                done();
                                return [2 /*return*/];
                        }
                    });
                }); });
                it('the iframe of the second question has tabindex=-1', function () {
                    expect(findClass(ClassNames.SHADOW_CLASSNAME)[1].querySelector('iframe').getAttribute('tabindex')).toEqual('-1');
                });
                it('has the has-question class', function () {
                    expect(test.cmp.element.classList.contains(ClassNames.HAS_QUESTIONS_CLASSNAME)).toBeTruthy();
                });
                it('renders a questions list title and a questions list', function () {
                    TestUtils_1.expectChildren(test.cmp.element, [ClassNames.QUESTIONS_LIST_TITLE_CLASSNAME, ClassNames.QUESTIONS_LIST_CLASSNAME]);
                });
                it('renders 3 questions', function () {
                    TestUtils_1.expectChildren(findClass(ClassNames.QUESTIONS_LIST_CLASSNAME)[0], [
                        ClassNames.QUESTION_CLASSNAME,
                        ClassNames.QUESTION_CLASSNAME,
                        ClassNames.QUESTION_CLASSNAME
                    ]);
                });
                describe('each SmartSnippetCollapsibleSuggestion', function () {
                    it('renders a title and a collapsible container', function () {
                        findClass(ClassNames.QUESTION_CLASSNAME).forEach(function (question) {
                            return TestUtils_1.expectChildren(question, [ClassNames.QUESTION_TITLE_CLASSNAME, ClassNames.QUESTION_SNIPPET_CLASSNAME]);
                        });
                    });
                    it('renders a label and a checkbox in the title', function () {
                        findClass(ClassNames.QUESTION_TITLE_CLASSNAME).forEach(function (title) {
                            return TestUtils_1.expectChildren(title, [ClassNames.QUESTION_TITLE_LABEL_CLASSNAME, ClassNames.QUESTION_TITLE_CHECKBOX_CLASSNAME]);
                        });
                    });
                    it('renders its question in its title', function () {
                        findClass(ClassNames.QUESTION_TITLE_LABEL_CLASSNAME).forEach(function (label, i) { return expect(label.innerText).toEqual(questions[i]); });
                    });
                    it('renders a snippet container in the collapsible container', function () {
                        findClass(ClassNames.QUESTION_SNIPPET_CLASSNAME).forEach(function (snippet) {
                            return TestUtils_1.expectChildren(snippet, [ClassNames.QUESTION_SNIPPET_CONTAINER_CLASSNAME]);
                        });
                    });
                    it('renders a shadow container, a source url and a source title in the collapsible container', function () {
                        findClass(ClassNames.QUESTION_SNIPPET_CONTAINER_CLASSNAME).forEach(function (snippet) {
                            return TestUtils_1.expectChildren(snippet, [ClassNames.SHADOW_CLASSNAME, ClassNames.SOURCE_URL_CLASSNAME, ClassNames.SOURCE_TITLE_CLASSNAME]);
                        });
                    });
                    it('gives the right href for each source element', function () {
                        findClass(ClassNames.SOURCE_URL_CLASSNAME).forEach(function (sourceUrl, i) {
                            return expect(sourceUrl.href).toEqual(sources[i].url);
                        });
                        findClass(ClassNames.SOURCE_TITLE_CLASSNAME).forEach(function (sourceUrl, i) {
                            return expect(sourceUrl.href).toEqual(sources[i].url);
                        });
                    });
                    it('gives the right text for each source element', function () {
                        findClass(ClassNames.SOURCE_URL_CLASSNAME).forEach(function (sourceUrl, i) { return expect(sourceUrl.innerText).toEqual(sources[i].url); });
                        findClass(ClassNames.SOURCE_TITLE_CLASSNAME).forEach(function (sourceUrl, i) { return expect(sourceUrl.innerText).toEqual(sources[i].title); });
                    });
                    it('is collapsed', function () {
                        expect(findClass(ClassNames.QUESTION_SNIPPET_CLASSNAME).map(function (question) {
                            return question.classList.contains(ClassNames.QUESTION_SNIPPET_HIDDEN_CLASSNAME);
                        })).toEqual([true, true, true]);
                    });
                    it('renders the expected shadow content', function () {
                        getShadowRoots().forEach(function (shadowRoot, i) {
                            var shadowContainer = TestUtils_1.expectChildren(shadowRoot, [ClassNames.RAW_CONTENT_CLASSNAME, null])[0];
                            TestUtils_1.expectEquivalentDOM(shadowContainer, mockSnippet(i), { ignoreRoot: true, ignoreAttributes: ['target'] });
                        });
                    });
                });
                describe('when the second question is expanded', function () {
                    beforeEach(function () {
                        resetAnalyticsSpyHistory();
                        findClass(ClassNames.QUESTION_TITLE_CHECKBOX_CLASSNAME)[1].click();
                    });
                    it("the iframe doesn't have a tabindex", function () {
                        expect(findClass(ClassNames.SHADOW_CLASSNAME)[1].querySelector('iframe').hasAttribute('tabindex')).toBeFalsy();
                    });
                    it('sends expand analytics', function () {
                        expect(test.cmp.usageAnalytics.logCustomEvent).toHaveBeenCalledWith(AnalyticsActionListMeta_1.analyticsActionCauseList.expandSmartSnippetSuggestion, {
                            documentId: sources[1].id,
                            searchQueryUid: searchUid,
                            question: questions[1],
                            answerSnippet: mockSnippet(1).innerHTML
                        }, findClass(ClassNames.QUESTION_TITLE_CHECKBOX_CLASSNAME)[1]);
                    });
                    it('is collapsed, apart from the second question', function () {
                        expect(findClass(ClassNames.QUESTION_SNIPPET_CLASSNAME).map(function (question) {
                            return question.classList.contains(ClassNames.QUESTION_SNIPPET_HIDDEN_CLASSNAME);
                        })).toEqual([true, false, true]);
                    });
                    describe('then collapsed', function () {
                        beforeEach(function () {
                            resetAnalyticsSpyHistory();
                            findClass(ClassNames.QUESTION_TITLE_CHECKBOX_CLASSNAME)[1].click();
                        });
                        it('sends collapse analytics', function () {
                            expect(test.cmp.usageAnalytics.logCustomEvent).toHaveBeenCalledWith(AnalyticsActionListMeta_1.analyticsActionCauseList.collapseSmartSnippetSuggestion, {
                                documentId: sources[1].id,
                                searchQueryUid: searchUid,
                                question: questions[1],
                                answerSnippet: mockSnippet(1).innerHTML
                            }, findClass(ClassNames.QUESTION_TITLE_CHECKBOX_CLASSNAME)[1]);
                        });
                    });
                    it('should wrap the snippet in a container in a shadow DOM', function () {
                        getShadowRoots().forEach(function (shadowRoot, i) {
                            var shadowContainer = TestUtils_1.expectChildren(shadowRoot, [ClassNames.RAW_CONTENT_CLASSNAME, null])[0];
                            TestUtils_1.expectEquivalentDOM(shadowContainer, mockSnippet(i), { ignoreRoot: true, ignoreAttributes: ['target'] });
                        });
                    });
                    it('should render the default style', function () {
                        getShadowRoots().forEach(function (shadowRoot) {
                            var _a = TestUtils_1.expectChildren(shadowRoot, [ClassNames.RAW_CONTENT_CLASSNAME, null]), styleElement = _a[1];
                            expect(styleElement.innerHTML).toEqual(SmartSnippetCommon_1.getDefaultSnippetStyle(ClassNames.RAW_CONTENT_CLASSNAME));
                        });
                    });
                });
            });
        });
        describe('with the useIFrame option', function () {
            afterEach(function () {
                test.env.root.remove();
            });
            it('renders a div instead of an iframe when the option is false', function (done) { return __awaiter(_this, void 0, void 0, function () {
                var IFRAME_CLASSNAME;
                return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0:
                            IFRAME_CLASSNAME = 'coveo-shadow-iframe';
                            instantiateSmartSnippetSuggestions(null, {
                                useIFrame: false
                            });
                            document.body.appendChild(test.env.root);
                            return [4 /*yield*/, triggerQuestionAnswerQuery(true)];
                        case 1:
                            _a.sent();
                            expect(test.cmp.element.querySelector("." + IFRAME_CLASSNAME).nodeName).toEqual('DIV');
                            done();
                            return [2 /*return*/];
                    }
                });
            }); });
            it('renders an iframe by default', function (done) { return __awaiter(_this, void 0, void 0, function () {
                var IFRAME_CLASSNAME;
                return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0:
                            IFRAME_CLASSNAME = 'coveo-shadow-iframe';
                            instantiateSmartSnippetSuggestions(null);
                            document.body.appendChild(test.env.root);
                            return [4 /*yield*/, triggerQuestionAnswerQuery(true)];
                        case 1:
                            _a.sent();
                            expect(test.cmp.element.querySelector("." + IFRAME_CLASSNAME).nodeName).toEqual('IFRAME');
                            done();
                            return [2 /*return*/];
                    }
                });
            }); });
        });
        describe('with no styling, without sources', function () {
            beforeEach(function (done) { return __awaiter(_this, void 0, void 0, function () {
                return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0:
                            instantiateSmartSnippetSuggestions('');
                            document.body.appendChild(test.env.root);
                            return [4 /*yield*/, triggerQuestionAnswerQuery(false)];
                        case 1:
                            _a.sent();
                            done();
                            return [2 /*return*/];
                    }
                });
            }); });
            afterEach(function () {
                test.env.root.remove();
            });
            it('should render the no style', function () {
                getShadowRoots().forEach(function (shadowRoot) {
                    var _a = TestUtils_1.expectChildren(shadowRoot, [ClassNames.RAW_CONTENT_CLASSNAME, null]), styleElement = _a[1];
                    expect(styleElement.innerHTML).toEqual('');
                });
            });
        });
        it('displays the specified titleField', function (done) { return __awaiter(_this, void 0, void 0, function () {
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        instantiateSmartSnippetSuggestions(null, { titleField: '@alt' });
                        document.body.appendChild(test.env.root);
                        return [4 /*yield*/, triggerQuestionAnswerQuery(true)];
                    case 1:
                        _a.sent();
                        findClass(ClassNames.SOURCE_TITLE_CLASSNAME).forEach(function (title, i) { return expect(title.innerText).toEqual(sources[i].alt); });
                        findClass(ClassNames.SOURCE_URL_CLASSNAME).forEach(function (source, i) { return expect(source.innerText).toEqual(sources[i].url); });
                        test.env.root.remove();
                        done();
                        return [2 /*return*/];
                }
            });
        }); });
        it('uses and displays the specified hrefTemplate', function (done) { return __awaiter(_this, void 0, void 0, function () {
            var expectedHref;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        instantiateSmartSnippetSuggestions(null, { hrefTemplate: '${raw.alt}/?abcd=1' });
                        document.body.appendChild(test.env.root);
                        return [4 /*yield*/, triggerQuestionAnswerQuery(true)];
                    case 1:
                        _a.sent();
                        expectedHref = function (i) { return sources[i].alt + "/?abcd=1"; };
                        findClass(ClassNames.SOURCE_TITLE_CLASSNAME).forEach(function (title, i) { return expect(title.href).toEqual(expectedHref(i)); });
                        findClass(ClassNames.SOURCE_URL_CLASSNAME).forEach(function (source, i) {
                            expect(source.innerText).toEqual(expectedHref(i));
                            expect(source.innerText).toEqual(expectedHref(i));
                        });
                        test.env.root.remove();
                        done();
                        return [2 /*return*/];
                }
            });
        }); });
        it('displays resolved relative URLs when specified in the hrefTemplate', function (done) { return __awaiter(_this, void 0, void 0, function () {
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        instantiateSmartSnippetSuggestions(null, { hrefTemplate: '../${raw.alt}' });
                        document.body.appendChild(test.env.root);
                        return [4 /*yield*/, triggerQuestionAnswerQuery(true)];
                    case 1:
                        _a.sent();
                        findClass(ClassNames.SOURCE_URL_CLASSNAME).forEach(function (title, i) {
                            return expect(title.innerText.indexOf(window.location.protocol)).toEqual(0);
                        });
                        test.env.root.remove();
                        done();
                        return [2 /*return*/];
                }
            });
        }); });
        it('resists XSS injections in hrefTemplate (1)', function (done) { return __awaiter(_this, void 0, void 0, function () {
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        instantiateSmartSnippetSuggestions(null, {
                            hrefTemplate: 'https://test.com?q=<img src="abcd.png" onerror="window.XSSInjected = true;">'
                        });
                        document.body.appendChild(test.env.root);
                        return [4 /*yield*/, triggerQuestionAnswerQuery(true)];
                    case 1:
                        _a.sent();
                        return [4 /*yield*/, Promise.resolve()];
                    case 2:
                        _a.sent();
                        expect('XSSInjected' in window).toBeFalsy();
                        delete window['XSSInjected'];
                        test.env.root.remove();
                        done();
                        return [2 /*return*/];
                }
            });
        }); });
        it('resists XSS injections in hrefTemplate (2)', function (done) { return __awaiter(_this, void 0, void 0, function () {
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        instantiateSmartSnippetSuggestions(null, {
                            hrefTemplate: 'https://test.com?q="/><img src="abcd.png" onerror="window.XSSInjected = true;"><span title="'
                        });
                        document.body.appendChild(test.env.root);
                        return [4 /*yield*/, triggerQuestionAnswerQuery(true)];
                    case 1:
                        _a.sent();
                        return [4 /*yield*/, Promise.resolve()];
                    case 2:
                        _a.sent();
                        expect('XSSInjected' in window).toBeFalsy();
                        delete window['XSSInjected'];
                        test.env.root.remove();
                        done();
                        return [2 /*return*/];
                }
            });
        }); });
        it('resists XSS injections in content', function (done) { return __awaiter(_this, void 0, void 0, function () {
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        instantiateSmartSnippetSuggestions(null, { useIFrame: false });
                        document.body.appendChild(test.env.root);
                        return [4 /*yield*/, triggerQuerySuccess({
                                results: {
                                    results: mockResults(),
                                    questionAnswer: __assign({}, mockQuestionAnswer(), { relatedQuestions: [__assign({}, mockRelatedQuestions()[0], { answerSnippet: '<img src="abcd.png" onerror="window.XSSInjected = true;">' })] }),
                                    searchUid: searchUid = Math.random().toString().substr(2)
                                }
                            })];
                    case 1:
                        _a.sent();
                        return [4 /*yield*/, Core_1.Utils.resolveAfter(100)];
                    case 2:
                        _a.sent();
                        expect('XSSInjected' in window).toBeFalsy();
                        delete window['XSSInjected'];
                        test.env.root.remove();
                        done();
                        return [2 /*return*/];
                }
            });
        }); });
        it("doesn't set the target of the source when alwaysOpenInNewWindow is unset", function (done) { return __awaiter(_this, void 0, void 0, function () {
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        instantiateSmartSnippetSuggestions(null);
                        document.body.appendChild(test.env.root);
                        return [4 /*yield*/, triggerQuestionAnswerQuery(true)];
                    case 1:
                        _a.sent();
                        expect(findClass(ClassNames.SOURCE_URL_CLASSNAME)[0].target).toEqual('');
                        expect(findClass(ClassNames.SOURCE_TITLE_CLASSNAME)[0].target).toEqual('');
                        test.env.root.remove();
                        done();
                        return [2 /*return*/];
                }
            });
        }); });
        it('sets the target of the links to _top when alwaysOpenInNewWindow is false/unset', function (done) { return __awaiter(_this, void 0, void 0, function () {
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        instantiateSmartSnippetSuggestions(null, { useIFrame: false });
                        document.body.appendChild(test.env.root);
                        return [4 /*yield*/, triggerQuestionAnswerQuery(true)];
                    case 1:
                        _a.sent();
                        underscore_1.flatten(findClass(ClassNames.RAW_CONTENT_CLASSNAME).map(function (content) { return underscore_1.toArray(content.querySelectorAll('a')); })).forEach(function (link) { return expect(link.target).toEqual('_top'); });
                        test.env.root.remove();
                        done();
                        return [2 /*return*/];
                }
            });
        }); });
        it('sets the target of the source when alwaysOpenInNewWindow is set', function (done) { return __awaiter(_this, void 0, void 0, function () {
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        instantiateSmartSnippetSuggestions(null, { alwaysOpenInNewWindow: true });
                        document.body.appendChild(test.env.root);
                        return [4 /*yield*/, triggerQuestionAnswerQuery(true)];
                    case 1:
                        _a.sent();
                        expect(findClass(ClassNames.SOURCE_URL_CLASSNAME)[0].target).toEqual('_blank');
                        expect(findClass(ClassNames.SOURCE_TITLE_CLASSNAME)[0].target).toEqual('_blank');
                        test.env.root.remove();
                        done();
                        return [2 /*return*/];
                }
            });
        }); });
        it('sets the target of the links to _blank when alwaysOpenInNewWindow is set', function (done) { return __awaiter(_this, void 0, void 0, function () {
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        instantiateSmartSnippetSuggestions(null, { alwaysOpenInNewWindow: true, useIFrame: false });
                        document.body.appendChild(test.env.root);
                        return [4 /*yield*/, triggerQuestionAnswerQuery(true)];
                    case 1:
                        _a.sent();
                        underscore_1.flatten(findClass(ClassNames.RAW_CONTENT_CLASSNAME).map(function (content) { return underscore_1.toArray(content.querySelectorAll('a')); })).forEach(function (link) { return expect(link.target).toEqual('_blank'); });
                        test.env.root.remove();
                        done();
                        return [2 /*return*/];
                }
            });
        }); });
    });
}
exports.SmartSnippetSuggestionsTest = SmartSnippetSuggestionsTest;
 
 
/***/ }),
/* 1837 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var FacetSearchElement_1 = __webpack_require__(330);
var MockEnvironment_1 = __webpack_require__(2);
var FacetSearch_1 = __webpack_require__(147);
var Dom_1 = __webpack_require__(0);
var Core_1 = __webpack_require__(9);
function FacetSearchElementTest() {
    describe('FacetSearchElement', function () {
        var facetSearch;
        var facetSearchElement;
        beforeEach(function () {
            facetSearch = MockEnvironment_1.mock(FacetSearch_1.FacetSearch);
            facetSearchElement = new FacetSearchElement_1.FacetSearchElement(facetSearch);
            facetSearchElement.build();
        });
        describe('when calling emptyAndShowNoResults', function () {
            var noResultsElement;
            beforeEach(function () {
                facetSearchElement.emptyAndShowNoResults();
                noResultsElement = Dom_1.$$(facetSearchElement.searchResults).children()[0];
            });
            it('searchResults contains a single element', function () {
                expect(Dom_1.$$(facetSearchElement.searchResults).children().length).toEqual(1);
            });
            it('renders a noResults element as a HTMLLIElement', function () {
                expect(noResultsElement instanceof HTMLLIElement).toBeTruthy();
            });
            it('renders a noResults element with an id and a class', function () {
                expect(Dom_1.$$(noResultsElement).hasClass('coveo-facet-value-not-found')).toBeTruthy();
                expect(noResultsElement.id.indexOf('coveo-facet-value-not-found')).toEqual(0);
            });
            it('renders an accessible noResults element', function () {
                expect(noResultsElement.getAttribute('role')).toEqual('option');
                expect(noResultsElement.tabIndex).toEqual(0);
            });
            it('selects the noResults element', function () {
                expect(facetSearchElement.input.getAttribute('aria-activedescendant')).toEqual(noResultsElement.id);
                expect(noResultsElement.getAttribute('aria-selected')).toEqual('true');
            });
        });
        describe('when calling updateAriaLiveWithResults', function () {
            it("when there is a non empty query\n      should update AriaLive with the text: \"{X} result(s) for {query}...\"", function () {
                facetSearchElement.updateAriaLiveWithResults('query', 10, false);
                expect(facetSearch.updateAriaLive).toHaveBeenCalledWith(Core_1.l('ShowingResultsWithQuery', 10, 'query', 10));
            });
            it("when there is an empty query\n      should update AriaLive with the text: \"{X} result(s)...\"", function () {
                facetSearchElement.updateAriaLiveWithResults('', 10, false);
                expect(facetSearch.updateAriaLive).toHaveBeenCalledWith(Core_1.l('ShowingResults', 10, 10));
            });
            it("when there are more values to fetch\n      should update AriaLive with the text \"(more values are available)\" appended", function () {
                facetSearchElement.updateAriaLiveWithResults('', 10, true);
                expect(facetSearch.updateAriaLive).toHaveBeenCalledWith(Core_1.l('ShowingResults', 10, 10) + " (" + Core_1.l('MoreValuesAvailable') + ")");
            });
        });
    });
}
exports.FacetSearchElementTest = FacetSearchElementTest;
 
 
/***/ }),
/* 1838 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var Core_1 = __webpack_require__(9);
var HistoryStore_1 = __webpack_require__(84);
function HistoryStoreTest() {
    describe('HistoryStore', function () {
        var key = '__coveo.analytics.history';
        it('calling buildHistoryStore does not delete the actionHistory cookie', function () {
            Core_1.Cookie.set(key, 'a');
            HistoryStore_1.buildHistoryStore();
            expect(Core_1.Cookie.get(key)).toBe('a');
        });
        it('calling buildNullHistoryStore does not delete the actionHistory cookie', function () {
            Core_1.Cookie.set(key, 'a');
            HistoryStore_1.buildNullHistoryStore();
            expect(Core_1.Cookie.get(key)).toBe('a');
        });
    });
}
exports.HistoryStoreTest = HistoryStoreTest;
 
 
/***/ }),
/* 1839 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
Object.defineProperty(exports, "__esModule", { value: true });
var AnalyticsInformation_1 = __webpack_require__(85);
var HistoryStore_1 = __webpack_require__(84);
var CookieUtils_1 = __webpack_require__(168);
function AnalyticsInformationTest() {
    describe('AnalyticsInformation', function () {
        var historyStore;
        function addHistoryElement(name, value) {
            historyStore.addElement({
                time: new Date().toTimeString(),
                internalTime: Date.now(),
                name: name,
                value: value
            });
        }
        var analyticsInformation;
        beforeEach(function () {
            analyticsInformation = new AnalyticsInformation_1.AnalyticsInformation();
            historyStore = HistoryStore_1.buildHistoryStore();
            historyStore.clear();
            analyticsInformation.clear();
        });
        describe('without localstorage', function () {
            it("doesn't have a clientId", function () {
                expect(analyticsInformation.clientId).toBeNull();
            });
            it('has a location', function () {
                expect(analyticsInformation.location).toEqual(document.location.href);
            });
            it('has a referrer', function () {
                expect(analyticsInformation.referrer).toEqual(document.referrer);
            });
        });
        describe('with legacy cookies, but without localstorage', function () {
            var visitorId = 'def';
            beforeEach(function () {
                CookieUtils_1.Cookie.set('visitorId', visitorId);
            });
            it('calling #clear removes the cookies', function () {
                analyticsInformation.clear();
                expect(analyticsInformation.clientId).toBeNull();
            });
        });
        it('retrieving lastPageId does not interact with the __coveo.analytics.history cookie', function () {
            // When HistoryStore interacts with cookies, browsers show a missing SameSite attribute warning.
            // To prevent this, the source code must initialize HistoryStore using a special helper.
            // The decoy value should remain intact after accessing lastPageId.
            var decoyValue = '__coveo.analytics.history=value';
            document.cookie = decoyValue;
            analyticsInformation.lastPageId;
            expect(document.cookie).toContain(decoyValue);
        });
        describe('with localstorage', function () {
            var visitorId = 'def';
            beforeEach(function () {
                localStorage.setItem('visitorId', visitorId);
            });
            it('has a clientId', function () {
                expect(analyticsInformation.clientId).toEqual(visitorId);
                4;
            });
            it('has a location', function () {
                expect(analyticsInformation.location).toEqual(document.location.href);
            });
            it('has a referrer', function () {
                expect(analyticsInformation.referrer).toEqual(document.referrer);
            });
        });
        describe('without a PageView event', function () {
            beforeEach(function () {
                addHistoryElement('PageVieww', 'abc');
            });
            it("doesn't have a pageId", function () {
                expect(analyticsInformation.lastPageId).toBeNull();
            });
        });
        describe('with a PageView event', function () {
            var pageId = 'ghi';
            beforeEach(function () {
                addHistoryElement('PageView', pageId);
            });
            it('has a pageId', function () {
                expect(analyticsInformation.lastPageId).toEqual(pageId);
            });
        });
    });
}
exports.AnalyticsInformationTest = AnalyticsInformationTest;
 
 
/***/ }),
/* 1840 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { Iif (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        Iif (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            Iif (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
            Iif (y = 0, t) op = [0, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    Eif (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        Iif (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
Object.defineProperty(exports, "__esModule", { value: true });
var Core_1 = __webpack_require__(9);
var AttachShadowPolyfill_1 = __webpack_require__(412);
var Dom_1 = __webpack_require__(0);
function AttachShadowPolyfillTest() {
    var _this = this;
    describe('AttachShadowPolyfill', function () {
        var element;
        var shadowRoot;
        var onSizeChangedSpy;
        function appendHeightElement() {
            shadowRoot.appendChild(Dom_1.$$('div', { style: 'height: 200px;' }).el);
        }
        beforeEach(function (done) { return __awaiter(_this, void 0, void 0, function () {
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        element = Dom_1.$$('div').el;
                        document.body.appendChild(element);
                        return [4 /*yield*/, AttachShadowPolyfill_1.attachShadow(element, {
                                mode: 'open',
                                title: 'hello',
                                onSizeChanged: onSizeChangedSpy = jasmine.createSpy('onSizeChanged')
                            })];
                    case 1:
                        shadowRoot = _a.sent();
                        done();
                        return [2 /*return*/];
                }
            });
        }); });
        afterEach(function () {
            element.remove();
        });
        it("doesn't call onSizeChanged initially", function () {
            expect(onSizeChangedSpy).not.toHaveBeenCalled();
        });
        it('calls onSizeChanged when content is added', function (done) { return __awaiter(_this, void 0, void 0, function () {
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        appendHeightElement();
                        return [4 /*yield*/, Core_1.Utils.resolveAfter(0)];
                    case 1:
                        _a.sent();
                        expect(onSizeChangedSpy).toHaveBeenCalledTimes(1);
                        appendHeightElement();
                        return [4 /*yield*/, Core_1.Utils.resolveAfter(0)];
                    case 2:
                        _a.sent();
                        expect(onSizeChangedSpy).toHaveBeenCalledTimes(2);
                        done();
                        return [2 /*return*/];
                }
            });
        }); });
    });
}
exports.AttachShadowPolyfillTest = AttachShadowPolyfillTest;
 
 
/***/ })
/******/ ]);
//# sourceMappingURL=unitTests.js.map